@angular/cli 19.2.0-next.1 → 19.2.0-rc.0
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/lib/config/schema.json +395 -2
- package/lib/init.js +5 -5
- package/package.json +16 -16
- package/src/analytics/analytics-collector.js +5 -5
- package/src/analytics/analytics.js +2 -2
- package/src/command-builder/command-module.js +3 -3
- package/src/command-builder/schematics-command-module.js +7 -7
- package/src/command-builder/utilities/schematic-engine-host.js +13 -13
- package/src/commands/add/cli.js +24 -16
- package/src/commands/build/cli.js +2 -2
- package/src/commands/cache/clean/cli.js +2 -2
- package/src/commands/cache/cli.js +2 -2
- package/src/commands/cache/info/cli.js +5 -5
- package/src/commands/cache/utilities.js +3 -3
- package/src/commands/completion/cli.js +2 -2
- package/src/commands/config/cli.js +4 -4
- package/src/commands/lint/cli.js +2 -2
- package/src/commands/run/cli.js +2 -2
- package/src/commands/test/cli.js +2 -2
- package/src/commands/update/cli.js +6 -6
- package/src/commands/update/schematic/index.js +6 -3
- package/src/utilities/completion.js +12 -12
- package/src/utilities/config.js +10 -10
- package/src/utilities/error.js +2 -2
- package/src/utilities/find-up.js +3 -3
- package/src/utilities/json-file.js +4 -4
- package/src/utilities/log-file.js +6 -6
- package/src/utilities/package-manager.js +11 -11
- package/src/utilities/package-metadata.js +7 -7
- package/src/utilities/package-tree.js +4 -4
- package/src/utilities/project.js +3 -3
- package/src/utilities/version.js +1 -1
package/lib/config/schema.json
CHANGED
|
@@ -468,6 +468,7 @@
|
|
|
468
468
|
"@angular/build:application",
|
|
469
469
|
"@angular/build:dev-server",
|
|
470
470
|
"@angular/build:extract-i18n",
|
|
471
|
+
"@angular/build:karma",
|
|
471
472
|
"@angular/build:ng-packagr",
|
|
472
473
|
"@angular-devkit/build-angular:application",
|
|
473
474
|
"@angular-devkit/build-angular:app-shell",
|
|
@@ -703,6 +704,28 @@
|
|
|
703
704
|
}
|
|
704
705
|
}
|
|
705
706
|
},
|
|
707
|
+
{
|
|
708
|
+
"type": "object",
|
|
709
|
+
"additionalProperties": false,
|
|
710
|
+
"properties": {
|
|
711
|
+
"builder": {
|
|
712
|
+
"const": "@angular/build:karma"
|
|
713
|
+
},
|
|
714
|
+
"defaultConfiguration": {
|
|
715
|
+
"type": "string",
|
|
716
|
+
"description": "A default named configuration to use when a target configuration is not provided."
|
|
717
|
+
},
|
|
718
|
+
"options": {
|
|
719
|
+
"$ref": "#/definitions/AngularBuildBuildersKarmaSchema"
|
|
720
|
+
},
|
|
721
|
+
"configurations": {
|
|
722
|
+
"type": "object",
|
|
723
|
+
"additionalProperties": {
|
|
724
|
+
"$ref": "#/definitions/AngularBuildBuildersKarmaSchema"
|
|
725
|
+
}
|
|
726
|
+
}
|
|
727
|
+
}
|
|
728
|
+
},
|
|
706
729
|
{
|
|
707
730
|
"type": "object",
|
|
708
731
|
"additionalProperties": false,
|
|
@@ -3814,12 +3837,12 @@
|
|
|
3814
3837
|
"description": "SSL certificate to use for serving HTTPS."
|
|
3815
3838
|
},
|
|
3816
3839
|
"allowedHosts": {
|
|
3817
|
-
"description": "The hosts that
|
|
3840
|
+
"description": "The hosts that the development server will respond to. This option sets the Vite option of the same name. For further details: https://vite.dev/config/server-options.html#server-allowedhosts",
|
|
3818
3841
|
"default": [],
|
|
3819
3842
|
"oneOf": [
|
|
3820
3843
|
{
|
|
3821
3844
|
"type": "array",
|
|
3822
|
-
"description": "
|
|
3845
|
+
"description": "A list of hosts that the development server will respond to.",
|
|
3823
3846
|
"items": {
|
|
3824
3847
|
"type": "string"
|
|
3825
3848
|
}
|
|
@@ -4132,6 +4155,361 @@
|
|
|
4132
4155
|
},
|
|
4133
4156
|
"additionalProperties": false
|
|
4134
4157
|
},
|
|
4158
|
+
"AngularBuildBuildersKarmaSchema": {
|
|
4159
|
+
"title": "Karma Target",
|
|
4160
|
+
"description": "Karma target options for Build Facade.",
|
|
4161
|
+
"type": "object",
|
|
4162
|
+
"properties": {
|
|
4163
|
+
"main": {
|
|
4164
|
+
"type": "string",
|
|
4165
|
+
"description": "The name of the main entry-point file."
|
|
4166
|
+
},
|
|
4167
|
+
"tsConfig": {
|
|
4168
|
+
"type": "string",
|
|
4169
|
+
"description": "The name of the TypeScript configuration file."
|
|
4170
|
+
},
|
|
4171
|
+
"karmaConfig": {
|
|
4172
|
+
"type": "string",
|
|
4173
|
+
"description": "The name of the Karma configuration file."
|
|
4174
|
+
},
|
|
4175
|
+
"polyfills": {
|
|
4176
|
+
"description": "A list of polyfills to include in the build. Can be a full path for a file, relative to the current workspace or module specifier. Example: 'zone.js'.",
|
|
4177
|
+
"type": "array",
|
|
4178
|
+
"items": {
|
|
4179
|
+
"type": "string",
|
|
4180
|
+
"uniqueItems": true
|
|
4181
|
+
},
|
|
4182
|
+
"default": []
|
|
4183
|
+
},
|
|
4184
|
+
"assets": {
|
|
4185
|
+
"type": "array",
|
|
4186
|
+
"description": "List of static application assets.",
|
|
4187
|
+
"default": [],
|
|
4188
|
+
"items": {
|
|
4189
|
+
"$ref": "#/definitions/AngularBuildBuildersKarmaSchema/definitions/assetPattern"
|
|
4190
|
+
}
|
|
4191
|
+
},
|
|
4192
|
+
"scripts": {
|
|
4193
|
+
"description": "Global scripts to be included in the build.",
|
|
4194
|
+
"type": "array",
|
|
4195
|
+
"default": [],
|
|
4196
|
+
"items": {
|
|
4197
|
+
"oneOf": [
|
|
4198
|
+
{
|
|
4199
|
+
"type": "object",
|
|
4200
|
+
"properties": {
|
|
4201
|
+
"input": {
|
|
4202
|
+
"type": "string",
|
|
4203
|
+
"description": "The file to include.",
|
|
4204
|
+
"pattern": "\\.[cm]?jsx?$"
|
|
4205
|
+
},
|
|
4206
|
+
"bundleName": {
|
|
4207
|
+
"type": "string",
|
|
4208
|
+
"pattern": "^[\\w\\-.]*$",
|
|
4209
|
+
"description": "The bundle name for this extra entry point."
|
|
4210
|
+
},
|
|
4211
|
+
"inject": {
|
|
4212
|
+
"type": "boolean",
|
|
4213
|
+
"description": "If the bundle will be referenced in the HTML file.",
|
|
4214
|
+
"default": true
|
|
4215
|
+
}
|
|
4216
|
+
},
|
|
4217
|
+
"additionalProperties": false
|
|
4218
|
+
},
|
|
4219
|
+
{
|
|
4220
|
+
"type": "string",
|
|
4221
|
+
"description": "The file to include.",
|
|
4222
|
+
"pattern": "\\.[cm]?jsx?$"
|
|
4223
|
+
}
|
|
4224
|
+
]
|
|
4225
|
+
}
|
|
4226
|
+
},
|
|
4227
|
+
"styles": {
|
|
4228
|
+
"description": "Global styles to be included in the build.",
|
|
4229
|
+
"type": "array",
|
|
4230
|
+
"default": [],
|
|
4231
|
+
"items": {
|
|
4232
|
+
"oneOf": [
|
|
4233
|
+
{
|
|
4234
|
+
"type": "object",
|
|
4235
|
+
"properties": {
|
|
4236
|
+
"input": {
|
|
4237
|
+
"type": "string",
|
|
4238
|
+
"description": "The file to include.",
|
|
4239
|
+
"pattern": "\\.(?:css|scss|sass|less)$"
|
|
4240
|
+
},
|
|
4241
|
+
"bundleName": {
|
|
4242
|
+
"type": "string",
|
|
4243
|
+
"pattern": "^[\\w\\-.]*$",
|
|
4244
|
+
"description": "The bundle name for this extra entry point."
|
|
4245
|
+
},
|
|
4246
|
+
"inject": {
|
|
4247
|
+
"type": "boolean",
|
|
4248
|
+
"description": "If the bundle will be referenced in the HTML file.",
|
|
4249
|
+
"default": true
|
|
4250
|
+
}
|
|
4251
|
+
},
|
|
4252
|
+
"additionalProperties": false
|
|
4253
|
+
},
|
|
4254
|
+
{
|
|
4255
|
+
"type": "string",
|
|
4256
|
+
"description": "The file to include.",
|
|
4257
|
+
"pattern": "\\.(?:css|scss|sass|less)$"
|
|
4258
|
+
}
|
|
4259
|
+
]
|
|
4260
|
+
}
|
|
4261
|
+
},
|
|
4262
|
+
"inlineStyleLanguage": {
|
|
4263
|
+
"description": "The stylesheet language to use for the application's inline component styles.",
|
|
4264
|
+
"type": "string",
|
|
4265
|
+
"default": "css",
|
|
4266
|
+
"enum": [
|
|
4267
|
+
"css",
|
|
4268
|
+
"less",
|
|
4269
|
+
"sass",
|
|
4270
|
+
"scss"
|
|
4271
|
+
]
|
|
4272
|
+
},
|
|
4273
|
+
"stylePreprocessorOptions": {
|
|
4274
|
+
"description": "Options to pass to style preprocessors.",
|
|
4275
|
+
"type": "object",
|
|
4276
|
+
"properties": {
|
|
4277
|
+
"includePaths": {
|
|
4278
|
+
"description": "Paths to include. Paths will be resolved to workspace root.",
|
|
4279
|
+
"type": "array",
|
|
4280
|
+
"items": {
|
|
4281
|
+
"type": "string"
|
|
4282
|
+
},
|
|
4283
|
+
"default": []
|
|
4284
|
+
},
|
|
4285
|
+
"sass": {
|
|
4286
|
+
"description": "Options to pass to the sass preprocessor.",
|
|
4287
|
+
"type": "object",
|
|
4288
|
+
"properties": {
|
|
4289
|
+
"fatalDeprecations": {
|
|
4290
|
+
"description": "A set of deprecations to treat as fatal. If a deprecation warning of any provided type is encountered during compilation, the compiler will error instead. If a Version is provided, then all deprecations that were active in that compiler version will be treated as fatal.",
|
|
4291
|
+
"type": "array",
|
|
4292
|
+
"items": {
|
|
4293
|
+
"type": "string"
|
|
4294
|
+
}
|
|
4295
|
+
},
|
|
4296
|
+
"silenceDeprecations": {
|
|
4297
|
+
"description": " A set of active deprecations to ignore. If a deprecation warning of any provided type is encountered during compilation, the compiler will ignore it instead.",
|
|
4298
|
+
"type": "array",
|
|
4299
|
+
"items": {
|
|
4300
|
+
"type": "string"
|
|
4301
|
+
}
|
|
4302
|
+
},
|
|
4303
|
+
"futureDeprecations": {
|
|
4304
|
+
"description": "A set of future deprecations to opt into early. Future deprecations passed here will be treated as active by the compiler, emitting warnings as necessary.",
|
|
4305
|
+
"type": "array",
|
|
4306
|
+
"items": {
|
|
4307
|
+
"type": "string"
|
|
4308
|
+
}
|
|
4309
|
+
}
|
|
4310
|
+
},
|
|
4311
|
+
"additionalProperties": false
|
|
4312
|
+
}
|
|
4313
|
+
},
|
|
4314
|
+
"additionalProperties": false
|
|
4315
|
+
},
|
|
4316
|
+
"externalDependencies": {
|
|
4317
|
+
"description": "Exclude the listed external dependencies from being bundled into the bundle. Instead, the created bundle relies on these dependencies to be available during runtime.",
|
|
4318
|
+
"type": "array",
|
|
4319
|
+
"items": {
|
|
4320
|
+
"type": "string"
|
|
4321
|
+
},
|
|
4322
|
+
"default": []
|
|
4323
|
+
},
|
|
4324
|
+
"loader": {
|
|
4325
|
+
"description": "Defines the type of loader to use with a specified file extension when used with a JavaScript `import`. `text` inlines the content as a string; `binary` inlines the content as a Uint8Array; `file` emits the file and provides the runtime location of the file; `empty` considers the content to be empty and not include it in bundles.",
|
|
4326
|
+
"type": "object",
|
|
4327
|
+
"patternProperties": {
|
|
4328
|
+
"^\\.\\S+$": {
|
|
4329
|
+
"enum": [
|
|
4330
|
+
"text",
|
|
4331
|
+
"binary",
|
|
4332
|
+
"file",
|
|
4333
|
+
"empty"
|
|
4334
|
+
]
|
|
4335
|
+
}
|
|
4336
|
+
}
|
|
4337
|
+
},
|
|
4338
|
+
"define": {
|
|
4339
|
+
"description": "Defines global identifiers that will be replaced with a specified constant value when found in any JavaScript or TypeScript code including libraries. The value will be used directly. String values must be put in quotes. Identifiers within Angular metadata such as Component Decorators will not be replaced.",
|
|
4340
|
+
"type": "object",
|
|
4341
|
+
"additionalProperties": {
|
|
4342
|
+
"type": "string"
|
|
4343
|
+
}
|
|
4344
|
+
},
|
|
4345
|
+
"include": {
|
|
4346
|
+
"type": "array",
|
|
4347
|
+
"items": {
|
|
4348
|
+
"type": "string"
|
|
4349
|
+
},
|
|
4350
|
+
"default": [
|
|
4351
|
+
"**/*.spec.ts"
|
|
4352
|
+
],
|
|
4353
|
+
"description": "Globs of files to include, relative to project root. \nThere are 2 special cases:\n - when a path to directory is provided, all spec files ending \".spec.@(ts|tsx)\" will be included\n - when a path to a file is provided, and a matching spec file exists it will be included instead."
|
|
4354
|
+
},
|
|
4355
|
+
"exclude": {
|
|
4356
|
+
"type": "array",
|
|
4357
|
+
"items": {
|
|
4358
|
+
"type": "string"
|
|
4359
|
+
},
|
|
4360
|
+
"default": [],
|
|
4361
|
+
"description": "Globs of files to exclude, relative to the project root."
|
|
4362
|
+
},
|
|
4363
|
+
"sourceMap": {
|
|
4364
|
+
"description": "Output source maps for scripts and styles. For more information, see https://angular.dev/reference/configs/workspace-config#source-map-configuration.",
|
|
4365
|
+
"default": true,
|
|
4366
|
+
"oneOf": [
|
|
4367
|
+
{
|
|
4368
|
+
"type": "object",
|
|
4369
|
+
"properties": {
|
|
4370
|
+
"scripts": {
|
|
4371
|
+
"type": "boolean",
|
|
4372
|
+
"description": "Output source maps for all scripts.",
|
|
4373
|
+
"default": true
|
|
4374
|
+
},
|
|
4375
|
+
"styles": {
|
|
4376
|
+
"type": "boolean",
|
|
4377
|
+
"description": "Output source maps for all styles.",
|
|
4378
|
+
"default": true
|
|
4379
|
+
},
|
|
4380
|
+
"vendor": {
|
|
4381
|
+
"type": "boolean",
|
|
4382
|
+
"description": "Resolve vendor packages source maps.",
|
|
4383
|
+
"default": false
|
|
4384
|
+
}
|
|
4385
|
+
},
|
|
4386
|
+
"additionalProperties": false
|
|
4387
|
+
},
|
|
4388
|
+
{
|
|
4389
|
+
"type": "boolean"
|
|
4390
|
+
}
|
|
4391
|
+
]
|
|
4392
|
+
},
|
|
4393
|
+
"progress": {
|
|
4394
|
+
"type": "boolean",
|
|
4395
|
+
"description": "Log progress to the console while building.",
|
|
4396
|
+
"default": true
|
|
4397
|
+
},
|
|
4398
|
+
"watch": {
|
|
4399
|
+
"type": "boolean",
|
|
4400
|
+
"description": "Run build when files change."
|
|
4401
|
+
},
|
|
4402
|
+
"poll": {
|
|
4403
|
+
"type": "number",
|
|
4404
|
+
"description": "Enable and define the file watching poll time period in milliseconds."
|
|
4405
|
+
},
|
|
4406
|
+
"preserveSymlinks": {
|
|
4407
|
+
"type": "boolean",
|
|
4408
|
+
"description": "Do not use the real path when resolving modules. If unset then will default to `true` if NodeJS option --preserve-symlinks is set."
|
|
4409
|
+
},
|
|
4410
|
+
"browsers": {
|
|
4411
|
+
"description": "Override which browsers tests are run against. Set to `false` to not use any browser.",
|
|
4412
|
+
"oneOf": [
|
|
4413
|
+
{
|
|
4414
|
+
"type": "string",
|
|
4415
|
+
"description": "A comma seperate list of browsers to run tests against."
|
|
4416
|
+
},
|
|
4417
|
+
{
|
|
4418
|
+
"const": false,
|
|
4419
|
+
"type": "boolean",
|
|
4420
|
+
"description": "Does use run tests against a browser."
|
|
4421
|
+
}
|
|
4422
|
+
]
|
|
4423
|
+
},
|
|
4424
|
+
"codeCoverage": {
|
|
4425
|
+
"type": "boolean",
|
|
4426
|
+
"description": "Output a code coverage report.",
|
|
4427
|
+
"default": false
|
|
4428
|
+
},
|
|
4429
|
+
"codeCoverageExclude": {
|
|
4430
|
+
"type": "array",
|
|
4431
|
+
"description": "Globs to exclude from code coverage.",
|
|
4432
|
+
"items": {
|
|
4433
|
+
"type": "string"
|
|
4434
|
+
},
|
|
4435
|
+
"default": []
|
|
4436
|
+
},
|
|
4437
|
+
"fileReplacements": {
|
|
4438
|
+
"description": "Replace compilation source files with other compilation source files in the build.",
|
|
4439
|
+
"type": "array",
|
|
4440
|
+
"items": {
|
|
4441
|
+
"$ref": "#/definitions/AngularBuildBuildersKarmaSchema/definitions/fileReplacement"
|
|
4442
|
+
},
|
|
4443
|
+
"default": []
|
|
4444
|
+
},
|
|
4445
|
+
"reporters": {
|
|
4446
|
+
"type": "array",
|
|
4447
|
+
"description": "Karma reporters to use. Directly passed to the karma runner.",
|
|
4448
|
+
"items": {
|
|
4449
|
+
"type": "string"
|
|
4450
|
+
}
|
|
4451
|
+
},
|
|
4452
|
+
"webWorkerTsConfig": {
|
|
4453
|
+
"type": "string",
|
|
4454
|
+
"description": "TypeScript configuration for Web Worker modules."
|
|
4455
|
+
},
|
|
4456
|
+
"aot": {
|
|
4457
|
+
"type": "boolean",
|
|
4458
|
+
"description": "Run tests using Ahead of Time compilation.",
|
|
4459
|
+
"default": false
|
|
4460
|
+
}
|
|
4461
|
+
},
|
|
4462
|
+
"additionalProperties": false,
|
|
4463
|
+
"definitions": {
|
|
4464
|
+
"assetPattern": {
|
|
4465
|
+
"oneOf": [
|
|
4466
|
+
{
|
|
4467
|
+
"type": "object",
|
|
4468
|
+
"properties": {
|
|
4469
|
+
"glob": {
|
|
4470
|
+
"type": "string",
|
|
4471
|
+
"description": "The pattern to match."
|
|
4472
|
+
},
|
|
4473
|
+
"input": {
|
|
4474
|
+
"type": "string",
|
|
4475
|
+
"description": "The input directory path in which to apply 'glob'. Defaults to the project root."
|
|
4476
|
+
},
|
|
4477
|
+
"output": {
|
|
4478
|
+
"type": "string",
|
|
4479
|
+
"default": "",
|
|
4480
|
+
"description": "Absolute path within the output."
|
|
4481
|
+
},
|
|
4482
|
+
"ignore": {
|
|
4483
|
+
"description": "An array of globs to ignore.",
|
|
4484
|
+
"type": "array",
|
|
4485
|
+
"items": {
|
|
4486
|
+
"type": "string"
|
|
4487
|
+
}
|
|
4488
|
+
}
|
|
4489
|
+
},
|
|
4490
|
+
"additionalProperties": false
|
|
4491
|
+
},
|
|
4492
|
+
{
|
|
4493
|
+
"type": "string"
|
|
4494
|
+
}
|
|
4495
|
+
]
|
|
4496
|
+
},
|
|
4497
|
+
"fileReplacement": {
|
|
4498
|
+
"type": "object",
|
|
4499
|
+
"properties": {
|
|
4500
|
+
"replace": {
|
|
4501
|
+
"type": "string",
|
|
4502
|
+
"pattern": "\\.(([cm]?[jt])sx?|json)$"
|
|
4503
|
+
},
|
|
4504
|
+
"with": {
|
|
4505
|
+
"type": "string",
|
|
4506
|
+
"pattern": "\\.(([cm]?[jt])sx?|json)$"
|
|
4507
|
+
}
|
|
4508
|
+
},
|
|
4509
|
+
"additionalProperties": false
|
|
4510
|
+
}
|
|
4511
|
+
}
|
|
4512
|
+
},
|
|
4135
4513
|
"AngularDevkitBuildAngularBuildersKarmaSchema": {
|
|
4136
4514
|
"title": "Karma Target",
|
|
4137
4515
|
"description": "Karma target options for Build Facade.",
|
|
@@ -4416,6 +4794,11 @@
|
|
|
4416
4794
|
"webWorkerTsConfig": {
|
|
4417
4795
|
"type": "string",
|
|
4418
4796
|
"description": "TypeScript configuration for Web Worker modules."
|
|
4797
|
+
},
|
|
4798
|
+
"aot": {
|
|
4799
|
+
"type": "boolean",
|
|
4800
|
+
"description": "Run tests using Ahead of Time compilation.",
|
|
4801
|
+
"default": false
|
|
4419
4802
|
}
|
|
4420
4803
|
},
|
|
4421
4804
|
"additionalProperties": false,
|
|
@@ -4490,6 +4873,11 @@
|
|
|
4490
4873
|
"uniqueItems": true
|
|
4491
4874
|
},
|
|
4492
4875
|
"default": []
|
|
4876
|
+
},
|
|
4877
|
+
"aot": {
|
|
4878
|
+
"type": "boolean",
|
|
4879
|
+
"description": "Run tests using Ahead of Time compilation.",
|
|
4880
|
+
"default": false
|
|
4493
4881
|
}
|
|
4494
4882
|
},
|
|
4495
4883
|
"additionalProperties": false
|
|
@@ -4747,6 +5135,11 @@
|
|
|
4747
5135
|
"webWorkerTsConfig": {
|
|
4748
5136
|
"type": "string",
|
|
4749
5137
|
"description": "TypeScript configuration for Web Worker modules."
|
|
5138
|
+
},
|
|
5139
|
+
"aot": {
|
|
5140
|
+
"type": "boolean",
|
|
5141
|
+
"description": "Run tests using Ahead of Time compilation.",
|
|
5142
|
+
"default": false
|
|
4750
5143
|
}
|
|
4751
5144
|
},
|
|
4752
5145
|
"additionalProperties": false,
|
package/lib/init.js
CHANGED
|
@@ -42,9 +42,9 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
42
42
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
43
43
|
require("symbol-observable");
|
|
44
44
|
// symbol polyfill must go first
|
|
45
|
-
const
|
|
46
|
-
const
|
|
47
|
-
const path = __importStar(require("path"));
|
|
45
|
+
const node_fs_1 = require("node:fs");
|
|
46
|
+
const node_module_1 = require("node:module");
|
|
47
|
+
const path = __importStar(require("node:path"));
|
|
48
48
|
const semver_1 = require("semver");
|
|
49
49
|
const color_1 = require("../src/utilities/color");
|
|
50
50
|
const config_1 = require("../src/utilities/config");
|
|
@@ -81,7 +81,7 @@ let forceExit = false;
|
|
|
81
81
|
try {
|
|
82
82
|
// No error implies a projectLocalCli, which will load whatever
|
|
83
83
|
// version of ng-cli you have installed in a local package.json
|
|
84
|
-
const cwdRequire = (0,
|
|
84
|
+
const cwdRequire = (0, node_module_1.createRequire)(process.cwd() + '/');
|
|
85
85
|
const projectLocalCli = cwdRequire.resolve('@angular/cli');
|
|
86
86
|
cli = await Promise.resolve(`${projectLocalCli}`).then(s => __importStar(require(s)));
|
|
87
87
|
const globalVersion = new semver_1.SemVer(version_1.VERSION.full);
|
|
@@ -89,7 +89,7 @@ let forceExit = false;
|
|
|
89
89
|
let localVersion = cli.VERSION?.full;
|
|
90
90
|
if (!localVersion) {
|
|
91
91
|
try {
|
|
92
|
-
const localPackageJson = await
|
|
92
|
+
const localPackageJson = await node_fs_1.promises.readFile(path.join(path.dirname(projectLocalCli), '../../package.json'), 'utf-8');
|
|
93
93
|
localVersion = JSON.parse(localPackageJson).version;
|
|
94
94
|
}
|
|
95
95
|
catch (error) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@angular/cli",
|
|
3
|
-
"version": "19.2.0-
|
|
3
|
+
"version": "19.2.0-rc.0",
|
|
4
4
|
"description": "CLI tool for Angular",
|
|
5
5
|
"main": "lib/cli/index.js",
|
|
6
6
|
"bin": {
|
|
@@ -25,35 +25,35 @@
|
|
|
25
25
|
},
|
|
26
26
|
"homepage": "https://github.com/angular/angular-cli",
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@angular-devkit/architect": "0.1902.0-
|
|
29
|
-
"@angular-devkit/core": "19.2.0-
|
|
30
|
-
"@angular-devkit/schematics": "19.2.0-
|
|
31
|
-
"@inquirer/prompts": "7.2
|
|
28
|
+
"@angular-devkit/architect": "0.1902.0-rc.0",
|
|
29
|
+
"@angular-devkit/core": "19.2.0-rc.0",
|
|
30
|
+
"@angular-devkit/schematics": "19.2.0-rc.0",
|
|
31
|
+
"@inquirer/prompts": "7.3.2",
|
|
32
32
|
"@listr2/prompt-adapter-inquirer": "2.0.18",
|
|
33
|
-
"@schematics/angular": "19.2.0-
|
|
33
|
+
"@schematics/angular": "19.2.0-rc.0",
|
|
34
34
|
"@yarnpkg/lockfile": "1.1.0",
|
|
35
35
|
"ini": "5.0.0",
|
|
36
36
|
"jsonc-parser": "3.3.1",
|
|
37
37
|
"listr2": "8.2.5",
|
|
38
|
-
"npm-package-arg": "12.0.
|
|
38
|
+
"npm-package-arg": "12.0.2",
|
|
39
39
|
"npm-pick-manifest": "10.0.0",
|
|
40
40
|
"pacote": "20.0.0",
|
|
41
41
|
"resolve": "1.22.10",
|
|
42
|
-
"semver": "7.
|
|
42
|
+
"semver": "7.7.1",
|
|
43
43
|
"symbol-observable": "4.0.0",
|
|
44
44
|
"yargs": "17.7.2"
|
|
45
45
|
},
|
|
46
46
|
"ng-update": {
|
|
47
47
|
"migrations": "@schematics/angular/migrations/migration-collection.json",
|
|
48
48
|
"packageGroup": {
|
|
49
|
-
"@angular/cli": "19.2.0-
|
|
50
|
-
"@angular/build": "19.2.0-
|
|
51
|
-
"@angular/ssr": "19.2.0-
|
|
52
|
-
"@angular-devkit/architect": "0.1902.0-
|
|
53
|
-
"@angular-devkit/build-angular": "19.2.0-
|
|
54
|
-
"@angular-devkit/build-webpack": "0.1902.0-
|
|
55
|
-
"@angular-devkit/core": "19.2.0-
|
|
56
|
-
"@angular-devkit/schematics": "19.2.0-
|
|
49
|
+
"@angular/cli": "19.2.0-rc.0",
|
|
50
|
+
"@angular/build": "19.2.0-rc.0",
|
|
51
|
+
"@angular/ssr": "19.2.0-rc.0",
|
|
52
|
+
"@angular-devkit/architect": "0.1902.0-rc.0",
|
|
53
|
+
"@angular-devkit/build-angular": "19.2.0-rc.0",
|
|
54
|
+
"@angular-devkit/build-webpack": "0.1902.0-rc.0",
|
|
55
|
+
"@angular-devkit/core": "19.2.0-rc.0",
|
|
56
|
+
"@angular-devkit/schematics": "19.2.0-rc.0"
|
|
57
57
|
}
|
|
58
58
|
},
|
|
59
59
|
"engines": {
|
|
@@ -41,10 +41,10 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
41
41
|
})();
|
|
42
42
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
43
43
|
exports.AnalyticsCollector = void 0;
|
|
44
|
-
const
|
|
45
|
-
const https = __importStar(require("https"));
|
|
46
|
-
const os = __importStar(require("os"));
|
|
47
|
-
const querystring = __importStar(require("querystring"));
|
|
44
|
+
const node_crypto_1 = require("node:crypto");
|
|
45
|
+
const https = __importStar(require("node:https"));
|
|
46
|
+
const os = __importStar(require("node:os"));
|
|
47
|
+
const querystring = __importStar(require("node:querystring"));
|
|
48
48
|
const semver = __importStar(require("semver"));
|
|
49
49
|
const environment_options_1 = require("../utilities/environment-options");
|
|
50
50
|
const error_1 = require("../utilities/error");
|
|
@@ -67,7 +67,7 @@ class AnalyticsCollector {
|
|
|
67
67
|
? TRACKING_ID_PROD
|
|
68
68
|
: TRACKING_ID_STAGING,
|
|
69
69
|
// Built-in user properties
|
|
70
|
-
[analytics_parameters_1.RequestParameter.SessionId]: (0,
|
|
70
|
+
[analytics_parameters_1.RequestParameter.SessionId]: (0, node_crypto_1.randomUUID)(),
|
|
71
71
|
[analytics_parameters_1.RequestParameter.UserAgentArchitecture]: os.arch(),
|
|
72
72
|
[analytics_parameters_1.RequestParameter.UserAgentPlatform]: os.platform(),
|
|
73
73
|
[analytics_parameters_1.RequestParameter.UserAgentPlatformVersion]: os.release(),
|
|
@@ -14,7 +14,7 @@ exports.promptAnalytics = promptAnalytics;
|
|
|
14
14
|
exports.getAnalyticsUserId = getAnalyticsUserId;
|
|
15
15
|
exports.getAnalyticsInfoString = getAnalyticsInfoString;
|
|
16
16
|
const core_1 = require("@angular-devkit/core");
|
|
17
|
-
const
|
|
17
|
+
const node_crypto_1 = require("node:crypto");
|
|
18
18
|
const color_1 = require("../utilities/color");
|
|
19
19
|
const config_1 = require("../utilities/config");
|
|
20
20
|
const environment_options_1 = require("../utilities/environment-options");
|
|
@@ -55,7 +55,7 @@ async function setAnalyticsConfig(global, value) {
|
|
|
55
55
|
if (!workspace || !core_1.json.isJsonObject(cli)) {
|
|
56
56
|
throw new Error(`Invalid config found at ${workspace.filePath}. CLI should be an object.`);
|
|
57
57
|
}
|
|
58
|
-
cli.analytics = value === true ? (0,
|
|
58
|
+
cli.analytics = value === true ? (0, node_crypto_1.randomUUID)() : value;
|
|
59
59
|
await workspace.save();
|
|
60
60
|
}
|
|
61
61
|
/**
|
|
@@ -79,8 +79,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
79
79
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
80
80
|
exports.CommandModuleError = exports.CommandModule = exports.CommandScope = void 0;
|
|
81
81
|
const core_1 = require("@angular-devkit/core");
|
|
82
|
-
const
|
|
83
|
-
const path = __importStar(require("path"));
|
|
82
|
+
const node_fs_1 = require("node:fs");
|
|
83
|
+
const path = __importStar(require("node:path"));
|
|
84
84
|
const yargs_1 = __importDefault(require("yargs"));
|
|
85
85
|
const helpers_1 = require("yargs/helpers");
|
|
86
86
|
const analytics_1 = require("../analytics/analytics");
|
|
@@ -131,7 +131,7 @@ let CommandModule = (() => {
|
|
|
131
131
|
longDescriptionRelativePath: path
|
|
132
132
|
.relative(path.join(__dirname, '../../../../'), this.longDescriptionPath)
|
|
133
133
|
.replace(/\\/g, path.posix.sep),
|
|
134
|
-
longDescription: (0,
|
|
134
|
+
longDescription: (0, node_fs_1.readFileSync)(this.longDescriptionPath, 'utf8').replace(/\r\n/g, '\n'),
|
|
135
135
|
}
|
|
136
136
|
: {}),
|
|
137
137
|
};
|
|
@@ -78,7 +78,7 @@ exports.SchematicsCommandModule = exports.DEFAULT_SCHEMATICS_COLLECTION = void 0
|
|
|
78
78
|
const core_1 = require("@angular-devkit/core");
|
|
79
79
|
const schematics_1 = require("@angular-devkit/schematics");
|
|
80
80
|
const tools_1 = require("@angular-devkit/schematics/tools");
|
|
81
|
-
const
|
|
81
|
+
const node_path_1 = require("node:path");
|
|
82
82
|
const analytics_1 = require("../analytics/analytics");
|
|
83
83
|
const analytics_parameters_1 = require("../analytics/analytics-parameters");
|
|
84
84
|
const config_1 = require("../utilities/config");
|
|
@@ -176,7 +176,7 @@ let SchematicsCommandModule = (() => {
|
|
|
176
176
|
workflow.registry.addPostTransform(core_1.schema.transforms.addUndefinedDefaults);
|
|
177
177
|
workflow.registry.useXDeprecatedProvider((msg) => logger.warn(msg));
|
|
178
178
|
workflow.registry.addSmartDefaultProvider('projectName', () => this.getProjectName());
|
|
179
|
-
const workingDir = (0, core_1.normalize)((0,
|
|
179
|
+
const workingDir = (0, core_1.normalize)((0, node_path_1.relative)(this.context.root, process.cwd()));
|
|
180
180
|
workflow.registry.addSmartDefaultProvider('workingDirectory', () => workingDir === '' ? undefined : workingDir);
|
|
181
181
|
let shouldReportAnalytics = true;
|
|
182
182
|
workflow.engineHost.registerOptionsTransform(async (schematic, options) => {
|
|
@@ -286,17 +286,13 @@ let SchematicsCommandModule = (() => {
|
|
|
286
286
|
return workflow;
|
|
287
287
|
}
|
|
288
288
|
async getSchematicCollections() {
|
|
289
|
-
// Resolve relative collections from the location of `angular.json`
|
|
290
|
-
const resolveRelativeCollection = (collectionName) => collectionName.charAt(0) === '.'
|
|
291
|
-
? (0, path_1.resolve)(this.context.root, collectionName)
|
|
292
|
-
: collectionName;
|
|
293
289
|
const getSchematicCollections = (configSection) => {
|
|
294
290
|
if (!configSection) {
|
|
295
291
|
return undefined;
|
|
296
292
|
}
|
|
297
293
|
const { schematicCollections } = configSection;
|
|
298
294
|
if (Array.isArray(schematicCollections)) {
|
|
299
|
-
return new Set(schematicCollections
|
|
295
|
+
return new Set(schematicCollections);
|
|
300
296
|
}
|
|
301
297
|
return undefined;
|
|
302
298
|
};
|
|
@@ -379,6 +375,10 @@ let SchematicsCommandModule = (() => {
|
|
|
379
375
|
}
|
|
380
376
|
getResolvePaths(collectionName) {
|
|
381
377
|
const { workspace, root } = this.context;
|
|
378
|
+
if (collectionName[0] === '.') {
|
|
379
|
+
// Resolve relative collections from the location of `angular.json`
|
|
380
|
+
return [root];
|
|
381
|
+
}
|
|
382
382
|
return workspace
|
|
383
383
|
? // Workspace
|
|
384
384
|
collectionName === exports.DEFAULT_SCHEMATICS_COLLECTION
|