Skip to content
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
4 changes: 3 additions & 1 deletion src/cli/commands/project/create.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import chalk from "chalk";
import kebabCase from "lodash.kebabcase";
import { createProjectFiles, listTemplates } from "@core/project/index.js";
import type { Template } from "@core/project/index.js";
import { getBase44ApiUrl } from "@core/config.js";
import { runCommand, runTask, onPromptCancel } from "../../utils/index.js";

async function create(): Promise<void> {
Expand Down Expand Up @@ -55,7 +56,7 @@ async function create(): Promise<void> {
const resolvedPath = resolve(projectPath as string);

// Create the project
await runTask(
const { projectId } = await runTask(
"Creating project...",
async () => {
return await createProjectFiles({
Expand All @@ -72,6 +73,7 @@ async function create(): Promise<void> {
);

log.success(`Project ${chalk.bold(name)} has been initialized!`);
log.success(`Dashboard link:\n${chalk.bold(`${getBase44ApiUrl()}/apps/${projectId}/editor/preview`)}`);
}

export const createCommand = new Command("create")
Expand Down
1 change: 1 addition & 0 deletions src/core/project/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ export async function createProject(projectName: string, description?: string) {
name: projectName,
user_description: description ?? `Backend for '${projectName}'`,
app_type: "baas",
public_settings: "public_without_login"
},
});

Expand Down
2 changes: 2 additions & 0 deletions src/core/project/create.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ export interface CreateProjectOptions {
}

export interface CreateProjectResult {
projectId: string;
projectDir: string;
}

Expand Down Expand Up @@ -43,6 +44,7 @@ export async function createProjectFiles(
});

return {
projectId,
projectDir: basePath,
};
}