@base44-preview/cli 0.0.12-pr.84.04d43c0 → 0.0.13-pr.86.f208957
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 +13 -4
- package/package.json +1 -1
package/dist/cli/index.js
CHANGED
|
@@ -16744,7 +16744,7 @@ async function readAllEntities(entitiesDir) {
|
|
|
16744
16744
|
async function pushEntities(entities) {
|
|
16745
16745
|
const appClient = getAppClient();
|
|
16746
16746
|
const schemaSyncPayload = Object.fromEntries(entities.map((entity) => [entity.name, entity]));
|
|
16747
|
-
const response = await appClient.put("
|
|
16747
|
+
const response = await appClient.put("entity-schemas", {
|
|
16748
16748
|
json: { entityNameToSchema: schemaSyncPayload },
|
|
16749
16749
|
throwHttpErrors: false
|
|
16750
16750
|
});
|
|
@@ -38238,6 +38238,15 @@ async function getDefaultTemplate() {
|
|
|
38238
38238
|
if (!template) throw new Error(`Default template "${DEFAULT_TEMPLATE_ID}" not found`);
|
|
38239
38239
|
return template;
|
|
38240
38240
|
}
|
|
38241
|
+
async function getTemplateById(templateId) {
|
|
38242
|
+
const templates = await listTemplates();
|
|
38243
|
+
const template = templates.find((t) => t.id === templateId);
|
|
38244
|
+
if (!template) {
|
|
38245
|
+
const validIds = templates.map((t) => t.id).join(", ");
|
|
38246
|
+
throw new Error(`Template "${templateId}" not found. Available templates: ${validIds}`);
|
|
38247
|
+
}
|
|
38248
|
+
return template;
|
|
38249
|
+
}
|
|
38241
38250
|
function validateNonInteractiveFlags$1(command) {
|
|
38242
38251
|
const { name: name$1, path: path$17 } = command.opts();
|
|
38243
38252
|
const providedCount = [name$1, path$17].filter(Boolean).length;
|
|
@@ -38292,7 +38301,7 @@ async function createInteractive(options) {
|
|
|
38292
38301
|
}
|
|
38293
38302
|
async function createNonInteractive(options) {
|
|
38294
38303
|
return await executeCreate({
|
|
38295
|
-
template: await getDefaultTemplate(),
|
|
38304
|
+
template: options.template ? await getTemplateById(options.template) : await getDefaultTemplate(),
|
|
38296
38305
|
name: options.name,
|
|
38297
38306
|
description: options.description,
|
|
38298
38307
|
projectPath: options.path,
|
|
@@ -38363,7 +38372,7 @@ async function executeCreate({ template, name: rawName, description, projectPath
|
|
|
38363
38372
|
if (finalAppUrl) M.message(`${theme.styles.header("Site")}: ${theme.colors.links(finalAppUrl)}`);
|
|
38364
38373
|
return { outroMessage: "Your project is set up and ready to use" };
|
|
38365
38374
|
}
|
|
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) => {
|
|
38375
|
+
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
38376
|
await chooseCreate(options);
|
|
38368
38377
|
});
|
|
38369
38378
|
|
|
@@ -39002,7 +39011,7 @@ const siteDeployCommand = new Command("site").description("Manage site deploymen
|
|
|
39002
39011
|
|
|
39003
39012
|
//#endregion
|
|
39004
39013
|
//#region package.json
|
|
39005
|
-
var version = "0.0.
|
|
39014
|
+
var version = "0.0.13";
|
|
39006
39015
|
|
|
39007
39016
|
//#endregion
|
|
39008
39017
|
//#region src/cli/index.ts
|
package/package.json
CHANGED