@simplysf/simply-apex 1.6.8 → 1.6.10
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/commands/simply/apex/execute.d.ts +2 -11
- package/lib/commands/simply/apex/execute.js +16 -19
- package/lib/commands/simply/apex/execute.js.map +1 -1
- package/lib/commands/simply/apex/logs/purge.d.ts +2 -14
- package/lib/commands/simply/apex/logs/purge.js +7 -81
- package/lib/commands/simply/apex/logs/purge.js.map +1 -1
- package/lib/commands/simply/apex/trace/setup.d.ts +2 -13
- package/lib/commands/simply/apex/trace/setup.js +47 -87
- package/lib/commands/simply/apex/trace/setup.js.map +1 -1
- package/lib/commands/simply/apex/trace/silence.d.ts +2 -6
- package/lib/commands/simply/apex/trace/silence.js +51 -143
- package/lib/commands/simply/apex/trace/silence.js.map +1 -1
- package/lib/common/apexExecute.d.ts +31 -0
- package/lib/common/apexExecute.js +60 -0
- package/lib/common/apexExecute.js.map +1 -0
- package/lib/common/apexLogsPurge.d.ts +34 -0
- package/lib/common/apexLogsPurge.js +100 -0
- package/lib/common/apexLogsPurge.js.map +1 -0
- package/lib/common/apexTraceSetup.d.ts +57 -0
- package/lib/common/apexTraceSetup.js +142 -0
- package/lib/common/apexTraceSetup.js.map +1 -0
- package/lib/common/apexTraceSilence.d.ts +65 -0
- package/lib/common/apexTraceSilence.js +171 -0
- package/lib/common/apexTraceSilence.js.map +1 -0
- package/lib/common/schemas/classesToSilence.js.map +1 -0
- package/package.json +3 -14
- package/lib/schemas/silence/classesToSilence.js.map +0 -1
- /package/lib/{schemas/silence → common/schemas}/classesToSilence.d.ts +0 -0
- /package/lib/{schemas/silence → common/schemas}/classesToSilence.js +0 -0
|
@@ -1,15 +1,6 @@
|
|
|
1
1
|
import { SfCommand } from '@salesforce/sf-plugins-core';
|
|
2
|
-
|
|
3
|
-
export type ApexExecuteResult
|
|
4
|
-
success: boolean;
|
|
5
|
-
compiled: boolean;
|
|
6
|
-
compileProblem: string;
|
|
7
|
-
exceptionMessage: string;
|
|
8
|
-
exceptionStackTrace: string;
|
|
9
|
-
line: number;
|
|
10
|
-
column: number;
|
|
11
|
-
logs?: string;
|
|
12
|
-
};
|
|
2
|
+
import { type ApexExecuteResult } from '../../../common/apexExecute.js';
|
|
3
|
+
export type { ApexExecuteResult } from '../../../common/apexExecute.js';
|
|
13
4
|
/**
|
|
14
5
|
* Executes an anonymous block of Apex code from a local .apex file against a target org and
|
|
15
6
|
* reports the compile and execution results, including any debug logs produced.
|
|
@@ -14,10 +14,10 @@
|
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
16
|
import path from 'node:path';
|
|
17
|
-
import { ExecuteService } from '@salesforce/apex-node';
|
|
18
17
|
import { Messages } from '@salesforce/core';
|
|
19
18
|
import { SfCommand, Flags } from '@salesforce/sf-plugins-core';
|
|
20
19
|
import { requireConnection, targetOrgFlags } from '@simplysf/simply-plugin-kit';
|
|
20
|
+
import { ApexExecuteError, executeApex } from '../../../common/apexExecute.js';
|
|
21
21
|
Messages.importMessagesDirectoryFromMetaUrl(import.meta.url);
|
|
22
22
|
const messages = Messages.loadMessages('@simplysf/simply-apex', 'simply.apex.execute');
|
|
23
23
|
/**
|
|
@@ -46,26 +46,23 @@ export default class ApexExecute extends SfCommand {
|
|
|
46
46
|
const { flags } = await this.parse(ApexExecute);
|
|
47
47
|
const targetOrgConnection = requireConnection(flags);
|
|
48
48
|
this.spinner.start(`Executing ${path.parse(flags.file).name}`);
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
const result = {
|
|
53
|
-
success: response.success,
|
|
54
|
-
compiled: response.compiled,
|
|
55
|
-
compileProblem: diagnostic?.compileProblem ?? '',
|
|
56
|
-
exceptionMessage: diagnostic?.exceptionMessage ?? '',
|
|
57
|
-
exceptionStackTrace: diagnostic?.exceptionStackTrace ?? '',
|
|
58
|
-
line: diagnostic?.lineNumber ?? -1,
|
|
59
|
-
column: diagnostic?.columnNumber ?? -1,
|
|
60
|
-
logs: response.logs,
|
|
61
|
-
};
|
|
62
|
-
if (!response.compiled) {
|
|
63
|
-
this.spinner.stop(messages.getMessage('info.failed'));
|
|
64
|
-
throw messages.createError('error.compileFailed', [result.line, result.column, result.compileProblem]);
|
|
49
|
+
let result;
|
|
50
|
+
try {
|
|
51
|
+
result = await executeApex(targetOrgConnection, flags.file);
|
|
65
52
|
}
|
|
66
|
-
|
|
53
|
+
catch (error) {
|
|
67
54
|
this.spinner.stop(messages.getMessage('info.failed'));
|
|
68
|
-
|
|
55
|
+
if (error instanceof ApexExecuteError) {
|
|
56
|
+
if (error.code === 'compile-failed') {
|
|
57
|
+
throw messages.createError('error.compileFailed', [
|
|
58
|
+
error.result.line,
|
|
59
|
+
error.result.column,
|
|
60
|
+
error.result.compileProblem,
|
|
61
|
+
]);
|
|
62
|
+
}
|
|
63
|
+
throw messages.createError('error.executeFailed', [error.result.exceptionMessage]);
|
|
64
|
+
}
|
|
65
|
+
throw error;
|
|
69
66
|
}
|
|
70
67
|
this.spinner.stop();
|
|
71
68
|
if (result.logs) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"execute.js","sourceRoot":"","sources":["../../../../src/commands/simply/apex/execute.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"execute.js","sourceRoot":"","sources":["../../../../src/commands/simply/apex/execute.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,6BAA6B,CAAC;AAC/D,OAAO,EAAE,iBAAiB,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAChF,OAAO,EAAE,gBAAgB,EAAE,WA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,CAAC,CAAC;QAC9D,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,UAAU,CAAC,aAAa,CAAC,CAAC,CAAC;YAEtD,IAAI,KAAK,YAAY,gBAAgB,EAAE,CAAC;gBACtC,IAAI,KAAK,CAAC,IAAI,KAAK,gBAAgB,EAAE,CAAC;oBACpC,MAAM,QAAQ,CAAC,WAAW,CAAC,qBAAqB,EAAE;wBAChD,KAAK,CAAC,MAAM,CAAC,IAAI;wBACjB,KAAK,CAAC,MAAM,CAAC,MAAM;wBACnB,KAAK,CAAC,MAAM,CAAC,cAAc;qBAC5B,CAAC,CAAC;gBACL,CAAC;gBACD,MAAM,QAAQ,CAAC,WAAW,CAAC,qBAAqB,EAAE,CAAC,KAAK,CAAC,MAAM,CAAC,gBAAgB,CAAC,CAAC,CAAC;YACrF,CAAC;YACD,MAAM,KAAK,CAAC;QACd,CAAC;QAED,IAAI,CAAC,OAAO,CAAC,IAAI,EAAE,CAAC;QAEpB,IAAI,MAAM,CAAC,IAAI,EAAE,CAAC;YAChB,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;QACxB,CAAC;QAED,OAAO,MAAM,CAAC;IAChB,CAAC"}
|
|
@@ -1,11 +1,7 @@
|
|
|
1
1
|
import { Duration } from '@salesforce/kit';
|
|
2
2
|
import { SfCommand } from '@salesforce/sf-plugins-core';
|
|
3
|
-
|
|
4
|
-
export type ApexLogsPurgeResult
|
|
5
|
-
Id: string;
|
|
6
|
-
Success: boolean;
|
|
7
|
-
Error?: string;
|
|
8
|
-
};
|
|
3
|
+
import { type ApexLogsPurgeResult } from '../../../../common/apexLogsPurge.js';
|
|
4
|
+
export type { ApexLogsPurgeResult } from '../../../../common/apexLogsPurge.js';
|
|
9
5
|
/**
|
|
10
6
|
* Deletes `ApexLog` records from the target org. By default all logs are purged; use `--where`
|
|
11
7
|
* to scope the deletion to a subset of logs.
|
|
@@ -27,12 +23,4 @@ export default class ApexLogsPurge extends SfCommand<ApexLogsPurgeResult[]> {
|
|
|
27
23
|
* filter.
|
|
28
24
|
*/
|
|
29
25
|
run(): Promise<ApexLogsPurgeResult[]>;
|
|
30
|
-
/**
|
|
31
|
-
* Deletes through the core connection's SObject Collections resource, 200 records per call.
|
|
32
|
-
*
|
|
33
|
-
* Deliberately not `.tooling`: `ApexLog` is exposed on both APIs, but only core REST implements
|
|
34
|
-
* the Collections resource a bulk delete needs. `/tooling/composite/sobjects` does not exist and
|
|
35
|
-
* answers 404 "The requested resource does not exist".
|
|
36
|
-
*/
|
|
37
|
-
private deleteViaCollections;
|
|
38
26
|
}
|
|
@@ -17,14 +17,9 @@ import { Messages } from '@salesforce/core';
|
|
|
17
17
|
import { Duration } from '@salesforce/kit';
|
|
18
18
|
import { SfCommand, Flags } from '@salesforce/sf-plugins-core';
|
|
19
19
|
import { requireConnection, targetOrgFlags } from '@simplysf/simply-plugin-kit';
|
|
20
|
-
import {
|
|
20
|
+
import { deleteApexLogsViaBulkApi, deleteApexLogsViaCollections, queryApexLogIdsViaBulkApi, queryApexLogIdsViaRest, } from '../../../../common/apexLogsPurge.js';
|
|
21
21
|
Messages.importMessagesDirectoryFromMetaUrl(import.meta.url);
|
|
22
22
|
const messages = Messages.loadMessages('@simplysf/simply-apex', 'simply.apex.logs.purge');
|
|
23
|
-
/**
|
|
24
|
-
* Maximum number of `ApexLog` records to delete per SObject Collections call, which is the API's
|
|
25
|
-
* own ceiling and matches jsforce's `MAX_DML_COUNT`.
|
|
26
|
-
*/
|
|
27
|
-
const CHUNK_SIZE = 200;
|
|
28
23
|
/**
|
|
29
24
|
* Deletes `ApexLog` records from the target org. By default all logs are purged; use `--where`
|
|
30
25
|
* to scope the deletion to a subset of logs.
|
|
@@ -70,8 +65,8 @@ export default class ApexLogsPurge extends SfCommand {
|
|
|
70
65
|
}
|
|
71
66
|
this.spinner.start(messages.getMessage('info.queryingLogs'));
|
|
72
67
|
const logIds = useBulkApi
|
|
73
|
-
? await
|
|
74
|
-
: await
|
|
68
|
+
? await queryApexLogIdsViaBulkApi(targetOrgConnection, query, pollTimeout)
|
|
69
|
+
: await queryApexLogIdsViaRest(targetOrgConnection, query);
|
|
75
70
|
this.spinner.stop();
|
|
76
71
|
if (logIds.length === 0) {
|
|
77
72
|
this.info(messages.getMessage('info.noLogsToPurge'));
|
|
@@ -79,8 +74,10 @@ export default class ApexLogsPurge extends SfCommand {
|
|
|
79
74
|
}
|
|
80
75
|
this.spinner.start(messages.getMessage('info.purgingLogs', [logIds.length]));
|
|
81
76
|
const results = useBulkApi
|
|
82
|
-
? await
|
|
83
|
-
: await
|
|
77
|
+
? await deleteApexLogsViaBulkApi(targetOrgConnection, logIds, pollTimeout)
|
|
78
|
+
: await deleteApexLogsViaCollections(targetOrgConnection, logIds, (purged, total) => {
|
|
79
|
+
this.spinner.status = `${purged}/${total}`;
|
|
80
|
+
});
|
|
84
81
|
this.spinner.stop();
|
|
85
82
|
const successCount = results.filter((result) => result.Success).length;
|
|
86
83
|
const failureCount = results.length - successCount;
|
|
@@ -100,76 +97,5 @@ export default class ApexLogsPurge extends SfCommand {
|
|
|
100
97
|
});
|
|
101
98
|
return results;
|
|
102
99
|
}
|
|
103
|
-
/**
|
|
104
|
-
* Deletes through the core connection's SObject Collections resource, 200 records per call.
|
|
105
|
-
*
|
|
106
|
-
* Deliberately not `.tooling`: `ApexLog` is exposed on both APIs, but only core REST implements
|
|
107
|
-
* the Collections resource a bulk delete needs. `/tooling/composite/sobjects` does not exist and
|
|
108
|
-
* answers 404 "The requested resource does not exist".
|
|
109
|
-
*/
|
|
110
|
-
async deleteViaCollections(connection, logIds) {
|
|
111
|
-
const results = [];
|
|
112
|
-
let purged = 0;
|
|
113
|
-
for (const idChunk of chunk(logIds, CHUNK_SIZE)) {
|
|
114
|
-
purged += idChunk.length;
|
|
115
|
-
this.spinner.status = `${purged}/${logIds.length}`;
|
|
116
|
-
// eslint-disable-next-line no-await-in-loop -- batches are sequential so the spinner tracks real progress
|
|
117
|
-
const deleteResults = await connection.delete('ApexLog', idChunk);
|
|
118
|
-
const deleteResultsArray = Array.isArray(deleteResults) ? deleteResults : [deleteResults];
|
|
119
|
-
deleteResultsArray.forEach((deleteResult, index) => {
|
|
120
|
-
results.push({
|
|
121
|
-
Id: deleteResult.id ?? idChunk[index] ?? 'unknown',
|
|
122
|
-
Success: deleteResult.success,
|
|
123
|
-
Error: deleteResult.success ? undefined : deleteResult.errors.map((e) => e.message).join(', '),
|
|
124
|
-
});
|
|
125
|
-
});
|
|
126
|
-
}
|
|
127
|
-
return results;
|
|
128
|
-
}
|
|
129
|
-
}
|
|
130
|
-
/** Collects matching log IDs through the Tooling API, which returns them in a single response. */
|
|
131
|
-
async function queryLogIdsViaRest(connection, query) {
|
|
132
|
-
const queryResult = await connection.tooling.query(query);
|
|
133
|
-
return queryResult.records.map((record) => record.Id);
|
|
134
|
-
}
|
|
135
|
-
/**
|
|
136
|
-
* Collects matching log IDs through a Bulk API v2 query job. The job streams CSV back, so the IDs
|
|
137
|
-
* are gathered from the record stream rather than a single response body.
|
|
138
|
-
*/
|
|
139
|
-
async function queryLogIdsViaBulkApi(connection, query, pollTimeout) {
|
|
140
|
-
const recordStream = await connection.bulk2.query(query, { pollTimeout });
|
|
141
|
-
const logIds = [];
|
|
142
|
-
for await (const record of recordStream) {
|
|
143
|
-
const { Id: id } = record;
|
|
144
|
-
if (id) {
|
|
145
|
-
logIds.push(id);
|
|
146
|
-
}
|
|
147
|
-
}
|
|
148
|
-
return logIds;
|
|
149
|
-
}
|
|
150
|
-
/**
|
|
151
|
-
* Deletes through a Bulk API v2 ingest job. The whole set goes up as one job rather than in
|
|
152
|
-
* 200-record chunks, and the org processes it asynchronously without spending REST request limit.
|
|
153
|
-
*/
|
|
154
|
-
async function deleteViaBulkApi(connection, logIds, pollTimeout) {
|
|
155
|
-
const { successfulResults, failedResults } = await connection.bulk2.loadAndWaitForResults({
|
|
156
|
-
object: 'ApexLog',
|
|
157
|
-
operation: 'delete',
|
|
158
|
-
input: logIds.map((Id) => ({ Id })),
|
|
159
|
-
pollTimeout,
|
|
160
|
-
});
|
|
161
|
-
return [
|
|
162
|
-
...successfulResults.map((result) => ({ Id: result.sf__Id, Success: true })),
|
|
163
|
-
...failedResults.map((result) => {
|
|
164
|
-
// A failed row reports an empty (not absent) `sf__Id`; the submitted `Id` column is echoed
|
|
165
|
-
// back alongside it, so prefer that to keep every failure traceable to a specific log.
|
|
166
|
-
const submittedId = result.Id;
|
|
167
|
-
return {
|
|
168
|
-
Id: result.sf__Id.length > 0 ? result.sf__Id : (submittedId ?? 'unknown'),
|
|
169
|
-
Success: false,
|
|
170
|
-
Error: result.sf__Error,
|
|
171
|
-
};
|
|
172
|
-
}),
|
|
173
|
-
];
|
|
174
100
|
}
|
|
175
101
|
//# sourceMappingURL=purge.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"purge.js","sourceRoot":"","sources":["../../../../../src/commands/simply/apex/logs/purge.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAC3C,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,6BAA6B,CAAC;AAC/D,OAAO,EAAE,iBAAiB,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAChF,OAAO,
|
|
1
|
+
{"version":3,"file":"purge.js","sourceRoot":"","sources":["../../../../../src/commands/simply/apex/logs/purge.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAC3C,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,6BAA6B,CAAC;AAC/D,OAA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4
|
-
field: string;
|
|
5
|
-
value: string;
|
|
6
|
-
};
|
|
7
|
-
/** IDs of the debug level and trace flag configured for the target user, and when it expires. */
|
|
8
|
-
export type ApexTraceSetupResult = {
|
|
9
|
-
userId: string;
|
|
10
|
-
debugLevelId: string;
|
|
11
|
-
traceFlagId: string;
|
|
12
|
-
expirationDate: string;
|
|
13
|
-
};
|
|
2
|
+
import { type ApexTraceSetupResult, type OnBehalfOf } from '../../../../common/apexTraceSetup.js';
|
|
3
|
+
export type { ApexTraceSetupResult } from '../../../../common/apexTraceSetup.js';
|
|
14
4
|
/**
|
|
15
5
|
* Creates or updates a DEVELOPER_LOG trace flag for the target user. The target user is the one
|
|
16
6
|
* running the command by default, or the user identified by `--on-behalf-of` if provided. By
|
|
@@ -37,4 +27,3 @@ export default class ApexTraceSetup extends SfCommand<ApexTraceSetupResult> {
|
|
|
37
27
|
*/
|
|
38
28
|
run(): Promise<ApexTraceSetupResult>;
|
|
39
29
|
}
|
|
40
|
-
export {};
|
|
@@ -16,20 +16,26 @@
|
|
|
16
16
|
import { Messages } from '@salesforce/core';
|
|
17
17
|
import { Flags, SfCommand } from '@salesforce/sf-plugins-core';
|
|
18
18
|
import { requireConnection, targetOrgFlags } from '@simplysf/simply-plugin-kit';
|
|
19
|
-
import {
|
|
19
|
+
import { ApexTraceSetupError, DATE_TIME_PATTERN, parseOnBehalfOf, setupApexTrace, } from '../../../../common/apexTraceSetup.js';
|
|
20
20
|
Messages.importMessagesDirectoryFromMetaUrl(import.meta.url);
|
|
21
21
|
const messages = Messages.loadMessages('@simplysf/simply-apex', 'simply.apex.trace.setup');
|
|
22
|
-
/**
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
22
|
+
/** Maps `ApexTraceSetupError`'s structural codes to this command's own `Messages` catalog. */
|
|
23
|
+
function toCliError(error) {
|
|
24
|
+
switch (error.code) {
|
|
25
|
+
case 'user-not-found':
|
|
26
|
+
return messages.createError('error.userNotFound', error.args);
|
|
27
|
+
case 'ambiguous-on-behalf-of':
|
|
28
|
+
return messages.createError('error.ambiguousOnBehalfOf', error.args);
|
|
29
|
+
case 'debug-level-not-found':
|
|
30
|
+
return messages.createError('error.debugLevelNotFound', error.args);
|
|
31
|
+
case 'debug-level-create-failed':
|
|
32
|
+
return messages.createError('error.debugLevelCreateFailed', error.args);
|
|
33
|
+
case 'trace-flag-create-failed':
|
|
34
|
+
return messages.createError('error.traceFlagCreateFailed', error.args);
|
|
35
|
+
case 'invalid-date-range':
|
|
36
|
+
return messages.createError('error.invalidDateRange', error.args);
|
|
37
|
+
}
|
|
38
|
+
}
|
|
33
39
|
/**
|
|
34
40
|
* Creates or updates a DEVELOPER_LOG trace flag for the target user. The target user is the one
|
|
35
41
|
* running the command by default, or the user identified by `--on-behalf-of` if provided. By
|
|
@@ -47,12 +53,11 @@ export default class ApexTraceSetup extends SfCommand {
|
|
|
47
53
|
'on-behalf-of': Flags.custom({
|
|
48
54
|
// eslint-disable-next-line @typescript-eslint/require-await
|
|
49
55
|
parse: async (input) => {
|
|
50
|
-
const
|
|
51
|
-
if (!
|
|
56
|
+
const onBehalfOf = parseOnBehalfOf(input);
|
|
57
|
+
if (!onBehalfOf) {
|
|
52
58
|
throw messages.createError('error.invalidOnBehalfOf', [input]);
|
|
53
59
|
}
|
|
54
|
-
|
|
55
|
-
return { field, value };
|
|
60
|
+
return onBehalfOf;
|
|
56
61
|
},
|
|
57
62
|
})({
|
|
58
63
|
summary: messages.getMessage('flags.on-behalf-of.summary'),
|
|
@@ -92,81 +97,36 @@ export default class ApexTraceSetup extends SfCommand {
|
|
|
92
97
|
async run() {
|
|
93
98
|
const { flags } = await this.parse(ApexTraceSetup);
|
|
94
99
|
const targetOrgConnection = requireConnection(flags);
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
}
|
|
117
|
-
else if (requestedLogLevel) {
|
|
118
|
-
throw messages.createError('error.debugLevelNotFound', [debugLevelName]);
|
|
119
|
-
}
|
|
120
|
-
else {
|
|
121
|
-
const createResult = await targetOrgConnection.tooling.sobject('DebugLevel').create({
|
|
122
|
-
DeveloperName: DEBUG_LEVEL_NAME,
|
|
123
|
-
MasterLabel: DEBUG_LEVEL_NAME,
|
|
124
|
-
ApexCode: 'FINEST',
|
|
125
|
-
Visualforce: 'FINER',
|
|
126
|
-
});
|
|
127
|
-
if (!createResult.success) {
|
|
128
|
-
throw messages.createError('error.debugLevelCreateFailed', [
|
|
129
|
-
createResult.errors.map((e) => e.message).join(', '),
|
|
130
|
-
]);
|
|
131
|
-
}
|
|
132
|
-
debugLevelId = createResult.id;
|
|
133
|
-
}
|
|
134
|
-
this.spinner.stop();
|
|
135
|
-
this.spinner.start(messages.getMessage('info.configuringTraceFlag'));
|
|
136
|
-
const traceFlagResult = await targetOrgConnection.tooling.query(`SELECT Id FROM TraceFlag WHERE LogType = 'DEVELOPER_LOG' AND TracedEntityId = '${userId}'`);
|
|
137
|
-
const startDate = flags['start-date'] ?? new Date().toISOString();
|
|
138
|
-
const expirationDate = flags['end-date'] ?? new Date(new Date(startDate).getTime() + TRACE_DURATION_MS).toISOString();
|
|
139
|
-
if (new Date(expirationDate).getTime() <= new Date(startDate).getTime()) {
|
|
140
|
-
throw messages.createError('error.invalidDateRange', [expirationDate, startDate]);
|
|
141
|
-
}
|
|
142
|
-
let traceFlagId;
|
|
143
|
-
if (traceFlagResult.records.length > 0) {
|
|
144
|
-
traceFlagId = traceFlagResult.records[0].Id;
|
|
145
|
-
await targetOrgConnection.tooling.sobject('TraceFlag').update({
|
|
146
|
-
Id: traceFlagId,
|
|
147
|
-
DebugLevelId: debugLevelId,
|
|
148
|
-
StartDate: startDate,
|
|
149
|
-
ExpirationDate: expirationDate,
|
|
100
|
+
let result;
|
|
101
|
+
try {
|
|
102
|
+
result = await setupApexTrace(targetOrgConnection, {
|
|
103
|
+
onBehalfOf: flags['on-behalf-of'],
|
|
104
|
+
logLevel: flags['log-level'],
|
|
105
|
+
startDate: flags['start-date'],
|
|
106
|
+
endDate: flags['end-date'],
|
|
107
|
+
}, (phase) => {
|
|
108
|
+
switch (phase) {
|
|
109
|
+
case 'finding-user':
|
|
110
|
+
this.spinner.start(messages.getMessage('info.findingUser'));
|
|
111
|
+
break;
|
|
112
|
+
case 'checking-debug-level':
|
|
113
|
+
this.spinner.stop();
|
|
114
|
+
this.spinner.start(messages.getMessage('info.checkingDebugLevel'));
|
|
115
|
+
break;
|
|
116
|
+
case 'configuring-trace-flag':
|
|
117
|
+
this.spinner.stop();
|
|
118
|
+
this.spinner.start(messages.getMessage('info.configuringTraceFlag'));
|
|
119
|
+
break;
|
|
120
|
+
}
|
|
150
121
|
});
|
|
151
122
|
}
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
LogType: 'DEVELOPER_LOG',
|
|
156
|
-
DebugLevelId: debugLevelId,
|
|
157
|
-
StartDate: startDate,
|
|
158
|
-
ExpirationDate: expirationDate,
|
|
159
|
-
});
|
|
160
|
-
if (!createResult.success) {
|
|
161
|
-
throw messages.createError('error.traceFlagCreateFailed', [
|
|
162
|
-
createResult.errors.map((e) => e.message).join(', '),
|
|
163
|
-
]);
|
|
164
|
-
}
|
|
165
|
-
traceFlagId = createResult.id;
|
|
123
|
+
catch (error) {
|
|
124
|
+
this.spinner.stop();
|
|
125
|
+
throw error instanceof ApexTraceSetupError ? toCliError(error) : error;
|
|
166
126
|
}
|
|
167
127
|
this.spinner.stop();
|
|
168
|
-
this.info(messages.getMessage('info.complete', [expirationDate]));
|
|
169
|
-
return
|
|
128
|
+
this.info(messages.getMessage('info.complete', [result.expirationDate]));
|
|
129
|
+
return result;
|
|
170
130
|
}
|
|
171
131
|
}
|
|
172
132
|
//# sourceMappingURL=setup.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"setup.js","sourceRoot":"","sources":["../../../../../src/commands/simply/apex/trace/setup.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,6BAA6B,CAAC;AAC/D,OAAO,EAAE,iBAAiB,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAChF,OAAO,
|
|
1
|
+
{"version":3,"file":"setup.js","sourceRoot":"","sources":["../../../../../src/commands/simply/apex/trace/setup.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,6BAA6B,CAAC;AAC/D,OAAO,EAAE,iBAAiB,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAChF,OAAO,EACL,mBAAmB,EACnB,iBAAiB,EACjB,eAAe,EACf,cAAc,GAGf,MAAM,sCAAsC,CAAC;AAE9C,QAAQ,CAAC,kCAAkC,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAC7D,MAAM,QAAQ,GAAG,QAAQ,CAAC,YAAY,CAAC,uBAAuB,EAAE,yBAAyB,CAAC,CAAC;AAI3F,8FAA8F;AAC9F,SAAS,UAAU,CAAC,KAA0B;IAC5C,QAAQ,KAAK,CAAC,IAAI,EAAE,CAAC;QACnB,KAAK,gBAAgB;YACnB,OAAO,QAAQ,CAAC,WAAW,CAAC,oBAAoB,EAAE,KAAK,CAAC,IAAI,CAAC,CAAC;QAChE,KAAK,wBAAwB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AC,OAAO,CAAC,IAAI,EAAE,CAAC;QAEpB,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,UAAU,CAAC,eAAe,EAAE,CAAC,MAAM,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC;QAEzE,OAAO,MAAM,CAAC;IAChB,CAAC"}
|
|
@@ -1,10 +1,6 @@
|
|
|
1
1
|
import { SfCommand } from '@salesforce/sf-plugins-core';
|
|
2
|
-
|
|
3
|
-
export type ApexTraceSilenceResult
|
|
4
|
-
class: string;
|
|
5
|
-
classId: string;
|
|
6
|
-
traceFlagId: string;
|
|
7
|
-
};
|
|
2
|
+
import { type ApexTraceSilenceResult } from '../../../../common/apexTraceSilence.js';
|
|
3
|
+
export type { ApexTraceSilenceResult } from '../../../../common/apexTraceSilence.js';
|
|
8
4
|
/**
|
|
9
5
|
* Creates or updates a 24-hour CLASS_TRACING trace flag with a fully suppressed (NONE) debug
|
|
10
6
|
* level for each specified Apex class, preventing those classes from generating debug log
|