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
@@ -1,406 +0,0 @@
1
- 'use strict'
2
-
3
- const { normalizeIPv6, removeDotSegments, recomposeAuthority, normalizePercentEncoding, normalizePathEncoding, escapePreservingEscapes, reescapeHostDelimiters, isIPv4, nonSimpleDomain } = require('./lib/utils')
4
- const { SCHEMES, getSchemeHandler } = require('./lib/schemes')
5
-
6
- /**
7
- * @template {import('./types/index').URIComponent|string} T
8
- * @param {T} uri
9
- * @param {import('./types/index').Options} [options]
10
- * @returns {T}
11
- */
12
- function normalize (uri, options) {
13
- if (typeof uri === 'string') {
14
- uri = /** @type {T} */ (normalizeString(uri, options))
15
- } else if (typeof uri === 'object') {
16
- uri = /** @type {T} */ (parse(serialize(uri, options), options))
17
- }
18
- return uri
19
- }
20
-
21
- /**
22
- * @param {string} baseURI
23
- * @param {string} relativeURI
24
- * @param {import('./types/index').Options} [options]
25
- * @returns {string}
26
- */
27
- function resolve (baseURI, relativeURI, options) {
28
- const schemelessOptions = options ? Object.assign({ scheme: 'null' }, options) : { scheme: 'null' }
29
- const resolved = resolveComponent(parse(baseURI, schemelessOptions), parse(relativeURI, schemelessOptions), schemelessOptions, true)
30
- schemelessOptions.skipEscape = true
31
- return serialize(resolved, schemelessOptions)
32
- }
33
-
34
- /**
35
- * @param {import ('./types/index').URIComponent} base
36
- * @param {import ('./types/index').URIComponent} relative
37
- * @param {import('./types/index').Options} [options]
38
- * @param {boolean} [skipNormalization=false]
39
- * @returns {import ('./types/index').URIComponent}
40
- */
41
- function resolveComponent (base, relative, options, skipNormalization) {
42
- /** @type {import('./types/index').URIComponent} */
43
- const target = {}
44
- if (!skipNormalization) {
45
- base = parse(serialize(base, options), options) // normalize base component
46
- relative = parse(serialize(relative, options), options) // normalize relative component
47
- }
48
- options = options || {}
49
-
50
- if (!options.tolerant && relative.scheme) {
51
- target.scheme = relative.scheme
52
- // target.authority = relative.authority;
53
- target.userinfo = relative.userinfo
54
- target.host = relative.host
55
- target.port = relative.port
56
- target.path = removeDotSegments(relative.path || '')
57
- target.query = relative.query
58
- } else {
59
- if (relative.userinfo !== undefined || relative.host !== undefined || relative.port !== undefined) {
60
- // target.authority = relative.authority;
61
- target.userinfo = relative.userinfo
62
- target.host = relative.host
63
- target.port = relative.port
64
- target.path = removeDotSegments(relative.path || '')
65
- target.query = relative.query
66
- } else {
67
- if (!relative.path) {
68
- target.path = base.path
69
- if (relative.query !== undefined) {
70
- target.query = relative.query
71
- } else {
72
- target.query = base.query
73
- }
74
- } else {
75
- if (relative.path[0] === '/') {
76
- target.path = removeDotSegments(relative.path)
77
- } else {
78
- if ((base.userinfo !== undefined || base.host !== undefined || base.port !== undefined) && !base.path) {
79
- target.path = '/' + relative.path
80
- } else if (!base.path) {
81
- target.path = relative.path
82
- } else {
83
- target.path = base.path.slice(0, base.path.lastIndexOf('/') + 1) + relative.path
84
- }
85
- target.path = removeDotSegments(target.path)
86
- }
87
- target.query = relative.query
88
- }
89
- // target.authority = base.authority;
90
- target.userinfo = base.userinfo
91
- target.host = base.host
92
- target.port = base.port
93
- }
94
- target.scheme = base.scheme
95
- }
96
-
97
- target.fragment = relative.fragment
98
-
99
- return target
100
- }
101
-
102
- /**
103
- * @param {import ('./types/index').URIComponent|string} uriA
104
- * @param {import ('./types/index').URIComponent|string} uriB
105
- * @param {import ('./types/index').Options} options
106
- * @returns {boolean}
107
- */
108
- function equal (uriA, uriB, options) {
109
- const normalizedA = normalizeComparableURI(uriA, options)
110
- const normalizedB = normalizeComparableURI(uriB, options)
111
-
112
- return normalizedA !== undefined && normalizedB !== undefined && normalizedA.toLowerCase() === normalizedB.toLowerCase()
113
- }
114
-
115
- /**
116
- * @param {Readonly<import('./types/index').URIComponent>} cmpts
117
- * @param {import('./types/index').Options} [opts]
118
- * @returns {string}
119
- */
120
- function serialize (cmpts, opts) {
121
- const component = {
122
- host: cmpts.host,
123
- scheme: cmpts.scheme,
124
- userinfo: cmpts.userinfo,
125
- port: cmpts.port,
126
- path: cmpts.path,
127
- query: cmpts.query,
128
- nid: cmpts.nid,
129
- nss: cmpts.nss,
130
- uuid: cmpts.uuid,
131
- fragment: cmpts.fragment,
132
- reference: cmpts.reference,
133
- resourceName: cmpts.resourceName,
134
- secure: cmpts.secure,
135
- error: ''
136
- }
137
- const options = Object.assign({}, opts)
138
- const uriTokens = []
139
-
140
- // find scheme handler
141
- const schemeHandler = getSchemeHandler(options.scheme || component.scheme)
142
-
143
- // perform scheme specific serialization
144
- if (schemeHandler && schemeHandler.serialize) schemeHandler.serialize(component, options)
145
-
146
- if (component.path !== undefined) {
147
- if (!options.skipEscape) {
148
- component.path = escapePreservingEscapes(component.path)
149
-
150
- if (component.scheme !== undefined) {
151
- component.path = component.path.split('%3A').join(':')
152
- }
153
- } else {
154
- component.path = normalizePercentEncoding(component.path)
155
- }
156
- }
157
-
158
- if (options.reference !== 'suffix' && component.scheme) {
159
- uriTokens.push(component.scheme, ':')
160
- }
161
-
162
- const authority = recomposeAuthority(component)
163
- if (authority !== undefined) {
164
- if (options.reference !== 'suffix') {
165
- uriTokens.push('//')
166
- }
167
-
168
- uriTokens.push(authority)
169
-
170
- if (component.path && component.path[0] !== '/') {
171
- uriTokens.push('/')
172
- }
173
- }
174
- if (component.path !== undefined) {
175
- let s = component.path
176
-
177
- if (!options.absolutePath && (!schemeHandler || !schemeHandler.absolutePath)) {
178
- s = removeDotSegments(s)
179
- }
180
-
181
- if (
182
- authority === undefined &&
183
- s[0] === '/' &&
184
- s[1] === '/'
185
- ) {
186
- // don't allow the path to start with "//"
187
- s = '/%2F' + s.slice(2)
188
- }
189
-
190
- uriTokens.push(s)
191
- }
192
-
193
- if (component.query !== undefined) {
194
- uriTokens.push('?', component.query)
195
- }
196
-
197
- if (component.fragment !== undefined) {
198
- uriTokens.push('#', component.fragment)
199
- }
200
- return uriTokens.join('')
201
- }
202
-
203
- const URI_PARSE = /^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u
204
-
205
- /**
206
- * @param {import('./types/index').URIComponent} parsed
207
- * @param {RegExpMatchArray} matches
208
- * @returns {string|undefined}
209
- */
210
- function getParseError (parsed, matches) {
211
- if (matches[2] !== undefined && parsed.path && parsed.path[0] !== '/') {
212
- return 'URI path must start with "/" when authority is present.'
213
- }
214
-
215
- if (typeof parsed.port === 'number' && (parsed.port < 0 || parsed.port > 65535)) {
216
- return 'URI port is malformed.'
217
- }
218
-
219
- return undefined
220
- }
221
-
222
- /**
223
- * @param {string} uri
224
- * @param {import('./types/index').Options} [opts]
225
- * @returns {{ parsed: import('./types/index').URIComponent, malformedAuthorityOrPort: boolean }}
226
- */
227
- function parseWithStatus (uri, opts) {
228
- const options = Object.assign({}, opts)
229
- /** @type {import('./types/index').URIComponent} */
230
- const parsed = {
231
- scheme: undefined,
232
- userinfo: undefined,
233
- host: '',
234
- port: undefined,
235
- path: '',
236
- query: undefined,
237
- fragment: undefined
238
- }
239
-
240
- let malformedAuthorityOrPort = false
241
-
242
- let isIP = false
243
- if (options.reference === 'suffix') {
244
- if (options.scheme) {
245
- uri = options.scheme + ':' + uri
246
- } else {
247
- uri = '//' + uri
248
- }
249
- }
250
-
251
- const matches = uri.match(URI_PARSE)
252
-
253
- if (matches) {
254
- // store each component
255
- parsed.scheme = matches[1]
256
- parsed.userinfo = matches[3]
257
- parsed.host = matches[4]
258
- parsed.port = parseInt(matches[5], 10)
259
- parsed.path = matches[6] || ''
260
- parsed.query = matches[7]
261
- parsed.fragment = matches[8]
262
-
263
- // fix port number
264
- if (isNaN(parsed.port)) {
265
- parsed.port = matches[5]
266
- }
267
-
268
- const parseError = getParseError(parsed, matches)
269
- if (parseError !== undefined) {
270
- parsed.error = parsed.error || parseError
271
- malformedAuthorityOrPort = true
272
- }
273
-
274
- if (parsed.host) {
275
- const ipv4result = isIPv4(parsed.host)
276
- if (ipv4result === false) {
277
- const ipv6result = normalizeIPv6(parsed.host)
278
- parsed.host = ipv6result.host.toLowerCase()
279
- isIP = ipv6result.isIPV6
280
- } else {
281
- isIP = true
282
- }
283
- }
284
- if (parsed.scheme === undefined && parsed.userinfo === undefined && parsed.host === undefined && parsed.port === undefined && parsed.query === undefined && !parsed.path) {
285
- parsed.reference = 'same-document'
286
- } else if (parsed.scheme === undefined) {
287
- parsed.reference = 'relative'
288
- } else if (parsed.fragment === undefined) {
289
- parsed.reference = 'absolute'
290
- } else {
291
- parsed.reference = 'uri'
292
- }
293
-
294
- // check for reference errors
295
- if (options.reference && options.reference !== 'suffix' && options.reference !== parsed.reference) {
296
- parsed.error = parsed.error || 'URI is not a ' + options.reference + ' reference.'
297
- }
298
-
299
- // find scheme handler
300
- const schemeHandler = getSchemeHandler(options.scheme || parsed.scheme)
301
-
302
- // check if scheme can't handle IRIs
303
- if (!options.unicodeSupport && (!schemeHandler || !schemeHandler.unicodeSupport)) {
304
- // if host component is a domain name
305
- if (parsed.host && (options.domainHost || (schemeHandler && schemeHandler.domainHost)) && isIP === false && nonSimpleDomain(parsed.host)) {
306
- // convert Unicode IDN -> ASCII IDN
307
- try {
308
- parsed.host = URL.domainToASCII(parsed.host.toLowerCase())
309
- } catch (e) {
310
- parsed.error = parsed.error || "Host's domain name can not be converted to ASCII: " + e
311
- }
312
- }
313
- // convert IRI -> URI
314
- }
315
-
316
- if (!schemeHandler || (schemeHandler && !schemeHandler.skipNormalize)) {
317
- if (uri.indexOf('%') !== -1) {
318
- if (parsed.scheme !== undefined) {
319
- parsed.scheme = unescape(parsed.scheme)
320
- }
321
- if (parsed.host !== undefined) {
322
- parsed.host = reescapeHostDelimiters(unescape(parsed.host), isIP)
323
- }
324
- }
325
- if (parsed.path) {
326
- parsed.path = normalizePathEncoding(parsed.path)
327
- }
328
- if (parsed.fragment) {
329
- try {
330
- parsed.fragment = encodeURI(decodeURIComponent(parsed.fragment))
331
- } catch {
332
- parsed.error = parsed.error || 'URI malformed'
333
- }
334
- }
335
- }
336
-
337
- // perform scheme specific parsing
338
- if (schemeHandler && schemeHandler.parse) {
339
- schemeHandler.parse(parsed, options)
340
- }
341
- } else {
342
- parsed.error = parsed.error || 'URI can not be parsed.'
343
- }
344
- return { parsed, malformedAuthorityOrPort }
345
- }
346
-
347
- /**
348
- * @param {string} uri
349
- * @param {import('./types/index').Options} [opts]
350
- * @returns
351
- */
352
- function parse (uri, opts) {
353
- return parseWithStatus(uri, opts).parsed
354
- }
355
-
356
- /**
357
- * @param {string} uri
358
- * @param {import('./types/index').Options} [opts]
359
- * @returns {string}
360
- */
361
- function normalizeString (uri, opts) {
362
- return normalizeStringWithStatus(uri, opts).normalized
363
- }
364
-
365
- /**
366
- * @param {string} uri
367
- * @param {import('./types/index').Options} [opts]
368
- * @returns {{ normalized: string, malformedAuthorityOrPort: boolean }}
369
- */
370
- function normalizeStringWithStatus (uri, opts) {
371
- const { parsed, malformedAuthorityOrPort } = parseWithStatus(uri, opts)
372
- return {
373
- normalized: malformedAuthorityOrPort ? uri : serialize(parsed, opts),
374
- malformedAuthorityOrPort
375
- }
376
- }
377
-
378
- /**
379
- * @param {import ('./types/index').URIComponent|string} uri
380
- * @param {import('./types/index').Options} [opts]
381
- * @returns {string|undefined}
382
- */
383
- function normalizeComparableURI (uri, opts) {
384
- if (typeof uri === 'string') {
385
- const { normalized, malformedAuthorityOrPort } = normalizeStringWithStatus(uri, opts)
386
- return malformedAuthorityOrPort ? undefined : normalized
387
- }
388
-
389
- if (typeof uri === 'object') {
390
- return serialize(uri, opts)
391
- }
392
- }
393
-
394
- const fastUri = {
395
- SCHEMES,
396
- normalize,
397
- resolve,
398
- resolveComponent,
399
- equal,
400
- serialize,
401
- parse
402
- }
403
-
404
- module.exports = fastUri
405
- module.exports.default = fastUri
406
- module.exports.fastUri = fastUri
@@ -1,267 +0,0 @@
1
- 'use strict'
2
-
3
- const { isUUID } = require('./utils')
4
- const URN_REG = /([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu
5
-
6
- const supportedSchemeNames = /** @type {const} */ (['http', 'https', 'ws',
7
- 'wss', 'urn', 'urn:uuid'])
8
-
9
- /** @typedef {supportedSchemeNames[number]} SchemeName */
10
-
11
- /**
12
- * @param {string} name
13
- * @returns {name is SchemeName}
14
- */
15
- function isValidSchemeName (name) {
16
- return supportedSchemeNames.indexOf(/** @type {*} */ (name)) !== -1
17
- }
18
-
19
- /**
20
- * @callback SchemeFn
21
- * @param {import('../types/index').URIComponent} component
22
- * @param {import('../types/index').Options} options
23
- * @returns {import('../types/index').URIComponent}
24
- */
25
-
26
- /**
27
- * @typedef {Object} SchemeHandler
28
- * @property {SchemeName} scheme - The scheme name.
29
- * @property {boolean} [domainHost] - Indicates if the scheme supports domain hosts.
30
- * @property {SchemeFn} parse - Function to parse the URI component for this scheme.
31
- * @property {SchemeFn} serialize - Function to serialize the URI component for this scheme.
32
- * @property {boolean} [skipNormalize] - Indicates if normalization should be skipped for this scheme.
33
- * @property {boolean} [absolutePath] - Indicates if the scheme uses absolute paths.
34
- * @property {boolean} [unicodeSupport] - Indicates if the scheme supports Unicode.
35
- */
36
-
37
- /**
38
- * @param {import('../types/index').URIComponent} wsComponent
39
- * @returns {boolean}
40
- */
41
- function wsIsSecure (wsComponent) {
42
- if (wsComponent.secure === true) {
43
- return true
44
- } else if (wsComponent.secure === false) {
45
- return false
46
- } else if (wsComponent.scheme) {
47
- return (
48
- wsComponent.scheme.length === 3 &&
49
- (wsComponent.scheme[0] === 'w' || wsComponent.scheme[0] === 'W') &&
50
- (wsComponent.scheme[1] === 's' || wsComponent.scheme[1] === 'S') &&
51
- (wsComponent.scheme[2] === 's' || wsComponent.scheme[2] === 'S')
52
- )
53
- } else {
54
- return false
55
- }
56
- }
57
-
58
- /** @type {SchemeFn} */
59
- function httpParse (component) {
60
- if (!component.host) {
61
- component.error = component.error || 'HTTP URIs must have a host.'
62
- }
63
-
64
- return component
65
- }
66
-
67
- /** @type {SchemeFn} */
68
- function httpSerialize (component) {
69
- const secure = String(component.scheme).toLowerCase() === 'https'
70
-
71
- // normalize the default port
72
- if (component.port === (secure ? 443 : 80) || component.port === '') {
73
- component.port = undefined
74
- }
75
-
76
- // normalize the empty path
77
- if (!component.path) {
78
- component.path = '/'
79
- }
80
-
81
- // NOTE: We do not parse query strings for HTTP URIs
82
- // as WWW Form Url Encoded query strings are part of the HTML4+ spec,
83
- // and not the HTTP spec.
84
-
85
- return component
86
- }
87
-
88
- /** @type {SchemeFn} */
89
- function wsParse (wsComponent) {
90
- // indicate if the secure flag is set
91
- wsComponent.secure = wsIsSecure(wsComponent)
92
-
93
- // construct resouce name
94
- wsComponent.resourceName = (wsComponent.path || '/') + (wsComponent.query ? '?' + wsComponent.query : '')
95
- wsComponent.path = undefined
96
- wsComponent.query = undefined
97
-
98
- return wsComponent
99
- }
100
-
101
- /** @type {SchemeFn} */
102
- function wsSerialize (wsComponent) {
103
- // normalize the default port
104
- if (wsComponent.port === (wsIsSecure(wsComponent) ? 443 : 80) || wsComponent.port === '') {
105
- wsComponent.port = undefined
106
- }
107
-
108
- // ensure scheme matches secure flag
109
- if (typeof wsComponent.secure === 'boolean') {
110
- wsComponent.scheme = (wsComponent.secure ? 'wss' : 'ws')
111
- wsComponent.secure = undefined
112
- }
113
-
114
- // reconstruct path from resource name
115
- if (wsComponent.resourceName) {
116
- const [path, query] = wsComponent.resourceName.split('?')
117
- wsComponent.path = (path && path !== '/' ? path : undefined)
118
- wsComponent.query = query
119
- wsComponent.resourceName = undefined
120
- }
121
-
122
- // forbid fragment component
123
- wsComponent.fragment = undefined
124
-
125
- return wsComponent
126
- }
127
-
128
- /** @type {SchemeFn} */
129
- function urnParse (urnComponent, options) {
130
- if (!urnComponent.path) {
131
- urnComponent.error = 'URN can not be parsed'
132
- return urnComponent
133
- }
134
- const matches = urnComponent.path.match(URN_REG)
135
- if (matches) {
136
- const scheme = options.scheme || urnComponent.scheme || 'urn'
137
- urnComponent.nid = matches[1].toLowerCase()
138
- urnComponent.nss = matches[2]
139
- const urnScheme = `${scheme}:${options.nid || urnComponent.nid}`
140
- const schemeHandler = getSchemeHandler(urnScheme)
141
- urnComponent.path = undefined
142
-
143
- if (schemeHandler) {
144
- urnComponent = schemeHandler.parse(urnComponent, options)
145
- }
146
- } else {
147
- urnComponent.error = urnComponent.error || 'URN can not be parsed.'
148
- }
149
-
150
- return urnComponent
151
- }
152
-
153
- /** @type {SchemeFn} */
154
- function urnSerialize (urnComponent, options) {
155
- if (urnComponent.nid === undefined) {
156
- throw new Error('URN without nid cannot be serialized')
157
- }
158
- const scheme = options.scheme || urnComponent.scheme || 'urn'
159
- const nid = urnComponent.nid.toLowerCase()
160
- const urnScheme = `${scheme}:${options.nid || nid}`
161
- const schemeHandler = getSchemeHandler(urnScheme)
162
-
163
- if (schemeHandler) {
164
- urnComponent = schemeHandler.serialize(urnComponent, options)
165
- }
166
-
167
- const uriComponent = urnComponent
168
- const nss = urnComponent.nss
169
- uriComponent.path = `${nid || options.nid}:${nss}`
170
-
171
- options.skipEscape = true
172
- return uriComponent
173
- }
174
-
175
- /** @type {SchemeFn} */
176
- function urnuuidParse (urnComponent, options) {
177
- const uuidComponent = urnComponent
178
- uuidComponent.uuid = uuidComponent.nss
179
- uuidComponent.nss = undefined
180
-
181
- if (!options.tolerant && (!uuidComponent.uuid || !isUUID(uuidComponent.uuid))) {
182
- uuidComponent.error = uuidComponent.error || 'UUID is not valid.'
183
- }
184
-
185
- return uuidComponent
186
- }
187
-
188
- /** @type {SchemeFn} */
189
- function urnuuidSerialize (uuidComponent) {
190
- const urnComponent = uuidComponent
191
- // normalize UUID
192
- urnComponent.nss = (uuidComponent.uuid || '').toLowerCase()
193
- return urnComponent
194
- }
195
-
196
- const http = /** @type {SchemeHandler} */ ({
197
- scheme: 'http',
198
- domainHost: true,
199
- parse: httpParse,
200
- serialize: httpSerialize
201
- })
202
-
203
- const https = /** @type {SchemeHandler} */ ({
204
- scheme: 'https',
205
- domainHost: http.domainHost,
206
- parse: httpParse,
207
- serialize: httpSerialize
208
- })
209
-
210
- const ws = /** @type {SchemeHandler} */ ({
211
- scheme: 'ws',
212
- domainHost: true,
213
- parse: wsParse,
214
- serialize: wsSerialize
215
- })
216
-
217
- const wss = /** @type {SchemeHandler} */ ({
218
- scheme: 'wss',
219
- domainHost: ws.domainHost,
220
- parse: ws.parse,
221
- serialize: ws.serialize
222
- })
223
-
224
- const urn = /** @type {SchemeHandler} */ ({
225
- scheme: 'urn',
226
- parse: urnParse,
227
- serialize: urnSerialize,
228
- skipNormalize: true
229
- })
230
-
231
- const urnuuid = /** @type {SchemeHandler} */ ({
232
- scheme: 'urn:uuid',
233
- parse: urnuuidParse,
234
- serialize: urnuuidSerialize,
235
- skipNormalize: true
236
- })
237
-
238
- const SCHEMES = /** @type {Record<SchemeName, SchemeHandler>} */ ({
239
- http,
240
- https,
241
- ws,
242
- wss,
243
- urn,
244
- 'urn:uuid': urnuuid
245
- })
246
-
247
- Object.setPrototypeOf(SCHEMES, null)
248
-
249
- /**
250
- * @param {string|undefined} scheme
251
- * @returns {SchemeHandler|undefined}
252
- */
253
- function getSchemeHandler (scheme) {
254
- return (
255
- scheme && (
256
- SCHEMES[/** @type {SchemeName} */ (scheme)] ||
257
- SCHEMES[/** @type {SchemeName} */(scheme.toLowerCase())])
258
- ) ||
259
- undefined
260
- }
261
-
262
- module.exports = {
263
- wsIsSecure,
264
- SCHEMES,
265
- isValidSchemeName,
266
- getSchemeHandler,
267
- }