@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
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2026, Clay Chipps.
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
import { escapeSoqlLiteral } from '@simplysf/simply-core';
|
|
17
|
+
/** DeveloperName used for the FINEST/FINER debug level created for the Apex Replay Debugger. */
|
|
18
|
+
const DEBUG_LEVEL_NAME = 'ReplayDebuggerLevels';
|
|
19
|
+
/** How long a configured trace flag stays active before expiring, in milliseconds (24 hours). */
|
|
20
|
+
const TRACE_DURATION_MS = 24 * 60 * 60 * 1000;
|
|
21
|
+
/** Matches the ISO 8601 date-time format `--start-date`/`--end-date` require. */
|
|
22
|
+
export const DATE_TIME_PATTERN = /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\.\d+)?Z$/;
|
|
23
|
+
/**
|
|
24
|
+
* Matches `Field:Value` for `--on-behalf-of`. The field name is restricted to safe SOQL identifier
|
|
25
|
+
* characters since, unlike the value, it can't be quoted/escaped in the query.
|
|
26
|
+
*/
|
|
27
|
+
export const ON_BEHALF_OF_PATTERN = /^([A-Za-z_][A-Za-z0-9_]*):(.+)$/;
|
|
28
|
+
/** @returns `input` parsed as a `Field:Value` pair, or `undefined` if it doesn't match `ON_BEHALF_OF_PATTERN`. */
|
|
29
|
+
export function parseOnBehalfOf(input) {
|
|
30
|
+
const match = ON_BEHALF_OF_PATTERN.exec(input);
|
|
31
|
+
if (!match) {
|
|
32
|
+
return undefined;
|
|
33
|
+
}
|
|
34
|
+
const [, field, value] = match;
|
|
35
|
+
return { field, value };
|
|
36
|
+
}
|
|
37
|
+
export class ApexTraceSetupError extends Error {
|
|
38
|
+
code;
|
|
39
|
+
/** The raw values a `Messages`-based caller needs to reproduce its own error text (e.g. `[userIdentifier]`, `[expirationDate, startDate]`) — not necessarily the same as `message`, which is this error's own human-readable text. */
|
|
40
|
+
args;
|
|
41
|
+
constructor(code, message, args = [message]) {
|
|
42
|
+
super(message);
|
|
43
|
+
this.name = 'ApexTraceSetupError';
|
|
44
|
+
this.code = code;
|
|
45
|
+
this.args = args;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
/** @returns The Id of the single user matching `onBehalfOf` (or `connection`'s own username if `onBehalfOf` is absent). @throws {ApexTraceSetupError} `user-not-found`/`ambiguous-on-behalf-of`. */
|
|
49
|
+
async function findTraceTargetUserId(connection, onBehalfOf) {
|
|
50
|
+
const userFilterField = onBehalfOf?.field ?? 'Username';
|
|
51
|
+
const userFilterValue = onBehalfOf?.value ?? connection.getUsername() ?? '';
|
|
52
|
+
const userIdentifier = onBehalfOf ? `${onBehalfOf.field}:${onBehalfOf.value}` : userFilterValue;
|
|
53
|
+
const userQueryResult = await connection.query(`SELECT Id FROM User WHERE ${userFilterField} = '${escapeSoqlLiteral(userFilterValue)}' LIMIT 2`);
|
|
54
|
+
if (userQueryResult.records.length === 0) {
|
|
55
|
+
throw new ApexTraceSetupError('user-not-found', `No user found matching "${userIdentifier}".`, [userIdentifier]);
|
|
56
|
+
}
|
|
57
|
+
if (userQueryResult.records.length > 1) {
|
|
58
|
+
throw new ApexTraceSetupError('ambiguous-on-behalf-of', `More than one user matches "${userIdentifier}".`, [
|
|
59
|
+
userIdentifier,
|
|
60
|
+
]);
|
|
61
|
+
}
|
|
62
|
+
return userQueryResult.records[0].Id;
|
|
63
|
+
}
|
|
64
|
+
/** @returns The Id of `requestedLogLevel` if given (must already exist), or the shared `ReplayDebuggerLevels` debug level's Id (created if absent). @throws {ApexTraceSetupError} `debug-level-not-found`/`debug-level-create-failed`. */
|
|
65
|
+
async function findOrCreateDebugLevel(connection, requestedLogLevel) {
|
|
66
|
+
const debugLevelName = requestedLogLevel ?? DEBUG_LEVEL_NAME;
|
|
67
|
+
const debugLevelResult = await connection.tooling.query(`SELECT Id FROM DebugLevel WHERE DeveloperName = '${debugLevelName}'`);
|
|
68
|
+
if (debugLevelResult.records.length > 0) {
|
|
69
|
+
return debugLevelResult.records[0].Id;
|
|
70
|
+
}
|
|
71
|
+
if (requestedLogLevel) {
|
|
72
|
+
throw new ApexTraceSetupError('debug-level-not-found', `No DebugLevel named "${debugLevelName}" was found.`, [
|
|
73
|
+
debugLevelName,
|
|
74
|
+
]);
|
|
75
|
+
}
|
|
76
|
+
const createResult = await connection.tooling.sobject('DebugLevel').create({
|
|
77
|
+
DeveloperName: DEBUG_LEVEL_NAME,
|
|
78
|
+
MasterLabel: DEBUG_LEVEL_NAME,
|
|
79
|
+
ApexCode: 'FINEST',
|
|
80
|
+
Visualforce: 'FINER',
|
|
81
|
+
});
|
|
82
|
+
if (!createResult.success) {
|
|
83
|
+
throw new ApexTraceSetupError('debug-level-create-failed', createResult.errors.map((e) => e.message).join(', '));
|
|
84
|
+
}
|
|
85
|
+
return createResult.id;
|
|
86
|
+
}
|
|
87
|
+
/** @returns The Id and expiration date of the DEVELOPER_LOG trace flag created/updated for `userId`. @throws {ApexTraceSetupError} `invalid-date-range`/`trace-flag-create-failed`. */
|
|
88
|
+
async function findOrUpdateTraceFlag(connection, userId, debugLevelId, options) {
|
|
89
|
+
const traceFlagResult = await connection.tooling.query(`SELECT Id FROM TraceFlag WHERE LogType = 'DEVELOPER_LOG' AND TracedEntityId = '${userId}'`);
|
|
90
|
+
const startDate = options.startDate ?? new Date().toISOString();
|
|
91
|
+
const expirationDate = options.endDate ?? new Date(new Date(startDate).getTime() + TRACE_DURATION_MS).toISOString();
|
|
92
|
+
if (new Date(expirationDate).getTime() <= new Date(startDate).getTime()) {
|
|
93
|
+
throw new ApexTraceSetupError('invalid-date-range', `The end date (${expirationDate}) must be after the start date (${startDate}).`, [expirationDate, startDate]);
|
|
94
|
+
}
|
|
95
|
+
if (traceFlagResult.records.length > 0) {
|
|
96
|
+
const traceFlagId = traceFlagResult.records[0].Id;
|
|
97
|
+
await connection.tooling.sobject('TraceFlag').update({
|
|
98
|
+
Id: traceFlagId,
|
|
99
|
+
DebugLevelId: debugLevelId,
|
|
100
|
+
StartDate: startDate,
|
|
101
|
+
ExpirationDate: expirationDate,
|
|
102
|
+
});
|
|
103
|
+
return { traceFlagId, expirationDate };
|
|
104
|
+
}
|
|
105
|
+
const createResult = await connection.tooling.sobject('TraceFlag').create({
|
|
106
|
+
TracedEntityId: userId,
|
|
107
|
+
LogType: 'DEVELOPER_LOG',
|
|
108
|
+
DebugLevelId: debugLevelId,
|
|
109
|
+
StartDate: startDate,
|
|
110
|
+
ExpirationDate: expirationDate,
|
|
111
|
+
});
|
|
112
|
+
if (!createResult.success) {
|
|
113
|
+
throw new ApexTraceSetupError('trace-flag-create-failed', createResult.errors.map((e) => e.message).join(', '));
|
|
114
|
+
}
|
|
115
|
+
return { traceFlagId: createResult.id, expirationDate };
|
|
116
|
+
}
|
|
117
|
+
/**
|
|
118
|
+
* Creates or updates a DEVELOPER_LOG trace flag for a target user. The target user is the one
|
|
119
|
+
* `connection` authenticates as by default, or the user identified by `options.onBehalfOf` if
|
|
120
|
+
* given. By default the trace flag uses the FINEST/FINER `ReplayDebuggerLevels` debug level
|
|
121
|
+
* suitable for the Apex Replay Debugger and runs for 24 hours starting now;
|
|
122
|
+
* `options.logLevel`/`startDate`/`endDate` override those defaults.
|
|
123
|
+
*
|
|
124
|
+
* @param connection - The org connection to configure the trace flag in.
|
|
125
|
+
* @param options - See `ApexTraceSetupOptions`.
|
|
126
|
+
* @param onPhase - Called as each of the three phases (finding the user, checking the debug
|
|
127
|
+
* level, configuring the trace flag) starts — a caller (the CLI) can use this to update a
|
|
128
|
+
* spinner. Optional; has no effect on the operation itself.
|
|
129
|
+
* @returns The IDs of the debug level and trace flag that were created or updated, and the trace
|
|
130
|
+
* flag's new expiration date.
|
|
131
|
+
* @throws {ApexTraceSetupError} See `ApexTraceSetupErrorCode`.
|
|
132
|
+
*/
|
|
133
|
+
export async function setupApexTrace(connection, options = {}, onPhase) {
|
|
134
|
+
onPhase?.('finding-user');
|
|
135
|
+
const userId = await findTraceTargetUserId(connection, options.onBehalfOf);
|
|
136
|
+
onPhase?.('checking-debug-level');
|
|
137
|
+
const debugLevelId = await findOrCreateDebugLevel(connection, options.logLevel);
|
|
138
|
+
onPhase?.('configuring-trace-flag');
|
|
139
|
+
const { traceFlagId, expirationDate } = await findOrUpdateTraceFlag(connection, userId, debugLevelId, options);
|
|
140
|
+
return { userId, debugLevelId, traceFlagId, expirationDate };
|
|
141
|
+
}
|
|
142
|
+
//# sourceMappingURL=apexTraceSetup.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"apexTraceSetup.js","sourceRoot":"","sources":["../../src/common/apexTraceSetup.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAGH,OAAO,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAE1D,gGAAgG;AAChG,MAAM,gBAAgB,GAAG,sBAAsB,CAAC;AAChD,iGAAiG;AACjG,MAAM,iBAAiB,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,IAAI,CAAC;AAC9C,iFAAiF;AACjF,MAAM,CAAC,MAAM,iBAAiB,GAAG,gDAAgD,CAAC;AAClF;;;GAGG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG,iCAAiC,CAAC;AAKtE,kHAAkH;AAClH,MAAM,UAAU,eAAe,CAAC,KAAa;IAC3C,MAAM,KAAK,GAAG,oBAAoB,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IAC/C,IAAI,CAAC,KAAK,EAAE,CAAC;QACX,OAAO,SAAS,CAAC;IACnB,CAAC;IACD,MAAM,CAAC,EAAE,KAAK,EAAE,KAAK,CAAC,GAAG,KAAK,CAAC;IAC/B,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE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,MAAM,IAAI,mBAAmB,CAAC,0BAA0B,EAAE,YAAY,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;IAClH,CAAC;IAED,OAAO,EAAE,WAAW,EAAE,YAAY,CAAC,EAAE,EAAE,cAAc,EAAE,CAAC;AAC1D,CAAC;AAED;;;;;;;;;;;;;;;GAeG;AACH,MAAM,CAAC,KAAK,UAAU,cAAc,CAClC,UAAsB,EACtB,UAAiC,EAAE,EACnC,OAA6F;IAE7F,OAAO,EAAE,CAAC,cAAc,CAAC,CAAC;IAC1B,MAAM,MAAM,GAAG,MAAM,qBAAqB,CAAC,UAAU,EAAE,OAAO,CAAC,UAAU,CAAC,CAAC;IAE3E,OAAO,EAAE,CAAC,sBAAsB,CAAC,CAAC;IAClC,MAAM,YAAY,GAAG,MAAM,sBAAsB,CAAC,UAAU,EAAE,OAAO,CAAC,QAAQ,CAAC,CAAC;IAEhF,OAAO,EAAE,CAAC,wBAAwB,CAAC,CAAC;IACpC,MAAM,EAAE,WAAW,EAAE,cAAc,EAAE,GAAG,MAAM,qBAAqB,CAAC,UAAU,EAAE,MAAM,EAAE,YAAY,EAAE,OAAO,CAAC,CAAC;IAE/G,OAAO,EAAE,MAAM,EAAE,YAAY,EAAE,WAAW,EAAE,cAAc,EAAE,CAAC;AAC/D,CAAC"}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import type { Connection } from '@salesforce/core';
|
|
2
|
+
/** Classes silenced by the `fflib` preset. */
|
|
3
|
+
export declare const FFLIB_CLASSES: string[];
|
|
4
|
+
/** Classes silenced by the `at4dx` preset. */
|
|
5
|
+
export declare const AT4DX_CLASSES: string[];
|
|
6
|
+
/** Classes silenced by the `forceDi` preset. */
|
|
7
|
+
export declare const FORCE_DI_CLASSES: string[];
|
|
8
|
+
/** The trace flag created to silence debug logs for a single Apex class. */
|
|
9
|
+
export type ApexTraceSilenceResult = {
|
|
10
|
+
class: string;
|
|
11
|
+
classId: string;
|
|
12
|
+
traceFlagId: string;
|
|
13
|
+
};
|
|
14
|
+
/** Everything `silenceApexClasses` found out along the way, beyond the classes it actually silenced — for a CLI (or other) caller to report however it likes. */
|
|
15
|
+
export type ApexTraceSilenceOutcome = {
|
|
16
|
+
results: ApexTraceSilenceResult[];
|
|
17
|
+
/** Requested class names that don't exist as an `ApexClass` in the org. */
|
|
18
|
+
missingClassNames: string[];
|
|
19
|
+
/** A class that was found but whose trace flag couldn't be created/updated, with the API's error text and which of the two operations was attempted. */
|
|
20
|
+
failures: Array<{
|
|
21
|
+
class: string;
|
|
22
|
+
action: 'create' | 'update';
|
|
23
|
+
error: string;
|
|
24
|
+
}>;
|
|
25
|
+
};
|
|
26
|
+
/** The error conditions `resolveClasses`/`silenceApexClasses` signal structurally (via `code`) rather than by message text, so a `Messages`-based caller (the CLI) can map each one to its own error key without string-matching. */
|
|
27
|
+
export type ApexTraceSilenceErrorCode = 'invalid-classes-file' | 'no-classes-specified' | 'debug-level-create-failed';
|
|
28
|
+
export declare class ApexTraceSilenceError extends Error {
|
|
29
|
+
readonly code: ApexTraceSilenceErrorCode;
|
|
30
|
+
constructor(code: ApexTraceSilenceErrorCode, message: string);
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Resolve the list of Apex class names to silence from an explicit list, a classes-file path (a
|
|
34
|
+
* JSON config matching {@link ClassesToSilenceSchema}), and the `fflib`/`at4dx`/`forceDi` built-in
|
|
35
|
+
* presets. All sources are combined and deduplicated.
|
|
36
|
+
*
|
|
37
|
+
* @param classNames - Explicit class names (e.g. from a `--classes` flag already split on commas).
|
|
38
|
+
* @param classesFilePath - Path to a JSON config file, if one was given.
|
|
39
|
+
* @param presets - Which of the built-in class presets were requested.
|
|
40
|
+
* @returns The resolved, trimmed, deduplicated list of Apex class names.
|
|
41
|
+
* @throws {ApexTraceSilenceError} `invalid-classes-file` if `classesFilePath` was given but fails
|
|
42
|
+
* schema validation.
|
|
43
|
+
*/
|
|
44
|
+
export declare function resolveClasses(classNames: string[], classesFilePath: string | undefined, presets: {
|
|
45
|
+
fflib: boolean;
|
|
46
|
+
at4dx: boolean;
|
|
47
|
+
forceDi: boolean;
|
|
48
|
+
}): string[];
|
|
49
|
+
/**
|
|
50
|
+
* Creates or updates a 24-hour CLASS_TRACING trace flag with a fully suppressed (NONE) debug level
|
|
51
|
+
* for each of `classNames`, preventing those classes from generating debug log output. A class
|
|
52
|
+
* that already has a trace flag has its expiration extended instead of getting a duplicate.
|
|
53
|
+
*
|
|
54
|
+
* @param connection - The org connection to silence classes in.
|
|
55
|
+
* @param classNames - The Apex class names to silence — see `resolveClasses`.
|
|
56
|
+
* @param onPhase - Called as each of the three phases (checking the debug level, finding the
|
|
57
|
+
* classes, writing trace flags) starts — a caller (the CLI) can use this to update a spinner.
|
|
58
|
+
* Optional; has no effect on the operation itself.
|
|
59
|
+
* @returns The trace flag created/updated per successfully-silenced class, plus any class names
|
|
60
|
+
* that don't exist in the org and any per-class create/update failures.
|
|
61
|
+
* @throws {ApexTraceSilenceError} `no-classes-specified` if `classNames` is empty,
|
|
62
|
+
* `debug-level-create-failed` if the shared `Silence` debug level doesn't exist yet and couldn't be
|
|
63
|
+
* created.
|
|
64
|
+
*/
|
|
65
|
+
export declare function silenceApexClasses(connection: Connection, classNames: string[], onPhase?: (phase: 'checking-debug-level' | 'finding-classes' | 'creating-trace-flags') => void): Promise<ApexTraceSilenceOutcome>;
|
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2026, Clay Chipps.
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
import { loadJsonConfigSync } from '@simplysf/simply-core';
|
|
17
|
+
import { ClassesToSilenceSchema } from './schemas/classesToSilence.js';
|
|
18
|
+
/** DeveloperName used for the fully-suppressed (NONE) debug level created for class silencing. */
|
|
19
|
+
const DEBUG_LEVEL_NAME = 'Silence';
|
|
20
|
+
/** How long a configured trace flag stays active before expiring, in milliseconds (24 hours). */
|
|
21
|
+
const TRACE_DURATION_MS = 24 * 60 * 60 * 1000;
|
|
22
|
+
/** Classes silenced by the `fflib` preset. */
|
|
23
|
+
export const FFLIB_CLASSES = ['fflib_SObjectDescribe', 'fflib_SObjectDomain'];
|
|
24
|
+
/** Classes silenced by the `at4dx` preset. */
|
|
25
|
+
export const AT4DX_CLASSES = ['ApplicationSObjectDomain'];
|
|
26
|
+
/** Classes silenced by the `forceDi` preset. */
|
|
27
|
+
export const FORCE_DI_CLASSES = ['di_Binding', 'di_Module', 'di_PlatformCache', 'di_Injector'];
|
|
28
|
+
export class ApexTraceSilenceError extends Error {
|
|
29
|
+
code;
|
|
30
|
+
constructor(code, message) {
|
|
31
|
+
super(message);
|
|
32
|
+
this.name = 'ApexTraceSilenceError';
|
|
33
|
+
this.code = code;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Resolve the list of Apex class names to silence from an explicit list, a classes-file path (a
|
|
38
|
+
* JSON config matching {@link ClassesToSilenceSchema}), and the `fflib`/`at4dx`/`forceDi` built-in
|
|
39
|
+
* presets. All sources are combined and deduplicated.
|
|
40
|
+
*
|
|
41
|
+
* @param classNames - Explicit class names (e.g. from a `--classes` flag already split on commas).
|
|
42
|
+
* @param classesFilePath - Path to a JSON config file, if one was given.
|
|
43
|
+
* @param presets - Which of the built-in class presets were requested.
|
|
44
|
+
* @returns The resolved, trimmed, deduplicated list of Apex class names.
|
|
45
|
+
* @throws {ApexTraceSilenceError} `invalid-classes-file` if `classesFilePath` was given but fails
|
|
46
|
+
* schema validation.
|
|
47
|
+
*/
|
|
48
|
+
export function resolveClasses(classNames, classesFilePath, presets) {
|
|
49
|
+
const classes = [...classNames];
|
|
50
|
+
if (classesFilePath) {
|
|
51
|
+
const parsed = loadJsonConfigSync(classesFilePath, ClassesToSilenceSchema);
|
|
52
|
+
if (!parsed.success) {
|
|
53
|
+
throw new ApexTraceSilenceError('invalid-classes-file', parsed.message);
|
|
54
|
+
}
|
|
55
|
+
classes.push(...parsed.data.classes);
|
|
56
|
+
}
|
|
57
|
+
if (presets.fflib) {
|
|
58
|
+
classes.push(...FFLIB_CLASSES);
|
|
59
|
+
}
|
|
60
|
+
if (presets.at4dx) {
|
|
61
|
+
classes.push(...AT4DX_CLASSES);
|
|
62
|
+
}
|
|
63
|
+
if (presets.forceDi) {
|
|
64
|
+
classes.push(...FORCE_DI_CLASSES);
|
|
65
|
+
}
|
|
66
|
+
return [...new Set(classes)];
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* Creates or updates a 24-hour CLASS_TRACING trace flag with a fully suppressed (NONE) debug level
|
|
70
|
+
* for each of `classNames`, preventing those classes from generating debug log output. A class
|
|
71
|
+
* that already has a trace flag has its expiration extended instead of getting a duplicate.
|
|
72
|
+
*
|
|
73
|
+
* @param connection - The org connection to silence classes in.
|
|
74
|
+
* @param classNames - The Apex class names to silence — see `resolveClasses`.
|
|
75
|
+
* @param onPhase - Called as each of the three phases (checking the debug level, finding the
|
|
76
|
+
* classes, writing trace flags) starts — a caller (the CLI) can use this to update a spinner.
|
|
77
|
+
* Optional; has no effect on the operation itself.
|
|
78
|
+
* @returns The trace flag created/updated per successfully-silenced class, plus any class names
|
|
79
|
+
* that don't exist in the org and any per-class create/update failures.
|
|
80
|
+
* @throws {ApexTraceSilenceError} `no-classes-specified` if `classNames` is empty,
|
|
81
|
+
* `debug-level-create-failed` if the shared `Silence` debug level doesn't exist yet and couldn't be
|
|
82
|
+
* created.
|
|
83
|
+
*/
|
|
84
|
+
export async function silenceApexClasses(connection, classNames, onPhase) {
|
|
85
|
+
if (classNames.length === 0) {
|
|
86
|
+
throw new ApexTraceSilenceError('no-classes-specified', 'No Apex classes were specified to silence.');
|
|
87
|
+
}
|
|
88
|
+
onPhase?.('checking-debug-level');
|
|
89
|
+
const debugLevelResult = await connection.tooling.query(`SELECT Id FROM DebugLevel WHERE DeveloperName = '${DEBUG_LEVEL_NAME}'`);
|
|
90
|
+
let debugLevelId;
|
|
91
|
+
if (debugLevelResult.records.length > 0) {
|
|
92
|
+
debugLevelId = debugLevelResult.records[0].Id;
|
|
93
|
+
}
|
|
94
|
+
else {
|
|
95
|
+
const createResult = await connection.tooling.sobject('DebugLevel').create({
|
|
96
|
+
DeveloperName: DEBUG_LEVEL_NAME,
|
|
97
|
+
MasterLabel: DEBUG_LEVEL_NAME,
|
|
98
|
+
ApexCode: 'NONE',
|
|
99
|
+
ApexProfiling: 'NONE',
|
|
100
|
+
Callout: 'NONE',
|
|
101
|
+
Database: 'NONE',
|
|
102
|
+
System: 'NONE',
|
|
103
|
+
Validation: 'NONE',
|
|
104
|
+
Visualforce: 'NONE',
|
|
105
|
+
Workflow: 'NONE',
|
|
106
|
+
});
|
|
107
|
+
if (!createResult.success) {
|
|
108
|
+
throw new ApexTraceSilenceError('debug-level-create-failed', createResult.errors.map((e) => e.message).join(', '));
|
|
109
|
+
}
|
|
110
|
+
debugLevelId = createResult.id;
|
|
111
|
+
}
|
|
112
|
+
onPhase?.('finding-classes');
|
|
113
|
+
const classesClause = classNames.map((className) => `'${className}'`).join(',');
|
|
114
|
+
const classResult = await connection.tooling.query(`SELECT Id, Name FROM ApexClass WHERE Name IN (${classesClause})`);
|
|
115
|
+
if (classResult.records.length === 0) {
|
|
116
|
+
return { results: [], missingClassNames: classNames, failures: [] };
|
|
117
|
+
}
|
|
118
|
+
const foundNames = new Set(classResult.records.map((record) => record.Name));
|
|
119
|
+
const missingClassNames = classNames.filter((className) => !foundNames.has(className));
|
|
120
|
+
const now = new Date();
|
|
121
|
+
const expiration = new Date(now.getTime() + TRACE_DURATION_MS);
|
|
122
|
+
const startDate = now.toISOString();
|
|
123
|
+
const expirationDate = expiration.toISOString();
|
|
124
|
+
const classIdsClause = classResult.records.map((record) => `'${record.Id}'`).join(',');
|
|
125
|
+
const existingTraceFlagResult = await connection.tooling.query(`SELECT Id, TracedEntityId FROM TraceFlag WHERE LogType = 'CLASS_TRACING' AND TracedEntityId IN (${classIdsClause})`);
|
|
126
|
+
const existingTraceFlagIdByClassId = new Map(existingTraceFlagResult.records.map((record) => [record.TracedEntityId, record.Id]));
|
|
127
|
+
const results = [];
|
|
128
|
+
const failures = [];
|
|
129
|
+
onPhase?.('creating-trace-flags');
|
|
130
|
+
for (const classRecord of classResult.records) {
|
|
131
|
+
const existingTraceFlagId = existingTraceFlagIdByClassId.get(classRecord.Id);
|
|
132
|
+
if (existingTraceFlagId) {
|
|
133
|
+
// eslint-disable-next-line no-await-in-loop -- trace flags are written sequentially, matching the CLI's per-class progress reporting
|
|
134
|
+
const updateResult = await connection.tooling.sobject('TraceFlag').update({
|
|
135
|
+
Id: existingTraceFlagId,
|
|
136
|
+
DebugLevelId: debugLevelId,
|
|
137
|
+
StartDate: startDate,
|
|
138
|
+
ExpirationDate: expirationDate,
|
|
139
|
+
});
|
|
140
|
+
if (!updateResult.success) {
|
|
141
|
+
failures.push({
|
|
142
|
+
class: classRecord.Name,
|
|
143
|
+
action: 'update',
|
|
144
|
+
error: updateResult.errors.map((e) => e.message).join(', '),
|
|
145
|
+
});
|
|
146
|
+
continue;
|
|
147
|
+
}
|
|
148
|
+
results.push({ class: classRecord.Name, classId: classRecord.Id, traceFlagId: existingTraceFlagId });
|
|
149
|
+
continue;
|
|
150
|
+
}
|
|
151
|
+
// eslint-disable-next-line no-await-in-loop -- trace flags are written sequentially, matching the CLI's per-class progress reporting
|
|
152
|
+
const createResult = await connection.tooling.sobject('TraceFlag').create({
|
|
153
|
+
StartDate: startDate,
|
|
154
|
+
ExpirationDate: expirationDate,
|
|
155
|
+
DebugLevelId: debugLevelId,
|
|
156
|
+
TracedEntityId: classRecord.Id,
|
|
157
|
+
LogType: 'CLASS_TRACING',
|
|
158
|
+
});
|
|
159
|
+
if (!createResult.success) {
|
|
160
|
+
failures.push({
|
|
161
|
+
class: classRecord.Name,
|
|
162
|
+
action: 'create',
|
|
163
|
+
error: createResult.errors.map((e) => e.message).join(', '),
|
|
164
|
+
});
|
|
165
|
+
continue;
|
|
166
|
+
}
|
|
167
|
+
results.push({ class: classRecord.Name, classId: classRecord.Id, traceFlagId: createResult.id });
|
|
168
|
+
}
|
|
169
|
+
return { results, missingClassNames, failures };
|
|
170
|
+
}
|
|
171
|
+
//# sourceMappingURL=apexTraceSilence.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"apexTraceSilence.js","sourceRoot":"","sources":["../../src/common/apexTraceSilence.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAGH,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAC3D,OAAO,EAAE,sBAAsB,EAAE,MAAM,+BAA+B,CAAC;AAEvE,kGAAkG;AAClG,MAAM,gBAAgB,GAAG,SAAS,CAAC;AACnC,iGAAiG;AACjG,MAAM,iBAAiB,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,IAAI,CAAC;AAE9C,8CAA8C;AAC9C,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,uBAAuB,EAAE,qBAAqB,CAAC,CAAC;AAC9E,8CAA8C;AAC9C,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,0BAA0B,CAAC,CAAC;AAC1D,gDAAgD;AAChD,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,YAAY,E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AAO,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC,MAAM,CAAC;YACxE,SAAS,EAAE,SAAS;YACpB,cAAc,EAAE,cAAc;YAC9B,YAAY,EAAE,YAAY;YAC1B,cAAc,EAAE,WAAW,CAAC,EAAE;YAC9B,OAAO,EAAE,eAAe;SACzB,CAAC,CAAC;QAEH,IAAI,CAAC,YAAY,CAAC,OAAO,EAAE,CAAC;YAC1B,QAAQ,CAAC,IAAI,CAAC;gBACZ,KAAK,EAAE,WAAW,CAAC,IAAI;gBACvB,MAAM,EAAE,QAAQ;gBAChB,KAAK,EAAE,YAAY,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC;aAC5D,CAAC,CAAC;YACH,SAAS;QACX,CAAC;QAED,OAAO,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,WAAW,CAAC,IAAI,EAAE,OAAO,EAAE,WAAW,CAAC,EAAE,EAAE,WAAW,EAAE,YAAY,CAAC,EAAE,EAAE,CAAC,CAAC;IACnG,CAAC;IAED,OAAO,EAAE,OAAO,EAAE,iBAAiB,EAAE,QAAQ,EAAE,CAAC;AAClD,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"classesToSilence.js","sourceRoot":"","sources":["../../../src/common/schemas/classesToSilence.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,+FAA+F;AAC/F,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC7C,OAAO,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;CACpC,CAAC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@simplysf/simply-apex",
|
|
3
3
|
"description": "Utilities for working with Apex",
|
|
4
|
-
"version": "1.6.
|
|
4
|
+
"version": "1.6.10",
|
|
5
5
|
"author": "@ClayChipps",
|
|
6
6
|
"homepage": "https://github.com/SimplySF/simply-node",
|
|
7
7
|
"bugs": "https://github.com/SimplySF/simply-node/issues",
|
|
@@ -87,7 +87,6 @@
|
|
|
87
87
|
"compile": "wireit",
|
|
88
88
|
"fix-license": "eslint src test --fix --rule \"header/header: [2]\"",
|
|
89
89
|
"format": "wireit",
|
|
90
|
-
"link-check": "wireit",
|
|
91
90
|
"lint": "wireit",
|
|
92
91
|
"readme": "oclif readme --no-aliases",
|
|
93
92
|
"test": "wireit",
|
|
@@ -148,8 +147,7 @@
|
|
|
148
147
|
"test:only",
|
|
149
148
|
"test:command-reference",
|
|
150
149
|
"lint",
|
|
151
|
-
"test:json-schema"
|
|
152
|
-
"link-check"
|
|
150
|
+
"test:json-schema"
|
|
153
151
|
]
|
|
154
152
|
},
|
|
155
153
|
"test:command-reference": {
|
|
@@ -206,16 +204,7 @@
|
|
|
206
204
|
"!*.nut.ts"
|
|
207
205
|
],
|
|
208
206
|
"output": []
|
|
209
|
-
},
|
|
210
|
-
"link-check": {
|
|
211
|
-
"command": "node -e \"process.exit(process.env.CI ? 0 : 1)\" || linkinator \"**/*.md\" --skip \"CHANGELOG.md|node_modules|test/|confluence.internal.salesforce.com|my.salesforce.com|localhost|example\\.(com|org|net)|github\\.com/SimplySF/simply-node|raw\\.githubusercontent\\.com/SimplySF/simply-node|blob/.*/lib/|%s\" --markdown --retry --directory-listing --verbosity error",
|
|
212
|
-
"files": [
|
|
213
|
-
"./*.md",
|
|
214
|
-
"./!(CHANGELOG).md",
|
|
215
|
-
"messages/**/*.md"
|
|
216
|
-
],
|
|
217
|
-
"output": []
|
|
218
207
|
}
|
|
219
208
|
},
|
|
220
|
-
"gitHead": "
|
|
209
|
+
"gitHead": "6665a2b7d6ae7347e2658a2958535052240b4ad8"
|
|
221
210
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"classesToSilence.js","sourceRoot":"","sources":["../../../src/schemas/silence/classesToSilence.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,+FAA+F;AAC/F,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC7C,OAAO,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;CACpC,CAAC,CAAC"}
|
|
File without changes
|
|
File without changes
|