zard-cli 1.1.0-alpha.0 → 1.1.0
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
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* Which kind of project `init` is configuring.
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
4
|
+
* The user answers, in the wizard's first question — the CLI does not decide for
|
|
5
|
+
* them. What the workspace reveals comes afterwards, to fill in the suggested
|
|
6
|
+
* paths for the chosen type; detection only becomes a decision on the headless
|
|
7
|
+
* path, where there is nobody to ask.
|
|
8
8
|
*
|
|
9
|
-
*
|
|
10
|
-
* `app.config.ts`
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
9
|
+
* The differences between the types are not cosmetic: a library has no
|
|
10
|
+
* `app.config.ts` to register providers in and no pre-existing global CSS, Nx
|
|
11
|
+
* keeps the TypeScript paths in a different file, and Analog swaps Angular's
|
|
12
|
+
* build for Vite — and with it the way Tailwind is configured. Concentrating
|
|
13
|
+
* those differences here keeps every step from rediscovering them.
|
|
14
14
|
*/
|
|
15
15
|
import type { ProjectInfo, WorkspaceProject } from '../../utils/get-project-info.js';
|
|
16
16
|
export type ProjectKind = 'angular' | 'angular-library' | 'nx' | 'nx-library' | 'analog';
|
|
@@ -18,65 +18,65 @@ export interface ProjectKindOption {
|
|
|
18
18
|
readonly value: ProjectKind;
|
|
19
19
|
readonly label: string;
|
|
20
20
|
readonly detail: string;
|
|
21
|
-
/**
|
|
21
|
+
/** The ecosystem's colour, so the menu says at a glance which world the type belongs to. */
|
|
22
22
|
readonly color: string;
|
|
23
23
|
}
|
|
24
24
|
/**
|
|
25
|
-
*
|
|
26
|
-
*
|
|
25
|
+
* Menu order: each ecosystem with the application before the library, from the
|
|
26
|
+
* most common to the rarest. Angular opens the list because it is the default.
|
|
27
27
|
*/
|
|
28
28
|
export declare const PROJECT_KINDS: readonly ProjectKindOption[];
|
|
29
29
|
export declare function isLibraryKind(kind: ProjectKind): boolean;
|
|
30
|
-
/**
|
|
30
|
+
/** Where the TypeScript paths have to be written for the project to see them. */
|
|
31
31
|
export declare function tsconfigFileFor(kind: ProjectKind, projectInfo: ProjectInfo): string;
|
|
32
32
|
/** Se o Tailwind entra pelo PostCSS do Angular ou pelo plugin do Vite. */
|
|
33
33
|
export declare function bundlerFor(kind: ProjectKind): 'angular' | 'vite';
|
|
34
34
|
/**
|
|
35
|
-
*
|
|
35
|
+
* The workspace projects that can receive the install.
|
|
36
36
|
*
|
|
37
|
-
*
|
|
38
|
-
*
|
|
39
|
-
*
|
|
37
|
+
* Once the type is chosen, only what matches it makes sense to offer: asking
|
|
38
|
+
* someone who chose "library" to install into an application would offer a
|
|
39
|
+
* target the following steps do not know how to configure.
|
|
40
40
|
*/
|
|
41
41
|
export declare function candidateProjects(kind: ProjectKind, projectInfo: ProjectInfo): WorkspaceProject[];
|
|
42
|
-
/**
|
|
42
|
+
/** Default root when the workspace declares no compatible project. */
|
|
43
43
|
export declare function fallbackRootFor(kind: ProjectKind): string;
|
|
44
44
|
/**
|
|
45
|
-
*
|
|
45
|
+
* The type the headless path assumes.
|
|
46
46
|
*
|
|
47
|
-
*
|
|
48
|
-
*
|
|
49
|
-
* Analog
|
|
50
|
-
*
|
|
47
|
+
* With no interactive terminal nobody answers the first question, so here — and
|
|
48
|
+
* only here — the workspace decides: the manager gives the world (Nx or
|
|
49
|
+
* Angular), Analog announces itself through its own dependencies, and the
|
|
50
|
+
* absence of any application is what suggests the target is a library.
|
|
51
51
|
*/
|
|
52
52
|
export declare function detectProjectKind(projectInfo: ProjectInfo): ProjectKind;
|
|
53
53
|
/**
|
|
54
|
-
*
|
|
54
|
+
* Where a library's code lives.
|
|
55
55
|
*
|
|
56
|
-
* `src/lib`
|
|
57
|
-
* `nx g @nx/angular:library`: `src/`
|
|
58
|
-
*
|
|
56
|
+
* `src/lib` is the convention for both `ng generate library` and
|
|
57
|
+
* `nx g @nx/angular:library`: `src/` holds the public entry point, and
|
|
58
|
+
* everything it exports sits in `src/lib`.
|
|
59
59
|
*/
|
|
60
60
|
export declare function libraryBaseUrl(libraryRoot: string): string;
|
|
61
|
-
/**
|
|
61
|
+
/** The theme CSS the library starts exposing to whoever consumes it. */
|
|
62
62
|
export declare function libraryStylesPath(libraryRoot: string): string;
|
|
63
63
|
/**
|
|
64
|
-
*
|
|
64
|
+
* The project root, derived from `baseUrl`.
|
|
65
65
|
*
|
|
66
|
-
*
|
|
67
|
-
*
|
|
68
|
-
*
|
|
69
|
-
* `.postcssrc.json
|
|
66
|
+
* Both layouts end two levels below the root — `<root>/src/app` in an
|
|
67
|
+
* application, `<root>/src/lib` in a library — so going up two levels gives the
|
|
68
|
+
* directory holding that project's `project.json`, `ng-package.json` and
|
|
69
|
+
* `.postcssrc.json`. A single app at the root gives `.`.
|
|
70
70
|
*/
|
|
71
71
|
export declare function projectRootOf(baseUrl: string): string;
|
|
72
|
-
/**
|
|
72
|
+
/** The project's source directory — where `index.html` and `main.ts` sit. */
|
|
73
73
|
export declare function sourceRootOf(baseUrl: string): string;
|
|
74
74
|
/**
|
|
75
|
-
*
|
|
75
|
+
* Where to look for the project's `index.html`.
|
|
76
76
|
*
|
|
77
|
-
*
|
|
78
|
-
*
|
|
79
|
-
*
|
|
77
|
+
* In Analog it is Vite's entry page and sits at the project root, not in `src/`
|
|
78
|
+
* as in the Angular build — suggesting the wrong path made `add dark-mode` fail
|
|
79
|
+
* right after asking.
|
|
80
80
|
*/
|
|
81
81
|
export declare function indexHtmlFor(kind: ProjectKind, baseUrl: string): string;
|
|
82
82
|
//# sourceMappingURL=project-kind.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"project-kind.d.ts","sourceRoot":"","sources":["../../../src/commands/init/project-kind.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AAGpF,MAAM,MAAM,WAAW,GAAG,SAAS,GAAG,iBAAiB,GAAG,IAAI,GAAG,YAAY,GAAG,Q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iBAAiB,CAAC,WAAW,EAAE,WAAW,GAAG,WAAW,CASvE;AAED;;;;;;GAMG;AACH,wBAAgB,cAAc,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM,CAE1D;AAED,wEAAwE;AACxE,wBAAgB,iBAAiB,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM,CAE7D;AAED;;;;;;;GAOG;AACH,wBAAgB,aAAa,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAErD;AAED,6EAA6E;AAC7E,wBAAgB,YAAY,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAEpD;AAED;;;;;;GAMG;AACH,wBAAgB,YAAY,CAAC,IAAI,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,GAAG,MAAM,CAOvE"}
|
|
@@ -1,30 +1,30 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* Which kind of project `init` is configuring.
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
4
|
+
* The user answers, in the wizard's first question — the CLI does not decide for
|
|
5
|
+
* them. What the workspace reveals comes afterwards, to fill in the suggested
|
|
6
|
+
* paths for the chosen type; detection only becomes a decision on the headless
|
|
7
|
+
* path, where there is nobody to ask.
|
|
8
8
|
*
|
|
9
|
-
*
|
|
10
|
-
* `app.config.ts`
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
9
|
+
* The differences between the types are not cosmetic: a library has no
|
|
10
|
+
* `app.config.ts` to register providers in and no pre-existing global CSS, Nx
|
|
11
|
+
* keeps the TypeScript paths in a different file, and Analog swaps Angular's
|
|
12
|
+
* build for Vite — and with it the way Tailwind is configured. Concentrating
|
|
13
|
+
* those differences here keeps every step from rediscovering them.
|
|
14
14
|
*/
|
|
15
15
|
import * as path from 'node:path';
|
|
16
16
|
/**
|
|
17
|
-
*
|
|
17
|
+
* The colour of each ecosystem in the menu.
|
|
18
18
|
*
|
|
19
|
-
* Angular
|
|
20
|
-
*
|
|
19
|
+
* Angular stays the base white — it is the default case, and giving it a colour
|
|
20
|
+
* would suggest it is a special option among the others.
|
|
21
21
|
*/
|
|
22
22
|
const ANGULAR = '#fafafa';
|
|
23
23
|
const NX = '#6aa9ff';
|
|
24
24
|
const ANALOG = '#fb7185';
|
|
25
25
|
/**
|
|
26
|
-
*
|
|
27
|
-
*
|
|
26
|
+
* Menu order: each ecosystem with the application before the library, from the
|
|
27
|
+
* most common to the rarest. Angular opens the list because it is the default.
|
|
28
28
|
*/
|
|
29
29
|
export const PROJECT_KINDS = [
|
|
30
30
|
{
|
|
@@ -66,13 +66,13 @@ const TRAITS = {
|
|
|
66
66
|
'nx-library': { isLibrary: true, workspace: 'nx', bundler: 'angular', fallbackRoot: 'libs/ui' },
|
|
67
67
|
};
|
|
68
68
|
export function isLibraryKind(kind) {
|
|
69
|
-
return TRAITS[kind]
|
|
69
|
+
return TRAITS[kind]?.isLibrary ?? false;
|
|
70
70
|
}
|
|
71
|
-
/**
|
|
71
|
+
/** Where the TypeScript paths have to be written for the project to see them. */
|
|
72
72
|
export function tsconfigFileFor(kind, projectInfo) {
|
|
73
|
-
//
|
|
74
|
-
//
|
|
75
|
-
//
|
|
73
|
+
// Nx extends a tsconfig.base.json at the root; writing into the tsconfig.json
|
|
74
|
+
// there would reach no project at all. Outside Nx the tsconfig.json itself is
|
|
75
|
+
// the target, unless the workspace already keeps a base — then that one wins.
|
|
76
76
|
if (TRAITS[kind].workspace === 'nx')
|
|
77
77
|
return 'tsconfig.base.json';
|
|
78
78
|
return projectInfo.tsconfigFile;
|
|
@@ -82,27 +82,27 @@ export function bundlerFor(kind) {
|
|
|
82
82
|
return TRAITS[kind].bundler;
|
|
83
83
|
}
|
|
84
84
|
/**
|
|
85
|
-
*
|
|
85
|
+
* The workspace projects that can receive the install.
|
|
86
86
|
*
|
|
87
|
-
*
|
|
88
|
-
*
|
|
89
|
-
*
|
|
87
|
+
* Once the type is chosen, only what matches it makes sense to offer: asking
|
|
88
|
+
* someone who chose "library" to install into an application would offer a
|
|
89
|
+
* target the following steps do not know how to configure.
|
|
90
90
|
*/
|
|
91
91
|
export function candidateProjects(kind, projectInfo) {
|
|
92
92
|
const wanted = TRAITS[kind].isLibrary ? 'library' : 'application';
|
|
93
93
|
return projectInfo.projects.filter(project => project.projectType === wanted);
|
|
94
94
|
}
|
|
95
|
-
/**
|
|
95
|
+
/** Default root when the workspace declares no compatible project. */
|
|
96
96
|
export function fallbackRootFor(kind) {
|
|
97
97
|
return TRAITS[kind].fallbackRoot;
|
|
98
98
|
}
|
|
99
99
|
/**
|
|
100
|
-
*
|
|
100
|
+
* The type the headless path assumes.
|
|
101
101
|
*
|
|
102
|
-
*
|
|
103
|
-
*
|
|
104
|
-
* Analog
|
|
105
|
-
*
|
|
102
|
+
* With no interactive terminal nobody answers the first question, so here — and
|
|
103
|
+
* only here — the workspace decides: the manager gives the world (Nx or
|
|
104
|
+
* Angular), Analog announces itself through its own dependencies, and the
|
|
105
|
+
* absence of any application is what suggests the target is a library.
|
|
106
106
|
*/
|
|
107
107
|
export function detectProjectKind(projectInfo) {
|
|
108
108
|
const hasApplication = projectInfo.projects.some(project => project.projectType === 'application');
|
|
@@ -115,40 +115,40 @@ export function detectProjectKind(projectInfo) {
|
|
|
115
115
|
return projectInfo.hasAnalog ? 'analog' : 'angular';
|
|
116
116
|
}
|
|
117
117
|
/**
|
|
118
|
-
*
|
|
118
|
+
* Where a library's code lives.
|
|
119
119
|
*
|
|
120
|
-
* `src/lib`
|
|
121
|
-
* `nx g @nx/angular:library`: `src/`
|
|
122
|
-
*
|
|
120
|
+
* `src/lib` is the convention for both `ng generate library` and
|
|
121
|
+
* `nx g @nx/angular:library`: `src/` holds the public entry point, and
|
|
122
|
+
* everything it exports sits in `src/lib`.
|
|
123
123
|
*/
|
|
124
124
|
export function libraryBaseUrl(libraryRoot) {
|
|
125
125
|
return `${trimSlashes(libraryRoot)}/src/lib`;
|
|
126
126
|
}
|
|
127
|
-
/**
|
|
127
|
+
/** The theme CSS the library starts exposing to whoever consumes it. */
|
|
128
128
|
export function libraryStylesPath(libraryRoot) {
|
|
129
129
|
return `${trimSlashes(libraryRoot)}/src/styles.css`;
|
|
130
130
|
}
|
|
131
131
|
/**
|
|
132
|
-
*
|
|
132
|
+
* The project root, derived from `baseUrl`.
|
|
133
133
|
*
|
|
134
|
-
*
|
|
135
|
-
*
|
|
136
|
-
*
|
|
137
|
-
* `.postcssrc.json
|
|
134
|
+
* Both layouts end two levels below the root — `<root>/src/app` in an
|
|
135
|
+
* application, `<root>/src/lib` in a library — so going up two levels gives the
|
|
136
|
+
* directory holding that project's `project.json`, `ng-package.json` and
|
|
137
|
+
* `.postcssrc.json`. A single app at the root gives `.`.
|
|
138
138
|
*/
|
|
139
139
|
export function projectRootOf(baseUrl) {
|
|
140
140
|
return path.posix.normalize(path.posix.join(toPosix(baseUrl), '..', '..'));
|
|
141
141
|
}
|
|
142
|
-
/**
|
|
142
|
+
/** The project's source directory — where `index.html` and `main.ts` sit. */
|
|
143
143
|
export function sourceRootOf(baseUrl) {
|
|
144
144
|
return path.posix.dirname(toPosix(baseUrl));
|
|
145
145
|
}
|
|
146
146
|
/**
|
|
147
|
-
*
|
|
147
|
+
* Where to look for the project's `index.html`.
|
|
148
148
|
*
|
|
149
|
-
*
|
|
150
|
-
*
|
|
151
|
-
*
|
|
149
|
+
* In Analog it is Vite's entry page and sits at the project root, not in `src/`
|
|
150
|
+
* as in the Angular build — suggesting the wrong path made `add dark-mode` fail
|
|
151
|
+
* right after asking.
|
|
152
152
|
*/
|
|
153
153
|
export function indexHtmlFor(kind, baseUrl) {
|
|
154
154
|
if (kind === 'analog') {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"project-kind.js","sourceRoot":"","sources":["../../../src/commands/init/project-kind.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAGH,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAYlC;;;;;GAKG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G,YAAY,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,SAAS,EAAE;CAChG,CAAC;AAEF,MAAM,UAAU,aAAa,CAAC,IAAiB;IAC7C,OAAO,MAAM,CAAC,IAAI,CAAC,
|
|
1
|
+
{"version":3,"file":"project-kind.js","sourceRoot":"","sources":["../../../src/commands/init/project-kind.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAGH,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAYlC;;;;;GAKG;AACH,MAAM,OAAO,GAAG,SAAS,CAAC;AAC1B,MAAM,EAAE,GAAG,SAAS,CAAC;AACrB,MAAM,MAAM,GAAG,SAAS,CAAC;AAEzB;;;GAGG;AACH,MAAM,CAAC,MAAM,aAAa,GAAiC;IACzD;QACE,KAAK,EAAE,SAAS;QAChB,KAAK,EAAE,SAAS;QAChB,MAAM,EAAE,qEAAqE;QAC7E,KAAK,EAAE,OAAO;KACf;IACD;QACE,KAAK,EAAE,iBAAiB;QACxB,KAAK,EAAE,iBAAiB;QACxB,MAAM,EAAE,kEAAkE;QAC1E,KAAK,EAAE,OAAO;KACf;IACD;QACE,KAAK,EAAE,IAAI;QACX,KAAK,EAAE,IAAI;QACX,MAAM,EAAE,sEAAsE;QAC9E,KAAK,EAAE,EAAE;KACV;IACD;QACE,KAAK,EAAE,YAAY;QACnB,KAAK,EAAE,YAAY;QACnB,MAAM,EAAE,oEAAoE;QAC5E,KAAK,EAAE,EAAE;KACV;IACD;QACE,KAAK,EAAE,QAAQ;QACf,KAAK,EAAE,WAAW;QAClB,MAAM,EAAE,oEAAoE;QAC5E,KAAK,EAAE,MAAM;KACd;CACF,CAAC;AAaF,MAAM,MAAM,GAAoC;IAC9C,OAAO,EAAE,EAAE,SAAS,EAAE,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,EAAE,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I,CAAC,CAAC,CAAC;AAC7E,CAAC;AAED,6EAA6E;AAC7E,MAAM,UAAU,YAAY,CAAC,OAAe;IAC1C,OAAO,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC;AAC9C,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,YAAY,CAAC,IAAiB,EAAE,OAAe;IAC7D,IAAI,IAAI,KAAK,QAAQ,EAAE,CAAC;QACtB,MAAM,IAAI,GAAG,aAAa,CAAC,OAAO,CAAC,CAAC;QACpC,OAAO,IAAI,KAAK,GAAG,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,GAAG,IAAI,aAAa,CAAC;IAC5D,CAAC;IAED,OAAO,GAAG,YAAY,CAAC,OAAO,CAAC,aAAa,CAAC;AAC/C,CAAC;AAED,SAAS,OAAO,CAAC,KAAa;IAC5B,OAAO,KAAK,CAAC,OAAO,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;AACnC,CAAC;AAED,SAAS,WAAW,CAAC,KAAa;IAChC,OAAO,KAAK,CAAC,OAAO,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC;AACnC,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/** The `<html>` tag with `dir="rtl"`, whatever it had before. */
|
|
2
|
+
export declare function withRtlDirection(content: string): string;
|
|
3
|
+
export type RtlSetupResult = 'updated' | 'unchanged' | 'missing' | 'no-html-tag';
|
|
4
|
+
/**
|
|
5
|
+
* Sets `dir="rtl"` on `<html>` in the app's index.html.
|
|
6
|
+
*
|
|
7
|
+
* The components are direction-agnostic, so this attribute is all a project needs
|
|
8
|
+
* to render right to left. A library has no index.html — it belongs to the app
|
|
9
|
+
* consuming it — so a missing file is a note, not a failure.
|
|
10
|
+
*/
|
|
11
|
+
export declare function setupRtlDirection(cwd: string, indexFile: string): Promise<RtlSetupResult>;
|
|
12
|
+
//# sourceMappingURL=rtl-setup.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rtl-setup.d.ts","sourceRoot":"","sources":["../../../src/commands/init/rtl-setup.ts"],"names":[],"mappings":"AAQA,iEAAiE;AACjE,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAUxD;AAED,MAAM,MAAM,cAAc,GAAG,SAAS,GAAG,WAAW,GAAG,SAAS,GAAG,aAAa,CAAC;AAEjF;;;;;;GAMG;AACH,wBAAsB,iBAAiB,CAAC,GAAG,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,cAAc,CAAC,CAoB/F"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { logger } from '../../utils/logger.js';
|
|
2
|
+
import { existsSync } from 'node:fs';
|
|
3
|
+
import { readFile, writeFile } from 'node:fs/promises';
|
|
4
|
+
import * as path from 'node:path';
|
|
5
|
+
const HTML_OPEN_TAG = /<html(\s[^>]*)?>/i;
|
|
6
|
+
const DIR_ATTRIBUTE = /\sdir\s*=\s*(?:"[^"]*"|'[^']*'|[^\s>]+)/i;
|
|
7
|
+
/** The `<html>` tag with `dir="rtl"`, whatever it had before. */
|
|
8
|
+
export function withRtlDirection(content) {
|
|
9
|
+
const match = HTML_OPEN_TAG.exec(content);
|
|
10
|
+
if (!match)
|
|
11
|
+
return content;
|
|
12
|
+
const attributes = match[1] ?? '';
|
|
13
|
+
const next = DIR_ATTRIBUTE.test(attributes)
|
|
14
|
+
? attributes.replace(DIR_ATTRIBUTE, ' dir="rtl"')
|
|
15
|
+
: `${attributes.replace(/\s+$/, '')} dir="rtl"`;
|
|
16
|
+
return content.slice(0, match.index) + `<html${next}>` + content.slice(match.index + match[0].length);
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Sets `dir="rtl"` on `<html>` in the app's index.html.
|
|
20
|
+
*
|
|
21
|
+
* The components are direction-agnostic, so this attribute is all a project needs
|
|
22
|
+
* to render right to left. A library has no index.html — it belongs to the app
|
|
23
|
+
* consuming it — so a missing file is a note, not a failure.
|
|
24
|
+
*/
|
|
25
|
+
export async function setupRtlDirection(cwd, indexFile) {
|
|
26
|
+
const indexPath = path.resolve(cwd, indexFile);
|
|
27
|
+
if (!existsSync(indexPath)) {
|
|
28
|
+
logger.warn(`${indexFile} not found: add dir="rtl" to the <html> tag of the app's index.html by hand.`);
|
|
29
|
+
return 'missing';
|
|
30
|
+
}
|
|
31
|
+
const content = await readFile(indexPath, 'utf8');
|
|
32
|
+
if (!HTML_OPEN_TAG.test(content)) {
|
|
33
|
+
logger.warn(`No <html> tag found in ${indexFile}: add dir="rtl" to it by hand.`);
|
|
34
|
+
return 'no-html-tag';
|
|
35
|
+
}
|
|
36
|
+
const updated = withRtlDirection(content);
|
|
37
|
+
if (updated === content)
|
|
38
|
+
return 'unchanged';
|
|
39
|
+
await writeFile(indexPath, updated, 'utf8');
|
|
40
|
+
return 'updated';
|
|
41
|
+
}
|
|
42
|
+
//# sourceMappingURL=rtl-setup.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rtl-setup.js","sourceRoot":"","sources":["../../../src/commands/init/rtl-setup.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAC9C,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AACvD,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAElC,MAAM,aAAa,GAAG,mBAAmB,CAAC;AAC1C,MAAM,aAAa,GAAG,0CAA0C,CAAC;AAEjE,iEAAiE;AACjE,MAAM,UAAU,gBAAgB,CAAC,OAAe;IAC9C,MAAM,KAAK,GAAG,aAAa,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IAC1C,IAAI,CAAC,KAAK;QAAE,OAAO,OAAO,CAAC;IAE3B,MAAM,UAAU,GAAG,KAAK,CAAC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init/steps.d.ts
CHANGED
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import { type Config } from '../../utils/config.js';
|
|
2
2
|
import { type ProjectInfo } from '../../utils/get-project-info.js';
|
|
3
3
|
/**
|
|
4
|
-
*
|
|
4
|
+
* One step of initialization: the label the UI shows and the work it does.
|
|
5
5
|
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
* decide como apresentá-la.
|
|
6
|
+
* The list is built once and consumed by both the wizard and the headless path,
|
|
7
|
+
* so the two run exactly the same sequence — the UI only decides how to present it.
|
|
9
8
|
*/
|
|
10
9
|
export interface InitStep {
|
|
11
10
|
readonly label: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"steps.d.ts","sourceRoot":"","sources":["../../../src/commands/init/steps.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"steps.d.ts","sourceRoot":"","sources":["../../../src/commands/init/steps.ts"],"names":[],"mappings":"AAeA,OAAO,EAAsB,KAAK,MAAM,EAAE,MAAM,sBAAsB,CAAC;AACvE,OAAO,EAAE,KAAK,WAAW,EAAE,MAAM,gCAAgC,CAAC;AAOlE;;;;;GAKG;AACH,MAAM,WAAW,QAAQ;IACvB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;CACtB;AAED,wBAAgB,cAAc,CAC5B,GAAG,EAAE,MAAM,EACX,MAAM,EAAE,MAAM,EACd,WAAW,EAAE,WAAW,EACxB,gBAAgB,EAAE,OAAO,GACxB,QAAQ,EAAE,CA0EZ"}
|