@base44-preview/cli 0.0.52-pr.517.5e3000d → 0.0.52-pr.532.4f61dea
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/README.md +1 -1
- package/dist/cli/index.js +4 -24
- package/dist/cli/index.js.map +3 -3
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Base44 CLI
|
|
2
2
|
|
|
3
|
-
Command-line interface for building applications with [Base44's backend service](https://docs.base44.com/developers/backend/overview/introduction).
|
|
3
|
+
Command-line interface for building and deploying applications with [Base44's backend service](https://docs.base44.com/developers/backend/overview/introduction).
|
|
4
4
|
|
|
5
5
|
Base44's backend service provides a managed backend for your applications, including data storage with entities, serverless functions, authentication, and hosting. The CLI lets you:
|
|
6
6
|
|
package/dist/cli/index.js
CHANGED
|
@@ -218270,7 +218270,7 @@ var require_dist5 = __commonJS((exports, module) => {
|
|
|
218270
218270
|
});
|
|
218271
218271
|
|
|
218272
218272
|
// src/cli/index.ts
|
|
218273
|
-
import { dirname as dirname21, join as
|
|
218273
|
+
import { dirname as dirname21, join as join27 } from "node:path";
|
|
218274
218274
|
import { fileURLToPath as fileURLToPath6 } from "node:url";
|
|
218275
218275
|
|
|
218276
218276
|
// ../../node_modules/@clack/core/dist/index.mjs
|
|
@@ -253718,7 +253718,6 @@ function getTypesCommand() {
|
|
|
253718
253718
|
}
|
|
253719
253719
|
|
|
253720
253720
|
// src/cli/commands/dev.ts
|
|
253721
|
-
import { join as join27 } from "node:path";
|
|
253722
253721
|
import process21 from "node:process";
|
|
253723
253722
|
|
|
253724
253723
|
// src/cli/dev/dev-server/main.ts
|
|
@@ -257064,23 +257063,8 @@ async function createDevServer(options8) {
|
|
|
257064
257063
|
}
|
|
257065
257064
|
|
|
257066
257065
|
// src/cli/commands/dev.ts
|
|
257067
|
-
function localServerUrl(port) {
|
|
257068
|
-
return `http://localhost:${port}`;
|
|
257069
|
-
}
|
|
257070
|
-
async function writeEnvLocalIfMissing(projectRoot, port, log) {
|
|
257071
|
-
const envLocalPath = join27(projectRoot, ".env.local");
|
|
257072
|
-
if (await pathExists(envLocalPath)) {
|
|
257073
|
-
return;
|
|
257074
|
-
}
|
|
257075
|
-
const { id: appId } = await initAppConfig();
|
|
257076
|
-
await writeFile(envLocalPath, `VITE_BASE44_APP_ID=${appId}
|
|
257077
|
-
VITE_BASE44_BACKEND_URL=${localServerUrl(port)}
|
|
257078
|
-
`);
|
|
257079
|
-
log.info("Created .env.local with app ID and dev server URL");
|
|
257080
|
-
}
|
|
257081
257066
|
async function devAction({ log }, options8) {
|
|
257082
257067
|
const port = options8.port ? Number(options8.port) : undefined;
|
|
257083
|
-
let projectRoot;
|
|
257084
257068
|
const { port: resolvedPort } = await createDevServer({
|
|
257085
257069
|
log,
|
|
257086
257070
|
port,
|
|
@@ -257088,15 +257072,11 @@ async function devAction({ log }, options8) {
|
|
|
257088
257072
|
denoWrapperPath: getDenoWrapperPath(),
|
|
257089
257073
|
loadResources: async () => {
|
|
257090
257074
|
const { functions, entities, project: project2 } = await readProjectConfig();
|
|
257091
|
-
projectRoot = project2.root;
|
|
257092
257075
|
return { functions, entities, project: project2 };
|
|
257093
257076
|
}
|
|
257094
257077
|
});
|
|
257095
|
-
if (projectRoot) {
|
|
257096
|
-
await writeEnvLocalIfMissing(projectRoot, resolvedPort, log);
|
|
257097
|
-
}
|
|
257098
257078
|
return {
|
|
257099
|
-
outroMessage: `Dev server is available at ${theme.colors.links(
|
|
257079
|
+
outroMessage: `Dev server is available at ${theme.colors.links(`http://localhost:${resolvedPort}`)}`
|
|
257100
257080
|
};
|
|
257101
257081
|
}
|
|
257102
257082
|
function getDevCommand() {
|
|
@@ -261528,7 +261508,7 @@ function addCommandInfoToErrorReporter(program2, errorReporter) {
|
|
|
261528
261508
|
// src/cli/index.ts
|
|
261529
261509
|
var __dirname4 = dirname21(fileURLToPath6(import.meta.url));
|
|
261530
261510
|
async function runCLI(options8) {
|
|
261531
|
-
ensureNpmAssets(
|
|
261511
|
+
ensureNpmAssets(join27(__dirname4, "../assets"));
|
|
261532
261512
|
const errorReporter = new ErrorReporter;
|
|
261533
261513
|
errorReporter.registerProcessErrorHandlers();
|
|
261534
261514
|
const isNonInteractive = !process.stdin.isTTY || !process.stdout.isTTY;
|
|
@@ -261565,4 +261545,4 @@ export {
|
|
|
261565
261545
|
CLIExitError
|
|
261566
261546
|
};
|
|
261567
261547
|
|
|
261568
|
-
//# debugId=
|
|
261548
|
+
//# debugId=BA50EE2DE519396A64756E2164756E21
|