@base44-preview/cli 0.1.17-pr.635.fd9bbfb → 0.1.18-pr.635.6429d1d
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.
|
@@ -8,7 +8,7 @@ A simple todo list app built with React and Base44 backend.
|
|
|
8
8
|
base44/ # Backend configuration
|
|
9
9
|
├── config.jsonc # Project settings
|
|
10
10
|
└── entities/ # Data schemas
|
|
11
|
-
└──
|
|
11
|
+
└── Task.jsonc # Task entity
|
|
12
12
|
|
|
13
13
|
src/ # Frontend code
|
|
14
14
|
├── App.jsx # Main todo app
|
package/dist/cli/index.js
CHANGED
|
@@ -230721,10 +230721,7 @@ var SiteConfigSchema = object({
|
|
|
230721
230721
|
buildCommand: string2().default("npm run build"),
|
|
230722
230722
|
serveCommand: string2().optional(),
|
|
230723
230723
|
outputDirectory: string2().optional(),
|
|
230724
|
-
installCommand: string2().default("npm install")
|
|
230725
|
-
devHostFlag: string2().default("--host"),
|
|
230726
|
-
devHost: string2().default("0.0.0.0"),
|
|
230727
|
-
devPort: number2().int().min(1).max(65535).default(5173)
|
|
230724
|
+
installCommand: string2().default("npm install")
|
|
230728
230725
|
});
|
|
230729
230726
|
var PluginMetadataSchema = object({
|
|
230730
230727
|
namespace: string2().min(1, "Plugin namespace cannot be empty").regex(/^[a-zA-Z0-9_-]+$/, "Plugin namespace can only contain letters, numbers, underscores, and dashes")
|
|
@@ -239254,7 +239251,7 @@ import { join as join13 } from "node:path";
|
|
|
239254
239251
|
// package.json
|
|
239255
239252
|
var package_default = {
|
|
239256
239253
|
name: "base44",
|
|
239257
|
-
version: "0.1.
|
|
239254
|
+
version: "0.1.18",
|
|
239258
239255
|
description: "Base44 CLI - Unified interface for managing Base44 applications",
|
|
239259
239256
|
type: "module",
|
|
239260
239257
|
bin: {
|
|
@@ -246709,35 +246706,6 @@ async function gitHead(projectRoot) {
|
|
|
246709
246706
|
return null;
|
|
246710
246707
|
}
|
|
246711
246708
|
}
|
|
246712
|
-
// src/core/site/serve-command.ts
|
|
246713
|
-
var DEFAULT_SERVE_COMMAND = "npm run dev";
|
|
246714
|
-
var SCRIPT = "[A-Za-z0-9:_.-]+";
|
|
246715
|
-
var PREFIX2 = "[A-Za-z0-9._/-]+";
|
|
246716
|
-
var SCRIPT_RUNNERS = [
|
|
246717
|
-
{
|
|
246718
|
-
pattern: new RegExp(String.raw`^npm(\s+--prefix\s+${PREFIX2})?\s+run\s+${SCRIPT}$`),
|
|
246719
|
-
separator: " -- "
|
|
246720
|
-
},
|
|
246721
|
-
{
|
|
246722
|
-
pattern: new RegExp(String.raw`^(?:pnpm|yarn|bun)(\s+run)?\s+${SCRIPT}$`),
|
|
246723
|
-
separator: " "
|
|
246724
|
-
}
|
|
246725
|
-
];
|
|
246726
|
-
function runnerFor(serveCommand) {
|
|
246727
|
-
return SCRIPT_RUNNERS.find((runner) => runner.pattern.test(serveCommand));
|
|
246728
|
-
}
|
|
246729
|
-
function withServeAddress(serveCommand, { host, port, hostFlag }) {
|
|
246730
|
-
const command = serveCommand.trim();
|
|
246731
|
-
const args = [hostFlag, host, "--port", String(port)];
|
|
246732
|
-
const runner = runnerFor(command);
|
|
246733
|
-
if (!runner) {
|
|
246734
|
-
return { command, droppedAddress: true };
|
|
246735
|
-
}
|
|
246736
|
-
return {
|
|
246737
|
-
command: `${command}${runner.separator}${args.join(" ")}`,
|
|
246738
|
-
droppedAddress: false
|
|
246739
|
-
};
|
|
246740
|
-
}
|
|
246741
246709
|
// src/core/project/deploy.ts
|
|
246742
246710
|
function hasResourcesToDeploy(projectData) {
|
|
246743
246711
|
const {
|
|
@@ -250037,36 +250005,6 @@ function printStripeResult(r, log) {
|
|
|
250037
250005
|
log.info(` Connectors dashboard: ${theme.colors.links(getConnectorsUrl())}`);
|
|
250038
250006
|
}
|
|
250039
250007
|
|
|
250040
|
-
// src/cli/commands/project/install.ts
|
|
250041
|
-
async function installAction({
|
|
250042
|
-
runTask
|
|
250043
|
-
}) {
|
|
250044
|
-
const { project } = await readProjectConfig();
|
|
250045
|
-
const installCommand = project.site?.installCommand;
|
|
250046
|
-
if (!installCommand) {
|
|
250047
|
-
throw new ConfigNotFoundError("No site install command found.", {
|
|
250048
|
-
hints: [
|
|
250049
|
-
{
|
|
250050
|
-
message: `Add a 'site' block to your config.jsonc (e.g., "site": { "installCommand": "npm ci" }). Inside one, installCommand defaults to "npm install".`
|
|
250051
|
-
}
|
|
250052
|
-
]
|
|
250053
|
-
});
|
|
250054
|
-
}
|
|
250055
|
-
await runTask("Installing site dependencies...", () => execa({ cwd: project.root, shell: true })`${installCommand}`, {
|
|
250056
|
-
successMessage: "Dependencies installed",
|
|
250057
|
-
errorMessage: "Install failed"
|
|
250058
|
-
});
|
|
250059
|
-
return {
|
|
250060
|
-
outroMessage: `Installed with ${theme.styles.bold(installCommand)}`
|
|
250061
|
-
};
|
|
250062
|
-
}
|
|
250063
|
-
function getInstallCommand() {
|
|
250064
|
-
return new Base44Command("install", {
|
|
250065
|
-
requireAuth: false,
|
|
250066
|
-
requireAppContext: false
|
|
250067
|
-
}).description("Install the site's dependencies with its configured command").action(installAction);
|
|
250068
|
-
}
|
|
250069
|
-
|
|
250070
250008
|
// src/cli/commands/project/app-id-options.ts
|
|
250071
250009
|
function readExplicitAppId(command) {
|
|
250072
250010
|
const { appId } = command.optsWithGlobals();
|
|
@@ -251313,7 +251251,8 @@ function stopRunnerOnProcessSignals(runner) {
|
|
|
251313
251251
|
}
|
|
251314
251252
|
|
|
251315
251253
|
// src/cli/commands/site/dev.ts
|
|
251316
|
-
|
|
251254
|
+
var DEFAULT_SERVE_COMMAND = "npm run dev";
|
|
251255
|
+
async function siteDevAction(ctx) {
|
|
251317
251256
|
const { app } = ctx;
|
|
251318
251257
|
if (!app?.projectRoot) {
|
|
251319
251258
|
throw new ConfigInvalidError("base44 site dev requires a linked local project. Run it from a project with base44/.app.jsonc.");
|
|
@@ -251323,30 +251262,49 @@ async function siteDevAction(ctx, options) {
|
|
|
251323
251262
|
if (!site) {
|
|
251324
251263
|
throw new InvalidInputError(`This project has no 'site' block in base44/config.jsonc, so there is no frontend to serve. Add one naming its serveCommand; site dev falls back to "npm run dev".`);
|
|
251325
251264
|
}
|
|
251326
|
-
const
|
|
251327
|
-
const { command, droppedAddress } = withServeAddress(serveCommand, {
|
|
251328
|
-
host: site.devHost,
|
|
251329
|
-
port: site.devPort,
|
|
251330
|
-
hostFlag: site.devHostFlag
|
|
251331
|
-
});
|
|
251332
|
-
if (droppedAddress) {
|
|
251333
|
-
throw new InvalidInputError(`serveCommand '${serveCommand}' takes no forwarded arguments, so the bind address cannot be passed to it. Bind it inside serveCommand itself, or use an 'npm run', 'pnpm', 'yarn' or 'bun run' script.`);
|
|
251334
|
-
}
|
|
251265
|
+
const command = site.serveCommand ?? DEFAULT_SERVE_COMMAND;
|
|
251335
251266
|
const runner = createServeCommandRunner({
|
|
251336
251267
|
serveCommand: command,
|
|
251337
251268
|
projectRoot: project.root,
|
|
251338
|
-
appId: app.id
|
|
251339
|
-
appBaseUrl: options.backendUrl
|
|
251269
|
+
appId: app.id
|
|
251340
251270
|
});
|
|
251341
251271
|
stopRunnerOnProcessSignals(runner);
|
|
251342
251272
|
runner.onExit((code) => process.exit(code ?? 1));
|
|
251343
251273
|
runner.start();
|
|
251274
|
+
return { outroMessage: `Frontend dev server running '${command}'` };
|
|
251275
|
+
}
|
|
251276
|
+
function getSiteDevCommand() {
|
|
251277
|
+
return new Base44Command("dev", { requireAuth: false }).description("Run the site's dev server, with no local backend").action(siteDevAction);
|
|
251278
|
+
}
|
|
251279
|
+
|
|
251280
|
+
// src/cli/commands/site/install.ts
|
|
251281
|
+
async function installAction({
|
|
251282
|
+
runTask
|
|
251283
|
+
}) {
|
|
251284
|
+
const { project } = await readProjectConfig();
|
|
251285
|
+
const installCommand = project.site?.installCommand;
|
|
251286
|
+
if (!installCommand) {
|
|
251287
|
+
throw new ConfigNotFoundError("No site install command found.", {
|
|
251288
|
+
hints: [
|
|
251289
|
+
{
|
|
251290
|
+
message: `Add a 'site' block to your config.jsonc (e.g., "site": { "installCommand": "npm ci" }). Inside one, installCommand defaults to "npm install".`
|
|
251291
|
+
}
|
|
251292
|
+
]
|
|
251293
|
+
});
|
|
251294
|
+
}
|
|
251295
|
+
await runTask("Installing site dependencies...", () => execa({ cwd: project.root, shell: true })`${installCommand}`, {
|
|
251296
|
+
successMessage: "Dependencies installed",
|
|
251297
|
+
errorMessage: "Install failed"
|
|
251298
|
+
});
|
|
251344
251299
|
return {
|
|
251345
|
-
outroMessage:
|
|
251300
|
+
outroMessage: `Installed with ${theme.styles.bold(installCommand)}`
|
|
251346
251301
|
};
|
|
251347
251302
|
}
|
|
251348
|
-
function
|
|
251349
|
-
return new Base44Command("
|
|
251303
|
+
function getSiteInstallCommand() {
|
|
251304
|
+
return new Base44Command("install", {
|
|
251305
|
+
requireAuth: false,
|
|
251306
|
+
requireAppContext: false
|
|
251307
|
+
}).description("Install the site's dependencies with its configured command").action(installAction);
|
|
251350
251308
|
}
|
|
251351
251309
|
|
|
251352
251310
|
// src/cli/commands/site/open.ts
|
|
@@ -251365,7 +251323,7 @@ function getSiteOpenCommand() {
|
|
|
251365
251323
|
|
|
251366
251324
|
// src/cli/commands/site/index.ts
|
|
251367
251325
|
function getSiteCommand() {
|
|
251368
|
-
return new Command2("site").description("Manage app site (frontend app)").addCommand(getSiteDeployCommand()).addCommand(getSiteDevCommand()).addCommand(getSiteOpenCommand());
|
|
251326
|
+
return new Command2("site").description("Manage app site (frontend app)").addCommand(getSiteDeployCommand()).addCommand(getSiteDevCommand()).addCommand(getSiteInstallCommand()).addCommand(getSiteOpenCommand());
|
|
251369
251327
|
}
|
|
251370
251328
|
|
|
251371
251329
|
// src/core/types/generator.ts
|
|
@@ -255994,7 +255952,6 @@ function createProgram(context) {
|
|
|
255994
255952
|
program.addCommand(getCreateCommand());
|
|
255995
255953
|
program.addCommand(getScaffoldCommand());
|
|
255996
255954
|
program.addCommand(getDashboardCommand());
|
|
255997
|
-
program.addCommand(getInstallCommand());
|
|
255998
255955
|
program.addCommand(getBuildCommand());
|
|
255999
255956
|
program.addCommand(getDeployCommand3());
|
|
256000
255957
|
program.addCommand(getVisibilityCommand());
|
|
@@ -260064,4 +260021,4 @@ export {
|
|
|
260064
260021
|
runCLI
|
|
260065
260022
|
};
|
|
260066
260023
|
|
|
260067
|
-
//# debugId=
|
|
260024
|
+
//# debugId=EEFD3770ED50B51764756E2164756E21
|