@base44-preview/cli 0.0.13-pr.87.2565e16 → 0.0.13-pr.89.1804f37

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/cli/index.js +136 -274
  2. package/package.json +1 -1
package/dist/cli/index.js CHANGED
@@ -4,7 +4,7 @@ import { EventEmitter, addAbortListener, on, once, setMaxListeners } from "node:
4
4
  import childProcess, { ChildProcess, execFile, spawn, spawnSync } from "node:child_process";
5
5
  import path, { basename, dirname, join, posix, resolve, win32 } from "node:path";
6
6
  import fs, { appendFileSync, createReadStream, createWriteStream, readFileSync, statSync, writeFileSync } from "node:fs";
7
- import process$1, { execArgv, execPath, hrtime, platform, stdin, stdout } from "node:process";
7
+ import y, { execArgv, execPath, hrtime, platform, stdin, stdout } from "node:process";
8
8
  import { aborted, callbackify, debuglog, inspect, promisify, stripVTControlCharacters } from "node:util";
9
9
  import * as g from "node:readline";
10
10
  import O from "node:readline";
@@ -894,7 +894,7 @@ var require_command = /* @__PURE__ */ __commonJSMin(((exports) => {
894
894
  const childProcess$1 = __require("node:child_process");
895
895
  const path$16 = __require("node:path");
896
896
  const fs$11 = __require("node:fs");
897
- const process$4 = __require("node:process");
897
+ const process$3 = __require("node:process");
898
898
  const { Argument, humanReadableArgName } = require_argument();
899
899
  const { CommanderError } = require_error$1();
900
900
  const { Help } = require_help();
@@ -945,10 +945,10 @@ var require_command = /* @__PURE__ */ __commonJSMin(((exports) => {
945
945
  this._showHelpAfterError = false;
946
946
  this._showSuggestionAfterError = true;
947
947
  this._outputConfiguration = {
948
- writeOut: (str) => process$4.stdout.write(str),
949
- writeErr: (str) => process$4.stderr.write(str),
950
- getOutHelpWidth: () => process$4.stdout.isTTY ? process$4.stdout.columns : void 0,
951
- getErrHelpWidth: () => process$4.stderr.isTTY ? process$4.stderr.columns : void 0,
948
+ writeOut: (str) => process$3.stdout.write(str),
949
+ writeErr: (str) => process$3.stderr.write(str),
950
+ getOutHelpWidth: () => process$3.stdout.isTTY ? process$3.stdout.columns : void 0,
951
+ getErrHelpWidth: () => process$3.stderr.isTTY ? process$3.stderr.columns : void 0,
952
952
  outputError: (str, write) => write(str)
953
953
  };
954
954
  this._hidden = false;
@@ -1302,7 +1302,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
1302
1302
  */
1303
1303
  _exit(exitCode, code$1, message) {
1304
1304
  if (this._exitCallback) this._exitCallback(new CommanderError(exitCode, code$1, message));
1305
- process$4.exit(exitCode);
1305
+ process$3.exit(exitCode);
1306
1306
  }
1307
1307
  /**
1308
1308
  * Register callback `fn` for the command.
@@ -1641,11 +1641,11 @@ Expecting one of '${allowedValues.join("', '")}'`);
1641
1641
  if (argv !== void 0 && !Array.isArray(argv)) throw new Error("first parameter to parse must be array or undefined");
1642
1642
  parseOptions = parseOptions || {};
1643
1643
  if (argv === void 0 && parseOptions.from === void 0) {
1644
- if (process$4.versions?.electron) parseOptions.from = "electron";
1645
- const execArgv$1 = process$4.execArgv ?? [];
1644
+ if (process$3.versions?.electron) parseOptions.from = "electron";
1645
+ const execArgv$1 = process$3.execArgv ?? [];
1646
1646
  if (execArgv$1.includes("-e") || execArgv$1.includes("--eval") || execArgv$1.includes("-p") || execArgv$1.includes("--print")) parseOptions.from = "eval";
1647
1647
  }
1648
- if (argv === void 0) argv = process$4.argv;
1648
+ if (argv === void 0) argv = process$3.argv;
1649
1649
  this.rawArgs = argv.slice();
1650
1650
  let userArgs;
1651
1651
  switch (parseOptions.from) {
@@ -1655,7 +1655,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
1655
1655
  userArgs = argv.slice(2);
1656
1656
  break;
1657
1657
  case "electron":
1658
- if (process$4.defaultApp) {
1658
+ if (process$3.defaultApp) {
1659
1659
  this._scriptPath = argv[1];
1660
1660
  userArgs = argv.slice(2);
1661
1661
  } else userArgs = argv.slice(1);
@@ -1769,15 +1769,15 @@ Expecting one of '${allowedValues.join("', '")}'`);
1769
1769
  }
1770
1770
  launchWithNode = sourceExt.includes(path$16.extname(executableFile));
1771
1771
  let proc$1;
1772
- if (process$4.platform !== "win32") if (launchWithNode) {
1772
+ if (process$3.platform !== "win32") if (launchWithNode) {
1773
1773
  args.unshift(executableFile);
1774
- args = incrementNodeInspectorPort(process$4.execArgv).concat(args);
1775
- proc$1 = childProcess$1.spawn(process$4.argv[0], args, { stdio: "inherit" });
1774
+ args = incrementNodeInspectorPort(process$3.execArgv).concat(args);
1775
+ proc$1 = childProcess$1.spawn(process$3.argv[0], args, { stdio: "inherit" });
1776
1776
  } else proc$1 = childProcess$1.spawn(executableFile, args, { stdio: "inherit" });
1777
1777
  else {
1778
1778
  args.unshift(executableFile);
1779
- args = incrementNodeInspectorPort(process$4.execArgv).concat(args);
1780
- proc$1 = childProcess$1.spawn(process$4.execPath, args, { stdio: "inherit" });
1779
+ args = incrementNodeInspectorPort(process$3.execArgv).concat(args);
1780
+ proc$1 = childProcess$1.spawn(process$3.execPath, args, { stdio: "inherit" });
1781
1781
  }
1782
1782
  if (!proc$1.killed) [
1783
1783
  "SIGUSR1",
@@ -1786,14 +1786,14 @@ Expecting one of '${allowedValues.join("', '")}'`);
1786
1786
  "SIGINT",
1787
1787
  "SIGHUP"
1788
1788
  ].forEach((signal) => {
1789
- process$4.on(signal, () => {
1789
+ process$3.on(signal, () => {
1790
1790
  if (proc$1.killed === false && proc$1.exitCode === null) proc$1.kill(signal);
1791
1791
  });
1792
1792
  });
1793
1793
  const exitCallback = this._exitCallback;
1794
1794
  proc$1.on("close", (code$1) => {
1795
1795
  code$1 = code$1 ?? 1;
1796
- if (!exitCallback) process$4.exit(code$1);
1796
+ if (!exitCallback) process$3.exit(code$1);
1797
1797
  else exitCallback(new CommanderError(code$1, "commander.executeSubCommandAsync", "(close)"));
1798
1798
  });
1799
1799
  proc$1.on("error", (err) => {
@@ -1805,7 +1805,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
1805
1805
  - ${executableDirMessage}`;
1806
1806
  throw new Error(executableMissing);
1807
1807
  } else if (err.code === "EACCES") throw new Error(`'${executableFile}' not executable`);
1808
- if (!exitCallback) process$4.exit(1);
1808
+ if (!exitCallback) process$3.exit(1);
1809
1809
  else {
1810
1810
  const wrappedError = new CommanderError(1, "commander.executeSubCommandAsync", "(error)");
1811
1811
  wrappedError.nestedError = err;
@@ -2211,13 +2211,13 @@ Expecting one of '${allowedValues.join("', '")}'`);
2211
2211
  */
2212
2212
  _parseOptionsEnv() {
2213
2213
  this.options.forEach((option) => {
2214
- if (option.envVar && option.envVar in process$4.env) {
2214
+ if (option.envVar && option.envVar in process$3.env) {
2215
2215
  const optionKey = option.attributeName();
2216
2216
  if (this.getOptionValue(optionKey) === void 0 || [
2217
2217
  "default",
2218
2218
  "config",
2219
2219
  "env"
2220
- ].includes(this.getOptionValueSource(optionKey))) if (option.required || option.optional) this.emit(`optionEnv:${option.name()}`, process$4.env[option.envVar]);
2220
+ ].includes(this.getOptionValueSource(optionKey))) if (option.required || option.optional) this.emit(`optionEnv:${option.name()}`, process$3.env[option.envVar]);
2221
2221
  else this.emit(`optionEnv:${option.name()}`);
2222
2222
  }
2223
2223
  });
@@ -2596,7 +2596,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
2596
2596
  */
2597
2597
  help(contextOptions) {
2598
2598
  this.outputHelp(contextOptions);
2599
- let exitCode = process$4.exitCode || 0;
2599
+ let exitCode = process$3.exitCode || 0;
2600
2600
  if (exitCode === 0 && contextOptions && typeof contextOptions !== "function" && contextOptions.error) exitCode = 1;
2601
2601
  this._exit(exitCode, "commander.help", "(outputHelp)");
2602
2602
  }
@@ -2712,16 +2712,16 @@ var require_src = /* @__PURE__ */ __commonJSMin(((exports, module) => {
2712
2712
  const CSI = `${ESC}[`;
2713
2713
  const beep = "\x07";
2714
2714
  const cursor = {
2715
- to(x$2, y$1) {
2716
- if (!y$1) return `${CSI}${x$2 + 1}G`;
2717
- return `${CSI}${y$1 + 1};${x$2 + 1}H`;
2715
+ to(x$2, y$2) {
2716
+ if (!y$2) return `${CSI}${x$2 + 1}G`;
2717
+ return `${CSI}${y$2 + 1};${x$2 + 1}H`;
2718
2718
  },
2719
- move(x$2, y$1) {
2719
+ move(x$2, y$2) {
2720
2720
  let ret = "";
2721
2721
  if (x$2 < 0) ret += `${CSI}${-x$2}D`;
2722
2722
  else if (x$2 > 0) ret += `${CSI}${x$2}C`;
2723
- if (y$1 < 0) ret += `${CSI}${-y$1}A`;
2724
- else if (y$1 > 0) ret += `${CSI}${y$1}B`;
2723
+ if (y$2 < 0) ret += `${CSI}${-y$2}A`;
2724
+ else if (y$2 > 0) ret += `${CSI}${y$2}B`;
2725
2725
  return ret;
2726
2726
  },
2727
2727
  up: (count$1 = 1) => `${CSI}${count$1}A`,
@@ -3031,13 +3031,13 @@ function rD() {
3031
3031
  }
3032
3032
  }), r;
3033
3033
  }
3034
- 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) => {
3034
+ 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) => {
3035
3035
  const F$1 = [...u$2];
3036
3036
  let s = !1, i$1 = !1, D$1 = p(P$1(e$1[e$1.length - 1]));
3037
3037
  for (const [C$1, n$1] of F$1.entries()) {
3038
3038
  const E = p(n$1);
3039
3039
  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) {
3040
- i$1 ? n$1 === y && (s = !1, i$1 = !1) : n$1 === G$1 && (s = !1);
3040
+ i$1 ? n$1 === y$1 && (s = !1, i$1 = !1) : n$1 === G$1 && (s = !1);
3041
3041
  continue;
3042
3042
  }
3043
3043
  D$1 += E, D$1 === t && C$1 < F$1.length - 1 && (e$1.push(""), D$1 = 0);
@@ -3079,7 +3079,7 @@ const ED = rD(), d$1 = new Set(["\x1B", "›"]), oD = 39, y = "\x07", V$1 = "[",
3079
3079
  `)];
3080
3080
  for (const [E, a$1] of n$1.entries()) {
3081
3081
  if (F$1 += a$1, d$1.has(a$1)) {
3082
- const { groups: c$1 } = (/* @__PURE__ */ new RegExp(`(?:\\${V$1}(?<code>\\d+)m|\\${_$1}(?<uri>.*)${y})`)).exec(n$1.slice(E).join("")) || { groups: {} };
3082
+ const { groups: c$1 } = (/* @__PURE__ */ new RegExp(`(?:\\${V$1}(?<code>\\d+)m|\\${_$1}(?<uri>.*)${y$1})`)).exec(n$1.slice(E).join("")) || { groups: {} };
3083
3083
  if (c$1.code !== void 0) {
3084
3084
  const f = Number.parseFloat(c$1.code);
3085
3085
  s = f === oD ? void 0 : f;
@@ -3480,7 +3480,7 @@ var RD = class extends x$1 {
3480
3480
  //#endregion
3481
3481
  //#region node_modules/@clack/prompts/dist/index.mjs
3482
3482
  function ce() {
3483
- 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";
3483
+ 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";
3484
3484
  }
3485
3485
  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) => {
3486
3486
  switch (t) {
@@ -6628,7 +6628,7 @@ function initializeContext(params) {
6628
6628
  external: params?.external ?? void 0
6629
6629
  };
6630
6630
  }
6631
- function process$3(schema, ctx, _params = {
6631
+ function process$2(schema, ctx, _params = {
6632
6632
  path: [],
6633
6633
  schemaPath: []
6634
6634
  }) {
@@ -6665,7 +6665,7 @@ function process$3(schema, ctx, _params = {
6665
6665
  const parent = schema._zod.parent;
6666
6666
  if (parent) {
6667
6667
  if (!result.ref) result.ref = parent;
6668
- process$3(parent, ctx, params);
6668
+ process$2(parent, ctx, params);
6669
6669
  ctx.seen.get(parent).isParent = true;
6670
6670
  }
6671
6671
  }
@@ -6877,7 +6877,7 @@ const createToJSONSchemaMethod = (schema, processors = {}) => (params) => {
6877
6877
  ...params,
6878
6878
  processors
6879
6879
  });
6880
- process$3(schema, ctx);
6880
+ process$2(schema, ctx);
6881
6881
  extractDefs(ctx, schema);
6882
6882
  return finalize(ctx, schema);
6883
6883
  };
@@ -6889,7 +6889,7 @@ const createStandardJSONSchemaMethod = (schema, io, processors = {}) => (params)
6889
6889
  io,
6890
6890
  processors
6891
6891
  });
6892
- process$3(schema, ctx);
6892
+ process$2(schema, ctx);
6893
6893
  extractDefs(ctx, schema);
6894
6894
  return finalize(ctx, schema);
6895
6895
  };
@@ -6973,7 +6973,7 @@ const arrayProcessor = (schema, ctx, _json, params) => {
6973
6973
  if (typeof minimum === "number") json.minItems = minimum;
6974
6974
  if (typeof maximum === "number") json.maxItems = maximum;
6975
6975
  json.type = "array";
6976
- json.items = process$3(def.element, ctx, {
6976
+ json.items = process$2(def.element, ctx, {
6977
6977
  ...params,
6978
6978
  path: [...params.path, "items"]
6979
6979
  });
@@ -6984,7 +6984,7 @@ const objectProcessor = (schema, ctx, _json, params) => {
6984
6984
  json.type = "object";
6985
6985
  json.properties = {};
6986
6986
  const shape = def.shape;
6987
- for (const key in shape) json.properties[key] = process$3(shape[key], ctx, {
6987
+ for (const key in shape) json.properties[key] = process$2(shape[key], ctx, {
6988
6988
  ...params,
6989
6989
  path: [
6990
6990
  ...params.path,
@@ -7002,7 +7002,7 @@ const objectProcessor = (schema, ctx, _json, params) => {
7002
7002
  if (def.catchall?._zod.def.type === "never") json.additionalProperties = false;
7003
7003
  else if (!def.catchall) {
7004
7004
  if (ctx.io === "output") json.additionalProperties = false;
7005
- } else if (def.catchall) json.additionalProperties = process$3(def.catchall, ctx, {
7005
+ } else if (def.catchall) json.additionalProperties = process$2(def.catchall, ctx, {
7006
7006
  ...params,
7007
7007
  path: [...params.path, "additionalProperties"]
7008
7008
  });
@@ -7010,7 +7010,7 @@ const objectProcessor = (schema, ctx, _json, params) => {
7010
7010
  const unionProcessor = (schema, ctx, json, params) => {
7011
7011
  const def = schema._zod.def;
7012
7012
  const isExclusive = def.inclusive === false;
7013
- const options = def.options.map((x$2, i$1) => process$3(x$2, ctx, {
7013
+ const options = def.options.map((x$2, i$1) => process$2(x$2, ctx, {
7014
7014
  ...params,
7015
7015
  path: [
7016
7016
  ...params.path,
@@ -7023,7 +7023,7 @@ const unionProcessor = (schema, ctx, json, params) => {
7023
7023
  };
7024
7024
  const intersectionProcessor = (schema, ctx, json, params) => {
7025
7025
  const def = schema._zod.def;
7026
- const a$1 = process$3(def.left, ctx, {
7026
+ const a$1 = process$2(def.left, ctx, {
7027
7027
  ...params,
7028
7028
  path: [
7029
7029
  ...params.path,
@@ -7031,7 +7031,7 @@ const intersectionProcessor = (schema, ctx, json, params) => {
7031
7031
  0
7032
7032
  ]
7033
7033
  });
7034
- const b$2 = process$3(def.right, ctx, {
7034
+ const b$2 = process$2(def.right, ctx, {
7035
7035
  ...params,
7036
7036
  path: [
7037
7037
  ...params.path,
@@ -7048,7 +7048,7 @@ const tupleProcessor = (schema, ctx, _json, params) => {
7048
7048
  json.type = "array";
7049
7049
  const prefixPath$1 = ctx.target === "draft-2020-12" ? "prefixItems" : "items";
7050
7050
  const restPath = ctx.target === "draft-2020-12" ? "items" : ctx.target === "openapi-3.0" ? "items" : "additionalItems";
7051
- const prefixItems = def.items.map((x$2, i$1) => process$3(x$2, ctx, {
7051
+ const prefixItems = def.items.map((x$2, i$1) => process$2(x$2, ctx, {
7052
7052
  ...params,
7053
7053
  path: [
7054
7054
  ...params.path,
@@ -7056,7 +7056,7 @@ const tupleProcessor = (schema, ctx, _json, params) => {
7056
7056
  i$1
7057
7057
  ]
7058
7058
  }));
7059
- const rest = def.rest ? process$3(def.rest, ctx, {
7059
+ const rest = def.rest ? process$2(def.rest, ctx, {
7060
7060
  ...params,
7061
7061
  path: [
7062
7062
  ...params.path,
@@ -7082,7 +7082,7 @@ const tupleProcessor = (schema, ctx, _json, params) => {
7082
7082
  };
7083
7083
  const nullableProcessor = (schema, ctx, json, params) => {
7084
7084
  const def = schema._zod.def;
7085
- const inner = process$3(def.innerType, ctx, params);
7085
+ const inner = process$2(def.innerType, ctx, params);
7086
7086
  const seen = ctx.seen.get(schema);
7087
7087
  if (ctx.target === "openapi-3.0") {
7088
7088
  seen.ref = def.innerType;
@@ -7091,27 +7091,27 @@ const nullableProcessor = (schema, ctx, json, params) => {
7091
7091
  };
7092
7092
  const nonoptionalProcessor = (schema, ctx, _json, params) => {
7093
7093
  const def = schema._zod.def;
7094
- process$3(def.innerType, ctx, params);
7094
+ process$2(def.innerType, ctx, params);
7095
7095
  const seen = ctx.seen.get(schema);
7096
7096
  seen.ref = def.innerType;
7097
7097
  };
7098
7098
  const defaultProcessor = (schema, ctx, json, params) => {
7099
7099
  const def = schema._zod.def;
7100
- process$3(def.innerType, ctx, params);
7100
+ process$2(def.innerType, ctx, params);
7101
7101
  const seen = ctx.seen.get(schema);
7102
7102
  seen.ref = def.innerType;
7103
7103
  json.default = JSON.parse(JSON.stringify(def.defaultValue));
7104
7104
  };
7105
7105
  const prefaultProcessor = (schema, ctx, json, params) => {
7106
7106
  const def = schema._zod.def;
7107
- process$3(def.innerType, ctx, params);
7107
+ process$2(def.innerType, ctx, params);
7108
7108
  const seen = ctx.seen.get(schema);
7109
7109
  seen.ref = def.innerType;
7110
7110
  if (ctx.io === "input") json._prefault = JSON.parse(JSON.stringify(def.defaultValue));
7111
7111
  };
7112
7112
  const catchProcessor = (schema, ctx, json, params) => {
7113
7113
  const def = schema._zod.def;
7114
- process$3(def.innerType, ctx, params);
7114
+ process$2(def.innerType, ctx, params);
7115
7115
  const seen = ctx.seen.get(schema);
7116
7116
  seen.ref = def.innerType;
7117
7117
  let catchValue;
@@ -7125,20 +7125,20 @@ const catchProcessor = (schema, ctx, json, params) => {
7125
7125
  const pipeProcessor = (schema, ctx, _json, params) => {
7126
7126
  const def = schema._zod.def;
7127
7127
  const innerType = ctx.io === "input" ? def.in._zod.def.type === "transform" ? def.out : def.in : def.out;
7128
- process$3(innerType, ctx, params);
7128
+ process$2(innerType, ctx, params);
7129
7129
  const seen = ctx.seen.get(schema);
7130
7130
  seen.ref = innerType;
7131
7131
  };
7132
7132
  const readonlyProcessor = (schema, ctx, json, params) => {
7133
7133
  const def = schema._zod.def;
7134
- process$3(def.innerType, ctx, params);
7134
+ process$2(def.innerType, ctx, params);
7135
7135
  const seen = ctx.seen.get(schema);
7136
7136
  seen.ref = def.innerType;
7137
7137
  json.readOnly = true;
7138
7138
  };
7139
7139
  const optionalProcessor = (schema, ctx, _json, params) => {
7140
7140
  const def = schema._zod.def;
7141
- process$3(def.innerType, ctx, params);
7141
+ process$2(def.innerType, ctx, params);
7142
7142
  const seen = ctx.seen.get(schema);
7143
7143
  seen.ref = def.innerType;
7144
7144
  };
@@ -15371,7 +15371,7 @@ const createIgnorePredicate = (patterns, cwd, baseDir) => {
15371
15371
  };
15372
15372
  const normalizeOptions$2 = (options = {}) => {
15373
15373
  const ignoreOption = options.ignore ? Array.isArray(options.ignore) ? options.ignore : [options.ignore] : [];
15374
- const cwd = toPath$1(options.cwd) ?? process$1.cwd();
15374
+ const cwd = toPath$1(options.cwd) ?? y.cwd();
15375
15375
  const deep = typeof options.deep === "number" ? Math.max(0, options.deep) + 1 : Number.POSITIVE_INFINITY;
15376
15376
  return {
15377
15377
  cwd,
@@ -15468,7 +15468,7 @@ const getDirectoryGlob = ({ directoryPath, files, extensions }) => {
15468
15468
  const extensionGlob = extensions?.length > 0 ? `.${extensions.length > 1 ? `{${extensions.join(",")}}` : extensions[0]}` : "";
15469
15469
  return files ? files.map((file) => path.posix.join(directoryPath, `**/${path.extname(file) ? file : `${file}${extensionGlob}`}`)) : [path.posix.join(directoryPath, `**${extensionGlob ? `/*${extensionGlob}` : ""}`)];
15470
15470
  };
15471
- const directoryToGlob = async (directoryPaths, { cwd = process$1.cwd(), files, extensions, fs: fsImplementation } = {}) => {
15471
+ const directoryToGlob = async (directoryPaths, { cwd = y.cwd(), files, extensions, fs: fsImplementation } = {}) => {
15472
15472
  return (await Promise.all(directoryPaths.map(async (directoryPath) => {
15473
15473
  if (shouldExpandGlobstarDirectory(isNegativePattern(directoryPath) ? directoryPath.slice(1) : directoryPath)) return getDirectoryGlob({
15474
15474
  directoryPath,
@@ -15482,7 +15482,7 @@ const directoryToGlob = async (directoryPaths, { cwd = process$1.cwd(), files, e
15482
15482
  }) : directoryPath;
15483
15483
  }))).flat();
15484
15484
  };
15485
- const directoryToGlobSync = (directoryPaths, { cwd = process$1.cwd(), files, extensions, fs: fsImplementation } = {}) => directoryPaths.flatMap((directoryPath) => {
15485
+ const directoryToGlobSync = (directoryPaths, { cwd = y.cwd(), files, extensions, fs: fsImplementation } = {}) => directoryPaths.flatMap((directoryPath) => {
15486
15486
  if (shouldExpandGlobstarDirectory(isNegativePattern(directoryPath) ? directoryPath.slice(1) : directoryPath)) return getDirectoryGlob({
15487
15487
  directoryPath,
15488
15488
  files,
@@ -15578,7 +15578,7 @@ const applyIgnoreFilesAndGetFilterSync = (options) => {
15578
15578
  };
15579
15579
  const createFilterFunction = (isIgnored, cwd) => {
15580
15580
  const seen = /* @__PURE__ */ new Set();
15581
- const basePath = cwd || process$1.cwd();
15581
+ const basePath = cwd || y.cwd();
15582
15582
  const pathCache = /* @__PURE__ */ new Map();
15583
15583
  return (fastGlobResult) => {
15584
15584
  const pathKey$1 = path.normalize(fastGlobResult.path ?? fastGlobResult);
@@ -16959,7 +16959,7 @@ async function createProject(projectName, description) {
16959
16959
  const response = await base44Client.post("api/apps", { json: {
16960
16960
  name: projectName,
16961
16961
  user_description: description ?? `Backend for '${projectName}'`,
16962
- app_type: "baas",
16962
+ is_managed_source_code: false,
16963
16963
  public_settings: "public_without_login"
16964
16964
  } });
16965
16965
  return { projectId: CreateProjectResponseSchema.parse(await response.json()).id };
@@ -25982,13 +25982,13 @@ var ansi_styles_default = ansiStyles;
25982
25982
 
25983
25983
  //#endregion
25984
25984
  //#region node_modules/chalk/source/vendor/supports-color/index.js
25985
- function hasFlag(flag, argv = globalThis.Deno ? globalThis.Deno.args : process$1.argv) {
25985
+ function hasFlag(flag, argv = globalThis.Deno ? globalThis.Deno.args : y.argv) {
25986
25986
  const prefix = flag.startsWith("-") ? "" : flag.length === 1 ? "-" : "--";
25987
25987
  const position = argv.indexOf(prefix + flag);
25988
25988
  const terminatorPosition = argv.indexOf("--");
25989
25989
  return position !== -1 && (terminatorPosition === -1 || position < terminatorPosition);
25990
25990
  }
25991
- const { env } = process$1;
25991
+ const { env } = y;
25992
25992
  let flagForceColor;
25993
25993
  if (hasFlag("no-color") || hasFlag("no-colors") || hasFlag("color=false") || hasFlag("color=never")) flagForceColor = 0;
25994
25994
  else if (hasFlag("color") || hasFlag("colors") || hasFlag("color=true") || hasFlag("color=always")) flagForceColor = 1;
@@ -26021,7 +26021,7 @@ function _supportsColor(haveStream, { streamIsTTY, sniffFlags = true } = {}) {
26021
26021
  if (haveStream && !streamIsTTY && forceColor === void 0) return 0;
26022
26022
  const min = forceColor || 0;
26023
26023
  if (env.TERM === "dumb") return min;
26024
- if (process$1.platform === "win32") {
26024
+ if (y.platform === "win32") {
26025
26025
  const osRelease = os.release().split(".");
26026
26026
  if (Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) return Number(osRelease[2]) >= 14931 ? 3 : 2;
26027
26027
  return 1;
@@ -26329,58 +26329,6 @@ async function printBanner() {
26329
26329
  else console.log(theme.colors.base44Orange(BANNER_LINES.join("\n")));
26330
26330
  }
26331
26331
 
26332
- //#endregion
26333
- //#region src/cli/utils/json.ts
26334
- /**
26335
- * JSON output utilities for CLI commands.
26336
- *
26337
- * These utilities support the `--json` flag which outputs machine-readable JSON
26338
- * instead of human-friendly formatted output.
26339
- */
26340
- let jsonModeEnabled = false;
26341
- /**
26342
- * Enable JSON output mode. Called by runCommand when --json flag is detected.
26343
- */
26344
- function setJsonMode(enabled) {
26345
- jsonModeEnabled = enabled;
26346
- }
26347
- /**
26348
- * Check if JSON output mode is currently active.
26349
- */
26350
- function isJsonMode() {
26351
- return jsonModeEnabled;
26352
- }
26353
- /**
26354
- * Output a success JSON response to stdout.
26355
- * Only outputs if JSON mode is enabled.
26356
- */
26357
- function outputJson(data) {
26358
- if (!jsonModeEnabled) return;
26359
- const response = {
26360
- success: true,
26361
- data
26362
- };
26363
- console.log(JSON.stringify(response, null, 2));
26364
- }
26365
- /**
26366
- * Output an error JSON response to stderr.
26367
- * Only outputs if JSON mode is enabled.
26368
- *
26369
- * @param error - The error to output
26370
- * @param code - Optional error code
26371
- */
26372
- function outputJsonError(error, code$1) {
26373
- if (!jsonModeEnabled) return;
26374
- const response = {
26375
- success: false,
26376
- error: {
26377
- message: error instanceof Error ? error.message : error,
26378
- ...code$1 && { code: code$1 }
26379
- }
26380
- };
26381
- console.error(JSON.stringify(response, null, 2));
26382
- }
26383
-
26384
26332
  //#endregion
26385
26333
  //#region src/cli/utils/runCommand.ts
26386
26334
  /**
@@ -26422,35 +26370,25 @@ function outputJsonError(error, code$1) {
26422
26370
  * });
26423
26371
  */
26424
26372
  async function runCommand(commandFn, options) {
26425
- const jsonMode = isJsonMode();
26426
- if (!jsonMode) {
26427
- console.log();
26428
- if (options?.fullBanner) {
26429
- await printBanner();
26430
- Ie("");
26431
- } else Ie(theme.colors.base44OrangeBackground(" Base 44 "));
26432
- }
26373
+ console.log();
26374
+ if (options?.fullBanner) {
26375
+ await printBanner();
26376
+ Ie("");
26377
+ } else Ie(theme.colors.base44OrangeBackground(" Base 44 "));
26433
26378
  await loadProjectEnv();
26434
26379
  try {
26435
26380
  if (options?.requireAuth) {
26436
26381
  if (!await isLoggedIn()) {
26437
- if (jsonMode) throw new Error("Authentication required. Please run 'base44 login' first.");
26438
26382
  M.info("You need to login first to continue.");
26439
26383
  await login();
26440
26384
  }
26441
26385
  }
26442
- const { outroMessage, data } = await commandFn();
26443
- if (jsonMode) outputJson(data ?? {});
26444
- else Se(outroMessage || "");
26386
+ const { outroMessage } = await commandFn();
26387
+ Se(outroMessage || "");
26445
26388
  } catch (e$1) {
26446
- if (jsonMode) {
26447
- outputJsonError(e$1 instanceof Error ? e$1 : String(e$1));
26448
- process.exit(1);
26449
- } else {
26450
- if (e$1 instanceof Error) M.error(e$1.stack ?? e$1.message);
26451
- else M.error(String(e$1));
26452
- process.exit(1);
26453
- }
26389
+ if (e$1 instanceof Error) M.error(e$1.stack ?? e$1.message);
26390
+ else M.error(String(e$1));
26391
+ process.exit(1);
26454
26392
  }
26455
26393
  }
26456
26394
 
@@ -26460,8 +26398,6 @@ async function runCommand(commandFn, options) {
26460
26398
  * Wraps an async operation with automatic spinner management.
26461
26399
  * The spinner is automatically started, and stopped on both success and error.
26462
26400
  *
26463
- * In JSON mode, the spinner is suppressed and the operation runs silently.
26464
- *
26465
26401
  * @param startMessage - Message to show when spinner starts
26466
26402
  * @param operation - The async operation to execute. Receives an updateMessage function
26467
26403
  * to update the spinner text during long-running operations.
@@ -26497,10 +26433,6 @@ async function runCommand(commandFn, options) {
26497
26433
  * );
26498
26434
  */
26499
26435
  async function runTask(startMessage, operation, options) {
26500
- if (isJsonMode()) {
26501
- const noopUpdateMessage = () => {};
26502
- return await operation(noopUpdateMessage);
26503
- }
26504
26436
  const s = Y();
26505
26437
  s.start(startMessage);
26506
26438
  const updateMessage = (message) => s.message(message);
@@ -26527,10 +26459,6 @@ const onPromptCancel = () => {
26527
26459
 
26528
26460
  //#endregion
26529
26461
  //#region src/cli/commands/auth/login.ts
26530
- /**
26531
- * Login command does not support --json output.
26532
- * It requires interactive browser authentication via device code flow.
26533
- */
26534
26462
  async function generateAndDisplayDeviceCode() {
26535
26463
  const deviceCodeResponse = await runTask("Generating device code...", async () => {
26536
26464
  return await generateDeviceCode();
@@ -26592,13 +26520,7 @@ const loginCommand = new Command("login").description("Authenticate with Base44"
26592
26520
  //#region src/cli/commands/auth/whoami.ts
26593
26521
  async function whoami() {
26594
26522
  const auth = await readAuth();
26595
- return {
26596
- outroMessage: `Logged in as: ${theme.styles.bold(auth.email)}`,
26597
- data: {
26598
- email: auth.email,
26599
- name: auth.name
26600
- }
26601
- };
26523
+ return { outroMessage: `Logged in as: ${theme.styles.bold(auth.email)}` };
26602
26524
  }
26603
26525
  const whoamiCommand = new Command("whoami").description("Display current authenticated user").action(async () => {
26604
26526
  await runCommand(whoami, { requireAuth: true });
@@ -26606,10 +26528,6 @@ const whoamiCommand = new Command("whoami").description("Display current authent
26606
26528
 
26607
26529
  //#endregion
26608
26530
  //#region src/cli/commands/auth/logout.ts
26609
- /**
26610
- * Logout command does not support --json output.
26611
- * It is a user-facing auth command that is rarely scripted.
26612
- */
26613
26531
  async function logout() {
26614
26532
  await deleteAuth();
26615
26533
  return { outroMessage: "Logged out successfully" };
@@ -31605,31 +31523,18 @@ async function createArchive(pathToArchive, targetArchivePath) {
31605
31523
  //#region src/cli/commands/entities/push.ts
31606
31524
  async function pushEntitiesAction() {
31607
31525
  const { entities } = await readProjectConfig();
31608
- if (entities.length === 0) return {
31609
- outroMessage: "No entities found in project",
31610
- data: {
31611
- created: [],
31612
- updated: [],
31613
- deleted: []
31614
- }
31615
- };
31616
- if (!isJsonMode()) M.info(`Found ${entities.length} entities to push`);
31526
+ if (entities.length === 0) return { outroMessage: "No entities found in project" };
31527
+ M.info(`Found ${entities.length} entities to push`);
31617
31528
  const result = await runTask("Pushing entities to Base44", async () => {
31618
31529
  return await pushEntities(entities);
31619
31530
  }, {
31620
31531
  successMessage: "Entities pushed successfully",
31621
31532
  errorMessage: "Failed to push entities"
31622
31533
  });
31623
- if (!isJsonMode()) {
31624
- if (result.created.length > 0) M.success(`Created: ${result.created.join(", ")}`);
31625
- if (result.updated.length > 0) M.success(`Updated: ${result.updated.join(", ")}`);
31626
- if (result.deleted.length > 0) M.warn(`Deleted: ${result.deleted.join(", ")}`);
31627
- }
31628
- return { data: {
31629
- created: result.created,
31630
- updated: result.updated,
31631
- deleted: result.deleted
31632
- } };
31534
+ if (result.created.length > 0) M.success(`Created: ${result.created.join(", ")}`);
31535
+ if (result.updated.length > 0) M.success(`Updated: ${result.updated.join(", ")}`);
31536
+ if (result.deleted.length > 0) M.warn(`Deleted: ${result.deleted.join(", ")}`);
31537
+ return {};
31633
31538
  }
31634
31539
  const entitiesPushCommand = new Command("entities").description("Manage project entities").addCommand(new Command("push").description("Push local entities to Base44").action(async () => {
31635
31540
  await runCommand(pushEntitiesAction, { requireAuth: true });
@@ -31639,32 +31544,21 @@ const entitiesPushCommand = new Command("entities").description("Manage project
31639
31544
  //#region src/cli/commands/functions/deploy.ts
31640
31545
  async function deployFunctionsAction() {
31641
31546
  const { functions } = await readProjectConfig();
31642
- if (functions.length === 0) return {
31643
- outroMessage: "No functions found. Create functions in the 'functions' directory.",
31644
- data: {
31645
- deployed: [],
31646
- deleted: []
31647
- }
31648
- };
31649
- if (!isJsonMode()) M.info(`Found ${functions.length} ${functions.length === 1 ? "function" : "functions"} to deploy`);
31547
+ if (functions.length === 0) return { outroMessage: "No functions found. Create functions in the 'functions' directory." };
31548
+ M.info(`Found ${functions.length} ${functions.length === 1 ? "function" : "functions"} to deploy`);
31650
31549
  const result = await runTask("Deploying functions to Base44", async () => {
31651
31550
  return await pushFunctions(functions);
31652
31551
  }, {
31653
31552
  successMessage: "Functions deployed successfully",
31654
31553
  errorMessage: "Failed to deploy functions"
31655
31554
  });
31656
- if (!isJsonMode()) {
31657
- if (result.deployed.length > 0) M.success(`Deployed: ${result.deployed.join(", ")}`);
31658
- if (result.deleted.length > 0) M.warn(`Deleted: ${result.deleted.join(", ")}`);
31659
- }
31555
+ if (result.deployed.length > 0) M.success(`Deployed: ${result.deployed.join(", ")}`);
31556
+ if (result.deleted.length > 0) M.warn(`Deleted: ${result.deleted.join(", ")}`);
31660
31557
  if (result.errors && result.errors.length > 0) {
31661
31558
  const errorMessages = result.errors.map((e$1) => `'${e$1.name}' function: ${e$1.message}`).join("\n");
31662
31559
  throw new Error(`Function deployment errors:\n${errorMessages}`);
31663
31560
  }
31664
- return { data: {
31665
- deployed: result.deployed,
31666
- deleted: result.deleted
31667
- } };
31561
+ return {};
31668
31562
  }
31669
31563
  const functionsDeployCommand = new Command("functions").description("Manage project functions").addCommand(new Command("deploy").description("Deploy local functions to Base44").action(async () => {
31670
31564
  await runCommand(deployFunctionsAction, { requireAuth: true });
@@ -31840,9 +31734,9 @@ const getSubprocessResult = ({ stdout: stdout$1 }) => {
31840
31734
  //#region node_modules/execa/lib/utils/standard-stream.js
31841
31735
  const isStandardStream = (stream) => STANDARD_STREAMS.includes(stream);
31842
31736
  const STANDARD_STREAMS = [
31843
- process$1.stdin,
31844
- process$1.stdout,
31845
- process$1.stderr
31737
+ y.stdin,
31738
+ y.stdout,
31739
+ y.stderr
31846
31740
  ];
31847
31741
  const STANDARD_STREAMS_ALIASES = [
31848
31742
  "stdin",
@@ -31967,9 +31861,9 @@ const NO_ESCAPE_REGEXP = /^[\w./-]+$/;
31967
31861
  //#endregion
31968
31862
  //#region node_modules/is-unicode-supported/index.js
31969
31863
  function isUnicodeSupported() {
31970
- const { env: env$1 } = process$1;
31864
+ const { env: env$1 } = y;
31971
31865
  const { TERM, TERM_PROGRAM } = env$1;
31972
- if (process$1.platform !== "win32") return TERM !== "linux";
31866
+ if (y.platform !== "win32") return TERM !== "linux";
31973
31867
  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";
31974
31868
  }
31975
31869
 
@@ -32896,7 +32790,7 @@ const TEN_MEGABYTES_IN_BYTES = 10 * 1024 * 1024;
32896
32790
 
32897
32791
  //#endregion
32898
32792
  //#region node_modules/npm-run-path/index.js
32899
- const npmRunPath = ({ cwd = process$1.cwd(), path: pathOption = process$1.env[pathKey()], preferLocal = true, execPath: execPath$1 = process$1.execPath, addExecPath = true } = {}) => {
32793
+ const npmRunPath = ({ cwd = y.cwd(), path: pathOption = y.env[pathKey()], preferLocal = true, execPath: execPath$1 = y.execPath, addExecPath = true } = {}) => {
32900
32794
  const cwdPath = path.resolve(toPath(cwd));
32901
32795
  const result = [];
32902
32796
  const pathParts = pathOption.split(path.delimiter);
@@ -32914,7 +32808,7 @@ const applyExecPath = (result, pathParts, execPath$1, cwdPath) => {
32914
32808
  const pathPart = path.resolve(cwdPath, toPath(execPath$1), "..");
32915
32809
  if (!pathParts.includes(pathPart)) result.push(pathPart);
32916
32810
  };
32917
- const npmRunPathEnv = ({ env: env$1 = process$1.env, ...options } = {}) => {
32811
+ const npmRunPathEnv = ({ env: env$1 = y.env, ...options } = {}) => {
32918
32812
  env$1 = { ...env$1 };
32919
32813
  const pathName = pathKey({ env: env$1 });
32920
32814
  options.path = env$1[pathName];
@@ -34049,7 +33943,7 @@ const normalizeCwd = (cwd = getDefaultCwd()) => {
34049
33943
  };
34050
33944
  const getDefaultCwd = () => {
34051
33945
  try {
34052
- return process$1.cwd();
33946
+ return y.cwd();
34053
33947
  } catch (error) {
34054
33948
  error.message = `The current directory does not exist.\n${error.message}`;
34055
33949
  throw error;
@@ -34084,7 +33978,7 @@ const normalizeOptions = (filePath, rawArguments, rawOptions) => {
34084
33978
  options.killSignal = normalizeKillSignal(options.killSignal);
34085
33979
  options.forceKillAfterDelay = normalizeForceKillAfterDelay(options.forceKillAfterDelay);
34086
33980
  options.lines = options.lines.map((lines, fdNumber) => lines && !BINARY_ENCODINGS.has(options.encoding) && options.buffer[fdNumber]);
34087
- if (process$1.platform === "win32" && path.basename(file, ".exe") === "cmd") commandArguments.unshift("/q");
33981
+ if (y.platform === "win32" && path.basename(file, ".exe") === "cmd") commandArguments.unshift("/q");
34088
33982
  return {
34089
33983
  file,
34090
33984
  commandArguments,
@@ -34111,7 +34005,7 @@ const addDefaultOptions = ({ extendEnv = true, preferLocal = false, cwd, localDi
34111
34005
  });
34112
34006
  const getEnv = ({ env: envOption, extendEnv, preferLocal, node, localDirectory, nodePath }) => {
34113
34007
  const env$1 = extendEnv ? {
34114
- ...process$1.env,
34008
+ ...y.env,
34115
34009
  ...envOption
34116
34010
  } : envOption;
34117
34011
  if (preferLocal || node) return npmRunPathEnv({
@@ -35111,12 +35005,12 @@ const guessStreamDirection = {
35111
35005
  }
35112
35006
  };
35113
35007
  const getStandardStreamDirection = (value) => {
35114
- if ([0, process$1.stdin].includes(value)) return "input";
35008
+ if ([0, y.stdin].includes(value)) return "input";
35115
35009
  if ([
35116
35010
  1,
35117
35011
  2,
35118
- process$1.stdout,
35119
- process$1.stderr
35012
+ y.stdout,
35013
+ y.stderr
35120
35014
  ].includes(value)) return "output";
35121
35015
  };
35122
35016
  const DEFAULT_DIRECTION = "output";
@@ -36180,9 +36074,9 @@ const addIpcMethods = (subprocess, { ipc }) => {
36180
36074
  Object.assign(subprocess, getIpcMethods(subprocess, false, ipc));
36181
36075
  };
36182
36076
  const getIpcExport = () => {
36183
- const anyProcess = process$1;
36077
+ const anyProcess = y;
36184
36078
  const isSubprocess = true;
36185
- const ipc = process$1.channel !== void 0;
36079
+ const ipc = y.channel !== void 0;
36186
36080
  return {
36187
36081
  ...getIpcMethods(anyProcess, isSubprocess, ipc),
36188
36082
  getCancelSignal: getCancelSignal$1.bind(void 0, {
@@ -36424,7 +36318,7 @@ if (process.platform === "linux") signals.push("SIGIO", "SIGPOLL", "SIGPWR", "SI
36424
36318
 
36425
36319
  //#endregion
36426
36320
  //#region node_modules/signal-exit/dist/mjs/index.js
36427
- 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";
36321
+ 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";
36428
36322
  const kExitEmitter = Symbol.for("signal-exit emitter");
36429
36323
  const global$1 = globalThis;
36430
36324
  const ObjectDefineProperty = Object.defineProperty.bind(Object);
@@ -36492,7 +36386,7 @@ var SignalExitFallback = class extends SignalExitBase {
36492
36386
  };
36493
36387
  var SignalExit = class extends SignalExitBase {
36494
36388
  /* c8 ignore start */
36495
- #hupSig = process$2.platform === "win32" ? "SIGINT" : "SIGHUP";
36389
+ #hupSig = process$1.platform === "win32" ? "SIGINT" : "SIGHUP";
36496
36390
  /* c8 ignore stop */
36497
36391
  #emitter = new Emitter();
36498
36392
  #process;
@@ -36500,15 +36394,15 @@ var SignalExit = class extends SignalExitBase {
36500
36394
  #originalProcessReallyExit;
36501
36395
  #sigListeners = {};
36502
36396
  #loaded = false;
36503
- constructor(process$5) {
36397
+ constructor(process$4) {
36504
36398
  super();
36505
- this.#process = process$5;
36399
+ this.#process = process$4;
36506
36400
  this.#sigListeners = {};
36507
36401
  for (const sig of signals) this.#sigListeners[sig] = () => {
36508
36402
  const listeners = this.#process.listeners(sig);
36509
36403
  let { count: count$1 } = this.#emitter;
36510
36404
  /* c8 ignore start */
36511
- const p$1 = process$5;
36405
+ const p$1 = process$4;
36512
36406
  if (typeof p$1.__signal_exit_emitter__ === "object" && typeof p$1.__signal_exit_emitter__.count === "number") count$1 += p$1.__signal_exit_emitter__.count;
36513
36407
  /* c8 ignore stop */
36514
36408
  if (listeners.length === count$1) {
@@ -36516,11 +36410,11 @@ var SignalExit = class extends SignalExitBase {
36516
36410
  const ret = this.#emitter.emit("exit", null, sig);
36517
36411
  /* c8 ignore start */
36518
36412
  const s = sig === "SIGHUP" ? this.#hupSig : sig;
36519
- if (!ret) process$5.kill(process$5.pid, s);
36413
+ if (!ret) process$4.kill(process$4.pid, s);
36520
36414
  }
36521
36415
  };
36522
- this.#originalProcessReallyExit = process$5.reallyExit;
36523
- this.#originalProcessEmit = process$5.emit;
36416
+ this.#originalProcessReallyExit = process$4.reallyExit;
36417
+ this.#originalProcessEmit = process$4.emit;
36524
36418
  }
36525
36419
  onExit(cb, opts) {
36526
36420
  /* c8 ignore start */
@@ -36587,8 +36481,8 @@ var SignalExit = class extends SignalExitBase {
36587
36481
  } else return og.call(this.#process, ev, ...args);
36588
36482
  }
36589
36483
  };
36590
- const process$2 = globalThis.process;
36591
- const { onExit, load, unload } = signalExitWrap(processOk(process$2) ? new SignalExit(process$2) : new SignalExitFallback());
36484
+ const process$1 = globalThis.process;
36485
+ const { onExit, load, unload } = signalExitWrap(processOk(process$1) ? new SignalExit(process$1) : new SignalExitFallback());
36592
36486
 
36593
36487
  //#endregion
36594
36488
  //#region node_modules/execa/lib/terminate/cleanup.js
@@ -38345,9 +38239,8 @@ async function getDefaultTemplate() {
38345
38239
  return template;
38346
38240
  }
38347
38241
  function validateNonInteractiveFlags$1(command) {
38348
- const { name: name$1, path: path$17, json } = command.optsWithGlobals();
38242
+ const { name: name$1, path: path$17 } = command.opts();
38349
38243
  const providedCount = [name$1, path$17].filter(Boolean).length;
38350
- if (json && providedCount < 2) command.error("JSON mode requires all flags: --name, --path");
38351
38244
  if (providedCount > 0 && providedCount < 2) command.error("Non-interactive mode requires all flags: --name, --path");
38352
38245
  }
38353
38246
  async function chooseCreate(options) {
@@ -38465,20 +38358,10 @@ async function executeCreate({ template, name: rawName, description, projectPath
38465
38358
  }
38466
38359
  }
38467
38360
  const dashboardUrl = `${getBase44ApiUrl()}/apps/${projectId}/editor/preview`;
38468
- if (!isJsonMode()) {
38469
- M.message(`${theme.styles.header("Project")}: ${theme.colors.base44Orange(name$1)}`);
38470
- M.message(`${theme.styles.header("Dashboard")}: ${theme.colors.links(dashboardUrl)}`);
38471
- if (finalAppUrl) M.message(`${theme.styles.header("Site")}: ${theme.colors.links(finalAppUrl)}`);
38472
- }
38473
- return {
38474
- outroMessage: "Your project is set up and ready to use",
38475
- data: {
38476
- projectId,
38477
- path: resolvedPath,
38478
- dashboardUrl,
38479
- ...finalAppUrl && { appUrl: finalAppUrl }
38480
- }
38481
- };
38361
+ M.message(`${theme.styles.header("Project")}: ${theme.colors.base44Orange(name$1)}`);
38362
+ M.message(`${theme.styles.header("Dashboard")}: ${theme.colors.links(dashboardUrl)}`);
38363
+ if (finalAppUrl) M.message(`${theme.styles.header("Site")}: ${theme.colors.links(finalAppUrl)}`);
38364
+ return { outroMessage: "Your project is set up and ready to use" };
38482
38365
  }
38483
38366
  const createCommand = new Command("create").description("Create a new Base44 project").option("-n, --name <name>", "Project name").option("-d, --description <description>", "Project description").option("-p, --path <path>", "Path where to create the project").option("--deploy", "Build and deploy the site").hook("preAction", validateNonInteractiveFlags$1).action(async (options) => {
38484
38367
  await chooseCreate(options);
@@ -38526,7 +38409,7 @@ function isInsideContainer() {
38526
38409
  //#endregion
38527
38410
  //#region node_modules/is-wsl/index.js
38528
38411
  const isWsl = () => {
38529
- if (process$1.platform !== "linux") return false;
38412
+ if (y.platform !== "linux") return false;
38530
38413
  if (os.release().toLowerCase().includes("microsoft")) {
38531
38414
  if (isInsideContainer()) return false;
38532
38415
  return true;
@@ -38537,12 +38420,12 @@ const isWsl = () => {
38537
38420
  return false;
38538
38421
  }
38539
38422
  };
38540
- var is_wsl_default = process$1.env.__IS_WSL_TEST__ ? isWsl : isWsl();
38423
+ var is_wsl_default = y.env.__IS_WSL_TEST__ ? isWsl : isWsl();
38541
38424
 
38542
38425
  //#endregion
38543
38426
  //#region node_modules/powershell-utils/index.js
38544
38427
  const execFile$2 = promisify(childProcess.execFile);
38545
- const powerShellPath$1 = () => `${process$1.env.SYSTEMROOT || process$1.env.windir || String.raw`C:\Windows`}\\System32\\WindowsPowerShell\\v1.0\\powershell.exe`;
38428
+ const powerShellPath$1 = () => `${y.env.SYSTEMROOT || y.env.windir || String.raw`C:\Windows`}\\System32\\WindowsPowerShell\\v1.0\\powershell.exe`;
38546
38429
  const executePowerShell = async (command, options = {}) => {
38547
38430
  const { powerShellPath: psPath, ...execFileOptions } = options;
38548
38431
  const encodedCommand = executePowerShell.encodeCommand(command);
@@ -38653,7 +38536,7 @@ function defineLazyProperty(object$1, propertyName, valueGetter) {
38653
38536
  //#region node_modules/default-browser-id/index.js
38654
38537
  const execFileAsync$3 = promisify(execFile);
38655
38538
  async function defaultBrowserId() {
38656
- if (process$1.platform !== "darwin") throw new Error("macOS only");
38539
+ if (y.platform !== "darwin") throw new Error("macOS only");
38657
38540
  const { stdout: stdout$1 } = await execFileAsync$3("defaults", [
38658
38541
  "read",
38659
38542
  "com.apple.LaunchServices/com.apple.launchservices.secure",
@@ -38668,7 +38551,7 @@ async function defaultBrowserId() {
38668
38551
  //#region node_modules/run-applescript/index.js
38669
38552
  const execFileAsync$2 = promisify(execFile);
38670
38553
  async function runAppleScript(script, { humanReadableOutput = true, signal } = {}) {
38671
- if (process$1.platform !== "darwin") throw new Error("macOS only");
38554
+ if (y.platform !== "darwin") throw new Error("macOS only");
38672
38555
  const outputArguments = humanReadableOutput ? [] : ["-ss"];
38673
38556
  const execOptions = {};
38674
38557
  if (signal) execOptions.signal = signal;
@@ -38777,14 +38660,14 @@ async function defaultBrowser$1(_execFileAsync = execFileAsync$1) {
38777
38660
  const execFileAsync = promisify(execFile);
38778
38661
  const titleize = (string$2) => string$2.toLowerCase().replaceAll(/(?:^|\s|-)\S/g, (x$2) => x$2.toUpperCase());
38779
38662
  async function defaultBrowser() {
38780
- if (process$1.platform === "darwin") {
38663
+ if (y.platform === "darwin") {
38781
38664
  const id = await defaultBrowserId();
38782
38665
  return {
38783
38666
  name: await bundleName(id),
38784
38667
  id
38785
38668
  };
38786
38669
  }
38787
- if (process$1.platform === "linux") {
38670
+ if (y.platform === "linux") {
38788
38671
  const { stdout: stdout$1 } = await execFileAsync("xdg-mime", [
38789
38672
  "query",
38790
38673
  "default",
@@ -38796,13 +38679,13 @@ async function defaultBrowser() {
38796
38679
  id
38797
38680
  };
38798
38681
  }
38799
- if (process$1.platform === "win32") return defaultBrowser$1();
38682
+ if (y.platform === "win32") return defaultBrowser$1();
38800
38683
  throw new Error("Only macOS, Linux, and Windows are supported");
38801
38684
  }
38802
38685
 
38803
38686
  //#endregion
38804
38687
  //#region node_modules/is-in-ssh/index.js
38805
- const isInSsh = Boolean(process$1.env.SSH_CONNECTION || process$1.env.SSH_CLIENT || process$1.env.SSH_TTY);
38688
+ const isInSsh = Boolean(y.env.SSH_CONNECTION || y.env.SSH_CLIENT || y.env.SSH_TTY);
38806
38689
  var is_in_ssh_default = isInSsh;
38807
38690
 
38808
38691
  //#endregion
@@ -38810,7 +38693,7 @@ var is_in_ssh_default = isInSsh;
38810
38693
  const fallbackAttemptSymbol = Symbol("fallbackAttempt");
38811
38694
  const __dirname = import.meta.url ? path.dirname(fileURLToPath(import.meta.url)) : "";
38812
38695
  const localXdgOpenPath = path.join(__dirname, "xdg-open");
38813
- const { platform: platform$1, arch } = process$1;
38696
+ const { platform: platform$1, arch } = y;
38814
38697
  const tryEachApp = async (apps$1, opener) => {
38815
38698
  if (apps$1.length === 0) return;
38816
38699
  const errors = [];
@@ -38923,7 +38806,7 @@ const baseOpen = async (options) => {
38923
38806
  await fs$2.access(localXdgOpenPath, constants$1.X_OK);
38924
38807
  exeLocalXdgOpen = true;
38925
38808
  } catch {}
38926
- command = process$1.versions.electron ?? (platform$1 === "android" || isBundled || !exeLocalXdgOpen) ? "xdg-open" : localXdgOpenPath;
38809
+ command = y.versions.electron ?? (platform$1 === "android" || isBundled || !exeLocalXdgOpen) ? "xdg-open" : localXdgOpenPath;
38927
38810
  }
38928
38811
  if (appArguments.length > 0) cliArguments.push(...appArguments);
38929
38812
  if (!options.wait) {
@@ -39025,27 +38908,22 @@ var open_default = open;
39025
38908
 
39026
38909
  //#endregion
39027
38910
  //#region src/cli/commands/project/dashboard.ts
39028
- async function openDashboard(options) {
38911
+ async function openDashboard() {
39029
38912
  await loadProjectEnv();
39030
38913
  const projectId = getBase44ClientId();
39031
38914
  if (!projectId) throw new Error("App not configured. BASE44_CLIENT_ID environment variable is required. Set it in your .env.local file.");
39032
38915
  const dashboardUrl = `${getBase44ApiUrl()}/apps/${projectId}/editor/workspace/overview`;
39033
- const shouldOpen = !isJsonMode() && !options.noOpen;
39034
- if (shouldOpen) await open_default(dashboardUrl);
39035
- return {
39036
- outroMessage: shouldOpen ? `Dashboard opened at ${dashboardUrl}` : `Dashboard URL: ${dashboardUrl}`,
39037
- data: { dashboardUrl }
39038
- };
38916
+ await open_default(dashboardUrl);
38917
+ return { outroMessage: `Dashboard opened at ${dashboardUrl}` };
39039
38918
  }
39040
- const dashboardCommand = new Command("dashboard").description("Open the app dashboard in your browser").option("--no-open", "Print the URL without opening the browser").action(async (options) => {
39041
- await runCommand(() => openDashboard(options), { requireAuth: true });
38919
+ const dashboardCommand = new Command("dashboard").description("Open the app dashboard in your browser").action(async () => {
38920
+ await runCommand(openDashboard, { requireAuth: true });
39042
38921
  });
39043
38922
 
39044
38923
  //#endregion
39045
38924
  //#region src/cli/commands/project/link.ts
39046
38925
  function validateNonInteractiveFlags(command) {
39047
- const { create: create$1, name: name$1, json } = command.optsWithGlobals();
39048
- if (json && (!create$1 || !name$1)) command.error("JSON mode requires flags: --create, --name");
38926
+ const { create: create$1, name: name$1 } = command.opts();
39049
38927
  if (create$1 && !name$1) command.error("--name is required when using --create");
39050
38928
  }
39051
38929
  async function promptForProjectDetails() {
@@ -39094,14 +38972,8 @@ async function link(options) {
39094
38972
  });
39095
38973
  await writeEnvLocal(projectRoot.root, projectId);
39096
38974
  const dashboardUrl = `${getBase44ApiUrl()}/apps/${projectId}/editor/workspace/overview`;
39097
- if (!isJsonMode()) M.message(`${theme.styles.header("Dashboard")}: ${theme.colors.links(dashboardUrl)}`);
39098
- return {
39099
- outroMessage: "Project linked",
39100
- data: {
39101
- projectId,
39102
- dashboardUrl
39103
- }
39104
- };
38975
+ M.message(`${theme.styles.header("Dashboard")}: ${theme.colors.links(dashboardUrl)}`);
38976
+ return { outroMessage: "Project linked" };
39105
38977
  }
39106
38978
  const linkCommand = new Command("link").description("Link a local project to a Base44 project").option("-c, --create", "Create a new project (skip selection prompt)").option("-n, --name <name>", "Project name (required when --create is used)").option("-d, --description <description>", "Project description").hook("preAction", validateNonInteractiveFlags).action(async (options) => {
39107
38979
  await runCommand(() => link(options), { requireAuth: true });
@@ -39113,23 +38985,16 @@ async function deployAction(options) {
39113
38985
  const { project } = await readProjectConfig();
39114
38986
  if (!project.site?.outputDirectory) throw new Error("No site configuration found. Please add 'site.outputDirectory' to your config.jsonc");
39115
38987
  const outputDir = resolve(project.root, project.site.outputDirectory);
39116
- if (!options.yes && !isJsonMode()) {
38988
+ if (!options.yes) {
39117
38989
  const shouldDeploy = await ye({ message: `Deploy site from ${project.site.outputDirectory}?` });
39118
- if (pD(shouldDeploy) || !shouldDeploy) return {
39119
- outroMessage: "Deployment cancelled",
39120
- data: { cancelled: true }
39121
- };
38990
+ if (pD(shouldDeploy) || !shouldDeploy) return { outroMessage: "Deployment cancelled" };
39122
38991
  }
39123
- const result = await runTask("Creating archive and deploying site...", async () => {
38992
+ return { outroMessage: `Visit your site at: ${(await runTask("Creating archive and deploying site...", async () => {
39124
38993
  return await deploySite(outputDir);
39125
38994
  }, {
39126
38995
  successMessage: "Site deployed successfully",
39127
38996
  errorMessage: "Deployment failed"
39128
- });
39129
- return {
39130
- outroMessage: `Visit your site at: ${result.appUrl}`,
39131
- data: { appUrl: result.appUrl }
39132
- };
38997
+ })).appUrl}` };
39133
38998
  }
39134
38999
  const siteDeployCommand = new Command("site").description("Manage site deployments").addCommand(new Command("deploy").description("Deploy built site files to Base44 hosting").option("-y, --yes", "Skip confirmation prompt").action(async (options) => {
39135
39000
  await runCommand(() => deployAction(options), { requireAuth: true });
@@ -39142,10 +39007,7 @@ var version = "0.0.13";
39142
39007
  //#endregion
39143
39008
  //#region src/cli/index.ts
39144
39009
  const program = new Command();
39145
- program.name("base44").description("Base44 CLI - Unified interface for managing Base44 applications").version(version).option("--json", "Output results as JSON (for scripting)");
39146
- program.hook("preAction", (thisCommand) => {
39147
- if (thisCommand.optsWithGlobals().json) setJsonMode(true);
39148
- });
39010
+ program.name("base44").description("Base44 CLI - Unified interface for managing Base44 applications").version(version);
39149
39011
  program.configureHelp({ sortSubcommands: true });
39150
39012
  program.addCommand(loginCommand);
39151
39013
  program.addCommand(whoamiCommand);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@base44-preview/cli",
3
- "version": "0.0.13-pr.87.2565e16",
3
+ "version": "0.0.13-pr.89.1804f37",
4
4
  "description": "Base44 CLI - Unified interface for managing Base44 applications",
5
5
  "type": "module",
6
6
  "main": "./dist/cli/index.js",