diff --git a/src/commands/categories/create.ts b/src/commands/categories/create.ts index 20303115f..1bb93f77c 100644 --- a/src/commands/categories/create.ts +++ b/src/commands/categories/create.ts @@ -13,6 +13,15 @@ interface Category { } export default class CategoriesCreateCommand extends BaseCommand { + // needed for deprecation message + static id = 'categories create' as const; + + static state = 'deprecated'; + + static deprecationOptions = { + message: `\`rdme ${this.id}\` is deprecated and will be removed in v10. For more information, please visit our migration guide: https://github.com/readmeio/rdme/tree/v9/documentation/migration-guide.md`, + }; + static description = 'Create a category with the specified title and guide in your ReadMe project.'; static args = { diff --git a/src/commands/categories/index.ts b/src/commands/categories/index.ts index bec1f52c7..301295336 100644 --- a/src/commands/categories/index.ts +++ b/src/commands/categories/index.ts @@ -4,6 +4,15 @@ import getCategories from '../../lib/getCategories.js'; import { getProjectVersion } from '../../lib/versionSelect.js'; export default class CategoriesCommand extends BaseCommand { + // needed for deprecation message + static id = 'categories' as const; + + static state = 'deprecated'; + + static deprecationOptions = { + message: `\`rdme ${this.id}\` is deprecated and will be removed in v10. For more information, please visit our migration guide: https://github.com/readmeio/rdme/tree/v9/documentation/migration-guide.md`, + }; + static description = 'Get all categories in your ReadMe project.'; static flags = { diff --git a/src/commands/custompages.ts b/src/commands/custompages.ts index 6b9c25abc..71bb0912c 100644 --- a/src/commands/custompages.ts +++ b/src/commands/custompages.ts @@ -13,6 +13,12 @@ export default class CustomPagesCommand extends BaseCommand { // needed for unit tests, even though we also specify this in src/index.ts static id = 'docs' as const; + static state = 'deprecated'; + + static deprecationOptions = { + message: `\`rdme ${this.id}\` is deprecated and will be removed in v10. For more information, please visit our migration guide: https://github.com/readmeio/rdme/tree/v9/documentation/migration-guide.md`, + }; + static aliases = ['guides']; static summary = 'Sync Markdown files to your ReadMe project as Guides.'; diff --git a/src/commands/docs/prune.ts b/src/commands/docs/prune.ts index a2bcfa49a..f21986d6c 100644 --- a/src/commands/docs/prune.ts +++ b/src/commands/docs/prune.ts @@ -17,6 +17,15 @@ function getSlug(filename: string): string { } export default class DocsPruneCommand extends BaseCommand { + // needed for deprecation message + static id = 'docs prune' as const; + + static state = 'deprecated'; + + static deprecationOptions = { + message: `\`rdme ${this.id}\` is deprecated and will be removed in v10. For more information, please visit our migration guide: https://github.com/readmeio/rdme/tree/v9/documentation/migration-guide.md`, + }; + static aliases = ['guides prune']; static description = 'Delete any docs from ReadMe if their slugs are not found in the target folder.'; diff --git a/src/commands/open.ts b/src/commands/open.ts index e2f55649b..64aa290fb 100644 --- a/src/commands/open.ts +++ b/src/commands/open.ts @@ -17,10 +17,13 @@ export default class OpenCommand extends BaseCommand { static hidden = true; + // needed for deprecation message + static id = 'open' as const; + static state = 'deprecated'; static deprecationOptions = { - message: '`rdme open` is deprecated and will be removed in a future release.', + message: `\`rdme ${this.id}\` is deprecated and will be removed in v10. For more information, please visit our migration guide: https://github.com/readmeio/rdme/tree/v9/documentation/migration-guide.md`, }; async run() { diff --git a/src/commands/versions/create.ts b/src/commands/versions/create.ts index 12fb2c57d..e86b1c5bb 100644 --- a/src/commands/versions/create.ts +++ b/src/commands/versions/create.ts @@ -17,6 +17,12 @@ export default class CreateVersionCommand extends BaseCommand { + // needed for deprecation message + static id = 'versions delete' as const; + + static state = 'deprecated'; + + static deprecationOptions = { + message: `\`rdme ${this.id}\` is deprecated and will be removed in v10. For more information, please visit our migration guide: https://github.com/readmeio/rdme/tree/v9/documentation/migration-guide.md`, + }; + static description = 'Delete a version associated with your ReadMe project.'; static args = { diff --git a/src/commands/versions/index.ts b/src/commands/versions/index.ts index 067654ffd..e3cfcd054 100644 --- a/src/commands/versions/index.ts +++ b/src/commands/versions/index.ts @@ -16,6 +16,15 @@ export interface Version { } export default class VersionsCommand extends BaseCommand { + // needed for deprecation message + static id = 'versions' as const; + + static state = 'deprecated'; + + static deprecationOptions = { + message: `\`rdme ${this.id}\` is deprecated and will be removed in v10. For more information, please visit our migration guide: https://github.com/readmeio/rdme/tree/v9/documentation/migration-guide.md`, + }; + static description = 'List versions available in your project or get a version by SemVer (https://semver.org/).'; static flags = { diff --git a/src/commands/versions/update.ts b/src/commands/versions/update.ts index 6bc9fc381..6891d4bd3 100644 --- a/src/commands/versions/update.ts +++ b/src/commands/versions/update.ts @@ -12,6 +12,15 @@ import { cleanAPIv1Headers, handleAPIv1Res, readmeAPIv1Fetch } from '../../lib/r import { getProjectVersion } from '../../lib/versionSelect.js'; export default class UpdateVersionCommand extends BaseCommand { + // needed for deprecation message + static id = 'versions update' as const; + + static state = 'deprecated'; + + static deprecationOptions = { + message: `\`rdme ${this.id}\` is deprecated and will be removed in v10. For more information, please visit our migration guide: https://github.com/readmeio/rdme/tree/v9/documentation/migration-guide.md`, + }; + static description = 'Update an existing version for your project.'; static args = {