stepzen 0.27.0 → 0.28.0-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (91) hide show
  1. package/README.md +159 -102
  2. package/bin/dev +17 -0
  3. package/bin/dev.cmd +3 -0
  4. package/bin/run +4 -4
  5. package/lib/commands/deploy.d.ts +7 -8
  6. package/lib/commands/deploy.d.ts.map +1 -1
  7. package/lib/commands/deploy.js +7 -8
  8. package/lib/commands/deploy.js.map +1 -1
  9. package/lib/commands/import.d.ts +38 -52
  10. package/lib/commands/import.d.ts.map +1 -1
  11. package/lib/commands/import.js +43 -40
  12. package/lib/commands/import.js.map +1 -1
  13. package/lib/commands/init.d.ts +4 -5
  14. package/lib/commands/init.d.ts.map +1 -1
  15. package/lib/commands/init.js +4 -4
  16. package/lib/commands/init.js.map +1 -1
  17. package/lib/commands/lint.d.ts +3 -4
  18. package/lib/commands/lint.d.ts.map +1 -1
  19. package/lib/commands/lint.js +3 -3
  20. package/lib/commands/lint.js.map +1 -1
  21. package/lib/commands/list.d.ts +2 -2
  22. package/lib/commands/list.js +2 -2
  23. package/lib/commands/list.js.map +1 -1
  24. package/lib/commands/login.d.ts +6 -7
  25. package/lib/commands/login.d.ts.map +1 -1
  26. package/lib/commands/login.js +5 -6
  27. package/lib/commands/login.js.map +1 -1
  28. package/lib/commands/logout.d.ts +2 -2
  29. package/lib/commands/request.d.ts +8 -9
  30. package/lib/commands/request.d.ts.map +1 -1
  31. package/lib/commands/request.js +9 -9
  32. package/lib/commands/request.js.map +1 -1
  33. package/lib/commands/service.d.ts +10 -11
  34. package/lib/commands/service.d.ts.map +1 -1
  35. package/lib/commands/service.js +6 -7
  36. package/lib/commands/service.js.map +1 -1
  37. package/lib/commands/start.d.ts +13 -14
  38. package/lib/commands/start.d.ts.map +1 -1
  39. package/lib/commands/start.js +11 -12
  40. package/lib/commands/start.js.map +1 -1
  41. package/lib/commands/transpile.d.ts +8 -9
  42. package/lib/commands/transpile.d.ts.map +1 -1
  43. package/lib/commands/transpile.js +11 -11
  44. package/lib/commands/transpile.js.map +1 -1
  45. package/lib/commands/upload.d.ts +5 -6
  46. package/lib/commands/upload.d.ts.map +1 -1
  47. package/lib/commands/upload.js +6 -6
  48. package/lib/commands/upload.js.map +1 -1
  49. package/lib/commands/validate.d.ts +2 -2
  50. package/lib/commands/validate.d.ts.map +1 -1
  51. package/lib/commands/validate.js +3 -3
  52. package/lib/commands/validate.js.map +1 -1
  53. package/lib/commands/whoami.d.ts +7 -7
  54. package/lib/commands/whoami.js +7 -7
  55. package/lib/commands/whoami.js.map +1 -1
  56. package/lib/generate/helpers.js +5 -5
  57. package/lib/generate/helpers.js.map +1 -1
  58. package/lib/hooks/init/version.d.ts +1 -1
  59. package/lib/hooks/init/version.d.ts.map +1 -1
  60. package/lib/hooks/init/version.js +17 -12
  61. package/lib/hooks/init/version.js.map +1 -1
  62. package/lib/hooks/prerun/check-upgrade.d.ts +1 -1
  63. package/lib/hooks/prerun/check-upgrade.d.ts.map +1 -1
  64. package/lib/hooks/prerun/check-upgrade.js +14 -15
  65. package/lib/hooks/prerun/check-upgrade.js.map +1 -1
  66. package/lib/hooks/prerun/ensure-config-file.d.ts +1 -1
  67. package/lib/hooks/prerun/ensure-config-file.d.ts.map +1 -1
  68. package/lib/hooks/prerun/ensure-permissions.d.ts +1 -1
  69. package/lib/hooks/prerun/ensure-permissions.d.ts.map +1 -1
  70. package/lib/index.d.ts +1 -1
  71. package/lib/index.d.ts.map +1 -1
  72. package/lib/index.js +2 -2
  73. package/lib/index.js.map +1 -1
  74. package/lib/shared/configuration.js +1 -1
  75. package/lib/shared/configuration.js.map +1 -1
  76. package/lib/shared/stepzen-sdk.js +1 -1
  77. package/lib/shared/stepzen-sdk.js.map +1 -1
  78. package/lib/shared/types.d.ts +2 -2
  79. package/lib/shared/types.d.ts.map +1 -1
  80. package/lib/shared/utils.js +1 -1
  81. package/lib/shared/utils.js.map +1 -1
  82. package/lib/shared/validation.js +1 -1
  83. package/lib/shared/validation.js.map +1 -1
  84. package/lib/shared/workspace.js +1 -1
  85. package/lib/shared/workspace.js.map +1 -1
  86. package/lib/shared/zen-command.d.ts +4 -3
  87. package/lib/shared/zen-command.d.ts.map +1 -1
  88. package/lib/shared/zen-command.js +13 -6
  89. package/lib/shared/zen-command.js.map +1 -1
  90. package/oclif.manifest.json +1 -1
  91. package/package.json +42 -46
package/README.md CHANGED
@@ -29,8 +29,8 @@ To verify your CLI installation, use the `stepzen --version` command:
29
29
  $ npm install -g stepzen
30
30
  $ stepzen COMMAND
31
31
  running command...
32
- $ stepzen (-v|--version|version)
33
- stepzen/0.27.0 linux-x64 node-v14.21.2
32
+ $ stepzen (--version|-v)
33
+ stepzen/0.28.0-beta.1 linux-x64 node-v14.21.2
34
34
  $ stepzen --help [COMMAND]
35
35
  USAGE
36
36
  $ stepzen COMMAND
@@ -60,6 +60,7 @@ $ stepzen deploy ENDPOINT --schema=schema [--configurationsets=cs1[,cs2[,..]]]`]
60
60
  * [`stepzen service [ACTION]`](#stepzen-service-action)
61
61
  * [`stepzen start`](#stepzen-start)
62
62
  * [`stepzen upload TYPE DESTINATION`](#stepzen-upload-type-destination)
63
+ * [`stepzen version`](#stepzen-version)
63
64
  * [`stepzen whoami`](#stepzen-whoami)
64
65
 
65
66
  ## `stepzen deploy [ENDPOINT] [--config=path/to/config.yaml] [--dir=path/to/workspace]
@@ -76,20 +77,21 @@ USAGE
76
77
 
77
78
  -- OR (deprecated) --
78
79
 
79
- $ stepzen deploy ENDPOINT --schema=schema [--configurationsets=cs1[,cs2[,..]]]
80
+ $
81
+ stepzen deploy ENDPOINT --schema=schema [--configurationsets=cs1[,cs2[,..]]]
80
82
 
81
83
  ARGUMENTS
82
84
  ENDPOINT name of the endpoint (e.g. api/customers)
83
85
  [default: use the endpoint property from stepzen.config.json]
84
86
 
85
- OPTIONS
87
+ FLAGS
86
88
  -h, --help
87
89
  Show CLI help
88
90
 
89
91
  --config=path/to/config.yaml
90
92
  [default: config.yaml] Configuration file to use (relative to the current directory)
91
93
 
92
- --configurationsets=configurationsets
94
+ --configurationsets=<value>
93
95
  Name(s) of configuration sets uploaded earlier with stepzen upload
94
96
  [DEPRECATED: this flag will be removed in future versions]
95
97
 
@@ -99,10 +101,10 @@ OPTIONS
99
101
  - stepzen deploy --config path/to/config.yaml
100
102
  to explicitly specify the configuration file
101
103
 
102
- --dir=dir
104
+ --dir=<value>
103
105
  Working directory
104
106
 
105
- --schema=schema
107
+ --schema=<value>
106
108
  Name of a schema uploaded earlier with stepzen upload
107
109
  [DEPRECATED: this flag will be removed in future versions]
108
110
 
@@ -113,6 +115,9 @@ OPTIONS
113
115
  to deploy from a StepZen workspace in another folder
114
116
 
115
117
  --silent
118
+
119
+ DESCRIPTION
120
+ Deploy to StepZen.
116
121
  ```
117
122
 
118
123
  ## `stepzen help [COMMAND]`
@@ -121,16 +126,19 @@ Display help for stepzen.
121
126
 
122
127
  ```
123
128
  USAGE
124
- $ stepzen help [COMMAND]
129
+ $ stepzen help [COMMAND] [-n]
125
130
 
126
131
  ARGUMENTS
127
132
  COMMAND Command to show help for.
128
133
 
129
- OPTIONS
134
+ FLAGS
130
135
  -n, --nested-commands Include all nested commands in the output.
136
+
137
+ DESCRIPTION
138
+ Display help for stepzen.
131
139
  ```
132
140
 
133
- _See code: [@oclif/plugin-help](https://github.com/oclif/plugin-help/blob/v5.1.12/src/commands/help.ts)_
141
+ _See code: [@oclif/plugin-help](https://github.com/oclif/plugin-help/blob/v5.1.23/src/commands/help.ts)_
134
142
 
135
143
  ## `stepzen import curl [[CURLOPTS] URL] [--prefix=PREFIX] [--header=HEADER] [--header-param=HEADER-PARAM] [--query-name=QUERY-NAME] [--query-type=QUERY-TYPE] [--path-params=PATH-PARAMS]`
136
144
 
@@ -138,24 +146,25 @@ Import a schema for an external data source or an API endpoint to your GraphQL A
138
146
 
139
147
  ```
140
148
  USAGE
141
- $ stepzen import curl [[CURLOPTS] URL] [--prefix=PREFIX] [--header=HEADER] [--header-param=HEADER-PARAM]
142
- [--query-name=QUERY-NAME] [--query-type=QUERY-TYPE] [--path-params=PATH-PARAMS]
149
+ $ stepzen import curl [[CURLOPTS] URL] [--prefix=PREFIX] [--header=HEADER] [--header-param=HEADER-PARAM]
150
+ [--query-name=QUERY-NAME] [--query-type=QUERY-TYPE] [--path-params=PATH-PARAMS]
143
151
  $ stepzen import graphql [URL] [--prefix=PREFIX] [--header=HEADER] [--header-param=HEADER-PARAM]
144
- $ stepzen import mysql [--db-host=DB-HOST] [--db-user=DB-USER] [--db-password=DB-PASSWORD] [--db-database=DB-DATABASE]
145
- [--db-link-types] [--db-include=DB-INCLUDE]
152
+ $ stepzen import mysql [--db-host=DB-HOST] [--db-user=DB-USER] [--db-password=DB-PASSWORD]
153
+ [--db-database=DB-DATABASE] [--db-link-types] [--db-include=DB-INCLUDE]
146
154
  $ stepzen import mysql://[USER:PASSWORD@]HOST[:PORT][/DATABASE] [--db-link-types] [--db-include=DB-INCLUDE]
147
- $ stepzen import postgresql [--db-host=DB-HOST] [--db-user=DB-USER] [--db-password=DB-PASSWORD]
148
- [--db-database=DB-DATABASE] [--db-link-types] [--db-include=DB-INCLUDE] [--db-schema=DB-SCHEMA]
149
- $ stepzen import postgresql://[USER:PASSWORD@]HOST[:PORT][/DATABASE] [--db-link-types] [--db-include=DB-INCLUDE]
150
- [--db-schema=DB-SCHEMA]
151
- $ stepzen import snowflake [--db-user=DB-USER] [--db-password=DB-PASSWORD] [--db-database=DB-DATABASE]
152
- [--db-link-types] [--db-include=DB-INCLUDE] [--db-schema=DB-SCHEMA] [--snowflake-account-id=SNOWFLAKE-ACCOUNT-ID]
153
- [--snowflake-warehouse=SNOWFLAKE-WAREHOUSE]
154
- $ stepzen import snowflake://[USER[:PASSWORD]@]ACCOUNT_IDENTIFIER[/DATABASE][?schema=<SCHEMA>[&warehouse=<WAREHOUSE>]]
155
- [--db-link-types] [--db-include=DB-INCLUDE]
156
-
157
- OPTIONS
158
- -H, --header=header
155
+ $ stepzen import postgresql [--db-host=DB-HOST] [--db-user=DB-USER] [--db-password=DB-PASSWORD]
156
+ [--db-database=DB-DATABASE] [--db-link-types] [--db-include=DB-INCLUDE] [--db-schema=DB-SCHEMA]
157
+ $ stepzen import postgresql://[USER:PASSWORD@]HOST[:PORT][/DATABASE] [--db-link-types] [--db-include=DB-INCLUDE]
158
+ [--db-schema=DB-SCHEMA]
159
+ $ stepzen import snowflake [--db-user=DB-USER] [--db-password=DB-PASSWORD] [--db-database=DB-DATABASE]
160
+ [--db-link-types] [--db-include=DB-INCLUDE] [--db-schema=DB-SCHEMA] [--snowflake-account-id=SNOWFLAKE-ACCOUNT-ID]
161
+ [--snowflake-warehouse=SNOWFLAKE-WAREHOUSE]
162
+ $ stepzen import
163
+ snowflake://[USER[:PASSWORD]@]ACCOUNT_IDENTIFIER[/DATABASE][?schema=<SCHEMA>[&warehouse=<WAREHOUSE>]]
164
+ [--db-link-types] [--db-include=DB-INCLUDE]
165
+
166
+ FLAGS
167
+ -H, --header=<value>...
159
168
  [curl, graphql] Specifies a request header to pass
160
169
 
161
170
  Example:
@@ -165,24 +174,25 @@ OPTIONS
165
174
  -h, --help
166
175
  Show CLI help
167
176
 
168
- --db-database=db-database
177
+ --db-database=<value>
169
178
  [mysql, postgresql, snowflake] Name of database to import
170
179
 
171
- --db-host=db-host
180
+ --db-host=<value>
172
181
  [mysql, postgresql] Database host and optional port (as HOST[:PORT])
173
182
 
174
- --db-include=tables-only|views-only|tables-and-views
183
+ --db-include=<option>
175
184
  [mysql, postgresql, snowflake] Should the generated GraphQL schema be based only on database views, only on tables
176
185
  or on both
186
+ <options: tables-only|views-only|tables-and-views>
177
187
 
178
188
  --db-link-types
179
189
  [mysql, postgresql, snowflake] Automatically link types based on foreign key relationships using @materializer
180
190
  (https://stepzen.com/docs/features/linking-types)
181
191
 
182
- --db-password=db-password
192
+ --db-password=<value>
183
193
  [mysql, postgresql, snowflake] Database password
184
194
 
185
- --db-schema=db-schema
195
+ --db-schema=<value>
186
196
  [postgresql, snowflake] Database schema to import tables from (default: public)
187
197
 
188
198
  --db-use-deprecated-2022-naming
@@ -194,13 +204,13 @@ OPTIONS
194
204
  - the generated type and property names match exactly the DB table and column names
195
205
  - the generated field names use the customer and customerList style.
196
206
 
197
- --db-user=db-user
207
+ --db-user=<value>
198
208
  [mysql, postgresql, snowflake] Database user name
199
209
 
200
- --dir=dir
210
+ --dir=<value>
201
211
  Working directory
202
212
 
203
- --header-param=header-param
213
+ --header-param=<value>...
204
214
  [curl, graphql] Specifies a parameter in a header value. Can be formed by taking a -H, --header flag and replacing
205
215
  the variable part of the header value with a $paramName placeholder. Repeat this flag once for each header with a
206
216
  parameter.
@@ -210,33 +220,36 @@ OPTIONS
210
220
  -H "Authorization: apikey SecretAPIKeyValue" \
211
221
  --header-param 'Authorization: apikey $apikey'
212
222
 
213
- --name=name
223
+ --name=<value>
214
224
  Subfolder inside the workspace folder to save the imported schema files to. Defaults to the name of the imported
215
225
  schema.
216
226
 
217
- --path-params=path-params
227
+ --path-params=<value>
218
228
  [curl] Specifies path parameters in the URL path. Can be formed by taking the original path and replacing the
219
229
  variable segments with $paramName placeholders.
220
230
 
221
231
  Example:
222
232
  stepzen import curl https://example.com/users/jane/posts/12 --path-params '/users/$userId/posts/$postId'
223
233
 
224
- --prefix=prefix
234
+ --prefix=<value>
225
235
  [curl, graphql] Prefix to add to every type in the generated schema
226
236
 
227
- --query-name=query-name
237
+ --query-name=<value>
228
238
  [curl] [curl] Property name to add to the Query type as a way to access the imported endpoint
229
239
 
230
- --query-type=query-type
240
+ --query-type=<value>
231
241
  [curl] Name for the type returned by the curl request in the generated schema. The name specified by --query-type is
232
242
  not prefixed by --prefix if both flags are present.
233
243
 
234
- --snowflake-account-id=snowflake-account-id
244
+ --snowflake-account-id=<value>
235
245
  [snowflake] Snowflake account identifier in the orgname-accountname format. For more information, see the Snowflake
236
246
  documentation at https://docs.snowflake.com/en/user-guide/admin-account-identifier.html.
237
247
 
238
- --snowflake-warehouse=snowflake-warehouse
248
+ --snowflake-warehouse=<value>
239
249
  [snowflake] Snowflake warehouse
250
+
251
+ DESCRIPTION
252
+ Import a schema for an external data source or an API endpoint to your GraphQL API.
240
253
  ```
241
254
 
242
255
  ## `stepzen init`
@@ -245,10 +258,13 @@ Initialize a StepZen workspace in the current directory.
245
258
 
246
259
  ```
247
260
  USAGE
248
- $ stepzen init
261
+ $ stepzen init [DIRECTORY] [-h]
249
262
 
250
- OPTIONS
263
+ FLAGS
251
264
  -h, --help Show CLI help
265
+
266
+ DESCRIPTION
267
+ Initialize a StepZen workspace in the current directory.
252
268
  ```
253
269
 
254
270
  ## `stepzen list [TYPE]`
@@ -257,7 +273,7 @@ List endpoints, schemas and configuration sets in your StepZen account.
257
273
 
258
274
  ```
259
275
  USAGE
260
- $ stepzen list [TYPE]
276
+ $ stepzen list [TYPE] [-h]
261
277
 
262
278
  ARGUMENTS
263
279
  TYPE
@@ -268,8 +284,11 @@ ARGUMENTS
268
284
  schemas [DEPRECATED] - StepZen schemas uploaded with stepzen upload (or stepzen start)
269
285
  configurationsets [DEPRECATED] - StepZen configuration sets uploaded with stepzen upload (or stepzen start)
270
286
 
271
- OPTIONS
287
+ FLAGS
272
288
  -h, --help Show CLI help
289
+
290
+ DESCRIPTION
291
+ List endpoints, schemas and configuration sets in your StepZen account.
273
292
  ```
274
293
 
275
294
  ## `stepzen login`
@@ -278,20 +297,20 @@ Log in to StepZen.
278
297
 
279
298
  ```
280
299
  USAGE
281
- $ stepzen login
300
+ $ stepzen login [-h] [-a <value> | | --public] [-k <value> | | ]
301
+
302
+ FLAGS
303
+ -a, --account=<value> StepZen account name (copy from https://stepzen.com/account). If not provided, the CLI prompts
304
+ the users to enter one.
305
+ -h, --help Show CLI help
306
+ -k, --adminkey=<value> Admin key (copy from https://stepzen.com/account) If not provided, the CLI prompts the users
307
+ to enter one.
308
+ --public Create a public anonymous StepZen account and use it. This is handy for trying StepZen out,
309
+ but it not suitable for handling private data as all endpoints created with a public account
310
+ will be public.
282
311
 
283
- OPTIONS
284
- -a, --account=account StepZen account name (copy from https://stepzen.com/account). If not provided, the CLI
285
- prompts the users to enter one.
286
-
287
- -h, --help Show CLI help
288
-
289
- -k, --adminkey=adminkey Admin key (copy from https://stepzen.com/account) If not provided, the CLI prompts the users
290
- to enter one.
291
-
292
- --public Create a public anonymous StepZen account and use it. This is handy for trying StepZen out,
293
- but it not suitable for handling private data as all endpoints created with a public account
294
- will be public.
312
+ DESCRIPTION
313
+ Log in to StepZen.
295
314
  ```
296
315
 
297
316
  ## `stepzen logout`
@@ -300,10 +319,13 @@ Log out of StepZen.
300
319
 
301
320
  ```
302
321
  USAGE
303
- $ stepzen logout
322
+ $ stepzen logout [-h]
304
323
 
305
- OPTIONS
324
+ FLAGS
306
325
  -h, --help Show CLI help
326
+
327
+ DESCRIPTION
328
+ Log out of StepZen.
307
329
  ```
308
330
 
309
331
  ## `stepzen request QUERY`
@@ -312,13 +334,14 @@ Send a GraphQL request to a StepZen endpoint and print the response, using the A
312
334
 
313
335
  ```
314
336
  USAGE
315
- $ stepzen request QUERY
337
+ $ stepzen request [QUERY] [-h] [--dir <value> | --endpoint <value>] [-H <value>] [--operation-name <value>]
338
+ [--var <value>] [--var-file <value>]
316
339
 
317
340
  ARGUMENTS
318
341
  QUERY GraphQL query (could include a query, a mutation or a subscription)
319
342
 
320
- OPTIONS
321
- -H, --header=header
343
+ FLAGS
344
+ -H, --header=<value>...
322
345
  Add an additional HTTP header to the request. This is useful for schemas where @rest or @graphql directives enable
323
346
  header forwarding with forwardheaders.
324
347
 
@@ -332,16 +355,16 @@ OPTIONS
332
355
  -h, --help
333
356
  Show CLI help
334
357
 
335
- --dir=dir
358
+ --dir=<value>
336
359
  StepZen workspace directory (defaults to the current directory)
337
360
 
338
- --endpoint=endpoint
361
+ --endpoint=<value>
339
362
  StepZen endpoint to call (defaults to the endpoint in current StepZen workspace)
340
363
 
341
- --operation-name=operation-name
364
+ --operation-name=<value>
342
365
  Specify the operation name (in case if the provided query includes multiple operations)
343
366
 
344
- --var=var
367
+ --var=<value>...
345
368
  Add a request variable, in the name=value format.
346
369
 
347
370
  Example:
@@ -351,7 +374,7 @@ OPTIONS
351
374
  --var 'search=space ninja' \
352
375
  --var limit=5
353
376
 
354
- --var-file=var-file
377
+ --var-file=<value>
355
378
  Read request variables from a JSON file. In case when the same variable value is provided both via --var-file and
356
379
  --var, the priority is given to the latter.
357
380
 
@@ -360,6 +383,10 @@ OPTIONS
360
383
  orders(search: $search, limit: $limit) { id createdAt }
361
384
  }' \
362
385
  --var-file ./vars.json
386
+
387
+ DESCRIPTION
388
+ Send a GraphQL request to a StepZen endpoint and print the response, using the API key and the target endpoint from
389
+ the current StepZen workspace.
363
390
  ```
364
391
 
365
392
  ## `stepzen service [ACTION]`
@@ -368,7 +395,7 @@ Manage the local StepZen service instance (requires Docker).
368
395
 
369
396
  ```
370
397
  USAGE
371
- $ stepzen service [ACTION]
398
+ $ stepzen service [ACTION] [-h] [--dsn <value> | --reset-auto | --prompt] [--port <value>]
372
399
 
373
400
  ARGUMENTS
374
401
  ACTION
@@ -390,25 +417,23 @@ ARGUMENTS
390
417
 
391
418
  If no action is provided, print the service status and exit.
392
419
 
393
- OPTIONS
394
- -h, --help Show CLI help
395
- --dsn=dsn DSN of a StepZen metadata database, e.g. postgres://user:password@172.17.0.1:5432/zenctl
396
-
397
- --port=port Override the TCP port on which the local StepZen service instance will listen for connections (port 9000
398
- by default).
399
-
400
- --prompt Opens an interactive prompt to ask for database details (or fails, if running in a non-interactive
401
- mode).
402
-
403
- --reset-auto Create fresh empty metadata database. Note: all existing endpoints will be deleted and you will be
404
- logged out.
420
+ FLAGS
421
+ -h, --help Show CLI help
422
+ --dsn=<value> DSN of a StepZen metadata database, e.g. postgres://user:password@172.17.0.1:5432/zenctl
423
+ --port=<value> Override the TCP port on which the local StepZen service instance will listen for connections (port
424
+ 9000 by default).
425
+ --prompt Opens an interactive prompt to ask for database details (or fails, if running in a non-interactive
426
+ mode).
427
+ --reset-auto Create fresh empty metadata database. Note: all existing endpoints will be deleted and you will be
428
+ logged out.
405
429
 
406
430
  DESCRIPTION
407
- You can use a local StepZen service instance instead of the StepZen cloud to develop and test GraphQL endpoints
408
- locally. This way you can try StepZen out without giving the StepZen cloud access to your data sources and API
431
+ Manage the local StepZen service instance (requires Docker).
432
+ You can use a local StepZen service instance instead of the StepZen cloud to develop and test GraphQL endpoints
433
+ locally. This way you can try StepZen out without giving the StepZen cloud access to your data sources and API
409
434
  endpoints.
410
435
 
411
- Local StepZen service instances are not suitable for production use. Please refer to the documentation at
436
+ Local StepZen service instances are not suitable for production use. Please refer to the documentation at
412
437
  https://stepzen.com/docs/deployment/local-docker for more information and examples.
413
438
  ```
414
439
 
@@ -418,22 +443,30 @@ Deploy your schema to StepZen, and then redeploy on every change.
418
443
 
419
444
  ```
420
445
  USAGE
421
- $ stepzen start
446
+ $ stepzen start [-h] [--dir <value>] [--endpoint <value>] [--dashboard web|local|none] [--port <value>]
447
+
448
+ FLAGS
449
+ -h, --help
450
+ Show CLI help
422
451
 
423
- OPTIONS
424
- -h, --help Show CLI help
452
+ --dashboard=<option>
453
+ Which GraphiQL dashboard to use to explore the deployed endpoint.
454
+ - web [default]: use GraphiQL at dashboard.stepzen.com
455
+ - local: start a local GraphiQL dashboard on localhost:5001 (change the port with the --port flag)
456
+ - none: do not use GraphiQL at all
457
+ <options: web|local|none>
425
458
 
426
- --dashboard=web|local|none Which GraphiQL dashboard to use to explore the deployed endpoint.
427
- - web [default]: use GraphiQL at dashboard.stepzen.com
428
- - local: start a local GraphiQL dashboard on localhost:5001 (change the port with the
429
- --port flag)
430
- - none: do not use GraphiQL at all
459
+ --dir=<value>
460
+ Working directory
431
461
 
432
- --dir=dir Working directory
462
+ --endpoint=<value>
463
+ Override workspace endpoint
433
464
 
434
- --endpoint=endpoint Override workspace endpoint
465
+ --port=<value>
466
+ [default: 5001] Port for the local GraphiQL dashboard (when using --dashboard=local)
435
467
 
436
- --port=port [default: 5001] Port for the local GraphiQL dashboard (when using --dashboard=local)
468
+ DESCRIPTION
469
+ Deploy your schema to StepZen, and then redeploy on every change.
437
470
  ```
438
471
 
439
472
  ## `stepzen upload TYPE DESTINATION`
@@ -442,36 +475,60 @@ OPTIONS
442
475
 
443
476
  ```
444
477
  USAGE
445
- $ stepzen upload TYPE DESTINATION
478
+ $ stepzen upload [TYPE] [DESTINATION] [-h] [--dir <value> | --file <value>] [--silent]
446
479
 
447
480
  ARGUMENTS
448
481
  TYPE (configurationset|schema) type
449
482
  DESTINATION destination
450
483
 
451
- OPTIONS
452
- -h, --help Show CLI help
453
- --dir=dir A directory to upload
454
- --file=file A file to upload
484
+ FLAGS
485
+ -h, --help Show CLI help
486
+ --dir=<value> A directory to upload
487
+ --file=<value> A file to upload
455
488
  --silent
456
489
 
457
490
  DESCRIPTION
491
+ [DEPRECATED] Upload a schema or a configuration set to StepZen.
458
492
  stepzen upload is deprecated in favor of stepzen deploy
459
493
  StepZen CLI is moving away from a two-step "upload" + "deploy" flow to a single-step "deploy" flow.
460
494
  ```
461
495
 
496
+ ## `stepzen version`
497
+
498
+ ```
499
+ USAGE
500
+ $ stepzen version [--json] [--verbose]
501
+
502
+ FLAGS
503
+ --verbose Show additional information about the CLI.
504
+
505
+ GLOBAL FLAGS
506
+ --json Format output as json.
507
+
508
+ FLAG DESCRIPTIONS
509
+ --verbose Show additional information about the CLI.
510
+
511
+ Additionally shows the architecture, node version, operating system, and versions of plugins that the CLI is using.
512
+ ```
513
+
514
+ _See code: [@oclif/plugin-version](https://github.com/oclif/plugin-version/blob/v1.1.4/src/commands/version.ts)_
515
+
462
516
  ## `stepzen whoami`
463
517
 
464
518
  View your StepZen credentials.
465
519
 
466
520
  ```
467
521
  USAGE
468
- $ stepzen whoami
522
+ $ stepzen whoami [-h] [--showkeys | --account | --adminkey | --apikey]
469
523
 
470
- OPTIONS
524
+ FLAGS
471
525
  -h, --help Show CLI help
472
526
  --account
473
527
  --adminkey
474
528
  --apikey
475
529
  --showkeys
530
+
531
+ DESCRIPTION
532
+ View your StepZen credentials.
476
533
  ```
477
534
  <!-- commandsstop -->
package/bin/dev ADDED
@@ -0,0 +1,17 @@
1
+ #!/usr/bin/env node
2
+
3
+ const oclif = require('@oclif/core')
4
+
5
+ const path = require('path')
6
+ const project = path.join(__dirname, '..', 'tsconfig.json')
7
+
8
+ // In dev mode -> use ts-node and dev plugins
9
+ process.env.NODE_ENV = 'development'
10
+
11
+ require('ts-node').register({project})
12
+
13
+ // In dev mode, always show stack traces
14
+ oclif.settings.debug = true
15
+
16
+ // Start the CLI
17
+ oclif.run().then(oclif.flush).catch(oclif.Errors.handle)
package/bin/dev.cmd ADDED
@@ -0,0 +1,3 @@
1
+ @echo off
2
+
3
+ node "%~dp0\dev" %*
package/bin/run CHANGED
@@ -18,11 +18,11 @@ if (nodeMajor > 0 && nodeMajor < 14) {
18
18
  console.warn(yellow + message.replace('$$version.', version) + reset)
19
19
  }
20
20
 
21
- const command = require('@oclif/command')
22
- const flush = require('@oclif/command/flush')
23
- const handleError = require('@oclif/errors/handle')
21
+ const oclif = require('@oclif/core')
22
+ const flush = require('@oclif/core/flush')
23
+ const handleError = require('@oclif/core/handle')
24
24
 
25
- command
25
+ oclif
26
26
  .run()
27
27
  .then(flush)
28
28
  .catch(error => {
@@ -1,4 +1,3 @@
1
- import { flags } from '@oclif/command';
2
1
  import ZenCommand from '../shared/zen-command';
3
2
  import { LoggedInMachineConfiguration, Workspace } from '../shared/types';
4
3
  import { SdkInterfaceV2 } from '../shared/stepzen-sdk';
@@ -6,13 +5,13 @@ export default class Deploy extends ZenCommand {
6
5
  static description: string;
7
6
  static usage: string;
8
7
  static flags: {
9
- dir: flags.IOptionFlag<string | undefined>;
10
- silent: import("@oclif/parser/lib/flags").IBooleanFlag<boolean>;
11
- configurationsets: flags.IOptionFlag<string | undefined>;
12
- config: flags.IOptionFlag<string | undefined>;
13
- schema: flags.IOptionFlag<string | undefined>;
14
- help: import("@oclif/parser/lib/flags").IBooleanFlag<void>;
15
- 'non-interactive': import("@oclif/parser/lib/flags").IBooleanFlag<boolean>;
8
+ dir: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined>;
9
+ silent: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
10
+ configurationsets: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined>;
11
+ config: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined>;
12
+ schema: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined>;
13
+ help: import("@oclif/core/lib/interfaces").BooleanFlag<void>;
14
+ 'non-interactive': import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
16
15
  };
17
16
  static args: {
18
17
  name: string;
@@ -1 +1 @@
1
- {"version":3,"file":"deploy.d.ts","sourceRoot":"","sources":["../../src/commands/deploy.ts"],"names":[],"mappings":"AAQA,OAAO,EAAC,KAAK,EAAC,MAAM,gBAAgB,CAAA;AAOpC,OAAO,UAAU,MAAM,uBAAuB,CAAA;AAE9C,OAAO,EAAC,4BAA4B,EAAE,SAAS,EAAC,MAAM,iBAAiB,CAAA;AACvE,OAAO,EAEL,cAAc,EAEf,MAAM,uBAAuB,CAAA;AAG9B,MAAM,CAAC,OAAO,OAAO,MAAO,SAAQ,UAAU;IAC5C,MAAM,CAAC,WAAW,SAAuB;IAEzC,MAAM,CAAC,KAAK,SAIiE;IAE7E,MAAM,CAAC,KAAK;;;;;;;;MAuCX;IAED,MAAM,CAAC,IAAI;;;;QAOV;IAGK,GAAG;IAsLH,mBAAmB,CAAC,EACxB,QAAQ,EACR,MAAM,EACN,iBAAiB,EACjB,aAAa,GACd,EAAE;QACD,QAAQ,EAAE,MAAM,CAAA;QAChB,MAAM,EAAE,MAAM,CAAA;QACd,iBAAiB,CAAC,EAAE,MAAM,CAAA;QAC1B,aAAa,EAAE,4BAA4B,CAAA;KAC5C;;;;;;;;;IAqBK,mBAAmB,CAAC,EACxB,QAAQ,EACR,SAAS,EACT,cAAc,EACd,aAAa,GACd,EAAE;QACD,QAAQ,EAAE,MAAM,CAAA;QAChB,SAAS,EAAE,SAAS,CAAA;QACpB,cAAc,CAAC,EAAE,MAAM,CAAA;QACvB,aAAa,EAAE,4BAA4B,CAAA;KAC5C;;;;;;;;;IA+BK,mBAAmB,CAAC,EACxB,QAAQ,EACR,SAAS,EACT,cAAc,EACd,aAAa,EACb,OAAO,GACR,EAAE;QACD,QAAQ,EAAE,MAAM,CAAA;QAChB,SAAS,EAAE,SAAS,CAAA;QACpB,cAAc,CAAC,EAAE,MAAM,CAAA;QACvB,aAAa,EAAE,4BAA4B,CAAA;QAC3C,OAAO,EAAE,cAAc,CAAA;KACxB;;;;CAoDF"}
1
+ {"version":3,"file":"deploy.d.ts","sourceRoot":"","sources":["../../src/commands/deploy.ts"],"names":[],"mappings":"AAcA,OAAO,UAAU,MAAM,uBAAuB,CAAA;AAE9C,OAAO,EAAC,4BAA4B,EAAE,SAAS,EAAC,MAAM,iBAAiB,CAAA;AACvE,OAAO,EAEL,cAAc,EAEf,MAAM,uBAAuB,CAAA;AAG9B,MAAM,CAAC,OAAO,OAAO,MAAO,SAAQ,UAAU;IAC5C,MAAM,CAAC,WAAW,SAAuB;IAEzC,MAAM,CAAC,KAAK,SAIiE;IAE7E,MAAM,CAAC,KAAK;;;;;;;;MAuCX;IAED,MAAM,CAAC,IAAI;;;;QAOV;IAGK,GAAG;IAsLH,mBAAmB,CAAC,EACxB,QAAQ,EACR,MAAM,EACN,iBAAiB,EACjB,aAAa,GACd,EAAE;QACD,QAAQ,EAAE,MAAM,CAAA;QAChB,MAAM,EAAE,MAAM,CAAA;QACd,iBAAiB,CAAC,EAAE,MAAM,CAAA;QAC1B,aAAa,EAAE,4BAA4B,CAAA;KAC5C;;;;;;;;;IAqBK,mBAAmB,CAAC,EACxB,QAAQ,EACR,SAAS,EACT,cAAc,EACd,aAAa,GACd,EAAE;QACD,QAAQ,EAAE,MAAM,CAAA;QAChB,SAAS,EAAE,SAAS,CAAA;QACpB,cAAc,CAAC,EAAE,MAAM,CAAA;QACvB,aAAa,EAAE,4BAA4B,CAAA;KAC5C;;;;;;;;;IA+BK,mBAAmB,CAAC,EACxB,QAAQ,EACR,SAAS,EACT,cAAc,EACd,aAAa,EACb,OAAO,GACR,EAAE;QACD,QAAQ,EAAE,MAAM,CAAA;QAChB,SAAS,EAAE,SAAS,CAAA;QACpB,cAAc,CAAC,EAAE,MAAM,CAAA;QACvB,aAAa,EAAE,4BAA4B,CAAA;QAC3C,OAAO,EAAE,cAAc,CAAA;KACxB;;;;CAoDF"}
@@ -6,9 +6,8 @@ const chalk = require("chalk");
6
6
  const fs = require("fs");
7
7
  const path = require("path");
8
8
  const prettyMilliseconds = require("pretty-ms");
9
- const command_1 = require("@oclif/command");
10
9
  const core_1 = require("@oclif/core");
11
- const errors_1 = require("@oclif/errors");
10
+ const errors_1 = require("@oclif/core/lib/errors");
12
11
  const upload_1 = require("./upload");
13
12
  const actions_1 = require("../shared/actions");
14
13
  const utils_1 = require("../shared/utils");
@@ -19,7 +18,7 @@ const configuration_1 = require("../shared/configuration");
19
18
  class Deploy extends zen_command_1.default {
20
19
  // eslint-disable-next-line complexity
21
20
  async run() {
22
- const { args, flags } = this.parse(Deploy);
21
+ const { args, flags } = await this.parse(Deploy);
23
22
  // validate the endpoint arg
24
23
  if (args.endpoint) {
25
24
  const maybeError = (0, utils_1.validateEndpoint)(args.endpoint);
@@ -263,11 +262,11 @@ Deploy.usage = `deploy [ENDPOINT] [--config=path/to/config.yaml] [--dir=path/to/
263
262
  $ stepzen deploy ENDPOINT --schema=schema [--configurationsets=cs1[,cs2[,..]]]`;
264
263
  Deploy.flags = {
265
264
  ...zen_command_1.default.flags,
266
- dir: command_1.flags.string({ description: 'Working directory' }),
267
- silent: command_1.flags.boolean(),
265
+ dir: core_1.Flags.string({ description: 'Working directory' }),
266
+ silent: core_1.Flags.boolean(),
268
267
  // configurationsets is assumed to be a comma separated string naming uploaded configurationsets
269
268
  // a special configuration 'stepzen/defaults' is recognized.
270
- configurationsets: command_1.flags.string({
269
+ configurationsets: core_1.Flags.string({
271
270
  description: chalk `
272
271
  Name(s) of configuration sets uploaded earlier with {bold stepzen upload}` +
273
272
  chalk `
@@ -280,11 +279,11 @@ Deploy.flags = {
280
279
  \tto explicitly specify the configuration file`,
281
280
  exclusive: ['config', 'dir'],
282
281
  }),
283
- config: command_1.flags.string({
282
+ config: core_1.Flags.string({
284
283
  helpValue: 'path/to/config.yaml',
285
284
  description: '[default: config.yaml] Configuration file to use (relative to the current directory)',
286
285
  }),
287
- schema: command_1.flags.string({
286
+ schema: core_1.Flags.string({
288
287
  description: chalk `
289
288
  Name of a schema uploaded earlier with {bold stepzen upload}` +
290
289
  chalk `