@base44-preview/cli 0.1.33-pr.643.a658b9d → 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 +23 -2
- package/dist/cli/index.js.map +3 -3
- package/package.json +1 -1
package/dist/cli/index.js
CHANGED
|
@@ -264801,7 +264801,14 @@ async function deployToDeploymentsApi(ctx, project, options) {
|
|
|
264801
264801
|
const { runTask, log, jsonMode } = ctx;
|
|
264802
264802
|
const projectRoot = project.root;
|
|
264803
264803
|
const outputDir = siteOutputDir(project);
|
|
264804
|
-
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
|
+
}
|
|
264805
264812
|
const progressLines = [];
|
|
264806
264813
|
const warnings = [];
|
|
264807
264814
|
const { deploymentId } = await runTask("Deploying site...", async (updateMessage) => await deployToDeployments({
|
|
@@ -264835,6 +264842,8 @@ async function deployToDeploymentsApi(ctx, project, options) {
|
|
|
264835
264842
|
const published = options.publish ? await runTask("Publishing site...", async () => await publishDeployment(gitHash), { successMessage: "Site published", errorMessage: "Publish failed" }) : undefined;
|
|
264836
264843
|
if (published) {
|
|
264837
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.");
|
|
264838
264847
|
}
|
|
264839
264848
|
return {
|
|
264840
264849
|
outroMessage: `Deployment ${deploymentId} (commit ${gitHash.slice(0, 12)})`,
|
|
@@ -264842,6 +264851,18 @@ async function deployToDeploymentsApi(ctx, project, options) {
|
|
|
264842
264851
|
` : undefined
|
|
264843
264852
|
};
|
|
264844
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
|
+
}
|
|
264845
264866
|
function siteOutputDir(project) {
|
|
264846
264867
|
const { outputDirectory = DEFAULT_SITE.outputDirectory } = siteOrDefault(project);
|
|
264847
264868
|
return resolve16(project.root, outputDirectory);
|
|
@@ -273992,4 +274013,4 @@ export {
|
|
|
273992
274013
|
runCLI
|
|
273993
274014
|
};
|
|
273994
274015
|
|
|
273995
|
-
//# debugId=
|
|
274016
|
+
//# debugId=CFF726A044F3411C64756E2164756E21
|