@base44-preview/cli 0.1.7-pr.580.7d9fa01 → 0.1.7-pr.580.b14092b

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
@@ -256665,21 +256665,14 @@ async function runSiteBuild({ runTask: runTask2 }, { root, buildCommand, appId }
256665
256665
  });
256666
256666
  }
256667
256667
  async function maybeBuildBeforeDeploy(ctx, project2, build) {
256668
- if (!ctx.app) {
256668
+ if (!ctx.app || !project2.site?.outputDirectory) {
256669
256669
  return;
256670
256670
  }
256671
- if (build === true) {
256672
- await runSiteBuild(ctx, {
256673
- root: project2.root,
256674
- buildCommand: project2.site?.buildCommand,
256675
- appId: ctx.app.id
256676
- });
256677
- return;
256678
- }
256679
- if (build === false || !project2.site?.outputDirectory) {
256680
- return;
256681
- }
256682
- const shouldBuild = await shouldAskToBuild(ctx.isNonInteractive, project2.site.buildCommand);
256671
+ const shouldBuild = await shouldBuildBeforeDeploy({
256672
+ build,
256673
+ isNonInteractive: ctx.isNonInteractive,
256674
+ buildCommand: project2.site.buildCommand
256675
+ });
256683
256676
  if (shouldBuild) {
256684
256677
  await runSiteBuild(ctx, {
256685
256678
  root: project2.root,
@@ -256688,8 +256681,18 @@ async function maybeBuildBeforeDeploy(ctx, project2, build) {
256688
256681
  });
256689
256682
  }
256690
256683
  }
256691
- async function shouldAskToBuild(isNonInteractive, buildCommand) {
256692
- if (!buildCommand || isNonInteractive) {
256684
+ async function shouldBuildBeforeDeploy({
256685
+ build,
256686
+ isNonInteractive,
256687
+ buildCommand
256688
+ }) {
256689
+ if (!buildCommand) {
256690
+ return false;
256691
+ }
256692
+ if (build !== undefined) {
256693
+ return build;
256694
+ }
256695
+ if (isNonInteractive) {
256693
256696
  return false;
256694
256697
  }
256695
256698
  const answer = await Re({
@@ -266787,4 +266790,4 @@ export {
266787
266790
  CLIExitError
266788
266791
  };
266789
266792
 
266790
- //# debugId=8E70D966010C6D0264756E2164756E21
266793
+ //# debugId=5C763A1E33EBD3E264756E2164756E21