From 659fda4da7d90804657712eed608f2982cf3d6c1 Mon Sep 17 00:00:00 2001 From: Kanad Gupta Date: Mon, 18 Nov 2024 19:17:57 -0600 Subject: [PATCH 1/3] feat!: remove `validate` --- __tests__/commands/openapi/validate.test.ts | 8 -------- documentation/commands.md | 3 --- documentation/rdme.md | 4 ++-- src/commands/openapi/validate.ts | 4 ---- 4 files changed, 2 insertions(+), 17 deletions(-) diff --git a/__tests__/commands/openapi/validate.test.ts b/__tests__/commands/openapi/validate.test.ts index 608209124..022ca05b8 100644 --- a/__tests__/commands/openapi/validate.test.ts +++ b/__tests__/commands/openapi/validate.test.ts @@ -211,12 +211,4 @@ describe('rdme openapi:validate', () => { ); }); }); - - describe('rdme validate alias', () => { - it('should should `rdme openapi:validate`', async () => { - return expect( - (await oclifRunCommand(['validate', require.resolve('@readme/oas-examples/3.0/json/petstore.json')])).result, - ).toContain(chalk.green('petstore.json is a valid OpenAPI API definition!')); - }); - }); }); diff --git a/documentation/commands.md b/documentation/commands.md index cf483d844..76f1f0c8d 100644 --- a/documentation/commands.md +++ b/documentation/commands.md @@ -403,9 +403,6 @@ FLAGS DESCRIPTION Validate your OpenAPI/Swagger definition. - -ALIASES - $ rdme validate ``` ## `rdme versions` diff --git a/documentation/rdme.md b/documentation/rdme.md index a12b4d16a..476af5132 100644 --- a/documentation/rdme.md +++ b/documentation/rdme.md @@ -194,7 +194,7 @@ We recommend using the [quick start](#quick-start) to get started with GitHub Ac The command syntax in GitHub Actions is functionally equivalent to the CLI. For example, take the following CLI command: ```sh -rdme validate [url-or-local-path-to-file] +rdme openapi:validate [url-or-local-path-to-file] ``` To execute this command via GitHub Actions, the step would look like this: @@ -202,7 +202,7 @@ To execute this command via GitHub Actions, the step would look like this: ```yml - uses: readmeio/rdme@RDME_VERSION with: - rdme: validate [url-or-local-path-to-file] + rdme: openapi:validate [url-or-local-path-to-file] ``` The following section has links to full GitHub Actions workflow file examples. diff --git a/src/commands/openapi/validate.ts b/src/commands/openapi/validate.ts index cb65c375f..6b49afe8e 100644 --- a/src/commands/openapi/validate.ts +++ b/src/commands/openapi/validate.ts @@ -11,10 +11,6 @@ export default class OpenAPIValidateCommand extends BaseCommand Date: Mon, 18 Nov 2024 19:27:16 -0600 Subject: [PATCH 2/3] feat!: deprecate/hide `rdme open` --- src/commands/open.ts | 8 ++++++++ src/lib/config.ts | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/src/commands/open.ts b/src/commands/open.ts index 2054d7ce2..e2f55649b 100644 --- a/src/commands/open.ts +++ b/src/commands/open.ts @@ -15,6 +15,14 @@ export default class OpenCommand extends BaseCommand { mock: Flags.boolean({ description: '[hidden] used for mocking.', hidden: true }), }; + static hidden = true; + + static state = 'deprecated'; + + static deprecationOptions = { + message: '`rdme open` is deprecated and will be removed in a future release.', + }; + async run() { const { dash, mock } = this.flags; const { apiKey, project } = getCurrentConfig(); diff --git a/src/lib/config.ts b/src/lib/config.ts index 580fb4c7e..98054f4ce 100644 --- a/src/lib/config.ts +++ b/src/lib/config.ts @@ -1,6 +1,6 @@ const config = { host: 'https://dash.readme.com', - hub: 'https://{project}.readme.io', // this is only used for the `open` command + hub: 'https://{project}.readme.io', // this is only used for the `rdme open` command } as const; export default config; From 3468d9f7ba68d56ebc30595aee2ef03098548ff3 Mon Sep 17 00:00:00 2001 From: Kanad Gupta Date: Mon, 18 Nov 2024 19:27:34 -0600 Subject: [PATCH 3/3] docs: reflect `rdme open` changes --- documentation/commands.md | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/documentation/commands.md b/documentation/commands.md index 76f1f0c8d..b0df4f942 100644 --- a/documentation/commands.md +++ b/documentation/commands.md @@ -35,7 +35,6 @@ USAGE * [`rdme help [COMMAND]`](#rdme-help-command) * [`rdme login`](#rdme-login) * [`rdme logout`](#rdme-logout) -* [`rdme open`](#rdme-open) * [`rdme openapi [SPEC]`](#rdme-openapi-spec) * [`rdme openapi:convert [SPEC]`](#rdme-openapiconvert-spec) * [`rdme openapi:inspect [SPEC]`](#rdme-openapiinspect-spec) @@ -262,21 +261,6 @@ DESCRIPTION Logs the currently authenticated user out of ReadMe. ``` -## `rdme open` - -Open your current ReadMe project in the browser. - -``` -USAGE - $ rdme open [--dash] - -FLAGS - --dash Opens your current ReadMe project dashboard. - -DESCRIPTION - Open your current ReadMe project in the browser. -``` - ## `rdme openapi [SPEC]` Upload, or resync, your OpenAPI/Swagger definition to ReadMe.