@base44-preview/cli 0.0.4-pr.58.5448a6d → 0.0.6-pr.60.bf6ff56
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 +11 -17
- package/package.json +1 -1
package/dist/cli/index.js
CHANGED
|
@@ -26471,14 +26471,7 @@ const logoutCommand = new Command("logout").description("Logout from current dev
|
|
|
26471
26471
|
/**
|
|
26472
26472
|
* Response from the deploy API endpoint.
|
|
26473
26473
|
*/
|
|
26474
|
-
const DeployResponseSchema = object({
|
|
26475
|
-
success: boolean(),
|
|
26476
|
-
app_id: string(),
|
|
26477
|
-
files_count: number(),
|
|
26478
|
-
total_size_bytes: number(),
|
|
26479
|
-
deployed_at: string(),
|
|
26480
|
-
app_url: string().url()
|
|
26481
|
-
});
|
|
26474
|
+
const DeployResponseSchema = object({ app_url: url() }).transform((data) => ({ appUrl: data.app_url }));
|
|
26482
26475
|
|
|
26483
26476
|
//#endregion
|
|
26484
26477
|
//#region src/core/site/config.ts
|
|
@@ -38188,9 +38181,9 @@ async function create() {
|
|
|
38188
38181
|
successMessage: orange("Project created successfully"),
|
|
38189
38182
|
errorMessage: "Failed to create project"
|
|
38190
38183
|
});
|
|
38191
|
-
await loadProjectEnv();
|
|
38184
|
+
await loadProjectEnv(resolvedPath);
|
|
38192
38185
|
const { project, entities } = await readProjectConfig(resolvedPath);
|
|
38193
|
-
let
|
|
38186
|
+
let finalAppUrl;
|
|
38194
38187
|
if (entities.length > 0) {
|
|
38195
38188
|
const shouldPushEntities = await ye({ message: "Would you like to push entities now?" });
|
|
38196
38189
|
if (!pD(shouldPushEntities) && shouldPushEntities) await runTask(`Pushing ${entities.length} entities to Base44...`, async () => {
|
|
@@ -38203,9 +38196,10 @@ async function create() {
|
|
|
38203
38196
|
if (project.site) {
|
|
38204
38197
|
const installCommand = project.site.installCommand;
|
|
38205
38198
|
const buildCommand = project.site.buildCommand;
|
|
38199
|
+
const outputDirectory = project.site.outputDirectory;
|
|
38206
38200
|
const shouldDeploy = await ye({ message: "Would you like to deploy the site now?" });
|
|
38207
|
-
if (!pD(shouldDeploy) && shouldDeploy && installCommand && buildCommand) {
|
|
38208
|
-
const {
|
|
38201
|
+
if (!pD(shouldDeploy) && shouldDeploy && installCommand && buildCommand && outputDirectory) {
|
|
38202
|
+
const { appUrl } = await runTask("Installing dependencies...", async (updateMessage) => {
|
|
38209
38203
|
await execa({
|
|
38210
38204
|
cwd: resolvedPath,
|
|
38211
38205
|
shell: true
|
|
@@ -38216,18 +38210,18 @@ async function create() {
|
|
|
38216
38210
|
shell: true
|
|
38217
38211
|
})`${buildCommand}`;
|
|
38218
38212
|
updateMessage("Deploying site...");
|
|
38219
|
-
return await deploySite(join(resolvedPath,
|
|
38213
|
+
return await deploySite(join(resolvedPath, outputDirectory));
|
|
38220
38214
|
}, {
|
|
38221
38215
|
successMessage: orange("Site deployed successfully"),
|
|
38222
38216
|
errorMessage: "Failed to deploy site"
|
|
38223
38217
|
});
|
|
38224
|
-
|
|
38218
|
+
finalAppUrl = appUrl;
|
|
38225
38219
|
}
|
|
38226
38220
|
}
|
|
38227
38221
|
const dashboardUrl = `${getBase44ApiUrl()}/apps/${projectId}/editor/preview`;
|
|
38228
38222
|
M.message(`${source_default.dim("Project")}: ${orange(name$1.trim())}`);
|
|
38229
38223
|
M.message(`${source_default.dim("Dashboard")}: ${cyan(dashboardUrl)}`);
|
|
38230
|
-
if (
|
|
38224
|
+
if (finalAppUrl) M.message(`${source_default.dim("Site")}: ${cyan(finalAppUrl)}`);
|
|
38231
38225
|
Se("Your project is set and ready to use");
|
|
38232
38226
|
}
|
|
38233
38227
|
const createCommand = new Command("create").description("Create a new Base44 project").action(async () => {
|
|
@@ -38254,7 +38248,7 @@ async function deployAction() {
|
|
|
38254
38248
|
successMessage: "Site deployed successfully",
|
|
38255
38249
|
errorMessage: "Deployment failed"
|
|
38256
38250
|
});
|
|
38257
|
-
M.success(`Site deployed to: ${result.
|
|
38251
|
+
M.success(`Site deployed to: ${result.appUrl}`);
|
|
38258
38252
|
}
|
|
38259
38253
|
const siteDeployCommand = new Command("site").description("Manage site deployments").addCommand(new Command("deploy").description("Deploy built site files to Base44 hosting").action(async () => {
|
|
38260
38254
|
await runCommand(deployAction, { requireAuth: true });
|
|
@@ -38262,7 +38256,7 @@ const siteDeployCommand = new Command("site").description("Manage site deploymen
|
|
|
38262
38256
|
|
|
38263
38257
|
//#endregion
|
|
38264
38258
|
//#region package.json
|
|
38265
|
-
var version = "0.0.
|
|
38259
|
+
var version = "0.0.6";
|
|
38266
38260
|
|
|
38267
38261
|
//#endregion
|
|
38268
38262
|
//#region src/cli/index.ts
|
package/package.json
CHANGED