@simplysf/simply-apex 1.8.14 → 1.8.16

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@1.8.14/packages/simply-apex/lib/commands/simply/apex/execute.js)_
62
+ _See code: [lib/commands/simply/apex/execute.js](https://github.com/SimplySF/simply-plugins/blob/@simplysf/simply-apex@1.8.16/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@1.8.14/packages/simply-apex/lib/commands/simply/apex/logs/purge.js)_
118
+ _See code: [lib/commands/simply/apex/logs/purge.js](https://github.com/SimplySF/simply-plugins/blob/@simplysf/simply-apex@1.8.16/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@1.8.14/packages/simply-apex/lib/commands/simply/apex/test-suite/generate.js)_
166
+ _See code: [lib/commands/simply/apex/test-suite/generate.js](https://github.com/SimplySF/simply-plugins/blob/@simplysf/simply-apex@1.8.16/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@1.8.14/packages/simply-apex/lib/commands/simply/apex/trace/setup.js)_
226
+ _See code: [lib/commands/simply/apex/trace/setup.js](https://github.com/SimplySF/simply-plugins/blob/@simplysf/simply-apex@1.8.16/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@1.8.14/packages/simply-apex/lib/commands/simply/apex/trace/silence.js)_
290
+ _See code: [lib/commands/simply/apex/trace/silence.js](https://github.com/SimplySF/simply-plugins/blob/@simplysf/simply-apex@1.8.16/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, type OnBehalfOf } from '@simplysf/simply-apex-core';
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<OnBehalfOf | undefined, import("@oclif/core/interfaces").CustomOptions>;
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.custom({
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: flags['on-behalf-of'],
95
+ onBehalfOf,
104
96
  logLevel: flags['log-level'],
105
97
  startDate: flags['start-date'],
106
98
  endDate: flags['end-date'],
@@ -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,EACL,mBAAmB,EACnB,iBAAiB,EACjB,eAAe,EACf,cAAc,GAGf,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,iBAAiB,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAEhF,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,K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,WAAW,CAAC;gBAC5B,SAAS,EAAE,KAAK,CAAC,YAAY,CAAC;gBAC9B,OAAO,EAAE,KAAK,CAAC,UAAU,CAAC;aAC3B,EACD,CAAC,KAAK,EAAE,EAAE;gBACR,QAAQ,KAAK,EAAE,CAAC;oBACd,KAAK,cAAc;wBACjB,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,QAAQ,CAAC,UAAU,CAAC,kBAAkB,CAAC,CAAC,CAAC;wBAC5D,MAAM;oBACR,KAAK,sBAAsB;wBACzB,IAAI,CAAC,OAAO,CAAC,IAAI,EAAE,CAAC;wBACpB,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,QAAQ,CAAC,UAAU,CAAC,yBAAyB,CAAC,CAAC,CAAC;wBACnE,MAAM;oBACR,KAAK,wBAAwB;wBAC3B,IAAI,CAAC,OAAO,CAAC,IAAI,EAAE,CAAC;wBACpB,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,QAAQ,CAAC,UAAU,CAAC,2BAA2B,CAAC,CAAC,CAAC;wBACrE,MAAM;gBACV,CAAC;YACH,CAAC,CACF,CAAC;QACJ,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,IAAI,CAAC,OAAO,CAAC,IAAI,EAAE,CAAC;YACpB,MAAM,KAAK,YAAY,mBAAmB,CAAC,CAAC,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC;QACzE,CAAC;QACD,IAAI,CAAC,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"}
@@ -78,6 +78,221 @@
78
78
  "execute:apex:simply"
79
79
  ]
80
80
  },
81
+ "simply:apex:test-suite:generate": {
82
+ "aliases": [],
83
+ "args": {},
84
+ "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.",
85
+ "examples": [
86
+ "<%= config.bin %> <%= command.id %> --source-dir force-app/main/default/classes --name My_Suite --output-dir force-app/main/default/testSuites",
87
+ "<%= 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"
88
+ ],
89
+ "flags": {
90
+ "json": {
91
+ "description": "Format output as json.",
92
+ "helpGroup": "GLOBAL",
93
+ "name": "json",
94
+ "allowNo": false,
95
+ "type": "boolean"
96
+ },
97
+ "flags-dir": {
98
+ "helpGroup": "GLOBAL",
99
+ "name": "flags-dir",
100
+ "summary": "Import flag values from a directory.",
101
+ "hasDynamicHelp": false,
102
+ "multiple": false,
103
+ "type": "option"
104
+ },
105
+ "source-dir": {
106
+ "char": "d",
107
+ "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.",
108
+ "name": "source-dir",
109
+ "required": true,
110
+ "summary": "Directories to scan for Apex classes",
111
+ "hasDynamicHelp": false,
112
+ "multiple": true,
113
+ "type": "option"
114
+ },
115
+ "name": {
116
+ "char": "n",
117
+ "description": "The API name for the generated test suite; also used to derive the output filename, <name>.testSuite-meta.xml.",
118
+ "name": "name",
119
+ "required": true,
120
+ "summary": "API name for the test suite",
121
+ "hasDynamicHelp": false,
122
+ "multiple": false,
123
+ "type": "option"
124
+ },
125
+ "output-dir": {
126
+ "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.",
127
+ "name": "output-dir",
128
+ "required": true,
129
+ "summary": "Output directory",
130
+ "hasDynamicHelp": false,
131
+ "multiple": false,
132
+ "type": "option"
133
+ }
134
+ },
135
+ "hasDynamicHelp": false,
136
+ "hiddenAliases": [],
137
+ "id": "simply:apex:test-suite:generate",
138
+ "pluginAlias": "@simplysf/simply-apex",
139
+ "pluginName": "@simplysf/simply-apex",
140
+ "pluginType": "core",
141
+ "strict": true,
142
+ "summary": "Generate an Apex test suite from source.",
143
+ "enableJsonFlag": true,
144
+ "isESM": true,
145
+ "relativePath": [
146
+ "lib",
147
+ "commands",
148
+ "simply",
149
+ "apex",
150
+ "test-suite",
151
+ "generate.js"
152
+ ],
153
+ "aliasPermutations": [],
154
+ "permutations": [
155
+ "simply:apex:test-suite:generate",
156
+ "apex:simply:test-suite:generate",
157
+ "apex:test-suite:simply:generate",
158
+ "apex:test-suite:generate:simply",
159
+ "simply:test-suite:apex:generate",
160
+ "test-suite:simply:apex:generate",
161
+ "test-suite:apex:simply:generate",
162
+ "test-suite:apex:generate:simply",
163
+ "simply:test-suite:generate:apex",
164
+ "test-suite:simply:generate:apex",
165
+ "test-suite:generate:simply:apex",
166
+ "test-suite:generate:apex:simply",
167
+ "simply:apex:generate:test-suite",
168
+ "apex:simply:generate:test-suite",
169
+ "apex:generate:simply:test-suite",
170
+ "apex:generate:test-suite:simply",
171
+ "simply:generate:apex:test-suite",
172
+ "generate:simply:apex:test-suite",
173
+ "generate:apex:simply:test-suite",
174
+ "generate:apex:test-suite:simply",
175
+ "simply:generate:test-suite:apex",
176
+ "generate:simply:test-suite:apex",
177
+ "generate:test-suite:simply:apex",
178
+ "generate:test-suite:apex:simply"
179
+ ]
180
+ },
181
+ "simply:apex:logs:purge": {
182
+ "aliases": [],
183
+ "args": {},
184
+ "description": "Deletes ApexLog records from the target org. By default all logs are purged; use --where to scope the deletion to a subset of logs.",
185
+ "examples": [
186
+ "<%= config.bin %> <%= command.id %> --target-org myOrg",
187
+ "<%= config.bin %> <%= command.id %> --target-org myOrg --where \"Status = 'Success'\"",
188
+ "<%= config.bin %> <%= command.id %> --target-org myOrg --use-bulk-api",
189
+ "<%= config.bin %> <%= command.id %> --target-org myOrg --use-bulk-api --wait 60"
190
+ ],
191
+ "flags": {
192
+ "json": {
193
+ "description": "Format output as json.",
194
+ "helpGroup": "GLOBAL",
195
+ "name": "json",
196
+ "allowNo": false,
197
+ "type": "boolean"
198
+ },
199
+ "flags-dir": {
200
+ "helpGroup": "GLOBAL",
201
+ "name": "flags-dir",
202
+ "summary": "Import flag values from a directory.",
203
+ "hasDynamicHelp": false,
204
+ "multiple": false,
205
+ "type": "option"
206
+ },
207
+ "api-version": {
208
+ "description": "Override the api version used for api requests made by this command",
209
+ "name": "api-version",
210
+ "hasDynamicHelp": false,
211
+ "multiple": false,
212
+ "type": "option"
213
+ },
214
+ "target-org": {
215
+ "char": "o",
216
+ "name": "target-org",
217
+ "noCacheDefault": true,
218
+ "required": true,
219
+ "summary": "Username or alias of the target org. Not required if the `target-org` configuration variable is already set.",
220
+ "hasDynamicHelp": true,
221
+ "multiple": false,
222
+ "type": "option"
223
+ },
224
+ "where": {
225
+ "char": "w",
226
+ "description": "A WHERE clause used to filter which ApexLog records are purged (e.g. \"Status = 'Success'\").",
227
+ "name": "where",
228
+ "summary": "SOQL WHERE clause",
229
+ "hasDynamicHelp": false,
230
+ "multiple": false,
231
+ "type": "option"
232
+ },
233
+ "use-bulk-api": {
234
+ "char": "b",
235
+ "description": "Runs the whole purge as two Bulk API v2 jobs instead of a Tooling API query followed by chunked REST deletes. Bulk API processes the deletion asynchronously and does not consume the org's REST API request limit, which suits purges of tens of thousands of logs. For small purges the default REST path is faster, since it avoids the overhead of creating, uploading, and polling a job.",
236
+ "name": "use-bulk-api",
237
+ "summary": "Use Bulk API v2 to query and delete the logs.",
238
+ "allowNo": false,
239
+ "type": "boolean"
240
+ },
241
+ "wait": {
242
+ "description": "Only applies with --use-bulk-api. The command polls the query and delete jobs until they complete or this timeout elapses, then throws.",
243
+ "name": "wait",
244
+ "summary": "Number of minutes to wait for the Bulk API jobs to finish.",
245
+ "hasDynamicHelp": true,
246
+ "multiple": false,
247
+ "type": "option"
248
+ }
249
+ },
250
+ "hasDynamicHelp": true,
251
+ "hiddenAliases": [],
252
+ "id": "simply:apex:logs:purge",
253
+ "pluginAlias": "@simplysf/simply-apex",
254
+ "pluginName": "@simplysf/simply-apex",
255
+ "pluginType": "core",
256
+ "strict": true,
257
+ "summary": "Purge Apex debug logs.",
258
+ "enableJsonFlag": true,
259
+ "isESM": true,
260
+ "relativePath": [
261
+ "lib",
262
+ "commands",
263
+ "simply",
264
+ "apex",
265
+ "logs",
266
+ "purge.js"
267
+ ],
268
+ "aliasPermutations": [],
269
+ "permutations": [
270
+ "simply:apex:logs:purge",
271
+ "apex:simply:logs:purge",
272
+ "apex:logs:simply:purge",
273
+ "apex:logs:purge:simply",
274
+ "simply:logs:apex:purge",
275
+ "logs:simply:apex:purge",
276
+ "logs:apex:simply:purge",
277
+ "logs:apex:purge:simply",
278
+ "simply:logs:purge:apex",
279
+ "logs:simply:purge:apex",
280
+ "logs:purge:simply:apex",
281
+ "logs:purge:apex:simply",
282
+ "simply:apex:purge:logs",
283
+ "apex:simply:purge:logs",
284
+ "apex:purge:simply:logs",
285
+ "apex:purge:logs:simply",
286
+ "simply:purge:apex:logs",
287
+ "purge:simply:apex:logs",
288
+ "purge:apex:simply:logs",
289
+ "purge:apex:logs:simply",
290
+ "simply:purge:logs:apex",
291
+ "purge:simply:logs:apex",
292
+ "purge:logs:simply:apex",
293
+ "purge:logs:apex:simply"
294
+ ]
295
+ },
81
296
  "simply:apex:trace:setup": {
82
297
  "aliases": [],
83
298
  "args": {},
@@ -333,222 +548,7 @@
333
548
  "silence:trace:simply:apex",
334
549
  "silence:trace:apex:simply"
335
550
  ]
336
- },
337
- "simply:apex:test-suite:generate": {
338
- "aliases": [],
339
- "args": {},
340
- "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.",
341
- "examples": [
342
- "<%= config.bin %> <%= command.id %> --source-dir force-app/main/default/classes --name My_Suite --output-dir force-app/main/default/testSuites",
343
- "<%= 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"
344
- ],
345
- "flags": {
346
- "json": {
347
- "description": "Format output as json.",
348
- "helpGroup": "GLOBAL",
349
- "name": "json",
350
- "allowNo": false,
351
- "type": "boolean"
352
- },
353
- "flags-dir": {
354
- "helpGroup": "GLOBAL",
355
- "name": "flags-dir",
356
- "summary": "Import flag values from a directory.",
357
- "hasDynamicHelp": false,
358
- "multiple": false,
359
- "type": "option"
360
- },
361
- "source-dir": {
362
- "char": "d",
363
- "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.",
364
- "name": "source-dir",
365
- "required": true,
366
- "summary": "Directories to scan for Apex classes",
367
- "hasDynamicHelp": false,
368
- "multiple": true,
369
- "type": "option"
370
- },
371
- "name": {
372
- "char": "n",
373
- "description": "The API name for the generated test suite; also used to derive the output filename, <name>.testSuite-meta.xml.",
374
- "name": "name",
375
- "required": true,
376
- "summary": "API name for the test suite",
377
- "hasDynamicHelp": false,
378
- "multiple": false,
379
- "type": "option"
380
- },
381
- "output-dir": {
382
- "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.",
383
- "name": "output-dir",
384
- "required": true,
385
- "summary": "Output directory",
386
- "hasDynamicHelp": false,
387
- "multiple": false,
388
- "type": "option"
389
- }
390
- },
391
- "hasDynamicHelp": false,
392
- "hiddenAliases": [],
393
- "id": "simply:apex:test-suite:generate",
394
- "pluginAlias": "@simplysf/simply-apex",
395
- "pluginName": "@simplysf/simply-apex",
396
- "pluginType": "core",
397
- "strict": true,
398
- "summary": "Generate an Apex test suite from source.",
399
- "enableJsonFlag": true,
400
- "isESM": true,
401
- "relativePath": [
402
- "lib",
403
- "commands",
404
- "simply",
405
- "apex",
406
- "test-suite",
407
- "generate.js"
408
- ],
409
- "aliasPermutations": [],
410
- "permutations": [
411
- "simply:apex:test-suite:generate",
412
- "apex:simply:test-suite:generate",
413
- "apex:test-suite:simply:generate",
414
- "apex:test-suite:generate:simply",
415
- "simply:test-suite:apex:generate",
416
- "test-suite:simply:apex:generate",
417
- "test-suite:apex:simply:generate",
418
- "test-suite:apex:generate:simply",
419
- "simply:test-suite:generate:apex",
420
- "test-suite:simply:generate:apex",
421
- "test-suite:generate:simply:apex",
422
- "test-suite:generate:apex:simply",
423
- "simply:apex:generate:test-suite",
424
- "apex:simply:generate:test-suite",
425
- "apex:generate:simply:test-suite",
426
- "apex:generate:test-suite:simply",
427
- "simply:generate:apex:test-suite",
428
- "generate:simply:apex:test-suite",
429
- "generate:apex:simply:test-suite",
430
- "generate:apex:test-suite:simply",
431
- "simply:generate:test-suite:apex",
432
- "generate:simply:test-suite:apex",
433
- "generate:test-suite:simply:apex",
434
- "generate:test-suite:apex:simply"
435
- ]
436
- },
437
- "simply:apex:logs:purge": {
438
- "aliases": [],
439
- "args": {},
440
- "description": "Deletes ApexLog records from the target org. By default all logs are purged; use --where to scope the deletion to a subset of logs.",
441
- "examples": [
442
- "<%= config.bin %> <%= command.id %> --target-org myOrg",
443
- "<%= config.bin %> <%= command.id %> --target-org myOrg --where \"Status = 'Success'\"",
444
- "<%= config.bin %> <%= command.id %> --target-org myOrg --use-bulk-api",
445
- "<%= config.bin %> <%= command.id %> --target-org myOrg --use-bulk-api --wait 60"
446
- ],
447
- "flags": {
448
- "json": {
449
- "description": "Format output as json.",
450
- "helpGroup": "GLOBAL",
451
- "name": "json",
452
- "allowNo": false,
453
- "type": "boolean"
454
- },
455
- "flags-dir": {
456
- "helpGroup": "GLOBAL",
457
- "name": "flags-dir",
458
- "summary": "Import flag values from a directory.",
459
- "hasDynamicHelp": false,
460
- "multiple": false,
461
- "type": "option"
462
- },
463
- "api-version": {
464
- "description": "Override the api version used for api requests made by this command",
465
- "name": "api-version",
466
- "hasDynamicHelp": false,
467
- "multiple": false,
468
- "type": "option"
469
- },
470
- "target-org": {
471
- "char": "o",
472
- "name": "target-org",
473
- "noCacheDefault": true,
474
- "required": true,
475
- "summary": "Username or alias of the target org. Not required if the `target-org` configuration variable is already set.",
476
- "hasDynamicHelp": true,
477
- "multiple": false,
478
- "type": "option"
479
- },
480
- "where": {
481
- "char": "w",
482
- "description": "A WHERE clause used to filter which ApexLog records are purged (e.g. \"Status = 'Success'\").",
483
- "name": "where",
484
- "summary": "SOQL WHERE clause",
485
- "hasDynamicHelp": false,
486
- "multiple": false,
487
- "type": "option"
488
- },
489
- "use-bulk-api": {
490
- "char": "b",
491
- "description": "Runs the whole purge as two Bulk API v2 jobs instead of a Tooling API query followed by chunked REST deletes. Bulk API processes the deletion asynchronously and does not consume the org's REST API request limit, which suits purges of tens of thousands of logs. For small purges the default REST path is faster, since it avoids the overhead of creating, uploading, and polling a job.",
492
- "name": "use-bulk-api",
493
- "summary": "Use Bulk API v2 to query and delete the logs.",
494
- "allowNo": false,
495
- "type": "boolean"
496
- },
497
- "wait": {
498
- "description": "Only applies with --use-bulk-api. The command polls the query and delete jobs until they complete or this timeout elapses, then throws.",
499
- "name": "wait",
500
- "summary": "Number of minutes to wait for the Bulk API jobs to finish.",
501
- "hasDynamicHelp": true,
502
- "multiple": false,
503
- "type": "option"
504
- }
505
- },
506
- "hasDynamicHelp": true,
507
- "hiddenAliases": [],
508
- "id": "simply:apex:logs:purge",
509
- "pluginAlias": "@simplysf/simply-apex",
510
- "pluginName": "@simplysf/simply-apex",
511
- "pluginType": "core",
512
- "strict": true,
513
- "summary": "Purge Apex debug logs.",
514
- "enableJsonFlag": true,
515
- "isESM": true,
516
- "relativePath": [
517
- "lib",
518
- "commands",
519
- "simply",
520
- "apex",
521
- "logs",
522
- "purge.js"
523
- ],
524
- "aliasPermutations": [],
525
- "permutations": [
526
- "simply:apex:logs:purge",
527
- "apex:simply:logs:purge",
528
- "apex:logs:simply:purge",
529
- "apex:logs:purge:simply",
530
- "simply:logs:apex:purge",
531
- "logs:simply:apex:purge",
532
- "logs:apex:simply:purge",
533
- "logs:apex:purge:simply",
534
- "simply:logs:purge:apex",
535
- "logs:simply:purge:apex",
536
- "logs:purge:simply:apex",
537
- "logs:purge:apex:simply",
538
- "simply:apex:purge:logs",
539
- "apex:simply:purge:logs",
540
- "apex:purge:simply:logs",
541
- "apex:purge:logs:simply",
542
- "simply:purge:apex:logs",
543
- "purge:simply:apex:logs",
544
- "purge:apex:simply:logs",
545
- "purge:apex:logs:simply",
546
- "simply:purge:logs:apex",
547
- "purge:simply:logs:apex",
548
- "purge:logs:simply:apex",
549
- "purge:logs:apex:simply"
550
- ]
551
551
  }
552
552
  },
553
- "version": "1.8.14"
553
+ "version": "1.8.16"
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": "1.8.14",
4
+ "version": "1.8.16",
5
5
  "author": "@ClayChipps",
6
6
  "homepage": "https://github.com/SimplySF/simply-plugins",
7
7
  "bugs": "https://github.com/SimplySF/simply-plugins/issues",
@@ -71,7 +71,7 @@
71
71
  "@salesforce/core": "^8.30.0",
72
72
  "@salesforce/kit": "^3.2.6",
73
73
  "@salesforce/sf-plugins-core": "^12.2.16",
74
- "@simplysf/simply-apex-core": "^0.3.11",
74
+ "@simplysf/simply-apex-core": "^0.3.16",
75
75
  "@simplysf/simply-core": "^1.6.7",
76
76
  "@simplysf/simply-plugin-kit": "^1.0.9"
77
77
  },
@@ -212,5 +212,5 @@
212
212
  "output": []
213
213
  }
214
214
  },
215
- "gitHead": "ed47c90787cbc2e2f98e07a00ca05fbe918baa4c"
215
+ "gitHead": "7bd4cc96688ad9379ae8440a6a945f61d1d004bc"
216
216
  }