@base44-preview/cli 0.0.25-pr.151.60c93cc → 0.0.25-pr.151.94c529c

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.
Files changed (2) hide show
  1. package/dist/index.js +137 -231
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -3,7 +3,7 @@ import { EventEmitter, addAbortListener, on, once, setMaxListeners } from "node:
3
3
  import childProcess, { ChildProcess, execFile, spawn, spawnSync } from "node:child_process";
4
4
  import path, { basename, dirname, join, posix, resolve, win32 } from "node:path";
5
5
  import fs, { appendFileSync, createReadStream, createWriteStream, readFileSync, statSync, writeFileSync } from "node:fs";
6
- import process$1, { execArgv, execPath, hrtime, platform, stdin, stdout } from "node:process";
6
+ import y, { execArgv, execPath, hrtime, platform, stdin, stdout } from "node:process";
7
7
  import { aborted, callbackify, debuglog, inspect, promisify, stripVTControlCharacters } from "node:util";
8
8
  import * as g from "node:readline";
9
9
  import O from "node:readline";
@@ -893,7 +893,7 @@ var require_command = /* @__PURE__ */ __commonJSMin(((exports) => {
893
893
  const childProcess$1 = __require("node:child_process");
894
894
  const path$15 = __require("node:path");
895
895
  const fs$10 = __require("node:fs");
896
- const process$4 = __require("node:process");
896
+ const process$3 = __require("node:process");
897
897
  const { Argument, humanReadableArgName } = require_argument();
898
898
  const { CommanderError } = require_error$1();
899
899
  const { Help } = require_help();
@@ -944,10 +944,10 @@ var require_command = /* @__PURE__ */ __commonJSMin(((exports) => {
944
944
  this._showHelpAfterError = false;
945
945
  this._showSuggestionAfterError = true;
946
946
  this._outputConfiguration = {
947
- writeOut: (str) => process$4.stdout.write(str),
948
- writeErr: (str) => process$4.stderr.write(str),
949
- getOutHelpWidth: () => process$4.stdout.isTTY ? process$4.stdout.columns : void 0,
950
- getErrHelpWidth: () => process$4.stderr.isTTY ? process$4.stderr.columns : void 0,
947
+ writeOut: (str) => process$3.stdout.write(str),
948
+ writeErr: (str) => process$3.stderr.write(str),
949
+ getOutHelpWidth: () => process$3.stdout.isTTY ? process$3.stdout.columns : void 0,
950
+ getErrHelpWidth: () => process$3.stderr.isTTY ? process$3.stderr.columns : void 0,
951
951
  outputError: (str, write) => write(str)
952
952
  };
953
953
  this._hidden = false;
@@ -1301,7 +1301,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
1301
1301
  */
1302
1302
  _exit(exitCode, code$1, message) {
1303
1303
  if (this._exitCallback) this._exitCallback(new CommanderError(exitCode, code$1, message));
1304
- process$4.exit(exitCode);
1304
+ process$3.exit(exitCode);
1305
1305
  }
1306
1306
  /**
1307
1307
  * Register callback `fn` for the command.
@@ -1640,11 +1640,11 @@ Expecting one of '${allowedValues.join("', '")}'`);
1640
1640
  if (argv !== void 0 && !Array.isArray(argv)) throw new Error("first parameter to parse must be array or undefined");
1641
1641
  parseOptions = parseOptions || {};
1642
1642
  if (argv === void 0 && parseOptions.from === void 0) {
1643
- if (process$4.versions?.electron) parseOptions.from = "electron";
1644
- const execArgv$1 = process$4.execArgv ?? [];
1643
+ if (process$3.versions?.electron) parseOptions.from = "electron";
1644
+ const execArgv$1 = process$3.execArgv ?? [];
1645
1645
  if (execArgv$1.includes("-e") || execArgv$1.includes("--eval") || execArgv$1.includes("-p") || execArgv$1.includes("--print")) parseOptions.from = "eval";
1646
1646
  }
1647
- if (argv === void 0) argv = process$4.argv;
1647
+ if (argv === void 0) argv = process$3.argv;
1648
1648
  this.rawArgs = argv.slice();
1649
1649
  let userArgs;
1650
1650
  switch (parseOptions.from) {
@@ -1654,7 +1654,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
1654
1654
  userArgs = argv.slice(2);
1655
1655
  break;
1656
1656
  case "electron":
1657
- if (process$4.defaultApp) {
1657
+ if (process$3.defaultApp) {
1658
1658
  this._scriptPath = argv[1];
1659
1659
  userArgs = argv.slice(2);
1660
1660
  } else userArgs = argv.slice(1);
@@ -1768,15 +1768,15 @@ Expecting one of '${allowedValues.join("', '")}'`);
1768
1768
  }
1769
1769
  launchWithNode = sourceExt.includes(path$15.extname(executableFile));
1770
1770
  let proc$1;
1771
- if (process$4.platform !== "win32") if (launchWithNode) {
1771
+ if (process$3.platform !== "win32") if (launchWithNode) {
1772
1772
  args.unshift(executableFile);
1773
- args = incrementNodeInspectorPort(process$4.execArgv).concat(args);
1774
- proc$1 = childProcess$1.spawn(process$4.argv[0], args, { stdio: "inherit" });
1773
+ args = incrementNodeInspectorPort(process$3.execArgv).concat(args);
1774
+ proc$1 = childProcess$1.spawn(process$3.argv[0], args, { stdio: "inherit" });
1775
1775
  } else proc$1 = childProcess$1.spawn(executableFile, args, { stdio: "inherit" });
1776
1776
  else {
1777
1777
  args.unshift(executableFile);
1778
- args = incrementNodeInspectorPort(process$4.execArgv).concat(args);
1779
- proc$1 = childProcess$1.spawn(process$4.execPath, args, { stdio: "inherit" });
1778
+ args = incrementNodeInspectorPort(process$3.execArgv).concat(args);
1779
+ proc$1 = childProcess$1.spawn(process$3.execPath, args, { stdio: "inherit" });
1780
1780
  }
1781
1781
  if (!proc$1.killed) [
1782
1782
  "SIGUSR1",
@@ -1785,14 +1785,14 @@ Expecting one of '${allowedValues.join("', '")}'`);
1785
1785
  "SIGINT",
1786
1786
  "SIGHUP"
1787
1787
  ].forEach((signal) => {
1788
- process$4.on(signal, () => {
1788
+ process$3.on(signal, () => {
1789
1789
  if (proc$1.killed === false && proc$1.exitCode === null) proc$1.kill(signal);
1790
1790
  });
1791
1791
  });
1792
1792
  const exitCallback = this._exitCallback;
1793
1793
  proc$1.on("close", (code$1) => {
1794
1794
  code$1 = code$1 ?? 1;
1795
- if (!exitCallback) process$4.exit(code$1);
1795
+ if (!exitCallback) process$3.exit(code$1);
1796
1796
  else exitCallback(new CommanderError(code$1, "commander.executeSubCommandAsync", "(close)"));
1797
1797
  });
1798
1798
  proc$1.on("error", (err) => {
@@ -1804,7 +1804,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
1804
1804
  - ${executableDirMessage}`;
1805
1805
  throw new Error(executableMissing);
1806
1806
  } else if (err.code === "EACCES") throw new Error(`'${executableFile}' not executable`);
1807
- if (!exitCallback) process$4.exit(1);
1807
+ if (!exitCallback) process$3.exit(1);
1808
1808
  else {
1809
1809
  const wrappedError = new CommanderError(1, "commander.executeSubCommandAsync", "(error)");
1810
1810
  wrappedError.nestedError = err;
@@ -2210,13 +2210,13 @@ Expecting one of '${allowedValues.join("', '")}'`);
2210
2210
  */
2211
2211
  _parseOptionsEnv() {
2212
2212
  this.options.forEach((option) => {
2213
- if (option.envVar && option.envVar in process$4.env) {
2213
+ if (option.envVar && option.envVar in process$3.env) {
2214
2214
  const optionKey = option.attributeName();
2215
2215
  if (this.getOptionValue(optionKey) === void 0 || [
2216
2216
  "default",
2217
2217
  "config",
2218
2218
  "env"
2219
- ].includes(this.getOptionValueSource(optionKey))) if (option.required || option.optional) this.emit(`optionEnv:${option.name()}`, process$4.env[option.envVar]);
2219
+ ].includes(this.getOptionValueSource(optionKey))) if (option.required || option.optional) this.emit(`optionEnv:${option.name()}`, process$3.env[option.envVar]);
2220
2220
  else this.emit(`optionEnv:${option.name()}`);
2221
2221
  }
2222
2222
  });
@@ -2595,7 +2595,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
2595
2595
  */
2596
2596
  help(contextOptions) {
2597
2597
  this.outputHelp(contextOptions);
2598
- let exitCode = process$4.exitCode || 0;
2598
+ let exitCode = process$3.exitCode || 0;
2599
2599
  if (exitCode === 0 && contextOptions && typeof contextOptions !== "function" && contextOptions.error) exitCode = 1;
2600
2600
  this._exit(exitCode, "commander.help", "(outputHelp)");
2601
2601
  }
@@ -2711,16 +2711,16 @@ var require_src = /* @__PURE__ */ __commonJSMin(((exports, module) => {
2711
2711
  const CSI = `${ESC}[`;
2712
2712
  const beep = "\x07";
2713
2713
  const cursor = {
2714
- to(x$2, y$1) {
2715
- if (!y$1) return `${CSI}${x$2 + 1}G`;
2716
- return `${CSI}${y$1 + 1};${x$2 + 1}H`;
2714
+ to(x$2, y$2) {
2715
+ if (!y$2) return `${CSI}${x$2 + 1}G`;
2716
+ return `${CSI}${y$2 + 1};${x$2 + 1}H`;
2717
2717
  },
2718
- move(x$2, y$1) {
2718
+ move(x$2, y$2) {
2719
2719
  let ret = "";
2720
2720
  if (x$2 < 0) ret += `${CSI}${-x$2}D`;
2721
2721
  else if (x$2 > 0) ret += `${CSI}${x$2}C`;
2722
- if (y$1 < 0) ret += `${CSI}${-y$1}A`;
2723
- else if (y$1 > 0) ret += `${CSI}${y$1}B`;
2722
+ if (y$2 < 0) ret += `${CSI}${-y$2}A`;
2723
+ else if (y$2 > 0) ret += `${CSI}${y$2}B`;
2724
2724
  return ret;
2725
2725
  },
2726
2726
  up: (count$1 = 1) => `${CSI}${count$1}A`,
@@ -3030,13 +3030,13 @@ function rD() {
3030
3030
  }
3031
3031
  }), r;
3032
3032
  }
3033
- const ED = rD(), d$1 = new Set(["\x1B", "›"]), oD = 39, y = "\x07", V$1 = "[", nD = "]", G$1 = "m", _$1 = `${nD}8;;`, z = (e$1) => `${d$1.values().next().value}${V$1}${e$1}${G$1}`, K$1 = (e$1) => `${d$1.values().next().value}${_$1}${e$1}${y}`, aD = (e$1) => e$1.split(" ").map((u$2) => p(u$2)), k$1 = (e$1, u$2, t) => {
3033
+ const ED = rD(), d$1 = new Set(["\x1B", "›"]), oD = 39, y$1 = "\x07", V$1 = "[", nD = "]", G$1 = "m", _$1 = `${nD}8;;`, z = (e$1) => `${d$1.values().next().value}${V$1}${e$1}${G$1}`, K$1 = (e$1) => `${d$1.values().next().value}${_$1}${e$1}${y$1}`, aD = (e$1) => e$1.split(" ").map((u$2) => p(u$2)), k$1 = (e$1, u$2, t) => {
3034
3034
  const F$1 = [...u$2];
3035
3035
  let s = !1, i$1 = !1, D$1 = p(P$1(e$1[e$1.length - 1]));
3036
3036
  for (const [C$1, n$1] of F$1.entries()) {
3037
3037
  const E = p(n$1);
3038
3038
  if (D$1 + E <= t ? e$1[e$1.length - 1] += n$1 : (e$1.push(n$1), D$1 = 0), d$1.has(n$1) && (s = !0, i$1 = F$1.slice(C$1 + 1).join("").startsWith(_$1)), s) {
3039
- i$1 ? n$1 === y && (s = !1, i$1 = !1) : n$1 === G$1 && (s = !1);
3039
+ i$1 ? n$1 === y$1 && (s = !1, i$1 = !1) : n$1 === G$1 && (s = !1);
3040
3040
  continue;
3041
3041
  }
3042
3042
  D$1 += E, D$1 === t && C$1 < F$1.length - 1 && (e$1.push(""), D$1 = 0);
@@ -3078,7 +3078,7 @@ const ED = rD(), d$1 = new Set(["\x1B", "›"]), oD = 39, y = "\x07", V$1 = "[",
3078
3078
  `)];
3079
3079
  for (const [E, a$1] of n$1.entries()) {
3080
3080
  if (F$1 += a$1, d$1.has(a$1)) {
3081
- const { groups: c$1 } = (/* @__PURE__ */ new RegExp(`(?:\\${V$1}(?<code>\\d+)m|\\${_$1}(?<uri>.*)${y})`)).exec(n$1.slice(E).join("")) || { groups: {} };
3081
+ const { groups: c$1 } = (/* @__PURE__ */ new RegExp(`(?:\\${V$1}(?<code>\\d+)m|\\${_$1}(?<uri>.*)${y$1})`)).exec(n$1.slice(E).join("")) || { groups: {} };
3082
3082
  if (c$1.code !== void 0) {
3083
3083
  const f = Number.parseFloat(c$1.code);
3084
3084
  s = f === oD ? void 0 : f;
@@ -3479,7 +3479,7 @@ var RD = class extends x$1 {
3479
3479
  //#endregion
3480
3480
  //#region node_modules/@clack/prompts/dist/index.mjs
3481
3481
  function ce() {
3482
- return process$1.platform !== "win32" ? process$1.env.TERM !== "linux" : !!process$1.env.CI || !!process$1.env.WT_SESSION || !!process$1.env.TERMINUS_SUBLIME || process$1.env.ConEmuTask === "{cmd::Cmder}" || process$1.env.TERM_PROGRAM === "Terminus-Sublime" || process$1.env.TERM_PROGRAM === "vscode" || process$1.env.TERM === "xterm-256color" || process$1.env.TERM === "alacritty" || process$1.env.TERMINAL_EMULATOR === "JetBrains-JediTerm";
3482
+ return y.platform !== "win32" ? y.env.TERM !== "linux" : !!y.env.CI || !!y.env.WT_SESSION || !!y.env.TERMINUS_SUBLIME || y.env.ConEmuTask === "{cmd::Cmder}" || y.env.TERM_PROGRAM === "Terminus-Sublime" || y.env.TERM_PROGRAM === "vscode" || y.env.TERM === "xterm-256color" || y.env.TERM === "alacritty" || y.env.TERMINAL_EMULATOR === "JetBrains-JediTerm";
3483
3483
  }
3484
3484
  const V = ce(), u$1 = (t, n$1) => V ? t : n$1, le = u$1("◆", "*"), L = u$1("■", "x"), W = u$1("▲", "x"), C = u$1("◇", "o"), ue = u$1("┌", "T"), o$1 = u$1("│", "|"), d = u$1("└", "—"), k = u$1("●", ">"), P = u$1("○", " "), A = u$1("◻", "[•]"), T = u$1("◼", "[+]"), F = u$1("◻", "[ ]"), $e = u$1("▪", "•"), _ = u$1("─", "-"), me = u$1("╮", "+"), de = u$1("├", "+"), pe = u$1("╯", "+"), q = u$1("●", "•"), D = u$1("◆", "*"), U = u$1("▲", "!"), K = u$1("■", "x"), b = (t) => {
3485
3485
  switch (t) {
@@ -5747,77 +5747,6 @@ function handleIntersectionResults(result, left, right) {
5747
5747
  result.value = merged.data;
5748
5748
  return result;
5749
5749
  }
5750
- const $ZodTuple = /* @__PURE__ */ $constructor("$ZodTuple", (inst, def) => {
5751
- $ZodType.init(inst, def);
5752
- const items = def.items;
5753
- inst._zod.parse = (payload, ctx) => {
5754
- const input = payload.value;
5755
- if (!Array.isArray(input)) {
5756
- payload.issues.push({
5757
- input,
5758
- inst,
5759
- expected: "tuple",
5760
- code: "invalid_type"
5761
- });
5762
- return payload;
5763
- }
5764
- payload.value = [];
5765
- const proms = [];
5766
- const reversedIndex = [...items].reverse().findIndex((item) => item._zod.optin !== "optional");
5767
- const optStart = reversedIndex === -1 ? 0 : items.length - reversedIndex;
5768
- if (!def.rest) {
5769
- const tooBig = input.length > items.length;
5770
- const tooSmall = input.length < optStart - 1;
5771
- if (tooBig || tooSmall) {
5772
- payload.issues.push({
5773
- ...tooBig ? {
5774
- code: "too_big",
5775
- maximum: items.length,
5776
- inclusive: true
5777
- } : {
5778
- code: "too_small",
5779
- minimum: items.length
5780
- },
5781
- input,
5782
- inst,
5783
- origin: "array"
5784
- });
5785
- return payload;
5786
- }
5787
- }
5788
- let i$1 = -1;
5789
- for (const item of items) {
5790
- i$1++;
5791
- if (i$1 >= input.length) {
5792
- if (i$1 >= optStart) continue;
5793
- }
5794
- const result = item._zod.run({
5795
- value: input[i$1],
5796
- issues: []
5797
- }, ctx);
5798
- if (result instanceof Promise) proms.push(result.then((result$1) => handleTupleResult(result$1, payload, i$1)));
5799
- else handleTupleResult(result, payload, i$1);
5800
- }
5801
- if (def.rest) {
5802
- const rest = input.slice(items.length);
5803
- for (const el of rest) {
5804
- i$1++;
5805
- const result = def.rest._zod.run({
5806
- value: el,
5807
- issues: []
5808
- }, ctx);
5809
- if (result instanceof Promise) proms.push(result.then((result$1) => handleTupleResult(result$1, payload, i$1)));
5810
- else handleTupleResult(result, payload, i$1);
5811
- }
5812
- }
5813
- if (proms.length) return Promise.all(proms).then(() => payload);
5814
- return payload;
5815
- };
5816
- });
5817
- function handleTupleResult(result, final, index) {
5818
- if (result.issues.length) final.issues.push(...prefixIssues(index, result.issues));
5819
- final.value[index] = result.value;
5820
- }
5821
5750
  const $ZodRecord = /* @__PURE__ */ $constructor("$ZodRecord", (inst, def) => {
5822
5751
  $ZodType.init(inst, def);
5823
5752
  inst._zod.parse = (payload, ctx) => {
@@ -6762,7 +6691,7 @@ function initializeContext(params) {
6762
6691
  external: params?.external ?? void 0
6763
6692
  };
6764
6693
  }
6765
- function process$3(schema, ctx, _params = {
6694
+ function process$2(schema, ctx, _params = {
6766
6695
  path: [],
6767
6696
  schemaPath: []
6768
6697
  }) {
@@ -6799,7 +6728,7 @@ function process$3(schema, ctx, _params = {
6799
6728
  const parent = schema._zod.parent;
6800
6729
  if (parent) {
6801
6730
  if (!result.ref) result.ref = parent;
6802
- process$3(parent, ctx, params);
6731
+ process$2(parent, ctx, params);
6803
6732
  ctx.seen.get(parent).isParent = true;
6804
6733
  }
6805
6734
  }
@@ -7011,7 +6940,7 @@ const createToJSONSchemaMethod = (schema, processors = {}) => (params) => {
7011
6940
  ...params,
7012
6941
  processors
7013
6942
  });
7014
- process$3(schema, ctx);
6943
+ process$2(schema, ctx);
7015
6944
  extractDefs(ctx, schema);
7016
6945
  return finalize(ctx, schema);
7017
6946
  };
@@ -7023,7 +6952,7 @@ const createStandardJSONSchemaMethod = (schema, io, processors = {}) => (params)
7023
6952
  io,
7024
6953
  processors
7025
6954
  });
7026
- process$3(schema, ctx);
6955
+ process$2(schema, ctx);
7027
6956
  extractDefs(ctx, schema);
7028
6957
  return finalize(ctx, schema);
7029
6958
  };
@@ -7131,7 +7060,7 @@ const arrayProcessor = (schema, ctx, _json, params) => {
7131
7060
  if (typeof minimum === "number") json.minItems = minimum;
7132
7061
  if (typeof maximum === "number") json.maxItems = maximum;
7133
7062
  json.type = "array";
7134
- json.items = process$3(def.element, ctx, {
7063
+ json.items = process$2(def.element, ctx, {
7135
7064
  ...params,
7136
7065
  path: [...params.path, "items"]
7137
7066
  });
@@ -7142,7 +7071,7 @@ const objectProcessor = (schema, ctx, _json, params) => {
7142
7071
  json.type = "object";
7143
7072
  json.properties = {};
7144
7073
  const shape = def.shape;
7145
- for (const key in shape) json.properties[key] = process$3(shape[key], ctx, {
7074
+ for (const key in shape) json.properties[key] = process$2(shape[key], ctx, {
7146
7075
  ...params,
7147
7076
  path: [
7148
7077
  ...params.path,
@@ -7160,7 +7089,7 @@ const objectProcessor = (schema, ctx, _json, params) => {
7160
7089
  if (def.catchall?._zod.def.type === "never") json.additionalProperties = false;
7161
7090
  else if (!def.catchall) {
7162
7091
  if (ctx.io === "output") json.additionalProperties = false;
7163
- } else if (def.catchall) json.additionalProperties = process$3(def.catchall, ctx, {
7092
+ } else if (def.catchall) json.additionalProperties = process$2(def.catchall, ctx, {
7164
7093
  ...params,
7165
7094
  path: [...params.path, "additionalProperties"]
7166
7095
  });
@@ -7168,7 +7097,7 @@ const objectProcessor = (schema, ctx, _json, params) => {
7168
7097
  const unionProcessor = (schema, ctx, json, params) => {
7169
7098
  const def = schema._zod.def;
7170
7099
  const isExclusive = def.inclusive === false;
7171
- const options = def.options.map((x$2, i$1) => process$3(x$2, ctx, {
7100
+ const options = def.options.map((x$2, i$1) => process$2(x$2, ctx, {
7172
7101
  ...params,
7173
7102
  path: [
7174
7103
  ...params.path,
@@ -7181,7 +7110,7 @@ const unionProcessor = (schema, ctx, json, params) => {
7181
7110
  };
7182
7111
  const intersectionProcessor = (schema, ctx, json, params) => {
7183
7112
  const def = schema._zod.def;
7184
- const a$1 = process$3(def.left, ctx, {
7113
+ const a$1 = process$2(def.left, ctx, {
7185
7114
  ...params,
7186
7115
  path: [
7187
7116
  ...params.path,
@@ -7189,7 +7118,7 @@ const intersectionProcessor = (schema, ctx, json, params) => {
7189
7118
  0
7190
7119
  ]
7191
7120
  });
7192
- const b$2 = process$3(def.right, ctx, {
7121
+ const b$2 = process$2(def.right, ctx, {
7193
7122
  ...params,
7194
7123
  path: [
7195
7124
  ...params.path,
@@ -7200,44 +7129,6 @@ const intersectionProcessor = (schema, ctx, json, params) => {
7200
7129
  const isSimpleIntersection = (val) => "allOf" in val && Object.keys(val).length === 1;
7201
7130
  json.allOf = [...isSimpleIntersection(a$1) ? a$1.allOf : [a$1], ...isSimpleIntersection(b$2) ? b$2.allOf : [b$2]];
7202
7131
  };
7203
- const tupleProcessor = (schema, ctx, _json, params) => {
7204
- const json = _json;
7205
- const def = schema._zod.def;
7206
- json.type = "array";
7207
- const prefixPath$1 = ctx.target === "draft-2020-12" ? "prefixItems" : "items";
7208
- const restPath = ctx.target === "draft-2020-12" ? "items" : ctx.target === "openapi-3.0" ? "items" : "additionalItems";
7209
- const prefixItems = def.items.map((x$2, i$1) => process$3(x$2, ctx, {
7210
- ...params,
7211
- path: [
7212
- ...params.path,
7213
- prefixPath$1,
7214
- i$1
7215
- ]
7216
- }));
7217
- const rest = def.rest ? process$3(def.rest, ctx, {
7218
- ...params,
7219
- path: [
7220
- ...params.path,
7221
- restPath,
7222
- ...ctx.target === "openapi-3.0" ? [def.items.length] : []
7223
- ]
7224
- }) : null;
7225
- if (ctx.target === "draft-2020-12") {
7226
- json.prefixItems = prefixItems;
7227
- if (rest) json.items = rest;
7228
- } else if (ctx.target === "openapi-3.0") {
7229
- json.items = { anyOf: prefixItems };
7230
- if (rest) json.items.anyOf.push(rest);
7231
- json.minItems = prefixItems.length;
7232
- if (!rest) json.maxItems = prefixItems.length;
7233
- } else {
7234
- json.items = prefixItems;
7235
- if (rest) json.additionalItems = rest;
7236
- }
7237
- const { minimum, maximum } = schema._zod.bag;
7238
- if (typeof minimum === "number") json.minItems = minimum;
7239
- if (typeof maximum === "number") json.maxItems = maximum;
7240
- };
7241
7132
  const recordProcessor = (schema, ctx, _json, params) => {
7242
7133
  const json = _json;
7243
7134
  const def = schema._zod.def;
@@ -7245,7 +7136,7 @@ const recordProcessor = (schema, ctx, _json, params) => {
7245
7136
  const keyType = def.keyType;
7246
7137
  const patterns = keyType._zod.bag?.patterns;
7247
7138
  if (def.mode === "loose" && patterns && patterns.size > 0) {
7248
- const valueSchema = process$3(def.valueType, ctx, {
7139
+ const valueSchema = process$2(def.valueType, ctx, {
7249
7140
  ...params,
7250
7141
  path: [
7251
7142
  ...params.path,
@@ -7256,11 +7147,11 @@ const recordProcessor = (schema, ctx, _json, params) => {
7256
7147
  json.patternProperties = {};
7257
7148
  for (const pattern of patterns) json.patternProperties[pattern.source] = valueSchema;
7258
7149
  } else {
7259
- if (ctx.target === "draft-07" || ctx.target === "draft-2020-12") json.propertyNames = process$3(def.keyType, ctx, {
7150
+ if (ctx.target === "draft-07" || ctx.target === "draft-2020-12") json.propertyNames = process$2(def.keyType, ctx, {
7260
7151
  ...params,
7261
7152
  path: [...params.path, "propertyNames"]
7262
7153
  });
7263
- json.additionalProperties = process$3(def.valueType, ctx, {
7154
+ json.additionalProperties = process$2(def.valueType, ctx, {
7264
7155
  ...params,
7265
7156
  path: [...params.path, "additionalProperties"]
7266
7157
  });
@@ -7273,7 +7164,7 @@ const recordProcessor = (schema, ctx, _json, params) => {
7273
7164
  };
7274
7165
  const nullableProcessor = (schema, ctx, json, params) => {
7275
7166
  const def = schema._zod.def;
7276
- const inner = process$3(def.innerType, ctx, params);
7167
+ const inner = process$2(def.innerType, ctx, params);
7277
7168
  const seen = ctx.seen.get(schema);
7278
7169
  if (ctx.target === "openapi-3.0") {
7279
7170
  seen.ref = def.innerType;
@@ -7282,27 +7173,27 @@ const nullableProcessor = (schema, ctx, json, params) => {
7282
7173
  };
7283
7174
  const nonoptionalProcessor = (schema, ctx, _json, params) => {
7284
7175
  const def = schema._zod.def;
7285
- process$3(def.innerType, ctx, params);
7176
+ process$2(def.innerType, ctx, params);
7286
7177
  const seen = ctx.seen.get(schema);
7287
7178
  seen.ref = def.innerType;
7288
7179
  };
7289
7180
  const defaultProcessor = (schema, ctx, json, params) => {
7290
7181
  const def = schema._zod.def;
7291
- process$3(def.innerType, ctx, params);
7182
+ process$2(def.innerType, ctx, params);
7292
7183
  const seen = ctx.seen.get(schema);
7293
7184
  seen.ref = def.innerType;
7294
7185
  json.default = JSON.parse(JSON.stringify(def.defaultValue));
7295
7186
  };
7296
7187
  const prefaultProcessor = (schema, ctx, json, params) => {
7297
7188
  const def = schema._zod.def;
7298
- process$3(def.innerType, ctx, params);
7189
+ process$2(def.innerType, ctx, params);
7299
7190
  const seen = ctx.seen.get(schema);
7300
7191
  seen.ref = def.innerType;
7301
7192
  if (ctx.io === "input") json._prefault = JSON.parse(JSON.stringify(def.defaultValue));
7302
7193
  };
7303
7194
  const catchProcessor = (schema, ctx, json, params) => {
7304
7195
  const def = schema._zod.def;
7305
- process$3(def.innerType, ctx, params);
7196
+ process$2(def.innerType, ctx, params);
7306
7197
  const seen = ctx.seen.get(schema);
7307
7198
  seen.ref = def.innerType;
7308
7199
  let catchValue;
@@ -7316,20 +7207,20 @@ const catchProcessor = (schema, ctx, json, params) => {
7316
7207
  const pipeProcessor = (schema, ctx, _json, params) => {
7317
7208
  const def = schema._zod.def;
7318
7209
  const innerType = ctx.io === "input" ? def.in._zod.def.type === "transform" ? def.out : def.in : def.out;
7319
- process$3(innerType, ctx, params);
7210
+ process$2(innerType, ctx, params);
7320
7211
  const seen = ctx.seen.get(schema);
7321
7212
  seen.ref = innerType;
7322
7213
  };
7323
7214
  const readonlyProcessor = (schema, ctx, json, params) => {
7324
7215
  const def = schema._zod.def;
7325
- process$3(def.innerType, ctx, params);
7216
+ process$2(def.innerType, ctx, params);
7326
7217
  const seen = ctx.seen.get(schema);
7327
7218
  seen.ref = def.innerType;
7328
7219
  json.readOnly = true;
7329
7220
  };
7330
7221
  const optionalProcessor = (schema, ctx, _json, params) => {
7331
7222
  const def = schema._zod.def;
7332
- process$3(def.innerType, ctx, params);
7223
+ process$2(def.innerType, ctx, params);
7333
7224
  const seen = ctx.seen.get(schema);
7334
7225
  seen.ref = def.innerType;
7335
7226
  };
@@ -7789,25 +7680,6 @@ function intersection(left, right) {
7789
7680
  right
7790
7681
  });
7791
7682
  }
7792
- const ZodTuple = /* @__PURE__ */ $constructor("ZodTuple", (inst, def) => {
7793
- $ZodTuple.init(inst, def);
7794
- ZodType.init(inst, def);
7795
- inst._zod.processJSONSchema = (ctx, json, params) => tupleProcessor(inst, ctx, json, params);
7796
- inst.rest = (rest) => inst.clone({
7797
- ...inst._zod.def,
7798
- rest
7799
- });
7800
- });
7801
- function tuple(items, _paramsOrRest, _params) {
7802
- const hasRest = _paramsOrRest instanceof $ZodType;
7803
- const params = hasRest ? _params : _paramsOrRest;
7804
- return new ZodTuple({
7805
- type: "tuple",
7806
- items,
7807
- rest: hasRest ? _paramsOrRest : null,
7808
- ...normalizeParams(params)
7809
- });
7810
- }
7811
7683
  const ZodRecord = /* @__PURE__ */ $constructor("ZodRecord", (inst, def) => {
7812
7684
  $ZodRecord.init(inst, def);
7813
7685
  ZodType.init(inst, def);
@@ -16399,7 +16271,7 @@ const createIgnorePredicate = (patterns, cwd, baseDir) => {
16399
16271
  };
16400
16272
  const normalizeOptions$2 = (options = {}) => {
16401
16273
  const ignoreOption = options.ignore ? Array.isArray(options.ignore) ? options.ignore : [options.ignore] : [];
16402
- const cwd = toPath$1(options.cwd) ?? process$1.cwd();
16274
+ const cwd = toPath$1(options.cwd) ?? y.cwd();
16403
16275
  const deep = typeof options.deep === "number" ? Math.max(0, options.deep) + 1 : Number.POSITIVE_INFINITY;
16404
16276
  return {
16405
16277
  cwd,
@@ -16496,7 +16368,7 @@ const getDirectoryGlob = ({ directoryPath, files, extensions }) => {
16496
16368
  const extensionGlob = extensions?.length > 0 ? `.${extensions.length > 1 ? `{${extensions.join(",")}}` : extensions[0]}` : "";
16497
16369
  return files ? files.map((file) => path.posix.join(directoryPath, `**/${path.extname(file) ? file : `${file}${extensionGlob}`}`)) : [path.posix.join(directoryPath, `**${extensionGlob ? `/*${extensionGlob}` : ""}`)];
16498
16370
  };
16499
- const directoryToGlob = async (directoryPaths, { cwd = process$1.cwd(), files, extensions, fs: fsImplementation } = {}) => {
16371
+ const directoryToGlob = async (directoryPaths, { cwd = y.cwd(), files, extensions, fs: fsImplementation } = {}) => {
16500
16372
  return (await Promise.all(directoryPaths.map(async (directoryPath) => {
16501
16373
  if (shouldExpandGlobstarDirectory(isNegativePattern(directoryPath) ? directoryPath.slice(1) : directoryPath)) return getDirectoryGlob({
16502
16374
  directoryPath,
@@ -16510,7 +16382,7 @@ const directoryToGlob = async (directoryPaths, { cwd = process$1.cwd(), files, e
16510
16382
  }) : directoryPath;
16511
16383
  }))).flat();
16512
16384
  };
16513
- const directoryToGlobSync = (directoryPaths, { cwd = process$1.cwd(), files, extensions, fs: fsImplementation } = {}) => directoryPaths.flatMap((directoryPath) => {
16385
+ const directoryToGlobSync = (directoryPaths, { cwd = y.cwd(), files, extensions, fs: fsImplementation } = {}) => directoryPaths.flatMap((directoryPath) => {
16514
16386
  if (shouldExpandGlobstarDirectory(isNegativePattern(directoryPath) ? directoryPath.slice(1) : directoryPath)) return getDirectoryGlob({
16515
16387
  directoryPath,
16516
16388
  files,
@@ -16606,7 +16478,7 @@ const applyIgnoreFilesAndGetFilterSync = (options) => {
16606
16478
  };
16607
16479
  const createFilterFunction = (isIgnored, cwd) => {
16608
16480
  const seen = /* @__PURE__ */ new Set();
16609
- const basePath = cwd || process$1.cwd();
16481
+ const basePath = cwd || y.cwd();
16610
16482
  const pathCache = /* @__PURE__ */ new Map();
16611
16483
  return (fastGlobResult) => {
16612
16484
  const pathKey$1 = path.normalize(fastGlobResult.path ?? fastGlobResult);
@@ -16863,7 +16735,9 @@ const SyncEntitiesResponseSchema = object({
16863
16735
  //#region src/core/resources/entity/config.ts
16864
16736
  async function readEntityFile(entityPath) {
16865
16737
  const parsed = await readJsonFile(entityPath);
16866
- return EntitySchema.parse(parsed);
16738
+ const result = EntitySchema.safeParse(parsed);
16739
+ if (!result.success) throw new Error(`Invalid entity in ${entityPath}: ${result.error.message}`);
16740
+ return result.data;
16867
16741
  }
16868
16742
  async function readAllEntities(entitiesDir) {
16869
16743
  if (!await pathExists(entitiesDir)) return [];
@@ -16911,14 +16785,23 @@ const entityResource = {
16911
16785
 
16912
16786
  //#endregion
16913
16787
  //#region src/core/resources/function/schema.ts
16788
+ const FunctionNameSchema = string().trim().min(1, "Function name cannot be empty").regex(/^[^.]+$/, "Function name cannot contain dots");
16789
+ const FunctionFileSchema = object({
16790
+ path: string().min(1),
16791
+ content: string()
16792
+ });
16914
16793
  const FunctionConfigSchema = object({
16915
- name: string().min(1, "Function name cannot be empty").refine((name$1) => !name$1.includes("."), "Function name cannot contain dots"),
16916
- entry: string().min(1, "Entry point cannot be empty"),
16917
- triggers: tuple([]).optional()
16794
+ name: FunctionNameSchema,
16795
+ entry: string().min(1, "Entry point cannot be empty")
16918
16796
  });
16919
16797
  const FunctionSchema = FunctionConfigSchema.extend({
16920
16798
  entryPath: string().min(1, "Entry path cannot be empty"),
16921
- files: array(string()).min(1, "Files array cannot be empty")
16799
+ files: array(string()).min(1, "Function must have at least one file")
16800
+ });
16801
+ const FunctionDeploySchema = object({
16802
+ name: FunctionNameSchema,
16803
+ entry: string().min(1),
16804
+ files: array(FunctionFileSchema).min(1, "Function must have at least one file")
16922
16805
  });
16923
16806
  const DeployFunctionsResponseSchema = object({
16924
16807
  deployed: array(string()),
@@ -17022,7 +16905,28 @@ const functionResource = {
17022
16905
 
17023
16906
  //#endregion
17024
16907
  //#region src/core/resources/agent/schema.ts
17025
- const AgentConfigSchema = looseObject({ name: string().regex(/^[a-z0-9_]+$/, "Agent name must be lowercase alphanumeric with underscores").min(1).max(100) });
16908
+ const EntityOperationSchema = _enum([
16909
+ "create",
16910
+ "update",
16911
+ "delete",
16912
+ "read"
16913
+ ]);
16914
+ const EntityToolConfigSchema = object({
16915
+ entity_name: string().min(1),
16916
+ allowed_operations: array(EntityOperationSchema)
16917
+ });
16918
+ const BackendFunctionToolConfigSchema = object({
16919
+ function_name: string().min(1),
16920
+ description: string().default("agent backend function")
16921
+ });
16922
+ const ToolConfigSchema = union([EntityToolConfigSchema, BackendFunctionToolConfigSchema]);
16923
+ const AgentConfigSchema = looseObject({
16924
+ name: string().regex(/^[a-z0-9_]+$/, "Agent name must be lowercase alphanumeric with underscores").min(1).max(100),
16925
+ description: string().trim().min(1, "Description is required"),
16926
+ instructions: string().trim().min(1, "Instructions are required"),
16927
+ tool_configs: array(ToolConfigSchema).optional().default([]),
16928
+ whatsapp_greeting: string().nullable().optional()
16929
+ });
17026
16930
  const SyncAgentsResponseSchema = object({
17027
16931
  created: array(string()),
17028
16932
  updated: array(string()),
@@ -17038,7 +16942,9 @@ const ListAgentsResponseSchema = object({
17038
16942
  //#region src/core/resources/agent/config.ts
17039
16943
  async function readAgentFile(agentPath) {
17040
16944
  const parsed = await readJsonFile(agentPath);
17041
- return AgentConfigSchema.parse(parsed);
16945
+ const result = AgentConfigSchema.safeParse(parsed);
16946
+ if (!result.success) throw new Error(`Invalid agent config in ${agentPath}: ${result.error.message}`);
16947
+ return result.data;
17042
16948
  }
17043
16949
  async function readAllAgents(agentsDir) {
17044
16950
  if (!await pathExists(agentsDir)) return [];
@@ -31239,13 +31145,13 @@ var ansi_styles_default = ansiStyles;
31239
31145
 
31240
31146
  //#endregion
31241
31147
  //#region node_modules/chalk/source/vendor/supports-color/index.js
31242
- function hasFlag(flag, argv = globalThis.Deno ? globalThis.Deno.args : process$1.argv) {
31148
+ function hasFlag(flag, argv = globalThis.Deno ? globalThis.Deno.args : y.argv) {
31243
31149
  const prefix = flag.startsWith("-") ? "" : flag.length === 1 ? "-" : "--";
31244
31150
  const position = argv.indexOf(prefix + flag);
31245
31151
  const terminatorPosition = argv.indexOf("--");
31246
31152
  return position !== -1 && (terminatorPosition === -1 || position < terminatorPosition);
31247
31153
  }
31248
- const { env } = process$1;
31154
+ const { env } = y;
31249
31155
  let flagForceColor;
31250
31156
  if (hasFlag("no-color") || hasFlag("no-colors") || hasFlag("color=false") || hasFlag("color=never")) flagForceColor = 0;
31251
31157
  else if (hasFlag("color") || hasFlag("colors") || hasFlag("color=true") || hasFlag("color=always")) flagForceColor = 1;
@@ -31278,7 +31184,7 @@ function _supportsColor(haveStream, { streamIsTTY, sniffFlags = true } = {}) {
31278
31184
  if (haveStream && !streamIsTTY && forceColor === void 0) return 0;
31279
31185
  const min = forceColor || 0;
31280
31186
  if (env.TERM === "dumb") return min;
31281
- if (process$1.platform === "win32") {
31187
+ if (y.platform === "win32") {
31282
31188
  const osRelease = os.release().split(".");
31283
31189
  if (Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) return Number(osRelease[2]) >= 14931 ? 3 : 2;
31284
31190
  return 1;
@@ -32069,9 +31975,9 @@ const getSubprocessResult = ({ stdout: stdout$1 }) => {
32069
31975
  //#region node_modules/execa/lib/utils/standard-stream.js
32070
31976
  const isStandardStream = (stream) => STANDARD_STREAMS.includes(stream);
32071
31977
  const STANDARD_STREAMS = [
32072
- process$1.stdin,
32073
- process$1.stdout,
32074
- process$1.stderr
31978
+ y.stdin,
31979
+ y.stdout,
31980
+ y.stderr
32075
31981
  ];
32076
31982
  const STANDARD_STREAMS_ALIASES = [
32077
31983
  "stdin",
@@ -32196,9 +32102,9 @@ const NO_ESCAPE_REGEXP = /^[\w./-]+$/;
32196
32102
  //#endregion
32197
32103
  //#region node_modules/is-unicode-supported/index.js
32198
32104
  function isUnicodeSupported() {
32199
- const { env: env$1 } = process$1;
32105
+ const { env: env$1 } = y;
32200
32106
  const { TERM, TERM_PROGRAM } = env$1;
32201
- if (process$1.platform !== "win32") return TERM !== "linux";
32107
+ if (y.platform !== "win32") return TERM !== "linux";
32202
32108
  return Boolean(env$1.WT_SESSION) || Boolean(env$1.TERMINUS_SUBLIME) || env$1.ConEmuTask === "{cmd::Cmder}" || TERM_PROGRAM === "Terminus-Sublime" || TERM_PROGRAM === "vscode" || TERM === "xterm-256color" || TERM === "alacritty" || TERM === "rxvt-unicode" || TERM === "rxvt-unicode-256color" || env$1.TERMINAL_EMULATOR === "JetBrains-JediTerm";
32203
32109
  }
32204
32110
 
@@ -33125,7 +33031,7 @@ const TEN_MEGABYTES_IN_BYTES = 10 * 1024 * 1024;
33125
33031
 
33126
33032
  //#endregion
33127
33033
  //#region node_modules/npm-run-path/index.js
33128
- const npmRunPath = ({ cwd = process$1.cwd(), path: pathOption = process$1.env[pathKey()], preferLocal = true, execPath: execPath$1 = process$1.execPath, addExecPath = true } = {}) => {
33034
+ const npmRunPath = ({ cwd = y.cwd(), path: pathOption = y.env[pathKey()], preferLocal = true, execPath: execPath$1 = y.execPath, addExecPath = true } = {}) => {
33129
33035
  const cwdPath = path.resolve(toPath(cwd));
33130
33036
  const result = [];
33131
33037
  const pathParts = pathOption.split(path.delimiter);
@@ -33143,7 +33049,7 @@ const applyExecPath = (result, pathParts, execPath$1, cwdPath) => {
33143
33049
  const pathPart = path.resolve(cwdPath, toPath(execPath$1), "..");
33144
33050
  if (!pathParts.includes(pathPart)) result.push(pathPart);
33145
33051
  };
33146
- const npmRunPathEnv = ({ env: env$1 = process$1.env, ...options } = {}) => {
33052
+ const npmRunPathEnv = ({ env: env$1 = y.env, ...options } = {}) => {
33147
33053
  env$1 = { ...env$1 };
33148
33054
  const pathName = pathKey({ env: env$1 });
33149
33055
  options.path = env$1[pathName];
@@ -34278,7 +34184,7 @@ const normalizeCwd = (cwd = getDefaultCwd()) => {
34278
34184
  };
34279
34185
  const getDefaultCwd = () => {
34280
34186
  try {
34281
- return process$1.cwd();
34187
+ return y.cwd();
34282
34188
  } catch (error) {
34283
34189
  error.message = `The current directory does not exist.\n${error.message}`;
34284
34190
  throw error;
@@ -34313,7 +34219,7 @@ const normalizeOptions = (filePath, rawArguments, rawOptions) => {
34313
34219
  options.killSignal = normalizeKillSignal(options.killSignal);
34314
34220
  options.forceKillAfterDelay = normalizeForceKillAfterDelay(options.forceKillAfterDelay);
34315
34221
  options.lines = options.lines.map((lines, fdNumber) => lines && !BINARY_ENCODINGS.has(options.encoding) && options.buffer[fdNumber]);
34316
- if (process$1.platform === "win32" && path.basename(file, ".exe") === "cmd") commandArguments.unshift("/q");
34222
+ if (y.platform === "win32" && path.basename(file, ".exe") === "cmd") commandArguments.unshift("/q");
34317
34223
  return {
34318
34224
  file,
34319
34225
  commandArguments,
@@ -34340,7 +34246,7 @@ const addDefaultOptions = ({ extendEnv = true, preferLocal = false, cwd, localDi
34340
34246
  });
34341
34247
  const getEnv = ({ env: envOption, extendEnv, preferLocal, node, localDirectory, nodePath }) => {
34342
34248
  const env$1 = extendEnv ? {
34343
- ...process$1.env,
34249
+ ...y.env,
34344
34250
  ...envOption
34345
34251
  } : envOption;
34346
34252
  if (preferLocal || node) return npmRunPathEnv({
@@ -35340,12 +35246,12 @@ const guessStreamDirection = {
35340
35246
  }
35341
35247
  };
35342
35248
  const getStandardStreamDirection = (value) => {
35343
- if ([0, process$1.stdin].includes(value)) return "input";
35249
+ if ([0, y.stdin].includes(value)) return "input";
35344
35250
  if ([
35345
35251
  1,
35346
35252
  2,
35347
- process$1.stdout,
35348
- process$1.stderr
35253
+ y.stdout,
35254
+ y.stderr
35349
35255
  ].includes(value)) return "output";
35350
35256
  };
35351
35257
  const DEFAULT_DIRECTION = "output";
@@ -36409,9 +36315,9 @@ const addIpcMethods = (subprocess, { ipc }) => {
36409
36315
  Object.assign(subprocess, getIpcMethods(subprocess, false, ipc));
36410
36316
  };
36411
36317
  const getIpcExport = () => {
36412
- const anyProcess = process$1;
36318
+ const anyProcess = y;
36413
36319
  const isSubprocess = true;
36414
- const ipc = process$1.channel !== void 0;
36320
+ const ipc = y.channel !== void 0;
36415
36321
  return {
36416
36322
  ...getIpcMethods(anyProcess, isSubprocess, ipc),
36417
36323
  getCancelSignal: getCancelSignal$1.bind(void 0, {
@@ -36653,7 +36559,7 @@ if (process.platform === "linux") signals.push("SIGIO", "SIGPOLL", "SIGPWR", "SI
36653
36559
 
36654
36560
  //#endregion
36655
36561
  //#region node_modules/signal-exit/dist/mjs/index.js
36656
- const processOk = (process$5) => !!process$5 && typeof process$5 === "object" && typeof process$5.removeListener === "function" && typeof process$5.emit === "function" && typeof process$5.reallyExit === "function" && typeof process$5.listeners === "function" && typeof process$5.kill === "function" && typeof process$5.pid === "number" && typeof process$5.on === "function";
36562
+ const processOk = (process$4) => !!process$4 && typeof process$4 === "object" && typeof process$4.removeListener === "function" && typeof process$4.emit === "function" && typeof process$4.reallyExit === "function" && typeof process$4.listeners === "function" && typeof process$4.kill === "function" && typeof process$4.pid === "number" && typeof process$4.on === "function";
36657
36563
  const kExitEmitter = Symbol.for("signal-exit emitter");
36658
36564
  const global$1 = globalThis;
36659
36565
  const ObjectDefineProperty = Object.defineProperty.bind(Object);
@@ -36721,7 +36627,7 @@ var SignalExitFallback = class extends SignalExitBase {
36721
36627
  };
36722
36628
  var SignalExit = class extends SignalExitBase {
36723
36629
  /* c8 ignore start */
36724
- #hupSig = process$2.platform === "win32" ? "SIGINT" : "SIGHUP";
36630
+ #hupSig = process$1.platform === "win32" ? "SIGINT" : "SIGHUP";
36725
36631
  /* c8 ignore stop */
36726
36632
  #emitter = new Emitter();
36727
36633
  #process;
@@ -36729,15 +36635,15 @@ var SignalExit = class extends SignalExitBase {
36729
36635
  #originalProcessReallyExit;
36730
36636
  #sigListeners = {};
36731
36637
  #loaded = false;
36732
- constructor(process$5) {
36638
+ constructor(process$4) {
36733
36639
  super();
36734
- this.#process = process$5;
36640
+ this.#process = process$4;
36735
36641
  this.#sigListeners = {};
36736
36642
  for (const sig of signals) this.#sigListeners[sig] = () => {
36737
36643
  const listeners = this.#process.listeners(sig);
36738
36644
  let { count: count$1 } = this.#emitter;
36739
36645
  /* c8 ignore start */
36740
- const p$1 = process$5;
36646
+ const p$1 = process$4;
36741
36647
  if (typeof p$1.__signal_exit_emitter__ === "object" && typeof p$1.__signal_exit_emitter__.count === "number") count$1 += p$1.__signal_exit_emitter__.count;
36742
36648
  /* c8 ignore stop */
36743
36649
  if (listeners.length === count$1) {
@@ -36745,11 +36651,11 @@ var SignalExit = class extends SignalExitBase {
36745
36651
  const ret = this.#emitter.emit("exit", null, sig);
36746
36652
  /* c8 ignore start */
36747
36653
  const s = sig === "SIGHUP" ? this.#hupSig : sig;
36748
- if (!ret) process$5.kill(process$5.pid, s);
36654
+ if (!ret) process$4.kill(process$4.pid, s);
36749
36655
  }
36750
36656
  };
36751
- this.#originalProcessReallyExit = process$5.reallyExit;
36752
- this.#originalProcessEmit = process$5.emit;
36657
+ this.#originalProcessReallyExit = process$4.reallyExit;
36658
+ this.#originalProcessEmit = process$4.emit;
36753
36659
  }
36754
36660
  onExit(cb, opts) {
36755
36661
  /* c8 ignore start */
@@ -36816,8 +36722,8 @@ var SignalExit = class extends SignalExitBase {
36816
36722
  } else return og.call(this.#process, ev, ...args);
36817
36723
  }
36818
36724
  };
36819
- const process$2 = globalThis.process;
36820
- const { onExit, load, unload } = signalExitWrap(processOk(process$2) ? new SignalExit(process$2) : new SignalExitFallback());
36725
+ const process$1 = globalThis.process;
36726
+ const { onExit, load, unload } = signalExitWrap(processOk(process$1) ? new SignalExit(process$1) : new SignalExitFallback());
36821
36727
 
36822
36728
  //#endregion
36823
36729
  //#region node_modules/execa/lib/terminate/cleanup.js
@@ -38771,7 +38677,7 @@ function isInsideContainer() {
38771
38677
  //#endregion
38772
38678
  //#region node_modules/is-wsl/index.js
38773
38679
  const isWsl = () => {
38774
- if (process$1.platform !== "linux") return false;
38680
+ if (y.platform !== "linux") return false;
38775
38681
  if (os.release().toLowerCase().includes("microsoft")) {
38776
38682
  if (isInsideContainer()) return false;
38777
38683
  return true;
@@ -38782,12 +38688,12 @@ const isWsl = () => {
38782
38688
  return false;
38783
38689
  }
38784
38690
  };
38785
- var is_wsl_default = process$1.env.__IS_WSL_TEST__ ? isWsl : isWsl();
38691
+ var is_wsl_default = y.env.__IS_WSL_TEST__ ? isWsl : isWsl();
38786
38692
 
38787
38693
  //#endregion
38788
38694
  //#region node_modules/powershell-utils/index.js
38789
38695
  const execFile$2 = promisify(childProcess.execFile);
38790
- const powerShellPath$1 = () => `${process$1.env.SYSTEMROOT || process$1.env.windir || String.raw`C:\Windows`}\\System32\\WindowsPowerShell\\v1.0\\powershell.exe`;
38696
+ const powerShellPath$1 = () => `${y.env.SYSTEMROOT || y.env.windir || String.raw`C:\Windows`}\\System32\\WindowsPowerShell\\v1.0\\powershell.exe`;
38791
38697
  const executePowerShell = async (command, options = {}) => {
38792
38698
  const { powerShellPath: psPath, ...execFileOptions } = options;
38793
38699
  const encodedCommand = executePowerShell.encodeCommand(command);
@@ -38898,7 +38804,7 @@ function defineLazyProperty(object$1, propertyName, valueGetter) {
38898
38804
  //#region node_modules/default-browser-id/index.js
38899
38805
  const execFileAsync$3 = promisify(execFile);
38900
38806
  async function defaultBrowserId() {
38901
- if (process$1.platform !== "darwin") throw new Error("macOS only");
38807
+ if (y.platform !== "darwin") throw new Error("macOS only");
38902
38808
  const { stdout: stdout$1 } = await execFileAsync$3("defaults", [
38903
38809
  "read",
38904
38810
  "com.apple.LaunchServices/com.apple.launchservices.secure",
@@ -38913,7 +38819,7 @@ async function defaultBrowserId() {
38913
38819
  //#region node_modules/run-applescript/index.js
38914
38820
  const execFileAsync$2 = promisify(execFile);
38915
38821
  async function runAppleScript(script, { humanReadableOutput = true, signal } = {}) {
38916
- if (process$1.platform !== "darwin") throw new Error("macOS only");
38822
+ if (y.platform !== "darwin") throw new Error("macOS only");
38917
38823
  const outputArguments = humanReadableOutput ? [] : ["-ss"];
38918
38824
  const execOptions = {};
38919
38825
  if (signal) execOptions.signal = signal;
@@ -39022,14 +38928,14 @@ async function defaultBrowser$1(_execFileAsync = execFileAsync$1) {
39022
38928
  const execFileAsync = promisify(execFile);
39023
38929
  const titleize = (string$2) => string$2.toLowerCase().replaceAll(/(?:^|\s|-)\S/g, (x$2) => x$2.toUpperCase());
39024
38930
  async function defaultBrowser() {
39025
- if (process$1.platform === "darwin") {
38931
+ if (y.platform === "darwin") {
39026
38932
  const id = await defaultBrowserId();
39027
38933
  return {
39028
38934
  name: await bundleName(id),
39029
38935
  id
39030
38936
  };
39031
38937
  }
39032
- if (process$1.platform === "linux") {
38938
+ if (y.platform === "linux") {
39033
38939
  const { stdout: stdout$1 } = await execFileAsync("xdg-mime", [
39034
38940
  "query",
39035
38941
  "default",
@@ -39041,13 +38947,13 @@ async function defaultBrowser() {
39041
38947
  id
39042
38948
  };
39043
38949
  }
39044
- if (process$1.platform === "win32") return defaultBrowser$1();
38950
+ if (y.platform === "win32") return defaultBrowser$1();
39045
38951
  throw new Error("Only macOS, Linux, and Windows are supported");
39046
38952
  }
39047
38953
 
39048
38954
  //#endregion
39049
38955
  //#region node_modules/is-in-ssh/index.js
39050
- const isInSsh = Boolean(process$1.env.SSH_CONNECTION || process$1.env.SSH_CLIENT || process$1.env.SSH_TTY);
38956
+ const isInSsh = Boolean(y.env.SSH_CONNECTION || y.env.SSH_CLIENT || y.env.SSH_TTY);
39051
38957
  var is_in_ssh_default = isInSsh;
39052
38958
 
39053
38959
  //#endregion
@@ -39055,7 +38961,7 @@ var is_in_ssh_default = isInSsh;
39055
38961
  const fallbackAttemptSymbol = Symbol("fallbackAttempt");
39056
38962
  const __dirname = import.meta.url ? path.dirname(fileURLToPath(import.meta.url)) : "";
39057
38963
  const localXdgOpenPath = path.join(__dirname, "xdg-open");
39058
- const { platform: platform$1, arch } = process$1;
38964
+ const { platform: platform$1, arch } = y;
39059
38965
  const tryEachApp = async (apps$1, opener) => {
39060
38966
  if (apps$1.length === 0) return;
39061
38967
  const errors = [];
@@ -39168,7 +39074,7 @@ const baseOpen = async (options) => {
39168
39074
  await fs$1.access(localXdgOpenPath, constants$1.X_OK);
39169
39075
  exeLocalXdgOpen = true;
39170
39076
  } catch {}
39171
- command = process$1.versions.electron ?? (platform$1 === "android" || isBundled || !exeLocalXdgOpen) ? "xdg-open" : localXdgOpenPath;
39077
+ command = y.versions.electron ?? (platform$1 === "android" || isBundled || !exeLocalXdgOpen) ? "xdg-open" : localXdgOpenPath;
39172
39078
  }
39173
39079
  if (appArguments.length > 0) cliArguments.push(...appArguments);
39174
39080
  if (!options.wait) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@base44-preview/cli",
3
- "version": "0.0.25-pr.151.60c93cc",
3
+ "version": "0.0.25-pr.151.94c529c",
4
4
  "description": "Base44 CLI - Unified interface for managing Base44 applications",
5
5
  "type": "module",
6
6
  "bin": {