@base44-preview/cli 0.0.54-pr.538.8d085e6 → 0.0.54-pr.538.c7b934b
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 +59 -59
- package/dist/cli/index.js.map +11 -11
- package/package.json +1 -1
package/dist/cli/index.js
CHANGED
|
@@ -253275,63 +253275,6 @@ function printStripeResult(r, log) {
|
|
|
253275
253275
|
log.info(` Connectors dashboard: ${theme.colors.links(getConnectorsUrl())}`);
|
|
253276
253276
|
}
|
|
253277
253277
|
|
|
253278
|
-
// src/cli/commands/project/init.ts
|
|
253279
|
-
import { basename as basename4, resolve as resolve6 } from "node:path";
|
|
253280
|
-
function resolveAppId(options) {
|
|
253281
|
-
const appId = options.appId ?? process.env.BASE44_APP_ID;
|
|
253282
|
-
if (!appId) {
|
|
253283
|
-
throw new InvalidInputError("No app ID found. `base44 init` scaffolds a local project for an existing Base44 app.", {
|
|
253284
|
-
hints: [
|
|
253285
|
-
{ message: "Pass it explicitly with --app-id <id>" },
|
|
253286
|
-
{
|
|
253287
|
-
message: "Or set BASE44_APP_ID (the Stripe Projects CLI writes it to .env via `stripe projects env --pull`)"
|
|
253288
|
-
}
|
|
253289
|
-
]
|
|
253290
|
-
});
|
|
253291
|
-
}
|
|
253292
|
-
return appId;
|
|
253293
|
-
}
|
|
253294
|
-
async function initAction({ log, runTask: runTask2 }, name2, options) {
|
|
253295
|
-
const appId = resolveAppId(options);
|
|
253296
|
-
const resolvedPath = resolve6("./");
|
|
253297
|
-
const projectName = (name2 ?? basename4(resolvedPath)).trim();
|
|
253298
|
-
const template2 = await getTemplateById("backend-only");
|
|
253299
|
-
log.info(`Initializing project at ${resolvedPath}`);
|
|
253300
|
-
const { projectId, skippedFiles } = await runTask2("Setting up your project...", async () => {
|
|
253301
|
-
return await initProjectFiles({
|
|
253302
|
-
name: projectName,
|
|
253303
|
-
path: resolvedPath,
|
|
253304
|
-
template: template2,
|
|
253305
|
-
appId
|
|
253306
|
-
});
|
|
253307
|
-
}, {
|
|
253308
|
-
successMessage: theme.colors.base44Orange("Project created successfully"),
|
|
253309
|
-
errorMessage: "Failed to create project"
|
|
253310
|
-
});
|
|
253311
|
-
if (skippedFiles.length > 0) {
|
|
253312
|
-
log.info(`Kept existing file${skippedFiles.length > 1 ? "s" : ""}: ${skippedFiles.join(", ")}`);
|
|
253313
|
-
}
|
|
253314
|
-
setAppConfig({ id: projectId, projectRoot: resolvedPath });
|
|
253315
|
-
return await completeProjectSetup({
|
|
253316
|
-
projectId,
|
|
253317
|
-
name: projectName,
|
|
253318
|
-
resolvedPath,
|
|
253319
|
-
deploy: false,
|
|
253320
|
-
skills: options.skills,
|
|
253321
|
-
isInteractive: false
|
|
253322
|
-
}, { log, runTask: runTask2 });
|
|
253323
|
-
}
|
|
253324
|
-
function getInitCommand() {
|
|
253325
|
-
return new Base44Command("init", {
|
|
253326
|
-
requireAppConfig: false,
|
|
253327
|
-
fullBanner: true
|
|
253328
|
-
}).description("Scaffold a local project for an existing Base44 app (e.g. one provisioned by the Stripe Projects CLI)").addArgument(new Argument("name", "Project name").argOptional()).option("--app-id <id>", "Existing Base44 app ID (defaults to the BASE44_APP_ID environment variable)").option("--no-skills", "Skip AI agent skills installation").addHelpText("after", `
|
|
253329
|
-
Examples:
|
|
253330
|
-
$ base44 init Scaffolds the current dir for $BASE44_APP_ID
|
|
253331
|
-
$ base44 init --app-id app_123 Scaffolds the current dir for the given app
|
|
253332
|
-
$ base44 init my-app --app-id app_123 Scaffolds the current dir, named "my-app"`).action(initAction);
|
|
253333
|
-
}
|
|
253334
|
-
|
|
253335
253278
|
// src/cli/commands/project/link.ts
|
|
253336
253279
|
function validateNonInteractiveFlags2(command2) {
|
|
253337
253280
|
const { create: create4, name: name2, projectId } = command2.opts();
|
|
@@ -253601,6 +253544,63 @@ function getLogsCommand() {
|
|
|
253601
253544
|
return new Base44Command("logs").description("Fetch function logs for this app").option("--function <names>", "Filter by function name(s), comma-separated. If omitted, fetches logs for all project functions").option("--since <datetime>", "Show logs from this time (ISO format)", normalizeDatetime).option("--until <datetime>", "Show logs until this time (ISO format)", normalizeDatetime).addOption(new Option("--level <level>", "Filter by log level").choices([...LogLevelSchema.options]).hideHelp()).option("-n, --limit <n>", "Results per page (1-1000, default: 50)").addOption(new Option("--order <order>", "Sort order").choices(["asc", "desc"])).action(logsAction);
|
|
253602
253545
|
}
|
|
253603
253546
|
|
|
253547
|
+
// src/cli/commands/project/scaffold.ts
|
|
253548
|
+
import { basename as basename4, resolve as resolve6 } from "node:path";
|
|
253549
|
+
function resolveAppId(options) {
|
|
253550
|
+
const appId = options.appId ?? process.env.BASE44_APP_ID;
|
|
253551
|
+
if (!appId) {
|
|
253552
|
+
throw new InvalidInputError("No app ID found. `base44 scaffold` sets up a local project for an existing Base44 app.", {
|
|
253553
|
+
hints: [
|
|
253554
|
+
{ message: "Pass it explicitly with --app-id <id>" },
|
|
253555
|
+
{
|
|
253556
|
+
message: "Or set the BASE44_APP_ID environment variable (e.g. via .env)"
|
|
253557
|
+
}
|
|
253558
|
+
]
|
|
253559
|
+
});
|
|
253560
|
+
}
|
|
253561
|
+
return appId;
|
|
253562
|
+
}
|
|
253563
|
+
async function scaffoldAction({ log, runTask: runTask2 }, name2, options) {
|
|
253564
|
+
const appId = resolveAppId(options);
|
|
253565
|
+
const resolvedPath = resolve6("./");
|
|
253566
|
+
const projectName = (name2 ?? basename4(resolvedPath)).trim();
|
|
253567
|
+
const template2 = await getTemplateById("backend-only");
|
|
253568
|
+
log.info(`Scaffolding project at ${resolvedPath}`);
|
|
253569
|
+
const { projectId, skippedFiles } = await runTask2("Setting up your project...", async () => {
|
|
253570
|
+
return await initProjectFiles({
|
|
253571
|
+
name: projectName,
|
|
253572
|
+
path: resolvedPath,
|
|
253573
|
+
template: template2,
|
|
253574
|
+
appId
|
|
253575
|
+
});
|
|
253576
|
+
}, {
|
|
253577
|
+
successMessage: theme.colors.base44Orange("Project created successfully"),
|
|
253578
|
+
errorMessage: "Failed to create project"
|
|
253579
|
+
});
|
|
253580
|
+
if (skippedFiles.length > 0) {
|
|
253581
|
+
log.info(`Kept existing file${skippedFiles.length > 1 ? "s" : ""}: ${skippedFiles.join(", ")}`);
|
|
253582
|
+
}
|
|
253583
|
+
setAppConfig({ id: projectId, projectRoot: resolvedPath });
|
|
253584
|
+
return await completeProjectSetup({
|
|
253585
|
+
projectId,
|
|
253586
|
+
name: projectName,
|
|
253587
|
+
resolvedPath,
|
|
253588
|
+
deploy: false,
|
|
253589
|
+
skills: options.skills,
|
|
253590
|
+
isInteractive: false
|
|
253591
|
+
}, { log, runTask: runTask2 });
|
|
253592
|
+
}
|
|
253593
|
+
function getScaffoldCommand() {
|
|
253594
|
+
return new Base44Command("scaffold", {
|
|
253595
|
+
requireAppConfig: false,
|
|
253596
|
+
fullBanner: true
|
|
253597
|
+
}).description("Scaffold a local project for an existing Base44 app").addArgument(new Argument("name", "Project name").argOptional()).option("--app-id <id>", "Existing Base44 app ID (defaults to the BASE44_APP_ID environment variable)").option("--no-skills", "Skip AI agent skills installation").addHelpText("after", `
|
|
253598
|
+
Examples:
|
|
253599
|
+
$ base44 scaffold Scaffolds the current dir for $BASE44_APP_ID
|
|
253600
|
+
$ base44 scaffold --app-id app_123 Scaffolds the current dir for the given app
|
|
253601
|
+
$ base44 scaffold my-app --app-id app_123 Scaffolds the current dir, named "my-app"`).action(scaffoldAction);
|
|
253602
|
+
}
|
|
253603
|
+
|
|
253604
253604
|
// src/cli/commands/secrets/delete.ts
|
|
253605
253605
|
async function deleteSecretAction({ runTask: runTask2 }, key) {
|
|
253606
253606
|
await runTask2(`Deleting secret "${key}"`, async () => {
|
|
@@ -257495,7 +257495,7 @@ function createProgram(context) {
|
|
|
257495
257495
|
program2.addCommand(getWhoamiCommand());
|
|
257496
257496
|
program2.addCommand(getLogoutCommand());
|
|
257497
257497
|
program2.addCommand(getCreateCommand());
|
|
257498
|
-
program2.addCommand(
|
|
257498
|
+
program2.addCommand(getScaffoldCommand());
|
|
257499
257499
|
program2.addCommand(getDashboardCommand());
|
|
257500
257500
|
program2.addCommand(getDeployCommand2());
|
|
257501
257501
|
program2.addCommand(getLinkCommand());
|
|
@@ -261756,4 +261756,4 @@ export {
|
|
|
261756
261756
|
CLIExitError
|
|
261757
261757
|
};
|
|
261758
261758
|
|
|
261759
|
-
//# debugId=
|
|
261759
|
+
//# debugId=CEC26126A86D017564756E2164756E21
|