@ind-rcg/modeler-sfdx-cli-plugin 256.1026.0 → 258.1022.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.
Files changed (47) hide show
  1. package/README.md +115 -168
  2. package/lib/commands/modeler/workspace/add.js +1 -1
  3. package/lib/commands/modeler/workspace/build.js +1 -1
  4. package/lib/commands/modeler/workspace/cleanup.js +1 -1
  5. package/lib/commands/modeler/workspace/create.js +1 -1
  6. package/lib/commands/modeler/workspace/package.js +1 -1
  7. package/lib/commands/modeler/workspace/refreshLocale.js +1 -1
  8. package/lib/commands/modeler/workspace/server/start.js +1 -1
  9. package/lib/commands/modeler/workspace/upgrade.js +1 -1
  10. package/lib/commands/modeler/workspace/utils/base64encode.js +1 -1
  11. package/lib/commands/modeler/workspace/utils/generateManifest.js +1 -1
  12. package/lib/commands/modeler/workspace/utils/importContracts.js +1 -1
  13. package/lib/commands/modeler/workspace/utils/migrateContracts.js +1 -1
  14. package/lib/commands/modeler/workspace/validate.js +1 -1
  15. package/lib/constants.js +1 -1
  16. package/lib/hooks/init/updateCheck.js +1 -1
  17. package/lib/model/buildStatus.js +1 -1
  18. package/lib/model/workspace.js +1 -1
  19. package/lib/shared/commandBuilder.js +1 -1
  20. package/lib/shared/commandExecutor.js +1 -1
  21. package/lib/shared/commandOutput.js +1 -1
  22. package/lib/types/config.js +1 -1
  23. package/lib/types/errors.js +1 -1
  24. package/lib/types/messages.js +1 -1
  25. package/lib/types/package.js +1 -1
  26. package/lib/types/results.js +1 -1
  27. package/lib/utils/commandHelper.js +1 -0
  28. package/lib/utils/componentHelper.js +1 -1
  29. package/lib/utils/errorHelper.js +1 -1
  30. package/lib/utils/fsHelper.js +1 -1
  31. package/lib/utils/generateManifestHelper.js +1 -1
  32. package/lib/utils/importContractsHelper.js +1 -1
  33. package/lib/utils/messageHelper.js +1 -1
  34. package/lib/utils/objectHelper.js +1 -0
  35. package/lib/utils/osHelper.js +1 -0
  36. package/lib/utils/packageHelper.js +1 -1
  37. package/lib/utils/pathHelper.js +1 -0
  38. package/lib/utils/serverHelper.js +1 -1
  39. package/lib/utils/templateEngine.js +1 -1
  40. package/lib/utils/templateHelper.js +1 -1
  41. package/lib/utils/updateChecker.js +1 -1
  42. package/lib/utils/validationHelper.js +1 -1
  43. package/lib/utils/xmlHelper.js +1 -1
  44. package/oclif.manifest.json +170 -70
  45. package/package.json +242 -81
  46. package/lib/model/workspaceCommand.js +0 -1
  47. /package/{LICENSE.md → LICENSE.txt} +0 -0
package/README.md CHANGED
@@ -1,7 +1,6 @@
1
- modeler-sfdx-cli-plugin
2
- =======================
1
+ # modeler-sfdx-cli-plugin
3
2
 
4
- This plugin is an enhancement of the salesforce cli and provide you features to customize the Consumer Goods Cloud Mobility application. This version will be the replacement for the Consumer Goods Mobile Modeler which was hosted on a Windows Server machine.
3
+ This plugin is an enhancement of the salesforce cli and provide you features to customize the Consumer Goods Cloud Mobility application. This version will be the replacement for the Consumer Goods Mobile Modeler which was hosted on a Windows Server machine.
5
4
 
6
5
  ## Getting Started
7
6
 
@@ -18,38 +17,40 @@ $ sfdx plugins
18
17
  # Output: @ind-rcg/modeler-sfdx-cli-plugin xxx.xxxx.x (x being the version number which was installed)
19
18
  ...
20
19
  ```
20
+
21
21
  ## The plugin provides many commands you can use for your customization and simulation
22
22
 
23
- In this section we will provide a quick overview about the existing commands
23
+ In this section we will provide a quick overview about the existing commands
24
24
 
25
25
  <!-- commands -->
26
- * [`sf mdl:add`](#sf-mdladd)
27
- * [`sf mdl:build`](#sf-mdlbuild)
28
- * [`sf mdl:clean`](#sf-mdlclean)
29
- * [`sf mdl:cleanup`](#sf-mdlcleanup)
30
- * [`sf mdl:package`](#sf-mdlpackage)
31
- * [`sf mdl:simulate`](#sf-mdlsimulate)
32
- * [`sf mdl:validate`](#sf-mdlvalidate)
33
- * [`sf mdl:ws:add`](#sf-mdlwsadd)
34
- * [`sf mdl:ws:build`](#sf-mdlwsbuild)
35
- * [`sf mdl:ws:clean`](#sf-mdlwsclean)
36
- * [`sf mdl:ws:cleanup`](#sf-mdlwscleanup)
37
- * [`sf mdl:ws:package`](#sf-mdlwspackage)
38
- * [`sf mdl:ws:server:start`](#sf-mdlwsserverstart)
39
- * [`sf mdl:ws:simulate`](#sf-mdlwssimulate)
40
- * [`sf mdl:ws:validate`](#sf-mdlwsvalidate)
41
- * [`sf modeler:workspace:add`](#sf-modelerworkspaceadd)
42
- * [`sf modeler:workspace:build`](#sf-modelerworkspacebuild)
43
- * [`sf modeler:workspace:cleanup`](#sf-modelerworkspacecleanup)
44
- * [`sf modeler:workspace:create`](#sf-modelerworkspacecreate)
45
- * [`sf modeler:workspace:package`](#sf-modelerworkspacepackage)
46
- * [`sf modeler:workspace:refreshLocale`](#sf-modelerworkspacerefreshlocale)
47
- * [`sf modeler:workspace:server:start`](#sf-modelerworkspaceserverstart)
48
- * [`sf modeler:workspace:upgrade`](#sf-modelerworkspaceupgrade)
49
- * [`sf modeler:workspace:utils:base64encode`](#sf-modelerworkspaceutilsbase64encode)
50
- * [`sf modeler:workspace:utils:importContracts`](#sf-modelerworkspaceutilsimportcontracts)
51
- * [`sf modeler:workspace:utils:migrateContracts`](#sf-modelerworkspaceutilsmigratecontracts)
52
- * [`sf modeler:workspace:validate`](#sf-modelerworkspacevalidate)
26
+
27
+ - [`sf mdl:add`](#sf-mdladd)
28
+ - [`sf mdl:build`](#sf-mdlbuild)
29
+ - [`sf mdl:clean`](#sf-mdlclean)
30
+ - [`sf mdl:cleanup`](#sf-mdlcleanup)
31
+ - [`sf mdl:package`](#sf-mdlpackage)
32
+ - [`sf mdl:simulate`](#sf-mdlsimulate)
33
+ - [`sf mdl:validate`](#sf-mdlvalidate)
34
+ - [`sf mdl:ws:add`](#sf-mdlwsadd)
35
+ - [`sf mdl:ws:build`](#sf-mdlwsbuild)
36
+ - [`sf mdl:ws:clean`](#sf-mdlwsclean)
37
+ - [`sf mdl:ws:cleanup`](#sf-mdlwscleanup)
38
+ - [`sf mdl:ws:package`](#sf-mdlwspackage)
39
+ - [`sf mdl:ws:server:start`](#sf-mdlwsserverstart)
40
+ - [`sf mdl:ws:simulate`](#sf-mdlwssimulate)
41
+ - [`sf mdl:ws:validate`](#sf-mdlwsvalidate)
42
+ - [`sf modeler:workspace:add`](#sf-modelerworkspaceadd)
43
+ - [`sf modeler:workspace:build`](#sf-modelerworkspacebuild)
44
+ - [`sf modeler:workspace:cleanup`](#sf-modelerworkspacecleanup)
45
+ - [`sf modeler:workspace:create`](#sf-modelerworkspacecreate)
46
+ - [`sf modeler:workspace:package`](#sf-modelerworkspacepackage)
47
+ - [`sf modeler:workspace:refreshLocale`](#sf-modelerworkspacerefreshlocale)
48
+ - [`sf modeler:workspace:server:start`](#sf-modelerworkspaceserverstart)
49
+ - [`sf modeler:workspace:upgrade`](#sf-modelerworkspaceupgrade)
50
+ - [`sf modeler:workspace:utils:base64encode`](#sf-modelerworkspaceutilsbase64encode)
51
+ - [`sf modeler:workspace:utils:importContracts`](#sf-modelerworkspaceutilsimportcontracts)
52
+ - [`sf modeler:workspace:utils:migrateContracts`](#sf-modelerworkspaceutilsmigratecontracts)
53
+ - [`sf modeler:workspace:validate`](#sf-modelerworkspacevalidate)
53
54
 
54
55
  ## `sf mdl:add`
55
56
 
@@ -57,7 +58,7 @@ Adds a new resource to a Modeler workspace.
57
58
 
58
59
  ```
59
60
  USAGE
60
- $ sf mdl:add [--json] [-t <value>] [-m <value>] [-n <value>] [-p <value>]
61
+ $ sf mdl:add [--json] [--flags-dir <value>] [-p <value>] [-t <value>] [-m <value>] [-n <value>]
61
62
 
62
63
  FLAGS
63
64
  -m, --module=<value> Name of the module to which the resource should be added.
@@ -66,10 +67,8 @@ FLAGS
66
67
  -t, --type=<value> Type of the resource to add.
67
68
 
68
69
  GLOBAL FLAGS
69
- --json Format output as json.
70
-
71
- DESCRIPTION
72
- Adds a new resource to a Modeler workspace.
70
+ --flags-dir=<value> Import flag values from a directory.
71
+ --json Format output as json.
73
72
 
74
73
  ALIASES
75
74
  $ sf mdl:add
@@ -89,16 +88,14 @@ Build a Modeler workspace.
89
88
 
90
89
  ```
91
90
  USAGE
92
- $ sf mdl:build [--json] [-p <value>]
91
+ $ sf mdl:build [--json] [--flags-dir <value>] [-p <value>]
93
92
 
94
93
  FLAGS
95
94
  -p, --path=<value> path to the Modeler workspace
96
95
 
97
96
  GLOBAL FLAGS
98
- --json Format output as json.
99
-
100
- DESCRIPTION
101
- Build a Modeler workspace.
97
+ --flags-dir=<value> Import flag values from a directory.
98
+ --json Format output as json.
102
99
 
103
100
  ALIASES
104
101
  $ sf mdl:ws:build
@@ -116,16 +113,14 @@ Clean up an existing Modeler workspace.
116
113
 
117
114
  ```
118
115
  USAGE
119
- $ sf mdl:clean [--json] [-p <value>]
116
+ $ sf mdl:clean [--json] [--flags-dir <value>] [-p <value>]
120
117
 
121
118
  FLAGS
122
119
  -p, --path=<value> path to the Modeler workspace
123
120
 
124
121
  GLOBAL FLAGS
125
- --json Format output as json.
126
-
127
- DESCRIPTION
128
- Clean up an existing Modeler workspace.
122
+ --flags-dir=<value> Import flag values from a directory.
123
+ --json Format output as json.
129
124
 
130
125
  ALIASES
131
126
  $ sf mdl:ws:cleanup
@@ -145,16 +140,14 @@ Clean up an existing Modeler workspace.
145
140
 
146
141
  ```
147
142
  USAGE
148
- $ sf mdl:cleanup [--json] [-p <value>]
143
+ $ sf mdl:cleanup [--json] [--flags-dir <value>] [-p <value>]
149
144
 
150
145
  FLAGS
151
146
  -p, --path=<value> path to the Modeler workspace
152
147
 
153
148
  GLOBAL FLAGS
154
- --json Format output as json.
155
-
156
- DESCRIPTION
157
- Clean up an existing Modeler workspace.
149
+ --flags-dir=<value> Import flag values from a directory.
150
+ --json Format output as json.
158
151
 
159
152
  ALIASES
160
153
  $ sf mdl:ws:cleanup
@@ -174,16 +167,14 @@ Create a deployment package of a Modeler workspace.
174
167
 
175
168
  ```
176
169
  USAGE
177
- $ sf mdl:package [--json] [-p <value>]
170
+ $ sf mdl:package [--json] [--flags-dir <value>] [-p <value>]
178
171
 
179
172
  FLAGS
180
173
  -p, --path=<value> path to the Modeler workspace
181
174
 
182
175
  GLOBAL FLAGS
183
- --json Format output as json.
184
-
185
- DESCRIPTION
186
- Create a deployment package of a Modeler workspace.
176
+ --flags-dir=<value> Import flag values from a directory.
177
+ --json Format output as json.
187
178
 
188
179
  ALIASES
189
180
  $ sf mdl:ws:package
@@ -201,16 +192,14 @@ Start the server
201
192
 
202
193
  ```
203
194
  USAGE
204
- $ sf mdl:simulate [--json] [-p <value>]
195
+ $ sf mdl:simulate [--json] [--flags-dir <value>] [-p <value>]
205
196
 
206
197
  FLAGS
207
198
  -p, --path=<value> path to the Modeler workspace
208
199
 
209
200
  GLOBAL FLAGS
210
- --json Format output as json.
211
-
212
- DESCRIPTION
213
- Start the server
201
+ --flags-dir=<value> Import flag values from a directory.
202
+ --json Format output as json.
214
203
 
215
204
  ALIASES
216
205
  $ sf mdl:ws:server:start
@@ -229,16 +218,14 @@ Validate the contracts in a modeler workspace
229
218
 
230
219
  ```
231
220
  USAGE
232
- $ sf mdl:validate [--json] [-p <value>]
221
+ $ sf mdl:validate [--json] [--flags-dir <value>] [-p <value>]
233
222
 
234
223
  FLAGS
235
224
  -p, --path=<value> path to the Modeler workspace
236
225
 
237
226
  GLOBAL FLAGS
238
- --json Format output as json.
239
-
240
- DESCRIPTION
241
- Validate the contracts in a modeler workspace
227
+ --flags-dir=<value> Import flag values from a directory.
228
+ --json Format output as json.
242
229
 
243
230
  ALIASES
244
231
  $ sf mdl:ws:validate
@@ -256,7 +243,7 @@ Adds a new resource to a Modeler workspace.
256
243
 
257
244
  ```
258
245
  USAGE
259
- $ sf mdl:ws:add [--json] [-t <value>] [-m <value>] [-n <value>] [-p <value>]
246
+ $ sf mdl:ws:add [--json] [--flags-dir <value>] [-p <value>] [-t <value>] [-m <value>] [-n <value>]
260
247
 
261
248
  FLAGS
262
249
  -m, --module=<value> Name of the module to which the resource should be added.
@@ -265,10 +252,8 @@ FLAGS
265
252
  -t, --type=<value> Type of the resource to add.
266
253
 
267
254
  GLOBAL FLAGS
268
- --json Format output as json.
269
-
270
- DESCRIPTION
271
- Adds a new resource to a Modeler workspace.
255
+ --flags-dir=<value> Import flag values from a directory.
256
+ --json Format output as json.
272
257
 
273
258
  ALIASES
274
259
  $ sf mdl:add
@@ -288,16 +273,14 @@ Build a Modeler workspace.
288
273
 
289
274
  ```
290
275
  USAGE
291
- $ sf mdl:ws:build [--json] [-p <value>]
276
+ $ sf mdl:ws:build [--json] [--flags-dir <value>] [-p <value>]
292
277
 
293
278
  FLAGS
294
279
  -p, --path=<value> path to the Modeler workspace
295
280
 
296
281
  GLOBAL FLAGS
297
- --json Format output as json.
298
-
299
- DESCRIPTION
300
- Build a Modeler workspace.
282
+ --flags-dir=<value> Import flag values from a directory.
283
+ --json Format output as json.
301
284
 
302
285
  ALIASES
303
286
  $ sf mdl:ws:build
@@ -315,16 +298,14 @@ Clean up an existing Modeler workspace.
315
298
 
316
299
  ```
317
300
  USAGE
318
- $ sf mdl:ws:clean [--json] [-p <value>]
301
+ $ sf mdl:ws:clean [--json] [--flags-dir <value>] [-p <value>]
319
302
 
320
303
  FLAGS
321
304
  -p, --path=<value> path to the Modeler workspace
322
305
 
323
306
  GLOBAL FLAGS
324
- --json Format output as json.
325
-
326
- DESCRIPTION
327
- Clean up an existing Modeler workspace.
307
+ --flags-dir=<value> Import flag values from a directory.
308
+ --json Format output as json.
328
309
 
329
310
  ALIASES
330
311
  $ sf mdl:ws:cleanup
@@ -344,16 +325,14 @@ Clean up an existing Modeler workspace.
344
325
 
345
326
  ```
346
327
  USAGE
347
- $ sf mdl:ws:cleanup [--json] [-p <value>]
328
+ $ sf mdl:ws:cleanup [--json] [--flags-dir <value>] [-p <value>]
348
329
 
349
330
  FLAGS
350
331
  -p, --path=<value> path to the Modeler workspace
351
332
 
352
333
  GLOBAL FLAGS
353
- --json Format output as json.
354
-
355
- DESCRIPTION
356
- Clean up an existing Modeler workspace.
334
+ --flags-dir=<value> Import flag values from a directory.
335
+ --json Format output as json.
357
336
 
358
337
  ALIASES
359
338
  $ sf mdl:ws:cleanup
@@ -373,16 +352,14 @@ Create a deployment package of a Modeler workspace.
373
352
 
374
353
  ```
375
354
  USAGE
376
- $ sf mdl:ws:package [--json] [-p <value>]
355
+ $ sf mdl:ws:package [--json] [--flags-dir <value>] [-p <value>]
377
356
 
378
357
  FLAGS
379
358
  -p, --path=<value> path to the Modeler workspace
380
359
 
381
360
  GLOBAL FLAGS
382
- --json Format output as json.
383
-
384
- DESCRIPTION
385
- Create a deployment package of a Modeler workspace.
361
+ --flags-dir=<value> Import flag values from a directory.
362
+ --json Format output as json.
386
363
 
387
364
  ALIASES
388
365
  $ sf mdl:ws:package
@@ -400,16 +377,14 @@ Start the server
400
377
 
401
378
  ```
402
379
  USAGE
403
- $ sf mdl:ws:server:start [--json] [-p <value>]
380
+ $ sf mdl:ws:server:start [--json] [--flags-dir <value>] [-p <value>]
404
381
 
405
382
  FLAGS
406
383
  -p, --path=<value> path to the Modeler workspace
407
384
 
408
385
  GLOBAL FLAGS
409
- --json Format output as json.
410
-
411
- DESCRIPTION
412
- Start the server
386
+ --flags-dir=<value> Import flag values from a directory.
387
+ --json Format output as json.
413
388
 
414
389
  ALIASES
415
390
  $ sf mdl:ws:server:start
@@ -428,16 +403,14 @@ Start the server
428
403
 
429
404
  ```
430
405
  USAGE
431
- $ sf mdl:ws:simulate [--json] [-p <value>]
406
+ $ sf mdl:ws:simulate [--json] [--flags-dir <value>] [-p <value>]
432
407
 
433
408
  FLAGS
434
409
  -p, --path=<value> path to the Modeler workspace
435
410
 
436
411
  GLOBAL FLAGS
437
- --json Format output as json.
438
-
439
- DESCRIPTION
440
- Start the server
412
+ --flags-dir=<value> Import flag values from a directory.
413
+ --json Format output as json.
441
414
 
442
415
  ALIASES
443
416
  $ sf mdl:ws:server:start
@@ -456,16 +429,14 @@ Validate the contracts in a modeler workspace
456
429
 
457
430
  ```
458
431
  USAGE
459
- $ sf mdl:ws:validate [--json] [-p <value>]
432
+ $ sf mdl:ws:validate [--json] [--flags-dir <value>] [-p <value>]
460
433
 
461
434
  FLAGS
462
435
  -p, --path=<value> path to the Modeler workspace
463
436
 
464
437
  GLOBAL FLAGS
465
- --json Format output as json.
466
-
467
- DESCRIPTION
468
- Validate the contracts in a modeler workspace
438
+ --flags-dir=<value> Import flag values from a directory.
439
+ --json Format output as json.
469
440
 
470
441
  ALIASES
471
442
  $ sf mdl:ws:validate
@@ -483,7 +454,7 @@ Adds a new resource to a Modeler workspace.
483
454
 
484
455
  ```
485
456
  USAGE
486
- $ sf modeler:workspace:add [--json] [-t <value>] [-m <value>] [-n <value>] [-p <value>]
457
+ $ sf modeler:workspace:add [--json] [--flags-dir <value>] [-p <value>] [-t <value>] [-m <value>] [-n <value>]
487
458
 
488
459
  FLAGS
489
460
  -m, --module=<value> Name of the module to which the resource should be added.
@@ -492,10 +463,8 @@ FLAGS
492
463
  -t, --type=<value> Type of the resource to add.
493
464
 
494
465
  GLOBAL FLAGS
495
- --json Format output as json.
496
-
497
- DESCRIPTION
498
- Adds a new resource to a Modeler workspace.
466
+ --flags-dir=<value> Import flag values from a directory.
467
+ --json Format output as json.
499
468
 
500
469
  ALIASES
501
470
  $ sf mdl:add
@@ -515,16 +484,14 @@ Build a Modeler workspace.
515
484
 
516
485
  ```
517
486
  USAGE
518
- $ sf modeler:workspace:build [--json] [-p <value>]
487
+ $ sf modeler:workspace:build [--json] [--flags-dir <value>] [-p <value>]
519
488
 
520
489
  FLAGS
521
490
  -p, --path=<value> path to the Modeler workspace
522
491
 
523
492
  GLOBAL FLAGS
524
- --json Format output as json.
525
-
526
- DESCRIPTION
527
- Build a Modeler workspace.
493
+ --flags-dir=<value> Import flag values from a directory.
494
+ --json Format output as json.
528
495
 
529
496
  ALIASES
530
497
  $ sf mdl:ws:build
@@ -542,16 +509,14 @@ Clean up an existing Modeler workspace.
542
509
 
543
510
  ```
544
511
  USAGE
545
- $ sf modeler:workspace:cleanup [--json] [-p <value>]
512
+ $ sf modeler:workspace:cleanup [--json] [--flags-dir <value>] [-p <value>]
546
513
 
547
514
  FLAGS
548
515
  -p, --path=<value> path to the Modeler workspace
549
516
 
550
517
  GLOBAL FLAGS
551
- --json Format output as json.
552
-
553
- DESCRIPTION
554
- Clean up an existing Modeler workspace.
518
+ --flags-dir=<value> Import flag values from a directory.
519
+ --json Format output as json.
555
520
 
556
521
  ALIASES
557
522
  $ sf mdl:ws:cleanup
@@ -571,16 +536,14 @@ Create a Modeler workspace.
571
536
 
572
537
  ```
573
538
  USAGE
574
- $ sf modeler:workspace:create [--json] [-p <value>]
539
+ $ sf modeler:workspace:create [--json] [--flags-dir <value>] [-p <value>]
575
540
 
576
541
  FLAGS
577
542
  -p, --path=<value> path to the Modeler workspace
578
543
 
579
544
  GLOBAL FLAGS
580
- --json Format output as json.
581
-
582
- DESCRIPTION
583
- Create a Modeler workspace.
545
+ --flags-dir=<value> Import flag values from a directory.
546
+ --json Format output as json.
584
547
 
585
548
  EXAMPLES
586
549
  $ sf modeler:workspace:create
@@ -594,16 +557,14 @@ Create a deployment package of a Modeler workspace.
594
557
 
595
558
  ```
596
559
  USAGE
597
- $ sf modeler:workspace:package [--json] [-p <value>]
560
+ $ sf modeler:workspace:package [--json] [--flags-dir <value>] [-p <value>]
598
561
 
599
562
  FLAGS
600
563
  -p, --path=<value> path to the Modeler workspace
601
564
 
602
565
  GLOBAL FLAGS
603
- --json Format output as json.
604
-
605
- DESCRIPTION
606
- Create a deployment package of a Modeler workspace.
566
+ --flags-dir=<value> Import flag values from a directory.
567
+ --json Format output as json.
607
568
 
608
569
  ALIASES
609
570
  $ sf mdl:ws:package
@@ -621,18 +582,15 @@ Refresh locale translation in workspace.
621
582
 
622
583
  ```
623
584
  USAGE
624
- $ sf modeler:workspace:refreshLocale [--json] [-c <value>] [-p <value>]
585
+ $ sf modeler:workspace:refreshLocale [--json] [--flags-dir <value>] [-p <value>] [-c <value>]
625
586
 
626
587
  FLAGS
627
- -c, --contract=<value> Name of the locale contracts to be refreshed. To specify multiple values, use a comma (,)
628
- separator.
588
+ -c, --contract=<value> path to the Modeler workspace
629
589
  -p, --path=<value> path to the Modeler workspace
630
590
 
631
591
  GLOBAL FLAGS
632
- --json Format output as json.
633
-
634
- DESCRIPTION
635
- Refresh locale translation in workspace.
592
+ --flags-dir=<value> Import flag values from a directory.
593
+ --json Format output as json.
636
594
  ```
637
595
 
638
596
  ## `sf modeler:workspace:server:start`
@@ -641,16 +599,14 @@ Start the server
641
599
 
642
600
  ```
643
601
  USAGE
644
- $ sf modeler:workspace:server:start [--json] [-p <value>]
602
+ $ sf modeler:workspace:server:start [--json] [--flags-dir <value>] [-p <value>]
645
603
 
646
604
  FLAGS
647
605
  -p, --path=<value> path to the Modeler workspace
648
606
 
649
607
  GLOBAL FLAGS
650
- --json Format output as json.
651
-
652
- DESCRIPTION
653
- Start the server
608
+ --flags-dir=<value> Import flag values from a directory.
609
+ --json Format output as json.
654
610
 
655
611
  ALIASES
656
612
  $ sf mdl:ws:server:start
@@ -669,16 +625,14 @@ Upgrades a Modeler workspace.
669
625
 
670
626
  ```
671
627
  USAGE
672
- $ sf modeler:workspace:upgrade [--json] [-p <value>]
628
+ $ sf modeler:workspace:upgrade [--json] [--flags-dir <value>] [-p <value>]
673
629
 
674
630
  FLAGS
675
631
  -p, --path=<value> path to the Modeler workspace
676
632
 
677
633
  GLOBAL FLAGS
678
- --json Format output as json.
679
-
680
- DESCRIPTION
681
- Upgrades a Modeler workspace.
634
+ --flags-dir=<value> Import flag values from a directory.
635
+ --json Format output as json.
682
636
 
683
637
  EXAMPLES
684
638
  $ sf modeler:workspace:upgrade
@@ -692,17 +646,15 @@ Returns a Base64-encoded string from a given input file.
692
646
 
693
647
  ```
694
648
  USAGE
695
- $ sf modeler:workspace:utils:base64encode -i <value> [--json] [-p <value>]
649
+ $ sf modeler:workspace:utils:base64encode -i <value> [--json] [--flags-dir <value>] [-p <value>]
696
650
 
697
651
  FLAGS
698
652
  -i, --input=<value> (required) path to the input file for Base64 encoding
699
653
  -p, --path=<value> path to the Modeler workspace
700
654
 
701
655
  GLOBAL FLAGS
702
- --json Format output as json.
703
-
704
- DESCRIPTION
705
- Returns a Base64-encoded string from a given input file.
656
+ --flags-dir=<value> Import flag values from a directory.
657
+ --json Format output as json.
706
658
 
707
659
  EXAMPLES
708
660
  $ sf modeler:workspace:utils:base64encode --input ./image.svg
@@ -716,7 +668,7 @@ Imports design contracts to the specified workspace.
716
668
 
717
669
  ```
718
670
  USAGE
719
- $ sf modeler:workspace:utils:importContracts -i <value> [--json] [-p <value>] [-c]
671
+ $ sf modeler:workspace:utils:importContracts -i <value> [--json] [--flags-dir <value>] [-p <value>] [-c]
720
672
 
721
673
  FLAGS
722
674
  -c, --core Use the flag to import only the core contracts (.core.xml) from a custom Modeler Content Package
@@ -728,10 +680,8 @@ FLAGS
728
680
  -p, --path=<value> path to the Modeler workspace
729
681
 
730
682
  GLOBAL FLAGS
731
- --json Format output as json.
732
-
733
- DESCRIPTION
734
- Imports design contracts to the specified workspace.
683
+ --flags-dir=<value> Import flag values from a directory.
684
+ --json Format output as json.
735
685
  ```
736
686
 
737
687
  ## `sf modeler:workspace:utils:migrateContracts`
@@ -740,16 +690,14 @@ Migrate existing contracts in your Modeler workspace to support the latest versi
740
690
 
741
691
  ```
742
692
  USAGE
743
- $ sf modeler:workspace:utils:migrateContracts [--json] [-p <value>]
693
+ $ sf modeler:workspace:utils:migrateContracts [--json] [--flags-dir <value>] [-p <value>]
744
694
 
745
695
  FLAGS
746
696
  -p, --path=<value> path to the Modeler workspace
747
697
 
748
698
  GLOBAL FLAGS
749
- --json Format output as json.
750
-
751
- DESCRIPTION
752
- Migrate existing contracts in your Modeler workspace to support the latest version of Modeler.
699
+ --flags-dir=<value> Import flag values from a directory.
700
+ --json Format output as json.
753
701
  ```
754
702
 
755
703
  ## `sf modeler:workspace:validate`
@@ -758,16 +706,14 @@ Validate the contracts in a modeler workspace
758
706
 
759
707
  ```
760
708
  USAGE
761
- $ sf modeler:workspace:validate [--json] [-p <value>]
709
+ $ sf modeler:workspace:validate [--json] [--flags-dir <value>] [-p <value>]
762
710
 
763
711
  FLAGS
764
712
  -p, --path=<value> path to the Modeler workspace
765
713
 
766
714
  GLOBAL FLAGS
767
- --json Format output as json.
768
-
769
- DESCRIPTION
770
- Validate the contracts in a modeler workspace
715
+ --flags-dir=<value> Import flag values from a directory.
716
+ --json Format output as json.
771
717
 
772
718
  ALIASES
773
719
  $ sf mdl:ws:validate
@@ -778,4 +724,5 @@ EXAMPLES
778
724
 
779
725
  $ sf modeler:workspace:validate --path ./testWorkspace
780
726
  ```
727
+
781
728
  <!-- commandsstop -->
@@ -1 +1 @@
1
- "use strict";var __createBinding=this&&this.__createBinding||(Object.create?function(e,s,a,r){void 0===r&&(r=a);var t=Object.getOwnPropertyDescriptor(s,a);t&&!("get"in t?!s.__esModule:t.writable||t.configurable)||(t={enumerable:!0,get:function(){return s[a]}}),Object.defineProperty(e,r,t)}:function(e,s,a,r){void 0===r&&(r=a),e[r]=s[a]}),__setModuleDefault=this&&this.__setModuleDefault||(Object.create?function(e,s){Object.defineProperty(e,"default",{enumerable:!0,value:s})}:function(e,s){e.default=s}),__importStar=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var s={};if(null!=e)for(var a in e)"default"!==a&&Object.prototype.hasOwnProperty.call(e,a)&&__createBinding(s,e,a);return __setModuleDefault(s,e),s};Object.defineProperty(exports,"__esModule",{value:!0}),exports.AddWorkspaceCommand=void 0;const os=__importStar(require("os")),sf_plugins_core_1=require("@salesforce/sf-plugins-core"),core_1=require("@salesforce/core"),workspaceCommand_1=require("../../../model/workspaceCommand"),constants_1=require("../../../constants"),messages_1=require("../../../types/messages"),messageHelper=__importStar(require("../../../utils/messageHelper")),errors_1=require("../../../types/errors"),errorHelper=__importStar(require("../../../utils/errorHelper")),templateEngine_1=require("../../../utils/templateEngine");core_1.Messages.importMessagesDirectory(__dirname);const messages=core_1.Messages.loadMessages(constants_1.PACKAGE_NAME,messages_1.MessagesBundle.Workspace_Add),sharedMessages=core_1.Messages.loadMessages(constants_1.PACKAGE_NAME,messages_1.MessagesBundle.Workspace);class AddWorkspaceCommand extends workspaceCommand_1.WorkspaceCommand{async run(){const{flags:e}=await this.parse(AddWorkspaceCommand);this.workspace=await this.assignWorkspace(e.path);let s=!0,a="";if(this.workspace.exists()){this.checkForWorkspaceUpgrade();try{let r={};e.type&&(r[templateEngine_1.QuestionType.Type]=e.type),e.name&&(r[templateEngine_1.QuestionType.Name]=e.name),e.module&&(r[templateEngine_1.QuestionType.Module]=e.module);let t=this.getTemplateEngine(),o=await t.processRequest(r);if(s=!0,o.State===templateEngine_1.TemplateEngineState.DONE){if(a=messages.getMessage(messages_1.MessagesBundle_Workspace_Add.WorkspaceAddSuccessful,[o.Type,o.Name]),this.log(a),o.Files&&o.Files.length>0)for(let e=0;e<o.Files.length;e++){const s=o.Files[e];this.log(` * ${s}`)}}else o.State===templateEngine_1.TemplateEngineState.ABORTED?(a=messages.getMessage(messages_1.MessagesBundle_Workspace_Add.WorkspaceAddAborted,[o.Type,o.Name]),this.warn(a)):o.State===templateEngine_1.TemplateEngineState.FAILED&&(s=!1,a=messages.getMessage(messages_1.MessagesBundle_Workspace_Add.WorkspaceAddFailed,[o.Type,o.Name,o.Message]),this.error(a,{exit:!1}))}catch(e){throw s=!1,errorHelper.createSfError(errors_1.ErrorTypes.AddWorkspaceError,messages.getMessage(messages_1.MessagesBundle_Workspace_Add.WorkspaceAddError),e)}}else s=!1,a=sharedMessages.getMessage(messages_1.MessagesBundle_Workspace.WorkspaceNotFound,[this.workspace.getBasePath()]),this.warn(a);return{success:s,message:a}}getTemplateEngine(){return new templateEngine_1.TemplateEngine(this.workspace)}checkForWorkspaceUpgrade(){if(this.workspace&&this.workspace.exists()){let e=this.workspace.checkForUpgrade();if(e.upgradeAvailable){let s=messages.getMessage(messages_1.MessagesBundle_Workspace_Add.WorkspaceUpgradeAvailable),a=messageHelper.formatMessage(s,Object.assign({config:this.config},e));this.warn(a)}}}}exports.AddWorkspaceCommand=AddWorkspaceCommand,AddWorkspaceCommand.description=messages.getMessage(messages_1.MessagesBundle_Workspace_Add.CommandDescription),AddWorkspaceCommand.aliases=["mdl:add","mdl:ws:add"],AddWorkspaceCommand.flags=Object.assign({type:sf_plugins_core_1.Flags.string({char:"t",description:messages.getMessage(messages_1.MessagesBundle_Workspace_Add.TypeFlagDescription),required:!1,multiple:!1}),module:sf_plugins_core_1.Flags.string({char:"m",description:messages.getMessage(messages_1.MessagesBundle_Workspace_Add.ModuleFlagDescription),required:!1,multiple:!1}),name:sf_plugins_core_1.Flags.string({char:"n",description:messages.getMessage(messages_1.MessagesBundle_Workspace_Add.NameFlagDescription),required:!1,multiple:!1})},workspaceCommand_1.WorkspaceCommand.flags),AddWorkspaceCommand.examples=messages.getMessage(messages_1.MessagesBundle_Workspace_Add.Examples).split(os.EOL);
1
+ import{Flags,SfCommand}from"@salesforce/sf-plugins-core";import{ErrorTypes}from"../../../types/errors.js";import{MessagesBundle,MessagesBundleWorkspace,MessagesBundleWorkspaceAdd}from"../../../types/messages.js";import{CommandHelper}from"../../../utils/commandHelper.js";import{createSfError}from"../../../utils/errorHelper.js";import{formatMessage}from"../../../utils/messageHelper.js";import*as messageHelper from"../../../utils/messageHelper.js";import{TemplateEngine,TemplateEngineState,QuestionType}from"../../../utils/templateEngine.js";export class AddWorkspaceCommand extends SfCommand{static aliases=["mdl:add","mdl:ws:add"];static deprecateAliases=!1;static summary=messageHelper.getMessage(MessagesBundle.WorkspaceAdd,MessagesBundleWorkspaceAdd.CommandDescription);static examples=messageHelper.getMessages(MessagesBundle.WorkspaceAdd,MessagesBundleWorkspaceAdd.Examples);static flags={path:CommandHelper.getPathFlag(),type:Flags.string({char:"t",summary:messageHelper.getMessage(MessagesBundle.WorkspaceAdd,MessagesBundleWorkspaceAdd.TypeFlagDescription),required:!1,multiple:!1}),module:Flags.string({char:"m",summary:messageHelper.getMessage(MessagesBundle.WorkspaceAdd,MessagesBundleWorkspaceAdd.ModuleFlagDescription),required:!1,multiple:!1}),name:Flags.string({char:"n",summary:messageHelper.getMessage(MessagesBundle.WorkspaceAdd,MessagesBundleWorkspaceAdd.NameFlagDescription),required:!1,multiple:!1})};workspace;async run(){const{flags:e}=await this.parse(AddWorkspaceCommand);this.workspace=CommandHelper.getWorkspace(e.path);let s=!0,a="";if(this.workspace.exists()){this.checkForWorkspaceUpgrade();try{const r={};e.type&&(r[QuestionType.Type]=e.type),e.name&&(r[QuestionType.Name]=e.name),e.module&&(r[QuestionType.Module]=e.module);const t=this.getTemplateEngine(),p=await t.processRequest(r);if(s=!0,p.State===TemplateEngineState.DONE){if(a=messageHelper.getMessage(MessagesBundle.WorkspaceAdd,MessagesBundleWorkspaceAdd.WorkspaceAddSuccessful,[p.Type,p.Name]),this.log(a),p.Files&&p.Files.length>0)for(const e of p.Files)this.log(` * ${e}`)}else p.State===TemplateEngineState.ABORTED?(a=messageHelper.getMessage(MessagesBundle.WorkspaceAdd,MessagesBundleWorkspaceAdd.WorkspaceAddAborted,[p.Type,p.Name]),this.warn(a)):p.State===TemplateEngineState.FAILED&&(s=!1,a=messageHelper.getMessage(MessagesBundle.WorkspaceAdd,MessagesBundleWorkspaceAdd.WorkspaceAddFailed,[p.Type,p.Name,p.Message]),this.error(a,{exit:!1}))}catch(e){throw s=!1,createSfError(ErrorTypes.AddWorkspaceError,messageHelper.getMessage(MessagesBundle.WorkspaceAdd,MessagesBundleWorkspaceAdd.WorkspaceAddError),e)}}else s=!1,a=messageHelper.getMessage(MessagesBundle.Workspace,MessagesBundleWorkspace.WorkspaceNotFound,[this.workspace.getBasePath()]),this.warn(a);return{success:s,message:a}}getTemplateEngine(){return new TemplateEngine(this.workspace)}checkForWorkspaceUpgrade(){if(this.workspace&&this.workspace.exists()){const e=this.workspace.checkForUpgrade();if(e.upgradeAvailable){const s=messageHelper.getMessage(MessagesBundle.WorkspaceAdd,MessagesBundleWorkspaceAdd.WorkspaceUpgradeAvailable),a=formatMessage(s,Object.assign({config:this.config},e));this.warn(a)}}}}