@uipath/cli 1.205.0-preview.277 → 1.206.0-preview.279
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{applicationinsights-s28k1t0d.js → applicationinsights-pwe8sf3y.js} +1269 -1269
- package/dist/{browser-strategy-6atc7v8s.js → browser-strategy-p5fhwxqj.js} +6 -7
- package/dist/cli-q6fp9ccp.js +23 -0
- package/dist/contentStore-c51xqdn2.js +41 -0
- package/dist/environmentInfo-fn0za9jw.js +71 -0
- package/dist/feedbackPrompts-t1enxv1x.js +144 -0
- package/dist/handlers-93z27zrr.js +805 -0
- package/dist/index-16d4evd1.js +1051 -0
- package/dist/index-1vyte4ma.js +14 -0
- package/dist/index-21kns9qg.js +10 -0
- package/dist/{index-j2tzs5k6.js → index-2j7ss97f.js} +331 -2595
- package/dist/index-2k8rhmad.js +274 -0
- package/dist/{index-30618bjs.js → index-2mm750yx.js} +174 -234
- package/dist/{index-622x1qb5.js → index-3fvbddpw.js} +7092 -7092
- package/dist/{index-d3w0wn6k.js → index-5gce5wfd.js} +16 -16
- package/dist/index-5j0bfd3e.js +4744 -0
- package/dist/index-68xmrb9x.js +237 -0
- package/dist/index-6wj58qka.js +59 -0
- package/dist/index-898c4tfz.js +668 -0
- package/dist/index-8gr7ny79.js +365 -0
- package/dist/index-99emfvtm.js +13 -0
- package/dist/{index-pj3g8ftz.js → index-9db5vwx9.js} +2429 -1693
- package/dist/index-ayg25v46.js +151 -0
- package/dist/index-bf0e4evz.js +6180 -0
- package/dist/index-bpqx6f8h.js +92 -0
- package/dist/index-bpxh3fqv.js +392 -0
- package/dist/index-cc653qc1.js +1327 -0
- package/dist/{index-m5nwse9v.js → index-cj4v0jct.js} +21 -69
- package/dist/{index-469jgr1w.js → index-dsj3jrm0.js} +105 -106
- package/dist/{index-1yh8g550.js → index-epsr41wx.js} +8 -12
- package/dist/{index-yb4er9vd.js → index-jjejkkg4.js} +474 -528
- package/dist/index-kg1xrq51.js +171 -0
- package/dist/index-m8vqyv3g.js +72 -0
- package/dist/index-mzqm6xfh.js +45 -0
- package/dist/index-nsrrst23.js +44 -0
- package/dist/{index-h8cph72k.js → index-nzr4mx5p.js} +2 -22
- package/dist/index-p9s0gyrw.js +72 -0
- package/dist/index-qadhm1gn.js +271 -0
- package/dist/index-qwbyt2q5.js +95 -0
- package/dist/index-rbna3w6k.js +200 -0
- package/dist/index-rr5hdtcy.js +95 -0
- package/dist/{index-qa9gftnj.js → index-xd2w5pct.js} +3 -3
- package/dist/index-xpdtagqw.js +30 -0
- package/dist/{index-925304r7.js → index-y085rpen.js} +29 -25
- package/dist/index-y5ncb93a.js +240 -0
- package/dist/index-y7d0cth0.js +93 -0
- package/dist/{index-hdxtgckw.js → index-z070caqq.js} +56 -12
- package/dist/index-zdqbp34f.js +14 -0
- package/dist/index.js +38 -36
- package/dist/install-3gw33jcf.js +558 -0
- package/dist/{jmespath-e4a59c8w.js → jmespath-ab6tdc42.js} +1 -1
- package/dist/js-yaml-0c4svjwq.js +36 -0
- package/dist/{mcp-jssaz3wr.js → mcp-s50h6d56.js} +236 -472
- package/dist/{node-strategy-ggx3nmyj.js → node-strategy-p1n8wr5s.js} +16 -19
- package/dist/project-context-285hydnd.js +94 -0
- package/dist/prompt-hxbzt92e.js +13 -0
- package/dist/{server-9k50dfg6.js → server-gkr3c7hv.js} +28 -43
- package/dist/skillCatalog-fvw4wgw1.js +22 -0
- package/dist/skillsService-20es18vs.js +29 -0
- package/dist/{stdio-tmngemcz.js → stdio-kpsab5bz.js} +2 -4
- package/dist/{telemetry-drain-r92f0e4r.js → telemetry-drain-bw59e8f5.js} +8 -9
- package/dist/tree-j4w7p0pg.js +17 -0
- package/dist/updateService-pq7pkd42.js +522 -0
- package/dist/updateService.skills-4t1s7z45.js +22 -0
- package/dist/updateService.tools-f7tr6kc6.js +16 -0
- package/package.json +2 -2
- package/dist/cli-yw4s6t8k.js +0 -19
- package/dist/index-0gctz400.js +0 -17
- package/dist/index-4cq44eth.js +0 -19427
- package/dist/index-7tshyfxx.js +0 -157
- package/dist/index-e3bean3d.js +0 -9867
- package/dist/index-g8ck9tv6.js +0 -2
- package/dist/index-ngs0a2he.js +0 -15
- package/dist/index-yc4kw997.js +0 -13
- package/dist/js-yaml-69tsdrrf.js +0 -37
- package/dist/updateService-22p6d8dm.js +0 -14
|
@@ -1,67 +1,66 @@
|
|
|
1
1
|
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
2
|
+
LATEST_PROTOCOL_VERSION,
|
|
3
|
+
SUPPORTED_PROTOCOL_VERSIONS,
|
|
4
|
+
RELATED_TASK_META_KEY,
|
|
5
|
+
isTaskAugmentedRequestParams,
|
|
6
|
+
isJSONRPCRequest,
|
|
7
|
+
isJSONRPCNotification,
|
|
8
|
+
isJSONRPCResultResponse,
|
|
9
|
+
ErrorCode,
|
|
10
|
+
isJSONRPCErrorResponse,
|
|
11
|
+
EmptyResultSchema,
|
|
6
12
|
CancelledNotificationSchema,
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
13
|
+
InitializeRequestSchema,
|
|
14
|
+
InitializedNotificationSchema,
|
|
15
|
+
PingRequestSchema,
|
|
16
|
+
ProgressNotificationSchema,
|
|
10
17
|
CreateTaskResultSchema,
|
|
11
|
-
|
|
12
|
-
EmptyResultSchema,
|
|
13
|
-
ErrorCode,
|
|
14
|
-
GetPromptRequestSchema,
|
|
15
|
-
GetTaskPayloadRequestSchema,
|
|
18
|
+
TaskStatusNotificationSchema,
|
|
16
19
|
GetTaskRequestSchema,
|
|
17
20
|
GetTaskResultSchema,
|
|
18
|
-
|
|
19
|
-
InitializedNotificationSchema,
|
|
20
|
-
LATEST_PROTOCOL_VERSION,
|
|
21
|
-
ListPromptsRequestSchema,
|
|
22
|
-
ListResourceTemplatesRequestSchema,
|
|
23
|
-
ListResourcesRequestSchema,
|
|
24
|
-
ListRootsResultSchema,
|
|
21
|
+
GetTaskPayloadRequestSchema,
|
|
25
22
|
ListTasksRequestSchema,
|
|
26
23
|
ListTasksResultSchema,
|
|
24
|
+
CancelTaskRequestSchema,
|
|
25
|
+
CancelTaskResultSchema,
|
|
26
|
+
ListResourcesRequestSchema,
|
|
27
|
+
ListResourceTemplatesRequestSchema,
|
|
28
|
+
ReadResourceRequestSchema,
|
|
29
|
+
ListPromptsRequestSchema,
|
|
30
|
+
GetPromptRequestSchema,
|
|
27
31
|
ListToolsRequestSchema,
|
|
32
|
+
CallToolResultSchema,
|
|
33
|
+
CallToolRequestSchema,
|
|
28
34
|
LoggingLevelSchema,
|
|
29
|
-
McpError,
|
|
30
|
-
PingRequestSchema,
|
|
31
|
-
ProgressNotificationSchema,
|
|
32
|
-
RELATED_TASK_META_KEY,
|
|
33
|
-
ReadResourceRequestSchema,
|
|
34
|
-
SUPPORTED_PROTOCOL_VERSIONS,
|
|
35
35
|
SetLevelRequestSchema,
|
|
36
|
-
|
|
36
|
+
CreateMessageResultSchema,
|
|
37
|
+
CreateMessageResultWithToolsSchema,
|
|
38
|
+
ElicitResultSchema,
|
|
39
|
+
CompleteRequestSchema,
|
|
37
40
|
assertCompleteRequestPrompt,
|
|
38
41
|
assertCompleteRequestResourceTemplate,
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
isJSONRPCResultResponse,
|
|
43
|
-
isTaskAugmentedRequestParams
|
|
44
|
-
} from "./index-925304r7.js";
|
|
45
|
-
import"./index-g8ck9tv6.js";
|
|
42
|
+
ListRootsResultSchema,
|
|
43
|
+
McpError
|
|
44
|
+
} from "./index-y085rpen.js";
|
|
46
45
|
import {
|
|
47
|
-
$ZodObject,
|
|
48
|
-
$ZodType,
|
|
49
|
-
$constructor,
|
|
50
|
-
ZodOptional,
|
|
51
46
|
clone,
|
|
52
|
-
installLazyProp,
|
|
53
47
|
normalizeParams,
|
|
54
48
|
own,
|
|
49
|
+
installLazyProp,
|
|
50
|
+
$constructor,
|
|
55
51
|
parse,
|
|
56
52
|
parseAsync,
|
|
57
53
|
safeParse,
|
|
58
54
|
safeParseAsync,
|
|
59
|
-
|
|
60
|
-
|
|
55
|
+
$ZodType,
|
|
56
|
+
$ZodObject,
|
|
57
|
+
toJSONSchema,
|
|
58
|
+
ZodOptional
|
|
59
|
+
} from "./index-bf0e4evz.js";
|
|
61
60
|
import {
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
} from "./index-
|
|
61
|
+
__toESM,
|
|
62
|
+
__commonJS
|
|
63
|
+
} from "./index-epsr41wx.js";
|
|
65
64
|
|
|
66
65
|
// ../../node_modules/ajv/dist/compile/codegen/code.js
|
|
67
66
|
var require_code = __commonJS(function(exports) {
|
|
@@ -230,9 +229,9 @@ var require_scope = __commonJS(function(exports) {
|
|
|
230
229
|
}
|
|
231
230
|
}
|
|
232
231
|
var UsedValueState;
|
|
233
|
-
(function(
|
|
234
|
-
|
|
235
|
-
|
|
232
|
+
(function(UsedValueState) {
|
|
233
|
+
UsedValueState[UsedValueState["Started"] = 0] = "Started";
|
|
234
|
+
UsedValueState[UsedValueState["Completed"] = 1] = "Completed";
|
|
236
235
|
})(UsedValueState || (exports.UsedValueState = UsedValueState = {}));
|
|
237
236
|
exports.varKinds = {
|
|
238
237
|
const: new code_1.Name("const"),
|
|
@@ -1163,9 +1162,9 @@ var require_util = __commonJS(function(exports) {
|
|
|
1163
1162
|
}
|
|
1164
1163
|
}
|
|
1165
1164
|
exports.eachItem = eachItem;
|
|
1166
|
-
function makeMergeEvaluated({ mergeNames, mergeToName, mergeValues
|
|
1165
|
+
function makeMergeEvaluated({ mergeNames, mergeToName, mergeValues, resultToName }) {
|
|
1167
1166
|
return (gen, from, to, toName) => {
|
|
1168
|
-
const res = to === undefined ? from : to instanceof codegen_1.Name ? (from instanceof codegen_1.Name ? mergeNames(gen, from, to) : mergeToName(gen, from, to), to) : from instanceof codegen_1.Name ? (mergeToName(gen, to, from), from) :
|
|
1167
|
+
const res = to === undefined ? from : to instanceof codegen_1.Name ? (from instanceof codegen_1.Name ? mergeNames(gen, from, to) : mergeToName(gen, from, to), to) : from instanceof codegen_1.Name ? (mergeToName(gen, to, from), from) : mergeValues(from, to);
|
|
1169
1168
|
return toName === codegen_1.Name && !(res instanceof codegen_1.Name) ? resultToName(gen, res) : res;
|
|
1170
1169
|
};
|
|
1171
1170
|
}
|
|
@@ -1214,9 +1213,9 @@ var require_util = __commonJS(function(exports) {
|
|
|
1214
1213
|
}
|
|
1215
1214
|
exports.useFunc = useFunc;
|
|
1216
1215
|
var Type;
|
|
1217
|
-
(function(
|
|
1218
|
-
|
|
1219
|
-
|
|
1216
|
+
(function(Type) {
|
|
1217
|
+
Type[Type["Num"] = 0] = "Num";
|
|
1218
|
+
Type[Type["Str"] = 1] = "Str";
|
|
1220
1219
|
})(Type || (exports.Type = Type = {}));
|
|
1221
1220
|
function getErrorPath(dataProp, dataPropType, jsPropertySyntax) {
|
|
1222
1221
|
if (dataProp instanceof codegen_1.Name) {
|
|
@@ -1486,9 +1485,9 @@ var require_dataType = __commonJS(function(exports) {
|
|
|
1486
1485
|
var codegen_1 = require_codegen();
|
|
1487
1486
|
var util_1 = require_util();
|
|
1488
1487
|
var DataType;
|
|
1489
|
-
(function(
|
|
1490
|
-
|
|
1491
|
-
|
|
1488
|
+
(function(DataType) {
|
|
1489
|
+
DataType[DataType["Correct"] = 0] = "Correct";
|
|
1490
|
+
DataType[DataType["Wrong"] = 1] = "Wrong";
|
|
1492
1491
|
})(DataType || (exports.DataType = DataType = {}));
|
|
1493
1492
|
function getSchemaTypes(schema) {
|
|
1494
1493
|
const types = getJSONTypes(schema.type);
|
|
@@ -1849,8 +1848,8 @@ var require_keyword = __commonJS(function(exports) {
|
|
|
1849
1848
|
var _a;
|
|
1850
1849
|
const { gen, keyword, schema, parentSchema, $data, it } = cxt;
|
|
1851
1850
|
checkAsyncKeyword(it, def);
|
|
1852
|
-
const
|
|
1853
|
-
const validateRef = useKeyword(gen, keyword,
|
|
1851
|
+
const validate = !$data && def.compile ? def.compile.call(it.self, schema, parentSchema, it) : def.validate;
|
|
1852
|
+
const validateRef = useKeyword(gen, keyword, validate);
|
|
1854
1853
|
const valid = gen.let("valid");
|
|
1855
1854
|
cxt.block$data(valid, validateKeyword);
|
|
1856
1855
|
cxt.ok((_a = def.valid) !== null && _a !== undefined ? _a : valid);
|
|
@@ -1861,13 +1860,13 @@ var require_keyword = __commonJS(function(exports) {
|
|
|
1861
1860
|
modifyData(cxt);
|
|
1862
1861
|
reportErrs(() => cxt.error());
|
|
1863
1862
|
} else {
|
|
1864
|
-
const ruleErrs = def.async ?
|
|
1863
|
+
const ruleErrs = def.async ? validateAsync() : validateSync();
|
|
1865
1864
|
if (def.modifying)
|
|
1866
1865
|
modifyData(cxt);
|
|
1867
1866
|
reportErrs(() => addErrs(cxt, ruleErrs));
|
|
1868
1867
|
}
|
|
1869
1868
|
}
|
|
1870
|
-
function
|
|
1869
|
+
function validateAsync() {
|
|
1871
1870
|
const ruleErrs = gen.let("ruleErrs", null);
|
|
1872
1871
|
gen.try(() => assignValid((0, codegen_1._)`await `), (e) => gen.assign(valid, false).if((0, codegen_1._)`${e} instanceof ${it.ValidationError}`, () => gen.assign(ruleErrs, (0, codegen_1._)`${e}.errors`), () => gen.throw(e)));
|
|
1873
1872
|
return ruleErrs;
|
|
@@ -1884,8 +1883,8 @@ var require_keyword = __commonJS(function(exports) {
|
|
|
1884
1883
|
gen.assign(valid, (0, codegen_1._)`${_await}${(0, code_1.callValidateCode)(cxt, validateRef, passCxt, passSchema)}`, def.modifying);
|
|
1885
1884
|
}
|
|
1886
1885
|
function reportErrs(errors) {
|
|
1887
|
-
var
|
|
1888
|
-
gen.if((0, codegen_1.not)((
|
|
1886
|
+
var _a;
|
|
1887
|
+
gen.if((0, codegen_1.not)((_a = def.valid) !== null && _a !== undefined ? _a : valid), errors);
|
|
1889
1888
|
}
|
|
1890
1889
|
}
|
|
1891
1890
|
exports.funcKeywordCode = funcKeywordCode;
|
|
@@ -2909,28 +2908,28 @@ var require_compile = __commonJS(function(exports) {
|
|
|
2909
2908
|
if (this.opts.code.process)
|
|
2910
2909
|
sourceCode = this.opts.code.process(sourceCode, sch);
|
|
2911
2910
|
const makeValidate = new Function(`${names_1.default.self}`, `${names_1.default.scope}`, sourceCode);
|
|
2912
|
-
const
|
|
2913
|
-
this.scope.value(validateName, { ref:
|
|
2914
|
-
|
|
2915
|
-
|
|
2916
|
-
|
|
2911
|
+
const validate = makeValidate(this, this.scope.get());
|
|
2912
|
+
this.scope.value(validateName, { ref: validate });
|
|
2913
|
+
validate.errors = null;
|
|
2914
|
+
validate.schema = sch.schema;
|
|
2915
|
+
validate.schemaEnv = sch;
|
|
2917
2916
|
if (sch.$async)
|
|
2918
|
-
|
|
2917
|
+
validate.$async = true;
|
|
2919
2918
|
if (this.opts.code.source === true) {
|
|
2920
|
-
|
|
2919
|
+
validate.source = { validateName, validateCode, scopeValues: gen._values };
|
|
2921
2920
|
}
|
|
2922
2921
|
if (this.opts.unevaluated) {
|
|
2923
2922
|
const { props, items } = schemaCxt;
|
|
2924
|
-
|
|
2923
|
+
validate.evaluated = {
|
|
2925
2924
|
props: props instanceof codegen_1.Name ? undefined : props,
|
|
2926
2925
|
items: items instanceof codegen_1.Name ? undefined : items,
|
|
2927
2926
|
dynamicProps: props instanceof codegen_1.Name,
|
|
2928
2927
|
dynamicItems: items instanceof codegen_1.Name
|
|
2929
2928
|
};
|
|
2930
|
-
if (
|
|
2931
|
-
|
|
2929
|
+
if (validate.source)
|
|
2930
|
+
validate.source.evaluated = (0, codegen_1.stringify)(validate.evaluated);
|
|
2932
2931
|
}
|
|
2933
|
-
sch.validate =
|
|
2932
|
+
sch.validate = validate;
|
|
2934
2933
|
return sch;
|
|
2935
2934
|
} catch (e) {
|
|
2936
2935
|
delete sch.validate;
|
|
@@ -3808,7 +3807,7 @@ var require_fast_uri = __commonJS(function(exports, module) {
|
|
|
3808
3807
|
if (typeof uri === "string") {
|
|
3809
3808
|
uri = normalizeString(uri, options);
|
|
3810
3809
|
} else if (typeof uri === "object") {
|
|
3811
|
-
uri =
|
|
3810
|
+
uri = parse(serialize(uri, options), options);
|
|
3812
3811
|
}
|
|
3813
3812
|
return uri;
|
|
3814
3813
|
}
|
|
@@ -3851,8 +3850,8 @@ var require_fast_uri = __commonJS(function(exports, module) {
|
|
|
3851
3850
|
function resolveComponent(base, relative, options, skipNormalization) {
|
|
3852
3851
|
const target = {};
|
|
3853
3852
|
if (!skipNormalization) {
|
|
3854
|
-
base =
|
|
3855
|
-
relative =
|
|
3853
|
+
base = parse(serialize(base, options), options);
|
|
3854
|
+
relative = parse(serialize(relative, options), options);
|
|
3856
3855
|
}
|
|
3857
3856
|
options = options || {};
|
|
3858
3857
|
if (!options.tolerant && relative.scheme) {
|
|
@@ -4170,7 +4169,7 @@ var require_fast_uri = __commonJS(function(exports, module) {
|
|
|
4170
4169
|
}
|
|
4171
4170
|
return { parsed, malformedAuthorityOrPort, malformedPercentEncoding, malformedSchemeSpecific, malformedHost, malformedScheme };
|
|
4172
4171
|
}
|
|
4173
|
-
function
|
|
4172
|
+
function parse(uri, opts) {
|
|
4174
4173
|
return parseWithStatus(uri, opts).parsed;
|
|
4175
4174
|
}
|
|
4176
4175
|
function normalizeString(uri, opts) {
|
|
@@ -4207,7 +4206,7 @@ var require_fast_uri = __commonJS(function(exports, module) {
|
|
|
4207
4206
|
resolveComponent,
|
|
4208
4207
|
equal,
|
|
4209
4208
|
serialize,
|
|
4210
|
-
parse
|
|
4209
|
+
parse
|
|
4211
4210
|
};
|
|
4212
4211
|
module.exports = fastUri;
|
|
4213
4212
|
module.exports.default = fastUri;
|
|
@@ -4362,19 +4361,19 @@ var require_core = __commonJS(function(exports) {
|
|
|
4362
4361
|
this.addKeyword("$async");
|
|
4363
4362
|
}
|
|
4364
4363
|
_addDefaultMetaSchema() {
|
|
4365
|
-
const { $data, meta
|
|
4364
|
+
const { $data, meta, schemaId } = this.opts;
|
|
4366
4365
|
let _dataRefSchema = $dataRefSchema;
|
|
4367
4366
|
if (schemaId === "id") {
|
|
4368
4367
|
_dataRefSchema = { ...$dataRefSchema };
|
|
4369
4368
|
_dataRefSchema.id = _dataRefSchema.$id;
|
|
4370
4369
|
delete _dataRefSchema.$id;
|
|
4371
4370
|
}
|
|
4372
|
-
if (
|
|
4371
|
+
if (meta && $data)
|
|
4373
4372
|
this.addMetaSchema(_dataRefSchema, _dataRefSchema[schemaId], false);
|
|
4374
4373
|
}
|
|
4375
4374
|
defaultMeta() {
|
|
4376
|
-
const { meta
|
|
4377
|
-
return this.opts.defaultMeta = typeof
|
|
4375
|
+
const { meta, schemaId } = this.opts;
|
|
4376
|
+
return this.opts.defaultMeta = typeof meta == "object" ? meta[schemaId] || meta : undefined;
|
|
4378
4377
|
}
|
|
4379
4378
|
validate(schemaKeyRef, data) {
|
|
4380
4379
|
let v;
|
|
@@ -4394,12 +4393,12 @@ var require_core = __commonJS(function(exports) {
|
|
|
4394
4393
|
const sch = this._addSchema(schema, _meta);
|
|
4395
4394
|
return sch.validate || this._compileSchemaEnv(sch);
|
|
4396
4395
|
}
|
|
4397
|
-
compileAsync(schema,
|
|
4396
|
+
compileAsync(schema, meta) {
|
|
4398
4397
|
if (typeof this.opts.loadSchema != "function") {
|
|
4399
4398
|
throw new Error("options.loadSchema should be a function");
|
|
4400
4399
|
}
|
|
4401
4400
|
const { loadSchema } = this.opts;
|
|
4402
|
-
return runCompileAsync.call(this, schema,
|
|
4401
|
+
return runCompileAsync.call(this, schema, meta);
|
|
4403
4402
|
async function runCompileAsync(_schema, _meta) {
|
|
4404
4403
|
await loadMetaSchema.call(this, _schema.$schema);
|
|
4405
4404
|
const sch = this._addSchema(_schema, _meta);
|
|
@@ -4431,7 +4430,7 @@ var require_core = __commonJS(function(exports) {
|
|
|
4431
4430
|
if (!this.refs[ref])
|
|
4432
4431
|
await loadMetaSchema.call(this, _schema.$schema);
|
|
4433
4432
|
if (!this.refs[ref])
|
|
4434
|
-
this.addSchema(_schema, ref,
|
|
4433
|
+
this.addSchema(_schema, ref, meta);
|
|
4435
4434
|
}
|
|
4436
4435
|
async function _loadSchema(ref) {
|
|
4437
4436
|
const p = this._loading[ref];
|
|
@@ -4622,20 +4621,20 @@ var require_core = __commonJS(function(exports) {
|
|
|
4622
4621
|
}
|
|
4623
4622
|
return metaSchema;
|
|
4624
4623
|
}
|
|
4625
|
-
_removeAllSchemas(
|
|
4626
|
-
for (const keyRef in
|
|
4627
|
-
const sch =
|
|
4624
|
+
_removeAllSchemas(schemas, regex) {
|
|
4625
|
+
for (const keyRef in schemas) {
|
|
4626
|
+
const sch = schemas[keyRef];
|
|
4628
4627
|
if (!regex || regex.test(keyRef)) {
|
|
4629
4628
|
if (typeof sch == "string") {
|
|
4630
|
-
delete
|
|
4629
|
+
delete schemas[keyRef];
|
|
4631
4630
|
} else if (sch && !sch.meta) {
|
|
4632
4631
|
this._cache.delete(sch.schema);
|
|
4633
|
-
delete
|
|
4632
|
+
delete schemas[keyRef];
|
|
4634
4633
|
}
|
|
4635
4634
|
}
|
|
4636
4635
|
}
|
|
4637
4636
|
}
|
|
4638
|
-
_addSchema(schema,
|
|
4637
|
+
_addSchema(schema, meta, baseId, validateSchema = this.opts.validateSchema, addSchema = this.opts.addUsedSchema) {
|
|
4639
4638
|
let id;
|
|
4640
4639
|
const { schemaId } = this.opts;
|
|
4641
4640
|
if (typeof schema == "object") {
|
|
@@ -4651,7 +4650,7 @@ var require_core = __commonJS(function(exports) {
|
|
|
4651
4650
|
return sch;
|
|
4652
4651
|
baseId = (0, resolve_1.normalizeId)(id || baseId);
|
|
4653
4652
|
const localRefs = resolve_1.getSchemaRefs.call(this, schema, baseId);
|
|
4654
|
-
sch = new compile_1.SchemaEnv({ schema, schemaId, meta
|
|
4653
|
+
sch = new compile_1.SchemaEnv({ schema, schemaId, meta, baseId, localRefs });
|
|
4655
4654
|
this._cache.set(sch.schema, sch);
|
|
4656
4655
|
if (addSchema && !baseId.startsWith("#")) {
|
|
4657
4656
|
if (baseId)
|
|
@@ -6388,9 +6387,9 @@ var require_types = __commonJS(function(exports) {
|
|
|
6388
6387
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6389
6388
|
exports.DiscrError = undefined;
|
|
6390
6389
|
var DiscrError;
|
|
6391
|
-
(function(
|
|
6392
|
-
|
|
6393
|
-
|
|
6390
|
+
(function(DiscrError) {
|
|
6391
|
+
DiscrError["Tag"] = "tag";
|
|
6392
|
+
DiscrError["Mapping"] = "mapping";
|
|
6394
6393
|
})(DiscrError || (exports.DiscrError = DiscrError = {}));
|
|
6395
6394
|
});
|
|
6396
6395
|
|
|
@@ -6470,8 +6469,8 @@ var require_discriminator = __commonJS(function(exports) {
|
|
|
6470
6469
|
if (!tagRequired)
|
|
6471
6470
|
throw new Error(`discriminator: "${tagName}" must be required`);
|
|
6472
6471
|
return oneOfMapping;
|
|
6473
|
-
function hasRequired({ required
|
|
6474
|
-
return Array.isArray(
|
|
6472
|
+
function hasRequired({ required }) {
|
|
6473
|
+
return Array.isArray(required) && required.includes(tagName);
|
|
6475
6474
|
}
|
|
6476
6475
|
function addMappings(sch, i) {
|
|
6477
6476
|
if (sch.const) {
|
|
@@ -6723,11 +6722,11 @@ var require_ajv = __commonJS(function(exports, module) {
|
|
|
6723
6722
|
var require_formats = __commonJS(function(exports) {
|
|
6724
6723
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6725
6724
|
exports.formatNames = exports.fastFormats = exports.fullFormats = undefined;
|
|
6726
|
-
function fmtDef(
|
|
6727
|
-
return { validate
|
|
6725
|
+
function fmtDef(validate, compare) {
|
|
6726
|
+
return { validate, compare };
|
|
6728
6727
|
}
|
|
6729
6728
|
exports.fullFormats = {
|
|
6730
|
-
date: fmtDef(
|
|
6729
|
+
date: fmtDef(date, compareDate),
|
|
6731
6730
|
time: fmtDef(getTime(true), compareTime),
|
|
6732
6731
|
"date-time": fmtDef(getDateTime(true), compareDateTime),
|
|
6733
6732
|
"iso-time": fmtDef(getTime(), compareIsoTime),
|
|
@@ -6771,7 +6770,7 @@ var require_formats = __commonJS(function(exports) {
|
|
|
6771
6770
|
}
|
|
6772
6771
|
var DATE = /^(\d\d\d\d)-(\d\d)-(\d\d)$/;
|
|
6773
6772
|
var DAYS = [0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
|
|
6774
|
-
function
|
|
6773
|
+
function date(str) {
|
|
6775
6774
|
const matches = DATE.exec(str);
|
|
6776
6775
|
if (!matches)
|
|
6777
6776
|
return false;
|
|
@@ -6840,7 +6839,7 @@ var require_formats = __commonJS(function(exports) {
|
|
|
6840
6839
|
const time = getTime(strictTimeZone);
|
|
6841
6840
|
return function date_time(str) {
|
|
6842
6841
|
const dateTime = str.split(DATE_TIME_SEPARATOR);
|
|
6843
|
-
return dateTime.length === 2 &&
|
|
6842
|
+
return dateTime.length === 2 && date(dateTime[0]) && time(dateTime[1]);
|
|
6844
6843
|
};
|
|
6845
6844
|
}
|
|
6846
6845
|
function compareDateTime(dt1, dt2) {
|
|
@@ -7006,35 +7005,35 @@ var require_dist = __commonJS(function(exports, module) {
|
|
|
7006
7005
|
|
|
7007
7006
|
// ../../node_modules/zod/v3/helpers/util.js
|
|
7008
7007
|
var util;
|
|
7009
|
-
(function(
|
|
7010
|
-
|
|
7008
|
+
(function(util) {
|
|
7009
|
+
util.assertEqual = (_) => {};
|
|
7011
7010
|
function assertIs(_arg) {}
|
|
7012
|
-
|
|
7011
|
+
util.assertIs = assertIs;
|
|
7013
7012
|
function assertNever(_x) {
|
|
7014
7013
|
throw new Error;
|
|
7015
7014
|
}
|
|
7016
|
-
|
|
7017
|
-
|
|
7015
|
+
util.assertNever = assertNever;
|
|
7016
|
+
util.arrayToEnum = (items) => {
|
|
7018
7017
|
const obj = {};
|
|
7019
7018
|
for (const item of items) {
|
|
7020
7019
|
obj[item] = item;
|
|
7021
7020
|
}
|
|
7022
7021
|
return obj;
|
|
7023
7022
|
};
|
|
7024
|
-
|
|
7025
|
-
const validKeys =
|
|
7023
|
+
util.getValidEnumValues = (obj) => {
|
|
7024
|
+
const validKeys = util.objectKeys(obj).filter((k) => typeof obj[obj[k]] !== "number");
|
|
7026
7025
|
const filtered = {};
|
|
7027
7026
|
for (const k of validKeys) {
|
|
7028
7027
|
filtered[k] = obj[k];
|
|
7029
7028
|
}
|
|
7030
|
-
return
|
|
7029
|
+
return util.objectValues(filtered);
|
|
7031
7030
|
};
|
|
7032
|
-
|
|
7033
|
-
return
|
|
7031
|
+
util.objectValues = (obj) => {
|
|
7032
|
+
return util.objectKeys(obj).map(function(e) {
|
|
7034
7033
|
return obj[e];
|
|
7035
7034
|
});
|
|
7036
7035
|
};
|
|
7037
|
-
|
|
7036
|
+
util.objectKeys = typeof Object.keys === "function" ? (obj) => Object.keys(obj) : (object) => {
|
|
7038
7037
|
const keys = [];
|
|
7039
7038
|
for (const key in object) {
|
|
7040
7039
|
if (Object.prototype.hasOwnProperty.call(object, key)) {
|
|
@@ -7043,19 +7042,19 @@ var util;
|
|
|
7043
7042
|
}
|
|
7044
7043
|
return keys;
|
|
7045
7044
|
};
|
|
7046
|
-
|
|
7045
|
+
util.find = (arr, checker) => {
|
|
7047
7046
|
for (const item of arr) {
|
|
7048
7047
|
if (checker(item))
|
|
7049
7048
|
return item;
|
|
7050
7049
|
}
|
|
7051
7050
|
return;
|
|
7052
7051
|
};
|
|
7053
|
-
|
|
7052
|
+
util.isInteger = typeof Number.isInteger === "function" ? (val) => Number.isInteger(val) : (val) => typeof val === "number" && Number.isFinite(val) && Math.floor(val) === val;
|
|
7054
7053
|
function joinValues(array, separator = " | ") {
|
|
7055
7054
|
return array.map((val) => typeof val === "string" ? `'${val}'` : val).join(separator);
|
|
7056
7055
|
}
|
|
7057
|
-
|
|
7058
|
-
|
|
7056
|
+
util.joinValues = joinValues;
|
|
7057
|
+
util.jsonStringifyReplacer = (_, value) => {
|
|
7059
7058
|
if (typeof value === "bigint") {
|
|
7060
7059
|
return value.toString();
|
|
7061
7060
|
}
|
|
@@ -7063,8 +7062,8 @@ var util;
|
|
|
7063
7062
|
};
|
|
7064
7063
|
})(util || (util = {}));
|
|
7065
7064
|
var objectUtil;
|
|
7066
|
-
(function(
|
|
7067
|
-
|
|
7065
|
+
(function(objectUtil) {
|
|
7066
|
+
objectUtil.mergeShapes = (first, second) => {
|
|
7068
7067
|
return {
|
|
7069
7068
|
...first,
|
|
7070
7069
|
...second
|
|
@@ -7481,9 +7480,9 @@ var isAsync = (x) => typeof Promise !== "undefined" && x instanceof Promise;
|
|
|
7481
7480
|
|
|
7482
7481
|
// ../../node_modules/zod/v3/helpers/errorUtil.js
|
|
7483
7482
|
var errorUtil;
|
|
7484
|
-
(function(
|
|
7485
|
-
|
|
7486
|
-
|
|
7483
|
+
(function(errorUtil) {
|
|
7484
|
+
errorUtil.errToObj = (message) => typeof message === "string" ? { message } : message || {};
|
|
7485
|
+
errorUtil.toString = (message) => typeof message === "string" ? message : message?.message;
|
|
7487
7486
|
})(errorUtil || (errorUtil = {}));
|
|
7488
7487
|
|
|
7489
7488
|
// ../../node_modules/zod/v3/types.js
|
|
@@ -7528,12 +7527,12 @@ var handleResult = (ctx, result) => {
|
|
|
7528
7527
|
function processCreateParams(params) {
|
|
7529
7528
|
if (!params)
|
|
7530
7529
|
return {};
|
|
7531
|
-
const { errorMap
|
|
7532
|
-
if (
|
|
7530
|
+
const { errorMap, invalid_type_error, required_error, description } = params;
|
|
7531
|
+
if (errorMap && (invalid_type_error || required_error)) {
|
|
7533
7532
|
throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);
|
|
7534
7533
|
}
|
|
7535
|
-
if (
|
|
7536
|
-
return { errorMap
|
|
7534
|
+
if (errorMap)
|
|
7535
|
+
return { errorMap, description };
|
|
7537
7536
|
const customMap = (iss, ctx) => {
|
|
7538
7537
|
const { message } = params;
|
|
7539
7538
|
if (iss.code === "invalid_enum_value") {
|
|
@@ -7920,11 +7919,11 @@ class ZodString extends ZodType {
|
|
|
7920
7919
|
}
|
|
7921
7920
|
const parsedType = this._getType(input);
|
|
7922
7921
|
if (parsedType !== ZodParsedType.string) {
|
|
7923
|
-
const
|
|
7924
|
-
addIssueToContext(
|
|
7922
|
+
const ctx = this._getOrReturnCtx(input);
|
|
7923
|
+
addIssueToContext(ctx, {
|
|
7925
7924
|
code: ZodIssueCode.invalid_type,
|
|
7926
7925
|
expected: ZodParsedType.string,
|
|
7927
|
-
received:
|
|
7926
|
+
received: ctx.parsedType
|
|
7928
7927
|
});
|
|
7929
7928
|
return INVALID;
|
|
7930
7929
|
}
|
|
@@ -8478,11 +8477,11 @@ class ZodNumber extends ZodType {
|
|
|
8478
8477
|
}
|
|
8479
8478
|
const parsedType = this._getType(input);
|
|
8480
8479
|
if (parsedType !== ZodParsedType.number) {
|
|
8481
|
-
const
|
|
8482
|
-
addIssueToContext(
|
|
8480
|
+
const ctx = this._getOrReturnCtx(input);
|
|
8481
|
+
addIssueToContext(ctx, {
|
|
8483
8482
|
code: ZodIssueCode.invalid_type,
|
|
8484
8483
|
expected: ZodParsedType.number,
|
|
8485
|
-
received:
|
|
8484
|
+
received: ctx.parsedType
|
|
8486
8485
|
});
|
|
8487
8486
|
return INVALID;
|
|
8488
8487
|
}
|
|
@@ -8904,17 +8903,17 @@ class ZodDate extends ZodType {
|
|
|
8904
8903
|
}
|
|
8905
8904
|
const parsedType = this._getType(input);
|
|
8906
8905
|
if (parsedType !== ZodParsedType.date) {
|
|
8907
|
-
const
|
|
8908
|
-
addIssueToContext(
|
|
8906
|
+
const ctx = this._getOrReturnCtx(input);
|
|
8907
|
+
addIssueToContext(ctx, {
|
|
8909
8908
|
code: ZodIssueCode.invalid_type,
|
|
8910
8909
|
expected: ZodParsedType.date,
|
|
8911
|
-
received:
|
|
8910
|
+
received: ctx.parsedType
|
|
8912
8911
|
});
|
|
8913
8912
|
return INVALID;
|
|
8914
8913
|
}
|
|
8915
8914
|
if (Number.isNaN(input.data.getTime())) {
|
|
8916
|
-
const
|
|
8917
|
-
addIssueToContext(
|
|
8915
|
+
const ctx = this._getOrReturnCtx(input);
|
|
8916
|
+
addIssueToContext(ctx, {
|
|
8918
8917
|
code: ZodIssueCode.invalid_date
|
|
8919
8918
|
});
|
|
8920
8919
|
return INVALID;
|
|
@@ -9202,8 +9201,8 @@ class ZodArray extends ZodType {
|
|
|
9202
9201
|
if (ctx.common.async) {
|
|
9203
9202
|
return Promise.all([...ctx.data].map((item, i) => {
|
|
9204
9203
|
return def.type._parseAsync(new ParseInputLazyPath(ctx, item, ctx.path, i));
|
|
9205
|
-
})).then((
|
|
9206
|
-
return ParseStatus.mergeArray(status,
|
|
9204
|
+
})).then((result) => {
|
|
9205
|
+
return ParseStatus.mergeArray(status, result);
|
|
9207
9206
|
});
|
|
9208
9207
|
}
|
|
9209
9208
|
const result = [...ctx.data].map((item, i) => {
|
|
@@ -9291,11 +9290,11 @@ class ZodObject extends ZodType {
|
|
|
9291
9290
|
_parse(input) {
|
|
9292
9291
|
const parsedType = this._getType(input);
|
|
9293
9292
|
if (parsedType !== ZodParsedType.object) {
|
|
9294
|
-
const
|
|
9295
|
-
addIssueToContext(
|
|
9293
|
+
const ctx = this._getOrReturnCtx(input);
|
|
9294
|
+
addIssueToContext(ctx, {
|
|
9296
9295
|
code: ZodIssueCode.invalid_type,
|
|
9297
9296
|
expected: ZodParsedType.object,
|
|
9298
|
-
received:
|
|
9297
|
+
received: ctx.parsedType
|
|
9299
9298
|
});
|
|
9300
9299
|
return INVALID;
|
|
9301
9300
|
}
|
|
@@ -9599,7 +9598,7 @@ class ZodUnion extends ZodType {
|
|
|
9599
9598
|
ctx.common.issues.push(...dirty.ctx.common.issues);
|
|
9600
9599
|
return dirty.result;
|
|
9601
9600
|
}
|
|
9602
|
-
const unionErrors = issues.map((
|
|
9601
|
+
const unionErrors = issues.map((issues) => new ZodError(issues));
|
|
9603
9602
|
addIssueToContext(ctx, {
|
|
9604
9603
|
code: ZodIssueCode.invalid_union,
|
|
9605
9604
|
unionErrors
|
|
@@ -10043,9 +10042,9 @@ class ZodSet extends ZodType {
|
|
|
10043
10042
|
}
|
|
10044
10043
|
}
|
|
10045
10044
|
const valueType = this._def.valueType;
|
|
10046
|
-
function finalizeSet(
|
|
10045
|
+
function finalizeSet(elements) {
|
|
10047
10046
|
const parsedSet = new Set;
|
|
10048
|
-
for (const element of
|
|
10047
|
+
for (const element of elements) {
|
|
10049
10048
|
if (element.status === "aborted")
|
|
10050
10049
|
return INVALID;
|
|
10051
10050
|
if (element.status === "dirty")
|
|
@@ -10056,7 +10055,7 @@ class ZodSet extends ZodType {
|
|
|
10056
10055
|
}
|
|
10057
10056
|
const elements = [...ctx.data.values()].map((item, i) => valueType._parse(new ParseInputLazyPath(ctx, item, ctx.path, i)));
|
|
10058
10057
|
if (ctx.common.async) {
|
|
10059
|
-
return Promise.all(elements).then((
|
|
10058
|
+
return Promise.all(elements).then((elements) => finalizeSet(elements));
|
|
10060
10059
|
} else {
|
|
10061
10060
|
return finalizeSet(elements);
|
|
10062
10061
|
}
|
|
@@ -10409,11 +10408,11 @@ class ZodEffects extends ZodType {
|
|
|
10409
10408
|
if (effect.type === "preprocess") {
|
|
10410
10409
|
const processed = effect.transform(ctx.data, checkCtx);
|
|
10411
10410
|
if (ctx.common.async) {
|
|
10412
|
-
return Promise.resolve(processed).then(async (
|
|
10411
|
+
return Promise.resolve(processed).then(async (processed) => {
|
|
10413
10412
|
if (status.value === "aborted")
|
|
10414
10413
|
return INVALID;
|
|
10415
10414
|
const result = await this._def.schema._parseAsync({
|
|
10416
|
-
data:
|
|
10415
|
+
data: processed,
|
|
10417
10416
|
path: ctx.path,
|
|
10418
10417
|
parent: ctx
|
|
10419
10418
|
});
|
|
@@ -10605,10 +10604,10 @@ class ZodCatch extends ZodType {
|
|
|
10605
10604
|
}
|
|
10606
10605
|
});
|
|
10607
10606
|
if (isAsync(result)) {
|
|
10608
|
-
return result.then((
|
|
10607
|
+
return result.then((result) => {
|
|
10609
10608
|
return {
|
|
10610
10609
|
status: "valid",
|
|
10611
|
-
value:
|
|
10610
|
+
value: result.status === "valid" ? result.value : this._def.catchValue({
|
|
10612
10611
|
get error() {
|
|
10613
10612
|
return new ZodError(newCtx.common.issues);
|
|
10614
10613
|
},
|
|
@@ -10761,43 +10760,43 @@ var late = {
|
|
|
10761
10760
|
object: ZodObject.lazycreate
|
|
10762
10761
|
};
|
|
10763
10762
|
var ZodFirstPartyTypeKind;
|
|
10764
|
-
(function(
|
|
10765
|
-
|
|
10766
|
-
|
|
10767
|
-
|
|
10768
|
-
|
|
10769
|
-
|
|
10770
|
-
|
|
10771
|
-
|
|
10772
|
-
|
|
10773
|
-
|
|
10774
|
-
|
|
10775
|
-
|
|
10776
|
-
|
|
10777
|
-
|
|
10778
|
-
|
|
10779
|
-
|
|
10780
|
-
|
|
10781
|
-
|
|
10782
|
-
|
|
10783
|
-
|
|
10784
|
-
|
|
10785
|
-
|
|
10786
|
-
|
|
10787
|
-
|
|
10788
|
-
|
|
10789
|
-
|
|
10790
|
-
|
|
10791
|
-
|
|
10792
|
-
|
|
10793
|
-
|
|
10794
|
-
|
|
10795
|
-
|
|
10796
|
-
|
|
10797
|
-
|
|
10798
|
-
|
|
10799
|
-
|
|
10800
|
-
|
|
10763
|
+
(function(ZodFirstPartyTypeKind) {
|
|
10764
|
+
ZodFirstPartyTypeKind["ZodString"] = "ZodString";
|
|
10765
|
+
ZodFirstPartyTypeKind["ZodNumber"] = "ZodNumber";
|
|
10766
|
+
ZodFirstPartyTypeKind["ZodNaN"] = "ZodNaN";
|
|
10767
|
+
ZodFirstPartyTypeKind["ZodBigInt"] = "ZodBigInt";
|
|
10768
|
+
ZodFirstPartyTypeKind["ZodBoolean"] = "ZodBoolean";
|
|
10769
|
+
ZodFirstPartyTypeKind["ZodDate"] = "ZodDate";
|
|
10770
|
+
ZodFirstPartyTypeKind["ZodSymbol"] = "ZodSymbol";
|
|
10771
|
+
ZodFirstPartyTypeKind["ZodUndefined"] = "ZodUndefined";
|
|
10772
|
+
ZodFirstPartyTypeKind["ZodNull"] = "ZodNull";
|
|
10773
|
+
ZodFirstPartyTypeKind["ZodAny"] = "ZodAny";
|
|
10774
|
+
ZodFirstPartyTypeKind["ZodUnknown"] = "ZodUnknown";
|
|
10775
|
+
ZodFirstPartyTypeKind["ZodNever"] = "ZodNever";
|
|
10776
|
+
ZodFirstPartyTypeKind["ZodVoid"] = "ZodVoid";
|
|
10777
|
+
ZodFirstPartyTypeKind["ZodArray"] = "ZodArray";
|
|
10778
|
+
ZodFirstPartyTypeKind["ZodObject"] = "ZodObject";
|
|
10779
|
+
ZodFirstPartyTypeKind["ZodUnion"] = "ZodUnion";
|
|
10780
|
+
ZodFirstPartyTypeKind["ZodDiscriminatedUnion"] = "ZodDiscriminatedUnion";
|
|
10781
|
+
ZodFirstPartyTypeKind["ZodIntersection"] = "ZodIntersection";
|
|
10782
|
+
ZodFirstPartyTypeKind["ZodTuple"] = "ZodTuple";
|
|
10783
|
+
ZodFirstPartyTypeKind["ZodRecord"] = "ZodRecord";
|
|
10784
|
+
ZodFirstPartyTypeKind["ZodMap"] = "ZodMap";
|
|
10785
|
+
ZodFirstPartyTypeKind["ZodSet"] = "ZodSet";
|
|
10786
|
+
ZodFirstPartyTypeKind["ZodFunction"] = "ZodFunction";
|
|
10787
|
+
ZodFirstPartyTypeKind["ZodLazy"] = "ZodLazy";
|
|
10788
|
+
ZodFirstPartyTypeKind["ZodLiteral"] = "ZodLiteral";
|
|
10789
|
+
ZodFirstPartyTypeKind["ZodEnum"] = "ZodEnum";
|
|
10790
|
+
ZodFirstPartyTypeKind["ZodEffects"] = "ZodEffects";
|
|
10791
|
+
ZodFirstPartyTypeKind["ZodNativeEnum"] = "ZodNativeEnum";
|
|
10792
|
+
ZodFirstPartyTypeKind["ZodOptional"] = "ZodOptional";
|
|
10793
|
+
ZodFirstPartyTypeKind["ZodNullable"] = "ZodNullable";
|
|
10794
|
+
ZodFirstPartyTypeKind["ZodDefault"] = "ZodDefault";
|
|
10795
|
+
ZodFirstPartyTypeKind["ZodCatch"] = "ZodCatch";
|
|
10796
|
+
ZodFirstPartyTypeKind["ZodPromise"] = "ZodPromise";
|
|
10797
|
+
ZodFirstPartyTypeKind["ZodBranded"] = "ZodBranded";
|
|
10798
|
+
ZodFirstPartyTypeKind["ZodPipeline"] = "ZodPipeline";
|
|
10799
|
+
ZodFirstPartyTypeKind["ZodReadonly"] = "ZodReadonly";
|
|
10801
10800
|
})(ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {}));
|
|
10802
10801
|
var stringType = ZodString.create;
|
|
10803
10802
|
var numberType = ZodNumber.create;
|
|
@@ -10875,8 +10874,8 @@ var ZodMiniType = /* @__PURE__ */ $constructor("ZodMiniType", (inst, def) => {
|
|
|
10875
10874
|
brand() {
|
|
10876
10875
|
return this;
|
|
10877
10876
|
},
|
|
10878
|
-
register(reg,
|
|
10879
|
-
reg.add(this,
|
|
10877
|
+
register(reg, meta) {
|
|
10878
|
+
reg.add(this, meta);
|
|
10880
10879
|
return this;
|
|
10881
10880
|
},
|
|
10882
10881
|
apply(fn, ...args) {
|
|
@@ -10915,8 +10914,8 @@ function objectFromShape(shape) {
|
|
|
10915
10914
|
}
|
|
10916
10915
|
function safeParse2(schema, data) {
|
|
10917
10916
|
if (isZ4Schema(schema)) {
|
|
10918
|
-
const
|
|
10919
|
-
return
|
|
10917
|
+
const result = safeParse(schema, data);
|
|
10918
|
+
return result;
|
|
10920
10919
|
}
|
|
10921
10920
|
const v3Schema = schema;
|
|
10922
10921
|
const result = v3Schema.safeParse(data);
|
|
@@ -10924,8 +10923,8 @@ function safeParse2(schema, data) {
|
|
|
10924
10923
|
}
|
|
10925
10924
|
async function safeParseAsync2(schema, data) {
|
|
10926
10925
|
if (isZ4Schema(schema)) {
|
|
10927
|
-
const
|
|
10928
|
-
return
|
|
10926
|
+
const result = await safeParseAsync(schema, data);
|
|
10927
|
+
return result;
|
|
10929
10928
|
}
|
|
10930
10929
|
const v3Schema = schema;
|
|
10931
10930
|
const result = await v3Schema.safeParseAsync(data);
|
|
@@ -11033,12 +11032,12 @@ function isSchemaOptional(schema) {
|
|
|
11033
11032
|
function getLiteralValue(schema) {
|
|
11034
11033
|
if (isZ4Schema(schema)) {
|
|
11035
11034
|
const v4Schema = schema;
|
|
11036
|
-
const
|
|
11037
|
-
if (
|
|
11038
|
-
if (
|
|
11039
|
-
return
|
|
11040
|
-
if (Array.isArray(
|
|
11041
|
-
return
|
|
11035
|
+
const def = v4Schema._zod?.def;
|
|
11036
|
+
if (def) {
|
|
11037
|
+
if (def.value !== undefined)
|
|
11038
|
+
return def.value;
|
|
11039
|
+
if (Array.isArray(def.values) && def.values.length > 0) {
|
|
11040
|
+
return def.values[0];
|
|
11042
11041
|
}
|
|
11043
11042
|
}
|
|
11044
11043
|
}
|
|
@@ -11745,11 +11744,11 @@ function parseMapDef(def, refs) {
|
|
|
11745
11744
|
|
|
11746
11745
|
// ../../node_modules/zod-to-json-schema/dist/esm/parsers/nativeEnum.js
|
|
11747
11746
|
function parseNativeEnumDef(def) {
|
|
11748
|
-
const
|
|
11747
|
+
const object = def.values;
|
|
11749
11748
|
const actualKeys = Object.keys(def.values).filter((key) => {
|
|
11750
|
-
return typeof
|
|
11749
|
+
return typeof object[object[key]] !== "number";
|
|
11751
11750
|
});
|
|
11752
|
-
const actualValues = actualKeys.map((key) =>
|
|
11751
|
+
const actualValues = actualKeys.map((key) => object[key]);
|
|
11753
11752
|
const parsedTypes = Array.from(new Set(actualValues.map((values) => typeof values)));
|
|
11754
11753
|
return {
|
|
11755
11754
|
type: parsedTypes.length === 1 ? parsedTypes[0] === "string" ? "string" : "number" : ["string", "number"],
|
|
@@ -11790,9 +11789,9 @@ function parseUnionDef(def, refs) {
|
|
|
11790
11789
|
return asAnyOf(def, refs);
|
|
11791
11790
|
const options = def.options instanceof Map ? Array.from(def.options.values()) : def.options;
|
|
11792
11791
|
if (options.every((x) => (x._def.typeName in primitiveMappings) && (!x._def.checks || !x._def.checks.length))) {
|
|
11793
|
-
const types = options.reduce((
|
|
11792
|
+
const types = options.reduce((types, x) => {
|
|
11794
11793
|
const type = primitiveMappings[x._def.typeName];
|
|
11795
|
-
return type && !
|
|
11794
|
+
return type && !types.includes(type) ? [...types, type] : types;
|
|
11796
11795
|
}, []);
|
|
11797
11796
|
return {
|
|
11798
11797
|
type: types.length > 1 ? types : types[0]
|
|
@@ -11831,7 +11830,7 @@ function parseUnionDef(def, refs) {
|
|
|
11831
11830
|
type: "string",
|
|
11832
11831
|
enum: options.reduce((acc, x) => [
|
|
11833
11832
|
...acc,
|
|
11834
|
-
...x._def.values.filter((
|
|
11833
|
+
...x._def.values.filter((x) => !acc.includes(x))
|
|
11835
11834
|
], [])
|
|
11836
11835
|
};
|
|
11837
11836
|
}
|
|
@@ -11862,13 +11861,13 @@ function parseNullableDef(def, refs) {
|
|
|
11862
11861
|
};
|
|
11863
11862
|
}
|
|
11864
11863
|
if (refs.target === "openApi3") {
|
|
11865
|
-
const
|
|
11864
|
+
const base = parseDef(def.innerType._def, {
|
|
11866
11865
|
...refs,
|
|
11867
11866
|
currentPath: [...refs.currentPath]
|
|
11868
11867
|
});
|
|
11869
|
-
if (
|
|
11870
|
-
return { allOf: [
|
|
11871
|
-
return
|
|
11868
|
+
if (base && "$ref" in base)
|
|
11869
|
+
return { allOf: [base], nullable: true };
|
|
11870
|
+
return base && { ...base, nullable: true };
|
|
11872
11871
|
}
|
|
11873
11872
|
const base = parseDef(def.innerType._def, {
|
|
11874
11873
|
...refs,
|
|
@@ -11933,7 +11932,7 @@ function parseObjectDef(def, refs) {
|
|
|
11933
11932
|
type: "object",
|
|
11934
11933
|
properties: {}
|
|
11935
11934
|
};
|
|
11936
|
-
const
|
|
11935
|
+
const required = [];
|
|
11937
11936
|
const shape = def.shape();
|
|
11938
11937
|
for (const propName in shape) {
|
|
11939
11938
|
let propDef = shape[propName];
|
|
@@ -11960,11 +11959,11 @@ function parseObjectDef(def, refs) {
|
|
|
11960
11959
|
}
|
|
11961
11960
|
result.properties[propName] = parsedDef;
|
|
11962
11961
|
if (!propOptional) {
|
|
11963
|
-
|
|
11962
|
+
required.push(propName);
|
|
11964
11963
|
}
|
|
11965
11964
|
}
|
|
11966
|
-
if (
|
|
11967
|
-
result.required =
|
|
11965
|
+
if (required.length) {
|
|
11966
|
+
result.required = required;
|
|
11968
11967
|
}
|
|
11969
11968
|
const additionalProperties = decideAdditionalProperties(def, refs);
|
|
11970
11969
|
if (additionalProperties !== undefined) {
|
|
@@ -12241,11 +12240,11 @@ var addMeta = (def, refs, jsonSchema) => {
|
|
|
12241
12240
|
// ../../node_modules/zod-to-json-schema/dist/esm/zodToJsonSchema.js
|
|
12242
12241
|
var zodToJsonSchema = (schema, options) => {
|
|
12243
12242
|
const refs = getRefs(options);
|
|
12244
|
-
let definitions = typeof options === "object" && options.definitions ? Object.entries(options.definitions).reduce((acc, [
|
|
12243
|
+
let definitions = typeof options === "object" && options.definitions ? Object.entries(options.definitions).reduce((acc, [name, schema]) => ({
|
|
12245
12244
|
...acc,
|
|
12246
|
-
[
|
|
12245
|
+
[name]: parseDef(schema._def, {
|
|
12247
12246
|
...refs,
|
|
12248
|
-
currentPath: [...refs.basePath, refs.definitionPath,
|
|
12247
|
+
currentPath: [...refs.basePath, refs.definitionPath, name]
|
|
12249
12248
|
}, true) ?? parseAnyDef(refs)
|
|
12250
12249
|
}), {}) : undefined;
|
|
12251
12250
|
const name = typeof options === "string" ? options : options?.nameStrategy === "title" ? undefined : options?.name;
|
|
@@ -12799,18 +12798,18 @@ class Protocol {
|
|
|
12799
12798
|
throw new McpError(ErrorCode.InternalError, "Task creation did not return a task");
|
|
12800
12799
|
}
|
|
12801
12800
|
while (true) {
|
|
12802
|
-
const
|
|
12803
|
-
yield { type: "taskStatus", task
|
|
12804
|
-
if (isTerminal(
|
|
12805
|
-
if (
|
|
12801
|
+
const task = await this.getTask({ taskId }, options);
|
|
12802
|
+
yield { type: "taskStatus", task };
|
|
12803
|
+
if (isTerminal(task.status)) {
|
|
12804
|
+
if (task.status === "completed") {
|
|
12806
12805
|
const result = await this.getTaskResult({ taskId }, resultSchema, options);
|
|
12807
12806
|
yield { type: "result", result };
|
|
12808
|
-
} else if (
|
|
12807
|
+
} else if (task.status === "failed") {
|
|
12809
12808
|
yield {
|
|
12810
12809
|
type: "error",
|
|
12811
12810
|
error: new McpError(ErrorCode.InternalError, `Task ${taskId} failed`)
|
|
12812
12811
|
};
|
|
12813
|
-
} else if (
|
|
12812
|
+
} else if (task.status === "cancelled") {
|
|
12814
12813
|
yield {
|
|
12815
12814
|
type: "error",
|
|
12816
12815
|
error: new McpError(ErrorCode.InternalError, `Task ${taskId} was cancelled`)
|
|
@@ -12818,12 +12817,12 @@ class Protocol {
|
|
|
12818
12817
|
}
|
|
12819
12818
|
return;
|
|
12820
12819
|
}
|
|
12821
|
-
if (
|
|
12820
|
+
if (task.status === "input_required") {
|
|
12822
12821
|
const result = await this.getTaskResult({ taskId }, resultSchema, options);
|
|
12823
12822
|
yield { type: "result", result };
|
|
12824
12823
|
return;
|
|
12825
12824
|
}
|
|
12826
|
-
const pollInterval =
|
|
12825
|
+
const pollInterval = task.pollInterval ?? this._options?.defaultTaskPollInterval ?? 1000;
|
|
12827
12826
|
await new Promise((resolve) => setTimeout(resolve, pollInterval));
|
|
12828
12827
|
options?.signal?.throwIfAborted();
|
|
12829
12828
|
}
|
|
@@ -12898,7 +12897,7 @@ class Protocol {
|
|
|
12898
12897
|
requestId: messageId,
|
|
12899
12898
|
reason: String(reason)
|
|
12900
12899
|
}
|
|
12901
|
-
}, { relatedRequestId, resumptionToken, onresumptiontoken }).catch((
|
|
12900
|
+
}, { relatedRequestId, resumptionToken, onresumptiontoken }).catch((error) => this._onerror(new Error(`Failed to send cancellation: ${error}`)));
|
|
12902
12901
|
const error = reason instanceof McpError ? reason : new McpError(ErrorCode.RequestTimeout, String(reason));
|
|
12903
12902
|
reject(error);
|
|
12904
12903
|
};
|
|
@@ -12972,7 +12971,7 @@ class Protocol {
|
|
|
12972
12971
|
this.assertNotificationCapability(notification.method);
|
|
12973
12972
|
const relatedTaskId = options?.relatedTask?.taskId;
|
|
12974
12973
|
if (relatedTaskId) {
|
|
12975
|
-
const
|
|
12974
|
+
const jsonrpcNotification = {
|
|
12976
12975
|
...notification,
|
|
12977
12976
|
jsonrpc: "2.0",
|
|
12978
12977
|
params: {
|
|
@@ -12985,7 +12984,7 @@ class Protocol {
|
|
|
12985
12984
|
};
|
|
12986
12985
|
await this._enqueueTaskMessage(relatedTaskId, {
|
|
12987
12986
|
type: "notification",
|
|
12988
|
-
message:
|
|
12987
|
+
message: jsonrpcNotification,
|
|
12989
12988
|
timestamp: Date.now()
|
|
12990
12989
|
});
|
|
12991
12990
|
return;
|
|
@@ -13002,23 +13001,23 @@ class Protocol {
|
|
|
13002
13001
|
if (!this._transport) {
|
|
13003
13002
|
return;
|
|
13004
13003
|
}
|
|
13005
|
-
let
|
|
13004
|
+
let jsonrpcNotification = {
|
|
13006
13005
|
...notification,
|
|
13007
13006
|
jsonrpc: "2.0"
|
|
13008
13007
|
};
|
|
13009
13008
|
if (options?.relatedTask) {
|
|
13010
|
-
|
|
13011
|
-
...
|
|
13009
|
+
jsonrpcNotification = {
|
|
13010
|
+
...jsonrpcNotification,
|
|
13012
13011
|
params: {
|
|
13013
|
-
...
|
|
13012
|
+
...jsonrpcNotification.params,
|
|
13014
13013
|
_meta: {
|
|
13015
|
-
...
|
|
13014
|
+
...jsonrpcNotification.params?._meta || {},
|
|
13016
13015
|
[RELATED_TASK_META_KEY]: options.relatedTask
|
|
13017
13016
|
}
|
|
13018
13017
|
}
|
|
13019
13018
|
};
|
|
13020
13019
|
}
|
|
13021
|
-
this._transport?.send(
|
|
13020
|
+
this._transport?.send(jsonrpcNotification, options).catch((error) => this._onerror(error));
|
|
13022
13021
|
});
|
|
13023
13022
|
return;
|
|
13024
13023
|
}
|
|
@@ -13686,232 +13685,14 @@ function isCompletable(schema) {
|
|
|
13686
13685
|
return !!schema && typeof schema === "object" && COMPLETABLE_SYMBOL in schema;
|
|
13687
13686
|
}
|
|
13688
13687
|
function getCompleter(schema) {
|
|
13689
|
-
const
|
|
13690
|
-
return
|
|
13688
|
+
const meta = schema[COMPLETABLE_SYMBOL];
|
|
13689
|
+
return meta?.complete;
|
|
13691
13690
|
}
|
|
13692
13691
|
var McpZodTypeKind;
|
|
13693
|
-
(function(
|
|
13694
|
-
|
|
13692
|
+
(function(McpZodTypeKind) {
|
|
13693
|
+
McpZodTypeKind["Completable"] = "McpCompletable";
|
|
13695
13694
|
})(McpZodTypeKind || (McpZodTypeKind = {}));
|
|
13696
13695
|
|
|
13697
|
-
// ../../node_modules/@modelcontextprotocol/sdk/dist/esm/shared/uriTemplate.js
|
|
13698
|
-
var MAX_TEMPLATE_LENGTH = 1e6;
|
|
13699
|
-
var MAX_VARIABLE_LENGTH = 1e6;
|
|
13700
|
-
var MAX_TEMPLATE_EXPRESSIONS = 1e4;
|
|
13701
|
-
var MAX_REGEX_LENGTH = 1e6;
|
|
13702
|
-
|
|
13703
|
-
class UriTemplate {
|
|
13704
|
-
static isTemplate(str) {
|
|
13705
|
-
return /\{[^}\s]+\}/.test(str);
|
|
13706
|
-
}
|
|
13707
|
-
static validateLength(str, max, context) {
|
|
13708
|
-
if (str.length > max) {
|
|
13709
|
-
throw new Error(`${context} exceeds maximum length of ${max} characters (got ${str.length})`);
|
|
13710
|
-
}
|
|
13711
|
-
}
|
|
13712
|
-
get variableNames() {
|
|
13713
|
-
return this.parts.flatMap((part) => typeof part === "string" ? [] : part.names);
|
|
13714
|
-
}
|
|
13715
|
-
constructor(template) {
|
|
13716
|
-
UriTemplate.validateLength(template, MAX_TEMPLATE_LENGTH, "Template");
|
|
13717
|
-
this.template = template;
|
|
13718
|
-
this.parts = this.parse(template);
|
|
13719
|
-
}
|
|
13720
|
-
toString() {
|
|
13721
|
-
return this.template;
|
|
13722
|
-
}
|
|
13723
|
-
parse(template) {
|
|
13724
|
-
const parts = [];
|
|
13725
|
-
let currentText = "";
|
|
13726
|
-
let i = 0;
|
|
13727
|
-
let expressionCount = 0;
|
|
13728
|
-
while (i < template.length) {
|
|
13729
|
-
if (template[i] === "{") {
|
|
13730
|
-
if (currentText) {
|
|
13731
|
-
parts.push(currentText);
|
|
13732
|
-
currentText = "";
|
|
13733
|
-
}
|
|
13734
|
-
const end = template.indexOf("}", i);
|
|
13735
|
-
if (end === -1)
|
|
13736
|
-
throw new Error("Unclosed template expression");
|
|
13737
|
-
expressionCount++;
|
|
13738
|
-
if (expressionCount > MAX_TEMPLATE_EXPRESSIONS) {
|
|
13739
|
-
throw new Error(`Template contains too many expressions (max ${MAX_TEMPLATE_EXPRESSIONS})`);
|
|
13740
|
-
}
|
|
13741
|
-
const expr = template.slice(i + 1, end);
|
|
13742
|
-
const operator = this.getOperator(expr);
|
|
13743
|
-
const exploded = expr.includes("*");
|
|
13744
|
-
const names = this.getNames(expr);
|
|
13745
|
-
const name = names[0];
|
|
13746
|
-
for (const name2 of names) {
|
|
13747
|
-
UriTemplate.validateLength(name2, MAX_VARIABLE_LENGTH, "Variable name");
|
|
13748
|
-
}
|
|
13749
|
-
parts.push({ name, operator, names, exploded });
|
|
13750
|
-
i = end + 1;
|
|
13751
|
-
} else {
|
|
13752
|
-
currentText += template[i];
|
|
13753
|
-
i++;
|
|
13754
|
-
}
|
|
13755
|
-
}
|
|
13756
|
-
if (currentText) {
|
|
13757
|
-
parts.push(currentText);
|
|
13758
|
-
}
|
|
13759
|
-
return parts;
|
|
13760
|
-
}
|
|
13761
|
-
getOperator(expr) {
|
|
13762
|
-
const operators = ["+", "#", ".", "/", "?", "&"];
|
|
13763
|
-
return operators.find((op) => expr.startsWith(op)) || "";
|
|
13764
|
-
}
|
|
13765
|
-
getNames(expr) {
|
|
13766
|
-
const operator = this.getOperator(expr);
|
|
13767
|
-
return expr.slice(operator.length).split(",").map((name) => name.replace("*", "").trim()).filter((name) => name.length > 0);
|
|
13768
|
-
}
|
|
13769
|
-
encodeValue(value, operator) {
|
|
13770
|
-
UriTemplate.validateLength(value, MAX_VARIABLE_LENGTH, "Variable value");
|
|
13771
|
-
if (operator === "+" || operator === "#") {
|
|
13772
|
-
return encodeURI(value);
|
|
13773
|
-
}
|
|
13774
|
-
return encodeURIComponent(value);
|
|
13775
|
-
}
|
|
13776
|
-
expandPart(part, variables) {
|
|
13777
|
-
if (part.operator === "?" || part.operator === "&") {
|
|
13778
|
-
const pairs = part.names.map((name) => {
|
|
13779
|
-
const value2 = variables[name];
|
|
13780
|
-
if (value2 === undefined)
|
|
13781
|
-
return "";
|
|
13782
|
-
const encoded2 = Array.isArray(value2) ? value2.map((v) => this.encodeValue(v, part.operator)).join(",") : this.encodeValue(value2.toString(), part.operator);
|
|
13783
|
-
return `${name}=${encoded2}`;
|
|
13784
|
-
}).filter((pair) => pair.length > 0);
|
|
13785
|
-
if (pairs.length === 0)
|
|
13786
|
-
return "";
|
|
13787
|
-
const separator = part.operator === "?" ? "?" : "&";
|
|
13788
|
-
return separator + pairs.join("&");
|
|
13789
|
-
}
|
|
13790
|
-
if (part.names.length > 1) {
|
|
13791
|
-
const values2 = part.names.map((name) => variables[name]).filter((v) => v !== undefined);
|
|
13792
|
-
if (values2.length === 0)
|
|
13793
|
-
return "";
|
|
13794
|
-
return values2.map((v) => Array.isArray(v) ? v[0] : v).join(",");
|
|
13795
|
-
}
|
|
13796
|
-
const value = variables[part.name];
|
|
13797
|
-
if (value === undefined)
|
|
13798
|
-
return "";
|
|
13799
|
-
const values = Array.isArray(value) ? value : [value];
|
|
13800
|
-
const encoded = values.map((v) => this.encodeValue(v, part.operator));
|
|
13801
|
-
switch (part.operator) {
|
|
13802
|
-
case "":
|
|
13803
|
-
return encoded.join(",");
|
|
13804
|
-
case "+":
|
|
13805
|
-
return encoded.join(",");
|
|
13806
|
-
case "#":
|
|
13807
|
-
return "#" + encoded.join(",");
|
|
13808
|
-
case ".":
|
|
13809
|
-
return "." + encoded.join(".");
|
|
13810
|
-
case "/":
|
|
13811
|
-
return "/" + encoded.join("/");
|
|
13812
|
-
default:
|
|
13813
|
-
return encoded.join(",");
|
|
13814
|
-
}
|
|
13815
|
-
}
|
|
13816
|
-
expand(variables) {
|
|
13817
|
-
let result = "";
|
|
13818
|
-
let hasQueryParam = false;
|
|
13819
|
-
for (const part of this.parts) {
|
|
13820
|
-
if (typeof part === "string") {
|
|
13821
|
-
result += part;
|
|
13822
|
-
continue;
|
|
13823
|
-
}
|
|
13824
|
-
const expanded = this.expandPart(part, variables);
|
|
13825
|
-
if (!expanded)
|
|
13826
|
-
continue;
|
|
13827
|
-
if ((part.operator === "?" || part.operator === "&") && hasQueryParam) {
|
|
13828
|
-
result += expanded.replace("?", "&");
|
|
13829
|
-
} else {
|
|
13830
|
-
result += expanded;
|
|
13831
|
-
}
|
|
13832
|
-
if (part.operator === "?" || part.operator === "&") {
|
|
13833
|
-
hasQueryParam = true;
|
|
13834
|
-
}
|
|
13835
|
-
}
|
|
13836
|
-
return result;
|
|
13837
|
-
}
|
|
13838
|
-
escapeRegExp(str) {
|
|
13839
|
-
return str.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
13840
|
-
}
|
|
13841
|
-
partToRegExp(part) {
|
|
13842
|
-
const patterns = [];
|
|
13843
|
-
for (const name2 of part.names) {
|
|
13844
|
-
UriTemplate.validateLength(name2, MAX_VARIABLE_LENGTH, "Variable name");
|
|
13845
|
-
}
|
|
13846
|
-
if (part.operator === "?" || part.operator === "&") {
|
|
13847
|
-
for (let i = 0;i < part.names.length; i++) {
|
|
13848
|
-
const name2 = part.names[i];
|
|
13849
|
-
const prefix = i === 0 ? "\\" + part.operator : "&";
|
|
13850
|
-
patterns.push({
|
|
13851
|
-
pattern: prefix + this.escapeRegExp(name2) + "=([^&]+)",
|
|
13852
|
-
name: name2
|
|
13853
|
-
});
|
|
13854
|
-
}
|
|
13855
|
-
return patterns;
|
|
13856
|
-
}
|
|
13857
|
-
let pattern;
|
|
13858
|
-
const name = part.name;
|
|
13859
|
-
switch (part.operator) {
|
|
13860
|
-
case "":
|
|
13861
|
-
pattern = part.exploded ? "([^/,]+(?:,[^/,]+)*)" : "([^/,]+)";
|
|
13862
|
-
break;
|
|
13863
|
-
case "+":
|
|
13864
|
-
case "#":
|
|
13865
|
-
pattern = "(.+)";
|
|
13866
|
-
break;
|
|
13867
|
-
case ".":
|
|
13868
|
-
pattern = "\\.([^/,]+)";
|
|
13869
|
-
break;
|
|
13870
|
-
case "/":
|
|
13871
|
-
pattern = "/" + (part.exploded ? "([^/,]+(?:,[^/,]+)*)" : "([^/,]+)");
|
|
13872
|
-
break;
|
|
13873
|
-
default:
|
|
13874
|
-
pattern = "([^/]+)";
|
|
13875
|
-
}
|
|
13876
|
-
patterns.push({ pattern, name });
|
|
13877
|
-
return patterns;
|
|
13878
|
-
}
|
|
13879
|
-
match(uri) {
|
|
13880
|
-
UriTemplate.validateLength(uri, MAX_TEMPLATE_LENGTH, "URI");
|
|
13881
|
-
let pattern = "^";
|
|
13882
|
-
const names = [];
|
|
13883
|
-
for (const part of this.parts) {
|
|
13884
|
-
if (typeof part === "string") {
|
|
13885
|
-
pattern += this.escapeRegExp(part);
|
|
13886
|
-
} else {
|
|
13887
|
-
const patterns = this.partToRegExp(part);
|
|
13888
|
-
for (const { pattern: partPattern, name } of patterns) {
|
|
13889
|
-
pattern += partPattern;
|
|
13890
|
-
names.push({ name, exploded: part.exploded });
|
|
13891
|
-
}
|
|
13892
|
-
}
|
|
13893
|
-
}
|
|
13894
|
-
pattern += "$";
|
|
13895
|
-
UriTemplate.validateLength(pattern, MAX_REGEX_LENGTH, "Generated regex pattern");
|
|
13896
|
-
const regex = new RegExp(pattern);
|
|
13897
|
-
const match = uri.match(regex);
|
|
13898
|
-
if (!match)
|
|
13899
|
-
return null;
|
|
13900
|
-
const result = {};
|
|
13901
|
-
for (let i = 0;i < names.length; i++) {
|
|
13902
|
-
const { name, exploded } = names[i];
|
|
13903
|
-
const value = match[i + 1];
|
|
13904
|
-
const cleanName = name.replace("*", "");
|
|
13905
|
-
if (exploded && value.includes(",")) {
|
|
13906
|
-
result[cleanName] = value.split(",");
|
|
13907
|
-
} else {
|
|
13908
|
-
result[cleanName] = value;
|
|
13909
|
-
}
|
|
13910
|
-
}
|
|
13911
|
-
return result;
|
|
13912
|
-
}
|
|
13913
|
-
}
|
|
13914
|
-
|
|
13915
13696
|
// ../../node_modules/@modelcontextprotocol/sdk/dist/esm/shared/toolNameValidation.js
|
|
13916
13697
|
var TOOL_NAME_REGEX = /^[A-Za-z0-9._-]{1,128}$/;
|
|
13917
13698
|
function validateToolName(name) {
|
|
@@ -14676,22 +14457,6 @@ class McpServer {
|
|
|
14676
14457
|
}
|
|
14677
14458
|
}
|
|
14678
14459
|
}
|
|
14679
|
-
|
|
14680
|
-
class ResourceTemplate {
|
|
14681
|
-
constructor(uriTemplate, _callbacks) {
|
|
14682
|
-
this._callbacks = _callbacks;
|
|
14683
|
-
this._uriTemplate = typeof uriTemplate === "string" ? new UriTemplate(uriTemplate) : uriTemplate;
|
|
14684
|
-
}
|
|
14685
|
-
get uriTemplate() {
|
|
14686
|
-
return this._uriTemplate;
|
|
14687
|
-
}
|
|
14688
|
-
get listCallback() {
|
|
14689
|
-
return this._callbacks.list;
|
|
14690
|
-
}
|
|
14691
|
-
completeCallback(variable) {
|
|
14692
|
-
return this._callbacks.complete?.[variable];
|
|
14693
|
-
}
|
|
14694
|
-
}
|
|
14695
14460
|
var EMPTY_OBJECT_JSON_SCHEMA = {
|
|
14696
14461
|
type: "object",
|
|
14697
14462
|
properties: {}
|
|
@@ -14768,8 +14533,7 @@ var EMPTY_COMPLETION_RESULT = {
|
|
|
14768
14533
|
}
|
|
14769
14534
|
};
|
|
14770
14535
|
export {
|
|
14771
|
-
McpServer
|
|
14772
|
-
ResourceTemplate
|
|
14536
|
+
McpServer
|
|
14773
14537
|
};
|
|
14774
14538
|
|
|
14775
|
-
//# debugId=
|
|
14539
|
+
//# debugId=CFED1285070EAF8F64756E2164756E21
|