@critical-path/svelte 0.15.8 → 0.16.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 +25 -0
- package/dist/index.js +401 -390
- package/dist/kanban-state.svelte.d.ts +1 -1
- package/dist/task-state.svelte.d.ts +4 -2
- package/dist/task-state.svelte.d.ts.map +1 -1
- package/package.json +4 -4
- package/src/index.test.ts +61 -0
- package/src/task-state.svelte.ts +94 -69
package/dist/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { CriticalPathClient as e } from "@critical-path/client";
|
|
2
2
|
import * as t from "svelte/internal/client";
|
|
3
|
-
import {
|
|
3
|
+
import { isTempTaskId as n, resolveStatusDefinition as r } from "@critical-path/core";
|
|
4
4
|
//#region src/project-state.svelte.ts
|
|
5
|
-
var
|
|
5
|
+
var i = class {
|
|
6
6
|
client;
|
|
7
7
|
#e = t.state(t.proxy([]));
|
|
8
8
|
get data() {
|
|
@@ -56,12 +56,12 @@ var r = class {
|
|
|
56
56
|
}
|
|
57
57
|
}
|
|
58
58
|
};
|
|
59
|
-
function
|
|
60
|
-
return new
|
|
59
|
+
function a(e) {
|
|
60
|
+
return new i(e);
|
|
61
61
|
}
|
|
62
62
|
//#endregion
|
|
63
63
|
//#region src/task-state.svelte.ts
|
|
64
|
-
var
|
|
64
|
+
var o = class {
|
|
65
65
|
client;
|
|
66
66
|
projectId;
|
|
67
67
|
#e = t.state(t.proxy([]));
|
|
@@ -85,6 +85,8 @@ var a = class {
|
|
|
85
85
|
set error(e) {
|
|
86
86
|
t.set(this.#n, e, !0);
|
|
87
87
|
}
|
|
88
|
+
pendingCreations = /* @__PURE__ */ new Map();
|
|
89
|
+
tempToRealIdMap = /* @__PURE__ */ new Map();
|
|
88
90
|
constructor(e, t) {
|
|
89
91
|
this.client = e, this.projectId = t;
|
|
90
92
|
}
|
|
@@ -106,88 +108,97 @@ var a = class {
|
|
|
106
108
|
updatedAt: n
|
|
107
109
|
};
|
|
108
110
|
this.data = [...this.data, r];
|
|
111
|
+
let i = this.client.createTask(e);
|
|
112
|
+
this.pendingCreations.set(t, i);
|
|
109
113
|
try {
|
|
110
|
-
let
|
|
111
|
-
return this.data = this.data.map((
|
|
114
|
+
let e = await i;
|
|
115
|
+
return this.tempToRealIdMap.set(t, e.id), this.data = this.data.map((n) => n.id === t ? e : n), e;
|
|
112
116
|
} catch (e) {
|
|
113
117
|
this.data = this.data.filter((e) => e.id !== t);
|
|
114
118
|
let n = e instanceof Error ? e : Error(String(e));
|
|
115
119
|
throw this.error = n, n;
|
|
120
|
+
} finally {
|
|
121
|
+
this.pendingCreations.delete(t);
|
|
116
122
|
}
|
|
117
123
|
}
|
|
118
124
|
async updateTask(e, t) {
|
|
119
|
-
let
|
|
120
|
-
|
|
121
|
-
let
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
e[n] = r, this.data = e;
|
|
125
|
+
let r = e;
|
|
126
|
+
this.tempToRealIdMap.has(e) && (r = this.tempToRealIdMap.get(e));
|
|
127
|
+
let i = this.data.findIndex((t) => t.id === r || t.id === e), a;
|
|
128
|
+
if (i !== -1) {
|
|
129
|
+
a = this.data[i];
|
|
130
|
+
let e = {
|
|
131
|
+
...a,
|
|
132
|
+
...t,
|
|
133
|
+
updatedAt: (/* @__PURE__ */ new Date()).toISOString()
|
|
134
|
+
}, n = [...this.data];
|
|
135
|
+
n[i] = e, this.data = n;
|
|
136
|
+
}
|
|
137
|
+
if (n(r)) {
|
|
138
|
+
let t = this.pendingCreations.get(r) || (this.pendingCreations.size === 1 ? Array.from(this.pendingCreations.values())[0] : void 0);
|
|
139
|
+
if (t) try {
|
|
140
|
+
let n = await t;
|
|
141
|
+
n && n.id && (r = n.id, this.tempToRealIdMap.set(e, r));
|
|
142
|
+
} catch {
|
|
143
|
+
throw Error(`Failed to update task: task creation failed for "${e}"`);
|
|
139
144
|
}
|
|
140
|
-
let i = t instanceof Error ? t : Error(String(t));
|
|
141
|
-
throw this.error = i, i;
|
|
142
145
|
}
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
let r = this.data[n], i = {
|
|
148
|
-
...r,
|
|
149
|
-
status: t,
|
|
150
|
-
updatedAt: (/* @__PURE__ */ new Date()).toISOString()
|
|
151
|
-
}, a = [...this.data];
|
|
152
|
-
a[n] = i, this.data = a;
|
|
146
|
+
if (n(r)) return this.data.find((t) => t.id === r || t.id === e) || {
|
|
147
|
+
id: r,
|
|
148
|
+
...t
|
|
149
|
+
};
|
|
153
150
|
try {
|
|
154
|
-
let n = await this.client.updateTask(
|
|
155
|
-
if (
|
|
151
|
+
let n = await this.client.updateTask(r, t), i = this.data.findIndex((t) => t.id === r || t.id === e);
|
|
152
|
+
if (i !== -1) {
|
|
156
153
|
let e = [...this.data];
|
|
157
|
-
e[
|
|
154
|
+
e[i] = n, this.data = e;
|
|
158
155
|
}
|
|
159
156
|
return n;
|
|
160
157
|
} catch (t) {
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
158
|
+
if (a) {
|
|
159
|
+
let t = this.data.findIndex((t) => t.id === r || t.id === e);
|
|
160
|
+
if (t !== -1) {
|
|
161
|
+
let e = [...this.data];
|
|
162
|
+
e[t] = a, this.data = e;
|
|
163
|
+
}
|
|
165
164
|
}
|
|
166
|
-
let
|
|
167
|
-
throw this.error =
|
|
165
|
+
let n = t instanceof Error ? t : Error(String(t));
|
|
166
|
+
throw this.error = n, n;
|
|
168
167
|
}
|
|
169
168
|
}
|
|
169
|
+
async updateTaskStatus(e, t) {
|
|
170
|
+
return this.updateTask(e, { status: t });
|
|
171
|
+
}
|
|
170
172
|
async deleteTask(e) {
|
|
171
|
-
let t =
|
|
172
|
-
|
|
173
|
-
let n = this.data[
|
|
174
|
-
this.data = this.data.filter((
|
|
173
|
+
let t = e;
|
|
174
|
+
this.tempToRealIdMap.has(e) && (t = this.tempToRealIdMap.get(e));
|
|
175
|
+
let r = this.data.findIndex((n) => n.id === t || n.id === e), i = r === -1 ? void 0 : this.data[r];
|
|
176
|
+
if (r !== -1 && (this.data = this.data.filter((n) => n.id !== t && n.id !== e)), n(t)) {
|
|
177
|
+
let e = this.pendingCreations.get(t);
|
|
178
|
+
if (e) try {
|
|
179
|
+
let t = await e;
|
|
180
|
+
t && t.id && await this.client.deleteTask(t.id);
|
|
181
|
+
} catch {}
|
|
182
|
+
return;
|
|
183
|
+
}
|
|
175
184
|
try {
|
|
176
|
-
await this.client.deleteTask(
|
|
185
|
+
await this.client.deleteTask(t);
|
|
177
186
|
} catch (e) {
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
187
|
+
if (i && r !== -1) {
|
|
188
|
+
let e = [...this.data];
|
|
189
|
+
e.splice(r, 0, i), this.data = e;
|
|
190
|
+
}
|
|
191
|
+
let t = e instanceof Error ? e : Error(String(e));
|
|
192
|
+
throw this.error = t, t;
|
|
182
193
|
}
|
|
183
194
|
}
|
|
184
195
|
};
|
|
185
|
-
function
|
|
186
|
-
return new
|
|
196
|
+
function s(e, t) {
|
|
197
|
+
return new o(e, t);
|
|
187
198
|
}
|
|
188
199
|
//#endregion
|
|
189
200
|
//#region src/workflow-state.svelte.ts
|
|
190
|
-
var
|
|
201
|
+
var c = class {
|
|
191
202
|
client;
|
|
192
203
|
#e = t.state(t.proxy([]));
|
|
193
204
|
get data() {
|
|
@@ -250,12 +261,12 @@ var s = class {
|
|
|
250
261
|
}
|
|
251
262
|
}
|
|
252
263
|
};
|
|
253
|
-
function
|
|
254
|
-
return new
|
|
264
|
+
function ee(e) {
|
|
265
|
+
return new c(e);
|
|
255
266
|
}
|
|
256
267
|
//#endregion
|
|
257
268
|
//#region src/comment-state.svelte.ts
|
|
258
|
-
var
|
|
269
|
+
var te = class {
|
|
259
270
|
client;
|
|
260
271
|
taskId;
|
|
261
272
|
#e = t.state(t.proxy([]));
|
|
@@ -373,12 +384,12 @@ var ee = class {
|
|
|
373
384
|
}
|
|
374
385
|
}
|
|
375
386
|
};
|
|
376
|
-
function
|
|
377
|
-
return new
|
|
387
|
+
function ne(e, t) {
|
|
388
|
+
return new te(e, t);
|
|
378
389
|
}
|
|
379
390
|
//#endregion
|
|
380
391
|
//#region src/attachment-state.svelte.ts
|
|
381
|
-
var
|
|
392
|
+
var re = class {
|
|
382
393
|
client;
|
|
383
394
|
filter;
|
|
384
395
|
#e = t.state(t.proxy([]));
|
|
@@ -436,12 +447,12 @@ var ne = class {
|
|
|
436
447
|
}
|
|
437
448
|
}
|
|
438
449
|
};
|
|
439
|
-
function
|
|
440
|
-
return new
|
|
450
|
+
function ie(e, t) {
|
|
451
|
+
return new re(e, t);
|
|
441
452
|
}
|
|
442
453
|
//#endregion
|
|
443
454
|
//#region src/activity-state.svelte.ts
|
|
444
|
-
var
|
|
455
|
+
var ae = class {
|
|
445
456
|
client;
|
|
446
457
|
taskId;
|
|
447
458
|
#e = t.state(t.proxy([]));
|
|
@@ -598,12 +609,12 @@ var ie = class {
|
|
|
598
609
|
}
|
|
599
610
|
}
|
|
600
611
|
};
|
|
601
|
-
function
|
|
602
|
-
return new
|
|
612
|
+
function oe(e, t) {
|
|
613
|
+
return new ae(e, t);
|
|
603
614
|
}
|
|
604
615
|
//#endregion
|
|
605
616
|
//#region src/deliverable-state.svelte.ts
|
|
606
|
-
var
|
|
617
|
+
var se = class {
|
|
607
618
|
client;
|
|
608
619
|
projectId;
|
|
609
620
|
#e = t.state(t.proxy([]));
|
|
@@ -681,12 +692,12 @@ var oe = class {
|
|
|
681
692
|
return this.client.getDeliverableSummary(e);
|
|
682
693
|
}
|
|
683
694
|
};
|
|
684
|
-
function
|
|
685
|
-
return new
|
|
695
|
+
function ce(e, t) {
|
|
696
|
+
return new se(e, t);
|
|
686
697
|
}
|
|
687
698
|
//#endregion
|
|
688
699
|
//#region src/deliverable-summary-state.svelte.ts
|
|
689
|
-
var
|
|
700
|
+
var le = class {
|
|
690
701
|
client;
|
|
691
702
|
deliverableId;
|
|
692
703
|
#e = t.state(null);
|
|
@@ -732,12 +743,12 @@ var ce = class {
|
|
|
732
743
|
}
|
|
733
744
|
}
|
|
734
745
|
};
|
|
735
|
-
function
|
|
736
|
-
return new
|
|
746
|
+
function ue(e, t) {
|
|
747
|
+
return new le(e, t);
|
|
737
748
|
}
|
|
738
749
|
//#endregion
|
|
739
750
|
//#region src/kanban-state.svelte.ts
|
|
740
|
-
var
|
|
751
|
+
var de = class {
|
|
741
752
|
projectId;
|
|
742
753
|
options;
|
|
743
754
|
taskState;
|
|
@@ -762,9 +773,9 @@ var ue = class {
|
|
|
762
773
|
completed: [],
|
|
763
774
|
canceled: []
|
|
764
775
|
};
|
|
765
|
-
for (let
|
|
766
|
-
let e =
|
|
767
|
-
t[e] ? t[e].push(
|
|
776
|
+
for (let n of e) {
|
|
777
|
+
let e = n.semanticStatus || r(n.status, this.options?.customDefinitions).category;
|
|
778
|
+
t[e] ? t[e].push(n) : t.not_started.push(n);
|
|
768
779
|
}
|
|
769
780
|
return t;
|
|
770
781
|
}
|
|
@@ -781,7 +792,7 @@ var ue = class {
|
|
|
781
792
|
t.set(this.#e, e);
|
|
782
793
|
}
|
|
783
794
|
constructor(e, t, n = {}) {
|
|
784
|
-
this.projectId = t, this.options = n, this.taskState = new
|
|
795
|
+
this.projectId = t, this.options = n, this.taskState = new o(e, t);
|
|
785
796
|
}
|
|
786
797
|
async fetch() {
|
|
787
798
|
return this.taskState.fetch();
|
|
@@ -799,12 +810,12 @@ var ue = class {
|
|
|
799
810
|
return this.taskState.deleteTask(e);
|
|
800
811
|
}
|
|
801
812
|
};
|
|
802
|
-
function
|
|
803
|
-
return new
|
|
813
|
+
function fe(e, t, n) {
|
|
814
|
+
return new de(e, t, n);
|
|
804
815
|
}
|
|
805
816
|
//#endregion
|
|
806
817
|
//#region src/task-transitions-state.svelte.ts
|
|
807
|
-
var
|
|
818
|
+
var pe = class {
|
|
808
819
|
client;
|
|
809
820
|
taskId;
|
|
810
821
|
#e = t.state(t.proxy([]));
|
|
@@ -847,8 +858,8 @@ var fe = class {
|
|
|
847
858
|
}
|
|
848
859
|
}
|
|
849
860
|
};
|
|
850
|
-
function
|
|
851
|
-
return new
|
|
861
|
+
function me(e, t) {
|
|
862
|
+
return new pe(e, t);
|
|
852
863
|
}
|
|
853
864
|
//#endregion
|
|
854
865
|
//#region ../../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/helpers/util.js
|
|
@@ -882,13 +893,13 @@ var l;
|
|
|
882
893
|
}
|
|
883
894
|
e.joinValues = r, e.jsonStringifyReplacer = (e, t) => typeof t == "bigint" ? t.toString() : t;
|
|
884
895
|
})(l ||= {});
|
|
885
|
-
var
|
|
896
|
+
var he;
|
|
886
897
|
(function(e) {
|
|
887
898
|
e.mergeShapes = (e, t) => ({
|
|
888
899
|
...e,
|
|
889
900
|
...t
|
|
890
901
|
});
|
|
891
|
-
})(
|
|
902
|
+
})(he ||= {});
|
|
892
903
|
var u = l.arrayToEnum([
|
|
893
904
|
"string",
|
|
894
905
|
"nan",
|
|
@@ -1054,13 +1065,13 @@ var m = (e, t) => {
|
|
|
1054
1065
|
default: n = t.defaultError, l.assertNever(e);
|
|
1055
1066
|
}
|
|
1056
1067
|
return { message: n };
|
|
1057
|
-
},
|
|
1058
|
-
function
|
|
1059
|
-
return
|
|
1068
|
+
}, ge = m;
|
|
1069
|
+
function _e() {
|
|
1070
|
+
return ge;
|
|
1060
1071
|
}
|
|
1061
1072
|
//#endregion
|
|
1062
1073
|
//#region ../../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/helpers/parseUtil.js
|
|
1063
|
-
var
|
|
1074
|
+
var ve = (e) => {
|
|
1064
1075
|
let { data: t, path: n, errorMaps: r, issueData: i } = e, a = [...n, ...i.path || []], o = {
|
|
1065
1076
|
...i,
|
|
1066
1077
|
path: a
|
|
@@ -1082,7 +1093,7 @@ var _e = (e) => {
|
|
|
1082
1093
|
};
|
|
1083
1094
|
};
|
|
1084
1095
|
function h(e, t) {
|
|
1085
|
-
let n =
|
|
1096
|
+
let n = _e(), r = ve({
|
|
1086
1097
|
issueData: t,
|
|
1087
1098
|
data: e.data,
|
|
1088
1099
|
path: e.path,
|
|
@@ -1139,13 +1150,13 @@ var g = class e {
|
|
|
1139
1150
|
value: n
|
|
1140
1151
|
};
|
|
1141
1152
|
}
|
|
1142
|
-
}, _ = Object.freeze({ status: "aborted" }),
|
|
1153
|
+
}, _ = Object.freeze({ status: "aborted" }), ye = (e) => ({
|
|
1143
1154
|
status: "dirty",
|
|
1144
1155
|
value: e
|
|
1145
1156
|
}), v = (e) => ({
|
|
1146
1157
|
status: "valid",
|
|
1147
1158
|
value: e
|
|
1148
|
-
}),
|
|
1159
|
+
}), be = (e) => e.status === "aborted", xe = (e) => e.status === "dirty", y = (e) => e.status === "valid", b = (e) => typeof Promise < "u" && e instanceof Promise, x;
|
|
1149
1160
|
(function(e) {
|
|
1150
1161
|
e.errToObj = (e) => typeof e == "string" ? { message: e } : e || {}, e.toString = (e) => typeof e == "string" ? e : e?.message;
|
|
1151
1162
|
})(x ||= {});
|
|
@@ -1158,7 +1169,7 @@ var S = class {
|
|
|
1158
1169
|
get path() {
|
|
1159
1170
|
return this._cachedPath.length || (Array.isArray(this._key) ? this._cachedPath.push(...this._path, ...this._key) : this._cachedPath.push(...this._path, this._key)), this._cachedPath;
|
|
1160
1171
|
}
|
|
1161
|
-
},
|
|
1172
|
+
}, Se = (e, t) => {
|
|
1162
1173
|
if (y(t)) return {
|
|
1163
1174
|
success: !0,
|
|
1164
1175
|
data: t.value
|
|
@@ -1245,7 +1256,7 @@ var w = class {
|
|
|
1245
1256
|
data: e,
|
|
1246
1257
|
parsedType: d(e)
|
|
1247
1258
|
};
|
|
1248
|
-
return
|
|
1259
|
+
return Se(n, this._parseSync({
|
|
1249
1260
|
data: e,
|
|
1250
1261
|
path: n.path,
|
|
1251
1262
|
parent: n
|
|
@@ -1304,7 +1315,7 @@ var w = class {
|
|
|
1304
1315
|
path: n.path,
|
|
1305
1316
|
parent: n
|
|
1306
1317
|
});
|
|
1307
|
-
return
|
|
1318
|
+
return Se(n, await (b(r) ? r : Promise.resolve(r)));
|
|
1308
1319
|
}
|
|
1309
1320
|
refine(e, t) {
|
|
1310
1321
|
let n = (e) => typeof t == "string" || t === void 0 ? { message: t } : typeof t == "function" ? t(e) : t;
|
|
@@ -1320,9 +1331,9 @@ var w = class {
|
|
|
1320
1331
|
return this._refinement((n, r) => e(n) ? !0 : (r.addIssue(typeof t == "function" ? t(n, r) : t), !1));
|
|
1321
1332
|
}
|
|
1322
1333
|
_refinement(e) {
|
|
1323
|
-
return new
|
|
1334
|
+
return new H({
|
|
1324
1335
|
schema: this,
|
|
1325
|
-
typeName:
|
|
1336
|
+
typeName: J.ZodEffects,
|
|
1326
1337
|
effect: {
|
|
1327
1338
|
type: "refinement",
|
|
1328
1339
|
refinement: e
|
|
@@ -1340,31 +1351,31 @@ var w = class {
|
|
|
1340
1351
|
};
|
|
1341
1352
|
}
|
|
1342
1353
|
optional() {
|
|
1343
|
-
return
|
|
1354
|
+
return U.create(this, this._def);
|
|
1344
1355
|
}
|
|
1345
1356
|
nullable() {
|
|
1346
|
-
return
|
|
1357
|
+
return W.create(this, this._def);
|
|
1347
1358
|
}
|
|
1348
1359
|
nullish() {
|
|
1349
1360
|
return this.nullable().optional();
|
|
1350
1361
|
}
|
|
1351
1362
|
array() {
|
|
1352
|
-
return
|
|
1363
|
+
return A.create(this);
|
|
1353
1364
|
}
|
|
1354
1365
|
promise() {
|
|
1355
|
-
return
|
|
1366
|
+
return V.create(this, this._def);
|
|
1356
1367
|
}
|
|
1357
1368
|
or(e) {
|
|
1358
|
-
return
|
|
1369
|
+
return N.create([this, e], this._def);
|
|
1359
1370
|
}
|
|
1360
1371
|
and(e) {
|
|
1361
|
-
return
|
|
1372
|
+
return F.create(this, e, this._def);
|
|
1362
1373
|
}
|
|
1363
1374
|
transform(e) {
|
|
1364
|
-
return new
|
|
1375
|
+
return new H({
|
|
1365
1376
|
...C(this._def),
|
|
1366
1377
|
schema: this,
|
|
1367
|
-
typeName:
|
|
1378
|
+
typeName: J.ZodEffects,
|
|
1368
1379
|
effect: {
|
|
1369
1380
|
type: "transform",
|
|
1370
1381
|
transform: e
|
|
@@ -1373,27 +1384,27 @@ var w = class {
|
|
|
1373
1384
|
}
|
|
1374
1385
|
default(e) {
|
|
1375
1386
|
let t = typeof e == "function" ? e : () => e;
|
|
1376
|
-
return new
|
|
1387
|
+
return new G({
|
|
1377
1388
|
...C(this._def),
|
|
1378
1389
|
innerType: this,
|
|
1379
1390
|
defaultValue: t,
|
|
1380
|
-
typeName:
|
|
1391
|
+
typeName: J.ZodDefault
|
|
1381
1392
|
});
|
|
1382
1393
|
}
|
|
1383
1394
|
brand() {
|
|
1384
|
-
return new
|
|
1385
|
-
typeName:
|
|
1395
|
+
return new lt({
|
|
1396
|
+
typeName: J.ZodBranded,
|
|
1386
1397
|
type: this,
|
|
1387
1398
|
...C(this._def)
|
|
1388
1399
|
});
|
|
1389
1400
|
}
|
|
1390
1401
|
catch(e) {
|
|
1391
1402
|
let t = typeof e == "function" ? e : () => e;
|
|
1392
|
-
return new
|
|
1403
|
+
return new K({
|
|
1393
1404
|
...C(this._def),
|
|
1394
1405
|
innerType: this,
|
|
1395
1406
|
catchValue: t,
|
|
1396
|
-
typeName:
|
|
1407
|
+
typeName: J.ZodCatch
|
|
1397
1408
|
});
|
|
1398
1409
|
}
|
|
1399
1410
|
describe(e) {
|
|
@@ -1404,10 +1415,10 @@ var w = class {
|
|
|
1404
1415
|
});
|
|
1405
1416
|
}
|
|
1406
1417
|
pipe(e) {
|
|
1407
|
-
return
|
|
1418
|
+
return ut.create(this, e);
|
|
1408
1419
|
}
|
|
1409
1420
|
readonly() {
|
|
1410
|
-
return
|
|
1421
|
+
return q.create(this);
|
|
1411
1422
|
}
|
|
1412
1423
|
isOptional() {
|
|
1413
1424
|
return this.safeParse(void 0).success;
|
|
@@ -1415,25 +1426,25 @@ var w = class {
|
|
|
1415
1426
|
isNullable() {
|
|
1416
1427
|
return this.safeParse(null).success;
|
|
1417
1428
|
}
|
|
1418
|
-
},
|
|
1419
|
-
function
|
|
1429
|
+
}, Ce = /^c[^\s-]{8,}$/i, we = /^[0-9a-z]+$/, Te = /^[0-9A-HJKMNP-TV-Z]{26}$/i, Ee = /^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i, De = /^[a-z0-9_-]{21}$/i, Oe = /^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/, ke = /^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/, Ae = /^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i, je = "^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$", Me, Ne = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/, Pe = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/, Fe = /^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/, Ie = /^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/, Le = /^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/, Re = /^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/, ze = "((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))", Be = RegExp(`^${ze}$`);
|
|
1430
|
+
function Ve(e) {
|
|
1420
1431
|
let t = "[0-5]\\d";
|
|
1421
1432
|
e.precision ? t = `${t}\\.\\d{${e.precision}}` : e.precision ?? (t = `${t}(\\.\\d+)?`);
|
|
1422
1433
|
let n = e.precision ? "+" : "?";
|
|
1423
1434
|
return `([01]\\d|2[0-3]):[0-5]\\d(:${t})${n}`;
|
|
1424
1435
|
}
|
|
1425
|
-
function Ve(e) {
|
|
1426
|
-
return RegExp(`^${Be(e)}$`);
|
|
1427
|
-
}
|
|
1428
1436
|
function He(e) {
|
|
1429
|
-
|
|
1430
|
-
return n.push(e.local ? "Z?" : "Z"), e.offset && n.push("([+-]\\d{2}:?\\d{2})"), t = `${t}(${n.join("|")})`, RegExp(`^${t}$`);
|
|
1437
|
+
return RegExp(`^${Ve(e)}$`);
|
|
1431
1438
|
}
|
|
1432
|
-
function Ue(e
|
|
1433
|
-
|
|
1439
|
+
function Ue(e) {
|
|
1440
|
+
let t = `${ze}T${Ve(e)}`, n = [];
|
|
1441
|
+
return n.push(e.local ? "Z?" : "Z"), e.offset && n.push("([+-]\\d{2}:?\\d{2})"), t = `${t}(${n.join("|")})`, RegExp(`^${t}$`);
|
|
1434
1442
|
}
|
|
1435
1443
|
function We(e, t) {
|
|
1436
|
-
|
|
1444
|
+
return !!((t === "v4" || !t) && Ne.test(e) || (t === "v6" || !t) && Fe.test(e));
|
|
1445
|
+
}
|
|
1446
|
+
function Ge(e, t) {
|
|
1447
|
+
if (!Oe.test(e)) return !1;
|
|
1437
1448
|
try {
|
|
1438
1449
|
let [n] = e.split(".");
|
|
1439
1450
|
if (!n) return !1;
|
|
@@ -1443,8 +1454,8 @@ function We(e, t) {
|
|
|
1443
1454
|
return !1;
|
|
1444
1455
|
}
|
|
1445
1456
|
}
|
|
1446
|
-
function
|
|
1447
|
-
return !!((t === "v4" || !t) &&
|
|
1457
|
+
function Ke(e, t) {
|
|
1458
|
+
return !!((t === "v4" || !t) && Pe.test(e) || (t === "v6" || !t) && Ie.test(e));
|
|
1448
1459
|
}
|
|
1449
1460
|
var T = class e extends w {
|
|
1450
1461
|
_parse(e) {
|
|
@@ -1490,37 +1501,37 @@ var T = class e extends w {
|
|
|
1490
1501
|
exact: !0,
|
|
1491
1502
|
message: r.message
|
|
1492
1503
|
}), t.dirty());
|
|
1493
|
-
} else if (r.kind === "email")
|
|
1504
|
+
} else if (r.kind === "email") Ae.test(e.data) || (n = this._getOrReturnCtx(e, n), h(n, {
|
|
1494
1505
|
validation: "email",
|
|
1495
1506
|
code: f.invalid_string,
|
|
1496
1507
|
message: r.message
|
|
1497
1508
|
}), t.dirty());
|
|
1498
|
-
else if (r.kind === "emoji")
|
|
1509
|
+
else if (r.kind === "emoji") Me ||= new RegExp(je, "u"), Me.test(e.data) || (n = this._getOrReturnCtx(e, n), h(n, {
|
|
1499
1510
|
validation: "emoji",
|
|
1500
1511
|
code: f.invalid_string,
|
|
1501
1512
|
message: r.message
|
|
1502
1513
|
}), t.dirty());
|
|
1503
|
-
else if (r.kind === "uuid")
|
|
1514
|
+
else if (r.kind === "uuid") Ee.test(e.data) || (n = this._getOrReturnCtx(e, n), h(n, {
|
|
1504
1515
|
validation: "uuid",
|
|
1505
1516
|
code: f.invalid_string,
|
|
1506
1517
|
message: r.message
|
|
1507
1518
|
}), t.dirty());
|
|
1508
|
-
else if (r.kind === "nanoid")
|
|
1519
|
+
else if (r.kind === "nanoid") De.test(e.data) || (n = this._getOrReturnCtx(e, n), h(n, {
|
|
1509
1520
|
validation: "nanoid",
|
|
1510
1521
|
code: f.invalid_string,
|
|
1511
1522
|
message: r.message
|
|
1512
1523
|
}), t.dirty());
|
|
1513
|
-
else if (r.kind === "cuid")
|
|
1524
|
+
else if (r.kind === "cuid") Ce.test(e.data) || (n = this._getOrReturnCtx(e, n), h(n, {
|
|
1514
1525
|
validation: "cuid",
|
|
1515
1526
|
code: f.invalid_string,
|
|
1516
1527
|
message: r.message
|
|
1517
1528
|
}), t.dirty());
|
|
1518
|
-
else if (r.kind === "cuid2")
|
|
1529
|
+
else if (r.kind === "cuid2") we.test(e.data) || (n = this._getOrReturnCtx(e, n), h(n, {
|
|
1519
1530
|
validation: "cuid2",
|
|
1520
1531
|
code: f.invalid_string,
|
|
1521
1532
|
message: r.message
|
|
1522
1533
|
}), t.dirty());
|
|
1523
|
-
else if (r.kind === "ulid")
|
|
1534
|
+
else if (r.kind === "ulid") Te.test(e.data) || (n = this._getOrReturnCtx(e, n), h(n, {
|
|
1524
1535
|
validation: "ulid",
|
|
1525
1536
|
code: f.invalid_string,
|
|
1526
1537
|
message: r.message
|
|
@@ -1553,39 +1564,39 @@ var T = class e extends w {
|
|
|
1553
1564
|
code: f.invalid_string,
|
|
1554
1565
|
validation: { endsWith: r.value },
|
|
1555
1566
|
message: r.message
|
|
1556
|
-
}), t.dirty()) : r.kind === "datetime" ?
|
|
1567
|
+
}), t.dirty()) : r.kind === "datetime" ? Ue(r).test(e.data) || (n = this._getOrReturnCtx(e, n), h(n, {
|
|
1557
1568
|
code: f.invalid_string,
|
|
1558
1569
|
validation: "datetime",
|
|
1559
1570
|
message: r.message
|
|
1560
|
-
}), t.dirty()) : r.kind === "date" ?
|
|
1571
|
+
}), t.dirty()) : r.kind === "date" ? Be.test(e.data) || (n = this._getOrReturnCtx(e, n), h(n, {
|
|
1561
1572
|
code: f.invalid_string,
|
|
1562
1573
|
validation: "date",
|
|
1563
1574
|
message: r.message
|
|
1564
|
-
}), t.dirty()) : r.kind === "time" ?
|
|
1575
|
+
}), t.dirty()) : r.kind === "time" ? He(r).test(e.data) || (n = this._getOrReturnCtx(e, n), h(n, {
|
|
1565
1576
|
code: f.invalid_string,
|
|
1566
1577
|
validation: "time",
|
|
1567
1578
|
message: r.message
|
|
1568
|
-
}), t.dirty()) : r.kind === "duration" ?
|
|
1579
|
+
}), t.dirty()) : r.kind === "duration" ? ke.test(e.data) || (n = this._getOrReturnCtx(e, n), h(n, {
|
|
1569
1580
|
validation: "duration",
|
|
1570
1581
|
code: f.invalid_string,
|
|
1571
1582
|
message: r.message
|
|
1572
|
-
}), t.dirty()) : r.kind === "ip" ?
|
|
1583
|
+
}), t.dirty()) : r.kind === "ip" ? We(e.data, r.version) || (n = this._getOrReturnCtx(e, n), h(n, {
|
|
1573
1584
|
validation: "ip",
|
|
1574
1585
|
code: f.invalid_string,
|
|
1575
1586
|
message: r.message
|
|
1576
|
-
}), t.dirty()) : r.kind === "jwt" ?
|
|
1587
|
+
}), t.dirty()) : r.kind === "jwt" ? Ge(e.data, r.alg) || (n = this._getOrReturnCtx(e, n), h(n, {
|
|
1577
1588
|
validation: "jwt",
|
|
1578
1589
|
code: f.invalid_string,
|
|
1579
1590
|
message: r.message
|
|
1580
|
-
}), t.dirty()) : r.kind === "cidr" ?
|
|
1591
|
+
}), t.dirty()) : r.kind === "cidr" ? Ke(e.data, r.version) || (n = this._getOrReturnCtx(e, n), h(n, {
|
|
1581
1592
|
validation: "cidr",
|
|
1582
1593
|
code: f.invalid_string,
|
|
1583
1594
|
message: r.message
|
|
1584
|
-
}), t.dirty()) : r.kind === "base64" ?
|
|
1595
|
+
}), t.dirty()) : r.kind === "base64" ? Le.test(e.data) || (n = this._getOrReturnCtx(e, n), h(n, {
|
|
1585
1596
|
validation: "base64",
|
|
1586
1597
|
code: f.invalid_string,
|
|
1587
1598
|
message: r.message
|
|
1588
|
-
}), t.dirty()) : r.kind === "base64url" ?
|
|
1599
|
+
}), t.dirty()) : r.kind === "base64url" ? Re.test(e.data) || (n = this._getOrReturnCtx(e, n), h(n, {
|
|
1589
1600
|
validation: "base64url",
|
|
1590
1601
|
code: f.invalid_string,
|
|
1591
1602
|
message: r.message
|
|
@@ -1856,15 +1867,15 @@ var T = class e extends w {
|
|
|
1856
1867
|
};
|
|
1857
1868
|
T.create = (e) => new T({
|
|
1858
1869
|
checks: [],
|
|
1859
|
-
typeName:
|
|
1870
|
+
typeName: J.ZodString,
|
|
1860
1871
|
coerce: e?.coerce ?? !1,
|
|
1861
1872
|
...C(e)
|
|
1862
1873
|
});
|
|
1863
|
-
function
|
|
1874
|
+
function qe(e, t) {
|
|
1864
1875
|
let n = (e.toString().split(".")[1] || "").length, r = (t.toString().split(".")[1] || "").length, i = n > r ? n : r;
|
|
1865
1876
|
return Number.parseInt(e.toFixed(i).replace(".", "")) % Number.parseInt(t.toFixed(i).replace(".", "")) / 10 ** i;
|
|
1866
1877
|
}
|
|
1867
|
-
var
|
|
1878
|
+
var Je = class e extends w {
|
|
1868
1879
|
constructor() {
|
|
1869
1880
|
super(...arguments), this.min = this.gte, this.max = this.lte, this.step = this.multipleOf;
|
|
1870
1881
|
}
|
|
@@ -1897,7 +1908,7 @@ var qe = class e extends w {
|
|
|
1897
1908
|
inclusive: r.inclusive,
|
|
1898
1909
|
exact: !1,
|
|
1899
1910
|
message: r.message
|
|
1900
|
-
}), n.dirty()) : r.kind === "multipleOf" ?
|
|
1911
|
+
}), n.dirty()) : r.kind === "multipleOf" ? qe(e.data, r.value) !== 0 && (t = this._getOrReturnCtx(e, t), h(t, {
|
|
1901
1912
|
code: f.not_multiple_of,
|
|
1902
1913
|
multipleOf: r.value,
|
|
1903
1914
|
message: r.message
|
|
@@ -2023,13 +2034,13 @@ var qe = class e extends w {
|
|
|
2023
2034
|
return Number.isFinite(t) && Number.isFinite(e);
|
|
2024
2035
|
}
|
|
2025
2036
|
};
|
|
2026
|
-
|
|
2037
|
+
Je.create = (e) => new Je({
|
|
2027
2038
|
checks: [],
|
|
2028
|
-
typeName:
|
|
2039
|
+
typeName: J.ZodNumber,
|
|
2029
2040
|
coerce: e?.coerce || !1,
|
|
2030
2041
|
...C(e)
|
|
2031
2042
|
});
|
|
2032
|
-
var
|
|
2043
|
+
var Ye = class e extends w {
|
|
2033
2044
|
constructor() {
|
|
2034
2045
|
super(...arguments), this.min = this.gte, this.max = this.lte;
|
|
2035
2046
|
}
|
|
@@ -2150,13 +2161,13 @@ var Je = class e extends w {
|
|
|
2150
2161
|
return e;
|
|
2151
2162
|
}
|
|
2152
2163
|
};
|
|
2153
|
-
|
|
2164
|
+
Ye.create = (e) => new Ye({
|
|
2154
2165
|
checks: [],
|
|
2155
|
-
typeName:
|
|
2166
|
+
typeName: J.ZodBigInt,
|
|
2156
2167
|
coerce: e?.coerce ?? !1,
|
|
2157
2168
|
...C(e)
|
|
2158
2169
|
});
|
|
2159
|
-
var
|
|
2170
|
+
var Xe = class extends w {
|
|
2160
2171
|
_parse(e) {
|
|
2161
2172
|
if (this._def.coerce && (e.data = !!e.data), this._getType(e) !== u.boolean) {
|
|
2162
2173
|
let t = this._getOrReturnCtx(e);
|
|
@@ -2169,12 +2180,12 @@ var Ye = class extends w {
|
|
|
2169
2180
|
return v(e.data);
|
|
2170
2181
|
}
|
|
2171
2182
|
};
|
|
2172
|
-
|
|
2173
|
-
typeName:
|
|
2183
|
+
Xe.create = (e) => new Xe({
|
|
2184
|
+
typeName: J.ZodBoolean,
|
|
2174
2185
|
coerce: e?.coerce || !1,
|
|
2175
2186
|
...C(e)
|
|
2176
2187
|
});
|
|
2177
|
-
var
|
|
2188
|
+
var Ze = class e extends w {
|
|
2178
2189
|
_parse(e) {
|
|
2179
2190
|
if (this._def.coerce && (e.data = new Date(e.data)), this._getType(e) !== u.date) {
|
|
2180
2191
|
let t = this._getOrReturnCtx(e);
|
|
@@ -2237,13 +2248,13 @@ var Xe = class e extends w {
|
|
|
2237
2248
|
return e == null ? null : new Date(e);
|
|
2238
2249
|
}
|
|
2239
2250
|
};
|
|
2240
|
-
|
|
2251
|
+
Ze.create = (e) => new Ze({
|
|
2241
2252
|
checks: [],
|
|
2242
2253
|
coerce: e?.coerce || !1,
|
|
2243
|
-
typeName:
|
|
2254
|
+
typeName: J.ZodDate,
|
|
2244
2255
|
...C(e)
|
|
2245
2256
|
});
|
|
2246
|
-
var
|
|
2257
|
+
var Qe = class extends w {
|
|
2247
2258
|
_parse(e) {
|
|
2248
2259
|
if (this._getType(e) !== u.symbol) {
|
|
2249
2260
|
let t = this._getOrReturnCtx(e);
|
|
@@ -2256,8 +2267,8 @@ var Ze = class extends w {
|
|
|
2256
2267
|
return v(e.data);
|
|
2257
2268
|
}
|
|
2258
2269
|
};
|
|
2259
|
-
|
|
2260
|
-
typeName:
|
|
2270
|
+
Qe.create = (e) => new Qe({
|
|
2271
|
+
typeName: J.ZodSymbol,
|
|
2261
2272
|
...C(e)
|
|
2262
2273
|
});
|
|
2263
2274
|
var E = class extends w {
|
|
@@ -2274,7 +2285,7 @@ var E = class extends w {
|
|
|
2274
2285
|
}
|
|
2275
2286
|
};
|
|
2276
2287
|
E.create = (e) => new E({
|
|
2277
|
-
typeName:
|
|
2288
|
+
typeName: J.ZodUndefined,
|
|
2278
2289
|
...C(e)
|
|
2279
2290
|
});
|
|
2280
2291
|
var D = class extends w {
|
|
@@ -2291,10 +2302,10 @@ var D = class extends w {
|
|
|
2291
2302
|
}
|
|
2292
2303
|
};
|
|
2293
2304
|
D.create = (e) => new D({
|
|
2294
|
-
typeName:
|
|
2305
|
+
typeName: J.ZodNull,
|
|
2295
2306
|
...C(e)
|
|
2296
2307
|
});
|
|
2297
|
-
var
|
|
2308
|
+
var $e = class extends w {
|
|
2298
2309
|
constructor() {
|
|
2299
2310
|
super(...arguments), this._any = !0;
|
|
2300
2311
|
}
|
|
@@ -2302,11 +2313,11 @@ var O = class extends w {
|
|
|
2302
2313
|
return v(e.data);
|
|
2303
2314
|
}
|
|
2304
2315
|
};
|
|
2305
|
-
|
|
2306
|
-
typeName:
|
|
2316
|
+
$e.create = (e) => new $e({
|
|
2317
|
+
typeName: J.ZodAny,
|
|
2307
2318
|
...C(e)
|
|
2308
2319
|
});
|
|
2309
|
-
var
|
|
2320
|
+
var O = class extends w {
|
|
2310
2321
|
constructor() {
|
|
2311
2322
|
super(...arguments), this._unknown = !0;
|
|
2312
2323
|
}
|
|
@@ -2314,11 +2325,11 @@ var k = class extends w {
|
|
|
2314
2325
|
return v(e.data);
|
|
2315
2326
|
}
|
|
2316
2327
|
};
|
|
2317
|
-
|
|
2318
|
-
typeName:
|
|
2328
|
+
O.create = (e) => new O({
|
|
2329
|
+
typeName: J.ZodUnknown,
|
|
2319
2330
|
...C(e)
|
|
2320
2331
|
});
|
|
2321
|
-
var
|
|
2332
|
+
var k = class extends w {
|
|
2322
2333
|
_parse(e) {
|
|
2323
2334
|
let t = this._getOrReturnCtx(e);
|
|
2324
2335
|
return h(t, {
|
|
@@ -2328,11 +2339,11 @@ var A = class extends w {
|
|
|
2328
2339
|
}), _;
|
|
2329
2340
|
}
|
|
2330
2341
|
};
|
|
2331
|
-
|
|
2332
|
-
typeName:
|
|
2342
|
+
k.create = (e) => new k({
|
|
2343
|
+
typeName: J.ZodNever,
|
|
2333
2344
|
...C(e)
|
|
2334
2345
|
});
|
|
2335
|
-
var
|
|
2346
|
+
var et = class extends w {
|
|
2336
2347
|
_parse(e) {
|
|
2337
2348
|
if (this._getType(e) !== u.undefined) {
|
|
2338
2349
|
let t = this._getOrReturnCtx(e);
|
|
@@ -2345,11 +2356,11 @@ var Qe = class extends w {
|
|
|
2345
2356
|
return v(e.data);
|
|
2346
2357
|
}
|
|
2347
2358
|
};
|
|
2348
|
-
|
|
2349
|
-
typeName:
|
|
2359
|
+
et.create = (e) => new et({
|
|
2360
|
+
typeName: J.ZodVoid,
|
|
2350
2361
|
...C(e)
|
|
2351
2362
|
});
|
|
2352
|
-
var
|
|
2363
|
+
var A = class e extends w {
|
|
2353
2364
|
_parse(e) {
|
|
2354
2365
|
let { ctx: t, status: n } = this._processInputParams(e), r = this._def;
|
|
2355
2366
|
if (t.parsedType !== u.array) return h(t, {
|
|
@@ -2421,32 +2432,32 @@ var j = class e extends w {
|
|
|
2421
2432
|
return this.min(1, e);
|
|
2422
2433
|
}
|
|
2423
2434
|
};
|
|
2424
|
-
|
|
2435
|
+
A.create = (e, t) => new A({
|
|
2425
2436
|
type: e,
|
|
2426
2437
|
minLength: null,
|
|
2427
2438
|
maxLength: null,
|
|
2428
2439
|
exactLength: null,
|
|
2429
|
-
typeName:
|
|
2440
|
+
typeName: J.ZodArray,
|
|
2430
2441
|
...C(t)
|
|
2431
2442
|
});
|
|
2432
|
-
function
|
|
2433
|
-
if (e instanceof
|
|
2443
|
+
function j(e) {
|
|
2444
|
+
if (e instanceof M) {
|
|
2434
2445
|
let t = {};
|
|
2435
2446
|
for (let n in e.shape) {
|
|
2436
2447
|
let r = e.shape[n];
|
|
2437
|
-
t[n] =
|
|
2448
|
+
t[n] = U.create(j(r));
|
|
2438
2449
|
}
|
|
2439
|
-
return new
|
|
2450
|
+
return new M({
|
|
2440
2451
|
...e._def,
|
|
2441
2452
|
shape: () => t
|
|
2442
2453
|
});
|
|
2443
2454
|
}
|
|
2444
|
-
return e instanceof
|
|
2455
|
+
return e instanceof A ? new A({
|
|
2445
2456
|
...e._def,
|
|
2446
|
-
type:
|
|
2447
|
-
}) : e instanceof
|
|
2457
|
+
type: j(e.element)
|
|
2458
|
+
}) : e instanceof U ? U.create(j(e.unwrap())) : e instanceof W ? W.create(j(e.unwrap())) : e instanceof I ? I.create(e.items.map((e) => j(e))) : e;
|
|
2448
2459
|
}
|
|
2449
|
-
var
|
|
2460
|
+
var M = class e extends w {
|
|
2450
2461
|
constructor() {
|
|
2451
2462
|
super(...arguments), this._cached = null, this.nonstrict = this.passthrough, this.augment = this.extend;
|
|
2452
2463
|
}
|
|
@@ -2468,7 +2479,7 @@ var N = class e extends w {
|
|
|
2468
2479
|
}), _;
|
|
2469
2480
|
}
|
|
2470
2481
|
let { status: t, ctx: n } = this._processInputParams(e), { shape: r, keys: i } = this._getCached(), a = [];
|
|
2471
|
-
if (!(this._def.catchall instanceof
|
|
2482
|
+
if (!(this._def.catchall instanceof k && this._def.unknownKeys === "strip")) for (let e in n.data) i.includes(e) || a.push(e);
|
|
2472
2483
|
let o = [];
|
|
2473
2484
|
for (let e of i) {
|
|
2474
2485
|
let t = r[e], i = n.data[e];
|
|
@@ -2481,7 +2492,7 @@ var N = class e extends w {
|
|
|
2481
2492
|
alwaysSet: e in n.data
|
|
2482
2493
|
});
|
|
2483
2494
|
}
|
|
2484
|
-
if (this._def.catchall instanceof
|
|
2495
|
+
if (this._def.catchall instanceof k) {
|
|
2485
2496
|
let e = this._def.unknownKeys;
|
|
2486
2497
|
if (e === "passthrough") for (let e of a) o.push({
|
|
2487
2498
|
key: {
|
|
@@ -2567,7 +2578,7 @@ var N = class e extends w {
|
|
|
2567
2578
|
...this._def.shape(),
|
|
2568
2579
|
...t._def.shape()
|
|
2569
2580
|
}),
|
|
2570
|
-
typeName:
|
|
2581
|
+
typeName: J.ZodObject
|
|
2571
2582
|
});
|
|
2572
2583
|
}
|
|
2573
2584
|
setKey(e, t) {
|
|
@@ -2596,7 +2607,7 @@ var N = class e extends w {
|
|
|
2596
2607
|
});
|
|
2597
2608
|
}
|
|
2598
2609
|
deepPartial() {
|
|
2599
|
-
return
|
|
2610
|
+
return j(this);
|
|
2600
2611
|
}
|
|
2601
2612
|
partial(t) {
|
|
2602
2613
|
let n = {};
|
|
@@ -2614,7 +2625,7 @@ var N = class e extends w {
|
|
|
2614
2625
|
for (let e of l.objectKeys(this.shape)) if (t && !t[e]) n[e] = this.shape[e];
|
|
2615
2626
|
else {
|
|
2616
2627
|
let t = this.shape[e];
|
|
2617
|
-
for (; t instanceof
|
|
2628
|
+
for (; t instanceof U;) t = t._def.innerType;
|
|
2618
2629
|
n[e] = t;
|
|
2619
2630
|
}
|
|
2620
2631
|
return new e({
|
|
@@ -2623,29 +2634,29 @@ var N = class e extends w {
|
|
|
2623
2634
|
});
|
|
2624
2635
|
}
|
|
2625
2636
|
keyof() {
|
|
2626
|
-
return
|
|
2637
|
+
return st(l.objectKeys(this.shape));
|
|
2627
2638
|
}
|
|
2628
2639
|
};
|
|
2629
|
-
|
|
2640
|
+
M.create = (e, t) => new M({
|
|
2630
2641
|
shape: () => e,
|
|
2631
2642
|
unknownKeys: "strip",
|
|
2632
|
-
catchall:
|
|
2633
|
-
typeName:
|
|
2643
|
+
catchall: k.create(),
|
|
2644
|
+
typeName: J.ZodObject,
|
|
2634
2645
|
...C(t)
|
|
2635
|
-
}),
|
|
2646
|
+
}), M.strictCreate = (e, t) => new M({
|
|
2636
2647
|
shape: () => e,
|
|
2637
2648
|
unknownKeys: "strict",
|
|
2638
|
-
catchall:
|
|
2639
|
-
typeName:
|
|
2649
|
+
catchall: k.create(),
|
|
2650
|
+
typeName: J.ZodObject,
|
|
2640
2651
|
...C(t)
|
|
2641
|
-
}),
|
|
2652
|
+
}), M.lazycreate = (e, t) => new M({
|
|
2642
2653
|
shape: e,
|
|
2643
2654
|
unknownKeys: "strip",
|
|
2644
|
-
catchall:
|
|
2645
|
-
typeName:
|
|
2655
|
+
catchall: k.create(),
|
|
2656
|
+
typeName: J.ZodObject,
|
|
2646
2657
|
...C(t)
|
|
2647
2658
|
});
|
|
2648
|
-
var
|
|
2659
|
+
var N = class extends w {
|
|
2649
2660
|
_parse(e) {
|
|
2650
2661
|
let { ctx: t } = this._processInputParams(e), n = this._def.options;
|
|
2651
2662
|
function r(e) {
|
|
@@ -2708,12 +2719,12 @@ var P = class extends w {
|
|
|
2708
2719
|
return this._def.options;
|
|
2709
2720
|
}
|
|
2710
2721
|
};
|
|
2711
|
-
|
|
2722
|
+
N.create = (e, t) => new N({
|
|
2712
2723
|
options: e,
|
|
2713
|
-
typeName:
|
|
2724
|
+
typeName: J.ZodUnion,
|
|
2714
2725
|
...C(t)
|
|
2715
2726
|
});
|
|
2716
|
-
var
|
|
2727
|
+
var P = (e) => e instanceof L ? P(e.schema) : e instanceof H ? P(e.innerType()) : e instanceof R ? [e.value] : e instanceof z ? e.options : e instanceof B ? l.objectValues(e.enum) : e instanceof G ? P(e._def.innerType) : e instanceof E ? [void 0] : e instanceof D ? [null] : e instanceof U ? [void 0, ...P(e.unwrap())] : e instanceof W ? [null, ...P(e.unwrap())] : e instanceof lt || e instanceof q ? P(e.unwrap()) : e instanceof K ? P(e._def.innerType) : [], tt = class e extends w {
|
|
2717
2728
|
_parse(e) {
|
|
2718
2729
|
let { ctx: t } = this._processInputParams(e);
|
|
2719
2730
|
if (t.parsedType !== u.object) return h(t, {
|
|
@@ -2748,7 +2759,7 @@ var F = (e) => e instanceof R ? F(e.schema) : e instanceof U ? F(e.innerType())
|
|
|
2748
2759
|
static create(t, n, r) {
|
|
2749
2760
|
let i = /* @__PURE__ */ new Map();
|
|
2750
2761
|
for (let e of n) {
|
|
2751
|
-
let n =
|
|
2762
|
+
let n = P(e.shape[t]);
|
|
2752
2763
|
if (!n.length) throw Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);
|
|
2753
2764
|
for (let r of n) {
|
|
2754
2765
|
if (i.has(r)) throw Error(`Discriminator property ${String(t)} has duplicate value ${String(r)}`);
|
|
@@ -2756,7 +2767,7 @@ var F = (e) => e instanceof R ? F(e.schema) : e instanceof U ? F(e.innerType())
|
|
|
2756
2767
|
}
|
|
2757
2768
|
}
|
|
2758
2769
|
return new e({
|
|
2759
|
-
typeName:
|
|
2770
|
+
typeName: J.ZodDiscriminatedUnion,
|
|
2760
2771
|
discriminator: t,
|
|
2761
2772
|
options: n,
|
|
2762
2773
|
optionsMap: i,
|
|
@@ -2764,7 +2775,7 @@ var F = (e) => e instanceof R ? F(e.schema) : e instanceof U ? F(e.innerType())
|
|
|
2764
2775
|
});
|
|
2765
2776
|
}
|
|
2766
2777
|
};
|
|
2767
|
-
function
|
|
2778
|
+
function nt(e, t) {
|
|
2768
2779
|
let n = d(e), r = d(t);
|
|
2769
2780
|
if (e === t) return {
|
|
2770
2781
|
valid: !0,
|
|
@@ -2776,7 +2787,7 @@ function et(e, t) {
|
|
|
2776
2787
|
...t
|
|
2777
2788
|
};
|
|
2778
2789
|
for (let n of r) {
|
|
2779
|
-
let r =
|
|
2790
|
+
let r = nt(e[n], t[n]);
|
|
2780
2791
|
if (!r.valid) return { valid: !1 };
|
|
2781
2792
|
i[n] = r.data;
|
|
2782
2793
|
}
|
|
@@ -2789,7 +2800,7 @@ function et(e, t) {
|
|
|
2789
2800
|
if (e.length !== t.length) return { valid: !1 };
|
|
2790
2801
|
let n = [];
|
|
2791
2802
|
for (let r = 0; r < e.length; r++) {
|
|
2792
|
-
let i = e[r], a = t[r], o =
|
|
2803
|
+
let i = e[r], a = t[r], o = nt(i, a);
|
|
2793
2804
|
if (!o.valid) return { valid: !1 };
|
|
2794
2805
|
n.push(o.data);
|
|
2795
2806
|
}
|
|
@@ -2803,12 +2814,12 @@ function et(e, t) {
|
|
|
2803
2814
|
data: e
|
|
2804
2815
|
} : { valid: !1 };
|
|
2805
2816
|
}
|
|
2806
|
-
var
|
|
2817
|
+
var F = class extends w {
|
|
2807
2818
|
_parse(e) {
|
|
2808
2819
|
let { status: t, ctx: n } = this._processInputParams(e), r = (e, r) => {
|
|
2809
|
-
if (
|
|
2810
|
-
let i =
|
|
2811
|
-
return i.valid ? ((
|
|
2820
|
+
if (be(e) || be(r)) return _;
|
|
2821
|
+
let i = nt(e.value, r.value);
|
|
2822
|
+
return i.valid ? ((xe(e) || xe(r)) && t.dirty(), {
|
|
2812
2823
|
status: t.value,
|
|
2813
2824
|
value: i.data
|
|
2814
2825
|
}) : (h(n, { code: f.invalid_intersection_types }), _);
|
|
@@ -2832,13 +2843,13 @@ var I = class extends w {
|
|
|
2832
2843
|
}));
|
|
2833
2844
|
}
|
|
2834
2845
|
};
|
|
2835
|
-
|
|
2846
|
+
F.create = (e, t, n) => new F({
|
|
2836
2847
|
left: e,
|
|
2837
2848
|
right: t,
|
|
2838
|
-
typeName:
|
|
2849
|
+
typeName: J.ZodIntersection,
|
|
2839
2850
|
...C(n)
|
|
2840
2851
|
});
|
|
2841
|
-
var
|
|
2852
|
+
var I = class e extends w {
|
|
2842
2853
|
_parse(e) {
|
|
2843
2854
|
let { status: t, ctx: n } = this._processInputParams(e);
|
|
2844
2855
|
if (n.parsedType !== u.array) return h(n, {
|
|
@@ -2876,16 +2887,16 @@ var L = class e extends w {
|
|
|
2876
2887
|
});
|
|
2877
2888
|
}
|
|
2878
2889
|
};
|
|
2879
|
-
|
|
2890
|
+
I.create = (e, t) => {
|
|
2880
2891
|
if (!Array.isArray(e)) throw Error("You must pass an array of schemas to z.tuple([ ... ])");
|
|
2881
|
-
return new
|
|
2892
|
+
return new I({
|
|
2882
2893
|
items: e,
|
|
2883
|
-
typeName:
|
|
2894
|
+
typeName: J.ZodTuple,
|
|
2884
2895
|
rest: null,
|
|
2885
2896
|
...C(t)
|
|
2886
2897
|
});
|
|
2887
2898
|
};
|
|
2888
|
-
var
|
|
2899
|
+
var rt = class e extends w {
|
|
2889
2900
|
get keySchema() {
|
|
2890
2901
|
return this._def.keyType;
|
|
2891
2902
|
}
|
|
@@ -2914,16 +2925,16 @@ var tt = class e extends w {
|
|
|
2914
2925
|
return n instanceof w ? new e({
|
|
2915
2926
|
keyType: t,
|
|
2916
2927
|
valueType: n,
|
|
2917
|
-
typeName:
|
|
2928
|
+
typeName: J.ZodRecord,
|
|
2918
2929
|
...C(r)
|
|
2919
2930
|
}) : new e({
|
|
2920
2931
|
keyType: T.create(),
|
|
2921
2932
|
valueType: t,
|
|
2922
|
-
typeName:
|
|
2933
|
+
typeName: J.ZodRecord,
|
|
2923
2934
|
...C(n)
|
|
2924
2935
|
});
|
|
2925
2936
|
}
|
|
2926
|
-
},
|
|
2937
|
+
}, it = class extends w {
|
|
2927
2938
|
get keySchema() {
|
|
2928
2939
|
return this._def.keyType;
|
|
2929
2940
|
}
|
|
@@ -2969,13 +2980,13 @@ var tt = class e extends w {
|
|
|
2969
2980
|
}
|
|
2970
2981
|
}
|
|
2971
2982
|
};
|
|
2972
|
-
|
|
2983
|
+
it.create = (e, t, n) => new it({
|
|
2973
2984
|
valueType: t,
|
|
2974
2985
|
keyType: e,
|
|
2975
|
-
typeName:
|
|
2986
|
+
typeName: J.ZodMap,
|
|
2976
2987
|
...C(n)
|
|
2977
2988
|
});
|
|
2978
|
-
var
|
|
2989
|
+
var at = class e extends w {
|
|
2979
2990
|
_parse(e) {
|
|
2980
2991
|
let { status: t, ctx: n } = this._processInputParams(e);
|
|
2981
2992
|
if (n.parsedType !== u.set) return h(n, {
|
|
@@ -3039,14 +3050,14 @@ var rt = class e extends w {
|
|
|
3039
3050
|
return this.min(1, e);
|
|
3040
3051
|
}
|
|
3041
3052
|
};
|
|
3042
|
-
|
|
3053
|
+
at.create = (e, t) => new at({
|
|
3043
3054
|
valueType: e,
|
|
3044
3055
|
minSize: null,
|
|
3045
3056
|
maxSize: null,
|
|
3046
|
-
typeName:
|
|
3057
|
+
typeName: J.ZodSet,
|
|
3047
3058
|
...C(t)
|
|
3048
3059
|
});
|
|
3049
|
-
var
|
|
3060
|
+
var ot = class e extends w {
|
|
3050
3061
|
constructor() {
|
|
3051
3062
|
super(...arguments), this.validate = this.implement;
|
|
3052
3063
|
}
|
|
@@ -3058,13 +3069,13 @@ var it = class e extends w {
|
|
|
3058
3069
|
received: t.parsedType
|
|
3059
3070
|
}), _;
|
|
3060
3071
|
function n(e, n) {
|
|
3061
|
-
return
|
|
3072
|
+
return ve({
|
|
3062
3073
|
data: e,
|
|
3063
3074
|
path: t.path,
|
|
3064
3075
|
errorMaps: [
|
|
3065
3076
|
t.common.contextualErrorMap,
|
|
3066
3077
|
t.schemaErrorMap,
|
|
3067
|
-
|
|
3078
|
+
_e(),
|
|
3068
3079
|
m
|
|
3069
3080
|
].filter((e) => !!e),
|
|
3070
3081
|
issueData: {
|
|
@@ -3074,13 +3085,13 @@ var it = class e extends w {
|
|
|
3074
3085
|
});
|
|
3075
3086
|
}
|
|
3076
3087
|
function r(e, n) {
|
|
3077
|
-
return
|
|
3088
|
+
return ve({
|
|
3078
3089
|
data: e,
|
|
3079
3090
|
path: t.path,
|
|
3080
3091
|
errorMaps: [
|
|
3081
3092
|
t.common.contextualErrorMap,
|
|
3082
3093
|
t.schemaErrorMap,
|
|
3083
|
-
|
|
3094
|
+
_e(),
|
|
3084
3095
|
m
|
|
3085
3096
|
].filter((e) => !!e),
|
|
3086
3097
|
issueData: {
|
|
@@ -3090,7 +3101,7 @@ var it = class e extends w {
|
|
|
3090
3101
|
});
|
|
3091
3102
|
}
|
|
3092
3103
|
let i = { errorMap: t.common.contextualErrorMap }, a = t.data;
|
|
3093
|
-
if (this._def.returns instanceof
|
|
3104
|
+
if (this._def.returns instanceof V) {
|
|
3094
3105
|
let e = this;
|
|
3095
3106
|
return v(async function(...t) {
|
|
3096
3107
|
let o = new p([]), s = await e._def.args.parseAsync(t, i).catch((e) => {
|
|
@@ -3121,7 +3132,7 @@ var it = class e extends w {
|
|
|
3121
3132
|
args(...t) {
|
|
3122
3133
|
return new e({
|
|
3123
3134
|
...this._def,
|
|
3124
|
-
args:
|
|
3135
|
+
args: I.create(t).rest(O.create())
|
|
3125
3136
|
});
|
|
3126
3137
|
}
|
|
3127
3138
|
returns(t) {
|
|
@@ -3138,13 +3149,13 @@ var it = class e extends w {
|
|
|
3138
3149
|
}
|
|
3139
3150
|
static create(t, n, r) {
|
|
3140
3151
|
return new e({
|
|
3141
|
-
args: t ||
|
|
3142
|
-
returns: n ||
|
|
3143
|
-
typeName:
|
|
3152
|
+
args: t || I.create([]).rest(O.create()),
|
|
3153
|
+
returns: n || O.create(),
|
|
3154
|
+
typeName: J.ZodFunction,
|
|
3144
3155
|
...C(r)
|
|
3145
3156
|
});
|
|
3146
3157
|
}
|
|
3147
|
-
},
|
|
3158
|
+
}, L = class extends w {
|
|
3148
3159
|
get schema() {
|
|
3149
3160
|
return this._def.getter();
|
|
3150
3161
|
}
|
|
@@ -3157,12 +3168,12 @@ var it = class e extends w {
|
|
|
3157
3168
|
});
|
|
3158
3169
|
}
|
|
3159
3170
|
};
|
|
3160
|
-
|
|
3171
|
+
L.create = (e, t) => new L({
|
|
3161
3172
|
getter: e,
|
|
3162
|
-
typeName:
|
|
3173
|
+
typeName: J.ZodLazy,
|
|
3163
3174
|
...C(t)
|
|
3164
3175
|
});
|
|
3165
|
-
var
|
|
3176
|
+
var R = class extends w {
|
|
3166
3177
|
_parse(e) {
|
|
3167
3178
|
if (e.data !== this._def.value) {
|
|
3168
3179
|
let t = this._getOrReturnCtx(e);
|
|
@@ -3181,19 +3192,19 @@ var z = class extends w {
|
|
|
3181
3192
|
return this._def.value;
|
|
3182
3193
|
}
|
|
3183
3194
|
};
|
|
3184
|
-
|
|
3195
|
+
R.create = (e, t) => new R({
|
|
3185
3196
|
value: e,
|
|
3186
|
-
typeName:
|
|
3197
|
+
typeName: J.ZodLiteral,
|
|
3187
3198
|
...C(t)
|
|
3188
3199
|
});
|
|
3189
|
-
function
|
|
3190
|
-
return new
|
|
3200
|
+
function st(e, t) {
|
|
3201
|
+
return new z({
|
|
3191
3202
|
values: e,
|
|
3192
|
-
typeName:
|
|
3203
|
+
typeName: J.ZodEnum,
|
|
3193
3204
|
...C(t)
|
|
3194
3205
|
});
|
|
3195
3206
|
}
|
|
3196
|
-
var
|
|
3207
|
+
var z = class e extends w {
|
|
3197
3208
|
_parse(e) {
|
|
3198
3209
|
if (typeof e.data != "string") {
|
|
3199
3210
|
let t = this._getOrReturnCtx(e), n = this._def.values;
|
|
@@ -3244,8 +3255,8 @@ var B = class e extends w {
|
|
|
3244
3255
|
});
|
|
3245
3256
|
}
|
|
3246
3257
|
};
|
|
3247
|
-
|
|
3248
|
-
var
|
|
3258
|
+
z.create = st;
|
|
3259
|
+
var B = class extends w {
|
|
3249
3260
|
_parse(e) {
|
|
3250
3261
|
let t = l.getValidEnumValues(this._def.values), n = this._getOrReturnCtx(e);
|
|
3251
3262
|
if (n.parsedType !== u.string && n.parsedType !== u.number) {
|
|
@@ -3270,12 +3281,12 @@ var V = class extends w {
|
|
|
3270
3281
|
return this._def.values;
|
|
3271
3282
|
}
|
|
3272
3283
|
};
|
|
3273
|
-
|
|
3284
|
+
B.create = (e, t) => new B({
|
|
3274
3285
|
values: e,
|
|
3275
|
-
typeName:
|
|
3286
|
+
typeName: J.ZodNativeEnum,
|
|
3276
3287
|
...C(t)
|
|
3277
3288
|
});
|
|
3278
|
-
var
|
|
3289
|
+
var V = class extends w {
|
|
3279
3290
|
unwrap() {
|
|
3280
3291
|
return this._def.type;
|
|
3281
3292
|
}
|
|
@@ -3291,17 +3302,17 @@ var H = class extends w {
|
|
|
3291
3302
|
})));
|
|
3292
3303
|
}
|
|
3293
3304
|
};
|
|
3294
|
-
|
|
3305
|
+
V.create = (e, t) => new V({
|
|
3295
3306
|
type: e,
|
|
3296
|
-
typeName:
|
|
3307
|
+
typeName: J.ZodPromise,
|
|
3297
3308
|
...C(t)
|
|
3298
3309
|
});
|
|
3299
|
-
var
|
|
3310
|
+
var H = class extends w {
|
|
3300
3311
|
innerType() {
|
|
3301
3312
|
return this._def.schema;
|
|
3302
3313
|
}
|
|
3303
3314
|
sourceType() {
|
|
3304
|
-
return this._def.schema._def.typeName ===
|
|
3315
|
+
return this._def.schema._def.typeName === J.ZodEffects ? this._def.schema.sourceType() : this._def.schema;
|
|
3305
3316
|
}
|
|
3306
3317
|
_parse(e) {
|
|
3307
3318
|
let { status: t, ctx: n } = this._processInputParams(e), r = this._def.effect || null, i = {
|
|
@@ -3321,7 +3332,7 @@ var U = class extends w {
|
|
|
3321
3332
|
path: n.path,
|
|
3322
3333
|
parent: n
|
|
3323
3334
|
});
|
|
3324
|
-
return r.status === "aborted" ? _ : r.status === "dirty" || t.value === "dirty" ?
|
|
3335
|
+
return r.status === "aborted" ? _ : r.status === "dirty" || t.value === "dirty" ? ye(r.value) : r;
|
|
3325
3336
|
});
|
|
3326
3337
|
{
|
|
3327
3338
|
if (t.value === "aborted") return _;
|
|
@@ -3330,7 +3341,7 @@ var U = class extends w {
|
|
|
3330
3341
|
path: n.path,
|
|
3331
3342
|
parent: n
|
|
3332
3343
|
});
|
|
3333
|
-
return r.status === "aborted" ? _ : r.status === "dirty" || t.value === "dirty" ?
|
|
3344
|
+
return r.status === "aborted" ? _ : r.status === "dirty" || t.value === "dirty" ? ye(r.value) : r;
|
|
3334
3345
|
}
|
|
3335
3346
|
}
|
|
3336
3347
|
if (r.type === "refinement") {
|
|
@@ -3387,21 +3398,21 @@ var U = class extends w {
|
|
|
3387
3398
|
l.assertNever(r);
|
|
3388
3399
|
}
|
|
3389
3400
|
};
|
|
3390
|
-
|
|
3401
|
+
H.create = (e, t, n) => new H({
|
|
3391
3402
|
schema: e,
|
|
3392
|
-
typeName:
|
|
3403
|
+
typeName: J.ZodEffects,
|
|
3393
3404
|
effect: t,
|
|
3394
3405
|
...C(n)
|
|
3395
|
-
}),
|
|
3406
|
+
}), H.createWithPreprocess = (e, t, n) => new H({
|
|
3396
3407
|
schema: t,
|
|
3397
3408
|
effect: {
|
|
3398
3409
|
type: "preprocess",
|
|
3399
3410
|
transform: e
|
|
3400
3411
|
},
|
|
3401
|
-
typeName:
|
|
3412
|
+
typeName: J.ZodEffects,
|
|
3402
3413
|
...C(n)
|
|
3403
3414
|
});
|
|
3404
|
-
var
|
|
3415
|
+
var U = class extends w {
|
|
3405
3416
|
_parse(e) {
|
|
3406
3417
|
return this._getType(e) === u.undefined ? v(void 0) : this._def.innerType._parse(e);
|
|
3407
3418
|
}
|
|
@@ -3409,12 +3420,12 @@ var W = class extends w {
|
|
|
3409
3420
|
return this._def.innerType;
|
|
3410
3421
|
}
|
|
3411
3422
|
};
|
|
3412
|
-
|
|
3423
|
+
U.create = (e, t) => new U({
|
|
3413
3424
|
innerType: e,
|
|
3414
|
-
typeName:
|
|
3425
|
+
typeName: J.ZodOptional,
|
|
3415
3426
|
...C(t)
|
|
3416
3427
|
});
|
|
3417
|
-
var
|
|
3428
|
+
var W = class extends w {
|
|
3418
3429
|
_parse(e) {
|
|
3419
3430
|
return this._getType(e) === u.null ? v(null) : this._def.innerType._parse(e);
|
|
3420
3431
|
}
|
|
@@ -3422,12 +3433,12 @@ var G = class extends w {
|
|
|
3422
3433
|
return this._def.innerType;
|
|
3423
3434
|
}
|
|
3424
3435
|
};
|
|
3425
|
-
|
|
3436
|
+
W.create = (e, t) => new W({
|
|
3426
3437
|
innerType: e,
|
|
3427
|
-
typeName:
|
|
3438
|
+
typeName: J.ZodNullable,
|
|
3428
3439
|
...C(t)
|
|
3429
3440
|
});
|
|
3430
|
-
var
|
|
3441
|
+
var G = class extends w {
|
|
3431
3442
|
_parse(e) {
|
|
3432
3443
|
let { ctx: t } = this._processInputParams(e), n = t.data;
|
|
3433
3444
|
return t.parsedType === u.undefined && (n = this._def.defaultValue()), this._def.innerType._parse({
|
|
@@ -3440,13 +3451,13 @@ var K = class extends w {
|
|
|
3440
3451
|
return this._def.innerType;
|
|
3441
3452
|
}
|
|
3442
3453
|
};
|
|
3443
|
-
|
|
3454
|
+
G.create = (e, t) => new G({
|
|
3444
3455
|
innerType: e,
|
|
3445
|
-
typeName:
|
|
3456
|
+
typeName: J.ZodDefault,
|
|
3446
3457
|
defaultValue: typeof t.default == "function" ? t.default : () => t.default,
|
|
3447
3458
|
...C(t)
|
|
3448
3459
|
});
|
|
3449
|
-
var
|
|
3460
|
+
var K = class extends w {
|
|
3450
3461
|
_parse(e) {
|
|
3451
3462
|
let { ctx: t } = this._processInputParams(e), n = {
|
|
3452
3463
|
...t,
|
|
@@ -3481,13 +3492,13 @@ var q = class extends w {
|
|
|
3481
3492
|
return this._def.innerType;
|
|
3482
3493
|
}
|
|
3483
3494
|
};
|
|
3484
|
-
|
|
3495
|
+
K.create = (e, t) => new K({
|
|
3485
3496
|
innerType: e,
|
|
3486
|
-
typeName:
|
|
3497
|
+
typeName: J.ZodCatch,
|
|
3487
3498
|
catchValue: typeof t.catch == "function" ? t.catch : () => t.catch,
|
|
3488
3499
|
...C(t)
|
|
3489
3500
|
});
|
|
3490
|
-
var
|
|
3501
|
+
var ct = class extends w {
|
|
3491
3502
|
_parse(e) {
|
|
3492
3503
|
if (this._getType(e) !== u.nan) {
|
|
3493
3504
|
let t = this._getOrReturnCtx(e);
|
|
@@ -3503,11 +3514,11 @@ var ot = class extends w {
|
|
|
3503
3514
|
};
|
|
3504
3515
|
}
|
|
3505
3516
|
};
|
|
3506
|
-
|
|
3507
|
-
typeName:
|
|
3517
|
+
ct.create = (e) => new ct({
|
|
3518
|
+
typeName: J.ZodNaN,
|
|
3508
3519
|
...C(e)
|
|
3509
3520
|
});
|
|
3510
|
-
var
|
|
3521
|
+
var lt = class extends w {
|
|
3511
3522
|
_parse(e) {
|
|
3512
3523
|
let { ctx: t } = this._processInputParams(e), n = t.data;
|
|
3513
3524
|
return this._def.type._parse({
|
|
@@ -3519,7 +3530,7 @@ var st = class extends w {
|
|
|
3519
3530
|
unwrap() {
|
|
3520
3531
|
return this._def.type;
|
|
3521
3532
|
}
|
|
3522
|
-
},
|
|
3533
|
+
}, ut = class e extends w {
|
|
3523
3534
|
_parse(e) {
|
|
3524
3535
|
let { status: t, ctx: n } = this._processInputParams(e);
|
|
3525
3536
|
if (n.common.async) return (async () => {
|
|
@@ -3528,7 +3539,7 @@ var st = class extends w {
|
|
|
3528
3539
|
path: n.path,
|
|
3529
3540
|
parent: n
|
|
3530
3541
|
});
|
|
3531
|
-
return e.status === "aborted" ? _ : e.status === "dirty" ? (t.dirty(),
|
|
3542
|
+
return e.status === "aborted" ? _ : e.status === "dirty" ? (t.dirty(), ye(e.value)) : this._def.out._parseAsync({
|
|
3532
3543
|
data: e.value,
|
|
3533
3544
|
path: n.path,
|
|
3534
3545
|
parent: n
|
|
@@ -3554,10 +3565,10 @@ var st = class extends w {
|
|
|
3554
3565
|
return new e({
|
|
3555
3566
|
in: t,
|
|
3556
3567
|
out: n,
|
|
3557
|
-
typeName:
|
|
3568
|
+
typeName: J.ZodPipeline
|
|
3558
3569
|
});
|
|
3559
3570
|
}
|
|
3560
|
-
},
|
|
3571
|
+
}, q = class extends w {
|
|
3561
3572
|
_parse(e) {
|
|
3562
3573
|
let t = this._def.innerType._parse(e), n = (e) => (y(e) && (e.value = Object.freeze(e.value)), e);
|
|
3563
3574
|
return b(t) ? t.then((e) => n(e)) : n(t);
|
|
@@ -3566,29 +3577,29 @@ var st = class extends w {
|
|
|
3566
3577
|
return this._def.innerType;
|
|
3567
3578
|
}
|
|
3568
3579
|
};
|
|
3569
|
-
|
|
3580
|
+
q.create = (e, t) => new q({
|
|
3570
3581
|
innerType: e,
|
|
3571
|
-
typeName:
|
|
3582
|
+
typeName: J.ZodReadonly,
|
|
3572
3583
|
...C(t)
|
|
3573
|
-
}),
|
|
3574
|
-
var
|
|
3584
|
+
}), M.lazycreate;
|
|
3585
|
+
var J;
|
|
3575
3586
|
(function(e) {
|
|
3576
3587
|
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
|
-
})(
|
|
3578
|
-
var
|
|
3579
|
-
|
|
3580
|
-
var
|
|
3581
|
-
|
|
3582
|
-
var
|
|
3583
|
-
|
|
3584
|
-
var
|
|
3585
|
-
V.create, H.create, U.create, W.create,
|
|
3586
|
-
var
|
|
3588
|
+
})(J ||= {});
|
|
3589
|
+
var Y = T.create, X = Je.create;
|
|
3590
|
+
ct.create, Ye.create;
|
|
3591
|
+
var dt = Xe.create;
|
|
3592
|
+
Ze.create, Qe.create, E.create, D.create, $e.create, O.create, k.create, et.create;
|
|
3593
|
+
var ft = A.create, Z = M.create;
|
|
3594
|
+
M.strictCreate, N.create, tt.create, F.create, I.create, rt.create, it.create, at.create, ot.create, L.create, R.create;
|
|
3595
|
+
var Q = z.create;
|
|
3596
|
+
B.create, V.create, H.create, U.create, W.create, H.createWithPreprocess, ut.create;
|
|
3597
|
+
var $ = [
|
|
3587
3598
|
{
|
|
3588
3599
|
name: "list_projects",
|
|
3589
3600
|
title: "List Projects",
|
|
3590
3601
|
description: "Retrieve all projects in the workspace.",
|
|
3591
|
-
zodSchema:
|
|
3602
|
+
zodSchema: Z({}),
|
|
3592
3603
|
inputSchema: {
|
|
3593
3604
|
type: "object",
|
|
3594
3605
|
properties: {},
|
|
@@ -3601,7 +3612,7 @@ var dt = [
|
|
|
3601
3612
|
name: "get_project",
|
|
3602
3613
|
title: "Get Project",
|
|
3603
3614
|
description: "Get details of a specific project by its ID.",
|
|
3604
|
-
zodSchema:
|
|
3615
|
+
zodSchema: Z({ id: Y().describe("The project ID") }),
|
|
3605
3616
|
inputSchema: {
|
|
3606
3617
|
type: "object",
|
|
3607
3618
|
properties: { id: {
|
|
@@ -3618,10 +3629,10 @@ var dt = [
|
|
|
3618
3629
|
name: "create_project",
|
|
3619
3630
|
title: "Create Project",
|
|
3620
3631
|
description: "Create a new project workspace.",
|
|
3621
|
-
zodSchema:
|
|
3622
|
-
name:
|
|
3623
|
-
description:
|
|
3624
|
-
key:
|
|
3632
|
+
zodSchema: Z({
|
|
3633
|
+
name: Y().describe("Name of the project"),
|
|
3634
|
+
description: Y().optional().describe("Description of the project"),
|
|
3635
|
+
key: Y().optional().describe("Short project key/prefix (e.g. \"PROJ\")")
|
|
3625
3636
|
}),
|
|
3626
3637
|
inputSchema: {
|
|
3627
3638
|
type: "object",
|
|
@@ -3648,17 +3659,17 @@ var dt = [
|
|
|
3648
3659
|
name: "list_tasks",
|
|
3649
3660
|
title: "List Tasks",
|
|
3650
3661
|
description: "List tasks, optionally filtered by project, status, priority, or assignee.",
|
|
3651
|
-
zodSchema:
|
|
3652
|
-
projectId:
|
|
3653
|
-
status:
|
|
3654
|
-
priority:
|
|
3662
|
+
zodSchema: Z({
|
|
3663
|
+
projectId: Y().optional().describe("Filter by project ID"),
|
|
3664
|
+
status: Y().optional().describe("Filter by task status key"),
|
|
3665
|
+
priority: Q([
|
|
3655
3666
|
"urgent",
|
|
3656
3667
|
"high",
|
|
3657
3668
|
"medium",
|
|
3658
3669
|
"low",
|
|
3659
3670
|
"none"
|
|
3660
3671
|
]).optional().describe("Filter by priority"),
|
|
3661
|
-
assigneeId:
|
|
3672
|
+
assigneeId: Y().optional().describe("Filter by assignee ID")
|
|
3662
3673
|
}),
|
|
3663
3674
|
inputSchema: {
|
|
3664
3675
|
type: "object",
|
|
@@ -3699,7 +3710,7 @@ var dt = [
|
|
|
3699
3710
|
name: "get_task",
|
|
3700
3711
|
title: "Get Task",
|
|
3701
3712
|
description: "Get task details by ID.",
|
|
3702
|
-
zodSchema:
|
|
3713
|
+
zodSchema: Z({ id: Y().describe("The task ID") }),
|
|
3703
3714
|
inputSchema: {
|
|
3704
3715
|
type: "object",
|
|
3705
3716
|
properties: { id: {
|
|
@@ -3716,24 +3727,24 @@ var dt = [
|
|
|
3716
3727
|
name: "create_task",
|
|
3717
3728
|
title: "Create Task",
|
|
3718
3729
|
description: "Create a new task within a project.",
|
|
3719
|
-
zodSchema:
|
|
3720
|
-
projectId:
|
|
3721
|
-
title:
|
|
3722
|
-
description:
|
|
3723
|
-
status:
|
|
3724
|
-
priority:
|
|
3730
|
+
zodSchema: Z({
|
|
3731
|
+
projectId: Y().optional().describe("Project ID (inferred from active view in browser if omitted)"),
|
|
3732
|
+
title: Y().describe("Title of the task"),
|
|
3733
|
+
description: Y().optional().describe("Detailed description / markdown"),
|
|
3734
|
+
status: Y().optional().describe("Status (defaults to \"todo\" or first workflow status)"),
|
|
3735
|
+
priority: Q([
|
|
3725
3736
|
"urgent",
|
|
3726
3737
|
"high",
|
|
3727
3738
|
"medium",
|
|
3728
3739
|
"low",
|
|
3729
3740
|
"none"
|
|
3730
3741
|
]).optional().default("none").describe("Task priority"),
|
|
3731
|
-
assigneeId:
|
|
3732
|
-
dueDate:
|
|
3733
|
-
tags:
|
|
3734
|
-
estimatedHours:
|
|
3735
|
-
isBlocked:
|
|
3736
|
-
blockedReason:
|
|
3742
|
+
assigneeId: Y().optional().describe("User ID to assign task to"),
|
|
3743
|
+
dueDate: Y().optional().describe("Due date (ISO string)"),
|
|
3744
|
+
tags: ft(Y()).optional().describe("Tags for categorization"),
|
|
3745
|
+
estimatedHours: X().optional().describe("Estimated hours to complete"),
|
|
3746
|
+
isBlocked: dt().optional().describe("Whether the task is blocked"),
|
|
3747
|
+
blockedReason: Y().optional().describe("Reason why the task is blocked")
|
|
3737
3748
|
}),
|
|
3738
3749
|
inputSchema: {
|
|
3739
3750
|
type: "object",
|
|
@@ -3812,25 +3823,25 @@ var dt = [
|
|
|
3812
3823
|
name: "update_task",
|
|
3813
3824
|
title: "Update Task",
|
|
3814
3825
|
description: "Update fields of an existing task (e.g. title, status, priority, assignee).",
|
|
3815
|
-
zodSchema:
|
|
3816
|
-
id:
|
|
3817
|
-
title:
|
|
3818
|
-
description:
|
|
3819
|
-
status:
|
|
3820
|
-
priority:
|
|
3826
|
+
zodSchema: Z({
|
|
3827
|
+
id: Y().describe("The task ID"),
|
|
3828
|
+
title: Y().optional(),
|
|
3829
|
+
description: Y().optional(),
|
|
3830
|
+
status: Y().optional(),
|
|
3831
|
+
priority: Q([
|
|
3821
3832
|
"urgent",
|
|
3822
3833
|
"high",
|
|
3823
3834
|
"medium",
|
|
3824
3835
|
"low",
|
|
3825
3836
|
"none"
|
|
3826
3837
|
]).optional(),
|
|
3827
|
-
assigneeId:
|
|
3828
|
-
dueDate:
|
|
3829
|
-
tags:
|
|
3830
|
-
estimatedHours:
|
|
3831
|
-
loggedHours:
|
|
3832
|
-
isBlocked:
|
|
3833
|
-
blockedReason:
|
|
3838
|
+
assigneeId: Y().optional(),
|
|
3839
|
+
dueDate: Y().optional(),
|
|
3840
|
+
tags: ft(Y()).optional(),
|
|
3841
|
+
estimatedHours: X().optional(),
|
|
3842
|
+
loggedHours: X().optional(),
|
|
3843
|
+
isBlocked: dt().optional(),
|
|
3844
|
+
blockedReason: Y().optional()
|
|
3834
3845
|
}),
|
|
3835
3846
|
inputSchema: {
|
|
3836
3847
|
type: "object",
|
|
@@ -3881,7 +3892,7 @@ var dt = [
|
|
|
3881
3892
|
name: "delete_task",
|
|
3882
3893
|
title: "Delete Task",
|
|
3883
3894
|
description: "Delete a task by ID.",
|
|
3884
|
-
zodSchema:
|
|
3895
|
+
zodSchema: Z({ id: Y().describe("The task ID to delete") }),
|
|
3885
3896
|
inputSchema: {
|
|
3886
3897
|
type: "object",
|
|
3887
3898
|
properties: { id: {
|
|
@@ -3898,7 +3909,7 @@ var dt = [
|
|
|
3898
3909
|
name: "list_deliverables",
|
|
3899
3910
|
title: "List Deliverables",
|
|
3900
3911
|
description: "List deliverables/milestones for a project.",
|
|
3901
|
-
zodSchema:
|
|
3912
|
+
zodSchema: Z({ projectId: Y().optional().describe("Project ID") }),
|
|
3902
3913
|
inputSchema: {
|
|
3903
3914
|
type: "object",
|
|
3904
3915
|
properties: { projectId: {
|
|
@@ -3918,12 +3929,12 @@ var dt = [
|
|
|
3918
3929
|
name: "create_deliverable",
|
|
3919
3930
|
title: "Create Deliverable",
|
|
3920
3931
|
description: "Create a milestone deliverable within a project.",
|
|
3921
|
-
zodSchema:
|
|
3922
|
-
projectId:
|
|
3923
|
-
title:
|
|
3924
|
-
description:
|
|
3925
|
-
dueDate:
|
|
3926
|
-
taskIds:
|
|
3932
|
+
zodSchema: Z({
|
|
3933
|
+
projectId: Y().optional(),
|
|
3934
|
+
title: Y(),
|
|
3935
|
+
description: Y().optional(),
|
|
3936
|
+
dueDate: Y().optional(),
|
|
3937
|
+
taskIds: ft(Y()).optional()
|
|
3927
3938
|
}),
|
|
3928
3939
|
inputSchema: {
|
|
3929
3940
|
type: "object",
|
|
@@ -3954,7 +3965,7 @@ var dt = [
|
|
|
3954
3965
|
name: "list_comments",
|
|
3955
3966
|
title: "List Comments",
|
|
3956
3967
|
description: "List comments associated with a task.",
|
|
3957
|
-
zodSchema:
|
|
3968
|
+
zodSchema: Z({ taskId: Y().describe("The task ID") }),
|
|
3958
3969
|
inputSchema: {
|
|
3959
3970
|
type: "object",
|
|
3960
3971
|
properties: { taskId: {
|
|
@@ -3971,10 +3982,10 @@ var dt = [
|
|
|
3971
3982
|
name: "add_comment",
|
|
3972
3983
|
title: "Add Comment",
|
|
3973
3984
|
description: "Add a comment to a task.",
|
|
3974
|
-
zodSchema:
|
|
3975
|
-
taskId:
|
|
3976
|
-
content:
|
|
3977
|
-
authorId:
|
|
3985
|
+
zodSchema: Z({
|
|
3986
|
+
taskId: Y().describe("The task ID"),
|
|
3987
|
+
content: Y().describe("Comment body/markdown"),
|
|
3988
|
+
authorId: Y().describe("Author user ID")
|
|
3978
3989
|
}),
|
|
3979
3990
|
inputSchema: {
|
|
3980
3991
|
type: "object",
|
|
@@ -4009,7 +4020,7 @@ var dt = [
|
|
|
4009
4020
|
name: "calculate_critical_path",
|
|
4010
4021
|
title: "Calculate Critical Path",
|
|
4011
4022
|
description: "Calculate Critical Path Method (CPM) schedule, early/late start and finish, total slack, and critical bottlenecks for a project.",
|
|
4012
|
-
zodSchema:
|
|
4023
|
+
zodSchema: Z({ projectId: Y().optional().describe("Project ID (falls back to ambient context if omitted)") }),
|
|
4013
4024
|
inputSchema: {
|
|
4014
4025
|
type: "object",
|
|
4015
4026
|
properties: { projectId: {
|
|
@@ -4029,16 +4040,16 @@ var dt = [
|
|
|
4029
4040
|
name: "get_timeline_ladder",
|
|
4030
4041
|
title: "Get Timeline Ladder of Abstraction",
|
|
4031
4042
|
description: "Retrieve Ladder of Abstraction for a project timeline across macro phase envelopes, standard Gantt tasks & CPM, and concrete deliverables/time/attachments.",
|
|
4032
|
-
zodSchema:
|
|
4033
|
-
projectId:
|
|
4034
|
-
level:
|
|
4043
|
+
zodSchema: Z({
|
|
4044
|
+
projectId: Y().optional().describe("Project ID (falls back to ambient context if omitted)"),
|
|
4045
|
+
level: Q([
|
|
4035
4046
|
"macro",
|
|
4036
4047
|
"standard",
|
|
4037
4048
|
"concrete",
|
|
4038
4049
|
"all"
|
|
4039
4050
|
]).optional().describe("Abstraction level (macro, standard, concrete, or all)"),
|
|
4040
|
-
containerId:
|
|
4041
|
-
iterationId:
|
|
4051
|
+
containerId: Y().optional().describe("Optional container ID filter"),
|
|
4052
|
+
iterationId: Y().optional().describe("Optional iteration/sprint ID filter")
|
|
4042
4053
|
}),
|
|
4043
4054
|
inputSchema: {
|
|
4044
4055
|
type: "object",
|
|
@@ -4083,7 +4094,7 @@ var dt = [
|
|
|
4083
4094
|
name: "get_task_ladder",
|
|
4084
4095
|
title: "Get Task Ladder View",
|
|
4085
4096
|
description: "Retrieve multi-scale ladder view for a single task, connecting its macro phase, standard CPM timeline position, and concrete work evidence.",
|
|
4086
|
-
zodSchema:
|
|
4097
|
+
zodSchema: Z({ taskId: Y().describe("The task ID") }),
|
|
4087
4098
|
inputSchema: {
|
|
4088
4099
|
type: "object",
|
|
4089
4100
|
properties: { taskId: {
|
|
@@ -4100,7 +4111,7 @@ var dt = [
|
|
|
4100
4111
|
name: "get_task_metrics",
|
|
4101
4112
|
title: "Get Task Metrics",
|
|
4102
4113
|
description: "Retrieve multi-dimensional task metrics including inferred actuals, active working duration, effort/duration/schedule variances, progress inference, and Earned Value Management (EVM) metrics.",
|
|
4103
|
-
zodSchema:
|
|
4114
|
+
zodSchema: Z({ taskId: Y().describe("The task ID") }),
|
|
4104
4115
|
inputSchema: {
|
|
4105
4116
|
type: "object",
|
|
4106
4117
|
properties: { taskId: {
|
|
@@ -4117,7 +4128,7 @@ var dt = [
|
|
|
4117
4128
|
name: "get_task_progress_history",
|
|
4118
4129
|
title: "Get Task Progress History",
|
|
4119
4130
|
description: "Retrieve time-series progress data points and curve shape classification (linear, s_curve, early_surge, late_rush, stalled) for a task.",
|
|
4120
|
-
zodSchema:
|
|
4131
|
+
zodSchema: Z({ taskId: Y().describe("The task ID") }),
|
|
4121
4132
|
inputSchema: {
|
|
4122
4133
|
type: "object",
|
|
4123
4134
|
properties: { taskId: {
|
|
@@ -4134,29 +4145,29 @@ var dt = [
|
|
|
4134
4145
|
name: "get_workload_distribution",
|
|
4135
4146
|
title: "Get Workload Distribution",
|
|
4136
4147
|
description: "Retrieve time-series workload and capacity distribution suitable for streamgraphs, stacked charts, and team capacity planning.",
|
|
4137
|
-
zodSchema:
|
|
4138
|
-
projectId:
|
|
4139
|
-
startDate:
|
|
4140
|
-
endDate:
|
|
4141
|
-
interval:
|
|
4148
|
+
zodSchema: Z({
|
|
4149
|
+
projectId: Y().optional().describe("Project ID (optional, defaults to workspace-wide or ambient project)"),
|
|
4150
|
+
startDate: Y().optional().describe("Start date ISO (YYYY-MM-DD)"),
|
|
4151
|
+
endDate: Y().optional().describe("End date ISO (YYYY-MM-DD)"),
|
|
4152
|
+
interval: Q([
|
|
4142
4153
|
"day",
|
|
4143
4154
|
"week",
|
|
4144
4155
|
"month"
|
|
4145
4156
|
]).optional().describe("Bucket interval (day, week, month)"),
|
|
4146
|
-
groupBy:
|
|
4157
|
+
groupBy: Q([
|
|
4147
4158
|
"assignee",
|
|
4148
4159
|
"team",
|
|
4149
4160
|
"taskType",
|
|
4150
4161
|
"priority",
|
|
4151
4162
|
"status"
|
|
4152
4163
|
]).optional().describe("Dimension to segment by"),
|
|
4153
|
-
metric:
|
|
4164
|
+
metric: Q([
|
|
4154
4165
|
"scheduled",
|
|
4155
4166
|
"logged",
|
|
4156
4167
|
"remaining",
|
|
4157
4168
|
"blended"
|
|
4158
4169
|
]).optional().describe("Effort metric mode"),
|
|
4159
|
-
defaultWeeklyCapacityHours:
|
|
4170
|
+
defaultWeeklyCapacityHours: X().optional().describe("Default weekly capacity hours per person (default 40)")
|
|
4160
4171
|
}),
|
|
4161
4172
|
inputSchema: {
|
|
4162
4173
|
type: "object",
|
|
@@ -4224,10 +4235,10 @@ var dt = [
|
|
|
4224
4235
|
}
|
|
4225
4236
|
}
|
|
4226
4237
|
];
|
|
4227
|
-
new Map(
|
|
4238
|
+
new Map($.map((e) => [e.name, e]));
|
|
4228
4239
|
//#endregion
|
|
4229
4240
|
//#region ../mcp/dist/web/index.js
|
|
4230
|
-
function
|
|
4241
|
+
function pt(e = typeof document < "u" ? document : null) {
|
|
4231
4242
|
if (!e) return null;
|
|
4232
4243
|
if (!e.modelContext) {
|
|
4233
4244
|
let t = /* @__PURE__ */ new Map();
|
|
@@ -4252,10 +4263,10 @@ function ft(e = typeof document < "u" ? document : null) {
|
|
|
4252
4263
|
}
|
|
4253
4264
|
return e.modelContext;
|
|
4254
4265
|
}
|
|
4255
|
-
function
|
|
4266
|
+
function mt(e) {
|
|
4256
4267
|
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;
|
|
4257
|
-
t?.modelContext ? i = t.modelContext : n?.modelContext ? i = n.modelContext : t && (i =
|
|
4258
|
-
let a = e.tools ?
|
|
4268
|
+
t?.modelContext ? i = t.modelContext : n?.modelContext ? i = n.modelContext : t && (i = pt(t) ?? void 0);
|
|
4269
|
+
let a = e.tools ? $.filter((t) => e.tools.includes(t.name)) : $, o = [], s = new AbortController();
|
|
4259
4270
|
e.signal && e.signal.addEventListener("abort", () => s.abort(), { once: !0 });
|
|
4260
4271
|
for (let t of a) {
|
|
4261
4272
|
let n = {
|
|
@@ -4293,7 +4304,7 @@ function pt(e) {
|
|
|
4293
4304
|
}
|
|
4294
4305
|
//#endregion
|
|
4295
4306
|
//#region src/webmcp-state.svelte.ts
|
|
4296
|
-
var
|
|
4307
|
+
var ht = class {
|
|
4297
4308
|
client;
|
|
4298
4309
|
options;
|
|
4299
4310
|
#e = t.state(!1);
|
|
@@ -4333,7 +4344,7 @@ var mt = class {
|
|
|
4333
4344
|
if (!this.registered) {
|
|
4334
4345
|
this.error = null;
|
|
4335
4346
|
try {
|
|
4336
|
-
this.abortController = new AbortController(), this.handle =
|
|
4347
|
+
this.abortController = new AbortController(), this.handle = mt({
|
|
4337
4348
|
client: this.client,
|
|
4338
4349
|
projectId: this.activeProjectId,
|
|
4339
4350
|
tools: this.options.tools,
|
|
@@ -4357,12 +4368,12 @@ var mt = class {
|
|
|
4357
4368
|
this.activeProjectId !== e && (this.activeProjectId = e, this.registered && (this.unregister(), this.register()));
|
|
4358
4369
|
}
|
|
4359
4370
|
};
|
|
4360
|
-
function
|
|
4361
|
-
return new
|
|
4371
|
+
function gt(e, t) {
|
|
4372
|
+
return new ht(e, t);
|
|
4362
4373
|
}
|
|
4363
4374
|
//#endregion
|
|
4364
4375
|
//#region src/critical-path-state.svelte.ts
|
|
4365
|
-
var
|
|
4376
|
+
var _t = class {
|
|
4366
4377
|
client;
|
|
4367
4378
|
projectId;
|
|
4368
4379
|
#e = t.state(null);
|
|
@@ -4400,12 +4411,12 @@ var gt = class {
|
|
|
4400
4411
|
}
|
|
4401
4412
|
}
|
|
4402
4413
|
};
|
|
4403
|
-
function
|
|
4404
|
-
return new
|
|
4414
|
+
function vt(e, t) {
|
|
4415
|
+
return new _t(e, t);
|
|
4405
4416
|
}
|
|
4406
4417
|
//#endregion
|
|
4407
4418
|
//#region src/timeline-ladder-state.svelte.ts
|
|
4408
|
-
var
|
|
4419
|
+
var yt = class {
|
|
4409
4420
|
client;
|
|
4410
4421
|
projectId;
|
|
4411
4422
|
#e = t.state(null);
|
|
@@ -4477,12 +4488,12 @@ var vt = class {
|
|
|
4477
4488
|
}
|
|
4478
4489
|
}
|
|
4479
4490
|
};
|
|
4480
|
-
function
|
|
4481
|
-
return new
|
|
4491
|
+
function bt(e, t, n) {
|
|
4492
|
+
return new yt(e, t, n);
|
|
4482
4493
|
}
|
|
4483
4494
|
//#endregion
|
|
4484
4495
|
//#region src/task-metrics-state.svelte.ts
|
|
4485
|
-
var
|
|
4496
|
+
var xt = class {
|
|
4486
4497
|
client;
|
|
4487
4498
|
taskId;
|
|
4488
4499
|
#e = t.state(null);
|
|
@@ -4589,12 +4600,12 @@ var bt = class {
|
|
|
4589
4600
|
}
|
|
4590
4601
|
}
|
|
4591
4602
|
};
|
|
4592
|
-
function
|
|
4593
|
-
return new
|
|
4603
|
+
function St(e, t) {
|
|
4604
|
+
return new xt(e, t);
|
|
4594
4605
|
}
|
|
4595
4606
|
//#endregion
|
|
4596
4607
|
//#region src/workload-state.svelte.ts
|
|
4597
|
-
var
|
|
4608
|
+
var Ct = class {
|
|
4598
4609
|
client;
|
|
4599
4610
|
projectId;
|
|
4600
4611
|
initialOptions;
|
|
@@ -4711,13 +4722,13 @@ var St = class {
|
|
|
4711
4722
|
}
|
|
4712
4723
|
}
|
|
4713
4724
|
};
|
|
4714
|
-
function
|
|
4715
|
-
return new
|
|
4725
|
+
function wt(e, t, n) {
|
|
4726
|
+
return new Ct(e, t, n);
|
|
4716
4727
|
}
|
|
4717
4728
|
//#endregion
|
|
4718
4729
|
//#region src/index.ts
|
|
4719
|
-
function
|
|
4730
|
+
function Tt(t) {
|
|
4720
4731
|
return new e(t);
|
|
4721
4732
|
}
|
|
4722
4733
|
//#endregion
|
|
4723
|
-
export {
|
|
4734
|
+
export { re as AttachmentState, te as CommentState, _t as CriticalPathState, se as DeliverableState, le as DeliverableSummaryState, de as KanbanState, i as ProjectState, ae as TaskActivityState, xt as TaskMetricsState, o as TaskState, pe as TaskTransitionsState, yt as TimelineLadderState, ht as WebMcpState, c as WorkflowState, Ct as WorkloadState, ie as createAttachmentState, ne as createCommentState, Tt as createCriticalPathClient, vt as createCriticalPathState, ce as createDeliverableState, ue as createDeliverableSummaryState, fe as createKanbanState, a as createProjectState, oe as createTaskActivityState, St as createTaskMetricsState, s as createTaskState, me as createTaskTransitionsState, bt as createTimelineLadderState, gt as createWebMcpState, ee as createWorkflowState, wt as createWorkloadState };
|