@base44-preview/cli 0.0.7-pr.67.6f3d00e → 0.0.7-pr.67.a2bd10b
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 +13 -11
- package/package.json +1 -1
package/dist/cli/index.js
CHANGED
|
@@ -16,7 +16,7 @@ import fs$1 from "fs";
|
|
|
16
16
|
import path$1, { dirname as dirname$1, parse } from "path";
|
|
17
17
|
import { finished } from "node:stream/promises";
|
|
18
18
|
import EE, { EventEmitter as EventEmitter$1 } from "events";
|
|
19
|
-
import
|
|
19
|
+
import fsp, { access, copyFile, mkdir, readFile, unlink, writeFile } from "node:fs/promises";
|
|
20
20
|
import { Buffer as Buffer$1 } from "buffer";
|
|
21
21
|
import { randomBytes, randomUUID } from "node:crypto";
|
|
22
22
|
import { StringDecoder } from "node:string_decoder";
|
|
@@ -15710,7 +15710,7 @@ const ignoreFilesGlobOptions = {
|
|
|
15710
15710
|
dot: true
|
|
15711
15711
|
};
|
|
15712
15712
|
const GITIGNORE_FILES_PATTERN = "**/.gitignore";
|
|
15713
|
-
const getReadFileMethod = (fsImplementation) => bindFsMethod(fsImplementation?.promises, "readFile") ?? bindFsMethod(
|
|
15713
|
+
const getReadFileMethod = (fsImplementation) => bindFsMethod(fsImplementation?.promises, "readFile") ?? bindFsMethod(fsp, "readFile") ?? promisifyFsMethod(fsImplementation, "readFile");
|
|
15714
15714
|
const getReadFileSyncMethod = (fsImplementation) => bindFsMethod(fsImplementation, "readFileSync") ?? bindFsMethod(fs, "readFileSync");
|
|
15715
15715
|
const shouldSkipIgnoreFileError = (error, suppressErrors) => {
|
|
15716
15716
|
if (!error) return Boolean(suppressErrors);
|
|
@@ -30460,7 +30460,7 @@ const mkdir$1 = (dir, opt, cb) => {
|
|
|
30460
30460
|
else cb();
|
|
30461
30461
|
};
|
|
30462
30462
|
if (dir === cwd) return checkCwd(dir, done);
|
|
30463
|
-
if (preserve) return
|
|
30463
|
+
if (preserve) return fsp.mkdir(dir, {
|
|
30464
30464
|
mode,
|
|
30465
30465
|
recursive: true
|
|
30466
30466
|
}).then((made) => done(null, made ?? void 0), done);
|
|
@@ -38152,10 +38152,10 @@ var require_lodash = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
38152
38152
|
var import_lodash = /* @__PURE__ */ __toESM(require_lodash(), 1);
|
|
38153
38153
|
const orange = source_default.hex("#E86B3C");
|
|
38154
38154
|
const cyan = source_default.hex("#00D4FF");
|
|
38155
|
-
const
|
|
38155
|
+
const DEFAULT_TEMPLATE_ID = "backend-only";
|
|
38156
38156
|
async function getDefaultTemplate() {
|
|
38157
|
-
const template = (await listTemplates()).find((t) => t.
|
|
38158
|
-
if (!template) throw new Error(`Default template "${
|
|
38157
|
+
const template = (await listTemplates()).find((t) => t.id === DEFAULT_TEMPLATE_ID);
|
|
38158
|
+
if (!template) throw new Error(`Default template "${DEFAULT_TEMPLATE_ID}" not found`);
|
|
38159
38159
|
return template;
|
|
38160
38160
|
}
|
|
38161
38161
|
function validateNonInteractiveFlags(command) {
|
|
@@ -38289,12 +38289,14 @@ const createCommand = new Command("create").description("Create a new Base44 pro
|
|
|
38289
38289
|
|
|
38290
38290
|
//#endregion
|
|
38291
38291
|
//#region src/cli/commands/site/deploy.ts
|
|
38292
|
-
async function deployAction() {
|
|
38292
|
+
async function deployAction(options) {
|
|
38293
38293
|
const { project } = await readProjectConfig();
|
|
38294
38294
|
if (!project.site?.outputDirectory) throw new Error("No site configuration found. Please add 'site.outputDirectory' to your config.jsonc");
|
|
38295
38295
|
const outputDir = resolve(project.root, project.site.outputDirectory);
|
|
38296
|
-
|
|
38297
|
-
|
|
38296
|
+
if (!options.yes) {
|
|
38297
|
+
const shouldDeploy = await ye({ message: `Deploy site from ${project.site.outputDirectory}?` });
|
|
38298
|
+
if (pD(shouldDeploy) || !shouldDeploy) return { outroMessage: "Deployment cancelled" };
|
|
38299
|
+
}
|
|
38298
38300
|
return { outroMessage: `Visit your site at: ${(await runTask("Creating archive and deploying site...", async () => {
|
|
38299
38301
|
return await deploySite(outputDir);
|
|
38300
38302
|
}, {
|
|
@@ -38302,8 +38304,8 @@ async function deployAction() {
|
|
|
38302
38304
|
errorMessage: "Deployment failed"
|
|
38303
38305
|
})).appUrl}` };
|
|
38304
38306
|
}
|
|
38305
|
-
const siteDeployCommand = new Command("site").description("Manage site deployments").addCommand(new Command("deploy").description("Deploy built site files to Base44 hosting").action(async () => {
|
|
38306
|
-
await runCommand(deployAction, { requireAuth: true });
|
|
38307
|
+
const siteDeployCommand = new Command("site").description("Manage site deployments").addCommand(new Command("deploy").description("Deploy built site files to Base44 hosting").option("-y, --yes", "Skip confirmation prompt").action(async (options) => {
|
|
38308
|
+
await runCommand(() => deployAction(options), { requireAuth: true });
|
|
38307
38309
|
}));
|
|
38308
38310
|
|
|
38309
38311
|
//#endregion
|
package/package.json
CHANGED