agent-relay 12.0.0 → 12.1.1
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/README.md +64 -0
- package/dist/cli/agent-relay-mcp.d.ts.map +1 -1
- package/dist/cli/agent-relay-mcp.js +177 -28
- package/dist/cli/agent-relay-mcp.js.map +1 -1
- package/dist/cli/commands/core.d.ts +8 -0
- package/dist/cli/commands/core.d.ts.map +1 -1
- package/dist/cli/commands/core.js +4 -0
- package/dist/cli/commands/core.js.map +1 -1
- package/dist/cli/commands/fleet-agent.d.ts +5 -1
- package/dist/cli/commands/fleet-agent.d.ts.map +1 -1
- package/dist/cli/commands/fleet-agent.js +114 -26
- package/dist/cli/commands/fleet-agent.js.map +1 -1
- package/dist/cli/commands/fleet.d.ts.map +1 -1
- package/dist/cli/commands/fleet.js +93 -13
- package/dist/cli/commands/fleet.js.map +1 -1
- package/dist/cli/commands/node.js +4 -0
- package/dist/cli/commands/node.js.map +1 -1
- package/dist/cli/commands/status.d.ts +1 -1
- package/dist/cli/commands/status.d.ts.map +1 -1
- package/dist/cli/commands/status.js +7 -3
- package/dist/cli/commands/status.js.map +1 -1
- package/dist/cli/lib/broker-lifecycle.d.ts +2 -0
- package/dist/cli/lib/broker-lifecycle.d.ts.map +1 -1
- package/dist/cli/lib/broker-lifecycle.js +222 -153
- package/dist/cli/lib/broker-lifecycle.js.map +1 -1
- package/dist/cli/lib/broker-process-identity.d.ts +30 -0
- package/dist/cli/lib/broker-process-identity.d.ts.map +1 -0
- package/dist/cli/lib/broker-process-identity.js +229 -0
- package/dist/cli/lib/broker-process-identity.js.map +1 -0
- package/dist/cli/lib/sdk-command.d.ts.map +1 -1
- package/dist/cli/lib/sdk-command.js +20 -2
- package/dist/cli/lib/sdk-command.js.map +1 -1
- package/dist/cli/lib/spawn-lifecycle.d.ts +12 -0
- package/dist/cli/lib/spawn-lifecycle.d.ts.map +1 -0
- package/dist/cli/lib/spawn-lifecycle.js +89 -0
- package/dist/cli/lib/spawn-lifecycle.js.map +1 -0
- package/dist/index.cjs +328 -202
- package/package.json +9 -9
package/dist/index.cjs
CHANGED
|
@@ -303,7 +303,7 @@ __export(index_exports, {
|
|
|
303
303
|
module.exports = __toCommonJS(index_exports);
|
|
304
304
|
|
|
305
305
|
// ../../node_modules/@relaycast/sdk/dist/version.js
|
|
306
|
-
var SDK_VERSION = "8.
|
|
306
|
+
var SDK_VERSION = "8.10.1";
|
|
307
307
|
|
|
308
308
|
// ../../node_modules/zod/v4/classic/external.js
|
|
309
309
|
var external_exports = {};
|
|
@@ -375,7 +375,6 @@ __export(external_exports, {
|
|
|
375
375
|
ZodPrefault: () => ZodPrefault,
|
|
376
376
|
ZodPreprocess: () => ZodPreprocess,
|
|
377
377
|
ZodPromise: () => ZodPromise,
|
|
378
|
-
ZodProperties: () => ZodProperties,
|
|
379
378
|
ZodReadonly: () => ZodReadonly,
|
|
380
379
|
ZodRealError: () => ZodRealError,
|
|
381
380
|
ZodRecord: () => ZodRecord,
|
|
@@ -419,6 +418,7 @@ __export(external_exports, {
|
|
|
419
418
|
creditCard: () => creditCard2,
|
|
420
419
|
cuid: () => cuid3,
|
|
421
420
|
cuid2: () => cuid22,
|
|
421
|
+
currencyCode: () => currencyCode2,
|
|
422
422
|
custom: () => custom,
|
|
423
423
|
date: () => date2,
|
|
424
424
|
decode: () => decode2,
|
|
@@ -512,7 +512,7 @@ __export(external_exports, {
|
|
|
512
512
|
preprocess: () => preprocess,
|
|
513
513
|
prettifyError: () => prettifyError,
|
|
514
514
|
promise: () => promise,
|
|
515
|
-
properties: () =>
|
|
515
|
+
properties: () => _properties,
|
|
516
516
|
property: () => _property,
|
|
517
517
|
readonly: () => readonly,
|
|
518
518
|
record: () => record,
|
|
@@ -600,6 +600,7 @@ __export(core_exports2, {
|
|
|
600
600
|
$ZodCheckMultipleOf: () => $ZodCheckMultipleOf,
|
|
601
601
|
$ZodCheckNumberFormat: () => $ZodCheckNumberFormat,
|
|
602
602
|
$ZodCheckOverwrite: () => $ZodCheckOverwrite,
|
|
603
|
+
$ZodCheckProperties: () => $ZodCheckProperties,
|
|
603
604
|
$ZodCheckProperty: () => $ZodCheckProperty,
|
|
604
605
|
$ZodCheckRegex: () => $ZodCheckRegex,
|
|
605
606
|
$ZodCheckSizeEquals: () => $ZodCheckSizeEquals,
|
|
@@ -653,7 +654,6 @@ __export(core_exports2, {
|
|
|
653
654
|
$ZodPrefault: () => $ZodPrefault,
|
|
654
655
|
$ZodPreprocess: () => $ZodPreprocess,
|
|
655
656
|
$ZodPromise: () => $ZodPromise,
|
|
656
|
-
$ZodProperties: () => $ZodProperties,
|
|
657
657
|
$ZodReadonly: () => $ZodReadonly,
|
|
658
658
|
$ZodRealError: () => $ZodRealError,
|
|
659
659
|
$ZodRecord: () => $ZodRecord,
|
|
@@ -821,6 +821,7 @@ __export(core_exports2, {
|
|
|
821
821
|
_xor: () => _xor,
|
|
822
822
|
base64Charset: () => base64Charset,
|
|
823
823
|
base64urlCharset: () => base64urlCharset,
|
|
824
|
+
canParseURL: () => canParseURL,
|
|
824
825
|
clone: () => clone,
|
|
825
826
|
compile: () => compile,
|
|
826
827
|
compileFn: () => compileFn,
|
|
@@ -843,7 +844,6 @@ __export(core_exports2, {
|
|
|
843
844
|
initializeContext: () => initializeContext,
|
|
844
845
|
isBackEdge: () => isBackEdge,
|
|
845
846
|
isRecursiveSchema: () => isRecursiveSchema,
|
|
846
|
-
isTransforming: () => isTransforming,
|
|
847
847
|
isValidBase64: () => isValidBase64,
|
|
848
848
|
isValidBase64URL: () => isValidBase64URL,
|
|
849
849
|
isValidCIDRv6: () => isValidCIDRv6,
|
|
@@ -880,6 +880,7 @@ __export(core_exports2, {
|
|
|
880
880
|
util: () => util_exports,
|
|
881
881
|
validate: () => validate,
|
|
882
882
|
validateAsync: () => validateAsync,
|
|
883
|
+
validateURL: () => validateURL,
|
|
883
884
|
version: () => version,
|
|
884
885
|
withParser: () => withParser
|
|
885
886
|
});
|
|
@@ -1621,9 +1622,6 @@ function members(proto, table) {
|
|
|
1621
1622
|
else
|
|
1622
1623
|
defineBound(proto, key, desc.value);
|
|
1623
1624
|
}
|
|
1624
|
-
for (const sym of Object.getOwnPropertySymbols(table)) {
|
|
1625
|
-
defineBound(proto, sym, table[sym]);
|
|
1626
|
-
}
|
|
1627
1625
|
}
|
|
1628
1626
|
function own(inst, key, value, enumerable = true) {
|
|
1629
1627
|
Object.defineProperty(inst, key, { configurable: true, writable: true, enumerable, value });
|
|
@@ -1776,8 +1774,7 @@ function $constructor(name, initializer3, proto, params) {
|
|
|
1776
1774
|
} finally {
|
|
1777
1775
|
_zodDesc.value = void 0;
|
|
1778
1776
|
}
|
|
1779
|
-
}
|
|
1780
|
-
if (inst._zod.traits.has(name)) {
|
|
1777
|
+
} else if (inst._zod.traits.has(name)) {
|
|
1781
1778
|
return;
|
|
1782
1779
|
}
|
|
1783
1780
|
inst._zod.traits.add(name);
|
|
@@ -2219,6 +2216,7 @@ __export(regexes_exports, {
|
|
|
2219
2216
|
creditCard: () => creditCard,
|
|
2220
2217
|
cuid: () => cuid,
|
|
2221
2218
|
cuid2: () => cuid2,
|
|
2219
|
+
currencyCode: () => currencyCode,
|
|
2222
2220
|
date: () => date,
|
|
2223
2221
|
datetime: () => datetime,
|
|
2224
2222
|
domain: () => domain,
|
|
@@ -2317,6 +2315,7 @@ var domain = /^(?=.{1,253}$)([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a
|
|
|
2317
2315
|
var httpProtocol = /^https?$/;
|
|
2318
2316
|
var e164 = /^\+[1-9]\d{6,14}$/;
|
|
2319
2317
|
var creditCard = /^\d(?:[ -]?\d){11,18}$/;
|
|
2318
|
+
var currencyCode = /^(?:AED|AFN|ALL|AMD|AOA|ARS|AUD|AWG|AZN|BAM|BBD|BDT|BHD|BIF|BMD|BND|BOB|BOV|BRL|BSD|BTN|BWP|BYN|BZD|CAD|CDF|CHE|CHF|CHW|CLF|CLP|CNY|COP|COU|CRC|CUP|CVE|CZK|DJF|DKK|DOP|DZD|EGP|ERN|ETB|EUR|FJD|FKP|GBP|GEL|GHS|GIP|GMD|GNF|GTQ|GYD|HKD|HNL|HTG|HUF|IDR|ILS|INR|IQD|IRR|ISK|JMD|JOD|JPY|KES|KGS|KHR|KMF|KPW|KRW|KWD|KYD|KZT|LAK|LBP|LKR|LRD|LSL|LYD|MAD|MDL|MGA|MKD|MMK|MNT|MOP|MRU|MUR|MVR|MWK|MXN|MXV|MYR|MZN|NAD|NGN|NIO|NOK|NPR|NZD|OMR|PAB|PEN|PGK|PHP|PKR|PLN|PYG|QAR|RON|RSD|RUB|RWF|SAR|SBD|SCR|SDG|SEK|SGD|SHP|SLE|SOS|SRD|SSP|STN|SVC|SYP|SZL|THB|TJS|TMT|TND|TOP|TRY|TTD|TWD|TZS|UAH|UGX|USD|USN|UYI|UYU|UYW|UZS|VED|VES|VND|VUV|WST|XAD|XAF|XAG|XAU|XBA|XBB|XBC|XBD|XCD|XCG|XDR|XOF|XPD|XPF|XPT|XSU|XTS|XUA|XXX|YER|ZAR|ZMW|ZWG)$/;
|
|
2320
2319
|
var iban = /^[A-Z]{2}(?!00|01|99)\d{2}[A-Z0-9]{11,30}$/;
|
|
2321
2320
|
var dateSource = `(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))`;
|
|
2322
2321
|
function anchor(source) {
|
|
@@ -2801,6 +2800,34 @@ var $ZodCheckProperty = /* @__PURE__ */ $constructor("$ZodCheckProperty", (inst,
|
|
|
2801
2800
|
return;
|
|
2802
2801
|
};
|
|
2803
2802
|
});
|
|
2803
|
+
var $ZodCheckProperties = /* @__PURE__ */ $constructor("$ZodCheckProperties", (inst, def) => {
|
|
2804
|
+
$ZodCheck.init(inst, def);
|
|
2805
|
+
hide(inst, Symbol.iterator, function* () {
|
|
2806
|
+
yield inst;
|
|
2807
|
+
});
|
|
2808
|
+
let entries;
|
|
2809
|
+
inst._zod.check = (payload) => {
|
|
2810
|
+
if (payload.value == null) {
|
|
2811
|
+
payload.issues.push({ expected: "object", code: "invalid_type", input: payload.value, inst });
|
|
2812
|
+
return void 0;
|
|
2813
|
+
}
|
|
2814
|
+
entries ?? (entries = Reflect.ownKeys(def.shape).map((key) => [key, def.shape[key]]));
|
|
2815
|
+
const input2 = payload.value;
|
|
2816
|
+
let proms;
|
|
2817
|
+
for (const [key, schema] of entries) {
|
|
2818
|
+
const result = schema._zod.run({ value: input2[key], issues: [] }, {});
|
|
2819
|
+
if (result instanceof Promise) {
|
|
2820
|
+
proms ?? (proms = []);
|
|
2821
|
+
proms.push(result.then((result2) => handleCheckPropertyResult(result2, payload, key)));
|
|
2822
|
+
} else {
|
|
2823
|
+
handleCheckPropertyResult(result, payload, key);
|
|
2824
|
+
}
|
|
2825
|
+
}
|
|
2826
|
+
if (proms)
|
|
2827
|
+
return Promise.all(proms).then(() => void 0);
|
|
2828
|
+
return void 0;
|
|
2829
|
+
};
|
|
2830
|
+
});
|
|
2804
2831
|
var $ZodCheckMimeType = /* @__PURE__ */ $constructor("$ZodCheckMimeType", (inst, def) => {
|
|
2805
2832
|
$ZodCheck.init(inst, def);
|
|
2806
2833
|
const mimeSet = new Set(def.mime);
|
|
@@ -2868,7 +2895,7 @@ ${content.join("\n")}
|
|
|
2868
2895
|
var version = {
|
|
2869
2896
|
major: 4,
|
|
2870
2897
|
minor: 6,
|
|
2871
|
-
patch:
|
|
2898
|
+
patch: 5
|
|
2872
2899
|
};
|
|
2873
2900
|
|
|
2874
2901
|
// ../../node_modules/zod/v4/core/schemas.js
|
|
@@ -3056,11 +3083,32 @@ var $ZodEmail = /* @__PURE__ */ $constructor("$ZodEmail", (inst, def) => {
|
|
|
3056
3083
|
});
|
|
3057
3084
|
var URL_BAD_FORMAT = 1;
|
|
3058
3085
|
var URL_UNPARSEABLE = 2;
|
|
3086
|
+
function canParseURL(input2) {
|
|
3087
|
+
try {
|
|
3088
|
+
if (typeof URL !== "undefined" && typeof URL.canParse === "function")
|
|
3089
|
+
return URL.canParse(input2);
|
|
3090
|
+
new URL(input2);
|
|
3091
|
+
return true;
|
|
3092
|
+
} catch {
|
|
3093
|
+
return false;
|
|
3094
|
+
}
|
|
3095
|
+
}
|
|
3096
|
+
function validateURL(trimmed, def) {
|
|
3097
|
+
if (!("normalize" in def) && !("hostname" in def) && !("protocol" in def)) {
|
|
3098
|
+
return canParseURL(trimmed) || URL_UNPARSEABLE;
|
|
3099
|
+
}
|
|
3100
|
+
return parseURLObject(trimmed, def);
|
|
3101
|
+
}
|
|
3059
3102
|
function parseURLObject(trimmed, def) {
|
|
3060
3103
|
if (!def.normalize && def.protocol?.source === httpProtocol.source && !/^https?:\/\//i.test(trimmed)) {
|
|
3061
3104
|
return URL_BAD_FORMAT;
|
|
3062
3105
|
}
|
|
3063
3106
|
try {
|
|
3107
|
+
if (typeof URL !== "undefined") {
|
|
3108
|
+
const URLStatic = URL;
|
|
3109
|
+
if (typeof URLStatic.parse === "function")
|
|
3110
|
+
return URLStatic.parse(trimmed) ?? URL_UNPARSEABLE;
|
|
3111
|
+
}
|
|
3064
3112
|
return new URL(trimmed);
|
|
3065
3113
|
} catch {
|
|
3066
3114
|
return URL_UNPARSEABLE;
|
|
@@ -3083,7 +3131,7 @@ var $ZodURL = /* @__PURE__ */ $constructor("$ZodURL", (inst, def) => {
|
|
|
3083
3131
|
inst._zod.check = (payload) => {
|
|
3084
3132
|
try {
|
|
3085
3133
|
const trimmed = payload.value.trim();
|
|
3086
|
-
const url2 =
|
|
3134
|
+
const url2 = validateURL(trimmed, def);
|
|
3087
3135
|
if (url2 === URL_BAD_FORMAT) {
|
|
3088
3136
|
payload.issues.push({
|
|
3089
3137
|
code: "invalid_format",
|
|
@@ -3105,6 +3153,10 @@ var $ZodURL = /* @__PURE__ */ $constructor("$ZodURL", (inst, def) => {
|
|
|
3105
3153
|
});
|
|
3106
3154
|
return;
|
|
3107
3155
|
}
|
|
3156
|
+
if (url2 === true) {
|
|
3157
|
+
payload.value = stripTabAndNewline(trimmed);
|
|
3158
|
+
return;
|
|
3159
|
+
}
|
|
3108
3160
|
if (def.hostname && !urlHostnameOk(url2, def.hostname)) {
|
|
3109
3161
|
payload.issues.push({
|
|
3110
3162
|
code: "invalid_format",
|
|
@@ -3194,12 +3246,7 @@ var ipv6Alphabet = /^[0-9a-fA-F:.]+$/;
|
|
|
3194
3246
|
function isValidIPv6(value) {
|
|
3195
3247
|
if (!ipv6Alphabet.test(value))
|
|
3196
3248
|
return false;
|
|
3197
|
-
|
|
3198
|
-
new URL(`http://[${value}]`);
|
|
3199
|
-
return true;
|
|
3200
|
-
} catch {
|
|
3201
|
-
return false;
|
|
3202
|
-
}
|
|
3249
|
+
return canParseURL(`http://[${value}]`);
|
|
3203
3250
|
}
|
|
3204
3251
|
var $ZodIPv6 = /* @__PURE__ */ $constructor("$ZodIPv6", (inst, def) => {
|
|
3205
3252
|
def.pattern ?? (def.pattern = ipv6);
|
|
@@ -3672,7 +3719,7 @@ function handlePropertyResult(result, final, key, input2, optin, optout) {
|
|
|
3672
3719
|
return;
|
|
3673
3720
|
}
|
|
3674
3721
|
if (result.value === void 0) {
|
|
3675
|
-
if (isPresent) {
|
|
3722
|
+
if (isPresent || optin === "defaulted" && !isOptionalOut) {
|
|
3676
3723
|
final.value[key] = void 0;
|
|
3677
3724
|
}
|
|
3678
3725
|
} else {
|
|
@@ -3908,16 +3955,16 @@ var $ZodObjectJIT = /* @__PURE__ */ $constructor("$ZodObjectJIT", (inst, def) =>
|
|
|
3908
3955
|
doc.write(`
|
|
3909
3956
|
if (${id}.issues.length) {${prefixStr(id, k)}
|
|
3910
3957
|
}
|
|
3911
|
-
|
|
3912
|
-
if (
|
|
3913
|
-
|
|
3914
|
-
newResult[${k}] = undefined;
|
|
3915
|
-
}
|
|
3958
|
+
`);
|
|
3959
|
+
if (optin === "defaulted") {
|
|
3960
|
+
doc.write(`newResult[${k}] = ${id}.value;`);
|
|
3916
3961
|
} else {
|
|
3962
|
+
doc.write(`
|
|
3963
|
+
if (${id}.value !== undefined || ${isPresent}) {
|
|
3917
3964
|
newResult[${k}] = ${id}.value;
|
|
3918
3965
|
}
|
|
3919
|
-
|
|
3920
3966
|
`);
|
|
3967
|
+
}
|
|
3921
3968
|
}
|
|
3922
3969
|
}
|
|
3923
3970
|
doc.write(`payload.value = newResult;`);
|
|
@@ -5264,59 +5311,6 @@ function handleRefineResult(result, payload, input2, inst) {
|
|
|
5264
5311
|
payload.issues.push(issue(_iss));
|
|
5265
5312
|
}
|
|
5266
5313
|
}
|
|
5267
|
-
function handlePropertiesResult(result, payload, key) {
|
|
5268
|
-
if (result.issues.length) {
|
|
5269
|
-
payload.issues.push(...prefixIssues(key, result.issues));
|
|
5270
|
-
}
|
|
5271
|
-
}
|
|
5272
|
-
var $ZodProperties = /* @__PURE__ */ $constructor("$ZodProperties", (inst, def) => {
|
|
5273
|
-
$ZodType.init(inst, def);
|
|
5274
|
-
$ZodCheck.init(inst, def);
|
|
5275
|
-
const memo2 = globalConfig.memoizer;
|
|
5276
|
-
memo2?.attach(inst);
|
|
5277
|
-
let entries;
|
|
5278
|
-
const runShape = (payload, ctx) => {
|
|
5279
|
-
entries ?? (entries = Reflect.ownKeys(def.shape).map((key) => [key, def.shape[key]]));
|
|
5280
|
-
const input2 = payload.value;
|
|
5281
|
-
let proms;
|
|
5282
|
-
for (const [key, schema] of entries) {
|
|
5283
|
-
const result = schema._zod.run({ value: input2[key], issues: [] }, ctx);
|
|
5284
|
-
if (result instanceof Promise) {
|
|
5285
|
-
proms ?? (proms = []);
|
|
5286
|
-
proms.push(result.then((result2) => handlePropertiesResult(result2, payload, key)));
|
|
5287
|
-
} else {
|
|
5288
|
-
handlePropertiesResult(result, payload, key);
|
|
5289
|
-
}
|
|
5290
|
-
}
|
|
5291
|
-
if (proms)
|
|
5292
|
-
return Promise.all(proms).then(() => void 0);
|
|
5293
|
-
return void 0;
|
|
5294
|
-
};
|
|
5295
|
-
inst._zod.parse = (payload, ctx) => {
|
|
5296
|
-
const input2 = payload.value;
|
|
5297
|
-
if (input2 === null || typeof input2 !== "object" && typeof input2 !== "function") {
|
|
5298
|
-
payload.issues.push({ expected: "object", code: "invalid_type", input: input2, inst });
|
|
5299
|
-
return payload;
|
|
5300
|
-
}
|
|
5301
|
-
if (ctx.direction === "backward")
|
|
5302
|
-
ctx = { ...ctx, direction: "forward" };
|
|
5303
|
-
if (memo2)
|
|
5304
|
-
memo2.alloc(inst, payload, input2, ctx);
|
|
5305
|
-
const result = runShape(payload, ctx);
|
|
5306
|
-
return result instanceof Promise ? result.then(() => payload) : payload;
|
|
5307
|
-
};
|
|
5308
|
-
inst._zod.check = (payload) => {
|
|
5309
|
-
if (payload.value == null) {
|
|
5310
|
-
payload.issues.push({ expected: "object", code: "invalid_type", input: payload.value, inst });
|
|
5311
|
-
return void 0;
|
|
5312
|
-
}
|
|
5313
|
-
return runShape(payload, {});
|
|
5314
|
-
};
|
|
5315
|
-
}, {
|
|
5316
|
-
*[Symbol.iterator]() {
|
|
5317
|
-
yield this;
|
|
5318
|
-
}
|
|
5319
|
-
});
|
|
5320
5314
|
|
|
5321
5315
|
// ../../node_modules/zod/v4/core/memoizer.js
|
|
5322
5316
|
var $ZodCyclicError = class extends Error {
|
|
@@ -5328,7 +5322,7 @@ var $ZodCyclicError = class extends Error {
|
|
|
5328
5322
|
var STATE = "~memo";
|
|
5329
5323
|
var NO_ISSUES = [];
|
|
5330
5324
|
function isRef(value) {
|
|
5331
|
-
return value !== null &&
|
|
5325
|
+
return value !== null && typeof value === "object";
|
|
5332
5326
|
}
|
|
5333
5327
|
function cloneIssues(issues) {
|
|
5334
5328
|
return issues.map((iss) => iss.path ? { ...iss, path: iss.path.slice() } : { ...iss });
|
|
@@ -5377,9 +5371,6 @@ function isRecursive(inst, stack, resolve2) {
|
|
|
5377
5371
|
check2(def.catchall);
|
|
5378
5372
|
break;
|
|
5379
5373
|
}
|
|
5380
|
-
case "properties":
|
|
5381
|
-
merge2(shape(def.shape, false));
|
|
5382
|
-
break;
|
|
5383
5374
|
case "array":
|
|
5384
5375
|
check2(def.element);
|
|
5385
5376
|
break;
|
|
@@ -5707,6 +5698,7 @@ var error = () => {
|
|
|
5707
5698
|
json_string: "\u0646\u064E\u0635 \u0639\u0644\u0649 \u0647\u064A\u0626\u0629 JSON",
|
|
5708
5699
|
e164: "\u0631\u0642\u0645 \u0647\u0627\u062A\u0641 \u0628\u0645\u0639\u064A\u0627\u0631 E.164",
|
|
5709
5700
|
credit_card: "\u0631\u0642\u0645 \u0628\u0637\u0627\u0642\u0629 \u0627\u0644\u0627\u0626\u062A\u0645\u0627\u0646",
|
|
5701
|
+
currency_code: "\u0631\u0645\u0632 \u0627\u0644\u0639\u0645\u0644\u0629",
|
|
5710
5702
|
iban: "IBAN",
|
|
5711
5703
|
jwt: "JWT",
|
|
5712
5704
|
template_literal: "\u0645\u062F\u062E\u0644"
|
|
@@ -5818,6 +5810,7 @@ var error2 = () => {
|
|
|
5818
5810
|
json_string: "JSON string",
|
|
5819
5811
|
e164: "E.164 number",
|
|
5820
5812
|
credit_card: "kredit kart\u0131 n\xF6mr\u0259si",
|
|
5813
|
+
currency_code: "valyuta kodu",
|
|
5821
5814
|
iban: "IBAN",
|
|
5822
5815
|
jwt: "JWT",
|
|
5823
5816
|
template_literal: "input"
|
|
@@ -5978,6 +5971,7 @@ var error3 = () => {
|
|
|
5978
5971
|
json_string: "JSON \u0440\u0430\u0434\u043E\u043A",
|
|
5979
5972
|
e164: "\u043D\u0443\u043C\u0430\u0440 E.164",
|
|
5980
5973
|
credit_card: "\u043D\u0443\u043C\u0430\u0440 \u043A\u0440\u044D\u0434\u044B\u0442\u043D\u0430\u0439 \u043A\u0430\u0440\u0442\u044B",
|
|
5974
|
+
currency_code: "\u043A\u043E\u0434 \u0432\u0430\u043B\u044E\u0442\u044B",
|
|
5981
5975
|
iban: "IBAN",
|
|
5982
5976
|
jwt: "JWT",
|
|
5983
5977
|
template_literal: "\u0443\u0432\u043E\u0434"
|
|
@@ -6096,6 +6090,7 @@ var error4 = () => {
|
|
|
6096
6090
|
json_string: "JSON \u043D\u0438\u0437",
|
|
6097
6091
|
e164: "E.164 \u043D\u043E\u043C\u0435\u0440",
|
|
6098
6092
|
credit_card: "\u043D\u043E\u043C\u0435\u0440 \u043D\u0430 \u043A\u0440\u0435\u0434\u0438\u0442\u043D\u0430 \u043A\u0430\u0440\u0442\u0430",
|
|
6093
|
+
currency_code: "\u043A\u043E\u0434 \u043D\u0430 \u0432\u0430\u043B\u0443\u0442\u0430",
|
|
6099
6094
|
iban: "IBAN",
|
|
6100
6095
|
jwt: "JWT",
|
|
6101
6096
|
template_literal: "\u0432\u0445\u043E\u0434"
|
|
@@ -6221,6 +6216,7 @@ var error5 = () => {
|
|
|
6221
6216
|
json_string: "JSON \u09B8\u09CD\u099F\u09CD\u09B0\u09BF\u0982",
|
|
6222
6217
|
e164: "E.164 \u09A8\u09AE\u09CD\u09AC\u09B0",
|
|
6223
6218
|
credit_card: "\u0995\u09CD\u09B0\u09C7\u09A1\u09BF\u099F \u0995\u09BE\u09B0\u09CD\u09A1 \u09A8\u09AE\u09CD\u09AC\u09B0",
|
|
6219
|
+
currency_code: "\u09AE\u09C1\u09A6\u09CD\u09B0\u09BE \u0995\u09CB\u09A1",
|
|
6224
6220
|
iban: "IBAN",
|
|
6225
6221
|
jwt: "JWT",
|
|
6226
6222
|
template_literal: "\u0987\u09A8\u09AA\u09C1\u099F"
|
|
@@ -6334,6 +6330,7 @@ var error6 = () => {
|
|
|
6334
6330
|
json_string: "cadena JSON",
|
|
6335
6331
|
e164: "n\xFAmero E.164",
|
|
6336
6332
|
credit_card: "n\xFAmero de targeta de cr\xE8dit",
|
|
6333
|
+
currency_code: "codi de moneda",
|
|
6337
6334
|
iban: "IBAN",
|
|
6338
6335
|
jwt: "JWT",
|
|
6339
6336
|
template_literal: "entrada"
|
|
@@ -6447,6 +6444,7 @@ var error7 = () => {
|
|
|
6447
6444
|
json_string: "\u062F\u06D5\u0642\u06CC JSON",
|
|
6448
6445
|
e164: "\u0698\u0645\u0627\u0631\u06D5\u06CC E.164",
|
|
6449
6446
|
credit_card: "\u0698\u0645\u0627\u0631\u06D5\u06CC \u06A9\u0627\u0631\u062A\u06CC \u06A9\u0631\u06CE\u062F\u06CC\u062A",
|
|
6447
|
+
currency_code: "\u06A9\u06C6\u062F\u06CC \u062F\u0631\u0627\u0648",
|
|
6450
6448
|
iban: "IBAN",
|
|
6451
6449
|
jwt: "JWT",
|
|
6452
6450
|
template_literal: "\u062A\u06CE\u06A9\u0631\u062F\u06D5"
|
|
@@ -6579,6 +6577,7 @@ var error8 = () => {
|
|
|
6579
6577
|
json_string: "\u0159et\u011Bzec ve form\xE1tu JSON",
|
|
6580
6578
|
e164: "\u010D\xEDslo E.164",
|
|
6581
6579
|
credit_card: "\u010D\xEDslo kreditn\xED karty",
|
|
6580
|
+
currency_code: "k\xF3d m\u011Bny",
|
|
6582
6581
|
iban: "IBAN",
|
|
6583
6582
|
jwt: "JWT",
|
|
6584
6583
|
template_literal: "vstup"
|
|
@@ -6695,6 +6694,7 @@ var error9 = () => {
|
|
|
6695
6694
|
json_string: "JSON-streng",
|
|
6696
6695
|
e164: "E.164-nummer",
|
|
6697
6696
|
credit_card: "kreditkortnummer",
|
|
6697
|
+
currency_code: "valutakode",
|
|
6698
6698
|
iban: "IBAN",
|
|
6699
6699
|
jwt: "JWT",
|
|
6700
6700
|
template_literal: "input"
|
|
@@ -6815,6 +6815,7 @@ var error10 = () => {
|
|
|
6815
6815
|
json_string: "JSON-String",
|
|
6816
6816
|
e164: "E.164-Nummer",
|
|
6817
6817
|
credit_card: "Kreditkartennummer",
|
|
6818
|
+
currency_code: "W\xE4hrungscode",
|
|
6818
6819
|
iban: "IBAN",
|
|
6819
6820
|
jwt: "JWT",
|
|
6820
6821
|
template_literal: "Eingabe"
|
|
@@ -6928,6 +6929,7 @@ var error11 = () => {
|
|
|
6928
6929
|
json_string: "\u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC JSON",
|
|
6929
6930
|
e164: "\u03B1\u03C1\u03B9\u03B8\u03BC\u03CC\u03C2 E.164",
|
|
6930
6931
|
credit_card: "\u03B1\u03C1\u03B9\u03B8\u03BC\u03CC\u03C2 \u03C0\u03B9\u03C3\u03C4\u03C9\u03C4\u03B9\u03BA\u03AE\u03C2 \u03BA\u03AC\u03C1\u03C4\u03B1\u03C2",
|
|
6932
|
+
currency_code: "\u03BA\u03C9\u03B4\u03B9\u03BA\u03CC\u03C2 \u03BD\u03BF\u03BC\u03AF\u03C3\u03BC\u03B1\u03C4\u03BF\u03C2",
|
|
6931
6933
|
iban: "IBAN",
|
|
6932
6934
|
jwt: "JWT",
|
|
6933
6935
|
template_literal: "\u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2"
|
|
@@ -7039,6 +7041,7 @@ var error12 = () => {
|
|
|
7039
7041
|
base64url: "base64url-encoded string",
|
|
7040
7042
|
json_string: "JSON string",
|
|
7041
7043
|
e164: "E.164 number",
|
|
7044
|
+
currency_code: "currency code",
|
|
7042
7045
|
credit_card: "credit card number",
|
|
7043
7046
|
iban: "IBAN",
|
|
7044
7047
|
jwt: "JWT",
|
|
@@ -7164,6 +7167,7 @@ var error13 = () => {
|
|
|
7164
7167
|
json_string: "JSON-karaktraro",
|
|
7165
7168
|
e164: "E.164-nombro",
|
|
7166
7169
|
credit_card: "kreditkarta numero",
|
|
7170
|
+
currency_code: "valuta kodo",
|
|
7167
7171
|
iban: "IBAN",
|
|
7168
7172
|
jwt: "JWT",
|
|
7169
7173
|
template_literal: "enigo"
|
|
@@ -7277,6 +7281,7 @@ var error14 = () => {
|
|
|
7277
7281
|
json_string: "cadena JSON",
|
|
7278
7282
|
e164: "n\xFAmero E.164",
|
|
7279
7283
|
credit_card: "n\xFAmero de tarjeta de cr\xE9dito",
|
|
7284
|
+
currency_code: "c\xF3digo de moneda",
|
|
7280
7285
|
iban: "IBAN",
|
|
7281
7286
|
jwt: "JWT",
|
|
7282
7287
|
template_literal: "entrada"
|
|
@@ -7414,6 +7419,7 @@ var error15 = () => {
|
|
|
7414
7419
|
json_string: "JSON \u0631\u0634\u062A\u0647",
|
|
7415
7420
|
e164: "E.164 \u0639\u062F\u062F",
|
|
7416
7421
|
credit_card: "\u0634\u0645\u0627\u0631\u0647 \u06A9\u0627\u0631\u062A \u0627\u0639\u062A\u0628\u0627\u0631\u06CC",
|
|
7422
|
+
currency_code: "\u06A9\u062F \u0627\u0631\u0632",
|
|
7417
7423
|
iban: "IBAN",
|
|
7418
7424
|
jwt: "JWT",
|
|
7419
7425
|
template_literal: "\u0648\u0631\u0648\u062F\u06CC"
|
|
@@ -7537,6 +7543,7 @@ var error16 = () => {
|
|
|
7537
7543
|
json_string: "JSON-merkkijono",
|
|
7538
7544
|
e164: "E.164-luku",
|
|
7539
7545
|
credit_card: "luottokortin numero",
|
|
7546
|
+
currency_code: "valuuttakoodi",
|
|
7540
7547
|
iban: "IBAN",
|
|
7541
7548
|
jwt: "JWT",
|
|
7542
7549
|
template_literal: "templaattimerkkijono"
|
|
@@ -7649,6 +7656,7 @@ var error17 = () => {
|
|
|
7649
7656
|
json_string: "cha\xEEne de caract\xE8res JSON",
|
|
7650
7657
|
e164: "num\xE9ro au format E.164",
|
|
7651
7658
|
credit_card: "num\xE9ro de carte de cr\xE9dit",
|
|
7659
|
+
currency_code: "code de devise",
|
|
7652
7660
|
iban: "IBAN",
|
|
7653
7661
|
jwt: "JWT",
|
|
7654
7662
|
template_literal: "entr\xE9e"
|
|
@@ -7779,6 +7787,7 @@ var error18 = () => {
|
|
|
7779
7787
|
json_string: "cha\xEEne JSON",
|
|
7780
7788
|
e164: "num\xE9ro E.164",
|
|
7781
7789
|
credit_card: "num\xE9ro de carte de cr\xE9dit",
|
|
7790
|
+
currency_code: "code de devise",
|
|
7782
7791
|
iban: "IBAN",
|
|
7783
7792
|
jwt: "JWT",
|
|
7784
7793
|
template_literal: "entr\xE9e"
|
|
@@ -7891,6 +7900,7 @@ var error19 = () => {
|
|
|
7891
7900
|
json_string: "JSON \u0AB8\u0ACD\u0A9F\u0ACD\u0AB0\u0ABF\u0A82\u0A97",
|
|
7892
7901
|
e164: "E.164 \u0AA8\u0A82\u0AAC\u0AB0",
|
|
7893
7902
|
credit_card: "\u0A95\u0ACD\u0AB0\u0AC7\u0AA1\u0ABF\u0A9F \u0A95\u0ABE\u0AB0\u0ACD\u0AA1 \u0AA8\u0A82\u0AAC\u0AB0",
|
|
7903
|
+
currency_code: "\u0A9A\u0AB2\u0AA3 \u0A95\u0ACB\u0AA1",
|
|
7894
7904
|
iban: "IBAN",
|
|
7895
7905
|
jwt: "JWT",
|
|
7896
7906
|
template_literal: "\u0A87\u0AA8\u0AAA\u0AC1\u0A9F"
|
|
@@ -8040,6 +8050,7 @@ var error20 = () => {
|
|
|
8040
8050
|
json_string: { label: "\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA JSON", gender: "f" },
|
|
8041
8051
|
e164: { label: "\u05DE\u05E1\u05E4\u05E8 E.164", gender: "m" },
|
|
8042
8052
|
credit_card: { label: "\u05DE\u05E1\u05E4\u05E8 \u05DB\u05E8\u05D8\u05D9\u05E1 \u05D0\u05E9\u05E8\u05D0\u05D9", gender: "m" },
|
|
8053
|
+
currency_code: { label: "\u05E7\u05D5\u05D3 \u05DE\u05D8\u05D1\u05E2", gender: "m" },
|
|
8043
8054
|
iban: { label: "IBAN", gender: "m" },
|
|
8044
8055
|
jwt: { label: "JWT", gender: "m" },
|
|
8045
8056
|
template_literal: { label: "\u05E7\u05DC\u05D8", gender: "m" },
|
|
@@ -8205,6 +8216,7 @@ var error21 = () => {
|
|
|
8205
8216
|
json_string: "JSON \u0938\u094D\u091F\u094D\u0930\u093F\u0902\u0917",
|
|
8206
8217
|
e164: "E.164 \u0938\u0902\u0916\u094D\u092F\u093E",
|
|
8207
8218
|
credit_card: "\u0915\u094D\u0930\u0947\u0921\u093F\u091F \u0915\u093E\u0930\u094D\u0921 \u0938\u0902\u0916\u094D\u092F\u093E",
|
|
8219
|
+
currency_code: "\u092E\u0941\u0926\u094D\u0930\u093E \u0915\u094B\u0921",
|
|
8208
8220
|
iban: "IBAN",
|
|
8209
8221
|
jwt: "JWT",
|
|
8210
8222
|
template_literal: "\u0907\u0928\u092A\u0941\u091F"
|
|
@@ -8315,6 +8327,7 @@ var error22 = () => {
|
|
|
8315
8327
|
json_string: "JSON tekst",
|
|
8316
8328
|
e164: "E.164 broj",
|
|
8317
8329
|
credit_card: "broj kreditne kartice",
|
|
8330
|
+
currency_code: "kod valute",
|
|
8318
8331
|
iban: "IBAN",
|
|
8319
8332
|
jwt: "JWT",
|
|
8320
8333
|
template_literal: "unos"
|
|
@@ -8442,6 +8455,7 @@ var error23 = () => {
|
|
|
8442
8455
|
json_string: "JSON string",
|
|
8443
8456
|
e164: "E.164 sz\xE1m",
|
|
8444
8457
|
credit_card: "hitelk\xE1rtyasz\xE1m",
|
|
8458
|
+
currency_code: "p\xE9nznemk\xF3d",
|
|
8445
8459
|
iban: "IBAN",
|
|
8446
8460
|
jwt: "JWT",
|
|
8447
8461
|
template_literal: "bemenet"
|
|
@@ -8595,6 +8609,7 @@ var error24 = () => {
|
|
|
8595
8609
|
json_string: "JSON \u057F\u0578\u0572",
|
|
8596
8610
|
e164: "E.164 \u0570\u0561\u0574\u0561\u0580",
|
|
8597
8611
|
credit_card: "\u056F\u0580\u0565\u0564\u056B\u057F \u0584\u0561\u0580\u057F\u056B \u0570\u0561\u0574\u0561\u0580",
|
|
8612
|
+
currency_code: "\u0561\u0580\u056A\u0578\u0582\u0575\u0569\u056B \u056F\u0578\u0564",
|
|
8598
8613
|
iban: "IBAN",
|
|
8599
8614
|
jwt: "JWT",
|
|
8600
8615
|
template_literal: "\u0574\u0578\u0582\u057F\u0584"
|
|
@@ -8713,6 +8728,7 @@ var error25 = () => {
|
|
|
8713
8728
|
json_string: "string JSON",
|
|
8714
8729
|
e164: "angka E.164",
|
|
8715
8730
|
credit_card: "nomor kartu kredit",
|
|
8731
|
+
currency_code: "kode mata uang",
|
|
8716
8732
|
iban: "IBAN",
|
|
8717
8733
|
jwt: "JWT",
|
|
8718
8734
|
template_literal: "input"
|
|
@@ -8824,6 +8840,7 @@ var error26 = () => {
|
|
|
8824
8840
|
json_string: "JSON strengur",
|
|
8825
8841
|
e164: "E.164 t\xF6lugildi",
|
|
8826
8842
|
credit_card: "kreditkortan\xFAmer",
|
|
8843
|
+
currency_code: "gjaldmi\xF0ilsk\xF3\xF0i",
|
|
8827
8844
|
iban: "IBAN",
|
|
8828
8845
|
jwt: "JWT",
|
|
8829
8846
|
template_literal: "gildi"
|
|
@@ -8938,6 +8955,7 @@ var error27 = () => {
|
|
|
8938
8955
|
json_string: "stringa JSON",
|
|
8939
8956
|
e164: "numero E.164",
|
|
8940
8957
|
credit_card: "numero di carta di credito",
|
|
8958
|
+
currency_code: "codice valuta",
|
|
8941
8959
|
iban: "IBAN",
|
|
8942
8960
|
jwt: "JWT",
|
|
8943
8961
|
template_literal: "input"
|
|
@@ -9051,6 +9069,7 @@ var error28 = () => {
|
|
|
9051
9069
|
json_string: "JSON\u6587\u5B57\u5217",
|
|
9052
9070
|
e164: "E.164\u756A\u53F7",
|
|
9053
9071
|
credit_card: "\u30AF\u30EC\u30B8\u30C3\u30C8\u30AB\u30FC\u30C9\u756A\u53F7",
|
|
9072
|
+
currency_code: "\u901A\u8CA8\u30B3\u30FC\u30C9",
|
|
9054
9073
|
iban: "IBAN",
|
|
9055
9074
|
jwt: "JWT",
|
|
9056
9075
|
template_literal: "\u5165\u529B\u5024"
|
|
@@ -9163,6 +9182,7 @@ var error29 = () => {
|
|
|
9163
9182
|
json_string: "JSON \u10D5\u10D4\u10DA\u10D8",
|
|
9164
9183
|
e164: "E.164 \u10DC\u10DD\u10DB\u10D4\u10E0\u10D8",
|
|
9165
9184
|
credit_card: "\u10E1\u10D0\u10D9\u10E0\u10D4\u10D3\u10D8\u10E2\u10DD \u10D1\u10D0\u10E0\u10D0\u10D7\u10D8\u10E1 \u10DC\u10DD\u10DB\u10D4\u10E0\u10D8",
|
|
9185
|
+
currency_code: "\u10D5\u10D0\u10DA\u10E3\u10E2\u10D8\u10E1 \u10D9\u10DD\u10D3\u10D8",
|
|
9166
9186
|
iban: "IBAN",
|
|
9167
9187
|
jwt: "JWT",
|
|
9168
9188
|
template_literal: "\u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0"
|
|
@@ -9280,6 +9300,7 @@ var error30 = () => {
|
|
|
9280
9300
|
json_string: "\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A JSON",
|
|
9281
9301
|
e164: "\u179B\u17C1\u1781 E.164",
|
|
9282
9302
|
credit_card: "\u179B\u17C1\u1781\u1794\u17D0\u178E\u17D2\u178E\u17A5\u178E\u1791\u17B6\u1793",
|
|
9303
|
+
currency_code: "\u1780\u17BC\u178A\u179A\u17BC\u1794\u17B7\u1799\u1794\u17D0\u178E\u17D2\u178E",
|
|
9283
9304
|
iban: "IBAN",
|
|
9284
9305
|
jwt: "JWT",
|
|
9285
9306
|
template_literal: "\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B"
|
|
@@ -9400,6 +9421,7 @@ var error31 = () => {
|
|
|
9400
9421
|
json_string: "JSON\u0CB8\u0CCD\u0C9F\u0CCD\u0CB0\u0CBF\u0C82\u0C97\u0CCD",
|
|
9401
9422
|
e164: "E.164 \u0CB8\u0C82\u0C96\u0CCD\u0CAF\u0CC6",
|
|
9402
9423
|
credit_card: "\u0C95\u0CCD\u0CB0\u0CC6\u0CA1\u0CBF\u0C9F\u0CCD \u0C95\u0CBE\u0CB0\u0CCD\u0CA1\u0CCD \u0CB8\u0C82\u0C96\u0CCD\u0CAF\u0CC6",
|
|
9424
|
+
currency_code: "\u0C95\u0CB0\u0CC6\u0CA8\u0CCD\u0CB8\u0CBF \u0C95\u0CCB\u0CA1\u0CCD",
|
|
9403
9425
|
iban: "IBAN",
|
|
9404
9426
|
jwt: "JWT",
|
|
9405
9427
|
template_literal: "\u0C87\u0CA8\u0CCD\u0CAA\u0CC1\u0C9F\u0CCD"
|
|
@@ -9515,6 +9537,7 @@ var error32 = () => {
|
|
|
9515
9537
|
json_string: "JSON \uBB38\uC790\uC5F4",
|
|
9516
9538
|
e164: "E.164 \uBC88\uD638",
|
|
9517
9539
|
credit_card: "\uC2E0\uC6A9\uCE74\uB4DC \uBC88\uD638",
|
|
9540
|
+
currency_code: "\uD1B5\uD654 \uCF54\uB4DC",
|
|
9518
9541
|
iban: "IBAN",
|
|
9519
9542
|
jwt: "JWT",
|
|
9520
9543
|
template_literal: "\uC785\uB825"
|
|
@@ -9713,6 +9736,7 @@ var error33 = () => {
|
|
|
9713
9736
|
json_string: "JSON eilut\u0117",
|
|
9714
9737
|
e164: "E.164 numeris",
|
|
9715
9738
|
credit_card: "kredito kortel\u0117s numeris",
|
|
9739
|
+
currency_code: "valiutos kodas",
|
|
9716
9740
|
iban: "IBAN",
|
|
9717
9741
|
jwt: "JWT",
|
|
9718
9742
|
template_literal: "\u012Fvestis"
|
|
@@ -9838,6 +9862,7 @@ var error34 = () => {
|
|
|
9838
9862
|
json_string: "JSON \u043D\u0438\u0437\u0430",
|
|
9839
9863
|
e164: "E.164 \u0431\u0440\u043E\u0458",
|
|
9840
9864
|
credit_card: "\u0431\u0440\u043E\u0458 \u043D\u0430 \u043A\u0440\u0435\u0434\u0438\u0442\u043D\u0430 \u043A\u0430\u0440\u0442\u0438\u0447\u043A\u0430",
|
|
9865
|
+
currency_code: "\u043A\u043E\u0434 \u043D\u0430 \u0432\u0430\u043B\u0443\u0442\u0430",
|
|
9841
9866
|
iban: "IBAN",
|
|
9842
9867
|
jwt: "JWT",
|
|
9843
9868
|
template_literal: "\u0432\u043D\u0435\u0441"
|
|
@@ -9952,6 +9977,7 @@ var error35 = () => {
|
|
|
9952
9977
|
json_string: "string JSON",
|
|
9953
9978
|
e164: "nombor E.164",
|
|
9954
9979
|
credit_card: "nombor kad kredit",
|
|
9980
|
+
currency_code: "kod mata wang",
|
|
9955
9981
|
iban: "IBAN",
|
|
9956
9982
|
jwt: "JWT",
|
|
9957
9983
|
template_literal: "input"
|
|
@@ -10064,6 +10090,7 @@ var error36 = () => {
|
|
|
10064
10090
|
json_string: "JSON \u0938\u094D\u091F\u094D\u0930\u093F\u0919",
|
|
10065
10091
|
e164: "E.164 \u0928\u092E\u094D\u092C\u0930",
|
|
10066
10092
|
credit_card: "\u0915\u094D\u0930\u0947\u0921\u093F\u091F \u0915\u093E\u0930\u094D\u0921 \u0928\u092E\u094D\u092C\u0930",
|
|
10093
|
+
currency_code: "\u092E\u0941\u0926\u094D\u0930\u093E \u0915\u094B\u0921",
|
|
10067
10094
|
iban: "IBAN",
|
|
10068
10095
|
jwt: "JWT",
|
|
10069
10096
|
template_literal: "\u0907\u0928\u092A\u0941\u091F"
|
|
@@ -10175,6 +10202,7 @@ var error37 = () => {
|
|
|
10175
10202
|
json_string: "JSON string",
|
|
10176
10203
|
e164: "E.164-nummer",
|
|
10177
10204
|
credit_card: "creditcardnummer",
|
|
10205
|
+
currency_code: "valutacode",
|
|
10178
10206
|
iban: "IBAN",
|
|
10179
10207
|
jwt: "JWT",
|
|
10180
10208
|
template_literal: "invoer"
|
|
@@ -10290,6 +10318,7 @@ var error38 = () => {
|
|
|
10290
10318
|
json_string: "JSON-streng",
|
|
10291
10319
|
e164: "E.164-nummer",
|
|
10292
10320
|
credit_card: "kredittkortnummer",
|
|
10321
|
+
currency_code: "valutakode",
|
|
10293
10322
|
iban: "IBAN",
|
|
10294
10323
|
jwt: "JWT",
|
|
10295
10324
|
template_literal: "input"
|
|
@@ -10403,6 +10432,7 @@ var error39 = () => {
|
|
|
10403
10432
|
json_string: "JSON-streng",
|
|
10404
10433
|
e164: "E.164-nummer",
|
|
10405
10434
|
credit_card: "kredittkortnummer",
|
|
10435
|
+
currency_code: "valutakode",
|
|
10406
10436
|
iban: "IBAN",
|
|
10407
10437
|
jwt: "JWT",
|
|
10408
10438
|
template_literal: "input"
|
|
@@ -10516,6 +10546,7 @@ var error40 = () => {
|
|
|
10516
10546
|
json_string: "JSON metin",
|
|
10517
10547
|
e164: "E.164 say\u0131s\u0131",
|
|
10518
10548
|
credit_card: "i'tib\xE2r kart\u0131 numaras\u0131",
|
|
10549
|
+
currency_code: "para birimi kodu",
|
|
10519
10550
|
iban: "IBAN",
|
|
10520
10551
|
jwt: "JWT",
|
|
10521
10552
|
template_literal: "giren"
|
|
@@ -10630,6 +10661,7 @@ var error41 = () => {
|
|
|
10630
10661
|
json_string: "JSON \u0645\u062A\u0646",
|
|
10631
10662
|
e164: "\u062F E.164 \u0634\u0645\u06D0\u0631\u0647",
|
|
10632
10663
|
credit_card: "\u062F \u06A9\u0631\u06CC\u0689\u06CC\u067C \u06A9\u0627\u0631\u062A \u0634\u0645\u06CC\u0631\u0647",
|
|
10664
|
+
currency_code: "\u062F \u0627\u0633\u0639\u0627\u0631\u0648 \u06A9\u0648\u0689",
|
|
10633
10665
|
iban: "IBAN",
|
|
10634
10666
|
jwt: "JWT",
|
|
10635
10667
|
template_literal: "\u0648\u0631\u0648\u062F\u064A"
|
|
@@ -10749,6 +10781,7 @@ var error42 = () => {
|
|
|
10749
10781
|
json_string: "ci\u0105g znak\xF3w w formacie JSON",
|
|
10750
10782
|
e164: "liczba E.164",
|
|
10751
10783
|
credit_card: "numer karty kredytowej",
|
|
10784
|
+
currency_code: "kod waluty",
|
|
10752
10785
|
iban: "IBAN",
|
|
10753
10786
|
jwt: "JWT",
|
|
10754
10787
|
template_literal: "wej\u015Bcie"
|
|
@@ -10863,6 +10896,7 @@ var error43 = () => {
|
|
|
10863
10896
|
json_string: "o texto JSON",
|
|
10864
10897
|
e164: "o n\xFAmero E.164",
|
|
10865
10898
|
credit_card: "o n\xFAmero de cart\xE3o de cr\xE9dito",
|
|
10899
|
+
currency_code: "o c\xF3digo de moeda",
|
|
10866
10900
|
iban: "o IBAN",
|
|
10867
10901
|
jwt: "o JWT",
|
|
10868
10902
|
template_literal: "a entrada"
|
|
@@ -11006,6 +11040,7 @@ var error44 = () => {
|
|
|
11006
11040
|
json_string: "o texto JSON",
|
|
11007
11041
|
e164: "o n\xFAmero E.164",
|
|
11008
11042
|
credit_card: "o n\xFAmero de cart\xE3o de cr\xE9dito",
|
|
11043
|
+
currency_code: "o c\xF3digo de moeda",
|
|
11009
11044
|
iban: "o IBAN",
|
|
11010
11045
|
jwt: "o JWT",
|
|
11011
11046
|
template_literal: "a entrada"
|
|
@@ -11150,6 +11185,7 @@ var error45 = () => {
|
|
|
11150
11185
|
json_string: "\u0219ir JSON",
|
|
11151
11186
|
e164: "num\u0103r E.164",
|
|
11152
11187
|
credit_card: "num\u0103r de card de credit",
|
|
11188
|
+
currency_code: "cod valutar",
|
|
11153
11189
|
iban: "IBAN",
|
|
11154
11190
|
jwt: "JWT",
|
|
11155
11191
|
template_literal: "intrare"
|
|
@@ -11322,6 +11358,7 @@ var error46 = () => {
|
|
|
11322
11358
|
json_string: "JSON \u0441\u0442\u0440\u043E\u043A\u0430",
|
|
11323
11359
|
e164: "\u043D\u043E\u043C\u0435\u0440 E.164",
|
|
11324
11360
|
credit_card: "\u043D\u043E\u043C\u0435\u0440 \u043A\u0440\u0435\u0434\u0438\u0442\u043D\u043E\u0439 \u043A\u0430\u0440\u0442\u044B",
|
|
11361
|
+
currency_code: "\u043A\u043E\u0434 \u0432\u0430\u043B\u044E\u0442\u044B",
|
|
11325
11362
|
iban: "IBAN",
|
|
11326
11363
|
jwt: "JWT",
|
|
11327
11364
|
template_literal: "\u0432\u0432\u043E\u0434"
|
|
@@ -11440,6 +11477,7 @@ var error47 = () => {
|
|
|
11440
11477
|
json_string: "re\u0165azec vo form\xE1te JSON",
|
|
11441
11478
|
e164: "\u010D\xEDslo E.164",
|
|
11442
11479
|
credit_card: "\u010D\xEDslo kreditnej karty",
|
|
11480
|
+
currency_code: "k\xF3d meny",
|
|
11443
11481
|
iban: "IBAN",
|
|
11444
11482
|
jwt: "JWT",
|
|
11445
11483
|
template_literal: "vstup"
|
|
@@ -11556,6 +11594,7 @@ var error48 = () => {
|
|
|
11556
11594
|
json_string: "JSON niz",
|
|
11557
11595
|
e164: "E.164 \u0161tevilka",
|
|
11558
11596
|
credit_card: "\u0161tevilka kreditne kartice",
|
|
11597
|
+
currency_code: "koda valute",
|
|
11559
11598
|
iban: "IBAN",
|
|
11560
11599
|
jwt: "JWT",
|
|
11561
11600
|
template_literal: "vnos"
|
|
@@ -11670,6 +11709,7 @@ var error49 = () => {
|
|
|
11670
11709
|
json_string: "JSON-str\xE4ng",
|
|
11671
11710
|
e164: "E.164-nummer",
|
|
11672
11711
|
credit_card: "kreditkortsnummer",
|
|
11712
|
+
currency_code: "valutakod",
|
|
11673
11713
|
iban: "IBAN",
|
|
11674
11714
|
jwt: "JWT",
|
|
11675
11715
|
template_literal: "mall-literal"
|
|
@@ -11785,6 +11825,7 @@ var error50 = () => {
|
|
|
11785
11825
|
json_string: "JSON \u0B9A\u0BB0\u0BAE\u0BCD",
|
|
11786
11826
|
e164: "E.164 \u0B8E\u0BA3\u0BCD",
|
|
11787
11827
|
credit_card: "\u0B95\u0B9F\u0BA9\u0BCD \u0B85\u0B9F\u0BCD\u0B9F\u0BC8 \u0B8E\u0BA3\u0BCD",
|
|
11828
|
+
currency_code: "\u0BA8\u0BBE\u0BA3\u0BAF\u0B95\u0BCD \u0B95\u0BC1\u0BB1\u0BBF\u0BAF\u0BC0\u0B9F\u0BC1",
|
|
11788
11829
|
iban: "IBAN",
|
|
11789
11830
|
jwt: "JWT",
|
|
11790
11831
|
template_literal: "input"
|
|
@@ -11900,6 +11941,7 @@ var error51 = () => {
|
|
|
11900
11941
|
json_string: "\u0441\u0430\u0442\u0440\u0438 JSON",
|
|
11901
11942
|
e164: "\u0440\u0430\u049B\u0430\u043C\u0438 E.164",
|
|
11902
11943
|
credit_card: "\u0440\u0430\u049B\u0430\u043C\u0438 \u043A\u043E\u0440\u0442\u0438 \u043A\u0440\u0435\u0434\u0438\u0442\u04E3",
|
|
11944
|
+
currency_code: "\u0440\u0430\u043C\u0437\u0438 \u0430\u0441\u044A\u043E\u0440",
|
|
11903
11945
|
iban: "IBAN",
|
|
11904
11946
|
jwt: "JWT",
|
|
11905
11947
|
template_literal: "\u0432\u0443\u0440\u0443\u0434"
|
|
@@ -12016,6 +12058,7 @@ var error52 = () => {
|
|
|
12016
12058
|
json_string: "\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A JSON",
|
|
12017
12059
|
e164: "\u0E40\u0E1A\u0E2D\u0E23\u0E4C\u0E42\u0E17\u0E23\u0E28\u0E31\u0E1E\u0E17\u0E4C\u0E23\u0E30\u0E2B\u0E27\u0E48\u0E32\u0E07\u0E1B\u0E23\u0E30\u0E40\u0E17\u0E28 (E.164)",
|
|
12018
12060
|
credit_card: "\u0E2B\u0E21\u0E32\u0E22\u0E40\u0E25\u0E02\u0E1A\u0E31\u0E15\u0E23\u0E40\u0E04\u0E23\u0E14\u0E34\u0E15",
|
|
12061
|
+
currency_code: "\u0E23\u0E2B\u0E31\u0E2A\u0E2A\u0E01\u0E38\u0E25\u0E40\u0E07\u0E34\u0E19",
|
|
12019
12062
|
iban: "IBAN",
|
|
12020
12063
|
jwt: "\u0E42\u0E17\u0E40\u0E04\u0E19 JWT",
|
|
12021
12064
|
template_literal: "\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E17\u0E35\u0E48\u0E1B\u0E49\u0E2D\u0E19"
|
|
@@ -12131,6 +12174,7 @@ var error53 = () => {
|
|
|
12131
12174
|
json_string: "JSON setiri",
|
|
12132
12175
|
e164: "E.164 nomeri",
|
|
12133
12176
|
credit_card: "kredit kartyny\u0148 nomeri",
|
|
12177
|
+
currency_code: "wal\xFDuta kody",
|
|
12134
12178
|
iban: "IBAN",
|
|
12135
12179
|
jwt: "JWT",
|
|
12136
12180
|
template_literal: "\u015Fablon"
|
|
@@ -12238,6 +12282,7 @@ var error54 = () => {
|
|
|
12238
12282
|
json_string: "JSON dizesi",
|
|
12239
12283
|
e164: "E.164 say\u0131s\u0131",
|
|
12240
12284
|
credit_card: "kredi kart\u0131 numaras\u0131",
|
|
12285
|
+
currency_code: "para birimi kodu",
|
|
12241
12286
|
iban: "IBAN",
|
|
12242
12287
|
jwt: "JWT",
|
|
12243
12288
|
template_literal: "\u015Eablon dizesi"
|
|
@@ -12348,6 +12393,7 @@ var error55 = () => {
|
|
|
12348
12393
|
json_string: "\u0440\u044F\u0434\u043E\u043A JSON",
|
|
12349
12394
|
e164: "\u043D\u043E\u043C\u0435\u0440 E.164",
|
|
12350
12395
|
credit_card: "\u043D\u043E\u043C\u0435\u0440 \u043A\u0440\u0435\u0434\u0438\u0442\u043D\u043E\u0457 \u043A\u0430\u0440\u0442\u043A\u0438",
|
|
12396
|
+
currency_code: "\u043A\u043E\u0434 \u0432\u0430\u043B\u044E\u0442\u0438",
|
|
12351
12397
|
iban: "IBAN",
|
|
12352
12398
|
jwt: "JWT",
|
|
12353
12399
|
template_literal: "\u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456"
|
|
@@ -12466,6 +12512,7 @@ var error56 = () => {
|
|
|
12466
12512
|
json_string: "\u062C\u06D2 \u0627\u06CC\u0633 \u0627\u0648 \u0627\u06CC\u0646 \u0633\u0679\u0631\u0646\u06AF",
|
|
12467
12513
|
e164: "\u0627\u06CC 164 \u0646\u0645\u0628\u0631",
|
|
12468
12514
|
credit_card: "\u06A9\u0631\u06CC\u0688\u0679 \u06A9\u0627\u0631\u0688 \u0646\u0645\u0628\u0631",
|
|
12515
|
+
currency_code: "\u06A9\u0631\u0646\u0633\u06CC \u06A9\u0648\u0688",
|
|
12469
12516
|
iban: "IBAN",
|
|
12470
12517
|
jwt: "\u062C\u06D2 \u0688\u0628\u0644\u06CC\u0648 \u0679\u06CC",
|
|
12471
12518
|
template_literal: "\u0627\u0646 \u067E\u0679"
|
|
@@ -12581,6 +12628,7 @@ var error57 = () => {
|
|
|
12581
12628
|
json_string: "JSON satr",
|
|
12582
12629
|
e164: "E.164 raqam",
|
|
12583
12630
|
credit_card: "kredit karta raqami",
|
|
12631
|
+
currency_code: "valyuta kodi",
|
|
12584
12632
|
iban: "IBAN",
|
|
12585
12633
|
jwt: "JWT",
|
|
12586
12634
|
template_literal: "kirish"
|
|
@@ -12694,6 +12742,7 @@ var error58 = () => {
|
|
|
12694
12742
|
json_string: "chu\u1ED7i JSON",
|
|
12695
12743
|
e164: "s\u1ED1 E.164",
|
|
12696
12744
|
credit_card: "s\u1ED1 th\u1EBB t\xEDn d\u1EE5ng",
|
|
12745
|
+
currency_code: "m\xE3 ti\u1EC1n t\u1EC7",
|
|
12697
12746
|
iban: "IBAN",
|
|
12698
12747
|
jwt: "JWT",
|
|
12699
12748
|
template_literal: "\u0111\u1EA7u v\xE0o"
|
|
@@ -12807,6 +12856,7 @@ var error59 = () => {
|
|
|
12807
12856
|
json_string: "JSON\u5B57\u7B26\u4E32",
|
|
12808
12857
|
e164: "E.164\u53F7\u7801",
|
|
12809
12858
|
credit_card: "\u4FE1\u7528\u5361\u53F7",
|
|
12859
|
+
currency_code: "\u8D27\u5E01\u4EE3\u7801",
|
|
12810
12860
|
iban: "IBAN",
|
|
12811
12861
|
jwt: "JWT",
|
|
12812
12862
|
template_literal: "\u8F93\u5165"
|
|
@@ -12921,6 +12971,7 @@ var error60 = () => {
|
|
|
12921
12971
|
json_string: "JSON \u5B57\u4E32",
|
|
12922
12972
|
e164: "E.164 \u6578\u503C",
|
|
12923
12973
|
credit_card: "\u4FE1\u7528\u5361\u865F",
|
|
12974
|
+
currency_code: "\u8CA8\u5E63\u4EE3\u78BC",
|
|
12924
12975
|
iban: "IBAN",
|
|
12925
12976
|
jwt: "JWT",
|
|
12926
12977
|
template_literal: "\u8F38\u5165"
|
|
@@ -13033,6 +13084,7 @@ var error61 = () => {
|
|
|
13033
13084
|
json_string: "\u1ECD\u0300r\u1ECD\u0300 JSON",
|
|
13034
13085
|
e164: "n\u1ECD\u0301mb\xE0 E.164",
|
|
13035
13086
|
credit_card: "n\u1ECDmba kaadi gbese",
|
|
13087
|
+
currency_code: "koodu ow\xF3",
|
|
13036
13088
|
iban: "IBAN",
|
|
13037
13089
|
jwt: "JWT",
|
|
13038
13090
|
template_literal: "\u1EB9\u0300r\u1ECD \xECb\xE1w\u1ECDl\xE9"
|
|
@@ -13411,7 +13463,7 @@ function generateChecks(doc, ctx, schema, accessor) {
|
|
|
13411
13463
|
generatePropertyCheck(doc, ctx, def, currentAccessor);
|
|
13412
13464
|
break;
|
|
13413
13465
|
case "properties":
|
|
13414
|
-
generatePropertiesChecks(doc, ctx, def, currentAccessor
|
|
13466
|
+
generatePropertiesChecks(doc, ctx, def, currentAccessor);
|
|
13415
13467
|
break;
|
|
13416
13468
|
case "overwrite": {
|
|
13417
13469
|
const newAccessor = newVar(ctx);
|
|
@@ -13521,11 +13573,11 @@ function generateMimeTypeCheck(doc, ctx, def, accessor) {
|
|
|
13521
13573
|
doc.write(`if (!${mimeSet}.has(${accessor}.type)) return INVALID;`);
|
|
13522
13574
|
}
|
|
13523
13575
|
}
|
|
13524
|
-
function generatePropertiesChecks(doc, ctx, def, accessor
|
|
13576
|
+
function generatePropertiesChecks(doc, ctx, def, accessor) {
|
|
13525
13577
|
if (def.when) {
|
|
13526
13578
|
throw new ZodCompileUnsupportedError(`check with a custom "when" condition`);
|
|
13527
13579
|
}
|
|
13528
|
-
doc.write(
|
|
13580
|
+
doc.write(`if (${accessor} == null) return INVALID;`);
|
|
13529
13581
|
const shape = def.shape;
|
|
13530
13582
|
for (const key of Reflect.ownKeys(shape)) {
|
|
13531
13583
|
const keyExpr = typeof key === "symbol" ? addConstant(ctx, key) : esc(key);
|
|
@@ -13615,7 +13667,7 @@ var PATTERN_IS_COMPLETE = /* @__PURE__ */ new Set([
|
|
|
13615
13667
|
"uuid",
|
|
13616
13668
|
"xid"
|
|
13617
13669
|
]);
|
|
13618
|
-
function generateStringFormatCheck(doc, ctx, def, accessor) {
|
|
13670
|
+
function generateStringFormatCheck(doc, ctx, def, accessor, needsValue = true) {
|
|
13619
13671
|
const fmt = def.format;
|
|
13620
13672
|
if (fmt === "base64") {
|
|
13621
13673
|
const validator = addConstant(ctx, isValidBase64);
|
|
@@ -13655,7 +13707,7 @@ function generateStringFormatCheck(doc, ctx, def, accessor) {
|
|
|
13655
13707
|
}
|
|
13656
13708
|
const formatDef = def;
|
|
13657
13709
|
if (fmt === "url" || fmt === "httpurl" || formatDef.normalize || formatDef.hostname !== void 0 || formatDef.protocol !== void 0) {
|
|
13658
|
-
const parseConst = addConstant(ctx,
|
|
13710
|
+
const parseConst = addConstant(ctx, validateURL);
|
|
13659
13711
|
const defConst = addConstant(ctx, def);
|
|
13660
13712
|
const trimVar = newVar(ctx);
|
|
13661
13713
|
const urlVar = newVar(ctx);
|
|
@@ -13670,6 +13722,8 @@ function generateStringFormatCheck(doc, ctx, def, accessor) {
|
|
|
13670
13722
|
const protocolConst = addConstant(ctx, urlProtocolOk);
|
|
13671
13723
|
doc.write(`if (!${protocolConst}(${urlVar}, ${defConst}.protocol)) return INVALID;`);
|
|
13672
13724
|
}
|
|
13725
|
+
if (!needsValue)
|
|
13726
|
+
return null;
|
|
13673
13727
|
const outputVar = newVar(ctx);
|
|
13674
13728
|
const outputExpr = formatDef.normalize ? `${urlVar}.href` : `${addConstant(ctx, stripTabAndNewline)}(${trimVar})`;
|
|
13675
13729
|
doc.write(`const ${outputVar} = ${outputExpr};`);
|
|
@@ -13729,7 +13783,7 @@ function generateCheck(doc, ctx, schema, accessor, needsValue = true) {
|
|
|
13729
13783
|
let typeAccessor;
|
|
13730
13784
|
switch (type) {
|
|
13731
13785
|
case "string":
|
|
13732
|
-
typeAccessor = generateStringCheck(doc, ctx, schema, accessor);
|
|
13786
|
+
typeAccessor = generateStringCheck(doc, ctx, schema, accessor, buildsValue);
|
|
13733
13787
|
break;
|
|
13734
13788
|
case "number":
|
|
13735
13789
|
typeAccessor = generateNumberCheck(doc, schema, accessor);
|
|
@@ -13835,10 +13889,6 @@ function generateCheck(doc, ctx, schema, accessor, needsValue = true) {
|
|
|
13835
13889
|
case "custom":
|
|
13836
13890
|
typeAccessor = generateCustomCheck(doc, ctx, schema, accessor);
|
|
13837
13891
|
break;
|
|
13838
|
-
case "properties":
|
|
13839
|
-
generatePropertiesChecks(doc, ctx, schema._zod.def, accessor, true);
|
|
13840
|
-
typeAccessor = accessor;
|
|
13841
|
-
break;
|
|
13842
13892
|
case "transform":
|
|
13843
13893
|
typeAccessor = generateTransformCheck(doc, ctx, schema, accessor);
|
|
13844
13894
|
break;
|
|
@@ -13854,12 +13904,12 @@ function generateCheck(doc, ctx, schema, accessor, needsValue = true) {
|
|
|
13854
13904
|
return null;
|
|
13855
13905
|
return generateChecks(doc, ctx, schema, typeAccessor);
|
|
13856
13906
|
}
|
|
13857
|
-
function generateStringCheck(doc, ctx, schema, accessor) {
|
|
13907
|
+
function generateStringCheck(doc, ctx, schema, accessor, needsValue = true) {
|
|
13858
13908
|
doc.write(`if (typeof ${accessor} !== "string") return INVALID;`);
|
|
13859
13909
|
const def = schema._zod.def;
|
|
13860
13910
|
if (def.format === void 0)
|
|
13861
13911
|
return accessor;
|
|
13862
|
-
return generateStringFormatCheck(doc, ctx, def, accessor);
|
|
13912
|
+
return generateStringFormatCheck(doc, ctx, def, accessor, needsValue);
|
|
13863
13913
|
}
|
|
13864
13914
|
function generateNumberCheck(doc, schema, accessor) {
|
|
13865
13915
|
doc.write(`if (typeof ${accessor} !== "number" || !Number.isFinite(${accessor})) return INVALID;`);
|
|
@@ -13977,7 +14027,7 @@ function generateObjectCheck(doc, ctx, schema, accessor, buildsValue = true) {
|
|
|
13977
14027
|
}
|
|
13978
14028
|
}
|
|
13979
14029
|
const outputVar = newVar(ctx);
|
|
13980
|
-
const hasConditionalKeys = allKeys.some((k) =>
|
|
14030
|
+
const hasConditionalKeys = allKeys.some((k) => mayOmitUndefined(propShape[k]) || dropsWhenAbsent(propShape[k]));
|
|
13981
14031
|
if (!buildsValue) {
|
|
13982
14032
|
if (unknownKeysMode === "schema") {
|
|
13983
14033
|
const knownSet = keys.length > 0 ? addConstant(ctx, new Set(keys)) : null;
|
|
@@ -14004,7 +14054,7 @@ function generateObjectCheck(doc, ctx, schema, accessor, buildsValue = true) {
|
|
|
14004
14054
|
const out = propOutputs.get(k);
|
|
14005
14055
|
if (dropsWhenAbsent(propShape[k])) {
|
|
14006
14056
|
doc.write(`if (${kx} in ${accessor}) ${outputVar}[${kx}] = ${out};`);
|
|
14007
|
-
} else if (
|
|
14057
|
+
} else if (mayOmitUndefined(propShape[k])) {
|
|
14008
14058
|
doc.write(`if (${out} !== undefined || ${kx} in ${accessor}) ${outputVar}[${kx}] = ${out};`);
|
|
14009
14059
|
} else {
|
|
14010
14060
|
doc.write(`${outputVar}[${kx}] = ${out};`);
|
|
@@ -14137,6 +14187,9 @@ function fastPathAcceptsAbsence(schema) {
|
|
|
14137
14187
|
function dropsWhenAbsent(schema) {
|
|
14138
14188
|
return schema._zod.optin === "optional" && schema._zod.optout === "optional";
|
|
14139
14189
|
}
|
|
14190
|
+
function mayOmitUndefined(schema) {
|
|
14191
|
+
return (schema._zod.optin !== "defaulted" || schema._zod.optout === "optional") && mayOutputUndefined(schema);
|
|
14192
|
+
}
|
|
14140
14193
|
function mayOutputUndefined(schema) {
|
|
14141
14194
|
const def = schema._zod.def;
|
|
14142
14195
|
switch (def.type) {
|
|
@@ -14756,20 +14809,18 @@ function generateTransformCheck(doc, ctx, schema, accessor) {
|
|
|
14756
14809
|
}
|
|
14757
14810
|
|
|
14758
14811
|
// ../../node_modules/zod/v4/core/api.js
|
|
14812
|
+
function snapshotChecks(def) {
|
|
14813
|
+
if (def.checks)
|
|
14814
|
+
def.checks = [...def.checks];
|
|
14815
|
+
return def;
|
|
14816
|
+
}
|
|
14759
14817
|
// @__NO_SIDE_EFFECTS__
|
|
14760
14818
|
function _string(Class2, params) {
|
|
14761
|
-
return new Class2({
|
|
14762
|
-
type: "string",
|
|
14763
|
-
...normalizeParams(params)
|
|
14764
|
-
});
|
|
14819
|
+
return new Class2(snapshotChecks({ type: "string", ...normalizeParams(params) }));
|
|
14765
14820
|
}
|
|
14766
14821
|
// @__NO_SIDE_EFFECTS__
|
|
14767
14822
|
function _coercedString(Class2, params) {
|
|
14768
|
-
return new Class2({
|
|
14769
|
-
type: "string",
|
|
14770
|
-
coerce: true,
|
|
14771
|
-
...normalizeParams(params)
|
|
14772
|
-
});
|
|
14823
|
+
return new Class2(snapshotChecks({ type: "string", coerce: true, ...normalizeParams(params) }));
|
|
14773
14824
|
}
|
|
14774
14825
|
// @__NO_SIDE_EFFECTS__
|
|
14775
14826
|
function _email(Class2, params) {
|
|
@@ -15073,20 +15124,11 @@ function _isoDuration(Class2, params) {
|
|
|
15073
15124
|
}
|
|
15074
15125
|
// @__NO_SIDE_EFFECTS__
|
|
15075
15126
|
function _number(Class2, params) {
|
|
15076
|
-
return new Class2({
|
|
15077
|
-
type: "number",
|
|
15078
|
-
checks: [],
|
|
15079
|
-
...normalizeParams(params)
|
|
15080
|
-
});
|
|
15127
|
+
return new Class2(snapshotChecks({ type: "number", checks: [], ...normalizeParams(params) }));
|
|
15081
15128
|
}
|
|
15082
15129
|
// @__NO_SIDE_EFFECTS__
|
|
15083
15130
|
function _coercedNumber(Class2, params) {
|
|
15084
|
-
return new Class2({
|
|
15085
|
-
type: "number",
|
|
15086
|
-
coerce: true,
|
|
15087
|
-
checks: [],
|
|
15088
|
-
...normalizeParams(params)
|
|
15089
|
-
});
|
|
15131
|
+
return new Class2(snapshotChecks({ type: "number", coerce: true, checks: [], ...normalizeParams(params) }));
|
|
15090
15132
|
}
|
|
15091
15133
|
// @__NO_SIDE_EFFECTS__
|
|
15092
15134
|
function _int(Class2, params) {
|
|
@@ -15428,9 +15470,8 @@ function _property(property, schema, params) {
|
|
|
15428
15470
|
});
|
|
15429
15471
|
}
|
|
15430
15472
|
// @__NO_SIDE_EFFECTS__
|
|
15431
|
-
function _properties(
|
|
15432
|
-
return new
|
|
15433
|
-
type: "properties",
|
|
15473
|
+
function _properties(shape, params) {
|
|
15474
|
+
return new $ZodCheckProperties({
|
|
15434
15475
|
check: "properties",
|
|
15435
15476
|
shape,
|
|
15436
15477
|
...normalizeParams(params)
|
|
@@ -16065,11 +16106,11 @@ function foldObjects(members2) {
|
|
|
16065
16106
|
}
|
|
16066
16107
|
objects.push(member);
|
|
16067
16108
|
}
|
|
16068
|
-
const
|
|
16109
|
+
const properties = {};
|
|
16069
16110
|
const required2 = /* @__PURE__ */ new Set();
|
|
16070
16111
|
for (const object2 of objects) {
|
|
16071
16112
|
for (const key in object2.properties) {
|
|
16072
|
-
if (Object.prototype.hasOwnProperty.call(
|
|
16113
|
+
if (Object.prototype.hasOwnProperty.call(properties, key))
|
|
16073
16114
|
continue;
|
|
16074
16115
|
const parts = [];
|
|
16075
16116
|
for (const other of objects) {
|
|
@@ -16080,12 +16121,12 @@ function foldObjects(members2) {
|
|
|
16080
16121
|
parts.push(part);
|
|
16081
16122
|
}
|
|
16082
16123
|
const merged = parts.length === 1 ? parts[0] : foldObjects(parts) ?? { allOf: parts };
|
|
16083
|
-
assignProp(
|
|
16124
|
+
assignProp(properties, key, merged);
|
|
16084
16125
|
}
|
|
16085
16126
|
for (const key of object2.required ?? [])
|
|
16086
16127
|
required2.add(key);
|
|
16087
16128
|
}
|
|
16088
|
-
const folded = { type: "object", properties
|
|
16129
|
+
const folded = { type: "object", properties };
|
|
16089
16130
|
if (required2.size)
|
|
16090
16131
|
folded.required = [...required2];
|
|
16091
16132
|
if (objects.every((object2) => object2.additionalProperties === false)) {
|
|
@@ -16707,17 +16748,15 @@ var objectProcessor = (schema, ctx, _json, params) => {
|
|
|
16707
16748
|
path: [...params.path, "properties", key]
|
|
16708
16749
|
}));
|
|
16709
16750
|
}
|
|
16710
|
-
const
|
|
16711
|
-
const
|
|
16751
|
+
const requiredKeys = [];
|
|
16752
|
+
for (const key of Object.keys(shape)) {
|
|
16712
16753
|
const field = def.shape[key];
|
|
16713
|
-
if (ctx.io === "input") {
|
|
16714
|
-
|
|
16715
|
-
} else {
|
|
16716
|
-
return field._zod.optout === void 0;
|
|
16754
|
+
if (ctx.io === "input" ? inputOptin(field) === void 0 : field._zod.optout === void 0) {
|
|
16755
|
+
requiredKeys.push(key);
|
|
16717
16756
|
}
|
|
16718
|
-
}
|
|
16719
|
-
if (requiredKeys.
|
|
16720
|
-
json2.required =
|
|
16757
|
+
}
|
|
16758
|
+
if (requiredKeys.length > 0) {
|
|
16759
|
+
json2.required = requiredKeys;
|
|
16721
16760
|
}
|
|
16722
16761
|
if (def.catchall?._zod.def.type === "never") {
|
|
16723
16762
|
json2.additionalProperties = false;
|
|
@@ -16731,31 +16770,6 @@ var objectProcessor = (schema, ctx, _json, params) => {
|
|
|
16731
16770
|
});
|
|
16732
16771
|
}
|
|
16733
16772
|
};
|
|
16734
|
-
var propertiesProcessor = (schema, ctx, _json, params) => {
|
|
16735
|
-
const json2 = _json;
|
|
16736
|
-
const def = schema._zod.def;
|
|
16737
|
-
if (Object.getOwnPropertySymbols(def.shape).length && handleUnrepresentable(schema, ctx, json2, params, "Symbol keys cannot be represented in JSON Schema")) {
|
|
16738
|
-
return;
|
|
16739
|
-
}
|
|
16740
|
-
if (ctx.io === "output") {
|
|
16741
|
-
for (const key in def.shape) {
|
|
16742
|
-
if (isTransforming(def.shape[key]) && handleUnrepresentable(schema, ctx, json2, params, `z.properties() returns its input, so the output of a transforming schema at key "${key}" cannot be represented in JSON Schema`)) {
|
|
16743
|
-
return;
|
|
16744
|
-
}
|
|
16745
|
-
}
|
|
16746
|
-
}
|
|
16747
|
-
json2.type = "object";
|
|
16748
|
-
json2.properties = {};
|
|
16749
|
-
for (const key in def.shape) {
|
|
16750
|
-
assignProp(json2.properties, key, processSchema(def.shape[key], ctx, {
|
|
16751
|
-
...params,
|
|
16752
|
-
path: [...params.path, "properties", key]
|
|
16753
|
-
}));
|
|
16754
|
-
}
|
|
16755
|
-
const required2 = Object.keys(def.shape).filter((key) => inputOptin(def.shape[key]) === void 0);
|
|
16756
|
-
if (required2.length > 0)
|
|
16757
|
-
json2.required = required2;
|
|
16758
|
-
};
|
|
16759
16773
|
var unionProcessor = (schema, ctx, json2, params) => {
|
|
16760
16774
|
const def = schema._zod.def;
|
|
16761
16775
|
const isExclusive = def.inclusive === false;
|
|
@@ -17075,7 +17089,6 @@ var allProcessors = {
|
|
|
17075
17089
|
file: fileProcessor,
|
|
17076
17090
|
success: successProcessor,
|
|
17077
17091
|
custom: customProcessor,
|
|
17078
|
-
properties: propertiesProcessor,
|
|
17079
17092
|
function: functionProcessor,
|
|
17080
17093
|
transform: transformProcessor,
|
|
17081
17094
|
map: mapProcessor,
|
|
@@ -17272,7 +17285,6 @@ __export(schemas_exports2, {
|
|
|
17272
17285
|
ZodPrefault: () => ZodPrefault,
|
|
17273
17286
|
ZodPreprocess: () => ZodPreprocess,
|
|
17274
17287
|
ZodPromise: () => ZodPromise,
|
|
17275
|
-
ZodProperties: () => ZodProperties,
|
|
17276
17288
|
ZodReadonly: () => ZodReadonly,
|
|
17277
17289
|
ZodRecord: () => ZodRecord,
|
|
17278
17290
|
ZodSet: () => ZodSet,
|
|
@@ -17310,6 +17322,7 @@ __export(schemas_exports2, {
|
|
|
17310
17322
|
creditCard: () => creditCard2,
|
|
17311
17323
|
cuid: () => cuid3,
|
|
17312
17324
|
cuid2: () => cuid22,
|
|
17325
|
+
currencyCode: () => currencyCode2,
|
|
17313
17326
|
custom: () => custom,
|
|
17314
17327
|
date: () => date2,
|
|
17315
17328
|
describe: () => describe2,
|
|
@@ -17364,7 +17377,6 @@ __export(schemas_exports2, {
|
|
|
17364
17377
|
prefault: () => prefault,
|
|
17365
17378
|
preprocess: () => preprocess,
|
|
17366
17379
|
promise: () => promise,
|
|
17367
|
-
properties: () => properties,
|
|
17368
17380
|
readonly: () => readonly,
|
|
17369
17381
|
record: () => record,
|
|
17370
17382
|
refine: () => refine,
|
|
@@ -17418,6 +17430,7 @@ __export(checks_exports2, {
|
|
|
17418
17430
|
normalize: () => _normalize,
|
|
17419
17431
|
overwrite: () => _overwrite,
|
|
17420
17432
|
positive: () => _positive,
|
|
17433
|
+
properties: () => _properties,
|
|
17421
17434
|
property: () => _property,
|
|
17422
17435
|
regex: () => _regex,
|
|
17423
17436
|
size: () => _size,
|
|
@@ -17877,8 +17890,8 @@ function url(params) {
|
|
|
17877
17890
|
}
|
|
17878
17891
|
function httpUrl(params) {
|
|
17879
17892
|
return _url(ZodURL, {
|
|
17880
|
-
protocol:
|
|
17881
|
-
hostname:
|
|
17893
|
+
protocol: httpProtocol,
|
|
17894
|
+
hostname: domain,
|
|
17882
17895
|
...util_exports.normalizeParams(params)
|
|
17883
17896
|
});
|
|
17884
17897
|
}
|
|
@@ -18016,10 +18029,13 @@ function stringFormat(format, fnOrRegex, _params = {}) {
|
|
|
18016
18029
|
return _stringFormat(ZodCustomStringFormat, format, fnOrRegex, _params);
|
|
18017
18030
|
}
|
|
18018
18031
|
function hostname2(_params) {
|
|
18019
|
-
return _stringFormat(ZodCustomStringFormat, "hostname",
|
|
18032
|
+
return _stringFormat(ZodCustomStringFormat, "hostname", hostname, _params);
|
|
18020
18033
|
}
|
|
18021
18034
|
function hex2(_params) {
|
|
18022
|
-
return _stringFormat(ZodCustomStringFormat, "hex",
|
|
18035
|
+
return _stringFormat(ZodCustomStringFormat, "hex", hex, _params);
|
|
18036
|
+
}
|
|
18037
|
+
function currencyCode2(_params) {
|
|
18038
|
+
return _stringFormat(ZodCustomStringFormat, "currency_code", currencyCode, _params);
|
|
18023
18039
|
}
|
|
18024
18040
|
function hash(alg, params) {
|
|
18025
18041
|
const enc = params?.enc ?? "hex";
|
|
@@ -18884,14 +18900,6 @@ var ZodCustom = /* @__PURE__ */ $constructor("ZodCustom", (inst, def) => {
|
|
|
18884
18900
|
ZodType.init(inst, def);
|
|
18885
18901
|
inst._zod.processJSONSchema = (ctx, json2, params) => customProcessor(inst, ctx, json2, params);
|
|
18886
18902
|
});
|
|
18887
|
-
var ZodProperties = /* @__PURE__ */ $constructor("ZodProperties", (inst, def) => {
|
|
18888
|
-
_ensureDefaultMemoizer();
|
|
18889
|
-
$ZodProperties.init(inst, def);
|
|
18890
|
-
ZodType.init(inst, def);
|
|
18891
|
-
});
|
|
18892
|
-
function properties(shape, params) {
|
|
18893
|
-
return _properties(ZodProperties, shape, params);
|
|
18894
|
-
}
|
|
18895
18903
|
function check(fn) {
|
|
18896
18904
|
const ch = new $ZodCheck({
|
|
18897
18905
|
check: "custom"
|
|
@@ -18915,7 +18923,7 @@ var ZodInstanceOf = /* @__PURE__ */ $constructor("ZodInstanceOf", (inst, def) =>
|
|
|
18915
18923
|
ZodCustom.init(inst, def);
|
|
18916
18924
|
}, {
|
|
18917
18925
|
properties(shape, params) {
|
|
18918
|
-
return this.check(
|
|
18926
|
+
return this.check(_properties(shape, params));
|
|
18919
18927
|
}
|
|
18920
18928
|
});
|
|
18921
18929
|
function _instanceof(cls, params = {}) {
|
|
@@ -19502,10 +19510,10 @@ function convertBaseSchema(schema, ctx) {
|
|
|
19502
19510
|
}
|
|
19503
19511
|
case "object": {
|
|
19504
19512
|
const shape = {};
|
|
19505
|
-
const
|
|
19513
|
+
const properties = schema.properties || {};
|
|
19506
19514
|
const requiredSet = new Set(schema.required || []);
|
|
19507
19515
|
const additionalSchema = typeof schema.additionalProperties === "object" ? convertSchema(schema.additionalProperties, ctx) : void 0;
|
|
19508
|
-
for (const [key, propSchema] of Object.entries(
|
|
19516
|
+
for (const [key, propSchema] of Object.entries(properties)) {
|
|
19509
19517
|
const propZodSchema = convertSchema(propSchema, ctx);
|
|
19510
19518
|
assignProp(shape, key, requiredSet.has(key) ? propZodSchema : propZodSchema.optional());
|
|
19511
19519
|
}
|
|
@@ -19866,18 +19874,6 @@ function visit(schema, fnOrHandlers) {
|
|
|
19866
19874
|
const { _cachedInner, ...rest } = def;
|
|
19867
19875
|
return clone(s, { ...rest, getter: () => run(original()) });
|
|
19868
19876
|
}
|
|
19869
|
-
case "properties": {
|
|
19870
|
-
const oldShape = def.shape;
|
|
19871
|
-
let changed = false;
|
|
19872
|
-
const newShape = {};
|
|
19873
|
-
for (const k of Reflect.ownKeys(oldShape)) {
|
|
19874
|
-
const mapped = run(oldShape[k]);
|
|
19875
|
-
if (mapped !== oldShape[k])
|
|
19876
|
-
changed = true;
|
|
19877
|
-
newShape[k] = mapped;
|
|
19878
|
-
}
|
|
19879
|
-
return changed ? clone(s, { ...def, shape: newShape }) : s;
|
|
19880
|
-
}
|
|
19881
19877
|
// A leaf by choice: `parts` are regex fragments, not data positions.
|
|
19882
19878
|
case "template_literal":
|
|
19883
19879
|
// Leaves.
|
|
@@ -20133,6 +20129,9 @@ var ReleaseAgentRequestSchema = external_exports.object({
|
|
|
20133
20129
|
delete_agent: external_exports.boolean().optional(),
|
|
20134
20130
|
expected_token_hash: external_exports.string().regex(AGENT_TOKEN_HASH_PATTERN).optional()
|
|
20135
20131
|
});
|
|
20132
|
+
var ExactReleaseAgentRequestSchema = ReleaseAgentRequestSchema.extend({
|
|
20133
|
+
expected_agent_id: external_exports.string().min(1)
|
|
20134
|
+
});
|
|
20136
20135
|
|
|
20137
20136
|
// ../../node_modules/@relaycast/types/dist/message.js
|
|
20138
20137
|
var HeaderBlockSchema = external_exports.object({
|
|
@@ -21461,9 +21460,11 @@ var AgentRegisterReplyDataSchema = external_exports.object({
|
|
|
21461
21460
|
// Returned only to nodes that advertise FLEET_DELIVERY_CURSOR_CAPABILITY.
|
|
21462
21461
|
delivery_ack_seq: external_exports.number().int().nonnegative().optional()
|
|
21463
21462
|
}).strict();
|
|
21463
|
+
var NODE_REGISTRATION_CONTRACT_V1 = "relay:node-registration-v1";
|
|
21464
21464
|
var NodeRegisterReplyDataSchema = external_exports.object({
|
|
21465
21465
|
provider: FleetProviderIdentitySchema,
|
|
21466
|
-
accepted_capabilities: external_exports.array(FleetCapabilityAcceptanceSchema)
|
|
21466
|
+
accepted_capabilities: external_exports.array(FleetCapabilityAcceptanceSchema),
|
|
21467
|
+
registration_contract: external_exports.literal(NODE_REGISTRATION_CONTRACT_V1).optional()
|
|
21467
21468
|
}).passthrough();
|
|
21468
21469
|
var FleetReplyMessageSchema = external_exports.object({
|
|
21469
21470
|
...FleetResponseEnvelopeFields,
|
|
@@ -22937,6 +22938,7 @@ var RelayError = class extends Error {
|
|
|
22937
22938
|
statusCode;
|
|
22938
22939
|
rawCode;
|
|
22939
22940
|
status;
|
|
22941
|
+
retryAfterMs;
|
|
22940
22942
|
constructor(code, message, options = {}) {
|
|
22941
22943
|
super(message);
|
|
22942
22944
|
this.name = "RelayError";
|
|
@@ -22945,14 +22947,15 @@ var RelayError = class extends Error {
|
|
|
22945
22947
|
this.rawCode = options.rawCode;
|
|
22946
22948
|
this.retryable = options.retryable ?? relayErrorRetryable(code, options.statusCode);
|
|
22947
22949
|
this.status = options.statusCode ?? 0;
|
|
22950
|
+
this.retryAfterMs = options.retryAfterMs;
|
|
22948
22951
|
if (options.cause !== void 0) {
|
|
22949
22952
|
this.cause = options.cause;
|
|
22950
22953
|
}
|
|
22951
22954
|
}
|
|
22952
22955
|
};
|
|
22953
|
-
function relayErrorFromApi(rawCode, message, statusCode) {
|
|
22956
|
+
function relayErrorFromApi(rawCode, message, statusCode, retryAfterMs) {
|
|
22954
22957
|
const code = normalizeRelayErrorCode(rawCode, statusCode);
|
|
22955
|
-
return new RelayError(code, message, { statusCode, rawCode });
|
|
22958
|
+
return new RelayError(code, message, { statusCode, rawCode, retryAfterMs });
|
|
22956
22959
|
}
|
|
22957
22960
|
|
|
22958
22961
|
// ../../node_modules/@relaycast/sdk/dist/client.js
|
|
@@ -22980,6 +22983,7 @@ var DEFAULT_RETRY_POLICY = {
|
|
|
22980
22983
|
jitter: true,
|
|
22981
22984
|
retryOn: [429, 500, 502, 503, 504]
|
|
22982
22985
|
};
|
|
22986
|
+
var MAX_AUTOMATIC_RETRY_DELAY_MS = 6e4;
|
|
22983
22987
|
function normalizeRetryPolicy(input2) {
|
|
22984
22988
|
return {
|
|
22985
22989
|
maxRetries: Number.isFinite(input2?.maxRetries) ? Math.max(0, Math.floor(input2.maxRetries)) : DEFAULT_RETRY_POLICY.maxRetries,
|
|
@@ -22997,7 +23001,7 @@ function computeBackoffMs(policy, retryAttempt) {
|
|
|
22997
23001
|
return Math.max(0, Math.round(exponential * jitterFactor));
|
|
22998
23002
|
}
|
|
22999
23003
|
function parseRetryAfterMs(res) {
|
|
23000
|
-
const header = res.headers
|
|
23004
|
+
const header = res.headers?.get("Retry-After");
|
|
23001
23005
|
if (!header)
|
|
23002
23006
|
return null;
|
|
23003
23007
|
const asSeconds = Number(header);
|
|
@@ -23115,7 +23119,9 @@ var HttpClient = class _HttpClient {
|
|
|
23115
23119
|
if (hasBody)
|
|
23116
23120
|
headers["Content-Type"] = "application/json";
|
|
23117
23121
|
const wireBody = hasBody ? decamelizeKeys(body) : void 0;
|
|
23118
|
-
const
|
|
23122
|
+
const idempotencyKey = Object.entries(headers).find(([name]) => name.toLowerCase() === "idempotency-key")?.[1];
|
|
23123
|
+
const isUnsafeMutation = ["POST", "PATCH"].includes(method.toUpperCase()) && !idempotencyKey;
|
|
23124
|
+
const maxRetries = options?.retry === false || isUnsafeMutation ? 0 : this._retryPolicy.maxRetries;
|
|
23119
23125
|
let attempt = 0;
|
|
23120
23126
|
while (true) {
|
|
23121
23127
|
let res;
|
|
@@ -23135,7 +23141,7 @@ var HttpClient = class _HttpClient {
|
|
|
23135
23141
|
throw new RelayError("transport_error", `Network request failed: ${err instanceof Error ? err.message : "unknown error"}`, { retryable: true, cause: err });
|
|
23136
23142
|
}
|
|
23137
23143
|
if (this._retryPolicy.retryOn.includes(res.status) && attempt < maxRetries) {
|
|
23138
|
-
const waitMs =
|
|
23144
|
+
const waitMs = Math.min(parseRetryAfterMs(res) ?? computeBackoffMs(this._retryPolicy, attempt), MAX_AUTOMATIC_RETRY_DELAY_MS);
|
|
23139
23145
|
attempt += 1;
|
|
23140
23146
|
await sleep(waitMs);
|
|
23141
23147
|
continue;
|
|
@@ -23160,7 +23166,7 @@ var HttpClient = class _HttpClient {
|
|
|
23160
23166
|
const errParsed = ApiErrorSchema.safeParse(json2);
|
|
23161
23167
|
const code = errParsed.success ? errParsed.data.error.code : "unknown_error";
|
|
23162
23168
|
const message = errParsed.success ? errParsed.data.error.message : "Unknown error";
|
|
23163
|
-
throw relayErrorFromApi(code, message, res.status);
|
|
23169
|
+
throw relayErrorFromApi(code, message, res.status, parseRetryAfterMs(res) ?? void 0);
|
|
23164
23170
|
}
|
|
23165
23171
|
const data = envelope.data.data;
|
|
23166
23172
|
const parsedData = options?.schema ? options.schema.parse(data) : data;
|
|
@@ -23678,6 +23684,18 @@ var RelayCast = class _RelayCast {
|
|
|
23678
23684
|
resolveIdentity: () => this.resolveIdentity(),
|
|
23679
23685
|
spawn: (data) => this.client.post("/v1/agents/spawn", data),
|
|
23680
23686
|
release: (data) => this.client.post("/v1/agents/release", data),
|
|
23687
|
+
/**
|
|
23688
|
+
* Atomically release only the exact immutable agent identity. The key is
|
|
23689
|
+
* deliberately mandatory: callers persist and reuse it across restarts.
|
|
23690
|
+
*/
|
|
23691
|
+
releaseExact: (data, options) => {
|
|
23692
|
+
const idempotencyKey = options.idempotencyKey.trim();
|
|
23693
|
+
if (!idempotencyKey)
|
|
23694
|
+
throw new Error("idempotencyKey is required for exact agent release");
|
|
23695
|
+
return this.client.post("/v1/agents/release-exact", data, {
|
|
23696
|
+
headers: { "Idempotency-Key": idempotencyKey }
|
|
23697
|
+
});
|
|
23698
|
+
},
|
|
23681
23699
|
events: {
|
|
23682
23700
|
emit: (name, data) => this.client.post(`/v1/agents/${encodeURIComponent(name)}/events`, data),
|
|
23683
23701
|
list: (name, query) => {
|
|
@@ -23719,6 +23737,26 @@ var RelayCast = class _RelayCast {
|
|
|
23719
23737
|
params.capability = query.capability;
|
|
23720
23738
|
if (query?.name)
|
|
23721
23739
|
params.name = query.name;
|
|
23740
|
+
if (query?.status)
|
|
23741
|
+
params.status = query.status;
|
|
23742
|
+
return this.client.get("/v1/nodes", params);
|
|
23743
|
+
},
|
|
23744
|
+
// Explicit, bounded pagination contract for reading history (e.g. `--all`
|
|
23745
|
+
// in the Relay CLI): pages through every matching row exactly once, no
|
|
23746
|
+
// matter how many the workspace has retained, without silent truncation.
|
|
23747
|
+
// Compatible callers keep using `list()`, which never returns this shape.
|
|
23748
|
+
listHistory: (query) => {
|
|
23749
|
+
const params = { history: "true" };
|
|
23750
|
+
if (query?.capability)
|
|
23751
|
+
params.capability = query.capability;
|
|
23752
|
+
if (query?.name)
|
|
23753
|
+
params.name = query.name;
|
|
23754
|
+
if (query?.status)
|
|
23755
|
+
params.status = query.status;
|
|
23756
|
+
if (query?.cursor)
|
|
23757
|
+
params.cursor = query.cursor;
|
|
23758
|
+
if (query?.limit !== void 0)
|
|
23759
|
+
params.limit = String(query.limit);
|
|
23722
23760
|
return this.client.get("/v1/nodes", params);
|
|
23723
23761
|
},
|
|
23724
23762
|
get: (name) => this.client.get(`/v1/nodes/${encodeURIComponent(name)}`),
|
|
@@ -23913,8 +23951,8 @@ function validateObject(value, schema, path5, state) {
|
|
|
23913
23951
|
addIssue(state, appendPath(path5, key), "required property is missing");
|
|
23914
23952
|
}
|
|
23915
23953
|
}
|
|
23916
|
-
const
|
|
23917
|
-
for (const [key, childSchema] of Object.entries(
|
|
23954
|
+
const properties = schema.properties ?? {};
|
|
23955
|
+
for (const [key, childSchema] of Object.entries(properties)) {
|
|
23918
23956
|
if (Object.prototype.hasOwnProperty.call(value, key)) {
|
|
23919
23957
|
validateAgainstSchema(value[key], childSchema, appendPath(path5, key), state);
|
|
23920
23958
|
}
|
|
@@ -23924,7 +23962,7 @@ function validateObject(value, schema, path5, state) {
|
|
|
23924
23962
|
return;
|
|
23925
23963
|
}
|
|
23926
23964
|
for (const key of Object.keys(value)) {
|
|
23927
|
-
if (Object.prototype.hasOwnProperty.call(
|
|
23965
|
+
if (Object.prototype.hasOwnProperty.call(properties, key)) {
|
|
23928
23966
|
continue;
|
|
23929
23967
|
}
|
|
23930
23968
|
if (additional === false) {
|
|
@@ -25780,6 +25818,7 @@ function normalizeActionInvocationAck(raw) {
|
|
|
25780
25818
|
...readStr(record2, "handlerNodeId", "handler_node_id") ? { handlerNodeId: readStr(record2, "handlerNodeId", "handler_node_id") } : {},
|
|
25781
25819
|
...readStr(record2, "dispatchedNodeId", "dispatched_node_id") ? { dispatchedNodeId: readStr(record2, "dispatchedNodeId", "dispatched_node_id") } : {},
|
|
25782
25820
|
...readRecord(record2, "input") ? { input: readRecord(record2, "input") } : {},
|
|
25821
|
+
...readRecord(record2, "output") ? { output: readRecord(record2, "output") } : {},
|
|
25783
25822
|
...readStr(record2, "status") ? { status: readStr(record2, "status") } : {},
|
|
25784
25823
|
...readStr(record2, "createdAt", "created_at") ? { createdAt: readStr(record2, "createdAt", "created_at") } : {}
|
|
25785
25824
|
};
|
|
@@ -25859,12 +25898,39 @@ function createRelaycastClient(options) {
|
|
|
25859
25898
|
}
|
|
25860
25899
|
|
|
25861
25900
|
// ../sdk/dist/messaging/relaycast-placement.js
|
|
25901
|
+
var DISPATCH_EVIDENT_STATUSES = /* @__PURE__ */ new Set([
|
|
25902
|
+
"dispatched",
|
|
25903
|
+
"invoked",
|
|
25904
|
+
"running",
|
|
25905
|
+
"completed",
|
|
25906
|
+
"succeeded",
|
|
25907
|
+
"success"
|
|
25908
|
+
]);
|
|
25909
|
+
var NOT_DISPATCHED_STATUSES = /* @__PURE__ */ new Set(["pending", "queued"]);
|
|
25910
|
+
function resolveDispatchState(ack) {
|
|
25911
|
+
if (ack.dispatchedNodeId || ack.handlerNodeId)
|
|
25912
|
+
return "dispatched";
|
|
25913
|
+
const status = ack.status?.toLowerCase();
|
|
25914
|
+
if (status && DISPATCH_EVIDENT_STATUSES.has(status))
|
|
25915
|
+
return "dispatched";
|
|
25916
|
+
if (status && NOT_DISPATCHED_STATUSES.has(status))
|
|
25917
|
+
return "not_dispatched";
|
|
25918
|
+
return "unknown";
|
|
25919
|
+
}
|
|
25862
25920
|
var RelayPlacementError = class extends Error {
|
|
25863
25921
|
code;
|
|
25864
25922
|
capability;
|
|
25865
25923
|
node;
|
|
25866
25924
|
repo;
|
|
25867
25925
|
attempts;
|
|
25926
|
+
/** Stable invocation correlation for accepted/dispatch outcomes. */
|
|
25927
|
+
invocationId;
|
|
25928
|
+
/** Evidence state at the point this placement returned or failed. */
|
|
25929
|
+
state;
|
|
25930
|
+
/** Whether the engine supplied evidence that a node received the dispatch. */
|
|
25931
|
+
dispatchState;
|
|
25932
|
+
/** Original invocation receipt, when a terminal spawn result was observed. */
|
|
25933
|
+
receipt;
|
|
25868
25934
|
constructor(code, message, context) {
|
|
25869
25935
|
super(message);
|
|
25870
25936
|
this.name = "RelayPlacementError";
|
|
@@ -25873,6 +25939,10 @@ var RelayPlacementError = class extends Error {
|
|
|
25873
25939
|
this.node = context.node;
|
|
25874
25940
|
this.repo = context.repo;
|
|
25875
25941
|
this.attempts = context.attempts;
|
|
25942
|
+
this.invocationId = context.invocationId;
|
|
25943
|
+
this.state = context.state;
|
|
25944
|
+
this.dispatchState = context.dispatchState;
|
|
25945
|
+
this.receipt = context.receipt;
|
|
25876
25946
|
}
|
|
25877
25947
|
};
|
|
25878
25948
|
function nonEmptyPlacement(value, label) {
|
|
@@ -25918,6 +25988,9 @@ var DEFAULT_CONFIRM_POLL_MS = 500;
|
|
|
25918
25988
|
var MAX_CONFIRM_TIMEOUT_MS = 2147483647;
|
|
25919
25989
|
var CONFIRM_SUCCESS_STATUSES = /* @__PURE__ */ new Set(["completed", "succeeded", "success"]);
|
|
25920
25990
|
var CONFIRM_FAILURE_STATUSES = /* @__PURE__ */ new Set(["failed", "error", "denied", "cancelled", "canceled"]);
|
|
25991
|
+
function hasExplicitSpawnReadinessProof(value) {
|
|
25992
|
+
return value.output?.spawned === true && value.output?.ready === true;
|
|
25993
|
+
}
|
|
25921
25994
|
var READ_TIMED_OUT = /* @__PURE__ */ Symbol("relay.confirm.readTimedOut");
|
|
25922
25995
|
function confirmDurationMs(value, fallback, max) {
|
|
25923
25996
|
return typeof value === "number" && Number.isFinite(value) && value > 0 ? Math.min(value, max) : fallback;
|
|
@@ -26330,6 +26403,32 @@ var RelaycastMessagingClient = class {
|
|
|
26330
26403
|
const ack = await this.commands.invoke(actionName, actionInput);
|
|
26331
26404
|
const placedNode = clientMustTarget ? decision.node : await this.resolvePlacementAckNode(ack, capability);
|
|
26332
26405
|
const placedNodeLabel = placedNode?.name ?? ack.dispatchedNodeId ?? ack.handlerNodeId ?? "engine-selected node";
|
|
26406
|
+
const ackStatus = ack.status?.toLowerCase();
|
|
26407
|
+
if (ackStatus && CONFIRM_FAILURE_STATUSES.has(ackStatus)) {
|
|
26408
|
+
throw new RelayPlacementError("spawn_failed", `node '${placedNodeLabel}' reported ${ackStatus} for ${actionName} immediately upon dispatch`, {
|
|
26409
|
+
capability,
|
|
26410
|
+
node: placedNodeLabel,
|
|
26411
|
+
repo,
|
|
26412
|
+
attempts,
|
|
26413
|
+
state: "failed",
|
|
26414
|
+
dispatchState: resolveDispatchState(ack),
|
|
26415
|
+
invocationId: ack.invocationId,
|
|
26416
|
+
receipt: ack
|
|
26417
|
+
});
|
|
26418
|
+
}
|
|
26419
|
+
const ackOutput = ack.output;
|
|
26420
|
+
if (!input2.confirm && capability.startsWith("spawn:") && ackStatus && CONFIRM_SUCCESS_STATUSES.has(ackStatus) && !hasExplicitSpawnReadinessProof({ output: ackOutput })) {
|
|
26421
|
+
throw new RelayPlacementError("spawn_failed", `node '${placedNodeLabel}' reported ${ackStatus} for ${actionName} without explicit spawned:true and ready:true proof`, {
|
|
26422
|
+
capability,
|
|
26423
|
+
node: placedNodeLabel,
|
|
26424
|
+
repo,
|
|
26425
|
+
attempts,
|
|
26426
|
+
state: "failed",
|
|
26427
|
+
dispatchState: resolveDispatchState(ack),
|
|
26428
|
+
invocationId: ack.invocationId,
|
|
26429
|
+
receipt: ack
|
|
26430
|
+
});
|
|
26431
|
+
}
|
|
26333
26432
|
const confirmation = input2.confirm ? await this.confirmPlacementInvocation(actionName, ack, {
|
|
26334
26433
|
capability,
|
|
26335
26434
|
node: placedNodeLabel,
|
|
@@ -26349,7 +26448,8 @@ var RelaycastMessagingClient = class {
|
|
|
26349
26448
|
...repo ? { repo } : {},
|
|
26350
26449
|
attempts,
|
|
26351
26450
|
queued,
|
|
26352
|
-
confirmed: Boolean(confirmation)
|
|
26451
|
+
confirmed: Boolean(confirmation),
|
|
26452
|
+
state: confirmation ? "ready" : "accepted"
|
|
26353
26453
|
},
|
|
26354
26454
|
...confirmation ? { confirmation } : {}
|
|
26355
26455
|
};
|
|
@@ -26433,13 +26533,19 @@ var RelaycastMessagingClient = class {
|
|
|
26433
26533
|
async confirmPlacementInvocation(actionName, ack, context) {
|
|
26434
26534
|
const { timeoutMs, pollIntervalMs, ...errorContext } = context;
|
|
26435
26535
|
const invocationId = ack.invocationId;
|
|
26536
|
+
const dispatchState = resolveDispatchState(ack);
|
|
26436
26537
|
if (!invocationId) {
|
|
26437
|
-
throw new RelayPlacementError("spawn_unconfirmed", `node '${context.node}' accepted ${actionName} without returning an invocation id, so the dispatch cannot be confirmed`, errorContext);
|
|
26538
|
+
throw new RelayPlacementError("spawn_unconfirmed", `node '${context.node}' accepted ${actionName} without returning an invocation id, so the dispatch cannot be confirmed`, { ...errorContext, state: "unconfirmed_may_be_running", dispatchState });
|
|
26438
26539
|
}
|
|
26439
26540
|
const budgetMs = confirmDurationMs(timeoutMs, DEFAULT_CONFIRM_TIMEOUT_MS, MAX_CONFIRM_TIMEOUT_MS);
|
|
26440
26541
|
const cadenceMs = confirmDurationMs(pollIntervalMs, DEFAULT_CONFIRM_POLL_MS, budgetMs);
|
|
26441
26542
|
if (!this.agentClient?.actions) {
|
|
26442
|
-
throw new RelayPlacementError("spawn_unconfirmed", `node '${context.node}' accepted ${actionName} (invocation ${invocationId}), but confirmation requires an agent-scoped client with the actions API, so the dispatch cannot be read back`,
|
|
26543
|
+
throw new RelayPlacementError("spawn_unconfirmed", `node '${context.node}' accepted ${actionName} (invocation ${invocationId}), but confirmation requires an agent-scoped client with the actions API, so the dispatch cannot be read back`, {
|
|
26544
|
+
...errorContext,
|
|
26545
|
+
state: "unconfirmed_may_be_running",
|
|
26546
|
+
invocationId,
|
|
26547
|
+
dispatchState
|
|
26548
|
+
});
|
|
26443
26549
|
}
|
|
26444
26550
|
const deadline = Date.now() + budgetMs;
|
|
26445
26551
|
let lastReadError;
|
|
@@ -26454,10 +26560,25 @@ var RelaycastMessagingClient = class {
|
|
|
26454
26560
|
const invocation = outcome.value;
|
|
26455
26561
|
const status = invocation?.status?.toLowerCase();
|
|
26456
26562
|
if (status && CONFIRM_SUCCESS_STATUSES.has(status)) {
|
|
26563
|
+
if (errorContext.capability.startsWith("spawn:") && !hasExplicitSpawnReadinessProof(invocation)) {
|
|
26564
|
+
throw new RelayPlacementError("spawn_failed", `node '${context.node}' reported ${status} for ${actionName} without explicit spawned:true and ready:true proof`, {
|
|
26565
|
+
...errorContext,
|
|
26566
|
+
state: "failed",
|
|
26567
|
+
invocationId,
|
|
26568
|
+
dispatchState,
|
|
26569
|
+
receipt: invocation
|
|
26570
|
+
});
|
|
26571
|
+
}
|
|
26457
26572
|
return invocation;
|
|
26458
26573
|
}
|
|
26459
26574
|
if (status && CONFIRM_FAILURE_STATUSES.has(status)) {
|
|
26460
|
-
throw new RelayPlacementError("spawn_failed", invocation?.error?.trim() || `node '${context.node}' reported ${status} for ${actionName}`,
|
|
26575
|
+
throw new RelayPlacementError("spawn_failed", invocation?.error?.trim() || `node '${context.node}' reported ${status} for ${actionName}`, {
|
|
26576
|
+
...errorContext,
|
|
26577
|
+
state: "failed",
|
|
26578
|
+
invocationId,
|
|
26579
|
+
dispatchState,
|
|
26580
|
+
receipt: invocation
|
|
26581
|
+
});
|
|
26461
26582
|
}
|
|
26462
26583
|
} else {
|
|
26463
26584
|
lastReadError = outcome.error;
|
|
@@ -26465,7 +26586,12 @@ var RelaycastMessagingClient = class {
|
|
|
26465
26586
|
}
|
|
26466
26587
|
}
|
|
26467
26588
|
if (Date.now() >= deadline) {
|
|
26468
|
-
throw new RelayPlacementError("spawn_unconfirmed", `node '${context.node}' accepted ${actionName} (invocation ${invocationId}) but never reported a result within ${budgetMs}ms. The node advertised capacity and acknowledged the dispatch; nothing confirmed that it launched. Check that node's broker version, or re-run without confirmation to accept an unconfirmed dispatch.` + (lastReadError ? ` Last read error: ${lastReadError}` : ""),
|
|
26589
|
+
throw new RelayPlacementError("spawn_unconfirmed", `node '${context.node}' accepted ${actionName} (invocation ${invocationId}) but never reported a result within ${budgetMs}ms. The node advertised capacity and acknowledged the dispatch; nothing confirmed that it launched. The invocation may still be running, so do not retry blindly. Check that node's broker version, or re-run without confirmation to accept an unconfirmed dispatch.` + (lastReadError ? ` Last read error: ${lastReadError}` : ""), {
|
|
26590
|
+
...errorContext,
|
|
26591
|
+
state: "unconfirmed_may_be_running",
|
|
26592
|
+
invocationId,
|
|
26593
|
+
dispatchState
|
|
26594
|
+
});
|
|
26469
26595
|
}
|
|
26470
26596
|
await delay(Math.max(0, Math.min(cadenceMs, deadline - Date.now())));
|
|
26471
26597
|
}
|