@salesforce/plugin-telemetry 2.1.6 → 2.2.1
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/lib/commandExecution.d.ts +1 -1
- package/lib/commands/telemetry.d.ts +1 -1
- package/lib/telemetry.js +2 -2
- package/lib/uploader.js +5 -5
- package/oclif.manifest.json +1 -1
- package/package.json +25 -25
|
@@ -31,7 +31,7 @@ export declare class CommandExecution extends AsyncCreatable {
|
|
|
31
31
|
static resolveVCSInfo(): Promise<string>;
|
|
32
32
|
toJson(): JsonMap;
|
|
33
33
|
getPluginInfo(): PluginInfo;
|
|
34
|
-
getCommandName(): string;
|
|
34
|
+
getCommandName(): string | undefined;
|
|
35
35
|
protected init(): Promise<void>;
|
|
36
36
|
private determineSpecifiedFlags;
|
|
37
37
|
}
|
package/lib/telemetry.js
CHANGED
|
@@ -181,12 +181,12 @@ class Telemetry extends kit_1.AsyncCreatable {
|
|
|
181
181
|
// Still log it as unknown so we can try to fix it.
|
|
182
182
|
dataToRecord.eventName = 'UNKNOWN';
|
|
183
183
|
// Don't break this into a utility because the stack HAS to start from this method.
|
|
184
|
-
const stack = new Error().stack
|
|
184
|
+
const stack = new Error().stack ?? '';
|
|
185
185
|
const locations = stack.split(/\r?\n/).filter((line) => /\s*at /.test(line));
|
|
186
186
|
if (locations.length >= 2) {
|
|
187
187
|
// The first location is this file, the second is the calling file.
|
|
188
188
|
// Replace HOME for GDPR.
|
|
189
|
-
dataToRecord.requestorLocation = locations[1].replace(process.env.HOME
|
|
189
|
+
dataToRecord.requestorLocation = locations[1].replace(process.env.HOME ?? '', '');
|
|
190
190
|
}
|
|
191
191
|
(0, debugger_1.debug)('Missing event name!');
|
|
192
192
|
}
|
package/lib/uploader.js
CHANGED
|
@@ -49,8 +49,8 @@ class Uploader {
|
|
|
49
49
|
const events = await this.telemetry.read();
|
|
50
50
|
for (const event of events) {
|
|
51
51
|
event.telemetryVersion = debugger_1.version;
|
|
52
|
-
const eventType = (0, ts_types_1.asString)(event.type)
|
|
53
|
-
const eventName = (0, ts_types_1.asString)(event.eventName)
|
|
52
|
+
const eventType = (0, ts_types_1.asString)(event.type) ?? telemetry_2.default.EVENT;
|
|
53
|
+
const eventName = (0, ts_types_1.asString)(event.eventName) ?? 'UNKNOWN';
|
|
54
54
|
delete event.type;
|
|
55
55
|
delete event.eventName;
|
|
56
56
|
if (eventType === telemetry_2.default.EVENT) {
|
|
@@ -62,9 +62,9 @@ class Uploader {
|
|
|
62
62
|
const errorObject = event.error;
|
|
63
63
|
delete event.error;
|
|
64
64
|
Object.assign(error, errorObject);
|
|
65
|
-
error.name = (0, ts_types_1.asString)(errorObject.name)
|
|
66
|
-
error.message = (0, ts_types_1.asString)(errorObject.message)
|
|
67
|
-
error.stack = (0, ts_types_1.asString)(errorObject.stack)
|
|
65
|
+
error.name = (0, ts_types_1.asString)(errorObject.name) ?? 'Unknown';
|
|
66
|
+
error.message = (0, ts_types_1.asString)(errorObject.message) ?? 'Unknown';
|
|
67
|
+
error.stack = (0, ts_types_1.asString)(errorObject.stack) ?? 'Unknown';
|
|
68
68
|
reporter.sendTelemetryException(error, event);
|
|
69
69
|
}
|
|
70
70
|
}
|
package/oclif.manifest.json
CHANGED
package/package.json
CHANGED
|
@@ -1,54 +1,54 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@salesforce/plugin-telemetry",
|
|
3
3
|
"description": "Command usage and error telemetry for the Salesforce CLI",
|
|
4
|
-
"version": "2.1
|
|
4
|
+
"version": "2.2.1",
|
|
5
5
|
"author": "Salesforce",
|
|
6
6
|
"bugs": "https://github.com/forcedotcom/cli/issues",
|
|
7
7
|
"dependencies": {
|
|
8
|
-
"@oclif/core": "^2.8.
|
|
9
|
-
"@salesforce/core": "^
|
|
10
|
-
"@salesforce/sf-plugins-core": "^
|
|
11
|
-
"@salesforce/telemetry": "^3.2.
|
|
8
|
+
"@oclif/core": "^2.8.5",
|
|
9
|
+
"@salesforce/core": "^4.2.1",
|
|
10
|
+
"@salesforce/sf-plugins-core": "^3.0.2",
|
|
11
|
+
"@salesforce/telemetry": "^3.2.29",
|
|
12
12
|
"debug": "^4.3.4",
|
|
13
13
|
"tslib": "^2"
|
|
14
14
|
},
|
|
15
15
|
"devDependencies": {
|
|
16
|
-
"@oclif/plugin-command-snapshot": "^
|
|
17
|
-
"@oclif/plugin-help": "^5.2.
|
|
18
|
-
"@salesforce/cli-plugins-testkit": "^
|
|
19
|
-
"@salesforce/dev-config": "^
|
|
20
|
-
"@salesforce/dev-scripts": "^4.
|
|
21
|
-
"@salesforce/plugin-command-reference": "^
|
|
22
|
-
"@salesforce/prettier-config": "^0.0.
|
|
16
|
+
"@oclif/plugin-command-snapshot": "^4.0.2",
|
|
17
|
+
"@oclif/plugin-help": "^5.2.9",
|
|
18
|
+
"@salesforce/cli-plugins-testkit": "^4.0.1",
|
|
19
|
+
"@salesforce/dev-config": "^4.0.1",
|
|
20
|
+
"@salesforce/dev-scripts": "^5.4.2",
|
|
21
|
+
"@salesforce/plugin-command-reference": "^3.0.2",
|
|
22
|
+
"@salesforce/prettier-config": "^0.0.3",
|
|
23
23
|
"@salesforce/ts-sinon": "^1.4.6",
|
|
24
24
|
"@swc/core": "^1.3.14",
|
|
25
25
|
"@types/debug": "^4.1.5",
|
|
26
|
-
"@typescript-eslint/eslint-plugin": "^5.
|
|
27
|
-
"@typescript-eslint/parser": "^5.
|
|
26
|
+
"@typescript-eslint/eslint-plugin": "^5.59.8",
|
|
27
|
+
"@typescript-eslint/parser": "^5.59.7",
|
|
28
28
|
"chai": "^4.3.7",
|
|
29
|
-
"eslint": "^8.
|
|
30
|
-
"eslint-config-prettier": "^8.
|
|
31
|
-
"eslint-config-salesforce": "^
|
|
29
|
+
"eslint": "^8.42.0",
|
|
30
|
+
"eslint-config-prettier": "^8.8.0",
|
|
31
|
+
"eslint-config-salesforce": "^2.0.1",
|
|
32
32
|
"eslint-config-salesforce-license": "^0.2.0",
|
|
33
33
|
"eslint-config-salesforce-typescript": "^1.1.1",
|
|
34
|
-
"eslint-plugin-header": "^3.
|
|
34
|
+
"eslint-plugin-header": "^3.1.1",
|
|
35
35
|
"eslint-plugin-import": "2.27.5",
|
|
36
|
-
"eslint-plugin-jsdoc": "^
|
|
36
|
+
"eslint-plugin-jsdoc": "^43.0.5",
|
|
37
37
|
"husky": "^7.0.4",
|
|
38
38
|
"mocha": "^9.1.3",
|
|
39
39
|
"nyc": "^15.1.0",
|
|
40
|
-
"oclif": "^3.
|
|
40
|
+
"oclif": "^3.9.0",
|
|
41
41
|
"prettier": "^2.8.7",
|
|
42
42
|
"pretty-quick": "^3.1.0",
|
|
43
43
|
"shx": "0.3.4",
|
|
44
44
|
"sinon": "10.0.0",
|
|
45
45
|
"ts-node": "^10.0.0",
|
|
46
|
-
"typescript": "^4.9.
|
|
46
|
+
"typescript": "^4.9.5",
|
|
47
47
|
"wireit": "^0.9.5"
|
|
48
48
|
},
|
|
49
49
|
"config": {},
|
|
50
50
|
"engines": {
|
|
51
|
-
"node": ">=
|
|
51
|
+
"node": ">=16.0.0"
|
|
52
52
|
},
|
|
53
53
|
"files": [
|
|
54
54
|
"/lib",
|
|
@@ -90,7 +90,7 @@
|
|
|
90
90
|
"prepack": "sf-prepack",
|
|
91
91
|
"prepare": "sf-install",
|
|
92
92
|
"test": "wireit",
|
|
93
|
-
"test:nuts": "nyc mocha \"**/*.nut.ts\" --slow 4500 --timeout 600000 --parallel",
|
|
93
|
+
"test:nuts": "nyc mocha \"**/*.nut.ts\" --slow 4500 --timeout 600000 --parallel --jobs 10",
|
|
94
94
|
"test:only": "wireit",
|
|
95
95
|
"version": "oclif readme"
|
|
96
96
|
},
|
|
@@ -203,7 +203,7 @@
|
|
|
203
203
|
}
|
|
204
204
|
},
|
|
205
205
|
"sfdx": {
|
|
206
|
-
"publicKeyUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@salesforce/plugin-telemetry/2.1.
|
|
207
|
-
"signatureUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@salesforce/plugin-telemetry/2.1.
|
|
206
|
+
"publicKeyUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@salesforce/plugin-telemetry/2.2.1.crt",
|
|
207
|
+
"signatureUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@salesforce/plugin-telemetry/2.2.1.sig"
|
|
208
208
|
}
|
|
209
209
|
}
|