swaggerhub-cli 0.14.0 → 0.15.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/README.md +41 -41
- package/bin/run +5 -4
- package/oclif.manifest.json +40 -40
- package/package.json +13 -11
- package/src/check-node-version.js +3 -2
- package/src/commands/api/clone.js +8 -7
- package/src/commands/api/create.js +8 -8
- package/src/commands/api/delete.js +6 -6
- package/src/commands/api/get.js +7 -7
- package/src/commands/api/publish.js +6 -6
- package/src/commands/api/rename.js +8 -10
- package/src/commands/api/setdefault.js +5 -5
- package/src/commands/api/unpublish.js +5 -5
- package/src/commands/api/update.js +8 -8
- package/src/commands/api/validate/download-rules.js +6 -6
- package/src/commands/api/validate/index.js +8 -8
- package/src/commands/api/validate/local.js +8 -8
- package/src/commands/configure.js +6 -6
- package/src/commands/domain/clone.js +8 -7
- package/src/commands/domain/create.js +8 -8
- package/src/commands/domain/delete.js +6 -6
- package/src/commands/domain/get.js +7 -7
- package/src/commands/domain/publish.js +5 -5
- package/src/commands/domain/rename.js +9 -8
- package/src/commands/domain/setdefault.js +5 -5
- package/src/commands/domain/unpublish.js +5 -5
- package/src/commands/domain/update.js +8 -8
- package/src/commands/integration/create.js +5 -5
- package/src/commands/integration/delete.js +5 -5
- package/src/commands/integration/execute.js +5 -5
- package/src/commands/integration/get.js +7 -7
- package/src/commands/integration/list.js +6 -6
- package/src/commands/integration/update.js +5 -5
- package/src/commands/project/api/add.js +5 -7
- package/src/commands/project/api/remove.js +7 -10
- package/src/commands/project/create.js +5 -9
- package/src/commands/project/delete.js +5 -5
- package/src/commands/project/domain/add.js +5 -7
- package/src/commands/project/domain/remove.js +7 -10
- package/src/commands/project/get.js +7 -7
- package/src/commands/project/list.js +5 -5
- package/src/commands/project/member/list.js +6 -6
- package/src/commands/spectral/download.js +8 -8
- package/src/commands/spectral/upload.js +10 -10
- package/src/config/index.js +18 -4
- package/src/format-readme.js +3 -2
- package/src/help.js +2 -2
- package/src/hooks/setup-config.js +9 -5
- package/src/index.js +2 -2
- package/src/requests/api.js +3 -3
- package/src/requests/domain.js +3 -3
- package/src/requests/project.js +2 -2
- package/src/requests/spec.js +5 -5
- package/src/requests/spectral.js +3 -3
- package/src/requests/standardization.js +4 -4
- package/src/support/command/base-command.js +10 -11
- package/src/support/command/base-validate-command.js +3 -3
- package/src/support/command/handle-response.js +7 -5
- package/src/support/command/parse-input.js +8 -6
- package/src/support/command/update-command.js +5 -5
- package/src/support/http/default-headers.js +1 -1
- package/src/support/http/header-templates.js +2 -2
- package/src/support/http/index.js +7 -7
- package/src/support/http/proxy-agent.js +4 -4
- package/src/support/inquirer/index.js +4 -4
- package/src/support/inquirer/prompt-templates.js +2 -2
- package/src/support/isOnPrem.js +4 -4
- package/src/template-strings/errors.js +2 -2
- package/src/template-strings/index.js +3 -3
- package/src/template-strings/info.js +2 -2
- package/src/utils/definitions.js +8 -6
- package/src/utils/general.js +3 -3
package/oclif.manifest.json
CHANGED
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"pluginType": "core",
|
|
22
22
|
"strict": true,
|
|
23
23
|
"enableJsonFlag": false,
|
|
24
|
-
"isESM":
|
|
24
|
+
"isESM": true,
|
|
25
25
|
"relativePath": [
|
|
26
26
|
"src",
|
|
27
27
|
"commands",
|
|
@@ -75,7 +75,7 @@
|
|
|
75
75
|
"pluginType": "core",
|
|
76
76
|
"strict": true,
|
|
77
77
|
"enableJsonFlag": false,
|
|
78
|
-
"isESM":
|
|
78
|
+
"isESM": true,
|
|
79
79
|
"relativePath": [
|
|
80
80
|
"src",
|
|
81
81
|
"commands",
|
|
@@ -163,7 +163,7 @@
|
|
|
163
163
|
"pluginName": "swaggerhub-cli",
|
|
164
164
|
"pluginType": "core",
|
|
165
165
|
"strict": true,
|
|
166
|
-
"isESM":
|
|
166
|
+
"isESM": true,
|
|
167
167
|
"relativePath": [
|
|
168
168
|
"src",
|
|
169
169
|
"commands",
|
|
@@ -210,7 +210,7 @@
|
|
|
210
210
|
"pluginType": "core",
|
|
211
211
|
"strict": true,
|
|
212
212
|
"enableJsonFlag": false,
|
|
213
|
-
"isESM":
|
|
213
|
+
"isESM": true,
|
|
214
214
|
"relativePath": [
|
|
215
215
|
"src",
|
|
216
216
|
"commands",
|
|
@@ -263,7 +263,7 @@
|
|
|
263
263
|
"pluginType": "core",
|
|
264
264
|
"strict": true,
|
|
265
265
|
"enableJsonFlag": false,
|
|
266
|
-
"isESM":
|
|
266
|
+
"isESM": true,
|
|
267
267
|
"relativePath": [
|
|
268
268
|
"src",
|
|
269
269
|
"commands",
|
|
@@ -308,7 +308,7 @@
|
|
|
308
308
|
"pluginName": "swaggerhub-cli",
|
|
309
309
|
"pluginType": "core",
|
|
310
310
|
"strict": true,
|
|
311
|
-
"isESM":
|
|
311
|
+
"isESM": true,
|
|
312
312
|
"relativePath": [
|
|
313
313
|
"src",
|
|
314
314
|
"commands",
|
|
@@ -351,7 +351,7 @@
|
|
|
351
351
|
"pluginType": "core",
|
|
352
352
|
"strict": true,
|
|
353
353
|
"enableJsonFlag": false,
|
|
354
|
-
"isESM":
|
|
354
|
+
"isESM": true,
|
|
355
355
|
"relativePath": [
|
|
356
356
|
"src",
|
|
357
357
|
"commands",
|
|
@@ -388,7 +388,7 @@
|
|
|
388
388
|
"pluginName": "swaggerhub-cli",
|
|
389
389
|
"pluginType": "core",
|
|
390
390
|
"strict": true,
|
|
391
|
-
"isESM":
|
|
391
|
+
"isESM": true,
|
|
392
392
|
"relativePath": [
|
|
393
393
|
"src",
|
|
394
394
|
"commands",
|
|
@@ -425,7 +425,7 @@
|
|
|
425
425
|
"pluginName": "swaggerhub-cli",
|
|
426
426
|
"pluginType": "core",
|
|
427
427
|
"strict": true,
|
|
428
|
-
"isESM":
|
|
428
|
+
"isESM": true,
|
|
429
429
|
"relativePath": [
|
|
430
430
|
"src",
|
|
431
431
|
"commands",
|
|
@@ -506,7 +506,7 @@
|
|
|
506
506
|
"pluginName": "swaggerhub-cli",
|
|
507
507
|
"pluginType": "core",
|
|
508
508
|
"strict": true,
|
|
509
|
-
"isESM":
|
|
509
|
+
"isESM": true,
|
|
510
510
|
"relativePath": [
|
|
511
511
|
"src",
|
|
512
512
|
"commands",
|
|
@@ -561,7 +561,7 @@
|
|
|
561
561
|
"pluginType": "core",
|
|
562
562
|
"strict": true,
|
|
563
563
|
"enableJsonFlag": false,
|
|
564
|
-
"isESM":
|
|
564
|
+
"isESM": true,
|
|
565
565
|
"relativePath": [
|
|
566
566
|
"src",
|
|
567
567
|
"commands",
|
|
@@ -649,7 +649,7 @@
|
|
|
649
649
|
"pluginName": "swaggerhub-cli",
|
|
650
650
|
"pluginType": "core",
|
|
651
651
|
"strict": true,
|
|
652
|
-
"isESM":
|
|
652
|
+
"isESM": true,
|
|
653
653
|
"relativePath": [
|
|
654
654
|
"src",
|
|
655
655
|
"commands",
|
|
@@ -696,7 +696,7 @@
|
|
|
696
696
|
"pluginType": "core",
|
|
697
697
|
"strict": true,
|
|
698
698
|
"enableJsonFlag": false,
|
|
699
|
-
"isESM":
|
|
699
|
+
"isESM": true,
|
|
700
700
|
"relativePath": [
|
|
701
701
|
"src",
|
|
702
702
|
"commands",
|
|
@@ -742,7 +742,7 @@
|
|
|
742
742
|
"pluginType": "core",
|
|
743
743
|
"strict": true,
|
|
744
744
|
"enableJsonFlag": false,
|
|
745
|
-
"isESM":
|
|
745
|
+
"isESM": true,
|
|
746
746
|
"relativePath": [
|
|
747
747
|
"src",
|
|
748
748
|
"commands",
|
|
@@ -787,7 +787,7 @@
|
|
|
787
787
|
"pluginName": "swaggerhub-cli",
|
|
788
788
|
"pluginType": "core",
|
|
789
789
|
"strict": true,
|
|
790
|
-
"isESM":
|
|
790
|
+
"isESM": true,
|
|
791
791
|
"relativePath": [
|
|
792
792
|
"src",
|
|
793
793
|
"commands",
|
|
@@ -838,7 +838,7 @@
|
|
|
838
838
|
"pluginType": "core",
|
|
839
839
|
"strict": true,
|
|
840
840
|
"enableJsonFlag": false,
|
|
841
|
-
"isESM":
|
|
841
|
+
"isESM": true,
|
|
842
842
|
"relativePath": [
|
|
843
843
|
"src",
|
|
844
844
|
"commands",
|
|
@@ -875,7 +875,7 @@
|
|
|
875
875
|
"pluginName": "swaggerhub-cli",
|
|
876
876
|
"pluginType": "core",
|
|
877
877
|
"strict": true,
|
|
878
|
-
"isESM":
|
|
878
|
+
"isESM": true,
|
|
879
879
|
"relativePath": [
|
|
880
880
|
"src",
|
|
881
881
|
"commands",
|
|
@@ -912,7 +912,7 @@
|
|
|
912
912
|
"pluginName": "swaggerhub-cli",
|
|
913
913
|
"pluginType": "core",
|
|
914
914
|
"strict": true,
|
|
915
|
-
"isESM":
|
|
915
|
+
"isESM": true,
|
|
916
916
|
"relativePath": [
|
|
917
917
|
"src",
|
|
918
918
|
"commands",
|
|
@@ -993,7 +993,7 @@
|
|
|
993
993
|
"pluginName": "swaggerhub-cli",
|
|
994
994
|
"pluginType": "core",
|
|
995
995
|
"strict": true,
|
|
996
|
-
"isESM":
|
|
996
|
+
"isESM": true,
|
|
997
997
|
"relativePath": [
|
|
998
998
|
"src",
|
|
999
999
|
"commands",
|
|
@@ -1040,7 +1040,7 @@
|
|
|
1040
1040
|
"pluginType": "core",
|
|
1041
1041
|
"strict": true,
|
|
1042
1042
|
"enableJsonFlag": false,
|
|
1043
|
-
"isESM":
|
|
1043
|
+
"isESM": true,
|
|
1044
1044
|
"relativePath": [
|
|
1045
1045
|
"src",
|
|
1046
1046
|
"commands",
|
|
@@ -1078,7 +1078,7 @@
|
|
|
1078
1078
|
"pluginType": "core",
|
|
1079
1079
|
"strict": true,
|
|
1080
1080
|
"enableJsonFlag": false,
|
|
1081
|
-
"isESM":
|
|
1081
|
+
"isESM": true,
|
|
1082
1082
|
"relativePath": [
|
|
1083
1083
|
"src",
|
|
1084
1084
|
"commands",
|
|
@@ -1116,7 +1116,7 @@
|
|
|
1116
1116
|
"pluginType": "core",
|
|
1117
1117
|
"strict": true,
|
|
1118
1118
|
"enableJsonFlag": false,
|
|
1119
|
-
"isESM":
|
|
1119
|
+
"isESM": true,
|
|
1120
1120
|
"relativePath": [
|
|
1121
1121
|
"src",
|
|
1122
1122
|
"commands",
|
|
@@ -1154,7 +1154,7 @@
|
|
|
1154
1154
|
"pluginType": "core",
|
|
1155
1155
|
"strict": true,
|
|
1156
1156
|
"enableJsonFlag": false,
|
|
1157
|
-
"isESM":
|
|
1157
|
+
"isESM": true,
|
|
1158
1158
|
"relativePath": [
|
|
1159
1159
|
"src",
|
|
1160
1160
|
"commands",
|
|
@@ -1192,7 +1192,7 @@
|
|
|
1192
1192
|
"pluginType": "core",
|
|
1193
1193
|
"strict": true,
|
|
1194
1194
|
"enableJsonFlag": false,
|
|
1195
|
-
"isESM":
|
|
1195
|
+
"isESM": true,
|
|
1196
1196
|
"relativePath": [
|
|
1197
1197
|
"src",
|
|
1198
1198
|
"commands",
|
|
@@ -1239,7 +1239,7 @@
|
|
|
1239
1239
|
"pluginType": "core",
|
|
1240
1240
|
"strict": true,
|
|
1241
1241
|
"enableJsonFlag": false,
|
|
1242
|
-
"isESM":
|
|
1242
|
+
"isESM": true,
|
|
1243
1243
|
"relativePath": [
|
|
1244
1244
|
"src",
|
|
1245
1245
|
"commands",
|
|
@@ -1308,7 +1308,7 @@
|
|
|
1308
1308
|
"pluginType": "core",
|
|
1309
1309
|
"strict": true,
|
|
1310
1310
|
"enableJsonFlag": false,
|
|
1311
|
-
"isESM":
|
|
1311
|
+
"isESM": true,
|
|
1312
1312
|
"relativePath": [
|
|
1313
1313
|
"src",
|
|
1314
1314
|
"commands",
|
|
@@ -1346,7 +1346,7 @@
|
|
|
1346
1346
|
"pluginType": "core",
|
|
1347
1347
|
"strict": true,
|
|
1348
1348
|
"enableJsonFlag": false,
|
|
1349
|
-
"isESM":
|
|
1349
|
+
"isESM": true,
|
|
1350
1350
|
"relativePath": [
|
|
1351
1351
|
"src",
|
|
1352
1352
|
"commands",
|
|
@@ -1384,7 +1384,7 @@
|
|
|
1384
1384
|
"pluginType": "core",
|
|
1385
1385
|
"strict": true,
|
|
1386
1386
|
"enableJsonFlag": false,
|
|
1387
|
-
"isESM":
|
|
1387
|
+
"isESM": true,
|
|
1388
1388
|
"relativePath": [
|
|
1389
1389
|
"src",
|
|
1390
1390
|
"commands",
|
|
@@ -1451,7 +1451,7 @@
|
|
|
1451
1451
|
"pluginType": "core",
|
|
1452
1452
|
"strict": true,
|
|
1453
1453
|
"enableJsonFlag": false,
|
|
1454
|
-
"isESM":
|
|
1454
|
+
"isESM": true,
|
|
1455
1455
|
"relativePath": [
|
|
1456
1456
|
"src",
|
|
1457
1457
|
"commands",
|
|
@@ -1494,7 +1494,7 @@
|
|
|
1494
1494
|
"pluginType": "core",
|
|
1495
1495
|
"strict": true,
|
|
1496
1496
|
"enableJsonFlag": false,
|
|
1497
|
-
"isESM":
|
|
1497
|
+
"isESM": true,
|
|
1498
1498
|
"relativePath": [
|
|
1499
1499
|
"src",
|
|
1500
1500
|
"commands",
|
|
@@ -1537,7 +1537,7 @@
|
|
|
1537
1537
|
"pluginType": "core",
|
|
1538
1538
|
"strict": true,
|
|
1539
1539
|
"enableJsonFlag": false,
|
|
1540
|
-
"isESM":
|
|
1540
|
+
"isESM": true,
|
|
1541
1541
|
"relativePath": [
|
|
1542
1542
|
"src",
|
|
1543
1543
|
"commands",
|
|
@@ -1592,7 +1592,7 @@
|
|
|
1592
1592
|
"pluginType": "core",
|
|
1593
1593
|
"strict": true,
|
|
1594
1594
|
"enableJsonFlag": false,
|
|
1595
|
-
"isESM":
|
|
1595
|
+
"isESM": true,
|
|
1596
1596
|
"relativePath": [
|
|
1597
1597
|
"src",
|
|
1598
1598
|
"commands",
|
|
@@ -1647,7 +1647,7 @@
|
|
|
1647
1647
|
"pluginType": "core",
|
|
1648
1648
|
"strict": true,
|
|
1649
1649
|
"enableJsonFlag": false,
|
|
1650
|
-
"isESM":
|
|
1650
|
+
"isESM": true,
|
|
1651
1651
|
"relativePath": [
|
|
1652
1652
|
"src",
|
|
1653
1653
|
"commands",
|
|
@@ -1713,7 +1713,7 @@
|
|
|
1713
1713
|
"pluginType": "core",
|
|
1714
1714
|
"strict": true,
|
|
1715
1715
|
"enableJsonFlag": false,
|
|
1716
|
-
"isESM":
|
|
1716
|
+
"isESM": true,
|
|
1717
1717
|
"relativePath": [
|
|
1718
1718
|
"src",
|
|
1719
1719
|
"commands",
|
|
@@ -1757,7 +1757,7 @@
|
|
|
1757
1757
|
"pluginType": "core",
|
|
1758
1758
|
"strict": true,
|
|
1759
1759
|
"enableJsonFlag": false,
|
|
1760
|
-
"isESM":
|
|
1760
|
+
"isESM": true,
|
|
1761
1761
|
"relativePath": [
|
|
1762
1762
|
"src",
|
|
1763
1763
|
"commands",
|
|
@@ -1801,7 +1801,7 @@
|
|
|
1801
1801
|
"pluginType": "core",
|
|
1802
1802
|
"strict": true,
|
|
1803
1803
|
"enableJsonFlag": false,
|
|
1804
|
-
"isESM":
|
|
1804
|
+
"isESM": true,
|
|
1805
1805
|
"relativePath": [
|
|
1806
1806
|
"src",
|
|
1807
1807
|
"commands",
|
|
@@ -1845,7 +1845,7 @@
|
|
|
1845
1845
|
"pluginType": "core",
|
|
1846
1846
|
"strict": true,
|
|
1847
1847
|
"enableJsonFlag": false,
|
|
1848
|
-
"isESM":
|
|
1848
|
+
"isESM": true,
|
|
1849
1849
|
"relativePath": [
|
|
1850
1850
|
"src",
|
|
1851
1851
|
"commands",
|
|
@@ -1889,7 +1889,7 @@
|
|
|
1889
1889
|
"pluginType": "core",
|
|
1890
1890
|
"strict": true,
|
|
1891
1891
|
"enableJsonFlag": false,
|
|
1892
|
-
"isESM":
|
|
1892
|
+
"isESM": true,
|
|
1893
1893
|
"relativePath": [
|
|
1894
1894
|
"src",
|
|
1895
1895
|
"commands",
|
|
@@ -1928,7 +1928,7 @@
|
|
|
1928
1928
|
"pluginType": "core",
|
|
1929
1929
|
"strict": true,
|
|
1930
1930
|
"enableJsonFlag": false,
|
|
1931
|
-
"isESM":
|
|
1931
|
+
"isESM": true,
|
|
1932
1932
|
"relativePath": [
|
|
1933
1933
|
"src",
|
|
1934
1934
|
"commands",
|
|
@@ -1938,5 +1938,5 @@
|
|
|
1938
1938
|
]
|
|
1939
1939
|
}
|
|
1940
1940
|
},
|
|
1941
|
-
"version": "0.
|
|
1941
|
+
"version": "0.15.0"
|
|
1942
1942
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "swaggerhub-cli",
|
|
3
3
|
"description": "SwaggerHub CLI",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.15.0",
|
|
5
5
|
"author": "SmartBear",
|
|
6
6
|
"bin": {
|
|
7
7
|
"swaggerhub": "./bin/run"
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"@oclif/core": "^3.26.3",
|
|
12
12
|
"@oclif/plugin-help": "^6.0.21",
|
|
13
13
|
"@oclif/plugin-plugins": "^5.0.21",
|
|
14
|
-
"archiver": "^
|
|
14
|
+
"archiver": "^8.0.0",
|
|
15
15
|
"deep-extend": "^0.6.0",
|
|
16
16
|
"fs-extra": "^11.1.1",
|
|
17
17
|
"http-proxy-agent": "^9.1.0",
|
|
@@ -27,27 +27,24 @@
|
|
|
27
27
|
"devDependencies": {
|
|
28
28
|
"@faker-js/faker": "^10.0.0",
|
|
29
29
|
"@oclif/test": "^3.2.15",
|
|
30
|
+
"c8": "^12.0.0",
|
|
30
31
|
"chai": "^6.3.0",
|
|
31
32
|
"eslint": "^10.13.0",
|
|
32
33
|
"eslint-plugin-chai-friendly": "^1.0.0",
|
|
33
34
|
"eslint-plugin-immutable": "^1.0.0",
|
|
34
35
|
"eslint-plugin-mocha": "^12.0.0",
|
|
35
36
|
"eslint-plugin-n": "^18.3.0",
|
|
36
|
-
"globby": "^16.2.0",
|
|
37
37
|
"husky": "^9.0.1",
|
|
38
38
|
"mocha": "^11.7.6",
|
|
39
39
|
"nock": "^14.0.1",
|
|
40
|
-
"nyc": "^18.0.0",
|
|
41
40
|
"rewire": "^9.0.1",
|
|
42
|
-
"sinon": "^22.0.0"
|
|
43
|
-
"tmp": "^0.2.7"
|
|
41
|
+
"sinon": "^22.0.0"
|
|
44
42
|
},
|
|
45
43
|
"engines": {
|
|
46
|
-
"node": ">=22.
|
|
44
|
+
"node": ">=22.12.0",
|
|
47
45
|
"npm": ">=11.9.0"
|
|
48
46
|
},
|
|
49
47
|
"overrides": {
|
|
50
|
-
"npm": "^11.9.0",
|
|
51
48
|
"glob": "^10.5.0",
|
|
52
49
|
"serialize-javascript": "^7.1.4"
|
|
53
50
|
},
|
|
@@ -63,10 +60,15 @@
|
|
|
63
60
|
],
|
|
64
61
|
"license": "Apache-2.0",
|
|
65
62
|
"main": "src/index.js",
|
|
63
|
+
"type": "module",
|
|
64
|
+
"exports": {
|
|
65
|
+
".": "./src/index.js",
|
|
66
|
+
"./package.json": "./package.json"
|
|
67
|
+
},
|
|
66
68
|
"oclif": {
|
|
67
69
|
"commands": "./src/commands",
|
|
68
70
|
"hooks": {
|
|
69
|
-
"init": "./src/hooks/setup-config"
|
|
71
|
+
"init": "./src/hooks/setup-config.js"
|
|
70
72
|
},
|
|
71
73
|
"bin": "swaggerhub",
|
|
72
74
|
"plugins": [
|
|
@@ -93,14 +95,14 @@
|
|
|
93
95
|
"description": "this topic supports the management of Spectral rulesets"
|
|
94
96
|
}
|
|
95
97
|
},
|
|
96
|
-
"helpClass": "./src/help"
|
|
98
|
+
"helpClass": "./src/help.js"
|
|
97
99
|
},
|
|
98
100
|
"repository": "SmartBear/swaggerhub-cli",
|
|
99
101
|
"scripts": {
|
|
100
102
|
"postpack": "rm -f oclif.manifest.json",
|
|
101
103
|
"prepack": "npx oclif manifest",
|
|
102
104
|
"prepare": "husky",
|
|
103
|
-
"test": "
|
|
105
|
+
"test": "c8 mocha --forbid-only \"test/**/*.test.js\"",
|
|
104
106
|
"lint": "eslint ./src ./test",
|
|
105
107
|
"postinstall": "node ./src/check-node-version"
|
|
106
108
|
}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
import BaseCommand from '../../support/command/base-command.js'
|
|
2
|
+
import { Args, Flags, Errors } from '@oclif/core'
|
|
3
|
+
import { getApiIdentifierArg, apiNameRegex } from '../../support/command/parse-input.js'
|
|
4
|
+
import { errorMsg } from '../../template-strings/index.js'
|
|
5
|
+
import { postApi } from '../../requests/api.js'
|
|
6
|
+
|
|
7
|
+
const { CLIError } = Errors
|
|
7
8
|
|
|
8
9
|
const getNewVersion = args => {
|
|
9
10
|
const newVersion = args['NEW_VERSION']
|
|
@@ -62,4 +63,4 @@ CloneApiCommand.flags = {
|
|
|
62
63
|
...BaseCommand.flags
|
|
63
64
|
}
|
|
64
65
|
|
|
65
|
-
|
|
66
|
+
export default CloneApiCommand
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
import { Flags, Args } from '@oclif/core'
|
|
2
|
+
import { readFileSync } from 'node:fs'
|
|
3
|
+
import { getApi, postApi } from '../../requests/api.js'
|
|
4
|
+
import { getApiIdentifierArg, splitPathParams } from '../../support/command/parse-input.js'
|
|
5
|
+
import { getVersion, parseDefinition, getSpecification } from '../../utils/definitions.js'
|
|
6
|
+
import BaseCommand from '../../support/command/base-command.js'
|
|
7
|
+
import UpdateCommand from '../../support/command/update-command.js'
|
|
8
8
|
|
|
9
9
|
const isApiNameAvailable = response => response.status === 404
|
|
10
10
|
|
|
@@ -137,4 +137,4 @@ CreateAPICommand.flags = {
|
|
|
137
137
|
...BaseCommand.flags
|
|
138
138
|
}
|
|
139
139
|
|
|
140
|
-
|
|
140
|
+
export default CreateAPICommand
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
import { Flags, Args } from '@oclif/core'
|
|
2
|
+
import { deleteApi } from '../../requests/api.js'
|
|
3
|
+
import { getApiIdentifierArg, splitPathParams } from '../../support/command/parse-input.js'
|
|
4
|
+
import BaseCommand from '../../support/command/base-command.js'
|
|
5
|
+
import inquirer from 'inquirer'
|
|
6
6
|
|
|
7
7
|
class DeleteAPICommand extends BaseCommand {
|
|
8
8
|
|
|
@@ -61,4 +61,4 @@ DeleteAPICommand.flags = {
|
|
|
61
61
|
...BaseCommand.flags
|
|
62
62
|
}
|
|
63
63
|
|
|
64
|
-
|
|
64
|
+
export default DeleteAPICommand
|
package/src/commands/api/get.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
import { Flags, Args } from '@oclif/core'
|
|
2
|
+
import { getApiIdentifierArg, reqType, resolvedParam } from '../../support/command/parse-input.js'
|
|
3
|
+
import { hasJsonStructure, prettyPrintJSON } from '../../utils/general.js'
|
|
4
|
+
import { getApi } from '../../requests/api.js'
|
|
5
|
+
import { getResponseContent } from '../../support/command/handle-response.js'
|
|
6
|
+
import BaseCommand from '../../support/command/base-command.js'
|
|
7
7
|
|
|
8
8
|
class GetAPICommand extends BaseCommand {
|
|
9
9
|
constructor(...props) {
|
|
@@ -64,4 +64,4 @@ GetAPICommand.flags = {
|
|
|
64
64
|
...BaseCommand.flags
|
|
65
65
|
}
|
|
66
66
|
|
|
67
|
-
|
|
67
|
+
export default GetAPICommand
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
import { Flags, Args } from '@oclif/core'
|
|
2
|
+
import { getApiIdentifierArg, splitPathParams } from '../../support/command/parse-input.js'
|
|
3
|
+
import BaseCommand from '../../support/command/base-command.js'
|
|
4
|
+
import UpdateCommand from '../../support/command/update-command.js'
|
|
5
|
+
import inquirer from 'inquirer'
|
|
6
6
|
|
|
7
7
|
class PublishCommand extends UpdateCommand {
|
|
8
8
|
async run() {
|
|
@@ -50,4 +50,4 @@ PublishCommand.flags = {
|
|
|
50
50
|
...BaseCommand.flags
|
|
51
51
|
}
|
|
52
52
|
|
|
53
|
-
|
|
53
|
+
export default PublishCommand
|
|
@@ -1,12 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
const {
|
|
8
|
-
const { CLIError } = require('@oclif/core/lib/errors')
|
|
9
|
-
const { postApi } = require('../../requests/api')
|
|
1
|
+
import BaseCommand from '../../support/command/base-command.js'
|
|
2
|
+
import { Args, Errors } from '@oclif/core'
|
|
3
|
+
import { noVersionRegex, apiNameRegex } from '../../support/command/parse-input.js'
|
|
4
|
+
import { errorMsg } from '../../template-strings/index.js'
|
|
5
|
+
import { postApi } from '../../requests/api.js'
|
|
6
|
+
|
|
7
|
+
const { CLIError } = Errors
|
|
10
8
|
|
|
11
9
|
const getApiToRename = args => {
|
|
12
10
|
const newName = args['OWNER/API_NAME']
|
|
@@ -66,4 +64,4 @@ RenameApiCommand.args = {
|
|
|
66
64
|
|
|
67
65
|
RenameApiCommand.flags = BaseCommand.flags
|
|
68
66
|
|
|
69
|
-
|
|
67
|
+
export default RenameApiCommand
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
import { Args } from '@oclif/core'
|
|
2
|
+
import { getApiIdentifierArg, splitPathParams } from '../../support/command/parse-input.js'
|
|
3
|
+
import BaseCommand from '../../support/command/base-command.js'
|
|
4
|
+
import UpdateCommand from '../../support/command/update-command.js'
|
|
5
5
|
|
|
6
6
|
class SetDefaultCommand extends UpdateCommand {
|
|
7
7
|
|
|
@@ -29,4 +29,4 @@ SetDefaultCommand.args = {
|
|
|
29
29
|
|
|
30
30
|
SetDefaultCommand.flags = BaseCommand.flags
|
|
31
31
|
|
|
32
|
-
|
|
32
|
+
export default SetDefaultCommand
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
import { Args } from '@oclif/core'
|
|
2
|
+
import { getApiIdentifierArg, splitPathParams } from '../../support/command/parse-input.js'
|
|
3
|
+
import BaseCommand from '../../support/command/base-command.js'
|
|
4
|
+
import UpdateCommand from '../../support/command/update-command.js'
|
|
5
5
|
|
|
6
6
|
class UnpublishCommand extends UpdateCommand {
|
|
7
7
|
|
|
@@ -29,4 +29,4 @@ UnpublishCommand.args = {
|
|
|
29
29
|
|
|
30
30
|
UnpublishCommand.flags = BaseCommand.flags
|
|
31
31
|
|
|
32
|
-
|
|
32
|
+
export default UnpublishCommand
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
import { Flags, Args } from '@oclif/core'
|
|
2
|
+
import { readFileSync } from 'node:fs'
|
|
3
|
+
import { getApi, postApi } from '../../requests/api.js'
|
|
4
|
+
import { getApiIdentifierArg, splitPathParams } from '../../support/command/parse-input.js'
|
|
5
|
+
import { getVersion, parseDefinition } from '../../utils/definitions.js'
|
|
6
|
+
import BaseCommand from '../../support/command/base-command.js'
|
|
7
|
+
import UpdateCommand from '../../support/command/update-command.js'
|
|
8
8
|
|
|
9
9
|
class UpdateAPICommand extends UpdateCommand {
|
|
10
10
|
|
|
@@ -107,4 +107,4 @@ UpdateAPICommand.flags = {
|
|
|
107
107
|
...BaseCommand.flags
|
|
108
108
|
}
|
|
109
109
|
|
|
110
|
-
|
|
110
|
+
export default UpdateAPICommand
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
import { Flags, Args } from '@oclif/core'
|
|
2
|
+
import BaseCommand from '../../../support/command/base-command.js'
|
|
3
|
+
import { pipeAsync } from '../../../utils/general.js'
|
|
4
|
+
import { getResponseContent } from '../../../support/command/handle-response.js'
|
|
5
|
+
import { getStandardization } from '../../../requests/standardization.js'
|
|
6
6
|
|
|
7
7
|
class ValidateDownloadRulesCommand extends BaseCommand {
|
|
8
8
|
async run() {
|
|
@@ -57,4 +57,4 @@ ValidateDownloadRulesCommand.flags = {
|
|
|
57
57
|
}),
|
|
58
58
|
...BaseCommand.flags
|
|
59
59
|
}
|
|
60
|
-
|
|
60
|
+
export default ValidateDownloadRulesCommand
|