From 70b7f4d2a2bd0064d55d4b9f41e9c8ef06058708 Mon Sep 17 00:00:00 2001 From: Kanad Gupta Date: Tue, 20 Sep 2022 14:54:23 -0500 Subject: [PATCH] chore: prompt copy, openapi opts cleanup --- __tests__/__snapshots__/index.test.ts.snap | 6 +++--- src/cmds/openapi/index.ts | 10 +++++----- src/lib/promptWrapper.ts | 2 +- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/__tests__/__snapshots__/index.test.ts.snap b/__tests__/__snapshots__/index.test.ts.snap index 50df48f83..221435808 100644 --- a/__tests__/__snapshots__/index.test.ts.snap +++ b/__tests__/__snapshots__/index.test.ts.snap @@ -15,12 +15,12 @@ Options uploading an existing API definition. --version string Project version. If running command in a CI environment and this option is not passed, the main project version will be used. + --workingDirectory string Working directory (for usage with relative external references) --useSpecVersion Uses the version listed in the \`info.version\` field in the API definition for the project version parameter. --raw Return the command results as a JSON object instead of a pretty output. --github Create a new GitHub Actions workflow for this command. - --workingDirectory string Working directory (for usage with relative external references) --create Bypasses the create/update prompt and creates a new API definition. --update Automatically update an existing API definition in ReadMe if it's the only one associated with the current version. @@ -48,12 +48,12 @@ Options uploading an existing API definition. --version string Project version. If running command in a CI environment and this option is not passed, the main project version will be used. + --workingDirectory string Working directory (for usage with relative external references) --useSpecVersion Uses the version listed in the \`info.version\` field in the API definition for the project version parameter. --raw Return the command results as a JSON object instead of a pretty output. --github Create a new GitHub Actions workflow for this command. - --workingDirectory string Working directory (for usage with relative external references) --create Bypasses the create/update prompt and creates a new API definition. --update Automatically update an existing API definition in ReadMe if it's the only one associated with the current version. @@ -81,12 +81,12 @@ Options uploading an existing API definition. --version string Project version. If running command in a CI environment and this option is not passed, the main project version will be used. + --workingDirectory string Working directory (for usage with relative external references) --useSpecVersion Uses the version listed in the \`info.version\` field in the API definition for the project version parameter. --raw Return the command results as a JSON object instead of a pretty output. --github Create a new GitHub Actions workflow for this command. - --workingDirectory string Working directory (for usage with relative external references) --create Bypasses the create/update prompt and creates a new API definition. --update Automatically update an existing API definition in ReadMe if it's the only one associated with the current version. diff --git a/src/cmds/openapi/index.ts b/src/cmds/openapi/index.ts index f801141a6..2a922c6f9 100644 --- a/src/cmds/openapi/index.ts +++ b/src/cmds/openapi/index.ts @@ -53,6 +53,11 @@ export default class OpenAPICommand extends Command { type: String, defaultOption: true, }, + { + name: 'workingDirectory', + type: String, + description: 'Working directory (for usage with relative external references)', + }, { name: 'useSpecVersion', type: Boolean, @@ -65,11 +70,6 @@ export default class OpenAPICommand extends Command { description: 'Return the command results as a JSON object instead of a pretty output.', }, this.getGitHubArg(), - { - name: 'workingDirectory', - type: String, - description: 'Working directory (for usage with relative external references)', - }, { name: 'create', type: Boolean, diff --git a/src/lib/promptWrapper.ts b/src/lib/promptWrapper.ts index 81836fd15..cd64e7e5e 100644 --- a/src/lib/promptWrapper.ts +++ b/src/lib/promptWrapper.ts @@ -35,7 +35,7 @@ export default async function promptTerminal( if (ciDetect() && process.env.NODE_ENV !== 'testing') { process.stdout.write('\n'); process.stdout.write( - 'Yikes! Looks like we prompted you for something in a CI environment. Are you missing an argument?' + 'Yikes! Looks like we were about to prompt you for something in a CI environment. Are you missing an argument?' ); process.stdout.write('\n\n'); process.stdout.write('Try running `rdme --help` or get in touch at support@readme.io.');