@base44-preview/cli 0.0.37-pr.357.8ea004a → 0.0.37-pr.357.cd3f097

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 CHANGED
@@ -244354,7 +244354,7 @@ function getDevCommand(context) {
244354
244354
 
244355
244355
  // src/cli/commands/exec.ts
244356
244356
  import { spawn as spawn3, spawnSync as spawnSync3 } from "node:child_process";
244357
- import { unlinkSync, writeFileSync as writeFileSync2 } from "node:fs";
244357
+ import { copyFileSync, unlinkSync, writeFileSync as writeFileSync2 } from "node:fs";
244358
244358
  import { tmpdir as tmpdir2 } from "node:os";
244359
244359
  import { dirname as dirname12, join as join16, resolve as resolve6 } from "node:path";
244360
244360
  import { fileURLToPath as fileURLToPath8 } from "node:url";
@@ -244418,9 +244418,11 @@ async function execAction(scriptArg, options8, extraArgs) {
244418
244418
  } catch (error48) {
244419
244419
  throw await ApiError.fromHttpError(error48, "exchanging platform token for app user token");
244420
244420
  }
244421
+ const tempWrapper = join16(tmpdir2(), `base44-exec-wrapper-${Date.now()}.js`);
244422
+ copyFileSync(EXEC_WRAPPER_PATH, tempWrapper);
244421
244423
  try {
244422
244424
  const exitCode = await new Promise((resolvePromise) => {
244423
- const child = spawn3("deno", ["run", "--allow-all", "--node-modules-dir=auto", EXEC_WRAPPER_PATH, ...extraArgs], {
244425
+ const child = spawn3("deno", ["run", "--allow-all", "--node-modules-dir=auto", tempWrapper, ...extraArgs], {
244424
244426
  env: {
244425
244427
  ...process.env,
244426
244428
  SCRIPT_PATH: scriptPath,
@@ -244438,10 +244440,12 @@ async function execAction(scriptArg, options8, extraArgs) {
244438
244440
  process.exitCode = exitCode;
244439
244441
  }
244440
244442
  } finally {
244441
- if (tempFile) {
244442
- try {
244443
- unlinkSync(tempFile);
244444
- } catch {}
244443
+ for (const f7 of [tempFile, tempWrapper]) {
244444
+ if (f7) {
244445
+ try {
244446
+ unlinkSync(f7);
244447
+ } catch {}
244448
+ }
244445
244449
  }
244446
244450
  }
244447
244451
  return {};
@@ -248809,4 +248813,4 @@ export {
248809
248813
  CLIExitError
248810
248814
  };
248811
248815
 
248812
- //# debugId=8D11C7597C91089364756E2164756E21
248816
+ //# debugId=D8A2BAE36472B6C264756E2164756E21