@base44-preview/cli 0.1.23-pr.645.fe2ea5c → 0.1.24-pr.646.09ee9f4
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.
|
@@ -42,9 +42,8 @@ if (!appBaseUrl) {
|
|
|
42
42
|
Deno.exit(1);
|
|
43
43
|
}
|
|
44
44
|
|
|
45
|
-
//
|
|
46
|
-
|
|
47
|
-
import { createClient } from "npm:@base44/sdk@0.8.52";
|
|
45
|
+
// runScript pins this to BASE44_EXEC_SDK_VERSION when set; otherwise Deno resolves latest.
|
|
46
|
+
import { createClient } from "npm:@base44/sdk";
|
|
48
47
|
|
|
49
48
|
const customHeaders: Record<string, string> = {};
|
|
50
49
|
if (isPrivileged) customHeaders["X-Bypass-RLS"] = "true";
|
package/dist/cli/index.js
CHANGED
|
@@ -228810,7 +228810,7 @@ function normalizeBase44Env() {
|
|
|
228810
228810
|
loadProjectEnvFiles();
|
|
228811
228811
|
|
|
228812
228812
|
// src/cli/index.ts
|
|
228813
|
-
import { dirname as dirname29, join as
|
|
228813
|
+
import { dirname as dirname29, join as join40 } from "node:path";
|
|
228814
228814
|
import { fileURLToPath as fileURLToPath6 } from "node:url";
|
|
228815
228815
|
|
|
228816
228816
|
// ../../node_modules/@clack/core/dist/index.mjs
|
|
@@ -239265,7 +239265,7 @@ import { join as join13 } from "node:path";
|
|
|
239265
239265
|
// package.json
|
|
239266
239266
|
var package_default = {
|
|
239267
239267
|
name: "base44",
|
|
239268
|
-
version: "0.1.
|
|
239268
|
+
version: "0.1.24",
|
|
239269
239269
|
description: "Base44 CLI - Unified interface for managing Base44 applications",
|
|
239270
239270
|
type: "module",
|
|
239271
239271
|
bin: {
|
|
@@ -251668,7 +251668,7 @@ async function siteDevAction(ctx, forwarded) {
|
|
|
251668
251668
|
if (!app?.projectRoot) {
|
|
251669
251669
|
throw new ConfigInvalidError("base44 site dev requires a linked local project. Run it from a project with base44/.app.jsonc.");
|
|
251670
251670
|
}
|
|
251671
|
-
const
|
|
251671
|
+
const project = await readProjectSettings(app.projectRoot);
|
|
251672
251672
|
const site = project.site;
|
|
251673
251673
|
if (!site) {
|
|
251674
251674
|
throw new InvalidInputError(`This project has no 'site' block in base44/config.jsonc, so there is no frontend to serve. Add one naming its serveCommand; site dev falls back to "npm run dev".`);
|
|
@@ -251693,7 +251693,7 @@ function getSiteDevCommand() {
|
|
|
251693
251693
|
async function installAction({
|
|
251694
251694
|
runTask
|
|
251695
251695
|
}) {
|
|
251696
|
-
const
|
|
251696
|
+
const project = await readProjectSettings();
|
|
251697
251697
|
const installCommand = project.site?.installCommand;
|
|
251698
251698
|
if (!installCommand) {
|
|
251699
251699
|
throw new ConfigNotFoundError("No site install command found.", {
|
|
@@ -256177,6 +256177,15 @@ var DATA_ENV_ENV_VAR = "BASE44_DATA_ENV";
|
|
|
256177
256177
|
function read3(env, name) {
|
|
256178
256178
|
return env[name]?.trim() || undefined;
|
|
256179
256179
|
}
|
|
256180
|
+
var SDK_VERSION_VAR = "BASE44_EXEC_SDK_VERSION";
|
|
256181
|
+
var SDK_VERSION_RE = /^\d+\.\d+\.\d+(?:-[0-9A-Za-z.-]+)?$/;
|
|
256182
|
+
function readExecSdkVersion(env = process.env) {
|
|
256183
|
+
const version = read3(env, SDK_VERSION_VAR);
|
|
256184
|
+
if (version && !SDK_VERSION_RE.test(version)) {
|
|
256185
|
+
throw new InvalidInputError(`${SDK_VERSION_VAR} must be an exact version such as 0.8.52.`);
|
|
256186
|
+
}
|
|
256187
|
+
return version;
|
|
256188
|
+
}
|
|
256180
256189
|
function hasExecEnvTarget(env = process.env) {
|
|
256181
256190
|
return EXEC_ENV_VARS.some((name) => read3(env, name) !== undefined);
|
|
256182
256191
|
}
|
|
@@ -256204,7 +256213,13 @@ function readExecEnvTarget(env = process.env) {
|
|
|
256204
256213
|
}
|
|
256205
256214
|
// src/core/exec/run-script.ts
|
|
256206
256215
|
import { spawn as spawn4 } from "node:child_process";
|
|
256207
|
-
import {
|
|
256216
|
+
import { readFileSync as readFileSync3, writeFileSync as writeFileSync3 } from "node:fs";
|
|
256217
|
+
import { join as join39 } from "node:path";
|
|
256218
|
+
var SDK_SPECIFIER = '"npm:@base44/sdk"';
|
|
256219
|
+
function wrapperSource(sdkVersion) {
|
|
256220
|
+
const source = readFileSync3(getExecWrapperPath(), "utf-8");
|
|
256221
|
+
return sdkVersion ? source.replace(SDK_SPECIFIER, `"npm:@base44/sdk@${sdkVersion}"`) : source;
|
|
256222
|
+
}
|
|
256208
256223
|
var DENO_CONFIG = {
|
|
256209
256224
|
minimumDependencyAge: { exclude: ["npm:@base44/sdk"] }
|
|
256210
256225
|
};
|
|
@@ -256222,7 +256237,7 @@ function inheritedEnv() {
|
|
|
256222
256237
|
return env;
|
|
256223
256238
|
}
|
|
256224
256239
|
async function runScript(options) {
|
|
256225
|
-
const { appId, code, local, privileged, dataEnv, serviceToken } = options;
|
|
256240
|
+
const { appId, code, local, privileged, dataEnv, serviceToken, sdkVersion } = options;
|
|
256226
256241
|
verifyDenoInstalled("to run scripts with exec");
|
|
256227
256242
|
const cleanupFns = [];
|
|
256228
256243
|
const tempScript = await $file({ postfix: ".ts" });
|
|
@@ -256232,10 +256247,11 @@ async function runScript(options) {
|
|
|
256232
256247
|
const [appUserToken, appBaseUrl] = local ? [local.token, local.serverUrl] : await Promise.all([getAppUserToken(), getSiteUrl()]);
|
|
256233
256248
|
const tempWrapper = await $file({ postfix: ".ts" });
|
|
256234
256249
|
cleanupFns.push(tempWrapper.cleanup);
|
|
256235
|
-
|
|
256236
|
-
const
|
|
256237
|
-
cleanupFns.push(
|
|
256238
|
-
|
|
256250
|
+
writeFileSync3(tempWrapper.path, wrapperSource(sdkVersion), "utf-8");
|
|
256251
|
+
const configDir = await $dir({ unsafeCleanup: true });
|
|
256252
|
+
cleanupFns.push(configDir.cleanup);
|
|
256253
|
+
const configPath = join39(configDir.path, "deno.json");
|
|
256254
|
+
writeFileSync3(configPath, JSON.stringify(DENO_CONFIG), "utf-8");
|
|
256239
256255
|
try {
|
|
256240
256256
|
const exitCode = await new Promise((resolvePromise) => {
|
|
256241
256257
|
const child = spawn4("deno", [
|
|
@@ -256243,7 +256259,7 @@ async function runScript(options) {
|
|
|
256243
256259
|
"--allow-all",
|
|
256244
256260
|
"--node-modules-dir=none",
|
|
256245
256261
|
"--config",
|
|
256246
|
-
|
|
256262
|
+
configPath,
|
|
256247
256263
|
tempWrapper.path
|
|
256248
256264
|
], {
|
|
256249
256265
|
env: {
|
|
@@ -256304,6 +256320,7 @@ async function execAction({ app, isNonInteractive }, options) {
|
|
|
256304
256320
|
});
|
|
256305
256321
|
}
|
|
256306
256322
|
const envTarget = readExecEnvTarget();
|
|
256323
|
+
const sdkVersion = readExecSdkVersion();
|
|
256307
256324
|
if (envTarget && options.local) {
|
|
256308
256325
|
throw new InvalidInputError("--local cannot be used when BASE44_EXEC_ACCESS_TOKEN and BASE44_EXEC_SERVER_URL are set.");
|
|
256309
256326
|
}
|
|
@@ -256329,7 +256346,8 @@ async function execAction({ app, isNonInteractive }, options) {
|
|
|
256329
256346
|
local,
|
|
256330
256347
|
privileged: options.privileged,
|
|
256331
256348
|
dataEnv: options.dataEnv,
|
|
256332
|
-
serviceToken: envTarget?.serviceToken
|
|
256349
|
+
serviceToken: envTarget?.serviceToken,
|
|
256350
|
+
sdkVersion
|
|
256333
256351
|
});
|
|
256334
256352
|
if (exitCode !== 0) {
|
|
256335
256353
|
process.exitCode = exitCode;
|
|
@@ -260522,7 +260540,7 @@ function addCommandInfoToErrorReporter(program, errorReporter) {
|
|
|
260522
260540
|
// src/cli/index.ts
|
|
260523
260541
|
var __dirname4 = dirname29(fileURLToPath6(import.meta.url));
|
|
260524
260542
|
async function runCLI(options) {
|
|
260525
|
-
ensureNpmAssets(
|
|
260543
|
+
ensureNpmAssets(join40(__dirname4, "../assets"));
|
|
260526
260544
|
const errorReporter = new ErrorReporter;
|
|
260527
260545
|
errorReporter.registerProcessErrorHandlers();
|
|
260528
260546
|
const jsonMode = process.argv.includes("--json");
|
|
@@ -260561,4 +260579,4 @@ export {
|
|
|
260561
260579
|
runCLI
|
|
260562
260580
|
};
|
|
260563
260581
|
|
|
260564
|
-
//# debugId=
|
|
260582
|
+
//# debugId=9978A4087157AD8F64756E2164756E21
|