@critical-path/svelte 0.13.1 → 0.15.0
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/CHANGELOG.md +32 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +530 -169
- package/dist/task-metrics-state.svelte.d.ts +24 -0
- package/dist/task-metrics-state.svelte.d.ts.map +1 -0
- package/dist/workload-state.svelte.d.ts +26 -0
- package/dist/workload-state.svelte.d.ts.map +1 -0
- package/package.json +4 -4
- package/src/index.test.ts +160 -2
- package/src/index.ts +2 -0
- package/src/task-metrics-state.svelte.ts +83 -0
- package/src/workload-state.svelte.ts +83 -0
package/dist/index.js
CHANGED
|
@@ -1060,7 +1060,7 @@ function ge() {
|
|
|
1060
1060
|
}
|
|
1061
1061
|
//#endregion
|
|
1062
1062
|
//#region ../../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/helpers/parseUtil.js
|
|
1063
|
-
var
|
|
1063
|
+
var h = (e) => {
|
|
1064
1064
|
let { data: t, path: n, errorMaps: r, issueData: i } = e, a = [...n, ...i.path || []], o = {
|
|
1065
1065
|
...i,
|
|
1066
1066
|
path: a
|
|
@@ -1081,8 +1081,8 @@ var _e = (e) => {
|
|
|
1081
1081
|
message: s
|
|
1082
1082
|
};
|
|
1083
1083
|
};
|
|
1084
|
-
function
|
|
1085
|
-
let n = ge(), r =
|
|
1084
|
+
function g(e, t) {
|
|
1085
|
+
let n = ge(), r = h({
|
|
1086
1086
|
issueData: t,
|
|
1087
1087
|
data: e.data,
|
|
1088
1088
|
path: e.path,
|
|
@@ -1095,7 +1095,7 @@ function h(e, t) {
|
|
|
1095
1095
|
});
|
|
1096
1096
|
e.common.issues.push(r);
|
|
1097
1097
|
}
|
|
1098
|
-
var
|
|
1098
|
+
var _ = class e {
|
|
1099
1099
|
constructor() {
|
|
1100
1100
|
this.value = "valid";
|
|
1101
1101
|
}
|
|
@@ -1108,7 +1108,7 @@ var g = class e {
|
|
|
1108
1108
|
static mergeArray(e, t) {
|
|
1109
1109
|
let n = [];
|
|
1110
1110
|
for (let r of t) {
|
|
1111
|
-
if (r.status === "aborted") return
|
|
1111
|
+
if (r.status === "aborted") return v;
|
|
1112
1112
|
r.status === "dirty" && e.dirty(), n.push(r.value);
|
|
1113
1113
|
}
|
|
1114
1114
|
return {
|
|
@@ -1131,7 +1131,7 @@ var g = class e {
|
|
|
1131
1131
|
let n = {};
|
|
1132
1132
|
for (let r of t) {
|
|
1133
1133
|
let { key: t, value: i } = r;
|
|
1134
|
-
if (t.status === "aborted" || i.status === "aborted") return
|
|
1134
|
+
if (t.status === "aborted" || i.status === "aborted") return v;
|
|
1135
1135
|
t.status === "dirty" && e.dirty(), i.status === "dirty" && e.dirty(), t.value !== "__proto__" && (i.value !== void 0 || r.alwaysSet) && (n[t.value] = i.value);
|
|
1136
1136
|
}
|
|
1137
1137
|
return {
|
|
@@ -1139,7 +1139,7 @@ var g = class e {
|
|
|
1139
1139
|
value: n
|
|
1140
1140
|
};
|
|
1141
1141
|
}
|
|
1142
|
-
},
|
|
1142
|
+
}, v = Object.freeze({ status: "aborted" }), _e = (e) => ({
|
|
1143
1143
|
status: "dirty",
|
|
1144
1144
|
value: e
|
|
1145
1145
|
}), y = (e) => ({
|
|
@@ -1207,7 +1207,7 @@ var T = class {
|
|
|
1207
1207
|
}
|
|
1208
1208
|
_processInputParams(e) {
|
|
1209
1209
|
return {
|
|
1210
|
-
status: new
|
|
1210
|
+
status: new _(),
|
|
1211
1211
|
ctx: {
|
|
1212
1212
|
common: e.parent.common,
|
|
1213
1213
|
data: e.data,
|
|
@@ -1450,14 +1450,14 @@ var E = class e extends T {
|
|
|
1450
1450
|
_parse(e) {
|
|
1451
1451
|
if (this._def.coerce && (e.data = String(e.data)), this._getType(e) !== u.string) {
|
|
1452
1452
|
let t = this._getOrReturnCtx(e);
|
|
1453
|
-
return
|
|
1453
|
+
return g(t, {
|
|
1454
1454
|
code: f.invalid_type,
|
|
1455
1455
|
expected: u.string,
|
|
1456
1456
|
received: t.parsedType
|
|
1457
|
-
}),
|
|
1457
|
+
}), v;
|
|
1458
1458
|
}
|
|
1459
|
-
let t = new
|
|
1460
|
-
for (let r of this._def.checks) if (r.kind === "min") e.data.length < r.value && (n = this._getOrReturnCtx(e, n),
|
|
1459
|
+
let t = new _(), n;
|
|
1460
|
+
for (let r of this._def.checks) if (r.kind === "min") e.data.length < r.value && (n = this._getOrReturnCtx(e, n), g(n, {
|
|
1461
1461
|
code: f.too_small,
|
|
1462
1462
|
minimum: r.value,
|
|
1463
1463
|
type: "string",
|
|
@@ -1465,7 +1465,7 @@ var E = class e extends T {
|
|
|
1465
1465
|
exact: !1,
|
|
1466
1466
|
message: r.message
|
|
1467
1467
|
}), t.dirty());
|
|
1468
|
-
else if (r.kind === "max") e.data.length > r.value && (n = this._getOrReturnCtx(e, n),
|
|
1468
|
+
else if (r.kind === "max") e.data.length > r.value && (n = this._getOrReturnCtx(e, n), g(n, {
|
|
1469
1469
|
code: f.too_big,
|
|
1470
1470
|
maximum: r.value,
|
|
1471
1471
|
type: "string",
|
|
@@ -1475,14 +1475,14 @@ var E = class e extends T {
|
|
|
1475
1475
|
}), t.dirty());
|
|
1476
1476
|
else if (r.kind === "length") {
|
|
1477
1477
|
let i = e.data.length > r.value, a = e.data.length < r.value;
|
|
1478
|
-
(i || a) && (n = this._getOrReturnCtx(e, n), i ?
|
|
1478
|
+
(i || a) && (n = this._getOrReturnCtx(e, n), i ? g(n, {
|
|
1479
1479
|
code: f.too_big,
|
|
1480
1480
|
maximum: r.value,
|
|
1481
1481
|
type: "string",
|
|
1482
1482
|
inclusive: !0,
|
|
1483
1483
|
exact: !0,
|
|
1484
1484
|
message: r.message
|
|
1485
|
-
}) : a &&
|
|
1485
|
+
}) : a && g(n, {
|
|
1486
1486
|
code: f.too_small,
|
|
1487
1487
|
minimum: r.value,
|
|
1488
1488
|
type: "string",
|
|
@@ -1490,37 +1490,37 @@ var E = class e extends T {
|
|
|
1490
1490
|
exact: !0,
|
|
1491
1491
|
message: r.message
|
|
1492
1492
|
}), t.dirty());
|
|
1493
|
-
} else if (r.kind === "email") Oe.test(e.data) || (n = this._getOrReturnCtx(e, n),
|
|
1493
|
+
} else if (r.kind === "email") Oe.test(e.data) || (n = this._getOrReturnCtx(e, n), g(n, {
|
|
1494
1494
|
validation: "email",
|
|
1495
1495
|
code: f.invalid_string,
|
|
1496
1496
|
message: r.message
|
|
1497
1497
|
}), t.dirty());
|
|
1498
|
-
else if (r.kind === "emoji") Ae ||= new RegExp(ke, "u"), Ae.test(e.data) || (n = this._getOrReturnCtx(e, n),
|
|
1498
|
+
else if (r.kind === "emoji") Ae ||= new RegExp(ke, "u"), Ae.test(e.data) || (n = this._getOrReturnCtx(e, n), g(n, {
|
|
1499
1499
|
validation: "emoji",
|
|
1500
1500
|
code: f.invalid_string,
|
|
1501
1501
|
message: r.message
|
|
1502
1502
|
}), t.dirty());
|
|
1503
|
-
else if (r.kind === "uuid") we.test(e.data) || (n = this._getOrReturnCtx(e, n),
|
|
1503
|
+
else if (r.kind === "uuid") we.test(e.data) || (n = this._getOrReturnCtx(e, n), g(n, {
|
|
1504
1504
|
validation: "uuid",
|
|
1505
1505
|
code: f.invalid_string,
|
|
1506
1506
|
message: r.message
|
|
1507
1507
|
}), t.dirty());
|
|
1508
|
-
else if (r.kind === "nanoid") Te.test(e.data) || (n = this._getOrReturnCtx(e, n),
|
|
1508
|
+
else if (r.kind === "nanoid") Te.test(e.data) || (n = this._getOrReturnCtx(e, n), g(n, {
|
|
1509
1509
|
validation: "nanoid",
|
|
1510
1510
|
code: f.invalid_string,
|
|
1511
1511
|
message: r.message
|
|
1512
1512
|
}), t.dirty());
|
|
1513
|
-
else if (r.kind === "cuid") xe.test(e.data) || (n = this._getOrReturnCtx(e, n),
|
|
1513
|
+
else if (r.kind === "cuid") xe.test(e.data) || (n = this._getOrReturnCtx(e, n), g(n, {
|
|
1514
1514
|
validation: "cuid",
|
|
1515
1515
|
code: f.invalid_string,
|
|
1516
1516
|
message: r.message
|
|
1517
1517
|
}), t.dirty());
|
|
1518
|
-
else if (r.kind === "cuid2") Se.test(e.data) || (n = this._getOrReturnCtx(e, n),
|
|
1518
|
+
else if (r.kind === "cuid2") Se.test(e.data) || (n = this._getOrReturnCtx(e, n), g(n, {
|
|
1519
1519
|
validation: "cuid2",
|
|
1520
1520
|
code: f.invalid_string,
|
|
1521
1521
|
message: r.message
|
|
1522
1522
|
}), t.dirty());
|
|
1523
|
-
else if (r.kind === "ulid") Ce.test(e.data) || (n = this._getOrReturnCtx(e, n),
|
|
1523
|
+
else if (r.kind === "ulid") Ce.test(e.data) || (n = this._getOrReturnCtx(e, n), g(n, {
|
|
1524
1524
|
validation: "ulid",
|
|
1525
1525
|
code: f.invalid_string,
|
|
1526
1526
|
message: r.message
|
|
@@ -1528,64 +1528,64 @@ var E = class e extends T {
|
|
|
1528
1528
|
else if (r.kind === "url") try {
|
|
1529
1529
|
new URL(e.data);
|
|
1530
1530
|
} catch {
|
|
1531
|
-
n = this._getOrReturnCtx(e, n),
|
|
1531
|
+
n = this._getOrReturnCtx(e, n), g(n, {
|
|
1532
1532
|
validation: "url",
|
|
1533
1533
|
code: f.invalid_string,
|
|
1534
1534
|
message: r.message
|
|
1535
1535
|
}), t.dirty();
|
|
1536
1536
|
}
|
|
1537
|
-
else r.kind === "regex" ? (r.regex.lastIndex = 0, r.regex.test(e.data) || (n = this._getOrReturnCtx(e, n),
|
|
1537
|
+
else r.kind === "regex" ? (r.regex.lastIndex = 0, r.regex.test(e.data) || (n = this._getOrReturnCtx(e, n), g(n, {
|
|
1538
1538
|
validation: "regex",
|
|
1539
1539
|
code: f.invalid_string,
|
|
1540
1540
|
message: r.message
|
|
1541
|
-
}), t.dirty())) : r.kind === "trim" ? e.data = e.data.trim() : r.kind === "includes" ? e.data.includes(r.value, r.position) || (n = this._getOrReturnCtx(e, n),
|
|
1541
|
+
}), t.dirty())) : r.kind === "trim" ? e.data = e.data.trim() : r.kind === "includes" ? e.data.includes(r.value, r.position) || (n = this._getOrReturnCtx(e, n), g(n, {
|
|
1542
1542
|
code: f.invalid_string,
|
|
1543
1543
|
validation: {
|
|
1544
1544
|
includes: r.value,
|
|
1545
1545
|
position: r.position
|
|
1546
1546
|
},
|
|
1547
1547
|
message: r.message
|
|
1548
|
-
}), t.dirty()) : r.kind === "toLowerCase" ? e.data = e.data.toLowerCase() : r.kind === "toUpperCase" ? e.data = e.data.toUpperCase() : r.kind === "startsWith" ? e.data.startsWith(r.value) || (n = this._getOrReturnCtx(e, n),
|
|
1548
|
+
}), t.dirty()) : r.kind === "toLowerCase" ? e.data = e.data.toLowerCase() : r.kind === "toUpperCase" ? e.data = e.data.toUpperCase() : r.kind === "startsWith" ? e.data.startsWith(r.value) || (n = this._getOrReturnCtx(e, n), g(n, {
|
|
1549
1549
|
code: f.invalid_string,
|
|
1550
1550
|
validation: { startsWith: r.value },
|
|
1551
1551
|
message: r.message
|
|
1552
|
-
}), t.dirty()) : r.kind === "endsWith" ? e.data.endsWith(r.value) || (n = this._getOrReturnCtx(e, n),
|
|
1552
|
+
}), t.dirty()) : r.kind === "endsWith" ? e.data.endsWith(r.value) || (n = this._getOrReturnCtx(e, n), g(n, {
|
|
1553
1553
|
code: f.invalid_string,
|
|
1554
1554
|
validation: { endsWith: r.value },
|
|
1555
1555
|
message: r.message
|
|
1556
|
-
}), t.dirty()) : r.kind === "datetime" ? Ve(r).test(e.data) || (n = this._getOrReturnCtx(e, n),
|
|
1556
|
+
}), t.dirty()) : r.kind === "datetime" ? Ve(r).test(e.data) || (n = this._getOrReturnCtx(e, n), g(n, {
|
|
1557
1557
|
code: f.invalid_string,
|
|
1558
1558
|
validation: "datetime",
|
|
1559
1559
|
message: r.message
|
|
1560
|
-
}), t.dirty()) : r.kind === "date" ? Re.test(e.data) || (n = this._getOrReturnCtx(e, n),
|
|
1560
|
+
}), t.dirty()) : r.kind === "date" ? Re.test(e.data) || (n = this._getOrReturnCtx(e, n), g(n, {
|
|
1561
1561
|
code: f.invalid_string,
|
|
1562
1562
|
validation: "date",
|
|
1563
1563
|
message: r.message
|
|
1564
|
-
}), t.dirty()) : r.kind === "time" ? Be(r).test(e.data) || (n = this._getOrReturnCtx(e, n),
|
|
1564
|
+
}), t.dirty()) : r.kind === "time" ? Be(r).test(e.data) || (n = this._getOrReturnCtx(e, n), g(n, {
|
|
1565
1565
|
code: f.invalid_string,
|
|
1566
1566
|
validation: "time",
|
|
1567
1567
|
message: r.message
|
|
1568
|
-
}), t.dirty()) : r.kind === "duration" ? De.test(e.data) || (n = this._getOrReturnCtx(e, n),
|
|
1568
|
+
}), t.dirty()) : r.kind === "duration" ? De.test(e.data) || (n = this._getOrReturnCtx(e, n), g(n, {
|
|
1569
1569
|
validation: "duration",
|
|
1570
1570
|
code: f.invalid_string,
|
|
1571
1571
|
message: r.message
|
|
1572
|
-
}), t.dirty()) : r.kind === "ip" ? He(e.data, r.version) || (n = this._getOrReturnCtx(e, n),
|
|
1572
|
+
}), t.dirty()) : r.kind === "ip" ? He(e.data, r.version) || (n = this._getOrReturnCtx(e, n), g(n, {
|
|
1573
1573
|
validation: "ip",
|
|
1574
1574
|
code: f.invalid_string,
|
|
1575
1575
|
message: r.message
|
|
1576
|
-
}), t.dirty()) : r.kind === "jwt" ? Ue(e.data, r.alg) || (n = this._getOrReturnCtx(e, n),
|
|
1576
|
+
}), t.dirty()) : r.kind === "jwt" ? Ue(e.data, r.alg) || (n = this._getOrReturnCtx(e, n), g(n, {
|
|
1577
1577
|
validation: "jwt",
|
|
1578
1578
|
code: f.invalid_string,
|
|
1579
1579
|
message: r.message
|
|
1580
|
-
}), t.dirty()) : r.kind === "cidr" ? We(e.data, r.version) || (n = this._getOrReturnCtx(e, n),
|
|
1580
|
+
}), t.dirty()) : r.kind === "cidr" ? We(e.data, r.version) || (n = this._getOrReturnCtx(e, n), g(n, {
|
|
1581
1581
|
validation: "cidr",
|
|
1582
1582
|
code: f.invalid_string,
|
|
1583
1583
|
message: r.message
|
|
1584
|
-
}), t.dirty()) : r.kind === "base64" ? Fe.test(e.data) || (n = this._getOrReturnCtx(e, n),
|
|
1584
|
+
}), t.dirty()) : r.kind === "base64" ? Fe.test(e.data) || (n = this._getOrReturnCtx(e, n), g(n, {
|
|
1585
1585
|
validation: "base64",
|
|
1586
1586
|
code: f.invalid_string,
|
|
1587
1587
|
message: r.message
|
|
1588
|
-
}), t.dirty()) : r.kind === "base64url" ? Ie.test(e.data) || (n = this._getOrReturnCtx(e, n),
|
|
1588
|
+
}), t.dirty()) : r.kind === "base64url" ? Ie.test(e.data) || (n = this._getOrReturnCtx(e, n), g(n, {
|
|
1589
1589
|
validation: "base64url",
|
|
1590
1590
|
code: f.invalid_string,
|
|
1591
1591
|
message: r.message
|
|
@@ -1871,37 +1871,37 @@ var Ke = class e extends T {
|
|
|
1871
1871
|
_parse(e) {
|
|
1872
1872
|
if (this._def.coerce && (e.data = Number(e.data)), this._getType(e) !== u.number) {
|
|
1873
1873
|
let t = this._getOrReturnCtx(e);
|
|
1874
|
-
return
|
|
1874
|
+
return g(t, {
|
|
1875
1875
|
code: f.invalid_type,
|
|
1876
1876
|
expected: u.number,
|
|
1877
1877
|
received: t.parsedType
|
|
1878
|
-
}),
|
|
1878
|
+
}), v;
|
|
1879
1879
|
}
|
|
1880
|
-
let t, n = new
|
|
1881
|
-
for (let r of this._def.checks) r.kind === "int" ? l.isInteger(e.data) || (t = this._getOrReturnCtx(e, t),
|
|
1880
|
+
let t, n = new _();
|
|
1881
|
+
for (let r of this._def.checks) r.kind === "int" ? l.isInteger(e.data) || (t = this._getOrReturnCtx(e, t), g(t, {
|
|
1882
1882
|
code: f.invalid_type,
|
|
1883
1883
|
expected: "integer",
|
|
1884
1884
|
received: "float",
|
|
1885
1885
|
message: r.message
|
|
1886
|
-
}), n.dirty()) : r.kind === "min" ? (r.inclusive ? e.data < r.value : e.data <= r.value) && (t = this._getOrReturnCtx(e, t),
|
|
1886
|
+
}), n.dirty()) : r.kind === "min" ? (r.inclusive ? e.data < r.value : e.data <= r.value) && (t = this._getOrReturnCtx(e, t), g(t, {
|
|
1887
1887
|
code: f.too_small,
|
|
1888
1888
|
minimum: r.value,
|
|
1889
1889
|
type: "number",
|
|
1890
1890
|
inclusive: r.inclusive,
|
|
1891
1891
|
exact: !1,
|
|
1892
1892
|
message: r.message
|
|
1893
|
-
}), n.dirty()) : r.kind === "max" ? (r.inclusive ? e.data > r.value : e.data >= r.value) && (t = this._getOrReturnCtx(e, t),
|
|
1893
|
+
}), n.dirty()) : r.kind === "max" ? (r.inclusive ? e.data > r.value : e.data >= r.value) && (t = this._getOrReturnCtx(e, t), g(t, {
|
|
1894
1894
|
code: f.too_big,
|
|
1895
1895
|
maximum: r.value,
|
|
1896
1896
|
type: "number",
|
|
1897
1897
|
inclusive: r.inclusive,
|
|
1898
1898
|
exact: !1,
|
|
1899
1899
|
message: r.message
|
|
1900
|
-
}), n.dirty()) : r.kind === "multipleOf" ? Ge(e.data, r.value) !== 0 && (t = this._getOrReturnCtx(e, t),
|
|
1900
|
+
}), n.dirty()) : r.kind === "multipleOf" ? Ge(e.data, r.value) !== 0 && (t = this._getOrReturnCtx(e, t), g(t, {
|
|
1901
1901
|
code: f.not_multiple_of,
|
|
1902
1902
|
multipleOf: r.value,
|
|
1903
1903
|
message: r.message
|
|
1904
|
-
}), n.dirty()) : r.kind === "finite" ? Number.isFinite(e.data) || (t = this._getOrReturnCtx(e, t),
|
|
1904
|
+
}), n.dirty()) : r.kind === "finite" ? Number.isFinite(e.data) || (t = this._getOrReturnCtx(e, t), g(t, {
|
|
1905
1905
|
code: f.not_finite,
|
|
1906
1906
|
message: r.message
|
|
1907
1907
|
}), n.dirty()) : l.assertNever(r);
|
|
@@ -2040,20 +2040,20 @@ var qe = class e extends T {
|
|
|
2040
2040
|
return this._getInvalidInput(e);
|
|
2041
2041
|
}
|
|
2042
2042
|
if (this._getType(e) !== u.bigint) return this._getInvalidInput(e);
|
|
2043
|
-
let t, n = new
|
|
2044
|
-
for (let r of this._def.checks) r.kind === "min" ? (r.inclusive ? e.data < r.value : e.data <= r.value) && (t = this._getOrReturnCtx(e, t),
|
|
2043
|
+
let t, n = new _();
|
|
2044
|
+
for (let r of this._def.checks) r.kind === "min" ? (r.inclusive ? e.data < r.value : e.data <= r.value) && (t = this._getOrReturnCtx(e, t), g(t, {
|
|
2045
2045
|
code: f.too_small,
|
|
2046
2046
|
type: "bigint",
|
|
2047
2047
|
minimum: r.value,
|
|
2048
2048
|
inclusive: r.inclusive,
|
|
2049
2049
|
message: r.message
|
|
2050
|
-
}), n.dirty()) : r.kind === "max" ? (r.inclusive ? e.data > r.value : e.data >= r.value) && (t = this._getOrReturnCtx(e, t),
|
|
2050
|
+
}), n.dirty()) : r.kind === "max" ? (r.inclusive ? e.data > r.value : e.data >= r.value) && (t = this._getOrReturnCtx(e, t), g(t, {
|
|
2051
2051
|
code: f.too_big,
|
|
2052
2052
|
type: "bigint",
|
|
2053
2053
|
maximum: r.value,
|
|
2054
2054
|
inclusive: r.inclusive,
|
|
2055
2055
|
message: r.message
|
|
2056
|
-
}), n.dirty()) : r.kind === "multipleOf" ? e.data % r.value !== BigInt(0) && (t = this._getOrReturnCtx(e, t),
|
|
2056
|
+
}), n.dirty()) : r.kind === "multipleOf" ? e.data % r.value !== BigInt(0) && (t = this._getOrReturnCtx(e, t), g(t, {
|
|
2057
2057
|
code: f.not_multiple_of,
|
|
2058
2058
|
multipleOf: r.value,
|
|
2059
2059
|
message: r.message
|
|
@@ -2065,11 +2065,11 @@ var qe = class e extends T {
|
|
|
2065
2065
|
}
|
|
2066
2066
|
_getInvalidInput(e) {
|
|
2067
2067
|
let t = this._getOrReturnCtx(e);
|
|
2068
|
-
return
|
|
2068
|
+
return g(t, {
|
|
2069
2069
|
code: f.invalid_type,
|
|
2070
2070
|
expected: u.bigint,
|
|
2071
2071
|
received: t.parsedType
|
|
2072
|
-
}),
|
|
2072
|
+
}), v;
|
|
2073
2073
|
}
|
|
2074
2074
|
gte(e, t) {
|
|
2075
2075
|
return this.setLimit("min", e, !0, S.toString(t));
|
|
@@ -2160,11 +2160,11 @@ var Je = class extends T {
|
|
|
2160
2160
|
_parse(e) {
|
|
2161
2161
|
if (this._def.coerce && (e.data = !!e.data), this._getType(e) !== u.boolean) {
|
|
2162
2162
|
let t = this._getOrReturnCtx(e);
|
|
2163
|
-
return
|
|
2163
|
+
return g(t, {
|
|
2164
2164
|
code: f.invalid_type,
|
|
2165
2165
|
expected: u.boolean,
|
|
2166
2166
|
received: t.parsedType
|
|
2167
|
-
}),
|
|
2167
|
+
}), v;
|
|
2168
2168
|
}
|
|
2169
2169
|
return y(e.data);
|
|
2170
2170
|
}
|
|
@@ -2178,22 +2178,22 @@ var Ye = class e extends T {
|
|
|
2178
2178
|
_parse(e) {
|
|
2179
2179
|
if (this._def.coerce && (e.data = new Date(e.data)), this._getType(e) !== u.date) {
|
|
2180
2180
|
let t = this._getOrReturnCtx(e);
|
|
2181
|
-
return
|
|
2181
|
+
return g(t, {
|
|
2182
2182
|
code: f.invalid_type,
|
|
2183
2183
|
expected: u.date,
|
|
2184
2184
|
received: t.parsedType
|
|
2185
|
-
}),
|
|
2185
|
+
}), v;
|
|
2186
2186
|
}
|
|
2187
|
-
if (Number.isNaN(e.data.getTime())) return
|
|
2188
|
-
let t = new
|
|
2189
|
-
for (let r of this._def.checks) r.kind === "min" ? e.data.getTime() < r.value && (n = this._getOrReturnCtx(e, n),
|
|
2187
|
+
if (Number.isNaN(e.data.getTime())) return g(this._getOrReturnCtx(e), { code: f.invalid_date }), v;
|
|
2188
|
+
let t = new _(), n;
|
|
2189
|
+
for (let r of this._def.checks) r.kind === "min" ? e.data.getTime() < r.value && (n = this._getOrReturnCtx(e, n), g(n, {
|
|
2190
2190
|
code: f.too_small,
|
|
2191
2191
|
message: r.message,
|
|
2192
2192
|
inclusive: !0,
|
|
2193
2193
|
exact: !1,
|
|
2194
2194
|
minimum: r.value,
|
|
2195
2195
|
type: "date"
|
|
2196
|
-
}), t.dirty()) : r.kind === "max" ? e.data.getTime() > r.value && (n = this._getOrReturnCtx(e, n),
|
|
2196
|
+
}), t.dirty()) : r.kind === "max" ? e.data.getTime() > r.value && (n = this._getOrReturnCtx(e, n), g(n, {
|
|
2197
2197
|
code: f.too_big,
|
|
2198
2198
|
message: r.message,
|
|
2199
2199
|
inclusive: !0,
|
|
@@ -2247,11 +2247,11 @@ var Xe = class extends T {
|
|
|
2247
2247
|
_parse(e) {
|
|
2248
2248
|
if (this._getType(e) !== u.symbol) {
|
|
2249
2249
|
let t = this._getOrReturnCtx(e);
|
|
2250
|
-
return
|
|
2250
|
+
return g(t, {
|
|
2251
2251
|
code: f.invalid_type,
|
|
2252
2252
|
expected: u.symbol,
|
|
2253
2253
|
received: t.parsedType
|
|
2254
|
-
}),
|
|
2254
|
+
}), v;
|
|
2255
2255
|
}
|
|
2256
2256
|
return y(e.data);
|
|
2257
2257
|
}
|
|
@@ -2264,11 +2264,11 @@ var D = class extends T {
|
|
|
2264
2264
|
_parse(e) {
|
|
2265
2265
|
if (this._getType(e) !== u.undefined) {
|
|
2266
2266
|
let t = this._getOrReturnCtx(e);
|
|
2267
|
-
return
|
|
2267
|
+
return g(t, {
|
|
2268
2268
|
code: f.invalid_type,
|
|
2269
2269
|
expected: u.undefined,
|
|
2270
2270
|
received: t.parsedType
|
|
2271
|
-
}),
|
|
2271
|
+
}), v;
|
|
2272
2272
|
}
|
|
2273
2273
|
return y(e.data);
|
|
2274
2274
|
}
|
|
@@ -2281,11 +2281,11 @@ var O = class extends T {
|
|
|
2281
2281
|
_parse(e) {
|
|
2282
2282
|
if (this._getType(e) !== u.null) {
|
|
2283
2283
|
let t = this._getOrReturnCtx(e);
|
|
2284
|
-
return
|
|
2284
|
+
return g(t, {
|
|
2285
2285
|
code: f.invalid_type,
|
|
2286
2286
|
expected: u.null,
|
|
2287
2287
|
received: t.parsedType
|
|
2288
|
-
}),
|
|
2288
|
+
}), v;
|
|
2289
2289
|
}
|
|
2290
2290
|
return y(e.data);
|
|
2291
2291
|
}
|
|
@@ -2321,11 +2321,11 @@ k.create = (e) => new k({
|
|
|
2321
2321
|
var A = class extends T {
|
|
2322
2322
|
_parse(e) {
|
|
2323
2323
|
let t = this._getOrReturnCtx(e);
|
|
2324
|
-
return
|
|
2324
|
+
return g(t, {
|
|
2325
2325
|
code: f.invalid_type,
|
|
2326
2326
|
expected: u.never,
|
|
2327
2327
|
received: t.parsedType
|
|
2328
|
-
}),
|
|
2328
|
+
}), v;
|
|
2329
2329
|
}
|
|
2330
2330
|
};
|
|
2331
2331
|
A.create = (e) => new A({
|
|
@@ -2336,11 +2336,11 @@ var Qe = class extends T {
|
|
|
2336
2336
|
_parse(e) {
|
|
2337
2337
|
if (this._getType(e) !== u.undefined) {
|
|
2338
2338
|
let t = this._getOrReturnCtx(e);
|
|
2339
|
-
return
|
|
2339
|
+
return g(t, {
|
|
2340
2340
|
code: f.invalid_type,
|
|
2341
2341
|
expected: u.void,
|
|
2342
2342
|
received: t.parsedType
|
|
2343
|
-
}),
|
|
2343
|
+
}), v;
|
|
2344
2344
|
}
|
|
2345
2345
|
return y(e.data);
|
|
2346
2346
|
}
|
|
@@ -2352,14 +2352,14 @@ Qe.create = (e) => new Qe({
|
|
|
2352
2352
|
var j = class e extends T {
|
|
2353
2353
|
_parse(e) {
|
|
2354
2354
|
let { ctx: t, status: n } = this._processInputParams(e), r = this._def;
|
|
2355
|
-
if (t.parsedType !== u.array) return
|
|
2355
|
+
if (t.parsedType !== u.array) return g(t, {
|
|
2356
2356
|
code: f.invalid_type,
|
|
2357
2357
|
expected: u.array,
|
|
2358
2358
|
received: t.parsedType
|
|
2359
|
-
}),
|
|
2359
|
+
}), v;
|
|
2360
2360
|
if (r.exactLength !== null) {
|
|
2361
2361
|
let e = t.data.length > r.exactLength.value, i = t.data.length < r.exactLength.value;
|
|
2362
|
-
(e || i) && (
|
|
2362
|
+
(e || i) && (g(t, {
|
|
2363
2363
|
code: e ? f.too_big : f.too_small,
|
|
2364
2364
|
minimum: i ? r.exactLength.value : void 0,
|
|
2365
2365
|
maximum: e ? r.exactLength.value : void 0,
|
|
@@ -2369,23 +2369,23 @@ var j = class e extends T {
|
|
|
2369
2369
|
message: r.exactLength.message
|
|
2370
2370
|
}), n.dirty());
|
|
2371
2371
|
}
|
|
2372
|
-
if (r.minLength !== null && t.data.length < r.minLength.value && (
|
|
2372
|
+
if (r.minLength !== null && t.data.length < r.minLength.value && (g(t, {
|
|
2373
2373
|
code: f.too_small,
|
|
2374
2374
|
minimum: r.minLength.value,
|
|
2375
2375
|
type: "array",
|
|
2376
2376
|
inclusive: !0,
|
|
2377
2377
|
exact: !1,
|
|
2378
2378
|
message: r.minLength.message
|
|
2379
|
-
}), n.dirty()), r.maxLength !== null && t.data.length > r.maxLength.value && (
|
|
2379
|
+
}), n.dirty()), r.maxLength !== null && t.data.length > r.maxLength.value && (g(t, {
|
|
2380
2380
|
code: f.too_big,
|
|
2381
2381
|
maximum: r.maxLength.value,
|
|
2382
2382
|
type: "array",
|
|
2383
2383
|
inclusive: !0,
|
|
2384
2384
|
exact: !1,
|
|
2385
2385
|
message: r.maxLength.message
|
|
2386
|
-
}), n.dirty()), t.common.async) return Promise.all([...t.data].map((e, n) => r.type._parseAsync(new C(t, e, t.path, n)))).then((e) =>
|
|
2386
|
+
}), n.dirty()), t.common.async) return Promise.all([...t.data].map((e, n) => r.type._parseAsync(new C(t, e, t.path, n)))).then((e) => _.mergeArray(n, e));
|
|
2387
2387
|
let i = [...t.data].map((e, n) => r.type._parseSync(new C(t, e, t.path, n)));
|
|
2388
|
-
return
|
|
2388
|
+
return _.mergeArray(n, i);
|
|
2389
2389
|
}
|
|
2390
2390
|
get element() {
|
|
2391
2391
|
return this._def.type;
|
|
@@ -2461,11 +2461,11 @@ var N = class e extends T {
|
|
|
2461
2461
|
_parse(e) {
|
|
2462
2462
|
if (this._getType(e) !== u.object) {
|
|
2463
2463
|
let t = this._getOrReturnCtx(e);
|
|
2464
|
-
return
|
|
2464
|
+
return g(t, {
|
|
2465
2465
|
code: f.invalid_type,
|
|
2466
2466
|
expected: u.object,
|
|
2467
2467
|
received: t.parsedType
|
|
2468
|
-
}),
|
|
2468
|
+
}), v;
|
|
2469
2469
|
}
|
|
2470
2470
|
let { status: t, ctx: n } = this._processInputParams(e), { shape: r, keys: i } = this._getCached(), a = [];
|
|
2471
2471
|
if (!(this._def.catchall instanceof A && this._def.unknownKeys === "strip")) for (let e in n.data) i.includes(e) || a.push(e);
|
|
@@ -2493,7 +2493,7 @@ var N = class e extends T {
|
|
|
2493
2493
|
value: n.data[e]
|
|
2494
2494
|
}
|
|
2495
2495
|
});
|
|
2496
|
-
else if (e === "strict") a.length > 0 && (
|
|
2496
|
+
else if (e === "strict") a.length > 0 && (g(n, {
|
|
2497
2497
|
code: f.unrecognized_keys,
|
|
2498
2498
|
keys: a
|
|
2499
2499
|
}), t.dirty());
|
|
@@ -2523,7 +2523,7 @@ var N = class e extends T {
|
|
|
2523
2523
|
});
|
|
2524
2524
|
}
|
|
2525
2525
|
return e;
|
|
2526
|
-
}).then((e) =>
|
|
2526
|
+
}).then((e) => _.mergeObjectSync(t, e)) : _.mergeObjectSync(t, o);
|
|
2527
2527
|
}
|
|
2528
2528
|
get shape() {
|
|
2529
2529
|
return this._def.shape();
|
|
@@ -2652,10 +2652,10 @@ var P = class extends T {
|
|
|
2652
2652
|
for (let t of e) if (t.result.status === "valid") return t.result;
|
|
2653
2653
|
for (let n of e) if (n.result.status === "dirty") return t.common.issues.push(...n.ctx.common.issues), n.result;
|
|
2654
2654
|
let n = e.map((e) => new p(e.ctx.common.issues));
|
|
2655
|
-
return
|
|
2655
|
+
return g(t, {
|
|
2656
2656
|
code: f.invalid_union,
|
|
2657
2657
|
unionErrors: n
|
|
2658
|
-
}),
|
|
2658
|
+
}), v;
|
|
2659
2659
|
}
|
|
2660
2660
|
if (t.common.async) return Promise.all(n.map(async (e) => {
|
|
2661
2661
|
let n = {
|
|
@@ -2698,10 +2698,10 @@ var P = class extends T {
|
|
|
2698
2698
|
}
|
|
2699
2699
|
if (e) return t.common.issues.push(...e.ctx.common.issues), e.result;
|
|
2700
2700
|
let i = r.map((e) => new p(e));
|
|
2701
|
-
return
|
|
2701
|
+
return g(t, {
|
|
2702
2702
|
code: f.invalid_union,
|
|
2703
2703
|
unionErrors: i
|
|
2704
|
-
}),
|
|
2704
|
+
}), v;
|
|
2705
2705
|
}
|
|
2706
2706
|
}
|
|
2707
2707
|
get options() {
|
|
@@ -2716,11 +2716,11 @@ P.create = (e, t) => new P({
|
|
|
2716
2716
|
var F = (e) => e instanceof R ? F(e.schema) : e instanceof U ? F(e.innerType()) : e instanceof z ? [e.value] : e instanceof B ? e.options : e instanceof V ? l.objectValues(e.enum) : e instanceof K ? F(e._def.innerType) : e instanceof D ? [void 0] : e instanceof O ? [null] : e instanceof W ? [void 0, ...F(e.unwrap())] : e instanceof G ? [null, ...F(e.unwrap())] : e instanceof st || e instanceof J ? F(e.unwrap()) : e instanceof q ? F(e._def.innerType) : [], $e = class e extends T {
|
|
2717
2717
|
_parse(e) {
|
|
2718
2718
|
let { ctx: t } = this._processInputParams(e);
|
|
2719
|
-
if (t.parsedType !== u.object) return
|
|
2719
|
+
if (t.parsedType !== u.object) return g(t, {
|
|
2720
2720
|
code: f.invalid_type,
|
|
2721
2721
|
expected: u.object,
|
|
2722
2722
|
received: t.parsedType
|
|
2723
|
-
}),
|
|
2723
|
+
}), v;
|
|
2724
2724
|
let n = this.discriminator, r = t.data[n], i = this.optionsMap.get(r);
|
|
2725
2725
|
return i ? t.common.async ? i._parseAsync({
|
|
2726
2726
|
data: t.data,
|
|
@@ -2730,11 +2730,11 @@ var F = (e) => e instanceof R ? F(e.schema) : e instanceof U ? F(e.innerType())
|
|
|
2730
2730
|
data: t.data,
|
|
2731
2731
|
path: t.path,
|
|
2732
2732
|
parent: t
|
|
2733
|
-
}) : (
|
|
2733
|
+
}) : (g(t, {
|
|
2734
2734
|
code: f.invalid_union_discriminator,
|
|
2735
2735
|
options: Array.from(this.optionsMap.keys()),
|
|
2736
2736
|
path: [n]
|
|
2737
|
-
}),
|
|
2737
|
+
}), v);
|
|
2738
2738
|
}
|
|
2739
2739
|
get discriminator() {
|
|
2740
2740
|
return this._def.discriminator;
|
|
@@ -2806,12 +2806,12 @@ function et(e, t) {
|
|
|
2806
2806
|
var I = class extends T {
|
|
2807
2807
|
_parse(e) {
|
|
2808
2808
|
let { status: t, ctx: n } = this._processInputParams(e), r = (e, r) => {
|
|
2809
|
-
if (ve(e) || ve(r)) return
|
|
2809
|
+
if (ve(e) || ve(r)) return v;
|
|
2810
2810
|
let i = et(e.value, r.value);
|
|
2811
2811
|
return i.valid ? ((ye(e) || ye(r)) && t.dirty(), {
|
|
2812
2812
|
status: t.value,
|
|
2813
2813
|
value: i.data
|
|
2814
|
-
}) : (
|
|
2814
|
+
}) : (g(n, { code: f.invalid_intersection_types }), v);
|
|
2815
2815
|
};
|
|
2816
2816
|
return n.common.async ? Promise.all([this._def.left._parseAsync({
|
|
2817
2817
|
data: n.data,
|
|
@@ -2841,19 +2841,19 @@ I.create = (e, t, n) => new I({
|
|
|
2841
2841
|
var L = class e extends T {
|
|
2842
2842
|
_parse(e) {
|
|
2843
2843
|
let { status: t, ctx: n } = this._processInputParams(e);
|
|
2844
|
-
if (n.parsedType !== u.array) return
|
|
2844
|
+
if (n.parsedType !== u.array) return g(n, {
|
|
2845
2845
|
code: f.invalid_type,
|
|
2846
2846
|
expected: u.array,
|
|
2847
2847
|
received: n.parsedType
|
|
2848
|
-
}),
|
|
2849
|
-
if (n.data.length < this._def.items.length) return
|
|
2848
|
+
}), v;
|
|
2849
|
+
if (n.data.length < this._def.items.length) return g(n, {
|
|
2850
2850
|
code: f.too_small,
|
|
2851
2851
|
minimum: this._def.items.length,
|
|
2852
2852
|
inclusive: !0,
|
|
2853
2853
|
exact: !1,
|
|
2854
2854
|
type: "array"
|
|
2855
|
-
}),
|
|
2856
|
-
!this._def.rest && n.data.length > this._def.items.length && (
|
|
2855
|
+
}), v;
|
|
2856
|
+
!this._def.rest && n.data.length > this._def.items.length && (g(n, {
|
|
2857
2857
|
code: f.too_big,
|
|
2858
2858
|
maximum: this._def.items.length,
|
|
2859
2859
|
inclusive: !0,
|
|
@@ -2864,7 +2864,7 @@ var L = class e extends T {
|
|
|
2864
2864
|
let r = this._def.items[t] || this._def.rest;
|
|
2865
2865
|
return r ? r._parse(new C(n, e, n.path, t)) : null;
|
|
2866
2866
|
}).filter((e) => !!e);
|
|
2867
|
-
return n.common.async ? Promise.all(r).then((e) =>
|
|
2867
|
+
return n.common.async ? Promise.all(r).then((e) => _.mergeArray(t, e)) : _.mergeArray(t, r);
|
|
2868
2868
|
}
|
|
2869
2869
|
get items() {
|
|
2870
2870
|
return this._def.items;
|
|
@@ -2894,18 +2894,18 @@ var tt = class e extends T {
|
|
|
2894
2894
|
}
|
|
2895
2895
|
_parse(e) {
|
|
2896
2896
|
let { status: t, ctx: n } = this._processInputParams(e);
|
|
2897
|
-
if (n.parsedType !== u.object) return
|
|
2897
|
+
if (n.parsedType !== u.object) return g(n, {
|
|
2898
2898
|
code: f.invalid_type,
|
|
2899
2899
|
expected: u.object,
|
|
2900
2900
|
received: n.parsedType
|
|
2901
|
-
}),
|
|
2901
|
+
}), v;
|
|
2902
2902
|
let r = [], i = this._def.keyType, a = this._def.valueType;
|
|
2903
2903
|
for (let e in n.data) r.push({
|
|
2904
2904
|
key: i._parse(new C(n, e, n.path, e)),
|
|
2905
2905
|
value: a._parse(new C(n, n.data[e], n.path, e)),
|
|
2906
2906
|
alwaysSet: e in n.data
|
|
2907
2907
|
});
|
|
2908
|
-
return n.common.async ?
|
|
2908
|
+
return n.common.async ? _.mergeObjectAsync(t, r) : _.mergeObjectSync(t, r);
|
|
2909
2909
|
}
|
|
2910
2910
|
get element() {
|
|
2911
2911
|
return this._def.valueType;
|
|
@@ -2932,11 +2932,11 @@ var tt = class e extends T {
|
|
|
2932
2932
|
}
|
|
2933
2933
|
_parse(e) {
|
|
2934
2934
|
let { status: t, ctx: n } = this._processInputParams(e);
|
|
2935
|
-
if (n.parsedType !== u.map) return
|
|
2935
|
+
if (n.parsedType !== u.map) return g(n, {
|
|
2936
2936
|
code: f.invalid_type,
|
|
2937
2937
|
expected: u.map,
|
|
2938
2938
|
received: n.parsedType
|
|
2939
|
-
}),
|
|
2939
|
+
}), v;
|
|
2940
2940
|
let r = this._def.keyType, i = this._def.valueType, a = [...n.data.entries()].map(([e, t], a) => ({
|
|
2941
2941
|
key: r._parse(new C(n, e, n.path, [a, "key"])),
|
|
2942
2942
|
value: i._parse(new C(n, t, n.path, [a, "value"]))
|
|
@@ -2946,7 +2946,7 @@ var tt = class e extends T {
|
|
|
2946
2946
|
return Promise.resolve().then(async () => {
|
|
2947
2947
|
for (let n of a) {
|
|
2948
2948
|
let r = await n.key, i = await n.value;
|
|
2949
|
-
if (r.status === "aborted" || i.status === "aborted") return
|
|
2949
|
+
if (r.status === "aborted" || i.status === "aborted") return v;
|
|
2950
2950
|
(r.status === "dirty" || i.status === "dirty") && t.dirty(), e.set(r.value, i.value);
|
|
2951
2951
|
}
|
|
2952
2952
|
return {
|
|
@@ -2959,7 +2959,7 @@ var tt = class e extends T {
|
|
|
2959
2959
|
let e = /* @__PURE__ */ new Map();
|
|
2960
2960
|
for (let n of a) {
|
|
2961
2961
|
let r = n.key, i = n.value;
|
|
2962
|
-
if (r.status === "aborted" || i.status === "aborted") return
|
|
2962
|
+
if (r.status === "aborted" || i.status === "aborted") return v;
|
|
2963
2963
|
(r.status === "dirty" || i.status === "dirty") && t.dirty(), e.set(r.value, i.value);
|
|
2964
2964
|
}
|
|
2965
2965
|
return {
|
|
@@ -2978,20 +2978,20 @@ nt.create = (e, t, n) => new nt({
|
|
|
2978
2978
|
var rt = class e extends T {
|
|
2979
2979
|
_parse(e) {
|
|
2980
2980
|
let { status: t, ctx: n } = this._processInputParams(e);
|
|
2981
|
-
if (n.parsedType !== u.set) return
|
|
2981
|
+
if (n.parsedType !== u.set) return g(n, {
|
|
2982
2982
|
code: f.invalid_type,
|
|
2983
2983
|
expected: u.set,
|
|
2984
2984
|
received: n.parsedType
|
|
2985
|
-
}),
|
|
2985
|
+
}), v;
|
|
2986
2986
|
let r = this._def;
|
|
2987
|
-
r.minSize !== null && n.data.size < r.minSize.value && (
|
|
2987
|
+
r.minSize !== null && n.data.size < r.minSize.value && (g(n, {
|
|
2988
2988
|
code: f.too_small,
|
|
2989
2989
|
minimum: r.minSize.value,
|
|
2990
2990
|
type: "set",
|
|
2991
2991
|
inclusive: !0,
|
|
2992
2992
|
exact: !1,
|
|
2993
2993
|
message: r.minSize.message
|
|
2994
|
-
}), t.dirty()), r.maxSize !== null && n.data.size > r.maxSize.value && (
|
|
2994
|
+
}), t.dirty()), r.maxSize !== null && n.data.size > r.maxSize.value && (g(n, {
|
|
2995
2995
|
code: f.too_big,
|
|
2996
2996
|
maximum: r.maxSize.value,
|
|
2997
2997
|
type: "set",
|
|
@@ -3003,7 +3003,7 @@ var rt = class e extends T {
|
|
|
3003
3003
|
function a(e) {
|
|
3004
3004
|
let n = /* @__PURE__ */ new Set();
|
|
3005
3005
|
for (let r of e) {
|
|
3006
|
-
if (r.status === "aborted") return
|
|
3006
|
+
if (r.status === "aborted") return v;
|
|
3007
3007
|
r.status === "dirty" && t.dirty(), n.add(r.value);
|
|
3008
3008
|
}
|
|
3009
3009
|
return {
|
|
@@ -3052,13 +3052,13 @@ var it = class e extends T {
|
|
|
3052
3052
|
}
|
|
3053
3053
|
_parse(e) {
|
|
3054
3054
|
let { ctx: t } = this._processInputParams(e);
|
|
3055
|
-
if (t.parsedType !== u.function) return
|
|
3055
|
+
if (t.parsedType !== u.function) return g(t, {
|
|
3056
3056
|
code: f.invalid_type,
|
|
3057
3057
|
expected: u.function,
|
|
3058
3058
|
received: t.parsedType
|
|
3059
|
-
}),
|
|
3059
|
+
}), v;
|
|
3060
3060
|
function n(e, n) {
|
|
3061
|
-
return
|
|
3061
|
+
return h({
|
|
3062
3062
|
data: e,
|
|
3063
3063
|
path: t.path,
|
|
3064
3064
|
errorMaps: [
|
|
@@ -3074,7 +3074,7 @@ var it = class e extends T {
|
|
|
3074
3074
|
});
|
|
3075
3075
|
}
|
|
3076
3076
|
function r(e, n) {
|
|
3077
|
-
return
|
|
3077
|
+
return h({
|
|
3078
3078
|
data: e,
|
|
3079
3079
|
path: t.path,
|
|
3080
3080
|
errorMaps: [
|
|
@@ -3166,11 +3166,11 @@ var z = class extends T {
|
|
|
3166
3166
|
_parse(e) {
|
|
3167
3167
|
if (e.data !== this._def.value) {
|
|
3168
3168
|
let t = this._getOrReturnCtx(e);
|
|
3169
|
-
return
|
|
3169
|
+
return g(t, {
|
|
3170
3170
|
received: t.data,
|
|
3171
3171
|
code: f.invalid_literal,
|
|
3172
3172
|
expected: this._def.value
|
|
3173
|
-
}),
|
|
3173
|
+
}), v;
|
|
3174
3174
|
}
|
|
3175
3175
|
return {
|
|
3176
3176
|
status: "valid",
|
|
@@ -3197,19 +3197,19 @@ var B = class e extends T {
|
|
|
3197
3197
|
_parse(e) {
|
|
3198
3198
|
if (typeof e.data != "string") {
|
|
3199
3199
|
let t = this._getOrReturnCtx(e), n = this._def.values;
|
|
3200
|
-
return
|
|
3200
|
+
return g(t, {
|
|
3201
3201
|
expected: l.joinValues(n),
|
|
3202
3202
|
received: t.parsedType,
|
|
3203
3203
|
code: f.invalid_type
|
|
3204
|
-
}),
|
|
3204
|
+
}), v;
|
|
3205
3205
|
}
|
|
3206
3206
|
if (this._cache ||= new Set(this._def.values), !this._cache.has(e.data)) {
|
|
3207
3207
|
let t = this._getOrReturnCtx(e), n = this._def.values;
|
|
3208
|
-
return
|
|
3208
|
+
return g(t, {
|
|
3209
3209
|
received: t.data,
|
|
3210
3210
|
code: f.invalid_enum_value,
|
|
3211
3211
|
options: n
|
|
3212
|
-
}),
|
|
3212
|
+
}), v;
|
|
3213
3213
|
}
|
|
3214
3214
|
return y(e.data);
|
|
3215
3215
|
}
|
|
@@ -3250,19 +3250,19 @@ var V = class extends T {
|
|
|
3250
3250
|
let t = l.getValidEnumValues(this._def.values), n = this._getOrReturnCtx(e);
|
|
3251
3251
|
if (n.parsedType !== u.string && n.parsedType !== u.number) {
|
|
3252
3252
|
let e = l.objectValues(t);
|
|
3253
|
-
return
|
|
3253
|
+
return g(n, {
|
|
3254
3254
|
expected: l.joinValues(e),
|
|
3255
3255
|
received: n.parsedType,
|
|
3256
3256
|
code: f.invalid_type
|
|
3257
|
-
}),
|
|
3257
|
+
}), v;
|
|
3258
3258
|
}
|
|
3259
3259
|
if (this._cache ||= new Set(l.getValidEnumValues(this._def.values)), !this._cache.has(e.data)) {
|
|
3260
3260
|
let e = l.objectValues(t);
|
|
3261
|
-
return
|
|
3261
|
+
return g(n, {
|
|
3262
3262
|
received: n.data,
|
|
3263
3263
|
code: f.invalid_enum_value,
|
|
3264
3264
|
options: e
|
|
3265
|
-
}),
|
|
3265
|
+
}), v;
|
|
3266
3266
|
}
|
|
3267
3267
|
return y(e.data);
|
|
3268
3268
|
}
|
|
@@ -3281,11 +3281,11 @@ var H = class extends T {
|
|
|
3281
3281
|
}
|
|
3282
3282
|
_parse(e) {
|
|
3283
3283
|
let { ctx: t } = this._processInputParams(e);
|
|
3284
|
-
return t.parsedType !== u.promise && t.common.async === !1 ? (
|
|
3284
|
+
return t.parsedType !== u.promise && t.common.async === !1 ? (g(t, {
|
|
3285
3285
|
code: f.invalid_type,
|
|
3286
3286
|
expected: u.promise,
|
|
3287
3287
|
received: t.parsedType
|
|
3288
|
-
}),
|
|
3288
|
+
}), v) : y((t.parsedType === u.promise ? t.data : Promise.resolve(t.data)).then((e) => this._def.type.parseAsync(e, {
|
|
3289
3289
|
path: t.path,
|
|
3290
3290
|
errorMap: t.common.contextualErrorMap
|
|
3291
3291
|
})));
|
|
@@ -3306,7 +3306,7 @@ var U = class extends T {
|
|
|
3306
3306
|
_parse(e) {
|
|
3307
3307
|
let { status: t, ctx: n } = this._processInputParams(e), r = this._def.effect || null, i = {
|
|
3308
3308
|
addIssue: (e) => {
|
|
3309
|
-
|
|
3309
|
+
g(n, e), e.fatal ? t.abort() : t.dirty();
|
|
3310
3310
|
},
|
|
3311
3311
|
get path() {
|
|
3312
3312
|
return n.path;
|
|
@@ -3315,22 +3315,22 @@ var U = class extends T {
|
|
|
3315
3315
|
if (i.addIssue = i.addIssue.bind(i), r.type === "preprocess") {
|
|
3316
3316
|
let e = r.transform(n.data, i);
|
|
3317
3317
|
if (n.common.async) return Promise.resolve(e).then(async (e) => {
|
|
3318
|
-
if (t.value === "aborted") return
|
|
3318
|
+
if (t.value === "aborted") return v;
|
|
3319
3319
|
let r = await this._def.schema._parseAsync({
|
|
3320
3320
|
data: e,
|
|
3321
3321
|
path: n.path,
|
|
3322
3322
|
parent: n
|
|
3323
3323
|
});
|
|
3324
|
-
return r.status === "aborted" ?
|
|
3324
|
+
return r.status === "aborted" ? v : r.status === "dirty" || t.value === "dirty" ? _e(r.value) : r;
|
|
3325
3325
|
});
|
|
3326
3326
|
{
|
|
3327
|
-
if (t.value === "aborted") return
|
|
3327
|
+
if (t.value === "aborted") return v;
|
|
3328
3328
|
let r = this._def.schema._parseSync({
|
|
3329
3329
|
data: e,
|
|
3330
3330
|
path: n.path,
|
|
3331
3331
|
parent: n
|
|
3332
3332
|
});
|
|
3333
|
-
return r.status === "aborted" ?
|
|
3333
|
+
return r.status === "aborted" ? v : r.status === "dirty" || t.value === "dirty" ? _e(r.value) : r;
|
|
3334
3334
|
}
|
|
3335
3335
|
}
|
|
3336
3336
|
if (r.type === "refinement") {
|
|
@@ -3346,7 +3346,7 @@ var U = class extends T {
|
|
|
3346
3346
|
path: n.path,
|
|
3347
3347
|
parent: n
|
|
3348
3348
|
});
|
|
3349
|
-
return r.status === "aborted" ?
|
|
3349
|
+
return r.status === "aborted" ? v : (r.status === "dirty" && t.dirty(), e(r.value), {
|
|
3350
3350
|
status: t.value,
|
|
3351
3351
|
value: r.value
|
|
3352
3352
|
});
|
|
@@ -3355,7 +3355,7 @@ var U = class extends T {
|
|
|
3355
3355
|
data: n.data,
|
|
3356
3356
|
path: n.path,
|
|
3357
3357
|
parent: n
|
|
3358
|
-
}).then((n) => n.status === "aborted" ?
|
|
3358
|
+
}).then((n) => n.status === "aborted" ? v : (n.status === "dirty" && t.dirty(), e(n.value).then(() => ({
|
|
3359
3359
|
status: t.value,
|
|
3360
3360
|
value: n.value
|
|
3361
3361
|
}))));
|
|
@@ -3367,7 +3367,7 @@ var U = class extends T {
|
|
|
3367
3367
|
path: n.path,
|
|
3368
3368
|
parent: n
|
|
3369
3369
|
});
|
|
3370
|
-
if (!b(e)) return
|
|
3370
|
+
if (!b(e)) return v;
|
|
3371
3371
|
let a = r.transform(e.value, i);
|
|
3372
3372
|
if (a instanceof Promise) throw Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");
|
|
3373
3373
|
return {
|
|
@@ -3382,7 +3382,7 @@ var U = class extends T {
|
|
|
3382
3382
|
}).then((e) => b(e) ? Promise.resolve(r.transform(e.value, i)).then((e) => ({
|
|
3383
3383
|
status: t.value,
|
|
3384
3384
|
value: e
|
|
3385
|
-
})) :
|
|
3385
|
+
})) : v);
|
|
3386
3386
|
}
|
|
3387
3387
|
l.assertNever(r);
|
|
3388
3388
|
}
|
|
@@ -3491,11 +3491,11 @@ var ot = class extends T {
|
|
|
3491
3491
|
_parse(e) {
|
|
3492
3492
|
if (this._getType(e) !== u.nan) {
|
|
3493
3493
|
let t = this._getOrReturnCtx(e);
|
|
3494
|
-
return
|
|
3494
|
+
return g(t, {
|
|
3495
3495
|
code: f.invalid_type,
|
|
3496
3496
|
expected: u.nan,
|
|
3497
3497
|
received: t.parsedType
|
|
3498
|
-
}),
|
|
3498
|
+
}), v;
|
|
3499
3499
|
}
|
|
3500
3500
|
return {
|
|
3501
3501
|
status: "valid",
|
|
@@ -3528,7 +3528,7 @@ var st = class extends T {
|
|
|
3528
3528
|
path: n.path,
|
|
3529
3529
|
parent: n
|
|
3530
3530
|
});
|
|
3531
|
-
return e.status === "aborted" ?
|
|
3531
|
+
return e.status === "aborted" ? v : e.status === "dirty" ? (t.dirty(), _e(e.value)) : this._def.out._parseAsync({
|
|
3532
3532
|
data: e.value,
|
|
3533
3533
|
path: n.path,
|
|
3534
3534
|
parent: n
|
|
@@ -3540,7 +3540,7 @@ var st = class extends T {
|
|
|
3540
3540
|
path: n.path,
|
|
3541
3541
|
parent: n
|
|
3542
3542
|
});
|
|
3543
|
-
return e.status === "aborted" ?
|
|
3543
|
+
return e.status === "aborted" ? v : e.status === "dirty" ? (t.dirty(), {
|
|
3544
3544
|
status: "dirty",
|
|
3545
3545
|
value: e.value
|
|
3546
3546
|
}) : this._def.out._parseSync({
|
|
@@ -3575,18 +3575,18 @@ var Y;
|
|
|
3575
3575
|
(function(e) {
|
|
3576
3576
|
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";
|
|
3577
3577
|
})(Y ||= {});
|
|
3578
|
-
var X = E.create,
|
|
3578
|
+
var X = E.create, Z = Ke.create;
|
|
3579
3579
|
ot.create, qe.create, Je.create, Ye.create, Xe.create, D.create, O.create, Ze.create, k.create, A.create, Qe.create;
|
|
3580
|
-
var
|
|
3580
|
+
var lt = j.create, Q = N.create;
|
|
3581
3581
|
N.strictCreate, P.create, $e.create, I.create, L.create, tt.create, nt.create, rt.create, it.create, R.create, z.create;
|
|
3582
|
-
var
|
|
3582
|
+
var $ = B.create;
|
|
3583
3583
|
V.create, H.create, U.create, W.create, G.create, U.createWithPreprocess, ct.create;
|
|
3584
|
-
var
|
|
3584
|
+
var ut = [
|
|
3585
3585
|
{
|
|
3586
3586
|
name: "list_projects",
|
|
3587
3587
|
title: "List Projects",
|
|
3588
3588
|
description: "Retrieve all projects in the workspace.",
|
|
3589
|
-
zodSchema:
|
|
3589
|
+
zodSchema: Q({}),
|
|
3590
3590
|
inputSchema: {
|
|
3591
3591
|
type: "object",
|
|
3592
3592
|
properties: {},
|
|
@@ -3599,7 +3599,7 @@ var $ = [
|
|
|
3599
3599
|
name: "get_project",
|
|
3600
3600
|
title: "Get Project",
|
|
3601
3601
|
description: "Get details of a specific project by its ID.",
|
|
3602
|
-
zodSchema:
|
|
3602
|
+
zodSchema: Q({ id: X().describe("The project ID") }),
|
|
3603
3603
|
inputSchema: {
|
|
3604
3604
|
type: "object",
|
|
3605
3605
|
properties: { id: {
|
|
@@ -3616,7 +3616,7 @@ var $ = [
|
|
|
3616
3616
|
name: "create_project",
|
|
3617
3617
|
title: "Create Project",
|
|
3618
3618
|
description: "Create a new project workspace.",
|
|
3619
|
-
zodSchema:
|
|
3619
|
+
zodSchema: Q({
|
|
3620
3620
|
name: X().describe("Name of the project"),
|
|
3621
3621
|
description: X().optional().describe("Description of the project"),
|
|
3622
3622
|
key: X().optional().describe("Short project key/prefix (e.g. \"PROJ\")")
|
|
@@ -3646,10 +3646,10 @@ var $ = [
|
|
|
3646
3646
|
name: "list_tasks",
|
|
3647
3647
|
title: "List Tasks",
|
|
3648
3648
|
description: "List tasks, optionally filtered by project, status, priority, or assignee.",
|
|
3649
|
-
zodSchema:
|
|
3649
|
+
zodSchema: Q({
|
|
3650
3650
|
projectId: X().optional().describe("Filter by project ID"),
|
|
3651
3651
|
status: X().optional().describe("Filter by task status key"),
|
|
3652
|
-
priority:
|
|
3652
|
+
priority: $([
|
|
3653
3653
|
"urgent",
|
|
3654
3654
|
"high",
|
|
3655
3655
|
"medium",
|
|
@@ -3697,7 +3697,7 @@ var $ = [
|
|
|
3697
3697
|
name: "get_task",
|
|
3698
3698
|
title: "Get Task",
|
|
3699
3699
|
description: "Get task details by ID.",
|
|
3700
|
-
zodSchema:
|
|
3700
|
+
zodSchema: Q({ id: X().describe("The task ID") }),
|
|
3701
3701
|
inputSchema: {
|
|
3702
3702
|
type: "object",
|
|
3703
3703
|
properties: { id: {
|
|
@@ -3714,12 +3714,12 @@ var $ = [
|
|
|
3714
3714
|
name: "create_task",
|
|
3715
3715
|
title: "Create Task",
|
|
3716
3716
|
description: "Create a new task within a project.",
|
|
3717
|
-
zodSchema:
|
|
3717
|
+
zodSchema: Q({
|
|
3718
3718
|
projectId: X().optional().describe("Project ID (inferred from active view in browser if omitted)"),
|
|
3719
3719
|
title: X().describe("Title of the task"),
|
|
3720
3720
|
description: X().optional().describe("Detailed description / markdown"),
|
|
3721
3721
|
status: X().optional().describe("Status (defaults to \"todo\" or first workflow status)"),
|
|
3722
|
-
priority:
|
|
3722
|
+
priority: $([
|
|
3723
3723
|
"urgent",
|
|
3724
3724
|
"high",
|
|
3725
3725
|
"medium",
|
|
@@ -3728,8 +3728,8 @@ var $ = [
|
|
|
3728
3728
|
]).optional().default("none").describe("Task priority"),
|
|
3729
3729
|
assigneeId: X().optional().describe("User ID to assign task to"),
|
|
3730
3730
|
dueDate: X().optional().describe("Due date (ISO string)"),
|
|
3731
|
-
tags:
|
|
3732
|
-
estimatedHours:
|
|
3731
|
+
tags: lt(X()).optional().describe("Tags for categorization"),
|
|
3732
|
+
estimatedHours: Z().optional().describe("Estimated hours to complete")
|
|
3733
3733
|
}),
|
|
3734
3734
|
inputSchema: {
|
|
3735
3735
|
type: "object",
|
|
@@ -3798,12 +3798,12 @@ var $ = [
|
|
|
3798
3798
|
name: "update_task",
|
|
3799
3799
|
title: "Update Task",
|
|
3800
3800
|
description: "Update fields of an existing task (e.g. title, status, priority, assignee).",
|
|
3801
|
-
zodSchema:
|
|
3801
|
+
zodSchema: Q({
|
|
3802
3802
|
id: X().describe("The task ID"),
|
|
3803
3803
|
title: X().optional(),
|
|
3804
3804
|
description: X().optional(),
|
|
3805
3805
|
status: X().optional(),
|
|
3806
|
-
priority:
|
|
3806
|
+
priority: $([
|
|
3807
3807
|
"urgent",
|
|
3808
3808
|
"high",
|
|
3809
3809
|
"medium",
|
|
@@ -3812,9 +3812,9 @@ var $ = [
|
|
|
3812
3812
|
]).optional(),
|
|
3813
3813
|
assigneeId: X().optional(),
|
|
3814
3814
|
dueDate: X().optional(),
|
|
3815
|
-
tags:
|
|
3816
|
-
estimatedHours:
|
|
3817
|
-
loggedHours:
|
|
3815
|
+
tags: lt(X()).optional(),
|
|
3816
|
+
estimatedHours: Z().optional(),
|
|
3817
|
+
loggedHours: Z().optional()
|
|
3818
3818
|
}),
|
|
3819
3819
|
inputSchema: {
|
|
3820
3820
|
type: "object",
|
|
@@ -3857,7 +3857,7 @@ var $ = [
|
|
|
3857
3857
|
name: "delete_task",
|
|
3858
3858
|
title: "Delete Task",
|
|
3859
3859
|
description: "Delete a task by ID.",
|
|
3860
|
-
zodSchema:
|
|
3860
|
+
zodSchema: Q({ id: X().describe("The task ID to delete") }),
|
|
3861
3861
|
inputSchema: {
|
|
3862
3862
|
type: "object",
|
|
3863
3863
|
properties: { id: {
|
|
@@ -3874,7 +3874,7 @@ var $ = [
|
|
|
3874
3874
|
name: "list_deliverables",
|
|
3875
3875
|
title: "List Deliverables",
|
|
3876
3876
|
description: "List deliverables/milestones for a project.",
|
|
3877
|
-
zodSchema:
|
|
3877
|
+
zodSchema: Q({ projectId: X().optional().describe("Project ID") }),
|
|
3878
3878
|
inputSchema: {
|
|
3879
3879
|
type: "object",
|
|
3880
3880
|
properties: { projectId: {
|
|
@@ -3894,12 +3894,12 @@ var $ = [
|
|
|
3894
3894
|
name: "create_deliverable",
|
|
3895
3895
|
title: "Create Deliverable",
|
|
3896
3896
|
description: "Create a milestone deliverable within a project.",
|
|
3897
|
-
zodSchema:
|
|
3897
|
+
zodSchema: Q({
|
|
3898
3898
|
projectId: X().optional(),
|
|
3899
3899
|
title: X(),
|
|
3900
3900
|
description: X().optional(),
|
|
3901
3901
|
dueDate: X().optional(),
|
|
3902
|
-
taskIds:
|
|
3902
|
+
taskIds: lt(X()).optional()
|
|
3903
3903
|
}),
|
|
3904
3904
|
inputSchema: {
|
|
3905
3905
|
type: "object",
|
|
@@ -3930,7 +3930,7 @@ var $ = [
|
|
|
3930
3930
|
name: "list_comments",
|
|
3931
3931
|
title: "List Comments",
|
|
3932
3932
|
description: "List comments associated with a task.",
|
|
3933
|
-
zodSchema:
|
|
3933
|
+
zodSchema: Q({ taskId: X().describe("The task ID") }),
|
|
3934
3934
|
inputSchema: {
|
|
3935
3935
|
type: "object",
|
|
3936
3936
|
properties: { taskId: {
|
|
@@ -3947,7 +3947,7 @@ var $ = [
|
|
|
3947
3947
|
name: "add_comment",
|
|
3948
3948
|
title: "Add Comment",
|
|
3949
3949
|
description: "Add a comment to a task.",
|
|
3950
|
-
zodSchema:
|
|
3950
|
+
zodSchema: Q({
|
|
3951
3951
|
taskId: X().describe("The task ID"),
|
|
3952
3952
|
content: X().describe("Comment body/markdown"),
|
|
3953
3953
|
authorId: X().describe("Author user ID")
|
|
@@ -3985,7 +3985,7 @@ var $ = [
|
|
|
3985
3985
|
name: "calculate_critical_path",
|
|
3986
3986
|
title: "Calculate Critical Path",
|
|
3987
3987
|
description: "Calculate Critical Path Method (CPM) schedule, early/late start and finish, total slack, and critical bottlenecks for a project.",
|
|
3988
|
-
zodSchema:
|
|
3988
|
+
zodSchema: Q({ projectId: X().optional().describe("Project ID (falls back to ambient context if omitted)") }),
|
|
3989
3989
|
inputSchema: {
|
|
3990
3990
|
type: "object",
|
|
3991
3991
|
properties: { projectId: {
|
|
@@ -4005,9 +4005,9 @@ var $ = [
|
|
|
4005
4005
|
name: "get_timeline_ladder",
|
|
4006
4006
|
title: "Get Timeline Ladder of Abstraction",
|
|
4007
4007
|
description: "Retrieve Ladder of Abstraction for a project timeline across macro phase envelopes, standard Gantt tasks & CPM, and concrete deliverables/time/attachments.",
|
|
4008
|
-
zodSchema:
|
|
4008
|
+
zodSchema: Q({
|
|
4009
4009
|
projectId: X().optional().describe("Project ID (falls back to ambient context if omitted)"),
|
|
4010
|
-
level:
|
|
4010
|
+
level: $([
|
|
4011
4011
|
"macro",
|
|
4012
4012
|
"standard",
|
|
4013
4013
|
"concrete",
|
|
@@ -4059,7 +4059,7 @@ var $ = [
|
|
|
4059
4059
|
name: "get_task_ladder",
|
|
4060
4060
|
title: "Get Task Ladder View",
|
|
4061
4061
|
description: "Retrieve multi-scale ladder view for a single task, connecting its macro phase, standard CPM timeline position, and concrete work evidence.",
|
|
4062
|
-
zodSchema:
|
|
4062
|
+
zodSchema: Q({ taskId: X().describe("The task ID") }),
|
|
4063
4063
|
inputSchema: {
|
|
4064
4064
|
type: "object",
|
|
4065
4065
|
properties: { taskId: {
|
|
@@ -4071,9 +4071,136 @@ var $ = [
|
|
|
4071
4071
|
},
|
|
4072
4072
|
annotations: { readOnlyHint: !0 },
|
|
4073
4073
|
execute: async (e, t) => t.getTaskLadder(e.taskId)
|
|
4074
|
+
},
|
|
4075
|
+
{
|
|
4076
|
+
name: "get_task_metrics",
|
|
4077
|
+
title: "Get Task Metrics",
|
|
4078
|
+
description: "Retrieve multi-dimensional task metrics including inferred actuals, active working duration, effort/duration/schedule variances, progress inference, and Earned Value Management (EVM) metrics.",
|
|
4079
|
+
zodSchema: Q({ taskId: X().describe("The task ID") }),
|
|
4080
|
+
inputSchema: {
|
|
4081
|
+
type: "object",
|
|
4082
|
+
properties: { taskId: {
|
|
4083
|
+
type: "string",
|
|
4084
|
+
description: "The task ID"
|
|
4085
|
+
} },
|
|
4086
|
+
required: ["taskId"],
|
|
4087
|
+
additionalProperties: !1
|
|
4088
|
+
},
|
|
4089
|
+
annotations: { readOnlyHint: !0 },
|
|
4090
|
+
execute: async (e, t) => t.getTaskMetrics(e.taskId)
|
|
4091
|
+
},
|
|
4092
|
+
{
|
|
4093
|
+
name: "get_task_progress_history",
|
|
4094
|
+
title: "Get Task Progress History",
|
|
4095
|
+
description: "Retrieve time-series progress data points and curve shape classification (linear, s_curve, early_surge, late_rush, stalled) for a task.",
|
|
4096
|
+
zodSchema: Q({ taskId: X().describe("The task ID") }),
|
|
4097
|
+
inputSchema: {
|
|
4098
|
+
type: "object",
|
|
4099
|
+
properties: { taskId: {
|
|
4100
|
+
type: "string",
|
|
4101
|
+
description: "The task ID"
|
|
4102
|
+
} },
|
|
4103
|
+
required: ["taskId"],
|
|
4104
|
+
additionalProperties: !1
|
|
4105
|
+
},
|
|
4106
|
+
annotations: { readOnlyHint: !0 },
|
|
4107
|
+
execute: async (e, t) => t.getTaskProgressHistory(e.taskId)
|
|
4108
|
+
},
|
|
4109
|
+
{
|
|
4110
|
+
name: "get_workload_distribution",
|
|
4111
|
+
title: "Get Workload Distribution",
|
|
4112
|
+
description: "Retrieve time-series workload and capacity distribution suitable for streamgraphs, stacked charts, and team capacity planning.",
|
|
4113
|
+
zodSchema: Q({
|
|
4114
|
+
projectId: X().optional().describe("Project ID (optional, defaults to workspace-wide or ambient project)"),
|
|
4115
|
+
startDate: X().optional().describe("Start date ISO (YYYY-MM-DD)"),
|
|
4116
|
+
endDate: X().optional().describe("End date ISO (YYYY-MM-DD)"),
|
|
4117
|
+
interval: $([
|
|
4118
|
+
"day",
|
|
4119
|
+
"week",
|
|
4120
|
+
"month"
|
|
4121
|
+
]).optional().describe("Bucket interval (day, week, month)"),
|
|
4122
|
+
groupBy: $([
|
|
4123
|
+
"assignee",
|
|
4124
|
+
"team",
|
|
4125
|
+
"taskType",
|
|
4126
|
+
"priority",
|
|
4127
|
+
"status"
|
|
4128
|
+
]).optional().describe("Dimension to segment by"),
|
|
4129
|
+
metric: $([
|
|
4130
|
+
"scheduled",
|
|
4131
|
+
"logged",
|
|
4132
|
+
"remaining",
|
|
4133
|
+
"blended"
|
|
4134
|
+
]).optional().describe("Effort metric mode"),
|
|
4135
|
+
defaultWeeklyCapacityHours: Z().optional().describe("Default weekly capacity hours per person (default 40)")
|
|
4136
|
+
}),
|
|
4137
|
+
inputSchema: {
|
|
4138
|
+
type: "object",
|
|
4139
|
+
properties: {
|
|
4140
|
+
projectId: {
|
|
4141
|
+
type: "string",
|
|
4142
|
+
description: "Project ID (optional, defaults to workspace-wide or ambient project)"
|
|
4143
|
+
},
|
|
4144
|
+
startDate: {
|
|
4145
|
+
type: "string",
|
|
4146
|
+
description: "Start date ISO (YYYY-MM-DD)"
|
|
4147
|
+
},
|
|
4148
|
+
endDate: {
|
|
4149
|
+
type: "string",
|
|
4150
|
+
description: "End date ISO (YYYY-MM-DD)"
|
|
4151
|
+
},
|
|
4152
|
+
interval: {
|
|
4153
|
+
type: "string",
|
|
4154
|
+
enum: [
|
|
4155
|
+
"day",
|
|
4156
|
+
"week",
|
|
4157
|
+
"month"
|
|
4158
|
+
],
|
|
4159
|
+
description: "Bucket interval"
|
|
4160
|
+
},
|
|
4161
|
+
groupBy: {
|
|
4162
|
+
type: "string",
|
|
4163
|
+
enum: [
|
|
4164
|
+
"assignee",
|
|
4165
|
+
"team",
|
|
4166
|
+
"taskType",
|
|
4167
|
+
"priority",
|
|
4168
|
+
"status"
|
|
4169
|
+
],
|
|
4170
|
+
description: "Dimension to segment by"
|
|
4171
|
+
},
|
|
4172
|
+
metric: {
|
|
4173
|
+
type: "string",
|
|
4174
|
+
enum: [
|
|
4175
|
+
"scheduled",
|
|
4176
|
+
"logged",
|
|
4177
|
+
"remaining",
|
|
4178
|
+
"blended"
|
|
4179
|
+
],
|
|
4180
|
+
description: "Effort metric mode"
|
|
4181
|
+
},
|
|
4182
|
+
defaultWeeklyCapacityHours: {
|
|
4183
|
+
type: "number",
|
|
4184
|
+
description: "Default weekly capacity hours per person"
|
|
4185
|
+
}
|
|
4186
|
+
},
|
|
4187
|
+
additionalProperties: !1
|
|
4188
|
+
},
|
|
4189
|
+
annotations: { readOnlyHint: !0 },
|
|
4190
|
+
execute: async (e, t, n) => {
|
|
4191
|
+
let r = e.projectId || n?.projectId;
|
|
4192
|
+
return t.getWorkloadDistribution(r, {
|
|
4193
|
+
startDate: e.startDate,
|
|
4194
|
+
endDate: e.endDate,
|
|
4195
|
+
interval: e.interval,
|
|
4196
|
+
groupBy: e.groupBy,
|
|
4197
|
+
metric: e.metric,
|
|
4198
|
+
defaultWeeklyCapacityHours: e.defaultWeeklyCapacityHours
|
|
4199
|
+
});
|
|
4200
|
+
}
|
|
4074
4201
|
}
|
|
4075
4202
|
];
|
|
4076
|
-
new Map(
|
|
4203
|
+
new Map(ut.map((e) => [e.name, e]));
|
|
4077
4204
|
//#endregion
|
|
4078
4205
|
//#region ../mcp/dist/web/index.js
|
|
4079
4206
|
function dt(e = typeof document < "u" ? document : null) {
|
|
@@ -4104,7 +4231,7 @@ function dt(e = typeof document < "u" ? document : null) {
|
|
|
4104
4231
|
function ft(e) {
|
|
4105
4232
|
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;
|
|
4106
4233
|
t?.modelContext ? i = t.modelContext : n?.modelContext ? i = n.modelContext : t && (i = dt(t) ?? void 0);
|
|
4107
|
-
let a = e.tools ?
|
|
4234
|
+
let a = e.tools ? ut.filter((t) => e.tools.includes(t.name)) : ut, o = [], s = new AbortController();
|
|
4108
4235
|
e.signal && e.signal.addEventListener("abort", () => s.abort(), { once: !0 });
|
|
4109
4236
|
for (let t of a) {
|
|
4110
4237
|
let n = {
|
|
@@ -4330,9 +4457,243 @@ function vt(e, t, n) {
|
|
|
4330
4457
|
return new _t(e, t, n);
|
|
4331
4458
|
}
|
|
4332
4459
|
//#endregion
|
|
4460
|
+
//#region src/task-metrics-state.svelte.ts
|
|
4461
|
+
var yt = class {
|
|
4462
|
+
client;
|
|
4463
|
+
taskId;
|
|
4464
|
+
#e = t.state(null);
|
|
4465
|
+
get metrics() {
|
|
4466
|
+
return t.get(this.#e);
|
|
4467
|
+
}
|
|
4468
|
+
set metrics(e) {
|
|
4469
|
+
t.set(this.#e, e, !0);
|
|
4470
|
+
}
|
|
4471
|
+
#t = t.state(null);
|
|
4472
|
+
get history() {
|
|
4473
|
+
return t.get(this.#t);
|
|
4474
|
+
}
|
|
4475
|
+
set history(e) {
|
|
4476
|
+
t.set(this.#t, e, !0);
|
|
4477
|
+
}
|
|
4478
|
+
#n = t.state(!1);
|
|
4479
|
+
get loading() {
|
|
4480
|
+
return t.get(this.#n);
|
|
4481
|
+
}
|
|
4482
|
+
set loading(e) {
|
|
4483
|
+
t.set(this.#n, e, !0);
|
|
4484
|
+
}
|
|
4485
|
+
#r = t.state(null);
|
|
4486
|
+
get error() {
|
|
4487
|
+
return t.get(this.#r);
|
|
4488
|
+
}
|
|
4489
|
+
set error(e) {
|
|
4490
|
+
t.set(this.#r, e, !0);
|
|
4491
|
+
}
|
|
4492
|
+
#i = t.derived(() => this.metrics?.inferredActuals ?? null);
|
|
4493
|
+
get inferredActuals() {
|
|
4494
|
+
return t.get(this.#i);
|
|
4495
|
+
}
|
|
4496
|
+
set inferredActuals(e) {
|
|
4497
|
+
t.set(this.#i, e);
|
|
4498
|
+
}
|
|
4499
|
+
#a = t.derived(() => this.metrics?.realityDelta ?? null);
|
|
4500
|
+
get realityDelta() {
|
|
4501
|
+
return t.get(this.#a);
|
|
4502
|
+
}
|
|
4503
|
+
set realityDelta(e) {
|
|
4504
|
+
t.set(this.#a, e);
|
|
4505
|
+
}
|
|
4506
|
+
#o = t.derived(() => this.metrics?.progress ?? null);
|
|
4507
|
+
get progress() {
|
|
4508
|
+
return t.get(this.#o);
|
|
4509
|
+
}
|
|
4510
|
+
set progress(e) {
|
|
4511
|
+
t.set(this.#o, e);
|
|
4512
|
+
}
|
|
4513
|
+
#s = t.derived(() => this.metrics?.evm ?? null);
|
|
4514
|
+
get evm() {
|
|
4515
|
+
return t.get(this.#s);
|
|
4516
|
+
}
|
|
4517
|
+
set evm(e) {
|
|
4518
|
+
t.set(this.#s, e);
|
|
4519
|
+
}
|
|
4520
|
+
#c = t.derived(() => this.history?.curveProfile ?? null);
|
|
4521
|
+
get curveProfile() {
|
|
4522
|
+
return t.get(this.#c);
|
|
4523
|
+
}
|
|
4524
|
+
set curveProfile(e) {
|
|
4525
|
+
t.set(this.#c, e);
|
|
4526
|
+
}
|
|
4527
|
+
constructor(e, t) {
|
|
4528
|
+
this.client = e, this.taskId = t;
|
|
4529
|
+
}
|
|
4530
|
+
async fetchMetrics() {
|
|
4531
|
+
this.loading = !0, this.error = null;
|
|
4532
|
+
try {
|
|
4533
|
+
return this.metrics = await this.client.getTaskMetrics(this.taskId), this.metrics;
|
|
4534
|
+
} catch (e) {
|
|
4535
|
+
return this.error = e instanceof Error ? e : Error(String(e)), null;
|
|
4536
|
+
} finally {
|
|
4537
|
+
this.loading = !1;
|
|
4538
|
+
}
|
|
4539
|
+
}
|
|
4540
|
+
async fetchHistory() {
|
|
4541
|
+
this.loading = !0, this.error = null;
|
|
4542
|
+
try {
|
|
4543
|
+
return this.history = await this.client.getTaskProgressHistory(this.taskId), this.history;
|
|
4544
|
+
} catch (e) {
|
|
4545
|
+
return this.error = e instanceof Error ? e : Error(String(e)), null;
|
|
4546
|
+
} finally {
|
|
4547
|
+
this.loading = !1;
|
|
4548
|
+
}
|
|
4549
|
+
}
|
|
4550
|
+
async fetchAll() {
|
|
4551
|
+
this.loading = !0, this.error = null;
|
|
4552
|
+
try {
|
|
4553
|
+
let [e, t] = await Promise.all([this.client.getTaskMetrics(this.taskId), this.client.getTaskProgressHistory(this.taskId)]);
|
|
4554
|
+
return this.metrics = e, this.history = t, {
|
|
4555
|
+
metrics: e,
|
|
4556
|
+
history: t
|
|
4557
|
+
};
|
|
4558
|
+
} catch (e) {
|
|
4559
|
+
return this.error = e instanceof Error ? e : Error(String(e)), {
|
|
4560
|
+
metrics: null,
|
|
4561
|
+
history: null
|
|
4562
|
+
};
|
|
4563
|
+
} finally {
|
|
4564
|
+
this.loading = !1;
|
|
4565
|
+
}
|
|
4566
|
+
}
|
|
4567
|
+
};
|
|
4568
|
+
function bt(e, t) {
|
|
4569
|
+
return new yt(e, t);
|
|
4570
|
+
}
|
|
4571
|
+
//#endregion
|
|
4572
|
+
//#region src/workload-state.svelte.ts
|
|
4573
|
+
var xt = class {
|
|
4574
|
+
client;
|
|
4575
|
+
projectId;
|
|
4576
|
+
initialOptions;
|
|
4577
|
+
#e = t.state(null);
|
|
4578
|
+
get data() {
|
|
4579
|
+
return t.get(this.#e);
|
|
4580
|
+
}
|
|
4581
|
+
set data(e) {
|
|
4582
|
+
t.set(this.#e, e, !0);
|
|
4583
|
+
}
|
|
4584
|
+
#t = t.state("week");
|
|
4585
|
+
get interval() {
|
|
4586
|
+
return t.get(this.#t);
|
|
4587
|
+
}
|
|
4588
|
+
set interval(e) {
|
|
4589
|
+
t.set(this.#t, e, !0);
|
|
4590
|
+
}
|
|
4591
|
+
#n = t.state("assignee");
|
|
4592
|
+
get groupBy() {
|
|
4593
|
+
return t.get(this.#n);
|
|
4594
|
+
}
|
|
4595
|
+
set groupBy(e) {
|
|
4596
|
+
t.set(this.#n, e, !0);
|
|
4597
|
+
}
|
|
4598
|
+
#r = t.state("blended");
|
|
4599
|
+
get metric() {
|
|
4600
|
+
return t.get(this.#r);
|
|
4601
|
+
}
|
|
4602
|
+
set metric(e) {
|
|
4603
|
+
t.set(this.#r, e, !0);
|
|
4604
|
+
}
|
|
4605
|
+
#i = t.state(!1);
|
|
4606
|
+
get loading() {
|
|
4607
|
+
return t.get(this.#i);
|
|
4608
|
+
}
|
|
4609
|
+
set loading(e) {
|
|
4610
|
+
t.set(this.#i, e, !0);
|
|
4611
|
+
}
|
|
4612
|
+
#a = t.state(null);
|
|
4613
|
+
get error() {
|
|
4614
|
+
return t.get(this.#a);
|
|
4615
|
+
}
|
|
4616
|
+
set error(e) {
|
|
4617
|
+
t.set(this.#a, e, !0);
|
|
4618
|
+
}
|
|
4619
|
+
#o = t.derived(() => this.data?.buckets ?? []);
|
|
4620
|
+
get buckets() {
|
|
4621
|
+
return t.get(this.#o);
|
|
4622
|
+
}
|
|
4623
|
+
set buckets(e) {
|
|
4624
|
+
t.set(this.#o, e);
|
|
4625
|
+
}
|
|
4626
|
+
#s = t.derived(() => this.data?.seriesKeys ?? []);
|
|
4627
|
+
get seriesKeys() {
|
|
4628
|
+
return t.get(this.#s);
|
|
4629
|
+
}
|
|
4630
|
+
set seriesKeys(e) {
|
|
4631
|
+
t.set(this.#s, e);
|
|
4632
|
+
}
|
|
4633
|
+
#c = t.derived(() => this.data?.seriesLabels ?? {});
|
|
4634
|
+
get seriesLabels() {
|
|
4635
|
+
return t.get(this.#c);
|
|
4636
|
+
}
|
|
4637
|
+
set seriesLabels(e) {
|
|
4638
|
+
t.set(this.#c, e);
|
|
4639
|
+
}
|
|
4640
|
+
#l = t.derived(() => this.data?.totalHours ?? 0);
|
|
4641
|
+
get totalHours() {
|
|
4642
|
+
return t.get(this.#l);
|
|
4643
|
+
}
|
|
4644
|
+
set totalHours(e) {
|
|
4645
|
+
t.set(this.#l, e);
|
|
4646
|
+
}
|
|
4647
|
+
#u = t.derived(() => this.data?.totalCapacity ?? 0);
|
|
4648
|
+
get totalCapacity() {
|
|
4649
|
+
return t.get(this.#u);
|
|
4650
|
+
}
|
|
4651
|
+
set totalCapacity(e) {
|
|
4652
|
+
t.set(this.#u, e);
|
|
4653
|
+
}
|
|
4654
|
+
#d = t.derived(() => this.data?.averageUtilization);
|
|
4655
|
+
get averageUtilization() {
|
|
4656
|
+
return t.get(this.#d);
|
|
4657
|
+
}
|
|
4658
|
+
set averageUtilization(e) {
|
|
4659
|
+
t.set(this.#d, e);
|
|
4660
|
+
}
|
|
4661
|
+
constructor(e, t, n) {
|
|
4662
|
+
this.client = e, this.projectId = t, this.initialOptions = n, n?.interval && (this.interval = n.interval), n?.groupBy && (this.groupBy = n.groupBy), n?.metric && (this.metric = n.metric);
|
|
4663
|
+
}
|
|
4664
|
+
async setInterval(e) {
|
|
4665
|
+
this.interval = e, await this.fetch();
|
|
4666
|
+
}
|
|
4667
|
+
async setGroupBy(e) {
|
|
4668
|
+
this.groupBy = e, await this.fetch();
|
|
4669
|
+
}
|
|
4670
|
+
async setMetric(e) {
|
|
4671
|
+
this.metric = e, await this.fetch();
|
|
4672
|
+
}
|
|
4673
|
+
async fetch(e) {
|
|
4674
|
+
this.loading = !0, this.error = null;
|
|
4675
|
+
try {
|
|
4676
|
+
this.data = await this.client.getWorkloadDistribution(this.projectId, {
|
|
4677
|
+
...this.initialOptions,
|
|
4678
|
+
interval: this.interval,
|
|
4679
|
+
groupBy: this.groupBy,
|
|
4680
|
+
metric: this.metric,
|
|
4681
|
+
...e
|
|
4682
|
+
});
|
|
4683
|
+
} catch (e) {
|
|
4684
|
+
this.error = e instanceof Error ? e : Error(String(e));
|
|
4685
|
+
} finally {
|
|
4686
|
+
this.loading = !1;
|
|
4687
|
+
}
|
|
4688
|
+
}
|
|
4689
|
+
};
|
|
4690
|
+
function St(e, t, n) {
|
|
4691
|
+
return new xt(e, t, n);
|
|
4692
|
+
}
|
|
4693
|
+
//#endregion
|
|
4333
4694
|
//#region src/index.ts
|
|
4334
|
-
function
|
|
4695
|
+
function Ct(t) {
|
|
4335
4696
|
return new e(t);
|
|
4336
4697
|
}
|
|
4337
4698
|
//#endregion
|
|
4338
|
-
export { ne as AttachmentState, ee as CommentState, ht as CriticalPathState, oe as DeliverableState, ce as DeliverableSummaryState, ue as KanbanState, r as ProjectState, ie as TaskActivityState, a as TaskState, fe as TaskTransitionsState, _t as TimelineLadderState, pt as WebMcpState, s as WorkflowState, re as createAttachmentState, te as createCommentState,
|
|
4699
|
+
export { ne as AttachmentState, ee as CommentState, ht as CriticalPathState, oe as DeliverableState, ce as DeliverableSummaryState, ue as KanbanState, r as ProjectState, ie as TaskActivityState, yt as TaskMetricsState, a as TaskState, fe as TaskTransitionsState, _t as TimelineLadderState, pt as WebMcpState, s as WorkflowState, xt as WorkloadState, re as createAttachmentState, te as createCommentState, Ct as createCriticalPathClient, gt as createCriticalPathState, se as createDeliverableState, le as createDeliverableSummaryState, de as createKanbanState, i as createProjectState, ae as createTaskActivityState, bt as createTaskMetricsState, o as createTaskState, pe as createTaskTransitionsState, vt as createTimelineLadderState, mt as createWebMcpState, c as createWorkflowState, St as createWorkloadState };
|