@maroonedog/luq 0.1.1-alpha → 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (1283) hide show
  1. package/LICENSE +9 -9
  2. package/README.md +389 -215
  3. package/dist/async/async-context.d.ts +41 -0
  4. package/dist/async/async-context.js +84 -0
  5. package/dist/async/async-context.mjs +79 -0
  6. package/dist/async/async-validator.d.ts +20 -0
  7. package/dist/async/async-validator.js +52 -0
  8. package/dist/async/async-validator.mjs +47 -0
  9. package/dist/async/index.d.ts +4 -0
  10. package/dist/async/index.js +25 -0
  11. package/dist/async/index.mjs +16 -0
  12. package/dist/async.d.ts +1 -0
  13. package/dist/async.js +2 -0
  14. package/dist/async.mjs +1 -0
  15. package/dist/builder/builder-surface.types.d.ts +39 -0
  16. package/dist/builder/builder-surface.types.js +2 -0
  17. package/dist/builder/builder-surface.types.mjs +1 -0
  18. package/dist/builder/compile-declarations.d.ts +4 -0
  19. package/dist/builder/compile-declarations.js +40 -0
  20. package/dist/builder/compile-declarations.mjs +37 -0
  21. package/dist/builder/create-builder.d.ts +16 -0
  22. package/dist/builder/create-builder.js +98 -0
  23. package/dist/builder/create-builder.mjs +92 -0
  24. package/dist/builder/create-field-builder.d.ts +5 -0
  25. package/dist/builder/create-field-builder.js +47 -0
  26. package/dist/builder/create-field-builder.mjs +44 -0
  27. package/dist/builder/create-plan-validator.d.ts +3 -0
  28. package/dist/builder/create-plan-validator.js +15 -0
  29. package/dist/builder/create-plan-validator.mjs +12 -0
  30. package/dist/builder/create-projection-reader.d.ts +3 -0
  31. package/dist/builder/create-projection-reader.js +44 -0
  32. package/dist/builder/create-projection-reader.mjs +41 -0
  33. package/dist/builder/create-subset-validator.d.ts +3 -0
  34. package/dist/builder/create-subset-validator.js +40 -0
  35. package/dist/builder/create-subset-validator.mjs +37 -0
  36. package/dist/builder/field-builder.types.d.ts +43 -0
  37. package/dist/builder/field-builder.types.js +11 -0
  38. package/dist/builder/field-builder.types.mjs +8 -0
  39. package/dist/builder/field-entry.types.d.ts +10 -0
  40. package/dist/builder/field-entry.types.js +2 -0
  41. package/dist/builder/field-entry.types.mjs +1 -0
  42. package/dist/builder/field-options.types.d.ts +11 -0
  43. package/dist/builder/field-options.types.js +13 -0
  44. package/dist/builder/field-options.types.mjs +12 -0
  45. package/dist/builder/global-config-store.d.ts +4 -0
  46. package/dist/builder/global-config-store.js +29 -0
  47. package/dist/builder/global-config-store.mjs +24 -0
  48. package/dist/builder/index.d.ts +6 -0
  49. package/dist/builder/index.js +17 -0
  50. package/dist/builder/index.mjs +8 -0
  51. package/dist/builder/resolve-field-default.d.ts +14 -0
  52. package/dist/builder/resolve-field-default.js +50 -0
  53. package/dist/builder/resolve-field-default.mjs +47 -0
  54. package/dist/builder/validator.types.d.ts +28 -0
  55. package/dist/builder/validator.types.js +2 -0
  56. package/dist/builder/validator.types.mjs +1 -0
  57. package/dist/chain/attach-slot-methods.d.ts +17 -0
  58. package/dist/chain/attach-slot-methods.js +47 -0
  59. package/dist/chain/attach-slot-methods.mjs +42 -0
  60. package/dist/chain/chain-method.types.d.ts +16 -0
  61. package/dist/chain/chain-method.types.js +2 -0
  62. package/dist/chain/chain-method.types.mjs +1 -0
  63. package/dist/chain/chain-state.types.d.ts +47 -0
  64. package/dist/chain/chain-state.types.js +2 -0
  65. package/dist/chain/chain-state.types.mjs +1 -0
  66. package/dist/chain/collect-branch-rules.d.ts +18 -0
  67. package/dist/chain/collect-branch-rules.js +71 -0
  68. package/dist/chain/collect-branch-rules.mjs +65 -0
  69. package/dist/chain/collect-field-rules.d.ts +10 -0
  70. package/dist/chain/collect-field-rules.js +22 -0
  71. package/dist/chain/collect-field-rules.mjs +17 -0
  72. package/dist/chain/create-chain-node.d.ts +26 -0
  73. package/dist/chain/create-chain-node.js +82 -0
  74. package/dist/chain/create-chain-node.mjs +77 -0
  75. package/dist/chain/create-field-slots.d.ts +6 -0
  76. package/dist/chain/create-field-slots.js +37 -0
  77. package/dist/chain/create-field-slots.mjs +33 -0
  78. package/dist/chain/field-chain.types.d.ts +25 -0
  79. package/dist/chain/field-chain.types.js +2 -0
  80. package/dist/chain/field-chain.types.mjs +1 -0
  81. package/dist/chain/field-slots.types.d.ts +18 -0
  82. package/dist/chain/field-slots.types.js +2 -0
  83. package/dist/chain/field-slots.types.mjs +1 -0
  84. package/dist/chain/index.d.ts +13 -0
  85. package/dist/chain/index.js +26 -0
  86. package/dist/chain/index.mjs +9 -0
  87. package/dist/chain/marker-coverage.types.d.ts +56 -0
  88. package/dist/chain/marker-coverage.types.js +2 -0
  89. package/dist/chain/marker-coverage.types.mjs +1 -0
  90. package/dist/chain/plugin-bag.types.d.ts +9 -0
  91. package/dist/chain/plugin-bag.types.js +2 -0
  92. package/dist/chain/plugin-bag.types.mjs +1 -0
  93. package/dist/chain/refine-methods.types.d.ts +33 -0
  94. package/dist/chain/refine-methods.types.js +14 -0
  95. package/dist/chain/refine-methods.types.mjs +11 -0
  96. package/dist/chain/resolve-args.types.d.ts +28 -0
  97. package/dist/chain/resolve-args.types.js +2 -0
  98. package/dist/chain/resolve-args.types.mjs +1 -0
  99. package/dist/chain/slot-value.types.d.ts +14 -0
  100. package/dist/chain/slot-value.types.js +2 -0
  101. package/dist/chain/slot-value.types.mjs +1 -0
  102. package/dist/compile/branch-executor.port.d.ts +6 -0
  103. package/dist/compile/branch-executor.port.js +2 -0
  104. package/dist/compile/branch-executor.port.mjs +1 -0
  105. package/dist/compile/compile-array-node.d.ts +19 -0
  106. package/dist/compile/compile-array-node.js +50 -0
  107. package/dist/compile/compile-array-node.mjs +46 -0
  108. package/dist/compile/compile-composite.d.ts +18 -0
  109. package/dist/compile/compile-composite.js +30 -0
  110. package/dist/compile/compile-composite.mjs +27 -0
  111. package/dist/compile/compile-field.d.ts +31 -0
  112. package/dist/compile/compile-field.js +67 -0
  113. package/dist/compile/compile-field.mjs +62 -0
  114. package/dist/compile/compile-schema.d.ts +8 -0
  115. package/dist/compile/compile-schema.js +126 -0
  116. package/dist/compile/compile-schema.mjs +121 -0
  117. package/dist/compile/declared-child-keys.d.ts +15 -0
  118. package/dist/compile/declared-child-keys.js +70 -0
  119. package/dist/compile/declared-child-keys.mjs +66 -0
  120. package/dist/compile/group-array-fields.d.ts +39 -0
  121. package/dist/compile/group-array-fields.js +66 -0
  122. package/dist/compile/group-array-fields.mjs +63 -0
  123. package/dist/compile/index.d.ts +18 -0
  124. package/dist/compile/index.js +33 -0
  125. package/dist/compile/index.mjs +10 -0
  126. package/dist/compile/resolve-conditional-presence.d.ts +5 -0
  127. package/dist/compile/resolve-conditional-presence.js +41 -0
  128. package/dist/compile/resolve-conditional-presence.mjs +37 -0
  129. package/dist/compile/resolve-presence.d.ts +6 -0
  130. package/dist/compile/resolve-presence.js +59 -0
  131. package/dist/compile/resolve-presence.mjs +55 -0
  132. package/dist/compile/resolve-recursion.d.ts +10 -0
  133. package/dist/compile/resolve-recursion.js +33 -0
  134. package/dist/compile/resolve-recursion.mjs +28 -0
  135. package/dist/compile/split-rules-by-kind.d.ts +16 -0
  136. package/dist/compile/split-rules-by-kind.js +61 -0
  137. package/dist/compile/split-rules-by-kind.mjs +56 -0
  138. package/dist/compile/validation-plan.types.d.ts +113 -0
  139. package/dist/compile/validation-plan.types.js +2 -0
  140. package/dist/compile/validation-plan.types.mjs +1 -0
  141. package/dist/core/type-erasure.d.ts +42 -0
  142. package/dist/core/type-erasure.js +63 -0
  143. package/dist/core/type-erasure.mjs +57 -0
  144. package/dist/field-rule/create-field-rule.d.ts +11 -0
  145. package/dist/field-rule/create-field-rule.js +50 -0
  146. package/dist/field-rule/create-field-rule.mjs +46 -0
  147. package/dist/field-rule/create-plugin-registry.d.ts +2 -0
  148. package/dist/field-rule/create-plugin-registry.js +60 -0
  149. package/dist/field-rule/create-plugin-registry.mjs +57 -0
  150. package/dist/field-rule/field-rule.types.d.ts +38 -0
  151. package/dist/field-rule/field-rule.types.js +2 -0
  152. package/dist/field-rule/field-rule.types.mjs +1 -0
  153. package/dist/field-rule/index.d.ts +5 -0
  154. package/dist/field-rule/index.js +13 -0
  155. package/dist/field-rule/index.mjs +6 -0
  156. package/dist/field-rule/plugin-registry.types.d.ts +17 -0
  157. package/dist/field-rule/plugin-registry.types.js +2 -0
  158. package/dist/field-rule/plugin-registry.types.mjs +1 -0
  159. package/dist/field-rule/use-field.d.ts +6 -0
  160. package/dist/field-rule/use-field.js +6 -0
  161. package/dist/field-rule/use-field.mjs +3 -0
  162. package/dist/field-rule.d.ts +1 -0
  163. package/dist/field-rule.js +2 -0
  164. package/dist/field-rule.mjs +1 -0
  165. package/dist/index.d.ts +14 -72
  166. package/dist/index.js +48 -2
  167. package/dist/index.mjs +18 -2
  168. package/dist/json-schema/apply-keyword-binding.d.ts +20 -0
  169. package/dist/json-schema/apply-keyword-binding.js +7 -0
  170. package/dist/json-schema/apply-keyword-binding.mjs +4 -0
  171. package/dist/json-schema/bind-keyword.d.ts +7 -0
  172. package/dist/json-schema/bind-keyword.js +21 -0
  173. package/dist/json-schema/bind-keyword.mjs +16 -0
  174. package/dist/json-schema/build-from-schema.d.ts +23 -0
  175. package/dist/json-schema/build-from-schema.js +64 -0
  176. package/dist/json-schema/build-from-schema.mjs +57 -0
  177. package/dist/json-schema/collect-definitions.d.ts +21 -0
  178. package/dist/json-schema/collect-definitions.js +67 -0
  179. package/dist/json-schema/collect-definitions.mjs +59 -0
  180. package/dist/json-schema/collect-sub-schema-rules.d.ts +6 -0
  181. package/dist/json-schema/collect-sub-schema-rules.js +82 -0
  182. package/dist/json-schema/collect-sub-schema-rules.mjs +78 -0
  183. package/dist/json-schema/compose-conditional.d.ts +4 -0
  184. package/dist/json-schema/compose-conditional.js +17 -0
  185. package/dist/json-schema/compose-conditional.mjs +14 -0
  186. package/dist/json-schema/compose-keyword.d.ts +7 -0
  187. package/dist/json-schema/compose-keyword.js +127 -0
  188. package/dist/json-schema/compose-keyword.mjs +121 -0
  189. package/dist/json-schema/create-structural-context.d.ts +10 -0
  190. package/dist/json-schema/create-structural-context.js +51 -0
  191. package/dist/json-schema/create-structural-context.mjs +48 -0
  192. package/dist/json-schema/declare-object-keywords.d.ts +24 -0
  193. package/dist/json-schema/declare-object-keywords.js +140 -0
  194. package/dist/json-schema/declare-object-keywords.mjs +132 -0
  195. package/dist/json-schema/declare-presence.d.ts +12 -0
  196. package/dist/json-schema/declare-presence.js +46 -0
  197. package/dist/json-schema/declare-presence.mjs +43 -0
  198. package/dist/json-schema/declare-required-properties.d.ts +18 -0
  199. package/dist/json-schema/declare-required-properties.js +58 -0
  200. package/dist/json-schema/declare-required-properties.mjs +55 -0
  201. package/dist/json-schema/declare-scalar-keywords.d.ts +11 -0
  202. package/dist/json-schema/declare-scalar-keywords.js +110 -0
  203. package/dist/json-schema/declare-scalar-keywords.mjs +105 -0
  204. package/dist/json-schema/declare-value-keywords.d.ts +23 -0
  205. package/dist/json-schema/declare-value-keywords.js +120 -0
  206. package/dist/json-schema/declare-value-keywords.mjs +112 -0
  207. package/dist/json-schema/draft07-keyword-value.types.d.ts +61 -0
  208. package/dist/json-schema/draft07-keyword-value.types.js +2 -0
  209. package/dist/json-schema/draft07-keyword-value.types.mjs +1 -0
  210. package/dist/json-schema/draft07.types.d.ts +57 -0
  211. package/dist/json-schema/draft07.types.js +28 -0
  212. package/dist/json-schema/draft07.types.mjs +24 -0
  213. package/dist/json-schema/extensions/json-schema/index.d.ts +3 -0
  214. package/dist/json-schema/extensions/json-schema/index.js +27 -0
  215. package/dist/json-schema/extensions/json-schema/index.mjs +11 -0
  216. package/dist/json-schema/extensions/json-schema/json-schema.d.ts +18 -0
  217. package/dist/json-schema/extensions/json-schema/json-schema.js +100 -0
  218. package/dist/json-schema/extensions/json-schema/json-schema.mjs +96 -0
  219. package/dist/json-schema/extensions/json-schema-full-feature/bundle-coverage.d.ts +38 -0
  220. package/dist/json-schema/extensions/json-schema-full-feature/bundle-coverage.js +96 -0
  221. package/dist/json-schema/extensions/json-schema-full-feature/bundle-coverage.mjs +89 -0
  222. package/dist/json-schema/extensions/json-schema-full-feature/bundled-plugins.d.ts +7 -0
  223. package/dist/json-schema/extensions/json-schema-full-feature/bundled-plugins.js +107 -0
  224. package/dist/json-schema/extensions/json-schema-full-feature/bundled-plugins.mjs +104 -0
  225. package/dist/json-schema/extensions/json-schema-full-feature/index.d.ts +4 -0
  226. package/dist/json-schema/extensions/json-schema-full-feature/index.js +25 -0
  227. package/dist/json-schema/extensions/json-schema-full-feature/index.mjs +14 -0
  228. package/dist/json-schema/extensions/json-schema-full-feature/json-schema-full-feature.d.ts +23 -0
  229. package/dist/json-schema/extensions/json-schema-full-feature/json-schema-full-feature.js +64 -0
  230. package/dist/json-schema/extensions/json-schema-full-feature/json-schema-full-feature.mjs +60 -0
  231. package/dist/json-schema/flatten-array-schema.d.ts +25 -0
  232. package/dist/json-schema/flatten-array-schema.js +141 -0
  233. package/dist/json-schema/flatten-array-schema.mjs +134 -0
  234. package/dist/json-schema/flatten-schema.d.ts +20 -0
  235. package/dist/json-schema/flatten-schema.js +162 -0
  236. package/dist/json-schema/flatten-schema.mjs +157 -0
  237. package/dist/json-schema/format-map.d.ts +20 -0
  238. package/dist/json-schema/format-map.js +89 -0
  239. package/dist/json-schema/format-map.mjs +84 -0
  240. package/dist/json-schema/index.d.ts +19 -0
  241. package/dist/json-schema/index.js +57 -0
  242. package/dist/json-schema/index.mjs +19 -0
  243. package/dist/json-schema/json-schema-bag.types.d.ts +124 -0
  244. package/dist/json-schema/json-schema-bag.types.js +2 -0
  245. package/dist/json-schema/json-schema-bag.types.mjs +1 -0
  246. package/dist/json-schema/keyword-binding.types.d.ts +50 -0
  247. package/dist/json-schema/keyword-binding.types.js +2 -0
  248. package/dist/json-schema/keyword-binding.types.mjs +1 -0
  249. package/dist/json-schema/keyword-map-array.d.ts +13 -0
  250. package/dist/json-schema/keyword-map-array.js +37 -0
  251. package/dist/json-schema/keyword-map-array.mjs +34 -0
  252. package/dist/json-schema/keyword-map-core.d.ts +8 -0
  253. package/dist/json-schema/keyword-map-core.js +54 -0
  254. package/dist/json-schema/keyword-map-core.mjs +51 -0
  255. package/dist/json-schema/keyword-map-number.d.ts +13 -0
  256. package/dist/json-schema/keyword-map-number.js +33 -0
  257. package/dist/json-schema/keyword-map-number.mjs +30 -0
  258. package/dist/json-schema/keyword-map-object.d.ts +17 -0
  259. package/dist/json-schema/keyword-map-object.js +51 -0
  260. package/dist/json-schema/keyword-map-object.mjs +48 -0
  261. package/dist/json-schema/keyword-map-string.d.ts +20 -0
  262. package/dist/json-schema/keyword-map-string.js +44 -0
  263. package/dist/json-schema/keyword-map-string.mjs +41 -0
  264. package/dist/json-schema/keyword-map.d.ts +32 -0
  265. package/dist/json-schema/keyword-map.js +93 -0
  266. package/dist/json-schema/keyword-map.mjs +84 -0
  267. package/dist/json-schema/resolve-ref.d.ts +16 -0
  268. package/dist/json-schema/resolve-ref.js +103 -0
  269. package/dist/json-schema/resolve-ref.mjs +97 -0
  270. package/dist/json-schema/schema-to-declarations.d.ts +9 -0
  271. package/dist/json-schema/schema-to-declarations.js +122 -0
  272. package/dist/json-schema/schema-to-declarations.mjs +116 -0
  273. package/dist/json-schema/structural-expansion.types.d.ts +83 -0
  274. package/dist/json-schema/structural-expansion.types.js +22 -0
  275. package/dist/json-schema/structural-expansion.types.mjs +18 -0
  276. package/dist/json-schema/unsupported-keyword-error.d.ts +5 -0
  277. package/dist/json-schema/unsupported-keyword-error.js +24 -0
  278. package/dist/json-schema/unsupported-keyword-error.mjs +20 -0
  279. package/dist/path/create-array-reader.d.ts +13 -0
  280. package/dist/path/create-array-reader.js +22 -0
  281. package/dist/path/create-array-reader.mjs +19 -0
  282. package/dist/path/create-value-reader.d.ts +26 -0
  283. package/dist/path/create-value-reader.js +71 -0
  284. package/dist/path/create-value-reader.mjs +65 -0
  285. package/dist/path/create-value-writer.d.ts +5 -0
  286. package/dist/path/create-value-writer.js +55 -0
  287. package/dist/path/create-value-writer.mjs +52 -0
  288. package/dist/path/element-of.types.d.ts +1 -0
  289. package/dist/path/element-of.types.js +2 -0
  290. package/dist/path/element-of.types.mjs +1 -0
  291. package/dist/path/field-path.types.d.ts +13 -0
  292. package/dist/path/field-path.types.js +2 -0
  293. package/dist/path/field-path.types.mjs +1 -0
  294. package/dist/path/format-issue-path.d.ts +15 -0
  295. package/dist/path/format-issue-path.js +34 -0
  296. package/dist/path/format-issue-path.mjs +31 -0
  297. package/dist/path/index.d.ts +18 -0
  298. package/dist/path/index.js +26 -0
  299. package/dist/path/index.mjs +7 -0
  300. package/dist/path/leaf-path.types.d.ts +16 -0
  301. package/dist/path/leaf-path.types.js +2 -0
  302. package/dist/path/leaf-path.types.mjs +1 -0
  303. package/dist/path/match-path-pattern.d.ts +9 -0
  304. package/dist/path/match-path-pattern.js +66 -0
  305. package/dist/path/match-path-pattern.mjs +63 -0
  306. package/dist/path/opaque-object.types.d.ts +5 -0
  307. package/dist/path/opaque-object.types.js +2 -0
  308. package/dist/path/opaque-object.types.mjs +1 -0
  309. package/dist/path/parse-field-path.d.ts +25 -0
  310. package/dist/path/parse-field-path.js +75 -0
  311. package/dist/path/parse-field-path.mjs +69 -0
  312. package/dist/path/path-depth.types.d.ts +4 -0
  313. package/dist/path/path-depth.types.js +2 -0
  314. package/dist/path/path-depth.types.mjs +1 -0
  315. package/dist/path/path-segment.types.d.ts +27 -0
  316. package/dist/path/path-segment.types.js +2 -0
  317. package/dist/path/path-segment.types.mjs +1 -0
  318. package/dist/path/property-value-of.types.d.ts +2 -0
  319. package/dist/path/property-value-of.types.js +2 -0
  320. package/dist/path/property-value-of.types.mjs +1 -0
  321. package/dist/path/reserved-segment.d.ts +28 -0
  322. package/dist/path/reserved-segment.js +68 -0
  323. package/dist/path/reserved-segment.mjs +62 -0
  324. package/dist/path/value-at-path.types.d.ts +25 -0
  325. package/dist/path/value-at-path.types.js +2 -0
  326. package/dist/path/value-at-path.types.mjs +1 -0
  327. package/dist/plugin-kit/compiled-rule.d.ts +99 -0
  328. package/dist/plugin-kit/compiled-rule.js +2 -0
  329. package/dist/plugin-kit/compiled-rule.mjs +1 -0
  330. package/dist/plugin-kit/create-conditional-presence.d.ts +25 -0
  331. package/dist/plugin-kit/create-conditional-presence.js +32 -0
  332. package/dist/plugin-kit/create-conditional-presence.mjs +28 -0
  333. package/dist/plugin-kit/create-rule.d.ts +48 -0
  334. package/dist/plugin-kit/create-rule.js +67 -0
  335. package/dist/plugin-kit/create-rule.mjs +57 -0
  336. package/dist/plugin-kit/external-context.d.ts +2 -0
  337. package/dist/plugin-kit/external-context.js +25 -0
  338. package/dist/plugin-kit/external-context.mjs +22 -0
  339. package/dist/plugin-kit/index.d.ts +11 -0
  340. package/dist/plugin-kit/index.js +39 -0
  341. package/dist/plugin-kit/index.mjs +23 -0
  342. package/dist/plugin-kit/is-json-value-equal.d.ts +10 -0
  343. package/dist/plugin-kit/is-json-value-equal.js +81 -0
  344. package/dist/plugin-kit/is-json-value-equal.mjs +77 -0
  345. package/dist/plugin-kit/marker.types.d.ts +114 -0
  346. package/dist/plugin-kit/marker.types.js +2 -0
  347. package/dist/plugin-kit/marker.types.mjs +1 -0
  348. package/dist/plugin-kit/plugin-definition.d.ts +40 -0
  349. package/dist/plugin-kit/plugin-definition.js +25 -0
  350. package/dist/plugin-kit/plugin-definition.mjs +20 -0
  351. package/dist/plugin-kit/rule-build-context.d.ts +27 -0
  352. package/dist/plugin-kit/rule-build-context.js +8 -0
  353. package/dist/plugin-kit/rule-build-context.mjs +5 -0
  354. package/dist/plugin-kit/runtime-args.types.d.ts +27 -0
  355. package/dist/plugin-kit/runtime-args.types.js +2 -0
  356. package/dist/plugin-kit/runtime-args.types.mjs +1 -0
  357. package/dist/plugin-kit.d.ts +1 -0
  358. package/dist/plugin-kit.js +2 -0
  359. package/dist/plugin-kit.mjs +1 -0
  360. package/dist/plugins/array-contains/array-contains.d.ts +22 -0
  361. package/dist/plugins/array-contains/array-contains.js +82 -0
  362. package/dist/plugins/array-contains/array-contains.mjs +79 -0
  363. package/dist/plugins/array-contains/index.d.ts +2 -0
  364. package/dist/plugins/array-contains/index.js +5 -0
  365. package/dist/plugins/array-contains/index.mjs +1 -0
  366. package/dist/plugins/array-each/array-each.d.ts +14 -0
  367. package/dist/plugins/array-each/array-each.js +51 -0
  368. package/dist/plugins/array-each/array-each.mjs +48 -0
  369. package/dist/plugins/array-each/index.d.ts +1 -0
  370. package/dist/plugins/array-each/index.js +5 -0
  371. package/dist/plugins/array-each/index.mjs +1 -0
  372. package/dist/plugins/array-includes/array-includes.d.ts +9 -0
  373. package/dist/plugins/array-includes/array-includes.js +26 -0
  374. package/dist/plugins/array-includes/array-includes.mjs +23 -0
  375. package/dist/plugins/array-includes/index.d.ts +2 -0
  376. package/dist/plugins/array-includes/index.js +5 -0
  377. package/dist/plugins/array-includes/index.mjs +1 -0
  378. package/dist/plugins/array-max-length/array-max-length.d.ts +10 -0
  379. package/dist/plugins/array-max-length/array-max-length.js +29 -0
  380. package/dist/plugins/array-max-length/array-max-length.mjs +26 -0
  381. package/dist/plugins/array-max-length/index.d.ts +2 -0
  382. package/dist/plugins/array-max-length/index.js +5 -0
  383. package/dist/plugins/array-max-length/index.mjs +1 -0
  384. package/dist/plugins/array-min-length/array-min-length.d.ts +10 -0
  385. package/dist/plugins/array-min-length/array-min-length.js +29 -0
  386. package/dist/plugins/array-min-length/array-min-length.mjs +26 -0
  387. package/dist/plugins/array-min-length/index.d.ts +2 -0
  388. package/dist/plugins/array-min-length/index.js +5 -0
  389. package/dist/plugins/array-min-length/index.mjs +1 -0
  390. package/dist/plugins/array-unique/array-unique.d.ts +7 -0
  391. package/dist/plugins/array-unique/array-unique.js +54 -0
  392. package/dist/plugins/array-unique/array-unique.mjs +51 -0
  393. package/dist/plugins/array-unique/index.d.ts +1 -0
  394. package/dist/plugins/array-unique/index.js +5 -0
  395. package/dist/plugins/array-unique/index.mjs +1 -0
  396. package/dist/plugins/arrayContains.d.ts +1 -37
  397. package/dist/plugins/arrayContains.js +2 -1
  398. package/dist/plugins/arrayContains.mjs +1 -1
  399. package/dist/plugins/arrayEach.d.ts +1 -0
  400. package/dist/plugins/arrayEach.js +2 -0
  401. package/dist/plugins/arrayEach.mjs +1 -0
  402. package/dist/plugins/arrayIncludes.d.ts +1 -42
  403. package/dist/plugins/arrayIncludes.js +2 -1
  404. package/dist/plugins/arrayIncludes.mjs +1 -1
  405. package/dist/plugins/arrayMaxLength.d.ts +1 -43
  406. package/dist/plugins/arrayMaxLength.js +2 -1
  407. package/dist/plugins/arrayMaxLength.mjs +1 -1
  408. package/dist/plugins/arrayMinLength.d.ts +1 -43
  409. package/dist/plugins/arrayMinLength.js +2 -1
  410. package/dist/plugins/arrayMinLength.mjs +1 -1
  411. package/dist/plugins/arrayUnique.d.ts +1 -41
  412. package/dist/plugins/arrayUnique.js +2 -1
  413. package/dist/plugins/arrayUnique.mjs +1 -1
  414. package/dist/plugins/boolean-falsy/boolean-falsy.d.ts +7 -0
  415. package/dist/plugins/boolean-falsy/boolean-falsy.js +24 -0
  416. package/dist/plugins/boolean-falsy/boolean-falsy.mjs +21 -0
  417. package/dist/plugins/boolean-falsy/index.d.ts +1 -0
  418. package/dist/plugins/boolean-falsy/index.js +5 -0
  419. package/dist/plugins/boolean-falsy/index.mjs +1 -0
  420. package/dist/plugins/boolean-truthy/boolean-truthy.d.ts +7 -0
  421. package/dist/plugins/boolean-truthy/boolean-truthy.js +24 -0
  422. package/dist/plugins/boolean-truthy/boolean-truthy.mjs +21 -0
  423. package/dist/plugins/boolean-truthy/index.d.ts +1 -0
  424. package/dist/plugins/boolean-truthy/index.js +5 -0
  425. package/dist/plugins/boolean-truthy/index.mjs +1 -0
  426. package/dist/plugins/booleanFalsy.d.ts +1 -41
  427. package/dist/plugins/booleanFalsy.js +2 -1
  428. package/dist/plugins/booleanFalsy.mjs +1 -1
  429. package/dist/plugins/booleanTruthy.d.ts +1 -38
  430. package/dist/plugins/booleanTruthy.js +2 -1
  431. package/dist/plugins/booleanTruthy.mjs +1 -1
  432. package/dist/plugins/compare-field/compare-field.d.ts +13 -0
  433. package/dist/plugins/compare-field/compare-field.js +57 -0
  434. package/dist/plugins/compare-field/compare-field.mjs +54 -0
  435. package/dist/plugins/compare-field/index.d.ts +2 -0
  436. package/dist/plugins/compare-field/index.js +5 -0
  437. package/dist/plugins/compare-field/index.mjs +1 -0
  438. package/dist/plugins/compareField.d.ts +1 -58
  439. package/dist/plugins/compareField.js +2 -1
  440. package/dist/plugins/compareField.mjs +1 -1
  441. package/dist/plugins/conditional-schema/conditional-schema.d.ts +17 -0
  442. package/dist/plugins/conditional-schema/conditional-schema.js +87 -0
  443. package/dist/plugins/conditional-schema/conditional-schema.mjs +84 -0
  444. package/dist/plugins/conditional-schema/index.d.ts +2 -0
  445. package/dist/plugins/conditional-schema/index.js +5 -0
  446. package/dist/plugins/conditional-schema/index.mjs +1 -0
  447. package/dist/plugins/conditionalSchema.d.ts +1 -0
  448. package/dist/plugins/conditionalSchema.js +2 -0
  449. package/dist/plugins/conditionalSchema.mjs +1 -0
  450. package/dist/plugins/custom/custom.d.ts +12 -0
  451. package/dist/plugins/custom/custom.js +82 -0
  452. package/dist/plugins/custom/custom.mjs +79 -0
  453. package/dist/plugins/custom/index.d.ts +1 -0
  454. package/dist/plugins/custom/index.js +5 -0
  455. package/dist/plugins/custom/index.mjs +1 -0
  456. package/dist/plugins/custom.d.ts +1 -60
  457. package/dist/plugins/custom.js +2 -1
  458. package/dist/plugins/custom.mjs +1 -1
  459. package/dist/plugins/from-context/from-context.d.ts +28 -0
  460. package/dist/plugins/from-context/from-context.js +84 -0
  461. package/dist/plugins/from-context/from-context.mjs +81 -0
  462. package/dist/plugins/from-context/index.d.ts +2 -0
  463. package/dist/plugins/from-context/index.js +5 -0
  464. package/dist/plugins/from-context/index.mjs +1 -0
  465. package/dist/plugins/fromContext.d.ts +1 -0
  466. package/dist/plugins/fromContext.js +2 -0
  467. package/dist/plugins/fromContext.mjs +1 -0
  468. package/dist/plugins/index.d.ts +1 -0
  469. package/dist/plugins/index.generated.d.ts +77 -0
  470. package/dist/plugins/index.generated.js +160 -0
  471. package/dist/plugins/index.generated.mjs +79 -0
  472. package/dist/plugins/index.js +2 -0
  473. package/dist/plugins/index.mjs +1 -0
  474. package/dist/plugins/jsonSchema.d.ts +1 -11
  475. package/dist/plugins/jsonSchema.js +2 -1
  476. package/dist/plugins/jsonSchema.mjs +1 -1
  477. package/dist/plugins/jsonSchemaFullFeature.d.ts +1 -31
  478. package/dist/plugins/jsonSchemaFullFeature.js +2 -1
  479. package/dist/plugins/jsonSchemaFullFeature.mjs +1 -1
  480. package/dist/plugins/literal/index.d.ts +1 -0
  481. package/dist/plugins/literal/index.js +5 -0
  482. package/dist/plugins/literal/index.mjs +1 -0
  483. package/dist/plugins/literal/literal.d.ts +10 -0
  484. package/dist/plugins/literal/literal.js +53 -0
  485. package/dist/plugins/literal/literal.mjs +50 -0
  486. package/dist/plugins/literal.d.ts +1 -40
  487. package/dist/plugins/literal.js +2 -1
  488. package/dist/plugins/literal.mjs +1 -1
  489. package/dist/plugins/manifest.generated.d.ts +8 -0
  490. package/dist/plugins/manifest.generated.js +83 -0
  491. package/dist/plugins/manifest.generated.mjs +80 -0
  492. package/dist/plugins/nullable/index.d.ts +1 -0
  493. package/dist/plugins/nullable/index.js +5 -0
  494. package/dist/plugins/nullable/index.mjs +1 -0
  495. package/dist/plugins/nullable/nullable.d.ts +7 -0
  496. package/dist/plugins/nullable/nullable.js +39 -0
  497. package/dist/plugins/nullable/nullable.mjs +36 -0
  498. package/dist/plugins/nullable.d.ts +1 -34
  499. package/dist/plugins/nullable.js +2 -1
  500. package/dist/plugins/nullable.mjs +1 -1
  501. package/dist/plugins/number-finite/index.d.ts +1 -0
  502. package/dist/plugins/number-finite/index.js +5 -0
  503. package/dist/plugins/number-finite/index.mjs +1 -0
  504. package/dist/plugins/number-finite/number-finite.d.ts +7 -0
  505. package/dist/plugins/number-finite/number-finite.js +21 -0
  506. package/dist/plugins/number-finite/number-finite.mjs +18 -0
  507. package/dist/plugins/number-integer/index.d.ts +1 -0
  508. package/dist/plugins/number-integer/index.js +5 -0
  509. package/dist/plugins/number-integer/index.mjs +1 -0
  510. package/dist/plugins/number-integer/number-integer.d.ts +7 -0
  511. package/dist/plugins/number-integer/number-integer.js +21 -0
  512. package/dist/plugins/number-integer/number-integer.mjs +18 -0
  513. package/dist/plugins/number-max/index.d.ts +2 -0
  514. package/dist/plugins/number-max/index.js +5 -0
  515. package/dist/plugins/number-max/index.mjs +1 -0
  516. package/dist/plugins/number-max/number-max.d.ts +11 -0
  517. package/dist/plugins/number-max/number-max.js +36 -0
  518. package/dist/plugins/number-max/number-max.mjs +33 -0
  519. package/dist/plugins/number-min/index.d.ts +2 -0
  520. package/dist/plugins/number-min/index.js +5 -0
  521. package/dist/plugins/number-min/index.mjs +1 -0
  522. package/dist/plugins/number-min/number-min.d.ts +11 -0
  523. package/dist/plugins/number-min/number-min.js +38 -0
  524. package/dist/plugins/number-min/number-min.mjs +35 -0
  525. package/dist/plugins/number-multiple-of/index.d.ts +2 -0
  526. package/dist/plugins/number-multiple-of/index.js +5 -0
  527. package/dist/plugins/number-multiple-of/index.mjs +1 -0
  528. package/dist/plugins/number-multiple-of/is-multiple-of.d.ts +7 -0
  529. package/dist/plugins/number-multiple-of/is-multiple-of.js +61 -0
  530. package/dist/plugins/number-multiple-of/is-multiple-of.mjs +57 -0
  531. package/dist/plugins/number-multiple-of/number-multiple-of.d.ts +9 -0
  532. package/dist/plugins/number-multiple-of/number-multiple-of.js +27 -0
  533. package/dist/plugins/number-multiple-of/number-multiple-of.mjs +24 -0
  534. package/dist/plugins/number-negative/index.d.ts +1 -0
  535. package/dist/plugins/number-negative/index.js +5 -0
  536. package/dist/plugins/number-negative/index.mjs +1 -0
  537. package/dist/plugins/number-negative/number-negative.d.ts +7 -0
  538. package/dist/plugins/number-negative/number-negative.js +21 -0
  539. package/dist/plugins/number-negative/number-negative.mjs +18 -0
  540. package/dist/plugins/number-positive/index.d.ts +1 -0
  541. package/dist/plugins/number-positive/index.js +5 -0
  542. package/dist/plugins/number-positive/index.mjs +1 -0
  543. package/dist/plugins/number-positive/number-positive.d.ts +7 -0
  544. package/dist/plugins/number-positive/number-positive.js +21 -0
  545. package/dist/plugins/number-positive/number-positive.mjs +18 -0
  546. package/dist/plugins/number-range/index.d.ts +2 -0
  547. package/dist/plugins/number-range/index.js +5 -0
  548. package/dist/plugins/number-range/index.mjs +1 -0
  549. package/dist/plugins/number-range/number-range.d.ts +11 -0
  550. package/dist/plugins/number-range/number-range.js +39 -0
  551. package/dist/plugins/number-range/number-range.mjs +36 -0
  552. package/dist/plugins/numberFinite.d.ts +1 -0
  553. package/dist/plugins/numberFinite.js +2 -0
  554. package/dist/plugins/numberFinite.mjs +1 -0
  555. package/dist/plugins/numberInteger.d.ts +1 -41
  556. package/dist/plugins/numberInteger.js +2 -1
  557. package/dist/plugins/numberInteger.mjs +1 -1
  558. package/dist/plugins/numberMax.d.ts +1 -49
  559. package/dist/plugins/numberMax.js +2 -1
  560. package/dist/plugins/numberMax.mjs +1 -1
  561. package/dist/plugins/numberMin.d.ts +1 -49
  562. package/dist/plugins/numberMin.js +2 -1
  563. package/dist/plugins/numberMin.mjs +1 -1
  564. package/dist/plugins/numberMultipleOf.d.ts +1 -42
  565. package/dist/plugins/numberMultipleOf.js +2 -1
  566. package/dist/plugins/numberMultipleOf.mjs +1 -1
  567. package/dist/plugins/numberNegative.d.ts +1 -41
  568. package/dist/plugins/numberNegative.js +2 -1
  569. package/dist/plugins/numberNegative.mjs +1 -1
  570. package/dist/plugins/numberPositive.d.ts +1 -41
  571. package/dist/plugins/numberPositive.js +2 -1
  572. package/dist/plugins/numberPositive.mjs +1 -1
  573. package/dist/plugins/numberRange.d.ts +1 -0
  574. package/dist/plugins/numberRange.js +2 -0
  575. package/dist/plugins/numberRange.mjs +1 -0
  576. package/dist/plugins/object/index.d.ts +2 -0
  577. package/dist/plugins/object/index.js +5 -0
  578. package/dist/plugins/object/index.mjs +1 -0
  579. package/dist/plugins/object/object.d.ts +9 -0
  580. package/dist/plugins/object/object.js +29 -0
  581. package/dist/plugins/object/object.mjs +26 -0
  582. package/dist/plugins/object-additional-properties/index.d.ts +3 -0
  583. package/dist/plugins/object-additional-properties/index.js +11 -0
  584. package/dist/plugins/object-additional-properties/index.mjs +6 -0
  585. package/dist/plugins/object-additional-properties/object-additional-properties-schema.d.ts +14 -0
  586. package/dist/plugins/object-additional-properties/object-additional-properties-schema.js +56 -0
  587. package/dist/plugins/object-additional-properties/object-additional-properties-schema.mjs +53 -0
  588. package/dist/plugins/object-additional-properties/object-additional-properties.d.ts +9 -0
  589. package/dist/plugins/object-additional-properties/object-additional-properties.js +40 -0
  590. package/dist/plugins/object-additional-properties/object-additional-properties.mjs +37 -0
  591. package/dist/plugins/object-dependent-required/dependent-required-violation.d.ts +7 -0
  592. package/dist/plugins/object-dependent-required/dependent-required-violation.js +45 -0
  593. package/dist/plugins/object-dependent-required/dependent-required-violation.mjs +40 -0
  594. package/dist/plugins/object-dependent-required/index.d.ts +3 -0
  595. package/dist/plugins/object-dependent-required/index.js +5 -0
  596. package/dist/plugins/object-dependent-required/index.mjs +1 -0
  597. package/dist/plugins/object-dependent-required/object-dependent-required.d.ts +10 -0
  598. package/dist/plugins/object-dependent-required/object-dependent-required.js +27 -0
  599. package/dist/plugins/object-dependent-required/object-dependent-required.mjs +24 -0
  600. package/dist/plugins/object-dependent-schemas/index.d.ts +2 -0
  601. package/dist/plugins/object-dependent-schemas/index.js +5 -0
  602. package/dist/plugins/object-dependent-schemas/index.mjs +1 -0
  603. package/dist/plugins/object-dependent-schemas/object-dependent-schemas.d.ts +16 -0
  604. package/dist/plugins/object-dependent-schemas/object-dependent-schemas.js +47 -0
  605. package/dist/plugins/object-dependent-schemas/object-dependent-schemas.mjs +44 -0
  606. package/dist/plugins/object-max-properties/index.d.ts +2 -0
  607. package/dist/plugins/object-max-properties/index.js +5 -0
  608. package/dist/plugins/object-max-properties/index.mjs +1 -0
  609. package/dist/plugins/object-max-properties/object-max-properties.d.ts +10 -0
  610. package/dist/plugins/object-max-properties/object-max-properties.js +32 -0
  611. package/dist/plugins/object-max-properties/object-max-properties.mjs +29 -0
  612. package/dist/plugins/object-min-properties/index.d.ts +2 -0
  613. package/dist/plugins/object-min-properties/index.js +5 -0
  614. package/dist/plugins/object-min-properties/index.mjs +1 -0
  615. package/dist/plugins/object-min-properties/object-min-properties.d.ts +10 -0
  616. package/dist/plugins/object-min-properties/object-min-properties.js +32 -0
  617. package/dist/plugins/object-min-properties/object-min-properties.mjs +29 -0
  618. package/dist/plugins/object-pattern-properties/index.d.ts +2 -0
  619. package/dist/plugins/object-pattern-properties/index.js +5 -0
  620. package/dist/plugins/object-pattern-properties/index.mjs +1 -0
  621. package/dist/plugins/object-pattern-properties/object-pattern-properties.d.ts +16 -0
  622. package/dist/plugins/object-pattern-properties/object-pattern-properties.js +57 -0
  623. package/dist/plugins/object-pattern-properties/object-pattern-properties.mjs +54 -0
  624. package/dist/plugins/object-property-names/index.d.ts +2 -0
  625. package/dist/plugins/object-property-names/index.js +5 -0
  626. package/dist/plugins/object-property-names/index.mjs +1 -0
  627. package/dist/plugins/object-property-names/object-property-names.d.ts +16 -0
  628. package/dist/plugins/object-property-names/object-property-names.js +47 -0
  629. package/dist/plugins/object-property-names/object-property-names.mjs +44 -0
  630. package/dist/plugins/object-recursively/index.d.ts +2 -0
  631. package/dist/plugins/object-recursively/index.js +5 -0
  632. package/dist/plugins/object-recursively/index.mjs +1 -0
  633. package/dist/plugins/object-recursively/object-recursively.d.ts +11 -0
  634. package/dist/plugins/object-recursively/object-recursively.js +26 -0
  635. package/dist/plugins/object-recursively/object-recursively.mjs +23 -0
  636. package/dist/plugins/object.d.ts +1 -43
  637. package/dist/plugins/object.js +2 -1
  638. package/dist/plugins/object.mjs +1 -1
  639. package/dist/plugins/objectAdditionalProperties.d.ts +1 -51
  640. package/dist/plugins/objectAdditionalProperties.js +2 -1
  641. package/dist/plugins/objectAdditionalProperties.mjs +1 -1
  642. package/dist/plugins/objectDependentRequired.d.ts +1 -42
  643. package/dist/plugins/objectDependentRequired.js +2 -1
  644. package/dist/plugins/objectDependentRequired.mjs +1 -1
  645. package/dist/plugins/objectDependentSchemas.d.ts +1 -40
  646. package/dist/plugins/objectDependentSchemas.js +2 -1
  647. package/dist/plugins/objectDependentSchemas.mjs +1 -1
  648. package/dist/plugins/objectMaxProperties.d.ts +1 -42
  649. package/dist/plugins/objectMaxProperties.js +2 -1
  650. package/dist/plugins/objectMaxProperties.mjs +1 -1
  651. package/dist/plugins/objectMinProperties.d.ts +1 -42
  652. package/dist/plugins/objectMinProperties.js +2 -1
  653. package/dist/plugins/objectMinProperties.mjs +1 -1
  654. package/dist/plugins/objectPatternProperties.d.ts +1 -46
  655. package/dist/plugins/objectPatternProperties.js +2 -1
  656. package/dist/plugins/objectPatternProperties.mjs +1 -1
  657. package/dist/plugins/objectPropertyNames.d.ts +1 -36
  658. package/dist/plugins/objectPropertyNames.js +2 -1
  659. package/dist/plugins/objectPropertyNames.mjs +1 -1
  660. package/dist/plugins/objectRecursively.d.ts +1 -0
  661. package/dist/plugins/objectRecursively.js +2 -0
  662. package/dist/plugins/objectRecursively.mjs +1 -0
  663. package/dist/plugins/one-of/index.d.ts +1 -0
  664. package/dist/plugins/one-of/index.js +5 -0
  665. package/dist/plugins/one-of/index.mjs +1 -0
  666. package/dist/plugins/one-of/one-of.d.ts +7 -0
  667. package/dist/plugins/one-of/one-of.js +67 -0
  668. package/dist/plugins/one-of/one-of.mjs +64 -0
  669. package/dist/plugins/oneOf.d.ts +1 -44
  670. package/dist/plugins/oneOf.js +2 -1
  671. package/dist/plugins/oneOf.mjs +1 -1
  672. package/dist/plugins/optional/index.d.ts +1 -0
  673. package/dist/plugins/optional/index.js +5 -0
  674. package/dist/plugins/optional/index.mjs +1 -0
  675. package/dist/plugins/optional/optional.d.ts +7 -0
  676. package/dist/plugins/optional/optional.js +42 -0
  677. package/dist/plugins/optional/optional.mjs +39 -0
  678. package/dist/plugins/optional-if/index.d.ts +1 -0
  679. package/dist/plugins/optional-if/index.js +5 -0
  680. package/dist/plugins/optional-if/index.mjs +1 -0
  681. package/dist/plugins/optional-if/optional-if.d.ts +11 -0
  682. package/dist/plugins/optional-if/optional-if.js +31 -0
  683. package/dist/plugins/optional-if/optional-if.mjs +28 -0
  684. package/dist/plugins/optional.d.ts +1 -35
  685. package/dist/plugins/optional.js +2 -1
  686. package/dist/plugins/optional.mjs +1 -1
  687. package/dist/plugins/optionalIf.d.ts +1 -0
  688. package/dist/plugins/optionalIf.js +2 -0
  689. package/dist/plugins/optionalIf.mjs +1 -0
  690. package/dist/plugins/or-fail/index.d.ts +1 -0
  691. package/dist/plugins/or-fail/index.js +5 -0
  692. package/dist/plugins/or-fail/index.mjs +1 -0
  693. package/dist/plugins/or-fail/or-fail.d.ts +7 -0
  694. package/dist/plugins/or-fail/or-fail.js +44 -0
  695. package/dist/plugins/or-fail/or-fail.mjs +41 -0
  696. package/dist/plugins/orFail.d.ts +1 -0
  697. package/dist/plugins/orFail.js +2 -0
  698. package/dist/plugins/orFail.mjs +1 -0
  699. package/dist/plugins/read-only/index.d.ts +1 -0
  700. package/dist/plugins/read-only/index.js +5 -0
  701. package/dist/plugins/read-only/index.mjs +1 -0
  702. package/dist/plugins/read-only/read-only.d.ts +7 -0
  703. package/dist/plugins/read-only/read-only.js +52 -0
  704. package/dist/plugins/read-only/read-only.mjs +49 -0
  705. package/dist/plugins/readOnly.d.ts +1 -0
  706. package/dist/plugins/readOnly.js +2 -0
  707. package/dist/plugins/readOnly.mjs +1 -0
  708. package/dist/plugins/readOnlyWriteOnly.d.ts +1 -48
  709. package/dist/plugins/readOnlyWriteOnly.js +2 -1
  710. package/dist/plugins/readOnlyWriteOnly.mjs +1 -1
  711. package/dist/plugins/required/index.d.ts +1 -0
  712. package/dist/plugins/required/index.js +5 -0
  713. package/dist/plugins/required/index.mjs +1 -0
  714. package/dist/plugins/required/required.d.ts +7 -0
  715. package/dist/plugins/required/required.js +42 -0
  716. package/dist/plugins/required/required.mjs +39 -0
  717. package/dist/plugins/required-if/index.d.ts +1 -0
  718. package/dist/plugins/required-if/index.js +5 -0
  719. package/dist/plugins/required-if/index.mjs +1 -0
  720. package/dist/plugins/required-if/required-if.d.ts +11 -0
  721. package/dist/plugins/required-if/required-if.js +34 -0
  722. package/dist/plugins/required-if/required-if.mjs +31 -0
  723. package/dist/plugins/required.d.ts +1 -45
  724. package/dist/plugins/required.js +2 -1
  725. package/dist/plugins/required.mjs +1 -1
  726. package/dist/plugins/requiredIf.d.ts +1 -66
  727. package/dist/plugins/requiredIf.js +2 -1
  728. package/dist/plugins/requiredIf.mjs +1 -1
  729. package/dist/plugins/skip/index.d.ts +1 -0
  730. package/dist/plugins/skip/index.js +5 -0
  731. package/dist/plugins/skip/index.mjs +1 -0
  732. package/dist/plugins/skip/skip.d.ts +7 -0
  733. package/dist/plugins/skip/skip.js +22 -0
  734. package/dist/plugins/skip/skip.mjs +19 -0
  735. package/dist/plugins/skip.d.ts +1 -57
  736. package/dist/plugins/skip.js +2 -1
  737. package/dist/plugins/skip.mjs +1 -1
  738. package/dist/plugins/stitch/index.d.ts +2 -0
  739. package/dist/plugins/stitch/index.js +5 -0
  740. package/dist/plugins/stitch/index.mjs +1 -0
  741. package/dist/plugins/stitch/stitch.d.ts +30 -0
  742. package/dist/plugins/stitch/stitch.js +72 -0
  743. package/dist/plugins/stitch/stitch.mjs +69 -0
  744. package/dist/plugins/stitch.d.ts +1 -0
  745. package/dist/plugins/stitch.js +2 -0
  746. package/dist/plugins/stitch.mjs +1 -0
  747. package/dist/plugins/string-alphanumeric/index.d.ts +1 -0
  748. package/dist/plugins/string-alphanumeric/index.js +5 -0
  749. package/dist/plugins/string-alphanumeric/index.mjs +1 -0
  750. package/dist/plugins/string-alphanumeric/string-alphanumeric.d.ts +8 -0
  751. package/dist/plugins/string-alphanumeric/string-alphanumeric.js +39 -0
  752. package/dist/plugins/string-alphanumeric/string-alphanumeric.mjs +36 -0
  753. package/dist/plugins/string-base64/index.d.ts +1 -0
  754. package/dist/plugins/string-base64/index.js +5 -0
  755. package/dist/plugins/string-base64/index.mjs +1 -0
  756. package/dist/plugins/string-base64/string-base64.d.ts +12 -0
  757. package/dist/plugins/string-base64/string-base64.js +40 -0
  758. package/dist/plugins/string-base64/string-base64.mjs +37 -0
  759. package/dist/plugins/string-content-encoding/content-encoding-checks.d.ts +4 -0
  760. package/dist/plugins/string-content-encoding/content-encoding-checks.js +67 -0
  761. package/dist/plugins/string-content-encoding/content-encoding-checks.mjs +64 -0
  762. package/dist/plugins/string-content-encoding/index.d.ts +2 -0
  763. package/dist/plugins/string-content-encoding/index.js +5 -0
  764. package/dist/plugins/string-content-encoding/index.mjs +1 -0
  765. package/dist/plugins/string-content-encoding/string-content-encoding.d.ts +10 -0
  766. package/dist/plugins/string-content-encoding/string-content-encoding.js +40 -0
  767. package/dist/plugins/string-content-encoding/string-content-encoding.mjs +37 -0
  768. package/dist/plugins/string-content-media-type/index.d.ts +1 -0
  769. package/dist/plugins/string-content-media-type/index.js +5 -0
  770. package/dist/plugins/string-content-media-type/index.mjs +1 -0
  771. package/dist/plugins/string-content-media-type/media-type-checks.d.ts +3 -0
  772. package/dist/plugins/string-content-media-type/media-type-checks.js +46 -0
  773. package/dist/plugins/string-content-media-type/media-type-checks.mjs +43 -0
  774. package/dist/plugins/string-content-media-type/string-content-media-type.d.ts +8 -0
  775. package/dist/plugins/string-content-media-type/string-content-media-type.js +41 -0
  776. package/dist/plugins/string-content-media-type/string-content-media-type.mjs +38 -0
  777. package/dist/plugins/string-date/calendar-date.d.ts +3 -0
  778. package/dist/plugins/string-date/calendar-date.js +24 -0
  779. package/dist/plugins/string-date/calendar-date.mjs +20 -0
  780. package/dist/plugins/string-date/index.d.ts +1 -0
  781. package/dist/plugins/string-date/index.js +5 -0
  782. package/dist/plugins/string-date/index.mjs +1 -0
  783. package/dist/plugins/string-date/string-date.d.ts +7 -0
  784. package/dist/plugins/string-date/string-date.js +42 -0
  785. package/dist/plugins/string-date/string-date.mjs +39 -0
  786. package/dist/plugins/string-datetime/calendar-date.d.ts +2 -0
  787. package/dist/plugins/string-datetime/calendar-date.js +24 -0
  788. package/dist/plugins/string-datetime/calendar-date.mjs +20 -0
  789. package/dist/plugins/string-datetime/index.d.ts +1 -0
  790. package/dist/plugins/string-datetime/index.js +5 -0
  791. package/dist/plugins/string-datetime/index.mjs +1 -0
  792. package/dist/plugins/string-datetime/string-datetime.d.ts +12 -0
  793. package/dist/plugins/string-datetime/string-datetime.js +67 -0
  794. package/dist/plugins/string-datetime/string-datetime.mjs +64 -0
  795. package/dist/plugins/string-duration/index.d.ts +1 -0
  796. package/dist/plugins/string-duration/index.js +5 -0
  797. package/dist/plugins/string-duration/index.mjs +1 -0
  798. package/dist/plugins/string-duration/string-duration.d.ts +7 -0
  799. package/dist/plugins/string-duration/string-duration.js +31 -0
  800. package/dist/plugins/string-duration/string-duration.mjs +28 -0
  801. package/dist/plugins/string-email/index.d.ts +1 -0
  802. package/dist/plugins/string-email/index.js +5 -0
  803. package/dist/plugins/string-email/index.mjs +1 -0
  804. package/dist/plugins/string-email/string-email.d.ts +14 -0
  805. package/dist/plugins/string-email/string-email.js +58 -0
  806. package/dist/plugins/string-email/string-email.mjs +55 -0
  807. package/dist/plugins/string-ends-with/index.d.ts +1 -0
  808. package/dist/plugins/string-ends-with/index.js +5 -0
  809. package/dist/plugins/string-ends-with/index.mjs +1 -0
  810. package/dist/plugins/string-ends-with/string-ends-with.d.ts +8 -0
  811. package/dist/plugins/string-ends-with/string-ends-with.js +30 -0
  812. package/dist/plugins/string-ends-with/string-ends-with.mjs +27 -0
  813. package/dist/plugins/string-exact-length/index.d.ts +1 -0
  814. package/dist/plugins/string-exact-length/index.js +5 -0
  815. package/dist/plugins/string-exact-length/index.mjs +1 -0
  816. package/dist/plugins/string-exact-length/string-exact-length.d.ts +11 -0
  817. package/dist/plugins/string-exact-length/string-exact-length.js +34 -0
  818. package/dist/plugins/string-exact-length/string-exact-length.mjs +31 -0
  819. package/dist/plugins/string-hostname/index.d.ts +1 -0
  820. package/dist/plugins/string-hostname/index.js +5 -0
  821. package/dist/plugins/string-hostname/index.mjs +1 -0
  822. package/dist/plugins/string-hostname/string-hostname.d.ts +7 -0
  823. package/dist/plugins/string-hostname/string-hostname.js +30 -0
  824. package/dist/plugins/string-hostname/string-hostname.mjs +27 -0
  825. package/dist/plugins/string-idn-email/idn-email.d.ts +1 -0
  826. package/dist/plugins/string-idn-email/idn-email.js +85 -0
  827. package/dist/plugins/string-idn-email/idn-email.mjs +82 -0
  828. package/dist/plugins/string-idn-email/index.d.ts +1 -0
  829. package/dist/plugins/string-idn-email/index.js +5 -0
  830. package/dist/plugins/string-idn-email/index.mjs +1 -0
  831. package/dist/plugins/string-idn-email/string-idn-email.d.ts +7 -0
  832. package/dist/plugins/string-idn-email/string-idn-email.js +29 -0
  833. package/dist/plugins/string-idn-email/string-idn-email.mjs +26 -0
  834. package/dist/plugins/string-idn-hostname/idn-hostname.d.ts +1 -0
  835. package/dist/plugins/string-idn-hostname/idn-hostname.js +72 -0
  836. package/dist/plugins/string-idn-hostname/idn-hostname.mjs +69 -0
  837. package/dist/plugins/string-idn-hostname/index.d.ts +1 -0
  838. package/dist/plugins/string-idn-hostname/index.js +5 -0
  839. package/dist/plugins/string-idn-hostname/index.mjs +1 -0
  840. package/dist/plugins/string-idn-hostname/string-idn-hostname.d.ts +7 -0
  841. package/dist/plugins/string-idn-hostname/string-idn-hostname.js +31 -0
  842. package/dist/plugins/string-idn-hostname/string-idn-hostname.mjs +28 -0
  843. package/dist/plugins/string-ipv4/index.d.ts +1 -0
  844. package/dist/plugins/string-ipv4/index.js +5 -0
  845. package/dist/plugins/string-ipv4/index.mjs +1 -0
  846. package/dist/plugins/string-ipv4/string-ipv4.d.ts +7 -0
  847. package/dist/plugins/string-ipv4/string-ipv4.js +32 -0
  848. package/dist/plugins/string-ipv4/string-ipv4.mjs +29 -0
  849. package/dist/plugins/string-ipv6/index.d.ts +1 -0
  850. package/dist/plugins/string-ipv6/index.js +5 -0
  851. package/dist/plugins/string-ipv6/index.mjs +1 -0
  852. package/dist/plugins/string-ipv6/ipv6-address.d.ts +2 -0
  853. package/dist/plugins/string-ipv6/ipv6-address.js +70 -0
  854. package/dist/plugins/string-ipv6/ipv6-address.mjs +67 -0
  855. package/dist/plugins/string-ipv6/string-ipv6.d.ts +7 -0
  856. package/dist/plugins/string-ipv6/string-ipv6.js +27 -0
  857. package/dist/plugins/string-ipv6/string-ipv6.mjs +24 -0
  858. package/dist/plugins/string-iri/control-character.d.ts +1 -0
  859. package/dist/plugins/string-iri/control-character.js +21 -0
  860. package/dist/plugins/string-iri/control-character.mjs +18 -0
  861. package/dist/plugins/string-iri/index.d.ts +1 -0
  862. package/dist/plugins/string-iri/index.js +5 -0
  863. package/dist/plugins/string-iri/index.mjs +1 -0
  864. package/dist/plugins/string-iri/string-iri.d.ts +7 -0
  865. package/dist/plugins/string-iri/string-iri.js +49 -0
  866. package/dist/plugins/string-iri/string-iri.mjs +46 -0
  867. package/dist/plugins/string-iri-reference/control-character.d.ts +1 -0
  868. package/dist/plugins/string-iri-reference/control-character.js +21 -0
  869. package/dist/plugins/string-iri-reference/control-character.mjs +18 -0
  870. package/dist/plugins/string-iri-reference/index.d.ts +1 -0
  871. package/dist/plugins/string-iri-reference/index.js +5 -0
  872. package/dist/plugins/string-iri-reference/index.mjs +1 -0
  873. package/dist/plugins/string-iri-reference/iri-reference.d.ts +1 -0
  874. package/dist/plugins/string-iri-reference/iri-reference.js +39 -0
  875. package/dist/plugins/string-iri-reference/iri-reference.mjs +36 -0
  876. package/dist/plugins/string-iri-reference/string-iri-reference.d.ts +7 -0
  877. package/dist/plugins/string-iri-reference/string-iri-reference.js +26 -0
  878. package/dist/plugins/string-iri-reference/string-iri-reference.mjs +23 -0
  879. package/dist/plugins/string-json-pointer/index.d.ts +1 -0
  880. package/dist/plugins/string-json-pointer/index.js +5 -0
  881. package/dist/plugins/string-json-pointer/index.mjs +1 -0
  882. package/dist/plugins/string-json-pointer/string-json-pointer.d.ts +7 -0
  883. package/dist/plugins/string-json-pointer/string-json-pointer.js +35 -0
  884. package/dist/plugins/string-json-pointer/string-json-pointer.mjs +32 -0
  885. package/dist/plugins/string-max/index.d.ts +1 -0
  886. package/dist/plugins/string-max/index.js +5 -0
  887. package/dist/plugins/string-max/index.mjs +1 -0
  888. package/dist/plugins/string-max/string-max.d.ts +11 -0
  889. package/dist/plugins/string-max/string-max.js +34 -0
  890. package/dist/plugins/string-max/string-max.mjs +31 -0
  891. package/dist/plugins/string-min/index.d.ts +1 -0
  892. package/dist/plugins/string-min/index.js +5 -0
  893. package/dist/plugins/string-min/index.mjs +1 -0
  894. package/dist/plugins/string-min/string-min.d.ts +11 -0
  895. package/dist/plugins/string-min/string-min.js +37 -0
  896. package/dist/plugins/string-min/string-min.mjs +34 -0
  897. package/dist/plugins/string-pattern/index.d.ts +1 -0
  898. package/dist/plugins/string-pattern/index.js +5 -0
  899. package/dist/plugins/string-pattern/index.mjs +1 -0
  900. package/dist/plugins/string-pattern/string-pattern.d.ts +8 -0
  901. package/dist/plugins/string-pattern/string-pattern.js +49 -0
  902. package/dist/plugins/string-pattern/string-pattern.mjs +46 -0
  903. package/dist/plugins/string-regex/index.d.ts +1 -0
  904. package/dist/plugins/string-regex/index.js +5 -0
  905. package/dist/plugins/string-regex/index.mjs +1 -0
  906. package/dist/plugins/string-regex/is-ecma262-regex.d.ts +2 -0
  907. package/dist/plugins/string-regex/is-ecma262-regex.js +25 -0
  908. package/dist/plugins/string-regex/is-ecma262-regex.mjs +22 -0
  909. package/dist/plugins/string-regex/string-regex.d.ts +7 -0
  910. package/dist/plugins/string-regex/string-regex.js +28 -0
  911. package/dist/plugins/string-regex/string-regex.mjs +25 -0
  912. package/dist/plugins/string-relative-json-pointer/index.d.ts +1 -0
  913. package/dist/plugins/string-relative-json-pointer/index.js +5 -0
  914. package/dist/plugins/string-relative-json-pointer/index.mjs +1 -0
  915. package/dist/plugins/string-relative-json-pointer/string-relative-json-pointer.d.ts +7 -0
  916. package/dist/plugins/string-relative-json-pointer/string-relative-json-pointer.js +42 -0
  917. package/dist/plugins/string-relative-json-pointer/string-relative-json-pointer.mjs +39 -0
  918. package/dist/plugins/string-starts-with/index.d.ts +1 -0
  919. package/dist/plugins/string-starts-with/index.js +5 -0
  920. package/dist/plugins/string-starts-with/index.mjs +1 -0
  921. package/dist/plugins/string-starts-with/string-starts-with.d.ts +8 -0
  922. package/dist/plugins/string-starts-with/string-starts-with.js +30 -0
  923. package/dist/plugins/string-starts-with/string-starts-with.mjs +27 -0
  924. package/dist/plugins/string-time/index.d.ts +1 -0
  925. package/dist/plugins/string-time/index.js +5 -0
  926. package/dist/plugins/string-time/index.mjs +1 -0
  927. package/dist/plugins/string-time/string-time.d.ts +12 -0
  928. package/dist/plugins/string-time/string-time.js +37 -0
  929. package/dist/plugins/string-time/string-time.mjs +34 -0
  930. package/dist/plugins/string-uri-reference/index.d.ts +1 -0
  931. package/dist/plugins/string-uri-reference/index.js +5 -0
  932. package/dist/plugins/string-uri-reference/index.mjs +1 -0
  933. package/dist/plugins/string-uri-reference/string-uri-reference.d.ts +7 -0
  934. package/dist/plugins/string-uri-reference/string-uri-reference.js +28 -0
  935. package/dist/plugins/string-uri-reference/string-uri-reference.mjs +25 -0
  936. package/dist/plugins/string-uri-reference/uri-reference.d.ts +1 -0
  937. package/dist/plugins/string-uri-reference/uri-reference.js +71 -0
  938. package/dist/plugins/string-uri-reference/uri-reference.mjs +68 -0
  939. package/dist/plugins/string-uri-template/index.d.ts +1 -0
  940. package/dist/plugins/string-uri-template/index.js +5 -0
  941. package/dist/plugins/string-uri-template/index.mjs +1 -0
  942. package/dist/plugins/string-uri-template/string-uri-template.d.ts +7 -0
  943. package/dist/plugins/string-uri-template/string-uri-template.js +26 -0
  944. package/dist/plugins/string-uri-template/string-uri-template.mjs +23 -0
  945. package/dist/plugins/string-uri-template/uri-template.d.ts +1 -0
  946. package/dist/plugins/string-uri-template/uri-template.js +59 -0
  947. package/dist/plugins/string-uri-template/uri-template.mjs +56 -0
  948. package/dist/plugins/string-url/index.d.ts +1 -0
  949. package/dist/plugins/string-url/index.js +5 -0
  950. package/dist/plugins/string-url/index.mjs +1 -0
  951. package/dist/plugins/string-url/string-url.d.ts +14 -0
  952. package/dist/plugins/string-url/string-url.js +55 -0
  953. package/dist/plugins/string-url/string-url.mjs +52 -0
  954. package/dist/plugins/stringAlphanumeric.d.ts +1 -0
  955. package/dist/plugins/stringAlphanumeric.js +2 -0
  956. package/dist/plugins/stringAlphanumeric.mjs +1 -0
  957. package/dist/plugins/stringBase64.d.ts +1 -119
  958. package/dist/plugins/stringBase64.js +2 -1
  959. package/dist/plugins/stringBase64.mjs +1 -1
  960. package/dist/plugins/stringContentEncoding.d.ts +1 -43
  961. package/dist/plugins/stringContentEncoding.js +2 -1
  962. package/dist/plugins/stringContentEncoding.mjs +1 -1
  963. package/dist/plugins/stringContentMediaType.d.ts +1 -47
  964. package/dist/plugins/stringContentMediaType.js +2 -1
  965. package/dist/plugins/stringContentMediaType.mjs +1 -1
  966. package/dist/plugins/stringDate.d.ts +1 -48
  967. package/dist/plugins/stringDate.js +2 -1
  968. package/dist/plugins/stringDate.mjs +1 -1
  969. package/dist/plugins/stringDatetime.d.ts +1 -108
  970. package/dist/plugins/stringDatetime.js +2 -1
  971. package/dist/plugins/stringDatetime.mjs +1 -1
  972. package/dist/plugins/stringDuration.d.ts +1 -41
  973. package/dist/plugins/stringDuration.js +2 -1
  974. package/dist/plugins/stringDuration.mjs +1 -1
  975. package/dist/plugins/stringEmail.d.ts +1 -81
  976. package/dist/plugins/stringEmail.js +2 -1
  977. package/dist/plugins/stringEmail.mjs +1 -1
  978. package/dist/plugins/stringEndsWith.d.ts +1 -0
  979. package/dist/plugins/stringEndsWith.js +2 -0
  980. package/dist/plugins/stringEndsWith.mjs +1 -0
  981. package/dist/plugins/stringExactLength.d.ts +1 -0
  982. package/dist/plugins/stringExactLength.js +2 -0
  983. package/dist/plugins/stringExactLength.mjs +1 -0
  984. package/dist/plugins/stringHostname.d.ts +1 -104
  985. package/dist/plugins/stringHostname.js +2 -1
  986. package/dist/plugins/stringHostname.mjs +1 -1
  987. package/dist/plugins/stringIdnEmail.d.ts +1 -0
  988. package/dist/plugins/stringIdnEmail.js +2 -0
  989. package/dist/plugins/stringIdnEmail.mjs +1 -0
  990. package/dist/plugins/stringIdnHostname.d.ts +1 -0
  991. package/dist/plugins/stringIdnHostname.js +2 -0
  992. package/dist/plugins/stringIdnHostname.mjs +1 -0
  993. package/dist/plugins/stringIpv4.d.ts +1 -85
  994. package/dist/plugins/stringIpv4.js +2 -1
  995. package/dist/plugins/stringIpv4.mjs +1 -1
  996. package/dist/plugins/stringIpv6.d.ts +1 -104
  997. package/dist/plugins/stringIpv6.js +2 -1
  998. package/dist/plugins/stringIpv6.mjs +1 -1
  999. package/dist/plugins/stringIri.d.ts +1 -117
  1000. package/dist/plugins/stringIri.js +2 -1
  1001. package/dist/plugins/stringIri.mjs +1 -1
  1002. package/dist/plugins/stringIriReference.d.ts +1 -43
  1003. package/dist/plugins/stringIriReference.js +2 -1
  1004. package/dist/plugins/stringIriReference.mjs +1 -1
  1005. package/dist/plugins/stringJsonPointer.d.ts +1 -107
  1006. package/dist/plugins/stringJsonPointer.js +2 -1
  1007. package/dist/plugins/stringJsonPointer.mjs +1 -1
  1008. package/dist/plugins/stringMax.d.ts +1 -43
  1009. package/dist/plugins/stringMax.js +2 -1
  1010. package/dist/plugins/stringMax.mjs +1 -1
  1011. package/dist/plugins/stringMin.d.ts +1 -43
  1012. package/dist/plugins/stringMin.js +2 -1
  1013. package/dist/plugins/stringMin.mjs +1 -1
  1014. package/dist/plugins/stringPattern.d.ts +1 -40
  1015. package/dist/plugins/stringPattern.js +2 -1
  1016. package/dist/plugins/stringPattern.mjs +1 -1
  1017. package/dist/plugins/stringRegex.d.ts +1 -0
  1018. package/dist/plugins/stringRegex.js +2 -0
  1019. package/dist/plugins/stringRegex.mjs +1 -0
  1020. package/dist/plugins/stringRelativeJsonPointer.d.ts +1 -42
  1021. package/dist/plugins/stringRelativeJsonPointer.js +2 -1
  1022. package/dist/plugins/stringRelativeJsonPointer.mjs +1 -1
  1023. package/dist/plugins/stringStartsWith.d.ts +1 -0
  1024. package/dist/plugins/stringStartsWith.js +2 -0
  1025. package/dist/plugins/stringStartsWith.mjs +1 -0
  1026. package/dist/plugins/stringTime.d.ts +1 -39
  1027. package/dist/plugins/stringTime.js +2 -1
  1028. package/dist/plugins/stringTime.mjs +1 -1
  1029. package/dist/plugins/stringUriReference.d.ts +1 -0
  1030. package/dist/plugins/stringUriReference.js +2 -0
  1031. package/dist/plugins/stringUriReference.mjs +1 -0
  1032. package/dist/plugins/stringUriTemplate.d.ts +1 -43
  1033. package/dist/plugins/stringUriTemplate.js +2 -1
  1034. package/dist/plugins/stringUriTemplate.mjs +1 -1
  1035. package/dist/plugins/stringUrl.d.ts +1 -97
  1036. package/dist/plugins/stringUrl.js +2 -1
  1037. package/dist/plugins/stringUrl.mjs +1 -1
  1038. package/dist/plugins/transform/index.d.ts +1 -0
  1039. package/dist/plugins/transform/index.js +5 -0
  1040. package/dist/plugins/transform/index.mjs +1 -0
  1041. package/dist/plugins/transform/transform.d.ts +7 -0
  1042. package/dist/plugins/transform/transform.js +35 -0
  1043. package/dist/plugins/transform/transform.mjs +32 -0
  1044. package/dist/plugins/transform.d.ts +1 -35
  1045. package/dist/plugins/transform.js +2 -1
  1046. package/dist/plugins/transform.mjs +1 -1
  1047. package/dist/plugins/tuple-builder/index.d.ts +2 -0
  1048. package/dist/plugins/tuple-builder/index.js +5 -0
  1049. package/dist/plugins/tuple-builder/index.mjs +1 -0
  1050. package/dist/plugins/tuple-builder/tuple-builder.d.ts +21 -0
  1051. package/dist/plugins/tuple-builder/tuple-builder.js +128 -0
  1052. package/dist/plugins/tuple-builder/tuple-builder.mjs +125 -0
  1053. package/dist/plugins/tupleBuilder.d.ts +1 -66
  1054. package/dist/plugins/tupleBuilder.js +2 -1
  1055. package/dist/plugins/tupleBuilder.mjs +1 -1
  1056. package/dist/plugins/union-guard/index.d.ts +1 -0
  1057. package/dist/plugins/union-guard/index.js +5 -0
  1058. package/dist/plugins/union-guard/index.mjs +1 -0
  1059. package/dist/plugins/union-guard/union-guard.d.ts +14 -0
  1060. package/dist/plugins/union-guard/union-guard.js +56 -0
  1061. package/dist/plugins/union-guard/union-guard.mjs +53 -0
  1062. package/dist/plugins/unionGuard.d.ts +1 -0
  1063. package/dist/plugins/unionGuard.js +2 -0
  1064. package/dist/plugins/unionGuard.mjs +1 -0
  1065. package/dist/plugins/uuid/index.d.ts +1 -0
  1066. package/dist/plugins/uuid/index.js +5 -0
  1067. package/dist/plugins/uuid/index.mjs +1 -0
  1068. package/dist/plugins/uuid/uuid.d.ts +10 -0
  1069. package/dist/plugins/uuid/uuid.js +56 -0
  1070. package/dist/plugins/uuid/uuid.mjs +53 -0
  1071. package/dist/plugins/uuid.d.ts +1 -95
  1072. package/dist/plugins/uuid.js +2 -1
  1073. package/dist/plugins/uuid.mjs +1 -1
  1074. package/dist/plugins/validate-if/index.d.ts +1 -0
  1075. package/dist/plugins/validate-if/index.js +5 -0
  1076. package/dist/plugins/validate-if/index.mjs +1 -0
  1077. package/dist/plugins/validate-if/validate-if.d.ts +7 -0
  1078. package/dist/plugins/validate-if/validate-if.js +22 -0
  1079. package/dist/plugins/validate-if/validate-if.mjs +19 -0
  1080. package/dist/plugins/validateIf.d.ts +1 -57
  1081. package/dist/plugins/validateIf.js +2 -1
  1082. package/dist/plugins/validateIf.mjs +1 -1
  1083. package/dist/plugins/write-only/index.d.ts +1 -0
  1084. package/dist/plugins/write-only/index.js +5 -0
  1085. package/dist/plugins/write-only/index.mjs +1 -0
  1086. package/dist/plugins/write-only/write-only.d.ts +7 -0
  1087. package/dist/plugins/write-only/write-only.js +48 -0
  1088. package/dist/plugins/write-only/write-only.mjs +45 -0
  1089. package/dist/plugins/writeOnly.d.ts +1 -0
  1090. package/dist/plugins/writeOnly.js +2 -0
  1091. package/dist/plugins/writeOnly.mjs +1 -0
  1092. package/dist/result/index.d.ts +18 -0
  1093. package/dist/result/index.js +44 -0
  1094. package/dist/result/index.mjs +36 -0
  1095. package/dist/result.d.ts +1 -0
  1096. package/dist/result.js +2 -0
  1097. package/dist/result.mjs +1 -0
  1098. package/dist/runtime/create-field-validator.d.ts +12 -0
  1099. package/dist/runtime/create-field-validator.js +74 -0
  1100. package/dist/runtime/create-field-validator.mjs +71 -0
  1101. package/dist/runtime/create-issue.d.ts +24 -0
  1102. package/dist/runtime/create-issue.js +34 -0
  1103. package/dist/runtime/create-issue.mjs +30 -0
  1104. package/dist/runtime/create-validator.d.ts +19 -0
  1105. package/dist/runtime/create-validator.js +70 -0
  1106. package/dist/runtime/create-validator.mjs +65 -0
  1107. package/dist/runtime/decide-presence.d.ts +5 -0
  1108. package/dist/runtime/decide-presence.js +47 -0
  1109. package/dist/runtime/decide-presence.mjs +44 -0
  1110. package/dist/runtime/index-stack.d.ts +28 -0
  1111. package/dist/runtime/index-stack.js +68 -0
  1112. package/dist/runtime/index-stack.mjs +63 -0
  1113. package/dist/runtime/index.d.ts +19 -0
  1114. package/dist/runtime/index.js +48 -0
  1115. package/dist/runtime/index.mjs +16 -0
  1116. package/dist/runtime/issue-sink.d.ts +39 -0
  1117. package/dist/runtime/issue-sink.js +61 -0
  1118. package/dist/runtime/issue-sink.mjs +56 -0
  1119. package/dist/runtime/output-writer.d.ts +38 -0
  1120. package/dist/runtime/output-writer.js +59 -0
  1121. package/dist/runtime/output-writer.mjs +52 -0
  1122. package/dist/runtime/run-array-node.d.ts +9 -0
  1123. package/dist/runtime/run-array-node.js +98 -0
  1124. package/dist/runtime/run-array-node.mjs +95 -0
  1125. package/dist/runtime/run-branch.d.ts +14 -0
  1126. package/dist/runtime/run-branch.js +67 -0
  1127. package/dist/runtime/run-branch.mjs +63 -0
  1128. package/dist/runtime/run-field.d.ts +27 -0
  1129. package/dist/runtime/run-field.js +88 -0
  1130. package/dist/runtime/run-field.mjs +84 -0
  1131. package/dist/runtime/run-plan.d.ts +28 -0
  1132. package/dist/runtime/run-plan.js +50 -0
  1133. package/dist/runtime/run-plan.mjs +46 -0
  1134. package/dist/runtime/run-recursion.d.ts +17 -0
  1135. package/dist/runtime/run-recursion.js +119 -0
  1136. package/dist/runtime/run-recursion.mjs +115 -0
  1137. package/dist/subpath-aliases/read-only-write-only.d.ts +2 -0
  1138. package/dist/subpath-aliases/read-only-write-only.js +16 -0
  1139. package/dist/subpath-aliases/read-only-write-only.mjs +11 -0
  1140. package/dist/types/global-config.d.ts +31 -0
  1141. package/dist/types/global-config.js +36 -0
  1142. package/dist/types/global-config.mjs +32 -0
  1143. package/dist/types/index.d.ts +64 -70
  1144. package/dist/types/index.js +28 -0
  1145. package/dist/types/index.mjs +19 -0
  1146. package/dist/types/validation-result.types.d.ts +22 -0
  1147. package/dist/types/validation-result.types.js +2 -0
  1148. package/dist/types/validation-result.types.mjs +1 -0
  1149. package/package.json +516 -353
  1150. package/dist/constants.d.ts +0 -27
  1151. package/dist/core/async.experimental/async-context.d.ts +0 -60
  1152. package/dist/core/builder/array-batch-optimizer.d.ts +0 -66
  1153. package/dist/core/builder/context/field-context.d.ts +0 -31
  1154. package/dist/core/builder/context/field-type-detector.d.ts +0 -19
  1155. package/dist/core/builder/core/builder.d.ts +0 -10
  1156. package/dist/core/builder/core/field-builder.d.ts +0 -13
  1157. package/dist/core/builder/core/index.d.ts +0 -17
  1158. package/dist/core/builder/index.d.ts +0 -24
  1159. package/dist/core/builder/nested-array-processor.d.ts +0 -52
  1160. package/dist/core/builder/plugins/composable-conditional-plugin.d.ts +0 -32
  1161. package/dist/core/builder/plugins/composable-directly-plugin.d.ts +0 -32
  1162. package/dist/core/builder/plugins/composable-plugin.d.ts +0 -242
  1163. package/dist/core/builder/plugins/plugin-creator.d.ts +0 -38
  1164. package/dist/core/builder/plugins/plugin-interfaces.d.ts +0 -343
  1165. package/dist/core/builder/plugins/plugin-types.d.ts +0 -441
  1166. package/dist/core/builder/raw-validator.d.ts +0 -22
  1167. package/dist/core/builder/types/field-options.d.ts +0 -46
  1168. package/dist/core/builder/types/types.d.ts +0 -318
  1169. package/dist/core/builder/ultra-fast-validator.d.ts +0 -30
  1170. package/dist/core/builder/validator-factory.d.ts +0 -29
  1171. package/dist/core/global-config.d.ts +0 -27
  1172. package/dist/core/index.d.ts +0 -36
  1173. package/dist/core/optimization/array-batch-validator.d.ts +0 -68
  1174. package/dist/core/optimization/core/field-utils.d.ts +0 -103
  1175. package/dist/core/optimization/core/strategy-factory.d.ts +0 -84
  1176. package/dist/core/optimization/core/validation-engine.d.ts +0 -107
  1177. package/dist/core/optimization/execution-strategy-selector.d.ts +0 -23
  1178. package/dist/core/optimization/unified-validator.d.ts +0 -45
  1179. package/dist/core/plugin/__tests__/test-utils.d.ts +0 -1
  1180. package/dist/core/plugin/arrayContains.d.ts +0 -37
  1181. package/dist/core/plugin/arrayIncludes.d.ts +0 -42
  1182. package/dist/core/plugin/arrayMaxLength.d.ts +0 -43
  1183. package/dist/core/plugin/arrayMinLength.d.ts +0 -43
  1184. package/dist/core/plugin/arrayUnique.d.ts +0 -41
  1185. package/dist/core/plugin/booleanFalsy.d.ts +0 -41
  1186. package/dist/core/plugin/booleanTruthy.d.ts +0 -38
  1187. package/dist/core/plugin/compareField.d.ts +0 -58
  1188. package/dist/core/plugin/conditionalSchema.d.ts +0 -24
  1189. package/dist/core/plugin/custom.d.ts +0 -60
  1190. package/dist/core/plugin/fromContext.d.ts +0 -150
  1191. package/dist/core/plugin/index.d.ts +0 -71
  1192. package/dist/core/plugin/jsonSchema/dsl-converter.d.ts +0 -22
  1193. package/dist/core/plugin/jsonSchema/error-generation.d.ts +0 -14
  1194. package/dist/core/plugin/jsonSchema/format-validators.d.ts +0 -20
  1195. package/dist/core/plugin/jsonSchema/index.d.ts +0 -11
  1196. package/dist/core/plugin/jsonSchema/plugin.d.ts +0 -35
  1197. package/dist/core/plugin/jsonSchema/ref-resolver.d.ts +0 -14
  1198. package/dist/core/plugin/jsonSchema/types.d.ts +0 -69
  1199. package/dist/core/plugin/jsonSchema/validation-core.d.ts +0 -29
  1200. package/dist/core/plugin/jsonSchemaFullFeature.d.ts +0 -31
  1201. package/dist/core/plugin/literal.d.ts +0 -40
  1202. package/dist/core/plugin/message-factories.d.ts +0 -9
  1203. package/dist/core/plugin/nullable.d.ts +0 -34
  1204. package/dist/core/plugin/numberFinite.d.ts +0 -41
  1205. package/dist/core/plugin/numberInteger.d.ts +0 -41
  1206. package/dist/core/plugin/numberMax.d.ts +0 -49
  1207. package/dist/core/plugin/numberMin.d.ts +0 -49
  1208. package/dist/core/plugin/numberMultipleOf.d.ts +0 -42
  1209. package/dist/core/plugin/numberNegative.d.ts +0 -41
  1210. package/dist/core/plugin/numberPositive.d.ts +0 -41
  1211. package/dist/core/plugin/numberRange.d.ts +0 -48
  1212. package/dist/core/plugin/object.d.ts +0 -43
  1213. package/dist/core/plugin/objectAdditionalProperties.d.ts +0 -51
  1214. package/dist/core/plugin/objectDependentRequired.d.ts +0 -42
  1215. package/dist/core/plugin/objectDependentSchemas.d.ts +0 -40
  1216. package/dist/core/plugin/objectMaxProperties.d.ts +0 -42
  1217. package/dist/core/plugin/objectMinProperties.d.ts +0 -42
  1218. package/dist/core/plugin/objectPatternProperties.d.ts +0 -46
  1219. package/dist/core/plugin/objectPropertyNames.d.ts +0 -36
  1220. package/dist/core/plugin/objectRecursively.d.ts +0 -81
  1221. package/dist/core/plugin/oneOf.d.ts +0 -44
  1222. package/dist/core/plugin/optional.d.ts +0 -35
  1223. package/dist/core/plugin/optionalIf.d.ts +0 -42
  1224. package/dist/core/plugin/orFail.d.ts +0 -132
  1225. package/dist/core/plugin/readOnlyWriteOnly.d.ts +0 -48
  1226. package/dist/core/plugin/required.d.ts +0 -45
  1227. package/dist/core/plugin/requiredIf.d.ts +0 -66
  1228. package/dist/core/plugin/shared-constants.d.ts +0 -45
  1229. package/dist/core/plugin/shared.d.ts +0 -3
  1230. package/dist/core/plugin/skip.d.ts +0 -57
  1231. package/dist/core/plugin/stitch-typed.d.ts +0 -15
  1232. package/dist/core/plugin/stitch.d.ts +0 -1
  1233. package/dist/core/plugin/stitchSimple.d.ts +0 -4
  1234. package/dist/core/plugin/stringAlphanumeric.d.ts +0 -42
  1235. package/dist/core/plugin/stringBase64.d.ts +0 -119
  1236. package/dist/core/plugin/stringContentEncoding.d.ts +0 -43
  1237. package/dist/core/plugin/stringContentMediaType.d.ts +0 -47
  1238. package/dist/core/plugin/stringDate.d.ts +0 -48
  1239. package/dist/core/plugin/stringDatetime.d.ts +0 -108
  1240. package/dist/core/plugin/stringDuration.d.ts +0 -41
  1241. package/dist/core/plugin/stringEmail.d.ts +0 -81
  1242. package/dist/core/plugin/stringEndsWith.d.ts +0 -42
  1243. package/dist/core/plugin/stringExactLength.d.ts +0 -46
  1244. package/dist/core/plugin/stringHostname.d.ts +0 -104
  1245. package/dist/core/plugin/stringIpv4.d.ts +0 -85
  1246. package/dist/core/plugin/stringIpv6.d.ts +0 -104
  1247. package/dist/core/plugin/stringIri.d.ts +0 -117
  1248. package/dist/core/plugin/stringIriReference.d.ts +0 -43
  1249. package/dist/core/plugin/stringJsonPointer.d.ts +0 -107
  1250. package/dist/core/plugin/stringMax.d.ts +0 -43
  1251. package/dist/core/plugin/stringMin.d.ts +0 -43
  1252. package/dist/core/plugin/stringPattern.d.ts +0 -40
  1253. package/dist/core/plugin/stringRelativeJsonPointer.d.ts +0 -42
  1254. package/dist/core/plugin/stringStartsWith.d.ts +0 -42
  1255. package/dist/core/plugin/stringTime.d.ts +0 -39
  1256. package/dist/core/plugin/stringUriTemplate.d.ts +0 -43
  1257. package/dist/core/plugin/stringUrl.d.ts +0 -97
  1258. package/dist/core/plugin/testUtils.d.ts +0 -15
  1259. package/dist/core/plugin/transform-type-restrictions.d.ts +0 -61
  1260. package/dist/core/plugin/transform.d.ts +0 -35
  1261. package/dist/core/plugin/tupleBuilder.d.ts +0 -66
  1262. package/dist/core/plugin/types.d.ts +0 -143
  1263. package/dist/core/plugin/unionGuard.d.ts +0 -50
  1264. package/dist/core/plugin/utils/field-accessor-optimized.d.ts +0 -50
  1265. package/dist/core/plugin/utils/field-accessor.d.ts +0 -107
  1266. package/dist/core/plugin/uuid.d.ts +0 -95
  1267. package/dist/core/plugin/validateIf.d.ts +0 -57
  1268. package/dist/core/registry/plugin-registry.d.ts +0 -116
  1269. package/dist/core/registry.d.ts +0 -6
  1270. package/dist/core/transform/index.d.ts +0 -1
  1271. package/dist/core/transform/string/defaultValue.d.ts +0 -6
  1272. package/dist/core/transform/string/index.d.ts +0 -3
  1273. package/dist/core/transform/string/replace.d.ts +0 -14
  1274. package/dist/core/transform/string/sanitize.d.ts +0 -6
  1275. package/dist/core/utils/type-guards.d.ts +0 -68
  1276. package/dist/index.js.map +0 -7
  1277. package/dist/index.mjs.map +0 -7
  1278. package/dist/types/array-type-analysis.d.ts +0 -115
  1279. package/dist/types/indexed-result.d.ts +0 -44
  1280. package/dist/types/result.d.ts +0 -159
  1281. package/dist/types/stitch-types.d.ts +0 -118
  1282. package/dist/types/util.d.ts +0 -19
  1283. package/dist/types/valitator.d.ts +0 -10
@@ -1,97 +1 @@
1
- import { ValidationOptions } from "../core/plugin/types";
2
- /**
3
- * @luq-plugin
4
- * @name stringUrl
5
- * @category standard
6
- * @description Validates that a string is a valid URL format
7
- * @allowedTypes ["string"]
8
- * @see https://developer.mozilla.org/en-US/docs/Web/API/URL - MDN URL API Reference
9
- * @see https://tools.ietf.org/html/rfc3986 - RFC 3986: Uniform Resource Identifier (URI) Generic Syntax
10
- * @example
11
- * ```typescript
12
- * // Basic usage - validates all URL formats (RFC 3986 compliant)
13
- * const validator = Builder()
14
- * .use(stringUrlPlugin)
15
- * .for<UserProfile>()
16
- * .v("website", (b) => b.string.url())
17
- * .v("profileUrl", (b) => b.string.required().url())
18
- * .build();
19
- *
20
- * // Custom protocols (e.g., allow ftp://)
21
- * builder.v("ftpServer", b => b.string.url({
22
- * protocols: ['ftp:', 'ftps:']
23
- * }))
24
- *
25
- * // Allow URLs without protocol (assumes https://)
26
- * builder.v("domain", b => b.string.url({
27
- * allowWithoutProtocol: true
28
- * }))
29
- *
30
- * // ✅ VALID URL formats (RFC 3986)
31
- * validator.parse({ website: "https://example.com" }); // Standard HTTPS
32
- * validator.parse({ website: "http://www.test.co.uk/path?q=value#frag" }); // Full URL with query and fragment
33
- * validator.parse({ website: "ftp://files.domain.com/file.txt" }); // FTP protocol
34
- * validator.parse({ website: "ws://localhost:3000" }); // WebSocket protocol
35
- * validator.parse({ website: "https://subdomain.example.com:8080/api" }); // With port and path
36
- * validator.parse({ website: "https://127.0.0.1:3000" }); // IP address
37
- * validator.parse({ website: "https://[::1]:8080" }); // IPv6 address
38
- * validator.parse({ website: "mailto:user@example.com" }); // mailto protocol
39
- * validator.parse({ website: "tel:+1-555-123-4567" }); // tel protocol
40
- * validator.parse({ website: "https://user:pass@example.com" }); // With credentials
41
- *
42
- * // With allowWithoutProtocol: true
43
- * const flexValidator = builder.v("site", b => b.string.url({ allowWithoutProtocol: true }));
44
- * flexValidator.parse({ site: "example.com" }); // Assumes https://
45
- * flexValidator.parse({ site: "www.domain.co.uk/path" }); // Assumes https://
46
- *
47
- * // ❌ INVALID URL formats
48
- * validator.parse({ website: "not-a-url" }); // Plain text
49
- * validator.parse({ website: "http://" }); // Missing host
50
- * validator.parse({ website: "://missing-protocol" }); // Missing protocol
51
- * validator.parse({ website: "https://" }); // Missing host after protocol
52
- * validator.parse({ website: "http://.com" }); // Invalid host
53
- * validator.parse({ website: "https://example." }); // Incomplete domain
54
- * validator.parse({ website: "just text with spaces" }); // Contains spaces
55
- * validator.parse({ website: "ftp://[invalid-ipv6]" }); // Invalid IPv6
56
- * validator.parse({ website: "https://exam ple.com" }); // Space in domain
57
- * validator.parse({ website: "" }); // Empty string
58
- * ```
59
- * @params
60
- * - options?: StringUrlOptions - URL validation configuration
61
- * - protocols?: string[] - Allowed protocols (default: all protocols allowed)
62
- * - allowWithoutProtocol?: boolean - Allow URLs without protocol (default: false)
63
- * - messageFactory?: (context: MessageContext) => string - Custom error message factory
64
- * @returns Validation function that returns true if string is a valid URL
65
- * @customError
66
- * ```typescript
67
- * .url({
68
- * messageFactory: ({ path, value }) =>
69
- * `${path} must be a valid URL (received: ${value})`
70
- * })
71
- *
72
- * // Restrict to specific protocols
73
- * .url({
74
- * protocols: ['https:'],
75
- * messageFactory: ({ path }) => `${path} must be a secure HTTPS URL`
76
- * })
77
- * ```
78
- * @since 0.1.0-alpha
79
- */
80
- export interface StringUrlOptions extends ValidationOptions {
81
- /**
82
- * Array of allowed protocols. Default: null (allow all protocols)
83
- * @example ['http:', 'https:', 'ftp:', 'ws:', 'wss:']
84
- */
85
- protocols?: string[];
86
- /**
87
- * Whether to allow URLs without protocol (will default to https://)
88
- * @default false
89
- */
90
- allowWithoutProtocol?: boolean;
91
- }
92
- export declare const stringUrlPlugin: import("../index").TypedPlugin<"stringUrl", "url", (options?: StringUrlOptions) => {
93
- check: (value: any) => boolean;
94
- code: string;
95
- getErrorMessage: (value: any, path: string) => string;
96
- params: StringUrlOptions[];
97
- }, readonly ["string"], "validator", "standard">;
1
+ export * from "./string-url/index";
@@ -1 +1,2 @@
1
- "use strict";var m=Object.defineProperty;var T=Object.getOwnPropertyDescriptor;var p=Object.getOwnPropertyNames;var d=Object.prototype.hasOwnProperty;var g=(e,t)=>{for(var r in t)m(e,r,{get:t[r],enumerable:!0})},c=(e,t,r,s)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of p(t))!d.call(e,o)&&o!==r&&m(e,o,{get:()=>t[o],enumerable:!(s=T(t,o))||s.enumerable});return e};var y=e=>c(m({},"__esModule",{value:!0}),e);var P={};g(P,{stringUrlPlugin:()=>h});module.exports=y(P);var f=(e,t,r,s)=>{let n=(a=>(...i)=>{let l=a(...i);return l&&typeof l=="object"&&"check"in l?{...l,pluginName:s}:l})(r);switch(e){case"conditional":return(a,...i)=>n(a,...i);case"fieldReference":return(a,...i)=>n(a,...i);case"multiFieldReference":return n;case"transform":return a=>n(a);case"arrayElement":return(a,...i)=>n(a,...i);case"context":return a=>n(a);default:return n}};function u(e){let{name:t,methodName:r,allowedTypes:s,category:o,impl:n}=e;return{name:t,methodName:r,allowedTypes:s,category:o,create:()=>f(o,r,n,t)}}var N="stringUrl",x=["string"],h=u({name:"stringUrl",methodName:"url",allowedTypes:x,category:"standard",impl:e=>{let t=e?.code||N,r=e?.protocols||null,s=e?.allowWithoutProtocol||!1,o=e?.messageFactory||(n=>"Invalid URL format");return{check:n=>{if(typeof n!="string")return!0;try{let a=n;s&&!n.includes("://")&&(a=`https://${n}`);let i=new URL(a);return!(r&&!r.includes(i.protocol))}catch{return!1}},code:t,getErrorMessage:(n,a)=>o({path:a,value:n,code:t}),params:e?[e]:[]}}});0&&(module.exports={stringUrlPlugin});
1
+ "use strict";
2
+ module.exports = require("./string-url/index");
@@ -1 +1 @@
1
- var u=(t,o,r,i)=>{let e=(n=>(...a)=>{let l=n(...a);return l&&typeof l=="object"&&"check"in l?{...l,pluginName:i}:l})(r);switch(t){case"conditional":return(n,...a)=>e(n,...a);case"fieldReference":return(n,...a)=>e(n,...a);case"multiFieldReference":return e;case"transform":return n=>e(n);case"arrayElement":return(n,...a)=>e(n,...a);case"context":return n=>e(n);default:return e}};function m(t){let{name:o,methodName:r,allowedTypes:i,category:s,impl:e}=t;return{name:o,methodName:r,allowedTypes:i,category:s,create:()=>u(s,r,e,o)}}var T="stringUrl",p=["string"],c=m({name:"stringUrl",methodName:"url",allowedTypes:p,category:"standard",impl:t=>{let o=t?.code||T,r=t?.protocols||null,i=t?.allowWithoutProtocol||!1,s=t?.messageFactory||(e=>"Invalid URL format");return{check:e=>{if(typeof e!="string")return!0;try{let n=e;i&&!e.includes("://")&&(n=`https://${e}`);let a=new URL(n);return!(r&&!r.includes(a.protocol))}catch{return!1}},code:o,getErrorMessage:(e,n)=>s({path:n,value:e,code:o}),params:t?[t]:[]}}});export{c as stringUrlPlugin};
1
+ export * from "./string-url/index.mjs";
@@ -0,0 +1 @@
1
+ export { transformPlugin } from "./transform";
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.transformPlugin = void 0;
4
+ var transform_1 = require("./transform");
5
+ Object.defineProperty(exports, "transformPlugin", { enumerable: true, get: function () { return transform_1.transformPlugin; } });
@@ -0,0 +1 @@
1
+ export { transformPlugin } from "./transform.mjs";
@@ -0,0 +1,7 @@
1
+ import type { MessageContextExtra } from "../../types";
2
+ import type { SelfReader, TransformOut } from "../../plugin-kit/marker.types";
3
+ export declare const transformPlugin: import("../../plugin-kit/plugin-definition").PluginDefinition<"transform", "transform", readonly ["string", "number", "boolean", "date", "array", "object", "union"], {
4
+ args: readonly [map: SelfReader<unknown>];
5
+ out: TransformOut;
6
+ context: MessageContextExtra;
7
+ }>;
@@ -0,0 +1,35 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.transformPlugin = void 0;
4
+ // ===========================================================================
5
+ // L7 src/plugins/transform/transform.ts
6
+ // `out: TransformOut` is the whole declaration: RuleForOut then DEMANDS that
7
+ // build return a TransformRule, and the chain gives this method its own
8
+ // signature `<R>(map: (value: Present<TValue, TState>) => R) => ...`, so the
9
+ // output type becomes the chain's current type without a cast anywhere.
10
+ //
11
+ // Order is the engine's, not this plugin's (src/runtime/run-field.ts):
12
+ // default -> presence -> gates -> checks -> transforms, and transforms run in
13
+ // parse() only, and only when the field's checks all passed. That is 1.x's
14
+ // mainline order (docs/legacy-spec/plugin-catalog-relational.md), now the ONLY
15
+ // order — the plugin-registry fallback that ran transforms FIRST is gone.
16
+ // A throwing map propagates, exactly as 1.x's mainline did.
17
+ // ===========================================================================
18
+ const create_rule_1 = require("../../plugin-kit/create-rule");
19
+ const plugin_definition_1 = require("../../plugin-kit/plugin-definition");
20
+ /** 1.x's allowedTypes for .transform(): tuple and any are not among them. */
21
+ const TRANSFORM_SLOTS = [
22
+ "string",
23
+ "number",
24
+ "boolean",
25
+ "date",
26
+ "array",
27
+ "object",
28
+ "union",
29
+ ];
30
+ exports.transformPlugin = (0, plugin_definition_1.definePlugin)()({
31
+ name: "transform",
32
+ method: "transform",
33
+ slots: TRANSFORM_SLOTS,
34
+ build: (_ctx, map) => (0, create_rule_1.transform)((value) => map(value)),
35
+ });
@@ -0,0 +1,32 @@
1
+ // ===========================================================================
2
+ // L7 src/plugins/transform/transform.ts
3
+ // `out: TransformOut` is the whole declaration: RuleForOut then DEMANDS that
4
+ // build return a TransformRule, and the chain gives this method its own
5
+ // signature `<R>(map: (value: Present<TValue, TState>) => R) => ...`, so the
6
+ // output type becomes the chain's current type without a cast anywhere.
7
+ //
8
+ // Order is the engine's, not this plugin's (src/runtime/run-field.ts):
9
+ // default -> presence -> gates -> checks -> transforms, and transforms run in
10
+ // parse() only, and only when the field's checks all passed. That is 1.x's
11
+ // mainline order (docs/legacy-spec/plugin-catalog-relational.md), now the ONLY
12
+ // order — the plugin-registry fallback that ran transforms FIRST is gone.
13
+ // A throwing map propagates, exactly as 1.x's mainline did.
14
+ // ===========================================================================
15
+ import { transform } from "../../plugin-kit/create-rule.mjs";
16
+ import { definePlugin } from "../../plugin-kit/plugin-definition.mjs";
17
+ /** 1.x's allowedTypes for .transform(): tuple and any are not among them. */
18
+ const TRANSFORM_SLOTS = [
19
+ "string",
20
+ "number",
21
+ "boolean",
22
+ "date",
23
+ "array",
24
+ "object",
25
+ "union",
26
+ ];
27
+ export const transformPlugin = /*#__PURE__*/ definePlugin()({
28
+ name: "transform",
29
+ method: "transform",
30
+ slots: TRANSFORM_SLOTS,
31
+ build: (_ctx, map) => transform((value) => map(value)),
32
+ });
@@ -1,35 +1 @@
1
- /**
2
- * @luq-plugin
3
- * @name transform
4
- * @category transform
5
- * @description Transforms values after successful validation (type conversion, normalization, computed values)
6
- * @allowedTypes ["string", "number", "boolean", "array", "object", "date", "union"]
7
- * @example
8
- * ```typescript
9
- * // String transformation (lowercase)
10
- * const validator = Builder()
11
- * .use(transformPlugin)
12
- * .for<UserData>()
13
- * .v("email", (b) =>
14
- * b.string.required().email().transform(v => v.toLowerCase())
15
- * )
16
- * .build();
17
- *
18
- * // Number to string conversion
19
- * builder.v("age", b =>
20
- * b.number.required().min(0).transform(v => String(v))
21
- * )
22
- *
23
- * // Array element transformation
24
- * builder.v("tags", b =>
25
- * b.array.transform(tags => tags.map(t => t.trim().toLowerCase()))
26
- * )
27
- * ```
28
- * @params
29
- * - transformFn: (value: T) => U - Transform function that takes input value and returns transformed value
30
- * @returns Validation function with transformation
31
- * @customError
32
- * Transform plugin does not generate errors. Errors in transform function are treated as exceptions.
33
- * @since 0.1.0-alpha
34
- */
35
- export declare const transformPlugin: import("../index").TypedPlugin<"transform", "transform", import("../builder/plugins/plugin-interfaces").TransformPluginImplementation<any, any>, readonly ["string", "number", "boolean", "array", "object", "date", "union"], "validator", "transform">;
1
+ export * from "./transform/index";
@@ -1 +1,2 @@
1
- "use strict";var l=Object.defineProperty;var p=Object.getOwnPropertyDescriptor;var T=Object.getOwnPropertyNames;var d=Object.prototype.hasOwnProperty;var g=(n,e)=>{for(var t in e)l(n,t,{get:e[t],enumerable:!0})},y=(n,e,t,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of T(e))!d.call(n,a)&&a!==t&&l(n,a,{get:()=>e[a],enumerable:!(i=p(e,a))||i.enumerable});return n};var c=n=>y(l({},"__esModule",{value:!0}),n);var x={};g(x,{transformPlugin:()=>h});module.exports=c(x);var f=(n,e,t,i)=>{let o=(r=>(...m)=>{let s=r(...m);return s&&typeof s=="object"&&"check"in s?{...s,pluginName:i}:s})(t);switch(n){case"conditional":return(r,...m)=>o(r,...m);case"fieldReference":return(r,...m)=>o(r,...m);case"multiFieldReference":return o;case"transform":return r=>o(r);case"arrayElement":return(r,...m)=>o(r,...m);case"context":return r=>o(r);default:return o}};function u(n){let{name:e,methodName:t,allowedTypes:i,category:a,impl:o}=n;return{name:e,methodName:t,allowedTypes:i,category:a,create:()=>f(a,t,o,e)}}var N=["string","number","boolean","array","object","date","union"],h=u({name:"transform",methodName:"transform",allowedTypes:N,category:"transform",impl:(n,e)=>{let t=e?.code||"transform";return{check:a=>!0,code:t,getErrorMessage:(a,o)=>"Transform operation failed",params:[n,e],__isTransform:!0,__transformFn:n}}});0&&(module.exports={transformPlugin});
1
+ "use strict";
2
+ module.exports = require("./transform/index");
@@ -1 +1 @@
1
- var u=(a,r,o,s)=>{let n=(e=>(...t)=>{let m=e(...t);return m&&typeof m=="object"&&"check"in m?{...m,pluginName:s}:m})(o);switch(a){case"conditional":return(e,...t)=>n(e,...t);case"fieldReference":return(e,...t)=>n(e,...t);case"multiFieldReference":return n;case"transform":return e=>n(e);case"arrayElement":return(e,...t)=>n(e,...t);case"context":return e=>n(e);default:return n}};function l(a){let{name:r,methodName:o,allowedTypes:s,category:i,impl:n}=a;return{name:r,methodName:o,allowedTypes:s,category:i,create:()=>u(i,o,n,r)}}var p=["string","number","boolean","array","object","date","union"],g=l({name:"transform",methodName:"transform",allowedTypes:p,category:"transform",impl:(a,r)=>{let o=r?.code||"transform";return{check:i=>!0,code:o,getErrorMessage:(i,n)=>"Transform operation failed",params:[a,r],__isTransform:!0,__transformFn:a}}});export{g as transformPlugin};
1
+ export * from "./transform/index.mjs";
@@ -0,0 +1,2 @@
1
+ export { tupleBuilderPlugin } from "./tuple-builder";
2
+ export type { TupleBuilderContext, TupleFailure } from "./tuple-builder";
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.tupleBuilderPlugin = void 0;
4
+ var tuple_builder_1 = require("./tuple-builder");
5
+ Object.defineProperty(exports, "tupleBuilderPlugin", { enumerable: true, get: function () { return tuple_builder_1.tupleBuilderPlugin; } });
@@ -0,0 +1 @@
1
+ export { tupleBuilderPlugin } from "./tuple-builder.mjs";
@@ -0,0 +1,21 @@
1
+ import type { ElementChain, Unchanged } from "../../plugin-kit/marker.types";
2
+ /** Which of the four failures happened. Legacy spelled these as four codes. */
3
+ export type TupleFailure = "notArray" | "lengthMismatch" | "tooShort" | "element";
4
+ export interface TupleBuilderContext {
5
+ readonly failure: TupleFailure;
6
+ readonly positionCount: number;
7
+ readonly index: number;
8
+ readonly actualLength: number;
9
+ }
10
+ /**
11
+ * WHICH argument positions carry a sub-chain cannot be recovered from a
12
+ * plugin's type at run time — a NarrowedChain and a RootPredicate are both
13
+ * plain functions once erased — so src/chain/collect-branch-rules.ts reads it
14
+ * from this declared field. definePlugin's spec does not carry it yet (see
15
+ * needsFromOthers), which is why it is spread on rather than passed in.
16
+ */
17
+ export declare const tupleBuilderPlugin: import("../../plugin-kit/plugin-definition").PluginDefinition<"tupleBuilder", "builder", readonly ["tuple"], {
18
+ args: readonly [positions: readonly ElementChain[], rest?: ElementChain];
19
+ out: Unchanged;
20
+ context: TupleBuilderContext;
21
+ }>;
@@ -0,0 +1,128 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.tupleBuilderPlugin = void 0;
4
+ // ===========================================================================
5
+ // L7 src/plugins/tuple-builder/tuple-builder.ts
6
+ // `b.tuple.builder([position0, position1, ...], rest?)`.
7
+ //
8
+ // Legacy semantics (docs/legacy-spec/plugin-catalog-structural.md#tupleBuilderPlugin):
9
+ // positional element schemas, an optional rest schema reused for every surplus
10
+ // element, exact length without a rest, at-least length with one, and per
11
+ // element the failure carries that element's index.
12
+ //
13
+ // LEGACY BUG FIXED, and it is the whole plugin: legacy's tupleBuilder threw
14
+ // `TypeError: Cannot read properties of undefined (reading 'addValidator')`
15
+ // during build(), through the composable-directly mechanism that reached for a
16
+ // `builder._executionPlan` nobody set. Tuple validation therefore never ran a
17
+ // single line. It needs no separate mechanism here: positions are BRANCHES of
18
+ // an ordinary composite, and the engine compiles them like any other branch.
19
+ //
20
+ // CONTRADICTION A-15: `positions` is an ARRAY of ElementChain markers, so both
21
+ // marker resolvers must descend into the array and resolve each element.
22
+ //
23
+ // `b.tuple` gets no injected type guard (docs/legacy-spec/plugin-contract.md),
24
+ // which is why this plugin — alone among the collection plugins — rejects a
25
+ // non-array instead of passing it through.
26
+ // ===========================================================================
27
+ const plugin_definition_1 = require("../../plugin-kit/plugin-definition");
28
+ const create_rule_1 = require("../../plugin-kit/create-rule");
29
+ const types_1 = require("../../types");
30
+ function checkLength(value, positionCount, hasRest) {
31
+ if (!hasRest && value.length !== positionCount) {
32
+ return (0, types_1.fail)({
33
+ branch: "lengthMismatch",
34
+ expected: positionCount,
35
+ actual: value.length,
36
+ });
37
+ }
38
+ if (hasRest && value.length < positionCount) {
39
+ return (0, types_1.fail)({
40
+ branch: "tooShort",
41
+ expected: positionCount,
42
+ actual: value.length,
43
+ });
44
+ }
45
+ return types_1.PASS;
46
+ }
47
+ /**
48
+ * Branch i is position i; the branch after the last position, when there is
49
+ * one, is the rest schema and every surplus element runs through it.
50
+ */
51
+ function applyPositionally(runners, positionCount, hasRest) {
52
+ return (value, ctx) => {
53
+ if (!(0, types_1.isArray)(value)) {
54
+ return (0, types_1.fail)({ branch: "notArray", expected: "array", actual: value });
55
+ }
56
+ const lengthOutcome = checkLength(value, positionCount, hasRest);
57
+ if (!lengthOutcome.ok)
58
+ return lengthOutcome;
59
+ for (let index = 0; index < value.length; index += 1) {
60
+ const runner = index < positionCount ? runners[index] : runners[positionCount];
61
+ if (runner === undefined)
62
+ continue;
63
+ const outcome = runner.run(value[index], ctx);
64
+ if (!outcome.ok) {
65
+ return (0, types_1.fail)({
66
+ ...outcome.detail,
67
+ index,
68
+ branch: "element",
69
+ actual: value.length,
70
+ });
71
+ }
72
+ }
73
+ return types_1.PASS;
74
+ };
75
+ }
76
+ function readFailure(branchLabel) {
77
+ if (branchLabel === "notArray")
78
+ return "notArray";
79
+ if (branchLabel === "lengthMismatch")
80
+ return "lengthMismatch";
81
+ if (branchLabel === "tooShort")
82
+ return "tooShort";
83
+ return "element";
84
+ }
85
+ function describeFailure(failure, positionCount, actualLength, index) {
86
+ if (failure === "notArray")
87
+ return "Value must be an array";
88
+ if (failure === "lengthMismatch") {
89
+ return `Tuple must have exactly ${String(positionCount)} elements, got ${String(actualLength)}`;
90
+ }
91
+ if (failure === "tooShort") {
92
+ return `Tuple must have at least ${String(positionCount)} elements, got ${String(actualLength)}`;
93
+ }
94
+ return `Validation failed for element ${String(index)}`;
95
+ }
96
+ /**
97
+ * WHICH argument positions carry a sub-chain cannot be recovered from a
98
+ * plugin's type at run time — a NarrowedChain and a RootPredicate are both
99
+ * plain functions once erased — so src/chain/collect-branch-rules.ts reads it
100
+ * from this declared field. definePlugin's spec does not carry it yet (see
101
+ * needsFromOthers), which is why it is spread on rather than passed in.
102
+ */
103
+ exports.tupleBuilderPlugin = (0, plugin_definition_1.definePlugin)()({
104
+ name: "tupleBuilder",
105
+ method: "builder",
106
+ slots: ["tuple"],
107
+ build: (ctx, positions, rest) => {
108
+ const branches = positions.map((rules, index) => (0, create_rule_1.branch)(`position:${String(index)}`, rules));
109
+ if (rest !== undefined)
110
+ branches.push((0, create_rule_1.branch)("rest", rest));
111
+ const positionCount = positions.length;
112
+ return (0, create_rule_1.composite)({
113
+ code: ctx.code,
114
+ messageFactory: ctx.messageFactory,
115
+ severity: ctx.severity,
116
+ branches,
117
+ combine: (runners) => applyPositionally(runners, positionCount, rest !== undefined),
118
+ describe: (detail) => describeFailure(readFailure(detail.branch), positionCount, (0, types_1.isNumber)(detail.actual) ? detail.actual : -1, detail.index ?? -1),
119
+ buildMessageContext: (detail) => ({
120
+ failure: readFailure(detail.branch),
121
+ positionCount,
122
+ index: detail.index ?? -1,
123
+ actualLength: (0, types_1.isNumber)(detail.actual) ? detail.actual : -1,
124
+ }),
125
+ });
126
+ },
127
+ subChainArguments: [0, 1],
128
+ });
@@ -0,0 +1,125 @@
1
+ // ===========================================================================
2
+ // L7 src/plugins/tuple-builder/tuple-builder.ts
3
+ // `b.tuple.builder([position0, position1, ...], rest?)`.
4
+ //
5
+ // Legacy semantics (docs/legacy-spec/plugin-catalog-structural.md#tupleBuilderPlugin):
6
+ // positional element schemas, an optional rest schema reused for every surplus
7
+ // element, exact length without a rest, at-least length with one, and per
8
+ // element the failure carries that element's index.
9
+ //
10
+ // LEGACY BUG FIXED, and it is the whole plugin: legacy's tupleBuilder threw
11
+ // `TypeError: Cannot read properties of undefined (reading 'addValidator')`
12
+ // during build(), through the composable-directly mechanism that reached for a
13
+ // `builder._executionPlan` nobody set. Tuple validation therefore never ran a
14
+ // single line. It needs no separate mechanism here: positions are BRANCHES of
15
+ // an ordinary composite, and the engine compiles them like any other branch.
16
+ //
17
+ // CONTRADICTION A-15: `positions` is an ARRAY of ElementChain markers, so both
18
+ // marker resolvers must descend into the array and resolve each element.
19
+ //
20
+ // `b.tuple` gets no injected type guard (docs/legacy-spec/plugin-contract.md),
21
+ // which is why this plugin — alone among the collection plugins — rejects a
22
+ // non-array instead of passing it through.
23
+ // ===========================================================================
24
+ import { definePlugin } from "../../plugin-kit/plugin-definition.mjs";
25
+ import { branch, composite } from "../../plugin-kit/create-rule.mjs";
26
+ import { fail, isArray, isNumber, PASS } from "../../types/index.mjs";
27
+ function checkLength(value, positionCount, hasRest) {
28
+ if (!hasRest && value.length !== positionCount) {
29
+ return fail({
30
+ branch: "lengthMismatch",
31
+ expected: positionCount,
32
+ actual: value.length,
33
+ });
34
+ }
35
+ if (hasRest && value.length < positionCount) {
36
+ return fail({
37
+ branch: "tooShort",
38
+ expected: positionCount,
39
+ actual: value.length,
40
+ });
41
+ }
42
+ return PASS;
43
+ }
44
+ /**
45
+ * Branch i is position i; the branch after the last position, when there is
46
+ * one, is the rest schema and every surplus element runs through it.
47
+ */
48
+ function applyPositionally(runners, positionCount, hasRest) {
49
+ return (value, ctx) => {
50
+ if (!isArray(value)) {
51
+ return fail({ branch: "notArray", expected: "array", actual: value });
52
+ }
53
+ const lengthOutcome = checkLength(value, positionCount, hasRest);
54
+ if (!lengthOutcome.ok)
55
+ return lengthOutcome;
56
+ for (let index = 0; index < value.length; index += 1) {
57
+ const runner = index < positionCount ? runners[index] : runners[positionCount];
58
+ if (runner === undefined)
59
+ continue;
60
+ const outcome = runner.run(value[index], ctx);
61
+ if (!outcome.ok) {
62
+ return fail({
63
+ ...outcome.detail,
64
+ index,
65
+ branch: "element",
66
+ actual: value.length,
67
+ });
68
+ }
69
+ }
70
+ return PASS;
71
+ };
72
+ }
73
+ function readFailure(branchLabel) {
74
+ if (branchLabel === "notArray")
75
+ return "notArray";
76
+ if (branchLabel === "lengthMismatch")
77
+ return "lengthMismatch";
78
+ if (branchLabel === "tooShort")
79
+ return "tooShort";
80
+ return "element";
81
+ }
82
+ function describeFailure(failure, positionCount, actualLength, index) {
83
+ if (failure === "notArray")
84
+ return "Value must be an array";
85
+ if (failure === "lengthMismatch") {
86
+ return `Tuple must have exactly ${String(positionCount)} elements, got ${String(actualLength)}`;
87
+ }
88
+ if (failure === "tooShort") {
89
+ return `Tuple must have at least ${String(positionCount)} elements, got ${String(actualLength)}`;
90
+ }
91
+ return `Validation failed for element ${String(index)}`;
92
+ }
93
+ /**
94
+ * WHICH argument positions carry a sub-chain cannot be recovered from a
95
+ * plugin's type at run time — a NarrowedChain and a RootPredicate are both
96
+ * plain functions once erased — so src/chain/collect-branch-rules.ts reads it
97
+ * from this declared field. definePlugin's spec does not carry it yet (see
98
+ * needsFromOthers), which is why it is spread on rather than passed in.
99
+ */
100
+ export const tupleBuilderPlugin = /*#__PURE__*/ definePlugin()({
101
+ name: "tupleBuilder",
102
+ method: "builder",
103
+ slots: ["tuple"],
104
+ build: (ctx, positions, rest) => {
105
+ const branches = positions.map((rules, index) => branch(`position:${String(index)}`, rules));
106
+ if (rest !== undefined)
107
+ branches.push(branch("rest", rest));
108
+ const positionCount = positions.length;
109
+ return composite({
110
+ code: ctx.code,
111
+ messageFactory: ctx.messageFactory,
112
+ severity: ctx.severity,
113
+ branches,
114
+ combine: (runners) => applyPositionally(runners, positionCount, rest !== undefined),
115
+ describe: (detail) => describeFailure(readFailure(detail.branch), positionCount, isNumber(detail.actual) ? detail.actual : -1, detail.index ?? -1),
116
+ buildMessageContext: (detail) => ({
117
+ failure: readFailure(detail.branch),
118
+ positionCount,
119
+ index: detail.index ?? -1,
120
+ actualLength: isNumber(detail.actual) ? detail.actual : -1,
121
+ }),
122
+ });
123
+ },
124
+ subChainArguments: [0, 1],
125
+ });
@@ -1,66 +1 @@
1
- /**
2
- * @luq-plugin
3
- * @name tupleBuilder
4
- * @category composable-directly
5
- * @description Validates tuple types (fixed-length arrays with different types for each element)
6
- * @allowedTypes ["tuple"]
7
- * @example
8
- * ```typescript
9
- * // Fixed-length tuple - no options needed
10
- * type Coordinates = [number, number];
11
- *
12
- * const validator = Builder()
13
- * .use(tupleBuilderPlugin)
14
- * .for<{ location: Coordinates }>()
15
- * .v("location", (b) => b.tuple
16
- * .required()
17
- * .builder(
18
- * (a) => a.number.required().min(0),
19
- * (b) => b.number.required().min(0)
20
- * )
21
- * )
22
- * .build();
23
- *
24
- * // Variable-length tuple with rest elements
25
- * type UserData = [string, number, boolean, ...string[]];
26
- *
27
- * const userValidator = Builder()
28
- * .use(tupleBuilderPlugin)
29
- * .for<{ data: UserData }>()
30
- * .v("data", (b) => b.tuple
31
- * .required()
32
- * .builder(
33
- * (a) => a.string.required().min(3), // name
34
- * (b) => b.number.required().min(0), // age
35
- * (c) => c.boolean.required(), // isActive
36
- * { rest: (r) => r.string.optional() } // rest elements
37
- * )
38
- * )
39
- * .build();
40
- * ```
41
- * @params
42
- * - ...builderFns: Array<(context: FieldBuilderContext) => any> - Builder functions for each tuple element
43
- * - options?: { rest?: (context: FieldBuilderContext) => any } - Optional configuration (automatically defaults to {} when omitted)
44
- * @returns Composable validation function
45
- * @customError
46
- * - Returns false if value is not an array
47
- * - Returns false if array length doesn't match tuple definition (without rest)
48
- * - Returns false if any element validation fails
49
- * @since 0.1.0-alpha
50
- */
51
- import type { FieldBuilderContext } from "../core/builder/plugins/plugin-types";
52
- export interface TupleBuilderFunction<TObject extends object, TPlugins> {
53
- (context: FieldBuilderContext<TObject, TPlugins, any>): any;
54
- }
55
- export interface RestBuilderFunction<TObject extends object, TPlugins> {
56
- (context: FieldBuilderContext<TObject, TPlugins, any>): any;
57
- }
58
- export interface TupleBuilderOptions<TObject extends object, TPlugins> {
59
- rest?: RestBuilderFunction<TObject, TPlugins>;
60
- messageFactory?: {
61
- notArray?: (value: unknown) => string;
62
- lengthMismatch?: (expected: number, actual: number) => string;
63
- tooShort?: (minimum: number, actual: number) => string;
64
- };
65
- }
66
- export declare const tupleBuilderPlugin: import("../builder/plugins/composable-directly-plugin").ComposableDirectlyPlugin<"tupleBuilder", "builder", readonly ["tuple"]>;
1
+ export * from "./tuple-builder/index";
@@ -1 +1,2 @@
1
- "use strict";var j=Object.defineProperty;var W=Object.getOwnPropertyDescriptor;var U=Object.getOwnPropertyNames;var I=Object.prototype.hasOwnProperty;var z=(n,e)=>{for(var o in e)j(n,o,{get:e[o],enumerable:!0})},H=(n,e,o,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let t of U(e))!I.call(n,t)&&t!==o&&j(n,t,{get:()=>e[t],enumerable:!(r=W(e,t))||r.enumerable});return n};var G=n=>H(j({},"__esModule",{value:!0}),n);var Z={};z(Z,{tupleBuilderPlugin:()=>X});module.exports=G(Z);var V=Object.freeze({valid:!0}),x=Object.freeze({valid:!1});function O(n,e=[],o){return{_validators:n,_transforms:e,validate:o||(r=>{for(let t=0;t<e.length;t++)if(!n[t].check(r,r))return x;return V})}}function P(n,e,o){return{check:e,name:n,inputType:o?.inputType,outputType:o?.outputType,metadata:o?{severity:o.severity||"error",async:o.async||!1}:void 0}}function R(n,e,o,r){return{name:n,methodName:e,allowedTypes:o,category:"composable",createComposer(t,a){let i=[],d={add(s){return i.push(s),d},build(){return r(i,t,a)}},y=d;return y[e]=function(...s){return y.add(s)},y}}}function E(n,e,o,r){let t=e.methodName,a=null,i=null;n[t]=function(...d){if(a||(a=e.createComposer(o,r)),a.add(d),n[t]=a[t],a){i=a.build();let y=n._executionPlan;if(!(y&&i&&typeof i.validate=="function")){if(i&&i._validators)for(let s of i._validators)y.addValidator(s.name,(l,g)=>{let f=s.check(l,l);return{valid:f,message:f?void 0:`Validation failed for ${s.name}`}})}}return n}}function L(n,e,o,r){return{...R(n,e,o,r),category:"composable-directly"}}function Y(n){switch(n){case"string":return{check:e=>e==null?!0:typeof e=="string",name:"stringType",messageFactory:()=>"Expected string",inputType:"string",outputType:"string",metadata:{severity:"error",async:!1}};case"number":return{check:e=>e==null?!0:typeof e=="number"&&!isNaN(e),name:"numberType",messageFactory:()=>"Expected number",inputType:"number",outputType:"number",metadata:{severity:"error",async:!1}};case"boolean":return{check:e=>e==null?!0:typeof e=="boolean",name:"booleanType",messageFactory:()=>"Expected boolean",inputType:"boolean",outputType:"boolean",metadata:{severity:"error",async:!1}};case"array":return{check:e=>e==null?!0:Array.isArray(e),name:"arrayType",messageFactory:()=>"Expected array",inputType:"array",outputType:"array",metadata:{severity:"error",async:!1}};case"object":return{check:e=>e==null?!0:typeof e=="object"&&e!==null&&!Array.isArray(e),name:"objectType",messageFactory:()=>"Expected object",inputType:"object",outputType:"object",metadata:{severity:"error",async:!1}};case"date":return{check:e=>e==null?!0:e instanceof Date,name:"dateType",messageFactory:()=>"Expected Date",inputType:"date",outputType:"date",metadata:{severity:"error",async:!1}};case"null":return{check:e=>e===null,name:"nullType",messageFactory:()=>"Expected null",inputType:"null",outputType:"null",metadata:{severity:"error",async:!1}};case"any":return{check:()=>!0,name:"anyType",messageFactory:()=>"",inputType:"any",outputType:"any",metadata:{severity:"error",async:!1}};default:return null}}function m(n,e,o,r){let t=r?.validators?[...r.validators]:[];if(!r&&n!=="union"){let d=Y(n);d&&t.push(d)}let a=r?.transforms?[...r.transforms]:[],i={_type:n,_fieldPath:e,_validators:t,_transforms:a,build(){return n==="union"&&t.length===0&&t.push({check:()=>!1,name:"unionGuard",messageFactory:()=>"No union type guards defined",inputType:"union",outputType:"union",metadata:{severity:"error",async:!1}}),{_validators:t,_transforms:a}}};return K(i,n,e,o,t,a),i.refineString=()=>m("string",e,o,{validators:t,transforms:a}),i.refineNumber=()=>m("number",e,o,{validators:t,transforms:a}),i.refineBoolean=()=>m("boolean",e,o,{validators:t,transforms:a}),i.refineArray=()=>m("array",e,o,{validators:t,transforms:a}),i.refineObject=()=>m("object",e,o,{validators:t,transforms:a}),i.refineTuple=()=>m("tuple",e,o,{validators:t,transforms:a}),i.refineUnion=()=>m("union",e,o,{validators:t,transforms:a}),i.refineDate=()=>m("date",e,o,{validators:t,transforms:a}),i.refineAny=()=>m("any",e,o,{validators:t,transforms:a}),i}function K(n,e,o,r,t,a){let i=Object.entries(r),d=i.length;for(let y=0;y<d;y++){let[,s]=i[y];if(!s||typeof s!="object")continue;if(s.category?.startsWith("composable")){if(s.allowedTypes&&!s.allowedTypes.includes(e))continue;E(n,s,o,r);continue}if(typeof s.create!="function"||s.allowedTypes&&!s.allowedTypes.includes(e))continue;let{methodName:l,category:g="standard",name:f}=s,b=s.create();n[l]=function(...w){try{let h=b(...w);if(g==="transform"){let N=q(h,w[0]);a.push(N)}else{let N=J(h,o),M=Q(N,f||l,e,w,h);t.push(M)}}catch{}return n}}}function q(n,e){return typeof n=="function"?e:n?.__isTransform?n.__transformFn:n?.__isCoerce?o=>n.coerce.coerceFn(o):n?.__isDefault?(o,r)=>n.default.applyDefault(o,r):n?.__isPreprocess?(o,r)=>n.preprocess.applyPreprocess(o,r):e||(o=>o)}function J(n,e){return typeof n=="function"?(o,r)=>n(o,{path:e,allValues:r}).valid:n?.check?(o,r)=>n.check(o,r):()=>!1}function Q(n,e,o,r,t){let a={check:n,name:e,code:t?.code||e,pluginName:t?.pluginName||e,getErrorMessage:t?.getErrorMessage,messageFactory:r[r.length-1]?.messageFactory||t?.messageFactory||(()=>"Validation failed"),inputType:o,outputType:o,metadata:t?.metadata||{severity:"error",async:!1}};return t&&(t.shouldSkipAllValidation&&(a.shouldSkipAllValidation=t.shouldSkipAllValidation),t.shouldSkipValidation&&(a.shouldSkipValidation=t.shouldSkipValidation),t.shouldSkipFurtherValidation&&(a.shouldSkipFurtherValidation=t.shouldSkipFurtherValidation),t.skipForNull!==void 0&&(a.skipForNull=t.skipForNull),t.skipForUndefined!==void 0&&(a.skipForUndefined=t.skipForUndefined),t.__isRecursive&&(a.__isRecursive=t.__isRecursive),t.recursive&&(a.recursive=t.recursive)),a}function v(n,e){let o=m("string",n,e),r=m("number",n,e),t=m("boolean",n,e),a=m("array",n,e),i=m("object",n,e),d=m("union",n,e),y=m("tuple",n,e),s=m("date",n,e),l=m("any",n,e);return{string:o,number:r,boolean:t,date:s,array:a,tuple:y,union:d,object:i,any:l}}var D=Array.isArray,S=Object.freeze({code:"TUPLE_NOT_ARRAY",message:"Value must be an array"}),_=Object.freeze({code:"TUPLE_LENGTH_MISMATCH",prefix:"Tuple must have exactly",suffix:"elements, got"}),B=Object.freeze({code:"TUPLE_TOO_SHORT",prefix:"Tuple must have at least",suffix:"elements, got"}),X=L("tupleBuilder","builder",["tuple"],(n,e,o)=>{let r=n[0]||[];if(r.length===0)return O([P("tupleBuilder",()=>!1,{inputType:"tuple",outputType:"tuple"})]);let t=[],a,i=r.length,d=r[i-1],y=d&&typeof d=="object"&&typeof d!="function"&&(Object.prototype.hasOwnProperty.call(d,"rest")||Object.keys(d).length===0),s={};y?(t=r.slice(0,-1),s=d,a=s.rest):t=r;let l=t.length,g=!!a,f=new Array(l);for(let u=0;u<l;u++){let c=v(`${e}[${u}]`,o),p=t[u](c);p&&typeof p.build=="function"?f[u]=p.build():f[u]=null}let b=null;if(a){let u=v(`${e}[rest]`,o),c=a(u);c&&typeof c.build=="function"&&(b=c.build())}let w=u=>{if(u.length!==l)return!1;for(let c=0;c<l;c++){let p=f[c];if(p&&!p.validate(u[c]).valid)return!1}return!0},h=u=>{let c=u.length;if(c<l)return!1;for(let p=0;p<l;p++){let T=f[p];if(T&&!T.validate(u[p]).valid)return!1}if(b&&c>l){for(let p=l;p<c;p++)if(!b.validate(u[p]).valid)return!1}return!0},N=P("tupleBuilder",u=>D(u)?g?h(u):w(u):!1,{inputType:"tuple",outputType:"tuple",severity:"error",async:!1});return O([N],[],u=>{if(!D(u))return{...x,errors:[{path:e,message:s.messageFactory?.notArray?s.messageFactory.notArray(u):S.message,code:S.code}]};let c=u.length;if(!g&&c!==l)return{...x,errors:[{path:e,message:s.messageFactory?.lengthMismatch?s.messageFactory.lengthMismatch(l,c):`${_.prefix} ${l} ${_.suffix} ${c}`,code:_.code}]};if(g&&c<l)return{...x,errors:[{path:e,message:s.messageFactory?.tooShort?s.messageFactory.tooShort(l,c):`${B.prefix} ${l} ${B.suffix} ${c}`,code:B.code}]};let p=[];for(let T=0;T<l;T++){let C=f[T];if(C){let F=u[T],k=C.validate(F,u);if(!k.isValid()){let A=`${e}[${T}]`;if(k.errors&&k.errors.length>0)for(let $ of k.errors)p.push({...$,path:A});else p.push({path:A,message:`Validation failed for element ${T}`,code:"ELEMENT_INVALID"})}}}if(b&&c>l)for(let T=l;T<c;T++){let C=b.validate(u[T]);if(!C.valid&&C.errors){let F=`${e}[${T}]`;for(let k of C.errors)p.push({...k,path:F})}}return p.length>0?{...x,errors:p}:V})});0&&(module.exports={tupleBuilderPlugin});
1
+ "use strict";
2
+ module.exports = require("./tuple-builder/index");