@forge/cli 9.1.0 → 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.
- package/CHANGELOG.md +42 -0
- package/npm-shrinkwrap.json +34 -35
- package/out/analytics-client/analytics-client.js +12 -39
- package/out/analytics-client/analytics-message-handler.js +27 -28
- package/out/autocomplete/index.js +2 -1
- package/out/autocomplete/util.js +1 -1
- package/out/bin/postinstall.js +1 -1
- package/out/command-line/command.js +116 -132
- package/out/command-line/controller/autocomplete-controller.js +0 -1
- package/out/command-line/controller/default-environment-controller.js +0 -8
- package/out/command-line/controller/deploy-controller.js +9 -25
- package/out/command-line/controller/feedback-controller.js +0 -2
- package/out/command-line/controller/install-controller.js +5 -11
- package/out/command-line/controller/lint-controller.js +1 -3
- package/out/command-line/controller/pre-command-controller.js +0 -6
- package/out/command-line/controller/prerequisites-controller.js +0 -3
- package/out/command-line/controller/settings-controller.js +57 -60
- package/out/command-line/controller/tunnel-controller.js +1 -7
- package/out/command-line/dependency-injection.js +2 -2
- package/out/command-line/errors.js +0 -1
- package/out/command-line/register-authentication-command.js +1 -1
- package/out/command-line/register-environment-variables-commands.js +8 -6
- package/out/command-line/register-installation-commands.js +7 -5
- package/out/command-line/register-log-commands.js +1 -1
- package/out/command-line/register-settings-commands.js +5 -3
- package/out/command-line/register-storage-commands.js +2 -1
- package/out/command-line/sentry.js +1 -4
- package/out/command-line/version-info.js +1 -1
- package/out/command-line/view/analytics-settings-view.js +0 -1
- package/out/command-line/view/deploy-view.js +0 -1
- package/out/command-line/view/install-view.js +0 -1
- package/out/command-line/view/lint-view.js +0 -2
- package/out/command-line/view/lite-lint-view.js +0 -2
- package/out/command-line/view/settings-view.js +0 -1
- package/out/command-line/view/tunnel-view.js +4 -4
- package/out/deploy/deployer/deploy-monitor-graphql-client.js +1 -2
- package/out/deploy/deployer/deployer.js +6 -13
- package/out/deploy/deployer/trigger-deploy-graphql-client.js +0 -1
- package/out/deploy/package-upload-deploy.js +0 -4
- package/out/deploy/packager/archiver.js +15 -19
- package/out/deploy/packager/nativeui-bundler.js +1 -6
- package/out/deploy/packager/packager.js +1 -7
- package/out/deploy/packager/runtime-bundler.d.ts +2 -3
- package/out/deploy/packager/runtime-bundler.d.ts.map +1 -1
- package/out/deploy/packager/runtime-bundler.js +5 -14
- package/out/deploy/uploader/artifact-graphql-client.js +0 -1
- package/out/deploy/uploader/uploader.js +0 -5
- package/out/entities/graphql-client.js +2 -2
- package/out/entities/list-indexes.js +0 -1
- package/out/environment/create-environment.js +1 -6
- package/out/environment/delete-environment.js +1 -6
- package/out/environment/graphql-client.js +3 -6
- package/out/environment/list-environment.js +0 -2
- package/out/environment-variables/delete-environment-variable.js +1 -6
- package/out/environment-variables/graphql-client.js +0 -1
- package/out/environment-variables/list-environment-variables.js +1 -6
- package/out/environment-variables/set-environment-variable.js +1 -6
- package/out/installations/graphql-client.js +22 -29
- package/out/installations/install-app-site.js +0 -2
- package/out/installations/site-translation/cloudid-products.js +0 -1
- package/out/installations/uninstall-app.js +0 -2
- package/out/migration-keys/graphql-client.js +4 -4
- package/out/providers/configure-provider.js +1 -6
- package/out/providers/graphql-client.js +0 -1
- package/out/service/cached-config-service.js +0 -1
- package/out/service/custom-entities-service.js +2 -4
- package/out/service/docker-service.js +1 -5
- package/out/service/installation-service.js +4 -7
- package/out/service/lint-service.js +0 -2
- package/out/service/lite-lint-service.js +0 -2
- package/out/service/migration-keys-service.js +0 -2
- package/out/service/port-finding-service.js +0 -1
- package/out/service/resource-packaging-service.js +0 -5
- package/out/service/resources-uploader-service.js +0 -2
- package/out/service/tunnel-analytics-service.js +3 -10
- package/out/service/tunnel-service.js +10 -19
- package/out/storage/local-file-storage.js +2 -2
- package/out/webtrigger/get-webtrigger-url.js +0 -4
- package/out/webtrigger/graphql-client.js +1 -2
- package/out/workers/analytics-message-worker.js +0 -3
- package/out/workers/version-check-worker.js +0 -1
- package/package.json +7 -7
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,47 @@
|
|
|
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
|
+
|
|
3
45
|
## 9.1.0
|
|
4
46
|
|
|
5
47
|
### Minor Changes
|
package/npm-shrinkwrap.json
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@forge/cli",
|
|
3
|
-
"version": "9.1.
|
|
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.
|
|
9
|
+
"version": "9.1.1-next.3",
|
|
10
10
|
"hasInstallScript": true,
|
|
11
11
|
"license": "UNLICENSED",
|
|
12
12
|
"dependencies": {
|
|
13
|
-
"@forge/bundler": "4.15.
|
|
14
|
-
"@forge/cli-shared": "4.0.
|
|
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.
|
|
17
|
-
"@forge/manifest": "7.
|
|
18
|
-
"@forge/runtime": "5.
|
|
19
|
-
"@forge/tunnel": "5.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
20
|
"@forge/util": "1.4.3",
|
|
21
21
|
"@sentry/node": "7.100.1",
|
|
22
22
|
"ajv": "^8.12.0",
|
|
@@ -877,9 +877,9 @@
|
|
|
877
877
|
"integrity": "sha512-zG50ZRzbKyWHVb/XjI6iCIyyDNmSHdlclvehMjFZ/A3qpHExjSCjaszeY6gBDJKD2GORKKjQ3LS1UyRpiVVvkA=="
|
|
878
878
|
},
|
|
879
879
|
"node_modules/@forge/bundler": {
|
|
880
|
-
"version": "4.15.
|
|
881
|
-
"resolved": "https://registry.npmjs.org/@forge/bundler/-/bundler-4.15.
|
|
882
|
-
"integrity": "sha512-
|
|
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",
|
|
@@ -890,8 +890,8 @@
|
|
|
890
890
|
"@babel/preset-typescript": "^7.23.3",
|
|
891
891
|
"@forge/api": "3.5.0",
|
|
892
892
|
"@forge/babel-plugin-transform-ui": "1.1.18",
|
|
893
|
-
"@forge/cli-shared": "4.0.
|
|
894
|
-
"@forge/lint": "5.0.
|
|
893
|
+
"@forge/cli-shared": "4.0.1-next.2",
|
|
894
|
+
"@forge/lint": "5.0.2-next.2",
|
|
895
895
|
"@forge/util": "1.4.3",
|
|
896
896
|
"assert": "^2.1.0",
|
|
897
897
|
"babel-loader": "^8.3.0",
|
|
@@ -948,11 +948,11 @@
|
|
|
948
948
|
"integrity": "sha512-n4AWXkzMA4Pv4nam+dTu7PHgDQtMwaAF2MalOWF323zGvYKS/gZJY+7efJq0DLP783iTfjvYT879EHhCrfvEXA=="
|
|
949
949
|
},
|
|
950
950
|
"node_modules/@forge/cli-shared": {
|
|
951
|
-
"version": "4.0.
|
|
952
|
-
"resolved": "https://registry.npmjs.org/@forge/cli-shared/-/cli-shared-4.0.
|
|
953
|
-
"integrity": "sha512-
|
|
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.
|
|
955
|
+
"@forge/manifest": "7.2.0-next.2",
|
|
956
956
|
"@forge/util": "1.4.3",
|
|
957
957
|
"@sentry/node": "7.100.1",
|
|
958
958
|
"adm-zip": "^0.5.10",
|
|
@@ -1003,13 +1003,13 @@
|
|
|
1003
1003
|
}
|
|
1004
1004
|
},
|
|
1005
1005
|
"node_modules/@forge/lint": {
|
|
1006
|
-
"version": "5.0.
|
|
1007
|
-
"resolved": "https://registry.npmjs.org/@forge/lint/-/lint-5.0.
|
|
1008
|
-
"integrity": "sha512-
|
|
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.
|
|
1010
|
+
"@forge/cli-shared": "4.0.1-next.2",
|
|
1011
1011
|
"@forge/egress": "1.2.13",
|
|
1012
|
-
"@forge/manifest": "7.
|
|
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.
|
|
1022
|
-
"resolved": "https://registry.npmjs.org/@forge/manifest/-/manifest-7.
|
|
1023
|
-
"integrity": "sha512-
|
|
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
1025
|
"@forge/util": "1.4.3",
|
|
1026
|
-
"@sentry/node": "7.100.1",
|
|
1027
1026
|
"ajv": "^8.12.0",
|
|
1028
1027
|
"ajv-formats": "2.1.1",
|
|
1029
1028
|
"cheerio": "^0.22.0",
|
|
@@ -1036,9 +1035,9 @@
|
|
|
1036
1035
|
}
|
|
1037
1036
|
},
|
|
1038
1037
|
"node_modules/@forge/runtime": {
|
|
1039
|
-
"version": "5.
|
|
1040
|
-
"resolved": "https://registry.npmjs.org/@forge/runtime/-/runtime-5.
|
|
1041
|
-
"integrity": "sha512-
|
|
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
1042
|
"@forge/util": "1.4.3",
|
|
1044
1043
|
"fp-ts": "^2.16.2",
|
|
@@ -1051,14 +1050,14 @@
|
|
|
1051
1050
|
}
|
|
1052
1051
|
},
|
|
1053
1052
|
"node_modules/@forge/tunnel": {
|
|
1054
|
-
"version": "5.0.
|
|
1055
|
-
"resolved": "https://registry.npmjs.org/@forge/tunnel/-/tunnel-5.0.
|
|
1056
|
-
"integrity": "sha512-
|
|
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.
|
|
1059
|
-
"@forge/cli-shared": "4.0.
|
|
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.
|
|
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",
|
|
@@ -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 = {
|
|
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
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
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
|
-
|
|
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]
|
|
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);
|
package/out/autocomplete/util.js
CHANGED
|
@@ -6,7 +6,7 @@ const getUserOptionsSelectedFromSplitLine = (splitLine) => {
|
|
|
6
6
|
};
|
|
7
7
|
exports.getUserOptionsSelectedFromSplitLine = getUserOptionsSelectedFromSplitLine;
|
|
8
8
|
const getRemainingOptions = (commandOptions, userSelectedOptions) => {
|
|
9
|
-
const commandOptionsClone = {
|
|
9
|
+
const commandOptionsClone = Object.assign({}, commandOptions);
|
|
10
10
|
for (const option of userSelectedOptions) {
|
|
11
11
|
delete commandOptionsClone[option];
|
|
12
12
|
}
|
package/out/bin/postinstall.js
CHANGED
|
@@ -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
|
|
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)()) {
|