@scalar/openapi-parser 0.10.16 → 0.11.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 (339) hide show
  1. package/CHANGELOG.md +17 -0
  2. package/README.md +0 -27
  3. package/dist/configuration/index.js +19 -22
  4. package/dist/configuration/index.js.map +7 -0
  5. package/dist/declarations.d.js +1 -0
  6. package/dist/declarations.d.js.map +7 -0
  7. package/dist/index.d.ts +4 -4
  8. package/dist/index.d.ts.map +1 -1
  9. package/dist/index.js +5 -29
  10. package/dist/index.js.map +7 -0
  11. package/dist/lib/Validator/Validator.d.ts +2 -2
  12. package/dist/lib/Validator/Validator.d.ts.map +1 -1
  13. package/dist/lib/Validator/Validator.js +99 -119
  14. package/dist/lib/Validator/Validator.js.map +7 -0
  15. package/dist/lib/Validator/Validator.test.js +8 -0
  16. package/dist/lib/Validator/Validator.test.js.map +7 -0
  17. package/dist/lib/Validator/index.d.ts +2 -2
  18. package/dist/lib/Validator/index.d.ts.map +1 -1
  19. package/dist/lib/Validator/index.js +3 -0
  20. package/dist/lib/Validator/index.js.map +7 -0
  21. package/dist/plugins/fetch-urls/fetchUrls.d.ts +1 -1
  22. package/dist/plugins/fetch-urls/fetchUrls.d.ts.map +1 -1
  23. package/dist/plugins/fetch-urls/fetchUrls.js +36 -39
  24. package/dist/plugins/fetch-urls/fetchUrls.js.map +7 -0
  25. package/dist/plugins/fetch-urls/fetchUrls.test.js +50 -0
  26. package/dist/plugins/fetch-urls/fetchUrls.test.js.map +7 -0
  27. package/dist/plugins/fetch-urls/index.d.ts +1 -1
  28. package/dist/plugins/fetch-urls/index.d.ts.map +1 -1
  29. package/dist/plugins/fetch-urls/index.js +2 -1
  30. package/dist/plugins/fetch-urls/index.js.map +7 -0
  31. package/dist/plugins/read-files/index.d.ts +1 -1
  32. package/dist/plugins/read-files/index.d.ts.map +1 -1
  33. package/dist/plugins/read-files/index.js +2 -1
  34. package/dist/plugins/read-files/index.js.map +7 -0
  35. package/dist/plugins/read-files/readFiles.d.ts +1 -1
  36. package/dist/plugins/read-files/readFiles.d.ts.map +1 -1
  37. package/dist/plugins/read-files/readFiles.js +50 -55
  38. package/dist/plugins/read-files/readFiles.js.map +7 -0
  39. package/dist/plugins/read-files/readFiles.test.js +20 -0
  40. package/dist/plugins/read-files/readFiles.test.js.map +7 -0
  41. package/dist/polyfills/index.d.ts +1 -1
  42. package/dist/polyfills/index.d.ts.map +1 -1
  43. package/dist/polyfills/index.js +5 -0
  44. package/dist/polyfills/index.js.map +7 -0
  45. package/dist/polyfills/path.js +155 -98
  46. package/dist/polyfills/path.js.map +7 -0
  47. package/dist/schemas/v2.0/schema.d.ts +1405 -0
  48. package/dist/schemas/v2.0/schema.d.ts.map +1 -0
  49. package/dist/schemas/v2.0/schema.js +1463 -0
  50. package/dist/schemas/v2.0/schema.js.map +7 -0
  51. package/dist/schemas/v3.0/schema.d.ts +1264 -0
  52. package/dist/schemas/v3.0/schema.d.ts.map +1 -0
  53. package/dist/schemas/v3.0/schema.js +1493 -0
  54. package/dist/schemas/v3.0/schema.js.map +7 -0
  55. package/dist/schemas/v3.1/schema.d.ts +1225 -0
  56. package/dist/schemas/v3.1/schema.d.ts.map +1 -0
  57. package/dist/schemas/v3.1/schema.js +1296 -0
  58. package/dist/schemas/v3.1/schema.js.map +7 -0
  59. package/dist/types/index.d.ts +1 -1
  60. package/dist/types/index.d.ts.map +1 -1
  61. package/dist/types/index.js +1 -0
  62. package/dist/types/index.js.map +7 -0
  63. package/dist/utils/betterAjvErrors/helpers.js +88 -93
  64. package/dist/utils/betterAjvErrors/helpers.js.map +7 -0
  65. package/dist/utils/betterAjvErrors/index.js +14 -13
  66. package/dist/utils/betterAjvErrors/index.js.map +7 -0
  67. package/dist/utils/betterAjvErrors/json/get-meta-from-path.d.ts +2 -0
  68. package/dist/utils/betterAjvErrors/json/get-meta-from-path.d.ts.map +1 -0
  69. package/dist/utils/betterAjvErrors/json/get-meta-from-path.js +27 -0
  70. package/dist/utils/betterAjvErrors/json/get-meta-from-path.js.map +7 -0
  71. package/dist/utils/betterAjvErrors/json/index.d.ts +2 -0
  72. package/dist/utils/betterAjvErrors/json/index.d.ts.map +1 -0
  73. package/dist/utils/betterAjvErrors/json/index.js +5 -0
  74. package/dist/utils/betterAjvErrors/json/index.js.map +7 -0
  75. package/dist/utils/betterAjvErrors/json/utils.d.ts +2 -0
  76. package/dist/utils/betterAjvErrors/json/utils.d.ts.map +1 -0
  77. package/dist/utils/betterAjvErrors/json/utils.js +11 -0
  78. package/dist/utils/betterAjvErrors/json/utils.js.map +7 -0
  79. package/dist/utils/betterAjvErrors/utils.js +21 -14
  80. package/dist/utils/betterAjvErrors/utils.js.map +7 -0
  81. package/dist/utils/betterAjvErrors/validation-errors/additional-prop.d.ts +10 -0
  82. package/dist/utils/betterAjvErrors/validation-errors/additional-prop.d.ts.map +1 -0
  83. package/dist/utils/betterAjvErrors/validation-errors/additional-prop.js +8 -9
  84. package/dist/utils/betterAjvErrors/validation-errors/additional-prop.js.map +7 -0
  85. package/dist/utils/betterAjvErrors/validation-errors/base.d.ts +23 -0
  86. package/dist/utils/betterAjvErrors/validation-errors/base.d.ts.map +1 -0
  87. package/dist/utils/betterAjvErrors/validation-errors/base.js +6 -10
  88. package/dist/utils/betterAjvErrors/validation-errors/base.js.map +7 -0
  89. package/dist/utils/betterAjvErrors/validation-errors/default.d.ts +10 -0
  90. package/dist/utils/betterAjvErrors/validation-errors/default.d.ts.map +1 -0
  91. package/dist/utils/betterAjvErrors/validation-errors/default.js +8 -9
  92. package/dist/utils/betterAjvErrors/validation-errors/default.js.map +7 -0
  93. package/dist/utils/betterAjvErrors/validation-errors/enum.d.ts +11 -0
  94. package/dist/utils/betterAjvErrors/validation-errors/enum.d.ts.map +1 -0
  95. package/dist/utils/betterAjvErrors/validation-errors/enum.js +19 -29
  96. package/dist/utils/betterAjvErrors/validation-errors/enum.js.map +7 -0
  97. package/dist/utils/betterAjvErrors/validation-errors/index.d.ts +7 -0
  98. package/dist/utils/betterAjvErrors/validation-errors/index.d.ts.map +1 -0
  99. package/dist/utils/betterAjvErrors/validation-errors/index.js +15 -0
  100. package/dist/utils/betterAjvErrors/validation-errors/index.js.map +7 -0
  101. package/dist/utils/betterAjvErrors/validation-errors/pattern.d.ts +10 -0
  102. package/dist/utils/betterAjvErrors/validation-errors/pattern.d.ts.map +1 -0
  103. package/dist/utils/betterAjvErrors/validation-errors/pattern.js +8 -9
  104. package/dist/utils/betterAjvErrors/validation-errors/pattern.js.map +7 -0
  105. package/dist/utils/betterAjvErrors/validation-errors/required.d.ts +10 -0
  106. package/dist/utils/betterAjvErrors/validation-errors/required.d.ts.map +1 -0
  107. package/dist/utils/betterAjvErrors/validation-errors/required.js +8 -9
  108. package/dist/utils/betterAjvErrors/validation-errors/required.js.map +7 -0
  109. package/dist/utils/betterAjvErrors/validation-errors/unevaluated-prop.d.ts +10 -0
  110. package/dist/utils/betterAjvErrors/validation-errors/unevaluated-prop.d.ts.map +1 -0
  111. package/dist/utils/betterAjvErrors/validation-errors/unevaluated-prop.js +8 -9
  112. package/dist/utils/betterAjvErrors/validation-errors/unevaluated-prop.js.map +7 -0
  113. package/dist/utils/dereference.d.ts +2 -2
  114. package/dist/utils/dereference.d.ts.map +1 -1
  115. package/dist/utils/dereference.js +17 -19
  116. package/dist/utils/dereference.js.map +7 -0
  117. package/dist/utils/dereference.test.js +300 -0
  118. package/dist/utils/dereference.test.js.map +7 -0
  119. package/dist/utils/details.d.ts +1 -1
  120. package/dist/utils/details.d.ts.map +1 -1
  121. package/dist/utils/details.js +26 -28
  122. package/dist/utils/details.js.map +7 -0
  123. package/dist/utils/errors.test.js +48 -0
  124. package/dist/utils/errors.test.js.map +7 -0
  125. package/dist/utils/escapeJsonPointer.js +5 -8
  126. package/dist/utils/escapeJsonPointer.js.map +7 -0
  127. package/dist/utils/escapeJsonPointer.test.js +11 -0
  128. package/dist/utils/escapeJsonPointer.test.js.map +7 -0
  129. package/dist/utils/filter.d.ts +1 -1
  130. package/dist/utils/filter.d.ts.map +1 -1
  131. package/dist/utils/filter.js +13 -15
  132. package/dist/utils/filter.js.map +7 -0
  133. package/dist/utils/getEntrypoint.d.ts +1 -1
  134. package/dist/utils/getEntrypoint.d.ts.map +1 -1
  135. package/dist/utils/getEntrypoint.js +5 -6
  136. package/dist/utils/getEntrypoint.js.map +7 -0
  137. package/dist/utils/getEntrypoint.test.js +18 -0
  138. package/dist/utils/getEntrypoint.test.js.map +7 -0
  139. package/dist/utils/getListOfReferences.d.ts +1 -1
  140. package/dist/utils/getListOfReferences.d.ts.map +1 -1
  141. package/dist/utils/getListOfReferences.js +15 -22
  142. package/dist/utils/getListOfReferences.js.map +7 -0
  143. package/dist/utils/getSegmentsFromPath.js +8 -15
  144. package/dist/utils/getSegmentsFromPath.js.map +7 -0
  145. package/dist/utils/getSegmentsFromPath.test.js +13 -0
  146. package/dist/utils/getSegmentsFromPath.test.js.map +7 -0
  147. package/dist/utils/index.d.ts +26 -26
  148. package/dist/utils/index.d.ts.map +1 -1
  149. package/dist/utils/index.js +27 -0
  150. package/dist/utils/index.js.map +7 -0
  151. package/dist/utils/isFilesystem.d.ts +2 -1
  152. package/dist/utils/isFilesystem.d.ts.map +1 -1
  153. package/dist/utils/isFilesystem.js +5 -9
  154. package/dist/utils/isFilesystem.js.map +7 -0
  155. package/dist/utils/isJson.js +10 -9
  156. package/dist/utils/isJson.js.map +7 -0
  157. package/dist/utils/isObject.js +5 -6
  158. package/dist/utils/isObject.js.map +7 -0
  159. package/dist/utils/isObject.test.js +23 -0
  160. package/dist/utils/isObject.test.js.map +7 -0
  161. package/dist/utils/isYaml.js +16 -17
  162. package/dist/utils/isYaml.js.map +7 -0
  163. package/dist/utils/load/index.d.ts +1 -1
  164. package/dist/utils/load/index.d.ts.map +1 -1
  165. package/dist/utils/load/index.js +2 -0
  166. package/dist/utils/load/index.js.map +7 -0
  167. package/dist/utils/load/load.d.ts +1 -1
  168. package/dist/utils/load/load.d.ts.map +1 -1
  169. package/dist/utils/load/load.js +89 -110
  170. package/dist/utils/load/load.js.map +7 -0
  171. package/dist/utils/load/load.test.js +361 -0
  172. package/dist/utils/load/load.test.js.map +7 -0
  173. package/dist/utils/makeFilesystem.d.ts +1 -1
  174. package/dist/utils/makeFilesystem.d.ts.map +1 -1
  175. package/dist/utils/makeFilesystem.js +20 -22
  176. package/dist/utils/makeFilesystem.js.map +7 -0
  177. package/dist/utils/makeFilesystem.test.js +15 -0
  178. package/dist/utils/makeFilesystem.test.js.map +7 -0
  179. package/dist/utils/normalize.d.ts +1 -1
  180. package/dist/utils/normalize.d.ts.map +1 -1
  181. package/dist/utils/normalize.js +22 -27
  182. package/dist/utils/normalize.js.map +7 -0
  183. package/dist/utils/normalize.test.js +88 -0
  184. package/dist/utils/normalize.test.js.map +7 -0
  185. package/dist/utils/openapi/actions/details.d.ts +2 -2
  186. package/dist/utils/openapi/actions/details.d.ts.map +1 -1
  187. package/dist/utils/openapi/actions/details.js +9 -11
  188. package/dist/utils/openapi/actions/details.js.map +7 -0
  189. package/dist/utils/openapi/actions/files.d.ts +1 -1
  190. package/dist/utils/openapi/actions/files.d.ts.map +1 -1
  191. package/dist/utils/openapi/actions/files.js +7 -9
  192. package/dist/utils/openapi/actions/files.js.map +7 -0
  193. package/dist/utils/openapi/actions/get.d.ts +1 -1
  194. package/dist/utils/openapi/actions/get.d.ts.map +1 -1
  195. package/dist/utils/openapi/actions/get.js +9 -11
  196. package/dist/utils/openapi/actions/get.js.map +7 -0
  197. package/dist/utils/openapi/actions/toJson.d.ts +1 -1
  198. package/dist/utils/openapi/actions/toJson.d.ts.map +1 -1
  199. package/dist/utils/openapi/actions/toJson.js +9 -11
  200. package/dist/utils/openapi/actions/toJson.js.map +7 -0
  201. package/dist/utils/openapi/actions/toYaml.d.ts +1 -1
  202. package/dist/utils/openapi/actions/toYaml.d.ts.map +1 -1
  203. package/dist/utils/openapi/actions/toYaml.js +9 -11
  204. package/dist/utils/openapi/actions/toYaml.js.map +7 -0
  205. package/dist/utils/openapi/commands/dereferenceCommand.d.ts +5 -5
  206. package/dist/utils/openapi/commands/dereferenceCommand.d.ts.map +1 -1
  207. package/dist/utils/openapi/commands/dereferenceCommand.js +25 -27
  208. package/dist/utils/openapi/commands/dereferenceCommand.js.map +7 -0
  209. package/dist/utils/openapi/commands/filterCommand.d.ts +9 -9
  210. package/dist/utils/openapi/commands/filterCommand.d.ts.map +1 -1
  211. package/dist/utils/openapi/commands/filterCommand.js +24 -26
  212. package/dist/utils/openapi/commands/filterCommand.js.map +7 -0
  213. package/dist/utils/openapi/commands/loadCommand.d.ts +994 -994
  214. package/dist/utils/openapi/commands/loadCommand.d.ts.map +1 -1
  215. package/dist/utils/openapi/commands/loadCommand.js +40 -42
  216. package/dist/utils/openapi/commands/loadCommand.js.map +7 -0
  217. package/dist/utils/openapi/commands/upgradeCommand.d.ts +311 -311
  218. package/dist/utils/openapi/commands/upgradeCommand.d.ts.map +1 -1
  219. package/dist/utils/openapi/commands/upgradeCommand.js +27 -29
  220. package/dist/utils/openapi/commands/upgradeCommand.js.map +7 -0
  221. package/dist/utils/openapi/commands/validateCommand.d.ts +311 -311
  222. package/dist/utils/openapi/commands/validateCommand.d.ts.map +1 -1
  223. package/dist/utils/openapi/commands/validateCommand.js +31 -33
  224. package/dist/utils/openapi/commands/validateCommand.js.map +7 -0
  225. package/dist/utils/openapi/index.d.ts +1 -1
  226. package/dist/utils/openapi/index.d.ts.map +1 -1
  227. package/dist/utils/openapi/index.js +2 -0
  228. package/dist/utils/openapi/index.js.map +7 -0
  229. package/dist/utils/openapi/openapi.d.ts +702 -700
  230. package/dist/utils/openapi/openapi.d.ts.map +1 -1
  231. package/dist/utils/openapi/openapi.js +13 -16
  232. package/dist/utils/openapi/openapi.js.map +7 -0
  233. package/dist/utils/openapi/openapi.test-d.js +14 -0
  234. package/dist/utils/openapi/openapi.test-d.js.map +7 -0
  235. package/dist/utils/openapi/openapi.test.js +309 -0
  236. package/dist/utils/openapi/openapi.test.js.map +7 -0
  237. package/dist/utils/openapi/utils/queueTask.d.ts +1 -1
  238. package/dist/utils/openapi/utils/queueTask.d.ts.map +1 -1
  239. package/dist/utils/openapi/utils/queueTask.js +8 -9
  240. package/dist/utils/openapi/utils/queueTask.js.map +7 -0
  241. package/dist/utils/openapi/utils/workThroughQueue.d.ts +1 -1
  242. package/dist/utils/openapi/utils/workThroughQueue.d.ts.map +1 -1
  243. package/dist/utils/openapi/utils/workThroughQueue.js +49 -64
  244. package/dist/utils/openapi/utils/workThroughQueue.js.map +7 -0
  245. package/dist/utils/openapi/utils/workThroughQueue.test.js +244 -0
  246. package/dist/utils/openapi/utils/workThroughQueue.test.js.map +7 -0
  247. package/dist/utils/resolveReferences.d.ts +1 -1
  248. package/dist/utils/resolveReferences.d.ts.map +1 -1
  249. package/dist/utils/resolveReferences.js +91 -139
  250. package/dist/utils/resolveReferences.js.map +7 -0
  251. package/dist/utils/resolveReferences.test.js +567 -0
  252. package/dist/utils/resolveReferences.test.js.map +7 -0
  253. package/dist/utils/toJson.d.ts +1 -1
  254. package/dist/utils/toJson.d.ts.map +1 -1
  255. package/dist/utils/toJson.js +4 -2
  256. package/dist/utils/toJson.js.map +7 -0
  257. package/dist/utils/toYaml.d.ts +1 -1
  258. package/dist/utils/toYaml.d.ts.map +1 -1
  259. package/dist/utils/toYaml.js +5 -4
  260. package/dist/utils/toYaml.js.map +7 -0
  261. package/dist/utils/transform/index.d.ts +1 -1
  262. package/dist/utils/transform/index.d.ts.map +1 -1
  263. package/dist/utils/transform/index.js +2 -0
  264. package/dist/utils/transform/index.js.map +7 -0
  265. package/dist/utils/transform/sanitize.d.ts +3 -3
  266. package/dist/utils/transform/sanitize.d.ts.map +1 -1
  267. package/dist/utils/transform/sanitize.js +22 -21
  268. package/dist/utils/transform/sanitize.js.map +7 -0
  269. package/dist/utils/transform/sanitize.test.js +148 -0
  270. package/dist/utils/transform/sanitize.test.js.map +7 -0
  271. package/dist/utils/transform/utils/addInfoObject.d.ts +1 -1
  272. package/dist/utils/transform/utils/addInfoObject.d.ts.map +1 -1
  273. package/dist/utils/transform/utils/addInfoObject.js +14 -10
  274. package/dist/utils/transform/utils/addInfoObject.js.map +7 -0
  275. package/dist/utils/transform/utils/addLatestOpenApiVersion.d.ts +1 -1
  276. package/dist/utils/transform/utils/addLatestOpenApiVersion.d.ts.map +1 -1
  277. package/dist/utils/transform/utils/addLatestOpenApiVersion.js +8 -5
  278. package/dist/utils/transform/utils/addLatestOpenApiVersion.js.map +7 -0
  279. package/dist/utils/transform/utils/addMissingTags.d.ts +1 -1
  280. package/dist/utils/transform/utils/addMissingTags.d.ts.map +1 -1
  281. package/dist/utils/transform/utils/addMissingTags.js +26 -27
  282. package/dist/utils/transform/utils/addMissingTags.js.map +7 -0
  283. package/dist/utils/transform/utils/normalizeSecuritySchemes.d.ts +1 -1
  284. package/dist/utils/transform/utils/normalizeSecuritySchemes.d.ts.map +1 -1
  285. package/dist/utils/transform/utils/normalizeSecuritySchemes.js +36 -40
  286. package/dist/utils/transform/utils/normalizeSecuritySchemes.js.map +7 -0
  287. package/dist/utils/transform/utils/rejectSwaggerDocuments.d.ts +1 -1
  288. package/dist/utils/transform/utils/rejectSwaggerDocuments.d.ts.map +1 -1
  289. package/dist/utils/transform/utils/rejectSwaggerDocuments.js +8 -6
  290. package/dist/utils/transform/utils/rejectSwaggerDocuments.js.map +7 -0
  291. package/dist/utils/transformErrors.d.ts +1 -1
  292. package/dist/utils/transformErrors.d.ts.map +1 -1
  293. package/dist/utils/transformErrors.js +18 -21
  294. package/dist/utils/transformErrors.js.map +7 -0
  295. package/dist/utils/transformErrors.test.js +17 -0
  296. package/dist/utils/transformErrors.test.js.map +7 -0
  297. package/dist/utils/traverse.d.ts +3 -3
  298. package/dist/utils/traverse.d.ts.map +1 -1
  299. package/dist/utils/traverse.js +22 -23
  300. package/dist/utils/traverse.js.map +7 -0
  301. package/dist/utils/traverse.test.js +68 -0
  302. package/dist/utils/traverse.test.js.map +7 -0
  303. package/dist/utils/unescapeJsonPointer.js +5 -9
  304. package/dist/utils/unescapeJsonPointer.js.map +7 -0
  305. package/dist/utils/unescapeJsonPointer.test.js +19 -0
  306. package/dist/utils/unescapeJsonPointer.test.js.map +7 -0
  307. package/dist/utils/upgrade.bench.d.ts +2 -0
  308. package/dist/utils/upgrade.bench.d.ts.map +1 -0
  309. package/dist/utils/upgrade.bench.js +31 -0
  310. package/dist/utils/upgrade.bench.js.map +7 -0
  311. package/dist/utils/upgrade.d.ts +1 -1
  312. package/dist/utils/upgrade.d.ts.map +1 -1
  313. package/dist/utils/upgrade.js +28 -22
  314. package/dist/utils/upgrade.js.map +7 -0
  315. package/dist/utils/upgrade.test-d.js +16 -0
  316. package/dist/utils/upgrade.test-d.js.map +7 -0
  317. package/dist/utils/upgrade.test.js +57 -0
  318. package/dist/utils/upgrade.test.js.map +7 -0
  319. package/dist/utils/upgradeFromThreeToThreeOne.d.ts +3 -3
  320. package/dist/utils/upgradeFromThreeToThreeOne.d.ts.map +1 -1
  321. package/dist/utils/upgradeFromThreeToThreeOne.js +107 -144
  322. package/dist/utils/upgradeFromThreeToThreeOne.js.map +7 -0
  323. package/dist/utils/upgradeFromThreeToThreeOne.test.js +462 -0
  324. package/dist/utils/upgradeFromThreeToThreeOne.test.js.map +7 -0
  325. package/dist/utils/upgradeFromTwoToThree.d.ts.map +1 -1
  326. package/dist/utils/upgradeFromTwoToThree.js +212 -219
  327. package/dist/utils/upgradeFromTwoToThree.js.map +7 -0
  328. package/dist/utils/upgradeFromTwoToThree.test.js +589 -0
  329. package/dist/utils/upgradeFromTwoToThree.test.js.map +7 -0
  330. package/dist/utils/validate.d.ts +1 -1
  331. package/dist/utils/validate.d.ts.map +1 -1
  332. package/dist/utils/validate.js +14 -16
  333. package/dist/utils/validate.js.map +7 -0
  334. package/dist/utils/validate.test.js +64 -0
  335. package/dist/utils/validate.test.js.map +7 -0
  336. package/package.json +7 -8
  337. package/dist/schemas/v2.0/schema.json.js +0 -1623
  338. package/dist/schemas/v3.0/schema.json.js +0 -1673
  339. package/dist/schemas/v3.1/schema.json.js +0 -1451
@@ -0,0 +1,10 @@
1
+ export default class AdditionalPropValidationError extends BaseValidationError {
2
+ constructor(...args: any[]);
3
+ name: string;
4
+ getError(): {
5
+ message: string;
6
+ path: string;
7
+ };
8
+ }
9
+ import BaseValidationError from './base.js';
10
+ //# sourceMappingURL=additional-prop.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"additional-prop.d.ts","sourceRoot":"","sources":["../../../../src/utils/betterAjvErrors/validation-errors/additional-prop.js"],"names":[],"mappings":"AAEA;IACE,4BAIC;IAFC,aAA2C;IAI7C;;;MAOC;CACF;gCAjB+B,QAAQ"}
@@ -1,20 +1,19 @@
1
- import BaseValidationError from './base.js';
2
-
1
+ import BaseValidationError from "./base.js";
3
2
  class AdditionalPropValidationError extends BaseValidationError {
4
3
  constructor(...args) {
5
4
  super(...args);
6
- this.name = 'AdditionalPropValidationError';
5
+ this.name = "AdditionalPropValidationError";
7
6
  this.options.isIdentifierLocation = true;
8
7
  }
9
-
10
8
  getError() {
11
9
  const { params } = this.options;
12
-
13
10
  return {
14
11
  message: `Property ${params.additionalProperty} is not expected to be here`,
15
- path: this.instancePath,
16
- }
12
+ path: this.instancePath
13
+ };
17
14
  }
18
15
  }
19
-
20
- export { AdditionalPropValidationError as default };
16
+ export {
17
+ AdditionalPropValidationError as default
18
+ };
19
+ //# sourceMappingURL=additional-prop.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../src/utils/betterAjvErrors/validation-errors/additional-prop.js"],
4
+ "sourcesContent": ["import BaseValidationError from './base'\n\nexport default class AdditionalPropValidationError extends BaseValidationError {\n constructor(...args) {\n super(...args)\n this.name = 'AdditionalPropValidationError'\n this.options.isIdentifierLocation = true\n }\n\n getError() {\n const { params } = this.options\n\n return {\n message: `Property ${params.additionalProperty} is not expected to be here`,\n path: this.instancePath,\n }\n }\n}\n"],
5
+ "mappings": "AAAA,OAAO,yBAAyB;AAEhC,MAAO,sCAAoD,oBAAoB;AAAA,EAC7E,eAAe,MAAM;AACnB,UAAM,GAAG,IAAI;AACb,SAAK,OAAO;AACZ,SAAK,QAAQ,uBAAuB;AAAA,EACtC;AAAA,EAEA,WAAW;AACT,UAAM,EAAE,OAAO,IAAI,KAAK;AAExB,WAAO;AAAA,MACL,SAAS,YAAY,OAAO,kBAAkB;AAAA,MAC9C,MAAM,KAAK;AAAA,IACb;AAAA,EACF;AACF;",
6
+ "names": []
7
+ }
@@ -0,0 +1,23 @@
1
+ export default class BaseValidationError {
2
+ constructor(options: {
3
+ isIdentifierLocation: boolean;
4
+ }, { data, schema, jsonAst, jsonRaw }: {
5
+ data: any;
6
+ schema: any;
7
+ jsonAst: any;
8
+ jsonRaw: any;
9
+ });
10
+ options: {
11
+ isIdentifierLocation: boolean;
12
+ };
13
+ data: any;
14
+ schema: any;
15
+ jsonAst: any;
16
+ jsonRaw: any;
17
+ /**
18
+ * @return {string}
19
+ */
20
+ get instancePath(): string;
21
+ getError(): void;
22
+ }
23
+ //# sourceMappingURL=base.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"base.d.ts","sourceRoot":"","sources":["../../../../src/utils/betterAjvErrors/validation-errors/base.js"],"names":[],"mappings":"AAIA;IACE;;;;;;;OAMC;IALC;;MAAsB;IACtB,UAAgB;IAChB,YAAoB;IACpB,aAAsB;IACtB,aAAsB;IAGxB;;OAEG;IACH,2BAEC;IAED,iBAEC;CACF"}
@@ -1,7 +1,3 @@
1
- // import { codeFrameColumns } from '@babel/code-frame';
2
- // import chalk from 'chalk';
3
- // import { getMetaFromPath } from '../json/index'
4
-
5
1
  class BaseValidationError {
6
2
  constructor(options = { isIdentifierLocation: false }, { data, schema, jsonAst, jsonRaw }) {
7
3
  this.options = options;
@@ -10,17 +6,17 @@ class BaseValidationError {
10
6
  this.jsonAst = jsonAst;
11
7
  this.jsonRaw = jsonRaw;
12
8
  }
13
-
14
9
  /**
15
10
  * @return {string}
16
11
  */
17
12
  get instancePath() {
18
- return typeof this.options.instancePath !== 'undefined' ? this.options.instancePath : this.options.dataPath
13
+ return typeof this.options.instancePath !== "undefined" ? this.options.instancePath : this.options.dataPath;
19
14
  }
20
-
21
15
  getError() {
22
- throw new Error(`Implement the 'getError' method inside ${this.constructor.name}!`)
16
+ throw new Error(`Implement the 'getError' method inside ${this.constructor.name}!`);
23
17
  }
24
18
  }
25
-
26
- export { BaseValidationError as default };
19
+ export {
20
+ BaseValidationError as default
21
+ };
22
+ //# sourceMappingURL=base.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 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"],
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
+ "names": []
7
+ }
@@ -0,0 +1,10 @@
1
+ export default class DefaultValidationError extends BaseValidationError {
2
+ constructor(...args: any[]);
3
+ name: string;
4
+ getError(): {
5
+ message: string;
6
+ path: string;
7
+ };
8
+ }
9
+ import BaseValidationError from './base.js';
10
+ //# sourceMappingURL=default.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"default.d.ts","sourceRoot":"","sources":["../../../../src/utils/betterAjvErrors/validation-errors/default.js"],"names":[],"mappings":"AAEA;IACE,4BAIC;IAFC,aAAoC;IAItC;;;MAOC;CACF;gCAjB+B,QAAQ"}
@@ -1,20 +1,19 @@
1
- import BaseValidationError from './base.js';
2
-
1
+ import BaseValidationError from "./base.js";
3
2
  class DefaultValidationError extends BaseValidationError {
4
3
  constructor(...args) {
5
4
  super(...args);
6
- this.name = 'DefaultValidationError';
5
+ this.name = "DefaultValidationError";
7
6
  this.options.isSkipEndLocation = true;
8
7
  }
9
-
10
8
  getError() {
11
9
  const { keyword, message } = this.options;
12
-
13
10
  return {
14
11
  message: `${keyword} ${message}`,
15
- path: this.instancePath,
16
- }
12
+ path: this.instancePath
13
+ };
17
14
  }
18
15
  }
19
-
20
- export { DefaultValidationError as default };
16
+ export {
17
+ DefaultValidationError as default
18
+ };
19
+ //# sourceMappingURL=default.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../src/utils/betterAjvErrors/validation-errors/default.js"],
4
+ "sourcesContent": ["import BaseValidationError from './base'\n\nexport default class DefaultValidationError extends BaseValidationError {\n constructor(...args) {\n super(...args)\n this.name = 'DefaultValidationError'\n this.options.isSkipEndLocation = true\n }\n\n getError() {\n const { keyword, message } = this.options\n\n return {\n message: `${keyword} ${message}`,\n path: this.instancePath,\n }\n }\n}\n"],
5
+ "mappings": "AAAA,OAAO,yBAAyB;AAEhC,MAAO,+BAA6C,oBAAoB;AAAA,EACtE,eAAe,MAAM;AACnB,UAAM,GAAG,IAAI;AACb,SAAK,OAAO;AACZ,SAAK,QAAQ,oBAAoB;AAAA,EACnC;AAAA,EAEA,WAAW;AACT,UAAM,EAAE,SAAS,QAAQ,IAAI,KAAK;AAElC,WAAO;AAAA,MACL,SAAS,GAAG,OAAO,IAAI,OAAO;AAAA,MAC9B,MAAM,KAAK;AAAA,IACb;AAAA,EACF;AACF;",
6
+ "names": []
7
+ }
@@ -0,0 +1,11 @@
1
+ export default class EnumValidationError extends BaseValidationError {
2
+ constructor(...args: any[]);
3
+ name: string;
4
+ getError(): {
5
+ message: string;
6
+ path: string;
7
+ };
8
+ findBestMatch(): any;
9
+ }
10
+ import BaseValidationError from './base.js';
11
+ //# sourceMappingURL=enum.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"enum.d.ts","sourceRoot":"","sources":["../../../../src/utils/betterAjvErrors/validation-errors/enum.js"],"names":[],"mappings":"AAKA;IACE,4BAGC;IADC,aAAiC;IAGnC;;;MAeC;IAED,qBAmBC;CACF;gCA7C+B,QAAQ"}
@@ -1,50 +1,40 @@
1
- import pointer from 'jsonpointer';
2
- import leven from 'leven';
3
- import BaseValidationError from './base.js';
4
-
1
+ import pointer from "jsonpointer";
2
+ import leven from "leven";
3
+ import BaseValidationError from "./base.js";
5
4
  class EnumValidationError extends BaseValidationError {
6
5
  constructor(...args) {
7
6
  super(...args);
8
- this.name = 'EnumValidationError';
7
+ this.name = "EnumValidationError";
9
8
  }
10
-
11
9
  getError() {
12
10
  const { message, params } = this.options;
13
11
  const bestMatch = this.findBestMatch();
14
- const allowedValues = params.allowedValues.join(', ');
15
-
12
+ const allowedValues = params.allowedValues.join(", ");
16
13
  const output = {
17
14
  message: `${message}: ${allowedValues}`,
18
- path: this.instancePath,
15
+ path: this.instancePath
19
16
  };
20
-
21
17
  if (bestMatch !== null) {
22
18
  output.suggestion = `Did you mean ${bestMatch}?`;
23
19
  }
24
-
25
- return output
20
+ return output;
26
21
  }
27
-
28
22
  findBestMatch() {
29
23
  const {
30
- params: { allowedValues },
24
+ params: { allowedValues }
31
25
  } = this.options;
32
-
33
- const currentValue = this.instancePath === '' ? this.data : pointer.get(this.data, this.instancePath);
34
-
26
+ const currentValue = this.instancePath === "" ? this.data : pointer.get(this.data, this.instancePath);
35
27
  if (!currentValue) {
36
- return null
28
+ return null;
37
29
  }
38
-
39
- const bestMatch = allowedValues
40
- .map((value) => ({
41
- value,
42
- weight: leven(value, currentValue.toString()),
43
- }))
44
- .sort((x, y) => (x.weight > y.weight ? 1 : x.weight < y.weight ? -1 : 0))[0];
45
-
46
- return allowedValues.length === 1 || bestMatch.weight < bestMatch.value.length ? bestMatch.value : null
30
+ const bestMatch = allowedValues.map((value) => ({
31
+ value,
32
+ weight: leven(value, currentValue.toString())
33
+ })).sort((x, y) => x.weight > y.weight ? 1 : x.weight < y.weight ? -1 : 0)[0];
34
+ return allowedValues.length === 1 || bestMatch.weight < bestMatch.value.length ? bestMatch.value : null;
47
35
  }
48
36
  }
49
-
50
- export { EnumValidationError as default };
37
+ export {
38
+ EnumValidationError as default
39
+ };
40
+ //# sourceMappingURL=enum.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../src/utils/betterAjvErrors/validation-errors/enum.js"],
4
+ "sourcesContent": ["import pointer from 'jsonpointer'\nimport leven from 'leven'\n\nimport BaseValidationError from './base'\n\nexport default class EnumValidationError extends BaseValidationError {\n constructor(...args) {\n super(...args)\n this.name = 'EnumValidationError'\n }\n\n getError() {\n const { message, params } = this.options\n const bestMatch = this.findBestMatch()\n const allowedValues = params.allowedValues.join(', ')\n\n const output = {\n message: `${message}: ${allowedValues}`,\n path: this.instancePath,\n }\n\n if (bestMatch !== null) {\n output.suggestion = `Did you mean ${bestMatch}?`\n }\n\n return output\n }\n\n findBestMatch() {\n const {\n params: { allowedValues },\n } = this.options\n\n const currentValue = this.instancePath === '' ? this.data : pointer.get(this.data, this.instancePath)\n\n if (!currentValue) {\n return null\n }\n\n const bestMatch = allowedValues\n .map((value) => ({\n value,\n weight: leven(value, currentValue.toString()),\n }))\n .sort((x, y) => (x.weight > y.weight ? 1 : x.weight < y.weight ? -1 : 0))[0]\n\n return allowedValues.length === 1 || bestMatch.weight < bestMatch.value.length ? bestMatch.value : null\n }\n}\n"],
5
+ "mappings": "AAAA,OAAO,aAAa;AACpB,OAAO,WAAW;AAElB,OAAO,yBAAyB;AAEhC,MAAO,4BAA0C,oBAAoB;AAAA,EACnE,eAAe,MAAM;AACnB,UAAM,GAAG,IAAI;AACb,SAAK,OAAO;AAAA,EACd;AAAA,EAEA,WAAW;AACT,UAAM,EAAE,SAAS,OAAO,IAAI,KAAK;AACjC,UAAM,YAAY,KAAK,cAAc;AACrC,UAAM,gBAAgB,OAAO,cAAc,KAAK,IAAI;AAEpD,UAAM,SAAS;AAAA,MACb,SAAS,GAAG,OAAO,KAAK,aAAa;AAAA,MACrC,MAAM,KAAK;AAAA,IACb;AAEA,QAAI,cAAc,MAAM;AACtB,aAAO,aAAa,gBAAgB,SAAS;AAAA,IAC/C;AAEA,WAAO;AAAA,EACT;AAAA,EAEA,gBAAgB;AACd,UAAM;AAAA,MACJ,QAAQ,EAAE,cAAc;AAAA,IAC1B,IAAI,KAAK;AAET,UAAM,eAAe,KAAK,iBAAiB,KAAK,KAAK,OAAO,QAAQ,IAAI,KAAK,MAAM,KAAK,YAAY;AAEpG,QAAI,CAAC,cAAc;AACjB,aAAO;AAAA,IACT;AAEA,UAAM,YAAY,cACf,IAAI,CAAC,WAAW;AAAA,MACf;AAAA,MACA,QAAQ,MAAM,OAAO,aAAa,SAAS,CAAC;AAAA,IAC9C,EAAE,EACD,KAAK,CAAC,GAAG,MAAO,EAAE,SAAS,EAAE,SAAS,IAAI,EAAE,SAAS,EAAE,SAAS,KAAK,CAAE,EAAE,CAAC;AAE7E,WAAO,cAAc,WAAW,KAAK,UAAU,SAAS,UAAU,MAAM,SAAS,UAAU,QAAQ;AAAA,EACrG;AACF;",
6
+ "names": []
7
+ }
@@ -0,0 +1,7 @@
1
+ export { default as AdditionalPropValidationError } from "./additional-prop.js";
2
+ export { default as DefaultValidationError } from "./default.js";
3
+ export { default as EnumValidationError } from "./enum.js";
4
+ export { default as PatternValidationError } from "./pattern.js";
5
+ export { default as RequiredValidationError } from "./required.js";
6
+ export { default as UnevaluatedPropValidationError } from "./unevaluated-prop.js";
7
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/utils/betterAjvErrors/validation-errors/index.js"],"names":[],"mappings":""}
@@ -0,0 +1,15 @@
1
+ import { default as default2 } from "./additional-prop.js";
2
+ import { default as default3 } from "./default.js";
3
+ import { default as default4 } from "./enum.js";
4
+ import { default as default5 } from "./pattern.js";
5
+ import { default as default6 } from "./required.js";
6
+ import { default as default7 } from "./unevaluated-prop.js";
7
+ export {
8
+ default2 as AdditionalPropValidationError,
9
+ default3 as DefaultValidationError,
10
+ default4 as EnumValidationError,
11
+ default5 as PatternValidationError,
12
+ default6 as RequiredValidationError,
13
+ default7 as UnevaluatedPropValidationError
14
+ };
15
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../src/utils/betterAjvErrors/validation-errors/index.js"],
4
+ "sourcesContent": ["export { default as AdditionalPropValidationError } from './additional-prop'\nexport { default as DefaultValidationError } from './default'\nexport { default as EnumValidationError } from './enum'\nexport { default as PatternValidationError } from './pattern'\nexport { default as RequiredValidationError } from './required'\nexport { default as UnevaluatedPropValidationError } from './unevaluated-prop'\n"],
5
+ "mappings": "AAAA,SAAoB,WAAXA,gBAAgD;AACzD,SAAoB,WAAXA,gBAAyC;AAClD,SAAoB,WAAXA,gBAAsC;AAC/C,SAAoB,WAAXA,gBAAyC;AAClD,SAAoB,WAAXA,gBAA0C;AACnD,SAAoB,WAAXA,gBAAiD;",
6
+ "names": ["default"]
7
+ }
@@ -0,0 +1,10 @@
1
+ export default class PatternValidationError extends BaseValidationError {
2
+ constructor(...args: any[]);
3
+ name: string;
4
+ getError(): {
5
+ message: string;
6
+ path: string;
7
+ };
8
+ }
9
+ import BaseValidationError from './base.js';
10
+ //# sourceMappingURL=pattern.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pattern.d.ts","sourceRoot":"","sources":["../../../../src/utils/betterAjvErrors/validation-errors/pattern.js"],"names":[],"mappings":"AAEA;IACE,4BAIC;IAFC,aAAoC;IAItC;;;MAOC;CACF;gCAjB+B,QAAQ"}
@@ -1,20 +1,19 @@
1
- import BaseValidationError from './base.js';
2
-
1
+ import BaseValidationError from "./base.js";
3
2
  class PatternValidationError extends BaseValidationError {
4
3
  constructor(...args) {
5
4
  super(...args);
6
- this.name = 'PatternValidationError';
5
+ this.name = "PatternValidationError";
7
6
  this.options.isIdentifierLocation = true;
8
7
  }
9
-
10
8
  getError() {
11
9
  const { params, propertyName } = this.options;
12
-
13
10
  return {
14
11
  message: `Property "${propertyName}" must match pattern ${params.pattern}`,
15
- path: this.instancePath,
16
- }
12
+ path: this.instancePath
13
+ };
17
14
  }
18
15
  }
19
-
20
- export { PatternValidationError as default };
16
+ export {
17
+ PatternValidationError as default
18
+ };
19
+ //# sourceMappingURL=pattern.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../src/utils/betterAjvErrors/validation-errors/pattern.js"],
4
+ "sourcesContent": ["import BaseValidationError from './base'\n\nexport default class PatternValidationError extends BaseValidationError {\n constructor(...args) {\n super(...args)\n this.name = 'PatternValidationError'\n this.options.isIdentifierLocation = true\n }\n\n getError() {\n const { params, propertyName } = this.options\n\n return {\n message: `Property \"${propertyName}\" must match pattern ${params.pattern}`,\n path: this.instancePath,\n }\n }\n}\n"],
5
+ "mappings": "AAAA,OAAO,yBAAyB;AAEhC,MAAO,+BAA6C,oBAAoB;AAAA,EACtE,eAAe,MAAM;AACnB,UAAM,GAAG,IAAI;AACb,SAAK,OAAO;AACZ,SAAK,QAAQ,uBAAuB;AAAA,EACtC;AAAA,EAEA,WAAW;AACT,UAAM,EAAE,QAAQ,aAAa,IAAI,KAAK;AAEtC,WAAO;AAAA,MACL,SAAS,aAAa,YAAY,wBAAwB,OAAO,OAAO;AAAA,MACxE,MAAM,KAAK;AAAA,IACb;AAAA,EACF;AACF;",
6
+ "names": []
7
+ }
@@ -0,0 +1,10 @@
1
+ export default class RequiredValidationError extends BaseValidationError {
2
+ constructor(...args: any[]);
3
+ name: string;
4
+ getError(): {
5
+ message: string;
6
+ path: string;
7
+ };
8
+ }
9
+ import BaseValidationError from './base.js';
10
+ //# sourceMappingURL=required.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"required.d.ts","sourceRoot":"","sources":["../../../../src/utils/betterAjvErrors/validation-errors/required.js"],"names":[],"mappings":"AAEA;IACE,4BAGC;IADC,aAAqC;IAGvC;;;MAOC;CACF;gCAhB+B,QAAQ"}
@@ -1,19 +1,18 @@
1
- import BaseValidationError from './base.js';
2
-
1
+ import BaseValidationError from "./base.js";
3
2
  class RequiredValidationError extends BaseValidationError {
4
3
  constructor(...args) {
5
4
  super(...args);
6
- this.name = 'RequiredValidationError';
5
+ this.name = "RequiredValidationError";
7
6
  }
8
-
9
7
  getError() {
10
8
  const { message } = this.options;
11
-
12
9
  return {
13
10
  message: `${message}`,
14
- path: this.instancePath,
15
- }
11
+ path: this.instancePath
12
+ };
16
13
  }
17
14
  }
18
-
19
- export { RequiredValidationError as default };
15
+ export {
16
+ RequiredValidationError as default
17
+ };
18
+ //# sourceMappingURL=required.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../src/utils/betterAjvErrors/validation-errors/required.js"],
4
+ "sourcesContent": ["import BaseValidationError from './base'\n\nexport default class RequiredValidationError extends BaseValidationError {\n constructor(...args) {\n super(...args)\n this.name = 'RequiredValidationError'\n }\n\n getError() {\n const { message } = this.options\n\n return {\n message: `${message}`,\n path: this.instancePath,\n }\n }\n}\n"],
5
+ "mappings": "AAAA,OAAO,yBAAyB;AAEhC,MAAO,gCAA8C,oBAAoB;AAAA,EACvE,eAAe,MAAM;AACnB,UAAM,GAAG,IAAI;AACb,SAAK,OAAO;AAAA,EACd;AAAA,EAEA,WAAW;AACT,UAAM,EAAE,QAAQ,IAAI,KAAK;AAEzB,WAAO;AAAA,MACL,SAAS,GAAG,OAAO;AAAA,MACnB,MAAM,KAAK;AAAA,IACb;AAAA,EACF;AACF;",
6
+ "names": []
7
+ }
@@ -0,0 +1,10 @@
1
+ export default class UnevaluatedPropValidationError extends BaseValidationError {
2
+ constructor(...args: any[]);
3
+ name: string;
4
+ getError(): {
5
+ message: string;
6
+ path: string;
7
+ };
8
+ }
9
+ import BaseValidationError from './base.js';
10
+ //# sourceMappingURL=unevaluated-prop.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"unevaluated-prop.d.ts","sourceRoot":"","sources":["../../../../src/utils/betterAjvErrors/validation-errors/unevaluated-prop.js"],"names":[],"mappings":"AAEA;IACE,4BAIC;IAFC,aAA4C;IAI9C;;;MAOC;CACF;gCAjB+B,QAAQ"}
@@ -1,20 +1,19 @@
1
- import BaseValidationError from './base.js';
2
-
1
+ import BaseValidationError from "./base.js";
3
2
  class UnevaluatedPropValidationError extends BaseValidationError {
4
3
  constructor(...args) {
5
4
  super(...args);
6
- this.name = 'UnevaluatedPropValidationError';
5
+ this.name = "UnevaluatedPropValidationError";
7
6
  this.options.isIdentifierLocation = true;
8
7
  }
9
-
10
8
  getError() {
11
9
  const { params } = this.options;
12
-
13
10
  return {
14
11
  message: `Property ${params.unevaluatedProperty} is not expected to be here`,
15
- path: this.instancePath,
16
- }
12
+ path: this.instancePath
13
+ };
17
14
  }
18
15
  }
19
-
20
- export { UnevaluatedPropValidationError as default };
16
+ export {
17
+ UnevaluatedPropValidationError as default
18
+ };
19
+ //# sourceMappingURL=unevaluated-prop.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../src/utils/betterAjvErrors/validation-errors/unevaluated-prop.js"],
4
+ "sourcesContent": ["import BaseValidationError from './base'\n\nexport default class UnevaluatedPropValidationError extends BaseValidationError {\n constructor(...args) {\n super(...args)\n this.name = 'UnevaluatedPropValidationError'\n this.options.isIdentifierLocation = true\n }\n\n getError() {\n const { params } = this.options\n\n return {\n message: `Property ${params.unevaluatedProperty} is not expected to be here`,\n path: this.instancePath,\n }\n }\n}\n"],
5
+ "mappings": "AAAA,OAAO,yBAAyB;AAEhC,MAAO,uCAAqD,oBAAoB;AAAA,EAC9E,eAAe,MAAM;AACnB,UAAM,GAAG,IAAI;AACb,SAAK,OAAO;AACZ,SAAK,QAAQ,uBAAuB;AAAA,EACtC;AAAA,EAEA,WAAW;AACT,UAAM,EAAE,OAAO,IAAI,KAAK;AAExB,WAAO;AAAA,MACL,SAAS,YAAY,OAAO,mBAAmB;AAAA,MAC/C,MAAM,KAAK;AAAA,IACb;AAAA,EACF;AACF;",
6
+ "names": []
7
+ }
@@ -1,5 +1,5 @@
1
- import type { AnyApiDefinitionFormat, DereferenceResult, Filesystem } from '../types/index.ts';
2
- import { type ResolveReferencesOptions } from './resolveReferences.ts';
1
+ import type { AnyApiDefinitionFormat, DereferenceResult, Filesystem } from '../types/index.js';
2
+ import { type ResolveReferencesOptions } from './resolveReferences.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,mBAAmB,CAAA;AAI9F,OAAO,EAAE,KAAK,wBAAwB,EAAqB,MAAM,wBAAwB,CAAA;AAEzF,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,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,21 +1,19 @@
1
- import { details } from './details.js';
2
- import { getEntrypoint } from './getEntrypoint.js';
3
- import { makeFilesystem } from './makeFilesystem.js';
4
- import { resolveReferences } from './resolveReferences.js';
5
-
6
- /**
7
- * Resolves all references in an OpenAPI document
8
- */
1
+ import { details } from "./details.js";
2
+ import { getEntrypoint } from "./getEntrypoint.js";
3
+ import { makeFilesystem } from "./makeFilesystem.js";
4
+ import { resolveReferences } from "./resolveReferences.js";
9
5
  async function dereference(value, options) {
10
- const filesystem = makeFilesystem(value);
11
- const entrypoint = getEntrypoint(filesystem);
12
- const result = resolveReferences(filesystem, options);
13
- return {
14
- specification: entrypoint.specification,
15
- errors: result.errors,
16
- schema: result.schema,
17
- ...details(entrypoint.specification),
18
- };
6
+ const filesystem = makeFilesystem(value);
7
+ const entrypoint = getEntrypoint(filesystem);
8
+ const result = resolveReferences(filesystem, options);
9
+ return {
10
+ specification: entrypoint.specification,
11
+ errors: result.errors,
12
+ schema: result.schema,
13
+ ...details(entrypoint.specification)
14
+ };
19
15
  }
20
-
21
- export { dereference };
16
+ export {
17
+ dereference
18
+ };
19
+ //# sourceMappingURL=dereference.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 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"],
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
+ "names": []
7
+ }