@base44-preview/cli 0.1.15-pr.630.66e368f → 0.1.15-pr.630.a207c26
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 +97 -53
- package/dist/cli/index.js.map +7 -7
- package/package.json +1 -1
package/dist/cli/index.js
CHANGED
|
@@ -269452,18 +269452,27 @@ function getAgentsCommand() {
|
|
|
269452
269452
|
|
|
269453
269453
|
// src/core/model.ts
|
|
269454
269454
|
var MODELS = [
|
|
269455
|
-
{
|
|
269455
|
+
{
|
|
269456
|
+
name: "Automatic",
|
|
269457
|
+
id: null,
|
|
269458
|
+
note: "matched with the best model",
|
|
269459
|
+
aliases: ["default", "auto"]
|
|
269460
|
+
},
|
|
269456
269461
|
{ name: "Opus 5", id: "claude_opus_5" },
|
|
269457
269462
|
{ name: "Sonnet 5", id: "claude-sonnet-5" },
|
|
269458
269463
|
{ name: "Fable 5", id: "claude_fable_5", note: "uses more credits" },
|
|
269459
269464
|
{ name: "GPT-5.6 Sol", id: "gpt_5_6_sol" },
|
|
269460
|
-
{
|
|
269465
|
+
{
|
|
269466
|
+
name: "Gemini 3.8 Flash",
|
|
269467
|
+
id: "gemini_3_8_flash",
|
|
269468
|
+
note: "fast responses for everyday tasks"
|
|
269469
|
+
},
|
|
269461
269470
|
{ name: "Base 1", id: "base1" }
|
|
269462
269471
|
];
|
|
269463
269472
|
var fold = (s) => s.toLowerCase().replace(/[^a-z0-9]/g, "");
|
|
269464
269473
|
function resolvePick(input) {
|
|
269465
269474
|
const key = fold(input);
|
|
269466
|
-
const byExact = MODELS.find((m) => fold(m.name) === key || m.id && fold(m.id) === key);
|
|
269475
|
+
const byExact = MODELS.find((m) => fold(m.name) === key || m.id && fold(m.id) === key || m.aliases?.some((a) => fold(a) === key));
|
|
269467
269476
|
if (byExact)
|
|
269468
269477
|
return byExact;
|
|
269469
269478
|
const byContains = MODELS.filter((m) => fold(m.name).includes(key) || m.id && fold(m.id).includes(key));
|
|
@@ -269491,7 +269500,7 @@ async function saveBuilderModel(userId, modelId) {
|
|
|
269491
269500
|
throw await ApiError.fromHttpError(error, "saving your model choice");
|
|
269492
269501
|
}
|
|
269493
269502
|
}
|
|
269494
|
-
var displayName = (id) => MODELS.find((m) => m.id === id)?.name ?? id ?? "
|
|
269503
|
+
var displayName = (id) => MODELS.find((m) => m.id === id)?.name ?? id ?? "Automatic";
|
|
269495
269504
|
|
|
269496
269505
|
// src/cli/commands/app/model.ts
|
|
269497
269506
|
async function modelAction({ log, jsonMode }, input) {
|
|
@@ -269537,7 +269546,7 @@ function getModelCommand() {
|
|
|
269537
269546
|
|
|
269538
269547
|
// src/cli/commands/app/shared.ts
|
|
269539
269548
|
import { mkdir as mkdir3, writeFile as writeFile2 } from "node:fs/promises";
|
|
269540
|
-
import { join as join21 } from "node:path";
|
|
269549
|
+
import { basename as basename6, join as join21, relative as relative6, resolve as resolve6 } from "node:path";
|
|
269541
269550
|
|
|
269542
269551
|
// src/cli/commands/code/render.ts
|
|
269543
269552
|
var TOOL_ALIASES = {
|
|
@@ -269974,11 +269983,17 @@ async function createAndLinkApp(options) {
|
|
|
269974
269983
|
if (options.name && !APP_NAME_RE.test(options.name)) {
|
|
269975
269984
|
throw new InvalidInputError("The name becomes a directory — letters, digits, dots, dashes and underscores only.");
|
|
269976
269985
|
}
|
|
269977
|
-
const
|
|
269978
|
-
const
|
|
269986
|
+
const cwd = process.cwd();
|
|
269987
|
+
const fallbackName = () => options.importRepo ? repoBasename(options.importRepo) : inventAppName(options.prompt);
|
|
269988
|
+
const chosenDir = options.path ? resolve6(cwd, options.path) : await isDirEmpty(cwd) ? cwd : undefined;
|
|
269989
|
+
const dirBase = chosenDir ? basename6(chosenDir) : undefined;
|
|
269990
|
+
const name = options.name ?? (dirBase && APP_NAME_RE.test(dirBase) ? dirBase : fallbackName());
|
|
269991
|
+
const targetDir = chosenDir ?? join21(cwd, name);
|
|
269992
|
+
const here = targetDir === cwd;
|
|
269993
|
+
const dirName = here ? "." : relative6(cwd, targetDir) || name;
|
|
269979
269994
|
await mkdir3(targetDir, { recursive: true });
|
|
269980
269995
|
if (await appConfigExists(targetDir)) {
|
|
269981
|
-
throw new InvalidInputError(`./${
|
|
269996
|
+
throw new InvalidInputError(here ? "This directory is already linked to a Base44 app. Run `base44 code` here to keep building it, or pass --path for a new one." : `./${dirName} is already linked to a Base44 app. Pick another name or --path.`);
|
|
269982
269997
|
}
|
|
269983
269998
|
const created = options.importRepo ? await createImportedApp({
|
|
269984
269999
|
appName: name,
|
|
@@ -270002,10 +270017,21 @@ async function createAndLinkApp(options) {
|
|
|
270002
270017
|
id: created.id,
|
|
270003
270018
|
editorUrl: `${getBase44ApiUrl()}/apps/${created.id}/editor/preview`,
|
|
270004
270019
|
repoUrl: created.imported_repo_url ?? undefined,
|
|
270005
|
-
dirName
|
|
270006
|
-
targetDir
|
|
270020
|
+
dirName,
|
|
270021
|
+
targetDir,
|
|
270022
|
+
here
|
|
270007
270023
|
};
|
|
270008
270024
|
}
|
|
270025
|
+
function nextStepsLines(app) {
|
|
270026
|
+
const cd = app.here ? "" : `cd ${app.dirName} && `;
|
|
270027
|
+
return [
|
|
270028
|
+
"",
|
|
270029
|
+
`${source_default.bold("Your app lives in")} ${app.here ? "./ (this directory)" : `./${app.dirName}`}`,
|
|
270030
|
+
source_default.dim(` ${cd}base44 code # keep building with the agent`),
|
|
270031
|
+
source_default.dim(` ${cd}base44 app send "…" # one non-interactive turn`),
|
|
270032
|
+
source_default.dim(` files live remotely — ${cd}base44 sandbox ls to look, base44 eject for a copy`)
|
|
270033
|
+
];
|
|
270034
|
+
}
|
|
270009
270035
|
async function githubReauthLines(error) {
|
|
270010
270036
|
if (!isGithubUserTokenError(error))
|
|
270011
270037
|
return null;
|
|
@@ -270236,7 +270262,8 @@ async function newAction({ log, runTask, jsonMode }, prompt, options) {
|
|
|
270236
270262
|
importRepo: options.import,
|
|
270237
270263
|
mode: options.mode,
|
|
270238
270264
|
repoName: options.repoName,
|
|
270239
|
-
fromBranch: options.fromBranch
|
|
270265
|
+
fromBranch: options.fromBranch,
|
|
270266
|
+
path: options.path
|
|
270240
270267
|
}));
|
|
270241
270268
|
} catch (error) {
|
|
270242
270269
|
for (const line of await githubReauthLines(error) ?? [])
|
|
@@ -270247,7 +270274,7 @@ async function newAction({ log, runTask, jsonMode }, prompt, options) {
|
|
|
270247
270274
|
if (app.repoUrl)
|
|
270248
270275
|
log.message(source_default.dim(`repo ${app.repoUrl}`));
|
|
270249
270276
|
log.message(source_default.dim(`editor ${app.editorUrl}`));
|
|
270250
|
-
log.message(source_default.dim(`linked
|
|
270277
|
+
log.message(source_default.dim(`linked ${app.here ? "./ (this directory)" : `./${app.dirName}`}`));
|
|
270251
270278
|
}
|
|
270252
270279
|
let finalState;
|
|
270253
270280
|
let previewUrl;
|
|
@@ -270279,6 +270306,8 @@ async function newAction({ log, runTask, jsonMode }, prompt, options) {
|
|
|
270279
270306
|
repo_url: app.repoUrl ?? null,
|
|
270280
270307
|
editor_url: app.editorUrl,
|
|
270281
270308
|
preview_url: previewUrl ?? null,
|
|
270309
|
+
dir: app.dirName,
|
|
270310
|
+
path: app.targetDir,
|
|
270282
270311
|
status: finalState ?? "created"
|
|
270283
270312
|
})}
|
|
270284
270313
|
`
|
|
@@ -270286,24 +270315,25 @@ async function newAction({ log, runTask, jsonMode }, prompt, options) {
|
|
|
270286
270315
|
}
|
|
270287
270316
|
if (previewUrl)
|
|
270288
270317
|
log.message(`preview ${previewUrl}`);
|
|
270289
|
-
const
|
|
270318
|
+
for (const line of nextStepsLines(app))
|
|
270319
|
+
log.message(line);
|
|
270290
270320
|
if (finalState === "error") {
|
|
270291
270321
|
return {
|
|
270292
|
-
outroMessage: `The first build reported an error — open the editor for details
|
|
270322
|
+
outroMessage: `The first build reported an error — open the editor for details.`
|
|
270293
270323
|
};
|
|
270294
270324
|
}
|
|
270295
270325
|
if (finalState === "processing") {
|
|
270296
270326
|
return {
|
|
270297
|
-
outroMessage: `Still building — follow it with \`base44 app status
|
|
270327
|
+
outroMessage: `Still building — follow it with \`base44 app status\`.`
|
|
270298
270328
|
};
|
|
270299
270329
|
}
|
|
270300
270330
|
return {
|
|
270301
|
-
outroMessage: prompt ? `First build finished · ${formatDuration2(Date.now() - startedAt)}
|
|
270331
|
+
outroMessage: prompt ? `First build finished · ${formatDuration2(Date.now() - startedAt)}.` : "App created."
|
|
270302
270332
|
};
|
|
270303
270333
|
}
|
|
270304
270334
|
function getNewCommand() {
|
|
270305
270335
|
const command = new Base44Command("new", { requireAppContext: false });
|
|
270306
|
-
command.description("Create an app and start building: from a prompt (the Base44 template), or over an existing GitHub repo with --import").argument("[prompt]", "What to build; the first agent turn starts immediately").option("--import <repo>", "Build over an existing GitHub repository instead of the template").option("--mode <mode>", "How to import: direct, fork, or copy (default: direct)").option("--name <name>", "Directory and app name (invented when omitted)").option("--repo-name <name>", "Name for the new GitHub repo when forking/copying").option("--from-branch <name>", "Import a specific branch of the repo").action(newAction);
|
|
270336
|
+
command.description("Create an app and start building: from a prompt (the Base44 template), or over an existing GitHub repo with --import").argument("[prompt]", "What to build; the first agent turn starts immediately").option("--import <repo>", "Build over an existing GitHub repository instead of the template").option("--mode <mode>", "How to import: direct, fork, or copy (default: direct)").option("--name <name>", "Directory and app name (invented when omitted)").option("--path <dir>", "Directory to link (default: the current directory when empty, else ./<name>)").option("--repo-name <name>", "Name for the new GitHub repo when forking/copying").option("--from-branch <name>", "Import a specific branch of the repo").action(newAction);
|
|
270307
270337
|
return command;
|
|
270308
270338
|
}
|
|
270309
270339
|
|
|
@@ -270513,7 +270543,7 @@ function getAuthPushCommand() {
|
|
|
270513
270543
|
}
|
|
270514
270544
|
|
|
270515
270545
|
// src/cli/commands/auth/social-login.ts
|
|
270516
|
-
import { dirname as dirname17, join as join24, resolve as
|
|
270546
|
+
import { dirname as dirname17, join as join24, resolve as resolve7 } from "node:path";
|
|
270517
270547
|
var PROVIDER_LABELS = {
|
|
270518
270548
|
google: "Google",
|
|
270519
270549
|
microsoft: "Microsoft",
|
|
@@ -270553,7 +270583,7 @@ async function socialLoginAction({ log, isNonInteractive, runTask }, provider, a
|
|
|
270553
270583
|
let clientSecret;
|
|
270554
270584
|
if (useCustomOAuth && oauth && oauthCli && hasSecretOptions(options)) {
|
|
270555
270585
|
if (options.envFile) {
|
|
270556
|
-
const secrets = await parseEnvFile(
|
|
270586
|
+
const secrets = await parseEnvFile(resolve7(options.envFile));
|
|
270557
270587
|
const value = secrets[oauthCli.envVar];
|
|
270558
270588
|
if (!value) {
|
|
270559
270589
|
throw new InvalidInputError(`Key "${oauthCli.envVar}" not found in ${options.envFile}.`);
|
|
@@ -270609,7 +270639,7 @@ function getSocialLoginCommand() {
|
|
|
270609
270639
|
}
|
|
270610
270640
|
|
|
270611
270641
|
// src/cli/commands/auth/sso.ts
|
|
270612
|
-
import { dirname as dirname18, join as join25, resolve as
|
|
270642
|
+
import { dirname as dirname18, join as join25, resolve as resolve8 } from "node:path";
|
|
270613
270643
|
var SSOConfigFileSchema = object({
|
|
270614
270644
|
provider: _enum(Object.values(KNOWN_SSO_PROVIDERS)),
|
|
270615
270645
|
clientId: string2(),
|
|
@@ -270625,7 +270655,7 @@ var SSOConfigFileSchema = object({
|
|
|
270625
270655
|
ssoName: string2().optional()
|
|
270626
270656
|
});
|
|
270627
270657
|
async function loadSSOConfigFile(filePath) {
|
|
270628
|
-
const resolved =
|
|
270658
|
+
const resolved = resolve8(filePath);
|
|
270629
270659
|
const raw = await readJsonFile(resolved);
|
|
270630
270660
|
const result = SSOConfigFileSchema.safeParse(raw);
|
|
270631
270661
|
if (!result.success) {
|
|
@@ -270713,7 +270743,7 @@ async function ssoEnableAction({ isNonInteractive, runTask }, options) {
|
|
|
270713
270743
|
}
|
|
270714
270744
|
let clientSecret;
|
|
270715
270745
|
if (merged.envFile && !merged.clientSecret) {
|
|
270716
|
-
const secrets = await parseEnvFile(
|
|
270746
|
+
const secrets = await parseEnvFile(resolve8(merged.envFile));
|
|
270717
270747
|
const value = secrets.sso_client_secret;
|
|
270718
270748
|
if (!value) {
|
|
270719
270749
|
throw new InvalidInputError(`Key "sso_client_secret" not found in ${merged.envFile}.`);
|
|
@@ -276578,19 +276608,21 @@ async function runGenesisSession(options) {
|
|
|
276578
276608
|
|
|
276579
276609
|
// src/cli/commands/code/index.ts
|
|
276580
276610
|
var BRAND_ORANGE2 = "#E86B3C";
|
|
276581
|
-
async function bootstrapApp(prompt, footer, emit, importRepo) {
|
|
276611
|
+
async function bootstrapApp(prompt, footer, emit, onCreated, importRepo, path) {
|
|
276582
276612
|
let app;
|
|
276583
276613
|
try {
|
|
276584
|
-
app = await createAndLinkApp({ prompt, importRepo });
|
|
276614
|
+
app = await createAndLinkApp({ prompt, importRepo, path });
|
|
276585
276615
|
} catch (error) {
|
|
276586
276616
|
for (const line of await githubReauthLines(error) ?? [])
|
|
276587
276617
|
emit(line);
|
|
276588
276618
|
throw error;
|
|
276589
276619
|
}
|
|
276620
|
+
onCreated(app);
|
|
276621
|
+
footer.push(source_default.dim(`dir ${app.here ? "./" : `./${app.dirName}`}`));
|
|
276590
276622
|
if (app.repoUrl)
|
|
276591
276623
|
footer.push(terminalLink("repo", app.repoUrl));
|
|
276592
276624
|
footer.push(terminalLink("editor", app.editorUrl));
|
|
276593
|
-
emit(source_default.dim(`linked ./${app.dirName} (cd ${app.dirName} after the session)`));
|
|
276625
|
+
emit(source_default.dim(app.here ? "linked ./ (this directory)" : `linked ./${app.dirName} (cd ${app.dirName} after the session)`));
|
|
276594
276626
|
const branchId = await resolveActiveBranchId().catch(() => {
|
|
276595
276627
|
return;
|
|
276596
276628
|
});
|
|
@@ -276614,7 +276646,7 @@ async function bootstrapApp(prompt, footer, emit, importRepo) {
|
|
|
276614
276646
|
}
|
|
276615
276647
|
};
|
|
276616
276648
|
}
|
|
276617
|
-
async function codeAction(
|
|
276649
|
+
async function codeAction({ log }, options) {
|
|
276618
276650
|
if (process.stdout.isTTY !== true) {
|
|
276619
276651
|
throw new InvalidInputError("base44 code is an interactive session and needs a terminal.");
|
|
276620
276652
|
}
|
|
@@ -276624,8 +276656,8 @@ async function codeAction(_ctx, options) {
|
|
|
276624
276656
|
linked = true;
|
|
276625
276657
|
} catch {}
|
|
276626
276658
|
if (linked) {
|
|
276627
|
-
if (options.import) {
|
|
276628
|
-
throw new InvalidInputError("--import
|
|
276659
|
+
if (options.import || options.path) {
|
|
276660
|
+
throw new InvalidInputError("--import and --path create a new app; run them outside a linked project.");
|
|
276629
276661
|
}
|
|
276630
276662
|
const branchId = await resolveActiveBranchId().catch(() => {
|
|
276631
276663
|
return;
|
|
@@ -276636,8 +276668,12 @@ async function codeAction(_ctx, options) {
|
|
|
276636
276668
|
primeFirstPoll: true,
|
|
276637
276669
|
idleHint: "what should the agent do next?"
|
|
276638
276670
|
});
|
|
276639
|
-
|
|
276671
|
+
log.message(source_default.dim(`app dir ${getAppContext().projectRoot}`));
|
|
276672
|
+
return {
|
|
276673
|
+
outroMessage: "Session closed. Run `base44 code` here to resume."
|
|
276674
|
+
};
|
|
276640
276675
|
}
|
|
276676
|
+
let created;
|
|
276641
276677
|
const orange = source_default.hex(BRAND_ORANGE2);
|
|
276642
276678
|
const footer = [
|
|
276643
276679
|
source_default.dim(`${orange("●")} ${options.import ? "import" : "builder"}`)
|
|
@@ -276647,13 +276683,21 @@ async function codeAction(_ctx, options) {
|
|
|
276647
276683
|
creatingLabel: options.import ? "importing the repository" : "creating your app",
|
|
276648
276684
|
modeLabel: options.import ? `Import — ${options.import}` : "Builder — Base44 template + agent",
|
|
276649
276685
|
footer,
|
|
276650
|
-
createApp: (prompt, emit) => bootstrapApp(prompt, footer, emit,
|
|
276686
|
+
createApp: (prompt, emit) => bootstrapApp(prompt, footer, emit, (app) => {
|
|
276687
|
+
created = app;
|
|
276688
|
+
}, options.import, options.path)
|
|
276651
276689
|
});
|
|
276652
|
-
|
|
276690
|
+
if (!created) {
|
|
276691
|
+
return { outroMessage: "Session closed. No app was created." };
|
|
276692
|
+
}
|
|
276693
|
+
for (const line of nextStepsLines(created))
|
|
276694
|
+
log.message(line);
|
|
276695
|
+
log.message(source_default.dim(` editor ${created.editorUrl}`));
|
|
276696
|
+
return { outroMessage: "Session closed." };
|
|
276653
276697
|
}
|
|
276654
276698
|
function getCodeCommand() {
|
|
276655
276699
|
const command = new Base44Command("code", { requireAppContext: false });
|
|
276656
|
-
command.description("Open Base44 Code: an interactive agent session — in an empty directory your first prompt creates the app (add --import <repo> to build over an existing repository)").option("--import <repo>", "Build over an existing GitHub repository instead of the Base44 template").action(codeAction);
|
|
276700
|
+
command.description("Open Base44 Code: an interactive agent session — in an empty directory your first prompt creates the app (add --import <repo> to build over an existing repository)").option("--import <repo>", "Build over an existing GitHub repository instead of the Base44 template").option("--path <dir>", "Directory to link the new app to (default: the current directory when empty, else ./<name>)").action(codeAction);
|
|
276657
276701
|
return command;
|
|
276658
276702
|
}
|
|
276659
276703
|
|
|
@@ -277451,10 +277495,10 @@ function getConnectorsListAvailableCommand() {
|
|
|
277451
277495
|
}
|
|
277452
277496
|
|
|
277453
277497
|
// src/cli/commands/connectors/pull.ts
|
|
277454
|
-
import { dirname as dirname19, join as join27, resolve as
|
|
277498
|
+
import { dirname as dirname19, join as join27, resolve as resolve9 } from "node:path";
|
|
277455
277499
|
async function resolveConnectorsDir(options) {
|
|
277456
277500
|
if (!getAppContext().projectRoot) {
|
|
277457
|
-
return
|
|
277501
|
+
return resolve9(options.dir ?? "connectors");
|
|
277458
277502
|
}
|
|
277459
277503
|
const { project } = await readProjectConfig();
|
|
277460
277504
|
return join27(dirname19(project.configPath), project.connectorsDir);
|
|
@@ -277498,10 +277542,10 @@ function getConnectorsPullCommand() {
|
|
|
277498
277542
|
}
|
|
277499
277543
|
|
|
277500
277544
|
// src/cli/commands/connectors/push.ts
|
|
277501
|
-
import { resolve as
|
|
277545
|
+
import { resolve as resolve10 } from "node:path";
|
|
277502
277546
|
async function readConnectorsToPush(options) {
|
|
277503
277547
|
if (!getAppContext().projectRoot) {
|
|
277504
|
-
return readAllConnectors(
|
|
277548
|
+
return readAllConnectors(resolve10(options.dir ?? "connectors"));
|
|
277505
277549
|
}
|
|
277506
277550
|
const { connectors } = await readProjectConfig();
|
|
277507
277551
|
return connectors;
|
|
@@ -277970,7 +278014,7 @@ function getBuildCommand() {
|
|
|
277970
278014
|
}
|
|
277971
278015
|
|
|
277972
278016
|
// src/cli/commands/project/create.ts
|
|
277973
|
-
import { basename as
|
|
278017
|
+
import { basename as basename7, resolve as resolve11 } from "node:path";
|
|
277974
278018
|
var import_kebabCase2 = __toESM(require_kebabCase(), 1);
|
|
277975
278019
|
|
|
277976
278020
|
// src/cli/commands/project/scaffold-shared.ts
|
|
@@ -278135,8 +278179,8 @@ async function createInteractive(options, ctx) {
|
|
|
278135
278179
|
name: () => {
|
|
278136
278180
|
return options.name ? Promise.resolve(options.name) : Ze({
|
|
278137
278181
|
message: "What is the name of your project?",
|
|
278138
|
-
placeholder:
|
|
278139
|
-
initialValue:
|
|
278182
|
+
placeholder: basename7(process.cwd()),
|
|
278183
|
+
initialValue: basename7(process.cwd()),
|
|
278140
278184
|
validate: (value) => {
|
|
278141
278185
|
if (!value || value.trim().length === 0) {
|
|
278142
278186
|
return "Every project deserves a name";
|
|
@@ -278166,7 +278210,7 @@ async function createInteractive(options, ctx) {
|
|
|
278166
278210
|
}, ctx);
|
|
278167
278211
|
}
|
|
278168
278212
|
async function createNonInteractive(options, ctx) {
|
|
278169
|
-
ctx.log.info(`Creating a new project at ${
|
|
278213
|
+
ctx.log.info(`Creating a new project at ${resolve11(options.path)}`);
|
|
278170
278214
|
const template = await getTemplateById(options.template ?? DEFAULT_TEMPLATE_ID);
|
|
278171
278215
|
return await executeCreate({
|
|
278172
278216
|
template,
|
|
@@ -278190,7 +278234,7 @@ async function executeCreate({
|
|
|
278190
278234
|
}, ctx) {
|
|
278191
278235
|
const { log, runTask } = ctx;
|
|
278192
278236
|
const name = rawName.trim();
|
|
278193
|
-
const resolvedPath =
|
|
278237
|
+
const resolvedPath = resolve11(projectPath);
|
|
278194
278238
|
const organizationId = await resolveWorkspaceId(ctx, flagWorkspaceId, isInteractive);
|
|
278195
278239
|
const { projectId } = await runTask("Setting up your project...", async () => {
|
|
278196
278240
|
return await createProjectFiles({
|
|
@@ -278831,7 +278875,7 @@ function getLogsCommand() {
|
|
|
278831
278875
|
}
|
|
278832
278876
|
|
|
278833
278877
|
// src/cli/commands/project/scaffold.ts
|
|
278834
|
-
import { basename as
|
|
278878
|
+
import { basename as basename8, resolve as resolve12 } from "node:path";
|
|
278835
278879
|
function resolveAppId(options) {
|
|
278836
278880
|
const appId = options.appId;
|
|
278837
278881
|
if (!appId) {
|
|
@@ -278847,8 +278891,8 @@ function resolveAppId(options) {
|
|
|
278847
278891
|
async function scaffoldAction(ctx, name, options, command) {
|
|
278848
278892
|
const { log, runTask } = ctx;
|
|
278849
278893
|
const appId = resolveAppId(command.optsWithGlobals());
|
|
278850
|
-
const resolvedPath =
|
|
278851
|
-
const projectName = (name ??
|
|
278894
|
+
const resolvedPath = resolve12("./");
|
|
278895
|
+
const projectName = (name ?? basename8(resolvedPath)).trim();
|
|
278852
278896
|
const template = await getTemplateById("backend-only");
|
|
278853
278897
|
log.info(`Scaffolding project at ${resolvedPath}`);
|
|
278854
278898
|
const { projectId } = await runTask("Setting up your project...", async () => {
|
|
@@ -279264,7 +279308,7 @@ function getSecretsListCommand() {
|
|
|
279264
279308
|
}
|
|
279265
279309
|
|
|
279266
279310
|
// src/cli/commands/secrets/set.ts
|
|
279267
|
-
import { resolve as
|
|
279311
|
+
import { resolve as resolve13 } from "node:path";
|
|
279268
279312
|
function parseEntries(entries) {
|
|
279269
279313
|
const secrets = {};
|
|
279270
279314
|
for (const entry of entries) {
|
|
@@ -279295,7 +279339,7 @@ async function setSecretsAction({ log, runTask }, entries, options) {
|
|
|
279295
279339
|
validateInput(entries, options);
|
|
279296
279340
|
let secrets;
|
|
279297
279341
|
if (options.envFile) {
|
|
279298
|
-
secrets = await parseEnvFile(
|
|
279342
|
+
secrets = await parseEnvFile(resolve13(options.envFile));
|
|
279299
279343
|
if (Object.keys(secrets).length === 0) {
|
|
279300
279344
|
throw new InvalidInputError("The env file contains no valid KEY=VALUE entries.");
|
|
279301
279345
|
}
|
|
@@ -279324,7 +279368,7 @@ function getSecretsCommand() {
|
|
|
279324
279368
|
}
|
|
279325
279369
|
|
|
279326
279370
|
// src/cli/commands/site/deploy.ts
|
|
279327
|
-
import { resolve as
|
|
279371
|
+
import { resolve as resolve14 } from "node:path";
|
|
279328
279372
|
async function deployAction2(ctx, options) {
|
|
279329
279373
|
const { isNonInteractive } = ctx;
|
|
279330
279374
|
if (isNonInteractive && !options.yes) {
|
|
@@ -279402,7 +279446,7 @@ async function deployTarball({ runTask }, project) {
|
|
|
279402
279446
|
}
|
|
279403
279447
|
function siteOutputDir(project) {
|
|
279404
279448
|
const outputDirectory = project.site?.outputDirectory;
|
|
279405
|
-
return outputDirectory ?
|
|
279449
|
+
return outputDirectory ? resolve14(project.root, outputDirectory) : null;
|
|
279406
279450
|
}
|
|
279407
279451
|
function getSiteDeployCommand() {
|
|
279408
279452
|
const command = new Base44Command("deploy").description("Deploy built site files to Base44 hosting").option("-y, --yes", "Skip confirmation prompt").option("--build", "Build the site before deploying (skips the prompt)").option("--no-build", "Deploy without building (skips the prompt)");
|
|
@@ -281904,7 +281948,7 @@ function createCustomIntegrationRoutes(remoteProxy, logger) {
|
|
|
281904
281948
|
|
|
281905
281949
|
// src/cli/dev/dev-server/watcher.ts
|
|
281906
281950
|
import { EventEmitter as EventEmitter6 } from "node:events";
|
|
281907
|
-
import { relative as
|
|
281951
|
+
import { relative as relative10 } from "node:path";
|
|
281908
281952
|
|
|
281909
281953
|
// ../../node_modules/chokidar/index.js
|
|
281910
281954
|
import { EventEmitter as EventEmitter5 } from "node:events";
|
|
@@ -283589,7 +283633,7 @@ class WatchBase44 extends EventEmitter6 {
|
|
|
283589
283633
|
ignoreInitial: true
|
|
283590
283634
|
});
|
|
283591
283635
|
watcher.on("all", import_debounce4.default(async (_event, path) => {
|
|
283592
|
-
this.emit("change", name,
|
|
283636
|
+
this.emit("change", name, relative10(targetPath, path));
|
|
283593
283637
|
}, WATCH_DEBOUNCE_MS));
|
|
283594
283638
|
watcher.on("error", (err) => {
|
|
283595
283639
|
this.logger.error(`Watch handler failed for ${targetPath}`, err);
|
|
@@ -284099,7 +284143,7 @@ Examples:
|
|
|
284099
284143
|
}
|
|
284100
284144
|
|
|
284101
284145
|
// src/cli/commands/project/eject.ts
|
|
284102
|
-
import { resolve as
|
|
284146
|
+
import { resolve as resolve18 } from "node:path";
|
|
284103
284147
|
var import_kebabCase3 = __toESM(require_kebabCase(), 1);
|
|
284104
284148
|
async function eject(ctx, options, command) {
|
|
284105
284149
|
const { log, runTask, isNonInteractive } = ctx;
|
|
@@ -284163,7 +284207,7 @@ async function eject(ctx, options, command) {
|
|
|
284163
284207
|
Ne("Operation cancelled.");
|
|
284164
284208
|
throw new CLIExitError(0);
|
|
284165
284209
|
}
|
|
284166
|
-
const resolvedPath =
|
|
284210
|
+
const resolvedPath = resolve18(selectedPath);
|
|
284167
284211
|
await runTask("Downloading your project's code...", async (updateMessage) => {
|
|
284168
284212
|
await createProjectFilesForExistingProject({
|
|
284169
284213
|
projectId,
|
|
@@ -288300,4 +288344,4 @@ export {
|
|
|
288300
288344
|
runCLI
|
|
288301
288345
|
};
|
|
288302
288346
|
|
|
288303
|
-
//# debugId=
|
|
288347
|
+
//# debugId=B1E2B3DFB2501EB964756E2164756E21
|