sf-debug-log 0.1.2 → 0.2.2
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 +55 -31
- package/lib/commands/debug/delete.d.ts +7 -10
- package/lib/commands/debug/delete.js +48 -48
- package/lib/commands/debug/delete.js.map +1 -1
- package/lib/commands/debug/retrieve.d.ts +8 -10
- package/lib/commands/debug/retrieve.js +58 -65
- package/lib/commands/debug/retrieve.js.map +1 -1
- package/lib/commands/debuglevel/list.d.ts +11 -0
- package/lib/commands/debuglevel/list.js +40 -0
- package/lib/commands/debuglevel/list.js.map +1 -0
- package/lib/commands/debuglevel/new.d.ts +5 -8
- package/lib/commands/debuglevel/new.js +41 -53
- package/lib/commands/debuglevel/new.js.map +1 -1
- package/lib/commands/trace/new.d.ts +8 -11
- package/lib/commands/trace/new.js +60 -84
- package/lib/commands/trace/new.js.map +1 -1
- package/lib/index.d.ts +1 -1
- package/lib/index.js +1 -2
- package/lib/index.js.map +1 -1
- package/lib/types.d.ts +46 -0
- package/lib/types.js +2 -0
- package/lib/types.js.map +1 -0
- package/lib/utils.d.ts +8 -10
- package/lib/utils.js +36 -40
- package/lib/utils.js.map +1 -1
- package/messages/debug.delete.md +7 -3
- package/messages/debug.retrieve.md +8 -0
- package/messages/debuglevel.list.md +19 -0
- package/messages/debuglevel.new.md +13 -1
- package/messages/trace.new.md +12 -0
- package/package.json +17 -12
- package/oclif.manifest.json +0 -199
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
1
|
/* eslint-disable class-methods-use-this */
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
2
|
+
import { SfCommand, Flags } from '@salesforce/sf-plugins-core';
|
|
3
|
+
import { Messages } from '@salesforce/core';
|
|
4
|
+
import { select } from '@inquirer/prompts';
|
|
5
|
+
import { createDebugLevel } from '../../utils.js';
|
|
6
|
+
Messages.importMessagesDirectoryFromMetaUrl(import.meta.url);
|
|
7
|
+
const messages = Messages.loadMessages('sf-debug-log', 'debuglevel.new');
|
|
9
8
|
const DEBUG_CATEGORIES = [
|
|
10
9
|
'Database',
|
|
11
10
|
'Workflow',
|
|
@@ -19,33 +18,40 @@ const DEBUG_CATEGORIES = [
|
|
|
19
18
|
'Nba',
|
|
20
19
|
];
|
|
21
20
|
const DEBUG_LEVELS = ['NONE', 'INTERNAL', 'FINEST', 'FINER', 'FINE', 'DEBUG', 'INFO', 'WARN', 'ERROR'];
|
|
22
|
-
class DebuglevelNew extends
|
|
21
|
+
export default class DebuglevelNew extends SfCommand {
|
|
22
|
+
static summary = messages.getMessage('summary');
|
|
23
|
+
static description = messages.getMessage('description');
|
|
24
|
+
static examples = messages.getMessages('examples');
|
|
25
|
+
static flags = {
|
|
26
|
+
'api-version': Flags.orgApiVersion({
|
|
27
|
+
summary: messages.getMessage('flags.api-version.summary'),
|
|
28
|
+
}),
|
|
29
|
+
targetusername: Flags.requiredOrg({
|
|
30
|
+
summary: messages.getMessage('flags.targetusername.summary'),
|
|
31
|
+
char: 'o',
|
|
32
|
+
required: true,
|
|
33
|
+
}),
|
|
34
|
+
developername: Flags.string({
|
|
35
|
+
summary: messages.getMessage('flags.developername.summary'),
|
|
36
|
+
char: 'n',
|
|
37
|
+
required: true,
|
|
38
|
+
}),
|
|
39
|
+
};
|
|
23
40
|
async run() {
|
|
24
41
|
const { flags } = await this.parse(DebuglevelNew);
|
|
25
|
-
const conn = flags.targetusername.getConnection();
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
debugLevel[category] = level;
|
|
32
|
-
}
|
|
33
|
-
const result = await (0, utils_1.createDebugLevel)(conn, debugLevel);
|
|
34
|
-
if (!result.isSuccess) {
|
|
35
|
-
this.error(`Error to create Debug Level: ${result.error}`);
|
|
36
|
-
}
|
|
37
|
-
else {
|
|
38
|
-
this.log(`Debug Level ${flags.developername} created successfully.`);
|
|
39
|
-
}
|
|
40
|
-
return result;
|
|
42
|
+
const conn = flags.targetusername.getConnection(flags['api-version']);
|
|
43
|
+
const debugLevel = this.createDebugLevelRecord(flags.developername);
|
|
44
|
+
for (const category of DEBUG_CATEGORIES) {
|
|
45
|
+
// eslint-disable-next-line no-await-in-loop
|
|
46
|
+
const level = await this.selectDebugLevel(category);
|
|
47
|
+
debugLevel[category] = level;
|
|
41
48
|
}
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
this.
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
};
|
|
49
|
+
const result = await createDebugLevel(conn, debugLevel);
|
|
50
|
+
if (!result.isSuccess) {
|
|
51
|
+
this.error(`Error to create Debug Level: ${result.error}`);
|
|
52
|
+
}
|
|
53
|
+
else {
|
|
54
|
+
this.log(`Debug Level ${flags.developername} created successfully.`);
|
|
49
55
|
}
|
|
50
56
|
}
|
|
51
57
|
createDebugLevelRecord(developerName) {
|
|
@@ -55,31 +61,13 @@ class DebuglevelNew extends sf_plugins_core_1.SfCommand {
|
|
|
55
61
|
};
|
|
56
62
|
}
|
|
57
63
|
async selectDebugLevel(category) {
|
|
58
|
-
const
|
|
59
|
-
const level = await
|
|
60
|
-
type: 'list',
|
|
61
|
-
name: 'level',
|
|
64
|
+
const choices = DEBUG_LEVELS.map((level) => ({ value: level }));
|
|
65
|
+
const level = await select({
|
|
62
66
|
message: `Select ${category} debug level`,
|
|
63
67
|
loop: false,
|
|
64
|
-
choices
|
|
68
|
+
choices,
|
|
65
69
|
});
|
|
66
|
-
return level
|
|
70
|
+
return level;
|
|
67
71
|
}
|
|
68
72
|
}
|
|
69
|
-
DebuglevelNew.summary = messages.getMessage('summary');
|
|
70
|
-
DebuglevelNew.description = messages.getMessage('description');
|
|
71
|
-
DebuglevelNew.examples = messages.getMessages('examples');
|
|
72
|
-
DebuglevelNew.flags = {
|
|
73
|
-
targetusername: sf_plugins_core_1.Flags.requiredOrg({
|
|
74
|
-
summary: messages.getMessage('flags.targetusername.summary'),
|
|
75
|
-
char: 'o',
|
|
76
|
-
required: true,
|
|
77
|
-
}),
|
|
78
|
-
developername: sf_plugins_core_1.Flags.string({
|
|
79
|
-
summary: messages.getMessage('flags.developerName.summary'),
|
|
80
|
-
char: 'n',
|
|
81
|
-
required: true,
|
|
82
|
-
}),
|
|
83
|
-
};
|
|
84
|
-
exports.default = DebuglevelNew;
|
|
85
73
|
//# sourceMappingURL=new.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"new.js","sourceRoot":"","sources":["../../../src/commands/debuglevel/new.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"new.js","sourceRoot":"","sources":["../../../src/commands/debuglevel/new.ts"],"names":[],"mappings":"AAAA,2CAA2C;AAC3C,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,6BAA6B,CAAC;AAC/D,OAAO,EAAE,QAAQ,EAAmB,MAAM,kBAAkB,CAAC;AAC7D,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAC3C,OAAO,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAElD,QAAQ,CAAC,kCAAkC,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAC7D,MAAM,QAAQ,GAAG,QAAQ,CAAC,YAAY,CAAC,cAAc,EAAE,gBAAgB,CAAC,CAAC;AAEzE,MAAM,gBAAgB,GAAG;IACvB,UAAU;IACV,UAAU;IACV,YAAY;IACZ,SAAS;IACT,UAAU;IACV,eAAe;IACf,aAAa;IACb,QAAQ;IACR,MAAM;IACN,KAAK;CACN,CAAC;AAEF,MAAM,YAAY,GAAG,CAAC,MAAM,EAAE,UAAU,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,CAAC,CAAC;AAIvG,MAAM,CAAC,OAAO,OAAO,aAA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gBAAgB,CAAC,IAAI,EAAE,UAAU,CAAC,CAAC;QACxD,IAAI,CAAC,MAAM,CAAC,SAAS,EAAE,CAAC;YACtB,IAAI,CAAC,KAAK,CAAC,gCAAgC,MAAM,CAAC,KAAK,EAAE,CAAC,CAAC;QAC7D,CAAC;aAAM,CAAC;YACN,IAAI,CAAC,GAAG,CAAC,eAAe,KAAK,CAAC,aAAa,wBAAwB,CAAC,CAAC;QACvE,CAAC;IACH,CAAC;IAEO,sBAAsB,CAAC,aAAqB;QAClD,OAAO;YACL,aAAa,EAAE,aAAa;YAC5B,WAAW,EAAE,aAAa;SAC3B,CAAC;IACJ,CAAC;IAEO,KAAK,CAAC,gBAAgB,CAAC,QAAgB;QAC7C,MAAM,OAAO,GAAG,YAAY,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC;QAChE,MAAM,KAAK,GAAG,MAAM,MAAM,CAAC;YACzB,OAAO,EAAE,UAAU,QAAQ,cAAc;YACzC,IAAI,EAAE,KAAK;YACX,OAAO;SACR,CAAC,CAAC;QACH,OAAO,KAAK,CAAC;IACf,CAAC"}
|
|
@@ -1,17 +1,14 @@
|
|
|
1
1
|
import { SfCommand } from '@salesforce/sf-plugins-core';
|
|
2
|
-
export
|
|
3
|
-
isSuccess: boolean;
|
|
4
|
-
error?: string;
|
|
5
|
-
};
|
|
6
|
-
export default class TraceNew extends SfCommand<TraceNewResult> {
|
|
2
|
+
export default class TraceNew extends SfCommand<void> {
|
|
7
3
|
static readonly summary: string;
|
|
8
4
|
static readonly examples: string[];
|
|
9
5
|
static readonly flags: {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
6
|
+
'api-version': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
7
|
+
targetusername: import("@oclif/core/interfaces").OptionFlag<import("@salesforce/core").Org, import("@oclif/core/interfaces").CustomOptions>;
|
|
8
|
+
user: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
9
|
+
time: import("@oclif/core/interfaces").OptionFlag<number, import("@oclif/core/interfaces").CustomOptions>;
|
|
10
|
+
force: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
11
|
+
debuglevel: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
13
12
|
};
|
|
14
|
-
run(): Promise<
|
|
15
|
-
private selectToProceed;
|
|
16
|
-
private selectDebugLevel;
|
|
13
|
+
run(): Promise<void>;
|
|
17
14
|
}
|
|
@@ -1,94 +1,70 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
const
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
import { SfCommand, Flags } from '@salesforce/sf-plugins-core';
|
|
2
|
+
import { Messages } from '@salesforce/core';
|
|
3
|
+
import { getUserId, getActiveTraceFlag, createTraceFlag, getDebugLevels } from '../../utils.js';
|
|
4
|
+
Messages.importMessagesDirectoryFromMetaUrl(import.meta.url);
|
|
5
|
+
const messages = Messages.loadMessages('sf-debug-log', 'trace.new');
|
|
6
|
+
export default class TraceNew extends SfCommand {
|
|
7
|
+
static summary = messages.getMessage('summary');
|
|
8
|
+
static examples = messages.getMessages('examples');
|
|
9
|
+
static flags = {
|
|
10
|
+
'api-version': Flags.orgApiVersion({
|
|
11
|
+
summary: messages.getMessage('flags.api-version.summary'),
|
|
12
|
+
}),
|
|
13
|
+
targetusername: Flags.requiredOrg({
|
|
14
|
+
summary: messages.getMessage('flags.targetusername.summary'),
|
|
15
|
+
char: 'o',
|
|
16
|
+
required: true,
|
|
17
|
+
}),
|
|
18
|
+
user: Flags.string({
|
|
19
|
+
summary: messages.getMessage('flags.user.summary'),
|
|
20
|
+
char: 'u',
|
|
21
|
+
}),
|
|
22
|
+
time: Flags.integer({
|
|
23
|
+
summary: messages.getMessage('flags.time.summary'),
|
|
24
|
+
char: 't',
|
|
25
|
+
default: 60,
|
|
26
|
+
}),
|
|
27
|
+
force: Flags.boolean({
|
|
28
|
+
summary: messages.getMessage('flags.force.summary'),
|
|
29
|
+
char: 'f',
|
|
30
|
+
default: false,
|
|
31
|
+
}),
|
|
32
|
+
debuglevel: Flags.string({
|
|
33
|
+
summary: messages.getMessage('flags.debuglevel.summary'),
|
|
34
|
+
char: 'd',
|
|
35
|
+
default: 'SFDC_DevConsole',
|
|
36
|
+
}),
|
|
37
|
+
};
|
|
9
38
|
async run() {
|
|
10
39
|
const { flags } = await this.parse(TraceNew);
|
|
11
|
-
const conn = flags.targetusername.getConnection();
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
this.
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
if (!shouldProceed) {
|
|
23
|
-
return { isSuccess: false, error: 'Trace Flag already exists for this user.' };
|
|
24
|
-
}
|
|
25
|
-
else {
|
|
26
|
-
this.spinner.start('Deleting existing Trace Flag...');
|
|
27
|
-
await conn.tooling.sobject('TraceFlag').delete(activeFlag.Id);
|
|
28
|
-
this.spinner.stop();
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
const debuglevel = await this.selectDebugLevel(debugLevels);
|
|
32
|
-
this.spinner.start('Creating Trace Flag...');
|
|
33
|
-
result = await (0, utils_1.createTraceFlag)(conn, userId, debuglevel, flags.time);
|
|
34
|
-
this.spinner.stop();
|
|
35
|
-
if (!result.isSuccess) {
|
|
36
|
-
this.error(`Error to create Trace Flag: ${result.error}`);
|
|
40
|
+
const conn = flags.targetusername.getConnection(flags['api-version']);
|
|
41
|
+
const user = flags.user ? flags.user : conn.getUsername();
|
|
42
|
+
const userId = await getUserId(conn, user);
|
|
43
|
+
if (!userId) {
|
|
44
|
+
this.error(`User ${user} not found`);
|
|
45
|
+
}
|
|
46
|
+
const activeFlag = await getActiveTraceFlag(conn, userId);
|
|
47
|
+
if (activeFlag?.Id) {
|
|
48
|
+
if (!flags.force) {
|
|
49
|
+
this.log('Trace Flag already exists for this user.');
|
|
50
|
+
return;
|
|
37
51
|
}
|
|
38
52
|
else {
|
|
39
|
-
|
|
53
|
+
await conn.tooling.sobject('TraceFlag').delete(activeFlag.Id);
|
|
40
54
|
}
|
|
41
|
-
return result;
|
|
42
55
|
}
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
56
|
+
const debugLevels = await getDebugLevels(conn);
|
|
57
|
+
const debugLevelId = debugLevels.find((level) => level.DeveloperName === flags.debuglevel)?.Id;
|
|
58
|
+
if (!debugLevelId) {
|
|
59
|
+
this.error(`Debug Level ${flags.debuglevel} not found`);
|
|
60
|
+
}
|
|
61
|
+
const result = await createTraceFlag(conn, userId, debugLevelId, flags.time);
|
|
62
|
+
if (!result.isSuccess) {
|
|
63
|
+
this.error(`Error to create Trace Flag: ${result.error}`);
|
|
64
|
+
}
|
|
65
|
+
else {
|
|
66
|
+
this.log(`Trace flag created for ${user}`);
|
|
48
67
|
}
|
|
49
|
-
}
|
|
50
|
-
async selectToProceed() {
|
|
51
|
-
const proceed = await this.prompt({
|
|
52
|
-
type: 'confirm',
|
|
53
|
-
name: 'proceed',
|
|
54
|
-
message: 'Trace Flag already exists for this user. Do you want to proceed?',
|
|
55
|
-
});
|
|
56
|
-
return proceed.proceed;
|
|
57
|
-
}
|
|
58
|
-
async selectDebugLevel(debugLevels) {
|
|
59
|
-
const debuglevel = await this.prompt({
|
|
60
|
-
type: 'list',
|
|
61
|
-
name: 'debugLevel',
|
|
62
|
-
message: 'Select Debug Level',
|
|
63
|
-
loop: false,
|
|
64
|
-
choices: debugLevels.map((debugLevel) => ({
|
|
65
|
-
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/restrict-template-expressions
|
|
66
|
-
name: `${debugLevel.DeveloperName} (DB:${debugLevel.Database} Callout:${debugLevel.Callout} APEX:${debugLevel.ApexCode} Validation:${debugLevel.Validation} Workflow:${debugLevel.Workflow} Profiling:${debugLevel.ApexProfiling} VF:${debugLevel.Visualforce} System:${debugLevel.System} Wave:${debugLevel.Wave} Nba:${debugLevel.Nba})`,
|
|
67
|
-
value: debugLevel.Id,
|
|
68
|
-
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
|
|
69
|
-
short: debugLevel.DeveloperName,
|
|
70
|
-
})),
|
|
71
|
-
});
|
|
72
|
-
return debuglevel.debugLevel;
|
|
73
68
|
}
|
|
74
69
|
}
|
|
75
|
-
TraceNew.summary = messages.getMessage('summary');
|
|
76
|
-
TraceNew.examples = messages.getMessages('examples');
|
|
77
|
-
TraceNew.flags = {
|
|
78
|
-
targetusername: sf_plugins_core_1.Flags.requiredOrg({
|
|
79
|
-
summary: messages.getMessage('flags.targetusername.summary'),
|
|
80
|
-
char: 'o',
|
|
81
|
-
required: true,
|
|
82
|
-
}),
|
|
83
|
-
user: sf_plugins_core_1.Flags.string({
|
|
84
|
-
summary: messages.getMessage('flags.user.summary'),
|
|
85
|
-
char: 'u',
|
|
86
|
-
}),
|
|
87
|
-
time: sf_plugins_core_1.Flags.integer({
|
|
88
|
-
summary: messages.getMessage('flags.time.summary'),
|
|
89
|
-
char: 't',
|
|
90
|
-
default: 60,
|
|
91
|
-
}),
|
|
92
|
-
};
|
|
93
|
-
exports.default = TraceNew;
|
|
94
70
|
//# sourceMappingURL=new.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"new.js","sourceRoot":"","sources":["../../../src/commands/trace/new.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"new.js","sourceRoot":"","sources":["../../../src/commands/trace/new.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,6BAA6B,CAAC;AAC/D,OAAO,EAAc,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AACxD,OAAO,E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QAC/F,IAAI,CAAC,YAAY,EAAE,CAAC;YAClB,IAAI,CAAC,KAAK,CAAC,eAAe,KAAK,CAAC,UAAU,YAAY,CAAC,CAAC;QAC1D,CAAC;QACD,MAAM,MAAM,GAAG,MAAM,eAAe,CAAC,IAAI,EAAE,MAAM,EAAE,YAAY,EAAE,KAAK,CAAC,IAAI,CAAC,CAAC;QAC7E,IAAI,CAAC,MAAM,CAAC,SAAS,EAAE,CAAC;YACtB,IAAI,CAAC,KAAK,CAAC,+BAA+B,MAAM,CAAC,KAAK,EAAE,CAAC,CAAC;QAC5D,CAAC;aAAM,CAAC;YACN,IAAI,CAAC,GAAG,CAAC,0BAA0B,IAAI,EAAE,CAAC,CAAC;QAC7C,CAAC;IACH,CAAC"}
|
package/lib/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
declare const _default: {};
|
|
2
|
-
export
|
|
2
|
+
export default _default;
|
package/lib/index.js
CHANGED
package/lib/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,eAAe,EAAE,CAAC"}
|
package/lib/types.d.ts
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
export type SaveResult = {
|
|
2
|
+
isSuccess: boolean;
|
|
3
|
+
error?: string;
|
|
4
|
+
};
|
|
5
|
+
export interface GetLogsOptions {
|
|
6
|
+
userId?: string | null;
|
|
7
|
+
timeLimit?: number | null;
|
|
8
|
+
}
|
|
9
|
+
export type ApexLog = {
|
|
10
|
+
Id: string;
|
|
11
|
+
LogUser: {
|
|
12
|
+
Username: string;
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
export type TraceFlag = {
|
|
16
|
+
Id: string;
|
|
17
|
+
TracedEntityId: string;
|
|
18
|
+
DebugLevelId: string;
|
|
19
|
+
StartDate: string;
|
|
20
|
+
ExpirationDate: string;
|
|
21
|
+
};
|
|
22
|
+
/**
|
|
23
|
+
* Shape used to create a new DebugLevel record (developer + master label + categories).
|
|
24
|
+
*/
|
|
25
|
+
export interface DebugLevelCreate {
|
|
26
|
+
[key: string]: string | undefined;
|
|
27
|
+
MasterLabel: string;
|
|
28
|
+
DeveloperName: string;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Shape returned when querying existing DebugLevel records.
|
|
32
|
+
*/
|
|
33
|
+
export type DebugLevel = {
|
|
34
|
+
Id: string;
|
|
35
|
+
DeveloperName: string;
|
|
36
|
+
Workflow: string;
|
|
37
|
+
Validation: string;
|
|
38
|
+
Callout: string;
|
|
39
|
+
ApexCode: string;
|
|
40
|
+
ApexProfiling: string;
|
|
41
|
+
Visualforce: string;
|
|
42
|
+
System: string;
|
|
43
|
+
Database: string;
|
|
44
|
+
Wave: string;
|
|
45
|
+
Nba: string;
|
|
46
|
+
};
|
package/lib/types.js
ADDED
package/lib/types.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":""}
|
package/lib/utils.d.ts
CHANGED
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
import { Connection } from '@salesforce/core';
|
|
2
|
-
import {
|
|
3
|
-
import { TraceNewResult } from './commands/trace/new';
|
|
4
|
-
import { DebuglevelNewResult } from './commands/debuglevel/new';
|
|
2
|
+
import type { SaveResult, ApexLog, TraceFlag, DebugLevel, DebugLevelCreate, GetLogsOptions } from './types.js';
|
|
5
3
|
export declare function createFile(path: string, contents: string): Promise<void>;
|
|
6
|
-
export declare function getUserId(connection: Connection, inputUser: string): Promise<string>;
|
|
7
|
-
export declare function getActiveTraceFlag(conn: Connection, userId: string): Promise<
|
|
8
|
-
export declare function getDebugLevels(conn: Connection): Promise<
|
|
9
|
-
export declare function createTraceFlag(conn: Connection, userId: string, debugLevelId: string, time: number): Promise<
|
|
10
|
-
export declare function createDebugLevel(conn: Connection, debugLevel:
|
|
11
|
-
export declare function getLogs(conn: Connection,
|
|
12
|
-
export declare function deleteLogs(conn: Connection, logs:
|
|
4
|
+
export declare function getUserId(connection: Connection, inputUser: string): Promise<string | undefined>;
|
|
5
|
+
export declare function getActiveTraceFlag(conn: Connection, userId: string): Promise<TraceFlag | undefined>;
|
|
6
|
+
export declare function getDebugLevels(conn: Connection): Promise<DebugLevel[]>;
|
|
7
|
+
export declare function createTraceFlag(conn: Connection, userId: string, debugLevelId: string, time: number): Promise<SaveResult>;
|
|
8
|
+
export declare function createDebugLevel(conn: Connection, debugLevel: DebugLevelCreate): Promise<SaveResult>;
|
|
9
|
+
export declare function getLogs(conn: Connection, options: GetLogsOptions): Promise<ApexLog[]>;
|
|
10
|
+
export declare function deleteLogs(conn: Connection, logs: ApexLog[]): Promise<void>;
|
package/lib/utils.js
CHANGED
|
@@ -1,18 +1,14 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
const
|
|
5
|
-
const
|
|
6
|
-
const fs_1 = require("fs");
|
|
7
|
-
const mkdirPromise = (0, util_1.promisify)(fs_1.mkdir);
|
|
8
|
-
const writeFilePromise = (0, util_1.promisify)(fs_1.writeFile);
|
|
1
|
+
import { dirname } from 'path';
|
|
2
|
+
import { promisify } from 'util';
|
|
3
|
+
import { writeFile, mkdir } from 'fs';
|
|
4
|
+
const mkdirPromise = promisify(mkdir);
|
|
5
|
+
const writeFilePromise = promisify(writeFile);
|
|
9
6
|
const MILLISECONDS_PER_MINUTE = 60000;
|
|
10
|
-
async function createFile(path, contents) {
|
|
11
|
-
await mkdirPromise(
|
|
7
|
+
export async function createFile(path, contents) {
|
|
8
|
+
await mkdirPromise(dirname(path), { recursive: true });
|
|
12
9
|
await writeFilePromise(path, contents);
|
|
13
10
|
}
|
|
14
|
-
|
|
15
|
-
async function getUserId(connection, inputUser) {
|
|
11
|
+
export async function getUserId(connection, inputUser) {
|
|
16
12
|
let result;
|
|
17
13
|
if (isValidEmail(inputUser)) {
|
|
18
14
|
result = await connection.tooling.sobject('User').findOne({ Username: inputUser });
|
|
@@ -27,10 +23,9 @@ async function getUserId(connection, inputUser) {
|
|
|
27
23
|
return result.Id;
|
|
28
24
|
}
|
|
29
25
|
else {
|
|
30
|
-
|
|
26
|
+
return undefined;
|
|
31
27
|
}
|
|
32
28
|
}
|
|
33
|
-
exports.getUserId = getUserId;
|
|
34
29
|
function isValidEmail(input) {
|
|
35
30
|
const emailRegex = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;
|
|
36
31
|
return emailRegex.test(input);
|
|
@@ -39,7 +34,7 @@ function isId(input) {
|
|
|
39
34
|
const idRegex = /[a-zA-Z0-9]{15}|[a-zA-Z0-9]{18}/;
|
|
40
35
|
return idRegex.test(input);
|
|
41
36
|
}
|
|
42
|
-
async function getActiveTraceFlag(conn, userId) {
|
|
37
|
+
export async function getActiveTraceFlag(conn, userId) {
|
|
43
38
|
const results = await conn.tooling.query(`SELECT Id, TracedEntityId, DebugLevelId, StartDate, ExpirationDate FROM TraceFlag WHERE TracedEntityId = '${userId}' AND ExpirationDate > ${new Date(Date.now()).toISOString()}`);
|
|
44
39
|
if (results?.records?.length > 0) {
|
|
45
40
|
return results.records[0];
|
|
@@ -48,8 +43,7 @@ async function getActiveTraceFlag(conn, userId) {
|
|
|
48
43
|
return undefined;
|
|
49
44
|
}
|
|
50
45
|
}
|
|
51
|
-
|
|
52
|
-
async function getDebugLevels(conn) {
|
|
46
|
+
export async function getDebugLevels(conn) {
|
|
53
47
|
const results = await conn.tooling.query('SELECT Id, DeveloperName, Workflow, Validation, Callout, ApexCode, ApexProfiling, Visualforce, System, Database, Wave, Nba FROM DebugLevel');
|
|
54
48
|
if (results?.records) {
|
|
55
49
|
return results.records;
|
|
@@ -58,8 +52,7 @@ async function getDebugLevels(conn) {
|
|
|
58
52
|
throw new Error('Error to retrieve Debug Levels');
|
|
59
53
|
}
|
|
60
54
|
}
|
|
61
|
-
|
|
62
|
-
async function createTraceFlag(conn, userId, debugLevelId, time) {
|
|
55
|
+
export async function createTraceFlag(conn, userId, debugLevelId, time) {
|
|
63
56
|
const result = await conn.tooling.sobject('TraceFlag').create({
|
|
64
57
|
TracedEntityId: userId,
|
|
65
58
|
DebugLevelId: debugLevelId,
|
|
@@ -72,47 +65,50 @@ async function createTraceFlag(conn, userId, debugLevelId, time) {
|
|
|
72
65
|
error: result.success ? undefined : result.errors[0].message,
|
|
73
66
|
};
|
|
74
67
|
}
|
|
75
|
-
|
|
76
|
-
async function createDebugLevel(conn, debugLevel) {
|
|
68
|
+
export async function createDebugLevel(conn, debugLevel) {
|
|
77
69
|
const result = await conn.tooling.sobject('DebugLevel').create(debugLevel);
|
|
78
70
|
return {
|
|
79
71
|
isSuccess: result.success,
|
|
80
72
|
error: result.success ? undefined : result.errors[0].message,
|
|
81
73
|
};
|
|
82
74
|
}
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
75
|
+
export async function getLogs(conn, options) {
|
|
76
|
+
const LOG_FIELDS = [
|
|
77
|
+
'Id',
|
|
78
|
+
'LogUser.Username',
|
|
79
|
+
'LogLength',
|
|
80
|
+
'Request',
|
|
81
|
+
'Operation',
|
|
82
|
+
'Application',
|
|
83
|
+
'Status',
|
|
84
|
+
'DurationMilliseconds',
|
|
85
|
+
'SystemModstamp',
|
|
86
|
+
'RequestIdentifier',
|
|
87
|
+
];
|
|
92
88
|
let queryString = `SELECT ${LOG_FIELDS.join(',')} FROM ApexLog`;
|
|
93
89
|
const whereConditions = [];
|
|
94
|
-
if (
|
|
95
|
-
|
|
90
|
+
if (options.timeLimit) {
|
|
91
|
+
const dateTime = new Date(Date.now());
|
|
92
|
+
dateTime.setMinutes(dateTime.getMinutes() - options.timeLimit);
|
|
93
|
+
const startTime = dateTime.toISOString();
|
|
94
|
+
if (startTime) {
|
|
95
|
+
whereConditions.push(`SystemModstamp > ${startTime}`);
|
|
96
|
+
}
|
|
96
97
|
}
|
|
97
|
-
if (
|
|
98
|
-
whereConditions.push(`LogUserId = '${userId}'`);
|
|
98
|
+
if (options.userId) {
|
|
99
|
+
whereConditions.push(`LogUserId = '${options.userId}'`);
|
|
99
100
|
}
|
|
100
101
|
if (whereConditions.length > 0) {
|
|
101
102
|
queryString += ` WHERE ${whereConditions.join(' AND ')}`;
|
|
102
103
|
}
|
|
103
104
|
queryString += ' ORDER BY SystemModstamp DESC';
|
|
104
105
|
const queryResult = await conn.query(queryString);
|
|
105
|
-
if (queryResult.records.length === 0) {
|
|
106
|
-
throw new Error('No debug logs found');
|
|
107
|
-
}
|
|
108
106
|
return queryResult.records;
|
|
109
107
|
}
|
|
110
|
-
|
|
111
|
-
async function deleteLogs(conn, logs) {
|
|
108
|
+
export async function deleteLogs(conn, logs) {
|
|
112
109
|
if (logs && logs.length > 0) {
|
|
113
110
|
const ids = logs.map((log) => log.Id).filter((id) => id !== undefined);
|
|
114
111
|
await conn.sobject('ApexLog').del(ids, { allowRecursive: true });
|
|
115
112
|
}
|
|
116
113
|
}
|
|
117
|
-
exports.deleteLogs = deleteLogs;
|
|
118
114
|
//# sourceMappingURL=utils.js.map
|
package/lib/utils.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../src/utils.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../src/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AAC/B,OAAO,EAAE,SAAS,EAAE,MAAM,MAAM,CAAC;AACjC,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,IAAI,CAAC;AAItC,MAAM,YAAY,GAAG,SAAS,CAAC,KAAK,CAAC,CAAC;AACtC,MAAM,gBAAgB,GAAG,SAAS,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