@scalar/openapi-parser 0.11.1 → 0.13.0

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 (290) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/dist/configuration/index.d.ts +2 -2
  3. package/dist/configuration/index.js +2 -2
  4. package/dist/configuration/index.js.map +1 -1
  5. package/dist/index.d.ts +17 -4
  6. package/dist/index.d.ts.map +1 -1
  7. package/dist/index.js +34 -4
  8. package/dist/index.js.map +2 -2
  9. package/dist/lib/Validator/Validator.d.ts.map +1 -1
  10. package/dist/lib/Validator/Validator.js +2 -2
  11. package/dist/lib/Validator/Validator.js.map +1 -1
  12. package/dist/lib/Validator/index.d.ts +1 -2
  13. package/dist/lib/Validator/index.d.ts.map +1 -1
  14. package/dist/lib/Validator/index.js +4 -2
  15. package/dist/lib/Validator/index.js.map +2 -2
  16. package/dist/plugins/fetch-urls/{fetchUrls.d.ts → fetch-urls.d.ts} +1 -1
  17. package/dist/plugins/fetch-urls/fetch-urls.d.ts.map +1 -0
  18. package/dist/plugins/fetch-urls/{fetchUrls.js → fetch-urls.js} +1 -1
  19. package/dist/plugins/fetch-urls/fetch-urls.js.map +7 -0
  20. package/dist/plugins/fetch-urls/index.d.ts +1 -1
  21. package/dist/plugins/fetch-urls/index.d.ts.map +1 -1
  22. package/dist/plugins/fetch-urls/index.js +5 -1
  23. package/dist/plugins/fetch-urls/index.js.map +2 -2
  24. package/dist/plugins/read-files/index.d.ts +1 -1
  25. package/dist/plugins/read-files/index.d.ts.map +1 -1
  26. package/dist/plugins/read-files/index.js +4 -1
  27. package/dist/plugins/read-files/index.js.map +2 -2
  28. package/dist/plugins/read-files/{readFiles.d.ts → read-files.d.ts} +1 -1
  29. package/dist/plugins/read-files/read-files.d.ts.map +1 -0
  30. package/dist/plugins/read-files/{readFiles.js → read-files.js} +3 -3
  31. package/dist/plugins/read-files/read-files.js.map +7 -0
  32. package/dist/polyfills/index.d.ts +1 -1
  33. package/dist/polyfills/index.d.ts.map +1 -1
  34. package/dist/polyfills/index.js +22 -2
  35. package/dist/polyfills/index.js.map +2 -2
  36. package/dist/types/index.d.ts.map +1 -1
  37. package/dist/utils/betterAjvErrors/validation-errors/base.js.map +1 -1
  38. package/dist/utils/dereference.d.ts +1 -1
  39. package/dist/utils/dereference.d.ts.map +1 -1
  40. package/dist/utils/dereference.js +3 -3
  41. package/dist/utils/dereference.js.map +1 -1
  42. package/dist/utils/details.d.ts +1 -2
  43. package/dist/utils/details.d.ts.map +1 -1
  44. package/dist/utils/details.js +12 -9
  45. package/dist/utils/details.js.map +2 -2
  46. package/dist/utils/{escapeJsonPointer.d.ts → escape-json-pointer.d.ts} +1 -1
  47. package/dist/utils/escape-json-pointer.d.ts.map +1 -0
  48. package/dist/utils/{escapeJsonPointer.js → escape-json-pointer.js} +1 -1
  49. package/dist/utils/{escapeJsonPointer.js.map → escape-json-pointer.js.map} +1 -1
  50. package/dist/utils/filter.d.ts.map +1 -1
  51. package/dist/utils/filter.js +2 -2
  52. package/dist/utils/filter.js.map +1 -1
  53. package/dist/utils/{getEntrypoint.d.ts → get-entrypoint.d.ts} +1 -1
  54. package/dist/utils/get-entrypoint.d.ts.map +1 -0
  55. package/dist/utils/{getEntrypoint.js → get-entrypoint.js} +1 -1
  56. package/dist/utils/get-entrypoint.js.map +7 -0
  57. package/dist/utils/{getListOfReferences.d.ts → get-list-of-references.d.ts} +1 -1
  58. package/dist/utils/get-list-of-references.d.ts.map +1 -0
  59. package/dist/utils/{getListOfReferences.js → get-list-of-references.js} +1 -1
  60. package/dist/utils/get-list-of-references.js.map +7 -0
  61. package/dist/utils/{getSegmentsFromPath.d.ts → get-segments-from-path.d.ts} +1 -1
  62. package/dist/utils/get-segments-from-path.d.ts.map +1 -0
  63. package/dist/utils/{getSegmentsFromPath.js → get-segments-from-path.js} +2 -2
  64. package/dist/utils/get-segments-from-path.js.map +7 -0
  65. package/dist/utils/{isFilesystem.d.ts → is-filesystem.d.ts} +1 -1
  66. package/dist/utils/is-filesystem.d.ts.map +1 -0
  67. package/dist/utils/{isFilesystem.js → is-filesystem.js} +1 -1
  68. package/dist/utils/is-filesystem.js.map +7 -0
  69. package/dist/utils/{isJson.d.ts → is-json.d.ts} +1 -1
  70. package/dist/utils/is-json.d.ts.map +1 -0
  71. package/dist/utils/{isJson.js → is-json.js} +1 -1
  72. package/dist/utils/{isJson.js.map → is-json.js.map} +1 -1
  73. package/dist/utils/{isObject.d.ts → is-object.d.ts} +1 -1
  74. package/dist/utils/is-object.d.ts.map +1 -0
  75. package/dist/utils/{isObject.js → is-object.js} +1 -1
  76. package/dist/utils/{isObject.js.map → is-object.js.map} +1 -1
  77. package/dist/utils/{isYaml.d.ts → is-yaml.d.ts} +1 -1
  78. package/dist/utils/is-yaml.d.ts.map +1 -0
  79. package/dist/utils/{isYaml.js → is-yaml.js} +1 -1
  80. package/dist/utils/{isYaml.js.map → is-yaml.js.map} +1 -1
  81. package/dist/utils/load/index.d.ts +1 -1
  82. package/dist/utils/load/index.d.ts.map +1 -1
  83. package/dist/utils/load/index.js +4 -1
  84. package/dist/utils/load/index.js.map +2 -2
  85. package/dist/utils/load/load.d.ts.map +1 -1
  86. package/dist/utils/load/load.js +4 -4
  87. package/dist/utils/load/load.js.map +1 -1
  88. package/dist/utils/{makeFilesystem.d.ts → make-filesystem.d.ts} +1 -1
  89. package/dist/utils/make-filesystem.d.ts.map +1 -0
  90. package/dist/utils/{makeFilesystem.js → make-filesystem.js} +3 -3
  91. package/dist/utils/make-filesystem.js.map +7 -0
  92. package/dist/utils/normalize.d.ts +1 -1
  93. package/dist/utils/normalize.d.ts.map +1 -1
  94. package/dist/utils/normalize.js +17 -12
  95. package/dist/utils/normalize.js.map +2 -2
  96. package/dist/utils/{resolveReferences.d.ts → resolve-references.d.ts} +1 -1
  97. package/dist/utils/resolve-references.d.ts.map +1 -0
  98. package/dist/utils/{resolveReferences.js → resolve-references.js} +15 -4
  99. package/dist/utils/resolve-references.js.map +7 -0
  100. package/dist/utils/{toJson.d.ts → to-json.d.ts} +1 -1
  101. package/dist/utils/to-json.d.ts.map +1 -0
  102. package/dist/utils/{toJson.js → to-json.js} +1 -1
  103. package/dist/utils/to-json.js.map +7 -0
  104. package/dist/utils/{toYaml.d.ts → to-yaml.d.ts} +1 -1
  105. package/dist/utils/to-yaml.d.ts.map +1 -0
  106. package/dist/utils/{toYaml.js → to-yaml.js} +1 -1
  107. package/dist/utils/{toYaml.js.map → to-yaml.js.map} +2 -2
  108. package/dist/utils/transform/sanitize.d.ts +2 -0
  109. package/dist/utils/transform/sanitize.d.ts.map +1 -1
  110. package/dist/utils/transform/sanitize.js.map +2 -2
  111. package/dist/utils/transform/utils/addInfoObject.d.ts.map +1 -1
  112. package/dist/utils/transform/utils/addInfoObject.js.map +1 -1
  113. package/dist/utils/transform/utils/addLatestOpenApiVersion.d.ts.map +1 -1
  114. package/dist/utils/transform/utils/addLatestOpenApiVersion.js.map +1 -1
  115. package/dist/utils/transform/utils/addMissingTags.d.ts.map +1 -1
  116. package/dist/utils/transform/utils/addMissingTags.js.map +1 -1
  117. package/dist/utils/transform/utils/normalizeSecuritySchemes.d.ts.map +1 -1
  118. package/dist/utils/transform/utils/normalizeSecuritySchemes.js.map +1 -1
  119. package/dist/utils/transform/utils/rejectSwaggerDocuments.d.ts.map +1 -1
  120. package/dist/utils/transform/utils/rejectSwaggerDocuments.js.map +1 -1
  121. package/dist/utils/{transformErrors.d.ts → transform-errors.d.ts} +1 -1
  122. package/dist/utils/transform-errors.d.ts.map +1 -0
  123. package/dist/utils/{transformErrors.js → transform-errors.js} +1 -1
  124. package/dist/utils/transform-errors.js.map +7 -0
  125. package/dist/utils/traverse.d.ts.map +1 -1
  126. package/dist/utils/traverse.js.map +1 -1
  127. package/dist/utils/{unescapeJsonPointer.d.ts → unescape-json-pointer.d.ts} +1 -1
  128. package/dist/utils/unescape-json-pointer.d.ts.map +1 -0
  129. package/dist/utils/{unescapeJsonPointer.js → unescape-json-pointer.js} +1 -1
  130. package/dist/utils/{unescapeJsonPointer.js.map → unescape-json-pointer.js.map} +1 -1
  131. package/dist/utils/{upgradeFromThreeToThreeOne.d.ts → upgrade-from-three-to-three-one.d.ts} +1 -1
  132. package/dist/utils/upgrade-from-three-to-three-one.d.ts.map +1 -0
  133. package/dist/utils/{upgradeFromThreeToThreeOne.js → upgrade-from-three-to-three-one.js} +1 -2
  134. package/dist/utils/upgrade-from-three-to-three-one.js.map +7 -0
  135. package/dist/utils/{upgradeFromTwoToThree.d.ts → upgrade-from-two-to-three.d.ts} +1 -1
  136. package/dist/utils/upgrade-from-two-to-three.d.ts.map +1 -0
  137. package/dist/utils/{upgradeFromTwoToThree.js → upgrade-from-two-to-three.js} +1 -1
  138. package/dist/utils/{upgradeFromTwoToThree.js.map → upgrade-from-two-to-three.js.map} +1 -1
  139. package/dist/utils/upgrade.bench.js +1 -1
  140. package/dist/utils/upgrade.bench.js.map +1 -1
  141. package/dist/utils/upgrade.d.ts.map +1 -1
  142. package/dist/utils/upgrade.js +4 -4
  143. package/dist/utils/upgrade.js.map +1 -1
  144. package/dist/utils/validate.d.ts.map +1 -1
  145. package/dist/utils/validate.js +1 -1
  146. package/dist/utils/validate.js.map +1 -1
  147. package/package.json +3 -3
  148. package/dist/lib/Validator/Validator.test.js +0 -8
  149. package/dist/lib/Validator/Validator.test.js.map +0 -7
  150. package/dist/plugins/fetch-urls/fetchUrls.d.ts.map +0 -1
  151. package/dist/plugins/fetch-urls/fetchUrls.js.map +0 -7
  152. package/dist/plugins/fetch-urls/fetchUrls.test.js +0 -50
  153. package/dist/plugins/fetch-urls/fetchUrls.test.js.map +0 -7
  154. package/dist/plugins/read-files/readFiles.d.ts.map +0 -1
  155. package/dist/plugins/read-files/readFiles.js.map +0 -7
  156. package/dist/plugins/read-files/readFiles.test.js +0 -20
  157. package/dist/plugins/read-files/readFiles.test.js.map +0 -7
  158. package/dist/utils/dereference.test.js +0 -300
  159. package/dist/utils/dereference.test.js.map +0 -7
  160. package/dist/utils/errors.test.js +0 -48
  161. package/dist/utils/errors.test.js.map +0 -7
  162. package/dist/utils/escapeJsonPointer.d.ts.map +0 -1
  163. package/dist/utils/escapeJsonPointer.test.js +0 -11
  164. package/dist/utils/escapeJsonPointer.test.js.map +0 -7
  165. package/dist/utils/getEntrypoint.d.ts.map +0 -1
  166. package/dist/utils/getEntrypoint.js.map +0 -7
  167. package/dist/utils/getEntrypoint.test.js +0 -18
  168. package/dist/utils/getEntrypoint.test.js.map +0 -7
  169. package/dist/utils/getListOfReferences.d.ts.map +0 -1
  170. package/dist/utils/getListOfReferences.js.map +0 -7
  171. package/dist/utils/getSegmentsFromPath.d.ts.map +0 -1
  172. package/dist/utils/getSegmentsFromPath.js.map +0 -7
  173. package/dist/utils/getSegmentsFromPath.test.js +0 -13
  174. package/dist/utils/getSegmentsFromPath.test.js.map +0 -7
  175. package/dist/utils/index.d.ts +0 -27
  176. package/dist/utils/index.d.ts.map +0 -1
  177. package/dist/utils/index.js +0 -27
  178. package/dist/utils/index.js.map +0 -7
  179. package/dist/utils/isFilesystem.d.ts.map +0 -1
  180. package/dist/utils/isFilesystem.js.map +0 -7
  181. package/dist/utils/isJson.d.ts.map +0 -1
  182. package/dist/utils/isObject.d.ts.map +0 -1
  183. package/dist/utils/isObject.test.js +0 -23
  184. package/dist/utils/isObject.test.js.map +0 -7
  185. package/dist/utils/isYaml.d.ts.map +0 -1
  186. package/dist/utils/load/load.test.js +0 -361
  187. package/dist/utils/load/load.test.js.map +0 -7
  188. package/dist/utils/makeFilesystem.d.ts.map +0 -1
  189. package/dist/utils/makeFilesystem.js.map +0 -7
  190. package/dist/utils/makeFilesystem.test.js +0 -15
  191. package/dist/utils/makeFilesystem.test.js.map +0 -7
  192. package/dist/utils/normalize.test.js +0 -88
  193. package/dist/utils/normalize.test.js.map +0 -7
  194. package/dist/utils/openapi/actions/details.d.ts +0 -7
  195. package/dist/utils/openapi/actions/details.d.ts.map +0 -1
  196. package/dist/utils/openapi/actions/details.js +0 -11
  197. package/dist/utils/openapi/actions/details.js.map +0 -7
  198. package/dist/utils/openapi/actions/files.d.ts +0 -6
  199. package/dist/utils/openapi/actions/files.d.ts.map +0 -1
  200. package/dist/utils/openapi/actions/files.js +0 -9
  201. package/dist/utils/openapi/actions/files.js.map +0 -7
  202. package/dist/utils/openapi/actions/get.d.ts +0 -6
  203. package/dist/utils/openapi/actions/get.d.ts.map +0 -1
  204. package/dist/utils/openapi/actions/get.js +0 -11
  205. package/dist/utils/openapi/actions/get.js.map +0 -7
  206. package/dist/utils/openapi/actions/toJson.d.ts +0 -6
  207. package/dist/utils/openapi/actions/toJson.d.ts.map +0 -1
  208. package/dist/utils/openapi/actions/toJson.js +0 -11
  209. package/dist/utils/openapi/actions/toJson.js.map +0 -7
  210. package/dist/utils/openapi/actions/toYaml.d.ts +0 -6
  211. package/dist/utils/openapi/actions/toYaml.d.ts.map +0 -1
  212. package/dist/utils/openapi/actions/toYaml.js +0 -11
  213. package/dist/utils/openapi/actions/toYaml.js.map +0 -7
  214. package/dist/utils/openapi/commands/dereferenceCommand.d.ts +0 -27
  215. package/dist/utils/openapi/commands/dereferenceCommand.d.ts.map +0 -1
  216. package/dist/utils/openapi/commands/dereferenceCommand.js +0 -27
  217. package/dist/utils/openapi/commands/dereferenceCommand.js.map +0 -7
  218. package/dist/utils/openapi/commands/filterCommand.d.ts +0 -41
  219. package/dist/utils/openapi/commands/filterCommand.d.ts.map +0 -1
  220. package/dist/utils/openapi/commands/filterCommand.js +0 -26
  221. package/dist/utils/openapi/commands/filterCommand.js.map +0 -7
  222. package/dist/utils/openapi/commands/loadCommand.d.ts +0 -8321
  223. package/dist/utils/openapi/commands/loadCommand.d.ts.map +0 -1
  224. package/dist/utils/openapi/commands/loadCommand.js +0 -42
  225. package/dist/utils/openapi/commands/loadCommand.js.map +0 -7
  226. package/dist/utils/openapi/commands/upgradeCommand.d.ts +0 -3406
  227. package/dist/utils/openapi/commands/upgradeCommand.d.ts.map +0 -1
  228. package/dist/utils/openapi/commands/upgradeCommand.js +0 -29
  229. package/dist/utils/openapi/commands/upgradeCommand.js.map +0 -7
  230. package/dist/utils/openapi/commands/validateCommand.d.ts +0 -3451
  231. package/dist/utils/openapi/commands/validateCommand.d.ts.map +0 -1
  232. package/dist/utils/openapi/commands/validateCommand.js +0 -33
  233. package/dist/utils/openapi/commands/validateCommand.js.map +0 -7
  234. package/dist/utils/openapi/index.d.ts +0 -2
  235. package/dist/utils/openapi/index.d.ts.map +0 -1
  236. package/dist/utils/openapi/index.js +0 -2
  237. package/dist/utils/openapi/index.js.map +0 -7
  238. package/dist/utils/openapi/openapi.d.ts +0 -1272
  239. package/dist/utils/openapi/openapi.d.ts.map +0 -1
  240. package/dist/utils/openapi/openapi.js +0 -15
  241. package/dist/utils/openapi/openapi.js.map +0 -7
  242. package/dist/utils/openapi/openapi.test-d.d.ts +0 -2
  243. package/dist/utils/openapi/openapi.test-d.d.ts.map +0 -1
  244. package/dist/utils/openapi/openapi.test-d.js +0 -14
  245. package/dist/utils/openapi/openapi.test-d.js.map +0 -7
  246. package/dist/utils/openapi/openapi.test.js +0 -309
  247. package/dist/utils/openapi/openapi.test.js.map +0 -7
  248. package/dist/utils/openapi/utils/queueTask.d.ts +0 -6
  249. package/dist/utils/openapi/utils/queueTask.d.ts.map +0 -1
  250. package/dist/utils/openapi/utils/queueTask.js +0 -10
  251. package/dist/utils/openapi/utils/queueTask.js.map +0 -7
  252. package/dist/utils/openapi/utils/workThroughQueue.d.ts +0 -6
  253. package/dist/utils/openapi/utils/workThroughQueue.d.ts.map +0 -1
  254. package/dist/utils/openapi/utils/workThroughQueue.js +0 -52
  255. package/dist/utils/openapi/utils/workThroughQueue.js.map +0 -7
  256. package/dist/utils/openapi/utils/workThroughQueue.test.js +0 -244
  257. package/dist/utils/openapi/utils/workThroughQueue.test.js.map +0 -7
  258. package/dist/utils/resolveReferences.d.ts.map +0 -1
  259. package/dist/utils/resolveReferences.js.map +0 -7
  260. package/dist/utils/resolveReferences.test.js +0 -567
  261. package/dist/utils/resolveReferences.test.js.map +0 -7
  262. package/dist/utils/toJson.d.ts.map +0 -1
  263. package/dist/utils/toJson.js.map +0 -7
  264. package/dist/utils/toYaml.d.ts.map +0 -1
  265. package/dist/utils/transform/index.d.ts +0 -2
  266. package/dist/utils/transform/index.d.ts.map +0 -1
  267. package/dist/utils/transform/index.js +0 -2
  268. package/dist/utils/transform/index.js.map +0 -7
  269. package/dist/utils/transform/sanitize.test.js +0 -148
  270. package/dist/utils/transform/sanitize.test.js.map +0 -7
  271. package/dist/utils/transformErrors.d.ts.map +0 -1
  272. package/dist/utils/transformErrors.js.map +0 -7
  273. package/dist/utils/transformErrors.test.js +0 -17
  274. package/dist/utils/transformErrors.test.js.map +0 -7
  275. package/dist/utils/traverse.test.js +0 -68
  276. package/dist/utils/traverse.test.js.map +0 -7
  277. package/dist/utils/unescapeJsonPointer.d.ts.map +0 -1
  278. package/dist/utils/unescapeJsonPointer.test.js +0 -19
  279. package/dist/utils/unescapeJsonPointer.test.js.map +0 -7
  280. package/dist/utils/upgrade.test.js +0 -57
  281. package/dist/utils/upgrade.test.js.map +0 -7
  282. package/dist/utils/upgradeFromThreeToThreeOne.d.ts.map +0 -1
  283. package/dist/utils/upgradeFromThreeToThreeOne.js.map +0 -7
  284. package/dist/utils/upgradeFromThreeToThreeOne.test.js +0 -462
  285. package/dist/utils/upgradeFromThreeToThreeOne.test.js.map +0 -7
  286. package/dist/utils/upgradeFromTwoToThree.d.ts.map +0 -1
  287. package/dist/utils/upgradeFromTwoToThree.test.js +0 -589
  288. package/dist/utils/upgradeFromTwoToThree.test.js.map +0 -7
  289. package/dist/utils/validate.test.js +0 -64
  290. package/dist/utils/validate.test.js.map +0 -7
package/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # @scalar/openapi-parser
2
2
 
3
+ ## 0.13.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 1e87feb: fix: normalize doesn’t handle empty documents well
8
+
9
+ ## 0.12.0
10
+
11
+ ### Minor Changes
12
+
13
+ - edf694b: feat: remove wildcard exports
14
+
3
15
  ## 0.11.1
4
16
 
5
17
  ### Patch Changes
@@ -3897,8 +3897,8 @@ export declare const OpenApiVersions: OpenApiVersion[];
3897
3897
  * List of error messages used in the Validator
3898
3898
  */
3899
3899
  export declare const ERRORS: {
3900
- readonly EMPTY_OR_INVALID: "Can’t find JSON, YAML or filename in data";
3901
- readonly OPENAPI_VERSION_NOT_SUPPORTED: "Can’t find supported Swagger/OpenAPI version in specification, version must be a string.";
3900
+ readonly EMPTY_OR_INVALID: "Can’t find JSON, YAML or filename in data.";
3901
+ readonly OPENAPI_VERSION_NOT_SUPPORTED: "Can’t find supported Swagger/OpenAPI version in the provided document, version must be a string.";
3902
3902
  readonly INVALID_REFERENCE: "Can’t resolve reference: %s";
3903
3903
  readonly EXTERNAL_REFERENCE_NOT_FOUND: "Can’t resolve external reference: %s";
3904
3904
  readonly FILE_DOES_NOT_EXIST: "File does not exist: %s";
@@ -8,9 +8,9 @@ const OpenApiSpecifications = {
8
8
  };
9
9
  const OpenApiVersions = Object.keys(OpenApiSpecifications);
10
10
  const ERRORS = {
11
- EMPTY_OR_INVALID: "Can\u2019t find JSON, YAML or filename in data",
11
+ EMPTY_OR_INVALID: "Can\u2019t find JSON, YAML or filename in data.",
12
12
  // URI_MUST_BE_STRING: 'uri parameter or $id attribute must be a string',
13
- OPENAPI_VERSION_NOT_SUPPORTED: "Can\u2019t find supported Swagger/OpenAPI version in specification, version must be a string.",
13
+ OPENAPI_VERSION_NOT_SUPPORTED: "Can\u2019t find supported Swagger/OpenAPI version in the provided document, version must be a string.",
14
14
  INVALID_REFERENCE: "Can\u2019t resolve reference: %s",
15
15
  EXTERNAL_REFERENCE_NOT_FOUND: "Can\u2019t resolve external reference: %s",
16
16
  FILE_DOES_NOT_EXIST: "File does not exist: %s",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/configuration/index.ts"],
4
- "sourcesContent": ["import Swagger20 from '../schemas/v2.0/schema'\nimport OpenApi30 from '../schemas/v3.0/schema'\nimport OpenApi31 from '../schemas/v3.1/schema'\n\n/**\n * A list of the supported OpenAPI specifications\n */\nexport const OpenApiSpecifications = {\n '2.0': Swagger20,\n '3.0': OpenApi30,\n '3.1': OpenApi31,\n}\n\nexport type OpenApiVersion = keyof typeof OpenApiSpecifications\n\nexport const OpenApiVersions = Object.keys(OpenApiSpecifications) as OpenApiVersion[]\n\n/**\n * List of error messages used in the Validator\n */\nexport const ERRORS = {\n EMPTY_OR_INVALID: 'Can\u2019t find JSON, YAML or filename in data',\n // URI_MUST_BE_STRING: 'uri parameter or $id attribute must be a string',\n OPENAPI_VERSION_NOT_SUPPORTED:\n 'Can\u2019t find supported Swagger/OpenAPI version in specification, version must be a string.',\n INVALID_REFERENCE: 'Can\u2019t resolve reference: %s',\n EXTERNAL_REFERENCE_NOT_FOUND: 'Can\u2019t resolve external reference: %s',\n FILE_DOES_NOT_EXIST: 'File does not exist: %s',\n NO_CONTENT: 'No content found',\n} as const\n\nexport type ValidationError = keyof typeof ERRORS\n"],
4
+ "sourcesContent": ["import Swagger20 from '@/schemas/v2.0/schema'\nimport OpenApi30 from '@/schemas/v3.0/schema'\nimport OpenApi31 from '@/schemas/v3.1/schema'\n\n/**\n * A list of the supported OpenAPI specifications\n */\nexport const OpenApiSpecifications = {\n '2.0': Swagger20,\n '3.0': OpenApi30,\n '3.1': OpenApi31,\n}\n\nexport type OpenApiVersion = keyof typeof OpenApiSpecifications\n\nexport const OpenApiVersions = Object.keys(OpenApiSpecifications) as OpenApiVersion[]\n\n/**\n * List of error messages used in the Validator\n */\nexport const ERRORS = {\n EMPTY_OR_INVALID: 'Can\u2019t find JSON, YAML or filename in data.',\n // URI_MUST_BE_STRING: 'uri parameter or $id attribute must be a string',\n OPENAPI_VERSION_NOT_SUPPORTED:\n 'Can\u2019t find supported Swagger/OpenAPI version in the provided document, version must be a string.',\n INVALID_REFERENCE: 'Can\u2019t resolve reference: %s',\n EXTERNAL_REFERENCE_NOT_FOUND: 'Can\u2019t resolve external reference: %s',\n FILE_DOES_NOT_EXIST: 'File does not exist: %s',\n NO_CONTENT: 'No content found',\n} as const\n\nexport type ValidationError = keyof typeof ERRORS\n"],
5
5
  "mappings": "AAAA,OAAO,eAAe;AACtB,OAAO,eAAe;AACtB,OAAO,eAAe;AAKf,MAAM,wBAAwB;AAAA,EACnC,OAAO;AAAA,EACP,OAAO;AAAA,EACP,OAAO;AACT;AAIO,MAAM,kBAAkB,OAAO,KAAK,qBAAqB;AAKzD,MAAM,SAAS;AAAA,EACpB,kBAAkB;AAAA;AAAA,EAElB,+BACE;AAAA,EACF,mBAAmB;AAAA,EACnB,8BAA8B;AAAA,EAC9B,qBAAqB;AAAA,EACrB,YAAY;AACd;",
6
6
  "names": []
7
7
  }
package/dist/index.d.ts CHANGED
@@ -1,5 +1,18 @@
1
- export * from './configuration/index.js';
2
- export * from './lib/Validator/index.js';
3
- export * from './types/index.js';
4
- export * from './utils/index.js';
1
+ export { dereference } from './utils/dereference.js';
2
+ export { escapeJsonPointer } from './utils/escape-json-pointer.js';
3
+ export { filter } from './utils/filter.js';
4
+ export { isJson } from './utils/is-json.js';
5
+ export { isYaml } from './utils/is-yaml.js';
6
+ export { load } from './utils/load/index.js';
7
+ export { normalize } from './utils/normalize.js';
8
+ export { sanitize } from './utils/transform/sanitize.js';
9
+ export { toJson } from './utils/to-json.js';
10
+ export { toYaml } from './utils/to-yaml.js';
11
+ export { traverse } from './utils/traverse.js';
12
+ export { unescapeJsonPointer } from './utils/unescape-json-pointer.js';
13
+ export { upgrade } from './utils/upgrade.js';
14
+ export { upgradeFromThreeToThreeOne } from './utils/upgrade-from-three-to-three-one.js';
15
+ export { upgradeFromTwoToThree } from './utils/upgrade-from-two-to-three.js';
16
+ export { validate } from './utils/validate.js';
17
+ export type { LoadResult, Filesystem, AnyObject, ErrorObject } from './types/index.js';
5
18
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAA;AACrC,cAAc,uBAAuB,CAAA;AACrC,cAAc,eAAe,CAAA;AAC7B,cAAc,eAAe,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAA;AACjD,OAAO,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAA;AAC/D,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAA;AACvC,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAA;AACxC,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAA;AACxC,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAA;AACnC,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAA;AAC7C,OAAO,EAAE,QAAQ,EAAE,MAAM,4BAA4B,CAAA;AACrD,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAA;AACxC,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAA;AACxC,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAA;AAC3C,OAAO,EAAE,mBAAmB,EAAE,MAAM,+BAA+B,CAAA;AACnE,OAAO,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAA;AACzC,OAAO,EAAE,0BAA0B,EAAE,MAAM,yCAAyC,CAAA;AACpF,OAAO,EAAE,qBAAqB,EAAE,MAAM,mCAAmC,CAAA;AACzE,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAA;AAC3C,YAAY,EAAE,UAAU,EAAE,UAAU,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,SAAS,CAAA"}
package/dist/index.js CHANGED
@@ -1,5 +1,35 @@
1
- export * from "./configuration/index.js";
2
- export * from "./lib/Validator/index.js";
3
- export * from "./types/index.js";
4
- export * from "./utils/index.js";
1
+ import { dereference } from "./utils/dereference.js";
2
+ import { escapeJsonPointer } from "./utils/escape-json-pointer.js";
3
+ import { filter } from "./utils/filter.js";
4
+ import { isJson } from "./utils/is-json.js";
5
+ import { isYaml } from "./utils/is-yaml.js";
6
+ import { load } from "./utils/load/index.js";
7
+ import { normalize } from "./utils/normalize.js";
8
+ import { sanitize } from "./utils/transform/sanitize.js";
9
+ import { toJson } from "./utils/to-json.js";
10
+ import { toYaml } from "./utils/to-yaml.js";
11
+ import { traverse } from "./utils/traverse.js";
12
+ import { unescapeJsonPointer } from "./utils/unescape-json-pointer.js";
13
+ import { upgrade } from "./utils/upgrade.js";
14
+ import { upgradeFromThreeToThreeOne } from "./utils/upgrade-from-three-to-three-one.js";
15
+ import { upgradeFromTwoToThree } from "./utils/upgrade-from-two-to-three.js";
16
+ import { validate } from "./utils/validate.js";
17
+ export {
18
+ dereference,
19
+ escapeJsonPointer,
20
+ filter,
21
+ isJson,
22
+ isYaml,
23
+ load,
24
+ normalize,
25
+ sanitize,
26
+ toJson,
27
+ toYaml,
28
+ traverse,
29
+ unescapeJsonPointer,
30
+ upgrade,
31
+ upgradeFromThreeToThreeOne,
32
+ upgradeFromTwoToThree,
33
+ validate
34
+ };
5
35
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../src/index.ts"],
4
- "sourcesContent": ["export * from './configuration/index'\nexport * from './lib/Validator/index'\nexport * from './types/index'\nexport * from './utils/index'\n"],
5
- "mappings": "AAAA,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;",
4
+ "sourcesContent": ["export { dereference } from './utils/dereference'\nexport { escapeJsonPointer } from './utils/escape-json-pointer'\nexport { filter } from './utils/filter'\nexport { isJson } from './utils/is-json'\nexport { isYaml } from './utils/is-yaml'\nexport { load } from './utils/load'\nexport { normalize } from './utils/normalize'\nexport { sanitize } from './utils/transform/sanitize'\nexport { toJson } from './utils/to-json'\nexport { toYaml } from './utils/to-yaml'\nexport { traverse } from './utils/traverse'\nexport { unescapeJsonPointer } from './utils/unescape-json-pointer'\nexport { upgrade } from './utils/upgrade'\nexport { upgradeFromThreeToThreeOne } from './utils/upgrade-from-three-to-three-one'\nexport { upgradeFromTwoToThree } from './utils/upgrade-from-two-to-three'\nexport { validate } from './utils/validate'\nexport type { LoadResult, Filesystem, AnyObject, ErrorObject } from './types'\n"],
5
+ "mappings": "AAAA,SAAS,mBAAmB;AAC5B,SAAS,yBAAyB;AAClC,SAAS,cAAc;AACvB,SAAS,cAAc;AACvB,SAAS,cAAc;AACvB,SAAS,YAAY;AACrB,SAAS,iBAAiB;AAC1B,SAAS,gBAAgB;AACzB,SAAS,cAAc;AACvB,SAAS,cAAc;AACvB,SAAS,gBAAgB;AACzB,SAAS,2BAA2B;AACpC,SAAS,eAAe;AACxB,SAAS,kCAAkC;AAC3C,SAAS,6BAA6B;AACtC,SAAS,gBAAgB;",
6
6
  "names": []
7
7
  }
@@ -1 +1 @@
1
- {"version":3,"file":"Validator.d.ts","sourceRoot":"","sources":["../../../src/lib/Validator/Validator.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,cAAc,CAAA;AAEhC,OAAO,OAAO,MAAM,kBAAkB,CAAA;AAEtC,OAAO,EAAiC,KAAK,cAAc,EAAmB,MAAM,2BAA2B,CAAA;AAC/G,OAAO,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,kBAAkB,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAA;AAKlG;;GAEG;AACH,eAAO,MAAM,kBAAkB;;;CAG9B,CAAA;AAED,qBAAa,SAAS;IACb,OAAO,EAAE,KAAK,GAAG,KAAK,GAAG,KAAK,CAAA;IAErC,OAAc,iBAAiB,4BAAkB;IAGjD,SAAS,CAAC,aAAa,EAAE,MAAM,CAC7B,MAAM,EACN,CAAC,CAAC,aAAa,EAAE,S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U,EAAE,UAAU,EAAE,OAAO,CAAC,EAAE,kBAAkB,GAAG,OAAO,CAAC,cAAc,CAAC;IAoF7F;;OAEG;IACG,eAAe,CAAC,OAAO,EAAE,cAAc;CA8B9C"}
@@ -3,8 +3,8 @@ import addFormats from "ajv-formats";
3
3
  import Ajv2020 from "ajv/dist/2020.js";
4
4
  import { ERRORS, OpenApiSpecifications, OpenApiVersions } from "../../configuration/index.js";
5
5
  import { details as getOpenApiVersion } from "../../utils/details.js";
6
- import { resolveReferences } from "../../utils/resolveReferences.js";
7
- import { transformErrors } from "../../utils/transformErrors.js";
6
+ import { resolveReferences } from "../../utils/resolve-references.js";
7
+ import { transformErrors } from "../../utils/transform-errors.js";
8
8
  const jsonSchemaVersions = {
9
9
  "http://json-schema.org/draft-04/schema#": Ajv04,
10
10
  "https://json-schema.org/draft/2020-12/schema": Ajv2020
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/lib/Validator/Validator.ts"],
4
- "sourcesContent": ["import Ajv04 from 'ajv-draft-04'\nimport addFormats from 'ajv-formats'\nimport Ajv2020 from 'ajv/dist/2020.js'\n\nimport { ERRORS, OpenApiSpecifications, type OpenApiVersion, OpenApiVersions } from '../../configuration/index'\nimport type { AnyObject, Filesystem, ThrowOnErrorOption, ValidateResult } from '../../types/index'\nimport { details as getOpenApiVersion } from '../../utils/details'\nimport { resolveReferences } from '../../utils/resolveReferences'\nimport { transformErrors } from '../../utils/transformErrors'\n\n/**\n * Configure available JSON Schema versions\n */\nexport const jsonSchemaVersions = {\n 'http://json-schema.org/draft-04/schema#': Ajv04,\n 'https://json-schema.org/draft/2020-12/schema': Ajv2020,\n}\n\nexport class Validator {\n public version: '2.0' | '3.0' | '3.1'\n\n public static supportedVersions = OpenApiVersions\n\n // Object with function *or* object { errors: string }\n protected ajvValidators: Record<\n string,\n ((specification: AnyObject) => boolean) & {\n errors: string\n }\n > = {}\n\n protected errors: string\n\n protected specificationVersion: string\n\n protected specificationType: string\n\n public specification: AnyObject\n\n /**\n * Checks whether a specification is valid and all references can be resolved.\n */\n async validate(filesystem: Filesystem, options?: ThrowOnErrorOption): Promise<ValidateResult> {\n const entrypoint = filesystem.find((file) => file.isEntrypoint)\n const specification = entrypoint?.specification\n\n // TODO: How does this work with a filesystem?\n this.specification = specification\n\n // TODO: defaulting info.version to keep parser compatible with the previous one\n // we should bubble this error up and not throw on it\n if (this.specification?.info && !this.specification.info.version) {\n this.specification.info.version = '0.0.1'\n }\n\n try {\n // AnyObject is empty or invalid\n if (specification === undefined || specification === null) {\n if (options?.throwOnError) {\n throw new Error(ERRORS.EMPTY_OR_INVALID)\n }\n\n return {\n valid: false,\n errors: transformErrors(entrypoint, ERRORS.EMPTY_OR_INVALID),\n }\n }\n\n // Meta data about the specification\n const { version, specificationType, specificationVersion } = getOpenApiVersion(specification)\n\n this.version = version\n this.specificationVersion = specificationVersion\n this.specificationType = specificationType\n\n // AnyObject is not supported\n if (!version) {\n if (options?.throwOnError) {\n throw new Error(ERRORS.OPENAPI_VERSION_NOT_SUPPORTED)\n }\n\n return {\n valid: false,\n errors: transformErrors(entrypoint, ERRORS.OPENAPI_VERSION_NOT_SUPPORTED),\n }\n }\n\n // Get the correct OpenAPI validator\n const validateSchema = await this.getAjvValidator(version)\n const schemaResult = validateSchema(specification)\n\n // Error handling\n if (validateSchema.errors) {\n if (validateSchema.errors.length > 0) {\n if (options?.throwOnError) {\n throw new Error(validateSchema.errors[0])\n }\n\n return {\n valid: false,\n errors: transformErrors(entrypoint, validateSchema.errors),\n }\n }\n }\n\n // Check if the references are valid\n const resolvedReferences = resolveReferences(filesystem, options)\n\n return {\n valid: schemaResult && resolvedReferences.valid,\n errors: [...(schemaResult.errors ?? []), ...resolvedReferences.errors],\n schema: resolvedReferences.schema,\n }\n } catch (error) {\n // Something went horribly wrong!\n if (options?.throwOnError) {\n throw error\n }\n\n return {\n valid: false,\n errors: transformErrors(entrypoint, error.message ?? error),\n }\n }\n }\n\n /**\n * Ajv JSON schema validator\n */\n async getAjvValidator(version: OpenApiVersion) {\n // Schema loaded already\n if (this.ajvValidators[version]) {\n return this.ajvValidators[version]\n }\n\n // Load OpenAPI Schema\n const schema = OpenApiSpecifications[version]\n\n // Load JSON Schema\n const AjvClass = jsonSchemaVersions[schema.$schema]\n\n // Get the correct Ajv validator\n const ajv = new AjvClass({\n // Ajv is a bit too strict in its strict validation of OpenAPI schemas.\n // Switch strict mode off.\n strict: false,\n })\n\n // Register formats\n // https://ajv.js.org/packages/ajv-formats.html#formats\n addFormats(ajv)\n\n // OpenAPI 3.1 uses media-range format\n if (version === '3.1') {\n ajv.addFormat('media-range', true)\n }\n\n return (this.ajvValidators[version] = ajv.compile(schema))\n }\n}\n"],
4
+ "sourcesContent": ["import Ajv04 from 'ajv-draft-04'\nimport addFormats from 'ajv-formats'\nimport Ajv2020 from 'ajv/dist/2020.js'\n\nimport { ERRORS, OpenApiSpecifications, type OpenApiVersion, OpenApiVersions } from '@/configuration'\nimport type { AnyObject, Filesystem, ThrowOnErrorOption, ValidateResult } from '@/types/index'\nimport { details as getOpenApiVersion } from '@/utils/details'\nimport { resolveReferences } from '@/utils/resolve-references'\nimport { transformErrors } from '@/utils/transform-errors'\n\n/**\n * Configure available JSON Schema versions\n */\nexport const jsonSchemaVersions = {\n 'http://json-schema.org/draft-04/schema#': Ajv04,\n 'https://json-schema.org/draft/2020-12/schema': Ajv2020,\n}\n\nexport class Validator {\n public version: '2.0' | '3.0' | '3.1'\n\n public static supportedVersions = OpenApiVersions\n\n // Object with function *or* object { errors: string }\n protected ajvValidators: Record<\n string,\n ((specification: AnyObject) => boolean) & {\n errors: string\n }\n > = {}\n\n protected errors: string\n\n protected specificationVersion: string\n\n protected specificationType: string\n\n public specification: AnyObject\n\n /**\n * Checks whether a specification is valid and all references can be resolved.\n */\n async validate(filesystem: Filesystem, options?: ThrowOnErrorOption): Promise<ValidateResult> {\n const entrypoint = filesystem.find((file) => file.isEntrypoint)\n const specification = entrypoint?.specification\n\n // TODO: How does this work with a filesystem?\n this.specification = specification\n\n // TODO: defaulting info.version to keep parser compatible with the previous one\n // we should bubble this error up and not throw on it\n if (this.specification?.info && !this.specification.info.version) {\n this.specification.info.version = '0.0.1'\n }\n\n try {\n // AnyObject is empty or invalid\n if (specification === undefined || specification === null) {\n if (options?.throwOnError) {\n throw new Error(ERRORS.EMPTY_OR_INVALID)\n }\n\n return {\n valid: false,\n errors: transformErrors(entrypoint, ERRORS.EMPTY_OR_INVALID),\n }\n }\n\n // Meta data about the specification\n const { version, specificationType, specificationVersion } = getOpenApiVersion(specification)\n\n this.version = version\n this.specificationVersion = specificationVersion\n this.specificationType = specificationType\n\n // AnyObject is not supported\n if (!version) {\n if (options?.throwOnError) {\n throw new Error(ERRORS.OPENAPI_VERSION_NOT_SUPPORTED)\n }\n\n return {\n valid: false,\n errors: transformErrors(entrypoint, ERRORS.OPENAPI_VERSION_NOT_SUPPORTED),\n }\n }\n\n // Get the correct OpenAPI validator\n const validateSchema = await this.getAjvValidator(version)\n const schemaResult = validateSchema(specification)\n\n // Error handling\n if (validateSchema.errors) {\n if (validateSchema.errors.length > 0) {\n if (options?.throwOnError) {\n throw new Error(validateSchema.errors[0])\n }\n\n return {\n valid: false,\n errors: transformErrors(entrypoint, validateSchema.errors),\n }\n }\n }\n\n // Check if the references are valid\n const resolvedReferences = resolveReferences(filesystem, options)\n\n return {\n valid: schemaResult && resolvedReferences.valid,\n errors: [...(schemaResult.errors ?? []), ...resolvedReferences.errors],\n schema: resolvedReferences.schema,\n }\n } catch (error) {\n // Something went horribly wrong!\n if (options?.throwOnError) {\n throw error\n }\n\n return {\n valid: false,\n errors: transformErrors(entrypoint, error.message ?? error),\n }\n }\n }\n\n /**\n * Ajv JSON schema validator\n */\n async getAjvValidator(version: OpenApiVersion) {\n // Schema loaded already\n if (this.ajvValidators[version]) {\n return this.ajvValidators[version]\n }\n\n // Load OpenAPI Schema\n const schema = OpenApiSpecifications[version]\n\n // Load JSON Schema\n const AjvClass = jsonSchemaVersions[schema.$schema]\n\n // Get the correct Ajv validator\n const ajv = new AjvClass({\n // Ajv is a bit too strict in its strict validation of OpenAPI schemas.\n // Switch strict mode off.\n strict: false,\n })\n\n // Register formats\n // https://ajv.js.org/packages/ajv-formats.html#formats\n addFormats(ajv)\n\n // OpenAPI 3.1 uses media-range format\n if (version === '3.1') {\n ajv.addFormat('media-range', true)\n }\n\n return (this.ajvValidators[version] = ajv.compile(schema))\n }\n}\n"],
5
5
  "mappings": "AAAA,OAAO,WAAW;AAClB,OAAO,gBAAgB;AACvB,OAAO,aAAa;AAEpB,SAAS,QAAQ,uBAA4C,uBAAuB;AAEpF,SAAS,WAAW,yBAAyB;AAC7C,SAAS,yBAAyB;AAClC,SAAS,uBAAuB;AAKzB,MAAM,qBAAqB;AAAA,EAChC,2CAA2C;AAAA,EAC3C,gDAAgD;AAClD;AAEO,MAAM,UAAU;AAAA,EACd;AAAA,EAEP,OAAc,oBAAoB;AAAA;AAAA,EAGxB,gBAKN,CAAC;AAAA,EAEK;AAAA,EAEA;AAAA,EAEA;AAAA,EAEH;AAAA;AAAA;AAAA;AAAA,EAKP,MAAM,SAAS,YAAwB,SAAuD;AAC5F,UAAM,aAAa,WAAW,KAAK,CAAC,SAAS,KAAK,YAAY;AAC9D,UAAM,gBAAgB,YAAY;AAGlC,SAAK,gBAAgB;AAIrB,QAAI,KAAK,eAAe,QAAQ,CAAC,KAAK,cAAc,KAAK,SAAS;AAChE,WAAK,cAAc,KAAK,UAAU;AAAA,IACpC;AAEA,QAAI;AAEF,UAAI,kBAAkB,UAAa,kBAAkB,MAAM;AACzD,YAAI,SAAS,cAAc;AACzB,gBAAM,IAAI,MAAM,OAAO,gBAAgB;AAAA,QACzC;AAEA,eAAO;AAAA,UACL,OAAO;AAAA,UACP,QAAQ,gBAAgB,YAAY,OAAO,gBAAgB;AAAA,QAC7D;AAAA,MACF;AAGA,YAAM,EAAE,SAAS,mBAAmB,qBAAqB,IAAI,kBAAkB,aAA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AAA;AAAA,MAGvB,QAAQ;AAAA,IACV,CAAC;AAID,eAAW,GAAG;AAGd,QAAI,YAAY,OAAO;AACrB,UAAI,UAAU,eAAe,IAAI;AAAA,IACnC;AAEA,WAAQ,KAAK,cAAc,OAAO,IAAI,IAAI,QAAQ,MAAM;AAAA,EAC1D;AACF;",
6
6
  "names": []
7
7
  }
@@ -1,3 +1,2 @@
1
- export * from './Validator.js';
2
- export * from '../../utils/resolveReferences.js';
1
+ export { Validator } from './Validator.js';
3
2
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/lib/Validator/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAA;AAC3B,cAAc,+BAA+B,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/lib/Validator/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA"}
@@ -1,3 +1,5 @@
1
- export * from "./Validator.js";
2
- export * from "../../utils/resolveReferences.js";
1
+ import { Validator } from "./Validator.js";
2
+ export {
3
+ Validator
4
+ };
3
5
  //# sourceMappingURL=index.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/lib/Validator/index.ts"],
4
- "sourcesContent": ["export * from './Validator'\nexport * from '../../utils/resolveReferences'\n"],
5
- "mappings": "AAAA,cAAc;AACd,cAAc;",
4
+ "sourcesContent": ["export { Validator } from './Validator'\n"],
5
+ "mappings": "AAAA,SAAS,iBAAiB;",
6
6
  "names": []
7
7
  }
@@ -12,4 +12,4 @@ export declare const fetchUrls: (customConfiguration?: {
12
12
  */
13
13
  fetch?: (url: string) => Promise<Response>;
14
14
  }) => LoadPlugin;
15
- //# sourceMappingURL=fetchUrls.d.ts.map
15
+ //# sourceMappingURL=fetch-urls.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fetch-urls.d.ts","sourceRoot":"","sources":["../../../src/plugins/fetch-urls/fetch-urls.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAA;AAEnD,eAAO,MAAM,6BAA6B;;CAEzC,CAAA;AAED,eAAO,MAAM,SAAS,EAAE,CAAC,mBAAmB,CAAC,EAAE;IAC7C;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,GAAG,KAAK,CAAA;IACtB;;OAEG;IACH,KAAK,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC,QAAQ,CAAC,CAAA;CAC3C,KAAK,UA2CL,CAAA"}
@@ -37,4 +37,4 @@ export {
37
37
  fetchUrls,
38
38
  fetchUrlsDefaultConfiguration
39
39
  };
40
- //# sourceMappingURL=fetchUrls.js.map
40
+ //# sourceMappingURL=fetch-urls.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/plugins/fetch-urls/fetch-urls.ts"],
4
+ "sourcesContent": ["import type { LoadPlugin } from '@/utils/load/load'\n\nexport const fetchUrlsDefaultConfiguration = {\n limit: 20,\n}\n\nexport const fetchUrls: (customConfiguration?: {\n /**\n * Limit the number of requests. Set to `false` to disable the limit.\n */\n limit?: number | false\n /**\n * Fetch function to use instead of the global fetch. Use this to intercept requests.\n */\n fetch?: (url: string) => Promise<Response>\n}) => LoadPlugin = (customConfiguration) => {\n // State\n let numberOfRequests = 0\n\n // Configuration\n const configuration = {\n ...fetchUrlsDefaultConfiguration,\n ...customConfiguration,\n }\n\n return {\n check(value?: any) {\n // Not a string\n if (typeof value !== 'string') {\n return false\n }\n\n // Not http/https\n if (!value.startsWith('http://') && !value.startsWith('https://')) {\n return false\n }\n\n return true\n },\n async get(value?: any) {\n // Limit ht enumber of requests\n if (configuration?.limit !== false && numberOfRequests >= configuration?.limit) {\n console.warn(`[fetchUrls] Maximum number of requests reeached (${configuration?.limit}), skipping request`)\n return undefined\n }\n\n try {\n numberOfRequests++\n\n const response = await (configuration?.fetch ? configuration.fetch(value) : fetch(value))\n\n return await response.text()\n } catch (error) {\n console.error('[fetchUrls]', error.message, `(${value})`)\n return undefined\n }\n },\n }\n}\n"],
5
+ "mappings": "AAEO,MAAM,gCAAgC;AAAA,EAC3C,OAAO;AACT;AAEO,MAAM,YASM,CAAC,wBAAwB;AAE1C,MAAI,mBAAmB;AAGvB,QAAM,gBAAgB;AAAA,IACpB,GAAG;AAAA,IACH,GAAG;AAAA,EACL;AAEA,SAAO;AAAA,IACL,MAAM,OAAa;AAEjB,UAAI,OAAO,UAAU,UAAU;AAC7B,eAAO;AAAA,MACT;AAGA,UAAI,CAAC,MAAM,WAAW,SAAS,KAAK,CAAC,MAAM,WAAW,UAAU,GAAG;AACjE,eAAO;AAAA,MACT;AAEA,aAAO;AAAA,IACT;AAAA,IACA,MAAM,IAAI,OAAa;AAErB,UAAI,eAAe,UAAU,SAAS,oBAAoB,eAAe,OAAO;AAC9E,gBAAQ,KAAK,oDAAoD,eAAe,KAAK,qBAAqB;AAC1G,eAAO;AAAA,MACT;AAEA,UAAI;AACF;AAEA,cAAM,WAAW,OAAO,eAAe,QAAQ,cAAc,MAAM,KAAK,IAAI,MAAM,KAAK;AAEvF,eAAO,MAAM,SAAS,KAAK;AAAA,MAC7B,SAAS,OAAO;AACd,gBAAQ,MAAM,eAAe,MAAM,SAAS,IAAI,KAAK,GAAG;AACxD,eAAO;AAAA,MACT;AAAA,IACF;AAAA,EACF;AACF;",
6
+ "names": []
7
+ }
@@ -1,2 +1,2 @@
1
- export * from './fetchUrls.js';
1
+ export { fetchUrls, fetchUrlsDefaultConfiguration } from './fetch-urls.js';
2
2
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/plugins/fetch-urls/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/plugins/fetch-urls/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,6BAA6B,EAAE,MAAM,cAAc,CAAA"}
@@ -1,2 +1,6 @@
1
- export * from "./fetchUrls.js";
1
+ import { fetchUrls, fetchUrlsDefaultConfiguration } from "./fetch-urls.js";
2
+ export {
3
+ fetchUrls,
4
+ fetchUrlsDefaultConfiguration
5
+ };
2
6
  //# sourceMappingURL=index.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/plugins/fetch-urls/index.ts"],
4
- "sourcesContent": ["export * from './fetchUrls'\n"],
5
- "mappings": "AAAA,cAAc;",
4
+ "sourcesContent": ["export { fetchUrls, fetchUrlsDefaultConfiguration } from './fetch-urls'\n"],
5
+ "mappings": "AAAA,SAAS,WAAW,qCAAqC;",
6
6
  "names": []
7
7
  }
@@ -1,2 +1,2 @@
1
- export * from './readFiles.js';
1
+ export { readFiles } from './read-files.js';
2
2
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/plugins/read-files/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/plugins/read-files/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAA"}
@@ -1,2 +1,5 @@
1
- export * from "./readFiles.js";
1
+ import { readFiles } from "./read-files.js";
2
+ export {
3
+ readFiles
4
+ };
2
5
  //# sourceMappingURL=index.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/plugins/read-files/index.ts"],
4
- "sourcesContent": ["export * from './readFiles'\n"],
5
- "mappings": "AAAA,cAAc;",
4
+ "sourcesContent": ["export { readFiles } from './read-files'\n"],
5
+ "mappings": "AAAA,SAAS,iBAAiB;",
6
6
  "names": []
7
7
  }
@@ -1,3 +1,3 @@
1
1
  import type { LoadPlugin } from '../../utils/load/load.js';
2
2
  export declare const readFiles: () => LoadPlugin;
3
- //# sourceMappingURL=readFiles.d.ts.map
3
+ //# sourceMappingURL=read-files.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"read-files.d.ts","sourceRoot":"","sources":["../../../src/plugins/read-files/read-files.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAA;AAEnD,eAAO,MAAM,SAAS,EAAE,MAAM,UAqD7B,CAAA"}
@@ -1,8 +1,8 @@
1
1
  import fs from "node:fs";
2
2
  import { ERRORS } from "../../configuration/index.js";
3
3
  import { dirname, join } from "../../polyfills/path.js";
4
- import { isJson } from "../../utils/isJson.js";
5
- import { isYaml } from "../../utils/isYaml.js";
4
+ import { isJson } from "../../utils/is-json.js";
5
+ import { isYaml } from "../../utils/is-yaml.js";
6
6
  const readFiles = () => {
7
7
  return {
8
8
  check(value) {
@@ -49,4 +49,4 @@ const readFiles = () => {
49
49
  export {
50
50
  readFiles
51
51
  };
52
- //# sourceMappingURL=readFiles.js.map
52
+ //# sourceMappingURL=read-files.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/plugins/read-files/read-files.ts"],
4
+ "sourcesContent": ["import fs from 'node:fs'\n\nimport { ERRORS } from '@/configuration'\nimport { dirname, join } from '@/polyfills/path'\nimport { isJson } from '@/utils/is-json'\nimport { isYaml } from '@/utils/is-yaml'\nimport type { LoadPlugin } from '@/utils/load/load'\n\nexport const readFiles: () => LoadPlugin = () => {\n return {\n check(value?: any) {\n // Not a string\n if (typeof value !== 'string') {\n return false\n }\n\n // URL\n if (value.startsWith('http://') || value.startsWith('https://')) {\n return false\n }\n\n // Line breaks\n if (value.includes('\\n')) {\n return false\n }\n\n // JSON\n if (isJson(value)) {\n return false\n }\n\n // YAML (run through YAML.parse)\n if (isYaml(value)) {\n return false\n }\n\n return true\n },\n async get(value?: any) {\n if (!fs.existsSync(value)) {\n throw new Error(ERRORS.FILE_DOES_NOT_EXIST.replace('%s', value))\n }\n\n try {\n return fs.readFileSync(value, 'utf-8')\n } catch (error) {\n console.error('[readFiles]', error)\n return false\n }\n },\n resolvePath(value: any, reference: string) {\n const dir = dirname(value)\n return join(dir, reference)\n },\n getDir(value: any) {\n return dirname(value)\n },\n getFilename(value: any) {\n return value.split('/').pop()\n },\n }\n}\n"],
5
+ "mappings": "AAAA,OAAO,QAAQ;AAEf,SAAS,cAAc;AACvB,SAAS,SAAS,YAAY;AAC9B,SAAS,cAAc;AACvB,SAAS,cAAc;AAGhB,MAAM,YAA8B,MAAM;AAC/C,SAAO;AAAA,IACL,MAAM,OAAa;AAEjB,UAAI,OAAO,UAAU,UAAU;AAC7B,eAAO;AAAA,MACT;AAGA,UAAI,MAAM,WAAW,SAAS,KAAK,MAAM,WAAW,UAAU,GAAG;AAC/D,eAAO;AAAA,MACT;AAGA,UAAI,MAAM,SAAS,IAAI,GAAG;AACxB,eAAO;AAAA,MACT;AAGA,UAAI,OAAO,KAAK,GAAG;AACjB,eAAO;AAAA,MACT;AAGA,UAAI,OAAO,KAAK,GAAG;AACjB,eAAO;AAAA,MACT;AAEA,aAAO;AAAA,IACT;AAAA,IACA,MAAM,IAAI,OAAa;AACrB,UAAI,CAAC,GAAG,WAAW,KAAK,GAAG;AACzB,cAAM,IAAI,MAAM,OAAO,oBAAoB,QAAQ,MAAM,KAAK,CAAC;AAAA,MACjE;AAEA,UAAI;AACF,eAAO,GAAG,aAAa,OAAO,OAAO;AAAA,MACvC,SAAS,OAAO;AACd,gBAAQ,MAAM,eAAe,KAAK;AAClC,eAAO;AAAA,MACT;AAAA,IACF;AAAA,IACA,YAAY,OAAY,WAAmB;AACzC,YAAM,MAAM,QAAQ,KAAK;AACzB,aAAO,KAAK,KAAK,SAAS;AAAA,IAC5B;AAAA,IACA,OAAO,OAAY;AACjB,aAAO,QAAQ,KAAK;AAAA,IACtB;AAAA,IACA,YAAY,OAAY;AACtB,aAAO,MAAM,MAAM,GAAG,EAAE,IAAI;AAAA,IAC9B;AAAA,EACF;AACF;",
6
+ "names": []
7
+ }
@@ -1,2 +1,2 @@
1
- export * as path from './path.js';
1
+ export { resolve, normalize, isAbsolute, join, relative, sep, delimiter, dirname, basename, extname, } from './path.js';
2
2
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/polyfills/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,IAAI,MAAM,QAAQ,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/polyfills/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,OAAO,EACP,SAAS,EACT,UAAU,EACV,IAAI,EACJ,QAAQ,EACR,GAAG,EACH,SAAS,EACT,OAAO,EACP,QAAQ,EACR,OAAO,GACR,MAAM,QAAQ,CAAA"}
@@ -1,5 +1,25 @@
1
- import * as path from "./path.js";
1
+ import {
2
+ resolve,
3
+ normalize,
4
+ isAbsolute,
5
+ join,
6
+ relative,
7
+ sep,
8
+ delimiter,
9
+ dirname,
10
+ basename,
11
+ extname
12
+ } from "./path.js";
2
13
  export {
3
- path
14
+ basename,
15
+ delimiter,
16
+ dirname,
17
+ extname,
18
+ isAbsolute,
19
+ join,
20
+ normalize,
21
+ relative,
22
+ resolve,
23
+ sep
4
24
  };
5
25
  //# sourceMappingURL=index.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/polyfills/index.ts"],
4
- "sourcesContent": ["export * as path from './path'\n"],
5
- "mappings": "AAAA,YAAY,UAAU;",
4
+ "sourcesContent": ["export {\n resolve,\n normalize,\n isAbsolute,\n join,\n relative,\n sep,\n delimiter,\n dirname,\n basename,\n extname,\n} from './path'\n"],
5
+ "mappings": "AAAA;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,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GACP,KAAK,GACP,uBAAuB,CAAA"}
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/utils/betterAjvErrors/validation-errors/base.js"],
4
- "sourcesContent": ["// import { codeFrameColumns } from '@babel/code-frame';\n// import chalk from 'chalk';\n// import { getMetaFromPath } from '../json/index'\n\nexport default class BaseValidationError {\n constructor(options = { isIdentifierLocation: false }, { data, schema, jsonAst, jsonRaw }) {\n this.options = options\n this.data = data\n this.schema = schema\n this.jsonAst = jsonAst\n this.jsonRaw = jsonRaw\n }\n\n /**\n * @return {string}\n */\n get instancePath() {\n return typeof this.options.instancePath !== 'undefined' ? this.options.instancePath : this.options.dataPath\n }\n\n getError() {\n throw new Error(`Implement the 'getError' method inside ${this.constructor.name}!`)\n }\n}\n"],
4
+ "sourcesContent": ["// import { codeFrameColumns } from '@babel/code-frame';\n// import chalk from 'chalk';\n// import { getMetaFromPath } from '@/json/index'\n\nexport default class BaseValidationError {\n constructor(options = { isIdentifierLocation: false }, { data, schema, jsonAst, jsonRaw }) {\n this.options = options\n this.data = data\n this.schema = schema\n this.jsonAst = jsonAst\n this.jsonRaw = jsonRaw\n }\n\n /**\n * @return {string}\n */\n get instancePath() {\n return typeof this.options.instancePath !== 'undefined' ? this.options.instancePath : this.options.dataPath\n }\n\n getError() {\n throw new Error(`Implement the 'getError' method inside ${this.constructor.name}!`)\n }\n}\n"],
5
5
  "mappings": "AAIA,MAAO,oBAAkC;AAAA,EACvC,YAAY,UAAU,EAAE,sBAAsB,MAAM,GAAG,EAAE,MAAM,QAAQ,SAAS,QAAQ,GAAG;AACzF,SAAK,UAAU;AACf,SAAK,OAAO;AACZ,SAAK,SAAS;AACd,SAAK,UAAU;AACf,SAAK,UAAU;AAAA,EACjB;AAAA;AAAA;AAAA;AAAA,EAKA,IAAI,eAAe;AACjB,WAAO,OAAO,KAAK,QAAQ,iBAAiB,cAAc,KAAK,QAAQ,eAAe,KAAK,QAAQ;AAAA,EACrG;AAAA,EAEA,WAAW;AACT,UAAM,IAAI,MAAM,0CAA0C,KAAK,YAAY,IAAI,GAAG;AAAA,EACpF;AACF;",
6
6
  "names": []
7
7
  }
@@ -1,5 +1,5 @@
1
1
  import type { AnyApiDefinitionFormat, DereferenceResult, Filesystem } from '../types/index.js';
2
- import { type ResolveReferencesOptions } from './resolveReferences.js';
2
+ import { type ResolveReferencesOptions } from './resolve-references.js';
3
3
  export type DereferenceOptions = ResolveReferencesOptions;
4
4
  /**
5
5
  * Resolves all references in an OpenAPI document
@@ -1 +1 @@
1
- {"version":3,"file":"dereference.d.ts","sourceRoot":"","sources":["../../src/utils/dereference.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,sBAAsB,EAAE,iBAAiB,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAA;AAI3F,OAAO,EAAE,KAAK,wBAAwB,EAAqB,MAAM,qBAAqB,CAAA;AAEtF,MAAM,MAAM,kBAAkB,GAAG,wBAAwB,CAAA;AAEzD;;GAEG;AACH,wBAAsB,WAAW,CAC/B,KAAK,EAAE,sBAAsB,GAAG,UAAU,EAC1C,OAAO,CAAC,EAAE,kBAAkB,GAC3B,OAAO,CAAC,iBAAiB,CAAC,CAY5B"}
1
+ {"version":3,"file":"dereference.d.ts","sourceRoot":"","sources":["../../src/utils/dereference.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,sBAAsB,EAAE,iBAAiB,EAAE,UAAU,EAAE,MAAM,eAAe,CAAA;AAI1F,OAAO,EAAE,KAAK,wBAAwB,EAAqB,MAAM,sBAAsB,CAAA;AAEvF,MAAM,MAAM,kBAAkB,GAAG,wBAAwB,CAAA;AAEzD;;GAEG;AACH,wBAAsB,WAAW,CAC/B,KAAK,EAAE,sBAAsB,GAAG,UAAU,EAC1C,OAAO,CAAC,EAAE,kBAAkB,GAC3B,OAAO,CAAC,iBAAiB,CAAC,CAY5B"}
@@ -1,7 +1,7 @@
1
1
  import { details } from "./details.js";
2
- import { getEntrypoint } from "./getEntrypoint.js";
3
- import { makeFilesystem } from "./makeFilesystem.js";
4
- import { resolveReferences } from "./resolveReferences.js";
2
+ import { getEntrypoint } from "./get-entrypoint.js";
3
+ import { makeFilesystem } from "./make-filesystem.js";
4
+ import { resolveReferences } from "./resolve-references.js";
5
5
  async function dereference(value, options) {
6
6
  const filesystem = makeFilesystem(value);
7
7
  const entrypoint = getEntrypoint(filesystem);
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/utils/dereference.ts"],
4
- "sourcesContent": ["import type { AnyApiDefinitionFormat, DereferenceResult, Filesystem } from '../types/index'\nimport { details } from './details'\nimport { getEntrypoint } from './getEntrypoint'\nimport { makeFilesystem } from './makeFilesystem'\nimport { type ResolveReferencesOptions, resolveReferences } from './resolveReferences'\n\nexport type DereferenceOptions = ResolveReferencesOptions\n\n/**\n * Resolves all references in an OpenAPI document\n */\nexport async function dereference(\n value: AnyApiDefinitionFormat | Filesystem,\n options?: DereferenceOptions,\n): Promise<DereferenceResult> {\n const filesystem = makeFilesystem(value)\n\n const entrypoint = getEntrypoint(filesystem)\n const result = resolveReferences(filesystem, options)\n\n return {\n specification: entrypoint.specification,\n errors: result.errors,\n schema: result.schema,\n ...details(entrypoint.specification),\n }\n}\n"],
4
+ "sourcesContent": ["import type { AnyApiDefinitionFormat, DereferenceResult, Filesystem } from '@/types/index'\nimport { details } from './details'\nimport { getEntrypoint } from './get-entrypoint'\nimport { makeFilesystem } from './make-filesystem'\nimport { type ResolveReferencesOptions, resolveReferences } from './resolve-references'\n\nexport type DereferenceOptions = ResolveReferencesOptions\n\n/**\n * Resolves all references in an OpenAPI document\n */\nexport async function dereference(\n value: AnyApiDefinitionFormat | Filesystem,\n options?: DereferenceOptions,\n): Promise<DereferenceResult> {\n const filesystem = makeFilesystem(value)\n\n const entrypoint = getEntrypoint(filesystem)\n const result = resolveReferences(filesystem, options)\n\n return {\n specification: entrypoint.specification,\n errors: result.errors,\n schema: result.schema,\n ...details(entrypoint.specification),\n }\n}\n"],
5
5
  "mappings": "AACA,SAAS,eAAe;AACxB,SAAS,qBAAqB;AAC9B,SAAS,sBAAsB;AAC/B,SAAwC,yBAAyB;AAOjE,eAAsB,YACpB,OACA,SAC4B;AAC5B,QAAM,aAAa,eAAe,KAAK;AAEvC,QAAM,aAAa,cAAc,UAAU;AAC3C,QAAM,SAAS,kBAAkB,YAAY,OAAO;AAEpD,SAAO;AAAA,IACL,eAAe,WAAW;AAAA,IAC1B,QAAQ,OAAO;AAAA,IACf,QAAQ,OAAO;AAAA,IACf,GAAG,QAAQ,WAAW,aAAa;AAAA,EACrC;AACF;",
6
6
  "names": []
7
7
  }
@@ -1,7 +1,6 @@
1
- import type { UnknownObject } from '@scalar/types/utils';
2
1
  import type { DetailsResult } from '../types/index.js';
3
2
  /**
4
3
  * Get versions of the OpenAPI document.
5
4
  */
6
- export declare function details(specification: UnknownObject): DetailsResult;
5
+ export declare function details(specification: unknown): DetailsResult;
7
6
  //# sourceMappingURL=details.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"details.d.ts","sourceRoot":"","sources":["../../src/utils/details.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAA;AAGxD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAA;AAEnD;;GAEG;AACH,wBAAgB,OAAO,CAAC,aAAa,EAAE,aAAa,GAAG,aAAa,CA2BnE"}
1
+ {"version":3,"file":"details.d.ts","sourceRoot":"","sources":["../../src/utils/details.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,eAAe,CAAA;AAGlD;;GAEG;AACH,wBAAgB,OAAO,CAAC,aAAa,EAAE,OAAO,GAAG,aAAa,CA6B7D"}
@@ -1,4 +1,5 @@
1
1
  import { OpenApiVersions } from "../configuration/index.js";
2
+ import { isObject } from "./is-object.js";
2
3
  function details(specification) {
3
4
  if (specification === null) {
4
5
  return {
@@ -7,15 +8,17 @@ function details(specification) {
7
8
  specificationVersion: void 0
8
9
  };
9
10
  }
10
- for (const version of new Set(OpenApiVersions)) {
11
- const specificationType = version === "2.0" ? "swagger" : "openapi";
12
- const value = specification[specificationType];
13
- if (typeof value === "string" && value.startsWith(version)) {
14
- return {
15
- version,
16
- specificationType,
17
- specificationVersion: value
18
- };
11
+ if (isObject(specification)) {
12
+ for (const version of new Set(OpenApiVersions)) {
13
+ const specificationType = version === "2.0" ? "swagger" : "openapi";
14
+ const value = specification[specificationType];
15
+ if (typeof value === "string" && value.startsWith(version)) {
16
+ return {
17
+ version,
18
+ specificationType,
19
+ specificationVersion: value
20
+ };
21
+ }
19
22
  }
20
23
  }
21
24
  return {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/utils/details.ts"],
4
- "sourcesContent": ["import type { UnknownObject } from '@scalar/types/utils'\n\nimport { OpenApiVersions } from '../configuration/index'\nimport type { DetailsResult } from '../types/index'\n\n/**\n * Get versions of the OpenAPI document.\n */\nexport function details(specification: UnknownObject): DetailsResult {\n if (specification === null) {\n return {\n version: undefined,\n specificationType: undefined,\n specificationVersion: undefined,\n }\n }\n\n for (const version of new Set(OpenApiVersions)) {\n const specificationType = version === '2.0' ? 'swagger' : 'openapi'\n const value = specification[specificationType]\n\n if (typeof value === 'string' && value.startsWith(version)) {\n return {\n version: version,\n specificationType,\n specificationVersion: value,\n }\n }\n }\n\n return {\n version: undefined,\n specificationType: undefined,\n specificationVersion: undefined,\n }\n}\n"],
5
- "mappings": "AAEA,SAAS,uBAAuB;AAMzB,SAAS,QAAQ,eAA6C;AACnE,MAAI,kBAAkB,MAAM;AAC1B,WAAO;AAAA,MACL,SAAS;AAAA,MACT,mBAAmB;AAAA,MACnB,sBAAsB;AAAA,IACxB;AAAA,EACF;AAEA,aAAW,WAAW,IAAI,IAAI,eAAe,GAAG;AAC9C,UAAM,oBAAoB,YAAY,QAAQ,YAAY;AAC1D,UAAM,QAAQ,cAAc,iBAAiB;AAE7C,QAAI,OAAO,UAAU,YAAY,MAAM,WAAW,OAAO,GAAG;AAC1D,aAAO;AAAA,QACL;AAAA,QACA;AAAA,QACA,sBAAsB;AAAA,MACxB;AAAA,IACF;AAAA,EACF;AAEA,SAAO;AAAA,IACL,SAAS;AAAA,IACT,mBAAmB;AAAA,IACnB,sBAAsB;AAAA,EACxB;AACF;",
4
+ "sourcesContent": ["import { OpenApiVersions } from '@/configuration'\nimport type { DetailsResult } from '@/types/index'\nimport { isObject } from './is-object'\n\n/**\n * Get versions of the OpenAPI document.\n */\nexport function details(specification: unknown): DetailsResult {\n if (specification === null) {\n return {\n version: undefined,\n specificationType: undefined,\n specificationVersion: undefined,\n }\n }\n\n if (isObject(specification)) {\n for (const version of new Set(OpenApiVersions)) {\n const specificationType = version === '2.0' ? 'swagger' : 'openapi'\n const value = specification[specificationType]\n\n if (typeof value === 'string' && value.startsWith(version)) {\n return {\n version: version,\n specificationType,\n specificationVersion: value,\n }\n }\n }\n }\n\n return {\n version: undefined,\n specificationType: undefined,\n specificationVersion: undefined,\n }\n}\n"],
5
+ "mappings": "AAAA,SAAS,uBAAuB;AAEhC,SAAS,gBAAgB;AAKlB,SAAS,QAAQ,eAAuC;AAC7D,MAAI,kBAAkB,MAAM;AAC1B,WAAO;AAAA,MACL,SAAS;AAAA,MACT,mBAAmB;AAAA,MACnB,sBAAsB;AAAA,IACxB;AAAA,EACF;AAEA,MAAI,SAAS,aAAa,GAAG;AAC3B,eAAW,WAAW,IAAI,IAAI,eAAe,GAAG;AAC9C,YAAM,oBAAoB,YAAY,QAAQ,YAAY;AAC1D,YAAM,QAAQ,cAAc,iBAAiB;AAE7C,UAAI,OAAO,UAAU,YAAY,MAAM,WAAW,OAAO,GAAG;AAC1D,eAAO;AAAA,UACL;AAAA,UACA;AAAA,UACA,sBAAsB;AAAA,QACxB;AAAA,MACF;AAAA,IACF;AAAA,EACF;AAEA,SAAO;AAAA,IACL,SAAS;AAAA,IACT,mBAAmB;AAAA,IACnB,sBAAsB;AAAA,EACxB;AACF;",
6
6
  "names": []
7
7
  }
@@ -4,4 +4,4 @@
4
4
  * Example: `/foo/bar~baz` -> `/foo~1bar~0baz`
5
5
  */
6
6
  export declare function escapeJsonPointer(str: string): string;
7
- //# sourceMappingURL=escapeJsonPointer.d.ts.map
7
+ //# sourceMappingURL=escape-json-pointer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"escape-json-pointer.d.ts","sourceRoot":"","sources":["../../src/utils/escape-json-pointer.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,wBAAgB,iBAAiB,CAAC,GAAG,EAAE,MAAM,UAE5C"}
@@ -4,4 +4,4 @@ function escapeJsonPointer(str) {
4
4
  export {
5
5
  escapeJsonPointer
6
6
  };
7
- //# sourceMappingURL=escapeJsonPointer.js.map
7
+ //# sourceMappingURL=escape-json-pointer.js.map
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "version": 3,
3
- "sources": ["../../src/utils/escapeJsonPointer.ts"],
3
+ "sources": ["../../src/utils/escape-json-pointer.ts"],
4
4
  "sourcesContent": ["/**\n * Escapes a JSON pointer string.\n *\n * Example: `/foo/bar~baz` -> `/foo~1bar~0baz`\n */\nexport function escapeJsonPointer(str: string) {\n return str.replace(/~/g, '~0').replace(/\\//g, '~1')\n}\n"],
5
5
  "mappings": "AAKO,SAAS,kBAAkB,KAAa;AAC7C,SAAO,IAAI,QAAQ,MAAM,IAAI,EAAE,QAAQ,OAAO,IAAI;AACpD;",
6
6
  "names": []
@@ -1 +1 @@
1
- {"version":3,"file":"filter.d.ts","sourceRoot":"","sources":["../../src/utils/filter.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,sBAAsB,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAA;AAKrF,MAAM,MAAM,cAAc,GAAG,CAAC,MAAM,EAAE,SAAS,KAAK,OAAO,CAAA;AAE3D;;GAEG;AACH,wBAAgB,MAAM,CAAC,aAAa,EAAE,sBAAsB,EAAE,QAAQ,EAAE,cAAc,GAAG,YAAY,CAQpG"}
1
+ {"version":3,"file":"filter.d.ts","sourceRoot":"","sources":["../../src/utils/filter.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,sBAAsB,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,eAAe,CAAA;AAKpF,MAAM,MAAM,cAAc,GAAG,CAAC,MAAM,EAAE,SAAS,KAAK,OAAO,CAAA;AAE3D;;GAEG;AACH,wBAAgB,MAAM,CAAC,aAAa,EAAE,sBAAsB,EAAE,QAAQ,EAAE,cAAc,GAAG,YAAY,CAQpG"}