stepzen 0.9.38-beta.0 → 0.9.38-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 +1 -1
- package/lib/commands/deploy.js +4 -3
- package/lib/commands/init.js +3 -2
- package/lib/commands/list.js +3 -2
- package/lib/commands/login.js +2 -1
- package/lib/commands/start.js +12 -10
- package/lib/commands/transpile.js +2 -1
- package/lib/commands/upload.js +5 -4
- package/lib/commands/validate.js +2 -1
- package/lib/generate/helpers.d.ts +8 -1
- package/lib/generate/helpers.js +69 -13
- package/lib/generate/index.js +4 -3
- package/lib/shared/configuration.js +3 -2
- package/lib/shared/errors.d.ts +4 -0
- package/lib/shared/errors.js +12 -0
- package/lib/shared/utils.js +2 -1
- package/lib/shared/validation.js +7 -6
- package/lib/shared/workspace.js +4 -3
- package/lib/start/console.d.ts +1 -1
- package/lib/start/console.js +4 -11
- package/lib/start/deploy.js +17 -37
- package/oclif.manifest.json +1 -1
- package/package.json +6 -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.9.38-beta.
|
|
32
|
+
stepzen/0.9.38-beta.4 darwin-x64 node-v14.18.3
|
|
33
33
|
$ stepzen --help [COMMAND]
|
|
34
34
|
USAGE
|
|
35
35
|
$ stepzen COMMAND
|
package/lib/commands/deploy.js
CHANGED
|
@@ -6,6 +6,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
6
6
|
// objects, a single schema, and a collection of configurationsets
|
|
7
7
|
// and uses them to produce an endpoint which serves a GraphQL API.
|
|
8
8
|
const command_1 = require("@oclif/command");
|
|
9
|
+
const errors_1 = require("@oclif/errors");
|
|
9
10
|
const actions_1 = require("../shared/actions");
|
|
10
11
|
const configuration_1 = require("../shared/configuration");
|
|
11
12
|
class Deploy extends command_1.Command {
|
|
@@ -13,12 +14,12 @@ class Deploy extends command_1.Command {
|
|
|
13
14
|
const { args, flags } = this.parse(Deploy);
|
|
14
15
|
// Make sure that you definitely specify folder/name
|
|
15
16
|
if (args.destination.includes('/') === false) {
|
|
16
|
-
|
|
17
|
+
throw new errors_1.CLIError('You must specify the folder/name you want to use');
|
|
17
18
|
}
|
|
18
19
|
const configuration = configuration_1.readConfiguration();
|
|
19
20
|
if (!configuration) {
|
|
20
21
|
// Configuration not found. Most likely because someone is not logged in. Exit with error.
|
|
21
|
-
|
|
22
|
+
throw new errors_1.CLIError('You are probably not logged in.');
|
|
22
23
|
}
|
|
23
24
|
if (!flags.silent) {
|
|
24
25
|
this.log('Deploying...');
|
|
@@ -31,7 +32,7 @@ class Deploy extends command_1.Command {
|
|
|
31
32
|
}
|
|
32
33
|
else {
|
|
33
34
|
// Errors. Exit, and output the server's error response
|
|
34
|
-
|
|
35
|
+
throw new errors_1.CLIError(JSON.stringify(response.errors) || 'An error occurred.');
|
|
35
36
|
}
|
|
36
37
|
}
|
|
37
38
|
}
|
package/lib/commands/init.js
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
// Copyright (c) 2020,2021,2022, StepZen, Inc.
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
4
|
const command_1 = require("@oclif/command");
|
|
5
|
+
const errors_1 = require("@oclif/errors");
|
|
5
6
|
const fs = require("fs");
|
|
6
7
|
const glob = require("glob");
|
|
7
8
|
const inquirer = require("inquirer");
|
|
@@ -17,12 +18,12 @@ class Init extends command_1.Command {
|
|
|
17
18
|
// Make sure it is not already a workspace
|
|
18
19
|
const w = workspace_1.getWorkspace(directory);
|
|
19
20
|
if (w)
|
|
20
|
-
|
|
21
|
+
throw new errors_1.CLIError('This is already a workspace, cannot init');
|
|
21
22
|
// If you've passed an endpoint, validate it, and throw an error straight away if needed
|
|
22
23
|
if (flags.endpoint) {
|
|
23
24
|
const error = utils_1.validateEndpoint(flags.endpoint);
|
|
24
25
|
if (typeof error === 'string')
|
|
25
|
-
|
|
26
|
+
throw new errors_1.CLIError(error);
|
|
26
27
|
}
|
|
27
28
|
// Make a suggestion for the endpoint
|
|
28
29
|
const endpoint = flags.endpoint || `api/${moniker_1.default()}`;
|
package/lib/commands/list.js
CHANGED
|
@@ -6,6 +6,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
6
6
|
// of resources stored within a stepzen account.
|
|
7
7
|
// You can use list to retrieve configurationsets and schemas.
|
|
8
8
|
const command_1 = require("@oclif/command");
|
|
9
|
+
const errors_1 = require("@oclif/errors");
|
|
9
10
|
const actions_1 = require("../shared/actions");
|
|
10
11
|
const configuration_1 = require("../shared/configuration");
|
|
11
12
|
class List extends command_1.Command {
|
|
@@ -15,7 +16,7 @@ class List extends command_1.Command {
|
|
|
15
16
|
const configuration = configuration_1.readConfiguration();
|
|
16
17
|
if (!configuration) {
|
|
17
18
|
// Configuration not found. Most likely because someone is not logged in. Exit with error.
|
|
18
|
-
|
|
19
|
+
throw new errors_1.CLIError('You are probably not logged in.');
|
|
19
20
|
}
|
|
20
21
|
const response = await actions_1.list(args.type);
|
|
21
22
|
if (response.success) {
|
|
@@ -30,7 +31,7 @@ class List extends command_1.Command {
|
|
|
30
31
|
}
|
|
31
32
|
else {
|
|
32
33
|
// Error. Exit, and output the server's error response
|
|
33
|
-
|
|
34
|
+
throw new errors_1.CLIError(JSON.stringify(response.errors) || 'An error occurred.');
|
|
34
35
|
}
|
|
35
36
|
}
|
|
36
37
|
}
|
package/lib/commands/login.js
CHANGED
|
@@ -5,6 +5,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
5
5
|
// Stepzen login checks that credentials presented are good and
|
|
6
6
|
// subsequently changes the identity of the logged in account.
|
|
7
7
|
const command_1 = require("@oclif/command");
|
|
8
|
+
const errors_1 = require("@oclif/errors");
|
|
8
9
|
const cli_ux_1 = require("cli-ux");
|
|
9
10
|
const configuration_1 = require("../shared/configuration");
|
|
10
11
|
class Login extends command_1.Command {
|
|
@@ -45,7 +46,7 @@ class Login extends command_1.Command {
|
|
|
45
46
|
const isValidConfiguration = await configuration_1.verifyConfiguration(configuration);
|
|
46
47
|
if (!isValidConfiguration) {
|
|
47
48
|
// Exit, with error
|
|
48
|
-
|
|
49
|
+
throw new errors_1.CLIError('We are unable to verify your account details. Could you please check them?');
|
|
49
50
|
}
|
|
50
51
|
// Change the default account.
|
|
51
52
|
configuration_1.writeConfigurationToLoginFile(configuration);
|
package/lib/commands/start.js
CHANGED
|
@@ -4,6 +4,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
4
4
|
const chokidar = require("chokidar");
|
|
5
5
|
const cli_ux_1 = require("cli-ux");
|
|
6
6
|
const command_1 = require("@oclif/command");
|
|
7
|
+
const errors_1 = require("@oclif/errors");
|
|
7
8
|
const throttle_debounce_1 = require("throttle-debounce");
|
|
8
9
|
const detect = require("detect-port");
|
|
9
10
|
const configuration_1 = require("../shared/configuration");
|
|
@@ -21,7 +22,7 @@ class Start extends command_1.Command {
|
|
|
21
22
|
const configuration = configuration_1.readConfiguration();
|
|
22
23
|
if (!configuration) {
|
|
23
24
|
// Configuration not found. Most likely because someone is not logged in. Exit with error.
|
|
24
|
-
|
|
25
|
+
throw new errors_1.CLIError('You are probably not logged in.');
|
|
25
26
|
}
|
|
26
27
|
// Get the working directory and workspace
|
|
27
28
|
const directory = utils_1.getDirectory(flags.dir);
|
|
@@ -41,7 +42,7 @@ class Start extends command_1.Command {
|
|
|
41
42
|
// Check the port is available
|
|
42
43
|
const port = await detect(flags.port);
|
|
43
44
|
if (flags.port !== port) {
|
|
44
|
-
|
|
45
|
+
throw new errors_1.CLIError(`Could not start - port ${flags.port} is already in use`);
|
|
45
46
|
}
|
|
46
47
|
// This is the file watcher
|
|
47
48
|
if (!flags['no-watcher']) {
|
|
@@ -51,21 +52,23 @@ class Start extends command_1.Command {
|
|
|
51
52
|
})
|
|
52
53
|
.on('change', throttle_debounce_1.debounce(500, async (path) => {
|
|
53
54
|
await utils_1.checkAuth();
|
|
54
|
-
|
|
55
|
-
start_1.deploy(path, workspace, flags);
|
|
55
|
+
utils_1.clearConsole();
|
|
56
|
+
await start_1.deploy(path, workspace, flags);
|
|
57
|
+
await start_1.console(workspace);
|
|
56
58
|
}));
|
|
57
59
|
}
|
|
58
60
|
// Start!
|
|
61
|
+
utils_1.clearConsole();
|
|
59
62
|
cli_ux_1.default.action.start('Starting...');
|
|
60
|
-
if (!flags['no-console']) {
|
|
61
|
-
start_1.console(workspace, flags);
|
|
62
|
-
}
|
|
63
63
|
// Unless explicitly disabled, auto-init
|
|
64
64
|
if (!flags['no-init']) {
|
|
65
65
|
await start_1.deploy(null, workspace, flags);
|
|
66
66
|
}
|
|
67
|
+
if (!flags['no-console']) {
|
|
68
|
+
start_1.console(workspace);
|
|
69
|
+
}
|
|
67
70
|
// Create the dashboard
|
|
68
|
-
if (flags['
|
|
71
|
+
if (!flags['no-dashboard']) {
|
|
69
72
|
const ui = await dashboard({
|
|
70
73
|
account: configuration.account,
|
|
71
74
|
adminkey: configuration.adminkey,
|
|
@@ -84,7 +87,6 @@ class Start extends command_1.Command {
|
|
|
84
87
|
workspace,
|
|
85
88
|
});
|
|
86
89
|
await ui.start();
|
|
87
|
-
await ui.open();
|
|
88
90
|
}
|
|
89
91
|
// Done
|
|
90
92
|
cli_ux_1.default.action.stop();
|
|
@@ -97,7 +99,7 @@ Start.flags = {
|
|
|
97
99
|
endpoint: command_1.flags.string({ description: 'Override workspace endpoint' }),
|
|
98
100
|
help: command_1.flags.help({ char: 'h' }),
|
|
99
101
|
'no-console': command_1.flags.boolean({ hidden: true }),
|
|
100
|
-
'
|
|
102
|
+
'no-dashboard': command_1.flags.boolean({ hidden: true }),
|
|
101
103
|
'no-init': command_1.flags.boolean({ hidden: true }),
|
|
102
104
|
'no-server': command_1.flags.boolean({ hidden: true }),
|
|
103
105
|
'no-validate': command_1.flags.boolean({ hidden: true }),
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
4
|
const chalk = require("chalk");
|
|
5
5
|
const command_1 = require("@oclif/command");
|
|
6
|
+
const errors_1 = require("@oclif/errors");
|
|
6
7
|
const fs = require("fs-extra");
|
|
7
8
|
const path = require("path");
|
|
8
9
|
const utils_1 = require("../shared/utils");
|
|
@@ -31,7 +32,7 @@ class Transpile extends command_1.Command {
|
|
|
31
32
|
this.log(stitched);
|
|
32
33
|
}
|
|
33
34
|
catch (error) {
|
|
34
|
-
|
|
35
|
+
throw new errors_1.CLIError(chalk.red(error));
|
|
35
36
|
}
|
|
36
37
|
}
|
|
37
38
|
}
|
package/lib/commands/upload.js
CHANGED
|
@@ -10,6 +10,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
10
10
|
// When uploaded, each resource is stored and referenced using a name
|
|
11
11
|
// provided by the user.
|
|
12
12
|
const command_1 = require("@oclif/command");
|
|
13
|
+
const errors_1 = require("@oclif/errors");
|
|
13
14
|
const configuration_1 = require("../shared/configuration");
|
|
14
15
|
const actions_1 = require("../shared/actions");
|
|
15
16
|
class Upload extends command_1.Command {
|
|
@@ -17,16 +18,16 @@ class Upload extends command_1.Command {
|
|
|
17
18
|
const { args, flags } = this.parse(Upload);
|
|
18
19
|
// Make sure that you definitely specify folder/name
|
|
19
20
|
if (args.destination.includes('/') === false) {
|
|
20
|
-
|
|
21
|
+
throw new errors_1.CLIError('You must specify the folder/name you want to use');
|
|
21
22
|
}
|
|
22
23
|
const configuration = configuration_1.readConfiguration();
|
|
23
24
|
if (!configuration) {
|
|
24
25
|
// Configuration not found. Most likely because someone is not logged in. Exit with error.
|
|
25
|
-
|
|
26
|
+
throw new errors_1.CLIError('You are probably not logged in.');
|
|
26
27
|
}
|
|
27
28
|
if (!flags.file && !flags.dir) {
|
|
28
29
|
// You need to specify a file or directory. Exit with error.
|
|
29
|
-
|
|
30
|
+
throw new errors_1.CLIError('You must specify a file or directory.');
|
|
30
31
|
}
|
|
31
32
|
if (!flags.silent) {
|
|
32
33
|
this.log('Uploading...');
|
|
@@ -39,7 +40,7 @@ class Upload extends command_1.Command {
|
|
|
39
40
|
}
|
|
40
41
|
else {
|
|
41
42
|
// Errors. Exit, and output the server's error response
|
|
42
|
-
|
|
43
|
+
throw new errors_1.CLIError(JSON.stringify(response.errors) || 'An error occurred.');
|
|
43
44
|
}
|
|
44
45
|
}
|
|
45
46
|
}
|
package/lib/commands/validate.js
CHANGED
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
4
|
const chalk = require("chalk");
|
|
5
5
|
const command_1 = require("@oclif/command");
|
|
6
|
+
const errors_1 = require("@oclif/errors");
|
|
6
7
|
const utils_1 = require("../shared/utils");
|
|
7
8
|
const { stitch, validate } = require('@stepzen/transpiler');
|
|
8
9
|
class Validate extends command_1.Command {
|
|
@@ -16,7 +17,7 @@ class Validate extends command_1.Command {
|
|
|
16
17
|
});
|
|
17
18
|
}
|
|
18
19
|
catch (error) {
|
|
19
|
-
|
|
20
|
+
throw new errors_1.CLIError(chalk.red(error));
|
|
20
21
|
}
|
|
21
22
|
}
|
|
22
23
|
}
|
|
@@ -1,5 +1,12 @@
|
|
|
1
|
+
import type { Answers, DistinctQuestion } from 'inquirer';
|
|
1
2
|
export declare const createGeneratorFiles: (id: string, details: any) => Promise<string>;
|
|
2
|
-
export declare
|
|
3
|
+
export declare type GeneratorConfiguration = {
|
|
4
|
+
questions: DistinctQuestion<Answers>[];
|
|
5
|
+
answers: Answers;
|
|
6
|
+
errors: Record<string, any>;
|
|
7
|
+
status: number;
|
|
8
|
+
};
|
|
9
|
+
export declare const getConfiguration: (id: string, details?: any) => Promise<GeneratorConfiguration | null>;
|
|
3
10
|
export declare const getSchemaList: (arg: string) => string[];
|
|
4
11
|
export declare const getTemplates: () => Promise<string>;
|
|
5
12
|
export declare const askGeneratorQuestions: (id: string, settings: any, state: any) => Promise<any>;
|
package/lib/generate/helpers.js
CHANGED
|
@@ -2,6 +2,9 @@
|
|
|
2
2
|
// Copyright (c) 2020,2021,2022, StepZen, Inc.
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
4
|
exports.askTemplateQuestions = exports.askGeneratorQuestions = exports.getTemplates = exports.getSchemaList = exports.getConfiguration = exports.createGeneratorFiles = void 0;
|
|
5
|
+
const errors_1 = require("@oclif/errors");
|
|
6
|
+
const chalk = require("chalk");
|
|
7
|
+
const debug = require("debug");
|
|
5
8
|
const node_fetch_1 = require("node-fetch");
|
|
6
9
|
const fs = require("fs-extra");
|
|
7
10
|
const inquirer = require("inquirer");
|
|
@@ -11,6 +14,7 @@ const path = require("path");
|
|
|
11
14
|
const shell = require("shelljs");
|
|
12
15
|
const configuration_1 = require("../shared/configuration");
|
|
13
16
|
const constants_1 = require("../shared/constants");
|
|
17
|
+
const errors_2 = require("../shared/errors");
|
|
14
18
|
const { version } = require('../../package.json');
|
|
15
19
|
exports.createGeneratorFiles = async (id, details) => {
|
|
16
20
|
const config = configuration_1.readConfiguration();
|
|
@@ -35,10 +39,13 @@ exports.createGeneratorFiles = async (id, details) => {
|
|
|
35
39
|
},
|
|
36
40
|
method: 'POST',
|
|
37
41
|
});
|
|
38
|
-
const { data
|
|
42
|
+
const { data, errors } = await response.json();
|
|
43
|
+
if (errors) {
|
|
44
|
+
throw new errors_1.CLIError(errors_2.formatTemporaryErrorMessage(errors));
|
|
45
|
+
}
|
|
39
46
|
const tmp = path.join(os.tmpdir(), `stepzen-generated-schema-${Date.now()}`);
|
|
40
47
|
fs.ensureDirSync(tmp);
|
|
41
|
-
for (const file of create) {
|
|
48
|
+
for (const file of data.create) {
|
|
42
49
|
const dir = path.join(tmp, file.name);
|
|
43
50
|
fs.writeFileSync(dir, file.content);
|
|
44
51
|
}
|
|
@@ -69,8 +76,29 @@ exports.getConfiguration = async (id, details = {}) => {
|
|
|
69
76
|
},
|
|
70
77
|
method: 'POST',
|
|
71
78
|
});
|
|
72
|
-
const { data } = await response.json();
|
|
73
|
-
|
|
79
|
+
const { data, errors } = await response.json();
|
|
80
|
+
if (errors) {
|
|
81
|
+
return {
|
|
82
|
+
questions: [],
|
|
83
|
+
answers: {},
|
|
84
|
+
status: -1,
|
|
85
|
+
errors: {
|
|
86
|
+
error: errors[0].message,
|
|
87
|
+
},
|
|
88
|
+
};
|
|
89
|
+
}
|
|
90
|
+
try {
|
|
91
|
+
if (data.configure) {
|
|
92
|
+
data.configure.answers = JSON.parse(data.configure.answers);
|
|
93
|
+
data.configure.errors = JSON.parse(data.configure.errors);
|
|
94
|
+
data.configure.questions = JSON.parse(data.configure.questions);
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
catch (error) {
|
|
98
|
+
debug('stepzen:response')(error);
|
|
99
|
+
throw new errors_1.CLIError(errors_2.PERMANENT_STEPZEN_ERROR);
|
|
100
|
+
}
|
|
101
|
+
return data.configure;
|
|
74
102
|
};
|
|
75
103
|
exports.getSchemaList = (arg) => {
|
|
76
104
|
const schemas = arg.split(',').map((schema) => schema.trim());
|
|
@@ -78,10 +106,17 @@ exports.getSchemaList = (arg) => {
|
|
|
78
106
|
for (const schema of schemas) {
|
|
79
107
|
const instances = schemas.filter((s) => s === schema);
|
|
80
108
|
if (instances.length > 1) {
|
|
81
|
-
throw new
|
|
109
|
+
throw new errors_1.CLIError(`You are trying to import "${schema}" more than once`);
|
|
82
110
|
}
|
|
83
111
|
}
|
|
84
|
-
return schemas
|
|
112
|
+
return schemas.map(schema => {
|
|
113
|
+
// support `postgres` as an alias to `postgresql`
|
|
114
|
+
// https://github.com/steprz/stepzen-cli/issues/431
|
|
115
|
+
if (schema.toLowerCase() === 'postgres') {
|
|
116
|
+
return 'postgresql';
|
|
117
|
+
}
|
|
118
|
+
return schema;
|
|
119
|
+
});
|
|
85
120
|
};
|
|
86
121
|
exports.getTemplates = async () => {
|
|
87
122
|
const tmp = path.join(os.tmpdir(), `stepzen-api-templates-${Date.now()}`);
|
|
@@ -90,23 +125,44 @@ exports.getTemplates = async () => {
|
|
|
90
125
|
const command = `git clone ${repository} ${tmp}`;
|
|
91
126
|
const result = shell.exec(command, { silent: true });
|
|
92
127
|
if (result.code !== 0) {
|
|
93
|
-
throw new
|
|
128
|
+
throw new errors_1.CLIError(result.stderr.trim());
|
|
94
129
|
}
|
|
95
130
|
return tmp;
|
|
96
131
|
};
|
|
97
132
|
exports.askGeneratorQuestions = async (id, settings, state) => {
|
|
133
|
+
var _a, _b;
|
|
98
134
|
let status = -1;
|
|
99
135
|
do {
|
|
100
|
-
|
|
136
|
+
if (settings.questions.length === 0) {
|
|
137
|
+
// would cause a hot loop, so it's an error
|
|
138
|
+
throw new errors_1.CLIError(errors_2.PERMANENT_STEPZEN_ERROR);
|
|
139
|
+
}
|
|
140
|
+
const questions = settings.questions.map((question) => (Object.assign(Object.assign({ type: 'password' }, question), {
|
|
141
|
+
// set the previous iteration's answer as the default value, except for password fields
|
|
142
|
+
default: question.type && question.type !== 'password'
|
|
143
|
+
? lodash_1.get(state, question.name)
|
|
144
|
+
: undefined })));
|
|
101
145
|
// eslint-disable-next-line no-await-in-loop
|
|
102
146
|
const answers = await inquirer.prompt(questions);
|
|
103
147
|
state = lodash_1.merge(state, answers);
|
|
104
148
|
// eslint-disable-next-line no-await-in-loop
|
|
105
|
-
const
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
149
|
+
const result = await exports.getConfiguration(id, state);
|
|
150
|
+
if (!result) {
|
|
151
|
+
// at this point the generator ${id} should have been validated
|
|
152
|
+
throw new errors_1.CLIError(errors_2.PERMANENT_STEPZEN_ERROR);
|
|
153
|
+
}
|
|
154
|
+
if (result.status === -1 && result.questions.length === 0) {
|
|
155
|
+
console.log();
|
|
156
|
+
console.log(chalk.red(`A problem occurred when running ${id} import${((_a = result.errors) === null || _a === void 0 ? void 0 : _a.error) ? `: "${(_b = result.errors) === null || _b === void 0 ? void 0 : _b.error}"` : '.'}`));
|
|
157
|
+
console.log('Please try again');
|
|
158
|
+
}
|
|
159
|
+
else {
|
|
160
|
+
settings = {
|
|
161
|
+
questions: result.questions,
|
|
162
|
+
};
|
|
163
|
+
// eslint-disable-next-line require-atomic-updates
|
|
164
|
+
state = lodash_1.merge(state, result.answers);
|
|
165
|
+
}
|
|
110
166
|
status = result.status;
|
|
111
167
|
} while (status === -1);
|
|
112
168
|
return state;
|
package/lib/generate/index.js
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
// Copyright (c) 2020,2021,2022, StepZen, Inc.
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
|
+
const errors_1 = require("@oclif/errors");
|
|
5
6
|
const cli_ux_1 = require("cli-ux");
|
|
6
7
|
const fs = require("fs-extra");
|
|
7
8
|
const lodash = require("lodash");
|
|
@@ -25,10 +26,10 @@ exports.default = async (schemas, source) => {
|
|
|
25
26
|
// Get all generators from...Generators
|
|
26
27
|
for (var _f = tslib_1.__asyncValues(Object.keys(generators)), _g; _g = await _f.next(), !_g.done;) {
|
|
27
28
|
const id = _g.value;
|
|
28
|
-
const
|
|
29
|
+
const configure = await helpers_1.getConfiguration(id, {});
|
|
29
30
|
if (configure) {
|
|
30
31
|
generators[id] = {
|
|
31
|
-
questions:
|
|
32
|
+
questions: configure.questions,
|
|
32
33
|
type: 'generator',
|
|
33
34
|
};
|
|
34
35
|
}
|
|
@@ -79,7 +80,7 @@ exports.default = async (schemas, source) => {
|
|
|
79
80
|
.filter(i => i);
|
|
80
81
|
if (notFound.length > 0) {
|
|
81
82
|
fs.removeSync(templates);
|
|
82
|
-
throw new
|
|
83
|
+
throw new errors_1.CLIError(`Cannot find the schema ${notFound[0]}`);
|
|
83
84
|
}
|
|
84
85
|
try {
|
|
85
86
|
// Ask all the questions
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
4
|
exports.writeConfigurationToLoginFile = exports.verifyConfiguration = exports.removeConfigurationFromLoginFile = exports.importConfiguration = exports.readConfiguration = void 0;
|
|
5
5
|
// This file contains methods for managing configuration
|
|
6
|
+
const errors_1 = require("@oclif/errors");
|
|
6
7
|
const debug = require("debug");
|
|
7
8
|
const node_fetch_1 = require("node-fetch");
|
|
8
9
|
const fs = require("fs");
|
|
@@ -32,7 +33,7 @@ exports.readConfiguration = () => {
|
|
|
32
33
|
};
|
|
33
34
|
exports.importConfiguration = (filepath) => {
|
|
34
35
|
if (!fs.existsSync(filepath)) {
|
|
35
|
-
throw new
|
|
36
|
+
throw new errors_1.CLIError('Configuration file does not exist');
|
|
36
37
|
}
|
|
37
38
|
const configuration = fs.readFileSync(filepath, 'utf8');
|
|
38
39
|
try {
|
|
@@ -41,7 +42,7 @@ exports.importConfiguration = (filepath) => {
|
|
|
41
42
|
return parsed;
|
|
42
43
|
}
|
|
43
44
|
catch (_a) {
|
|
44
|
-
throw new
|
|
45
|
+
throw new errors_1.CLIError('Configuration file is not valid yaml');
|
|
45
46
|
}
|
|
46
47
|
};
|
|
47
48
|
exports.removeConfigurationFromLoginFile = () => {
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Copyright (c) 2020,2021,2022, StepZen, Inc.
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.PERMANENT_STEPZEN_ERROR = exports.formatTemporaryErrorMessage = void 0;
|
|
5
|
+
exports.formatTemporaryErrorMessage = (errors) => `A problem occurred while processing your import${errors.length > 0 && errors[0].message ? `: "${errors[0].message}"` : ''}. Please try again.` +
|
|
6
|
+
` If the issue persists, make sure you are on the latest version of StepZen ` +
|
|
7
|
+
`CLI. And if the issue still persists contact support via the StepZen discord ` +
|
|
8
|
+
`channel (https://discord.gg/9k2VdPn2FR).`;
|
|
9
|
+
exports.PERMANENT_STEPZEN_ERROR = 'An unexpected problem occurred while processing your import.' +
|
|
10
|
+
` If the issue persists, make sure you are on the latest version of StepZen ` +
|
|
11
|
+
`CLI. And if the issue still persists contact support via the StepZen discord ` +
|
|
12
|
+
`channel (https://discord.gg/9k2VdPn2FR).`;
|
package/lib/shared/utils.js
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
// Copyright (c) 2020,2021,2022, StepZen, Inc.
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
4
|
exports.validateEndpoint = exports.getStepZenExtensions = exports.getDirectory = exports.ensureApiKey = exports.clearConsole = exports.checkAuth = void 0;
|
|
5
|
+
const errors_1 = require("@oclif/errors");
|
|
5
6
|
const chalk = require("chalk");
|
|
6
7
|
const debug = require("debug");
|
|
7
8
|
const node_fetch_1 = require("node-fetch");
|
|
@@ -77,7 +78,7 @@ exports.getDirectory = (d = process.cwd()) => {
|
|
|
77
78
|
directory = path.resolve(directory);
|
|
78
79
|
// If the path does not exist, throw an error
|
|
79
80
|
if (!fs.existsSync(directory)) {
|
|
80
|
-
throw new
|
|
81
|
+
throw new errors_1.CLIError(`Cannot find ${directory}`);
|
|
81
82
|
}
|
|
82
83
|
return directory;
|
|
83
84
|
};
|
package/lib/shared/validation.js
CHANGED
|
@@ -2,16 +2,17 @@
|
|
|
2
2
|
// Copyright (c) 2020,2021,2022, StepZen, Inc.
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
4
|
exports.validateSchema = exports.validateConfigurationset = void 0;
|
|
5
|
+
const errors_1 = require("@oclif/errors");
|
|
5
6
|
const fs = require("fs");
|
|
6
7
|
const glob = require("glob");
|
|
7
8
|
const yaml = require("yaml");
|
|
8
9
|
// Validate the Configurationset file
|
|
9
10
|
exports.validateConfigurationset = async (file) => {
|
|
10
11
|
if (!file) {
|
|
11
|
-
throw new
|
|
12
|
+
throw new errors_1.CLIError('You must provide a file path');
|
|
12
13
|
}
|
|
13
14
|
if (!fs.existsSync(file)) {
|
|
14
|
-
throw new
|
|
15
|
+
throw new errors_1.CLIError('The file does not exist');
|
|
15
16
|
}
|
|
16
17
|
const content = fs.readFileSync(file, 'utf8');
|
|
17
18
|
// Ensure the file is valid YAML
|
|
@@ -19,20 +20,20 @@ exports.validateConfigurationset = async (file) => {
|
|
|
19
20
|
yaml.parse(content);
|
|
20
21
|
}
|
|
21
22
|
catch (_a) {
|
|
22
|
-
throw new
|
|
23
|
+
throw new errors_1.CLIError('The file is not valid YAML');
|
|
23
24
|
}
|
|
24
25
|
};
|
|
25
26
|
// Validate the Schema directory
|
|
26
27
|
exports.validateSchema = async (directory) => {
|
|
27
28
|
if (!directory) {
|
|
28
|
-
throw new
|
|
29
|
+
throw new errors_1.CLIError('You must provide a directory path');
|
|
29
30
|
}
|
|
30
31
|
if (!fs.existsSync(directory)) {
|
|
31
|
-
throw new
|
|
32
|
+
throw new errors_1.CLIError('The directory does not exist');
|
|
32
33
|
}
|
|
33
34
|
// Ensure there's a root `index.graphql` file
|
|
34
35
|
const allSchemaFiles = glob.sync('index.graphql', { cwd: directory });
|
|
35
36
|
if (allSchemaFiles.length === 0) {
|
|
36
|
-
throw new
|
|
37
|
+
throw new errors_1.CLIError('Schemas must include an `index.graphql` file');
|
|
37
38
|
}
|
|
38
39
|
};
|
package/lib/shared/workspace.js
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
// Copyright (c) 2020,2021,2022, StepZen, Inc.
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
4
|
exports.getWorkspace = void 0;
|
|
5
|
+
const errors_1 = require("@oclif/errors");
|
|
5
6
|
const fs = require("fs");
|
|
6
7
|
const path = require("path");
|
|
7
8
|
const utils_1 = require("./utils");
|
|
@@ -32,7 +33,7 @@ exports.getWorkspace = (directory) => {
|
|
|
32
33
|
workspace = Object.assign(Object.assign({}, workspace), config);
|
|
33
34
|
}
|
|
34
35
|
catch (_a) {
|
|
35
|
-
throw new
|
|
36
|
+
throw new errors_1.CLIError(`Cannot parse configuration from ${filepath}`);
|
|
36
37
|
}
|
|
37
38
|
}
|
|
38
39
|
// Add the 'schema' property, which is the directory + the 'root'
|
|
@@ -41,10 +42,10 @@ exports.getWorkspace = (directory) => {
|
|
|
41
42
|
if (workspace.directory) {
|
|
42
43
|
const error = utils_1.validateEndpoint(workspace.endpoint);
|
|
43
44
|
if (typeof error === 'string')
|
|
44
|
-
throw new
|
|
45
|
+
throw new errors_1.CLIError(error);
|
|
45
46
|
const schemaExists = fs.existsSync(workspace.schema);
|
|
46
47
|
if (!schemaExists)
|
|
47
|
-
throw new
|
|
48
|
+
throw new errors_1.CLIError(`Cannot find workspace schema folder ${workspace.schema}`);
|
|
48
49
|
return workspace;
|
|
49
50
|
}
|
|
50
51
|
// This is not a workspace folder
|
package/lib/start/console.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default: (workspace: any
|
|
1
|
+
declare const _default: (workspace: any) => Promise<void>;
|
|
2
2
|
export default _default;
|
package/lib/start/console.js
CHANGED
|
@@ -2,22 +2,15 @@
|
|
|
2
2
|
// Copyright (c) 2020,2021,2022, StepZen, Inc.
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
4
|
const chalk = require("chalk");
|
|
5
|
-
const cli_ux_1 = require("cli-ux");
|
|
6
5
|
const fs = require("fs");
|
|
7
6
|
const os = require("os");
|
|
8
7
|
const path = require("path");
|
|
9
|
-
|
|
10
|
-
// eslint-disable-next-line max-params
|
|
11
|
-
exports.default = async (workspace, flags) => {
|
|
12
|
-
utils_1.clearConsole();
|
|
8
|
+
exports.default = async (workspace) => {
|
|
13
9
|
const cwd = workspace.schema.replace(os.homedir(), '~');
|
|
14
10
|
const config = path.join(cwd, 'config.yaml');
|
|
11
|
+
console.log();
|
|
15
12
|
if (fs.existsSync(config)) {
|
|
16
|
-
console.log(`Watching ${chalk.blue(config)} for configuration changes
|
|
17
|
-
}
|
|
18
|
-
console.log(`Watching ${chalk.blue(cwd)} for GraphQL changes`);
|
|
19
|
-
if (flags['local-proxy']) {
|
|
20
|
-
console.log();
|
|
21
|
-
cli_ux_1.default.url(`Running StepZen at http://localhost:${flags.port}/${workspace.endpoint}`, `http://localhost:${flags.port}/${workspace.endpoint}`);
|
|
13
|
+
console.log(`Watching ${chalk.blue(config)} for configuration changes...`);
|
|
22
14
|
}
|
|
15
|
+
console.log(`Watching ${chalk.blue(cwd)} for GraphQL changes...`);
|
|
23
16
|
};
|
package/lib/start/deploy.js
CHANGED
|
@@ -4,9 +4,9 @@ const tslib_1 = require("tslib");
|
|
|
4
4
|
// Copyright (c) 2020,2021,2022, StepZen, Inc.
|
|
5
5
|
const chalk = require("chalk");
|
|
6
6
|
const cli_ux_1 = require("cli-ux");
|
|
7
|
-
const date_fns_1 = require("date-fns");
|
|
8
7
|
const fs = require("fs-extra");
|
|
9
8
|
const path = require("path");
|
|
9
|
+
const prettyMilliseconds = require("pretty-ms");
|
|
10
10
|
const deploy_1 = require("../commands/deploy");
|
|
11
11
|
const configuration_1 = require("../shared/configuration");
|
|
12
12
|
const constants_1 = require("../shared/constants");
|
|
@@ -16,7 +16,6 @@ const dotenv = require('dotenv');
|
|
|
16
16
|
exports.default = async (file, workspace, flags) => {
|
|
17
17
|
var e_1, _a;
|
|
18
18
|
dotenv.config({ path: path.join(workspace.directory, '.env') });
|
|
19
|
-
console.log();
|
|
20
19
|
if (file) {
|
|
21
20
|
console.log(`File changed: ${chalk.blue(file)}`);
|
|
22
21
|
}
|
|
@@ -33,7 +32,7 @@ exports.default = async (file, workspace, flags) => {
|
|
|
33
32
|
return;
|
|
34
33
|
}
|
|
35
34
|
}
|
|
36
|
-
cli_ux_1.default.action.start(
|
|
35
|
+
cli_ux_1.default.action.start(`Deploying ${chalk.yellow(workspace.endpoint)} to StepZen`);
|
|
37
36
|
const deployArgs = [workspace.endpoint, '--silent'];
|
|
38
37
|
const uploadCmds = [];
|
|
39
38
|
const configPath = path.join(workspace.schema, 'config.yaml');
|
|
@@ -72,6 +71,7 @@ exports.default = async (file, workspace, flags) => {
|
|
|
72
71
|
console.log(chalk.red(error));
|
|
73
72
|
}
|
|
74
73
|
};
|
|
74
|
+
const deployStart = new Date().getTime();
|
|
75
75
|
try {
|
|
76
76
|
for (var uploadCmds_1 = tslib_1.__asyncValues(uploadCmds), uploadCmds_1_1; uploadCmds_1_1 = await uploadCmds_1.next(), !uploadCmds_1_1.done;) {
|
|
77
77
|
const cmd = uploadCmds_1_1.value;
|
|
@@ -98,40 +98,20 @@ exports.default = async (file, workspace, flags) => {
|
|
|
98
98
|
logError(error);
|
|
99
99
|
return;
|
|
100
100
|
}
|
|
101
|
-
|
|
102
|
-
const
|
|
103
|
-
|
|
104
|
-
console.log();
|
|
105
|
-
console.log(chalk.green(`Successfully deployed ${what} at ${when}`));
|
|
101
|
+
const deployEnd = new Date().getTime();
|
|
102
|
+
const deployTime = deployEnd - deployStart;
|
|
103
|
+
cli_ux_1.default.action.stop(`${chalk.grey('done in')} ${prettyMilliseconds(deployTime)} 🚀`);
|
|
106
104
|
const domain = constants_1.STEPZEN_DOMAIN.replace('.io', '.net');
|
|
107
105
|
const endpoint = `https://${configuration.account}.${domain}/${workspace.endpoint}/__graphql`;
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
const parts = configuration.apikey.split('::');
|
|
120
|
-
const key = parts[2];
|
|
121
|
-
const firstTwoChars = key.substring(0, 2);
|
|
122
|
-
const lastTwoChars = key.slice(-2);
|
|
123
|
-
const masked = `${firstTwoChars}***${lastTwoChars}`;
|
|
124
|
-
const masked_apikey = `${parts[0]}::${parts[1]}::${masked}`;
|
|
125
|
-
console.log();
|
|
126
|
-
console.log(chalk.grey(`Your GraphQL schema is deployed to`, chalk.green(` ${endpoint}`)));
|
|
127
|
-
console.log();
|
|
128
|
-
console.log(chalk.grey(`You can test your endpoint with cURL:`));
|
|
129
|
-
console.log();
|
|
130
|
-
console.log(`curl ${endpoint} \\`);
|
|
131
|
-
console.log(` --header "Authorization: Apikey ${masked_apikey}" \\`);
|
|
132
|
-
console.log(` --header "Content-Type: application/json" \\`);
|
|
133
|
-
console.log(` --data '{"query": "your graphql query"}' \\`);
|
|
134
|
-
console.log();
|
|
135
|
-
console.log(chalk.grey(firstProxyLine), chalk.green(secondProxyLine));
|
|
136
|
-
}
|
|
106
|
+
console.log();
|
|
107
|
+
console.log(chalk.grey(`Your API url is`, chalk.green(` ${endpoint}`)));
|
|
108
|
+
console.log();
|
|
109
|
+
console.log(chalk.grey(`You can test your hosted API with cURL:`));
|
|
110
|
+
console.log();
|
|
111
|
+
console.log(`curl ${endpoint} \\`);
|
|
112
|
+
console.log(` --header "Authorization: Apikey {{insert yours from https://stepzen.com/account}}" \\`);
|
|
113
|
+
console.log(` --header "Content-Type: application/json" \\`);
|
|
114
|
+
console.log(` --data '{"query": "your graphql query"}'`);
|
|
115
|
+
console.log();
|
|
116
|
+
console.log(chalk.grey(`or explore it with GraphiQL at`), chalk.green(` http://localhost:${flags.port}/${workspace.endpoint}`));
|
|
137
117
|
};
|
package/oclif.manifest.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":"0.9.38-beta.
|
|
1
|
+
{"version":"0.9.38-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}},"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}},"args":[]}}}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "stepzen",
|
|
3
3
|
"description": "The StepZen CLI",
|
|
4
|
-
"version": "0.9.38-beta.
|
|
4
|
+
"version": "0.9.38-beta.4",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Darren Waddell <darren@stepzen.com>",
|
|
7
7
|
"contributors": [
|
|
@@ -28,6 +28,7 @@
|
|
|
28
28
|
"dependencies": {
|
|
29
29
|
"@oclif/command": "^1.8.0",
|
|
30
30
|
"@oclif/config": "^1.17.1",
|
|
31
|
+
"@oclif/errors": "1.3.5",
|
|
31
32
|
"@oclif/plugin-help": "^5.1.10",
|
|
32
33
|
"@stepzen/dashboard": "0.1.36",
|
|
33
34
|
"@stepzen/sdk": "0.9.42",
|
|
@@ -46,6 +47,7 @@
|
|
|
46
47
|
"lodash": "^4.17.21",
|
|
47
48
|
"node-fetch": "^2.6.6",
|
|
48
49
|
"prettier": "^2.4.1",
|
|
50
|
+
"pretty-ms": "^7.0.1",
|
|
49
51
|
"shelljs": "^0.8.5",
|
|
50
52
|
"throttle-debounce": "^3.0.1",
|
|
51
53
|
"yaml": "^1.10.0"
|
|
@@ -72,6 +74,7 @@
|
|
|
72
74
|
"@types/prettier": "^2.1.6",
|
|
73
75
|
"@types/rimraf": "^3.0.0",
|
|
74
76
|
"@types/shelljs": "^0.8.8",
|
|
77
|
+
"@types/sinon-chai": "3.2.8",
|
|
75
78
|
"@types/throttle-debounce": "^2.1.0",
|
|
76
79
|
"@types/unzipper": "^0.10.4",
|
|
77
80
|
"chai": "^4.2.0",
|
|
@@ -89,6 +92,8 @@
|
|
|
89
92
|
"nock": "^13.0.4",
|
|
90
93
|
"nodemon": "^2.0.7",
|
|
91
94
|
"nyc": "^14.1.1",
|
|
95
|
+
"sinon": "13.0.1",
|
|
96
|
+
"sinon-chai": "3.7.0",
|
|
92
97
|
"ts-node": "^8.10.2",
|
|
93
98
|
"typescript": "^3.9.7"
|
|
94
99
|
},
|