Skip to content
Open
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
22 changes: 11 additions & 11 deletions src/utils/apps.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,11 @@ export async function createApp(

const { page } = createAppResult.data;
if (!page?.uuid) {
console.log("Error creating app.");
console.log(createAppResult.data);
console.error("Error creating app.");
console.error(createAppResult.data);
process.exit(1);
} else {
}

console.log("Successfully created an App. 🎉");
console.log(
`${chalk.bold("View in browser:")} ${credentials.origin}/editor/${
Expand All @@ -62,7 +63,6 @@ export async function createApp(
);
return page;
}
}

export async function createAppForTable(
appName: string,
Expand All @@ -85,18 +85,18 @@ export async function createAppForTable(

const { pageUuid } = createAppResult.data;
if (!pageUuid) {
console.log("Error creating app.");
console.log(createAppResult.data);
console.error("Error creating app.");
console.error(createAppResult.data);
process.exit(1);
} else {
}

console.log("Successfully created an App. 🎉");
console.log(
`${chalk.bold("View in browser:")} ${
credentials.origin
}/editor/${pageUuid}`
);
}
}

export async function exportApp(appName: string, credentials: Credentials) {
// Verify that the provided appName exists.
Expand All @@ -107,7 +107,7 @@ export async function exportApp(appName: string, credentials: Credentials) {
}
});
if (app?.length != 1) {
console.log(`0 or >1 Apps named ${appName} found. 😓`);
console.error(`0 or >1 Apps named ${appName} found. 😓`);
process.exit(1);
}

Expand Down Expand Up @@ -161,7 +161,7 @@ export async function deleteApp(
}
});
if (app?.length != 1) {
console.log(`0 or >1 Apps named ${appName} found. 😓`);
console.error(`0 or >1 Apps named ${appName} found. 😓`);
process.exit(1);
}

Expand Down Expand Up @@ -209,7 +209,7 @@ export async function collectAppName(): Promise<string> {
]);

if (appName.length === 0) {
console.log("Error: App name cannot be blank.");
console.error("Error: App name cannot be blank.");
process.exit(1);
}

Expand Down