@salesforce/plugin-apex 1.5.1 → 2.2.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 +9 -9
- package/lib/commands/apex/get/log.d.ts +20 -0
- package/lib/commands/apex/get/log.js +73 -0
- package/lib/commands/apex/get/log.js.map +1 -0
- package/lib/commands/apex/get/test.d.ts +19 -0
- package/lib/commands/apex/get/test.js +74 -0
- package/lib/commands/apex/get/test.js.map +1 -0
- package/lib/commands/apex/list/log.d.ts +17 -0
- package/lib/commands/apex/list/log.js +76 -0
- package/lib/commands/apex/list/log.js.map +1 -0
- package/lib/commands/apex/run/test.d.ts +33 -0
- package/lib/commands/apex/run/test.js +198 -0
- package/lib/commands/apex/run/test.js.map +1 -0
- package/lib/commands/apex/run.d.ts +25 -0
- package/lib/commands/apex/run.js +53 -0
- package/lib/commands/apex/run.js.map +1 -0
- package/lib/commands/apex/tail/log.d.ts +26 -0
- package/lib/commands/apex/tail/log.js +81 -0
- package/lib/commands/apex/tail/log.js.map +1 -0
- package/lib/legacyColorization.js +36 -38
- package/lib/legacyColorization.js.map +1 -1
- package/lib/reporters/index.d.ts +2 -2
- package/lib/reporters/index.js +3 -3
- package/lib/reporters/index.js.map +1 -1
- package/lib/reporters/jsonReporter.d.ts +33 -16
- package/lib/reporters/jsonReporter.js +23 -9
- package/lib/reporters/jsonReporter.js.map +1 -1
- package/lib/reporters/runReporter.d.ts +6 -0
- package/lib/reporters/runReporter.js +48 -0
- package/lib/reporters/runReporter.js.map +1 -0
- package/lib/reporters/testReporter.d.ts +44 -0
- package/lib/reporters/testReporter.js +170 -0
- package/lib/reporters/testReporter.js.map +1 -0
- package/lib/utils.d.ts +0 -2
- package/lib/utils.js +2 -21
- package/lib/utils.js.map +1 -1
- package/messages/get.md +45 -0
- package/messages/list.md +63 -0
- package/messages/report.md +45 -0
- package/messages/run.md +48 -0
- package/messages/runtest.md +129 -0
- package/messages/tail.md +37 -0
- package/oclif.manifest.json +426 -800
- package/package.json +30 -30
- package/lib/commands/force/apex/execute.d.ts +0 -16
- package/lib/commands/force/apex/execute.js +0 -109
- package/lib/commands/force/apex/execute.js.map +0 -1
- package/lib/commands/force/apex/log/get.d.ts +0 -17
- package/lib/commands/force/apex/log/get.js +0 -103
- package/lib/commands/force/apex/log/get.js.map +0 -1
- package/lib/commands/force/apex/log/list.d.ts +0 -17
- package/lib/commands/force/apex/log/list.js +0 -151
- package/lib/commands/force/apex/log/list.js.map +0 -1
- package/lib/commands/force/apex/log/tail.d.ts +0 -17
- package/lib/commands/force/apex/log/tail.js +0 -96
- package/lib/commands/force/apex/log/tail.js.map +0 -1
- package/lib/commands/force/apex/test/report.d.ts +0 -25
- package/lib/commands/force/apex/test/report.js +0 -175
- package/lib/commands/force/apex/test/report.js.map +0 -1
- package/lib/commands/force/apex/test/run.d.ts +0 -40
- package/lib/commands/force/apex/test/run.js +0 -299
- package/lib/commands/force/apex/test/run.js.map +0 -1
- package/lib/reporters/util.d.ts +0 -14
- package/lib/reporters/util.js +0 -78
- package/lib/reporters/util.js.map +0 -1
- package/messages/execute.json +0 -9
- package/messages/get.json +0 -12
- package/messages/list.json +0 -18
- package/messages/messages.json +0 -22
- package/messages/org.json +0 -6
- package/messages/report.json +0 -23
- package/messages/run.json +0 -34
- package/messages/tail.json +0 -12
- package/yarn.lock +0 -8992
package/package.json
CHANGED
|
@@ -1,32 +1,31 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@salesforce/plugin-apex",
|
|
3
3
|
"description": "Apex commands",
|
|
4
|
-
"version": "
|
|
4
|
+
"version": "2.2.0",
|
|
5
5
|
"author": "Salesforce",
|
|
6
6
|
"bugs": "https://github.com/forcedotcom/cli/issues",
|
|
7
7
|
"main": "lib/index.js",
|
|
8
8
|
"dependencies": {
|
|
9
|
-
"@oclif/core": "^2.
|
|
10
|
-
"@salesforce/apex-node": "1.6.0",
|
|
11
|
-
"@salesforce/
|
|
12
|
-
"@salesforce/core": "^
|
|
9
|
+
"@oclif/core": "^2.1.4",
|
|
10
|
+
"@salesforce/apex-node": "^1.6.0",
|
|
11
|
+
"@salesforce/core": "^3.33.1",
|
|
12
|
+
"@salesforce/sf-plugins-core": "^2.1.2",
|
|
13
13
|
"chalk": "^4.1.0",
|
|
14
14
|
"tslib": "^2"
|
|
15
15
|
},
|
|
16
16
|
"devDependencies": {
|
|
17
|
-
"@oclif/plugin-command-snapshot": "^3.3.
|
|
17
|
+
"@oclif/plugin-command-snapshot": "^3.3.5",
|
|
18
18
|
"@oclif/plugin-help": "^5",
|
|
19
|
-
"@
|
|
20
|
-
"@salesforce/dev-
|
|
21
|
-
"@salesforce/
|
|
22
|
-
"@salesforce/plugin-command-reference": "^1.6.1",
|
|
19
|
+
"@salesforce/dev-config": "3.1.0",
|
|
20
|
+
"@salesforce/dev-scripts": "^3.1.1",
|
|
21
|
+
"@salesforce/plugin-command-reference": "^2.3.1",
|
|
23
22
|
"@salesforce/prettier-config": "^0.0.2",
|
|
24
23
|
"@salesforce/ts-sinon": "^1.4.4",
|
|
25
24
|
"@salesforce/ts-types": "1.7.2",
|
|
26
|
-
"@swc/core": "^1.3.
|
|
25
|
+
"@swc/core": "^1.3.35",
|
|
27
26
|
"@types/mkdirp": "0.5.2",
|
|
28
|
-
"@typescript-eslint/eslint-plugin": "^5.
|
|
29
|
-
"@typescript-eslint/parser": "^5.
|
|
27
|
+
"@typescript-eslint/eslint-plugin": "^5.50.0",
|
|
28
|
+
"@typescript-eslint/parser": "^5.51.0",
|
|
30
29
|
"chai": "^4.2.0",
|
|
31
30
|
"cross-env": "7.0.2",
|
|
32
31
|
"eslint": "^8.32.0",
|
|
@@ -37,17 +36,18 @@
|
|
|
37
36
|
"eslint-plugin-header": "^3.0.0",
|
|
38
37
|
"eslint-plugin-import": "^2.27.5",
|
|
39
38
|
"eslint-plugin-jsdoc": "^39.3.6",
|
|
39
|
+
"eslint-plugin-sf-plugin": "^1.8.1",
|
|
40
40
|
"globby": "^8",
|
|
41
41
|
"husky": "^7.0.4",
|
|
42
42
|
"mocha": "^9.1.3",
|
|
43
43
|
"nyc": "^15.1.0",
|
|
44
|
-
"oclif": "^3.6.
|
|
44
|
+
"oclif": "^3.6.4",
|
|
45
45
|
"prettier": "^2.7.1",
|
|
46
46
|
"pretty-quick": "^3.1.0",
|
|
47
47
|
"shx": "^0.3.4",
|
|
48
48
|
"sinon": "10.0.0",
|
|
49
49
|
"ts-node": "^10.0.0",
|
|
50
|
-
"typescript": "4.
|
|
50
|
+
"typescript": "4.9.5"
|
|
51
51
|
},
|
|
52
52
|
"engines": {
|
|
53
53
|
"node": ">=14.0.0"
|
|
@@ -78,20 +78,20 @@
|
|
|
78
78
|
],
|
|
79
79
|
"bin": "sfdx",
|
|
80
80
|
"topics": {
|
|
81
|
-
"
|
|
82
|
-
"
|
|
81
|
+
"apex": {
|
|
82
|
+
"description": "Use the apex commands to create Apex classes, execute anonymous blocks, view your logs, run Apex tests, and view Apex test results.",
|
|
83
83
|
"subtopics": {
|
|
84
|
-
"
|
|
85
|
-
"description": "
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
84
|
+
"get": {
|
|
85
|
+
"description": "Get debug logs or test results."
|
|
86
|
+
},
|
|
87
|
+
"list": {
|
|
88
|
+
"description": "List debug logs."
|
|
89
|
+
},
|
|
90
|
+
"run": {
|
|
91
|
+
"description": "Run Apex tests."
|
|
92
|
+
},
|
|
93
|
+
"tail": {
|
|
94
|
+
"description": "Tail debug logs."
|
|
95
95
|
}
|
|
96
96
|
}
|
|
97
97
|
}
|
|
@@ -130,7 +130,7 @@
|
|
|
130
130
|
]
|
|
131
131
|
},
|
|
132
132
|
"sfdx": {
|
|
133
|
-
"publicKeyUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@salesforce/plugin-apex/
|
|
134
|
-
"signatureUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@salesforce/plugin-apex/
|
|
133
|
+
"publicKeyUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@salesforce/plugin-apex/2.2.0.crt",
|
|
134
|
+
"signatureUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@salesforce/plugin-apex/2.2.0.sig"
|
|
135
135
|
}
|
|
136
136
|
}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { flags, SfdxCommand } from '@salesforce/command';
|
|
2
|
-
import { AnyJson } from '@salesforce/ts-types';
|
|
3
|
-
export default class Execute extends SfdxCommand {
|
|
4
|
-
static description: string;
|
|
5
|
-
static longDescription: string;
|
|
6
|
-
static examples: string[];
|
|
7
|
-
protected static requiresUsername: boolean;
|
|
8
|
-
static readonly flagsConfig: {
|
|
9
|
-
apexcodefile: flags.Discriminated<flags.String>;
|
|
10
|
-
loglevel: flags.Discriminated<flags.Enum<string>>;
|
|
11
|
-
apiversion: flags.Builtin;
|
|
12
|
-
};
|
|
13
|
-
run(): Promise<AnyJson>;
|
|
14
|
-
private formatDefault;
|
|
15
|
-
private formatJson;
|
|
16
|
-
}
|
|
@@ -1,109 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const tslib_1 = require("tslib");
|
|
4
|
-
/*
|
|
5
|
-
* Copyright (c) 2020, salesforce.com, inc.
|
|
6
|
-
* All rights reserved.
|
|
7
|
-
* Licensed under the BSD 3-Clause license.
|
|
8
|
-
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
|
|
9
|
-
*/
|
|
10
|
-
const apex_node_1 = require("@salesforce/apex-node");
|
|
11
|
-
const command_1 = require("@salesforce/command");
|
|
12
|
-
const core_1 = require("@salesforce/core");
|
|
13
|
-
const utils_1 = require("../../../utils");
|
|
14
|
-
core_1.Messages.importMessagesDirectory(__dirname);
|
|
15
|
-
const messages = core_1.Messages.load('@salesforce/plugin-apex', 'execute', [
|
|
16
|
-
'apexCodeFileDescription',
|
|
17
|
-
'commandDescription',
|
|
18
|
-
'executeCompileSuccess',
|
|
19
|
-
'executeRuntimeSuccess',
|
|
20
|
-
'logLevelDescription',
|
|
21
|
-
'logLevelLongDescription',
|
|
22
|
-
'longDescription',
|
|
23
|
-
]);
|
|
24
|
-
class Execute extends command_1.SfdxCommand {
|
|
25
|
-
run() {
|
|
26
|
-
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
27
|
-
try {
|
|
28
|
-
// org is guaranteed by requiresUsername field
|
|
29
|
-
if (!this.org) {
|
|
30
|
-
throw Error('Unable to get connection from Org.');
|
|
31
|
-
}
|
|
32
|
-
const conn = this.org.getConnection();
|
|
33
|
-
const exec = new apex_node_1.ExecuteService(conn);
|
|
34
|
-
const execAnonOptions = Object.assign({}, (this.flags.apexcodefile ? { apexFilePath: this.flags.apexcodefile } : { userInput: true }));
|
|
35
|
-
const result = yield exec.executeAnonymous(execAnonOptions);
|
|
36
|
-
this.ux.log(this.formatDefault(result));
|
|
37
|
-
return this.formatJson(result);
|
|
38
|
-
}
|
|
39
|
-
catch (e) {
|
|
40
|
-
return Promise.reject(e);
|
|
41
|
-
}
|
|
42
|
-
});
|
|
43
|
-
}
|
|
44
|
-
formatDefault(response) {
|
|
45
|
-
let outputText = '';
|
|
46
|
-
if (response.success) {
|
|
47
|
-
outputText += `${(0, utils_1.colorSuccess)(messages.getMessage('executeCompileSuccess'))}\n`;
|
|
48
|
-
outputText += `${(0, utils_1.colorSuccess)(messages.getMessage('executeRuntimeSuccess'))}\n`;
|
|
49
|
-
outputText += `\n${response.logs}`;
|
|
50
|
-
}
|
|
51
|
-
else {
|
|
52
|
-
if (!response.diagnostic) {
|
|
53
|
-
throw Error('No diagnostic property found on response.');
|
|
54
|
-
}
|
|
55
|
-
const diagnostic = response.diagnostic[0];
|
|
56
|
-
if (!response.compiled) {
|
|
57
|
-
outputText += (0, utils_1.colorError)(`Error: Line: ${diagnostic.lineNumber}, Column: ${diagnostic.columnNumber}\n`);
|
|
58
|
-
outputText += (0, utils_1.colorError)(`Error: ${diagnostic.compileProblem}\n`);
|
|
59
|
-
}
|
|
60
|
-
else {
|
|
61
|
-
outputText += `${(0, utils_1.colorSuccess)(messages.getMessage('executeCompileSuccess'))}\n`;
|
|
62
|
-
outputText += (0, utils_1.colorError)(`Error: ${diagnostic.exceptionMessage}\n`);
|
|
63
|
-
outputText += (0, utils_1.colorError)(`Error: ${diagnostic.exceptionStackTrace}\n`);
|
|
64
|
-
outputText += `\n${response.logs}`;
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
return outputText;
|
|
68
|
-
}
|
|
69
|
-
formatJson(response) {
|
|
70
|
-
const diagnostic = typeof response.diagnostic !== 'undefined';
|
|
71
|
-
// Allow assumption below that diagnostic array is populated.
|
|
72
|
-
/* eslint-disable @typescript-eslint/no-non-null-assertion */
|
|
73
|
-
const formattedResponse = {
|
|
74
|
-
success: response.success,
|
|
75
|
-
compiled: response.compiled,
|
|
76
|
-
compileProblem: diagnostic ? response.diagnostic[0].compileProblem : '',
|
|
77
|
-
exceptionMessage: diagnostic ? response.diagnostic[0].exceptionMessage : '',
|
|
78
|
-
exceptionStackTrace: diagnostic ? response.diagnostic[0].exceptionStackTrace : '',
|
|
79
|
-
line: diagnostic ? response.diagnostic[0].lineNumber : -1,
|
|
80
|
-
column: diagnostic ? response.diagnostic[0].columnNumber : -1,
|
|
81
|
-
logs: response.logs,
|
|
82
|
-
};
|
|
83
|
-
/* eslint-emable @typescript-eslint/no-non-null-assertion */
|
|
84
|
-
return formattedResponse;
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
exports.default = Execute;
|
|
88
|
-
Execute.description = (0, utils_1.buildDescription)(messages.getMessage('commandDescription'), messages.getMessage('longDescription'));
|
|
89
|
-
Execute.longDescription = messages.getMessage('longDescription');
|
|
90
|
-
Execute.examples = [
|
|
91
|
-
'$ sfdx force:apex:execute -u testusername@salesforce.org -f ~/test.apex',
|
|
92
|
-
'$ sfdx force:apex:execute -f ~/test.apex',
|
|
93
|
-
'$ sfdx force:apex:execute \nStart typing Apex code. Press the Enter key after each line, then press CTRL+D when finished.',
|
|
94
|
-
];
|
|
95
|
-
Execute.requiresUsername = true;
|
|
96
|
-
Execute.flagsConfig = {
|
|
97
|
-
apexcodefile: command_1.flags.filepath({
|
|
98
|
-
char: 'f',
|
|
99
|
-
description: messages.getMessage('apexCodeFileDescription'),
|
|
100
|
-
}),
|
|
101
|
-
loglevel: command_1.flags.enum({
|
|
102
|
-
description: messages.getMessage('logLevelDescription'),
|
|
103
|
-
longDescription: messages.getMessage('logLevelLongDescription'),
|
|
104
|
-
default: 'warn',
|
|
105
|
-
options: utils_1.logLevels,
|
|
106
|
-
}),
|
|
107
|
-
apiversion: command_1.flags.builtin(),
|
|
108
|
-
};
|
|
109
|
-
//# sourceMappingURL=execute.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"execute.js","sourceRoot":"","sources":["../../../../src/commands/force/apex/execute.ts"],"names":[],"mappings":";;;AAAA;;;;;GAKG;AACH,qDAAqG;AACrG,iDAAyD;AACzD,2CAA4C;AAE5C,0CAAuF;AAEvF,eAAQ,CAAC,uBAAuB,CAAC,SAAS,CAAC,CAAC;AAC5C,MAAM,QAAQ,GAAG,eAAQ,CAAC,IAAI,CAAC,yBAAyB,EAAE,SAAS,EAAE;IACnE,yBAAyB;IACzB,oBAAoB;IACpB,uBAAuB;IACvB,uBAAuB;IACvB,qBAAqB;IACrB,yBAAyB;IACzB,iBAAiB;CAClB,CAAC,CAAC;AAEH,MAAqB,OAAQ,SAAQ,qBAAW;IA4BjC,GAAG;;YACd,IAAI;gBACF,8CAA8C;gBAC9C,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE;oBACb,MAAM,KAAK,CAAC,oCAAoC,CAAC,CAAC;iBACnD;gBACD,MAAM,IAAI,GAAG,IAAI,CAAC,GAAG,CAAC,aAAa,EAAE,CAAC;gBACtC,MAAM,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CAAC,CAAC,CAAC,QAAQ,CAAC,UAAW,CAAC,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,CAAC;YAC9D,IAAI,EAAE,QAAQ,CAAC,IAAI;SACpB,CAAC;QACF,4DAA4D;QAC5D,OAAO,iBAAiB,CAAC;IAC3B,CAAC;;AA3FH,0BA4FC;AA3Fe,mBAAW,GAAG,IAAA,wBAAgB,EAC1C,QAAQ,CAAC,UAAU,CAAC,oBAAoB,CAAC,EACzC,QAAQ,CAAC,UAAU,CAAC,iBAAiB,CAAC,CACvC,CAAC;AACY,uBAAe,GAAG,QAAQ,CAAC,UAAU,CAAC,iBAAiB,CAAC,CAAC;AAEzD,gBAAQ,GAAG;IACvB,yEAAyE;IACzE,0CAA0C;IAC1C,2HAA2H;CAC5H,CAAC;AACe,wBAAgB,GAAG,IAAI,CAAC;AAElB,mBAAW,GAAG;IACnC,YAAY,EAAE,eAAK,CAAC,QAAQ,CAAC;QAC3B,IAAI,EAAE,GAAG;QACT,WAAW,EAAE,QAAQ,CAAC,UAAU,CAAC,yBAAyB,CAAC;KAC5D,CAAC;IACF,QAAQ,EAAE,eAAK,CAAC,IAAI,CAAC;QACnB,WAAW,EAAE,QAAQ,CAAC,UAAU,CAAC,qBAAqB,CAAC;QACvD,eAAe,EAAE,QAAQ,CAAC,UAAU,CAAC,yBAAyB,CAAC;QAC/D,OAAO,EAAE,MAAM;QACf,OAAO,EAAE,iBAAS;KACnB,CAAC;IACF,UAAU,EAAE,eAAK,CAAC,OAAO,EAAE;CAC5B,CAAC"}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { flags, SfdxCommand } from '@salesforce/command';
|
|
2
|
-
import { AnyJson } from '@salesforce/ts-types';
|
|
3
|
-
export default class Get extends SfdxCommand {
|
|
4
|
-
protected static requiresUsername: boolean;
|
|
5
|
-
static description: string;
|
|
6
|
-
static longDescription: string;
|
|
7
|
-
static examples: string[];
|
|
8
|
-
static readonly flagsConfig: {
|
|
9
|
-
json: flags.Discriminated<flags.Boolean<boolean>>;
|
|
10
|
-
loglevel: flags.Discriminated<flags.Enum<string>>;
|
|
11
|
-
apiversion: flags.Builtin;
|
|
12
|
-
logid: flags.Discriminated<flags.String>;
|
|
13
|
-
number: flags.Discriminated<flags.Number>;
|
|
14
|
-
outputdir: flags.Discriminated<flags.String>;
|
|
15
|
-
};
|
|
16
|
-
run(): Promise<AnyJson>;
|
|
17
|
-
}
|
|
@@ -1,103 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/*
|
|
3
|
-
* Copyright (c) 2020, salesforce.com, inc.
|
|
4
|
-
* All rights reserved.
|
|
5
|
-
* Licensed under the BSD 3-Clause license.
|
|
6
|
-
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
|
|
7
|
-
*/
|
|
8
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
-
const tslib_1 = require("tslib");
|
|
10
|
-
const apex_node_1 = require("@salesforce/apex-node");
|
|
11
|
-
const command_1 = require("@salesforce/command");
|
|
12
|
-
const core_1 = require("@salesforce/core");
|
|
13
|
-
const utils_1 = require("../../../../utils");
|
|
14
|
-
core_1.Messages.importMessagesDirectory(__dirname);
|
|
15
|
-
const messages = core_1.Messages.load('@salesforce/plugin-apex', 'get', [
|
|
16
|
-
'commandDescription',
|
|
17
|
-
'jsonDescription',
|
|
18
|
-
'logIDDescription',
|
|
19
|
-
'logLevelDescription',
|
|
20
|
-
'logLevelLongDescription',
|
|
21
|
-
'longDescription',
|
|
22
|
-
'noResultsFound',
|
|
23
|
-
'numberDescription',
|
|
24
|
-
'outputDirDescription',
|
|
25
|
-
'outputDirLongDescription',
|
|
26
|
-
]);
|
|
27
|
-
class Get extends command_1.SfdxCommand {
|
|
28
|
-
run() {
|
|
29
|
-
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
30
|
-
try {
|
|
31
|
-
if (!this.org) {
|
|
32
|
-
throw Error('Unable to get connection from Org.');
|
|
33
|
-
}
|
|
34
|
-
// org is guaranteed by requiresUsername field
|
|
35
|
-
const conn = this.org.getConnection();
|
|
36
|
-
const logService = new apex_node_1.LogService(conn);
|
|
37
|
-
if (!this.flags.logid && !this.flags.number) {
|
|
38
|
-
this.flags.number = 1;
|
|
39
|
-
}
|
|
40
|
-
const logResults = yield logService.getLogs({
|
|
41
|
-
logId: this.flags.logid,
|
|
42
|
-
numberOfLogs: this.flags.number,
|
|
43
|
-
outputDir: this.flags.outputdir,
|
|
44
|
-
});
|
|
45
|
-
if (logResults.length === 0) {
|
|
46
|
-
this.ux.log(messages.getMessage('noResultsFound'));
|
|
47
|
-
return [];
|
|
48
|
-
}
|
|
49
|
-
if (this.flags.outputdir) {
|
|
50
|
-
this.ux.log(`Log files written to ${this.flags.outputdir}`);
|
|
51
|
-
return logResults.map((logResult) => logResult.log);
|
|
52
|
-
}
|
|
53
|
-
const parsedLogs = logResults.map((logResult) => {
|
|
54
|
-
const colored = (0, utils_1.colorLogs)(logResult.log);
|
|
55
|
-
this.ux.log(colored);
|
|
56
|
-
return { log: logResult.log };
|
|
57
|
-
});
|
|
58
|
-
return parsedLogs;
|
|
59
|
-
}
|
|
60
|
-
catch (e) {
|
|
61
|
-
return Promise.reject(e);
|
|
62
|
-
}
|
|
63
|
-
});
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
exports.default = Get;
|
|
67
|
-
Get.requiresUsername = true;
|
|
68
|
-
Get.description = (0, utils_1.buildDescription)(messages.getMessage('commandDescription'), messages.getMessage('longDescription'));
|
|
69
|
-
Get.longDescription = messages.getMessage('longDescription');
|
|
70
|
-
Get.examples = [
|
|
71
|
-
'$ sfdx force:apex:log:get -i <log id>',
|
|
72
|
-
'$ sfdx force:apex:log:get -i <log id> -u me@my.org',
|
|
73
|
-
'$ sfdx force:apex:log:get -n 2 -c',
|
|
74
|
-
'$ sfdx force:apex:log:get -d Users/Desktop/logs -n 2',
|
|
75
|
-
];
|
|
76
|
-
Get.flagsConfig = {
|
|
77
|
-
json: command_1.flags.boolean({
|
|
78
|
-
description: messages.getMessage('jsonDescription'),
|
|
79
|
-
}),
|
|
80
|
-
loglevel: command_1.flags.enum({
|
|
81
|
-
description: messages.getMessage('logLevelDescription'),
|
|
82
|
-
longDescription: messages.getMessage('logLevelLongDescription'),
|
|
83
|
-
default: 'warn',
|
|
84
|
-
options: utils_1.logLevels,
|
|
85
|
-
}),
|
|
86
|
-
apiversion: command_1.flags.builtin(),
|
|
87
|
-
logid: command_1.flags.id({
|
|
88
|
-
char: 'i',
|
|
89
|
-
description: messages.getMessage('logIDDescription'),
|
|
90
|
-
}),
|
|
91
|
-
number: command_1.flags.number({
|
|
92
|
-
char: 'n',
|
|
93
|
-
min: 1,
|
|
94
|
-
max: 25,
|
|
95
|
-
description: messages.getMessage('numberDescription'),
|
|
96
|
-
}),
|
|
97
|
-
outputdir: command_1.flags.string({
|
|
98
|
-
char: 'd',
|
|
99
|
-
description: messages.getMessage('outputDirDescription'),
|
|
100
|
-
longDescription: messages.getMessage('outputDirLongDescription'),
|
|
101
|
-
}),
|
|
102
|
-
};
|
|
103
|
-
//# sourceMappingURL=get.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"get.js","sourceRoot":"","sources":["../../../../../src/commands/force/apex/log/get.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAEH,qDAAmD;AACnD,iDAAyD;AACzD,2CAA4C;AAE5C,6CAA2E;AAE3E,eAAQ,CAAC,uBAAuB,CAAC,SAAS,CAAC,CAAC;AAC5C,MAAM,QAAQ,GAAG,eAAQ,CAAC,IAAI,CAAC,yBAAyB,EAAE,KAAK,EAAE;IAC/D,oBAAoB;IACpB,iBAAiB;IACjB,kBAAkB;IAClB,qBAAqB;IACrB,yBAAyB;IACzB,iBAAiB;IACjB,gBAAgB;IAChB,mBAAmB;IACnB,sBAAsB;IACtB,0BAA0B;CAC3B,CAAC,CAAC;AAEH,MAAqB,GAAI,SAAQ,qB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AE,CAAC;QACN,GAAG,EAAE,EAAE;QACP,WAAW,EAAE,QAAQ,CAAC,UAAU,CAAC,mBAAmB,CAAC;KACtD,CAAC;IACF,SAAS,EAAE,eAAK,CAAC,MAAM,CAAC;QACtB,IAAI,EAAE,GAAG;QACT,WAAW,EAAE,QAAQ,CAAC,UAAU,CAAC,sBAAsB,CAAC;QACxD,eAAe,EAAE,QAAQ,CAAC,UAAU,CAAC,0BAA0B,CAAC;KACjE,CAAC;CACH,CAAC"}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { LogRecord } from '@salesforce/apex-node';
|
|
2
|
-
import { flags, SfdxCommand } from '@salesforce/command';
|
|
3
|
-
export default class List extends SfdxCommand {
|
|
4
|
-
protected static requiresUsername: boolean;
|
|
5
|
-
static description: string;
|
|
6
|
-
static longDescription: string;
|
|
7
|
-
static examples: string[];
|
|
8
|
-
static readonly flagsConfig: {
|
|
9
|
-
json: flags.Discriminated<flags.Boolean<boolean>>;
|
|
10
|
-
loglevel: flags.Discriminated<flags.Enum<string>>;
|
|
11
|
-
apiversion: flags.Builtin;
|
|
12
|
-
};
|
|
13
|
-
run(): Promise<LogRecord[]>;
|
|
14
|
-
formatTable(logRecords: LogRecord[]): string;
|
|
15
|
-
private cleanRecords;
|
|
16
|
-
private formatTime;
|
|
17
|
-
}
|
|
@@ -1,151 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/*
|
|
3
|
-
* Copyright (c) 2020, salesforce.com, inc.
|
|
4
|
-
* All rights reserved.
|
|
5
|
-
* Licensed under the BSD 3-Clause license.
|
|
6
|
-
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
|
|
7
|
-
*/
|
|
8
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
-
const tslib_1 = require("tslib");
|
|
10
|
-
const apex_node_1 = require("@salesforce/apex-node");
|
|
11
|
-
const command_1 = require("@salesforce/command");
|
|
12
|
-
const core_1 = require("@salesforce/core");
|
|
13
|
-
const utils_1 = require("../../../../utils");
|
|
14
|
-
core_1.Messages.importMessagesDirectory(__dirname);
|
|
15
|
-
const messages = core_1.Messages.load('@salesforce/plugin-apex', 'list', [
|
|
16
|
-
'appColHeader',
|
|
17
|
-
'commandDescription',
|
|
18
|
-
'durationColHeader',
|
|
19
|
-
'idColHeader',
|
|
20
|
-
'jsonDescription',
|
|
21
|
-
'locationColHeader',
|
|
22
|
-
'logLevelDescription',
|
|
23
|
-
'logLevelLongDescription',
|
|
24
|
-
'longDescription',
|
|
25
|
-
'noDebugLogsFound',
|
|
26
|
-
'operationColHeader',
|
|
27
|
-
'requestColHeader',
|
|
28
|
-
'sizeColHeader',
|
|
29
|
-
'statusColHeader',
|
|
30
|
-
'timeColHeader',
|
|
31
|
-
'userColHeader',
|
|
32
|
-
]);
|
|
33
|
-
class List extends command_1.SfdxCommand {
|
|
34
|
-
run() {
|
|
35
|
-
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
36
|
-
try {
|
|
37
|
-
if (!this.org) {
|
|
38
|
-
throw Error('Unable to get connection from Org.');
|
|
39
|
-
}
|
|
40
|
-
// org is guaranteed by requiresUsername field
|
|
41
|
-
const conn = this.org.getConnection();
|
|
42
|
-
const logService = new apex_node_1.LogService(conn);
|
|
43
|
-
const logRecords = yield logService.getLogRecords();
|
|
44
|
-
if (logRecords.length === 0) {
|
|
45
|
-
this.ux.log(messages.getMessage('noDebugLogsFound'));
|
|
46
|
-
return [];
|
|
47
|
-
}
|
|
48
|
-
const cleanLogs = this.cleanRecords(logRecords);
|
|
49
|
-
const table = this.formatTable(cleanLogs);
|
|
50
|
-
this.ux.log(table);
|
|
51
|
-
return logRecords;
|
|
52
|
-
}
|
|
53
|
-
catch (e) {
|
|
54
|
-
return Promise.reject(e);
|
|
55
|
-
}
|
|
56
|
-
});
|
|
57
|
-
}
|
|
58
|
-
formatTable(logRecords) {
|
|
59
|
-
const tb = new apex_node_1.Table();
|
|
60
|
-
const logRowArray = [];
|
|
61
|
-
for (const logRecord of logRecords) {
|
|
62
|
-
const row = {
|
|
63
|
-
app: logRecord.Application,
|
|
64
|
-
duration: String(logRecord.DurationMilliseconds),
|
|
65
|
-
id: logRecord.Id,
|
|
66
|
-
location: logRecord.Location,
|
|
67
|
-
size: String(logRecord.LogLength),
|
|
68
|
-
user: logRecord.LogUser.Name,
|
|
69
|
-
operation: logRecord.Operation,
|
|
70
|
-
request: logRecord.Request,
|
|
71
|
-
time: logRecord.StartTime,
|
|
72
|
-
status: logRecord.Status,
|
|
73
|
-
};
|
|
74
|
-
logRowArray.push(row);
|
|
75
|
-
}
|
|
76
|
-
const tableResult = tb.createTable(logRowArray, [
|
|
77
|
-
{
|
|
78
|
-
key: 'app',
|
|
79
|
-
label: messages.getMessage('appColHeader'),
|
|
80
|
-
},
|
|
81
|
-
{
|
|
82
|
-
key: 'duration',
|
|
83
|
-
label: messages.getMessage('durationColHeader'),
|
|
84
|
-
},
|
|
85
|
-
{
|
|
86
|
-
key: 'id',
|
|
87
|
-
label: messages.getMessage('idColHeader'),
|
|
88
|
-
},
|
|
89
|
-
{
|
|
90
|
-
key: 'location',
|
|
91
|
-
label: messages.getMessage('locationColHeader'),
|
|
92
|
-
},
|
|
93
|
-
{
|
|
94
|
-
key: 'size',
|
|
95
|
-
label: messages.getMessage('sizeColHeader'),
|
|
96
|
-
},
|
|
97
|
-
{
|
|
98
|
-
key: 'user',
|
|
99
|
-
label: messages.getMessage('userColHeader'),
|
|
100
|
-
},
|
|
101
|
-
{
|
|
102
|
-
key: 'operation',
|
|
103
|
-
label: messages.getMessage('operationColHeader'),
|
|
104
|
-
},
|
|
105
|
-
{
|
|
106
|
-
key: 'request',
|
|
107
|
-
label: messages.getMessage('requestColHeader'),
|
|
108
|
-
},
|
|
109
|
-
{
|
|
110
|
-
key: 'time',
|
|
111
|
-
label: messages.getMessage('timeColHeader'),
|
|
112
|
-
},
|
|
113
|
-
{
|
|
114
|
-
key: 'status',
|
|
115
|
-
label: messages.getMessage('statusColHeader'),
|
|
116
|
-
},
|
|
117
|
-
]);
|
|
118
|
-
return tableResult;
|
|
119
|
-
}
|
|
120
|
-
cleanRecords(logRecords) {
|
|
121
|
-
return logRecords.map((record) => {
|
|
122
|
-
record.StartTime = this.formatTime(record.StartTime);
|
|
123
|
-
return record;
|
|
124
|
-
});
|
|
125
|
-
}
|
|
126
|
-
formatTime(time) {
|
|
127
|
-
const milliIndex = time.indexOf('.');
|
|
128
|
-
if (milliIndex !== -1) {
|
|
129
|
-
return time.substring(0, milliIndex) + time.substring(milliIndex + 4);
|
|
130
|
-
}
|
|
131
|
-
return time;
|
|
132
|
-
}
|
|
133
|
-
}
|
|
134
|
-
exports.default = List;
|
|
135
|
-
List.requiresUsername = true;
|
|
136
|
-
List.description = (0, utils_1.buildDescription)(messages.getMessage('commandDescription'), messages.getMessage('longDescription'));
|
|
137
|
-
List.longDescription = messages.getMessage('longDescription');
|
|
138
|
-
List.examples = ['$ sfdx force:apex:log:list', '$ sfdx force:apex:log:list -u me@my.org'];
|
|
139
|
-
List.flagsConfig = {
|
|
140
|
-
json: command_1.flags.boolean({
|
|
141
|
-
description: messages.getMessage('jsonDescription'),
|
|
142
|
-
}),
|
|
143
|
-
loglevel: command_1.flags.enum({
|
|
144
|
-
description: messages.getMessage('logLevelDescription'),
|
|
145
|
-
longDescription: messages.getMessage('logLevelLongDescription'),
|
|
146
|
-
default: 'warn',
|
|
147
|
-
options: utils_1.logLevels,
|
|
148
|
-
}),
|
|
149
|
-
apiversion: command_1.flags.builtin(),
|
|
150
|
-
};
|
|
151
|
-
//# sourceMappingURL=list.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"list.js","sourceRoot":"","sources":["../../../../../src/commands/force/apex/log/list.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAEH,qDAA0E;AAC1E,iDAAyD;AACzD,2CAA4C;AAC5C,6CAAgE;AAEhE,eAAQ,CAAC,uBAAuB,CAAC,SAAS,C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Q,GAAG,CAAC,4BAA4B,EAAE,yCAAyC,CAAC,CAAC;AAE5E,gBAAW,GAAG;IACnC,IAAI,EAAE,eAAK,CAAC,OAAO,CAAC;QAClB,WAAW,EAAE,QAAQ,CAAC,UAAU,CAAC,iBAAiB,CAAC;KACpD,CAAC;IACF,QAAQ,EAAE,eAAK,CAAC,IAAI,CAAC;QACnB,WAAW,EAAE,QAAQ,CAAC,UAAU,CAAC,qBAAqB,CAAC;QACvD,eAAe,EAAE,QAAQ,CAAC,UAAU,CAAC,yBAAyB,CAAC;QAC/D,OAAO,EAAE,MAAM;QACf,OAAO,EAAE,iBAAS;KACnB,CAAC;IACF,UAAU,EAAE,eAAK,CAAC,OAAO,EAAE;CAC5B,CAAC"}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { flags, SfdxCommand } from '@salesforce/command';
|
|
2
|
-
export default class Tail extends SfdxCommand {
|
|
3
|
-
protected static requiresUsername: boolean;
|
|
4
|
-
static description: string;
|
|
5
|
-
static longDescription: string;
|
|
6
|
-
static examples: string[];
|
|
7
|
-
static readonly flagsConfig: {
|
|
8
|
-
json: flags.Discriminated<flags.Boolean<boolean>>;
|
|
9
|
-
loglevel: flags.Discriminated<flags.Enum<string>>;
|
|
10
|
-
apiversion: flags.Builtin;
|
|
11
|
-
color: flags.Discriminated<flags.Boolean<boolean>>;
|
|
12
|
-
debuglevel: flags.Discriminated<flags.String>;
|
|
13
|
-
skiptraceflag: flags.Discriminated<flags.Boolean<boolean>>;
|
|
14
|
-
};
|
|
15
|
-
run(): Promise<void>;
|
|
16
|
-
logTailer(fullLog: string): Promise<void>;
|
|
17
|
-
}
|