@angular/cli 14.0.3 → 14.0.6

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.
@@ -23,7 +23,7 @@
23
23
  "defaultProject": {
24
24
  "type": "string",
25
25
  "description": "Default project name used in commands.",
26
- "x-deprecated": "The project to use will be determined from the current working directory."
26
+ "deprecated": true
27
27
  },
28
28
  "projects": {
29
29
  "type": "object",
@@ -46,7 +46,7 @@
46
46
  "defaultCollection": {
47
47
  "description": "The default schematics collection to use.",
48
48
  "type": "string",
49
- "x-deprecated": "Use 'schematicCollections' instead."
49
+ "deprecated": true
50
50
  },
51
51
  "schematicCollections": {
52
52
  "type": "array",
@@ -74,7 +74,8 @@
74
74
  "description": "Show a warning when the global version is newer than the local one.",
75
75
  "type": "boolean"
76
76
  }
77
- }
77
+ },
78
+ "additionalProperties": false
78
79
  },
79
80
  "analytics": {
80
81
  "type": [
@@ -96,7 +97,8 @@
96
97
  "type": "string",
97
98
  "format": "uuid"
98
99
  }
99
- }
100
+ },
101
+ "additionalProperties": false
100
102
  },
101
103
  "cache": {
102
104
  "description": "Control disk cache.",
@@ -119,7 +121,82 @@
119
121
  "description": "Cache base path.",
120
122
  "type": "string"
121
123
  }
124
+ },
125
+ "additionalProperties": false
126
+ }
127
+ },
128
+ "additionalProperties": false
129
+ },
130
+ "cliGlobalOptions": {
131
+ "type": "object",
132
+ "properties": {
133
+ "defaultCollection": {
134
+ "description": "The default schematics collection to use.",
135
+ "type": "string",
136
+ "deprecated": true
137
+ },
138
+ "schematicCollections": {
139
+ "type": "array",
140
+ "description": "The list of schematic collections to use.",
141
+ "items": {
142
+ "type": "string",
143
+ "uniqueItems": true
122
144
  }
145
+ },
146
+ "packageManager": {
147
+ "description": "Specify which package manager tool to use.",
148
+ "type": "string",
149
+ "enum": [
150
+ "npm",
151
+ "cnpm",
152
+ "yarn",
153
+ "pnpm"
154
+ ]
155
+ },
156
+ "warnings": {
157
+ "description": "Control CLI specific console warnings",
158
+ "type": "object",
159
+ "properties": {
160
+ "versionMismatch": {
161
+ "description": "Show a warning when the global version is newer than the local one.",
162
+ "type": "boolean"
163
+ }
164
+ },
165
+ "additionalProperties": false
166
+ },
167
+ "analytics": {
168
+ "type": [
169
+ "boolean",
170
+ "string"
171
+ ],
172
+ "description": "Share anonymous usage data with the Angular Team at Google."
173
+ },
174
+ "analyticsSharing": {
175
+ "type": "object",
176
+ "properties": {
177
+ "tracking": {
178
+ "description": "Analytics sharing info tracking ID.",
179
+ "type": "string",
180
+ "pattern": "^(GA|UA)?-\\d+-\\d+$"
181
+ },
182
+ "uuid": {
183
+ "description": "Analytics sharing info universally unique identifier.",
184
+ "type": "string",
185
+ "format": "uuid"
186
+ }
187
+ },
188
+ "additionalProperties": false
189
+ },
190
+ "completion": {
191
+ "type": "object",
192
+ "description": "Angular CLI completion settings.",
193
+ "properties": {
194
+ "prompted": {
195
+ "type": "boolean",
196
+ "description": "Whether the user has been prompted to add completion command prompt."
197
+ }
198
+ },
199
+ "additionalProperties": false
123
200
  }
124
201
  },
125
202
  "additionalProperties": false
@@ -186,7 +263,7 @@
186
263
  "defaultCollection": {
187
264
  "description": "The default schematics collection to use.",
188
265
  "type": "string",
189
- "x-deprecated": "Use 'schematicCollections' instead."
266
+ "deprecated": true
190
267
  },
191
268
  "schematicCollections": {
192
269
  "type": "array",
@@ -585,14 +662,13 @@
585
662
  "type": "object",
586
663
  "properties": {
587
664
  "$schema": {
588
- "type": "string",
589
- "format": "uri"
665
+ "type": "string"
590
666
  },
591
667
  "version": {
592
668
  "$ref": "#/definitions/fileVersion"
593
669
  },
594
670
  "cli": {
595
- "$ref": "#/definitions/cliOptions"
671
+ "$ref": "#/definitions/cliGlobalOptions"
596
672
  },
597
673
  "schematics": {
598
674
  "$ref": "#/definitions/schematicOptions"
@@ -620,20 +696,17 @@
620
696
  "$default": {
621
697
  "$source": "argv",
622
698
  "index": 0
623
- },
624
- "x-prompt": "What name would you like to use for the application?"
699
+ }
625
700
  },
626
701
  "inlineStyle": {
627
702
  "description": "Include styles inline in the root component.ts file. Only CSS styles can be included inline. Default is false, meaning that an external styles file is created and referenced in the root component.ts file.",
628
703
  "type": "boolean",
629
- "alias": "s",
630
- "x-user-analytics": 9
704
+ "alias": "s"
631
705
  },
632
706
  "inlineTemplate": {
633
707
  "description": "Include template inline in the root component.ts file. Default is false, meaning that an external template file is created and referenced in the root component.ts file. ",
634
708
  "type": "boolean",
635
- "alias": "t",
636
- "x-user-analytics": 10
709
+ "alias": "t"
637
710
  },
638
711
  "viewEncapsulation": {
639
712
  "description": "The view encapsulation strategy to use in the new application.",
@@ -642,15 +715,12 @@
642
715
  "None",
643
716
  "ShadowDom"
644
717
  ],
645
- "type": "string",
646
- "x-user-analytics": 11
718
+ "type": "string"
647
719
  },
648
720
  "routing": {
649
721
  "type": "boolean",
650
722
  "description": "Create a routing NgModule.",
651
- "default": false,
652
- "x-prompt": "Would you like to add Angular routing?",
653
- "x-user-analytics": 17
723
+ "default": false
654
724
  },
655
725
  "prefix": {
656
726
  "type": "string",
@@ -668,37 +738,13 @@
668
738
  "scss",
669
739
  "sass",
670
740
  "less"
671
- ],
672
- "x-prompt": {
673
- "message": "Which stylesheet format would you like to use?",
674
- "type": "list",
675
- "items": [
676
- {
677
- "value": "css",
678
- "label": "CSS"
679
- },
680
- {
681
- "value": "scss",
682
- "label": "SCSS [ https://sass-lang.com/documentation/syntax#scss ]"
683
- },
684
- {
685
- "value": "sass",
686
- "label": "Sass [ https://sass-lang.com/documentation/syntax#the-indented-syntax ]"
687
- },
688
- {
689
- "value": "less",
690
- "label": "Less [ http://lesscss.org ]"
691
- }
692
- ]
693
- },
694
- "x-user-analytics": 5
741
+ ]
695
742
  },
696
743
  "skipTests": {
697
744
  "description": "Do not create \"spec.ts\" test files for the application.",
698
745
  "type": "boolean",
699
746
  "default": false,
700
- "alias": "S",
701
- "x-user-analytics": 12
747
+ "alias": "S"
702
748
  },
703
749
  "skipPackageJson": {
704
750
  "type": "boolean",
@@ -708,8 +754,7 @@
708
754
  "minimal": {
709
755
  "description": "Create a bare-bones project without any testing frameworks. (Use for learning purposes only.)",
710
756
  "type": "boolean",
711
- "default": false,
712
- "x-user-analytics": 14
757
+ "default": false
713
758
  },
714
759
  "skipInstall": {
715
760
  "description": "Skip installing dependency packages.",
@@ -719,8 +764,7 @@
719
764
  "strict": {
720
765
  "description": "Creates an application with stricter bundle budgets settings.",
721
766
  "type": "boolean",
722
- "default": true,
723
- "x-user-analytics": 7
767
+ "default": true
724
768
  }
725
769
  }
726
770
  },
@@ -736,8 +780,7 @@
736
780
  "$default": {
737
781
  "$source": "argv",
738
782
  "index": 0
739
- },
740
- "x-prompt": "What name would you like to use for the class?"
783
+ }
741
784
  },
742
785
  "path": {
743
786
  "type": "string",
@@ -758,8 +801,7 @@
758
801
  "skipTests": {
759
802
  "type": "boolean",
760
803
  "description": "Do not create \"spec.ts\" test files for the new class.",
761
- "default": false,
762
- "x-user-analytics": 12
804
+ "default": false
763
805
  },
764
806
  "type": {
765
807
  "type": "string",
@@ -795,8 +837,7 @@
795
837
  "$default": {
796
838
  "$source": "argv",
797
839
  "index": 0
798
- },
799
- "x-prompt": "What name would you like to use for the component?"
840
+ }
800
841
  },
801
842
  "displayBlock": {
802
843
  "description": "Specifies if the style will contain `:host { display: block; }`.",
@@ -808,21 +849,18 @@
808
849
  "description": "Include styles inline in the component.ts file. Only CSS styles can be included inline. By default, an external styles file is created and referenced in the component.ts file.",
809
850
  "type": "boolean",
810
851
  "default": false,
811
- "alias": "s",
812
- "x-user-analytics": 9
852
+ "alias": "s"
813
853
  },
814
854
  "inlineTemplate": {
815
855
  "description": "Include template inline in the component.ts file. By default, an external template file is created and referenced in the component.ts file.",
816
856
  "type": "boolean",
817
857
  "default": false,
818
- "alias": "t",
819
- "x-user-analytics": 10
858
+ "alias": "t"
820
859
  },
821
860
  "standalone": {
822
861
  "description": "Whether the generated component is standalone.",
823
862
  "type": "boolean",
824
- "default": false,
825
- "x-user-analytics": 15
863
+ "default": false
826
864
  },
827
865
  "viewEncapsulation": {
828
866
  "description": "The view encapsulation strategy to use in the new component.",
@@ -832,8 +870,7 @@
832
870
  "ShadowDom"
833
871
  ],
834
872
  "type": "string",
835
- "alias": "v",
836
- "x-user-analytics": 11
873
+ "alias": "v"
837
874
  },
838
875
  "changeDetection": {
839
876
  "description": "The change detection strategy to use in the new component.",
@@ -869,8 +906,7 @@
869
906
  "sass",
870
907
  "less",
871
908
  "none"
872
- ],
873
- "x-user-analytics": 5
909
+ ]
874
910
  },
875
911
  "type": {
876
912
  "type": "string",
@@ -880,8 +916,7 @@
880
916
  "skipTests": {
881
917
  "type": "boolean",
882
918
  "description": "Do not create \"spec.ts\" test files for the new component.",
883
- "default": false,
884
- "x-user-analytics": 12
919
+ "default": false
885
920
  },
886
921
  "flat": {
887
922
  "type": "boolean",
@@ -891,8 +926,7 @@
891
926
  "skipImport": {
892
927
  "type": "boolean",
893
928
  "description": "Do not import this component into the owning NgModule.",
894
- "default": false,
895
- "x-user-analytics": 18
929
+ "default": false
896
930
  },
897
931
  "selector": {
898
932
  "type": "string",
@@ -912,8 +946,7 @@
912
946
  "export": {
913
947
  "type": "boolean",
914
948
  "default": false,
915
- "description": "The declaring NgModule exports this component.",
916
- "x-user-analytics": 19
949
+ "description": "The declaring NgModule exports this component."
917
950
  }
918
951
  }
919
952
  },
@@ -929,8 +962,7 @@
929
962
  "$default": {
930
963
  "$source": "argv",
931
964
  "index": 0
932
- },
933
- "x-prompt": "What name would you like to use for the directive?"
965
+ }
934
966
  },
935
967
  "path": {
936
968
  "type": "string",
@@ -965,14 +997,12 @@
965
997
  "skipTests": {
966
998
  "type": "boolean",
967
999
  "description": "Do not create \"spec.ts\" test files for the new class.",
968
- "default": false,
969
- "x-user-analytics": 12
1000
+ "default": false
970
1001
  },
971
1002
  "skipImport": {
972
1003
  "type": "boolean",
973
1004
  "description": "Do not import this directive into the owning NgModule.",
974
- "default": false,
975
- "x-user-analytics": 18
1005
+ "default": false
976
1006
  },
977
1007
  "selector": {
978
1008
  "type": "string",
@@ -982,8 +1012,7 @@
982
1012
  "standalone": {
983
1013
  "description": "Whether the generated directive is standalone.",
984
1014
  "type": "boolean",
985
- "default": false,
986
- "x-user-analytics": 15
1015
+ "default": false
987
1016
  },
988
1017
  "flat": {
989
1018
  "type": "boolean",
@@ -998,8 +1027,7 @@
998
1027
  "export": {
999
1028
  "type": "boolean",
1000
1029
  "default": false,
1001
- "description": "The declaring NgModule exports this directive.",
1002
- "x-user-analytics": 19
1030
+ "description": "The declaring NgModule exports this directive."
1003
1031
  }
1004
1032
  }
1005
1033
  },
@@ -1015,8 +1043,7 @@
1015
1043
  "$default": {
1016
1044
  "$source": "argv",
1017
1045
  "index": 0
1018
- },
1019
- "x-prompt": "What name would you like to use for the enum?"
1046
+ }
1020
1047
  },
1021
1048
  "path": {
1022
1049
  "type": "string",
@@ -1052,14 +1079,12 @@
1052
1079
  "$default": {
1053
1080
  "$source": "argv",
1054
1081
  "index": 0
1055
- },
1056
- "x-prompt": "What name would you like to use for the guard?"
1082
+ }
1057
1083
  },
1058
1084
  "skipTests": {
1059
1085
  "type": "boolean",
1060
1086
  "description": "Do not create \"spec.ts\" test files for the new guard.",
1061
- "default": false,
1062
- "x-user-analytics": 12
1087
+ "default": false
1063
1088
  },
1064
1089
  "flat": {
1065
1090
  "type": "boolean",
@@ -1098,8 +1123,7 @@
1098
1123
  },
1099
1124
  "default": [
1100
1125
  "CanActivate"
1101
- ],
1102
- "x-prompt": "Which interfaces would you like to implement?"
1126
+ ]
1103
1127
  }
1104
1128
  }
1105
1129
  },
@@ -1115,8 +1139,7 @@
1115
1139
  "$default": {
1116
1140
  "$source": "argv",
1117
1141
  "index": 0
1118
- },
1119
- "x-prompt": "What name would you like to use for the interceptor?"
1142
+ }
1120
1143
  },
1121
1144
  "path": {
1122
1145
  "type": "string",
@@ -1142,8 +1165,7 @@
1142
1165
  "skipTests": {
1143
1166
  "type": "boolean",
1144
1167
  "description": "Do not create \"spec.ts\" test files for the new interceptor.",
1145
- "default": false,
1146
- "x-user-analytics": 12
1168
+ "default": false
1147
1169
  }
1148
1170
  }
1149
1171
  },
@@ -1159,8 +1181,7 @@
1159
1181
  "$default": {
1160
1182
  "$source": "argv",
1161
1183
  "index": 0
1162
- },
1163
- "x-prompt": "What name would you like to use for the interface?"
1184
+ }
1164
1185
  },
1165
1186
  "path": {
1166
1187
  "type": "string",
@@ -1196,7 +1217,6 @@
1196
1217
  "title": "Library Options Schema",
1197
1218
  "type": "object",
1198
1219
  "description": "Creates a new, generic library project in the current workspace.",
1199
- "long-description": "./library-long.md",
1200
1220
  "additionalProperties": false,
1201
1221
  "properties": {
1202
1222
  "name": {
@@ -1206,8 +1226,7 @@
1206
1226
  "$default": {
1207
1227
  "$source": "argv",
1208
1228
  "index": 0
1209
- },
1210
- "x-prompt": "What name would you like to use for the library?"
1229
+ }
1211
1230
  },
1212
1231
  "entryFile": {
1213
1232
  "type": "string",
@@ -1251,8 +1270,7 @@
1251
1270
  "$default": {
1252
1271
  "$source": "argv",
1253
1272
  "index": 0
1254
- },
1255
- "x-prompt": "What name would you like to use for the pipe?"
1273
+ }
1256
1274
  },
1257
1275
  "path": {
1258
1276
  "type": "string",
@@ -1278,20 +1296,17 @@
1278
1296
  "skipTests": {
1279
1297
  "type": "boolean",
1280
1298
  "description": "Do not create \"spec.ts\" test files for the new pipe.",
1281
- "default": false,
1282
- "x-user-analytics": 12
1299
+ "default": false
1283
1300
  },
1284
1301
  "skipImport": {
1285
1302
  "type": "boolean",
1286
1303
  "default": false,
1287
- "description": "Do not import this pipe into the owning NgModule.",
1288
- "x-user-analytics": 18
1304
+ "description": "Do not import this pipe into the owning NgModule."
1289
1305
  },
1290
1306
  "standalone": {
1291
1307
  "description": "Whether the generated pipe is standalone.",
1292
1308
  "type": "boolean",
1293
- "default": false,
1294
- "x-user-analytics": 15
1309
+ "default": false
1295
1310
  },
1296
1311
  "module": {
1297
1312
  "type": "string",
@@ -1301,8 +1316,7 @@
1301
1316
  "export": {
1302
1317
  "type": "boolean",
1303
1318
  "default": false,
1304
- "description": "The declaring NgModule exports this pipe.",
1305
- "x-user-analytics": 19
1319
+ "description": "The declaring NgModule exports this pipe."
1306
1320
  }
1307
1321
  }
1308
1322
  },
@@ -1322,8 +1336,7 @@
1322
1336
  "$default": {
1323
1337
  "$source": "argv",
1324
1338
  "index": 0
1325
- },
1326
- "x-prompt": "What name would you like to use for the new workspace and initial project?"
1339
+ }
1327
1340
  },
1328
1341
  "skipInstall": {
1329
1342
  "description": "Do not install dependency packages.",
@@ -1374,14 +1387,12 @@
1374
1387
  "inlineStyle": {
1375
1388
  "description": "Include styles inline in the component TS file. By default, an external styles file is created and referenced in the component TypeScript file.",
1376
1389
  "type": "boolean",
1377
- "alias": "s",
1378
- "x-user-analytics": 9
1390
+ "alias": "s"
1379
1391
  },
1380
1392
  "inlineTemplate": {
1381
1393
  "description": "Include template inline in the component TS file. By default, an external template file is created and referenced in the component TypeScript file.",
1382
1394
  "type": "boolean",
1383
- "alias": "t",
1384
- "x-user-analytics": 10
1395
+ "alias": "t"
1385
1396
  },
1386
1397
  "viewEncapsulation": {
1387
1398
  "description": "The view encapsulation strategy to use in the initial project.",
@@ -1390,8 +1401,7 @@
1390
1401
  "None",
1391
1402
  "ShadowDom"
1392
1403
  ],
1393
- "type": "string",
1394
- "x-user-analytics": 11
1404
+ "type": "string"
1395
1405
  },
1396
1406
  "version": {
1397
1407
  "type": "string",
@@ -1403,8 +1413,7 @@
1403
1413
  },
1404
1414
  "routing": {
1405
1415
  "type": "boolean",
1406
- "description": "Generate a routing module for the initial project.",
1407
- "x-user-analytics": 17
1416
+ "description": "Generate a routing module for the initial project."
1408
1417
  },
1409
1418
  "prefix": {
1410
1419
  "type": "string",
@@ -1422,15 +1431,13 @@
1422
1431
  "scss",
1423
1432
  "sass",
1424
1433
  "less"
1425
- ],
1426
- "x-user-analytics": 5
1434
+ ]
1427
1435
  },
1428
1436
  "skipTests": {
1429
1437
  "description": "Do not generate \"spec.ts\" test files for the new project.",
1430
1438
  "type": "boolean",
1431
1439
  "default": false,
1432
- "alias": "S",
1433
- "x-user-analytics": 12
1440
+ "alias": "S"
1434
1441
  },
1435
1442
  "createApplication": {
1436
1443
  "description": "Create a new initial application project in the 'src' folder of the new workspace. When false, creates an empty workspace with no initial application. You can then use the generate application command so that all applications are created in the projects folder.",
@@ -1440,14 +1447,12 @@
1440
1447
  "minimal": {
1441
1448
  "description": "Create a workspace without any testing frameworks. (Use for learning purposes only.)",
1442
1449
  "type": "boolean",
1443
- "default": false,
1444
- "x-user-analytics": 14
1450
+ "default": false
1445
1451
  },
1446
1452
  "strict": {
1447
1453
  "description": "Creates a workspace with stricter type checking and stricter bundle budgets settings. This setting helps improve maintainability and catch bugs ahead of time. For more information, see https://angular.io/guide/strict-mode",
1448
1454
  "type": "boolean",
1449
- "default": true,
1450
- "x-user-analytics": 7
1455
+ "default": true
1451
1456
  },
1452
1457
  "packageManager": {
1453
1458
  "description": "The package manager used to install dependencies.",
@@ -1473,14 +1478,12 @@
1473
1478
  "$default": {
1474
1479
  "$source": "argv",
1475
1480
  "index": 0
1476
- },
1477
- "x-prompt": "What name would you like to use for the resolver?"
1481
+ }
1478
1482
  },
1479
1483
  "skipTests": {
1480
1484
  "type": "boolean",
1481
1485
  "description": "Do not create \"spec.ts\" test files for the new resolver.",
1482
- "default": false,
1483
- "x-user-analytics": 12
1486
+ "default": false
1484
1487
  },
1485
1488
  "flat": {
1486
1489
  "type": "boolean",
@@ -1517,8 +1520,7 @@
1517
1520
  "$default": {
1518
1521
  "$source": "argv",
1519
1522
  "index": 0
1520
- },
1521
- "x-prompt": "What name would you like to use for the service?"
1523
+ }
1522
1524
  },
1523
1525
  "path": {
1524
1526
  "type": "string",
@@ -1543,8 +1545,7 @@
1543
1545
  "skipTests": {
1544
1546
  "type": "boolean",
1545
1547
  "description": "Do not create \"spec.ts\" test files for the new service.",
1546
- "default": false,
1547
- "x-user-analytics": 12
1548
+ "default": false
1548
1549
  }
1549
1550
  }
1550
1551
  },
@@ -1576,8 +1577,7 @@
1576
1577
  "$default": {
1577
1578
  "$source": "argv",
1578
1579
  "index": 0
1579
- },
1580
- "x-prompt": "What name would you like to use for the worker?"
1580
+ }
1581
1581
  },
1582
1582
  "snippet": {
1583
1583
  "type": "boolean",
@@ -1744,7 +1744,6 @@
1744
1744
  },
1745
1745
  "optimization": {
1746
1746
  "description": "Enables optimization of the build output. Including minification of scripts and styles, tree-shaking, dead-code elimination, inlining of critical CSS and fonts inlining. For more information, see https://angular.io/guide/workspace-config#optimization-configuration.",
1747
- "x-user-analytics": 16,
1748
1747
  "default": true,
1749
1748
  "oneOf": [
1750
1749
  {
@@ -1827,7 +1826,6 @@
1827
1826
  "aot": {
1828
1827
  "type": "boolean",
1829
1828
  "description": "Build using Ahead of Time compilation.",
1830
- "x-user-analytics": 13,
1831
1829
  "default": true
1832
1830
  },
1833
1831
  "sourceMap": {
@@ -1882,7 +1880,7 @@
1882
1880
  "deployUrl": {
1883
1881
  "type": "string",
1884
1882
  "description": "URL where files will be deployed.",
1885
- "x-deprecated": "Use \"baseHref\" option, \"APP_BASE_HREF\" DI token or a combination of both instead. For more information, see https://angular.io/guide/deployment#the-deploy-url."
1883
+ "deprecated": true
1886
1884
  },
1887
1885
  "verbose": {
1888
1886
  "type": "boolean",
@@ -2692,7 +2690,6 @@
2692
2690
  },
2693
2691
  "optimization": {
2694
2692
  "description": "Enables optimization of the build output. Including minification of scripts and styles, tree-shaking and dead-code elimination. For more information, see https://angular.io/guide/workspace-config#optimization-configuration.",
2695
- "x-user-analytics": 16,
2696
2693
  "default": true,
2697
2694
  "oneOf": [
2698
2695
  {
@@ -2770,7 +2767,7 @@
2770
2767
  "deployUrl": {
2771
2768
  "type": "string",
2772
2769
  "description": "URL where files will be deployed.",
2773
- "x-deprecated": "Use \"baseHref\" browser builder option, \"APP_BASE_HREF\" DI token or a combination of both instead. For more information, see https://angular.io/guide/deployment#the-deploy-url."
2770
+ "deprecated": true
2774
2771
  },
2775
2772
  "verbose": {
2776
2773
  "type": "boolean",
package/lib/init.js CHANGED
@@ -63,6 +63,7 @@ let forceExit = false;
63
63
  return (await Promise.resolve().then(() => __importStar(require('./cli')))).default;
64
64
  }
65
65
  let cli;
66
+ const rawCommandName = process.argv[2];
66
67
  try {
67
68
  // No error implies a projectLocalCli, which will load whatever
68
69
  // version of ng-cli you have installed in a local package.json
@@ -84,6 +85,10 @@ let forceExit = false;
84
85
  // Ensure older versions of the CLI fully exit
85
86
  if ((0, semver_1.major)(localVersion) < 14) {
86
87
  forceExit = true;
88
+ // Versions prior to 14 didn't implement completion command.
89
+ if (rawCommandName === 'completion') {
90
+ return null;
91
+ }
87
92
  }
88
93
  let isGlobalGreater = false;
89
94
  try {
@@ -93,7 +98,6 @@ let forceExit = false;
93
98
  // eslint-disable-next-line no-console
94
99
  console.error('Version mismatch check skipped. Unable to compare local version: ' + error);
95
100
  }
96
- const rawCommandName = process.argv[2];
97
101
  // When using the completion command, don't show the warning as otherwise this will break completion.
98
102
  if (isGlobalGreater && rawCommandName !== 'completion') {
99
103
  // If using the update command and the global version is greater, use the newer update command
@@ -125,14 +129,10 @@ let forceExit = false;
125
129
  }
126
130
  return cli;
127
131
  })()
128
- .then((cli) => {
129
- return cli({
130
- cliArgs: process.argv.slice(2),
131
- inputStream: process.stdin,
132
- outputStream: process.stdout,
133
- });
134
- })
135
- .then((exitCode) => {
132
+ .then((cli) => cli === null || cli === void 0 ? void 0 : cli({
133
+ cliArgs: process.argv.slice(2),
134
+ }))
135
+ .then((exitCode = 0) => {
136
136
  if (forceExit) {
137
137
  process.exit(exitCode);
138
138
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@angular/cli",
3
- "version": "14.0.3",
3
+ "version": "14.0.6",
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.1400.3",
29
- "@angular-devkit/core": "14.0.3",
30
- "@angular-devkit/schematics": "14.0.3",
31
- "@schematics/angular": "14.0.3",
28
+ "@angular-devkit/architect": "0.1400.6",
29
+ "@angular-devkit/core": "14.0.6",
30
+ "@angular-devkit/schematics": "14.0.6",
31
+ "@schematics/angular": "14.0.6",
32
32
  "@yarnpkg/lockfile": "1.1.0",
33
33
  "ansi-colors": "4.1.1",
34
34
  "debug": "4.3.4",
@@ -49,12 +49,12 @@
49
49
  "ng-update": {
50
50
  "migrations": "@schematics/angular/migrations/migration-collection.json",
51
51
  "packageGroup": {
52
- "@angular/cli": "14.0.3",
53
- "@angular-devkit/architect": "0.1400.3",
54
- "@angular-devkit/build-angular": "14.0.3",
55
- "@angular-devkit/build-webpack": "0.1400.3",
56
- "@angular-devkit/core": "14.0.3",
57
- "@angular-devkit/schematics": "14.0.3"
52
+ "@angular/cli": "14.0.6",
53
+ "@angular-devkit/architect": "0.1400.6",
54
+ "@angular-devkit/build-angular": "14.0.6",
55
+ "@angular-devkit/build-webpack": "0.1400.6",
56
+ "@angular-devkit/core": "14.0.6",
57
+ "@angular-devkit/schematics": "14.0.6"
58
58
  }
59
59
  },
60
60
  "engines": {
@@ -113,8 +113,14 @@ class ArchitectCommandModule extends architect_base_command_module_1.ArchitectBa
113
113
  const { getYargsCompletions, help } = this.context.args.options;
114
114
  if (!getYargsCompletions && !help) {
115
115
  // Only issue the below error when not in help / completion mode.
116
- throw new command_module_1.CommandModuleError('Cannot determine project for command. ' +
117
- 'Pass the project name as a command line argument or change the current working directory to a project directory.');
116
+ throw new command_module_1.CommandModuleError('Cannot determine project for command.\n' +
117
+ 'This is a multi-project workspace and more than one project supports this command. ' +
118
+ `Run "ng ${this.command}" to execute the command for a specific project or change the current ` +
119
+ 'working directory to a project directory.\n\n' +
120
+ `Available projects are:\n${allProjectsForTargetName
121
+ .sort()
122
+ .map((p) => `- ${p}`)
123
+ .join('\n')}`);
118
124
  }
119
125
  }
120
126
  return undefined;
@@ -161,15 +161,11 @@ class CommandModule {
161
161
  // This should only be done when `--help` is used otherwise default will override options set in angular.json.
162
162
  ...(this.context.args.options.help ? { default: defaultVal } : {}),
163
163
  };
164
- // TODO(alanagius4): remove in a major version.
165
- // the below is an interim workaround to handle options which have been defined in the schema with `no` prefix.
166
164
  let dashedName = core_1.strings.dasherize(name);
165
+ // Handle options which have been defined in the schema with `no` prefix.
167
166
  if (type === 'boolean' && dashedName.startsWith('no-')) {
168
167
  dashedName = dashedName.slice(3);
169
168
  booleanOptionsWithNoPrefix.add(dashedName);
170
- // eslint-disable-next-line no-console
171
- console.warn(`Warning: '${name}' option has been declared with a 'no' prefix in the schema.` +
172
- 'Please file an issue with the author of this package.');
173
169
  }
174
170
  if (positional === undefined) {
175
171
  localYargs = localYargs.option(dashedName, {
@@ -188,8 +184,7 @@ class CommandModule {
188
184
  this.optionsWithAnalytics.set(name, userAnalytics);
189
185
  }
190
186
  }
191
- // TODO(alanagius4): remove in a major version.
192
- // the below is an interim workaround to handle options which have been defined in the schema with `no` prefix.
187
+ // Handle options which have been defined in the schema with `no` prefix.
193
188
  if (booleanOptionsWithNoPrefix.size) {
194
189
  localYargs.middleware((options) => {
195
190
  for (const key of booleanOptionsWithNoPrefix) {
@@ -136,7 +136,7 @@ async function runCommand(args, logger) {
136
136
  'deprecated: %s': color_1.colors.yellow('deprecated:') + ' %s',
137
137
  'Did you mean %s?': 'Unknown command. Did you mean %s?',
138
138
  })
139
- .epilogue(color_1.colors.gray('For more information, see https://angular.io/cli/.\n'))
139
+ .epilogue('For more information, see https://angular.io/cli/.\n')
140
140
  .demandCommand(1, command_1.demandCommandFailureMessage)
141
141
  .recommendCommands()
142
142
  .middleware(normalize_options_middleware_1.normalizeOptionsMiddleware)
@@ -71,25 +71,10 @@ class ConfigCommandModule extends command_module_1.CommandModule {
71
71
  return 0;
72
72
  }
73
73
  async set(options) {
74
- var _a;
74
+ var _a, _b;
75
75
  if (!((_a = options.jsonPath) === null || _a === void 0 ? void 0 : _a.trim())) {
76
76
  throw new command_module_1.CommandModuleError('Invalid Path.');
77
77
  }
78
- const validGlobalCliPaths = new Set([
79
- 'cli.warnings.versionMismatch',
80
- 'cli.defaultCollection',
81
- 'cli.schematicCollections',
82
- 'cli.packageManager',
83
- 'cli.analytics',
84
- 'cli.analyticsSharing.tracking',
85
- 'cli.analyticsSharing.uuid',
86
- 'cli.completion.prompted',
87
- ]);
88
- if (options.global &&
89
- !options.jsonPath.startsWith('schematics.') &&
90
- !validGlobalCliPaths.has(options.jsonPath)) {
91
- throw new command_module_1.CommandModuleError('Invalid Path.');
92
- }
93
78
  const [config, configPath] = await (0, config_1.getWorkspaceRaw)(options.global ? 'global' : 'local');
94
79
  const { logger } = this.context;
95
80
  if (!config || !configPath) {
@@ -104,7 +89,7 @@ class ConfigCommandModule extends command_module_1.CommandModule {
104
89
  logger.error('Value cannot be found.');
105
90
  return 1;
106
91
  }
107
- await (0, config_1.validateWorkspace)((0, json_file_1.parseJson)(config.content));
92
+ await (0, config_1.validateWorkspace)((0, json_file_1.parseJson)(config.content), (_b = options.global) !== null && _b !== void 0 ? _b : false);
108
93
  config.save();
109
94
  return 0;
110
95
  }
@@ -27,7 +27,7 @@ class NewCommandModule extends schematics_command_module_1.SchematicsCommandModu
27
27
  describe: 'A collection of schematics to use in generating the initial application.',
28
28
  type: 'string',
29
29
  });
30
- const { options: { collectionNameFromArgs }, } = this.context.args;
30
+ const { options: { collection: collectionNameFromArgs }, } = this.context.args;
31
31
  const collectionName = typeof collectionNameFromArgs === 'string'
32
32
  ? collectionNameFromArgs
33
33
  : await this.getCollectionFromConfig();
@@ -51,5 +51,6 @@ export declare class UpdateCommandModule extends CommandModule<UpdateCommandArgs
51
51
  private checkCLIVersion;
52
52
  private getCLIUpdateRunnerVersion;
53
53
  private runTempBinary;
54
+ private packageManagerForce;
54
55
  }
55
56
  export {};
@@ -72,8 +72,7 @@ class UpdateCommandModule extends command_module_1.CommandModule {
72
72
  array: true,
73
73
  })
74
74
  .option('force', {
75
- description: 'Ignore peer dependency version mismatches. ' +
76
- `Passes the '--force' flag to the package manager when installing packages.`,
75
+ description: 'Ignore peer dependency version mismatches.',
77
76
  type: 'boolean',
78
77
  default: false,
79
78
  })
@@ -189,7 +188,7 @@ class UpdateCommandModule extends command_module_1.CommandModule {
189
188
  logger.info(`Found ${rootDependencies.size} dependencies.`);
190
189
  const workflow = new tools_1.NodeWorkflow(this.context.root, {
191
190
  packageManager: packageManager.name,
192
- packageManagerForce: options.force,
191
+ packageManagerForce: this.packageManagerForce(options.verbose),
193
192
  // __dirname -> favor @schematics/update from this package
194
193
  // Otherwise, use packages from the active workspace (migrations)
195
194
  resolvePaths: [__dirname, this.context.root],
@@ -511,23 +510,7 @@ class UpdateCommandModule extends command_module_1.CommandModule {
511
510
  });
512
511
  }
513
512
  catch { }
514
- let forceInstall = false;
515
- // npm 7+ can fail due to it incorrectly resolving peer dependencies that have valid SemVer
516
- // ranges during an update. Update will set correct versions of dependencies within the
517
- // package.json file. The force option is set to workaround these errors.
518
- // Example error:
519
- // npm ERR! Conflicting peer dependency: @angular/compiler-cli@14.0.0-rc.0
520
- // npm ERR! node_modules/@angular/compiler-cli
521
- // npm ERR! peer @angular/compiler-cli@"^14.0.0 || ^14.0.0-rc" from @angular-devkit/build-angular@14.0.0-rc.0
522
- // npm ERR! node_modules/@angular-devkit/build-angular
523
- // npm ERR! dev @angular-devkit/build-angular@"~14.0.0-rc.0" from the root project
524
- if (this.context.packageManager.name === workspace_schema_1.PackageManager.Npm &&
525
- this.context.packageManager.version &&
526
- semver.gte(this.context.packageManager.version, '7.0.0', { includePrerelease: true })) {
527
- logVerbose('NPM 7+ detected -- enabling force option for package installation');
528
- forceInstall = true;
529
- }
530
- const installationSuccess = await this.context.packageManager.installAll(forceInstall ? ['--force'] : [], this.context.root);
513
+ const installationSuccess = await this.context.packageManager.installAll(this.packageManagerForce(options.verbose) ? ['--force'] : [], this.context.root);
531
514
  if (!installationSuccess) {
532
515
  return 1;
533
516
  }
@@ -739,6 +722,26 @@ class UpdateCommandModule extends command_module_1.CommandModule {
739
722
  }
740
723
  return status !== null && status !== void 0 ? status : 0;
741
724
  }
725
+ packageManagerForce(verbose) {
726
+ // npm 7+ can fail due to it incorrectly resolving peer dependencies that have valid SemVer
727
+ // ranges during an update. Update will set correct versions of dependencies within the
728
+ // package.json file. The force option is set to workaround these errors.
729
+ // Example error:
730
+ // npm ERR! Conflicting peer dependency: @angular/compiler-cli@14.0.0-rc.0
731
+ // npm ERR! node_modules/@angular/compiler-cli
732
+ // npm ERR! peer @angular/compiler-cli@"^14.0.0 || ^14.0.0-rc" from @angular-devkit/build-angular@14.0.0-rc.0
733
+ // npm ERR! node_modules/@angular-devkit/build-angular
734
+ // npm ERR! dev @angular-devkit/build-angular@"~14.0.0-rc.0" from the root project
735
+ if (this.context.packageManager.name === workspace_schema_1.PackageManager.Npm &&
736
+ this.context.packageManager.version &&
737
+ semver.gte(this.context.packageManager.version, '7.0.0', { includePrerelease: true })) {
738
+ if (verbose) {
739
+ this.context.logger.info('NPM 7+ detected -- enabling force option for package installation');
740
+ }
741
+ return true;
742
+ }
743
+ return false;
744
+ }
742
745
  }
743
746
  exports.UpdateCommandModule = UpdateCommandModule;
744
747
  /**
@@ -31,7 +31,7 @@ export declare function getWorkspace(level: 'local' | 'global'): Promise<Angular
31
31
  * NB: This method is intended to be used only for `ng config`.
32
32
  */
33
33
  export declare function getWorkspaceRaw(level?: 'local' | 'global'): Promise<[JSONFile | null, string | null]>;
34
- export declare function validateWorkspace(data: json.JsonObject): Promise<void>;
34
+ export declare function validateWorkspace(data: json.JsonObject, isGlobal: boolean): Promise<void>;
35
35
  export declare function getProjectByCwd(workspace: AngularWorkspace): string | null;
36
36
  export declare function getConfiguredPackageManager(): Promise<PackageManager | null>;
37
37
  export declare function getSchematicDefaults(collection: string, schematic: string, project?: string | null): Promise<{}>;
@@ -200,11 +200,18 @@ async function getWorkspaceRaw(level = 'local') {
200
200
  return [new json_file_1.JSONFile(configPath), configPath];
201
201
  }
202
202
  exports.getWorkspaceRaw = getWorkspaceRaw;
203
- async function validateWorkspace(data) {
203
+ async function validateWorkspace(data, isGlobal) {
204
204
  const schema = (0, json_file_1.readAndParseJson)(exports.workspaceSchemaPath);
205
+ // We should eventually have a dedicated global config schema and use that to validate.
206
+ const schemaToValidate = isGlobal
207
+ ? {
208
+ '$ref': '#/definitions/global',
209
+ definitions: schema['definitions'],
210
+ }
211
+ : schema;
205
212
  const { formats } = await Promise.resolve().then(() => __importStar(require('@angular-devkit/schematics')));
206
213
  const registry = new core_1.json.schema.CoreSchemaRegistry(formats.standardFormats);
207
- const validator = await registry.compile(schema).toPromise();
214
+ const validator = await registry.compile(schemaToValidate).toPromise();
208
215
  const { success, errors } = await validator(data).toPromise();
209
216
  if (!success) {
210
217
  throw new core_1.json.schema.SchemaValidationException(errors);