@base44-preview/cli 0.1.6-pr.580.b56a665 → 0.1.6-pr.580.c820609

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.
@@ -3,7 +3,6 @@ import { appParams } from '@/lib/app-params';
3
3
 
4
4
  const { appId, token, functionsVersion, appBaseUrl } = appParams;
5
5
 
6
- //Create a client with authentication required
7
6
  export const base44 = createClient({
8
7
  appId,
9
8
  token,
package/dist/cli/index.js CHANGED
@@ -247293,7 +247293,9 @@ async function deploySite(siteOutputDir) {
247293
247293
  if (!await pathExists(siteOutputDir)) {
247294
247294
  throw new InvalidInputError(`Output directory does not exist: ${siteOutputDir}. Make sure to build your project first.`, {
247295
247295
  hints: [
247296
- { message: "Run your build command (e.g., 'npm run build') first" }
247296
+ {
247297
+ message: "Run 'base44 build' first (it injects your app id; a bare 'npm run build' does not)"
247298
+ }
247297
247299
  ]
247298
247300
  });
247299
247301
  }
@@ -247301,7 +247303,9 @@ async function deploySite(siteOutputDir) {
247301
247303
  if (filePaths.length === 0) {
247302
247304
  throw new ConfigInvalidError(`No files found in output directory: ${siteOutputDir}. Make sure to build your project first.`, siteOutputDir, {
247303
247305
  hints: [
247304
- { message: "Run your build command (e.g., 'npm run build') first" }
247306
+ {
247307
+ message: "Run 'base44 build' first (it injects your app id; a bare 'npm run build' does not)"
247308
+ }
247305
247309
  ]
247306
247310
  });
247307
247311
  }
@@ -261982,18 +261986,16 @@ function startRemoteServe(options8) {
261982
261986
  }
261983
261987
  function createRemoteServeRunner({
261984
261988
  appId,
261989
+ appBaseUrl,
261985
261990
  serveCommand,
261986
261991
  projectRoot
261987
261992
  }) {
261988
- if (!serveCommand) {
261989
- throw new ConfigInvalidError("base44 dev --remote serves the frontend against the production backend, but this project has no site.serveCommand in base44/config.jsonc.");
261990
- }
261991
261993
  return new ServeRunner({
261992
261994
  command: serveCommand,
261993
261995
  cwd: projectRoot,
261994
261996
  env: {
261995
261997
  VITE_BASE44_APP_ID: appId,
261996
- VITE_BASE44_APP_BASE_URL: BASE44_APP_URL
261998
+ VITE_BASE44_APP_BASE_URL: appBaseUrl
261997
261999
  },
261998
262000
  logger: createDevLogger("frontend", theme.colors.base44Orange)
261999
262001
  });
@@ -262020,13 +262022,19 @@ function validateDevOptions(command2) {
262020
262022
  }
262021
262023
  async function remoteDevAction(app) {
262022
262024
  const { project: project2 } = await readProjectConfig(app.projectRoot);
262025
+ const serveCommand = project2.site?.serveCommand;
262026
+ if (!serveCommand) {
262027
+ throw new ConfigInvalidError("base44 dev --remote serves the frontend against the production backend, but this project has no site.serveCommand in base44/config.jsonc.");
262028
+ }
262029
+ const appBaseUrl = await getSiteUrl();
262023
262030
  startRemoteServe({
262024
262031
  appId: app.id,
262025
- serveCommand: project2.site?.serveCommand,
262032
+ appBaseUrl,
262033
+ serveCommand,
262026
262034
  projectRoot: project2.root
262027
262035
  });
262028
262036
  return {
262029
- outroMessage: `Frontend dev server targets ${theme.styles.bold("production")} — every write hits your live app`
262037
+ outroMessage: `Frontend dev server targets ${theme.styles.bold(appBaseUrl)} — every write hits your live app`
262030
262038
  };
262031
262039
  }
262032
262040
  async function devAction(ctx, options8) {
@@ -266574,4 +266582,4 @@ export {
266574
266582
  CLIExitError
266575
266583
  };
266576
266584
 
266577
- //# debugId=F230DE7E62DA2AF564756E2164756E21
266585
+ //# debugId=9E0A65B57255AADB64756E2164756E21