@base44-preview/cli 0.0.9-pr.72.51ce257 → 0.0.9-pr.74.2f7b0bf
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 +27 -21
- package/package.json +1 -1
package/dist/cli/index.js
CHANGED
|
@@ -26187,10 +26187,20 @@ async function getUserInfo(accessToken) {
|
|
|
26187
26187
|
return result.data;
|
|
26188
26188
|
}
|
|
26189
26189
|
|
|
26190
|
+
//#endregion
|
|
26191
|
+
//#region src/cli/utils/theme.ts
|
|
26192
|
+
/**
|
|
26193
|
+
* Base44 theme configuration
|
|
26194
|
+
*/
|
|
26195
|
+
const theme = { colors: {
|
|
26196
|
+
orange: source_default.hex("#E86B3C"),
|
|
26197
|
+
cyan: source_default.hex("#00D4FF"),
|
|
26198
|
+
gold: source_default.hex("#FFD700"),
|
|
26199
|
+
base44Bg: source_default.bgHex("#E86B3C")
|
|
26200
|
+
} };
|
|
26201
|
+
|
|
26190
26202
|
//#endregion
|
|
26191
26203
|
//#region src/cli/utils/animate.ts
|
|
26192
|
-
const orange$2 = source_default.hex("#E86B3C");
|
|
26193
|
-
const gold = source_default.hex("#FFD700");
|
|
26194
26204
|
/**
|
|
26195
26205
|
* Sleep for a specified number of milliseconds.
|
|
26196
26206
|
*/
|
|
@@ -26207,13 +26217,13 @@ async function animateLineReveal(line, duration$2) {
|
|
|
26207
26217
|
const progress = step / steps;
|
|
26208
26218
|
const revealIndex = Math.floor(progress * line.length);
|
|
26209
26219
|
let output = "";
|
|
26210
|
-
for (let i$1 = 0; i$1 < line.length; i$1++) if (i$1 < revealIndex) output += orange
|
|
26211
|
-
else if (i$1 === revealIndex) output += gold(line[i$1]);
|
|
26220
|
+
for (let i$1 = 0; i$1 < line.length; i$1++) if (i$1 < revealIndex) output += theme.colors.orange(line[i$1]);
|
|
26221
|
+
else if (i$1 === revealIndex) output += theme.colors.gold(line[i$1]);
|
|
26212
26222
|
else output += source_default.dim(line[i$1]);
|
|
26213
26223
|
process.stdout.write(`\r${output}`);
|
|
26214
26224
|
await sleep(stepDuration);
|
|
26215
26225
|
}
|
|
26216
|
-
process.stdout.write(`\r${orange
|
|
26226
|
+
process.stdout.write(`\r${theme.colors.orange(line)}\n`);
|
|
26217
26227
|
}
|
|
26218
26228
|
/**
|
|
26219
26229
|
* Quick shimmer pass over the entire banner.
|
|
@@ -26230,15 +26240,15 @@ async function shimmerPass(lines, duration$2) {
|
|
|
26230
26240
|
let output = "";
|
|
26231
26241
|
for (let i$1 = 0; i$1 < line.length; i$1++) {
|
|
26232
26242
|
const dist = Math.abs(i$1 - shimmerPos);
|
|
26233
|
-
if (dist < 3) output += dist === 0 ? source_default.white(line[i$1]) : gold(line[i$1]);
|
|
26234
|
-
else output += orange
|
|
26243
|
+
if (dist < 3) output += dist === 0 ? source_default.white(line[i$1]) : theme.colors.gold(line[i$1]);
|
|
26244
|
+
else output += theme.colors.orange(line[i$1]);
|
|
26235
26245
|
}
|
|
26236
26246
|
console.log(output);
|
|
26237
26247
|
}
|
|
26238
26248
|
await sleep(stepDuration);
|
|
26239
26249
|
}
|
|
26240
26250
|
process.stdout.write(moveUp);
|
|
26241
|
-
for (const line of lines) console.log(orange
|
|
26251
|
+
for (const line of lines) console.log(theme.colors.orange(line));
|
|
26242
26252
|
}
|
|
26243
26253
|
/**
|
|
26244
26254
|
* Animate the output with a smooth line-by-line reveal.
|
|
@@ -26258,7 +26268,6 @@ async function printAnimatedLines(lines) {
|
|
|
26258
26268
|
|
|
26259
26269
|
//#endregion
|
|
26260
26270
|
//#region src/cli/utils/banner.ts
|
|
26261
|
-
const orange$1 = source_default.hex("#E86B3C");
|
|
26262
26271
|
const BANNER_LINES = [
|
|
26263
26272
|
"██████╗ █████╗ ███████╗███████╗ ██╗ ██╗██╗ ██╗",
|
|
26264
26273
|
"██╔══██╗██╔══██╗██╔════╝██╔════╝ ██║ ██║██║ ██║",
|
|
@@ -26273,12 +26282,11 @@ const BANNER_LINES = [
|
|
|
26273
26282
|
*/
|
|
26274
26283
|
async function printBanner() {
|
|
26275
26284
|
if (process.stdout.isTTY) await printAnimatedLines(BANNER_LINES);
|
|
26276
|
-
else console.log(orange
|
|
26285
|
+
else console.log(theme.colors.orange(BANNER_LINES.join("\n")));
|
|
26277
26286
|
}
|
|
26278
26287
|
|
|
26279
26288
|
//#endregion
|
|
26280
26289
|
//#region src/cli/utils/runCommand.ts
|
|
26281
|
-
const base44Color = source_default.bgHex("#E86B3C");
|
|
26282
26290
|
/**
|
|
26283
26291
|
* Wraps a command function with the Base44 intro/outro and error handling.
|
|
26284
26292
|
* All CLI commands should use this utility to ensure consistent branding.
|
|
@@ -26322,7 +26330,7 @@ async function runCommand(commandFn, options) {
|
|
|
26322
26330
|
if (options?.fullBanner) {
|
|
26323
26331
|
await printBanner();
|
|
26324
26332
|
Ie("");
|
|
26325
|
-
} else Ie(
|
|
26333
|
+
} else Ie(theme.colors.base44Bg(" Base 44 "));
|
|
26326
26334
|
await loadProjectEnv();
|
|
26327
26335
|
try {
|
|
26328
26336
|
if (options?.requireAuth) {
|
|
@@ -32112,7 +32120,7 @@ const green = format(32, 39);
|
|
|
32112
32120
|
const yellow = format(33, 39);
|
|
32113
32121
|
const blue = format(34, 39);
|
|
32114
32122
|
const magenta = format(35, 39);
|
|
32115
|
-
const cyan
|
|
32123
|
+
const cyan = format(36, 39);
|
|
32116
32124
|
const white = format(37, 39);
|
|
32117
32125
|
const gray = format(90, 39);
|
|
32118
32126
|
const bgBlack = format(40, 49);
|
|
@@ -38156,8 +38164,6 @@ var require_lodash = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
38156
38164
|
//#endregion
|
|
38157
38165
|
//#region src/cli/commands/project/create.ts
|
|
38158
38166
|
var import_lodash = /* @__PURE__ */ __toESM(require_lodash(), 1);
|
|
38159
|
-
const orange = source_default.hex("#E86B3C");
|
|
38160
|
-
const cyan = source_default.hex("#00D4FF");
|
|
38161
38167
|
const DEFAULT_TEMPLATE_ID = "backend-only";
|
|
38162
38168
|
async function getDefaultTemplate() {
|
|
38163
38169
|
const template = (await listTemplates()).find((t) => t.id === DEFAULT_TEMPLATE_ID);
|
|
@@ -38237,7 +38243,7 @@ async function executeCreate({ template, name: rawName, description, projectPath
|
|
|
38237
38243
|
template
|
|
38238
38244
|
});
|
|
38239
38245
|
}, {
|
|
38240
|
-
successMessage: orange("Project created successfully"),
|
|
38246
|
+
successMessage: theme.colors.orange("Project created successfully"),
|
|
38241
38247
|
errorMessage: "Failed to create project"
|
|
38242
38248
|
});
|
|
38243
38249
|
await loadProjectEnv(resolvedPath);
|
|
@@ -38252,7 +38258,7 @@ async function executeCreate({ template, name: rawName, description, projectPath
|
|
|
38252
38258
|
if (shouldPushEntities) await runTask(`Pushing ${entities.length} entities to Base44...`, async () => {
|
|
38253
38259
|
await pushEntities(entities);
|
|
38254
38260
|
}, {
|
|
38255
|
-
successMessage: orange("Entities pushed successfully"),
|
|
38261
|
+
successMessage: theme.colors.orange("Entities pushed successfully"),
|
|
38256
38262
|
errorMessage: "Failed to push entities"
|
|
38257
38263
|
});
|
|
38258
38264
|
}
|
|
@@ -38277,16 +38283,16 @@ async function executeCreate({ template, name: rawName, description, projectPath
|
|
|
38277
38283
|
updateMessage("Deploying site...");
|
|
38278
38284
|
return await deploySite(join(resolvedPath, outputDirectory));
|
|
38279
38285
|
}, {
|
|
38280
|
-
successMessage: orange("Site deployed successfully"),
|
|
38286
|
+
successMessage: theme.colors.orange("Site deployed successfully"),
|
|
38281
38287
|
errorMessage: "Failed to deploy site"
|
|
38282
38288
|
});
|
|
38283
38289
|
finalAppUrl = appUrl;
|
|
38284
38290
|
}
|
|
38285
38291
|
}
|
|
38286
38292
|
const dashboardUrl = `${getBase44ApiUrl()}/apps/${projectId}/editor/preview`;
|
|
38287
|
-
M.message(`${source_default.dim("Project")}: ${orange(name$1)}`);
|
|
38288
|
-
M.message(`${source_default.dim("Dashboard")}: ${cyan(dashboardUrl)}`);
|
|
38289
|
-
if (finalAppUrl) M.message(`${source_default.dim("Site")}: ${cyan(finalAppUrl)}`);
|
|
38293
|
+
M.message(`${source_default.dim("Project")}: ${theme.colors.orange(name$1)}`);
|
|
38294
|
+
M.message(`${source_default.dim("Dashboard")}: ${theme.colors.cyan(dashboardUrl)}`);
|
|
38295
|
+
if (finalAppUrl) M.message(`${source_default.dim("Site")}: ${theme.colors.cyan(finalAppUrl)}`);
|
|
38290
38296
|
return { outroMessage: "Your project is set and ready to use" };
|
|
38291
38297
|
}
|
|
38292
38298
|
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).action(async (options) => {
|
package/package.json
CHANGED