json-schema-library 10.3.0 → 10.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (242) hide show
  1. package/.editorconfig +1 -1
  2. package/.prettierrc +0 -1
  3. package/README.md +415 -409
  4. package/dist/index.d.mts +651 -0
  5. package/dist/index.d.ts +1125 -24
  6. package/dist/index.js +1 -0
  7. package/dist/index.mjs +1 -0
  8. package/dist/jlib.js +12 -0
  9. package/index.ts +1 -0
  10. package/package.json +102 -100
  11. package/src/compileSchema.ts +1 -1
  12. package/src/draft2019-09/methods/getData.ts +10 -10
  13. package/src/methods/getData.ts +12 -12
  14. package/src/settings.test.ts +21 -0
  15. package/src/utils/joinId.test.ts +6 -0
  16. package/tsconfig.json +2 -2
  17. package/tsdown.config.ts +8 -0
  18. package/tsdown.iife.config.ts +10 -0
  19. package/dist/jsonSchemaLibrary.js +0 -1
  20. package/dist/module/index.js +0 -22
  21. package/dist/module/remotes/draft04.json +0 -150
  22. package/dist/module/remotes/draft06.json +0 -155
  23. package/dist/module/remotes/draft07.json +0 -155
  24. package/dist/module/remotes/draft2019-09.json +0 -41
  25. package/dist/module/remotes/draft2019-09_meta_applicator.json +0 -52
  26. package/dist/module/remotes/draft2019-09_meta_content.json +0 -12
  27. package/dist/module/remotes/draft2019-09_meta_core.json +0 -53
  28. package/dist/module/remotes/draft2019-09_meta_format.json +0 -10
  29. package/dist/module/remotes/draft2019-09_meta_meta-data.json +0 -32
  30. package/dist/module/remotes/draft2019-09_meta_validation.json +0 -94
  31. package/dist/module/remotes/draft2020-12.json +0 -54
  32. package/dist/module/remotes/draft2020-12_meta_applicator.json +0 -44
  33. package/dist/module/remotes/draft2020-12_meta_content.json +0 -12
  34. package/dist/module/remotes/draft2020-12_meta_core.json +0 -47
  35. package/dist/module/remotes/draft2020-12_meta_format_annotation.json +0 -10
  36. package/dist/module/remotes/draft2020-12_meta_format_assertion.json +0 -10
  37. package/dist/module/remotes/draft2020-12_meta_meta_data.json +0 -32
  38. package/dist/module/remotes/draft2020-12_meta_unevaluated.json +0 -11
  39. package/dist/module/remotes/draft2020-12_meta_validation.json +0 -86
  40. package/dist/module/remotes/index.js +0 -43
  41. package/dist/module/src/Draft.js +0 -51
  42. package/dist/module/src/Keyword.js +0 -1
  43. package/dist/module/src/SchemaNode.js +0 -281
  44. package/dist/module/src/compileSchema.js +0 -71
  45. package/dist/module/src/draft04/keywords/$ref.js +0 -132
  46. package/dist/module/src/draft04/keywords/exclusiveMaximum.js +0 -20
  47. package/dist/module/src/draft04/keywords/exclusiveMinimum.js +0 -20
  48. package/dist/module/src/draft04.js +0 -105
  49. package/dist/module/src/draft06/keywords/$ref.js +0 -60
  50. package/dist/module/src/draft06.js +0 -107
  51. package/dist/module/src/draft07.js +0 -99
  52. package/dist/module/src/draft2019-09/keywords/$ref.js +0 -199
  53. package/dist/module/src/draft2019-09/keywords/additionalItems.js +0 -57
  54. package/dist/module/src/draft2019-09/keywords/items.js +0 -64
  55. package/dist/module/src/draft2019-09/keywords/unevaluatedItems.js +0 -82
  56. package/dist/module/src/draft2019-09/methods/getChildSelection.js +0 -39
  57. package/dist/module/src/draft2019-09/methods/getData.js +0 -302
  58. package/dist/module/src/draft2019.js +0 -110
  59. package/dist/module/src/draft2020.js +0 -120
  60. package/dist/module/src/draftEditor.js +0 -31
  61. package/dist/module/src/errors/errors.js +0 -67
  62. package/dist/module/src/errors/render.js +0 -11
  63. package/dist/module/src/formats/formats.js +0 -297
  64. package/dist/module/src/getNode.js +0 -44
  65. package/dist/module/src/getNodeChild.js +0 -45
  66. package/dist/module/src/isItemEvaluated.js +0 -59
  67. package/dist/module/src/isPropertyEvaluated.js +0 -69
  68. package/dist/module/src/keywords/$defs.js +0 -25
  69. package/dist/module/src/keywords/$ref.js +0 -221
  70. package/dist/module/src/keywords/additionalProperties.js +0 -91
  71. package/dist/module/src/keywords/allOf.js +0 -48
  72. package/dist/module/src/keywords/anyOf.js +0 -46
  73. package/dist/module/src/keywords/const.js +0 -14
  74. package/dist/module/src/keywords/contains.js +0 -64
  75. package/dist/module/src/keywords/dependencies.js +0 -117
  76. package/dist/module/src/keywords/dependentRequired.js +0 -52
  77. package/dist/module/src/keywords/dependentSchemas.js +0 -85
  78. package/dist/module/src/keywords/enum.js +0 -27
  79. package/dist/module/src/keywords/exclusiveMaximum.js +0 -20
  80. package/dist/module/src/keywords/exclusiveMinimum.js +0 -20
  81. package/dist/module/src/keywords/format.js +0 -11
  82. package/dist/module/src/keywords/ifthenelse.js +0 -66
  83. package/dist/module/src/keywords/items.js +0 -55
  84. package/dist/module/src/keywords/maxItems.js +0 -18
  85. package/dist/module/src/keywords/maxLength.js +0 -23
  86. package/dist/module/src/keywords/maxProperties.js +0 -23
  87. package/dist/module/src/keywords/maximum.js +0 -31
  88. package/dist/module/src/keywords/minItems.js +0 -21
  89. package/dist/module/src/keywords/minLength.js +0 -24
  90. package/dist/module/src/keywords/minProperties.js +0 -22
  91. package/dist/module/src/keywords/minimum.js +0 -31
  92. package/dist/module/src/keywords/multipleOf.js +0 -38
  93. package/dist/module/src/keywords/not.js +0 -20
  94. package/dist/module/src/keywords/oneOf.js +0 -240
  95. package/dist/module/src/keywords/pattern.js +0 -27
  96. package/dist/module/src/keywords/patternProperties.js +0 -103
  97. package/dist/module/src/keywords/prefixItems.js +0 -46
  98. package/dist/module/src/keywords/properties.js +0 -42
  99. package/dist/module/src/keywords/propertyNames.js +0 -59
  100. package/dist/module/src/keywords/required.js +0 -25
  101. package/dist/module/src/keywords/type.js +0 -40
  102. package/dist/module/src/keywords/unevaluatedItems.js +0 -74
  103. package/dist/module/src/keywords/unevaluatedProperties.js +0 -61
  104. package/dist/module/src/keywords/uniqueItems.js +0 -30
  105. package/dist/module/src/mergeNode.js +0 -111
  106. package/dist/module/src/methods/createSchema.js +0 -33
  107. package/dist/module/src/methods/getChildSelection.js +0 -40
  108. package/dist/module/src/methods/getData.js +0 -299
  109. package/dist/module/src/methods/toDataNodes.js +0 -27
  110. package/dist/module/src/methods/toSchemaNodes.js +0 -37
  111. package/dist/module/src/settings.js +0 -20
  112. package/dist/module/src/tests/spec/draft04.spec.js +0 -11
  113. package/dist/module/src/tests/spec/draft06.spec.js +0 -11
  114. package/dist/module/src/tests/spec/draft07.spec.js +0 -11
  115. package/dist/module/src/tests/spec/draft2019-09.spec.js +0 -79
  116. package/dist/module/src/tests/spec/draft2020-12.spec.js +0 -63
  117. package/dist/module/src/tests/types.js +0 -13
  118. package/dist/module/src/tests/utils/addRemotes.js +0 -17
  119. package/dist/module/src/tests/utils/getDraftTests.js +0 -36
  120. package/dist/module/src/tests/utils/runTestCases.js +0 -102
  121. package/dist/module/src/types.js +0 -9
  122. package/dist/module/src/utils/copyDraft.js +0 -6
  123. package/dist/module/src/utils/getDefaultValue.js +0 -15
  124. package/dist/module/src/utils/getPrecision.js +0 -11
  125. package/dist/module/src/utils/getSchemaType.js +0 -122
  126. package/dist/module/src/utils/getTypeOf.js +0 -8
  127. package/dist/module/src/utils/getValue.js +0 -9
  128. package/dist/module/src/utils/hasProperty.js +0 -2
  129. package/dist/module/src/utils/isEmpty.js +0 -17
  130. package/dist/module/src/utils/isFile.js +0 -10
  131. package/dist/module/src/utils/isObject.js +0 -4
  132. package/dist/module/src/utils/isType.js +0 -1
  133. package/dist/module/src/utils/joinId.js +0 -40
  134. package/dist/module/src/utils/mergeSchema.js +0 -77
  135. package/dist/module/src/utils/omit.js +0 -19
  136. package/dist/module/src/utils/pick.js +0 -13
  137. package/dist/module/src/utils/punycode.ucs2decode.js +0 -43
  138. package/dist/module/src/utils/sanitizeErrors.js +0 -16
  139. package/dist/module/src/utils/splitRef.js +0 -18
  140. package/dist/module/src/validateNode.js +0 -28
  141. package/dist/remotes/index.d.ts +0 -3
  142. package/dist/src/Draft.d.ts +0 -35
  143. package/dist/src/Keyword.d.ts +0 -62
  144. package/dist/src/SchemaNode.d.ts +0 -220
  145. package/dist/src/compileSchema.d.ts +0 -15
  146. package/dist/src/draft04/keywords/$ref.d.ts +0 -2
  147. package/dist/src/draft04/keywords/exclusiveMaximum.d.ts +0 -2
  148. package/dist/src/draft04/keywords/exclusiveMinimum.d.ts +0 -2
  149. package/dist/src/draft04.d.ts +0 -22
  150. package/dist/src/draft06/keywords/$ref.d.ts +0 -2
  151. package/dist/src/draft06.d.ts +0 -22
  152. package/dist/src/draft07.d.ts +0 -12
  153. package/dist/src/draft2019-09/keywords/$ref.d.ts +0 -9
  154. package/dist/src/draft2019-09/keywords/additionalItems.d.ts +0 -4
  155. package/dist/src/draft2019-09/keywords/items.d.ts +0 -4
  156. package/dist/src/draft2019-09/keywords/unevaluatedItems.d.ts +0 -9
  157. package/dist/src/draft2019-09/methods/getChildSelection.d.ts +0 -7
  158. package/dist/src/draft2019-09/methods/getData.d.ts +0 -27
  159. package/dist/src/draft2019.d.ts +0 -15
  160. package/dist/src/draft2020.d.ts +0 -25
  161. package/dist/src/draftEditor.d.ts +0 -6
  162. package/dist/src/errors/errors.d.ts +0 -67
  163. package/dist/src/errors/render.d.ts +0 -3
  164. package/dist/src/formats/formats.d.ts +0 -3
  165. package/dist/src/getNode.d.ts +0 -9
  166. package/dist/src/getNodeChild.d.ts +0 -9
  167. package/dist/src/isItemEvaluated.d.ts +0 -22
  168. package/dist/src/isPropertyEvaluated.d.ts +0 -22
  169. package/dist/src/keywords/$defs.d.ts +0 -4
  170. package/dist/src/keywords/$ref.d.ts +0 -12
  171. package/dist/src/keywords/additionalProperties.d.ts +0 -4
  172. package/dist/src/keywords/allOf.d.ts +0 -4
  173. package/dist/src/keywords/anyOf.d.ts +0 -4
  174. package/dist/src/keywords/const.d.ts +0 -2
  175. package/dist/src/keywords/contains.d.ts +0 -4
  176. package/dist/src/keywords/dependencies.d.ts +0 -5
  177. package/dist/src/keywords/dependentRequired.d.ts +0 -5
  178. package/dist/src/keywords/dependentSchemas.d.ts +0 -6
  179. package/dist/src/keywords/enum.d.ts +0 -2
  180. package/dist/src/keywords/exclusiveMaximum.d.ts +0 -2
  181. package/dist/src/keywords/exclusiveMinimum.d.ts +0 -2
  182. package/dist/src/keywords/format.d.ts +0 -2
  183. package/dist/src/keywords/ifthenelse.d.ts +0 -4
  184. package/dist/src/keywords/items.d.ts +0 -4
  185. package/dist/src/keywords/maxItems.d.ts +0 -2
  186. package/dist/src/keywords/maxLength.d.ts +0 -2
  187. package/dist/src/keywords/maxProperties.d.ts +0 -2
  188. package/dist/src/keywords/maximum.d.ts +0 -2
  189. package/dist/src/keywords/minItems.d.ts +0 -2
  190. package/dist/src/keywords/minLength.d.ts +0 -2
  191. package/dist/src/keywords/minProperties.d.ts +0 -2
  192. package/dist/src/keywords/minimum.d.ts +0 -2
  193. package/dist/src/keywords/multipleOf.d.ts +0 -2
  194. package/dist/src/keywords/not.d.ts +0 -4
  195. package/dist/src/keywords/oneOf.d.ts +0 -16
  196. package/dist/src/keywords/pattern.d.ts +0 -2
  197. package/dist/src/keywords/patternProperties.d.ts +0 -4
  198. package/dist/src/keywords/prefixItems.d.ts +0 -4
  199. package/dist/src/keywords/properties.d.ts +0 -4
  200. package/dist/src/keywords/propertyNames.d.ts +0 -4
  201. package/dist/src/keywords/required.d.ts +0 -2
  202. package/dist/src/keywords/type.d.ts +0 -2
  203. package/dist/src/keywords/unevaluatedItems.d.ts +0 -9
  204. package/dist/src/keywords/unevaluatedProperties.d.ts +0 -4
  205. package/dist/src/keywords/uniqueItems.d.ts +0 -2
  206. package/dist/src/mergeNode.d.ts +0 -9
  207. package/dist/src/methods/createSchema.d.ts +0 -6
  208. package/dist/src/methods/getChildSelection.d.ts +0 -7
  209. package/dist/src/methods/getData.d.ts +0 -27
  210. package/dist/src/methods/toDataNodes.d.ts +0 -7
  211. package/dist/src/methods/toSchemaNodes.d.ts +0 -2
  212. package/dist/src/settings.d.ts +0 -7
  213. package/dist/src/tests/spec/draft04.spec.d.ts +0 -1
  214. package/dist/src/tests/spec/draft06.spec.d.ts +0 -1
  215. package/dist/src/tests/spec/draft07.spec.d.ts +0 -1
  216. package/dist/src/tests/spec/draft2019-09.spec.d.ts +0 -1
  217. package/dist/src/tests/spec/draft2020-12.spec.d.ts +0 -1
  218. package/dist/src/tests/types.d.ts +0 -3
  219. package/dist/src/tests/utils/addRemotes.d.ts +0 -3
  220. package/dist/src/tests/utils/getDraftTests.d.ts +0 -33
  221. package/dist/src/tests/utils/runTestCases.d.ts +0 -2
  222. package/dist/src/types.d.ts +0 -45
  223. package/dist/src/utils/copyDraft.d.ts +0 -26
  224. package/dist/src/utils/getDefaultValue.d.ts +0 -2
  225. package/dist/src/utils/getPrecision.d.ts +0 -4
  226. package/dist/src/utils/getSchemaType.d.ts +0 -8
  227. package/dist/src/utils/getTypeOf.d.ts +0 -2
  228. package/dist/src/utils/getValue.d.ts +0 -1
  229. package/dist/src/utils/hasProperty.d.ts +0 -1
  230. package/dist/src/utils/isEmpty.d.ts +0 -1
  231. package/dist/src/utils/isFile.d.ts +0 -2
  232. package/dist/src/utils/isObject.d.ts +0 -1
  233. package/dist/src/utils/isType.d.ts +0 -1
  234. package/dist/src/utils/joinId.d.ts +0 -1
  235. package/dist/src/utils/mergeSchema.d.ts +0 -3
  236. package/dist/src/utils/omit.d.ts +0 -11
  237. package/dist/src/utils/pick.d.ts +0 -3
  238. package/dist/src/utils/punycode.ucs2decode.d.ts +0 -16
  239. package/dist/src/utils/sanitizeErrors.d.ts +0 -5
  240. package/dist/src/utils/splitRef.d.ts +0 -1
  241. package/dist/src/validateNode.d.ts +0 -3
  242. package/webpack.config.js +0 -49
package/.editorconfig CHANGED
@@ -16,6 +16,6 @@ insert_final_newline = true
16
16
  trim_trailing_whitespace = false
17
17
  indent_size = 2
18
18
 
19
- [{package.json,bower.json}]
19
+ [package.json]
20
20
  indent_style = space
21
21
  indent_size = 2
package/.prettierrc CHANGED
@@ -1,6 +1,5 @@
1
1
  {
2
2
  "printWidth": 120,
3
- "tabWidth": 4,
4
3
  "singleQuote": false,
5
4
  "bracketSpacing": true,
6
5
  "trailingComma": "none"