@simplysf/simply-apex 1.8.15 → 2.0.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
CHANGED
|
@@ -59,7 +59,7 @@ FLAG DESCRIPTIONS
|
|
|
59
59
|
The path to the local .apex file containing the anonymous Apex code to execute.
|
|
60
60
|
```
|
|
61
61
|
|
|
62
|
-
_See code: [lib/commands/simply/apex/execute.js](https://github.com/SimplySF/simply-plugins/blob/@simplysf/simply-apex@
|
|
62
|
+
_See code: [lib/commands/simply/apex/execute.js](https://github.com/SimplySF/simply-plugins/blob/@simplysf/simply-apex@2.0.0/packages/simply-apex/lib/commands/simply/apex/execute.js)_
|
|
63
63
|
|
|
64
64
|
## `sf simply apex logs purge`
|
|
65
65
|
|
|
@@ -115,7 +115,7 @@ FLAG DESCRIPTIONS
|
|
|
115
115
|
elapses, then throws.
|
|
116
116
|
```
|
|
117
117
|
|
|
118
|
-
_See code: [lib/commands/simply/apex/logs/purge.js](https://github.com/SimplySF/simply-plugins/blob/@simplysf/simply-apex@
|
|
118
|
+
_See code: [lib/commands/simply/apex/logs/purge.js](https://github.com/SimplySF/simply-plugins/blob/@simplysf/simply-apex@2.0.0/packages/simply-apex/lib/commands/simply/apex/logs/purge.js)_
|
|
119
119
|
|
|
120
120
|
## `sf simply apex test-suite generate`
|
|
121
121
|
|
|
@@ -163,7 +163,7 @@ FLAG DESCRIPTIONS
|
|
|
163
163
|
pass that directory explicitly, e.g. force-app/main/default/testSuites.
|
|
164
164
|
```
|
|
165
165
|
|
|
166
|
-
_See code: [lib/commands/simply/apex/test-suite/generate.js](https://github.com/SimplySF/simply-plugins/blob/@simplysf/simply-apex@
|
|
166
|
+
_See code: [lib/commands/simply/apex/test-suite/generate.js](https://github.com/SimplySF/simply-plugins/blob/@simplysf/simply-apex@2.0.0/packages/simply-apex/lib/commands/simply/apex/test-suite/generate.js)_
|
|
167
167
|
|
|
168
168
|
## `sf simply apex trace setup`
|
|
169
169
|
|
|
@@ -223,7 +223,7 @@ FLAG DESCRIPTIONS
|
|
|
223
223
|
Defaults to the current date/time.
|
|
224
224
|
```
|
|
225
225
|
|
|
226
|
-
_See code: [lib/commands/simply/apex/trace/setup.js](https://github.com/SimplySF/simply-plugins/blob/@simplysf/simply-apex@
|
|
226
|
+
_See code: [lib/commands/simply/apex/trace/setup.js](https://github.com/SimplySF/simply-plugins/blob/@simplysf/simply-apex@2.0.0/packages/simply-apex/lib/commands/simply/apex/trace/setup.js)_
|
|
227
227
|
|
|
228
228
|
## `sf simply apex trace silence`
|
|
229
229
|
|
|
@@ -287,7 +287,7 @@ FLAG DESCRIPTIONS
|
|
|
287
287
|
Adds di_Binding, di_Module, di_PlatformCache, and di_Injector to the classes to silence.
|
|
288
288
|
```
|
|
289
289
|
|
|
290
|
-
_See code: [lib/commands/simply/apex/trace/silence.js](https://github.com/SimplySF/simply-plugins/blob/@simplysf/simply-apex@
|
|
290
|
+
_See code: [lib/commands/simply/apex/trace/silence.js](https://github.com/SimplySF/simply-plugins/blob/@simplysf/simply-apex@2.0.0/packages/simply-apex/lib/commands/simply/apex/trace/silence.js)_
|
|
291
291
|
<!-- commandsstop -->
|
|
292
292
|
|
|
293
293
|
## License
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { SfCommand } from '@salesforce/sf-plugins-core';
|
|
2
|
-
import { type ApexTraceSetupResult
|
|
2
|
+
import { type ApexTraceSetupResult } from '@simplysf/simply-apex-core';
|
|
3
3
|
export type { ApexTraceSetupResult } from '@simplysf/simply-apex-core';
|
|
4
4
|
/**
|
|
5
5
|
* Creates or updates a DEVELOPER_LOG trace flag for the target user. The target user is the one
|
|
@@ -13,7 +13,7 @@ export default class ApexTraceSetup extends SfCommand<ApexTraceSetupResult> {
|
|
|
13
13
|
static readonly description: string;
|
|
14
14
|
static readonly examples: string[];
|
|
15
15
|
static readonly flags: {
|
|
16
|
-
'on-behalf-of': import("@oclif/core/interfaces").OptionFlag<
|
|
16
|
+
'on-behalf-of': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
17
17
|
'log-level': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
18
18
|
'start-date': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
19
19
|
'end-date': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
@@ -50,16 +50,7 @@ export default class ApexTraceSetup extends SfCommand {
|
|
|
50
50
|
static flags = {
|
|
51
51
|
...SfCommand.baseFlags,
|
|
52
52
|
...targetOrgFlags,
|
|
53
|
-
'on-behalf-of': Flags.
|
|
54
|
-
// eslint-disable-next-line @typescript-eslint/require-await
|
|
55
|
-
parse: async (input) => {
|
|
56
|
-
const onBehalfOf = parseOnBehalfOf(input);
|
|
57
|
-
if (!onBehalfOf) {
|
|
58
|
-
throw messages.createError('error.invalidOnBehalfOf', [input]);
|
|
59
|
-
}
|
|
60
|
-
return onBehalfOf;
|
|
61
|
-
},
|
|
62
|
-
})({
|
|
53
|
+
'on-behalf-of': Flags.string({
|
|
63
54
|
summary: messages.getMessage('flags.on-behalf-of.summary'),
|
|
64
55
|
description: messages.getMessage('flags.on-behalf-of.description'),
|
|
65
56
|
}),
|
|
@@ -70,24 +61,10 @@ export default class ApexTraceSetup extends SfCommand {
|
|
|
70
61
|
'start-date': Flags.string({
|
|
71
62
|
summary: messages.getMessage('flags.start-date.summary'),
|
|
72
63
|
description: messages.getMessage('flags.start-date.description'),
|
|
73
|
-
// eslint-disable-next-line @typescript-eslint/require-await
|
|
74
|
-
parse: async (input) => {
|
|
75
|
-
if (!DATE_TIME_PATTERN.test(input)) {
|
|
76
|
-
throw messages.createError('error.invalidDateTime', ['start-date', input]);
|
|
77
|
-
}
|
|
78
|
-
return input;
|
|
79
|
-
},
|
|
80
64
|
}),
|
|
81
65
|
'end-date': Flags.string({
|
|
82
66
|
summary: messages.getMessage('flags.end-date.summary'),
|
|
83
67
|
description: messages.getMessage('flags.end-date.description'),
|
|
84
|
-
// eslint-disable-next-line @typescript-eslint/require-await
|
|
85
|
-
parse: async (input) => {
|
|
86
|
-
if (!DATE_TIME_PATTERN.test(input)) {
|
|
87
|
-
throw messages.createError('error.invalidDateTime', ['end-date', input]);
|
|
88
|
-
}
|
|
89
|
-
return input;
|
|
90
|
-
},
|
|
91
68
|
}),
|
|
92
69
|
};
|
|
93
70
|
/**
|
|
@@ -96,11 +73,26 @@ export default class ApexTraceSetup extends SfCommand {
|
|
|
96
73
|
*/
|
|
97
74
|
async run() {
|
|
98
75
|
const { flags } = await this.parse(ApexTraceSetup);
|
|
76
|
+
// Validated here rather than in flag `parse` functions: `sf` maps any error thrown from a flag
|
|
77
|
+
// parser to exit code 2, while the plugins' other invalid-value errors exit 1.
|
|
78
|
+
let onBehalfOf;
|
|
79
|
+
if (flags['on-behalf-of'] !== undefined) {
|
|
80
|
+
onBehalfOf = parseOnBehalfOf(flags['on-behalf-of']);
|
|
81
|
+
if (!onBehalfOf) {
|
|
82
|
+
throw messages.createError('error.invalidOnBehalfOf', [flags['on-behalf-of']]);
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
for (const flag of ['start-date', 'end-date']) {
|
|
86
|
+
const value = flags[flag];
|
|
87
|
+
if (value !== undefined && !DATE_TIME_PATTERN.test(value)) {
|
|
88
|
+
throw messages.createError('error.invalidDateTime', [flag, value]);
|
|
89
|
+
}
|
|
90
|
+
}
|
|
99
91
|
const targetOrgConnection = requireConnection(flags);
|
|
100
92
|
let result;
|
|
101
93
|
try {
|
|
102
94
|
result = await setupApexTrace(targetOrgConnection, {
|
|
103
|
-
onBehalfOf
|
|
95
|
+
onBehalfOf,
|
|
104
96
|
logLevel: flags['log-level'],
|
|
105
97
|
startDate: flags['start-date'],
|
|
106
98
|
endDate: flags['end-date'],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
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 @@
|
|
|
193
193
|
"purge:logs:apex:simply"
|
|
194
194
|
]
|
|
195
195
|
},
|
|
196
|
+
"simply:apex:test-suite:generate": {
|
|
197
|
+
"aliases": [],
|
|
198
|
+
"args": {},
|
|
199
|
+
"description": "Scans one or more source directories for Apex classes, keeps only the ones whose first meaningful line (skipping leading blank lines and comments) is an @IsTest annotation, and writes an ApexTestSuite metadata file listing them. Every run regenerates the file from scratch based on the current state of --source-dir; an existing file with the same name is always overwritten.",
|
|
200
|
+
"examples": [
|
|
201
|
+
"<%= config.bin %> <%= command.id %> --source-dir force-app/main/default/classes --name My_Suite --output-dir force-app/main/default/testSuites",
|
|
202
|
+
"<%= config.bin %> <%= command.id %> --source-dir force-app/main/default/classes --source-dir force-app/extra/classes --name All_Tests --output-dir force-app/main/default/testSuites"
|
|
203
|
+
],
|
|
204
|
+
"flags": {
|
|
205
|
+
"json": {
|
|
206
|
+
"description": "Format output as json.",
|
|
207
|
+
"helpGroup": "GLOBAL",
|
|
208
|
+
"name": "json",
|
|
209
|
+
"allowNo": false,
|
|
210
|
+
"type": "boolean"
|
|
211
|
+
},
|
|
212
|
+
"flags-dir": {
|
|
213
|
+
"helpGroup": "GLOBAL",
|
|
214
|
+
"name": "flags-dir",
|
|
215
|
+
"summary": "Import flag values from a directory.",
|
|
216
|
+
"hasDynamicHelp": false,
|
|
217
|
+
"multiple": false,
|
|
218
|
+
"type": "option"
|
|
219
|
+
},
|
|
220
|
+
"source-dir": {
|
|
221
|
+
"char": "d",
|
|
222
|
+
"description": "One or more directories to scan, recursively, for Apex classes. Only classes whose first meaningful line is an @IsTest annotation are included in the generated suite.",
|
|
223
|
+
"name": "source-dir",
|
|
224
|
+
"required": true,
|
|
225
|
+
"summary": "Directories to scan for Apex classes",
|
|
226
|
+
"hasDynamicHelp": false,
|
|
227
|
+
"multiple": true,
|
|
228
|
+
"type": "option"
|
|
229
|
+
},
|
|
230
|
+
"name": {
|
|
231
|
+
"char": "n",
|
|
232
|
+
"description": "The API name for the generated test suite; also used to derive the output filename, <name>.testSuite-meta.xml.",
|
|
233
|
+
"name": "name",
|
|
234
|
+
"required": true,
|
|
235
|
+
"summary": "API name for the test suite",
|
|
236
|
+
"hasDynamicHelp": false,
|
|
237
|
+
"multiple": false,
|
|
238
|
+
"type": "option"
|
|
239
|
+
},
|
|
240
|
+
"output-dir": {
|
|
241
|
+
"description": "The directory to write the generated ApexTestSuite metadata file to. Not automatically suffixed with testSuites/ — pass that directory explicitly, e.g. force-app/main/default/testSuites.",
|
|
242
|
+
"name": "output-dir",
|
|
243
|
+
"required": true,
|
|
244
|
+
"summary": "Output directory",
|
|
245
|
+
"hasDynamicHelp": false,
|
|
246
|
+
"multiple": false,
|
|
247
|
+
"type": "option"
|
|
248
|
+
}
|
|
249
|
+
},
|
|
250
|
+
"hasDynamicHelp": false,
|
|
251
|
+
"hiddenAliases": [],
|
|
252
|
+
"id": "simply:apex:test-suite:generate",
|
|
253
|
+
"pluginAlias": "@simplysf/simply-apex",
|
|
254
|
+
"pluginName": "@simplysf/simply-apex",
|
|
255
|
+
"pluginType": "core",
|
|
256
|
+
"strict": true,
|
|
257
|
+
"summary": "Generate an Apex test suite from source.",
|
|
258
|
+
"enableJsonFlag": true,
|
|
259
|
+
"isESM": true,
|
|
260
|
+
"relativePath": [
|
|
261
|
+
"lib",
|
|
262
|
+
"commands",
|
|
263
|
+
"simply",
|
|
264
|
+
"apex",
|
|
265
|
+
"test-suite",
|
|
266
|
+
"generate.js"
|
|
267
|
+
],
|
|
268
|
+
"aliasPermutations": [],
|
|
269
|
+
"permutations": [
|
|
270
|
+
"simply:apex:test-suite:generate",
|
|
271
|
+
"apex:simply:test-suite:generate",
|
|
272
|
+
"apex:test-suite:simply:generate",
|
|
273
|
+
"apex:test-suite:generate:simply",
|
|
274
|
+
"simply:test-suite:apex:generate",
|
|
275
|
+
"test-suite:simply:apex:generate",
|
|
276
|
+
"test-suite:apex:simply:generate",
|
|
277
|
+
"test-suite:apex:generate:simply",
|
|
278
|
+
"simply:test-suite:generate:apex",
|
|
279
|
+
"test-suite:simply:generate:apex",
|
|
280
|
+
"test-suite:generate:simply:apex",
|
|
281
|
+
"test-suite:generate:apex:simply",
|
|
282
|
+
"simply:apex:generate:test-suite",
|
|
283
|
+
"apex:simply:generate:test-suite",
|
|
284
|
+
"apex:generate:simply:test-suite",
|
|
285
|
+
"apex:generate:test-suite:simply",
|
|
286
|
+
"simply:generate:apex:test-suite",
|
|
287
|
+
"generate:simply:apex:test-suite",
|
|
288
|
+
"generate:apex:simply:test-suite",
|
|
289
|
+
"generate:apex:test-suite:simply",
|
|
290
|
+
"simply:generate:test-suite:apex",
|
|
291
|
+
"generate:simply:test-suite:apex",
|
|
292
|
+
"generate:test-suite:simply:apex",
|
|
293
|
+
"generate:test-suite:apex:simply"
|
|
294
|
+
]
|
|
295
|
+
},
|
|
196
296
|
"simply:apex:trace:setup": {
|
|
197
297
|
"aliases": [],
|
|
198
298
|
"args": {},
|
|
@@ -448,107 +548,7 @@
|
|
|
448
548
|
"silence:trace:simply:apex",
|
|
449
549
|
"silence:trace:apex:simply"
|
|
450
550
|
]
|
|
451
|
-
},
|
|
452
|
-
"simply:apex:test-suite:generate": {
|
|
453
|
-
"aliases": [],
|
|
454
|
-
"args": {},
|
|
455
|
-
"description": "Scans one or more source directories for Apex classes, keeps only the ones whose first meaningful line (skipping leading blank lines and comments) is an @IsTest annotation, and writes an ApexTestSuite metadata file listing them. Every run regenerates the file from scratch based on the current state of --source-dir; an existing file with the same name is always overwritten.",
|
|
456
|
-
"examples": [
|
|
457
|
-
"<%= config.bin %> <%= command.id %> --source-dir force-app/main/default/classes --name My_Suite --output-dir force-app/main/default/testSuites",
|
|
458
|
-
"<%= config.bin %> <%= command.id %> --source-dir force-app/main/default/classes --source-dir force-app/extra/classes --name All_Tests --output-dir force-app/main/default/testSuites"
|
|
459
|
-
],
|
|
460
|
-
"flags": {
|
|
461
|
-
"json": {
|
|
462
|
-
"description": "Format output as json.",
|
|
463
|
-
"helpGroup": "GLOBAL",
|
|
464
|
-
"name": "json",
|
|
465
|
-
"allowNo": false,
|
|
466
|
-
"type": "boolean"
|
|
467
|
-
},
|
|
468
|
-
"flags-dir": {
|
|
469
|
-
"helpGroup": "GLOBAL",
|
|
470
|
-
"name": "flags-dir",
|
|
471
|
-
"summary": "Import flag values from a directory.",
|
|
472
|
-
"hasDynamicHelp": false,
|
|
473
|
-
"multiple": false,
|
|
474
|
-
"type": "option"
|
|
475
|
-
},
|
|
476
|
-
"source-dir": {
|
|
477
|
-
"char": "d",
|
|
478
|
-
"description": "One or more directories to scan, recursively, for Apex classes. Only classes whose first meaningful line is an @IsTest annotation are included in the generated suite.",
|
|
479
|
-
"name": "source-dir",
|
|
480
|
-
"required": true,
|
|
481
|
-
"summary": "Directories to scan for Apex classes",
|
|
482
|
-
"hasDynamicHelp": false,
|
|
483
|
-
"multiple": true,
|
|
484
|
-
"type": "option"
|
|
485
|
-
},
|
|
486
|
-
"name": {
|
|
487
|
-
"char": "n",
|
|
488
|
-
"description": "The API name for the generated test suite; also used to derive the output filename, <name>.testSuite-meta.xml.",
|
|
489
|
-
"name": "name",
|
|
490
|
-
"required": true,
|
|
491
|
-
"summary": "API name for the test suite",
|
|
492
|
-
"hasDynamicHelp": false,
|
|
493
|
-
"multiple": false,
|
|
494
|
-
"type": "option"
|
|
495
|
-
},
|
|
496
|
-
"output-dir": {
|
|
497
|
-
"description": "The directory to write the generated ApexTestSuite metadata file to. Not automatically suffixed with testSuites/ — pass that directory explicitly, e.g. force-app/main/default/testSuites.",
|
|
498
|
-
"name": "output-dir",
|
|
499
|
-
"required": true,
|
|
500
|
-
"summary": "Output directory",
|
|
501
|
-
"hasDynamicHelp": false,
|
|
502
|
-
"multiple": false,
|
|
503
|
-
"type": "option"
|
|
504
|
-
}
|
|
505
|
-
},
|
|
506
|
-
"hasDynamicHelp": false,
|
|
507
|
-
"hiddenAliases": [],
|
|
508
|
-
"id": "simply:apex:test-suite:generate",
|
|
509
|
-
"pluginAlias": "@simplysf/simply-apex",
|
|
510
|
-
"pluginName": "@simplysf/simply-apex",
|
|
511
|
-
"pluginType": "core",
|
|
512
|
-
"strict": true,
|
|
513
|
-
"summary": "Generate an Apex test suite from source.",
|
|
514
|
-
"enableJsonFlag": true,
|
|
515
|
-
"isESM": true,
|
|
516
|
-
"relativePath": [
|
|
517
|
-
"lib",
|
|
518
|
-
"commands",
|
|
519
|
-
"simply",
|
|
520
|
-
"apex",
|
|
521
|
-
"test-suite",
|
|
522
|
-
"generate.js"
|
|
523
|
-
],
|
|
524
|
-
"aliasPermutations": [],
|
|
525
|
-
"permutations": [
|
|
526
|
-
"simply:apex:test-suite:generate",
|
|
527
|
-
"apex:simply:test-suite:generate",
|
|
528
|
-
"apex:test-suite:simply:generate",
|
|
529
|
-
"apex:test-suite:generate:simply",
|
|
530
|
-
"simply:test-suite:apex:generate",
|
|
531
|
-
"test-suite:simply:apex:generate",
|
|
532
|
-
"test-suite:apex:simply:generate",
|
|
533
|
-
"test-suite:apex:generate:simply",
|
|
534
|
-
"simply:test-suite:generate:apex",
|
|
535
|
-
"test-suite:simply:generate:apex",
|
|
536
|
-
"test-suite:generate:simply:apex",
|
|
537
|
-
"test-suite:generate:apex:simply",
|
|
538
|
-
"simply:apex:generate:test-suite",
|
|
539
|
-
"apex:simply:generate:test-suite",
|
|
540
|
-
"apex:generate:simply:test-suite",
|
|
541
|
-
"apex:generate:test-suite:simply",
|
|
542
|
-
"simply:generate:apex:test-suite",
|
|
543
|
-
"generate:simply:apex:test-suite",
|
|
544
|
-
"generate:apex:simply:test-suite",
|
|
545
|
-
"generate:apex:test-suite:simply",
|
|
546
|
-
"simply:generate:test-suite:apex",
|
|
547
|
-
"generate:simply:test-suite:apex",
|
|
548
|
-
"generate:test-suite:simply:apex",
|
|
549
|
-
"generate:test-suite:apex:simply"
|
|
550
|
-
]
|
|
551
551
|
}
|
|
552
552
|
},
|
|
553
|
-
"version": "
|
|
553
|
+
"version": "2.0.0"
|
|
554
554
|
}
|
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": "
|
|
4
|
+
"version": "2.0.0",
|
|
5
5
|
"author": "@ClayChipps",
|
|
6
6
|
"homepage": "https://github.com/SimplySF/simply-plugins",
|
|
7
7
|
"bugs": "https://github.com/SimplySF/simply-plugins/issues",
|
|
@@ -72,7 +72,7 @@
|
|
|
72
72
|
"@salesforce/kit": "^3.2.6",
|
|
73
73
|
"@salesforce/sf-plugins-core": "^12.2.16",
|
|
74
74
|
"@simplysf/simply-apex-core": "^0.3.16",
|
|
75
|
-
"@simplysf/simply-core": "^1.6.
|
|
75
|
+
"@simplysf/simply-core": "^1.6.11",
|
|
76
76
|
"@simplysf/simply-plugin-kit": "^1.0.9"
|
|
77
77
|
},
|
|
78
78
|
"devDependencies": {
|
|
@@ -212,5 +212,5 @@
|
|
|
212
212
|
"output": []
|
|
213
213
|
}
|
|
214
214
|
},
|
|
215
|
-
"gitHead": "
|
|
215
|
+
"gitHead": "b8c437281cdbf26710c7f7be2849de72910d6f7f"
|
|
216
216
|
}
|