@forge/cli 9.1.0-next.6 → 9.1.1-next.3

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 (82) hide show
  1. package/CHANGELOG.md +66 -0
  2. package/npm-shrinkwrap.json +47 -48
  3. package/out/analytics-client/analytics-client.js +12 -39
  4. package/out/analytics-client/analytics-message-handler.js +27 -28
  5. package/out/autocomplete/index.js +2 -1
  6. package/out/autocomplete/util.js +1 -1
  7. package/out/bin/postinstall.js +1 -1
  8. package/out/command-line/command.js +116 -132
  9. package/out/command-line/controller/autocomplete-controller.js +0 -1
  10. package/out/command-line/controller/default-environment-controller.js +0 -8
  11. package/out/command-line/controller/deploy-controller.js +9 -25
  12. package/out/command-line/controller/feedback-controller.js +0 -2
  13. package/out/command-line/controller/install-controller.js +5 -11
  14. package/out/command-line/controller/lint-controller.js +1 -3
  15. package/out/command-line/controller/pre-command-controller.js +0 -6
  16. package/out/command-line/controller/prerequisites-controller.js +0 -3
  17. package/out/command-line/controller/settings-controller.js +57 -60
  18. package/out/command-line/controller/tunnel-controller.js +1 -7
  19. package/out/command-line/dependency-injection.js +2 -2
  20. package/out/command-line/errors.js +0 -1
  21. package/out/command-line/register-authentication-command.js +1 -1
  22. package/out/command-line/register-environment-variables-commands.js +8 -6
  23. package/out/command-line/register-installation-commands.js +7 -5
  24. package/out/command-line/register-log-commands.js +1 -1
  25. package/out/command-line/register-settings-commands.js +5 -3
  26. package/out/command-line/register-storage-commands.js +2 -1
  27. package/out/command-line/sentry.js +1 -4
  28. package/out/command-line/version-info.js +1 -1
  29. package/out/command-line/view/analytics-settings-view.js +0 -1
  30. package/out/command-line/view/deploy-view.js +0 -1
  31. package/out/command-line/view/install-view.js +0 -1
  32. package/out/command-line/view/lint-view.js +0 -2
  33. package/out/command-line/view/lite-lint-view.js +0 -2
  34. package/out/command-line/view/settings-view.js +0 -1
  35. package/out/command-line/view/tunnel-view.js +4 -4
  36. package/out/deploy/deployer/deploy-monitor-graphql-client.js +1 -2
  37. package/out/deploy/deployer/deployer.js +6 -13
  38. package/out/deploy/deployer/trigger-deploy-graphql-client.js +0 -1
  39. package/out/deploy/package-upload-deploy.js +0 -4
  40. package/out/deploy/packager/archiver.js +15 -19
  41. package/out/deploy/packager/nativeui-bundler.js +1 -6
  42. package/out/deploy/packager/packager.js +1 -7
  43. package/out/deploy/packager/runtime-bundler.d.ts +2 -3
  44. package/out/deploy/packager/runtime-bundler.d.ts.map +1 -1
  45. package/out/deploy/packager/runtime-bundler.js +5 -14
  46. package/out/deploy/uploader/artifact-graphql-client.js +0 -1
  47. package/out/deploy/uploader/uploader.js +0 -5
  48. package/out/entities/graphql-client.js +2 -2
  49. package/out/entities/list-indexes.js +0 -1
  50. package/out/environment/create-environment.js +1 -6
  51. package/out/environment/delete-environment.js +1 -6
  52. package/out/environment/graphql-client.js +3 -6
  53. package/out/environment/list-environment.js +0 -2
  54. package/out/environment-variables/delete-environment-variable.js +1 -6
  55. package/out/environment-variables/graphql-client.js +0 -1
  56. package/out/environment-variables/list-environment-variables.js +1 -6
  57. package/out/environment-variables/set-environment-variable.js +1 -6
  58. package/out/installations/graphql-client.js +22 -29
  59. package/out/installations/install-app-site.js +0 -2
  60. package/out/installations/site-translation/cloudid-products.js +0 -1
  61. package/out/installations/uninstall-app.js +0 -2
  62. package/out/migration-keys/graphql-client.js +4 -4
  63. package/out/providers/configure-provider.js +1 -6
  64. package/out/providers/graphql-client.js +0 -1
  65. package/out/service/cached-config-service.js +0 -1
  66. package/out/service/custom-entities-service.js +2 -4
  67. package/out/service/docker-service.js +1 -5
  68. package/out/service/installation-service.js +4 -7
  69. package/out/service/lint-service.js +0 -2
  70. package/out/service/lite-lint-service.js +0 -2
  71. package/out/service/migration-keys-service.js +0 -2
  72. package/out/service/port-finding-service.js +0 -1
  73. package/out/service/resource-packaging-service.js +0 -5
  74. package/out/service/resources-uploader-service.js +0 -2
  75. package/out/service/tunnel-analytics-service.js +3 -10
  76. package/out/service/tunnel-service.js +10 -19
  77. package/out/storage/local-file-storage.js +2 -2
  78. package/out/webtrigger/get-webtrigger-url.js +0 -4
  79. package/out/webtrigger/graphql-client.js +1 -2
  80. package/out/workers/analytics-message-worker.js +0 -3
  81. package/out/workers/version-check-worker.js +0 -1
  82. package/package.json +8 -8
package/CHANGELOG.md CHANGED
@@ -1,5 +1,71 @@
1
1
  # @forge/cli
2
2
 
3
+ ## 9.1.1-next.3
4
+
5
+ ### Patch Changes
6
+
7
+ - 937db7a: Rollback manifest env var support
8
+ - Updated dependencies [937db7a]
9
+ - @forge/cli-shared@4.0.1-next.2
10
+ - @forge/manifest@7.2.0-next.2
11
+ - @forge/bundler@4.15.11-next.2
12
+ - @forge/lint@5.0.2-next.2
13
+ - @forge/tunnel@5.0.2-next.3
14
+
15
+ ## 9.1.1-next.2
16
+
17
+ ### Patch Changes
18
+
19
+ - Updated dependencies [d72f638]
20
+ - @forge/manifest@7.2.0-next.1
21
+ - @forge/cli-shared@4.0.1-next.1
22
+ - @forge/lint@5.0.2-next.1
23
+ - @forge/tunnel@5.0.2-next.2
24
+ - @forge/bundler@4.15.11-next.1
25
+
26
+ ## 9.1.1-next.1
27
+
28
+ ### Patch Changes
29
+
30
+ - Updated dependencies [9eee9ac]
31
+ - @forge/manifest@7.2.0-next.0
32
+ - @forge/cli-shared@4.0.1-next.0
33
+ - @forge/lint@5.0.2-next.0
34
+ - @forge/tunnel@5.0.2-next.1
35
+ - @forge/bundler@4.15.11-next.0
36
+
37
+ ## 9.1.1-next.0
38
+
39
+ ### Patch Changes
40
+
41
+ - Updated dependencies [092b932]
42
+ - @forge/runtime@5.7.0-next.0
43
+ - @forge/tunnel@5.0.2-next.0
44
+
45
+ ## 9.1.0
46
+
47
+ ### Minor Changes
48
+
49
+ - 83e1cd7: Add environment variable parsing in the manifest
50
+
51
+ ### Patch Changes
52
+
53
+ - eb06eca: Break more dependencies between SDK and runtime
54
+ - c6f6422: Use runtime options from templates correctly
55
+ - Updated dependencies [eb06eca]
56
+ - Updated dependencies [f8a4714]
57
+ - Updated dependencies [2204a73]
58
+ - Updated dependencies [83e1cd7]
59
+ - Updated dependencies [c6f6422]
60
+ - Updated dependencies [314d732]
61
+ - @forge/bundler@4.15.10
62
+ - @forge/runtime@5.6.1
63
+ - @forge/tunnel@5.0.1
64
+ - @forge/util@1.4.3
65
+ - @forge/cli-shared@4.0.0
66
+ - @forge/manifest@7.1.0
67
+ - @forge/lint@5.0.1
68
+
3
69
  ## 9.1.0-next.6
4
70
 
5
71
  ### Patch Changes
@@ -1,23 +1,23 @@
1
1
  {
2
2
  "name": "@forge/cli",
3
- "version": "9.1.0-next.6",
3
+ "version": "9.1.1-next.3",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "@forge/cli",
9
- "version": "9.1.0-next.6",
9
+ "version": "9.1.1-next.3",
10
10
  "hasInstallScript": true,
11
11
  "license": "UNLICENSED",
12
12
  "dependencies": {
13
- "@forge/bundler": "4.15.10-next.5",
14
- "@forge/cli-shared": "4.0.0-next.3",
13
+ "@forge/bundler": "4.15.11-next.2",
14
+ "@forge/cli-shared": "4.0.1-next.2",
15
15
  "@forge/egress": "1.2.13",
16
- "@forge/lint": "5.0.1-next.3",
17
- "@forge/manifest": "7.1.0-next.1",
18
- "@forge/runtime": "5.6.1-next.1",
19
- "@forge/tunnel": "5.0.1-next.6",
20
- "@forge/util": "1.4.3-next.0",
16
+ "@forge/lint": "5.0.2-next.2",
17
+ "@forge/manifest": "7.2.0-next.2",
18
+ "@forge/runtime": "5.7.0-next.0",
19
+ "@forge/tunnel": "5.0.2-next.3",
20
+ "@forge/util": "1.4.3",
21
21
  "@sentry/node": "7.100.1",
22
22
  "ajv": "^8.12.0",
23
23
  "archiver": "^6.0.2",
@@ -877,9 +877,9 @@
877
877
  "integrity": "sha512-zG50ZRzbKyWHVb/XjI6iCIyyDNmSHdlclvehMjFZ/A3qpHExjSCjaszeY6gBDJKD2GORKKjQ3LS1UyRpiVVvkA=="
878
878
  },
879
879
  "node_modules/@forge/bundler": {
880
- "version": "4.15.10-next.5",
881
- "resolved": "https://registry.npmjs.org/@forge/bundler/-/bundler-4.15.10-next.5.tgz",
882
- "integrity": "sha512-JYliU4w8GMPEqJWPv/RuRayOAFc4JiwjIaEndkfuwXO1oX/ac0uPCPVMvCLLcaBTMr/LE9UQZd+X3auo61PDcQ==",
880
+ "version": "4.15.11-next.2",
881
+ "resolved": "https://registry.npmjs.org/@forge/bundler/-/bundler-4.15.11-next.2.tgz",
882
+ "integrity": "sha512-yo1B5gr4r++/ZIXKeOJBfeFWm5IgwhfZxxqUY/AINR6YkUxloDNOlFoWUDfrQ3AUerIROflrco12uJlPgYyHfA==",
883
883
  "dependencies": {
884
884
  "@babel/core": "^7.24.0",
885
885
  "@babel/plugin-transform-class-properties": "^7.23.3",
@@ -888,11 +888,11 @@
888
888
  "@babel/plugin-transform-optional-chaining": "^7.23.4",
889
889
  "@babel/plugin-transform-react-jsx": "^7.23.4",
890
890
  "@babel/preset-typescript": "^7.23.3",
891
- "@forge/api": "3.5.0-next.1",
891
+ "@forge/api": "3.5.0",
892
892
  "@forge/babel-plugin-transform-ui": "1.1.18",
893
- "@forge/cli-shared": "4.0.0-next.3",
894
- "@forge/lint": "5.0.1-next.3",
895
- "@forge/util": "1.4.3-next.0",
893
+ "@forge/cli-shared": "4.0.1-next.2",
894
+ "@forge/lint": "5.0.2-next.2",
895
+ "@forge/util": "1.4.3",
896
896
  "assert": "^2.1.0",
897
897
  "babel-loader": "^8.3.0",
898
898
  "browserify-zlib": "^0.2.0",
@@ -930,14 +930,14 @@
930
930
  }
931
931
  },
932
932
  "node_modules/@forge/bundler/node_modules/@forge/api": {
933
- "version": "3.5.0-next.1",
934
- "resolved": "https://registry.npmjs.org/@forge/api/-/api-3.5.0-next.1.tgz",
935
- "integrity": "sha512-pcrtOri6MQnz29Nh4zr6z8TLphjJROyYhVQCMvsgvXo5XNrXs3dTl90RwhoG5p5iURe+o8TD/thu3ypSHRn70A==",
933
+ "version": "3.5.0",
934
+ "resolved": "https://registry.npmjs.org/@forge/api/-/api-3.5.0.tgz",
935
+ "integrity": "sha512-FNEa1IgpB5P5P4rMchIoyUt4pXafyoJWu1dN4yWaYLIiOPTiVvn4ZfyYKQIEoKNDeTqBsqOGY0z2norSyrUeAA==",
936
936
  "dependencies": {
937
937
  "@forge/auth": "0.0.5",
938
938
  "@forge/egress": "1.2.13",
939
939
  "@forge/storage": "1.5.15",
940
- "@forge/util": "1.4.3-next.0",
940
+ "@forge/util": "1.4.3",
941
941
  "@types/node-fetch": "^2.6.11",
942
942
  "node-fetch": "2.7.0"
943
943
  }
@@ -948,12 +948,12 @@
948
948
  "integrity": "sha512-n4AWXkzMA4Pv4nam+dTu7PHgDQtMwaAF2MalOWF323zGvYKS/gZJY+7efJq0DLP783iTfjvYT879EHhCrfvEXA=="
949
949
  },
950
950
  "node_modules/@forge/cli-shared": {
951
- "version": "4.0.0-next.3",
952
- "resolved": "https://registry.npmjs.org/@forge/cli-shared/-/cli-shared-4.0.0-next.3.tgz",
953
- "integrity": "sha512-ZP2UOKjlUyrE6SHuwrHvEMpNlpj8IrgF70YkP6TVUtJ+Gme7W1viD2UoUKmjaaiNamXfR8YgHvB7Qf/bqA9WEg==",
951
+ "version": "4.0.1-next.2",
952
+ "resolved": "https://registry.npmjs.org/@forge/cli-shared/-/cli-shared-4.0.1-next.2.tgz",
953
+ "integrity": "sha512-uLQKZvzy8eH6D+zN+BKCjBLPAaRASENYh78C2bNR/QJU84hwfmqA5r5LDsMI4t5JRhHLqcxcHfXZYM1EF0cghw==",
954
954
  "dependencies": {
955
- "@forge/manifest": "7.1.0-next.1",
956
- "@forge/util": "1.4.3-next.0",
955
+ "@forge/manifest": "7.2.0-next.2",
956
+ "@forge/util": "1.4.3",
957
957
  "@sentry/node": "7.100.1",
958
958
  "adm-zip": "^0.5.10",
959
959
  "array.prototype.flatmap": "^1.3.2",
@@ -1003,13 +1003,13 @@
1003
1003
  }
1004
1004
  },
1005
1005
  "node_modules/@forge/lint": {
1006
- "version": "5.0.1-next.3",
1007
- "resolved": "https://registry.npmjs.org/@forge/lint/-/lint-5.0.1-next.3.tgz",
1008
- "integrity": "sha512-H/gWjUgEOswgHMJJnkZ6hyLtizgJBUmtvhg+MeUQVWDFxCPtwOkUfJW+Synir/SqXyO4wVZChI7NHpqr3Fusig==",
1006
+ "version": "5.0.2-next.2",
1007
+ "resolved": "https://registry.npmjs.org/@forge/lint/-/lint-5.0.2-next.2.tgz",
1008
+ "integrity": "sha512-TYxSPz6VHNboTIxS0P2veExNYlwWtD5BuQ1ZgmNFuwJ3F2C0CQRM+DnMLrr1UTJiUaD9G1MIq98KY+aF2hWXCg==",
1009
1009
  "dependencies": {
1010
- "@forge/cli-shared": "4.0.0-next.3",
1010
+ "@forge/cli-shared": "4.0.1-next.2",
1011
1011
  "@forge/egress": "1.2.13",
1012
- "@forge/manifest": "7.1.0-next.1",
1012
+ "@forge/manifest": "7.2.0-next.2",
1013
1013
  "@typescript-eslint/typescript-estree": "^5.62.0",
1014
1014
  "array.prototype.flatmap": "^1.3.2",
1015
1015
  "atlassian-openapi": "^1.0.18",
@@ -1018,12 +1018,11 @@
1018
1018
  }
1019
1019
  },
1020
1020
  "node_modules/@forge/manifest": {
1021
- "version": "7.1.0-next.1",
1022
- "resolved": "https://registry.npmjs.org/@forge/manifest/-/manifest-7.1.0-next.1.tgz",
1023
- "integrity": "sha512-wjgooSiiVDwQdJJwy1AhfrEpMNRqGaD4eeI7j3UYiSazXqt5Oc1KxiIpIitKJ2dNkgdnXVxeYF7sTkl7jS6T/A==",
1021
+ "version": "7.2.0-next.2",
1022
+ "resolved": "https://registry.npmjs.org/@forge/manifest/-/manifest-7.2.0-next.2.tgz",
1023
+ "integrity": "sha512-M/klCm3kxkQKL72HzajAwtHM8dQ6IPtHZUAQMtOz14NbYiXu0rNbe5p0DzSaErgzD29qfmxgZzV4SzWOw/Wj2w==",
1024
1024
  "dependencies": {
1025
- "@forge/util": "1.4.3-next.0",
1026
- "@sentry/node": "7.100.1",
1025
+ "@forge/util": "1.4.3",
1027
1026
  "ajv": "^8.12.0",
1028
1027
  "ajv-formats": "2.1.1",
1029
1028
  "cheerio": "^0.22.0",
@@ -1036,11 +1035,11 @@
1036
1035
  }
1037
1036
  },
1038
1037
  "node_modules/@forge/runtime": {
1039
- "version": "5.6.1-next.1",
1040
- "resolved": "https://registry.npmjs.org/@forge/runtime/-/runtime-5.6.1-next.1.tgz",
1041
- "integrity": "sha512-ogj/DGx++iQsZuFhrc5BcTV+3s1ym85QUx5kZwxd1BVil63/aCiI15mo3kK/SJ0RAb+9HRG5GNZAxVfYr02PSQ==",
1038
+ "version": "5.7.0-next.0",
1039
+ "resolved": "https://registry.npmjs.org/@forge/runtime/-/runtime-5.7.0-next.0.tgz",
1040
+ "integrity": "sha512-qxinW3kxHnYMSddwGQDGrJRaq0a9SJhES0vjJrIWZbG9OExexxub5kEvLYYv0W3zeeBaT9tVr0Z6KW8W/z1azA==",
1042
1041
  "dependencies": {
1043
- "@forge/util": "1.4.3-next.0",
1042
+ "@forge/util": "1.4.3",
1044
1043
  "fp-ts": "^2.16.2",
1045
1044
  "io-ts": "^2.2.21",
1046
1045
  "io-ts-reporters": "^2.0.1",
@@ -1051,14 +1050,14 @@
1051
1050
  }
1052
1051
  },
1053
1052
  "node_modules/@forge/tunnel": {
1054
- "version": "5.0.1-next.6",
1055
- "resolved": "https://registry.npmjs.org/@forge/tunnel/-/tunnel-5.0.1-next.6.tgz",
1056
- "integrity": "sha512-UkhQV6ek1cpSptfwzvyWcynnJe0F8xamPhEFb68BfHaCtL5QH2VJ0LiSXTmfWprvYRJfgHoH9kPvyjrfFl55rg==",
1053
+ "version": "5.0.2-next.3",
1054
+ "resolved": "https://registry.npmjs.org/@forge/tunnel/-/tunnel-5.0.2-next.3.tgz",
1055
+ "integrity": "sha512-UVzcA7j14Aw8rV1HH5u3zhtYzUf/Pz/kLjq+Onue8DLSCu8gNO3GKJqAiZFCahw5rWQodEx/2PpldnJE6o1utA==",
1057
1056
  "dependencies": {
1058
- "@forge/bundler": "4.15.10-next.5",
1059
- "@forge/cli-shared": "4.0.0-next.3",
1057
+ "@forge/bundler": "4.15.11-next.2",
1058
+ "@forge/cli-shared": "4.0.1-next.2",
1060
1059
  "@forge/csp": "3.2.1",
1061
- "@forge/runtime": "5.6.1-next.1",
1060
+ "@forge/runtime": "5.7.0-next.0",
1062
1061
  "express": "^4.18.3",
1063
1062
  "express-intercept": "^1.1.0",
1064
1063
  "http-proxy-middleware": "^2.0.6",
@@ -1071,9 +1070,9 @@
1071
1070
  }
1072
1071
  },
1073
1072
  "node_modules/@forge/util": {
1074
- "version": "1.4.3-next.0",
1075
- "resolved": "https://registry.npmjs.org/@forge/util/-/util-1.4.3-next.0.tgz",
1076
- "integrity": "sha512-8eSloK1ELnxTcqjIFowFjCKtHfXjv7mX9oZweQuZidenNz7KuK7CMF4WPJIRB10iuvTnKpQtuVsBf+HjKNd8KA==",
1073
+ "version": "1.4.3",
1074
+ "resolved": "https://registry.npmjs.org/@forge/util/-/util-1.4.3.tgz",
1075
+ "integrity": "sha512-CdnsuTv5cl8cifwaBkrw2l1dWHcQ08+/KSyattgucNrO4ci2cJPUQMJWo08XTLqZ2Na79xsGMjTY9bcb6h5LUA==",
1077
1076
  "dependencies": {
1078
1077
  "ts-is-present": "^1.2.2",
1079
1078
  "webpack": "5.90.3",
@@ -20,41 +20,30 @@ function appAidOrUndefined(appAri) {
20
20
  }
21
21
  }
22
22
  class AnalyticsClientReporter {
23
- storage;
24
- logger;
25
- configService;
26
23
  constructor(storage, logger, configService) {
27
24
  this.storage = storage;
28
25
  this.logger = logger;
29
26
  this.configService = configService;
27
+ this.source = 'forge/cli';
30
28
  }
31
- source = 'forge/cli';
32
29
  reportSuccess(cmdName, cred, attributes) {
33
30
  this.processAnalyticsEvent({
34
31
  id: (0, uuid_1.v4)(),
35
32
  eventType: analytics_message_handler_1.EventType.TRACK,
36
- event: {
37
- timestamp: new Date(),
38
- os: {
33
+ event: Object.assign(Object.assign({ timestamp: new Date(), os: {
39
34
  name: os.platform(),
40
35
  version: os.release()
41
- },
42
- ...this._getUserId(cred),
43
- trackEvent: {
36
+ } }, this._getUserId(cred)), { trackEvent: {
44
37
  source: this.source,
45
38
  action: 'invoked',
46
39
  actionSubject: cmdName,
47
40
  attributes: this._getAttributes(attributes),
48
41
  containers: this._getContainer(attributes)
49
- }
50
- }
42
+ } })
51
43
  });
52
44
  }
53
45
  reportFailure(cmdName, cred, attributes, e) {
54
- attributes = {
55
- ...attributes,
56
- ...this._getErrorDetails(e)
57
- };
46
+ attributes = Object.assign(Object.assign({}, attributes), this._getErrorDetails(e));
58
47
  this.reportOperationalEvent('invoked', cmdName, cred, attributes);
59
48
  }
60
49
  reportCommandInvoke(cmdName, cred, attributes) {
@@ -62,7 +51,7 @@ class AnalyticsClientReporter {
62
51
  }
63
52
  reportInvokeFailure(cmdName, cred, attributes, e) {
64
53
  if (e) {
65
- attributes = { ...attributes, ...this._getErrorListDetails(e) };
54
+ attributes = Object.assign(Object.assign({}, attributes), this._getErrorListDetails(e));
66
55
  }
67
56
  this.reportOperationalEvent('cmdInvokeFailed', cmdName, cred, attributes);
68
57
  }
@@ -70,23 +59,16 @@ class AnalyticsClientReporter {
70
59
  this.processAnalyticsEvent({
71
60
  id: (0, uuid_1.v4)(),
72
61
  eventType: analytics_message_handler_1.EventType.OPERATIONAL,
73
- event: {
74
- timestamp: new Date(),
75
- os: {
62
+ event: Object.assign(Object.assign({ timestamp: new Date(), os: {
76
63
  name: os.platform(),
77
64
  version: os.release()
78
- },
79
- ...this._getUserId(cred),
80
- operationalEvent: {
65
+ } }, this._getUserId(cred)), { operationalEvent: {
81
66
  source: this.source,
82
67
  action,
83
68
  actionSubject,
84
- attributes: {
85
- ...this._getAttributes(attributes)
86
- },
69
+ attributes: Object.assign({}, this._getAttributes(attributes)),
87
70
  containers: this._getContainer(attributes)
88
- }
89
- }
71
+ } })
90
72
  });
91
73
  }
92
74
  processAnalyticsEvent(analyticsEvent) {
@@ -151,19 +133,10 @@ class AnalyticsClientReporter {
151
133
  return mappedValue ? { [name]: mappedValue } : {};
152
134
  }
153
135
  _getAttributes(attributes) {
154
- return {
155
- ...attributes,
156
- ...this._asAttribute(attributes.appId, 'appId', appAidOrUndefined),
157
- ...this._nodeVersion(),
158
- ...this._machineId()
159
- };
136
+ return Object.assign(Object.assign(Object.assign(Object.assign({}, attributes), this._asAttribute(attributes.appId, 'appId', appAidOrUndefined)), this._nodeVersion()), this._machineId());
160
137
  }
161
138
  _getContainer(attributes) {
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
- };
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'));
167
140
  }
168
141
  }
169
142
  exports.AnalyticsClientReporter = AnalyticsClientReporter;
@@ -9,36 +9,35 @@ var EventType;
9
9
  EventType["UI"] = "ui";
10
10
  })(EventType = exports.EventType || (exports.EventType = {}));
11
11
  class AnalyticsMessageHandler {
12
- environment;
13
12
  constructor(environment) {
14
13
  this.environment = environment;
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;
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
+ }
38
37
  }
39
- }
40
- catch (e) {
41
- }
42
- };
38
+ catch (e) {
39
+ }
40
+ };
41
+ }
43
42
  }
44
43
  exports.AnalyticsMessageHandler = AnalyticsMessageHandler;
@@ -8,6 +8,7 @@ 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;
11
12
  const splitLine = line.split(' ');
12
13
  const numArgs = splitLine.length;
13
14
  if (numArgs === 2) {
@@ -24,7 +25,7 @@ const processAutocompleteFactory = (autocompleteConfig) => {
24
25
  }
25
26
  const commandOptions = autocompleteConfig.commands[command];
26
27
  const lastArg = splitLine.slice(-2, -1)[0];
27
- if (commandOptions[lastArg]?.requireUserArg) {
28
+ if ((_a = commandOptions[lastArg]) === null || _a === void 0 ? void 0 : _a.requireUserArg) {
28
29
  return;
29
30
  }
30
31
  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 = { ...commandOptions };
9
+ const commandOptionsClone = Object.assign({}, 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?.version };
16
+ const attributes = { version: cliDetails === null || cliDetails === void 0 ? void 0 : 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)()) {