@base44-preview/cli 0.1.16-pr.635.2ec10a1 → 0.1.16-pr.635.6b1b04b

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
@@ -230706,7 +230706,7 @@ var TemplatesConfigSchema = object({
230706
230706
  });
230707
230707
  var SiteConfigSchema = object({
230708
230708
  buildCommand: string2().optional().default("npm run build"),
230709
- serveCommand: string2().optional().default("npm run dev"),
230709
+ serveCommand: string2().optional(),
230710
230710
  outputDirectory: string2().optional().default("./dist"),
230711
230711
  installCommand: string2().optional().default("npm install"),
230712
230712
  devHostFlag: string2().optional().default("--host")
@@ -246681,6 +246681,7 @@ async function gitHead(projectRoot) {
246681
246681
  }
246682
246682
  }
246683
246683
  // src/core/site/serve-command.ts
246684
+ var DEFAULT_SERVE_COMMAND = "npm run dev";
246684
246685
  var NPM_RUN_COMMAND = /^npm(\s+--prefix\s+\S+)?\s+run\s+\S+$/;
246685
246686
  function withServeAddress(serveCommand, { host, port, hostFlag }) {
246686
246687
  const args = [
@@ -249597,7 +249598,7 @@ async function buildAction(ctx) {
249597
249598
  };
249598
249599
  }
249599
249600
  function getBuildCommand() {
249600
- return new Base44Command("build").description("Build the site with the Base44 app id injected").action(buildAction);
249601
+ return new Base44Command("build", { requireAuth: false }).description("Build the site with the Base44 app id injected").action(buildAction);
249601
249602
  }
249602
249603
 
249603
249604
  // src/cli/commands/project/create.ts
@@ -251284,13 +251285,14 @@ async function siteDevAction(ctx, options) {
251284
251285
  if (!site) {
251285
251286
  throw new InvalidInputError(`This project has no 'site' block in base44/config.jsonc, so there is no frontend to serve. Add one; inside it serveCommand defaults to "npm run dev".`);
251286
251287
  }
251287
- const command = withServeAddress(site.serveCommand, {
251288
+ const serveCommand = site.serveCommand ?? DEFAULT_SERVE_COMMAND;
251289
+ const command = withServeAddress(serveCommand, {
251288
251290
  host: options.host,
251289
251291
  port,
251290
251292
  hostFlag: site.devHostFlag
251291
251293
  });
251292
- if ((options.host || port !== undefined) && !forwardsServeAddress(site.serveCommand)) {
251293
- log.warn(`serveCommand '${site.serveCommand}' is not an 'npm run' invocation, so --host/--port were not passed to it. Put the address in serveCommand itself.`);
251294
+ if ((options.host || port !== undefined) && !forwardsServeAddress(serveCommand)) {
251295
+ log.warn(`serveCommand '${serveCommand}' is not an 'npm run' invocation, so --host/--port were not passed to it. Put the address in serveCommand itself.`);
251294
251296
  }
251295
251297
  const runner = createServeCommandRunner({
251296
251298
  serveCommand: command,
@@ -255650,7 +255652,7 @@ function startServeCommand(runner, backend) {
255650
255652
  async function remoteDevAction(app) {
255651
255653
  const site = await resolveConfiguredSite(app);
255652
255654
  if (!site) {
255653
- throw new ConfigInvalidError(`base44 dev --remote serves the frontend against the production backend, but this project has no 'site' block in base44/config.jsonc. Add one; inside it serveCommand defaults to "npm run dev".`);
255655
+ throw new ConfigInvalidError("base44 dev --remote serves the frontend against the production backend, but this project has no site.serveCommand in base44/config.jsonc.");
255654
255656
  }
255655
255657
  const appBaseUrl = await getSiteUrl();
255656
255658
  const runner = createServeCommandRunner({
@@ -260019,4 +260021,4 @@ export {
260019
260021
  runCLI
260020
260022
  };
260021
260023
 
260022
- //# debugId=26F032DEEC9B5A8664756E2164756E21
260024
+ //# debugId=03FA5EAAD08DEC4B64756E2164756E21