stepzen 0.13.0-beta.2 → 0.13.0-beta.3
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 +1 -0
- package/lib/commands/import.d.ts +1 -0
- package/lib/commands/import.js +1 -9
- package/lib/commands/init.d.ts +1 -0
- package/lib/commands/lint.d.ts +1 -0
- package/lib/commands/list.d.ts +2 -0
- package/lib/commands/login.d.ts +1 -0
- package/lib/commands/logout.d.ts +2 -0
- package/lib/commands/start.d.ts +1 -0
- package/lib/commands/transpile.d.ts +1 -0
- package/lib/commands/upload.d.ts +1 -0
- package/lib/commands/upload.js +13 -4
- package/lib/commands/validate.d.ts +2 -0
- package/lib/commands/whoami.d.ts +2 -0
- package/lib/generate/helpers.d.ts +0 -4
- package/lib/generate/helpers.js +3 -102
- package/lib/shared/actions.d.ts +1 -1
- package/lib/shared/actions.js +2 -15
- package/lib/shared/constants.d.ts +1 -1
- package/lib/shared/constants.js +2 -1
- package/lib/shared/zen-command.d.ts +2 -1
- package/lib/shared/zen-command.js +21 -1
- package/oclif.manifest.json +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -29,7 +29,7 @@ $ npm install -g stepzen
|
|
|
29
29
|
$ stepzen COMMAND
|
|
30
30
|
running command...
|
|
31
31
|
$ stepzen (-v|--version|version)
|
|
32
|
-
stepzen/0.13.0-beta.
|
|
32
|
+
stepzen/0.13.0-beta.3 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,6 +8,7 @@ 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>;
|
|
11
12
|
};
|
|
12
13
|
static args: {
|
|
13
14
|
name: string;
|
package/lib/commands/import.d.ts
CHANGED
|
@@ -12,6 +12,7 @@ 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>;
|
|
15
16
|
};
|
|
16
17
|
static args: {
|
|
17
18
|
name: string;
|
package/lib/commands/import.js
CHANGED
|
@@ -7,7 +7,6 @@ const command_1 = require("@oclif/command");
|
|
|
7
7
|
const errors_1 = require("@oclif/errors");
|
|
8
8
|
const transpiler_1 = require("@stepzen/transpiler");
|
|
9
9
|
const cli_ux_1 = require("cli-ux");
|
|
10
|
-
const deploy_1 = require("./deploy");
|
|
11
10
|
const generate_1 = require("../generate");
|
|
12
11
|
const utils_1 = require("../shared/utils");
|
|
13
12
|
const helpers_1 = require("../generate/helpers");
|
|
@@ -101,19 +100,12 @@ class Import extends zen_command_1.default {
|
|
|
101
100
|
result = resultOrError.outPath;
|
|
102
101
|
}
|
|
103
102
|
else {
|
|
104
|
-
|
|
103
|
+
;
|
|
105
104
|
['prefix', 'query-type', 'query-name', 'path-params'].forEach(flag => {
|
|
106
105
|
if (flag in flags) {
|
|
107
106
|
this.log(chalk.gray(`The ${chalk.bold(`--${flag}`)} flag only applies when importing ${chalk.bold('curl')}. It will be ignored now.`));
|
|
108
107
|
}
|
|
109
108
|
});
|
|
110
|
-
// Make sure the user has latest Generator Schema
|
|
111
|
-
await deploy_1.default.run([
|
|
112
|
-
constants_1.STEPZEN_GENERATOR_ENGINES_ENDPOINT,
|
|
113
|
-
'--schema',
|
|
114
|
-
constants_1.STEPZEN_GENERATOR_ENGINES_SCHEMA,
|
|
115
|
-
'--silent',
|
|
116
|
-
]);
|
|
117
109
|
// Let's go!
|
|
118
110
|
result = await generate_1.default(schemas, flags.name, workspace.schema);
|
|
119
111
|
// Validate
|
package/lib/commands/init.d.ts
CHANGED
|
@@ -11,6 +11,7 @@ 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>;
|
|
14
15
|
};
|
|
15
16
|
static args: {
|
|
16
17
|
hidden: boolean;
|
package/lib/commands/lint.d.ts
CHANGED
|
@@ -7,6 +7,7 @@ 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>;
|
|
10
11
|
};
|
|
11
12
|
run(): Promise<void>;
|
|
12
13
|
}
|
package/lib/commands/list.d.ts
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
1
|
+
import { flags } from '@oclif/command';
|
|
1
2
|
import ZenCommand from '../shared/zen-command';
|
|
2
3
|
export default class List extends ZenCommand {
|
|
3
4
|
static description: string;
|
|
4
5
|
static flags: {
|
|
5
6
|
help: import("@oclif/parser/lib/flags").IBooleanFlag<void>;
|
|
6
7
|
'non-interactive': import("@oclif/parser/lib/flags").IBooleanFlag<boolean>;
|
|
8
|
+
'enable-login-prompt': flags.IOptionFlag<boolean | undefined>;
|
|
7
9
|
};
|
|
8
10
|
static args: {
|
|
9
11
|
name: string;
|
package/lib/commands/login.d.ts
CHANGED
|
@@ -8,6 +8,7 @@ export default class Login extends ZenCommand {
|
|
|
8
8
|
config: flags.IOptionFlag<string | undefined>;
|
|
9
9
|
help: import("@oclif/parser/lib/flags").IBooleanFlag<void>;
|
|
10
10
|
'non-interactive': import("@oclif/parser/lib/flags").IBooleanFlag<boolean>;
|
|
11
|
+
'enable-login-prompt': flags.IOptionFlag<boolean | undefined>;
|
|
11
12
|
};
|
|
12
13
|
run(): Promise<void>;
|
|
13
14
|
}
|
package/lib/commands/logout.d.ts
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
1
|
+
import { flags } from '@oclif/command';
|
|
1
2
|
import ZenCommand from '../shared/zen-command';
|
|
2
3
|
export default class Logout extends ZenCommand {
|
|
3
4
|
static description: string;
|
|
4
5
|
static flags: {
|
|
5
6
|
help: import("@oclif/parser/lib/flags").IBooleanFlag<void>;
|
|
6
7
|
'non-interactive': import("@oclif/parser/lib/flags").IBooleanFlag<boolean>;
|
|
8
|
+
'enable-login-prompt': flags.IOptionFlag<boolean | undefined>;
|
|
7
9
|
};
|
|
8
10
|
run(): Promise<void>;
|
|
9
11
|
}
|
package/lib/commands/start.d.ts
CHANGED
|
@@ -14,6 +14,7 @@ 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>;
|
|
17
18
|
};
|
|
18
19
|
static args: never[];
|
|
19
20
|
run(): Promise<void>;
|
|
@@ -12,6 +12,7 @@ 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>;
|
|
15
16
|
};
|
|
16
17
|
static args: {
|
|
17
18
|
name: string;
|
package/lib/commands/upload.d.ts
CHANGED
|
@@ -8,6 +8,7 @@ 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>;
|
|
11
12
|
};
|
|
12
13
|
static args: ({
|
|
13
14
|
name: string;
|
package/lib/commands/upload.js
CHANGED
|
@@ -21,14 +21,23 @@ class Upload extends zen_command_1.default {
|
|
|
21
21
|
throw new errors_1.CLIError('You must specify the folder/name you want to use');
|
|
22
22
|
}
|
|
23
23
|
await this.ensureStepZenAccount();
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
24
|
+
let source;
|
|
25
|
+
if (args.type === 'configurationset') {
|
|
26
|
+
if (!flags.file) {
|
|
27
|
+
throw new errors_1.CLIError('Please specify a source file with the --file flag');
|
|
28
|
+
}
|
|
29
|
+
source = flags.file;
|
|
30
|
+
}
|
|
31
|
+
else {
|
|
32
|
+
if (!flags.dir) {
|
|
33
|
+
throw new errors_1.CLIError('Please specify a source directory with the --dir flag');
|
|
34
|
+
}
|
|
35
|
+
source = flags.dir;
|
|
27
36
|
}
|
|
28
37
|
if (!flags.silent) {
|
|
29
38
|
this.log('Uploading...');
|
|
30
39
|
}
|
|
31
|
-
const response = await actions_1.upload(args.type, args.destination,
|
|
40
|
+
const response = await actions_1.upload(args.type, args.destination, source);
|
|
32
41
|
if (response.success) {
|
|
33
42
|
if (!flags.silent) {
|
|
34
43
|
this.log(response.message);
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { flags } from '@oclif/command';
|
|
1
2
|
import ZenCommand from '../shared/zen-command';
|
|
2
3
|
export default class Validate extends ZenCommand {
|
|
3
4
|
static description: string;
|
|
@@ -5,6 +6,7 @@ export default class Validate extends ZenCommand {
|
|
|
5
6
|
static flags: {
|
|
6
7
|
help: import("@oclif/parser/lib/flags").IBooleanFlag<void>;
|
|
7
8
|
'non-interactive': import("@oclif/parser/lib/flags").IBooleanFlag<boolean>;
|
|
9
|
+
'enable-login-prompt': flags.IOptionFlag<boolean | undefined>;
|
|
8
10
|
};
|
|
9
11
|
static args: {
|
|
10
12
|
name: string;
|
package/lib/commands/whoami.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { flags } from '@oclif/command';
|
|
1
2
|
import ZenCommand from '../shared/zen-command';
|
|
2
3
|
export default class WhoAmI extends ZenCommand {
|
|
3
4
|
static description: string;
|
|
@@ -8,6 +9,7 @@ export default class WhoAmI extends ZenCommand {
|
|
|
8
9
|
apikey: import("@oclif/parser/lib/flags").IBooleanFlag<boolean>;
|
|
9
10
|
adminkey: import("@oclif/parser/lib/flags").IBooleanFlag<boolean>;
|
|
10
11
|
'non-interactive': import("@oclif/parser/lib/flags").IBooleanFlag<boolean>;
|
|
12
|
+
'enable-login-prompt': flags.IOptionFlag<boolean | undefined>;
|
|
11
13
|
};
|
|
12
14
|
static args: never[];
|
|
13
15
|
run(): Promise<void>;
|
|
@@ -1,6 +1,4 @@
|
|
|
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>;
|
|
4
2
|
export declare const createGeneratorFiles: (id: string, details: any) => Promise<string>;
|
|
5
3
|
export declare type GeneratorConfiguration = {
|
|
6
4
|
questions: DistinctQuestion<Answers>[];
|
|
@@ -8,8 +6,6 @@ export declare type GeneratorConfiguration = {
|
|
|
8
6
|
errors: Record<string, any>;
|
|
9
7
|
status: number;
|
|
10
8
|
};
|
|
11
|
-
export declare const getConfigurationDirectly: (id: string, details?: any) => Promise<GeneratorConfiguration | null>;
|
|
12
|
-
export declare const getConfigurationViaStepZen: (id: string, details?: any) => Promise<GeneratorConfiguration | null>;
|
|
13
9
|
export declare const getConfiguration: (id: string, details?: any) => Promise<GeneratorConfiguration | null>;
|
|
14
10
|
export declare const getSchemaList: (arg: string) => string[];
|
|
15
11
|
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.
|
|
4
|
+
exports.askTemplateQuestions = exports.askGeneratorQuestions = exports.getTemplates = exports.getSchemaList = exports.getConfiguration = exports.createGeneratorFiles = void 0;
|
|
5
5
|
const errors_1 = require("@oclif/errors");
|
|
6
6
|
const chalk = require("chalk");
|
|
7
7
|
const debug = require("debug");
|
|
@@ -12,11 +12,10 @@ const lodash_1 = require("lodash");
|
|
|
12
12
|
const os = require("os");
|
|
13
13
|
const path = require("path");
|
|
14
14
|
const shell = require("shelljs");
|
|
15
|
-
const configuration_1 = require("../shared/configuration");
|
|
16
15
|
const constants_1 = require("../shared/constants");
|
|
17
16
|
const errors_2 = require("../shared/errors");
|
|
18
17
|
const { version } = require('../../package.json');
|
|
19
|
-
exports.
|
|
18
|
+
exports.createGeneratorFiles = async (id, details) => {
|
|
20
19
|
const url = `${constants_1.STEPZEN_DIRECT_GENERATOR_ENGINES_URL}/create`;
|
|
21
20
|
debug('stepzen:generate')(`calling the generator engine ${id} via ${url}`);
|
|
22
21
|
try {
|
|
@@ -45,49 +44,7 @@ exports.createGeneratorFilesDirectly = async (id, details) => {
|
|
|
45
44
|
throw new errors_1.CLIError(errors_2.PERMANENT_STEPZEN_ERROR);
|
|
46
45
|
}
|
|
47
46
|
};
|
|
48
|
-
exports.
|
|
49
|
-
const config = configuration_1.readConfiguration();
|
|
50
|
-
const domain = constants_1.STEPZEN_DOMAIN.replace('.io', '.net');
|
|
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}`);
|
|
53
|
-
const response = await node_fetch_1.default(url, {
|
|
54
|
-
body: JSON.stringify({
|
|
55
|
-
query: `
|
|
56
|
-
query {
|
|
57
|
-
create(id: "${id}" details: "${JSON.stringify(details.answers).replace(/"/g, '\\"')}") {
|
|
58
|
-
content
|
|
59
|
-
name
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
`,
|
|
63
|
-
}),
|
|
64
|
-
headers: {
|
|
65
|
-
Authorization: `Apikey ${config.adminkey}`,
|
|
66
|
-
'Content-Type': 'application/json',
|
|
67
|
-
'stepzen-cli-version': version,
|
|
68
|
-
'user-agent': `stepzen-cli/${version}`,
|
|
69
|
-
},
|
|
70
|
-
method: 'POST',
|
|
71
|
-
});
|
|
72
|
-
const { data, errors } = await response.json();
|
|
73
|
-
if (errors) {
|
|
74
|
-
throw new errors_1.CLIError(errors_2.formatTemporaryErrorMessage(errors));
|
|
75
|
-
}
|
|
76
|
-
const tmp = path.join(os.tmpdir(), `stepzen-generated-schema-${Date.now()}`);
|
|
77
|
-
fs.ensureDirSync(tmp);
|
|
78
|
-
for (const file of data.create) {
|
|
79
|
-
const dir = path.join(tmp, file.name);
|
|
80
|
-
fs.writeFileSync(dir, file.content);
|
|
81
|
-
}
|
|
82
|
-
return tmp;
|
|
83
|
-
};
|
|
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 = {}) => {
|
|
47
|
+
exports.getConfiguration = async (id, details = {}) => {
|
|
91
48
|
const url = `${constants_1.STEPZEN_DIRECT_GENERATOR_ENGINES_URL}/configure`;
|
|
92
49
|
debug('stepzen:generate')(`calling the generator engine ${id} via ${url}`);
|
|
93
50
|
try {
|
|
@@ -115,62 +72,6 @@ exports.getConfigurationDirectly = async (id, details = {}) => {
|
|
|
115
72
|
throw new errors_1.CLIError(errors_2.PERMANENT_STEPZEN_ERROR);
|
|
116
73
|
}
|
|
117
74
|
};
|
|
118
|
-
exports.getConfigurationViaStepZen = async (id, details = {}) => {
|
|
119
|
-
const config = configuration_1.readConfiguration();
|
|
120
|
-
const domain = constants_1.STEPZEN_DOMAIN.replace('.io', '.net');
|
|
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}`);
|
|
123
|
-
const response = await node_fetch_1.default(url, {
|
|
124
|
-
body: JSON.stringify({
|
|
125
|
-
query: `
|
|
126
|
-
query {
|
|
127
|
-
configure(id: "${id}" details: "${JSON.stringify(details).replace(/"/g, '\\"')}") {
|
|
128
|
-
answers
|
|
129
|
-
errors
|
|
130
|
-
questions
|
|
131
|
-
status
|
|
132
|
-
}
|
|
133
|
-
}
|
|
134
|
-
`,
|
|
135
|
-
}),
|
|
136
|
-
headers: {
|
|
137
|
-
Authorization: `Apikey ${config.adminkey}`,
|
|
138
|
-
'Content-Type': 'application/json',
|
|
139
|
-
'stepzen-cli-version': version,
|
|
140
|
-
'user-agent': `stepzen-cli/${version}`,
|
|
141
|
-
},
|
|
142
|
-
method: 'POST',
|
|
143
|
-
});
|
|
144
|
-
const { data, errors } = await response.json();
|
|
145
|
-
if (errors) {
|
|
146
|
-
return {
|
|
147
|
-
questions: [],
|
|
148
|
-
answers: {},
|
|
149
|
-
status: -1,
|
|
150
|
-
errors: {
|
|
151
|
-
error: errors[0].message,
|
|
152
|
-
},
|
|
153
|
-
};
|
|
154
|
-
}
|
|
155
|
-
try {
|
|
156
|
-
if (data.configure) {
|
|
157
|
-
data.configure.answers = JSON.parse(data.configure.answers);
|
|
158
|
-
data.configure.errors = JSON.parse(data.configure.errors);
|
|
159
|
-
data.configure.questions = JSON.parse(data.configure.questions);
|
|
160
|
-
}
|
|
161
|
-
}
|
|
162
|
-
catch (error) {
|
|
163
|
-
debug('stepzen:response')(error);
|
|
164
|
-
throw new errors_1.CLIError(errors_2.PERMANENT_STEPZEN_ERROR);
|
|
165
|
-
}
|
|
166
|
-
return data.configure;
|
|
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
|
-
};
|
|
174
75
|
exports.getSchemaList = (arg) => {
|
|
175
76
|
const schemas = arg.split(',').map((schema) => schema.trim());
|
|
176
77
|
// Make sure they're unique, otherwise, complain
|
package/lib/shared/actions.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { ZenCtlResponse } from './types';
|
|
2
2
|
export declare const deploy: (destination: string, configurationsets: string | undefined, schema: string) => Promise<ZenCtlResponse>;
|
|
3
3
|
export declare const list: (type: 'configurationsets' | 'schemas') => Promise<ZenCtlResponse>;
|
|
4
|
-
export declare const upload: (type:
|
|
4
|
+
export declare const upload: (type: 'configurationset' | 'schema', destination: string, source: string) => Promise<any>;
|
package/lib/shared/actions.js
CHANGED
|
@@ -2,8 +2,6 @@
|
|
|
2
2
|
// Copyright (c) 2020,2021,2022, StepZen, Inc.
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
4
|
exports.upload = exports.list = exports.deploy = void 0;
|
|
5
|
-
// This file contains 'actions' - calls to zenctl
|
|
6
|
-
const errors_1 = require("@oclif/errors");
|
|
7
5
|
const configuration_1 = require("./configuration");
|
|
8
6
|
const constants_1 = require("./constants");
|
|
9
7
|
const stepzen_sdk_1 = require("./stepzen-sdk");
|
|
@@ -33,7 +31,7 @@ exports.list = async (type) => {
|
|
|
33
31
|
});
|
|
34
32
|
return client.list[type]();
|
|
35
33
|
};
|
|
36
|
-
exports.upload = async (type, destination,
|
|
34
|
+
exports.upload = async (type, destination, source) => {
|
|
37
35
|
const config = configuration_1.readConfiguration();
|
|
38
36
|
const server = constants_1.STEPZEN_SERVER_URL.replace('{account}', config.account);
|
|
39
37
|
const client = await stepzen_sdk_1.default.client({
|
|
@@ -42,16 +40,5 @@ exports.upload = async (type, destination, file, directory) => {
|
|
|
42
40
|
domain: constants_1.STEPZEN_DOMAIN,
|
|
43
41
|
server,
|
|
44
42
|
});
|
|
45
|
-
|
|
46
|
-
if (!file) {
|
|
47
|
-
throw new errors_1.CLIError('Please specify a source file with the --file flag');
|
|
48
|
-
}
|
|
49
|
-
return client.upload.configurationset(destination, file);
|
|
50
|
-
}
|
|
51
|
-
if (type === 'schema') {
|
|
52
|
-
if (!directory) {
|
|
53
|
-
throw new errors_1.CLIError('Please specify a source directory with the --dir flag');
|
|
54
|
-
}
|
|
55
|
-
return client.upload.schema(destination, directory);
|
|
56
|
-
}
|
|
43
|
+
return client.upload[type](destination, source);
|
|
57
44
|
};
|
|
@@ -5,7 +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
|
|
8
|
+
export declare const STEPZEN_DIRECT_GENERATOR_ENGINES_URL: string;
|
|
9
9
|
export declare const STEPZEN_API_TEMPLATES_REPOSITORY = "https://github.com/steprz/stepzen-schemas";
|
|
10
10
|
export declare const ADMIN_DEPLOY_URL = "/cli/admin/deploy";
|
|
11
11
|
export declare const ADMIN_LIST_URL = "/cli/admin/list";
|
package/lib/shared/constants.js
CHANGED
|
@@ -24,7 +24,8 @@ exports.STEPZEN_GENERATOR_ENGINES_SCHEMA = ENV_VAR_STEPZEN_GENERATOR_ENGINES_SCH
|
|
|
24
24
|
// Generator Engines schema: target API endpoint
|
|
25
25
|
exports.STEPZEN_GENERATOR_ENGINES_ENDPOINT = 'stepzen-generator/engines';
|
|
26
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
|
|
27
|
+
exports.STEPZEN_DIRECT_GENERATOR_ENGINES_URL = ENV_VAR_STEPZEN_DIRECT_GENERATOR_ENGINES_URL ||
|
|
28
|
+
'https://us-central1-stepzen-functions.cloudfunctions.net/generator-engine';
|
|
28
29
|
// API Templates repository
|
|
29
30
|
exports.STEPZEN_API_TEMPLATES_REPOSITORY = 'https://github.com/steprz/stepzen-schemas';
|
|
30
31
|
// Paths to the endpoints used (only for tests)
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import { Command } from '@oclif/command';
|
|
1
|
+
import { Command, flags } from '@oclif/command';
|
|
2
2
|
import { MachineConfiguration } 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>;
|
|
6
7
|
};
|
|
7
8
|
ensureStepZenAccount(): Promise<{
|
|
8
9
|
configuration: MachineConfiguration;
|
|
@@ -3,6 +3,7 @@
|
|
|
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");
|
|
6
7
|
const inquirer = require("inquirer");
|
|
7
8
|
const chalk = require("chalk");
|
|
8
9
|
const configuration_1 = require("./configuration");
|
|
@@ -15,7 +16,13 @@ class ZenCommand extends command_1.Command {
|
|
|
15
16
|
configuration,
|
|
16
17
|
};
|
|
17
18
|
}
|
|
18
|
-
|
|
19
|
+
const TheCommand = this.constructor;
|
|
20
|
+
const { flags } = this.parse(TheCommand);
|
|
21
|
+
if (flags['enable-login-prompt']) {
|
|
22
|
+
return this.promptUserToLogIn();
|
|
23
|
+
}
|
|
24
|
+
throw new errors_1.CLIError('Could not find StepZen account credentials.' +
|
|
25
|
+
' Please run `stepzen login` first.');
|
|
19
26
|
}
|
|
20
27
|
async promptUserToLogIn() {
|
|
21
28
|
this.log(chalk.bold(chalk.cyan('Welcome to StepZen CLI!')));
|
|
@@ -76,5 +83,18 @@ ZenCommand.flags = {
|
|
|
76
83
|
description: 'disable all interactive prompts',
|
|
77
84
|
hidden: true,
|
|
78
85
|
}),
|
|
86
|
+
// The flag type has to be `option` (not `boolean`) for `env` to take effect
|
|
87
|
+
'enable-login-prompt': command_1.flags.option({
|
|
88
|
+
description: 'An (internal) feature flag to enable the "prompt user to log in"' +
|
|
89
|
+
' feature for the users who run the CLI without being logged in. It' +
|
|
90
|
+
' is intentially hidden and not documented because in the future' +
|
|
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',
|
|
98
|
+
}),
|
|
79
99
|
};
|
|
80
100
|
exports.default = ZenCommand;
|
package/oclif.manifest.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":"0.13.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},"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":[]}}}
|
|
1
|
+
{"version":"0.13.0-beta.3","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},"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":[]}}}
|