fumadocs-openapi 10.8.4 → 10.8.5

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.
Files changed (91) hide show
  1. package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/2020.js +110 -0
  2. package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/codegen/code.js +138 -0
  3. package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/codegen/index.js +674 -0
  4. package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/codegen/scope.js +141 -0
  5. package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/errors.js +102 -0
  6. package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/index.js +223 -0
  7. package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/names.js +28 -0
  8. package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/ref_error.js +18 -0
  9. package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/resolve.js +133 -0
  10. package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/rules.js +61 -0
  11. package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/util.js +146 -0
  12. package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/validate/applicability.js +23 -0
  13. package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/validate/boolSchema.js +48 -0
  14. package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/validate/dataType.js +172 -0
  15. package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/validate/defaults.js +31 -0
  16. package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/validate/index.js +433 -0
  17. package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/validate/keyword.js +113 -0
  18. package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/validate/subschema.js +72 -0
  19. package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/core.js +583 -0
  20. package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/refs/data.js +18 -0
  21. package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/refs/json-schema-2020-12/index.js +42 -0
  22. package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/refs/json-schema-2020-12/meta/applicator.js +50 -0
  23. package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/refs/json-schema-2020-12/meta/content.js +20 -0
  24. package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/refs/json-schema-2020-12/meta/core.js +51 -0
  25. package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/refs/json-schema-2020-12/meta/format-annotation.js +16 -0
  26. package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/refs/json-schema-2020-12/meta/meta-data.js +36 -0
  27. package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/refs/json-schema-2020-12/meta/unevaluated.js +19 -0
  28. package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/refs/json-schema-2020-12/meta/validation.js +85 -0
  29. package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/refs/json-schema-2020-12/schema.js +59 -0
  30. package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/runtime/equal.js +12 -0
  31. package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/runtime/ucs2length.js +25 -0
  32. package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/runtime/uri.js +12 -0
  33. package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/runtime/validation_error.js +16 -0
  34. package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/additionalItems.js +57 -0
  35. package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/additionalProperties.js +96 -0
  36. package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/allOf.js +29 -0
  37. package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/anyOf.js +16 -0
  38. package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/contains.js +89 -0
  39. package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/dependencies.js +87 -0
  40. package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/dependentSchemas.js +16 -0
  41. package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/if.js +62 -0
  42. package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/index.js +60 -0
  43. package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/items.js +59 -0
  44. package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/items2020.js +34 -0
  45. package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/not.js +31 -0
  46. package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/oneOf.js +51 -0
  47. package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/patternProperties.js +61 -0
  48. package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/prefixItems.js +17 -0
  49. package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/properties.js +52 -0
  50. package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/propertyNames.js +41 -0
  51. package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/thenElse.js +17 -0
  52. package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/code.js +130 -0
  53. package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/core/id.js +14 -0
  54. package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/core/index.js +22 -0
  55. package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/core/ref.js +112 -0
  56. package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/discriminator/index.js +101 -0
  57. package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/discriminator/types.js +14 -0
  58. package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/draft2020.js +35 -0
  59. package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/dynamic/dynamicAnchor.js +46 -0
  60. package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/dynamic/dynamicRef.js +45 -0
  61. package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/dynamic/index.js +22 -0
  62. package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/dynamic/recursiveAnchor.js +20 -0
  63. package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/dynamic/recursiveRef.js +15 -0
  64. package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/format/format.js +92 -0
  65. package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/format/index.js +10 -0
  66. package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/metadata.js +23 -0
  67. package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/next.js +19 -0
  68. package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/unevaluated/index.js +13 -0
  69. package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/unevaluated/unevaluatedItems.js +46 -0
  70. package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/unevaluated/unevaluatedProperties.js +59 -0
  71. package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/const.js +27 -0
  72. package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/dependentRequired.js +17 -0
  73. package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/enum.js +49 -0
  74. package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/index.js +48 -0
  75. package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/limitContains.js +18 -0
  76. package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/limitItems.js +28 -0
  77. package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/limitLength.js +33 -0
  78. package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/limitNumber.js +47 -0
  79. package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/limitProperties.js +28 -0
  80. package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/multipleOf.js +27 -0
  81. package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/pattern.js +38 -0
  82. package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/required.js +72 -0
  83. package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/uniqueItems.js +70 -0
  84. package/dist/node_modules/.pnpm/fast-deep-equal@3.1.3/node_modules/fast-deep-equal/index.js +33 -0
  85. package/dist/node_modules/.pnpm/fast-uri@3.1.0/node_modules/fast-uri/index.js +236 -0
  86. package/dist/node_modules/.pnpm/fast-uri@3.1.0/node_modules/fast-uri/lib/schemes.js +187 -0
  87. package/dist/node_modules/.pnpm/fast-uri@3.1.0/node_modules/fast-uri/lib/utils.js +282 -0
  88. package/dist/node_modules/.pnpm/json-schema-traverse@1.0.0/node_modules/json-schema-traverse/index.js +78 -0
  89. package/dist/playground/schema.d.ts +0 -2
  90. package/dist/playground/schema.js +3 -2
  91. package/package.json +7 -3
@@ -0,0 +1,92 @@
1
+ import { __commonJSMin } from "../../../../../../../../_virtual/_rolldown/runtime.js";
2
+ import { require_codegen } from "../../compile/codegen/index.js";
3
+ //#region ../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/format/format.js
4
+ var require_format = /* @__PURE__ */ __commonJSMin(((exports) => {
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ const codegen_1 = require_codegen();
7
+ exports.default = {
8
+ keyword: "format",
9
+ type: ["number", "string"],
10
+ schemaType: "string",
11
+ $data: true,
12
+ error: {
13
+ message: ({ schemaCode }) => (0, codegen_1.str)`must match format "${schemaCode}"`,
14
+ params: ({ schemaCode }) => (0, codegen_1._)`{format: ${schemaCode}}`
15
+ },
16
+ code(cxt, ruleType) {
17
+ const { gen, data, $data, schema, schemaCode, it } = cxt;
18
+ const { opts, errSchemaPath, schemaEnv, self } = it;
19
+ if (!opts.validateFormats) return;
20
+ if ($data) validate$DataFormat();
21
+ else validateFormat();
22
+ function validate$DataFormat() {
23
+ const fmts = gen.scopeValue("formats", {
24
+ ref: self.formats,
25
+ code: opts.code.formats
26
+ });
27
+ const fDef = gen.const("fDef", (0, codegen_1._)`${fmts}[${schemaCode}]`);
28
+ const fType = gen.let("fType");
29
+ const format = gen.let("format");
30
+ gen.if((0, codegen_1._)`typeof ${fDef} == "object" && !(${fDef} instanceof RegExp)`, () => gen.assign(fType, (0, codegen_1._)`${fDef}.type || "string"`).assign(format, (0, codegen_1._)`${fDef}.validate`), () => gen.assign(fType, (0, codegen_1._)`"string"`).assign(format, fDef));
31
+ cxt.fail$data((0, codegen_1.or)(unknownFmt(), invalidFmt()));
32
+ function unknownFmt() {
33
+ if (opts.strictSchema === false) return codegen_1.nil;
34
+ return (0, codegen_1._)`${schemaCode} && !${format}`;
35
+ }
36
+ function invalidFmt() {
37
+ const callFormat = schemaEnv.$async ? (0, codegen_1._)`(${fDef}.async ? await ${format}(${data}) : ${format}(${data}))` : (0, codegen_1._)`${format}(${data})`;
38
+ const validData = (0, codegen_1._)`(typeof ${format} == "function" ? ${callFormat} : ${format}.test(${data}))`;
39
+ return (0, codegen_1._)`${format} && ${format} !== true && ${fType} === ${ruleType} && !${validData}`;
40
+ }
41
+ }
42
+ function validateFormat() {
43
+ const formatDef = self.formats[schema];
44
+ if (!formatDef) {
45
+ unknownFormat();
46
+ return;
47
+ }
48
+ if (formatDef === true) return;
49
+ const [fmtType, format, fmtRef] = getFormat(formatDef);
50
+ if (fmtType === ruleType) cxt.pass(validCondition());
51
+ function unknownFormat() {
52
+ if (opts.strictSchema === false) {
53
+ self.logger.warn(unknownMsg());
54
+ return;
55
+ }
56
+ throw new Error(unknownMsg());
57
+ function unknownMsg() {
58
+ return `unknown format "${schema}" ignored in schema at path "${errSchemaPath}"`;
59
+ }
60
+ }
61
+ function getFormat(fmtDef) {
62
+ const code = fmtDef instanceof RegExp ? (0, codegen_1.regexpCode)(fmtDef) : opts.code.formats ? (0, codegen_1._)`${opts.code.formats}${(0, codegen_1.getProperty)(schema)}` : void 0;
63
+ const fmt = gen.scopeValue("formats", {
64
+ key: schema,
65
+ ref: fmtDef,
66
+ code
67
+ });
68
+ if (typeof fmtDef == "object" && !(fmtDef instanceof RegExp)) return [
69
+ fmtDef.type || "string",
70
+ fmtDef.validate,
71
+ (0, codegen_1._)`${fmt}.validate`
72
+ ];
73
+ return [
74
+ "string",
75
+ fmtDef,
76
+ fmt
77
+ ];
78
+ }
79
+ function validCondition() {
80
+ if (typeof formatDef == "object" && !(formatDef instanceof RegExp) && formatDef.async) {
81
+ if (!schemaEnv.$async) throw new Error("async format in sync schema");
82
+ return (0, codegen_1._)`await ${fmtRef}(${data})`;
83
+ }
84
+ return typeof format == "function" ? (0, codegen_1._)`${fmtRef}(${data})` : (0, codegen_1._)`${fmtRef}.test(${data})`;
85
+ }
86
+ }
87
+ }
88
+ };
89
+ }));
90
+ //#endregion
91
+ export default require_format();
92
+ export { require_format };
@@ -0,0 +1,10 @@
1
+ import { __commonJSMin } from "../../../../../../../../_virtual/_rolldown/runtime.js";
2
+ import { require_format as require_format$1 } from "./format.js";
3
+ //#region ../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/format/index.js
4
+ var require_format = /* @__PURE__ */ __commonJSMin(((exports) => {
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.default = [require_format$1().default];
7
+ }));
8
+ //#endregion
9
+ export default require_format();
10
+ export { require_format };
@@ -0,0 +1,23 @@
1
+ import { __commonJSMin } from "../../../../../../../_virtual/_rolldown/runtime.js";
2
+ //#region ../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/metadata.js
3
+ var require_metadata = /* @__PURE__ */ __commonJSMin(((exports) => {
4
+ Object.defineProperty(exports, "__esModule", { value: true });
5
+ exports.contentVocabulary = exports.metadataVocabulary = void 0;
6
+ exports.metadataVocabulary = [
7
+ "title",
8
+ "description",
9
+ "default",
10
+ "deprecated",
11
+ "readOnly",
12
+ "writeOnly",
13
+ "examples"
14
+ ];
15
+ exports.contentVocabulary = [
16
+ "contentMediaType",
17
+ "contentEncoding",
18
+ "contentSchema"
19
+ ];
20
+ }));
21
+ //#endregion
22
+ export default require_metadata();
23
+ export { require_metadata };
@@ -0,0 +1,19 @@
1
+ import { __commonJSMin } from "../../../../../../../_virtual/_rolldown/runtime.js";
2
+ import { require_dependentRequired } from "./validation/dependentRequired.js";
3
+ import { require_dependentSchemas } from "./applicator/dependentSchemas.js";
4
+ import { require_limitContains } from "./validation/limitContains.js";
5
+ //#region ../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/next.js
6
+ var require_next = /* @__PURE__ */ __commonJSMin(((exports) => {
7
+ Object.defineProperty(exports, "__esModule", { value: true });
8
+ const dependentRequired_1 = require_dependentRequired();
9
+ const dependentSchemas_1 = require_dependentSchemas();
10
+ const limitContains_1 = require_limitContains();
11
+ exports.default = [
12
+ dependentRequired_1.default,
13
+ dependentSchemas_1.default,
14
+ limitContains_1.default
15
+ ];
16
+ }));
17
+ //#endregion
18
+ export default require_next();
19
+ export { require_next };
@@ -0,0 +1,13 @@
1
+ import { __commonJSMin } from "../../../../../../../../_virtual/_rolldown/runtime.js";
2
+ import { require_unevaluatedProperties } from "./unevaluatedProperties.js";
3
+ import { require_unevaluatedItems } from "./unevaluatedItems.js";
4
+ //#region ../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/unevaluated/index.js
5
+ var require_unevaluated = /* @__PURE__ */ __commonJSMin(((exports) => {
6
+ Object.defineProperty(exports, "__esModule", { value: true });
7
+ const unevaluatedProperties_1 = require_unevaluatedProperties();
8
+ const unevaluatedItems_1 = require_unevaluatedItems();
9
+ exports.default = [unevaluatedProperties_1.default, unevaluatedItems_1.default];
10
+ }));
11
+ //#endregion
12
+ export default require_unevaluated();
13
+ export { require_unevaluated };
@@ -0,0 +1,46 @@
1
+ import { __commonJSMin } from "../../../../../../../../_virtual/_rolldown/runtime.js";
2
+ import { require_codegen } from "../../compile/codegen/index.js";
3
+ import { require_util } from "../../compile/util.js";
4
+ //#region ../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/unevaluated/unevaluatedItems.js
5
+ var require_unevaluatedItems = /* @__PURE__ */ __commonJSMin(((exports) => {
6
+ Object.defineProperty(exports, "__esModule", { value: true });
7
+ const codegen_1 = require_codegen();
8
+ const util_1 = require_util();
9
+ exports.default = {
10
+ keyword: "unevaluatedItems",
11
+ type: "array",
12
+ schemaType: ["boolean", "object"],
13
+ error: {
14
+ message: ({ params: { len } }) => (0, codegen_1.str)`must NOT have more than ${len} items`,
15
+ params: ({ params: { len } }) => (0, codegen_1._)`{limit: ${len}}`
16
+ },
17
+ code(cxt) {
18
+ const { gen, schema, data, it } = cxt;
19
+ const items = it.items || 0;
20
+ if (items === true) return;
21
+ const len = gen.const("len", (0, codegen_1._)`${data}.length`);
22
+ if (schema === false) {
23
+ cxt.setParams({ len: items });
24
+ cxt.fail((0, codegen_1._)`${len} > ${items}`);
25
+ } else if (typeof schema == "object" && !(0, util_1.alwaysValidSchema)(it, schema)) {
26
+ const valid = gen.var("valid", (0, codegen_1._)`${len} <= ${items}`);
27
+ gen.if((0, codegen_1.not)(valid), () => validateItems(valid, items));
28
+ cxt.ok(valid);
29
+ }
30
+ it.items = true;
31
+ function validateItems(valid, from) {
32
+ gen.forRange("i", from, len, (i) => {
33
+ cxt.subschema({
34
+ keyword: "unevaluatedItems",
35
+ dataProp: i,
36
+ dataPropType: util_1.Type.Num
37
+ }, valid);
38
+ if (!it.allErrors) gen.if((0, codegen_1.not)(valid), () => gen.break());
39
+ });
40
+ }
41
+ }
42
+ };
43
+ }));
44
+ //#endregion
45
+ export default require_unevaluatedItems();
46
+ export { require_unevaluatedItems };
@@ -0,0 +1,59 @@
1
+ import { __commonJSMin } from "../../../../../../../../_virtual/_rolldown/runtime.js";
2
+ import { require_codegen } from "../../compile/codegen/index.js";
3
+ import { require_util } from "../../compile/util.js";
4
+ import { require_names } from "../../compile/names.js";
5
+ //#region ../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/unevaluated/unevaluatedProperties.js
6
+ var require_unevaluatedProperties = /* @__PURE__ */ __commonJSMin(((exports) => {
7
+ Object.defineProperty(exports, "__esModule", { value: true });
8
+ const codegen_1 = require_codegen();
9
+ const util_1 = require_util();
10
+ const names_1 = require_names();
11
+ exports.default = {
12
+ keyword: "unevaluatedProperties",
13
+ type: "object",
14
+ schemaType: ["boolean", "object"],
15
+ trackErrors: true,
16
+ error: {
17
+ message: "must NOT have unevaluated properties",
18
+ params: ({ params }) => (0, codegen_1._)`{unevaluatedProperty: ${params.unevaluatedProperty}}`
19
+ },
20
+ code(cxt) {
21
+ const { gen, schema, data, errsCount, it } = cxt;
22
+ /* istanbul ignore if */
23
+ if (!errsCount) throw new Error("ajv implementation error");
24
+ const { allErrors, props } = it;
25
+ 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))));
26
+ else if (props !== true) gen.forIn("key", data, (key) => props === void 0 ? unevaluatedPropCode(key) : gen.if(unevaluatedStatic(props, key), () => unevaluatedPropCode(key)));
27
+ it.props = true;
28
+ cxt.ok((0, codegen_1._)`${errsCount} === ${names_1.default.errors}`);
29
+ function unevaluatedPropCode(key) {
30
+ if (schema === false) {
31
+ cxt.setParams({ unevaluatedProperty: key });
32
+ cxt.error();
33
+ if (!allErrors) gen.break();
34
+ return;
35
+ }
36
+ if (!(0, util_1.alwaysValidSchema)(it, schema)) {
37
+ const valid = gen.name("valid");
38
+ cxt.subschema({
39
+ keyword: "unevaluatedProperties",
40
+ dataProp: key,
41
+ dataPropType: util_1.Type.Str
42
+ }, valid);
43
+ if (!allErrors) gen.if((0, codegen_1.not)(valid), () => gen.break());
44
+ }
45
+ }
46
+ function unevaluatedDynamic(evaluatedProps, key) {
47
+ return (0, codegen_1._)`!${evaluatedProps} || !${evaluatedProps}[${key}]`;
48
+ }
49
+ function unevaluatedStatic(evaluatedProps, key) {
50
+ const ps = [];
51
+ for (const p in evaluatedProps) if (evaluatedProps[p] === true) ps.push((0, codegen_1._)`${key} !== ${p}`);
52
+ return (0, codegen_1.and)(...ps);
53
+ }
54
+ }
55
+ };
56
+ }));
57
+ //#endregion
58
+ export default require_unevaluatedProperties();
59
+ export { require_unevaluatedProperties };
@@ -0,0 +1,27 @@
1
+ import { __commonJSMin } from "../../../../../../../../_virtual/_rolldown/runtime.js";
2
+ import { require_codegen } from "../../compile/codegen/index.js";
3
+ import { require_util } from "../../compile/util.js";
4
+ import { require_equal } from "../../runtime/equal.js";
5
+ //#region ../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/const.js
6
+ var require_const = /* @__PURE__ */ __commonJSMin(((exports) => {
7
+ Object.defineProperty(exports, "__esModule", { value: true });
8
+ const codegen_1 = require_codegen();
9
+ const util_1 = require_util();
10
+ const equal_1 = require_equal();
11
+ exports.default = {
12
+ keyword: "const",
13
+ $data: true,
14
+ error: {
15
+ message: "must be equal to constant",
16
+ params: ({ schemaCode }) => (0, codegen_1._)`{allowedValue: ${schemaCode}}`
17
+ },
18
+ code(cxt) {
19
+ const { gen, data, $data, schemaCode, schema } = cxt;
20
+ if ($data || schema && typeof schema == "object") cxt.fail$data((0, codegen_1._)`!${(0, util_1.useFunc)(gen, equal_1.default)}(${data}, ${schemaCode})`);
21
+ else cxt.fail((0, codegen_1._)`${schema} !== ${data}`);
22
+ }
23
+ };
24
+ }));
25
+ //#endregion
26
+ export default require_const();
27
+ export { require_const };
@@ -0,0 +1,17 @@
1
+ import { __commonJSMin } from "../../../../../../../../_virtual/_rolldown/runtime.js";
2
+ import { require_dependencies } from "../applicator/dependencies.js";
3
+ //#region ../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/dependentRequired.js
4
+ var require_dependentRequired = /* @__PURE__ */ __commonJSMin(((exports) => {
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ const dependencies_1 = require_dependencies();
7
+ exports.default = {
8
+ keyword: "dependentRequired",
9
+ type: "object",
10
+ schemaType: "object",
11
+ error: dependencies_1.error,
12
+ code: (cxt) => (0, dependencies_1.validatePropertyDeps)(cxt)
13
+ };
14
+ }));
15
+ //#endregion
16
+ export default require_dependentRequired();
17
+ export { require_dependentRequired };
@@ -0,0 +1,49 @@
1
+ import { __commonJSMin } from "../../../../../../../../_virtual/_rolldown/runtime.js";
2
+ import { require_codegen } from "../../compile/codegen/index.js";
3
+ import { require_util } from "../../compile/util.js";
4
+ import { require_equal } from "../../runtime/equal.js";
5
+ //#region ../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/enum.js
6
+ var require_enum = /* @__PURE__ */ __commonJSMin(((exports) => {
7
+ Object.defineProperty(exports, "__esModule", { value: true });
8
+ const codegen_1 = require_codegen();
9
+ const util_1 = require_util();
10
+ const equal_1 = require_equal();
11
+ exports.default = {
12
+ keyword: "enum",
13
+ schemaType: "array",
14
+ $data: true,
15
+ error: {
16
+ message: "must be equal to one of the allowed values",
17
+ params: ({ schemaCode }) => (0, codegen_1._)`{allowedValues: ${schemaCode}}`
18
+ },
19
+ code(cxt) {
20
+ const { gen, data, $data, schema, schemaCode, it } = cxt;
21
+ if (!$data && schema.length === 0) throw new Error("enum must have non-empty array");
22
+ const useLoop = schema.length >= it.opts.loopEnum;
23
+ let eql;
24
+ const getEql = () => eql !== null && eql !== void 0 ? eql : eql = (0, util_1.useFunc)(gen, equal_1.default);
25
+ let valid;
26
+ if (useLoop || $data) {
27
+ valid = gen.let("valid");
28
+ cxt.block$data(valid, loopEnum);
29
+ } else {
30
+ /* istanbul ignore if */
31
+ if (!Array.isArray(schema)) throw new Error("ajv implementation error");
32
+ const vSchema = gen.const("vSchema", schemaCode);
33
+ valid = (0, codegen_1.or)(...schema.map((_x, i) => equalCode(vSchema, i)));
34
+ }
35
+ cxt.pass(valid);
36
+ function loopEnum() {
37
+ gen.assign(valid, false);
38
+ gen.forOf("v", schemaCode, (v) => gen.if((0, codegen_1._)`${getEql()}(${data}, ${v})`, () => gen.assign(valid, true).break()));
39
+ }
40
+ function equalCode(vSchema, i) {
41
+ const sch = schema[i];
42
+ return typeof sch === "object" && sch !== null ? (0, codegen_1._)`${getEql()}(${data}, ${vSchema}[${i}])` : (0, codegen_1._)`${data} === ${sch}`;
43
+ }
44
+ }
45
+ };
46
+ }));
47
+ //#endregion
48
+ export default require_enum();
49
+ export { require_enum };
@@ -0,0 +1,48 @@
1
+ import { __commonJSMin } from "../../../../../../../../_virtual/_rolldown/runtime.js";
2
+ import { require_limitNumber } from "./limitNumber.js";
3
+ import { require_multipleOf } from "./multipleOf.js";
4
+ import { require_limitLength } from "./limitLength.js";
5
+ import { require_pattern } from "./pattern.js";
6
+ import { require_limitProperties } from "./limitProperties.js";
7
+ import { require_required } from "./required.js";
8
+ import { require_limitItems } from "./limitItems.js";
9
+ import { require_uniqueItems } from "./uniqueItems.js";
10
+ import { require_const } from "./const.js";
11
+ import { require_enum } from "./enum.js";
12
+ //#region ../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/index.js
13
+ var require_validation = /* @__PURE__ */ __commonJSMin(((exports) => {
14
+ Object.defineProperty(exports, "__esModule", { value: true });
15
+ const limitNumber_1 = require_limitNumber();
16
+ const multipleOf_1 = require_multipleOf();
17
+ const limitLength_1 = require_limitLength();
18
+ const pattern_1 = require_pattern();
19
+ const limitProperties_1 = require_limitProperties();
20
+ const required_1 = require_required();
21
+ const limitItems_1 = require_limitItems();
22
+ const uniqueItems_1 = require_uniqueItems();
23
+ const const_1 = require_const();
24
+ const enum_1 = require_enum();
25
+ exports.default = [
26
+ limitNumber_1.default,
27
+ multipleOf_1.default,
28
+ limitLength_1.default,
29
+ pattern_1.default,
30
+ limitProperties_1.default,
31
+ required_1.default,
32
+ limitItems_1.default,
33
+ uniqueItems_1.default,
34
+ {
35
+ keyword: "type",
36
+ schemaType: ["string", "array"]
37
+ },
38
+ {
39
+ keyword: "nullable",
40
+ schemaType: "boolean"
41
+ },
42
+ const_1.default,
43
+ enum_1.default
44
+ ];
45
+ }));
46
+ //#endregion
47
+ export default require_validation();
48
+ export { require_validation };
@@ -0,0 +1,18 @@
1
+ import { __commonJSMin } from "../../../../../../../../_virtual/_rolldown/runtime.js";
2
+ import { require_util } from "../../compile/util.js";
3
+ //#region ../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/limitContains.js
4
+ var require_limitContains = /* @__PURE__ */ __commonJSMin(((exports) => {
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ const util_1 = require_util();
7
+ exports.default = {
8
+ keyword: ["maxContains", "minContains"],
9
+ type: "array",
10
+ schemaType: "number",
11
+ code({ keyword, parentSchema, it }) {
12
+ if (parentSchema.contains === void 0) (0, util_1.checkStrictMode)(it, `"${keyword}" without "contains" is ignored`);
13
+ }
14
+ };
15
+ }));
16
+ //#endregion
17
+ export default require_limitContains();
18
+ export { require_limitContains };
@@ -0,0 +1,28 @@
1
+ import { __commonJSMin } from "../../../../../../../../_virtual/_rolldown/runtime.js";
2
+ import { require_codegen } from "../../compile/codegen/index.js";
3
+ //#region ../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/limitItems.js
4
+ var require_limitItems = /* @__PURE__ */ __commonJSMin(((exports) => {
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ const codegen_1 = require_codegen();
7
+ exports.default = {
8
+ keyword: ["maxItems", "minItems"],
9
+ type: "array",
10
+ schemaType: "number",
11
+ $data: true,
12
+ error: {
13
+ message({ keyword, schemaCode }) {
14
+ const comp = keyword === "maxItems" ? "more" : "fewer";
15
+ return (0, codegen_1.str)`must NOT have ${comp} than ${schemaCode} items`;
16
+ },
17
+ params: ({ schemaCode }) => (0, codegen_1._)`{limit: ${schemaCode}}`
18
+ },
19
+ code(cxt) {
20
+ const { keyword, data, schemaCode } = cxt;
21
+ const op = keyword === "maxItems" ? codegen_1.operators.GT : codegen_1.operators.LT;
22
+ cxt.fail$data((0, codegen_1._)`${data}.length ${op} ${schemaCode}`);
23
+ }
24
+ };
25
+ }));
26
+ //#endregion
27
+ export default require_limitItems();
28
+ export { require_limitItems };
@@ -0,0 +1,33 @@
1
+ import { __commonJSMin } from "../../../../../../../../_virtual/_rolldown/runtime.js";
2
+ import { require_codegen } from "../../compile/codegen/index.js";
3
+ import { require_util } from "../../compile/util.js";
4
+ import { require_ucs2length } from "../../runtime/ucs2length.js";
5
+ //#region ../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/limitLength.js
6
+ var require_limitLength = /* @__PURE__ */ __commonJSMin(((exports) => {
7
+ Object.defineProperty(exports, "__esModule", { value: true });
8
+ const codegen_1 = require_codegen();
9
+ const util_1 = require_util();
10
+ const ucs2length_1 = require_ucs2length();
11
+ exports.default = {
12
+ keyword: ["maxLength", "minLength"],
13
+ type: "string",
14
+ schemaType: "number",
15
+ $data: true,
16
+ error: {
17
+ message({ keyword, schemaCode }) {
18
+ const comp = keyword === "maxLength" ? "more" : "fewer";
19
+ return (0, codegen_1.str)`must NOT have ${comp} than ${schemaCode} characters`;
20
+ },
21
+ params: ({ schemaCode }) => (0, codegen_1._)`{limit: ${schemaCode}}`
22
+ },
23
+ code(cxt) {
24
+ const { keyword, data, schemaCode, it } = cxt;
25
+ const op = keyword === "maxLength" ? codegen_1.operators.GT : codegen_1.operators.LT;
26
+ const len = it.opts.unicode === false ? (0, codegen_1._)`${data}.length` : (0, codegen_1._)`${(0, util_1.useFunc)(cxt.gen, ucs2length_1.default)}(${data})`;
27
+ cxt.fail$data((0, codegen_1._)`${len} ${op} ${schemaCode}`);
28
+ }
29
+ };
30
+ }));
31
+ //#endregion
32
+ export default require_limitLength();
33
+ export { require_limitLength };
@@ -0,0 +1,47 @@
1
+ import { __commonJSMin } from "../../../../../../../../_virtual/_rolldown/runtime.js";
2
+ import { require_codegen } from "../../compile/codegen/index.js";
3
+ //#region ../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/limitNumber.js
4
+ var require_limitNumber = /* @__PURE__ */ __commonJSMin(((exports) => {
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ const codegen_1 = require_codegen();
7
+ const ops = codegen_1.operators;
8
+ const KWDs = {
9
+ maximum: {
10
+ okStr: "<=",
11
+ ok: ops.LTE,
12
+ fail: ops.GT
13
+ },
14
+ minimum: {
15
+ okStr: ">=",
16
+ ok: ops.GTE,
17
+ fail: ops.LT
18
+ },
19
+ exclusiveMaximum: {
20
+ okStr: "<",
21
+ ok: ops.LT,
22
+ fail: ops.GTE
23
+ },
24
+ exclusiveMinimum: {
25
+ okStr: ">",
26
+ ok: ops.GT,
27
+ fail: ops.LTE
28
+ }
29
+ };
30
+ exports.default = {
31
+ keyword: Object.keys(KWDs),
32
+ type: "number",
33
+ schemaType: "number",
34
+ $data: true,
35
+ error: {
36
+ message: ({ keyword, schemaCode }) => (0, codegen_1.str)`must be ${KWDs[keyword].okStr} ${schemaCode}`,
37
+ params: ({ keyword, schemaCode }) => (0, codegen_1._)`{comparison: ${KWDs[keyword].okStr}, limit: ${schemaCode}}`
38
+ },
39
+ code(cxt) {
40
+ const { keyword, data, schemaCode } = cxt;
41
+ cxt.fail$data((0, codegen_1._)`${data} ${KWDs[keyword].fail} ${schemaCode} || isNaN(${data})`);
42
+ }
43
+ };
44
+ }));
45
+ //#endregion
46
+ export default require_limitNumber();
47
+ export { require_limitNumber };
@@ -0,0 +1,28 @@
1
+ import { __commonJSMin } from "../../../../../../../../_virtual/_rolldown/runtime.js";
2
+ import { require_codegen } from "../../compile/codegen/index.js";
3
+ //#region ../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/limitProperties.js
4
+ var require_limitProperties = /* @__PURE__ */ __commonJSMin(((exports) => {
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ const codegen_1 = require_codegen();
7
+ exports.default = {
8
+ keyword: ["maxProperties", "minProperties"],
9
+ type: "object",
10
+ schemaType: "number",
11
+ $data: true,
12
+ error: {
13
+ message({ keyword, schemaCode }) {
14
+ const comp = keyword === "maxProperties" ? "more" : "fewer";
15
+ return (0, codegen_1.str)`must NOT have ${comp} than ${schemaCode} properties`;
16
+ },
17
+ params: ({ schemaCode }) => (0, codegen_1._)`{limit: ${schemaCode}}`
18
+ },
19
+ code(cxt) {
20
+ const { keyword, data, schemaCode } = cxt;
21
+ const op = keyword === "maxProperties" ? codegen_1.operators.GT : codegen_1.operators.LT;
22
+ cxt.fail$data((0, codegen_1._)`Object.keys(${data}).length ${op} ${schemaCode}`);
23
+ }
24
+ };
25
+ }));
26
+ //#endregion
27
+ export default require_limitProperties();
28
+ export { require_limitProperties };
@@ -0,0 +1,27 @@
1
+ import { __commonJSMin } from "../../../../../../../../_virtual/_rolldown/runtime.js";
2
+ import { require_codegen } from "../../compile/codegen/index.js";
3
+ //#region ../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/multipleOf.js
4
+ var require_multipleOf = /* @__PURE__ */ __commonJSMin(((exports) => {
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ const codegen_1 = require_codegen();
7
+ exports.default = {
8
+ keyword: "multipleOf",
9
+ type: "number",
10
+ schemaType: "number",
11
+ $data: true,
12
+ error: {
13
+ message: ({ schemaCode }) => (0, codegen_1.str)`must be multiple of ${schemaCode}`,
14
+ params: ({ schemaCode }) => (0, codegen_1._)`{multipleOf: ${schemaCode}}`
15
+ },
16
+ code(cxt) {
17
+ const { gen, data, schemaCode, it } = cxt;
18
+ const prec = it.opts.multipleOfPrecision;
19
+ const res = gen.let("res");
20
+ const invalid = prec ? (0, codegen_1._)`Math.abs(Math.round(${res}) - ${res}) > 1e-${prec}` : (0, codegen_1._)`${res} !== parseInt(${res})`;
21
+ cxt.fail$data((0, codegen_1._)`(${schemaCode} === 0 || (${res} = ${data}/${schemaCode}, ${invalid}))`);
22
+ }
23
+ };
24
+ }));
25
+ //#endregion
26
+ export default require_multipleOf();
27
+ export { require_multipleOf };
@@ -0,0 +1,38 @@
1
+ import { __commonJSMin } from "../../../../../../../../_virtual/_rolldown/runtime.js";
2
+ import { require_codegen } from "../../compile/codegen/index.js";
3
+ import { require_util } from "../../compile/util.js";
4
+ import { require_code } from "../code.js";
5
+ //#region ../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/pattern.js
6
+ var require_pattern = /* @__PURE__ */ __commonJSMin(((exports) => {
7
+ Object.defineProperty(exports, "__esModule", { value: true });
8
+ const code_1 = require_code();
9
+ const util_1 = require_util();
10
+ const codegen_1 = require_codegen();
11
+ exports.default = {
12
+ keyword: "pattern",
13
+ type: "string",
14
+ schemaType: "string",
15
+ $data: true,
16
+ error: {
17
+ message: ({ schemaCode }) => (0, codegen_1.str)`must match pattern "${schemaCode}"`,
18
+ params: ({ schemaCode }) => (0, codegen_1._)`{pattern: ${schemaCode}}`
19
+ },
20
+ code(cxt) {
21
+ const { gen, data, $data, schema, schemaCode, it } = cxt;
22
+ const u = it.opts.unicodeRegExp ? "u" : "";
23
+ if ($data) {
24
+ const { regExp } = it.opts.code;
25
+ const regExpCode = regExp.code === "new RegExp" ? (0, codegen_1._)`new RegExp` : (0, util_1.useFunc)(gen, regExp);
26
+ const valid = gen.let("valid");
27
+ gen.try(() => gen.assign(valid, (0, codegen_1._)`${regExpCode}(${schemaCode}, ${u}).test(${data})`), () => gen.assign(valid, false));
28
+ cxt.fail$data((0, codegen_1._)`!${valid}`);
29
+ } else {
30
+ const regExp = (0, code_1.usePattern)(cxt, schema);
31
+ cxt.fail$data((0, codegen_1._)`!${regExp}.test(${data})`);
32
+ }
33
+ }
34
+ };
35
+ }));
36
+ //#endregion
37
+ export default require_pattern();
38
+ export { require_pattern };