@base44-preview/cli 0.1.33-pr.643.5285041 → 0.1.33-pr.643.ff0b86e

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
@@ -246984,9 +246984,6 @@ async function shipCommit(projectRoot, outputDir, gitHash, options) {
246984
246984
  onAssets: ({ totalAssets, newAssets }) => options?.onSiteProgress?.(`Found ${totalAssets} static assets (${newAssets} new)`)
246985
246985
  }
246986
246986
  });
246987
- if (options?.publish === false) {
246988
- return;
246989
- }
246990
246987
  try {
246991
246988
  const { appUrl } = await publishDeployment(gitHash);
246992
246989
  return appUrl;
@@ -252063,7 +252060,6 @@ ${summaryLines.join(`
252063
252060
  let actorCompleted = 0;
252064
252061
  const result = await deployAll(projectData, {
252065
252062
  gitHash: options.gitHash,
252066
- publish: options.publish,
252067
252063
  onSiteProgress: (message) => {
252068
252064
  log.message(theme.styles.dim(message));
252069
252065
  },
@@ -252102,7 +252098,7 @@ ${summaryLines.join(`
252102
252098
  return { outroMessage: "App deployed successfully" };
252103
252099
  }
252104
252100
  function getDeployCommand3() {
252105
- return new Base44Command("deploy").description("Deploy all project resources (entities, functions, actors, agents, connectors, and site)").option("-y, --yes", "Skip confirmation prompt").option("--build", "Build the site before deploying (skips the prompt)").option("--no-build", "Deploy without building (skips the prompt)").option("--no-publish", "Deploy the site without serving it in production yet").addOption(new Option2("--git-hash <hash>", "Commit the built site came from (defaults to the checkout's HEAD)").argParser(parseGitHash)).action(deployAction);
252101
+ return new Base44Command("deploy").description("Deploy all project resources (entities, functions, actors, agents, connectors, and site)").option("-y, --yes", "Skip confirmation prompt").option("--build", "Build the site before deploying (skips the prompt)").option("--no-build", "Deploy without building (skips the prompt)").addOption(new Option2("--git-hash <hash>", "Commit the built site came from (defaults to the checkout's HEAD)").argParser(parseGitHash)).action(deployAction);
252106
252102
  }
252107
252103
  async function handleOAuthConnectors(connectorResults, isNonInteractive, options, log) {
252108
252104
  const needsOAuth = filterPendingOAuth(connectorResults);
@@ -264805,7 +264801,14 @@ async function deployToDeploymentsApi(ctx, project, options) {
264805
264801
  const { runTask, log, jsonMode } = ctx;
264806
264802
  const projectRoot = project.root;
264807
264803
  const outputDir = siteOutputDir(project);
264808
- const gitHash = await resolveGitHash(projectRoot, options.gitHash);
264804
+ const gitHash = await resolveGitHash(projectRoot, options.gitHash).catch(async (error) => {
264805
+ if (await detectFullStackArtifact(projectRoot))
264806
+ throw error;
264807
+ return;
264808
+ });
264809
+ if (!gitHash) {
264810
+ return deployArchive(ctx, outputDir);
264811
+ }
264809
264812
  const progressLines = [];
264810
264813
  const warnings = [];
264811
264814
  const { deploymentId } = await runTask("Deploying site...", async (updateMessage) => await deployToDeployments({
@@ -264839,6 +264842,8 @@ async function deployToDeploymentsApi(ctx, project, options) {
264839
264842
  const published = options.publish ? await runTask("Publishing site...", async () => await publishDeployment(gitHash), { successMessage: "Site published", errorMessage: "Publish failed" }) : undefined;
264840
264843
  if (published) {
264841
264844
  log.message(`${theme.styles.header("App URL")}: ${theme.colors.links(published.appUrl)}`);
264845
+ } else {
264846
+ log.info("Not published: production still serves its previous build. Run again with --publish to serve this one.");
264842
264847
  }
264843
264848
  return {
264844
264849
  outroMessage: `Deployment ${deploymentId} (commit ${gitHash.slice(0, 12)})`,
@@ -264846,6 +264851,18 @@ async function deployToDeploymentsApi(ctx, project, options) {
264846
264851
  ` : undefined
264847
264852
  };
264848
264853
  }
264854
+ async function deployArchive({ runTask, log, jsonMode }, outputDir) {
264855
+ const { appUrl } = await runTask("Creating archive and deploying site...", async () => await deploySite(outputDir), {
264856
+ successMessage: "Site deployed successfully",
264857
+ errorMessage: "Deployment failed"
264858
+ });
264859
+ log.warn("No commit found for this build, so it was deployed and published without one. Commit your work to address deployments by it.");
264860
+ return {
264861
+ outroMessage: `Visit your site at: ${appUrl}`,
264862
+ stdout: jsonMode ? `${JSON.stringify({ appUrl, published: true }, null, 2)}
264863
+ ` : undefined
264864
+ };
264865
+ }
264849
264866
  function siteOutputDir(project) {
264850
264867
  const { outputDirectory = DEFAULT_SITE.outputDirectory } = siteOrDefault(project);
264851
264868
  return resolve16(project.root, outputDirectory);
@@ -273996,4 +274013,4 @@ export {
273996
274013
  runCLI
273997
274014
  };
273998
274015
 
273999
- //# debugId=D4E502AA1650121164756E2164756E21
274016
+ //# debugId=CFF726A044F3411C64756E2164756E21