@angular/cli 17.0.7 → 17.0.9

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.
@@ -400,10 +400,12 @@
400
400
  "@angular-devkit/build-angular:dev-server",
401
401
  "@angular-devkit/build-angular:extract-i18n",
402
402
  "@angular-devkit/build-angular:karma",
403
+ "@angular-devkit/build-angular:ng-packagr",
404
+ "@angular-devkit/build-angular:prerender",
403
405
  "@angular-devkit/build-angular:jest",
404
406
  "@angular-devkit/build-angular:protractor",
405
407
  "@angular-devkit/build-angular:server",
406
- "@angular-devkit/build-angular:ng-packagr"
408
+ "@angular-devkit/build-angular:ssr-dev-server"
407
409
  ]
408
410
  }
409
411
  },
@@ -625,6 +627,50 @@
625
627
  }
626
628
  }
627
629
  },
630
+ {
631
+ "type": "object",
632
+ "additionalProperties": false,
633
+ "properties": {
634
+ "builder": {
635
+ "const": "@angular-devkit/build-angular:prerender"
636
+ },
637
+ "defaultConfiguration": {
638
+ "type": "string",
639
+ "description": "A default named configuration to use when a target configuration is not provided."
640
+ },
641
+ "options": {
642
+ "$ref": "#/definitions/AngularDevkitBuildAngularBuildersPrerenderSchema"
643
+ },
644
+ "configurations": {
645
+ "type": "object",
646
+ "additionalProperties": {
647
+ "$ref": "#/definitions/AngularDevkitBuildAngularBuildersPrerenderSchema"
648
+ }
649
+ }
650
+ }
651
+ },
652
+ {
653
+ "type": "object",
654
+ "additionalProperties": false,
655
+ "properties": {
656
+ "builder": {
657
+ "const": "@angular-devkit/build-angular:ssr-dev-server"
658
+ },
659
+ "defaultConfiguration": {
660
+ "type": "string",
661
+ "description": "A default named configuration to use when a target configuration is not provided."
662
+ },
663
+ "options": {
664
+ "$ref": "#/definitions/AngularDevkitBuildAngularBuildersSsrDevServerSchema"
665
+ },
666
+ "configurations": {
667
+ "type": "object",
668
+ "additionalProperties": {
669
+ "$ref": "#/definitions/AngularDevkitBuildAngularBuildersSsrDevServerSchema"
670
+ }
671
+ }
672
+ }
673
+ },
628
674
  {
629
675
  "type": "object",
630
676
  "additionalProperties": false,
@@ -3959,6 +4005,119 @@
3959
4005
  },
3960
4006
  "additionalProperties": false
3961
4007
  },
4008
+ "AngularDevkitBuildAngularBuildersPrerenderSchema": {
4009
+ "title": "Prerender Target",
4010
+ "type": "object",
4011
+ "properties": {
4012
+ "browserTarget": {
4013
+ "type": "string",
4014
+ "description": "Target to build.",
4015
+ "pattern": "^[^:\\s]+:[^:\\s]+(:[^\\s]+)?$"
4016
+ },
4017
+ "serverTarget": {
4018
+ "type": "string",
4019
+ "description": "Server target to use for prerendering the app.",
4020
+ "pattern": "^[^:\\s]+:[^:\\s]+(:[^\\s]+)?$"
4021
+ },
4022
+ "routesFile": {
4023
+ "type": "string",
4024
+ "description": "The path to a file that contains a list of all routes to prerender, separated by newlines. This option is useful if you want to prerender routes with parameterized URLs."
4025
+ },
4026
+ "routes": {
4027
+ "type": "array",
4028
+ "description": "The routes to render.",
4029
+ "items": {
4030
+ "minItems": 1,
4031
+ "type": "string",
4032
+ "uniqueItems": true
4033
+ },
4034
+ "default": []
4035
+ },
4036
+ "discoverRoutes": {
4037
+ "type": "boolean",
4038
+ "description": "Whether the builder should process the Angular Router configuration to find all unparameterized routes and prerender them.",
4039
+ "default": true
4040
+ }
4041
+ },
4042
+ "anyOf": [
4043
+ {},
4044
+ {}
4045
+ ],
4046
+ "additionalProperties": false
4047
+ },
4048
+ "AngularDevkitBuildAngularBuildersSsrDevServerSchema": {
4049
+ "title": "SSR Dev Server Target",
4050
+ "description": "SSR Dev Server target options for Build Facade.",
4051
+ "type": "object",
4052
+ "properties": {
4053
+ "browserTarget": {
4054
+ "type": "string",
4055
+ "description": "Browser target to build.",
4056
+ "pattern": ".+:.+(:.+)?"
4057
+ },
4058
+ "serverTarget": {
4059
+ "type": "string",
4060
+ "description": "Server target to build.",
4061
+ "pattern": ".+:.+(:.+)?"
4062
+ },
4063
+ "host": {
4064
+ "type": "string",
4065
+ "description": "Host to listen on.",
4066
+ "default": "localhost"
4067
+ },
4068
+ "port": {
4069
+ "type": "number",
4070
+ "default": 4200,
4071
+ "description": "Port to start the development server at. Default is 4200. Pass 0 to get a dynamically assigned port."
4072
+ },
4073
+ "watch": {
4074
+ "type": "boolean",
4075
+ "description": "Rebuild on change.",
4076
+ "default": true
4077
+ },
4078
+ "publicHost": {
4079
+ "type": "string",
4080
+ "description": "The URL that the browser client should use to connect to the development server. Use for a complex dev server setup, such as one with reverse proxies."
4081
+ },
4082
+ "open": {
4083
+ "type": "boolean",
4084
+ "description": "Opens the url in default browser.",
4085
+ "default": false,
4086
+ "alias": "o"
4087
+ },
4088
+ "progress": {
4089
+ "type": "boolean",
4090
+ "description": "Log progress to the console while building."
4091
+ },
4092
+ "inspect": {
4093
+ "type": "boolean",
4094
+ "description": "Launch the development server in inspector mode and listen on address and port '127.0.0.1:9229'.",
4095
+ "default": false
4096
+ },
4097
+ "ssl": {
4098
+ "type": "boolean",
4099
+ "description": "Serve using HTTPS.",
4100
+ "default": false
4101
+ },
4102
+ "sslKey": {
4103
+ "type": "string",
4104
+ "description": "SSL key to use for serving HTTPS."
4105
+ },
4106
+ "sslCert": {
4107
+ "type": "string",
4108
+ "description": "SSL certificate to use for serving HTTPS."
4109
+ },
4110
+ "proxyConfig": {
4111
+ "type": "string",
4112
+ "description": "Proxy configuration file."
4113
+ },
4114
+ "verbose": {
4115
+ "type": "boolean",
4116
+ "description": "Adds more details to output logging."
4117
+ }
4118
+ },
4119
+ "additionalProperties": false
4120
+ },
3962
4121
  "AngularDevkitBuildAngularBuildersServerSchema": {
3963
4122
  "title": "Universal Target",
3964
4123
  "type": "object",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@angular/cli",
3
- "version": "17.0.7",
3
+ "version": "17.0.9",
4
4
  "description": "CLI tool for Angular",
5
5
  "main": "lib/cli/index.js",
6
6
  "bin": {
@@ -25,10 +25,10 @@
25
25
  },
26
26
  "homepage": "https://github.com/angular/angular-cli",
27
27
  "dependencies": {
28
- "@angular-devkit/architect": "0.1700.7",
29
- "@angular-devkit/core": "17.0.7",
30
- "@angular-devkit/schematics": "17.0.7",
31
- "@schematics/angular": "17.0.7",
28
+ "@angular-devkit/architect": "0.1700.9",
29
+ "@angular-devkit/core": "17.0.9",
30
+ "@angular-devkit/schematics": "17.0.9",
31
+ "@schematics/angular": "17.0.9",
32
32
  "@yarnpkg/lockfile": "1.1.0",
33
33
  "ansi-colors": "4.1.3",
34
34
  "ini": "4.1.1",
@@ -47,13 +47,13 @@
47
47
  "ng-update": {
48
48
  "migrations": "@schematics/angular/migrations/migration-collection.json",
49
49
  "packageGroup": {
50
- "@angular/cli": "17.0.7",
51
- "@angular/ssr": "17.0.7",
52
- "@angular-devkit/architect": "0.1700.7",
53
- "@angular-devkit/build-angular": "17.0.7",
54
- "@angular-devkit/build-webpack": "0.1700.7",
55
- "@angular-devkit/core": "17.0.7",
56
- "@angular-devkit/schematics": "17.0.7"
50
+ "@angular/cli": "17.0.9",
51
+ "@angular/ssr": "17.0.9",
52
+ "@angular-devkit/architect": "0.1700.9",
53
+ "@angular-devkit/build-angular": "17.0.9",
54
+ "@angular-devkit/build-webpack": "0.1700.9",
55
+ "@angular-devkit/core": "17.0.9",
56
+ "@angular-devkit/schematics": "17.0.9"
57
57
  }
58
58
  },
59
59
  "engines": {
@@ -6,14 +6,36 @@
6
6
  * Use of this source code is governed by an MIT-style license that can be
7
7
  * found in the LICENSE file at https://angular.io/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
33
  exports.ArchitectBaseCommandModule = void 0;
11
34
  const architect_1 = require("@angular-devkit/architect");
12
35
  const node_1 = require("@angular-devkit/architect/node");
13
36
  const core_1 = require("@angular-devkit/core");
14
- const child_process_1 = require("child_process");
15
- const fs_1 = require("fs");
16
- const path_1 = require("path");
37
+ const node_fs_1 = require("node:fs");
38
+ const node_path_1 = require("node:path");
17
39
  const analytics_1 = require("../analytics/analytics");
18
40
  const analytics_parameters_1 = require("../analytics/analytics-parameters");
19
41
  const error_1 = require("../utilities/error");
@@ -140,13 +162,13 @@ class ArchitectBaseCommandModule extends command_module_1.CommandModule {
140
162
  return;
141
163
  }
142
164
  // Check for a `node_modules` directory (npm, yarn non-PnP, etc.)
143
- if ((0, fs_1.existsSync)((0, path_1.resolve)(basePath, 'node_modules'))) {
165
+ if ((0, node_fs_1.existsSync)((0, node_path_1.resolve)(basePath, 'node_modules'))) {
144
166
  return;
145
167
  }
146
168
  // Check for yarn PnP files
147
- if ((0, fs_1.existsSync)((0, path_1.resolve)(basePath, '.pnp.js')) ||
148
- (0, fs_1.existsSync)((0, path_1.resolve)(basePath, '.pnp.cjs')) ||
149
- (0, fs_1.existsSync)((0, path_1.resolve)(basePath, '.pnp.mjs'))) {
169
+ if ((0, node_fs_1.existsSync)((0, node_path_1.resolve)(basePath, '.pnp.js')) ||
170
+ (0, node_fs_1.existsSync)((0, node_path_1.resolve)(basePath, '.pnp.cjs')) ||
171
+ (0, node_fs_1.existsSync)((0, node_path_1.resolve)(basePath, '.pnp.mjs'))) {
150
172
  return;
151
173
  }
152
174
  this.context.logger.warn(`Node packages may not be installed. Try installing with '${this.context.packageManager.name} install'.`);
@@ -172,13 +194,14 @@ class ArchitectBaseCommandModule extends command_module_1.CommandModule {
172
194
  const packageToInstall = await this.getMissingTargetPackageToInstall(choices);
173
195
  if (packageToInstall) {
174
196
  // Example run: `ng add @angular-eslint/schematics`.
175
- const binPath = (0, path_1.resolve)(__dirname, '../../bin/ng.js');
176
- const { error } = (0, child_process_1.spawnSync)(process.execPath, [binPath, 'add', packageToInstall], {
177
- stdio: 'inherit',
197
+ const AddCommandModule = (await Promise.resolve().then(() => __importStar(require('../commands/add/cli')))).default;
198
+ await new AddCommandModule(this.context).run({
199
+ interactive: true,
200
+ force: false,
201
+ dryRun: false,
202
+ defaults: false,
203
+ collection: packageToInstall,
178
204
  });
179
- if (error) {
180
- throw error;
181
- }
182
205
  }
183
206
  }
184
207
  else {
@@ -46,6 +46,7 @@ class SchematicsCommandModule extends command_module_1.CommandModule {
46
46
  .option('dry-run', {
47
47
  describe: 'Run through and reports activity without writing out results.',
48
48
  type: 'boolean',
49
+ alias: ['d'],
49
50
  default: false,
50
51
  })
51
52
  .option('defaults', {
@@ -14,7 +14,7 @@ interface AddCommandArgs extends SchematicsCommandArgs {
14
14
  registry?: string;
15
15
  'skip-confirmation'?: boolean;
16
16
  }
17
- export default class AddCommadModule extends SchematicsCommandModule implements CommandModuleImplementation<AddCommandArgs> {
17
+ export default class AddCommandModule extends SchematicsCommandModule implements CommandModuleImplementation<AddCommandArgs> {
18
18
  command: string;
19
19
  describe: string;
20
20
  longDescriptionPath: string;
@@ -36,7 +36,7 @@ const packageVersionExclusions = {
36
36
  // @angular/material@7.x versions have unbounded peer dependency ranges (>=7.0.0).
37
37
  '@angular/material': '7.x',
38
38
  };
39
- class AddCommadModule extends schematics_command_module_1.SchematicsCommandModule {
39
+ class AddCommandModule extends schematics_command_module_1.SchematicsCommandModule {
40
40
  command = 'add <collection>';
41
41
  describe = 'Adds support for an external library to your project.';
42
42
  longDescriptionPath = (0, path_1.join)(__dirname, 'long-description.md');
@@ -362,4 +362,4 @@ class AddCommadModule extends schematics_command_module_1.SchematicsCommandModul
362
362
  return false;
363
363
  }
364
364
  }
365
- exports.default = AddCommadModule;
365
+ exports.default = AddCommandModule;
@@ -10,8 +10,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
10
10
  return (mod && mod.__esModule) ? mod : { "default": mod };
11
11
  };
12
12
  Object.defineProperty(exports, "__esModule", { value: true });
13
- const module_1 = __importDefault(require("module"));
14
- const path_1 = require("path");
13
+ const node_module_1 = __importDefault(require("node:module"));
14
+ const node_path_1 = require("node:path");
15
15
  const command_module_1 = require("../../command-builder/command-module");
16
16
  const color_1 = require("../../utilities/color");
17
17
  const command_config_1 = require("../command-config");
@@ -22,9 +22,7 @@ const SUPPORTED_NODE_MAJORS = [18, 20];
22
22
  const PACKAGE_PATTERNS = [
23
23
  /^@angular\/.*/,
24
24
  /^@angular-devkit\/.*/,
25
- /^@bazel\/.*/,
26
25
  /^@ngtools\/.*/,
27
- /^@nguniversal\/.*/,
28
26
  /^@schematics\/.*/,
29
27
  /^rxjs$/,
30
28
  /^typescript$/,
@@ -42,9 +40,9 @@ class VersionCommandModule extends command_module_1.CommandModule {
42
40
  }
43
41
  async run() {
44
42
  const { packageManager, logger, root } = this.context;
45
- const localRequire = module_1.default.createRequire((0, path_1.resolve)(__filename, '../../../'));
43
+ const localRequire = node_module_1.default.createRequire((0, node_path_1.resolve)(__filename, '../../../'));
46
44
  // Trailing slash is used to allow the path to be treated as a directory
47
- const workspaceRequire = module_1.default.createRequire(root + '/');
45
+ const workspaceRequire = node_module_1.default.createRequire(root + '/');
48
46
  const cliPackage = localRequire('./package.json');
49
47
  let workspacePackage;
50
48
  try {
@@ -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('17.0.7');
28
+ // export const VERSION = new Version('17.0.9');
29
29
  exports.VERSION = new Version(JSON.parse((0, fs_1.readFileSync)((0, path_1.resolve)(__dirname, '../../package.json'), 'utf-8')).version);