@base44-preview/cli 0.1.17-pr.635.345b6e2 → 0.1.17-pr.635.7aa76fd

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 CHANGED
@@ -246728,13 +246728,7 @@ function runnerFor(serveCommand) {
246728
246728
  }
246729
246729
  function withServeAddress(serveCommand, { host, port, hostFlag }) {
246730
246730
  const command = serveCommand.trim();
246731
- const args = [
246732
- ...host ? [hostFlag, host] : [],
246733
- ...port === undefined ? [] : ["--port", String(port)]
246734
- ];
246735
- if (args.length === 0) {
246736
- return { command, droppedAddress: false };
246737
- }
246731
+ const args = [hostFlag, host, "--port", String(port)];
246738
246732
  const runner = runnerFor(command);
246739
246733
  if (!runner) {
246740
246734
  return { command, droppedAddress: true };
@@ -251319,16 +251313,6 @@ function stopRunnerOnProcessSignals(runner) {
251319
251313
  }
251320
251314
 
251321
251315
  // src/cli/commands/site/dev.ts
251322
- function parsePort(value) {
251323
- if (!/^\d+$/.test(value)) {
251324
- throw new InvalidArgumentError2("must be a whole number");
251325
- }
251326
- const port = Number(value);
251327
- if (port < 1 || port > 65535) {
251328
- throw new InvalidArgumentError2("must be between 1 and 65535");
251329
- }
251330
- return port;
251331
- }
251332
251316
  async function siteDevAction(ctx, options) {
251333
251317
  const { app } = ctx;
251334
251318
  if (!app?.projectRoot) {
@@ -251341,8 +251325,8 @@ async function siteDevAction(ctx, options) {
251341
251325
  }
251342
251326
  const serveCommand = site.serveCommand ?? DEFAULT_SERVE_COMMAND;
251343
251327
  const { command, droppedAddress } = withServeAddress(serveCommand, {
251344
- host: options.host ?? site.devHost,
251345
- port: options.port ?? site.devPort,
251328
+ host: site.devHost,
251329
+ port: site.devPort,
251346
251330
  hostFlag: site.devHostFlag
251347
251331
  });
251348
251332
  if (droppedAddress) {
@@ -251362,7 +251346,7 @@ async function siteDevAction(ctx, options) {
251362
251346
  };
251363
251347
  }
251364
251348
  function getSiteDevCommand() {
251365
- return new Base44Command("dev", { requireAuth: false }).description("Run the site's dev server against a given backend (no local backend)").option("--backend-url <url>", "Backend the frontend should call, injected as VITE_BASE44_APP_BASE_URL. Omit for a frontend that reaches its backend same-origin.").option("--host <address>", "Address to bind, overriding site.devHost").option("--port <number>", "Port to bind, overriding site.devPort", parsePort).action(siteDevAction);
251349
+ return new Base44Command("dev", { requireAuth: false }).description("Run the site's dev server against a given backend (no local backend)").option("--backend-url <url>", "Backend the frontend should call, injected as VITE_BASE44_APP_BASE_URL. Omit for a frontend that reaches its backend same-origin.").action(siteDevAction);
251366
251350
  }
251367
251351
 
251368
251352
  // src/cli/commands/site/open.ts
@@ -255808,7 +255792,7 @@ function readStdin2() {
255808
255792
  process.stdin.on("error", reject);
255809
255793
  });
255810
255794
  }
255811
- function parsePort2(value) {
255795
+ function parsePort(value) {
255812
255796
  const port = Number(value);
255813
255797
  if (!Number.isInteger(port) || port <= 0 || port > 65535) {
255814
255798
  throw new InvalidInputError(`Invalid --port value: "${value}".`, {
@@ -255845,7 +255829,7 @@ async function execAction({ app, isNonInteractive }, options) {
255845
255829
  if (!code.trim()) {
255846
255830
  throw noInputError;
255847
255831
  }
255848
- const local = options.local ? await resolveLocalTarget(options.port !== undefined ? parsePort2(options.port) : DEFAULT_DEV_SERVER_PORT) : undefined;
255832
+ const local = options.local ? await resolveLocalTarget(options.port !== undefined ? parsePort(options.port) : DEFAULT_DEV_SERVER_PORT) : undefined;
255849
255833
  const { exitCode } = await runScript({
255850
255834
  appId: app.id,
255851
255835
  code,
@@ -260080,4 +260064,4 @@ export {
260080
260064
  runCLI
260081
260065
  };
260082
260066
 
260083
- //# debugId=E803849EB8B019CA64756E2164756E21
260067
+ //# debugId=8C0EDF181791840B64756E2164756E21