@forge/cli 10.13.6 → 11.0.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/CHANGELOG.md +251 -0
- package/LICENSE.txt +7 -0
- package/npm-shrinkwrap.json +142 -130
- package/out/autocomplete/autocomplete-config.json +26 -0
- package/out/command-line/command.d.ts +15 -2
- package/out/command-line/command.d.ts.map +1 -1
- package/out/command-line/command.js +29 -6
- package/out/command-line/controller/deploy-controller.d.ts.map +1 -1
- package/out/command-line/controller/deploy-controller.js +4 -7
- package/out/command-line/controller/install-controller.d.ts +3 -3
- package/out/command-line/controller/install-controller.d.ts.map +1 -1
- package/out/command-line/controller/install-controller.js +16 -13
- package/out/command-line/controller/version-controller.d.ts +36 -0
- package/out/command-line/controller/version-controller.d.ts.map +1 -0
- package/out/command-line/controller/version-controller.js +114 -0
- package/out/command-line/dependency-injection.d.ts +4 -1
- package/out/command-line/dependency-injection.d.ts.map +1 -1
- package/out/command-line/dependency-injection.js +14 -6
- package/out/command-line/index.d.ts +1 -1
- package/out/command-line/index.d.ts.map +1 -1
- package/out/command-line/index.js +6 -4
- package/out/command-line/register-app-commands.d.ts.map +1 -1
- package/out/command-line/register-app-commands.js +9 -1
- package/out/command-line/register-installation-commands.d.ts +2 -10
- package/out/command-line/register-installation-commands.d.ts.map +1 -1
- package/out/command-line/register-installation-commands.js +29 -32
- package/out/command-line/register-version-commands.d.ts +4 -0
- package/out/command-line/register-version-commands.d.ts.map +1 -0
- package/out/command-line/register-version-commands.js +76 -0
- package/out/command-line/register-webtrigger-commands.d.ts +1 -1
- package/out/command-line/register-webtrigger-commands.d.ts.map +1 -1
- package/out/command-line/register-webtrigger-commands.js +13 -5
- package/out/command-line/view/deploy-view.d.ts +1 -1
- package/out/command-line/view/deploy-view.d.ts.map +1 -1
- package/out/command-line/view/deploy-view.js +2 -2
- package/out/command-line/view/version-view.d.ts +26 -0
- package/out/command-line/view/version-view.d.ts.map +1 -0
- package/out/command-line/view/version-view.js +198 -0
- package/out/environment/graphql-client.d.ts +1 -0
- package/out/environment/graphql-client.d.ts.map +1 -1
- package/out/environment/graphql-client.js +3 -1
- package/out/environment/list-environment.d.ts +1 -0
- package/out/environment/list-environment.d.ts.map +1 -1
- package/out/installations/graphql-client.d.ts +6 -5
- package/out/installations/graphql-client.d.ts.map +1 -1
- package/out/installations/graphql-client.js +44 -7
- package/out/installations/installation-helper.d.ts.map +1 -1
- package/out/installations/installation-helper.js +1 -1
- package/out/installations/site-translation/bitbucket.d.ts +3 -4
- package/out/installations/site-translation/bitbucket.d.ts.map +1 -1
- package/out/installations/site-translation/bitbucket.js +1 -1
- package/out/installations/site-translation/index.d.ts +1 -1
- package/out/installations/site-translation/index.d.ts.map +1 -1
- package/out/installations/site-translation/index.js +1 -1
- package/out/installations/site-translation/site-translation.d.ts +3 -4
- package/out/installations/site-translation/site-translation.d.ts.map +1 -1
- package/out/installations/site-translation/sited-products.d.ts +29 -0
- package/out/installations/site-translation/sited-products.d.ts.map +1 -0
- package/out/installations/site-translation/sited-products.js +133 -0
- package/out/service/installation-service.d.ts +18 -4
- package/out/service/installation-service.d.ts.map +1 -1
- package/out/service/installation-service.js +44 -10
- package/out/service/tunnel-service.d.ts.map +1 -1
- package/out/service/tunnel-service.js +1 -1
- package/out/service/version-service.d.ts +77 -0
- package/out/service/version-service.d.ts.map +1 -0
- package/out/service/version-service.js +163 -0
- package/out/version/graphql-client.d.ts +25 -0
- package/out/version/graphql-client.d.ts.map +1 -0
- package/out/version/graphql-client.js +144 -0
- package/package.json +13 -11
- package/out/installations/site-translation/cloudid-products.d.ts +0 -25
- package/out/installations/site-translation/cloudid-products.d.ts.map +0 -1
- package/out/installations/site-translation/cloudid-products.js +0 -103
package/npm-shrinkwrap.json
CHANGED
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@forge/cli",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "11.0.0",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "@forge/cli",
|
|
9
|
-
"version": "
|
|
9
|
+
"version": "11.0.0",
|
|
10
10
|
"hasInstallScript": true,
|
|
11
|
-
"license": "
|
|
12
|
-
"dependencies": {
|
|
13
|
-
"@forge/bundler": "4.20.
|
|
14
|
-
"@forge/cli-shared": "6.
|
|
15
|
-
"@forge/egress": "1.3.
|
|
16
|
-
"@forge/i18n": "0.0.
|
|
17
|
-
"@forge/lint": "5.
|
|
18
|
-
"@forge/manifest": "8.6.
|
|
19
|
-
"@forge/runtime": "5.10.
|
|
20
|
-
"@forge/tunnel": "5.9.
|
|
21
|
-
"@forge/util": "1.4.
|
|
11
|
+
"license": "SEE LICENSE IN LICENSE.txt",
|
|
12
|
+
"dependencies": {
|
|
13
|
+
"@forge/bundler": "4.20.8",
|
|
14
|
+
"@forge/cli-shared": "6.6.0",
|
|
15
|
+
"@forge/egress": "1.3.1",
|
|
16
|
+
"@forge/i18n": "0.0.3",
|
|
17
|
+
"@forge/lint": "5.7.0",
|
|
18
|
+
"@forge/manifest": "8.6.1",
|
|
19
|
+
"@forge/runtime": "5.10.5",
|
|
20
|
+
"@forge/tunnel": "5.9.2",
|
|
21
|
+
"@forge/util": "1.4.7",
|
|
22
22
|
"@sentry/node": "7.106.0",
|
|
23
23
|
"ajv": "^8.12.0",
|
|
24
24
|
"archiver": "^6.0.2",
|
|
@@ -31,6 +31,7 @@
|
|
|
31
31
|
"cross-spawn": "^7.0.3",
|
|
32
32
|
"dayjs": "^1.11.10",
|
|
33
33
|
"didyoumean": "^1.2.2",
|
|
34
|
+
"diff": "^7.0.0",
|
|
34
35
|
"env-paths": "^2.2.1",
|
|
35
36
|
"exponential-backoff": "^3.1.1",
|
|
36
37
|
"form-data": "^4.0.0",
|
|
@@ -58,6 +59,7 @@
|
|
|
58
59
|
"@types/command-exists": "^1.2.3",
|
|
59
60
|
"@types/cross-spawn": "^6.0.6",
|
|
60
61
|
"@types/didyoumean": "^1.2.2",
|
|
62
|
+
"@types/diff": "^6.0.0",
|
|
61
63
|
"@types/fs-extra": "^11.0.4",
|
|
62
64
|
"@types/hidefile": "^3.0.3",
|
|
63
65
|
"@types/inquirer": "^8.2.10",
|
|
@@ -824,25 +826,17 @@
|
|
|
824
826
|
"node": ">=10.0.0"
|
|
825
827
|
}
|
|
826
828
|
},
|
|
827
|
-
"node_modules/@forge/auth": {
|
|
828
|
-
"version": "0.0.5",
|
|
829
|
-
"resolved": "https://registry.npmjs.org/@forge/auth/-/auth-0.0.5.tgz",
|
|
830
|
-
"integrity": "sha1-2N84/FWnUIEhvvJQj0lO5KgegHI= sha512-JIJMRRnNWQjvLlnf2Goc+/CEzx+XTpzTarOR7wzRMOEoE715T5gdvb4hWeyQVyRJkRJUQQAXxDPT0WH7rINOcg==",
|
|
831
|
-
"dependencies": {
|
|
832
|
-
"tslib": "^2.6.2"
|
|
833
|
-
}
|
|
834
|
-
},
|
|
835
829
|
"node_modules/@forge/babel-plugin-transform-ui": {
|
|
836
|
-
"version": "1.1.
|
|
837
|
-
"resolved": "https://registry.npmjs.org/@forge/babel-plugin-transform-ui/-/babel-plugin-transform-ui-1.1.
|
|
838
|
-
"integrity": "sha512-
|
|
839
|
-
"license": "
|
|
830
|
+
"version": "1.1.20",
|
|
831
|
+
"resolved": "https://registry.npmjs.org/@forge/babel-plugin-transform-ui/-/babel-plugin-transform-ui-1.1.20.tgz",
|
|
832
|
+
"integrity": "sha512-rvG84DbJCybK7384MWVytbMab49mhxkCyA5IGNplQ/vf8z2Vw96pI05JvuodTcOAIDr11FGD/YJsmxaSDiJdOw==",
|
|
833
|
+
"license": "SEE LICENSE IN LICENSE.txt"
|
|
840
834
|
},
|
|
841
835
|
"node_modules/@forge/bundler": {
|
|
842
|
-
"version": "4.20.
|
|
843
|
-
"resolved": "https://registry.npmjs.org/@forge/bundler/-/bundler-4.20.
|
|
844
|
-
"integrity": "sha512-
|
|
845
|
-
"license": "
|
|
836
|
+
"version": "4.20.8",
|
|
837
|
+
"resolved": "https://registry.npmjs.org/@forge/bundler/-/bundler-4.20.8.tgz",
|
|
838
|
+
"integrity": "sha512-pVf0AzHHqaTxVuXY/7bj2AWLIjzlQ182xZtFFicBx5U/hQPQT6jfCnw+ipNYuKOvE1xubWGI/TuJa9tGC5yQxg==",
|
|
839
|
+
"license": "SEE LICENSE IN LICENSE.txt",
|
|
846
840
|
"dependencies": {
|
|
847
841
|
"@babel/core": "^7.24.0",
|
|
848
842
|
"@babel/plugin-transform-class-properties": "^7.23.3",
|
|
@@ -851,13 +845,13 @@
|
|
|
851
845
|
"@babel/plugin-transform-optional-chaining": "^7.23.4",
|
|
852
846
|
"@babel/plugin-transform-react-jsx": "^7.23.4",
|
|
853
847
|
"@babel/preset-typescript": "^7.23.3",
|
|
854
|
-
"@forge/api": "5.0.
|
|
855
|
-
"@forge/babel-plugin-transform-ui": "1.1.
|
|
856
|
-
"@forge/cli-shared": "6.
|
|
857
|
-
"@forge/i18n": "0.0.
|
|
858
|
-
"@forge/lint": "5.
|
|
859
|
-
"@forge/manifest": "8.6.
|
|
860
|
-
"@forge/util": "1.4.
|
|
848
|
+
"@forge/api": "5.0.1",
|
|
849
|
+
"@forge/babel-plugin-transform-ui": "1.1.20",
|
|
850
|
+
"@forge/cli-shared": "6.6.0",
|
|
851
|
+
"@forge/i18n": "0.0.3",
|
|
852
|
+
"@forge/lint": "5.7.0",
|
|
853
|
+
"@forge/manifest": "8.6.1",
|
|
854
|
+
"@forge/util": "1.4.7",
|
|
861
855
|
"assert": "^2.1.0",
|
|
862
856
|
"babel-loader": "^8.3.0",
|
|
863
857
|
"browserify-zlib": "^0.2.0",
|
|
@@ -895,34 +889,43 @@
|
|
|
895
889
|
}
|
|
896
890
|
},
|
|
897
891
|
"node_modules/@forge/bundler/node_modules/@forge/api": {
|
|
898
|
-
"version": "5.0.
|
|
899
|
-
"resolved": "https://registry.npmjs.org/@forge/api/-/api-5.0.
|
|
900
|
-
"integrity": "sha512-
|
|
901
|
-
"license": "
|
|
902
|
-
"dependencies": {
|
|
903
|
-
"@forge/auth": "0.0.
|
|
904
|
-
"@forge/egress": "1.3.
|
|
905
|
-
"@forge/storage": "1.7.
|
|
906
|
-
"@forge/util": "1.4.
|
|
892
|
+
"version": "5.0.1",
|
|
893
|
+
"resolved": "https://registry.npmjs.org/@forge/api/-/api-5.0.1.tgz",
|
|
894
|
+
"integrity": "sha512-ib+njDsHa5jL07nLN7kwD0ITMbnH1AuZK1npvJ9yr5tjxsME3WC2HflCk+NvokRj1ZwXPDH40r5wN1rA7Kynxw==",
|
|
895
|
+
"license": "SEE LICENSE IN LICENSE.txt",
|
|
896
|
+
"dependencies": {
|
|
897
|
+
"@forge/auth": "0.0.6",
|
|
898
|
+
"@forge/egress": "1.3.1",
|
|
899
|
+
"@forge/storage": "1.7.2",
|
|
900
|
+
"@forge/util": "1.4.7",
|
|
907
901
|
"@types/node-fetch": "^2.6.11",
|
|
908
902
|
"node-fetch": "2.7.0"
|
|
909
903
|
}
|
|
910
904
|
},
|
|
905
|
+
"node_modules/@forge/bundler/node_modules/@forge/auth": {
|
|
906
|
+
"version": "0.0.6",
|
|
907
|
+
"resolved": "https://registry.npmjs.org/@forge/auth/-/auth-0.0.6.tgz",
|
|
908
|
+
"integrity": "sha512-Nqa34q6HErAKvHJneUsfhJIIyyVYYLKsRjZkJbFd2d+3JUEiaxEq6hPD/5qKO36FzsqJPWlenDypPQvuxJ5TVA==",
|
|
909
|
+
"license": "SEE LICENSE IN LICENSE.txt",
|
|
910
|
+
"dependencies": {
|
|
911
|
+
"tslib": "^2.6.2"
|
|
912
|
+
}
|
|
913
|
+
},
|
|
911
914
|
"node_modules/@forge/bundler/node_modules/@forge/storage": {
|
|
912
|
-
"version": "1.7.
|
|
913
|
-
"resolved": "https://registry.npmjs.org/@forge/storage/-/storage-1.7.
|
|
914
|
-
"integrity": "sha512-
|
|
915
|
-
"license": "
|
|
915
|
+
"version": "1.7.2",
|
|
916
|
+
"resolved": "https://registry.npmjs.org/@forge/storage/-/storage-1.7.2.tgz",
|
|
917
|
+
"integrity": "sha512-LIxWBspMy2wJtFJffJ6l/HiHvVa0vtx6ZFMT4kc5l07baKc6CXIWWuF0GD6WSRs9dAq1QphjMxMjjpuhbhzrSg==",
|
|
918
|
+
"license": "SEE LICENSE IN LICENSE.txt"
|
|
916
919
|
},
|
|
917
920
|
"node_modules/@forge/cli-shared": {
|
|
918
|
-
"version": "6.
|
|
919
|
-
"resolved": "https://registry.npmjs.org/@forge/cli-shared/-/cli-shared-6.
|
|
920
|
-
"integrity": "sha512-
|
|
921
|
-
"license": "
|
|
922
|
-
"dependencies": {
|
|
923
|
-
"@forge/i18n": "0.0.
|
|
924
|
-
"@forge/manifest": "8.6.
|
|
925
|
-
"@forge/util": "1.4.
|
|
921
|
+
"version": "6.6.0",
|
|
922
|
+
"resolved": "https://registry.npmjs.org/@forge/cli-shared/-/cli-shared-6.6.0.tgz",
|
|
923
|
+
"integrity": "sha512-7Isya6U6QSgOgr+yrliKBwaHI+J/htQAHPbyQHJFIHD6quX+sX9kPzfXBOSHuQ92VxiSUaA18w5UwMhDT9DFHg==",
|
|
924
|
+
"license": "SEE LICENSE IN LICENSE.txt",
|
|
925
|
+
"dependencies": {
|
|
926
|
+
"@forge/i18n": "0.0.3",
|
|
927
|
+
"@forge/manifest": "8.6.1",
|
|
928
|
+
"@forge/util": "1.4.7",
|
|
926
929
|
"@sentry/node": "7.106.0",
|
|
927
930
|
"adm-zip": "^0.5.10",
|
|
928
931
|
"array.prototype.flatmap": "^1.3.2",
|
|
@@ -955,42 +958,43 @@
|
|
|
955
958
|
}
|
|
956
959
|
},
|
|
957
960
|
"node_modules/@forge/csp": {
|
|
958
|
-
"version": "3.6.
|
|
959
|
-
"resolved": "https://registry.npmjs.org/@forge/csp/-/csp-3.6.
|
|
960
|
-
"integrity": "sha512-
|
|
961
|
-
"license": "
|
|
961
|
+
"version": "3.6.1",
|
|
962
|
+
"resolved": "https://registry.npmjs.org/@forge/csp/-/csp-3.6.1.tgz",
|
|
963
|
+
"integrity": "sha512-uQ5Lp5JHUbARxrDy1EM4OwmJiXIIeVAEbYH5ynNC9HluP4219DnRs1a8nABCyQ8zKKhbhUajFkB9Ywxh567Vug==",
|
|
964
|
+
"license": "SEE LICENSE IN LICENSE.txt",
|
|
962
965
|
"dependencies": {
|
|
963
966
|
"cheerio": "^0.22.0",
|
|
964
967
|
"content-security-policy-parser": "^0.4.1"
|
|
965
968
|
}
|
|
966
969
|
},
|
|
967
970
|
"node_modules/@forge/egress": {
|
|
968
|
-
"version": "1.3.
|
|
969
|
-
"resolved": "https://registry.npmjs.org/@forge/egress/-/egress-1.3.
|
|
970
|
-
"integrity": "sha512-
|
|
971
|
-
"license": "
|
|
971
|
+
"version": "1.3.1",
|
|
972
|
+
"resolved": "https://registry.npmjs.org/@forge/egress/-/egress-1.3.1.tgz",
|
|
973
|
+
"integrity": "sha512-GxKRC35WmDBriAlxRz8kymmra0UP0MMjvYpT19flUmk2koz04r+WrmlTUetrW+Omp/59brNHmlQPPM2XH/YQ3g==",
|
|
974
|
+
"license": "SEE LICENSE IN LICENSE.txt",
|
|
972
975
|
"dependencies": {
|
|
973
976
|
"minimatch": "^9.0.3"
|
|
974
977
|
}
|
|
975
978
|
},
|
|
976
979
|
"node_modules/@forge/i18n": {
|
|
977
|
-
"version": "0.0.
|
|
978
|
-
"resolved": "https://registry.npmjs.org/@forge/i18n/-/i18n-0.0.
|
|
979
|
-
"integrity": "sha512-
|
|
980
|
-
"license": "
|
|
980
|
+
"version": "0.0.3",
|
|
981
|
+
"resolved": "https://registry.npmjs.org/@forge/i18n/-/i18n-0.0.3.tgz",
|
|
982
|
+
"integrity": "sha512-QBNEVVwD0C1iWZUQZalHJ2XGuLTVT+rU0BHKZw5z1xScFAVeDtQR+qmO/F4T/LKarDq2I6NWrq3j6p969pG4Yg==",
|
|
983
|
+
"license": "SEE LICENSE IN LICENSE.txt",
|
|
981
984
|
"dependencies": {
|
|
982
985
|
"lodash": "^4.17.21"
|
|
983
986
|
}
|
|
984
987
|
},
|
|
985
988
|
"node_modules/@forge/lint": {
|
|
986
|
-
"version": "5.
|
|
987
|
-
"resolved": "https://registry.npmjs.org/@forge/lint/-/lint-5.
|
|
988
|
-
"integrity": "sha512-
|
|
989
|
-
"license": "
|
|
990
|
-
"dependencies": {
|
|
991
|
-
"@forge/cli-shared": "6.
|
|
992
|
-
"@forge/
|
|
993
|
-
"@forge/
|
|
989
|
+
"version": "5.7.0",
|
|
990
|
+
"resolved": "https://registry.npmjs.org/@forge/lint/-/lint-5.7.0.tgz",
|
|
991
|
+
"integrity": "sha512-vMxvDY7ghsNcAAAUISm9yNEOZ/nnNvAKKl77oUaELiCDOECJlqEa7i2opD09wpvY49Q+h5E9pp5glqLy7IYOAw==",
|
|
992
|
+
"license": "SEE LICENSE IN LICENSE.txt",
|
|
993
|
+
"dependencies": {
|
|
994
|
+
"@forge/cli-shared": "6.6.0",
|
|
995
|
+
"@forge/csp": "3.6.1",
|
|
996
|
+
"@forge/egress": "1.3.1",
|
|
997
|
+
"@forge/manifest": "8.6.1",
|
|
994
998
|
"@typescript-eslint/typescript-estree": "^5.62.0",
|
|
995
999
|
"array.prototype.flatmap": "^1.3.2",
|
|
996
1000
|
"atlassian-openapi": "^1.0.18",
|
|
@@ -999,12 +1003,12 @@
|
|
|
999
1003
|
}
|
|
1000
1004
|
},
|
|
1001
1005
|
"node_modules/@forge/manifest": {
|
|
1002
|
-
"version": "8.6.
|
|
1003
|
-
"resolved": "https://registry.npmjs.org/@forge/manifest/-/manifest-8.6.
|
|
1004
|
-
"integrity": "sha512
|
|
1005
|
-
"license": "
|
|
1006
|
+
"version": "8.6.1",
|
|
1007
|
+
"resolved": "https://registry.npmjs.org/@forge/manifest/-/manifest-8.6.1.tgz",
|
|
1008
|
+
"integrity": "sha512-+Yny3UWfLxHSFPvRhhcQlt02Dkg/U0v/7936Q1bZ9VcihgR+/lMU+9diKwB0H2LVWbGLbToAQitg1DSzz1hw5A==",
|
|
1009
|
+
"license": "SEE LICENSE IN LICENSE.txt",
|
|
1006
1010
|
"dependencies": {
|
|
1007
|
-
"@forge/i18n": "0.0.
|
|
1011
|
+
"@forge/i18n": "0.0.3",
|
|
1008
1012
|
"@sentry/node": "7.106.0",
|
|
1009
1013
|
"ajv": "^8.12.0",
|
|
1010
1014
|
"ajv-formats": "2.1.1",
|
|
@@ -1016,12 +1020,12 @@
|
|
|
1016
1020
|
}
|
|
1017
1021
|
},
|
|
1018
1022
|
"node_modules/@forge/runtime": {
|
|
1019
|
-
"version": "5.10.
|
|
1020
|
-
"resolved": "https://registry.npmjs.org/@forge/runtime/-/runtime-5.10.
|
|
1021
|
-
"integrity": "sha512-
|
|
1022
|
-
"license": "
|
|
1023
|
+
"version": "5.10.5",
|
|
1024
|
+
"resolved": "https://registry.npmjs.org/@forge/runtime/-/runtime-5.10.5.tgz",
|
|
1025
|
+
"integrity": "sha512-Df6XFCQ+Mg2zfziUp6U7Z4k8nynXQN9kQLW2G+s+iGwI+XRFTLIiMApTQVLPiMqSvoDDhoiGZnf73IC8IJ/cEQ==",
|
|
1026
|
+
"license": "SEE LICENSE IN LICENSE.txt",
|
|
1023
1027
|
"dependencies": {
|
|
1024
|
-
"@forge/util": "1.4.
|
|
1028
|
+
"@forge/util": "1.4.7",
|
|
1025
1029
|
"fp-ts": "^2.16.2",
|
|
1026
1030
|
"io-ts": "^2.2.21",
|
|
1027
1031
|
"io-ts-reporters": "^2.0.1",
|
|
@@ -1032,17 +1036,17 @@
|
|
|
1032
1036
|
}
|
|
1033
1037
|
},
|
|
1034
1038
|
"node_modules/@forge/tunnel": {
|
|
1035
|
-
"version": "5.9.
|
|
1036
|
-
"resolved": "https://registry.npmjs.org/@forge/tunnel/-/tunnel-5.9.
|
|
1037
|
-
"integrity": "sha512-
|
|
1038
|
-
"license": "
|
|
1039
|
-
"dependencies": {
|
|
1040
|
-
"@forge/bundler": "4.20.
|
|
1041
|
-
"@forge/cli-shared": "6.
|
|
1042
|
-
"@forge/csp": "3.6.
|
|
1043
|
-
"@forge/runtime": "5.10.
|
|
1044
|
-
"@koterpillar/cloudflared": "^0.8.0",
|
|
1039
|
+
"version": "5.9.2",
|
|
1040
|
+
"resolved": "https://registry.npmjs.org/@forge/tunnel/-/tunnel-5.9.2.tgz",
|
|
1041
|
+
"integrity": "sha512-2ZcSw4QNiKFbK6yuK58Cl+ufMRyOR8yR9W77IpA5IPcir30x6tUVbeUJnxNo38mGI3mCqNZeC3DjzZ6FhnnBGw==",
|
|
1042
|
+
"license": "SEE LICENSE IN LICENSE.txt",
|
|
1043
|
+
"dependencies": {
|
|
1044
|
+
"@forge/bundler": "4.20.8",
|
|
1045
|
+
"@forge/cli-shared": "6.6.0",
|
|
1046
|
+
"@forge/csp": "3.6.1",
|
|
1047
|
+
"@forge/runtime": "5.10.5",
|
|
1045
1048
|
"chokidar": "^3.6.0",
|
|
1049
|
+
"cloudflared": "^0.7.0",
|
|
1046
1050
|
"express": "^4.18.3",
|
|
1047
1051
|
"express-intercept": "^1.1.0",
|
|
1048
1052
|
"http-proxy-middleware": "^2.0.6",
|
|
@@ -1056,10 +1060,10 @@
|
|
|
1056
1060
|
}
|
|
1057
1061
|
},
|
|
1058
1062
|
"node_modules/@forge/util": {
|
|
1059
|
-
"version": "1.4.
|
|
1060
|
-
"resolved": "https://registry.npmjs.org/@forge/util/-/util-1.4.
|
|
1061
|
-
"integrity": "sha512-
|
|
1062
|
-
"license": "
|
|
1063
|
+
"version": "1.4.7",
|
|
1064
|
+
"resolved": "https://registry.npmjs.org/@forge/util/-/util-1.4.7.tgz",
|
|
1065
|
+
"integrity": "sha512-W5XKq0TrkVs2se0z8chx2y07r08dcOIViGY3vl8L7wHX64Ius6ERwVij0cQb4rnAXGko1g0Q+hmzsheX9vTZ/g==",
|
|
1066
|
+
"license": "SEE LICENSE IN LICENSE.txt"
|
|
1063
1067
|
},
|
|
1064
1068
|
"node_modules/@graphql-typed-document-node/core": {
|
|
1065
1069
|
"version": "3.2.0",
|
|
@@ -1211,15 +1215,6 @@
|
|
|
1211
1215
|
"@jridgewell/sourcemap-codec": "^1.4.14"
|
|
1212
1216
|
}
|
|
1213
1217
|
},
|
|
1214
|
-
"node_modules/@koterpillar/cloudflared": {
|
|
1215
|
-
"version": "0.8.0",
|
|
1216
|
-
"resolved": "https://registry.npmjs.org/@koterpillar/cloudflared/-/cloudflared-0.8.0.tgz",
|
|
1217
|
-
"integrity": "sha1-t7d4K8bmBMZ4kVg0M8lFB2dVMB8= sha512-6V0T5n2LrBvxLfg/HSID+aQeGAkiRiI+TQVvBPmVzUYwqWCwSZbq6hddoLFJtBaN5ktXOMmGjqw1h42LiLaskQ==",
|
|
1218
|
-
"hasInstallScript": true,
|
|
1219
|
-
"bin": {
|
|
1220
|
-
"cloudflared": "lib/cloudflared.js"
|
|
1221
|
-
}
|
|
1222
|
-
},
|
|
1223
1218
|
"node_modules/@leichtgewicht/ip-codec": {
|
|
1224
1219
|
"version": "2.0.4",
|
|
1225
1220
|
"resolved": "https://registry.npmjs.org/@leichtgewicht/ip-codec/-/ip-codec-2.0.4.tgz",
|
|
@@ -2974,6 +2969,15 @@
|
|
|
2974
2969
|
"node": ">=0.8"
|
|
2975
2970
|
}
|
|
2976
2971
|
},
|
|
2972
|
+
"node_modules/cloudflared": {
|
|
2973
|
+
"version": "0.7.0",
|
|
2974
|
+
"resolved": "https://registry.npmjs.org/cloudflared/-/cloudflared-0.7.0.tgz",
|
|
2975
|
+
"integrity": "sha1-LJ/CfObFOe0WWR9lwzqu1WpSZiY= sha512-CB60WqD8N/ZoT3cNVlLai8X4fIk9bY3cfx7/7h8RAi1LDrEe/ioZS9Fin3ohr9pKrzXGStiYKtm6qPyFbx3S6w==",
|
|
2976
|
+
"hasInstallScript": true,
|
|
2977
|
+
"bin": {
|
|
2978
|
+
"cloudflared": "lib/cloudflared.js"
|
|
2979
|
+
}
|
|
2980
|
+
},
|
|
2977
2981
|
"node_modules/code-point-at": {
|
|
2978
2982
|
"version": "1.1.0",
|
|
2979
2983
|
"resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz",
|
|
@@ -3615,6 +3619,14 @@
|
|
|
3615
3619
|
"resolved": "https://registry.npmjs.org/didyoumean/-/didyoumean-1.2.2.tgz",
|
|
3616
3620
|
"integrity": "sha1-mJNG/+noObRVXs9WZu3qDT6K0Dc= sha512-gxtyfqMg7GKyhQmb056K7M3xszy/myH8w+B4RT+QXBQsvAOdc3XymqDDPHx1BgPgsdAA5SIifona89YtRATDzw=="
|
|
3617
3621
|
},
|
|
3622
|
+
"node_modules/diff": {
|
|
3623
|
+
"version": "7.0.0",
|
|
3624
|
+
"resolved": "https://registry.npmjs.org/diff/-/diff-7.0.0.tgz",
|
|
3625
|
+
"integrity": "sha1-P7NNOHzXbYA/buvqZ7kh2rAYKpo= sha512-PJWHUb1RFevKCwaFA9RlG5tCd+FO5iRh9A8HEtkmBH2Li03iJriB6m6JIN4rGz3K3JLawI7/veA1xzRKP6ISBw==",
|
|
3626
|
+
"engines": {
|
|
3627
|
+
"node": ">=0.3.1"
|
|
3628
|
+
}
|
|
3629
|
+
},
|
|
3618
3630
|
"node_modules/diffie-hellman": {
|
|
3619
3631
|
"version": "5.0.3",
|
|
3620
3632
|
"resolved": "https://registry.npmjs.org/diffie-hellman/-/diffie-hellman-5.0.3.tgz",
|
|
@@ -7634,9 +7646,9 @@
|
|
|
7634
7646
|
}
|
|
7635
7647
|
},
|
|
7636
7648
|
"node_modules/rxjs": {
|
|
7637
|
-
"version": "7.8.
|
|
7638
|
-
"resolved": "https://registry.npmjs.org/rxjs/-/rxjs-7.8.
|
|
7639
|
-
"integrity": "sha512-
|
|
7649
|
+
"version": "7.8.2",
|
|
7650
|
+
"resolved": "https://registry.npmjs.org/rxjs/-/rxjs-7.8.2.tgz",
|
|
7651
|
+
"integrity": "sha512-dhKf903U/PQZY6boNNtAGdWbG85WAbjT/1xYoZIC7FAY0yWapOBQVsVrDl58W86//e1VpMNBtRV4MaXfdMySFA==",
|
|
7640
7652
|
"license": "Apache-2.0",
|
|
7641
7653
|
"dependencies": {
|
|
7642
7654
|
"tslib": "^2.1.0"
|
|
@@ -8089,6 +8101,23 @@
|
|
|
8089
8101
|
"uuid": "dist/bin/uuid"
|
|
8090
8102
|
}
|
|
8091
8103
|
},
|
|
8104
|
+
"node_modules/source-map-support": {
|
|
8105
|
+
"version": "0.5.21",
|
|
8106
|
+
"resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.21.tgz",
|
|
8107
|
+
"integrity": "sha1-BP58f54e0tZiIzwoyys1ufY/bk8= sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==",
|
|
8108
|
+
"dependencies": {
|
|
8109
|
+
"buffer-from": "^1.0.0",
|
|
8110
|
+
"source-map": "^0.6.0"
|
|
8111
|
+
}
|
|
8112
|
+
},
|
|
8113
|
+
"node_modules/source-map-support/node_modules/source-map": {
|
|
8114
|
+
"version": "0.6.1",
|
|
8115
|
+
"resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
|
|
8116
|
+
"integrity": "sha1-dHIq8y6WFOnCh6jQu95IteLxomM= sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
|
|
8117
|
+
"engines": {
|
|
8118
|
+
"node": ">=0.10.0"
|
|
8119
|
+
}
|
|
8120
|
+
},
|
|
8092
8121
|
"node_modules/spdy": {
|
|
8093
8122
|
"version": "4.0.2",
|
|
8094
8123
|
"resolved": "https://registry.npmjs.org/spdy/-/spdy-4.0.2.tgz",
|
|
@@ -8407,23 +8436,6 @@
|
|
|
8407
8436
|
"resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz",
|
|
8408
8437
|
"integrity": "sha1-/UhehMA+tIgcIHIrpIA16FMa6zM= sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ=="
|
|
8409
8438
|
},
|
|
8410
|
-
"node_modules/terser/node_modules/source-map": {
|
|
8411
|
-
"version": "0.6.1",
|
|
8412
|
-
"resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
|
|
8413
|
-
"integrity": "sha1-dHIq8y6WFOnCh6jQu95IteLxomM= sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
|
|
8414
|
-
"engines": {
|
|
8415
|
-
"node": ">=0.10.0"
|
|
8416
|
-
}
|
|
8417
|
-
},
|
|
8418
|
-
"node_modules/terser/node_modules/source-map-support": {
|
|
8419
|
-
"version": "0.5.21",
|
|
8420
|
-
"resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.21.tgz",
|
|
8421
|
-
"integrity": "sha1-BP58f54e0tZiIzwoyys1ufY/bk8= sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==",
|
|
8422
|
-
"dependencies": {
|
|
8423
|
-
"buffer-from": "^1.0.0",
|
|
8424
|
-
"source-map": "^0.6.0"
|
|
8425
|
-
}
|
|
8426
|
-
},
|
|
8427
8439
|
"node_modules/text-encoder-lite": {
|
|
8428
8440
|
"version": "2.0.0",
|
|
8429
8441
|
"resolved": "https://registry.npmjs.org/text-encoder-lite/-/text-encoder-lite-2.0.0.tgz",
|
|
@@ -122,6 +122,15 @@
|
|
|
122
122
|
"--verbose": {
|
|
123
123
|
"requireUserArg": false
|
|
124
124
|
},
|
|
125
|
+
"--site": {
|
|
126
|
+
"requireUserArg": true
|
|
127
|
+
},
|
|
128
|
+
"--product": {
|
|
129
|
+
"requireUserArg": true
|
|
130
|
+
},
|
|
131
|
+
"--environment": {
|
|
132
|
+
"requireUserArg": true
|
|
133
|
+
},
|
|
125
134
|
"--help": {
|
|
126
135
|
"requireUserArg": false
|
|
127
136
|
}
|
|
@@ -206,6 +215,15 @@
|
|
|
206
215
|
"--functionKey": {
|
|
207
216
|
"requireUserArg": true
|
|
208
217
|
},
|
|
218
|
+
"--site": {
|
|
219
|
+
"requireUserArg": true
|
|
220
|
+
},
|
|
221
|
+
"--product": {
|
|
222
|
+
"requireUserArg": true
|
|
223
|
+
},
|
|
224
|
+
"--environment": {
|
|
225
|
+
"requireUserArg": true
|
|
226
|
+
},
|
|
209
227
|
"--help": {
|
|
210
228
|
"requireUserArg": false
|
|
211
229
|
}
|
|
@@ -258,6 +276,14 @@
|
|
|
258
276
|
"--help": {
|
|
259
277
|
"requireUserArg": false
|
|
260
278
|
}
|
|
279
|
+
},
|
|
280
|
+
"version": {
|
|
281
|
+
"--verbose": {
|
|
282
|
+
"requireUserArg": false
|
|
283
|
+
},
|
|
284
|
+
"--help": {
|
|
285
|
+
"requireUserArg": false
|
|
286
|
+
}
|
|
261
287
|
}
|
|
262
288
|
},
|
|
263
289
|
"options": {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import commander, { CommanderError } from 'commander';
|
|
2
2
|
import { CamelCase } from 'type-fest';
|
|
3
3
|
import { AnalyticsClientReporter } from '../analytics-client/analytics-client';
|
|
4
|
-
import { Logger, CLIDetails, CredentialGetter, PersonalApiCredentialsValidated, ErrorWithAnalytics, ErrorAnalytics, FeatureFlagService } from '@forge/cli-shared';
|
|
4
|
+
import { Logger, CLIDetails, CredentialGetter, PersonalApiCredentialsValidated, ErrorWithAnalytics, ErrorAnalytics, FeatureFlagService, SupportedProduct, SupportedProductsService } from '@forge/cli-shared';
|
|
5
5
|
import { PreCommandController } from './controller/pre-command-controller';
|
|
6
6
|
import * as autocomplete from '../autocomplete/types';
|
|
7
7
|
import { StubController } from './controller/stubController';
|
|
@@ -47,6 +47,7 @@ export declare class Command<Args extends AnyArgs = [], Opts extends AnyOpts = D
|
|
|
47
47
|
private readonly credentialStore;
|
|
48
48
|
private readonly defaultEnvironmentController;
|
|
49
49
|
private readonly featureFlagService;
|
|
50
|
+
private readonly supportedProductsService;
|
|
50
51
|
get verbose(): boolean;
|
|
51
52
|
private static isError;
|
|
52
53
|
private static isHelpTriggered;
|
|
@@ -60,7 +61,7 @@ export declare class Command<Args extends AnyArgs = [], Opts extends AnyOpts = D
|
|
|
60
61
|
private readonly requiresAnalyticsConsent;
|
|
61
62
|
private readonly requiredOptionFlags;
|
|
62
63
|
private readonly preconditionFn;
|
|
63
|
-
static program(ui: Logger, analyticsClient: AnalyticsClientReporter, preCommandController: PreCommandController, cliDetails: CLIDetails | undefined, credentialStore: CredentialGetter, defaultEnvironmentController: DefaultEnvironmentController, featureFlagService: FeatureFlagService): Command<[], DefaultOpts>;
|
|
64
|
+
static program(ui: Logger, analyticsClient: AnalyticsClientReporter, preCommandController: PreCommandController, cliDetails: CLIDetails | undefined, credentialStore: CredentialGetter, defaultEnvironmentController: DefaultEnvironmentController, featureFlagService: FeatureFlagService, supportedProductsService: SupportedProductsService): Command<[], DefaultOpts>;
|
|
64
65
|
private constructor();
|
|
65
66
|
private clone;
|
|
66
67
|
version(str: string, flags?: string): Command<Args, Opts>;
|
|
@@ -80,6 +81,10 @@ export declare class Command<Args extends AnyArgs = [], Opts extends AnyOpts = D
|
|
|
80
81
|
environmentOption(): Command<Args, Opts & {
|
|
81
82
|
environment: string;
|
|
82
83
|
}>;
|
|
84
|
+
contextOption(supportedProducts: SupportedProduct[]): Command<Args, Opts & {
|
|
85
|
+
site?: URL;
|
|
86
|
+
product?: SupportedProduct;
|
|
87
|
+
}>;
|
|
83
88
|
jsonOption(): Command<Args, Opts & {
|
|
84
89
|
json: boolean;
|
|
85
90
|
}>;
|
|
@@ -99,5 +104,13 @@ export declare class Command<Args extends AnyArgs = [], Opts extends AnyOpts = D
|
|
|
99
104
|
getAutocompleteConfig(): autocomplete.AutocompleteConfig;
|
|
100
105
|
}
|
|
101
106
|
export declare function getAutocompleteConfig(cmd: commander.Command): autocomplete.AutocompleteConfig;
|
|
107
|
+
export declare function validateContext({ supportedProductsService, site, product }: {
|
|
108
|
+
supportedProductsService: SupportedProductsService;
|
|
109
|
+
site?: string;
|
|
110
|
+
product?: string;
|
|
111
|
+
}): Promise<{
|
|
112
|
+
site?: URL;
|
|
113
|
+
product?: SupportedProduct;
|
|
114
|
+
}>;
|
|
102
115
|
export {};
|
|
103
116
|
//# sourceMappingURL=command.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"command.d.ts","sourceRoot":"","sources":["../../src/command-line/command.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,EAAE,EAAE,cAAc,EAAU,MAAM,WAAW,CAAC;AAE9D,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AACtC,OAAO,EAAE,uBAAuB,EAAE,MAAM,sCAAsC,CAAC;AAC/E,OAAO,EAEL,MAAM,EAEN,UAAU,EAEV,gBAAgB,EAChB,+BAA+B,EAE/B,kBAAkB,EAClB,cAAc,EAEd,kBAAkB,
|
|
1
|
+
{"version":3,"file":"command.d.ts","sourceRoot":"","sources":["../../src/command-line/command.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,EAAE,EAAE,cAAc,EAAU,MAAM,WAAW,CAAC;AAE9D,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AACtC,OAAO,EAAE,uBAAuB,EAAE,MAAM,sCAAsC,CAAC;AAC/E,OAAO,EAEL,MAAM,EAEN,UAAU,EAEV,gBAAgB,EAChB,+BAA+B,EAE/B,kBAAkB,EAClB,cAAc,EAEd,kBAAkB,EAClB,gBAAgB,EAChB,wBAAwB,EACzB,MAAM,mBAAmB,CAAC;AAK3B,OAAO,EAAE,oBAAoB,EAAE,MAAM,qCAAqC,CAAC;AAC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B,CAY7F;AAED,wBAAsB,eAAe,CAAC,EACpC,wBAAwB,EACxB,IAAI,EACJ,OAAO,EACR,EAAE;IACD,wBAAwB,EAAE,wBAAwB,CAAC;IACnD,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,GAAG,OAAO,CAAC;IAAE,IAAI,CAAC,EAAE,GAAG,CAAC;IAAC,OAAO,CAAC,EAAE,gBAAgB,CAAA;CAAE,CAAC,CActD"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getAutocompleteConfig = exports.Command = exports.WrapperError = void 0;
|
|
3
|
+
exports.validateContext = exports.getAutocompleteConfig = exports.Command = exports.WrapperError = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const commander_1 = tslib_1.__importStar(require("commander"));
|
|
6
6
|
const semver_1 = tslib_1.__importDefault(require("semver"));
|
|
@@ -36,6 +36,7 @@ class Command {
|
|
|
36
36
|
credentialStore;
|
|
37
37
|
defaultEnvironmentController;
|
|
38
38
|
featureFlagService;
|
|
39
|
+
supportedProductsService;
|
|
39
40
|
get verbose() {
|
|
40
41
|
return this.cmd.opts().verbose;
|
|
41
42
|
}
|
|
@@ -63,11 +64,11 @@ class Command {
|
|
|
63
64
|
requiresAnalyticsConsent;
|
|
64
65
|
requiredOptionFlags = [];
|
|
65
66
|
preconditionFn = [];
|
|
66
|
-
static program(ui, analyticsClient, preCommandController, cliDetails, credentialStore, defaultEnvironmentController, featureFlagService) {
|
|
67
|
-
const cmd = new Command(ui, analyticsClient, preCommandController, cliDetails, credentialStore, defaultEnvironmentController, featureFlagService, {});
|
|
67
|
+
static program(ui, analyticsClient, preCommandController, cliDetails, credentialStore, defaultEnvironmentController, featureFlagService, supportedProductsService) {
|
|
68
|
+
const cmd = new Command(ui, analyticsClient, preCommandController, cliDetails, credentialStore, defaultEnvironmentController, featureFlagService, supportedProductsService, {});
|
|
68
69
|
return cmd.version(cliDetails?.version ?? 'unknown', '--version').option('--verbose', cli_shared_1.Text.optionVerbose);
|
|
69
70
|
}
|
|
70
|
-
constructor(ui, analyticsClient, preCommandController, cliDetails, credentialStore, defaultEnvironmentController, featureFlagService, { cmd, analyticsName, requiresAuthentication, requiresAnalyticsConsent, requiredOptionFlags, preconditionFn }) {
|
|
71
|
+
constructor(ui, analyticsClient, preCommandController, cliDetails, credentialStore, defaultEnvironmentController, featureFlagService, supportedProductsService, { cmd, analyticsName, requiresAuthentication, requiresAnalyticsConsent, requiredOptionFlags, preconditionFn }) {
|
|
71
72
|
this.ui = ui;
|
|
72
73
|
this.analyticsClient = analyticsClient;
|
|
73
74
|
this.preCommandController = preCommandController;
|
|
@@ -75,6 +76,7 @@ class Command {
|
|
|
75
76
|
this.credentialStore = credentialStore;
|
|
76
77
|
this.defaultEnvironmentController = defaultEnvironmentController;
|
|
77
78
|
this.featureFlagService = featureFlagService;
|
|
79
|
+
this.supportedProductsService = supportedProductsService;
|
|
78
80
|
this.cmd = cmd || new commander_1.default.Command();
|
|
79
81
|
this.analyticsName = analyticsName;
|
|
80
82
|
this.requiresAuthentication = requiresAuthentication ?? true;
|
|
@@ -90,7 +92,7 @@ class Command {
|
|
|
90
92
|
this.cmd.configureHelp({ sortSubcommands: true });
|
|
91
93
|
}
|
|
92
94
|
clone(overrides) {
|
|
93
|
-
return new Command(this.ui, this.analyticsClient, this.preCommandController, this.cliDetails, this.credentialStore, this.defaultEnvironmentController, this.featureFlagService, {
|
|
95
|
+
return new Command(this.ui, this.analyticsClient, this.preCommandController, this.cliDetails, this.credentialStore, this.defaultEnvironmentController, this.featureFlagService, this.supportedProductsService, {
|
|
94
96
|
cmd: this.cmd,
|
|
95
97
|
analyticsName: this.analyticsName,
|
|
96
98
|
requiresAuthentication: this.requiresAuthentication,
|
|
@@ -109,7 +111,7 @@ class Command {
|
|
|
109
111
|
.command(name, opts)
|
|
110
112
|
.allowUnknownOption(false)
|
|
111
113
|
.allowExcessArguments(false);
|
|
112
|
-
const subCommand = new Command(this.ui, this.analyticsClient, this.preCommandController, this.cliDetails, this.credentialStore, this.defaultEnvironmentController, this.featureFlagService, {
|
|
114
|
+
const subCommand = new Command(this.ui, this.analyticsClient, this.preCommandController, this.cliDetails, this.credentialStore, this.defaultEnvironmentController, this.featureFlagService, this.supportedProductsService, {
|
|
113
115
|
cmd,
|
|
114
116
|
analyticsName: Command.concatenateNames(this.analyticsName, cmd.name())
|
|
115
117
|
}).option('--verbose', cli_shared_1.Text.optionVerbose);
|
|
@@ -176,6 +178,15 @@ class Command {
|
|
|
176
178
|
return { environment: (0, environment_1.checkEnvironmentOption)(environment) };
|
|
177
179
|
});
|
|
178
180
|
}
|
|
181
|
+
contextOption(supportedProducts) {
|
|
182
|
+
const supportedProductsService = this.supportedProductsService;
|
|
183
|
+
return this.option('-s, --site [site]', cli_shared_1.Text.optionSite)
|
|
184
|
+
.option('-p, --product [product]', cli_shared_1.Text.optionProduct(supportedProducts))
|
|
185
|
+
.precondition(async (...args) => {
|
|
186
|
+
const { site, product } = last(args);
|
|
187
|
+
return await validateContext({ supportedProductsService, site, product });
|
|
188
|
+
});
|
|
189
|
+
}
|
|
179
190
|
jsonOption() {
|
|
180
191
|
return this.option('--json', cli_shared_1.Text.optionJson, false);
|
|
181
192
|
}
|
|
@@ -416,3 +427,15 @@ function getAutocompleteConfig(cmd) {
|
|
|
416
427
|
return { commands, options };
|
|
417
428
|
}
|
|
418
429
|
exports.getAutocompleteConfig = getAutocompleteConfig;
|
|
430
|
+
async function validateContext({ supportedProductsService, site, product }) {
|
|
431
|
+
let maybeSupportedProduct = undefined;
|
|
432
|
+
let maybeSiteUrl = undefined;
|
|
433
|
+
if (product !== undefined) {
|
|
434
|
+
maybeSupportedProduct = await supportedProductsService.validateSupportedProduct(product);
|
|
435
|
+
}
|
|
436
|
+
if (site) {
|
|
437
|
+
maybeSiteUrl = await supportedProductsService.validateSite(site, maybeSupportedProduct);
|
|
438
|
+
}
|
|
439
|
+
return { site: maybeSiteUrl, product: maybeSupportedProduct };
|
|
440
|
+
}
|
|
441
|
+
exports.validateContext = validateContext;
|