stepzen 0.11.0-beta.2 → 0.12.0-beta.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 +4 -4
- package/lib/commands/import.js +1 -1
- package/lib/generate/curl2sdl.js +1 -1
- package/lib/generate/helpers.d.ts +4 -0
- package/lib/generate/helpers.js +74 -3
- package/lib/shared/constants.d.ts +1 -0
- package/lib/shared/constants.js +4 -2
- package/lib/shared/workspace.js +2 -2
- package/oclif.manifest.json +1 -1
- package/package.json +5 -4
package/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
The StepZen Command Line Interface (CLI) tool enables you to set up and manage StepZen using commands in your command-line shell.
|
|
4
4
|
|
|
5
|
-
After you have written your GraphQL schema in the form of a Schema Definition Language (SDL) file, and defined your "configuration" in a YAML files, you can upload and deploy them to StepZen using the StepZen CLI - resulting in a live GraphQL endpoint.
|
|
5
|
+
After you have written or imported your GraphQL schema in the form of a Schema Definition Language (SDL) file, and defined your "configuration" in a YAML files, you can upload and deploy them to StepZen using the StepZen CLI - resulting in a live GraphQL endpoint.
|
|
6
6
|
|
|
7
7
|
# Installing
|
|
8
8
|
|
|
@@ -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.12.0-beta.0 darwin-x64 node-v14.19.1
|
|
33
33
|
$ stepzen --help [COMMAND]
|
|
34
34
|
USAGE
|
|
35
35
|
$ stepzen COMMAND
|
|
@@ -80,11 +80,11 @@ OPTIONS
|
|
|
80
80
|
-n, --nested-commands Include all nested commands in the output.
|
|
81
81
|
```
|
|
82
82
|
|
|
83
|
-
_See code: [@oclif/plugin-help](https://github.com/oclif/plugin-help/blob/v5.1.
|
|
83
|
+
_See code: [@oclif/plugin-help](https://github.com/oclif/plugin-help/blob/v5.1.12/src/commands/help.ts)_
|
|
84
84
|
|
|
85
85
|
## `stepzen import SCHEMAS`
|
|
86
86
|
|
|
87
|
-
|
|
87
|
+
Import a schema for an external data source or a API endpoint to your GraphQL API.
|
|
88
88
|
|
|
89
89
|
```
|
|
90
90
|
USAGE
|
package/lib/commands/import.js
CHANGED
|
@@ -120,7 +120,7 @@ class Import extends command_1.Command {
|
|
|
120
120
|
}
|
|
121
121
|
}
|
|
122
122
|
exports.default = Import;
|
|
123
|
-
Import.description = '
|
|
123
|
+
Import.description = 'Import a schema for an external data source or a API endpoint to your GraphQL API.';
|
|
124
124
|
Import.flags = {
|
|
125
125
|
dir: command_1.flags.string({ description: 'working directory' }),
|
|
126
126
|
help: command_1.flags.help({ char: 'h' }),
|
package/lib/generate/curl2sdl.js
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import type { Answers, DistinctQuestion } from 'inquirer';
|
|
2
|
+
export declare const createGeneratorFilesDirectly: (id: string, details: any) => Promise<string>;
|
|
3
|
+
export declare const createGeneratorFilesViaStepZen: (id: string, details: any) => Promise<string>;
|
|
2
4
|
export declare const createGeneratorFiles: (id: string, details: any) => Promise<string>;
|
|
3
5
|
export declare type GeneratorConfiguration = {
|
|
4
6
|
questions: DistinctQuestion<Answers>[];
|
|
@@ -6,6 +8,8 @@ export declare type GeneratorConfiguration = {
|
|
|
6
8
|
errors: Record<string, any>;
|
|
7
9
|
status: number;
|
|
8
10
|
};
|
|
11
|
+
export declare const getConfigurationDirectly: (id: string, details?: any) => Promise<GeneratorConfiguration | null>;
|
|
12
|
+
export declare const getConfigurationViaStepZen: (id: string, details?: any) => Promise<GeneratorConfiguration | null>;
|
|
9
13
|
export declare const getConfiguration: (id: string, details?: any) => Promise<GeneratorConfiguration | null>;
|
|
10
14
|
export declare const getSchemaList: (arg: string) => string[];
|
|
11
15
|
export declare const getTemplates: () => Promise<string>;
|
package/lib/generate/helpers.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.askTemplateQuestions = exports.askGeneratorQuestions = exports.getTemplates = exports.getSchemaList = exports.getConfiguration = exports.createGeneratorFiles = void 0;
|
|
4
|
+
exports.askTemplateQuestions = exports.askGeneratorQuestions = exports.getTemplates = exports.getSchemaList = exports.getConfiguration = exports.getConfigurationViaStepZen = exports.getConfigurationDirectly = exports.createGeneratorFiles = exports.createGeneratorFilesViaStepZen = exports.createGeneratorFilesDirectly = void 0;
|
|
5
5
|
const errors_1 = require("@oclif/errors");
|
|
6
6
|
const chalk = require("chalk");
|
|
7
7
|
const debug = require("debug");
|
|
@@ -16,10 +16,40 @@ const configuration_1 = require("../shared/configuration");
|
|
|
16
16
|
const constants_1 = require("../shared/constants");
|
|
17
17
|
const errors_2 = require("../shared/errors");
|
|
18
18
|
const { version } = require('../../package.json');
|
|
19
|
-
exports.
|
|
19
|
+
exports.createGeneratorFilesDirectly = async (id, details) => {
|
|
20
|
+
const url = `${constants_1.STEPZEN_DIRECT_GENERATOR_ENGINES_URL}/create`;
|
|
21
|
+
debug('stepzen:generate')(`calling the generator engine ${id} via ${url}`);
|
|
22
|
+
try {
|
|
23
|
+
const response = await node_fetch_1.default(url, {
|
|
24
|
+
body: JSON.stringify({
|
|
25
|
+
id,
|
|
26
|
+
details: JSON.stringify(details.answers),
|
|
27
|
+
}),
|
|
28
|
+
headers: {
|
|
29
|
+
'Content-Type': 'application/json',
|
|
30
|
+
'User-Agent': `stepzen-cli/${version}`,
|
|
31
|
+
},
|
|
32
|
+
method: 'POST',
|
|
33
|
+
});
|
|
34
|
+
const files = await response.json();
|
|
35
|
+
const tmp = path.join(os.tmpdir(), `stepzen-generated-schema-${Date.now()}`);
|
|
36
|
+
fs.ensureDirSync(tmp);
|
|
37
|
+
for (const file of files) {
|
|
38
|
+
const dir = path.join(tmp, file.name);
|
|
39
|
+
fs.writeFileSync(dir, file.content);
|
|
40
|
+
}
|
|
41
|
+
return tmp;
|
|
42
|
+
}
|
|
43
|
+
catch (error) {
|
|
44
|
+
debug('stepzen:generate')(error);
|
|
45
|
+
throw new errors_1.CLIError(errors_2.PERMANENT_STEPZEN_ERROR);
|
|
46
|
+
}
|
|
47
|
+
};
|
|
48
|
+
exports.createGeneratorFilesViaStepZen = async (id, details) => {
|
|
20
49
|
const config = configuration_1.readConfiguration();
|
|
21
50
|
const domain = constants_1.STEPZEN_DOMAIN.replace('.io', '.net');
|
|
22
51
|
const url = `https://${config.account}.${domain}/${constants_1.STEPZEN_GENERATOR_ENGINES_ENDPOINT}/__graphql`;
|
|
52
|
+
debug('stepzen:generate')(`calling the generator engine ${id} via ${url}`);
|
|
23
53
|
const response = await node_fetch_1.default(url, {
|
|
24
54
|
body: JSON.stringify({
|
|
25
55
|
query: `
|
|
@@ -51,10 +81,45 @@ exports.createGeneratorFiles = async (id, details) => {
|
|
|
51
81
|
}
|
|
52
82
|
return tmp;
|
|
53
83
|
};
|
|
54
|
-
exports.
|
|
84
|
+
exports.createGeneratorFiles = async (id, details) => {
|
|
85
|
+
const fn = constants_1.STEPZEN_DIRECT_GENERATOR_ENGINES_URL
|
|
86
|
+
? exports.createGeneratorFilesDirectly
|
|
87
|
+
: exports.createGeneratorFilesViaStepZen;
|
|
88
|
+
return fn(id, details);
|
|
89
|
+
};
|
|
90
|
+
exports.getConfigurationDirectly = async (id, details = {}) => {
|
|
91
|
+
const url = `${constants_1.STEPZEN_DIRECT_GENERATOR_ENGINES_URL}/configure`;
|
|
92
|
+
debug('stepzen:generate')(`calling the generator engine ${id} via ${url}`);
|
|
93
|
+
try {
|
|
94
|
+
const response = await node_fetch_1.default(url, {
|
|
95
|
+
body: JSON.stringify({
|
|
96
|
+
id,
|
|
97
|
+
details: JSON.stringify(details),
|
|
98
|
+
}),
|
|
99
|
+
headers: {
|
|
100
|
+
'Content-Type': 'application/json',
|
|
101
|
+
'User-Agent': `stepzen-cli/${version}`,
|
|
102
|
+
},
|
|
103
|
+
method: 'POST',
|
|
104
|
+
});
|
|
105
|
+
const { answers, errors, questions, status } = await response.json();
|
|
106
|
+
return {
|
|
107
|
+
answers: JSON.parse(answers),
|
|
108
|
+
errors: JSON.parse(errors),
|
|
109
|
+
questions: JSON.parse(questions),
|
|
110
|
+
status: JSON.parse(status),
|
|
111
|
+
};
|
|
112
|
+
}
|
|
113
|
+
catch (error) {
|
|
114
|
+
debug('stepzen:generate')(error);
|
|
115
|
+
throw new errors_1.CLIError(errors_2.PERMANENT_STEPZEN_ERROR);
|
|
116
|
+
}
|
|
117
|
+
};
|
|
118
|
+
exports.getConfigurationViaStepZen = async (id, details = {}) => {
|
|
55
119
|
const config = configuration_1.readConfiguration();
|
|
56
120
|
const domain = constants_1.STEPZEN_DOMAIN.replace('.io', '.net');
|
|
57
121
|
const url = `https://${config.account}.${domain}/${constants_1.STEPZEN_GENERATOR_ENGINES_ENDPOINT}/__graphql`;
|
|
122
|
+
debug('stepzen:generate')(`calling the generator engine ${id} via ${url}`);
|
|
58
123
|
const response = await node_fetch_1.default(url, {
|
|
59
124
|
body: JSON.stringify({
|
|
60
125
|
query: `
|
|
@@ -100,6 +165,12 @@ exports.getConfiguration = async (id, details = {}) => {
|
|
|
100
165
|
}
|
|
101
166
|
return data.configure;
|
|
102
167
|
};
|
|
168
|
+
exports.getConfiguration = async (id, details = {}) => {
|
|
169
|
+
const fn = constants_1.STEPZEN_DIRECT_GENERATOR_ENGINES_URL
|
|
170
|
+
? exports.getConfigurationDirectly
|
|
171
|
+
: exports.getConfigurationViaStepZen;
|
|
172
|
+
return fn(id, details);
|
|
173
|
+
};
|
|
103
174
|
exports.getSchemaList = (arg) => {
|
|
104
175
|
const schemas = arg.split(',').map((schema) => schema.trim());
|
|
105
176
|
// Make sure they're unique, otherwise, complain
|
|
@@ -5,6 +5,7 @@ export declare const STEPZEN_DOMAIN: string;
|
|
|
5
5
|
export declare const STEPZEN_SERVER_URL: string;
|
|
6
6
|
export declare const STEPZEN_GENERATOR_ENGINES_SCHEMA: string;
|
|
7
7
|
export declare const STEPZEN_GENERATOR_ENGINES_ENDPOINT = "stepzen-generator/engines";
|
|
8
|
+
export declare const STEPZEN_DIRECT_GENERATOR_ENGINES_URL: string | undefined;
|
|
8
9
|
export declare const STEPZEN_API_TEMPLATES_REPOSITORY = "https://github.com/steprz/stepzen-schemas";
|
|
9
10
|
export declare const ADMIN_DEPLOY_URL = "/cli/admin/deploy";
|
|
10
11
|
export declare const ADMIN_LIST_URL = "/cli/admin/list";
|
package/lib/shared/constants.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.STEPZEN_DISCORD_URL = exports.STEPZEN_JSON2SDL_SERVER_URL = exports.ADMIN_VERIFY_URL = exports.ADMIN_UPLOAD_URL = exports.ADMIN_LIST_URL = exports.ADMIN_DEPLOY_URL = exports.STEPZEN_API_TEMPLATES_REPOSITORY = exports.STEPZEN_GENERATOR_ENGINES_ENDPOINT = exports.STEPZEN_GENERATOR_ENGINES_SCHEMA = exports.STEPZEN_SERVER_URL = exports.STEPZEN_DOMAIN = exports.STEPZEN_CONFIG_FILE = exports.STEPZEN_LAST_UPDATE_CHECK_TIMESTAMP = exports.STEPZEN_CONFIG_DIRECTORY = void 0;
|
|
4
|
+
exports.STEPZEN_DISCORD_URL = exports.STEPZEN_JSON2SDL_SERVER_URL = exports.ADMIN_VERIFY_URL = exports.ADMIN_UPLOAD_URL = exports.ADMIN_LIST_URL = exports.ADMIN_DEPLOY_URL = exports.STEPZEN_API_TEMPLATES_REPOSITORY = exports.STEPZEN_DIRECT_GENERATOR_ENGINES_URL = exports.STEPZEN_GENERATOR_ENGINES_ENDPOINT = exports.STEPZEN_GENERATOR_ENGINES_SCHEMA = exports.STEPZEN_SERVER_URL = exports.STEPZEN_DOMAIN = exports.STEPZEN_CONFIG_FILE = exports.STEPZEN_LAST_UPDATE_CHECK_TIMESTAMP = exports.STEPZEN_CONFIG_DIRECTORY = void 0;
|
|
5
5
|
// This file contains constants and all magic strings
|
|
6
6
|
const dotenv = require("dotenv");
|
|
7
7
|
const os = require("os");
|
|
@@ -9,7 +9,7 @@ const path = require("path");
|
|
|
9
9
|
// This allows you to set environment variables in a `.env` file.
|
|
10
10
|
// This file needs to be in your working directory.
|
|
11
11
|
dotenv.config();
|
|
12
|
-
const { STEPZEN_CONFIG_FILE: ENV_VAR_STEPZEN_CONFIG_FILE, STEPZEN_DOMAIN: ENV_VAR_STEPZEN_DOMAIN, STEPZEN_GENERATOR_ENGINES_SCHEMA: ENV_VAR_STEPZEN_GENERATOR_ENGINES_SCHEMA, STEPZEN_SERVER_URL: ENV_VAR_STEPZEN_SERVER_URL, STEPZEN_JSON2SDL_SERVER_URL: ENV_VAR_STEPZEN_JSON2SDL_SERVER_URL, } = process.env;
|
|
12
|
+
const { STEPZEN_CONFIG_FILE: ENV_VAR_STEPZEN_CONFIG_FILE, STEPZEN_DOMAIN: ENV_VAR_STEPZEN_DOMAIN, STEPZEN_GENERATOR_ENGINES_SCHEMA: ENV_VAR_STEPZEN_GENERATOR_ENGINES_SCHEMA, STEPZEN_SERVER_URL: ENV_VAR_STEPZEN_SERVER_URL, STEPZEN_JSON2SDL_SERVER_URL: ENV_VAR_STEPZEN_JSON2SDL_SERVER_URL, STEPZEN_DIRECT_GENERATOR_ENGINES_URL: ENV_VAR_STEPZEN_DIRECT_GENERATOR_ENGINES_URL, } = process.env;
|
|
13
13
|
// Where your authentication details are stored locally
|
|
14
14
|
exports.STEPZEN_CONFIG_DIRECTORY = path.join(os.homedir(), '.stepzen');
|
|
15
15
|
exports.STEPZEN_LAST_UPDATE_CHECK_TIMESTAMP = path.join(exports.STEPZEN_CONFIG_DIRECTORY, 'last_update_check.timestamp');
|
|
@@ -23,6 +23,8 @@ exports.STEPZEN_SERVER_URL = ENV_VAR_STEPZEN_SERVER_URL || 'https://{account}.st
|
|
|
23
23
|
exports.STEPZEN_GENERATOR_ENGINES_SCHEMA = ENV_VAR_STEPZEN_GENERATOR_ENGINES_SCHEMA || 'stepzen/engines';
|
|
24
24
|
// Generator Engines schema: target API endpoint
|
|
25
25
|
exports.STEPZEN_GENERATOR_ENGINES_ENDPOINT = 'stepzen-generator/engines';
|
|
26
|
+
// If defined, call the generator engines cloud function directly, skipping zenctl
|
|
27
|
+
exports.STEPZEN_DIRECT_GENERATOR_ENGINES_URL = ENV_VAR_STEPZEN_DIRECT_GENERATOR_ENGINES_URL;
|
|
26
28
|
// API Templates repository
|
|
27
29
|
exports.STEPZEN_API_TEMPLATES_REPOSITORY = 'https://github.com/steprz/stepzen-schemas';
|
|
28
30
|
// Paths to the endpoints used (only for tests)
|
package/lib/shared/workspace.js
CHANGED
|
@@ -14,9 +14,9 @@ exports.getWorkspace = (directory) => {
|
|
|
14
14
|
schema: '',
|
|
15
15
|
};
|
|
16
16
|
// Loop through this and all parent directories to find the root
|
|
17
|
-
let parts = directory.split(
|
|
17
|
+
let parts = directory.split(path.sep);
|
|
18
18
|
do {
|
|
19
|
-
const d = `${parts.join(
|
|
19
|
+
const d = `${parts.join(path.sep)}`.replace(/\/*$/, '');
|
|
20
20
|
const f = path.join(d, 'stepzen.config.json');
|
|
21
21
|
if (fs.existsSync(f)) {
|
|
22
22
|
workspace.directory = d;
|
package/oclif.manifest.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":"0.
|
|
1
|
+
{"version":"0.12.0-beta.0","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 a schema for an external data source or a API endpoint to your GraphQL API.","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."},"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'"}},"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":[]}}}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "stepzen",
|
|
3
3
|
"description": "The StepZen CLI",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.12.0-beta.0",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Darren Waddell <darren@stepzen.com>",
|
|
7
7
|
"contributors": [
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
"@oclif/command": "^1.8.0",
|
|
30
30
|
"@oclif/config": "^1.18.3",
|
|
31
31
|
"@oclif/errors": "1.3.5",
|
|
32
|
-
"@oclif/plugin-help": "^5.1.
|
|
32
|
+
"@oclif/plugin-help": "^5.1.12",
|
|
33
33
|
"@stepzen/dashboard": "0.1.37",
|
|
34
34
|
"@stepzen/sdk": "0.9.46",
|
|
35
35
|
"@stepzen/transpiler": "0.0.38",
|
|
@@ -79,6 +79,7 @@
|
|
|
79
79
|
"@types/unzipper": "^0.10.4",
|
|
80
80
|
"chai": "^4.2.0",
|
|
81
81
|
"copyfiles": "^2.4.1",
|
|
82
|
+
"cross-env": "^7.0.3",
|
|
82
83
|
"eslint": "7.11.0",
|
|
83
84
|
"eslint-config-oclif": "3.1.0",
|
|
84
85
|
"eslint-config-oclif-typescript": "0.1.0",
|
|
@@ -118,9 +119,9 @@
|
|
|
118
119
|
"postpack": "rm -f oclif.manifest.json",
|
|
119
120
|
"posttest": "eslint . --ignore-path .prettierignore",
|
|
120
121
|
"prepack": "rm -rf lib && tsc -b && oclif-dev manifest && oclif-dev readme",
|
|
121
|
-
"test": "tsc -b && STEPZEN_DOMAIN=steprz.io STEPZEN_SERVER_URL=http://localhost nyc --extension .ts mocha --forbid-only \"test/**/*.test.ts\"",
|
|
122
|
+
"test": "tsc -b && cross-env STEPZEN_DOMAIN=steprz.io STEPZEN_SERVER_URL=http://localhost nyc --extension .ts mocha --forbid-only \"test/**/*.test.ts\"",
|
|
122
123
|
"test:single:example": "npm run test:single -- test/src/shared/curl-parser.test.ts",
|
|
123
|
-
"test:single": "tsc -b && STEPZEN_DOMAIN=steprz.io STEPZEN_SERVER_URL=http://localhost mocha --forbid-only test/_global.test.ts",
|
|
124
|
+
"test:single": "tsc -b && cross-env STEPZEN_DOMAIN=steprz.io STEPZEN_SERVER_URL=http://localhost mocha --forbid-only test/_global.test.ts",
|
|
124
125
|
"version": "oclif-dev readme && git add README.md",
|
|
125
126
|
"prepare": "husky install"
|
|
126
127
|
},
|