@modelcontextprotocol/server 2.0.0-alpha.3 → 2.0.0-alpha.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -2
- package/dist/{ajvProvider-Birb50r-.mjs → ajvProvider-BQMcjynJ.mjs} +952 -154
- package/dist/ajvProvider-BQMcjynJ.mjs.map +1 -0
- package/dist/{ajvProvider-DZ_siXcF.d.mts → ajvProvider-Dzgk80kq.d.mts} +58 -11
- package/dist/ajvProvider-Dzgk80kq.d.mts.map +1 -0
- package/dist/{cfWorkerProvider-BrJKpSFH.mjs → cfWorkerProvider-BDC2rVl3.mjs} +21 -5
- package/dist/cfWorkerProvider-BDC2rVl3.mjs.map +1 -0
- package/dist/{cfWorkerProvider-DUhk5Ewx.d.mts → cfWorkerProvider-DmvjVsvQ.d.mts} +13 -6
- package/dist/cfWorkerProvider-DmvjVsvQ.d.mts.map +1 -0
- package/dist/{transport-DMKhEchd.d.mts → createMcpHandler-Du3hjXvf.d.mts} +5283 -1559
- package/dist/createMcpHandler-Du3hjXvf.d.mts.map +1 -0
- package/dist/index.d.mts +167 -2015
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +1238 -1281
- package/dist/index.mjs.map +1 -1
- package/dist/mcp-JttQJlI9.mjs +9998 -0
- package/dist/mcp-JttQJlI9.mjs.map +1 -0
- package/dist/shimsNode.d.mts +1 -1
- package/dist/shimsNode.mjs +1 -1
- package/dist/shimsWorkerd.d.mts +1 -1
- package/dist/shimsWorkerd.mjs +1 -1
- package/dist/stdio.d.mts +61 -3
- package/dist/stdio.d.mts.map +1 -1
- package/dist/stdio.mjs +457 -2
- package/dist/stdio.mjs.map +1 -1
- package/dist/types-DBYdVs-n.d.mts +1099 -0
- package/dist/types-DBYdVs-n.d.mts.map +1 -0
- package/dist/validators/ajv.d.mts +1 -1
- package/dist/validators/ajv.mjs +1 -1
- package/dist/validators/cfWorker.d.mts +1 -1
- package/dist/validators/cfWorker.mjs +1 -1
- package/package.json +3 -6
- package/dist/ajvProvider-Birb50r-.mjs.map +0 -1
- package/dist/ajvProvider-DZ_siXcF.d.mts.map +0 -1
- package/dist/cfWorkerProvider-BrJKpSFH.mjs.map +0 -1
- package/dist/cfWorkerProvider-DUhk5Ewx.d.mts.map +0 -1
- package/dist/src-Pa1iAvsj.mjs +0 -3386
- package/dist/src-Pa1iAvsj.mjs.map +0 -1
- package/dist/transport-DMKhEchd.d.mts.map +0 -1
- package/dist/types-R2RTIcjk.d.mts +0 -66
- package/dist/types-R2RTIcjk.d.mts.map +0 -1
|
@@ -3448,7 +3448,7 @@ var require_uri = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
3448
3448
|
|
|
3449
3449
|
//#endregion
|
|
3450
3450
|
//#region ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/core.js
|
|
3451
|
-
var require_core$
|
|
3451
|
+
var require_core$2 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
3452
3452
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3453
3453
|
exports.CodeGen = exports.Name = exports.nil = exports.stringify = exports.str = exports._ = exports.KeywordCxt = void 0;
|
|
3454
3454
|
var validate_1 = require_validate();
|
|
@@ -4135,7 +4135,7 @@ var require_ref = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
4135
4135
|
|
|
4136
4136
|
//#endregion
|
|
4137
4137
|
//#region ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/core/index.js
|
|
4138
|
-
var require_core = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
4138
|
+
var require_core$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
4139
4139
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4140
4140
|
const id_1 = require_id();
|
|
4141
4141
|
const ref_1 = require_ref();
|
|
@@ -4572,7 +4572,7 @@ var require_enum = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
4572
4572
|
|
|
4573
4573
|
//#endregion
|
|
4574
4574
|
//#region ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/validation/index.js
|
|
4575
|
-
var require_validation = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
4575
|
+
var require_validation$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
4576
4576
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4577
4577
|
const limitNumber_1 = require_limitNumber();
|
|
4578
4578
|
const multipleOf_1 = require_multipleOf();
|
|
@@ -5352,7 +5352,7 @@ var require_thenElse = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
5352
5352
|
|
|
5353
5353
|
//#endregion
|
|
5354
5354
|
//#region ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/index.js
|
|
5355
|
-
var require_applicator = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
5355
|
+
var require_applicator$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
5356
5356
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5357
5357
|
const additionalItems_1 = require_additionalItems();
|
|
5358
5358
|
const prefixItems_1 = require_prefixItems();
|
|
@@ -5392,6 +5392,301 @@ var require_applicator = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
5392
5392
|
exports.default = getApplicator;
|
|
5393
5393
|
}));
|
|
5394
5394
|
|
|
5395
|
+
//#endregion
|
|
5396
|
+
//#region ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/dynamic/dynamicAnchor.js
|
|
5397
|
+
var require_dynamicAnchor = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
5398
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5399
|
+
exports.dynamicAnchor = void 0;
|
|
5400
|
+
const codegen_1 = require_codegen();
|
|
5401
|
+
const names_1 = require_names();
|
|
5402
|
+
const compile_1 = require_compile();
|
|
5403
|
+
const ref_1 = require_ref();
|
|
5404
|
+
const def = {
|
|
5405
|
+
keyword: "$dynamicAnchor",
|
|
5406
|
+
schemaType: "string",
|
|
5407
|
+
code: (cxt) => dynamicAnchor(cxt, cxt.schema)
|
|
5408
|
+
};
|
|
5409
|
+
function dynamicAnchor(cxt, anchor) {
|
|
5410
|
+
const { gen, it } = cxt;
|
|
5411
|
+
it.schemaEnv.root.dynamicAnchors[anchor] = true;
|
|
5412
|
+
const v = (0, codegen_1._)`${names_1.default.dynamicAnchors}${(0, codegen_1.getProperty)(anchor)}`;
|
|
5413
|
+
const validate = it.errSchemaPath === "#" ? it.validateName : _getValidate(cxt);
|
|
5414
|
+
gen.if((0, codegen_1._)`!${v}`, () => gen.assign(v, validate));
|
|
5415
|
+
}
|
|
5416
|
+
exports.dynamicAnchor = dynamicAnchor;
|
|
5417
|
+
function _getValidate(cxt) {
|
|
5418
|
+
const { schemaEnv, schema, self } = cxt.it;
|
|
5419
|
+
const { root, baseId, localRefs, meta } = schemaEnv.root;
|
|
5420
|
+
const { schemaId } = self.opts;
|
|
5421
|
+
const sch = new compile_1.SchemaEnv({
|
|
5422
|
+
schema,
|
|
5423
|
+
schemaId,
|
|
5424
|
+
root,
|
|
5425
|
+
baseId,
|
|
5426
|
+
localRefs,
|
|
5427
|
+
meta
|
|
5428
|
+
});
|
|
5429
|
+
compile_1.compileSchema.call(self, sch);
|
|
5430
|
+
return (0, ref_1.getValidate)(cxt, sch);
|
|
5431
|
+
}
|
|
5432
|
+
exports.default = def;
|
|
5433
|
+
}));
|
|
5434
|
+
|
|
5435
|
+
//#endregion
|
|
5436
|
+
//#region ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/dynamic/dynamicRef.js
|
|
5437
|
+
var require_dynamicRef = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
5438
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5439
|
+
exports.dynamicRef = void 0;
|
|
5440
|
+
const codegen_1 = require_codegen();
|
|
5441
|
+
const names_1 = require_names();
|
|
5442
|
+
const ref_1 = require_ref();
|
|
5443
|
+
const def = {
|
|
5444
|
+
keyword: "$dynamicRef",
|
|
5445
|
+
schemaType: "string",
|
|
5446
|
+
code: (cxt) => dynamicRef(cxt, cxt.schema)
|
|
5447
|
+
};
|
|
5448
|
+
function dynamicRef(cxt, ref) {
|
|
5449
|
+
const { gen, keyword, it } = cxt;
|
|
5450
|
+
if (ref[0] !== "#") throw new Error(`"${keyword}" only supports hash fragment reference`);
|
|
5451
|
+
const anchor = ref.slice(1);
|
|
5452
|
+
if (it.allErrors) _dynamicRef();
|
|
5453
|
+
else {
|
|
5454
|
+
const valid = gen.let("valid", false);
|
|
5455
|
+
_dynamicRef(valid);
|
|
5456
|
+
cxt.ok(valid);
|
|
5457
|
+
}
|
|
5458
|
+
function _dynamicRef(valid) {
|
|
5459
|
+
if (it.schemaEnv.root.dynamicAnchors[anchor]) {
|
|
5460
|
+
const v = gen.let("_v", (0, codegen_1._)`${names_1.default.dynamicAnchors}${(0, codegen_1.getProperty)(anchor)}`);
|
|
5461
|
+
gen.if(v, _callRef(v, valid), _callRef(it.validateName, valid));
|
|
5462
|
+
} else _callRef(it.validateName, valid)();
|
|
5463
|
+
}
|
|
5464
|
+
function _callRef(validate, valid) {
|
|
5465
|
+
return valid ? () => gen.block(() => {
|
|
5466
|
+
(0, ref_1.callRef)(cxt, validate);
|
|
5467
|
+
gen.let(valid, true);
|
|
5468
|
+
}) : () => (0, ref_1.callRef)(cxt, validate);
|
|
5469
|
+
}
|
|
5470
|
+
}
|
|
5471
|
+
exports.dynamicRef = dynamicRef;
|
|
5472
|
+
exports.default = def;
|
|
5473
|
+
}));
|
|
5474
|
+
|
|
5475
|
+
//#endregion
|
|
5476
|
+
//#region ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/dynamic/recursiveAnchor.js
|
|
5477
|
+
var require_recursiveAnchor = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
5478
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5479
|
+
const dynamicAnchor_1 = require_dynamicAnchor();
|
|
5480
|
+
const util_1 = require_util();
|
|
5481
|
+
const def = {
|
|
5482
|
+
keyword: "$recursiveAnchor",
|
|
5483
|
+
schemaType: "boolean",
|
|
5484
|
+
code(cxt) {
|
|
5485
|
+
if (cxt.schema) (0, dynamicAnchor_1.dynamicAnchor)(cxt, "");
|
|
5486
|
+
else (0, util_1.checkStrictMode)(cxt.it, "$recursiveAnchor: false is ignored");
|
|
5487
|
+
}
|
|
5488
|
+
};
|
|
5489
|
+
exports.default = def;
|
|
5490
|
+
}));
|
|
5491
|
+
|
|
5492
|
+
//#endregion
|
|
5493
|
+
//#region ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/dynamic/recursiveRef.js
|
|
5494
|
+
var require_recursiveRef = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
5495
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5496
|
+
const dynamicRef_1 = require_dynamicRef();
|
|
5497
|
+
const def = {
|
|
5498
|
+
keyword: "$recursiveRef",
|
|
5499
|
+
schemaType: "string",
|
|
5500
|
+
code: (cxt) => (0, dynamicRef_1.dynamicRef)(cxt, cxt.schema)
|
|
5501
|
+
};
|
|
5502
|
+
exports.default = def;
|
|
5503
|
+
}));
|
|
5504
|
+
|
|
5505
|
+
//#endregion
|
|
5506
|
+
//#region ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/dynamic/index.js
|
|
5507
|
+
var require_dynamic = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
5508
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5509
|
+
const dynamicAnchor_1 = require_dynamicAnchor();
|
|
5510
|
+
const dynamicRef_1 = require_dynamicRef();
|
|
5511
|
+
const recursiveAnchor_1 = require_recursiveAnchor();
|
|
5512
|
+
const recursiveRef_1 = require_recursiveRef();
|
|
5513
|
+
const dynamic = [
|
|
5514
|
+
dynamicAnchor_1.default,
|
|
5515
|
+
dynamicRef_1.default,
|
|
5516
|
+
recursiveAnchor_1.default,
|
|
5517
|
+
recursiveRef_1.default
|
|
5518
|
+
];
|
|
5519
|
+
exports.default = dynamic;
|
|
5520
|
+
}));
|
|
5521
|
+
|
|
5522
|
+
//#endregion
|
|
5523
|
+
//#region ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/validation/dependentRequired.js
|
|
5524
|
+
var require_dependentRequired = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
5525
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5526
|
+
const dependencies_1 = require_dependencies();
|
|
5527
|
+
const def = {
|
|
5528
|
+
keyword: "dependentRequired",
|
|
5529
|
+
type: "object",
|
|
5530
|
+
schemaType: "object",
|
|
5531
|
+
error: dependencies_1.error,
|
|
5532
|
+
code: (cxt) => (0, dependencies_1.validatePropertyDeps)(cxt)
|
|
5533
|
+
};
|
|
5534
|
+
exports.default = def;
|
|
5535
|
+
}));
|
|
5536
|
+
|
|
5537
|
+
//#endregion
|
|
5538
|
+
//#region ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/dependentSchemas.js
|
|
5539
|
+
var require_dependentSchemas = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
5540
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5541
|
+
const dependencies_1 = require_dependencies();
|
|
5542
|
+
const def = {
|
|
5543
|
+
keyword: "dependentSchemas",
|
|
5544
|
+
type: "object",
|
|
5545
|
+
schemaType: "object",
|
|
5546
|
+
code: (cxt) => (0, dependencies_1.validateSchemaDeps)(cxt)
|
|
5547
|
+
};
|
|
5548
|
+
exports.default = def;
|
|
5549
|
+
}));
|
|
5550
|
+
|
|
5551
|
+
//#endregion
|
|
5552
|
+
//#region ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/validation/limitContains.js
|
|
5553
|
+
var require_limitContains = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
5554
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5555
|
+
const util_1 = require_util();
|
|
5556
|
+
const def = {
|
|
5557
|
+
keyword: ["maxContains", "minContains"],
|
|
5558
|
+
type: "array",
|
|
5559
|
+
schemaType: "number",
|
|
5560
|
+
code({ keyword, parentSchema, it }) {
|
|
5561
|
+
if (parentSchema.contains === void 0) (0, util_1.checkStrictMode)(it, `"${keyword}" without "contains" is ignored`);
|
|
5562
|
+
}
|
|
5563
|
+
};
|
|
5564
|
+
exports.default = def;
|
|
5565
|
+
}));
|
|
5566
|
+
|
|
5567
|
+
//#endregion
|
|
5568
|
+
//#region ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/next.js
|
|
5569
|
+
var require_next = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
5570
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5571
|
+
const dependentRequired_1 = require_dependentRequired();
|
|
5572
|
+
const dependentSchemas_1 = require_dependentSchemas();
|
|
5573
|
+
const limitContains_1 = require_limitContains();
|
|
5574
|
+
const next = [
|
|
5575
|
+
dependentRequired_1.default,
|
|
5576
|
+
dependentSchemas_1.default,
|
|
5577
|
+
limitContains_1.default
|
|
5578
|
+
];
|
|
5579
|
+
exports.default = next;
|
|
5580
|
+
}));
|
|
5581
|
+
|
|
5582
|
+
//#endregion
|
|
5583
|
+
//#region ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/unevaluated/unevaluatedProperties.js
|
|
5584
|
+
var require_unevaluatedProperties = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
5585
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5586
|
+
const codegen_1 = require_codegen();
|
|
5587
|
+
const util_1 = require_util();
|
|
5588
|
+
const names_1 = require_names();
|
|
5589
|
+
const def = {
|
|
5590
|
+
keyword: "unevaluatedProperties",
|
|
5591
|
+
type: "object",
|
|
5592
|
+
schemaType: ["boolean", "object"],
|
|
5593
|
+
trackErrors: true,
|
|
5594
|
+
error: {
|
|
5595
|
+
message: "must NOT have unevaluated properties",
|
|
5596
|
+
params: ({ params }) => (0, codegen_1._)`{unevaluatedProperty: ${params.unevaluatedProperty}}`
|
|
5597
|
+
},
|
|
5598
|
+
code(cxt) {
|
|
5599
|
+
const { gen, schema, data, errsCount, it } = cxt;
|
|
5600
|
+
/* istanbul ignore if */
|
|
5601
|
+
if (!errsCount) throw new Error("ajv implementation error");
|
|
5602
|
+
const { allErrors, props } = it;
|
|
5603
|
+
if (props instanceof codegen_1.Name) gen.if((0, codegen_1._)`${props} !== true`, () => gen.forIn("key", data, (key) => gen.if(unevaluatedDynamic(props, key), () => unevaluatedPropCode(key))));
|
|
5604
|
+
else if (props !== true) gen.forIn("key", data, (key) => props === void 0 ? unevaluatedPropCode(key) : gen.if(unevaluatedStatic(props, key), () => unevaluatedPropCode(key)));
|
|
5605
|
+
it.props = true;
|
|
5606
|
+
cxt.ok((0, codegen_1._)`${errsCount} === ${names_1.default.errors}`);
|
|
5607
|
+
function unevaluatedPropCode(key) {
|
|
5608
|
+
if (schema === false) {
|
|
5609
|
+
cxt.setParams({ unevaluatedProperty: key });
|
|
5610
|
+
cxt.error();
|
|
5611
|
+
if (!allErrors) gen.break();
|
|
5612
|
+
return;
|
|
5613
|
+
}
|
|
5614
|
+
if (!(0, util_1.alwaysValidSchema)(it, schema)) {
|
|
5615
|
+
const valid = gen.name("valid");
|
|
5616
|
+
cxt.subschema({
|
|
5617
|
+
keyword: "unevaluatedProperties",
|
|
5618
|
+
dataProp: key,
|
|
5619
|
+
dataPropType: util_1.Type.Str
|
|
5620
|
+
}, valid);
|
|
5621
|
+
if (!allErrors) gen.if((0, codegen_1.not)(valid), () => gen.break());
|
|
5622
|
+
}
|
|
5623
|
+
}
|
|
5624
|
+
function unevaluatedDynamic(evaluatedProps, key) {
|
|
5625
|
+
return (0, codegen_1._)`!${evaluatedProps} || !${evaluatedProps}[${key}]`;
|
|
5626
|
+
}
|
|
5627
|
+
function unevaluatedStatic(evaluatedProps, key) {
|
|
5628
|
+
const ps = [];
|
|
5629
|
+
for (const p in evaluatedProps) if (evaluatedProps[p] === true) ps.push((0, codegen_1._)`${key} !== ${p}`);
|
|
5630
|
+
return (0, codegen_1.and)(...ps);
|
|
5631
|
+
}
|
|
5632
|
+
}
|
|
5633
|
+
};
|
|
5634
|
+
exports.default = def;
|
|
5635
|
+
}));
|
|
5636
|
+
|
|
5637
|
+
//#endregion
|
|
5638
|
+
//#region ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/unevaluated/unevaluatedItems.js
|
|
5639
|
+
var require_unevaluatedItems = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
5640
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5641
|
+
const codegen_1 = require_codegen();
|
|
5642
|
+
const util_1 = require_util();
|
|
5643
|
+
const def = {
|
|
5644
|
+
keyword: "unevaluatedItems",
|
|
5645
|
+
type: "array",
|
|
5646
|
+
schemaType: ["boolean", "object"],
|
|
5647
|
+
error: {
|
|
5648
|
+
message: ({ params: { len } }) => (0, codegen_1.str)`must NOT have more than ${len} items`,
|
|
5649
|
+
params: ({ params: { len } }) => (0, codegen_1._)`{limit: ${len}}`
|
|
5650
|
+
},
|
|
5651
|
+
code(cxt) {
|
|
5652
|
+
const { gen, schema, data, it } = cxt;
|
|
5653
|
+
const items = it.items || 0;
|
|
5654
|
+
if (items === true) return;
|
|
5655
|
+
const len = gen.const("len", (0, codegen_1._)`${data}.length`);
|
|
5656
|
+
if (schema === false) {
|
|
5657
|
+
cxt.setParams({ len: items });
|
|
5658
|
+
cxt.fail((0, codegen_1._)`${len} > ${items}`);
|
|
5659
|
+
} else if (typeof schema == "object" && !(0, util_1.alwaysValidSchema)(it, schema)) {
|
|
5660
|
+
const valid = gen.var("valid", (0, codegen_1._)`${len} <= ${items}`);
|
|
5661
|
+
gen.if((0, codegen_1.not)(valid), () => validateItems(valid, items));
|
|
5662
|
+
cxt.ok(valid);
|
|
5663
|
+
}
|
|
5664
|
+
it.items = true;
|
|
5665
|
+
function validateItems(valid, from) {
|
|
5666
|
+
gen.forRange("i", from, len, (i) => {
|
|
5667
|
+
cxt.subschema({
|
|
5668
|
+
keyword: "unevaluatedItems",
|
|
5669
|
+
dataProp: i,
|
|
5670
|
+
dataPropType: util_1.Type.Num
|
|
5671
|
+
}, valid);
|
|
5672
|
+
if (!it.allErrors) gen.if((0, codegen_1.not)(valid), () => gen.break());
|
|
5673
|
+
});
|
|
5674
|
+
}
|
|
5675
|
+
}
|
|
5676
|
+
};
|
|
5677
|
+
exports.default = def;
|
|
5678
|
+
}));
|
|
5679
|
+
|
|
5680
|
+
//#endregion
|
|
5681
|
+
//#region ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/unevaluated/index.js
|
|
5682
|
+
var require_unevaluated$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
5683
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5684
|
+
const unevaluatedProperties_1 = require_unevaluatedProperties();
|
|
5685
|
+
const unevaluatedItems_1 = require_unevaluatedItems();
|
|
5686
|
+
const unevaluated = [unevaluatedProperties_1.default, unevaluatedItems_1.default];
|
|
5687
|
+
exports.default = unevaluated;
|
|
5688
|
+
}));
|
|
5689
|
+
|
|
5395
5690
|
//#endregion
|
|
5396
5691
|
//#region ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/format/format.js
|
|
5397
5692
|
var require_format$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
@@ -5512,23 +5807,29 @@ var require_metadata = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
5512
5807
|
}));
|
|
5513
5808
|
|
|
5514
5809
|
//#endregion
|
|
5515
|
-
//#region ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/
|
|
5516
|
-
var
|
|
5810
|
+
//#region ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/draft2020.js
|
|
5811
|
+
var require_draft2020 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
5517
5812
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5518
|
-
const core_1 = require_core();
|
|
5519
|
-
const validation_1 = require_validation();
|
|
5520
|
-
const applicator_1 = require_applicator();
|
|
5813
|
+
const core_1 = require_core$1();
|
|
5814
|
+
const validation_1 = require_validation$1();
|
|
5815
|
+
const applicator_1 = require_applicator$1();
|
|
5816
|
+
const dynamic_1 = require_dynamic();
|
|
5817
|
+
const next_1 = require_next();
|
|
5818
|
+
const unevaluated_1 = require_unevaluated$1();
|
|
5521
5819
|
const format_1 = require_format();
|
|
5522
5820
|
const metadata_1 = require_metadata();
|
|
5523
|
-
const
|
|
5821
|
+
const draft2020Vocabularies = [
|
|
5822
|
+
dynamic_1.default,
|
|
5524
5823
|
core_1.default,
|
|
5525
5824
|
validation_1.default,
|
|
5526
|
-
(0, applicator_1.default)(),
|
|
5825
|
+
(0, applicator_1.default)(true),
|
|
5527
5826
|
format_1.default,
|
|
5528
5827
|
metadata_1.metadataVocabulary,
|
|
5529
|
-
metadata_1.contentVocabulary
|
|
5828
|
+
metadata_1.contentVocabulary,
|
|
5829
|
+
next_1.default,
|
|
5830
|
+
unevaluated_1.default
|
|
5530
5831
|
];
|
|
5531
|
-
exports.default =
|
|
5832
|
+
exports.default = draft2020Vocabularies;
|
|
5532
5833
|
}));
|
|
5533
5834
|
|
|
5534
5835
|
//#endregion
|
|
@@ -5639,177 +5940,397 @@ var require_discriminator = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
5639
5940
|
}));
|
|
5640
5941
|
|
|
5641
5942
|
//#endregion
|
|
5642
|
-
//#region ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/refs/json-schema-
|
|
5643
|
-
var
|
|
5943
|
+
//#region ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/refs/json-schema-2020-12/schema.json
|
|
5944
|
+
var require_schema = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
5644
5945
|
module.exports = {
|
|
5645
|
-
"$schema": "
|
|
5646
|
-
"$id": "
|
|
5647
|
-
"
|
|
5648
|
-
|
|
5649
|
-
"
|
|
5650
|
-
|
|
5651
|
-
|
|
5652
|
-
|
|
5653
|
-
|
|
5654
|
-
"
|
|
5655
|
-
"type": "integer",
|
|
5656
|
-
"minimum": 0
|
|
5657
|
-
},
|
|
5658
|
-
"nonNegativeIntegerDefault0": { "allOf": [{ "$ref": "#/definitions/nonNegativeInteger" }, { "default": 0 }] },
|
|
5659
|
-
"simpleTypes": { "enum": [
|
|
5660
|
-
"array",
|
|
5661
|
-
"boolean",
|
|
5662
|
-
"integer",
|
|
5663
|
-
"null",
|
|
5664
|
-
"number",
|
|
5665
|
-
"object",
|
|
5666
|
-
"string"
|
|
5667
|
-
] },
|
|
5668
|
-
"stringArray": {
|
|
5669
|
-
"type": "array",
|
|
5670
|
-
"items": { "type": "string" },
|
|
5671
|
-
"uniqueItems": true,
|
|
5672
|
-
"default": []
|
|
5673
|
-
}
|
|
5946
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
5947
|
+
"$id": "https://json-schema.org/draft/2020-12/schema",
|
|
5948
|
+
"$vocabulary": {
|
|
5949
|
+
"https://json-schema.org/draft/2020-12/vocab/core": true,
|
|
5950
|
+
"https://json-schema.org/draft/2020-12/vocab/applicator": true,
|
|
5951
|
+
"https://json-schema.org/draft/2020-12/vocab/unevaluated": true,
|
|
5952
|
+
"https://json-schema.org/draft/2020-12/vocab/validation": true,
|
|
5953
|
+
"https://json-schema.org/draft/2020-12/vocab/meta-data": true,
|
|
5954
|
+
"https://json-schema.org/draft/2020-12/vocab/format-annotation": true,
|
|
5955
|
+
"https://json-schema.org/draft/2020-12/vocab/content": true
|
|
5674
5956
|
},
|
|
5957
|
+
"$dynamicAnchor": "meta",
|
|
5958
|
+
"title": "Core and Validation specifications meta-schema",
|
|
5959
|
+
"allOf": [
|
|
5960
|
+
{ "$ref": "meta/core" },
|
|
5961
|
+
{ "$ref": "meta/applicator" },
|
|
5962
|
+
{ "$ref": "meta/unevaluated" },
|
|
5963
|
+
{ "$ref": "meta/validation" },
|
|
5964
|
+
{ "$ref": "meta/meta-data" },
|
|
5965
|
+
{ "$ref": "meta/format-annotation" },
|
|
5966
|
+
{ "$ref": "meta/content" }
|
|
5967
|
+
],
|
|
5675
5968
|
"type": ["object", "boolean"],
|
|
5969
|
+
"$comment": "This meta-schema also defines keywords that have appeared in previous drafts in order to prevent incompatible extensions as they remain in common use.",
|
|
5676
5970
|
"properties": {
|
|
5677
|
-
"
|
|
5678
|
-
"
|
|
5679
|
-
"
|
|
5971
|
+
"definitions": {
|
|
5972
|
+
"$comment": "\"definitions\" has been replaced by \"$defs\".",
|
|
5973
|
+
"type": "object",
|
|
5974
|
+
"additionalProperties": { "$dynamicRef": "#meta" },
|
|
5975
|
+
"deprecated": true,
|
|
5976
|
+
"default": {}
|
|
5680
5977
|
},
|
|
5681
|
-
"
|
|
5682
|
-
"
|
|
5683
|
-
"
|
|
5978
|
+
"dependencies": {
|
|
5979
|
+
"$comment": "\"dependencies\" has been split and replaced by \"dependentSchemas\" and \"dependentRequired\" in order to serve their differing semantics.",
|
|
5980
|
+
"type": "object",
|
|
5981
|
+
"additionalProperties": { "anyOf": [{ "$dynamicRef": "#meta" }, { "$ref": "meta/validation#/$defs/stringArray" }] },
|
|
5982
|
+
"deprecated": true,
|
|
5983
|
+
"default": {}
|
|
5684
5984
|
},
|
|
5685
|
-
"$
|
|
5686
|
-
"
|
|
5687
|
-
"
|
|
5985
|
+
"$recursiveAnchor": {
|
|
5986
|
+
"$comment": "\"$recursiveAnchor\" has been replaced by \"$dynamicAnchor\".",
|
|
5987
|
+
"$ref": "meta/core#/$defs/anchorString",
|
|
5988
|
+
"deprecated": true
|
|
5688
5989
|
},
|
|
5689
|
-
"$
|
|
5690
|
-
|
|
5691
|
-
|
|
5692
|
-
|
|
5693
|
-
|
|
5694
|
-
|
|
5695
|
-
|
|
5990
|
+
"$recursiveRef": {
|
|
5991
|
+
"$comment": "\"$recursiveRef\" has been replaced by \"$dynamicRef\".",
|
|
5992
|
+
"$ref": "meta/core#/$defs/uriReferenceString",
|
|
5993
|
+
"deprecated": true
|
|
5994
|
+
}
|
|
5995
|
+
}
|
|
5996
|
+
};
|
|
5997
|
+
}));
|
|
5998
|
+
|
|
5999
|
+
//#endregion
|
|
6000
|
+
//#region ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/refs/json-schema-2020-12/meta/applicator.json
|
|
6001
|
+
var require_applicator = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
6002
|
+
module.exports = {
|
|
6003
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
6004
|
+
"$id": "https://json-schema.org/draft/2020-12/meta/applicator",
|
|
6005
|
+
"$vocabulary": { "https://json-schema.org/draft/2020-12/vocab/applicator": true },
|
|
6006
|
+
"$dynamicAnchor": "meta",
|
|
6007
|
+
"title": "Applicator vocabulary meta-schema",
|
|
6008
|
+
"type": ["object", "boolean"],
|
|
6009
|
+
"properties": {
|
|
6010
|
+
"prefixItems": { "$ref": "#/$defs/schemaArray" },
|
|
6011
|
+
"items": { "$dynamicRef": "#meta" },
|
|
6012
|
+
"contains": { "$dynamicRef": "#meta" },
|
|
6013
|
+
"additionalProperties": { "$dynamicRef": "#meta" },
|
|
6014
|
+
"properties": {
|
|
6015
|
+
"type": "object",
|
|
6016
|
+
"additionalProperties": { "$dynamicRef": "#meta" },
|
|
6017
|
+
"default": {}
|
|
5696
6018
|
},
|
|
5697
|
-
"
|
|
5698
|
-
"type": "
|
|
5699
|
-
"
|
|
6019
|
+
"patternProperties": {
|
|
6020
|
+
"type": "object",
|
|
6021
|
+
"additionalProperties": { "$dynamicRef": "#meta" },
|
|
6022
|
+
"propertyNames": { "format": "regex" },
|
|
6023
|
+
"default": {}
|
|
5700
6024
|
},
|
|
5701
|
-
"
|
|
5702
|
-
"type": "
|
|
5703
|
-
"
|
|
6025
|
+
"dependentSchemas": {
|
|
6026
|
+
"type": "object",
|
|
6027
|
+
"additionalProperties": { "$dynamicRef": "#meta" },
|
|
6028
|
+
"default": {}
|
|
5704
6029
|
},
|
|
5705
|
-
"
|
|
5706
|
-
"
|
|
5707
|
-
"
|
|
5708
|
-
"
|
|
5709
|
-
"
|
|
5710
|
-
"
|
|
5711
|
-
"
|
|
5712
|
-
|
|
5713
|
-
|
|
5714
|
-
|
|
5715
|
-
"
|
|
5716
|
-
"
|
|
5717
|
-
|
|
5718
|
-
|
|
5719
|
-
|
|
5720
|
-
|
|
5721
|
-
|
|
5722
|
-
|
|
5723
|
-
|
|
5724
|
-
|
|
6030
|
+
"propertyNames": { "$dynamicRef": "#meta" },
|
|
6031
|
+
"if": { "$dynamicRef": "#meta" },
|
|
6032
|
+
"then": { "$dynamicRef": "#meta" },
|
|
6033
|
+
"else": { "$dynamicRef": "#meta" },
|
|
6034
|
+
"allOf": { "$ref": "#/$defs/schemaArray" },
|
|
6035
|
+
"anyOf": { "$ref": "#/$defs/schemaArray" },
|
|
6036
|
+
"oneOf": { "$ref": "#/$defs/schemaArray" },
|
|
6037
|
+
"not": { "$dynamicRef": "#meta" }
|
|
6038
|
+
},
|
|
6039
|
+
"$defs": { "schemaArray": {
|
|
6040
|
+
"type": "array",
|
|
6041
|
+
"minItems": 1,
|
|
6042
|
+
"items": { "$dynamicRef": "#meta" }
|
|
6043
|
+
} }
|
|
6044
|
+
};
|
|
6045
|
+
}));
|
|
6046
|
+
|
|
6047
|
+
//#endregion
|
|
6048
|
+
//#region ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/refs/json-schema-2020-12/meta/unevaluated.json
|
|
6049
|
+
var require_unevaluated = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
6050
|
+
module.exports = {
|
|
6051
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
6052
|
+
"$id": "https://json-schema.org/draft/2020-12/meta/unevaluated",
|
|
6053
|
+
"$vocabulary": { "https://json-schema.org/draft/2020-12/vocab/unevaluated": true },
|
|
6054
|
+
"$dynamicAnchor": "meta",
|
|
6055
|
+
"title": "Unevaluated applicator vocabulary meta-schema",
|
|
6056
|
+
"type": ["object", "boolean"],
|
|
6057
|
+
"properties": {
|
|
6058
|
+
"unevaluatedItems": { "$dynamicRef": "#meta" },
|
|
6059
|
+
"unevaluatedProperties": { "$dynamicRef": "#meta" }
|
|
6060
|
+
}
|
|
6061
|
+
};
|
|
6062
|
+
}));
|
|
6063
|
+
|
|
6064
|
+
//#endregion
|
|
6065
|
+
//#region ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/refs/json-schema-2020-12/meta/content.json
|
|
6066
|
+
var require_content = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
6067
|
+
module.exports = {
|
|
6068
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
6069
|
+
"$id": "https://json-schema.org/draft/2020-12/meta/content",
|
|
6070
|
+
"$vocabulary": { "https://json-schema.org/draft/2020-12/vocab/content": true },
|
|
6071
|
+
"$dynamicAnchor": "meta",
|
|
6072
|
+
"title": "Content vocabulary meta-schema",
|
|
6073
|
+
"type": ["object", "boolean"],
|
|
6074
|
+
"properties": {
|
|
6075
|
+
"contentEncoding": { "type": "string" },
|
|
6076
|
+
"contentMediaType": { "type": "string" },
|
|
6077
|
+
"contentSchema": { "$dynamicRef": "#meta" }
|
|
6078
|
+
}
|
|
6079
|
+
};
|
|
6080
|
+
}));
|
|
6081
|
+
|
|
6082
|
+
//#endregion
|
|
6083
|
+
//#region ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/refs/json-schema-2020-12/meta/core.json
|
|
6084
|
+
var require_core = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
6085
|
+
module.exports = {
|
|
6086
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
6087
|
+
"$id": "https://json-schema.org/draft/2020-12/meta/core",
|
|
6088
|
+
"$vocabulary": { "https://json-schema.org/draft/2020-12/vocab/core": true },
|
|
6089
|
+
"$dynamicAnchor": "meta",
|
|
6090
|
+
"title": "Core vocabulary meta-schema",
|
|
6091
|
+
"type": ["object", "boolean"],
|
|
6092
|
+
"properties": {
|
|
6093
|
+
"$id": {
|
|
6094
|
+
"$ref": "#/$defs/uriReferenceString",
|
|
6095
|
+
"$comment": "Non-empty fragments not allowed.",
|
|
6096
|
+
"pattern": "^[^#]*#?$"
|
|
5725
6097
|
},
|
|
5726
|
-
"
|
|
5727
|
-
"
|
|
5728
|
-
"
|
|
5729
|
-
"
|
|
5730
|
-
"
|
|
5731
|
-
"
|
|
6098
|
+
"$schema": { "$ref": "#/$defs/uriString" },
|
|
6099
|
+
"$ref": { "$ref": "#/$defs/uriReferenceString" },
|
|
6100
|
+
"$anchor": { "$ref": "#/$defs/anchorString" },
|
|
6101
|
+
"$dynamicRef": { "$ref": "#/$defs/uriReferenceString" },
|
|
6102
|
+
"$dynamicAnchor": { "$ref": "#/$defs/anchorString" },
|
|
6103
|
+
"$vocabulary": {
|
|
5732
6104
|
"type": "object",
|
|
5733
|
-
"
|
|
5734
|
-
"
|
|
6105
|
+
"propertyNames": { "$ref": "#/$defs/uriString" },
|
|
6106
|
+
"additionalProperties": { "type": "boolean" }
|
|
5735
6107
|
},
|
|
5736
|
-
"
|
|
6108
|
+
"$comment": { "type": "string" },
|
|
6109
|
+
"$defs": {
|
|
5737
6110
|
"type": "object",
|
|
5738
|
-
"additionalProperties": { "$
|
|
5739
|
-
|
|
6111
|
+
"additionalProperties": { "$dynamicRef": "#meta" }
|
|
6112
|
+
}
|
|
6113
|
+
},
|
|
6114
|
+
"$defs": {
|
|
6115
|
+
"anchorString": {
|
|
6116
|
+
"type": "string",
|
|
6117
|
+
"pattern": "^[A-Za-z_][-A-Za-z0-9._]*$"
|
|
5740
6118
|
},
|
|
5741
|
-
"
|
|
5742
|
-
"type": "
|
|
5743
|
-
"
|
|
5744
|
-
"propertyNames": { "format": "regex" },
|
|
5745
|
-
"default": {}
|
|
6119
|
+
"uriString": {
|
|
6120
|
+
"type": "string",
|
|
6121
|
+
"format": "uri"
|
|
5746
6122
|
},
|
|
5747
|
-
"
|
|
5748
|
-
"type": "
|
|
5749
|
-
"
|
|
6123
|
+
"uriReferenceString": {
|
|
6124
|
+
"type": "string",
|
|
6125
|
+
"format": "uri-reference"
|
|
6126
|
+
}
|
|
6127
|
+
}
|
|
6128
|
+
};
|
|
6129
|
+
}));
|
|
6130
|
+
|
|
6131
|
+
//#endregion
|
|
6132
|
+
//#region ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/refs/json-schema-2020-12/meta/format-annotation.json
|
|
6133
|
+
var require_format_annotation = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
6134
|
+
module.exports = {
|
|
6135
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
6136
|
+
"$id": "https://json-schema.org/draft/2020-12/meta/format-annotation",
|
|
6137
|
+
"$vocabulary": { "https://json-schema.org/draft/2020-12/vocab/format-annotation": true },
|
|
6138
|
+
"$dynamicAnchor": "meta",
|
|
6139
|
+
"title": "Format vocabulary meta-schema for annotation results",
|
|
6140
|
+
"type": ["object", "boolean"],
|
|
6141
|
+
"properties": { "format": { "type": "string" } }
|
|
6142
|
+
};
|
|
6143
|
+
}));
|
|
6144
|
+
|
|
6145
|
+
//#endregion
|
|
6146
|
+
//#region ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/refs/json-schema-2020-12/meta/meta-data.json
|
|
6147
|
+
var require_meta_data = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
6148
|
+
module.exports = {
|
|
6149
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
6150
|
+
"$id": "https://json-schema.org/draft/2020-12/meta/meta-data",
|
|
6151
|
+
"$vocabulary": { "https://json-schema.org/draft/2020-12/vocab/meta-data": true },
|
|
6152
|
+
"$dynamicAnchor": "meta",
|
|
6153
|
+
"title": "Meta-data vocabulary meta-schema",
|
|
6154
|
+
"type": ["object", "boolean"],
|
|
6155
|
+
"properties": {
|
|
6156
|
+
"title": { "type": "string" },
|
|
6157
|
+
"description": { "type": "string" },
|
|
6158
|
+
"default": true,
|
|
6159
|
+
"deprecated": {
|
|
6160
|
+
"type": "boolean",
|
|
6161
|
+
"default": false
|
|
5750
6162
|
},
|
|
5751
|
-
"
|
|
5752
|
-
|
|
5753
|
-
|
|
5754
|
-
"type": "array",
|
|
5755
|
-
"items": true,
|
|
5756
|
-
"minItems": 1,
|
|
5757
|
-
"uniqueItems": true
|
|
6163
|
+
"readOnly": {
|
|
6164
|
+
"type": "boolean",
|
|
6165
|
+
"default": false
|
|
5758
6166
|
},
|
|
5759
|
-
"
|
|
6167
|
+
"writeOnly": {
|
|
6168
|
+
"type": "boolean",
|
|
6169
|
+
"default": false
|
|
6170
|
+
},
|
|
6171
|
+
"examples": {
|
|
5760
6172
|
"type": "array",
|
|
5761
|
-
"items":
|
|
6173
|
+
"items": true
|
|
6174
|
+
}
|
|
6175
|
+
}
|
|
6176
|
+
};
|
|
6177
|
+
}));
|
|
6178
|
+
|
|
6179
|
+
//#endregion
|
|
6180
|
+
//#region ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/refs/json-schema-2020-12/meta/validation.json
|
|
6181
|
+
var require_validation = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
6182
|
+
module.exports = {
|
|
6183
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
6184
|
+
"$id": "https://json-schema.org/draft/2020-12/meta/validation",
|
|
6185
|
+
"$vocabulary": { "https://json-schema.org/draft/2020-12/vocab/validation": true },
|
|
6186
|
+
"$dynamicAnchor": "meta",
|
|
6187
|
+
"title": "Validation vocabulary meta-schema",
|
|
6188
|
+
"type": ["object", "boolean"],
|
|
6189
|
+
"properties": {
|
|
6190
|
+
"type": { "anyOf": [{ "$ref": "#/$defs/simpleTypes" }, {
|
|
6191
|
+
"type": "array",
|
|
6192
|
+
"items": { "$ref": "#/$defs/simpleTypes" },
|
|
5762
6193
|
"minItems": 1,
|
|
5763
6194
|
"uniqueItems": true
|
|
5764
6195
|
}] },
|
|
5765
|
-
"
|
|
5766
|
-
"
|
|
5767
|
-
|
|
5768
|
-
|
|
5769
|
-
|
|
5770
|
-
"
|
|
5771
|
-
|
|
5772
|
-
|
|
5773
|
-
|
|
5774
|
-
"
|
|
6196
|
+
"const": true,
|
|
6197
|
+
"enum": {
|
|
6198
|
+
"type": "array",
|
|
6199
|
+
"items": true
|
|
6200
|
+
},
|
|
6201
|
+
"multipleOf": {
|
|
6202
|
+
"type": "number",
|
|
6203
|
+
"exclusiveMinimum": 0
|
|
6204
|
+
},
|
|
6205
|
+
"maximum": { "type": "number" },
|
|
6206
|
+
"exclusiveMaximum": { "type": "number" },
|
|
6207
|
+
"minimum": { "type": "number" },
|
|
6208
|
+
"exclusiveMinimum": { "type": "number" },
|
|
6209
|
+
"maxLength": { "$ref": "#/$defs/nonNegativeInteger" },
|
|
6210
|
+
"minLength": { "$ref": "#/$defs/nonNegativeIntegerDefault0" },
|
|
6211
|
+
"pattern": {
|
|
6212
|
+
"type": "string",
|
|
6213
|
+
"format": "regex"
|
|
6214
|
+
},
|
|
6215
|
+
"maxItems": { "$ref": "#/$defs/nonNegativeInteger" },
|
|
6216
|
+
"minItems": { "$ref": "#/$defs/nonNegativeIntegerDefault0" },
|
|
6217
|
+
"uniqueItems": {
|
|
6218
|
+
"type": "boolean",
|
|
6219
|
+
"default": false
|
|
6220
|
+
},
|
|
6221
|
+
"maxContains": { "$ref": "#/$defs/nonNegativeInteger" },
|
|
6222
|
+
"minContains": {
|
|
6223
|
+
"$ref": "#/$defs/nonNegativeInteger",
|
|
6224
|
+
"default": 1
|
|
6225
|
+
},
|
|
6226
|
+
"maxProperties": { "$ref": "#/$defs/nonNegativeInteger" },
|
|
6227
|
+
"minProperties": { "$ref": "#/$defs/nonNegativeIntegerDefault0" },
|
|
6228
|
+
"required": { "$ref": "#/$defs/stringArray" },
|
|
6229
|
+
"dependentRequired": {
|
|
6230
|
+
"type": "object",
|
|
6231
|
+
"additionalProperties": { "$ref": "#/$defs/stringArray" }
|
|
6232
|
+
}
|
|
5775
6233
|
},
|
|
5776
|
-
"
|
|
6234
|
+
"$defs": {
|
|
6235
|
+
"nonNegativeInteger": {
|
|
6236
|
+
"type": "integer",
|
|
6237
|
+
"minimum": 0
|
|
6238
|
+
},
|
|
6239
|
+
"nonNegativeIntegerDefault0": {
|
|
6240
|
+
"$ref": "#/$defs/nonNegativeInteger",
|
|
6241
|
+
"default": 0
|
|
6242
|
+
},
|
|
6243
|
+
"simpleTypes": { "enum": [
|
|
6244
|
+
"array",
|
|
6245
|
+
"boolean",
|
|
6246
|
+
"integer",
|
|
6247
|
+
"null",
|
|
6248
|
+
"number",
|
|
6249
|
+
"object",
|
|
6250
|
+
"string"
|
|
6251
|
+
] },
|
|
6252
|
+
"stringArray": {
|
|
6253
|
+
"type": "array",
|
|
6254
|
+
"items": { "type": "string" },
|
|
6255
|
+
"uniqueItems": true,
|
|
6256
|
+
"default": []
|
|
6257
|
+
}
|
|
6258
|
+
}
|
|
5777
6259
|
};
|
|
5778
6260
|
}));
|
|
5779
6261
|
|
|
5780
6262
|
//#endregion
|
|
5781
|
-
//#region ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/
|
|
5782
|
-
var
|
|
6263
|
+
//#region ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/refs/json-schema-2020-12/index.js
|
|
6264
|
+
var require_json_schema_2020_12 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
5783
6265
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5784
|
-
|
|
5785
|
-
const
|
|
5786
|
-
const
|
|
5787
|
-
const
|
|
5788
|
-
const
|
|
6266
|
+
const metaSchema = require_schema();
|
|
6267
|
+
const applicator = require_applicator();
|
|
6268
|
+
const unevaluated = require_unevaluated();
|
|
6269
|
+
const content = require_content();
|
|
6270
|
+
const core = require_core();
|
|
6271
|
+
const format = require_format_annotation();
|
|
6272
|
+
const metadata = require_meta_data();
|
|
6273
|
+
const validation = require_validation();
|
|
5789
6274
|
const META_SUPPORT_DATA = ["/properties"];
|
|
5790
|
-
|
|
5791
|
-
|
|
6275
|
+
function addMetaSchema2020($data) {
|
|
6276
|
+
[
|
|
6277
|
+
metaSchema,
|
|
6278
|
+
applicator,
|
|
6279
|
+
unevaluated,
|
|
6280
|
+
content,
|
|
6281
|
+
core,
|
|
6282
|
+
with$data(this, format),
|
|
6283
|
+
metadata,
|
|
6284
|
+
with$data(this, validation)
|
|
6285
|
+
].forEach((sch) => this.addMetaSchema(sch, void 0, false));
|
|
6286
|
+
return this;
|
|
6287
|
+
function with$data(ajv, sch) {
|
|
6288
|
+
return $data ? ajv.$dataMetaSchema(sch, META_SUPPORT_DATA) : sch;
|
|
6289
|
+
}
|
|
6290
|
+
}
|
|
6291
|
+
exports.default = addMetaSchema2020;
|
|
6292
|
+
}));
|
|
6293
|
+
|
|
6294
|
+
//#endregion
|
|
6295
|
+
//#region ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/2020.js
|
|
6296
|
+
var require__2020 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
6297
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6298
|
+
exports.MissingRefError = exports.ValidationError = exports.CodeGen = exports.Name = exports.nil = exports.stringify = exports.str = exports._ = exports.KeywordCxt = exports.Ajv2020 = void 0;
|
|
6299
|
+
const core_1 = require_core$2();
|
|
6300
|
+
const draft2020_1 = require_draft2020();
|
|
6301
|
+
const discriminator_1 = require_discriminator();
|
|
6302
|
+
const json_schema_2020_12_1 = require_json_schema_2020_12();
|
|
6303
|
+
const META_SCHEMA_ID = "https://json-schema.org/draft/2020-12/schema";
|
|
6304
|
+
var Ajv2020 = class extends core_1.default {
|
|
6305
|
+
constructor(opts = {}) {
|
|
6306
|
+
super({
|
|
6307
|
+
...opts,
|
|
6308
|
+
dynamicRef: true,
|
|
6309
|
+
next: true,
|
|
6310
|
+
unevaluated: true
|
|
6311
|
+
});
|
|
6312
|
+
}
|
|
5792
6313
|
_addVocabularies() {
|
|
5793
6314
|
super._addVocabularies();
|
|
5794
|
-
|
|
6315
|
+
draft2020_1.default.forEach((v) => this.addVocabulary(v));
|
|
5795
6316
|
if (this.opts.discriminator) this.addKeyword(discriminator_1.default);
|
|
5796
6317
|
}
|
|
5797
6318
|
_addDefaultMetaSchema() {
|
|
5798
6319
|
super._addDefaultMetaSchema();
|
|
5799
|
-
|
|
5800
|
-
|
|
5801
|
-
|
|
6320
|
+
const { $data, meta } = this.opts;
|
|
6321
|
+
if (!meta) return;
|
|
6322
|
+
json_schema_2020_12_1.default.call(this, $data);
|
|
5802
6323
|
this.refs["http://json-schema.org/schema"] = META_SCHEMA_ID;
|
|
5803
6324
|
}
|
|
5804
6325
|
defaultMeta() {
|
|
5805
6326
|
return this.opts.defaultMeta = super.defaultMeta() || (this.getSchema(META_SCHEMA_ID) ? META_SCHEMA_ID : void 0);
|
|
5806
6327
|
}
|
|
5807
6328
|
};
|
|
5808
|
-
exports.
|
|
5809
|
-
module.exports = exports =
|
|
5810
|
-
module.exports.
|
|
6329
|
+
exports.Ajv2020 = Ajv2020;
|
|
6330
|
+
module.exports = exports = Ajv2020;
|
|
6331
|
+
module.exports.Ajv2020 = Ajv2020;
|
|
5811
6332
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5812
|
-
exports.default =
|
|
6333
|
+
exports.default = Ajv2020;
|
|
5813
6334
|
var validate_1 = require_validate();
|
|
5814
6335
|
Object.defineProperty(exports, "KeywordCxt", {
|
|
5815
6336
|
enumerable: true,
|
|
@@ -6059,6 +6580,258 @@ var require_formats = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
6059
6580
|
}
|
|
6060
6581
|
}));
|
|
6061
6582
|
|
|
6583
|
+
//#endregion
|
|
6584
|
+
//#region ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/draft7.js
|
|
6585
|
+
var require_draft7 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
6586
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6587
|
+
const core_1 = require_core$1();
|
|
6588
|
+
const validation_1 = require_validation$1();
|
|
6589
|
+
const applicator_1 = require_applicator$1();
|
|
6590
|
+
const format_1 = require_format();
|
|
6591
|
+
const metadata_1 = require_metadata();
|
|
6592
|
+
const draft7Vocabularies = [
|
|
6593
|
+
core_1.default,
|
|
6594
|
+
validation_1.default,
|
|
6595
|
+
(0, applicator_1.default)(),
|
|
6596
|
+
format_1.default,
|
|
6597
|
+
metadata_1.metadataVocabulary,
|
|
6598
|
+
metadata_1.contentVocabulary
|
|
6599
|
+
];
|
|
6600
|
+
exports.default = draft7Vocabularies;
|
|
6601
|
+
}));
|
|
6602
|
+
|
|
6603
|
+
//#endregion
|
|
6604
|
+
//#region ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/refs/json-schema-draft-07.json
|
|
6605
|
+
var require_json_schema_draft_07 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
6606
|
+
module.exports = {
|
|
6607
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
6608
|
+
"$id": "http://json-schema.org/draft-07/schema#",
|
|
6609
|
+
"title": "Core schema meta-schema",
|
|
6610
|
+
"definitions": {
|
|
6611
|
+
"schemaArray": {
|
|
6612
|
+
"type": "array",
|
|
6613
|
+
"minItems": 1,
|
|
6614
|
+
"items": { "$ref": "#" }
|
|
6615
|
+
},
|
|
6616
|
+
"nonNegativeInteger": {
|
|
6617
|
+
"type": "integer",
|
|
6618
|
+
"minimum": 0
|
|
6619
|
+
},
|
|
6620
|
+
"nonNegativeIntegerDefault0": { "allOf": [{ "$ref": "#/definitions/nonNegativeInteger" }, { "default": 0 }] },
|
|
6621
|
+
"simpleTypes": { "enum": [
|
|
6622
|
+
"array",
|
|
6623
|
+
"boolean",
|
|
6624
|
+
"integer",
|
|
6625
|
+
"null",
|
|
6626
|
+
"number",
|
|
6627
|
+
"object",
|
|
6628
|
+
"string"
|
|
6629
|
+
] },
|
|
6630
|
+
"stringArray": {
|
|
6631
|
+
"type": "array",
|
|
6632
|
+
"items": { "type": "string" },
|
|
6633
|
+
"uniqueItems": true,
|
|
6634
|
+
"default": []
|
|
6635
|
+
}
|
|
6636
|
+
},
|
|
6637
|
+
"type": ["object", "boolean"],
|
|
6638
|
+
"properties": {
|
|
6639
|
+
"$id": {
|
|
6640
|
+
"type": "string",
|
|
6641
|
+
"format": "uri-reference"
|
|
6642
|
+
},
|
|
6643
|
+
"$schema": {
|
|
6644
|
+
"type": "string",
|
|
6645
|
+
"format": "uri"
|
|
6646
|
+
},
|
|
6647
|
+
"$ref": {
|
|
6648
|
+
"type": "string",
|
|
6649
|
+
"format": "uri-reference"
|
|
6650
|
+
},
|
|
6651
|
+
"$comment": { "type": "string" },
|
|
6652
|
+
"title": { "type": "string" },
|
|
6653
|
+
"description": { "type": "string" },
|
|
6654
|
+
"default": true,
|
|
6655
|
+
"readOnly": {
|
|
6656
|
+
"type": "boolean",
|
|
6657
|
+
"default": false
|
|
6658
|
+
},
|
|
6659
|
+
"examples": {
|
|
6660
|
+
"type": "array",
|
|
6661
|
+
"items": true
|
|
6662
|
+
},
|
|
6663
|
+
"multipleOf": {
|
|
6664
|
+
"type": "number",
|
|
6665
|
+
"exclusiveMinimum": 0
|
|
6666
|
+
},
|
|
6667
|
+
"maximum": { "type": "number" },
|
|
6668
|
+
"exclusiveMaximum": { "type": "number" },
|
|
6669
|
+
"minimum": { "type": "number" },
|
|
6670
|
+
"exclusiveMinimum": { "type": "number" },
|
|
6671
|
+
"maxLength": { "$ref": "#/definitions/nonNegativeInteger" },
|
|
6672
|
+
"minLength": { "$ref": "#/definitions/nonNegativeIntegerDefault0" },
|
|
6673
|
+
"pattern": {
|
|
6674
|
+
"type": "string",
|
|
6675
|
+
"format": "regex"
|
|
6676
|
+
},
|
|
6677
|
+
"additionalItems": { "$ref": "#" },
|
|
6678
|
+
"items": {
|
|
6679
|
+
"anyOf": [{ "$ref": "#" }, { "$ref": "#/definitions/schemaArray" }],
|
|
6680
|
+
"default": true
|
|
6681
|
+
},
|
|
6682
|
+
"maxItems": { "$ref": "#/definitions/nonNegativeInteger" },
|
|
6683
|
+
"minItems": { "$ref": "#/definitions/nonNegativeIntegerDefault0" },
|
|
6684
|
+
"uniqueItems": {
|
|
6685
|
+
"type": "boolean",
|
|
6686
|
+
"default": false
|
|
6687
|
+
},
|
|
6688
|
+
"contains": { "$ref": "#" },
|
|
6689
|
+
"maxProperties": { "$ref": "#/definitions/nonNegativeInteger" },
|
|
6690
|
+
"minProperties": { "$ref": "#/definitions/nonNegativeIntegerDefault0" },
|
|
6691
|
+
"required": { "$ref": "#/definitions/stringArray" },
|
|
6692
|
+
"additionalProperties": { "$ref": "#" },
|
|
6693
|
+
"definitions": {
|
|
6694
|
+
"type": "object",
|
|
6695
|
+
"additionalProperties": { "$ref": "#" },
|
|
6696
|
+
"default": {}
|
|
6697
|
+
},
|
|
6698
|
+
"properties": {
|
|
6699
|
+
"type": "object",
|
|
6700
|
+
"additionalProperties": { "$ref": "#" },
|
|
6701
|
+
"default": {}
|
|
6702
|
+
},
|
|
6703
|
+
"patternProperties": {
|
|
6704
|
+
"type": "object",
|
|
6705
|
+
"additionalProperties": { "$ref": "#" },
|
|
6706
|
+
"propertyNames": { "format": "regex" },
|
|
6707
|
+
"default": {}
|
|
6708
|
+
},
|
|
6709
|
+
"dependencies": {
|
|
6710
|
+
"type": "object",
|
|
6711
|
+
"additionalProperties": { "anyOf": [{ "$ref": "#" }, { "$ref": "#/definitions/stringArray" }] }
|
|
6712
|
+
},
|
|
6713
|
+
"propertyNames": { "$ref": "#" },
|
|
6714
|
+
"const": true,
|
|
6715
|
+
"enum": {
|
|
6716
|
+
"type": "array",
|
|
6717
|
+
"items": true,
|
|
6718
|
+
"minItems": 1,
|
|
6719
|
+
"uniqueItems": true
|
|
6720
|
+
},
|
|
6721
|
+
"type": { "anyOf": [{ "$ref": "#/definitions/simpleTypes" }, {
|
|
6722
|
+
"type": "array",
|
|
6723
|
+
"items": { "$ref": "#/definitions/simpleTypes" },
|
|
6724
|
+
"minItems": 1,
|
|
6725
|
+
"uniqueItems": true
|
|
6726
|
+
}] },
|
|
6727
|
+
"format": { "type": "string" },
|
|
6728
|
+
"contentMediaType": { "type": "string" },
|
|
6729
|
+
"contentEncoding": { "type": "string" },
|
|
6730
|
+
"if": { "$ref": "#" },
|
|
6731
|
+
"then": { "$ref": "#" },
|
|
6732
|
+
"else": { "$ref": "#" },
|
|
6733
|
+
"allOf": { "$ref": "#/definitions/schemaArray" },
|
|
6734
|
+
"anyOf": { "$ref": "#/definitions/schemaArray" },
|
|
6735
|
+
"oneOf": { "$ref": "#/definitions/schemaArray" },
|
|
6736
|
+
"not": { "$ref": "#" }
|
|
6737
|
+
},
|
|
6738
|
+
"default": true
|
|
6739
|
+
};
|
|
6740
|
+
}));
|
|
6741
|
+
|
|
6742
|
+
//#endregion
|
|
6743
|
+
//#region ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/ajv.js
|
|
6744
|
+
var require_ajv = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
6745
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6746
|
+
exports.MissingRefError = exports.ValidationError = exports.CodeGen = exports.Name = exports.nil = exports.stringify = exports.str = exports._ = exports.KeywordCxt = exports.Ajv = void 0;
|
|
6747
|
+
const core_1 = require_core$2();
|
|
6748
|
+
const draft7_1 = require_draft7();
|
|
6749
|
+
const discriminator_1 = require_discriminator();
|
|
6750
|
+
const draft7MetaSchema = require_json_schema_draft_07();
|
|
6751
|
+
const META_SUPPORT_DATA = ["/properties"];
|
|
6752
|
+
const META_SCHEMA_ID = "http://json-schema.org/draft-07/schema";
|
|
6753
|
+
var Ajv = class extends core_1.default {
|
|
6754
|
+
_addVocabularies() {
|
|
6755
|
+
super._addVocabularies();
|
|
6756
|
+
draft7_1.default.forEach((v) => this.addVocabulary(v));
|
|
6757
|
+
if (this.opts.discriminator) this.addKeyword(discriminator_1.default);
|
|
6758
|
+
}
|
|
6759
|
+
_addDefaultMetaSchema() {
|
|
6760
|
+
super._addDefaultMetaSchema();
|
|
6761
|
+
if (!this.opts.meta) return;
|
|
6762
|
+
const metaSchema = this.opts.$data ? this.$dataMetaSchema(draft7MetaSchema, META_SUPPORT_DATA) : draft7MetaSchema;
|
|
6763
|
+
this.addMetaSchema(metaSchema, META_SCHEMA_ID, false);
|
|
6764
|
+
this.refs["http://json-schema.org/schema"] = META_SCHEMA_ID;
|
|
6765
|
+
}
|
|
6766
|
+
defaultMeta() {
|
|
6767
|
+
return this.opts.defaultMeta = super.defaultMeta() || (this.getSchema(META_SCHEMA_ID) ? META_SCHEMA_ID : void 0);
|
|
6768
|
+
}
|
|
6769
|
+
};
|
|
6770
|
+
exports.Ajv = Ajv;
|
|
6771
|
+
module.exports = exports = Ajv;
|
|
6772
|
+
module.exports.Ajv = Ajv;
|
|
6773
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6774
|
+
exports.default = Ajv;
|
|
6775
|
+
var validate_1 = require_validate();
|
|
6776
|
+
Object.defineProperty(exports, "KeywordCxt", {
|
|
6777
|
+
enumerable: true,
|
|
6778
|
+
get: function() {
|
|
6779
|
+
return validate_1.KeywordCxt;
|
|
6780
|
+
}
|
|
6781
|
+
});
|
|
6782
|
+
var codegen_1 = require_codegen();
|
|
6783
|
+
Object.defineProperty(exports, "_", {
|
|
6784
|
+
enumerable: true,
|
|
6785
|
+
get: function() {
|
|
6786
|
+
return codegen_1._;
|
|
6787
|
+
}
|
|
6788
|
+
});
|
|
6789
|
+
Object.defineProperty(exports, "str", {
|
|
6790
|
+
enumerable: true,
|
|
6791
|
+
get: function() {
|
|
6792
|
+
return codegen_1.str;
|
|
6793
|
+
}
|
|
6794
|
+
});
|
|
6795
|
+
Object.defineProperty(exports, "stringify", {
|
|
6796
|
+
enumerable: true,
|
|
6797
|
+
get: function() {
|
|
6798
|
+
return codegen_1.stringify;
|
|
6799
|
+
}
|
|
6800
|
+
});
|
|
6801
|
+
Object.defineProperty(exports, "nil", {
|
|
6802
|
+
enumerable: true,
|
|
6803
|
+
get: function() {
|
|
6804
|
+
return codegen_1.nil;
|
|
6805
|
+
}
|
|
6806
|
+
});
|
|
6807
|
+
Object.defineProperty(exports, "Name", {
|
|
6808
|
+
enumerable: true,
|
|
6809
|
+
get: function() {
|
|
6810
|
+
return codegen_1.Name;
|
|
6811
|
+
}
|
|
6812
|
+
});
|
|
6813
|
+
Object.defineProperty(exports, "CodeGen", {
|
|
6814
|
+
enumerable: true,
|
|
6815
|
+
get: function() {
|
|
6816
|
+
return codegen_1.CodeGen;
|
|
6817
|
+
}
|
|
6818
|
+
});
|
|
6819
|
+
var validation_error_1 = require_validation_error();
|
|
6820
|
+
Object.defineProperty(exports, "ValidationError", {
|
|
6821
|
+
enumerable: true,
|
|
6822
|
+
get: function() {
|
|
6823
|
+
return validation_error_1.default;
|
|
6824
|
+
}
|
|
6825
|
+
});
|
|
6826
|
+
var ref_error_1 = require_ref_error();
|
|
6827
|
+
Object.defineProperty(exports, "MissingRefError", {
|
|
6828
|
+
enumerable: true,
|
|
6829
|
+
get: function() {
|
|
6830
|
+
return ref_error_1.default;
|
|
6831
|
+
}
|
|
6832
|
+
});
|
|
6833
|
+
}));
|
|
6834
|
+
|
|
6062
6835
|
//#endregion
|
|
6063
6836
|
//#region ../../node_modules/.pnpm/ajv-formats@3.0.1_ajv@8.18.0/node_modules/ajv-formats/dist/limit.js
|
|
6064
6837
|
var require_limit = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
@@ -6176,22 +6949,38 @@ var require_dist = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
6176
6949
|
|
|
6177
6950
|
//#endregion
|
|
6178
6951
|
//#region ../core-internal/src/validators/ajvProvider.ts
|
|
6179
|
-
var
|
|
6952
|
+
var import__2020 = require__2020();
|
|
6180
6953
|
var import_dist = /* @__PURE__ */ __toESM(require_dist(), 1);
|
|
6954
|
+
var import_ajv = require_ajv();
|
|
6955
|
+
/**
|
|
6956
|
+
* Canonical 2020-12 `$schema` URIs (http + https variants, trailing-`#` stripped). When a schema
|
|
6957
|
+
* declares anything else, the default provider throws a plain `Error` with a clear message rather
|
|
6958
|
+
* than letting the engine crash on an opaque internal error or silently mis-validate.
|
|
6959
|
+
*/
|
|
6960
|
+
const DRAFT_2020_12_URIS = new Set(["https://json-schema.org/draft/2020-12/schema", "http://json-schema.org/draft/2020-12/schema"]);
|
|
6961
|
+
const addFormats = import_dist.default;
|
|
6181
6962
|
function createDefaultAjvInstance() {
|
|
6182
|
-
const ajv = new
|
|
6963
|
+
const ajv = new import__2020.Ajv2020({
|
|
6183
6964
|
strict: false,
|
|
6184
6965
|
validateFormats: true,
|
|
6185
6966
|
validateSchema: false,
|
|
6186
6967
|
allErrors: true
|
|
6187
6968
|
});
|
|
6188
|
-
(
|
|
6969
|
+
addFormats(ajv);
|
|
6189
6970
|
return ajv;
|
|
6190
6971
|
}
|
|
6191
6972
|
/**
|
|
6192
6973
|
* AJV-backed JSON Schema validator. See `@modelcontextprotocol/{client,server}/validators/ajv`
|
|
6193
6974
|
* for the customisation entry point (re-exports `Ajv` and `addFormats` from the bundled copy).
|
|
6194
6975
|
*
|
|
6976
|
+
* Default validates as **JSON Schema 2020-12** (SEP-1613). Schemas declaring a different
|
|
6977
|
+
* `$schema` are rejected with a plain `Error`; pass a pre-configured Ajv instance to validate
|
|
6978
|
+
* other dialects. The SDK bundles ajv internally but does not re-export `Ajv2020` (its type
|
|
6979
|
+
* graph tips downstream declaration bundling — see #2339). To construct a custom 2020-12
|
|
6980
|
+
* instance, add `ajv` to your own dependencies (matching the SDK's pinned version) and
|
|
6981
|
+
* `import { Ajv2020 } from 'ajv/dist/2020.js'` — `new Ajv(...)` is the draft-07 class and would
|
|
6982
|
+
* silently downgrade dialect.
|
|
6983
|
+
*
|
|
6195
6984
|
* @example Use with default configuration
|
|
6196
6985
|
* ```ts source="./ajvProvider.examples.ts#AjvJsonSchemaValidator_default"
|
|
6197
6986
|
* const validator = new AjvJsonSchemaValidator();
|
|
@@ -6199,29 +6988,40 @@ function createDefaultAjvInstance() {
|
|
|
6199
6988
|
*
|
|
6200
6989
|
* @example Use with a custom AJV instance
|
|
6201
6990
|
* ```ts source="./ajvProvider.examples.ts#AjvJsonSchemaValidator_customInstance"
|
|
6202
|
-
*
|
|
6991
|
+
* // import { Ajv2020 } from 'ajv/dist/2020.js';
|
|
6992
|
+
* const ajv = new Ajv2020({ strict: false, validateSchema: false, allErrors: true });
|
|
6203
6993
|
* const validator = new AjvJsonSchemaValidator(ajv);
|
|
6204
6994
|
* ```
|
|
6205
6995
|
*
|
|
6206
6996
|
* @example Register ajv-formats
|
|
6207
6997
|
* ```ts source="./ajvProvider.examples.ts#AjvJsonSchemaValidator_withFormats"
|
|
6208
|
-
*
|
|
6998
|
+
* // import { Ajv2020 } from 'ajv/dist/2020.js';
|
|
6999
|
+
* const ajv = new Ajv2020({ strict: false, validateSchema: false, allErrors: true });
|
|
6209
7000
|
* addFormats(ajv);
|
|
6210
7001
|
* const validator = new AjvJsonSchemaValidator(ajv);
|
|
6211
7002
|
* ```
|
|
6212
7003
|
*/
|
|
6213
7004
|
var AjvJsonSchemaValidator = class {
|
|
6214
7005
|
_ajv;
|
|
7006
|
+
/** True iff the constructor received a caller-supplied engine; the `$schema` check is skipped. */
|
|
7007
|
+
_userAjv;
|
|
6215
7008
|
/**
|
|
6216
|
-
* @param ajv - Optional pre-configured AJV-compatible instance.
|
|
6217
|
-
*
|
|
6218
|
-
*
|
|
6219
|
-
*
|
|
7009
|
+
* @param ajv - Optional pre-configured AJV-compatible instance. When supplied, this instance is
|
|
7010
|
+
* used for **every** schema regardless of its declared `$schema` (the caller owns dialect
|
|
7011
|
+
* choice). When omitted, the provider constructs a single `Ajv2020` instance with
|
|
7012
|
+
* `strict: false`, `validateFormats: true`, `validateSchema: false`, `allErrors: true`, and
|
|
7013
|
+
* `ajv-formats` registered. The parameter is typed structurally so consumers who don't pass an
|
|
7014
|
+
* instance need not have `ajv` installed.
|
|
6220
7015
|
*/
|
|
6221
7016
|
constructor(ajv) {
|
|
7017
|
+
this._userAjv = ajv !== void 0;
|
|
6222
7018
|
this._ajv = ajv ?? createDefaultAjvInstance();
|
|
6223
7019
|
}
|
|
6224
7020
|
getValidator(schema) {
|
|
7021
|
+
if (!this._userAjv && "$schema" in schema && typeof schema.$schema === "string" && !DRAFT_2020_12_URIS.has(schema.$schema.replace(/#$/, ""))) {
|
|
7022
|
+
const declared = schema.$schema.slice(0, 200);
|
|
7023
|
+
throw new Error(`JSON Schema declares an unsupported dialect ("$schema": "${declared}"). The default validator supports JSON Schema 2020-12 only; pass a pre-configured Ajv instance to AjvJsonSchemaValidator(ajv) to validate other dialects.`);
|
|
7024
|
+
}
|
|
6225
7025
|
const ajvValidator = "$id" in schema && typeof schema.$id === "string" ? this._ajv.getSchema(schema.$id) ?? this._ajv.compile(schema) : this._ajv.compile(schema);
|
|
6226
7026
|
return (input) => {
|
|
6227
7027
|
return ajvValidator(input) ? {
|
|
@@ -6236,9 +7036,7 @@ var AjvJsonSchemaValidator = class {
|
|
|
6236
7036
|
};
|
|
6237
7037
|
}
|
|
6238
7038
|
};
|
|
6239
|
-
/** `ajv-formats` default export, normalised through the CJS/ESM interop wrapper. */
|
|
6240
|
-
const addFormats = import_dist.default;
|
|
6241
7039
|
|
|
6242
7040
|
//#endregion
|
|
6243
7041
|
export { addFormats as n, import_ajv as r, AjvJsonSchemaValidator as t };
|
|
6244
|
-
//# sourceMappingURL=ajvProvider-
|
|
7042
|
+
//# sourceMappingURL=ajvProvider-BQMcjynJ.mjs.map
|