@base44-preview/cli 0.0.25-pr.151.1ef8126 → 0.0.25-pr.151.924f8b5

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 +229 -133
  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,6 +5747,77 @@ 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
+ }
5750
5821
  const $ZodRecord = /* @__PURE__ */ $constructor("$ZodRecord", (inst, def) => {
5751
5822
  $ZodType.init(inst, def);
5752
5823
  inst._zod.parse = (payload, ctx) => {
@@ -6691,7 +6762,7 @@ function initializeContext(params) {
6691
6762
  external: params?.external ?? void 0
6692
6763
  };
6693
6764
  }
6694
- function process$3(schema, ctx, _params = {
6765
+ function process$2(schema, ctx, _params = {
6695
6766
  path: [],
6696
6767
  schemaPath: []
6697
6768
  }) {
@@ -6728,7 +6799,7 @@ function process$3(schema, ctx, _params = {
6728
6799
  const parent = schema._zod.parent;
6729
6800
  if (parent) {
6730
6801
  if (!result.ref) result.ref = parent;
6731
- process$3(parent, ctx, params);
6802
+ process$2(parent, ctx, params);
6732
6803
  ctx.seen.get(parent).isParent = true;
6733
6804
  }
6734
6805
  }
@@ -6940,7 +7011,7 @@ const createToJSONSchemaMethod = (schema, processors = {}) => (params) => {
6940
7011
  ...params,
6941
7012
  processors
6942
7013
  });
6943
- process$3(schema, ctx);
7014
+ process$2(schema, ctx);
6944
7015
  extractDefs(ctx, schema);
6945
7016
  return finalize(ctx, schema);
6946
7017
  };
@@ -6952,7 +7023,7 @@ const createStandardJSONSchemaMethod = (schema, io, processors = {}) => (params)
6952
7023
  io,
6953
7024
  processors
6954
7025
  });
6955
- process$3(schema, ctx);
7026
+ process$2(schema, ctx);
6956
7027
  extractDefs(ctx, schema);
6957
7028
  return finalize(ctx, schema);
6958
7029
  };
@@ -7060,7 +7131,7 @@ const arrayProcessor = (schema, ctx, _json, params) => {
7060
7131
  if (typeof minimum === "number") json.minItems = minimum;
7061
7132
  if (typeof maximum === "number") json.maxItems = maximum;
7062
7133
  json.type = "array";
7063
- json.items = process$3(def.element, ctx, {
7134
+ json.items = process$2(def.element, ctx, {
7064
7135
  ...params,
7065
7136
  path: [...params.path, "items"]
7066
7137
  });
@@ -7071,7 +7142,7 @@ const objectProcessor = (schema, ctx, _json, params) => {
7071
7142
  json.type = "object";
7072
7143
  json.properties = {};
7073
7144
  const shape = def.shape;
7074
- for (const key in shape) json.properties[key] = process$3(shape[key], ctx, {
7145
+ for (const key in shape) json.properties[key] = process$2(shape[key], ctx, {
7075
7146
  ...params,
7076
7147
  path: [
7077
7148
  ...params.path,
@@ -7089,7 +7160,7 @@ const objectProcessor = (schema, ctx, _json, params) => {
7089
7160
  if (def.catchall?._zod.def.type === "never") json.additionalProperties = false;
7090
7161
  else if (!def.catchall) {
7091
7162
  if (ctx.io === "output") json.additionalProperties = false;
7092
- } else if (def.catchall) json.additionalProperties = process$3(def.catchall, ctx, {
7163
+ } else if (def.catchall) json.additionalProperties = process$2(def.catchall, ctx, {
7093
7164
  ...params,
7094
7165
  path: [...params.path, "additionalProperties"]
7095
7166
  });
@@ -7097,7 +7168,7 @@ const objectProcessor = (schema, ctx, _json, params) => {
7097
7168
  const unionProcessor = (schema, ctx, json, params) => {
7098
7169
  const def = schema._zod.def;
7099
7170
  const isExclusive = def.inclusive === false;
7100
- const options = def.options.map((x$2, i$1) => process$3(x$2, ctx, {
7171
+ const options = def.options.map((x$2, i$1) => process$2(x$2, ctx, {
7101
7172
  ...params,
7102
7173
  path: [
7103
7174
  ...params.path,
@@ -7110,7 +7181,7 @@ const unionProcessor = (schema, ctx, json, params) => {
7110
7181
  };
7111
7182
  const intersectionProcessor = (schema, ctx, json, params) => {
7112
7183
  const def = schema._zod.def;
7113
- const a$1 = process$3(def.left, ctx, {
7184
+ const a$1 = process$2(def.left, ctx, {
7114
7185
  ...params,
7115
7186
  path: [
7116
7187
  ...params.path,
@@ -7118,7 +7189,7 @@ const intersectionProcessor = (schema, ctx, json, params) => {
7118
7189
  0
7119
7190
  ]
7120
7191
  });
7121
- const b$2 = process$3(def.right, ctx, {
7192
+ const b$2 = process$2(def.right, ctx, {
7122
7193
  ...params,
7123
7194
  path: [
7124
7195
  ...params.path,
@@ -7129,6 +7200,44 @@ const intersectionProcessor = (schema, ctx, json, params) => {
7129
7200
  const isSimpleIntersection = (val) => "allOf" in val && Object.keys(val).length === 1;
7130
7201
  json.allOf = [...isSimpleIntersection(a$1) ? a$1.allOf : [a$1], ...isSimpleIntersection(b$2) ? b$2.allOf : [b$2]];
7131
7202
  };
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$2(x$2, ctx, {
7210
+ ...params,
7211
+ path: [
7212
+ ...params.path,
7213
+ prefixPath$1,
7214
+ i$1
7215
+ ]
7216
+ }));
7217
+ const rest = def.rest ? process$2(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
+ };
7132
7241
  const recordProcessor = (schema, ctx, _json, params) => {
7133
7242
  const json = _json;
7134
7243
  const def = schema._zod.def;
@@ -7136,7 +7245,7 @@ const recordProcessor = (schema, ctx, _json, params) => {
7136
7245
  const keyType = def.keyType;
7137
7246
  const patterns = keyType._zod.bag?.patterns;
7138
7247
  if (def.mode === "loose" && patterns && patterns.size > 0) {
7139
- const valueSchema = process$3(def.valueType, ctx, {
7248
+ const valueSchema = process$2(def.valueType, ctx, {
7140
7249
  ...params,
7141
7250
  path: [
7142
7251
  ...params.path,
@@ -7147,11 +7256,11 @@ const recordProcessor = (schema, ctx, _json, params) => {
7147
7256
  json.patternProperties = {};
7148
7257
  for (const pattern of patterns) json.patternProperties[pattern.source] = valueSchema;
7149
7258
  } else {
7150
- if (ctx.target === "draft-07" || ctx.target === "draft-2020-12") json.propertyNames = process$3(def.keyType, ctx, {
7259
+ if (ctx.target === "draft-07" || ctx.target === "draft-2020-12") json.propertyNames = process$2(def.keyType, ctx, {
7151
7260
  ...params,
7152
7261
  path: [...params.path, "propertyNames"]
7153
7262
  });
7154
- json.additionalProperties = process$3(def.valueType, ctx, {
7263
+ json.additionalProperties = process$2(def.valueType, ctx, {
7155
7264
  ...params,
7156
7265
  path: [...params.path, "additionalProperties"]
7157
7266
  });
@@ -7164,7 +7273,7 @@ const recordProcessor = (schema, ctx, _json, params) => {
7164
7273
  };
7165
7274
  const nullableProcessor = (schema, ctx, json, params) => {
7166
7275
  const def = schema._zod.def;
7167
- const inner = process$3(def.innerType, ctx, params);
7276
+ const inner = process$2(def.innerType, ctx, params);
7168
7277
  const seen = ctx.seen.get(schema);
7169
7278
  if (ctx.target === "openapi-3.0") {
7170
7279
  seen.ref = def.innerType;
@@ -7173,27 +7282,27 @@ const nullableProcessor = (schema, ctx, json, params) => {
7173
7282
  };
7174
7283
  const nonoptionalProcessor = (schema, ctx, _json, params) => {
7175
7284
  const def = schema._zod.def;
7176
- process$3(def.innerType, ctx, params);
7285
+ process$2(def.innerType, ctx, params);
7177
7286
  const seen = ctx.seen.get(schema);
7178
7287
  seen.ref = def.innerType;
7179
7288
  };
7180
7289
  const defaultProcessor = (schema, ctx, json, params) => {
7181
7290
  const def = schema._zod.def;
7182
- process$3(def.innerType, ctx, params);
7291
+ process$2(def.innerType, ctx, params);
7183
7292
  const seen = ctx.seen.get(schema);
7184
7293
  seen.ref = def.innerType;
7185
7294
  json.default = JSON.parse(JSON.stringify(def.defaultValue));
7186
7295
  };
7187
7296
  const prefaultProcessor = (schema, ctx, json, params) => {
7188
7297
  const def = schema._zod.def;
7189
- process$3(def.innerType, ctx, params);
7298
+ process$2(def.innerType, ctx, params);
7190
7299
  const seen = ctx.seen.get(schema);
7191
7300
  seen.ref = def.innerType;
7192
7301
  if (ctx.io === "input") json._prefault = JSON.parse(JSON.stringify(def.defaultValue));
7193
7302
  };
7194
7303
  const catchProcessor = (schema, ctx, json, params) => {
7195
7304
  const def = schema._zod.def;
7196
- process$3(def.innerType, ctx, params);
7305
+ process$2(def.innerType, ctx, params);
7197
7306
  const seen = ctx.seen.get(schema);
7198
7307
  seen.ref = def.innerType;
7199
7308
  let catchValue;
@@ -7207,20 +7316,20 @@ const catchProcessor = (schema, ctx, json, params) => {
7207
7316
  const pipeProcessor = (schema, ctx, _json, params) => {
7208
7317
  const def = schema._zod.def;
7209
7318
  const innerType = ctx.io === "input" ? def.in._zod.def.type === "transform" ? def.out : def.in : def.out;
7210
- process$3(innerType, ctx, params);
7319
+ process$2(innerType, ctx, params);
7211
7320
  const seen = ctx.seen.get(schema);
7212
7321
  seen.ref = innerType;
7213
7322
  };
7214
7323
  const readonlyProcessor = (schema, ctx, json, params) => {
7215
7324
  const def = schema._zod.def;
7216
- process$3(def.innerType, ctx, params);
7325
+ process$2(def.innerType, ctx, params);
7217
7326
  const seen = ctx.seen.get(schema);
7218
7327
  seen.ref = def.innerType;
7219
7328
  json.readOnly = true;
7220
7329
  };
7221
7330
  const optionalProcessor = (schema, ctx, _json, params) => {
7222
7331
  const def = schema._zod.def;
7223
- process$3(def.innerType, ctx, params);
7332
+ process$2(def.innerType, ctx, params);
7224
7333
  const seen = ctx.seen.get(schema);
7225
7334
  seen.ref = def.innerType;
7226
7335
  };
@@ -7680,6 +7789,25 @@ function intersection(left, right) {
7680
7789
  right
7681
7790
  });
7682
7791
  }
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
+ }
7683
7811
  const ZodRecord = /* @__PURE__ */ $constructor("ZodRecord", (inst, def) => {
7684
7812
  $ZodRecord.init(inst, def);
7685
7813
  ZodType.init(inst, def);
@@ -16271,7 +16399,7 @@ const createIgnorePredicate = (patterns, cwd, baseDir) => {
16271
16399
  };
16272
16400
  const normalizeOptions$2 = (options = {}) => {
16273
16401
  const ignoreOption = options.ignore ? Array.isArray(options.ignore) ? options.ignore : [options.ignore] : [];
16274
- const cwd = toPath$1(options.cwd) ?? process$1.cwd();
16402
+ const cwd = toPath$1(options.cwd) ?? y.cwd();
16275
16403
  const deep = typeof options.deep === "number" ? Math.max(0, options.deep) + 1 : Number.POSITIVE_INFINITY;
16276
16404
  return {
16277
16405
  cwd,
@@ -16368,7 +16496,7 @@ const getDirectoryGlob = ({ directoryPath, files, extensions }) => {
16368
16496
  const extensionGlob = extensions?.length > 0 ? `.${extensions.length > 1 ? `{${extensions.join(",")}}` : extensions[0]}` : "";
16369
16497
  return files ? files.map((file) => path.posix.join(directoryPath, `**/${path.extname(file) ? file : `${file}${extensionGlob}`}`)) : [path.posix.join(directoryPath, `**${extensionGlob ? `/*${extensionGlob}` : ""}`)];
16370
16498
  };
16371
- const directoryToGlob = async (directoryPaths, { cwd = process$1.cwd(), files, extensions, fs: fsImplementation } = {}) => {
16499
+ const directoryToGlob = async (directoryPaths, { cwd = y.cwd(), files, extensions, fs: fsImplementation } = {}) => {
16372
16500
  return (await Promise.all(directoryPaths.map(async (directoryPath) => {
16373
16501
  if (shouldExpandGlobstarDirectory(isNegativePattern(directoryPath) ? directoryPath.slice(1) : directoryPath)) return getDirectoryGlob({
16374
16502
  directoryPath,
@@ -16382,7 +16510,7 @@ const directoryToGlob = async (directoryPaths, { cwd = process$1.cwd(), files, e
16382
16510
  }) : directoryPath;
16383
16511
  }))).flat();
16384
16512
  };
16385
- const directoryToGlobSync = (directoryPaths, { cwd = process$1.cwd(), files, extensions, fs: fsImplementation } = {}) => directoryPaths.flatMap((directoryPath) => {
16513
+ const directoryToGlobSync = (directoryPaths, { cwd = y.cwd(), files, extensions, fs: fsImplementation } = {}) => directoryPaths.flatMap((directoryPath) => {
16386
16514
  if (shouldExpandGlobstarDirectory(isNegativePattern(directoryPath) ? directoryPath.slice(1) : directoryPath)) return getDirectoryGlob({
16387
16515
  directoryPath,
16388
16516
  files,
@@ -16478,7 +16606,7 @@ const applyIgnoreFilesAndGetFilterSync = (options) => {
16478
16606
  };
16479
16607
  const createFilterFunction = (isIgnored, cwd) => {
16480
16608
  const seen = /* @__PURE__ */ new Set();
16481
- const basePath = cwd || process$1.cwd();
16609
+ const basePath = cwd || y.cwd();
16482
16610
  const pathCache = /* @__PURE__ */ new Map();
16483
16611
  return (fastGlobResult) => {
16484
16612
  const pathKey$1 = path.normalize(fastGlobResult.path ?? fastGlobResult);
@@ -16783,23 +16911,14 @@ const entityResource = {
16783
16911
 
16784
16912
  //#endregion
16785
16913
  //#region src/core/resources/function/schema.ts
16786
- const FunctionNameSchema = string().trim().min(1, "Function name cannot be empty").regex(/^[^.]+$/, "Function name cannot contain dots");
16787
- const FunctionFileSchema = object({
16788
- path: string().min(1),
16789
- content: string()
16790
- });
16791
16914
  const FunctionConfigSchema = object({
16792
- name: FunctionNameSchema,
16793
- entry: string().min(1, "Entry point cannot be empty")
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
16918
  });
16795
16919
  const FunctionSchema = FunctionConfigSchema.extend({
16796
16920
  entryPath: string().min(1, "Entry path cannot be empty"),
16797
- files: array(string()).min(1, "Function must have at least one file")
16798
- });
16799
- const FunctionDeploySchema = object({
16800
- name: FunctionNameSchema,
16801
- entry: string().min(1),
16802
- files: array(FunctionFileSchema).min(1, "Function must have at least one file")
16921
+ files: array(string()).min(1, "Files array cannot be empty")
16803
16922
  });
16804
16923
  const DeployFunctionsResponseSchema = object({
16805
16924
  deployed: array(string()),
@@ -16903,30 +17022,7 @@ const functionResource = {
16903
17022
 
16904
17023
  //#endregion
16905
17024
  //#region src/core/resources/agent/schema.ts
16906
- const EntityOperationSchema = _enum([
16907
- "create",
16908
- "update",
16909
- "delete",
16910
- "read"
16911
- ]);
16912
- const EntityToolConfigSchema = object({
16913
- entity_name: string().min(1),
16914
- allowed_operations: array(EntityOperationSchema)
16915
- });
16916
- const BackendFunctionToolConfigSchema = object({
16917
- function_name: string().min(1),
16918
- description: string().default("agent backend function")
16919
- });
16920
- const ToolConfigSchema = union([EntityToolConfigSchema, BackendFunctionToolConfigSchema]);
16921
- const ModelSchema = string().regex(/^(default|(anthropic|gemini|openai|vertex_ai)\/.+)$/, "Model must be \"default\" or start with: anthropic/, gemini/, openai/, vertex_ai/");
16922
- const AgentConfigSchema = looseObject({
16923
- name: string().regex(/^[a-z0-9_]+$/, "Agent name must be lowercase alphanumeric with underscores").min(1).max(100),
16924
- description: string().trim().min(1, "Description is required"),
16925
- instructions: string().trim().min(1, "Instructions are required"),
16926
- tool_configs: array(ToolConfigSchema).optional().default([]),
16927
- whatsapp_greeting: string().nullable().optional().default(null),
16928
- model: ModelSchema.optional().default("default")
16929
- });
17025
+ const AgentConfigSchema = looseObject({ name: string().regex(/^[a-z0-9_]+$/, "Agent name must be lowercase alphanumeric with underscores").min(1).max(100) });
16930
17026
  const SyncAgentsResponseSchema = object({
16931
17027
  created: array(string()),
16932
17028
  updated: array(string()),
@@ -31143,13 +31239,13 @@ var ansi_styles_default = ansiStyles;
31143
31239
 
31144
31240
  //#endregion
31145
31241
  //#region node_modules/chalk/source/vendor/supports-color/index.js
31146
- function hasFlag(flag, argv = globalThis.Deno ? globalThis.Deno.args : process$1.argv) {
31242
+ function hasFlag(flag, argv = globalThis.Deno ? globalThis.Deno.args : y.argv) {
31147
31243
  const prefix = flag.startsWith("-") ? "" : flag.length === 1 ? "-" : "--";
31148
31244
  const position = argv.indexOf(prefix + flag);
31149
31245
  const terminatorPosition = argv.indexOf("--");
31150
31246
  return position !== -1 && (terminatorPosition === -1 || position < terminatorPosition);
31151
31247
  }
31152
- const { env } = process$1;
31248
+ const { env } = y;
31153
31249
  let flagForceColor;
31154
31250
  if (hasFlag("no-color") || hasFlag("no-colors") || hasFlag("color=false") || hasFlag("color=never")) flagForceColor = 0;
31155
31251
  else if (hasFlag("color") || hasFlag("colors") || hasFlag("color=true") || hasFlag("color=always")) flagForceColor = 1;
@@ -31182,7 +31278,7 @@ function _supportsColor(haveStream, { streamIsTTY, sniffFlags = true } = {}) {
31182
31278
  if (haveStream && !streamIsTTY && forceColor === void 0) return 0;
31183
31279
  const min = forceColor || 0;
31184
31280
  if (env.TERM === "dumb") return min;
31185
- if (process$1.platform === "win32") {
31281
+ if (y.platform === "win32") {
31186
31282
  const osRelease = os.release().split(".");
31187
31283
  if (Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) return Number(osRelease[2]) >= 14931 ? 3 : 2;
31188
31284
  return 1;
@@ -31973,9 +32069,9 @@ const getSubprocessResult = ({ stdout: stdout$1 }) => {
31973
32069
  //#region node_modules/execa/lib/utils/standard-stream.js
31974
32070
  const isStandardStream = (stream) => STANDARD_STREAMS.includes(stream);
31975
32071
  const STANDARD_STREAMS = [
31976
- process$1.stdin,
31977
- process$1.stdout,
31978
- process$1.stderr
32072
+ y.stdin,
32073
+ y.stdout,
32074
+ y.stderr
31979
32075
  ];
31980
32076
  const STANDARD_STREAMS_ALIASES = [
31981
32077
  "stdin",
@@ -32100,9 +32196,9 @@ const NO_ESCAPE_REGEXP = /^[\w./-]+$/;
32100
32196
  //#endregion
32101
32197
  //#region node_modules/is-unicode-supported/index.js
32102
32198
  function isUnicodeSupported() {
32103
- const { env: env$1 } = process$1;
32199
+ const { env: env$1 } = y;
32104
32200
  const { TERM, TERM_PROGRAM } = env$1;
32105
- if (process$1.platform !== "win32") return TERM !== "linux";
32201
+ if (y.platform !== "win32") return TERM !== "linux";
32106
32202
  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";
32107
32203
  }
32108
32204
 
@@ -33029,7 +33125,7 @@ const TEN_MEGABYTES_IN_BYTES = 10 * 1024 * 1024;
33029
33125
 
33030
33126
  //#endregion
33031
33127
  //#region node_modules/npm-run-path/index.js
33032
- const npmRunPath = ({ cwd = process$1.cwd(), path: pathOption = process$1.env[pathKey()], preferLocal = true, execPath: execPath$1 = process$1.execPath, addExecPath = true } = {}) => {
33128
+ const npmRunPath = ({ cwd = y.cwd(), path: pathOption = y.env[pathKey()], preferLocal = true, execPath: execPath$1 = y.execPath, addExecPath = true } = {}) => {
33033
33129
  const cwdPath = path.resolve(toPath(cwd));
33034
33130
  const result = [];
33035
33131
  const pathParts = pathOption.split(path.delimiter);
@@ -33047,7 +33143,7 @@ const applyExecPath = (result, pathParts, execPath$1, cwdPath) => {
33047
33143
  const pathPart = path.resolve(cwdPath, toPath(execPath$1), "..");
33048
33144
  if (!pathParts.includes(pathPart)) result.push(pathPart);
33049
33145
  };
33050
- const npmRunPathEnv = ({ env: env$1 = process$1.env, ...options } = {}) => {
33146
+ const npmRunPathEnv = ({ env: env$1 = y.env, ...options } = {}) => {
33051
33147
  env$1 = { ...env$1 };
33052
33148
  const pathName = pathKey({ env: env$1 });
33053
33149
  options.path = env$1[pathName];
@@ -34182,7 +34278,7 @@ const normalizeCwd = (cwd = getDefaultCwd()) => {
34182
34278
  };
34183
34279
  const getDefaultCwd = () => {
34184
34280
  try {
34185
- return process$1.cwd();
34281
+ return y.cwd();
34186
34282
  } catch (error) {
34187
34283
  error.message = `The current directory does not exist.\n${error.message}`;
34188
34284
  throw error;
@@ -34217,7 +34313,7 @@ const normalizeOptions = (filePath, rawArguments, rawOptions) => {
34217
34313
  options.killSignal = normalizeKillSignal(options.killSignal);
34218
34314
  options.forceKillAfterDelay = normalizeForceKillAfterDelay(options.forceKillAfterDelay);
34219
34315
  options.lines = options.lines.map((lines, fdNumber) => lines && !BINARY_ENCODINGS.has(options.encoding) && options.buffer[fdNumber]);
34220
- if (process$1.platform === "win32" && path.basename(file, ".exe") === "cmd") commandArguments.unshift("/q");
34316
+ if (y.platform === "win32" && path.basename(file, ".exe") === "cmd") commandArguments.unshift("/q");
34221
34317
  return {
34222
34318
  file,
34223
34319
  commandArguments,
@@ -34244,7 +34340,7 @@ const addDefaultOptions = ({ extendEnv = true, preferLocal = false, cwd, localDi
34244
34340
  });
34245
34341
  const getEnv = ({ env: envOption, extendEnv, preferLocal, node, localDirectory, nodePath }) => {
34246
34342
  const env$1 = extendEnv ? {
34247
- ...process$1.env,
34343
+ ...y.env,
34248
34344
  ...envOption
34249
34345
  } : envOption;
34250
34346
  if (preferLocal || node) return npmRunPathEnv({
@@ -35244,12 +35340,12 @@ const guessStreamDirection = {
35244
35340
  }
35245
35341
  };
35246
35342
  const getStandardStreamDirection = (value) => {
35247
- if ([0, process$1.stdin].includes(value)) return "input";
35343
+ if ([0, y.stdin].includes(value)) return "input";
35248
35344
  if ([
35249
35345
  1,
35250
35346
  2,
35251
- process$1.stdout,
35252
- process$1.stderr
35347
+ y.stdout,
35348
+ y.stderr
35253
35349
  ].includes(value)) return "output";
35254
35350
  };
35255
35351
  const DEFAULT_DIRECTION = "output";
@@ -36313,9 +36409,9 @@ const addIpcMethods = (subprocess, { ipc }) => {
36313
36409
  Object.assign(subprocess, getIpcMethods(subprocess, false, ipc));
36314
36410
  };
36315
36411
  const getIpcExport = () => {
36316
- const anyProcess = process$1;
36412
+ const anyProcess = y;
36317
36413
  const isSubprocess = true;
36318
- const ipc = process$1.channel !== void 0;
36414
+ const ipc = y.channel !== void 0;
36319
36415
  return {
36320
36416
  ...getIpcMethods(anyProcess, isSubprocess, ipc),
36321
36417
  getCancelSignal: getCancelSignal$1.bind(void 0, {
@@ -36557,7 +36653,7 @@ if (process.platform === "linux") signals.push("SIGIO", "SIGPOLL", "SIGPWR", "SI
36557
36653
 
36558
36654
  //#endregion
36559
36655
  //#region node_modules/signal-exit/dist/mjs/index.js
36560
- 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";
36656
+ 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";
36561
36657
  const kExitEmitter = Symbol.for("signal-exit emitter");
36562
36658
  const global$1 = globalThis;
36563
36659
  const ObjectDefineProperty = Object.defineProperty.bind(Object);
@@ -36625,7 +36721,7 @@ var SignalExitFallback = class extends SignalExitBase {
36625
36721
  };
36626
36722
  var SignalExit = class extends SignalExitBase {
36627
36723
  /* c8 ignore start */
36628
- #hupSig = process$2.platform === "win32" ? "SIGINT" : "SIGHUP";
36724
+ #hupSig = process$1.platform === "win32" ? "SIGINT" : "SIGHUP";
36629
36725
  /* c8 ignore stop */
36630
36726
  #emitter = new Emitter();
36631
36727
  #process;
@@ -36633,15 +36729,15 @@ var SignalExit = class extends SignalExitBase {
36633
36729
  #originalProcessReallyExit;
36634
36730
  #sigListeners = {};
36635
36731
  #loaded = false;
36636
- constructor(process$5) {
36732
+ constructor(process$4) {
36637
36733
  super();
36638
- this.#process = process$5;
36734
+ this.#process = process$4;
36639
36735
  this.#sigListeners = {};
36640
36736
  for (const sig of signals) this.#sigListeners[sig] = () => {
36641
36737
  const listeners = this.#process.listeners(sig);
36642
36738
  let { count: count$1 } = this.#emitter;
36643
36739
  /* c8 ignore start */
36644
- const p$1 = process$5;
36740
+ const p$1 = process$4;
36645
36741
  if (typeof p$1.__signal_exit_emitter__ === "object" && typeof p$1.__signal_exit_emitter__.count === "number") count$1 += p$1.__signal_exit_emitter__.count;
36646
36742
  /* c8 ignore stop */
36647
36743
  if (listeners.length === count$1) {
@@ -36649,11 +36745,11 @@ var SignalExit = class extends SignalExitBase {
36649
36745
  const ret = this.#emitter.emit("exit", null, sig);
36650
36746
  /* c8 ignore start */
36651
36747
  const s = sig === "SIGHUP" ? this.#hupSig : sig;
36652
- if (!ret) process$5.kill(process$5.pid, s);
36748
+ if (!ret) process$4.kill(process$4.pid, s);
36653
36749
  }
36654
36750
  };
36655
- this.#originalProcessReallyExit = process$5.reallyExit;
36656
- this.#originalProcessEmit = process$5.emit;
36751
+ this.#originalProcessReallyExit = process$4.reallyExit;
36752
+ this.#originalProcessEmit = process$4.emit;
36657
36753
  }
36658
36754
  onExit(cb, opts) {
36659
36755
  /* c8 ignore start */
@@ -36720,8 +36816,8 @@ var SignalExit = class extends SignalExitBase {
36720
36816
  } else return og.call(this.#process, ev, ...args);
36721
36817
  }
36722
36818
  };
36723
- const process$2 = globalThis.process;
36724
- const { onExit, load, unload } = signalExitWrap(processOk(process$2) ? new SignalExit(process$2) : new SignalExitFallback());
36819
+ const process$1 = globalThis.process;
36820
+ const { onExit, load, unload } = signalExitWrap(processOk(process$1) ? new SignalExit(process$1) : new SignalExitFallback());
36725
36821
 
36726
36822
  //#endregion
36727
36823
  //#region node_modules/execa/lib/terminate/cleanup.js
@@ -38675,7 +38771,7 @@ function isInsideContainer() {
38675
38771
  //#endregion
38676
38772
  //#region node_modules/is-wsl/index.js
38677
38773
  const isWsl = () => {
38678
- if (process$1.platform !== "linux") return false;
38774
+ if (y.platform !== "linux") return false;
38679
38775
  if (os.release().toLowerCase().includes("microsoft")) {
38680
38776
  if (isInsideContainer()) return false;
38681
38777
  return true;
@@ -38686,12 +38782,12 @@ const isWsl = () => {
38686
38782
  return false;
38687
38783
  }
38688
38784
  };
38689
- var is_wsl_default = process$1.env.__IS_WSL_TEST__ ? isWsl : isWsl();
38785
+ var is_wsl_default = y.env.__IS_WSL_TEST__ ? isWsl : isWsl();
38690
38786
 
38691
38787
  //#endregion
38692
38788
  //#region node_modules/powershell-utils/index.js
38693
38789
  const execFile$2 = promisify(childProcess.execFile);
38694
- const powerShellPath$1 = () => `${process$1.env.SYSTEMROOT || process$1.env.windir || String.raw`C:\Windows`}\\System32\\WindowsPowerShell\\v1.0\\powershell.exe`;
38790
+ const powerShellPath$1 = () => `${y.env.SYSTEMROOT || y.env.windir || String.raw`C:\Windows`}\\System32\\WindowsPowerShell\\v1.0\\powershell.exe`;
38695
38791
  const executePowerShell = async (command, options = {}) => {
38696
38792
  const { powerShellPath: psPath, ...execFileOptions } = options;
38697
38793
  const encodedCommand = executePowerShell.encodeCommand(command);
@@ -38802,7 +38898,7 @@ function defineLazyProperty(object$1, propertyName, valueGetter) {
38802
38898
  //#region node_modules/default-browser-id/index.js
38803
38899
  const execFileAsync$3 = promisify(execFile);
38804
38900
  async function defaultBrowserId() {
38805
- if (process$1.platform !== "darwin") throw new Error("macOS only");
38901
+ if (y.platform !== "darwin") throw new Error("macOS only");
38806
38902
  const { stdout: stdout$1 } = await execFileAsync$3("defaults", [
38807
38903
  "read",
38808
38904
  "com.apple.LaunchServices/com.apple.launchservices.secure",
@@ -38817,7 +38913,7 @@ async function defaultBrowserId() {
38817
38913
  //#region node_modules/run-applescript/index.js
38818
38914
  const execFileAsync$2 = promisify(execFile);
38819
38915
  async function runAppleScript(script, { humanReadableOutput = true, signal } = {}) {
38820
- if (process$1.platform !== "darwin") throw new Error("macOS only");
38916
+ if (y.platform !== "darwin") throw new Error("macOS only");
38821
38917
  const outputArguments = humanReadableOutput ? [] : ["-ss"];
38822
38918
  const execOptions = {};
38823
38919
  if (signal) execOptions.signal = signal;
@@ -38926,14 +39022,14 @@ async function defaultBrowser$1(_execFileAsync = execFileAsync$1) {
38926
39022
  const execFileAsync = promisify(execFile);
38927
39023
  const titleize = (string$2) => string$2.toLowerCase().replaceAll(/(?:^|\s|-)\S/g, (x$2) => x$2.toUpperCase());
38928
39024
  async function defaultBrowser() {
38929
- if (process$1.platform === "darwin") {
39025
+ if (y.platform === "darwin") {
38930
39026
  const id = await defaultBrowserId();
38931
39027
  return {
38932
39028
  name: await bundleName(id),
38933
39029
  id
38934
39030
  };
38935
39031
  }
38936
- if (process$1.platform === "linux") {
39032
+ if (y.platform === "linux") {
38937
39033
  const { stdout: stdout$1 } = await execFileAsync("xdg-mime", [
38938
39034
  "query",
38939
39035
  "default",
@@ -38945,13 +39041,13 @@ async function defaultBrowser() {
38945
39041
  id
38946
39042
  };
38947
39043
  }
38948
- if (process$1.platform === "win32") return defaultBrowser$1();
39044
+ if (y.platform === "win32") return defaultBrowser$1();
38949
39045
  throw new Error("Only macOS, Linux, and Windows are supported");
38950
39046
  }
38951
39047
 
38952
39048
  //#endregion
38953
39049
  //#region node_modules/is-in-ssh/index.js
38954
- const isInSsh = Boolean(process$1.env.SSH_CONNECTION || process$1.env.SSH_CLIENT || process$1.env.SSH_TTY);
39050
+ const isInSsh = Boolean(y.env.SSH_CONNECTION || y.env.SSH_CLIENT || y.env.SSH_TTY);
38955
39051
  var is_in_ssh_default = isInSsh;
38956
39052
 
38957
39053
  //#endregion
@@ -38959,7 +39055,7 @@ var is_in_ssh_default = isInSsh;
38959
39055
  const fallbackAttemptSymbol = Symbol("fallbackAttempt");
38960
39056
  const __dirname = import.meta.url ? path.dirname(fileURLToPath(import.meta.url)) : "";
38961
39057
  const localXdgOpenPath = path.join(__dirname, "xdg-open");
38962
- const { platform: platform$1, arch } = process$1;
39058
+ const { platform: platform$1, arch } = y;
38963
39059
  const tryEachApp = async (apps$1, opener) => {
38964
39060
  if (apps$1.length === 0) return;
38965
39061
  const errors = [];
@@ -39072,7 +39168,7 @@ const baseOpen = async (options) => {
39072
39168
  await fs$1.access(localXdgOpenPath, constants$1.X_OK);
39073
39169
  exeLocalXdgOpen = true;
39074
39170
  } catch {}
39075
- command = process$1.versions.electron ?? (platform$1 === "android" || isBundled || !exeLocalXdgOpen) ? "xdg-open" : localXdgOpenPath;
39171
+ command = y.versions.electron ?? (platform$1 === "android" || isBundled || !exeLocalXdgOpen) ? "xdg-open" : localXdgOpenPath;
39076
39172
  }
39077
39173
  if (appArguments.length > 0) cliArguments.push(...appArguments);
39078
39174
  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.1ef8126",
3
+ "version": "0.0.25-pr.151.924f8b5",
4
4
  "description": "Base44 CLI - Unified interface for managing Base44 applications",
5
5
  "type": "module",
6
6
  "bin": {