@angular/cli 14.0.0-next.4 → 14.0.0-next.7

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 (231) hide show
  1. package/bin/ng.js +3 -5
  2. package/lib/cli/index.d.ts +1 -2
  3. package/lib/cli/index.js +16 -45
  4. package/lib/config/schema.json +30 -15
  5. package/lib/config/workspace-schema.d.ts +6 -1
  6. package/lib/init.js +10 -9
  7. package/package.json +18 -20
  8. package/{models → src/analytics}/analytics-collector.d.ts +0 -0
  9. package/{models → src/analytics}/analytics-collector.js +8 -2
  10. package/src/analytics/analytics.d.ts +47 -0
  11. package/src/analytics/analytics.js +304 -0
  12. package/src/command-builder/architect-base-command-module.d.ts +23 -0
  13. package/src/command-builder/architect-base-command-module.js +103 -0
  14. package/src/command-builder/architect-command-module.d.ts +22 -0
  15. package/src/command-builder/architect-command-module.js +108 -0
  16. package/src/command-builder/command-module.d.ts +89 -0
  17. package/src/command-builder/command-module.js +191 -0
  18. package/{utilities/package-json.js → src/command-builder/command-runner.d.ts} +2 -2
  19. package/src/command-builder/command-runner.js +152 -0
  20. package/src/command-builder/schematics-command-module.d.ts +46 -0
  21. package/src/command-builder/schematics-command-module.js +335 -0
  22. package/src/command-builder/utilities/command.d.ts +13 -0
  23. package/src/command-builder/utilities/command.js +27 -0
  24. package/src/command-builder/utilities/json-help.d.ts +36 -0
  25. package/src/command-builder/utilities/json-help.js +94 -0
  26. package/src/command-builder/utilities/json-schema.d.ts +40 -0
  27. package/{utilities → src/command-builder/utilities}/json-schema.js +20 -121
  28. package/{models → src/command-builder/utilities}/schematic-engine-host.d.ts +0 -0
  29. package/{models → src/command-builder/utilities}/schematic-engine-host.js +0 -0
  30. package/src/command-builder/utilities/schematic-workflow.d.ts +14 -0
  31. package/src/command-builder/utilities/schematic-workflow.js +68 -0
  32. package/src/commands/add/cli.d.ts +33 -0
  33. package/{commands/add-impl.js → src/commands/add/cli.js} +108 -80
  34. package/src/commands/add/long-description.md +7 -0
  35. package/src/commands/analytics/cli.d.ts +16 -0
  36. package/src/commands/analytics/cli.js +35 -0
  37. package/src/commands/analytics/info/cli.d.ts +16 -0
  38. package/src/commands/analytics/info/cli.js +26 -0
  39. package/src/commands/analytics/settings/cli.d.ts +35 -0
  40. package/src/commands/analytics/settings/cli.js +61 -0
  41. package/src/commands/build/cli.d.ts +16 -0
  42. package/src/commands/build/cli.js +23 -0
  43. package/{commands/build-long.md → src/commands/build/long-description.md} +0 -0
  44. package/src/commands/cache/clean/cli.d.ts +17 -0
  45. package/src/commands/cache/clean/cli.js +32 -0
  46. package/src/commands/cache/cli.d.ts +17 -0
  47. package/src/commands/cache/cli.js +38 -0
  48. package/src/commands/cache/info/cli.d.ts +20 -0
  49. package/src/commands/cache/info/cli.js +82 -0
  50. package/src/commands/cache/long-description.md +53 -0
  51. package/src/commands/cache/settings/cli.d.ts +27 -0
  52. package/src/commands/cache/settings/cli.js +42 -0
  53. package/src/commands/cache/utilities.d.ts +11 -0
  54. package/src/commands/cache/utilities.js +50 -0
  55. package/src/commands/config/cli.d.ts +24 -0
  56. package/{commands/config-impl.js → src/commands/config/cli.js} +102 -89
  57. package/{commands/config-long.md → src/commands/config/long-description.md} +2 -2
  58. package/src/commands/deploy/cli.d.ts +16 -0
  59. package/src/commands/deploy/cli.js +35 -0
  60. package/{commands/deploy-long.md → src/commands/deploy/long-description.md} +0 -0
  61. package/src/commands/doc/cli.d.ts +23 -0
  62. package/{commands/doc-impl.js → src/commands/doc/cli.js} +41 -12
  63. package/src/commands/e2e/cli.d.ts +17 -0
  64. package/src/commands/e2e/cli.js +34 -0
  65. package/src/commands/extract-i18n/cli.d.ts +15 -0
  66. package/src/commands/extract-i18n/cli.js +20 -0
  67. package/src/commands/generate/cli.d.ts +39 -0
  68. package/src/commands/generate/cli.js +145 -0
  69. package/src/commands/lint/cli.d.ts +16 -0
  70. package/src/commands/lint/cli.js +31 -0
  71. package/{commands/lint-long.md → src/commands/lint/long-description.md} +0 -0
  72. package/src/commands/make-this-awesome/cli.d.ts +17 -0
  73. package/{commands/easter-egg-impl.js → src/commands/make-this-awesome/cli.js} +17 -10
  74. package/src/commands/new/cli.d.ts +27 -0
  75. package/src/commands/new/cli.js +77 -0
  76. package/src/commands/run/cli.d.ts +23 -0
  77. package/src/commands/run/cli.js +59 -0
  78. package/{commands/run-long.md → src/commands/run/long-description.md} +0 -0
  79. package/src/commands/serve/cli.d.ts +16 -0
  80. package/src/commands/serve/cli.js +21 -0
  81. package/src/commands/test/cli.d.ts +16 -0
  82. package/src/commands/test/cli.js +23 -0
  83. package/{commands/test-long.md → src/commands/test/long-description.md} +0 -0
  84. package/{commands/update-impl.d.ts → src/commands/update/cli.d.ts} +26 -9
  85. package/{commands/update-impl.js → src/commands/update/cli.js} +362 -316
  86. package/{commands/update-long.md → src/commands/update/long-description.md} +0 -0
  87. package/src/commands/update/schematic/index.js +33 -20
  88. package/src/commands/version/cli.d.ts +18 -0
  89. package/{commands/version-impl.js → src/commands/version/cli.js} +56 -74
  90. package/src/typings-bazel.d.ts +14 -0
  91. package/src/typings.d.ts +1 -14
  92. package/{utilities → src/utilities}/color.d.ts +0 -0
  93. package/{utilities → src/utilities}/color.js +5 -1
  94. package/{utilities → src/utilities}/config.d.ts +2 -2
  95. package/{utilities → src/utilities}/config.js +24 -16
  96. package/src/utilities/environment-options.d.ts +12 -0
  97. package/src/utilities/environment-options.js +24 -0
  98. package/{utilities → src/utilities}/find-up.d.ts +0 -0
  99. package/{utilities → src/utilities}/find-up.js +5 -1
  100. package/{utilities → src/utilities}/json-file.d.ts +0 -0
  101. package/{utilities → src/utilities}/json-file.js +0 -0
  102. package/{utilities → src/utilities}/log-file.d.ts +0 -0
  103. package/{utilities → src/utilities}/log-file.js +0 -0
  104. package/src/utilities/package-manager.d.ts +41 -0
  105. package/src/utilities/package-manager.js +276 -0
  106. package/{utilities → src/utilities}/package-metadata.d.ts +15 -37
  107. package/{utilities → src/utilities}/package-metadata.js +15 -27
  108. package/{utilities → src/utilities}/package-tree.d.ts +2 -2
  109. package/{utilities → src/utilities}/package-tree.js +5 -1
  110. package/{utilities → src/utilities}/project.d.ts +0 -0
  111. package/{utilities → src/utilities}/project.js +5 -1
  112. package/{utilities → src/utilities}/prompt.d.ts +0 -0
  113. package/{utilities → src/utilities}/prompt.js +7 -3
  114. package/{utilities → src/utilities}/spinner.d.ts +0 -0
  115. package/{utilities → src/utilities}/spinner.js +0 -0
  116. package/{utilities → src/utilities}/tty.d.ts +0 -0
  117. package/{utilities → src/utilities}/tty.js +0 -0
  118. package/{models → src/utilities}/version.d.ts +2 -1
  119. package/{models → src/utilities}/version.js +6 -6
  120. package/bin/postinstall/analytics-prompt.js +0 -27
  121. package/bin/postinstall/script.js +0 -16
  122. package/commands/add-impl.d.ts +0 -21
  123. package/commands/add.d.ts +0 -42
  124. package/commands/add.js +0 -10
  125. package/commands/add.json +0 -54
  126. package/commands/add.md +0 -10
  127. package/commands/analytics-impl.d.ts +0 -13
  128. package/commands/analytics-impl.js +0 -80
  129. package/commands/analytics-long.md +0 -8
  130. package/commands/analytics.d.ts +0 -46
  131. package/commands/analytics.js +0 -31
  132. package/commands/analytics.json +0 -37
  133. package/commands/build-impl.d.ts +0 -14
  134. package/commands/build-impl.js +0 -21
  135. package/commands/build.d.ts +0 -30
  136. package/commands/build.js +0 -10
  137. package/commands/build.json +0 -16
  138. package/commands/config-impl.d.ts +0 -15
  139. package/commands/config.d.ts +0 -34
  140. package/commands/config.js +0 -10
  141. package/commands/config.json +0 -43
  142. package/commands/definitions.json +0 -66
  143. package/commands/deploy-impl.d.ts +0 -15
  144. package/commands/deploy-impl.js +0 -36
  145. package/commands/deploy.d.ts +0 -30
  146. package/commands/deploy.js +0 -10
  147. package/commands/deploy.json +0 -34
  148. package/commands/doc-impl.d.ts +0 -13
  149. package/commands/doc.d.ts +0 -39
  150. package/commands/doc.js +0 -14
  151. package/commands/doc.json +0 -46
  152. package/commands/e2e-impl.d.ts +0 -16
  153. package/commands/e2e-impl.js +0 -36
  154. package/commands/e2e-long.md +0 -4
  155. package/commands/e2e.d.ts +0 -29
  156. package/commands/e2e.js +0 -10
  157. package/commands/e2e.json +0 -17
  158. package/commands/easter-egg-impl.d.ts +0 -12
  159. package/commands/easter-egg.d.ts +0 -14
  160. package/commands/easter-egg.js +0 -10
  161. package/commands/easter-egg.json +0 -12
  162. package/commands/extract-i18n-impl.d.ts +0 -14
  163. package/commands/extract-i18n-impl.js +0 -21
  164. package/commands/extract-i18n.d.ts +0 -29
  165. package/commands/extract-i18n.js +0 -10
  166. package/commands/extract-i18n.json +0 -15
  167. package/commands/generate-impl.d.ts +0 -18
  168. package/commands/generate-impl.js +0 -89
  169. package/commands/generate.d.ts +0 -37
  170. package/commands/generate.js +0 -10
  171. package/commands/generate.json +0 -31
  172. package/commands/help-impl.d.ts +0 -12
  173. package/commands/help-impl.js +0 -26
  174. package/commands/help-long.md +0 -7
  175. package/commands/help.d.ts +0 -17
  176. package/commands/help.js +0 -10
  177. package/commands/help.json +0 -13
  178. package/commands/lint-impl.d.ts +0 -16
  179. package/commands/lint-impl.js +0 -69
  180. package/commands/lint.d.ts +0 -29
  181. package/commands/lint.js +0 -10
  182. package/commands/lint.json +0 -36
  183. package/commands/new-impl.d.ts +0 -16
  184. package/commands/new-impl.js +0 -37
  185. package/commands/new.d.ts +0 -41
  186. package/commands/new.js +0 -10
  187. package/commands/new.json +0 -34
  188. package/commands/new.md +0 -16
  189. package/commands/run-impl.d.ts +0 -13
  190. package/commands/run-impl.js +0 -22
  191. package/commands/run.d.ts +0 -30
  192. package/commands/run.js +0 -10
  193. package/commands/run.json +0 -36
  194. package/commands/serve-impl.d.ts +0 -15
  195. package/commands/serve-impl.js +0 -24
  196. package/commands/serve.d.ts +0 -29
  197. package/commands/serve.js +0 -10
  198. package/commands/serve.json +0 -17
  199. package/commands/test-impl.d.ts +0 -15
  200. package/commands/test-impl.js +0 -22
  201. package/commands/test.d.ts +0 -29
  202. package/commands/test.js +0 -10
  203. package/commands/test.json +0 -17
  204. package/commands/update.d.ts +0 -61
  205. package/commands/update.js +0 -10
  206. package/commands/update.json +0 -78
  207. package/commands/version-impl.d.ts +0 -17
  208. package/commands/version.d.ts +0 -17
  209. package/commands/version.js +0 -10
  210. package/commands/version.json +0 -13
  211. package/commands.json +0 -20
  212. package/models/analytics.d.ts +0 -58
  213. package/models/analytics.js +0 -358
  214. package/models/architect-command.d.ts +0 -35
  215. package/models/architect-command.js +0 -364
  216. package/models/command-runner.d.ts +0 -24
  217. package/models/command-runner.js +0 -241
  218. package/models/command.d.ts +0 -34
  219. package/models/command.js +0 -143
  220. package/models/interface.d.ts +0 -196
  221. package/models/interface.js +0 -31
  222. package/models/parser.d.ts +0 -39
  223. package/models/parser.js +0 -349
  224. package/models/schematic-command.d.ts +0 -55
  225. package/models/schematic-command.js +0 -485
  226. package/utilities/install-package.d.ts +0 -16
  227. package/utilities/install-package.js +0 -193
  228. package/utilities/json-schema.d.ts +0 -17
  229. package/utilities/package-json.d.ts +0 -249
  230. package/utilities/package-manager.d.ts +0 -13
  231. package/utilities/package-manager.js +0 -106
@@ -1,12 +0,0 @@
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 { Command } from '../models/command';
9
- import { Schema as HelpCommandSchema } from './help';
10
- export declare class HelpCommand extends Command<HelpCommandSchema> {
11
- run(): Promise<void>;
12
- }
@@ -1,26 +0,0 @@
1
- "use strict";
2
- /**
3
- * @license
4
- * Copyright Google LLC All Rights Reserved.
5
- *
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
8
- */
9
- Object.defineProperty(exports, "__esModule", { value: true });
10
- exports.HelpCommand = void 0;
11
- const command_1 = require("../models/command");
12
- const color_1 = require("../utilities/color");
13
- class HelpCommand extends command_1.Command {
14
- async run() {
15
- this.logger.info(`Available Commands:`);
16
- for (const cmd of Object.values(await command_1.Command.commandMap())) {
17
- if (cmd.hidden) {
18
- continue;
19
- }
20
- const aliasInfo = cmd.aliases.length > 0 ? ` (${cmd.aliases.join(', ')})` : '';
21
- this.logger.info(` ${color_1.colors.cyan(cmd.name)}${aliasInfo} ${cmd.description}`);
22
- }
23
- this.logger.info(`\nFor more detailed help run "ng [command name] --help"`);
24
- }
25
- }
26
- exports.HelpCommand = HelpCommand;
@@ -1,7 +0,0 @@
1
- For help with individual commands, use the `--help` or `-h` option with the command.
2
-
3
- For example,
4
-
5
- ```sh
6
- ng help serve
7
- ```
@@ -1,17 +0,0 @@
1
- /**
2
- * Lists available commands and their short descriptions.
3
- */
4
- export interface Schema {
5
- /**
6
- * Shows a help message for this command in the console.
7
- */
8
- help?: HelpUnion;
9
- }
10
- /**
11
- * Shows a help message for this command in the console.
12
- */
13
- export declare type HelpUnion = boolean | HelpEnum;
14
- export declare enum HelpEnum {
15
- HelpJson = "JSON",
16
- Json = "json"
17
- }
package/commands/help.js DELETED
@@ -1,10 +0,0 @@
1
- "use strict";
2
- // THIS FILE IS AUTOMATICALLY GENERATED. TO UPDATE THIS FILE YOU NEED TO CHANGE THE
3
- // CORRESPONDING JSON SCHEMA FILE, THEN RUN devkit-admin build (or bazel build ...).
4
- Object.defineProperty(exports, "__esModule", { value: true });
5
- exports.HelpEnum = void 0;
6
- var HelpEnum;
7
- (function (HelpEnum) {
8
- HelpEnum["HelpJson"] = "JSON";
9
- HelpEnum["Json"] = "json";
10
- })(HelpEnum = exports.HelpEnum || (exports.HelpEnum = {}));
@@ -1,13 +0,0 @@
1
- {
2
- "$schema": "http://json-schema.org/draft-07/schema",
3
- "$id": "ng-cli://commands/help.json",
4
- "description": "Lists available commands and their short descriptions.",
5
- "$longDescription": "./help-long.md",
6
-
7
- "$scope": "all",
8
- "$aliases": [],
9
- "$impl": "./help-impl#HelpCommand",
10
-
11
- "type": "object",
12
- "allOf": [{ "$ref": "./definitions.json#/definitions/base" }]
13
- }
@@ -1,16 +0,0 @@
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 { ArchitectCommand } from '../models/architect-command';
9
- import { Arguments } from '../models/interface';
10
- import { Schema as LintCommandSchema } from './lint';
11
- export declare class LintCommand extends ArchitectCommand<LintCommandSchema> {
12
- readonly target = "lint";
13
- readonly multiTarget = true;
14
- initialize(options: LintCommandSchema & Arguments): Promise<number | void>;
15
- onMissingTarget(): Promise<void | number>;
16
- }
@@ -1,69 +0,0 @@
1
- "use strict";
2
- /**
3
- * @license
4
- * Copyright Google LLC All Rights Reserved.
5
- *
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
8
- */
9
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
12
- }) : (function(o, m, k, k2) {
13
- if (k2 === undefined) k2 = k;
14
- o[k2] = m[k];
15
- }));
16
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
17
- Object.defineProperty(o, "default", { enumerable: true, value: v });
18
- }) : function(o, v) {
19
- o["default"] = v;
20
- });
21
- var __importStar = (this && this.__importStar) || function (mod) {
22
- if (mod && mod.__esModule) return mod;
23
- var result = {};
24
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
25
- __setModuleDefault(result, mod);
26
- return result;
27
- };
28
- Object.defineProperty(exports, "__esModule", { value: true });
29
- exports.LintCommand = void 0;
30
- const child_process_1 = require("child_process");
31
- const path = __importStar(require("path"));
32
- const architect_command_1 = require("../models/architect-command");
33
- const prompt_1 = require("../utilities/prompt");
34
- const MissingBuilder = `
35
- Cannot find "lint" target for the specified project.
36
-
37
- You should add a package that implements linting capabilities.
38
-
39
- For example:
40
- ng add @angular-eslint/schematics
41
- `;
42
- class LintCommand extends architect_command_1.ArchitectCommand {
43
- constructor() {
44
- super(...arguments);
45
- this.target = 'lint';
46
- this.multiTarget = true;
47
- }
48
- async initialize(options) {
49
- if (!options.help) {
50
- return super.initialize(options);
51
- }
52
- }
53
- async onMissingTarget() {
54
- this.logger.warn(MissingBuilder);
55
- const shouldAdd = await (0, prompt_1.askConfirmation)('Would you like to add ESLint now?', true, false);
56
- if (shouldAdd) {
57
- // Run `ng add @angular-eslint/schematics`
58
- const binPath = path.resolve(__dirname, '../bin/ng.js');
59
- const { status, error } = (0, child_process_1.spawnSync)(process.execPath, [binPath, 'add', '@angular-eslint/schematics'], {
60
- stdio: 'inherit',
61
- });
62
- if (error) {
63
- throw error;
64
- }
65
- return status !== null && status !== void 0 ? status : 0;
66
- }
67
- }
68
- }
69
- exports.LintCommand = LintCommand;
@@ -1,29 +0,0 @@
1
- /**
2
- * Runs linting tools on Angular app code in a given project folder.
3
- */
4
- export interface Schema {
5
- /**
6
- * One or more named builder configurations as a comma-separated list as specified in the
7
- * "configurations" section of angular.json.
8
- * The builder uses the named configurations to run the given target.
9
- * For more information, see
10
- * https://angular.io/guide/workspace-config#alternate-build-configurations.
11
- */
12
- configuration?: string;
13
- /**
14
- * Shows a help message for this command in the console.
15
- */
16
- help?: HelpUnion;
17
- /**
18
- * The name of the project to lint.
19
- */
20
- project?: string;
21
- }
22
- /**
23
- * Shows a help message for this command in the console.
24
- */
25
- export declare type HelpUnion = boolean | HelpEnum;
26
- export declare enum HelpEnum {
27
- HelpJson = "JSON",
28
- Json = "json"
29
- }
package/commands/lint.js DELETED
@@ -1,10 +0,0 @@
1
- "use strict";
2
- // THIS FILE IS AUTOMATICALLY GENERATED. TO UPDATE THIS FILE YOU NEED TO CHANGE THE
3
- // CORRESPONDING JSON SCHEMA FILE, THEN RUN devkit-admin build (or bazel build ...).
4
- Object.defineProperty(exports, "__esModule", { value: true });
5
- exports.HelpEnum = void 0;
6
- var HelpEnum;
7
- (function (HelpEnum) {
8
- HelpEnum["HelpJson"] = "JSON";
9
- HelpEnum["Json"] = "json";
10
- })(HelpEnum = exports.HelpEnum || (exports.HelpEnum = {}));
@@ -1,36 +0,0 @@
1
- {
2
- "$schema": "http://json-schema.org/draft-07/schema",
3
- "$id": "ng-cli://commands/lint.json",
4
- "description": "Runs linting tools on Angular app code in a given project folder.",
5
- "$longDescription": "./lint-long.md",
6
-
7
- "$aliases": ["l"],
8
- "$scope": "in",
9
- "$type": "architect",
10
- "$impl": "./lint-impl#LintCommand",
11
-
12
- "type": "object",
13
- "allOf": [
14
- {
15
- "properties": {
16
- "project": {
17
- "type": "string",
18
- "description": "The name of the project to lint.",
19
- "$default": {
20
- "$source": "argv",
21
- "index": 0
22
- }
23
- },
24
- "configuration": {
25
- "description": "One or more named builder configurations as a comma-separated list as specified in the \"configurations\" section of angular.json.\nThe builder uses the named configurations to run the given target.\nFor more information, see https://angular.io/guide/workspace-config#alternate-build-configurations.",
26
- "type": "string",
27
- "aliases": ["c"]
28
- }
29
- },
30
- "required": []
31
- },
32
- {
33
- "$ref": "./definitions.json#/definitions/base"
34
- }
35
- ]
36
- }
@@ -1,16 +0,0 @@
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 { Arguments } from '../models/interface';
9
- import { SchematicCommand } from '../models/schematic-command';
10
- import { Schema as NewCommandSchema } from './new';
11
- export declare class NewCommand extends SchematicCommand<NewCommandSchema> {
12
- readonly allowMissingWorkspace = true;
13
- schematicName: string;
14
- initialize(options: NewCommandSchema & Arguments): Promise<void>;
15
- run(options: NewCommandSchema & Arguments): Promise<number | void>;
16
- }
@@ -1,37 +0,0 @@
1
- "use strict";
2
- /**
3
- * @license
4
- * Copyright Google LLC All Rights Reserved.
5
- *
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
8
- */
9
- Object.defineProperty(exports, "__esModule", { value: true });
10
- exports.NewCommand = void 0;
11
- const schematic_command_1 = require("../models/schematic-command");
12
- const version_1 = require("../models/version");
13
- class NewCommand extends schematic_command_1.SchematicCommand {
14
- constructor() {
15
- super(...arguments);
16
- this.allowMissingWorkspace = true;
17
- this.schematicName = 'ng-new';
18
- }
19
- async initialize(options) {
20
- this.collectionName = options.collection || (await this.getDefaultSchematicCollection());
21
- return super.initialize(options);
22
- }
23
- async run(options) {
24
- // Register the version of the CLI in the registry.
25
- const version = version_1.VERSION.full;
26
- this._workflow.registry.addSmartDefaultProvider('ng-cli-version', () => version);
27
- return this.runSchematic({
28
- collectionName: this.collectionName,
29
- schematicName: this.schematicName,
30
- schematicOptions: options['--'] || [],
31
- debug: !!options.debug,
32
- dryRun: !!options.dryRun,
33
- force: !!options.force,
34
- });
35
- }
36
- }
37
- exports.NewCommand = NewCommand;
package/commands/new.d.ts DELETED
@@ -1,41 +0,0 @@
1
- /**
2
- * Creates a new workspace and an initial Angular application.
3
- */
4
- export interface Schema {
5
- /**
6
- * A collection of schematics to use in generating the initial application.
7
- */
8
- collection?: string;
9
- /**
10
- * Disable interactive input prompts for options with a default.
11
- */
12
- defaults?: boolean;
13
- /**
14
- * Run through and reports activity without writing out results.
15
- */
16
- dryRun?: boolean;
17
- /**
18
- * Force overwriting of existing files.
19
- */
20
- force?: boolean;
21
- /**
22
- * Shows a help message for this command in the console.
23
- */
24
- help?: HelpUnion;
25
- /**
26
- * Enable interactive input prompts.
27
- */
28
- interactive?: boolean;
29
- /**
30
- * Add more details to output logging.
31
- */
32
- verbose?: boolean;
33
- }
34
- /**
35
- * Shows a help message for this command in the console.
36
- */
37
- export declare type HelpUnion = boolean | HelpEnum;
38
- export declare enum HelpEnum {
39
- HelpJson = "JSON",
40
- Json = "json"
41
- }
package/commands/new.js DELETED
@@ -1,10 +0,0 @@
1
- "use strict";
2
- // THIS FILE IS AUTOMATICALLY GENERATED. TO UPDATE THIS FILE YOU NEED TO CHANGE THE
3
- // CORRESPONDING JSON SCHEMA FILE, THEN RUN devkit-admin build (or bazel build ...).
4
- Object.defineProperty(exports, "__esModule", { value: true });
5
- exports.HelpEnum = void 0;
6
- var HelpEnum;
7
- (function (HelpEnum) {
8
- HelpEnum["HelpJson"] = "JSON";
9
- HelpEnum["Json"] = "json";
10
- })(HelpEnum = exports.HelpEnum || (exports.HelpEnum = {}));
package/commands/new.json DELETED
@@ -1,34 +0,0 @@
1
- {
2
- "$schema": "http://json-schema.org/draft-07/schema",
3
- "$id": "ng-cli://commands/new.json",
4
- "description": "Creates a new workspace and an initial Angular application.",
5
- "$longDescription": "./new.md",
6
-
7
- "$aliases": ["n"],
8
- "$scope": "out",
9
- "$type": "schematic",
10
- "$impl": "./new-impl#NewCommand",
11
-
12
- "type": "object",
13
- "allOf": [
14
- {
15
- "properties": {
16
- "collection": {
17
- "type": "string",
18
- "aliases": ["c"],
19
- "description": "A collection of schematics to use in generating the initial application."
20
- },
21
- "verbose": {
22
- "type": "boolean",
23
- "default": false,
24
- "aliases": ["v"],
25
- "description": "Add more details to output logging."
26
- }
27
- },
28
- "required": []
29
- },
30
- { "$ref": "./definitions.json#/definitions/base" },
31
- { "$ref": "./definitions.json#/definitions/schematic" },
32
- { "$ref": "./definitions.json#/definitions/interactive" }
33
- ]
34
- }
package/commands/new.md DELETED
@@ -1,16 +0,0 @@
1
- Creates and initializes a new Angular application that is the default project for a new workspace.
2
-
3
- Provides interactive prompts for optional configuration, such as adding routing support.
4
- All prompts can safely be allowed to default.
5
-
6
- - The new workspace folder is given the specified project name, and contains configuration files at the top level.
7
-
8
- - By default, the files for a new initial application (with the same name as the workspace) are placed in the `src/` subfolder.
9
-
10
- - The new application's configuration appears in the `projects` section of the `angular.json` workspace configuration file, under its project name.
11
-
12
- - Subsequent applications that you generate in the workspace reside in the `projects/` subfolder.
13
-
14
- If you plan to have multiple applications in the workspace, you can create an empty workspace by setting the `--create-application` option to false.
15
- You can then use `ng generate application` to create an initial application.
16
- This allows a workspace name different from the initial app name, and ensures that all applications reside in the `/projects` subfolder, matching the structure of the configuration file.
@@ -1,13 +0,0 @@
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 { ArchitectCommand, ArchitectCommandOptions } from '../models/architect-command';
9
- import { Arguments } from '../models/interface';
10
- import { Schema as RunCommandSchema } from './run';
11
- export declare class RunCommand extends ArchitectCommand<RunCommandSchema> {
12
- run(options: ArchitectCommandOptions & Arguments): Promise<number>;
13
- }
@@ -1,22 +0,0 @@
1
- "use strict";
2
- /**
3
- * @license
4
- * Copyright Google LLC All Rights Reserved.
5
- *
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
8
- */
9
- Object.defineProperty(exports, "__esModule", { value: true });
10
- exports.RunCommand = void 0;
11
- const architect_command_1 = require("../models/architect-command");
12
- class RunCommand extends architect_command_1.ArchitectCommand {
13
- async run(options) {
14
- if (options.target) {
15
- return this.runArchitectTarget(options);
16
- }
17
- else {
18
- throw new Error('Invalid architect target.');
19
- }
20
- }
21
- }
22
- exports.RunCommand = RunCommand;
package/commands/run.d.ts DELETED
@@ -1,30 +0,0 @@
1
- /**
2
- * Runs an Architect target with an optional custom builder configuration defined in your
3
- * project.
4
- */
5
- export interface Schema {
6
- /**
7
- * One or more named builder configurations as a comma-separated list as specified in the
8
- * "configurations" section of angular.json.
9
- * The builder uses the named configurations to run the given target.
10
- * For more information, see
11
- * https://angular.io/guide/workspace-config#alternate-build-configurations.
12
- */
13
- configuration?: string;
14
- /**
15
- * Shows a help message for this command in the console.
16
- */
17
- help?: HelpUnion;
18
- /**
19
- * The Architect target to run.
20
- */
21
- target?: string;
22
- }
23
- /**
24
- * Shows a help message for this command in the console.
25
- */
26
- export declare type HelpUnion = boolean | HelpEnum;
27
- export declare enum HelpEnum {
28
- HelpJson = "JSON",
29
- Json = "json"
30
- }
package/commands/run.js DELETED
@@ -1,10 +0,0 @@
1
- "use strict";
2
- // THIS FILE IS AUTOMATICALLY GENERATED. TO UPDATE THIS FILE YOU NEED TO CHANGE THE
3
- // CORRESPONDING JSON SCHEMA FILE, THEN RUN devkit-admin build (or bazel build ...).
4
- Object.defineProperty(exports, "__esModule", { value: true });
5
- exports.HelpEnum = void 0;
6
- var HelpEnum;
7
- (function (HelpEnum) {
8
- HelpEnum["HelpJson"] = "JSON";
9
- HelpEnum["Json"] = "json";
10
- })(HelpEnum = exports.HelpEnum || (exports.HelpEnum = {}));
package/commands/run.json DELETED
@@ -1,36 +0,0 @@
1
- {
2
- "$schema": "http://json-schema.org/draft-07/schema",
3
- "$id": "ng-cli://commands/run.json",
4
- "description": "Runs an Architect target with an optional custom builder configuration defined in your project.",
5
- "$longDescription": "./run-long.md",
6
-
7
- "$aliases": [],
8
- "$scope": "in",
9
- "$type": "architect",
10
- "$impl": "./run-impl#RunCommand",
11
-
12
- "type": "object",
13
- "allOf": [
14
- {
15
- "properties": {
16
- "target": {
17
- "type": "string",
18
- "description": "The Architect target to run.",
19
- "$default": {
20
- "$source": "argv",
21
- "index": 0
22
- }
23
- },
24
- "configuration": {
25
- "description": "One or more named builder configurations as a comma-separated list as specified in the \"configurations\" section of angular.json.\nThe builder uses the named configurations to run the given target.\nFor more information, see https://angular.io/guide/workspace-config#alternate-build-configurations.",
26
- "type": "string",
27
- "aliases": ["c"]
28
- }
29
- },
30
- "required": []
31
- },
32
- {
33
- "$ref": "./definitions.json#/definitions/base"
34
- }
35
- ]
36
- }
@@ -1,15 +0,0 @@
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 { ArchitectCommand, ArchitectCommandOptions } from '../models/architect-command';
9
- import { Arguments } from '../models/interface';
10
- import { Schema as ServeCommandSchema } from './serve';
11
- export declare class ServeCommand extends ArchitectCommand<ServeCommandSchema> {
12
- readonly target = "serve";
13
- validate(): boolean;
14
- run(options: ArchitectCommandOptions & Arguments): Promise<number>;
15
- }
@@ -1,24 +0,0 @@
1
- "use strict";
2
- /**
3
- * @license
4
- * Copyright Google LLC All Rights Reserved.
5
- *
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
8
- */
9
- Object.defineProperty(exports, "__esModule", { value: true });
10
- exports.ServeCommand = void 0;
11
- const architect_command_1 = require("../models/architect-command");
12
- class ServeCommand extends architect_command_1.ArchitectCommand {
13
- constructor() {
14
- super(...arguments);
15
- this.target = 'serve';
16
- }
17
- validate() {
18
- return true;
19
- }
20
- async run(options) {
21
- return this.runArchitectTarget(options);
22
- }
23
- }
24
- exports.ServeCommand = ServeCommand;
@@ -1,29 +0,0 @@
1
- /**
2
- * Builds and serves your app, rebuilding on file changes.
3
- */
4
- export interface Schema {
5
- /**
6
- * One or more named builder configurations as a comma-separated list as specified in the
7
- * "configurations" section of angular.json.
8
- * The builder uses the named configurations to run the given target.
9
- * For more information, see
10
- * https://angular.io/guide/workspace-config#alternate-build-configurations.
11
- */
12
- configuration?: string;
13
- /**
14
- * Shows a help message for this command in the console.
15
- */
16
- help?: HelpUnion;
17
- /**
18
- * The name of the project to build. Can be an application or a library.
19
- */
20
- project?: string;
21
- }
22
- /**
23
- * Shows a help message for this command in the console.
24
- */
25
- export declare type HelpUnion = boolean | HelpEnum;
26
- export declare enum HelpEnum {
27
- HelpJson = "JSON",
28
- Json = "json"
29
- }
package/commands/serve.js DELETED
@@ -1,10 +0,0 @@
1
- "use strict";
2
- // THIS FILE IS AUTOMATICALLY GENERATED. TO UPDATE THIS FILE YOU NEED TO CHANGE THE
3
- // CORRESPONDING JSON SCHEMA FILE, THEN RUN devkit-admin build (or bazel build ...).
4
- Object.defineProperty(exports, "__esModule", { value: true });
5
- exports.HelpEnum = void 0;
6
- var HelpEnum;
7
- (function (HelpEnum) {
8
- HelpEnum["HelpJson"] = "JSON";
9
- HelpEnum["Json"] = "json";
10
- })(HelpEnum = exports.HelpEnum || (exports.HelpEnum = {}));
@@ -1,17 +0,0 @@
1
- {
2
- "$schema": "http://json-schema.org/draft-07/schema",
3
- "$id": "ng-cli://commands/serve.json",
4
- "description": "Builds and serves your app, rebuilding on file changes.",
5
- "$longDescription": "",
6
-
7
- "$aliases": ["s"],
8
- "$scope": "in",
9
- "$type": "architect",
10
- "$impl": "./serve-impl#ServeCommand",
11
-
12
- "type": "object",
13
- "allOf": [
14
- { "$ref": "./definitions.json#/definitions/architect" },
15
- { "$ref": "./definitions.json#/definitions/base" }
16
- ]
17
- }
@@ -1,15 +0,0 @@
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 { ArchitectCommand, ArchitectCommandOptions } from '../models/architect-command';
9
- import { Arguments } from '../models/interface';
10
- import { Schema as TestCommandSchema } from './test';
11
- export declare class TestCommand extends ArchitectCommand<TestCommandSchema> {
12
- readonly target = "test";
13
- readonly multiTarget = true;
14
- run(options: ArchitectCommandOptions & Arguments): Promise<number>;
15
- }