@gearbox-protocol/deploy-tools 5.63.2 → 5.63.3
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.mjs +1610 -834
- package/package.json +8 -8
package/dist/index.mjs
CHANGED
|
@@ -1211,7 +1211,7 @@ var require_command = __commonJS({
|
|
|
1211
1211
|
var childProcess = __require("node:child_process");
|
|
1212
1212
|
var path9 = __require("node:path");
|
|
1213
1213
|
var fs3 = __require("node:fs");
|
|
1214
|
-
var
|
|
1214
|
+
var process4 = __require("node:process");
|
|
1215
1215
|
var { Argument: Argument2, humanReadableArgName } = require_argument();
|
|
1216
1216
|
var { CommanderError: CommanderError2 } = require_error();
|
|
1217
1217
|
var { Help: Help2, stripColor } = require_help();
|
|
@@ -1258,13 +1258,13 @@ var require_command = __commonJS({
|
|
|
1258
1258
|
this._showSuggestionAfterError = true;
|
|
1259
1259
|
this._savedState = null;
|
|
1260
1260
|
this._outputConfiguration = {
|
|
1261
|
-
writeOut: (str) =>
|
|
1262
|
-
writeErr: (str) =>
|
|
1261
|
+
writeOut: (str) => process4.stdout.write(str),
|
|
1262
|
+
writeErr: (str) => process4.stderr.write(str),
|
|
1263
1263
|
outputError: (str, write) => write(str),
|
|
1264
|
-
getOutHelpWidth: () =>
|
|
1265
|
-
getErrHelpWidth: () =>
|
|
1266
|
-
getOutHasColors: () => useColor() ?? (
|
|
1267
|
-
getErrHasColors: () => useColor() ?? (
|
|
1264
|
+
getOutHelpWidth: () => process4.stdout.isTTY ? process4.stdout.columns : void 0,
|
|
1265
|
+
getErrHelpWidth: () => process4.stderr.isTTY ? process4.stderr.columns : void 0,
|
|
1266
|
+
getOutHasColors: () => useColor() ?? (process4.stdout.isTTY && process4.stdout.hasColors?.()),
|
|
1267
|
+
getErrHasColors: () => useColor() ?? (process4.stderr.isTTY && process4.stderr.hasColors?.()),
|
|
1268
1268
|
stripColor: (str) => stripColor(str)
|
|
1269
1269
|
};
|
|
1270
1270
|
this._hidden = false;
|
|
@@ -1658,7 +1658,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
|
|
|
1658
1658
|
if (this._exitCallback) {
|
|
1659
1659
|
this._exitCallback(new CommanderError2(exitCode, code, message));
|
|
1660
1660
|
}
|
|
1661
|
-
|
|
1661
|
+
process4.exit(exitCode);
|
|
1662
1662
|
}
|
|
1663
1663
|
/**
|
|
1664
1664
|
* Register callback `fn` for the command.
|
|
@@ -2058,16 +2058,16 @@ Expecting one of '${allowedValues.join("', '")}'`);
|
|
|
2058
2058
|
}
|
|
2059
2059
|
parseOptions = parseOptions || {};
|
|
2060
2060
|
if (argv === void 0 && parseOptions.from === void 0) {
|
|
2061
|
-
if (
|
|
2061
|
+
if (process4.versions?.electron) {
|
|
2062
2062
|
parseOptions.from = "electron";
|
|
2063
2063
|
}
|
|
2064
|
-
const execArgv =
|
|
2064
|
+
const execArgv = process4.execArgv ?? [];
|
|
2065
2065
|
if (execArgv.includes("-e") || execArgv.includes("--eval") || execArgv.includes("-p") || execArgv.includes("--print")) {
|
|
2066
2066
|
parseOptions.from = "eval";
|
|
2067
2067
|
}
|
|
2068
2068
|
}
|
|
2069
2069
|
if (argv === void 0) {
|
|
2070
|
-
argv =
|
|
2070
|
+
argv = process4.argv;
|
|
2071
2071
|
}
|
|
2072
2072
|
this.rawArgs = argv.slice();
|
|
2073
2073
|
let userArgs;
|
|
@@ -2078,7 +2078,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
|
|
|
2078
2078
|
userArgs = argv.slice(2);
|
|
2079
2079
|
break;
|
|
2080
2080
|
case "electron":
|
|
2081
|
-
if (
|
|
2081
|
+
if (process4.defaultApp) {
|
|
2082
2082
|
this._scriptPath = argv[1];
|
|
2083
2083
|
userArgs = argv.slice(2);
|
|
2084
2084
|
} else {
|
|
@@ -2265,11 +2265,11 @@ Expecting one of '${allowedValues.join("', '")}'`);
|
|
|
2265
2265
|
}
|
|
2266
2266
|
launchWithNode = sourceExt.includes(path9.extname(executableFile));
|
|
2267
2267
|
let proc;
|
|
2268
|
-
if (
|
|
2268
|
+
if (process4.platform !== "win32") {
|
|
2269
2269
|
if (launchWithNode) {
|
|
2270
2270
|
args.unshift(executableFile);
|
|
2271
|
-
args = incrementNodeInspectorPort(
|
|
2272
|
-
proc = childProcess.spawn(
|
|
2271
|
+
args = incrementNodeInspectorPort(process4.execArgv).concat(args);
|
|
2272
|
+
proc = childProcess.spawn(process4.argv[0], args, { stdio: "inherit" });
|
|
2273
2273
|
} else {
|
|
2274
2274
|
proc = childProcess.spawn(executableFile, args, { stdio: "inherit" });
|
|
2275
2275
|
}
|
|
@@ -2280,13 +2280,13 @@ Expecting one of '${allowedValues.join("', '")}'`);
|
|
|
2280
2280
|
subcommand._name
|
|
2281
2281
|
);
|
|
2282
2282
|
args.unshift(executableFile);
|
|
2283
|
-
args = incrementNodeInspectorPort(
|
|
2284
|
-
proc = childProcess.spawn(
|
|
2283
|
+
args = incrementNodeInspectorPort(process4.execArgv).concat(args);
|
|
2284
|
+
proc = childProcess.spawn(process4.execPath, args, { stdio: "inherit" });
|
|
2285
2285
|
}
|
|
2286
2286
|
if (!proc.killed) {
|
|
2287
2287
|
const signals = ["SIGUSR1", "SIGUSR2", "SIGTERM", "SIGINT", "SIGHUP"];
|
|
2288
2288
|
signals.forEach((signal) => {
|
|
2289
|
-
|
|
2289
|
+
process4.on(signal, () => {
|
|
2290
2290
|
if (proc.killed === false && proc.exitCode === null) {
|
|
2291
2291
|
proc.kill(signal);
|
|
2292
2292
|
}
|
|
@@ -2297,7 +2297,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
|
|
|
2297
2297
|
proc.on("close", (code) => {
|
|
2298
2298
|
code = code ?? 1;
|
|
2299
2299
|
if (!exitCallback) {
|
|
2300
|
-
|
|
2300
|
+
process4.exit(code);
|
|
2301
2301
|
} else {
|
|
2302
2302
|
exitCallback(
|
|
2303
2303
|
new CommanderError2(
|
|
@@ -2319,7 +2319,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
|
|
|
2319
2319
|
throw new Error(`'${executableFile}' not executable`);
|
|
2320
2320
|
}
|
|
2321
2321
|
if (!exitCallback) {
|
|
2322
|
-
|
|
2322
|
+
process4.exit(1);
|
|
2323
2323
|
} else {
|
|
2324
2324
|
const wrappedError = new CommanderError2(
|
|
2325
2325
|
1,
|
|
@@ -2819,13 +2819,13 @@ Expecting one of '${allowedValues.join("', '")}'`);
|
|
|
2819
2819
|
*/
|
|
2820
2820
|
_parseOptionsEnv() {
|
|
2821
2821
|
this.options.forEach((option) => {
|
|
2822
|
-
if (option.envVar && option.envVar in
|
|
2822
|
+
if (option.envVar && option.envVar in process4.env) {
|
|
2823
2823
|
const optionKey = option.attributeName();
|
|
2824
2824
|
if (this.getOptionValue(optionKey) === void 0 || ["default", "config", "env"].includes(
|
|
2825
2825
|
this.getOptionValueSource(optionKey)
|
|
2826
2826
|
)) {
|
|
2827
2827
|
if (option.required || option.optional) {
|
|
2828
|
-
this.emit(`optionEnv:${option.name()}`,
|
|
2828
|
+
this.emit(`optionEnv:${option.name()}`, process4.env[option.envVar]);
|
|
2829
2829
|
} else {
|
|
2830
2830
|
this.emit(`optionEnv:${option.name()}`);
|
|
2831
2831
|
}
|
|
@@ -3349,7 +3349,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
|
|
|
3349
3349
|
*/
|
|
3350
3350
|
help(contextOptions) {
|
|
3351
3351
|
this.outputHelp(contextOptions);
|
|
3352
|
-
let exitCode = Number(
|
|
3352
|
+
let exitCode = Number(process4.exitCode ?? 0);
|
|
3353
3353
|
if (exitCode === 0 && contextOptions && typeof contextOptions !== "function" && contextOptions.error) {
|
|
3354
3354
|
exitCode = 1;
|
|
3355
3355
|
}
|
|
@@ -3439,9 +3439,9 @@ Expecting one of '${allowedValues.join("', '")}'`);
|
|
|
3439
3439
|
});
|
|
3440
3440
|
}
|
|
3441
3441
|
function useColor() {
|
|
3442
|
-
if (
|
|
3442
|
+
if (process4.env.NO_COLOR || process4.env.FORCE_COLOR === "0" || process4.env.FORCE_COLOR === "false")
|
|
3443
3443
|
return false;
|
|
3444
|
-
if (
|
|
3444
|
+
if (process4.env.FORCE_COLOR || process4.env.CLICOLOR_FORCE !== void 0)
|
|
3445
3445
|
return true;
|
|
3446
3446
|
return void 0;
|
|
3447
3447
|
}
|
|
@@ -4480,7 +4480,7 @@ var init_size = __esm({
|
|
|
4480
4480
|
var version2;
|
|
4481
4481
|
var init_version2 = __esm({
|
|
4482
4482
|
"../../node_modules/viem/_esm/errors/version.js"() {
|
|
4483
|
-
version2 = "2.
|
|
4483
|
+
version2 = "2.42.1";
|
|
4484
4484
|
}
|
|
4485
4485
|
});
|
|
4486
4486
|
|
|
@@ -6436,7 +6436,7 @@ var init_cursor = __esm({
|
|
|
6436
6436
|
function createCursor(bytes, { recursiveReadLimit = 8192 } = {}) {
|
|
6437
6437
|
const cursor = Object.create(staticCursor);
|
|
6438
6438
|
cursor.bytes = bytes;
|
|
6439
|
-
cursor.dataView = new DataView(bytes.buffer, bytes.byteOffset, bytes.byteLength);
|
|
6439
|
+
cursor.dataView = new DataView(bytes.buffer ?? bytes, bytes.byteOffset, bytes.byteLength);
|
|
6440
6440
|
cursor.positionReadCount = /* @__PURE__ */ new Map();
|
|
6441
6441
|
cursor.recursiveReadLimit = recursiveReadLimit;
|
|
6442
6442
|
return cursor;
|
|
@@ -25509,7 +25509,7 @@ var require_bn = __commonJS({
|
|
|
25509
25509
|
assert9((this.negative | num2.negative) === 0);
|
|
25510
25510
|
return this.iuxor(num2);
|
|
25511
25511
|
};
|
|
25512
|
-
BN.prototype.xor = function
|
|
25512
|
+
BN.prototype.xor = function xor2(num2) {
|
|
25513
25513
|
if (this.length > num2.length) return this.clone().ixor(num2);
|
|
25514
25514
|
return num2.clone().ixor(this);
|
|
25515
25515
|
};
|
|
@@ -45180,8 +45180,8 @@ var require_fetch = __commonJS({
|
|
|
45180
45180
|
get processFunc() {
|
|
45181
45181
|
return this.#process || null;
|
|
45182
45182
|
}
|
|
45183
|
-
set processFunc(
|
|
45184
|
-
this.#process =
|
|
45183
|
+
set processFunc(process4) {
|
|
45184
|
+
this.#process = process4;
|
|
45185
45185
|
}
|
|
45186
45186
|
/**
|
|
45187
45187
|
* This function is called on each retry attempt.
|
|
@@ -55785,7 +55785,7 @@ var require_fragments = __commonJS({
|
|
|
55785
55785
|
* Walks the **ParamType** with %%value%%, calling %%process%%
|
|
55786
55786
|
* on each type, destructing the %%value%% recursively.
|
|
55787
55787
|
*/
|
|
55788
|
-
walk(value,
|
|
55788
|
+
walk(value, process4) {
|
|
55789
55789
|
if (this.isArray()) {
|
|
55790
55790
|
if (!Array.isArray(value)) {
|
|
55791
55791
|
throw new Error("invalid array value");
|
|
@@ -55794,7 +55794,7 @@ var require_fragments = __commonJS({
|
|
|
55794
55794
|
throw new Error("array is wrong length");
|
|
55795
55795
|
}
|
|
55796
55796
|
const _this = this;
|
|
55797
|
-
return value.map((v) => _this.arrayChildren.walk(v,
|
|
55797
|
+
return value.map((v) => _this.arrayChildren.walk(v, process4));
|
|
55798
55798
|
}
|
|
55799
55799
|
if (this.isTuple()) {
|
|
55800
55800
|
if (!Array.isArray(value)) {
|
|
@@ -55804,11 +55804,11 @@ var require_fragments = __commonJS({
|
|
|
55804
55804
|
throw new Error("array is wrong length");
|
|
55805
55805
|
}
|
|
55806
55806
|
const _this = this;
|
|
55807
|
-
return value.map((v, i) => _this.components[i].walk(v,
|
|
55807
|
+
return value.map((v, i) => _this.components[i].walk(v, process4));
|
|
55808
55808
|
}
|
|
55809
|
-
return
|
|
55809
|
+
return process4(this.type, value);
|
|
55810
55810
|
}
|
|
55811
|
-
#walkAsync(promises, value,
|
|
55811
|
+
#walkAsync(promises, value, process4, setValue) {
|
|
55812
55812
|
if (this.isArray()) {
|
|
55813
55813
|
if (!Array.isArray(value)) {
|
|
55814
55814
|
throw new Error("invalid array value");
|
|
@@ -55819,7 +55819,7 @@ var require_fragments = __commonJS({
|
|
|
55819
55819
|
const childType = this.arrayChildren;
|
|
55820
55820
|
const result2 = value.slice();
|
|
55821
55821
|
result2.forEach((value2, index2) => {
|
|
55822
|
-
childType.#walkAsync(promises, value2,
|
|
55822
|
+
childType.#walkAsync(promises, value2, process4, (value3) => {
|
|
55823
55823
|
result2[index2] = value3;
|
|
55824
55824
|
});
|
|
55825
55825
|
});
|
|
@@ -55849,14 +55849,14 @@ var require_fragments = __commonJS({
|
|
|
55849
55849
|
throw new Error("array is wrong length");
|
|
55850
55850
|
}
|
|
55851
55851
|
result2.forEach((value2, index2) => {
|
|
55852
|
-
components[index2].#walkAsync(promises, value2,
|
|
55852
|
+
components[index2].#walkAsync(promises, value2, process4, (value3) => {
|
|
55853
55853
|
result2[index2] = value3;
|
|
55854
55854
|
});
|
|
55855
55855
|
});
|
|
55856
55856
|
setValue(result2);
|
|
55857
55857
|
return;
|
|
55858
55858
|
}
|
|
55859
|
-
const result =
|
|
55859
|
+
const result = process4(this.type, value);
|
|
55860
55860
|
if (result.then) {
|
|
55861
55861
|
promises.push((async function() {
|
|
55862
55862
|
setValue(await result);
|
|
@@ -55872,10 +55872,10 @@ var require_fragments = __commonJS({
|
|
|
55872
55872
|
* This can be used to resolve ENS naes by walking and resolving each
|
|
55873
55873
|
* ``"address"`` type.
|
|
55874
55874
|
*/
|
|
55875
|
-
async walkAsync(value,
|
|
55875
|
+
async walkAsync(value, process4) {
|
|
55876
55876
|
const promises = [];
|
|
55877
55877
|
const result = [value];
|
|
55878
|
-
this.#walkAsync(promises, value,
|
|
55878
|
+
this.#walkAsync(promises, value, process4, (value2) => {
|
|
55879
55879
|
result[0] = value2;
|
|
55880
55880
|
});
|
|
55881
55881
|
if (promises.length) {
|
|
@@ -136004,14 +136004,14 @@ var require_lib7 = __commonJS({
|
|
|
136004
136004
|
}
|
|
136005
136005
|
const abortAndFinalize = function abortAndFinalize2() {
|
|
136006
136006
|
abort();
|
|
136007
|
-
|
|
136007
|
+
finalize2();
|
|
136008
136008
|
};
|
|
136009
136009
|
const req = send(options);
|
|
136010
136010
|
let reqTimeout;
|
|
136011
136011
|
if (signal) {
|
|
136012
136012
|
signal.addEventListener("abort", abortAndFinalize);
|
|
136013
136013
|
}
|
|
136014
|
-
function
|
|
136014
|
+
function finalize2() {
|
|
136015
136015
|
req.abort();
|
|
136016
136016
|
if (signal) signal.removeEventListener("abort", abortAndFinalize);
|
|
136017
136017
|
clearTimeout(reqTimeout);
|
|
@@ -136020,7 +136020,7 @@ var require_lib7 = __commonJS({
|
|
|
136020
136020
|
req.once("socket", function(socket) {
|
|
136021
136021
|
reqTimeout = setTimeout(function() {
|
|
136022
136022
|
reject(new FetchError(`network timeout at: ${request.url}`, "request-timeout"));
|
|
136023
|
-
|
|
136023
|
+
finalize2();
|
|
136024
136024
|
}, request.timeout);
|
|
136025
136025
|
});
|
|
136026
136026
|
}
|
|
@@ -136029,7 +136029,7 @@ var require_lib7 = __commonJS({
|
|
|
136029
136029
|
if (response && response.body) {
|
|
136030
136030
|
destroyStream(response.body, err);
|
|
136031
136031
|
}
|
|
136032
|
-
|
|
136032
|
+
finalize2();
|
|
136033
136033
|
});
|
|
136034
136034
|
fixResponseChunkedTransferBadEnding(req, function(err) {
|
|
136035
136035
|
if (signal && signal.aborted) {
|
|
@@ -136062,14 +136062,14 @@ var require_lib7 = __commonJS({
|
|
|
136062
136062
|
} catch (err) {
|
|
136063
136063
|
if (request.redirect !== "manual") {
|
|
136064
136064
|
reject(new FetchError(`uri requested responds with an invalid redirect URL: ${location}`, "invalid-redirect"));
|
|
136065
|
-
|
|
136065
|
+
finalize2();
|
|
136066
136066
|
return;
|
|
136067
136067
|
}
|
|
136068
136068
|
}
|
|
136069
136069
|
switch (request.redirect) {
|
|
136070
136070
|
case "error":
|
|
136071
136071
|
reject(new FetchError(`uri requested responds with a redirect, redirect mode is set to error: ${request.url}`, "no-redirect"));
|
|
136072
|
-
|
|
136072
|
+
finalize2();
|
|
136073
136073
|
return;
|
|
136074
136074
|
case "manual":
|
|
136075
136075
|
if (locationURL !== null) {
|
|
@@ -136086,7 +136086,7 @@ var require_lib7 = __commonJS({
|
|
|
136086
136086
|
}
|
|
136087
136087
|
if (request.counter >= request.follow) {
|
|
136088
136088
|
reject(new FetchError(`maximum redirect reached at: ${request.url}`, "max-redirect"));
|
|
136089
|
-
|
|
136089
|
+
finalize2();
|
|
136090
136090
|
return;
|
|
136091
136091
|
}
|
|
136092
136092
|
const requestOpts = {
|
|
@@ -136108,7 +136108,7 @@ var require_lib7 = __commonJS({
|
|
|
136108
136108
|
}
|
|
136109
136109
|
if (res.statusCode !== 303 && request.body && getTotalBytes(request) === null) {
|
|
136110
136110
|
reject(new FetchError("Cannot follow redirect with body being a readable stream", "unsupported-redirect"));
|
|
136111
|
-
|
|
136111
|
+
finalize2();
|
|
136112
136112
|
return;
|
|
136113
136113
|
}
|
|
136114
136114
|
if (res.statusCode === 303 || (res.statusCode === 301 || res.statusCode === 302) && request.method === "POST") {
|
|
@@ -136117,7 +136117,7 @@ var require_lib7 = __commonJS({
|
|
|
136117
136117
|
requestOpts.headers.delete("content-length");
|
|
136118
136118
|
}
|
|
136119
136119
|
resolve2(fetch2(new Request2(locationURL, requestOpts)));
|
|
136120
|
-
|
|
136120
|
+
finalize2();
|
|
136121
136121
|
return;
|
|
136122
136122
|
}
|
|
136123
136123
|
}
|
|
@@ -138037,8 +138037,8 @@ var require_fetch2 = __commonJS({
|
|
|
138037
138037
|
get processFunc() {
|
|
138038
138038
|
return this.#process || null;
|
|
138039
138039
|
}
|
|
138040
|
-
set processFunc(
|
|
138041
|
-
this.#process =
|
|
138040
|
+
set processFunc(process4) {
|
|
138041
|
+
this.#process = process4;
|
|
138042
138042
|
}
|
|
138043
138043
|
/**
|
|
138044
138044
|
* This function is called on each retry attempt.
|
|
@@ -148674,7 +148674,7 @@ var require_fragments2 = __commonJS({
|
|
|
148674
148674
|
* Walks the **ParamType** with %%value%%, calling %%process%%
|
|
148675
148675
|
* on each type, destructing the %%value%% recursively.
|
|
148676
148676
|
*/
|
|
148677
|
-
walk(value,
|
|
148677
|
+
walk(value, process4) {
|
|
148678
148678
|
if (this.isArray()) {
|
|
148679
148679
|
if (!Array.isArray(value)) {
|
|
148680
148680
|
throw new Error("invalid array value");
|
|
@@ -148683,7 +148683,7 @@ var require_fragments2 = __commonJS({
|
|
|
148683
148683
|
throw new Error("array is wrong length");
|
|
148684
148684
|
}
|
|
148685
148685
|
const _this = this;
|
|
148686
|
-
return value.map((v) => _this.arrayChildren.walk(v,
|
|
148686
|
+
return value.map((v) => _this.arrayChildren.walk(v, process4));
|
|
148687
148687
|
}
|
|
148688
148688
|
if (this.isTuple()) {
|
|
148689
148689
|
if (!Array.isArray(value)) {
|
|
@@ -148693,11 +148693,11 @@ var require_fragments2 = __commonJS({
|
|
|
148693
148693
|
throw new Error("array is wrong length");
|
|
148694
148694
|
}
|
|
148695
148695
|
const _this = this;
|
|
148696
|
-
return value.map((v, i) => _this.components[i].walk(v,
|
|
148696
|
+
return value.map((v, i) => _this.components[i].walk(v, process4));
|
|
148697
148697
|
}
|
|
148698
|
-
return
|
|
148698
|
+
return process4(this.type, value);
|
|
148699
148699
|
}
|
|
148700
|
-
#walkAsync(promises, value,
|
|
148700
|
+
#walkAsync(promises, value, process4, setValue) {
|
|
148701
148701
|
if (this.isArray()) {
|
|
148702
148702
|
if (!Array.isArray(value)) {
|
|
148703
148703
|
throw new Error("invalid array value");
|
|
@@ -148708,7 +148708,7 @@ var require_fragments2 = __commonJS({
|
|
|
148708
148708
|
const childType = this.arrayChildren;
|
|
148709
148709
|
const result2 = value.slice();
|
|
148710
148710
|
result2.forEach((value2, index2) => {
|
|
148711
|
-
childType.#walkAsync(promises, value2,
|
|
148711
|
+
childType.#walkAsync(promises, value2, process4, (value3) => {
|
|
148712
148712
|
result2[index2] = value3;
|
|
148713
148713
|
});
|
|
148714
148714
|
});
|
|
@@ -148738,14 +148738,14 @@ var require_fragments2 = __commonJS({
|
|
|
148738
148738
|
throw new Error("array is wrong length");
|
|
148739
148739
|
}
|
|
148740
148740
|
result2.forEach((value2, index2) => {
|
|
148741
|
-
components[index2].#walkAsync(promises, value2,
|
|
148741
|
+
components[index2].#walkAsync(promises, value2, process4, (value3) => {
|
|
148742
148742
|
result2[index2] = value3;
|
|
148743
148743
|
});
|
|
148744
148744
|
});
|
|
148745
148745
|
setValue(result2);
|
|
148746
148746
|
return;
|
|
148747
148747
|
}
|
|
148748
|
-
const result =
|
|
148748
|
+
const result = process4(this.type, value);
|
|
148749
148749
|
if (result.then) {
|
|
148750
148750
|
promises.push((async function() {
|
|
148751
148751
|
setValue(await result);
|
|
@@ -148761,10 +148761,10 @@ var require_fragments2 = __commonJS({
|
|
|
148761
148761
|
* This can be used to resolve ENS names by walking and resolving each
|
|
148762
148762
|
* ``"address"`` type.
|
|
148763
148763
|
*/
|
|
148764
|
-
async walkAsync(value,
|
|
148764
|
+
async walkAsync(value, process4) {
|
|
148765
148765
|
const promises = [];
|
|
148766
148766
|
const result = [value];
|
|
148767
|
-
this.#walkAsync(promises, value,
|
|
148767
|
+
this.#walkAsync(promises, value, process4, (value2) => {
|
|
148768
148768
|
result[0] = value2;
|
|
148769
148769
|
});
|
|
148770
148770
|
if (promises.length) {
|
|
@@ -198286,7 +198286,7 @@ var require_react_production = __commonJS({
|
|
|
198286
198286
|
exports2.useTransition = function() {
|
|
198287
198287
|
return ReactSharedInternals.H.useTransition();
|
|
198288
198288
|
};
|
|
198289
|
-
exports2.version = "19.2.
|
|
198289
|
+
exports2.version = "19.2.3";
|
|
198290
198290
|
}
|
|
198291
198291
|
});
|
|
198292
198292
|
|
|
@@ -199256,7 +199256,7 @@ var require_react_development = __commonJS({
|
|
|
199256
199256
|
exports2.useTransition = function() {
|
|
199257
199257
|
return resolveDispatcher().useTransition();
|
|
199258
199258
|
};
|
|
199259
|
-
exports2.version = "19.2.
|
|
199259
|
+
exports2.version = "19.2.3";
|
|
199260
199260
|
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
|
|
199261
199261
|
})();
|
|
199262
199262
|
}
|
|
@@ -199419,7 +199419,7 @@ var require_react_dom_production = __commonJS({
|
|
|
199419
199419
|
exports2.useFormStatus = function() {
|
|
199420
199420
|
return ReactSharedInternals.H.useHostTransitionStatus();
|
|
199421
199421
|
};
|
|
199422
|
-
exports2.version = "19.2.
|
|
199422
|
+
exports2.version = "19.2.3";
|
|
199423
199423
|
}
|
|
199424
199424
|
});
|
|
199425
199425
|
|
|
@@ -199661,7 +199661,7 @@ var require_react_dom_development = __commonJS({
|
|
|
199661
199661
|
exports2.useFormStatus = function() {
|
|
199662
199662
|
return resolveDispatcher().useHostTransitionStatus();
|
|
199663
199663
|
};
|
|
199664
|
-
exports2.version = "19.2.
|
|
199664
|
+
exports2.version = "19.2.3";
|
|
199665
199665
|
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
|
|
199666
199666
|
})();
|
|
199667
199667
|
}
|
|
@@ -204627,7 +204627,7 @@ var require_react_dom_server_legacy_node_production = __commonJS({
|
|
|
204627
204627
|
'The server used "renderToString" which does not support Suspense. If you intended for this Suspense boundary to render the fallback content on the server consider throwing an Error somewhere within the Suspense boundary. If you intended to have the server wait for the suspended component please switch to "renderToPipeableStream" which supports Suspense on the server'
|
|
204628
204628
|
);
|
|
204629
204629
|
};
|
|
204630
|
-
exports2.version = "19.2.
|
|
204630
|
+
exports2.version = "19.2.3";
|
|
204631
204631
|
}
|
|
204632
204632
|
});
|
|
204633
204633
|
|
|
@@ -209946,9 +209946,9 @@ var require_react_dom_server_node_production = __commonJS({
|
|
|
209946
209946
|
}
|
|
209947
209947
|
function ensureCorrectIsomorphicReactVersion() {
|
|
209948
209948
|
var isomorphicReactPackageVersion = React.version;
|
|
209949
|
-
if ("19.2.
|
|
209949
|
+
if ("19.2.3" !== isomorphicReactPackageVersion)
|
|
209950
209950
|
throw Error(
|
|
209951
|
-
'Incompatible React versions: The "react" and "react-dom" packages must have the exact same version. Instead got:\n - react: ' + (isomorphicReactPackageVersion + "\n - react-dom: 19.2.
|
|
209951
|
+
'Incompatible React versions: The "react" and "react-dom" packages must have the exact same version. Instead got:\n - react: ' + (isomorphicReactPackageVersion + "\n - react-dom: 19.2.3\nLearn more: https://react.dev/warnings/version-mismatch")
|
|
209952
209952
|
);
|
|
209953
209953
|
}
|
|
209954
209954
|
ensureCorrectIsomorphicReactVersion();
|
|
@@ -210471,7 +210471,7 @@ var require_react_dom_server_node_production = __commonJS({
|
|
|
210471
210471
|
}
|
|
210472
210472
|
};
|
|
210473
210473
|
};
|
|
210474
|
-
exports2.version = "19.2.
|
|
210474
|
+
exports2.version = "19.2.3";
|
|
210475
210475
|
}
|
|
210476
210476
|
});
|
|
210477
210477
|
|
|
@@ -217581,7 +217581,7 @@ var require_react_dom_server_legacy_node_development = __commonJS({
|
|
|
217581
217581
|
'The server used "renderToString" which does not support Suspense. If you intended for this Suspense boundary to render the fallback content on the server consider throwing an Error somewhere within the Suspense boundary. If you intended to have the server wait for the suspended component please switch to "renderToPipeableStream" which supports Suspense on the server'
|
|
217582
217582
|
);
|
|
217583
217583
|
};
|
|
217584
|
-
exports2.version = "19.2.
|
|
217584
|
+
exports2.version = "19.2.3";
|
|
217585
217585
|
})();
|
|
217586
217586
|
}
|
|
217587
217587
|
});
|
|
@@ -223855,9 +223855,9 @@ var require_react_dom_server_node_development = __commonJS({
|
|
|
223855
223855
|
}
|
|
223856
223856
|
function ensureCorrectIsomorphicReactVersion() {
|
|
223857
223857
|
var isomorphicReactPackageVersion = React.version;
|
|
223858
|
-
if ("19.2.
|
|
223858
|
+
if ("19.2.3" !== isomorphicReactPackageVersion)
|
|
223859
223859
|
throw Error(
|
|
223860
|
-
'Incompatible React versions: The "react" and "react-dom" packages must have the exact same version. Instead got:\n - react: ' + (isomorphicReactPackageVersion + "\n - react-dom: 19.2.
|
|
223860
|
+
'Incompatible React versions: The "react" and "react-dom" packages must have the exact same version. Instead got:\n - react: ' + (isomorphicReactPackageVersion + "\n - react-dom: 19.2.3\nLearn more: https://react.dev/warnings/version-mismatch")
|
|
223861
223861
|
);
|
|
223862
223862
|
}
|
|
223863
223863
|
function createDrainHandler(destination, request) {
|
|
@@ -225470,7 +225470,7 @@ var require_react_dom_server_node_development = __commonJS({
|
|
|
225470
225470
|
}
|
|
225471
225471
|
};
|
|
225472
225472
|
};
|
|
225473
|
-
exports2.version = "19.2.
|
|
225473
|
+
exports2.version = "19.2.3";
|
|
225474
225474
|
})();
|
|
225475
225475
|
}
|
|
225476
225476
|
});
|
|
@@ -227140,7 +227140,6 @@ async function estimateContractGas(client, parameters) {
|
|
|
227140
227140
|
init_getAbiItem();
|
|
227141
227141
|
|
|
227142
227142
|
// ../../node_modules/viem/_esm/utils/abi/parseEventLogs.js
|
|
227143
|
-
init_abi();
|
|
227144
227143
|
init_isAddressEqual();
|
|
227145
227144
|
init_toBytes();
|
|
227146
227145
|
init_keccak256();
|
|
@@ -227237,37 +227236,51 @@ function parseEventLogs(parameters) {
|
|
|
227237
227236
|
return [parameters.eventName];
|
|
227238
227237
|
})();
|
|
227239
227238
|
return logs.map((log2) => {
|
|
227240
|
-
|
|
227241
|
-
|
|
227242
|
-
|
|
227243
|
-
|
|
227244
|
-
|
|
227245
|
-
|
|
227246
|
-
|
|
227247
|
-
|
|
227248
|
-
|
|
227249
|
-
|
|
227250
|
-
|
|
227251
|
-
|
|
227252
|
-
|
|
227253
|
-
|
|
227254
|
-
|
|
227255
|
-
}
|
|
227256
|
-
|
|
227257
|
-
|
|
227258
|
-
|
|
227259
|
-
|
|
227260
|
-
|
|
227261
|
-
|
|
227262
|
-
|
|
227263
|
-
|
|
227264
|
-
|
|
227265
|
-
|
|
227266
|
-
|
|
227267
|
-
|
|
227239
|
+
const abiItems = abi5.filter((abiItem2) => abiItem2.type === "event" && log2.topics[0] === toEventSelector(abiItem2));
|
|
227240
|
+
if (abiItems.length === 0)
|
|
227241
|
+
return null;
|
|
227242
|
+
let event;
|
|
227243
|
+
let abiItem;
|
|
227244
|
+
for (const item of abiItems) {
|
|
227245
|
+
try {
|
|
227246
|
+
event = decodeEventLog({
|
|
227247
|
+
...log2,
|
|
227248
|
+
abi: [item],
|
|
227249
|
+
strict: true
|
|
227250
|
+
});
|
|
227251
|
+
abiItem = item;
|
|
227252
|
+
break;
|
|
227253
|
+
} catch {
|
|
227254
|
+
}
|
|
227255
|
+
}
|
|
227256
|
+
if (!event && !strict) {
|
|
227257
|
+
abiItem = abiItems[0];
|
|
227258
|
+
try {
|
|
227259
|
+
event = decodeEventLog({
|
|
227260
|
+
...log2,
|
|
227261
|
+
abi: [abiItem],
|
|
227262
|
+
strict: false
|
|
227263
|
+
});
|
|
227264
|
+
} catch {
|
|
227265
|
+
const isUnnamed = abiItem.inputs?.some((x) => !("name" in x && x.name));
|
|
227266
|
+
return {
|
|
227267
|
+
...log2,
|
|
227268
|
+
args: isUnnamed ? [] : {},
|
|
227269
|
+
eventName: abiItem.name
|
|
227270
|
+
};
|
|
227268
227271
|
}
|
|
227269
|
-
return { ...log2, args: isUnnamed ? [] : {}, eventName: eventName2 };
|
|
227270
227272
|
}
|
|
227273
|
+
if (!event || !abiItem)
|
|
227274
|
+
return null;
|
|
227275
|
+
if (eventName && !eventName.includes(event.eventName))
|
|
227276
|
+
return null;
|
|
227277
|
+
if (!includesArgs({
|
|
227278
|
+
args: event.args,
|
|
227279
|
+
inputs: abiItem.inputs,
|
|
227280
|
+
matchArgs: args
|
|
227281
|
+
}))
|
|
227282
|
+
return null;
|
|
227283
|
+
return { ...event, ...log2 };
|
|
227271
227284
|
}).filter(Boolean);
|
|
227272
227285
|
}
|
|
227273
227286
|
function includesArgs(parameters) {
|
|
@@ -227320,6 +227333,7 @@ function formatLog(log2, { args, eventName } = {}) {
|
|
|
227320
227333
|
...log2,
|
|
227321
227334
|
blockHash: log2.blockHash ? log2.blockHash : null,
|
|
227322
227335
|
blockNumber: log2.blockNumber ? BigInt(log2.blockNumber) : null,
|
|
227336
|
+
blockTimestamp: log2.blockTimestamp ? BigInt(log2.blockTimestamp) : log2.blockTimestamp === null ? null : void 0,
|
|
227323
227337
|
logIndex: log2.logIndex ? Number(log2.logIndex) : null,
|
|
227324
227338
|
transactionHash: log2.transactionHash ? log2.transactionHash : null,
|
|
227325
227339
|
transactionIndex: log2.transactionIndex ? Number(log2.transactionIndex) : null,
|
|
@@ -235144,6 +235158,7 @@ __export(chains_exports, {
|
|
|
235144
235158
|
geist: () => geist,
|
|
235145
235159
|
genesys: () => genesys,
|
|
235146
235160
|
giwaSepolia: () => giwaSepolia,
|
|
235161
|
+
giwaSepoliaPreconf: () => giwaSepoliaPreconf,
|
|
235147
235162
|
glideL1Protocol: () => glideL1Protocol,
|
|
235148
235163
|
glideL2Protocol: () => glideL2Protocol,
|
|
235149
235164
|
gnosis: () => gnosis,
|
|
@@ -235175,6 +235190,7 @@ __export(chains_exports, {
|
|
|
235175
235190
|
heliosTestnet: () => heliosTestnet,
|
|
235176
235191
|
hemi: () => hemi,
|
|
235177
235192
|
hemiSepolia: () => hemiSepolia,
|
|
235193
|
+
henesys: () => henesys,
|
|
235178
235194
|
holesky: () => holesky,
|
|
235179
235195
|
hoodi: () => hoodi,
|
|
235180
235196
|
hpb: () => hpb,
|
|
@@ -235464,6 +235480,7 @@ __export(chains_exports, {
|
|
|
235464
235480
|
sova: () => sova,
|
|
235465
235481
|
sovaSepolia: () => sovaSepolia,
|
|
235466
235482
|
spicy: () => spicy,
|
|
235483
|
+
stableTestnet: () => stableTestnet,
|
|
235467
235484
|
statusNetworkSepolia: () => statusSepolia,
|
|
235468
235485
|
statusSepolia: () => statusSepolia,
|
|
235469
235486
|
step: () => step,
|
|
@@ -235489,6 +235506,7 @@ __export(chains_exports, {
|
|
|
235489
235506
|
tacSPB: () => tacSPB,
|
|
235490
235507
|
taiko: () => taiko,
|
|
235491
235508
|
taikoHekla: () => taikoHekla,
|
|
235509
|
+
taikoHoodi: () => taikoHoodi,
|
|
235492
235510
|
taikoJolnir: () => taikoJolnir,
|
|
235493
235511
|
taikoKatla: () => taikoKatla,
|
|
235494
235512
|
taikoTestnetSepolia: () => taikoTestnetSepolia,
|
|
@@ -235558,6 +235576,7 @@ __export(chains_exports, {
|
|
|
235558
235576
|
xphereTestnet: () => xphereTestnet,
|
|
235559
235577
|
xrOne: () => xrOne,
|
|
235560
235578
|
xrSepolia: () => xrSepolia,
|
|
235579
|
+
xrplevm: () => xrplevm,
|
|
235561
235580
|
xrplevmDevnet: () => xrplevmDevnet,
|
|
235562
235581
|
xrplevmTestnet: () => xrplevmTestnet,
|
|
235563
235582
|
yooldoVerse: () => yooldoVerse,
|
|
@@ -241874,6 +241893,15 @@ var giwaSepolia = /* @__PURE__ */ defineChain({
|
|
|
241874
241893
|
testnet: true,
|
|
241875
241894
|
sourceId: sourceId24
|
|
241876
241895
|
});
|
|
241896
|
+
var giwaSepoliaPreconf = defineChain({
|
|
241897
|
+
...giwaSepolia,
|
|
241898
|
+
experimental_preconfirmationTime: 200,
|
|
241899
|
+
rpcUrls: {
|
|
241900
|
+
default: {
|
|
241901
|
+
http: ["https://sepolia-rpc-flashblocks.giwa.io"]
|
|
241902
|
+
}
|
|
241903
|
+
}
|
|
241904
|
+
});
|
|
241877
241905
|
|
|
241878
241906
|
// ../../node_modules/viem/_esm/chains/definitions/glideL1Protocol.js
|
|
241879
241907
|
var glideL1Protocol = /* @__PURE__ */ defineChain({
|
|
@@ -242638,6 +242666,24 @@ var hemiSepolia = /* @__PURE__ */ defineChain({
|
|
|
242638
242666
|
testnet: true
|
|
242639
242667
|
});
|
|
242640
242668
|
|
|
242669
|
+
// ../../node_modules/viem/_esm/chains/definitions/henesys.js
|
|
242670
|
+
var henesys = /* @__PURE__ */ defineChain({
|
|
242671
|
+
id: 68414,
|
|
242672
|
+
name: "Henesys",
|
|
242673
|
+
nativeCurrency: { name: "NEXPACE", symbol: "NXPC", decimals: 18 },
|
|
242674
|
+
rpcUrls: {
|
|
242675
|
+
default: {
|
|
242676
|
+
http: ["https://henesys-rpc.msu.io"]
|
|
242677
|
+
}
|
|
242678
|
+
},
|
|
242679
|
+
blockExplorers: {
|
|
242680
|
+
default: {
|
|
242681
|
+
name: "Avalanche Explorer",
|
|
242682
|
+
url: "https://subnets.avax.network/henesys"
|
|
242683
|
+
}
|
|
242684
|
+
}
|
|
242685
|
+
});
|
|
242686
|
+
|
|
242641
242687
|
// ../../node_modules/viem/_esm/chains/definitions/holesky.js
|
|
242642
242688
|
var holesky = /* @__PURE__ */ defineChain({
|
|
242643
242689
|
id: 17e3,
|
|
@@ -247717,7 +247763,7 @@ var polygon = /* @__PURE__ */ defineChain({
|
|
|
247717
247763
|
default: {
|
|
247718
247764
|
name: "PolygonScan",
|
|
247719
247765
|
url: "https://polygonscan.com",
|
|
247720
|
-
apiUrl: "https://api.
|
|
247766
|
+
apiUrl: "https://api.etherscan.io/v2/api"
|
|
247721
247767
|
}
|
|
247722
247768
|
},
|
|
247723
247769
|
contracts: {
|
|
@@ -247742,7 +247788,7 @@ var polygonAmoy = /* @__PURE__ */ defineChain({
|
|
|
247742
247788
|
default: {
|
|
247743
247789
|
name: "PolygonScan",
|
|
247744
247790
|
url: "https://amoy.polygonscan.com",
|
|
247745
|
-
apiUrl: "https://api
|
|
247791
|
+
apiUrl: "https://api.etherscan.io/v2/api"
|
|
247746
247792
|
}
|
|
247747
247793
|
},
|
|
247748
247794
|
contracts: {
|
|
@@ -250330,6 +250376,31 @@ var spicy = /* @__PURE__ */ defineChain({
|
|
|
250330
250376
|
testnet: true
|
|
250331
250377
|
});
|
|
250332
250378
|
|
|
250379
|
+
// ../../node_modules/viem/_esm/chains/definitions/stableTestnet.js
|
|
250380
|
+
var stableTestnet = /* @__PURE__ */ defineChain({
|
|
250381
|
+
id: 2201,
|
|
250382
|
+
name: "Stable Testnet",
|
|
250383
|
+
nativeCurrency: {
|
|
250384
|
+
decimals: 18,
|
|
250385
|
+
name: "gUSDT",
|
|
250386
|
+
symbol: "gUSDT"
|
|
250387
|
+
},
|
|
250388
|
+
rpcUrls: {
|
|
250389
|
+
default: {
|
|
250390
|
+
http: ["https://rpc.testnet.stable.xyz"],
|
|
250391
|
+
webSocket: ["wss://rpc.testnet.stable.xyz"]
|
|
250392
|
+
}
|
|
250393
|
+
},
|
|
250394
|
+
blockExplorers: {
|
|
250395
|
+
default: {
|
|
250396
|
+
name: "Stablescan",
|
|
250397
|
+
url: "https://testnet.stablescan.xyz",
|
|
250398
|
+
apiUrl: "https://testnet.stablescan.xyz/api"
|
|
250399
|
+
}
|
|
250400
|
+
},
|
|
250401
|
+
testnet: true
|
|
250402
|
+
});
|
|
250403
|
+
|
|
250333
250404
|
// ../../node_modules/viem/_esm/chains/definitions/statusNetworkSepolia.js
|
|
250334
250405
|
var statusSepolia = /* @__PURE__ */ defineChain({
|
|
250335
250406
|
...chainConfig4,
|
|
@@ -250943,14 +251014,14 @@ var taiko = /* @__PURE__ */ defineChain({
|
|
|
250943
251014
|
},
|
|
250944
251015
|
blockExplorers: {
|
|
250945
251016
|
default: {
|
|
250946
|
-
name: "
|
|
250947
|
-
url: "https://taikoscan.io"
|
|
250948
|
-
apiUrl: "https://api.taikoscan.io/api"
|
|
251017
|
+
name: "Etherscan",
|
|
251018
|
+
url: "https://taikoscan.io"
|
|
250949
251019
|
}
|
|
250950
251020
|
},
|
|
250951
251021
|
contracts: {
|
|
250952
251022
|
multicall3: {
|
|
250953
|
-
address: "
|
|
251023
|
+
address: "0xcA11bde05977b3631167028862bE2a173976CA11",
|
|
251024
|
+
blockCreated: 11269
|
|
250954
251025
|
}
|
|
250955
251026
|
}
|
|
250956
251027
|
});
|
|
@@ -250980,6 +251051,32 @@ var taikoHekla = /* @__PURE__ */ defineChain({
|
|
|
250980
251051
|
testnet: true
|
|
250981
251052
|
});
|
|
250982
251053
|
|
|
251054
|
+
// ../../node_modules/viem/_esm/chains/definitions/taikoHoodi.js
|
|
251055
|
+
var taikoHoodi = /* @__PURE__ */ defineChain({
|
|
251056
|
+
id: 167013,
|
|
251057
|
+
name: "Taiko Hoodi",
|
|
251058
|
+
nativeCurrency: { name: "Ether", symbol: "ETH", decimals: 18 },
|
|
251059
|
+
rpcUrls: {
|
|
251060
|
+
default: {
|
|
251061
|
+
http: ["https://rpc.hoodi.taiko.xyz"],
|
|
251062
|
+
webSocket: ["wss://ws.hoodi.taiko.xyz"]
|
|
251063
|
+
}
|
|
251064
|
+
},
|
|
251065
|
+
blockExplorers: {
|
|
251066
|
+
default: {
|
|
251067
|
+
name: "Etherscan",
|
|
251068
|
+
url: "https://hoodi.taikoscan.io/"
|
|
251069
|
+
}
|
|
251070
|
+
},
|
|
251071
|
+
contracts: {
|
|
251072
|
+
multicall3: {
|
|
251073
|
+
address: "0xcA11bde05977b3631167028862bE2a173976CA11",
|
|
251074
|
+
blockCreated: 581116
|
|
251075
|
+
}
|
|
251076
|
+
},
|
|
251077
|
+
testnet: true
|
|
251078
|
+
});
|
|
251079
|
+
|
|
250983
251080
|
// ../../node_modules/viem/_esm/chains/definitions/taikoJolnir.js
|
|
250984
251081
|
var taikoJolnir = /* @__PURE__ */ defineChain({
|
|
250985
251082
|
id: 167007,
|
|
@@ -252579,6 +252676,28 @@ var xrOne = /* @__PURE__ */ defineChain({
|
|
|
252579
252676
|
testnet: false
|
|
252580
252677
|
});
|
|
252581
252678
|
|
|
252679
|
+
// ../../node_modules/viem/_esm/chains/definitions/xrplevm.js
|
|
252680
|
+
var xrplevm = /* @__PURE__ */ defineChain({
|
|
252681
|
+
id: 144e4,
|
|
252682
|
+
name: "XRPL EVM",
|
|
252683
|
+
nativeCurrency: {
|
|
252684
|
+
name: "XRP",
|
|
252685
|
+
symbol: "XRP",
|
|
252686
|
+
decimals: 18
|
|
252687
|
+
},
|
|
252688
|
+
rpcUrls: {
|
|
252689
|
+
default: { http: ["https://rpc.xrplevm.org"] }
|
|
252690
|
+
},
|
|
252691
|
+
blockExplorers: {
|
|
252692
|
+
default: {
|
|
252693
|
+
name: "blockscout",
|
|
252694
|
+
url: "https://explorer.xrplevm.org",
|
|
252695
|
+
apiUrl: "https://explorer.xrplevm.org/api/v2"
|
|
252696
|
+
}
|
|
252697
|
+
},
|
|
252698
|
+
testnet: false
|
|
252699
|
+
});
|
|
252700
|
+
|
|
252582
252701
|
// ../../node_modules/viem/_esm/chains/definitions/xrplevmDevnet.js
|
|
252583
252702
|
var xrplevmDevnet = /* @__PURE__ */ defineChain({
|
|
252584
252703
|
id: 1440002,
|
|
@@ -253509,6 +253628,7 @@ __export(external_exports, {
|
|
|
253509
253628
|
ZodUnknown: () => ZodUnknown,
|
|
253510
253629
|
ZodVoid: () => ZodVoid,
|
|
253511
253630
|
ZodXID: () => ZodXID,
|
|
253631
|
+
ZodXor: () => ZodXor,
|
|
253512
253632
|
_ZodString: () => _ZodString,
|
|
253513
253633
|
_default: () => _default2,
|
|
253514
253634
|
_function: () => _function,
|
|
@@ -253547,6 +253667,7 @@ __export(external_exports, {
|
|
|
253547
253667
|
float32: () => float32,
|
|
253548
253668
|
float64: () => float64,
|
|
253549
253669
|
formatError: () => formatError,
|
|
253670
|
+
fromJSONSchema: () => fromJSONSchema,
|
|
253550
253671
|
function: () => _function,
|
|
253551
253672
|
getErrorMap: () => getErrorMap,
|
|
253552
253673
|
globalRegistry: () => globalRegistry,
|
|
@@ -253575,6 +253696,7 @@ __export(external_exports, {
|
|
|
253575
253696
|
literal: () => literal,
|
|
253576
253697
|
locales: () => locales_exports,
|
|
253577
253698
|
looseObject: () => looseObject,
|
|
253699
|
+
looseRecord: () => looseRecord,
|
|
253578
253700
|
lowercase: () => _lowercase,
|
|
253579
253701
|
lt: () => _lt,
|
|
253580
253702
|
lte: () => _lte,
|
|
@@ -253659,7 +253781,8 @@ __export(external_exports, {
|
|
|
253659
253781
|
uuidv6: () => uuidv6,
|
|
253660
253782
|
uuidv7: () => uuidv7,
|
|
253661
253783
|
void: () => _void2,
|
|
253662
|
-
xid: () => xid2
|
|
253784
|
+
xid: () => xid2,
|
|
253785
|
+
xor: () => xor
|
|
253663
253786
|
});
|
|
253664
253787
|
|
|
253665
253788
|
// ../../node_modules/zod/v4/core/index.js
|
|
@@ -253763,6 +253886,7 @@ __export(core_exports2, {
|
|
|
253763
253886
|
$ZodUnknown: () => $ZodUnknown,
|
|
253764
253887
|
$ZodVoid: () => $ZodVoid,
|
|
253765
253888
|
$ZodXID: () => $ZodXID,
|
|
253889
|
+
$ZodXor: () => $ZodXor,
|
|
253766
253890
|
$brand: () => $brand,
|
|
253767
253891
|
$constructor: () => $constructor,
|
|
253768
253892
|
$input: () => $input,
|
|
@@ -253897,17 +254021,23 @@ __export(core_exports2, {
|
|
|
253897
254021
|
_uuidv7: () => _uuidv7,
|
|
253898
254022
|
_void: () => _void,
|
|
253899
254023
|
_xid: () => _xid,
|
|
254024
|
+
_xor: () => _xor,
|
|
253900
254025
|
clone: () => clone,
|
|
253901
254026
|
config: () => config,
|
|
254027
|
+
createStandardJSONSchemaMethod: () => createStandardJSONSchemaMethod,
|
|
254028
|
+
createToJSONSchemaMethod: () => createToJSONSchemaMethod,
|
|
253902
254029
|
decode: () => decode2,
|
|
253903
254030
|
decodeAsync: () => decodeAsync,
|
|
253904
254031
|
describe: () => describe,
|
|
253905
254032
|
encode: () => encode5,
|
|
253906
254033
|
encodeAsync: () => encodeAsync,
|
|
254034
|
+
extractDefs: () => extractDefs,
|
|
254035
|
+
finalize: () => finalize,
|
|
253907
254036
|
flattenError: () => flattenError,
|
|
253908
254037
|
formatError: () => formatError,
|
|
253909
254038
|
globalConfig: () => globalConfig,
|
|
253910
254039
|
globalRegistry: () => globalRegistry,
|
|
254040
|
+
initializeContext: () => initializeContext,
|
|
253911
254041
|
isValidBase64: () => isValidBase64,
|
|
253912
254042
|
isValidBase64URL: () => isValidBase64URL,
|
|
253913
254043
|
isValidJWT: () => isValidJWT,
|
|
@@ -253916,6 +254046,7 @@ __export(core_exports2, {
|
|
|
253916
254046
|
parse: () => parse,
|
|
253917
254047
|
parseAsync: () => parseAsync,
|
|
253918
254048
|
prettifyError: () => prettifyError,
|
|
254049
|
+
process: () => process2,
|
|
253919
254050
|
regexes: () => regexes_exports,
|
|
253920
254051
|
registry: () => registry,
|
|
253921
254052
|
safeDecode: () => safeDecode,
|
|
@@ -254080,7 +254211,7 @@ function assertNotEqual(val) {
|
|
|
254080
254211
|
function assertIs(_arg) {
|
|
254081
254212
|
}
|
|
254082
254213
|
function assertNever(_x) {
|
|
254083
|
-
throw new Error();
|
|
254214
|
+
throw new Error("Unexpected value in exhaustive check");
|
|
254084
254215
|
}
|
|
254085
254216
|
function assert8(_) {
|
|
254086
254217
|
}
|
|
@@ -255608,8 +255739,8 @@ var Doc = class {
|
|
|
255608
255739
|
// ../../node_modules/zod/v4/core/versions.js
|
|
255609
255740
|
var version4 = {
|
|
255610
255741
|
major: 4,
|
|
255611
|
-
minor:
|
|
255612
|
-
patch:
|
|
255742
|
+
minor: 2,
|
|
255743
|
+
patch: 0
|
|
255613
255744
|
};
|
|
255614
255745
|
|
|
255615
255746
|
// ../../node_modules/zod/v4/core/schemas.js
|
|
@@ -256519,7 +256650,62 @@ var $ZodUnion = /* @__PURE__ */ $constructor("$ZodUnion", (inst, def) => {
|
|
|
256519
256650
|
});
|
|
256520
256651
|
};
|
|
256521
256652
|
});
|
|
256653
|
+
function handleExclusiveUnionResults(results, final, inst, ctx) {
|
|
256654
|
+
const successes = results.filter((r) => r.issues.length === 0);
|
|
256655
|
+
if (successes.length === 1) {
|
|
256656
|
+
final.value = successes[0].value;
|
|
256657
|
+
return final;
|
|
256658
|
+
}
|
|
256659
|
+
if (successes.length === 0) {
|
|
256660
|
+
final.issues.push({
|
|
256661
|
+
code: "invalid_union",
|
|
256662
|
+
input: final.value,
|
|
256663
|
+
inst,
|
|
256664
|
+
errors: results.map((result) => result.issues.map((iss) => finalizeIssue(iss, ctx, config())))
|
|
256665
|
+
});
|
|
256666
|
+
} else {
|
|
256667
|
+
final.issues.push({
|
|
256668
|
+
code: "invalid_union",
|
|
256669
|
+
input: final.value,
|
|
256670
|
+
inst,
|
|
256671
|
+
errors: [],
|
|
256672
|
+
inclusive: false
|
|
256673
|
+
});
|
|
256674
|
+
}
|
|
256675
|
+
return final;
|
|
256676
|
+
}
|
|
256677
|
+
var $ZodXor = /* @__PURE__ */ $constructor("$ZodXor", (inst, def) => {
|
|
256678
|
+
$ZodUnion.init(inst, def);
|
|
256679
|
+
def.inclusive = false;
|
|
256680
|
+
const single = def.options.length === 1;
|
|
256681
|
+
const first = def.options[0]._zod.run;
|
|
256682
|
+
inst._zod.parse = (payload, ctx) => {
|
|
256683
|
+
if (single) {
|
|
256684
|
+
return first(payload, ctx);
|
|
256685
|
+
}
|
|
256686
|
+
let async = false;
|
|
256687
|
+
const results = [];
|
|
256688
|
+
for (const option of def.options) {
|
|
256689
|
+
const result = option._zod.run({
|
|
256690
|
+
value: payload.value,
|
|
256691
|
+
issues: []
|
|
256692
|
+
}, ctx);
|
|
256693
|
+
if (result instanceof Promise) {
|
|
256694
|
+
results.push(result);
|
|
256695
|
+
async = true;
|
|
256696
|
+
} else {
|
|
256697
|
+
results.push(result);
|
|
256698
|
+
}
|
|
256699
|
+
}
|
|
256700
|
+
if (!async)
|
|
256701
|
+
return handleExclusiveUnionResults(results, payload, inst, ctx);
|
|
256702
|
+
return Promise.all(results).then((results2) => {
|
|
256703
|
+
return handleExclusiveUnionResults(results2, payload, inst, ctx);
|
|
256704
|
+
});
|
|
256705
|
+
};
|
|
256706
|
+
});
|
|
256522
256707
|
var $ZodDiscriminatedUnion = /* @__PURE__ */ $constructor("$ZodDiscriminatedUnion", (inst, def) => {
|
|
256708
|
+
def.inclusive = false;
|
|
256523
256709
|
$ZodUnion.init(inst, def);
|
|
256524
256710
|
const _super = inst._zod.parse;
|
|
256525
256711
|
defineLazy(inst._zod, "propValues", () => {
|
|
@@ -256795,15 +256981,18 @@ var $ZodRecord = /* @__PURE__ */ $constructor("$ZodRecord", (inst, def) => {
|
|
|
256795
256981
|
throw new Error("Async schemas not supported in object keys currently");
|
|
256796
256982
|
}
|
|
256797
256983
|
if (keyResult.issues.length) {
|
|
256798
|
-
|
|
256799
|
-
|
|
256800
|
-
|
|
256801
|
-
|
|
256802
|
-
|
|
256803
|
-
|
|
256804
|
-
|
|
256805
|
-
|
|
256806
|
-
|
|
256984
|
+
if (def.mode === "loose") {
|
|
256985
|
+
payload.value[key] = input[key];
|
|
256986
|
+
} else {
|
|
256987
|
+
payload.issues.push({
|
|
256988
|
+
code: "invalid_key",
|
|
256989
|
+
origin: "record",
|
|
256990
|
+
issues: keyResult.issues.map((iss) => finalizeIssue(iss, ctx, config())),
|
|
256991
|
+
input: key,
|
|
256992
|
+
path: [key],
|
|
256993
|
+
inst
|
|
256994
|
+
});
|
|
256995
|
+
}
|
|
256807
256996
|
continue;
|
|
256808
256997
|
}
|
|
256809
256998
|
const result = def.valueType._zod.run({ value: input[key], issues: [] }, ctx);
|
|
@@ -263890,6 +264079,14 @@ function _union(Class2, options, params) {
|
|
|
263890
264079
|
...normalizeParams(params)
|
|
263891
264080
|
});
|
|
263892
264081
|
}
|
|
264082
|
+
function _xor(Class2, options, params) {
|
|
264083
|
+
return new Class2({
|
|
264084
|
+
type: "union",
|
|
264085
|
+
options,
|
|
264086
|
+
inclusive: false,
|
|
264087
|
+
...normalizeParams(params)
|
|
264088
|
+
});
|
|
264089
|
+
}
|
|
263893
264090
|
function _discriminatedUnion(Class2, discriminator, options, params) {
|
|
263894
264091
|
return new Class2({
|
|
263895
264092
|
type: "union",
|
|
@@ -264186,726 +264383,243 @@ function _stringFormat(Class2, format, fnOrRegex, _params = {}) {
|
|
|
264186
264383
|
}
|
|
264187
264384
|
|
|
264188
264385
|
// ../../node_modules/zod/v4/core/to-json-schema.js
|
|
264189
|
-
|
|
264190
|
-
|
|
264191
|
-
|
|
264192
|
-
|
|
264193
|
-
|
|
264194
|
-
|
|
264195
|
-
|
|
264196
|
-
}
|
|
264197
|
-
|
|
264198
|
-
|
|
264199
|
-
|
|
264200
|
-
|
|
264201
|
-
|
|
264202
|
-
|
|
264203
|
-
|
|
264204
|
-
|
|
264205
|
-
|
|
264206
|
-
|
|
264207
|
-
|
|
264208
|
-
|
|
264209
|
-
|
|
264210
|
-
|
|
264211
|
-
|
|
264212
|
-
|
|
264213
|
-
|
|
264214
|
-
|
|
264215
|
-
|
|
264216
|
-
|
|
264217
|
-
|
|
264218
|
-
|
|
264219
|
-
}
|
|
264220
|
-
|
|
264221
|
-
|
|
264222
|
-
|
|
264223
|
-
|
|
264224
|
-
|
|
264386
|
+
function initializeContext(params) {
|
|
264387
|
+
let target = params?.target ?? "draft-2020-12";
|
|
264388
|
+
if (target === "draft-4")
|
|
264389
|
+
target = "draft-04";
|
|
264390
|
+
if (target === "draft-7")
|
|
264391
|
+
target = "draft-07";
|
|
264392
|
+
return {
|
|
264393
|
+
processors: params.processors ?? {},
|
|
264394
|
+
metadataRegistry: params?.metadata ?? globalRegistry,
|
|
264395
|
+
target,
|
|
264396
|
+
unrepresentable: params?.unrepresentable ?? "throw",
|
|
264397
|
+
override: params?.override ?? (() => {
|
|
264398
|
+
}),
|
|
264399
|
+
io: params?.io ?? "output",
|
|
264400
|
+
counter: 0,
|
|
264401
|
+
seen: /* @__PURE__ */ new Map(),
|
|
264402
|
+
cycles: params?.cycles ?? "ref",
|
|
264403
|
+
reused: params?.reused ?? "inline",
|
|
264404
|
+
external: params?.external ?? void 0
|
|
264405
|
+
};
|
|
264406
|
+
}
|
|
264407
|
+
function process2(schema, ctx, _params = { path: [], schemaPath: [] }) {
|
|
264408
|
+
var _a2;
|
|
264409
|
+
const def = schema._zod.def;
|
|
264410
|
+
const seen = ctx.seen.get(schema);
|
|
264411
|
+
if (seen) {
|
|
264412
|
+
seen.count++;
|
|
264413
|
+
const isCycle = _params.schemaPath.includes(schema);
|
|
264414
|
+
if (isCycle) {
|
|
264415
|
+
seen.cycle = _params.path;
|
|
264416
|
+
}
|
|
264417
|
+
return seen.schema;
|
|
264418
|
+
}
|
|
264419
|
+
const result = { schema: {}, count: 1, cycle: void 0, path: _params.path };
|
|
264420
|
+
ctx.seen.set(schema, result);
|
|
264421
|
+
const overrideSchema = schema._zod.toJSONSchema?.();
|
|
264422
|
+
if (overrideSchema) {
|
|
264423
|
+
result.schema = overrideSchema;
|
|
264424
|
+
} else {
|
|
264425
|
+
const params = {
|
|
264426
|
+
..._params,
|
|
264427
|
+
schemaPath: [..._params.schemaPath, schema],
|
|
264428
|
+
path: _params.path
|
|
264429
|
+
};
|
|
264430
|
+
const parent = schema._zod.parent;
|
|
264431
|
+
if (parent) {
|
|
264432
|
+
result.ref = parent;
|
|
264433
|
+
process2(parent, ctx, params);
|
|
264434
|
+
ctx.seen.get(parent).isParent = true;
|
|
264435
|
+
} else if (schema._zod.processJSONSchema) {
|
|
264436
|
+
schema._zod.processJSONSchema(ctx, result.schema, params);
|
|
264225
264437
|
} else {
|
|
264226
|
-
const
|
|
264227
|
-
|
|
264228
|
-
|
|
264229
|
-
|
|
264230
|
-
}
|
|
264231
|
-
|
|
264232
|
-
|
|
264233
|
-
|
|
264234
|
-
|
|
264235
|
-
|
|
264236
|
-
|
|
264237
|
-
|
|
264238
|
-
|
|
264239
|
-
|
|
264240
|
-
|
|
264241
|
-
|
|
264242
|
-
|
|
264243
|
-
|
|
264244
|
-
|
|
264245
|
-
|
|
264246
|
-
|
|
264247
|
-
|
|
264248
|
-
|
|
264249
|
-
|
|
264250
|
-
|
|
264251
|
-
|
|
264252
|
-
|
|
264253
|
-
|
|
264254
|
-
|
|
264255
|
-
|
|
264256
|
-
|
|
264257
|
-
|
|
264258
|
-
|
|
264259
|
-
|
|
264260
|
-
|
|
264261
|
-
|
|
264262
|
-
|
|
264263
|
-
|
|
264264
|
-
|
|
264265
|
-
|
|
264266
|
-
|
|
264267
|
-
|
|
264268
|
-
|
|
264269
|
-
|
|
264270
|
-
|
|
264271
|
-
|
|
264272
|
-
|
|
264273
|
-
|
|
264274
|
-
else
|
|
264275
|
-
json2.type = "number";
|
|
264276
|
-
if (typeof exclusiveMinimum === "number") {
|
|
264277
|
-
if (this.target === "draft-4" || this.target === "openapi-3.0") {
|
|
264278
|
-
json2.minimum = exclusiveMinimum;
|
|
264279
|
-
json2.exclusiveMinimum = true;
|
|
264280
|
-
} else {
|
|
264281
|
-
json2.exclusiveMinimum = exclusiveMinimum;
|
|
264282
|
-
}
|
|
264283
|
-
}
|
|
264284
|
-
if (typeof minimum === "number") {
|
|
264285
|
-
json2.minimum = minimum;
|
|
264286
|
-
if (typeof exclusiveMinimum === "number" && this.target !== "draft-4") {
|
|
264287
|
-
if (exclusiveMinimum >= minimum)
|
|
264288
|
-
delete json2.minimum;
|
|
264289
|
-
else
|
|
264290
|
-
delete json2.exclusiveMinimum;
|
|
264291
|
-
}
|
|
264292
|
-
}
|
|
264293
|
-
if (typeof exclusiveMaximum === "number") {
|
|
264294
|
-
if (this.target === "draft-4" || this.target === "openapi-3.0") {
|
|
264295
|
-
json2.maximum = exclusiveMaximum;
|
|
264296
|
-
json2.exclusiveMaximum = true;
|
|
264297
|
-
} else {
|
|
264298
|
-
json2.exclusiveMaximum = exclusiveMaximum;
|
|
264299
|
-
}
|
|
264300
|
-
}
|
|
264301
|
-
if (typeof maximum === "number") {
|
|
264302
|
-
json2.maximum = maximum;
|
|
264303
|
-
if (typeof exclusiveMaximum === "number" && this.target !== "draft-4") {
|
|
264304
|
-
if (exclusiveMaximum <= maximum)
|
|
264305
|
-
delete json2.maximum;
|
|
264306
|
-
else
|
|
264307
|
-
delete json2.exclusiveMaximum;
|
|
264308
|
-
}
|
|
264309
|
-
}
|
|
264310
|
-
if (typeof multipleOf === "number")
|
|
264311
|
-
json2.multipleOf = multipleOf;
|
|
264312
|
-
break;
|
|
264313
|
-
}
|
|
264314
|
-
case "boolean": {
|
|
264315
|
-
const json2 = _json;
|
|
264316
|
-
json2.type = "boolean";
|
|
264317
|
-
break;
|
|
264318
|
-
}
|
|
264319
|
-
case "bigint": {
|
|
264320
|
-
if (this.unrepresentable === "throw") {
|
|
264321
|
-
throw new Error("BigInt cannot be represented in JSON Schema");
|
|
264322
|
-
}
|
|
264323
|
-
break;
|
|
264324
|
-
}
|
|
264325
|
-
case "symbol": {
|
|
264326
|
-
if (this.unrepresentable === "throw") {
|
|
264327
|
-
throw new Error("Symbols cannot be represented in JSON Schema");
|
|
264328
|
-
}
|
|
264329
|
-
break;
|
|
264330
|
-
}
|
|
264331
|
-
case "null": {
|
|
264332
|
-
if (this.target === "openapi-3.0") {
|
|
264333
|
-
_json.type = "string";
|
|
264334
|
-
_json.nullable = true;
|
|
264335
|
-
_json.enum = [null];
|
|
264336
|
-
} else
|
|
264337
|
-
_json.type = "null";
|
|
264338
|
-
break;
|
|
264339
|
-
}
|
|
264340
|
-
case "any": {
|
|
264341
|
-
break;
|
|
264342
|
-
}
|
|
264343
|
-
case "unknown": {
|
|
264344
|
-
break;
|
|
264345
|
-
}
|
|
264346
|
-
case "undefined": {
|
|
264347
|
-
if (this.unrepresentable === "throw") {
|
|
264348
|
-
throw new Error("Undefined cannot be represented in JSON Schema");
|
|
264349
|
-
}
|
|
264350
|
-
break;
|
|
264351
|
-
}
|
|
264352
|
-
case "void": {
|
|
264353
|
-
if (this.unrepresentable === "throw") {
|
|
264354
|
-
throw new Error("Void cannot be represented in JSON Schema");
|
|
264355
|
-
}
|
|
264356
|
-
break;
|
|
264357
|
-
}
|
|
264358
|
-
case "never": {
|
|
264359
|
-
_json.not = {};
|
|
264360
|
-
break;
|
|
264361
|
-
}
|
|
264362
|
-
case "date": {
|
|
264363
|
-
if (this.unrepresentable === "throw") {
|
|
264364
|
-
throw new Error("Date cannot be represented in JSON Schema");
|
|
264365
|
-
}
|
|
264366
|
-
break;
|
|
264367
|
-
}
|
|
264368
|
-
case "array": {
|
|
264369
|
-
const json2 = _json;
|
|
264370
|
-
const { minimum, maximum } = schema._zod.bag;
|
|
264371
|
-
if (typeof minimum === "number")
|
|
264372
|
-
json2.minItems = minimum;
|
|
264373
|
-
if (typeof maximum === "number")
|
|
264374
|
-
json2.maxItems = maximum;
|
|
264375
|
-
json2.type = "array";
|
|
264376
|
-
json2.items = this.process(def.element, { ...params, path: [...params.path, "items"] });
|
|
264377
|
-
break;
|
|
264378
|
-
}
|
|
264379
|
-
case "object": {
|
|
264380
|
-
const json2 = _json;
|
|
264381
|
-
json2.type = "object";
|
|
264382
|
-
json2.properties = {};
|
|
264383
|
-
const shape2 = def.shape;
|
|
264384
|
-
for (const key in shape2) {
|
|
264385
|
-
json2.properties[key] = this.process(shape2[key], {
|
|
264386
|
-
...params,
|
|
264387
|
-
path: [...params.path, "properties", key]
|
|
264388
|
-
});
|
|
264389
|
-
}
|
|
264390
|
-
const allKeys = new Set(Object.keys(shape2));
|
|
264391
|
-
const requiredKeys = new Set([...allKeys].filter((key) => {
|
|
264392
|
-
const v = def.shape[key]._zod;
|
|
264393
|
-
if (this.io === "input") {
|
|
264394
|
-
return v.optin === void 0;
|
|
264395
|
-
} else {
|
|
264396
|
-
return v.optout === void 0;
|
|
264397
|
-
}
|
|
264398
|
-
}));
|
|
264399
|
-
if (requiredKeys.size > 0) {
|
|
264400
|
-
json2.required = Array.from(requiredKeys);
|
|
264401
|
-
}
|
|
264402
|
-
if (def.catchall?._zod.def.type === "never") {
|
|
264403
|
-
json2.additionalProperties = false;
|
|
264404
|
-
} else if (!def.catchall) {
|
|
264405
|
-
if (this.io === "output")
|
|
264406
|
-
json2.additionalProperties = false;
|
|
264407
|
-
} else if (def.catchall) {
|
|
264408
|
-
json2.additionalProperties = this.process(def.catchall, {
|
|
264409
|
-
...params,
|
|
264410
|
-
path: [...params.path, "additionalProperties"]
|
|
264411
|
-
});
|
|
264412
|
-
}
|
|
264413
|
-
break;
|
|
264414
|
-
}
|
|
264415
|
-
case "union": {
|
|
264416
|
-
const json2 = _json;
|
|
264417
|
-
const isDiscriminated = def.discriminator !== void 0;
|
|
264418
|
-
const options = def.options.map((x, i) => this.process(x, {
|
|
264419
|
-
...params,
|
|
264420
|
-
path: [...params.path, isDiscriminated ? "oneOf" : "anyOf", i]
|
|
264421
|
-
}));
|
|
264422
|
-
if (isDiscriminated) {
|
|
264423
|
-
json2.oneOf = options;
|
|
264424
|
-
} else {
|
|
264425
|
-
json2.anyOf = options;
|
|
264426
|
-
}
|
|
264427
|
-
break;
|
|
264428
|
-
}
|
|
264429
|
-
case "intersection": {
|
|
264430
|
-
const json2 = _json;
|
|
264431
|
-
const a = this.process(def.left, {
|
|
264432
|
-
...params,
|
|
264433
|
-
path: [...params.path, "allOf", 0]
|
|
264434
|
-
});
|
|
264435
|
-
const b = this.process(def.right, {
|
|
264436
|
-
...params,
|
|
264437
|
-
path: [...params.path, "allOf", 1]
|
|
264438
|
-
});
|
|
264439
|
-
const isSimpleIntersection = (val) => "allOf" in val && Object.keys(val).length === 1;
|
|
264440
|
-
const allOf = [
|
|
264441
|
-
...isSimpleIntersection(a) ? a.allOf : [a],
|
|
264442
|
-
...isSimpleIntersection(b) ? b.allOf : [b]
|
|
264443
|
-
];
|
|
264444
|
-
json2.allOf = allOf;
|
|
264445
|
-
break;
|
|
264446
|
-
}
|
|
264447
|
-
case "tuple": {
|
|
264448
|
-
const json2 = _json;
|
|
264449
|
-
json2.type = "array";
|
|
264450
|
-
const prefixPath = this.target === "draft-2020-12" ? "prefixItems" : "items";
|
|
264451
|
-
const restPath = this.target === "draft-2020-12" ? "items" : this.target === "openapi-3.0" ? "items" : "additionalItems";
|
|
264452
|
-
const prefixItems = def.items.map((x, i) => this.process(x, {
|
|
264453
|
-
...params,
|
|
264454
|
-
path: [...params.path, prefixPath, i]
|
|
264455
|
-
}));
|
|
264456
|
-
const rest = def.rest ? this.process(def.rest, {
|
|
264457
|
-
...params,
|
|
264458
|
-
path: [...params.path, restPath, ...this.target === "openapi-3.0" ? [def.items.length] : []]
|
|
264459
|
-
}) : null;
|
|
264460
|
-
if (this.target === "draft-2020-12") {
|
|
264461
|
-
json2.prefixItems = prefixItems;
|
|
264462
|
-
if (rest) {
|
|
264463
|
-
json2.items = rest;
|
|
264464
|
-
}
|
|
264465
|
-
} else if (this.target === "openapi-3.0") {
|
|
264466
|
-
json2.items = {
|
|
264467
|
-
anyOf: prefixItems
|
|
264468
|
-
};
|
|
264469
|
-
if (rest) {
|
|
264470
|
-
json2.items.anyOf.push(rest);
|
|
264471
|
-
}
|
|
264472
|
-
json2.minItems = prefixItems.length;
|
|
264473
|
-
if (!rest) {
|
|
264474
|
-
json2.maxItems = prefixItems.length;
|
|
264475
|
-
}
|
|
264476
|
-
} else {
|
|
264477
|
-
json2.items = prefixItems;
|
|
264478
|
-
if (rest) {
|
|
264479
|
-
json2.additionalItems = rest;
|
|
264480
|
-
}
|
|
264481
|
-
}
|
|
264482
|
-
const { minimum, maximum } = schema._zod.bag;
|
|
264483
|
-
if (typeof minimum === "number")
|
|
264484
|
-
json2.minItems = minimum;
|
|
264485
|
-
if (typeof maximum === "number")
|
|
264486
|
-
json2.maxItems = maximum;
|
|
264487
|
-
break;
|
|
264488
|
-
}
|
|
264489
|
-
case "record": {
|
|
264490
|
-
const json2 = _json;
|
|
264491
|
-
json2.type = "object";
|
|
264492
|
-
if (this.target === "draft-7" || this.target === "draft-2020-12") {
|
|
264493
|
-
json2.propertyNames = this.process(def.keyType, {
|
|
264494
|
-
...params,
|
|
264495
|
-
path: [...params.path, "propertyNames"]
|
|
264496
|
-
});
|
|
264497
|
-
}
|
|
264498
|
-
json2.additionalProperties = this.process(def.valueType, {
|
|
264499
|
-
...params,
|
|
264500
|
-
path: [...params.path, "additionalProperties"]
|
|
264501
|
-
});
|
|
264502
|
-
break;
|
|
264503
|
-
}
|
|
264504
|
-
case "map": {
|
|
264505
|
-
if (this.unrepresentable === "throw") {
|
|
264506
|
-
throw new Error("Map cannot be represented in JSON Schema");
|
|
264507
|
-
}
|
|
264508
|
-
break;
|
|
264509
|
-
}
|
|
264510
|
-
case "set": {
|
|
264511
|
-
if (this.unrepresentable === "throw") {
|
|
264512
|
-
throw new Error("Set cannot be represented in JSON Schema");
|
|
264513
|
-
}
|
|
264514
|
-
break;
|
|
264515
|
-
}
|
|
264516
|
-
case "enum": {
|
|
264517
|
-
const json2 = _json;
|
|
264518
|
-
const values = getEnumValues(def.entries);
|
|
264519
|
-
if (values.every((v) => typeof v === "number"))
|
|
264520
|
-
json2.type = "number";
|
|
264521
|
-
if (values.every((v) => typeof v === "string"))
|
|
264522
|
-
json2.type = "string";
|
|
264523
|
-
json2.enum = values;
|
|
264524
|
-
break;
|
|
264525
|
-
}
|
|
264526
|
-
case "literal": {
|
|
264527
|
-
const json2 = _json;
|
|
264528
|
-
const vals = [];
|
|
264529
|
-
for (const val of def.values) {
|
|
264530
|
-
if (val === void 0) {
|
|
264531
|
-
if (this.unrepresentable === "throw") {
|
|
264532
|
-
throw new Error("Literal `undefined` cannot be represented in JSON Schema");
|
|
264533
|
-
} else {
|
|
264534
|
-
}
|
|
264535
|
-
} else if (typeof val === "bigint") {
|
|
264536
|
-
if (this.unrepresentable === "throw") {
|
|
264537
|
-
throw new Error("BigInt literals cannot be represented in JSON Schema");
|
|
264538
|
-
} else {
|
|
264539
|
-
vals.push(Number(val));
|
|
264540
|
-
}
|
|
264541
|
-
} else {
|
|
264542
|
-
vals.push(val);
|
|
264543
|
-
}
|
|
264544
|
-
}
|
|
264545
|
-
if (vals.length === 0) {
|
|
264546
|
-
} else if (vals.length === 1) {
|
|
264547
|
-
const val = vals[0];
|
|
264548
|
-
json2.type = val === null ? "null" : typeof val;
|
|
264549
|
-
if (this.target === "draft-4" || this.target === "openapi-3.0") {
|
|
264550
|
-
json2.enum = [val];
|
|
264551
|
-
} else {
|
|
264552
|
-
json2.const = val;
|
|
264553
|
-
}
|
|
264554
|
-
} else {
|
|
264555
|
-
if (vals.every((v) => typeof v === "number"))
|
|
264556
|
-
json2.type = "number";
|
|
264557
|
-
if (vals.every((v) => typeof v === "string"))
|
|
264558
|
-
json2.type = "string";
|
|
264559
|
-
if (vals.every((v) => typeof v === "boolean"))
|
|
264560
|
-
json2.type = "string";
|
|
264561
|
-
if (vals.every((v) => v === null))
|
|
264562
|
-
json2.type = "null";
|
|
264563
|
-
json2.enum = vals;
|
|
264564
|
-
}
|
|
264565
|
-
break;
|
|
264566
|
-
}
|
|
264567
|
-
case "file": {
|
|
264568
|
-
const json2 = _json;
|
|
264569
|
-
const file2 = {
|
|
264570
|
-
type: "string",
|
|
264571
|
-
format: "binary",
|
|
264572
|
-
contentEncoding: "binary"
|
|
264573
|
-
};
|
|
264574
|
-
const { minimum, maximum, mime } = schema._zod.bag;
|
|
264575
|
-
if (minimum !== void 0)
|
|
264576
|
-
file2.minLength = minimum;
|
|
264577
|
-
if (maximum !== void 0)
|
|
264578
|
-
file2.maxLength = maximum;
|
|
264579
|
-
if (mime) {
|
|
264580
|
-
if (mime.length === 1) {
|
|
264581
|
-
file2.contentMediaType = mime[0];
|
|
264582
|
-
Object.assign(json2, file2);
|
|
264583
|
-
} else {
|
|
264584
|
-
json2.anyOf = mime.map((m) => {
|
|
264585
|
-
const mFile = { ...file2, contentMediaType: m };
|
|
264586
|
-
return mFile;
|
|
264587
|
-
});
|
|
264588
|
-
}
|
|
264589
|
-
} else {
|
|
264590
|
-
Object.assign(json2, file2);
|
|
264591
|
-
}
|
|
264592
|
-
break;
|
|
264593
|
-
}
|
|
264594
|
-
case "transform": {
|
|
264595
|
-
if (this.unrepresentable === "throw") {
|
|
264596
|
-
throw new Error("Transforms cannot be represented in JSON Schema");
|
|
264597
|
-
}
|
|
264598
|
-
break;
|
|
264599
|
-
}
|
|
264600
|
-
case "nullable": {
|
|
264601
|
-
const inner = this.process(def.innerType, params);
|
|
264602
|
-
if (this.target === "openapi-3.0") {
|
|
264603
|
-
result.ref = def.innerType;
|
|
264604
|
-
_json.nullable = true;
|
|
264605
|
-
} else {
|
|
264606
|
-
_json.anyOf = [inner, { type: "null" }];
|
|
264607
|
-
}
|
|
264608
|
-
break;
|
|
264609
|
-
}
|
|
264610
|
-
case "nonoptional": {
|
|
264611
|
-
this.process(def.innerType, params);
|
|
264612
|
-
result.ref = def.innerType;
|
|
264613
|
-
break;
|
|
264614
|
-
}
|
|
264615
|
-
case "success": {
|
|
264616
|
-
const json2 = _json;
|
|
264617
|
-
json2.type = "boolean";
|
|
264618
|
-
break;
|
|
264619
|
-
}
|
|
264620
|
-
case "default": {
|
|
264621
|
-
this.process(def.innerType, params);
|
|
264622
|
-
result.ref = def.innerType;
|
|
264623
|
-
_json.default = JSON.parse(JSON.stringify(def.defaultValue));
|
|
264624
|
-
break;
|
|
264625
|
-
}
|
|
264626
|
-
case "prefault": {
|
|
264627
|
-
this.process(def.innerType, params);
|
|
264628
|
-
result.ref = def.innerType;
|
|
264629
|
-
if (this.io === "input")
|
|
264630
|
-
_json._prefault = JSON.parse(JSON.stringify(def.defaultValue));
|
|
264631
|
-
break;
|
|
264632
|
-
}
|
|
264633
|
-
case "catch": {
|
|
264634
|
-
this.process(def.innerType, params);
|
|
264635
|
-
result.ref = def.innerType;
|
|
264636
|
-
let catchValue;
|
|
264637
|
-
try {
|
|
264638
|
-
catchValue = def.catchValue(void 0);
|
|
264639
|
-
} catch {
|
|
264640
|
-
throw new Error("Dynamic catch values are not supported in JSON Schema");
|
|
264641
|
-
}
|
|
264642
|
-
_json.default = catchValue;
|
|
264643
|
-
break;
|
|
264644
|
-
}
|
|
264645
|
-
case "nan": {
|
|
264646
|
-
if (this.unrepresentable === "throw") {
|
|
264647
|
-
throw new Error("NaN cannot be represented in JSON Schema");
|
|
264648
|
-
}
|
|
264649
|
-
break;
|
|
264650
|
-
}
|
|
264651
|
-
case "template_literal": {
|
|
264652
|
-
const json2 = _json;
|
|
264653
|
-
const pattern = schema._zod.pattern;
|
|
264654
|
-
if (!pattern)
|
|
264655
|
-
throw new Error("Pattern not found in template literal");
|
|
264656
|
-
json2.type = "string";
|
|
264657
|
-
json2.pattern = pattern.source;
|
|
264658
|
-
break;
|
|
264659
|
-
}
|
|
264660
|
-
case "pipe": {
|
|
264661
|
-
const innerType = this.io === "input" ? def.in._zod.def.type === "transform" ? def.out : def.in : def.out;
|
|
264662
|
-
this.process(innerType, params);
|
|
264663
|
-
result.ref = innerType;
|
|
264664
|
-
break;
|
|
264665
|
-
}
|
|
264666
|
-
case "readonly": {
|
|
264667
|
-
this.process(def.innerType, params);
|
|
264668
|
-
result.ref = def.innerType;
|
|
264669
|
-
_json.readOnly = true;
|
|
264670
|
-
break;
|
|
264671
|
-
}
|
|
264672
|
-
// passthrough types
|
|
264673
|
-
case "promise": {
|
|
264674
|
-
this.process(def.innerType, params);
|
|
264675
|
-
result.ref = def.innerType;
|
|
264676
|
-
break;
|
|
264677
|
-
}
|
|
264678
|
-
case "optional": {
|
|
264679
|
-
this.process(def.innerType, params);
|
|
264680
|
-
result.ref = def.innerType;
|
|
264681
|
-
break;
|
|
264682
|
-
}
|
|
264683
|
-
case "lazy": {
|
|
264684
|
-
const innerType = schema._zod.innerType;
|
|
264685
|
-
this.process(innerType, params);
|
|
264686
|
-
result.ref = innerType;
|
|
264687
|
-
break;
|
|
264688
|
-
}
|
|
264689
|
-
case "custom": {
|
|
264690
|
-
if (this.unrepresentable === "throw") {
|
|
264691
|
-
throw new Error("Custom types cannot be represented in JSON Schema");
|
|
264692
|
-
}
|
|
264693
|
-
break;
|
|
264694
|
-
}
|
|
264695
|
-
case "function": {
|
|
264696
|
-
if (this.unrepresentable === "throw") {
|
|
264697
|
-
throw new Error("Function types cannot be represented in JSON Schema");
|
|
264698
|
-
}
|
|
264699
|
-
break;
|
|
264700
|
-
}
|
|
264701
|
-
default: {
|
|
264702
|
-
def;
|
|
264703
|
-
}
|
|
264704
|
-
}
|
|
264705
|
-
}
|
|
264438
|
+
const _json = result.schema;
|
|
264439
|
+
const processor = ctx.processors[def.type];
|
|
264440
|
+
if (!processor) {
|
|
264441
|
+
throw new Error(`[toJSONSchema]: Non-representable type encountered: ${def.type}`);
|
|
264442
|
+
}
|
|
264443
|
+
processor(schema, ctx, _json, params);
|
|
264444
|
+
}
|
|
264445
|
+
}
|
|
264446
|
+
const meta3 = ctx.metadataRegistry.get(schema);
|
|
264447
|
+
if (meta3)
|
|
264448
|
+
Object.assign(result.schema, meta3);
|
|
264449
|
+
if (ctx.io === "input" && isTransforming(schema)) {
|
|
264450
|
+
delete result.schema.examples;
|
|
264451
|
+
delete result.schema.default;
|
|
264452
|
+
}
|
|
264453
|
+
if (ctx.io === "input" && result.schema._prefault)
|
|
264454
|
+
(_a2 = result.schema).default ?? (_a2.default = result.schema._prefault);
|
|
264455
|
+
delete result.schema._prefault;
|
|
264456
|
+
const _result = ctx.seen.get(schema);
|
|
264457
|
+
return _result.schema;
|
|
264458
|
+
}
|
|
264459
|
+
function extractDefs(ctx, schema) {
|
|
264460
|
+
const root3 = ctx.seen.get(schema);
|
|
264461
|
+
if (!root3)
|
|
264462
|
+
throw new Error("Unprocessed schema. This is a bug in Zod.");
|
|
264463
|
+
const makeURI = (entry) => {
|
|
264464
|
+
const defsSegment = ctx.target === "draft-2020-12" ? "$defs" : "definitions";
|
|
264465
|
+
if (ctx.external) {
|
|
264466
|
+
const externalId = ctx.external.registry.get(entry[0])?.id;
|
|
264467
|
+
const uriGenerator = ctx.external.uri ?? ((id2) => id2);
|
|
264468
|
+
if (externalId) {
|
|
264469
|
+
return { ref: uriGenerator(externalId) };
|
|
264470
|
+
}
|
|
264471
|
+
const id = entry[1].defId ?? entry[1].schema.id ?? `schema${ctx.counter++}`;
|
|
264472
|
+
entry[1].defId = id;
|
|
264473
|
+
return { defId: id, ref: `${uriGenerator("__shared")}#/${defsSegment}/${id}` };
|
|
264474
|
+
}
|
|
264475
|
+
if (entry[1] === root3) {
|
|
264476
|
+
return { ref: "#" };
|
|
264477
|
+
}
|
|
264478
|
+
const uriPrefix = `#`;
|
|
264479
|
+
const defUriPrefix = `${uriPrefix}/${defsSegment}/`;
|
|
264480
|
+
const defId = entry[1].schema.id ?? `__schema${ctx.counter++}`;
|
|
264481
|
+
return { defId, ref: defUriPrefix + defId };
|
|
264482
|
+
};
|
|
264483
|
+
const extractToDef = (entry) => {
|
|
264484
|
+
if (entry[1].schema.$ref) {
|
|
264485
|
+
return;
|
|
264706
264486
|
}
|
|
264707
|
-
const
|
|
264708
|
-
|
|
264709
|
-
|
|
264710
|
-
if (
|
|
264711
|
-
|
|
264712
|
-
|
|
264487
|
+
const seen = entry[1];
|
|
264488
|
+
const { ref, defId } = makeURI(entry);
|
|
264489
|
+
seen.def = { ...seen.schema };
|
|
264490
|
+
if (defId)
|
|
264491
|
+
seen.defId = defId;
|
|
264492
|
+
const schema2 = seen.schema;
|
|
264493
|
+
for (const key in schema2) {
|
|
264494
|
+
delete schema2[key];
|
|
264713
264495
|
}
|
|
264714
|
-
|
|
264715
|
-
|
|
264716
|
-
|
|
264717
|
-
const
|
|
264718
|
-
return _result.schema;
|
|
264719
|
-
}
|
|
264720
|
-
emit(schema, _params) {
|
|
264721
|
-
const params = {
|
|
264722
|
-
cycles: _params?.cycles ?? "ref",
|
|
264723
|
-
reused: _params?.reused ?? "inline",
|
|
264724
|
-
// unrepresentable: _params?.unrepresentable ?? "throw",
|
|
264725
|
-
// uri: _params?.uri ?? ((id) => `${id}`),
|
|
264726
|
-
external: _params?.external ?? void 0
|
|
264727
|
-
};
|
|
264728
|
-
const root3 = this.seen.get(schema);
|
|
264729
|
-
if (!root3)
|
|
264730
|
-
throw new Error("Unprocessed schema. This is a bug in Zod.");
|
|
264731
|
-
const makeURI = (entry) => {
|
|
264732
|
-
const defsSegment = this.target === "draft-2020-12" ? "$defs" : "definitions";
|
|
264733
|
-
if (params.external) {
|
|
264734
|
-
const externalId = params.external.registry.get(entry[0])?.id;
|
|
264735
|
-
const uriGenerator = params.external.uri ?? ((id2) => id2);
|
|
264736
|
-
if (externalId) {
|
|
264737
|
-
return { ref: uriGenerator(externalId) };
|
|
264738
|
-
}
|
|
264739
|
-
const id = entry[1].defId ?? entry[1].schema.id ?? `schema${this.counter++}`;
|
|
264740
|
-
entry[1].defId = id;
|
|
264741
|
-
return { defId: id, ref: `${uriGenerator("__shared")}#/${defsSegment}/${id}` };
|
|
264742
|
-
}
|
|
264743
|
-
if (entry[1] === root3) {
|
|
264744
|
-
return { ref: "#" };
|
|
264745
|
-
}
|
|
264746
|
-
const uriPrefix = `#`;
|
|
264747
|
-
const defUriPrefix = `${uriPrefix}/${defsSegment}/`;
|
|
264748
|
-
const defId = entry[1].schema.id ?? `__schema${this.counter++}`;
|
|
264749
|
-
return { defId, ref: defUriPrefix + defId };
|
|
264750
|
-
};
|
|
264751
|
-
const extractToDef = (entry) => {
|
|
264752
|
-
if (entry[1].schema.$ref) {
|
|
264753
|
-
return;
|
|
264754
|
-
}
|
|
264496
|
+
schema2.$ref = ref;
|
|
264497
|
+
};
|
|
264498
|
+
if (ctx.cycles === "throw") {
|
|
264499
|
+
for (const entry of ctx.seen.entries()) {
|
|
264755
264500
|
const seen = entry[1];
|
|
264756
|
-
|
|
264757
|
-
|
|
264758
|
-
if (defId)
|
|
264759
|
-
seen.defId = defId;
|
|
264760
|
-
const schema2 = seen.schema;
|
|
264761
|
-
for (const key in schema2) {
|
|
264762
|
-
delete schema2[key];
|
|
264763
|
-
}
|
|
264764
|
-
schema2.$ref = ref;
|
|
264765
|
-
};
|
|
264766
|
-
if (params.cycles === "throw") {
|
|
264767
|
-
for (const entry of this.seen.entries()) {
|
|
264768
|
-
const seen = entry[1];
|
|
264769
|
-
if (seen.cycle) {
|
|
264770
|
-
throw new Error(`Cycle detected: #/${seen.cycle?.join("/")}/<root>
|
|
264501
|
+
if (seen.cycle) {
|
|
264502
|
+
throw new Error(`Cycle detected: #/${seen.cycle?.join("/")}/<root>
|
|
264771
264503
|
|
|
264772
264504
|
Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`);
|
|
264773
|
-
}
|
|
264774
264505
|
}
|
|
264775
264506
|
}
|
|
264776
|
-
|
|
264777
|
-
|
|
264778
|
-
|
|
264779
|
-
|
|
264780
|
-
|
|
264781
|
-
|
|
264782
|
-
|
|
264783
|
-
|
|
264784
|
-
|
|
264785
|
-
|
|
264786
|
-
continue;
|
|
264787
|
-
}
|
|
264788
|
-
}
|
|
264789
|
-
const id = this.metadataRegistry.get(entry[0])?.id;
|
|
264790
|
-
if (id) {
|
|
264791
|
-
extractToDef(entry);
|
|
264792
|
-
continue;
|
|
264793
|
-
}
|
|
264794
|
-
if (seen.cycle) {
|
|
264507
|
+
}
|
|
264508
|
+
for (const entry of ctx.seen.entries()) {
|
|
264509
|
+
const seen = entry[1];
|
|
264510
|
+
if (schema === entry[0]) {
|
|
264511
|
+
extractToDef(entry);
|
|
264512
|
+
continue;
|
|
264513
|
+
}
|
|
264514
|
+
if (ctx.external) {
|
|
264515
|
+
const ext = ctx.external.registry.get(entry[0])?.id;
|
|
264516
|
+
if (schema !== entry[0] && ext) {
|
|
264795
264517
|
extractToDef(entry);
|
|
264796
264518
|
continue;
|
|
264797
264519
|
}
|
|
264798
|
-
if (seen.count > 1) {
|
|
264799
|
-
if (params.reused === "ref") {
|
|
264800
|
-
extractToDef(entry);
|
|
264801
|
-
continue;
|
|
264802
|
-
}
|
|
264803
|
-
}
|
|
264804
|
-
}
|
|
264805
|
-
const flattenRef = (zodSchema, params2) => {
|
|
264806
|
-
const seen = this.seen.get(zodSchema);
|
|
264807
|
-
const schema2 = seen.def ?? seen.schema;
|
|
264808
|
-
const _cached = { ...schema2 };
|
|
264809
|
-
if (seen.ref === null) {
|
|
264810
|
-
return;
|
|
264811
|
-
}
|
|
264812
|
-
const ref = seen.ref;
|
|
264813
|
-
seen.ref = null;
|
|
264814
|
-
if (ref) {
|
|
264815
|
-
flattenRef(ref, params2);
|
|
264816
|
-
const refSchema = this.seen.get(ref).schema;
|
|
264817
|
-
if (refSchema.$ref && (params2.target === "draft-7" || params2.target === "draft-4" || params2.target === "openapi-3.0")) {
|
|
264818
|
-
schema2.allOf = schema2.allOf ?? [];
|
|
264819
|
-
schema2.allOf.push(refSchema);
|
|
264820
|
-
} else {
|
|
264821
|
-
Object.assign(schema2, refSchema);
|
|
264822
|
-
Object.assign(schema2, _cached);
|
|
264823
|
-
}
|
|
264824
|
-
}
|
|
264825
|
-
if (!seen.isParent)
|
|
264826
|
-
this.override({
|
|
264827
|
-
zodSchema,
|
|
264828
|
-
jsonSchema: schema2,
|
|
264829
|
-
path: seen.path ?? []
|
|
264830
|
-
});
|
|
264831
|
-
};
|
|
264832
|
-
for (const entry of [...this.seen.entries()].reverse()) {
|
|
264833
|
-
flattenRef(entry[0], { target: this.target });
|
|
264834
|
-
}
|
|
264835
|
-
const result = {};
|
|
264836
|
-
if (this.target === "draft-2020-12") {
|
|
264837
|
-
result.$schema = "https://json-schema.org/draft/2020-12/schema";
|
|
264838
|
-
} else if (this.target === "draft-7") {
|
|
264839
|
-
result.$schema = "http://json-schema.org/draft-07/schema#";
|
|
264840
|
-
} else if (this.target === "draft-4") {
|
|
264841
|
-
result.$schema = "http://json-schema.org/draft-04/schema#";
|
|
264842
|
-
} else if (this.target === "openapi-3.0") {
|
|
264843
|
-
} else {
|
|
264844
|
-
console.warn(`Invalid target: ${this.target}`);
|
|
264845
264520
|
}
|
|
264846
|
-
|
|
264847
|
-
|
|
264848
|
-
|
|
264849
|
-
|
|
264850
|
-
result.$id = params.external.uri(id);
|
|
264521
|
+
const id = ctx.metadataRegistry.get(entry[0])?.id;
|
|
264522
|
+
if (id) {
|
|
264523
|
+
extractToDef(entry);
|
|
264524
|
+
continue;
|
|
264851
264525
|
}
|
|
264852
|
-
|
|
264853
|
-
|
|
264854
|
-
|
|
264855
|
-
const seen = entry[1];
|
|
264856
|
-
if (seen.def && seen.defId) {
|
|
264857
|
-
defs[seen.defId] = seen.def;
|
|
264858
|
-
}
|
|
264526
|
+
if (seen.cycle) {
|
|
264527
|
+
extractToDef(entry);
|
|
264528
|
+
continue;
|
|
264859
264529
|
}
|
|
264860
|
-
if (
|
|
264861
|
-
|
|
264862
|
-
|
|
264863
|
-
|
|
264864
|
-
result.$defs = defs;
|
|
264865
|
-
} else {
|
|
264866
|
-
result.definitions = defs;
|
|
264867
|
-
}
|
|
264530
|
+
if (seen.count > 1) {
|
|
264531
|
+
if (ctx.reused === "ref") {
|
|
264532
|
+
extractToDef(entry);
|
|
264533
|
+
continue;
|
|
264868
264534
|
}
|
|
264869
264535
|
}
|
|
264870
|
-
try {
|
|
264871
|
-
return JSON.parse(JSON.stringify(result));
|
|
264872
|
-
} catch (_err) {
|
|
264873
|
-
throw new Error("Error converting schema to JSON.");
|
|
264874
|
-
}
|
|
264875
264536
|
}
|
|
264876
|
-
}
|
|
264877
|
-
function
|
|
264878
|
-
|
|
264879
|
-
|
|
264880
|
-
|
|
264881
|
-
|
|
264882
|
-
|
|
264883
|
-
|
|
264537
|
+
}
|
|
264538
|
+
function finalize(ctx, schema) {
|
|
264539
|
+
const root3 = ctx.seen.get(schema);
|
|
264540
|
+
if (!root3)
|
|
264541
|
+
throw new Error("Unprocessed schema. This is a bug in Zod.");
|
|
264542
|
+
const flattenRef = (zodSchema) => {
|
|
264543
|
+
const seen = ctx.seen.get(zodSchema);
|
|
264544
|
+
const schema2 = seen.def ?? seen.schema;
|
|
264545
|
+
const _cached = { ...schema2 };
|
|
264546
|
+
if (seen.ref === null) {
|
|
264547
|
+
return;
|
|
264884
264548
|
}
|
|
264885
|
-
const
|
|
264886
|
-
|
|
264887
|
-
|
|
264888
|
-
|
|
264889
|
-
|
|
264890
|
-
|
|
264891
|
-
|
|
264892
|
-
|
|
264893
|
-
|
|
264894
|
-
|
|
264895
|
-
|
|
264549
|
+
const ref = seen.ref;
|
|
264550
|
+
seen.ref = null;
|
|
264551
|
+
if (ref) {
|
|
264552
|
+
flattenRef(ref);
|
|
264553
|
+
const refSchema = ctx.seen.get(ref).schema;
|
|
264554
|
+
if (refSchema.$ref && (ctx.target === "draft-07" || ctx.target === "draft-04" || ctx.target === "openapi-3.0")) {
|
|
264555
|
+
schema2.allOf = schema2.allOf ?? [];
|
|
264556
|
+
schema2.allOf.push(refSchema);
|
|
264557
|
+
} else {
|
|
264558
|
+
Object.assign(schema2, refSchema);
|
|
264559
|
+
Object.assign(schema2, _cached);
|
|
264560
|
+
}
|
|
264561
|
+
}
|
|
264562
|
+
if (!seen.isParent)
|
|
264563
|
+
ctx.override({
|
|
264564
|
+
zodSchema,
|
|
264565
|
+
jsonSchema: schema2,
|
|
264566
|
+
path: seen.path ?? []
|
|
264896
264567
|
});
|
|
264568
|
+
};
|
|
264569
|
+
for (const entry of [...ctx.seen.entries()].reverse()) {
|
|
264570
|
+
flattenRef(entry[0]);
|
|
264571
|
+
}
|
|
264572
|
+
const result = {};
|
|
264573
|
+
if (ctx.target === "draft-2020-12") {
|
|
264574
|
+
result.$schema = "https://json-schema.org/draft/2020-12/schema";
|
|
264575
|
+
} else if (ctx.target === "draft-07") {
|
|
264576
|
+
result.$schema = "http://json-schema.org/draft-07/schema#";
|
|
264577
|
+
} else if (ctx.target === "draft-04") {
|
|
264578
|
+
result.$schema = "http://json-schema.org/draft-04/schema#";
|
|
264579
|
+
} else if (ctx.target === "openapi-3.0") {
|
|
264580
|
+
} else {
|
|
264581
|
+
}
|
|
264582
|
+
if (ctx.external?.uri) {
|
|
264583
|
+
const id = ctx.external.registry.get(schema)?.id;
|
|
264584
|
+
if (!id)
|
|
264585
|
+
throw new Error("Schema is missing an `id` property");
|
|
264586
|
+
result.$id = ctx.external.uri(id);
|
|
264587
|
+
}
|
|
264588
|
+
Object.assign(result, root3.def ?? root3.schema);
|
|
264589
|
+
const defs = ctx.external?.defs ?? {};
|
|
264590
|
+
for (const entry of ctx.seen.entries()) {
|
|
264591
|
+
const seen = entry[1];
|
|
264592
|
+
if (seen.def && seen.defId) {
|
|
264593
|
+
defs[seen.defId] = seen.def;
|
|
264897
264594
|
}
|
|
264595
|
+
}
|
|
264596
|
+
if (ctx.external) {
|
|
264597
|
+
} else {
|
|
264898
264598
|
if (Object.keys(defs).length > 0) {
|
|
264899
|
-
|
|
264900
|
-
|
|
264901
|
-
|
|
264902
|
-
|
|
264599
|
+
if (ctx.target === "draft-2020-12") {
|
|
264600
|
+
result.$defs = defs;
|
|
264601
|
+
} else {
|
|
264602
|
+
result.definitions = defs;
|
|
264603
|
+
}
|
|
264903
264604
|
}
|
|
264904
|
-
return { schemas };
|
|
264905
264605
|
}
|
|
264906
|
-
|
|
264907
|
-
|
|
264908
|
-
|
|
264606
|
+
try {
|
|
264607
|
+
const finalized = JSON.parse(JSON.stringify(result));
|
|
264608
|
+
Object.defineProperty(finalized, "~standard", {
|
|
264609
|
+
value: {
|
|
264610
|
+
...schema["~standard"],
|
|
264611
|
+
jsonSchema: {
|
|
264612
|
+
input: createStandardJSONSchemaMethod(schema, "input"),
|
|
264613
|
+
output: createStandardJSONSchemaMethod(schema, "output")
|
|
264614
|
+
}
|
|
264615
|
+
},
|
|
264616
|
+
enumerable: false,
|
|
264617
|
+
writable: false
|
|
264618
|
+
});
|
|
264619
|
+
return finalized;
|
|
264620
|
+
} catch (_err) {
|
|
264621
|
+
throw new Error("Error converting schema to JSON.");
|
|
264622
|
+
}
|
|
264909
264623
|
}
|
|
264910
264624
|
function isTransforming(_schema, _ctx) {
|
|
264911
264625
|
const ctx = _ctx ?? { seen: /* @__PURE__ */ new Set() };
|
|
@@ -264958,6 +264672,623 @@ function isTransforming(_schema, _ctx) {
|
|
|
264958
264672
|
}
|
|
264959
264673
|
return false;
|
|
264960
264674
|
}
|
|
264675
|
+
var createToJSONSchemaMethod = (schema, processors = {}) => (params) => {
|
|
264676
|
+
const ctx = initializeContext({ ...params, processors });
|
|
264677
|
+
process2(schema, ctx);
|
|
264678
|
+
extractDefs(ctx, schema);
|
|
264679
|
+
return finalize(ctx, schema);
|
|
264680
|
+
};
|
|
264681
|
+
var createStandardJSONSchemaMethod = (schema, io) => (params) => {
|
|
264682
|
+
const { libraryOptions, target } = params ?? {};
|
|
264683
|
+
const ctx = initializeContext({ ...libraryOptions ?? {}, target, io, processors: {} });
|
|
264684
|
+
process2(schema, ctx);
|
|
264685
|
+
extractDefs(ctx, schema);
|
|
264686
|
+
return finalize(ctx, schema);
|
|
264687
|
+
};
|
|
264688
|
+
|
|
264689
|
+
// ../../node_modules/zod/v4/core/json-schema-processors.js
|
|
264690
|
+
var formatMap = {
|
|
264691
|
+
guid: "uuid",
|
|
264692
|
+
url: "uri",
|
|
264693
|
+
datetime: "date-time",
|
|
264694
|
+
json_string: "json-string",
|
|
264695
|
+
regex: ""
|
|
264696
|
+
// do not set
|
|
264697
|
+
};
|
|
264698
|
+
var stringProcessor = (schema, ctx, _json, _params) => {
|
|
264699
|
+
const json2 = _json;
|
|
264700
|
+
json2.type = "string";
|
|
264701
|
+
const { minimum, maximum, format, patterns, contentEncoding } = schema._zod.bag;
|
|
264702
|
+
if (typeof minimum === "number")
|
|
264703
|
+
json2.minLength = minimum;
|
|
264704
|
+
if (typeof maximum === "number")
|
|
264705
|
+
json2.maxLength = maximum;
|
|
264706
|
+
if (format) {
|
|
264707
|
+
json2.format = formatMap[format] ?? format;
|
|
264708
|
+
if (json2.format === "")
|
|
264709
|
+
delete json2.format;
|
|
264710
|
+
}
|
|
264711
|
+
if (contentEncoding)
|
|
264712
|
+
json2.contentEncoding = contentEncoding;
|
|
264713
|
+
if (patterns && patterns.size > 0) {
|
|
264714
|
+
const regexes = [...patterns];
|
|
264715
|
+
if (regexes.length === 1)
|
|
264716
|
+
json2.pattern = regexes[0].source;
|
|
264717
|
+
else if (regexes.length > 1) {
|
|
264718
|
+
json2.allOf = [
|
|
264719
|
+
...regexes.map((regex) => ({
|
|
264720
|
+
...ctx.target === "draft-07" || ctx.target === "draft-04" || ctx.target === "openapi-3.0" ? { type: "string" } : {},
|
|
264721
|
+
pattern: regex.source
|
|
264722
|
+
}))
|
|
264723
|
+
];
|
|
264724
|
+
}
|
|
264725
|
+
}
|
|
264726
|
+
};
|
|
264727
|
+
var numberProcessor = (schema, ctx, _json, _params) => {
|
|
264728
|
+
const json2 = _json;
|
|
264729
|
+
const { minimum, maximum, format, multipleOf, exclusiveMaximum, exclusiveMinimum } = schema._zod.bag;
|
|
264730
|
+
if (typeof format === "string" && format.includes("int"))
|
|
264731
|
+
json2.type = "integer";
|
|
264732
|
+
else
|
|
264733
|
+
json2.type = "number";
|
|
264734
|
+
if (typeof exclusiveMinimum === "number") {
|
|
264735
|
+
if (ctx.target === "draft-04" || ctx.target === "openapi-3.0") {
|
|
264736
|
+
json2.minimum = exclusiveMinimum;
|
|
264737
|
+
json2.exclusiveMinimum = true;
|
|
264738
|
+
} else {
|
|
264739
|
+
json2.exclusiveMinimum = exclusiveMinimum;
|
|
264740
|
+
}
|
|
264741
|
+
}
|
|
264742
|
+
if (typeof minimum === "number") {
|
|
264743
|
+
json2.minimum = minimum;
|
|
264744
|
+
if (typeof exclusiveMinimum === "number" && ctx.target !== "draft-04") {
|
|
264745
|
+
if (exclusiveMinimum >= minimum)
|
|
264746
|
+
delete json2.minimum;
|
|
264747
|
+
else
|
|
264748
|
+
delete json2.exclusiveMinimum;
|
|
264749
|
+
}
|
|
264750
|
+
}
|
|
264751
|
+
if (typeof exclusiveMaximum === "number") {
|
|
264752
|
+
if (ctx.target === "draft-04" || ctx.target === "openapi-3.0") {
|
|
264753
|
+
json2.maximum = exclusiveMaximum;
|
|
264754
|
+
json2.exclusiveMaximum = true;
|
|
264755
|
+
} else {
|
|
264756
|
+
json2.exclusiveMaximum = exclusiveMaximum;
|
|
264757
|
+
}
|
|
264758
|
+
}
|
|
264759
|
+
if (typeof maximum === "number") {
|
|
264760
|
+
json2.maximum = maximum;
|
|
264761
|
+
if (typeof exclusiveMaximum === "number" && ctx.target !== "draft-04") {
|
|
264762
|
+
if (exclusiveMaximum <= maximum)
|
|
264763
|
+
delete json2.maximum;
|
|
264764
|
+
else
|
|
264765
|
+
delete json2.exclusiveMaximum;
|
|
264766
|
+
}
|
|
264767
|
+
}
|
|
264768
|
+
if (typeof multipleOf === "number")
|
|
264769
|
+
json2.multipleOf = multipleOf;
|
|
264770
|
+
};
|
|
264771
|
+
var booleanProcessor = (_schema, _ctx, json2, _params) => {
|
|
264772
|
+
json2.type = "boolean";
|
|
264773
|
+
};
|
|
264774
|
+
var bigintProcessor = (_schema, ctx, _json, _params) => {
|
|
264775
|
+
if (ctx.unrepresentable === "throw") {
|
|
264776
|
+
throw new Error("BigInt cannot be represented in JSON Schema");
|
|
264777
|
+
}
|
|
264778
|
+
};
|
|
264779
|
+
var symbolProcessor = (_schema, ctx, _json, _params) => {
|
|
264780
|
+
if (ctx.unrepresentable === "throw") {
|
|
264781
|
+
throw new Error("Symbols cannot be represented in JSON Schema");
|
|
264782
|
+
}
|
|
264783
|
+
};
|
|
264784
|
+
var nullProcessor = (_schema, ctx, json2, _params) => {
|
|
264785
|
+
if (ctx.target === "openapi-3.0") {
|
|
264786
|
+
json2.type = "string";
|
|
264787
|
+
json2.nullable = true;
|
|
264788
|
+
json2.enum = [null];
|
|
264789
|
+
} else {
|
|
264790
|
+
json2.type = "null";
|
|
264791
|
+
}
|
|
264792
|
+
};
|
|
264793
|
+
var undefinedProcessor = (_schema, ctx, _json, _params) => {
|
|
264794
|
+
if (ctx.unrepresentable === "throw") {
|
|
264795
|
+
throw new Error("Undefined cannot be represented in JSON Schema");
|
|
264796
|
+
}
|
|
264797
|
+
};
|
|
264798
|
+
var voidProcessor = (_schema, ctx, _json, _params) => {
|
|
264799
|
+
if (ctx.unrepresentable === "throw") {
|
|
264800
|
+
throw new Error("Void cannot be represented in JSON Schema");
|
|
264801
|
+
}
|
|
264802
|
+
};
|
|
264803
|
+
var neverProcessor = (_schema, _ctx, json2, _params) => {
|
|
264804
|
+
json2.not = {};
|
|
264805
|
+
};
|
|
264806
|
+
var anyProcessor = (_schema, _ctx, _json, _params) => {
|
|
264807
|
+
};
|
|
264808
|
+
var unknownProcessor = (_schema, _ctx, _json, _params) => {
|
|
264809
|
+
};
|
|
264810
|
+
var dateProcessor = (_schema, ctx, _json, _params) => {
|
|
264811
|
+
if (ctx.unrepresentable === "throw") {
|
|
264812
|
+
throw new Error("Date cannot be represented in JSON Schema");
|
|
264813
|
+
}
|
|
264814
|
+
};
|
|
264815
|
+
var enumProcessor = (schema, _ctx, json2, _params) => {
|
|
264816
|
+
const def = schema._zod.def;
|
|
264817
|
+
const values = getEnumValues(def.entries);
|
|
264818
|
+
if (values.every((v) => typeof v === "number"))
|
|
264819
|
+
json2.type = "number";
|
|
264820
|
+
if (values.every((v) => typeof v === "string"))
|
|
264821
|
+
json2.type = "string";
|
|
264822
|
+
json2.enum = values;
|
|
264823
|
+
};
|
|
264824
|
+
var literalProcessor = (schema, ctx, json2, _params) => {
|
|
264825
|
+
const def = schema._zod.def;
|
|
264826
|
+
const vals = [];
|
|
264827
|
+
for (const val of def.values) {
|
|
264828
|
+
if (val === void 0) {
|
|
264829
|
+
if (ctx.unrepresentable === "throw") {
|
|
264830
|
+
throw new Error("Literal `undefined` cannot be represented in JSON Schema");
|
|
264831
|
+
} else {
|
|
264832
|
+
}
|
|
264833
|
+
} else if (typeof val === "bigint") {
|
|
264834
|
+
if (ctx.unrepresentable === "throw") {
|
|
264835
|
+
throw new Error("BigInt literals cannot be represented in JSON Schema");
|
|
264836
|
+
} else {
|
|
264837
|
+
vals.push(Number(val));
|
|
264838
|
+
}
|
|
264839
|
+
} else {
|
|
264840
|
+
vals.push(val);
|
|
264841
|
+
}
|
|
264842
|
+
}
|
|
264843
|
+
if (vals.length === 0) {
|
|
264844
|
+
} else if (vals.length === 1) {
|
|
264845
|
+
const val = vals[0];
|
|
264846
|
+
json2.type = val === null ? "null" : typeof val;
|
|
264847
|
+
if (ctx.target === "draft-04" || ctx.target === "openapi-3.0") {
|
|
264848
|
+
json2.enum = [val];
|
|
264849
|
+
} else {
|
|
264850
|
+
json2.const = val;
|
|
264851
|
+
}
|
|
264852
|
+
} else {
|
|
264853
|
+
if (vals.every((v) => typeof v === "number"))
|
|
264854
|
+
json2.type = "number";
|
|
264855
|
+
if (vals.every((v) => typeof v === "string"))
|
|
264856
|
+
json2.type = "string";
|
|
264857
|
+
if (vals.every((v) => typeof v === "boolean"))
|
|
264858
|
+
json2.type = "boolean";
|
|
264859
|
+
if (vals.every((v) => v === null))
|
|
264860
|
+
json2.type = "null";
|
|
264861
|
+
json2.enum = vals;
|
|
264862
|
+
}
|
|
264863
|
+
};
|
|
264864
|
+
var nanProcessor = (_schema, ctx, _json, _params) => {
|
|
264865
|
+
if (ctx.unrepresentable === "throw") {
|
|
264866
|
+
throw new Error("NaN cannot be represented in JSON Schema");
|
|
264867
|
+
}
|
|
264868
|
+
};
|
|
264869
|
+
var templateLiteralProcessor = (schema, _ctx, json2, _params) => {
|
|
264870
|
+
const _json = json2;
|
|
264871
|
+
const pattern = schema._zod.pattern;
|
|
264872
|
+
if (!pattern)
|
|
264873
|
+
throw new Error("Pattern not found in template literal");
|
|
264874
|
+
_json.type = "string";
|
|
264875
|
+
_json.pattern = pattern.source;
|
|
264876
|
+
};
|
|
264877
|
+
var fileProcessor = (schema, _ctx, json2, _params) => {
|
|
264878
|
+
const _json = json2;
|
|
264879
|
+
const file2 = {
|
|
264880
|
+
type: "string",
|
|
264881
|
+
format: "binary",
|
|
264882
|
+
contentEncoding: "binary"
|
|
264883
|
+
};
|
|
264884
|
+
const { minimum, maximum, mime } = schema._zod.bag;
|
|
264885
|
+
if (minimum !== void 0)
|
|
264886
|
+
file2.minLength = minimum;
|
|
264887
|
+
if (maximum !== void 0)
|
|
264888
|
+
file2.maxLength = maximum;
|
|
264889
|
+
if (mime) {
|
|
264890
|
+
if (mime.length === 1) {
|
|
264891
|
+
file2.contentMediaType = mime[0];
|
|
264892
|
+
Object.assign(_json, file2);
|
|
264893
|
+
} else {
|
|
264894
|
+
_json.anyOf = mime.map((m) => {
|
|
264895
|
+
const mFile = { ...file2, contentMediaType: m };
|
|
264896
|
+
return mFile;
|
|
264897
|
+
});
|
|
264898
|
+
}
|
|
264899
|
+
} else {
|
|
264900
|
+
Object.assign(_json, file2);
|
|
264901
|
+
}
|
|
264902
|
+
};
|
|
264903
|
+
var successProcessor = (_schema, _ctx, json2, _params) => {
|
|
264904
|
+
json2.type = "boolean";
|
|
264905
|
+
};
|
|
264906
|
+
var customProcessor = (_schema, ctx, _json, _params) => {
|
|
264907
|
+
if (ctx.unrepresentable === "throw") {
|
|
264908
|
+
throw new Error("Custom types cannot be represented in JSON Schema");
|
|
264909
|
+
}
|
|
264910
|
+
};
|
|
264911
|
+
var functionProcessor = (_schema, ctx, _json, _params) => {
|
|
264912
|
+
if (ctx.unrepresentable === "throw") {
|
|
264913
|
+
throw new Error("Function types cannot be represented in JSON Schema");
|
|
264914
|
+
}
|
|
264915
|
+
};
|
|
264916
|
+
var transformProcessor = (_schema, ctx, _json, _params) => {
|
|
264917
|
+
if (ctx.unrepresentable === "throw") {
|
|
264918
|
+
throw new Error("Transforms cannot be represented in JSON Schema");
|
|
264919
|
+
}
|
|
264920
|
+
};
|
|
264921
|
+
var mapProcessor = (_schema, ctx, _json, _params) => {
|
|
264922
|
+
if (ctx.unrepresentable === "throw") {
|
|
264923
|
+
throw new Error("Map cannot be represented in JSON Schema");
|
|
264924
|
+
}
|
|
264925
|
+
};
|
|
264926
|
+
var setProcessor = (_schema, ctx, _json, _params) => {
|
|
264927
|
+
if (ctx.unrepresentable === "throw") {
|
|
264928
|
+
throw new Error("Set cannot be represented in JSON Schema");
|
|
264929
|
+
}
|
|
264930
|
+
};
|
|
264931
|
+
var arrayProcessor = (schema, ctx, _json, params) => {
|
|
264932
|
+
const json2 = _json;
|
|
264933
|
+
const def = schema._zod.def;
|
|
264934
|
+
const { minimum, maximum } = schema._zod.bag;
|
|
264935
|
+
if (typeof minimum === "number")
|
|
264936
|
+
json2.minItems = minimum;
|
|
264937
|
+
if (typeof maximum === "number")
|
|
264938
|
+
json2.maxItems = maximum;
|
|
264939
|
+
json2.type = "array";
|
|
264940
|
+
json2.items = process2(def.element, ctx, { ...params, path: [...params.path, "items"] });
|
|
264941
|
+
};
|
|
264942
|
+
var objectProcessor = (schema, ctx, _json, params) => {
|
|
264943
|
+
const json2 = _json;
|
|
264944
|
+
const def = schema._zod.def;
|
|
264945
|
+
json2.type = "object";
|
|
264946
|
+
json2.properties = {};
|
|
264947
|
+
const shape2 = def.shape;
|
|
264948
|
+
for (const key in shape2) {
|
|
264949
|
+
json2.properties[key] = process2(shape2[key], ctx, {
|
|
264950
|
+
...params,
|
|
264951
|
+
path: [...params.path, "properties", key]
|
|
264952
|
+
});
|
|
264953
|
+
}
|
|
264954
|
+
const allKeys = new Set(Object.keys(shape2));
|
|
264955
|
+
const requiredKeys = new Set([...allKeys].filter((key) => {
|
|
264956
|
+
const v = def.shape[key]._zod;
|
|
264957
|
+
if (ctx.io === "input") {
|
|
264958
|
+
return v.optin === void 0;
|
|
264959
|
+
} else {
|
|
264960
|
+
return v.optout === void 0;
|
|
264961
|
+
}
|
|
264962
|
+
}));
|
|
264963
|
+
if (requiredKeys.size > 0) {
|
|
264964
|
+
json2.required = Array.from(requiredKeys);
|
|
264965
|
+
}
|
|
264966
|
+
if (def.catchall?._zod.def.type === "never") {
|
|
264967
|
+
json2.additionalProperties = false;
|
|
264968
|
+
} else if (!def.catchall) {
|
|
264969
|
+
if (ctx.io === "output")
|
|
264970
|
+
json2.additionalProperties = false;
|
|
264971
|
+
} else if (def.catchall) {
|
|
264972
|
+
json2.additionalProperties = process2(def.catchall, ctx, {
|
|
264973
|
+
...params,
|
|
264974
|
+
path: [...params.path, "additionalProperties"]
|
|
264975
|
+
});
|
|
264976
|
+
}
|
|
264977
|
+
};
|
|
264978
|
+
var unionProcessor = (schema, ctx, json2, params) => {
|
|
264979
|
+
const def = schema._zod.def;
|
|
264980
|
+
const isExclusive = def.inclusive === false;
|
|
264981
|
+
const options = def.options.map((x, i) => process2(x, ctx, {
|
|
264982
|
+
...params,
|
|
264983
|
+
path: [...params.path, isExclusive ? "oneOf" : "anyOf", i]
|
|
264984
|
+
}));
|
|
264985
|
+
if (isExclusive) {
|
|
264986
|
+
json2.oneOf = options;
|
|
264987
|
+
} else {
|
|
264988
|
+
json2.anyOf = options;
|
|
264989
|
+
}
|
|
264990
|
+
};
|
|
264991
|
+
var intersectionProcessor = (schema, ctx, json2, params) => {
|
|
264992
|
+
const def = schema._zod.def;
|
|
264993
|
+
const a = process2(def.left, ctx, {
|
|
264994
|
+
...params,
|
|
264995
|
+
path: [...params.path, "allOf", 0]
|
|
264996
|
+
});
|
|
264997
|
+
const b = process2(def.right, ctx, {
|
|
264998
|
+
...params,
|
|
264999
|
+
path: [...params.path, "allOf", 1]
|
|
265000
|
+
});
|
|
265001
|
+
const isSimpleIntersection = (val) => "allOf" in val && Object.keys(val).length === 1;
|
|
265002
|
+
const allOf = [
|
|
265003
|
+
...isSimpleIntersection(a) ? a.allOf : [a],
|
|
265004
|
+
...isSimpleIntersection(b) ? b.allOf : [b]
|
|
265005
|
+
];
|
|
265006
|
+
json2.allOf = allOf;
|
|
265007
|
+
};
|
|
265008
|
+
var tupleProcessor = (schema, ctx, _json, params) => {
|
|
265009
|
+
const json2 = _json;
|
|
265010
|
+
const def = schema._zod.def;
|
|
265011
|
+
json2.type = "array";
|
|
265012
|
+
const prefixPath = ctx.target === "draft-2020-12" ? "prefixItems" : "items";
|
|
265013
|
+
const restPath = ctx.target === "draft-2020-12" ? "items" : ctx.target === "openapi-3.0" ? "items" : "additionalItems";
|
|
265014
|
+
const prefixItems = def.items.map((x, i) => process2(x, ctx, {
|
|
265015
|
+
...params,
|
|
265016
|
+
path: [...params.path, prefixPath, i]
|
|
265017
|
+
}));
|
|
265018
|
+
const rest = def.rest ? process2(def.rest, ctx, {
|
|
265019
|
+
...params,
|
|
265020
|
+
path: [...params.path, restPath, ...ctx.target === "openapi-3.0" ? [def.items.length] : []]
|
|
265021
|
+
}) : null;
|
|
265022
|
+
if (ctx.target === "draft-2020-12") {
|
|
265023
|
+
json2.prefixItems = prefixItems;
|
|
265024
|
+
if (rest) {
|
|
265025
|
+
json2.items = rest;
|
|
265026
|
+
}
|
|
265027
|
+
} else if (ctx.target === "openapi-3.0") {
|
|
265028
|
+
json2.items = {
|
|
265029
|
+
anyOf: prefixItems
|
|
265030
|
+
};
|
|
265031
|
+
if (rest) {
|
|
265032
|
+
json2.items.anyOf.push(rest);
|
|
265033
|
+
}
|
|
265034
|
+
json2.minItems = prefixItems.length;
|
|
265035
|
+
if (!rest) {
|
|
265036
|
+
json2.maxItems = prefixItems.length;
|
|
265037
|
+
}
|
|
265038
|
+
} else {
|
|
265039
|
+
json2.items = prefixItems;
|
|
265040
|
+
if (rest) {
|
|
265041
|
+
json2.additionalItems = rest;
|
|
265042
|
+
}
|
|
265043
|
+
}
|
|
265044
|
+
const { minimum, maximum } = schema._zod.bag;
|
|
265045
|
+
if (typeof minimum === "number")
|
|
265046
|
+
json2.minItems = minimum;
|
|
265047
|
+
if (typeof maximum === "number")
|
|
265048
|
+
json2.maxItems = maximum;
|
|
265049
|
+
};
|
|
265050
|
+
var recordProcessor = (schema, ctx, _json, params) => {
|
|
265051
|
+
const json2 = _json;
|
|
265052
|
+
const def = schema._zod.def;
|
|
265053
|
+
json2.type = "object";
|
|
265054
|
+
if (ctx.target === "draft-07" || ctx.target === "draft-2020-12") {
|
|
265055
|
+
json2.propertyNames = process2(def.keyType, ctx, {
|
|
265056
|
+
...params,
|
|
265057
|
+
path: [...params.path, "propertyNames"]
|
|
265058
|
+
});
|
|
265059
|
+
}
|
|
265060
|
+
json2.additionalProperties = process2(def.valueType, ctx, {
|
|
265061
|
+
...params,
|
|
265062
|
+
path: [...params.path, "additionalProperties"]
|
|
265063
|
+
});
|
|
265064
|
+
};
|
|
265065
|
+
var nullableProcessor = (schema, ctx, json2, params) => {
|
|
265066
|
+
const def = schema._zod.def;
|
|
265067
|
+
const inner = process2(def.innerType, ctx, params);
|
|
265068
|
+
const seen = ctx.seen.get(schema);
|
|
265069
|
+
if (ctx.target === "openapi-3.0") {
|
|
265070
|
+
seen.ref = def.innerType;
|
|
265071
|
+
json2.nullable = true;
|
|
265072
|
+
} else {
|
|
265073
|
+
json2.anyOf = [inner, { type: "null" }];
|
|
265074
|
+
}
|
|
265075
|
+
};
|
|
265076
|
+
var nonoptionalProcessor = (schema, ctx, _json, params) => {
|
|
265077
|
+
const def = schema._zod.def;
|
|
265078
|
+
process2(def.innerType, ctx, params);
|
|
265079
|
+
const seen = ctx.seen.get(schema);
|
|
265080
|
+
seen.ref = def.innerType;
|
|
265081
|
+
};
|
|
265082
|
+
var defaultProcessor = (schema, ctx, json2, params) => {
|
|
265083
|
+
const def = schema._zod.def;
|
|
265084
|
+
process2(def.innerType, ctx, params);
|
|
265085
|
+
const seen = ctx.seen.get(schema);
|
|
265086
|
+
seen.ref = def.innerType;
|
|
265087
|
+
json2.default = JSON.parse(JSON.stringify(def.defaultValue));
|
|
265088
|
+
};
|
|
265089
|
+
var prefaultProcessor = (schema, ctx, json2, params) => {
|
|
265090
|
+
const def = schema._zod.def;
|
|
265091
|
+
process2(def.innerType, ctx, params);
|
|
265092
|
+
const seen = ctx.seen.get(schema);
|
|
265093
|
+
seen.ref = def.innerType;
|
|
265094
|
+
if (ctx.io === "input")
|
|
265095
|
+
json2._prefault = JSON.parse(JSON.stringify(def.defaultValue));
|
|
265096
|
+
};
|
|
265097
|
+
var catchProcessor = (schema, ctx, json2, params) => {
|
|
265098
|
+
const def = schema._zod.def;
|
|
265099
|
+
process2(def.innerType, ctx, params);
|
|
265100
|
+
const seen = ctx.seen.get(schema);
|
|
265101
|
+
seen.ref = def.innerType;
|
|
265102
|
+
let catchValue;
|
|
265103
|
+
try {
|
|
265104
|
+
catchValue = def.catchValue(void 0);
|
|
265105
|
+
} catch {
|
|
265106
|
+
throw new Error("Dynamic catch values are not supported in JSON Schema");
|
|
265107
|
+
}
|
|
265108
|
+
json2.default = catchValue;
|
|
265109
|
+
};
|
|
265110
|
+
var pipeProcessor = (schema, ctx, _json, params) => {
|
|
265111
|
+
const def = schema._zod.def;
|
|
265112
|
+
const innerType = ctx.io === "input" ? def.in._zod.def.type === "transform" ? def.out : def.in : def.out;
|
|
265113
|
+
process2(innerType, ctx, params);
|
|
265114
|
+
const seen = ctx.seen.get(schema);
|
|
265115
|
+
seen.ref = innerType;
|
|
265116
|
+
};
|
|
265117
|
+
var readonlyProcessor = (schema, ctx, json2, params) => {
|
|
265118
|
+
const def = schema._zod.def;
|
|
265119
|
+
process2(def.innerType, ctx, params);
|
|
265120
|
+
const seen = ctx.seen.get(schema);
|
|
265121
|
+
seen.ref = def.innerType;
|
|
265122
|
+
json2.readOnly = true;
|
|
265123
|
+
};
|
|
265124
|
+
var promiseProcessor = (schema, ctx, _json, params) => {
|
|
265125
|
+
const def = schema._zod.def;
|
|
265126
|
+
process2(def.innerType, ctx, params);
|
|
265127
|
+
const seen = ctx.seen.get(schema);
|
|
265128
|
+
seen.ref = def.innerType;
|
|
265129
|
+
};
|
|
265130
|
+
var optionalProcessor = (schema, ctx, _json, params) => {
|
|
265131
|
+
const def = schema._zod.def;
|
|
265132
|
+
process2(def.innerType, ctx, params);
|
|
265133
|
+
const seen = ctx.seen.get(schema);
|
|
265134
|
+
seen.ref = def.innerType;
|
|
265135
|
+
};
|
|
265136
|
+
var lazyProcessor = (schema, ctx, _json, params) => {
|
|
265137
|
+
const innerType = schema._zod.innerType;
|
|
265138
|
+
process2(innerType, ctx, params);
|
|
265139
|
+
const seen = ctx.seen.get(schema);
|
|
265140
|
+
seen.ref = innerType;
|
|
265141
|
+
};
|
|
265142
|
+
var allProcessors = {
|
|
265143
|
+
string: stringProcessor,
|
|
265144
|
+
number: numberProcessor,
|
|
265145
|
+
boolean: booleanProcessor,
|
|
265146
|
+
bigint: bigintProcessor,
|
|
265147
|
+
symbol: symbolProcessor,
|
|
265148
|
+
null: nullProcessor,
|
|
265149
|
+
undefined: undefinedProcessor,
|
|
265150
|
+
void: voidProcessor,
|
|
265151
|
+
never: neverProcessor,
|
|
265152
|
+
any: anyProcessor,
|
|
265153
|
+
unknown: unknownProcessor,
|
|
265154
|
+
date: dateProcessor,
|
|
265155
|
+
enum: enumProcessor,
|
|
265156
|
+
literal: literalProcessor,
|
|
265157
|
+
nan: nanProcessor,
|
|
265158
|
+
template_literal: templateLiteralProcessor,
|
|
265159
|
+
file: fileProcessor,
|
|
265160
|
+
success: successProcessor,
|
|
265161
|
+
custom: customProcessor,
|
|
265162
|
+
function: functionProcessor,
|
|
265163
|
+
transform: transformProcessor,
|
|
265164
|
+
map: mapProcessor,
|
|
265165
|
+
set: setProcessor,
|
|
265166
|
+
array: arrayProcessor,
|
|
265167
|
+
object: objectProcessor,
|
|
265168
|
+
union: unionProcessor,
|
|
265169
|
+
intersection: intersectionProcessor,
|
|
265170
|
+
tuple: tupleProcessor,
|
|
265171
|
+
record: recordProcessor,
|
|
265172
|
+
nullable: nullableProcessor,
|
|
265173
|
+
nonoptional: nonoptionalProcessor,
|
|
265174
|
+
default: defaultProcessor,
|
|
265175
|
+
prefault: prefaultProcessor,
|
|
265176
|
+
catch: catchProcessor,
|
|
265177
|
+
pipe: pipeProcessor,
|
|
265178
|
+
readonly: readonlyProcessor,
|
|
265179
|
+
promise: promiseProcessor,
|
|
265180
|
+
optional: optionalProcessor,
|
|
265181
|
+
lazy: lazyProcessor
|
|
265182
|
+
};
|
|
265183
|
+
function toJSONSchema(input, params) {
|
|
265184
|
+
if ("_idmap" in input) {
|
|
265185
|
+
const registry2 = input;
|
|
265186
|
+
const ctx2 = initializeContext({ ...params, processors: allProcessors });
|
|
265187
|
+
const defs = {};
|
|
265188
|
+
for (const entry of registry2._idmap.entries()) {
|
|
265189
|
+
const [_, schema] = entry;
|
|
265190
|
+
process2(schema, ctx2);
|
|
265191
|
+
}
|
|
265192
|
+
const schemas = {};
|
|
265193
|
+
const external = {
|
|
265194
|
+
registry: registry2,
|
|
265195
|
+
uri: params?.uri,
|
|
265196
|
+
defs
|
|
265197
|
+
};
|
|
265198
|
+
ctx2.external = external;
|
|
265199
|
+
for (const entry of registry2._idmap.entries()) {
|
|
265200
|
+
const [key, schema] = entry;
|
|
265201
|
+
extractDefs(ctx2, schema);
|
|
265202
|
+
schemas[key] = finalize(ctx2, schema);
|
|
265203
|
+
}
|
|
265204
|
+
if (Object.keys(defs).length > 0) {
|
|
265205
|
+
const defsSegment = ctx2.target === "draft-2020-12" ? "$defs" : "definitions";
|
|
265206
|
+
schemas.__shared = {
|
|
265207
|
+
[defsSegment]: defs
|
|
265208
|
+
};
|
|
265209
|
+
}
|
|
265210
|
+
return { schemas };
|
|
265211
|
+
}
|
|
265212
|
+
const ctx = initializeContext({ ...params, processors: allProcessors });
|
|
265213
|
+
process2(input, ctx);
|
|
265214
|
+
extractDefs(ctx, input);
|
|
265215
|
+
return finalize(ctx, input);
|
|
265216
|
+
}
|
|
265217
|
+
|
|
265218
|
+
// ../../node_modules/zod/v4/core/json-schema-generator.js
|
|
265219
|
+
var JSONSchemaGenerator = class {
|
|
265220
|
+
/** @deprecated Access via ctx instead */
|
|
265221
|
+
get metadataRegistry() {
|
|
265222
|
+
return this.ctx.metadataRegistry;
|
|
265223
|
+
}
|
|
265224
|
+
/** @deprecated Access via ctx instead */
|
|
265225
|
+
get target() {
|
|
265226
|
+
return this.ctx.target;
|
|
265227
|
+
}
|
|
265228
|
+
/** @deprecated Access via ctx instead */
|
|
265229
|
+
get unrepresentable() {
|
|
265230
|
+
return this.ctx.unrepresentable;
|
|
265231
|
+
}
|
|
265232
|
+
/** @deprecated Access via ctx instead */
|
|
265233
|
+
get override() {
|
|
265234
|
+
return this.ctx.override;
|
|
265235
|
+
}
|
|
265236
|
+
/** @deprecated Access via ctx instead */
|
|
265237
|
+
get io() {
|
|
265238
|
+
return this.ctx.io;
|
|
265239
|
+
}
|
|
265240
|
+
/** @deprecated Access via ctx instead */
|
|
265241
|
+
get counter() {
|
|
265242
|
+
return this.ctx.counter;
|
|
265243
|
+
}
|
|
265244
|
+
set counter(value) {
|
|
265245
|
+
this.ctx.counter = value;
|
|
265246
|
+
}
|
|
265247
|
+
/** @deprecated Access via ctx instead */
|
|
265248
|
+
get seen() {
|
|
265249
|
+
return this.ctx.seen;
|
|
265250
|
+
}
|
|
265251
|
+
constructor(params) {
|
|
265252
|
+
let normalizedTarget = params?.target ?? "draft-2020-12";
|
|
265253
|
+
if (normalizedTarget === "draft-4")
|
|
265254
|
+
normalizedTarget = "draft-04";
|
|
265255
|
+
if (normalizedTarget === "draft-7")
|
|
265256
|
+
normalizedTarget = "draft-07";
|
|
265257
|
+
this.ctx = initializeContext({
|
|
265258
|
+
processors: allProcessors,
|
|
265259
|
+
target: normalizedTarget,
|
|
265260
|
+
...params?.metadata && { metadata: params.metadata },
|
|
265261
|
+
...params?.unrepresentable && { unrepresentable: params.unrepresentable },
|
|
265262
|
+
...params?.override && { override: params.override },
|
|
265263
|
+
...params?.io && { io: params.io }
|
|
265264
|
+
});
|
|
265265
|
+
}
|
|
265266
|
+
/**
|
|
265267
|
+
* Process a schema to prepare it for JSON Schema generation.
|
|
265268
|
+
* This must be called before emit().
|
|
265269
|
+
*/
|
|
265270
|
+
process(schema, _params = { path: [], schemaPath: [] }) {
|
|
265271
|
+
return process2(schema, this.ctx, _params);
|
|
265272
|
+
}
|
|
265273
|
+
/**
|
|
265274
|
+
* Emit the final JSON Schema after processing.
|
|
265275
|
+
* Must call process() first.
|
|
265276
|
+
*/
|
|
265277
|
+
emit(schema, _params) {
|
|
265278
|
+
if (_params) {
|
|
265279
|
+
if (_params.cycles)
|
|
265280
|
+
this.ctx.cycles = _params.cycles;
|
|
265281
|
+
if (_params.reused)
|
|
265282
|
+
this.ctx.reused = _params.reused;
|
|
265283
|
+
if (_params.external)
|
|
265284
|
+
this.ctx.external = _params.external;
|
|
265285
|
+
}
|
|
265286
|
+
extractDefs(this.ctx, schema);
|
|
265287
|
+
const result = finalize(this.ctx, schema);
|
|
265288
|
+
const { "~standard": _, ...plainResult } = result;
|
|
265289
|
+
return plainResult;
|
|
265290
|
+
}
|
|
265291
|
+
};
|
|
264961
265292
|
|
|
264962
265293
|
// ../../node_modules/zod/v4/core/json-schema.js
|
|
264963
265294
|
var json_schema_exports = {};
|
|
@@ -265060,6 +265391,13 @@ var safeDecodeAsync2 = /* @__PURE__ */ _safeDecodeAsync(ZodRealError);
|
|
|
265060
265391
|
// ../../node_modules/zod/v4/classic/schemas.js
|
|
265061
265392
|
var ZodType = /* @__PURE__ */ $constructor("ZodType", (inst, def) => {
|
|
265062
265393
|
$ZodType.init(inst, def);
|
|
265394
|
+
Object.assign(inst["~standard"], {
|
|
265395
|
+
jsonSchema: {
|
|
265396
|
+
input: createStandardJSONSchemaMethod(inst, "input"),
|
|
265397
|
+
output: createStandardJSONSchemaMethod(inst, "output")
|
|
265398
|
+
}
|
|
265399
|
+
});
|
|
265400
|
+
inst.toJSONSchema = createToJSONSchemaMethod(inst, {});
|
|
265063
265401
|
inst.def = def;
|
|
265064
265402
|
inst.type = def.type;
|
|
265065
265403
|
Object.defineProperty(inst, "_def", { value: def });
|
|
@@ -265132,6 +265470,7 @@ var ZodType = /* @__PURE__ */ $constructor("ZodType", (inst, def) => {
|
|
|
265132
265470
|
var _ZodString = /* @__PURE__ */ $constructor("_ZodString", (inst, def) => {
|
|
265133
265471
|
$ZodString.init(inst, def);
|
|
265134
265472
|
ZodType.init(inst, def);
|
|
265473
|
+
inst._zod.processJSONSchema = (ctx, json2, params) => stringProcessor(inst, ctx, json2, params);
|
|
265135
265474
|
const bag = inst._zod.bag;
|
|
265136
265475
|
inst.format = bag.format ?? null;
|
|
265137
265476
|
inst.minLength = bag.minimum ?? null;
|
|
@@ -265370,6 +265709,7 @@ function hash3(alg, params) {
|
|
|
265370
265709
|
var ZodNumber = /* @__PURE__ */ $constructor("ZodNumber", (inst, def) => {
|
|
265371
265710
|
$ZodNumber.init(inst, def);
|
|
265372
265711
|
ZodType.init(inst, def);
|
|
265712
|
+
inst._zod.processJSONSchema = (ctx, json2, params) => numberProcessor(inst, ctx, json2, params);
|
|
265373
265713
|
inst.gt = (value, params) => inst.check(_gt(value, params));
|
|
265374
265714
|
inst.gte = (value, params) => inst.check(_gte(value, params));
|
|
265375
265715
|
inst.min = (value, params) => inst.check(_gte(value, params));
|
|
@@ -265417,6 +265757,7 @@ function uint32(params) {
|
|
|
265417
265757
|
var ZodBoolean = /* @__PURE__ */ $constructor("ZodBoolean", (inst, def) => {
|
|
265418
265758
|
$ZodBoolean.init(inst, def);
|
|
265419
265759
|
ZodType.init(inst, def);
|
|
265760
|
+
inst._zod.processJSONSchema = (ctx, json2, params) => booleanProcessor(inst, ctx, json2, params);
|
|
265420
265761
|
});
|
|
265421
265762
|
function boolean2(params) {
|
|
265422
265763
|
return _boolean(ZodBoolean, params);
|
|
@@ -265424,6 +265765,7 @@ function boolean2(params) {
|
|
|
265424
265765
|
var ZodBigInt = /* @__PURE__ */ $constructor("ZodBigInt", (inst, def) => {
|
|
265425
265766
|
$ZodBigInt.init(inst, def);
|
|
265426
265767
|
ZodType.init(inst, def);
|
|
265768
|
+
inst._zod.processJSONSchema = (ctx, json2, params) => bigintProcessor(inst, ctx, json2, params);
|
|
265427
265769
|
inst.gte = (value, params) => inst.check(_gte(value, params));
|
|
265428
265770
|
inst.min = (value, params) => inst.check(_gte(value, params));
|
|
265429
265771
|
inst.gt = (value, params) => inst.check(_gt(value, params));
|
|
@@ -265458,6 +265800,7 @@ function uint64(params) {
|
|
|
265458
265800
|
var ZodSymbol = /* @__PURE__ */ $constructor("ZodSymbol", (inst, def) => {
|
|
265459
265801
|
$ZodSymbol.init(inst, def);
|
|
265460
265802
|
ZodType.init(inst, def);
|
|
265803
|
+
inst._zod.processJSONSchema = (ctx, json2, params) => symbolProcessor(inst, ctx, json2, params);
|
|
265461
265804
|
});
|
|
265462
265805
|
function symbol(params) {
|
|
265463
265806
|
return _symbol(ZodSymbol, params);
|
|
@@ -265465,6 +265808,7 @@ function symbol(params) {
|
|
|
265465
265808
|
var ZodUndefined = /* @__PURE__ */ $constructor("ZodUndefined", (inst, def) => {
|
|
265466
265809
|
$ZodUndefined.init(inst, def);
|
|
265467
265810
|
ZodType.init(inst, def);
|
|
265811
|
+
inst._zod.processJSONSchema = (ctx, json2, params) => undefinedProcessor(inst, ctx, json2, params);
|
|
265468
265812
|
});
|
|
265469
265813
|
function _undefined3(params) {
|
|
265470
265814
|
return _undefined2(ZodUndefined, params);
|
|
@@ -265472,6 +265816,7 @@ function _undefined3(params) {
|
|
|
265472
265816
|
var ZodNull = /* @__PURE__ */ $constructor("ZodNull", (inst, def) => {
|
|
265473
265817
|
$ZodNull.init(inst, def);
|
|
265474
265818
|
ZodType.init(inst, def);
|
|
265819
|
+
inst._zod.processJSONSchema = (ctx, json2, params) => nullProcessor(inst, ctx, json2, params);
|
|
265475
265820
|
});
|
|
265476
265821
|
function _null3(params) {
|
|
265477
265822
|
return _null2(ZodNull, params);
|
|
@@ -265479,6 +265824,7 @@ function _null3(params) {
|
|
|
265479
265824
|
var ZodAny = /* @__PURE__ */ $constructor("ZodAny", (inst, def) => {
|
|
265480
265825
|
$ZodAny.init(inst, def);
|
|
265481
265826
|
ZodType.init(inst, def);
|
|
265827
|
+
inst._zod.processJSONSchema = (ctx, json2, params) => anyProcessor(inst, ctx, json2, params);
|
|
265482
265828
|
});
|
|
265483
265829
|
function any() {
|
|
265484
265830
|
return _any(ZodAny);
|
|
@@ -265486,6 +265832,7 @@ function any() {
|
|
|
265486
265832
|
var ZodUnknown = /* @__PURE__ */ $constructor("ZodUnknown", (inst, def) => {
|
|
265487
265833
|
$ZodUnknown.init(inst, def);
|
|
265488
265834
|
ZodType.init(inst, def);
|
|
265835
|
+
inst._zod.processJSONSchema = (ctx, json2, params) => unknownProcessor(inst, ctx, json2, params);
|
|
265489
265836
|
});
|
|
265490
265837
|
function unknown() {
|
|
265491
265838
|
return _unknown(ZodUnknown);
|
|
@@ -265493,6 +265840,7 @@ function unknown() {
|
|
|
265493
265840
|
var ZodNever = /* @__PURE__ */ $constructor("ZodNever", (inst, def) => {
|
|
265494
265841
|
$ZodNever.init(inst, def);
|
|
265495
265842
|
ZodType.init(inst, def);
|
|
265843
|
+
inst._zod.processJSONSchema = (ctx, json2, params) => neverProcessor(inst, ctx, json2, params);
|
|
265496
265844
|
});
|
|
265497
265845
|
function never(params) {
|
|
265498
265846
|
return _never(ZodNever, params);
|
|
@@ -265500,6 +265848,7 @@ function never(params) {
|
|
|
265500
265848
|
var ZodVoid = /* @__PURE__ */ $constructor("ZodVoid", (inst, def) => {
|
|
265501
265849
|
$ZodVoid.init(inst, def);
|
|
265502
265850
|
ZodType.init(inst, def);
|
|
265851
|
+
inst._zod.processJSONSchema = (ctx, json2, params) => voidProcessor(inst, ctx, json2, params);
|
|
265503
265852
|
});
|
|
265504
265853
|
function _void2(params) {
|
|
265505
265854
|
return _void(ZodVoid, params);
|
|
@@ -265507,6 +265856,7 @@ function _void2(params) {
|
|
|
265507
265856
|
var ZodDate = /* @__PURE__ */ $constructor("ZodDate", (inst, def) => {
|
|
265508
265857
|
$ZodDate.init(inst, def);
|
|
265509
265858
|
ZodType.init(inst, def);
|
|
265859
|
+
inst._zod.processJSONSchema = (ctx, json2, params) => dateProcessor(inst, ctx, json2, params);
|
|
265510
265860
|
inst.min = (value, params) => inst.check(_gte(value, params));
|
|
265511
265861
|
inst.max = (value, params) => inst.check(_lte(value, params));
|
|
265512
265862
|
const c = inst._zod.bag;
|
|
@@ -265519,6 +265869,7 @@ function date3(params) {
|
|
|
265519
265869
|
var ZodArray = /* @__PURE__ */ $constructor("ZodArray", (inst, def) => {
|
|
265520
265870
|
$ZodArray.init(inst, def);
|
|
265521
265871
|
ZodType.init(inst, def);
|
|
265872
|
+
inst._zod.processJSONSchema = (ctx, json2, params) => arrayProcessor(inst, ctx, json2, params);
|
|
265522
265873
|
inst.element = def.element;
|
|
265523
265874
|
inst.min = (minLength, params) => inst.check(_minLength(minLength, params));
|
|
265524
265875
|
inst.nonempty = (params) => inst.check(_minLength(1, params));
|
|
@@ -265536,6 +265887,7 @@ function keyof(schema) {
|
|
|
265536
265887
|
var ZodObject = /* @__PURE__ */ $constructor("ZodObject", (inst, def) => {
|
|
265537
265888
|
$ZodObjectJIT.init(inst, def);
|
|
265538
265889
|
ZodType.init(inst, def);
|
|
265890
|
+
inst._zod.processJSONSchema = (ctx, json2, params) => objectProcessor(inst, ctx, json2, params);
|
|
265539
265891
|
util_exports.defineLazy(inst, "shape", () => {
|
|
265540
265892
|
return def.shape;
|
|
265541
265893
|
});
|
|
@@ -265584,6 +265936,7 @@ function looseObject(shape2, params) {
|
|
|
265584
265936
|
var ZodUnion = /* @__PURE__ */ $constructor("ZodUnion", (inst, def) => {
|
|
265585
265937
|
$ZodUnion.init(inst, def);
|
|
265586
265938
|
ZodType.init(inst, def);
|
|
265939
|
+
inst._zod.processJSONSchema = (ctx, json2, params) => unionProcessor(inst, ctx, json2, params);
|
|
265587
265940
|
inst.options = def.options;
|
|
265588
265941
|
});
|
|
265589
265942
|
function union(options, params) {
|
|
@@ -265593,6 +265946,20 @@ function union(options, params) {
|
|
|
265593
265946
|
...util_exports.normalizeParams(params)
|
|
265594
265947
|
});
|
|
265595
265948
|
}
|
|
265949
|
+
var ZodXor = /* @__PURE__ */ $constructor("ZodXor", (inst, def) => {
|
|
265950
|
+
ZodUnion.init(inst, def);
|
|
265951
|
+
$ZodXor.init(inst, def);
|
|
265952
|
+
inst._zod.processJSONSchema = (ctx, json2, params) => unionProcessor(inst, ctx, json2, params);
|
|
265953
|
+
inst.options = def.options;
|
|
265954
|
+
});
|
|
265955
|
+
function xor(options, params) {
|
|
265956
|
+
return new ZodXor({
|
|
265957
|
+
type: "union",
|
|
265958
|
+
options,
|
|
265959
|
+
inclusive: false,
|
|
265960
|
+
...util_exports.normalizeParams(params)
|
|
265961
|
+
});
|
|
265962
|
+
}
|
|
265596
265963
|
var ZodDiscriminatedUnion = /* @__PURE__ */ $constructor("ZodDiscriminatedUnion", (inst, def) => {
|
|
265597
265964
|
ZodUnion.init(inst, def);
|
|
265598
265965
|
$ZodDiscriminatedUnion.init(inst, def);
|
|
@@ -265608,6 +265975,7 @@ function discriminatedUnion(discriminator, options, params) {
|
|
|
265608
265975
|
var ZodIntersection = /* @__PURE__ */ $constructor("ZodIntersection", (inst, def) => {
|
|
265609
265976
|
$ZodIntersection.init(inst, def);
|
|
265610
265977
|
ZodType.init(inst, def);
|
|
265978
|
+
inst._zod.processJSONSchema = (ctx, json2, params) => intersectionProcessor(inst, ctx, json2, params);
|
|
265611
265979
|
});
|
|
265612
265980
|
function intersection(left, right) {
|
|
265613
265981
|
return new ZodIntersection({
|
|
@@ -265619,6 +265987,7 @@ function intersection(left, right) {
|
|
|
265619
265987
|
var ZodTuple = /* @__PURE__ */ $constructor("ZodTuple", (inst, def) => {
|
|
265620
265988
|
$ZodTuple.init(inst, def);
|
|
265621
265989
|
ZodType.init(inst, def);
|
|
265990
|
+
inst._zod.processJSONSchema = (ctx, json2, params) => tupleProcessor(inst, ctx, json2, params);
|
|
265622
265991
|
inst.rest = (rest) => inst.clone({
|
|
265623
265992
|
...inst._zod.def,
|
|
265624
265993
|
rest
|
|
@@ -265638,6 +266007,7 @@ function tuple(items, _paramsOrRest, _params) {
|
|
|
265638
266007
|
var ZodRecord = /* @__PURE__ */ $constructor("ZodRecord", (inst, def) => {
|
|
265639
266008
|
$ZodRecord.init(inst, def);
|
|
265640
266009
|
ZodType.init(inst, def);
|
|
266010
|
+
inst._zod.processJSONSchema = (ctx, json2, params) => recordProcessor(inst, ctx, json2, params);
|
|
265641
266011
|
inst.keyType = def.keyType;
|
|
265642
266012
|
inst.valueType = def.valueType;
|
|
265643
266013
|
});
|
|
@@ -265659,9 +266029,19 @@ function partialRecord(keyType, valueType, params) {
|
|
|
265659
266029
|
...util_exports.normalizeParams(params)
|
|
265660
266030
|
});
|
|
265661
266031
|
}
|
|
266032
|
+
function looseRecord(keyType, valueType, params) {
|
|
266033
|
+
return new ZodRecord({
|
|
266034
|
+
type: "record",
|
|
266035
|
+
keyType,
|
|
266036
|
+
valueType,
|
|
266037
|
+
mode: "loose",
|
|
266038
|
+
...util_exports.normalizeParams(params)
|
|
266039
|
+
});
|
|
266040
|
+
}
|
|
265662
266041
|
var ZodMap = /* @__PURE__ */ $constructor("ZodMap", (inst, def) => {
|
|
265663
266042
|
$ZodMap.init(inst, def);
|
|
265664
266043
|
ZodType.init(inst, def);
|
|
266044
|
+
inst._zod.processJSONSchema = (ctx, json2, params) => mapProcessor(inst, ctx, json2, params);
|
|
265665
266045
|
inst.keyType = def.keyType;
|
|
265666
266046
|
inst.valueType = def.valueType;
|
|
265667
266047
|
});
|
|
@@ -265676,6 +266056,7 @@ function map(keyType, valueType, params) {
|
|
|
265676
266056
|
var ZodSet = /* @__PURE__ */ $constructor("ZodSet", (inst, def) => {
|
|
265677
266057
|
$ZodSet.init(inst, def);
|
|
265678
266058
|
ZodType.init(inst, def);
|
|
266059
|
+
inst._zod.processJSONSchema = (ctx, json2, params) => setProcessor(inst, ctx, json2, params);
|
|
265679
266060
|
inst.min = (...args) => inst.check(_minSize(...args));
|
|
265680
266061
|
inst.nonempty = (params) => inst.check(_minSize(1, params));
|
|
265681
266062
|
inst.max = (...args) => inst.check(_maxSize(...args));
|
|
@@ -265691,6 +266072,7 @@ function set(valueType, params) {
|
|
|
265691
266072
|
var ZodEnum = /* @__PURE__ */ $constructor("ZodEnum", (inst, def) => {
|
|
265692
266073
|
$ZodEnum.init(inst, def);
|
|
265693
266074
|
ZodType.init(inst, def);
|
|
266075
|
+
inst._zod.processJSONSchema = (ctx, json2, params) => enumProcessor(inst, ctx, json2, params);
|
|
265694
266076
|
inst.enum = def.entries;
|
|
265695
266077
|
inst.options = Object.values(def.entries);
|
|
265696
266078
|
const keys2 = new Set(Object.keys(def.entries));
|
|
@@ -265743,6 +266125,7 @@ function nativeEnum(entries, params) {
|
|
|
265743
266125
|
var ZodLiteral = /* @__PURE__ */ $constructor("ZodLiteral", (inst, def) => {
|
|
265744
266126
|
$ZodLiteral.init(inst, def);
|
|
265745
266127
|
ZodType.init(inst, def);
|
|
266128
|
+
inst._zod.processJSONSchema = (ctx, json2, params) => literalProcessor(inst, ctx, json2, params);
|
|
265746
266129
|
inst.values = new Set(def.values);
|
|
265747
266130
|
Object.defineProperty(inst, "value", {
|
|
265748
266131
|
get() {
|
|
@@ -265763,6 +266146,7 @@ function literal(value, params) {
|
|
|
265763
266146
|
var ZodFile = /* @__PURE__ */ $constructor("ZodFile", (inst, def) => {
|
|
265764
266147
|
$ZodFile.init(inst, def);
|
|
265765
266148
|
ZodType.init(inst, def);
|
|
266149
|
+
inst._zod.processJSONSchema = (ctx, json2, params) => fileProcessor(inst, ctx, json2, params);
|
|
265766
266150
|
inst.min = (size5, params) => inst.check(_minSize(size5, params));
|
|
265767
266151
|
inst.max = (size5, params) => inst.check(_maxSize(size5, params));
|
|
265768
266152
|
inst.mime = (types, params) => inst.check(_mime(Array.isArray(types) ? types : [types], params));
|
|
@@ -265773,6 +266157,7 @@ function file(params) {
|
|
|
265773
266157
|
var ZodTransform = /* @__PURE__ */ $constructor("ZodTransform", (inst, def) => {
|
|
265774
266158
|
$ZodTransform.init(inst, def);
|
|
265775
266159
|
ZodType.init(inst, def);
|
|
266160
|
+
inst._zod.processJSONSchema = (ctx, json2, params) => transformProcessor(inst, ctx, json2, params);
|
|
265776
266161
|
inst._zod.parse = (payload, _ctx) => {
|
|
265777
266162
|
if (_ctx.direction === "backward") {
|
|
265778
266163
|
throw new $ZodEncodeError(inst.constructor.name);
|
|
@@ -265810,6 +266195,7 @@ function transform(fn) {
|
|
|
265810
266195
|
var ZodOptional = /* @__PURE__ */ $constructor("ZodOptional", (inst, def) => {
|
|
265811
266196
|
$ZodOptional.init(inst, def);
|
|
265812
266197
|
ZodType.init(inst, def);
|
|
266198
|
+
inst._zod.processJSONSchema = (ctx, json2, params) => optionalProcessor(inst, ctx, json2, params);
|
|
265813
266199
|
inst.unwrap = () => inst._zod.def.innerType;
|
|
265814
266200
|
});
|
|
265815
266201
|
function optional(innerType) {
|
|
@@ -265821,6 +266207,7 @@ function optional(innerType) {
|
|
|
265821
266207
|
var ZodNullable = /* @__PURE__ */ $constructor("ZodNullable", (inst, def) => {
|
|
265822
266208
|
$ZodNullable.init(inst, def);
|
|
265823
266209
|
ZodType.init(inst, def);
|
|
266210
|
+
inst._zod.processJSONSchema = (ctx, json2, params) => nullableProcessor(inst, ctx, json2, params);
|
|
265824
266211
|
inst.unwrap = () => inst._zod.def.innerType;
|
|
265825
266212
|
});
|
|
265826
266213
|
function nullable(innerType) {
|
|
@@ -265835,6 +266222,7 @@ function nullish2(innerType) {
|
|
|
265835
266222
|
var ZodDefault = /* @__PURE__ */ $constructor("ZodDefault", (inst, def) => {
|
|
265836
266223
|
$ZodDefault.init(inst, def);
|
|
265837
266224
|
ZodType.init(inst, def);
|
|
266225
|
+
inst._zod.processJSONSchema = (ctx, json2, params) => defaultProcessor(inst, ctx, json2, params);
|
|
265838
266226
|
inst.unwrap = () => inst._zod.def.innerType;
|
|
265839
266227
|
inst.removeDefault = inst.unwrap;
|
|
265840
266228
|
});
|
|
@@ -265850,6 +266238,7 @@ function _default2(innerType, defaultValue) {
|
|
|
265850
266238
|
var ZodPrefault = /* @__PURE__ */ $constructor("ZodPrefault", (inst, def) => {
|
|
265851
266239
|
$ZodPrefault.init(inst, def);
|
|
265852
266240
|
ZodType.init(inst, def);
|
|
266241
|
+
inst._zod.processJSONSchema = (ctx, json2, params) => prefaultProcessor(inst, ctx, json2, params);
|
|
265853
266242
|
inst.unwrap = () => inst._zod.def.innerType;
|
|
265854
266243
|
});
|
|
265855
266244
|
function prefault(innerType, defaultValue) {
|
|
@@ -265864,6 +266253,7 @@ function prefault(innerType, defaultValue) {
|
|
|
265864
266253
|
var ZodNonOptional = /* @__PURE__ */ $constructor("ZodNonOptional", (inst, def) => {
|
|
265865
266254
|
$ZodNonOptional.init(inst, def);
|
|
265866
266255
|
ZodType.init(inst, def);
|
|
266256
|
+
inst._zod.processJSONSchema = (ctx, json2, params) => nonoptionalProcessor(inst, ctx, json2, params);
|
|
265867
266257
|
inst.unwrap = () => inst._zod.def.innerType;
|
|
265868
266258
|
});
|
|
265869
266259
|
function nonoptional(innerType, params) {
|
|
@@ -265876,6 +266266,7 @@ function nonoptional(innerType, params) {
|
|
|
265876
266266
|
var ZodSuccess = /* @__PURE__ */ $constructor("ZodSuccess", (inst, def) => {
|
|
265877
266267
|
$ZodSuccess.init(inst, def);
|
|
265878
266268
|
ZodType.init(inst, def);
|
|
266269
|
+
inst._zod.processJSONSchema = (ctx, json2, params) => successProcessor(inst, ctx, json2, params);
|
|
265879
266270
|
inst.unwrap = () => inst._zod.def.innerType;
|
|
265880
266271
|
});
|
|
265881
266272
|
function success(innerType) {
|
|
@@ -265887,6 +266278,7 @@ function success(innerType) {
|
|
|
265887
266278
|
var ZodCatch = /* @__PURE__ */ $constructor("ZodCatch", (inst, def) => {
|
|
265888
266279
|
$ZodCatch.init(inst, def);
|
|
265889
266280
|
ZodType.init(inst, def);
|
|
266281
|
+
inst._zod.processJSONSchema = (ctx, json2, params) => catchProcessor(inst, ctx, json2, params);
|
|
265890
266282
|
inst.unwrap = () => inst._zod.def.innerType;
|
|
265891
266283
|
inst.removeCatch = inst.unwrap;
|
|
265892
266284
|
});
|
|
@@ -265900,6 +266292,7 @@ function _catch2(innerType, catchValue) {
|
|
|
265900
266292
|
var ZodNaN = /* @__PURE__ */ $constructor("ZodNaN", (inst, def) => {
|
|
265901
266293
|
$ZodNaN.init(inst, def);
|
|
265902
266294
|
ZodType.init(inst, def);
|
|
266295
|
+
inst._zod.processJSONSchema = (ctx, json2, params) => nanProcessor(inst, ctx, json2, params);
|
|
265903
266296
|
});
|
|
265904
266297
|
function nan(params) {
|
|
265905
266298
|
return _nan(ZodNaN, params);
|
|
@@ -265907,6 +266300,7 @@ function nan(params) {
|
|
|
265907
266300
|
var ZodPipe = /* @__PURE__ */ $constructor("ZodPipe", (inst, def) => {
|
|
265908
266301
|
$ZodPipe.init(inst, def);
|
|
265909
266302
|
ZodType.init(inst, def);
|
|
266303
|
+
inst._zod.processJSONSchema = (ctx, json2, params) => pipeProcessor(inst, ctx, json2, params);
|
|
265910
266304
|
inst.in = def.in;
|
|
265911
266305
|
inst.out = def.out;
|
|
265912
266306
|
});
|
|
@@ -265934,6 +266328,7 @@ function codec(in_, out, params) {
|
|
|
265934
266328
|
var ZodReadonly = /* @__PURE__ */ $constructor("ZodReadonly", (inst, def) => {
|
|
265935
266329
|
$ZodReadonly.init(inst, def);
|
|
265936
266330
|
ZodType.init(inst, def);
|
|
266331
|
+
inst._zod.processJSONSchema = (ctx, json2, params) => readonlyProcessor(inst, ctx, json2, params);
|
|
265937
266332
|
inst.unwrap = () => inst._zod.def.innerType;
|
|
265938
266333
|
});
|
|
265939
266334
|
function readonly(innerType) {
|
|
@@ -265945,6 +266340,7 @@ function readonly(innerType) {
|
|
|
265945
266340
|
var ZodTemplateLiteral = /* @__PURE__ */ $constructor("ZodTemplateLiteral", (inst, def) => {
|
|
265946
266341
|
$ZodTemplateLiteral.init(inst, def);
|
|
265947
266342
|
ZodType.init(inst, def);
|
|
266343
|
+
inst._zod.processJSONSchema = (ctx, json2, params) => templateLiteralProcessor(inst, ctx, json2, params);
|
|
265948
266344
|
});
|
|
265949
266345
|
function templateLiteral(parts, params) {
|
|
265950
266346
|
return new ZodTemplateLiteral({
|
|
@@ -265956,6 +266352,7 @@ function templateLiteral(parts, params) {
|
|
|
265956
266352
|
var ZodLazy = /* @__PURE__ */ $constructor("ZodLazy", (inst, def) => {
|
|
265957
266353
|
$ZodLazy.init(inst, def);
|
|
265958
266354
|
ZodType.init(inst, def);
|
|
266355
|
+
inst._zod.processJSONSchema = (ctx, json2, params) => lazyProcessor(inst, ctx, json2, params);
|
|
265959
266356
|
inst.unwrap = () => inst._zod.def.getter();
|
|
265960
266357
|
});
|
|
265961
266358
|
function lazy(getter) {
|
|
@@ -265967,6 +266364,7 @@ function lazy(getter) {
|
|
|
265967
266364
|
var ZodPromise = /* @__PURE__ */ $constructor("ZodPromise", (inst, def) => {
|
|
265968
266365
|
$ZodPromise.init(inst, def);
|
|
265969
266366
|
ZodType.init(inst, def);
|
|
266367
|
+
inst._zod.processJSONSchema = (ctx, json2, params) => promiseProcessor(inst, ctx, json2, params);
|
|
265970
266368
|
inst.unwrap = () => inst._zod.def.innerType;
|
|
265971
266369
|
});
|
|
265972
266370
|
function promise(innerType) {
|
|
@@ -265978,6 +266376,7 @@ function promise(innerType) {
|
|
|
265978
266376
|
var ZodFunction = /* @__PURE__ */ $constructor("ZodFunction", (inst, def) => {
|
|
265979
266377
|
$ZodFunction.init(inst, def);
|
|
265980
266378
|
ZodType.init(inst, def);
|
|
266379
|
+
inst._zod.processJSONSchema = (ctx, json2, params) => functionProcessor(inst, ctx, json2, params);
|
|
265981
266380
|
});
|
|
265982
266381
|
function _function(params) {
|
|
265983
266382
|
return new ZodFunction({
|
|
@@ -265989,6 +266388,7 @@ function _function(params) {
|
|
|
265989
266388
|
var ZodCustom = /* @__PURE__ */ $constructor("ZodCustom", (inst, def) => {
|
|
265990
266389
|
$ZodCustom.init(inst, def);
|
|
265991
266390
|
ZodType.init(inst, def);
|
|
266391
|
+
inst._zod.processJSONSchema = (ctx, json2, params) => customProcessor(inst, ctx, json2, params);
|
|
265992
266392
|
});
|
|
265993
266393
|
function check(fn) {
|
|
265994
266394
|
const ch = new $ZodCheck({
|
|
@@ -266063,6 +266463,382 @@ var ZodFirstPartyTypeKind;
|
|
|
266063
266463
|
/* @__PURE__ */ (function(ZodFirstPartyTypeKind2) {
|
|
266064
266464
|
})(ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {}));
|
|
266065
266465
|
|
|
266466
|
+
// ../../node_modules/zod/v4/classic/from-json-schema.js
|
|
266467
|
+
function detectVersion(schema, defaultTarget) {
|
|
266468
|
+
const $schema = schema.$schema;
|
|
266469
|
+
if ($schema === "https://json-schema.org/draft/2020-12/schema") {
|
|
266470
|
+
return "draft-2020-12";
|
|
266471
|
+
}
|
|
266472
|
+
if ($schema === "http://json-schema.org/draft-07/schema#") {
|
|
266473
|
+
return "draft-7";
|
|
266474
|
+
}
|
|
266475
|
+
if ($schema === "http://json-schema.org/draft-04/schema#") {
|
|
266476
|
+
return "draft-4";
|
|
266477
|
+
}
|
|
266478
|
+
return defaultTarget ?? "draft-2020-12";
|
|
266479
|
+
}
|
|
266480
|
+
function resolveRef(ref, ctx) {
|
|
266481
|
+
if (!ref.startsWith("#")) {
|
|
266482
|
+
throw new Error("External $ref is not supported, only local refs (#/...) are allowed");
|
|
266483
|
+
}
|
|
266484
|
+
const path9 = ref.slice(1).split("/").filter(Boolean);
|
|
266485
|
+
if (path9.length === 0) {
|
|
266486
|
+
return ctx.rootSchema;
|
|
266487
|
+
}
|
|
266488
|
+
const defsKey = ctx.version === "draft-2020-12" ? "$defs" : "definitions";
|
|
266489
|
+
if (path9[0] === defsKey) {
|
|
266490
|
+
const key = path9[1];
|
|
266491
|
+
if (!key || !ctx.defs[key]) {
|
|
266492
|
+
throw new Error(`Reference not found: ${ref}`);
|
|
266493
|
+
}
|
|
266494
|
+
return ctx.defs[key];
|
|
266495
|
+
}
|
|
266496
|
+
throw new Error(`Reference not found: ${ref}`);
|
|
266497
|
+
}
|
|
266498
|
+
function convertBaseSchema(schema, ctx) {
|
|
266499
|
+
if (schema.not !== void 0) {
|
|
266500
|
+
if (typeof schema.not === "object" && Object.keys(schema.not).length === 0) {
|
|
266501
|
+
return never();
|
|
266502
|
+
}
|
|
266503
|
+
throw new Error("not is not supported in Zod (except { not: {} } for never)");
|
|
266504
|
+
}
|
|
266505
|
+
if (schema.unevaluatedItems !== void 0) {
|
|
266506
|
+
throw new Error("unevaluatedItems is not supported");
|
|
266507
|
+
}
|
|
266508
|
+
if (schema.unevaluatedProperties !== void 0) {
|
|
266509
|
+
throw new Error("unevaluatedProperties is not supported");
|
|
266510
|
+
}
|
|
266511
|
+
if (schema.if !== void 0 || schema.then !== void 0 || schema.else !== void 0) {
|
|
266512
|
+
throw new Error("Conditional schemas (if/then/else) are not supported");
|
|
266513
|
+
}
|
|
266514
|
+
if (schema.dependentSchemas !== void 0 || schema.dependentRequired !== void 0) {
|
|
266515
|
+
throw new Error("dependentSchemas and dependentRequired are not supported");
|
|
266516
|
+
}
|
|
266517
|
+
if (schema.$ref) {
|
|
266518
|
+
const refPath = schema.$ref;
|
|
266519
|
+
if (ctx.refs.has(refPath)) {
|
|
266520
|
+
return ctx.refs.get(refPath);
|
|
266521
|
+
}
|
|
266522
|
+
if (ctx.processing.has(refPath)) {
|
|
266523
|
+
return lazy(() => {
|
|
266524
|
+
if (!ctx.refs.has(refPath)) {
|
|
266525
|
+
throw new Error(`Circular reference not resolved: ${refPath}`);
|
|
266526
|
+
}
|
|
266527
|
+
return ctx.refs.get(refPath);
|
|
266528
|
+
});
|
|
266529
|
+
}
|
|
266530
|
+
ctx.processing.add(refPath);
|
|
266531
|
+
const resolved = resolveRef(refPath, ctx);
|
|
266532
|
+
const zodSchema2 = convertSchema(resolved, ctx);
|
|
266533
|
+
ctx.refs.set(refPath, zodSchema2);
|
|
266534
|
+
ctx.processing.delete(refPath);
|
|
266535
|
+
return zodSchema2;
|
|
266536
|
+
}
|
|
266537
|
+
if (schema.enum !== void 0) {
|
|
266538
|
+
const enumValues = schema.enum;
|
|
266539
|
+
if (ctx.version === "openapi-3.0" && schema.nullable === true && enumValues.length === 1 && enumValues[0] === null) {
|
|
266540
|
+
return _null3();
|
|
266541
|
+
}
|
|
266542
|
+
if (enumValues.length === 0) {
|
|
266543
|
+
return never();
|
|
266544
|
+
}
|
|
266545
|
+
if (enumValues.length === 1) {
|
|
266546
|
+
return literal(enumValues[0]);
|
|
266547
|
+
}
|
|
266548
|
+
if (enumValues.every((v) => typeof v === "string")) {
|
|
266549
|
+
return _enum2(enumValues);
|
|
266550
|
+
}
|
|
266551
|
+
const literalSchemas = enumValues.map((v) => literal(v));
|
|
266552
|
+
if (literalSchemas.length < 2) {
|
|
266553
|
+
return literalSchemas[0];
|
|
266554
|
+
}
|
|
266555
|
+
return union([literalSchemas[0], literalSchemas[1], ...literalSchemas.slice(2)]);
|
|
266556
|
+
}
|
|
266557
|
+
if (schema.const !== void 0) {
|
|
266558
|
+
return literal(schema.const);
|
|
266559
|
+
}
|
|
266560
|
+
const type = schema.type;
|
|
266561
|
+
if (Array.isArray(type)) {
|
|
266562
|
+
const typeSchemas = type.map((t) => {
|
|
266563
|
+
const typeSchema = { ...schema, type: t };
|
|
266564
|
+
return convertBaseSchema(typeSchema, ctx);
|
|
266565
|
+
});
|
|
266566
|
+
if (typeSchemas.length === 0) {
|
|
266567
|
+
return never();
|
|
266568
|
+
}
|
|
266569
|
+
if (typeSchemas.length === 1) {
|
|
266570
|
+
return typeSchemas[0];
|
|
266571
|
+
}
|
|
266572
|
+
return union(typeSchemas);
|
|
266573
|
+
}
|
|
266574
|
+
if (!type) {
|
|
266575
|
+
return any();
|
|
266576
|
+
}
|
|
266577
|
+
let zodSchema;
|
|
266578
|
+
switch (type) {
|
|
266579
|
+
case "string": {
|
|
266580
|
+
let stringSchema = string2();
|
|
266581
|
+
if (schema.format) {
|
|
266582
|
+
const format = schema.format;
|
|
266583
|
+
if (format === "email") {
|
|
266584
|
+
stringSchema = stringSchema.check(email2());
|
|
266585
|
+
} else if (format === "uri" || format === "uri-reference") {
|
|
266586
|
+
stringSchema = stringSchema.check(url());
|
|
266587
|
+
} else if (format === "uuid" || format === "guid") {
|
|
266588
|
+
stringSchema = stringSchema.check(uuid2());
|
|
266589
|
+
} else if (format === "date-time") {
|
|
266590
|
+
stringSchema = stringSchema.check(iso_exports.datetime());
|
|
266591
|
+
} else if (format === "date") {
|
|
266592
|
+
stringSchema = stringSchema.check(iso_exports.date());
|
|
266593
|
+
} else if (format === "time") {
|
|
266594
|
+
stringSchema = stringSchema.check(iso_exports.time());
|
|
266595
|
+
} else if (format === "duration") {
|
|
266596
|
+
stringSchema = stringSchema.check(iso_exports.duration());
|
|
266597
|
+
} else if (format === "ipv4") {
|
|
266598
|
+
stringSchema = stringSchema.check(ipv42());
|
|
266599
|
+
} else if (format === "ipv6") {
|
|
266600
|
+
stringSchema = stringSchema.check(ipv62());
|
|
266601
|
+
} else if (format === "mac") {
|
|
266602
|
+
stringSchema = stringSchema.check(mac2());
|
|
266603
|
+
} else if (format === "cidr") {
|
|
266604
|
+
stringSchema = stringSchema.check(cidrv42());
|
|
266605
|
+
} else if (format === "cidr-v6") {
|
|
266606
|
+
stringSchema = stringSchema.check(cidrv62());
|
|
266607
|
+
} else if (format === "base64") {
|
|
266608
|
+
stringSchema = stringSchema.check(base642());
|
|
266609
|
+
} else if (format === "base64url") {
|
|
266610
|
+
stringSchema = stringSchema.check(base64url2());
|
|
266611
|
+
} else if (format === "e164") {
|
|
266612
|
+
stringSchema = stringSchema.check(e1642());
|
|
266613
|
+
} else if (format === "jwt") {
|
|
266614
|
+
stringSchema = stringSchema.check(jwt());
|
|
266615
|
+
} else if (format === "emoji") {
|
|
266616
|
+
stringSchema = stringSchema.check(emoji2());
|
|
266617
|
+
} else if (format === "nanoid") {
|
|
266618
|
+
stringSchema = stringSchema.check(nanoid2());
|
|
266619
|
+
} else if (format === "cuid") {
|
|
266620
|
+
stringSchema = stringSchema.check(cuid3());
|
|
266621
|
+
} else if (format === "cuid2") {
|
|
266622
|
+
stringSchema = stringSchema.check(cuid22());
|
|
266623
|
+
} else if (format === "ulid") {
|
|
266624
|
+
stringSchema = stringSchema.check(ulid2());
|
|
266625
|
+
} else if (format === "xid") {
|
|
266626
|
+
stringSchema = stringSchema.check(xid2());
|
|
266627
|
+
} else if (format === "ksuid") {
|
|
266628
|
+
stringSchema = stringSchema.check(ksuid2());
|
|
266629
|
+
}
|
|
266630
|
+
}
|
|
266631
|
+
if (typeof schema.minLength === "number") {
|
|
266632
|
+
stringSchema = stringSchema.min(schema.minLength);
|
|
266633
|
+
}
|
|
266634
|
+
if (typeof schema.maxLength === "number") {
|
|
266635
|
+
stringSchema = stringSchema.max(schema.maxLength);
|
|
266636
|
+
}
|
|
266637
|
+
if (schema.pattern) {
|
|
266638
|
+
stringSchema = stringSchema.regex(new RegExp(schema.pattern));
|
|
266639
|
+
}
|
|
266640
|
+
zodSchema = stringSchema;
|
|
266641
|
+
break;
|
|
266642
|
+
}
|
|
266643
|
+
case "number":
|
|
266644
|
+
case "integer": {
|
|
266645
|
+
let numberSchema = type === "integer" ? number2().int() : number2();
|
|
266646
|
+
if (typeof schema.minimum === "number") {
|
|
266647
|
+
numberSchema = numberSchema.min(schema.minimum);
|
|
266648
|
+
}
|
|
266649
|
+
if (typeof schema.maximum === "number") {
|
|
266650
|
+
numberSchema = numberSchema.max(schema.maximum);
|
|
266651
|
+
}
|
|
266652
|
+
if (typeof schema.exclusiveMinimum === "number") {
|
|
266653
|
+
numberSchema = numberSchema.gt(schema.exclusiveMinimum);
|
|
266654
|
+
} else if (schema.exclusiveMinimum === true && typeof schema.minimum === "number") {
|
|
266655
|
+
numberSchema = numberSchema.gt(schema.minimum);
|
|
266656
|
+
}
|
|
266657
|
+
if (typeof schema.exclusiveMaximum === "number") {
|
|
266658
|
+
numberSchema = numberSchema.lt(schema.exclusiveMaximum);
|
|
266659
|
+
} else if (schema.exclusiveMaximum === true && typeof schema.maximum === "number") {
|
|
266660
|
+
numberSchema = numberSchema.lt(schema.maximum);
|
|
266661
|
+
}
|
|
266662
|
+
if (typeof schema.multipleOf === "number") {
|
|
266663
|
+
numberSchema = numberSchema.multipleOf(schema.multipleOf);
|
|
266664
|
+
}
|
|
266665
|
+
zodSchema = numberSchema;
|
|
266666
|
+
break;
|
|
266667
|
+
}
|
|
266668
|
+
case "boolean": {
|
|
266669
|
+
zodSchema = boolean2();
|
|
266670
|
+
break;
|
|
266671
|
+
}
|
|
266672
|
+
case "null": {
|
|
266673
|
+
zodSchema = _null3();
|
|
266674
|
+
break;
|
|
266675
|
+
}
|
|
266676
|
+
case "object": {
|
|
266677
|
+
const shape2 = {};
|
|
266678
|
+
const properties = schema.properties || {};
|
|
266679
|
+
const requiredSet = new Set(schema.required || []);
|
|
266680
|
+
for (const [key, propSchema] of Object.entries(properties)) {
|
|
266681
|
+
const propZodSchema = convertSchema(propSchema, ctx);
|
|
266682
|
+
shape2[key] = requiredSet.has(key) ? propZodSchema : propZodSchema.optional();
|
|
266683
|
+
}
|
|
266684
|
+
if (schema.propertyNames) {
|
|
266685
|
+
const keySchema = convertSchema(schema.propertyNames, ctx);
|
|
266686
|
+
const valueSchema = schema.additionalProperties && typeof schema.additionalProperties === "object" ? convertSchema(schema.additionalProperties, ctx) : any();
|
|
266687
|
+
if (Object.keys(shape2).length === 0) {
|
|
266688
|
+
zodSchema = record(keySchema, valueSchema);
|
|
266689
|
+
break;
|
|
266690
|
+
}
|
|
266691
|
+
const objectSchema2 = object(shape2).passthrough();
|
|
266692
|
+
const recordSchema = looseRecord(keySchema, valueSchema);
|
|
266693
|
+
zodSchema = intersection(objectSchema2, recordSchema);
|
|
266694
|
+
break;
|
|
266695
|
+
}
|
|
266696
|
+
if (schema.patternProperties) {
|
|
266697
|
+
const patternProps = schema.patternProperties;
|
|
266698
|
+
const patternKeys = Object.keys(patternProps);
|
|
266699
|
+
const looseRecords = [];
|
|
266700
|
+
for (const pattern of patternKeys) {
|
|
266701
|
+
const patternValue = convertSchema(patternProps[pattern], ctx);
|
|
266702
|
+
const keySchema = string2().regex(new RegExp(pattern));
|
|
266703
|
+
looseRecords.push(looseRecord(keySchema, patternValue));
|
|
266704
|
+
}
|
|
266705
|
+
const schemasToIntersect = [];
|
|
266706
|
+
if (Object.keys(shape2).length > 0) {
|
|
266707
|
+
schemasToIntersect.push(object(shape2).passthrough());
|
|
266708
|
+
}
|
|
266709
|
+
schemasToIntersect.push(...looseRecords);
|
|
266710
|
+
if (schemasToIntersect.length === 0) {
|
|
266711
|
+
zodSchema = object({}).passthrough();
|
|
266712
|
+
} else if (schemasToIntersect.length === 1) {
|
|
266713
|
+
zodSchema = schemasToIntersect[0];
|
|
266714
|
+
} else {
|
|
266715
|
+
let result = intersection(schemasToIntersect[0], schemasToIntersect[1]);
|
|
266716
|
+
for (let i = 2; i < schemasToIntersect.length; i++) {
|
|
266717
|
+
result = intersection(result, schemasToIntersect[i]);
|
|
266718
|
+
}
|
|
266719
|
+
zodSchema = result;
|
|
266720
|
+
}
|
|
266721
|
+
break;
|
|
266722
|
+
}
|
|
266723
|
+
const objectSchema = object(shape2);
|
|
266724
|
+
if (schema.additionalProperties === false) {
|
|
266725
|
+
zodSchema = objectSchema.strict();
|
|
266726
|
+
} else if (typeof schema.additionalProperties === "object") {
|
|
266727
|
+
zodSchema = objectSchema.catchall(convertSchema(schema.additionalProperties, ctx));
|
|
266728
|
+
} else {
|
|
266729
|
+
zodSchema = objectSchema.passthrough();
|
|
266730
|
+
}
|
|
266731
|
+
break;
|
|
266732
|
+
}
|
|
266733
|
+
case "array": {
|
|
266734
|
+
const prefixItems = schema.prefixItems;
|
|
266735
|
+
const items = schema.items;
|
|
266736
|
+
if (prefixItems && Array.isArray(prefixItems)) {
|
|
266737
|
+
const tupleItems = prefixItems.map((item) => convertSchema(item, ctx));
|
|
266738
|
+
const rest = items && typeof items === "object" && !Array.isArray(items) ? convertSchema(items, ctx) : void 0;
|
|
266739
|
+
if (rest) {
|
|
266740
|
+
zodSchema = tuple(tupleItems).rest(rest);
|
|
266741
|
+
} else {
|
|
266742
|
+
zodSchema = tuple(tupleItems);
|
|
266743
|
+
}
|
|
266744
|
+
if (typeof schema.minItems === "number") {
|
|
266745
|
+
zodSchema = zodSchema.check(_minLength(schema.minItems));
|
|
266746
|
+
}
|
|
266747
|
+
if (typeof schema.maxItems === "number") {
|
|
266748
|
+
zodSchema = zodSchema.check(_maxLength(schema.maxItems));
|
|
266749
|
+
}
|
|
266750
|
+
} else if (Array.isArray(items)) {
|
|
266751
|
+
const tupleItems = items.map((item) => convertSchema(item, ctx));
|
|
266752
|
+
const rest = schema.additionalItems && typeof schema.additionalItems === "object" ? convertSchema(schema.additionalItems, ctx) : void 0;
|
|
266753
|
+
if (rest) {
|
|
266754
|
+
zodSchema = tuple(tupleItems).rest(rest);
|
|
266755
|
+
} else {
|
|
266756
|
+
zodSchema = tuple(tupleItems);
|
|
266757
|
+
}
|
|
266758
|
+
if (typeof schema.minItems === "number") {
|
|
266759
|
+
zodSchema = zodSchema.check(_minLength(schema.minItems));
|
|
266760
|
+
}
|
|
266761
|
+
if (typeof schema.maxItems === "number") {
|
|
266762
|
+
zodSchema = zodSchema.check(_maxLength(schema.maxItems));
|
|
266763
|
+
}
|
|
266764
|
+
} else if (items !== void 0) {
|
|
266765
|
+
const element = convertSchema(items, ctx);
|
|
266766
|
+
let arraySchema = array(element);
|
|
266767
|
+
if (typeof schema.minItems === "number") {
|
|
266768
|
+
arraySchema = arraySchema.min(schema.minItems);
|
|
266769
|
+
}
|
|
266770
|
+
if (typeof schema.maxItems === "number") {
|
|
266771
|
+
arraySchema = arraySchema.max(schema.maxItems);
|
|
266772
|
+
}
|
|
266773
|
+
zodSchema = arraySchema;
|
|
266774
|
+
} else {
|
|
266775
|
+
zodSchema = array(any());
|
|
266776
|
+
}
|
|
266777
|
+
break;
|
|
266778
|
+
}
|
|
266779
|
+
default:
|
|
266780
|
+
throw new Error(`Unsupported type: ${type}`);
|
|
266781
|
+
}
|
|
266782
|
+
if (schema.description) {
|
|
266783
|
+
zodSchema = zodSchema.describe(schema.description);
|
|
266784
|
+
}
|
|
266785
|
+
if (schema.default !== void 0) {
|
|
266786
|
+
zodSchema = zodSchema.default(schema.default);
|
|
266787
|
+
}
|
|
266788
|
+
return zodSchema;
|
|
266789
|
+
}
|
|
266790
|
+
function convertSchema(schema, ctx) {
|
|
266791
|
+
if (typeof schema === "boolean") {
|
|
266792
|
+
return schema ? any() : never();
|
|
266793
|
+
}
|
|
266794
|
+
let baseSchema = convertBaseSchema(schema, ctx);
|
|
266795
|
+
const hasExplicitType = schema.type || schema.enum !== void 0 || schema.const !== void 0;
|
|
266796
|
+
if (schema.anyOf && Array.isArray(schema.anyOf)) {
|
|
266797
|
+
const options = schema.anyOf.map((s) => convertSchema(s, ctx));
|
|
266798
|
+
const anyOfUnion = union(options);
|
|
266799
|
+
baseSchema = hasExplicitType ? intersection(baseSchema, anyOfUnion) : anyOfUnion;
|
|
266800
|
+
}
|
|
266801
|
+
if (schema.oneOf && Array.isArray(schema.oneOf)) {
|
|
266802
|
+
const options = schema.oneOf.map((s) => convertSchema(s, ctx));
|
|
266803
|
+
const oneOfUnion = xor(options);
|
|
266804
|
+
baseSchema = hasExplicitType ? intersection(baseSchema, oneOfUnion) : oneOfUnion;
|
|
266805
|
+
}
|
|
266806
|
+
if (schema.allOf && Array.isArray(schema.allOf)) {
|
|
266807
|
+
if (schema.allOf.length === 0) {
|
|
266808
|
+
baseSchema = hasExplicitType ? baseSchema : any();
|
|
266809
|
+
} else {
|
|
266810
|
+
let result = hasExplicitType ? baseSchema : convertSchema(schema.allOf[0], ctx);
|
|
266811
|
+
const startIdx = hasExplicitType ? 0 : 1;
|
|
266812
|
+
for (let i = startIdx; i < schema.allOf.length; i++) {
|
|
266813
|
+
result = intersection(result, convertSchema(schema.allOf[i], ctx));
|
|
266814
|
+
}
|
|
266815
|
+
baseSchema = result;
|
|
266816
|
+
}
|
|
266817
|
+
}
|
|
266818
|
+
if (schema.nullable === true && ctx.version === "openapi-3.0") {
|
|
266819
|
+
baseSchema = nullable(baseSchema);
|
|
266820
|
+
}
|
|
266821
|
+
if (schema.readOnly === true) {
|
|
266822
|
+
baseSchema = readonly(baseSchema);
|
|
266823
|
+
}
|
|
266824
|
+
return baseSchema;
|
|
266825
|
+
}
|
|
266826
|
+
function fromJSONSchema(schema, params) {
|
|
266827
|
+
if (typeof schema === "boolean") {
|
|
266828
|
+
return schema ? any() : never();
|
|
266829
|
+
}
|
|
266830
|
+
const version5 = detectVersion(schema, params?.defaultTarget);
|
|
266831
|
+
const defs = schema.$defs || schema.definitions || {};
|
|
266832
|
+
const ctx = {
|
|
266833
|
+
version: version5,
|
|
266834
|
+
defs,
|
|
266835
|
+
refs: /* @__PURE__ */ new Map(),
|
|
266836
|
+
processing: /* @__PURE__ */ new Set(),
|
|
266837
|
+
rootSchema: schema
|
|
266838
|
+
};
|
|
266839
|
+
return convertSchema(schema, ctx);
|
|
266840
|
+
}
|
|
266841
|
+
|
|
266066
266842
|
// ../../node_modules/zod/v4/classic/coerce.js
|
|
266067
266843
|
var coerce_exports = {};
|
|
266068
266844
|
__export(coerce_exports, {
|
|
@@ -304476,7 +305252,7 @@ var Queue = class extends EventTarget {
|
|
|
304476
305252
|
// ../../packages/node/dist/Verifier.js
|
|
304477
305253
|
var import_bytecode_utils2 = __toESM(require_main(), 1);
|
|
304478
305254
|
var import_lib_sourcify = __toESM(require_main2(), 1);
|
|
304479
|
-
var
|
|
305255
|
+
var import_abi25 = __toESM(require_lib28(), 1);
|
|
304480
305256
|
var Verifier = class {
|
|
304481
305257
|
logger;
|
|
304482
305258
|
constructor() {
|
|
@@ -304552,8 +305328,8 @@ ${errors.join("\n")}`
|
|
|
304552
305328
|
error: `Failed to match with creation bytecode: constructor ABI Inputs are missing`
|
|
304553
305329
|
};
|
|
304554
305330
|
}
|
|
304555
|
-
const decodeResult =
|
|
304556
|
-
const encodeResult =
|
|
305331
|
+
const decodeResult = import_abi25.defaultAbiCoder.decode(constructorAbiParamInputs, abiEncodedConstructorArguments);
|
|
305332
|
+
const encodeResult = import_abi25.defaultAbiCoder.encode(constructorAbiParamInputs, decodeResult);
|
|
304557
305333
|
if (encodeResult !== abiEncodedConstructorArguments) {
|
|
304558
305334
|
return {
|
|
304559
305335
|
...result,
|
|
@@ -310411,16 +311187,16 @@ var ansiStyles = assembleStyles();
|
|
|
310411
311187
|
var ansi_styles_default = ansiStyles;
|
|
310412
311188
|
|
|
310413
311189
|
// ../../node_modules/chalk/source/vendor/supports-color/index.js
|
|
310414
|
-
import
|
|
311190
|
+
import process3 from "node:process";
|
|
310415
311191
|
import os from "node:os";
|
|
310416
311192
|
import tty from "node:tty";
|
|
310417
|
-
function hasFlag(flag, argv = globalThis.Deno ? globalThis.Deno.args :
|
|
311193
|
+
function hasFlag(flag, argv = globalThis.Deno ? globalThis.Deno.args : process3.argv) {
|
|
310418
311194
|
const prefix = flag.startsWith("-") ? "" : flag.length === 1 ? "-" : "--";
|
|
310419
311195
|
const position = argv.indexOf(prefix + flag);
|
|
310420
311196
|
const terminatorPosition = argv.indexOf("--");
|
|
310421
311197
|
return position !== -1 && (terminatorPosition === -1 || position < terminatorPosition);
|
|
310422
311198
|
}
|
|
310423
|
-
var { env } =
|
|
311199
|
+
var { env } = process3;
|
|
310424
311200
|
var flagForceColor;
|
|
310425
311201
|
if (hasFlag("no-color") || hasFlag("no-colors") || hasFlag("color=false") || hasFlag("color=never")) {
|
|
310426
311202
|
flagForceColor = 0;
|
|
@@ -310476,7 +311252,7 @@ function _supportsColor(haveStream, { streamIsTTY, sniffFlags = true } = {}) {
|
|
|
310476
311252
|
if (env.TERM === "dumb") {
|
|
310477
311253
|
return min;
|
|
310478
311254
|
}
|
|
310479
|
-
if (
|
|
311255
|
+
if (process3.platform === "win32") {
|
|
310480
311256
|
const osRelease = os.release().split(".");
|
|
310481
311257
|
if (Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) {
|
|
310482
311258
|
return Number(osRelease[2]) >= 14931 ? 3 : 2;
|
|
@@ -311368,7 +312144,7 @@ function getRenderer(opts) {
|
|
|
311368
312144
|
var package_default = {
|
|
311369
312145
|
name: "@gearbox-protocol/deploy-tools",
|
|
311370
312146
|
description: "Gearbox deploy tools",
|
|
311371
|
-
version: "5.63.
|
|
312147
|
+
version: "5.63.3",
|
|
311372
312148
|
homepage: "https://gearbox.fi",
|
|
311373
312149
|
keywords: [
|
|
311374
312150
|
"gearbox"
|
|
@@ -311402,16 +312178,16 @@ var package_default = {
|
|
|
311402
312178
|
"@actions/core": "^2.0.1",
|
|
311403
312179
|
"@chialab/esbuild-plugin-commonjs": "^0.19.0",
|
|
311404
312180
|
"@commander-js/extra-typings": "^14.0.0",
|
|
311405
|
-
"@ethereum-sourcify/bytecode-utils": "^1.3.
|
|
312181
|
+
"@ethereum-sourcify/bytecode-utils": "^1.3.18",
|
|
311406
312182
|
"@ethereum-sourcify/lib-sourcify": "^1.12.1",
|
|
311407
312183
|
"@gearbox-protocol/cli-utils": "0.0.0",
|
|
311408
312184
|
"@gearbox-protocol/deploy-tools-node": "0.0.0",
|
|
311409
312185
|
"@gearbox-protocol/deploy-tools-shared": "0.0.0",
|
|
311410
312186
|
"@gearbox-protocol/deploy-tools-types": "0.0.0",
|
|
311411
|
-
"@gearbox-protocol/sdk": "11.12.
|
|
312187
|
+
"@gearbox-protocol/sdk": "11.12.1",
|
|
311412
312188
|
"@gearbox-protocol/sdk-gov": "2.34.0-next.114",
|
|
311413
312189
|
"@types/lodash-es": "^4.17.12",
|
|
311414
|
-
"@types/node": "^25.0.
|
|
312190
|
+
"@types/node": "^25.0.2",
|
|
311415
312191
|
"@types/react": "^19.2.7",
|
|
311416
312192
|
"@types/react-dom": "^19.2.3",
|
|
311417
312193
|
abitype: "^1.2.1",
|
|
@@ -311424,13 +312200,13 @@ var package_default = {
|
|
|
311424
312200
|
pino: "^10.0.0",
|
|
311425
312201
|
"pino-pretty": "^13.1.3",
|
|
311426
312202
|
queue: "^7.0.0",
|
|
311427
|
-
react: "^19.2.
|
|
311428
|
-
"react-dom": "^19.2.
|
|
312203
|
+
react: "^19.2.3",
|
|
312204
|
+
"react-dom": "^19.2.3",
|
|
311429
312205
|
table: "^6.9.0",
|
|
311430
312206
|
tsx: "^4.21.0",
|
|
311431
|
-
viem: "^2.
|
|
312207
|
+
viem: "^2.42.1",
|
|
311432
312208
|
yaml: "^2.8.2",
|
|
311433
|
-
zod: "^4.
|
|
312209
|
+
zod: "^4.2.0"
|
|
311434
312210
|
}
|
|
311435
312211
|
};
|
|
311436
312212
|
|