@base44-preview/cli 0.1.7-pr.580.aed6cc8 → 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
@@ -256664,6 +256664,23 @@ async function runSiteBuild({ runTask: runTask2 }, { root, buildCommand, appId }
256664
256664
  errorMessage: "Build failed"
256665
256665
  });
256666
256666
  }
256667
+ async function maybeBuildBeforeDeploy(ctx, project2, build) {
256668
+ if (!ctx.app || !project2.site?.outputDirectory) {
256669
+ return;
256670
+ }
256671
+ const shouldBuild = await shouldBuildBeforeDeploy({
256672
+ build,
256673
+ isNonInteractive: ctx.isNonInteractive,
256674
+ buildCommand: project2.site.buildCommand
256675
+ });
256676
+ if (shouldBuild) {
256677
+ await runSiteBuild(ctx, {
256678
+ root: project2.root,
256679
+ buildCommand: project2.site.buildCommand,
256680
+ appId: ctx.app.id
256681
+ });
256682
+ }
256683
+ }
256667
256684
  async function shouldBuildBeforeDeploy({
256668
256685
  build,
256669
256686
  isNonInteractive,
@@ -257025,20 +257042,7 @@ ${summaryLines.join(`
257025
257042
  ${summaryLines.join(`
257026
257043
  `)}`);
257027
257044
  }
257028
- if (ctx.app && project2.site?.outputDirectory) {
257029
- const shouldBuild = await shouldBuildBeforeDeploy({
257030
- build: options.build,
257031
- isNonInteractive,
257032
- buildCommand: project2.site.buildCommand
257033
- });
257034
- if (shouldBuild) {
257035
- await runSiteBuild(ctx, {
257036
- root: project2.root,
257037
- buildCommand: project2.site.buildCommand,
257038
- appId: ctx.app.id
257039
- });
257040
- }
257041
- }
257045
+ await maybeBuildBeforeDeploy(ctx, project2, options.build);
257042
257046
  let functionCompleted = 0;
257043
257047
  const functionTotal = functions.length;
257044
257048
  const result = await deployAll(projectData, {
@@ -257957,20 +257961,7 @@ async function deployAction2(ctx, options) {
257957
257961
  return { outroMessage: "Deployment cancelled" };
257958
257962
  }
257959
257963
  }
257960
- if (ctx.app && project2.site?.outputDirectory) {
257961
- const shouldBuild = await shouldBuildBeforeDeploy({
257962
- build: options.build,
257963
- isNonInteractive,
257964
- buildCommand: project2.site.buildCommand
257965
- });
257966
- if (shouldBuild) {
257967
- await runSiteBuild(ctx, {
257968
- root: project2.root,
257969
- buildCommand: project2.site.buildCommand,
257970
- appId: ctx.app.id
257971
- });
257972
- }
257973
- }
257964
+ await maybeBuildBeforeDeploy(ctx, project2, options.build);
257974
257965
  const result = await runTask2("Creating archive and deploying site...", async () => {
257975
257966
  return await deploySite(outputDir);
257976
257967
  }, {
@@ -266799,4 +266790,4 @@ export {
266799
266790
  CLIExitError
266800
266791
  };
266801
266792
 
266802
- //# debugId=3F004A0C72A722E464756E2164756E21
266793
+ //# debugId=5C763A1E33EBD3E264756E2164756E21