stepzen 0.18.0-beta.0 → 0.18.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +15 -4
- package/lib/commands/import.d.ts +4 -0
- package/lib/commands/import.js +6 -1
- package/lib/commands/login.js +4 -2
- package/lib/commands/start.js +13 -7
- package/lib/generate/helpers.js +2 -1
- package/lib/generate/index.js +2 -2
- package/lib/start/deploy.js +2 -2
- package/oclif.manifest.json +1 -1
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -29,7 +29,7 @@ $ npm install -g stepzen
|
|
|
29
29
|
$ stepzen COMMAND
|
|
30
30
|
running command...
|
|
31
31
|
$ stepzen (-v|--version|version)
|
|
32
|
-
stepzen/0.18.0
|
|
32
|
+
stepzen/0.18.0 darwin-arm64 node-v16.15.0
|
|
33
33
|
$ stepzen --help [COMMAND]
|
|
34
34
|
USAGE
|
|
35
35
|
$ stepzen COMMAND
|
|
@@ -107,6 +107,10 @@ OPTIONS
|
|
|
107
107
|
--db-host=db-host
|
|
108
108
|
[mysql, postgresql] database host
|
|
109
109
|
|
|
110
|
+
--db-link-types
|
|
111
|
+
[mysql, postgresql] Automatically link types with @materializer whenever there is database support
|
|
112
|
+
(https://stepzen.com/docs/features/linking-types)
|
|
113
|
+
|
|
110
114
|
--db-password=db-password
|
|
111
115
|
[mysql, postgresql] database password
|
|
112
116
|
|
|
@@ -175,10 +179,17 @@ USAGE
|
|
|
175
179
|
$ stepzen login
|
|
176
180
|
|
|
177
181
|
OPTIONS
|
|
178
|
-
-
|
|
182
|
+
-a, --account=account StepZen account name (copy from https://stepzen.com/account). If not provided, the CLI
|
|
183
|
+
prompts the users to enter one.
|
|
184
|
+
|
|
185
|
+
-h, --help show CLI help
|
|
186
|
+
|
|
187
|
+
-k, --adminkey=adminkey Admin key (copy from https://stepzen.com/account) If not provided, the CLI prompts the users
|
|
188
|
+
to enter one.
|
|
179
189
|
|
|
180
|
-
--public
|
|
181
|
-
|
|
190
|
+
--public Create a public anonymous StepZen account and use it. This is handy for trying StepZen out,
|
|
191
|
+
but it not suitable for handling private data as all endpoints created with a public account
|
|
192
|
+
will be public.
|
|
182
193
|
```
|
|
183
194
|
|
|
184
195
|
## `stepzen logout`
|
package/lib/commands/import.d.ts
CHANGED
|
@@ -19,6 +19,7 @@ export default class Import extends ZenCommand {
|
|
|
19
19
|
'db-user': flags.IOptionFlag<string | undefined>;
|
|
20
20
|
'db-password': flags.IOptionFlag<string | undefined>;
|
|
21
21
|
'db-database': flags.IOptionFlag<string | undefined>;
|
|
22
|
+
'db-link-types': import("@oclif/parser/lib/flags").IBooleanFlag<boolean>;
|
|
22
23
|
};
|
|
23
24
|
static postgresqlFlags: {
|
|
24
25
|
'db-schema': flags.IOptionFlag<string | undefined>;
|
|
@@ -43,6 +44,7 @@ export default class Import extends ZenCommand {
|
|
|
43
44
|
'db-user': flags.IOptionFlag<string | undefined>;
|
|
44
45
|
'db-password': flags.IOptionFlag<string | undefined>;
|
|
45
46
|
'db-database': flags.IOptionFlag<string | undefined>;
|
|
47
|
+
'db-link-types': import("@oclif/parser/lib/flags").IBooleanFlag<boolean>;
|
|
46
48
|
};
|
|
47
49
|
schemas: string[];
|
|
48
50
|
} | {
|
|
@@ -57,6 +59,7 @@ export default class Import extends ZenCommand {
|
|
|
57
59
|
'db-user': flags.IOptionFlag<string | undefined>;
|
|
58
60
|
'db-password': flags.IOptionFlag<string | undefined>;
|
|
59
61
|
'db-database': flags.IOptionFlag<string | undefined>;
|
|
62
|
+
'db-link-types': import("@oclif/parser/lib/flags").IBooleanFlag<boolean>;
|
|
60
63
|
'query-name': flags.IOptionFlag<string | undefined>;
|
|
61
64
|
'query-type': flags.IOptionFlag<string | undefined>;
|
|
62
65
|
'path-params': flags.IOptionFlag<string | undefined>;
|
|
@@ -86,6 +89,7 @@ export default class Import extends ZenCommand {
|
|
|
86
89
|
'db-user': string | undefined;
|
|
87
90
|
'db-password': string | undefined;
|
|
88
91
|
'db-database': string | undefined;
|
|
92
|
+
'db-link-types': boolean;
|
|
89
93
|
'query-name': string | undefined;
|
|
90
94
|
'query-type': string | undefined;
|
|
91
95
|
'path-params': string | undefined;
|
package/lib/commands/import.js
CHANGED
|
@@ -133,7 +133,7 @@ class Import extends zen_command_1.default {
|
|
|
133
133
|
let preAnswered = {};
|
|
134
134
|
if (schema === 'mysql' || schema === 'postgresql') {
|
|
135
135
|
const asKeyValue = (key, flag) => flag === undefined ? {} : { [key]: flag };
|
|
136
|
-
preAnswered = Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, asKeyValue('host', flags['db-host'])), asKeyValue('user', flags['db-user'])), asKeyValue('password', flags['db-password'])), asKeyValue('database', flags['db-database'])), asKeyValue('schema', flags['db-schema']));
|
|
136
|
+
preAnswered = Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, asKeyValue('host', flags['db-host'])), asKeyValue('user', flags['db-user'])), asKeyValue('password', flags['db-password'])), asKeyValue('database', flags['db-database'])), asKeyValue('linkTypes', flags['db-link-types'] ? 'Yes' : 'No')), asKeyValue('schema', flags['db-schema']));
|
|
137
137
|
}
|
|
138
138
|
// Let's go!
|
|
139
139
|
result = await generate_1.default({
|
|
@@ -337,6 +337,11 @@ Import.sqlFlags = {
|
|
|
337
337
|
'db-database': command_1.flags.string({
|
|
338
338
|
description: '[mysql, postgresql] name of database to import',
|
|
339
339
|
}),
|
|
340
|
+
'db-link-types': command_1.flags.boolean({
|
|
341
|
+
description: `[mysql, postgresql] Automatically link types with` +
|
|
342
|
+
` @materializer whenever there is database support` +
|
|
343
|
+
` ${chalk.dim('(https://stepzen.com/docs/features/linking-types)')}`,
|
|
344
|
+
}),
|
|
340
345
|
};
|
|
341
346
|
Import.postgresqlFlags = {
|
|
342
347
|
'db-schema': command_1.flags.string({
|
package/lib/commands/login.js
CHANGED
|
@@ -57,12 +57,14 @@ exports.default = Login;
|
|
|
57
57
|
Login.description = 'log in to StepZen';
|
|
58
58
|
Login.flags = Object.assign(Object.assign({}, zen_command_1.default.flags), { account: command_1.flags.string({
|
|
59
59
|
char: 'a',
|
|
60
|
+
description: 'StepZen account name (copy from https://stepzen.com/account).' +
|
|
61
|
+
' If not provided, the CLI prompts the users to enter one.',
|
|
60
62
|
exclusive: ['config', 'public'],
|
|
61
|
-
hidden: true,
|
|
62
63
|
}), adminkey: command_1.flags.string({
|
|
63
64
|
char: 'k',
|
|
65
|
+
description: 'Admin key (copy from https://stepzen.com/account)' +
|
|
66
|
+
' If not provided, the CLI prompts the users to enter one.',
|
|
64
67
|
exclusive: ['config', 'public'],
|
|
65
|
-
hidden: true,
|
|
66
68
|
}), public: command_1.flags.boolean({
|
|
67
69
|
description: 'Create a public anonymous StepZen account and use it. This is handy' +
|
|
68
70
|
' for trying StepZen out, but it not suitable for handling private' +
|
package/lib/commands/start.js
CHANGED
|
@@ -8,6 +8,7 @@ const command_1 = require("@oclif/command");
|
|
|
8
8
|
const errors_1 = require("@oclif/errors");
|
|
9
9
|
const throttle_debounce_1 = require("throttle-debounce");
|
|
10
10
|
const detect = require("detect-port");
|
|
11
|
+
const lodash_1 = require("lodash");
|
|
11
12
|
const start_1 = require("../start");
|
|
12
13
|
const constants_1 = require("../shared/constants");
|
|
13
14
|
const zen_command_1 = require("../shared/zen-command");
|
|
@@ -31,12 +32,22 @@ class Start extends zen_command_1.default {
|
|
|
31
32
|
if (flags.port !== port) {
|
|
32
33
|
throw new errors_1.CLIError(`Could not start - port ${flags.port} is already in use`);
|
|
33
34
|
}
|
|
35
|
+
const printEndpointDetailsOnce = lodash_1.once(() => {
|
|
36
|
+
start_1.success({
|
|
37
|
+
workspace,
|
|
38
|
+
account: configuration.account,
|
|
39
|
+
port: flags.port,
|
|
40
|
+
});
|
|
41
|
+
this.log();
|
|
42
|
+
});
|
|
34
43
|
// This is the file watcher
|
|
35
44
|
if (!flags['no-watcher']) {
|
|
36
45
|
const redeploy = throttle_debounce_1.debounce(500, (path) => {
|
|
37
46
|
debug('stepzen:start')(`chokidar decected change to ${path}`);
|
|
38
47
|
start_1.changed({ workspace, file: path });
|
|
39
|
-
start_1.deploy({ workspace, flags })
|
|
48
|
+
start_1.deploy({ workspace, flags }).then(didDeploy => {
|
|
49
|
+
didDeploy && printEndpointDetailsOnce();
|
|
50
|
+
});
|
|
40
51
|
});
|
|
41
52
|
chokidar
|
|
42
53
|
.watch(['**/*.graphql', 'config.yaml'], {
|
|
@@ -82,12 +93,7 @@ class Start extends zen_command_1.default {
|
|
|
82
93
|
core_1.CliUx.ux.action.stop();
|
|
83
94
|
if (!flags['no-console']) {
|
|
84
95
|
if (didDeploy) {
|
|
85
|
-
|
|
86
|
-
workspace,
|
|
87
|
-
account: configuration.account,
|
|
88
|
-
port: flags.port,
|
|
89
|
-
});
|
|
90
|
-
this.log();
|
|
96
|
+
printEndpointDetailsOnce();
|
|
91
97
|
}
|
|
92
98
|
if (!flags['no-watcher']) {
|
|
93
99
|
start_1.watching(workspace);
|
package/lib/generate/helpers.js
CHANGED
|
@@ -203,7 +203,8 @@ exports.queryIntrospectionService = async (query) => {
|
|
|
203
203
|
const compileError = (error) => {
|
|
204
204
|
var _a;
|
|
205
205
|
return error.message +
|
|
206
|
-
(((_a = error.extensions) === null || _a === void 0 ? void 0 : _a.details) ? `: ${error.extensions.details}`
|
|
206
|
+
(((_a = error.extensions) === null || _a === void 0 ? void 0 : _a.details) ? `: ${JSON.stringify(error.extensions.details)}`
|
|
207
|
+
: '');
|
|
207
208
|
};
|
|
208
209
|
return { error: json.errors.map(compileError).join('\n') };
|
|
209
210
|
}
|
package/lib/generate/index.js
CHANGED
|
@@ -4,7 +4,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
4
4
|
const errors_1 = require("@oclif/errors");
|
|
5
5
|
const core_1 = require("@oclif/core");
|
|
6
6
|
const fs = require("fs-extra");
|
|
7
|
-
const
|
|
7
|
+
const lodash_1 = require("lodash");
|
|
8
8
|
const path = require("path");
|
|
9
9
|
const transpiler = require("@stepzen/transpiler");
|
|
10
10
|
const helpers_1 = require("./helpers");
|
|
@@ -73,7 +73,7 @@ exports.default = async ({ schema, name, onConflict, source, preAnswered = {}, }
|
|
|
73
73
|
result = await helpers_1.askTemplateQuestions(schema, generator, answers);
|
|
74
74
|
}
|
|
75
75
|
generator.answers = result;
|
|
76
|
-
answers =
|
|
76
|
+
answers = lodash_1.merge(answers, result);
|
|
77
77
|
// We now have all the answers! Generate schemas
|
|
78
78
|
console.log();
|
|
79
79
|
core_1.CliUx.ux.action.start('Generating schemas...');
|
package/lib/start/deploy.js
CHANGED
|
@@ -35,7 +35,7 @@ exports.default = async ({ workspace, flags, }) => {
|
|
|
35
35
|
const deployArgs = [workspace.endpoint, '--silent'];
|
|
36
36
|
const uploadCmds = [];
|
|
37
37
|
const configPath = path.join(workspace.schema, 'config.yaml');
|
|
38
|
-
if (fs.existsSync(configPath)) {
|
|
38
|
+
if (fs.existsSync(configPath) && fs.statSync(configPath).size > 0) {
|
|
39
39
|
deployArgs.push('--configurationsets', `${workspace.endpoint},stepzen/default`);
|
|
40
40
|
uploadCmds.push([
|
|
41
41
|
'configurationset',
|
|
@@ -61,7 +61,7 @@ exports.default = async ({ workspace, flags, }) => {
|
|
|
61
61
|
const logError = (error) => {
|
|
62
62
|
try {
|
|
63
63
|
const zenctlError = JSON.parse(error.message);
|
|
64
|
-
const msg = zenctlError[0].message;
|
|
64
|
+
const msg = zenctlError[0].message || zenctlError[0] || zenctlError;
|
|
65
65
|
console.log('');
|
|
66
66
|
console.log(chalk.red(msg));
|
|
67
67
|
}
|
package/oclif.manifest.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":"0.18.0-beta.0","commands":{"deploy":{"id":"deploy","description":"deploy to stepzen","pluginName":"stepzen","pluginType":"core","aliases":[],"flags":{"non-interactive":{"name":"non-interactive","type":"boolean","description":"disable all interactive prompts","hidden":true,"allowNo":false},"configurationsets":{"name":"configurationsets","type":"option","description":"Configurationsets to use","default":""},"help":{"name":"help","type":"boolean","char":"h","description":"show CLI help","allowNo":false},"schema":{"name":"schema","type":"option","description":"Schema to use","required":true},"silent":{"name":"silent","type":"boolean","allowNo":false}},"args":[{"name":"destination","description":"destination","required":true}]},"import":{"id":"import","description":"import a schema for an external data source or a API endpoint to your GraphQL API","pluginName":"stepzen","pluginType":"core","aliases":[],"flags":{"non-interactive":{"name":"non-interactive","type":"boolean","description":"disable all interactive prompts","hidden":true,"allowNo":false},"dir":{"name":"dir","type":"option","description":"working directory"},"help":{"name":"help","type":"boolean","char":"h","description":"show CLI help","allowNo":false},"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 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 cURL endpoint."},"query-type":{"name":"query-type","type":"option","description":"[curl] name for the type returned by the cURL endpoint 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"},"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-schema":{"name":"db-schema","type":"option","description":"[postgresql] database schema"}},"args":[{"name":"schema","required":true}]},"init":{"id":"init","description":"stepzen init","pluginName":"stepzen","pluginType":"core","hidden":true,"aliases":[],"flags":{"non-interactive":{"name":"non-interactive","type":"boolean","description":"disable all interactive prompts","hidden":true,"allowNo":false},"endpoint":{"name":"endpoint","type":"option","hidden":true},"help":{"name":"help","type":"boolean","char":"h","description":"show CLI help","allowNo":false},"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":{"non-interactive":{"name":"non-interactive","type":"boolean","description":"disable all interactive prompts","hidden":true,"allowNo":false},"dir":{"name":"dir","type":"option","hidden":true},"help":{"name":"help","type":"boolean","char":"h","description":"show CLI help","allowNo":false}},"args":[]},"list":{"id":"list","description":"list your items","pluginName":"stepzen","pluginType":"core","aliases":[],"flags":{"non-interactive":{"name":"non-interactive","type":"boolean","description":"disable all interactive prompts","hidden":true,"allowNo":false},"help":{"name":"help","type":"boolean","char":"h","description":"show CLI help","allowNo":false}},"args":[{"name":"type","description":"type","required":true,"options":["configurationsets","schemas"]}]},"login":{"id":"login","description":"log in to StepZen","pluginName":"stepzen","pluginType":"core","aliases":[],"flags":{"non-interactive":{"name":"non-interactive","type":"boolean","description":"disable all interactive prompts","hidden":true,"allowNo":false},"account":{"name":"account","type":"option","char":"a","hidden":true},"adminkey":{"name":"adminkey","type":"option","char":"k","hidden":true},"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},"help":{"name":"help","type":"boolean","char":"h","description":"show CLI help","allowNo":false}},"args":[]},"logout":{"id":"logout","description":"log out of StepZen","pluginName":"stepzen","pluginType":"core","aliases":[],"flags":{"non-interactive":{"name":"non-interactive","type":"boolean","description":"disable all interactive prompts","hidden":true,"allowNo":false},"help":{"name":"help","type":"boolean","char":"h","description":"show CLI help","allowNo":false}},"args":[]},"start":{"id":"start","description":"upload and deploy your schema","pluginName":"stepzen","pluginType":"core","aliases":[],"flags":{"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"},"help":{"name":"help","type":"boolean","char":"h","description":"show CLI help","allowNo":false},"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":{"non-interactive":{"name":"non-interactive","type":"boolean","description":"disable all interactive prompts","hidden":true,"allowNo":false},"config":{"name":"config","type":"option","hidden":true},"help":{"name":"help","type":"boolean","char":"h","description":"show CLI help","allowNo":false},"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":"upload to StepZen","pluginName":"stepzen","pluginType":"core","aliases":[],"flags":{"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"},"help":{"name":"help","type":"boolean","char":"h","description":"show CLI help","allowNo":false},"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":{"non-interactive":{"name":"non-interactive","type":"boolean","description":"disable all interactive prompts","hidden":true,"allowNo":false},"help":{"name":"help","type":"boolean","char":"h","description":"show CLI help","allowNo":false}},"args":[{"name":"folder","required":true}]},"whoami":{"id":"whoami","description":"display your credentials with StepZen whoami","pluginName":"stepzen","pluginType":"core","hidden":true,"aliases":[],"flags":{"non-interactive":{"name":"non-interactive","type":"boolean","description":"disable all interactive prompts","hidden":true,"allowNo":false},"help":{"name":"help","type":"boolean","char":"h","description":"show CLI help","allowNo":false},"showkeys":{"name":"showkeys","type":"boolean","allowNo":false},"apikey":{"name":"apikey","type":"boolean","allowNo":false},"adminkey":{"name":"adminkey","type":"boolean","allowNo":false}},"args":[]}}}
|
|
1
|
+
{"version":"0.18.0","commands":{"deploy":{"id":"deploy","description":"deploy to stepzen","pluginName":"stepzen","pluginType":"core","aliases":[],"flags":{"non-interactive":{"name":"non-interactive","type":"boolean","description":"disable all interactive prompts","hidden":true,"allowNo":false},"configurationsets":{"name":"configurationsets","type":"option","description":"Configurationsets to use","default":""},"help":{"name":"help","type":"boolean","char":"h","description":"show CLI help","allowNo":false},"schema":{"name":"schema","type":"option","description":"Schema to use","required":true},"silent":{"name":"silent","type":"boolean","allowNo":false}},"args":[{"name":"destination","description":"destination","required":true}]},"import":{"id":"import","description":"import a schema for an external data source or a API endpoint to your GraphQL API","pluginName":"stepzen","pluginType":"core","aliases":[],"flags":{"non-interactive":{"name":"non-interactive","type":"boolean","description":"disable all interactive prompts","hidden":true,"allowNo":false},"dir":{"name":"dir","type":"option","description":"working directory"},"help":{"name":"help","type":"boolean","char":"h","description":"show CLI help","allowNo":false},"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 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 \u001b[1m\"Authorization: apikey SecretAPIKeyValue\"\u001b[22m"},"header-param":{"name":"header-param","type":"option","description":"[curl, graphql] specifies a parameter in a header value. Can be formed by taking a \u001b[1m-H, --header\u001b[22m flag and replacing the variable part of the header value with a \u001b[1m$paramName\u001b[22m 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 \u001b[1m$apikey\u001b[22m'"},"query-name":{"name":"query-name","type":"option","description":"[curl] property name to add to the Query type as a way to access the imported cURL endpoint."},"query-type":{"name":"query-type","type":"option","description":"[curl] name for the type returned by the cURL endpoint in the generated schema. The name specified by \u001b[1m--query-type\u001b[22m is not prefixed by \u001b[1m--prefix\u001b[22m 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 \u001b[1m$paramName\u001b[22m placeholders.\n\nExample:\nstepzen import curl https://example.com/users/jane/posts/12 --path-params '/users/\u001b[1m$userId\u001b[22m/posts/\u001b[1m$postId\u001b[22m'"},"db-host":{"name":"db-host","type":"option","description":"[mysql, postgresql] database host"},"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 with @materializer whenever there is database support \u001b[2m(https://stepzen.com/docs/features/linking-types)\u001b[22m","allowNo":false},"db-schema":{"name":"db-schema","type":"option","description":"[postgresql] database schema"}},"args":[{"name":"schema","required":true}]},"init":{"id":"init","description":"stepzen init","pluginName":"stepzen","pluginType":"core","hidden":true,"aliases":[],"flags":{"non-interactive":{"name":"non-interactive","type":"boolean","description":"disable all interactive prompts","hidden":true,"allowNo":false},"endpoint":{"name":"endpoint","type":"option","hidden":true},"help":{"name":"help","type":"boolean","char":"h","description":"show CLI help","allowNo":false},"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":{"non-interactive":{"name":"non-interactive","type":"boolean","description":"disable all interactive prompts","hidden":true,"allowNo":false},"dir":{"name":"dir","type":"option","hidden":true},"help":{"name":"help","type":"boolean","char":"h","description":"show CLI help","allowNo":false}},"args":[]},"list":{"id":"list","description":"list your items","pluginName":"stepzen","pluginType":"core","aliases":[],"flags":{"non-interactive":{"name":"non-interactive","type":"boolean","description":"disable all interactive prompts","hidden":true,"allowNo":false},"help":{"name":"help","type":"boolean","char":"h","description":"show CLI help","allowNo":false}},"args":[{"name":"type","description":"type","required":true,"options":["configurationsets","schemas"]}]},"login":{"id":"login","description":"log in to StepZen","pluginName":"stepzen","pluginType":"core","aliases":[],"flags":{"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},"help":{"name":"help","type":"boolean","char":"h","description":"show CLI help","allowNo":false}},"args":[]},"logout":{"id":"logout","description":"log out of StepZen","pluginName":"stepzen","pluginType":"core","aliases":[],"flags":{"non-interactive":{"name":"non-interactive","type":"boolean","description":"disable all interactive prompts","hidden":true,"allowNo":false},"help":{"name":"help","type":"boolean","char":"h","description":"show CLI help","allowNo":false}},"args":[]},"start":{"id":"start","description":"upload and deploy your schema","pluginName":"stepzen","pluginType":"core","aliases":[],"flags":{"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"},"help":{"name":"help","type":"boolean","char":"h","description":"show CLI help","allowNo":false},"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":{"non-interactive":{"name":"non-interactive","type":"boolean","description":"disable all interactive prompts","hidden":true,"allowNo":false},"config":{"name":"config","type":"option","hidden":true},"help":{"name":"help","type":"boolean","char":"h","description":"show CLI help","allowNo":false},"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":"upload to StepZen","pluginName":"stepzen","pluginType":"core","aliases":[],"flags":{"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"},"help":{"name":"help","type":"boolean","char":"h","description":"show CLI help","allowNo":false},"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":{"non-interactive":{"name":"non-interactive","type":"boolean","description":"disable all interactive prompts","hidden":true,"allowNo":false},"help":{"name":"help","type":"boolean","char":"h","description":"show CLI help","allowNo":false}},"args":[{"name":"folder","required":true}]},"whoami":{"id":"whoami","description":"display your credentials with StepZen whoami","pluginName":"stepzen","pluginType":"core","hidden":true,"aliases":[],"flags":{"non-interactive":{"name":"non-interactive","type":"boolean","description":"disable all interactive prompts","hidden":true,"allowNo":false},"help":{"name":"help","type":"boolean","char":"h","description":"show CLI help","allowNo":false},"showkeys":{"name":"showkeys","type":"boolean","allowNo":false},"apikey":{"name":"apikey","type":"boolean","allowNo":false},"adminkey":{"name":"adminkey","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.18.0
|
|
4
|
+
"version": "0.18.0",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Darren Waddell <darren@stepzen.com>",
|
|
7
7
|
"contributors": [
|
|
@@ -32,8 +32,8 @@
|
|
|
32
32
|
"@oclif/errors": "1.3.5",
|
|
33
33
|
"@oclif/plugin-help": "^5.1.12",
|
|
34
34
|
"@stepzen/dashboard": "0.2.0",
|
|
35
|
-
"@stepzen/sdk": "0.11.
|
|
36
|
-
"@stepzen/transpiler": "0.2.
|
|
35
|
+
"@stepzen/sdk": "0.11.4",
|
|
36
|
+
"@stepzen/transpiler": "0.2.1",
|
|
37
37
|
"chalk": "^4.1.1",
|
|
38
38
|
"chokidar": "^3.5.2",
|
|
39
39
|
"compare-versions": "^3.6.0",
|