@salesforce/plugin-telemetry 2.3.8 → 3.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/lib/commandExecution.js +25 -16
- package/lib/commandExecution.js.map +1 -1
- package/lib/commands/telemetry.js +8 -11
- package/lib/commands/telemetry.js.map +1 -1
- package/lib/debugger.d.ts +2 -3
- package/lib/debugger.js +2 -8
- package/lib/debugger.js.map +1 -1
- package/lib/hooks/telemetryPrerun.js +24 -44
- package/lib/hooks/telemetryPrerun.js.map +1 -1
- package/lib/index.d.ts +1 -1
- package/lib/index.js +1 -17
- package/lib/index.js.map +1 -1
- package/lib/telemetry.js +55 -53
- package/lib/telemetry.js.map +1 -1
- package/lib/telemetryGlobal.d.ts +1 -1
- package/lib/telemetryGlobal.js +1 -2
- package/lib/telemetryGlobal.js.map +1 -1
- package/lib/uploader.d.ts +2 -1
- package/lib/uploader.js +22 -23
- package/lib/uploader.js.map +1 -1
- package/oclif.lock +8152 -0
- package/oclif.manifest.json +26 -12
- package/package.json +28 -44
- package/processes/upload.js +21 -0
- package/processes/upload +0 -13
package/oclif.manifest.json
CHANGED
|
@@ -1,24 +1,38 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "2.3.8",
|
|
3
2
|
"commands": {
|
|
4
3
|
"telemetry": {
|
|
5
|
-
"id": "telemetry",
|
|
6
|
-
"strict": true,
|
|
7
|
-
"pluginName": "@salesforce/plugin-telemetry",
|
|
8
|
-
"pluginAlias": "@salesforce/plugin-telemetry",
|
|
9
|
-
"pluginType": "core",
|
|
10
|
-
"hidden": true,
|
|
11
4
|
"aliases": [],
|
|
5
|
+
"args": {},
|
|
12
6
|
"flags": {
|
|
13
7
|
"json": {
|
|
14
|
-
"name": "json",
|
|
15
|
-
"type": "boolean",
|
|
16
8
|
"description": "Format output as json.",
|
|
17
9
|
"helpGroup": "GLOBAL",
|
|
18
|
-
"
|
|
10
|
+
"name": "json",
|
|
11
|
+
"allowNo": false,
|
|
12
|
+
"type": "boolean"
|
|
19
13
|
}
|
|
20
14
|
},
|
|
21
|
-
"
|
|
15
|
+
"hasDynamicHelp": false,
|
|
16
|
+
"hidden": true,
|
|
17
|
+
"hiddenAliases": [],
|
|
18
|
+
"id": "telemetry",
|
|
19
|
+
"pluginAlias": "@salesforce/plugin-telemetry",
|
|
20
|
+
"pluginName": "@salesforce/plugin-telemetry",
|
|
21
|
+
"pluginType": "core",
|
|
22
|
+
"strict": true,
|
|
23
|
+
"enableJsonFlag": true,
|
|
24
|
+
"SF_ENV": "SF_ENV",
|
|
25
|
+
"isESM": true,
|
|
26
|
+
"relativePath": [
|
|
27
|
+
"lib",
|
|
28
|
+
"commands",
|
|
29
|
+
"telemetry.js"
|
|
30
|
+
],
|
|
31
|
+
"aliasPermutations": [],
|
|
32
|
+
"permutations": [
|
|
33
|
+
"telemetry"
|
|
34
|
+
]
|
|
22
35
|
}
|
|
23
|
-
}
|
|
36
|
+
},
|
|
37
|
+
"version": "3.1.0"
|
|
24
38
|
}
|
package/package.json
CHANGED
|
@@ -1,67 +1,47 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@salesforce/plugin-telemetry",
|
|
3
3
|
"description": "Command usage and error telemetry for the Salesforce CLI",
|
|
4
|
-
"version": "
|
|
4
|
+
"version": "3.1.0",
|
|
5
5
|
"author": "Salesforce",
|
|
6
6
|
"bugs": "https://github.com/forcedotcom/cli/issues",
|
|
7
7
|
"dependencies": {
|
|
8
|
-
"@oclif/core": "^
|
|
8
|
+
"@oclif/core": "^3.8.0",
|
|
9
9
|
"@salesforce/core": "^5.3.1",
|
|
10
|
-
"@salesforce/sf-plugins-core": "^
|
|
10
|
+
"@salesforce/sf-plugins-core": "^4.0.0",
|
|
11
11
|
"@salesforce/telemetry": "^4.1.15",
|
|
12
|
-
"debug": "^4.3.4"
|
|
13
|
-
"tslib": "^2"
|
|
12
|
+
"debug": "^4.3.4"
|
|
14
13
|
},
|
|
15
14
|
"devDependencies": {
|
|
16
|
-
"@oclif/plugin-command-snapshot": "^
|
|
17
|
-
"@oclif/plugin-help": "^
|
|
18
|
-
"@salesforce/cli-plugins-testkit": "^
|
|
19
|
-
"@salesforce/dev-
|
|
20
|
-
"@salesforce/
|
|
21
|
-
"@salesforce/plugin-command-reference": "^3.0.39",
|
|
22
|
-
"@salesforce/prettier-config": "^0.0.3",
|
|
15
|
+
"@oclif/plugin-command-snapshot": "^5.0.1",
|
|
16
|
+
"@oclif/plugin-help": "^6.0.4",
|
|
17
|
+
"@salesforce/cli-plugins-testkit": "^5",
|
|
18
|
+
"@salesforce/dev-scripts": "^6.0.1",
|
|
19
|
+
"@salesforce/plugin-command-reference": "^3.0.42",
|
|
23
20
|
"@salesforce/ts-sinon": "^1.4.15",
|
|
24
|
-
"@swc/core": "^1.3.69",
|
|
25
21
|
"@types/debug": "^4.1.8",
|
|
26
|
-
"
|
|
27
|
-
"@typescript-eslint/parser": "^5.62.0",
|
|
28
|
-
"chai": "^4.3.8",
|
|
29
|
-
"eslint": "^8.49.0",
|
|
30
|
-
"eslint-config-prettier": "^8.10.0",
|
|
31
|
-
"eslint-config-salesforce": "^2.0.2",
|
|
32
|
-
"eslint-config-salesforce-license": "^0.2.0",
|
|
33
|
-
"eslint-config-salesforce-typescript": "^1.1.2",
|
|
34
|
-
"eslint-plugin-header": "^3.1.1",
|
|
35
|
-
"eslint-plugin-import": "2.28.1",
|
|
36
|
-
"eslint-plugin-jsdoc": "^46.8.2",
|
|
37
|
-
"husky": "^7.0.4",
|
|
38
|
-
"mocha": "^9.1.3",
|
|
39
|
-
"nyc": "^15.1.0",
|
|
40
|
-
"oclif": "^3.16.0",
|
|
41
|
-
"prettier": "^2.8.8",
|
|
42
|
-
"pretty-quick": "^3.1.0",
|
|
22
|
+
"oclif": "^4.0.3",
|
|
43
23
|
"shx": "0.3.4",
|
|
44
|
-
"
|
|
45
|
-
"ts-node": "^10.0.0",
|
|
46
|
-
"typescript": "^4.9.5",
|
|
47
|
-
"wireit": "^0.14.0"
|
|
24
|
+
"typescript": "^5.2.2"
|
|
48
25
|
},
|
|
49
26
|
"config": {},
|
|
50
27
|
"engines": {
|
|
51
|
-
"node": ">=
|
|
28
|
+
"node": ">=18.0.0"
|
|
52
29
|
},
|
|
53
30
|
"files": [
|
|
54
31
|
"/lib",
|
|
55
32
|
"/processes",
|
|
56
|
-
"/oclif.manifest.json"
|
|
33
|
+
"/oclif.manifest.json",
|
|
34
|
+
"/oclif.lock"
|
|
57
35
|
],
|
|
58
36
|
"homepage": "https://github.com/salesforcecli/plugin-telemetry",
|
|
59
37
|
"keywords": [
|
|
60
38
|
"force",
|
|
61
39
|
"salesforce",
|
|
62
|
-
"sfdx",
|
|
63
40
|
"salesforcedx",
|
|
64
|
-
"
|
|
41
|
+
"sf-plugin",
|
|
42
|
+
"sf",
|
|
43
|
+
"sfdx-plugin",
|
|
44
|
+
"sfdx"
|
|
65
45
|
],
|
|
66
46
|
"license": "BSD-3-Clause",
|
|
67
47
|
"oclif": {
|
|
@@ -74,7 +54,9 @@
|
|
|
74
54
|
"@oclif/plugin-help",
|
|
75
55
|
"@oclif/plugin-command-snapshot",
|
|
76
56
|
"@salesforce/plugin-command-reference"
|
|
77
|
-
]
|
|
57
|
+
],
|
|
58
|
+
"flexibleTaxonomy": true,
|
|
59
|
+
"topicSeparator": " "
|
|
78
60
|
},
|
|
79
61
|
"repository": "salesforcecli/plugin-telemetry",
|
|
80
62
|
"scripts": {
|
|
@@ -173,7 +155,7 @@
|
|
|
173
155
|
"output": []
|
|
174
156
|
},
|
|
175
157
|
"test:command-reference": {
|
|
176
|
-
"command": "\"./bin/dev\" commandreference:generate --erroronwarnings",
|
|
158
|
+
"command": "ts-node \"./bin/dev.js\" commandreference:generate --erroronwarnings",
|
|
177
159
|
"files": [
|
|
178
160
|
"src/**/*.ts",
|
|
179
161
|
"messages/**",
|
|
@@ -184,7 +166,7 @@
|
|
|
184
166
|
]
|
|
185
167
|
},
|
|
186
168
|
"test:deprecation-policy": {
|
|
187
|
-
"command": "\"./bin/dev\" snapshot:compare",
|
|
169
|
+
"command": "ts-node \"./bin/dev.js\" snapshot:compare",
|
|
188
170
|
"files": [
|
|
189
171
|
"src/**/*.ts"
|
|
190
172
|
],
|
|
@@ -194,7 +176,7 @@
|
|
|
194
176
|
]
|
|
195
177
|
},
|
|
196
178
|
"test:json-schema": {
|
|
197
|
-
"command": "\"./bin/dev\" schema:compare",
|
|
179
|
+
"command": "ts-node \"./bin/dev.js\" schema:compare",
|
|
198
180
|
"files": [
|
|
199
181
|
"src/**/*.ts",
|
|
200
182
|
"schemas"
|
|
@@ -202,8 +184,10 @@
|
|
|
202
184
|
"output": []
|
|
203
185
|
}
|
|
204
186
|
},
|
|
187
|
+
"exports": "./lib/index.js",
|
|
188
|
+
"type": "module",
|
|
205
189
|
"sfdx": {
|
|
206
|
-
"publicKeyUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@salesforce/plugin-telemetry/
|
|
207
|
-
"signatureUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@salesforce/plugin-telemetry/
|
|
190
|
+
"publicKeyUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@salesforce/plugin-telemetry/3.1.0.crt",
|
|
191
|
+
"signatureUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@salesforce/plugin-telemetry/3.1.0.sig"
|
|
208
192
|
}
|
|
209
193
|
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { readFile } from 'node:fs/promises';
|
|
3
|
+
import { dirname, join } from 'node:path';
|
|
4
|
+
import { fileURLToPath } from 'node:url';
|
|
5
|
+
|
|
6
|
+
async function main() {
|
|
7
|
+
try {
|
|
8
|
+
const cacheDir = process.argv[2];
|
|
9
|
+
const telemetryFile = process.argv[3];
|
|
10
|
+
const root = dirname(dirname(fileURLToPath(import.meta.url)));
|
|
11
|
+
const { Uploader } = await import(join(root, 'lib', 'uploader.js'));
|
|
12
|
+
const pjsonContents = await readFile(join(root, 'package.json'), 'utf-8');
|
|
13
|
+
const { version } = JSON.parse(pjsonContents);
|
|
14
|
+
await Uploader.upload(cacheDir, telemetryFile, version);
|
|
15
|
+
} catch (err) {
|
|
16
|
+
// We are in a detached process anyways, so nothing will be shown to the user but useful when debugging.
|
|
17
|
+
process.emitWarning(err);
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
await main();
|
package/processes/upload
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
|
|
3
|
-
const {Uploader} = require('../lib/uploader');
|
|
4
|
-
|
|
5
|
-
const cacheDir = process.argv[2];
|
|
6
|
-
const telemetryFile = process.argv[3];
|
|
7
|
-
|
|
8
|
-
(async () => {
|
|
9
|
-
await Uploader.upload(cacheDir, telemetryFile);
|
|
10
|
-
})().catch(err => {
|
|
11
|
-
// We are in a detached process anyways, so nothing will be shown to the user but useful when debugging.
|
|
12
|
-
process.emitWarning(err);
|
|
13
|
-
});
|