@dishantlangayan/solace-cloud-cli 0.2.0 → 0.3.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.
- package/README.md +362 -32
- package/dist/commands/account/list.d.ts +10 -0
- package/dist/commands/account/list.js +36 -0
- package/dist/commands/account/login.d.ts +43 -0
- package/dist/commands/account/login.js +232 -0
- package/dist/commands/account/logout.d.ts +15 -0
- package/dist/commands/account/logout.js +113 -0
- package/dist/commands/missionctrl/broker/create.d.ts +1 -0
- package/dist/commands/missionctrl/broker/create.js +8 -2
- package/dist/commands/missionctrl/broker/delete.d.ts +1 -0
- package/dist/commands/missionctrl/broker/delete.js +8 -2
- package/dist/commands/missionctrl/broker/display.d.ts +1 -0
- package/dist/commands/missionctrl/broker/display.js +11 -3
- package/dist/commands/missionctrl/broker/list.d.ts +1 -0
- package/dist/commands/missionctrl/broker/list.js +8 -2
- package/dist/commands/missionctrl/broker/opstatus.d.ts +1 -0
- package/dist/commands/missionctrl/broker/opstatus.js +8 -2
- package/dist/commands/missionctrl/broker/state.d.ts +1 -0
- package/dist/commands/missionctrl/broker/state.js +8 -2
- package/dist/commands/missionctrl/broker/update.d.ts +1 -0
- package/dist/commands/missionctrl/broker/update.js +8 -3
- package/dist/commands/platform/env/create.d.ts +1 -0
- package/dist/commands/platform/env/create.js +9 -3
- package/dist/commands/platform/env/delete.d.ts +1 -0
- package/dist/commands/platform/env/delete.js +8 -2
- package/dist/commands/platform/env/display.d.ts +1 -0
- package/dist/commands/platform/env/display.js +8 -2
- package/dist/commands/platform/env/list.d.ts +1 -0
- package/dist/commands/platform/env/list.js +8 -2
- package/dist/commands/platform/env/update.d.ts +1 -0
- package/dist/commands/platform/env/update.js +9 -3
- package/dist/lib/org-utils.d.ts +24 -0
- package/dist/lib/org-utils.js +77 -0
- package/oclif.manifest.json +337 -12
- package/package.json +21 -3
- package/dist/config/env-vars.d.ts +0 -44
- package/dist/config/env-vars.js +0 -47
package/oclif.manifest.json
CHANGED
|
@@ -1,11 +1,230 @@
|
|
|
1
1
|
{
|
|
2
2
|
"commands": {
|
|
3
|
+
"account:list": {
|
|
4
|
+
"aliases": [],
|
|
5
|
+
"args": {},
|
|
6
|
+
"description": "List all authenticated organizations.\n\nDisplays organizations you have logged into, including their aliases and which one is set as default.",
|
|
7
|
+
"examples": [
|
|
8
|
+
"<%= config.bin %> <%= command.id %>"
|
|
9
|
+
],
|
|
10
|
+
"flags": {
|
|
11
|
+
"json": {
|
|
12
|
+
"description": "Format output as json.",
|
|
13
|
+
"helpGroup": "GLOBAL",
|
|
14
|
+
"name": "json",
|
|
15
|
+
"allowNo": false,
|
|
16
|
+
"type": "boolean"
|
|
17
|
+
},
|
|
18
|
+
"log-level": {
|
|
19
|
+
"helpGroup": "GLOBAL",
|
|
20
|
+
"name": "log-level",
|
|
21
|
+
"summary": "Specify level for logging.",
|
|
22
|
+
"default": "info",
|
|
23
|
+
"hasDynamicHelp": false,
|
|
24
|
+
"multiple": false,
|
|
25
|
+
"options": [
|
|
26
|
+
"debug",
|
|
27
|
+
"warn",
|
|
28
|
+
"error",
|
|
29
|
+
"info",
|
|
30
|
+
"trace"
|
|
31
|
+
],
|
|
32
|
+
"type": "option"
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
"hasDynamicHelp": false,
|
|
36
|
+
"hiddenAliases": [],
|
|
37
|
+
"id": "account:list",
|
|
38
|
+
"pluginAlias": "@dishantlangayan/solace-cloud-cli",
|
|
39
|
+
"pluginName": "@dishantlangayan/solace-cloud-cli",
|
|
40
|
+
"pluginType": "core",
|
|
41
|
+
"strict": true,
|
|
42
|
+
"enableJsonFlag": true,
|
|
43
|
+
"isESM": true,
|
|
44
|
+
"relativePath": [
|
|
45
|
+
"dist",
|
|
46
|
+
"commands",
|
|
47
|
+
"account",
|
|
48
|
+
"list.js"
|
|
49
|
+
]
|
|
50
|
+
},
|
|
51
|
+
"account:login": {
|
|
52
|
+
"aliases": [],
|
|
53
|
+
"args": {},
|
|
54
|
+
"description": "Login to a Solace Cloud organization.\n\nStores organization credentials securely using OS keychain.\nThe access token is encrypted and stored locally.\n\nYou can store multiple access tokens for the same organization by using unique aliases.\nWithout an alias, only one token per organization ID is allowed.\n\nRequired token permissions: Varies by operations you intend to perform",
|
|
55
|
+
"examples": [
|
|
56
|
+
"<%= config.bin %> <%= command.id %> --org=my-org-id",
|
|
57
|
+
"<%= config.bin %> <%= command.id %> --org=my-org-id --alias=production",
|
|
58
|
+
"<%= config.bin %> <%= command.id %> --org=my-org-id --alias=staging",
|
|
59
|
+
"<%= config.bin %> <%= command.id %> --org=my-org-id --set-default",
|
|
60
|
+
"<%= config.bin %> <%= command.id %> --org=my-org-id --no-prompt",
|
|
61
|
+
"<%= config.bin %> <%= command.id %> --org=my-org-id --base-url=https://api.custom.solace.cloud"
|
|
62
|
+
],
|
|
63
|
+
"flags": {
|
|
64
|
+
"json": {
|
|
65
|
+
"description": "Format output as json.",
|
|
66
|
+
"helpGroup": "GLOBAL",
|
|
67
|
+
"name": "json",
|
|
68
|
+
"allowNo": false,
|
|
69
|
+
"type": "boolean"
|
|
70
|
+
},
|
|
71
|
+
"log-level": {
|
|
72
|
+
"helpGroup": "GLOBAL",
|
|
73
|
+
"name": "log-level",
|
|
74
|
+
"summary": "Specify level for logging.",
|
|
75
|
+
"default": "info",
|
|
76
|
+
"hasDynamicHelp": false,
|
|
77
|
+
"multiple": false,
|
|
78
|
+
"options": [
|
|
79
|
+
"debug",
|
|
80
|
+
"warn",
|
|
81
|
+
"error",
|
|
82
|
+
"info",
|
|
83
|
+
"trace"
|
|
84
|
+
],
|
|
85
|
+
"type": "option"
|
|
86
|
+
},
|
|
87
|
+
"alias": {
|
|
88
|
+
"char": "a",
|
|
89
|
+
"description": "Alias name for this organization (allows storing multiple tokens for the same org with different aliases)",
|
|
90
|
+
"name": "alias",
|
|
91
|
+
"hasDynamicHelp": false,
|
|
92
|
+
"multiple": false,
|
|
93
|
+
"type": "option"
|
|
94
|
+
},
|
|
95
|
+
"api-version": {
|
|
96
|
+
"description": "API version to use (optional)",
|
|
97
|
+
"name": "api-version",
|
|
98
|
+
"hasDynamicHelp": false,
|
|
99
|
+
"multiple": false,
|
|
100
|
+
"type": "option"
|
|
101
|
+
},
|
|
102
|
+
"base-url": {
|
|
103
|
+
"description": "Custom base URL for Solace Cloud API (optional)",
|
|
104
|
+
"name": "base-url",
|
|
105
|
+
"hasDynamicHelp": false,
|
|
106
|
+
"multiple": false,
|
|
107
|
+
"type": "option"
|
|
108
|
+
},
|
|
109
|
+
"no-prompt": {
|
|
110
|
+
"description": "Read access token from SC_ACCESS_TOKEN environment variable instead of prompting",
|
|
111
|
+
"name": "no-prompt",
|
|
112
|
+
"allowNo": false,
|
|
113
|
+
"type": "boolean"
|
|
114
|
+
},
|
|
115
|
+
"org": {
|
|
116
|
+
"char": "o",
|
|
117
|
+
"description": "Organization ID to login to",
|
|
118
|
+
"name": "org",
|
|
119
|
+
"required": true,
|
|
120
|
+
"hasDynamicHelp": false,
|
|
121
|
+
"multiple": false,
|
|
122
|
+
"type": "option"
|
|
123
|
+
},
|
|
124
|
+
"set-default": {
|
|
125
|
+
"char": "d",
|
|
126
|
+
"description": "Set this organization as the default",
|
|
127
|
+
"name": "set-default",
|
|
128
|
+
"allowNo": false,
|
|
129
|
+
"type": "boolean"
|
|
130
|
+
}
|
|
131
|
+
},
|
|
132
|
+
"hasDynamicHelp": false,
|
|
133
|
+
"hiddenAliases": [],
|
|
134
|
+
"id": "account:login",
|
|
135
|
+
"pluginAlias": "@dishantlangayan/solace-cloud-cli",
|
|
136
|
+
"pluginName": "@dishantlangayan/solace-cloud-cli",
|
|
137
|
+
"pluginType": "core",
|
|
138
|
+
"strict": true,
|
|
139
|
+
"enableJsonFlag": true,
|
|
140
|
+
"isESM": true,
|
|
141
|
+
"relativePath": [
|
|
142
|
+
"dist",
|
|
143
|
+
"commands",
|
|
144
|
+
"account",
|
|
145
|
+
"login.js"
|
|
146
|
+
]
|
|
147
|
+
},
|
|
148
|
+
"account:logout": {
|
|
149
|
+
"aliases": [],
|
|
150
|
+
"args": {},
|
|
151
|
+
"description": "Logout from authenticated organizations.\n\nRemoves locally stored organization credentials and access tokens.\nInteractive mode allows selection with arrow keys and spacebar.",
|
|
152
|
+
"examples": [
|
|
153
|
+
"<%= config.bin %> <%= command.id %>",
|
|
154
|
+
"<%= config.bin %> <%= command.id %> --org=my-org-id",
|
|
155
|
+
"<%= config.bin %> <%= command.id %> --org=production",
|
|
156
|
+
"<%= config.bin %> <%= command.id %> --all",
|
|
157
|
+
"<%= config.bin %> <%= command.id %> --org=my-org-id --no-prompt"
|
|
158
|
+
],
|
|
159
|
+
"flags": {
|
|
160
|
+
"json": {
|
|
161
|
+
"description": "Format output as json.",
|
|
162
|
+
"helpGroup": "GLOBAL",
|
|
163
|
+
"name": "json",
|
|
164
|
+
"allowNo": false,
|
|
165
|
+
"type": "boolean"
|
|
166
|
+
},
|
|
167
|
+
"log-level": {
|
|
168
|
+
"helpGroup": "GLOBAL",
|
|
169
|
+
"name": "log-level",
|
|
170
|
+
"summary": "Specify level for logging.",
|
|
171
|
+
"default": "info",
|
|
172
|
+
"hasDynamicHelp": false,
|
|
173
|
+
"multiple": false,
|
|
174
|
+
"options": [
|
|
175
|
+
"debug",
|
|
176
|
+
"warn",
|
|
177
|
+
"error",
|
|
178
|
+
"info",
|
|
179
|
+
"trace"
|
|
180
|
+
],
|
|
181
|
+
"type": "option"
|
|
182
|
+
},
|
|
183
|
+
"all": {
|
|
184
|
+
"char": "a",
|
|
185
|
+
"description": "Logout of all organizations",
|
|
186
|
+
"name": "all",
|
|
187
|
+
"allowNo": false,
|
|
188
|
+
"type": "boolean"
|
|
189
|
+
},
|
|
190
|
+
"no-prompt": {
|
|
191
|
+
"description": "Skip confirmation prompt and assume Yes",
|
|
192
|
+
"name": "no-prompt",
|
|
193
|
+
"allowNo": false,
|
|
194
|
+
"type": "boolean"
|
|
195
|
+
},
|
|
196
|
+
"org": {
|
|
197
|
+
"char": "o",
|
|
198
|
+
"description": "Organization ID or alias to logout from",
|
|
199
|
+
"name": "org",
|
|
200
|
+
"hasDynamicHelp": false,
|
|
201
|
+
"multiple": false,
|
|
202
|
+
"type": "option"
|
|
203
|
+
}
|
|
204
|
+
},
|
|
205
|
+
"hasDynamicHelp": false,
|
|
206
|
+
"hiddenAliases": [],
|
|
207
|
+
"id": "account:logout",
|
|
208
|
+
"pluginAlias": "@dishantlangayan/solace-cloud-cli",
|
|
209
|
+
"pluginName": "@dishantlangayan/solace-cloud-cli",
|
|
210
|
+
"pluginType": "core",
|
|
211
|
+
"strict": true,
|
|
212
|
+
"enableJsonFlag": true,
|
|
213
|
+
"isESM": true,
|
|
214
|
+
"relativePath": [
|
|
215
|
+
"dist",
|
|
216
|
+
"commands",
|
|
217
|
+
"account",
|
|
218
|
+
"logout.js"
|
|
219
|
+
]
|
|
220
|
+
},
|
|
3
221
|
"missionctrl:broker:create": {
|
|
4
222
|
"aliases": [],
|
|
5
223
|
"args": {},
|
|
6
224
|
"description": "Create an event broker service. You must provide a unique name and select a service class and datacenter. You can optionally define other properties for the event broker service.\n\nYour token must have one of the permissions listed in the Token Permissions.\n\nToken Permissions: [ `services:post` ]",
|
|
7
225
|
"examples": [
|
|
8
|
-
"<%= config.bin %> <%= command.id %> --name=MyBrokerName --datacenter-id=eks-ca-central-1a --service-class-id=DEVELOPER"
|
|
226
|
+
"<%= config.bin %> <%= command.id %> --name=MyBrokerName --datacenter-id=eks-ca-central-1a --service-class-id=DEVELOPER",
|
|
227
|
+
"<%= config.bin %> <%= command.id %> --org=my-org --name=MyBrokerName --datacenter-id=eks-ca-central-1a --service-class-id=DEVELOPER"
|
|
9
228
|
],
|
|
10
229
|
"flags": {
|
|
11
230
|
"json": {
|
|
@@ -80,6 +299,14 @@
|
|
|
80
299
|
"multiple": false,
|
|
81
300
|
"type": "option"
|
|
82
301
|
},
|
|
302
|
+
"org": {
|
|
303
|
+
"char": "o",
|
|
304
|
+
"description": "Organization ID or alias to use. If not specified, uses the default organization.",
|
|
305
|
+
"name": "org",
|
|
306
|
+
"hasDynamicHelp": false,
|
|
307
|
+
"multiple": false,
|
|
308
|
+
"type": "option"
|
|
309
|
+
},
|
|
83
310
|
"redundancy-group-ssl-enabled": {
|
|
84
311
|
"char": "r",
|
|
85
312
|
"description": "Enable or disable SSL for the redundancy group (for mate-link encryption). The default value is false (disabled)",
|
|
@@ -128,7 +355,8 @@
|
|
|
128
355
|
"description": "Delete a service using its unique identifier.\n\nYour token must have one of the permissions listed in the Token Permissions.\n\nToken Permissions: [ `services:delete` **or** `services:delete:self` **or** `mission_control:access` ]",
|
|
129
356
|
"examples": [
|
|
130
357
|
"<%= config.bin %> <%= command.id %> --broker-id=MyBrokerId",
|
|
131
|
-
"<%= config.bin %> <%= command.id %> --name=MyBrokerName"
|
|
358
|
+
"<%= config.bin %> <%= command.id %> --name=MyBrokerName",
|
|
359
|
+
"<%= config.bin %> <%= command.id %> --org=my-org --broker-id=MyBrokerId"
|
|
132
360
|
],
|
|
133
361
|
"flags": {
|
|
134
362
|
"json": {
|
|
@@ -169,6 +397,14 @@
|
|
|
169
397
|
"hasDynamicHelp": false,
|
|
170
398
|
"multiple": false,
|
|
171
399
|
"type": "option"
|
|
400
|
+
},
|
|
401
|
+
"org": {
|
|
402
|
+
"char": "o",
|
|
403
|
+
"description": "Organization ID or alias to use. If not specified, uses the default organization.",
|
|
404
|
+
"name": "org",
|
|
405
|
+
"hasDynamicHelp": false,
|
|
406
|
+
"multiple": false,
|
|
407
|
+
"type": "option"
|
|
172
408
|
}
|
|
173
409
|
},
|
|
174
410
|
"hasDynamicHelp": false,
|
|
@@ -193,7 +429,8 @@
|
|
|
193
429
|
"args": {},
|
|
194
430
|
"description": "Get the details of an event broker service using its identifier or name.\n \n Use either the Event Broker's ID (--broker-id) or name of the Event Broker (--name).\n \n Token Permissions: [ `mission_control:access` **or** `services:get` **or** `services:get:self` **or** `services:view` **or** `services:view:self` ]",
|
|
195
431
|
"examples": [
|
|
196
|
-
"<%= config.bin %> <%= command.id %>"
|
|
432
|
+
"<%= config.bin %> <%= command.id %> --broker-id=MyBrokerId",
|
|
433
|
+
"<%= config.bin %> <%= command.id %> --org=my-org --name=MyBrokerName"
|
|
197
434
|
],
|
|
198
435
|
"flags": {
|
|
199
436
|
"json": {
|
|
@@ -234,6 +471,14 @@
|
|
|
234
471
|
"hasDynamicHelp": false,
|
|
235
472
|
"multiple": false,
|
|
236
473
|
"type": "option"
|
|
474
|
+
},
|
|
475
|
+
"org": {
|
|
476
|
+
"char": "o",
|
|
477
|
+
"description": "Organization ID or alias to use. If not specified, uses the default organization.",
|
|
478
|
+
"name": "org",
|
|
479
|
+
"hasDynamicHelp": false,
|
|
480
|
+
"multiple": false,
|
|
481
|
+
"type": "option"
|
|
237
482
|
}
|
|
238
483
|
},
|
|
239
484
|
"hasDynamicHelp": false,
|
|
@@ -259,6 +504,7 @@
|
|
|
259
504
|
"description": "Get a listing of event broker services.\n\nYour token must have one of the permissions listed in the Token Permissions.\n\nToken Permissions: [ `mission_control:access` **or** `services:get` **or** `services:get:self` **or** `services:view` **or** `services:view:self` ]",
|
|
260
505
|
"examples": [
|
|
261
506
|
"<%= config.bin %> <%= command.id %>",
|
|
507
|
+
"<%= config.bin %> <%= command.id %> --org=my-org",
|
|
262
508
|
"<%= config.bin %> <%= command.id %> --name=MyBrokerName --pageNumber=1 --pageSize=10 --sort=name:asc"
|
|
263
509
|
],
|
|
264
510
|
"flags": {
|
|
@@ -293,6 +539,14 @@
|
|
|
293
539
|
"multiple": false,
|
|
294
540
|
"type": "option"
|
|
295
541
|
},
|
|
542
|
+
"org": {
|
|
543
|
+
"char": "o",
|
|
544
|
+
"description": "Organization ID or alias to use. If not specified, uses the default organization.",
|
|
545
|
+
"name": "org",
|
|
546
|
+
"hasDynamicHelp": false,
|
|
547
|
+
"multiple": false,
|
|
548
|
+
"type": "option"
|
|
549
|
+
},
|
|
296
550
|
"pageNumber": {
|
|
297
551
|
"description": "The page number to get. Defaults to 1",
|
|
298
552
|
"name": "pageNumber",
|
|
@@ -338,7 +592,8 @@
|
|
|
338
592
|
"description": "Get the status of all operations being performed on an event broker service. \n To get the operation status, you must provide the identifier or name of the event broker service.\n\n Token Permissions: [ mission_control:access or services:get or services:get:self or services:view or services:view:self ]",
|
|
339
593
|
"examples": [
|
|
340
594
|
"<%= config.bin %> <%= command.id %> -b <broker-id>",
|
|
341
|
-
"<%= config.bin %> <%= command.id %> -n <broker-name>"
|
|
595
|
+
"<%= config.bin %> <%= command.id %> -n <broker-name>",
|
|
596
|
+
"<%= config.bin %> <%= command.id %> --org=my-org -b <broker-id>"
|
|
342
597
|
],
|
|
343
598
|
"flags": {
|
|
344
599
|
"json": {
|
|
@@ -380,6 +635,14 @@
|
|
|
380
635
|
"multiple": false,
|
|
381
636
|
"type": "option"
|
|
382
637
|
},
|
|
638
|
+
"org": {
|
|
639
|
+
"char": "o",
|
|
640
|
+
"description": "Organization ID or alias to use. If not specified, uses the default organization.",
|
|
641
|
+
"name": "org",
|
|
642
|
+
"hasDynamicHelp": false,
|
|
643
|
+
"multiple": false,
|
|
644
|
+
"type": "option"
|
|
645
|
+
},
|
|
383
646
|
"show-progress": {
|
|
384
647
|
"char": "p",
|
|
385
648
|
"description": "Displays a status bar of the in-progress operations. The command will wait for completion of each step of the operation.",
|
|
@@ -419,7 +682,8 @@
|
|
|
419
682
|
"description": "Get the availability state of an event broker service and the name of the active messaging node using the service's unique identifier.\n\n Your token must have one of the permissions listed in the Token Permissions.\n \n Token Permissions: [ mission_control:access or services:get or services:get:self or services:view or services:view:self ]",
|
|
420
683
|
"examples": [
|
|
421
684
|
"<%= config.bin %> <%= command.id %> --broker-id=MyBrokerServiceId",
|
|
422
|
-
"<%= config.bin %> <%= command.id %> --name=MyBrokerName"
|
|
685
|
+
"<%= config.bin %> <%= command.id %> --name=MyBrokerName",
|
|
686
|
+
"<%= config.bin %> <%= command.id %> --org=my-org --broker-id=MyBrokerServiceId"
|
|
423
687
|
],
|
|
424
688
|
"flags": {
|
|
425
689
|
"json": {
|
|
@@ -460,6 +724,14 @@
|
|
|
460
724
|
"hasDynamicHelp": false,
|
|
461
725
|
"multiple": false,
|
|
462
726
|
"type": "option"
|
|
727
|
+
},
|
|
728
|
+
"org": {
|
|
729
|
+
"char": "o",
|
|
730
|
+
"description": "Organization ID or alias to use. If not specified, uses the default organization.",
|
|
731
|
+
"name": "org",
|
|
732
|
+
"hasDynamicHelp": false,
|
|
733
|
+
"multiple": false,
|
|
734
|
+
"type": "option"
|
|
463
735
|
}
|
|
464
736
|
},
|
|
465
737
|
"hasDynamicHelp": false,
|
|
@@ -486,7 +758,7 @@
|
|
|
486
758
|
"examples": [
|
|
487
759
|
"<%= config.bin %> <%= command.id %>",
|
|
488
760
|
"<%= config.bin %> <%= command.id %> --broker-id <broker-id> --new-name <new-name>",
|
|
489
|
-
"<%= config.bin %> <%= command.id %> --name <name> --new-name <new-name>"
|
|
761
|
+
"<%= config.bin %> <%= command.id %> --org=my-org --name <name> --new-name <new-name>"
|
|
490
762
|
],
|
|
491
763
|
"flags": {
|
|
492
764
|
"json": {
|
|
@@ -542,6 +814,14 @@
|
|
|
542
814
|
"hasDynamicHelp": false,
|
|
543
815
|
"multiple": false,
|
|
544
816
|
"type": "option"
|
|
817
|
+
},
|
|
818
|
+
"org": {
|
|
819
|
+
"char": "o",
|
|
820
|
+
"description": "Organization ID or alias to use. If not specified, uses the default organization.",
|
|
821
|
+
"name": "org",
|
|
822
|
+
"hasDynamicHelp": false,
|
|
823
|
+
"multiple": false,
|
|
824
|
+
"type": "option"
|
|
545
825
|
}
|
|
546
826
|
},
|
|
547
827
|
"hasDynamicHelp": false,
|
|
@@ -566,7 +846,8 @@
|
|
|
566
846
|
"args": {},
|
|
567
847
|
"description": "Create a new environment.\n\n Token Permissions: [ environments:edit ]",
|
|
568
848
|
"examples": [
|
|
569
|
-
"<%= config.bin %> <%= command.id %> --name=MyEnvironment
|
|
849
|
+
"<%= config.bin %> <%= command.id %> --name=MyEnvironment",
|
|
850
|
+
"<%= config.bin %> <%= command.id %> --org=my-org --name=MyEnvironment --description=\"My environment description\" --isDefault --isProduction"
|
|
570
851
|
],
|
|
571
852
|
"flags": {
|
|
572
853
|
"json": {
|
|
@@ -620,6 +901,14 @@
|
|
|
620
901
|
"hasDynamicHelp": false,
|
|
621
902
|
"multiple": false,
|
|
622
903
|
"type": "option"
|
|
904
|
+
},
|
|
905
|
+
"org": {
|
|
906
|
+
"char": "o",
|
|
907
|
+
"description": "Organization ID or alias to use. If not specified, uses the default organization.",
|
|
908
|
+
"name": "org",
|
|
909
|
+
"hasDynamicHelp": false,
|
|
910
|
+
"multiple": false,
|
|
911
|
+
"type": "option"
|
|
623
912
|
}
|
|
624
913
|
},
|
|
625
914
|
"hasDynamicHelp": false,
|
|
@@ -645,7 +934,8 @@
|
|
|
645
934
|
"description": "Delete an environment using either its name or unique identifier. The default environment cannot be deleted.\n\n Token Permissions: [ environments:edit ]",
|
|
646
935
|
"examples": [
|
|
647
936
|
"<%= config.bin %> <%= command.id %> --name=MyEnvName",
|
|
648
|
-
"<%= config.bin %> <%= command.id %> --env-id=MyEnvId"
|
|
937
|
+
"<%= config.bin %> <%= command.id %> --env-id=MyEnvId",
|
|
938
|
+
"<%= config.bin %> <%= command.id %> --org=my-org --name=MyEnvName"
|
|
649
939
|
],
|
|
650
940
|
"flags": {
|
|
651
941
|
"json": {
|
|
@@ -686,6 +976,14 @@
|
|
|
686
976
|
"hasDynamicHelp": false,
|
|
687
977
|
"multiple": false,
|
|
688
978
|
"type": "option"
|
|
979
|
+
},
|
|
980
|
+
"org": {
|
|
981
|
+
"char": "o",
|
|
982
|
+
"description": "Organization ID or alias to use. If not specified, uses the default organization.",
|
|
983
|
+
"name": "org",
|
|
984
|
+
"hasDynamicHelp": false,
|
|
985
|
+
"multiple": false,
|
|
986
|
+
"type": "option"
|
|
689
987
|
}
|
|
690
988
|
},
|
|
691
989
|
"hasDynamicHelp": false,
|
|
@@ -711,7 +1009,8 @@
|
|
|
711
1009
|
"description": "Display information about an Environment.\n \n Use either the Environment's ID (--env-id) or name of the Environment (--name).\n \n Required token permissions: [ environments:view ]",
|
|
712
1010
|
"examples": [
|
|
713
1011
|
"<%= config.bin %> <%= command.id %> --name=MyEnvName",
|
|
714
|
-
"<%= config.bin %> <%= command.id %> --env-id=MyEnvId"
|
|
1012
|
+
"<%= config.bin %> <%= command.id %> --env-id=MyEnvId",
|
|
1013
|
+
"<%= config.bin %> <%= command.id %> --org=my-org --env-id=MyEnvId"
|
|
715
1014
|
],
|
|
716
1015
|
"flags": {
|
|
717
1016
|
"json": {
|
|
@@ -752,6 +1051,14 @@
|
|
|
752
1051
|
"hasDynamicHelp": false,
|
|
753
1052
|
"multiple": false,
|
|
754
1053
|
"type": "option"
|
|
1054
|
+
},
|
|
1055
|
+
"org": {
|
|
1056
|
+
"char": "o",
|
|
1057
|
+
"description": "Organization ID or alias to use. If not specified, uses the default organization.",
|
|
1058
|
+
"name": "org",
|
|
1059
|
+
"hasDynamicHelp": false,
|
|
1060
|
+
"multiple": false,
|
|
1061
|
+
"type": "option"
|
|
755
1062
|
}
|
|
756
1063
|
},
|
|
757
1064
|
"hasDynamicHelp": false,
|
|
@@ -777,6 +1084,7 @@
|
|
|
777
1084
|
"description": "Get a list of all Environments. \n \n Required token permissions: [ environments:view ]",
|
|
778
1085
|
"examples": [
|
|
779
1086
|
"<%= config.bin %> <%= command.id %>",
|
|
1087
|
+
"<%= config.bin %> <%= command.id %> --org=my-org",
|
|
780
1088
|
"<%= config.bin %> <%= command.id %> --name=Default --pageNumber=1 --pageSize=10 --sort=name:ASC"
|
|
781
1089
|
],
|
|
782
1090
|
"flags": {
|
|
@@ -811,6 +1119,14 @@
|
|
|
811
1119
|
"multiple": false,
|
|
812
1120
|
"type": "option"
|
|
813
1121
|
},
|
|
1122
|
+
"org": {
|
|
1123
|
+
"char": "o",
|
|
1124
|
+
"description": "Organization ID or alias to use. If not specified, uses the default organization.",
|
|
1125
|
+
"name": "org",
|
|
1126
|
+
"hasDynamicHelp": false,
|
|
1127
|
+
"multiple": false,
|
|
1128
|
+
"type": "option"
|
|
1129
|
+
},
|
|
814
1130
|
"pageNumber": {
|
|
815
1131
|
"char": "p",
|
|
816
1132
|
"description": "The page number to get. Defaults to 10",
|
|
@@ -857,8 +1173,9 @@
|
|
|
857
1173
|
"args": {},
|
|
858
1174
|
"description": "Modify an environment's attributes\n \n Use either the Environment's ID (--env-id) or name of the Environment (--name).\n \n Token Permissions: [ environments:edit ]\n ",
|
|
859
1175
|
"examples": [
|
|
860
|
-
"<%= config.bin %> <%= command.id %> --name=MyEnvName --new-name=MyNewEnvName
|
|
861
|
-
"<%= config.bin %> <%= command.id %> --env-id=MyEnvId --new-name=MyNewEnvName --description=\"My description to update\" --isDefault"
|
|
1176
|
+
"<%= config.bin %> <%= command.id %> --name=MyEnvName --new-name=MyNewEnvName",
|
|
1177
|
+
"<%= config.bin %> <%= command.id %> --env-id=MyEnvId --new-name=MyNewEnvName --description=\"My description to update\" --isDefault",
|
|
1178
|
+
"<%= config.bin %> <%= command.id %> --org=my-org --name=MyEnvName --isDefault"
|
|
862
1179
|
],
|
|
863
1180
|
"flags": {
|
|
864
1181
|
"json": {
|
|
@@ -920,6 +1237,14 @@
|
|
|
920
1237
|
"hasDynamicHelp": false,
|
|
921
1238
|
"multiple": false,
|
|
922
1239
|
"type": "option"
|
|
1240
|
+
},
|
|
1241
|
+
"org": {
|
|
1242
|
+
"char": "o",
|
|
1243
|
+
"description": "Organization ID or alias to use. If not specified, uses the default organization.",
|
|
1244
|
+
"name": "org",
|
|
1245
|
+
"hasDynamicHelp": false,
|
|
1246
|
+
"multiple": false,
|
|
1247
|
+
"type": "option"
|
|
923
1248
|
}
|
|
924
1249
|
},
|
|
925
1250
|
"hasDynamicHelp": false,
|
|
@@ -940,5 +1265,5 @@
|
|
|
940
1265
|
]
|
|
941
1266
|
}
|
|
942
1267
|
},
|
|
943
|
-
"version": "0.
|
|
1268
|
+
"version": "0.3.0"
|
|
944
1269
|
}
|
package/package.json
CHANGED
|
@@ -1,17 +1,26 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dishantlangayan/solace-cloud-cli",
|
|
3
3
|
"description": "The Solace Cloud CLI",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.3.0",
|
|
5
5
|
"author": "Dishant Langayan",
|
|
6
6
|
"bin": {
|
|
7
7
|
"sc": "./bin/run.js"
|
|
8
8
|
},
|
|
9
9
|
"bugs": "https://github.com/dishantlangayan/solace-cloud-cli/issues",
|
|
10
10
|
"dependencies": {
|
|
11
|
-
"@dishantlangayan/sc-cli-core": "^0.1
|
|
11
|
+
"@dishantlangayan/sc-cli-core": "^0.5.1",
|
|
12
|
+
"@inquirer/prompts": "^8.3.0",
|
|
12
13
|
"@oclif/core": "^4",
|
|
14
|
+
"@oclif/plugin-autocomplete": "^3.2.40",
|
|
15
|
+
"@oclif/plugin-commands": "^4.1.40",
|
|
13
16
|
"@oclif/plugin-help": "^6",
|
|
17
|
+
"@oclif/plugin-not-found": "^3.2.74",
|
|
14
18
|
"@oclif/plugin-plugins": "^5",
|
|
19
|
+
"@oclif/plugin-search": "^1.2.38",
|
|
20
|
+
"@oclif/plugin-update": "^4.7.19",
|
|
21
|
+
"@oclif/plugin-version": "^2.2.36",
|
|
22
|
+
"@oclif/plugin-warn-if-update-available": "^3.1.55",
|
|
23
|
+
"@oclif/plugin-which": "^3.2.43",
|
|
15
24
|
"@types/cli-progress": "^3.11.6",
|
|
16
25
|
"axios": "^1.9.0",
|
|
17
26
|
"cli-progress": "^3.12.0",
|
|
@@ -59,8 +68,17 @@
|
|
|
59
68
|
"dirname": "sc",
|
|
60
69
|
"commands": "./dist/commands",
|
|
61
70
|
"plugins": [
|
|
71
|
+
"@oclif/plugin-autocomplete",
|
|
72
|
+
"@oclif/plugin-commands",
|
|
62
73
|
"@oclif/plugin-help",
|
|
63
|
-
"@oclif/plugin-
|
|
74
|
+
"@oclif/plugin-not-found",
|
|
75
|
+
"@oclif/plugin-plugins",
|
|
76
|
+
"@oclif/plugin-search",
|
|
77
|
+
"@oclif/plugin-update",
|
|
78
|
+
"@oclif/plugin-version",
|
|
79
|
+
"@oclif/plugin-warn-if-update-available",
|
|
80
|
+
"@oclif/plugin-which",
|
|
81
|
+
"@dishantlangayan/sc-plugin-queue"
|
|
64
82
|
],
|
|
65
83
|
"topicSeparator": " "
|
|
66
84
|
},
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
export declare enum EnvironmentVariable {
|
|
2
|
-
'SC_ACCESS_TOKEN' = "SC_ACCESS_TOKEN",
|
|
3
|
-
'SC_API_VERSION' = "SC_API_VERSION",
|
|
4
|
-
'SC_BASE_URL' = "SC_BASE_URL"
|
|
5
|
-
}
|
|
6
|
-
export declare const DefaultBaseUrl = "https://api.solace.cloud";
|
|
7
|
-
/**
|
|
8
|
-
* An injectable abstraction on top of `process.env` with various convenience functions
|
|
9
|
-
* for accessing environment variables.
|
|
10
|
-
*/
|
|
11
|
-
export declare class EnvVars {
|
|
12
|
-
private env;
|
|
13
|
-
constructor(env?: NodeJS.ProcessEnv);
|
|
14
|
-
/**
|
|
15
|
-
* Gets a `string` value for a given key.
|
|
16
|
-
*
|
|
17
|
-
* @param key The name of the envar.
|
|
18
|
-
*/
|
|
19
|
-
getString(key: string): string | undefined;
|
|
20
|
-
/**
|
|
21
|
-
* Gets a `string` value for a given key.
|
|
22
|
-
*
|
|
23
|
-
* @param key The name of the envar.
|
|
24
|
-
* @param def A default value.
|
|
25
|
-
*/
|
|
26
|
-
getString(key: string, def: string): string;
|
|
27
|
-
/**
|
|
28
|
-
* Sets a `string` value for a given key, or removes the current value when no value is given.
|
|
29
|
-
*
|
|
30
|
-
* @param key The name of the envar.
|
|
31
|
-
* @param value The value to set.
|
|
32
|
-
*/
|
|
33
|
-
setString(key: string, value: string): void;
|
|
34
|
-
/**
|
|
35
|
-
* Un-sets a value for a given key.
|
|
36
|
-
*
|
|
37
|
-
* @param key The name of the environment variable.
|
|
38
|
-
*/
|
|
39
|
-
unset(key: string): void;
|
|
40
|
-
}
|
|
41
|
-
/**
|
|
42
|
-
* The default `EnvVars` instance, which wraps `process.env`.
|
|
43
|
-
*/
|
|
44
|
-
export declare const envVars: EnvVars;
|
package/dist/config/env-vars.js
DELETED
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
export var EnvironmentVariable;
|
|
2
|
-
(function (EnvironmentVariable) {
|
|
3
|
-
EnvironmentVariable["SC_ACCESS_TOKEN"] = "SC_ACCESS_TOKEN";
|
|
4
|
-
EnvironmentVariable["SC_API_VERSION"] = "SC_API_VERSION";
|
|
5
|
-
EnvironmentVariable["SC_BASE_URL"] = "SC_BASE_URL";
|
|
6
|
-
})(EnvironmentVariable || (EnvironmentVariable = {}));
|
|
7
|
-
export const DefaultBaseUrl = 'https://api.solace.cloud';
|
|
8
|
-
/**
|
|
9
|
-
* An injectable abstraction on top of `process.env` with various convenience functions
|
|
10
|
-
* for accessing environment variables.
|
|
11
|
-
*/
|
|
12
|
-
export class EnvVars {
|
|
13
|
-
env;
|
|
14
|
-
constructor(env = process.env || {}) {
|
|
15
|
-
this.env = env;
|
|
16
|
-
this.env = env;
|
|
17
|
-
}
|
|
18
|
-
// underlying method
|
|
19
|
-
getString(key, def) {
|
|
20
|
-
return this.env[key] ?? def;
|
|
21
|
-
}
|
|
22
|
-
/**
|
|
23
|
-
* Sets a `string` value for a given key, or removes the current value when no value is given.
|
|
24
|
-
*
|
|
25
|
-
* @param key The name of the envar.
|
|
26
|
-
* @param value The value to set.
|
|
27
|
-
*/
|
|
28
|
-
setString(key, value) {
|
|
29
|
-
if (value === '') {
|
|
30
|
-
this.unset(key);
|
|
31
|
-
return;
|
|
32
|
-
}
|
|
33
|
-
this.env[key] = value;
|
|
34
|
-
}
|
|
35
|
-
/**
|
|
36
|
-
* Un-sets a value for a given key.
|
|
37
|
-
*
|
|
38
|
-
* @param key The name of the environment variable.
|
|
39
|
-
*/
|
|
40
|
-
unset(key) {
|
|
41
|
-
delete this.env[key];
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
/**
|
|
45
|
-
* The default `EnvVars` instance, which wraps `process.env`.
|
|
46
|
-
*/
|
|
47
|
-
export const envVars = new EnvVars();
|