@contrail/cli 2.0.3 → 2.0.5

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 (42) hide show
  1. package/README.md +330 -187
  2. package/dist/api/apps.d.ts +1 -1
  3. package/dist/api/apps.js +2 -1
  4. package/dist/commands/app/install.d.ts +1 -0
  5. package/dist/commands/app/install.js +3 -2
  6. package/dist/commands/groups/export.d.ts +12 -0
  7. package/dist/commands/groups/export.js +93 -0
  8. package/dist/commands/groups/upload.d.ts +10 -0
  9. package/dist/commands/groups/upload.js +166 -0
  10. package/dist/commands/instance/export.d.ts +10 -0
  11. package/dist/commands/instance/export.js +24 -0
  12. package/dist/commands/instance/import.d.ts +9 -0
  13. package/dist/commands/instance/import.js +23 -0
  14. package/dist/commands/types/getAll.d.ts +5 -1
  15. package/dist/commands/types/getAll.js +31 -11
  16. package/dist/commands/types/loadAll.d.ts +5 -2
  17. package/dist/commands/types/loadAll.js +17 -13
  18. package/dist/commands/types/uploadOptionSetHierarchies.d.ts +4 -1
  19. package/dist/commands/types/uploadOptionSetHierarchies.js +13 -9
  20. package/dist/commands/types/uploadOptionSets.d.ts +4 -1
  21. package/dist/commands/types/uploadOptionSets.js +13 -9
  22. package/dist/commands/types/uploadRuleSets.d.ts +4 -1
  23. package/dist/commands/types/uploadRuleSets.js +12 -8
  24. package/dist/commands/types/uploadTypePropertyPolicies.d.ts +4 -1
  25. package/dist/commands/types/uploadTypePropertyPolicies.js +12 -8
  26. package/dist/commands/types/uploadUsageInfo.d.ts +4 -1
  27. package/dist/commands/types/uploadUsageInfo.js +9 -6
  28. package/dist/commands/users/export.d.ts +4 -1
  29. package/dist/commands/users/export.js +16 -7
  30. package/dist/commands/users/upload.d.ts +1 -0
  31. package/dist/commands/users/upload.js +5 -4
  32. package/dist/helpers/app/app-deployer.js +2 -0
  33. package/dist/helpers/file-helpers.d.ts +1 -0
  34. package/dist/helpers/file-helpers.js +23 -0
  35. package/dist/helpers/types/type-uploader.d.ts +1 -1
  36. package/dist/helpers/types/type-uploader.js +8 -8
  37. package/dist/interfaces.d.ts +1 -0
  38. package/dist/templates/typescript/app.yml +1 -0
  39. package/dist/templates/typescript/src/actions/logItem.ts +3 -8
  40. package/dist/templates/typescript/src/framework/app-config.ts +1 -4
  41. package/oclif.manifest.json +212 -15
  42. package/package.json +8 -3
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "2.0.3",
2
+ "version": "2.0.5",
3
3
  "commands": {
4
4
  "app:create": {
5
5
  "id": "app:create",
@@ -78,6 +78,14 @@
78
78
  "description": "Install the app's accompanying workflows",
79
79
  "required": false,
80
80
  "allowNo": false
81
+ },
82
+ "showHidden": {
83
+ "name": "showHidden",
84
+ "type": "boolean",
85
+ "char": "h",
86
+ "description": "Show the option to install public but hidden apps",
87
+ "required": false,
88
+ "allowNo": false
81
89
  }
82
90
  },
83
91
  "args": {}
@@ -287,6 +295,110 @@
287
295
  },
288
296
  "args": {}
289
297
  },
298
+ "groups:export": {
299
+ "id": "groups:export",
300
+ "description": "Export all groups in the org.",
301
+ "strict": true,
302
+ "pluginName": "@contrail/cli",
303
+ "pluginAlias": "@contrail/cli",
304
+ "pluginType": "core",
305
+ "aliases": [],
306
+ "examples": [
307
+ "$ contrail groups export\n"
308
+ ],
309
+ "flags": {
310
+ "outDir": {
311
+ "name": "outDir",
312
+ "type": "option",
313
+ "char": "d",
314
+ "description": "The location for the file to be saved",
315
+ "required": false,
316
+ "multiple": false,
317
+ "default": "groups.yml"
318
+ },
319
+ "overwrite": {
320
+ "name": "overwrite",
321
+ "type": "boolean",
322
+ "description": "Replaces existing files if they exist",
323
+ "required": false,
324
+ "allowNo": false
325
+ }
326
+ },
327
+ "args": {}
328
+ },
329
+ "groups:upload": {
330
+ "id": "groups:upload",
331
+ "description": "Import all groups in the groups.yml file",
332
+ "strict": true,
333
+ "pluginName": "@contrail/cli",
334
+ "pluginAlias": "@contrail/cli",
335
+ "pluginType": "core",
336
+ "aliases": [],
337
+ "examples": [
338
+ "$ contrail groups import <GROUPS_FILE>\n"
339
+ ],
340
+ "flags": {},
341
+ "args": {
342
+ "groupsFile": {
343
+ "name": "groupsFile",
344
+ "description": "The .yml file containing the groups",
345
+ "required": true
346
+ }
347
+ }
348
+ },
349
+ "instance:export": {
350
+ "id": "instance:export",
351
+ "description": "Exports an data of an instance including types and users",
352
+ "strict": true,
353
+ "pluginName": "@contrail/cli",
354
+ "pluginAlias": "@contrail/cli",
355
+ "pluginType": "core",
356
+ "aliases": [],
357
+ "examples": [
358
+ "$ contrail instance export\n"
359
+ ],
360
+ "flags": {
361
+ "outDir": {
362
+ "name": "outDir",
363
+ "type": "option",
364
+ "description": "The directory to which to export the instance data. Defaults to the current directory",
365
+ "required": false,
366
+ "multiple": false,
367
+ "default": "."
368
+ },
369
+ "overwrite": {
370
+ "name": "overwrite",
371
+ "type": "boolean",
372
+ "description": "Replaces any existing export files in outDir",
373
+ "required": false,
374
+ "allowNo": false
375
+ }
376
+ },
377
+ "args": {}
378
+ },
379
+ "instance:import": {
380
+ "id": "instance:import",
381
+ "description": "Import the data to an instance, including types and users",
382
+ "strict": true,
383
+ "pluginName": "@contrail/cli",
384
+ "pluginAlias": "@contrail/cli",
385
+ "pluginType": "core",
386
+ "aliases": [],
387
+ "examples": [
388
+ "$ contrail instance import\n"
389
+ ],
390
+ "flags": {
391
+ "dir": {
392
+ "name": "dir",
393
+ "type": "option",
394
+ "description": "The directory from which to export the instance data. Defaults to the current directory",
395
+ "required": false,
396
+ "multiple": false,
397
+ "default": "."
398
+ }
399
+ },
400
+ "args": {}
401
+ },
290
402
  "loader-process:load": {
291
403
  "id": "loader-process:load",
292
404
  "description": "Upload a csv file and kick off a load job for the uploaded file. The config path must be a reference to a .json or a .yml file.",
@@ -411,21 +523,48 @@
411
523
  "examples": [
412
524
  "$ contrail types getAll\n"
413
525
  ],
414
- "flags": {},
526
+ "flags": {
527
+ "outDir": {
528
+ "name": "outDir",
529
+ "type": "option",
530
+ "char": "d",
531
+ "description": "The directory to which to export the type data. Defaults to the current directory",
532
+ "required": false,
533
+ "multiple": false,
534
+ "default": "."
535
+ },
536
+ "overwrite": {
537
+ "name": "overwrite",
538
+ "type": "boolean",
539
+ "description": "Replaces any existing export files in outDir",
540
+ "required": false,
541
+ "allowNo": false
542
+ }
543
+ },
415
544
  "args": {}
416
545
  },
417
546
  "types:loadAll": {
418
547
  "id": "types:loadAll",
419
- "description": "Get all Types and associated data for your Org",
548
+ "description": "loads all the type data that has been exported by getAll",
420
549
  "strict": true,
421
550
  "pluginName": "@contrail/cli",
422
551
  "pluginAlias": "@contrail/cli",
423
552
  "pluginType": "core",
424
553
  "aliases": [],
425
554
  "examples": [
426
- "$ contrail types getAll\n"
555
+ "$ contrail types loadAll\n"
427
556
  ],
428
- "flags": {},
557
+ "flags": {
558
+ "dir": {
559
+ "name": "dir",
560
+ "type": "option",
561
+ "char": "d",
562
+ "description": "The directory from which to load the types data. Defaults to the current directory.",
563
+ "required": false,
564
+ "multiple": false,
565
+ "default": "."
566
+ }
567
+ },
429
568
  "args": {}
430
569
  },
431
570
  "types:mergeOptionSets": {
@@ -636,7 +775,7 @@
636
775
  },
637
776
  "types:uploadOptionSetHierarchies": {
638
777
  "id": "types:uploadOptionSetHierarchies",
639
- "description": "Upload OptionSets for your Org. OptionSets are loaded from .yml files in the option-sets directory.",
778
+ "description": "Upload Option Set Hierarchies for your Org. Option set hierarchies are loaded from .yml files in the option-set-hierarchies directory.",
640
779
  "strict": true,
641
780
  "pluginName": "@contrail/cli",
642
781
  "pluginAlias": "@contrail/cli",
@@ -645,7 +784,17 @@
645
784
  "examples": [
646
785
  "$ contrail types uploadOptionSetHierarchies\n"
647
786
  ],
648
- "flags": {},
787
+ "flags": {
788
+ "dir": {
789
+ "name": "dir",
790
+ "type": "option",
791
+ "char": "d",
792
+ "description": "The directory from which to export the option set hierarchies data. Defaults to the current directory. The option set data will be loaded from $dir/option-set-hierarchies",
793
+ "required": false,
794
+ "multiple": false,
795
+ "default": "."
796
+ }
797
+ },
649
798
  "args": {}
650
799
  },
651
800
  "types:uploadOptionSets": {
@@ -659,7 +808,17 @@
659
808
  "examples": [
660
809
  "$ contrail types uploadOptionSets\n"
661
810
  ],
662
- "flags": {},
811
+ "flags": {
812
+ "dir": {
813
+ "name": "dir",
814
+ "type": "option",
815
+ "char": "d",
816
+ "description": "The directory from which to export the option set data. Defaults to the current directory. The option set data will be loaded from $dir/option-sets",
817
+ "required": false,
818
+ "multiple": false,
819
+ "default": "."
820
+ }
821
+ },
663
822
  "args": {}
664
823
  },
665
824
  "types:uploadOptionSetsHierarchyLocalFile": {
@@ -698,7 +857,17 @@
698
857
  "examples": [
699
858
  "$ contrail types uploadRuleSets\n"
700
859
  ],
701
- "flags": {},
860
+ "flags": {
861
+ "dir": {
862
+ "name": "dir",
863
+ "type": "option",
864
+ "char": "d",
865
+ "description": "The directory from which to export the rule set data. Defaults to the current directory. The rule set data will be loaded from $dir/rule-sets/*.yml",
866
+ "required": false,
867
+ "multiple": false,
868
+ "default": "."
869
+ }
870
+ },
702
871
  "args": {}
703
872
  },
704
873
  "types:uploadTypePropertyPolicies": {
@@ -712,7 +881,17 @@
712
881
  "examples": [
713
882
  "$ contrail types uploadTypePropertyPolicies\n"
714
883
  ],
715
- "flags": {},
884
+ "flags": {
885
+ "dir": {
886
+ "name": "dir",
887
+ "type": "option",
888
+ "char": "d",
889
+ "description": "The directory from which to export the type property policy data. Defaults to the current directory. The type property policy data will be loaded from $dir/type-property-policies/*.yml",
890
+ "required": false,
891
+ "multiple": false,
892
+ "default": "."
893
+ }
894
+ },
716
895
  "args": {}
717
896
  },
718
897
  "types:uploadUsageInfo": {
@@ -726,7 +905,17 @@
726
905
  "examples": [
727
906
  "$ contrail types uploadUsageInfo\n"
728
907
  ],
729
- "flags": {},
908
+ "flags": {
909
+ "dir": {
910
+ "name": "dir",
911
+ "type": "option",
912
+ "char": "d",
913
+ "description": "The directory from which to export the usage info data. Defaults to the current directory. The option set data will be loaded from $dir/usage-info.yml",
914
+ "required": false,
915
+ "multiple": false,
916
+ "default": "."
917
+ }
918
+ },
730
919
  "args": {}
731
920
  },
732
921
  "users:export": {
@@ -741,13 +930,21 @@
741
930
  "$ contrail users export\n"
742
931
  ],
743
932
  "flags": {
744
- "fileOut": {
745
- "name": "fileOut",
933
+ "outDir": {
934
+ "name": "outDir",
746
935
  "type": "option",
747
- "char": "f",
936
+ "char": "d",
748
937
  "description": "The location for the file to be saved",
749
938
  "required": false,
750
- "multiple": false
939
+ "multiple": false,
940
+ "default": "users.yml"
941
+ },
942
+ "overwrite": {
943
+ "name": "overwrite",
944
+ "type": "boolean",
945
+ "description": "Replaces existing files if they exist",
946
+ "required": false,
947
+ "allowNo": false
751
948
  }
752
949
  },
753
950
  "args": {}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@contrail/cli",
3
- "version": "2.0.3",
3
+ "version": "2.0.5",
4
4
  "description": "VibeIQ's Contrail Platform CLI.",
5
5
  "bin": {
6
6
  "contrail-cli": "./bin/run",
@@ -26,6 +26,7 @@
26
26
  "@contrail/types": "^3.0.20",
27
27
  "@contrail/util": "^1.0.17",
28
28
  "@oclif/core": "^2",
29
+ "@oclif/plugin-autocomplete": "^2.1.4",
29
30
  "@oclif/plugin-help": "^5",
30
31
  "@oclif/plugin-plugins": "^2.3.2",
31
32
  "@typescript-eslint/eslint-plugin": "^5.54.1",
@@ -64,12 +65,13 @@
64
65
  "typescript": "^4.9.5"
65
66
  },
66
67
  "oclif": {
67
- "bin": "contrail-cli",
68
+ "bin": "contrail",
68
69
  "dirname": "contrail-cli",
69
70
  "commands": "./dist/commands",
70
71
  "plugins": [
71
72
  "@oclif/plugin-help",
72
- "@oclif/plugin-plugins"
73
+ "@oclif/plugin-plugins",
74
+ "@oclif/plugin-autocomplete"
73
75
  ],
74
76
  "topicSeparator": " ",
75
77
  "topics": {
@@ -96,6 +98,9 @@
96
98
  },
97
99
  "workflow-templates": {
98
100
  "description": "Manage workflow templates"
101
+ },
102
+ "instance": {
103
+ "description": "Manage instance (org) configuration data"
99
104
  }
100
105
  }
101
106
  },