@animus-ui/cli 0.1.37 → 0.1.39

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -119,6 +119,14 @@ lock that fails loud. The full contract, including the consistency-check
119
119
  recipe for non-JS orchestrators, is in the
120
120
  [standalone extraction contract](https://github.com/codecaaron/animus/blob/main/docs/standalone-extraction.md).
121
121
 
122
+ With `stylesheets: 'split'` in the config, the build also publishes
123
+ `styles.css` as consecutive slices, `styles.<slice>.<hash>.css` for the
124
+ foundation, components and utilities, and `stylesheets.json`, their names in
125
+ the order a document links them. Their bytes in order are `styles.css`'s, so
126
+ linking them in that order changes nothing in the cascade, and a slice an
127
+ edit leaves alone keeps its name and its cached copy. `commit.json` lists
128
+ them with the rest.
129
+
122
130
  ## License
123
131
 
124
132
  MIT
@@ -1 +1 @@
1
- {"version":3,"file":"build.d.ts","sourceRoot":"","sources":["../src/build.ts"],"names":[],"mappings":"AAOA,OAAO,EAIL,iBAAiB,EAMlB,MAAM,4BAA4B,CAAC;AAcpC,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAKlD,qBAAa,iBAAkB,SAAQ,KAAK;CAAG;AAC/C,qBAAa,YAAa,SAAQ,KAAK;CAAG;AAC1C,qBAAa,kBAAmB,SAAQ,KAAK;CAAG;AAEhD,eAAO,MAAM,GAAG,aAAc,OAAO,EAAE,KAAG,IACL,CAAC;AAEtC,MAAM,WAAW,WAAW;IAC1B,MAAM,EAAE,MAAM,CAAC;IACf,cAAc,EAAE,MAAM,CAAC;IACvB,SAAS,EAAE,MAAM,CAAC;CACnB;AAED;qCACqC;AACrC,wBAAsB,YAAY,CAAC,MAAM,EAAE,iBAAiB,GAAG,OAAO,CAAC,IAAI,CAAC,CAqB3E;AAED,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,iBAAiB,GAAG,iBAAiB,CAkC7E;AAED,MAAM,WAAW,cAAc;IAC7B,cAAc,E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;IAC7B,cAAc,EAAE,MAAM,CAAC;IACvB,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,wBAAgB,qBAAqB,CACnC,MAAM,EAAE,iBAAiB,EACzB,OAAO,EAAE,iBAAiB,GACzB,cAAc,CAsEhB;AAqBD,wBAAgB,qBAAqB,CACnC,UAAU,EAAE,MAAM,iBAAiB,GAAG,IAAI,EAC1C,WAAW,EAAE,MAAM,IAAI,GACtB,MAAM,IAAI,CAOZ;AAED,wBAAgB,uBAAuB,CACrC,MAAM,EAAE,iBAAiB,EACzB,OAAO,EAAE,iBAAiB,GACzB,IAAI,CAUN;AAED,MAAM,WAAW,UAAU;IACzB,iDAAiD;IACjD,GAAG,CAAC,EAAE,OAAO,CAAC;CACf;AAgBD,wBAAsB,QAAQ,CAC5B,MAAM,EAAE,iBAAiB,EACzB,KAAK,GAAE,UAAe,GACrB,OAAO,CAAC,WAAW,CAAC,CAwDtB"}
package/dist/config.d.ts CHANGED
@@ -53,6 +53,7 @@ export declare function projectResolvedConfig(config: ResolvedCliConfig): {
53
53
  runtimeImport: string | null;
54
54
  closedDynamicImports: import("@animus-ui/extract/pipeline").ClosedDynamicImport[] | null;
55
55
  fontPreloads: import("@animus-ui/extract/pipeline").FontPreloadEntry[] | null;
56
+ stylesheets: import("@animus-ui/extract/pipeline").StylesheetDelivery;
56
57
  exclude: readonly string[];
57
58
  provenance: Record<string, OptionProvenance>;
58
59
  };
@@ -1 +1 @@
1
- {"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAaA,OAAO,KAAK,EACV,iBAAiB,EACjB,UAAU,EACV,eAAe,EAEf,gBAAgB,EAEhB,eAAe,EAChB,MAAM,6BAA6B,CAAC;AAErC,eAAO,MAAM,gBAAgB,YAC3B,oBAAoB,EACpB,mBAAmB,EACnB,kBAAkB,EAClB,kBAAkB,CACV,CAAC;AAEX,MAAM,WAAW,mBAAmB;IAClC,0EAA0E;IAC1E,MAAM,CAAC,EAAE,M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,MAAM,EAAE,CAAC;IACnC,IAAI,EAAE,UAAU,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,gBAAgB,CAAC,CAAC;CAC9C;AA2PD,wBAAsB,gBAAgB,CACpC,KAAK,EAAE,QAAQ,EACf,GAAG,EAAE,MAAM,GACV,OAAO,CAAC,iBAAiB,CAAC,CAwI5B;AAED;kEACkE;AAClE,wBAAgB,kBAAkB,CAChC,MAAM,EAAE,iBAAiB,EACzB,GAAG,EAAE,MAAM,GACV,MAAM,GAAG,IAAI,CAOf;AAED,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,iBAAiB;IAE3D,MAAM;IACN,IAAI;IACJ,UAAU;IACV,MAAM;IACN,IAAI;IACJ,MAAM;IACN,MAAM;IACN,WAAW;IACX,OAAO;IACP,OAAO;IACP,MAAM;IACN,MAAM;IACN,oBAAoB;IACpB,MAAM;IACN,UAAU;IACV,SAAS;IACT,aAAa;IACb,oBAAoB;IACpB,YAAY;IACZ,WAAW;IACX,OAAO;IACP,UAAU;EAEb"}
package/dist/index.cjs CHANGED
@@ -63,6 +63,7 @@ const COMMIT_FILE = _animus_ui_extract_session.CLI_COMMIT_ARTIFACT;
63
63
  const LOCK_FILE = _animus_ui_extract_session.CLI_LOCK_ARTIFACT;
64
64
  const ASSETS_DIR = _animus_ui_extract_session.SESSION_ASSETS_DIR;
65
65
  const FONT_PRELOADS_FILE = _animus_ui_extract_session.CLI_FONT_PRELOADS_ARTIFACT;
66
+ const STYLESHEETS_FILE = _animus_ui_extract_session.CLI_STYLESHEETS_ARTIFACT;
66
67
  function isFileExistsError(error) {
67
68
  return error instanceof Object && "code" in error && error.code === "EEXIST";
68
69
  }
@@ -105,7 +106,11 @@ const NAMED_PAYLOAD_FIELDS = [
105
106
  [MANIFEST_FILE, "manifestJson"],
106
107
  [FONT_PRELOADS_FILE, "fontPreloadsJson"]
107
108
  ];
108
- const PUBLISHED_NAMES = [...NAMED_PAYLOAD_FIELDS.map(([name]) => name), COMMIT_FILE];
109
+ const PUBLISHED_NAMES = [
110
+ ...NAMED_PAYLOAD_FIELDS.map(([name]) => name),
111
+ STYLESHEETS_FILE,
112
+ COMMIT_FILE
113
+ ];
109
114
  /** Called only while the claim is held — deciding a tree is debris and
110
115
  * deleting it is a write. A live pid's tree is its own working set. */
111
116
  function reapAbandonedStaging(outDir) {
@@ -194,6 +199,10 @@ function publishArtifacts(outDir, payloads) {
194
199
  const text = payloads[field];
195
200
  if (text !== void 0) namedPayloads.push([name, text]);
196
201
  }
202
+ if (payloads.stylesheets !== void 0) {
203
+ for (const { name, css } of payloads.stylesheets) namedPayloads.push([name, css]);
204
+ namedPayloads.push([STYLESHEETS_FILE, JSON.stringify(payloads.stylesheets.map(({ name }) => name))]);
205
+ }
197
206
  const record = {
198
207
  schema: 1,
199
208
  payloads: {}
@@ -317,6 +326,7 @@ function publishSharedPayloads(config, session) {
317
326
  assets: (0, _animus_ui_extract_session.collectSessionAssets)(session.sessionDir)
318
327
  };
319
328
  if (fontPreloads.length > 0) payloads.fontPreloadsJson = JSON.stringify(fontPreloads);
329
+ if (options.stylesheets === "split") payloads.stylesheets = (0, _animus_ui_extract_pipeline.stylesheetSliceFiles)(stylesCss, "styles");
320
330
  try {
321
331
  publishArtifacts(outDir, payloads);
322
332
  } catch (error) {
@@ -482,6 +492,7 @@ function parseLoadedCliConfig(raw) {
482
492
  runtimeImport: isConfigString(raw.runtimeImport) ? raw.runtimeImport : void 0,
483
493
  closedDynamicImports: Array.isArray(raw.closedDynamicImports) ? raw.closedDynamicImports : void 0,
484
494
  fontPreloads: Array.isArray(raw.fontPreloads) ? raw.fontPreloads : void 0,
495
+ stylesheets: raw.stylesheets === "single" || raw.stylesheets === "split" ? raw.stylesheets : void 0,
485
496
  mode: raw.mode === "development" || raw.mode === "production" ? raw.mode : void 0
486
497
  },
487
498
  cli: { outDir: cli.outDir }
@@ -577,6 +588,7 @@ async function resolveCliConfig(flags, cwd) {
577
588
  runtimeImport: pick("runtimeImport", void 0),
578
589
  closedDynamicImports: pick("closedDynamicImports", void 0),
579
590
  fontPreloads: pick("fontPreloads", void 0),
591
+ stylesheets: pick("stylesheets", void 0),
580
592
  mode: resolvedMode.mode
581
593
  };
582
594
  const excludePatterns = (0, _animus_ui_extract_pipeline.createExcludeMatcher)(options.exclude).patterns;
@@ -619,6 +631,7 @@ function projectResolvedConfig(config) {
619
631
  runtimeImport: config.options.runtimeImport ?? null,
620
632
  closedDynamicImports: config.options.closedDynamicImports ?? null,
621
633
  fontPreloads: config.options.fontPreloads ?? null,
634
+ stylesheets: config.options.stylesheets ?? "single",
622
635
  exclude: config.excludePatterns,
623
636
  provenance: config.provenance
624
637
  };
package/dist/index.mjs CHANGED
@@ -1,6 +1,6 @@
1
- import { AnimusConfigError, DIAGNOSTIC_LEVELS, KIT_DESCRIPTOR_FILE, REPLACEABLE_DEFAULT_EXCLUDE, STRUCTURAL_EXCLUDE, assertKnownOptionKeys, assertSupportedEngine, buildKitDescriptor, contentHash, createExcludeMatcher, kitPublicationFailures, outputExclusion, renderFontPreloads, resolveMode, runStructuralSelfCheck } from "@animus-ui/extract/pipeline";
1
+ import { AnimusConfigError, DIAGNOSTIC_LEVELS, KIT_DESCRIPTOR_FILE, REPLACEABLE_DEFAULT_EXCLUDE, STRUCTURAL_EXCLUDE, assertKnownOptionKeys, assertSupportedEngine, buildKitDescriptor, contentHash, createExcludeMatcher, kitPublicationFailures, outputExclusion, renderFontPreloads, resolveMode, runStructuralSelfCheck, stylesheetSliceFiles } from "@animus-ui/extract/pipeline";
2
2
  import { parseArgs } from "node:util";
3
- import { ANIMUS_ARTIFACT_DIR, CLI_COMMIT_ARTIFACT, CLI_FONT_PRELOADS_ARTIFACT, CLI_LOCK_ARTIFACT, ExtractionSession, MANIFEST_ARTIFACT, SESSION_ASSETS_DIR, STYLES_ARTIFACT, SYSTEM_PROPS_ARTIFACT, checkLockLiveness, collectSessionAssets, decodeCommitRecord, engineApi, getAnalyzedHashes, getManifestJson, getSharedCss, getSharedFontPreloads, getSharedSystemProps, holdDirectoryClaim, isLockHolderAlive, lockRecordBytes, readCliLockRecord, startTurbopackWatcher, verifyCommitRecord } from "@animus-ui/extract/session";
3
+ import { ANIMUS_ARTIFACT_DIR, CLI_COMMIT_ARTIFACT, CLI_FONT_PRELOADS_ARTIFACT, CLI_LOCK_ARTIFACT, CLI_STYLESHEETS_ARTIFACT, ExtractionSession, MANIFEST_ARTIFACT, SESSION_ASSETS_DIR, STYLES_ARTIFACT, SYSTEM_PROPS_ARTIFACT, checkLockLiveness, collectSessionAssets, decodeCommitRecord, engineApi, getAnalyzedHashes, getManifestJson, getSharedCss, getSharedFontPreloads, getSharedSystemProps, holdDirectoryClaim, isLockHolderAlive, lockRecordBytes, readCliLockRecord, startTurbopackWatcher, verifyCommitRecord } from "@animus-ui/extract/session";
4
4
  import { existsSync, mkdirSync, readFileSync, readdirSync, renameSync, rmSync, unlinkSync, writeFileSync } from "fs";
5
5
  import { dirname, isAbsolute, join, relative, resolve } from "path";
6
6
  import { pathToFileURL } from "url";
@@ -62,6 +62,7 @@ const COMMIT_FILE = CLI_COMMIT_ARTIFACT;
62
62
  const LOCK_FILE = CLI_LOCK_ARTIFACT;
63
63
  const ASSETS_DIR = SESSION_ASSETS_DIR;
64
64
  const FONT_PRELOADS_FILE = CLI_FONT_PRELOADS_ARTIFACT;
65
+ const STYLESHEETS_FILE = CLI_STYLESHEETS_ARTIFACT;
65
66
  function isFileExistsError(error) {
66
67
  return error instanceof Object && "code" in error && error.code === "EEXIST";
67
68
  }
@@ -104,7 +105,11 @@ const NAMED_PAYLOAD_FIELDS = [
104
105
  [MANIFEST_FILE, "manifestJson"],
105
106
  [FONT_PRELOADS_FILE, "fontPreloadsJson"]
106
107
  ];
107
- const PUBLISHED_NAMES = [...NAMED_PAYLOAD_FIELDS.map(([name]) => name), COMMIT_FILE];
108
+ const PUBLISHED_NAMES = [
109
+ ...NAMED_PAYLOAD_FIELDS.map(([name]) => name),
110
+ STYLESHEETS_FILE,
111
+ COMMIT_FILE
112
+ ];
108
113
  /** Called only while the claim is held — deciding a tree is debris and
109
114
  * deleting it is a write. A live pid's tree is its own working set. */
110
115
  function reapAbandonedStaging(outDir) {
@@ -193,6 +198,10 @@ function publishArtifacts(outDir, payloads) {
193
198
  const text = payloads[field];
194
199
  if (text !== void 0) namedPayloads.push([name, text]);
195
200
  }
201
+ if (payloads.stylesheets !== void 0) {
202
+ for (const { name, css } of payloads.stylesheets) namedPayloads.push([name, css]);
203
+ namedPayloads.push([STYLESHEETS_FILE, JSON.stringify(payloads.stylesheets.map(({ name }) => name))]);
204
+ }
196
205
  const record = {
197
206
  schema: 1,
198
207
  payloads: {}
@@ -316,6 +325,7 @@ function publishSharedPayloads(config, session) {
316
325
  assets: collectSessionAssets(session.sessionDir)
317
326
  };
318
327
  if (fontPreloads.length > 0) payloads.fontPreloadsJson = JSON.stringify(fontPreloads);
328
+ if (options.stylesheets === "split") payloads.stylesheets = stylesheetSliceFiles(stylesCss, "styles");
319
329
  try {
320
330
  publishArtifacts(outDir, payloads);
321
331
  } catch (error) {
@@ -481,6 +491,7 @@ function parseLoadedCliConfig(raw) {
481
491
  runtimeImport: isConfigString(raw.runtimeImport) ? raw.runtimeImport : void 0,
482
492
  closedDynamicImports: Array.isArray(raw.closedDynamicImports) ? raw.closedDynamicImports : void 0,
483
493
  fontPreloads: Array.isArray(raw.fontPreloads) ? raw.fontPreloads : void 0,
494
+ stylesheets: raw.stylesheets === "single" || raw.stylesheets === "split" ? raw.stylesheets : void 0,
484
495
  mode: raw.mode === "development" || raw.mode === "production" ? raw.mode : void 0
485
496
  },
486
497
  cli: { outDir: cli.outDir }
@@ -576,6 +587,7 @@ async function resolveCliConfig(flags, cwd) {
576
587
  runtimeImport: pick("runtimeImport", void 0),
577
588
  closedDynamicImports: pick("closedDynamicImports", void 0),
578
589
  fontPreloads: pick("fontPreloads", void 0),
590
+ stylesheets: pick("stylesheets", void 0),
579
591
  mode: resolvedMode.mode
580
592
  };
581
593
  const excludePatterns = createExcludeMatcher(options.exclude).patterns;
@@ -618,6 +630,7 @@ function projectResolvedConfig(config) {
618
630
  runtimeImport: config.options.runtimeImport ?? null,
619
631
  closedDynamicImports: config.options.closedDynamicImports ?? null,
620
632
  fontPreloads: config.options.fontPreloads ?? null,
633
+ stylesheets: config.options.stylesheets ?? "single",
621
634
  exclude: config.excludePatterns,
622
635
  provenance: config.provenance
623
636
  };
package/dist/writer.d.ts CHANGED
@@ -7,6 +7,7 @@ export declare const COMMIT_FILE = "commit.json";
7
7
  export declare const LOCK_FILE = "lock.json";
8
8
  export declare const ASSETS_DIR = "assets";
9
9
  export declare const FONT_PRELOADS_FILE = "font-preloads.json";
10
+ export declare const STYLESHEETS_FILE = "stylesheets.json";
10
11
  export interface ArtifactPayloads {
11
12
  stylesCss: string;
12
13
  systemPropsJs: string;
@@ -14,6 +15,13 @@ export interface ArtifactPayloads {
14
15
  /** The faces' preloads, hrefs relative to styles.css, for
15
16
  * `renderFontPreloads`; absent when no face preloads. */
16
17
  fontPreloadsJson?: string;
18
+ /** A split build's stylesheet files in link order, published beside
19
+ * styles.css, whose bytes in order are styles.css's, with
20
+ * stylesheets.json naming them; absent for one sheet. */
21
+ stylesheets?: ReadonlyArray<{
22
+ name: string;
23
+ css: string;
24
+ }>;
17
25
  /** Published under `assets/<name>` beside styles.css — the stylesheet's
18
26
  * relative urls dangle without them. */
19
27
  assets?: readonly SessionAsset[];
@@ -1 +1 @@
1
- {"version":3,"file":"writer.d.ts","sourceRoot":"","sources":["../src/writer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAe,MAAM,6BAA6B,CAAC;AA6B7E,OAAO,KAAK,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAI7E,eAAO,MAAM,WAAW,eAAkB,CAAC;AAC3C,eAAO,MAAM,iBAAiB,oBAAwB,CAAC;AACvD,eAAO,MAAM,aAAa,kBAAoB,CAAC;AAC/C,eAAO,MAA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ASzB;CACF;AAED;yEACyE;AACzE,qBAAa,uBAAwB,SAAQ,iBAAiB;IAC5D,YAAY,OAAO,EAAE,MAAM,EAG1B;CACF;AAqDD,6EAA6E;AAC7E,wBAAgB,WAAW,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,IAAI,CAoDtD;AAeD;4EAC4E;AAC5E,wBAAgB,gBAAgB,CAC9B,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,gBAAgB,GACzB,YAAY,CA8Fd"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@animus-ui/cli",
3
- "version": "0.1.37",
3
+ "version": "0.1.39",
4
4
  "description": "Standalone Animus extraction CLI — one-shot builds and artifact emission for any build system",
5
5
  "keywords": [
6
6
  "animus",
@@ -41,7 +41,7 @@
41
41
  "compile": "bun check"
42
42
  },
43
43
  "dependencies": {
44
- "@animus-ui/extract": "0.1.37"
44
+ "@animus-ui/extract": "0.1.39"
45
45
  },
46
46
  "engines": {
47
47
  "node": ">=22.12.0"