stepzen 0.26.0-beta.0 → 0.26.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.
package/README.md CHANGED
@@ -30,7 +30,7 @@ $ npm install -g stepzen
30
30
  $ stepzen COMMAND
31
31
  running command...
32
32
  $ stepzen (-v|--version|version)
33
- stepzen/0.26.0-beta.0 linux-x64 node-v14.21.1
33
+ stepzen/0.26.0-beta.1 linux-x64 node-v14.21.1
34
34
  $ stepzen --help [COMMAND]
35
35
  USAGE
36
36
  $ stepzen COMMAND
@@ -282,6 +282,14 @@ ARGUMENTS
282
282
  QUERY GraphQL query (could include a query, a mutation or a subscription)
283
283
 
284
284
  OPTIONS
285
+ -H, --header=header
286
+ Add an additional HTTP header to the request. This is useful for schemas where @rest or @graphql directives enable
287
+ header forwarding with forwardheaders.
288
+
289
+ Example:
290
+ stepzen request '{ user(id: "u123") { email } }' \
291
+ -H "X-API-Token: SecretAPIToken"
292
+
285
293
  -h, --help
286
294
  Show CLI help
287
295
 
@@ -291,6 +299,9 @@ OPTIONS
291
299
  --endpoint=endpoint
292
300
  StepZen endpoint to call (defaults to the endpoint in current StepZen workspace)
293
301
 
302
+ --operation-name=operation-name
303
+ Specify the operation name (in case if the provided query includes multiple operations)
304
+
294
305
  --var=var
295
306
  Add a request variable, in the name=value format.
296
307
 
@@ -1,11 +1,13 @@
1
1
  import { flags } from '@oclif/command';
2
2
  import ZenCommand from '../shared/zen-command';
3
- import type { DocumentNode } from 'graphql';
3
+ import type { OperationDefinitionNode } from 'graphql';
4
4
  export default class Request extends ZenCommand {
5
5
  static description: string;
6
6
  static flags: {
7
7
  dir: flags.IOptionFlag<string | undefined>;
8
8
  endpoint: flags.IOptionFlag<string | undefined>;
9
+ header: flags.IOptionFlag<string[]>;
10
+ 'operation-name': flags.IOptionFlag<string | undefined>;
9
11
  var: flags.IOptionFlag<string[]>;
10
12
  'var-file': flags.IOptionFlag<string | undefined>;
11
13
  help: import("@oclif/parser/lib/flags").IBooleanFlag<void>;
@@ -17,6 +19,8 @@ export default class Request extends ZenCommand {
17
19
  required: boolean;
18
20
  }[];
19
21
  run(): Promise<void>;
20
- getRequestVariables(query: DocumentNode, variableFlags?: string[], varFileFlag?: string): Record<string, any>;
22
+ getRequestOperation(query: string, operationName?: string): OperationDefinitionNode;
23
+ getRequestVariables(opdef: OperationDefinitionNode, variableFlags?: string[], varFileFlag?: string): Record<string, any>;
24
+ getAdditionalRequestHeaders(headerFlagValues?: string[]): Record<string, string>;
21
25
  }
22
26
  //# sourceMappingURL=request.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"request.d.ts","sourceRoot":"","sources":["../../src/commands/request.ts"],"names":[],"mappings":"AASA,OAAO,EAAC,KAAK,EAAC,MAAM,gBAAgB,CAAA;AASpC,OAAO,UAAU,MAAM,uBAAuB,CAAA;AAI9C,OAAO,KAAK,EACV,YAAY,EAIb,MAAM,SAAS,CAAA;AA0BhB,MAAM,CAAC,OAAO,OAAO,OAAQ,SAAQ,UAAU;IAC7C,MAAM,CAAC,WAAW,SAGH;IAEf,MAAM,CAAC,KAAK;;;;;;;MAoCX;IAED,MAAM,CAAC,IAAI;;;;QAOV;IAEK,GAAG;IA2JT,mBAAmB,CACjB,KAAK,EAAE,YAAY,EACnB,aAAa,CAAC,EAAE,MAAM,EAAE,EACxB,WAAW,CAAC,EAAE,MAAM,GACnB,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC;CAkCvB"}
1
+ {"version":3,"file":"request.d.ts","sourceRoot":"","sources":["../../src/commands/request.ts"],"names":[],"mappings":"AASA,OAAO,EAAC,KAAK,EAAC,MAAM,gBAAgB,CAAA;AASpC,OAAO,UAAU,MAAM,uBAAuB,CAAA;AAI9C,OAAO,KAAK,EAIV,uBAAuB,EACxB,MAAM,SAAS,CAAA;AA2BhB,MAAM,CAAC,OAAO,OAAO,OAAQ,SAAQ,UAAU;IAC7C,MAAM,CAAC,WAAW,SAGH;IAEf,MAAM,CAAC,KAAK;;;;;;;;;MAmDX;IAED,MAAM,CAAC,IAAI;;;;QAOV;IAEK,GAAG;IAuJT,mBAAmB,CACjB,KAAK,EAAE,MAAM,EACb,aAAa,CAAC,EAAE,MAAM,GACrB,uBAAuB;IA2C1B,mBAAmB,CACjB,KAAK,EAAE,uBAAuB,EAC9B,aAAa,CAAC,EAAE,MAAM,EAAE,EACxB,WAAW,CAAC,EAAE,MAAM,GACnB,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC;IAyBtB,2BAA2B,CACzB,gBAAgB,CAAC,EAAE,MAAM,EAAE,GAC1B,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC;CA0B1B"}
@@ -19,6 +19,7 @@ const zen_command_1 = require("../shared/zen-command");
19
19
  const constants_1 = require("../shared/constants");
20
20
  const utils_1 = require("../shared/utils");
21
21
  const request_variables_parser_1 = require("../shared/request-variables-parser");
22
+ const header_1 = require("../shared/header");
22
23
  const formatErrorMessage = (errors) => {
23
24
  if (/Syntax Error GraphQL request/i.test(errors?.[0]?.message)) {
24
25
  // Special case: in this case the error message also contains the
@@ -38,14 +39,9 @@ const formatErrorMessage = (errors) => {
38
39
  class Request extends zen_command_1.default {
39
40
  async run() {
40
41
  const { args, flags } = this.parse(Request);
41
- let parsedQuery;
42
- try {
43
- parsedQuery = (0, graphql_1.parse)(args.query);
44
- }
45
- catch (error) {
46
- throw new errors_1.CLIError(`Failed to parse the GraphQL query\n${error}`);
47
- }
48
- const variables = this.getRequestVariables(parsedQuery, flags.var, flags['var-file']);
42
+ const operation = this.getRequestOperation(args.query, flags['operation-name']);
43
+ const variables = this.getRequestVariables(operation, flags.var, flags['var-file']);
44
+ const headers = this.getAdditionalRequestHeaders(flags.header);
49
45
  // Make sure the user is logged in
50
46
  const { configuration } = await this.ensureStepZenAccount();
51
47
  const zenserv = (0, constants_1.getZenServUrl)(configuration);
@@ -61,9 +57,7 @@ class Request extends zen_command_1.default {
61
57
  }
62
58
  try {
63
59
  const { result: userAgent } = await (0, stepzen_sdk_1.tryZenCtl2ThenZenCtl1)(configuration, stepzen => Promise.resolve(stepzen.userAgent));
64
- const hasSubscription = parsedQuery.definitions.some(node => node.kind === 'OperationDefinition' &&
65
- node.operation === 'subscription');
66
- if (hasSubscription) {
60
+ if (operation.operation === 'subscription') {
67
61
  const url = `${zenserv}/stepzen-subscriptions/${endpoint}/__graphql`.replace(/^http/i, 'ws');
68
62
  const client = (0, graphql_ws_1.createClient)({
69
63
  webSocketImpl: ws_1.WebSocket,
@@ -71,8 +65,9 @@ class Request extends zen_command_1.default {
71
65
  connectionParams: () => {
72
66
  return {
73
67
  headers: {
74
- Authorization: `APIKey ${configuration.apikey}`,
75
- 'User-Agent': userAgent,
68
+ authorization: `APIKey ${configuration.apikey}`,
69
+ 'user-agent': userAgent,
70
+ ...headers,
76
71
  },
77
72
  };
78
73
  },
@@ -84,6 +79,7 @@ class Request extends zen_command_1.default {
84
79
  client.subscribe({
85
80
  query: args.query,
86
81
  variables,
82
+ operationName: flags['operation-name'],
87
83
  }, {
88
84
  next: result => {
89
85
  if (count === 0) {
@@ -95,7 +91,7 @@ class Request extends zen_command_1.default {
95
91
  lastTimestamp = timestamp;
96
92
  lastResult = result;
97
93
  count += 1;
98
- this.log(chalk `{grey message #${count} ({cyan +${elapsed}})}`);
94
+ this.log(chalk `{grey event #${count} ({cyan +${elapsed}})}`);
99
95
  const prefix = chalk.grey(`${count} | `);
100
96
  this.log((0, utils_1.prependEachLine)(JSON.stringify(result, undefined, 2), prefix));
101
97
  },
@@ -124,9 +120,11 @@ class Request extends zen_command_1.default {
124
120
  url: `${zenserv}/${endpoint}/__graphql`,
125
121
  query: args.query,
126
122
  variables,
123
+ operationName: flags['operation-name'],
127
124
  headers: {
128
- Authorization: `APIKey ${configuration.apikey}`,
129
- 'User-Agent': userAgent,
125
+ authorization: `APIKey ${configuration.apikey}`,
126
+ 'user-agent': userAgent,
127
+ ...headers,
130
128
  },
131
129
  });
132
130
  if (!result.data && result.errors) {
@@ -149,11 +147,35 @@ class Request extends zen_command_1.default {
149
147
  throw new errors_1.CLIError(message);
150
148
  }
151
149
  }
152
- getRequestVariables(query, variableFlags, varFileFlag) {
153
- const opdef = query.definitions.find(node => node.kind === 'OperationDefinition');
154
- if (!opdef) {
155
- throw new errors_1.CLIError(`Please provide a GraphQL request: query, mutation or subscription.`);
150
+ getRequestOperation(query, operationName) {
151
+ let parsedQuery;
152
+ try {
153
+ parsedQuery = (0, graphql_1.parse)(query);
154
+ }
155
+ catch (error) {
156
+ throw new errors_1.CLIError(`Failed to parse the GraphQL query\n${error}`);
157
+ }
158
+ const operations = parsedQuery.definitions.filter(node => node.kind === 'OperationDefinition');
159
+ if (operations.length === 0) {
160
+ throw new errors_1.CLIError(`Please provide a GraphQL request with at least one operation:` +
161
+ ` query, mutation or subscription.`);
162
+ }
163
+ if (operationName) {
164
+ const operation = operations.find(odn => odn.name?.value === operationName);
165
+ if (!operation) {
166
+ throw new errors_1.CLIError(chalk `Operation {bold ${operationName}} is not defined in the provided request.`);
167
+ }
168
+ return operation;
169
+ }
170
+ if (operations.length > 1) {
171
+ throw new errors_1.CLIError(chalk `The request contains multiple operations, but the operation` +
172
+ chalk ` name is not provided. Please provide an operation name with` +
173
+ chalk ` the {bold --operation-name} flag, or remove all other` +
174
+ chalk ` operations except the intended one from the request.`);
156
175
  }
176
+ return operations[0];
177
+ }
178
+ getRequestVariables(opdef, variableFlags, varFileFlag) {
157
179
  if (varFileFlag) {
158
180
  try {
159
181
  return JSON.parse(fs.readFileSync(varFileFlag, 'utf8'));
@@ -168,6 +190,29 @@ class Request extends zen_command_1.default {
168
190
  }
169
191
  return variables;
170
192
  }
193
+ getAdditionalRequestHeaders(headerFlagValues) {
194
+ const headers = {};
195
+ if (headerFlagValues) {
196
+ headerFlagValues.forEach(headerFlag => {
197
+ const headerOrError = (0, header_1.parseHeader)(headerFlag);
198
+ if (headerOrError && 'error' in headerOrError) {
199
+ throw new errors_1.CLIError(headerOrError.error);
200
+ }
201
+ // A `null` from parseHeader() means a header should NOT be
202
+ // sent. This is not supported by zenserv / the introspection service
203
+ // so the CLI simply omits such headers
204
+ if (!headerOrError) {
205
+ return;
206
+ }
207
+ const name = headerOrError.name.toLowerCase();
208
+ const value = headerOrError.value;
209
+ // Combine repeated headers into one
210
+ // https://stackoverflow.com/questions/3096888
211
+ headers[name] = headers[name] ? `${headers[name]},${value}` : value;
212
+ });
213
+ }
214
+ return headers;
215
+ }
171
216
  }
172
217
  exports.default = Request;
173
218
  Request.description = `Send a GraphQL request to a StepZen endpoint and print the response,` +
@@ -183,6 +228,20 @@ Request.flags = {
183
228
  description: 'StepZen endpoint to call (defaults to the endpoint in current StepZen workspace)',
184
229
  exclusive: ['dir'],
185
230
  }),
231
+ header: command_1.flags.string({
232
+ char: 'H',
233
+ description: chalk `Add an additional HTTP header to the request.` +
234
+ chalk ` This is useful for schemas where {bold @rest} or {bold @graphql}` +
235
+ chalk ` directives enable header forwarding with {bold forwardheaders}.` +
236
+ `\n` +
237
+ `\nExample:` +
238
+ `\nstepzen request '{ user(id: "u123") { email } }' \\` +
239
+ `\n\t-H "X-API-Token: SecretAPIToken"`,
240
+ multiple: true,
241
+ }),
242
+ 'operation-name': command_1.flags.string({
243
+ description: chalk `Specify the operation name (in case if the provided query includes multiple operations)`,
244
+ }),
186
245
  var: command_1.flags.string({
187
246
  description: chalk `Add a request variable, in the {bold name}={underline value} format.` +
188
247
  `\n` +
@@ -1 +1 @@
1
- {"version":3,"file":"request.js","sourceRoot":"","sources":["../../src/commands/request.ts"],"names":[],"mappings":";AAAA,8CAA8C;;AAE9C,iEAAiE;AACjE,sEAAsE;AACtE,4CAA4C;AAC5C,oEAAoE;AAEpE,+BAA8B;AAC9B,yBAAwB;AACxB,4CAAoC;AACpC,0CAAsC;AACtC,2CAAuC;AACvC,qCAA6B;AAC7B,2BAA4B;AAC5B,sCAA8C;AAC9C,gDAA+C;AAE/C,uDAA2D;AAC3D,uDAA8C;AAC9C,mDAAiD;AACj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QACvE,QAAQ,EAAE,IAAI;KACf;CACF,CAAA"}
@@ -1 +1 @@
1
- {"version":"0.26.0-beta.0","commands":{"deploy":{"id":"deploy","description":"Deploy to StepZen.","usage":"deploy [ENDPOINT] [--config=path/to/config.yaml] [--dir=path/to/workspace]\n\n-- OR (deprecated) --\n\n$ stepzen deploy ENDPOINT --schema=schema [--configurationsets=cs1[,cs2[,..]]]","pluginName":"stepzen","pluginType":"core","aliases":[],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help","allowNo":false},"non-interactive":{"name":"non-interactive","type":"boolean","description":"Disable all interactive prompts","hidden":true,"allowNo":false},"dir":{"name":"dir","type":"option","description":"Working directory"},"silent":{"name":"silent","type":"boolean","allowNo":false},"configurationsets":{"name":"configurationsets","type":"option","description":"\n Name(s) of configuration sets uploaded earlier with stepzen upload\n [DEPRECATED: this flag will be removed in future versions]\n \n Instead, please use one of these options:\n - stepzen deploy (without the --configurationsets flag)\n \tto use the configuration from the config.yaml file in the current directory (if exists)\n - stepzen deploy --config path/to/config.yaml\n \tto explicitly specify the configuration file"},"config":{"name":"config","type":"option","description":"[default: config.yaml] Configuration file to use (relative to the current directory)","helpValue":"path/to/config.yaml"},"schema":{"name":"schema","type":"option","description":"\n Name of a schema uploaded earlier with stepzen upload\n [DEPRECATED: this flag will be removed in future versions]\n \n Instead, please use one of these options:\n - stepzen deploy (without the --schema flag)\n \tto deploy the schema from a StepZen workspace in your current directory\n - stepzen deploy --dir path/to/workspace\n \tto deploy from a StepZen workspace in another folder"}},"args":[{"name":"endpoint","description":"name of the endpoint (e.g. api/customers)\n [default: use the endpoint property from stepzen.config.json]","required":false}]},"import":{"id":"import","description":"Import a schema for an external data source or an API endpoint to your GraphQL API.","usage":["import curl [[CURLOPTS] URL] [--prefix=PREFIX] [--header=HEADER] [--header-param=HEADER-PARAM] [--query-name=QUERY-NAME] [--query-type=QUERY-TYPE] [--path-params=PATH-PARAMS]","import graphql [URL] [--prefix=PREFIX] [--header=HEADER] [--header-param=HEADER-PARAM]","import mysql [--db-host=DB-HOST] [--db-user=DB-USER] [--db-password=DB-PASSWORD] [--db-database=DB-DATABASE] [--db-link-types] [--db-include=DB-INCLUDE]","import mysql://[USER:PASSWORD@]HOST[:PORT][/DATABASE] [--db-link-types] [--db-include=DB-INCLUDE]","import postgresql [--db-host=DB-HOST] [--db-user=DB-USER] [--db-password=DB-PASSWORD] [--db-database=DB-DATABASE] [--db-link-types] [--db-include=DB-INCLUDE] [--db-schema=DB-SCHEMA]","import postgresql://[USER:PASSWORD@]HOST[:PORT][/DATABASE] [--db-link-types] [--db-include=DB-INCLUDE] [--db-schema=DB-SCHEMA]"],"pluginName":"stepzen","pluginType":"core","aliases":[],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help","allowNo":false},"non-interactive":{"name":"non-interactive","type":"boolean","description":"Disable all interactive prompts","hidden":true,"allowNo":false},"dir":{"name":"dir","type":"option","description":"Working directory"},"silent":{"name":"silent","type":"boolean","hidden":true,"allowNo":false},"name":{"name":"name","type":"option","description":"Subfolder inside the workspace folder to save the imported schema files to. Defaults to the name of the imported schema."},"overwrite":{"name":"overwrite","type":"boolean","description":"Overwrite any existing schema with the same name. Cannot be used without also providing a --name flag.","hidden":true,"allowNo":false},"prefix":{"name":"prefix","type":"option","description":"[curl, graphql] Prefix to add to every type in the generated schema"},"header":{"name":"header","type":"option","char":"H","description":"[curl, graphql] Specifies a request header to pass\n\nExample:\nstepzen import curl https://example.com/api/customers \\\n\t-H \"Authorization: apikey SecretAPIKeyValue\""},"header-param":{"name":"header-param","type":"option","description":"[curl, graphql] Specifies a parameter in a header value. Can be formed by taking a -H, --header flag and replacing the variable part of the header value with a $paramName placeholder. Repeat this flag once for each header with a parameter.\n\nExample:\nstepzen import curl https://example.com/api/customers \\\n\t-H \"Authorization: apikey SecretAPIKeyValue\" \\\n\t--header-param 'Authorization: apikey $apikey'"},"query-name":{"name":"query-name","type":"option","description":"[curl] Property name to add to the Query type as a way to access the imported endpoint"},"query-type":{"name":"query-type","type":"option","description":"[curl] Name for the type returned by the curl request in the generated schema. The name specified by --query-type is not prefixed by --prefix if both flags are present."},"path-params":{"name":"path-params","type":"option","description":"[curl] Specifies path parameters in the URL path. Can be formed by taking the original path and replacing the variable segments with $paramName placeholders.\n\nExample:\nstepzen import curl https://example.com/users/jane/posts/12 --path-params '/users/$userId/posts/$postId'"},"db-host":{"name":"db-host","type":"option","description":"[mysql, postgresql] Database host and optional port (as HOST[:PORT])"},"db-user":{"name":"db-user","type":"option","description":"[mysql, postgresql] Database user name"},"db-password":{"name":"db-password","type":"option","description":"[mysql, postgresql] Database password"},"db-database":{"name":"db-database","type":"option","description":"[mysql, postgresql] Name of database to import"},"db-link-types":{"name":"db-link-types","type":"boolean","description":"[mysql, postgresql] Automatically link types based on foreign key relationships using @materializer (https://stepzen.com/docs/features/linking-types)","allowNo":false},"db-include":{"name":"db-include","type":"option","description":"[mysql, postgresql] Should the generated GraphQL schema be based only on database views, only on tables or on both","hidden":false,"helpValue":"(tables-only|views-only|tables-and-views)","options":["tables-only","views-only","tables-and-views"]},"db-schema":{"name":"db-schema","type":"option","description":"[postgresql] PostgreSQL schema to import tables from (default: public)"}},"args":[{"name":"schema","required":true}]},"init":{"id":"init","description":"Initialize a StepZen workspace in the current directory.","pluginName":"stepzen","pluginType":"core","hidden":true,"aliases":[],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help","allowNo":false},"non-interactive":{"name":"non-interactive","type":"boolean","description":"Disable all interactive prompts","hidden":true,"allowNo":false},"endpoint":{"name":"endpoint","type":"option","hidden":true},"yes":{"name":"yes","type":"boolean","hidden":true,"allowNo":false}},"args":[{"name":"directory","hidden":true}]},"lint":{"id":"lint","description":"StepZen lint.","pluginName":"stepzen","pluginType":"core","hidden":true,"aliases":[],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help","allowNo":false},"non-interactive":{"name":"non-interactive","type":"boolean","description":"Disable all interactive prompts","hidden":true,"allowNo":false},"dir":{"name":"dir","type":"option","hidden":true}},"args":[]},"list":{"id":"list","description":"List endpoints, schemas and configuration sets in your StepZen account.","pluginName":"stepzen","pluginType":"core","aliases":[],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help","allowNo":false},"non-interactive":{"name":"non-interactive","type":"boolean","description":"Disable all interactive prompts","hidden":true,"allowNo":false}},"args":[{"name":"type","description":"\n \n The type of entities to list:\n \tendpoints - GraphQL API endpoints deployed with stepzen deploy (or stepzen start)\n \tschemas [DEPRECATED] - StepZen schemas uploaded with stepzen upload (or stepzen start)\n \tconfigurationsets [DEPRECATED] - StepZen configuration sets uploaded with stepzen upload (or stepzen start)","options":["endpoints","configurationsets","schemas"],"default":"endpoints"}]},"login":{"id":"login","description":"Log in to StepZen.","pluginName":"stepzen","pluginType":"core","aliases":[],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help","allowNo":false},"non-interactive":{"name":"non-interactive","type":"boolean","description":"Disable all interactive prompts","hidden":true,"allowNo":false},"account":{"name":"account","type":"option","char":"a","description":"StepZen account name (copy from https://stepzen.com/account). If not provided, the CLI prompts the users to enter one."},"adminkey":{"name":"adminkey","type":"option","char":"k","description":"Admin key (copy from https://stepzen.com/account) If not provided, the CLI prompts the users to enter one."},"public":{"name":"public","type":"boolean","description":"Create a public anonymous StepZen account and use it. This is handy for trying StepZen out, but it not suitable for handling private data as all endpoints created with a public account will be public.","allowNo":false},"config":{"name":"config","type":"option","hidden":true}},"args":[]},"logout":{"id":"logout","description":"Log out of StepZen.","pluginName":"stepzen","pluginType":"core","aliases":[],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help","allowNo":false},"non-interactive":{"name":"non-interactive","type":"boolean","description":"Disable all interactive prompts","hidden":true,"allowNo":false}},"args":[]},"request":{"id":"request","description":"Send a GraphQL request to a StepZen endpoint and print the response, using the API key and the target endopint from the current StepZen workspace.","pluginName":"stepzen","pluginType":"core","aliases":[],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help","allowNo":false},"non-interactive":{"name":"non-interactive","type":"boolean","description":"Disable all interactive prompts","hidden":true,"allowNo":false},"dir":{"name":"dir","type":"option","description":"StepZen workspace directory (defaults to the current directory)"},"endpoint":{"name":"endpoint","type":"option","description":"StepZen endpoint to call (defaults to the endpoint in current StepZen workspace)"},"var":{"name":"var","type":"option","description":"Add a request variable, in the name=value format.\n\nExample:\nstepzen request 'query OrdersQuery($search: String!, $limit: Int) {\n\t\torders(search: $search, limit: $limit) { id createdAt }\n\t}' \\\n\t--var 'search=space ninja' \\\n\t--var limit=5"},"var-file":{"name":"var-file","type":"option","description":"Read request variables from a JSON file\n\nExample:\nstepzen request 'query OrdersQuery($search: String!, $limit: Int) {\n\t\torders(search: $search, limit: $limit) { id createdAt }\n\t}' \\\n\t--var-file ./vars.json"}},"args":[{"name":"query","description":"GraphQL query (could include a query, a mutation or a subscription)","required":true}]},"service":{"id":"service","description":"Manage the local StepZen service instance (requires Docker).\nYou can use a local StepZen service instance instead of the StepZen cloud to develop and test GraphQL endpoints locally. This way you can try StepZen out without giving the StepZen cloud access to your data sources and API endpoints.\n\nLocal StepZen service instances are not suitable for production use. Please refer to the documentation at https://stepzen.com/docs/deployment/local-docker for more information and examples.","pluginName":"stepzen","pluginType":"core","aliases":[],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help","allowNo":false},"non-interactive":{"name":"non-interactive","type":"boolean","description":"Disable all interactive prompts","hidden":true,"allowNo":false},"dsn":{"name":"dsn","type":"option","description":"DSN of a StepZen metadata database, e.g. postgres://user:password@172.17.0.1:5432/zenctl"},"reset-auto":{"name":"reset-auto","type":"boolean","description":"Create fresh empty metadata database. Note: all existing endpoints will be deleted and you will be logged out.","allowNo":false},"prompt":{"name":"prompt","type":"boolean","description":"Opens an interactive prompt to ask for database details (or fails, if running in a non-interactive mode).","allowNo":false},"port":{"name":"port","type":"option","description":"Override the TCP port on which the local StepZen service instance will listen for connections (port 9000 by default)."}},"args":[{"name":"action","description":"\n \tstart\tstart a local StepZen service instance in a Docker container\n \t\tThis command pulls the latest StepZen service instance Docker image so that the\n \t\tversion of StepZen you run locally is the same as the one running on\n \t\tstepzen.net.\n \n \tstop\tstop the local StepZen service instance (if running)\n \t\tThis command deletes the Docker container with the StepZen service instance,\n \t\tbut all your endpoints are persistently stored in the metadata database. They\n \t\tremain available when running stepzen service start next time.\n \n \tupgrade\tupgrade the local StepZen service instance if it is running\n \t\tThis command checks if a newer version of the StepZen service instance Docker\n \t\timage is available, and if it is then stops and deletes the currently running\n \t\tcontainer, pulls the latest image, and starts it. All endpoints are preserved.\n\n If no action is provided, print the service status and exit.","required":false,"options":["start","stop","upgrade"]}]},"start":{"id":"start","description":"Deploy your schema to StepZen, and then redeploy on every change.","pluginName":"stepzen","pluginType":"core","aliases":[],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help","allowNo":false},"non-interactive":{"name":"non-interactive","type":"boolean","description":"Disable all interactive prompts","hidden":true,"allowNo":false},"dir":{"name":"dir","type":"option","description":"Working directory"},"endpoint":{"name":"endpoint","type":"option","description":"Override workspace endpoint"},"no-console":{"name":"no-console","type":"boolean","hidden":true,"allowNo":false},"no-dashboard":{"name":"no-dashboard","type":"boolean","hidden":true,"allowNo":false},"no-init":{"name":"no-init","type":"boolean","hidden":true,"allowNo":false},"no-validate":{"name":"no-validate","type":"boolean","hidden":true,"allowNo":false},"no-watcher":{"name":"no-watcher","type":"boolean","hidden":true,"allowNo":false},"port":{"name":"port","type":"option","default":5001}},"args":[]},"transpile":{"id":"transpile","description":"Transpile a GraphQL schema.","pluginName":"stepzen","pluginType":"core","hidden":true,"aliases":[],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help","allowNo":false},"non-interactive":{"name":"non-interactive","type":"boolean","description":"Disable all interactive prompts","hidden":true,"allowNo":false},"config":{"name":"config","type":"option","hidden":true},"hide-output":{"name":"hide-output","type":"boolean","hidden":true,"allowNo":false},"inspect":{"name":"inspect","type":"boolean","char":"i","hidden":true,"allowNo":false},"inspect-after":{"name":"inspect-after","type":"boolean","hidden":true,"allowNo":false},"output-configuration":{"name":"output-configuration","type":"boolean","allowNo":false},"silent":{"name":"silent","type":"boolean","allowNo":false}},"args":[{"name":"folder","required":true}]},"upload":{"id":"upload","description":"[DEPRECATED] Upload a schema or a configuration set to StepZen.\nstepzen upload is deprecated in favor of stepzen deploy\nStepZen CLI is moving away from a two-step \"upload\" + \"deploy\" flow to a single-step \"deploy\" flow.","pluginName":"stepzen","pluginType":"core","aliases":[],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help","allowNo":false},"non-interactive":{"name":"non-interactive","type":"boolean","description":"Disable all interactive prompts","hidden":true,"allowNo":false},"dir":{"name":"dir","type":"option","description":"A directory to upload"},"file":{"name":"file","type":"option","description":"A file to upload"},"silent":{"name":"silent","type":"boolean","allowNo":false}},"args":[{"name":"type","description":"type","required":true,"options":["configurationset","schema"]},{"name":"destination","description":"destination","required":true}]},"validate":{"id":"validate","description":"Validate a GraphQL schema.","pluginName":"stepzen","pluginType":"core","hidden":true,"aliases":[],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help","allowNo":false},"non-interactive":{"name":"non-interactive","type":"boolean","description":"Disable all interactive prompts","hidden":true,"allowNo":false}},"args":[{"name":"folder","required":true}]},"whoami":{"id":"whoami","description":"Display your credentials.","pluginName":"stepzen","pluginType":"core","hidden":true,"aliases":[],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help","allowNo":false},"non-interactive":{"name":"non-interactive","type":"boolean","description":"Disable all interactive prompts","hidden":true,"allowNo":false},"showkeys":{"name":"showkeys","type":"boolean","allowNo":false},"account":{"name":"account","type":"boolean","allowNo":false},"adminkey":{"name":"adminkey","type":"boolean","allowNo":false},"apikey":{"name":"apikey","type":"boolean","allowNo":false}},"args":[]}}}
1
+ {"version":"0.26.0-beta.1","commands":{"deploy":{"id":"deploy","description":"Deploy to StepZen.","usage":"deploy [ENDPOINT] [--config=path/to/config.yaml] [--dir=path/to/workspace]\n\n-- OR (deprecated) --\n\n$ stepzen deploy ENDPOINT --schema=schema [--configurationsets=cs1[,cs2[,..]]]","pluginName":"stepzen","pluginType":"core","aliases":[],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help","allowNo":false},"non-interactive":{"name":"non-interactive","type":"boolean","description":"Disable all interactive prompts","hidden":true,"allowNo":false},"dir":{"name":"dir","type":"option","description":"Working directory"},"silent":{"name":"silent","type":"boolean","allowNo":false},"configurationsets":{"name":"configurationsets","type":"option","description":"\n Name(s) of configuration sets uploaded earlier with stepzen upload\n [DEPRECATED: this flag will be removed in future versions]\n \n Instead, please use one of these options:\n - stepzen deploy (without the --configurationsets flag)\n \tto use the configuration from the config.yaml file in the current directory (if exists)\n - stepzen deploy --config path/to/config.yaml\n \tto explicitly specify the configuration file"},"config":{"name":"config","type":"option","description":"[default: config.yaml] Configuration file to use (relative to the current directory)","helpValue":"path/to/config.yaml"},"schema":{"name":"schema","type":"option","description":"\n Name of a schema uploaded earlier with stepzen upload\n [DEPRECATED: this flag will be removed in future versions]\n \n Instead, please use one of these options:\n - stepzen deploy (without the --schema flag)\n \tto deploy the schema from a StepZen workspace in your current directory\n - stepzen deploy --dir path/to/workspace\n \tto deploy from a StepZen workspace in another folder"}},"args":[{"name":"endpoint","description":"name of the endpoint (e.g. api/customers)\n [default: use the endpoint property from stepzen.config.json]","required":false}]},"import":{"id":"import","description":"Import a schema for an external data source or an API endpoint to your GraphQL API.","usage":["import curl [[CURLOPTS] URL] [--prefix=PREFIX] [--header=HEADER] [--header-param=HEADER-PARAM] [--query-name=QUERY-NAME] [--query-type=QUERY-TYPE] [--path-params=PATH-PARAMS]","import graphql [URL] [--prefix=PREFIX] [--header=HEADER] [--header-param=HEADER-PARAM]","import mysql [--db-host=DB-HOST] [--db-user=DB-USER] [--db-password=DB-PASSWORD] [--db-database=DB-DATABASE] [--db-link-types] [--db-include=DB-INCLUDE]","import mysql://[USER:PASSWORD@]HOST[:PORT][/DATABASE] [--db-link-types] [--db-include=DB-INCLUDE]","import postgresql [--db-host=DB-HOST] [--db-user=DB-USER] [--db-password=DB-PASSWORD] [--db-database=DB-DATABASE] [--db-link-types] [--db-include=DB-INCLUDE] [--db-schema=DB-SCHEMA]","import postgresql://[USER:PASSWORD@]HOST[:PORT][/DATABASE] [--db-link-types] [--db-include=DB-INCLUDE] [--db-schema=DB-SCHEMA]"],"pluginName":"stepzen","pluginType":"core","aliases":[],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help","allowNo":false},"non-interactive":{"name":"non-interactive","type":"boolean","description":"Disable all interactive prompts","hidden":true,"allowNo":false},"dir":{"name":"dir","type":"option","description":"Working directory"},"silent":{"name":"silent","type":"boolean","hidden":true,"allowNo":false},"name":{"name":"name","type":"option","description":"Subfolder inside the workspace folder to save the imported schema files to. Defaults to the name of the imported schema."},"overwrite":{"name":"overwrite","type":"boolean","description":"Overwrite any existing schema with the same name. Cannot be used without also providing a --name flag.","hidden":true,"allowNo":false},"prefix":{"name":"prefix","type":"option","description":"[curl, graphql] Prefix to add to every type in the generated schema"},"header":{"name":"header","type":"option","char":"H","description":"[curl, graphql] Specifies a request header to pass\n\nExample:\nstepzen import curl https://example.com/api/customers \\\n\t-H \"Authorization: apikey SecretAPIKeyValue\""},"header-param":{"name":"header-param","type":"option","description":"[curl, graphql] Specifies a parameter in a header value. Can be formed by taking a -H, --header flag and replacing the variable part of the header value with a $paramName placeholder. Repeat this flag once for each header with a parameter.\n\nExample:\nstepzen import curl https://example.com/api/customers \\\n\t-H \"Authorization: apikey SecretAPIKeyValue\" \\\n\t--header-param 'Authorization: apikey $apikey'"},"query-name":{"name":"query-name","type":"option","description":"[curl] Property name to add to the Query type as a way to access the imported endpoint"},"query-type":{"name":"query-type","type":"option","description":"[curl] Name for the type returned by the curl request in the generated schema. The name specified by --query-type is not prefixed by --prefix if both flags are present."},"path-params":{"name":"path-params","type":"option","description":"[curl] Specifies path parameters in the URL path. Can be formed by taking the original path and replacing the variable segments with $paramName placeholders.\n\nExample:\nstepzen import curl https://example.com/users/jane/posts/12 --path-params '/users/$userId/posts/$postId'"},"db-host":{"name":"db-host","type":"option","description":"[mysql, postgresql] Database host and optional port (as HOST[:PORT])"},"db-user":{"name":"db-user","type":"option","description":"[mysql, postgresql] Database user name"},"db-password":{"name":"db-password","type":"option","description":"[mysql, postgresql] Database password"},"db-database":{"name":"db-database","type":"option","description":"[mysql, postgresql] Name of database to import"},"db-link-types":{"name":"db-link-types","type":"boolean","description":"[mysql, postgresql] Automatically link types based on foreign key relationships using @materializer (https://stepzen.com/docs/features/linking-types)","allowNo":false},"db-include":{"name":"db-include","type":"option","description":"[mysql, postgresql] Should the generated GraphQL schema be based only on database views, only on tables or on both","hidden":false,"helpValue":"(tables-only|views-only|tables-and-views)","options":["tables-only","views-only","tables-and-views"]},"db-schema":{"name":"db-schema","type":"option","description":"[postgresql] PostgreSQL schema to import tables from (default: public)"}},"args":[{"name":"schema","required":true}]},"init":{"id":"init","description":"Initialize a StepZen workspace in the current directory.","pluginName":"stepzen","pluginType":"core","hidden":true,"aliases":[],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help","allowNo":false},"non-interactive":{"name":"non-interactive","type":"boolean","description":"Disable all interactive prompts","hidden":true,"allowNo":false},"endpoint":{"name":"endpoint","type":"option","hidden":true},"yes":{"name":"yes","type":"boolean","hidden":true,"allowNo":false}},"args":[{"name":"directory","hidden":true}]},"lint":{"id":"lint","description":"StepZen lint.","pluginName":"stepzen","pluginType":"core","hidden":true,"aliases":[],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help","allowNo":false},"non-interactive":{"name":"non-interactive","type":"boolean","description":"Disable all interactive prompts","hidden":true,"allowNo":false},"dir":{"name":"dir","type":"option","hidden":true}},"args":[]},"list":{"id":"list","description":"List endpoints, schemas and configuration sets in your StepZen account.","pluginName":"stepzen","pluginType":"core","aliases":[],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help","allowNo":false},"non-interactive":{"name":"non-interactive","type":"boolean","description":"Disable all interactive prompts","hidden":true,"allowNo":false}},"args":[{"name":"type","description":"\n \n The type of entities to list:\n \tendpoints - GraphQL API endpoints deployed with stepzen deploy (or stepzen start)\n \tschemas [DEPRECATED] - StepZen schemas uploaded with stepzen upload (or stepzen start)\n \tconfigurationsets [DEPRECATED] - StepZen configuration sets uploaded with stepzen upload (or stepzen start)","options":["endpoints","configurationsets","schemas"],"default":"endpoints"}]},"login":{"id":"login","description":"Log in to StepZen.","pluginName":"stepzen","pluginType":"core","aliases":[],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help","allowNo":false},"non-interactive":{"name":"non-interactive","type":"boolean","description":"Disable all interactive prompts","hidden":true,"allowNo":false},"account":{"name":"account","type":"option","char":"a","description":"StepZen account name (copy from https://stepzen.com/account). If not provided, the CLI prompts the users to enter one."},"adminkey":{"name":"adminkey","type":"option","char":"k","description":"Admin key (copy from https://stepzen.com/account) If not provided, the CLI prompts the users to enter one."},"public":{"name":"public","type":"boolean","description":"Create a public anonymous StepZen account and use it. This is handy for trying StepZen out, but it not suitable for handling private data as all endpoints created with a public account will be public.","allowNo":false},"config":{"name":"config","type":"option","hidden":true}},"args":[]},"logout":{"id":"logout","description":"Log out of StepZen.","pluginName":"stepzen","pluginType":"core","aliases":[],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help","allowNo":false},"non-interactive":{"name":"non-interactive","type":"boolean","description":"Disable all interactive prompts","hidden":true,"allowNo":false}},"args":[]},"request":{"id":"request","description":"Send a GraphQL request to a StepZen endpoint and print the response, using the API key and the target endopint from the current StepZen workspace.","pluginName":"stepzen","pluginType":"core","aliases":[],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help","allowNo":false},"non-interactive":{"name":"non-interactive","type":"boolean","description":"Disable all interactive prompts","hidden":true,"allowNo":false},"dir":{"name":"dir","type":"option","description":"StepZen workspace directory (defaults to the current directory)"},"endpoint":{"name":"endpoint","type":"option","description":"StepZen endpoint to call (defaults to the endpoint in current StepZen workspace)"},"header":{"name":"header","type":"option","char":"H","description":"Add an additional HTTP header to the request. This is useful for schemas where @rest or @graphql directives enable header forwarding with forwardheaders.\n\nExample:\nstepzen request '{ user(id: \"u123\") { email } }' \\\n\t-H \"X-API-Token: SecretAPIToken\""},"operation-name":{"name":"operation-name","type":"option","description":"Specify the operation name (in case if the provided query includes multiple operations)"},"var":{"name":"var","type":"option","description":"Add a request variable, in the name=value format.\n\nExample:\nstepzen request 'query OrdersQuery($search: String!, $limit: Int) {\n\t\torders(search: $search, limit: $limit) { id createdAt }\n\t}' \\\n\t--var 'search=space ninja' \\\n\t--var limit=5"},"var-file":{"name":"var-file","type":"option","description":"Read request variables from a JSON file\n\nExample:\nstepzen request 'query OrdersQuery($search: String!, $limit: Int) {\n\t\torders(search: $search, limit: $limit) { id createdAt }\n\t}' \\\n\t--var-file ./vars.json"}},"args":[{"name":"query","description":"GraphQL query (could include a query, a mutation or a subscription)","required":true}]},"service":{"id":"service","description":"Manage the local StepZen service instance (requires Docker).\nYou can use a local StepZen service instance instead of the StepZen cloud to develop and test GraphQL endpoints locally. This way you can try StepZen out without giving the StepZen cloud access to your data sources and API endpoints.\n\nLocal StepZen service instances are not suitable for production use. Please refer to the documentation at https://stepzen.com/docs/deployment/local-docker for more information and examples.","pluginName":"stepzen","pluginType":"core","aliases":[],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help","allowNo":false},"non-interactive":{"name":"non-interactive","type":"boolean","description":"Disable all interactive prompts","hidden":true,"allowNo":false},"dsn":{"name":"dsn","type":"option","description":"DSN of a StepZen metadata database, e.g. postgres://user:password@172.17.0.1:5432/zenctl"},"reset-auto":{"name":"reset-auto","type":"boolean","description":"Create fresh empty metadata database. Note: all existing endpoints will be deleted and you will be logged out.","allowNo":false},"prompt":{"name":"prompt","type":"boolean","description":"Opens an interactive prompt to ask for database details (or fails, if running in a non-interactive mode).","allowNo":false},"port":{"name":"port","type":"option","description":"Override the TCP port on which the local StepZen service instance will listen for connections (port 9000 by default)."}},"args":[{"name":"action","description":"\n \tstart\tstart a local StepZen service instance in a Docker container\n \t\tThis command pulls the latest StepZen service instance Docker image so that the\n \t\tversion of StepZen you run locally is the same as the one running on\n \t\tstepzen.net.\n \n \tstop\tstop the local StepZen service instance (if running)\n \t\tThis command deletes the Docker container with the StepZen service instance,\n \t\tbut all your endpoints are persistently stored in the metadata database. They\n \t\tremain available when running stepzen service start next time.\n \n \tupgrade\tupgrade the local StepZen service instance if it is running\n \t\tThis command checks if a newer version of the StepZen service instance Docker\n \t\timage is available, and if it is then stops and deletes the currently running\n \t\tcontainer, pulls the latest image, and starts it. All endpoints are preserved.\n\n If no action is provided, print the service status and exit.","required":false,"options":["start","stop","upgrade"]}]},"start":{"id":"start","description":"Deploy your schema to StepZen, and then redeploy on every change.","pluginName":"stepzen","pluginType":"core","aliases":[],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help","allowNo":false},"non-interactive":{"name":"non-interactive","type":"boolean","description":"Disable all interactive prompts","hidden":true,"allowNo":false},"dir":{"name":"dir","type":"option","description":"Working directory"},"endpoint":{"name":"endpoint","type":"option","description":"Override workspace endpoint"},"no-console":{"name":"no-console","type":"boolean","hidden":true,"allowNo":false},"no-dashboard":{"name":"no-dashboard","type":"boolean","hidden":true,"allowNo":false},"no-init":{"name":"no-init","type":"boolean","hidden":true,"allowNo":false},"no-validate":{"name":"no-validate","type":"boolean","hidden":true,"allowNo":false},"no-watcher":{"name":"no-watcher","type":"boolean","hidden":true,"allowNo":false},"port":{"name":"port","type":"option","default":5001}},"args":[]},"transpile":{"id":"transpile","description":"Transpile a GraphQL schema.","pluginName":"stepzen","pluginType":"core","hidden":true,"aliases":[],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help","allowNo":false},"non-interactive":{"name":"non-interactive","type":"boolean","description":"Disable all interactive prompts","hidden":true,"allowNo":false},"config":{"name":"config","type":"option","hidden":true},"hide-output":{"name":"hide-output","type":"boolean","hidden":true,"allowNo":false},"inspect":{"name":"inspect","type":"boolean","char":"i","hidden":true,"allowNo":false},"inspect-after":{"name":"inspect-after","type":"boolean","hidden":true,"allowNo":false},"output-configuration":{"name":"output-configuration","type":"boolean","allowNo":false},"silent":{"name":"silent","type":"boolean","allowNo":false}},"args":[{"name":"folder","required":true}]},"upload":{"id":"upload","description":"[DEPRECATED] Upload a schema or a configuration set to StepZen.\nstepzen upload is deprecated in favor of stepzen deploy\nStepZen CLI is moving away from a two-step \"upload\" + \"deploy\" flow to a single-step \"deploy\" flow.","pluginName":"stepzen","pluginType":"core","aliases":[],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help","allowNo":false},"non-interactive":{"name":"non-interactive","type":"boolean","description":"Disable all interactive prompts","hidden":true,"allowNo":false},"dir":{"name":"dir","type":"option","description":"A directory to upload"},"file":{"name":"file","type":"option","description":"A file to upload"},"silent":{"name":"silent","type":"boolean","allowNo":false}},"args":[{"name":"type","description":"type","required":true,"options":["configurationset","schema"]},{"name":"destination","description":"destination","required":true}]},"validate":{"id":"validate","description":"Validate a GraphQL schema.","pluginName":"stepzen","pluginType":"core","hidden":true,"aliases":[],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help","allowNo":false},"non-interactive":{"name":"non-interactive","type":"boolean","description":"Disable all interactive prompts","hidden":true,"allowNo":false}},"args":[{"name":"folder","required":true}]},"whoami":{"id":"whoami","description":"Display your credentials.","pluginName":"stepzen","pluginType":"core","hidden":true,"aliases":[],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help","allowNo":false},"non-interactive":{"name":"non-interactive","type":"boolean","description":"Disable all interactive prompts","hidden":true,"allowNo":false},"showkeys":{"name":"showkeys","type":"boolean","allowNo":false},"account":{"name":"account","type":"boolean","allowNo":false},"adminkey":{"name":"adminkey","type":"boolean","allowNo":false},"apikey":{"name":"apikey","type":"boolean","allowNo":false}},"args":[]}}}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "stepzen",
3
3
  "description": "The StepZen CLI",
4
- "version": "0.26.0-beta.0",
4
+ "version": "0.26.0-beta.1",
5
5
  "license": "MIT",
6
6
  "author": "Darren Waddell <darren@stepzen.com>",
7
7
  "contributors": [
@@ -32,10 +32,10 @@
32
32
  "@oclif/errors": "^1.3.5",
33
33
  "@oclif/plugin-help": "^5.1.12",
34
34
  "@soluble/dsn-parser": "^1.6.0",
35
- "@stepzen/fetch": "^0.26.0-beta.0",
36
- "@stepzen/graphiql-proxy": "^0.26.0-beta.0",
37
- "@stepzen/sdk": "^0.26.0-beta.0",
38
- "@stepzen/transpiler": "^0.26.0-beta.0",
35
+ "@stepzen/fetch": "^0.26.0-beta.1",
36
+ "@stepzen/graphiql-proxy": "^0.26.0-beta.1",
37
+ "@stepzen/sdk": "^0.26.0-beta.1",
38
+ "@stepzen/transpiler": "^0.26.0-beta.1",
39
39
  "chalk": "^4.1.1",
40
40
  "chokidar": "^3.5.2",
41
41
  "compare-versions": "^3.6.0",
@@ -137,5 +137,5 @@
137
137
  "version": "oclif-dev readme && git add README.md"
138
138
  },
139
139
  "types": "lib/index.d.ts",
140
- "gitHead": "6be7a476dfe5d149c9ca51ac5141c2397a956936"
140
+ "gitHead": "9a166ef88e50d66adabb74632f73a120627123b1"
141
141
  }