@contrail/cli 3.6.0-alpha-8-alpha.85a73d5 → 3.6.0-alpha.5ecc188
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +26 -181
- package/dist/api/types.d.ts +0 -35
- package/dist/api/types.js +1 -49
- package/dist/auth/login.d.ts +4 -0
- package/dist/auth/login.js +136 -56
- package/dist/auth/login.spec.js +117 -3
- package/dist/auth/sign-in-error.d.ts +7 -0
- package/dist/auth/sign-in-error.js +24 -0
- package/dist/auth/sign-in-error.spec.js +22 -0
- package/dist/auth/sso.d.ts +38 -0
- package/dist/auth/sso.js +184 -0
- package/dist/auth/sso.spec.js +191 -0
- package/dist/basecommand.d.ts +3 -0
- package/dist/basecommand.js +10 -3
- package/dist/commands/app/getApiKey.js +2 -2
- package/dist/commands/login.d.ts +12 -0
- package/dist/commands/login.js +25 -0
- package/dist/common.d.ts +1 -4
- package/dist/common.js +1 -18
- package/dist/helpers/config/config.d.ts +3 -3
- package/dist/helpers/config/config.js +3 -3
- package/dist/helpers/file-helpers.d.ts +0 -1
- package/dist/helpers/file-helpers.js +3 -20
- package/dist/logger.js +1 -4
- package/node_modules/@contrail/entity-compare/package.json +3 -6
- package/node_modules/@contrail/loader/lib/common/conditional-columns.js +1 -1
- package/node_modules/@contrail/loader/lib/constants.d.ts +8 -0
- package/node_modules/@contrail/loader/lib/constants.js +9 -1
- package/node_modules/@contrail/loader/lib/entities-v2/linesheet-v2/item-processor.d.ts +4 -0
- package/node_modules/@contrail/loader/lib/entities-v2/linesheet-v2/item-processor.js +57 -0
- package/node_modules/@contrail/loader/lib/entities-v2/linesheet-v2/item-processor.spec.js +492 -34
- package/node_modules/@contrail/loader/lib/pipeline/validate.js +2 -52
- package/node_modules/@contrail/loader/lib/pipeline/validate.spec.js +0 -85
- package/node_modules/@contrail/loader/package.json +2 -2
- package/node_modules/@contrail/sdk/.github/workflows/publish-to-npm.yml +4 -1
- package/node_modules/@contrail/sdk/lib/auth/login.js +1 -1
- package/node_modules/@contrail/sdk/lib/config/config.d.ts +0 -3
- package/node_modules/@contrail/sdk/lib/config/config.js +7 -13
- package/node_modules/@contrail/sdk/lib/core/request.js +2 -6
- package/node_modules/@contrail/sdk/lib/entities/entities.client.d.ts +0 -2
- package/node_modules/@contrail/sdk/lib/entities/entities.client.js +1 -3
- package/node_modules/@contrail/sdk/lib/entities/entity.resource.registry.js +0 -1
- package/node_modules/@contrail/sdk/lib/index.d.ts +0 -1
- package/node_modules/@contrail/sdk/lib/index.js +0 -1
- package/node_modules/@contrail/sdk/package.json +1 -1
- package/oclif.manifest.json +50 -449
- package/package.json +12 -5
- package/dist/commands/entities/create.d.ts +0 -50
- package/dist/commands/entities/create.js +0 -633
- package/dist/commands/entities/create.spec.js +0 -583
- package/dist/commands/entities/delete.d.ts +0 -20
- package/dist/commands/entities/delete.js +0 -140
- package/dist/commands/entities/get.d.ts +0 -25
- package/dist/commands/entities/get.js +0 -269
- package/dist/commands/entities/grammar.spec.js +0 -79
- package/dist/commands/entities/output.spec.d.ts +0 -1
- package/dist/commands/entities/output.spec.js +0 -72
- package/dist/commands/entities/update.d.ts +0 -32
- package/dist/commands/entities/update.js +0 -161
- package/dist/helpers/entities/assortment-items.d.ts +0 -11
- package/dist/helpers/entities/assortment-items.js +0 -76
- package/dist/helpers/entities/batchFetch.d.ts +0 -8
- package/dist/helpers/entities/batchFetch.js +0 -49
- package/dist/helpers/entities/index.d.ts +0 -3
- package/dist/helpers/entities/index.js +0 -6
- package/dist/helpers/entities/items.d.ts +0 -6
- package/dist/helpers/entities/items.js +0 -56
- package/dist/helpers/entities/items.spec.d.ts +0 -1
- package/dist/helpers/entities/items.spec.js +0 -19
- package/dist/helpers/entities/project-items.d.ts +0 -2
- package/dist/helpers/entities/project-items.js +0 -44
- package/dist/helpers/propertySpecifications/dateRanges.d.ts +0 -34
- package/dist/helpers/propertySpecifications/dateRanges.js +0 -83
- package/dist/helpers/propertySpecifications/dateRanges.spec.d.ts +0 -1
- package/dist/helpers/propertySpecifications/dateRanges.spec.js +0 -91
- package/dist/helpers/propertySpecifications/propertySpecifications.d.ts +0 -39
- package/dist/helpers/propertySpecifications/propertySpecifications.js +0 -102
- package/dist/helpers/propertySpecifications/propertySpecifications.spec.d.ts +0 -1
- package/dist/helpers/propertySpecifications/propertySpecifications.spec.js +0 -387
- package/dist/logger.spec.d.ts +0 -1
- package/dist/logger.spec.js +0 -12
- package/node_modules/@contrail/sdk/lib/image-search/image-search.d.ts +0 -34
- package/node_modules/@contrail/sdk/lib/image-search/image-search.js +0 -42
- package/node_modules/@contrail/sdk/lib/image-search/index.d.ts +0 -1
- package/node_modules/@contrail/sdk/lib/image-search/index.js +0 -17
- package/node_modules/@contrail/sdk/scripts/replicate-bug.js +0 -69
- /package/dist/{commands/entities/create.spec.d.ts → auth/sign-in-error.spec.d.ts} +0 -0
- /package/dist/{commands/entities/grammar.spec.d.ts → auth/sso.spec.d.ts} +0 -0
package/oclif.manifest.json
CHANGED
|
@@ -1,6 +1,55 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "3.6.0-alpha
|
|
2
|
+
"version": "3.6.0-alpha.5ecc188",
|
|
3
3
|
"commands": {
|
|
4
|
+
"login": {
|
|
5
|
+
"id": "login",
|
|
6
|
+
"description": "Sign in to VibeIQ with SSO or your email and password",
|
|
7
|
+
"strict": true,
|
|
8
|
+
"pluginName": "@contrail/cli",
|
|
9
|
+
"pluginAlias": "@contrail/cli",
|
|
10
|
+
"pluginType": "core",
|
|
11
|
+
"aliases": [],
|
|
12
|
+
"examples": [
|
|
13
|
+
"$ contrail login",
|
|
14
|
+
"$ contrail login --no-browser"
|
|
15
|
+
],
|
|
16
|
+
"flags": {
|
|
17
|
+
"logLevel": {
|
|
18
|
+
"name": "logLevel",
|
|
19
|
+
"type": "option",
|
|
20
|
+
"char": "l",
|
|
21
|
+
"description": "The Log Level",
|
|
22
|
+
"required": false,
|
|
23
|
+
"multiple": false,
|
|
24
|
+
"options": [
|
|
25
|
+
"error",
|
|
26
|
+
"warn",
|
|
27
|
+
"info",
|
|
28
|
+
"debug"
|
|
29
|
+
]
|
|
30
|
+
},
|
|
31
|
+
"alwaysConfirmEnv": {
|
|
32
|
+
"name": "alwaysConfirmEnv",
|
|
33
|
+
"type": "option",
|
|
34
|
+
"char": "e",
|
|
35
|
+
"description": "The Environment variables",
|
|
36
|
+
"required": false,
|
|
37
|
+
"multiple": false,
|
|
38
|
+
"options": [
|
|
39
|
+
"true",
|
|
40
|
+
"false"
|
|
41
|
+
],
|
|
42
|
+
"default": "true"
|
|
43
|
+
},
|
|
44
|
+
"browser": {
|
|
45
|
+
"name": "browser",
|
|
46
|
+
"type": "boolean",
|
|
47
|
+
"description": "Open a browser for SSO. Use --no-browser to paste a sign-in code instead.",
|
|
48
|
+
"allowNo": true
|
|
49
|
+
}
|
|
50
|
+
},
|
|
51
|
+
"args": {}
|
|
52
|
+
},
|
|
4
53
|
"app:create": {
|
|
5
54
|
"id": "app:create",
|
|
6
55
|
"description": "Create a new app. The current organization will be set as the owner of the app",
|
|
@@ -672,454 +721,6 @@
|
|
|
672
721
|
}
|
|
673
722
|
}
|
|
674
723
|
},
|
|
675
|
-
"entities:create": {
|
|
676
|
-
"id": "entities:create",
|
|
677
|
-
"description": "Create entities",
|
|
678
|
-
"strict": false,
|
|
679
|
-
"pluginName": "@contrail/cli",
|
|
680
|
-
"pluginAlias": "@contrail/cli",
|
|
681
|
-
"pluginType": "core",
|
|
682
|
-
"aliases": [],
|
|
683
|
-
"examples": [
|
|
684
|
-
"contrail entities create color -g -n=10 # creates 10 random colors",
|
|
685
|
-
"contrail entities create color -- name=\"Electric Blue\" green=1 red=2 blue=3 # creates one color with specified properties only",
|
|
686
|
-
"contrail entities create custom-entities:franchise",
|
|
687
|
-
"contrail entities create project-item -n=1 -- projectId=abc # creates 10 project items within project ABC",
|
|
688
|
-
"contrail entities create color -g -r # creates a random color with a human readable ID",
|
|
689
|
-
"contrail entities create color -d -- name=test # simulates the creation of a color without actually creating it",
|
|
690
|
-
"contrail entities create custom-entity:franchise -s # creates an entity and the response does not contain hydrating relationships",
|
|
691
|
-
"contrail entities create color -g -- name=Electric Blue # creates a color with the name specified and other properties auto-generated",
|
|
692
|
-
"contrail entities create color -o /tmp/colors.json -- name=Blue green=1 red=2 blue=3 # creates a color and saves the output to /tmp/colors.json"
|
|
693
|
-
],
|
|
694
|
-
"flags": {
|
|
695
|
-
"logLevel": {
|
|
696
|
-
"name": "logLevel",
|
|
697
|
-
"type": "option",
|
|
698
|
-
"char": "l",
|
|
699
|
-
"description": "The Log Level",
|
|
700
|
-
"required": false,
|
|
701
|
-
"multiple": false,
|
|
702
|
-
"options": [
|
|
703
|
-
"error",
|
|
704
|
-
"warn",
|
|
705
|
-
"info",
|
|
706
|
-
"debug"
|
|
707
|
-
]
|
|
708
|
-
},
|
|
709
|
-
"alwaysConfirmEnv": {
|
|
710
|
-
"name": "alwaysConfirmEnv",
|
|
711
|
-
"type": "option",
|
|
712
|
-
"char": "e",
|
|
713
|
-
"description": "The Environment variables",
|
|
714
|
-
"required": false,
|
|
715
|
-
"multiple": false,
|
|
716
|
-
"options": [
|
|
717
|
-
"true",
|
|
718
|
-
"false"
|
|
719
|
-
],
|
|
720
|
-
"default": "true"
|
|
721
|
-
},
|
|
722
|
-
"count": {
|
|
723
|
-
"name": "count",
|
|
724
|
-
"type": "option",
|
|
725
|
-
"char": "n",
|
|
726
|
-
"description": "Number of random entities to create",
|
|
727
|
-
"required": false,
|
|
728
|
-
"multiple": false
|
|
729
|
-
},
|
|
730
|
-
"dryRun": {
|
|
731
|
-
"name": "dryRun",
|
|
732
|
-
"type": "boolean",
|
|
733
|
-
"char": "d",
|
|
734
|
-
"description": "If true, does not create the entity but simulates the creation",
|
|
735
|
-
"required": false,
|
|
736
|
-
"allowNo": false
|
|
737
|
-
},
|
|
738
|
-
"inputFile": {
|
|
739
|
-
"name": "inputFile",
|
|
740
|
-
"type": "option",
|
|
741
|
-
"char": "i",
|
|
742
|
-
"description": "A file with a JSON array of objects where each object is one entity to create. Cannot be used with --count. Unless --generateValues is specified, only the properties in the file will be used.",
|
|
743
|
-
"required": false,
|
|
744
|
-
"multiple": false
|
|
745
|
-
},
|
|
746
|
-
"outputFile": {
|
|
747
|
-
"name": "outputFile",
|
|
748
|
-
"type": "option",
|
|
749
|
-
"char": "o",
|
|
750
|
-
"description": "File to save the output (optional)",
|
|
751
|
-
"required": false,
|
|
752
|
-
"multiple": false
|
|
753
|
-
},
|
|
754
|
-
"generateValues": {
|
|
755
|
-
"name": "generateValues",
|
|
756
|
-
"type": "boolean",
|
|
757
|
-
"char": "g",
|
|
758
|
-
"description": "If true, generates random values for properties that are not specified. By default, only specified properties are used.",
|
|
759
|
-
"required": false,
|
|
760
|
-
"allowNo": false
|
|
761
|
-
},
|
|
762
|
-
"readableIds": {
|
|
763
|
-
"name": "readableIds",
|
|
764
|
-
"type": "boolean",
|
|
765
|
-
"char": "r",
|
|
766
|
-
"description": "If true, uses readable IDs for the created entities",
|
|
767
|
-
"required": false,
|
|
768
|
-
"allowNo": false
|
|
769
|
-
},
|
|
770
|
-
"skipHydrateRelationships": {
|
|
771
|
-
"name": "skipHydrateRelationships",
|
|
772
|
-
"type": "boolean",
|
|
773
|
-
"char": "S",
|
|
774
|
-
"description": "If true, does not hydrate relationships for the created entities",
|
|
775
|
-
"required": false,
|
|
776
|
-
"allowNo": false
|
|
777
|
-
},
|
|
778
|
-
"suffix": {
|
|
779
|
-
"name": "suffix",
|
|
780
|
-
"type": "option",
|
|
781
|
-
"description": "Append a sub-route to the entity endpoint (e.g. --suffix=synchronous targets /<entities>/synchronous)",
|
|
782
|
-
"required": false,
|
|
783
|
-
"multiple": false
|
|
784
|
-
},
|
|
785
|
-
"apiVersion": {
|
|
786
|
-
"name": "apiVersion",
|
|
787
|
-
"type": "option",
|
|
788
|
-
"description": "Api-Version header to send; selects the V1 or V2 variant of the endpoint",
|
|
789
|
-
"required": false,
|
|
790
|
-
"multiple": false,
|
|
791
|
-
"options": [
|
|
792
|
-
"1",
|
|
793
|
-
"2"
|
|
794
|
-
]
|
|
795
|
-
}
|
|
796
|
-
},
|
|
797
|
-
"args": {
|
|
798
|
-
"typePath": {
|
|
799
|
-
"name": "typePath",
|
|
800
|
-
"description": "The type path of the entity to create (e.g. color, custom-entity:franchise)",
|
|
801
|
-
"required": true
|
|
802
|
-
}
|
|
803
|
-
}
|
|
804
|
-
},
|
|
805
|
-
"entities:delete": {
|
|
806
|
-
"id": "entities:delete",
|
|
807
|
-
"description": "Delete entities by id",
|
|
808
|
-
"strict": false,
|
|
809
|
-
"pluginName": "@contrail/cli",
|
|
810
|
-
"pluginAlias": "@contrail/cli",
|
|
811
|
-
"pluginType": "core",
|
|
812
|
-
"aliases": [],
|
|
813
|
-
"examples": [
|
|
814
|
-
"contrail entities delete color 123",
|
|
815
|
-
"contrail entities delete color id1 id2 id3",
|
|
816
|
-
"contrail entities delete item -i ids.json"
|
|
817
|
-
],
|
|
818
|
-
"flags": {
|
|
819
|
-
"logLevel": {
|
|
820
|
-
"name": "logLevel",
|
|
821
|
-
"type": "option",
|
|
822
|
-
"char": "l",
|
|
823
|
-
"description": "The Log Level",
|
|
824
|
-
"required": false,
|
|
825
|
-
"multiple": false,
|
|
826
|
-
"options": [
|
|
827
|
-
"error",
|
|
828
|
-
"warn",
|
|
829
|
-
"info",
|
|
830
|
-
"debug"
|
|
831
|
-
]
|
|
832
|
-
},
|
|
833
|
-
"alwaysConfirmEnv": {
|
|
834
|
-
"name": "alwaysConfirmEnv",
|
|
835
|
-
"type": "option",
|
|
836
|
-
"char": "e",
|
|
837
|
-
"description": "The Environment variables",
|
|
838
|
-
"required": false,
|
|
839
|
-
"multiple": false,
|
|
840
|
-
"options": [
|
|
841
|
-
"true",
|
|
842
|
-
"false"
|
|
843
|
-
],
|
|
844
|
-
"default": "true"
|
|
845
|
-
},
|
|
846
|
-
"dryRun": {
|
|
847
|
-
"name": "dryRun",
|
|
848
|
-
"type": "boolean",
|
|
849
|
-
"char": "d",
|
|
850
|
-
"description": "If true, does not delete the entities but simulates the deletion",
|
|
851
|
-
"required": false,
|
|
852
|
-
"allowNo": false
|
|
853
|
-
},
|
|
854
|
-
"inputFile": {
|
|
855
|
-
"name": "inputFile",
|
|
856
|
-
"type": "option",
|
|
857
|
-
"char": "i",
|
|
858
|
-
"description": "A file with a JSON array of objects; only each object's id is used. Deletes every entity in the file.",
|
|
859
|
-
"required": false,
|
|
860
|
-
"multiple": false
|
|
861
|
-
},
|
|
862
|
-
"suffix": {
|
|
863
|
-
"name": "suffix",
|
|
864
|
-
"type": "option",
|
|
865
|
-
"description": "Append a sub-route to the entity endpoint (e.g. --suffix=synchronous targets /<entities>/synchronous)",
|
|
866
|
-
"required": false,
|
|
867
|
-
"multiple": false
|
|
868
|
-
},
|
|
869
|
-
"apiVersion": {
|
|
870
|
-
"name": "apiVersion",
|
|
871
|
-
"type": "option",
|
|
872
|
-
"description": "Api-Version header to send; selects the V1 or V2 variant of the endpoint",
|
|
873
|
-
"required": false,
|
|
874
|
-
"multiple": false,
|
|
875
|
-
"options": [
|
|
876
|
-
"1",
|
|
877
|
-
"2"
|
|
878
|
-
]
|
|
879
|
-
}
|
|
880
|
-
},
|
|
881
|
-
"args": {
|
|
882
|
-
"entityName": {
|
|
883
|
-
"name": "entityName",
|
|
884
|
-
"description": "The name of the entity type to delete (type paths are not supported)",
|
|
885
|
-
"required": true
|
|
886
|
-
},
|
|
887
|
-
"ids": {
|
|
888
|
-
"name": "ids",
|
|
889
|
-
"description": "One or more entity ids to delete",
|
|
890
|
-
"required": false
|
|
891
|
-
}
|
|
892
|
-
}
|
|
893
|
-
},
|
|
894
|
-
"entities:get": {
|
|
895
|
-
"id": "entities:get",
|
|
896
|
-
"description": "Get an entity",
|
|
897
|
-
"strict": false,
|
|
898
|
-
"pluginName": "@contrail/cli",
|
|
899
|
-
"pluginAlias": "@contrail/cli",
|
|
900
|
-
"pluginType": "core",
|
|
901
|
-
"aliases": [],
|
|
902
|
-
"examples": [
|
|
903
|
-
"contrail entities get color 123",
|
|
904
|
-
"contrail entities get color id1 id2 id3",
|
|
905
|
-
"contrail entities get color -- id=123",
|
|
906
|
-
"contrail entities get loader-processes -- createdOn=2025-09-15..2025-09-16",
|
|
907
|
-
"contrail entities get orders -- updatedAt=2025-09-15T04:00:00Z..",
|
|
908
|
-
"contrail entities get events -- timestamp=..2025-09-16T23:59:59Z"
|
|
909
|
-
],
|
|
910
|
-
"flags": {
|
|
911
|
-
"logLevel": {
|
|
912
|
-
"name": "logLevel",
|
|
913
|
-
"type": "option",
|
|
914
|
-
"char": "l",
|
|
915
|
-
"description": "The Log Level",
|
|
916
|
-
"required": false,
|
|
917
|
-
"multiple": false,
|
|
918
|
-
"options": [
|
|
919
|
-
"error",
|
|
920
|
-
"warn",
|
|
921
|
-
"info",
|
|
922
|
-
"debug"
|
|
923
|
-
]
|
|
924
|
-
},
|
|
925
|
-
"alwaysConfirmEnv": {
|
|
926
|
-
"name": "alwaysConfirmEnv",
|
|
927
|
-
"type": "option",
|
|
928
|
-
"char": "e",
|
|
929
|
-
"description": "The Environment variables",
|
|
930
|
-
"required": false,
|
|
931
|
-
"multiple": false,
|
|
932
|
-
"options": [
|
|
933
|
-
"true",
|
|
934
|
-
"false"
|
|
935
|
-
],
|
|
936
|
-
"default": "true"
|
|
937
|
-
},
|
|
938
|
-
"outputFile": {
|
|
939
|
-
"name": "outputFile",
|
|
940
|
-
"type": "option",
|
|
941
|
-
"char": "o",
|
|
942
|
-
"description": "File to save the output (optional)",
|
|
943
|
-
"required": false,
|
|
944
|
-
"multiple": false
|
|
945
|
-
},
|
|
946
|
-
"propertySlugs": {
|
|
947
|
-
"name": "propertySlugs",
|
|
948
|
-
"type": "option",
|
|
949
|
-
"char": "p",
|
|
950
|
-
"description": "Comma-separated list of property slugs to include in the output",
|
|
951
|
-
"required": false,
|
|
952
|
-
"multiple": false
|
|
953
|
-
},
|
|
954
|
-
"paginated": {
|
|
955
|
-
"name": "paginated",
|
|
956
|
-
"type": "boolean",
|
|
957
|
-
"char": "P",
|
|
958
|
-
"description": "If true, fetches all entities in a paginated manner",
|
|
959
|
-
"required": false,
|
|
960
|
-
"allowNo": false
|
|
961
|
-
},
|
|
962
|
-
"skip": {
|
|
963
|
-
"name": "skip",
|
|
964
|
-
"type": "option",
|
|
965
|
-
"char": "s",
|
|
966
|
-
"description": "Number of entities to skip (used with paginated fetch)",
|
|
967
|
-
"required": false,
|
|
968
|
-
"multiple": false
|
|
969
|
-
},
|
|
970
|
-
"skipHydrateRelationships": {
|
|
971
|
-
"name": "skipHydrateRelationships",
|
|
972
|
-
"type": "boolean",
|
|
973
|
-
"char": "S",
|
|
974
|
-
"description": "Skip hydrating relationships when fetching the entity",
|
|
975
|
-
"required": false,
|
|
976
|
-
"allowNo": false
|
|
977
|
-
},
|
|
978
|
-
"take": {
|
|
979
|
-
"name": "take",
|
|
980
|
-
"type": "option",
|
|
981
|
-
"char": "t",
|
|
982
|
-
"description": "Number of entities to fetch in a single request (default is 100)",
|
|
983
|
-
"required": false,
|
|
984
|
-
"multiple": false
|
|
985
|
-
},
|
|
986
|
-
"relations": {
|
|
987
|
-
"name": "relations",
|
|
988
|
-
"type": "option",
|
|
989
|
-
"char": "r",
|
|
990
|
-
"description": "Comma-separated list of relations to include in the output",
|
|
991
|
-
"required": false,
|
|
992
|
-
"multiple": false
|
|
993
|
-
},
|
|
994
|
-
"suffix": {
|
|
995
|
-
"name": "suffix",
|
|
996
|
-
"type": "option",
|
|
997
|
-
"description": "Append a sub-route to the entity endpoint (e.g. --suffix=synchronous targets /<entities>/synchronous)",
|
|
998
|
-
"required": false,
|
|
999
|
-
"multiple": false
|
|
1000
|
-
},
|
|
1001
|
-
"apiVersion": {
|
|
1002
|
-
"name": "apiVersion",
|
|
1003
|
-
"type": "option",
|
|
1004
|
-
"description": "Api-Version header to send; selects the V1 or V2 variant of the endpoint",
|
|
1005
|
-
"required": false,
|
|
1006
|
-
"multiple": false,
|
|
1007
|
-
"options": [
|
|
1008
|
-
"1",
|
|
1009
|
-
"2"
|
|
1010
|
-
]
|
|
1011
|
-
}
|
|
1012
|
-
},
|
|
1013
|
-
"args": {
|
|
1014
|
-
"entityName": {
|
|
1015
|
-
"name": "entityName",
|
|
1016
|
-
"description": "The name of the entity type to fetch (type paths are not supported)",
|
|
1017
|
-
"required": true
|
|
1018
|
-
},
|
|
1019
|
-
"ids": {
|
|
1020
|
-
"name": "ids",
|
|
1021
|
-
"description": "One or more entity ids; shorthand for the id/ids criteria",
|
|
1022
|
-
"required": false
|
|
1023
|
-
}
|
|
1024
|
-
}
|
|
1025
|
-
},
|
|
1026
|
-
"entities:update": {
|
|
1027
|
-
"id": "entities:update",
|
|
1028
|
-
"description": "Update an entity",
|
|
1029
|
-
"strict": false,
|
|
1030
|
-
"pluginName": "@contrail/cli",
|
|
1031
|
-
"pluginAlias": "@contrail/cli",
|
|
1032
|
-
"pluginType": "core",
|
|
1033
|
-
"aliases": [],
|
|
1034
|
-
"examples": [
|
|
1035
|
-
"contrail entities update color 123 -- name=obsidian hex=000000",
|
|
1036
|
-
"contrail entities update item id1 id2 id3 -- status=archived # apply the same change to several entities",
|
|
1037
|
-
"contrail entities update color 123 -- description= notes='\"\"' # Unset description, set notes to empty string"
|
|
1038
|
-
],
|
|
1039
|
-
"flags": {
|
|
1040
|
-
"logLevel": {
|
|
1041
|
-
"name": "logLevel",
|
|
1042
|
-
"type": "option",
|
|
1043
|
-
"char": "l",
|
|
1044
|
-
"description": "The Log Level",
|
|
1045
|
-
"required": false,
|
|
1046
|
-
"multiple": false,
|
|
1047
|
-
"options": [
|
|
1048
|
-
"error",
|
|
1049
|
-
"warn",
|
|
1050
|
-
"info",
|
|
1051
|
-
"debug"
|
|
1052
|
-
]
|
|
1053
|
-
},
|
|
1054
|
-
"alwaysConfirmEnv": {
|
|
1055
|
-
"name": "alwaysConfirmEnv",
|
|
1056
|
-
"type": "option",
|
|
1057
|
-
"char": "e",
|
|
1058
|
-
"description": "The Environment variables",
|
|
1059
|
-
"required": false,
|
|
1060
|
-
"multiple": false,
|
|
1061
|
-
"options": [
|
|
1062
|
-
"true",
|
|
1063
|
-
"false"
|
|
1064
|
-
],
|
|
1065
|
-
"default": "true"
|
|
1066
|
-
},
|
|
1067
|
-
"skipHydrateRelationships": {
|
|
1068
|
-
"name": "skipHydrateRelationships",
|
|
1069
|
-
"type": "boolean",
|
|
1070
|
-
"char": "S",
|
|
1071
|
-
"description": "Skip hydrating relationships when updating the entity",
|
|
1072
|
-
"required": false,
|
|
1073
|
-
"allowNo": false
|
|
1074
|
-
},
|
|
1075
|
-
"dryRun": {
|
|
1076
|
-
"name": "dryRun",
|
|
1077
|
-
"type": "boolean",
|
|
1078
|
-
"char": "d",
|
|
1079
|
-
"description": "If true, does not update the entities but simulates the update",
|
|
1080
|
-
"required": false,
|
|
1081
|
-
"allowNo": false
|
|
1082
|
-
},
|
|
1083
|
-
"inputFile": {
|
|
1084
|
-
"name": "inputFile",
|
|
1085
|
-
"type": "option",
|
|
1086
|
-
"char": "i",
|
|
1087
|
-
"description": "A file with a JSON array of {id, ...} objects; each object is one entity to update.",
|
|
1088
|
-
"required": false,
|
|
1089
|
-
"multiple": false
|
|
1090
|
-
},
|
|
1091
|
-
"suffix": {
|
|
1092
|
-
"name": "suffix",
|
|
1093
|
-
"type": "option",
|
|
1094
|
-
"description": "Append a sub-route to the entity endpoint (e.g. --suffix=synchronous targets /<entities>/synchronous)",
|
|
1095
|
-
"required": false,
|
|
1096
|
-
"multiple": false
|
|
1097
|
-
},
|
|
1098
|
-
"apiVersion": {
|
|
1099
|
-
"name": "apiVersion",
|
|
1100
|
-
"type": "option",
|
|
1101
|
-
"description": "Api-Version header to send; selects the V1 or V2 variant of the endpoint",
|
|
1102
|
-
"required": false,
|
|
1103
|
-
"multiple": false,
|
|
1104
|
-
"options": [
|
|
1105
|
-
"1",
|
|
1106
|
-
"2"
|
|
1107
|
-
]
|
|
1108
|
-
}
|
|
1109
|
-
},
|
|
1110
|
-
"args": {
|
|
1111
|
-
"entityName": {
|
|
1112
|
-
"name": "entityName",
|
|
1113
|
-
"description": "The name of the entity type to update (type paths are not supported)",
|
|
1114
|
-
"required": true
|
|
1115
|
-
},
|
|
1116
|
-
"ids": {
|
|
1117
|
-
"name": "ids",
|
|
1118
|
-
"description": "One or more entity ids to update",
|
|
1119
|
-
"required": false
|
|
1120
|
-
}
|
|
1121
|
-
}
|
|
1122
|
-
},
|
|
1123
724
|
"feature-flags:export": {
|
|
1124
725
|
"id": "feature-flags:export",
|
|
1125
726
|
"description": "Export the enabled feature flags for your Org",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@contrail/cli",
|
|
3
|
-
"version": "3.6.0-alpha
|
|
3
|
+
"version": "3.6.0-alpha.5ecc188",
|
|
4
4
|
"description": "VibeIQ's Contrail Platform CLI.",
|
|
5
5
|
"bin": {
|
|
6
6
|
"contrail-cli": "./bin/run",
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"/npm-shrinkwrap.json",
|
|
22
22
|
"/oclif.manifest.json"
|
|
23
23
|
],
|
|
24
|
-
"
|
|
24
|
+
"bundledDependencies": [
|
|
25
25
|
"@contrail/entity-types",
|
|
26
26
|
"@contrail/loader",
|
|
27
27
|
"@contrail/org-config-migration",
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
"@contrail/entity-types": "^1.6.1",
|
|
34
34
|
"@contrail/loader": "^2.0.9",
|
|
35
35
|
"@contrail/org-config-migration": "^1.2.0",
|
|
36
|
-
"@contrail/sdk": "^1.
|
|
36
|
+
"@contrail/sdk": "^1.5.13",
|
|
37
37
|
"@contrail/types": "^3.1.5",
|
|
38
38
|
"@contrail/util": "^1.2.0",
|
|
39
39
|
"@oclif/core": "^2",
|
|
@@ -59,7 +59,6 @@
|
|
|
59
59
|
"ncp": "^2.0.0",
|
|
60
60
|
"pkg-install": "^1.0.0",
|
|
61
61
|
"semver": "^7.5.4",
|
|
62
|
-
"unique-names-generator": "^4.7.1",
|
|
63
62
|
"winston": "^3.10.0",
|
|
64
63
|
"zip-a-folder": "^1.1.5"
|
|
65
64
|
},
|
|
@@ -162,5 +161,13 @@
|
|
|
162
161
|
},
|
|
163
162
|
"coverageDirectory": "../coverage",
|
|
164
163
|
"testEnvironment": "node"
|
|
165
|
-
}
|
|
164
|
+
},
|
|
165
|
+
"bundleDependencies": [
|
|
166
|
+
"@contrail/entity-types",
|
|
167
|
+
"@contrail/loader",
|
|
168
|
+
"@contrail/org-config-migration",
|
|
169
|
+
"@contrail/sdk",
|
|
170
|
+
"@contrail/types",
|
|
171
|
+
"@contrail/util"
|
|
172
|
+
]
|
|
166
173
|
}
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
import { PropertyLevel, PropertyType } from '@contrail/types';
|
|
2
|
-
import { ColonDelimited, TypeProperty as ExtendedTypeProperty, TypeReferencesCacheByPath } from '../../api/types';
|
|
3
|
-
import { TypeWithProperties } from '../../api/types';
|
|
4
|
-
import { BaseCommand } from '../../basecommand';
|
|
5
|
-
import { Role } from '../../helpers/entities';
|
|
6
|
-
export default class CreateEntity extends BaseCommand {
|
|
7
|
-
static description: string;
|
|
8
|
-
static examples: string[];
|
|
9
|
-
static flags: {
|
|
10
|
-
count: import("@oclif/core/lib/interfaces").OptionFlag<number, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
|
|
11
|
-
dryRun: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
12
|
-
inputFile: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
|
|
13
|
-
outputFile: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
|
|
14
|
-
generateValues: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
15
|
-
readableIds: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
16
|
-
skipHydrateRelationships: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
17
|
-
suffix: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
|
|
18
|
-
apiVersion: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
|
|
19
|
-
alwaysConfirmEnv: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
|
|
20
|
-
logLevel: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
|
|
21
|
-
};
|
|
22
|
-
static args: {
|
|
23
|
-
typePath: import("@oclif/core/lib/interfaces/parser").Arg<string, Record<string, unknown>>;
|
|
24
|
-
};
|
|
25
|
-
static strict: boolean;
|
|
26
|
-
init(): Promise<void>;
|
|
27
|
-
run(): Promise<void>;
|
|
28
|
-
}
|
|
29
|
-
export type CreateSummary = {
|
|
30
|
-
created: any[];
|
|
31
|
-
failed: {
|
|
32
|
-
input: any;
|
|
33
|
-
error: string;
|
|
34
|
-
}[];
|
|
35
|
-
};
|
|
36
|
-
export declare function summarizeSettledCreates(inputs: any[], settled: PromiseSettledResult<any>[]): CreateSummary;
|
|
37
|
-
export declare function pickRandomPropertyValues(type: TypeWithProperties, objectReferencesCache: ObjectReferenceCachesByTypePath, typeReferencesCache: TypeReferencesCacheByPath, roles?: Role[], suppliedSlugs?: Set<string>): any;
|
|
38
|
-
export type WithId = {
|
|
39
|
-
id: string;
|
|
40
|
-
[key: string]: any;
|
|
41
|
-
};
|
|
42
|
-
export type ObjectReferenceCache = Map<string, WithId>;
|
|
43
|
-
type ObjectReferenceCachesByTypePath = Map<string, ObjectReferenceCache>;
|
|
44
|
-
export declare function pickRandomValueForProperty(property: ExtendedTypeProperty, objectReferencesCache: ObjectReferenceCachesByTypePath, typeReferencesCache: TypeReferencesCacheByPath): number | string | string[] | boolean | null;
|
|
45
|
-
export declare function castValueToPropertyType(value: string | number | string[] | number[], propertyType: PropertyType, propertySlug: string): any;
|
|
46
|
-
export declare function getReferencedObjectPaths(type: TypeWithProperties): ColonDelimited[];
|
|
47
|
-
export declare function buildObjectReferenceCache(entities: any[]): ObjectReferenceCache;
|
|
48
|
-
export declare function selectRandomObject(cache: ObjectReferenceCache): WithId;
|
|
49
|
-
export declare function doesPropertyLevelMatchRole(propertyLevel: PropertyLevel, role: Role): boolean;
|
|
50
|
-
export {};
|