@mastra/schema-compat 1.2.9-alpha.0 → 1.2.9

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.
@@ -6301,8 +6301,817 @@ var require_ajv = chunkDZUJEN5N_cjs.__commonJS({
6301
6301
  }
6302
6302
  });
6303
6303
 
6304
+ // ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/dynamic/dynamicAnchor.js
6305
+ var require_dynamicAnchor = chunkDZUJEN5N_cjs.__commonJS({
6306
+ "../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/dynamic/dynamicAnchor.js"(exports$1) {
6307
+ Object.defineProperty(exports$1, "__esModule", { value: true });
6308
+ exports$1.dynamicAnchor = void 0;
6309
+ var codegen_1 = require_codegen();
6310
+ var names_1 = require_names();
6311
+ var compile_1 = require_compile();
6312
+ var ref_1 = require_ref();
6313
+ var def = {
6314
+ keyword: "$dynamicAnchor",
6315
+ schemaType: "string",
6316
+ code: (cxt) => dynamicAnchor(cxt, cxt.schema)
6317
+ };
6318
+ function dynamicAnchor(cxt, anchor) {
6319
+ const { gen, it } = cxt;
6320
+ it.schemaEnv.root.dynamicAnchors[anchor] = true;
6321
+ const v = (0, codegen_1._)`${names_1.default.dynamicAnchors}${(0, codegen_1.getProperty)(anchor)}`;
6322
+ const validate = it.errSchemaPath === "#" ? it.validateName : _getValidate(cxt);
6323
+ gen.if((0, codegen_1._)`!${v}`, () => gen.assign(v, validate));
6324
+ }
6325
+ exports$1.dynamicAnchor = dynamicAnchor;
6326
+ function _getValidate(cxt) {
6327
+ const { schemaEnv, schema, self } = cxt.it;
6328
+ const { root, baseId, localRefs, meta } = schemaEnv.root;
6329
+ const { schemaId } = self.opts;
6330
+ const sch = new compile_1.SchemaEnv({ schema, schemaId, root, baseId, localRefs, meta });
6331
+ compile_1.compileSchema.call(self, sch);
6332
+ return (0, ref_1.getValidate)(cxt, sch);
6333
+ }
6334
+ exports$1.default = def;
6335
+ }
6336
+ });
6337
+
6338
+ // ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/dynamic/dynamicRef.js
6339
+ var require_dynamicRef = chunkDZUJEN5N_cjs.__commonJS({
6340
+ "../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/dynamic/dynamicRef.js"(exports$1) {
6341
+ Object.defineProperty(exports$1, "__esModule", { value: true });
6342
+ exports$1.dynamicRef = void 0;
6343
+ var codegen_1 = require_codegen();
6344
+ var names_1 = require_names();
6345
+ var ref_1 = require_ref();
6346
+ var def = {
6347
+ keyword: "$dynamicRef",
6348
+ schemaType: "string",
6349
+ code: (cxt) => dynamicRef(cxt, cxt.schema)
6350
+ };
6351
+ function dynamicRef(cxt, ref) {
6352
+ const { gen, keyword, it } = cxt;
6353
+ if (ref[0] !== "#")
6354
+ throw new Error(`"${keyword}" only supports hash fragment reference`);
6355
+ const anchor = ref.slice(1);
6356
+ if (it.allErrors) {
6357
+ _dynamicRef();
6358
+ } else {
6359
+ const valid = gen.let("valid", false);
6360
+ _dynamicRef(valid);
6361
+ cxt.ok(valid);
6362
+ }
6363
+ function _dynamicRef(valid) {
6364
+ if (it.schemaEnv.root.dynamicAnchors[anchor]) {
6365
+ const v = gen.let("_v", (0, codegen_1._)`${names_1.default.dynamicAnchors}${(0, codegen_1.getProperty)(anchor)}`);
6366
+ gen.if(v, _callRef(v, valid), _callRef(it.validateName, valid));
6367
+ } else {
6368
+ _callRef(it.validateName, valid)();
6369
+ }
6370
+ }
6371
+ function _callRef(validate, valid) {
6372
+ return valid ? () => gen.block(() => {
6373
+ (0, ref_1.callRef)(cxt, validate);
6374
+ gen.let(valid, true);
6375
+ }) : () => (0, ref_1.callRef)(cxt, validate);
6376
+ }
6377
+ }
6378
+ exports$1.dynamicRef = dynamicRef;
6379
+ exports$1.default = def;
6380
+ }
6381
+ });
6382
+
6383
+ // ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/dynamic/recursiveAnchor.js
6384
+ var require_recursiveAnchor = chunkDZUJEN5N_cjs.__commonJS({
6385
+ "../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/dynamic/recursiveAnchor.js"(exports$1) {
6386
+ Object.defineProperty(exports$1, "__esModule", { value: true });
6387
+ var dynamicAnchor_1 = require_dynamicAnchor();
6388
+ var util_1 = require_util();
6389
+ var def = {
6390
+ keyword: "$recursiveAnchor",
6391
+ schemaType: "boolean",
6392
+ code(cxt) {
6393
+ if (cxt.schema)
6394
+ (0, dynamicAnchor_1.dynamicAnchor)(cxt, "");
6395
+ else
6396
+ (0, util_1.checkStrictMode)(cxt.it, "$recursiveAnchor: false is ignored");
6397
+ }
6398
+ };
6399
+ exports$1.default = def;
6400
+ }
6401
+ });
6402
+
6403
+ // ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/dynamic/recursiveRef.js
6404
+ var require_recursiveRef = chunkDZUJEN5N_cjs.__commonJS({
6405
+ "../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/dynamic/recursiveRef.js"(exports$1) {
6406
+ Object.defineProperty(exports$1, "__esModule", { value: true });
6407
+ var dynamicRef_1 = require_dynamicRef();
6408
+ var def = {
6409
+ keyword: "$recursiveRef",
6410
+ schemaType: "string",
6411
+ code: (cxt) => (0, dynamicRef_1.dynamicRef)(cxt, cxt.schema)
6412
+ };
6413
+ exports$1.default = def;
6414
+ }
6415
+ });
6416
+
6417
+ // ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/dynamic/index.js
6418
+ var require_dynamic = chunkDZUJEN5N_cjs.__commonJS({
6419
+ "../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/dynamic/index.js"(exports$1) {
6420
+ Object.defineProperty(exports$1, "__esModule", { value: true });
6421
+ var dynamicAnchor_1 = require_dynamicAnchor();
6422
+ var dynamicRef_1 = require_dynamicRef();
6423
+ var recursiveAnchor_1 = require_recursiveAnchor();
6424
+ var recursiveRef_1 = require_recursiveRef();
6425
+ var dynamic = [dynamicAnchor_1.default, dynamicRef_1.default, recursiveAnchor_1.default, recursiveRef_1.default];
6426
+ exports$1.default = dynamic;
6427
+ }
6428
+ });
6429
+
6430
+ // ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/validation/dependentRequired.js
6431
+ var require_dependentRequired = chunkDZUJEN5N_cjs.__commonJS({
6432
+ "../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/validation/dependentRequired.js"(exports$1) {
6433
+ Object.defineProperty(exports$1, "__esModule", { value: true });
6434
+ var dependencies_1 = require_dependencies();
6435
+ var def = {
6436
+ keyword: "dependentRequired",
6437
+ type: "object",
6438
+ schemaType: "object",
6439
+ error: dependencies_1.error,
6440
+ code: (cxt) => (0, dependencies_1.validatePropertyDeps)(cxt)
6441
+ };
6442
+ exports$1.default = def;
6443
+ }
6444
+ });
6445
+
6446
+ // ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/dependentSchemas.js
6447
+ var require_dependentSchemas = chunkDZUJEN5N_cjs.__commonJS({
6448
+ "../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/dependentSchemas.js"(exports$1) {
6449
+ Object.defineProperty(exports$1, "__esModule", { value: true });
6450
+ var dependencies_1 = require_dependencies();
6451
+ var def = {
6452
+ keyword: "dependentSchemas",
6453
+ type: "object",
6454
+ schemaType: "object",
6455
+ code: (cxt) => (0, dependencies_1.validateSchemaDeps)(cxt)
6456
+ };
6457
+ exports$1.default = def;
6458
+ }
6459
+ });
6460
+
6461
+ // ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/validation/limitContains.js
6462
+ var require_limitContains = chunkDZUJEN5N_cjs.__commonJS({
6463
+ "../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/validation/limitContains.js"(exports$1) {
6464
+ Object.defineProperty(exports$1, "__esModule", { value: true });
6465
+ var util_1 = require_util();
6466
+ var def = {
6467
+ keyword: ["maxContains", "minContains"],
6468
+ type: "array",
6469
+ schemaType: "number",
6470
+ code({ keyword, parentSchema, it }) {
6471
+ if (parentSchema.contains === void 0) {
6472
+ (0, util_1.checkStrictMode)(it, `"${keyword}" without "contains" is ignored`);
6473
+ }
6474
+ }
6475
+ };
6476
+ exports$1.default = def;
6477
+ }
6478
+ });
6479
+
6480
+ // ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/next.js
6481
+ var require_next = chunkDZUJEN5N_cjs.__commonJS({
6482
+ "../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/next.js"(exports$1) {
6483
+ Object.defineProperty(exports$1, "__esModule", { value: true });
6484
+ var dependentRequired_1 = require_dependentRequired();
6485
+ var dependentSchemas_1 = require_dependentSchemas();
6486
+ var limitContains_1 = require_limitContains();
6487
+ var next = [dependentRequired_1.default, dependentSchemas_1.default, limitContains_1.default];
6488
+ exports$1.default = next;
6489
+ }
6490
+ });
6491
+
6492
+ // ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/unevaluated/unevaluatedProperties.js
6493
+ var require_unevaluatedProperties = chunkDZUJEN5N_cjs.__commonJS({
6494
+ "../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/unevaluated/unevaluatedProperties.js"(exports$1) {
6495
+ Object.defineProperty(exports$1, "__esModule", { value: true });
6496
+ var codegen_1 = require_codegen();
6497
+ var util_1 = require_util();
6498
+ var names_1 = require_names();
6499
+ var error = {
6500
+ message: "must NOT have unevaluated properties",
6501
+ params: ({ params }) => (0, codegen_1._)`{unevaluatedProperty: ${params.unevaluatedProperty}}`
6502
+ };
6503
+ var def = {
6504
+ keyword: "unevaluatedProperties",
6505
+ type: "object",
6506
+ schemaType: ["boolean", "object"],
6507
+ trackErrors: true,
6508
+ error,
6509
+ code(cxt) {
6510
+ const { gen, schema, data, errsCount, it } = cxt;
6511
+ if (!errsCount)
6512
+ throw new Error("ajv implementation error");
6513
+ const { allErrors, props } = it;
6514
+ if (props instanceof codegen_1.Name) {
6515
+ gen.if((0, codegen_1._)`${props} !== true`, () => gen.forIn("key", data, (key) => gen.if(unevaluatedDynamic(props, key), () => unevaluatedPropCode(key))));
6516
+ } else if (props !== true) {
6517
+ gen.forIn("key", data, (key) => props === void 0 ? unevaluatedPropCode(key) : gen.if(unevaluatedStatic(props, key), () => unevaluatedPropCode(key)));
6518
+ }
6519
+ it.props = true;
6520
+ cxt.ok((0, codegen_1._)`${errsCount} === ${names_1.default.errors}`);
6521
+ function unevaluatedPropCode(key) {
6522
+ if (schema === false) {
6523
+ cxt.setParams({ unevaluatedProperty: key });
6524
+ cxt.error();
6525
+ if (!allErrors)
6526
+ gen.break();
6527
+ return;
6528
+ }
6529
+ if (!(0, util_1.alwaysValidSchema)(it, schema)) {
6530
+ const valid = gen.name("valid");
6531
+ cxt.subschema({
6532
+ keyword: "unevaluatedProperties",
6533
+ dataProp: key,
6534
+ dataPropType: util_1.Type.Str
6535
+ }, valid);
6536
+ if (!allErrors)
6537
+ gen.if((0, codegen_1.not)(valid), () => gen.break());
6538
+ }
6539
+ }
6540
+ function unevaluatedDynamic(evaluatedProps, key) {
6541
+ return (0, codegen_1._)`!${evaluatedProps} || !${evaluatedProps}[${key}]`;
6542
+ }
6543
+ function unevaluatedStatic(evaluatedProps, key) {
6544
+ const ps = [];
6545
+ for (const p in evaluatedProps) {
6546
+ if (evaluatedProps[p] === true)
6547
+ ps.push((0, codegen_1._)`${key} !== ${p}`);
6548
+ }
6549
+ return (0, codegen_1.and)(...ps);
6550
+ }
6551
+ }
6552
+ };
6553
+ exports$1.default = def;
6554
+ }
6555
+ });
6556
+
6557
+ // ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/unevaluated/unevaluatedItems.js
6558
+ var require_unevaluatedItems = chunkDZUJEN5N_cjs.__commonJS({
6559
+ "../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/unevaluated/unevaluatedItems.js"(exports$1) {
6560
+ Object.defineProperty(exports$1, "__esModule", { value: true });
6561
+ var codegen_1 = require_codegen();
6562
+ var util_1 = require_util();
6563
+ var error = {
6564
+ message: ({ params: { len } }) => (0, codegen_1.str)`must NOT have more than ${len} items`,
6565
+ params: ({ params: { len } }) => (0, codegen_1._)`{limit: ${len}}`
6566
+ };
6567
+ var def = {
6568
+ keyword: "unevaluatedItems",
6569
+ type: "array",
6570
+ schemaType: ["boolean", "object"],
6571
+ error,
6572
+ code(cxt) {
6573
+ const { gen, schema, data, it } = cxt;
6574
+ const items = it.items || 0;
6575
+ if (items === true)
6576
+ return;
6577
+ const len = gen.const("len", (0, codegen_1._)`${data}.length`);
6578
+ if (schema === false) {
6579
+ cxt.setParams({ len: items });
6580
+ cxt.fail((0, codegen_1._)`${len} > ${items}`);
6581
+ } else if (typeof schema == "object" && !(0, util_1.alwaysValidSchema)(it, schema)) {
6582
+ const valid = gen.var("valid", (0, codegen_1._)`${len} <= ${items}`);
6583
+ gen.if((0, codegen_1.not)(valid), () => validateItems(valid, items));
6584
+ cxt.ok(valid);
6585
+ }
6586
+ it.items = true;
6587
+ function validateItems(valid, from) {
6588
+ gen.forRange("i", from, len, (i) => {
6589
+ cxt.subschema({ keyword: "unevaluatedItems", dataProp: i, dataPropType: util_1.Type.Num }, valid);
6590
+ if (!it.allErrors)
6591
+ gen.if((0, codegen_1.not)(valid), () => gen.break());
6592
+ });
6593
+ }
6594
+ }
6595
+ };
6596
+ exports$1.default = def;
6597
+ }
6598
+ });
6599
+
6600
+ // ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/unevaluated/index.js
6601
+ var require_unevaluated = chunkDZUJEN5N_cjs.__commonJS({
6602
+ "../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/unevaluated/index.js"(exports$1) {
6603
+ Object.defineProperty(exports$1, "__esModule", { value: true });
6604
+ var unevaluatedProperties_1 = require_unevaluatedProperties();
6605
+ var unevaluatedItems_1 = require_unevaluatedItems();
6606
+ var unevaluated = [unevaluatedProperties_1.default, unevaluatedItems_1.default];
6607
+ exports$1.default = unevaluated;
6608
+ }
6609
+ });
6610
+
6611
+ // ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/draft2020.js
6612
+ var require_draft2020 = chunkDZUJEN5N_cjs.__commonJS({
6613
+ "../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/draft2020.js"(exports$1) {
6614
+ Object.defineProperty(exports$1, "__esModule", { value: true });
6615
+ var core_1 = require_core2();
6616
+ var validation_1 = require_validation();
6617
+ var applicator_1 = require_applicator();
6618
+ var dynamic_1 = require_dynamic();
6619
+ var next_1 = require_next();
6620
+ var unevaluated_1 = require_unevaluated();
6621
+ var format_1 = require_format2();
6622
+ var metadata_1 = require_metadata();
6623
+ var draft2020Vocabularies = [
6624
+ dynamic_1.default,
6625
+ core_1.default,
6626
+ validation_1.default,
6627
+ (0, applicator_1.default)(true),
6628
+ format_1.default,
6629
+ metadata_1.metadataVocabulary,
6630
+ metadata_1.contentVocabulary,
6631
+ next_1.default,
6632
+ unevaluated_1.default
6633
+ ];
6634
+ exports$1.default = draft2020Vocabularies;
6635
+ }
6636
+ });
6637
+
6638
+ // ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/refs/json-schema-2020-12/schema.json
6639
+ var require_schema = chunkDZUJEN5N_cjs.__commonJS({
6640
+ "../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/refs/json-schema-2020-12/schema.json"(exports$1, module) {
6641
+ module.exports = {
6642
+ $schema: "https://json-schema.org/draft/2020-12/schema",
6643
+ $id: "https://json-schema.org/draft/2020-12/schema",
6644
+ $vocabulary: {
6645
+ "https://json-schema.org/draft/2020-12/vocab/core": true,
6646
+ "https://json-schema.org/draft/2020-12/vocab/applicator": true,
6647
+ "https://json-schema.org/draft/2020-12/vocab/unevaluated": true,
6648
+ "https://json-schema.org/draft/2020-12/vocab/validation": true,
6649
+ "https://json-schema.org/draft/2020-12/vocab/meta-data": true,
6650
+ "https://json-schema.org/draft/2020-12/vocab/format-annotation": true,
6651
+ "https://json-schema.org/draft/2020-12/vocab/content": true
6652
+ },
6653
+ $dynamicAnchor: "meta",
6654
+ title: "Core and Validation specifications meta-schema",
6655
+ allOf: [
6656
+ { $ref: "meta/core" },
6657
+ { $ref: "meta/applicator" },
6658
+ { $ref: "meta/unevaluated" },
6659
+ { $ref: "meta/validation" },
6660
+ { $ref: "meta/meta-data" },
6661
+ { $ref: "meta/format-annotation" },
6662
+ { $ref: "meta/content" }
6663
+ ],
6664
+ type: ["object", "boolean"],
6665
+ $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.",
6666
+ properties: {
6667
+ definitions: {
6668
+ $comment: '"definitions" has been replaced by "$defs".',
6669
+ type: "object",
6670
+ additionalProperties: { $dynamicRef: "#meta" },
6671
+ deprecated: true,
6672
+ default: {}
6673
+ },
6674
+ dependencies: {
6675
+ $comment: '"dependencies" has been split and replaced by "dependentSchemas" and "dependentRequired" in order to serve their differing semantics.',
6676
+ type: "object",
6677
+ additionalProperties: {
6678
+ anyOf: [{ $dynamicRef: "#meta" }, { $ref: "meta/validation#/$defs/stringArray" }]
6679
+ },
6680
+ deprecated: true,
6681
+ default: {}
6682
+ },
6683
+ $recursiveAnchor: {
6684
+ $comment: '"$recursiveAnchor" has been replaced by "$dynamicAnchor".',
6685
+ $ref: "meta/core#/$defs/anchorString",
6686
+ deprecated: true
6687
+ },
6688
+ $recursiveRef: {
6689
+ $comment: '"$recursiveRef" has been replaced by "$dynamicRef".',
6690
+ $ref: "meta/core#/$defs/uriReferenceString",
6691
+ deprecated: true
6692
+ }
6693
+ }
6694
+ };
6695
+ }
6696
+ });
6697
+
6698
+ // ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/refs/json-schema-2020-12/meta/applicator.json
6699
+ var require_applicator2 = chunkDZUJEN5N_cjs.__commonJS({
6700
+ "../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/refs/json-schema-2020-12/meta/applicator.json"(exports$1, module) {
6701
+ module.exports = {
6702
+ $schema: "https://json-schema.org/draft/2020-12/schema",
6703
+ $id: "https://json-schema.org/draft/2020-12/meta/applicator",
6704
+ $vocabulary: {
6705
+ "https://json-schema.org/draft/2020-12/vocab/applicator": true
6706
+ },
6707
+ $dynamicAnchor: "meta",
6708
+ title: "Applicator vocabulary meta-schema",
6709
+ type: ["object", "boolean"],
6710
+ properties: {
6711
+ prefixItems: { $ref: "#/$defs/schemaArray" },
6712
+ items: { $dynamicRef: "#meta" },
6713
+ contains: { $dynamicRef: "#meta" },
6714
+ additionalProperties: { $dynamicRef: "#meta" },
6715
+ properties: {
6716
+ type: "object",
6717
+ additionalProperties: { $dynamicRef: "#meta" },
6718
+ default: {}
6719
+ },
6720
+ patternProperties: {
6721
+ type: "object",
6722
+ additionalProperties: { $dynamicRef: "#meta" },
6723
+ propertyNames: { format: "regex" },
6724
+ default: {}
6725
+ },
6726
+ dependentSchemas: {
6727
+ type: "object",
6728
+ additionalProperties: { $dynamicRef: "#meta" },
6729
+ default: {}
6730
+ },
6731
+ propertyNames: { $dynamicRef: "#meta" },
6732
+ if: { $dynamicRef: "#meta" },
6733
+ then: { $dynamicRef: "#meta" },
6734
+ else: { $dynamicRef: "#meta" },
6735
+ allOf: { $ref: "#/$defs/schemaArray" },
6736
+ anyOf: { $ref: "#/$defs/schemaArray" },
6737
+ oneOf: { $ref: "#/$defs/schemaArray" },
6738
+ not: { $dynamicRef: "#meta" }
6739
+ },
6740
+ $defs: {
6741
+ schemaArray: {
6742
+ type: "array",
6743
+ minItems: 1,
6744
+ items: { $dynamicRef: "#meta" }
6745
+ }
6746
+ }
6747
+ };
6748
+ }
6749
+ });
6750
+
6751
+ // ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/refs/json-schema-2020-12/meta/unevaluated.json
6752
+ var require_unevaluated2 = chunkDZUJEN5N_cjs.__commonJS({
6753
+ "../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/refs/json-schema-2020-12/meta/unevaluated.json"(exports$1, module) {
6754
+ module.exports = {
6755
+ $schema: "https://json-schema.org/draft/2020-12/schema",
6756
+ $id: "https://json-schema.org/draft/2020-12/meta/unevaluated",
6757
+ $vocabulary: {
6758
+ "https://json-schema.org/draft/2020-12/vocab/unevaluated": true
6759
+ },
6760
+ $dynamicAnchor: "meta",
6761
+ title: "Unevaluated applicator vocabulary meta-schema",
6762
+ type: ["object", "boolean"],
6763
+ properties: {
6764
+ unevaluatedItems: { $dynamicRef: "#meta" },
6765
+ unevaluatedProperties: { $dynamicRef: "#meta" }
6766
+ }
6767
+ };
6768
+ }
6769
+ });
6770
+
6771
+ // ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/refs/json-schema-2020-12/meta/content.json
6772
+ var require_content = chunkDZUJEN5N_cjs.__commonJS({
6773
+ "../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/refs/json-schema-2020-12/meta/content.json"(exports$1, module) {
6774
+ module.exports = {
6775
+ $schema: "https://json-schema.org/draft/2020-12/schema",
6776
+ $id: "https://json-schema.org/draft/2020-12/meta/content",
6777
+ $vocabulary: {
6778
+ "https://json-schema.org/draft/2020-12/vocab/content": true
6779
+ },
6780
+ $dynamicAnchor: "meta",
6781
+ title: "Content vocabulary meta-schema",
6782
+ type: ["object", "boolean"],
6783
+ properties: {
6784
+ contentEncoding: { type: "string" },
6785
+ contentMediaType: { type: "string" },
6786
+ contentSchema: { $dynamicRef: "#meta" }
6787
+ }
6788
+ };
6789
+ }
6790
+ });
6791
+
6792
+ // ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/refs/json-schema-2020-12/meta/core.json
6793
+ var require_core3 = chunkDZUJEN5N_cjs.__commonJS({
6794
+ "../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/refs/json-schema-2020-12/meta/core.json"(exports$1, module) {
6795
+ module.exports = {
6796
+ $schema: "https://json-schema.org/draft/2020-12/schema",
6797
+ $id: "https://json-schema.org/draft/2020-12/meta/core",
6798
+ $vocabulary: {
6799
+ "https://json-schema.org/draft/2020-12/vocab/core": true
6800
+ },
6801
+ $dynamicAnchor: "meta",
6802
+ title: "Core vocabulary meta-schema",
6803
+ type: ["object", "boolean"],
6804
+ properties: {
6805
+ $id: {
6806
+ $ref: "#/$defs/uriReferenceString",
6807
+ $comment: "Non-empty fragments not allowed.",
6808
+ pattern: "^[^#]*#?$"
6809
+ },
6810
+ $schema: { $ref: "#/$defs/uriString" },
6811
+ $ref: { $ref: "#/$defs/uriReferenceString" },
6812
+ $anchor: { $ref: "#/$defs/anchorString" },
6813
+ $dynamicRef: { $ref: "#/$defs/uriReferenceString" },
6814
+ $dynamicAnchor: { $ref: "#/$defs/anchorString" },
6815
+ $vocabulary: {
6816
+ type: "object",
6817
+ propertyNames: { $ref: "#/$defs/uriString" },
6818
+ additionalProperties: {
6819
+ type: "boolean"
6820
+ }
6821
+ },
6822
+ $comment: {
6823
+ type: "string"
6824
+ },
6825
+ $defs: {
6826
+ type: "object",
6827
+ additionalProperties: { $dynamicRef: "#meta" }
6828
+ }
6829
+ },
6830
+ $defs: {
6831
+ anchorString: {
6832
+ type: "string",
6833
+ pattern: "^[A-Za-z_][-A-Za-z0-9._]*$"
6834
+ },
6835
+ uriString: {
6836
+ type: "string",
6837
+ format: "uri"
6838
+ },
6839
+ uriReferenceString: {
6840
+ type: "string",
6841
+ format: "uri-reference"
6842
+ }
6843
+ }
6844
+ };
6845
+ }
6846
+ });
6847
+
6848
+ // ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/refs/json-schema-2020-12/meta/format-annotation.json
6849
+ var require_format_annotation = chunkDZUJEN5N_cjs.__commonJS({
6850
+ "../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/refs/json-schema-2020-12/meta/format-annotation.json"(exports$1, module) {
6851
+ module.exports = {
6852
+ $schema: "https://json-schema.org/draft/2020-12/schema",
6853
+ $id: "https://json-schema.org/draft/2020-12/meta/format-annotation",
6854
+ $vocabulary: {
6855
+ "https://json-schema.org/draft/2020-12/vocab/format-annotation": true
6856
+ },
6857
+ $dynamicAnchor: "meta",
6858
+ title: "Format vocabulary meta-schema for annotation results",
6859
+ type: ["object", "boolean"],
6860
+ properties: {
6861
+ format: { type: "string" }
6862
+ }
6863
+ };
6864
+ }
6865
+ });
6866
+
6867
+ // ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/refs/json-schema-2020-12/meta/meta-data.json
6868
+ var require_meta_data = chunkDZUJEN5N_cjs.__commonJS({
6869
+ "../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/refs/json-schema-2020-12/meta/meta-data.json"(exports$1, module) {
6870
+ module.exports = {
6871
+ $schema: "https://json-schema.org/draft/2020-12/schema",
6872
+ $id: "https://json-schema.org/draft/2020-12/meta/meta-data",
6873
+ $vocabulary: {
6874
+ "https://json-schema.org/draft/2020-12/vocab/meta-data": true
6875
+ },
6876
+ $dynamicAnchor: "meta",
6877
+ title: "Meta-data vocabulary meta-schema",
6878
+ type: ["object", "boolean"],
6879
+ properties: {
6880
+ title: {
6881
+ type: "string"
6882
+ },
6883
+ description: {
6884
+ type: "string"
6885
+ },
6886
+ default: true,
6887
+ deprecated: {
6888
+ type: "boolean",
6889
+ default: false
6890
+ },
6891
+ readOnly: {
6892
+ type: "boolean",
6893
+ default: false
6894
+ },
6895
+ writeOnly: {
6896
+ type: "boolean",
6897
+ default: false
6898
+ },
6899
+ examples: {
6900
+ type: "array",
6901
+ items: true
6902
+ }
6903
+ }
6904
+ };
6905
+ }
6906
+ });
6907
+
6908
+ // ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/refs/json-schema-2020-12/meta/validation.json
6909
+ var require_validation2 = chunkDZUJEN5N_cjs.__commonJS({
6910
+ "../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/refs/json-schema-2020-12/meta/validation.json"(exports$1, module) {
6911
+ module.exports = {
6912
+ $schema: "https://json-schema.org/draft/2020-12/schema",
6913
+ $id: "https://json-schema.org/draft/2020-12/meta/validation",
6914
+ $vocabulary: {
6915
+ "https://json-schema.org/draft/2020-12/vocab/validation": true
6916
+ },
6917
+ $dynamicAnchor: "meta",
6918
+ title: "Validation vocabulary meta-schema",
6919
+ type: ["object", "boolean"],
6920
+ properties: {
6921
+ type: {
6922
+ anyOf: [
6923
+ { $ref: "#/$defs/simpleTypes" },
6924
+ {
6925
+ type: "array",
6926
+ items: { $ref: "#/$defs/simpleTypes" },
6927
+ minItems: 1,
6928
+ uniqueItems: true
6929
+ }
6930
+ ]
6931
+ },
6932
+ const: true,
6933
+ enum: {
6934
+ type: "array",
6935
+ items: true
6936
+ },
6937
+ multipleOf: {
6938
+ type: "number",
6939
+ exclusiveMinimum: 0
6940
+ },
6941
+ maximum: {
6942
+ type: "number"
6943
+ },
6944
+ exclusiveMaximum: {
6945
+ type: "number"
6946
+ },
6947
+ minimum: {
6948
+ type: "number"
6949
+ },
6950
+ exclusiveMinimum: {
6951
+ type: "number"
6952
+ },
6953
+ maxLength: { $ref: "#/$defs/nonNegativeInteger" },
6954
+ minLength: { $ref: "#/$defs/nonNegativeIntegerDefault0" },
6955
+ pattern: {
6956
+ type: "string",
6957
+ format: "regex"
6958
+ },
6959
+ maxItems: { $ref: "#/$defs/nonNegativeInteger" },
6960
+ minItems: { $ref: "#/$defs/nonNegativeIntegerDefault0" },
6961
+ uniqueItems: {
6962
+ type: "boolean",
6963
+ default: false
6964
+ },
6965
+ maxContains: { $ref: "#/$defs/nonNegativeInteger" },
6966
+ minContains: {
6967
+ $ref: "#/$defs/nonNegativeInteger",
6968
+ default: 1
6969
+ },
6970
+ maxProperties: { $ref: "#/$defs/nonNegativeInteger" },
6971
+ minProperties: { $ref: "#/$defs/nonNegativeIntegerDefault0" },
6972
+ required: { $ref: "#/$defs/stringArray" },
6973
+ dependentRequired: {
6974
+ type: "object",
6975
+ additionalProperties: {
6976
+ $ref: "#/$defs/stringArray"
6977
+ }
6978
+ }
6979
+ },
6980
+ $defs: {
6981
+ nonNegativeInteger: {
6982
+ type: "integer",
6983
+ minimum: 0
6984
+ },
6985
+ nonNegativeIntegerDefault0: {
6986
+ $ref: "#/$defs/nonNegativeInteger",
6987
+ default: 0
6988
+ },
6989
+ simpleTypes: {
6990
+ enum: ["array", "boolean", "integer", "null", "number", "object", "string"]
6991
+ },
6992
+ stringArray: {
6993
+ type: "array",
6994
+ items: { type: "string" },
6995
+ uniqueItems: true,
6996
+ default: []
6997
+ }
6998
+ }
6999
+ };
7000
+ }
7001
+ });
7002
+
7003
+ // ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/refs/json-schema-2020-12/index.js
7004
+ var require_json_schema_2020_12 = chunkDZUJEN5N_cjs.__commonJS({
7005
+ "../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/refs/json-schema-2020-12/index.js"(exports$1) {
7006
+ Object.defineProperty(exports$1, "__esModule", { value: true });
7007
+ var metaSchema = require_schema();
7008
+ var applicator = require_applicator2();
7009
+ var unevaluated = require_unevaluated2();
7010
+ var content = require_content();
7011
+ var core = require_core3();
7012
+ var format = require_format_annotation();
7013
+ var metadata = require_meta_data();
7014
+ var validation = require_validation2();
7015
+ var META_SUPPORT_DATA = ["/properties"];
7016
+ function addMetaSchema2020($data) {
7017
+ [
7018
+ metaSchema,
7019
+ applicator,
7020
+ unevaluated,
7021
+ content,
7022
+ core,
7023
+ with$data(this, format),
7024
+ metadata,
7025
+ with$data(this, validation)
7026
+ ].forEach((sch) => this.addMetaSchema(sch, void 0, false));
7027
+ return this;
7028
+ function with$data(ajv, sch) {
7029
+ return $data ? ajv.$dataMetaSchema(sch, META_SUPPORT_DATA) : sch;
7030
+ }
7031
+ }
7032
+ exports$1.default = addMetaSchema2020;
7033
+ }
7034
+ });
7035
+
7036
+ // ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/2020.js
7037
+ var require__ = chunkDZUJEN5N_cjs.__commonJS({
7038
+ "../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/2020.js"(exports$1, module) {
7039
+ Object.defineProperty(exports$1, "__esModule", { value: true });
7040
+ exports$1.MissingRefError = exports$1.ValidationError = exports$1.CodeGen = exports$1.Name = exports$1.nil = exports$1.stringify = exports$1.str = exports$1._ = exports$1.KeywordCxt = exports$1.Ajv2020 = void 0;
7041
+ var core_1 = require_core();
7042
+ var draft2020_1 = require_draft2020();
7043
+ var discriminator_1 = require_discriminator();
7044
+ var json_schema_2020_12_1 = require_json_schema_2020_12();
7045
+ var META_SCHEMA_ID = "https://json-schema.org/draft/2020-12/schema";
7046
+ var Ajv20202 = class extends core_1.default {
7047
+ constructor(opts = {}) {
7048
+ super({
7049
+ ...opts,
7050
+ dynamicRef: true,
7051
+ next: true,
7052
+ unevaluated: true
7053
+ });
7054
+ }
7055
+ _addVocabularies() {
7056
+ super._addVocabularies();
7057
+ draft2020_1.default.forEach((v) => this.addVocabulary(v));
7058
+ if (this.opts.discriminator)
7059
+ this.addKeyword(discriminator_1.default);
7060
+ }
7061
+ _addDefaultMetaSchema() {
7062
+ super._addDefaultMetaSchema();
7063
+ const { $data, meta } = this.opts;
7064
+ if (!meta)
7065
+ return;
7066
+ json_schema_2020_12_1.default.call(this, $data);
7067
+ this.refs["http://json-schema.org/schema"] = META_SCHEMA_ID;
7068
+ }
7069
+ defaultMeta() {
7070
+ return this.opts.defaultMeta = super.defaultMeta() || (this.getSchema(META_SCHEMA_ID) ? META_SCHEMA_ID : void 0);
7071
+ }
7072
+ };
7073
+ exports$1.Ajv2020 = Ajv20202;
7074
+ module.exports = exports$1 = Ajv20202;
7075
+ module.exports.Ajv2020 = Ajv20202;
7076
+ Object.defineProperty(exports$1, "__esModule", { value: true });
7077
+ exports$1.default = Ajv20202;
7078
+ var validate_1 = require_validate();
7079
+ Object.defineProperty(exports$1, "KeywordCxt", { enumerable: true, get: function() {
7080
+ return validate_1.KeywordCxt;
7081
+ } });
7082
+ var codegen_1 = require_codegen();
7083
+ Object.defineProperty(exports$1, "_", { enumerable: true, get: function() {
7084
+ return codegen_1._;
7085
+ } });
7086
+ Object.defineProperty(exports$1, "str", { enumerable: true, get: function() {
7087
+ return codegen_1.str;
7088
+ } });
7089
+ Object.defineProperty(exports$1, "stringify", { enumerable: true, get: function() {
7090
+ return codegen_1.stringify;
7091
+ } });
7092
+ Object.defineProperty(exports$1, "nil", { enumerable: true, get: function() {
7093
+ return codegen_1.nil;
7094
+ } });
7095
+ Object.defineProperty(exports$1, "Name", { enumerable: true, get: function() {
7096
+ return codegen_1.Name;
7097
+ } });
7098
+ Object.defineProperty(exports$1, "CodeGen", { enumerable: true, get: function() {
7099
+ return codegen_1.CodeGen;
7100
+ } });
7101
+ var validation_error_1 = require_validation_error();
7102
+ Object.defineProperty(exports$1, "ValidationError", { enumerable: true, get: function() {
7103
+ return validation_error_1.default;
7104
+ } });
7105
+ var ref_error_1 = require_ref_error();
7106
+ Object.defineProperty(exports$1, "MissingRefError", { enumerable: true, get: function() {
7107
+ return ref_error_1.default;
7108
+ } });
7109
+ }
7110
+ });
7111
+
6304
7112
  // src/standard-schema/adapters/json-schema.ts
6305
7113
  var import_ajv = chunkDZUJEN5N_cjs.__toESM(require_ajv(), 1);
7114
+ var import__ = chunkDZUJEN5N_cjs.__toESM(require__(), 1);
6306
7115
  var import_json_schema_traverse = chunkDZUJEN5N_cjs.__toESM(chunk3MLZICLP_cjs.require_json_schema_traverse(), 1);
6307
7116
  var VENDOR = "json-schema";
6308
7117
  var JsonSchemaWrapper = class {
@@ -6420,11 +7229,11 @@ var JsonSchemaWrapper = class {
6420
7229
  */
6421
7230
  #getAjvValidator() {
6422
7231
  if (!this.#ajvValidateCache) {
6423
- this.#ajvInstance = new import_ajv.default({
7232
+ const is2020 = typeof this.#schema.$schema === "string" && this.#schema.$schema.includes("2020-12");
7233
+ const AjvClass = is2020 ? import__.default : import_ajv.default;
7234
+ this.#ajvInstance = new AjvClass({
6424
7235
  allErrors: true,
6425
- // Report all errors, not just the first one
6426
7236
  strict: false,
6427
- // Be lenient with schema keywords
6428
7237
  ...this.#options.ajvOptions
6429
7238
  });
6430
7239
  this.#ajvValidateCache = this.#ajvInstance.compile(this.#schema);
@@ -6452,5 +7261,5 @@ function toStandardSchema(schema, options) {
6452
7261
 
6453
7262
  exports.JsonSchemaWrapper = JsonSchemaWrapper;
6454
7263
  exports.toStandardSchema = toStandardSchema;
6455
- //# sourceMappingURL=chunk-ROFMEFEF.cjs.map
6456
- //# sourceMappingURL=chunk-ROFMEFEF.cjs.map
7264
+ //# sourceMappingURL=chunk-MARLM5PM.cjs.map
7265
+ //# sourceMappingURL=chunk-MARLM5PM.cjs.map