zard-cli 1.1.0-alpha.0 → 1.1.1
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 +122 -60
- package/commands/add/component-installer.d.ts +2 -1
- package/commands/add/component-installer.d.ts.map +1 -1
- package/commands/add/component-installer.js +25 -7
- package/commands/add/component-installer.js.map +1 -1
- package/commands/add/component-selector.d.ts +3 -3
- package/commands/add/component-selector.js +4 -4
- package/commands/add/dark-mode-setup.d.ts +2 -0
- package/commands/add/dark-mode-setup.d.ts.map +1 -1
- package/commands/add/dark-mode-setup.js +15 -1
- package/commands/add/dark-mode-setup.js.map +1 -1
- package/commands/add/dependency-resolver.d.ts +8 -1
- package/commands/add/dependency-resolver.d.ts.map +1 -1
- package/commands/add/dependency-resolver.js +87 -16
- package/commands/add/dependency-resolver.js.map +1 -1
- package/commands/add/index.d.ts.map +1 -1
- package/commands/add/index.js +55 -29
- package/commands/add/index.js.map +1 -1
- package/commands/add/stylesheet-setup.d.ts +3 -0
- package/commands/add/stylesheet-setup.d.ts.map +1 -0
- package/commands/add/stylesheet-setup.js +92 -0
- package/commands/add/stylesheet-setup.js.map +1 -0
- package/commands/add/wizard.d.ts +12 -8
- package/commands/add/wizard.d.ts.map +1 -1
- package/commands/add/wizard.js +12 -2
- package/commands/add/wizard.js.map +1 -1
- package/commands/init/config-prompter.d.ts +36 -16
- package/commands/init/config-prompter.d.ts.map +1 -1
- package/commands/init/config-prompter.js +37 -17
- package/commands/init/config-prompter.js.map +1 -1
- package/commands/init/dependencies.d.ts.map +1 -1
- package/commands/init/dependencies.js +35 -23
- package/commands/init/dependencies.js.map +1 -1
- package/commands/init/index.d.ts.map +1 -1
- package/commands/init/index.js +74 -23
- package/commands/init/index.js.map +1 -1
- package/commands/init/library-peers.d.ts +28 -0
- package/commands/init/library-peers.d.ts.map +1 -0
- package/commands/init/library-peers.js +61 -0
- package/commands/init/library-peers.js.map +1 -0
- 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 +45 -45
- package/commands/init/project-kind.js.map +1 -1
- package/commands/init/rtl-setup.d.ts +12 -0
- package/commands/init/rtl-setup.d.ts.map +1 -0
- package/commands/init/rtl-setup.js +42 -0
- package/commands/init/rtl-setup.js.map +1 -0
- package/commands/init/steps.d.ts +3 -4
- package/commands/init/steps.d.ts.map +1 -1
- package/commands/init/steps.js +100 -39
- package/commands/init/steps.js.map +1 -1
- package/commands/init/tailwind-setup.d.ts +5 -5
- package/commands/init/tailwind-setup.d.ts.map +1 -1
- package/commands/init/tailwind-setup.js +29 -15
- 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 +10 -7
- package/commands/init/wizard.d.ts.map +1 -1
- package/commands/init/wizard.js +73 -46
- package/commands/init/wizard.js.map +1 -1
- package/constants/app.constants.d.ts +17 -0
- package/constants/app.constants.d.ts.map +1 -1
- package/constants/app.constants.js +39 -16
- package/constants/app.constants.js.map +1 -1
- package/core/icons/families.d.ts +38 -0
- package/core/icons/families.d.ts.map +1 -0
- package/core/icons/families.js +26 -0
- package/core/icons/families.js.map +1 -0
- package/core/icons/icon-map.d.ts +24 -0
- package/core/icons/icon-map.d.ts.map +1 -0
- package/core/icons/icon-map.js +150 -0
- package/core/icons/icon-map.js.map +1 -0
- package/core/icons/index.d.ts +107 -0
- package/core/icons/index.d.ts.map +1 -0
- package/core/icons/index.js +183 -0
- package/core/icons/index.js.map +1 -0
- package/core/registry/registry-data.d.ts.map +1 -1
- package/core/registry/registry-data.js +545 -63
- package/core/registry/registry-data.js.map +1 -1
- package/core/themes/index.d.ts +1 -1
- package/core/themes/index.js +1 -1
- package/core/themes/theme-definitions.d.ts.map +1 -1
- package/core/themes/theme-definitions.js +61 -72
- package/core/themes/theme-definitions.js.map +1 -1
- package/index.js +3 -2
- package/index.js.map +1 -1
- package/package.json +56 -58
- 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 +49 -3
- package/ui/engine/terminal/index.d.ts.map +1 -1
- package/ui/engine/terminal/index.js +149 -18
- 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 +31 -22
- package/ui/runner.d.ts.map +1 -1
- package/ui/runner.js +41 -25
- 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 +15 -14
- 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 +16 -9
- package/utils/config.d.ts.map +1 -1
- package/utils/config.js +35 -13
- package/utils/config.js.map +1 -1
- package/utils/errors.d.ts +11 -0
- package/utils/errors.d.ts.map +1 -1
- package/utils/errors.js +14 -0
- package/utils/errors.js.map +1 -1
- 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 +106 -36
- package/utils/get-project-info.js.map +1 -1
- package/utils/http-client.d.ts.map +1 -1
- package/utils/http-client.js +20 -5
- package/utils/http-client.js.map +1 -1
- package/utils/icon-catalog.d.ts +34 -0
- package/utils/icon-catalog.d.ts.map +1 -0
- package/utils/icon-catalog.js +63 -0
- package/utils/icon-catalog.js.map +1 -0
- 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 +50 -50
- package/utils/package-manager.js.map +1 -1
- package/utils/registry.d.ts +100 -6
- package/utils/registry.d.ts.map +1 -1
- package/utils/registry.js +141 -22
- package/utils/registry.js.map +1 -1
- package/utils/schema-version.d.ts +21 -0
- package/utils/schema-version.d.ts.map +1 -0
- package/utils/schema-version.js +28 -0
- package/utils/schema-version.js.map +1 -0
- 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/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
|
-
import type { KeyEvent } from '
|
|
11
|
+
import type { KeyEvent } from './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,I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
|
|
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
|
|
@@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C;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
|
@@ -5,12 +5,14 @@ declare const configSchema: z.ZodObject<{
|
|
|
5
5
|
style: z.ZodDefault<z.ZodEnum<{
|
|
6
6
|
css: "css";
|
|
7
7
|
}>>;
|
|
8
|
+
icons: z.ZodDefault<z.ZodString>;
|
|
9
|
+
rtl: z.ZodDefault<z.ZodBoolean>;
|
|
8
10
|
projectType: z.ZodDefault<z.ZodEnum<{
|
|
9
11
|
angular: "angular";
|
|
10
|
-
|
|
12
|
+
analog: "analog";
|
|
11
13
|
nx: "nx";
|
|
14
|
+
"angular-library": "angular-library";
|
|
12
15
|
"nx-library": "nx-library";
|
|
13
|
-
analog: "analog";
|
|
14
16
|
}>>;
|
|
15
17
|
packageManager: z.ZodDefault<z.ZodEnum<{
|
|
16
18
|
npm: "npm";
|
|
@@ -29,24 +31,25 @@ declare const configSchema: z.ZodObject<{
|
|
|
29
31
|
utils: z.ZodDefault<z.ZodString>;
|
|
30
32
|
core: z.ZodDefault<z.ZodString>;
|
|
31
33
|
services: z.ZodDefault<z.ZodString>;
|
|
34
|
+
blocks: z.ZodDefault<z.ZodString>;
|
|
32
35
|
}, z.core.$strip>>;
|
|
33
36
|
}, z.core.$strip>;
|
|
34
37
|
export type Config = z.infer<typeof configSchema>;
|
|
35
38
|
export declare const DEFAULT_CONFIG: Config;
|
|
36
39
|
export declare function getConfig(cwd: string): Promise<Config | null>;
|
|
37
40
|
/**
|
|
38
|
-
*
|
|
41
|
+
* Splits an alias prefix from the path that follows it.
|
|
39
42
|
*
|
|
40
|
-
* `@`, `@app`, `~` —
|
|
41
|
-
*
|
|
42
|
-
* `@app/components`
|
|
43
|
-
* `@app`
|
|
43
|
+
* `@`, `@app`, `~` — the name does not matter: the prefix is a nickname for
|
|
44
|
+
* `baseUrl`, and the rest is the path inside the project. Handling only `@/`
|
|
45
|
+
* let an alias like `@app/components` escape the substitution and become a
|
|
46
|
+
* literal folder named `@app` at the root, outside anything the tsconfig maps.
|
|
44
47
|
*/
|
|
45
48
|
export declare function splitAlias(alias: string): {
|
|
46
49
|
prefix: string;
|
|
47
50
|
rest: string;
|
|
48
51
|
};
|
|
49
|
-
/**
|
|
52
|
+
/** The alias prefix, with `/*` — the key the tsconfig has to map. */
|
|
50
53
|
export declare function aliasPattern(alias: string): string;
|
|
51
54
|
export declare function resolveAliasToPath(alias: string, baseUrl: string): string;
|
|
52
55
|
export declare function resolveConfigPaths(cwd: string, config: Config): Promise<{
|
|
@@ -57,10 +60,13 @@ export declare function resolveConfigPaths(cwd: string, config: Config): Promise
|
|
|
57
60
|
utils: string;
|
|
58
61
|
core: string;
|
|
59
62
|
services: string;
|
|
63
|
+
blocks: string;
|
|
60
64
|
};
|
|
61
65
|
appConfigFile: string;
|
|
62
66
|
style: "css";
|
|
63
|
-
|
|
67
|
+
icons: string;
|
|
68
|
+
rtl: boolean;
|
|
69
|
+
projectType: "angular" | "analog" | "nx" | "angular-library" | "nx-library";
|
|
64
70
|
packageManager: "npm" | "yarn" | "pnpm" | "bun";
|
|
65
71
|
tailwind: {
|
|
66
72
|
css: string;
|
|
@@ -72,6 +78,7 @@ export declare function resolveConfigPaths(cwd: string, config: Config): Promise
|
|
|
72
78
|
utils: string;
|
|
73
79
|
core: string;
|
|
74
80
|
services: string;
|
|
81
|
+
blocks: string;
|
|
75
82
|
};
|
|
76
83
|
$schema?: string;
|
|
77
84
|
registryUrl?: string;
|
package/utils/config.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../src/utils/config.ts"],"names":[],"mappings":"
|
|
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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBA8ChB,CAAC;AAEH,MAAM,MAAM,MAAM,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,YAAY,CAAC,CAAC;AAElD,eAAO,MAAM,cAAc,EAAE,MAmB5B,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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAenE"}
|
package/utils/config.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { SOURCE_ICON_FAMILY } from '../core/icons/index.js';
|
|
2
|
+
import { ConfigError } from './errors.js';
|
|
2
3
|
import { access, readFile } from 'node:fs/promises';
|
|
3
4
|
import * as path from 'node:path';
|
|
4
5
|
import { z } from 'zod';
|
|
@@ -19,17 +20,30 @@ const configSchema = z.object({
|
|
|
19
20
|
$schema: z.string().optional(),
|
|
20
21
|
appConfigFile: z.string().default('src/app/app.config.ts'),
|
|
21
22
|
style: z.enum(['css']).default('css'),
|
|
22
|
-
//
|
|
23
|
-
//
|
|
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
|
+
//
|
|
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
|
+
icons: z.string().default(SOURCE_ICON_FAMILY),
|
|
32
|
+
// Whether the project reads right to left. Components are direction-agnostic
|
|
33
|
+
// (logical classes + CDK Directionality), so installed files are identical
|
|
34
|
+
// either way; `init --rtl` sets `dir="rtl"` on <html> in index.html.
|
|
35
|
+
rtl: z.boolean().default(false),
|
|
36
|
+
// Absent from components.json files written before the project-type menu; an
|
|
37
|
+
// Angular application is what those describe.
|
|
24
38
|
projectType: z.enum(['angular', 'angular-library', 'nx', 'nx-library', 'analog']).default('angular'),
|
|
25
39
|
packageManager: z.enum(['npm', 'yarn', 'pnpm', 'bun']).default('npm'),
|
|
26
40
|
registryUrl: z.string().optional(),
|
|
27
41
|
tailwind: z
|
|
28
42
|
.object({
|
|
29
43
|
css: z.string().default('src/styles.css'),
|
|
30
|
-
baseColor: z.string().default('
|
|
44
|
+
baseColor: z.string().default('neutral'),
|
|
31
45
|
})
|
|
32
|
-
.default({ css: 'src/styles.css', baseColor: '
|
|
46
|
+
.default({ css: 'src/styles.css', baseColor: 'neutral' }),
|
|
33
47
|
baseUrl: z.string().default('src/app'),
|
|
34
48
|
aliases: z
|
|
35
49
|
.object({
|
|
@@ -37,22 +51,28 @@ const configSchema = z.object({
|
|
|
37
51
|
utils: z.string().default('@/shared/utils'),
|
|
38
52
|
core: z.string().default('@/shared/core'),
|
|
39
53
|
services: z.string().default('@/shared/services'),
|
|
54
|
+
// Absent from files written before blocks were installable; those get the
|
|
55
|
+
// default, which is where `init` would have put it anyway.
|
|
56
|
+
blocks: z.string().default('@/shared/blocks'),
|
|
40
57
|
})
|
|
41
58
|
.default({
|
|
42
59
|
components: '@/shared/components',
|
|
43
60
|
utils: '@/shared/utils',
|
|
44
61
|
core: '@/shared/core',
|
|
45
62
|
services: '@/shared/services',
|
|
63
|
+
blocks: '@/shared/blocks',
|
|
46
64
|
}),
|
|
47
65
|
});
|
|
48
66
|
export const DEFAULT_CONFIG = {
|
|
49
67
|
style: 'css',
|
|
68
|
+
icons: SOURCE_ICON_FAMILY,
|
|
69
|
+
rtl: false,
|
|
50
70
|
projectType: 'angular',
|
|
51
71
|
appConfigFile: 'src/app/app.config.ts',
|
|
52
72
|
packageManager: 'npm',
|
|
53
73
|
tailwind: {
|
|
54
74
|
css: 'src/styles.css',
|
|
55
|
-
baseColor: '
|
|
75
|
+
baseColor: 'neutral',
|
|
56
76
|
},
|
|
57
77
|
baseUrl: 'src/app',
|
|
58
78
|
aliases: {
|
|
@@ -60,6 +80,7 @@ export const DEFAULT_CONFIG = {
|
|
|
60
80
|
utils: '@/shared/utils',
|
|
61
81
|
core: '@/shared/core',
|
|
62
82
|
services: '@/shared/services',
|
|
83
|
+
blocks: '@/shared/blocks',
|
|
63
84
|
},
|
|
64
85
|
};
|
|
65
86
|
export async function getConfig(cwd) {
|
|
@@ -71,7 +92,7 @@ export async function getConfig(cwd) {
|
|
|
71
92
|
const configJson = await readJson(configPath);
|
|
72
93
|
const config = configSchema.parse(configJson);
|
|
73
94
|
if (config.registryUrl) {
|
|
74
|
-
const { validateRegistryUrl } = await import('
|
|
95
|
+
const { validateRegistryUrl } = await import('./registry.js');
|
|
75
96
|
validateRegistryUrl(config.registryUrl);
|
|
76
97
|
}
|
|
77
98
|
return config;
|
|
@@ -83,12 +104,12 @@ export async function getConfig(cwd) {
|
|
|
83
104
|
}
|
|
84
105
|
}
|
|
85
106
|
/**
|
|
86
|
-
*
|
|
107
|
+
* Splits an alias prefix from the path that follows it.
|
|
87
108
|
*
|
|
88
|
-
* `@`, `@app`, `~` —
|
|
89
|
-
*
|
|
90
|
-
* `@app/components`
|
|
91
|
-
* `@app`
|
|
109
|
+
* `@`, `@app`, `~` — the name does not matter: the prefix is a nickname for
|
|
110
|
+
* `baseUrl`, and the rest is the path inside the project. Handling only `@/`
|
|
111
|
+
* let an alias like `@app/components` escape the substitution and become a
|
|
112
|
+
* literal folder named `@app` at the root, outside anything the tsconfig maps.
|
|
92
113
|
*/
|
|
93
114
|
export function splitAlias(alias) {
|
|
94
115
|
const clean = alias.replace(/\/+$/, '');
|
|
@@ -97,7 +118,7 @@ export function splitAlias(alias) {
|
|
|
97
118
|
return { prefix: clean, rest: '' };
|
|
98
119
|
return { prefix: clean.slice(0, separator), rest: clean.slice(separator + 1) };
|
|
99
120
|
}
|
|
100
|
-
/**
|
|
121
|
+
/** The alias prefix, with `/*` — the key the tsconfig has to map. */
|
|
101
122
|
export function aliasPattern(alias) {
|
|
102
123
|
return `${splitAlias(alias).prefix}/*`;
|
|
103
124
|
}
|
|
@@ -117,6 +138,7 @@ export async function resolveConfigPaths(cwd, config) {
|
|
|
117
138
|
utils: path.resolve(cwd, resolveAliasToPath(aliases.utils, baseUrl)),
|
|
118
139
|
core: path.resolve(cwd, resolveAliasToPath(aliases.core, baseUrl)),
|
|
119
140
|
services: path.resolve(cwd, resolveAliasToPath(aliases.services, baseUrl)),
|
|
141
|
+
blocks: path.resolve(cwd, resolveAliasToPath(aliases.blocks, baseUrl)),
|
|
120
142
|
},
|
|
121
143
|
};
|
|
122
144
|
}
|
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,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACnD,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AACpD,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AA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AClE,QAAQ,EAAE,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE,kBAAkB,CAAC,OAAO,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;YAC1E,MAAM,EAAE,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE,kBAAkB,CAAC,OAAO,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;SACvE;KACF,CAAC;AACJ,CAAC"}
|
package/utils/errors.d.ts
CHANGED
|
@@ -9,6 +9,17 @@ export declare class NetworkError extends CliError {
|
|
|
9
9
|
export declare class ConfigError extends CliError {
|
|
10
10
|
constructor(message: string);
|
|
11
11
|
}
|
|
12
|
+
/**
|
|
13
|
+
* The registry publishes a newer format than this CLI knows how to read.
|
|
14
|
+
*
|
|
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
|
+
*/
|
|
20
|
+
export declare class SchemaVersionError extends CliError {
|
|
21
|
+
constructor(message: string);
|
|
22
|
+
}
|
|
12
23
|
export declare class InstallError extends CliError {
|
|
13
24
|
readonly component: string;
|
|
14
25
|
constructor(message: string, component: string);
|
package/utils/errors.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../src/utils/errors.ts"],"names":[],"mappings":"AAAA,qBAAa,QAAS,SAAQ,KAAK;aAGf,IAAI,EAAE,MAAM;gBAD5B,OAAO,EAAE,MAAM,EACC,IAAI,EAAE,MAAM;CAK/B;AAED,qBAAa,YAAa,SAAQ,QAAQ;aAGtB,GAAG,EAAE,MAAM;gBAD3B,OAAO,EAAE,MAAM,EACC,GAAG,EAAE,MAAM;CAK9B;AAED,qBAAa,WAAY,SAAQ,QAAQ;gBAC3B,OAAO,EAAE,MAAM;CAI5B;AAED,qBAAa,YAAa,SAAQ,QAAQ;aAGtB,SAAS,EAAE,MAAM;gBADjC,OAAO,EAAE,MAAM,EACC,SAAS,EAAE,MAAM;CAKpC"}
|
|
1
|
+
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../src/utils/errors.ts"],"names":[],"mappings":"AAAA,qBAAa,QAAS,SAAQ,KAAK;aAGf,IAAI,EAAE,MAAM;gBAD5B,OAAO,EAAE,MAAM,EACC,IAAI,EAAE,MAAM;CAK/B;AAED,qBAAa,YAAa,SAAQ,QAAQ;aAGtB,GAAG,EAAE,MAAM;gBAD3B,OAAO,EAAE,MAAM,EACC,GAAG,EAAE,MAAM;CAK9B;AAED,qBAAa,WAAY,SAAQ,QAAQ;gBAC3B,OAAO,EAAE,MAAM;CAI5B;AAED;;;;;;;GAOG;AACH,qBAAa,kBAAmB,SAAQ,QAAQ;gBAClC,OAAO,EAAE,MAAM;CAI5B;AAED,qBAAa,YAAa,SAAQ,QAAQ;aAGtB,SAAS,EAAE,MAAM;gBADjC,OAAO,EAAE,MAAM,EACC,SAAS,EAAE,MAAM;CAKpC"}
|
package/utils/errors.js
CHANGED
|
@@ -20,6 +20,20 @@ export class ConfigError extends CliError {
|
|
|
20
20
|
this.name = 'ConfigError';
|
|
21
21
|
}
|
|
22
22
|
}
|
|
23
|
+
/**
|
|
24
|
+
* The registry publishes a newer format than this CLI knows how to read.
|
|
25
|
+
*
|
|
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
|
+
*/
|
|
31
|
+
export class SchemaVersionError extends CliError {
|
|
32
|
+
constructor(message) {
|
|
33
|
+
super(message, 'UNSUPPORTED_SCHEMA_VERSION');
|
|
34
|
+
this.name = 'SchemaVersionError';
|
|
35
|
+
}
|
|
36
|
+
}
|
|
23
37
|
export class InstallError extends CliError {
|
|
24
38
|
component;
|
|
25
39
|
constructor(message, component) {
|
package/utils/errors.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errors.js","sourceRoot":"","sources":["../../src/utils/errors.ts"],"names":[],"mappings":"AAAA,MAAM,OAAO,QAAS,SAAQ,KAAK;IAGf;IAFlB,YACE,OAAe,EACC,IAAY;QAE5B,KAAK,CAAC,OAAO,CAAC,CAAC;QAFC,SAAI,GAAJ,IAAI,CAAQ;QAG5B,IAAI,CAAC,IAAI,GAAG,UAAU,CAAC;IACzB,CAAC;CACF;AAED,MAAM,OAAO,YAAa,SAAQ,QAAQ;IAGtB;IAFlB,YACE,OAAe,EACC,GAAW;QAE3B,KAAK,CAAC,OAAO,EAAE,eAAe,CAAC,CAAC;QAFhB,QAAG,GAAH,GAAG,CAAQ;QAG3B,IAAI,CAAC,IAAI,GAAG,cAAc,CAAC;IAC7B,CAAC;CACF;AAED,MAAM,OAAO,WAAY,SAAQ,QAAQ;IACvC,YAAY,OAAe;QACzB,KAAK,CAAC,OAAO,EAAE,cAAc,CAAC,CAAC;QAC/B,IAAI,CAAC,IAAI,GAAG,aAAa,CAAC;IAC5B,CAAC;CACF;AAED,MAAM,OAAO,YAAa,SAAQ,QAAQ;IAGtB;IAFlB,YACE,OAAe,EACC,SAAiB;QAEjC,KAAK,CAAC,OAAO,EAAE,eAAe,CAAC,CAAC;QAFhB,cAAS,GAAT,SAAS,CAAQ;QAGjC,IAAI,CAAC,IAAI,GAAG,cAAc,CAAC;IAC7B,CAAC;CACF"}
|
|
1
|
+
{"version":3,"file":"errors.js","sourceRoot":"","sources":["../../src/utils/errors.ts"],"names":[],"mappings":"AAAA,MAAM,OAAO,QAAS,SAAQ,KAAK;IAGf;IAFlB,YACE,OAAe,EACC,IAAY;QAE5B,KAAK,CAAC,OAAO,CAAC,CAAC;QAFC,SAAI,GAAJ,IAAI,CAAQ;QAG5B,IAAI,CAAC,IAAI,GAAG,UAAU,CAAC;IACzB,CAAC;CACF;AAED,MAAM,OAAO,YAAa,SAAQ,QAAQ;IAGtB;IAFlB,YACE,OAAe,EACC,GAAW;QAE3B,KAAK,CAAC,OAAO,EAAE,eAAe,CAAC,CAAC;QAFhB,QAAG,GAAH,GAAG,CAAQ;QAG3B,IAAI,CAAC,IAAI,GAAG,cAAc,CAAC;IAC7B,CAAC;CACF;AAED,MAAM,OAAO,WAAY,SAAQ,QAAQ;IACvC,YAAY,OAAe;QACzB,KAAK,CAAC,OAAO,EAAE,cAAc,CAAC,CAAC;QAC/B,IAAI,CAAC,IAAI,GAAG,aAAa,CAAC;IAC5B,CAAC;CACF;AAED;;;;;;;GAOG;AACH,MAAM,OAAO,kBAAmB,SAAQ,QAAQ;IAC9C,YAAY,OAAe;QACzB,KAAK,CAAC,OAAO,EAAE,4BAA4B,CAAC,CAAC;QAC7C,IAAI,CAAC,IAAI,GAAG,oBAAoB,CAAC;IACnC,CAAC;CACF;AAED,MAAM,OAAO,YAAa,SAAQ,QAAQ;IAGtB;IAFlB,YACE,OAAe,EACC,SAAiB;QAEjC,KAAK,CAAC,OAAO,EAAE,eAAe,CAAC,CAAC;QAFhB,cAAS,GAAT,SAAS,CAAQ;QAGjC,IAAI,CAAC,IAAI,GAAG,cAAc,CAAC;IAC7B,CAAC;CACF"}
|
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* Which toolchain compiles the project.
|
|
3
3
|
*
|
|
4
|
-
* Analog
|
|
5
|
-
*
|
|
4
|
+
* Analog swaps Angular's build for Vite, and with it where Tailwind is
|
|
5
|
+
* configured: a plugin in `vite.config.ts` instead of `.postcssrc.json`.
|
|
6
6
|
*/
|
|
7
7
|
export type ProjectFlavor = 'angular' | 'analog';
|
|
8
8
|
/** Um projeto declarado no workspace — `angular.json` ou `project.json` do Nx. */
|
|
9
9
|
export type WorkspaceProject = {
|
|
10
10
|
name: string;
|
|
11
11
|
projectType: 'application' | 'library';
|
|
12
|
-
/**
|
|
12
|
+
/** Project root, relative to the workspace (`apps/web`, or `''` for a single app). */
|
|
13
13
|
root: string;
|
|
14
14
|
sourceRoot: string;
|
|
15
15
|
flavor: ProjectFlavor;
|
|
16
16
|
/** Os `styles` do target de build, relativos ao workspace. */
|
|
17
17
|
styles: string[];
|
|
18
|
-
/**
|
|
18
|
+
/** The build target's `index`, when declared. */
|
|
19
19
|
index: string | null;
|
|
20
20
|
};
|
|
21
21
|
export type ProjectInfo = {
|
|
@@ -32,7 +32,7 @@ export type ProjectInfo = {
|
|
|
32
32
|
tsconfigFile: string;
|
|
33
33
|
angularVersion: string | null;
|
|
34
34
|
angularVersionRaw: string | null;
|
|
35
|
-
/**
|
|
35
|
+
/** What the workspace declares, in the order it appears. Empty when there is none. */
|
|
36
36
|
projects: WorkspaceProject[];
|
|
37
37
|
};
|
|
38
38
|
export declare function getProjectInfo(cwd: string): Promise<ProjectInfo>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-project-info.d.ts","sourceRoot":"","sources":["../../src/utils/get-project-info.ts"],"names":[],"mappings":"AAyBA;;;;;GAKG;AACH,MAAM,MAAM,aAAa,GAAG,SAAS,GAAG,QAAQ,CAAC;AAEjD,kFAAkF;AAClF,MAAM,MAAM,gBAAgB,GAAG;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,aAAa,GAAG,SAAS,CAAC;IACvC,
|
|
1
|
+
{"version":3,"file":"get-project-info.d.ts","sourceRoot":"","sources":["../../src/utils/get-project-info.ts"],"names":[],"mappings":"AAyBA;;;;;GAKG;AACH,MAAM,MAAM,aAAa,GAAG,SAAS,GAAG,QAAQ,CAAC;AAEjD,kFAAkF;AAClF,MAAM,MAAM,gBAAgB,GAAG;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,aAAa,GAAG,SAAS,CAAC;IACvC,sFAAsF;IACtF,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,EAA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