sfdx-jayree 4.8.1 → 4.8.3
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/CHANGELOG.md +19 -0
- package/README.md +100 -71
- package/lib/hooks/changelog.js +0 -1
- package/lib/hooks/changelog.js.map +1 -1
- package/oclif.manifest.json +2 -168
- package/package.json +13 -23
- package/lib/commands/jayree/flowtestcoverage.d.ts +0 -11
- package/lib/commands/jayree/flowtestcoverage.js +0 -80
- package/lib/commands/jayree/flowtestcoverage.js.map +0 -1
- package/lib/commands/jayree/org/settings.d.ts +0 -14
- package/lib/commands/jayree/org/settings.js +0 -260
- package/lib/commands/jayree/org/settings.js.map +0 -1
- package/lib/commands/jayree/org/streaming.d.ts +0 -12
- package/lib/commands/jayree/org/streaming.js +0 -48
- package/lib/commands/jayree/org/streaming.js.map +0 -1
- package/lib/commands/jayree/version.d.ts +0 -6
- package/lib/commands/jayree/version.js +0 -42
- package/lib/commands/jayree/version.js.map +0 -1
- package/messages/flowtestcoverage.json +0 -3
- package/messages/scratchorgsettings.json +0 -5
- package/messages/streaming.json +0 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,22 @@
|
|
|
1
|
+
## [4.8.3](https://github.com/jayree/sfdx-jayree-plugin/compare/v4.8.2...v4.8.3) (2023-05-22)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* **deps:** bump @jayree/sfdx-plugin-org from 1.0.4 to 1.1.0 ([#791](https://github.com/jayree/sfdx-jayree-plugin/issues/791)) ([2cb44d5](https://github.com/jayree/sfdx-jayree-plugin/commit/2cb44d57d096c0d35db95717222df7eef3d7be5c))
|
|
7
|
+
* **deps:** bump @jayree/sfdx-plugin-source from 1.2.4 to 1.3.0 ([#790](https://github.com/jayree/sfdx-jayree-plugin/issues/790)) ([eb365fc](https://github.com/jayree/sfdx-jayree-plugin/commit/eb365fc5370853d43fc3561eda022f17489a5602))
|
|
8
|
+
* **deps:** bump @salesforce/source-deploy-retrieve from 8.5.1 to 8.5.2 ([#792](https://github.com/jayree/sfdx-jayree-plugin/issues/792)) ([e93fab4](https://github.com/jayree/sfdx-jayree-plugin/commit/e93fab452007eacc96285d41927bffa2f0208a8f))
|
|
9
|
+
|
|
10
|
+
## [4.8.2](https://github.com/jayree/sfdx-jayree-plugin/compare/v4.8.1...v4.8.2) (2023-05-19)
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
### Bug Fixes
|
|
14
|
+
|
|
15
|
+
* **deps:** bump @jayree/sfdx-plugin-manifest from 3.0.16 to 3.0.19 ([#779](https://github.com/jayree/sfdx-jayree-plugin/issues/779)) ([7f091f2](https://github.com/jayree/sfdx-jayree-plugin/commit/7f091f275fbd31a14a0c06b530e243778aed6591))
|
|
16
|
+
* **deps:** bump @jayree/sfdx-plugin-org from 1.0.3 to 1.0.4 ([#787](https://github.com/jayree/sfdx-jayree-plugin/issues/787)) ([8df2ae4](https://github.com/jayree/sfdx-jayree-plugin/commit/8df2ae4ec4f9c8a9a92c195a881fc1b927db708b))
|
|
17
|
+
* **deps:** bump @jayree/sfdx-plugin-prettier from 1.3.1 to 1.3.2 ([#786](https://github.com/jayree/sfdx-jayree-plugin/issues/786)) ([5cb63f5](https://github.com/jayree/sfdx-jayree-plugin/commit/5cb63f5f5b19d3c442b66084da10b7faceeda4bf))
|
|
18
|
+
* **deps:** bump @jayree/sfdx-plugin-source from 1.2.3 to 1.2.4 ([#784](https://github.com/jayree/sfdx-jayree-plugin/issues/784)) ([2560b47](https://github.com/jayree/sfdx-jayree-plugin/commit/2560b471c9a317f504ac018a96dcc29747c9abe8))
|
|
19
|
+
|
|
1
20
|
## [4.8.1](https://github.com/jayree/sfdx-jayree-plugin/compare/v4.8.0...v4.8.1) (2023-05-16)
|
|
2
21
|
|
|
3
22
|
|
package/README.md
CHANGED
|
@@ -18,7 +18,7 @@ sfdx plugins:install @jayree/sfdx-plugin-source
|
|
|
18
18
|
## Commands
|
|
19
19
|
|
|
20
20
|
<!-- commands -->
|
|
21
|
-
* [`sfdx jayree:
|
|
21
|
+
* [`sfdx jayree:flow:get:coverage`](#sfdx-jayreeflowgetcoverage)
|
|
22
22
|
* [`sfdx jayree:manifest:cleanup`](#sfdx-jayreemanifestcleanup)
|
|
23
23
|
* [`sfdx jayree:manifest:generate`](#sfdx-jayreemanifestgenerate)
|
|
24
24
|
* [`sfdx jayree:manifest:git:diff`](#sfdx-jayreemanifestgitdiff)
|
|
@@ -26,22 +26,22 @@ sfdx plugins:install @jayree/sfdx-plugin-source
|
|
|
26
26
|
* [`sfdx jayree:org:configure`](#sfdx-jayreeorgconfigure)
|
|
27
27
|
* [`sfdx jayree:org:configure:country`](#sfdx-jayreeorgconfigurecountry)
|
|
28
28
|
* [`sfdx jayree:org:configure:state`](#sfdx-jayreeorgconfigurestate)
|
|
29
|
-
* [`sfdx jayree:org:settings`](#sfdx-
|
|
30
|
-
* [`sfdx jayree:org:
|
|
29
|
+
* [`sfdx jayree:org:get:settings`](#sfdx-jayreeorggetsettings)
|
|
30
|
+
* [`sfdx jayree:org:stream`](#sfdx-jayreeorgstream)
|
|
31
|
+
* [`sfdx jayree:project:compare:snapshot`](#sfdx-jayreeprojectcomparesnapshot)
|
|
31
32
|
* [`sfdx jayree:project:fix`](#sfdx-jayreeprojectfix)
|
|
32
|
-
* [`sfdx jayree:
|
|
33
|
-
* [`sfdx jayree:
|
|
34
|
-
* [`sfdx jayree:
|
|
35
|
-
* [`sfdx jayree:
|
|
36
|
-
* [`sfdx jayree:source:tracking:store:set`](#sfdx-jayreesourcetrackingstoreset)
|
|
33
|
+
* [`sfdx jayree:project:generate:snapshot`](#sfdx-jayreeprojectgeneratesnapshot)
|
|
34
|
+
* [`sfdx jayree:project:list:tracking`](#sfdx-jayreeprojectlisttracking)
|
|
35
|
+
* [`sfdx jayree:project:store:tracking:get`](#sfdx-jayreeprojectstoretrackingget)
|
|
36
|
+
* [`sfdx jayree:project:store:tracking:set`](#sfdx-jayreeprojectstoretrackingset)
|
|
37
37
|
|
|
38
|
-
### `sfdx jayree:
|
|
38
|
+
### `sfdx jayree:flow:get:coverage`
|
|
39
39
|
|
|
40
|
-
|
|
40
|
+
Check the flow test coverage of an Org.
|
|
41
41
|
|
|
42
42
|
```
|
|
43
43
|
USAGE
|
|
44
|
-
$ sfdx jayree:
|
|
44
|
+
$ sfdx jayree:flow:get:coverage -o <value> [--json] [--api-version <value>]
|
|
45
45
|
|
|
46
46
|
FLAGS
|
|
47
47
|
-o, --target-org=<value> (required) Username or alias of the target org.
|
|
@@ -50,6 +50,9 @@ FLAGS
|
|
|
50
50
|
GLOBAL FLAGS
|
|
51
51
|
--json Format output as json.
|
|
52
52
|
|
|
53
|
+
ALIASES
|
|
54
|
+
$ sfdx jayree:flowtestcoverage
|
|
55
|
+
|
|
53
56
|
EXAMPLES
|
|
54
57
|
$ sfdx jayree:flowtestcoverage
|
|
55
58
|
=== Flow Test Coverage
|
|
@@ -57,7 +60,7 @@ EXAMPLES
|
|
|
57
60
|
...
|
|
58
61
|
```
|
|
59
62
|
|
|
60
|
-
_See code: [
|
|
63
|
+
_See code: [@jayree/sfdx-plugin-org](https://github.com/jayree/sfdx-plugin-org/blob/v1.1.0/src/commands/jayree/flow/get/coverage.ts)_
|
|
61
64
|
|
|
62
65
|
### `sfdx jayree:manifest:cleanup`
|
|
63
66
|
|
|
@@ -85,7 +88,7 @@ EXAMPLES
|
|
|
85
88
|
$ sfdx jayree:manifest:cleanup --manifest=package.xml --file=packageignore.xml
|
|
86
89
|
```
|
|
87
90
|
|
|
88
|
-
_See code: [@jayree/sfdx-plugin-manifest](https://github.com/jayree/sfdx-plugin-manifest/blob/v3.0.
|
|
91
|
+
_See code: [@jayree/sfdx-plugin-manifest](https://github.com/jayree/sfdx-plugin-manifest/blob/v3.0.19/src/commands/jayree/manifest/cleanup.ts)_
|
|
89
92
|
|
|
90
93
|
### `sfdx jayree:manifest:generate`
|
|
91
94
|
|
|
@@ -121,7 +124,7 @@ EXAMPLES
|
|
|
121
124
|
<Package xmlns='http://soap.sforce.com/2006/04/metadata'>...</Package>
|
|
122
125
|
```
|
|
123
126
|
|
|
124
|
-
_See code: [@jayree/sfdx-plugin-manifest](https://github.com/jayree/sfdx-plugin-manifest/blob/v3.0.
|
|
127
|
+
_See code: [@jayree/sfdx-plugin-manifest](https://github.com/jayree/sfdx-plugin-manifest/blob/v3.0.19/src/commands/jayree/manifest/generate.ts)_
|
|
125
128
|
|
|
126
129
|
### `sfdx jayree:manifest:git:diff`
|
|
127
130
|
|
|
@@ -203,7 +206,7 @@ FLAG DESCRIPTIONS
|
|
|
203
206
|
The location can be an absolute path or relative to the current working directory.
|
|
204
207
|
```
|
|
205
208
|
|
|
206
|
-
_See code: [@jayree/sfdx-plugin-manifest](https://github.com/jayree/sfdx-plugin-manifest/blob/v3.0.
|
|
209
|
+
_See code: [@jayree/sfdx-plugin-manifest](https://github.com/jayree/sfdx-plugin-manifest/blob/v3.0.19/src/commands/jayree/manifest/git/diff.ts)_
|
|
207
210
|
|
|
208
211
|
### `sfdx jayree:manifest:legacy:git:diff`
|
|
209
212
|
|
|
@@ -281,11 +284,11 @@ FLAG DESCRIPTIONS
|
|
|
281
284
|
The location can be an absolute path or relative to the current working directory.
|
|
282
285
|
```
|
|
283
286
|
|
|
284
|
-
_See code: [@jayree/sfdx-plugin-manifest](https://github.com/jayree/sfdx-plugin-manifest/blob/v3.0.
|
|
287
|
+
_See code: [@jayree/sfdx-plugin-manifest](https://github.com/jayree/sfdx-plugin-manifest/blob/v3.0.19/src/commands/jayree/manifest/legacy/git/diff.ts)_
|
|
285
288
|
|
|
286
289
|
### `sfdx jayree:org:configure`
|
|
287
290
|
|
|
288
|
-
|
|
291
|
+
Make configuration changes that are not covered by the metadata API.
|
|
289
292
|
|
|
290
293
|
```
|
|
291
294
|
USAGE
|
|
@@ -293,18 +296,18 @@ USAGE
|
|
|
293
296
|
|
|
294
297
|
FLAGS
|
|
295
298
|
-o, --target-org=<value> (required) Username or alias of the target org.
|
|
296
|
-
-t, --tasks=<value>...
|
|
299
|
+
-t, --tasks=<value>... List of task titles, if no tasks are specified, all tasks marked as active will be executed.
|
|
297
300
|
--api-version=<value> Override the api version used for api requests made by this command
|
|
298
|
-
--concurrent
|
|
301
|
+
--concurrent Execute tasks in parallel.
|
|
299
302
|
|
|
300
303
|
GLOBAL FLAGS
|
|
301
304
|
--json Format output as json.
|
|
302
305
|
|
|
303
306
|
DESCRIPTION
|
|
304
|
-
|
|
307
|
+
Make configuration changes that are not covered by the metadata API.
|
|
305
308
|
See example configuration on how to define tasks
|
|
306
309
|
|
|
307
|
-
|
|
310
|
+
Make configuration changes that are not covered by the metadata API.
|
|
308
311
|
See example configuration on how to define tasks
|
|
309
312
|
|
|
310
313
|
EXAMPLES
|
|
@@ -314,7 +317,7 @@ EXAMPLES
|
|
|
314
317
|
$ sfdx jayree:org:configure --concurrent --tasks="Asset Settings","Activity Settings"
|
|
315
318
|
```
|
|
316
319
|
|
|
317
|
-
_See code: [@jayree/sfdx-plugin-org](https://github.com/jayree/sfdx-plugin-org/blob/v1.0
|
|
320
|
+
_See code: [@jayree/sfdx-plugin-org](https://github.com/jayree/sfdx-plugin-org/blob/v1.1.0/src/commands/jayree/org/configure/index.ts)_
|
|
318
321
|
|
|
319
322
|
### `sfdx jayree:org:configure:country`
|
|
320
323
|
|
|
@@ -337,7 +340,7 @@ DESCRIPTION
|
|
|
337
340
|
update country integration values in the State/Country Picklists
|
|
338
341
|
```
|
|
339
342
|
|
|
340
|
-
_See code: [@jayree/sfdx-plugin-org](https://github.com/jayree/sfdx-plugin-org/blob/v1.0
|
|
343
|
+
_See code: [@jayree/sfdx-plugin-org](https://github.com/jayree/sfdx-plugin-org/blob/v1.1.0/src/commands/jayree/org/configure/country.ts)_
|
|
341
344
|
|
|
342
345
|
### `sfdx jayree:org:configure:state`
|
|
343
346
|
|
|
@@ -351,10 +354,10 @@ USAGE
|
|
|
351
354
|
FLAGS
|
|
352
355
|
-o, --target-org=<value> (required) Username or alias of the target org.
|
|
353
356
|
--api-version=<value> Override the api version used for api requests made by this command
|
|
354
|
-
--category=<value> Subdivision category
|
|
355
|
-
--concurrent=<value> [default: 1] execute tasks in parallel
|
|
356
|
-
--country-code=<value> Alpha-2 code
|
|
357
|
-
--language=<value> Language code
|
|
357
|
+
--category=<value> Subdivision category.
|
|
358
|
+
--concurrent=<value> [default: 1] execute tasks in parallel.
|
|
359
|
+
--country-code=<value> Alpha-2 code.
|
|
360
|
+
--language=<value> Language code.
|
|
358
361
|
|
|
359
362
|
GLOBAL FLAGS
|
|
360
363
|
--json Format output as json.
|
|
@@ -365,141 +368,161 @@ DESCRIPTION
|
|
|
365
368
|
import (create/update) states into the State/Country Picklists
|
|
366
369
|
```
|
|
367
370
|
|
|
368
|
-
_See code: [@jayree/sfdx-plugin-org](https://github.com/jayree/sfdx-plugin-org/blob/v1.0
|
|
371
|
+
_See code: [@jayree/sfdx-plugin-org](https://github.com/jayree/sfdx-plugin-org/blob/v1.1.0/src/commands/jayree/org/configure/state.ts)_
|
|
369
372
|
|
|
370
|
-
### `sfdx jayree:org:settings`
|
|
373
|
+
### `sfdx jayree:org:get:settings`
|
|
371
374
|
|
|
372
|
-
|
|
375
|
+
Write the current settings from an Org to a scratch org def file.
|
|
373
376
|
|
|
374
377
|
```
|
|
375
378
|
USAGE
|
|
376
|
-
$ sfdx jayree:org:settings -o <value> [--json] [-w] [-f <value>]
|
|
379
|
+
$ sfdx jayree:org:get:settings -o <value> [--json] [--api-version <value>] [-w] [-f <value>]
|
|
377
380
|
|
|
378
381
|
FLAGS
|
|
379
|
-
-f, --file=<value>
|
|
382
|
+
-f, --file=<value> Write to 'file' instead of project-scratch-def.json.
|
|
380
383
|
-o, --target-org=<value> (required) Username or alias of the target org.
|
|
381
|
-
-w, --writetoprojectscratchdeffile
|
|
384
|
+
-w, --writetoprojectscratchdeffile Write output to project-scratch-def.json file.
|
|
385
|
+
--api-version=<value> Override the api version used for api requests made by this command
|
|
382
386
|
|
|
383
387
|
GLOBAL FLAGS
|
|
384
388
|
--json Format output as json.
|
|
385
389
|
|
|
390
|
+
ALIASES
|
|
391
|
+
$ sfdx jayree:org:settings
|
|
392
|
+
|
|
386
393
|
EXAMPLES
|
|
387
394
|
$ sfdx jayree:org:settings
|
|
388
395
|
$ sfdx jayree:org:settings -u me@my.org
|
|
389
396
|
$ sfdx jayree:org:settings -u MyTestOrg1 -w
|
|
390
397
|
```
|
|
391
398
|
|
|
392
|
-
_See code: [
|
|
399
|
+
_See code: [@jayree/sfdx-plugin-org](https://github.com/jayree/sfdx-plugin-org/blob/v1.1.0/src/commands/jayree/org/get/settings.ts)_
|
|
393
400
|
|
|
394
|
-
### `sfdx jayree:org:
|
|
401
|
+
### `sfdx jayree:org:stream`
|
|
395
402
|
|
|
396
|
-
|
|
403
|
+
Listen to streaming api and platform events.
|
|
397
404
|
|
|
398
405
|
```
|
|
399
406
|
USAGE
|
|
400
|
-
$ sfdx jayree:org:
|
|
407
|
+
$ sfdx jayree:org:stream -o <value> -c <value> [--json] [--api-version <value>] [-r <value>]
|
|
401
408
|
|
|
402
409
|
FLAGS
|
|
410
|
+
-c, --channel=<value> (required) The event name.
|
|
403
411
|
-o, --target-org=<value> (required) Username or alias of the target org.
|
|
404
|
-
-
|
|
412
|
+
-r, --replay-id=<value> Receive all stored events after the event specified by the replayId value and new events.
|
|
413
|
+
[default: -1] Receive new events that are broadcast after the command subscribes. [-2]
|
|
414
|
+
Receive all event, including past events that are within the retention window and new
|
|
415
|
+
events.
|
|
405
416
|
--api-version=<value> Override the api version used for api requests made by this command
|
|
406
417
|
|
|
407
418
|
GLOBAL FLAGS
|
|
408
419
|
--json Format output as json.
|
|
409
420
|
|
|
421
|
+
ALIASES
|
|
422
|
+
$ sfdx jayree:org:streaming
|
|
423
|
+
|
|
410
424
|
EXAMPLES
|
|
411
|
-
$ sfdx jayree
|
|
425
|
+
$ sfdx jayree org stream --channel=/event/eventName__e
|
|
412
426
|
...
|
|
413
427
|
```
|
|
414
428
|
|
|
415
|
-
_See code: [
|
|
429
|
+
_See code: [@jayree/sfdx-plugin-org](https://github.com/jayree/sfdx-plugin-org/blob/v1.1.0/src/commands/jayree/org/stream.ts)_
|
|
416
430
|
|
|
417
|
-
### `sfdx jayree:project:
|
|
431
|
+
### `sfdx jayree:project:compare:snapshot`
|
|
418
432
|
|
|
419
|
-
|
|
433
|
+
Compare sfdx source snapshot files.
|
|
420
434
|
|
|
421
435
|
```
|
|
422
436
|
USAGE
|
|
423
|
-
$ sfdx jayree:project:
|
|
437
|
+
$ sfdx jayree:project:compare:snapshot [--json] [--filepath <value>]
|
|
424
438
|
|
|
425
439
|
FLAGS
|
|
426
|
-
|
|
427
|
-
-t, --task=<value>... Comma-separated list of task names listed in sfdx-project.json.
|
|
440
|
+
--filepath=<value> [default: ./sfdx-source-snapshot.json] Path of the generated snapshot file.
|
|
428
441
|
|
|
429
442
|
GLOBAL FLAGS
|
|
430
443
|
--json Format output as json.
|
|
431
444
|
|
|
432
445
|
ALIASES
|
|
433
|
-
$ sfdx jayree:source:
|
|
446
|
+
$ sfdx jayree:source:snapshot:compare
|
|
434
447
|
```
|
|
435
448
|
|
|
436
|
-
_See code: [@jayree/sfdx-plugin-source](https://github.com/jayree/sfdx-plugin-source/blob/v1.
|
|
449
|
+
_See code: [@jayree/sfdx-plugin-source](https://github.com/jayree/sfdx-plugin-source/blob/v1.3.0/src/commands/jayree/project/compare/snapshot.ts)_
|
|
437
450
|
|
|
438
|
-
### `sfdx jayree:
|
|
451
|
+
### `sfdx jayree:project:fix`
|
|
439
452
|
|
|
440
|
-
|
|
453
|
+
Fix retrieved metadata.
|
|
441
454
|
|
|
442
455
|
```
|
|
443
456
|
USAGE
|
|
444
|
-
$ sfdx jayree:
|
|
457
|
+
$ sfdx jayree:project:fix [--json] [-o <value>] [-t <value>]
|
|
445
458
|
|
|
446
459
|
FLAGS
|
|
447
|
-
--
|
|
460
|
+
-o, --target-org=<value>
|
|
461
|
+
-t, --task=<value>... Task name(s) listed in sfdx-project.json.
|
|
448
462
|
|
|
449
463
|
GLOBAL FLAGS
|
|
450
464
|
--json Format output as json.
|
|
465
|
+
|
|
466
|
+
ALIASES
|
|
467
|
+
$ sfdx jayree:source:fix
|
|
451
468
|
```
|
|
452
469
|
|
|
453
|
-
_See code: [@jayree/sfdx-plugin-source](https://github.com/jayree/sfdx-plugin-source/blob/v1.
|
|
470
|
+
_See code: [@jayree/sfdx-plugin-source](https://github.com/jayree/sfdx-plugin-source/blob/v1.3.0/src/commands/jayree/project/fix.ts)_
|
|
454
471
|
|
|
455
|
-
### `sfdx jayree:
|
|
472
|
+
### `sfdx jayree:project:generate:snapshot`
|
|
456
473
|
|
|
457
|
-
|
|
474
|
+
Generate sfdx source snapshot files.
|
|
458
475
|
|
|
459
476
|
```
|
|
460
477
|
USAGE
|
|
461
|
-
$ sfdx jayree:
|
|
478
|
+
$ sfdx jayree:project:generate:snapshot [--json] [--filepath <value>]
|
|
462
479
|
|
|
463
480
|
FLAGS
|
|
464
|
-
--filepath=<value> [default: ./sfdx-source-snapshot.json]
|
|
481
|
+
--filepath=<value> [default: ./sfdx-source-snapshot.json] Path to save the generated snapshot file.
|
|
465
482
|
|
|
466
483
|
GLOBAL FLAGS
|
|
467
484
|
--json Format output as json.
|
|
485
|
+
|
|
486
|
+
ALIASES
|
|
487
|
+
$ sfdx jayree:source:snapshot:generate
|
|
468
488
|
```
|
|
469
489
|
|
|
470
|
-
_See code: [@jayree/sfdx-plugin-source](https://github.com/jayree/sfdx-plugin-source/blob/v1.
|
|
490
|
+
_See code: [@jayree/sfdx-plugin-source](https://github.com/jayree/sfdx-plugin-source/blob/v1.3.0/src/commands/jayree/project/generate/snapshot.ts)_
|
|
471
491
|
|
|
472
|
-
### `sfdx jayree:
|
|
492
|
+
### `sfdx jayree:project:list:tracking`
|
|
473
493
|
|
|
474
|
-
|
|
494
|
+
List changes in a scratch org by remote revision counter number.
|
|
475
495
|
|
|
476
496
|
```
|
|
477
497
|
USAGE
|
|
478
|
-
$ sfdx jayree:
|
|
498
|
+
$ sfdx jayree:project:list:tracking -o <value> [--json] [--api-version <value>] [-r <value>]
|
|
479
499
|
|
|
480
500
|
FLAGS
|
|
481
501
|
-o, --target-org=<value> (required) Username or alias of the target org.
|
|
482
|
-
-r, --revision=<value>
|
|
502
|
+
-r, --revision=<value> Start at a specific revision counter number.
|
|
483
503
|
--api-version=<value> Override the api version used for api requests made by this command
|
|
484
504
|
|
|
485
505
|
GLOBAL FLAGS
|
|
486
506
|
--json Format output as json.
|
|
487
507
|
|
|
508
|
+
ALIASES
|
|
509
|
+
$ sfdx jayree:source:tracking:list
|
|
510
|
+
|
|
488
511
|
EXAMPLES
|
|
489
512
|
$ sfdx jayree:source:tracking:list
|
|
490
513
|
$ sfdx jayree:source:tracking:list -u me@my.org
|
|
491
514
|
$ sfdx jayree:source:tracking:list -u me@my.org -r 101
|
|
492
515
|
```
|
|
493
516
|
|
|
494
|
-
_See code: [@jayree/sfdx-plugin-source](https://github.com/jayree/sfdx-plugin-source/blob/v1.
|
|
517
|
+
_See code: [@jayree/sfdx-plugin-source](https://github.com/jayree/sfdx-plugin-source/blob/v1.3.0/src/commands/jayree/project/list/tracking.ts)_
|
|
495
518
|
|
|
496
|
-
### `sfdx jayree:
|
|
519
|
+
### `sfdx jayree:project:store:tracking:get`
|
|
497
520
|
|
|
498
|
-
|
|
521
|
+
Get stored revision counter number.
|
|
499
522
|
|
|
500
523
|
```
|
|
501
524
|
USAGE
|
|
502
|
-
$ sfdx jayree:
|
|
525
|
+
$ sfdx jayree:project:store:tracking:get -o <value> [--json]
|
|
503
526
|
|
|
504
527
|
FLAGS
|
|
505
528
|
-o, --target-org=<value> (required) Username or alias of the target org.
|
|
@@ -507,36 +530,42 @@ FLAGS
|
|
|
507
530
|
GLOBAL FLAGS
|
|
508
531
|
--json Format output as json.
|
|
509
532
|
|
|
533
|
+
ALIASES
|
|
534
|
+
$ sfdx jayree:source:tracking:store:get
|
|
535
|
+
|
|
510
536
|
EXAMPLES
|
|
511
537
|
$ sfdx jayree:source:tracking:store:get
|
|
512
538
|
$ sfdx jayree:source:tracking:store:get -u me@my.org
|
|
513
539
|
```
|
|
514
540
|
|
|
515
|
-
_See code: [@jayree/sfdx-plugin-source](https://github.com/jayree/sfdx-plugin-source/blob/v1.
|
|
541
|
+
_See code: [@jayree/sfdx-plugin-source](https://github.com/jayree/sfdx-plugin-source/blob/v1.3.0/src/commands/jayree/project/store/tracking/get.ts)_
|
|
516
542
|
|
|
517
|
-
### `sfdx jayree:
|
|
543
|
+
### `sfdx jayree:project:store:tracking:set`
|
|
518
544
|
|
|
519
|
-
|
|
545
|
+
Store revision counter number.
|
|
520
546
|
|
|
521
547
|
```
|
|
522
548
|
USAGE
|
|
523
|
-
$ sfdx jayree:
|
|
549
|
+
$ sfdx jayree:project:store:tracking:set -o <value> [--json] [--api-version <value>] [-r <value>]
|
|
524
550
|
|
|
525
551
|
FLAGS
|
|
526
552
|
-o, --target-org=<value> (required) Username or alias of the target org.
|
|
527
|
-
-r, --revision=<value>
|
|
553
|
+
-r, --revision=<value> Revision counter number (default: remote revision counter number).
|
|
528
554
|
--api-version=<value> Override the api version used for api requests made by this command
|
|
529
555
|
|
|
530
556
|
GLOBAL FLAGS
|
|
531
557
|
--json Format output as json.
|
|
532
558
|
|
|
559
|
+
ALIASES
|
|
560
|
+
$ sfdx jayree:source:tracking:store:set
|
|
561
|
+
|
|
533
562
|
EXAMPLES
|
|
534
563
|
$ sfdx jayree:source:tracking:store:set
|
|
535
564
|
$ sfdx jayree:source:tracking:store:set -u me@my.org
|
|
536
565
|
$ sfdx jayree:source:tracking:store:set -u MyTestOrg1 -r 101
|
|
537
566
|
```
|
|
538
567
|
|
|
539
|
-
_See code: [@jayree/sfdx-plugin-source](https://github.com/jayree/sfdx-plugin-source/blob/v1.
|
|
568
|
+
_See code: [@jayree/sfdx-plugin-source](https://github.com/jayree/sfdx-plugin-source/blob/v1.3.0/src/commands/jayree/project/store/tracking/set.ts)_
|
|
540
569
|
<!-- commandsstop -->
|
|
541
570
|
|
|
542
571
|
## Hooks
|
package/lib/hooks/changelog.js
CHANGED
|
@@ -4,7 +4,6 @@
|
|
|
4
4
|
* Licensed under the BSD 3-Clause license.
|
|
5
5
|
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
|
|
6
6
|
*/
|
|
7
|
-
/* istanbul ignore file */
|
|
8
7
|
import { join, dirname } from 'node:path';
|
|
9
8
|
import { fileURLToPath } from 'node:url';
|
|
10
9
|
import printChangeLog from '@jayree/changelog';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"changelog.js","sourceRoot":"","sources":["../../src/hooks/changelog.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,
|
|
1
|
+
{"version":3,"file":"changelog.js","sourceRoot":"","sources":["../../src/hooks/changelog.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAC1C,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAEzC,OAAO,cAAc,MAAM,mBAAmB,CAAC;AAC/C,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,gDAAgD;AAChD,MAAM,UAAU,GAAG,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAClD,gDAAgD;AAChD,MAAM,SAAS,GAAG,OAAO,CAAC,UAAU,CAAC,CAAC;AAEtC,4DAA4D;AAC5D,MAAM,CAAC,MAAM,SAAS,GAAmB,KAAK;IAC5C,MAAM,KAAK,GAAG,KAAK,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,GAAG,EAAE,aAAa,EAAE,OAAO,EAAE,QAAQ,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;IAEnF,kEAAkE;IAClE,OAAO,CAAC,IAAI,CAAC,YAAY,EAAE,KAAK,IAAI,EAAE;QACpC,MAAM,OAAO,GAAG,MAAM,cAAc,CAAC,IAAI,CAAC,MAAM,CAAC,QAAQ,EAAE,IAAI,CAAC,SAAS,EAAE,IAAI,EAAE,IAAI,CAAC,EAAE,KAAK,CAAC,CAAC;QAC/F,IAAI,OAAO;YAAE,IAAI,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;IACjC,CAAC,CAAC,CAAC;AACL,CAAC,CAAC"}
|
package/oclif.manifest.json
CHANGED
|
@@ -1,170 +1,4 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "4.8.
|
|
3
|
-
"commands": {
|
|
4
|
-
"jayree:flowtestcoverage": {
|
|
5
|
-
"id": "jayree:flowtestcoverage",
|
|
6
|
-
"summary": "check the flow test coverage of an org",
|
|
7
|
-
"strict": true,
|
|
8
|
-
"pluginName": "sfdx-jayree",
|
|
9
|
-
"pluginAlias": "sfdx-jayree",
|
|
10
|
-
"pluginType": "core",
|
|
11
|
-
"aliases": [],
|
|
12
|
-
"examples": [
|
|
13
|
-
"$ sfdx jayree:flowtestcoverage\n=== Flow Test Coverage\nCoverage: 82%\n...\n"
|
|
14
|
-
],
|
|
15
|
-
"flags": {
|
|
16
|
-
"json": {
|
|
17
|
-
"name": "json",
|
|
18
|
-
"type": "boolean",
|
|
19
|
-
"description": "Format output as json.",
|
|
20
|
-
"helpGroup": "GLOBAL",
|
|
21
|
-
"allowNo": false
|
|
22
|
-
},
|
|
23
|
-
"target-org": {
|
|
24
|
-
"name": "target-org",
|
|
25
|
-
"type": "option",
|
|
26
|
-
"char": "o",
|
|
27
|
-
"summary": "Username or alias of the target org.",
|
|
28
|
-
"required": true,
|
|
29
|
-
"multiple": false,
|
|
30
|
-
"aliases": [
|
|
31
|
-
"targetusername",
|
|
32
|
-
"u"
|
|
33
|
-
]
|
|
34
|
-
},
|
|
35
|
-
"api-version": {
|
|
36
|
-
"name": "api-version",
|
|
37
|
-
"type": "option",
|
|
38
|
-
"description": "Override the api version used for api requests made by this command",
|
|
39
|
-
"multiple": false,
|
|
40
|
-
"aliases": [
|
|
41
|
-
"apiversion"
|
|
42
|
-
]
|
|
43
|
-
}
|
|
44
|
-
},
|
|
45
|
-
"args": {},
|
|
46
|
-
"hasDynamicHelp": true
|
|
47
|
-
},
|
|
48
|
-
"jayree:version": {
|
|
49
|
-
"id": "jayree:version",
|
|
50
|
-
"strict": true,
|
|
51
|
-
"pluginName": "sfdx-jayree",
|
|
52
|
-
"pluginAlias": "sfdx-jayree",
|
|
53
|
-
"pluginType": "core",
|
|
54
|
-
"hidden": true,
|
|
55
|
-
"aliases": [],
|
|
56
|
-
"flags": {
|
|
57
|
-
"json": {
|
|
58
|
-
"name": "json",
|
|
59
|
-
"type": "boolean",
|
|
60
|
-
"description": "Format output as json.",
|
|
61
|
-
"helpGroup": "GLOBAL",
|
|
62
|
-
"allowNo": false
|
|
63
|
-
}
|
|
64
|
-
},
|
|
65
|
-
"args": {}
|
|
66
|
-
},
|
|
67
|
-
"jayree:org:settings": {
|
|
68
|
-
"id": "jayree:org:settings",
|
|
69
|
-
"summary": "write the current settings from an Org to a scratch org def file",
|
|
70
|
-
"strict": true,
|
|
71
|
-
"pluginName": "sfdx-jayree",
|
|
72
|
-
"pluginAlias": "sfdx-jayree",
|
|
73
|
-
"pluginType": "core",
|
|
74
|
-
"aliases": [],
|
|
75
|
-
"examples": [
|
|
76
|
-
"$ sfdx jayree:org:settings\n$ sfdx jayree:org:settings -u me@my.org\n$ sfdx jayree:org:settings -u MyTestOrg1 -w"
|
|
77
|
-
],
|
|
78
|
-
"flags": {
|
|
79
|
-
"json": {
|
|
80
|
-
"name": "json",
|
|
81
|
-
"type": "boolean",
|
|
82
|
-
"description": "Format output as json.",
|
|
83
|
-
"helpGroup": "GLOBAL",
|
|
84
|
-
"allowNo": false
|
|
85
|
-
},
|
|
86
|
-
"target-org": {
|
|
87
|
-
"name": "target-org",
|
|
88
|
-
"type": "option",
|
|
89
|
-
"char": "o",
|
|
90
|
-
"summary": "Username or alias of the target org.",
|
|
91
|
-
"required": true,
|
|
92
|
-
"multiple": false,
|
|
93
|
-
"aliases": [
|
|
94
|
-
"targetusername",
|
|
95
|
-
"u"
|
|
96
|
-
]
|
|
97
|
-
},
|
|
98
|
-
"writetoprojectscratchdeffile": {
|
|
99
|
-
"name": "writetoprojectscratchdeffile",
|
|
100
|
-
"type": "boolean",
|
|
101
|
-
"char": "w",
|
|
102
|
-
"summary": "write output to project-scratch-def.json file",
|
|
103
|
-
"allowNo": false
|
|
104
|
-
},
|
|
105
|
-
"file": {
|
|
106
|
-
"name": "file",
|
|
107
|
-
"type": "option",
|
|
108
|
-
"char": "f",
|
|
109
|
-
"summary": "write to 'file' instead of project-scratch-def.json",
|
|
110
|
-
"multiple": false
|
|
111
|
-
}
|
|
112
|
-
},
|
|
113
|
-
"args": {},
|
|
114
|
-
"requiresProject": true,
|
|
115
|
-
"hasDynamicHelp": true
|
|
116
|
-
},
|
|
117
|
-
"jayree:org:streaming": {
|
|
118
|
-
"id": "jayree:org:streaming",
|
|
119
|
-
"summary": "listen to streaming api and platform events",
|
|
120
|
-
"strict": true,
|
|
121
|
-
"pluginName": "sfdx-jayree",
|
|
122
|
-
"pluginAlias": "sfdx-jayree",
|
|
123
|
-
"pluginType": "core",
|
|
124
|
-
"aliases": [],
|
|
125
|
-
"examples": [
|
|
126
|
-
"$ sfdx jayree:org:streaming --topic=/event/eventName__e\n...\n"
|
|
127
|
-
],
|
|
128
|
-
"flags": {
|
|
129
|
-
"json": {
|
|
130
|
-
"name": "json",
|
|
131
|
-
"type": "boolean",
|
|
132
|
-
"description": "Format output as json.",
|
|
133
|
-
"helpGroup": "GLOBAL",
|
|
134
|
-
"allowNo": false
|
|
135
|
-
},
|
|
136
|
-
"target-org": {
|
|
137
|
-
"name": "target-org",
|
|
138
|
-
"type": "option",
|
|
139
|
-
"char": "o",
|
|
140
|
-
"summary": "Username or alias of the target org.",
|
|
141
|
-
"required": true,
|
|
142
|
-
"multiple": false,
|
|
143
|
-
"aliases": [
|
|
144
|
-
"targetusername",
|
|
145
|
-
"u"
|
|
146
|
-
]
|
|
147
|
-
},
|
|
148
|
-
"api-version": {
|
|
149
|
-
"name": "api-version",
|
|
150
|
-
"type": "option",
|
|
151
|
-
"description": "Override the api version used for api requests made by this command",
|
|
152
|
-
"multiple": false,
|
|
153
|
-
"aliases": [
|
|
154
|
-
"apiversion"
|
|
155
|
-
]
|
|
156
|
-
},
|
|
157
|
-
"topic": {
|
|
158
|
-
"name": "topic",
|
|
159
|
-
"type": "option",
|
|
160
|
-
"char": "p",
|
|
161
|
-
"summary": "topic name",
|
|
162
|
-
"required": true,
|
|
163
|
-
"multiple": false
|
|
164
|
-
}
|
|
165
|
-
},
|
|
166
|
-
"args": {},
|
|
167
|
-
"hasDynamicHelp": true
|
|
168
|
-
}
|
|
169
|
-
}
|
|
2
|
+
"version": "4.8.3",
|
|
3
|
+
"commands": {}
|
|
170
4
|
}
|
package/package.json
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "sfdx-jayree",
|
|
3
3
|
"description": "A Salesforce CLI plugin containing commands and hooks for Salesforce Application Lifecycle Management tasks.",
|
|
4
|
-
"version": "4.8.
|
|
4
|
+
"version": "4.8.3",
|
|
5
5
|
"author": "jayree <jayree.git@icloud.com>",
|
|
6
6
|
"bugs": "https://github.com/jayree/sfdx-jayree-plugin/issues",
|
|
7
7
|
"type": "module",
|
|
8
8
|
"dependencies": {
|
|
9
9
|
"@jayree/changelog": "^1.1.1",
|
|
10
|
-
"@jayree/sfdx-plugin-manifest": "^3.0.
|
|
11
|
-
"@jayree/sfdx-plugin-org": "^1.0
|
|
12
|
-
"@jayree/sfdx-plugin-prettier": "^1.3.
|
|
13
|
-
"@jayree/sfdx-plugin-source": "^1.
|
|
10
|
+
"@jayree/sfdx-plugin-manifest": "^3.0.19",
|
|
11
|
+
"@jayree/sfdx-plugin-org": "^1.1.0",
|
|
12
|
+
"@jayree/sfdx-plugin-prettier": "^1.3.2",
|
|
13
|
+
"@jayree/sfdx-plugin-source": "^1.3.0",
|
|
14
14
|
"@salesforce/sf-plugins-core": "^2.4.3",
|
|
15
|
-
"@salesforce/source-deploy-retrieve": "^8.
|
|
15
|
+
"@salesforce/source-deploy-retrieve": "^8.5.2",
|
|
16
16
|
"debug": "^4.3.4",
|
|
17
17
|
"fast-xml-parser": "^4.2.2",
|
|
18
18
|
"fs-extra": "^11.1.1",
|
|
@@ -27,22 +27,23 @@
|
|
|
27
27
|
"@salesforce/dev-config": "^4.0.1",
|
|
28
28
|
"@salesforce/dev-scripts": "^5.0.1",
|
|
29
29
|
"@salesforce/prettier-config": "^0.0.3",
|
|
30
|
-
"@salesforce/ts-sinon": "^1.4.
|
|
30
|
+
"@salesforce/ts-sinon": "^1.4.7",
|
|
31
|
+
"@types/debug": "^4.1.7",
|
|
31
32
|
"@types/fs-extra": "^11.0.1",
|
|
32
33
|
"@types/jsforce": "^1.11.0",
|
|
33
34
|
"@types/mkdirp": "^1.0.2",
|
|
34
|
-
"@typescript-eslint/eslint-plugin": "^5.59.
|
|
35
|
-
"@typescript-eslint/parser": "^5.59.
|
|
35
|
+
"@typescript-eslint/eslint-plugin": "^5.59.6",
|
|
36
|
+
"@typescript-eslint/parser": "^5.59.6",
|
|
36
37
|
"c8": "^7.13.0",
|
|
37
38
|
"chai": "^4.3.7",
|
|
38
|
-
"eslint": "^8.
|
|
39
|
+
"eslint": "^8.41.0",
|
|
39
40
|
"eslint-config-prettier": "^8.8.0",
|
|
40
41
|
"eslint-config-salesforce": "^2.0.1",
|
|
41
42
|
"eslint-config-salesforce-license": "^0.2.0",
|
|
42
43
|
"eslint-config-salesforce-typescript": "^1.1.1",
|
|
43
44
|
"eslint-plugin-header": "^3.1.1",
|
|
44
45
|
"eslint-plugin-import": "^2.27.5",
|
|
45
|
-
"eslint-plugin-jsdoc": "^44.2.
|
|
46
|
+
"eslint-plugin-jsdoc": "^44.2.4",
|
|
46
47
|
"eslint-plugin-prettier": "^4.2.1",
|
|
47
48
|
"eslint-plugin-sf-plugin": "^1.15.3",
|
|
48
49
|
"husky": "^8.0.3",
|
|
@@ -56,7 +57,7 @@
|
|
|
56
57
|
"prettier": "^2.8.8",
|
|
57
58
|
"pretty-quick": "^3.1.3",
|
|
58
59
|
"shx": "^0.3.4",
|
|
59
|
-
"sinon": "^15.0
|
|
60
|
+
"sinon": "^15.1.0",
|
|
60
61
|
"ts-node": "^10.9.1",
|
|
61
62
|
"typescript": "^5.0.4",
|
|
62
63
|
"wireit": "^0.9.5"
|
|
@@ -105,17 +106,6 @@
|
|
|
105
106
|
"hooks": {
|
|
106
107
|
"update": "./lib/hooks/changelog"
|
|
107
108
|
},
|
|
108
|
-
"topics": {
|
|
109
|
-
"jayree": {
|
|
110
|
-
"name": "jayree",
|
|
111
|
-
"description": "manifest, source, and org automation toolset",
|
|
112
|
-
"subtopics": {
|
|
113
|
-
"org": {
|
|
114
|
-
"description": "manage your orgs"
|
|
115
|
-
}
|
|
116
|
-
}
|
|
117
|
-
}
|
|
118
|
-
},
|
|
119
109
|
"devPlugins": [
|
|
120
110
|
"@oclif/plugin-help",
|
|
121
111
|
"@oclif/plugin-command-snapshot"
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { SfCommand } from '@salesforce/sf-plugins-core';
|
|
2
|
-
import { AnyJson } from '@salesforce/ts-types';
|
|
3
|
-
export default class FlowTestCoverage extends SfCommand<AnyJson> {
|
|
4
|
-
static readonly summary: string;
|
|
5
|
-
static readonly examples: string[];
|
|
6
|
-
static readonly flags: {
|
|
7
|
-
'target-org': import("@oclif/core/lib/interfaces").OptionFlag<import("@salesforce/core").Org, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
|
|
8
|
-
'api-version': import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
|
|
9
|
-
};
|
|
10
|
-
run(): Promise<AnyJson>;
|
|
11
|
-
}
|
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Copyright (c) 2021, jayree
|
|
3
|
-
* All rights reserved.
|
|
4
|
-
* Licensed under the BSD 3-Clause license.
|
|
5
|
-
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
|
|
6
|
-
*/
|
|
7
|
-
import { dirname } from 'node:path';
|
|
8
|
-
import { fileURLToPath } from 'node:url';
|
|
9
|
-
import { SfCommand, requiredOrgFlagWithDeprecations, orgApiVersionFlagWithDeprecations, } from '@salesforce/sf-plugins-core';
|
|
10
|
-
import { Messages } from '@salesforce/core';
|
|
11
|
-
// eslint-disable-next-line no-underscore-dangle
|
|
12
|
-
const __filename = fileURLToPath(import.meta.url);
|
|
13
|
-
// eslint-disable-next-line no-underscore-dangle
|
|
14
|
-
const __dirname = dirname(__filename);
|
|
15
|
-
Messages.importMessagesDirectory(__dirname);
|
|
16
|
-
const messages = Messages.loadMessages('sfdx-jayree', 'flowtestcoverage');
|
|
17
|
-
class FlowTestCoverage extends SfCommand {
|
|
18
|
-
async run() {
|
|
19
|
-
const { flags } = await this.parse(FlowTestCoverage);
|
|
20
|
-
const org = flags['target-org'];
|
|
21
|
-
const conn = org.getConnection(flags['api-version']);
|
|
22
|
-
const query1 = await conn.tooling.query("SELECT count_distinct(DefinitionId) FROM Flow WHERE Status = 'Active' AND(ProcessType = 'AutolaunchedFlow' OR ProcessType = 'Workflow' OR ProcessType = 'CustomEvent' OR ProcessType = 'InvocableProcess')");
|
|
23
|
-
const numberOfActiveAutolaunchedFlowsAndProcesses = query1.records[0]['expr0'];
|
|
24
|
-
const query2 = await conn.tooling.query('SELECT count_distinct(FlowVersionId) FROM FlowTestCoverage');
|
|
25
|
-
const numberOfCoveredActiveAutolaunchedFlowsAndProcesses = query2.records[0]['expr0'];
|
|
26
|
-
const query3 = await conn.tooling.query("SELECT Definition.DeveloperName FROM Flow WHERE Status = 'Active' AND(ProcessType = 'AutolaunchedFlow' OR ProcessType = 'Workflow' OR ProcessType = 'CustomEvent' OR ProcessType = 'InvocableProcess') AND Id NOT IN(SELECT FlowVersionId FROM FlowTestCoverage)");
|
|
27
|
-
const uncovered = query3.records.map((value) => value['Definition']['DeveloperName']);
|
|
28
|
-
const query4 = await conn.tooling.query('SELECT FlowVersion.Definition.DeveloperName FROM FlowTestCoverage GROUP BY FlowVersion.Definition.DeveloperName');
|
|
29
|
-
const covered = query4.records.map((value) => value['DeveloperName']);
|
|
30
|
-
this.styledHeader('Flow Test Coverage');
|
|
31
|
-
this.styledObject({
|
|
32
|
-
'number of active autolaunched flows and processes': numberOfActiveAutolaunchedFlowsAndProcesses,
|
|
33
|
-
'number of covered active autolaunched flows and processes': numberOfCoveredActiveAutolaunchedFlowsAndProcesses,
|
|
34
|
-
Coverage: Math.floor((numberOfCoveredActiveAutolaunchedFlowsAndProcesses / numberOfActiveAutolaunchedFlowsAndProcesses) * 100) + '%',
|
|
35
|
-
});
|
|
36
|
-
const x = [];
|
|
37
|
-
const length = uncovered.length > covered.length ? uncovered.length : covered.length;
|
|
38
|
-
for (let i = 0; i < length; i++) {
|
|
39
|
-
x.push({
|
|
40
|
-
'all active autolaunched flows and processes that don’t have test coverage': uncovered[i],
|
|
41
|
-
'all flows and processes that have test coverage': covered[i],
|
|
42
|
-
});
|
|
43
|
-
}
|
|
44
|
-
this.table(x, {
|
|
45
|
-
TESTCOVERAGE: {
|
|
46
|
-
header: 'all flows and processes that have test coverage',
|
|
47
|
-
get: (row) => row['all flows and processes that have test coverage'],
|
|
48
|
-
},
|
|
49
|
-
NOTESTCOVERAGE: {
|
|
50
|
-
header: 'all active autolaunched flows and processes that don’t have test coverage',
|
|
51
|
-
get: (row) => row['all active autolaunched flows and processes that don’t have test coverage'],
|
|
52
|
-
},
|
|
53
|
-
});
|
|
54
|
-
if (covered.length !== numberOfCoveredActiveAutolaunchedFlowsAndProcesses) {
|
|
55
|
-
this.warn('Error in the FlowTestCoverage table found, please delete all records in the FlowTestCoverage table, then run all tests, and use this command to check the Flow Test Coverage again');
|
|
56
|
-
}
|
|
57
|
-
return {
|
|
58
|
-
orgId: org.getOrgId(),
|
|
59
|
-
Coverage: Math.floor((numberOfCoveredActiveAutolaunchedFlowsAndProcesses / numberOfActiveAutolaunchedFlowsAndProcesses) * 100) + '%',
|
|
60
|
-
numberOfActiveAutolaunchedFlowsAndProcesses,
|
|
61
|
-
numberOfCoveredActiveAutolaunchedFlowsAndProcesses,
|
|
62
|
-
'all active autolaunched flows and processes that don’t have test coverage': uncovered,
|
|
63
|
-
'all flows and processes that have test coverage': covered,
|
|
64
|
-
};
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
FlowTestCoverage.summary = messages.getMessage('commandDescription');
|
|
68
|
-
FlowTestCoverage.examples = [
|
|
69
|
-
`$ sfdx jayree:flowtestcoverage
|
|
70
|
-
=== Flow Test Coverage
|
|
71
|
-
Coverage: 82%
|
|
72
|
-
...
|
|
73
|
-
`,
|
|
74
|
-
];
|
|
75
|
-
FlowTestCoverage.flags = {
|
|
76
|
-
'target-org': requiredOrgFlagWithDeprecations,
|
|
77
|
-
'api-version': orgApiVersionFlagWithDeprecations,
|
|
78
|
-
};
|
|
79
|
-
export default FlowTestCoverage;
|
|
80
|
-
//# sourceMappingURL=flowtestcoverage.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"flowtestcoverage.js","sourceRoot":"","sources":["../../../src/commands/jayree/flowtestcoverage.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,EACL,SAAS,EACT,+BAA+B,EAC/B,iCAAiC,GAClC,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAG5C,gDAAgD;AAChD,MAAM,UAAU,GAAG,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,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AAI,CAAC,KAAK,CACR,CAAC,kDAAkD,GAAG,2CAA2C,CAAC,GAAG,GAAG,CACzG,GAAG,GAAG;YACT,2CAA2C;YAC3C,kDAAkD;YAClD,2EAA2E,EAAE,SAAS;YACtF,iDAAiD,EAAE,OAAO;SAC3D,CAAC;IACJ,CAAC;;AAvFsB,wBAAO,GAAG,QAAQ,CAAC,UAAU,CAAC,oBAAoB,CAAC,CAAC;AAEpD,yBAAQ,GAAG;IAChC;;;;CAIH;CACE,CAAC;AAEqB,sBAAK,GAAG;IAC7B,YAAY,EAAE,+BAA+B;IAC7C,aAAa,EAAE,iCAAiC;CACjD,CAAC;eAdiB,gBAAgB"}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { SfCommand } from '@salesforce/sf-plugins-core';
|
|
2
|
-
import { AnyJson } from '@salesforce/ts-types';
|
|
3
|
-
export default class ScratchOrgSettings extends SfCommand<AnyJson> {
|
|
4
|
-
static readonly summary: string;
|
|
5
|
-
static readonly examples: string[];
|
|
6
|
-
static readonly flags: {
|
|
7
|
-
'target-org': import("@oclif/core/lib/interfaces").OptionFlag<import("@salesforce/core").Org, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
|
|
8
|
-
writetoprojectscratchdeffile: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
9
|
-
file: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
|
|
10
|
-
};
|
|
11
|
-
static readonly requiresProject = true;
|
|
12
|
-
run(): Promise<AnyJson>;
|
|
13
|
-
private throwError;
|
|
14
|
-
}
|
|
@@ -1,260 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Copyright (c) 2021, jayree
|
|
3
|
-
* All rights reserved.
|
|
4
|
-
* Licensed under the BSD 3-Clause license.
|
|
5
|
-
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
|
|
6
|
-
*/
|
|
7
|
-
import os from 'os';
|
|
8
|
-
import { dirname, join } from 'node:path';
|
|
9
|
-
import { fileURLToPath } from 'node:url';
|
|
10
|
-
import { Flags, SfCommand, requiredOrgFlagWithDeprecations } from '@salesforce/sf-plugins-core';
|
|
11
|
-
import { Messages, SfProject } from '@salesforce/core';
|
|
12
|
-
import createDebug from 'debug';
|
|
13
|
-
import fs from 'fs-extra';
|
|
14
|
-
import { ComponentSet } from '@salesforce/source-deploy-retrieve';
|
|
15
|
-
import { mkdirp } from 'mkdirp';
|
|
16
|
-
import { XMLParser } from 'fast-xml-parser';
|
|
17
|
-
// eslint-disable-next-line no-underscore-dangle
|
|
18
|
-
const __filename = fileURLToPath(import.meta.url);
|
|
19
|
-
// eslint-disable-next-line no-underscore-dangle
|
|
20
|
-
const __dirname = dirname(__filename);
|
|
21
|
-
Messages.importMessagesDirectory(__dirname);
|
|
22
|
-
const messages = Messages.loadMessages('sfdx-jayree', 'scratchorgsettings');
|
|
23
|
-
function camelize(str) {
|
|
24
|
-
return str.replace(/(?:^\w|[A-Z]|\b\w|\s+)/g, (match, index) => {
|
|
25
|
-
if (+match === 0)
|
|
26
|
-
return ''; // or if (/\s+/.test(match)) for white spaces
|
|
27
|
-
return index === 0 ? match.toLowerCase() : match.toUpperCase();
|
|
28
|
-
});
|
|
29
|
-
}
|
|
30
|
-
function parseSourceComponent(xmlData) {
|
|
31
|
-
const parser = new XMLParser({
|
|
32
|
-
ignoreAttributes: false,
|
|
33
|
-
parseTagValue: false,
|
|
34
|
-
});
|
|
35
|
-
return parser.parse(xmlData);
|
|
36
|
-
}
|
|
37
|
-
class ScratchOrgSettings extends SfCommand {
|
|
38
|
-
// eslint-disable-next-line complexity
|
|
39
|
-
async run() {
|
|
40
|
-
const { flags } = await this.parse(ScratchOrgSettings);
|
|
41
|
-
const debug = createDebug('jayree:scratchorg:settings');
|
|
42
|
-
const removeEmpty = (obj) => {
|
|
43
|
-
Object.entries(obj).forEach(([key, val]) => {
|
|
44
|
-
if (val && typeof val === 'object') {
|
|
45
|
-
val = removeEmpty(val);
|
|
46
|
-
}
|
|
47
|
-
if (val === null || val === '' || (typeof val === 'object' && !Object.keys(val).length)) {
|
|
48
|
-
delete obj[key];
|
|
49
|
-
}
|
|
50
|
-
});
|
|
51
|
-
return obj;
|
|
52
|
-
};
|
|
53
|
-
const sortKeys = (obj) => {
|
|
54
|
-
const ordered = {};
|
|
55
|
-
Object.keys(obj)
|
|
56
|
-
.sort()
|
|
57
|
-
.forEach((key) => {
|
|
58
|
-
ordered[key] = obj[key];
|
|
59
|
-
});
|
|
60
|
-
return ordered;
|
|
61
|
-
};
|
|
62
|
-
let settings = {};
|
|
63
|
-
const targetDir = process.env.SFDX_MDAPI_TEMP_DIR || os.tmpdir();
|
|
64
|
-
const destRoot = join(targetDir, 'RetrieveSettings');
|
|
65
|
-
// this.ux.startSpinner('Generating settings');
|
|
66
|
-
try {
|
|
67
|
-
await mkdirp(destRoot, '700');
|
|
68
|
-
let sfdxProjectVersion;
|
|
69
|
-
/* istanbul ignore next*/
|
|
70
|
-
try {
|
|
71
|
-
const sfdxProject = await SfProject.resolve();
|
|
72
|
-
const sfdxProjectJson = await sfdxProject.retrieveSfProjectJson();
|
|
73
|
-
sfdxProjectVersion = sfdxProjectJson.getContents().sourceApiVersion;
|
|
74
|
-
// eslint-disable-next-line no-empty
|
|
75
|
-
}
|
|
76
|
-
catch (error) { }
|
|
77
|
-
const apiVersion = flags.apiversion || sfdxProjectVersion || (await flags['target-org'].retrieveMaxApiVersion());
|
|
78
|
-
this.log(`Using ${destRoot} and apiVersion=${apiVersion}`);
|
|
79
|
-
const componentSet = new ComponentSet([{ fullName: '*', type: 'Settings' }]);
|
|
80
|
-
const mdapiRetrieve = await componentSet.retrieve({
|
|
81
|
-
usernameOrConnection: flags['target-org'].getUsername(),
|
|
82
|
-
output: destRoot,
|
|
83
|
-
apiVersion,
|
|
84
|
-
});
|
|
85
|
-
const retrieveResult = await mdapiRetrieve.pollStatus(1000);
|
|
86
|
-
for (const setting of retrieveResult.getFileResponses().filter((component) => component.type === 'Settings')) {
|
|
87
|
-
const settingsXml = parseSourceComponent(fs.readFileSync(setting.filePath, 'utf8'));
|
|
88
|
-
Object.keys(settingsXml).forEach((key) => {
|
|
89
|
-
Object.keys(settingsXml[key]).forEach((property) => {
|
|
90
|
-
if (!settings[camelize(key)]) {
|
|
91
|
-
settings[camelize(key)] = {};
|
|
92
|
-
}
|
|
93
|
-
if (property !== '$') {
|
|
94
|
-
settings[camelize(key)][property] = settingsXml[key][property];
|
|
95
|
-
}
|
|
96
|
-
});
|
|
97
|
-
});
|
|
98
|
-
}
|
|
99
|
-
if (typeof settings['addressSettings'] !== 'undefined') {
|
|
100
|
-
delete settings['addressSettings'];
|
|
101
|
-
debug('delete ' + 'addressSettings');
|
|
102
|
-
}
|
|
103
|
-
if (typeof settings['searchSettings'] !== 'undefined') {
|
|
104
|
-
delete settings['searchSettings'];
|
|
105
|
-
debug('delete ' + 'searchSettings');
|
|
106
|
-
}
|
|
107
|
-
if (typeof settings['analyticsSettings'] !== 'undefined') {
|
|
108
|
-
delete settings['analyticsSettings'];
|
|
109
|
-
debug('delete ' + 'analyticsSettings');
|
|
110
|
-
}
|
|
111
|
-
if (typeof settings['activitiesSettings'] !== 'undefined') {
|
|
112
|
-
if (typeof settings['activitiesSettings']['allowUsersToRelateMultipleContactsToTasksAndEvents'] !== 'undefined') {
|
|
113
|
-
delete settings['activitiesSettings']['allowUsersToRelateMultipleContactsToTasksAndEvents'];
|
|
114
|
-
debug('delete ' + 'activitiesSettings:allowUsersToRelateMultipleContactsToTasksAndEvents');
|
|
115
|
-
this.warn("You can't use the Tooling API or Metadata API to enable or disable Shared Activities.To enable this feature, visit the Activity Settings page in Setup.To disable this feature, contact Salesforce.");
|
|
116
|
-
}
|
|
117
|
-
}
|
|
118
|
-
if (typeof settings['territory2Settings'] !== 'undefined') {
|
|
119
|
-
if (typeof settings['territory2Settings']['enableTerritoryManagement2'] !== 'undefined') {
|
|
120
|
-
settings['territory2Settings'] = {
|
|
121
|
-
enableTerritoryManagement2: settings['territory2Settings']['enableTerritoryManagement2'],
|
|
122
|
-
};
|
|
123
|
-
debug('set ' + 'enableTerritoryManagement2');
|
|
124
|
-
}
|
|
125
|
-
}
|
|
126
|
-
if (typeof settings['forecastingSettings'] !== 'undefined') {
|
|
127
|
-
if (typeof settings['forecastingSettings']['forecastingCategoryMappings'] !== 'undefined') {
|
|
128
|
-
delete settings['forecastingSettings']['forecastingCategoryMappings'];
|
|
129
|
-
debug('delete ' + 'forecastingSettings:forecastingCategoryMappings');
|
|
130
|
-
}
|
|
131
|
-
if (typeof settings['forecastingSettings']['forecastingTypeSettings'] !== 'undefined') {
|
|
132
|
-
delete settings['forecastingSettings']['forecastingTypeSettings'];
|
|
133
|
-
debug('delete ' + 'forecastingSettings:forecastingTypeSettings');
|
|
134
|
-
}
|
|
135
|
-
}
|
|
136
|
-
if (typeof settings['caseSettings'] !== 'undefined') {
|
|
137
|
-
if (typeof settings['caseSettings']['caseFeedItemSettings'] !== 'undefined') {
|
|
138
|
-
if (typeof settings['caseSettings']['caseFeedItemSettings'][0] !== 'undefined') {
|
|
139
|
-
if (typeof settings['caseSettings']['caseFeedItemSettings'][0]['feedItemType'] !== 'undefined') {
|
|
140
|
-
if (settings['caseSettings']['caseFeedItemSettings'][0]['feedItemType'] === 'EMAIL_MESSAGE_EVENT') {
|
|
141
|
-
settings['caseSettings']['caseFeedItemSettings'][0]['feedItemType'] = 'EmailMessageEvent';
|
|
142
|
-
debug('set ' + 'caseSettings:caseFeedItemSettings:feedItemType');
|
|
143
|
-
}
|
|
144
|
-
}
|
|
145
|
-
}
|
|
146
|
-
}
|
|
147
|
-
}
|
|
148
|
-
settings = removeEmpty(settings);
|
|
149
|
-
settings = sortKeys(settings);
|
|
150
|
-
if (flags.writetoprojectscratchdeffile) {
|
|
151
|
-
const deffilepath =
|
|
152
|
-
// eslint-disable-next-line @typescript-eslint/await-thenable
|
|
153
|
-
flags.file || join(await this.project.getPath(), 'config', 'project-scratch-def.json');
|
|
154
|
-
let deffile = {};
|
|
155
|
-
await fs
|
|
156
|
-
.readFile(deffilepath, 'utf8')
|
|
157
|
-
.then((data) => {
|
|
158
|
-
deffile = JSON.parse(data);
|
|
159
|
-
if (deffile['edition'] === 'Enterprise') {
|
|
160
|
-
if (!deffile['features'].includes('LiveAgent')) {
|
|
161
|
-
if (typeof settings['liveAgentSettings'] !== 'undefined') {
|
|
162
|
-
if (typeof settings['liveAgentSettings']['enableLiveAgent'] !== 'undefined') {
|
|
163
|
-
if (settings['liveAgentSettings']['enableLiveAgent'] === 'false') {
|
|
164
|
-
delete settings['liveAgentSettings'];
|
|
165
|
-
debug('delete ' + 'liveAgentSettings');
|
|
166
|
-
this.warn('liveAgentSettings: Not available for deploy for this organization');
|
|
167
|
-
}
|
|
168
|
-
}
|
|
169
|
-
}
|
|
170
|
-
}
|
|
171
|
-
if (typeof settings['knowledgeSettings'] !== 'undefined') {
|
|
172
|
-
if (typeof settings['knowledgeSettings']['enableKnowledge'] !== 'undefined') {
|
|
173
|
-
if (settings['knowledgeSettings']['enableKnowledge'] === 'false') {
|
|
174
|
-
delete settings['knowledgeSettings'];
|
|
175
|
-
debug('delete ' + 'knowledgeSettings');
|
|
176
|
-
this.warn("knowledgeSettings: Once enabled, Salesforce Knowledge can't be disabled.");
|
|
177
|
-
}
|
|
178
|
-
}
|
|
179
|
-
}
|
|
180
|
-
if (typeof settings['caseSettings'] !== 'undefined') {
|
|
181
|
-
if (typeof settings['caseSettings']['emailToCase'] !== 'undefined') {
|
|
182
|
-
if (typeof settings['caseSettings']['emailToCase']['enableEmailToCase'] !== 'undefined') {
|
|
183
|
-
if (settings['caseSettings']['emailToCase']['enableEmailToCase'] === 'false') {
|
|
184
|
-
delete settings['caseSettings']['emailToCase'];
|
|
185
|
-
debug('delete ' + 'caseSettings:emailToCase');
|
|
186
|
-
this.warn('EmailToCaseSettings: Email to case cannot be disabled once it has been enabled.');
|
|
187
|
-
}
|
|
188
|
-
}
|
|
189
|
-
}
|
|
190
|
-
}
|
|
191
|
-
}
|
|
192
|
-
deffile['settings'] = settings;
|
|
193
|
-
})
|
|
194
|
-
.catch((err) => {
|
|
195
|
-
if (err.code === 'ENOENT' && !flags.file) {
|
|
196
|
-
throw Error("default file 'project-scratch-def.json' not found, please use --file flag");
|
|
197
|
-
}
|
|
198
|
-
else {
|
|
199
|
-
this.throwError(err);
|
|
200
|
-
}
|
|
201
|
-
});
|
|
202
|
-
await fs.writeFile(deffilepath, JSON.stringify(deffile, null, 2)).catch((err) => {
|
|
203
|
-
this.throwError(err);
|
|
204
|
-
});
|
|
205
|
-
}
|
|
206
|
-
else {
|
|
207
|
-
this.styledHeader('received settings from Org: ' +
|
|
208
|
-
flags['target-org'].getUsername() +
|
|
209
|
-
' (' +
|
|
210
|
-
flags['target-org'].getOrgId() +
|
|
211
|
-
')');
|
|
212
|
-
this.styledJSON(settings);
|
|
213
|
-
}
|
|
214
|
-
return {
|
|
215
|
-
settings,
|
|
216
|
-
orgId: flags['target-org'].getOrgId(),
|
|
217
|
-
username: flags['target-org'].getUsername(),
|
|
218
|
-
};
|
|
219
|
-
}
|
|
220
|
-
catch (error) {
|
|
221
|
-
if (error.stdout) {
|
|
222
|
-
throw new Error(JSON.parse(error.stdout).message);
|
|
223
|
-
}
|
|
224
|
-
else {
|
|
225
|
-
throw new Error(error.message.toLowerCase());
|
|
226
|
-
}
|
|
227
|
-
}
|
|
228
|
-
finally {
|
|
229
|
-
if (!flags.keepcache) {
|
|
230
|
-
process.once('exit', () => {
|
|
231
|
-
fs.removeSync(destRoot);
|
|
232
|
-
});
|
|
233
|
-
}
|
|
234
|
-
}
|
|
235
|
-
}
|
|
236
|
-
throwError(err) {
|
|
237
|
-
this.spinner.stop();
|
|
238
|
-
throw err;
|
|
239
|
-
}
|
|
240
|
-
}
|
|
241
|
-
ScratchOrgSettings.summary = messages.getMessage('commandDescription');
|
|
242
|
-
ScratchOrgSettings.examples = [
|
|
243
|
-
`$ sfdx jayree:org:settings
|
|
244
|
-
$ sfdx jayree:org:settings -u me@my.org
|
|
245
|
-
$ sfdx jayree:org:settings -u MyTestOrg1 -w`,
|
|
246
|
-
];
|
|
247
|
-
ScratchOrgSettings.flags = {
|
|
248
|
-
'target-org': requiredOrgFlagWithDeprecations,
|
|
249
|
-
writetoprojectscratchdeffile: Flags.boolean({
|
|
250
|
-
char: 'w',
|
|
251
|
-
summary: messages.getMessage('writetoprojectscratchdeffile'),
|
|
252
|
-
}),
|
|
253
|
-
file: Flags.string({
|
|
254
|
-
char: 'f',
|
|
255
|
-
summary: messages.getMessage('fileFlagDescription'),
|
|
256
|
-
}),
|
|
257
|
-
};
|
|
258
|
-
ScratchOrgSettings.requiresProject = true;
|
|
259
|
-
export default ScratchOrgSettings;
|
|
260
|
-
//# sourceMappingURL=settings.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"settings.js","sourceRoot":"","sources":["../../../../src/commands/jayree/org/settings.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EAAE,MAAM,IAAI,CAAC;AACpB,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAC1C,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,+BAA+B,EAAE,MAAM,6BAA6B,CAAC;AAChG,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAEvD,OAAO,WAAW,MAAM,OAAO,CAAC;AAChC,OAAO,EAAE,MAAM,UAAU,CAAC;AAC1B,OAAO,EAAE,YAAY,EAAE,MAAM,oCAAoC,CAAC;AAClE,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAChC,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAE5C,gDAAgD;AAChD,MAAM,UAAU,GAAG,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CA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AAK,GAAG;IAC7B,YAAY,EAAE,+BAA+B;IAC7C,4BAA4B,EAAE,KAAK,CAAC,OAAO,CAAC;QAC1C,IAAI,EAAE,GAAG;QACT,OAAO,EAAE,QAAQ,CAAC,UAAU,CAAC,8BAA8B,CAAC;KAC7D,CAAC;IACF,IAAI,EAAE,KAAK,CAAC,MAAM,CAAC;QACjB,IAAI,EAAE,GAAG;QACT,OAAO,EAAE,QAAQ,CAAC,UAAU,CAAC,qBAAqB,CAAC;KACpD,CAAC;CACH,CAAC;AAEqB,kCAAe,GAAG,IAAI,CAAC;eArB3B,kBAAkB"}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { SfCommand } from '@salesforce/sf-plugins-core';
|
|
2
|
-
import { AnyJson } from '@salesforce/ts-types';
|
|
3
|
-
export default class Streaming extends SfCommand<AnyJson> {
|
|
4
|
-
static readonly summary: string;
|
|
5
|
-
static readonly examples: string[];
|
|
6
|
-
static readonly flags: {
|
|
7
|
-
'target-org': import("@oclif/core/lib/interfaces").OptionFlag<import("@salesforce/core").Org, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
|
|
8
|
-
'api-version': import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
|
|
9
|
-
topic: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
|
|
10
|
-
};
|
|
11
|
-
run(): Promise<AnyJson>;
|
|
12
|
-
}
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Copyright (c) 2021, jayree
|
|
3
|
-
* All rights reserved.
|
|
4
|
-
* Licensed under the BSD 3-Clause license.
|
|
5
|
-
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
|
|
6
|
-
*/
|
|
7
|
-
import { dirname } from 'node:path';
|
|
8
|
-
import { fileURLToPath } from 'node:url';
|
|
9
|
-
import { Flags, SfCommand, requiredOrgFlagWithDeprecations, orgApiVersionFlagWithDeprecations, } from '@salesforce/sf-plugins-core';
|
|
10
|
-
import { Messages } from '@salesforce/core';
|
|
11
|
-
// eslint-disable-next-line no-underscore-dangle
|
|
12
|
-
const __filename = fileURLToPath(import.meta.url);
|
|
13
|
-
// eslint-disable-next-line no-underscore-dangle
|
|
14
|
-
const __dirname = dirname(__filename);
|
|
15
|
-
Messages.importMessagesDirectory(__dirname);
|
|
16
|
-
const messages = Messages.loadMessages('sfdx-jayree', 'streaming');
|
|
17
|
-
class Streaming extends SfCommand {
|
|
18
|
-
// eslint-disable-next-line @typescript-eslint/require-await
|
|
19
|
-
async run() {
|
|
20
|
-
const { flags } = await this.parse(Streaming);
|
|
21
|
-
await flags['target-org'].refreshAuth();
|
|
22
|
-
const conn = flags['target-org'].getConnection(flags['api-version']);
|
|
23
|
-
// '/event/SAPAccountRequest__e'
|
|
24
|
-
await conn.streaming.topic(flags.topic).subscribe((event) => {
|
|
25
|
-
this.styledJSON(event);
|
|
26
|
-
});
|
|
27
|
-
return {
|
|
28
|
-
orgId: flags['target-org'].getOrgId(),
|
|
29
|
-
};
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
Streaming.summary = messages.getMessage('commandDescription');
|
|
33
|
-
Streaming.examples = [
|
|
34
|
-
`$ sfdx jayree:org:streaming --topic=/event/eventName__e
|
|
35
|
-
...
|
|
36
|
-
`,
|
|
37
|
-
];
|
|
38
|
-
Streaming.flags = {
|
|
39
|
-
'target-org': requiredOrgFlagWithDeprecations,
|
|
40
|
-
'api-version': orgApiVersionFlagWithDeprecations,
|
|
41
|
-
topic: Flags.string({
|
|
42
|
-
char: 'p',
|
|
43
|
-
required: true,
|
|
44
|
-
summary: messages.getMessage('topicFlagDescription'),
|
|
45
|
-
}),
|
|
46
|
-
};
|
|
47
|
-
export default Streaming;
|
|
48
|
-
//# sourceMappingURL=streaming.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"streaming.js","sourceRoot":"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O,GAAG,QAAQ,CAAC,UAAU,CAAC,oBAAoB,CAAC,CAAC;AAEpD,kBAAQ,GAAG;IAChC;;CAEH;CACE,CAAC;AAEqB,eAAK,GAAG;IAC7B,YAAY,EAAE,+BAA+B;IAC7C,aAAa,EAAE,iCAAiC;IAChD,KAAK,EAAE,KAAK,CAAC,MAAM,CAAC;QAClB,IAAI,EAAE,GAAG;QACT,QAAQ,EAAE,IAAI;QACd,OAAO,EAAE,QAAQ,CAAC,UAAU,CAAC,sBAAsB,CAAC;KACrD,CAAC;CACH,CAAC;eAjBiB,SAAS"}
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Copyright (c) 2021, jayree
|
|
3
|
-
* All rights reserved.
|
|
4
|
-
* Licensed under the BSD 3-Clause license.
|
|
5
|
-
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
|
|
6
|
-
*/
|
|
7
|
-
import { accessSync, readFileSync } from 'fs';
|
|
8
|
-
import { dirname, join } from 'node:path';
|
|
9
|
-
import { fileURLToPath } from 'node:url';
|
|
10
|
-
import { SfCommand } from '@salesforce/sf-plugins-core';
|
|
11
|
-
// eslint-disable-next-line no-underscore-dangle
|
|
12
|
-
const __filename = fileURLToPath(import.meta.url);
|
|
13
|
-
// eslint-disable-next-line no-underscore-dangle
|
|
14
|
-
const __dirname = dirname(__filename);
|
|
15
|
-
// eslint-disable-next-line sf-plugin/command-example, sf-plugin/command-summary
|
|
16
|
-
class Version extends SfCommand {
|
|
17
|
-
// eslint-disable-next-line @typescript-eslint/require-await
|
|
18
|
-
async run() {
|
|
19
|
-
const root = () => {
|
|
20
|
-
let currentPath = __dirname;
|
|
21
|
-
let rootpath;
|
|
22
|
-
while (!rootpath) {
|
|
23
|
-
try {
|
|
24
|
-
accessSync(join(currentPath, 'package.json'));
|
|
25
|
-
rootpath = currentPath;
|
|
26
|
-
}
|
|
27
|
-
catch {
|
|
28
|
-
currentPath = dirname(currentPath);
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
return rootpath;
|
|
32
|
-
};
|
|
33
|
-
const packageJsonData = JSON.parse(readFileSync(join(root(), 'package.json'), 'utf-8'));
|
|
34
|
-
this.log(packageJsonData.version);
|
|
35
|
-
return {
|
|
36
|
-
version: packageJsonData.version,
|
|
37
|
-
};
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
Version.hidden = true;
|
|
41
|
-
export default Version;
|
|
42
|
-
//# sourceMappingURL=version.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"version.js","sourceRoot":"","sources":["../../../src/commands/jayree/version.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,IAAI,CAAC;AAC9C,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAC1C,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,EAAE,SAAS,EAAE,MAAM,6BAA6B,CAAC;AAGxD,gDAAgD;AAChD,MAAM,UAAU,GAAG,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAClD,gDAAgD;AAChD,MAAM,SAAS,GAAG,OAAO,CAAC,UAAU,CAAC,CAAC;AAEtC,gFAAgF;AAChF,MAAqB,OAAQ,SAAQ,SAAkB;IAGrD,4DAA4D;IACrD,KAAK,CAAC,GAAG;QACd,MAAM,IAAI,GAAG,GAAG,EAAE;YAChB,IAAI,WAAW,GAAG,SAAS,CAAC;YAC5B,IAAI,QAAQ,CAAC;YACb,OAAO,CAAC,QAAQ,EAAE;gBAChB,IAAI;oBACF,UAAU,CAAC,IAAI,CAAC,WAAW,EAAE,cAAc,CAAC,CAAC,CAAC;oBAC9C,QAAQ,GAAG,WAAW,CAAC;iBACxB;gBAAC,MAAM;oBACN,WAAW,GAAG,OAAO,CAAC,WAAW,CAAC,CAAC;iBACpC;aACF;YACD,O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