@angular/cli 18.1.0-next.0 → 18.1.0-next.2

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.
Files changed (130) hide show
  1. package/bin/bootstrap.js +1 -1
  2. package/bin/ng.js +1 -1
  3. package/lib/cli/index.d.ts +1 -1
  4. package/lib/cli/index.js +7 -7
  5. package/lib/config/schema.json +27 -1
  6. package/lib/config/workspace-schema.d.ts +1 -1
  7. package/lib/init.d.ts +1 -1
  8. package/lib/init.js +1 -1
  9. package/package.json +23 -14
  10. package/src/analytics/analytics-collector.d.ts +1 -1
  11. package/src/analytics/analytics-collector.js +1 -1
  12. package/src/analytics/analytics-parameters.d.ts +1 -1
  13. package/src/analytics/analytics-parameters.js +1 -1
  14. package/src/analytics/analytics.d.ts +1 -1
  15. package/src/analytics/analytics.js +7 -7
  16. package/src/command-builder/architect-base-command-module.d.ts +1 -1
  17. package/src/command-builder/architect-base-command-module.js +1 -1
  18. package/src/command-builder/architect-command-module.d.ts +1 -1
  19. package/src/command-builder/architect-command-module.js +1 -1
  20. package/src/command-builder/command-module.d.ts +1 -1
  21. package/src/command-builder/command-module.js +1 -1
  22. package/src/command-builder/command-runner.d.ts +1 -1
  23. package/src/command-builder/command-runner.js +2 -3
  24. package/src/command-builder/schematics-command-module.d.ts +1 -1
  25. package/src/command-builder/schematics-command-module.js +88 -51
  26. package/src/command-builder/utilities/command.d.ts +1 -1
  27. package/src/command-builder/utilities/command.js +3 -3
  28. package/src/command-builder/utilities/json-help.d.ts +1 -1
  29. package/src/command-builder/utilities/json-help.js +2 -3
  30. package/src/command-builder/utilities/json-schema.d.ts +1 -1
  31. package/src/command-builder/utilities/json-schema.js +2 -3
  32. package/src/command-builder/utilities/normalize-options-middleware.d.ts +1 -1
  33. package/src/command-builder/utilities/normalize-options-middleware.js +2 -3
  34. package/src/command-builder/utilities/schematic-engine-host.d.ts +1 -1
  35. package/src/command-builder/utilities/schematic-engine-host.js +1 -1
  36. package/src/command-builder/utilities/schematic-workflow.d.ts +1 -1
  37. package/src/command-builder/utilities/schematic-workflow.js +2 -3
  38. package/src/commands/add/cli.d.ts +1 -1
  39. package/src/commands/add/cli.js +12 -2
  40. package/src/commands/analytics/cli.d.ts +1 -1
  41. package/src/commands/analytics/cli.js +1 -1
  42. package/src/commands/analytics/info/cli.d.ts +1 -1
  43. package/src/commands/analytics/info/cli.js +1 -1
  44. package/src/commands/analytics/settings/cli.d.ts +1 -1
  45. package/src/commands/analytics/settings/cli.js +1 -1
  46. package/src/commands/build/cli.d.ts +1 -1
  47. package/src/commands/build/cli.js +1 -1
  48. package/src/commands/cache/clean/cli.d.ts +1 -1
  49. package/src/commands/cache/clean/cli.js +1 -1
  50. package/src/commands/cache/cli.d.ts +1 -1
  51. package/src/commands/cache/cli.js +1 -1
  52. package/src/commands/cache/info/cli.d.ts +1 -1
  53. package/src/commands/cache/info/cli.js +1 -1
  54. package/src/commands/cache/settings/cli.d.ts +1 -1
  55. package/src/commands/cache/settings/cli.js +1 -1
  56. package/src/commands/cache/utilities.d.ts +1 -1
  57. package/src/commands/cache/utilities.js +3 -4
  58. package/src/commands/command-config.d.ts +1 -1
  59. package/src/commands/command-config.js +1 -1
  60. package/src/commands/completion/cli.d.ts +1 -1
  61. package/src/commands/completion/cli.js +1 -1
  62. package/src/commands/config/cli.d.ts +1 -1
  63. package/src/commands/config/cli.js +1 -1
  64. package/src/commands/deploy/cli.d.ts +1 -1
  65. package/src/commands/deploy/cli.js +1 -1
  66. package/src/commands/e2e/cli.d.ts +1 -1
  67. package/src/commands/e2e/cli.js +1 -1
  68. package/src/commands/extract-i18n/cli.d.ts +1 -1
  69. package/src/commands/extract-i18n/cli.js +1 -1
  70. package/src/commands/generate/cli.d.ts +1 -1
  71. package/src/commands/generate/cli.js +1 -1
  72. package/src/commands/lint/cli.d.ts +1 -1
  73. package/src/commands/lint/cli.js +1 -1
  74. package/src/commands/make-this-awesome/cli.d.ts +1 -1
  75. package/src/commands/make-this-awesome/cli.js +1 -1
  76. package/src/commands/new/cli.d.ts +1 -1
  77. package/src/commands/new/cli.js +1 -1
  78. package/src/commands/run/cli.d.ts +1 -1
  79. package/src/commands/run/cli.js +1 -1
  80. package/src/commands/serve/cli.d.ts +1 -1
  81. package/src/commands/serve/cli.js +1 -1
  82. package/src/commands/test/cli.d.ts +1 -1
  83. package/src/commands/test/cli.js +1 -1
  84. package/src/commands/update/cli.d.ts +2 -1
  85. package/src/commands/update/cli.js +4 -3
  86. package/src/commands/update/schematic/index.d.ts +1 -1
  87. package/src/commands/update/schematic/index.js +3 -4
  88. package/src/commands/version/cli.d.ts +1 -1
  89. package/src/commands/version/cli.js +1 -1
  90. package/src/typings-bazel.d.ts +1 -1
  91. package/src/typings.d.ts +1 -1
  92. package/src/typings.js +1 -1
  93. package/src/utilities/color.d.ts +1 -2
  94. package/src/utilities/color.js +2 -8
  95. package/src/utilities/completion.d.ts +1 -1
  96. package/src/utilities/completion.js +4 -5
  97. package/src/utilities/config.d.ts +1 -1
  98. package/src/utilities/config.js +9 -9
  99. package/src/utilities/environment-options.d.ts +1 -1
  100. package/src/utilities/environment-options.js +1 -1
  101. package/src/utilities/eol.d.ts +1 -1
  102. package/src/utilities/eol.js +2 -3
  103. package/src/utilities/error.d.ts +1 -1
  104. package/src/utilities/error.js +2 -3
  105. package/src/utilities/find-up.d.ts +1 -1
  106. package/src/utilities/find-up.js +2 -3
  107. package/src/utilities/json-file.d.ts +1 -1
  108. package/src/utilities/json-file.js +4 -4
  109. package/src/utilities/load-esm.d.ts +1 -2
  110. package/src/utilities/load-esm.js +2 -3
  111. package/src/utilities/log-file.d.ts +1 -1
  112. package/src/utilities/log-file.js +2 -3
  113. package/src/utilities/memoize.d.ts +1 -1
  114. package/src/utilities/memoize.js +2 -3
  115. package/src/utilities/package-manager.d.ts +1 -1
  116. package/src/utilities/package-manager.js +1 -1
  117. package/src/utilities/package-metadata.d.ts +1 -1
  118. package/src/utilities/package-metadata.js +4 -5
  119. package/src/utilities/package-tree.d.ts +1 -1
  120. package/src/utilities/package-tree.js +4 -5
  121. package/src/utilities/project.d.ts +1 -1
  122. package/src/utilities/project.js +2 -3
  123. package/src/utilities/prompt.d.ts +9 -4
  124. package/src/utilities/prompt.js +48 -30
  125. package/src/utilities/spinner.d.ts +1 -1
  126. package/src/utilities/spinner.js +1 -1
  127. package/src/utilities/tty.d.ts +1 -1
  128. package/src/utilities/tty.js +2 -3
  129. package/src/utilities/version.d.ts +1 -1
  130. package/src/utilities/version.js +2 -2
@@ -4,7 +4,7 @@
4
4
  * Copyright Google LLC All Rights Reserved.
5
5
  *
6
6
  * Use of this source code is governed by an MIT-style license that can be
7
- * found in the LICENSE file at https://angular.io/license
7
+ * found in the LICENSE file at https://angular.dev/license
8
8
  */
9
9
  var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
10
10
  if (k2 === undefined) k2 = k;
@@ -30,7 +30,9 @@ var __importStar = (this && this.__importStar) || function (mod) {
30
30
  return result;
31
31
  };
32
32
  Object.defineProperty(exports, "__esModule", { value: true });
33
- exports.getNpmPackageJson = exports.fetchPackageManifest = exports.fetchPackageMetadata = void 0;
33
+ exports.fetchPackageMetadata = fetchPackageMetadata;
34
+ exports.fetchPackageManifest = fetchPackageManifest;
35
+ exports.getNpmPackageJson = getNpmPackageJson;
34
36
  const lockfile = __importStar(require("@yarnpkg/lockfile"));
35
37
  const fs_1 = require("fs");
36
38
  const ini = __importStar(require("ini"));
@@ -217,7 +219,6 @@ async function fetchPackageMetadata(name, logger, options) {
217
219
  }
218
220
  return metadata;
219
221
  }
220
- exports.fetchPackageMetadata = fetchPackageMetadata;
221
222
  async function fetchPackageManifest(name, logger, options = {}) {
222
223
  const { usingYarn = false, verbose = false, registry } = options;
223
224
  ensureNpmrc(logger, usingYarn, verbose);
@@ -229,7 +230,6 @@ async function fetchPackageManifest(name, logger, options = {}) {
229
230
  });
230
231
  return response;
231
232
  }
232
- exports.fetchPackageManifest = fetchPackageManifest;
233
233
  async function getNpmPackageJson(packageName, logger, options = {}) {
234
234
  const cachedResponse = npmPackageJsonCache.get(packageName);
235
235
  if (cachedResponse) {
@@ -252,4 +252,3 @@ async function getNpmPackageJson(packageName, logger, options = {}) {
252
252
  npmPackageJsonCache.set(packageName, response);
253
253
  return response;
254
254
  }
255
- exports.getNpmPackageJson = getNpmPackageJson;
@@ -3,7 +3,7 @@
3
3
  * Copyright Google LLC All Rights Reserved.
4
4
  *
5
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
6
+ * found in the LICENSE file at https://angular.dev/license
7
7
  */
8
8
  import { NgAddSaveDependency } from './package-metadata';
9
9
  interface PackageJson {
@@ -4,7 +4,7 @@
4
4
  * Copyright Google LLC All Rights Reserved.
5
5
  *
6
6
  * Use of this source code is governed by an MIT-style license that can be
7
- * found in the LICENSE file at https://angular.io/license
7
+ * found in the LICENSE file at https://angular.dev/license
8
8
  */
9
9
  var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
10
10
  if (k2 === undefined) k2 = k;
@@ -30,7 +30,9 @@ var __importStar = (this && this.__importStar) || function (mod) {
30
30
  return result;
31
31
  };
32
32
  Object.defineProperty(exports, "__esModule", { value: true });
33
- exports.getProjectDependencies = exports.findPackageJson = exports.readPackageJson = void 0;
33
+ exports.readPackageJson = readPackageJson;
34
+ exports.findPackageJson = findPackageJson;
35
+ exports.getProjectDependencies = getProjectDependencies;
34
36
  const fs = __importStar(require("fs"));
35
37
  const path_1 = require("path");
36
38
  const resolve = __importStar(require("resolve"));
@@ -50,7 +52,6 @@ async function readPackageJson(packageJsonPath) {
50
52
  return undefined;
51
53
  }
52
54
  }
53
- exports.readPackageJson = readPackageJson;
54
55
  function findPackageJson(workspaceDir, packageName) {
55
56
  try {
56
57
  // avoid require.resolve here, see: https://github.com/angular/angular-cli/pull/18610#issuecomment-681980185
@@ -61,7 +62,6 @@ function findPackageJson(workspaceDir, packageName) {
61
62
  return undefined;
62
63
  }
63
64
  }
64
- exports.findPackageJson = findPackageJson;
65
65
  async function getProjectDependencies(dir) {
66
66
  const pkg = await readPackageJson((0, path_1.join)(dir, 'package.json'));
67
67
  if (!pkg) {
@@ -82,4 +82,3 @@ async function getProjectDependencies(dir) {
82
82
  }
83
83
  return results;
84
84
  }
85
- exports.getProjectDependencies = getProjectDependencies;
@@ -3,6 +3,6 @@
3
3
  * Copyright Google LLC All Rights Reserved.
4
4
  *
5
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
6
+ * found in the LICENSE file at https://angular.dev/license
7
7
  */
8
8
  export declare function findWorkspaceFile(currentDirectory?: string): string | null;
@@ -4,7 +4,7 @@
4
4
  * Copyright Google LLC All Rights Reserved.
5
5
  *
6
6
  * Use of this source code is governed by an MIT-style license that can be
7
- * found in the LICENSE file at https://angular.io/license
7
+ * found in the LICENSE file at https://angular.dev/license
8
8
  */
9
9
  var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
10
10
  if (k2 === undefined) k2 = k;
@@ -30,7 +30,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
30
30
  return result;
31
31
  };
32
32
  Object.defineProperty(exports, "__esModule", { value: true });
33
- exports.findWorkspaceFile = void 0;
33
+ exports.findWorkspaceFile = findWorkspaceFile;
34
34
  const core_1 = require("@angular-devkit/core");
35
35
  const fs = __importStar(require("fs"));
36
36
  const os = __importStar(require("os"));
@@ -61,7 +61,6 @@ function findWorkspaceFile(currentDirectory = process.cwd()) {
61
61
  }
62
62
  return configFilePath;
63
63
  }
64
- exports.findWorkspaceFile = findWorkspaceFile;
65
64
  function containsCliDep(obj) {
66
65
  const pkgName = '@angular/cli';
67
66
  if (!obj) {
@@ -3,9 +3,14 @@
3
3
  * Copyright Google LLC All Rights Reserved.
4
4
  *
5
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
6
+ * found in the LICENSE file at https://angular.dev/license
7
7
  */
8
- import type { CheckboxChoiceOptions, ListChoiceOptions } from 'inquirer';
9
8
  export declare function askConfirmation(message: string, defaultResponse: boolean, noTTYResponse?: boolean): Promise<boolean>;
10
- export declare function askQuestion(message: string, choices: ListChoiceOptions[], defaultResponseIndex: number, noTTYResponse: null | string): Promise<string | null>;
11
- export declare function askChoices(message: string, choices: CheckboxChoiceOptions[], noTTYResponse: string[] | null): Promise<string[] | null>;
9
+ export declare function askQuestion(message: string, choices: {
10
+ name: string;
11
+ value: string | null;
12
+ }[], defaultResponseIndex: number, noTTYResponse: null | string): Promise<string | null>;
13
+ export declare function askChoices(message: string, choices: {
14
+ name: string;
15
+ value: string;
16
+ }[], noTTYResponse: string[] | null): Promise<string[] | null>;
@@ -4,58 +4,76 @@
4
4
  * Copyright Google LLC All Rights Reserved.
5
5
  *
6
6
  * Use of this source code is governed by an MIT-style license that can be
7
- * found in the LICENSE file at https://angular.io/license
7
+ * found in the LICENSE file at https://angular.dev/license
8
8
  */
9
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
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);
16
+ }) : (function(o, m, k, k2) {
17
+ if (k2 === undefined) k2 = k;
18
+ o[k2] = m[k];
19
+ }));
20
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
21
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
22
+ }) : function(o, v) {
23
+ o["default"] = v;
24
+ });
25
+ var __importStar = (this && this.__importStar) || function (mod) {
26
+ if (mod && mod.__esModule) return mod;
27
+ var result = {};
28
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
29
+ __setModuleDefault(result, mod);
30
+ return result;
31
+ };
9
32
  Object.defineProperty(exports, "__esModule", { value: true });
10
- exports.askChoices = exports.askQuestion = exports.askConfirmation = void 0;
11
- const load_esm_1 = require("./load-esm");
33
+ exports.askConfirmation = askConfirmation;
34
+ exports.askQuestion = askQuestion;
35
+ exports.askChoices = askChoices;
12
36
  const tty_1 = require("./tty");
13
37
  async function askConfirmation(message, defaultResponse, noTTYResponse) {
14
38
  if (!(0, tty_1.isTTY)()) {
15
39
  return noTTYResponse ?? defaultResponse;
16
40
  }
17
- const question = {
18
- type: 'confirm',
19
- name: 'confirmation',
20
- prefix: '',
41
+ const { confirm } = await Promise.resolve().then(() => __importStar(require('@inquirer/prompts')));
42
+ const answer = await confirm({
21
43
  message,
22
44
  default: defaultResponse,
23
- };
24
- const { default: inquirer } = await (0, load_esm_1.loadEsmModule)('inquirer');
25
- const answers = await inquirer.prompt([question]);
26
- return answers['confirmation'];
45
+ theme: {
46
+ prefix: '',
47
+ },
48
+ });
49
+ return answer;
27
50
  }
28
- exports.askConfirmation = askConfirmation;
29
51
  async function askQuestion(message, choices, defaultResponseIndex, noTTYResponse) {
30
52
  if (!(0, tty_1.isTTY)()) {
31
53
  return noTTYResponse;
32
54
  }
33
- const question = {
34
- type: 'list',
35
- name: 'answer',
36
- prefix: '',
55
+ const { select } = await Promise.resolve().then(() => __importStar(require('@inquirer/prompts')));
56
+ const answer = await select({
37
57
  message,
38
58
  choices,
39
59
  default: defaultResponseIndex,
40
- };
41
- const { default: inquirer } = await (0, load_esm_1.loadEsmModule)('inquirer');
42
- const answers = await inquirer.prompt([question]);
43
- return answers['answer'];
60
+ theme: {
61
+ prefix: '',
62
+ },
63
+ });
64
+ return answer;
44
65
  }
45
- exports.askQuestion = askQuestion;
46
66
  async function askChoices(message, choices, noTTYResponse) {
47
67
  if (!(0, tty_1.isTTY)()) {
48
68
  return noTTYResponse;
49
69
  }
50
- const question = {
51
- type: 'checkbox',
52
- name: 'answer',
53
- prefix: '',
70
+ const { checkbox } = await Promise.resolve().then(() => __importStar(require('@inquirer/prompts')));
71
+ const answers = await checkbox({
54
72
  message,
55
73
  choices,
56
- };
57
- const { default: inquirer } = await (0, load_esm_1.loadEsmModule)('inquirer');
58
- const answers = await inquirer.prompt([question]);
59
- return answers['answer'];
74
+ theme: {
75
+ prefix: '',
76
+ },
77
+ });
78
+ return answers;
60
79
  }
61
- exports.askChoices = askChoices;
@@ -3,7 +3,7 @@
3
3
  * Copyright Google LLC All Rights Reserved.
4
4
  *
5
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
6
+ * found in the LICENSE file at https://angular.dev/license
7
7
  */
8
8
  export declare class Spinner {
9
9
  private readonly spinner;
@@ -4,7 +4,7 @@
4
4
  * Copyright Google LLC All Rights Reserved.
5
5
  *
6
6
  * Use of this source code is governed by an MIT-style license that can be
7
- * found in the LICENSE file at https://angular.io/license
7
+ * found in the LICENSE file at https://angular.dev/license
8
8
  */
9
9
  var __importDefault = (this && this.__importDefault) || function (mod) {
10
10
  return (mod && mod.__esModule) ? mod : { "default": mod };
@@ -3,6 +3,6 @@
3
3
  * Copyright Google LLC All Rights Reserved.
4
4
  *
5
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
6
+ * found in the LICENSE file at https://angular.dev/license
7
7
  */
8
8
  export declare function isTTY(): boolean;
@@ -4,10 +4,10 @@
4
4
  * Copyright Google LLC All Rights Reserved.
5
5
  *
6
6
  * Use of this source code is governed by an MIT-style license that can be
7
- * found in the LICENSE file at https://angular.io/license
7
+ * found in the LICENSE file at https://angular.dev/license
8
8
  */
9
9
  Object.defineProperty(exports, "__esModule", { value: true });
10
- exports.isTTY = void 0;
10
+ exports.isTTY = isTTY;
11
11
  function _isTruthy(value) {
12
12
  // Returns true if value is a string that is anything but 0 or false.
13
13
  return value !== undefined && value !== '0' && value.toUpperCase() !== 'FALSE';
@@ -20,4 +20,3 @@ function isTTY() {
20
20
  }
21
21
  return !!process.stdout.isTTY && !_isTruthy(process.env['CI']);
22
22
  }
23
- exports.isTTY = isTTY;
@@ -3,7 +3,7 @@
3
3
  * Copyright Google LLC All Rights Reserved.
4
4
  *
5
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
6
+ * found in the LICENSE file at https://angular.dev/license
7
7
  */
8
8
  declare class Version {
9
9
  readonly full: string;
@@ -4,7 +4,7 @@
4
4
  * Copyright Google LLC All Rights Reserved.
5
5
  *
6
6
  * Use of this source code is governed by an MIT-style license that can be
7
- * found in the LICENSE file at https://angular.io/license
7
+ * found in the LICENSE file at https://angular.dev/license
8
8
  */
9
9
  Object.defineProperty(exports, "__esModule", { value: true });
10
10
  exports.VERSION = void 0;
@@ -25,5 +25,5 @@ class Version {
25
25
  }
26
26
  }
27
27
  // TODO(bazel): Convert this to use build-time version stamping after flipping the build script to use bazel
28
- // export const VERSION = new Version('18.1.0-next.0');
28
+ // export const VERSION = new Version('18.1.0-next.2');
29
29
  exports.VERSION = new Version(JSON.parse((0, fs_1.readFileSync)((0, path_1.resolve)(__dirname, '../../package.json'), 'utf-8')).version);