Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

improvement(app), display the app list when running "bit app" without a subcommand #9419

Merged
merged 1 commit into from
Jan 7, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions scopes/harmony/application/app.cmd.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,17 +30,18 @@ export class AppListCmd implements Command {
}

export class AppCmd implements Command {
name = 'app <sub-command>';
name = 'app [sub-command]';
description = 'Manages apps';
helpUrl = 'docs/getting-started/composing/create-apps';
alias = 'apps';
group = 'apps';
commands: Command[] = [];
options = [] as CommandOptions;

constructor(private applicationAspect: ApplicationMain) {}

// eslint-disable-next-line @typescript-eslint/no-unused-vars
async report(args: [string]) {
// it should never be here. Yargs throws an error before reaching this method.
return `Please specify a sub-command`;
return new AppListCmd(this.applicationAspect).report();
}
}
2 changes: 1 addition & 1 deletion scopes/harmony/application/application.main.runtime.ts
Original file line number Diff line number Diff line change
Expand Up @@ -517,7 +517,7 @@ export class ApplicationMain {
harmony
);
appService.registerAppType = application.registerAppType.bind(application);
const appCmd = new AppCmd();
const appCmd = new AppCmd(application);
appCmd.commands = [new AppListCmd(application), new RunCmd(application, logger)];
aspectLoader.registerPlugins([new AppPlugin(appSlot)]);
builder.registerBuildTasks([new AppsBuildTask(application)]);
Expand Down