@base44-preview/cli 0.0.25-pr.149.d56648c → 0.0.25-pr.151.12d57cf
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
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) => {
|
|
@@ -6744,7 +6762,7 @@ function initializeContext(params) {
|
|
|
6744
6762
|
external: params?.external ?? void 0
|
|
6745
6763
|
};
|
|
6746
6764
|
}
|
|
6747
|
-
function process$
|
|
6765
|
+
function process$3(schema, ctx, _params = {
|
|
6748
6766
|
path: [],
|
|
6749
6767
|
schemaPath: []
|
|
6750
6768
|
}) {
|
|
@@ -6781,7 +6799,7 @@ function process$2(schema, ctx, _params = {
|
|
|
6781
6799
|
const parent = schema._zod.parent;
|
|
6782
6800
|
if (parent) {
|
|
6783
6801
|
if (!result.ref) result.ref = parent;
|
|
6784
|
-
process$
|
|
6802
|
+
process$3(parent, ctx, params);
|
|
6785
6803
|
ctx.seen.get(parent).isParent = true;
|
|
6786
6804
|
}
|
|
6787
6805
|
}
|
|
@@ -6993,7 +7011,7 @@ const createToJSONSchemaMethod = (schema, processors = {}) => (params) => {
|
|
|
6993
7011
|
...params,
|
|
6994
7012
|
processors
|
|
6995
7013
|
});
|
|
6996
|
-
process$
|
|
7014
|
+
process$3(schema, ctx);
|
|
6997
7015
|
extractDefs(ctx, schema);
|
|
6998
7016
|
return finalize(ctx, schema);
|
|
6999
7017
|
};
|
|
@@ -7005,7 +7023,7 @@ const createStandardJSONSchemaMethod = (schema, io, processors = {}) => (params)
|
|
|
7005
7023
|
io,
|
|
7006
7024
|
processors
|
|
7007
7025
|
});
|
|
7008
|
-
process$
|
|
7026
|
+
process$3(schema, ctx);
|
|
7009
7027
|
extractDefs(ctx, schema);
|
|
7010
7028
|
return finalize(ctx, schema);
|
|
7011
7029
|
};
|
|
@@ -7079,6 +7097,27 @@ const enumProcessor = (schema, _ctx, json, _params) => {
|
|
|
7079
7097
|
if (values.every((v$1) => typeof v$1 === "string")) json.type = "string";
|
|
7080
7098
|
json.enum = values;
|
|
7081
7099
|
};
|
|
7100
|
+
const literalProcessor = (schema, ctx, json, _params) => {
|
|
7101
|
+
const def = schema._zod.def;
|
|
7102
|
+
const vals = [];
|
|
7103
|
+
for (const val of def.values) if (val === void 0) {
|
|
7104
|
+
if (ctx.unrepresentable === "throw") throw new Error("Literal `undefined` cannot be represented in JSON Schema");
|
|
7105
|
+
} else if (typeof val === "bigint") if (ctx.unrepresentable === "throw") throw new Error("BigInt literals cannot be represented in JSON Schema");
|
|
7106
|
+
else vals.push(Number(val));
|
|
7107
|
+
else vals.push(val);
|
|
7108
|
+
if (vals.length === 0) {} else if (vals.length === 1) {
|
|
7109
|
+
const val = vals[0];
|
|
7110
|
+
json.type = val === null ? "null" : typeof val;
|
|
7111
|
+
if (ctx.target === "draft-04" || ctx.target === "openapi-3.0") json.enum = [val];
|
|
7112
|
+
else json.const = val;
|
|
7113
|
+
} else {
|
|
7114
|
+
if (vals.every((v$1) => typeof v$1 === "number")) json.type = "number";
|
|
7115
|
+
if (vals.every((v$1) => typeof v$1 === "string")) json.type = "string";
|
|
7116
|
+
if (vals.every((v$1) => typeof v$1 === "boolean")) json.type = "boolean";
|
|
7117
|
+
if (vals.every((v$1) => v$1 === null)) json.type = "null";
|
|
7118
|
+
json.enum = vals;
|
|
7119
|
+
}
|
|
7120
|
+
};
|
|
7082
7121
|
const customProcessor = (_schema, ctx, _json, _params) => {
|
|
7083
7122
|
if (ctx.unrepresentable === "throw") throw new Error("Custom types cannot be represented in JSON Schema");
|
|
7084
7123
|
};
|
|
@@ -7092,7 +7131,7 @@ const arrayProcessor = (schema, ctx, _json, params) => {
|
|
|
7092
7131
|
if (typeof minimum === "number") json.minItems = minimum;
|
|
7093
7132
|
if (typeof maximum === "number") json.maxItems = maximum;
|
|
7094
7133
|
json.type = "array";
|
|
7095
|
-
json.items = process$
|
|
7134
|
+
json.items = process$3(def.element, ctx, {
|
|
7096
7135
|
...params,
|
|
7097
7136
|
path: [...params.path, "items"]
|
|
7098
7137
|
});
|
|
@@ -7103,7 +7142,7 @@ const objectProcessor = (schema, ctx, _json, params) => {
|
|
|
7103
7142
|
json.type = "object";
|
|
7104
7143
|
json.properties = {};
|
|
7105
7144
|
const shape = def.shape;
|
|
7106
|
-
for (const key in shape) json.properties[key] = process$
|
|
7145
|
+
for (const key in shape) json.properties[key] = process$3(shape[key], ctx, {
|
|
7107
7146
|
...params,
|
|
7108
7147
|
path: [
|
|
7109
7148
|
...params.path,
|
|
@@ -7121,7 +7160,7 @@ const objectProcessor = (schema, ctx, _json, params) => {
|
|
|
7121
7160
|
if (def.catchall?._zod.def.type === "never") json.additionalProperties = false;
|
|
7122
7161
|
else if (!def.catchall) {
|
|
7123
7162
|
if (ctx.io === "output") json.additionalProperties = false;
|
|
7124
|
-
} else if (def.catchall) json.additionalProperties = process$
|
|
7163
|
+
} else if (def.catchall) json.additionalProperties = process$3(def.catchall, ctx, {
|
|
7125
7164
|
...params,
|
|
7126
7165
|
path: [...params.path, "additionalProperties"]
|
|
7127
7166
|
});
|
|
@@ -7129,7 +7168,7 @@ const objectProcessor = (schema, ctx, _json, params) => {
|
|
|
7129
7168
|
const unionProcessor = (schema, ctx, json, params) => {
|
|
7130
7169
|
const def = schema._zod.def;
|
|
7131
7170
|
const isExclusive = def.inclusive === false;
|
|
7132
|
-
const options = def.options.map((x$2, i$1) => process$
|
|
7171
|
+
const options = def.options.map((x$2, i$1) => process$3(x$2, ctx, {
|
|
7133
7172
|
...params,
|
|
7134
7173
|
path: [
|
|
7135
7174
|
...params.path,
|
|
@@ -7142,7 +7181,7 @@ const unionProcessor = (schema, ctx, json, params) => {
|
|
|
7142
7181
|
};
|
|
7143
7182
|
const intersectionProcessor = (schema, ctx, json, params) => {
|
|
7144
7183
|
const def = schema._zod.def;
|
|
7145
|
-
const a$1 = process$
|
|
7184
|
+
const a$1 = process$3(def.left, ctx, {
|
|
7146
7185
|
...params,
|
|
7147
7186
|
path: [
|
|
7148
7187
|
...params.path,
|
|
@@ -7150,7 +7189,7 @@ const intersectionProcessor = (schema, ctx, json, params) => {
|
|
|
7150
7189
|
0
|
|
7151
7190
|
]
|
|
7152
7191
|
});
|
|
7153
|
-
const b$2 = process$
|
|
7192
|
+
const b$2 = process$3(def.right, ctx, {
|
|
7154
7193
|
...params,
|
|
7155
7194
|
path: [
|
|
7156
7195
|
...params.path,
|
|
@@ -7167,7 +7206,7 @@ const tupleProcessor = (schema, ctx, _json, params) => {
|
|
|
7167
7206
|
json.type = "array";
|
|
7168
7207
|
const prefixPath$1 = ctx.target === "draft-2020-12" ? "prefixItems" : "items";
|
|
7169
7208
|
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$
|
|
7209
|
+
const prefixItems = def.items.map((x$2, i$1) => process$3(x$2, ctx, {
|
|
7171
7210
|
...params,
|
|
7172
7211
|
path: [
|
|
7173
7212
|
...params.path,
|
|
@@ -7175,7 +7214,7 @@ const tupleProcessor = (schema, ctx, _json, params) => {
|
|
|
7175
7214
|
i$1
|
|
7176
7215
|
]
|
|
7177
7216
|
}));
|
|
7178
|
-
const rest = def.rest ? process$
|
|
7217
|
+
const rest = def.rest ? process$3(def.rest, ctx, {
|
|
7179
7218
|
...params,
|
|
7180
7219
|
path: [
|
|
7181
7220
|
...params.path,
|
|
@@ -7206,7 +7245,7 @@ const recordProcessor = (schema, ctx, _json, params) => {
|
|
|
7206
7245
|
const keyType = def.keyType;
|
|
7207
7246
|
const patterns = keyType._zod.bag?.patterns;
|
|
7208
7247
|
if (def.mode === "loose" && patterns && patterns.size > 0) {
|
|
7209
|
-
const valueSchema = process$
|
|
7248
|
+
const valueSchema = process$3(def.valueType, ctx, {
|
|
7210
7249
|
...params,
|
|
7211
7250
|
path: [
|
|
7212
7251
|
...params.path,
|
|
@@ -7217,11 +7256,11 @@ const recordProcessor = (schema, ctx, _json, params) => {
|
|
|
7217
7256
|
json.patternProperties = {};
|
|
7218
7257
|
for (const pattern of patterns) json.patternProperties[pattern.source] = valueSchema;
|
|
7219
7258
|
} else {
|
|
7220
|
-
if (ctx.target === "draft-07" || ctx.target === "draft-2020-12") json.propertyNames = process$
|
|
7259
|
+
if (ctx.target === "draft-07" || ctx.target === "draft-2020-12") json.propertyNames = process$3(def.keyType, ctx, {
|
|
7221
7260
|
...params,
|
|
7222
7261
|
path: [...params.path, "propertyNames"]
|
|
7223
7262
|
});
|
|
7224
|
-
json.additionalProperties = process$
|
|
7263
|
+
json.additionalProperties = process$3(def.valueType, ctx, {
|
|
7225
7264
|
...params,
|
|
7226
7265
|
path: [...params.path, "additionalProperties"]
|
|
7227
7266
|
});
|
|
@@ -7234,7 +7273,7 @@ const recordProcessor = (schema, ctx, _json, params) => {
|
|
|
7234
7273
|
};
|
|
7235
7274
|
const nullableProcessor = (schema, ctx, json, params) => {
|
|
7236
7275
|
const def = schema._zod.def;
|
|
7237
|
-
const inner = process$
|
|
7276
|
+
const inner = process$3(def.innerType, ctx, params);
|
|
7238
7277
|
const seen = ctx.seen.get(schema);
|
|
7239
7278
|
if (ctx.target === "openapi-3.0") {
|
|
7240
7279
|
seen.ref = def.innerType;
|
|
@@ -7243,27 +7282,27 @@ const nullableProcessor = (schema, ctx, json, params) => {
|
|
|
7243
7282
|
};
|
|
7244
7283
|
const nonoptionalProcessor = (schema, ctx, _json, params) => {
|
|
7245
7284
|
const def = schema._zod.def;
|
|
7246
|
-
process$
|
|
7285
|
+
process$3(def.innerType, ctx, params);
|
|
7247
7286
|
const seen = ctx.seen.get(schema);
|
|
7248
7287
|
seen.ref = def.innerType;
|
|
7249
7288
|
};
|
|
7250
7289
|
const defaultProcessor = (schema, ctx, json, params) => {
|
|
7251
7290
|
const def = schema._zod.def;
|
|
7252
|
-
process$
|
|
7291
|
+
process$3(def.innerType, ctx, params);
|
|
7253
7292
|
const seen = ctx.seen.get(schema);
|
|
7254
7293
|
seen.ref = def.innerType;
|
|
7255
7294
|
json.default = JSON.parse(JSON.stringify(def.defaultValue));
|
|
7256
7295
|
};
|
|
7257
7296
|
const prefaultProcessor = (schema, ctx, json, params) => {
|
|
7258
7297
|
const def = schema._zod.def;
|
|
7259
|
-
process$
|
|
7298
|
+
process$3(def.innerType, ctx, params);
|
|
7260
7299
|
const seen = ctx.seen.get(schema);
|
|
7261
7300
|
seen.ref = def.innerType;
|
|
7262
7301
|
if (ctx.io === "input") json._prefault = JSON.parse(JSON.stringify(def.defaultValue));
|
|
7263
7302
|
};
|
|
7264
7303
|
const catchProcessor = (schema, ctx, json, params) => {
|
|
7265
7304
|
const def = schema._zod.def;
|
|
7266
|
-
process$
|
|
7305
|
+
process$3(def.innerType, ctx, params);
|
|
7267
7306
|
const seen = ctx.seen.get(schema);
|
|
7268
7307
|
seen.ref = def.innerType;
|
|
7269
7308
|
let catchValue;
|
|
@@ -7277,20 +7316,20 @@ const catchProcessor = (schema, ctx, json, params) => {
|
|
|
7277
7316
|
const pipeProcessor = (schema, ctx, _json, params) => {
|
|
7278
7317
|
const def = schema._zod.def;
|
|
7279
7318
|
const innerType = ctx.io === "input" ? def.in._zod.def.type === "transform" ? def.out : def.in : def.out;
|
|
7280
|
-
process$
|
|
7319
|
+
process$3(innerType, ctx, params);
|
|
7281
7320
|
const seen = ctx.seen.get(schema);
|
|
7282
7321
|
seen.ref = innerType;
|
|
7283
7322
|
};
|
|
7284
7323
|
const readonlyProcessor = (schema, ctx, json, params) => {
|
|
7285
7324
|
const def = schema._zod.def;
|
|
7286
|
-
process$
|
|
7325
|
+
process$3(def.innerType, ctx, params);
|
|
7287
7326
|
const seen = ctx.seen.get(schema);
|
|
7288
7327
|
seen.ref = def.innerType;
|
|
7289
7328
|
json.readOnly = true;
|
|
7290
7329
|
};
|
|
7291
7330
|
const optionalProcessor = (schema, ctx, _json, params) => {
|
|
7292
7331
|
const def = schema._zod.def;
|
|
7293
|
-
process$
|
|
7332
|
+
process$3(def.innerType, ctx, params);
|
|
7294
7333
|
const seen = ctx.seen.get(schema);
|
|
7295
7334
|
seen.ref = def.innerType;
|
|
7296
7335
|
};
|
|
@@ -7709,6 +7748,14 @@ function object(shape, params) {
|
|
|
7709
7748
|
...normalizeParams(params)
|
|
7710
7749
|
});
|
|
7711
7750
|
}
|
|
7751
|
+
function strictObject(shape, params) {
|
|
7752
|
+
return new ZodObject({
|
|
7753
|
+
type: "object",
|
|
7754
|
+
shape,
|
|
7755
|
+
catchall: never(),
|
|
7756
|
+
...normalizeParams(params)
|
|
7757
|
+
});
|
|
7758
|
+
}
|
|
7712
7759
|
function looseObject(shape, params) {
|
|
7713
7760
|
return new ZodObject({
|
|
7714
7761
|
type: "object",
|
|
@@ -7813,6 +7860,23 @@ function _enum(values, params) {
|
|
|
7813
7860
|
...normalizeParams(params)
|
|
7814
7861
|
});
|
|
7815
7862
|
}
|
|
7863
|
+
const ZodLiteral = /* @__PURE__ */ $constructor("ZodLiteral", (inst, def) => {
|
|
7864
|
+
$ZodLiteral.init(inst, def);
|
|
7865
|
+
ZodType.init(inst, def);
|
|
7866
|
+
inst._zod.processJSONSchema = (ctx, json, params) => literalProcessor(inst, ctx, json, params);
|
|
7867
|
+
inst.values = new Set(def.values);
|
|
7868
|
+
Object.defineProperty(inst, "value", { get() {
|
|
7869
|
+
if (def.values.length > 1) throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");
|
|
7870
|
+
return def.values[0];
|
|
7871
|
+
} });
|
|
7872
|
+
});
|
|
7873
|
+
function literal(value, params) {
|
|
7874
|
+
return new ZodLiteral({
|
|
7875
|
+
type: "literal",
|
|
7876
|
+
values: Array.isArray(value) ? value : [value],
|
|
7877
|
+
...normalizeParams(params)
|
|
7878
|
+
});
|
|
7879
|
+
}
|
|
7816
7880
|
const ZodTransform = /* @__PURE__ */ $constructor("ZodTransform", (inst, def) => {
|
|
7817
7881
|
$ZodTransform.init(inst, def);
|
|
7818
7882
|
ZodType.init(inst, def);
|
|
@@ -16335,7 +16399,7 @@ const createIgnorePredicate = (patterns, cwd, baseDir) => {
|
|
|
16335
16399
|
};
|
|
16336
16400
|
const normalizeOptions$2 = (options = {}) => {
|
|
16337
16401
|
const ignoreOption = options.ignore ? Array.isArray(options.ignore) ? options.ignore : [options.ignore] : [];
|
|
16338
|
-
const cwd = toPath$1(options.cwd) ??
|
|
16402
|
+
const cwd = toPath$1(options.cwd) ?? process$1.cwd();
|
|
16339
16403
|
const deep = typeof options.deep === "number" ? Math.max(0, options.deep) + 1 : Number.POSITIVE_INFINITY;
|
|
16340
16404
|
return {
|
|
16341
16405
|
cwd,
|
|
@@ -16432,7 +16496,7 @@ const getDirectoryGlob = ({ directoryPath, files, extensions }) => {
|
|
|
16432
16496
|
const extensionGlob = extensions?.length > 0 ? `.${extensions.length > 1 ? `{${extensions.join(",")}}` : extensions[0]}` : "";
|
|
16433
16497
|
return files ? files.map((file) => path.posix.join(directoryPath, `**/${path.extname(file) ? file : `${file}${extensionGlob}`}`)) : [path.posix.join(directoryPath, `**${extensionGlob ? `/*${extensionGlob}` : ""}`)];
|
|
16434
16498
|
};
|
|
16435
|
-
const directoryToGlob = async (directoryPaths, { cwd =
|
|
16499
|
+
const directoryToGlob = async (directoryPaths, { cwd = process$1.cwd(), files, extensions, fs: fsImplementation } = {}) => {
|
|
16436
16500
|
return (await Promise.all(directoryPaths.map(async (directoryPath) => {
|
|
16437
16501
|
if (shouldExpandGlobstarDirectory(isNegativePattern(directoryPath) ? directoryPath.slice(1) : directoryPath)) return getDirectoryGlob({
|
|
16438
16502
|
directoryPath,
|
|
@@ -16446,7 +16510,7 @@ const directoryToGlob = async (directoryPaths, { cwd = y.cwd(), files, extension
|
|
|
16446
16510
|
}) : directoryPath;
|
|
16447
16511
|
}))).flat();
|
|
16448
16512
|
};
|
|
16449
|
-
const directoryToGlobSync = (directoryPaths, { cwd =
|
|
16513
|
+
const directoryToGlobSync = (directoryPaths, { cwd = process$1.cwd(), files, extensions, fs: fsImplementation } = {}) => directoryPaths.flatMap((directoryPath) => {
|
|
16450
16514
|
if (shouldExpandGlobstarDirectory(isNegativePattern(directoryPath) ? directoryPath.slice(1) : directoryPath)) return getDirectoryGlob({
|
|
16451
16515
|
directoryPath,
|
|
16452
16516
|
files,
|
|
@@ -16542,7 +16606,7 @@ const applyIgnoreFilesAndGetFilterSync = (options) => {
|
|
|
16542
16606
|
};
|
|
16543
16607
|
const createFilterFunction = (isIgnored, cwd) => {
|
|
16544
16608
|
const seen = /* @__PURE__ */ new Set();
|
|
16545
|
-
const basePath = cwd ||
|
|
16609
|
+
const basePath = cwd || process$1.cwd();
|
|
16546
16610
|
const pathCache = /* @__PURE__ */ new Map();
|
|
16547
16611
|
return (fastGlobResult) => {
|
|
16548
16612
|
const pathKey$1 = path.normalize(fastGlobResult.path ?? fastGlobResult);
|
|
@@ -16666,7 +16730,129 @@ const { convertPathToPattern } = import_out.default;
|
|
|
16666
16730
|
|
|
16667
16731
|
//#endregion
|
|
16668
16732
|
//#region src/core/resources/entity/schema.ts
|
|
16669
|
-
const
|
|
16733
|
+
const FieldConditionSchema = union([string(), object({
|
|
16734
|
+
$in: unknown().optional(),
|
|
16735
|
+
$nin: unknown().optional(),
|
|
16736
|
+
$ne: unknown().optional(),
|
|
16737
|
+
$all: unknown().optional()
|
|
16738
|
+
})]);
|
|
16739
|
+
const userConditionAllowedKeys = new Set([
|
|
16740
|
+
"role",
|
|
16741
|
+
"email",
|
|
16742
|
+
"id"
|
|
16743
|
+
]);
|
|
16744
|
+
const UserConditionSchema = looseObject({
|
|
16745
|
+
role: string().optional(),
|
|
16746
|
+
email: string().optional(),
|
|
16747
|
+
id: string().optional()
|
|
16748
|
+
}).refine((val) => Object.keys(val).every((key) => userConditionAllowedKeys.has(key) || key.startsWith("data.")), "Keys must be role, email, id, or match data.* pattern");
|
|
16749
|
+
const rlsConditionAllowedKeys = new Set([
|
|
16750
|
+
"user_condition",
|
|
16751
|
+
"created_by",
|
|
16752
|
+
"created_by_id",
|
|
16753
|
+
"$or",
|
|
16754
|
+
"$and",
|
|
16755
|
+
"$nor"
|
|
16756
|
+
]);
|
|
16757
|
+
const RLSConditionSchema = looseObject({
|
|
16758
|
+
user_condition: UserConditionSchema.optional(),
|
|
16759
|
+
created_by: FieldConditionSchema.optional(),
|
|
16760
|
+
created_by_id: FieldConditionSchema.optional(),
|
|
16761
|
+
get $or() {
|
|
16762
|
+
return array(RefineRLSConditionSchema).optional();
|
|
16763
|
+
},
|
|
16764
|
+
get $and() {
|
|
16765
|
+
return array(RefineRLSConditionSchema).optional();
|
|
16766
|
+
},
|
|
16767
|
+
get $nor() {
|
|
16768
|
+
return array(RefineRLSConditionSchema).optional();
|
|
16769
|
+
}
|
|
16770
|
+
});
|
|
16771
|
+
const fieldConditionOperators = new Set([
|
|
16772
|
+
"$in",
|
|
16773
|
+
"$nin",
|
|
16774
|
+
"$ne",
|
|
16775
|
+
"$all"
|
|
16776
|
+
]);
|
|
16777
|
+
const isValidFieldCondition = (value) => {
|
|
16778
|
+
if (value === null || typeof value === "string" || typeof value === "number" || typeof value === "boolean") return true;
|
|
16779
|
+
if (typeof value === "object") return Object.keys(value).every((k$2) => fieldConditionOperators.has(k$2));
|
|
16780
|
+
return false;
|
|
16781
|
+
};
|
|
16782
|
+
const RefineRLSConditionSchema = RLSConditionSchema.refine((val) => Object.entries(val).every(([key, value]) => {
|
|
16783
|
+
if (rlsConditionAllowedKeys.has(key)) return true;
|
|
16784
|
+
if (!key.startsWith("data.")) return false;
|
|
16785
|
+
return isValidFieldCondition(value);
|
|
16786
|
+
}), "Keys must be known RLS keys or match data.* pattern with valid value");
|
|
16787
|
+
const RLSRuleSchema = union([boolean(), RefineRLSConditionSchema]);
|
|
16788
|
+
const EntityRLSSchema = strictObject({
|
|
16789
|
+
create: RLSRuleSchema.optional(),
|
|
16790
|
+
read: RLSRuleSchema.optional(),
|
|
16791
|
+
update: RLSRuleSchema.optional(),
|
|
16792
|
+
delete: RLSRuleSchema.optional(),
|
|
16793
|
+
write: RLSRuleSchema.optional()
|
|
16794
|
+
});
|
|
16795
|
+
const FieldRLSSchema = strictObject({
|
|
16796
|
+
read: RLSRuleSchema.optional(),
|
|
16797
|
+
write: RLSRuleSchema.optional(),
|
|
16798
|
+
create: RLSRuleSchema.optional(),
|
|
16799
|
+
update: RLSRuleSchema.optional(),
|
|
16800
|
+
delete: RLSRuleSchema.optional()
|
|
16801
|
+
});
|
|
16802
|
+
const PropertyTypeSchema = _enum([
|
|
16803
|
+
"string",
|
|
16804
|
+
"number",
|
|
16805
|
+
"integer",
|
|
16806
|
+
"boolean",
|
|
16807
|
+
"array",
|
|
16808
|
+
"object",
|
|
16809
|
+
"binary"
|
|
16810
|
+
]);
|
|
16811
|
+
const StringFormatSchema = _enum([
|
|
16812
|
+
"date",
|
|
16813
|
+
"date-time",
|
|
16814
|
+
"time",
|
|
16815
|
+
"email",
|
|
16816
|
+
"uri",
|
|
16817
|
+
"hostname",
|
|
16818
|
+
"ipv4",
|
|
16819
|
+
"ipv6",
|
|
16820
|
+
"uuid",
|
|
16821
|
+
"file",
|
|
16822
|
+
"regex"
|
|
16823
|
+
]);
|
|
16824
|
+
const PropertyDefinitionSchema = object({
|
|
16825
|
+
type: PropertyTypeSchema,
|
|
16826
|
+
title: string().optional(),
|
|
16827
|
+
description: string().optional(),
|
|
16828
|
+
minLength: number().int().min(0).optional(),
|
|
16829
|
+
maxLength: number().int().min(0).optional(),
|
|
16830
|
+
pattern: string().optional(),
|
|
16831
|
+
format: StringFormatSchema.optional(),
|
|
16832
|
+
minimum: number().optional(),
|
|
16833
|
+
maximum: number().optional(),
|
|
16834
|
+
enum: array(string()).optional(),
|
|
16835
|
+
enumNames: array(string()).optional(),
|
|
16836
|
+
default: unknown().optional(),
|
|
16837
|
+
$ref: string().optional(),
|
|
16838
|
+
rls: FieldRLSSchema.optional(),
|
|
16839
|
+
required: array(string()).optional(),
|
|
16840
|
+
get items() {
|
|
16841
|
+
return PropertyDefinitionSchema.optional();
|
|
16842
|
+
},
|
|
16843
|
+
get properties() {
|
|
16844
|
+
return record(string(), PropertyDefinitionSchema).optional();
|
|
16845
|
+
}
|
|
16846
|
+
});
|
|
16847
|
+
const EntitySchema = object({
|
|
16848
|
+
type: literal("object"),
|
|
16849
|
+
name: string().regex(/^[a-zA-Z0-9]+$/, "Entity name must be alphanumeric only"),
|
|
16850
|
+
title: string().optional(),
|
|
16851
|
+
description: string().optional(),
|
|
16852
|
+
properties: record(string(), PropertyDefinitionSchema),
|
|
16853
|
+
required: array(string()).optional(),
|
|
16854
|
+
rls: EntityRLSSchema.optional()
|
|
16855
|
+
});
|
|
16670
16856
|
const SyncEntitiesResponseSchema = object({
|
|
16671
16857
|
created: array(string()),
|
|
16672
16858
|
updated: array(string()),
|
|
@@ -16889,6 +17075,11 @@ async function writeAgents(agentsDir, remoteAgents) {
|
|
|
16889
17075
|
//#endregion
|
|
16890
17076
|
//#region src/core/resources/agent/api.ts
|
|
16891
17077
|
async function pushAgents(agents) {
|
|
17078
|
+
if (agents.length === 0) return {
|
|
17079
|
+
created: [],
|
|
17080
|
+
updated: [],
|
|
17081
|
+
deleted: []
|
|
17082
|
+
};
|
|
16892
17083
|
const response = await getAppClient().put("agent-configs", {
|
|
16893
17084
|
json: agents,
|
|
16894
17085
|
throwHttpErrors: false
|
|
@@ -31048,13 +31239,13 @@ var ansi_styles_default = ansiStyles;
|
|
|
31048
31239
|
|
|
31049
31240
|
//#endregion
|
|
31050
31241
|
//#region node_modules/chalk/source/vendor/supports-color/index.js
|
|
31051
|
-
function hasFlag(flag, argv = globalThis.Deno ? globalThis.Deno.args :
|
|
31242
|
+
function hasFlag(flag, argv = globalThis.Deno ? globalThis.Deno.args : process$1.argv) {
|
|
31052
31243
|
const prefix = flag.startsWith("-") ? "" : flag.length === 1 ? "-" : "--";
|
|
31053
31244
|
const position = argv.indexOf(prefix + flag);
|
|
31054
31245
|
const terminatorPosition = argv.indexOf("--");
|
|
31055
31246
|
return position !== -1 && (terminatorPosition === -1 || position < terminatorPosition);
|
|
31056
31247
|
}
|
|
31057
|
-
const { env } =
|
|
31248
|
+
const { env } = process$1;
|
|
31058
31249
|
let flagForceColor;
|
|
31059
31250
|
if (hasFlag("no-color") || hasFlag("no-colors") || hasFlag("color=false") || hasFlag("color=never")) flagForceColor = 0;
|
|
31060
31251
|
else if (hasFlag("color") || hasFlag("colors") || hasFlag("color=true") || hasFlag("color=always")) flagForceColor = 1;
|
|
@@ -31087,7 +31278,7 @@ function _supportsColor(haveStream, { streamIsTTY, sniffFlags = true } = {}) {
|
|
|
31087
31278
|
if (haveStream && !streamIsTTY && forceColor === void 0) return 0;
|
|
31088
31279
|
const min = forceColor || 0;
|
|
31089
31280
|
if (env.TERM === "dumb") return min;
|
|
31090
|
-
if (
|
|
31281
|
+
if (process$1.platform === "win32") {
|
|
31091
31282
|
const osRelease = os.release().split(".");
|
|
31092
31283
|
if (Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) return Number(osRelease[2]) >= 14931 ? 3 : 2;
|
|
31093
31284
|
return 1;
|
|
@@ -31878,9 +32069,9 @@ const getSubprocessResult = ({ stdout: stdout$1 }) => {
|
|
|
31878
32069
|
//#region node_modules/execa/lib/utils/standard-stream.js
|
|
31879
32070
|
const isStandardStream = (stream) => STANDARD_STREAMS.includes(stream);
|
|
31880
32071
|
const STANDARD_STREAMS = [
|
|
31881
|
-
|
|
31882
|
-
|
|
31883
|
-
|
|
32072
|
+
process$1.stdin,
|
|
32073
|
+
process$1.stdout,
|
|
32074
|
+
process$1.stderr
|
|
31884
32075
|
];
|
|
31885
32076
|
const STANDARD_STREAMS_ALIASES = [
|
|
31886
32077
|
"stdin",
|
|
@@ -32005,9 +32196,9 @@ const NO_ESCAPE_REGEXP = /^[\w./-]+$/;
|
|
|
32005
32196
|
//#endregion
|
|
32006
32197
|
//#region node_modules/is-unicode-supported/index.js
|
|
32007
32198
|
function isUnicodeSupported() {
|
|
32008
|
-
const { env: env$1 } =
|
|
32199
|
+
const { env: env$1 } = process$1;
|
|
32009
32200
|
const { TERM, TERM_PROGRAM } = env$1;
|
|
32010
|
-
if (
|
|
32201
|
+
if (process$1.platform !== "win32") return TERM !== "linux";
|
|
32011
32202
|
return Boolean(env$1.WT_SESSION) || Boolean(env$1.TERMINUS_SUBLIME) || env$1.ConEmuTask === "{cmd::Cmder}" || TERM_PROGRAM === "Terminus-Sublime" || TERM_PROGRAM === "vscode" || TERM === "xterm-256color" || TERM === "alacritty" || TERM === "rxvt-unicode" || TERM === "rxvt-unicode-256color" || env$1.TERMINAL_EMULATOR === "JetBrains-JediTerm";
|
|
32012
32203
|
}
|
|
32013
32204
|
|
|
@@ -32934,7 +33125,7 @@ const TEN_MEGABYTES_IN_BYTES = 10 * 1024 * 1024;
|
|
|
32934
33125
|
|
|
32935
33126
|
//#endregion
|
|
32936
33127
|
//#region node_modules/npm-run-path/index.js
|
|
32937
|
-
const npmRunPath = ({ cwd =
|
|
33128
|
+
const npmRunPath = ({ cwd = process$1.cwd(), path: pathOption = process$1.env[pathKey()], preferLocal = true, execPath: execPath$1 = process$1.execPath, addExecPath = true } = {}) => {
|
|
32938
33129
|
const cwdPath = path.resolve(toPath(cwd));
|
|
32939
33130
|
const result = [];
|
|
32940
33131
|
const pathParts = pathOption.split(path.delimiter);
|
|
@@ -32952,7 +33143,7 @@ const applyExecPath = (result, pathParts, execPath$1, cwdPath) => {
|
|
|
32952
33143
|
const pathPart = path.resolve(cwdPath, toPath(execPath$1), "..");
|
|
32953
33144
|
if (!pathParts.includes(pathPart)) result.push(pathPart);
|
|
32954
33145
|
};
|
|
32955
|
-
const npmRunPathEnv = ({ env: env$1 =
|
|
33146
|
+
const npmRunPathEnv = ({ env: env$1 = process$1.env, ...options } = {}) => {
|
|
32956
33147
|
env$1 = { ...env$1 };
|
|
32957
33148
|
const pathName = pathKey({ env: env$1 });
|
|
32958
33149
|
options.path = env$1[pathName];
|
|
@@ -34087,7 +34278,7 @@ const normalizeCwd = (cwd = getDefaultCwd()) => {
|
|
|
34087
34278
|
};
|
|
34088
34279
|
const getDefaultCwd = () => {
|
|
34089
34280
|
try {
|
|
34090
|
-
return
|
|
34281
|
+
return process$1.cwd();
|
|
34091
34282
|
} catch (error) {
|
|
34092
34283
|
error.message = `The current directory does not exist.\n${error.message}`;
|
|
34093
34284
|
throw error;
|
|
@@ -34122,7 +34313,7 @@ const normalizeOptions = (filePath, rawArguments, rawOptions) => {
|
|
|
34122
34313
|
options.killSignal = normalizeKillSignal(options.killSignal);
|
|
34123
34314
|
options.forceKillAfterDelay = normalizeForceKillAfterDelay(options.forceKillAfterDelay);
|
|
34124
34315
|
options.lines = options.lines.map((lines, fdNumber) => lines && !BINARY_ENCODINGS.has(options.encoding) && options.buffer[fdNumber]);
|
|
34125
|
-
if (
|
|
34316
|
+
if (process$1.platform === "win32" && path.basename(file, ".exe") === "cmd") commandArguments.unshift("/q");
|
|
34126
34317
|
return {
|
|
34127
34318
|
file,
|
|
34128
34319
|
commandArguments,
|
|
@@ -34149,7 +34340,7 @@ const addDefaultOptions = ({ extendEnv = true, preferLocal = false, cwd, localDi
|
|
|
34149
34340
|
});
|
|
34150
34341
|
const getEnv = ({ env: envOption, extendEnv, preferLocal, node, localDirectory, nodePath }) => {
|
|
34151
34342
|
const env$1 = extendEnv ? {
|
|
34152
|
-
...
|
|
34343
|
+
...process$1.env,
|
|
34153
34344
|
...envOption
|
|
34154
34345
|
} : envOption;
|
|
34155
34346
|
if (preferLocal || node) return npmRunPathEnv({
|
|
@@ -35149,12 +35340,12 @@ const guessStreamDirection = {
|
|
|
35149
35340
|
}
|
|
35150
35341
|
};
|
|
35151
35342
|
const getStandardStreamDirection = (value) => {
|
|
35152
|
-
if ([0,
|
|
35343
|
+
if ([0, process$1.stdin].includes(value)) return "input";
|
|
35153
35344
|
if ([
|
|
35154
35345
|
1,
|
|
35155
35346
|
2,
|
|
35156
|
-
|
|
35157
|
-
|
|
35347
|
+
process$1.stdout,
|
|
35348
|
+
process$1.stderr
|
|
35158
35349
|
].includes(value)) return "output";
|
|
35159
35350
|
};
|
|
35160
35351
|
const DEFAULT_DIRECTION = "output";
|
|
@@ -36218,9 +36409,9 @@ const addIpcMethods = (subprocess, { ipc }) => {
|
|
|
36218
36409
|
Object.assign(subprocess, getIpcMethods(subprocess, false, ipc));
|
|
36219
36410
|
};
|
|
36220
36411
|
const getIpcExport = () => {
|
|
36221
|
-
const anyProcess =
|
|
36412
|
+
const anyProcess = process$1;
|
|
36222
36413
|
const isSubprocess = true;
|
|
36223
|
-
const ipc =
|
|
36414
|
+
const ipc = process$1.channel !== void 0;
|
|
36224
36415
|
return {
|
|
36225
36416
|
...getIpcMethods(anyProcess, isSubprocess, ipc),
|
|
36226
36417
|
getCancelSignal: getCancelSignal$1.bind(void 0, {
|
|
@@ -36462,7 +36653,7 @@ if (process.platform === "linux") signals.push("SIGIO", "SIGPOLL", "SIGPWR", "SI
|
|
|
36462
36653
|
|
|
36463
36654
|
//#endregion
|
|
36464
36655
|
//#region node_modules/signal-exit/dist/mjs/index.js
|
|
36465
|
-
const processOk = (process$
|
|
36656
|
+
const processOk = (process$5) => !!process$5 && typeof process$5 === "object" && typeof process$5.removeListener === "function" && typeof process$5.emit === "function" && typeof process$5.reallyExit === "function" && typeof process$5.listeners === "function" && typeof process$5.kill === "function" && typeof process$5.pid === "number" && typeof process$5.on === "function";
|
|
36466
36657
|
const kExitEmitter = Symbol.for("signal-exit emitter");
|
|
36467
36658
|
const global$1 = globalThis;
|
|
36468
36659
|
const ObjectDefineProperty = Object.defineProperty.bind(Object);
|
|
@@ -36530,7 +36721,7 @@ var SignalExitFallback = class extends SignalExitBase {
|
|
|
36530
36721
|
};
|
|
36531
36722
|
var SignalExit = class extends SignalExitBase {
|
|
36532
36723
|
/* c8 ignore start */
|
|
36533
|
-
#hupSig = process$
|
|
36724
|
+
#hupSig = process$2.platform === "win32" ? "SIGINT" : "SIGHUP";
|
|
36534
36725
|
/* c8 ignore stop */
|
|
36535
36726
|
#emitter = new Emitter();
|
|
36536
36727
|
#process;
|
|
@@ -36538,15 +36729,15 @@ var SignalExit = class extends SignalExitBase {
|
|
|
36538
36729
|
#originalProcessReallyExit;
|
|
36539
36730
|
#sigListeners = {};
|
|
36540
36731
|
#loaded = false;
|
|
36541
|
-
constructor(process$
|
|
36732
|
+
constructor(process$5) {
|
|
36542
36733
|
super();
|
|
36543
|
-
this.#process = process$
|
|
36734
|
+
this.#process = process$5;
|
|
36544
36735
|
this.#sigListeners = {};
|
|
36545
36736
|
for (const sig of signals) this.#sigListeners[sig] = () => {
|
|
36546
36737
|
const listeners = this.#process.listeners(sig);
|
|
36547
36738
|
let { count: count$1 } = this.#emitter;
|
|
36548
36739
|
/* c8 ignore start */
|
|
36549
|
-
const p$1 = process$
|
|
36740
|
+
const p$1 = process$5;
|
|
36550
36741
|
if (typeof p$1.__signal_exit_emitter__ === "object" && typeof p$1.__signal_exit_emitter__.count === "number") count$1 += p$1.__signal_exit_emitter__.count;
|
|
36551
36742
|
/* c8 ignore stop */
|
|
36552
36743
|
if (listeners.length === count$1) {
|
|
@@ -36554,11 +36745,11 @@ var SignalExit = class extends SignalExitBase {
|
|
|
36554
36745
|
const ret = this.#emitter.emit("exit", null, sig);
|
|
36555
36746
|
/* c8 ignore start */
|
|
36556
36747
|
const s = sig === "SIGHUP" ? this.#hupSig : sig;
|
|
36557
|
-
if (!ret) process$
|
|
36748
|
+
if (!ret) process$5.kill(process$5.pid, s);
|
|
36558
36749
|
}
|
|
36559
36750
|
};
|
|
36560
|
-
this.#originalProcessReallyExit = process$
|
|
36561
|
-
this.#originalProcessEmit = process$
|
|
36751
|
+
this.#originalProcessReallyExit = process$5.reallyExit;
|
|
36752
|
+
this.#originalProcessEmit = process$5.emit;
|
|
36562
36753
|
}
|
|
36563
36754
|
onExit(cb, opts) {
|
|
36564
36755
|
/* c8 ignore start */
|
|
@@ -36625,8 +36816,8 @@ var SignalExit = class extends SignalExitBase {
|
|
|
36625
36816
|
} else return og.call(this.#process, ev, ...args);
|
|
36626
36817
|
}
|
|
36627
36818
|
};
|
|
36628
|
-
const process$
|
|
36629
|
-
const { onExit, load, unload } = signalExitWrap(processOk(process$
|
|
36819
|
+
const process$2 = globalThis.process;
|
|
36820
|
+
const { onExit, load, unload } = signalExitWrap(processOk(process$2) ? new SignalExit(process$2) : new SignalExitFallback());
|
|
36630
36821
|
|
|
36631
36822
|
//#endregion
|
|
36632
36823
|
//#region node_modules/execa/lib/terminate/cleanup.js
|
|
@@ -38580,7 +38771,7 @@ function isInsideContainer() {
|
|
|
38580
38771
|
//#endregion
|
|
38581
38772
|
//#region node_modules/is-wsl/index.js
|
|
38582
38773
|
const isWsl = () => {
|
|
38583
|
-
if (
|
|
38774
|
+
if (process$1.platform !== "linux") return false;
|
|
38584
38775
|
if (os.release().toLowerCase().includes("microsoft")) {
|
|
38585
38776
|
if (isInsideContainer()) return false;
|
|
38586
38777
|
return true;
|
|
@@ -38591,12 +38782,12 @@ const isWsl = () => {
|
|
|
38591
38782
|
return false;
|
|
38592
38783
|
}
|
|
38593
38784
|
};
|
|
38594
|
-
var is_wsl_default =
|
|
38785
|
+
var is_wsl_default = process$1.env.__IS_WSL_TEST__ ? isWsl : isWsl();
|
|
38595
38786
|
|
|
38596
38787
|
//#endregion
|
|
38597
38788
|
//#region node_modules/powershell-utils/index.js
|
|
38598
38789
|
const execFile$2 = promisify(childProcess.execFile);
|
|
38599
|
-
const powerShellPath$1 = () => `${
|
|
38790
|
+
const powerShellPath$1 = () => `${process$1.env.SYSTEMROOT || process$1.env.windir || String.raw`C:\Windows`}\\System32\\WindowsPowerShell\\v1.0\\powershell.exe`;
|
|
38600
38791
|
const executePowerShell = async (command, options = {}) => {
|
|
38601
38792
|
const { powerShellPath: psPath, ...execFileOptions } = options;
|
|
38602
38793
|
const encodedCommand = executePowerShell.encodeCommand(command);
|
|
@@ -38707,7 +38898,7 @@ function defineLazyProperty(object$1, propertyName, valueGetter) {
|
|
|
38707
38898
|
//#region node_modules/default-browser-id/index.js
|
|
38708
38899
|
const execFileAsync$3 = promisify(execFile);
|
|
38709
38900
|
async function defaultBrowserId() {
|
|
38710
|
-
if (
|
|
38901
|
+
if (process$1.platform !== "darwin") throw new Error("macOS only");
|
|
38711
38902
|
const { stdout: stdout$1 } = await execFileAsync$3("defaults", [
|
|
38712
38903
|
"read",
|
|
38713
38904
|
"com.apple.LaunchServices/com.apple.launchservices.secure",
|
|
@@ -38722,7 +38913,7 @@ async function defaultBrowserId() {
|
|
|
38722
38913
|
//#region node_modules/run-applescript/index.js
|
|
38723
38914
|
const execFileAsync$2 = promisify(execFile);
|
|
38724
38915
|
async function runAppleScript(script, { humanReadableOutput = true, signal } = {}) {
|
|
38725
|
-
if (
|
|
38916
|
+
if (process$1.platform !== "darwin") throw new Error("macOS only");
|
|
38726
38917
|
const outputArguments = humanReadableOutput ? [] : ["-ss"];
|
|
38727
38918
|
const execOptions = {};
|
|
38728
38919
|
if (signal) execOptions.signal = signal;
|
|
@@ -38831,14 +39022,14 @@ async function defaultBrowser$1(_execFileAsync = execFileAsync$1) {
|
|
|
38831
39022
|
const execFileAsync = promisify(execFile);
|
|
38832
39023
|
const titleize = (string$2) => string$2.toLowerCase().replaceAll(/(?:^|\s|-)\S/g, (x$2) => x$2.toUpperCase());
|
|
38833
39024
|
async function defaultBrowser() {
|
|
38834
|
-
if (
|
|
39025
|
+
if (process$1.platform === "darwin") {
|
|
38835
39026
|
const id = await defaultBrowserId();
|
|
38836
39027
|
return {
|
|
38837
39028
|
name: await bundleName(id),
|
|
38838
39029
|
id
|
|
38839
39030
|
};
|
|
38840
39031
|
}
|
|
38841
|
-
if (
|
|
39032
|
+
if (process$1.platform === "linux") {
|
|
38842
39033
|
const { stdout: stdout$1 } = await execFileAsync("xdg-mime", [
|
|
38843
39034
|
"query",
|
|
38844
39035
|
"default",
|
|
@@ -38850,13 +39041,13 @@ async function defaultBrowser() {
|
|
|
38850
39041
|
id
|
|
38851
39042
|
};
|
|
38852
39043
|
}
|
|
38853
|
-
if (
|
|
39044
|
+
if (process$1.platform === "win32") return defaultBrowser$1();
|
|
38854
39045
|
throw new Error("Only macOS, Linux, and Windows are supported");
|
|
38855
39046
|
}
|
|
38856
39047
|
|
|
38857
39048
|
//#endregion
|
|
38858
39049
|
//#region node_modules/is-in-ssh/index.js
|
|
38859
|
-
const isInSsh = Boolean(
|
|
39050
|
+
const isInSsh = Boolean(process$1.env.SSH_CONNECTION || process$1.env.SSH_CLIENT || process$1.env.SSH_TTY);
|
|
38860
39051
|
var is_in_ssh_default = isInSsh;
|
|
38861
39052
|
|
|
38862
39053
|
//#endregion
|
|
@@ -38864,7 +39055,7 @@ var is_in_ssh_default = isInSsh;
|
|
|
38864
39055
|
const fallbackAttemptSymbol = Symbol("fallbackAttempt");
|
|
38865
39056
|
const __dirname = import.meta.url ? path.dirname(fileURLToPath(import.meta.url)) : "";
|
|
38866
39057
|
const localXdgOpenPath = path.join(__dirname, "xdg-open");
|
|
38867
|
-
const { platform: platform$1, arch } =
|
|
39058
|
+
const { platform: platform$1, arch } = process$1;
|
|
38868
39059
|
const tryEachApp = async (apps$1, opener) => {
|
|
38869
39060
|
if (apps$1.length === 0) return;
|
|
38870
39061
|
const errors = [];
|
|
@@ -38977,7 +39168,7 @@ const baseOpen = async (options) => {
|
|
|
38977
39168
|
await fs$1.access(localXdgOpenPath, constants$1.X_OK);
|
|
38978
39169
|
exeLocalXdgOpen = true;
|
|
38979
39170
|
} catch {}
|
|
38980
|
-
command =
|
|
39171
|
+
command = process$1.versions.electron ?? (platform$1 === "android" || isBundled || !exeLocalXdgOpen) ? "xdg-open" : localXdgOpenPath;
|
|
38981
39172
|
}
|
|
38982
39173
|
if (appArguments.length > 0) cliArguments.push(...appArguments);
|
|
38983
39174
|
if (!options.wait) {
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "task_manager",
|
|
3
|
+
"description": "An AI agent that helps you manage and change your tasks",
|
|
4
|
+
"instructions": "You are a helpful task management assistant. You can help users create, update, mark as completed, and delete tasks using the entity tool. When a user asks to change a task, help them modify it by updating the appropriate fields. Always be conversational and helpful.",
|
|
5
|
+
"tool_configs": [
|
|
6
|
+
{
|
|
7
|
+
"entity_name": "Task",
|
|
8
|
+
"allowed_operations": ["read", "create", "update", "delete"]
|
|
9
|
+
}
|
|
10
|
+
]
|
|
11
|
+
}
|