stepzen 0.9.39-beta.3 → 0.10.0-beta.4
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 +5 -2
- package/lib/commands/import.js +10 -6
- package/lib/generate/curl2sdl.d.ts +2 -1
- package/lib/generate/curl2sdl.js +13 -36
- package/lib/shared/curl-parser.d.ts +41 -0
- package/lib/shared/curl-parser.js +108 -0
- package/lib/shared/utils.d.ts +0 -15
- package/lib/shared/utils.js +1 -36
- package/oclif.manifest.json +1 -1
- package/package.json +1 -1
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.
|
|
32
|
+
stepzen/0.10.0-beta.4 darwin-x64 node-v14.18.3
|
|
33
33
|
$ stepzen --help [COMMAND]
|
|
34
34
|
USAGE
|
|
35
35
|
$ stepzen COMMAND
|
|
@@ -97,9 +97,12 @@ OPTIONS
|
|
|
97
97
|
--name=name subfolder inside the workspace folder to save the imported schema files, defaults to the
|
|
98
98
|
imported schema name
|
|
99
99
|
|
|
100
|
+
--prefix=prefix [curl] prefix to add every type in the generated schema.
|
|
101
|
+
|
|
100
102
|
--query-name=query-name [curl] property name to add to the Query type as a way to access the imported cURL endpoint.
|
|
101
103
|
|
|
102
|
-
--
|
|
104
|
+
--query-type=query-type [curl] name for the type returned by the cURL endpoint in the generated schema. The name
|
|
105
|
+
specified by --query-type is not prefixed by --prefix if both flags are present.
|
|
103
106
|
```
|
|
104
107
|
|
|
105
108
|
## `stepzen list TYPE`
|
package/lib/commands/import.js
CHANGED
|
@@ -46,7 +46,7 @@ class Import extends command_1.Command {
|
|
|
46
46
|
}
|
|
47
47
|
this.log(chalk.yellow(`NOTE: ${chalk.bold('stepzen import curl')} is currently in ${chalk.bold('beta')}`));
|
|
48
48
|
this.log(chalk.yellow('If you encounter any issues with it please make sure are using the ' +
|
|
49
|
-
'latest version of
|
|
49
|
+
'latest version of StepZen CLI before reporting them to StepZen.'));
|
|
50
50
|
// LATER: introduce a generic graphqlize() API taking in schema as the first arg
|
|
51
51
|
argv.shift(); // remove 'curl' and pass everything else further
|
|
52
52
|
cli_ux_1.cli.action.start('Starting');
|
|
@@ -55,7 +55,8 @@ class Import extends command_1.Command {
|
|
|
55
55
|
name: flags.name,
|
|
56
56
|
source: workspace.schema,
|
|
57
57
|
queryName: flags['query-name'],
|
|
58
|
-
rootType: flags['
|
|
58
|
+
rootType: flags['query-type'],
|
|
59
|
+
typePrefix: flags.prefix,
|
|
59
60
|
});
|
|
60
61
|
cli_ux_1.cli.action.stop();
|
|
61
62
|
if ('error' in resultOrError) {
|
|
@@ -68,7 +69,7 @@ class Import extends command_1.Command {
|
|
|
68
69
|
}
|
|
69
70
|
else {
|
|
70
71
|
;
|
|
71
|
-
['
|
|
72
|
+
['prefix', 'query-type', 'query-name'].forEach(flag => {
|
|
72
73
|
if (flag in flags) {
|
|
73
74
|
this.log(chalk.gray(`The ${chalk.bold(`--${flag}`)} flag only applies when importing ${chalk.bold('curl')}. It will be ignored now.`));
|
|
74
75
|
}
|
|
@@ -105,13 +106,16 @@ Import.flags = {
|
|
|
105
106
|
description: 'subfolder inside the workspace folder to save the imported' +
|
|
106
107
|
' schema files, defaults to the imported schema name',
|
|
107
108
|
}),
|
|
109
|
+
prefix: command_1.flags.string({
|
|
110
|
+
description: '[curl] prefix to add every type in the generated schema.',
|
|
111
|
+
}),
|
|
108
112
|
'query-name': command_1.flags.string({
|
|
109
113
|
description: '[curl] property name to add to the Query type as a way to' +
|
|
110
114
|
' access the imported cURL endpoint.',
|
|
111
115
|
}),
|
|
112
|
-
'
|
|
113
|
-
description: '[curl]
|
|
114
|
-
'
|
|
116
|
+
'query-type': command_1.flags.string({
|
|
117
|
+
description: '[curl] name for the type returned by the cURL endpoint in the ' +
|
|
118
|
+
`generated schema. The name specified by ${chalk.bold('--query-type')} is not prefixed by ${chalk.bold('--prefix')} if both flags are present.`,
|
|
115
119
|
}),
|
|
116
120
|
};
|
|
117
121
|
Import.args = [
|
|
@@ -4,12 +4,13 @@ export declare type Curl2SdlOptions = {
|
|
|
4
4
|
source: string;
|
|
5
5
|
queryName?: string;
|
|
6
6
|
rootType?: string;
|
|
7
|
+
typePrefix?: string;
|
|
7
8
|
};
|
|
8
9
|
export declare type HeaderInput = {
|
|
9
10
|
name: string;
|
|
10
11
|
value: string;
|
|
11
12
|
};
|
|
12
|
-
export declare const curl2sdl: ({ argv, name, source, queryName, rootType, }: Curl2SdlOptions) => Promise<{
|
|
13
|
+
export declare const curl2sdl: ({ argv, name, source, queryName, rootType, typePrefix, }: Curl2SdlOptions) => Promise<{
|
|
13
14
|
error: string;
|
|
14
15
|
} | {
|
|
15
16
|
outPath: string;
|
package/lib/generate/curl2sdl.js
CHANGED
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
// Copyright (c) 2020,2021,2022, StepZen, Inc.
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
4
|
exports.curl2sdl = void 0;
|
|
5
|
-
const parser_1 = require("@oclif/parser");
|
|
6
5
|
const errors_1 = require("@oclif/errors");
|
|
7
6
|
const fs = require("fs-extra");
|
|
8
7
|
const os = require("os");
|
|
@@ -10,53 +9,30 @@ const path = require("path");
|
|
|
10
9
|
const node_fetch_1 = require("node-fetch");
|
|
11
10
|
const debug = require("debug");
|
|
12
11
|
const prettier = require("prettier");
|
|
12
|
+
const transpiler_1 = require("@stepzen/transpiler");
|
|
13
|
+
const curl_parser_1 = require("../shared/curl-parser");
|
|
13
14
|
const constants_1 = require("../shared/constants");
|
|
14
15
|
const errors_2 = require("../shared/errors");
|
|
15
|
-
|
|
16
|
-
const utils_1 = require("../shared/utils");
|
|
17
|
-
const curlArgs = [
|
|
18
|
-
{
|
|
19
|
-
name: 'url',
|
|
20
|
-
required: true,
|
|
21
|
-
},
|
|
22
|
-
];
|
|
23
|
-
const curlFlags = {
|
|
24
|
-
header: parser_1.flags.string({
|
|
25
|
-
char: 'H',
|
|
26
|
-
description: 'Extra header to include in the request when sending ' +
|
|
27
|
-
'HTTP to a server, https://curl.se/docs/manpage.html#-H',
|
|
28
|
-
multiple: true,
|
|
29
|
-
}),
|
|
30
|
-
};
|
|
31
|
-
exports.curl2sdl = async ({ argv, name, source, queryName, rootType, }) => {
|
|
16
|
+
exports.curl2sdl = async ({ argv, name, source, queryName, rootType, typePrefix, }) => {
|
|
32
17
|
let json;
|
|
33
|
-
const
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
}
|
|
37
|
-
const curlHeaders = (flags.header &&
|
|
38
|
-
flags.header
|
|
39
|
-
.map(utils_1.parseCurlHeaderString)
|
|
40
|
-
// a `null` from parseHeaderString() means a header should NOT be sent
|
|
41
|
-
// This is not supported by zenserv / the introspection service so the
|
|
42
|
-
// CLI simply omits such headers
|
|
43
|
-
.filter(h => h !== null)) ||
|
|
44
|
-
[];
|
|
18
|
+
const curlArgs = curl_parser_1.parseCurlArgv(argv);
|
|
19
|
+
if ('error' in curlArgs) {
|
|
20
|
+
throw new errors_1.CLIError(curlArgs.error);
|
|
21
|
+
}
|
|
45
22
|
try {
|
|
46
23
|
const url = `${constants_1.STEPZEN_JSON2SDL_SERVER_URL}/api/graphql`;
|
|
47
|
-
const headers = {
|
|
48
|
-
'Content-Type': 'application/json',
|
|
49
|
-
};
|
|
50
24
|
const query = `query (
|
|
51
25
|
$command: String!
|
|
52
26
|
$queryName: String
|
|
53
27
|
$rootType: String
|
|
28
|
+
$typePrefix: String
|
|
54
29
|
$headers: [HeaderInput!]
|
|
55
30
|
) {
|
|
56
31
|
getSDLFromCurl(
|
|
57
32
|
command: $command
|
|
58
33
|
queryName: $queryName
|
|
59
34
|
rootType: $rootType
|
|
35
|
+
typePrefix: $typePrefix
|
|
60
36
|
headers: $headers
|
|
61
37
|
) {
|
|
62
38
|
sdl
|
|
@@ -64,10 +40,11 @@ exports.curl2sdl = async ({ argv, name, source, queryName, rootType, }) => {
|
|
|
64
40
|
}
|
|
65
41
|
}`;
|
|
66
42
|
const variables = {
|
|
67
|
-
command:
|
|
43
|
+
command: curlArgs.url,
|
|
68
44
|
queryName: queryName || null,
|
|
69
45
|
rootType: rootType || null,
|
|
70
|
-
|
|
46
|
+
typePrefix: typePrefix || null,
|
|
47
|
+
headers: curlArgs.headers.length > 0 ? curlArgs.headers : null,
|
|
71
48
|
};
|
|
72
49
|
debug('stepzen:curl2sdl')(url);
|
|
73
50
|
debug('stepzen:curl2sdl')(query);
|
|
@@ -79,7 +56,7 @@ exports.curl2sdl = async ({ argv, name, source, queryName, rootType, }) => {
|
|
|
79
56
|
debug('stepzen:curl2sdl')(payload);
|
|
80
57
|
const response = await node_fetch_1.default(url, {
|
|
81
58
|
method: 'POST',
|
|
82
|
-
headers,
|
|
59
|
+
headers: { 'Content-Type': 'application/json' },
|
|
83
60
|
body: JSON.stringify({
|
|
84
61
|
query,
|
|
85
62
|
variables,
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Parse a header string according to https://curl.se/docs/manpage.html#-H
|
|
3
|
+
* and https://datatracker.ietf.org/doc/html/rfc2616#section-4.2
|
|
4
|
+
*
|
|
5
|
+
* @param {*} header a curl header string, e.g. `"api-key: asfdasdfad"`
|
|
6
|
+
* @returns {*} a name/value record or
|
|
7
|
+
* `null` for the `Header:` notation that means "remove this header" in
|
|
8
|
+
* the cURL spec or a error object if cannot parse the string.
|
|
9
|
+
*/
|
|
10
|
+
export declare const parseCurlHeaderString: (header: string) => {
|
|
11
|
+
name: string;
|
|
12
|
+
value: string;
|
|
13
|
+
} | null | {
|
|
14
|
+
error: string;
|
|
15
|
+
};
|
|
16
|
+
export interface CurlArguments {
|
|
17
|
+
url: string;
|
|
18
|
+
headers: Array<{
|
|
19
|
+
name: string;
|
|
20
|
+
value: string;
|
|
21
|
+
}>;
|
|
22
|
+
}
|
|
23
|
+
export interface ParseError {
|
|
24
|
+
error: string;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Parse a curl command line arguments array to a JSON structure consumable by
|
|
28
|
+
* the StepZen introspection service backend.
|
|
29
|
+
*
|
|
30
|
+
* @param {*} argv an array of curl arguments `[
|
|
31
|
+
* '-H',
|
|
32
|
+
* 'api-key: my-secret-key',
|
|
33
|
+
* '--header',
|
|
34
|
+
* 'x-custom-options: my-custom-option-2',
|
|
35
|
+
* 'https://test.stepzen.net/version',
|
|
36
|
+
* '--dir',
|
|
37
|
+
* '/my-app'
|
|
38
|
+
* ]`
|
|
39
|
+
* @returns {*} a structured object with the curl arguments
|
|
40
|
+
*/
|
|
41
|
+
export declare const parseCurlArgv: (argv: readonly string[]) => CurlArguments | ParseError;
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Copyright (c) 2020,2021,2022, StepZen, Inc.
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.parseCurlArgv = exports.parseCurlHeaderString = void 0;
|
|
5
|
+
// Based on the existing curl flags at https://curl.se/docs/manpage.html
|
|
6
|
+
const curlFlagRegex = /^(-[a-zA-Z0-9.:#])|(--[a-zA-Z0-9.-]+)$/;
|
|
7
|
+
// Based on the definition of a `token` at
|
|
8
|
+
// https://datatracker.ietf.org/doc/html/rfc2616#page-17
|
|
9
|
+
const httpHeaderRegex = /^(?<name>[a-zA-Z0-9!#$%&'*+,-.^_`|~]+)\s*:(?<value>.*)$/;
|
|
10
|
+
/**
|
|
11
|
+
* Parse a header string according to https://curl.se/docs/manpage.html#-H
|
|
12
|
+
* and https://datatracker.ietf.org/doc/html/rfc2616#section-4.2
|
|
13
|
+
*
|
|
14
|
+
* @param {*} header a curl header string, e.g. `"api-key: asfdasdfad"`
|
|
15
|
+
* @returns {*} a name/value record or
|
|
16
|
+
* `null` for the `Header:` notation that means "remove this header" in
|
|
17
|
+
* the cURL spec or a error object if cannot parse the string.
|
|
18
|
+
*/
|
|
19
|
+
exports.parseCurlHeaderString = (header) => {
|
|
20
|
+
const trimmed = header.trim();
|
|
21
|
+
// Check if it's a `Header:` case
|
|
22
|
+
if (trimmed.indexOf(':') === trimmed.length - 1) {
|
|
23
|
+
// the user intent was to _remove_ this header
|
|
24
|
+
return null;
|
|
25
|
+
}
|
|
26
|
+
// Check if it's a `Header;` case
|
|
27
|
+
if (trimmed.indexOf(';') === trimmed.length - 1) {
|
|
28
|
+
return {
|
|
29
|
+
name: trimmed.substring(0, trimmed.length - 1).trim(),
|
|
30
|
+
value: '',
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
const match = trimmed.match(httpHeaderRegex);
|
|
34
|
+
if (!match || !match.groups || !match.groups.name || !match.groups.value) {
|
|
35
|
+
return {
|
|
36
|
+
error: `Unexpected header syntax in "${header}". ` +
|
|
37
|
+
`Expected "[name]: [value]", "[name];" or "[name]:"`,
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
return {
|
|
41
|
+
name: match.groups.name,
|
|
42
|
+
value: match.groups.value.trim(),
|
|
43
|
+
};
|
|
44
|
+
};
|
|
45
|
+
const isAFlagArg = (arg) => curlFlagRegex.test(arg);
|
|
46
|
+
const isAHeaderFlag = (flag) => ['-H', '--header'].includes(flag);
|
|
47
|
+
/**
|
|
48
|
+
* Parse a curl command line arguments array to a JSON structure consumable by
|
|
49
|
+
* the StepZen introspection service backend.
|
|
50
|
+
*
|
|
51
|
+
* @param {*} argv an array of curl arguments `[
|
|
52
|
+
* '-H',
|
|
53
|
+
* 'api-key: my-secret-key',
|
|
54
|
+
* '--header',
|
|
55
|
+
* 'x-custom-options: my-custom-option-2',
|
|
56
|
+
* 'https://test.stepzen.net/version',
|
|
57
|
+
* '--dir',
|
|
58
|
+
* '/my-app'
|
|
59
|
+
* ]`
|
|
60
|
+
* @returns {*} a structured object with the curl arguments
|
|
61
|
+
*/
|
|
62
|
+
exports.parseCurlArgv = (argv) => {
|
|
63
|
+
const result = {
|
|
64
|
+
url: '',
|
|
65
|
+
headers: [],
|
|
66
|
+
};
|
|
67
|
+
for (let i = 0; i < argv.length; i++) {
|
|
68
|
+
if (isAFlagArg(argv[i])) {
|
|
69
|
+
if (isAHeaderFlag(argv[i])) {
|
|
70
|
+
if (i + 1 === argv.length) {
|
|
71
|
+
return {
|
|
72
|
+
error: `The '${argv[i]}' curl flag requires a value`,
|
|
73
|
+
};
|
|
74
|
+
}
|
|
75
|
+
const headerOrError = exports.parseCurlHeaderString(argv[i + 1]);
|
|
76
|
+
if (headerOrError && 'error' in headerOrError) {
|
|
77
|
+
return headerOrError; // error
|
|
78
|
+
}
|
|
79
|
+
// A `null` from parseCurlHeaderString() means a header should NOT be
|
|
80
|
+
// sent. This is not supported by zenserv / the introspection service
|
|
81
|
+
// so the CLI simply omits such headers
|
|
82
|
+
if (headerOrError) {
|
|
83
|
+
result.headers.push(headerOrError); // header
|
|
84
|
+
}
|
|
85
|
+
i += 1; // skip over the flag value
|
|
86
|
+
}
|
|
87
|
+
else {
|
|
88
|
+
return {
|
|
89
|
+
error: `The '${argv[i]}' curl flag is not currently supported by StepZen CLI`,
|
|
90
|
+
};
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
else if (result.url) {
|
|
94
|
+
return {
|
|
95
|
+
error: `Multiple URLs are not currently supported by StepZen CLI (${argv[i]})`,
|
|
96
|
+
};
|
|
97
|
+
}
|
|
98
|
+
else {
|
|
99
|
+
result.url = argv[i];
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
if (!result.url) {
|
|
103
|
+
return {
|
|
104
|
+
error: 'curl: a URL is required',
|
|
105
|
+
};
|
|
106
|
+
}
|
|
107
|
+
return result;
|
|
108
|
+
};
|
package/lib/shared/utils.d.ts
CHANGED
|
@@ -5,18 +5,3 @@ export declare const getDirectory: (d?: string | undefined) => string;
|
|
|
5
5
|
export declare const getStepZenExtensions: () => Promise<string>;
|
|
6
6
|
export declare const validateEndpoint: (endpoint: string) => any;
|
|
7
7
|
export declare const maskStepZenKey: (key: string) => string;
|
|
8
|
-
/**
|
|
9
|
-
* Parse a header string according to https://curl.se/docs/manpage.html#-H
|
|
10
|
-
* and https://datatracker.ietf.org/doc/html/rfc2616#section-4.2
|
|
11
|
-
*
|
|
12
|
-
* Throws if cannot parse the string.
|
|
13
|
-
*
|
|
14
|
-
* @param {string} header a curl header string, e.g. `"api-key: asfdasdfad"`
|
|
15
|
-
* @returns {{name: string, value: string} | null} a name/value record or
|
|
16
|
-
* `null` for the `Header:` notation that means "remove this header" in
|
|
17
|
-
* the cURL spec.
|
|
18
|
-
*/
|
|
19
|
-
export declare const parseCurlHeaderString: (header: string) => {
|
|
20
|
-
name: string;
|
|
21
|
-
value: string;
|
|
22
|
-
} | null;
|
package/lib/shared/utils.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
// Copyright (c) 2020,2021,2022, StepZen, Inc.
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.
|
|
4
|
+
exports.maskStepZenKey = exports.validateEndpoint = exports.getStepZenExtensions = exports.getDirectory = exports.ensureApiKey = exports.clearConsole = exports.checkAuth = void 0;
|
|
5
5
|
const errors_1 = require("@oclif/errors");
|
|
6
6
|
const chalk = require("chalk");
|
|
7
7
|
const debug = require("debug");
|
|
@@ -112,38 +112,3 @@ exports.maskStepZenKey = (key) => {
|
|
|
112
112
|
const masked = `${parts[0]}::${parts[1]}::${maskedThirdPart} `;
|
|
113
113
|
return masked;
|
|
114
114
|
};
|
|
115
|
-
/**
|
|
116
|
-
* Parse a header string according to https://curl.se/docs/manpage.html#-H
|
|
117
|
-
* and https://datatracker.ietf.org/doc/html/rfc2616#section-4.2
|
|
118
|
-
*
|
|
119
|
-
* Throws if cannot parse the string.
|
|
120
|
-
*
|
|
121
|
-
* @param {string} header a curl header string, e.g. `"api-key: asfdasdfad"`
|
|
122
|
-
* @returns {{name: string, value: string} | null} a name/value record or
|
|
123
|
-
* `null` for the `Header:` notation that means "remove this header" in
|
|
124
|
-
* the cURL spec.
|
|
125
|
-
*/
|
|
126
|
-
exports.parseCurlHeaderString = (header) => {
|
|
127
|
-
const trimmed = header.trim();
|
|
128
|
-
// Check if it's a `Header:` case
|
|
129
|
-
if (trimmed.indexOf(':') === trimmed.length - 1) {
|
|
130
|
-
// the user intent was to _remove_ this header
|
|
131
|
-
return null;
|
|
132
|
-
}
|
|
133
|
-
// Check if it's a `Header;` case
|
|
134
|
-
if (trimmed.indexOf(';') === trimmed.length - 1) {
|
|
135
|
-
return {
|
|
136
|
-
name: trimmed.substring(0, trimmed.length - 1).trim(),
|
|
137
|
-
value: '',
|
|
138
|
-
};
|
|
139
|
-
}
|
|
140
|
-
// the definition of a `token` at https://datatracker.ietf.org/doc/html/rfc2616#page-17
|
|
141
|
-
const match = trimmed.match(/^(?<name>[a-zA-Z0-9!#$%&'*+,-.^_`|~]+)\s*:(?<value>.*)$/);
|
|
142
|
-
if (!match || !match.groups || !match.groups.name || !match.groups.value) {
|
|
143
|
-
throw new errors_1.CLIError(`Unexpected header syntax in "${header}". Expected "[name]: [value]", "[name];" or "[name]:"`);
|
|
144
|
-
}
|
|
145
|
-
return {
|
|
146
|
-
name: match.groups.name.trim(),
|
|
147
|
-
value: match.groups.value.trim(),
|
|
148
|
-
};
|
|
149
|
-
};
|
package/oclif.manifest.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":"0.
|
|
1
|
+
{"version":"0.10.0-beta.4","commands":{"deploy":{"id":"deploy","description":"deploy to stepzen","pluginName":"stepzen","pluginType":"core","aliases":[],"flags":{"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 schemas from stepzen","pluginName":"stepzen","pluginType":"core","aliases":[],"flags":{"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, defaults to the imported schema name"},"prefix":{"name":"prefix","type":"option","description":"[curl] prefix to add every type in the generated schema."},"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."}},"args":[{"name":"schemas","required":true}]},"init":{"id":"init","description":"stepzen init","pluginName":"stepzen","pluginType":"core","hidden":true,"aliases":[],"flags":{"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":{"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":{"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":{"account":{"name":"account","type":"option","char":"a","hidden":true},"adminkey":{"name":"adminkey","type":"option","char":"k","hidden":true},"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":{"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":{"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-server":{"name":"no-server","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":{"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":{"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":{"help":{"name":"help","type":"boolean","char":"h","description":"show CLI help","allowNo":false}},"args":[{"name":"folder","required":true}]},"whoami":{"id":"whoami","description":"stepzen whoami","pluginName":"stepzen","pluginType":"core","hidden":true,"aliases":[],"flags":{"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":[]}}}
|