@base44-preview/cli 0.0.56-pr.547.00da3ae → 0.0.56-pr.547.2de40cd

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 CHANGED
@@ -61,17 +61,40 @@ The CLI will guide you through project setup. For step-by-step tutorials, see th
61
61
  | [`secrets list`](https://docs.base44.com/developers/references/cli/commands/secrets-list) | List project secret names |
62
62
  | [`secrets set`](https://docs.base44.com/developers/references/cli/commands/secrets-set) | Set one or more project secrets |
63
63
  | [`secrets delete`](https://docs.base44.com/developers/references/cli/commands/secrets-delete) | Delete a project secret |
64
- | [`sandbox list-directory`](https://docs.base44.com/developers/references/cli/commands/sandbox-list-directory) | List directory entries in an app's remote sandbox |
65
- | [`sandbox read-file`](https://docs.base44.com/developers/references/cli/commands/sandbox-read-file) | Read file contents from an app's remote sandbox |
66
- | [`sandbox write-file`](https://docs.base44.com/developers/references/cli/commands/sandbox-write-file) | Create or overwrite a file in an app's remote sandbox |
67
- | [`sandbox edit-file`](https://docs.base44.com/developers/references/cli/commands/sandbox-edit-file) | Apply exact old→new string edits to a file in the sandbox |
64
+ | [`sandbox ls`](https://docs.base44.com/developers/references/cli/commands/sandbox-ls) | List directory entries in an app's remote sandbox |
65
+ | [`sandbox read`](https://docs.base44.com/developers/references/cli/commands/sandbox-read) | Read file contents from an app's remote sandbox |
66
+ | [`sandbox write`](https://docs.base44.com/developers/references/cli/commands/sandbox-write) | Create or overwrite a file in an app's remote sandbox |
67
+ | [`sandbox edit`](https://docs.base44.com/developers/references/cli/commands/sandbox-edit) | Apply exact old→new string edits to a file in the sandbox |
68
68
  | [`sandbox grep`](https://docs.base44.com/developers/references/cli/commands/sandbox-grep) | Search files for a pattern in an app's remote sandbox |
69
- | [`sandbox run-command`](https://docs.base44.com/developers/references/cli/commands/sandbox-run-command) | Run a shell command in an app's remote sandbox |
70
- | [`sandbox release`](https://docs.base44.com/developers/references/cli/commands/sandbox-release) | Release the external-agent session so the in-app builder can resume |
69
+ | [`sandbox run`](https://docs.base44.com/developers/references/cli/commands/sandbox-run) | Run a shell command in an app's remote sandbox |
71
70
  | [`site deploy`](https://docs.base44.com/developers/references/cli/commands/site-deploy) | Deploy built site files to Base44 hosting |
72
71
  | [`site open`](https://docs.base44.com/developers/references/cli/commands/site-open) | Open the published site in your browser |
73
72
  | [`types generate`](https://docs.base44.com/developers/references/cli/commands/types-generate) | Generate TypeScript types from project resources |
74
73
 
74
+ ## Global flags
75
+
76
+ These work with any command:
77
+
78
+ | Flag | Description |
79
+ | ---- | ----------- |
80
+ | `--app-id <id>` | Target a Base44 app explicitly (overrides the linked project and `BASE44_APP_ID`) |
81
+ | `--json` | Emit machine-readable JSON to stdout and run in silent mode |
82
+
83
+ ### `--json`
84
+
85
+ Use `--json` for scripting and agent automation:
86
+
87
+ - **stdout is a single JSON document** — pipe it straight into `jq`.
88
+ - **Silent mode** — interactive prompts, the spinner, and human status lines are suppressed; all status and diagnostics go to **stderr**, so stdout stays pure JSON.
89
+ - **Errors are JSON too** — a failure prints `{ "error": "...", "code": "...", "hints": [...] }` to stdout and exits non-zero, so you can parse success and failure from the same stream.
90
+ - **Every command accepts it.** Commands with structured output (e.g. `sandbox`, `connectors`) return rich JSON; others fall back to `{ "output": "<status>" }`.
91
+
92
+ ```bash
93
+ # Pure JSON on stdout, ready for jq
94
+ base44 sandbox ls src --app-id app_123 --json | jq '.entries'
95
+ base44 sandbox run "npm test" --app-id app_123 --json | jq '.exitCode'
96
+ ```
97
+
75
98
  ## AI agent skills
76
99
 
77
100
  When creating a project, [base44/skills](https://github.com/base44/skills) are automatically installed. These help AI agents understand how to work with Base44 projects.
package/dist/cli/index.js CHANGED
@@ -16349,7 +16349,7 @@ var require_front_matter = __commonJS((exports, module) => {
16349
16349
  var optionalByteOrderMark = "\\ufeff?";
16350
16350
  var platform5 = typeof process !== "undefined" ? process.platform : "";
16351
16351
  var pattern = "^(" + optionalByteOrderMark + "(= yaml =|---)" + "$([\\s\\S]*?)" + "^(?:\\2|\\.\\.\\.)\\s*" + "$" + (platform5 === "win32" ? "\\r?" : "") + "(?:\\n)?)";
16352
- var regex = new RegExp(pattern, "m");
16352
+ var regex2 = new RegExp(pattern, "m");
16353
16353
  module.exports = extractor;
16354
16354
  module.exports.test = test;
16355
16355
  function extractor(string4, options) {
@@ -16384,7 +16384,7 @@ var require_front_matter = __commonJS((exports, module) => {
16384
16384
  return line;
16385
16385
  }
16386
16386
  function parse10(string4, allowUnsafe) {
16387
- var match = regex.exec(string4);
16387
+ var match = regex2.exec(string4);
16388
16388
  if (!match) {
16389
16389
  return {
16390
16390
  attributes: {},
@@ -16406,7 +16406,7 @@ var require_front_matter = __commonJS((exports, module) => {
16406
16406
  }
16407
16407
  function test(string4) {
16408
16408
  string4 = string4 || "";
16409
- return regex.test(string4);
16409
+ return regex2.test(string4);
16410
16410
  }
16411
16411
  });
16412
16412
 
@@ -121034,9 +121034,9 @@ function getMessage2(key2, parameters, self2) {
121034
121034
  assert22.ok(message.length <= parameters.length, `Code: ${key2}; The provided arguments length (${parameters.length}) does not match the required ones (${message.length}).`);
121035
121035
  return Reflect.apply(message, self2, parameters);
121036
121036
  }
121037
- const regex = /%[dfijoOs]/g;
121037
+ const regex2 = /%[dfijoOs]/g;
121038
121038
  let expectedLength = 0;
121039
- while (regex.exec(message) !== null)
121039
+ while (regex2.exec(message) !== null)
121040
121040
  expectedLength++;
121041
121041
  assert22.ok(expectedLength === parameters.length, `Code: ${key2}; The provided arguments length (${parameters.length}) does not match the required ones (${expectedLength}).`);
121042
121042
  if (parameters.length === 0)
@@ -121937,9 +121937,9 @@ function convertEndOfLineOptionToCharacter2(endOfLineOption) {
121937
121937
  return endOfLineOption === OPTION_CR2 ? CHARACTER_CR2 : endOfLineOption === OPTION_CRLF2 ? CHARACTER_CRLF2 : DEFAULT_EOL2;
121938
121938
  }
121939
121939
  function countEndOfLineCharacters(text, endOfLineCharacter) {
121940
- const regex = regexps.get(endOfLineCharacter);
121940
+ const regex2 = regexps.get(endOfLineCharacter);
121941
121941
  if (false) {}
121942
- return text.match(regex)?.length ?? 0;
121942
+ return text.match(regex2)?.length ?? 0;
121943
121943
  }
121944
121944
  function normalizeEndOfLine(text) {
121945
121945
  return method_replace_all_default2(0, text, END_OF_LINE_REGEXP, CHARACTER_LF2);
@@ -124141,8 +124141,8 @@ function legacyIsNextLineEmpty(text, node, locEnd) {
124141
124141
  }
124142
124142
  function makeString(rawText, enclosingQuote, unescapeUnnecessaryEscapes) {
124143
124143
  const otherQuote = enclosingQuote === '"' ? "'" : '"';
124144
- const regex = /\\(.)|(["'])/gsu;
124145
- const raw2 = method_replace_all_default2(0, rawText, regex, (match, escaped, quote) => {
124144
+ const regex2 = /\\(.)|(["'])/gsu;
124145
+ const raw2 = method_replace_all_default2(0, rawText, regex2, (match, escaped, quote) => {
124146
124146
  if (escaped === otherQuote) {
124147
124147
  return escaped;
124148
124148
  }
@@ -127563,17 +127563,17 @@ var init_prettier = __esm(() => {
127563
127563
  }
127564
127564
  const opts = options8 || {};
127565
127565
  const posix = utils3.isWindows(options8);
127566
- const regex = isState ? picomatch.compileRe(glob, options8) : picomatch.makeRe(glob, options8, false, true);
127567
- const state = regex.state;
127568
- delete regex.state;
127566
+ const regex2 = isState ? picomatch.compileRe(glob, options8) : picomatch.makeRe(glob, options8, false, true);
127567
+ const state = regex2.state;
127568
+ delete regex2.state;
127569
127569
  let isIgnored2 = () => false;
127570
127570
  if (opts.ignore) {
127571
127571
  const ignoreOpts = { ...options8, ignore: null, onMatch: null, onResult: null };
127572
127572
  isIgnored2 = picomatch(opts.ignore, ignoreOpts, returnState);
127573
127573
  }
127574
127574
  const matcher = (input, returnObject = false) => {
127575
- const { isMatch, match, output } = picomatch.test(input, regex, options8, { glob, posix });
127576
- const result = { glob, state, regex, posix, input, output, match, isMatch };
127575
+ const { isMatch, match, output } = picomatch.test(input, regex2, options8, { glob, posix });
127576
+ const result = { glob, state, regex: regex2, posix, input, output, match, isMatch };
127577
127577
  if (typeof opts.onResult === "function") {
127578
127578
  opts.onResult(result);
127579
127579
  }
@@ -127598,7 +127598,7 @@ var init_prettier = __esm(() => {
127598
127598
  }
127599
127599
  return matcher;
127600
127600
  };
127601
- picomatch.test = (input, regex, options8, { glob, posix } = {}) => {
127601
+ picomatch.test = (input, regex2, options8, { glob, posix } = {}) => {
127602
127602
  if (typeof input !== "string") {
127603
127603
  throw new TypeError("Expected input to be a string");
127604
127604
  }
@@ -127615,16 +127615,16 @@ var init_prettier = __esm(() => {
127615
127615
  }
127616
127616
  if (match === false || opts.capture === true) {
127617
127617
  if (opts.matchBase === true || opts.basename === true) {
127618
- match = picomatch.matchBase(input, regex, options8, posix);
127618
+ match = picomatch.matchBase(input, regex2, options8, posix);
127619
127619
  } else {
127620
- match = regex.exec(output);
127620
+ match = regex2.exec(output);
127621
127621
  }
127622
127622
  }
127623
127623
  return { isMatch: Boolean(match), match, output };
127624
127624
  };
127625
127625
  picomatch.matchBase = (input, glob, options8, posix = utils3.isWindows(options8)) => {
127626
- const regex = glob instanceof RegExp ? glob : picomatch.makeRe(glob, options8);
127627
- return regex.test(path152.basename(input));
127626
+ const regex2 = glob instanceof RegExp ? glob : picomatch.makeRe(glob, options8);
127627
+ return regex2.test(path152.basename(input));
127628
127628
  };
127629
127629
  picomatch.isMatch = (str, patterns, options8) => picomatch(patterns, options8)(str);
127630
127630
  picomatch.parse = (pattern, options8) => {
@@ -127644,11 +127644,11 @@ var init_prettier = __esm(() => {
127644
127644
  if (state && state.negated === true) {
127645
127645
  source2 = `^(?!${source2}).*$`;
127646
127646
  }
127647
- const regex = picomatch.toRegex(source2, options8);
127647
+ const regex2 = picomatch.toRegex(source2, options8);
127648
127648
  if (returnState === true) {
127649
- regex.state = state;
127649
+ regex2.state = state;
127650
127650
  }
127651
- return regex;
127651
+ return regex2;
127652
127652
  };
127653
127653
  picomatch.makeRe = (input, options8 = {}, returnOutput = false, returnState = false) => {
127654
127654
  if (!input || typeof input !== "string") {
@@ -127812,8 +127812,8 @@ var init_prettier = __esm(() => {
127812
127812
  };
127813
127813
  micromatch2.capture = (glob, input, options8) => {
127814
127814
  let posix = utils3.isWindows(options8);
127815
- let regex = picomatch.makeRe(String(glob), { ...options8, capture: true });
127816
- let match = regex.exec(posix ? utils3.toPosixSlashes(input) : input);
127815
+ let regex2 = picomatch.makeRe(String(glob), { ...options8, capture: true });
127816
+ let match = regex2.exec(posix ? utils3.toPosixSlashes(input) : input);
127817
127817
  if (match) {
127818
127818
  return match.slice(1).map((v10) => v10 === undefined ? "" : v10);
127819
127819
  }
@@ -132252,7 +132252,7 @@ globstar while`, file2, fr10, pattern, pr8, swallowee);
132252
132252
  };
132253
132253
  Object.defineProperty(exports, "__esModule", { value: true });
132254
132254
  var fs42 = __importStar(__require2("fs"));
132255
- var regex = {
132255
+ var regex2 = {
132256
132256
  section: /^\s*\[(([^#;]|\\#|\\;)+)\]\s*([#;].*)?$/,
132257
132257
  param: /^\s*([\w\.\-\_]+)\s*[=:]\s*(.*?)\s*([#;].*)?$/,
132258
132258
  comment: /^\s*[#;].*$/
@@ -132284,14 +132284,14 @@ globstar while`, file2, fr10, pattern, pr8, swallowee);
132284
132284
  var lines = data.split(/\r\n|\r|\n/);
132285
132285
  lines.forEach(function(line3) {
132286
132286
  var match;
132287
- if (regex.comment.test(line3)) {
132287
+ if (regex2.comment.test(line3)) {
132288
132288
  return;
132289
132289
  }
132290
- if (regex.param.test(line3)) {
132291
- match = line3.match(regex.param);
132290
+ if (regex2.param.test(line3)) {
132291
+ match = line3.match(regex2.param);
132292
132292
  sectionBody[match[1]] = match[2];
132293
- } else if (regex.section.test(line3)) {
132294
- match = line3.match(regex.section);
132293
+ } else if (regex2.section.test(line3)) {
132294
+ match = line3.match(regex2.section);
132295
132295
  sectionName = match[1];
132296
132296
  sectionBody = {};
132297
132297
  value.push([sectionName, sectionBody]);
@@ -133377,8 +133377,8 @@ globstar while`, file2, fr10, pattern, pr8, swallowee);
133377
133377
  }
133378
133378
  _make(mode, key2) {
133379
133379
  const str = this.regexPrefix.replace(REGEX_REPLACE_TRAILING_WILDCARD, TRAILING_WILD_CARD_REPLACERS[mode]);
133380
- const regex = this.ignoreCase ? new RegExp(str, "i") : new RegExp(str);
133381
- return define2(this, key2, regex);
133380
+ const regex2 = this.ignoreCase ? new RegExp(str, "i") : new RegExp(str);
133381
+ return define2(this, key2, regex2);
133382
133382
  }
133383
133383
  };
133384
133384
  var createRule = ({
@@ -138174,8 +138174,8 @@ var require_prettier = __commonJS((exports, module) => {
138174
138174
  }
138175
138175
  function makeString2(rawText, enclosingQuote, unescapeUnnecessaryEscapes) {
138176
138176
  const otherQuote = enclosingQuote === '"' ? "'" : '"';
138177
- const regex = /\\(.)|(["'])/gsu;
138178
- const raw2 = method_replace_all_default3(0, rawText, regex, (match, escaped, quote) => {
138177
+ const regex2 = /\\(.)|(["'])/gsu;
138178
+ const raw2 = method_replace_all_default3(0, rawText, regex2, (match, escaped, quote) => {
138179
138179
  if (escaped === otherQuote) {
138180
138180
  return escaped;
138181
138181
  }
@@ -164333,12 +164333,12 @@ var require_ipaddr = __commonJS((exports, module) => {
164333
164333
  return this.toNormalizedString().replace(/((^|:)(0(:|$))+)/, "::");
164334
164334
  };
164335
164335
  IPv6.prototype.toRFC5952String = function() {
164336
- var bestMatchIndex, bestMatchLength, match, regex, string4;
164337
- regex = /((^|:)(0(:|$)){2,})/g;
164336
+ var bestMatchIndex, bestMatchLength, match, regex2, string4;
164337
+ regex2 = /((^|:)(0(:|$)){2,})/g;
164338
164338
  string4 = this.toNormalizedString();
164339
164339
  bestMatchIndex = 0;
164340
164340
  bestMatchLength = -1;
164341
- while (match = regex.exec(string4)) {
164341
+ while (match = regex2.exec(string4)) {
164342
164342
  if (match[0].length > bestMatchLength) {
164343
164343
  bestMatchIndex = match.index;
164344
164344
  bestMatchLength = match[0].length;
@@ -169656,10 +169656,10 @@ var require_follow_redirects = __commonJS((exports, module) => {
169656
169656
  spread.path = spread.search ? spread.pathname + spread.search : spread.pathname;
169657
169657
  return spread;
169658
169658
  }
169659
- function removeMatchingHeaders(regex, headers) {
169659
+ function removeMatchingHeaders(regex2, headers) {
169660
169660
  var lastValue;
169661
169661
  for (var header2 in headers) {
169662
- if (regex.test(header2)) {
169662
+ if (regex2.test(header2)) {
169663
169663
  lastValue = headers[header2];
169664
169664
  delete headers[header2];
169665
169665
  }
@@ -201219,9 +201219,9 @@ var require_dist4 = __commonJS((exports, module) => {
201219
201219
  name2 = "/" + name2;
201220
201220
  let nsp = this._nsps.get(name2);
201221
201221
  if (!nsp) {
201222
- for (const [regex, parentNamespace] of this.parentNamespacesFromRegExp) {
201223
- if (regex.test(name2)) {
201224
- debug("attaching namespace %s to parent namespace %s", name2, regex);
201222
+ for (const [regex2, parentNamespace] of this.parentNamespacesFromRegExp) {
201223
+ if (regex2.test(name2)) {
201224
+ debug("attaching namespace %s to parent namespace %s", name2, regex2);
201225
201225
  return parentNamespace.createChild(name2);
201226
201226
  }
201227
201227
  }
@@ -235840,6 +235840,24 @@ var BANNER_LINES = [
235840
235840
  async function printBanner() {
235841
235841
  await printAnimatedLines(BANNER_LINES);
235842
235842
  }
235843
+ // ../../node_modules/ansi-regex/index.js
235844
+ function ansiRegex({ onlyFirst = false } = {}) {
235845
+ const ST = "(?:\\u0007|\\u001B\\u005C|\\u009C)";
235846
+ const osc = `(?:\\u001B\\][\\s\\S]*?${ST})`;
235847
+ const csi = "[\\u001B\\u009B][[\\]()#;?]*(?:\\d{1,4}(?:[;:]\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]";
235848
+ const pattern = `${osc}|${csi}`;
235849
+ return new RegExp(pattern, onlyFirst ? undefined : "g");
235850
+ }
235851
+
235852
+ // ../../node_modules/strip-ansi/index.js
235853
+ var regex = ansiRegex();
235854
+ function stripAnsi(string4) {
235855
+ if (typeof string4 !== "string") {
235856
+ throw new TypeError(`Expected a \`string\`, got \`${typeof string4}\``);
235857
+ }
235858
+ return string4.replace(regex, "");
235859
+ }
235860
+
235843
235861
  // ../../node_modules/p-wait-for/index.js
235844
235862
  var resolveValue = Symbol("resolveValue");
235845
235863
  var sleep2 = (ms, signal) => new Promise((resolve, reject) => {
@@ -243426,7 +243444,7 @@ var ListFunctionsResponseSchema = exports_external.object({
243426
243444
  var LogLevelSchema = exports_external.enum(["info", "warning", "error", "debug"]);
243427
243445
  var FunctionLogEntrySchema = exports_external.object({
243428
243446
  time: exports_external.string(),
243429
- level: LogLevelSchema,
243447
+ level: exports_external.preprocess((v) => v === "warn" ? "warning" : !v || v === "log" ? "info" : v, LogLevelSchema),
243430
243448
  message: exports_external.string()
243431
243449
  });
243432
243450
  var FunctionLogsResponseSchema = exports_external.array(FunctionLogEntrySchema);
@@ -251091,6 +251109,35 @@ function showPlainError(error48) {
251091
251109
  }
251092
251110
 
251093
251111
  // src/cli/utils/command/Base44Command.ts
251112
+ function writeJsonSuccess(result) {
251113
+ if (result.stdout) {
251114
+ if (result.outroMessage) {
251115
+ process.stderr.write(`${result.outroMessage}
251116
+ `);
251117
+ }
251118
+ process.stdout.write(result.stdout);
251119
+ return;
251120
+ }
251121
+ process.stdout.write(`${JSON.stringify({ output: stripAnsi(result.outroMessage ?? "") })}
251122
+ `);
251123
+ }
251124
+ function writeJsonError(error48) {
251125
+ const envelope = {
251126
+ error: error48 instanceof Error ? error48.message : String(error48)
251127
+ };
251128
+ if (isCLIError(error48)) {
251129
+ envelope.code = error48.code;
251130
+ if (error48.details.length > 0) {
251131
+ envelope.details = error48.details;
251132
+ }
251133
+ if (error48.hints.length > 0) {
251134
+ envelope.hints = error48.hints;
251135
+ }
251136
+ }
251137
+ process.stdout.write(`${JSON.stringify(envelope)}
251138
+ `);
251139
+ }
251140
+
251094
251141
  class Base44Command extends Command {
251095
251142
  _context;
251096
251143
  _commandOptions;
@@ -251130,10 +251177,16 @@ class Base44Command extends Command {
251130
251177
  const result = await fn(this.context, ...args) ?? {};
251131
251178
  if (!quiet) {
251132
251179
  await showCommandEnd(result, upgradeCheckPromise, this.context.distribution);
251180
+ } else if (jsonMode) {
251181
+ writeJsonSuccess(result);
251182
+ const upgradeInfo = await upgradeCheckPromise;
251183
+ if (upgradeInfo) {
251184
+ process.stderr.write(`${formatPlainUpgradeMessage(upgradeInfo, this.context.distribution)}
251185
+ `);
251186
+ }
251133
251187
  } else {
251134
251188
  if (result.outroMessage) {
251135
- const statusStream = jsonMode ? process.stderr : process.stdout;
251136
- statusStream.write(`${result.outroMessage}
251189
+ process.stdout.write(`${result.outroMessage}
251137
251190
  `);
251138
251191
  }
251139
251192
  if (result.stdout) {
@@ -251146,7 +251199,9 @@ class Base44Command extends Command {
251146
251199
  }
251147
251200
  }
251148
251201
  } catch (error48) {
251149
- if (quiet) {
251202
+ if (jsonMode) {
251203
+ writeJsonError(error48);
251204
+ } else if (quiet) {
251150
251205
  showPlainError(error48);
251151
251206
  } else {
251152
251207
  showThemedError(error48, this.context);
@@ -253841,13 +253896,6 @@ var RunCommandResponseSchema = exports_external.object({
253841
253896
  truncated: data.truncated,
253842
253897
  durationMs: data.duration_ms
253843
253898
  }));
253844
- var ReleaseResponseSchema = exports_external.object({
253845
- app_id: exports_external.string(),
253846
- released: exports_external.boolean()
253847
- }).transform((data) => ({
253848
- appId: data.app_id,
253849
- released: data.released
253850
- }));
253851
253899
 
253852
253900
  // src/core/resources/sandbox/api.ts
253853
253901
  function isMissingSandboxScope(error48) {
@@ -253911,9 +253959,6 @@ function grep(appId, params) {
253911
253959
  function runCommand(appId, params) {
253912
253960
  return callTool(appId, "run_command", { ...params }, RunCommandResponseSchema, "running command", false);
253913
253961
  }
253914
- function releaseSession(appId) {
253915
- return callTool(appId, "release", {}, ReleaseResponseSchema, "releasing sandbox session");
253916
- }
253917
253962
 
253918
253963
  // src/cli/commands/sandbox/shared.ts
253919
253964
  async function resolveFlagOrStdin(flagValue, flagName) {
@@ -253970,12 +254015,12 @@ async function editFileAction({ runTask: runTask2 }, path17, options) {
253970
254015
  };
253971
254016
  }
253972
254017
  function getSandboxEditFileCommand() {
253973
- return new Base44Command("edit-file").description("Apply exact old→new string edits to a file in the sandbox").argument("<path>", "File path relative to the app root").option("--edits-json <json>", "JSON array of edits (if omitted, read from stdin)").option("--dry-run", "Return the unified diff without writing").addHelpText("after", `
254018
+ return new Base44Command("edit").description("Apply exact old→new string edits to a file in the sandbox").argument("<path>", "File path relative to the app root").option("--edits-json <json>", "JSON array of edits (if omitted, read from stdin)").option("--dry-run", "Return the unified diff without writing").addHelpText("after", `
253974
254019
  Each edit is { "old_text": "...", "new_text": "...", "replace_all"?: true }.
253975
254020
 
253976
254021
  Examples:
253977
- $ echo '[{"old_text":"foo","new_text":"bar"}]' | base44 sandbox edit-file src/x.ts
253978
- $ base44 sandbox edit-file src/x.ts --dry-run --edits-json '[{"old_text":"a","new_text":"b","replace_all":true}]'`).action(editFileAction);
254022
+ $ echo '[{"old_text":"foo","new_text":"bar"}]' | base44 sandbox edit src/x.ts
254023
+ $ base44 sandbox edit src/x.ts --dry-run --edits-json '[{"old_text":"a","new_text":"b","replace_all":true}]'`).action(editFileAction);
253979
254024
  }
253980
254025
 
253981
254026
  // src/cli/commands/sandbox/grep.ts
@@ -254009,7 +254054,7 @@ async function listDirectoryAction({ runTask: runTask2 }, path17, options) {
254009
254054
  return { outroMessage: "Listed directory", stdout: toJsonStdout(result) };
254010
254055
  }
254011
254056
  function getSandboxListDirectoryCommand() {
254012
- return new Base44Command("list-directory").description("List directory entries in an app's remote sandbox").argument("[path]", "Directory relative to the app root (default: app root)").option("--recursive", "List nested entries").option("--max-depth <n>", "Max depth when recursive (1-10, default 3)").option("--include-hidden", "Include dotfiles").action(listDirectoryAction);
254057
+ return new Base44Command("ls").description("List directory entries in an app's remote sandbox").argument("[path]", "Directory relative to the app root (default: app root)").option("--recursive", "List nested entries").option("--max-depth <n>", "Max depth when recursive (1-10, default 3)").option("--include-hidden", "Include dotfiles").action(listDirectoryAction);
254013
254058
  }
254014
254059
 
254015
254060
  // src/cli/commands/sandbox/read-file.ts
@@ -254021,22 +254066,7 @@ async function readFileAction({ runTask: runTask2 }, paths, options) {
254021
254066
  return { outroMessage: "Read file", stdout: toJsonStdout(result) };
254022
254067
  }
254023
254068
  function getSandboxReadFileCommand() {
254024
- return new Base44Command("read-file").description("Read file contents from an app's remote sandbox").argument("<paths...>", "One or more file paths relative to the app root").option("--offset <n>", "1-based start line").option("--limit <n>", "Max lines to return from offset").action(readFileAction);
254025
- }
254026
-
254027
- // src/cli/commands/sandbox/release.ts
254028
- async function releaseAction({
254029
- runTask: runTask2
254030
- }) {
254031
- const { id: appId } = getAppContext();
254032
- const result = await runTask2("Releasing sandbox session", () => releaseSession(appId));
254033
- return {
254034
- outroMessage: "Released sandbox session",
254035
- stdout: toJsonStdout(result)
254036
- };
254037
- }
254038
- function getSandboxReleaseCommand() {
254039
- return new Base44Command("release").description("Release the external-agent session so the in-app builder can resume").action(releaseAction);
254069
+ return new Base44Command("read").description("Read file contents from an app's remote sandbox").argument("<paths...>", "One or more file paths relative to the app root").option("--offset <n>", "1-based start line").option("--limit <n>", "Max lines to return from offset").action(readFileAction);
254040
254070
  }
254041
254071
 
254042
254072
  // src/cli/commands/sandbox/run-command.ts
@@ -254048,10 +254078,10 @@ async function runCommandAction({ runTask: runTask2 }, commandParts, options) {
254048
254078
  return { outroMessage: "Ran command", stdout: toJsonStdout(result) };
254049
254079
  }
254050
254080
  function getSandboxRunCommandCommand() {
254051
- return new Base44Command("run-command").description("Run a shell command in an app's remote sandbox").argument("<command...>", "Shell command to execute (quote to keep as one)").option("--cwd <path>", "Working directory relative to the app root").option("--timeout-ms <n>", "Timeout in milliseconds (default 120000, max 600000)").addHelpText("after", `
254081
+ return new Base44Command("run").description("Run a shell command in an app's remote sandbox").argument("<command...>", "Shell command to execute (quote to keep as one)").option("--cwd <path>", "Working directory relative to the app root").option("--timeout-ms <n>", "Timeout in milliseconds (default 120000, max 600000)").addHelpText("after", `
254052
254082
  Examples:
254053
- $ base44 sandbox run-command "npm test"
254054
- $ base44 sandbox run-command ls -la --cwd src`).action(runCommandAction);
254083
+ $ base44 sandbox run "npm test"
254084
+ $ base44 sandbox run ls -la --cwd src`).action(runCommandAction);
254055
254085
  }
254056
254086
 
254057
254087
  // src/cli/commands/sandbox/write-file.ts
@@ -254062,15 +254092,15 @@ async function writeFileAction({ runTask: runTask2 }, path17, options) {
254062
254092
  return { outroMessage: "Wrote file", stdout: toJsonStdout(result) };
254063
254093
  }
254064
254094
  function getSandboxWriteFileCommand() {
254065
- return new Base44Command("write-file").description("Create or overwrite a file in an app's remote sandbox").argument("<path>", "File path relative to the app root").option("--content <content>", "File content (if omitted, read from stdin)").option("--overwrite", "Overwrite the file if it already exists").addHelpText("after", `
254095
+ return new Base44Command("write").description("Create or overwrite a file in an app's remote sandbox").argument("<path>", "File path relative to the app root").option("--content <content>", "File content (if omitted, read from stdin)").option("--overwrite", "Overwrite the file if it already exists").addHelpText("after", `
254066
254096
  Examples:
254067
- $ echo "hello" | base44 sandbox write-file notes.txt
254068
- $ base44 sandbox write-file notes.txt --content "hello" --overwrite`).action(writeFileAction);
254097
+ $ echo "hello" | base44 sandbox write notes.txt
254098
+ $ base44 sandbox write notes.txt --content "hello" --overwrite`).action(writeFileAction);
254069
254099
  }
254070
254100
 
254071
254101
  // src/cli/commands/sandbox/index.ts
254072
254102
  function getSandboxCommand() {
254073
- return new Command("sandbox").description("Develop an app remotely via its server-side sandbox").addCommand(getSandboxListDirectoryCommand()).addCommand(getSandboxReadFileCommand()).addCommand(getSandboxWriteFileCommand()).addCommand(getSandboxEditFileCommand()).addCommand(getSandboxGrepCommand()).addCommand(getSandboxRunCommandCommand()).addCommand(getSandboxReleaseCommand());
254103
+ return new Command("sandbox").description("Develop an app remotely via its server-side sandbox").addCommand(getSandboxListDirectoryCommand()).addCommand(getSandboxReadFileCommand()).addCommand(getSandboxWriteFileCommand()).addCommand(getSandboxEditFileCommand()).addCommand(getSandboxGrepCommand()).addCommand(getSandboxRunCommandCommand());
254074
254104
  }
254075
254105
 
254076
254106
  // src/cli/commands/secrets/delete.ts
@@ -261369,9 +261399,9 @@ function matchPropertyGroup(propertyGroup, propertyValues, cohortProperties, deb
261369
261399
  throw new InconclusiveMatchError("can't match cohort without a given cohort property value");
261370
261400
  return propertyGroupType === "AND";
261371
261401
  }
261372
- function isValidRegex(regex) {
261402
+ function isValidRegex(regex2) {
261373
261403
  try {
261374
- new RegExp(regex);
261404
+ new RegExp(regex2);
261375
261405
  return true;
261376
261406
  } catch (err) {
261377
261407
  return false;
@@ -261389,8 +261419,8 @@ function convertToDateTime(value) {
261389
261419
  throw new InconclusiveMatchError(`The date provided ${value} must be a string, number, or date object`);
261390
261420
  }
261391
261421
  function relativeDateParseForFeatureFlagMatching(value) {
261392
- const regex = /^-?(?<number>[0-9]+)(?<interval>[a-z])$/;
261393
- const match = value.match(regex);
261422
+ const regex2 = /^-?(?<number>[0-9]+)(?<interval>[a-z])$/;
261423
+ const match = value.match(regex2);
261394
261424
  const parsedDt = new Date(new Date().toISOString());
261395
261425
  if (!match)
261396
261426
  return null;
@@ -262395,4 +262425,4 @@ export {
262395
262425
  CLIExitError
262396
262426
  };
262397
262427
 
262398
- //# debugId=64D861C59DC9E6B364756E2164756E21
262428
+ //# debugId=07C8C635EAE7DF1564756E2164756E21