Skip to content

Commit 9359ad3

Browse files
fix: handled errors and set hidden to false
1 parent a0a580e commit 9359ad3

5 files changed

Lines changed: 7 additions & 3 deletions

File tree

src/commands/app/delete.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ export default class Delete extends BaseCommand<typeof Delete> {
5353
this.log(deleteAppMsg.APP_IS_INSTALLED, "error");
5454
}
5555
} catch (error: any) {
56-
this.log(error.errorMessage, "error");
56+
this.log(error?.errorMessage || error?.message || error, "error");
5757
if (error.status === 400) {
5858
// check for invalid app-uid
5959
this.log(deleteAppMsg.PLEASE_SELECT_APP_FROM_LIST);

src/commands/app/get.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ export default class Get extends BaseCommand<typeof Get> {
5555
this.log
5656
);
5757
} catch (error: any) {
58-
this.log(error.errorMessage, "error");
58+
this.log(error?.errorMessage || error?.message || error, "error");
5959
this.exit();
6060
}
6161
}

src/commands/app/index.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ export default class App extends Command {
1414
"$ <%= config.bin %> <%= command.id %>:get",
1515
"$ <%= config.bin %> <%= command.id %>:update",
1616
"$ <%= config.bin %> <%= command.id %>:delete",
17+
"$ <%= config.bin %> <%= command.id %>:install",
18+
"$ <%= config.bin %> <%= command.id %>:uninstall",
1719
];
1820

1921
async run(): Promise<void> {

src/commands/app/install.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import { getOrg, getApp, getStack, installApp, fetchApp, fetchStack} from "../..
55

66
export default class Install extends BaseCommand<typeof Install> {
77
static description: string | undefined = "Install an app from the marketplace";
8+
static hidden: boolean = false;
89

910
static examples = [
1011
"$ <%= config.bin %> <%= command.id %>",
@@ -67,7 +68,7 @@ export default class Install extends BaseCommand<typeof Install> {
6768
app: app?.name || app?.uid,
6869
type: appType,
6970
target: this.flags['stack-api-key'] || this.sharedConfig.org
70-
}), "warn")
71+
}), "info")
7172
await installApp(this.flags, this.sharedConfig.org, appType, {managementSdk: this.managementAppSdk, log: this.log})
7273
this.log($t(installAppMsg.APP_INSTALLED_SUCCESSFULLY, {
7374
app: app?.name || this.flags['app-uid'] as string,

src/commands/app/uninstall.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import { commonMsg, uninstallAppMsg } from "../../messages";
55

66
export default class Uninstall extends BaseCommand<typeof Uninstall> {
77
static description = "Uninstall an app";
8+
static hidden: boolean = false;
89

910
static examples = [
1011
"$ <%= config.bin %> <%= command.id %>",

0 commit comments

Comments
 (0)