@animus-ui/cli 0.1.19 → 0.1.21

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
@@ -36,8 +36,10 @@ animus print-config --root . --system ./src/ds.ts
36
36
  Configuration lives in `animus.config.{json,mjs,js,ts}` (probed in that
37
37
  order; `.ts` needs Node >= 23.6 native type stripping — older runtimes get
38
38
  a guided error naming the `.mjs`/`.json` remedy). Flags override file
39
- values; `--exclude` merges, and an explicit `exclude: []` in the config file
40
- means no user exclusions (the replaceable defaults are not restored).
39
+ values. `--exclude` patterns join the config file's `exclude`, and together
40
+ they replace the defaults (`dist`, `.test.`, `.spec.`); an explicit
41
+ `exclude: []` in the config file means no user exclusions (the defaults are
42
+ not restored). `node_modules`, `.next` and `.animus` are always excluded.
41
43
  `animus print-config` prints the fully resolved configuration as JSON on
42
44
  stdout with per-key provenance, including `extensions` and `staticCss`.
43
45
 
@@ -1 +1 @@
1
- {"version":3,"file":"build.d.ts","sourceRoot":"","sources":["../src/build.ts"],"names":[],"mappings":"AAKA,OAAO,EAGL,iBAAiB,EAKlB,MAAM,4BAA4B,CAAC;AAcpC,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAGlD,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,iBAAi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AS,EAAE,MAAM,CAAC;CACnB;AAED,wBAAgB,qBAAqB,CACnC,MAAM,EAAE,iBAAiB,EACzB,OAAO,EAAE,iBAAiB,GACzB,cAAc,CA+DhB;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,CAgBN;AAED,wBAAsB,QAAQ,CAC5B,MAAM,EAAE,iBAAiB,GACxB,OAAO,CAAC,WAAW,CAAC,CAyCtB"}
package/dist/config.d.ts CHANGED
@@ -45,6 +45,7 @@ export declare function projectResolvedConfig(config: ResolvedCliConfig): {
45
45
  targets: string | string[] | null;
46
46
  minify: boolean | null;
47
47
  prefix: string | null;
48
+ prefixContextualVars: boolean;
48
49
  layers: string[] | null;
49
50
  extensions: string[] | null;
50
51
  staticCss: StaticCssConfig | null;
@@ -1 +1 @@
1
- {"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAYA,OAAO,KAAK,EACV,iBAAiB,EACjB,UAAU,EACV,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,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,QAAQ;IACvB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,OAAO,CAAC,EAAE,OAA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AAM,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,OAAO;IACP,OAAO;IACP,MAAM;IACN,MAAM;IACN,oBAAoB;IACpB,MAAM;IACN,UAAU;IACV,SAAS;IACT,OAAO;IACP,UAAU;EAEb"}
package/dist/index.cjs CHANGED
@@ -300,7 +300,8 @@ function publishSharedPayloads(config, session) {
300
300
  componentCss: "",
301
301
  assembledCss: stylesCss,
302
302
  layers: options.layers,
303
- externalOutcomes: session.lastExternalOutcomes
303
+ externalOutcomes: session.lastExternalOutcomes,
304
+ variableMapJson: session.variableMapJson
304
305
  });
305
306
  if (failures.length > 0) throw new ExtractionFailure(`Structural self-check failed:\n - ${failures.join("\n - ")}`);
306
307
  const assets = (0, _animus_ui_extract_session.collectSessionAssets)(session.sessionDir);
@@ -449,6 +450,7 @@ function parseLoadedCliConfig(raw) {
449
450
  strict: isConfigBoolean(raw.strict) ? raw.strict : void 0,
450
451
  verbose: isConfigBoolean(raw.verbose) || raw.verbose === "trace" ? raw.verbose : void 0,
451
452
  prefix: isConfigString(raw.prefix) ? raw.prefix : void 0,
453
+ prefixContextualVars: isConfigBoolean(raw.prefixContextualVars) ? raw.prefixContextualVars : void 0,
452
454
  targets: isConfigString(raw.targets) || isConfigStringArray(raw.targets) ? raw.targets : void 0,
453
455
  minify: isConfigBoolean(raw.minify) ? raw.minify : void 0,
454
456
  staticCss: configStaticCss(raw.staticCss),
@@ -539,6 +541,7 @@ async function resolveCliConfig(flags, cwd) {
539
541
  strict: pick("strict", flags.strict),
540
542
  verbose: pick("verbose", flags.verbose),
541
543
  prefix: pick("prefix", void 0),
544
+ prefixContextualVars: pick("prefixContextualVars", void 0),
542
545
  targets: pick("targets", flags.targets),
543
546
  minify: pick("minify", void 0),
544
547
  staticCss: pick("staticCss", void 0),
@@ -577,6 +580,7 @@ function projectResolvedConfig(config) {
577
580
  targets: config.options.targets ?? null,
578
581
  minify: config.options.minify ?? null,
579
582
  prefix: config.options.prefix ?? null,
583
+ prefixContextualVars: config.options.prefixContextualVars ?? false,
580
584
  layers: config.options.layers ?? null,
581
585
  extensions: config.options.extensions ?? null,
582
586
  staticCss: config.options.staticCss ?? null,
@@ -778,8 +782,10 @@ Options:
778
782
  --root <path> Root every relative input resolves against
779
783
  --config <path> Explicit config file (default: animus.config.* in root)
780
784
  --out-dir <path> Artifact directory (default: <root>/.animus)
781
- --exclude <glob> Additional exclusion (repeatable; MERGES with defaults;
782
- an explicit exclude: [] in the config file means none)
785
+ --exclude <glob> Exclusion (repeatable). With the config file's exclude,
786
+ REPLACES the defaults (${_animus_ui_extract_pipeline.REPLACEABLE_DEFAULT_EXCLUDE.join(", ")});
787
+ exclude: [] in the config file means none.
788
+ ${_animus_ui_extract_pipeline.STRUCTURAL_EXCLUDE.join(", ")} are always excluded
783
789
  --mode <m> 'development' | 'production' (default: production)
784
790
  --targets <query> Browserslist query for CSS lowering
785
791
  --strict Fail on inputs that could not be read or resolved,
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;kDACkD;AAalD,eAAO,MAAM,OAAO,IAAI,CAAC;AACzB,eAAO,MAAM,eAAe,IAAI,CAAC;AACjC,eAAO,MAAM,UAAU,IAAI,CAAC;AAC5B,eAAO,MAAM,gBAAgB,IAAI,CAAC;AAClC;qEACqE;AACrE,eAAO,MAAM,YAAY,IAAI,CAAC;AAwD9B;sDACsD;AACtD,wBAAgB,WAAW,CAAC,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CAMzD;AAQD,wBAAsB,IAAI,CACxB,IAAI,GAAE,MAAM,EAA0B,GACrC,OAAO,CAAC,IAAI,CAAC,CA2Ff"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;kDACkD;AAiBlD,eAAO,MAAM,OAAO,IAAI,CAAC;AACzB,eAAO,MAAM,eAAe,IAAI,CAAC;AACjC,eAAO,MAAM,UAAU,IAAI,CAAC;AAC5B,eAAO,MAAM,gBAAgB,IAAI,CAAC;AAClC;qEACqE;AACrE,eAAO,MAAM,YAAY,IAAI,CAAC;AA0D9B;sDACsD;AACtD,wBAAgB,WAAW,CAAC,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CAMzD;AAQD,wBAAsB,IAAI,CACxB,IAAI,GAAE,MAAM,EAA0B,GACrC,OAAO,CAAC,IAAI,CAAC,CA2Ff"}
package/dist/index.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { AnimusConfigError, assertKnownOptionKeys, assertNoRetiredEngineSelection, buildPathAliasesJson, contentHash, createExcludeMatcher, readTsconfigAliasPairs, resolveMode, runStructuralSelfCheck } from "@animus-ui/extract/pipeline";
1
+ import { AnimusConfigError, REPLACEABLE_DEFAULT_EXCLUDE, STRUCTURAL_EXCLUDE, assertKnownOptionKeys, assertNoRetiredEngineSelection, buildPathAliasesJson, contentHash, createExcludeMatcher, readTsconfigAliasPairs, resolveMode, runStructuralSelfCheck } from "@animus-ui/extract/pipeline";
2
2
  import { parseArgs } from "node:util";
3
3
  import { ANIMUS_ARTIFACT_DIR, CLI_COMMIT_ARTIFACT, CLI_LOCK_ARTIFACT, ExtractionSession, MANIFEST_ARTIFACT, SESSION_ASSETS_DIR, STYLES_ARTIFACT, SYSTEM_PROPS_ARTIFACT, checkLockLiveness, collectSessionAssets, decodeCommitRecord, getAnalyzedHashes, getManifestJson, getSharedCss, 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";
@@ -299,7 +299,8 @@ function publishSharedPayloads(config, session) {
299
299
  componentCss: "",
300
300
  assembledCss: stylesCss,
301
301
  layers: options.layers,
302
- externalOutcomes: session.lastExternalOutcomes
302
+ externalOutcomes: session.lastExternalOutcomes,
303
+ variableMapJson: session.variableMapJson
303
304
  });
304
305
  if (failures.length > 0) throw new ExtractionFailure(`Structural self-check failed:\n - ${failures.join("\n - ")}`);
305
306
  const assets = collectSessionAssets(session.sessionDir);
@@ -448,6 +449,7 @@ function parseLoadedCliConfig(raw) {
448
449
  strict: isConfigBoolean(raw.strict) ? raw.strict : void 0,
449
450
  verbose: isConfigBoolean(raw.verbose) || raw.verbose === "trace" ? raw.verbose : void 0,
450
451
  prefix: isConfigString(raw.prefix) ? raw.prefix : void 0,
452
+ prefixContextualVars: isConfigBoolean(raw.prefixContextualVars) ? raw.prefixContextualVars : void 0,
451
453
  targets: isConfigString(raw.targets) || isConfigStringArray(raw.targets) ? raw.targets : void 0,
452
454
  minify: isConfigBoolean(raw.minify) ? raw.minify : void 0,
453
455
  staticCss: configStaticCss(raw.staticCss),
@@ -538,6 +540,7 @@ async function resolveCliConfig(flags, cwd) {
538
540
  strict: pick("strict", flags.strict),
539
541
  verbose: pick("verbose", flags.verbose),
540
542
  prefix: pick("prefix", void 0),
543
+ prefixContextualVars: pick("prefixContextualVars", void 0),
541
544
  targets: pick("targets", flags.targets),
542
545
  minify: pick("minify", void 0),
543
546
  staticCss: pick("staticCss", void 0),
@@ -576,6 +579,7 @@ function projectResolvedConfig(config) {
576
579
  targets: config.options.targets ?? null,
577
580
  minify: config.options.minify ?? null,
578
581
  prefix: config.options.prefix ?? null,
582
+ prefixContextualVars: config.options.prefixContextualVars ?? false,
579
583
  layers: config.options.layers ?? null,
580
584
  extensions: config.options.extensions ?? null,
581
585
  staticCss: config.options.staticCss ?? null,
@@ -777,8 +781,10 @@ Options:
777
781
  --root <path> Root every relative input resolves against
778
782
  --config <path> Explicit config file (default: animus.config.* in root)
779
783
  --out-dir <path> Artifact directory (default: <root>/.animus)
780
- --exclude <glob> Additional exclusion (repeatable; MERGES with defaults;
781
- an explicit exclude: [] in the config file means none)
784
+ --exclude <glob> Exclusion (repeatable). With the config file's exclude,
785
+ REPLACES the defaults (${REPLACEABLE_DEFAULT_EXCLUDE.join(", ")});
786
+ exclude: [] in the config file means none.
787
+ ${STRUCTURAL_EXCLUDE.join(", ")} are always excluded
782
788
  --mode <m> 'development' | 'production' (default: production)
783
789
  --targets <query> Browserslist query for CSS lowering
784
790
  --strict Fail on inputs that could not be read or resolved,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@animus-ui/cli",
3
- "version": "0.1.19",
3
+ "version": "0.1.21",
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": "tsc --noEmit"
42
42
  },
43
43
  "dependencies": {
44
- "@animus-ui/extract": "0.1.19"
44
+ "@animus-ui/extract": "0.1.21"
45
45
  },
46
46
  "engines": {
47
47
  "node": ">=22.12.0"