@base44-preview/cli 0.1.7-pr.585.2c79e0b → 0.1.7-pr.585.9d302f6
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 +49 -65
- package/dist/cli/index.js.map +6 -6
- package/package.json +1 -1
package/dist/cli/index.js
CHANGED
|
@@ -255057,7 +255057,7 @@ function hasResourcesToDeploy(projectData) {
|
|
|
255057
255057
|
connectors,
|
|
255058
255058
|
authConfig
|
|
255059
255059
|
} = projectData;
|
|
255060
|
-
const hasSite = Boolean(project.site?.outputDirectory
|
|
255060
|
+
const hasSite = Boolean(project.site?.outputDirectory);
|
|
255061
255061
|
const hasEntities = entities.length > 0;
|
|
255062
255062
|
const hasFunctions = functions.length > 0;
|
|
255063
255063
|
const hasAgents = agents.length > 0;
|
|
@@ -255091,7 +255091,7 @@ async function deployAll(projectData, options) {
|
|
|
255091
255091
|
await authConfigResource.push(authConfig);
|
|
255092
255092
|
const skipConnectorSync = connectors.length === 0 && hasWorkspaceApiKeyAuth();
|
|
255093
255093
|
const connectorResults = skipConnectorSync ? [] : (await pushConnectors(connectors)).results;
|
|
255094
|
-
if (
|
|
255094
|
+
if (project.site?.outputDirectory) {
|
|
255095
255095
|
const outputDir = resolve4(project.root, project.site.outputDirectory);
|
|
255096
255096
|
const { appUrl } = await deploySite(outputDir);
|
|
255097
255097
|
return { appUrl, connectorResults };
|
|
@@ -258025,48 +258025,6 @@ Examples:
|
|
|
258025
258025
|
$ base44 create my-app --workspace 507f1f77bcf86cd799439011 Creates a base44 project in the given workspace`).hook("preAction", validateCreateOptions).action(createAction);
|
|
258026
258026
|
}
|
|
258027
258027
|
|
|
258028
|
-
// src/cli/commands/site/run-app-deploy.ts
|
|
258029
|
-
var TASK_LABELS = {
|
|
258030
|
-
"static-deployment": {
|
|
258031
|
-
start: "Deploying site...",
|
|
258032
|
-
success: "Site deployed",
|
|
258033
|
-
error: "Site deploy failed"
|
|
258034
|
-
},
|
|
258035
|
-
static: {
|
|
258036
|
-
start: "Creating archive and deploying site...",
|
|
258037
|
-
success: "Site deployed successfully",
|
|
258038
|
-
error: "Deployment failed"
|
|
258039
|
-
}
|
|
258040
|
-
};
|
|
258041
|
-
async function runAppSiteDeploy({ runTask: runTask2, log, staticDeployments }, target, options = {}) {
|
|
258042
|
-
const kind = detectAppDeployKind(target, { staticDeployments });
|
|
258043
|
-
if (kind === "none")
|
|
258044
|
-
return { kind: "none" };
|
|
258045
|
-
const labels = TASK_LABELS[kind];
|
|
258046
|
-
const progressLines = [];
|
|
258047
|
-
const result = await runTask2(labels.start, async (updateMessage) => await deployAppSite(target, {
|
|
258048
|
-
staticDeployments,
|
|
258049
|
-
gitHash: options.gitHash,
|
|
258050
|
-
progress: {
|
|
258051
|
-
onAssets: ({ totalAssets, newAssets }) => {
|
|
258052
|
-
const line = `Found ${totalAssets} static assets (${newAssets} new)`;
|
|
258053
|
-
progressLines.push(line);
|
|
258054
|
-
updateMessage(line);
|
|
258055
|
-
},
|
|
258056
|
-
onAssetUpload: ({ uploadedFiles, totalFiles }) => {
|
|
258057
|
-
updateMessage(`Uploaded ${uploadedFiles} of ${totalFiles} assets`);
|
|
258058
|
-
}
|
|
258059
|
-
}
|
|
258060
|
-
}), {
|
|
258061
|
-
successMessage: labels.success,
|
|
258062
|
-
errorMessage: labels.error
|
|
258063
|
-
});
|
|
258064
|
-
for (const line of progressLines) {
|
|
258065
|
-
log.message(theme.styles.dim(line));
|
|
258066
|
-
}
|
|
258067
|
-
return result;
|
|
258068
|
-
}
|
|
258069
|
-
|
|
258070
258028
|
// src/cli/commands/project/deploy.ts
|
|
258071
258029
|
async function deployAction(ctx, options = {}) {
|
|
258072
258030
|
const { isNonInteractive, log } = ctx;
|
|
@@ -258074,12 +258032,12 @@ async function deployAction(ctx, options = {}) {
|
|
|
258074
258032
|
throw new InvalidInputError("--yes is required in non-interactive mode");
|
|
258075
258033
|
}
|
|
258076
258034
|
const projectData = await readProjectConfig(options.projectRoot);
|
|
258077
|
-
const { project: project2, entities, functions, agents, connectors, authConfig } = projectData;
|
|
258078
258035
|
if (!hasResourcesToDeploy(projectData)) {
|
|
258079
258036
|
return {
|
|
258080
258037
|
outroMessage: "No resources found to deploy"
|
|
258081
258038
|
};
|
|
258082
258039
|
}
|
|
258040
|
+
const { project: project2, entities, functions, agents, connectors, authConfig } = projectData;
|
|
258083
258041
|
const summaryLines = [];
|
|
258084
258042
|
if (entities.length > 0) {
|
|
258085
258043
|
summaryLines.push(` - ${entities.length} ${entities.length === 1 ? "entity" : "entities"}`);
|
|
@@ -258121,7 +258079,6 @@ ${summaryLines.join(`
|
|
|
258121
258079
|
let functionCompleted = 0;
|
|
258122
258080
|
const functionTotal = functions.length;
|
|
258123
258081
|
const result = await deployAll(projectData, {
|
|
258124
|
-
site: false,
|
|
258125
258082
|
onVisibilitySet: (level) => {
|
|
258126
258083
|
log.success(`App visibility set to ${level}`);
|
|
258127
258084
|
},
|
|
@@ -258134,7 +258091,6 @@ ${summaryLines.join(`
|
|
|
258134
258091
|
formatDeployResult(r, log);
|
|
258135
258092
|
}
|
|
258136
258093
|
});
|
|
258137
|
-
const siteResult = await runAppSiteDeploy(ctx, project2);
|
|
258138
258094
|
const connectorResults = result.connectorResults ?? [];
|
|
258139
258095
|
await handleOAuthConnectors(connectorResults, isNonInteractive, options, log);
|
|
258140
258096
|
const stripeResult = connectorResults.find((r) => r.type === "stripe");
|
|
@@ -258142,24 +258098,10 @@ ${summaryLines.join(`
|
|
|
258142
258098
|
printStripeResult(stripeResult, log);
|
|
258143
258099
|
}
|
|
258144
258100
|
log.message(`${theme.styles.header("Dashboard")}: ${theme.colors.links(getDashboardUrl())}`);
|
|
258145
|
-
if (
|
|
258146
|
-
log.message(`${theme.styles.header("App URL")}: ${theme.colors.links(
|
|
258101
|
+
if (result.appUrl) {
|
|
258102
|
+
log.message(`${theme.styles.header("App URL")}: ${theme.colors.links(result.appUrl)}`);
|
|
258147
258103
|
}
|
|
258148
|
-
|
|
258149
|
-
if (deployment) {
|
|
258150
|
-
printDeploymentSummary(deployment, log);
|
|
258151
|
-
}
|
|
258152
|
-
return {
|
|
258153
|
-
outroMessage: "App deployed successfully",
|
|
258154
|
-
stdout: ctx.jsonMode && deployment ? `${JSON.stringify({
|
|
258155
|
-
deploymentId: deployment.deploymentId,
|
|
258156
|
-
gitHash: deployment.gitHash
|
|
258157
|
-
}, null, 2)}
|
|
258158
|
-
` : undefined
|
|
258159
|
-
};
|
|
258160
|
-
}
|
|
258161
|
-
function printDeploymentSummary(deployment, log) {
|
|
258162
|
-
log.message(`${theme.styles.header("Deployment")}: ${deployment.deploymentId} ${theme.styles.dim(`(commit ${deployment.gitHash.slice(0, 12)})`)}`);
|
|
258104
|
+
return { outroMessage: "App deployed successfully" };
|
|
258163
258105
|
}
|
|
258164
258106
|
function getDeployCommand2() {
|
|
258165
258107
|
return new Base44Command("deploy").description("Deploy all project resources (entities, functions, 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)").action(deployAction);
|
|
@@ -259026,6 +258968,48 @@ function getSecretsCommand() {
|
|
|
259026
258968
|
return new Command("secrets").description("Manage project secrets (environment variables)").addCommand(getSecretsListCommand()).addCommand(getSecretsSetCommand()).addCommand(getSecretsDeleteCommand());
|
|
259027
258969
|
}
|
|
259028
258970
|
|
|
258971
|
+
// src/cli/commands/site/run-app-deploy.ts
|
|
258972
|
+
var TASK_LABELS = {
|
|
258973
|
+
"static-deployment": {
|
|
258974
|
+
start: "Deploying site...",
|
|
258975
|
+
success: "Site deployed",
|
|
258976
|
+
error: "Site deploy failed"
|
|
258977
|
+
},
|
|
258978
|
+
static: {
|
|
258979
|
+
start: "Creating archive and deploying site...",
|
|
258980
|
+
success: "Site deployed successfully",
|
|
258981
|
+
error: "Deployment failed"
|
|
258982
|
+
}
|
|
258983
|
+
};
|
|
258984
|
+
async function runAppSiteDeploy({ runTask: runTask2, log, staticDeployments }, target, options = {}) {
|
|
258985
|
+
const kind = detectAppDeployKind(target, { staticDeployments });
|
|
258986
|
+
if (kind === "none")
|
|
258987
|
+
return { kind: "none" };
|
|
258988
|
+
const labels = TASK_LABELS[kind];
|
|
258989
|
+
const progressLines = [];
|
|
258990
|
+
const result = await runTask2(labels.start, async (updateMessage) => await deployAppSite(target, {
|
|
258991
|
+
staticDeployments,
|
|
258992
|
+
gitHash: options.gitHash,
|
|
258993
|
+
progress: {
|
|
258994
|
+
onAssets: ({ totalAssets, newAssets }) => {
|
|
258995
|
+
const line = `Found ${totalAssets} static assets (${newAssets} new)`;
|
|
258996
|
+
progressLines.push(line);
|
|
258997
|
+
updateMessage(line);
|
|
258998
|
+
},
|
|
258999
|
+
onAssetUpload: ({ uploadedFiles, totalFiles }) => {
|
|
259000
|
+
updateMessage(`Uploaded ${uploadedFiles} of ${totalFiles} assets`);
|
|
259001
|
+
}
|
|
259002
|
+
}
|
|
259003
|
+
}), {
|
|
259004
|
+
successMessage: labels.success,
|
|
259005
|
+
errorMessage: labels.error
|
|
259006
|
+
});
|
|
259007
|
+
for (const line of progressLines) {
|
|
259008
|
+
log.message(theme.styles.dim(line));
|
|
259009
|
+
}
|
|
259010
|
+
return result;
|
|
259011
|
+
}
|
|
259012
|
+
|
|
259029
259013
|
// src/cli/commands/site/deploy.ts
|
|
259030
259014
|
async function deployAction2(ctx, options) {
|
|
259031
259015
|
const { isNonInteractive } = ctx;
|
|
@@ -267867,4 +267851,4 @@ export {
|
|
|
267867
267851
|
CLIExitError
|
|
267868
267852
|
};
|
|
267869
267853
|
|
|
267870
|
-
//# debugId=
|
|
267854
|
+
//# debugId=F2B824CD44665BF564756E2164756E21
|