zard-cli 1.0.0-beta.115 → 1.0.0-beta.117
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/commands/add/component-installer.js +3 -3
- package/commands/add/component-installer.js.map +1 -1
- package/commands/add/component-selector.d.ts +3 -3
- package/commands/add/component-selector.js +3 -3
- package/commands/add/dependency-resolver.js +10 -7
- package/commands/add/dependency-resolver.js.map +1 -1
- package/commands/add/index.d.ts.map +1 -1
- package/commands/add/index.js +12 -20
- package/commands/add/index.js.map +1 -1
- package/commands/add/wizard.d.ts +8 -7
- package/commands/add/wizard.d.ts.map +1 -1
- package/commands/add/wizard.js +2 -2
- package/commands/add/wizard.js.map +1 -1
- package/commands/init/config-prompter.d.ts +18 -13
- package/commands/init/config-prompter.d.ts.map +1 -1
- package/commands/init/config-prompter.js +25 -19
- package/commands/init/config-prompter.js.map +1 -1
- package/commands/init/dependencies.d.ts.map +1 -1
- package/commands/init/dependencies.js +21 -24
- package/commands/init/dependencies.js.map +1 -1
- package/commands/init/index.js +20 -20
- package/commands/init/index.js.map +1 -1
- package/commands/init/project-kind.d.ts +39 -39
- package/commands/init/project-kind.d.ts.map +1 -1
- package/commands/init/project-kind.js +44 -44
- package/commands/init/project-kind.js.map +1 -1
- package/commands/init/steps.d.ts +3 -4
- package/commands/init/steps.d.ts.map +1 -1
- package/commands/init/steps.js +25 -24
- package/commands/init/steps.js.map +1 -1
- package/commands/init/tailwind-setup.d.ts +5 -5
- package/commands/init/tailwind-setup.js +14 -14
- package/commands/init/tailwind-setup.js.map +1 -1
- package/commands/init/tsconfig-updater.d.ts +4 -4
- package/commands/init/tsconfig-updater.js +12 -12
- package/commands/init/tsconfig-updater.js.map +1 -1
- package/commands/init/update-angular-config.js +4 -4
- package/commands/init/vite-setup.d.ts +5 -4
- package/commands/init/vite-setup.d.ts.map +1 -1
- package/commands/init/vite-setup.js +11 -10
- package/commands/init/vite-setup.js.map +1 -1
- package/commands/init/wizard.d.ts +5 -5
- package/commands/init/wizard.d.ts.map +1 -1
- package/commands/init/wizard.js +29 -29
- package/commands/init/wizard.js.map +1 -1
- package/core/icons/families.d.ts +20 -20
- package/core/icons/families.d.ts.map +1 -1
- package/core/icons/families.js +11 -11
- package/core/icons/families.js.map +1 -1
- package/core/icons/icon-map.d.ts.map +1 -1
- package/core/icons/icon-map.js +7 -4
- package/core/icons/icon-map.js.map +1 -1
- package/core/icons/index.d.ts +50 -50
- package/core/icons/index.d.ts.map +1 -1
- package/core/icons/index.js +45 -45
- package/core/icons/index.js.map +1 -1
- package/core/registry/registry-data.d.ts.map +1 -1
- package/core/registry/registry-data.js +82 -15
- package/core/registry/registry-data.js.map +1 -1
- package/core/themes/theme-definitions.d.ts.map +1 -1
- package/core/themes/theme-definitions.js +10 -0
- package/core/themes/theme-definitions.js.map +1 -1
- package/index.js +3 -2
- package/index.js.map +1 -1
- package/package.json +6 -8
- package/ui/blocks.d.ts +29 -28
- package/ui/blocks.d.ts.map +1 -1
- package/ui/blocks.js +27 -27
- package/ui/blocks.js.map +1 -1
- package/ui/brand.d.ts +5 -5
- package/ui/brand.d.ts.map +1 -1
- package/ui/brand.js +6 -6
- package/ui/brand.js.map +1 -1
- package/ui/engine/animation/index.d.ts +2 -3
- package/ui/engine/animation/index.d.ts.map +1 -1
- package/ui/engine/animation/index.js +2 -3
- package/ui/engine/animation/index.js.map +1 -1
- package/ui/engine/ansi/index.d.ts +10 -11
- package/ui/engine/ansi/index.d.ts.map +1 -1
- package/ui/engine/ansi/index.js +6 -7
- package/ui/engine/ansi/index.js.map +1 -1
- package/ui/engine/components/index.d.ts +3 -3
- package/ui/engine/components/index.js +4 -4
- package/ui/engine/cursor/index.d.ts +3 -4
- package/ui/engine/cursor/index.d.ts.map +1 -1
- package/ui/engine/cursor/index.js +2 -3
- package/ui/engine/cursor/index.js.map +1 -1
- package/ui/engine/diff/index.d.ts +2 -3
- package/ui/engine/diff/index.d.ts.map +1 -1
- package/ui/engine/diff/index.js +5 -6
- package/ui/engine/diff/index.js.map +1 -1
- package/ui/engine/events/index.d.ts +2 -2
- package/ui/engine/events/index.js +3 -3
- package/ui/engine/events/index.js.map +1 -1
- package/ui/engine/focus/index.d.ts +2 -2
- package/ui/engine/focus/index.js +2 -2
- package/ui/engine/frame/index.d.ts +4 -4
- package/ui/engine/frame/index.js +0 -0
- package/ui/engine/index.d.ts +7 -7
- package/ui/engine/index.js +7 -7
- package/ui/engine/input/index.d.ts +2 -2
- package/ui/engine/input/index.js +11 -11
- package/ui/engine/input/index.js.map +1 -1
- package/ui/engine/layout/index.d.ts +3 -3
- package/ui/engine/layout/index.js +7 -7
- package/ui/engine/layout/index.js.map +1 -1
- package/ui/engine/renderer/index.d.ts +4 -4
- package/ui/engine/renderer/index.d.ts.map +1 -1
- package/ui/engine/renderer/index.js +3 -3
- package/ui/engine/scheduler/index.d.ts +3 -3
- package/ui/engine/scheduler/index.js +5 -5
- package/ui/engine/scheduler/index.js.map +1 -1
- package/ui/engine/screen/index.d.ts +5 -5
- package/ui/engine/screen/index.d.ts.map +1 -1
- package/ui/engine/screen/index.js +7 -7
- package/ui/engine/screen/index.js.map +1 -1
- package/ui/engine/terminal/index.d.ts +29 -29
- package/ui/engine/terminal/index.d.ts.map +1 -1
- package/ui/engine/terminal/index.js +47 -47
- package/ui/engine/terminal/index.js.map +1 -1
- package/ui/engine/testing/index.d.ts +4 -4
- package/ui/engine/testing/index.d.ts.map +1 -1
- package/ui/engine/testing/index.js +2 -2
- package/ui/engine/theme/index.d.ts +2 -3
- package/ui/engine/theme/index.d.ts.map +1 -1
- package/ui/engine/theme/index.js +3 -4
- package/ui/engine/theme/index.js.map +1 -1
- package/ui/engine/utils/index.d.ts +2 -2
- package/ui/engine/utils/index.js +4 -4
- package/ui/engine/utils/index.js.map +1 -1
- package/ui/gate.d.ts +7 -7
- package/ui/gate.d.ts.map +1 -1
- package/ui/gate.js +5 -5
- package/ui/index.d.ts +3 -3
- package/ui/index.js +3 -3
- package/ui/log-sink.d.ts +9 -9
- package/ui/log-sink.d.ts.map +1 -1
- package/ui/log-sink.js +9 -9
- package/ui/log-sink.js.map +1 -1
- package/ui/output.d.ts +6 -6
- package/ui/output.d.ts.map +1 -1
- package/ui/output.js +6 -6
- package/ui/output.js.map +1 -1
- package/ui/report.d.ts +8 -8
- package/ui/report.d.ts.map +1 -1
- package/ui/report.js +7 -7
- package/ui/report.js.map +1 -1
- package/ui/runner.d.ts +25 -25
- package/ui/runner.d.ts.map +1 -1
- package/ui/runner.js +27 -27
- package/ui/runner.js.map +1 -1
- package/ui/style.d.ts +7 -7
- package/ui/style.d.ts.map +1 -1
- package/ui/style.js +8 -8
- package/ui/style.js.map +1 -1
- package/ui/testing/fake-tty.d.ts +4 -4
- package/ui/testing/fake-tty.js +4 -4
- package/ui/text-input.d.ts +14 -13
- package/ui/text-input.d.ts.map +1 -1
- package/ui/text-input.js +15 -13
- package/ui/text-input.js.map +1 -1
- package/ui/theme.d.ts +4 -4
- package/ui/theme.js +4 -4
- package/utils/angular-compat.d.ts +21 -0
- package/utils/angular-compat.d.ts.map +1 -0
- package/utils/angular-compat.js +52 -0
- package/utils/angular-compat.js.map +1 -0
- package/utils/config.d.ts +6 -6
- package/utils/config.d.ts.map +1 -1
- package/utils/config.js +20 -20
- package/utils/config.js.map +1 -1
- package/utils/errors.d.ts +5 -5
- package/utils/errors.js +5 -5
- package/utils/get-project-info.d.ts +6 -6
- package/utils/get-project-info.d.ts.map +1 -1
- package/utils/get-project-info.js +35 -35
- package/utils/get-project-info.js.map +1 -1
- package/utils/http-client.d.ts.map +1 -1
- package/utils/http-client.js +18 -3
- package/utils/http-client.js.map +1 -1
- package/utils/icon-catalog.d.ts +16 -15
- package/utils/icon-catalog.d.ts.map +1 -1
- package/utils/icon-catalog.js +21 -20
- package/utils/icon-catalog.js.map +1 -1
- package/utils/logger.d.ts +3 -3
- package/utils/logger.js +9 -9
- package/utils/logger.js.map +1 -1
- package/utils/package-manager.d.ts +25 -25
- package/utils/package-manager.js +48 -48
- package/utils/package-manager.js.map +1 -1
- package/utils/registry.d.ts +14 -14
- package/utils/registry.d.ts.map +1 -1
- package/utils/registry.js +23 -19
- package/utils/registry.js.map +1 -1
- package/utils/schema-version.d.ts +11 -10
- package/utils/schema-version.d.ts.map +1 -1
- package/utils/schema-version.js +11 -10
- package/utils/schema-version.js.map +1 -1
- package/utils/source-file.d.ts +21 -21
- package/utils/source-file.d.ts.map +1 -1
- package/utils/source-file.js +24 -24
- package/utils/source-file.js.map +1 -1
package/ui/runner.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runner.js","sourceRoot":"","sources":["../../src/ui/runner.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EACL,YAAY,EACZ,cAAc,EACd,sBAAsB,GAKvB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,YAAY,EAAE,UAAU,EAAkB,MAAM,eAAe,CAAC;AACzE,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAC3C,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAEvC,
|
|
1
|
+
{"version":3,"file":"runner.js","sourceRoot":"","sources":["../../src/ui/runner.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EACL,YAAY,EACZ,cAAc,EACd,sBAAsB,GAKvB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,YAAY,EAAE,UAAU,EAAkB,MAAM,eAAe,CAAC;AACzE,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAC3C,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAEvC,4FAA4F;AAC5F,MAAM,OAAO,mBAAoB,SAAQ,KAAK;IAC5C,YAAY,OAAO,GAAG,mCAAmC;QACvD,KAAK,CAAC,OAAO,CAAC,CAAC;QACf,IAAI,CAAC,IAAI,GAAG,qBAAqB,CAAC;IACpC,CAA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AK,CAAC,KAAK,CAAC,EAAE;gBACnB,IAAI,OAAO;oBAAE,OAAO;gBACpB,IAAI,KAAK,CAAC,IAAI,IAAI,CAAC,KAAK,CAAC,GAAG,KAAK,GAAG,IAAI,KAAK,CAAC,GAAG,KAAK,GAAG,CAAC,EAAE,CAAC;oBAC3D,GAAG,CAAC,MAAM,EAAE,CAAC;oBACb,OAAO;gBACT,CAAC;gBACD,OAAO,CAAC,KAAK,EAAE,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;YAC9B,CAAC,CAAC,CAAC;YAEH,MAAM,CAAC,KAAK,EAAE,CAAC;YAEf,IAAI,OAAO,CAAC,GAAG,EAAE,CAAC;gBAChB,KAAK,CAAC,KAAK,IAAI,EAAE;oBACf,IAAI,CAAC;wBACH,MAAM,OAAO,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,CAAC;oBAC3B,CAAC;oBAAC,OAAO,KAAK,EAAE,CAAC;wBACf,MAAM,CAAC,GAAG,EAAE,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC;oBAC9B,CAAC;gBACH,CAAC,CAAC,EAAE,CAAC;YACP,CAAC;QACH,CAAC,CAAC,CAAC;QAEH,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,UAAU,EAAE,EAAE,CAAC;IACvC,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,4EAA4E;QAC5E,iEAAiE;QACjE,YAAY,CAAC,UAAU,EAAE,CAAC,CAAC;QAC3B,MAAM,KAAK,CAAC;IACd,CAAC;YAAS,CAAC;QACT,QAAQ,EAAE,CAAC;IACb,CAAC;AACH,CAAC"}
|
package/ui/style.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* Styling for line output — what the CLI writes outside the interactive screen.
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
4
|
+
* Replaces chalk using the engine's own ANSI vocabulary, which keeps a single
|
|
5
|
+
* source of truth for colour: the same theme tokens apply to the wizard in the
|
|
6
|
+
* alt-screen and to the text left behind in the terminal's history.
|
|
7
7
|
*/
|
|
8
|
-
/**
|
|
8
|
+
/** Re-evaluates the colour capability — used in tests, when stdout is swapped. */
|
|
9
9
|
export declare function resetColorLevel(): void;
|
|
10
10
|
export declare const style: {
|
|
11
11
|
primary: (text: string) => string;
|
|
@@ -16,9 +16,9 @@ export declare const style: {
|
|
|
16
16
|
foreground: (text: string) => string;
|
|
17
17
|
bold: (text: string) => string;
|
|
18
18
|
dim: (text: string) => string;
|
|
19
|
-
/**
|
|
19
|
+
/** Highlights a file name, command or path inside a sentence. */
|
|
20
20
|
code: (text: string) => string;
|
|
21
21
|
};
|
|
22
|
-
/**
|
|
22
|
+
/** True when the terminal accepts the UI's Unicode boxes and glyphs. */
|
|
23
23
|
export declare function supportsUnicode(): boolean;
|
|
24
24
|
//# sourceMappingURL=style.d.ts.map
|
package/ui/style.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"style.d.ts","sourceRoot":"","sources":["../../src/ui/style.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAaH,
|
|
1
|
+
{"version":3,"file":"style.d.ts","sourceRoot":"","sources":["../../src/ui/style.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAaH,kFAAkF;AAClF,wBAAgB,eAAe,IAAI,IAAI,CAEtC;AAWD,eAAO,MAAM,KAAK;oBACA,MAAM;oBACN,MAAM;oBACN,MAAM;mBACP,MAAM;kBACP,MAAM;uBACD,MAAM;iBACZ,MAAM;gBACP,MAAM;IAClB,iEAAiE;iBACpD,MAAM;CACpB,CAAC;AAEF,wEAAwE;AACxE,wBAAgB,eAAe,IAAI,OAAO,CAEzC"}
|
package/ui/style.js
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* Styling for line output — what the CLI writes outside the interactive screen.
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
4
|
+
* Replaces chalk using the engine's own ANSI vocabulary, which keeps a single
|
|
5
|
+
* source of truth for colour: the same theme tokens apply to the wizard in the
|
|
6
|
+
* alt-screen and to the text left behind in the terminal's history.
|
|
7
7
|
*/
|
|
8
8
|
import { Attr, createSgrBuilder, createTerminal } from './engine/index.js';
|
|
9
9
|
import { zardTheme } from './theme.js';
|
|
10
10
|
let cachedLevel = null;
|
|
11
|
-
/**
|
|
11
|
+
/** The current terminal's colour depth, resolved once per process. */
|
|
12
12
|
function colorLevel() {
|
|
13
13
|
cachedLevel ??= createTerminal().caps.colors;
|
|
14
14
|
return cachedLevel;
|
|
15
15
|
}
|
|
16
|
-
/**
|
|
16
|
+
/** Re-evaluates the colour capability — used in tests, when stdout is swapped. */
|
|
17
17
|
export function resetColorLevel() {
|
|
18
18
|
cachedLevel = null;
|
|
19
19
|
}
|
|
@@ -34,10 +34,10 @@ export const style = {
|
|
|
34
34
|
foreground: (text) => paint(text, 'foreground'),
|
|
35
35
|
bold: (text) => paint(text, undefined, Attr.Bold),
|
|
36
36
|
dim: (text) => paint(text, undefined, Attr.Dim),
|
|
37
|
-
/**
|
|
37
|
+
/** Highlights a file name, command or path inside a sentence. */
|
|
38
38
|
code: (text) => paint(text, 'primary', Attr.Bold),
|
|
39
39
|
};
|
|
40
|
-
/**
|
|
40
|
+
/** True when the terminal accepts the UI's Unicode boxes and glyphs. */
|
|
41
41
|
export function supportsUnicode() {
|
|
42
42
|
return createTerminal().caps.unicode;
|
|
43
43
|
}
|
package/ui/style.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"style.js","sourceRoot":"","sources":["../../src/ui/style.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,IAAI,EAAE,gBAAgB,EAAE,cAAc,EAAmB,MAAM,mBAAmB,CAAC;AAC5F,OAAO,EAAE,SAAS,EAAE,MAAM,Y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IAAI,EAAE,SAAS,CAAC;IACjD,OAAO,EAAE,CAAC,IAAY,EAAE,EAAE,CAAC,KAAK,CAAC,IAAI,EAAE,SAAS,CAAC;IACjD,MAAM,EAAE,CAAC,IAAY,EAAE,EAAE,CAAC,KAAK,CAAC,IAAI,EAAE,QAAQ,CAAC;IAC/C,KAAK,EAAE,CAAC,IAAY,EAAE,EAAE,CAAC,KAAK,CAAC,IAAI,EAAE,OAAO,CAAC;IAC7C,UAAU,EAAE,CAAC,IAAY,EAAE,EAAE,CAAC,KAAK,CAAC,IAAI,EAAE,YAAY,CAAC;IACvD,IAAI,EAAE,CAAC,IAAY,EAAE,EAAE,CAAC,KAAK,CAAC,IAAI,EAAE,SAAS,EAAE,IAAI,CAAC,IAAI,CAAC;IACzD,GAAG,EAAE,CAAC,IAAY,EAAE,EAAE,CAAC,KAAK,CAAC,IAAI,EAAE,SAAS,EAAE,IAAI,CAAC,GAAG,CAAC;IACvD,iEAAiE;IACjE,IAAI,EAAE,CAAC,IAAY,EAAE,EAAE,CAAC,KAAK,CAAC,IAAI,EAAE,SAAS,EAAE,IAAI,CAAC,IAAI,CAAC;CAC1D,CAAC;AAEF,wEAAwE;AACxE,MAAM,UAAU,eAAe;IAC7B,OAAO,cAAc,EAAE,CAAC,IAAI,CAAC,OAAO,CAAC;AACvC,CAAC"}
|
package/ui/testing/fake-tty.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* A simulated TTY, to exercise wizards without a real terminal.
|
|
3
3
|
*
|
|
4
|
-
* `runWizard`
|
|
5
|
-
*
|
|
6
|
-
*
|
|
4
|
+
* `runWizard` refuses to mount outside a TTY — that is what protects the user
|
|
5
|
+
* from a full-screen UI inside a pipe. To test the wizard itself, then, stdout
|
|
6
|
+
* becomes a buffer and stdin an emitter we inject keyboard bytes into.
|
|
7
7
|
*/
|
|
8
8
|
export interface FakeTty {
|
|
9
9
|
/** Tudo o que foi escrito, concatenado. */
|
package/ui/testing/fake-tty.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* A simulated TTY, to exercise wizards without a real terminal.
|
|
3
3
|
*
|
|
4
|
-
* `runWizard`
|
|
5
|
-
*
|
|
6
|
-
*
|
|
4
|
+
* `runWizard` refuses to mount outside a TTY — that is what protects the user
|
|
5
|
+
* from a full-screen UI inside a pipe. To test the wizard itself, then, stdout
|
|
6
|
+
* becomes a buffer and stdin an emitter we inject keyboard bytes into.
|
|
7
7
|
*/
|
|
8
8
|
import { EventEmitter } from 'node:events';
|
|
9
9
|
export const KEY = {
|
package/ui/text-input.d.ts
CHANGED
|
@@ -1,30 +1,31 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* Editing a single line of text in a wizard field.
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
* `@app/shared/components`)
|
|
7
|
-
*
|
|
8
|
-
*
|
|
4
|
+
* The field accepted exactly two things — typing at the end and deleting
|
|
5
|
+
* backwards. Anyone who wanted to change the middle of an alias
|
|
6
|
+
* (`@/shared/components` to `@app/shared/components`) pressed the arrow keys,
|
|
7
|
+
* saw nothing happen, and was left with no option but to delete everything and
|
|
8
|
+
* retype it. Here the cursor is real: it moves, inserts in the middle, and
|
|
9
|
+
* deletes in both directions.
|
|
9
10
|
*/
|
|
10
11
|
import type { KeyEvent } from '../ui/engine/index.js';
|
|
11
12
|
export interface TextInput {
|
|
12
13
|
readonly value: string;
|
|
13
|
-
/**
|
|
14
|
+
/** Cursor position, in characters — never outside `[0, length]`. */
|
|
14
15
|
readonly caret: number;
|
|
15
16
|
/**
|
|
16
|
-
*
|
|
17
|
-
*
|
|
18
|
-
*
|
|
17
|
+
* True while the field still shows the suggestion and the user has not touched
|
|
18
|
+
* it: the first key typed replaces the whole suggestion instead of appending
|
|
19
|
+
* to it. Moving the cursor or deleting adopts the value and starts editing it.
|
|
19
20
|
*/
|
|
20
21
|
readonly pristine: boolean;
|
|
21
22
|
}
|
|
22
23
|
export declare function startInput(value: string): TextInput;
|
|
23
24
|
/**
|
|
24
|
-
*
|
|
25
|
+
* Applies one key to the field.
|
|
25
26
|
*
|
|
26
|
-
*
|
|
27
|
-
*
|
|
27
|
+
* Returns `null` when the key is not an editing key — `enter` and `escape`
|
|
28
|
+
* belong to the wizard's flow, and it decides what to do with them.
|
|
28
29
|
*/
|
|
29
30
|
export declare function editInput(state: TextInput, event: KeyEvent): TextInput | null;
|
|
30
31
|
//# sourceMappingURL=text-input.d.ts.map
|
package/ui/text-input.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"text-input.d.ts","sourceRoot":"","sources":["../../src/ui/text-input.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"text-input.d.ts","sourceRoot":"","sources":["../../src/ui/text-input.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AAExD,MAAM,WAAW,SAAS;IACxB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,oEAAoE;IACpE,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB;;;;OAIG;IACH,QAAQ,CAAC,QAAQ,EAAE,OAAO,CAAC;CAC5B;AAED,wBAAgB,UAAU,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,CAEnD;AAED;;;;;GAKG;AACH,wBAAgB,SAAS,CAAC,KAAK,EAAE,SAAS,EAAE,KAAK,EAAE,QAAQ,GAAG,SAAS,GAAG,IAAI,CA2C7E"}
|
package/ui/text-input.js
CHANGED
|
@@ -1,20 +1,21 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* Editing a single line of text in a wizard field.
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
* `@app/shared/components`)
|
|
7
|
-
*
|
|
8
|
-
*
|
|
4
|
+
* The field accepted exactly two things — typing at the end and deleting
|
|
5
|
+
* backwards. Anyone who wanted to change the middle of an alias
|
|
6
|
+
* (`@/shared/components` to `@app/shared/components`) pressed the arrow keys,
|
|
7
|
+
* saw nothing happen, and was left with no option but to delete everything and
|
|
8
|
+
* retype it. Here the cursor is real: it moves, inserts in the middle, and
|
|
9
|
+
* deletes in both directions.
|
|
9
10
|
*/
|
|
10
11
|
export function startInput(value) {
|
|
11
12
|
return { value, caret: [...value].length, pristine: true };
|
|
12
13
|
}
|
|
13
14
|
/**
|
|
14
|
-
*
|
|
15
|
+
* Applies one key to the field.
|
|
15
16
|
*
|
|
16
|
-
*
|
|
17
|
-
*
|
|
17
|
+
* Returns `null` when the key is not an editing key — `enter` and `escape`
|
|
18
|
+
* belong to the wizard's flow, and it decides what to do with them.
|
|
18
19
|
*/
|
|
19
20
|
export function editInput(state, event) {
|
|
20
21
|
const chars = [...state.value];
|
|
@@ -24,8 +25,9 @@ export function editInput(state, event) {
|
|
|
24
25
|
if (event.alt)
|
|
25
26
|
return null;
|
|
26
27
|
if (event.key.length === 1) {
|
|
27
|
-
//
|
|
28
|
-
//
|
|
28
|
+
// The whole suggestion goes on the first key: someone who already knows what
|
|
29
|
+
// they want types straight over it, rather than deleting the CLI's proposal
|
|
30
|
+
// one character at a time.
|
|
29
31
|
if (state.pristine)
|
|
30
32
|
return { value: event.key, caret: 1, pristine: false };
|
|
31
33
|
chars.splice(caret, 0, event.key);
|
|
@@ -57,9 +59,9 @@ export function editInput(state, event) {
|
|
|
57
59
|
/** Os atalhos de linha que qualquer shell oferece. */
|
|
58
60
|
function editWithControl(state, chars, caret, key) {
|
|
59
61
|
switch (key) {
|
|
60
|
-
case 'u': //
|
|
62
|
+
case 'u': // clear to the start
|
|
61
63
|
return { value: chars.slice(caret).join(''), caret: 0, pristine: false };
|
|
62
|
-
case 'k': //
|
|
64
|
+
case 'k': // clear to the end
|
|
63
65
|
return { value: chars.slice(0, caret).join(''), caret, pristine: false };
|
|
64
66
|
case 'w': {
|
|
65
67
|
// apaga a palavra anterior, incluindo os separadores que a antecedem
|
package/ui/text-input.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"text-input.js","sourceRoot":"","sources":["../../src/ui/text-input.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"text-input.js","sourceRoot":"","sources":["../../src/ui/text-input.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAgBH,MAAM,UAAU,UAAU,CAAC,KAAa;IACtC,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC,GAAG,KAAK,CAAC,CAAC,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;AAC7D,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,SAAS,CAAC,KAAgB,EAAE,KAAe;IACzD,MAAM,KAAK,GAAG,CAAC,GAAG,KAAK,CAAC,KAAK,CAAC,CAAC;IAC/B,MAAM,KAAK,GAAG,KAAK,CAAC,KAAK,CAAC,KAAK,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IAE/C,IAAI,KAAK,CAAC,IAAI;QAAE,OAAO,eAAe,CAAC,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,CAAC,GAAG,CAAC,CAAC;IACvE,IAAI,KAAK,CAAC,GAAG;QAAE,OAAO,IAAI,CAAC;IAE3B,IAAI,KAAK,CAAC,GAAG,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QAC3B,6EAA6E;QAC7E,4EAA4E;QAC5E,2BAA2B;QAC3B,IAAI,KAAK,CAAC,QAAQ;YAAE,OAAO,EAAE,KAAK,EAAE,KAAK,CAAC,GAAG,EAAE,KAAK,EAAE,CAAC,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC;QAE3E,KAAK,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,CAAC;QAClC,OAAO,EAAE,KA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AAE,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC;QAC9G,CAAC;QAED,KAAK,GAAG;YACN,OAAO,EAAE,GAAG,KAAK,EAAE,KAAK,EAAE,CAAC,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC;QAEjD,KAAK,GAAG;YACN,OAAO,EAAE,GAAG,KAAK,EAAE,KAAK,EAAE,KAAK,CAAC,MAAM,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC;QAE5D;YACE,OAAO,IAAI,CAAC;IAChB,CAAC;AACH,CAAC;AAED,SAAS,WAAW,CAAC,IAAY;IAC/B,OAAO,IAAI,KAAK,GAAG,IAAI,IAAI,KAAK,GAAG,IAAI,IAAI,KAAK,IAAI,IAAI,IAAI,KAAK,GAAG,IAAI,IAAI,KAAK,GAAG,CAAC;AACvF,CAAC;AAED,SAAS,KAAK,CAAC,KAAa,EAAE,MAAc;IAC1C,OAAO,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,CAAC,GAAG,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC,CAAC;AAC9C,CAAC"}
|
package/ui/theme.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* The CLI's theme — semantic tokens consumed by the whole terminal UI.
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
* success/warning/danger
|
|
4
|
+
* The palette follows ZardUI's neutral base (zinc) for text and borders, with
|
|
5
|
+
* the accents reserved for state: primary marks the active step and the cursor,
|
|
6
|
+
* while success/warning/danger communicate each step's outcome.
|
|
7
7
|
*/
|
|
8
8
|
import { type Theme } from './engine/index.js';
|
|
9
9
|
export declare const zardTheme: Theme;
|
package/ui/theme.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* The CLI's theme — semantic tokens consumed by the whole terminal UI.
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
* success/warning/danger
|
|
4
|
+
* The palette follows ZardUI's neutral base (zinc) for text and borders, with
|
|
5
|
+
* the accents reserved for state: primary marks the active step and the cursor,
|
|
6
|
+
* while success/warning/danger communicate each step's outcome.
|
|
7
7
|
*/
|
|
8
8
|
import { createTheme } from './engine/index.js';
|
|
9
9
|
export const zardTheme = createTheme({
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Pins the dependencies whose releases are tied to an Angular major.
|
|
3
|
+
*
|
|
4
|
+
* Zard supports Angular 19 and above, but several of the packages it installs
|
|
5
|
+
* ship one release per Angular major and peer on `>=` that major. Asking for
|
|
6
|
+
* them by name resolves to `latest`, which peers on an Angular newer than the
|
|
7
|
+
* project's: npm then fails the whole install with ERESOLVE, and the retry with
|
|
8
|
+
* `--legacy-peer-deps` "succeeds" while leaving a version that cannot compile.
|
|
9
|
+
*/
|
|
10
|
+
/** The major of an Angular version string, or null when it could not be read. */
|
|
11
|
+
export declare function angularMajorOf(angularVersion: string | null | undefined): number | null;
|
|
12
|
+
/**
|
|
13
|
+
* The install specifier for one package.
|
|
14
|
+
*
|
|
15
|
+
* Returns the name unchanged whenever nothing is known to constrain it — an
|
|
16
|
+
* unrecognized package, or an Angular major this package has no history for.
|
|
17
|
+
*/
|
|
18
|
+
export declare function pinForAngular(packageName: string, angularMajor: number | null): string;
|
|
19
|
+
/** `pinForAngular` over a batch, keeping the order the caller passed. */
|
|
20
|
+
export declare function pinAllForAngular(packageNames: Iterable<string>, angularVersion: string | null): string[];
|
|
21
|
+
//# sourceMappingURL=angular-compat.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"angular-compat.d.ts","sourceRoot":"","sources":["../../src/utils/angular-compat.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAoBH,iFAAiF;AACjF,wBAAgB,cAAc,CAAC,cAAc,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG,MAAM,GAAG,IAAI,CAKvF;AAED;;;;;GAKG;AACH,wBAAgB,aAAa,CAAC,WAAW,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,GAAG,IAAI,GAAG,MAAM,CAOtF;AAED,yEAAyE;AACzE,wBAAgB,gBAAgB,CAAC,YAAY,EAAE,QAAQ,CAAC,MAAM,CAAC,EAAE,cAAc,EAAE,MAAM,GAAG,IAAI,GAAG,MAAM,EAAE,CAGxG"}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Pins the dependencies whose releases are tied to an Angular major.
|
|
3
|
+
*
|
|
4
|
+
* Zard supports Angular 19 and above, but several of the packages it installs
|
|
5
|
+
* ship one release per Angular major and peer on `>=` that major. Asking for
|
|
6
|
+
* them by name resolves to `latest`, which peers on an Angular newer than the
|
|
7
|
+
* project's: npm then fails the whole install with ERESOLVE, and the retry with
|
|
8
|
+
* `--legacy-peer-deps` "succeeds" while leaving a version that cannot compile.
|
|
9
|
+
*/
|
|
10
|
+
/** Packages whose own major is the Angular major, so the pin is arithmetic. */
|
|
11
|
+
const TRACKS_ANGULAR_MAJOR = new Set(['@angular/cdk', 'embla-carousel-angular', 'ngx-echarts']);
|
|
12
|
+
/**
|
|
13
|
+
* The newest release of a package that still accepts a given Angular major, for
|
|
14
|
+
* the packages that version on their own schedule.
|
|
15
|
+
*
|
|
16
|
+
* Entries are only ever needed for a superseded Angular major, and those never
|
|
17
|
+
* go stale: once Angular N is behind us, the last release built for it is
|
|
18
|
+
* history. The current major is deliberately absent — it falls through
|
|
19
|
+
* unconstrained to `latest`, which is the release made for it. So when Angular
|
|
20
|
+
* N+1 ships, N gets its entry here.
|
|
21
|
+
*/
|
|
22
|
+
const LAST_COMPATIBLE = {
|
|
23
|
+
'@ng-icons/core': { 19: '^31', 20: '^32', 21: '^34' },
|
|
24
|
+
'@ng-icons/lucide': { 19: '^31', 20: '^32', 21: '^34' },
|
|
25
|
+
};
|
|
26
|
+
/** The major of an Angular version string, or null when it could not be read. */
|
|
27
|
+
export function angularMajorOf(angularVersion) {
|
|
28
|
+
if (!angularVersion)
|
|
29
|
+
return null;
|
|
30
|
+
const major = Number.parseInt(angularVersion.split('.')[0], 10);
|
|
31
|
+
return Number.isNaN(major) ? null : major;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* The install specifier for one package.
|
|
35
|
+
*
|
|
36
|
+
* Returns the name unchanged whenever nothing is known to constrain it — an
|
|
37
|
+
* unrecognized package, or an Angular major this package has no history for.
|
|
38
|
+
*/
|
|
39
|
+
export function pinForAngular(packageName, angularMajor) {
|
|
40
|
+
if (angularMajor === null)
|
|
41
|
+
return packageName;
|
|
42
|
+
if (TRACKS_ANGULAR_MAJOR.has(packageName))
|
|
43
|
+
return `${packageName}@^${angularMajor}`;
|
|
44
|
+
const range = LAST_COMPATIBLE[packageName]?.[angularMajor];
|
|
45
|
+
return range ? `${packageName}@${range}` : packageName;
|
|
46
|
+
}
|
|
47
|
+
/** `pinForAngular` over a batch, keeping the order the caller passed. */
|
|
48
|
+
export function pinAllForAngular(packageNames, angularVersion) {
|
|
49
|
+
const major = angularMajorOf(angularVersion);
|
|
50
|
+
return Array.from(packageNames, name => pinForAngular(name, major));
|
|
51
|
+
}
|
|
52
|
+
//# sourceMappingURL=angular-compat.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"angular-compat.js","sourceRoot":"","sources":["../../src/utils/angular-compat.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,+EAA+E;AAC/E,MAAM,oBAAoB,GAAG,IAAI,GAAG,CAAC,CAAC,cAAc,EAAE,wBAAwB,EAAE,aAAa,CAAC,CAAC,CAAC;AAEhG;;;;;;;;;GASG;AACH,MAAM,eAAe,GAA2C;IAC9D,gBAAgB,EAAE,EAAE,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE,KAAK,EAAE;IACrD,kBAAkB,EAAE,EAAE,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE,KAAK,EAAE;CACxD,CAAC;AAEF,iFAAiF;AACjF,MAAM,UAAU,cAAc,CAAC,cAAyC;IACtE,IAAI,CAAC,cAAc;QAAE,OAAO,IAAI,CAAC;IAEjC,MAAM,KAAK,GAAG,MAAM,CAAC,QAAQ,CAAC,cAAc,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAW,EAAE,EAAE,CAAC,CAAC;IAC1E,OAAO,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC;AAC5C,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,aAAa,CAAC,WAAmB,EAAE,YAA2B;IAC5E,IAAI,YAAY,KAAK,IAAI;QAAE,OAAO,WAAW,CAAC;IAE9C,IAAI,oBAAoB,CAAC,GAAG,CAAC,WAAW,CAAC;QAAE,OAAO,GAAG,WAAW,KAAK,YAAY,EAAE,CAAC;IAEpF,MAAM,KAAK,GAAG,eAAe,CAAC,WAAW,CAAC,EAAE,CAAC,YAAY,CAAC,CAAC;IAC3D,OAAO,KAAK,CAAC,CAAC,CAAC,GAAG,WAAW,IAAI,KAAK,EAAE,CAAC,CAAC,CAAC,WAAW,CAAC;AACzD,CAAC;AAED,yEAAyE;AACzE,MAAM,UAAU,gBAAgB,CAAC,YAA8B,EAAE,cAA6B;IAC5F,MAAM,KAAK,GAAG,cAAc,CAAC,cAAc,CAAC,CAAC;IAC7C,OAAO,KAAK,CAAC,IAAI,CAAC,YAAY,EAAE,IAAI,CAAC,EAAE,CAAC,aAAa,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC,CAAC;AACtE,CAAC"}
|
package/utils/config.d.ts
CHANGED
|
@@ -37,18 +37,18 @@ export type Config = z.infer<typeof configSchema>;
|
|
|
37
37
|
export declare const DEFAULT_CONFIG: Config;
|
|
38
38
|
export declare function getConfig(cwd: string): Promise<Config | null>;
|
|
39
39
|
/**
|
|
40
|
-
*
|
|
40
|
+
* Splits an alias prefix from the path that follows it.
|
|
41
41
|
*
|
|
42
|
-
* `@`, `@app`, `~` —
|
|
43
|
-
*
|
|
44
|
-
* `@app/components`
|
|
45
|
-
* `@app`
|
|
42
|
+
* `@`, `@app`, `~` — the name does not matter: the prefix is a nickname for
|
|
43
|
+
* `baseUrl`, and the rest is the path inside the project. Handling only `@/`
|
|
44
|
+
* let an alias like `@app/components` escape the substitution and become a
|
|
45
|
+
* literal folder named `@app` at the root, outside anything the tsconfig maps.
|
|
46
46
|
*/
|
|
47
47
|
export declare function splitAlias(alias: string): {
|
|
48
48
|
prefix: string;
|
|
49
49
|
rest: string;
|
|
50
50
|
};
|
|
51
|
-
/**
|
|
51
|
+
/** The alias prefix, with `/*` — the key the tsconfig has to map. */
|
|
52
52
|
export declare function aliasPattern(alias: string): string;
|
|
53
53
|
export declare function resolveAliasToPath(alias: string, baseUrl: string): string;
|
|
54
54
|
export declare function resolveConfigPaths(cwd: string, config: Config): Promise<{
|
package/utils/config.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../src/utils/config.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAgBxB,QAAA,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAyChB,CAAC;AAEH,MAAM,MAAM,MAAM,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,YAAY,CAAC,CAAC;AAElD,eAAO,MAAM,cAAc,EAAE,MAkB5B,CAAC;AAEF,wBAAsB,SAAS,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAqBnE;AAED;;;;;;;GAOG;AACH,wBAAgB,UAAU,CAAC,KAAK,EAAE,MAAM,GAAG;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,CAO1E;AAED,
|
|
1
|
+
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../src/utils/config.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAgBxB,QAAA,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAyChB,CAAC;AAEH,MAAM,MAAM,MAAM,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,YAAY,CAAC,CAAC;AAElD,eAAO,MAAM,cAAc,EAAE,MAkB5B,CAAC;AAEF,wBAAsB,SAAS,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAqBnE;AAED;;;;;;;GAOG;AACH,wBAAgB,UAAU,CAAC,KAAK,EAAE,MAAM,GAAG;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,CAO1E;AAED,qEAAqE;AACrE,wBAAgB,YAAY,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAElD;AAED,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,MAAM,CAKzE;AAED,wBAAsB,kBAAkB,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAcnE"}
|
package/utils/config.js
CHANGED
|
@@ -20,29 +20,29 @@ const configSchema = z.object({
|
|
|
20
20
|
$schema: z.string().optional(),
|
|
21
21
|
appConfigFile: z.string().default('src/app/app.config.ts'),
|
|
22
22
|
style: z.enum(['css']).default('css'),
|
|
23
|
-
//
|
|
24
|
-
//
|
|
23
|
+
// The icon family the components are written in. Absent from files written
|
|
24
|
+
// before the property existed — and lucide is what those use.
|
|
25
25
|
//
|
|
26
|
-
//
|
|
27
|
-
//
|
|
28
|
-
//
|
|
29
|
-
//
|
|
30
|
-
//
|
|
26
|
+
// Not an enum: the valid families are the ones the registry publishes at run
|
|
27
|
+
// time, not the ones that existed when this CLI was compiled. Closing the list
|
|
28
|
+
// here would make an old CLI reject a new family, which is exactly what the
|
|
29
|
+
// remote catalog exists to avoid. `assertIconFamily` validates the value
|
|
30
|
+
// against the catalog, with a message that names the options.
|
|
31
31
|
icons: z.string().default(SOURCE_ICON_FAMILY),
|
|
32
|
-
//
|
|
33
|
-
//
|
|
32
|
+
// Layout direction. It does not change what gets installed yet: it exists so
|
|
33
|
+
// the project can declare the intent, and so a reader knows the field is ours.
|
|
34
34
|
rtl: z.boolean().default(false),
|
|
35
|
-
//
|
|
36
|
-
//
|
|
35
|
+
// Absent from components.json files written before the project-type menu; an
|
|
36
|
+
// Angular application is what those describe.
|
|
37
37
|
projectType: z.enum(['angular', 'angular-library', 'nx', 'nx-library', 'analog']).default('angular'),
|
|
38
38
|
packageManager: z.enum(['npm', 'yarn', 'pnpm', 'bun']).default('npm'),
|
|
39
39
|
registryUrl: z.string().optional(),
|
|
40
40
|
tailwind: z
|
|
41
41
|
.object({
|
|
42
42
|
css: z.string().default('src/styles.css'),
|
|
43
|
-
baseColor: z.string().default('
|
|
43
|
+
baseColor: z.string().default('neutral'),
|
|
44
44
|
})
|
|
45
|
-
.default({ css: 'src/styles.css', baseColor: '
|
|
45
|
+
.default({ css: 'src/styles.css', baseColor: 'neutral' }),
|
|
46
46
|
baseUrl: z.string().default('src/app'),
|
|
47
47
|
aliases: z
|
|
48
48
|
.object({
|
|
@@ -67,7 +67,7 @@ export const DEFAULT_CONFIG = {
|
|
|
67
67
|
packageManager: 'npm',
|
|
68
68
|
tailwind: {
|
|
69
69
|
css: 'src/styles.css',
|
|
70
|
-
baseColor: '
|
|
70
|
+
baseColor: 'neutral',
|
|
71
71
|
},
|
|
72
72
|
baseUrl: 'src/app',
|
|
73
73
|
aliases: {
|
|
@@ -98,12 +98,12 @@ export async function getConfig(cwd) {
|
|
|
98
98
|
}
|
|
99
99
|
}
|
|
100
100
|
/**
|
|
101
|
-
*
|
|
101
|
+
* Splits an alias prefix from the path that follows it.
|
|
102
102
|
*
|
|
103
|
-
* `@`, `@app`, `~` —
|
|
104
|
-
*
|
|
105
|
-
* `@app/components`
|
|
106
|
-
* `@app`
|
|
103
|
+
* `@`, `@app`, `~` — the name does not matter: the prefix is a nickname for
|
|
104
|
+
* `baseUrl`, and the rest is the path inside the project. Handling only `@/`
|
|
105
|
+
* let an alias like `@app/components` escape the substitution and become a
|
|
106
|
+
* literal folder named `@app` at the root, outside anything the tsconfig maps.
|
|
107
107
|
*/
|
|
108
108
|
export function splitAlias(alias) {
|
|
109
109
|
const clean = alias.replace(/\/+$/, '');
|
|
@@ -112,7 +112,7 @@ export function splitAlias(alias) {
|
|
|
112
112
|
return { prefix: clean, rest: '' };
|
|
113
113
|
return { prefix: clean.slice(0, separator), rest: clean.slice(separator + 1) };
|
|
114
114
|
}
|
|
115
|
-
/**
|
|
115
|
+
/** The alias prefix, with `/*` — the key the tsconfig has to map. */
|
|
116
116
|
export function aliasPattern(alias) {
|
|
117
117
|
return `${splitAlias(alias).prefix}/*`;
|
|
118
118
|
}
|
package/utils/config.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.js","sourceRoot":"","sources":["../../src/utils/config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAC9D,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACnD,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AACpD,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAClC,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,KAAK,UAAU,UAAU,CAAC,QAAgB;IACxC,IAAI,CAAC;QACH,MAAM,MAAM,CAAC,QAAQ,CAAC,CAAC;QACvB,OAAO,IAAI,CAAC;IACd,CAAC;IAAC,MAAM,CAAC;QACP,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AAM,IAAI,GAAG,OAAO,CAAC,OAAO,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC;IAEzC,OAAO,IAAI,CAAC,CAAC,CAAC,GAAG,IAAI,IAAI,IAAI,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC;AACzC,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,kBAAkB,CAAC,GAAW,EAAE,MAAc;IAClE,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,GAAG,MAAM,CAAC;IAEpC,OAAO;QACL,GAAG,MAAM;QACT,aAAa,EAAE;YACb,WAAW,EAAE,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE,MAAM,CAAC,QAAQ,CAAC,GAAG,CAAC;YACnD,OAAO,EAAE,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE,OAAO,CAAC;YACnC,UAAU,EAAE,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE,kBAAkB,CAAC,OAAO,CAAC,UAAU,EAAE,OAAO,CAAC,CAAC;YAC9E,KAAK,EAAE,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE,kBAAkB,CAAC,OAAO,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC;YACpE,IAAI,EAAE,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE,kBAAkB,CAAC,OAAO,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;YAClE,QAAQ,EAAE,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE,kBAAkB,CAAC,OAAO,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;SAC3E;KACF,CAAC;AACJ,CAAC"}
|
package/utils/errors.d.ts
CHANGED
|
@@ -10,12 +10,12 @@ export declare class ConfigError extends CliError {
|
|
|
10
10
|
constructor(message: string);
|
|
11
11
|
}
|
|
12
12
|
/**
|
|
13
|
-
*
|
|
13
|
+
* The registry publishes a newer format than this CLI knows how to read.
|
|
14
14
|
*
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
*
|
|
18
|
-
*
|
|
15
|
+
* It has its own class because it is the one registry read error that must NOT
|
|
16
|
+
* become a fallback: a missing file or a response that is not JSON are reasons
|
|
17
|
+
* to carry on with the local copy, but a format we do not understand is a reason
|
|
18
|
+
* to stop — carrying on would mean reading the wrong content and believing it.
|
|
19
19
|
*/
|
|
20
20
|
export declare class SchemaVersionError extends CliError {
|
|
21
21
|
constructor(message: string);
|
package/utils/errors.js
CHANGED
|
@@ -21,12 +21,12 @@ export class ConfigError extends CliError {
|
|
|
21
21
|
}
|
|
22
22
|
}
|
|
23
23
|
/**
|
|
24
|
-
*
|
|
24
|
+
* The registry publishes a newer format than this CLI knows how to read.
|
|
25
25
|
*
|
|
26
|
-
*
|
|
27
|
-
*
|
|
28
|
-
*
|
|
29
|
-
*
|
|
26
|
+
* It has its own class because it is the one registry read error that must NOT
|
|
27
|
+
* become a fallback: a missing file or a response that is not JSON are reasons
|
|
28
|
+
* to carry on with the local copy, but a format we do not understand is a reason
|
|
29
|
+
* to stop — carrying on would mean reading the wrong content and believing it.
|
|
30
30
|
*/
|
|
31
31
|
export class SchemaVersionError extends CliError {
|
|
32
32
|
constructor(message) {
|