stepzen 0.15.0-beta.1 → 0.15.0-beta.2
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.d.ts +0 -1
- package/lib/commands/import.d.ts +0 -1
- package/lib/commands/init.d.ts +0 -1
- package/lib/commands/lint.d.ts +0 -1
- package/lib/commands/list.d.ts +0 -2
- package/lib/commands/login.d.ts +0 -1
- package/lib/commands/logout.d.ts +0 -2
- package/lib/commands/start.d.ts +0 -1
- package/lib/commands/transpile.d.ts +0 -1
- package/lib/commands/upload.d.ts +0 -1
- package/lib/commands/validate.d.ts +0 -2
- package/lib/commands/whoami.d.ts +0 -2
- package/lib/hooks/prerun/check-upgrade.js +16 -7
- package/lib/shared/configuration.js +2 -2
- package/lib/shared/zen-command.d.ts +1 -2
- package/lib/shared/zen-command.js +12 -24
- package/oclif.manifest.json +1 -1
- package/package.json +12 -8
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.15.0-beta.
|
|
32
|
+
stepzen/0.15.0-beta.2 darwin-x64 node-v14.19.1
|
|
33
33
|
$ stepzen --help [COMMAND]
|
|
34
34
|
USAGE
|
|
35
35
|
$ stepzen COMMAND
|
package/lib/commands/deploy.d.ts
CHANGED
|
@@ -8,7 +8,6 @@ export default class Deploy extends ZenCommand {
|
|
|
8
8
|
schema: flags.IOptionFlag<string>;
|
|
9
9
|
silent: import("@oclif/parser/lib/flags").IBooleanFlag<boolean>;
|
|
10
10
|
'non-interactive': import("@oclif/parser/lib/flags").IBooleanFlag<boolean>;
|
|
11
|
-
'enable-login-prompt': flags.IOptionFlag<boolean | undefined>;
|
|
12
11
|
};
|
|
13
12
|
static args: {
|
|
14
13
|
name: string;
|
package/lib/commands/import.d.ts
CHANGED
|
@@ -12,7 +12,6 @@ export default class Import extends ZenCommand {
|
|
|
12
12
|
'query-type': flags.IOptionFlag<string | undefined>;
|
|
13
13
|
'path-params': flags.IOptionFlag<string | undefined>;
|
|
14
14
|
'non-interactive': import("@oclif/parser/lib/flags").IBooleanFlag<boolean>;
|
|
15
|
-
'enable-login-prompt': flags.IOptionFlag<boolean | undefined>;
|
|
16
15
|
};
|
|
17
16
|
static args: {
|
|
18
17
|
name: string;
|
package/lib/commands/init.d.ts
CHANGED
|
@@ -11,7 +11,6 @@ export default class Init extends ZenCommand {
|
|
|
11
11
|
help: import("@oclif/parser/lib/flags").IBooleanFlag<void>;
|
|
12
12
|
yes: import("@oclif/parser/lib/flags").IBooleanFlag<boolean>;
|
|
13
13
|
'non-interactive': import("@oclif/parser/lib/flags").IBooleanFlag<boolean>;
|
|
14
|
-
'enable-login-prompt': flags.IOptionFlag<boolean | undefined>;
|
|
15
14
|
};
|
|
16
15
|
static args: {
|
|
17
16
|
hidden: boolean;
|
package/lib/commands/lint.d.ts
CHANGED
|
@@ -7,7 +7,6 @@ export default class Init extends ZenCommand {
|
|
|
7
7
|
dir: flags.IOptionFlag<string | undefined>;
|
|
8
8
|
help: import("@oclif/parser/lib/flags").IBooleanFlag<void>;
|
|
9
9
|
'non-interactive': import("@oclif/parser/lib/flags").IBooleanFlag<boolean>;
|
|
10
|
-
'enable-login-prompt': flags.IOptionFlag<boolean | undefined>;
|
|
11
10
|
};
|
|
12
11
|
run(): Promise<void>;
|
|
13
12
|
}
|
package/lib/commands/list.d.ts
CHANGED
|
@@ -1,11 +1,9 @@
|
|
|
1
|
-
import { flags } from '@oclif/command';
|
|
2
1
|
import ZenCommand from '../shared/zen-command';
|
|
3
2
|
export default class List extends ZenCommand {
|
|
4
3
|
static description: string;
|
|
5
4
|
static flags: {
|
|
6
5
|
help: import("@oclif/parser/lib/flags").IBooleanFlag<void>;
|
|
7
6
|
'non-interactive': import("@oclif/parser/lib/flags").IBooleanFlag<boolean>;
|
|
8
|
-
'enable-login-prompt': flags.IOptionFlag<boolean | undefined>;
|
|
9
7
|
};
|
|
10
8
|
static args: {
|
|
11
9
|
name: string;
|
package/lib/commands/login.d.ts
CHANGED
|
@@ -9,7 +9,6 @@ export default class Login extends ZenCommand {
|
|
|
9
9
|
config: flags.IOptionFlag<string | undefined>;
|
|
10
10
|
help: import("@oclif/parser/lib/flags").IBooleanFlag<void>;
|
|
11
11
|
'non-interactive': import("@oclif/parser/lib/flags").IBooleanFlag<boolean>;
|
|
12
|
-
'enable-login-prompt': flags.IOptionFlag<boolean | undefined>;
|
|
13
12
|
};
|
|
14
13
|
run(): Promise<void>;
|
|
15
14
|
}
|
package/lib/commands/logout.d.ts
CHANGED
|
@@ -1,11 +1,9 @@
|
|
|
1
|
-
import { flags } from '@oclif/command';
|
|
2
1
|
import ZenCommand from '../shared/zen-command';
|
|
3
2
|
export default class Logout extends ZenCommand {
|
|
4
3
|
static description: string;
|
|
5
4
|
static flags: {
|
|
6
5
|
help: import("@oclif/parser/lib/flags").IBooleanFlag<void>;
|
|
7
6
|
'non-interactive': import("@oclif/parser/lib/flags").IBooleanFlag<boolean>;
|
|
8
|
-
'enable-login-prompt': flags.IOptionFlag<boolean | undefined>;
|
|
9
7
|
};
|
|
10
8
|
run(): Promise<void>;
|
|
11
9
|
}
|
package/lib/commands/start.d.ts
CHANGED
|
@@ -14,7 +14,6 @@ export default class Start extends ZenCommand {
|
|
|
14
14
|
'no-watcher': import("@oclif/parser/lib/flags").IBooleanFlag<boolean>;
|
|
15
15
|
port: import("@oclif/parser/lib/flags").IOptionFlag<number>;
|
|
16
16
|
'non-interactive': import("@oclif/parser/lib/flags").IBooleanFlag<boolean>;
|
|
17
|
-
'enable-login-prompt': flags.IOptionFlag<boolean | undefined>;
|
|
18
17
|
};
|
|
19
18
|
static args: never[];
|
|
20
19
|
run(): Promise<void>;
|
|
@@ -12,7 +12,6 @@ export default class Transpile extends ZenCommand {
|
|
|
12
12
|
'output-configuration': import("@oclif/parser/lib/flags").IBooleanFlag<boolean>;
|
|
13
13
|
silent: import("@oclif/parser/lib/flags").IBooleanFlag<boolean>;
|
|
14
14
|
'non-interactive': import("@oclif/parser/lib/flags").IBooleanFlag<boolean>;
|
|
15
|
-
'enable-login-prompt': flags.IOptionFlag<boolean | undefined>;
|
|
16
15
|
};
|
|
17
16
|
static args: {
|
|
18
17
|
name: string;
|
package/lib/commands/upload.d.ts
CHANGED
|
@@ -8,7 +8,6 @@ export default class Upload extends ZenCommand {
|
|
|
8
8
|
help: import("@oclif/parser/lib/flags").IBooleanFlag<void>;
|
|
9
9
|
silent: import("@oclif/parser/lib/flags").IBooleanFlag<boolean>;
|
|
10
10
|
'non-interactive': import("@oclif/parser/lib/flags").IBooleanFlag<boolean>;
|
|
11
|
-
'enable-login-prompt': flags.IOptionFlag<boolean | undefined>;
|
|
12
11
|
};
|
|
13
12
|
static args: ({
|
|
14
13
|
name: string;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { flags } from '@oclif/command';
|
|
2
1
|
import ZenCommand from '../shared/zen-command';
|
|
3
2
|
export default class Validate extends ZenCommand {
|
|
4
3
|
static description: string;
|
|
@@ -6,7 +5,6 @@ export default class Validate extends ZenCommand {
|
|
|
6
5
|
static flags: {
|
|
7
6
|
help: import("@oclif/parser/lib/flags").IBooleanFlag<void>;
|
|
8
7
|
'non-interactive': import("@oclif/parser/lib/flags").IBooleanFlag<boolean>;
|
|
9
|
-
'enable-login-prompt': flags.IOptionFlag<boolean | undefined>;
|
|
10
8
|
};
|
|
11
9
|
static args: {
|
|
12
10
|
name: string;
|
package/lib/commands/whoami.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { flags } from '@oclif/command';
|
|
2
1
|
import ZenCommand from '../shared/zen-command';
|
|
3
2
|
export default class WhoAmI extends ZenCommand {
|
|
4
3
|
static description: string;
|
|
@@ -9,7 +8,6 @@ export default class WhoAmI extends ZenCommand {
|
|
|
9
8
|
apikey: import("@oclif/parser/lib/flags").IBooleanFlag<boolean>;
|
|
10
9
|
adminkey: import("@oclif/parser/lib/flags").IBooleanFlag<boolean>;
|
|
11
10
|
'non-interactive': import("@oclif/parser/lib/flags").IBooleanFlag<boolean>;
|
|
12
|
-
'enable-login-prompt': flags.IOptionFlag<boolean | undefined>;
|
|
13
11
|
};
|
|
14
12
|
static args: never[];
|
|
15
13
|
run(): Promise<void>;
|
|
@@ -6,10 +6,10 @@ const chalk = require("chalk");
|
|
|
6
6
|
const compareVersions = require("compare-versions");
|
|
7
7
|
const fs = require("fs-extra");
|
|
8
8
|
const debug_1 = require("debug");
|
|
9
|
+
const parser_1 = require("@oclif/parser");
|
|
9
10
|
const node_fetch_1 = require("node-fetch");
|
|
10
11
|
const constants_1 = require("../../shared/constants");
|
|
11
12
|
const errors_1 = require("../../shared/errors");
|
|
12
|
-
const { version } = require('../../../package.json');
|
|
13
13
|
const majorRegexp = /\d+\./;
|
|
14
14
|
const timeoutBeta = 1000 * 60 * 60 * 24; // one day
|
|
15
15
|
const timeoutStable = 7 * timeoutBeta; // one week
|
|
@@ -89,15 +89,24 @@ ${chalk.green('npm install -g stepzen')}
|
|
|
89
89
|
}
|
|
90
90
|
return result;
|
|
91
91
|
};
|
|
92
|
-
const hook = async function () {
|
|
93
|
-
const { message, isBlocking } = await exports.checkUpgrade(version);
|
|
94
|
-
|
|
92
|
+
const hook = async function (options) {
|
|
93
|
+
const { message, isBlocking } = await exports.checkUpgrade(this.config.version);
|
|
94
|
+
// parse the command line to get `flags['non-interactive']`
|
|
95
|
+
const TheCommand = options.Command;
|
|
96
|
+
const { flags } = parser_1.parse(options.argv, Object.assign({ context: this }, TheCommand));
|
|
97
|
+
// In a non-interactive shell only print the upgrade nudge if the upgrade
|
|
98
|
+
// is blocking.
|
|
99
|
+
// For non-blocking upgrades we don't want to print the upgrade nudge when
|
|
100
|
+
// the CLI is executed as a part of a non-interactive shell script. This
|
|
101
|
+
// additional output might by unexpected by the rest of script and could
|
|
102
|
+
// break the pipeline.
|
|
103
|
+
if (message && (isBlocking || !flags['non-interactive'])) {
|
|
95
104
|
this.log('');
|
|
96
105
|
this.log(message.trim());
|
|
97
106
|
this.log('');
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
107
|
+
}
|
|
108
|
+
if (isBlocking) {
|
|
109
|
+
this.exit(1);
|
|
101
110
|
}
|
|
102
111
|
};
|
|
103
112
|
exports.default = hook;
|
|
@@ -6,7 +6,7 @@ exports.removeCredentialsFromConfigFile = exports.writeCredentialsToConfigFile =
|
|
|
6
6
|
const errors_1 = require("@oclif/errors");
|
|
7
7
|
const debug = require("debug");
|
|
8
8
|
const fs = require("fs");
|
|
9
|
-
const
|
|
9
|
+
const uuid_1 = require("uuid");
|
|
10
10
|
const path = require("path");
|
|
11
11
|
const yaml = require("yaml");
|
|
12
12
|
const stepzen_sdk_1 = require("./stepzen-sdk");
|
|
@@ -35,7 +35,7 @@ exports.ensureValidConfiguration = async (maybeConfiguration) => {
|
|
|
35
35
|
}
|
|
36
36
|
// ensure configuration has a UUID
|
|
37
37
|
if (!configuration.uuid) {
|
|
38
|
-
configuration.uuid =
|
|
38
|
+
configuration.uuid = uuid_1.v4();
|
|
39
39
|
debug('stepzen:configuration')(`Generated a new machine UUID: ${configuration.uuid}`);
|
|
40
40
|
modified = true;
|
|
41
41
|
}
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import { Command
|
|
1
|
+
import { Command } from '@oclif/command';
|
|
2
2
|
import { MachineConfiguration, StepZenCredentials } from './types';
|
|
3
3
|
export declare abstract class ZenCommand extends Command {
|
|
4
4
|
static flags: {
|
|
5
5
|
'non-interactive': import("@oclif/parser/lib/flags").IBooleanFlag<boolean>;
|
|
6
|
-
'enable-login-prompt': flags.IOptionFlag<boolean | undefined>;
|
|
7
6
|
};
|
|
8
7
|
ensureStepZenAccount(): Promise<{
|
|
9
8
|
configuration: import("./types").LoggedInMachineConfiguration;
|
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
4
|
exports.ZenCommand = void 0;
|
|
5
5
|
const command_1 = require("@oclif/command");
|
|
6
|
-
const errors_1 = require("@oclif/errors");
|
|
7
6
|
const inquirer = require("inquirer");
|
|
8
7
|
const chalk = require("chalk");
|
|
9
8
|
const configuration_1 = require("./configuration");
|
|
@@ -16,19 +15,15 @@ class ZenCommand extends command_1.Command {
|
|
|
16
15
|
configuration,
|
|
17
16
|
};
|
|
18
17
|
}
|
|
19
|
-
|
|
20
|
-
const { flags } = this.parse(TheCommand);
|
|
21
|
-
if (flags['enable-login-prompt']) {
|
|
22
|
-
return this.promptUserToLogIn(configuration.uuid);
|
|
23
|
-
}
|
|
24
|
-
throw new errors_1.CLIError('Could not find StepZen account credentials.' +
|
|
25
|
-
' Please run `stepzen login` first.');
|
|
18
|
+
return this.promptUserToLogIn(configuration.uuid);
|
|
26
19
|
}
|
|
27
20
|
async promptUserToLogIn(uuid) {
|
|
28
|
-
this.log(chalk.bold(chalk.cyan('Welcome to StepZen CLI!')));
|
|
21
|
+
this.log(chalk.bold(chalk.cyan('Welcome to the StepZen CLI!')));
|
|
29
22
|
this.log('');
|
|
30
|
-
this.log(`
|
|
31
|
-
`
|
|
23
|
+
this.log(`You are about to deploy your GraphQL API to the cloud on a public` +
|
|
24
|
+
` endpoint. Log in or create a StepZen account to get a` +
|
|
25
|
+
` production-ready GraphQL API deployed on a secure and private` +
|
|
26
|
+
` endpoint.`);
|
|
32
27
|
this.log('');
|
|
33
28
|
const answers = await inquirer.prompt([
|
|
34
29
|
{
|
|
@@ -82,19 +77,12 @@ ZenCommand.flags = {
|
|
|
82
77
|
'non-interactive': command_1.flags.boolean({
|
|
83
78
|
description: 'disable all interactive prompts',
|
|
84
79
|
hidden: true,
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
' this feature will be enabled for all users and the flag will be' +
|
|
92
|
-
' removed.',
|
|
93
|
-
hidden: true,
|
|
94
|
-
options: ['true', 'false'],
|
|
95
|
-
parse: value => Boolean(value),
|
|
96
|
-
default: false,
|
|
97
|
-
env: 'STEPZEN_ENABLE_LOGIN_PROMPT',
|
|
80
|
+
default: () => {
|
|
81
|
+
if (process.env.STEPZEN_INTERACTIVE !== undefined) {
|
|
82
|
+
return process.env.STEPZEN_INTERACTIVE.toLowerCase() === 'false';
|
|
83
|
+
}
|
|
84
|
+
return !process.stdin.isTTY || !process.stdout.isTTY;
|
|
85
|
+
},
|
|
98
86
|
}),
|
|
99
87
|
};
|
|
100
88
|
exports.default = ZenCommand;
|
package/oclif.manifest.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":"0.15.0-beta.1","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},"enable-login-prompt":{"name":"enable-login-prompt","type":"option","description":"An (internal) feature flag to enable the \"prompt user to log in\" feature for the users who run the CLI without being logged in. It is intentially hidden and not documented because in the future this feature will be enabled for all users and the flag will be removed.","hidden":true,"options":["true","false"],"default":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},"enable-login-prompt":{"name":"enable-login-prompt","type":"option","description":"An (internal) feature flag to enable the \"prompt user to log in\" feature for the users who run the CLI without being logged in. It is intentially hidden and not documented because in the future this feature will be enabled for all users and the flag will be removed.","hidden":true,"options":["true","false"],"default":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, 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":{"non-interactive":{"name":"non-interactive","type":"boolean","description":"disable all interactive prompts","hidden":true,"allowNo":false},"enable-login-prompt":{"name":"enable-login-prompt","type":"option","description":"An (internal) feature flag to enable the \"prompt user to log in\" feature for the users who run the CLI without being logged in. It is intentially hidden and not documented because in the future this feature will be enabled for all users and the flag will be removed.","hidden":true,"options":["true","false"],"default":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},"enable-login-prompt":{"name":"enable-login-prompt","type":"option","description":"An (internal) feature flag to enable the \"prompt user to log in\" feature for the users who run the CLI without being logged in. It is intentially hidden and not documented because in the future this feature will be enabled for all users and the flag will be removed.","hidden":true,"options":["true","false"],"default":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},"enable-login-prompt":{"name":"enable-login-prompt","type":"option","description":"An (internal) feature flag to enable the \"prompt user to log in\" feature for the users who run the CLI without being logged in. It is intentially hidden and not documented because in the future this feature will be enabled for all users and the flag will be removed.","hidden":true,"options":["true","false"],"default":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},"enable-login-prompt":{"name":"enable-login-prompt","type":"option","description":"An (internal) feature flag to enable the \"prompt user to log in\" feature for the users who run the CLI without being logged in. It is intentially hidden and not documented because in the future this feature will be enabled for all users and the flag will be removed.","hidden":true,"options":["true","false"],"default":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},"enable-login-prompt":{"name":"enable-login-prompt","type":"option","description":"An (internal) feature flag to enable the \"prompt user to log in\" feature for the users who run the CLI without being logged in. It is intentially hidden and not documented because in the future this feature will be enabled for all users and the flag will be removed.","hidden":true,"options":["true","false"],"default":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},"enable-login-prompt":{"name":"enable-login-prompt","type":"option","description":"An (internal) feature flag to enable the \"prompt user to log in\" feature for the users who run the CLI without being logged in. It is intentially hidden and not documented because in the future this feature will be enabled for all users and the flag will be removed.","hidden":true,"options":["true","false"],"default":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-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":{"non-interactive":{"name":"non-interactive","type":"boolean","description":"disable all interactive prompts","hidden":true,"allowNo":false},"enable-login-prompt":{"name":"enable-login-prompt","type":"option","description":"An (internal) feature flag to enable the \"prompt user to log in\" feature for the users who run the CLI without being logged in. It is intentially hidden and not documented because in the future this feature will be enabled for all users and the flag will be removed.","hidden":true,"options":["true","false"],"default":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},"enable-login-prompt":{"name":"enable-login-prompt","type":"option","description":"An (internal) feature flag to enable the \"prompt user to log in\" feature for the users who run the CLI without being logged in. It is intentially hidden and not documented because in the future this feature will be enabled for all users and the flag will be removed.","hidden":true,"options":["true","false"],"default":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},"enable-login-prompt":{"name":"enable-login-prompt","type":"option","description":"An (internal) feature flag to enable the \"prompt user to log in\" feature for the users who run the CLI without being logged in. It is intentially hidden and not documented because in the future this feature will be enabled for all users and the flag will be removed.","hidden":true,"options":["true","false"],"default":false},"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":{"non-interactive":{"name":"non-interactive","type":"boolean","description":"disable all interactive prompts","hidden":true,"allowNo":false},"enable-login-prompt":{"name":"enable-login-prompt","type":"option","description":"An (internal) feature flag to enable the \"prompt user to log in\" feature for the users who run the CLI without being logged in. It is intentially hidden and not documented because in the future this feature will be enabled for all users and the flag will be removed.","hidden":true,"options":["true","false"],"default":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.15.0-beta.2","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, 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":{"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-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":{"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":"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.15.0-beta.
|
|
4
|
+
"version": "0.15.0-beta.2",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Darren Waddell <darren@stepzen.com>",
|
|
7
7
|
"contributors": [
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
},
|
|
14
14
|
"main": "lib/index.js",
|
|
15
15
|
"engines": {
|
|
16
|
-
"node": ">=14.
|
|
16
|
+
"node": ">=14.0",
|
|
17
17
|
"npm": ">=6.14"
|
|
18
18
|
},
|
|
19
19
|
"files": [
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"dependencies": {
|
|
29
29
|
"@oclif/command": "^1.8.0",
|
|
30
30
|
"@oclif/config": "^1.18.3",
|
|
31
|
-
"@oclif/core": "1.
|
|
31
|
+
"@oclif/core": "1.7.0",
|
|
32
32
|
"@oclif/errors": "1.3.5",
|
|
33
33
|
"@oclif/plugin-help": "^5.1.12",
|
|
34
34
|
"@stepzen/dashboard": "0.1.37",
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
"chokidar": "^3.5.2",
|
|
39
39
|
"compare-versions": "^3.6.0",
|
|
40
40
|
"date-fns": "^2.26.0",
|
|
41
|
-
"debug": "^4.3.
|
|
41
|
+
"debug": "^4.3.4",
|
|
42
42
|
"detect-port": "^1.3.0",
|
|
43
43
|
"dotenv": "^8.6.0",
|
|
44
44
|
"fs-extra": "^9.1.0",
|
|
@@ -46,10 +46,11 @@
|
|
|
46
46
|
"inquirer": "^7.3.3",
|
|
47
47
|
"lodash": "^4.17.21",
|
|
48
48
|
"node-fetch": "^2.6.6",
|
|
49
|
-
"prettier": "^2.
|
|
49
|
+
"prettier": "^2.6.2",
|
|
50
50
|
"pretty-ms": "^7.0.1",
|
|
51
51
|
"shelljs": "^0.8.5",
|
|
52
52
|
"throttle-debounce": "^3.0.1",
|
|
53
|
+
"uuid": "^8.3.2",
|
|
53
54
|
"yaml": "^1.10.0"
|
|
54
55
|
},
|
|
55
56
|
"devDependencies": {
|
|
@@ -69,14 +70,16 @@
|
|
|
69
70
|
"@types/minimist": "^1.2.1",
|
|
70
71
|
"@types/mocha": "^5.2.7",
|
|
71
72
|
"@types/mock-fs": "^4.13.0",
|
|
72
|
-
"@types/node": "^14.
|
|
73
|
+
"@types/node": "^14.0.27",
|
|
73
74
|
"@types/node-fetch": "^2.5.7",
|
|
74
75
|
"@types/prettier": "^2.1.6",
|
|
75
76
|
"@types/rimraf": "^3.0.0",
|
|
77
|
+
"@types/semver": "^7.3.9",
|
|
76
78
|
"@types/shelljs": "^0.8.8",
|
|
77
79
|
"@types/sinon-chai": "3.2.8",
|
|
78
80
|
"@types/throttle-debounce": "^2.1.0",
|
|
79
81
|
"@types/unzipper": "^0.10.4",
|
|
82
|
+
"@types/uuid": "^8.3.4",
|
|
80
83
|
"chai": "^4.2.0",
|
|
81
84
|
"copyfiles": "^2.4.1",
|
|
82
85
|
"cross-env": "^7.0.3",
|
|
@@ -93,6 +96,7 @@
|
|
|
93
96
|
"nock": "^13.0.4",
|
|
94
97
|
"nodemon": "^2.0.7",
|
|
95
98
|
"nyc": "^14.1.1",
|
|
99
|
+
"semver": "^7.3.7",
|
|
96
100
|
"sinon": "13.0.1",
|
|
97
101
|
"sinon-chai": "3.7.0",
|
|
98
102
|
"ts-node": "^8.10.2",
|
|
@@ -118,9 +122,9 @@
|
|
|
118
122
|
"postpack": "rm -f oclif.manifest.json",
|
|
119
123
|
"posttest": "eslint . --ignore-path .prettierignore",
|
|
120
124
|
"prepack": "rm -rf lib && tsc -b && oclif-dev manifest && oclif-dev readme",
|
|
121
|
-
"test": "tsc -b && cross-env STEPZEN_DOMAIN=steprz.io STEPZEN_SERVER_URL=http://localhost nyc --extension .ts mocha --forbid-only \"test/**/*.test.ts\"",
|
|
125
|
+
"test": "tsc -b && cross-env STEPZEN_INTERACTIVE=true STEPZEN_DOMAIN=steprz.io STEPZEN_SERVER_URL=http://localhost nyc --extension .ts mocha --forbid-only \"test/**/*.test.ts\"",
|
|
122
126
|
"test:single:example": "npm run test:single -- test/src/shared/curl-parser.test.ts",
|
|
123
|
-
"test:single": "tsc -b && cross-env STEPZEN_DOMAIN=steprz.io STEPZEN_SERVER_URL=http://localhost mocha --forbid-only test/_global.test.ts",
|
|
127
|
+
"test:single": "tsc -b && cross-env STEPZEN_INTERACTIVE=true STEPZEN_DOMAIN=steprz.io STEPZEN_SERVER_URL=http://localhost mocha --forbid-only test/_global.test.ts",
|
|
124
128
|
"version": "oclif-dev readme && git add README.md",
|
|
125
129
|
"prepare": "husky install"
|
|
126
130
|
},
|