toolcraft 0.0.115 → 0.0.116

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 (547) hide show
  1. package/composition.json +2 -27
  2. package/dist/composition.json +2 -27
  3. package/node_modules/tiny-stdio-mcp-server/dist/composition.json +15 -0
  4. package/node_modules/tiny-stdio-mcp-server/dist/server.js +21 -16
  5. package/node_modules/tiny-stdio-mcp-server/package.json +3 -1
  6. package/node_modules/toolcraft-schema/dist/index.d.ts +2 -0
  7. package/node_modules/toolcraft-schema/dist/index.js +1 -0
  8. package/node_modules/toolcraft-schema/dist/json-schema/compiler.d.ts +11 -0
  9. package/node_modules/toolcraft-schema/dist/json-schema/compiler.js +390 -0
  10. package/node_modules/toolcraft-schema/dist/json-schema/evaluate.d.ts +3 -0
  11. package/node_modules/toolcraft-schema/dist/json-schema/evaluate.js +442 -0
  12. package/node_modules/toolcraft-schema/dist/json-schema/index.d.ts +5 -0
  13. package/node_modules/toolcraft-schema/dist/json-schema/index.js +19 -0
  14. package/node_modules/toolcraft-schema/dist/json-schema/types.d.ts +33 -0
  15. package/node_modules/toolcraft-schema/dist/json-schema/types.js +1 -0
  16. package/node_modules/toolcraft-schema/dist/json-schema/utils.d.ts +19 -0
  17. package/node_modules/toolcraft-schema/dist/json-schema/utils.js +171 -0
  18. package/node_modules/toolcraft-schema/dist/validate.d.ts +1 -0
  19. package/node_modules/toolcraft-schema/package.json +3 -3
  20. package/package.json +4 -6
  21. package/node_modules/ajv/.runkit_example.js +0 -23
  22. package/node_modules/ajv/LICENSE +0 -22
  23. package/node_modules/ajv/README.md +0 -207
  24. package/node_modules/ajv/dist/2019.d.ts +0 -19
  25. package/node_modules/ajv/dist/2019.js +0 -61
  26. package/node_modules/ajv/dist/2019.js.map +0 -1
  27. package/node_modules/ajv/dist/2020.d.ts +0 -19
  28. package/node_modules/ajv/dist/2020.js +0 -55
  29. package/node_modules/ajv/dist/2020.js.map +0 -1
  30. package/node_modules/ajv/dist/ajv.d.ts +0 -18
  31. package/node_modules/ajv/dist/ajv.js +0 -50
  32. package/node_modules/ajv/dist/ajv.js.map +0 -1
  33. package/node_modules/ajv/dist/compile/codegen/code.d.ts +0 -40
  34. package/node_modules/ajv/dist/compile/codegen/code.js +0 -156
  35. package/node_modules/ajv/dist/compile/codegen/code.js.map +0 -1
  36. package/node_modules/ajv/dist/compile/codegen/index.d.ts +0 -79
  37. package/node_modules/ajv/dist/compile/codegen/index.js +0 -697
  38. package/node_modules/ajv/dist/compile/codegen/index.js.map +0 -1
  39. package/node_modules/ajv/dist/compile/codegen/scope.d.ts +0 -79
  40. package/node_modules/ajv/dist/compile/codegen/scope.js +0 -143
  41. package/node_modules/ajv/dist/compile/codegen/scope.js.map +0 -1
  42. package/node_modules/ajv/dist/compile/errors.d.ts +0 -13
  43. package/node_modules/ajv/dist/compile/errors.js +0 -123
  44. package/node_modules/ajv/dist/compile/errors.js.map +0 -1
  45. package/node_modules/ajv/dist/compile/index.d.ts +0 -80
  46. package/node_modules/ajv/dist/compile/index.js +0 -242
  47. package/node_modules/ajv/dist/compile/index.js.map +0 -1
  48. package/node_modules/ajv/dist/compile/jtd/parse.d.ts +0 -4
  49. package/node_modules/ajv/dist/compile/jtd/parse.js +0 -350
  50. package/node_modules/ajv/dist/compile/jtd/parse.js.map +0 -1
  51. package/node_modules/ajv/dist/compile/jtd/serialize.d.ts +0 -4
  52. package/node_modules/ajv/dist/compile/jtd/serialize.js +0 -236
  53. package/node_modules/ajv/dist/compile/jtd/serialize.js.map +0 -1
  54. package/node_modules/ajv/dist/compile/jtd/types.d.ts +0 -6
  55. package/node_modules/ajv/dist/compile/jtd/types.js +0 -14
  56. package/node_modules/ajv/dist/compile/jtd/types.js.map +0 -1
  57. package/node_modules/ajv/dist/compile/names.d.ts +0 -20
  58. package/node_modules/ajv/dist/compile/names.js +0 -28
  59. package/node_modules/ajv/dist/compile/names.js.map +0 -1
  60. package/node_modules/ajv/dist/compile/ref_error.d.ts +0 -6
  61. package/node_modules/ajv/dist/compile/ref_error.js +0 -12
  62. package/node_modules/ajv/dist/compile/ref_error.js.map +0 -1
  63. package/node_modules/ajv/dist/compile/resolve.d.ts +0 -12
  64. package/node_modules/ajv/dist/compile/resolve.js +0 -155
  65. package/node_modules/ajv/dist/compile/resolve.js.map +0 -1
  66. package/node_modules/ajv/dist/compile/rules.d.ts +0 -28
  67. package/node_modules/ajv/dist/compile/rules.js +0 -26
  68. package/node_modules/ajv/dist/compile/rules.js.map +0 -1
  69. package/node_modules/ajv/dist/compile/util.d.ts +0 -40
  70. package/node_modules/ajv/dist/compile/util.js +0 -178
  71. package/node_modules/ajv/dist/compile/util.js.map +0 -1
  72. package/node_modules/ajv/dist/compile/validate/applicability.d.ts +0 -6
  73. package/node_modules/ajv/dist/compile/validate/applicability.js +0 -19
  74. package/node_modules/ajv/dist/compile/validate/applicability.js.map +0 -1
  75. package/node_modules/ajv/dist/compile/validate/boolSchema.d.ts +0 -4
  76. package/node_modules/ajv/dist/compile/validate/boolSchema.js +0 -50
  77. package/node_modules/ajv/dist/compile/validate/boolSchema.js.map +0 -1
  78. package/node_modules/ajv/dist/compile/validate/dataType.d.ts +0 -17
  79. package/node_modules/ajv/dist/compile/validate/dataType.js +0 -203
  80. package/node_modules/ajv/dist/compile/validate/dataType.js.map +0 -1
  81. package/node_modules/ajv/dist/compile/validate/defaults.d.ts +0 -2
  82. package/node_modules/ajv/dist/compile/validate/defaults.js +0 -35
  83. package/node_modules/ajv/dist/compile/validate/defaults.js.map +0 -1
  84. package/node_modules/ajv/dist/compile/validate/index.d.ts +0 -42
  85. package/node_modules/ajv/dist/compile/validate/index.js +0 -520
  86. package/node_modules/ajv/dist/compile/validate/index.js.map +0 -1
  87. package/node_modules/ajv/dist/compile/validate/keyword.d.ts +0 -8
  88. package/node_modules/ajv/dist/compile/validate/keyword.js +0 -124
  89. package/node_modules/ajv/dist/compile/validate/keyword.js.map +0 -1
  90. package/node_modules/ajv/dist/compile/validate/subschema.d.ts +0 -47
  91. package/node_modules/ajv/dist/compile/validate/subschema.js +0 -81
  92. package/node_modules/ajv/dist/compile/validate/subschema.js.map +0 -1
  93. package/node_modules/ajv/dist/core.d.ts +0 -174
  94. package/node_modules/ajv/dist/core.js +0 -618
  95. package/node_modules/ajv/dist/core.js.map +0 -1
  96. package/node_modules/ajv/dist/jtd.d.ts +0 -47
  97. package/node_modules/ajv/dist/jtd.js +0 -72
  98. package/node_modules/ajv/dist/jtd.js.map +0 -1
  99. package/node_modules/ajv/dist/refs/data.json +0 -13
  100. package/node_modules/ajv/dist/refs/json-schema-2019-09/index.d.ts +0 -2
  101. package/node_modules/ajv/dist/refs/json-schema-2019-09/index.js +0 -28
  102. package/node_modules/ajv/dist/refs/json-schema-2019-09/index.js.map +0 -1
  103. package/node_modules/ajv/dist/refs/json-schema-2019-09/meta/applicator.json +0 -53
  104. package/node_modules/ajv/dist/refs/json-schema-2019-09/meta/content.json +0 -17
  105. package/node_modules/ajv/dist/refs/json-schema-2019-09/meta/core.json +0 -57
  106. package/node_modules/ajv/dist/refs/json-schema-2019-09/meta/format.json +0 -14
  107. package/node_modules/ajv/dist/refs/json-schema-2019-09/meta/meta-data.json +0 -37
  108. package/node_modules/ajv/dist/refs/json-schema-2019-09/meta/validation.json +0 -90
  109. package/node_modules/ajv/dist/refs/json-schema-2019-09/schema.json +0 -39
  110. package/node_modules/ajv/dist/refs/json-schema-2020-12/index.d.ts +0 -2
  111. package/node_modules/ajv/dist/refs/json-schema-2020-12/index.js +0 -30
  112. package/node_modules/ajv/dist/refs/json-schema-2020-12/index.js.map +0 -1
  113. package/node_modules/ajv/dist/refs/json-schema-2020-12/meta/applicator.json +0 -48
  114. package/node_modules/ajv/dist/refs/json-schema-2020-12/meta/content.json +0 -17
  115. package/node_modules/ajv/dist/refs/json-schema-2020-12/meta/core.json +0 -51
  116. package/node_modules/ajv/dist/refs/json-schema-2020-12/meta/format-annotation.json +0 -14
  117. package/node_modules/ajv/dist/refs/json-schema-2020-12/meta/meta-data.json +0 -37
  118. package/node_modules/ajv/dist/refs/json-schema-2020-12/meta/unevaluated.json +0 -15
  119. package/node_modules/ajv/dist/refs/json-schema-2020-12/meta/validation.json +0 -90
  120. package/node_modules/ajv/dist/refs/json-schema-2020-12/schema.json +0 -55
  121. package/node_modules/ajv/dist/refs/json-schema-draft-06.json +0 -137
  122. package/node_modules/ajv/dist/refs/json-schema-draft-07.json +0 -151
  123. package/node_modules/ajv/dist/refs/json-schema-secure.json +0 -88
  124. package/node_modules/ajv/dist/refs/jtd-schema.d.ts +0 -3
  125. package/node_modules/ajv/dist/refs/jtd-schema.js +0 -118
  126. package/node_modules/ajv/dist/refs/jtd-schema.js.map +0 -1
  127. package/node_modules/ajv/dist/runtime/equal.d.ts +0 -6
  128. package/node_modules/ajv/dist/runtime/equal.js +0 -7
  129. package/node_modules/ajv/dist/runtime/equal.js.map +0 -1
  130. package/node_modules/ajv/dist/runtime/parseJson.d.ts +0 -18
  131. package/node_modules/ajv/dist/runtime/parseJson.js +0 -185
  132. package/node_modules/ajv/dist/runtime/parseJson.js.map +0 -1
  133. package/node_modules/ajv/dist/runtime/quote.d.ts +0 -5
  134. package/node_modules/ajv/dist/runtime/quote.js +0 -30
  135. package/node_modules/ajv/dist/runtime/quote.js.map +0 -1
  136. package/node_modules/ajv/dist/runtime/re2.d.ts +0 -6
  137. package/node_modules/ajv/dist/runtime/re2.js +0 -6
  138. package/node_modules/ajv/dist/runtime/re2.js.map +0 -1
  139. package/node_modules/ajv/dist/runtime/timestamp.d.ts +0 -5
  140. package/node_modules/ajv/dist/runtime/timestamp.js +0 -42
  141. package/node_modules/ajv/dist/runtime/timestamp.js.map +0 -1
  142. package/node_modules/ajv/dist/runtime/ucs2length.d.ts +0 -5
  143. package/node_modules/ajv/dist/runtime/ucs2length.js +0 -24
  144. package/node_modules/ajv/dist/runtime/ucs2length.js.map +0 -1
  145. package/node_modules/ajv/dist/runtime/uri.d.ts +0 -6
  146. package/node_modules/ajv/dist/runtime/uri.js +0 -6
  147. package/node_modules/ajv/dist/runtime/uri.js.map +0 -1
  148. package/node_modules/ajv/dist/runtime/validation_error.d.ts +0 -7
  149. package/node_modules/ajv/dist/runtime/validation_error.js +0 -11
  150. package/node_modules/ajv/dist/runtime/validation_error.js.map +0 -1
  151. package/node_modules/ajv/dist/standalone/index.d.ts +0 -6
  152. package/node_modules/ajv/dist/standalone/index.js +0 -90
  153. package/node_modules/ajv/dist/standalone/index.js.map +0 -1
  154. package/node_modules/ajv/dist/standalone/instance.d.ts +0 -12
  155. package/node_modules/ajv/dist/standalone/instance.js +0 -35
  156. package/node_modules/ajv/dist/standalone/instance.js.map +0 -1
  157. package/node_modules/ajv/dist/types/index.d.ts +0 -183
  158. package/node_modules/ajv/dist/types/index.js +0 -3
  159. package/node_modules/ajv/dist/types/index.js.map +0 -1
  160. package/node_modules/ajv/dist/types/json-schema.d.ts +0 -125
  161. package/node_modules/ajv/dist/types/json-schema.js +0 -3
  162. package/node_modules/ajv/dist/types/json-schema.js.map +0 -1
  163. package/node_modules/ajv/dist/types/jtd-schema.d.ts +0 -174
  164. package/node_modules/ajv/dist/types/jtd-schema.js +0 -3
  165. package/node_modules/ajv/dist/types/jtd-schema.js.map +0 -1
  166. package/node_modules/ajv/dist/vocabularies/applicator/additionalItems.d.ts +0 -8
  167. package/node_modules/ajv/dist/vocabularies/applicator/additionalItems.js +0 -49
  168. package/node_modules/ajv/dist/vocabularies/applicator/additionalItems.js.map +0 -1
  169. package/node_modules/ajv/dist/vocabularies/applicator/additionalProperties.d.ts +0 -6
  170. package/node_modules/ajv/dist/vocabularies/applicator/additionalProperties.js +0 -106
  171. package/node_modules/ajv/dist/vocabularies/applicator/additionalProperties.js.map +0 -1
  172. package/node_modules/ajv/dist/vocabularies/applicator/allOf.d.ts +0 -3
  173. package/node_modules/ajv/dist/vocabularies/applicator/allOf.js +0 -23
  174. package/node_modules/ajv/dist/vocabularies/applicator/allOf.js.map +0 -1
  175. package/node_modules/ajv/dist/vocabularies/applicator/anyOf.d.ts +0 -4
  176. package/node_modules/ajv/dist/vocabularies/applicator/anyOf.js +0 -12
  177. package/node_modules/ajv/dist/vocabularies/applicator/anyOf.js.map +0 -1
  178. package/node_modules/ajv/dist/vocabularies/applicator/contains.d.ts +0 -7
  179. package/node_modules/ajv/dist/vocabularies/applicator/contains.js +0 -95
  180. package/node_modules/ajv/dist/vocabularies/applicator/contains.js.map +0 -1
  181. package/node_modules/ajv/dist/vocabularies/applicator/dependencies.d.ts +0 -21
  182. package/node_modules/ajv/dist/vocabularies/applicator/dependencies.js +0 -85
  183. package/node_modules/ajv/dist/vocabularies/applicator/dependencies.js.map +0 -1
  184. package/node_modules/ajv/dist/vocabularies/applicator/dependentSchemas.d.ts +0 -3
  185. package/node_modules/ajv/dist/vocabularies/applicator/dependentSchemas.js +0 -11
  186. package/node_modules/ajv/dist/vocabularies/applicator/dependentSchemas.js.map +0 -1
  187. package/node_modules/ajv/dist/vocabularies/applicator/if.d.ts +0 -6
  188. package/node_modules/ajv/dist/vocabularies/applicator/if.js +0 -66
  189. package/node_modules/ajv/dist/vocabularies/applicator/if.js.map +0 -1
  190. package/node_modules/ajv/dist/vocabularies/applicator/index.d.ts +0 -13
  191. package/node_modules/ajv/dist/vocabularies/applicator/index.js +0 -44
  192. package/node_modules/ajv/dist/vocabularies/applicator/index.js.map +0 -1
  193. package/node_modules/ajv/dist/vocabularies/applicator/items.d.ts +0 -5
  194. package/node_modules/ajv/dist/vocabularies/applicator/items.js +0 -52
  195. package/node_modules/ajv/dist/vocabularies/applicator/items.js.map +0 -1
  196. package/node_modules/ajv/dist/vocabularies/applicator/items2020.d.ts +0 -6
  197. package/node_modules/ajv/dist/vocabularies/applicator/items2020.js +0 -30
  198. package/node_modules/ajv/dist/vocabularies/applicator/items2020.js.map +0 -1
  199. package/node_modules/ajv/dist/vocabularies/applicator/not.d.ts +0 -4
  200. package/node_modules/ajv/dist/vocabularies/applicator/not.js +0 -26
  201. package/node_modules/ajv/dist/vocabularies/applicator/not.js.map +0 -1
  202. package/node_modules/ajv/dist/vocabularies/applicator/oneOf.d.ts +0 -6
  203. package/node_modules/ajv/dist/vocabularies/applicator/oneOf.js +0 -60
  204. package/node_modules/ajv/dist/vocabularies/applicator/oneOf.js.map +0 -1
  205. package/node_modules/ajv/dist/vocabularies/applicator/patternProperties.d.ts +0 -3
  206. package/node_modules/ajv/dist/vocabularies/applicator/patternProperties.js +0 -75
  207. package/node_modules/ajv/dist/vocabularies/applicator/patternProperties.js.map +0 -1
  208. package/node_modules/ajv/dist/vocabularies/applicator/prefixItems.d.ts +0 -3
  209. package/node_modules/ajv/dist/vocabularies/applicator/prefixItems.js +0 -12
  210. package/node_modules/ajv/dist/vocabularies/applicator/prefixItems.js.map +0 -1
  211. package/node_modules/ajv/dist/vocabularies/applicator/properties.d.ts +0 -3
  212. package/node_modules/ajv/dist/vocabularies/applicator/properties.js +0 -54
  213. package/node_modules/ajv/dist/vocabularies/applicator/properties.js.map +0 -1
  214. package/node_modules/ajv/dist/vocabularies/applicator/propertyNames.d.ts +0 -6
  215. package/node_modules/ajv/dist/vocabularies/applicator/propertyNames.js +0 -38
  216. package/node_modules/ajv/dist/vocabularies/applicator/propertyNames.js.map +0 -1
  217. package/node_modules/ajv/dist/vocabularies/applicator/thenElse.d.ts +0 -3
  218. package/node_modules/ajv/dist/vocabularies/applicator/thenElse.js +0 -13
  219. package/node_modules/ajv/dist/vocabularies/applicator/thenElse.js.map +0 -1
  220. package/node_modules/ajv/dist/vocabularies/code.d.ts +0 -17
  221. package/node_modules/ajv/dist/vocabularies/code.js +0 -131
  222. package/node_modules/ajv/dist/vocabularies/code.js.map +0 -1
  223. package/node_modules/ajv/dist/vocabularies/core/id.d.ts +0 -3
  224. package/node_modules/ajv/dist/vocabularies/core/id.js +0 -10
  225. package/node_modules/ajv/dist/vocabularies/core/id.js.map +0 -1
  226. package/node_modules/ajv/dist/vocabularies/core/index.d.ts +0 -3
  227. package/node_modules/ajv/dist/vocabularies/core/index.js +0 -16
  228. package/node_modules/ajv/dist/vocabularies/core/index.js.map +0 -1
  229. package/node_modules/ajv/dist/vocabularies/core/ref.d.ts +0 -8
  230. package/node_modules/ajv/dist/vocabularies/core/ref.js +0 -122
  231. package/node_modules/ajv/dist/vocabularies/core/ref.js.map +0 -1
  232. package/node_modules/ajv/dist/vocabularies/discriminator/index.d.ts +0 -5
  233. package/node_modules/ajv/dist/vocabularies/discriminator/index.js +0 -104
  234. package/node_modules/ajv/dist/vocabularies/discriminator/index.js.map +0 -1
  235. package/node_modules/ajv/dist/vocabularies/discriminator/types.d.ts +0 -10
  236. package/node_modules/ajv/dist/vocabularies/discriminator/types.js +0 -9
  237. package/node_modules/ajv/dist/vocabularies/discriminator/types.js.map +0 -1
  238. package/node_modules/ajv/dist/vocabularies/draft2020.d.ts +0 -3
  239. package/node_modules/ajv/dist/vocabularies/draft2020.js +0 -23
  240. package/node_modules/ajv/dist/vocabularies/draft2020.js.map +0 -1
  241. package/node_modules/ajv/dist/vocabularies/draft7.d.ts +0 -3
  242. package/node_modules/ajv/dist/vocabularies/draft7.js +0 -17
  243. package/node_modules/ajv/dist/vocabularies/draft7.js.map +0 -1
  244. package/node_modules/ajv/dist/vocabularies/dynamic/dynamicAnchor.d.ts +0 -5
  245. package/node_modules/ajv/dist/vocabularies/dynamic/dynamicAnchor.js +0 -30
  246. package/node_modules/ajv/dist/vocabularies/dynamic/dynamicAnchor.js.map +0 -1
  247. package/node_modules/ajv/dist/vocabularies/dynamic/dynamicRef.d.ts +0 -5
  248. package/node_modules/ajv/dist/vocabularies/dynamic/dynamicRef.js +0 -51
  249. package/node_modules/ajv/dist/vocabularies/dynamic/dynamicRef.js.map +0 -1
  250. package/node_modules/ajv/dist/vocabularies/dynamic/index.d.ts +0 -3
  251. package/node_modules/ajv/dist/vocabularies/dynamic/index.js +0 -9
  252. package/node_modules/ajv/dist/vocabularies/dynamic/index.js.map +0 -1
  253. package/node_modules/ajv/dist/vocabularies/dynamic/recursiveAnchor.d.ts +0 -3
  254. package/node_modules/ajv/dist/vocabularies/dynamic/recursiveAnchor.js +0 -16
  255. package/node_modules/ajv/dist/vocabularies/dynamic/recursiveAnchor.js.map +0 -1
  256. package/node_modules/ajv/dist/vocabularies/dynamic/recursiveRef.d.ts +0 -3
  257. package/node_modules/ajv/dist/vocabularies/dynamic/recursiveRef.js +0 -10
  258. package/node_modules/ajv/dist/vocabularies/dynamic/recursiveRef.js.map +0 -1
  259. package/node_modules/ajv/dist/vocabularies/errors.d.ts +0 -9
  260. package/node_modules/ajv/dist/vocabularies/errors.js +0 -3
  261. package/node_modules/ajv/dist/vocabularies/errors.js.map +0 -1
  262. package/node_modules/ajv/dist/vocabularies/format/format.d.ts +0 -8
  263. package/node_modules/ajv/dist/vocabularies/format/format.js +0 -92
  264. package/node_modules/ajv/dist/vocabularies/format/format.js.map +0 -1
  265. package/node_modules/ajv/dist/vocabularies/format/index.d.ts +0 -3
  266. package/node_modules/ajv/dist/vocabularies/format/index.js +0 -6
  267. package/node_modules/ajv/dist/vocabularies/format/index.js.map +0 -1
  268. package/node_modules/ajv/dist/vocabularies/jtd/discriminator.d.ts +0 -6
  269. package/node_modules/ajv/dist/vocabularies/jtd/discriminator.js +0 -71
  270. package/node_modules/ajv/dist/vocabularies/jtd/discriminator.js.map +0 -1
  271. package/node_modules/ajv/dist/vocabularies/jtd/elements.d.ts +0 -5
  272. package/node_modules/ajv/dist/vocabularies/jtd/elements.js +0 -24
  273. package/node_modules/ajv/dist/vocabularies/jtd/elements.js.map +0 -1
  274. package/node_modules/ajv/dist/vocabularies/jtd/enum.d.ts +0 -6
  275. package/node_modules/ajv/dist/vocabularies/jtd/enum.js +0 -43
  276. package/node_modules/ajv/dist/vocabularies/jtd/enum.js.map +0 -1
  277. package/node_modules/ajv/dist/vocabularies/jtd/error.d.ts +0 -9
  278. package/node_modules/ajv/dist/vocabularies/jtd/error.js +0 -20
  279. package/node_modules/ajv/dist/vocabularies/jtd/error.js.map +0 -1
  280. package/node_modules/ajv/dist/vocabularies/jtd/index.d.ts +0 -10
  281. package/node_modules/ajv/dist/vocabularies/jtd/index.js +0 -29
  282. package/node_modules/ajv/dist/vocabularies/jtd/index.js.map +0 -1
  283. package/node_modules/ajv/dist/vocabularies/jtd/metadata.d.ts +0 -5
  284. package/node_modules/ajv/dist/vocabularies/jtd/metadata.js +0 -25
  285. package/node_modules/ajv/dist/vocabularies/jtd/metadata.js.map +0 -1
  286. package/node_modules/ajv/dist/vocabularies/jtd/nullable.d.ts +0 -4
  287. package/node_modules/ajv/dist/vocabularies/jtd/nullable.js +0 -22
  288. package/node_modules/ajv/dist/vocabularies/jtd/nullable.js.map +0 -1
  289. package/node_modules/ajv/dist/vocabularies/jtd/optionalProperties.d.ts +0 -3
  290. package/node_modules/ajv/dist/vocabularies/jtd/optionalProperties.js +0 -15
  291. package/node_modules/ajv/dist/vocabularies/jtd/optionalProperties.js.map +0 -1
  292. package/node_modules/ajv/dist/vocabularies/jtd/properties.d.ts +0 -22
  293. package/node_modules/ajv/dist/vocabularies/jtd/properties.js +0 -149
  294. package/node_modules/ajv/dist/vocabularies/jtd/properties.js.map +0 -1
  295. package/node_modules/ajv/dist/vocabularies/jtd/ref.d.ts +0 -4
  296. package/node_modules/ajv/dist/vocabularies/jtd/ref.js +0 -67
  297. package/node_modules/ajv/dist/vocabularies/jtd/ref.js.map +0 -1
  298. package/node_modules/ajv/dist/vocabularies/jtd/type.d.ts +0 -10
  299. package/node_modules/ajv/dist/vocabularies/jtd/type.js +0 -69
  300. package/node_modules/ajv/dist/vocabularies/jtd/type.js.map +0 -1
  301. package/node_modules/ajv/dist/vocabularies/jtd/union.d.ts +0 -3
  302. package/node_modules/ajv/dist/vocabularies/jtd/union.js +0 -12
  303. package/node_modules/ajv/dist/vocabularies/jtd/union.js.map +0 -1
  304. package/node_modules/ajv/dist/vocabularies/jtd/values.d.ts +0 -5
  305. package/node_modules/ajv/dist/vocabularies/jtd/values.js +0 -51
  306. package/node_modules/ajv/dist/vocabularies/jtd/values.js.map +0 -1
  307. package/node_modules/ajv/dist/vocabularies/metadata.d.ts +0 -3
  308. package/node_modules/ajv/dist/vocabularies/metadata.js +0 -18
  309. package/node_modules/ajv/dist/vocabularies/metadata.js.map +0 -1
  310. package/node_modules/ajv/dist/vocabularies/next.d.ts +0 -3
  311. package/node_modules/ajv/dist/vocabularies/next.js +0 -8
  312. package/node_modules/ajv/dist/vocabularies/next.js.map +0 -1
  313. package/node_modules/ajv/dist/vocabularies/unevaluated/index.d.ts +0 -3
  314. package/node_modules/ajv/dist/vocabularies/unevaluated/index.js +0 -7
  315. package/node_modules/ajv/dist/vocabularies/unevaluated/index.js.map +0 -1
  316. package/node_modules/ajv/dist/vocabularies/unevaluated/unevaluatedItems.d.ts +0 -6
  317. package/node_modules/ajv/dist/vocabularies/unevaluated/unevaluatedItems.js +0 -40
  318. package/node_modules/ajv/dist/vocabularies/unevaluated/unevaluatedItems.js.map +0 -1
  319. package/node_modules/ajv/dist/vocabularies/unevaluated/unevaluatedProperties.d.ts +0 -6
  320. package/node_modules/ajv/dist/vocabularies/unevaluated/unevaluatedProperties.js +0 -65
  321. package/node_modules/ajv/dist/vocabularies/unevaluated/unevaluatedProperties.js.map +0 -1
  322. package/node_modules/ajv/dist/vocabularies/validation/const.d.ts +0 -6
  323. package/node_modules/ajv/dist/vocabularies/validation/const.js +0 -25
  324. package/node_modules/ajv/dist/vocabularies/validation/const.js.map +0 -1
  325. package/node_modules/ajv/dist/vocabularies/validation/dependentRequired.d.ts +0 -5
  326. package/node_modules/ajv/dist/vocabularies/validation/dependentRequired.js +0 -12
  327. package/node_modules/ajv/dist/vocabularies/validation/dependentRequired.js.map +0 -1
  328. package/node_modules/ajv/dist/vocabularies/validation/enum.d.ts +0 -8
  329. package/node_modules/ajv/dist/vocabularies/validation/enum.js +0 -48
  330. package/node_modules/ajv/dist/vocabularies/validation/enum.js.map +0 -1
  331. package/node_modules/ajv/dist/vocabularies/validation/index.d.ts +0 -16
  332. package/node_modules/ajv/dist/vocabularies/validation/index.js +0 -33
  333. package/node_modules/ajv/dist/vocabularies/validation/index.js.map +0 -1
  334. package/node_modules/ajv/dist/vocabularies/validation/limitContains.d.ts +0 -3
  335. package/node_modules/ajv/dist/vocabularies/validation/limitContains.js +0 -15
  336. package/node_modules/ajv/dist/vocabularies/validation/limitContains.js.map +0 -1
  337. package/node_modules/ajv/dist/vocabularies/validation/limitItems.d.ts +0 -3
  338. package/node_modules/ajv/dist/vocabularies/validation/limitItems.js +0 -24
  339. package/node_modules/ajv/dist/vocabularies/validation/limitItems.js.map +0 -1
  340. package/node_modules/ajv/dist/vocabularies/validation/limitLength.d.ts +0 -3
  341. package/node_modules/ajv/dist/vocabularies/validation/limitLength.js +0 -27
  342. package/node_modules/ajv/dist/vocabularies/validation/limitLength.js.map +0 -1
  343. package/node_modules/ajv/dist/vocabularies/validation/limitNumber.d.ts +0 -11
  344. package/node_modules/ajv/dist/vocabularies/validation/limitNumber.js +0 -27
  345. package/node_modules/ajv/dist/vocabularies/validation/limitNumber.js.map +0 -1
  346. package/node_modules/ajv/dist/vocabularies/validation/limitProperties.d.ts +0 -3
  347. package/node_modules/ajv/dist/vocabularies/validation/limitProperties.js +0 -24
  348. package/node_modules/ajv/dist/vocabularies/validation/limitProperties.js.map +0 -1
  349. package/node_modules/ajv/dist/vocabularies/validation/multipleOf.d.ts +0 -8
  350. package/node_modules/ajv/dist/vocabularies/validation/multipleOf.js +0 -26
  351. package/node_modules/ajv/dist/vocabularies/validation/multipleOf.js.map +0 -1
  352. package/node_modules/ajv/dist/vocabularies/validation/pattern.d.ts +0 -8
  353. package/node_modules/ajv/dist/vocabularies/validation/pattern.js +0 -33
  354. package/node_modules/ajv/dist/vocabularies/validation/pattern.js.map +0 -1
  355. package/node_modules/ajv/dist/vocabularies/validation/required.d.ts +0 -8
  356. package/node_modules/ajv/dist/vocabularies/validation/required.js +0 -79
  357. package/node_modules/ajv/dist/vocabularies/validation/required.js.map +0 -1
  358. package/node_modules/ajv/dist/vocabularies/validation/uniqueItems.d.ts +0 -9
  359. package/node_modules/ajv/dist/vocabularies/validation/uniqueItems.js +0 -64
  360. package/node_modules/ajv/dist/vocabularies/validation/uniqueItems.js.map +0 -1
  361. package/node_modules/ajv/lib/2019.ts +0 -81
  362. package/node_modules/ajv/lib/2020.ts +0 -75
  363. package/node_modules/ajv/lib/ajv.ts +0 -70
  364. package/node_modules/ajv/lib/compile/codegen/code.ts +0 -169
  365. package/node_modules/ajv/lib/compile/codegen/index.ts +0 -852
  366. package/node_modules/ajv/lib/compile/codegen/scope.ts +0 -215
  367. package/node_modules/ajv/lib/compile/errors.ts +0 -184
  368. package/node_modules/ajv/lib/compile/index.ts +0 -324
  369. package/node_modules/ajv/lib/compile/jtd/parse.ts +0 -411
  370. package/node_modules/ajv/lib/compile/jtd/serialize.ts +0 -277
  371. package/node_modules/ajv/lib/compile/jtd/types.ts +0 -16
  372. package/node_modules/ajv/lib/compile/names.ts +0 -27
  373. package/node_modules/ajv/lib/compile/ref_error.ts +0 -13
  374. package/node_modules/ajv/lib/compile/resolve.ts +0 -149
  375. package/node_modules/ajv/lib/compile/rules.ts +0 -50
  376. package/node_modules/ajv/lib/compile/util.ts +0 -213
  377. package/node_modules/ajv/lib/compile/validate/applicability.ts +0 -22
  378. package/node_modules/ajv/lib/compile/validate/boolSchema.ts +0 -47
  379. package/node_modules/ajv/lib/compile/validate/dataType.ts +0 -230
  380. package/node_modules/ajv/lib/compile/validate/defaults.ts +0 -32
  381. package/node_modules/ajv/lib/compile/validate/index.ts +0 -582
  382. package/node_modules/ajv/lib/compile/validate/keyword.ts +0 -171
  383. package/node_modules/ajv/lib/compile/validate/subschema.ts +0 -135
  384. package/node_modules/ajv/lib/core.ts +0 -892
  385. package/node_modules/ajv/lib/jtd.ts +0 -132
  386. package/node_modules/ajv/lib/refs/data.json +0 -13
  387. package/node_modules/ajv/lib/refs/json-schema-2019-09/index.ts +0 -28
  388. package/node_modules/ajv/lib/refs/json-schema-2019-09/meta/applicator.json +0 -53
  389. package/node_modules/ajv/lib/refs/json-schema-2019-09/meta/content.json +0 -17
  390. package/node_modules/ajv/lib/refs/json-schema-2019-09/meta/core.json +0 -57
  391. package/node_modules/ajv/lib/refs/json-schema-2019-09/meta/format.json +0 -14
  392. package/node_modules/ajv/lib/refs/json-schema-2019-09/meta/meta-data.json +0 -37
  393. package/node_modules/ajv/lib/refs/json-schema-2019-09/meta/validation.json +0 -90
  394. package/node_modules/ajv/lib/refs/json-schema-2019-09/schema.json +0 -39
  395. package/node_modules/ajv/lib/refs/json-schema-2020-12/index.ts +0 -30
  396. package/node_modules/ajv/lib/refs/json-schema-2020-12/meta/applicator.json +0 -48
  397. package/node_modules/ajv/lib/refs/json-schema-2020-12/meta/content.json +0 -17
  398. package/node_modules/ajv/lib/refs/json-schema-2020-12/meta/core.json +0 -51
  399. package/node_modules/ajv/lib/refs/json-schema-2020-12/meta/format-annotation.json +0 -14
  400. package/node_modules/ajv/lib/refs/json-schema-2020-12/meta/meta-data.json +0 -37
  401. package/node_modules/ajv/lib/refs/json-schema-2020-12/meta/unevaluated.json +0 -15
  402. package/node_modules/ajv/lib/refs/json-schema-2020-12/meta/validation.json +0 -90
  403. package/node_modules/ajv/lib/refs/json-schema-2020-12/schema.json +0 -55
  404. package/node_modules/ajv/lib/refs/json-schema-draft-06.json +0 -137
  405. package/node_modules/ajv/lib/refs/json-schema-draft-07.json +0 -151
  406. package/node_modules/ajv/lib/refs/json-schema-secure.json +0 -88
  407. package/node_modules/ajv/lib/refs/jtd-schema.ts +0 -130
  408. package/node_modules/ajv/lib/runtime/equal.ts +0 -7
  409. package/node_modules/ajv/lib/runtime/parseJson.ts +0 -177
  410. package/node_modules/ajv/lib/runtime/quote.ts +0 -31
  411. package/node_modules/ajv/lib/runtime/re2.ts +0 -6
  412. package/node_modules/ajv/lib/runtime/timestamp.ts +0 -46
  413. package/node_modules/ajv/lib/runtime/ucs2length.ts +0 -20
  414. package/node_modules/ajv/lib/runtime/uri.ts +0 -6
  415. package/node_modules/ajv/lib/runtime/validation_error.ts +0 -13
  416. package/node_modules/ajv/lib/standalone/index.ts +0 -100
  417. package/node_modules/ajv/lib/standalone/instance.ts +0 -36
  418. package/node_modules/ajv/lib/types/index.ts +0 -244
  419. package/node_modules/ajv/lib/types/json-schema.ts +0 -187
  420. package/node_modules/ajv/lib/types/jtd-schema.ts +0 -273
  421. package/node_modules/ajv/lib/vocabularies/applicator/additionalItems.ts +0 -56
  422. package/node_modules/ajv/lib/vocabularies/applicator/additionalProperties.ts +0 -118
  423. package/node_modules/ajv/lib/vocabularies/applicator/allOf.ts +0 -22
  424. package/node_modules/ajv/lib/vocabularies/applicator/anyOf.ts +0 -14
  425. package/node_modules/ajv/lib/vocabularies/applicator/contains.ts +0 -109
  426. package/node_modules/ajv/lib/vocabularies/applicator/dependencies.ts +0 -112
  427. package/node_modules/ajv/lib/vocabularies/applicator/dependentSchemas.ts +0 -11
  428. package/node_modules/ajv/lib/vocabularies/applicator/if.ts +0 -80
  429. package/node_modules/ajv/lib/vocabularies/applicator/index.ts +0 -53
  430. package/node_modules/ajv/lib/vocabularies/applicator/items.ts +0 -59
  431. package/node_modules/ajv/lib/vocabularies/applicator/items2020.ts +0 -36
  432. package/node_modules/ajv/lib/vocabularies/applicator/not.ts +0 -38
  433. package/node_modules/ajv/lib/vocabularies/applicator/oneOf.ts +0 -82
  434. package/node_modules/ajv/lib/vocabularies/applicator/patternProperties.ts +0 -91
  435. package/node_modules/ajv/lib/vocabularies/applicator/prefixItems.ts +0 -12
  436. package/node_modules/ajv/lib/vocabularies/applicator/properties.ts +0 -57
  437. package/node_modules/ajv/lib/vocabularies/applicator/propertyNames.ts +0 -50
  438. package/node_modules/ajv/lib/vocabularies/applicator/thenElse.ts +0 -13
  439. package/node_modules/ajv/lib/vocabularies/code.ts +0 -168
  440. package/node_modules/ajv/lib/vocabularies/core/id.ts +0 -10
  441. package/node_modules/ajv/lib/vocabularies/core/index.ts +0 -16
  442. package/node_modules/ajv/lib/vocabularies/core/ref.ts +0 -129
  443. package/node_modules/ajv/lib/vocabularies/discriminator/index.ts +0 -113
  444. package/node_modules/ajv/lib/vocabularies/discriminator/types.ts +0 -12
  445. package/node_modules/ajv/lib/vocabularies/draft2020.ts +0 -23
  446. package/node_modules/ajv/lib/vocabularies/draft7.ts +0 -17
  447. package/node_modules/ajv/lib/vocabularies/dynamic/dynamicAnchor.ts +0 -31
  448. package/node_modules/ajv/lib/vocabularies/dynamic/dynamicRef.ts +0 -51
  449. package/node_modules/ajv/lib/vocabularies/dynamic/index.ts +0 -9
  450. package/node_modules/ajv/lib/vocabularies/dynamic/recursiveAnchor.ts +0 -14
  451. package/node_modules/ajv/lib/vocabularies/dynamic/recursiveRef.ts +0 -10
  452. package/node_modules/ajv/lib/vocabularies/errors.ts +0 -18
  453. package/node_modules/ajv/lib/vocabularies/format/format.ts +0 -120
  454. package/node_modules/ajv/lib/vocabularies/format/index.ts +0 -6
  455. package/node_modules/ajv/lib/vocabularies/jtd/discriminator.ts +0 -89
  456. package/node_modules/ajv/lib/vocabularies/jtd/elements.ts +0 -32
  457. package/node_modules/ajv/lib/vocabularies/jtd/enum.ts +0 -45
  458. package/node_modules/ajv/lib/vocabularies/jtd/error.ts +0 -23
  459. package/node_modules/ajv/lib/vocabularies/jtd/index.ts +0 -37
  460. package/node_modules/ajv/lib/vocabularies/jtd/metadata.ts +0 -24
  461. package/node_modules/ajv/lib/vocabularies/jtd/nullable.ts +0 -21
  462. package/node_modules/ajv/lib/vocabularies/jtd/optionalProperties.ts +0 -15
  463. package/node_modules/ajv/lib/vocabularies/jtd/properties.ts +0 -184
  464. package/node_modules/ajv/lib/vocabularies/jtd/ref.ts +0 -76
  465. package/node_modules/ajv/lib/vocabularies/jtd/type.ts +0 -75
  466. package/node_modules/ajv/lib/vocabularies/jtd/union.ts +0 -12
  467. package/node_modules/ajv/lib/vocabularies/jtd/values.ts +0 -58
  468. package/node_modules/ajv/lib/vocabularies/metadata.ts +0 -17
  469. package/node_modules/ajv/lib/vocabularies/next.ts +0 -8
  470. package/node_modules/ajv/lib/vocabularies/unevaluated/index.ts +0 -7
  471. package/node_modules/ajv/lib/vocabularies/unevaluated/unevaluatedItems.ts +0 -47
  472. package/node_modules/ajv/lib/vocabularies/unevaluated/unevaluatedProperties.ts +0 -85
  473. package/node_modules/ajv/lib/vocabularies/validation/const.ts +0 -28
  474. package/node_modules/ajv/lib/vocabularies/validation/dependentRequired.ts +0 -23
  475. package/node_modules/ajv/lib/vocabularies/validation/enum.ts +0 -54
  476. package/node_modules/ajv/lib/vocabularies/validation/index.ts +0 -49
  477. package/node_modules/ajv/lib/vocabularies/validation/limitContains.ts +0 -16
  478. package/node_modules/ajv/lib/vocabularies/validation/limitItems.ts +0 -26
  479. package/node_modules/ajv/lib/vocabularies/validation/limitLength.ts +0 -30
  480. package/node_modules/ajv/lib/vocabularies/validation/limitNumber.ts +0 -42
  481. package/node_modules/ajv/lib/vocabularies/validation/limitProperties.ts +0 -26
  482. package/node_modules/ajv/lib/vocabularies/validation/multipleOf.ts +0 -34
  483. package/node_modules/ajv/lib/vocabularies/validation/pattern.ts +0 -39
  484. package/node_modules/ajv/lib/vocabularies/validation/required.ts +0 -98
  485. package/node_modules/ajv/lib/vocabularies/validation/uniqueItems.ts +0 -79
  486. package/node_modules/ajv/package.json +0 -126
  487. package/node_modules/fast-deep-equal/LICENSE +0 -21
  488. package/node_modules/fast-deep-equal/README.md +0 -96
  489. package/node_modules/fast-deep-equal/es6/index.d.ts +0 -2
  490. package/node_modules/fast-deep-equal/es6/index.js +0 -72
  491. package/node_modules/fast-deep-equal/es6/react.d.ts +0 -2
  492. package/node_modules/fast-deep-equal/es6/react.js +0 -79
  493. package/node_modules/fast-deep-equal/index.d.ts +0 -4
  494. package/node_modules/fast-deep-equal/index.js +0 -46
  495. package/node_modules/fast-deep-equal/package.json +0 -61
  496. package/node_modules/fast-deep-equal/react.d.ts +0 -2
  497. package/node_modules/fast-deep-equal/react.js +0 -53
  498. package/node_modules/fast-uri/.gitattributes +0 -2
  499. package/node_modules/fast-uri/.github/dependabot.yml +0 -13
  500. package/node_modules/fast-uri/.github/workflows/ci.yml +0 -106
  501. package/node_modules/fast-uri/.github/workflows/lock-threads.yml +0 -19
  502. package/node_modules/fast-uri/.github/workflows/package-manager-ci.yml +0 -24
  503. package/node_modules/fast-uri/LICENSE +0 -30
  504. package/node_modules/fast-uri/README.md +0 -152
  505. package/node_modules/fast-uri/benchmark/benchmark.mjs +0 -159
  506. package/node_modules/fast-uri/benchmark/equal.mjs +0 -51
  507. package/node_modules/fast-uri/benchmark/non-simple-domain.mjs +0 -22
  508. package/node_modules/fast-uri/benchmark/package.json +0 -17
  509. package/node_modules/fast-uri/benchmark/string-array-to-hex-stripped.mjs +0 -24
  510. package/node_modules/fast-uri/benchmark/ws-is-secure.mjs +0 -65
  511. package/node_modules/fast-uri/eslint.config.js +0 -6
  512. package/node_modules/fast-uri/index.js +0 -406
  513. package/node_modules/fast-uri/lib/schemes.js +0 -267
  514. package/node_modules/fast-uri/lib/utils.js +0 -443
  515. package/node_modules/fast-uri/package.json +0 -68
  516. package/node_modules/fast-uri/test/ajv.test.js +0 -43
  517. package/node_modules/fast-uri/test/equal.test.js +0 -117
  518. package/node_modules/fast-uri/test/fixtures/uri-js-parse.json +0 -501
  519. package/node_modules/fast-uri/test/fixtures/uri-js-serialize.json +0 -120
  520. package/node_modules/fast-uri/test/parse.test.js +0 -323
  521. package/node_modules/fast-uri/test/resolve.test.js +0 -87
  522. package/node_modules/fast-uri/test/rfc-3986.test.js +0 -90
  523. package/node_modules/fast-uri/test/security-normalization.test.js +0 -39
  524. package/node_modules/fast-uri/test/security.test.js +0 -133
  525. package/node_modules/fast-uri/test/serialize.test.js +0 -151
  526. package/node_modules/fast-uri/test/uri-js-compatibility.test.js +0 -33
  527. package/node_modules/fast-uri/test/uri-js.test.js +0 -912
  528. package/node_modules/fast-uri/test/util.test.js +0 -38
  529. package/node_modules/fast-uri/tsconfig.json +0 -9
  530. package/node_modules/fast-uri/types/index.d.ts +0 -60
  531. package/node_modules/fast-uri/types/index.test-d.ts +0 -17
  532. package/node_modules/json-schema-traverse/.eslintrc.yml +0 -27
  533. package/node_modules/json-schema-traverse/.github/FUNDING.yml +0 -2
  534. package/node_modules/json-schema-traverse/.github/workflows/build.yml +0 -28
  535. package/node_modules/json-schema-traverse/.github/workflows/publish.yml +0 -27
  536. package/node_modules/json-schema-traverse/LICENSE +0 -21
  537. package/node_modules/json-schema-traverse/README.md +0 -95
  538. package/node_modules/json-schema-traverse/index.d.ts +0 -40
  539. package/node_modules/json-schema-traverse/index.js +0 -93
  540. package/node_modules/json-schema-traverse/package.json +0 -43
  541. package/node_modules/json-schema-traverse/spec/.eslintrc.yml +0 -6
  542. package/node_modules/json-schema-traverse/spec/fixtures/schema.js +0 -125
  543. package/node_modules/json-schema-traverse/spec/index.spec.js +0 -171
  544. package/node_modules/require-from-string/index.js +0 -34
  545. package/node_modules/require-from-string/license +0 -21
  546. package/node_modules/require-from-string/package.json +0 -28
  547. package/node_modules/require-from-string/readme.md +0 -56
@@ -0,0 +1,171 @@
1
+ export function isSchema(value) {
2
+ return typeof value === "boolean" || isObject(value);
3
+ }
4
+ export function isObject(value) {
5
+ return typeof value === "object" && value !== null && !Array.isArray(value);
6
+ }
7
+ export function dialectFor(schema, inherited) {
8
+ const dialect = schema.$schema;
9
+ if (typeof dialect !== "string") {
10
+ return inherited;
11
+ }
12
+ if (dialect.includes("draft-07")) {
13
+ return "draft7";
14
+ }
15
+ if (dialect.includes("2020-12")) {
16
+ return "draft2020-12";
17
+ }
18
+ return inherited;
19
+ }
20
+ export function resolveUri(reference, baseUri) {
21
+ try {
22
+ return new URL(reference, baseUri).href;
23
+ }
24
+ catch {
25
+ throw new Error(`Invalid schema URI: ${reference}`);
26
+ }
27
+ }
28
+ export function withoutFragment(uri) {
29
+ const index = uri.indexOf("#");
30
+ return index === -1 ? uri : uri.slice(0, index);
31
+ }
32
+ export function fragmentOf(uri) {
33
+ const index = uri.indexOf("#");
34
+ return index === -1 ? "" : uri.slice(index + 1);
35
+ }
36
+ export function escapePointer(value) {
37
+ return value.replaceAll("~", "~0").replaceAll("/", "~1");
38
+ }
39
+ export function decodePointer(value) {
40
+ return decodeURIComponent(value).replaceAll("~1", "/").replaceAll("~0", "~");
41
+ }
42
+ export function deepEqual(left, right) {
43
+ if (Object.is(left, right)) {
44
+ return true;
45
+ }
46
+ if (typeof left !== typeof right || left === null || right === null) {
47
+ return false;
48
+ }
49
+ if (Array.isArray(left)) {
50
+ return (Array.isArray(right) &&
51
+ left.length === right.length &&
52
+ left.every((value, index) => deepEqual(value, right[index])));
53
+ }
54
+ if (isObject(left) && isObject(right)) {
55
+ const leftKeys = Object.keys(left);
56
+ const rightKeys = Object.keys(right);
57
+ return (leftKeys.length === rightKeys.length &&
58
+ leftKeys.every((key) => Object.prototype.hasOwnProperty.call(right, key) && deepEqual(left[key], right[key])));
59
+ }
60
+ return false;
61
+ }
62
+ export function receivedType(value) {
63
+ if (value === null) {
64
+ return "null";
65
+ }
66
+ if (Array.isArray(value)) {
67
+ return "array";
68
+ }
69
+ if (typeof value === "number" && Number.isInteger(value)) {
70
+ return "integer";
71
+ }
72
+ return typeof value;
73
+ }
74
+ export function issue(path, expected, value, message, keyword = keywordFor(expected)) {
75
+ return { path, expected, received: receivedType(value), message, keyword };
76
+ }
77
+ function keywordFor(expected) {
78
+ if (["null", "boolean", "object", "array", "number", "integer", "string"].includes(expected)) {
79
+ return "type";
80
+ }
81
+ if (expected.startsWith("multiple of"))
82
+ return "multipleOf";
83
+ if (expected.startsWith("length <="))
84
+ return "maxLength";
85
+ if (expected.startsWith("length >="))
86
+ return "minLength";
87
+ if (expected.startsWith("pattern "))
88
+ return "pattern";
89
+ if (expected.startsWith("items <="))
90
+ return "maxItems";
91
+ if (expected.startsWith("items >="))
92
+ return "minItems";
93
+ if (expected === "unique items")
94
+ return "uniqueItems";
95
+ if (expected.startsWith("properties <="))
96
+ return "maxProperties";
97
+ if (expected.startsWith("properties >="))
98
+ return "minProperties";
99
+ if (expected.startsWith("<= "))
100
+ return "maximum";
101
+ if (expected.startsWith(">= "))
102
+ return "minimum";
103
+ if (expected.startsWith("< "))
104
+ return "exclusiveMaximum";
105
+ if (expected.startsWith("> "))
106
+ return "exclusiveMinimum";
107
+ if (expected === "valid schema")
108
+ return "false schema";
109
+ return expected;
110
+ }
111
+ export function validResult() {
112
+ return {
113
+ valid: true,
114
+ issues: [],
115
+ evaluatedProperties: new Set(),
116
+ evaluatedItems: new Set()
117
+ };
118
+ }
119
+ export function invalidResult(problem) {
120
+ return {
121
+ valid: false,
122
+ issues: [problem],
123
+ evaluatedProperties: new Set(),
124
+ evaluatedItems: new Set()
125
+ };
126
+ }
127
+ export function mergeResults(results) {
128
+ const merged = validResult();
129
+ for (const result of results) {
130
+ merged.valid &&= result.valid;
131
+ merged.issues.push(...result.issues);
132
+ for (const key of result.evaluatedProperties) {
133
+ merged.evaluatedProperties.add(key);
134
+ }
135
+ for (const index of result.evaluatedItems) {
136
+ merged.evaluatedItems.add(index);
137
+ }
138
+ }
139
+ return merged;
140
+ }
141
+ export function typeMatches(type, value) {
142
+ switch (type) {
143
+ case "null":
144
+ return value === null;
145
+ case "boolean":
146
+ return typeof value === "boolean";
147
+ case "object":
148
+ return isObject(value);
149
+ case "array":
150
+ return Array.isArray(value);
151
+ case "number":
152
+ return typeof value === "number" && Number.isFinite(value);
153
+ case "integer":
154
+ return typeof value === "number" && Number.isInteger(value);
155
+ case "string":
156
+ return typeof value === "string";
157
+ default:
158
+ return true;
159
+ }
160
+ }
161
+ export function unicodeLength(value) {
162
+ return [...value].length;
163
+ }
164
+ export function isMultipleOf(value, divisor) {
165
+ if (divisor === 0) {
166
+ return false;
167
+ }
168
+ const quotient = value / divisor;
169
+ return (Math.abs(quotient - Math.round(quotient)) <=
170
+ Number.EPSILON * Math.max(1, Math.abs(quotient)) * 4);
171
+ }
@@ -5,6 +5,7 @@ export type ValidationIssue = {
5
5
  expected: string;
6
6
  received: string;
7
7
  message: string;
8
+ keyword?: string;
8
9
  };
9
10
  export type ValidationResult<T> = {
10
11
  ok: true;
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "toolcraft-schema",
3
- "version": "0.0.115",
3
+ "version": "0.0.116",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -13,8 +13,8 @@
13
13
  },
14
14
  "scripts": {
15
15
  "build": "rm -rf dist && tsc",
16
- "test": "cd ../.. && vitest run packages/toolcraft-schema/src/*.test.ts",
17
- "test:unit": "cd ../.. && vitest run packages/toolcraft-schema/src/*.test.ts",
16
+ "test": "cd ../.. && vitest run packages/toolcraft-schema/src",
17
+ "test:unit": "cd ../.. && vitest run packages/toolcraft-schema/src",
18
18
  "lint": "cd ../.. && eslint packages/toolcraft-schema/src --ext ts && tsc -p packages/toolcraft-schema/tsconfig.json --noEmit"
19
19
  },
20
20
  "files": [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "toolcraft",
3
- "version": "0.0.115",
3
+ "version": "0.0.116",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -104,11 +104,10 @@
104
104
  "test": "cd ../.. && vitest run packages/toolcraft/src",
105
105
  "test:unit": "cd ../.. && vitest run packages/toolcraft/src",
106
106
  "lint": "cd ../.. && eslint packages/toolcraft/src --ext ts && tsc -p packages/toolcraft/tsconfig.json --noEmit",
107
- "prepack": "node ../../scripts/manage-bundled-workspace-deps.mjs prepare . ajv toolcraft-schema toolcraft-design @poe-code/frontmatter @poe-code/agent-mcp-config @poe-code/agent-human-in-loop @poe-code/task-list @poe-code/agent-defs @poe-code/config-mutations @poe-code/process-runner tiny-mcp-client tiny-stdio-mcp-server auth-store",
108
- "postpack": "node ../../scripts/manage-bundled-workspace-deps.mjs cleanup . ajv toolcraft-schema toolcraft-design @poe-code/frontmatter @poe-code/agent-mcp-config @poe-code/agent-human-in-loop @poe-code/task-list @poe-code/agent-defs @poe-code/config-mutations @poe-code/process-runner tiny-mcp-client tiny-stdio-mcp-server auth-store"
107
+ "prepack": "node ../../scripts/manage-bundled-workspace-deps.mjs prepare . toolcraft-schema toolcraft-design @poe-code/frontmatter @poe-code/agent-mcp-config @poe-code/agent-human-in-loop @poe-code/task-list @poe-code/agent-defs @poe-code/config-mutations @poe-code/process-runner tiny-mcp-client tiny-stdio-mcp-server auth-store",
108
+ "postpack": "node ../../scripts/manage-bundled-workspace-deps.mjs cleanup . toolcraft-schema toolcraft-design @poe-code/frontmatter @poe-code/agent-mcp-config @poe-code/agent-human-in-loop @poe-code/task-list @poe-code/agent-defs @poe-code/config-mutations @poe-code/process-runner tiny-mcp-client tiny-stdio-mcp-server auth-store"
109
109
  },
110
110
  "dependencies": {
111
- "ajv": "^8.20.0",
112
111
  "commander": "^13.1.0",
113
112
  "fast-string-width": "^3.0.2",
114
113
  "fast-wrap-ansi": "^0.2.0",
@@ -136,7 +135,6 @@
136
135
  "directory": "packages/toolcraft"
137
136
  },
138
137
  "bundleDependencies": [
139
- "ajv",
140
138
  "toolcraft-schema",
141
139
  "toolcraft-design",
142
140
  "@poe-code/frontmatter",
@@ -151,7 +149,7 @@
151
149
  "auth-store"
152
150
  ],
153
151
  "optionalDependencies": {
154
- "toolcraft-schema": "0.0.115",
152
+ "toolcraft-schema": "0.0.116",
155
153
  "toolcraft-design": "^0.0.2",
156
154
  "@poe-code/frontmatter": "*",
157
155
  "@poe-code/agent-mcp-config": "*",
@@ -1,23 +0,0 @@
1
- const Ajv = require("ajv")
2
- const ajv = new Ajv({allErrors: true})
3
-
4
- const schema = {
5
- type: "object",
6
- properties: {
7
- foo: {type: "string"},
8
- bar: {type: "number", maximum: 3},
9
- },
10
- required: ["foo", "bar"],
11
- additionalProperties: false,
12
- }
13
-
14
- const validate = ajv.compile(schema)
15
-
16
- test({foo: "abc", bar: 2})
17
- test({foo: 2, bar: 4})
18
-
19
- function test(data) {
20
- const valid = validate(data)
21
- if (valid) console.log("Valid!")
22
- else console.log("Invalid: " + ajv.errorsText(validate.errors))
23
- }
@@ -1,22 +0,0 @@
1
- The MIT License (MIT)
2
-
3
- Copyright (c) 2015-2021 Evgeny Poberezkin
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
22
-
@@ -1,207 +0,0 @@
1
- <img align="right" alt="Ajv logo" width="160" src="https://ajv.js.org/img/ajv.svg">
2
-
3
- &nbsp;
4
-
5
- # Ajv JSON schema validator
6
-
7
- The fastest JSON validator for Node.js and browser.
8
-
9
- Supports JSON Schema draft-04/06/07/2019-09/2020-12 ([draft-04 support](https://ajv.js.org/json-schema.html#draft-04) requires ajv-draft-04 package) and JSON Type Definition [RFC8927](https://datatracker.ietf.org/doc/rfc8927/).
10
-
11
- [![build](https://github.com/ajv-validator/ajv/actions/workflows/build.yml/badge.svg)](https://github.com/ajv-validator/ajv/actions?query=workflow%3Abuild)
12
- [![npm](https://img.shields.io/npm/v/ajv.svg)](https://www.npmjs.com/package/ajv)
13
- [![npm downloads](https://img.shields.io/npm/dm/ajv.svg)](https://www.npmjs.com/package/ajv)
14
- [![Coverage Status](https://coveralls.io/repos/github/ajv-validator/ajv/badge.svg?branch=master)](https://coveralls.io/github/ajv-validator/ajv?branch=master)
15
- [![SimpleX](https://img.shields.io/badge/chat-on%20SimpleX-70F0F9)](https://simplex.chat/contact#/?v=1-2&smp=smp%3A%2F%2Fu2dS9sG8nMNURyZwqASV4yROM28Er0luVTx5X1CsMrU%3D%40smp4.simplex.im%2F8KvvURM6J38Gdq9dCuPswMOkMny0xCOJ%23%2F%3Fv%3D1-2%26dh%3DMCowBQYDK2VuAyEAr8rPVRuMOXv6kwF2yUAap-eoVg-9ssOFCi1fIrxTUw0%253D%26srv%3Do5vmywmrnaxalvz6wi3zicyftgio6psuvyniis6gco6bp6ekl4cqj4id.onion&data=%7B%22type%22%3A%22group%22%2C%22groupLinkId%22%3A%224pwLRgWHU9tlroMWHz0uOg%3D%3D%22%7D)
16
- [![Gitter](https://img.shields.io/gitter/room/ajv-validator/ajv.svg)](https://gitter.im/ajv-validator/ajv)
17
- [![GitHub Sponsors](https://img.shields.io/badge/$-sponsors-brightgreen)](https://github.com/sponsors/epoberezkin)
18
-
19
- ## Ajv sponsors
20
-
21
- [<img src="https://ajv.js.org/img/mozilla.svg" width="45%" alt="Mozilla">](https://www.mozilla.org)<img src="https://ajv.js.org/img/gap.svg" width="9%">[<img src="https://ajv.js.org/img/reserved.svg" width="45%">](https://opencollective.com/ajv)
22
-
23
- [<img src="https://ajv.js.org/img/microsoft.png" width="31%" alt="Microsoft">](https://opensource.microsoft.com)<img src="https://ajv.js.org/img/gap.svg" width="3%">[<img src="https://ajv.js.org/img/reserved.svg" width="31%">](https://opencollective.com/ajv)<img src="https://ajv.js.org/img/gap.svg" width="3%">[<img src="https://ajv.js.org/img/reserved.svg" width="31%">](https://opencollective.com/ajv)
24
-
25
- [<img src="https://ajv.js.org/img/retool.svg" width="22.5%" alt="Retool">](https://retool.com/?utm_source=sponsor&utm_campaign=ajv)<img src="https://ajv.js.org/img/gap.svg" width="3%">[<img src="https://ajv.js.org/img/tidelift.svg" width="22.5%" alt="Tidelift">](https://tidelift.com/subscription/pkg/npm-ajv?utm_source=npm-ajv&utm_medium=referral&utm_campaign=enterprise)<img src="https://ajv.js.org/img/gap.svg" width="3%">[<img src="https://ajv.js.org/img/simplex.svg" width="22.5%" alt="SimpleX">](https://github.com/simplex-chat/simplex-chat)<img src="https://ajv.js.org/img/gap.svg" width="3%">[<img src="https://ajv.js.org/img/reserved.svg" width="22.5%">](https://opencollective.com/ajv)
26
-
27
- ## Contributing
28
-
29
- More than 100 people contributed to Ajv, and we would love to have you join the development. We welcome implementing new features that will benefit many users and ideas to improve our documentation.
30
-
31
- Please review [Contributing guidelines](./CONTRIBUTING.md) and [Code components](https://ajv.js.org/components.html).
32
-
33
- ## Documentation
34
-
35
- All documentation is available on the [Ajv website](https://ajv.js.org).
36
-
37
- Some useful site links:
38
-
39
- - [Getting started](https://ajv.js.org/guide/getting-started.html)
40
- - [JSON Schema vs JSON Type Definition](https://ajv.js.org/guide/schema-language.html)
41
- - [API reference](https://ajv.js.org/api.html)
42
- - [Strict mode](https://ajv.js.org/strict-mode.html)
43
- - [Standalone validation code](https://ajv.js.org/standalone.html)
44
- - [Security considerations](https://ajv.js.org/security.html)
45
- - [Command line interface](https://ajv.js.org/packages/ajv-cli.html)
46
- - [Frequently Asked Questions](https://ajv.js.org/faq.html)
47
-
48
- ## <a name="sponsors"></a>Please [sponsor Ajv development](https://github.com/sponsors/epoberezkin)
49
-
50
- Since I asked to support Ajv development 40 people and 6 organizations contributed via GitHub and OpenCollective - this support helped receiving the MOSS grant!
51
-
52
- Your continuing support is very important - the funds will be used to develop and maintain Ajv once the next major version is released.
53
-
54
- Please sponsor Ajv via:
55
-
56
- - [GitHub sponsors page](https://github.com/sponsors/epoberezkin) (GitHub will match it)
57
- - [Ajv Open Collective](https://opencollective.com/ajv)
58
-
59
- Thank you.
60
-
61
- #### Open Collective sponsors
62
-
63
- <a href="https://opencollective.com/ajv"><img src="https://opencollective.com/ajv/individuals.svg?width=890"></a>
64
-
65
- <a href="https://opencollective.com/ajv/organization/0/website"><img src="https://opencollective.com/ajv/organization/0/avatar.svg"></a>
66
- <a href="https://opencollective.com/ajv/organization/1/website"><img src="https://opencollective.com/ajv/organization/1/avatar.svg"></a>
67
- <a href="https://opencollective.com/ajv/organization/2/website"><img src="https://opencollective.com/ajv/organization/2/avatar.svg"></a>
68
- <a href="https://opencollective.com/ajv/organization/3/website"><img src="https://opencollective.com/ajv/organization/3/avatar.svg"></a>
69
- <a href="https://opencollective.com/ajv/organization/4/website"><img src="https://opencollective.com/ajv/organization/4/avatar.svg"></a>
70
- <a href="https://opencollective.com/ajv/organization/5/website"><img src="https://opencollective.com/ajv/organization/5/avatar.svg"></a>
71
- <a href="https://opencollective.com/ajv/organization/6/website"><img src="https://opencollective.com/ajv/organization/6/avatar.svg"></a>
72
- <a href="https://opencollective.com/ajv/organization/7/website"><img src="https://opencollective.com/ajv/organization/7/avatar.svg"></a>
73
- <a href="https://opencollective.com/ajv/organization/8/website"><img src="https://opencollective.com/ajv/organization/8/avatar.svg"></a>
74
- <a href="https://opencollective.com/ajv/organization/9/website"><img src="https://opencollective.com/ajv/organization/9/avatar.svg"></a>
75
- <a href="https://opencollective.com/ajv/organization/10/website"><img src="https://opencollective.com/ajv/organization/10/avatar.svg"></a>
76
- <a href="https://opencollective.com/ajv/organization/11/website"><img src="https://opencollective.com/ajv/organization/11/avatar.svg"></a>
77
- <a href="https://opencollective.com/ajv/organization/12/website"><img src="https://opencollective.com/ajv/organization/12/avatar.svg"></a>
78
- <a href="https://opencollective.com/ajv/organization/13/website"><img src="https://opencollective.com/ajv/organization/13/avatar.svg"></a>
79
- <a href="https://opencollective.com/ajv/organization/14/website"><img src="https://opencollective.com/ajv/organization/14/avatar.svg"></a>
80
- <a href="https://opencollective.com/ajv/organization/15/website"><img src="https://opencollective.com/ajv/organization/15/avatar.svg"></a>
81
- <a href="https://opencollective.com/ajv/organization/16/website"><img src="https://opencollective.com/ajv/organization/16/avatar.svg"></a>
82
- <a href="https://opencollective.com/ajv/organization/17/website"><img src="https://opencollective.com/ajv/organization/17/avatar.svg"></a>
83
- <a href="https://opencollective.com/ajv/organization/18/website"><img src="https://opencollective.com/ajv/organization/18/avatar.svg"></a>
84
- <a href="https://opencollective.com/ajv/organization/19/website"><img src="https://opencollective.com/ajv/organization/19/avatar.svg"></a>
85
- <a href="https://opencollective.com/ajv/organization/20/website"><img src="https://opencollective.com/ajv/organization/20/avatar.svg"></a>
86
- <a href="https://opencollective.com/ajv/organization/21/website"><img src="https://opencollective.com/ajv/organization/21/avatar.svg"></a>
87
- <a href="https://opencollective.com/ajv/organization/22/website"><img src="https://opencollective.com/ajv/organization/22/avatar.svg"></a>
88
- <a href="https://opencollective.com/ajv/organization/23/website"><img src="https://opencollective.com/ajv/organization/23/avatar.svg"></a>
89
- <a href="https://opencollective.com/ajv/organization/24/website"><img src="https://opencollective.com/ajv/organization/24/avatar.svg"></a>
90
-
91
- ## Performance
92
-
93
- Ajv generates code to turn JSON Schemas into super-fast validation functions that are efficient for v8 optimization.
94
-
95
- Currently Ajv is the fastest and the most standard compliant validator according to these benchmarks:
96
-
97
- - [json-schema-benchmark](https://github.com/ebdrup/json-schema-benchmark) - 50% faster than the second place
98
- - [jsck benchmark](https://github.com/pandastrike/jsck#benchmarks) - 20-190% faster
99
- - [z-schema benchmark](https://rawgit.com/zaggino/z-schema/master/benchmark/results.html)
100
- - [themis benchmark](https://cdn.rawgit.com/playlyfe/themis/master/benchmark/results.html)
101
-
102
- Performance of different validators by [json-schema-benchmark](https://github.com/ebdrup/json-schema-benchmark):
103
-
104
- [![performance](https://chart.googleapis.com/chart?chxt=x,y&cht=bhs&chco=76A4FB&chls=2.0&chbh=62,4,1&chs=600x416&chxl=-1:|ajv|@exodus/schemasafe|is-my-json-valid|djv|@cfworker/json-schema|jsonschema/=t:100,69.2,51.5,13.1,5.1,1.2)](https://github.com/ebdrup/json-schema-benchmark/blob/master/README.md#performance)
105
-
106
- ## Features
107
-
108
- - Ajv implements JSON Schema [draft-06/07/2019-09/2020-12](http://json-schema.org/) standards (draft-04 is supported in v6):
109
- - all validation keywords (see [JSON Schema validation keywords](https://ajv.js.org/json-schema.html))
110
- - [OpenAPI](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.3.md) extensions:
111
- - NEW: keyword [discriminator](https://ajv.js.org/json-schema.html#discriminator).
112
- - keyword [nullable](https://ajv.js.org/json-schema.html#nullable).
113
- - full support of remote references (remote schemas have to be added with `addSchema` or compiled to be available)
114
- - support of recursive references between schemas
115
- - correct string lengths for strings with unicode pairs
116
- - JSON Schema [formats](https://ajv.js.org/guide/formats.html) (with [ajv-formats](https://github.com/ajv-validator/ajv-formats) plugin).
117
- - [validates schemas against meta-schema](https://ajv.js.org/api.html#api-validateschema)
118
- - NEW: supports [JSON Type Definition](https://datatracker.ietf.org/doc/rfc8927/):
119
- - all keywords (see [JSON Type Definition schema forms](https://ajv.js.org/json-type-definition.html))
120
- - meta-schema for JTD schemas
121
- - "union" keyword and user-defined keywords (can be used inside "metadata" member of the schema)
122
- - supports [browsers](https://ajv.js.org/guide/environments.html#browsers) and Node.js 18.x - current
123
- - [asynchronous loading](https://ajv.js.org/guide/managing-schemas.html#asynchronous-schema-loading) of referenced schemas during compilation
124
- - "All errors" validation mode with [option allErrors](https://ajv.js.org/options.html#allerrors)
125
- - [error messages with parameters](https://ajv.js.org/api.html#validation-errors) describing error reasons to allow error message generation
126
- - i18n error messages support with [ajv-i18n](https://github.com/ajv-validator/ajv-i18n) package
127
- - [removing-additional-properties](https://ajv.js.org/guide/modifying-data.html#removing-additional-properties)
128
- - [assigning defaults](https://ajv.js.org/guide/modifying-data.html#assigning-defaults) to missing properties and items
129
- - [coercing data](https://ajv.js.org/guide/modifying-data.html#coercing-data-types) to the types specified in `type` keywords
130
- - [user-defined keywords](https://ajv.js.org/guide/user-keywords.html)
131
- - additional extension keywords with [ajv-keywords](https://github.com/ajv-validator/ajv-keywords) package
132
- - [\$data reference](https://ajv.js.org/guide/combining-schemas.html#data-reference) to use values from the validated data as values for the schema keywords
133
- - [asynchronous validation](https://ajv.js.org/guide/async-validation.html) of user-defined formats and keywords
134
-
135
- ## Install
136
-
137
- To install version 8:
138
-
139
- ```
140
- npm install ajv
141
- ```
142
-
143
- ## <a name="usage"></a>Getting started
144
-
145
- Try it in the Node.js REPL: https://runkit.com/npm/ajv
146
-
147
- In JavaScript:
148
-
149
- ```javascript
150
- // or ESM/TypeScript import
151
- import Ajv from "ajv"
152
- // Node.js require:
153
- const Ajv = require("ajv")
154
-
155
- const ajv = new Ajv() // options can be passed, e.g. {allErrors: true}
156
-
157
- const schema = {
158
- type: "object",
159
- properties: {
160
- foo: {type: "integer"},
161
- bar: {type: "string"},
162
- },
163
- required: ["foo"],
164
- additionalProperties: false,
165
- }
166
-
167
- const data = {
168
- foo: 1,
169
- bar: "abc",
170
- }
171
-
172
- const validate = ajv.compile(schema)
173
- const valid = validate(data)
174
- if (!valid) console.log(validate.errors)
175
- ```
176
-
177
- Learn how to use Ajv and see more examples in the [Guide: getting started](https://ajv.js.org/guide/getting-started.html)
178
-
179
- ## Changes history
180
-
181
- See [https://github.com/ajv-validator/ajv/releases](https://github.com/ajv-validator/ajv/releases)
182
-
183
- **Please note**: [Changes in version 8.0.0](https://github.com/ajv-validator/ajv/releases/tag/v8.0.0)
184
-
185
- [Version 7.0.0](https://github.com/ajv-validator/ajv/releases/tag/v7.0.0)
186
-
187
- [Version 6.0.0](https://github.com/ajv-validator/ajv/releases/tag/v6.0.0).
188
-
189
- ## Code of conduct
190
-
191
- Please review and follow the [Code of conduct](./CODE_OF_CONDUCT.md).
192
-
193
- Please report any unacceptable behaviour to ajv.validator@gmail.com - it will be reviewed by the project team.
194
-
195
- ## Security contact
196
-
197
- To report a security vulnerability, please use the
198
- [Tidelift security contact](https://tidelift.com/security).
199
- Tidelift will coordinate the fix and disclosure. Please do NOT report security vulnerabilities via GitHub issues.
200
-
201
- ## Open-source software support
202
-
203
- Ajv is a part of [Tidelift subscription](https://tidelift.com/subscription/pkg/npm-ajv?utm_source=npm-ajv&utm_medium=referral&utm_campaign=readme) - it provides a centralised support to open-source software users, in addition to the support provided by software maintainers.
204
-
205
- ## License
206
-
207
- [MIT](./LICENSE)
@@ -1,19 +0,0 @@
1
- import type { AnySchemaObject } from "./types";
2
- import AjvCore, { Options } from "./core";
3
- export declare class Ajv2019 extends AjvCore {
4
- constructor(opts?: Options);
5
- _addVocabularies(): void;
6
- _addDefaultMetaSchema(): void;
7
- defaultMeta(): string | AnySchemaObject | undefined;
8
- }
9
- export default Ajv2019;
10
- export { Format, FormatDefinition, AsyncFormatDefinition, KeywordDefinition, KeywordErrorDefinition, CodeKeywordDefinition, MacroKeywordDefinition, FuncKeywordDefinition, Vocabulary, Schema, SchemaObject, AnySchemaObject, AsyncSchema, AnySchema, ValidateFunction, AsyncValidateFunction, ErrorObject, ErrorNoParams, } from "./types";
11
- export { Plugin, Options, CodeOptions, InstanceOptions, Logger, ErrorsTextOptions } from "./core";
12
- export { SchemaCxt, SchemaObjCxt } from "./compile";
13
- export { KeywordCxt } from "./compile/validate";
14
- export { DefinedError } from "./vocabularies/errors";
15
- export { JSONType } from "./compile/rules";
16
- export { JSONSchemaType } from "./types/json-schema";
17
- export { _, str, stringify, nil, Name, Code, CodeGen, CodeGenOptions } from "./compile/codegen";
18
- export { default as ValidationError } from "./runtime/validation_error";
19
- export { default as MissingRefError } from "./compile/ref_error";
@@ -1,61 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.MissingRefError = exports.ValidationError = exports.CodeGen = exports.Name = exports.nil = exports.stringify = exports.str = exports._ = exports.KeywordCxt = exports.Ajv2019 = void 0;
4
- const core_1 = require("./core");
5
- const draft7_1 = require("./vocabularies/draft7");
6
- const dynamic_1 = require("./vocabularies/dynamic");
7
- const next_1 = require("./vocabularies/next");
8
- const unevaluated_1 = require("./vocabularies/unevaluated");
9
- const discriminator_1 = require("./vocabularies/discriminator");
10
- const json_schema_2019_09_1 = require("./refs/json-schema-2019-09");
11
- const META_SCHEMA_ID = "https://json-schema.org/draft/2019-09/schema";
12
- class Ajv2019 extends core_1.default {
13
- constructor(opts = {}) {
14
- super({
15
- ...opts,
16
- dynamicRef: true,
17
- next: true,
18
- unevaluated: true,
19
- });
20
- }
21
- _addVocabularies() {
22
- super._addVocabularies();
23
- this.addVocabulary(dynamic_1.default);
24
- draft7_1.default.forEach((v) => this.addVocabulary(v));
25
- this.addVocabulary(next_1.default);
26
- this.addVocabulary(unevaluated_1.default);
27
- if (this.opts.discriminator)
28
- this.addKeyword(discriminator_1.default);
29
- }
30
- _addDefaultMetaSchema() {
31
- super._addDefaultMetaSchema();
32
- const { $data, meta } = this.opts;
33
- if (!meta)
34
- return;
35
- json_schema_2019_09_1.default.call(this, $data);
36
- this.refs["http://json-schema.org/schema"] = META_SCHEMA_ID;
37
- }
38
- defaultMeta() {
39
- return (this.opts.defaultMeta =
40
- super.defaultMeta() || (this.getSchema(META_SCHEMA_ID) ? META_SCHEMA_ID : undefined));
41
- }
42
- }
43
- exports.Ajv2019 = Ajv2019;
44
- module.exports = exports = Ajv2019;
45
- module.exports.Ajv2019 = Ajv2019;
46
- Object.defineProperty(exports, "__esModule", { value: true });
47
- exports.default = Ajv2019;
48
- var validate_1 = require("./compile/validate");
49
- Object.defineProperty(exports, "KeywordCxt", { enumerable: true, get: function () { return validate_1.KeywordCxt; } });
50
- var codegen_1 = require("./compile/codegen");
51
- Object.defineProperty(exports, "_", { enumerable: true, get: function () { return codegen_1._; } });
52
- Object.defineProperty(exports, "str", { enumerable: true, get: function () { return codegen_1.str; } });
53
- Object.defineProperty(exports, "stringify", { enumerable: true, get: function () { return codegen_1.stringify; } });
54
- Object.defineProperty(exports, "nil", { enumerable: true, get: function () { return codegen_1.nil; } });
55
- Object.defineProperty(exports, "Name", { enumerable: true, get: function () { return codegen_1.Name; } });
56
- Object.defineProperty(exports, "CodeGen", { enumerable: true, get: function () { return codegen_1.CodeGen; } });
57
- var validation_error_1 = require("./runtime/validation_error");
58
- Object.defineProperty(exports, "ValidationError", { enumerable: true, get: function () { return validation_error_1.default; } });
59
- var ref_error_1 = require("./compile/ref_error");
60
- Object.defineProperty(exports, "MissingRefError", { enumerable: true, get: function () { return ref_error_1.default; } });
61
- //# sourceMappingURL=2019.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"2019.js","sourceRoot":"","sources":["../lib/2019.ts"],"names":[],"mappings":";;;AACA,iCAAuC;AAEvC,kDAAsD;AACtD,oDAAsD;AACtD,8CAAgD;AAChD,4DAA8D;AAC9D,gEAAwD;AACxD,oEAA0D;AAE1D,MAAM,cAAc,GAAG,8CAA8C,CAAA;AAErE,MAAa,OAAQ,SAAQ,cAAO;IAClC,YAAY,OAAgB,EAAE;QAC5B,KAAK,CAAC;YACJ,GAAG,IAAI;YACP,UAAU,EAAE,IAAI;YAChB,IAAI,EAAE,IAAI;YACV,WAAW,EAAE,IAAI;SAClB,CAAC,CAAA;IACJ,CAAC;IAED,gBAAgB;QACd,KAAK,CAAC,gBAAgB,EAAE,CAAA;QACxB,IAAI,CAAC,aAAa,CAAC,iBAAiB,CAAC,CAAA;QACrC,gBAAkB,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,CAAA;QACxD,IAAI,CAAC,aAAa,CAAC,cAAc,CAAC,CAAA;QAClC,IAAI,CAAC,aAAa,CAAC,qBAAqB,CAAC,CAAA;QACzC,IAAI,IAAI,CAAC,IAAI,CAAC,aAAa;YAAE,IAAI,CAAC,UAAU,CAAC,uBAAa,CAAC,CAAA;IAC7D,CAAC;IAED,qBAAqB;QACnB,KAAK,CAAC,qBAAqB,EAAE,CAAA;QAC7B,MAAM,EAAC,KAAK,EAAE,IAAI,EAAC,GAAG,IAAI,CAAC,IAAI,CAAA;QAC/B,IAAI,CAAC,IAAI;YAAE,OAAM;QACjB,6BAAiB,CAAC,IAAI,CAAC,IAAI,EAAE,KAAK,CAAC,CAAA;QACnC,IAAI,CAAC,IAAI,CAAC,+BAA+B,CAAC,GAAG,cAAc,CAAA;IAC7D,CAAC;IAED,WAAW;QACT,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,WAAW;YAC3B,KAAK,CAAC,WAAW,EAAE,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAA;IACzF,CAAC;CACF;AA/BD,0BA+BC;AAED,MAAM,CAAC,OAAO,GAAG,OAAO,GAAG,OAAO,CAAA;AAClC,MAAM,CAAC,OAAO,CAAC,OAAO,GAAG,OAAO,CAAA;AAChC,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAC,KAAK,EAAE,IAAI,EAAC,CAAC,CAAA;AAE3D,kBAAe,OAAO,CAAA;AAyBtB,+CAA6C;AAArC,sGAAA,UAAU,OAAA;AAIlB,6CAA6F;AAArF,4FAAA,CAAC,OAAA;AAAE,8FAAA,GAAG,OAAA;AAAE,oGAAA,SAAS,OAAA;AAAE,8FAAA,GAAG,OAAA;AAAE,+FAAA,IAAI,OAAA;AAAQ,kGAAA,OAAO,OAAA;AACnD,+DAAqE;AAA7D,mHAAA,OAAO,OAAmB;AAClC,iDAA8D;AAAtD,4GAAA,OAAO,OAAmB"}
@@ -1,19 +0,0 @@
1
- import type { AnySchemaObject } from "./types";
2
- import AjvCore, { Options } from "./core";
3
- export declare class Ajv2020 extends AjvCore {
4
- constructor(opts?: Options);
5
- _addVocabularies(): void;
6
- _addDefaultMetaSchema(): void;
7
- defaultMeta(): string | AnySchemaObject | undefined;
8
- }
9
- export default Ajv2020;
10
- export { Format, FormatDefinition, AsyncFormatDefinition, KeywordDefinition, KeywordErrorDefinition, CodeKeywordDefinition, MacroKeywordDefinition, FuncKeywordDefinition, Vocabulary, Schema, SchemaObject, AnySchemaObject, AsyncSchema, AnySchema, ValidateFunction, AsyncValidateFunction, ErrorObject, ErrorNoParams, } from "./types";
11
- export { Plugin, Options, CodeOptions, InstanceOptions, Logger, ErrorsTextOptions } from "./core";
12
- export { SchemaCxt, SchemaObjCxt } from "./compile";
13
- export { KeywordCxt } from "./compile/validate";
14
- export { DefinedError } from "./vocabularies/errors";
15
- export { JSONType } from "./compile/rules";
16
- export { JSONSchemaType } from "./types/json-schema";
17
- export { _, str, stringify, nil, Name, Code, CodeGen, CodeGenOptions } from "./compile/codegen";
18
- export { default as ValidationError } from "./runtime/validation_error";
19
- export { default as MissingRefError } from "./compile/ref_error";