Skip to content

Commit 628a3e8

Browse files
committed
Fix Schema File Name issue
1 parent 02821bf commit 628a3e8

File tree

1 file changed

+11
-4
lines changed

1 file changed

+11
-4
lines changed

src/cli.ts

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,13 @@ function parseArgumentsIntoOptions(
2929
type optionsType = {
3030
language: boolean;
3131
filePath?: string;
32-
schemaKeys?: number | 0;
32+
};
33+
34+
type missingOptionsType = {
35+
language: any;
36+
schema: any;
37+
filePath?: string;
38+
schemaKeys?: number;
3339
};
3440

3541
type questionType = {
@@ -135,7 +141,9 @@ async function promptForSchemaObject() {
135141

136142
async function cli(args: string[]) {
137143
var options: optionsType = parseArgumentsIntoOptions(args);
138-
options = await promptForMissingOptions(options);
144+
var missingOptions: missingOptionsType = await promptForMissingOptions(
145+
options
146+
);
139147

140148
const { schemaKeys } = await inquirer.prompt({
141149
type: "input",
@@ -155,8 +163,7 @@ async function cli(args: string[]) {
155163
schemaKeyValues.push(objectValues);
156164
}
157165

158-
var schema = { ...schemaKeys };
159-
166+
var schema = missingOptions.schema;
160167
await createSchema(schema, schemaKeyValues);
161168
}
162169

0 commit comments

Comments
 (0)