@forge/cli 9.3.0 → 10.0.0-next.11

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.
Files changed (84) hide show
  1. package/CHANGELOG.md +149 -0
  2. package/npm-shrinkwrap.json +50 -43
  3. package/out/analytics-client/analytics-client.js +39 -12
  4. package/out/analytics-client/analytics-message-handler.js +28 -27
  5. package/out/autocomplete/index.js +1 -2
  6. package/out/autocomplete/util.js +1 -1
  7. package/out/bin/postinstall.js +1 -1
  8. package/out/command-line/command.js +132 -116
  9. package/out/command-line/controller/autocomplete-controller.js +1 -0
  10. package/out/command-line/controller/default-environment-controller.js +8 -0
  11. package/out/command-line/controller/deploy-controller.js +25 -9
  12. package/out/command-line/controller/feedback-controller.js +2 -0
  13. package/out/command-line/controller/install-controller.js +11 -5
  14. package/out/command-line/controller/lint-controller.js +3 -1
  15. package/out/command-line/controller/pre-command-controller.js +6 -0
  16. package/out/command-line/controller/prerequisites-controller.js +3 -0
  17. package/out/command-line/controller/settings-controller.js +60 -57
  18. package/out/command-line/controller/tunnel-controller.js +8 -3
  19. package/out/command-line/dependency-injection.js +2 -2
  20. package/out/command-line/errors.js +1 -0
  21. package/out/command-line/register-authentication-command.js +1 -1
  22. package/out/command-line/register-environment-variables-commands.js +6 -8
  23. package/out/command-line/register-installation-commands.js +5 -7
  24. package/out/command-line/register-log-commands.js +1 -1
  25. package/out/command-line/register-settings-commands.js +3 -5
  26. package/out/command-line/register-storage-commands.js +1 -2
  27. package/out/command-line/sentry.js +4 -1
  28. package/out/command-line/version-info.js +1 -1
  29. package/out/command-line/view/analytics-settings-view.js +1 -0
  30. package/out/command-line/view/deploy-view.js +1 -0
  31. package/out/command-line/view/install-view.js +1 -0
  32. package/out/command-line/view/lint-view.js +2 -0
  33. package/out/command-line/view/lite-lint-view.js +2 -0
  34. package/out/command-line/view/settings-view.js +1 -0
  35. package/out/command-line/view/tunnel-view.js +4 -4
  36. package/out/deploy/deployer/deploy-monitor-graphql-client.js +2 -1
  37. package/out/deploy/deployer/deployer.js +11 -4
  38. package/out/deploy/deployer/trigger-deploy-graphql-client.js +1 -0
  39. package/out/deploy/package-upload-deploy.js +4 -0
  40. package/out/deploy/packager/archiver.js +19 -15
  41. package/out/deploy/packager/nativeui-bundler.js +6 -1
  42. package/out/deploy/packager/packager.js +7 -1
  43. package/out/deploy/packager/runtime-bundler.d.ts +3 -2
  44. package/out/deploy/packager/runtime-bundler.d.ts.map +1 -1
  45. package/out/deploy/packager/runtime-bundler.js +14 -5
  46. package/out/deploy/uploader/artifact-graphql-client.js +1 -0
  47. package/out/deploy/uploader/uploader.js +5 -0
  48. package/out/entities/graphql-client.js +2 -2
  49. package/out/entities/list-indexes.js +1 -0
  50. package/out/environment/create-environment.js +6 -1
  51. package/out/environment/delete-environment.js +6 -1
  52. package/out/environment/graphql-client.js +6 -3
  53. package/out/environment/list-environment.js +2 -0
  54. package/out/environment-variables/delete-environment-variable.js +6 -1
  55. package/out/environment-variables/graphql-client.js +1 -0
  56. package/out/environment-variables/list-environment-variables.js +6 -1
  57. package/out/environment-variables/set-environment-variable.js +6 -1
  58. package/out/installations/graphql-client.d.ts +1 -0
  59. package/out/installations/graphql-client.d.ts.map +1 -1
  60. package/out/installations/graphql-client.js +43 -25
  61. package/out/installations/install-app-site.js +2 -0
  62. package/out/installations/site-translation/cloudid-products.js +1 -0
  63. package/out/installations/uninstall-app.js +2 -0
  64. package/out/migration-keys/graphql-client.js +4 -4
  65. package/out/providers/configure-provider.js +6 -1
  66. package/out/providers/graphql-client.js +1 -0
  67. package/out/service/cached-config-service.js +1 -0
  68. package/out/service/custom-entities-service.js +4 -2
  69. package/out/service/docker-service.js +5 -1
  70. package/out/service/installation-service.js +7 -4
  71. package/out/service/lint-service.js +2 -0
  72. package/out/service/lite-lint-service.js +2 -0
  73. package/out/service/migration-keys-service.js +2 -0
  74. package/out/service/port-finding-service.js +1 -0
  75. package/out/service/resource-packaging-service.js +5 -0
  76. package/out/service/resources-uploader-service.js +2 -0
  77. package/out/service/tunnel-analytics-service.js +10 -3
  78. package/out/service/tunnel-service.js +19 -10
  79. package/out/storage/local-file-storage.js +2 -2
  80. package/out/webtrigger/get-webtrigger-url.js +4 -0
  81. package/out/webtrigger/graphql-client.js +2 -1
  82. package/out/workers/analytics-message-worker.js +3 -0
  83. package/out/workers/version-check-worker.js +1 -0
  84. package/package.json +7 -6
package/CHANGELOG.md CHANGED
@@ -1,5 +1,154 @@
1
1
  # @forge/cli
2
2
 
3
+ ## 10.0.0-next.11
4
+
5
+ ### Patch Changes
6
+
7
+ - b2ca651: Use exponential backoff when installation status task is rate limited
8
+
9
+ ## 10.0.0-next.10
10
+
11
+ ### Patch Changes
12
+
13
+ - Updated dependencies [6162ed5]
14
+ - @forge/manifest@7.3.0-next.6
15
+ - @forge/cli-shared@5.0.0-next.7
16
+ - @forge/lint@5.1.1-next.7
17
+ - @forge/tunnel@5.2.1-next.9
18
+ - @forge/bundler@4.16.2-next.8
19
+
20
+ ## 10.0.0-next.9
21
+
22
+ ### Patch Changes
23
+
24
+ - Updated dependencies [1fcdb65]
25
+ - @forge/tunnel@5.2.1-next.8
26
+
27
+ ## 10.0.0-next.8
28
+
29
+ ### Minor Changes
30
+
31
+ - 670a419: Only parse listed environment variables in the manifest
32
+
33
+ ### Patch Changes
34
+
35
+ - Updated dependencies [670a419]
36
+ - @forge/manifest@7.3.0-next.5
37
+ - @forge/cli-shared@5.0.0-next.6
38
+ - @forge/lint@5.1.1-next.6
39
+ - @forge/tunnel@5.2.1-next.7
40
+ - @forge/bundler@4.16.2-next.7
41
+
42
+ ## 10.0.0-next.7
43
+
44
+ ### Patch Changes
45
+
46
+ - Updated dependencies [7787d36]
47
+ - @forge/manifest@7.3.0-next.4
48
+ - @forge/cli-shared@5.0.0-next.5
49
+ - @forge/lint@5.1.1-next.5
50
+ - @forge/tunnel@5.2.1-next.6
51
+ - @forge/bundler@4.16.2-next.6
52
+
53
+ ## 10.0.0-next.6
54
+
55
+ ### Patch Changes
56
+
57
+ - 0c62018: Ignore rate limit errors when polling for installation status
58
+
59
+ ## 10.0.0-next.5
60
+
61
+ ### Patch Changes
62
+
63
+ - Updated dependencies [4c2dc9f]
64
+ - @forge/manifest@7.3.0-next.3
65
+ - @forge/cli-shared@5.0.0-next.4
66
+ - @forge/lint@5.1.1-next.4
67
+ - @forge/tunnel@5.2.1-next.5
68
+ - @forge/bundler@4.16.2-next.5
69
+
70
+ ## 10.0.0-next.4
71
+
72
+ ### Patch Changes
73
+
74
+ - 6099d41: Update testing to support Node 20+
75
+ - Updated dependencies [6099d41]
76
+ - @forge/tunnel@5.2.1-next.4
77
+ - @forge/manifest@7.2.3-next.2
78
+ - @forge/cli-shared@5.0.0-next.3
79
+ - @forge/lint@5.1.1-next.3
80
+ - @forge/bundler@4.16.2-next.4
81
+
82
+ ## 10.0.0-next.3
83
+
84
+ ### Patch Changes
85
+
86
+ - @forge/bundler@4.16.2-next.3
87
+ - @forge/tunnel@5.2.1-next.3
88
+
89
+ ## 10.0.0-next.2
90
+
91
+ ### Major Changes
92
+
93
+ - 5c2c20f: Fixed the issue where the CLI was unable to bundle modules with multiple entrypoints using different resource types.
94
+
95
+ Specifically the following configuration that supports both UI Kit and Custom UI resources are now supported properly.
96
+
97
+ ```yaml
98
+ modules:
99
+ jira:customFieldType:
100
+ - key: my_custom_field_app
101
+ resource: ui-kit-resource
102
+ render: native
103
+ contextConfig:
104
+ resource: custom-ui-resource
105
+ ```
106
+
107
+ In the previous CLI version, the above configuration would assume that the `custom-ui-resource` is a UI Kit resource
108
+ and would expected a UI Kit based resource is linked. To support using same resource type for multiple entrypoints,
109
+ in above example, please add `render: native` to the `contextConfig` to correct the resource type:
110
+
111
+ ```yaml
112
+ modules:
113
+ jira:customFieldType:
114
+ - key: my_custom_field_app
115
+ resource: ui-kit-resource
116
+ render: native
117
+ contextConfig:
118
+ resource: ui-kit-resource
119
+ render: native
120
+ ```
121
+
122
+ ### Patch Changes
123
+
124
+ - Updated dependencies [5c2c20f]
125
+ - @forge/cli-shared@5.0.0-next.2
126
+ - @forge/bundler@4.16.2-next.2
127
+ - @forge/lint@5.1.1-next.2
128
+ - @forge/tunnel@5.2.1-next.2
129
+
130
+ ## 9.3.1-next.1
131
+
132
+ ### Patch Changes
133
+
134
+ - Updated dependencies [f04a310]
135
+ - @forge/manifest@7.2.3-next.1
136
+ - @forge/cli-shared@4.2.1-next.1
137
+ - @forge/lint@5.1.1-next.1
138
+ - @forge/tunnel@5.2.1-next.1
139
+ - @forge/bundler@4.16.2-next.1
140
+
141
+ ## 9.3.1-next.0
142
+
143
+ ### Patch Changes
144
+
145
+ - Updated dependencies [77d16a9]
146
+ - @forge/manifest@7.2.3-next.0
147
+ - @forge/cli-shared@4.2.1-next.0
148
+ - @forge/lint@5.1.1-next.0
149
+ - @forge/tunnel@5.2.1-next.0
150
+ - @forge/bundler@4.16.2-next.0
151
+
3
152
  ## 9.3.0
4
153
 
5
154
  ### Minor Changes
@@ -1,22 +1,22 @@
1
1
  {
2
2
  "name": "@forge/cli",
3
- "version": "9.3.0",
3
+ "version": "10.0.0-next.11",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "@forge/cli",
9
- "version": "9.3.0",
9
+ "version": "10.0.0-next.11",
10
10
  "hasInstallScript": true,
11
11
  "license": "UNLICENSED",
12
12
  "dependencies": {
13
- "@forge/bundler": "4.16.1",
14
- "@forge/cli-shared": "4.2.0",
13
+ "@forge/bundler": "4.16.2-next.8",
14
+ "@forge/cli-shared": "5.0.0-next.7",
15
15
  "@forge/egress": "1.2.13",
16
- "@forge/lint": "5.1.0",
17
- "@forge/manifest": "7.2.2",
16
+ "@forge/lint": "5.1.1-next.7",
17
+ "@forge/manifest": "7.3.0-next.6",
18
18
  "@forge/runtime": "5.8.0",
19
- "@forge/tunnel": "5.2.0",
19
+ "@forge/tunnel": "5.2.1-next.9",
20
20
  "@forge/util": "1.4.3",
21
21
  "@sentry/node": "7.100.1",
22
22
  "ajv": "^8.12.0",
@@ -31,6 +31,7 @@
31
31
  "dayjs": "^1.11.10",
32
32
  "didyoumean": "^1.2.2",
33
33
  "env-paths": "^2.2.1",
34
+ "exponential-backoff": "^3.1.1",
34
35
  "form-data": "^4.0.0",
35
36
  "fs-extra": "^11.2.0",
36
37
  "hidefile": "^3.0.0",
@@ -877,9 +878,9 @@
877
878
  "integrity": "sha512-zG50ZRzbKyWHVb/XjI6iCIyyDNmSHdlclvehMjFZ/A3qpHExjSCjaszeY6gBDJKD2GORKKjQ3LS1UyRpiVVvkA=="
878
879
  },
879
880
  "node_modules/@forge/bundler": {
880
- "version": "4.16.1",
881
- "resolved": "https://registry.npmjs.org/@forge/bundler/-/bundler-4.16.1.tgz",
882
- "integrity": "sha512-+eNEL6OOO8EeaeuQAKxVgq8pu1p/NRmTE1w7KhVdCB8I4At5S8LY5rfaNalfnsefEdVI7E7wGvVHQQJHm3zyFQ==",
881
+ "version": "4.16.2-next.8",
882
+ "resolved": "https://registry.npmjs.org/@forge/bundler/-/bundler-4.16.2-next.8.tgz",
883
+ "integrity": "sha512-YzBbDHlPB6COup1P89TMky1iN0Fa0UJliZFpOwEPq8w/Vzl9OQcw4P6d4Vb6kDoR21moZwZH31wJRR6JlXzPkg==",
883
884
  "dependencies": {
884
885
  "@babel/core": "^7.24.0",
885
886
  "@babel/plugin-transform-class-properties": "^7.23.3",
@@ -888,10 +889,10 @@
888
889
  "@babel/plugin-transform-optional-chaining": "^7.23.4",
889
890
  "@babel/plugin-transform-react-jsx": "^7.23.4",
890
891
  "@babel/preset-typescript": "^7.23.3",
891
- "@forge/api": "3.6.0",
892
+ "@forge/api": "3.7.0-next.0",
892
893
  "@forge/babel-plugin-transform-ui": "1.1.18",
893
- "@forge/cli-shared": "4.2.0",
894
- "@forge/lint": "5.1.0",
894
+ "@forge/cli-shared": "5.0.0-next.7",
895
+ "@forge/lint": "5.1.1-next.7",
895
896
  "@forge/util": "1.4.3",
896
897
  "assert": "^2.1.0",
897
898
  "babel-loader": "^8.3.0",
@@ -930,9 +931,9 @@
930
931
  }
931
932
  },
932
933
  "node_modules/@forge/bundler/node_modules/@forge/api": {
933
- "version": "3.6.0",
934
- "resolved": "https://registry.npmjs.org/@forge/api/-/api-3.6.0.tgz",
935
- "integrity": "sha512-xXoZ+Jt/8xOzy2De8aGwlNxANZg8/U9jKWqW00GzQPKKNhtQWbrsJUPHzllomffh+mzm7X2WgFvZhOwo72uYng==",
934
+ "version": "3.7.0-next.0",
935
+ "resolved": "https://registry.npmjs.org/@forge/api/-/api-3.7.0-next.0.tgz",
936
+ "integrity": "sha512-aEtkdfY4qd51UbeXhRhVaC1ZzhwkrFep2LCGyw1O0TJr/1pAfVaBWMlxh0OXjMdteUu8vLFw63zd9yjGHZ84qg==",
936
937
  "dependencies": {
937
938
  "@forge/auth": "0.0.5",
938
939
  "@forge/egress": "1.2.13",
@@ -948,11 +949,11 @@
948
949
  "integrity": "sha512-n4AWXkzMA4Pv4nam+dTu7PHgDQtMwaAF2MalOWF323zGvYKS/gZJY+7efJq0DLP783iTfjvYT879EHhCrfvEXA=="
949
950
  },
950
951
  "node_modules/@forge/cli-shared": {
951
- "version": "4.2.0",
952
- "resolved": "https://registry.npmjs.org/@forge/cli-shared/-/cli-shared-4.2.0.tgz",
953
- "integrity": "sha512-PBWfWnOiRKHFmUI+M1y3nofQWRG9z5D/zUqyVuwKw0Xq0lviNgcJD5kIaSDLlunAzE/q22g0abzk+Y3guxvxEg==",
952
+ "version": "5.0.0-next.7",
953
+ "resolved": "https://registry.npmjs.org/@forge/cli-shared/-/cli-shared-5.0.0-next.7.tgz",
954
+ "integrity": "sha512-DuTOmRMr6M+GLTQpq+i3cPMPEH5Lh6mw9mq4FQpm5dxhr5Uw4LLeEolc/1XSm+sIMgBKNHLOCWvs4VgVMcg7yw==",
954
955
  "dependencies": {
955
- "@forge/manifest": "7.2.2",
956
+ "@forge/manifest": "7.3.0-next.6",
956
957
  "@forge/util": "1.4.3",
957
958
  "@sentry/node": "7.100.1",
958
959
  "adm-zip": "^0.5.10",
@@ -1003,13 +1004,13 @@
1003
1004
  }
1004
1005
  },
1005
1006
  "node_modules/@forge/lint": {
1006
- "version": "5.1.0",
1007
- "resolved": "https://registry.npmjs.org/@forge/lint/-/lint-5.1.0.tgz",
1008
- "integrity": "sha512-4Pi7OksEU9Lwvn0/rFx9kgyzst44D2xac6IbdWMc+srwiF5qYWBdQKRnR936y8fSMzIBvRYUA+WUf4/hxFj6Cw==",
1007
+ "version": "5.1.1-next.7",
1008
+ "resolved": "https://registry.npmjs.org/@forge/lint/-/lint-5.1.1-next.7.tgz",
1009
+ "integrity": "sha512-J9z33eUjqLf1sY3hloQqamshjxsFmohTlzzHOIzcOzh7AnvhL5+PhcRPmlElwEZNbrx4gnZaE0TLZ2tB5pvItA==",
1009
1010
  "dependencies": {
1010
- "@forge/cli-shared": "4.2.0",
1011
+ "@forge/cli-shared": "5.0.0-next.7",
1011
1012
  "@forge/egress": "1.2.13",
1012
- "@forge/manifest": "7.2.2",
1013
+ "@forge/manifest": "7.3.0-next.6",
1013
1014
  "@typescript-eslint/typescript-estree": "^5.62.0",
1014
1015
  "array.prototype.flatmap": "^1.3.2",
1015
1016
  "atlassian-openapi": "^1.0.18",
@@ -1018,11 +1019,12 @@
1018
1019
  }
1019
1020
  },
1020
1021
  "node_modules/@forge/manifest": {
1021
- "version": "7.2.2",
1022
- "resolved": "https://registry.npmjs.org/@forge/manifest/-/manifest-7.2.2.tgz",
1023
- "integrity": "sha512-nDbg157S1Xa6MF5s2V7LZ6WUZ/ipMUdrjAVug51oxvXKri3qWpTbph5E/YvdknXJIYXi5wnOip2cHDo9QupXCA==",
1022
+ "version": "7.3.0-next.6",
1023
+ "resolved": "https://registry.npmjs.org/@forge/manifest/-/manifest-7.3.0-next.6.tgz",
1024
+ "integrity": "sha512-Mm90I4iPgribDWUuF0ffwbVZGjB0fbmFmaMnp44SShH8RERAZ5NbnBm4zhB9y55OsEU2ZXZhQ1EUPWzyl/12EA==",
1024
1025
  "dependencies": {
1025
1026
  "@forge/util": "1.4.3",
1027
+ "@sentry/node": "7.100.1",
1026
1028
  "ajv": "^8.12.0",
1027
1029
  "ajv-formats": "2.1.1",
1028
1030
  "cheerio": "^0.22.0",
@@ -1050,15 +1052,15 @@
1050
1052
  }
1051
1053
  },
1052
1054
  "node_modules/@forge/tunnel": {
1053
- "version": "5.2.0",
1054
- "resolved": "https://registry.npmjs.org/@forge/tunnel/-/tunnel-5.2.0.tgz",
1055
- "integrity": "sha512-sAIDBDcs9hbMjrnlGtDhkvRNsr1w/B7HK1obRWVOeM7POo7XQJnnbF8l5/j/6okxDkt4NbUYF8c1hDBnPisQ7Q==",
1055
+ "version": "5.2.1-next.9",
1056
+ "resolved": "https://registry.npmjs.org/@forge/tunnel/-/tunnel-5.2.1-next.9.tgz",
1057
+ "integrity": "sha512-yzs/NKgx4/JJIt6NsuYhhq1OnX4C0fDjwIYPakdcKwAenWA8D98t8R6Nj1c5qw6rfKyR6sVCrWlhGCOH9PKrtA==",
1056
1058
  "dependencies": {
1057
- "@forge/bundler": "4.16.1",
1058
- "@forge/cli-shared": "4.2.0",
1059
+ "@forge/bundler": "4.16.2-next.8",
1060
+ "@forge/cli-shared": "5.0.0-next.7",
1059
1061
  "@forge/csp": "3.2.1",
1060
1062
  "@forge/runtime": "5.8.0",
1061
- "cloudflared": "^0.5.1",
1063
+ "@koterpillar/cloudflared": "^0.5.1",
1062
1064
  "express": "^4.18.3",
1063
1065
  "express-intercept": "^1.1.0",
1064
1066
  "http-proxy-middleware": "^2.0.6",
@@ -1222,6 +1224,15 @@
1222
1224
  "resolved": "https://registry.npmjs.org/@jsdevtools/ono/-/ono-7.1.3.tgz",
1223
1225
  "integrity": "sha1-nfA7vXxpalxYiFw0qgbaQchUN5Y= sha512-4JQNk+3mVzK3xh2rqd6RB4J46qUR19azEHBneZyTZM+c456qOrbbM/5xcR8huNCCcbVt7+UmizG6GuUvPvKUYg=="
1224
1226
  },
1227
+ "node_modules/@koterpillar/cloudflared": {
1228
+ "version": "0.5.1",
1229
+ "resolved": "https://registry.npmjs.org/@koterpillar/cloudflared/-/cloudflared-0.5.1.tgz",
1230
+ "integrity": "sha1-4DHkstBAPyFhl5o3PkasyQt0dMk= sha512-hV/a4BZ5+YMYT+PcsUoHBz84REqae4M3Mmt/TzFSDBK7RSsmKCD7w1NArRMj08lyTxXAqiBWZCQTE68CN/LTRA==",
1231
+ "hasInstallScript": true,
1232
+ "bin": {
1233
+ "cloudflared": "lib/cloudflared.js"
1234
+ }
1235
+ },
1225
1236
  "node_modules/@leichtgewicht/ip-codec": {
1226
1237
  "version": "2.0.4",
1227
1238
  "resolved": "https://registry.npmjs.org/@leichtgewicht/ip-codec/-/ip-codec-2.0.4.tgz",
@@ -3082,15 +3093,6 @@
3082
3093
  "node": ">=4"
3083
3094
  }
3084
3095
  },
3085
- "node_modules/cloudflared": {
3086
- "version": "0.5.1",
3087
- "resolved": "https://registry.npmjs.org/cloudflared/-/cloudflared-0.5.1.tgz",
3088
- "integrity": "sha1-m5BmKfdwd7n/2W/tZzyWiEXgWV4= sha512-DQ33z5dBrE32xrHRyA35CtE8WcDgOzefR0/x/gVVa2jSKc54vRTIDwNQXCbXcet3sv2DOVtLWUbdcjxbCYK+OQ==",
3089
- "hasInstallScript": true,
3090
- "bin": {
3091
- "cloudflared": "lib/cloudflared.js"
3092
- }
3093
- },
3094
3096
  "node_modules/code-point-at": {
3095
3097
  "version": "1.1.0",
3096
3098
  "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz",
@@ -4205,6 +4207,11 @@
4205
4207
  "node": ">=6"
4206
4208
  }
4207
4209
  },
4210
+ "node_modules/exponential-backoff": {
4211
+ "version": "3.1.1",
4212
+ "resolved": "https://registry.npmjs.org/exponential-backoff/-/exponential-backoff-3.1.1.tgz",
4213
+ "integrity": "sha1-ZKx1Jv40GrGKOQFs0ix4fQHgC/Y= sha512-dX7e/LHVJ6W3DE1MHWi9S1EYzDESENfLrYohG2G++ovZrYOkm4Knwa0mc1cn84xJOR4KEU0WSchhLbd0UklbHw=="
4214
+ },
4208
4215
  "node_modules/express": {
4209
4216
  "version": "4.18.3",
4210
4217
  "resolved": "https://registry.npmjs.org/express/-/express-4.18.3.tgz",
@@ -20,30 +20,41 @@ function appAidOrUndefined(appAri) {
20
20
  }
21
21
  }
22
22
  class AnalyticsClientReporter {
23
+ storage;
24
+ logger;
25
+ configService;
23
26
  constructor(storage, logger, configService) {
24
27
  this.storage = storage;
25
28
  this.logger = logger;
26
29
  this.configService = configService;
27
- this.source = 'forge/cli';
28
30
  }
31
+ source = 'forge/cli';
29
32
  reportSuccess(cmdName, cred, attributes) {
30
33
  this.processAnalyticsEvent({
31
34
  id: (0, uuid_1.v4)(),
32
35
  eventType: analytics_message_handler_1.EventType.TRACK,
33
- event: Object.assign(Object.assign({ timestamp: new Date(), os: {
36
+ event: {
37
+ timestamp: new Date(),
38
+ os: {
34
39
  name: os.platform(),
35
40
  version: os.release()
36
- } }, this._getUserId(cred)), { trackEvent: {
41
+ },
42
+ ...this._getUserId(cred),
43
+ trackEvent: {
37
44
  source: this.source,
38
45
  action: 'invoked',
39
46
  actionSubject: cmdName,
40
47
  attributes: this._getAttributes(attributes),
41
48
  containers: this._getContainer(attributes)
42
- } })
49
+ }
50
+ }
43
51
  });
44
52
  }
45
53
  reportFailure(cmdName, cred, attributes, e) {
46
- attributes = Object.assign(Object.assign({}, attributes), this._getErrorDetails(e));
54
+ attributes = {
55
+ ...attributes,
56
+ ...this._getErrorDetails(e)
57
+ };
47
58
  this.reportOperationalEvent('invoked', cmdName, cred, attributes);
48
59
  }
49
60
  reportCommandInvoke(cmdName, cred, attributes) {
@@ -51,7 +62,7 @@ class AnalyticsClientReporter {
51
62
  }
52
63
  reportInvokeFailure(cmdName, cred, attributes, e) {
53
64
  if (e) {
54
- attributes = Object.assign(Object.assign({}, attributes), this._getErrorListDetails(e));
65
+ attributes = { ...attributes, ...this._getErrorListDetails(e) };
55
66
  }
56
67
  this.reportOperationalEvent('cmdInvokeFailed', cmdName, cred, attributes);
57
68
  }
@@ -59,16 +70,23 @@ class AnalyticsClientReporter {
59
70
  this.processAnalyticsEvent({
60
71
  id: (0, uuid_1.v4)(),
61
72
  eventType: analytics_message_handler_1.EventType.OPERATIONAL,
62
- event: Object.assign(Object.assign({ timestamp: new Date(), os: {
73
+ event: {
74
+ timestamp: new Date(),
75
+ os: {
63
76
  name: os.platform(),
64
77
  version: os.release()
65
- } }, this._getUserId(cred)), { operationalEvent: {
78
+ },
79
+ ...this._getUserId(cred),
80
+ operationalEvent: {
66
81
  source: this.source,
67
82
  action,
68
83
  actionSubject,
69
- attributes: Object.assign({}, this._getAttributes(attributes)),
84
+ attributes: {
85
+ ...this._getAttributes(attributes)
86
+ },
70
87
  containers: this._getContainer(attributes)
71
- } })
88
+ }
89
+ }
72
90
  });
73
91
  }
74
92
  processAnalyticsEvent(analyticsEvent) {
@@ -133,10 +151,19 @@ class AnalyticsClientReporter {
133
151
  return mappedValue ? { [name]: mappedValue } : {};
134
152
  }
135
153
  _getAttributes(attributes) {
136
- return Object.assign(Object.assign(Object.assign(Object.assign({}, attributes), this._asAttribute(attributes.appId, 'appId', appAidOrUndefined)), this._nodeVersion()), this._machineId());
154
+ return {
155
+ ...attributes,
156
+ ...this._asAttribute(attributes.appId, 'appId', appAidOrUndefined),
157
+ ...this._nodeVersion(),
158
+ ...this._machineId()
159
+ };
137
160
  }
138
161
  _getContainer(attributes) {
139
- return Object.assign(Object.assign(Object.assign({}, this._asContainer(attributes.appId, 'app', 'appId', appAidOrUndefined)), this._asContainer(attributes.appEnv, 'appEnv', 'environment')), this._asContainer(attributes.product, 'product', 'product'));
162
+ return {
163
+ ...this._asContainer(attributes.appId, 'app', 'appId', appAidOrUndefined),
164
+ ...this._asContainer(attributes.appEnv, 'appEnv', 'environment'),
165
+ ...this._asContainer(attributes.product, 'product', 'product')
166
+ };
140
167
  }
141
168
  }
142
169
  exports.AnalyticsClientReporter = AnalyticsClientReporter;
@@ -9,35 +9,36 @@ var EventType;
9
9
  EventType["UI"] = "ui";
10
10
  })(EventType = exports.EventType || (exports.EventType = {}));
11
11
  class AnalyticsMessageHandler {
12
+ environment;
12
13
  constructor(environment) {
13
14
  this.environment = environment;
14
- this.aClient = (0, analytics_node_client_1.analyticsClient)({
15
- env: this.environment || 'prod',
16
- product: 'forge',
17
- subproduct: 'cli',
18
- flushAt: 1,
19
- flushInterval: 1
20
- });
21
- this.handleMessage = async (message) => {
22
- if (!message) {
23
- return;
24
- }
25
- try {
26
- switch (message.eventType) {
27
- case EventType.TRACK:
28
- await this.aClient.sendTrackEvent(message.event);
29
- break;
30
- case EventType.OPERATIONAL:
31
- await this.aClient.sendOperationalEvent(message.event);
32
- break;
33
- case EventType.UI:
34
- await this.aClient.sendUIEvent(message.event);
35
- break;
36
- }
37
- }
38
- catch (e) {
39
- }
40
- };
41
15
  }
16
+ aClient = (0, analytics_node_client_1.analyticsClient)({
17
+ env: this.environment || 'prod',
18
+ product: 'forge',
19
+ subproduct: 'cli',
20
+ flushAt: 1,
21
+ flushInterval: 1
22
+ });
23
+ handleMessage = async (message) => {
24
+ if (!message) {
25
+ return;
26
+ }
27
+ try {
28
+ switch (message.eventType) {
29
+ case EventType.TRACK:
30
+ await this.aClient.sendTrackEvent(message.event);
31
+ break;
32
+ case EventType.OPERATIONAL:
33
+ await this.aClient.sendOperationalEvent(message.event);
34
+ break;
35
+ case EventType.UI:
36
+ await this.aClient.sendUIEvent(message.event);
37
+ break;
38
+ }
39
+ }
40
+ catch (e) {
41
+ }
42
+ };
42
43
  }
43
44
  exports.AnalyticsMessageHandler = AnalyticsMessageHandler;
@@ -8,7 +8,6 @@ const util_1 = require("./util");
8
8
  const autocompleteConfig = autocomplete_config_json_1.default;
9
9
  const processAutocompleteFactory = (autocompleteConfig) => {
10
10
  const processAutocomplete = (_, { line, reply }) => {
11
- var _a;
12
11
  const splitLine = line.split(' ');
13
12
  const numArgs = splitLine.length;
14
13
  if (numArgs === 2) {
@@ -25,7 +24,7 @@ const processAutocompleteFactory = (autocompleteConfig) => {
25
24
  }
26
25
  const commandOptions = autocompleteConfig.commands[command];
27
26
  const lastArg = splitLine.slice(-2, -1)[0];
28
- if ((_a = commandOptions[lastArg]) === null || _a === void 0 ? void 0 : _a.requireUserArg) {
27
+ if (commandOptions[lastArg]?.requireUserArg) {
29
28
  return;
30
29
  }
31
30
  const userOptionsSelected = (0, util_1.getUserOptionsSelectedFromSplitLine)(splitLine);
@@ -6,7 +6,7 @@ const getUserOptionsSelectedFromSplitLine = (splitLine) => {
6
6
  };
7
7
  exports.getUserOptionsSelectedFromSplitLine = getUserOptionsSelectedFromSplitLine;
8
8
  const getRemainingOptions = (commandOptions, userSelectedOptions) => {
9
- const commandOptionsClone = Object.assign({}, commandOptions);
9
+ const commandOptionsClone = { ...commandOptions };
10
10
  for (const option of userSelectedOptions) {
11
11
  delete commandOptionsClone[option];
12
12
  }
@@ -13,7 +13,7 @@ const cachedConf = cli_shared_1.CachedConf.getCache(cli_shared_1.CONFIG_PROJECT_
13
13
  const configService = new cached_config_service_1.CachedConfigService(cachedConf);
14
14
  const analyticsClientReporter = new analytics_client_1.AnalyticsClientReporter(new local_file_storage_1.LocalFileStorage(), ui, configService);
15
15
  const cliDetails = (0, version_info_1.getCLIDetails)();
16
- const attributes = { version: cliDetails === null || cliDetails === void 0 ? void 0 : cliDetails.version };
16
+ const attributes = { version: cliDetails?.version };
17
17
  const anonId = (0, anon_user_id_1.getAnonId)(true);
18
18
  analyticsClientReporter.reportSuccess('postinstall', anonId, attributes);
19
19
  if ((0, isSupportedShell_1.isSupportedShell)()) {