@base44-preview/cli 0.1.7-pr.587.23e6e24 → 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
@@ -256660,6 +256660,23 @@ async function runSiteBuild({ runTask: runTask2 }, { root, buildCommand, appId }
256660
256660
  errorMessage: "Build failed"
256661
256661
  });
256662
256662
  }
256663
+ async function maybeBuildBeforeDeploy(ctx, project2, build) {
256664
+ if (!ctx.app || !project2.site?.outputDirectory) {
256665
+ return;
256666
+ }
256667
+ const shouldBuild = await shouldBuildBeforeDeploy({
256668
+ build,
256669
+ isNonInteractive: ctx.isNonInteractive,
256670
+ buildCommand: project2.site.buildCommand
256671
+ });
256672
+ if (shouldBuild) {
256673
+ await runSiteBuild(ctx, {
256674
+ root: project2.root,
256675
+ buildCommand: project2.site.buildCommand,
256676
+ appId: ctx.app.id
256677
+ });
256678
+ }
256679
+ }
256663
256680
  async function shouldBuildBeforeDeploy({
256664
256681
  build,
256665
256682
  isNonInteractive,
@@ -257017,20 +257034,7 @@ ${summaryLines.join(`
257017
257034
  ${summaryLines.join(`
257018
257035
  `)}`);
257019
257036
  }
257020
- if (ctx.app && project2.site?.outputDirectory) {
257021
- const shouldBuild = await shouldBuildBeforeDeploy({
257022
- build: options.build,
257023
- isNonInteractive,
257024
- buildCommand: project2.site.buildCommand
257025
- });
257026
- if (shouldBuild) {
257027
- await runSiteBuild(ctx, {
257028
- root: project2.root,
257029
- buildCommand: project2.site.buildCommand,
257030
- appId: ctx.app.id
257031
- });
257032
- }
257033
- }
257037
+ await maybeBuildBeforeDeploy(ctx, project2, options.build);
257034
257038
  let functionCompleted = 0;
257035
257039
  const functionTotal = functions.length;
257036
257040
  const result = await deployAll(projectData, {
@@ -257949,20 +257953,7 @@ async function deployAction2(ctx, options) {
257949
257953
  return { outroMessage: "Deployment cancelled" };
257950
257954
  }
257951
257955
  }
257952
- if (ctx.app && project2.site?.outputDirectory) {
257953
- const shouldBuild = await shouldBuildBeforeDeploy({
257954
- build: options.build,
257955
- isNonInteractive,
257956
- buildCommand: project2.site.buildCommand
257957
- });
257958
- if (shouldBuild) {
257959
- await runSiteBuild(ctx, {
257960
- root: project2.root,
257961
- buildCommand: project2.site.buildCommand,
257962
- appId: ctx.app.id
257963
- });
257964
- }
257965
- }
257956
+ await maybeBuildBeforeDeploy(ctx, project2, options.build);
257966
257957
  const result = await runTask2("Creating archive and deploying site...", async () => {
257967
257958
  return await deploySite(outputDir);
257968
257959
  }, {
@@ -266766,4 +266757,4 @@ export {
266766
266757
  CLIExitError
266767
266758
  };
266768
266759
 
266769
- //# debugId=1FB40B1345DFA60B64756E2164756E21
266760
+ //# debugId=F6FACAC4CE9F33E464756E2164756E21