@angular/cli 14.0.0-next.1 → 14.0.0-next.10
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/bin/ng.js +3 -5
- package/lib/cli/index.d.ts +1 -2
- package/lib/cli/index.js +16 -45
- package/lib/config/schema.json +30 -15
- package/lib/config/workspace-schema.d.ts +6 -1
- package/lib/init.js +10 -9
- package/package.json +21 -23
- package/{models → src/analytics}/analytics-collector.d.ts +0 -0
- package/{models → src/analytics}/analytics-collector.js +8 -2
- package/src/analytics/analytics.d.ts +47 -0
- package/src/analytics/analytics.js +306 -0
- package/src/command-builder/architect-base-command-module.d.ts +30 -0
- package/src/command-builder/architect-base-command-module.js +165 -0
- package/src/command-builder/architect-command-module.d.ts +25 -0
- package/src/command-builder/architect-command-module.js +134 -0
- package/src/command-builder/command-module.d.ts +89 -0
- package/src/command-builder/command-module.js +198 -0
- package/{utilities/package-json.js → src/command-builder/command-runner.d.ts} +2 -2
- package/src/command-builder/command-runner.js +168 -0
- package/src/command-builder/schematics-command-module.d.ts +43 -0
- package/src/command-builder/schematics-command-module.js +333 -0
- package/src/command-builder/utilities/command.d.ts +13 -0
- package/src/command-builder/utilities/command.js +27 -0
- package/src/command-builder/utilities/json-help.d.ts +36 -0
- package/src/command-builder/utilities/json-help.js +94 -0
- package/src/command-builder/utilities/json-schema.d.ts +40 -0
- package/{utilities → src/command-builder/utilities}/json-schema.js +20 -121
- package/src/command-builder/utilities/normalize-options-middleware.d.ts +18 -0
- package/src/command-builder/utilities/normalize-options-middleware.js +59 -0
- package/{models → src/command-builder/utilities}/schematic-engine-host.d.ts +2 -2
- package/{models → src/command-builder/utilities}/schematic-engine-host.js +30 -17
- package/src/command-builder/utilities/schematic-workflow.d.ts +14 -0
- package/src/command-builder/utilities/schematic-workflow.js +68 -0
- package/src/commands/add/cli.d.ts +33 -0
- package/{commands/add-impl.js → src/commands/add/cli.js} +108 -80
- package/src/commands/add/long-description.md +7 -0
- package/src/commands/analytics/cli.d.ts +16 -0
- package/src/commands/analytics/cli.js +35 -0
- package/src/commands/analytics/info/cli.d.ts +16 -0
- package/src/commands/analytics/info/cli.js +26 -0
- package/src/commands/analytics/settings/cli.d.ts +35 -0
- package/src/commands/analytics/settings/cli.js +61 -0
- package/src/commands/build/cli.d.ts +16 -0
- package/src/commands/build/cli.js +23 -0
- package/{commands/build-long.md → src/commands/build/long-description.md} +0 -0
- package/src/commands/cache/clean/cli.d.ts +17 -0
- package/src/commands/cache/clean/cli.js +32 -0
- package/src/commands/cache/cli.d.ts +17 -0
- package/src/commands/cache/cli.js +38 -0
- package/src/commands/cache/info/cli.d.ts +20 -0
- package/src/commands/cache/info/cli.js +82 -0
- package/src/commands/cache/long-description.md +53 -0
- package/src/commands/cache/settings/cli.d.ts +27 -0
- package/src/commands/cache/settings/cli.js +42 -0
- package/src/commands/cache/utilities.d.ts +11 -0
- package/src/commands/cache/utilities.js +49 -0
- package/src/commands/completion/cli.d.ts +16 -0
- package/src/commands/completion/cli.js +31 -0
- package/src/commands/completion/long-description.md +1 -0
- package/src/commands/config/cli.d.ts +24 -0
- package/{commands/config-impl.js → src/commands/config/cli.js} +102 -89
- package/{commands/config-long.md → src/commands/config/long-description.md} +2 -2
- package/src/commands/deploy/cli.d.ts +17 -0
- package/src/commands/deploy/cli.js +49 -0
- package/{commands/deploy-long.md → src/commands/deploy/long-description.md} +0 -0
- package/src/commands/doc/cli.d.ts +23 -0
- package/{commands/doc-impl.js → src/commands/doc/cli.js} +41 -12
- package/src/commands/e2e/cli.d.ts +18 -0
- package/src/commands/e2e/cli.js +35 -0
- package/src/commands/extract-i18n/cli.d.ts +15 -0
- package/src/commands/extract-i18n/cli.js +20 -0
- package/src/commands/generate/cli.d.ts +39 -0
- package/src/commands/generate/cli.js +145 -0
- package/src/commands/lint/cli.d.ts +17 -0
- package/src/commands/lint/cli.js +28 -0
- package/{commands/lint-long.md → src/commands/lint/long-description.md} +0 -0
- package/src/commands/make-this-awesome/cli.d.ts +17 -0
- package/{commands/easter-egg-impl.js → src/commands/make-this-awesome/cli.js} +17 -10
- package/src/commands/new/cli.d.ts +27 -0
- package/src/commands/new/cli.js +82 -0
- package/src/commands/run/cli.d.ts +25 -0
- package/src/commands/run/cli.js +83 -0
- package/{commands/run-long.md → src/commands/run/long-description.md} +0 -0
- package/src/commands/serve/cli.d.ts +16 -0
- package/src/commands/serve/cli.js +21 -0
- package/src/commands/test/cli.d.ts +16 -0
- package/src/commands/test/cli.js +23 -0
- package/{commands/test-long.md → src/commands/test/long-description.md} +0 -0
- package/{commands/update-impl.d.ts → src/commands/update/cli.d.ts} +26 -9
- package/{commands/update-impl.js → src/commands/update/cli.js} +363 -316
- package/{commands/update-long.md → src/commands/update/long-description.md} +0 -0
- package/src/commands/update/schematic/index.js +33 -20
- package/src/commands/version/cli.d.ts +18 -0
- package/{commands/version-impl.js → src/commands/version/cli.js} +56 -74
- package/src/typings-bazel.d.ts +14 -0
- package/src/typings.d.ts +1 -14
- package/{utilities → src/utilities}/color.d.ts +0 -0
- package/{utilities → src/utilities}/color.js +5 -1
- package/{utilities → src/utilities}/config.d.ts +6 -5
- package/{utilities → src/utilities}/config.js +33 -19
- package/src/utilities/environment-options.d.ts +12 -0
- package/src/utilities/environment-options.js +24 -0
- package/{utilities → src/utilities}/find-up.d.ts +0 -0
- package/{utilities → src/utilities}/find-up.js +5 -1
- package/{utilities → src/utilities}/json-file.d.ts +0 -0
- package/{utilities → src/utilities}/json-file.js +1 -0
- package/{utilities → src/utilities}/log-file.d.ts +0 -0
- package/{utilities → src/utilities}/log-file.js +0 -0
- package/src/utilities/memoize.d.ts +15 -0
- package/src/utilities/memoize.js +69 -0
- package/src/utilities/package-manager.d.ts +41 -0
- package/src/utilities/package-manager.js +287 -0
- package/{utilities → src/utilities}/package-metadata.d.ts +15 -37
- package/{utilities → src/utilities}/package-metadata.js +15 -27
- package/{utilities → src/utilities}/package-tree.d.ts +2 -2
- package/{utilities → src/utilities}/package-tree.js +5 -1
- package/{utilities → src/utilities}/project.d.ts +0 -0
- package/{utilities → src/utilities}/project.js +5 -1
- package/{utilities → src/utilities}/prompt.d.ts +2 -0
- package/{utilities → src/utilities}/prompt.js +25 -4
- package/{utilities → src/utilities}/spinner.d.ts +0 -0
- package/{utilities → src/utilities}/spinner.js +0 -0
- package/{utilities → src/utilities}/tty.d.ts +0 -0
- package/{utilities → src/utilities}/tty.js +0 -0
- package/{models → src/utilities}/version.d.ts +2 -1
- package/{models → src/utilities}/version.js +6 -6
- package/bin/postinstall/analytics-prompt.js +0 -27
- package/bin/postinstall/script.js +0 -16
- package/commands/add-impl.d.ts +0 -21
- package/commands/add.d.ts +0 -42
- package/commands/add.js +0 -10
- package/commands/add.json +0 -54
- package/commands/add.md +0 -10
- package/commands/analytics-impl.d.ts +0 -13
- package/commands/analytics-impl.js +0 -80
- package/commands/analytics-long.md +0 -8
- package/commands/analytics.d.ts +0 -46
- package/commands/analytics.js +0 -31
- package/commands/analytics.json +0 -37
- package/commands/build-impl.d.ts +0 -14
- package/commands/build-impl.js +0 -21
- package/commands/build.d.ts +0 -30
- package/commands/build.js +0 -10
- package/commands/build.json +0 -16
- package/commands/config-impl.d.ts +0 -15
- package/commands/config.d.ts +0 -34
- package/commands/config.js +0 -10
- package/commands/config.json +0 -43
- package/commands/definitions.json +0 -66
- package/commands/deploy-impl.d.ts +0 -15
- package/commands/deploy-impl.js +0 -36
- package/commands/deploy.d.ts +0 -30
- package/commands/deploy.js +0 -10
- package/commands/deploy.json +0 -34
- package/commands/doc-impl.d.ts +0 -13
- package/commands/doc.d.ts +0 -39
- package/commands/doc.js +0 -14
- package/commands/doc.json +0 -46
- package/commands/e2e-impl.d.ts +0 -16
- package/commands/e2e-impl.js +0 -36
- package/commands/e2e-long.md +0 -4
- package/commands/e2e.d.ts +0 -29
- package/commands/e2e.js +0 -10
- package/commands/e2e.json +0 -17
- package/commands/easter-egg-impl.d.ts +0 -12
- package/commands/easter-egg.d.ts +0 -14
- package/commands/easter-egg.js +0 -10
- package/commands/easter-egg.json +0 -12
- package/commands/extract-i18n-impl.d.ts +0 -14
- package/commands/extract-i18n-impl.js +0 -32
- package/commands/extract-i18n.d.ts +0 -29
- package/commands/extract-i18n.js +0 -10
- package/commands/extract-i18n.json +0 -17
- package/commands/generate-impl.d.ts +0 -18
- package/commands/generate-impl.js +0 -89
- package/commands/generate.d.ts +0 -37
- package/commands/generate.js +0 -10
- package/commands/generate.json +0 -31
- package/commands/help-impl.d.ts +0 -12
- package/commands/help-impl.js +0 -26
- package/commands/help-long.md +0 -7
- package/commands/help.d.ts +0 -17
- package/commands/help.js +0 -10
- package/commands/help.json +0 -13
- package/commands/lint-impl.d.ts +0 -16
- package/commands/lint-impl.js +0 -69
- package/commands/lint.d.ts +0 -29
- package/commands/lint.js +0 -10
- package/commands/lint.json +0 -36
- package/commands/new-impl.d.ts +0 -16
- package/commands/new-impl.js +0 -37
- package/commands/new.d.ts +0 -41
- package/commands/new.js +0 -10
- package/commands/new.json +0 -34
- package/commands/new.md +0 -16
- package/commands/run-impl.d.ts +0 -13
- package/commands/run-impl.js +0 -22
- package/commands/run.d.ts +0 -30
- package/commands/run.js +0 -10
- package/commands/run.json +0 -36
- package/commands/serve-impl.d.ts +0 -15
- package/commands/serve-impl.js +0 -24
- package/commands/serve.d.ts +0 -29
- package/commands/serve.js +0 -10
- package/commands/serve.json +0 -17
- package/commands/test-impl.d.ts +0 -15
- package/commands/test-impl.js +0 -22
- package/commands/test.d.ts +0 -29
- package/commands/test.js +0 -10
- package/commands/test.json +0 -17
- package/commands/update.d.ts +0 -61
- package/commands/update.js +0 -10
- package/commands/update.json +0 -78
- package/commands/version-impl.d.ts +0 -17
- package/commands/version.d.ts +0 -17
- package/commands/version.js +0 -10
- package/commands/version.json +0 -13
- package/commands.json +0 -20
- package/models/analytics.d.ts +0 -58
- package/models/analytics.js +0 -358
- package/models/architect-command.d.ts +0 -35
- package/models/architect-command.js +0 -364
- package/models/command-runner.d.ts +0 -24
- package/models/command-runner.js +0 -241
- package/models/command.d.ts +0 -34
- package/models/command.js +0 -143
- package/models/interface.d.ts +0 -196
- package/models/interface.js +0 -31
- package/models/parser.d.ts +0 -39
- package/models/parser.js +0 -349
- package/models/schematic-command.d.ts +0 -55
- package/models/schematic-command.js +0 -485
- package/utilities/INITIAL_COMMIT_MESSAGE.txt +0 -8
- package/utilities/install-package.d.ts +0 -16
- package/utilities/install-package.js +0 -193
- package/utilities/json-schema.d.ts +0 -17
- package/utilities/package-json.d.ts +0 -249
- package/utilities/package-manager.d.ts +0 -13
- package/utilities/package-manager.js +0 -106
package/bin/ng.js
CHANGED
|
@@ -36,19 +36,17 @@ if (version[0] % 2 === 1 && version[0] > 16) {
|
|
|
36
36
|
|
|
37
37
|
require('./bootstrap');
|
|
38
38
|
} else if (
|
|
39
|
-
version[0] <
|
|
40
|
-
version[0] === 13 ||
|
|
39
|
+
version[0] < 14 ||
|
|
41
40
|
version[0] === 15 ||
|
|
42
|
-
(version[0] === 12 && version[1] < 20) ||
|
|
43
41
|
(version[0] === 14 && version[1] < 15) ||
|
|
44
42
|
(version[0] === 16 && version[1] < 10)
|
|
45
43
|
) {
|
|
46
|
-
// Error and exit if less than
|
|
44
|
+
// Error and exit if less than 14.15 or 15.x or less than 16.10
|
|
47
45
|
console.error(
|
|
48
46
|
'Node.js version ' +
|
|
49
47
|
process.version +
|
|
50
48
|
' detected.\n' +
|
|
51
|
-
'The Angular CLI requires a minimum Node.js version of either
|
|
49
|
+
'The Angular CLI requires a minimum Node.js version of either v14.15, or v16.10.\n\n' +
|
|
52
50
|
'Please update your Node.js version or visit https://nodejs.org/ for additional instructions.\n',
|
|
53
51
|
);
|
|
54
52
|
|
package/lib/cli/index.d.ts
CHANGED
|
@@ -5,8 +5,7 @@
|
|
|
5
5
|
* Use of this source code is governed by an MIT-style license that can be
|
|
6
6
|
* found in the LICENSE file at https://angular.io/license
|
|
7
7
|
*/
|
|
8
|
-
export { VERSION
|
|
8
|
+
export { VERSION } from '../../src/utilities/version';
|
|
9
9
|
export default function (options: {
|
|
10
|
-
testing?: boolean;
|
|
11
10
|
cliArgs: string[];
|
|
12
11
|
}): Promise<number>;
|
package/lib/cli/index.js
CHANGED
|
@@ -7,30 +7,27 @@
|
|
|
7
7
|
* found in the LICENSE file at https://angular.io/license
|
|
8
8
|
*/
|
|
9
9
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
-
exports.
|
|
10
|
+
exports.VERSION = void 0;
|
|
11
11
|
const node_1 = require("@angular-devkit/core/node");
|
|
12
12
|
const util_1 = require("util");
|
|
13
|
-
const
|
|
14
|
-
const
|
|
15
|
-
const
|
|
16
|
-
const
|
|
17
|
-
const
|
|
18
|
-
var version_1 = require("../../
|
|
13
|
+
const command_module_1 = require("../../src/command-builder/command-module");
|
|
14
|
+
const command_runner_1 = require("../../src/command-builder/command-runner");
|
|
15
|
+
const color_1 = require("../../src/utilities/color");
|
|
16
|
+
const environment_options_1 = require("../../src/utilities/environment-options");
|
|
17
|
+
const log_file_1 = require("../../src/utilities/log-file");
|
|
18
|
+
var version_1 = require("../../src/utilities/version");
|
|
19
19
|
Object.defineProperty(exports, "VERSION", { enumerable: true, get: function () { return version_1.VERSION; } });
|
|
20
|
-
Object.defineProperty(exports, "Version", { enumerable: true, get: function () { return version_1.Version; } });
|
|
21
|
-
const debugEnv = process.env['NG_DEBUG'];
|
|
22
|
-
const isDebug = debugEnv !== undefined && debugEnv !== '0' && debugEnv.toLowerCase() !== 'false';
|
|
23
20
|
/* eslint-disable no-console */
|
|
24
21
|
async function default_1(options) {
|
|
25
22
|
// This node version check ensures that the requirements of the project instance of the CLI are met
|
|
26
|
-
const
|
|
27
|
-
if (
|
|
23
|
+
const [major, minor] = process.versions.node.split('.').map((part) => Number(part));
|
|
24
|
+
if (major < 14 || (major === 14 && minor < 15)) {
|
|
28
25
|
process.stderr.write(`Node.js version ${process.version} detected.\n` +
|
|
29
|
-
'The Angular CLI requires a minimum
|
|
26
|
+
'The Angular CLI requires a minimum v14.15.\n\n' +
|
|
30
27
|
'Please update your Node.js version or visit https://nodejs.org/ for additional instructions.\n');
|
|
31
28
|
return 3;
|
|
32
29
|
}
|
|
33
|
-
const logger = (0, node_1.createConsoleLogger)(
|
|
30
|
+
const logger = (0, node_1.createConsoleLogger)(environment_options_1.ngDebug, process.stdout, process.stderr, {
|
|
34
31
|
info: (s) => (color_1.colors.enabled ? s : (0, color_1.removeColor)(s)),
|
|
35
32
|
debug: (s) => (color_1.colors.enabled ? s : (0, color_1.removeColor)(s)),
|
|
36
33
|
warn: (s) => (color_1.colors.enabled ? color_1.colors.bold.yellow(s) : (0, color_1.removeColor)(s)),
|
|
@@ -47,35 +44,14 @@ async function default_1(options) {
|
|
|
47
44
|
console.error = function (...args) {
|
|
48
45
|
logger.error((0, util_1.format)(...args));
|
|
49
46
|
};
|
|
50
|
-
let workspace;
|
|
51
|
-
const workspaceFile = (0, project_1.findWorkspaceFile)();
|
|
52
|
-
if (workspaceFile === null) {
|
|
53
|
-
const [, localPath] = (0, config_1.getWorkspaceRaw)('local');
|
|
54
|
-
if (localPath !== null) {
|
|
55
|
-
logger.fatal(`An invalid configuration file was found ['${localPath}'].` +
|
|
56
|
-
' Please delete the file before running the command.');
|
|
57
|
-
return 1;
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
else {
|
|
61
|
-
try {
|
|
62
|
-
workspace = await config_1.AngularWorkspace.load(workspaceFile);
|
|
63
|
-
}
|
|
64
|
-
catch (e) {
|
|
65
|
-
logger.fatal(`Unable to read workspace file '${workspaceFile}': ${e.message}`);
|
|
66
|
-
return 1;
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
47
|
try {
|
|
70
|
-
|
|
71
|
-
if (typeof maybeExitCode === 'number') {
|
|
72
|
-
console.assert(Number.isInteger(maybeExitCode));
|
|
73
|
-
return maybeExitCode;
|
|
74
|
-
}
|
|
75
|
-
return 0;
|
|
48
|
+
return await (0, command_runner_1.runCommand)(options.cliArgs, logger);
|
|
76
49
|
}
|
|
77
50
|
catch (err) {
|
|
78
|
-
if (err instanceof
|
|
51
|
+
if (err instanceof command_module_1.CommandModuleError) {
|
|
52
|
+
logger.fatal(`Error: ${err.message}`);
|
|
53
|
+
}
|
|
54
|
+
else if (err instanceof Error) {
|
|
79
55
|
try {
|
|
80
56
|
const logPath = (0, log_file_1.writeErrorToLogFile)(err);
|
|
81
57
|
logger.fatal(`An unhandled exception occurred: ${err.message}\n` +
|
|
@@ -99,11 +75,6 @@ async function default_1(options) {
|
|
|
99
75
|
else {
|
|
100
76
|
logger.fatal('An unexpected error occurred: ' + JSON.stringify(err));
|
|
101
77
|
}
|
|
102
|
-
if (options.testing) {
|
|
103
|
-
// eslint-disable-next-line no-debugger
|
|
104
|
-
debugger;
|
|
105
|
-
throw err;
|
|
106
|
-
}
|
|
107
78
|
return 1;
|
|
108
79
|
}
|
|
109
80
|
}
|
package/lib/config/schema.json
CHANGED
|
@@ -22,7 +22,8 @@
|
|
|
22
22
|
},
|
|
23
23
|
"defaultProject": {
|
|
24
24
|
"type": "string",
|
|
25
|
-
"description": "Default project name used in commands."
|
|
25
|
+
"description": "Default project name used in commands.",
|
|
26
|
+
"x-deprecated": "The project to use will be determined from the current working directory."
|
|
26
27
|
},
|
|
27
28
|
"projects": {
|
|
28
29
|
"type": "object",
|
|
@@ -44,7 +45,16 @@
|
|
|
44
45
|
"properties": {
|
|
45
46
|
"defaultCollection": {
|
|
46
47
|
"description": "The default schematics collection to use.",
|
|
47
|
-
"type": "string"
|
|
48
|
+
"type": "string",
|
|
49
|
+
"x-deprecated": "Use 'schematicCollections' instead."
|
|
50
|
+
},
|
|
51
|
+
"schematicCollections": {
|
|
52
|
+
"type": "array",
|
|
53
|
+
"description": "The list of schematic collections to use.",
|
|
54
|
+
"items": {
|
|
55
|
+
"type": "string",
|
|
56
|
+
"uniqueItems": true
|
|
57
|
+
}
|
|
48
58
|
},
|
|
49
59
|
"packageManager": {
|
|
50
60
|
"description": "Specify which package manager tool to use.",
|
|
@@ -175,7 +185,16 @@
|
|
|
175
185
|
"cli": {
|
|
176
186
|
"defaultCollection": {
|
|
177
187
|
"description": "The default schematics collection to use.",
|
|
178
|
-
"type": "string"
|
|
188
|
+
"type": "string",
|
|
189
|
+
"x-deprecated": "Use 'schematicCollections' instead."
|
|
190
|
+
},
|
|
191
|
+
"schematicCollections": {
|
|
192
|
+
"type": "array",
|
|
193
|
+
"description": "The list of schematic collections to use.",
|
|
194
|
+
"items": {
|
|
195
|
+
"type": "string",
|
|
196
|
+
"uniqueItems": true
|
|
197
|
+
}
|
|
179
198
|
}
|
|
180
199
|
},
|
|
181
200
|
"schematics": {
|
|
@@ -586,7 +605,7 @@
|
|
|
586
605
|
"SchematicsAngularApplicationSchema": {
|
|
587
606
|
"title": "Angular Application Options Schema",
|
|
588
607
|
"type": "object",
|
|
589
|
-
"description": "Generates a new basic
|
|
608
|
+
"description": "Generates a new basic application definition in the \"projects\" subfolder of the workspace.",
|
|
590
609
|
"additionalProperties": false,
|
|
591
610
|
"properties": {
|
|
592
611
|
"projectRoot": {
|
|
@@ -741,8 +760,7 @@
|
|
|
741
760
|
},
|
|
742
761
|
"type": {
|
|
743
762
|
"type": "string",
|
|
744
|
-
"description": "Adds a developer-defined type to the filename, in the format \"name.type.ts\"."
|
|
745
|
-
"default": ""
|
|
763
|
+
"description": "Adds a developer-defined type to the filename, in the format \"name.type.ts\"."
|
|
746
764
|
}
|
|
747
765
|
}
|
|
748
766
|
},
|
|
@@ -1129,7 +1147,6 @@
|
|
|
1129
1147
|
},
|
|
1130
1148
|
"prefix": {
|
|
1131
1149
|
"type": "string",
|
|
1132
|
-
"default": "",
|
|
1133
1150
|
"description": "A prefix to apply to generated selectors."
|
|
1134
1151
|
},
|
|
1135
1152
|
"type": {
|
|
@@ -1526,12 +1543,12 @@
|
|
|
1526
1543
|
"properties": {
|
|
1527
1544
|
"browserTarget": {
|
|
1528
1545
|
"type": "string",
|
|
1529
|
-
"description": "A browser builder target use for rendering the
|
|
1546
|
+
"description": "A browser builder target use for rendering the application shell in the format of `project:target[:configuration]`. You can also pass in more than one configuration name as a comma-separated list. Example: `project:target:production,staging`.",
|
|
1530
1547
|
"pattern": "^[^:\\s]+:[^:\\s]+(:[^\\s]+)?$"
|
|
1531
1548
|
},
|
|
1532
1549
|
"serverTarget": {
|
|
1533
1550
|
"type": "string",
|
|
1534
|
-
"description": "A server builder target use for rendering the
|
|
1551
|
+
"description": "A server builder target use for rendering the application shell in the format of `project:target[:configuration]`. You can also pass in more than one configuration name as a comma-separated list. Example: `project:target:production,staging`.",
|
|
1535
1552
|
"pattern": "^[^:\\s]+:[^:\\s]+(:[^\\s]+)?$"
|
|
1536
1553
|
},
|
|
1537
1554
|
"appModuleBundle": {
|
|
@@ -1751,12 +1768,11 @@
|
|
|
1751
1768
|
},
|
|
1752
1769
|
"outputPath": {
|
|
1753
1770
|
"type": "string",
|
|
1754
|
-
"description": "The full path for the new output directory, relative to the current workspace.\
|
|
1771
|
+
"description": "The full path for the new output directory, relative to the current workspace.\nBy default, writes output to a folder named dist/ in the current project."
|
|
1755
1772
|
},
|
|
1756
1773
|
"resourcesOutputPath": {
|
|
1757
1774
|
"type": "string",
|
|
1758
|
-
"description": "The path where style resources will be placed, relative to outputPath."
|
|
1759
|
-
"default": ""
|
|
1775
|
+
"description": "The path where style resources will be placed, relative to outputPath."
|
|
1760
1776
|
},
|
|
1761
1777
|
"aot": {
|
|
1762
1778
|
"type": "boolean",
|
|
@@ -2186,7 +2202,7 @@
|
|
|
2186
2202
|
},
|
|
2187
2203
|
"servePath": {
|
|
2188
2204
|
"type": "string",
|
|
2189
|
-
"description": "The pathname where the
|
|
2205
|
+
"description": "The pathname where the application will be served."
|
|
2190
2206
|
},
|
|
2191
2207
|
"disableHostCheck": {
|
|
2192
2208
|
"type": "boolean",
|
|
@@ -2664,8 +2680,7 @@
|
|
|
2664
2680
|
},
|
|
2665
2681
|
"resourcesOutputPath": {
|
|
2666
2682
|
"type": "string",
|
|
2667
|
-
"description": "The path where style resources will be placed, relative to outputPath."
|
|
2668
|
-
"default": ""
|
|
2683
|
+
"description": "The path where style resources will be placed, relative to outputPath."
|
|
2669
2684
|
},
|
|
2670
2685
|
"sourceMap": {
|
|
2671
2686
|
"description": "Output source maps for scripts and styles. For more information, see https://angular.io/guide/workspace-config#source-map-configuration.",
|
|
@@ -3,6 +3,7 @@ export interface Schema {
|
|
|
3
3
|
cli?: CliOptions;
|
|
4
4
|
/**
|
|
5
5
|
* Default project name used in commands.
|
|
6
|
+
* @deprecated The project to use will be determined from the current working directory.
|
|
6
7
|
*/
|
|
7
8
|
defaultProject?: string;
|
|
8
9
|
/**
|
|
@@ -31,6 +32,10 @@ export interface CliOptions {
|
|
|
31
32
|
* Specify which package manager tool to use.
|
|
32
33
|
*/
|
|
33
34
|
packageManager?: PackageManager;
|
|
35
|
+
/**
|
|
36
|
+
* The list of schematic collections to use.
|
|
37
|
+
*/
|
|
38
|
+
schematicCollections?: string[];
|
|
34
39
|
/**
|
|
35
40
|
* Control CLI specific console warnings
|
|
36
41
|
*/
|
|
@@ -114,7 +119,7 @@ export interface SchematicOptions {
|
|
|
114
119
|
"@schematics/angular:web-worker"?: AngularWebWorkerOptionsSchema;
|
|
115
120
|
}
|
|
116
121
|
/**
|
|
117
|
-
* Generates a new basic
|
|
122
|
+
* Generates a new basic application definition in the "projects" subfolder of the workspace.
|
|
118
123
|
*/
|
|
119
124
|
export interface AngularApplicationOptionsSchema {
|
|
120
125
|
/**
|
package/lib/init.js
CHANGED
|
@@ -8,7 +8,11 @@
|
|
|
8
8
|
*/
|
|
9
9
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
10
10
|
if (k2 === undefined) k2 = k;
|
|
11
|
-
Object.
|
|
11
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
12
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
13
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
14
|
+
}
|
|
15
|
+
Object.defineProperty(o, k2, desc);
|
|
12
16
|
}) : (function(o, m, k, k2) {
|
|
13
17
|
if (k2 === undefined) k2 = k;
|
|
14
18
|
o[k2] = m[k];
|
|
@@ -31,9 +35,10 @@ require("symbol-observable");
|
|
|
31
35
|
const fs_1 = require("fs");
|
|
32
36
|
const path = __importStar(require("path"));
|
|
33
37
|
const semver_1 = require("semver");
|
|
34
|
-
const
|
|
35
|
-
const
|
|
36
|
-
const
|
|
38
|
+
const color_1 = require("../src/utilities/color");
|
|
39
|
+
const config_1 = require("../src/utilities/config");
|
|
40
|
+
const environment_options_1 = require("../src/utilities/environment-options");
|
|
41
|
+
const version_1 = require("../src/utilities/version");
|
|
37
42
|
(async () => {
|
|
38
43
|
var _a;
|
|
39
44
|
/**
|
|
@@ -43,15 +48,11 @@ const config_1 = require("../utilities/config");
|
|
|
43
48
|
* See: https://github.com/browserslist/browserslist/blob/819c4337456996d19db6ba953014579329e9c6e1/node.js#L324
|
|
44
49
|
*/
|
|
45
50
|
process.env.BROWSERSLIST_IGNORE_OLD_DATA = '1';
|
|
46
|
-
const disableVersionCheckEnv = process.env['NG_DISABLE_VERSION_CHECK'];
|
|
47
51
|
/**
|
|
48
52
|
* Disable CLI version mismatch checks and forces usage of the invoked CLI
|
|
49
53
|
* instead of invoking the local installed version.
|
|
50
54
|
*/
|
|
51
|
-
|
|
52
|
-
disableVersionCheckEnv !== '0' &&
|
|
53
|
-
disableVersionCheckEnv.toLowerCase() !== 'false';
|
|
54
|
-
if (disableVersionCheck) {
|
|
55
|
+
if (environment_options_1.disableVersionCheck) {
|
|
55
56
|
return (await Promise.resolve().then(() => __importStar(require('./cli')))).default;
|
|
56
57
|
}
|
|
57
58
|
let cli;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@angular/cli",
|
|
3
|
-
"version": "14.0.0-next.
|
|
3
|
+
"version": "14.0.0-next.10",
|
|
4
4
|
"description": "CLI tool for Angular",
|
|
5
5
|
"main": "lib/cli/index.js",
|
|
6
6
|
"bin": {
|
|
@@ -14,9 +14,6 @@
|
|
|
14
14
|
"Angular DevKit",
|
|
15
15
|
"angular-cli"
|
|
16
16
|
],
|
|
17
|
-
"scripts": {
|
|
18
|
-
"postinstall": "node ./bin/postinstall/script.js"
|
|
19
|
-
},
|
|
20
17
|
"repository": {
|
|
21
18
|
"type": "git",
|
|
22
19
|
"url": "https://github.com/angular/angular-cli.git"
|
|
@@ -28,39 +25,40 @@
|
|
|
28
25
|
},
|
|
29
26
|
"homepage": "https://github.com/angular/angular-cli",
|
|
30
27
|
"dependencies": {
|
|
31
|
-
"@angular-devkit/architect": "0.1400.0-next.
|
|
32
|
-
"@angular-devkit/core": "14.0.0-next.
|
|
33
|
-
"@angular-devkit/schematics": "14.0.0-next.
|
|
34
|
-
"@schematics/angular": "14.0.0-next.
|
|
28
|
+
"@angular-devkit/architect": "0.1400.0-next.10",
|
|
29
|
+
"@angular-devkit/core": "14.0.0-next.10",
|
|
30
|
+
"@angular-devkit/schematics": "14.0.0-next.10",
|
|
31
|
+
"@schematics/angular": "14.0.0-next.10",
|
|
35
32
|
"@yarnpkg/lockfile": "1.1.0",
|
|
36
33
|
"ansi-colors": "4.1.1",
|
|
37
|
-
"debug": "4.3.
|
|
38
|
-
"ini": "
|
|
39
|
-
"inquirer": "8.2.
|
|
34
|
+
"debug": "4.3.4",
|
|
35
|
+
"ini": "3.0.0",
|
|
36
|
+
"inquirer": "8.2.2",
|
|
40
37
|
"jsonc-parser": "3.0.0",
|
|
41
|
-
"npm-package-arg": "
|
|
42
|
-
"npm-pick-manifest": "
|
|
38
|
+
"npm-package-arg": "9.0.2",
|
|
39
|
+
"npm-pick-manifest": "7.0.1",
|
|
43
40
|
"open": "8.4.0",
|
|
44
41
|
"ora": "5.4.1",
|
|
45
|
-
"pacote": "
|
|
42
|
+
"pacote": "13.1.1",
|
|
46
43
|
"resolve": "1.22.0",
|
|
47
|
-
"semver": "7.3.
|
|
44
|
+
"semver": "7.3.7",
|
|
48
45
|
"symbol-observable": "4.0.0",
|
|
49
|
-
"uuid": "8.3.2"
|
|
46
|
+
"uuid": "8.3.2",
|
|
47
|
+
"yargs": "17.4.1"
|
|
50
48
|
},
|
|
51
49
|
"ng-update": {
|
|
52
50
|
"migrations": "@schematics/angular/migrations/migration-collection.json",
|
|
53
51
|
"packageGroup": {
|
|
54
|
-
"@angular/cli": "14.0.0-next.
|
|
55
|
-
"@angular-devkit/architect": "0.1400.0-next.
|
|
56
|
-
"@angular-devkit/build-angular": "14.0.0-next.
|
|
57
|
-
"@angular-devkit/build-webpack": "0.1400.0-next.
|
|
58
|
-
"@angular-devkit/core": "14.0.0-next.
|
|
59
|
-
"@angular-devkit/schematics": "14.0.0-next.
|
|
52
|
+
"@angular/cli": "14.0.0-next.10",
|
|
53
|
+
"@angular-devkit/architect": "0.1400.0-next.10",
|
|
54
|
+
"@angular-devkit/build-angular": "14.0.0-next.10",
|
|
55
|
+
"@angular-devkit/build-webpack": "0.1400.0-next.10",
|
|
56
|
+
"@angular-devkit/core": "14.0.0-next.10",
|
|
57
|
+
"@angular-devkit/schematics": "14.0.0-next.10"
|
|
60
58
|
}
|
|
61
59
|
},
|
|
62
60
|
"engines": {
|
|
63
|
-
"node": "^
|
|
61
|
+
"node": "^14.15.0 || >=16.10.0",
|
|
64
62
|
"npm": "^6.11.0 || ^7.5.6 || >=8.0.0",
|
|
65
63
|
"yarn": ">= 1.13.0"
|
|
66
64
|
}
|
|
File without changes
|
|
@@ -8,7 +8,11 @@
|
|
|
8
8
|
*/
|
|
9
9
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
10
10
|
if (k2 === undefined) k2 = k;
|
|
11
|
-
Object.
|
|
11
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
12
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
13
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
14
|
+
}
|
|
15
|
+
Object.defineProperty(o, k2, desc);
|
|
12
16
|
}) : (function(o, m, k, k2) {
|
|
13
17
|
if (k2 === undefined) k2 = k;
|
|
14
18
|
o[k2] = m[k];
|
|
@@ -36,7 +40,7 @@ const debug_1 = __importDefault(require("debug"));
|
|
|
36
40
|
const https = __importStar(require("https"));
|
|
37
41
|
const os = __importStar(require("os"));
|
|
38
42
|
const querystring = __importStar(require("querystring"));
|
|
39
|
-
const version_1 = require("
|
|
43
|
+
const version_1 = require("../utilities/version");
|
|
40
44
|
/**
|
|
41
45
|
* See: https://developers.google.com/analytics/devguides/collection/protocol/v1/devguide
|
|
42
46
|
*/
|
|
@@ -68,6 +72,8 @@ class AnalyticsCollector {
|
|
|
68
72
|
this.parameters['cd' + core_1.analytics.NgCliAnalyticsDimensions.CpuSpeed] = Math.floor(os.cpus()[0].speed);
|
|
69
73
|
this.parameters['cd' + core_1.analytics.NgCliAnalyticsDimensions.RamInGigabytes] = Math.round(os.totalmem() / (1024 * 1024 * 1024));
|
|
70
74
|
this.parameters['cd' + core_1.analytics.NgCliAnalyticsDimensions.NodeVersion] = nodeVersion;
|
|
75
|
+
this.parameters['cd' + core_1.analytics.NgCliAnalyticsDimensions.AngularCLIMajorVersion] =
|
|
76
|
+
version_1.VERSION.major;
|
|
71
77
|
}
|
|
72
78
|
event(ec, ea, options = {}) {
|
|
73
79
|
const { label: el, value: ev, metrics, dimensions } = options;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright Google LLC All Rights Reserved.
|
|
4
|
+
*
|
|
5
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
6
|
+
* found in the LICENSE file at https://angular.io/license
|
|
7
|
+
*/
|
|
8
|
+
import { analytics } from '@angular-devkit/core';
|
|
9
|
+
import { AnalyticsCollector } from './analytics-collector';
|
|
10
|
+
export declare const AnalyticsProperties: {
|
|
11
|
+
AngularCliProd: string;
|
|
12
|
+
AngularCliStaging: string;
|
|
13
|
+
readonly AngularCliDefault: string;
|
|
14
|
+
};
|
|
15
|
+
/**
|
|
16
|
+
* This is the ultimate safelist for checking if a package name is safe to report to analytics.
|
|
17
|
+
*/
|
|
18
|
+
export declare const analyticsPackageSafelist: (string | RegExp)[];
|
|
19
|
+
export declare function isPackageNameSafeForAnalytics(name: string): boolean;
|
|
20
|
+
/**
|
|
21
|
+
* Set analytics settings. This does not work if the user is not inside a project.
|
|
22
|
+
* @param global Which config to use. "global" for user-level, and "local" for project-level.
|
|
23
|
+
* @param value Either a user ID, true to generate a new User ID, or false to disable analytics.
|
|
24
|
+
*/
|
|
25
|
+
export declare function setAnalyticsConfig(global: boolean, value: string | boolean): Promise<void>;
|
|
26
|
+
/**
|
|
27
|
+
* Prompt the user for usage gathering permission.
|
|
28
|
+
* @param force Whether to ask regardless of whether or not the user is using an interactive shell.
|
|
29
|
+
* @return Whether or not the user was shown a prompt.
|
|
30
|
+
*/
|
|
31
|
+
export declare function promptAnalytics(global: boolean, force?: boolean): Promise<boolean>;
|
|
32
|
+
/**
|
|
33
|
+
* Get the analytics object for the user.
|
|
34
|
+
*
|
|
35
|
+
* @returns
|
|
36
|
+
* - `AnalyticsCollector` when enabled.
|
|
37
|
+
* - `analytics.NoopAnalytics` when disabled.
|
|
38
|
+
* - `undefined` when not configured.
|
|
39
|
+
*/
|
|
40
|
+
export declare function getAnalytics(level: 'local' | 'global'): Promise<AnalyticsCollector | analytics.NoopAnalytics | undefined>;
|
|
41
|
+
/**
|
|
42
|
+
* Return the usage analytics sharing setting, which is either a property string (GA-XXXXXXX-XX),
|
|
43
|
+
* or undefined if no sharing.
|
|
44
|
+
*/
|
|
45
|
+
export declare function getSharedAnalytics(): Promise<AnalyticsCollector | undefined>;
|
|
46
|
+
export declare function createAnalytics(workspace: boolean, skipPrompt?: boolean): Promise<analytics.Analytics>;
|
|
47
|
+
export declare function getAnalyticsInfoString(): Promise<string>;
|