Skip to content

Commit dccc74e

Browse files
authored
feat(W-15238547): add deprecation notices for the redis:maintenance and pg:maintenance commands (#3509)
* feat: add deprecation notice to redis:maintenance command * feat: add deprecation messages to the pg:maintenance commands
1 parent 1572aef commit dccc74e

File tree

4 files changed

+24
-0
lines changed

4 files changed

+24
-0
lines changed

packages/cli/src/commands/pg/maintenance/index.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,12 @@ export default class Index extends Command {
1717
database: Args.string({description: `${nls('pg:database:arg:description')} ${nls('pg:database:arg:description:default:suffix')}`}),
1818
}
1919

20+
static status = 'deprecated'
21+
22+
static deprecationOptions = {
23+
message: 'The pg:maintenance command has been deprecated and will be removed in version 11. Use data:maintenances from the data-maintenance plugin instead.',
24+
}
25+
2026
public async run(): Promise<void> {
2127
const {flags, args} = await this.parse(Index)
2228
const {app} = flags

packages/cli/src/commands/pg/maintenance/run.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,12 @@ export default class Run extends Command {
2020
database: Args.string({description: `${nls('pg:database:arg:description')} ${nls('pg:database:arg:description:default:suffix')}`}),
2121
}
2222

23+
static status = 'deprecated'
24+
25+
static deprecationOptions = {
26+
message: 'The pg:maintenance:run command has been deprecated and will be removed in version 11. Use data:maintenances:run from the data-maintenance plugin instead.',
27+
}
28+
2329
public async run(): Promise<void> {
2430
const {flags, args} = await this.parse(Run)
2531
const {app, force} = flags

packages/cli/src/commands/pg/maintenance/window.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,12 @@ export default class Window extends Command {
2626
database: Args.string({description: `${nls('pg:database:arg:description')} ${nls('pg:database:arg:description:default:suffix')}`}),
2727
};
2828

29+
static status = 'deprecated'
30+
31+
static deprecationOptions = {
32+
message: 'The pg:maintenance:window command has been deprecated and will be removed in version 11. Use data:maintenances:window:update from the data-maintenance plugin instead.',
33+
}
34+
2935
public async run(): Promise<void> {
3036
const {args, flags} = await this.parse(Window)
3137
const {database, window} = args

packages/cli/src/commands/redis/maintenance.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,12 @@ export default class Maintenance extends Command {
2727
}),
2828
}
2929

30+
static state = 'deprecated'
31+
32+
static deprecationOptions = {
33+
message: 'The redis:maintenance command has been deprecated and will be removed in version 11. Use commands from the data-maintenance plugin instead.',
34+
}
35+
3036
static args = {
3137
database: Args.string({required: false, description: 'name of the Key-Value Store database. If omitted, it defaults to the primary database associated with the app.'}),
3238
}

0 commit comments

Comments
 (0)