@fumadocs/api-docs 0.0.1

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 (179) hide show
  1. package/LICENSE +21 -0
  2. package/css/generated/shared.css +1 -0
  3. package/css/preset.css +1 -0
  4. package/dist/.translations/index.d.ts +28 -0
  5. package/dist/.translations/keys.js +28 -0
  6. package/dist/_virtual/_rolldown/runtime.js +4 -0
  7. package/dist/auto-anchor/client.d.ts +16 -0
  8. package/dist/auto-anchor/client.js +20 -0
  9. package/dist/auto-anchor/index.d.ts +9 -0
  10. package/dist/auto-anchor/index.js +17 -0
  11. package/dist/codegen.d.ts +38 -0
  12. package/dist/codegen.js +35 -0
  13. package/dist/components/accordion.d.ts +22 -0
  14. package/dist/components/accordion.js +67 -0
  15. package/dist/components/dialog.d.ts +39 -0
  16. package/dist/components/dialog.js +61 -0
  17. package/dist/components/input.d.ts +8 -0
  18. package/dist/components/input.js +17 -0
  19. package/dist/components/playground/inputs.d.ts +50 -0
  20. package/dist/components/playground/inputs.js +426 -0
  21. package/dist/components/playground/schema.d.ts +66 -0
  22. package/dist/components/playground/schema.js +144 -0
  23. package/dist/components/schema/client.d.ts +17 -0
  24. package/dist/components/schema/client.js +415 -0
  25. package/dist/components/schema/index.d.ts +102 -0
  26. package/dist/components/schema/index.js +276 -0
  27. package/dist/components/select-tab.d.ts +33 -0
  28. package/dist/components/select-tab.js +56 -0
  29. package/dist/components/select.d.ts +16 -0
  30. package/dist/components/select.js +72 -0
  31. package/dist/components/spinner.d.ts +7 -0
  32. package/dist/components/spinner.js +14 -0
  33. package/dist/i18n.d.ts +7 -0
  34. package/dist/i18n.js +7 -0
  35. package/dist/node_modules/.pnpm/@apidevtools_json-schema-ref-parser@15.3.5_@types_json-schema@7.0.15/node_modules/@apidevtools/json-schema-ref-parser/dist/lib/bundle.js +239 -0
  36. package/dist/node_modules/.pnpm/@apidevtools_json-schema-ref-parser@15.3.5_@types_json-schema@7.0.15/node_modules/@apidevtools/json-schema-ref-parser/dist/lib/dereference.js +187 -0
  37. package/dist/node_modules/.pnpm/@apidevtools_json-schema-ref-parser@15.3.5_@types_json-schema@7.0.15/node_modules/@apidevtools/json-schema-ref-parser/dist/lib/index.d.ts +157 -0
  38. package/dist/node_modules/.pnpm/@apidevtools_json-schema-ref-parser@15.3.5_@types_json-schema@7.0.15/node_modules/@apidevtools/json-schema-ref-parser/dist/lib/index.js +136 -0
  39. package/dist/node_modules/.pnpm/@apidevtools_json-schema-ref-parser@15.3.5_@types_json-schema@7.0.15/node_modules/@apidevtools/json-schema-ref-parser/dist/lib/normalize-args.js +41 -0
  40. package/dist/node_modules/.pnpm/@apidevtools_json-schema-ref-parser@15.3.5_@types_json-schema@7.0.15/node_modules/@apidevtools/json-schema-ref-parser/dist/lib/options.d.ts +166 -0
  41. package/dist/node_modules/.pnpm/@apidevtools_json-schema-ref-parser@15.3.5_@types_json-schema@7.0.15/node_modules/@apidevtools/json-schema-ref-parser/dist/lib/options.js +124 -0
  42. package/dist/node_modules/.pnpm/@apidevtools_json-schema-ref-parser@15.3.5_@types_json-schema@7.0.15/node_modules/@apidevtools/json-schema-ref-parser/dist/lib/parse.js +109 -0
  43. package/dist/node_modules/.pnpm/@apidevtools_json-schema-ref-parser@15.3.5_@types_json-schema@7.0.15/node_modules/@apidevtools/json-schema-ref-parser/dist/lib/parsers/binary.js +30 -0
  44. package/dist/node_modules/.pnpm/@apidevtools_json-schema-ref-parser@15.3.5_@types_json-schema@7.0.15/node_modules/@apidevtools/json-schema-ref-parser/dist/lib/parsers/json.js +46 -0
  45. package/dist/node_modules/.pnpm/@apidevtools_json-schema-ref-parser@15.3.5_@types_json-schema@7.0.15/node_modules/@apidevtools/json-schema-ref-parser/dist/lib/parsers/text.js +36 -0
  46. package/dist/node_modules/.pnpm/@apidevtools_json-schema-ref-parser@15.3.5_@types_json-schema@7.0.15/node_modules/@apidevtools/json-schema-ref-parser/dist/lib/parsers/yaml.js +49 -0
  47. package/dist/node_modules/.pnpm/@apidevtools_json-schema-ref-parser@15.3.5_@types_json-schema@7.0.15/node_modules/@apidevtools/json-schema-ref-parser/dist/lib/pointer.d.ts +96 -0
  48. package/dist/node_modules/.pnpm/@apidevtools_json-schema-ref-parser@15.3.5_@types_json-schema@7.0.15/node_modules/@apidevtools/json-schema-ref-parser/dist/lib/pointer.js +242 -0
  49. package/dist/node_modules/.pnpm/@apidevtools_json-schema-ref-parser@15.3.5_@types_json-schema@7.0.15/node_modules/@apidevtools/json-schema-ref-parser/dist/lib/ref.d.ts +190 -0
  50. package/dist/node_modules/.pnpm/@apidevtools_json-schema-ref-parser@15.3.5_@types_json-schema@7.0.15/node_modules/@apidevtools/json-schema-ref-parser/dist/lib/ref.js +247 -0
  51. package/dist/node_modules/.pnpm/@apidevtools_json-schema-ref-parser@15.3.5_@types_json-schema@7.0.15/node_modules/@apidevtools/json-schema-ref-parser/dist/lib/refs.d.ts +134 -0
  52. package/dist/node_modules/.pnpm/@apidevtools_json-schema-ref-parser@15.3.5_@types_json-schema@7.0.15/node_modules/@apidevtools/json-schema-ref-parser/dist/lib/refs.js +210 -0
  53. package/dist/node_modules/.pnpm/@apidevtools_json-schema-ref-parser@15.3.5_@types_json-schema@7.0.15/node_modules/@apidevtools/json-schema-ref-parser/dist/lib/resolve-external.js +100 -0
  54. package/dist/node_modules/.pnpm/@apidevtools_json-schema-ref-parser@15.3.5_@types_json-schema@7.0.15/node_modules/@apidevtools/json-schema-ref-parser/dist/lib/resolvers/file.js +41 -0
  55. package/dist/node_modules/.pnpm/@apidevtools_json-schema-ref-parser@15.3.5_@types_json-schema@7.0.15/node_modules/@apidevtools/json-schema-ref-parser/dist/lib/resolvers/http.js +112 -0
  56. package/dist/node_modules/.pnpm/@apidevtools_json-schema-ref-parser@15.3.5_@types_json-schema@7.0.15/node_modules/@apidevtools/json-schema-ref-parser/dist/lib/types/index.d.ts +133 -0
  57. package/dist/node_modules/.pnpm/@apidevtools_json-schema-ref-parser@15.3.5_@types_json-schema@7.0.15/node_modules/@apidevtools/json-schema-ref-parser/dist/lib/util/convert-path-to-posix.js +8 -0
  58. package/dist/node_modules/.pnpm/@apidevtools_json-schema-ref-parser@15.3.5_@types_json-schema@7.0.15/node_modules/@apidevtools/json-schema-ref-parser/dist/lib/util/errors.d.ts +34 -0
  59. package/dist/node_modules/.pnpm/@apidevtools_json-schema-ref-parser@15.3.5_@types_json-schema@7.0.15/node_modules/@apidevtools/json-schema-ref-parser/dist/lib/util/errors.js +146 -0
  60. package/dist/node_modules/.pnpm/@apidevtools_json-schema-ref-parser@15.3.5_@types_json-schema@7.0.15/node_modules/@apidevtools/json-schema-ref-parser/dist/lib/util/is-windows.js +5 -0
  61. package/dist/node_modules/.pnpm/@apidevtools_json-schema-ref-parser@15.3.5_@types_json-schema@7.0.15/node_modules/@apidevtools/json-schema-ref-parser/dist/lib/util/maybe.js +18 -0
  62. package/dist/node_modules/.pnpm/@apidevtools_json-schema-ref-parser@15.3.5_@types_json-schema@7.0.15/node_modules/@apidevtools/json-schema-ref-parser/dist/lib/util/next.js +11 -0
  63. package/dist/node_modules/.pnpm/@apidevtools_json-schema-ref-parser@15.3.5_@types_json-schema@7.0.15/node_modules/@apidevtools/json-schema-ref-parser/dist/lib/util/plugins.js +99 -0
  64. package/dist/node_modules/.pnpm/@apidevtools_json-schema-ref-parser@15.3.5_@types_json-schema@7.0.15/node_modules/@apidevtools/json-schema-ref-parser/dist/lib/util/schema-resources.js +30 -0
  65. package/dist/node_modules/.pnpm/@apidevtools_json-schema-ref-parser@15.3.5_@types_json-schema@7.0.15/node_modules/@apidevtools/json-schema-ref-parser/dist/lib/util/url.js +315 -0
  66. package/dist/node_modules/.pnpm/@fastify_deepmerge@3.2.1/node_modules/@fastify/deepmerge/index.js +108 -0
  67. package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/2020.js +110 -0
  68. package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/codegen/code.js +138 -0
  69. package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/codegen/index.js +674 -0
  70. package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/codegen/scope.js +141 -0
  71. package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/errors.js +102 -0
  72. package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/index.js +223 -0
  73. package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/names.js +28 -0
  74. package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/ref_error.js +18 -0
  75. package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/resolve.js +133 -0
  76. package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/rules.js +61 -0
  77. package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/util.js +146 -0
  78. package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/validate/applicability.js +23 -0
  79. package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/validate/boolSchema.js +48 -0
  80. package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/validate/dataType.js +172 -0
  81. package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/validate/defaults.js +31 -0
  82. package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/validate/index.js +433 -0
  83. package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/validate/keyword.js +113 -0
  84. package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/validate/subschema.js +72 -0
  85. package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/core.js +583 -0
  86. package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/refs/data.js +18 -0
  87. package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/refs/json-schema-2020-12/index.js +42 -0
  88. package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/refs/json-schema-2020-12/meta/applicator.js +50 -0
  89. package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/refs/json-schema-2020-12/meta/content.js +20 -0
  90. package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/refs/json-schema-2020-12/meta/core.js +51 -0
  91. package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/refs/json-schema-2020-12/meta/format-annotation.js +16 -0
  92. package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/refs/json-schema-2020-12/meta/meta-data.js +36 -0
  93. package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/refs/json-schema-2020-12/meta/unevaluated.js +19 -0
  94. package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/refs/json-schema-2020-12/meta/validation.js +85 -0
  95. package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/refs/json-schema-2020-12/schema.js +59 -0
  96. package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/runtime/equal.js +12 -0
  97. package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/runtime/ucs2length.js +25 -0
  98. package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/runtime/uri.js +12 -0
  99. package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/runtime/validation_error.js +16 -0
  100. package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/additionalItems.js +57 -0
  101. package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/additionalProperties.js +96 -0
  102. package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/allOf.js +29 -0
  103. package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/anyOf.js +16 -0
  104. package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/contains.js +89 -0
  105. package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/dependencies.js +87 -0
  106. package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/dependentSchemas.js +16 -0
  107. package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/if.js +62 -0
  108. package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/index.js +60 -0
  109. package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/items.js +59 -0
  110. package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/items2020.js +34 -0
  111. package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/not.js +31 -0
  112. package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/oneOf.js +51 -0
  113. package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/patternProperties.js +61 -0
  114. package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/prefixItems.js +17 -0
  115. package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/properties.js +52 -0
  116. package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/propertyNames.js +41 -0
  117. package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/thenElse.js +17 -0
  118. package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/code.js +130 -0
  119. package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/core/id.js +14 -0
  120. package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/core/index.js +22 -0
  121. package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/core/ref.js +112 -0
  122. package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/discriminator/index.js +101 -0
  123. package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/discriminator/types.js +14 -0
  124. package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/draft2020.js +35 -0
  125. package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/dynamic/dynamicAnchor.js +46 -0
  126. package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/dynamic/dynamicRef.js +45 -0
  127. package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/dynamic/index.js +22 -0
  128. package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/dynamic/recursiveAnchor.js +20 -0
  129. package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/dynamic/recursiveRef.js +15 -0
  130. package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/format/format.js +92 -0
  131. package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/format/index.js +10 -0
  132. package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/metadata.js +23 -0
  133. package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/next.js +19 -0
  134. package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/unevaluated/index.js +13 -0
  135. package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/unevaluated/unevaluatedItems.js +46 -0
  136. package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/unevaluated/unevaluatedProperties.js +59 -0
  137. package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/const.js +27 -0
  138. package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/dependentRequired.js +17 -0
  139. package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/enum.js +49 -0
  140. package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/index.js +48 -0
  141. package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/limitContains.js +18 -0
  142. package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/limitItems.js +28 -0
  143. package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/limitLength.js +33 -0
  144. package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/limitNumber.js +47 -0
  145. package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/limitProperties.js +28 -0
  146. package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/multipleOf.js +27 -0
  147. package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/pattern.js +38 -0
  148. package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/required.js +72 -0
  149. package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/uniqueItems.js +70 -0
  150. package/dist/node_modules/.pnpm/fast-deep-equal@3.1.3/node_modules/fast-deep-equal/index.js +33 -0
  151. package/dist/node_modules/.pnpm/fast-uri@3.1.0/node_modules/fast-uri/index.js +236 -0
  152. package/dist/node_modules/.pnpm/fast-uri@3.1.0/node_modules/fast-uri/lib/schemes.js +187 -0
  153. package/dist/node_modules/.pnpm/fast-uri@3.1.0/node_modules/fast-uri/lib/utils.js +282 -0
  154. package/dist/node_modules/.pnpm/json-schema-traverse@1.0.0/node_modules/json-schema-traverse/index.js +78 -0
  155. package/dist/schema/bundle.d.ts +2 -0
  156. package/dist/schema/bundle.js +2 -0
  157. package/dist/schema/dereference.d.ts +19 -0
  158. package/dist/schema/dereference.js +49 -0
  159. package/dist/schema/index.d.ts +21 -0
  160. package/dist/schema/index.js +0 -0
  161. package/dist/schema/merge.d.ts +12 -0
  162. package/dist/schema/merge.js +156 -0
  163. package/dist/schema/ref.d.ts +20 -0
  164. package/dist/schema/ref.js +43 -0
  165. package/dist/schema/resolve-ref.d.ts +4 -0
  166. package/dist/schema/resolve-ref.js +11 -0
  167. package/dist/schema/sample.d.ts +12 -0
  168. package/dist/schema/sample.js +442 -0
  169. package/dist/schema/to-string.d.ts +10 -0
  170. package/dist/schema/to-string.js +51 -0
  171. package/dist/utils/cn.js +2 -0
  172. package/dist/utils/deep-equal.js +21 -0
  173. package/dist/utils/id-to-title.d.ts +4 -0
  174. package/dist/utils/id-to-title.js +12 -0
  175. package/dist/utils/is-plain-object.js +8 -0
  176. package/dist/utils/merge-refs.js +11 -0
  177. package/dist/utils/url.d.ts +5 -0
  178. package/dist/utils/url.js +13 -0
  179. package/package.json +105 -0
@@ -0,0 +1,36 @@
1
+ import { ParserError } from "../util/errors.js";
2
+ //#region ../../node_modules/.pnpm/@apidevtools+json-schema-ref-parser@15.3.5_@types+json-schema@7.0.15/node_modules/@apidevtools/json-schema-ref-parser/dist/lib/parsers/text.js
3
+ const TEXT_REGEXP = /\.(txt|htm|html|md|xml|js|min|map|css|scss|less|svg)$/i;
4
+ var text_default = {
5
+ /**
6
+ * The order that this parser will run, in relation to other parsers.
7
+ */
8
+ order: 300,
9
+ /**
10
+ * Whether to allow "empty" files (zero bytes).
11
+ */
12
+ allowEmpty: true,
13
+ /**
14
+ * The encoding that the text is expected to be in.
15
+ */
16
+ encoding: "utf8",
17
+ /**
18
+ * Determines whether this parser can parse a given file reference.
19
+ * Parsers that return true will be tried, in order, until one successfully parses the file.
20
+ * Parsers that return false will be skipped, UNLESS all parsers returned false, in which case
21
+ * every parser will be tried.
22
+ */
23
+ canParse(file) {
24
+ return (typeof file.data === "string" || Buffer.isBuffer(file.data)) && TEXT_REGEXP.test(file.url);
25
+ },
26
+ /**
27
+ * Parses the given file as text
28
+ */
29
+ parse(file) {
30
+ if (typeof file.data === "string") return file.data;
31
+ else if (Buffer.isBuffer(file.data)) return file.data.toString(this.encoding);
32
+ else throw new ParserError("data is not text", file.url);
33
+ }
34
+ };
35
+ //#endregion
36
+ export { text_default as default };
@@ -0,0 +1,49 @@
1
+ import { ParserError } from "../util/errors.js";
2
+ import yaml, { JSON_SCHEMA } from "js-yaml";
3
+ //#region ../../node_modules/.pnpm/@apidevtools+json-schema-ref-parser@15.3.5_@types+json-schema@7.0.15/node_modules/@apidevtools/json-schema-ref-parser/dist/lib/parsers/yaml.js
4
+ var yaml_default = {
5
+ /**
6
+ * The order that this parser will run, in relation to other parsers.
7
+ */
8
+ order: 200,
9
+ /**
10
+ * Whether to allow "empty" files. This includes zero-byte files, as well as empty JSON objects.
11
+ */
12
+ allowEmpty: true,
13
+ /**
14
+ * Determines whether this parser can parse a given file reference.
15
+ * Parsers that match will be tried, in order, until one successfully parses the file.
16
+ * Parsers that don't match will be skipped, UNLESS none of the parsers match, in which case
17
+ * every parser will be tried.
18
+ */
19
+ canParse: [
20
+ ".yaml",
21
+ ".yml",
22
+ ".json"
23
+ ],
24
+ /**
25
+ * Parses the given file as YAML
26
+ *
27
+ * @param file - An object containing information about the referenced file
28
+ * @param file.url - The full URL of the referenced file
29
+ * @param file.extension - The lowercased file extension (e.g. ".txt", ".html", etc.)
30
+ * @param file.data - The file contents. This will be whatever data type was returned by the resolver
31
+ * @returns
32
+ */
33
+ async parse(file) {
34
+ let data = file.data;
35
+ if (Buffer.isBuffer(data)) data = data.toString();
36
+ if (typeof data === "string") try {
37
+ return yaml.load(data, { schema: JSON_SCHEMA });
38
+ } catch {
39
+ try {
40
+ return yaml.load(data);
41
+ } catch (e) {
42
+ throw new ParserError(e?.message || "Parser Error", file.url);
43
+ }
44
+ }
45
+ else return data;
46
+ }
47
+ };
48
+ //#endregion
49
+ export { yaml_default as default };
@@ -0,0 +1,96 @@
1
+ import { JSONSchema } from "./types/index.js";
2
+ import { ParserOptions } from "./options.js";
3
+ import { $Ref } from "./ref.js";
4
+ import { JSONSchema4Type, JSONSchema6Type, JSONSchema7Type } from "json-schema";
5
+
6
+ //#region ../../node_modules/.pnpm/@apidevtools+json-schema-ref-parser@15.3.5_@types+json-schema@7.0.15/node_modules/@apidevtools/json-schema-ref-parser/dist/lib/pointer.d.ts
7
+ /**
8
+ * This class represents a single JSON pointer and its resolved value.
9
+ *
10
+ * @param $ref
11
+ * @param path
12
+ * @param [friendlyPath] - The original user-specified path (used for error messages)
13
+ * @class
14
+ */
15
+ declare class Pointer<S extends object = JSONSchema, O extends ParserOptions<S> = ParserOptions<S>> {
16
+ /**
17
+ * The {@link $Ref} object that contains this {@link Pointer} object.
18
+ */
19
+ $ref: $Ref<S, O>;
20
+ /**
21
+ * The file path or URL, containing the JSON pointer in the hash.
22
+ * This path is relative to the path of the main JSON schema file.
23
+ */
24
+ path: string;
25
+ /**
26
+ * The original path or URL, used for error messages.
27
+ */
28
+ originalPath: string;
29
+ /**
30
+ * The current base URI used to resolve nested $ref pointers while walking this pointer.
31
+ */
32
+ scopeBase: string;
33
+ /**
34
+ * The value of the JSON pointer.
35
+ * Can be any JSON type, not just objects. Unknown file types are represented as Buffers (byte arrays).
36
+ */
37
+ value: any;
38
+ /**
39
+ * Indicates whether the pointer references itself.
40
+ */
41
+ circular: boolean;
42
+ /**
43
+ * The number of indirect references that were traversed to resolve the value.
44
+ * Resolving a single pointer may require resolving multiple $Refs.
45
+ */
46
+ indirections: number;
47
+ constructor($ref: $Ref<S, O>, path: string, friendlyPath?: string);
48
+ /**
49
+ * Resolves the value of a nested property within the given object.
50
+ *
51
+ * @param obj - The object that will be crawled
52
+ * @param options
53
+ * @param pathFromRoot - the path of place that initiated resolving
54
+ *
55
+ * @returns
56
+ * Returns a JSON pointer whose {@link Pointer#value} is the resolved value.
57
+ * If resolving this value required resolving other JSON references, then
58
+ * the {@link Pointer#$ref} and {@link Pointer#path} will reflect the resolution path
59
+ * of the resolved value.
60
+ */
61
+ resolve(obj: S, options?: O, pathFromRoot?: string): this;
62
+ /**
63
+ * Sets the value of a nested property within the given object.
64
+ *
65
+ * @param obj - The object that will be crawled
66
+ * @param value - the value to assign
67
+ * @param options
68
+ *
69
+ * @returns
70
+ * Returns the modified object, or an entirely new object if the entire object is overwritten.
71
+ */
72
+ set(obj: S, value: JSONSchema4Type | JSONSchema6Type | JSONSchema7Type, options?: O): string | number | boolean | import("json-schema").JSONSchema4Object | import("json-schema").JSONSchema4Array | S | null;
73
+ /**
74
+ * Parses a JSON pointer (or a path containing a JSON pointer in the hash)
75
+ * and returns an array of the pointer's tokens.
76
+ * (e.g. "schema.json#/definitions/person/name" => ["definitions", "person", "name"])
77
+ *
78
+ * The pointer is parsed according to RFC 6901
79
+ * {@link https://tools.ietf.org/html/rfc6901#section-3}
80
+ *
81
+ * @param path
82
+ * @param [originalPath]
83
+ * @returns
84
+ */
85
+ static parse(path: string, originalPath?: string): string[];
86
+ /**
87
+ * Creates a JSON pointer path, by joining one or more tokens to a base path.
88
+ *
89
+ * @param base - The base path (e.g. "schema.json#/definitions/person")
90
+ * @param tokens - The token(s) to append (e.g. ["name", "first"])
91
+ * @returns
92
+ */
93
+ static join(base: string, tokens: string | string[]): string;
94
+ }
95
+ //#endregion
96
+ export { Pointer };
@@ -0,0 +1,242 @@
1
+ import { getHash, resolve, stripHash } from "./util/url.js";
2
+ import { InvalidPointerError, JSONParserError, MissingPointerError, isHandledError } from "./util/errors.js";
3
+ import { getSchemaBasePath } from "./util/schema-resources.js";
4
+ import $Ref from "./ref.js";
5
+ //#region ../../node_modules/.pnpm/@apidevtools+json-schema-ref-parser@15.3.5_@types+json-schema@7.0.15/node_modules/@apidevtools/json-schema-ref-parser/dist/lib/pointer.js
6
+ const nullSymbol = Symbol("null");
7
+ const slashes = /\//g;
8
+ const tildes = /~/g;
9
+ const escapedSlash = /~1/g;
10
+ const escapedTilde = /~0/g;
11
+ /**
12
+ * This class represents a single JSON pointer and its resolved value.
13
+ *
14
+ * @param $ref
15
+ * @param path
16
+ * @param [friendlyPath] - The original user-specified path (used for error messages)
17
+ * @class
18
+ */
19
+ var Pointer = class Pointer {
20
+ /**
21
+ * The {@link $Ref} object that contains this {@link Pointer} object.
22
+ */
23
+ $ref;
24
+ /**
25
+ * The file path or URL, containing the JSON pointer in the hash.
26
+ * This path is relative to the path of the main JSON schema file.
27
+ */
28
+ path;
29
+ /**
30
+ * The original path or URL, used for error messages.
31
+ */
32
+ originalPath;
33
+ /**
34
+ * The current base URI used to resolve nested $ref pointers while walking this pointer.
35
+ */
36
+ scopeBase;
37
+ /**
38
+ * The value of the JSON pointer.
39
+ * Can be any JSON type, not just objects. Unknown file types are represented as Buffers (byte arrays).
40
+ */
41
+ value;
42
+ /**
43
+ * Indicates whether the pointer references itself.
44
+ */
45
+ circular;
46
+ /**
47
+ * The number of indirect references that were traversed to resolve the value.
48
+ * Resolving a single pointer may require resolving multiple $Refs.
49
+ */
50
+ indirections;
51
+ constructor($ref, path, friendlyPath) {
52
+ this.$ref = $ref;
53
+ this.path = path;
54
+ this.originalPath = friendlyPath || path;
55
+ this.scopeBase = $ref.path || stripHash(path);
56
+ this.value = void 0;
57
+ this.circular = false;
58
+ this.indirections = 0;
59
+ }
60
+ /**
61
+ * Resolves the value of a nested property within the given object.
62
+ *
63
+ * @param obj - The object that will be crawled
64
+ * @param options
65
+ * @param pathFromRoot - the path of place that initiated resolving
66
+ *
67
+ * @returns
68
+ * Returns a JSON pointer whose {@link Pointer#value} is the resolved value.
69
+ * If resolving this value required resolving other JSON references, then
70
+ * the {@link Pointer#$ref} and {@link Pointer#path} will reflect the resolution path
71
+ * of the resolved value.
72
+ */
73
+ resolve(obj, options, pathFromRoot) {
74
+ const tokens = Pointer.parse(this.path, this.originalPath);
75
+ const found = [];
76
+ this.value = unwrapOrThrow(obj);
77
+ if (this.$ref.dynamicIdScope && !isAliasedResource(this.$ref)) this.scopeBase = getSchemaBasePath(this.scopeBase, this.value);
78
+ for (let i = 0; i < tokens.length; i++) {
79
+ const wasCircular = this.circular;
80
+ const isExtendedRef = $Ref.isExtended$Ref(this.value);
81
+ if (resolveIf$Ref(this, options, pathFromRoot)) this.path = Pointer.join(this.path, tokens.slice(i));
82
+ else if (!wasCircular && this.circular && isExtendedRef) this.circular = false;
83
+ const token = tokens[i];
84
+ if (this.value[token] === void 0 || this.value[token] === null && i === tokens.length - 1) {
85
+ let didFindSubstringSlashMatch = false;
86
+ for (let j = tokens.length - 1; j > i; j--) {
87
+ const joinedToken = tokens.slice(i, j + 1).join("/");
88
+ if (this.value[joinedToken] !== void 0) {
89
+ this.value = this.value[joinedToken];
90
+ i = j;
91
+ didFindSubstringSlashMatch = true;
92
+ break;
93
+ }
94
+ }
95
+ if (didFindSubstringSlashMatch) continue;
96
+ if (token in this.value && this.value[token] === null) {
97
+ this.value = nullSymbol;
98
+ continue;
99
+ }
100
+ this.value = null;
101
+ const path = this.$ref.path || "";
102
+ const targetRef = this.path.replace(path, "");
103
+ const targetFound = Pointer.join("", found);
104
+ const parentPath = pathFromRoot?.replace(path, "");
105
+ throw new MissingPointerError(token, decodeURI(this.originalPath), targetRef, targetFound, parentPath);
106
+ } else this.value = this.value[token];
107
+ found.push(token);
108
+ if (this.$ref.dynamicIdScope) this.scopeBase = getSchemaBasePath(this.scopeBase, this.value);
109
+ }
110
+ const finalResolutionBase = this.$ref.dynamicIdScope ? this.scopeBase : this.path;
111
+ if (!this.value || this.value.$ref && resolve(finalResolutionBase, this.value.$ref) !== pathFromRoot) resolveIf$Ref(this, options, pathFromRoot);
112
+ return this;
113
+ }
114
+ /**
115
+ * Sets the value of a nested property within the given object.
116
+ *
117
+ * @param obj - The object that will be crawled
118
+ * @param value - the value to assign
119
+ * @param options
120
+ *
121
+ * @returns
122
+ * Returns the modified object, or an entirely new object if the entire object is overwritten.
123
+ */
124
+ set(obj, value, options) {
125
+ const tokens = Pointer.parse(this.path);
126
+ let token;
127
+ if (tokens.length === 0) {
128
+ this.value = value;
129
+ return value;
130
+ }
131
+ this.value = unwrapOrThrow(obj);
132
+ if (this.$ref.dynamicIdScope && !isAliasedResource(this.$ref)) this.scopeBase = getSchemaBasePath(this.scopeBase, this.value);
133
+ for (let i = 0; i < tokens.length - 1; i++) {
134
+ resolveIf$Ref(this, options);
135
+ token = tokens[i];
136
+ if (this.value && this.value[token] !== void 0) this.value = this.value[token];
137
+ else this.value = setValue(this, token, {});
138
+ if (this.$ref.dynamicIdScope) this.scopeBase = getSchemaBasePath(this.scopeBase, this.value);
139
+ }
140
+ resolveIf$Ref(this, options);
141
+ token = tokens[tokens.length - 1];
142
+ setValue(this, token, value);
143
+ return obj;
144
+ }
145
+ /**
146
+ * Parses a JSON pointer (or a path containing a JSON pointer in the hash)
147
+ * and returns an array of the pointer's tokens.
148
+ * (e.g. "schema.json#/definitions/person/name" => ["definitions", "person", "name"])
149
+ *
150
+ * The pointer is parsed according to RFC 6901
151
+ * {@link https://tools.ietf.org/html/rfc6901#section-3}
152
+ *
153
+ * @param path
154
+ * @param [originalPath]
155
+ * @returns
156
+ */
157
+ static parse(path, originalPath) {
158
+ const pointer = getHash(path).substring(1);
159
+ if (!pointer) return [];
160
+ const split = pointer.split("/");
161
+ for (let i = 0; i < split.length; i++) split[i] = split[i].replace(escapedSlash, "/").replace(escapedTilde, "~");
162
+ if (split[0] !== "") throw new InvalidPointerError(pointer, originalPath === void 0 ? path : originalPath);
163
+ return split.slice(1);
164
+ }
165
+ /**
166
+ * Creates a JSON pointer path, by joining one or more tokens to a base path.
167
+ *
168
+ * @param base - The base path (e.g. "schema.json#/definitions/person")
169
+ * @param tokens - The token(s) to append (e.g. ["name", "first"])
170
+ * @returns
171
+ */
172
+ static join(base, tokens) {
173
+ if (base.indexOf("#") === -1) base += "#";
174
+ tokens = Array.isArray(tokens) ? tokens : [tokens];
175
+ for (let i = 0; i < tokens.length; i++) {
176
+ const token = tokens[i];
177
+ base += "/" + token.replace(tildes, "~0").replace(slashes, "~1");
178
+ }
179
+ return base;
180
+ }
181
+ };
182
+ /**
183
+ * If the given pointer's {@link Pointer#value} is a JSON reference,
184
+ * then the reference is resolved and {@link Pointer#value} is replaced with the resolved value.
185
+ * In addition, {@link Pointer#path} and {@link Pointer#$ref} are updated to reflect the
186
+ * resolution path of the new value.
187
+ *
188
+ * @param pointer
189
+ * @param options
190
+ * @param [pathFromRoot] - the path of place that initiated resolving
191
+ * @returns - Returns `true` if the resolution path changed
192
+ */
193
+ function resolveIf$Ref(pointer, options, pathFromRoot) {
194
+ if ($Ref.isAllowed$Ref(pointer.value, options)) {
195
+ const $refPath = resolve(pointer.$ref.dynamicIdScope ? pointer.scopeBase : pointer.path, pointer.value.$ref);
196
+ if ($refPath === pointer.path && !isRootPath(pathFromRoot)) pointer.circular = true;
197
+ else {
198
+ const resolved = pointer.$ref.$refs._resolve($refPath, pointer.path, options);
199
+ if (resolved === null) return false;
200
+ pointer.indirections += resolved.indirections + 1;
201
+ if ($Ref.isExtended$Ref(pointer.value)) {
202
+ pointer.value = $Ref.dereference(pointer.value, resolved.value, options);
203
+ return false;
204
+ } else {
205
+ pointer.$ref = resolved.$ref;
206
+ pointer.path = resolved.path;
207
+ pointer.value = resolved.value;
208
+ pointer.scopeBase = pointer.$ref.path;
209
+ }
210
+ return true;
211
+ }
212
+ }
213
+ }
214
+ /**
215
+ * Sets the specified token value of the {@link Pointer#value}.
216
+ *
217
+ * The token is evaluated according to RFC 6901.
218
+ * {@link https://tools.ietf.org/html/rfc6901#section-4}
219
+ *
220
+ * @param pointer - The JSON Pointer whose value will be modified
221
+ * @param token - A JSON Pointer token that indicates how to modify `obj`
222
+ * @param value - The value to assign
223
+ * @returns - Returns the assigned value
224
+ */
225
+ function setValue(pointer, token, value) {
226
+ if (pointer.value && typeof pointer.value === "object") if (token === "-" && Array.isArray(pointer.value)) pointer.value.push(value);
227
+ else pointer.value[token] = value;
228
+ else throw new JSONParserError(`Error assigning $ref pointer "${pointer.path}". \nCannot set "${token}" of a non-object.`);
229
+ return value;
230
+ }
231
+ function unwrapOrThrow(value) {
232
+ if (isHandledError(value)) throw value;
233
+ return value;
234
+ }
235
+ function isRootPath(pathFromRoot) {
236
+ return typeof pathFromRoot == "string" && Pointer.parse(pathFromRoot).length == 0;
237
+ }
238
+ function isAliasedResource($ref) {
239
+ return Boolean($ref.path && $ref.path in $ref.$refs._aliases);
240
+ }
241
+ //#endregion
242
+ export { Pointer as default, nullSymbol };
@@ -0,0 +1,190 @@
1
+ import { JSONSchema } from "./types/index.js";
2
+ import { ParserOptions } from "./options.js";
3
+ import { JSONParserError, MissingPointerError, ParserError, ResolverError } from "./util/errors.js";
4
+ import { Pointer } from "./pointer.js";
5
+ import { $Refs } from "./refs.js";
6
+ import { JSONSchema4Type, JSONSchema6Type, JSONSchema7Type } from "json-schema";
7
+
8
+ //#region ../../node_modules/.pnpm/@apidevtools+json-schema-ref-parser@15.3.5_@types+json-schema@7.0.15/node_modules/@apidevtools/json-schema-ref-parser/dist/lib/ref.d.ts
9
+ type $RefError = JSONParserError | ResolverError | ParserError | MissingPointerError;
10
+ /**
11
+ * This class represents a single JSON reference and its resolved value.
12
+ *
13
+ * @class
14
+ */
15
+ declare class $Ref<S extends object = JSONSchema, O extends ParserOptions<S> = ParserOptions<S>> {
16
+ /**
17
+ * The file path or URL of the referenced file.
18
+ * This path is relative to the path of the main JSON schema file.
19
+ *
20
+ * This path does NOT contain document fragments (JSON pointers). It always references an ENTIRE file.
21
+ * Use methods such as {@link $Ref#get}, {@link $Ref#resolve}, and {@link $Ref#exists} to get
22
+ * specific JSON pointers within the file.
23
+ *
24
+ * @type {string}
25
+ */
26
+ path: undefined | string;
27
+ /**
28
+ * The resolved value of the JSON reference.
29
+ * Can be any JSON type, not just objects. Unknown file types are represented as Buffers (byte arrays).
30
+ *
31
+ * @type {?*}
32
+ */
33
+ value: any;
34
+ /**
35
+ * The {@link $Refs} object that contains this {@link $Ref} object.
36
+ *
37
+ * @type {$Refs}
38
+ */
39
+ $refs: $Refs<S, O>;
40
+ /**
41
+ * Indicates the type of {@link $Ref#path} (e.g. "file", "http", etc.)
42
+ */
43
+ pathType: string | unknown;
44
+ /**
45
+ * Whether this document/resource should use JSON Schema 2019-09+ nested $id scope semantics.
46
+ */
47
+ dynamicIdScope: boolean;
48
+ /**
49
+ * List of all errors. Undefined if no errors.
50
+ */
51
+ errors: Array<$RefError>;
52
+ constructor($refs: $Refs<S, O>);
53
+ /**
54
+ * Pushes an error to errors array.
55
+ *
56
+ * @param err - The error to be pushed
57
+ * @returns
58
+ */
59
+ addError(err: $RefError): void;
60
+ /**
61
+ * Determines whether the given JSON reference exists within this {@link $Ref#value}.
62
+ *
63
+ * @param path - The full path being resolved, optionally with a JSON pointer in the hash
64
+ * @param options
65
+ * @returns
66
+ */
67
+ exists(path: string, options?: O): boolean;
68
+ /**
69
+ * Resolves the given JSON reference within this {@link $Ref#value} and returns the resolved value.
70
+ *
71
+ * @param path - The full path being resolved, optionally with a JSON pointer in the hash
72
+ * @param options
73
+ * @returns - Returns the resolved value
74
+ */
75
+ get(path: string, options?: O): any;
76
+ /**
77
+ * Resolves the given JSON reference within this {@link $Ref#value}.
78
+ *
79
+ * @param path - The full path being resolved, optionally with a JSON pointer in the hash
80
+ * @param options
81
+ * @param friendlyPath - The original user-specified path (used for error messages)
82
+ * @param pathFromRoot - The path of `obj` from the schema root
83
+ * @returns
84
+ */
85
+ resolve(path: string, options?: O, friendlyPath?: string, pathFromRoot?: string): Pointer<S, O> | null;
86
+ /**
87
+ * Sets the value of a nested property within this {@link $Ref#value}.
88
+ * If the property, or any of its parents don't exist, they will be created.
89
+ *
90
+ * @param path - The full path of the property to set, optionally with a JSON pointer in the hash
91
+ * @param value - The value to assign
92
+ */
93
+ set(path: string, value: JSONSchema4Type | JSONSchema6Type | JSONSchema7Type): void;
94
+ /**
95
+ * Determines whether the given value is a JSON reference.
96
+ *
97
+ * @param value - The value to inspect
98
+ * @returns
99
+ */
100
+ static is$Ref(value: unknown): value is {
101
+ $ref: string;
102
+ length?: number;
103
+ };
104
+ /**
105
+ * Determines whether the given value is an external JSON reference.
106
+ *
107
+ * @param value - The value to inspect
108
+ * @returns
109
+ */
110
+ static isExternal$Ref(value: unknown): boolean;
111
+ /**
112
+ * Determines whether the given value is a JSON reference, and whether it is allowed by the options.
113
+ * For example, if it references an external file, then options.resolve.external must be true.
114
+ *
115
+ * @param value - The value to inspect
116
+ * @param options
117
+ * @returns
118
+ */
119
+ static isAllowed$Ref<S extends object = JSONSchema>(value: unknown, options?: ParserOptions<S>): true | undefined;
120
+ /**
121
+ * Determines whether the given value is a JSON reference that "extends" its resolved value.
122
+ * That is, it has extra properties (in addition to "$ref"), so rather than simply pointing to
123
+ * an existing value, this $ref actually creates a NEW value that is a shallow copy of the resolved
124
+ * value, plus the extra properties.
125
+ *
126
+ * @example: {
127
+ person: {
128
+ properties: {
129
+ firstName: { type: string }
130
+ lastName: { type: string }
131
+ }
132
+ }
133
+ employee: {
134
+ properties: {
135
+ $ref: #/person/properties
136
+ salary: { type: number }
137
+ }
138
+ }
139
+ }
140
+ * In this example, "employee" is an extended $ref, since it extends "person" with an additional
141
+ * property (salary). The result is a NEW value that looks like this:
142
+ *
143
+ * {
144
+ * properties: {
145
+ * firstName: { type: string }
146
+ * lastName: { type: string }
147
+ * salary: { type: number }
148
+ * }
149
+ * }
150
+ *
151
+ * @param value - The value to inspect
152
+ * @returns
153
+ */
154
+ static isExtended$Ref(value: unknown): boolean;
155
+ /**
156
+ * Returns the resolved value of a JSON Reference.
157
+ * If necessary, the resolved value is merged with the JSON Reference to create a new object
158
+ *
159
+ * @example: {
160
+ person: {
161
+ properties: {
162
+ firstName: { type: string }
163
+ lastName: { type: string }
164
+ }
165
+ }
166
+ employee: {
167
+ properties: {
168
+ $ref: #/person/properties
169
+ salary: { type: number }
170
+ }
171
+ }
172
+ } When "person" and "employee" are merged, you end up with the following object:
173
+ *
174
+ * {
175
+ * properties: {
176
+ * firstName: { type: string }
177
+ * lastName: { type: string }
178
+ * salary: { type: number }
179
+ * }
180
+ * }
181
+ *
182
+ * @param $ref - The JSON reference object (the one with the "$ref" property)
183
+ * @param resolvedValue - The resolved value, which can be any type
184
+ * @param options - The options
185
+ * @returns - Returns the dereferenced value
186
+ */
187
+ static dereference<S extends object = JSONSchema, O extends ParserOptions<S> = ParserOptions<S>>($ref: $Ref<S, O>, resolvedValue: S, options?: O): S;
188
+ }
189
+ //#endregion
190
+ export { $Ref };