@base44-preview/cli 0.1.7-pr.586.03862c7 → 0.1.7-pr.586.967fb6f

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
@@ -256640,14 +256640,8 @@ function getFunctionsCommand() {
256640
256640
  return new Command("functions").description("Manage backend functions").addCommand(getDeployCommand()).addCommand(getDeleteCommand()).addCommand(getListCommand()).addCommand(getPullCommand());
256641
256641
  }
256642
256642
 
256643
- // src/cli/commands/project/build.ts
256644
- async function buildAction(ctx) {
256645
- const { app } = ctx;
256646
- if (!app?.projectRoot) {
256647
- throw new ConfigInvalidError("base44 build requires a linked local project. Run it from a project with base44/.app.jsonc.");
256648
- }
256649
- const { project: project2 } = await readProjectConfig(app.projectRoot);
256650
- const buildCommand = project2.site?.buildCommand;
256643
+ // src/cli/commands/project/site-build.ts
256644
+ async function runSiteBuild({ runTask: runTask2 }, { root, buildCommand, appId }) {
256651
256645
  if (!buildCommand) {
256652
256646
  throw new ConfigNotFoundError("No site build command found.", {
256653
256647
  hints: [
@@ -256657,14 +256651,28 @@ async function buildAction(ctx) {
256657
256651
  ]
256658
256652
  });
256659
256653
  }
256660
- await ctx.runTask("Building site...", () => execa({
256661
- cwd: project2.root,
256654
+ await runTask2("Building site...", () => execa({
256655
+ cwd: root,
256662
256656
  shell: true,
256663
- env: { VITE_BASE44_APP_ID: app.id }
256657
+ env: { VITE_BASE44_APP_ID: appId }
256664
256658
  })`${buildCommand}`, {
256665
256659
  successMessage: "Site built successfully",
256666
256660
  errorMessage: "Build failed"
256667
256661
  });
256662
+ }
256663
+
256664
+ // src/cli/commands/project/build.ts
256665
+ async function buildAction(ctx) {
256666
+ const { app } = ctx;
256667
+ if (!app?.projectRoot) {
256668
+ throw new ConfigInvalidError("base44 build requires a linked local project. Run it from a project with base44/.app.jsonc.");
256669
+ }
256670
+ const { project: project2 } = await readProjectConfig(app.projectRoot);
256671
+ await runSiteBuild(ctx, {
256672
+ root: project2.root,
256673
+ buildCommand: project2.site?.buildCommand,
256674
+ appId: app.id
256675
+ });
256668
256676
  return {
256669
256677
  outroMessage: `Site built with app id ${theme.styles.bold(app.id)}`
256670
256678
  };
@@ -266705,4 +266713,4 @@ export {
266705
266713
  CLIExitError
266706
266714
  };
266707
266715
 
266708
- //# debugId=0FE91AF90CCD2CC164756E2164756E21
266716
+ //# debugId=3CB9814E7E611A3164756E2164756E21