@animus-ui/cli 0.1.18 → 0.1.20
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 +4 -2
- package/dist/config.d.ts +2 -1
- package/dist/config.d.ts.map +1 -1
- package/dist/index.cjs +14 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/index.mjs +15 -5
- package/package.json +2 -2
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
|
|
40
|
-
|
|
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
|
|
package/dist/config.d.ts
CHANGED
|
@@ -10,7 +10,7 @@ export interface CliFlags {
|
|
|
10
10
|
config?: string;
|
|
11
11
|
outDir?: string;
|
|
12
12
|
strict?: boolean;
|
|
13
|
-
verbose?: boolean;
|
|
13
|
+
verbose?: boolean | 'trace';
|
|
14
14
|
mode?: string;
|
|
15
15
|
targets?: string;
|
|
16
16
|
exclude?: string[];
|
|
@@ -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;
|
package/dist/config.d.ts.map
CHANGED
|
@@ -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,OAAO,CAAC;
|
|
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,OAAO,GAAG,OAAO,CAAC;IAC5B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;CACpB;AAED,MAAM,MAAM,aAAa,GAAG,MAAM,GAAG,aAAa,GAAG,YAAY,GAAG,KAAK,CAAC;AAE1E,MAAM,WAAW,iBAAiB;IAChC,MAAM,EAAE,KAAK,CAAC;IACd,2DAA2D;IAC3D,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,EAAE,aAAa,CAAC;IAC1B,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,OAAO,EAAE,iBAAiB,CAAC;IAC3B,0CAA0C;IAC1C,MAAM,EAAE,MAAM,CAAC;IACf,eAAe,EAAE,SAAS,MAAM,EAAE,CAAC;IACnC,IAAI,EAAE,UAAU,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,gBAAgB,CAAC,CAAC;CAC9C;AAmOD,wBAAsB,gBAAgB,CACpC,KAAK,EAAE,QAAQ,EACf,GAAG,EAAE,MAAM,GACV,OAAO,CAAC,iBAAiB,CAAC,CAmI5B;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,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
|
@@ -449,6 +449,7 @@ function parseLoadedCliConfig(raw) {
|
|
|
449
449
|
strict: isConfigBoolean(raw.strict) ? raw.strict : void 0,
|
|
450
450
|
verbose: isConfigBoolean(raw.verbose) || raw.verbose === "trace" ? raw.verbose : void 0,
|
|
451
451
|
prefix: isConfigString(raw.prefix) ? raw.prefix : void 0,
|
|
452
|
+
prefixContextualVars: isConfigBoolean(raw.prefixContextualVars) ? raw.prefixContextualVars : void 0,
|
|
452
453
|
targets: isConfigString(raw.targets) || isConfigStringArray(raw.targets) ? raw.targets : void 0,
|
|
453
454
|
minify: isConfigBoolean(raw.minify) ? raw.minify : void 0,
|
|
454
455
|
staticCss: configStaticCss(raw.staticCss),
|
|
@@ -539,6 +540,7 @@ async function resolveCliConfig(flags, cwd) {
|
|
|
539
540
|
strict: pick("strict", flags.strict),
|
|
540
541
|
verbose: pick("verbose", flags.verbose),
|
|
541
542
|
prefix: pick("prefix", void 0),
|
|
543
|
+
prefixContextualVars: pick("prefixContextualVars", void 0),
|
|
542
544
|
targets: pick("targets", flags.targets),
|
|
543
545
|
minify: pick("minify", void 0),
|
|
544
546
|
staticCss: pick("staticCss", void 0),
|
|
@@ -577,6 +579,7 @@ function projectResolvedConfig(config) {
|
|
|
577
579
|
targets: config.options.targets ?? null,
|
|
578
580
|
minify: config.options.minify ?? null,
|
|
579
581
|
prefix: config.options.prefix ?? null,
|
|
582
|
+
prefixContextualVars: config.options.prefixContextualVars ?? false,
|
|
580
583
|
layers: config.options.layers ?? null,
|
|
581
584
|
extensions: config.options.extensions ?? null,
|
|
582
585
|
staticCss: config.options.staticCss ?? null,
|
|
@@ -778,15 +781,21 @@ Options:
|
|
|
778
781
|
--root <path> Root every relative input resolves against
|
|
779
782
|
--config <path> Explicit config file (default: animus.config.* in root)
|
|
780
783
|
--out-dir <path> Artifact directory (default: <root>/.animus)
|
|
781
|
-
--exclude <glob>
|
|
782
|
-
|
|
784
|
+
--exclude <glob> Exclusion (repeatable). With the config file's exclude,
|
|
785
|
+
REPLACES the defaults (${_animus_ui_extract_pipeline.REPLACEABLE_DEFAULT_EXCLUDE.join(", ")});
|
|
786
|
+
exclude: [] in the config file means none.
|
|
787
|
+
${_animus_ui_extract_pipeline.STRUCTURAL_EXCLUDE.join(", ")} are always excluded
|
|
783
788
|
--mode <m> 'development' | 'production' (default: production)
|
|
784
789
|
--targets <query> Browserslist query for CSS lowering
|
|
785
790
|
--strict Fail on inputs that could not be read or resolved,
|
|
786
791
|
and on classified unsupported Animus declarations
|
|
787
792
|
--fail-on-degraded watch only: exit 3 instead of running with unwatched
|
|
788
793
|
roots (degradation is otherwise reported and tolerated)
|
|
789
|
-
--verbose Verbose logging (stderr)
|
|
794
|
+
--verbose Verbose logging (stderr): phase checkpoints,
|
|
795
|
+
summaries and timing
|
|
796
|
+
--trace The trace tier (config: verbose: 'trace'); the CLI
|
|
797
|
+
has no per-item lines yet, so it logs what --verbose
|
|
798
|
+
logs
|
|
790
799
|
--print-config Alias of the print-config command
|
|
791
800
|
--help This text
|
|
792
801
|
|
|
@@ -828,6 +837,7 @@ async function main(argv = process.argv.slice(2)) {
|
|
|
828
837
|
targets: { type: "string" },
|
|
829
838
|
strict: { type: "boolean" },
|
|
830
839
|
verbose: { type: "boolean" },
|
|
840
|
+
trace: { type: "boolean" },
|
|
831
841
|
"fail-on-degraded": { type: "boolean" },
|
|
832
842
|
"print-config": { type: "boolean" },
|
|
833
843
|
help: { type: "boolean" }
|
|
@@ -858,7 +868,7 @@ async function main(argv = process.argv.slice(2)) {
|
|
|
858
868
|
config: values.config,
|
|
859
869
|
outDir: values["out-dir"],
|
|
860
870
|
strict: values.strict,
|
|
861
|
-
verbose: values.verbose,
|
|
871
|
+
verbose: values.trace ? "trace" : values.verbose,
|
|
862
872
|
mode: values.mode,
|
|
863
873
|
targets: values.targets,
|
|
864
874
|
exclude: values.exclude
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;kDACkD;
|
|
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";
|
|
@@ -448,6 +448,7 @@ function parseLoadedCliConfig(raw) {
|
|
|
448
448
|
strict: isConfigBoolean(raw.strict) ? raw.strict : void 0,
|
|
449
449
|
verbose: isConfigBoolean(raw.verbose) || raw.verbose === "trace" ? raw.verbose : void 0,
|
|
450
450
|
prefix: isConfigString(raw.prefix) ? raw.prefix : void 0,
|
|
451
|
+
prefixContextualVars: isConfigBoolean(raw.prefixContextualVars) ? raw.prefixContextualVars : void 0,
|
|
451
452
|
targets: isConfigString(raw.targets) || isConfigStringArray(raw.targets) ? raw.targets : void 0,
|
|
452
453
|
minify: isConfigBoolean(raw.minify) ? raw.minify : void 0,
|
|
453
454
|
staticCss: configStaticCss(raw.staticCss),
|
|
@@ -538,6 +539,7 @@ async function resolveCliConfig(flags, cwd) {
|
|
|
538
539
|
strict: pick("strict", flags.strict),
|
|
539
540
|
verbose: pick("verbose", flags.verbose),
|
|
540
541
|
prefix: pick("prefix", void 0),
|
|
542
|
+
prefixContextualVars: pick("prefixContextualVars", void 0),
|
|
541
543
|
targets: pick("targets", flags.targets),
|
|
542
544
|
minify: pick("minify", void 0),
|
|
543
545
|
staticCss: pick("staticCss", void 0),
|
|
@@ -576,6 +578,7 @@ function projectResolvedConfig(config) {
|
|
|
576
578
|
targets: config.options.targets ?? null,
|
|
577
579
|
minify: config.options.minify ?? null,
|
|
578
580
|
prefix: config.options.prefix ?? null,
|
|
581
|
+
prefixContextualVars: config.options.prefixContextualVars ?? false,
|
|
579
582
|
layers: config.options.layers ?? null,
|
|
580
583
|
extensions: config.options.extensions ?? null,
|
|
581
584
|
staticCss: config.options.staticCss ?? null,
|
|
@@ -777,15 +780,21 @@ Options:
|
|
|
777
780
|
--root <path> Root every relative input resolves against
|
|
778
781
|
--config <path> Explicit config file (default: animus.config.* in root)
|
|
779
782
|
--out-dir <path> Artifact directory (default: <root>/.animus)
|
|
780
|
-
--exclude <glob>
|
|
781
|
-
|
|
783
|
+
--exclude <glob> Exclusion (repeatable). With the config file's exclude,
|
|
784
|
+
REPLACES the defaults (${REPLACEABLE_DEFAULT_EXCLUDE.join(", ")});
|
|
785
|
+
exclude: [] in the config file means none.
|
|
786
|
+
${STRUCTURAL_EXCLUDE.join(", ")} are always excluded
|
|
782
787
|
--mode <m> 'development' | 'production' (default: production)
|
|
783
788
|
--targets <query> Browserslist query for CSS lowering
|
|
784
789
|
--strict Fail on inputs that could not be read or resolved,
|
|
785
790
|
and on classified unsupported Animus declarations
|
|
786
791
|
--fail-on-degraded watch only: exit 3 instead of running with unwatched
|
|
787
792
|
roots (degradation is otherwise reported and tolerated)
|
|
788
|
-
--verbose Verbose logging (stderr)
|
|
793
|
+
--verbose Verbose logging (stderr): phase checkpoints,
|
|
794
|
+
summaries and timing
|
|
795
|
+
--trace The trace tier (config: verbose: 'trace'); the CLI
|
|
796
|
+
has no per-item lines yet, so it logs what --verbose
|
|
797
|
+
logs
|
|
789
798
|
--print-config Alias of the print-config command
|
|
790
799
|
--help This text
|
|
791
800
|
|
|
@@ -827,6 +836,7 @@ async function main(argv = process.argv.slice(2)) {
|
|
|
827
836
|
targets: { type: "string" },
|
|
828
837
|
strict: { type: "boolean" },
|
|
829
838
|
verbose: { type: "boolean" },
|
|
839
|
+
trace: { type: "boolean" },
|
|
830
840
|
"fail-on-degraded": { type: "boolean" },
|
|
831
841
|
"print-config": { type: "boolean" },
|
|
832
842
|
help: { type: "boolean" }
|
|
@@ -857,7 +867,7 @@ async function main(argv = process.argv.slice(2)) {
|
|
|
857
867
|
config: values.config,
|
|
858
868
|
outDir: values["out-dir"],
|
|
859
869
|
strict: values.strict,
|
|
860
|
-
verbose: values.verbose,
|
|
870
|
+
verbose: values.trace ? "trace" : values.verbose,
|
|
861
871
|
mode: values.mode,
|
|
862
872
|
targets: values.targets,
|
|
863
873
|
exclude: values.exclude
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@animus-ui/cli",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.20",
|
|
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.
|
|
44
|
+
"@animus-ui/extract": "0.1.20"
|
|
45
45
|
},
|
|
46
46
|
"engines": {
|
|
47
47
|
"node": ">=22.12.0"
|