@base44-preview/cli 0.0.13-pr.89.1804f37 → 0.0.14-pr.86.814f3a9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli/index.js +10 -6
- package/package.json +1 -1
package/dist/cli/index.js
CHANGED
|
@@ -38233,9 +38233,13 @@ var require_lodash = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
38233
38233
|
//#region src/cli/commands/project/create.ts
|
|
38234
38234
|
var import_lodash = /* @__PURE__ */ __toESM(require_lodash(), 1);
|
|
38235
38235
|
const DEFAULT_TEMPLATE_ID = "backend-only";
|
|
38236
|
-
async function
|
|
38237
|
-
const
|
|
38238
|
-
|
|
38236
|
+
async function getTemplateById(templateId) {
|
|
38237
|
+
const templates = await listTemplates();
|
|
38238
|
+
const template = templates.find((t) => t.id === templateId);
|
|
38239
|
+
if (!template) {
|
|
38240
|
+
const validIds = templates.map((t) => t.id).join(", ");
|
|
38241
|
+
throw new Error(`Template "${templateId}" not found. Available templates: ${validIds}`);
|
|
38242
|
+
}
|
|
38239
38243
|
return template;
|
|
38240
38244
|
}
|
|
38241
38245
|
function validateNonInteractiveFlags$1(command) {
|
|
@@ -38292,7 +38296,7 @@ async function createInteractive(options) {
|
|
|
38292
38296
|
}
|
|
38293
38297
|
async function createNonInteractive(options) {
|
|
38294
38298
|
return await executeCreate({
|
|
38295
|
-
template: await
|
|
38299
|
+
template: await getTemplateById(options.template ?? DEFAULT_TEMPLATE_ID),
|
|
38296
38300
|
name: options.name,
|
|
38297
38301
|
description: options.description,
|
|
38298
38302
|
projectPath: options.path,
|
|
@@ -38363,7 +38367,7 @@ async function executeCreate({ template, name: rawName, description, projectPath
|
|
|
38363
38367
|
if (finalAppUrl) M.message(`${theme.styles.header("Site")}: ${theme.colors.links(finalAppUrl)}`);
|
|
38364
38368
|
return { outroMessage: "Your project is set up and ready to use" };
|
|
38365
38369
|
}
|
|
38366
|
-
const createCommand = new Command("create").description("Create a new Base44 project").option("-n, --name <name>", "Project name").option("-d, --description <description>", "Project description").option("-p, --path <path>", "Path where to create the project").option("--deploy", "Build and deploy the site").hook("preAction", validateNonInteractiveFlags$1).action(async (options) => {
|
|
38370
|
+
const createCommand = new Command("create").description("Create a new Base44 project").option("-n, --name <name>", "Project name").option("-d, --description <description>", "Project description").option("-p, --path <path>", "Path where to create the project").option("-t, --template <id>", "Template ID (e.g., backend-only, backend-and-client)").option("--deploy", "Build and deploy the site").hook("preAction", validateNonInteractiveFlags$1).action(async (options) => {
|
|
38367
38371
|
await chooseCreate(options);
|
|
38368
38372
|
});
|
|
38369
38373
|
|
|
@@ -39002,7 +39006,7 @@ const siteDeployCommand = new Command("site").description("Manage site deploymen
|
|
|
39002
39006
|
|
|
39003
39007
|
//#endregion
|
|
39004
39008
|
//#region package.json
|
|
39005
|
-
var version = "0.0.
|
|
39009
|
+
var version = "0.0.14";
|
|
39006
39010
|
|
|
39007
39011
|
//#endregion
|
|
39008
39012
|
//#region src/cli/index.ts
|
package/package.json
CHANGED