@base44-preview/cli 0.0.25-pr.149.d56648c → 0.0.25-pr.151.082c391
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +341 -99
- package/package.json +3 -2
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
|
|
6
|
+
import process$1, { 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$
|
|
896
|
+
const process$4 = __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$
|
|
948
|
-
writeErr: (str) => process$
|
|
949
|
-
getOutHelpWidth: () => process$
|
|
950
|
-
getErrHelpWidth: () => process$
|
|
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,
|
|
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$
|
|
1304
|
+
process$4.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$
|
|
1644
|
-
const execArgv$1 = process$
|
|
1643
|
+
if (process$4.versions?.electron) parseOptions.from = "electron";
|
|
1644
|
+
const execArgv$1 = process$4.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$
|
|
1647
|
+
if (argv === void 0) argv = process$4.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$
|
|
1657
|
+
if (process$4.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$
|
|
1771
|
+
if (process$4.platform !== "win32") if (launchWithNode) {
|
|
1772
1772
|
args.unshift(executableFile);
|
|
1773
|
-
args = incrementNodeInspectorPort(process$
|
|
1774
|
-
proc$1 = childProcess$1.spawn(process$
|
|
1773
|
+
args = incrementNodeInspectorPort(process$4.execArgv).concat(args);
|
|
1774
|
+
proc$1 = childProcess$1.spawn(process$4.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$
|
|
1779
|
-
proc$1 = childProcess$1.spawn(process$
|
|
1778
|
+
args = incrementNodeInspectorPort(process$4.execArgv).concat(args);
|
|
1779
|
+
proc$1 = childProcess$1.spawn(process$4.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$
|
|
1788
|
+
process$4.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$
|
|
1795
|
+
if (!exitCallback) process$4.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$
|
|
1807
|
+
if (!exitCallback) process$4.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$
|
|
2213
|
+
if (option.envVar && option.envVar in process$4.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$
|
|
2219
|
+
].includes(this.getOptionValueSource(optionKey))) if (option.required || option.optional) this.emit(`optionEnv:${option.name()}`, process$4.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$
|
|
2598
|
+
let exitCode = process$4.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$
|
|
2715
|
-
if (!y$
|
|
2716
|
-
return `${CSI}${y$
|
|
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`;
|
|
2717
2717
|
},
|
|
2718
|
-
move(x$2, y$
|
|
2718
|
+
move(x$2, y$1) {
|
|
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$
|
|
2723
|
-
else if (y$
|
|
2722
|
+
if (y$1 < 0) ret += `${CSI}${-y$1}A`;
|
|
2723
|
+
else if (y$1 > 0) ret += `${CSI}${y$1}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
|
|
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) => {
|
|
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
|
|
3039
|
+
i$1 ? n$1 === y && (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$1 = "\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
|
|
3081
|
+
const { groups: c$1 } = (/* @__PURE__ */ new RegExp(`(?:\\${V$1}(?<code>\\d+)m|\\${_$1}(?<uri>.*)${y})`)).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
|
|
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";
|
|
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) {
|
|
@@ -5927,6 +5927,24 @@ const $ZodEnum = /* @__PURE__ */ $constructor("$ZodEnum", (inst, def) => {
|
|
|
5927
5927
|
return payload;
|
|
5928
5928
|
};
|
|
5929
5929
|
});
|
|
5930
|
+
const $ZodLiteral = /* @__PURE__ */ $constructor("$ZodLiteral", (inst, def) => {
|
|
5931
|
+
$ZodType.init(inst, def);
|
|
5932
|
+
if (def.values.length === 0) throw new Error("Cannot create literal schema with no valid values");
|
|
5933
|
+
const values = new Set(def.values);
|
|
5934
|
+
inst._zod.values = values;
|
|
5935
|
+
inst._zod.pattern = /* @__PURE__ */ new RegExp(`^(${def.values.map((o$2) => typeof o$2 === "string" ? escapeRegex(o$2) : o$2 ? escapeRegex(o$2.toString()) : String(o$2)).join("|")})$`);
|
|
5936
|
+
inst._zod.parse = (payload, _ctx) => {
|
|
5937
|
+
const input = payload.value;
|
|
5938
|
+
if (values.has(input)) return payload;
|
|
5939
|
+
payload.issues.push({
|
|
5940
|
+
code: "invalid_value",
|
|
5941
|
+
values: def.values,
|
|
5942
|
+
input,
|
|
5943
|
+
inst
|
|
5944
|
+
});
|
|
5945
|
+
return payload;
|
|
5946
|
+
};
|
|
5947
|
+
});
|
|
5930
5948
|
const $ZodTransform = /* @__PURE__ */ $constructor("$ZodTransform", (inst, def) => {
|
|
5931
5949
|
$ZodType.init(inst, def);
|
|
5932
5950
|
inst._zod.parse = (payload, ctx) => {
|
|
@@ -6122,6 +6140,17 @@ function handleReadonlyResult(payload) {
|
|
|
6122
6140
|
payload.value = Object.freeze(payload.value);
|
|
6123
6141
|
return payload;
|
|
6124
6142
|
}
|
|
6143
|
+
const $ZodLazy = /* @__PURE__ */ $constructor("$ZodLazy", (inst, def) => {
|
|
6144
|
+
$ZodType.init(inst, def);
|
|
6145
|
+
defineLazy(inst._zod, "innerType", () => def.getter());
|
|
6146
|
+
defineLazy(inst._zod, "pattern", () => inst._zod.innerType?._zod?.pattern);
|
|
6147
|
+
defineLazy(inst._zod, "propValues", () => inst._zod.innerType?._zod?.propValues);
|
|
6148
|
+
defineLazy(inst._zod, "optin", () => inst._zod.innerType?._zod?.optin ?? void 0);
|
|
6149
|
+
defineLazy(inst._zod, "optout", () => inst._zod.innerType?._zod?.optout ?? void 0);
|
|
6150
|
+
inst._zod.parse = (payload, ctx) => {
|
|
6151
|
+
return inst._zod.innerType._zod.run(payload, ctx);
|
|
6152
|
+
};
|
|
6153
|
+
});
|
|
6125
6154
|
const $ZodCustom = /* @__PURE__ */ $constructor("$ZodCustom", (inst, def) => {
|
|
6126
6155
|
$ZodCheck.init(inst, def);
|
|
6127
6156
|
$ZodType.init(inst, def);
|
|
@@ -6744,7 +6773,7 @@ function initializeContext(params) {
|
|
|
6744
6773
|
external: params?.external ?? void 0
|
|
6745
6774
|
};
|
|
6746
6775
|
}
|
|
6747
|
-
function process$
|
|
6776
|
+
function process$3(schema, ctx, _params = {
|
|
6748
6777
|
path: [],
|
|
6749
6778
|
schemaPath: []
|
|
6750
6779
|
}) {
|
|
@@ -6781,7 +6810,7 @@ function process$2(schema, ctx, _params = {
|
|
|
6781
6810
|
const parent = schema._zod.parent;
|
|
6782
6811
|
if (parent) {
|
|
6783
6812
|
if (!result.ref) result.ref = parent;
|
|
6784
|
-
process$
|
|
6813
|
+
process$3(parent, ctx, params);
|
|
6785
6814
|
ctx.seen.get(parent).isParent = true;
|
|
6786
6815
|
}
|
|
6787
6816
|
}
|
|
@@ -6993,7 +7022,7 @@ const createToJSONSchemaMethod = (schema, processors = {}) => (params) => {
|
|
|
6993
7022
|
...params,
|
|
6994
7023
|
processors
|
|
6995
7024
|
});
|
|
6996
|
-
process$
|
|
7025
|
+
process$3(schema, ctx);
|
|
6997
7026
|
extractDefs(ctx, schema);
|
|
6998
7027
|
return finalize(ctx, schema);
|
|
6999
7028
|
};
|
|
@@ -7005,7 +7034,7 @@ const createStandardJSONSchemaMethod = (schema, io, processors = {}) => (params)
|
|
|
7005
7034
|
io,
|
|
7006
7035
|
processors
|
|
7007
7036
|
});
|
|
7008
|
-
process$
|
|
7037
|
+
process$3(schema, ctx);
|
|
7009
7038
|
extractDefs(ctx, schema);
|
|
7010
7039
|
return finalize(ctx, schema);
|
|
7011
7040
|
};
|
|
@@ -7079,6 +7108,27 @@ const enumProcessor = (schema, _ctx, json, _params) => {
|
|
|
7079
7108
|
if (values.every((v$1) => typeof v$1 === "string")) json.type = "string";
|
|
7080
7109
|
json.enum = values;
|
|
7081
7110
|
};
|
|
7111
|
+
const literalProcessor = (schema, ctx, json, _params) => {
|
|
7112
|
+
const def = schema._zod.def;
|
|
7113
|
+
const vals = [];
|
|
7114
|
+
for (const val of def.values) if (val === void 0) {
|
|
7115
|
+
if (ctx.unrepresentable === "throw") throw new Error("Literal `undefined` cannot be represented in JSON Schema");
|
|
7116
|
+
} else if (typeof val === "bigint") if (ctx.unrepresentable === "throw") throw new Error("BigInt literals cannot be represented in JSON Schema");
|
|
7117
|
+
else vals.push(Number(val));
|
|
7118
|
+
else vals.push(val);
|
|
7119
|
+
if (vals.length === 0) {} else if (vals.length === 1) {
|
|
7120
|
+
const val = vals[0];
|
|
7121
|
+
json.type = val === null ? "null" : typeof val;
|
|
7122
|
+
if (ctx.target === "draft-04" || ctx.target === "openapi-3.0") json.enum = [val];
|
|
7123
|
+
else json.const = val;
|
|
7124
|
+
} else {
|
|
7125
|
+
if (vals.every((v$1) => typeof v$1 === "number")) json.type = "number";
|
|
7126
|
+
if (vals.every((v$1) => typeof v$1 === "string")) json.type = "string";
|
|
7127
|
+
if (vals.every((v$1) => typeof v$1 === "boolean")) json.type = "boolean";
|
|
7128
|
+
if (vals.every((v$1) => v$1 === null)) json.type = "null";
|
|
7129
|
+
json.enum = vals;
|
|
7130
|
+
}
|
|
7131
|
+
};
|
|
7082
7132
|
const customProcessor = (_schema, ctx, _json, _params) => {
|
|
7083
7133
|
if (ctx.unrepresentable === "throw") throw new Error("Custom types cannot be represented in JSON Schema");
|
|
7084
7134
|
};
|
|
@@ -7092,7 +7142,7 @@ const arrayProcessor = (schema, ctx, _json, params) => {
|
|
|
7092
7142
|
if (typeof minimum === "number") json.minItems = minimum;
|
|
7093
7143
|
if (typeof maximum === "number") json.maxItems = maximum;
|
|
7094
7144
|
json.type = "array";
|
|
7095
|
-
json.items = process$
|
|
7145
|
+
json.items = process$3(def.element, ctx, {
|
|
7096
7146
|
...params,
|
|
7097
7147
|
path: [...params.path, "items"]
|
|
7098
7148
|
});
|
|
@@ -7103,7 +7153,7 @@ const objectProcessor = (schema, ctx, _json, params) => {
|
|
|
7103
7153
|
json.type = "object";
|
|
7104
7154
|
json.properties = {};
|
|
7105
7155
|
const shape = def.shape;
|
|
7106
|
-
for (const key in shape) json.properties[key] = process$
|
|
7156
|
+
for (const key in shape) json.properties[key] = process$3(shape[key], ctx, {
|
|
7107
7157
|
...params,
|
|
7108
7158
|
path: [
|
|
7109
7159
|
...params.path,
|
|
@@ -7121,7 +7171,7 @@ const objectProcessor = (schema, ctx, _json, params) => {
|
|
|
7121
7171
|
if (def.catchall?._zod.def.type === "never") json.additionalProperties = false;
|
|
7122
7172
|
else if (!def.catchall) {
|
|
7123
7173
|
if (ctx.io === "output") json.additionalProperties = false;
|
|
7124
|
-
} else if (def.catchall) json.additionalProperties = process$
|
|
7174
|
+
} else if (def.catchall) json.additionalProperties = process$3(def.catchall, ctx, {
|
|
7125
7175
|
...params,
|
|
7126
7176
|
path: [...params.path, "additionalProperties"]
|
|
7127
7177
|
});
|
|
@@ -7129,7 +7179,7 @@ const objectProcessor = (schema, ctx, _json, params) => {
|
|
|
7129
7179
|
const unionProcessor = (schema, ctx, json, params) => {
|
|
7130
7180
|
const def = schema._zod.def;
|
|
7131
7181
|
const isExclusive = def.inclusive === false;
|
|
7132
|
-
const options = def.options.map((x$2, i$1) => process$
|
|
7182
|
+
const options = def.options.map((x$2, i$1) => process$3(x$2, ctx, {
|
|
7133
7183
|
...params,
|
|
7134
7184
|
path: [
|
|
7135
7185
|
...params.path,
|
|
@@ -7142,7 +7192,7 @@ const unionProcessor = (schema, ctx, json, params) => {
|
|
|
7142
7192
|
};
|
|
7143
7193
|
const intersectionProcessor = (schema, ctx, json, params) => {
|
|
7144
7194
|
const def = schema._zod.def;
|
|
7145
|
-
const a$1 = process$
|
|
7195
|
+
const a$1 = process$3(def.left, ctx, {
|
|
7146
7196
|
...params,
|
|
7147
7197
|
path: [
|
|
7148
7198
|
...params.path,
|
|
@@ -7150,7 +7200,7 @@ const intersectionProcessor = (schema, ctx, json, params) => {
|
|
|
7150
7200
|
0
|
|
7151
7201
|
]
|
|
7152
7202
|
});
|
|
7153
|
-
const b$2 = process$
|
|
7203
|
+
const b$2 = process$3(def.right, ctx, {
|
|
7154
7204
|
...params,
|
|
7155
7205
|
path: [
|
|
7156
7206
|
...params.path,
|
|
@@ -7167,7 +7217,7 @@ const tupleProcessor = (schema, ctx, _json, params) => {
|
|
|
7167
7217
|
json.type = "array";
|
|
7168
7218
|
const prefixPath$1 = ctx.target === "draft-2020-12" ? "prefixItems" : "items";
|
|
7169
7219
|
const restPath = ctx.target === "draft-2020-12" ? "items" : ctx.target === "openapi-3.0" ? "items" : "additionalItems";
|
|
7170
|
-
const prefixItems = def.items.map((x$2, i$1) => process$
|
|
7220
|
+
const prefixItems = def.items.map((x$2, i$1) => process$3(x$2, ctx, {
|
|
7171
7221
|
...params,
|
|
7172
7222
|
path: [
|
|
7173
7223
|
...params.path,
|
|
@@ -7175,7 +7225,7 @@ const tupleProcessor = (schema, ctx, _json, params) => {
|
|
|
7175
7225
|
i$1
|
|
7176
7226
|
]
|
|
7177
7227
|
}));
|
|
7178
|
-
const rest = def.rest ? process$
|
|
7228
|
+
const rest = def.rest ? process$3(def.rest, ctx, {
|
|
7179
7229
|
...params,
|
|
7180
7230
|
path: [
|
|
7181
7231
|
...params.path,
|
|
@@ -7206,7 +7256,7 @@ const recordProcessor = (schema, ctx, _json, params) => {
|
|
|
7206
7256
|
const keyType = def.keyType;
|
|
7207
7257
|
const patterns = keyType._zod.bag?.patterns;
|
|
7208
7258
|
if (def.mode === "loose" && patterns && patterns.size > 0) {
|
|
7209
|
-
const valueSchema = process$
|
|
7259
|
+
const valueSchema = process$3(def.valueType, ctx, {
|
|
7210
7260
|
...params,
|
|
7211
7261
|
path: [
|
|
7212
7262
|
...params.path,
|
|
@@ -7217,11 +7267,11 @@ const recordProcessor = (schema, ctx, _json, params) => {
|
|
|
7217
7267
|
json.patternProperties = {};
|
|
7218
7268
|
for (const pattern of patterns) json.patternProperties[pattern.source] = valueSchema;
|
|
7219
7269
|
} else {
|
|
7220
|
-
if (ctx.target === "draft-07" || ctx.target === "draft-2020-12") json.propertyNames = process$
|
|
7270
|
+
if (ctx.target === "draft-07" || ctx.target === "draft-2020-12") json.propertyNames = process$3(def.keyType, ctx, {
|
|
7221
7271
|
...params,
|
|
7222
7272
|
path: [...params.path, "propertyNames"]
|
|
7223
7273
|
});
|
|
7224
|
-
json.additionalProperties = process$
|
|
7274
|
+
json.additionalProperties = process$3(def.valueType, ctx, {
|
|
7225
7275
|
...params,
|
|
7226
7276
|
path: [...params.path, "additionalProperties"]
|
|
7227
7277
|
});
|
|
@@ -7234,7 +7284,7 @@ const recordProcessor = (schema, ctx, _json, params) => {
|
|
|
7234
7284
|
};
|
|
7235
7285
|
const nullableProcessor = (schema, ctx, json, params) => {
|
|
7236
7286
|
const def = schema._zod.def;
|
|
7237
|
-
const inner = process$
|
|
7287
|
+
const inner = process$3(def.innerType, ctx, params);
|
|
7238
7288
|
const seen = ctx.seen.get(schema);
|
|
7239
7289
|
if (ctx.target === "openapi-3.0") {
|
|
7240
7290
|
seen.ref = def.innerType;
|
|
@@ -7243,27 +7293,27 @@ const nullableProcessor = (schema, ctx, json, params) => {
|
|
|
7243
7293
|
};
|
|
7244
7294
|
const nonoptionalProcessor = (schema, ctx, _json, params) => {
|
|
7245
7295
|
const def = schema._zod.def;
|
|
7246
|
-
process$
|
|
7296
|
+
process$3(def.innerType, ctx, params);
|
|
7247
7297
|
const seen = ctx.seen.get(schema);
|
|
7248
7298
|
seen.ref = def.innerType;
|
|
7249
7299
|
};
|
|
7250
7300
|
const defaultProcessor = (schema, ctx, json, params) => {
|
|
7251
7301
|
const def = schema._zod.def;
|
|
7252
|
-
process$
|
|
7302
|
+
process$3(def.innerType, ctx, params);
|
|
7253
7303
|
const seen = ctx.seen.get(schema);
|
|
7254
7304
|
seen.ref = def.innerType;
|
|
7255
7305
|
json.default = JSON.parse(JSON.stringify(def.defaultValue));
|
|
7256
7306
|
};
|
|
7257
7307
|
const prefaultProcessor = (schema, ctx, json, params) => {
|
|
7258
7308
|
const def = schema._zod.def;
|
|
7259
|
-
process$
|
|
7309
|
+
process$3(def.innerType, ctx, params);
|
|
7260
7310
|
const seen = ctx.seen.get(schema);
|
|
7261
7311
|
seen.ref = def.innerType;
|
|
7262
7312
|
if (ctx.io === "input") json._prefault = JSON.parse(JSON.stringify(def.defaultValue));
|
|
7263
7313
|
};
|
|
7264
7314
|
const catchProcessor = (schema, ctx, json, params) => {
|
|
7265
7315
|
const def = schema._zod.def;
|
|
7266
|
-
process$
|
|
7316
|
+
process$3(def.innerType, ctx, params);
|
|
7267
7317
|
const seen = ctx.seen.get(schema);
|
|
7268
7318
|
seen.ref = def.innerType;
|
|
7269
7319
|
let catchValue;
|
|
@@ -7277,23 +7327,29 @@ const catchProcessor = (schema, ctx, json, params) => {
|
|
|
7277
7327
|
const pipeProcessor = (schema, ctx, _json, params) => {
|
|
7278
7328
|
const def = schema._zod.def;
|
|
7279
7329
|
const innerType = ctx.io === "input" ? def.in._zod.def.type === "transform" ? def.out : def.in : def.out;
|
|
7280
|
-
process$
|
|
7330
|
+
process$3(innerType, ctx, params);
|
|
7281
7331
|
const seen = ctx.seen.get(schema);
|
|
7282
7332
|
seen.ref = innerType;
|
|
7283
7333
|
};
|
|
7284
7334
|
const readonlyProcessor = (schema, ctx, json, params) => {
|
|
7285
7335
|
const def = schema._zod.def;
|
|
7286
|
-
process$
|
|
7336
|
+
process$3(def.innerType, ctx, params);
|
|
7287
7337
|
const seen = ctx.seen.get(schema);
|
|
7288
7338
|
seen.ref = def.innerType;
|
|
7289
7339
|
json.readOnly = true;
|
|
7290
7340
|
};
|
|
7291
7341
|
const optionalProcessor = (schema, ctx, _json, params) => {
|
|
7292
7342
|
const def = schema._zod.def;
|
|
7293
|
-
process$
|
|
7343
|
+
process$3(def.innerType, ctx, params);
|
|
7294
7344
|
const seen = ctx.seen.get(schema);
|
|
7295
7345
|
seen.ref = def.innerType;
|
|
7296
7346
|
};
|
|
7347
|
+
const lazyProcessor = (schema, ctx, _json, params) => {
|
|
7348
|
+
const innerType = schema._zod.innerType;
|
|
7349
|
+
process$3(innerType, ctx, params);
|
|
7350
|
+
const seen = ctx.seen.get(schema);
|
|
7351
|
+
seen.ref = innerType;
|
|
7352
|
+
};
|
|
7297
7353
|
|
|
7298
7354
|
//#endregion
|
|
7299
7355
|
//#region node_modules/zod/v4/classic/iso.js
|
|
@@ -7709,6 +7765,14 @@ function object(shape, params) {
|
|
|
7709
7765
|
...normalizeParams(params)
|
|
7710
7766
|
});
|
|
7711
7767
|
}
|
|
7768
|
+
function strictObject(shape, params) {
|
|
7769
|
+
return new ZodObject({
|
|
7770
|
+
type: "object",
|
|
7771
|
+
shape,
|
|
7772
|
+
catchall: never(),
|
|
7773
|
+
...normalizeParams(params)
|
|
7774
|
+
});
|
|
7775
|
+
}
|
|
7712
7776
|
function looseObject(shape, params) {
|
|
7713
7777
|
return new ZodObject({
|
|
7714
7778
|
type: "object",
|
|
@@ -7813,6 +7877,23 @@ function _enum(values, params) {
|
|
|
7813
7877
|
...normalizeParams(params)
|
|
7814
7878
|
});
|
|
7815
7879
|
}
|
|
7880
|
+
const ZodLiteral = /* @__PURE__ */ $constructor("ZodLiteral", (inst, def) => {
|
|
7881
|
+
$ZodLiteral.init(inst, def);
|
|
7882
|
+
ZodType.init(inst, def);
|
|
7883
|
+
inst._zod.processJSONSchema = (ctx, json, params) => literalProcessor(inst, ctx, json, params);
|
|
7884
|
+
inst.values = new Set(def.values);
|
|
7885
|
+
Object.defineProperty(inst, "value", { get() {
|
|
7886
|
+
if (def.values.length > 1) throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");
|
|
7887
|
+
return def.values[0];
|
|
7888
|
+
} });
|
|
7889
|
+
});
|
|
7890
|
+
function literal(value, params) {
|
|
7891
|
+
return new ZodLiteral({
|
|
7892
|
+
type: "literal",
|
|
7893
|
+
values: Array.isArray(value) ? value : [value],
|
|
7894
|
+
...normalizeParams(params)
|
|
7895
|
+
});
|
|
7896
|
+
}
|
|
7816
7897
|
const ZodTransform = /* @__PURE__ */ $constructor("ZodTransform", (inst, def) => {
|
|
7817
7898
|
$ZodTransform.init(inst, def);
|
|
7818
7899
|
ZodType.init(inst, def);
|
|
@@ -7965,6 +8046,18 @@ function readonly(innerType) {
|
|
|
7965
8046
|
innerType
|
|
7966
8047
|
});
|
|
7967
8048
|
}
|
|
8049
|
+
const ZodLazy = /* @__PURE__ */ $constructor("ZodLazy", (inst, def) => {
|
|
8050
|
+
$ZodLazy.init(inst, def);
|
|
8051
|
+
ZodType.init(inst, def);
|
|
8052
|
+
inst._zod.processJSONSchema = (ctx, json, params) => lazyProcessor(inst, ctx, json, params);
|
|
8053
|
+
inst.unwrap = () => inst._zod.def.getter();
|
|
8054
|
+
});
|
|
8055
|
+
function lazy(getter) {
|
|
8056
|
+
return new ZodLazy({
|
|
8057
|
+
type: "lazy",
|
|
8058
|
+
getter
|
|
8059
|
+
});
|
|
8060
|
+
}
|
|
7968
8061
|
const ZodCustom = /* @__PURE__ */ $constructor("ZodCustom", (inst, def) => {
|
|
7969
8062
|
$ZodCustom.init(inst, def);
|
|
7970
8063
|
ZodType.init(inst, def);
|
|
@@ -16335,7 +16428,7 @@ const createIgnorePredicate = (patterns, cwd, baseDir) => {
|
|
|
16335
16428
|
};
|
|
16336
16429
|
const normalizeOptions$2 = (options = {}) => {
|
|
16337
16430
|
const ignoreOption = options.ignore ? Array.isArray(options.ignore) ? options.ignore : [options.ignore] : [];
|
|
16338
|
-
const cwd = toPath$1(options.cwd) ??
|
|
16431
|
+
const cwd = toPath$1(options.cwd) ?? process$1.cwd();
|
|
16339
16432
|
const deep = typeof options.deep === "number" ? Math.max(0, options.deep) + 1 : Number.POSITIVE_INFINITY;
|
|
16340
16433
|
return {
|
|
16341
16434
|
cwd,
|
|
@@ -16432,7 +16525,7 @@ const getDirectoryGlob = ({ directoryPath, files, extensions }) => {
|
|
|
16432
16525
|
const extensionGlob = extensions?.length > 0 ? `.${extensions.length > 1 ? `{${extensions.join(",")}}` : extensions[0]}` : "";
|
|
16433
16526
|
return files ? files.map((file) => path.posix.join(directoryPath, `**/${path.extname(file) ? file : `${file}${extensionGlob}`}`)) : [path.posix.join(directoryPath, `**${extensionGlob ? `/*${extensionGlob}` : ""}`)];
|
|
16434
16527
|
};
|
|
16435
|
-
const directoryToGlob = async (directoryPaths, { cwd =
|
|
16528
|
+
const directoryToGlob = async (directoryPaths, { cwd = process$1.cwd(), files, extensions, fs: fsImplementation } = {}) => {
|
|
16436
16529
|
return (await Promise.all(directoryPaths.map(async (directoryPath) => {
|
|
16437
16530
|
if (shouldExpandGlobstarDirectory(isNegativePattern(directoryPath) ? directoryPath.slice(1) : directoryPath)) return getDirectoryGlob({
|
|
16438
16531
|
directoryPath,
|
|
@@ -16446,7 +16539,7 @@ const directoryToGlob = async (directoryPaths, { cwd = y.cwd(), files, extension
|
|
|
16446
16539
|
}) : directoryPath;
|
|
16447
16540
|
}))).flat();
|
|
16448
16541
|
};
|
|
16449
|
-
const directoryToGlobSync = (directoryPaths, { cwd =
|
|
16542
|
+
const directoryToGlobSync = (directoryPaths, { cwd = process$1.cwd(), files, extensions, fs: fsImplementation } = {}) => directoryPaths.flatMap((directoryPath) => {
|
|
16450
16543
|
if (shouldExpandGlobstarDirectory(isNegativePattern(directoryPath) ? directoryPath.slice(1) : directoryPath)) return getDirectoryGlob({
|
|
16451
16544
|
directoryPath,
|
|
16452
16545
|
files,
|
|
@@ -16542,7 +16635,7 @@ const applyIgnoreFilesAndGetFilterSync = (options) => {
|
|
|
16542
16635
|
};
|
|
16543
16636
|
const createFilterFunction = (isIgnored, cwd) => {
|
|
16544
16637
|
const seen = /* @__PURE__ */ new Set();
|
|
16545
|
-
const basePath = cwd ||
|
|
16638
|
+
const basePath = cwd || process$1.cwd();
|
|
16546
16639
|
const pathCache = /* @__PURE__ */ new Map();
|
|
16547
16640
|
return (fastGlobResult) => {
|
|
16548
16641
|
const pathKey$1 = path.normalize(fastGlobResult.path ?? fastGlobResult);
|
|
@@ -16666,7 +16759,151 @@ const { convertPathToPattern } = import_out.default;
|
|
|
16666
16759
|
|
|
16667
16760
|
//#endregion
|
|
16668
16761
|
//#region src/core/resources/entity/schema.ts
|
|
16669
|
-
|
|
16762
|
+
/**
|
|
16763
|
+
* Operator-based field condition (e.g., { $in: "{{user.id}}" })
|
|
16764
|
+
*/
|
|
16765
|
+
const FieldConditionOperatorSchema = object({
|
|
16766
|
+
$in: unknown().optional(),
|
|
16767
|
+
$nin: unknown().optional(),
|
|
16768
|
+
$ne: unknown().optional(),
|
|
16769
|
+
$all: unknown().optional()
|
|
16770
|
+
});
|
|
16771
|
+
/**
|
|
16772
|
+
* Field condition - either a string value/template or an operator object
|
|
16773
|
+
*/
|
|
16774
|
+
const FieldConditionSchema = union([string(), FieldConditionOperatorSchema]);
|
|
16775
|
+
/**
|
|
16776
|
+
* User condition for direct property checks (equality only)
|
|
16777
|
+
* Supports: role, email, id, and data.* pattern properties
|
|
16778
|
+
*/
|
|
16779
|
+
const UserConditionSchema = object({
|
|
16780
|
+
role: string().optional(),
|
|
16781
|
+
email: string().optional(),
|
|
16782
|
+
id: string().optional()
|
|
16783
|
+
}).catchall(unknown()).refine((obj) => {
|
|
16784
|
+
const allowedKeys = new Set([
|
|
16785
|
+
"role",
|
|
16786
|
+
"email",
|
|
16787
|
+
"id"
|
|
16788
|
+
]);
|
|
16789
|
+
const dataPattern = /^data\.[a-zA-Z0-9_]+$/;
|
|
16790
|
+
for (const key of Object.keys(obj)) if (!allowedKeys.has(key) && !dataPattern.test(key)) return false;
|
|
16791
|
+
return true;
|
|
16792
|
+
}, { message: "User condition keys must be role, email, id, or match data.* pattern" });
|
|
16793
|
+
const RLSConditionSchema = lazy(() => object({
|
|
16794
|
+
user_condition: UserConditionSchema.optional(),
|
|
16795
|
+
$or: array(RLSConditionSchema).optional(),
|
|
16796
|
+
$and: array(RLSConditionSchema).optional(),
|
|
16797
|
+
$nor: array(RLSConditionSchema).optional(),
|
|
16798
|
+
created_by: FieldConditionSchema.optional(),
|
|
16799
|
+
created_by_id: FieldConditionSchema.optional()
|
|
16800
|
+
}).catchall(FieldConditionSchema).refine((obj) => {
|
|
16801
|
+
const allowedKeys = new Set([
|
|
16802
|
+
"user_condition",
|
|
16803
|
+
"$or",
|
|
16804
|
+
"$and",
|
|
16805
|
+
"$nor",
|
|
16806
|
+
"created_by",
|
|
16807
|
+
"created_by_id"
|
|
16808
|
+
]);
|
|
16809
|
+
const dataPattern = /^data\.[a-zA-Z0-9_.]+$/;
|
|
16810
|
+
for (const key of Object.keys(obj)) if (!allowedKeys.has(key) && !dataPattern.test(key)) return false;
|
|
16811
|
+
return true;
|
|
16812
|
+
}, { message: "RLS condition keys must be known fields or match data.* pattern" }));
|
|
16813
|
+
/**
|
|
16814
|
+
* RLS Rule - either a boolean or a condition object
|
|
16815
|
+
*/
|
|
16816
|
+
const RLSRuleSchema = union([boolean(), RLSConditionSchema]);
|
|
16817
|
+
/**
|
|
16818
|
+
* Entity-level RLS - controls which records users can access
|
|
16819
|
+
* Only allows: create, read, update, delete, write
|
|
16820
|
+
*/
|
|
16821
|
+
const EntityRLSSchema = strictObject({
|
|
16822
|
+
create: RLSRuleSchema.optional(),
|
|
16823
|
+
read: RLSRuleSchema.optional(),
|
|
16824
|
+
update: RLSRuleSchema.optional(),
|
|
16825
|
+
delete: RLSRuleSchema.optional(),
|
|
16826
|
+
write: RLSRuleSchema.optional()
|
|
16827
|
+
});
|
|
16828
|
+
/**
|
|
16829
|
+
* Field-level RLS - controls which fields users can access within records
|
|
16830
|
+
* Only allows: read, write, create, update, delete
|
|
16831
|
+
*/
|
|
16832
|
+
const FieldRLSSchema = strictObject({
|
|
16833
|
+
read: RLSRuleSchema.optional(),
|
|
16834
|
+
write: RLSRuleSchema.optional(),
|
|
16835
|
+
create: RLSRuleSchema.optional(),
|
|
16836
|
+
update: RLSRuleSchema.optional(),
|
|
16837
|
+
delete: RLSRuleSchema.optional()
|
|
16838
|
+
});
|
|
16839
|
+
/**
|
|
16840
|
+
* Property types supported by Base44 entities
|
|
16841
|
+
*/
|
|
16842
|
+
const PropertyTypeSchema = _enum([
|
|
16843
|
+
"string",
|
|
16844
|
+
"number",
|
|
16845
|
+
"integer",
|
|
16846
|
+
"boolean",
|
|
16847
|
+
"array",
|
|
16848
|
+
"object",
|
|
16849
|
+
"binary"
|
|
16850
|
+
]);
|
|
16851
|
+
/**
|
|
16852
|
+
* String format validation options
|
|
16853
|
+
*/
|
|
16854
|
+
const StringFormatSchema = _enum([
|
|
16855
|
+
"date",
|
|
16856
|
+
"date-time",
|
|
16857
|
+
"time",
|
|
16858
|
+
"email",
|
|
16859
|
+
"uri",
|
|
16860
|
+
"hostname",
|
|
16861
|
+
"ipv4",
|
|
16862
|
+
"ipv6",
|
|
16863
|
+
"uuid",
|
|
16864
|
+
"file",
|
|
16865
|
+
"regex"
|
|
16866
|
+
]);
|
|
16867
|
+
/**
|
|
16868
|
+
* Entity reference pattern: /entities/{EntityName}/id
|
|
16869
|
+
*/
|
|
16870
|
+
const EntityRefSchema = string().regex(/^\/entities\/[a-zA-Z0-9]+\/id$/, "Reference must match pattern /entities/{EntityName}/id");
|
|
16871
|
+
const PropertyDefinitionSchema = lazy(() => object({
|
|
16872
|
+
type: PropertyTypeSchema,
|
|
16873
|
+
title: string().optional(),
|
|
16874
|
+
description: string().optional(),
|
|
16875
|
+
minLength: number().int().min(0).optional(),
|
|
16876
|
+
maxLength: number().int().min(0).optional(),
|
|
16877
|
+
pattern: string().optional(),
|
|
16878
|
+
format: StringFormatSchema.optional(),
|
|
16879
|
+
minimum: number().optional(),
|
|
16880
|
+
maximum: number().optional(),
|
|
16881
|
+
enum: array(string()).optional(),
|
|
16882
|
+
enumNames: array(string()).optional(),
|
|
16883
|
+
default: unknown().optional(),
|
|
16884
|
+
$ref: EntityRefSchema.optional(),
|
|
16885
|
+
items: PropertyDefinitionSchema.optional(),
|
|
16886
|
+
properties: record(string(), PropertyDefinitionSchema).optional(),
|
|
16887
|
+
required: array(string()).optional(),
|
|
16888
|
+
rls: FieldRLSSchema.optional()
|
|
16889
|
+
}));
|
|
16890
|
+
/**
|
|
16891
|
+
* Entity name pattern: alphanumeric only, no spaces or special characters
|
|
16892
|
+
*/
|
|
16893
|
+
const EntityNameSchema = string().regex(/^[a-zA-Z0-9]+$/, "Entity name must be alphanumeric only");
|
|
16894
|
+
/**
|
|
16895
|
+
* Full Entity Schema for Base44 entity configuration
|
|
16896
|
+
* Defines data structures with validation, security rules, and relationships
|
|
16897
|
+
*/
|
|
16898
|
+
const EntitySchema = object({
|
|
16899
|
+
type: literal("object"),
|
|
16900
|
+
name: EntityNameSchema,
|
|
16901
|
+
title: string().optional(),
|
|
16902
|
+
description: string().optional(),
|
|
16903
|
+
properties: record(string(), PropertyDefinitionSchema),
|
|
16904
|
+
required: array(string()).optional(),
|
|
16905
|
+
rls: EntityRLSSchema.optional()
|
|
16906
|
+
});
|
|
16670
16907
|
const SyncEntitiesResponseSchema = object({
|
|
16671
16908
|
created: array(string()),
|
|
16672
16909
|
updated: array(string()),
|
|
@@ -16889,6 +17126,11 @@ async function writeAgents(agentsDir, remoteAgents) {
|
|
|
16889
17126
|
//#endregion
|
|
16890
17127
|
//#region src/core/resources/agent/api.ts
|
|
16891
17128
|
async function pushAgents(agents) {
|
|
17129
|
+
if (agents.length === 0) return {
|
|
17130
|
+
created: [],
|
|
17131
|
+
updated: [],
|
|
17132
|
+
deleted: []
|
|
17133
|
+
};
|
|
16892
17134
|
const response = await getAppClient().put("agent-configs", {
|
|
16893
17135
|
json: agents,
|
|
16894
17136
|
throwHttpErrors: false
|
|
@@ -31048,13 +31290,13 @@ var ansi_styles_default = ansiStyles;
|
|
|
31048
31290
|
|
|
31049
31291
|
//#endregion
|
|
31050
31292
|
//#region node_modules/chalk/source/vendor/supports-color/index.js
|
|
31051
|
-
function hasFlag(flag, argv = globalThis.Deno ? globalThis.Deno.args :
|
|
31293
|
+
function hasFlag(flag, argv = globalThis.Deno ? globalThis.Deno.args : process$1.argv) {
|
|
31052
31294
|
const prefix = flag.startsWith("-") ? "" : flag.length === 1 ? "-" : "--";
|
|
31053
31295
|
const position = argv.indexOf(prefix + flag);
|
|
31054
31296
|
const terminatorPosition = argv.indexOf("--");
|
|
31055
31297
|
return position !== -1 && (terminatorPosition === -1 || position < terminatorPosition);
|
|
31056
31298
|
}
|
|
31057
|
-
const { env } =
|
|
31299
|
+
const { env } = process$1;
|
|
31058
31300
|
let flagForceColor;
|
|
31059
31301
|
if (hasFlag("no-color") || hasFlag("no-colors") || hasFlag("color=false") || hasFlag("color=never")) flagForceColor = 0;
|
|
31060
31302
|
else if (hasFlag("color") || hasFlag("colors") || hasFlag("color=true") || hasFlag("color=always")) flagForceColor = 1;
|
|
@@ -31087,7 +31329,7 @@ function _supportsColor(haveStream, { streamIsTTY, sniffFlags = true } = {}) {
|
|
|
31087
31329
|
if (haveStream && !streamIsTTY && forceColor === void 0) return 0;
|
|
31088
31330
|
const min = forceColor || 0;
|
|
31089
31331
|
if (env.TERM === "dumb") return min;
|
|
31090
|
-
if (
|
|
31332
|
+
if (process$1.platform === "win32") {
|
|
31091
31333
|
const osRelease = os.release().split(".");
|
|
31092
31334
|
if (Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) return Number(osRelease[2]) >= 14931 ? 3 : 2;
|
|
31093
31335
|
return 1;
|
|
@@ -31878,9 +32120,9 @@ const getSubprocessResult = ({ stdout: stdout$1 }) => {
|
|
|
31878
32120
|
//#region node_modules/execa/lib/utils/standard-stream.js
|
|
31879
32121
|
const isStandardStream = (stream) => STANDARD_STREAMS.includes(stream);
|
|
31880
32122
|
const STANDARD_STREAMS = [
|
|
31881
|
-
|
|
31882
|
-
|
|
31883
|
-
|
|
32123
|
+
process$1.stdin,
|
|
32124
|
+
process$1.stdout,
|
|
32125
|
+
process$1.stderr
|
|
31884
32126
|
];
|
|
31885
32127
|
const STANDARD_STREAMS_ALIASES = [
|
|
31886
32128
|
"stdin",
|
|
@@ -32005,9 +32247,9 @@ const NO_ESCAPE_REGEXP = /^[\w./-]+$/;
|
|
|
32005
32247
|
//#endregion
|
|
32006
32248
|
//#region node_modules/is-unicode-supported/index.js
|
|
32007
32249
|
function isUnicodeSupported() {
|
|
32008
|
-
const { env: env$1 } =
|
|
32250
|
+
const { env: env$1 } = process$1;
|
|
32009
32251
|
const { TERM, TERM_PROGRAM } = env$1;
|
|
32010
|
-
if (
|
|
32252
|
+
if (process$1.platform !== "win32") return TERM !== "linux";
|
|
32011
32253
|
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";
|
|
32012
32254
|
}
|
|
32013
32255
|
|
|
@@ -32934,7 +33176,7 @@ const TEN_MEGABYTES_IN_BYTES = 10 * 1024 * 1024;
|
|
|
32934
33176
|
|
|
32935
33177
|
//#endregion
|
|
32936
33178
|
//#region node_modules/npm-run-path/index.js
|
|
32937
|
-
const npmRunPath = ({ cwd =
|
|
33179
|
+
const npmRunPath = ({ cwd = process$1.cwd(), path: pathOption = process$1.env[pathKey()], preferLocal = true, execPath: execPath$1 = process$1.execPath, addExecPath = true } = {}) => {
|
|
32938
33180
|
const cwdPath = path.resolve(toPath(cwd));
|
|
32939
33181
|
const result = [];
|
|
32940
33182
|
const pathParts = pathOption.split(path.delimiter);
|
|
@@ -32952,7 +33194,7 @@ const applyExecPath = (result, pathParts, execPath$1, cwdPath) => {
|
|
|
32952
33194
|
const pathPart = path.resolve(cwdPath, toPath(execPath$1), "..");
|
|
32953
33195
|
if (!pathParts.includes(pathPart)) result.push(pathPart);
|
|
32954
33196
|
};
|
|
32955
|
-
const npmRunPathEnv = ({ env: env$1 =
|
|
33197
|
+
const npmRunPathEnv = ({ env: env$1 = process$1.env, ...options } = {}) => {
|
|
32956
33198
|
env$1 = { ...env$1 };
|
|
32957
33199
|
const pathName = pathKey({ env: env$1 });
|
|
32958
33200
|
options.path = env$1[pathName];
|
|
@@ -34087,7 +34329,7 @@ const normalizeCwd = (cwd = getDefaultCwd()) => {
|
|
|
34087
34329
|
};
|
|
34088
34330
|
const getDefaultCwd = () => {
|
|
34089
34331
|
try {
|
|
34090
|
-
return
|
|
34332
|
+
return process$1.cwd();
|
|
34091
34333
|
} catch (error) {
|
|
34092
34334
|
error.message = `The current directory does not exist.\n${error.message}`;
|
|
34093
34335
|
throw error;
|
|
@@ -34122,7 +34364,7 @@ const normalizeOptions = (filePath, rawArguments, rawOptions) => {
|
|
|
34122
34364
|
options.killSignal = normalizeKillSignal(options.killSignal);
|
|
34123
34365
|
options.forceKillAfterDelay = normalizeForceKillAfterDelay(options.forceKillAfterDelay);
|
|
34124
34366
|
options.lines = options.lines.map((lines, fdNumber) => lines && !BINARY_ENCODINGS.has(options.encoding) && options.buffer[fdNumber]);
|
|
34125
|
-
if (
|
|
34367
|
+
if (process$1.platform === "win32" && path.basename(file, ".exe") === "cmd") commandArguments.unshift("/q");
|
|
34126
34368
|
return {
|
|
34127
34369
|
file,
|
|
34128
34370
|
commandArguments,
|
|
@@ -34149,7 +34391,7 @@ const addDefaultOptions = ({ extendEnv = true, preferLocal = false, cwd, localDi
|
|
|
34149
34391
|
});
|
|
34150
34392
|
const getEnv = ({ env: envOption, extendEnv, preferLocal, node, localDirectory, nodePath }) => {
|
|
34151
34393
|
const env$1 = extendEnv ? {
|
|
34152
|
-
...
|
|
34394
|
+
...process$1.env,
|
|
34153
34395
|
...envOption
|
|
34154
34396
|
} : envOption;
|
|
34155
34397
|
if (preferLocal || node) return npmRunPathEnv({
|
|
@@ -35149,12 +35391,12 @@ const guessStreamDirection = {
|
|
|
35149
35391
|
}
|
|
35150
35392
|
};
|
|
35151
35393
|
const getStandardStreamDirection = (value) => {
|
|
35152
|
-
if ([0,
|
|
35394
|
+
if ([0, process$1.stdin].includes(value)) return "input";
|
|
35153
35395
|
if ([
|
|
35154
35396
|
1,
|
|
35155
35397
|
2,
|
|
35156
|
-
|
|
35157
|
-
|
|
35398
|
+
process$1.stdout,
|
|
35399
|
+
process$1.stderr
|
|
35158
35400
|
].includes(value)) return "output";
|
|
35159
35401
|
};
|
|
35160
35402
|
const DEFAULT_DIRECTION = "output";
|
|
@@ -36218,9 +36460,9 @@ const addIpcMethods = (subprocess, { ipc }) => {
|
|
|
36218
36460
|
Object.assign(subprocess, getIpcMethods(subprocess, false, ipc));
|
|
36219
36461
|
};
|
|
36220
36462
|
const getIpcExport = () => {
|
|
36221
|
-
const anyProcess =
|
|
36463
|
+
const anyProcess = process$1;
|
|
36222
36464
|
const isSubprocess = true;
|
|
36223
|
-
const ipc =
|
|
36465
|
+
const ipc = process$1.channel !== void 0;
|
|
36224
36466
|
return {
|
|
36225
36467
|
...getIpcMethods(anyProcess, isSubprocess, ipc),
|
|
36226
36468
|
getCancelSignal: getCancelSignal$1.bind(void 0, {
|
|
@@ -36462,7 +36704,7 @@ if (process.platform === "linux") signals.push("SIGIO", "SIGPOLL", "SIGPWR", "SI
|
|
|
36462
36704
|
|
|
36463
36705
|
//#endregion
|
|
36464
36706
|
//#region node_modules/signal-exit/dist/mjs/index.js
|
|
36465
|
-
const processOk = (process$
|
|
36707
|
+
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";
|
|
36466
36708
|
const kExitEmitter = Symbol.for("signal-exit emitter");
|
|
36467
36709
|
const global$1 = globalThis;
|
|
36468
36710
|
const ObjectDefineProperty = Object.defineProperty.bind(Object);
|
|
@@ -36530,7 +36772,7 @@ var SignalExitFallback = class extends SignalExitBase {
|
|
|
36530
36772
|
};
|
|
36531
36773
|
var SignalExit = class extends SignalExitBase {
|
|
36532
36774
|
/* c8 ignore start */
|
|
36533
|
-
#hupSig = process$
|
|
36775
|
+
#hupSig = process$2.platform === "win32" ? "SIGINT" : "SIGHUP";
|
|
36534
36776
|
/* c8 ignore stop */
|
|
36535
36777
|
#emitter = new Emitter();
|
|
36536
36778
|
#process;
|
|
@@ -36538,15 +36780,15 @@ var SignalExit = class extends SignalExitBase {
|
|
|
36538
36780
|
#originalProcessReallyExit;
|
|
36539
36781
|
#sigListeners = {};
|
|
36540
36782
|
#loaded = false;
|
|
36541
|
-
constructor(process$
|
|
36783
|
+
constructor(process$5) {
|
|
36542
36784
|
super();
|
|
36543
|
-
this.#process = process$
|
|
36785
|
+
this.#process = process$5;
|
|
36544
36786
|
this.#sigListeners = {};
|
|
36545
36787
|
for (const sig of signals) this.#sigListeners[sig] = () => {
|
|
36546
36788
|
const listeners = this.#process.listeners(sig);
|
|
36547
36789
|
let { count: count$1 } = this.#emitter;
|
|
36548
36790
|
/* c8 ignore start */
|
|
36549
|
-
const p$1 = process$
|
|
36791
|
+
const p$1 = process$5;
|
|
36550
36792
|
if (typeof p$1.__signal_exit_emitter__ === "object" && typeof p$1.__signal_exit_emitter__.count === "number") count$1 += p$1.__signal_exit_emitter__.count;
|
|
36551
36793
|
/* c8 ignore stop */
|
|
36552
36794
|
if (listeners.length === count$1) {
|
|
@@ -36554,11 +36796,11 @@ var SignalExit = class extends SignalExitBase {
|
|
|
36554
36796
|
const ret = this.#emitter.emit("exit", null, sig);
|
|
36555
36797
|
/* c8 ignore start */
|
|
36556
36798
|
const s = sig === "SIGHUP" ? this.#hupSig : sig;
|
|
36557
|
-
if (!ret) process$
|
|
36799
|
+
if (!ret) process$5.kill(process$5.pid, s);
|
|
36558
36800
|
}
|
|
36559
36801
|
};
|
|
36560
|
-
this.#originalProcessReallyExit = process$
|
|
36561
|
-
this.#originalProcessEmit = process$
|
|
36802
|
+
this.#originalProcessReallyExit = process$5.reallyExit;
|
|
36803
|
+
this.#originalProcessEmit = process$5.emit;
|
|
36562
36804
|
}
|
|
36563
36805
|
onExit(cb, opts) {
|
|
36564
36806
|
/* c8 ignore start */
|
|
@@ -36625,8 +36867,8 @@ var SignalExit = class extends SignalExitBase {
|
|
|
36625
36867
|
} else return og.call(this.#process, ev, ...args);
|
|
36626
36868
|
}
|
|
36627
36869
|
};
|
|
36628
|
-
const process$
|
|
36629
|
-
const { onExit, load, unload } = signalExitWrap(processOk(process$
|
|
36870
|
+
const process$2 = globalThis.process;
|
|
36871
|
+
const { onExit, load, unload } = signalExitWrap(processOk(process$2) ? new SignalExit(process$2) : new SignalExitFallback());
|
|
36630
36872
|
|
|
36631
36873
|
//#endregion
|
|
36632
36874
|
//#region node_modules/execa/lib/terminate/cleanup.js
|
|
@@ -38580,7 +38822,7 @@ function isInsideContainer() {
|
|
|
38580
38822
|
//#endregion
|
|
38581
38823
|
//#region node_modules/is-wsl/index.js
|
|
38582
38824
|
const isWsl = () => {
|
|
38583
|
-
if (
|
|
38825
|
+
if (process$1.platform !== "linux") return false;
|
|
38584
38826
|
if (os.release().toLowerCase().includes("microsoft")) {
|
|
38585
38827
|
if (isInsideContainer()) return false;
|
|
38586
38828
|
return true;
|
|
@@ -38591,12 +38833,12 @@ const isWsl = () => {
|
|
|
38591
38833
|
return false;
|
|
38592
38834
|
}
|
|
38593
38835
|
};
|
|
38594
|
-
var is_wsl_default =
|
|
38836
|
+
var is_wsl_default = process$1.env.__IS_WSL_TEST__ ? isWsl : isWsl();
|
|
38595
38837
|
|
|
38596
38838
|
//#endregion
|
|
38597
38839
|
//#region node_modules/powershell-utils/index.js
|
|
38598
38840
|
const execFile$2 = promisify(childProcess.execFile);
|
|
38599
|
-
const powerShellPath$1 = () => `${
|
|
38841
|
+
const powerShellPath$1 = () => `${process$1.env.SYSTEMROOT || process$1.env.windir || String.raw`C:\Windows`}\\System32\\WindowsPowerShell\\v1.0\\powershell.exe`;
|
|
38600
38842
|
const executePowerShell = async (command, options = {}) => {
|
|
38601
38843
|
const { powerShellPath: psPath, ...execFileOptions } = options;
|
|
38602
38844
|
const encodedCommand = executePowerShell.encodeCommand(command);
|
|
@@ -38707,7 +38949,7 @@ function defineLazyProperty(object$1, propertyName, valueGetter) {
|
|
|
38707
38949
|
//#region node_modules/default-browser-id/index.js
|
|
38708
38950
|
const execFileAsync$3 = promisify(execFile);
|
|
38709
38951
|
async function defaultBrowserId() {
|
|
38710
|
-
if (
|
|
38952
|
+
if (process$1.platform !== "darwin") throw new Error("macOS only");
|
|
38711
38953
|
const { stdout: stdout$1 } = await execFileAsync$3("defaults", [
|
|
38712
38954
|
"read",
|
|
38713
38955
|
"com.apple.LaunchServices/com.apple.launchservices.secure",
|
|
@@ -38722,7 +38964,7 @@ async function defaultBrowserId() {
|
|
|
38722
38964
|
//#region node_modules/run-applescript/index.js
|
|
38723
38965
|
const execFileAsync$2 = promisify(execFile);
|
|
38724
38966
|
async function runAppleScript(script, { humanReadableOutput = true, signal } = {}) {
|
|
38725
|
-
if (
|
|
38967
|
+
if (process$1.platform !== "darwin") throw new Error("macOS only");
|
|
38726
38968
|
const outputArguments = humanReadableOutput ? [] : ["-ss"];
|
|
38727
38969
|
const execOptions = {};
|
|
38728
38970
|
if (signal) execOptions.signal = signal;
|
|
@@ -38831,14 +39073,14 @@ async function defaultBrowser$1(_execFileAsync = execFileAsync$1) {
|
|
|
38831
39073
|
const execFileAsync = promisify(execFile);
|
|
38832
39074
|
const titleize = (string$2) => string$2.toLowerCase().replaceAll(/(?:^|\s|-)\S/g, (x$2) => x$2.toUpperCase());
|
|
38833
39075
|
async function defaultBrowser() {
|
|
38834
|
-
if (
|
|
39076
|
+
if (process$1.platform === "darwin") {
|
|
38835
39077
|
const id = await defaultBrowserId();
|
|
38836
39078
|
return {
|
|
38837
39079
|
name: await bundleName(id),
|
|
38838
39080
|
id
|
|
38839
39081
|
};
|
|
38840
39082
|
}
|
|
38841
|
-
if (
|
|
39083
|
+
if (process$1.platform === "linux") {
|
|
38842
39084
|
const { stdout: stdout$1 } = await execFileAsync("xdg-mime", [
|
|
38843
39085
|
"query",
|
|
38844
39086
|
"default",
|
|
@@ -38850,13 +39092,13 @@ async function defaultBrowser() {
|
|
|
38850
39092
|
id
|
|
38851
39093
|
};
|
|
38852
39094
|
}
|
|
38853
|
-
if (
|
|
39095
|
+
if (process$1.platform === "win32") return defaultBrowser$1();
|
|
38854
39096
|
throw new Error("Only macOS, Linux, and Windows are supported");
|
|
38855
39097
|
}
|
|
38856
39098
|
|
|
38857
39099
|
//#endregion
|
|
38858
39100
|
//#region node_modules/is-in-ssh/index.js
|
|
38859
|
-
const isInSsh = Boolean(
|
|
39101
|
+
const isInSsh = Boolean(process$1.env.SSH_CONNECTION || process$1.env.SSH_CLIENT || process$1.env.SSH_TTY);
|
|
38860
39102
|
var is_in_ssh_default = isInSsh;
|
|
38861
39103
|
|
|
38862
39104
|
//#endregion
|
|
@@ -38864,7 +39106,7 @@ var is_in_ssh_default = isInSsh;
|
|
|
38864
39106
|
const fallbackAttemptSymbol = Symbol("fallbackAttempt");
|
|
38865
39107
|
const __dirname = import.meta.url ? path.dirname(fileURLToPath(import.meta.url)) : "";
|
|
38866
39108
|
const localXdgOpenPath = path.join(__dirname, "xdg-open");
|
|
38867
|
-
const { platform: platform$1, arch } =
|
|
39109
|
+
const { platform: platform$1, arch } = process$1;
|
|
38868
39110
|
const tryEachApp = async (apps$1, opener) => {
|
|
38869
39111
|
if (apps$1.length === 0) return;
|
|
38870
39112
|
const errors = [];
|
|
@@ -38977,7 +39219,7 @@ const baseOpen = async (options) => {
|
|
|
38977
39219
|
await fs$1.access(localXdgOpenPath, constants$1.X_OK);
|
|
38978
39220
|
exeLocalXdgOpen = true;
|
|
38979
39221
|
} catch {}
|
|
38980
|
-
command =
|
|
39222
|
+
command = process$1.versions.electron ?? (platform$1 === "android" || isBundled || !exeLocalXdgOpen) ? "xdg-open" : localXdgOpenPath;
|
|
38981
39223
|
}
|
|
38982
39224
|
if (appArguments.length > 0) cliArguments.push(...appArguments);
|
|
38983
39225
|
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.
|
|
3
|
+
"version": "0.0.25-pr.151.082c391",
|
|
4
4
|
"description": "Base44 CLI - Unified interface for managing Base44 applications",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -70,5 +70,6 @@
|
|
|
70
70
|
},
|
|
71
71
|
"optionalDependencies": {
|
|
72
72
|
"@rollup/rollup-linux-x64-gnu": "^4.56.0"
|
|
73
|
-
}
|
|
73
|
+
},
|
|
74
|
+
"packageManager": "yarn@4.12.0+sha256.1fe4e1193cbcd13a48d8f436bb17d3c672b049a5e32a758aab9866a073db1702"
|
|
74
75
|
}
|