@angular/cli 13.3.3 → 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 +136 -77
- package/lib/config/workspace-schema.d.ts +5 -0
- package/lib/init.js +5 -8
- package/package.json +21 -23
- package/{models → src/analytics}/analytics-collector.d.ts +0 -0
- package/{models → src/analytics}/analytics-collector.js +1 -1
- 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/src/commands/config/cli.js +168 -0
- 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} +36 -11
- 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} +357 -325
- package/{commands/update-long.md → src/commands/update/long-description.md} +0 -0
- package/src/commands/update/schematic/index.js +29 -22
- 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 +0 -0
- package/{utilities → src/utilities}/config.d.ts +7 -6
- package/{utilities → src/utilities}/config.js +34 -92
- 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 +0 -0
- 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 +10 -26
- package/{utilities → src/utilities}/package-tree.d.ts +2 -2
- package/{utilities → src/utilities}/package-tree.js +0 -0
- package/{utilities → src/utilities}/project.d.ts +0 -0
- package/{utilities → src/utilities}/project.js +1 -6
- package/{utilities → src/utilities}/prompt.d.ts +2 -0
- package/{utilities → src/utilities}/prompt.js +20 -3
- 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 -38
- package/commands/build.js +0 -10
- package/commands/build.json +0 -16
- package/commands/config-impl.d.ts +0 -15
- package/commands/config-impl.js +0 -167
- package/commands/config.d.ts +0 -34
- package/commands/config.js +0 -10
- package/commands/config.json +0 -43
- package/commands/definitions.json +0 -71
- 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 -37
- 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 -37
- 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 -74
- 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 -37
- 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 -37
- package/commands/test.js +0 -10
- package/commands/test.json +0 -17
- package/commands/update.d.ts +0 -65
- package/commands/update.js +0 -10
- package/commands/update.json +0 -84
- 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 -362
- package/models/architect-command.d.ts +0 -35
- package/models/architect-command.js +0 -392
- package/models/command-runner.d.ts +0 -24
- package/models/command-runner.js +0 -245
- 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 -489
- 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 -15
- package/utilities/package-manager.js +0 -83
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": {
|
|
@@ -1582,7 +1601,34 @@
|
|
|
1582
1601
|
"type": "array",
|
|
1583
1602
|
"default": [],
|
|
1584
1603
|
"items": {
|
|
1585
|
-
"
|
|
1604
|
+
"oneOf": [
|
|
1605
|
+
{
|
|
1606
|
+
"type": "object",
|
|
1607
|
+
"properties": {
|
|
1608
|
+
"input": {
|
|
1609
|
+
"type": "string",
|
|
1610
|
+
"description": "The file to include.",
|
|
1611
|
+
"pattern": "\\.[cm]?jsx?$"
|
|
1612
|
+
},
|
|
1613
|
+
"bundleName": {
|
|
1614
|
+
"type": "string",
|
|
1615
|
+
"pattern": "^[\\w\\-.]*$",
|
|
1616
|
+
"description": "The bundle name for this extra entry point."
|
|
1617
|
+
},
|
|
1618
|
+
"inject": {
|
|
1619
|
+
"type": "boolean",
|
|
1620
|
+
"description": "If the bundle will be referenced in the HTML file.",
|
|
1621
|
+
"default": true
|
|
1622
|
+
}
|
|
1623
|
+
},
|
|
1624
|
+
"additionalProperties": false
|
|
1625
|
+
},
|
|
1626
|
+
{
|
|
1627
|
+
"type": "string",
|
|
1628
|
+
"description": "The file to include.",
|
|
1629
|
+
"pattern": "\\.[cm]?jsx?$"
|
|
1630
|
+
}
|
|
1631
|
+
]
|
|
1586
1632
|
}
|
|
1587
1633
|
},
|
|
1588
1634
|
"styles": {
|
|
@@ -1590,7 +1636,34 @@
|
|
|
1590
1636
|
"type": "array",
|
|
1591
1637
|
"default": [],
|
|
1592
1638
|
"items": {
|
|
1593
|
-
"
|
|
1639
|
+
"oneOf": [
|
|
1640
|
+
{
|
|
1641
|
+
"type": "object",
|
|
1642
|
+
"properties": {
|
|
1643
|
+
"input": {
|
|
1644
|
+
"type": "string",
|
|
1645
|
+
"description": "The file to include.",
|
|
1646
|
+
"pattern": "\\.(?:css|scss|sass|less|styl)$"
|
|
1647
|
+
},
|
|
1648
|
+
"bundleName": {
|
|
1649
|
+
"type": "string",
|
|
1650
|
+
"pattern": "^[\\w\\-.]*$",
|
|
1651
|
+
"description": "The bundle name for this extra entry point."
|
|
1652
|
+
},
|
|
1653
|
+
"inject": {
|
|
1654
|
+
"type": "boolean",
|
|
1655
|
+
"description": "If the bundle will be referenced in the HTML file.",
|
|
1656
|
+
"default": true
|
|
1657
|
+
}
|
|
1658
|
+
},
|
|
1659
|
+
"additionalProperties": false
|
|
1660
|
+
},
|
|
1661
|
+
{
|
|
1662
|
+
"type": "string",
|
|
1663
|
+
"description": "The file to include.",
|
|
1664
|
+
"pattern": "\\.(?:css|scss|sass|less|styl)$"
|
|
1665
|
+
}
|
|
1666
|
+
]
|
|
1594
1667
|
}
|
|
1595
1668
|
},
|
|
1596
1669
|
"inlineStyleLanguage": {
|
|
@@ -1695,7 +1768,7 @@
|
|
|
1695
1768
|
},
|
|
1696
1769
|
"outputPath": {
|
|
1697
1770
|
"type": "string",
|
|
1698
|
-
"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."
|
|
1699
1772
|
},
|
|
1700
1773
|
"resourcesOutputPath": {
|
|
1701
1774
|
"type": "string",
|
|
@@ -1843,15 +1916,9 @@
|
|
|
1843
1916
|
"description": "Extract all licenses in a separate file.",
|
|
1844
1917
|
"default": true
|
|
1845
1918
|
},
|
|
1846
|
-
"showCircularDependencies": {
|
|
1847
|
-
"type": "boolean",
|
|
1848
|
-
"description": "Show circular dependency warnings on builds.",
|
|
1849
|
-
"default": false,
|
|
1850
|
-
"x-deprecated": "The recommended method to detect circular dependencies in project code is to use either a lint rule or other external tooling."
|
|
1851
|
-
},
|
|
1852
1919
|
"buildOptimizer": {
|
|
1853
1920
|
"type": "boolean",
|
|
1854
|
-
"description": "Enables
|
|
1921
|
+
"description": "Enables advanced build optimizations when using the 'aot' option.",
|
|
1855
1922
|
"default": true
|
|
1856
1923
|
},
|
|
1857
1924
|
"namedChunks": {
|
|
@@ -2006,34 +2073,6 @@
|
|
|
2006
2073
|
}
|
|
2007
2074
|
]
|
|
2008
2075
|
},
|
|
2009
|
-
"extraEntryPoint": {
|
|
2010
|
-
"oneOf": [
|
|
2011
|
-
{
|
|
2012
|
-
"type": "object",
|
|
2013
|
-
"properties": {
|
|
2014
|
-
"input": {
|
|
2015
|
-
"type": "string",
|
|
2016
|
-
"description": "The file to include."
|
|
2017
|
-
},
|
|
2018
|
-
"bundleName": {
|
|
2019
|
-
"type": "string",
|
|
2020
|
-
"pattern": "^[\\w\\-.]*$",
|
|
2021
|
-
"description": "The bundle name for this extra entry point."
|
|
2022
|
-
},
|
|
2023
|
-
"inject": {
|
|
2024
|
-
"type": "boolean",
|
|
2025
|
-
"description": "If the bundle will be referenced in the HTML file.",
|
|
2026
|
-
"default": true
|
|
2027
|
-
}
|
|
2028
|
-
},
|
|
2029
|
-
"additionalProperties": false
|
|
2030
|
-
},
|
|
2031
|
-
{
|
|
2032
|
-
"type": "string",
|
|
2033
|
-
"description": "The file to include."
|
|
2034
|
-
}
|
|
2035
|
-
]
|
|
2036
|
-
},
|
|
2037
2076
|
"budget": {
|
|
2038
2077
|
"type": "object",
|
|
2039
2078
|
"properties": {
|
|
@@ -2263,7 +2302,34 @@
|
|
|
2263
2302
|
"type": "array",
|
|
2264
2303
|
"default": [],
|
|
2265
2304
|
"items": {
|
|
2266
|
-
"
|
|
2305
|
+
"oneOf": [
|
|
2306
|
+
{
|
|
2307
|
+
"type": "object",
|
|
2308
|
+
"properties": {
|
|
2309
|
+
"input": {
|
|
2310
|
+
"type": "string",
|
|
2311
|
+
"description": "The file to include.",
|
|
2312
|
+
"pattern": "\\.[cm]?jsx?$"
|
|
2313
|
+
},
|
|
2314
|
+
"bundleName": {
|
|
2315
|
+
"type": "string",
|
|
2316
|
+
"pattern": "^[\\w\\-.]*$",
|
|
2317
|
+
"description": "The bundle name for this extra entry point."
|
|
2318
|
+
},
|
|
2319
|
+
"inject": {
|
|
2320
|
+
"type": "boolean",
|
|
2321
|
+
"description": "If the bundle will be referenced in the HTML file.",
|
|
2322
|
+
"default": true
|
|
2323
|
+
}
|
|
2324
|
+
},
|
|
2325
|
+
"additionalProperties": false
|
|
2326
|
+
},
|
|
2327
|
+
{
|
|
2328
|
+
"type": "string",
|
|
2329
|
+
"description": "The file to include.",
|
|
2330
|
+
"pattern": "\\.[cm]?jsx?$"
|
|
2331
|
+
}
|
|
2332
|
+
]
|
|
2267
2333
|
}
|
|
2268
2334
|
},
|
|
2269
2335
|
"styles": {
|
|
@@ -2271,7 +2337,34 @@
|
|
|
2271
2337
|
"type": "array",
|
|
2272
2338
|
"default": [],
|
|
2273
2339
|
"items": {
|
|
2274
|
-
"
|
|
2340
|
+
"oneOf": [
|
|
2341
|
+
{
|
|
2342
|
+
"type": "object",
|
|
2343
|
+
"properties": {
|
|
2344
|
+
"input": {
|
|
2345
|
+
"type": "string",
|
|
2346
|
+
"description": "The file to include.",
|
|
2347
|
+
"pattern": "\\.(?:css|scss|sass|less|styl)$"
|
|
2348
|
+
},
|
|
2349
|
+
"bundleName": {
|
|
2350
|
+
"type": "string",
|
|
2351
|
+
"pattern": "^[\\w\\-.]*$",
|
|
2352
|
+
"description": "The bundle name for this extra entry point."
|
|
2353
|
+
},
|
|
2354
|
+
"inject": {
|
|
2355
|
+
"type": "boolean",
|
|
2356
|
+
"description": "If the bundle will be referenced in the HTML file.",
|
|
2357
|
+
"default": true
|
|
2358
|
+
}
|
|
2359
|
+
},
|
|
2360
|
+
"additionalProperties": false
|
|
2361
|
+
},
|
|
2362
|
+
{
|
|
2363
|
+
"type": "string",
|
|
2364
|
+
"description": "The file to include.",
|
|
2365
|
+
"pattern": "\\.(?:css|scss|sass|less|styl)$"
|
|
2366
|
+
}
|
|
2367
|
+
]
|
|
2275
2368
|
}
|
|
2276
2369
|
},
|
|
2277
2370
|
"inlineStyleLanguage": {
|
|
@@ -2449,34 +2542,6 @@
|
|
|
2449
2542
|
"type": "string"
|
|
2450
2543
|
}
|
|
2451
2544
|
]
|
|
2452
|
-
},
|
|
2453
|
-
"extraEntryPoint": {
|
|
2454
|
-
"oneOf": [
|
|
2455
|
-
{
|
|
2456
|
-
"type": "object",
|
|
2457
|
-
"properties": {
|
|
2458
|
-
"input": {
|
|
2459
|
-
"type": "string",
|
|
2460
|
-
"description": "The file to include."
|
|
2461
|
-
},
|
|
2462
|
-
"bundleName": {
|
|
2463
|
-
"type": "string",
|
|
2464
|
-
"pattern": "^[\\w\\-.]*$",
|
|
2465
|
-
"description": "The bundle name for this extra entry point."
|
|
2466
|
-
},
|
|
2467
|
-
"inject": {
|
|
2468
|
-
"type": "boolean",
|
|
2469
|
-
"description": "If the bundle will be referenced in the HTML file.",
|
|
2470
|
-
"default": true
|
|
2471
|
-
}
|
|
2472
|
-
},
|
|
2473
|
-
"additionalProperties": false
|
|
2474
|
-
},
|
|
2475
|
-
{
|
|
2476
|
-
"type": "string",
|
|
2477
|
-
"description": "The file to include."
|
|
2478
|
-
}
|
|
2479
|
-
]
|
|
2480
2545
|
}
|
|
2481
2546
|
}
|
|
2482
2547
|
},
|
|
@@ -2730,12 +2795,6 @@
|
|
|
2730
2795
|
"description": "Extract all licenses in a separate file, in the case of production builds only.",
|
|
2731
2796
|
"default": true
|
|
2732
2797
|
},
|
|
2733
|
-
"showCircularDependencies": {
|
|
2734
|
-
"type": "boolean",
|
|
2735
|
-
"description": "Show circular dependency warnings on builds.",
|
|
2736
|
-
"default": false,
|
|
2737
|
-
"x-deprecated": "The recommended method to detect circular dependencies in project code is to use either a lint rule or other external tooling."
|
|
2738
|
-
},
|
|
2739
2798
|
"namedChunks": {
|
|
2740
2799
|
"type": "boolean",
|
|
2741
2800
|
"description": "Use file name for lazy loaded chunks.",
|
|
@@ -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
|
*/
|
package/lib/init.js
CHANGED
|
@@ -35,9 +35,10 @@ require("symbol-observable");
|
|
|
35
35
|
const fs_1 = require("fs");
|
|
36
36
|
const path = __importStar(require("path"));
|
|
37
37
|
const semver_1 = require("semver");
|
|
38
|
-
const
|
|
39
|
-
const
|
|
40
|
-
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");
|
|
41
42
|
(async () => {
|
|
42
43
|
var _a;
|
|
43
44
|
/**
|
|
@@ -47,15 +48,11 @@ const config_1 = require("../utilities/config");
|
|
|
47
48
|
* See: https://github.com/browserslist/browserslist/blob/819c4337456996d19db6ba953014579329e9c6e1/node.js#L324
|
|
48
49
|
*/
|
|
49
50
|
process.env.BROWSERSLIST_IGNORE_OLD_DATA = '1';
|
|
50
|
-
const disableVersionCheckEnv = process.env['NG_DISABLE_VERSION_CHECK'];
|
|
51
51
|
/**
|
|
52
52
|
* Disable CLI version mismatch checks and forces usage of the invoked CLI
|
|
53
53
|
* instead of invoking the local installed version.
|
|
54
54
|
*/
|
|
55
|
-
|
|
56
|
-
disableVersionCheckEnv !== '0' &&
|
|
57
|
-
disableVersionCheckEnv.toLowerCase() !== 'false';
|
|
58
|
-
if (disableVersionCheck) {
|
|
55
|
+
if (environment_options_1.disableVersionCheck) {
|
|
59
56
|
return (await Promise.resolve().then(() => __importStar(require('./cli')))).default;
|
|
60
57
|
}
|
|
61
58
|
let cli;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@angular/cli",
|
|
3
|
-
"version": "
|
|
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.
|
|
32
|
-
"@angular-devkit/core": "
|
|
33
|
-
"@angular-devkit/schematics": "
|
|
34
|
-
"@schematics/angular": "
|
|
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": "
|
|
55
|
-
"@angular-devkit/architect": "0.
|
|
56
|
-
"@angular-devkit/build-angular": "
|
|
57
|
-
"@angular-devkit/build-webpack": "0.
|
|
58
|
-
"@angular-devkit/core": "
|
|
59
|
-
"@angular-devkit/schematics": "
|
|
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
|
|
@@ -40,7 +40,7 @@ const debug_1 = __importDefault(require("debug"));
|
|
|
40
40
|
const https = __importStar(require("https"));
|
|
41
41
|
const os = __importStar(require("os"));
|
|
42
42
|
const querystring = __importStar(require("querystring"));
|
|
43
|
-
const version_1 = require("
|
|
43
|
+
const version_1 = require("../utilities/version");
|
|
44
44
|
/**
|
|
45
45
|
* See: https://developers.google.com/analytics/devguides/collection/protocol/v1/devguide
|
|
46
46
|
*/
|
|
@@ -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>;
|