zard-cli 1.0.0-beta.115 → 1.0.0-beta.116
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
|
@@ -1,28 +1,32 @@
|
|
|
1
1
|
import { bundlerFor, isLibraryKind } from '../../commands/init/project-kind.js';
|
|
2
2
|
import { iconPackagesFor } from '../../core/icons/index.js';
|
|
3
|
+
import { pinAllForAngular } from '../../utils/angular-compat.js';
|
|
3
4
|
import { getProjectInfo } from '../../utils/get-project-info.js';
|
|
4
5
|
import { iconCatalog } from '../../utils/icon-catalog.js';
|
|
5
6
|
import { logger } from '../../utils/logger.js';
|
|
6
7
|
import { filterInstalledPackages, installPackagesWithRetry } from '../../utils/package-manager.js';
|
|
7
8
|
export async function installDependencies(cwd, config, projectInfo) {
|
|
8
9
|
const info = projectInfo || (await getProjectInfo(cwd));
|
|
9
|
-
|
|
10
|
-
//
|
|
11
|
-
//
|
|
12
|
-
//
|
|
13
|
-
|
|
14
|
-
|
|
10
|
+
// The icon package comes from the family chosen in `components.json`, not from
|
|
11
|
+
// a fixed list: that is what makes `"icons"` mean something the day there is
|
|
12
|
+
// more than one family.
|
|
13
|
+
//
|
|
14
|
+
// Pinned against the project's Angular: the CDK and ng-icons both ship one
|
|
15
|
+
// release per Angular major and peer on `>=` it, so `latest` is the wrong
|
|
16
|
+
// answer for anyone not already on the newest Angular.
|
|
17
|
+
const deps = pinAllForAngular([
|
|
18
|
+
'@angular/cdk',
|
|
15
19
|
'class-variance-authority',
|
|
16
20
|
'clsx',
|
|
17
21
|
'tailwind-merge',
|
|
18
22
|
...iconPackagesFor(config.icons, iconCatalog()),
|
|
19
|
-
];
|
|
23
|
+
], info.angularVersion);
|
|
20
24
|
const devDeps = tailwindPackages(config.projectType);
|
|
21
25
|
if (info.hasTailwind) {
|
|
22
26
|
logger.info('Tailwind CSS is already installed. Only the missing pieces will be added.');
|
|
23
27
|
}
|
|
24
|
-
//
|
|
25
|
-
//
|
|
28
|
+
// Every batch that comes back empty is a whole manager invocation saved — and
|
|
29
|
+
// that is exactly the common case for a repeated `init`: nothing to install.
|
|
26
30
|
const [missingDeps, missingDevDeps] = await Promise.all([
|
|
27
31
|
filterInstalledPackages(deps, cwd),
|
|
28
32
|
filterInstalledPackages(devDeps, cwd),
|
|
@@ -35,16 +39,16 @@ export async function installDependencies(cwd, config, projectInfo) {
|
|
|
35
39
|
await installPackagesWithRetry(missingDevDeps, cwd, config.packageManager, true);
|
|
36
40
|
}
|
|
37
41
|
/**
|
|
38
|
-
*
|
|
42
|
+
* What Tailwind needs to run in that kind of project.
|
|
39
43
|
*
|
|
40
|
-
*
|
|
41
|
-
*
|
|
42
|
-
*
|
|
43
|
-
*
|
|
44
|
+
* The list is always the complete one and the installed-filter decides what is
|
|
45
|
+
* left: checking only for `tailwindcss` missed the case of someone who had it
|
|
46
|
+
* installed but not the bundler adapter, and then the build emitted no
|
|
47
|
+
* utilities at all.
|
|
44
48
|
*
|
|
45
|
-
*
|
|
46
|
-
*
|
|
47
|
-
*
|
|
49
|
+
* A library has no bundler to configure — the consuming application compiles
|
|
50
|
+
* the CSS — but the packages stay because the theme init writes there declares
|
|
51
|
+
* them.
|
|
48
52
|
*/
|
|
49
53
|
function tailwindPackages(kind) {
|
|
50
54
|
const shared = ['tailwindcss', 'tailwindcss-animate'];
|
|
@@ -54,11 +58,4 @@ function tailwindPackages(kind) {
|
|
|
54
58
|
? [...shared, '@tailwindcss/vite']
|
|
55
59
|
: [...shared, '@tailwindcss/postcss', 'postcss'];
|
|
56
60
|
}
|
|
57
|
-
function getCdkVersion(angularVersion) {
|
|
58
|
-
if (!angularVersion) {
|
|
59
|
-
return '@angular/cdk';
|
|
60
|
-
}
|
|
61
|
-
const majorVersion = Number.parseInt(angularVersion.split('.')[0]);
|
|
62
|
-
return `@angular/cdk@^${majorVersion}`;
|
|
63
|
-
}
|
|
64
61
|
//# sourceMappingURL=dependencies.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dependencies.js","sourceRoot":"","sources":["../../../src/commands/init/dependencies.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,oCAAoC,CAAC;AAC/E,OAAO,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;
|
|
1
|
+
{"version":3,"file":"dependencies.js","sourceRoot":"","sources":["../../../src/commands/init/dependencies.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,oCAAoC,CAAC;AAC/E,OAAO,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAC3D,OAAO,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAEhE,OAAO,EAAE,cAAc,EAAoB,MAAM,gCAAgC,CAAC;AAClF,OAAO,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AACzD,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAC9C,OAAO,EAAE,uBAAuB,EAAE,wBAAwB,EAAE,MAAM,+BAA+B,CAAC;AAElG,MAAM,CAAC,KAAK,UAAU,mBAAmB,CAAC,GAAW,EAAE,MAAc,EAAE,WAAyB;IAC9F,MAAM,IAAI,GAAG,WAAW,IAAI,CAAC,MAAM,cAAc,CAAC,GAAG,CAAC,CAAC,CAAC;IAExD,+EAA+E;IAC/E,6EAA6E;IAC7E,wBAAwB;IACxB,EAAE;IACF,2EAA2E;IAC3E,0EAA0E;IAC1E,uDAAuD;IACvD,MAAM,IAAI,GAAG,gBAAgB,CAC3B;QACE,cAAc;QACd,0BAA0B;QAC1B,MAAM;QACN,gBAAgB;QAChB,GAAG,e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@ -28,8 +28,8 @@ export const init = new Command()
|
|
|
28
28
|
const projectRoot = resolveProjectRoot(options.project, kind ?? detectProjectKind(projectInfo), projectInfo);
|
|
29
29
|
const isReInitializing = existsSync(path.resolve(cwd, 'components.json'));
|
|
30
30
|
const packageManager = await detectPackageManager(cwd);
|
|
31
|
-
//
|
|
32
|
-
//
|
|
31
|
+
// Before any step: the catalog is what says which icon package to install,
|
|
32
|
+
// and it comes from the registry so it does not depend on the CLI version.
|
|
33
33
|
await loadIconCatalog(getRegistryUrl());
|
|
34
34
|
const buildSteps = (config) => buildInitSteps(cwd, config, projectInfo, isReInitializing);
|
|
35
35
|
if (!isInteractive()) {
|
|
@@ -72,12 +72,12 @@ export const init = new Command()
|
|
|
72
72
|
}
|
|
73
73
|
});
|
|
74
74
|
/**
|
|
75
|
-
*
|
|
75
|
+
* Why the full screen was not mounted.
|
|
76
76
|
*
|
|
77
|
-
*
|
|
78
|
-
* interface
|
|
79
|
-
*
|
|
80
|
-
*
|
|
77
|
+
* The CLI falling back to text mode is, to whoever is watching, indistinguishable
|
|
78
|
+
* from the interface not existing — which is how the degradation on macOS and
|
|
79
|
+
* Linux went unnoticed until it turned into "it never showed up" reports. With
|
|
80
|
+
* `--debug`, the command answers for itself.
|
|
81
81
|
*/
|
|
82
82
|
function logHeadlessReason() {
|
|
83
83
|
logger.debug(`No terminal to draw on (stdin TTY: ${Boolean(process.stdin.isTTY)}, ` +
|
|
@@ -94,10 +94,10 @@ function validateAngularProject(projectInfo) {
|
|
|
94
94
|
}
|
|
95
95
|
}
|
|
96
96
|
/**
|
|
97
|
-
*
|
|
97
|
+
* The type asked for with `--type`, when there is one.
|
|
98
98
|
*
|
|
99
|
-
*
|
|
100
|
-
* init
|
|
99
|
+
* It is the answer to the wizard's first question given up front — which is what
|
|
100
|
+
* makes init usable in CI, where nobody can pick from a menu.
|
|
101
101
|
*/
|
|
102
102
|
function resolveKind(value) {
|
|
103
103
|
if (!value)
|
|
@@ -108,7 +108,7 @@ function resolveKind(value) {
|
|
|
108
108
|
}
|
|
109
109
|
return kind.value;
|
|
110
110
|
}
|
|
111
|
-
/**
|
|
111
|
+
/** The root of the project asked for with `--project`, looked up among the compatible ones. */
|
|
112
112
|
function resolveProjectRoot(name, kind, projectInfo) {
|
|
113
113
|
if (!name)
|
|
114
114
|
return undefined;
|
|
@@ -121,10 +121,10 @@ function resolveProjectRoot(name, kind, projectInfo) {
|
|
|
121
121
|
return project.root;
|
|
122
122
|
}
|
|
123
123
|
/**
|
|
124
|
-
*
|
|
124
|
+
* The path without a UI — CI, pipes and non-interactive terminals.
|
|
125
125
|
*
|
|
126
|
-
*
|
|
127
|
-
*
|
|
126
|
+
* Nobody can answer anything here, so the defaults apply and `--yes` is
|
|
127
|
+
* required: without it the CLI refuses to overwrite the project's global CSS.
|
|
128
128
|
*/
|
|
129
129
|
async function runHeadless(options) {
|
|
130
130
|
if (!options.yes) {
|
|
@@ -133,8 +133,8 @@ async function runHeadless(options) {
|
|
|
133
133
|
const kind = options.kind ?? detectProjectKind(options.projectInfo);
|
|
134
134
|
const answers = defaultAnswers(options.projectInfo, kind, options.projectRoot);
|
|
135
135
|
const cssState = await inspectCssFile(options.cwd, answers.globalCss);
|
|
136
|
-
//
|
|
137
|
-
//
|
|
136
|
+
// In a library the theme CSS is created by init, so its absence is expected;
|
|
137
|
+
// in an application the file has to be there and wired into the build.
|
|
138
138
|
if (cssState === 'missing' && !isLibraryKind(answers.kind)) {
|
|
139
139
|
throw new CliError(`CSS file not found at: ${answers.globalCss}. Run init in an interactive terminal to choose another path.`, 'CSS_NOT_FOUND');
|
|
140
140
|
}
|
|
@@ -165,11 +165,11 @@ function reportSuccess(config, steps, logs) {
|
|
|
165
165
|
});
|
|
166
166
|
}
|
|
167
167
|
/**
|
|
168
|
-
*
|
|
168
|
+
* What is still left to do by hand.
|
|
169
169
|
*
|
|
170
|
-
*
|
|
171
|
-
*
|
|
172
|
-
*
|
|
170
|
+
* In a library init has nowhere to register `provideZard()` and no way to import
|
|
171
|
+
* the tokens — both belong to the app consuming the library, and without this
|
|
172
|
+
* notice the user only finds out when the components do not render.
|
|
173
173
|
*/
|
|
174
174
|
function nextStepsFor(config) {
|
|
175
175
|
if (!isLibraryKind(config.projectType)) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/commands/init/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,uCAAuC,CAAC;AACpG,OAAO,EACL,iBAAiB,EACjB,iBAAiB,EACjB,aAAa,EACb,aAAa,GAEd,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EAAE,cAAc,EAAiB,MAAM,6BAA6B,CAAC;AAC5E,OAAO,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;AAC7D,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,oBAAoB,EAAkB,MAAM,kBAAkB,CAAC;AAEpG,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAChD,OAAO,EAAE,cAAc,EAAoB,MAAM,gCAAgC,CAAC;AAClF,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAC7D,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EAAE,oBAAoB,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AACtF,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAElC,MAAM,CAAC,MAAM,IAAI,GAAG,IAAI,OAAO,EAAE;KAC9B,IAAI,CAAC,MAAM,CAAC;KACZ,WAAW,CAAC,kDAAkD,CAAC;KAC/D,MAAM,CAAC,WAAW,EAAE,2BAA2B,EA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A0B;IAC3F,WAAW,CAAC;QACV,MAAM,EAAE,SAAS;QACjB,QAAQ,EAAE,4CAA4C;QACtD,KAAK,EAAE,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,KAAK,MAAM,IAAI,CAAC,IAAI,EAAE,CAAC;QACxD,KAAK,EAAE,YAAY,CAAC,MAAM,CAAC;QAC3B,QAAQ,EAAE,CAAC,EAAE,OAAO,EAAE,GAAG,eAAe,CAAC,MAAM,CAAC,cAAc,CAAC,eAAe,EAAE,QAAQ,EAAE,aAAa,EAAE,CAAC;QAC1G,IAAI;KACL,CAAC,CAAC;AACL,CAAC;AAED;;;;;;GAMG;AACH,SAAS,YAAY,CAAC,MAAc;IAClC,IAAI,CAAC,aAAa,CAAC,MAAM,CAAC,WAAW,CAAC,EAAE,CAAC;QACvC,OAAO,CAAC,mCAAmC,CAAC,CAAC;IAC/C,CAAC;IAED,OAAO;QACL,8EAA8E;QAC9E,mDAAmD,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,QAAQ,CAAC,GAAG,CAAC,GAAG;QACxF,EAAE;QACF,mCAAmC;KACpC,CAAC;AACJ,CAAC"}
|
|
@@ -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,QAAQ,CAAC;AAEzF,MAAM,WAAW,iBAAiB;IAChC,QAAQ,CAAC,KAAK,EAAE,WAAW,CAAC;IAC5B,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,
|
|
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,QAAQ,CAAC;AAEzF,MAAM,WA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
|
@@ -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
|
{
|
|
@@ -68,11 +68,11 @@ const TRAITS = {
|
|
|
68
68
|
export function isLibraryKind(kind) {
|
|
69
69
|
return TRAITS[kind].isLibrary;
|
|
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;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;K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AC,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"}
|
package/commands/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":"AAQA,OAAO,EAAsB,KAAK,MAAM,EAAE,MAAM,sBAAsB,CAAC;AACvE,OAAO,EAAE,KAAK,WAAW,EAAE,MAAM,gCAAgC,CAAC;AAOlE
|
|
1
|
+
{"version":3,"file":"steps.d.ts","sourceRoot":"","sources":["../../../src/commands/init/steps.ts"],"names":[],"mappings":"AAQA,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,CA6DZ"}
|