@angular/cli 14.1.0-next.3 → 14.1.0-rc.1

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",
@@ -133,7 +133,7 @@
133
133
  "defaultCollection": {
134
134
  "description": "The default schematics collection to use.",
135
135
  "type": "string",
136
- "x-deprecated": "Use 'schematicCollections' instead."
136
+ "deprecated": true
137
137
  },
138
138
  "schematicCollections": {
139
139
  "type": "array",
@@ -263,7 +263,7 @@
263
263
  "defaultCollection": {
264
264
  "description": "The default schematics collection to use.",
265
265
  "type": "string",
266
- "x-deprecated": "Use 'schematicCollections' instead."
266
+ "deprecated": true
267
267
  },
268
268
  "schematicCollections": {
269
269
  "type": "array",
@@ -719,20 +719,17 @@
719
719
  "$default": {
720
720
  "$source": "argv",
721
721
  "index": 0
722
- },
723
- "x-prompt": "What name would you like to use for the application?"
722
+ }
724
723
  },
725
724
  "inlineStyle": {
726
725
  "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.",
727
726
  "type": "boolean",
728
- "alias": "s",
729
- "x-user-analytics": 9
727
+ "alias": "s"
730
728
  },
731
729
  "inlineTemplate": {
732
730
  "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. ",
733
731
  "type": "boolean",
734
- "alias": "t",
735
- "x-user-analytics": 10
732
+ "alias": "t"
736
733
  },
737
734
  "viewEncapsulation": {
738
735
  "description": "The view encapsulation strategy to use in the new application.",
@@ -741,15 +738,12 @@
741
738
  "None",
742
739
  "ShadowDom"
743
740
  ],
744
- "type": "string",
745
- "x-user-analytics": 11
741
+ "type": "string"
746
742
  },
747
743
  "routing": {
748
744
  "type": "boolean",
749
745
  "description": "Create a routing NgModule.",
750
- "default": false,
751
- "x-prompt": "Would you like to add Angular routing?",
752
- "x-user-analytics": 17
746
+ "default": false
753
747
  },
754
748
  "prefix": {
755
749
  "type": "string",
@@ -767,37 +761,13 @@
767
761
  "scss",
768
762
  "sass",
769
763
  "less"
770
- ],
771
- "x-prompt": {
772
- "message": "Which stylesheet format would you like to use?",
773
- "type": "list",
774
- "items": [
775
- {
776
- "value": "css",
777
- "label": "CSS"
778
- },
779
- {
780
- "value": "scss",
781
- "label": "SCSS [ https://sass-lang.com/documentation/syntax#scss ]"
782
- },
783
- {
784
- "value": "sass",
785
- "label": "Sass [ https://sass-lang.com/documentation/syntax#the-indented-syntax ]"
786
- },
787
- {
788
- "value": "less",
789
- "label": "Less [ http://lesscss.org ]"
790
- }
791
- ]
792
- },
793
- "x-user-analytics": 5
764
+ ]
794
765
  },
795
766
  "skipTests": {
796
767
  "description": "Do not create \"spec.ts\" test files for the application.",
797
768
  "type": "boolean",
798
769
  "default": false,
799
- "alias": "S",
800
- "x-user-analytics": 12
770
+ "alias": "S"
801
771
  },
802
772
  "skipPackageJson": {
803
773
  "type": "boolean",
@@ -807,8 +777,7 @@
807
777
  "minimal": {
808
778
  "description": "Create a bare-bones project without any testing frameworks. (Use for learning purposes only.)",
809
779
  "type": "boolean",
810
- "default": false,
811
- "x-user-analytics": 14
780
+ "default": false
812
781
  },
813
782
  "skipInstall": {
814
783
  "description": "Skip installing dependency packages.",
@@ -818,8 +787,7 @@
818
787
  "strict": {
819
788
  "description": "Creates an application with stricter bundle budgets settings.",
820
789
  "type": "boolean",
821
- "default": true,
822
- "x-user-analytics": 7
790
+ "default": true
823
791
  }
824
792
  }
825
793
  },
@@ -835,8 +803,7 @@
835
803
  "$default": {
836
804
  "$source": "argv",
837
805
  "index": 0
838
- },
839
- "x-prompt": "What name would you like to use for the class?"
806
+ }
840
807
  },
841
808
  "path": {
842
809
  "type": "string",
@@ -857,8 +824,7 @@
857
824
  "skipTests": {
858
825
  "type": "boolean",
859
826
  "description": "Do not create \"spec.ts\" test files for the new class.",
860
- "default": false,
861
- "x-user-analytics": 12
827
+ "default": false
862
828
  },
863
829
  "type": {
864
830
  "type": "string",
@@ -894,8 +860,7 @@
894
860
  "$default": {
895
861
  "$source": "argv",
896
862
  "index": 0
897
- },
898
- "x-prompt": "What name would you like to use for the component?"
863
+ }
899
864
  },
900
865
  "displayBlock": {
901
866
  "description": "Specifies if the style will contain `:host { display: block; }`.",
@@ -907,21 +872,18 @@
907
872
  "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.",
908
873
  "type": "boolean",
909
874
  "default": false,
910
- "alias": "s",
911
- "x-user-analytics": 9
875
+ "alias": "s"
912
876
  },
913
877
  "inlineTemplate": {
914
878
  "description": "Include template inline in the component.ts file. By default, an external template file is created and referenced in the component.ts file.",
915
879
  "type": "boolean",
916
880
  "default": false,
917
- "alias": "t",
918
- "x-user-analytics": 10
881
+ "alias": "t"
919
882
  },
920
883
  "standalone": {
921
884
  "description": "Whether the generated component is standalone.",
922
885
  "type": "boolean",
923
- "default": false,
924
- "x-user-analytics": 15
886
+ "default": false
925
887
  },
926
888
  "viewEncapsulation": {
927
889
  "description": "The view encapsulation strategy to use in the new component.",
@@ -931,8 +893,7 @@
931
893
  "ShadowDom"
932
894
  ],
933
895
  "type": "string",
934
- "alias": "v",
935
- "x-user-analytics": 11
896
+ "alias": "v"
936
897
  },
937
898
  "changeDetection": {
938
899
  "description": "The change detection strategy to use in the new component.",
@@ -968,8 +929,7 @@
968
929
  "sass",
969
930
  "less",
970
931
  "none"
971
- ],
972
- "x-user-analytics": 5
932
+ ]
973
933
  },
974
934
  "type": {
975
935
  "type": "string",
@@ -979,8 +939,7 @@
979
939
  "skipTests": {
980
940
  "type": "boolean",
981
941
  "description": "Do not create \"spec.ts\" test files for the new component.",
982
- "default": false,
983
- "x-user-analytics": 12
942
+ "default": false
984
943
  },
985
944
  "flat": {
986
945
  "type": "boolean",
@@ -990,8 +949,7 @@
990
949
  "skipImport": {
991
950
  "type": "boolean",
992
951
  "description": "Do not import this component into the owning NgModule.",
993
- "default": false,
994
- "x-user-analytics": 18
952
+ "default": false
995
953
  },
996
954
  "selector": {
997
955
  "type": "string",
@@ -1011,8 +969,7 @@
1011
969
  "export": {
1012
970
  "type": "boolean",
1013
971
  "default": false,
1014
- "description": "The declaring NgModule exports this component.",
1015
- "x-user-analytics": 19
972
+ "description": "The declaring NgModule exports this component."
1016
973
  }
1017
974
  }
1018
975
  },
@@ -1028,8 +985,7 @@
1028
985
  "$default": {
1029
986
  "$source": "argv",
1030
987
  "index": 0
1031
- },
1032
- "x-prompt": "What name would you like to use for the directive?"
988
+ }
1033
989
  },
1034
990
  "path": {
1035
991
  "type": "string",
@@ -1064,14 +1020,12 @@
1064
1020
  "skipTests": {
1065
1021
  "type": "boolean",
1066
1022
  "description": "Do not create \"spec.ts\" test files for the new class.",
1067
- "default": false,
1068
- "x-user-analytics": 12
1023
+ "default": false
1069
1024
  },
1070
1025
  "skipImport": {
1071
1026
  "type": "boolean",
1072
1027
  "description": "Do not import this directive into the owning NgModule.",
1073
- "default": false,
1074
- "x-user-analytics": 18
1028
+ "default": false
1075
1029
  },
1076
1030
  "selector": {
1077
1031
  "type": "string",
@@ -1081,8 +1035,7 @@
1081
1035
  "standalone": {
1082
1036
  "description": "Whether the generated directive is standalone.",
1083
1037
  "type": "boolean",
1084
- "default": false,
1085
- "x-user-analytics": 15
1038
+ "default": false
1086
1039
  },
1087
1040
  "flat": {
1088
1041
  "type": "boolean",
@@ -1097,8 +1050,7 @@
1097
1050
  "export": {
1098
1051
  "type": "boolean",
1099
1052
  "default": false,
1100
- "description": "The declaring NgModule exports this directive.",
1101
- "x-user-analytics": 19
1053
+ "description": "The declaring NgModule exports this directive."
1102
1054
  }
1103
1055
  }
1104
1056
  },
@@ -1114,8 +1066,7 @@
1114
1066
  "$default": {
1115
1067
  "$source": "argv",
1116
1068
  "index": 0
1117
- },
1118
- "x-prompt": "What name would you like to use for the enum?"
1069
+ }
1119
1070
  },
1120
1071
  "path": {
1121
1072
  "type": "string",
@@ -1151,14 +1102,12 @@
1151
1102
  "$default": {
1152
1103
  "$source": "argv",
1153
1104
  "index": 0
1154
- },
1155
- "x-prompt": "What name would you like to use for the guard?"
1105
+ }
1156
1106
  },
1157
1107
  "skipTests": {
1158
1108
  "type": "boolean",
1159
1109
  "description": "Do not create \"spec.ts\" test files for the new guard.",
1160
- "default": false,
1161
- "x-user-analytics": 12
1110
+ "default": false
1162
1111
  },
1163
1112
  "flat": {
1164
1113
  "type": "boolean",
@@ -1197,8 +1146,7 @@
1197
1146
  },
1198
1147
  "default": [
1199
1148
  "CanActivate"
1200
- ],
1201
- "x-prompt": "Which interfaces would you like to implement?"
1149
+ ]
1202
1150
  }
1203
1151
  }
1204
1152
  },
@@ -1214,8 +1162,7 @@
1214
1162
  "$default": {
1215
1163
  "$source": "argv",
1216
1164
  "index": 0
1217
- },
1218
- "x-prompt": "What name would you like to use for the interceptor?"
1165
+ }
1219
1166
  },
1220
1167
  "path": {
1221
1168
  "type": "string",
@@ -1241,8 +1188,7 @@
1241
1188
  "skipTests": {
1242
1189
  "type": "boolean",
1243
1190
  "description": "Do not create \"spec.ts\" test files for the new interceptor.",
1244
- "default": false,
1245
- "x-user-analytics": 12
1191
+ "default": false
1246
1192
  }
1247
1193
  }
1248
1194
  },
@@ -1258,8 +1204,7 @@
1258
1204
  "$default": {
1259
1205
  "$source": "argv",
1260
1206
  "index": 0
1261
- },
1262
- "x-prompt": "What name would you like to use for the interface?"
1207
+ }
1263
1208
  },
1264
1209
  "path": {
1265
1210
  "type": "string",
@@ -1295,7 +1240,6 @@
1295
1240
  "title": "Library Options Schema",
1296
1241
  "type": "object",
1297
1242
  "description": "Creates a new, generic library project in the current workspace.",
1298
- "long-description": "./library-long.md",
1299
1243
  "additionalProperties": false,
1300
1244
  "properties": {
1301
1245
  "name": {
@@ -1305,8 +1249,7 @@
1305
1249
  "$default": {
1306
1250
  "$source": "argv",
1307
1251
  "index": 0
1308
- },
1309
- "x-prompt": "What name would you like to use for the library?"
1252
+ }
1310
1253
  },
1311
1254
  "entryFile": {
1312
1255
  "type": "string",
@@ -1350,8 +1293,7 @@
1350
1293
  "$default": {
1351
1294
  "$source": "argv",
1352
1295
  "index": 0
1353
- },
1354
- "x-prompt": "What name would you like to use for the pipe?"
1296
+ }
1355
1297
  },
1356
1298
  "path": {
1357
1299
  "type": "string",
@@ -1377,20 +1319,17 @@
1377
1319
  "skipTests": {
1378
1320
  "type": "boolean",
1379
1321
  "description": "Do not create \"spec.ts\" test files for the new pipe.",
1380
- "default": false,
1381
- "x-user-analytics": 12
1322
+ "default": false
1382
1323
  },
1383
1324
  "skipImport": {
1384
1325
  "type": "boolean",
1385
1326
  "default": false,
1386
- "description": "Do not import this pipe into the owning NgModule.",
1387
- "x-user-analytics": 18
1327
+ "description": "Do not import this pipe into the owning NgModule."
1388
1328
  },
1389
1329
  "standalone": {
1390
1330
  "description": "Whether the generated pipe is standalone.",
1391
1331
  "type": "boolean",
1392
- "default": false,
1393
- "x-user-analytics": 15
1332
+ "default": false
1394
1333
  },
1395
1334
  "module": {
1396
1335
  "type": "string",
@@ -1400,8 +1339,7 @@
1400
1339
  "export": {
1401
1340
  "type": "boolean",
1402
1341
  "default": false,
1403
- "description": "The declaring NgModule exports this pipe.",
1404
- "x-user-analytics": 19
1342
+ "description": "The declaring NgModule exports this pipe."
1405
1343
  }
1406
1344
  }
1407
1345
  },
@@ -1421,8 +1359,7 @@
1421
1359
  "$default": {
1422
1360
  "$source": "argv",
1423
1361
  "index": 0
1424
- },
1425
- "x-prompt": "What name would you like to use for the new workspace and initial project?"
1362
+ }
1426
1363
  },
1427
1364
  "skipInstall": {
1428
1365
  "description": "Do not install dependency packages.",
@@ -1473,14 +1410,12 @@
1473
1410
  "inlineStyle": {
1474
1411
  "description": "Include styles inline in the component TS file. By default, an external styles file is created and referenced in the component TypeScript file.",
1475
1412
  "type": "boolean",
1476
- "alias": "s",
1477
- "x-user-analytics": 9
1413
+ "alias": "s"
1478
1414
  },
1479
1415
  "inlineTemplate": {
1480
1416
  "description": "Include template inline in the component TS file. By default, an external template file is created and referenced in the component TypeScript file.",
1481
1417
  "type": "boolean",
1482
- "alias": "t",
1483
- "x-user-analytics": 10
1418
+ "alias": "t"
1484
1419
  },
1485
1420
  "viewEncapsulation": {
1486
1421
  "description": "The view encapsulation strategy to use in the initial project.",
@@ -1489,8 +1424,7 @@
1489
1424
  "None",
1490
1425
  "ShadowDom"
1491
1426
  ],
1492
- "type": "string",
1493
- "x-user-analytics": 11
1427
+ "type": "string"
1494
1428
  },
1495
1429
  "version": {
1496
1430
  "type": "string",
@@ -1502,8 +1436,7 @@
1502
1436
  },
1503
1437
  "routing": {
1504
1438
  "type": "boolean",
1505
- "description": "Generate a routing module for the initial project.",
1506
- "x-user-analytics": 17
1439
+ "description": "Generate a routing module for the initial project."
1507
1440
  },
1508
1441
  "prefix": {
1509
1442
  "type": "string",
@@ -1521,15 +1454,13 @@
1521
1454
  "scss",
1522
1455
  "sass",
1523
1456
  "less"
1524
- ],
1525
- "x-user-analytics": 5
1457
+ ]
1526
1458
  },
1527
1459
  "skipTests": {
1528
1460
  "description": "Do not generate \"spec.ts\" test files for the new project.",
1529
1461
  "type": "boolean",
1530
1462
  "default": false,
1531
- "alias": "S",
1532
- "x-user-analytics": 12
1463
+ "alias": "S"
1533
1464
  },
1534
1465
  "createApplication": {
1535
1466
  "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.",
@@ -1539,14 +1470,12 @@
1539
1470
  "minimal": {
1540
1471
  "description": "Create a workspace without any testing frameworks. (Use for learning purposes only.)",
1541
1472
  "type": "boolean",
1542
- "default": false,
1543
- "x-user-analytics": 14
1473
+ "default": false
1544
1474
  },
1545
1475
  "strict": {
1546
1476
  "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",
1547
1477
  "type": "boolean",
1548
- "default": true,
1549
- "x-user-analytics": 7
1478
+ "default": true
1550
1479
  },
1551
1480
  "packageManager": {
1552
1481
  "description": "The package manager used to install dependencies.",
@@ -1572,14 +1501,12 @@
1572
1501
  "$default": {
1573
1502
  "$source": "argv",
1574
1503
  "index": 0
1575
- },
1576
- "x-prompt": "What name would you like to use for the resolver?"
1504
+ }
1577
1505
  },
1578
1506
  "skipTests": {
1579
1507
  "type": "boolean",
1580
1508
  "description": "Do not create \"spec.ts\" test files for the new resolver.",
1581
- "default": false,
1582
- "x-user-analytics": 12
1509
+ "default": false
1583
1510
  },
1584
1511
  "flat": {
1585
1512
  "type": "boolean",
@@ -1616,8 +1543,7 @@
1616
1543
  "$default": {
1617
1544
  "$source": "argv",
1618
1545
  "index": 0
1619
- },
1620
- "x-prompt": "What name would you like to use for the service?"
1546
+ }
1621
1547
  },
1622
1548
  "path": {
1623
1549
  "type": "string",
@@ -1642,8 +1568,7 @@
1642
1568
  "skipTests": {
1643
1569
  "type": "boolean",
1644
1570
  "description": "Do not create \"spec.ts\" test files for the new service.",
1645
- "default": false,
1646
- "x-user-analytics": 12
1571
+ "default": false
1647
1572
  }
1648
1573
  }
1649
1574
  },
@@ -1675,8 +1600,7 @@
1675
1600
  "$default": {
1676
1601
  "$source": "argv",
1677
1602
  "index": 0
1678
- },
1679
- "x-prompt": "What name would you like to use for the worker?"
1603
+ }
1680
1604
  },
1681
1605
  "snippet": {
1682
1606
  "type": "boolean",
@@ -1843,7 +1767,6 @@
1843
1767
  },
1844
1768
  "optimization": {
1845
1769
  "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.",
1846
- "x-user-analytics": 16,
1847
1770
  "default": true,
1848
1771
  "oneOf": [
1849
1772
  {
@@ -1926,7 +1849,6 @@
1926
1849
  "aot": {
1927
1850
  "type": "boolean",
1928
1851
  "description": "Build using Ahead of Time compilation.",
1929
- "x-user-analytics": 13,
1930
1852
  "default": true
1931
1853
  },
1932
1854
  "sourceMap": {
@@ -1981,7 +1903,7 @@
1981
1903
  "deployUrl": {
1982
1904
  "type": "string",
1983
1905
  "description": "URL where files will be deployed.",
1984
- "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."
1906
+ "deprecated": true
1985
1907
  },
1986
1908
  "verbose": {
1987
1909
  "type": "boolean",
@@ -2406,7 +2328,6 @@
2406
2328
  },
2407
2329
  "optimization": {
2408
2330
  "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.",
2409
- "x-user-analytics": 16,
2410
2331
  "default": true,
2411
2332
  "oneOf": [
2412
2333
  {
@@ -2489,7 +2410,6 @@
2489
2410
  "aot": {
2490
2411
  "type": "boolean",
2491
2412
  "description": "Build using Ahead of Time compilation.",
2492
- "x-user-analytics": 13,
2493
2413
  "default": true
2494
2414
  },
2495
2415
  "sourceMap": {
@@ -2544,7 +2464,7 @@
2544
2464
  "deployUrl": {
2545
2465
  "type": "string",
2546
2466
  "description": "URL where files will be deployed.",
2547
- "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."
2467
+ "deprecated": true
2548
2468
  },
2549
2469
  "verbose": {
2550
2470
  "type": "boolean",
@@ -3354,7 +3274,6 @@
3354
3274
  },
3355
3275
  "optimization": {
3356
3276
  "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.",
3357
- "x-user-analytics": 16,
3358
3277
  "default": true,
3359
3278
  "oneOf": [
3360
3279
  {
@@ -3432,7 +3351,7 @@
3432
3351
  "deployUrl": {
3433
3352
  "type": "string",
3434
3353
  "description": "URL where files will be deployed.",
3435
- "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."
3354
+ "deprecated": true
3436
3355
  },
3437
3356
  "verbose": {
3438
3357
  "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.1.0-next.3",
3
+ "version": "14.1.0-rc.1",
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.1401.0-next.3",
29
- "@angular-devkit/core": "14.1.0-next.3",
30
- "@angular-devkit/schematics": "14.1.0-next.3",
31
- "@schematics/angular": "14.1.0-next.3",
28
+ "@angular-devkit/architect": "0.1401.0-rc.1",
29
+ "@angular-devkit/core": "14.1.0-rc.1",
30
+ "@angular-devkit/schematics": "14.1.0-rc.1",
31
+ "@schematics/angular": "14.1.0-rc.1",
32
32
  "@yarnpkg/lockfile": "1.1.0",
33
33
  "ansi-colors": "4.1.3",
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.1.0-next.3",
53
- "@angular-devkit/architect": "0.1401.0-next.3",
54
- "@angular-devkit/build-angular": "14.1.0-next.3",
55
- "@angular-devkit/build-webpack": "0.1401.0-next.3",
56
- "@angular-devkit/core": "14.1.0-next.3",
57
- "@angular-devkit/schematics": "14.1.0-next.3"
52
+ "@angular/cli": "14.1.0-rc.1",
53
+ "@angular-devkit/architect": "0.1401.0-rc.1",
54
+ "@angular-devkit/build-angular": "14.1.0-rc.1",
55
+ "@angular-devkit/build-webpack": "0.1401.0-rc.1",
56
+ "@angular-devkit/core": "14.1.0-rc.1",
57
+ "@angular-devkit/schematics": "14.1.0-rc.1"
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) {
@@ -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 {};
@@ -73,8 +73,7 @@ class UpdateCommandModule extends command_module_1.CommandModule {
73
73
  array: true,
74
74
  })
75
75
  .option('force', {
76
- description: 'Ignore peer dependency version mismatches. ' +
77
- `Passes the '--force' flag to the package manager when installing packages.`,
76
+ description: 'Ignore peer dependency version mismatches.',
78
77
  type: 'boolean',
79
78
  default: false,
80
79
  })
@@ -191,7 +190,7 @@ class UpdateCommandModule extends command_module_1.CommandModule {
191
190
  logger.info(`Found ${rootDependencies.size} dependencies.`);
192
191
  const workflow = new tools_1.NodeWorkflow(this.context.root, {
193
192
  packageManager: packageManager.name,
194
- packageManagerForce: options.force,
193
+ packageManagerForce: this.packageManagerForce(options.verbose),
195
194
  // __dirname -> favor @schematics/update from this package
196
195
  // Otherwise, use packages from the active workspace (migrations)
197
196
  resolvePaths: [__dirname, this.context.root],
@@ -518,23 +517,7 @@ class UpdateCommandModule extends command_module_1.CommandModule {
518
517
  });
519
518
  }
520
519
  catch { }
521
- let forceInstall = false;
522
- // npm 7+ can fail due to it incorrectly resolving peer dependencies that have valid SemVer
523
- // ranges during an update. Update will set correct versions of dependencies within the
524
- // package.json file. The force option is set to workaround these errors.
525
- // Example error:
526
- // npm ERR! Conflicting peer dependency: @angular/compiler-cli@14.0.0-rc.0
527
- // npm ERR! node_modules/@angular/compiler-cli
528
- // npm ERR! peer @angular/compiler-cli@"^14.0.0 || ^14.0.0-rc" from @angular-devkit/build-angular@14.0.0-rc.0
529
- // npm ERR! node_modules/@angular-devkit/build-angular
530
- // npm ERR! dev @angular-devkit/build-angular@"~14.0.0-rc.0" from the root project
531
- if (this.context.packageManager.name === workspace_schema_1.PackageManager.Npm &&
532
- this.context.packageManager.version &&
533
- semver.gte(this.context.packageManager.version, '7.0.0', { includePrerelease: true })) {
534
- logVerbose('NPM 7+ detected -- enabling force option for package installation');
535
- forceInstall = true;
536
- }
537
- const installationSuccess = await this.context.packageManager.installAll(forceInstall ? ['--force'] : [], this.context.root);
520
+ const installationSuccess = await this.context.packageManager.installAll(this.packageManagerForce(options.verbose) ? ['--force'] : [], this.context.root);
538
521
  if (!installationSuccess) {
539
522
  return 1;
540
523
  }
@@ -749,6 +732,26 @@ class UpdateCommandModule extends command_module_1.CommandModule {
749
732
  }
750
733
  return status !== null && status !== void 0 ? status : 0;
751
734
  }
735
+ packageManagerForce(verbose) {
736
+ // npm 7+ can fail due to it incorrectly resolving peer dependencies that have valid SemVer
737
+ // ranges during an update. Update will set correct versions of dependencies within the
738
+ // package.json file. The force option is set to workaround these errors.
739
+ // Example error:
740
+ // npm ERR! Conflicting peer dependency: @angular/compiler-cli@14.0.0-rc.0
741
+ // npm ERR! node_modules/@angular/compiler-cli
742
+ // npm ERR! peer @angular/compiler-cli@"^14.0.0 || ^14.0.0-rc" from @angular-devkit/build-angular@14.0.0-rc.0
743
+ // npm ERR! node_modules/@angular-devkit/build-angular
744
+ // npm ERR! dev @angular-devkit/build-angular@"~14.0.0-rc.0" from the root project
745
+ if (this.context.packageManager.name === workspace_schema_1.PackageManager.Npm &&
746
+ this.context.packageManager.version &&
747
+ semver.gte(this.context.packageManager.version, '7.0.0', { includePrerelease: true })) {
748
+ if (verbose) {
749
+ this.context.logger.info('NPM 7+ detected -- enabling force option for package installation');
750
+ }
751
+ return true;
752
+ }
753
+ return false;
754
+ }
752
755
  }
753
756
  exports.UpdateCommandModule = UpdateCommandModule;
754
757
  /**