@base44-preview/cli 0.1.23-pr.645.f7a2f42 → 0.1.23-pr.645.fe2ea5c

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,8 +42,9 @@ if (!appBaseUrl) {
42
42
  Deno.exit(1);
43
43
  }
44
44
 
45
- // runScript pins this to BASE44_EXEC_SDK_VERSION when set; otherwise Deno resolves latest.
46
- import { createClient } from "npm:@base44/sdk";
45
+ // Exact version: an unversioned specifier makes Deno resolve "latest" from npm on
46
+ // every fresh cache, so a pre-cached SDK is never used.
47
+ import { createClient } from "npm:@base44/sdk@0.8.52";
47
48
 
48
49
  const customHeaders: Record<string, string> = {};
49
50
  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 join40 } from "node:path";
228813
+ import { dirname as dirname29, join as join39 } from "node:path";
228814
228814
  import { fileURLToPath as fileURLToPath6 } from "node:url";
228815
228815
 
228816
228816
  // ../../node_modules/@clack/core/dist/index.mjs
@@ -256177,15 +256177,6 @@ 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
- }
256189
256180
  function hasExecEnvTarget(env = process.env) {
256190
256181
  return EXEC_ENV_VARS.some((name) => read3(env, name) !== undefined);
256191
256182
  }
@@ -256213,13 +256204,7 @@ function readExecEnvTarget(env = process.env) {
256213
256204
  }
256214
256205
  // src/core/exec/run-script.ts
256215
256206
  import { spawn as spawn4 } from "node:child_process";
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
- }
256207
+ import { copyFileSync, writeFileSync as writeFileSync3 } from "node:fs";
256223
256208
  var DENO_CONFIG = {
256224
256209
  minimumDependencyAge: { exclude: ["npm:@base44/sdk"] }
256225
256210
  };
@@ -256237,7 +256222,7 @@ function inheritedEnv() {
256237
256222
  return env;
256238
256223
  }
256239
256224
  async function runScript(options) {
256240
- const { appId, code, local, privileged, dataEnv, serviceToken, sdkVersion } = options;
256225
+ const { appId, code, local, privileged, dataEnv, serviceToken } = options;
256241
256226
  verifyDenoInstalled("to run scripts with exec");
256242
256227
  const cleanupFns = [];
256243
256228
  const tempScript = await $file({ postfix: ".ts" });
@@ -256247,11 +256232,10 @@ async function runScript(options) {
256247
256232
  const [appUserToken, appBaseUrl] = local ? [local.token, local.serverUrl] : await Promise.all([getAppUserToken(), getSiteUrl()]);
256248
256233
  const tempWrapper = await $file({ postfix: ".ts" });
256249
256234
  cleanupFns.push(tempWrapper.cleanup);
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");
256235
+ copyFileSync(getExecWrapperPath(), tempWrapper.path);
256236
+ const tempConfig = await $file({ postfix: ".json" });
256237
+ cleanupFns.push(tempConfig.cleanup);
256238
+ writeFileSync3(tempConfig.path, JSON.stringify(DENO_CONFIG), "utf-8");
256255
256239
  try {
256256
256240
  const exitCode = await new Promise((resolvePromise) => {
256257
256241
  const child = spawn4("deno", [
@@ -256259,7 +256243,7 @@ async function runScript(options) {
256259
256243
  "--allow-all",
256260
256244
  "--node-modules-dir=none",
256261
256245
  "--config",
256262
- configPath,
256246
+ tempConfig.path,
256263
256247
  tempWrapper.path
256264
256248
  ], {
256265
256249
  env: {
@@ -256320,7 +256304,6 @@ async function execAction({ app, isNonInteractive }, options) {
256320
256304
  });
256321
256305
  }
256322
256306
  const envTarget = readExecEnvTarget();
256323
- const sdkVersion = readExecSdkVersion();
256324
256307
  if (envTarget && options.local) {
256325
256308
  throw new InvalidInputError("--local cannot be used when BASE44_EXEC_ACCESS_TOKEN and BASE44_EXEC_SERVER_URL are set.");
256326
256309
  }
@@ -256346,8 +256329,7 @@ async function execAction({ app, isNonInteractive }, options) {
256346
256329
  local,
256347
256330
  privileged: options.privileged,
256348
256331
  dataEnv: options.dataEnv,
256349
- serviceToken: envTarget?.serviceToken,
256350
- sdkVersion
256332
+ serviceToken: envTarget?.serviceToken
256351
256333
  });
256352
256334
  if (exitCode !== 0) {
256353
256335
  process.exitCode = exitCode;
@@ -260540,7 +260522,7 @@ function addCommandInfoToErrorReporter(program, errorReporter) {
260540
260522
  // src/cli/index.ts
260541
260523
  var __dirname4 = dirname29(fileURLToPath6(import.meta.url));
260542
260524
  async function runCLI(options) {
260543
- ensureNpmAssets(join40(__dirname4, "../assets"));
260525
+ ensureNpmAssets(join39(__dirname4, "../assets"));
260544
260526
  const errorReporter = new ErrorReporter;
260545
260527
  errorReporter.registerProcessErrorHandlers();
260546
260528
  const jsonMode = process.argv.includes("--json");
@@ -260579,4 +260561,4 @@ export {
260579
260561
  runCLI
260580
260562
  };
260581
260563
 
260582
- //# debugId=8A5040C39B05EA0064756E2164756E21
260564
+ //# debugId=BB80D6E0BB39AF1564756E2164756E21