@knocklabs/cli 0.1.0-rc.4 → 0.1.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 +172 -77
- package/dist/commands/commit/index.js +6 -3
- package/dist/commands/commit/promote.js +5 -2
- package/dist/commands/knock.js +102 -0
- package/dist/commands/ping.js +2 -4
- package/dist/commands/translation/get.js +128 -0
- package/dist/commands/translation/list.js +57 -9
- package/dist/commands/translation/pull.js +72 -21
- package/dist/commands/translation/push.js +23 -12
- package/dist/commands/translation/validate.js +12 -8
- package/dist/commands/whoami.js +31 -0
- package/dist/commands/workflow/activate.js +19 -8
- package/dist/commands/workflow/get.js +14 -10
- package/dist/commands/workflow/list.js +7 -3
- package/dist/commands/workflow/new.js +4 -5
- package/dist/commands/workflow/pull.js +18 -10
- package/dist/commands/workflow/push.js +60 -47
- package/dist/commands/workflow/run.js +58 -0
- package/dist/commands/workflow/validate.js +52 -48
- package/dist/lib/api-v1.js +32 -5
- package/dist/lib/base-command.js +8 -4
- package/dist/lib/helpers/flag.js +12 -1
- package/dist/lib/helpers/page.js +7 -2
- package/dist/lib/helpers/request.js +1 -1
- package/dist/lib/helpers/ux.js +2 -2
- package/dist/lib/marshal/translation/helpers.js +21 -7
- package/dist/lib/marshal/translation/reader.js +17 -14
- package/dist/lib/marshal/translation/types.js +1 -0
- package/dist/lib/marshal/translation/writer.js +26 -16
- package/dist/lib/marshal/workflow/helpers.js +64 -2
- package/dist/lib/marshal/workflow/reader.js +62 -0
- package/dist/lib/run-context/helpers.js +2 -2
- package/oclif.manifest.json +281 -24
- package/package.json +25 -19
package/oclif.manifest.json
CHANGED
|
@@ -1,22 +1,71 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "0.1.
|
|
2
|
+
"version": "0.1.3",
|
|
3
3
|
"commands": {
|
|
4
|
+
"knock": {
|
|
5
|
+
"id": "knock",
|
|
6
|
+
"strict": true,
|
|
7
|
+
"pluginName": "@knocklabs/cli",
|
|
8
|
+
"pluginAlias": "@knocklabs/cli",
|
|
9
|
+
"pluginType": "core",
|
|
10
|
+
"hidden": true,
|
|
11
|
+
"aliases": [],
|
|
12
|
+
"flags": {
|
|
13
|
+
"service-token": {
|
|
14
|
+
"name": "service-token",
|
|
15
|
+
"type": "option",
|
|
16
|
+
"summary": "The service token to authenticate with.",
|
|
17
|
+
"required": true,
|
|
18
|
+
"multiple": false
|
|
19
|
+
},
|
|
20
|
+
"api-origin": {
|
|
21
|
+
"name": "api-origin",
|
|
22
|
+
"type": "option",
|
|
23
|
+
"hidden": true,
|
|
24
|
+
"required": false,
|
|
25
|
+
"multiple": false
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
"args": {}
|
|
29
|
+
},
|
|
4
30
|
"ping": {
|
|
5
31
|
"id": "ping",
|
|
6
|
-
"
|
|
32
|
+
"strict": true,
|
|
33
|
+
"pluginName": "@knocklabs/cli",
|
|
34
|
+
"pluginAlias": "@knocklabs/cli",
|
|
35
|
+
"pluginType": "core",
|
|
36
|
+
"hidden": true,
|
|
37
|
+
"aliases": [],
|
|
38
|
+
"flags": {
|
|
39
|
+
"service-token": {
|
|
40
|
+
"name": "service-token",
|
|
41
|
+
"type": "option",
|
|
42
|
+
"summary": "The service token to authenticate with.",
|
|
43
|
+
"required": true,
|
|
44
|
+
"multiple": false
|
|
45
|
+
},
|
|
46
|
+
"api-origin": {
|
|
47
|
+
"name": "api-origin",
|
|
48
|
+
"type": "option",
|
|
49
|
+
"hidden": true,
|
|
50
|
+
"required": false,
|
|
51
|
+
"multiple": false
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
"args": {}
|
|
55
|
+
},
|
|
56
|
+
"whoami": {
|
|
57
|
+
"id": "whoami",
|
|
58
|
+
"summary": "Verify the provided service token.",
|
|
7
59
|
"strict": true,
|
|
8
60
|
"pluginName": "@knocklabs/cli",
|
|
9
61
|
"pluginAlias": "@knocklabs/cli",
|
|
10
62
|
"pluginType": "core",
|
|
11
63
|
"aliases": [],
|
|
12
|
-
"examples": [
|
|
13
|
-
"<%= config.bin %> <%= command.id %>"
|
|
14
|
-
],
|
|
15
64
|
"flags": {
|
|
16
65
|
"service-token": {
|
|
17
66
|
"name": "service-token",
|
|
18
67
|
"type": "option",
|
|
19
|
-
"summary": "The service token to authenticate with",
|
|
68
|
+
"summary": "The service token to authenticate with.",
|
|
20
69
|
"required": true,
|
|
21
70
|
"multiple": false
|
|
22
71
|
},
|
|
@@ -26,12 +75,20 @@
|
|
|
26
75
|
"hidden": true,
|
|
27
76
|
"required": false,
|
|
28
77
|
"multiple": false
|
|
78
|
+
},
|
|
79
|
+
"json": {
|
|
80
|
+
"name": "json",
|
|
81
|
+
"type": "boolean",
|
|
82
|
+
"description": "Format output as json.",
|
|
83
|
+
"helpGroup": "GLOBAL",
|
|
84
|
+
"allowNo": false
|
|
29
85
|
}
|
|
30
86
|
},
|
|
31
87
|
"args": {}
|
|
32
88
|
},
|
|
33
89
|
"commit": {
|
|
34
90
|
"id": "commit",
|
|
91
|
+
"summary": "Commit all changes in development environment.",
|
|
35
92
|
"strict": true,
|
|
36
93
|
"pluginName": "@knocklabs/cli",
|
|
37
94
|
"pluginAlias": "@knocklabs/cli",
|
|
@@ -41,7 +98,7 @@
|
|
|
41
98
|
"service-token": {
|
|
42
99
|
"name": "service-token",
|
|
43
100
|
"type": "option",
|
|
44
|
-
"summary": "The service token to authenticate with",
|
|
101
|
+
"summary": "The service token to authenticate with.",
|
|
45
102
|
"required": true,
|
|
46
103
|
"multiple": false
|
|
47
104
|
},
|
|
@@ -55,7 +112,7 @@
|
|
|
55
112
|
"environment": {
|
|
56
113
|
"name": "environment",
|
|
57
114
|
"type": "option",
|
|
58
|
-
"summary": "Committing changes applies to the development environment only, use `commit promote` to promote changes to a
|
|
115
|
+
"summary": "Committing changes applies to the development environment only, use `commit promote` to promote changes to a subsequent environment.",
|
|
59
116
|
"multiple": false,
|
|
60
117
|
"options": [
|
|
61
118
|
"development"
|
|
@@ -66,12 +123,13 @@
|
|
|
66
123
|
"name": "commit-message",
|
|
67
124
|
"type": "option",
|
|
68
125
|
"char": "m",
|
|
69
|
-
"summary": "Use the given value as the commit message",
|
|
126
|
+
"summary": "Use the given value as the commit message.",
|
|
70
127
|
"multiple": false
|
|
71
128
|
},
|
|
72
129
|
"force": {
|
|
73
130
|
"name": "force",
|
|
74
131
|
"type": "boolean",
|
|
132
|
+
"summary": "Remove the confirmation prompt.",
|
|
75
133
|
"allowNo": false
|
|
76
134
|
}
|
|
77
135
|
},
|
|
@@ -79,6 +137,7 @@
|
|
|
79
137
|
},
|
|
80
138
|
"commit:promote": {
|
|
81
139
|
"id": "commit:promote",
|
|
140
|
+
"summary": "Promote all changes to the destination environment.",
|
|
82
141
|
"strict": true,
|
|
83
142
|
"pluginName": "@knocklabs/cli",
|
|
84
143
|
"pluginAlias": "@knocklabs/cli",
|
|
@@ -88,7 +147,7 @@
|
|
|
88
147
|
"service-token": {
|
|
89
148
|
"name": "service-token",
|
|
90
149
|
"type": "option",
|
|
91
|
-
"summary": "The service token to authenticate with",
|
|
150
|
+
"summary": "The service token to authenticate with.",
|
|
92
151
|
"required": true,
|
|
93
152
|
"multiple": false
|
|
94
153
|
},
|
|
@@ -102,20 +161,74 @@
|
|
|
102
161
|
"to": {
|
|
103
162
|
"name": "to",
|
|
104
163
|
"type": "option",
|
|
105
|
-
"summary": "The destination environment to promote changes from the preceding environment",
|
|
164
|
+
"summary": "The destination environment to promote changes from the preceding environment.",
|
|
106
165
|
"required": true,
|
|
107
166
|
"multiple": false
|
|
108
167
|
},
|
|
109
168
|
"force": {
|
|
110
169
|
"name": "force",
|
|
111
170
|
"type": "boolean",
|
|
171
|
+
"summary": "Remove the confirmation prompt.",
|
|
112
172
|
"allowNo": false
|
|
113
173
|
}
|
|
114
174
|
},
|
|
115
175
|
"args": {}
|
|
116
176
|
},
|
|
177
|
+
"translation:get": {
|
|
178
|
+
"id": "translation:get",
|
|
179
|
+
"summary": "Display a single translation from an environment.",
|
|
180
|
+
"strict": true,
|
|
181
|
+
"pluginName": "@knocklabs/cli",
|
|
182
|
+
"pluginAlias": "@knocklabs/cli",
|
|
183
|
+
"pluginType": "core",
|
|
184
|
+
"aliases": [],
|
|
185
|
+
"flags": {
|
|
186
|
+
"service-token": {
|
|
187
|
+
"name": "service-token",
|
|
188
|
+
"type": "option",
|
|
189
|
+
"summary": "The service token to authenticate with.",
|
|
190
|
+
"required": true,
|
|
191
|
+
"multiple": false
|
|
192
|
+
},
|
|
193
|
+
"api-origin": {
|
|
194
|
+
"name": "api-origin",
|
|
195
|
+
"type": "option",
|
|
196
|
+
"hidden": true,
|
|
197
|
+
"required": false,
|
|
198
|
+
"multiple": false
|
|
199
|
+
},
|
|
200
|
+
"environment": {
|
|
201
|
+
"name": "environment",
|
|
202
|
+
"type": "option",
|
|
203
|
+
"summary": "The environment to use.",
|
|
204
|
+
"multiple": false,
|
|
205
|
+
"default": "development"
|
|
206
|
+
},
|
|
207
|
+
"hide-uncommitted-changes": {
|
|
208
|
+
"name": "hide-uncommitted-changes",
|
|
209
|
+
"type": "boolean",
|
|
210
|
+
"summary": "Hide any uncommitted changes.",
|
|
211
|
+
"allowNo": false
|
|
212
|
+
},
|
|
213
|
+
"json": {
|
|
214
|
+
"name": "json",
|
|
215
|
+
"type": "boolean",
|
|
216
|
+
"description": "Format output as json.",
|
|
217
|
+
"helpGroup": "GLOBAL",
|
|
218
|
+
"allowNo": false
|
|
219
|
+
}
|
|
220
|
+
},
|
|
221
|
+
"args": {
|
|
222
|
+
"translationRef": {
|
|
223
|
+
"name": "translationRef",
|
|
224
|
+
"description": "Translation ref is a identifier string that refers to a unique translation.\nIf a translation has no namespace, it is the same as the locale, e.g. `en`.\nIf namespaced, it is formatted as namespace.locale, e.g. `admin.en`.",
|
|
225
|
+
"required": true
|
|
226
|
+
}
|
|
227
|
+
}
|
|
228
|
+
},
|
|
117
229
|
"translation:list": {
|
|
118
230
|
"id": "translation:list",
|
|
231
|
+
"summary": "Display all translations for an environment.",
|
|
119
232
|
"strict": true,
|
|
120
233
|
"pluginName": "@knocklabs/cli",
|
|
121
234
|
"pluginAlias": "@knocklabs/cli",
|
|
@@ -125,7 +238,7 @@
|
|
|
125
238
|
"service-token": {
|
|
126
239
|
"name": "service-token",
|
|
127
240
|
"type": "option",
|
|
128
|
-
"summary": "The service token to authenticate with",
|
|
241
|
+
"summary": "The service token to authenticate with.",
|
|
129
242
|
"required": true,
|
|
130
243
|
"multiple": false
|
|
131
244
|
},
|
|
@@ -139,27 +252,32 @@
|
|
|
139
252
|
"environment": {
|
|
140
253
|
"name": "environment",
|
|
141
254
|
"type": "option",
|
|
255
|
+
"summary": "The environment to use.",
|
|
142
256
|
"multiple": false,
|
|
143
257
|
"default": "development"
|
|
144
258
|
},
|
|
145
259
|
"hide-uncommitted-changes": {
|
|
146
260
|
"name": "hide-uncommitted-changes",
|
|
147
261
|
"type": "boolean",
|
|
262
|
+
"summary": "Hide any uncommitted changes.",
|
|
148
263
|
"allowNo": false
|
|
149
264
|
},
|
|
150
265
|
"after": {
|
|
151
266
|
"name": "after",
|
|
152
267
|
"type": "option",
|
|
268
|
+
"summary": "The cursor after which to fetch the next page.",
|
|
153
269
|
"multiple": false
|
|
154
270
|
},
|
|
155
271
|
"before": {
|
|
156
272
|
"name": "before",
|
|
157
273
|
"type": "option",
|
|
274
|
+
"summary": "The cursor before which to fetch the previous page.",
|
|
158
275
|
"multiple": false
|
|
159
276
|
},
|
|
160
277
|
"limit": {
|
|
161
278
|
"name": "limit",
|
|
162
279
|
"type": "option",
|
|
280
|
+
"summary": "The total number of entries to fetch per page.",
|
|
163
281
|
"multiple": false
|
|
164
282
|
},
|
|
165
283
|
"json": {
|
|
@@ -174,6 +292,7 @@
|
|
|
174
292
|
},
|
|
175
293
|
"translation:pull": {
|
|
176
294
|
"id": "translation:pull",
|
|
295
|
+
"summary": "Pull one or more translations from an environment into a local file system.",
|
|
177
296
|
"strict": true,
|
|
178
297
|
"pluginName": "@knocklabs/cli",
|
|
179
298
|
"pluginAlias": "@knocklabs/cli",
|
|
@@ -183,7 +302,7 @@
|
|
|
183
302
|
"service-token": {
|
|
184
303
|
"name": "service-token",
|
|
185
304
|
"type": "option",
|
|
186
|
-
"summary": "The service token to authenticate with",
|
|
305
|
+
"summary": "The service token to authenticate with.",
|
|
187
306
|
"required": true,
|
|
188
307
|
"multiple": false
|
|
189
308
|
},
|
|
@@ -197,17 +316,20 @@
|
|
|
197
316
|
"environment": {
|
|
198
317
|
"name": "environment",
|
|
199
318
|
"type": "option",
|
|
319
|
+
"summary": "The environment to use.",
|
|
200
320
|
"multiple": false,
|
|
201
321
|
"default": "development"
|
|
202
322
|
},
|
|
203
323
|
"all": {
|
|
204
324
|
"name": "all",
|
|
205
325
|
"type": "boolean",
|
|
326
|
+
"summary": "Whether to pull all translations from the specified environment.",
|
|
206
327
|
"allowNo": false
|
|
207
328
|
},
|
|
208
329
|
"translations-dir": {
|
|
209
330
|
"name": "translations-dir",
|
|
210
331
|
"type": "option",
|
|
332
|
+
"summary": "The target directory path to pull all translations into.",
|
|
211
333
|
"multiple": false,
|
|
212
334
|
"dependsOn": [
|
|
213
335
|
"all"
|
|
@@ -216,18 +338,27 @@
|
|
|
216
338
|
"hide-uncommitted-changes": {
|
|
217
339
|
"name": "hide-uncommitted-changes",
|
|
218
340
|
"type": "boolean",
|
|
341
|
+
"summary": "Hide any uncommitted changes.",
|
|
219
342
|
"allowNo": false
|
|
220
343
|
},
|
|
221
344
|
"force": {
|
|
222
345
|
"name": "force",
|
|
223
346
|
"type": "boolean",
|
|
347
|
+
"summary": "Remove the confirmation prompt.",
|
|
224
348
|
"allowNo": false
|
|
225
349
|
}
|
|
226
350
|
},
|
|
227
|
-
"args": {
|
|
351
|
+
"args": {
|
|
352
|
+
"translationRef": {
|
|
353
|
+
"name": "translationRef",
|
|
354
|
+
"description": "Translation ref is a identifier string that refers to a unique translation.\nIf a translation has no namespace, it is the same as the locale, e.g. `en`.\nIf namespaced, it is formatted as namespace.locale, e.g. `admin.en`.",
|
|
355
|
+
"required": false
|
|
356
|
+
}
|
|
357
|
+
}
|
|
228
358
|
},
|
|
229
359
|
"translation:push": {
|
|
230
360
|
"id": "translation:push",
|
|
361
|
+
"summary": "Push one or more translations from a local file system to Knock.",
|
|
231
362
|
"strict": true,
|
|
232
363
|
"pluginName": "@knocklabs/cli",
|
|
233
364
|
"pluginAlias": "@knocklabs/cli",
|
|
@@ -237,7 +368,7 @@
|
|
|
237
368
|
"service-token": {
|
|
238
369
|
"name": "service-token",
|
|
239
370
|
"type": "option",
|
|
240
|
-
"summary": "The service token to authenticate with",
|
|
371
|
+
"summary": "The service token to authenticate with.",
|
|
241
372
|
"required": true,
|
|
242
373
|
"multiple": false
|
|
243
374
|
},
|
|
@@ -261,11 +392,13 @@
|
|
|
261
392
|
"all": {
|
|
262
393
|
"name": "all",
|
|
263
394
|
"type": "boolean",
|
|
395
|
+
"summary": "Whether to push all translations from the target directory.",
|
|
264
396
|
"allowNo": false
|
|
265
397
|
},
|
|
266
398
|
"translations-dir": {
|
|
267
399
|
"name": "translations-dir",
|
|
268
400
|
"type": "option",
|
|
401
|
+
"summary": "The target directory path to find all translations to push.",
|
|
269
402
|
"multiple": false,
|
|
270
403
|
"dependsOn": [
|
|
271
404
|
"all"
|
|
@@ -291,12 +424,14 @@
|
|
|
291
424
|
"args": {
|
|
292
425
|
"translationRef": {
|
|
293
426
|
"name": "translationRef",
|
|
427
|
+
"description": "Translation ref is a identifier string that refers to a unique translation.\nIf a translation has no namespace, it is the same as the locale, e.g. `en`.\nIf namespaced, it is formatted as namespace.locale, e.g. `admin.en`.",
|
|
294
428
|
"required": false
|
|
295
429
|
}
|
|
296
430
|
}
|
|
297
431
|
},
|
|
298
432
|
"translation:validate": {
|
|
299
433
|
"id": "translation:validate",
|
|
434
|
+
"summary": "Validate one or more translations from a local file system.",
|
|
300
435
|
"strict": true,
|
|
301
436
|
"pluginName": "@knocklabs/cli",
|
|
302
437
|
"pluginAlias": "@knocklabs/cli",
|
|
@@ -306,7 +441,7 @@
|
|
|
306
441
|
"service-token": {
|
|
307
442
|
"name": "service-token",
|
|
308
443
|
"type": "option",
|
|
309
|
-
"summary": "The service token to authenticate with",
|
|
444
|
+
"summary": "The service token to authenticate with.",
|
|
310
445
|
"required": true,
|
|
311
446
|
"multiple": false
|
|
312
447
|
},
|
|
@@ -320,7 +455,7 @@
|
|
|
320
455
|
"environment": {
|
|
321
456
|
"name": "environment",
|
|
322
457
|
"type": "option",
|
|
323
|
-
"summary": "Validating a
|
|
458
|
+
"summary": "Validating a translation is only done in the development environment",
|
|
324
459
|
"multiple": false,
|
|
325
460
|
"options": [
|
|
326
461
|
"development"
|
|
@@ -330,11 +465,13 @@
|
|
|
330
465
|
"all": {
|
|
331
466
|
"name": "all",
|
|
332
467
|
"type": "boolean",
|
|
468
|
+
"summary": "Whether to validate all translations from the target directory.",
|
|
333
469
|
"allowNo": false
|
|
334
470
|
},
|
|
335
471
|
"translations-dir": {
|
|
336
472
|
"name": "translations-dir",
|
|
337
473
|
"type": "option",
|
|
474
|
+
"summary": "The target directory path to find all translations to validate.",
|
|
338
475
|
"multiple": false,
|
|
339
476
|
"dependsOn": [
|
|
340
477
|
"all"
|
|
@@ -344,12 +481,15 @@
|
|
|
344
481
|
"args": {
|
|
345
482
|
"translationRef": {
|
|
346
483
|
"name": "translationRef",
|
|
484
|
+
"description": "Translation ref is a identifier string that refers to a unique translation.\nIf a translation has no namespace, it is the same as the locale, e.g. `en`.\nIf namespaced, it is formatted as namespace.locale, e.g. `admin.en`.",
|
|
347
485
|
"required": false
|
|
348
486
|
}
|
|
349
487
|
}
|
|
350
488
|
},
|
|
351
489
|
"workflow:activate": {
|
|
352
490
|
"id": "workflow:activate",
|
|
491
|
+
"summary": "Activate or deactivate a workflow in a given environment.",
|
|
492
|
+
"description": "This immediately enables or disables a workflow in a given environment without\nneeding to go through environment promotion.\n\nBy default, this command activates a given workflow. Pass in the --status flag\nwith `false` in order to deactivate it.",
|
|
353
493
|
"strict": true,
|
|
354
494
|
"pluginName": "@knocklabs/cli",
|
|
355
495
|
"pluginAlias": "@knocklabs/cli",
|
|
@@ -359,7 +499,7 @@
|
|
|
359
499
|
"service-token": {
|
|
360
500
|
"name": "service-token",
|
|
361
501
|
"type": "option",
|
|
362
|
-
"summary": "The service token to authenticate with",
|
|
502
|
+
"summary": "The service token to authenticate with.",
|
|
363
503
|
"required": true,
|
|
364
504
|
"multiple": false
|
|
365
505
|
},
|
|
@@ -373,12 +513,14 @@
|
|
|
373
513
|
"environment": {
|
|
374
514
|
"name": "environment",
|
|
375
515
|
"type": "option",
|
|
516
|
+
"summary": "The environment to use.",
|
|
376
517
|
"required": true,
|
|
377
518
|
"multiple": false
|
|
378
519
|
},
|
|
379
520
|
"status": {
|
|
380
521
|
"name": "status",
|
|
381
522
|
"type": "option",
|
|
523
|
+
"summary": "The workflow active status to set.",
|
|
382
524
|
"multiple": false,
|
|
383
525
|
"options": [
|
|
384
526
|
"true",
|
|
@@ -389,6 +531,7 @@
|
|
|
389
531
|
"force": {
|
|
390
532
|
"name": "force",
|
|
391
533
|
"type": "boolean",
|
|
534
|
+
"summary": "Remove the confirmation prompt.",
|
|
392
535
|
"allowNo": false
|
|
393
536
|
}
|
|
394
537
|
},
|
|
@@ -401,6 +544,7 @@
|
|
|
401
544
|
},
|
|
402
545
|
"workflow:get": {
|
|
403
546
|
"id": "workflow:get",
|
|
547
|
+
"summary": "Display a single workflow from an environment.",
|
|
404
548
|
"strict": true,
|
|
405
549
|
"pluginName": "@knocklabs/cli",
|
|
406
550
|
"pluginAlias": "@knocklabs/cli",
|
|
@@ -410,7 +554,7 @@
|
|
|
410
554
|
"service-token": {
|
|
411
555
|
"name": "service-token",
|
|
412
556
|
"type": "option",
|
|
413
|
-
"summary": "The service token to authenticate with",
|
|
557
|
+
"summary": "The service token to authenticate with.",
|
|
414
558
|
"required": true,
|
|
415
559
|
"multiple": false
|
|
416
560
|
},
|
|
@@ -424,12 +568,14 @@
|
|
|
424
568
|
"environment": {
|
|
425
569
|
"name": "environment",
|
|
426
570
|
"type": "option",
|
|
571
|
+
"summary": "The environment to use.",
|
|
427
572
|
"multiple": false,
|
|
428
573
|
"default": "development"
|
|
429
574
|
},
|
|
430
575
|
"hide-uncommitted-changes": {
|
|
431
576
|
"name": "hide-uncommitted-changes",
|
|
432
577
|
"type": "boolean",
|
|
578
|
+
"summary": "Hide any uncommitted changes.",
|
|
433
579
|
"allowNo": false
|
|
434
580
|
},
|
|
435
581
|
"json": {
|
|
@@ -449,6 +595,7 @@
|
|
|
449
595
|
},
|
|
450
596
|
"workflow:list": {
|
|
451
597
|
"id": "workflow:list",
|
|
598
|
+
"summary": "Display all workflows for an environment.",
|
|
452
599
|
"strict": true,
|
|
453
600
|
"pluginName": "@knocklabs/cli",
|
|
454
601
|
"pluginAlias": "@knocklabs/cli",
|
|
@@ -458,7 +605,7 @@
|
|
|
458
605
|
"service-token": {
|
|
459
606
|
"name": "service-token",
|
|
460
607
|
"type": "option",
|
|
461
|
-
"summary": "The service token to authenticate with",
|
|
608
|
+
"summary": "The service token to authenticate with.",
|
|
462
609
|
"required": true,
|
|
463
610
|
"multiple": false
|
|
464
611
|
},
|
|
@@ -472,27 +619,32 @@
|
|
|
472
619
|
"environment": {
|
|
473
620
|
"name": "environment",
|
|
474
621
|
"type": "option",
|
|
622
|
+
"summary": "The environment to use.",
|
|
475
623
|
"multiple": false,
|
|
476
624
|
"default": "development"
|
|
477
625
|
},
|
|
478
626
|
"hide-uncommitted-changes": {
|
|
479
627
|
"name": "hide-uncommitted-changes",
|
|
480
628
|
"type": "boolean",
|
|
629
|
+
"summary": "Hide any uncommitted changes.",
|
|
481
630
|
"allowNo": false
|
|
482
631
|
},
|
|
483
632
|
"after": {
|
|
484
633
|
"name": "after",
|
|
485
634
|
"type": "option",
|
|
635
|
+
"summary": "The cursor after which to fetch the next page.",
|
|
486
636
|
"multiple": false
|
|
487
637
|
},
|
|
488
638
|
"before": {
|
|
489
639
|
"name": "before",
|
|
490
640
|
"type": "option",
|
|
641
|
+
"summary": "The cursor before which to fetch the previous page.",
|
|
491
642
|
"multiple": false
|
|
492
643
|
},
|
|
493
644
|
"limit": {
|
|
494
645
|
"name": "limit",
|
|
495
646
|
"type": "option",
|
|
647
|
+
"summary": "The total number of entries to fetch per page.",
|
|
496
648
|
"multiple": false
|
|
497
649
|
},
|
|
498
650
|
"json": {
|
|
@@ -517,7 +669,7 @@
|
|
|
517
669
|
"service-token": {
|
|
518
670
|
"name": "service-token",
|
|
519
671
|
"type": "option",
|
|
520
|
-
"summary": "The service token to authenticate with",
|
|
672
|
+
"summary": "The service token to authenticate with.",
|
|
521
673
|
"required": true,
|
|
522
674
|
"multiple": false
|
|
523
675
|
},
|
|
@@ -551,6 +703,7 @@
|
|
|
551
703
|
},
|
|
552
704
|
"workflow:pull": {
|
|
553
705
|
"id": "workflow:pull",
|
|
706
|
+
"summary": "Pull one or more workflows from an environment into a local file system.",
|
|
554
707
|
"strict": true,
|
|
555
708
|
"pluginName": "@knocklabs/cli",
|
|
556
709
|
"pluginAlias": "@knocklabs/cli",
|
|
@@ -560,7 +713,7 @@
|
|
|
560
713
|
"service-token": {
|
|
561
714
|
"name": "service-token",
|
|
562
715
|
"type": "option",
|
|
563
|
-
"summary": "The service token to authenticate with",
|
|
716
|
+
"summary": "The service token to authenticate with.",
|
|
564
717
|
"required": true,
|
|
565
718
|
"multiple": false
|
|
566
719
|
},
|
|
@@ -574,17 +727,20 @@
|
|
|
574
727
|
"environment": {
|
|
575
728
|
"name": "environment",
|
|
576
729
|
"type": "option",
|
|
730
|
+
"summary": "The environment to use.",
|
|
577
731
|
"multiple": false,
|
|
578
732
|
"default": "development"
|
|
579
733
|
},
|
|
580
734
|
"all": {
|
|
581
735
|
"name": "all",
|
|
582
736
|
"type": "boolean",
|
|
737
|
+
"summary": "Whether to pull all workflows from the specified environment.",
|
|
583
738
|
"allowNo": false
|
|
584
739
|
},
|
|
585
740
|
"workflows-dir": {
|
|
586
741
|
"name": "workflows-dir",
|
|
587
742
|
"type": "option",
|
|
743
|
+
"summary": "The target directory path to pull all workflows into.",
|
|
588
744
|
"multiple": false,
|
|
589
745
|
"dependsOn": [
|
|
590
746
|
"all"
|
|
@@ -593,11 +749,13 @@
|
|
|
593
749
|
"hide-uncommitted-changes": {
|
|
594
750
|
"name": "hide-uncommitted-changes",
|
|
595
751
|
"type": "boolean",
|
|
752
|
+
"summary": "Hide any uncommitted changes.",
|
|
596
753
|
"allowNo": false
|
|
597
754
|
},
|
|
598
755
|
"force": {
|
|
599
756
|
"name": "force",
|
|
600
757
|
"type": "boolean",
|
|
758
|
+
"summary": "Remove the confirmation prompt.",
|
|
601
759
|
"allowNo": false
|
|
602
760
|
}
|
|
603
761
|
},
|
|
@@ -610,6 +768,7 @@
|
|
|
610
768
|
},
|
|
611
769
|
"workflow:push": {
|
|
612
770
|
"id": "workflow:push",
|
|
771
|
+
"summary": "Push one or more workflows from a local file system to Knock.",
|
|
613
772
|
"strict": true,
|
|
614
773
|
"pluginName": "@knocklabs/cli",
|
|
615
774
|
"pluginAlias": "@knocklabs/cli",
|
|
@@ -619,7 +778,7 @@
|
|
|
619
778
|
"service-token": {
|
|
620
779
|
"name": "service-token",
|
|
621
780
|
"type": "option",
|
|
622
|
-
"summary": "The service token to authenticate with",
|
|
781
|
+
"summary": "The service token to authenticate with.",
|
|
623
782
|
"required": true,
|
|
624
783
|
"multiple": false
|
|
625
784
|
},
|
|
@@ -640,6 +799,21 @@
|
|
|
640
799
|
],
|
|
641
800
|
"default": "development"
|
|
642
801
|
},
|
|
802
|
+
"all": {
|
|
803
|
+
"name": "all",
|
|
804
|
+
"type": "boolean",
|
|
805
|
+
"summary": "Whether to push all workflows from the target directory.",
|
|
806
|
+
"allowNo": false
|
|
807
|
+
},
|
|
808
|
+
"workflows-dir": {
|
|
809
|
+
"name": "workflows-dir",
|
|
810
|
+
"type": "option",
|
|
811
|
+
"summary": "The target directory path to find all workflows to push.",
|
|
812
|
+
"multiple": false,
|
|
813
|
+
"dependsOn": [
|
|
814
|
+
"all"
|
|
815
|
+
]
|
|
816
|
+
},
|
|
643
817
|
"commit": {
|
|
644
818
|
"name": "commit",
|
|
645
819
|
"type": "boolean",
|
|
@@ -664,8 +838,76 @@
|
|
|
664
838
|
}
|
|
665
839
|
}
|
|
666
840
|
},
|
|
841
|
+
"workflow:run": {
|
|
842
|
+
"id": "workflow:run",
|
|
843
|
+
"summary": "Test run a workflow using the latest version from Knock, or a local workflow directory.",
|
|
844
|
+
"strict": true,
|
|
845
|
+
"pluginName": "@knocklabs/cli",
|
|
846
|
+
"pluginAlias": "@knocklabs/cli",
|
|
847
|
+
"pluginType": "core",
|
|
848
|
+
"aliases": [],
|
|
849
|
+
"flags": {
|
|
850
|
+
"service-token": {
|
|
851
|
+
"name": "service-token",
|
|
852
|
+
"type": "option",
|
|
853
|
+
"summary": "The service token to authenticate with.",
|
|
854
|
+
"required": true,
|
|
855
|
+
"multiple": false
|
|
856
|
+
},
|
|
857
|
+
"api-origin": {
|
|
858
|
+
"name": "api-origin",
|
|
859
|
+
"type": "option",
|
|
860
|
+
"hidden": true,
|
|
861
|
+
"required": false,
|
|
862
|
+
"multiple": false
|
|
863
|
+
},
|
|
864
|
+
"environment": {
|
|
865
|
+
"name": "environment",
|
|
866
|
+
"type": "option",
|
|
867
|
+
"summary": "The environment in which to run the workflow",
|
|
868
|
+
"multiple": false,
|
|
869
|
+
"default": "development"
|
|
870
|
+
},
|
|
871
|
+
"recipients": {
|
|
872
|
+
"name": "recipients",
|
|
873
|
+
"type": "option",
|
|
874
|
+
"summary": "One or more recipient ids for this workflow run, separated by comma.",
|
|
875
|
+
"required": true,
|
|
876
|
+
"multiple": true,
|
|
877
|
+
"aliases": [
|
|
878
|
+
"recipient"
|
|
879
|
+
],
|
|
880
|
+
"delimiter": ","
|
|
881
|
+
},
|
|
882
|
+
"actor": {
|
|
883
|
+
"name": "actor",
|
|
884
|
+
"type": "option",
|
|
885
|
+
"summary": "An actor id for the workflow run.",
|
|
886
|
+
"multiple": false
|
|
887
|
+
},
|
|
888
|
+
"tenant": {
|
|
889
|
+
"name": "tenant",
|
|
890
|
+
"type": "option",
|
|
891
|
+
"summary": "A tenant id for the workflow run.",
|
|
892
|
+
"multiple": false
|
|
893
|
+
},
|
|
894
|
+
"data": {
|
|
895
|
+
"name": "data",
|
|
896
|
+
"type": "option",
|
|
897
|
+
"summary": "A JSON string of the data for this workflow",
|
|
898
|
+
"multiple": false
|
|
899
|
+
}
|
|
900
|
+
},
|
|
901
|
+
"args": {
|
|
902
|
+
"workflowKey": {
|
|
903
|
+
"name": "workflowKey",
|
|
904
|
+
"required": true
|
|
905
|
+
}
|
|
906
|
+
}
|
|
907
|
+
},
|
|
667
908
|
"workflow:validate": {
|
|
668
909
|
"id": "workflow:validate",
|
|
910
|
+
"summary": "Validate one or more workflows from a local file system.",
|
|
669
911
|
"strict": true,
|
|
670
912
|
"pluginName": "@knocklabs/cli",
|
|
671
913
|
"pluginAlias": "@knocklabs/cli",
|
|
@@ -675,7 +917,7 @@
|
|
|
675
917
|
"service-token": {
|
|
676
918
|
"name": "service-token",
|
|
677
919
|
"type": "option",
|
|
678
|
-
"summary": "The service token to authenticate with",
|
|
920
|
+
"summary": "The service token to authenticate with.",
|
|
679
921
|
"required": true,
|
|
680
922
|
"multiple": false
|
|
681
923
|
},
|
|
@@ -695,6 +937,21 @@
|
|
|
695
937
|
"development"
|
|
696
938
|
],
|
|
697
939
|
"default": "development"
|
|
940
|
+
},
|
|
941
|
+
"all": {
|
|
942
|
+
"name": "all",
|
|
943
|
+
"type": "boolean",
|
|
944
|
+
"summary": "Whether to validate all workflows from the target directory.",
|
|
945
|
+
"allowNo": false
|
|
946
|
+
},
|
|
947
|
+
"workflows-dir": {
|
|
948
|
+
"name": "workflows-dir",
|
|
949
|
+
"type": "option",
|
|
950
|
+
"summary": "The target directory path to find all workflows to validate.",
|
|
951
|
+
"multiple": false,
|
|
952
|
+
"dependsOn": [
|
|
953
|
+
"all"
|
|
954
|
+
]
|
|
698
955
|
}
|
|
699
956
|
},
|
|
700
957
|
"args": {
|