Skip to content

Commit 6fcf882

Browse files
authored
fix(cli): Deprecate doctor and lab commands (#4945)
1 parent f586a18 commit 6fcf882

File tree

5 files changed

+13
-8
lines changed

5 files changed

+13
-8
lines changed

packages/@ionic/cli/src/commands/capacitor/build.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,17 +36,17 @@ export class BuildCommand extends CapacitorCommand implements CommandPreRun {
3636
const footnotes: Footnote[] = [
3737
{
3838
id: 'capacitor-native-config-docs',
39-
url: 'https://capacitor.ionicframework.com/docs/basics/configuring-your-app',
39+
url: 'https://capacitorjs.com/docs/basics/configuring-your-app',
4040
shortUrl: 'https://ion.link/capacitor-native-config-docs',
4141
},
4242
{
4343
id: 'capacitor-ios-config-docs',
44-
url: 'https://capacitor.ionicframework.com/docs/ios/configuration',
44+
url: 'https://capacitorjs.com/docs/ios/configuration',
4545
shortUrl: 'https://ion.link/capacitor-ios-config-docs',
4646
},
4747
{
4848
id: 'capacitor-android-config-docs',
49-
url: 'https://capacitor.ionicframework.com/docs/android/configuration',
49+
url: 'https://capacitorjs.com/docs/android/configuration',
5050
shortUrl: 'https://ion.link/capacitor-android-config-docs',
5151
},
5252
];

packages/@ionic/cli/src/commands/doctor/check.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { contains, validate } from '@ionic/cli-framework';
1+
import { contains, MetadataGroup, validate } from '@ionic/cli-framework';
22

33
import { CommandLineInputs, CommandLineOptions, CommandMetadata, IAilment } from '../../definitions';
44
import { isTreatableAilment } from '../../guards';
@@ -13,6 +13,7 @@ export class DoctorCheckCommand extends DoctorCommand {
1313
name: 'check',
1414
type: 'project',
1515
summary: 'Check the health of your Ionic project',
16+
groups: [MetadataGroup.DEPRECATED],
1617
description: `
1718
This command detects and prints common issues and suggested steps to fix them.
1819

packages/@ionic/cli/src/commands/doctor/list.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import { MetadataGroup } from '@ionic/cli-framework';
12
import { strcmp } from '@ionic/cli-framework/utils/string';
23
import { columnar } from '@ionic/utils-terminal';
34

@@ -14,6 +15,7 @@ export class DoctorListCommand extends DoctorCommand {
1415
name: 'list',
1516
type: 'project',
1617
summary: 'List all issues and their identifiers',
18+
groups: [MetadataGroup.DEPRECATED],
1719
description: `
1820
Issues can have various tags:
1921
- ${strong('treatable')}: ${input('ionic doctor treat')} can attempt to fix the issue

packages/@ionic/cli/src/commands/doctor/treat.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { contains, validate } from '@ionic/cli-framework';
1+
import { contains, MetadataGroup, validate } from '@ionic/cli-framework';
22

33
import { CommandLineInputs, CommandLineOptions, CommandMetadata, TreatableAilment } from '../../definitions';
44
import { isExitCodeException, isTreatableAilment } from '../../guards';
@@ -16,6 +16,7 @@ export class DoctorTreatCommand extends DoctorCommand {
1616
name: 'treat',
1717
type: 'project',
1818
summary: 'Attempt to fix issues in your Ionic project',
19+
groups: [MetadataGroup.DEPRECATED],
1920
description: `
2021
This command detects and attempts to fix common issues. Before a fix is attempted, the steps are printed and a confirmation prompt is displayed.
2122

packages/@ionic/cli/src/commands/serve.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,15 @@ export class ServeCommand extends Command implements CommandPreRun {
1919
name: 'lab-host',
2020
summary: 'Use specific host for Ionic Lab server',
2121
default: 'localhost',
22-
groups: [MetadataGroup.ADVANCED],
22+
groups: [MetadataGroup.HIDDEN, MetadataGroup.ADVANCED],
2323
spec: { value: 'host' },
2424
hint: weak('(--lab)'),
2525
},
2626
{
2727
name: 'lab-port',
2828
summary: 'Use specific port for Ionic Lab server',
2929
default: DEFAULT_LAB_PORT.toString(),
30-
groups: [MetadataGroup.ADVANCED],
30+
groups: [MetadataGroup.HIDDEN, MetadataGroup.ADVANCED],
3131
spec: { value: 'port' },
3232
hint: weak('(--lab)'),
3333
},
@@ -56,10 +56,11 @@ export class ServeCommand extends Command implements CommandPreRun {
5656
summary: 'Test your apps on multiple platform types in the browser',
5757
type: Boolean,
5858
aliases: ['l'],
59+
groups: [MetadataGroup.HIDDEN],
5960
},
6061
];
6162

62-
const exampleCommands = ['', '--external', '--lab'];
63+
const exampleCommands = ['', '--external'];
6364
const footnotes: Footnote[] = [];
6465

6566
let description = `

0 commit comments

Comments
 (0)