@optimizely/ocp-cli-v2 2.0.2 → 2.0.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/README.md CHANGED
@@ -19,6 +19,20 @@ ocp <namespace> -h
19
19
 
20
20
  ## Commands
21
21
 
22
+ ### PR Lane Support
23
+
24
+ To route CLI requests to a PR lane deployment of the backend, set the `OCP_PR_LANE` environment variable:
25
+
26
+ ```bash
27
+ OCP_PR_LANE=OCP-1831 ocp app prepare
28
+ ```
29
+
30
+ Use `OCP_DEBUG=1` to see the lane header in request/response logs:
31
+
32
+ ```bash
33
+ OCP_DEBUG=1 OCP_PR_LANE=OCP-1831 ocp app prepare
34
+ ```
35
+
22
36
  ### `ocp dev-server`
23
37
 
24
38
  Start the local development server for OCP applications.
@@ -71,6 +71,10 @@ var RivendellApi;
71
71
  'x-api-key': loadApiKey(),
72
72
  'x-cli-version': manifest.version,
73
73
  };
74
+ if (process.env.OCP_PR_LANE) {
75
+ // @ts-ignore
76
+ requestPayload.headers['ocp-pr-lane'] = process.env.OCP_PR_LANE;
77
+ }
74
78
  if (body && method !== 'GET') {
75
79
  // @ts-ignore
76
80
  requestPayload.headers['content-type'] = 'application/json';
@@ -81,9 +85,13 @@ var RivendellApi;
81
85
  let lastStatus;
82
86
  for (let attempt = 0; attempt <= MAX_RETRIES; attempt++) {
83
87
  try {
84
- debug(`[RivendellApi] ${method} ${url}${attempt > 0 ? ` (retry ${attempt})` : ''}`);
88
+ debug(`[RivendellApi] ${method} ${url}${attempt > 0 ? ` (retry ${attempt})` : ''}${process.env.OCP_PR_LANE ? ` [lane: ${process.env.OCP_PR_LANE}]` : ''}`);
85
89
  const response = await fetch(url, requestPayload);
86
90
  debug(`[RivendellApi] Response ${response.status}`);
91
+ const responseLane = response.headers.get('ocp-pr-lane');
92
+ if (responseLane) {
93
+ debug(`[RivendellApi] Response PR lane: ${responseLane}`);
94
+ }
87
95
  const responseText = await response.text();
88
96
  // Check for 5xx and retry if applicable
89
97
  if (shouldRetryResponse(method, response.status) && attempt < MAX_RETRIES) {
@@ -1 +1 @@
1
- {"version":3,"file":"RivendellApi.js","sourceRoot":"","sources":["../../src/lib/RivendellApi.ts"],"names":[],"mappings":";;;AACA,6BAA6B;AAC7B,qCAA4D;AAC5D,+BAA0B;AAI1B;;GAEG;AACH,IAAiB,YAAY,CAsK5B;AAtKD,WAAiB,YAAY;IAM3B,MAAa,QAAS,SAAQ,KAAK;QACjC,YAAY,OAAe,EAAS,YAAoB,EAAS,QAAmB;YAClF,KAAK,CAAC,OAAO,CAAC,CAAC;YADmB,iBAAY,GAAZ,YAAY,CAAQ;YAAS,aAAQ,GAAR,QAAQ,CAAW;QAEpF,CAAC;KACF;IAJY,qBAAQ,WAIpB,CAAA;IAEM,KAAK,UAAU,GAAG,CAAI,GAAW;QACtC,OAAO,OAAO,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;IAC7B,CAAC;IAFqB,gBAAG,MAExB,CAAA;IAEM,KAAK,UAAU,IAAI,CAAI,GAAW,EAAE,IAAS;QAClD,OAAO,OAAO,CAAC,MAAM,EAAE,GAAG,EAAE,IAAI,CAAC,CAAC;IACpC,CAAC;IAFqB,iBAAI,OAEzB,CAAA;IAEM,KAAK,UAAU,GAAG,CAAI,GAAW,EAAE,IAAS;QACjD,OAAO,OAAO,CAAC,KAAK,EAAE,GAAG,EAAE,IAAI,CAAC,CAAC;IACnC,CAAC;IAFqB,gBAAG,MAExB,CAAA;IAEM,KAAK,UAAU,OAAO,CAAI,GAAW;QAC1C,OAAO,OAAO,CAAC,QAAQ,EAAE,GAAG,CAAC,CAAC;IAChC,CAAC;IAFqB,oBAAO,UAE5B,CAAA;IAED,MAAM,WAAW,GAAG,CAAC,CAAC;IAEtB,SAAS,aAAa,CAAC,KAAc;QACnC,IAAI,KAAK,YAAY,KAAK,IAAI,OAAO,IAAI,KAAK,EAAE;YAC9C,MAAM,KAAK,GAAG,KAAK,CAAC,KAAY,CAAC;Y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AChD;gBACE,OAAO,kBAAkB,CAAC;SAC7B;IACH,CAAC;IAED,SAAS,KAAK,CAAC,GAAG,IAAW;QAC3B,IAAI,OAAO,CAAC,GAAG,CAAC,SAAS,KAAK,GAAG,EAAE;YACjC,OAAO,CAAC,KAAK,CAAC,GAAG,IAAI,CAAC,CAAC;SACxB;IACH,CAAC;AACH,CAAC,EA9KgB,YAAY,GAAZ,oBAAY,KAAZ,oBAAY,QA8K5B"}
@@ -690,98 +690,17 @@
690
690
  "start.js"
691
691
  ]
692
692
  },
693
- "jobs:list": {
693
+ "directory:info": {
694
694
  "aliases": [],
695
695
  "args": {
696
696
  "appId": {
697
- "description": "Specific App ID to filter by",
697
+ "description": "The App ID to look up",
698
698
  "name": "appId",
699
699
  "required": true
700
700
  }
701
701
  },
702
- "description": "List jobs",
702
+ "description": "Get information about an app",
703
703
  "flags": {
704
- "version": {
705
- "description": "Specific Versions to filter by",
706
- "name": "version",
707
- "hasDynamicHelp": false,
708
- "multiple": true,
709
- "type": "option"
710
- },
711
- "trackerId": {
712
- "description": "Specific Tracker IDs to filter by",
713
- "name": "trackerId",
714
- "hasDynamicHelp": false,
715
- "multiple": true,
716
- "type": "option"
717
- },
718
- "function": {
719
- "description": "Specific Job Function to filter by",
720
- "name": "function",
721
- "hasDynamicHelp": false,
722
- "multiple": true,
723
- "type": "option"
724
- },
725
- "status": {
726
- "description": "Specific JobStatus to filter by. Possible values: PENDING, SCHEDULED, RUNNING, COMPLETE, ERROR, TERMINATED",
727
- "name": "status",
728
- "hasDynamicHelp": false,
729
- "multiple": true,
730
- "type": "option"
731
- },
732
- "minDuration": {
733
- "description": "Show jobs that have been running longer than the given duration. (e.g. 5m = 5 minutes)",
734
- "name": "minDuration",
735
- "hasDynamicHelp": false,
736
- "multiple": false,
737
- "type": "option"
738
- },
739
- "sortBy": {
740
- "description": "Column to sort the jobs by. Possible values: id, function, trackerId, status, error, createdAt, triggeredAt, scheduledAt, terminatedAt, updatedAt, duration; Default: updatedAt",
741
- "name": "sortBy",
742
- "default": "updatedAt",
743
- "hasDynamicHelp": false,
744
- "multiple": false,
745
- "type": "option"
746
- },
747
- "sortDirection": {
748
- "description": "Sort resulting jobs in ascending or descending order. Possible values: asc|desc. Default: desc",
749
- "name": "sortDirection",
750
- "default": "desc",
751
- "hasDynamicHelp": false,
752
- "multiple": false,
753
- "type": "option"
754
- },
755
- "limit": {
756
- "description": "Number of jobs to list. Default: 50",
757
- "name": "limit",
758
- "default": 50,
759
- "hasDynamicHelp": false,
760
- "multiple": false,
761
- "type": "option"
762
- },
763
- "columns": {
764
- "description": "Columns to display. Possible values: id, version, function, trackerId, trigger, status, error, createdAt, triggeredAt, scheduledAt, terminatedAt, updatedAt, duration. Default: id, version, function, trackerId, status, createdAt, updatedAt, duration",
765
- "name": "columns",
766
- "default": "id,version,function,trackerId,status,createdAt,updatedAt,duration",
767
- "hasDynamicHelp": false,
768
- "multiple": false,
769
- "type": "option"
770
- },
771
- "from": {
772
- "description": "A start time as an ISO string, an epoch timestamp, or relative string (i.e. \"5m\" for 5 minutes.) Default: 7d",
773
- "name": "from",
774
- "hasDynamicHelp": false,
775
- "multiple": false,
776
- "type": "option"
777
- },
778
- "to": {
779
- "description": "An end time as an ISO string, an epoch timestamp, or relative string (i.e. \"5m\" for 5 minutes)",
780
- "name": "to",
781
- "hasDynamicHelp": false,
782
- "multiple": false,
783
- "type": "option"
784
- },
785
704
  "availability": {
786
705
  "char": "a",
787
706
  "description": "The availability zone that will be targeted (default: us)",
@@ -794,7 +713,7 @@
794
713
  },
795
714
  "hasDynamicHelp": false,
796
715
  "hiddenAliases": [],
797
- "id": "jobs:list",
716
+ "id": "directory:info",
798
717
  "pluginAlias": "@optimizely/ocp-cli-v2",
799
718
  "pluginName": "@optimizely/ocp-cli-v2",
800
719
  "pluginType": "core",
@@ -804,20 +723,25 @@
804
723
  "relativePath": [
805
724
  "dist",
806
725
  "commands",
807
- "jobs",
808
- "list.js"
726
+ "directory",
727
+ "info.js"
809
728
  ]
810
729
  },
811
- "jobs:runtimeStatus": {
730
+ "directory:install": {
812
731
  "aliases": [],
813
732
  "args": {
814
- "jobId": {
815
- "description": "ID of Job to get the runtime status for",
816
- "name": "jobId",
733
+ "appVersion": {
734
+ "description": "The App ID and version (e.g. my_app@1.0.0)",
735
+ "name": "appVersion",
736
+ "required": true
737
+ },
738
+ "trackerId": {
739
+ "description": "The Tracker ID of the account to install into",
740
+ "name": "trackerId",
817
741
  "required": true
818
742
  }
819
743
  },
820
- "description": "Show the runtime status of a job",
744
+ "description": "Install a specific app version into an account",
821
745
  "flags": {
822
746
  "availability": {
823
747
  "char": "a",
@@ -831,7 +755,7 @@
831
755
  },
832
756
  "hasDynamicHelp": false,
833
757
  "hiddenAliases": [],
834
- "id": "jobs:runtimeStatus",
758
+ "id": "directory:install",
835
759
  "pluginAlias": "@optimizely/ocp-cli-v2",
836
760
  "pluginName": "@optimizely/ocp-cli-v2",
837
761
  "pluginType": "core",
@@ -841,21 +765,27 @@
841
765
  "relativePath": [
842
766
  "dist",
843
767
  "commands",
844
- "jobs",
845
- "runtimeStatus.js"
768
+ "directory",
769
+ "install.js"
846
770
  ]
847
771
  },
848
- "jobs:status": {
772
+ "directory:list": {
849
773
  "aliases": [],
850
774
  "args": {
851
- "jobId": {
852
- "description": "The Job ID to look up",
853
- "name": "jobId",
775
+ "appId": {
776
+ "description": "A specific App ID to filter down to (lists all apps by default)",
777
+ "name": "appId",
854
778
  "required": false
855
779
  }
856
780
  },
857
- "description": "Get the status of a particular job id",
781
+ "description": "List registered app versions",
858
782
  "flags": {
783
+ "allStatuses": {
784
+ "description": "Include all statuses. STOPPED and ABANDONED are filtered by default",
785
+ "name": "allStatuses",
786
+ "allowNo": false,
787
+ "type": "boolean"
788
+ },
859
789
  "availability": {
860
790
  "char": "a",
861
791
  "description": "The availability zone that will be targeted (default: us)",
@@ -868,7 +798,7 @@
868
798
  },
869
799
  "hasDynamicHelp": false,
870
800
  "hiddenAliases": [],
871
- "id": "jobs:status",
801
+ "id": "directory:list",
872
802
  "pluginAlias": "@optimizely/ocp-cli-v2",
873
803
  "pluginName": "@optimizely/ocp-cli-v2",
874
804
  "pluginType": "core",
@@ -878,20 +808,27 @@
878
808
  "relativePath": [
879
809
  "dist",
880
810
  "commands",
881
- "jobs",
882
- "status.js"
811
+ "directory",
812
+ "list.js"
883
813
  ]
884
814
  },
885
- "jobs:terminate": {
886
- "aliases": [],
815
+ "directory:listFunctions": {
816
+ "aliases": [
817
+ "directory:list-functions"
818
+ ],
887
819
  "args": {
888
- "jobId": {
889
- "description": "ID of Job to terminate",
890
- "name": "jobId",
820
+ "appId": {
821
+ "description": "The App ID (e.g. my_app)",
822
+ "name": "appId",
823
+ "required": true
824
+ },
825
+ "trackerId": {
826
+ "description": "The Tracker ID of the installed account",
827
+ "name": "trackerId",
891
828
  "required": true
892
829
  }
893
830
  },
894
- "description": "Terminate a job",
831
+ "description": "List the functions exposed by an app installation",
895
832
  "flags": {
896
833
  "availability": {
897
834
  "char": "a",
@@ -905,7 +842,7 @@
905
842
  },
906
843
  "hasDynamicHelp": false,
907
844
  "hiddenAliases": [],
908
- "id": "jobs:terminate",
845
+ "id": "directory:listFunctions",
909
846
  "pluginAlias": "@optimizely/ocp-cli-v2",
910
847
  "pluginName": "@optimizely/ocp-cli-v2",
911
848
  "pluginType": "core",
@@ -915,39 +852,62 @@
915
852
  "relativePath": [
916
853
  "dist",
917
854
  "commands",
918
- "jobs",
919
- "terminate.js"
855
+ "directory",
856
+ "listFunctions.js"
920
857
  ]
921
858
  },
922
- "jobs:trigger": {
923
- "aliases": [],
859
+ "directory:listGlobalFunctions": {
860
+ "aliases": [
861
+ "directory:list-global-functions"
862
+ ],
924
863
  "args": {
925
864
  "appId": {
926
865
  "description": "The App ID (e.g. my_app)",
927
866
  "name": "appId",
928
867
  "required": true
929
- },
930
- "jobName": {
931
- "description": "The Job Name",
932
- "name": "jobName",
933
- "required": true
934
- },
935
- "trackerId": {
936
- "description": "The Tracker ID to trigger the job for",
937
- "name": "trackerId",
938
- "required": true
939
868
  }
940
869
  },
941
- "description": "Trigger a job",
870
+ "description": "List the global functions exposed by an app",
942
871
  "flags": {
943
- "parameters": {
944
- "description": "Parameters to pass to the Job",
945
- "name": "parameters",
946
- "default": "{}",
872
+ "availability": {
873
+ "char": "a",
874
+ "description": "The availability zone that will be targeted (default: us)",
875
+ "name": "availability",
876
+ "default": "us",
947
877
  "hasDynamicHelp": false,
948
878
  "multiple": false,
949
879
  "type": "option"
950
- },
880
+ }
881
+ },
882
+ "hasDynamicHelp": false,
883
+ "hiddenAliases": [],
884
+ "id": "directory:listGlobalFunctions",
885
+ "pluginAlias": "@optimizely/ocp-cli-v2",
886
+ "pluginName": "@optimizely/ocp-cli-v2",
887
+ "pluginType": "core",
888
+ "strict": true,
889
+ "enableJsonFlag": false,
890
+ "isESM": false,
891
+ "relativePath": [
892
+ "dist",
893
+ "commands",
894
+ "directory",
895
+ "listGlobalFunctions.js"
896
+ ]
897
+ },
898
+ "directory:listInstalls": {
899
+ "aliases": [
900
+ "directory:list-installs"
901
+ ],
902
+ "args": {
903
+ "appVersion": {
904
+ "description": "The App ID and optional version (e.g. my_app or my_app@1.0.0)",
905
+ "name": "appVersion",
906
+ "required": true
907
+ }
908
+ },
909
+ "description": "List installations of a specific app version",
910
+ "flags": {
951
911
  "availability": {
952
912
  "char": "a",
953
913
  "description": "The availability zone that will be targeted (default: us)",
@@ -960,7 +920,7 @@
960
920
  },
961
921
  "hasDynamicHelp": false,
962
922
  "hiddenAliases": [],
963
- "id": "jobs:trigger",
923
+ "id": "directory:listInstalls",
964
924
  "pluginAlias": "@optimizely/ocp-cli-v2",
965
925
  "pluginName": "@optimizely/ocp-cli-v2",
966
926
  "pluginType": "core",
@@ -970,24 +930,41 @@
970
930
  "relativePath": [
971
931
  "dist",
972
932
  "commands",
973
- "jobs",
974
- "trigger.js"
933
+ "directory",
934
+ "listInstalls.js"
975
935
  ]
976
936
  },
977
- "review:list": {
978
- "aliases": [],
937
+ "directory:listSourceFunctions": {
938
+ "aliases": [
939
+ "directory:list-source-functions"
940
+ ],
979
941
  "args": {
980
942
  "appId": {
981
- "description": "A specific App ID to filter down to (lists all apps by default)",
943
+ "description": "The App ID (e.g. my_app)",
982
944
  "name": "appId",
983
- "required": false
945
+ "required": true
946
+ },
947
+ "trackerId": {
948
+ "description": "The Tracker ID of the installed account",
949
+ "name": "trackerId",
950
+ "required": true
951
+ }
952
+ },
953
+ "description": "List the source functions exposed by an app installation",
954
+ "flags": {
955
+ "availability": {
956
+ "char": "a",
957
+ "description": "The availability zone that will be targeted (default: us)",
958
+ "name": "availability",
959
+ "default": "us",
960
+ "hasDynamicHelp": false,
961
+ "multiple": false,
962
+ "type": "option"
984
963
  }
985
964
  },
986
- "description": "List app versions currently under review",
987
- "flags": {},
988
965
  "hasDynamicHelp": false,
989
966
  "hiddenAliases": [],
990
- "id": "review:list",
967
+ "id": "directory:listSourceFunctions",
991
968
  "pluginAlias": "@optimizely/ocp-cli-v2",
992
969
  "pluginName": "@optimizely/ocp-cli-v2",
993
970
  "pluginType": "core",
@@ -997,24 +974,43 @@
997
974
  "relativePath": [
998
975
  "dist",
999
976
  "commands",
1000
- "review",
1001
- "list.js"
977
+ "directory",
978
+ "listSourceFunctions.js"
1002
979
  ]
1003
980
  },
1004
- "review:open": {
981
+ "directory:publish": {
1005
982
  "aliases": [],
1006
983
  "args": {
1007
984
  "appVersion": {
1008
- "description": "App version of the review to open",
985
+ "description": "The App ID and version (e.g. my_app@1.0.0)",
1009
986
  "name": "appVersion",
1010
987
  "required": true
1011
988
  }
1012
989
  },
1013
- "description": "Open a review in your browser",
1014
- "flags": {},
990
+ "description": "Publish (make available) a specific app version that has been reviewed and approved",
991
+ "flags": {
992
+ "noProgress": {
993
+ "aliases": [
994
+ "no-progress"
995
+ ],
996
+ "description": "Do not show progress spinner",
997
+ "name": "noProgress",
998
+ "allowNo": false,
999
+ "type": "boolean"
1000
+ },
1001
+ "noPrompt": {
1002
+ "aliases": [
1003
+ "no-prompt"
1004
+ ],
1005
+ "description": "Use default answers for prompts (default is yes, except destructive operations)",
1006
+ "name": "noPrompt",
1007
+ "allowNo": false,
1008
+ "type": "boolean"
1009
+ }
1010
+ },
1015
1011
  "hasDynamicHelp": false,
1016
1012
  "hiddenAliases": [],
1017
- "id": "review:open",
1013
+ "id": "directory:publish",
1018
1014
  "pluginAlias": "@optimizely/ocp-cli-v2",
1019
1015
  "pluginName": "@optimizely/ocp-cli-v2",
1020
1016
  "pluginType": "core",
@@ -1024,20 +1020,20 @@
1024
1020
  "relativePath": [
1025
1021
  "dist",
1026
1022
  "commands",
1027
- "review",
1028
- "open.js"
1023
+ "directory",
1024
+ "publish.js"
1029
1025
  ]
1030
1026
  },
1031
- "directory:info": {
1027
+ "directory:status": {
1032
1028
  "aliases": [],
1033
1029
  "args": {
1034
1030
  "appId": {
1035
- "description": "The App ID to look up",
1031
+ "description": "The App ID and version to look up (e.g. myapp@1.0.0)",
1036
1032
  "name": "appId",
1037
- "required": true
1033
+ "required": false
1038
1034
  }
1039
1035
  },
1040
- "description": "Get information about an app",
1036
+ "description": "Get the status of a particular app version",
1041
1037
  "flags": {
1042
1038
  "availability": {
1043
1039
  "char": "a",
@@ -1051,7 +1047,7 @@
1051
1047
  },
1052
1048
  "hasDynamicHelp": false,
1053
1049
  "hiddenAliases": [],
1054
- "id": "directory:info",
1050
+ "id": "directory:status",
1055
1051
  "pluginAlias": "@optimizely/ocp-cli-v2",
1056
1052
  "pluginName": "@optimizely/ocp-cli-v2",
1057
1053
  "pluginType": "core",
@@ -1062,25 +1058,34 @@
1062
1058
  "dist",
1063
1059
  "commands",
1064
1060
  "directory",
1065
- "info.js"
1061
+ "status.js"
1066
1062
  ]
1067
1063
  },
1068
- "directory:install": {
1064
+ "directory:uninstall": {
1069
1065
  "aliases": [],
1070
1066
  "args": {
1071
- "appVersion": {
1072
- "description": "The App ID and version (e.g. my_app@1.0.0)",
1073
- "name": "appVersion",
1067
+ "appId": {
1068
+ "description": "The App ID",
1069
+ "name": "appId",
1074
1070
  "required": true
1075
1071
  },
1076
1072
  "trackerId": {
1077
- "description": "The Tracker ID of the account to install into",
1073
+ "description": "The Tracker ID of the account to uninstall from",
1078
1074
  "name": "trackerId",
1079
1075
  "required": true
1080
1076
  }
1081
1077
  },
1082
- "description": "Install a specific app version into an account",
1078
+ "description": "Uninstall an app from an account",
1083
1079
  "flags": {
1080
+ "noPrompt": {
1081
+ "aliases": [
1082
+ "no-prompt"
1083
+ ],
1084
+ "description": "Use default answer to any prompt question (default is yes)",
1085
+ "name": "noPrompt",
1086
+ "allowNo": false,
1087
+ "type": "boolean"
1088
+ },
1084
1089
  "availability": {
1085
1090
  "char": "a",
1086
1091
  "description": "The availability zone that will be targeted (default: us)",
@@ -1093,7 +1098,7 @@
1093
1098
  },
1094
1099
  "hasDynamicHelp": false,
1095
1100
  "hiddenAliases": [],
1096
- "id": "directory:install",
1101
+ "id": "directory:uninstall",
1097
1102
  "pluginAlias": "@optimizely/ocp-cli-v2",
1098
1103
  "pluginName": "@optimizely/ocp-cli-v2",
1099
1104
  "pluginType": "core",
@@ -1104,23 +1109,42 @@
1104
1109
  "dist",
1105
1110
  "commands",
1106
1111
  "directory",
1107
- "install.js"
1112
+ "uninstall.js"
1108
1113
  ]
1109
1114
  },
1110
- "directory:list": {
1115
+ "directory:unpublish": {
1111
1116
  "aliases": [],
1112
1117
  "args": {
1113
- "appId": {
1114
- "description": "A specific App ID to filter down to (lists all apps by default)",
1115
- "name": "appId",
1116
- "required": false
1118
+ "appVersion": {
1119
+ "description": "The App ID and version (e.g. my_app@1.0.0)",
1120
+ "name": "appVersion",
1121
+ "required": true
1117
1122
  }
1118
1123
  },
1119
- "description": "List registered app versions",
1124
+ "description": "Unpublish an app version",
1120
1125
  "flags": {
1121
- "allStatuses": {
1122
- "description": "Include all statuses. STOPPED and ABANDONED are filtered by default",
1123
- "name": "allStatuses",
1126
+ "force": {
1127
+ "char": "f",
1128
+ "description": "Force uninstall from all accounts without confirmation",
1129
+ "name": "force",
1130
+ "allowNo": false,
1131
+ "type": "boolean"
1132
+ },
1133
+ "noProgress": {
1134
+ "aliases": [
1135
+ "no-progress"
1136
+ ],
1137
+ "description": "Disable progress spinner",
1138
+ "name": "noProgress",
1139
+ "allowNo": false,
1140
+ "type": "boolean"
1141
+ },
1142
+ "noPrompt": {
1143
+ "aliases": [
1144
+ "no-prompt"
1145
+ ],
1146
+ "description": "Use default answer to prompts (default yes, except destructive ops)",
1147
+ "name": "noPrompt",
1124
1148
  "allowNo": false,
1125
1149
  "type": "boolean"
1126
1150
  },
@@ -1136,7 +1160,7 @@
1136
1160
  },
1137
1161
  "hasDynamicHelp": false,
1138
1162
  "hiddenAliases": [],
1139
- "id": "directory:list",
1163
+ "id": "directory:unpublish",
1140
1164
  "pluginAlias": "@optimizely/ocp-cli-v2",
1141
1165
  "pluginName": "@optimizely/ocp-cli-v2",
1142
1166
  "pluginType": "core",
@@ -1147,27 +1171,34 @@
1147
1171
  "dist",
1148
1172
  "commands",
1149
1173
  "directory",
1150
- "list.js"
1174
+ "unpublish.js"
1151
1175
  ]
1152
1176
  },
1153
- "directory:listFunctions": {
1154
- "aliases": [
1155
- "directory:list-functions"
1156
- ],
1177
+ "directory:upgrade": {
1178
+ "aliases": [],
1157
1179
  "args": {
1158
1180
  "appId": {
1159
- "description": "The App ID (e.g. my_app)",
1181
+ "description": "The App ID of the app to upgrade (e.g. my_app)",
1160
1182
  "name": "appId",
1161
1183
  "required": true
1162
1184
  },
1163
1185
  "trackerId": {
1164
- "description": "The Tracker ID of the installed account",
1186
+ "description": "The Tracker ID of the account to install into",
1165
1187
  "name": "trackerId",
1166
1188
  "required": true
1167
1189
  }
1168
1190
  },
1169
- "description": "List the functions exposed by an app installation",
1191
+ "description": "Upgrade the Install to a specific app version",
1170
1192
  "flags": {
1193
+ "toVersion": {
1194
+ "char": "v",
1195
+ "description": "The desired version (i.e. 1.0.0)",
1196
+ "name": "toVersion",
1197
+ "required": true,
1198
+ "hasDynamicHelp": false,
1199
+ "multiple": false,
1200
+ "type": "option"
1201
+ },
1171
1202
  "availability": {
1172
1203
  "char": "a",
1173
1204
  "description": "The availability zone that will be targeted (default: us)",
@@ -1180,7 +1211,7 @@
1180
1211
  },
1181
1212
  "hasDynamicHelp": false,
1182
1213
  "hiddenAliases": [],
1183
- "id": "directory:listFunctions",
1214
+ "id": "directory:upgrade",
1184
1215
  "pluginAlias": "@optimizely/ocp-cli-v2",
1185
1216
  "pluginName": "@optimizely/ocp-cli-v2",
1186
1217
  "pluginType": "core",
@@ -1191,22 +1222,101 @@
1191
1222
  "dist",
1192
1223
  "commands",
1193
1224
  "directory",
1194
- "listFunctions.js"
1225
+ "upgrade.js"
1195
1226
  ]
1196
1227
  },
1197
- "directory:listGlobalFunctions": {
1198
- "aliases": [
1199
- "directory:list-global-functions"
1200
- ],
1228
+ "jobs:list": {
1229
+ "aliases": [],
1201
1230
  "args": {
1202
1231
  "appId": {
1203
- "description": "The App ID (e.g. my_app)",
1232
+ "description": "Specific App ID to filter by",
1204
1233
  "name": "appId",
1205
1234
  "required": true
1206
1235
  }
1207
1236
  },
1208
- "description": "List the global functions exposed by an app",
1237
+ "description": "List jobs",
1209
1238
  "flags": {
1239
+ "version": {
1240
+ "description": "Specific Versions to filter by",
1241
+ "name": "version",
1242
+ "hasDynamicHelp": false,
1243
+ "multiple": true,
1244
+ "type": "option"
1245
+ },
1246
+ "trackerId": {
1247
+ "description": "Specific Tracker IDs to filter by",
1248
+ "name": "trackerId",
1249
+ "hasDynamicHelp": false,
1250
+ "multiple": true,
1251
+ "type": "option"
1252
+ },
1253
+ "function": {
1254
+ "description": "Specific Job Function to filter by",
1255
+ "name": "function",
1256
+ "hasDynamicHelp": false,
1257
+ "multiple": true,
1258
+ "type": "option"
1259
+ },
1260
+ "status": {
1261
+ "description": "Specific JobStatus to filter by. Possible values: PENDING, SCHEDULED, RUNNING, COMPLETE, ERROR, TERMINATED",
1262
+ "name": "status",
1263
+ "hasDynamicHelp": false,
1264
+ "multiple": true,
1265
+ "type": "option"
1266
+ },
1267
+ "minDuration": {
1268
+ "description": "Show jobs that have been running longer than the given duration. (e.g. 5m = 5 minutes)",
1269
+ "name": "minDuration",
1270
+ "hasDynamicHelp": false,
1271
+ "multiple": false,
1272
+ "type": "option"
1273
+ },
1274
+ "sortBy": {
1275
+ "description": "Column to sort the jobs by. Possible values: id, function, trackerId, status, error, createdAt, triggeredAt, scheduledAt, terminatedAt, updatedAt, duration; Default: updatedAt",
1276
+ "name": "sortBy",
1277
+ "default": "updatedAt",
1278
+ "hasDynamicHelp": false,
1279
+ "multiple": false,
1280
+ "type": "option"
1281
+ },
1282
+ "sortDirection": {
1283
+ "description": "Sort resulting jobs in ascending or descending order. Possible values: asc|desc. Default: desc",
1284
+ "name": "sortDirection",
1285
+ "default": "desc",
1286
+ "hasDynamicHelp": false,
1287
+ "multiple": false,
1288
+ "type": "option"
1289
+ },
1290
+ "limit": {
1291
+ "description": "Number of jobs to list. Default: 50",
1292
+ "name": "limit",
1293
+ "default": 50,
1294
+ "hasDynamicHelp": false,
1295
+ "multiple": false,
1296
+ "type": "option"
1297
+ },
1298
+ "columns": {
1299
+ "description": "Columns to display. Possible values: id, version, function, trackerId, trigger, status, error, createdAt, triggeredAt, scheduledAt, terminatedAt, updatedAt, duration. Default: id, version, function, trackerId, status, createdAt, updatedAt, duration",
1300
+ "name": "columns",
1301
+ "default": "id,version,function,trackerId,status,createdAt,updatedAt,duration",
1302
+ "hasDynamicHelp": false,
1303
+ "multiple": false,
1304
+ "type": "option"
1305
+ },
1306
+ "from": {
1307
+ "description": "A start time as an ISO string, an epoch timestamp, or relative string (i.e. \"5m\" for 5 minutes.) Default: 7d",
1308
+ "name": "from",
1309
+ "hasDynamicHelp": false,
1310
+ "multiple": false,
1311
+ "type": "option"
1312
+ },
1313
+ "to": {
1314
+ "description": "An end time as an ISO string, an epoch timestamp, or relative string (i.e. \"5m\" for 5 minutes)",
1315
+ "name": "to",
1316
+ "hasDynamicHelp": false,
1317
+ "multiple": false,
1318
+ "type": "option"
1319
+ },
1210
1320
  "availability": {
1211
1321
  "char": "a",
1212
1322
  "description": "The availability zone that will be targeted (default: us)",
@@ -1219,7 +1329,7 @@
1219
1329
  },
1220
1330
  "hasDynamicHelp": false,
1221
1331
  "hiddenAliases": [],
1222
- "id": "directory:listGlobalFunctions",
1332
+ "id": "jobs:list",
1223
1333
  "pluginAlias": "@optimizely/ocp-cli-v2",
1224
1334
  "pluginName": "@optimizely/ocp-cli-v2",
1225
1335
  "pluginType": "core",
@@ -1229,22 +1339,20 @@
1229
1339
  "relativePath": [
1230
1340
  "dist",
1231
1341
  "commands",
1232
- "directory",
1233
- "listGlobalFunctions.js"
1342
+ "jobs",
1343
+ "list.js"
1234
1344
  ]
1235
1345
  },
1236
- "directory:listInstalls": {
1237
- "aliases": [
1238
- "directory:list-installs"
1239
- ],
1346
+ "jobs:runtimeStatus": {
1347
+ "aliases": [],
1240
1348
  "args": {
1241
- "appVersion": {
1242
- "description": "The App ID and optional version (e.g. my_app or my_app@1.0.0)",
1243
- "name": "appVersion",
1349
+ "jobId": {
1350
+ "description": "ID of Job to get the runtime status for",
1351
+ "name": "jobId",
1244
1352
  "required": true
1245
1353
  }
1246
1354
  },
1247
- "description": "List installations of a specific app version",
1355
+ "description": "Show the runtime status of a job",
1248
1356
  "flags": {
1249
1357
  "availability": {
1250
1358
  "char": "a",
@@ -1258,7 +1366,7 @@
1258
1366
  },
1259
1367
  "hasDynamicHelp": false,
1260
1368
  "hiddenAliases": [],
1261
- "id": "directory:listInstalls",
1369
+ "id": "jobs:runtimeStatus",
1262
1370
  "pluginAlias": "@optimizely/ocp-cli-v2",
1263
1371
  "pluginName": "@optimizely/ocp-cli-v2",
1264
1372
  "pluginType": "core",
@@ -1268,27 +1376,20 @@
1268
1376
  "relativePath": [
1269
1377
  "dist",
1270
1378
  "commands",
1271
- "directory",
1272
- "listInstalls.js"
1379
+ "jobs",
1380
+ "runtimeStatus.js"
1273
1381
  ]
1274
1382
  },
1275
- "directory:listSourceFunctions": {
1276
- "aliases": [
1277
- "directory:list-source-functions"
1278
- ],
1383
+ "jobs:status": {
1384
+ "aliases": [],
1279
1385
  "args": {
1280
- "appId": {
1281
- "description": "The App ID (e.g. my_app)",
1282
- "name": "appId",
1283
- "required": true
1284
- },
1285
- "trackerId": {
1286
- "description": "The Tracker ID of the installed account",
1287
- "name": "trackerId",
1288
- "required": true
1386
+ "jobId": {
1387
+ "description": "The Job ID to look up",
1388
+ "name": "jobId",
1389
+ "required": false
1289
1390
  }
1290
1391
  },
1291
- "description": "List the source functions exposed by an app installation",
1392
+ "description": "Get the status of a particular job id",
1292
1393
  "flags": {
1293
1394
  "availability": {
1294
1395
  "char": "a",
@@ -1302,7 +1403,7 @@
1302
1403
  },
1303
1404
  "hasDynamicHelp": false,
1304
1405
  "hiddenAliases": [],
1305
- "id": "directory:listSourceFunctions",
1406
+ "id": "jobs:status",
1306
1407
  "pluginAlias": "@optimizely/ocp-cli-v2",
1307
1408
  "pluginName": "@optimizely/ocp-cli-v2",
1308
1409
  "pluginType": "core",
@@ -1312,66 +1413,20 @@
1312
1413
  "relativePath": [
1313
1414
  "dist",
1314
1415
  "commands",
1315
- "directory",
1316
- "listSourceFunctions.js"
1416
+ "jobs",
1417
+ "status.js"
1317
1418
  ]
1318
1419
  },
1319
- "directory:publish": {
1420
+ "jobs:terminate": {
1320
1421
  "aliases": [],
1321
1422
  "args": {
1322
- "appVersion": {
1323
- "description": "The App ID and version (e.g. my_app@1.0.0)",
1324
- "name": "appVersion",
1423
+ "jobId": {
1424
+ "description": "ID of Job to terminate",
1425
+ "name": "jobId",
1325
1426
  "required": true
1326
1427
  }
1327
1428
  },
1328
- "description": "Publish (make available) a specific app version that has been reviewed and approved",
1329
- "flags": {
1330
- "noProgress": {
1331
- "aliases": [
1332
- "no-progress"
1333
- ],
1334
- "description": "Do not show progress spinner",
1335
- "name": "noProgress",
1336
- "allowNo": false,
1337
- "type": "boolean"
1338
- },
1339
- "noPrompt": {
1340
- "aliases": [
1341
- "no-prompt"
1342
- ],
1343
- "description": "Use default answers for prompts (default is yes, except destructive operations)",
1344
- "name": "noPrompt",
1345
- "allowNo": false,
1346
- "type": "boolean"
1347
- }
1348
- },
1349
- "hasDynamicHelp": false,
1350
- "hiddenAliases": [],
1351
- "id": "directory:publish",
1352
- "pluginAlias": "@optimizely/ocp-cli-v2",
1353
- "pluginName": "@optimizely/ocp-cli-v2",
1354
- "pluginType": "core",
1355
- "strict": true,
1356
- "enableJsonFlag": false,
1357
- "isESM": false,
1358
- "relativePath": [
1359
- "dist",
1360
- "commands",
1361
- "directory",
1362
- "publish.js"
1363
- ]
1364
- },
1365
- "directory:status": {
1366
- "aliases": [],
1367
- "args": {
1368
- "appId": {
1369
- "description": "The App ID and version to look up (e.g. myapp@1.0.0)",
1370
- "name": "appId",
1371
- "required": false
1372
- }
1373
- },
1374
- "description": "Get the status of a particular app version",
1429
+ "description": "Terminate a job",
1375
1430
  "flags": {
1376
1431
  "availability": {
1377
1432
  "char": "a",
@@ -1385,7 +1440,7 @@
1385
1440
  },
1386
1441
  "hasDynamicHelp": false,
1387
1442
  "hiddenAliases": [],
1388
- "id": "directory:status",
1443
+ "id": "jobs:terminate",
1389
1444
  "pluginAlias": "@optimizely/ocp-cli-v2",
1390
1445
  "pluginName": "@optimizely/ocp-cli-v2",
1391
1446
  "pluginType": "core",
@@ -1395,34 +1450,38 @@
1395
1450
  "relativePath": [
1396
1451
  "dist",
1397
1452
  "commands",
1398
- "directory",
1399
- "status.js"
1453
+ "jobs",
1454
+ "terminate.js"
1400
1455
  ]
1401
1456
  },
1402
- "directory:uninstall": {
1457
+ "jobs:trigger": {
1403
1458
  "aliases": [],
1404
1459
  "args": {
1405
1460
  "appId": {
1406
- "description": "The App ID",
1461
+ "description": "The App ID (e.g. my_app)",
1407
1462
  "name": "appId",
1408
1463
  "required": true
1409
1464
  },
1465
+ "jobName": {
1466
+ "description": "The Job Name",
1467
+ "name": "jobName",
1468
+ "required": true
1469
+ },
1410
1470
  "trackerId": {
1411
- "description": "The Tracker ID of the account to uninstall from",
1471
+ "description": "The Tracker ID to trigger the job for",
1412
1472
  "name": "trackerId",
1413
1473
  "required": true
1414
1474
  }
1415
1475
  },
1416
- "description": "Uninstall an app from an account",
1476
+ "description": "Trigger a job",
1417
1477
  "flags": {
1418
- "noPrompt": {
1419
- "aliases": [
1420
- "no-prompt"
1421
- ],
1422
- "description": "Use default answer to any prompt question (default is yes)",
1423
- "name": "noPrompt",
1424
- "allowNo": false,
1425
- "type": "boolean"
1478
+ "parameters": {
1479
+ "description": "Parameters to pass to the Job",
1480
+ "name": "parameters",
1481
+ "default": "{}",
1482
+ "hasDynamicHelp": false,
1483
+ "multiple": false,
1484
+ "type": "option"
1426
1485
  },
1427
1486
  "availability": {
1428
1487
  "char": "a",
@@ -1436,7 +1495,7 @@
1436
1495
  },
1437
1496
  "hasDynamicHelp": false,
1438
1497
  "hiddenAliases": [],
1439
- "id": "directory:uninstall",
1498
+ "id": "jobs:trigger",
1440
1499
  "pluginAlias": "@optimizely/ocp-cli-v2",
1441
1500
  "pluginName": "@optimizely/ocp-cli-v2",
1442
1501
  "pluginType": "core",
@@ -1446,59 +1505,24 @@
1446
1505
  "relativePath": [
1447
1506
  "dist",
1448
1507
  "commands",
1449
- "directory",
1450
- "uninstall.js"
1508
+ "jobs",
1509
+ "trigger.js"
1451
1510
  ]
1452
1511
  },
1453
- "directory:unpublish": {
1512
+ "review:list": {
1454
1513
  "aliases": [],
1455
1514
  "args": {
1456
- "appVersion": {
1457
- "description": "The App ID and version (e.g. my_app@1.0.0)",
1458
- "name": "appVersion",
1459
- "required": true
1460
- }
1461
- },
1462
- "description": "Unpublish an app version",
1463
- "flags": {
1464
- "force": {
1465
- "char": "f",
1466
- "description": "Force uninstall from all accounts without confirmation",
1467
- "name": "force",
1468
- "allowNo": false,
1469
- "type": "boolean"
1470
- },
1471
- "noProgress": {
1472
- "aliases": [
1473
- "no-progress"
1474
- ],
1475
- "description": "Disable progress spinner",
1476
- "name": "noProgress",
1477
- "allowNo": false,
1478
- "type": "boolean"
1479
- },
1480
- "noPrompt": {
1481
- "aliases": [
1482
- "no-prompt"
1483
- ],
1484
- "description": "Use default answer to prompts (default yes, except destructive ops)",
1485
- "name": "noPrompt",
1486
- "allowNo": false,
1487
- "type": "boolean"
1488
- },
1489
- "availability": {
1490
- "char": "a",
1491
- "description": "The availability zone that will be targeted (default: us)",
1492
- "name": "availability",
1493
- "default": "us",
1494
- "hasDynamicHelp": false,
1495
- "multiple": false,
1496
- "type": "option"
1515
+ "appId": {
1516
+ "description": "A specific App ID to filter down to (lists all apps by default)",
1517
+ "name": "appId",
1518
+ "required": false
1497
1519
  }
1498
1520
  },
1521
+ "description": "List app versions currently under review",
1522
+ "flags": {},
1499
1523
  "hasDynamicHelp": false,
1500
1524
  "hiddenAliases": [],
1501
- "id": "directory:unpublish",
1525
+ "id": "review:list",
1502
1526
  "pluginAlias": "@optimizely/ocp-cli-v2",
1503
1527
  "pluginName": "@optimizely/ocp-cli-v2",
1504
1528
  "pluginType": "core",
@@ -1508,48 +1532,24 @@
1508
1532
  "relativePath": [
1509
1533
  "dist",
1510
1534
  "commands",
1511
- "directory",
1512
- "unpublish.js"
1535
+ "review",
1536
+ "list.js"
1513
1537
  ]
1514
1538
  },
1515
- "directory:upgrade": {
1539
+ "review:open": {
1516
1540
  "aliases": [],
1517
1541
  "args": {
1518
- "appId": {
1519
- "description": "The App ID of the app to upgrade (e.g. my_app)",
1520
- "name": "appId",
1521
- "required": true
1522
- },
1523
- "trackerId": {
1524
- "description": "The Tracker ID of the account to install into",
1525
- "name": "trackerId",
1542
+ "appVersion": {
1543
+ "description": "App version of the review to open",
1544
+ "name": "appVersion",
1526
1545
  "required": true
1527
1546
  }
1528
1547
  },
1529
- "description": "Upgrade the Install to a specific app version",
1530
- "flags": {
1531
- "toVersion": {
1532
- "char": "v",
1533
- "description": "The desired version (i.e. 1.0.0)",
1534
- "name": "toVersion",
1535
- "required": true,
1536
- "hasDynamicHelp": false,
1537
- "multiple": false,
1538
- "type": "option"
1539
- },
1540
- "availability": {
1541
- "char": "a",
1542
- "description": "The availability zone that will be targeted (default: us)",
1543
- "name": "availability",
1544
- "default": "us",
1545
- "hasDynamicHelp": false,
1546
- "multiple": false,
1547
- "type": "option"
1548
- }
1549
- },
1548
+ "description": "Open a review in your browser",
1549
+ "flags": {},
1550
1550
  "hasDynamicHelp": false,
1551
1551
  "hiddenAliases": [],
1552
- "id": "directory:upgrade",
1552
+ "id": "review:open",
1553
1553
  "pluginAlias": "@optimizely/ocp-cli-v2",
1554
1554
  "pluginName": "@optimizely/ocp-cli-v2",
1555
1555
  "pluginType": "core",
@@ -1559,8 +1559,8 @@
1559
1559
  "relativePath": [
1560
1560
  "dist",
1561
1561
  "commands",
1562
- "directory",
1563
- "upgrade.js"
1562
+ "review",
1563
+ "open.js"
1564
1564
  ]
1565
1565
  },
1566
1566
  "env:get": {
@@ -1612,5 +1612,5 @@
1612
1612
  ]
1613
1613
  }
1614
1614
  },
1615
- "version": "2.0.2"
1615
+ "version": "2.0.3"
1616
1616
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@optimizely/ocp-cli-v2",
3
- "version": "2.0.2",
3
+ "version": "2.0.3",
4
4
  "description": "Optimizely Connect Platform command line interface",
5
5
  "repository": "https://github.com/ZaiusInc/ocp-cli",
6
6
  "license": "Apache-2.0",