@base44-preview/cli 0.1.7-pr.587.7ed9b75 → 0.1.7-pr.587.990934

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
@@ -256661,21 +256661,14 @@ async function runSiteBuild({ runTask: runTask2 }, { root, buildCommand, appId }
256661
256661
  });
256662
256662
  }
256663
256663
  async function maybeBuildBeforeDeploy(ctx, project2, build) {
256664
- if (!ctx.app) {
256664
+ if (!ctx.app || !project2.site?.outputDirectory) {
256665
256665
  return;
256666
256666
  }
256667
- if (build === true) {
256668
- await runSiteBuild(ctx, {
256669
- root: project2.root,
256670
- buildCommand: project2.site?.buildCommand,
256671
- appId: ctx.app.id
256672
- });
256673
- return;
256674
- }
256675
- if (build === false || !project2.site?.outputDirectory) {
256676
- return;
256677
- }
256678
- const shouldBuild = await shouldAskToBuild(ctx.isNonInteractive, project2.site.buildCommand);
256667
+ const shouldBuild = await shouldBuildBeforeDeploy({
256668
+ build,
256669
+ isNonInteractive: ctx.isNonInteractive,
256670
+ buildCommand: project2.site.buildCommand
256671
+ });
256679
256672
  if (shouldBuild) {
256680
256673
  await runSiteBuild(ctx, {
256681
256674
  root: project2.root,
@@ -256684,8 +256677,18 @@ async function maybeBuildBeforeDeploy(ctx, project2, build) {
256684
256677
  });
256685
256678
  }
256686
256679
  }
256687
- async function shouldAskToBuild(isNonInteractive, buildCommand) {
256688
- if (!buildCommand || isNonInteractive) {
256680
+ async function shouldBuildBeforeDeploy({
256681
+ build,
256682
+ isNonInteractive,
256683
+ buildCommand
256684
+ }) {
256685
+ if (!buildCommand) {
256686
+ return false;
256687
+ }
256688
+ if (build !== undefined) {
256689
+ return build;
256690
+ }
256691
+ if (isNonInteractive) {
256689
256692
  return false;
256690
256693
  }
256691
256694
  const answer = await Re({
@@ -266754,4 +266757,4 @@ export {
266754
266757
  CLIExitError
266755
266758
  };
266756
266759
 
266757
- //# debugId=0EC4691CF34BC30564756E2164756E21
266760
+ //# debugId=F6FACAC4CE9F33E464756E2164756E21