@base44-preview/cli 0.1.22-pr.644.73e28ed → 0.1.22-pr.644.9e3658d

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
@@ -247411,7 +247411,8 @@ class Base44Command extends Command2 {
247411
247411
  if (branch !== undefined && !branch.trim()) {
247412
247412
  throw new InvalidInputError("--branch must not be empty.");
247413
247413
  }
247414
- if (this._commandOptions.requireAuth) {
247414
+ const { requireAuth } = this._commandOptions;
247415
+ if (typeof requireAuth === "function" ? requireAuth() : requireAuth) {
247415
247416
  await ensureAuth(this.context);
247416
247417
  }
247417
247418
  if (this._commandOptions.requireAppContext) {
@@ -256172,8 +256173,8 @@ var EXEC_ENV_VARS = [
256172
256173
  SERVER_URL_VAR,
256173
256174
  SERVICE_TOKEN_VAR
256174
256175
  ];
256175
- var PRIVILEGED_ENV_VAR = "BASE44_PRIVILEGED";
256176
- var DATA_ENV_ENV_VAR = "BASE44_DATA_ENV";
256176
+ var PRIVILEGED_ENV_VAR = "BASE44_EXEC_PRIVILEGED";
256177
+ var DATA_ENV_ENV_VAR = "BASE44_EXEC_DATA_ENV";
256177
256178
  function read3(env, name) {
256178
256179
  return env[name]?.trim() || undefined;
256179
256180
  }
@@ -256324,7 +256325,7 @@ async function execAction({ app, isNonInteractive }, options) {
256324
256325
  return {};
256325
256326
  }
256326
256327
  function getExecCommand() {
256327
- return new Base44Command("exec", { requireAuth: !hasExecEnvTarget() }).description("Run a script with the Base44 SDK pre-authenticated as the current user").option("--local", "Run against the local `base44 dev` server instead of the deployed app").option("--port <number>", `Port the local dev server is on (with --local; defaults to ${DEFAULT_DEV_SERVER_PORT})`).addOption(new Option2("--privileged", "Run with admin privileges (bypass RLS). Requires app owner/editor role.").env(PRIVILEGED_ENV_VAR)).addOption(new Option2("--data-env <environment>", "Data environment to run against (e.g. dev, prod)").env(DATA_ENV_ENV_VAR)).addHelpText("after", `
256328
+ return new Base44Command("exec", { requireAuth: () => !hasExecEnvTarget() }).description("Run a script with the Base44 SDK pre-authenticated as the current user").option("--local", "Run against the local `base44 dev` server instead of the deployed app").option("--port <number>", `Port the local dev server is on (with --local; defaults to ${DEFAULT_DEV_SERVER_PORT})`).addOption(new Option2("--privileged", "Run with admin privileges (bypass RLS). Requires app owner/editor role.").env(PRIVILEGED_ENV_VAR)).addOption(new Option2("--data-env <environment>", "Data environment to run against (e.g. dev, prod)").env(DATA_ENV_ENV_VAR)).addHelpText("after", `
256328
256329
  Examples:
256329
256330
  Run a script file:
256330
256331
  $ cat ./script.ts | base44 exec
@@ -256336,7 +256337,15 @@ Examples:
256336
256337
  $ echo "await base44.entities.Task.create({ title: 'seed' })" | base44 exec --local
256337
256338
 
256338
256339
  With privileged access (bypass RLS):
256339
- $ echo "const all = await base44.entities.Task.list()" | base44 exec --privileged`).action(execAction);
256340
+ $ echo "const all = await base44.entities.Task.list()" | base44 exec --privileged
256341
+
256342
+ Environment (for sandboxes and agents; no login or linked project needed):
256343
+ BASE44_EXEC_ACCESS_TOKEN App-user token for the SDK (requires BASE44_EXEC_SERVER_URL)
256344
+ BASE44_EXEC_SERVER_URL SDK server URL (requires BASE44_EXEC_ACCESS_TOKEN)
256345
+ BASE44_EXEC_SERVICE_TOKEN Optional service token, enables base44.asServiceRole
256346
+ BASE44_EXEC_PRIVILEGED Same as --privileged (set to any value to enable)
256347
+ BASE44_EXEC_DATA_ENV Same as --data-env
256348
+ The app id comes from --app-id or BASE44_APP_ID.`).action(execAction);
256340
256349
  }
256341
256350
 
256342
256351
  // src/cli/commands/project/eject.ts
@@ -260548,4 +260557,4 @@ export {
260548
260557
  runCLI
260549
260558
  };
260550
260559
 
260551
- //# debugId=CBF218C6D6FED80864756E2164756E21
260560
+ //# debugId=CE7CD756BAAA547D64756E2164756E21