@critical-path/svelte 0.18.10 → 0.18.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +466 -447
- package/package.json +4 -4
package/dist/index.js
CHANGED
|
@@ -1385,9 +1385,9 @@ var C = class {
|
|
|
1385
1385
|
return this._refinement((n, r) => e(n) ? !0 : (r.addIssue(typeof t == "function" ? t(n, r) : t), !1));
|
|
1386
1386
|
}
|
|
1387
1387
|
_refinement(e) {
|
|
1388
|
-
return new
|
|
1388
|
+
return new R({
|
|
1389
1389
|
schema: this,
|
|
1390
|
-
typeName:
|
|
1390
|
+
typeName: V.ZodEffects,
|
|
1391
1391
|
effect: {
|
|
1392
1392
|
type: "refinement",
|
|
1393
1393
|
refinement: e
|
|
@@ -1405,31 +1405,31 @@ var C = class {
|
|
|
1405
1405
|
};
|
|
1406
1406
|
}
|
|
1407
1407
|
optional() {
|
|
1408
|
-
return
|
|
1408
|
+
return z.create(this, this._def);
|
|
1409
1409
|
}
|
|
1410
1410
|
nullable() {
|
|
1411
|
-
return
|
|
1411
|
+
return B.create(this, this._def);
|
|
1412
1412
|
}
|
|
1413
1413
|
nullish() {
|
|
1414
1414
|
return this.nullable().optional();
|
|
1415
1415
|
}
|
|
1416
1416
|
array() {
|
|
1417
|
-
return
|
|
1417
|
+
return O.create(this);
|
|
1418
1418
|
}
|
|
1419
1419
|
promise() {
|
|
1420
|
-
return
|
|
1420
|
+
return L.create(this, this._def);
|
|
1421
1421
|
}
|
|
1422
1422
|
or(e) {
|
|
1423
|
-
return
|
|
1423
|
+
return it.create([this, e], this._def);
|
|
1424
1424
|
}
|
|
1425
1425
|
and(e) {
|
|
1426
|
-
return
|
|
1426
|
+
return st.create(this, e, this._def);
|
|
1427
1427
|
}
|
|
1428
1428
|
transform(e) {
|
|
1429
|
-
return new
|
|
1429
|
+
return new R({
|
|
1430
1430
|
...S(this._def),
|
|
1431
1431
|
schema: this,
|
|
1432
|
-
typeName:
|
|
1432
|
+
typeName: V.ZodEffects,
|
|
1433
1433
|
effect: {
|
|
1434
1434
|
type: "transform",
|
|
1435
1435
|
transform: e
|
|
@@ -1438,27 +1438,27 @@ var C = class {
|
|
|
1438
1438
|
}
|
|
1439
1439
|
default(e) {
|
|
1440
1440
|
let t = typeof e == "function" ? e : () => e;
|
|
1441
|
-
return new
|
|
1441
|
+
return new pt({
|
|
1442
1442
|
...S(this._def),
|
|
1443
1443
|
innerType: this,
|
|
1444
1444
|
defaultValue: t,
|
|
1445
|
-
typeName:
|
|
1445
|
+
typeName: V.ZodDefault
|
|
1446
1446
|
});
|
|
1447
1447
|
}
|
|
1448
1448
|
brand() {
|
|
1449
|
-
return new
|
|
1450
|
-
typeName:
|
|
1449
|
+
return new gt({
|
|
1450
|
+
typeName: V.ZodBranded,
|
|
1451
1451
|
type: this,
|
|
1452
1452
|
...S(this._def)
|
|
1453
1453
|
});
|
|
1454
1454
|
}
|
|
1455
1455
|
catch(e) {
|
|
1456
1456
|
let t = typeof e == "function" ? e : () => e;
|
|
1457
|
-
return new
|
|
1457
|
+
return new mt({
|
|
1458
1458
|
...S(this._def),
|
|
1459
1459
|
innerType: this,
|
|
1460
1460
|
catchValue: t,
|
|
1461
|
-
typeName:
|
|
1461
|
+
typeName: V.ZodCatch
|
|
1462
1462
|
});
|
|
1463
1463
|
}
|
|
1464
1464
|
describe(e) {
|
|
@@ -1469,10 +1469,10 @@ var C = class {
|
|
|
1469
1469
|
});
|
|
1470
1470
|
}
|
|
1471
1471
|
pipe(e) {
|
|
1472
|
-
return
|
|
1472
|
+
return _t.create(this, e);
|
|
1473
1473
|
}
|
|
1474
1474
|
readonly() {
|
|
1475
|
-
return
|
|
1475
|
+
return vt.create(this);
|
|
1476
1476
|
}
|
|
1477
1477
|
isOptional() {
|
|
1478
1478
|
return this.safeParse(void 0).success;
|
|
@@ -1511,7 +1511,7 @@ function qe(e, t) {
|
|
|
1511
1511
|
function Je(e, t) {
|
|
1512
1512
|
return !!((t === "v4" || !t) && Ie.test(e) || (t === "v6" || !t) && Re.test(e));
|
|
1513
1513
|
}
|
|
1514
|
-
var
|
|
1514
|
+
var Ye = class e extends C {
|
|
1515
1515
|
_parse(e) {
|
|
1516
1516
|
if (this._def.coerce && (e.data = String(e.data)), this._getType(e) !== u.string) {
|
|
1517
1517
|
let t = this._getOrReturnCtx(e);
|
|
@@ -1919,17 +1919,17 @@ var w = class e extends C {
|
|
|
1919
1919
|
return e;
|
|
1920
1920
|
}
|
|
1921
1921
|
};
|
|
1922
|
-
|
|
1922
|
+
Ye.create = (e) => new Ye({
|
|
1923
1923
|
checks: [],
|
|
1924
|
-
typeName:
|
|
1924
|
+
typeName: V.ZodString,
|
|
1925
1925
|
coerce: e?.coerce ?? !1,
|
|
1926
1926
|
...S(e)
|
|
1927
1927
|
});
|
|
1928
|
-
function
|
|
1928
|
+
function Xe(e, t) {
|
|
1929
1929
|
let n = (e.toString().split(".")[1] || "").length, r = (t.toString().split(".")[1] || "").length, i = n > r ? n : r;
|
|
1930
1930
|
return Number.parseInt(e.toFixed(i).replace(".", "")) % Number.parseInt(t.toFixed(i).replace(".", "")) / 10 ** i;
|
|
1931
1931
|
}
|
|
1932
|
-
var
|
|
1932
|
+
var Ze = class e extends C {
|
|
1933
1933
|
constructor() {
|
|
1934
1934
|
super(...arguments), this.min = this.gte, this.max = this.lte, this.step = this.multipleOf;
|
|
1935
1935
|
}
|
|
@@ -1962,7 +1962,7 @@ var Xe = class e extends C {
|
|
|
1962
1962
|
inclusive: r.inclusive,
|
|
1963
1963
|
exact: !1,
|
|
1964
1964
|
message: r.message
|
|
1965
|
-
}), n.dirty()) : r.kind === "multipleOf" ?
|
|
1965
|
+
}), n.dirty()) : r.kind === "multipleOf" ? Xe(e.data, r.value) !== 0 && (t = this._getOrReturnCtx(e, t), h(t, {
|
|
1966
1966
|
code: f.not_multiple_of,
|
|
1967
1967
|
multipleOf: r.value,
|
|
1968
1968
|
message: r.message
|
|
@@ -2088,13 +2088,13 @@ var Xe = class e extends C {
|
|
|
2088
2088
|
return Number.isFinite(t) && Number.isFinite(e);
|
|
2089
2089
|
}
|
|
2090
2090
|
};
|
|
2091
|
-
|
|
2091
|
+
Ze.create = (e) => new Ze({
|
|
2092
2092
|
checks: [],
|
|
2093
|
-
typeName:
|
|
2093
|
+
typeName: V.ZodNumber,
|
|
2094
2094
|
coerce: e?.coerce || !1,
|
|
2095
2095
|
...S(e)
|
|
2096
2096
|
});
|
|
2097
|
-
var
|
|
2097
|
+
var Qe = class e extends C {
|
|
2098
2098
|
constructor() {
|
|
2099
2099
|
super(...arguments), this.min = this.gte, this.max = this.lte;
|
|
2100
2100
|
}
|
|
@@ -2215,13 +2215,13 @@ var Ze = class e extends C {
|
|
|
2215
2215
|
return e;
|
|
2216
2216
|
}
|
|
2217
2217
|
};
|
|
2218
|
-
|
|
2218
|
+
Qe.create = (e) => new Qe({
|
|
2219
2219
|
checks: [],
|
|
2220
|
-
typeName:
|
|
2220
|
+
typeName: V.ZodBigInt,
|
|
2221
2221
|
coerce: e?.coerce ?? !1,
|
|
2222
2222
|
...S(e)
|
|
2223
2223
|
});
|
|
2224
|
-
var
|
|
2224
|
+
var $e = class extends C {
|
|
2225
2225
|
_parse(e) {
|
|
2226
2226
|
if (this._def.coerce && (e.data = !!e.data), this._getType(e) !== u.boolean) {
|
|
2227
2227
|
let t = this._getOrReturnCtx(e);
|
|
@@ -2234,12 +2234,12 @@ var Qe = class extends C {
|
|
|
2234
2234
|
return v(e.data);
|
|
2235
2235
|
}
|
|
2236
2236
|
};
|
|
2237
|
-
|
|
2238
|
-
typeName:
|
|
2237
|
+
$e.create = (e) => new $e({
|
|
2238
|
+
typeName: V.ZodBoolean,
|
|
2239
2239
|
coerce: e?.coerce || !1,
|
|
2240
2240
|
...S(e)
|
|
2241
2241
|
});
|
|
2242
|
-
var
|
|
2242
|
+
var et = class e extends C {
|
|
2243
2243
|
_parse(e) {
|
|
2244
2244
|
if (this._def.coerce && (e.data = new Date(e.data)), this._getType(e) !== u.date) {
|
|
2245
2245
|
let t = this._getOrReturnCtx(e);
|
|
@@ -2302,13 +2302,13 @@ var $e = class e extends C {
|
|
|
2302
2302
|
return e == null ? null : new Date(e);
|
|
2303
2303
|
}
|
|
2304
2304
|
};
|
|
2305
|
-
|
|
2305
|
+
et.create = (e) => new et({
|
|
2306
2306
|
checks: [],
|
|
2307
2307
|
coerce: e?.coerce || !1,
|
|
2308
|
-
typeName:
|
|
2308
|
+
typeName: V.ZodDate,
|
|
2309
2309
|
...S(e)
|
|
2310
2310
|
});
|
|
2311
|
-
var
|
|
2311
|
+
var tt = class extends C {
|
|
2312
2312
|
_parse(e) {
|
|
2313
2313
|
if (this._getType(e) !== u.symbol) {
|
|
2314
2314
|
let t = this._getOrReturnCtx(e);
|
|
@@ -2321,11 +2321,11 @@ var et = class extends C {
|
|
|
2321
2321
|
return v(e.data);
|
|
2322
2322
|
}
|
|
2323
2323
|
};
|
|
2324
|
-
|
|
2325
|
-
typeName:
|
|
2324
|
+
tt.create = (e) => new tt({
|
|
2325
|
+
typeName: V.ZodSymbol,
|
|
2326
2326
|
...S(e)
|
|
2327
2327
|
});
|
|
2328
|
-
var
|
|
2328
|
+
var w = class extends C {
|
|
2329
2329
|
_parse(e) {
|
|
2330
2330
|
if (this._getType(e) !== u.undefined) {
|
|
2331
2331
|
let t = this._getOrReturnCtx(e);
|
|
@@ -2338,11 +2338,11 @@ var T = class extends C {
|
|
|
2338
2338
|
return v(e.data);
|
|
2339
2339
|
}
|
|
2340
2340
|
};
|
|
2341
|
-
|
|
2342
|
-
typeName:
|
|
2341
|
+
w.create = (e) => new w({
|
|
2342
|
+
typeName: V.ZodUndefined,
|
|
2343
2343
|
...S(e)
|
|
2344
2344
|
});
|
|
2345
|
-
var
|
|
2345
|
+
var T = class extends C {
|
|
2346
2346
|
_parse(e) {
|
|
2347
2347
|
if (this._getType(e) !== u.null) {
|
|
2348
2348
|
let t = this._getOrReturnCtx(e);
|
|
@@ -2355,11 +2355,11 @@ var E = class extends C {
|
|
|
2355
2355
|
return v(e.data);
|
|
2356
2356
|
}
|
|
2357
2357
|
};
|
|
2358
|
-
|
|
2359
|
-
typeName:
|
|
2358
|
+
T.create = (e) => new T({
|
|
2359
|
+
typeName: V.ZodNull,
|
|
2360
2360
|
...S(e)
|
|
2361
2361
|
});
|
|
2362
|
-
var
|
|
2362
|
+
var nt = class extends C {
|
|
2363
2363
|
constructor() {
|
|
2364
2364
|
super(...arguments), this._any = !0;
|
|
2365
2365
|
}
|
|
@@ -2367,11 +2367,11 @@ var tt = class extends C {
|
|
|
2367
2367
|
return v(e.data);
|
|
2368
2368
|
}
|
|
2369
2369
|
};
|
|
2370
|
-
|
|
2371
|
-
typeName:
|
|
2370
|
+
nt.create = (e) => new nt({
|
|
2371
|
+
typeName: V.ZodAny,
|
|
2372
2372
|
...S(e)
|
|
2373
2373
|
});
|
|
2374
|
-
var
|
|
2374
|
+
var E = class extends C {
|
|
2375
2375
|
constructor() {
|
|
2376
2376
|
super(...arguments), this._unknown = !0;
|
|
2377
2377
|
}
|
|
@@ -2379,11 +2379,11 @@ var D = class extends C {
|
|
|
2379
2379
|
return v(e.data);
|
|
2380
2380
|
}
|
|
2381
2381
|
};
|
|
2382
|
-
|
|
2383
|
-
typeName:
|
|
2382
|
+
E.create = (e) => new E({
|
|
2383
|
+
typeName: V.ZodUnknown,
|
|
2384
2384
|
...S(e)
|
|
2385
2385
|
});
|
|
2386
|
-
var
|
|
2386
|
+
var D = class extends C {
|
|
2387
2387
|
_parse(e) {
|
|
2388
2388
|
let t = this._getOrReturnCtx(e);
|
|
2389
2389
|
return h(t, {
|
|
@@ -2393,11 +2393,11 @@ var O = class extends C {
|
|
|
2393
2393
|
}), _;
|
|
2394
2394
|
}
|
|
2395
2395
|
};
|
|
2396
|
-
|
|
2397
|
-
typeName:
|
|
2396
|
+
D.create = (e) => new D({
|
|
2397
|
+
typeName: V.ZodNever,
|
|
2398
2398
|
...S(e)
|
|
2399
2399
|
});
|
|
2400
|
-
var
|
|
2400
|
+
var rt = class extends C {
|
|
2401
2401
|
_parse(e) {
|
|
2402
2402
|
if (this._getType(e) !== u.undefined) {
|
|
2403
2403
|
let t = this._getOrReturnCtx(e);
|
|
@@ -2410,11 +2410,11 @@ var nt = class extends C {
|
|
|
2410
2410
|
return v(e.data);
|
|
2411
2411
|
}
|
|
2412
2412
|
};
|
|
2413
|
-
|
|
2414
|
-
typeName:
|
|
2413
|
+
rt.create = (e) => new rt({
|
|
2414
|
+
typeName: V.ZodVoid,
|
|
2415
2415
|
...S(e)
|
|
2416
2416
|
});
|
|
2417
|
-
var
|
|
2417
|
+
var O = class e extends C {
|
|
2418
2418
|
_parse(e) {
|
|
2419
2419
|
let { ctx: t, status: n } = this._processInputParams(e), r = this._def;
|
|
2420
2420
|
if (t.parsedType !== u.array) return h(t, {
|
|
@@ -2486,32 +2486,32 @@ var k = class e extends C {
|
|
|
2486
2486
|
return this.min(1, e);
|
|
2487
2487
|
}
|
|
2488
2488
|
};
|
|
2489
|
-
|
|
2489
|
+
O.create = (e, t) => new O({
|
|
2490
2490
|
type: e,
|
|
2491
2491
|
minLength: null,
|
|
2492
2492
|
maxLength: null,
|
|
2493
2493
|
exactLength: null,
|
|
2494
|
-
typeName:
|
|
2494
|
+
typeName: V.ZodArray,
|
|
2495
2495
|
...S(t)
|
|
2496
2496
|
});
|
|
2497
|
-
function
|
|
2498
|
-
if (e instanceof
|
|
2497
|
+
function k(e) {
|
|
2498
|
+
if (e instanceof A) {
|
|
2499
2499
|
let t = {};
|
|
2500
2500
|
for (let n in e.shape) {
|
|
2501
2501
|
let r = e.shape[n];
|
|
2502
|
-
t[n] =
|
|
2502
|
+
t[n] = z.create(k(r));
|
|
2503
2503
|
}
|
|
2504
|
-
return new
|
|
2504
|
+
return new A({
|
|
2505
2505
|
...e._def,
|
|
2506
2506
|
shape: () => t
|
|
2507
2507
|
});
|
|
2508
2508
|
}
|
|
2509
|
-
return e instanceof
|
|
2509
|
+
return e instanceof O ? new O({
|
|
2510
2510
|
...e._def,
|
|
2511
|
-
type:
|
|
2512
|
-
}) : e instanceof
|
|
2511
|
+
type: k(e.element)
|
|
2512
|
+
}) : e instanceof z ? z.create(k(e.unwrap())) : e instanceof B ? B.create(k(e.unwrap())) : e instanceof M ? M.create(e.items.map((e) => k(e))) : e;
|
|
2513
2513
|
}
|
|
2514
|
-
var
|
|
2514
|
+
var A = class e extends C {
|
|
2515
2515
|
constructor() {
|
|
2516
2516
|
super(...arguments), this._cached = null, this.nonstrict = this.passthrough, this.augment = this.extend;
|
|
2517
2517
|
}
|
|
@@ -2533,7 +2533,7 @@ var j = class e extends C {
|
|
|
2533
2533
|
}), _;
|
|
2534
2534
|
}
|
|
2535
2535
|
let { status: t, ctx: n } = this._processInputParams(e), { shape: r, keys: i } = this._getCached(), a = [];
|
|
2536
|
-
if (!(this._def.catchall instanceof
|
|
2536
|
+
if (!(this._def.catchall instanceof D && this._def.unknownKeys === "strip")) for (let e in n.data) i.includes(e) || a.push(e);
|
|
2537
2537
|
let o = [];
|
|
2538
2538
|
for (let e of i) {
|
|
2539
2539
|
let t = r[e], i = n.data[e];
|
|
@@ -2546,7 +2546,7 @@ var j = class e extends C {
|
|
|
2546
2546
|
alwaysSet: e in n.data
|
|
2547
2547
|
});
|
|
2548
2548
|
}
|
|
2549
|
-
if (this._def.catchall instanceof
|
|
2549
|
+
if (this._def.catchall instanceof D) {
|
|
2550
2550
|
let e = this._def.unknownKeys;
|
|
2551
2551
|
if (e === "passthrough") for (let e of a) o.push({
|
|
2552
2552
|
key: {
|
|
@@ -2632,7 +2632,7 @@ var j = class e extends C {
|
|
|
2632
2632
|
...this._def.shape(),
|
|
2633
2633
|
...t._def.shape()
|
|
2634
2634
|
}),
|
|
2635
|
-
typeName:
|
|
2635
|
+
typeName: V.ZodObject
|
|
2636
2636
|
});
|
|
2637
2637
|
}
|
|
2638
2638
|
setKey(e, t) {
|
|
@@ -2661,7 +2661,7 @@ var j = class e extends C {
|
|
|
2661
2661
|
});
|
|
2662
2662
|
}
|
|
2663
2663
|
deepPartial() {
|
|
2664
|
-
return
|
|
2664
|
+
return k(this);
|
|
2665
2665
|
}
|
|
2666
2666
|
partial(t) {
|
|
2667
2667
|
let n = {};
|
|
@@ -2679,7 +2679,7 @@ var j = class e extends C {
|
|
|
2679
2679
|
for (let e of l.objectKeys(this.shape)) if (t && !t[e]) n[e] = this.shape[e];
|
|
2680
2680
|
else {
|
|
2681
2681
|
let t = this.shape[e];
|
|
2682
|
-
for (; t instanceof
|
|
2682
|
+
for (; t instanceof z;) t = t._def.innerType;
|
|
2683
2683
|
n[e] = t;
|
|
2684
2684
|
}
|
|
2685
2685
|
return new e({
|
|
@@ -2688,29 +2688,29 @@ var j = class e extends C {
|
|
|
2688
2688
|
});
|
|
2689
2689
|
}
|
|
2690
2690
|
keyof() {
|
|
2691
|
-
return
|
|
2691
|
+
return ft(l.objectKeys(this.shape));
|
|
2692
2692
|
}
|
|
2693
2693
|
};
|
|
2694
|
-
|
|
2694
|
+
A.create = (e, t) => new A({
|
|
2695
2695
|
shape: () => e,
|
|
2696
2696
|
unknownKeys: "strip",
|
|
2697
|
-
catchall:
|
|
2698
|
-
typeName:
|
|
2697
|
+
catchall: D.create(),
|
|
2698
|
+
typeName: V.ZodObject,
|
|
2699
2699
|
...S(t)
|
|
2700
|
-
}),
|
|
2700
|
+
}), A.strictCreate = (e, t) => new A({
|
|
2701
2701
|
shape: () => e,
|
|
2702
2702
|
unknownKeys: "strict",
|
|
2703
|
-
catchall:
|
|
2704
|
-
typeName:
|
|
2703
|
+
catchall: D.create(),
|
|
2704
|
+
typeName: V.ZodObject,
|
|
2705
2705
|
...S(t)
|
|
2706
|
-
}),
|
|
2706
|
+
}), A.lazycreate = (e, t) => new A({
|
|
2707
2707
|
shape: e,
|
|
2708
2708
|
unknownKeys: "strip",
|
|
2709
|
-
catchall:
|
|
2710
|
-
typeName:
|
|
2709
|
+
catchall: D.create(),
|
|
2710
|
+
typeName: V.ZodObject,
|
|
2711
2711
|
...S(t)
|
|
2712
2712
|
});
|
|
2713
|
-
var
|
|
2713
|
+
var it = class extends C {
|
|
2714
2714
|
_parse(e) {
|
|
2715
2715
|
let { ctx: t } = this._processInputParams(e), n = this._def.options;
|
|
2716
2716
|
function r(e) {
|
|
@@ -2773,12 +2773,12 @@ var rt = class extends C {
|
|
|
2773
2773
|
return this._def.options;
|
|
2774
2774
|
}
|
|
2775
2775
|
};
|
|
2776
|
-
|
|
2776
|
+
it.create = (e, t) => new it({
|
|
2777
2777
|
options: e,
|
|
2778
|
-
typeName:
|
|
2778
|
+
typeName: V.ZodUnion,
|
|
2779
2779
|
...S(t)
|
|
2780
2780
|
});
|
|
2781
|
-
var
|
|
2781
|
+
var j = (e) => e instanceof N ? j(e.schema) : e instanceof R ? j(e.innerType()) : e instanceof P ? [e.value] : e instanceof F ? e.options : e instanceof I ? l.objectValues(e.enum) : e instanceof pt ? j(e._def.innerType) : e instanceof w ? [void 0] : e instanceof T ? [null] : e instanceof z ? [void 0, ...j(e.unwrap())] : e instanceof B ? [null, ...j(e.unwrap())] : e instanceof gt || e instanceof vt ? j(e.unwrap()) : e instanceof mt ? j(e._def.innerType) : [], at = class e extends C {
|
|
2782
2782
|
_parse(e) {
|
|
2783
2783
|
let { ctx: t } = this._processInputParams(e);
|
|
2784
2784
|
if (t.parsedType !== u.object) return h(t, {
|
|
@@ -2813,7 +2813,7 @@ var M = (e) => e instanceof P ? M(e.schema) : e instanceof z ? M(e.innerType())
|
|
|
2813
2813
|
static create(t, n, r) {
|
|
2814
2814
|
let i = /* @__PURE__ */ new Map();
|
|
2815
2815
|
for (let e of n) {
|
|
2816
|
-
let n =
|
|
2816
|
+
let n = j(e.shape[t]);
|
|
2817
2817
|
if (!n.length) throw Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);
|
|
2818
2818
|
for (let r of n) {
|
|
2819
2819
|
if (i.has(r)) throw Error(`Discriminator property ${String(t)} has duplicate value ${String(r)}`);
|
|
@@ -2821,7 +2821,7 @@ var M = (e) => e instanceof P ? M(e.schema) : e instanceof z ? M(e.innerType())
|
|
|
2821
2821
|
}
|
|
2822
2822
|
}
|
|
2823
2823
|
return new e({
|
|
2824
|
-
typeName:
|
|
2824
|
+
typeName: V.ZodDiscriminatedUnion,
|
|
2825
2825
|
discriminator: t,
|
|
2826
2826
|
options: n,
|
|
2827
2827
|
optionsMap: i,
|
|
@@ -2829,7 +2829,7 @@ var M = (e) => e instanceof P ? M(e.schema) : e instanceof z ? M(e.innerType())
|
|
|
2829
2829
|
});
|
|
2830
2830
|
}
|
|
2831
2831
|
};
|
|
2832
|
-
function
|
|
2832
|
+
function ot(e, t) {
|
|
2833
2833
|
let n = d(e), r = d(t);
|
|
2834
2834
|
if (e === t) return {
|
|
2835
2835
|
valid: !0,
|
|
@@ -2841,7 +2841,7 @@ function at(e, t) {
|
|
|
2841
2841
|
...t
|
|
2842
2842
|
};
|
|
2843
2843
|
for (let n of r) {
|
|
2844
|
-
let r =
|
|
2844
|
+
let r = ot(e[n], t[n]);
|
|
2845
2845
|
if (!r.valid) return { valid: !1 };
|
|
2846
2846
|
i[n] = r.data;
|
|
2847
2847
|
}
|
|
@@ -2854,7 +2854,7 @@ function at(e, t) {
|
|
|
2854
2854
|
if (e.length !== t.length) return { valid: !1 };
|
|
2855
2855
|
let n = [];
|
|
2856
2856
|
for (let r = 0; r < e.length; r++) {
|
|
2857
|
-
let i = e[r], a = t[r], o =
|
|
2857
|
+
let i = e[r], a = t[r], o = ot(i, a);
|
|
2858
2858
|
if (!o.valid) return { valid: !1 };
|
|
2859
2859
|
n.push(o.data);
|
|
2860
2860
|
}
|
|
@@ -2868,11 +2868,11 @@ function at(e, t) {
|
|
|
2868
2868
|
data: e
|
|
2869
2869
|
} : { valid: !1 };
|
|
2870
2870
|
}
|
|
2871
|
-
var
|
|
2871
|
+
var st = class extends C {
|
|
2872
2872
|
_parse(e) {
|
|
2873
2873
|
let { status: t, ctx: n } = this._processInputParams(e), r = (e, r) => {
|
|
2874
2874
|
if (xe(e) || xe(r)) return _;
|
|
2875
|
-
let i =
|
|
2875
|
+
let i = ot(e.value, r.value);
|
|
2876
2876
|
return i.valid ? ((Se(e) || Se(r)) && t.dirty(), {
|
|
2877
2877
|
status: t.value,
|
|
2878
2878
|
value: i.data
|
|
@@ -2897,13 +2897,13 @@ var ot = class extends C {
|
|
|
2897
2897
|
}));
|
|
2898
2898
|
}
|
|
2899
2899
|
};
|
|
2900
|
-
|
|
2900
|
+
st.create = (e, t, n) => new st({
|
|
2901
2901
|
left: e,
|
|
2902
2902
|
right: t,
|
|
2903
|
-
typeName:
|
|
2903
|
+
typeName: V.ZodIntersection,
|
|
2904
2904
|
...S(n)
|
|
2905
2905
|
});
|
|
2906
|
-
var
|
|
2906
|
+
var M = class e extends C {
|
|
2907
2907
|
_parse(e) {
|
|
2908
2908
|
let { status: t, ctx: n } = this._processInputParams(e);
|
|
2909
2909
|
if (n.parsedType !== u.array) return h(n, {
|
|
@@ -2941,16 +2941,16 @@ var N = class e extends C {
|
|
|
2941
2941
|
});
|
|
2942
2942
|
}
|
|
2943
2943
|
};
|
|
2944
|
-
|
|
2944
|
+
M.create = (e, t) => {
|
|
2945
2945
|
if (!Array.isArray(e)) throw Error("You must pass an array of schemas to z.tuple([ ... ])");
|
|
2946
|
-
return new
|
|
2946
|
+
return new M({
|
|
2947
2947
|
items: e,
|
|
2948
|
-
typeName:
|
|
2948
|
+
typeName: V.ZodTuple,
|
|
2949
2949
|
rest: null,
|
|
2950
2950
|
...S(t)
|
|
2951
2951
|
});
|
|
2952
2952
|
};
|
|
2953
|
-
var
|
|
2953
|
+
var ct = class e extends C {
|
|
2954
2954
|
get keySchema() {
|
|
2955
2955
|
return this._def.keyType;
|
|
2956
2956
|
}
|
|
@@ -2979,16 +2979,16 @@ var st = class e extends C {
|
|
|
2979
2979
|
return n instanceof C ? new e({
|
|
2980
2980
|
keyType: t,
|
|
2981
2981
|
valueType: n,
|
|
2982
|
-
typeName:
|
|
2982
|
+
typeName: V.ZodRecord,
|
|
2983
2983
|
...S(r)
|
|
2984
2984
|
}) : new e({
|
|
2985
|
-
keyType:
|
|
2985
|
+
keyType: Ye.create(),
|
|
2986
2986
|
valueType: t,
|
|
2987
|
-
typeName:
|
|
2987
|
+
typeName: V.ZodRecord,
|
|
2988
2988
|
...S(n)
|
|
2989
2989
|
});
|
|
2990
2990
|
}
|
|
2991
|
-
},
|
|
2991
|
+
}, lt = class extends C {
|
|
2992
2992
|
get keySchema() {
|
|
2993
2993
|
return this._def.keyType;
|
|
2994
2994
|
}
|
|
@@ -3034,13 +3034,13 @@ var st = class e extends C {
|
|
|
3034
3034
|
}
|
|
3035
3035
|
}
|
|
3036
3036
|
};
|
|
3037
|
-
|
|
3037
|
+
lt.create = (e, t, n) => new lt({
|
|
3038
3038
|
valueType: t,
|
|
3039
3039
|
keyType: e,
|
|
3040
|
-
typeName:
|
|
3040
|
+
typeName: V.ZodMap,
|
|
3041
3041
|
...S(n)
|
|
3042
3042
|
});
|
|
3043
|
-
var
|
|
3043
|
+
var ut = class e extends C {
|
|
3044
3044
|
_parse(e) {
|
|
3045
3045
|
let { status: t, ctx: n } = this._processInputParams(e);
|
|
3046
3046
|
if (n.parsedType !== u.set) return h(n, {
|
|
@@ -3104,14 +3104,14 @@ var lt = class e extends C {
|
|
|
3104
3104
|
return this.min(1, e);
|
|
3105
3105
|
}
|
|
3106
3106
|
};
|
|
3107
|
-
|
|
3107
|
+
ut.create = (e, t) => new ut({
|
|
3108
3108
|
valueType: e,
|
|
3109
3109
|
minSize: null,
|
|
3110
3110
|
maxSize: null,
|
|
3111
|
-
typeName:
|
|
3111
|
+
typeName: V.ZodSet,
|
|
3112
3112
|
...S(t)
|
|
3113
3113
|
});
|
|
3114
|
-
var
|
|
3114
|
+
var dt = class e extends C {
|
|
3115
3115
|
constructor() {
|
|
3116
3116
|
super(...arguments), this.validate = this.implement;
|
|
3117
3117
|
}
|
|
@@ -3155,7 +3155,7 @@ var ut = class e extends C {
|
|
|
3155
3155
|
});
|
|
3156
3156
|
}
|
|
3157
3157
|
let i = { errorMap: t.common.contextualErrorMap }, a = t.data;
|
|
3158
|
-
if (this._def.returns instanceof
|
|
3158
|
+
if (this._def.returns instanceof L) {
|
|
3159
3159
|
let e = this;
|
|
3160
3160
|
return v(async function(...t) {
|
|
3161
3161
|
let o = new p([]), s = await e._def.args.parseAsync(t, i).catch((e) => {
|
|
@@ -3186,7 +3186,7 @@ var ut = class e extends C {
|
|
|
3186
3186
|
args(...t) {
|
|
3187
3187
|
return new e({
|
|
3188
3188
|
...this._def,
|
|
3189
|
-
args:
|
|
3189
|
+
args: M.create(t).rest(E.create())
|
|
3190
3190
|
});
|
|
3191
3191
|
}
|
|
3192
3192
|
returns(t) {
|
|
@@ -3203,13 +3203,13 @@ var ut = class e extends C {
|
|
|
3203
3203
|
}
|
|
3204
3204
|
static create(t, n, r) {
|
|
3205
3205
|
return new e({
|
|
3206
|
-
args: t ||
|
|
3207
|
-
returns: n ||
|
|
3208
|
-
typeName:
|
|
3206
|
+
args: t || M.create([]).rest(E.create()),
|
|
3207
|
+
returns: n || E.create(),
|
|
3208
|
+
typeName: V.ZodFunction,
|
|
3209
3209
|
...S(r)
|
|
3210
3210
|
});
|
|
3211
3211
|
}
|
|
3212
|
-
},
|
|
3212
|
+
}, N = class extends C {
|
|
3213
3213
|
get schema() {
|
|
3214
3214
|
return this._def.getter();
|
|
3215
3215
|
}
|
|
@@ -3222,12 +3222,12 @@ var ut = class e extends C {
|
|
|
3222
3222
|
});
|
|
3223
3223
|
}
|
|
3224
3224
|
};
|
|
3225
|
-
|
|
3225
|
+
N.create = (e, t) => new N({
|
|
3226
3226
|
getter: e,
|
|
3227
|
-
typeName:
|
|
3227
|
+
typeName: V.ZodLazy,
|
|
3228
3228
|
...S(t)
|
|
3229
3229
|
});
|
|
3230
|
-
var
|
|
3230
|
+
var P = class extends C {
|
|
3231
3231
|
_parse(e) {
|
|
3232
3232
|
if (e.data !== this._def.value) {
|
|
3233
3233
|
let t = this._getOrReturnCtx(e);
|
|
@@ -3246,19 +3246,19 @@ var F = class extends C {
|
|
|
3246
3246
|
return this._def.value;
|
|
3247
3247
|
}
|
|
3248
3248
|
};
|
|
3249
|
-
|
|
3249
|
+
P.create = (e, t) => new P({
|
|
3250
3250
|
value: e,
|
|
3251
|
-
typeName:
|
|
3251
|
+
typeName: V.ZodLiteral,
|
|
3252
3252
|
...S(t)
|
|
3253
3253
|
});
|
|
3254
|
-
function
|
|
3255
|
-
return new
|
|
3254
|
+
function ft(e, t) {
|
|
3255
|
+
return new F({
|
|
3256
3256
|
values: e,
|
|
3257
|
-
typeName:
|
|
3257
|
+
typeName: V.ZodEnum,
|
|
3258
3258
|
...S(t)
|
|
3259
3259
|
});
|
|
3260
3260
|
}
|
|
3261
|
-
var
|
|
3261
|
+
var F = class e extends C {
|
|
3262
3262
|
_parse(e) {
|
|
3263
3263
|
if (typeof e.data != "string") {
|
|
3264
3264
|
let t = this._getOrReturnCtx(e), n = this._def.values;
|
|
@@ -3309,8 +3309,8 @@ var I = class e extends C {
|
|
|
3309
3309
|
});
|
|
3310
3310
|
}
|
|
3311
3311
|
};
|
|
3312
|
-
|
|
3313
|
-
var
|
|
3312
|
+
F.create = ft;
|
|
3313
|
+
var I = class extends C {
|
|
3314
3314
|
_parse(e) {
|
|
3315
3315
|
let t = l.getValidEnumValues(this._def.values), n = this._getOrReturnCtx(e);
|
|
3316
3316
|
if (n.parsedType !== u.string && n.parsedType !== u.number) {
|
|
@@ -3335,12 +3335,12 @@ var L = class extends C {
|
|
|
3335
3335
|
return this._def.values;
|
|
3336
3336
|
}
|
|
3337
3337
|
};
|
|
3338
|
-
|
|
3338
|
+
I.create = (e, t) => new I({
|
|
3339
3339
|
values: e,
|
|
3340
|
-
typeName:
|
|
3340
|
+
typeName: V.ZodNativeEnum,
|
|
3341
3341
|
...S(t)
|
|
3342
3342
|
});
|
|
3343
|
-
var
|
|
3343
|
+
var L = class extends C {
|
|
3344
3344
|
unwrap() {
|
|
3345
3345
|
return this._def.type;
|
|
3346
3346
|
}
|
|
@@ -3356,17 +3356,17 @@ var R = class extends C {
|
|
|
3356
3356
|
})));
|
|
3357
3357
|
}
|
|
3358
3358
|
};
|
|
3359
|
-
|
|
3359
|
+
L.create = (e, t) => new L({
|
|
3360
3360
|
type: e,
|
|
3361
|
-
typeName:
|
|
3361
|
+
typeName: V.ZodPromise,
|
|
3362
3362
|
...S(t)
|
|
3363
3363
|
});
|
|
3364
|
-
var
|
|
3364
|
+
var R = class extends C {
|
|
3365
3365
|
innerType() {
|
|
3366
3366
|
return this._def.schema;
|
|
3367
3367
|
}
|
|
3368
3368
|
sourceType() {
|
|
3369
|
-
return this._def.schema._def.typeName ===
|
|
3369
|
+
return this._def.schema._def.typeName === V.ZodEffects ? this._def.schema.sourceType() : this._def.schema;
|
|
3370
3370
|
}
|
|
3371
3371
|
_parse(e) {
|
|
3372
3372
|
let { status: t, ctx: n } = this._processInputParams(e), r = this._def.effect || null, i = {
|
|
@@ -3452,21 +3452,21 @@ var z = class extends C {
|
|
|
3452
3452
|
l.assertNever(r);
|
|
3453
3453
|
}
|
|
3454
3454
|
};
|
|
3455
|
-
|
|
3455
|
+
R.create = (e, t, n) => new R({
|
|
3456
3456
|
schema: e,
|
|
3457
|
-
typeName:
|
|
3457
|
+
typeName: V.ZodEffects,
|
|
3458
3458
|
effect: t,
|
|
3459
3459
|
...S(n)
|
|
3460
|
-
}),
|
|
3460
|
+
}), R.createWithPreprocess = (e, t, n) => new R({
|
|
3461
3461
|
schema: t,
|
|
3462
3462
|
effect: {
|
|
3463
3463
|
type: "preprocess",
|
|
3464
3464
|
transform: e
|
|
3465
3465
|
},
|
|
3466
|
-
typeName:
|
|
3466
|
+
typeName: V.ZodEffects,
|
|
3467
3467
|
...S(n)
|
|
3468
3468
|
});
|
|
3469
|
-
var
|
|
3469
|
+
var z = class extends C {
|
|
3470
3470
|
_parse(e) {
|
|
3471
3471
|
return this._getType(e) === u.undefined ? v(void 0) : this._def.innerType._parse(e);
|
|
3472
3472
|
}
|
|
@@ -3474,12 +3474,12 @@ var B = class extends C {
|
|
|
3474
3474
|
return this._def.innerType;
|
|
3475
3475
|
}
|
|
3476
3476
|
};
|
|
3477
|
-
|
|
3477
|
+
z.create = (e, t) => new z({
|
|
3478
3478
|
innerType: e,
|
|
3479
|
-
typeName:
|
|
3479
|
+
typeName: V.ZodOptional,
|
|
3480
3480
|
...S(t)
|
|
3481
3481
|
});
|
|
3482
|
-
var
|
|
3482
|
+
var B = class extends C {
|
|
3483
3483
|
_parse(e) {
|
|
3484
3484
|
return this._getType(e) === u.null ? v(null) : this._def.innerType._parse(e);
|
|
3485
3485
|
}
|
|
@@ -3487,12 +3487,12 @@ var V = class extends C {
|
|
|
3487
3487
|
return this._def.innerType;
|
|
3488
3488
|
}
|
|
3489
3489
|
};
|
|
3490
|
-
|
|
3490
|
+
B.create = (e, t) => new B({
|
|
3491
3491
|
innerType: e,
|
|
3492
|
-
typeName:
|
|
3492
|
+
typeName: V.ZodNullable,
|
|
3493
3493
|
...S(t)
|
|
3494
3494
|
});
|
|
3495
|
-
var
|
|
3495
|
+
var pt = class extends C {
|
|
3496
3496
|
_parse(e) {
|
|
3497
3497
|
let { ctx: t } = this._processInputParams(e), n = t.data;
|
|
3498
3498
|
return t.parsedType === u.undefined && (n = this._def.defaultValue()), this._def.innerType._parse({
|
|
@@ -3505,13 +3505,13 @@ var ft = class extends C {
|
|
|
3505
3505
|
return this._def.innerType;
|
|
3506
3506
|
}
|
|
3507
3507
|
};
|
|
3508
|
-
|
|
3508
|
+
pt.create = (e, t) => new pt({
|
|
3509
3509
|
innerType: e,
|
|
3510
|
-
typeName:
|
|
3510
|
+
typeName: V.ZodDefault,
|
|
3511
3511
|
defaultValue: typeof t.default == "function" ? t.default : () => t.default,
|
|
3512
3512
|
...S(t)
|
|
3513
3513
|
});
|
|
3514
|
-
var
|
|
3514
|
+
var mt = class extends C {
|
|
3515
3515
|
_parse(e) {
|
|
3516
3516
|
let { ctx: t } = this._processInputParams(e), n = {
|
|
3517
3517
|
...t,
|
|
@@ -3546,13 +3546,13 @@ var pt = class extends C {
|
|
|
3546
3546
|
return this._def.innerType;
|
|
3547
3547
|
}
|
|
3548
3548
|
};
|
|
3549
|
-
|
|
3549
|
+
mt.create = (e, t) => new mt({
|
|
3550
3550
|
innerType: e,
|
|
3551
|
-
typeName:
|
|
3551
|
+
typeName: V.ZodCatch,
|
|
3552
3552
|
catchValue: typeof t.catch == "function" ? t.catch : () => t.catch,
|
|
3553
3553
|
...S(t)
|
|
3554
3554
|
});
|
|
3555
|
-
var
|
|
3555
|
+
var ht = class extends C {
|
|
3556
3556
|
_parse(e) {
|
|
3557
3557
|
if (this._getType(e) !== u.nan) {
|
|
3558
3558
|
let t = this._getOrReturnCtx(e);
|
|
@@ -3568,11 +3568,11 @@ var mt = class extends C {
|
|
|
3568
3568
|
};
|
|
3569
3569
|
}
|
|
3570
3570
|
};
|
|
3571
|
-
|
|
3572
|
-
typeName:
|
|
3571
|
+
ht.create = (e) => new ht({
|
|
3572
|
+
typeName: V.ZodNaN,
|
|
3573
3573
|
...S(e)
|
|
3574
3574
|
});
|
|
3575
|
-
var
|
|
3575
|
+
var gt = class extends C {
|
|
3576
3576
|
_parse(e) {
|
|
3577
3577
|
let { ctx: t } = this._processInputParams(e), n = t.data;
|
|
3578
3578
|
return this._def.type._parse({
|
|
@@ -3584,7 +3584,7 @@ var ht = class extends C {
|
|
|
3584
3584
|
unwrap() {
|
|
3585
3585
|
return this._def.type;
|
|
3586
3586
|
}
|
|
3587
|
-
},
|
|
3587
|
+
}, _t = class e extends C {
|
|
3588
3588
|
_parse(e) {
|
|
3589
3589
|
let { status: t, ctx: n } = this._processInputParams(e);
|
|
3590
3590
|
if (n.common.async) return (async () => {
|
|
@@ -3619,10 +3619,10 @@ var ht = class extends C {
|
|
|
3619
3619
|
return new e({
|
|
3620
3620
|
in: t,
|
|
3621
3621
|
out: n,
|
|
3622
|
-
typeName:
|
|
3622
|
+
typeName: V.ZodPipeline
|
|
3623
3623
|
});
|
|
3624
3624
|
}
|
|
3625
|
-
},
|
|
3625
|
+
}, vt = class extends C {
|
|
3626
3626
|
_parse(e) {
|
|
3627
3627
|
let t = this._def.innerType._parse(e), n = (e) => (y(e) && (e.value = Object.freeze(e.value)), e);
|
|
3628
3628
|
return Ce(t) ? t.then((e) => n(e)) : n(t);
|
|
@@ -3631,23 +3631,23 @@ var ht = class extends C {
|
|
|
3631
3631
|
return this._def.innerType;
|
|
3632
3632
|
}
|
|
3633
3633
|
};
|
|
3634
|
-
|
|
3634
|
+
vt.create = (e, t) => new vt({
|
|
3635
3635
|
innerType: e,
|
|
3636
|
-
typeName:
|
|
3636
|
+
typeName: V.ZodReadonly,
|
|
3637
3637
|
...S(t)
|
|
3638
|
-
}),
|
|
3639
|
-
var
|
|
3638
|
+
}), A.lazycreate;
|
|
3639
|
+
var V;
|
|
3640
3640
|
(function(e) {
|
|
3641
3641
|
e.ZodString = "ZodString", e.ZodNumber = "ZodNumber", e.ZodNaN = "ZodNaN", e.ZodBigInt = "ZodBigInt", e.ZodBoolean = "ZodBoolean", e.ZodDate = "ZodDate", e.ZodSymbol = "ZodSymbol", e.ZodUndefined = "ZodUndefined", e.ZodNull = "ZodNull", e.ZodAny = "ZodAny", e.ZodUnknown = "ZodUnknown", e.ZodNever = "ZodNever", e.ZodVoid = "ZodVoid", e.ZodArray = "ZodArray", e.ZodObject = "ZodObject", e.ZodUnion = "ZodUnion", e.ZodDiscriminatedUnion = "ZodDiscriminatedUnion", e.ZodIntersection = "ZodIntersection", e.ZodTuple = "ZodTuple", e.ZodRecord = "ZodRecord", e.ZodMap = "ZodMap", e.ZodSet = "ZodSet", e.ZodFunction = "ZodFunction", e.ZodLazy = "ZodLazy", e.ZodLiteral = "ZodLiteral", e.ZodEnum = "ZodEnum", e.ZodEffects = "ZodEffects", e.ZodNativeEnum = "ZodNativeEnum", e.ZodOptional = "ZodOptional", e.ZodNullable = "ZodNullable", e.ZodDefault = "ZodDefault", e.ZodCatch = "ZodCatch", e.ZodPromise = "ZodPromise", e.ZodBranded = "ZodBranded", e.ZodPipeline = "ZodPipeline", e.ZodReadonly = "ZodReadonly";
|
|
3642
|
-
})(
|
|
3643
|
-
var
|
|
3644
|
-
|
|
3645
|
-
var
|
|
3646
|
-
|
|
3647
|
-
var
|
|
3648
|
-
|
|
3649
|
-
var K =
|
|
3650
|
-
L.create, R.create, z.create, B.create,
|
|
3642
|
+
})(V ||= {});
|
|
3643
|
+
var H = Ye.create, U = Ze.create;
|
|
3644
|
+
ht.create, Qe.create;
|
|
3645
|
+
var yt = $e.create;
|
|
3646
|
+
et.create, tt.create, w.create, T.create, nt.create, E.create, D.create, rt.create;
|
|
3647
|
+
var W = O.create, G = A.create;
|
|
3648
|
+
A.strictCreate, it.create, at.create, st.create, M.create, ct.create, lt.create, ut.create, dt.create, N.create, P.create;
|
|
3649
|
+
var K = F.create;
|
|
3650
|
+
I.create, L.create, R.create, z.create, B.create, R.createWithPreprocess, _t.create;
|
|
3651
3651
|
//#endregion
|
|
3652
3652
|
//#region ../../node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/Options.js
|
|
3653
3653
|
var bt = Symbol("Let zodToJsonSchema decide on which parser to use"), xt = {
|
|
@@ -3734,7 +3734,7 @@ function J(e) {
|
|
|
3734
3734
|
//#region ../../node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/array.js
|
|
3735
3735
|
function Et(e, t) {
|
|
3736
3736
|
let n = { type: "array" };
|
|
3737
|
-
return e.type?._def && e.type?._def?.typeName !==
|
|
3737
|
+
return e.type?._def && e.type?._def?.typeName !== V.ZodAny && (n.items = Q(e.type._def, {
|
|
3738
3738
|
...t,
|
|
3739
3739
|
currentPath: [...t.currentPath, "items"]
|
|
3740
3740
|
})), e.minLength && q(n, "minItems", e.minLength.value, e.minLength.message, t), e.maxLength && q(n, "maxItems", e.maxLength.value, e.maxLength.message, t), e.exactLength && (q(n, "minItems", e.exactLength.value, e.exactLength.message, t), q(n, "maxItems", e.exactLength.value, e.exactLength.message, t)), n;
|
|
@@ -4056,7 +4056,7 @@ function Wt(e, t) {
|
|
|
4056
4056
|
//#endregion
|
|
4057
4057
|
//#region ../../node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/record.js
|
|
4058
4058
|
function Gt(e, t) {
|
|
4059
|
-
if (t.target === "openAi" && console.warn("Warning: OpenAI may not support records in schemas! Try an array of key-value pairs instead."), t.target === "openApi3" && e.keyType?._def.typeName ===
|
|
4059
|
+
if (t.target === "openAi" && console.warn("Warning: OpenAI may not support records in schemas! Try an array of key-value pairs instead."), t.target === "openApi3" && e.keyType?._def.typeName === V.ZodEnum) return {
|
|
4060
4060
|
type: "object",
|
|
4061
4061
|
required: e.keyType._def.values,
|
|
4062
4062
|
properties: e.keyType._def.values.reduce((n, r) => ({
|
|
@@ -4080,18 +4080,18 @@ function Gt(e, t) {
|
|
|
4080
4080
|
}) ?? t.allowedAdditionalProperties
|
|
4081
4081
|
};
|
|
4082
4082
|
if (t.target === "openApi3") return n;
|
|
4083
|
-
if (e.keyType?._def.typeName ===
|
|
4083
|
+
if (e.keyType?._def.typeName === V.ZodString && e.keyType._def.checks?.length) {
|
|
4084
4084
|
let { type: r, ...i } = Bt(e.keyType._def, t);
|
|
4085
4085
|
return {
|
|
4086
4086
|
...n,
|
|
4087
4087
|
propertyNames: i
|
|
4088
4088
|
};
|
|
4089
4089
|
}
|
|
4090
|
-
if (e.keyType?._def.typeName ===
|
|
4090
|
+
if (e.keyType?._def.typeName === V.ZodEnum) return {
|
|
4091
4091
|
...n,
|
|
4092
4092
|
propertyNames: { enum: e.keyType._def.values }
|
|
4093
4093
|
};
|
|
4094
|
-
if (e.keyType?._def.typeName ===
|
|
4094
|
+
if (e.keyType?._def.typeName === V.ZodBranded && e.keyType._def.type._def.typeName === V.ZodString && e.keyType._def.type._def.checks?.length) {
|
|
4095
4095
|
let { type: r, ...i } = kt(e.keyType._def, t);
|
|
4096
4096
|
return {
|
|
4097
4097
|
...n,
|
|
@@ -4411,42 +4411,42 @@ function dn(e) {
|
|
|
4411
4411
|
//#region ../../node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/readonly.js
|
|
4412
4412
|
var fn = (e, t) => Q(e.innerType._def, t), pn = (e, t, n) => {
|
|
4413
4413
|
switch (t) {
|
|
4414
|
-
case
|
|
4415
|
-
case
|
|
4416
|
-
case
|
|
4417
|
-
case
|
|
4418
|
-
case
|
|
4419
|
-
case
|
|
4420
|
-
case
|
|
4421
|
-
case
|
|
4422
|
-
case
|
|
4423
|
-
case
|
|
4424
|
-
case
|
|
4425
|
-
case
|
|
4426
|
-
case
|
|
4427
|
-
case
|
|
4428
|
-
case
|
|
4429
|
-
case
|
|
4430
|
-
case
|
|
4431
|
-
case
|
|
4432
|
-
case
|
|
4433
|
-
case
|
|
4434
|
-
case
|
|
4435
|
-
case
|
|
4436
|
-
case
|
|
4437
|
-
case
|
|
4438
|
-
case
|
|
4439
|
-
case
|
|
4440
|
-
case
|
|
4441
|
-
case
|
|
4442
|
-
case
|
|
4443
|
-
case
|
|
4444
|
-
case
|
|
4445
|
-
case
|
|
4446
|
-
case
|
|
4447
|
-
case
|
|
4448
|
-
case
|
|
4449
|
-
case
|
|
4414
|
+
case V.ZodString: return Bt(e, n);
|
|
4415
|
+
case V.ZodNumber: return en(e, n);
|
|
4416
|
+
case V.ZodObject: return tn(e, n);
|
|
4417
|
+
case V.ZodBigInt: return Dt(e, n);
|
|
4418
|
+
case V.ZodBoolean: return Ot();
|
|
4419
|
+
case V.ZodDate: return jt(e, n);
|
|
4420
|
+
case V.ZodUndefined: return un(n);
|
|
4421
|
+
case V.ZodNull: return Yt(n);
|
|
4422
|
+
case V.ZodArray: return Et(e, n);
|
|
4423
|
+
case V.ZodUnion:
|
|
4424
|
+
case V.ZodDiscriminatedUnion: return Zt(e, n);
|
|
4425
|
+
case V.ZodIntersection: return Lt(e, n);
|
|
4426
|
+
case V.ZodTuple: return ln(e, n);
|
|
4427
|
+
case V.ZodRecord: return Gt(e, n);
|
|
4428
|
+
case V.ZodLiteral: return Rt(e, n);
|
|
4429
|
+
case V.ZodEnum: return Ft(e);
|
|
4430
|
+
case V.ZodNativeEnum: return qt(e);
|
|
4431
|
+
case V.ZodNullable: return $t(e, n);
|
|
4432
|
+
case V.ZodOptional: return an(e, n);
|
|
4433
|
+
case V.ZodMap: return Kt(e, n);
|
|
4434
|
+
case V.ZodSet: return cn(e, n);
|
|
4435
|
+
case V.ZodLazy: return () => e.getter()._def;
|
|
4436
|
+
case V.ZodPromise: return sn(e, n);
|
|
4437
|
+
case V.ZodNaN:
|
|
4438
|
+
case V.ZodNever: return Jt(n);
|
|
4439
|
+
case V.ZodEffects: return Pt(e, n);
|
|
4440
|
+
case V.ZodAny: return J(n);
|
|
4441
|
+
case V.ZodUnknown: return dn(n);
|
|
4442
|
+
case V.ZodDefault: return Nt(e, n);
|
|
4443
|
+
case V.ZodBranded: return kt(e, n);
|
|
4444
|
+
case V.ZodReadonly: return fn(e, n);
|
|
4445
|
+
case V.ZodCatch: return At(e, n);
|
|
4446
|
+
case V.ZodPipeline: return on(e, n);
|
|
4447
|
+
case V.ZodFunction:
|
|
4448
|
+
case V.ZodVoid:
|
|
4449
|
+
case V.ZodSymbol: return;
|
|
4450
4450
|
default: return ((e) => void 0)(t);
|
|
4451
4451
|
}
|
|
4452
4452
|
};
|
|
@@ -4554,222 +4554,240 @@ function vn(e, t) {
|
|
|
4554
4554
|
}
|
|
4555
4555
|
return n.data;
|
|
4556
4556
|
}
|
|
4557
|
-
var yn =
|
|
4558
|
-
|
|
4559
|
-
|
|
4560
|
-
|
|
4561
|
-
|
|
4562
|
-
|
|
4563
|
-
|
|
4564
|
-
|
|
4565
|
-
|
|
4566
|
-
|
|
4567
|
-
|
|
4568
|
-
|
|
4569
|
-
|
|
4570
|
-
|
|
4571
|
-
|
|
4572
|
-
|
|
4573
|
-
|
|
4574
|
-
|
|
4575
|
-
|
|
4576
|
-
|
|
4577
|
-
description: "
|
|
4578
|
-
|
|
4579
|
-
name: U().describe("Name of the project"),
|
|
4580
|
-
description: U().optional().describe("Description of the project"),
|
|
4581
|
-
key: U().optional().describe("Short project key/prefix (e.g. \"PROJ\")")
|
|
4582
|
-
}),
|
|
4583
|
-
execute: async (e, t) => t.createProject(e)
|
|
4557
|
+
var yn = $({
|
|
4558
|
+
name: "list_projects",
|
|
4559
|
+
title: "List Projects",
|
|
4560
|
+
description: "Retrieve all projects in the workspace.",
|
|
4561
|
+
zodSchema: G({}),
|
|
4562
|
+
annotations: { readOnlyHint: !0 },
|
|
4563
|
+
execute: async (e, t) => t.getProjects()
|
|
4564
|
+
}), bn = $({
|
|
4565
|
+
name: "get_project",
|
|
4566
|
+
title: "Get Project",
|
|
4567
|
+
description: "Get details of a specific project by its ID.",
|
|
4568
|
+
zodSchema: G({ id: H().describe("The project ID") }),
|
|
4569
|
+
annotations: { readOnlyHint: !0 },
|
|
4570
|
+
execute: async (e, t) => t.getProject(e.id)
|
|
4571
|
+
}), xn = $({
|
|
4572
|
+
name: "create_project",
|
|
4573
|
+
title: "Create Project",
|
|
4574
|
+
description: "Create a new project workspace.",
|
|
4575
|
+
zodSchema: G({
|
|
4576
|
+
name: H().describe("Name of the project"),
|
|
4577
|
+
description: H().optional().describe("Description of the project"),
|
|
4578
|
+
key: H().optional().describe("Short project key/prefix (e.g. \"PROJ\")")
|
|
4584
4579
|
}),
|
|
4585
|
-
|
|
4586
|
-
|
|
4587
|
-
|
|
4588
|
-
|
|
4589
|
-
|
|
4590
|
-
|
|
4591
|
-
|
|
4592
|
-
|
|
4593
|
-
|
|
4594
|
-
|
|
4595
|
-
|
|
4596
|
-
|
|
4597
|
-
|
|
4598
|
-
|
|
4599
|
-
|
|
4600
|
-
|
|
4601
|
-
|
|
4602
|
-
|
|
4603
|
-
|
|
4604
|
-
annotations: { readOnlyHint: !0 },
|
|
4605
|
-
execute: async (e, t, n) => {
|
|
4606
|
-
let r = await t.queryTasks({
|
|
4607
|
-
projectId: e.projectId || n?.projectId,
|
|
4608
|
-
status: e.status ? [e.status] : void 0,
|
|
4609
|
-
priority: e.priority ? [e.priority] : void 0,
|
|
4610
|
-
assigneeId: e.assigneeId,
|
|
4611
|
-
iterationId: e.iterationId,
|
|
4612
|
-
limit: e.limit,
|
|
4613
|
-
cursor: e.cursor
|
|
4614
|
-
});
|
|
4615
|
-
return {
|
|
4616
|
-
tasks: r.items,
|
|
4617
|
-
nextCursor: r.nextCursor
|
|
4618
|
-
};
|
|
4619
|
-
}
|
|
4620
|
-
}),
|
|
4621
|
-
$({
|
|
4622
|
-
name: "get_task",
|
|
4623
|
-
title: "Get Task",
|
|
4624
|
-
description: "Get task details by ID.",
|
|
4625
|
-
zodSchema: G({ id: U().describe("The task ID") }),
|
|
4626
|
-
annotations: { readOnlyHint: !0 },
|
|
4627
|
-
execute: async (e, t) => t.getTask(e.id)
|
|
4628
|
-
}),
|
|
4629
|
-
$({
|
|
4630
|
-
name: "create_task",
|
|
4631
|
-
title: "Create Task",
|
|
4632
|
-
description: "Create a new task within a project.",
|
|
4633
|
-
zodSchema: G({
|
|
4634
|
-
projectId: U().optional().describe("Project ID (inferred from active view in browser if omitted)"),
|
|
4635
|
-
title: U().describe("Title of the task"),
|
|
4636
|
-
description: U().optional().describe("Detailed description / markdown"),
|
|
4637
|
-
status: U().optional().describe("Status (defaults to \"todo\" or first workflow status)"),
|
|
4638
|
-
priority: K([
|
|
4639
|
-
"urgent",
|
|
4640
|
-
"high",
|
|
4641
|
-
"medium",
|
|
4642
|
-
"low",
|
|
4643
|
-
"none"
|
|
4644
|
-
]).optional().default("none").describe("Task priority"),
|
|
4645
|
-
assigneeId: U().optional().describe("User ID to assign task to"),
|
|
4646
|
-
dueDate: U().optional().describe("Due date (ISO string)"),
|
|
4647
|
-
tags: yt(U()).optional().describe("Tags for categorization"),
|
|
4648
|
-
estimatedHours: W().optional().describe("Estimated hours to complete"),
|
|
4649
|
-
allocation: W().gt(0).max(1).optional().describe("Share of the assignee's time the task takes, in (0, 1]; e.g. 0.5 for half-time. Estimates are effort, so a 0.5 task takes twice as long"),
|
|
4650
|
-
isBlocked: vt().optional().describe("Whether the task is blocked"),
|
|
4651
|
-
blockedReason: U().optional().describe("Reason why the task is blocked")
|
|
4652
|
-
}),
|
|
4653
|
-
execute: async (e, t, n) => {
|
|
4654
|
-
let r = e.projectId || n?.projectId;
|
|
4655
|
-
if (!r) throw Error("projectId is required to create a task, but none was provided or active in context.");
|
|
4656
|
-
let i = {
|
|
4657
|
-
projectId: r,
|
|
4658
|
-
title: e.title,
|
|
4659
|
-
description: e.description,
|
|
4660
|
-
status: e.status || "todo",
|
|
4661
|
-
priority: e.priority || "none",
|
|
4662
|
-
assigneeId: e.assigneeId,
|
|
4663
|
-
dueDate: e.dueDate,
|
|
4664
|
-
tags: e.tags || [],
|
|
4665
|
-
estimatedHours: e.estimatedHours,
|
|
4666
|
-
allocation: e.allocation,
|
|
4667
|
-
isBlocked: e.isBlocked,
|
|
4668
|
-
blockedReason: e.blockedReason
|
|
4669
|
-
};
|
|
4670
|
-
return t.createTask(i);
|
|
4671
|
-
}
|
|
4672
|
-
}),
|
|
4673
|
-
$({
|
|
4674
|
-
name: "update_task",
|
|
4675
|
-
title: "Update Task",
|
|
4676
|
-
description: "Update fields of an existing task (e.g. title, status, priority, assignee).",
|
|
4677
|
-
zodSchema: G({
|
|
4678
|
-
id: U().describe("The task ID"),
|
|
4679
|
-
title: U().optional(),
|
|
4680
|
-
description: U().optional(),
|
|
4681
|
-
status: U().optional(),
|
|
4682
|
-
priority: K([
|
|
4683
|
-
"urgent",
|
|
4684
|
-
"high",
|
|
4685
|
-
"medium",
|
|
4686
|
-
"low",
|
|
4687
|
-
"none"
|
|
4688
|
-
]).optional(),
|
|
4689
|
-
assigneeId: U().optional(),
|
|
4690
|
-
dueDate: U().optional(),
|
|
4691
|
-
tags: yt(U()).optional(),
|
|
4692
|
-
estimatedHours: W().optional(),
|
|
4693
|
-
allocation: W().gt(0).max(1).optional().describe("Share of the assignee's time the task takes, in (0, 1]; e.g. 0.5 for half-time. Estimates are effort, so a 0.5 task takes twice as long"),
|
|
4694
|
-
loggedHours: W().optional(),
|
|
4695
|
-
isBlocked: vt().optional().describe("Whether the task is blocked"),
|
|
4696
|
-
blockedReason: U().optional().describe("Reason why the task is blocked")
|
|
4697
|
-
}),
|
|
4698
|
-
execute: async (e, t) => {
|
|
4699
|
-
let { id: n, ...r } = e;
|
|
4700
|
-
return t.updateTask(n, r);
|
|
4701
|
-
}
|
|
4580
|
+
execute: async (e, t) => t.createProject(e)
|
|
4581
|
+
}), Sn = $({
|
|
4582
|
+
name: "list_tasks",
|
|
4583
|
+
title: "List Tasks",
|
|
4584
|
+
description: "List tasks (oldest first), optionally filtered by project, status, priority, assignee or iteration. Returns { tasks, nextCursor }; pass nextCursor back as cursor to get the next page.",
|
|
4585
|
+
zodSchema: G({
|
|
4586
|
+
projectId: H().optional().describe("Filter by project ID"),
|
|
4587
|
+
status: H().optional().describe("Filter by task status key"),
|
|
4588
|
+
priority: K([
|
|
4589
|
+
"urgent",
|
|
4590
|
+
"high",
|
|
4591
|
+
"medium",
|
|
4592
|
+
"low",
|
|
4593
|
+
"none"
|
|
4594
|
+
]).optional().describe("Filter by priority"),
|
|
4595
|
+
assigneeId: H().optional().describe("Filter by assignee ID"),
|
|
4596
|
+
iterationId: H().optional().describe("Filter by iteration (sprint) ID"),
|
|
4597
|
+
limit: U().int().min(1).max(500).optional().describe("Page size (default 100)"),
|
|
4598
|
+
cursor: H().optional().describe("nextCursor from a previous call")
|
|
4702
4599
|
}),
|
|
4703
|
-
|
|
4704
|
-
|
|
4705
|
-
|
|
4706
|
-
|
|
4707
|
-
|
|
4708
|
-
|
|
4709
|
-
|
|
4600
|
+
annotations: { readOnlyHint: !0 },
|
|
4601
|
+
execute: async (e, t, n) => {
|
|
4602
|
+
let r = await t.queryTasks({
|
|
4603
|
+
projectId: e.projectId || n?.projectId,
|
|
4604
|
+
status: e.status ? [e.status] : void 0,
|
|
4605
|
+
priority: e.priority ? [e.priority] : void 0,
|
|
4606
|
+
assigneeId: e.assigneeId,
|
|
4607
|
+
iterationId: e.iterationId,
|
|
4608
|
+
limit: e.limit,
|
|
4609
|
+
cursor: e.cursor
|
|
4610
|
+
});
|
|
4611
|
+
return {
|
|
4612
|
+
tasks: r.items,
|
|
4613
|
+
nextCursor: r.nextCursor
|
|
4614
|
+
};
|
|
4615
|
+
}
|
|
4616
|
+
}), Cn = $({
|
|
4617
|
+
name: "get_task",
|
|
4618
|
+
title: "Get Task",
|
|
4619
|
+
description: "Get task details by ID.",
|
|
4620
|
+
zodSchema: G({ id: H().describe("The task ID") }),
|
|
4621
|
+
annotations: { readOnlyHint: !0 },
|
|
4622
|
+
execute: async (e, t) => t.getTask(e.id)
|
|
4623
|
+
}), wn = $({
|
|
4624
|
+
name: "create_task",
|
|
4625
|
+
title: "Create Task",
|
|
4626
|
+
description: "Create a new task within a project.",
|
|
4627
|
+
zodSchema: G({
|
|
4628
|
+
projectId: H().optional().describe("Project ID (inferred from active view in browser if omitted)"),
|
|
4629
|
+
title: H().describe("Title of the task"),
|
|
4630
|
+
description: H().optional().describe("Detailed description / markdown"),
|
|
4631
|
+
status: H().optional().describe("Status (defaults to \"todo\" or first workflow status)"),
|
|
4632
|
+
priority: K([
|
|
4633
|
+
"urgent",
|
|
4634
|
+
"high",
|
|
4635
|
+
"medium",
|
|
4636
|
+
"low",
|
|
4637
|
+
"none"
|
|
4638
|
+
]).optional().default("none").describe("Task priority"),
|
|
4639
|
+
assigneeId: H().optional().describe("User ID to assign task to"),
|
|
4640
|
+
dueDate: H().optional().describe("Due date (ISO string)"),
|
|
4641
|
+
tags: W(H()).optional().describe("Tags for categorization"),
|
|
4642
|
+
estimatedHours: U().optional().describe("Estimated hours to complete"),
|
|
4643
|
+
allocation: U().gt(0).max(1).optional().describe("Share of the assignee's time the task takes, in (0, 1]; e.g. 0.5 for half-time. Estimates are effort, so a 0.5 task takes twice as long"),
|
|
4644
|
+
isBlocked: yt().optional().describe("Whether the task is blocked"),
|
|
4645
|
+
blockedReason: H().optional().describe("Reason why the task is blocked")
|
|
4710
4646
|
}),
|
|
4711
|
-
|
|
4712
|
-
|
|
4713
|
-
|
|
4714
|
-
|
|
4715
|
-
|
|
4716
|
-
|
|
4717
|
-
|
|
4718
|
-
|
|
4719
|
-
|
|
4720
|
-
|
|
4721
|
-
|
|
4647
|
+
execute: async (e, t, n) => {
|
|
4648
|
+
let r = e.projectId || n?.projectId;
|
|
4649
|
+
if (!r) throw Error("projectId is required to create a task, but none was provided or active in context.");
|
|
4650
|
+
let i = {
|
|
4651
|
+
projectId: r,
|
|
4652
|
+
title: e.title,
|
|
4653
|
+
description: e.description,
|
|
4654
|
+
status: e.status || "todo",
|
|
4655
|
+
priority: e.priority || "none",
|
|
4656
|
+
assigneeId: e.assigneeId,
|
|
4657
|
+
dueDate: e.dueDate,
|
|
4658
|
+
tags: e.tags || [],
|
|
4659
|
+
estimatedHours: e.estimatedHours,
|
|
4660
|
+
allocation: e.allocation,
|
|
4661
|
+
isBlocked: e.isBlocked,
|
|
4662
|
+
blockedReason: e.blockedReason
|
|
4663
|
+
};
|
|
4664
|
+
return t.createTask(i);
|
|
4665
|
+
}
|
|
4666
|
+
}), Tn = $({
|
|
4667
|
+
name: "update_task",
|
|
4668
|
+
title: "Update Task",
|
|
4669
|
+
description: "Update fields of an existing task (e.g. title, status, priority, assignee).",
|
|
4670
|
+
zodSchema: G({
|
|
4671
|
+
id: H().describe("The task ID"),
|
|
4672
|
+
title: H().optional(),
|
|
4673
|
+
description: H().optional(),
|
|
4674
|
+
status: H().optional(),
|
|
4675
|
+
priority: K([
|
|
4676
|
+
"urgent",
|
|
4677
|
+
"high",
|
|
4678
|
+
"medium",
|
|
4679
|
+
"low",
|
|
4680
|
+
"none"
|
|
4681
|
+
]).optional(),
|
|
4682
|
+
assigneeId: H().optional(),
|
|
4683
|
+
dueDate: H().optional(),
|
|
4684
|
+
tags: W(H()).optional(),
|
|
4685
|
+
estimatedHours: U().optional(),
|
|
4686
|
+
allocation: U().gt(0).max(1).optional().describe("Share of the assignee's time the task takes, in (0, 1]; e.g. 0.5 for half-time. Estimates are effort, so a 0.5 task takes twice as long"),
|
|
4687
|
+
loggedHours: U().optional(),
|
|
4688
|
+
isBlocked: yt().optional().describe("Whether the task is blocked"),
|
|
4689
|
+
blockedReason: H().optional().describe("Reason why the task is blocked")
|
|
4722
4690
|
}),
|
|
4723
|
-
|
|
4724
|
-
|
|
4725
|
-
|
|
4726
|
-
|
|
4727
|
-
|
|
4728
|
-
|
|
4729
|
-
|
|
4730
|
-
|
|
4731
|
-
|
|
4732
|
-
|
|
4733
|
-
|
|
4734
|
-
|
|
4735
|
-
|
|
4736
|
-
|
|
4737
|
-
|
|
4738
|
-
|
|
4739
|
-
|
|
4740
|
-
|
|
4741
|
-
|
|
4742
|
-
|
|
4691
|
+
execute: async (e, t) => {
|
|
4692
|
+
let { id: n, ...r } = e;
|
|
4693
|
+
return t.updateTask(n, r);
|
|
4694
|
+
}
|
|
4695
|
+
}), En = $({
|
|
4696
|
+
name: "delete_task",
|
|
4697
|
+
title: "Delete Task",
|
|
4698
|
+
description: "Delete a task by ID.",
|
|
4699
|
+
zodSchema: G({ id: H().describe("The task ID to delete") }),
|
|
4700
|
+
annotations: { requiresConfirmation: !0 },
|
|
4701
|
+
execute: async (e, t) => ({ success: await t.deleteTask(e.id) })
|
|
4702
|
+
}), Dn = $({
|
|
4703
|
+
name: "list_deliverables",
|
|
4704
|
+
title: "List Deliverables",
|
|
4705
|
+
description: "List deliverables/milestones for a project.",
|
|
4706
|
+
zodSchema: G({ projectId: H().optional().describe("Project ID") }),
|
|
4707
|
+
annotations: { readOnlyHint: !0 },
|
|
4708
|
+
execute: async (e, t, n) => {
|
|
4709
|
+
let r = e.projectId || n?.projectId;
|
|
4710
|
+
if (!r) throw Error("projectId is required to list deliverables.");
|
|
4711
|
+
return "getDeliverables" in t && typeof t.getDeliverables == "function" ? t.getDeliverables(r) : [];
|
|
4712
|
+
}
|
|
4713
|
+
}), On = $({
|
|
4714
|
+
name: "create_deliverable",
|
|
4715
|
+
title: "Create Deliverable",
|
|
4716
|
+
description: "Create a milestone deliverable within a project.",
|
|
4717
|
+
zodSchema: G({
|
|
4718
|
+
projectId: H().optional(),
|
|
4719
|
+
title: H(),
|
|
4720
|
+
description: H().optional(),
|
|
4721
|
+
dueDate: H().optional(),
|
|
4722
|
+
taskIds: W(H()).optional()
|
|
4743
4723
|
}),
|
|
4744
|
-
|
|
4745
|
-
|
|
4746
|
-
|
|
4747
|
-
|
|
4748
|
-
|
|
4749
|
-
|
|
4750
|
-
|
|
4724
|
+
execute: async (e, t, n) => {
|
|
4725
|
+
let r = e.projectId || n?.projectId;
|
|
4726
|
+
if (!r) throw Error("projectId is required to create a deliverable.");
|
|
4727
|
+
if ("createDeliverable" in t && typeof t.createDeliverable == "function") return t.createDeliverable({
|
|
4728
|
+
...e,
|
|
4729
|
+
projectId: r
|
|
4730
|
+
});
|
|
4731
|
+
throw Error("createDeliverable is not supported by this backend target.");
|
|
4732
|
+
}
|
|
4733
|
+
}), kn = $({
|
|
4734
|
+
name: "list_comments",
|
|
4735
|
+
title: "List Comments",
|
|
4736
|
+
description: "List comments associated with a task.",
|
|
4737
|
+
zodSchema: G({ taskId: H().describe("The task ID") }),
|
|
4738
|
+
annotations: { readOnlyHint: !0 },
|
|
4739
|
+
execute: async (e, t) => "getComments" in t && typeof t.getComments == "function" ? t.getComments(e.taskId) : []
|
|
4740
|
+
}), An = $({
|
|
4741
|
+
name: "add_comment",
|
|
4742
|
+
title: "Add Comment",
|
|
4743
|
+
description: "Add a comment to a task. The comment is attributed to the identity this MCP server runs as.",
|
|
4744
|
+
zodSchema: G({
|
|
4745
|
+
taskId: H().describe("The task ID"),
|
|
4746
|
+
content: H().describe("Comment body/markdown")
|
|
4751
4747
|
}),
|
|
4752
|
-
|
|
4753
|
-
|
|
4754
|
-
|
|
4755
|
-
|
|
4756
|
-
|
|
4757
|
-
|
|
4758
|
-
|
|
4759
|
-
|
|
4760
|
-
|
|
4761
|
-
|
|
4762
|
-
|
|
4763
|
-
|
|
4748
|
+
execute: async (e, t) => t.addComment({
|
|
4749
|
+
taskId: e.taskId,
|
|
4750
|
+
content: e.content
|
|
4751
|
+
})
|
|
4752
|
+
}), jn = $({
|
|
4753
|
+
name: "calculate_portfolio_critical_path",
|
|
4754
|
+
title: "Calculate Portfolio Critical Path",
|
|
4755
|
+
description: "Critical path analysis across several projects at once (or every readable project). With calendars \"assignee\" and levelResources, people and teams are shared across projects, so nobody is double-booked between them.",
|
|
4756
|
+
zodSchema: G({
|
|
4757
|
+
projectIds: W(H()).optional().describe("Projects to include (default: every project you can read)"),
|
|
4758
|
+
projectOrder: W(H()).optional().describe("Project ids in priority order for levelling; unlisted projects come last"),
|
|
4759
|
+
calendars: K(["project", "assignee"]).optional().describe("'assignee' schedules each task on its assignee's or team's calendar"),
|
|
4760
|
+
levelResources: yt().optional().describe("With calendars 'assignee': share people and team pools across the projects"),
|
|
4761
|
+
levelingPriority: K([
|
|
4762
|
+
"slack",
|
|
4763
|
+
"priority",
|
|
4764
|
+
"dueDate",
|
|
4765
|
+
"order"
|
|
4766
|
+
]).optional().describe("Which ready task gets an assignee first when levelling (default: least slack, then task priority)")
|
|
4764
4767
|
}),
|
|
4768
|
+
annotations: { readOnlyHint: !0 },
|
|
4769
|
+
execute: async (e, t) => t.calculatePortfolioCriticalPath(e)
|
|
4770
|
+
}), Mn = [
|
|
4771
|
+
yn,
|
|
4772
|
+
bn,
|
|
4773
|
+
xn,
|
|
4774
|
+
Sn,
|
|
4775
|
+
Cn,
|
|
4776
|
+
wn,
|
|
4777
|
+
Tn,
|
|
4778
|
+
En,
|
|
4779
|
+
Dn,
|
|
4780
|
+
On,
|
|
4781
|
+
kn,
|
|
4782
|
+
An,
|
|
4765
4783
|
$({
|
|
4766
4784
|
name: "calculate_critical_path",
|
|
4767
4785
|
title: "Calculate Critical Path",
|
|
4768
4786
|
description: "Calculate Critical Path Method (CPM) schedule, early/late start and finish, total slack, and critical bottlenecks for a project.",
|
|
4769
4787
|
zodSchema: G({
|
|
4770
|
-
projectId:
|
|
4788
|
+
projectId: H().optional().describe("Project ID (falls back to ambient context if omitted)"),
|
|
4771
4789
|
calendars: K(["project", "assignee"]).optional().describe("'assignee' schedules each task on its assignee's or team's working calendar; default uses the project calendar"),
|
|
4772
|
-
levelResources:
|
|
4790
|
+
levelResources: yt().optional().describe("With calendars 'assignee': delay tasks so each assignee works on one task at a time"),
|
|
4773
4791
|
levelingPriority: K([
|
|
4774
4792
|
"slack",
|
|
4775
4793
|
"priority",
|
|
@@ -4789,20 +4807,21 @@ var yn = [
|
|
|
4789
4807
|
});
|
|
4790
4808
|
}
|
|
4791
4809
|
}),
|
|
4810
|
+
jn,
|
|
4792
4811
|
$({
|
|
4793
4812
|
name: "get_timeline_ladder",
|
|
4794
4813
|
title: "Get Timeline Ladder of Abstraction",
|
|
4795
4814
|
description: "Retrieve Ladder of Abstraction for a project timeline across macro phase envelopes, standard Gantt tasks & CPM, and concrete deliverables/time/attachments.",
|
|
4796
4815
|
zodSchema: G({
|
|
4797
|
-
projectId:
|
|
4816
|
+
projectId: H().optional().describe("Project ID (falls back to ambient context if omitted)"),
|
|
4798
4817
|
level: K([
|
|
4799
4818
|
"macro",
|
|
4800
4819
|
"standard",
|
|
4801
4820
|
"concrete",
|
|
4802
4821
|
"all"
|
|
4803
4822
|
]).optional().describe("Abstraction level (macro, standard, concrete, or all)"),
|
|
4804
|
-
containerId:
|
|
4805
|
-
iterationId:
|
|
4823
|
+
containerId: H().optional().describe("Optional container ID filter"),
|
|
4824
|
+
iterationId: H().optional().describe("Optional iteration/sprint ID filter")
|
|
4806
4825
|
}),
|
|
4807
4826
|
annotations: { readOnlyHint: !0 },
|
|
4808
4827
|
execute: async (e, t, n) => {
|
|
@@ -4819,7 +4838,7 @@ var yn = [
|
|
|
4819
4838
|
name: "get_task_ladder",
|
|
4820
4839
|
title: "Get Task Ladder View",
|
|
4821
4840
|
description: "Retrieve multi-scale ladder view for a single task, connecting its macro phase, standard CPM timeline position, and concrete work evidence.",
|
|
4822
|
-
zodSchema: G({ taskId:
|
|
4841
|
+
zodSchema: G({ taskId: H().describe("The task ID") }),
|
|
4823
4842
|
annotations: { readOnlyHint: !0 },
|
|
4824
4843
|
execute: async (e, t) => t.getTaskLadder(e.taskId)
|
|
4825
4844
|
}),
|
|
@@ -4827,7 +4846,7 @@ var yn = [
|
|
|
4827
4846
|
name: "get_task_metrics",
|
|
4828
4847
|
title: "Get Task Metrics",
|
|
4829
4848
|
description: "Retrieve multi-dimensional task metrics including inferred actuals, active working duration, effort/duration/schedule variances, progress inference, and Earned Value Management (EVM) metrics.",
|
|
4830
|
-
zodSchema: G({ taskId:
|
|
4849
|
+
zodSchema: G({ taskId: H().describe("The task ID") }),
|
|
4831
4850
|
annotations: { readOnlyHint: !0 },
|
|
4832
4851
|
execute: async (e, t) => t.getTaskMetrics(e.taskId)
|
|
4833
4852
|
}),
|
|
@@ -4835,7 +4854,7 @@ var yn = [
|
|
|
4835
4854
|
name: "get_task_progress_history",
|
|
4836
4855
|
title: "Get Task Progress History",
|
|
4837
4856
|
description: "Retrieve time-series progress data points and curve shape classification (linear, s_curve, early_surge, late_rush, stalled) for a task.",
|
|
4838
|
-
zodSchema: G({ taskId:
|
|
4857
|
+
zodSchema: G({ taskId: H().describe("The task ID") }),
|
|
4839
4858
|
annotations: { readOnlyHint: !0 },
|
|
4840
4859
|
execute: async (e, t) => t.getTaskProgressHistory(e.taskId)
|
|
4841
4860
|
}),
|
|
@@ -4844,9 +4863,9 @@ var yn = [
|
|
|
4844
4863
|
title: "Get Workload Distribution",
|
|
4845
4864
|
description: "Retrieve time-series workload and capacity distribution suitable for streamgraphs, stacked charts, and team capacity planning.",
|
|
4846
4865
|
zodSchema: G({
|
|
4847
|
-
projectId:
|
|
4848
|
-
startDate:
|
|
4849
|
-
endDate:
|
|
4866
|
+
projectId: H().optional().describe("Project ID (optional, defaults to workspace-wide or ambient project)"),
|
|
4867
|
+
startDate: H().optional().describe("Start date ISO (YYYY-MM-DD)"),
|
|
4868
|
+
endDate: H().optional().describe("End date ISO (YYYY-MM-DD)"),
|
|
4850
4869
|
interval: K([
|
|
4851
4870
|
"day",
|
|
4852
4871
|
"week",
|
|
@@ -4865,7 +4884,7 @@ var yn = [
|
|
|
4865
4884
|
"remaining",
|
|
4866
4885
|
"blended"
|
|
4867
4886
|
]).optional().describe("Effort metric mode"),
|
|
4868
|
-
defaultWeeklyCapacityHours:
|
|
4887
|
+
defaultWeeklyCapacityHours: U().optional().describe("Default weekly capacity hours per person (default 40)")
|
|
4869
4888
|
}),
|
|
4870
4889
|
annotations: { readOnlyHint: !0 },
|
|
4871
4890
|
execute: async (e, t, n) => {
|
|
@@ -4881,10 +4900,10 @@ var yn = [
|
|
|
4881
4900
|
}
|
|
4882
4901
|
})
|
|
4883
4902
|
];
|
|
4884
|
-
new Map(
|
|
4903
|
+
new Map(Mn.map((e) => [e.name, e]));
|
|
4885
4904
|
//#endregion
|
|
4886
4905
|
//#region ../mcp/dist/web/index.js
|
|
4887
|
-
function
|
|
4906
|
+
function Nn(e = typeof document < "u" ? document : null) {
|
|
4888
4907
|
if (!e) return null;
|
|
4889
4908
|
if (!e.modelContext) {
|
|
4890
4909
|
let t = /* @__PURE__ */ new Map();
|
|
@@ -4909,10 +4928,10 @@ function bn(e = typeof document < "u" ? document : null) {
|
|
|
4909
4928
|
}
|
|
4910
4929
|
return e.modelContext;
|
|
4911
4930
|
}
|
|
4912
|
-
function
|
|
4931
|
+
function Pn(e) {
|
|
4913
4932
|
let t = e.document ?? (typeof document < "u" ? document : null), n = e.navigator ?? (typeof navigator < "u" ? navigator : null), r = e.window ?? (typeof window < "u" ? window : null), i;
|
|
4914
|
-
t?.modelContext ? i = t.modelContext : n?.modelContext ? i = n.modelContext : t && (i =
|
|
4915
|
-
let a = e.tools ?
|
|
4933
|
+
t?.modelContext ? i = t.modelContext : n?.modelContext ? i = n.modelContext : t && (i = Nn(t) ?? void 0);
|
|
4934
|
+
let a = e.tools ? Mn.filter((t) => e.tools.includes(t.name)) : Mn, o = [], s = new AbortController();
|
|
4916
4935
|
e.signal && e.signal.addEventListener("abort", () => s.abort(), { once: !0 });
|
|
4917
4936
|
for (let t of a) {
|
|
4918
4937
|
let n = {
|
|
@@ -4950,7 +4969,7 @@ function xn(e) {
|
|
|
4950
4969
|
}
|
|
4951
4970
|
//#endregion
|
|
4952
4971
|
//#region src/webmcp-state.svelte.ts
|
|
4953
|
-
var
|
|
4972
|
+
var Fn = class {
|
|
4954
4973
|
client;
|
|
4955
4974
|
options;
|
|
4956
4975
|
#e = t.state(!1);
|
|
@@ -4990,7 +5009,7 @@ var Sn = class {
|
|
|
4990
5009
|
if (!this.registered) {
|
|
4991
5010
|
this.error = null;
|
|
4992
5011
|
try {
|
|
4993
|
-
this.abortController = new AbortController(), this.handle =
|
|
5012
|
+
this.abortController = new AbortController(), this.handle = Pn({
|
|
4994
5013
|
client: this.client,
|
|
4995
5014
|
projectId: this.activeProjectId,
|
|
4996
5015
|
tools: this.options.tools,
|
|
@@ -5014,12 +5033,12 @@ var Sn = class {
|
|
|
5014
5033
|
this.activeProjectId !== e && (this.activeProjectId = e, this.registered && (this.unregister(), this.register()));
|
|
5015
5034
|
}
|
|
5016
5035
|
};
|
|
5017
|
-
function
|
|
5018
|
-
return new
|
|
5036
|
+
function In(e, t) {
|
|
5037
|
+
return new Fn(e, t);
|
|
5019
5038
|
}
|
|
5020
5039
|
//#endregion
|
|
5021
5040
|
//#region src/critical-path-state.svelte.ts
|
|
5022
|
-
var
|
|
5041
|
+
var Ln = class {
|
|
5023
5042
|
client;
|
|
5024
5043
|
projectId;
|
|
5025
5044
|
#e = new i();
|
|
@@ -5063,12 +5082,12 @@ var wn = class {
|
|
|
5063
5082
|
this.#e.cancel();
|
|
5064
5083
|
}
|
|
5065
5084
|
};
|
|
5066
|
-
function
|
|
5067
|
-
return new
|
|
5085
|
+
function Rn(e, t) {
|
|
5086
|
+
return new Ln(e, t);
|
|
5068
5087
|
}
|
|
5069
5088
|
//#endregion
|
|
5070
5089
|
//#region src/timeline-ladder-state.svelte.ts
|
|
5071
|
-
var
|
|
5090
|
+
var zn = class {
|
|
5072
5091
|
client;
|
|
5073
5092
|
projectId;
|
|
5074
5093
|
#e = new i();
|
|
@@ -5146,12 +5165,12 @@ var En = class {
|
|
|
5146
5165
|
this.#e.cancel();
|
|
5147
5166
|
}
|
|
5148
5167
|
};
|
|
5149
|
-
function
|
|
5150
|
-
return new
|
|
5168
|
+
function Bn(e, t, n) {
|
|
5169
|
+
return new zn(e, t, n);
|
|
5151
5170
|
}
|
|
5152
5171
|
//#endregion
|
|
5153
5172
|
//#region src/task-metrics-state.svelte.ts
|
|
5154
|
-
var
|
|
5173
|
+
var Vn = class {
|
|
5155
5174
|
client;
|
|
5156
5175
|
taskId;
|
|
5157
5176
|
#e = new i();
|
|
@@ -5270,12 +5289,12 @@ var On = class {
|
|
|
5270
5289
|
this.#e.cancel(), this.#t.cancel(), this.#n.cancel();
|
|
5271
5290
|
}
|
|
5272
5291
|
};
|
|
5273
|
-
function
|
|
5274
|
-
return new
|
|
5292
|
+
function Hn(e, t) {
|
|
5293
|
+
return new Vn(e, t);
|
|
5275
5294
|
}
|
|
5276
5295
|
//#endregion
|
|
5277
5296
|
//#region src/workload-state.svelte.ts
|
|
5278
|
-
var
|
|
5297
|
+
var Un = class {
|
|
5279
5298
|
client;
|
|
5280
5299
|
projectId;
|
|
5281
5300
|
initialOptions;
|
|
@@ -5398,13 +5417,13 @@ var An = class {
|
|
|
5398
5417
|
this.#e.cancel();
|
|
5399
5418
|
}
|
|
5400
5419
|
};
|
|
5401
|
-
function
|
|
5402
|
-
return new
|
|
5420
|
+
function Wn(e, t, n) {
|
|
5421
|
+
return new Un(e, t, n);
|
|
5403
5422
|
}
|
|
5404
5423
|
//#endregion
|
|
5405
5424
|
//#region src/index.ts
|
|
5406
|
-
function
|
|
5425
|
+
function Gn(t) {
|
|
5407
5426
|
return new e(t);
|
|
5408
5427
|
}
|
|
5409
5428
|
//#endregion
|
|
5410
|
-
export { ie as AttachmentState, ne as CommentState,
|
|
5429
|
+
export { ie as AttachmentState, ne as CommentState, Ln as CriticalPathState, ce as DeliverableState, ue as DeliverableSummaryState, fe as KanbanState, a as ProjectState, oe as TaskActivityState, Vn as TaskMetricsState, s as TaskState, me as TaskTransitionsState, zn as TimelineLadderState, Fn as WebMcpState, ee as WorkflowState, Un as WorkloadState, ae as createAttachmentState, re as createCommentState, Gn as createCriticalPathClient, Rn as createCriticalPathState, le as createDeliverableState, de as createDeliverableSummaryState, pe as createKanbanState, o as createProjectState, se as createTaskActivityState, Hn as createTaskMetricsState, c as createTaskState, he as createTaskTransitionsState, Bn as createTimelineLadderState, In as createWebMcpState, te as createWorkflowState, Wn as createWorkloadState };
|