@maroonedog/luq 0.1.2-alpha → 2.1.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 (1319) hide show
  1. package/LICENSE +9 -9
  2. package/README.md +479 -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 +103 -0
  74. package/dist/chain/create-chain-node.mjs +98 -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 +42 -0
  128. package/dist/compile/resolve-conditional-presence.mjs +38 -0
  129. package/dist/compile/resolve-presence.d.ts +6 -0
  130. package/dist/compile/resolve-presence.js +63 -0
  131. package/dist/compile/resolve-presence.mjs +59 -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 +123 -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 +63 -0
  176. package/dist/json-schema/build-from-schema.mjs +56 -0
  177. package/dist/json-schema/collect-definitions.d.ts +51 -0
  178. package/dist/json-schema/collect-definitions.js +111 -0
  179. package/dist/json-schema/collect-definitions.mjs +101 -0
  180. package/dist/json-schema/collect-sub-schema-rules.d.ts +17 -0
  181. package/dist/json-schema/collect-sub-schema-rules.js +112 -0
  182. package/dist/json-schema/collect-sub-schema-rules.mjs +108 -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 +20 -0
  190. package/dist/json-schema/create-structural-context.js +117 -0
  191. package/dist/json-schema/create-structural-context.mjs +113 -0
  192. package/dist/json-schema/declare-additional-properties.d.ts +19 -0
  193. package/dist/json-schema/declare-additional-properties.js +42 -0
  194. package/dist/json-schema/declare-additional-properties.mjs +37 -0
  195. package/dist/json-schema/declare-object-keywords.d.ts +22 -0
  196. package/dist/json-schema/declare-object-keywords.js +133 -0
  197. package/dist/json-schema/declare-object-keywords.mjs +126 -0
  198. package/dist/json-schema/declare-presence.d.ts +18 -0
  199. package/dist/json-schema/declare-presence.js +52 -0
  200. package/dist/json-schema/declare-presence.mjs +49 -0
  201. package/dist/json-schema/declare-required-properties.d.ts +18 -0
  202. package/dist/json-schema/declare-required-properties.js +58 -0
  203. package/dist/json-schema/declare-required-properties.mjs +55 -0
  204. package/dist/json-schema/declare-scalar-keywords.d.ts +11 -0
  205. package/dist/json-schema/declare-scalar-keywords.js +110 -0
  206. package/dist/json-schema/declare-scalar-keywords.mjs +105 -0
  207. package/dist/json-schema/declare-value-keywords.d.ts +23 -0
  208. package/dist/json-schema/declare-value-keywords.js +120 -0
  209. package/dist/json-schema/declare-value-keywords.mjs +112 -0
  210. package/dist/json-schema/draft07-keyword-value.types.d.ts +61 -0
  211. package/dist/json-schema/draft07-keyword-value.types.js +2 -0
  212. package/dist/json-schema/draft07-keyword-value.types.mjs +1 -0
  213. package/dist/json-schema/draft07.types.d.ts +57 -0
  214. package/dist/json-schema/draft07.types.js +28 -0
  215. package/dist/json-schema/draft07.types.mjs +24 -0
  216. package/dist/json-schema/extensions/json-schema/index.d.ts +4 -0
  217. package/dist/json-schema/extensions/json-schema/index.js +27 -0
  218. package/dist/json-schema/extensions/json-schema/index.mjs +11 -0
  219. package/dist/json-schema/extensions/json-schema/json-schema.d.ts +33 -0
  220. package/dist/json-schema/extensions/json-schema/json-schema.js +108 -0
  221. package/dist/json-schema/extensions/json-schema/json-schema.mjs +104 -0
  222. package/dist/json-schema/extensions/json-schema-full-feature/bundle-coverage.d.ts +38 -0
  223. package/dist/json-schema/extensions/json-schema-full-feature/bundle-coverage.js +96 -0
  224. package/dist/json-schema/extensions/json-schema-full-feature/bundle-coverage.mjs +89 -0
  225. package/dist/json-schema/extensions/json-schema-full-feature/bundled-plugins.d.ts +7 -0
  226. package/dist/json-schema/extensions/json-schema-full-feature/bundled-plugins.js +107 -0
  227. package/dist/json-schema/extensions/json-schema-full-feature/bundled-plugins.mjs +104 -0
  228. package/dist/json-schema/extensions/json-schema-full-feature/index.d.ts +5 -0
  229. package/dist/json-schema/extensions/json-schema-full-feature/index.js +25 -0
  230. package/dist/json-schema/extensions/json-schema-full-feature/index.mjs +14 -0
  231. package/dist/json-schema/extensions/json-schema-full-feature/json-schema-full-feature.d.ts +24 -0
  232. package/dist/json-schema/extensions/json-schema-full-feature/json-schema-full-feature.js +66 -0
  233. package/dist/json-schema/extensions/json-schema-full-feature/json-schema-full-feature.mjs +62 -0
  234. package/dist/json-schema/flatten-array-schema.d.ts +25 -0
  235. package/dist/json-schema/flatten-array-schema.js +141 -0
  236. package/dist/json-schema/flatten-array-schema.mjs +134 -0
  237. package/dist/json-schema/flatten-schema.d.ts +20 -0
  238. package/dist/json-schema/flatten-schema.js +162 -0
  239. package/dist/json-schema/flatten-schema.mjs +157 -0
  240. package/dist/json-schema/follow-json-pointer.d.ts +23 -0
  241. package/dist/json-schema/follow-json-pointer.js +87 -0
  242. package/dist/json-schema/follow-json-pointer.mjs +82 -0
  243. package/dist/json-schema/format-map.d.ts +20 -0
  244. package/dist/json-schema/format-map.js +89 -0
  245. package/dist/json-schema/format-map.mjs +84 -0
  246. package/dist/json-schema/index.d.ts +24 -0
  247. package/dist/json-schema/index.js +65 -0
  248. package/dist/json-schema/index.mjs +22 -0
  249. package/dist/json-schema/json-schema-bag.types.d.ts +124 -0
  250. package/dist/json-schema/json-schema-bag.types.js +2 -0
  251. package/dist/json-schema/json-schema-bag.types.mjs +1 -0
  252. package/dist/json-schema/keyword-binding.types.d.ts +50 -0
  253. package/dist/json-schema/keyword-binding.types.js +2 -0
  254. package/dist/json-schema/keyword-binding.types.mjs +1 -0
  255. package/dist/json-schema/keyword-map-array.d.ts +13 -0
  256. package/dist/json-schema/keyword-map-array.js +37 -0
  257. package/dist/json-schema/keyword-map-array.mjs +34 -0
  258. package/dist/json-schema/keyword-map-core.d.ts +8 -0
  259. package/dist/json-schema/keyword-map-core.js +54 -0
  260. package/dist/json-schema/keyword-map-core.mjs +51 -0
  261. package/dist/json-schema/keyword-map-number.d.ts +13 -0
  262. package/dist/json-schema/keyword-map-number.js +33 -0
  263. package/dist/json-schema/keyword-map-number.mjs +30 -0
  264. package/dist/json-schema/keyword-map-object.d.ts +17 -0
  265. package/dist/json-schema/keyword-map-object.js +51 -0
  266. package/dist/json-schema/keyword-map-object.mjs +48 -0
  267. package/dist/json-schema/keyword-map-string.d.ts +20 -0
  268. package/dist/json-schema/keyword-map-string.js +44 -0
  269. package/dist/json-schema/keyword-map-string.mjs +41 -0
  270. package/dist/json-schema/keyword-map.d.ts +32 -0
  271. package/dist/json-schema/keyword-map.js +93 -0
  272. package/dist/json-schema/keyword-map.mjs +84 -0
  273. package/dist/json-schema/ref-resolution-error.d.ts +4 -0
  274. package/dist/json-schema/ref-resolution-error.js +20 -0
  275. package/dist/json-schema/ref-resolution-error.mjs +16 -0
  276. package/dist/json-schema/ref-scope.d.ts +18 -0
  277. package/dist/json-schema/ref-scope.js +37 -0
  278. package/dist/json-schema/ref-scope.mjs +33 -0
  279. package/dist/json-schema/resolve-ref.d.ts +21 -0
  280. package/dist/json-schema/resolve-ref.js +133 -0
  281. package/dist/json-schema/resolve-ref.mjs +128 -0
  282. package/dist/json-schema/schema-registry.d.ts +30 -0
  283. package/dist/json-schema/schema-registry.js +142 -0
  284. package/dist/json-schema/schema-registry.mjs +139 -0
  285. package/dist/json-schema/schema-to-declarations.d.ts +9 -0
  286. package/dist/json-schema/schema-to-declarations.js +123 -0
  287. package/dist/json-schema/schema-to-declarations.mjs +117 -0
  288. package/dist/json-schema/structural-expansion.types.d.ts +90 -0
  289. package/dist/json-schema/structural-expansion.types.js +22 -0
  290. package/dist/json-schema/structural-expansion.types.mjs +18 -0
  291. package/dist/json-schema/unsupported-keyword-error.d.ts +5 -0
  292. package/dist/json-schema/unsupported-keyword-error.js +24 -0
  293. package/dist/json-schema/unsupported-keyword-error.mjs +20 -0
  294. package/dist/json-schema/uri-reference.d.ts +29 -0
  295. package/dist/json-schema/uri-reference.js +118 -0
  296. package/dist/json-schema/uri-reference.mjs +111 -0
  297. package/dist/path/create-array-reader.d.ts +13 -0
  298. package/dist/path/create-array-reader.js +22 -0
  299. package/dist/path/create-array-reader.mjs +19 -0
  300. package/dist/path/create-value-reader.d.ts +26 -0
  301. package/dist/path/create-value-reader.js +71 -0
  302. package/dist/path/create-value-reader.mjs +65 -0
  303. package/dist/path/create-value-writer.d.ts +5 -0
  304. package/dist/path/create-value-writer.js +80 -0
  305. package/dist/path/create-value-writer.mjs +77 -0
  306. package/dist/path/element-of.types.d.ts +1 -0
  307. package/dist/path/element-of.types.js +2 -0
  308. package/dist/path/element-of.types.mjs +1 -0
  309. package/dist/path/field-path.types.d.ts +13 -0
  310. package/dist/path/field-path.types.js +2 -0
  311. package/dist/path/field-path.types.mjs +1 -0
  312. package/dist/path/format-issue-path.d.ts +15 -0
  313. package/dist/path/format-issue-path.js +34 -0
  314. package/dist/path/format-issue-path.mjs +31 -0
  315. package/dist/path/index.d.ts +18 -0
  316. package/dist/path/index.js +26 -0
  317. package/dist/path/index.mjs +7 -0
  318. package/dist/path/leaf-path.types.d.ts +16 -0
  319. package/dist/path/leaf-path.types.js +2 -0
  320. package/dist/path/leaf-path.types.mjs +1 -0
  321. package/dist/path/match-path-pattern.d.ts +9 -0
  322. package/dist/path/match-path-pattern.js +66 -0
  323. package/dist/path/match-path-pattern.mjs +63 -0
  324. package/dist/path/opaque-object.types.d.ts +5 -0
  325. package/dist/path/opaque-object.types.js +2 -0
  326. package/dist/path/opaque-object.types.mjs +1 -0
  327. package/dist/path/parse-field-path.d.ts +25 -0
  328. package/dist/path/parse-field-path.js +75 -0
  329. package/dist/path/parse-field-path.mjs +69 -0
  330. package/dist/path/path-depth.types.d.ts +4 -0
  331. package/dist/path/path-depth.types.js +2 -0
  332. package/dist/path/path-depth.types.mjs +1 -0
  333. package/dist/path/path-segment.types.d.ts +27 -0
  334. package/dist/path/path-segment.types.js +2 -0
  335. package/dist/path/path-segment.types.mjs +1 -0
  336. package/dist/path/property-value-of.types.d.ts +2 -0
  337. package/dist/path/property-value-of.types.js +2 -0
  338. package/dist/path/property-value-of.types.mjs +1 -0
  339. package/dist/path/reserved-segment.d.ts +46 -0
  340. package/dist/path/reserved-segment.js +88 -0
  341. package/dist/path/reserved-segment.mjs +82 -0
  342. package/dist/path/value-at-path.types.d.ts +25 -0
  343. package/dist/path/value-at-path.types.js +2 -0
  344. package/dist/path/value-at-path.types.mjs +1 -0
  345. package/dist/plugin-kit/compiled-rule.d.ts +112 -0
  346. package/dist/plugin-kit/compiled-rule.js +2 -0
  347. package/dist/plugin-kit/compiled-rule.mjs +1 -0
  348. package/dist/plugin-kit/create-conditional-presence.d.ts +25 -0
  349. package/dist/plugin-kit/create-conditional-presence.js +32 -0
  350. package/dist/plugin-kit/create-conditional-presence.mjs +28 -0
  351. package/dist/plugin-kit/create-rule.d.ts +59 -0
  352. package/dist/plugin-kit/create-rule.js +68 -0
  353. package/dist/plugin-kit/create-rule.mjs +58 -0
  354. package/dist/plugin-kit/external-context.d.ts +2 -0
  355. package/dist/plugin-kit/external-context.js +25 -0
  356. package/dist/plugin-kit/external-context.mjs +22 -0
  357. package/dist/plugin-kit/index.d.ts +11 -0
  358. package/dist/plugin-kit/index.js +39 -0
  359. package/dist/plugin-kit/index.mjs +23 -0
  360. package/dist/plugin-kit/is-json-value-equal.d.ts +10 -0
  361. package/dist/plugin-kit/is-json-value-equal.js +81 -0
  362. package/dist/plugin-kit/is-json-value-equal.mjs +77 -0
  363. package/dist/plugin-kit/marker.types.d.ts +114 -0
  364. package/dist/plugin-kit/marker.types.js +2 -0
  365. package/dist/plugin-kit/marker.types.mjs +1 -0
  366. package/dist/plugin-kit/plugin-definition.d.ts +55 -0
  367. package/dist/plugin-kit/plugin-definition.js +26 -0
  368. package/dist/plugin-kit/plugin-definition.mjs +21 -0
  369. package/dist/plugin-kit/rule-build-context.d.ts +27 -0
  370. package/dist/plugin-kit/rule-build-context.js +8 -0
  371. package/dist/plugin-kit/rule-build-context.mjs +5 -0
  372. package/dist/plugin-kit/runtime-args.types.d.ts +27 -0
  373. package/dist/plugin-kit/runtime-args.types.js +2 -0
  374. package/dist/plugin-kit/runtime-args.types.mjs +1 -0
  375. package/dist/plugin-kit.d.ts +1 -0
  376. package/dist/plugin-kit.js +2 -0
  377. package/dist/plugin-kit.mjs +1 -0
  378. package/dist/plugins/array-contains/array-contains.d.ts +22 -0
  379. package/dist/plugins/array-contains/array-contains.js +82 -0
  380. package/dist/plugins/array-contains/array-contains.mjs +79 -0
  381. package/dist/plugins/array-contains/index.d.ts +2 -0
  382. package/dist/plugins/array-contains/index.js +5 -0
  383. package/dist/plugins/array-contains/index.mjs +1 -0
  384. package/dist/plugins/array-each/array-each.d.ts +14 -0
  385. package/dist/plugins/array-each/array-each.js +51 -0
  386. package/dist/plugins/array-each/array-each.mjs +48 -0
  387. package/dist/plugins/array-each/index.d.ts +1 -0
  388. package/dist/plugins/array-each/index.js +5 -0
  389. package/dist/plugins/array-each/index.mjs +1 -0
  390. package/dist/plugins/array-includes/array-includes.d.ts +9 -0
  391. package/dist/plugins/array-includes/array-includes.js +26 -0
  392. package/dist/plugins/array-includes/array-includes.mjs +23 -0
  393. package/dist/plugins/array-includes/index.d.ts +2 -0
  394. package/dist/plugins/array-includes/index.js +5 -0
  395. package/dist/plugins/array-includes/index.mjs +1 -0
  396. package/dist/plugins/array-max-length/array-max-length.d.ts +10 -0
  397. package/dist/plugins/array-max-length/array-max-length.js +29 -0
  398. package/dist/plugins/array-max-length/array-max-length.mjs +26 -0
  399. package/dist/plugins/array-max-length/index.d.ts +2 -0
  400. package/dist/plugins/array-max-length/index.js +5 -0
  401. package/dist/plugins/array-max-length/index.mjs +1 -0
  402. package/dist/plugins/array-min-length/array-min-length.d.ts +10 -0
  403. package/dist/plugins/array-min-length/array-min-length.js +29 -0
  404. package/dist/plugins/array-min-length/array-min-length.mjs +26 -0
  405. package/dist/plugins/array-min-length/index.d.ts +2 -0
  406. package/dist/plugins/array-min-length/index.js +5 -0
  407. package/dist/plugins/array-min-length/index.mjs +1 -0
  408. package/dist/plugins/array-unique/array-unique.d.ts +7 -0
  409. package/dist/plugins/array-unique/array-unique.js +54 -0
  410. package/dist/plugins/array-unique/array-unique.mjs +51 -0
  411. package/dist/plugins/array-unique/index.d.ts +1 -0
  412. package/dist/plugins/array-unique/index.js +5 -0
  413. package/dist/plugins/array-unique/index.mjs +1 -0
  414. package/dist/plugins/arrayContains.d.ts +1 -37
  415. package/dist/plugins/arrayContains.js +2 -1
  416. package/dist/plugins/arrayContains.mjs +1 -1
  417. package/dist/plugins/arrayEach.d.ts +1 -0
  418. package/dist/plugins/arrayEach.js +2 -0
  419. package/dist/plugins/arrayEach.mjs +1 -0
  420. package/dist/plugins/arrayIncludes.d.ts +1 -42
  421. package/dist/plugins/arrayIncludes.js +2 -1
  422. package/dist/plugins/arrayIncludes.mjs +1 -1
  423. package/dist/plugins/arrayMaxLength.d.ts +1 -43
  424. package/dist/plugins/arrayMaxLength.js +2 -1
  425. package/dist/plugins/arrayMaxLength.mjs +1 -1
  426. package/dist/plugins/arrayMinLength.d.ts +1 -43
  427. package/dist/plugins/arrayMinLength.js +2 -1
  428. package/dist/plugins/arrayMinLength.mjs +1 -1
  429. package/dist/plugins/arrayUnique.d.ts +1 -41
  430. package/dist/plugins/arrayUnique.js +2 -1
  431. package/dist/plugins/arrayUnique.mjs +1 -1
  432. package/dist/plugins/boolean-falsy/boolean-falsy.d.ts +7 -0
  433. package/dist/plugins/boolean-falsy/boolean-falsy.js +24 -0
  434. package/dist/plugins/boolean-falsy/boolean-falsy.mjs +21 -0
  435. package/dist/plugins/boolean-falsy/index.d.ts +1 -0
  436. package/dist/plugins/boolean-falsy/index.js +5 -0
  437. package/dist/plugins/boolean-falsy/index.mjs +1 -0
  438. package/dist/plugins/boolean-truthy/boolean-truthy.d.ts +7 -0
  439. package/dist/plugins/boolean-truthy/boolean-truthy.js +24 -0
  440. package/dist/plugins/boolean-truthy/boolean-truthy.mjs +21 -0
  441. package/dist/plugins/boolean-truthy/index.d.ts +1 -0
  442. package/dist/plugins/boolean-truthy/index.js +5 -0
  443. package/dist/plugins/boolean-truthy/index.mjs +1 -0
  444. package/dist/plugins/booleanFalsy.d.ts +1 -41
  445. package/dist/plugins/booleanFalsy.js +2 -1
  446. package/dist/plugins/booleanFalsy.mjs +1 -1
  447. package/dist/plugins/booleanTruthy.d.ts +1 -38
  448. package/dist/plugins/booleanTruthy.js +2 -1
  449. package/dist/plugins/booleanTruthy.mjs +1 -1
  450. package/dist/plugins/compare-field/compare-field.d.ts +13 -0
  451. package/dist/plugins/compare-field/compare-field.js +57 -0
  452. package/dist/plugins/compare-field/compare-field.mjs +54 -0
  453. package/dist/plugins/compare-field/index.d.ts +2 -0
  454. package/dist/plugins/compare-field/index.js +5 -0
  455. package/dist/plugins/compare-field/index.mjs +1 -0
  456. package/dist/plugins/compareField.d.ts +1 -58
  457. package/dist/plugins/compareField.js +2 -1
  458. package/dist/plugins/compareField.mjs +1 -1
  459. package/dist/plugins/conditional-schema/conditional-schema.d.ts +17 -0
  460. package/dist/plugins/conditional-schema/conditional-schema.js +87 -0
  461. package/dist/plugins/conditional-schema/conditional-schema.mjs +84 -0
  462. package/dist/plugins/conditional-schema/index.d.ts +2 -0
  463. package/dist/plugins/conditional-schema/index.js +5 -0
  464. package/dist/plugins/conditional-schema/index.mjs +1 -0
  465. package/dist/plugins/conditionalSchema.d.ts +1 -0
  466. package/dist/plugins/conditionalSchema.js +2 -0
  467. package/dist/plugins/conditionalSchema.mjs +1 -0
  468. package/dist/plugins/custom/custom.d.ts +12 -0
  469. package/dist/plugins/custom/custom.js +82 -0
  470. package/dist/plugins/custom/custom.mjs +79 -0
  471. package/dist/plugins/custom/index.d.ts +1 -0
  472. package/dist/plugins/custom/index.js +5 -0
  473. package/dist/plugins/custom/index.mjs +1 -0
  474. package/dist/plugins/custom.d.ts +1 -60
  475. package/dist/plugins/custom.js +2 -1
  476. package/dist/plugins/custom.mjs +1 -1
  477. package/dist/plugins/from-context/from-context.d.ts +28 -0
  478. package/dist/plugins/from-context/from-context.js +84 -0
  479. package/dist/plugins/from-context/from-context.mjs +81 -0
  480. package/dist/plugins/from-context/index.d.ts +2 -0
  481. package/dist/plugins/from-context/index.js +5 -0
  482. package/dist/plugins/from-context/index.mjs +1 -0
  483. package/dist/plugins/fromContext.d.ts +1 -0
  484. package/dist/plugins/fromContext.js +2 -0
  485. package/dist/plugins/fromContext.mjs +1 -0
  486. package/dist/plugins/index.d.ts +1 -0
  487. package/dist/plugins/index.generated.d.ts +77 -0
  488. package/dist/plugins/index.generated.js +160 -0
  489. package/dist/plugins/index.generated.mjs +79 -0
  490. package/dist/plugins/index.js +2 -0
  491. package/dist/plugins/index.mjs +1 -0
  492. package/dist/plugins/jsonSchema.d.ts +1 -11
  493. package/dist/plugins/jsonSchema.js +2 -1
  494. package/dist/plugins/jsonSchema.mjs +1 -1
  495. package/dist/plugins/jsonSchemaFullFeature.d.ts +1 -31
  496. package/dist/plugins/jsonSchemaFullFeature.js +2 -1
  497. package/dist/plugins/jsonSchemaFullFeature.mjs +1 -1
  498. package/dist/plugins/literal/index.d.ts +1 -0
  499. package/dist/plugins/literal/index.js +5 -0
  500. package/dist/plugins/literal/index.mjs +1 -0
  501. package/dist/plugins/literal/literal.d.ts +10 -0
  502. package/dist/plugins/literal/literal.js +53 -0
  503. package/dist/plugins/literal/literal.mjs +50 -0
  504. package/dist/plugins/literal.d.ts +1 -40
  505. package/dist/plugins/literal.js +2 -1
  506. package/dist/plugins/literal.mjs +1 -1
  507. package/dist/plugins/manifest.generated.d.ts +8 -0
  508. package/dist/plugins/manifest.generated.js +83 -0
  509. package/dist/plugins/manifest.generated.mjs +80 -0
  510. package/dist/plugins/nullable/index.d.ts +1 -0
  511. package/dist/plugins/nullable/index.js +5 -0
  512. package/dist/plugins/nullable/index.mjs +1 -0
  513. package/dist/plugins/nullable/nullable.d.ts +7 -0
  514. package/dist/plugins/nullable/nullable.js +39 -0
  515. package/dist/plugins/nullable/nullable.mjs +36 -0
  516. package/dist/plugins/nullable.d.ts +1 -34
  517. package/dist/plugins/nullable.js +2 -1
  518. package/dist/plugins/nullable.mjs +1 -1
  519. package/dist/plugins/number-finite/index.d.ts +1 -0
  520. package/dist/plugins/number-finite/index.js +5 -0
  521. package/dist/plugins/number-finite/index.mjs +1 -0
  522. package/dist/plugins/number-finite/number-finite.d.ts +7 -0
  523. package/dist/plugins/number-finite/number-finite.js +21 -0
  524. package/dist/plugins/number-finite/number-finite.mjs +18 -0
  525. package/dist/plugins/number-integer/index.d.ts +1 -0
  526. package/dist/plugins/number-integer/index.js +5 -0
  527. package/dist/plugins/number-integer/index.mjs +1 -0
  528. package/dist/plugins/number-integer/number-integer.d.ts +7 -0
  529. package/dist/plugins/number-integer/number-integer.js +21 -0
  530. package/dist/plugins/number-integer/number-integer.mjs +18 -0
  531. package/dist/plugins/number-max/index.d.ts +2 -0
  532. package/dist/plugins/number-max/index.js +5 -0
  533. package/dist/plugins/number-max/index.mjs +1 -0
  534. package/dist/plugins/number-max/number-max.d.ts +11 -0
  535. package/dist/plugins/number-max/number-max.js +36 -0
  536. package/dist/plugins/number-max/number-max.mjs +33 -0
  537. package/dist/plugins/number-min/index.d.ts +2 -0
  538. package/dist/plugins/number-min/index.js +5 -0
  539. package/dist/plugins/number-min/index.mjs +1 -0
  540. package/dist/plugins/number-min/number-min.d.ts +11 -0
  541. package/dist/plugins/number-min/number-min.js +38 -0
  542. package/dist/plugins/number-min/number-min.mjs +35 -0
  543. package/dist/plugins/number-multiple-of/index.d.ts +2 -0
  544. package/dist/plugins/number-multiple-of/index.js +5 -0
  545. package/dist/plugins/number-multiple-of/index.mjs +1 -0
  546. package/dist/plugins/number-multiple-of/is-multiple-of.d.ts +7 -0
  547. package/dist/plugins/number-multiple-of/is-multiple-of.js +61 -0
  548. package/dist/plugins/number-multiple-of/is-multiple-of.mjs +57 -0
  549. package/dist/plugins/number-multiple-of/number-multiple-of.d.ts +9 -0
  550. package/dist/plugins/number-multiple-of/number-multiple-of.js +27 -0
  551. package/dist/plugins/number-multiple-of/number-multiple-of.mjs +24 -0
  552. package/dist/plugins/number-negative/index.d.ts +1 -0
  553. package/dist/plugins/number-negative/index.js +5 -0
  554. package/dist/plugins/number-negative/index.mjs +1 -0
  555. package/dist/plugins/number-negative/number-negative.d.ts +7 -0
  556. package/dist/plugins/number-negative/number-negative.js +21 -0
  557. package/dist/plugins/number-negative/number-negative.mjs +18 -0
  558. package/dist/plugins/number-positive/index.d.ts +1 -0
  559. package/dist/plugins/number-positive/index.js +5 -0
  560. package/dist/plugins/number-positive/index.mjs +1 -0
  561. package/dist/plugins/number-positive/number-positive.d.ts +7 -0
  562. package/dist/plugins/number-positive/number-positive.js +21 -0
  563. package/dist/plugins/number-positive/number-positive.mjs +18 -0
  564. package/dist/plugins/number-range/index.d.ts +2 -0
  565. package/dist/plugins/number-range/index.js +5 -0
  566. package/dist/plugins/number-range/index.mjs +1 -0
  567. package/dist/plugins/number-range/number-range.d.ts +11 -0
  568. package/dist/plugins/number-range/number-range.js +39 -0
  569. package/dist/plugins/number-range/number-range.mjs +36 -0
  570. package/dist/plugins/numberFinite.d.ts +1 -0
  571. package/dist/plugins/numberFinite.js +2 -0
  572. package/dist/plugins/numberFinite.mjs +1 -0
  573. package/dist/plugins/numberInteger.d.ts +1 -41
  574. package/dist/plugins/numberInteger.js +2 -1
  575. package/dist/plugins/numberInteger.mjs +1 -1
  576. package/dist/plugins/numberMax.d.ts +1 -49
  577. package/dist/plugins/numberMax.js +2 -1
  578. package/dist/plugins/numberMax.mjs +1 -1
  579. package/dist/plugins/numberMin.d.ts +1 -49
  580. package/dist/plugins/numberMin.js +2 -1
  581. package/dist/plugins/numberMin.mjs +1 -1
  582. package/dist/plugins/numberMultipleOf.d.ts +1 -42
  583. package/dist/plugins/numberMultipleOf.js +2 -1
  584. package/dist/plugins/numberMultipleOf.mjs +1 -1
  585. package/dist/plugins/numberNegative.d.ts +1 -41
  586. package/dist/plugins/numberNegative.js +2 -1
  587. package/dist/plugins/numberNegative.mjs +1 -1
  588. package/dist/plugins/numberPositive.d.ts +1 -41
  589. package/dist/plugins/numberPositive.js +2 -1
  590. package/dist/plugins/numberPositive.mjs +1 -1
  591. package/dist/plugins/numberRange.d.ts +1 -0
  592. package/dist/plugins/numberRange.js +2 -0
  593. package/dist/plugins/numberRange.mjs +1 -0
  594. package/dist/plugins/object/index.d.ts +2 -0
  595. package/dist/plugins/object/index.js +5 -0
  596. package/dist/plugins/object/index.mjs +1 -0
  597. package/dist/plugins/object/object.d.ts +9 -0
  598. package/dist/plugins/object/object.js +29 -0
  599. package/dist/plugins/object/object.mjs +26 -0
  600. package/dist/plugins/object-additional-properties/index.d.ts +3 -0
  601. package/dist/plugins/object-additional-properties/index.js +11 -0
  602. package/dist/plugins/object-additional-properties/index.mjs +6 -0
  603. package/dist/plugins/object-additional-properties/object-additional-properties-schema.d.ts +14 -0
  604. package/dist/plugins/object-additional-properties/object-additional-properties-schema.js +58 -0
  605. package/dist/plugins/object-additional-properties/object-additional-properties-schema.mjs +55 -0
  606. package/dist/plugins/object-additional-properties/object-additional-properties.d.ts +9 -0
  607. package/dist/plugins/object-additional-properties/object-additional-properties.js +42 -0
  608. package/dist/plugins/object-additional-properties/object-additional-properties.mjs +39 -0
  609. package/dist/plugins/object-additional-properties/select-additional-keys.d.ts +15 -0
  610. package/dist/plugins/object-additional-properties/select-additional-keys.js +51 -0
  611. package/dist/plugins/object-additional-properties/select-additional-keys.mjs +47 -0
  612. package/dist/plugins/object-dependent-required/dependent-required-violation.d.ts +7 -0
  613. package/dist/plugins/object-dependent-required/dependent-required-violation.js +45 -0
  614. package/dist/plugins/object-dependent-required/dependent-required-violation.mjs +40 -0
  615. package/dist/plugins/object-dependent-required/index.d.ts +3 -0
  616. package/dist/plugins/object-dependent-required/index.js +5 -0
  617. package/dist/plugins/object-dependent-required/index.mjs +1 -0
  618. package/dist/plugins/object-dependent-required/object-dependent-required.d.ts +10 -0
  619. package/dist/plugins/object-dependent-required/object-dependent-required.js +27 -0
  620. package/dist/plugins/object-dependent-required/object-dependent-required.mjs +24 -0
  621. package/dist/plugins/object-dependent-schemas/index.d.ts +2 -0
  622. package/dist/plugins/object-dependent-schemas/index.js +5 -0
  623. package/dist/plugins/object-dependent-schemas/index.mjs +1 -0
  624. package/dist/plugins/object-dependent-schemas/object-dependent-schemas.d.ts +16 -0
  625. package/dist/plugins/object-dependent-schemas/object-dependent-schemas.js +47 -0
  626. package/dist/plugins/object-dependent-schemas/object-dependent-schemas.mjs +44 -0
  627. package/dist/plugins/object-max-properties/index.d.ts +2 -0
  628. package/dist/plugins/object-max-properties/index.js +5 -0
  629. package/dist/plugins/object-max-properties/index.mjs +1 -0
  630. package/dist/plugins/object-max-properties/object-max-properties.d.ts +10 -0
  631. package/dist/plugins/object-max-properties/object-max-properties.js +32 -0
  632. package/dist/plugins/object-max-properties/object-max-properties.mjs +29 -0
  633. package/dist/plugins/object-min-properties/index.d.ts +2 -0
  634. package/dist/plugins/object-min-properties/index.js +5 -0
  635. package/dist/plugins/object-min-properties/index.mjs +1 -0
  636. package/dist/plugins/object-min-properties/object-min-properties.d.ts +10 -0
  637. package/dist/plugins/object-min-properties/object-min-properties.js +32 -0
  638. package/dist/plugins/object-min-properties/object-min-properties.mjs +29 -0
  639. package/dist/plugins/object-pattern-properties/index.d.ts +2 -0
  640. package/dist/plugins/object-pattern-properties/index.js +5 -0
  641. package/dist/plugins/object-pattern-properties/index.mjs +1 -0
  642. package/dist/plugins/object-pattern-properties/object-pattern-properties.d.ts +16 -0
  643. package/dist/plugins/object-pattern-properties/object-pattern-properties.js +57 -0
  644. package/dist/plugins/object-pattern-properties/object-pattern-properties.mjs +54 -0
  645. package/dist/plugins/object-property-names/index.d.ts +2 -0
  646. package/dist/plugins/object-property-names/index.js +5 -0
  647. package/dist/plugins/object-property-names/index.mjs +1 -0
  648. package/dist/plugins/object-property-names/object-property-names.d.ts +16 -0
  649. package/dist/plugins/object-property-names/object-property-names.js +47 -0
  650. package/dist/plugins/object-property-names/object-property-names.mjs +44 -0
  651. package/dist/plugins/object-recursively/index.d.ts +2 -0
  652. package/dist/plugins/object-recursively/index.js +5 -0
  653. package/dist/plugins/object-recursively/index.mjs +1 -0
  654. package/dist/plugins/object-recursively/object-recursively.d.ts +11 -0
  655. package/dist/plugins/object-recursively/object-recursively.js +26 -0
  656. package/dist/plugins/object-recursively/object-recursively.mjs +23 -0
  657. package/dist/plugins/object.d.ts +1 -43
  658. package/dist/plugins/object.js +2 -1
  659. package/dist/plugins/object.mjs +1 -1
  660. package/dist/plugins/objectAdditionalProperties.d.ts +1 -51
  661. package/dist/plugins/objectAdditionalProperties.js +2 -1
  662. package/dist/plugins/objectAdditionalProperties.mjs +1 -1
  663. package/dist/plugins/objectDependentRequired.d.ts +1 -42
  664. package/dist/plugins/objectDependentRequired.js +2 -1
  665. package/dist/plugins/objectDependentRequired.mjs +1 -1
  666. package/dist/plugins/objectDependentSchemas.d.ts +1 -40
  667. package/dist/plugins/objectDependentSchemas.js +2 -1
  668. package/dist/plugins/objectDependentSchemas.mjs +1 -1
  669. package/dist/plugins/objectMaxProperties.d.ts +1 -42
  670. package/dist/plugins/objectMaxProperties.js +2 -1
  671. package/dist/plugins/objectMaxProperties.mjs +1 -1
  672. package/dist/plugins/objectMinProperties.d.ts +1 -42
  673. package/dist/plugins/objectMinProperties.js +2 -1
  674. package/dist/plugins/objectMinProperties.mjs +1 -1
  675. package/dist/plugins/objectPatternProperties.d.ts +1 -46
  676. package/dist/plugins/objectPatternProperties.js +2 -1
  677. package/dist/plugins/objectPatternProperties.mjs +1 -1
  678. package/dist/plugins/objectPropertyNames.d.ts +1 -36
  679. package/dist/plugins/objectPropertyNames.js +2 -1
  680. package/dist/plugins/objectPropertyNames.mjs +1 -1
  681. package/dist/plugins/objectRecursively.d.ts +1 -0
  682. package/dist/plugins/objectRecursively.js +2 -0
  683. package/dist/plugins/objectRecursively.mjs +1 -0
  684. package/dist/plugins/one-of/index.d.ts +1 -0
  685. package/dist/plugins/one-of/index.js +5 -0
  686. package/dist/plugins/one-of/index.mjs +1 -0
  687. package/dist/plugins/one-of/one-of.d.ts +7 -0
  688. package/dist/plugins/one-of/one-of.js +67 -0
  689. package/dist/plugins/one-of/one-of.mjs +64 -0
  690. package/dist/plugins/oneOf.d.ts +1 -44
  691. package/dist/plugins/oneOf.js +2 -1
  692. package/dist/plugins/oneOf.mjs +1 -1
  693. package/dist/plugins/optional/index.d.ts +1 -0
  694. package/dist/plugins/optional/index.js +5 -0
  695. package/dist/plugins/optional/index.mjs +1 -0
  696. package/dist/plugins/optional/optional.d.ts +7 -0
  697. package/dist/plugins/optional/optional.js +42 -0
  698. package/dist/plugins/optional/optional.mjs +39 -0
  699. package/dist/plugins/optional-if/index.d.ts +1 -0
  700. package/dist/plugins/optional-if/index.js +5 -0
  701. package/dist/plugins/optional-if/index.mjs +1 -0
  702. package/dist/plugins/optional-if/optional-if.d.ts +11 -0
  703. package/dist/plugins/optional-if/optional-if.js +31 -0
  704. package/dist/plugins/optional-if/optional-if.mjs +28 -0
  705. package/dist/plugins/optional.d.ts +1 -35
  706. package/dist/plugins/optional.js +2 -1
  707. package/dist/plugins/optional.mjs +1 -1
  708. package/dist/plugins/optionalIf.d.ts +1 -0
  709. package/dist/plugins/optionalIf.js +2 -0
  710. package/dist/plugins/optionalIf.mjs +1 -0
  711. package/dist/plugins/or-fail/index.d.ts +1 -0
  712. package/dist/plugins/or-fail/index.js +5 -0
  713. package/dist/plugins/or-fail/index.mjs +1 -0
  714. package/dist/plugins/or-fail/or-fail.d.ts +7 -0
  715. package/dist/plugins/or-fail/or-fail.js +44 -0
  716. package/dist/plugins/or-fail/or-fail.mjs +41 -0
  717. package/dist/plugins/orFail.d.ts +1 -0
  718. package/dist/plugins/orFail.js +2 -0
  719. package/dist/plugins/orFail.mjs +1 -0
  720. package/dist/plugins/read-only/index.d.ts +1 -0
  721. package/dist/plugins/read-only/index.js +5 -0
  722. package/dist/plugins/read-only/index.mjs +1 -0
  723. package/dist/plugins/read-only/read-only.d.ts +7 -0
  724. package/dist/plugins/read-only/read-only.js +52 -0
  725. package/dist/plugins/read-only/read-only.mjs +49 -0
  726. package/dist/plugins/readOnly.d.ts +1 -0
  727. package/dist/plugins/readOnly.js +2 -0
  728. package/dist/plugins/readOnly.mjs +1 -0
  729. package/dist/plugins/readOnlyWriteOnly.d.ts +1 -48
  730. package/dist/plugins/readOnlyWriteOnly.js +2 -1
  731. package/dist/plugins/readOnlyWriteOnly.mjs +1 -1
  732. package/dist/plugins/required/index.d.ts +1 -0
  733. package/dist/plugins/required/index.js +5 -0
  734. package/dist/plugins/required/index.mjs +1 -0
  735. package/dist/plugins/required/required.d.ts +7 -0
  736. package/dist/plugins/required/required.js +42 -0
  737. package/dist/plugins/required/required.mjs +39 -0
  738. package/dist/plugins/required-if/index.d.ts +1 -0
  739. package/dist/plugins/required-if/index.js +5 -0
  740. package/dist/plugins/required-if/index.mjs +1 -0
  741. package/dist/plugins/required-if/required-if.d.ts +11 -0
  742. package/dist/plugins/required-if/required-if.js +34 -0
  743. package/dist/plugins/required-if/required-if.mjs +31 -0
  744. package/dist/plugins/required.d.ts +1 -45
  745. package/dist/plugins/required.js +2 -1
  746. package/dist/plugins/required.mjs +1 -1
  747. package/dist/plugins/requiredIf.d.ts +1 -66
  748. package/dist/plugins/requiredIf.js +2 -1
  749. package/dist/plugins/requiredIf.mjs +1 -1
  750. package/dist/plugins/skip/index.d.ts +1 -0
  751. package/dist/plugins/skip/index.js +5 -0
  752. package/dist/plugins/skip/index.mjs +1 -0
  753. package/dist/plugins/skip/skip.d.ts +7 -0
  754. package/dist/plugins/skip/skip.js +22 -0
  755. package/dist/plugins/skip/skip.mjs +19 -0
  756. package/dist/plugins/skip.d.ts +1 -57
  757. package/dist/plugins/skip.js +2 -1
  758. package/dist/plugins/skip.mjs +1 -1
  759. package/dist/plugins/stitch/index.d.ts +2 -0
  760. package/dist/plugins/stitch/index.js +5 -0
  761. package/dist/plugins/stitch/index.mjs +1 -0
  762. package/dist/plugins/stitch/stitch.d.ts +30 -0
  763. package/dist/plugins/stitch/stitch.js +72 -0
  764. package/dist/plugins/stitch/stitch.mjs +69 -0
  765. package/dist/plugins/stitch.d.ts +1 -0
  766. package/dist/plugins/stitch.js +2 -0
  767. package/dist/plugins/stitch.mjs +1 -0
  768. package/dist/plugins/string-alphanumeric/index.d.ts +1 -0
  769. package/dist/plugins/string-alphanumeric/index.js +5 -0
  770. package/dist/plugins/string-alphanumeric/index.mjs +1 -0
  771. package/dist/plugins/string-alphanumeric/string-alphanumeric.d.ts +8 -0
  772. package/dist/plugins/string-alphanumeric/string-alphanumeric.js +39 -0
  773. package/dist/plugins/string-alphanumeric/string-alphanumeric.mjs +36 -0
  774. package/dist/plugins/string-base64/index.d.ts +1 -0
  775. package/dist/plugins/string-base64/index.js +5 -0
  776. package/dist/plugins/string-base64/index.mjs +1 -0
  777. package/dist/plugins/string-base64/string-base64.d.ts +12 -0
  778. package/dist/plugins/string-base64/string-base64.js +40 -0
  779. package/dist/plugins/string-base64/string-base64.mjs +37 -0
  780. package/dist/plugins/string-content-encoding/content-encoding-checks.d.ts +4 -0
  781. package/dist/plugins/string-content-encoding/content-encoding-checks.js +67 -0
  782. package/dist/plugins/string-content-encoding/content-encoding-checks.mjs +64 -0
  783. package/dist/plugins/string-content-encoding/index.d.ts +2 -0
  784. package/dist/plugins/string-content-encoding/index.js +5 -0
  785. package/dist/plugins/string-content-encoding/index.mjs +1 -0
  786. package/dist/plugins/string-content-encoding/string-content-encoding.d.ts +10 -0
  787. package/dist/plugins/string-content-encoding/string-content-encoding.js +40 -0
  788. package/dist/plugins/string-content-encoding/string-content-encoding.mjs +37 -0
  789. package/dist/plugins/string-content-media-type/index.d.ts +1 -0
  790. package/dist/plugins/string-content-media-type/index.js +5 -0
  791. package/dist/plugins/string-content-media-type/index.mjs +1 -0
  792. package/dist/plugins/string-content-media-type/media-type-checks.d.ts +3 -0
  793. package/dist/plugins/string-content-media-type/media-type-checks.js +46 -0
  794. package/dist/plugins/string-content-media-type/media-type-checks.mjs +43 -0
  795. package/dist/plugins/string-content-media-type/string-content-media-type.d.ts +8 -0
  796. package/dist/plugins/string-content-media-type/string-content-media-type.js +41 -0
  797. package/dist/plugins/string-content-media-type/string-content-media-type.mjs +38 -0
  798. package/dist/plugins/string-date/calendar-date.d.ts +3 -0
  799. package/dist/plugins/string-date/calendar-date.js +24 -0
  800. package/dist/plugins/string-date/calendar-date.mjs +20 -0
  801. package/dist/plugins/string-date/index.d.ts +1 -0
  802. package/dist/plugins/string-date/index.js +5 -0
  803. package/dist/plugins/string-date/index.mjs +1 -0
  804. package/dist/plugins/string-date/string-date.d.ts +7 -0
  805. package/dist/plugins/string-date/string-date.js +42 -0
  806. package/dist/plugins/string-date/string-date.mjs +39 -0
  807. package/dist/plugins/string-datetime/calendar-date.d.ts +2 -0
  808. package/dist/plugins/string-datetime/calendar-date.js +24 -0
  809. package/dist/plugins/string-datetime/calendar-date.mjs +20 -0
  810. package/dist/plugins/string-datetime/index.d.ts +1 -0
  811. package/dist/plugins/string-datetime/index.js +5 -0
  812. package/dist/plugins/string-datetime/index.mjs +1 -0
  813. package/dist/plugins/string-datetime/string-datetime.d.ts +12 -0
  814. package/dist/plugins/string-datetime/string-datetime.js +67 -0
  815. package/dist/plugins/string-datetime/string-datetime.mjs +64 -0
  816. package/dist/plugins/string-duration/index.d.ts +1 -0
  817. package/dist/plugins/string-duration/index.js +5 -0
  818. package/dist/plugins/string-duration/index.mjs +1 -0
  819. package/dist/plugins/string-duration/string-duration.d.ts +7 -0
  820. package/dist/plugins/string-duration/string-duration.js +31 -0
  821. package/dist/plugins/string-duration/string-duration.mjs +28 -0
  822. package/dist/plugins/string-email/index.d.ts +1 -0
  823. package/dist/plugins/string-email/index.js +5 -0
  824. package/dist/plugins/string-email/index.mjs +1 -0
  825. package/dist/plugins/string-email/string-email.d.ts +14 -0
  826. package/dist/plugins/string-email/string-email.js +58 -0
  827. package/dist/plugins/string-email/string-email.mjs +55 -0
  828. package/dist/plugins/string-ends-with/index.d.ts +1 -0
  829. package/dist/plugins/string-ends-with/index.js +5 -0
  830. package/dist/plugins/string-ends-with/index.mjs +1 -0
  831. package/dist/plugins/string-ends-with/string-ends-with.d.ts +8 -0
  832. package/dist/plugins/string-ends-with/string-ends-with.js +30 -0
  833. package/dist/plugins/string-ends-with/string-ends-with.mjs +27 -0
  834. package/dist/plugins/string-exact-length/index.d.ts +1 -0
  835. package/dist/plugins/string-exact-length/index.js +5 -0
  836. package/dist/plugins/string-exact-length/index.mjs +1 -0
  837. package/dist/plugins/string-exact-length/string-exact-length.d.ts +11 -0
  838. package/dist/plugins/string-exact-length/string-exact-length.js +34 -0
  839. package/dist/plugins/string-exact-length/string-exact-length.mjs +31 -0
  840. package/dist/plugins/string-hostname/index.d.ts +1 -0
  841. package/dist/plugins/string-hostname/index.js +5 -0
  842. package/dist/plugins/string-hostname/index.mjs +1 -0
  843. package/dist/plugins/string-hostname/string-hostname.d.ts +7 -0
  844. package/dist/plugins/string-hostname/string-hostname.js +30 -0
  845. package/dist/plugins/string-hostname/string-hostname.mjs +27 -0
  846. package/dist/plugins/string-idn-email/idn-email.d.ts +1 -0
  847. package/dist/plugins/string-idn-email/idn-email.js +85 -0
  848. package/dist/plugins/string-idn-email/idn-email.mjs +82 -0
  849. package/dist/plugins/string-idn-email/index.d.ts +1 -0
  850. package/dist/plugins/string-idn-email/index.js +5 -0
  851. package/dist/plugins/string-idn-email/index.mjs +1 -0
  852. package/dist/plugins/string-idn-email/string-idn-email.d.ts +7 -0
  853. package/dist/plugins/string-idn-email/string-idn-email.js +29 -0
  854. package/dist/plugins/string-idn-email/string-idn-email.mjs +26 -0
  855. package/dist/plugins/string-idn-hostname/idn-hostname.d.ts +1 -0
  856. package/dist/plugins/string-idn-hostname/idn-hostname.js +72 -0
  857. package/dist/plugins/string-idn-hostname/idn-hostname.mjs +69 -0
  858. package/dist/plugins/string-idn-hostname/index.d.ts +1 -0
  859. package/dist/plugins/string-idn-hostname/index.js +5 -0
  860. package/dist/plugins/string-idn-hostname/index.mjs +1 -0
  861. package/dist/plugins/string-idn-hostname/string-idn-hostname.d.ts +7 -0
  862. package/dist/plugins/string-idn-hostname/string-idn-hostname.js +31 -0
  863. package/dist/plugins/string-idn-hostname/string-idn-hostname.mjs +28 -0
  864. package/dist/plugins/string-ipv4/index.d.ts +1 -0
  865. package/dist/plugins/string-ipv4/index.js +5 -0
  866. package/dist/plugins/string-ipv4/index.mjs +1 -0
  867. package/dist/plugins/string-ipv4/string-ipv4.d.ts +7 -0
  868. package/dist/plugins/string-ipv4/string-ipv4.js +32 -0
  869. package/dist/plugins/string-ipv4/string-ipv4.mjs +29 -0
  870. package/dist/plugins/string-ipv6/index.d.ts +1 -0
  871. package/dist/plugins/string-ipv6/index.js +5 -0
  872. package/dist/plugins/string-ipv6/index.mjs +1 -0
  873. package/dist/plugins/string-ipv6/ipv6-address.d.ts +2 -0
  874. package/dist/plugins/string-ipv6/ipv6-address.js +70 -0
  875. package/dist/plugins/string-ipv6/ipv6-address.mjs +67 -0
  876. package/dist/plugins/string-ipv6/string-ipv6.d.ts +7 -0
  877. package/dist/plugins/string-ipv6/string-ipv6.js +27 -0
  878. package/dist/plugins/string-ipv6/string-ipv6.mjs +24 -0
  879. package/dist/plugins/string-iri/control-character.d.ts +1 -0
  880. package/dist/plugins/string-iri/control-character.js +21 -0
  881. package/dist/plugins/string-iri/control-character.mjs +18 -0
  882. package/dist/plugins/string-iri/index.d.ts +1 -0
  883. package/dist/plugins/string-iri/index.js +5 -0
  884. package/dist/plugins/string-iri/index.mjs +1 -0
  885. package/dist/plugins/string-iri/string-iri.d.ts +7 -0
  886. package/dist/plugins/string-iri/string-iri.js +49 -0
  887. package/dist/plugins/string-iri/string-iri.mjs +46 -0
  888. package/dist/plugins/string-iri-reference/control-character.d.ts +1 -0
  889. package/dist/plugins/string-iri-reference/control-character.js +21 -0
  890. package/dist/plugins/string-iri-reference/control-character.mjs +18 -0
  891. package/dist/plugins/string-iri-reference/index.d.ts +1 -0
  892. package/dist/plugins/string-iri-reference/index.js +5 -0
  893. package/dist/plugins/string-iri-reference/index.mjs +1 -0
  894. package/dist/plugins/string-iri-reference/iri-reference.d.ts +1 -0
  895. package/dist/plugins/string-iri-reference/iri-reference.js +39 -0
  896. package/dist/plugins/string-iri-reference/iri-reference.mjs +36 -0
  897. package/dist/plugins/string-iri-reference/string-iri-reference.d.ts +7 -0
  898. package/dist/plugins/string-iri-reference/string-iri-reference.js +26 -0
  899. package/dist/plugins/string-iri-reference/string-iri-reference.mjs +23 -0
  900. package/dist/plugins/string-json-pointer/index.d.ts +1 -0
  901. package/dist/plugins/string-json-pointer/index.js +5 -0
  902. package/dist/plugins/string-json-pointer/index.mjs +1 -0
  903. package/dist/plugins/string-json-pointer/string-json-pointer.d.ts +7 -0
  904. package/dist/plugins/string-json-pointer/string-json-pointer.js +35 -0
  905. package/dist/plugins/string-json-pointer/string-json-pointer.mjs +32 -0
  906. package/dist/plugins/string-max/index.d.ts +1 -0
  907. package/dist/plugins/string-max/index.js +5 -0
  908. package/dist/plugins/string-max/index.mjs +1 -0
  909. package/dist/plugins/string-max/string-max.d.ts +11 -0
  910. package/dist/plugins/string-max/string-max.js +34 -0
  911. package/dist/plugins/string-max/string-max.mjs +31 -0
  912. package/dist/plugins/string-min/index.d.ts +1 -0
  913. package/dist/plugins/string-min/index.js +5 -0
  914. package/dist/plugins/string-min/index.mjs +1 -0
  915. package/dist/plugins/string-min/string-min.d.ts +11 -0
  916. package/dist/plugins/string-min/string-min.js +37 -0
  917. package/dist/plugins/string-min/string-min.mjs +34 -0
  918. package/dist/plugins/string-pattern/index.d.ts +1 -0
  919. package/dist/plugins/string-pattern/index.js +5 -0
  920. package/dist/plugins/string-pattern/index.mjs +1 -0
  921. package/dist/plugins/string-pattern/string-pattern.d.ts +8 -0
  922. package/dist/plugins/string-pattern/string-pattern.js +49 -0
  923. package/dist/plugins/string-pattern/string-pattern.mjs +46 -0
  924. package/dist/plugins/string-regex/index.d.ts +1 -0
  925. package/dist/plugins/string-regex/index.js +5 -0
  926. package/dist/plugins/string-regex/index.mjs +1 -0
  927. package/dist/plugins/string-regex/is-ecma262-regex.d.ts +2 -0
  928. package/dist/plugins/string-regex/is-ecma262-regex.js +25 -0
  929. package/dist/plugins/string-regex/is-ecma262-regex.mjs +22 -0
  930. package/dist/plugins/string-regex/string-regex.d.ts +7 -0
  931. package/dist/plugins/string-regex/string-regex.js +28 -0
  932. package/dist/plugins/string-regex/string-regex.mjs +25 -0
  933. package/dist/plugins/string-relative-json-pointer/index.d.ts +1 -0
  934. package/dist/plugins/string-relative-json-pointer/index.js +5 -0
  935. package/dist/plugins/string-relative-json-pointer/index.mjs +1 -0
  936. package/dist/plugins/string-relative-json-pointer/string-relative-json-pointer.d.ts +7 -0
  937. package/dist/plugins/string-relative-json-pointer/string-relative-json-pointer.js +42 -0
  938. package/dist/plugins/string-relative-json-pointer/string-relative-json-pointer.mjs +39 -0
  939. package/dist/plugins/string-starts-with/index.d.ts +1 -0
  940. package/dist/plugins/string-starts-with/index.js +5 -0
  941. package/dist/plugins/string-starts-with/index.mjs +1 -0
  942. package/dist/plugins/string-starts-with/string-starts-with.d.ts +8 -0
  943. package/dist/plugins/string-starts-with/string-starts-with.js +30 -0
  944. package/dist/plugins/string-starts-with/string-starts-with.mjs +27 -0
  945. package/dist/plugins/string-time/index.d.ts +1 -0
  946. package/dist/plugins/string-time/index.js +5 -0
  947. package/dist/plugins/string-time/index.mjs +1 -0
  948. package/dist/plugins/string-time/string-time.d.ts +12 -0
  949. package/dist/plugins/string-time/string-time.js +37 -0
  950. package/dist/plugins/string-time/string-time.mjs +34 -0
  951. package/dist/plugins/string-uri-reference/index.d.ts +1 -0
  952. package/dist/plugins/string-uri-reference/index.js +5 -0
  953. package/dist/plugins/string-uri-reference/index.mjs +1 -0
  954. package/dist/plugins/string-uri-reference/string-uri-reference.d.ts +7 -0
  955. package/dist/plugins/string-uri-reference/string-uri-reference.js +28 -0
  956. package/dist/plugins/string-uri-reference/string-uri-reference.mjs +25 -0
  957. package/dist/plugins/string-uri-reference/uri-reference.d.ts +1 -0
  958. package/dist/plugins/string-uri-reference/uri-reference.js +71 -0
  959. package/dist/plugins/string-uri-reference/uri-reference.mjs +68 -0
  960. package/dist/plugins/string-uri-template/index.d.ts +1 -0
  961. package/dist/plugins/string-uri-template/index.js +5 -0
  962. package/dist/plugins/string-uri-template/index.mjs +1 -0
  963. package/dist/plugins/string-uri-template/string-uri-template.d.ts +7 -0
  964. package/dist/plugins/string-uri-template/string-uri-template.js +26 -0
  965. package/dist/plugins/string-uri-template/string-uri-template.mjs +23 -0
  966. package/dist/plugins/string-uri-template/uri-template.d.ts +1 -0
  967. package/dist/plugins/string-uri-template/uri-template.js +59 -0
  968. package/dist/plugins/string-uri-template/uri-template.mjs +56 -0
  969. package/dist/plugins/string-url/index.d.ts +1 -0
  970. package/dist/plugins/string-url/index.js +5 -0
  971. package/dist/plugins/string-url/index.mjs +1 -0
  972. package/dist/plugins/string-url/string-url.d.ts +14 -0
  973. package/dist/plugins/string-url/string-url.js +55 -0
  974. package/dist/plugins/string-url/string-url.mjs +52 -0
  975. package/dist/plugins/stringAlphanumeric.d.ts +1 -0
  976. package/dist/plugins/stringAlphanumeric.js +2 -0
  977. package/dist/plugins/stringAlphanumeric.mjs +1 -0
  978. package/dist/plugins/stringBase64.d.ts +1 -119
  979. package/dist/plugins/stringBase64.js +2 -1
  980. package/dist/plugins/stringBase64.mjs +1 -1
  981. package/dist/plugins/stringContentEncoding.d.ts +1 -43
  982. package/dist/plugins/stringContentEncoding.js +2 -1
  983. package/dist/plugins/stringContentEncoding.mjs +1 -1
  984. package/dist/plugins/stringContentMediaType.d.ts +1 -47
  985. package/dist/plugins/stringContentMediaType.js +2 -1
  986. package/dist/plugins/stringContentMediaType.mjs +1 -1
  987. package/dist/plugins/stringDate.d.ts +1 -48
  988. package/dist/plugins/stringDate.js +2 -1
  989. package/dist/plugins/stringDate.mjs +1 -1
  990. package/dist/plugins/stringDatetime.d.ts +1 -108
  991. package/dist/plugins/stringDatetime.js +2 -1
  992. package/dist/plugins/stringDatetime.mjs +1 -1
  993. package/dist/plugins/stringDuration.d.ts +1 -41
  994. package/dist/plugins/stringDuration.js +2 -1
  995. package/dist/plugins/stringDuration.mjs +1 -1
  996. package/dist/plugins/stringEmail.d.ts +1 -81
  997. package/dist/plugins/stringEmail.js +2 -1
  998. package/dist/plugins/stringEmail.mjs +1 -1
  999. package/dist/plugins/stringEndsWith.d.ts +1 -0
  1000. package/dist/plugins/stringEndsWith.js +2 -0
  1001. package/dist/plugins/stringEndsWith.mjs +1 -0
  1002. package/dist/plugins/stringExactLength.d.ts +1 -0
  1003. package/dist/plugins/stringExactLength.js +2 -0
  1004. package/dist/plugins/stringExactLength.mjs +1 -0
  1005. package/dist/plugins/stringHostname.d.ts +1 -104
  1006. package/dist/plugins/stringHostname.js +2 -1
  1007. package/dist/plugins/stringHostname.mjs +1 -1
  1008. package/dist/plugins/stringIdnEmail.d.ts +1 -0
  1009. package/dist/plugins/stringIdnEmail.js +2 -0
  1010. package/dist/plugins/stringIdnEmail.mjs +1 -0
  1011. package/dist/plugins/stringIdnHostname.d.ts +1 -0
  1012. package/dist/plugins/stringIdnHostname.js +2 -0
  1013. package/dist/plugins/stringIdnHostname.mjs +1 -0
  1014. package/dist/plugins/stringIpv4.d.ts +1 -85
  1015. package/dist/plugins/stringIpv4.js +2 -1
  1016. package/dist/plugins/stringIpv4.mjs +1 -1
  1017. package/dist/plugins/stringIpv6.d.ts +1 -104
  1018. package/dist/plugins/stringIpv6.js +2 -1
  1019. package/dist/plugins/stringIpv6.mjs +1 -1
  1020. package/dist/plugins/stringIri.d.ts +1 -117
  1021. package/dist/plugins/stringIri.js +2 -1
  1022. package/dist/plugins/stringIri.mjs +1 -1
  1023. package/dist/plugins/stringIriReference.d.ts +1 -43
  1024. package/dist/plugins/stringIriReference.js +2 -1
  1025. package/dist/plugins/stringIriReference.mjs +1 -1
  1026. package/dist/plugins/stringJsonPointer.d.ts +1 -107
  1027. package/dist/plugins/stringJsonPointer.js +2 -1
  1028. package/dist/plugins/stringJsonPointer.mjs +1 -1
  1029. package/dist/plugins/stringMax.d.ts +1 -43
  1030. package/dist/plugins/stringMax.js +2 -1
  1031. package/dist/plugins/stringMax.mjs +1 -1
  1032. package/dist/plugins/stringMin.d.ts +1 -43
  1033. package/dist/plugins/stringMin.js +2 -1
  1034. package/dist/plugins/stringMin.mjs +1 -1
  1035. package/dist/plugins/stringPattern.d.ts +1 -40
  1036. package/dist/plugins/stringPattern.js +2 -1
  1037. package/dist/plugins/stringPattern.mjs +1 -1
  1038. package/dist/plugins/stringRegex.d.ts +1 -0
  1039. package/dist/plugins/stringRegex.js +2 -0
  1040. package/dist/plugins/stringRegex.mjs +1 -0
  1041. package/dist/plugins/stringRelativeJsonPointer.d.ts +1 -42
  1042. package/dist/plugins/stringRelativeJsonPointer.js +2 -1
  1043. package/dist/plugins/stringRelativeJsonPointer.mjs +1 -1
  1044. package/dist/plugins/stringStartsWith.d.ts +1 -0
  1045. package/dist/plugins/stringStartsWith.js +2 -0
  1046. package/dist/plugins/stringStartsWith.mjs +1 -0
  1047. package/dist/plugins/stringTime.d.ts +1 -39
  1048. package/dist/plugins/stringTime.js +2 -1
  1049. package/dist/plugins/stringTime.mjs +1 -1
  1050. package/dist/plugins/stringUriReference.d.ts +1 -0
  1051. package/dist/plugins/stringUriReference.js +2 -0
  1052. package/dist/plugins/stringUriReference.mjs +1 -0
  1053. package/dist/plugins/stringUriTemplate.d.ts +1 -43
  1054. package/dist/plugins/stringUriTemplate.js +2 -1
  1055. package/dist/plugins/stringUriTemplate.mjs +1 -1
  1056. package/dist/plugins/stringUrl.d.ts +1 -97
  1057. package/dist/plugins/stringUrl.js +2 -1
  1058. package/dist/plugins/stringUrl.mjs +1 -1
  1059. package/dist/plugins/transform/index.d.ts +1 -0
  1060. package/dist/plugins/transform/index.js +5 -0
  1061. package/dist/plugins/transform/index.mjs +1 -0
  1062. package/dist/plugins/transform/transform.d.ts +7 -0
  1063. package/dist/plugins/transform/transform.js +35 -0
  1064. package/dist/plugins/transform/transform.mjs +32 -0
  1065. package/dist/plugins/transform.d.ts +1 -35
  1066. package/dist/plugins/transform.js +2 -1
  1067. package/dist/plugins/transform.mjs +1 -1
  1068. package/dist/plugins/tuple-builder/index.d.ts +2 -0
  1069. package/dist/plugins/tuple-builder/index.js +5 -0
  1070. package/dist/plugins/tuple-builder/index.mjs +1 -0
  1071. package/dist/plugins/tuple-builder/tuple-builder.d.ts +21 -0
  1072. package/dist/plugins/tuple-builder/tuple-builder.js +128 -0
  1073. package/dist/plugins/tuple-builder/tuple-builder.mjs +125 -0
  1074. package/dist/plugins/tupleBuilder.d.ts +1 -66
  1075. package/dist/plugins/tupleBuilder.js +2 -1
  1076. package/dist/plugins/tupleBuilder.mjs +1 -1
  1077. package/dist/plugins/union-guard/index.d.ts +1 -0
  1078. package/dist/plugins/union-guard/index.js +5 -0
  1079. package/dist/plugins/union-guard/index.mjs +1 -0
  1080. package/dist/plugins/union-guard/union-guard.d.ts +14 -0
  1081. package/dist/plugins/union-guard/union-guard.js +56 -0
  1082. package/dist/plugins/union-guard/union-guard.mjs +53 -0
  1083. package/dist/plugins/unionGuard.d.ts +1 -0
  1084. package/dist/plugins/unionGuard.js +2 -0
  1085. package/dist/plugins/unionGuard.mjs +1 -0
  1086. package/dist/plugins/uuid/index.d.ts +1 -0
  1087. package/dist/plugins/uuid/index.js +5 -0
  1088. package/dist/plugins/uuid/index.mjs +1 -0
  1089. package/dist/plugins/uuid/uuid.d.ts +10 -0
  1090. package/dist/plugins/uuid/uuid.js +56 -0
  1091. package/dist/plugins/uuid/uuid.mjs +53 -0
  1092. package/dist/plugins/uuid.d.ts +1 -95
  1093. package/dist/plugins/uuid.js +2 -1
  1094. package/dist/plugins/uuid.mjs +1 -1
  1095. package/dist/plugins/validate-if/index.d.ts +1 -0
  1096. package/dist/plugins/validate-if/index.js +5 -0
  1097. package/dist/plugins/validate-if/index.mjs +1 -0
  1098. package/dist/plugins/validate-if/validate-if.d.ts +7 -0
  1099. package/dist/plugins/validate-if/validate-if.js +22 -0
  1100. package/dist/plugins/validate-if/validate-if.mjs +19 -0
  1101. package/dist/plugins/validateIf.d.ts +1 -57
  1102. package/dist/plugins/validateIf.js +2 -1
  1103. package/dist/plugins/validateIf.mjs +1 -1
  1104. package/dist/plugins/write-only/index.d.ts +1 -0
  1105. package/dist/plugins/write-only/index.js +5 -0
  1106. package/dist/plugins/write-only/index.mjs +1 -0
  1107. package/dist/plugins/write-only/write-only.d.ts +7 -0
  1108. package/dist/plugins/write-only/write-only.js +48 -0
  1109. package/dist/plugins/write-only/write-only.mjs +45 -0
  1110. package/dist/plugins/writeOnly.d.ts +1 -0
  1111. package/dist/plugins/writeOnly.js +2 -0
  1112. package/dist/plugins/writeOnly.mjs +1 -0
  1113. package/dist/result/index.d.ts +18 -0
  1114. package/dist/result/index.js +44 -0
  1115. package/dist/result/index.mjs +36 -0
  1116. package/dist/result.d.ts +1 -0
  1117. package/dist/result.js +2 -0
  1118. package/dist/result.mjs +1 -0
  1119. package/dist/runtime/create-field-validator.d.ts +12 -0
  1120. package/dist/runtime/create-field-validator.js +74 -0
  1121. package/dist/runtime/create-field-validator.mjs +71 -0
  1122. package/dist/runtime/create-issue.d.ts +24 -0
  1123. package/dist/runtime/create-issue.js +34 -0
  1124. package/dist/runtime/create-issue.mjs +30 -0
  1125. package/dist/runtime/create-validator.d.ts +19 -0
  1126. package/dist/runtime/create-validator.js +70 -0
  1127. package/dist/runtime/create-validator.mjs +65 -0
  1128. package/dist/runtime/decide-presence.d.ts +5 -0
  1129. package/dist/runtime/decide-presence.js +48 -0
  1130. package/dist/runtime/decide-presence.mjs +45 -0
  1131. package/dist/runtime/index-stack.d.ts +28 -0
  1132. package/dist/runtime/index-stack.js +68 -0
  1133. package/dist/runtime/index-stack.mjs +63 -0
  1134. package/dist/runtime/index.d.ts +19 -0
  1135. package/dist/runtime/index.js +48 -0
  1136. package/dist/runtime/index.mjs +16 -0
  1137. package/dist/runtime/issue-sink.d.ts +39 -0
  1138. package/dist/runtime/issue-sink.js +61 -0
  1139. package/dist/runtime/issue-sink.mjs +56 -0
  1140. package/dist/runtime/output-writer.d.ts +38 -0
  1141. package/dist/runtime/output-writer.js +59 -0
  1142. package/dist/runtime/output-writer.mjs +52 -0
  1143. package/dist/runtime/run-array-node.d.ts +9 -0
  1144. package/dist/runtime/run-array-node.js +98 -0
  1145. package/dist/runtime/run-array-node.mjs +95 -0
  1146. package/dist/runtime/run-branch.d.ts +14 -0
  1147. package/dist/runtime/run-branch.js +67 -0
  1148. package/dist/runtime/run-branch.mjs +63 -0
  1149. package/dist/runtime/run-field.d.ts +27 -0
  1150. package/dist/runtime/run-field.js +88 -0
  1151. package/dist/runtime/run-field.mjs +84 -0
  1152. package/dist/runtime/run-plan.d.ts +28 -0
  1153. package/dist/runtime/run-plan.js +50 -0
  1154. package/dist/runtime/run-plan.mjs +46 -0
  1155. package/dist/runtime/run-recursion.d.ts +17 -0
  1156. package/dist/runtime/run-recursion.js +119 -0
  1157. package/dist/runtime/run-recursion.mjs +115 -0
  1158. package/dist/standard-schema/index.d.ts +6 -0
  1159. package/dist/standard-schema/index.js +7 -0
  1160. package/dist/standard-schema/index.mjs +2 -0
  1161. package/dist/standard-schema/split-issue-path.d.ts +9 -0
  1162. package/dist/standard-schema/split-issue-path.js +66 -0
  1163. package/dist/standard-schema/split-issue-path.mjs +63 -0
  1164. package/dist/standard-schema/standard-schema.types.d.ts +46 -0
  1165. package/dist/standard-schema/standard-schema.types.js +13 -0
  1166. package/dist/standard-schema/standard-schema.types.mjs +12 -0
  1167. package/dist/standard-schema/to-standard-schema.d.ts +41 -0
  1168. package/dist/standard-schema/to-standard-schema.js +60 -0
  1169. package/dist/standard-schema/to-standard-schema.mjs +57 -0
  1170. package/dist/standard-schema.d.ts +1 -0
  1171. package/dist/standard-schema.js +2 -0
  1172. package/dist/standard-schema.mjs +1 -0
  1173. package/dist/subpath-aliases/read-only-write-only.d.ts +2 -0
  1174. package/dist/subpath-aliases/read-only-write-only.js +16 -0
  1175. package/dist/subpath-aliases/read-only-write-only.mjs +11 -0
  1176. package/dist/types/global-config.d.ts +31 -0
  1177. package/dist/types/global-config.js +36 -0
  1178. package/dist/types/global-config.mjs +32 -0
  1179. package/dist/types/index.d.ts +75 -69
  1180. package/dist/types/index.js +46 -0
  1181. package/dist/types/index.mjs +36 -0
  1182. package/dist/types/validation-result.types.d.ts +22 -0
  1183. package/dist/types/validation-result.types.js +2 -0
  1184. package/dist/types/validation-result.types.mjs +1 -0
  1185. package/package.json +523 -353
  1186. package/dist/constants.d.ts +0 -27
  1187. package/dist/core/async.experimental/async-context.d.ts +0 -60
  1188. package/dist/core/builder/array-batch-optimizer.d.ts +0 -66
  1189. package/dist/core/builder/context/field-context.d.ts +0 -31
  1190. package/dist/core/builder/context/field-type-detector.d.ts +0 -19
  1191. package/dist/core/builder/core/builder.d.ts +0 -10
  1192. package/dist/core/builder/core/field-builder.d.ts +0 -13
  1193. package/dist/core/builder/core/index.d.ts +0 -17
  1194. package/dist/core/builder/index.d.ts +0 -24
  1195. package/dist/core/builder/nested-array-processor.d.ts +0 -52
  1196. package/dist/core/builder/plugins/composable-conditional-plugin.d.ts +0 -32
  1197. package/dist/core/builder/plugins/composable-directly-plugin.d.ts +0 -32
  1198. package/dist/core/builder/plugins/composable-plugin.d.ts +0 -242
  1199. package/dist/core/builder/plugins/plugin-creator.d.ts +0 -38
  1200. package/dist/core/builder/plugins/plugin-interfaces.d.ts +0 -343
  1201. package/dist/core/builder/plugins/plugin-types.d.ts +0 -441
  1202. package/dist/core/builder/raw-validator.d.ts +0 -22
  1203. package/dist/core/builder/types/field-options.d.ts +0 -46
  1204. package/dist/core/builder/types/types.d.ts +0 -319
  1205. package/dist/core/builder/ultra-fast-validator.d.ts +0 -30
  1206. package/dist/core/builder/validator-factory.d.ts +0 -29
  1207. package/dist/core/global-config.d.ts +0 -27
  1208. package/dist/core/index.d.ts +0 -36
  1209. package/dist/core/optimization/array-batch-validator.d.ts +0 -68
  1210. package/dist/core/optimization/core/field-utils.d.ts +0 -103
  1211. package/dist/core/optimization/core/strategy-factory.d.ts +0 -84
  1212. package/dist/core/optimization/core/validation-engine.d.ts +0 -107
  1213. package/dist/core/optimization/execution-strategy-selector.d.ts +0 -23
  1214. package/dist/core/optimization/unified-validator.d.ts +0 -45
  1215. package/dist/core/plugin/__tests__/test-utils.d.ts +0 -1
  1216. package/dist/core/plugin/arrayContains.d.ts +0 -37
  1217. package/dist/core/plugin/arrayIncludes.d.ts +0 -42
  1218. package/dist/core/plugin/arrayMaxLength.d.ts +0 -43
  1219. package/dist/core/plugin/arrayMinLength.d.ts +0 -43
  1220. package/dist/core/plugin/arrayUnique.d.ts +0 -41
  1221. package/dist/core/plugin/booleanFalsy.d.ts +0 -41
  1222. package/dist/core/plugin/booleanTruthy.d.ts +0 -38
  1223. package/dist/core/plugin/compareField.d.ts +0 -58
  1224. package/dist/core/plugin/conditionalSchema.d.ts +0 -24
  1225. package/dist/core/plugin/custom.d.ts +0 -60
  1226. package/dist/core/plugin/fromContext.d.ts +0 -150
  1227. package/dist/core/plugin/index.d.ts +0 -71
  1228. package/dist/core/plugin/jsonSchema/dsl-converter.d.ts +0 -22
  1229. package/dist/core/plugin/jsonSchema/error-generation.d.ts +0 -14
  1230. package/dist/core/plugin/jsonSchema/format-validators.d.ts +0 -20
  1231. package/dist/core/plugin/jsonSchema/index.d.ts +0 -11
  1232. package/dist/core/plugin/jsonSchema/plugin.d.ts +0 -35
  1233. package/dist/core/plugin/jsonSchema/ref-resolver.d.ts +0 -14
  1234. package/dist/core/plugin/jsonSchema/types.d.ts +0 -69
  1235. package/dist/core/plugin/jsonSchema/validation-core.d.ts +0 -29
  1236. package/dist/core/plugin/jsonSchemaFullFeature.d.ts +0 -31
  1237. package/dist/core/plugin/literal.d.ts +0 -40
  1238. package/dist/core/plugin/message-factories.d.ts +0 -9
  1239. package/dist/core/plugin/nullable.d.ts +0 -34
  1240. package/dist/core/plugin/numberFinite.d.ts +0 -41
  1241. package/dist/core/plugin/numberInteger.d.ts +0 -41
  1242. package/dist/core/plugin/numberMax.d.ts +0 -49
  1243. package/dist/core/plugin/numberMin.d.ts +0 -49
  1244. package/dist/core/plugin/numberMultipleOf.d.ts +0 -42
  1245. package/dist/core/plugin/numberNegative.d.ts +0 -41
  1246. package/dist/core/plugin/numberPositive.d.ts +0 -41
  1247. package/dist/core/plugin/numberRange.d.ts +0 -48
  1248. package/dist/core/plugin/object.d.ts +0 -43
  1249. package/dist/core/plugin/objectAdditionalProperties.d.ts +0 -51
  1250. package/dist/core/plugin/objectDependentRequired.d.ts +0 -42
  1251. package/dist/core/plugin/objectDependentSchemas.d.ts +0 -40
  1252. package/dist/core/plugin/objectMaxProperties.d.ts +0 -42
  1253. package/dist/core/plugin/objectMinProperties.d.ts +0 -42
  1254. package/dist/core/plugin/objectPatternProperties.d.ts +0 -46
  1255. package/dist/core/plugin/objectPropertyNames.d.ts +0 -36
  1256. package/dist/core/plugin/objectRecursively.d.ts +0 -81
  1257. package/dist/core/plugin/oneOf.d.ts +0 -44
  1258. package/dist/core/plugin/optional.d.ts +0 -35
  1259. package/dist/core/plugin/optionalIf.d.ts +0 -42
  1260. package/dist/core/plugin/orFail.d.ts +0 -132
  1261. package/dist/core/plugin/readOnlyWriteOnly.d.ts +0 -48
  1262. package/dist/core/plugin/required.d.ts +0 -45
  1263. package/dist/core/plugin/requiredIf.d.ts +0 -66
  1264. package/dist/core/plugin/shared-constants.d.ts +0 -45
  1265. package/dist/core/plugin/shared.d.ts +0 -3
  1266. package/dist/core/plugin/skip.d.ts +0 -57
  1267. package/dist/core/plugin/stitch-typed.d.ts +0 -15
  1268. package/dist/core/plugin/stitch.d.ts +0 -1
  1269. package/dist/core/plugin/stitchSimple.d.ts +0 -4
  1270. package/dist/core/plugin/stringAlphanumeric.d.ts +0 -42
  1271. package/dist/core/plugin/stringBase64.d.ts +0 -119
  1272. package/dist/core/plugin/stringContentEncoding.d.ts +0 -43
  1273. package/dist/core/plugin/stringContentMediaType.d.ts +0 -47
  1274. package/dist/core/plugin/stringDate.d.ts +0 -48
  1275. package/dist/core/plugin/stringDatetime.d.ts +0 -108
  1276. package/dist/core/plugin/stringDuration.d.ts +0 -41
  1277. package/dist/core/plugin/stringEmail.d.ts +0 -81
  1278. package/dist/core/plugin/stringEndsWith.d.ts +0 -42
  1279. package/dist/core/plugin/stringExactLength.d.ts +0 -46
  1280. package/dist/core/plugin/stringHostname.d.ts +0 -104
  1281. package/dist/core/plugin/stringIpv4.d.ts +0 -85
  1282. package/dist/core/plugin/stringIpv6.d.ts +0 -104
  1283. package/dist/core/plugin/stringIri.d.ts +0 -117
  1284. package/dist/core/plugin/stringIriReference.d.ts +0 -43
  1285. package/dist/core/plugin/stringJsonPointer.d.ts +0 -107
  1286. package/dist/core/plugin/stringMax.d.ts +0 -43
  1287. package/dist/core/plugin/stringMin.d.ts +0 -43
  1288. package/dist/core/plugin/stringPattern.d.ts +0 -40
  1289. package/dist/core/plugin/stringRelativeJsonPointer.d.ts +0 -42
  1290. package/dist/core/plugin/stringStartsWith.d.ts +0 -42
  1291. package/dist/core/plugin/stringTime.d.ts +0 -39
  1292. package/dist/core/plugin/stringUriTemplate.d.ts +0 -43
  1293. package/dist/core/plugin/stringUrl.d.ts +0 -97
  1294. package/dist/core/plugin/testUtils.d.ts +0 -15
  1295. package/dist/core/plugin/transform-type-restrictions.d.ts +0 -61
  1296. package/dist/core/plugin/transform.d.ts +0 -35
  1297. package/dist/core/plugin/tupleBuilder.d.ts +0 -66
  1298. package/dist/core/plugin/types.d.ts +0 -143
  1299. package/dist/core/plugin/unionGuard.d.ts +0 -50
  1300. package/dist/core/plugin/utils/field-accessor-optimized.d.ts +0 -50
  1301. package/dist/core/plugin/utils/field-accessor.d.ts +0 -107
  1302. package/dist/core/plugin/uuid.d.ts +0 -95
  1303. package/dist/core/plugin/validateIf.d.ts +0 -57
  1304. package/dist/core/registry/plugin-registry.d.ts +0 -116
  1305. package/dist/core/registry.d.ts +0 -6
  1306. package/dist/core/transform/index.d.ts +0 -1
  1307. package/dist/core/transform/string/defaultValue.d.ts +0 -6
  1308. package/dist/core/transform/string/index.d.ts +0 -3
  1309. package/dist/core/transform/string/replace.d.ts +0 -14
  1310. package/dist/core/transform/string/sanitize.d.ts +0 -6
  1311. package/dist/core/utils/type-guards.d.ts +0 -68
  1312. package/dist/index.js.map +0 -7
  1313. package/dist/index.mjs.map +0 -7
  1314. package/dist/types/array-type-analysis.d.ts +0 -115
  1315. package/dist/types/indexed-result.d.ts +0 -44
  1316. package/dist/types/result.d.ts +0 -159
  1317. package/dist/types/stitch-types.d.ts +0 -118
  1318. package/dist/types/util.d.ts +0 -19
  1319. package/dist/types/valitator.d.ts +0 -10
@@ -0,0 +1,77 @@
1
+ import { collectKeySegments, isIndexableObject, readOwnProperty, } from "./create-value-reader.mjs";
2
+ import { isArray } from "../types/index.mjs";
3
+ export function createValueWriter(template) {
4
+ const keys = collectKeySegments(template);
5
+ if (keys.length === 0)
6
+ return (_subject, value) => value;
7
+ return (subject, value) => writeInto(subject, keys, 0, value);
8
+ }
9
+ function writeInto(container, keys, depth, value) {
10
+ const key = keys[depth];
11
+ if (key === undefined)
12
+ return value;
13
+ if (container === null || container === undefined) {
14
+ return vivify(key, writeInto(undefined, keys, depth + 1, value));
15
+ }
16
+ if (!isIndexableObject(container))
17
+ return container;
18
+ const child = readOwnProperty(container, key);
19
+ const written = writeInto(child, keys, depth + 1, value);
20
+ if (written === child)
21
+ return container;
22
+ return copyWith(container, key, written);
23
+ }
24
+ /**
25
+ * Auto-vivification, restricted to the one case the legacy rule got wrong:
26
+ * only a missing or null intermediate is created. A present primitive is left
27
+ * exactly as it is (the `if (!isIndexableObject) return container` above), so
28
+ * writing `a.b` into `{a: 0}` destroys nothing and returns the original root
29
+ * by identity.
30
+ *
31
+ * The container created is always a plain object. A numeric segment does not
32
+ * conjure an array — the declaration grammar cannot express `items[0]`, so a
33
+ * numeric key here is a Record key.
34
+ */
35
+ /**
36
+ * キーを own プロパティとして置く。**代入演算子を使わない。**
37
+ *
38
+ * `copy[key] = value` は key が "__proto__" のとき Object.prototype の
39
+ * アクセサ (setter) を呼び、own プロパティを作る代わりにプロトタイプを
40
+ * 差し替えてしまう。defineProperty はアクセサを見ずに own プロパティを
41
+ * 定義するので、"__proto__" という名前のプロパティを安全に持てる。
42
+ *
43
+ * "constructor" と "prototype" は Object.prototype 上でデータプロパティ
44
+ * なので代入でも own プロパティになるが、キーごとに分岐すると分岐のほうを
45
+ * 間違えるので一律にこちらを通す。
46
+ *
47
+ * これが「宣言パスに __proto__ を書けるようにする」の前提。書き込みが安全に
48
+ * なったので、パス文法の側で拒否する必要が無くなった (reserved-segment.ts)。
49
+ */
50
+ function putOwnProperty(target, key, value) {
51
+ Object.defineProperty(target, key, {
52
+ value,
53
+ writable: true,
54
+ enumerable: true,
55
+ configurable: true,
56
+ });
57
+ }
58
+ function vivify(key, written) {
59
+ const created = {};
60
+ putOwnProperty(created, key, written);
61
+ return created;
62
+ }
63
+ function copyWith(container, key, value) {
64
+ if (isArray(container)) {
65
+ const index = Number(key);
66
+ if (!Number.isInteger(index) || index < 0)
67
+ return container;
68
+ const copy = container.slice();
69
+ copy[index] = value;
70
+ return copy;
71
+ }
72
+ // スプレッドは own の列挙可能プロパティを CreateDataProperty で写すので、
73
+ // ここでは setter は動かない。危ないのは下の代入だけ。
74
+ const copy = { ...container };
75
+ putOwnProperty(copy, key, value);
76
+ return copy;
77
+ }
@@ -0,0 +1 @@
1
+ export type ElementOf<T> = unknown extends T ? unknown : NonNullable<T> extends infer U ? U extends readonly (infer E)[] ? E : never : never;
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,13 @@
1
+ import type { IsOpaqueObject } from "./opaque-object.types";
2
+ import type { PathDepthBudget, PreviousDepth } from "./path-depth.types";
3
+ import type { ElementOf } from "./element-of.types";
4
+ /** The union of legal path literals for T. `[*]` is the only array wildcard and
5
+ * array members are never enumerated, which removes `items.name`,
6
+ * `items[0].name`, `tags.length` and `items.map` with ONE rule. */
7
+ export type FieldPath<T, D extends number = PathDepthBudget> = RecordPaths<T, D>;
8
+ type RecordPaths<T, D extends number> = NonNullable<T> extends infer U ? U extends readonly unknown[] ? never : IsOpaqueObject<U> extends true ? never : U extends object ? {
9
+ [K in Extract<keyof U, string>]-?: K | DescendantPaths<K, U[K], D>;
10
+ }[Extract<keyof U, string>] : never : never;
11
+ type DescendantPaths<Prefix extends string, V, D extends number> = D extends 0 ? never : NonNullable<V> extends infer U ? U extends readonly unknown[] ? `${Prefix}[*]` | DescendantPaths<`${Prefix}[*]`, ElementOf<U>, PreviousDepth[D]> : IsOpaqueObject<U> extends true ? never : U extends object ? JoinPath<Prefix, RecordPaths<U, PreviousDepth[D]>> : never : never;
12
+ type JoinPath<Prefix extends string, Sub> = Sub extends string ? `${Prefix}.${Sub}` : never;
13
+ export {};
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,15 @@
1
+ import type { PathSegment } from "./path-segment.types";
2
+ /**
3
+ * `[key items, each, key name]` with `[0]` renders `items[0].name`; a nested
4
+ * template with `[0, 2]` renders `matrix[0][2]`. An empty template renders
5
+ * `""`, which is the path a root-level failure carries.
6
+ *
7
+ * Wildcards consume `indices` left to right, outermost first — the order the
8
+ * index stack pushes them in.
9
+ *
10
+ * Too few indices is a bug in the caller, not a data condition, so it throws
11
+ * rather than rendering a `[*]` that would then look like a declaration path.
12
+ * Surplus indices are ignored: the stack may still hold entries belonging to
13
+ * array nodes above this template.
14
+ */
15
+ export declare function formatIssuePath(template: readonly PathSegment[], indices: readonly number[]): string;
@@ -0,0 +1,34 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.formatIssuePath = formatIssuePath;
4
+ /**
5
+ * `[key items, each, key name]` with `[0]` renders `items[0].name`; a nested
6
+ * template with `[0, 2]` renders `matrix[0][2]`. An empty template renders
7
+ * `""`, which is the path a root-level failure carries.
8
+ *
9
+ * Wildcards consume `indices` left to right, outermost first — the order the
10
+ * index stack pushes them in.
11
+ *
12
+ * Too few indices is a bug in the caller, not a data condition, so it throws
13
+ * rather than rendering a `[*]` that would then look like a declaration path.
14
+ * Surplus indices are ignored: the stack may still hold entries belonging to
15
+ * array nodes above this template.
16
+ */
17
+ function formatIssuePath(template, indices) {
18
+ let rendered = "";
19
+ let consumed = 0;
20
+ for (const segment of template) {
21
+ if (segment.kind === "key") {
22
+ rendered += rendered === "" ? segment.key : `.${segment.key}`;
23
+ continue;
24
+ }
25
+ const index = indices[consumed];
26
+ if (index === undefined) {
27
+ throw new RangeError(`formatIssuePath needs ${consumed + 1} index/indices for the template ` +
28
+ `but received ${indices.length}`);
29
+ }
30
+ consumed += 1;
31
+ rendered += `[${index}]`;
32
+ }
33
+ return rendered;
34
+ }
@@ -0,0 +1,31 @@
1
+ /**
2
+ * `[key items, each, key name]` with `[0]` renders `items[0].name`; a nested
3
+ * template with `[0, 2]` renders `matrix[0][2]`. An empty template renders
4
+ * `""`, which is the path a root-level failure carries.
5
+ *
6
+ * Wildcards consume `indices` left to right, outermost first — the order the
7
+ * index stack pushes them in.
8
+ *
9
+ * Too few indices is a bug in the caller, not a data condition, so it throws
10
+ * rather than rendering a `[*]` that would then look like a declaration path.
11
+ * Surplus indices are ignored: the stack may still hold entries belonging to
12
+ * array nodes above this template.
13
+ */
14
+ export function formatIssuePath(template, indices) {
15
+ let rendered = "";
16
+ let consumed = 0;
17
+ for (const segment of template) {
18
+ if (segment.kind === "key") {
19
+ rendered += rendered === "" ? segment.key : `.${segment.key}`;
20
+ continue;
21
+ }
22
+ const index = indices[consumed];
23
+ if (index === undefined) {
24
+ throw new RangeError(`formatIssuePath needs ${consumed + 1} index/indices for the template ` +
25
+ `but received ${indices.length}`);
26
+ }
27
+ consumed += 1;
28
+ rendered += `[${index}]`;
29
+ }
30
+ return rendered;
31
+ }
@@ -0,0 +1,18 @@
1
+ export type { EachSegment, IsWellFormedPath, KeySegment, ParsePath, PathSegment, Segment, } from "./path-segment.types";
2
+ export type { PathDepthBudget, PreviousDepth } from "./path-depth.types";
3
+ export type { IsOpaqueObject, OpaqueObject } from "./opaque-object.types";
4
+ export type { ElementOf } from "./element-of.types";
5
+ export type { PropertyValueOf } from "./property-value-of.types";
6
+ export type { FieldPath } from "./field-path.types";
7
+ export type { LeafPath, MissingLeafPaths } from "./leaf-path.types";
8
+ export type { PickPaths, ValueAtPath } from "./value-at-path.types";
9
+ export { PathSyntaxError, RESERVED_SEGMENTS, assertDeclarableKey, isReservedSegment, } from "./reserved-segment";
10
+ export { formatFieldPath, leafKeyOf, parentFieldPath, parseFieldPath, } from "./parse-field-path";
11
+ export type { ValueReader } from "./create-value-reader";
12
+ export { collectKeySegments, createValueReader, isIndexableObject, readOwnProperty, } from "./create-value-reader";
13
+ export type { ArrayReader } from "./create-array-reader";
14
+ export { createArrayReader } from "./create-array-reader";
15
+ export type { ValueWriter } from "./create-value-writer";
16
+ export { createValueWriter } from "./create-value-writer";
17
+ export { formatIssuePath } from "./format-issue-path";
18
+ export { matchPathPattern } from "./match-path-pattern";
@@ -0,0 +1,26 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.matchPathPattern = exports.formatIssuePath = exports.createValueWriter = exports.createArrayReader = exports.readOwnProperty = exports.isIndexableObject = exports.createValueReader = exports.collectKeySegments = exports.parseFieldPath = exports.parentFieldPath = exports.leafKeyOf = exports.formatFieldPath = exports.isReservedSegment = exports.assertDeclarableKey = exports.RESERVED_SEGMENTS = exports.PathSyntaxError = void 0;
4
+ var reserved_segment_1 = require("./reserved-segment");
5
+ Object.defineProperty(exports, "PathSyntaxError", { enumerable: true, get: function () { return reserved_segment_1.PathSyntaxError; } });
6
+ Object.defineProperty(exports, "RESERVED_SEGMENTS", { enumerable: true, get: function () { return reserved_segment_1.RESERVED_SEGMENTS; } });
7
+ Object.defineProperty(exports, "assertDeclarableKey", { enumerable: true, get: function () { return reserved_segment_1.assertDeclarableKey; } });
8
+ Object.defineProperty(exports, "isReservedSegment", { enumerable: true, get: function () { return reserved_segment_1.isReservedSegment; } });
9
+ var parse_field_path_1 = require("./parse-field-path");
10
+ Object.defineProperty(exports, "formatFieldPath", { enumerable: true, get: function () { return parse_field_path_1.formatFieldPath; } });
11
+ Object.defineProperty(exports, "leafKeyOf", { enumerable: true, get: function () { return parse_field_path_1.leafKeyOf; } });
12
+ Object.defineProperty(exports, "parentFieldPath", { enumerable: true, get: function () { return parse_field_path_1.parentFieldPath; } });
13
+ Object.defineProperty(exports, "parseFieldPath", { enumerable: true, get: function () { return parse_field_path_1.parseFieldPath; } });
14
+ var create_value_reader_1 = require("./create-value-reader");
15
+ Object.defineProperty(exports, "collectKeySegments", { enumerable: true, get: function () { return create_value_reader_1.collectKeySegments; } });
16
+ Object.defineProperty(exports, "createValueReader", { enumerable: true, get: function () { return create_value_reader_1.createValueReader; } });
17
+ Object.defineProperty(exports, "isIndexableObject", { enumerable: true, get: function () { return create_value_reader_1.isIndexableObject; } });
18
+ Object.defineProperty(exports, "readOwnProperty", { enumerable: true, get: function () { return create_value_reader_1.readOwnProperty; } });
19
+ var create_array_reader_1 = require("./create-array-reader");
20
+ Object.defineProperty(exports, "createArrayReader", { enumerable: true, get: function () { return create_array_reader_1.createArrayReader; } });
21
+ var create_value_writer_1 = require("./create-value-writer");
22
+ Object.defineProperty(exports, "createValueWriter", { enumerable: true, get: function () { return create_value_writer_1.createValueWriter; } });
23
+ var format_issue_path_1 = require("./format-issue-path");
24
+ Object.defineProperty(exports, "formatIssuePath", { enumerable: true, get: function () { return format_issue_path_1.formatIssuePath; } });
25
+ var match_path_pattern_1 = require("./match-path-pattern");
26
+ Object.defineProperty(exports, "matchPathPattern", { enumerable: true, get: function () { return match_path_pattern_1.matchPathPattern; } });
@@ -0,0 +1,7 @@
1
+ export { PathSyntaxError, RESERVED_SEGMENTS, assertDeclarableKey, isReservedSegment, } from "./reserved-segment.mjs";
2
+ export { formatFieldPath, leafKeyOf, parentFieldPath, parseFieldPath, } from "./parse-field-path.mjs";
3
+ export { collectKeySegments, createValueReader, isIndexableObject, readOwnProperty, } from "./create-value-reader.mjs";
4
+ export { createArrayReader } from "./create-array-reader.mjs";
5
+ export { createValueWriter } from "./create-value-writer.mjs";
6
+ export { formatIssuePath } from "./format-issue-path.mjs";
7
+ export { matchPathPattern } from "./match-path-pattern.mjs";
@@ -0,0 +1,16 @@
1
+ import type { IsOpaqueObject } from "./opaque-object.types";
2
+ import type { PathDepthBudget, PreviousDepth } from "./path-depth.types";
3
+ import type { ElementOf } from "./element-of.types";
4
+ /** The subset of FieldPath<T> that terminates at a value: the paths `.strict()`
5
+ * demands a declaration for. */
6
+ export type LeafPath<T, D extends number = PathDepthBudget> = RecordLeafPaths<T, D>;
7
+ export type MissingLeafPaths<T, TDeclared extends string> = Exclude<LeafPath<T>, TDeclared>;
8
+ /** False for `{}` and for anything with a string index signature. */
9
+ type IsEnumerableRecord<U> = [Extract<keyof U, string>] extends [never] ? false : string extends Extract<keyof U, string> ? false : true;
10
+ type RecordLeafPaths<T, D extends number> = NonNullable<T> extends infer U ? U extends readonly unknown[] ? never : IsOpaqueObject<U> extends true ? never : U extends object ? IsEnumerableRecord<U> extends true ? {
11
+ [K in Extract<keyof U, string>]-?: LeafPathsBelow<K, U[K], D>;
12
+ }[Extract<keyof U, string>] : never : never : never;
13
+ type LeafPathsBelow<Prefix extends string, V, D extends number> = D extends 0 ? Prefix : NonNullable<V> extends infer U ? U extends readonly unknown[] ? LeafPathsBelow<`${Prefix}[*]`, ElementOf<U>, PreviousDepth[D]> : IsOpaqueObject<U> extends true ? Prefix : U extends object ? IsEnumerableRecord<U> extends true ? {
14
+ [K in Extract<keyof U, string>]-?: LeafPathsBelow<`${Prefix}.${K}`, U[K], PreviousDepth[D]>;
15
+ }[Extract<keyof U, string>] : never : Prefix : never;
16
+ export {};
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,9 @@
1
+ /**
2
+ * `pattern` is a declaration path and is PARSED, so a malformed pattern throws
3
+ * PathSyntaxError rather than quietly matching nothing.
4
+ *
5
+ * `concretePath` is untrusted text (it may come straight from a caller
6
+ * filtering issues) and is only scanned: a `[*]` in it fails the digit rule
7
+ * and returns false, which keeps the two grammars from meeting in the middle.
8
+ */
9
+ export declare function matchPathPattern(pattern: string, concretePath: string): boolean;
@@ -0,0 +1,66 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.matchPathPattern = matchPathPattern;
4
+ // ===========================================================================
5
+ // L1 src/path/match-path-pattern.ts
6
+ // The round trip between the two grammars: does the issue path `items[0].name`
7
+ // belong to the declaration `items[*].name`?
8
+ //
9
+ // The legacy version built a RegExp by string replacement on every call. This
10
+ // scans the concrete path against the already-parsed template instead, so a
11
+ // key containing a regex metacharacter cannot change the meaning of the match
12
+ // and no pattern is ever compiled from user text.
13
+ // ===========================================================================
14
+ const parse_field_path_1 = require("./parse-field-path");
15
+ /**
16
+ * `pattern` is a declaration path and is PARSED, so a malformed pattern throws
17
+ * PathSyntaxError rather than quietly matching nothing.
18
+ *
19
+ * `concretePath` is untrusted text (it may come straight from a caller
20
+ * filtering issues) and is only scanned: a `[*]` in it fails the digit rule
21
+ * and returns false, which keeps the two grammars from meeting in the middle.
22
+ */
23
+ function matchPathPattern(pattern, concretePath) {
24
+ const template = (0, parse_field_path_1.parseFieldPath)(pattern);
25
+ let cursor = 0;
26
+ for (let i = 0; i < template.length; i += 1) {
27
+ const segment = template[i];
28
+ if (segment === undefined)
29
+ return false;
30
+ if (segment.kind === "key") {
31
+ if (i > 0) {
32
+ if (concretePath[cursor] !== ".")
33
+ return false;
34
+ cursor += 1;
35
+ }
36
+ if (!concretePath.startsWith(segment.key, cursor))
37
+ return false;
38
+ cursor += segment.key.length;
39
+ continue;
40
+ }
41
+ const afterIndex = scanIndex(concretePath, cursor);
42
+ if (afterIndex === null)
43
+ return false;
44
+ cursor = afterIndex;
45
+ }
46
+ return cursor === concretePath.length;
47
+ }
48
+ /** Consumes `[<digits>]` at `from`, returning the position after it. */
49
+ function scanIndex(concretePath, from) {
50
+ if (concretePath[from] !== "[")
51
+ return null;
52
+ let cursor = from + 1;
53
+ let digits = 0;
54
+ while (isDigit(concretePath[cursor])) {
55
+ cursor += 1;
56
+ digits += 1;
57
+ }
58
+ if (digits === 0)
59
+ return null;
60
+ if (concretePath[cursor] !== "]")
61
+ return null;
62
+ return cursor + 1;
63
+ }
64
+ function isDigit(character) {
65
+ return character !== undefined && character >= "0" && character <= "9";
66
+ }
@@ -0,0 +1,63 @@
1
+ // ===========================================================================
2
+ // L1 src/path/match-path-pattern.ts
3
+ // The round trip between the two grammars: does the issue path `items[0].name`
4
+ // belong to the declaration `items[*].name`?
5
+ //
6
+ // The legacy version built a RegExp by string replacement on every call. This
7
+ // scans the concrete path against the already-parsed template instead, so a
8
+ // key containing a regex metacharacter cannot change the meaning of the match
9
+ // and no pattern is ever compiled from user text.
10
+ // ===========================================================================
11
+ import { parseFieldPath } from "./parse-field-path.mjs";
12
+ /**
13
+ * `pattern` is a declaration path and is PARSED, so a malformed pattern throws
14
+ * PathSyntaxError rather than quietly matching nothing.
15
+ *
16
+ * `concretePath` is untrusted text (it may come straight from a caller
17
+ * filtering issues) and is only scanned: a `[*]` in it fails the digit rule
18
+ * and returns false, which keeps the two grammars from meeting in the middle.
19
+ */
20
+ export function matchPathPattern(pattern, concretePath) {
21
+ const template = parseFieldPath(pattern);
22
+ let cursor = 0;
23
+ for (let i = 0; i < template.length; i += 1) {
24
+ const segment = template[i];
25
+ if (segment === undefined)
26
+ return false;
27
+ if (segment.kind === "key") {
28
+ if (i > 0) {
29
+ if (concretePath[cursor] !== ".")
30
+ return false;
31
+ cursor += 1;
32
+ }
33
+ if (!concretePath.startsWith(segment.key, cursor))
34
+ return false;
35
+ cursor += segment.key.length;
36
+ continue;
37
+ }
38
+ const afterIndex = scanIndex(concretePath, cursor);
39
+ if (afterIndex === null)
40
+ return false;
41
+ cursor = afterIndex;
42
+ }
43
+ return cursor === concretePath.length;
44
+ }
45
+ /** Consumes `[<digits>]` at `from`, returning the position after it. */
46
+ function scanIndex(concretePath, from) {
47
+ if (concretePath[from] !== "[")
48
+ return null;
49
+ let cursor = from + 1;
50
+ let digits = 0;
51
+ while (isDigit(concretePath[cursor])) {
52
+ cursor += 1;
53
+ digits += 1;
54
+ }
55
+ if (digits === 0)
56
+ return null;
57
+ if (concretePath[cursor] !== "]")
58
+ return null;
59
+ return cursor + 1;
60
+ }
61
+ function isDigit(character) {
62
+ return character !== undefined && character >= "0" && character <= "9";
63
+ }
@@ -0,0 +1,5 @@
1
+ /** Built-in and callable object types whose members are implementation, not
2
+ * data. FieldPath (generator) and ValueAtPath (resolver) both read this, so
3
+ * the two directions cannot disagree about where a path stops. */
4
+ export type OpaqueObject = Date | RegExp | Error | Promise<unknown> | ReadonlyMap<unknown, unknown> | ReadonlySet<unknown> | WeakMap<object, unknown> | WeakSet<object> | ArrayBuffer | SharedArrayBuffer | ArrayBufferView | ((...args: never[]) => unknown) | (abstract new (...args: never[]) => unknown);
5
+ export type IsOpaqueObject<T> = [T] extends [never] ? false : [NonNullable<T>] extends [OpaqueObject] ? true : false;
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,25 @@
1
+ import type { PathSegment } from "./path-segment.types";
2
+ /**
3
+ * Grammar: `head ("." head)*` where `head` is `key ("[*]")*`.
4
+ *
5
+ * `[*]` is the DECLARATION wildcard and the only bracket form; `[0]` belongs
6
+ * to the issue grammar (see formatIssuePath) and is rejected here, so a
7
+ * wildcard path can never be emitted as an issue path or vice versa.
8
+ */
9
+ export declare function parseFieldPath(path: string): readonly PathSegment[];
10
+ /** The inverse of parseFieldPath. Exported so the round trip is testable and
11
+ * so parentFieldPath never rebuilds a path by string surgery. */
12
+ export declare function formatFieldPath(segments: readonly PathSegment[]): string;
13
+ /**
14
+ * The declared path one level up, or null at the top. Step 9 groups declared
15
+ * child keys by this, so it must drop exactly one segment: the parent of
16
+ * `items[*]` is `items`, and the parent of `matrix[*][*]` is `matrix[*]`.
17
+ */
18
+ export declare function parentFieldPath(path: string): string | null;
19
+ /**
20
+ * The final key of a path, or null when the path ends in a wildcard — an
21
+ * element has an index, not a key. Returning null rather than `""` is what
22
+ * lets step 9 tell "a declared child key of this object" from "the elements of
23
+ * this array" without re-inspecting the string.
24
+ */
25
+ export declare function leafKeyOf(path: string): string | null;
@@ -0,0 +1,75 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.parseFieldPath = parseFieldPath;
4
+ exports.formatFieldPath = formatFieldPath;
5
+ exports.parentFieldPath = parentFieldPath;
6
+ exports.leafKeyOf = leafKeyOf;
7
+ const reserved_segment_1 = require("./reserved-segment");
8
+ const EACH_SUFFIX = "[*]";
9
+ const EACH_SEGMENT = Object.freeze({ kind: "each" });
10
+ /**
11
+ * Grammar: `head ("." head)*` where `head` is `key ("[*]")*`.
12
+ *
13
+ * `[*]` is the DECLARATION wildcard and the only bracket form; `[0]` belongs
14
+ * to the issue grammar (see formatIssuePath) and is rejected here, so a
15
+ * wildcard path can never be emitted as an issue path or vice versa.
16
+ */
17
+ function parseFieldPath(path) {
18
+ if (path === "") {
19
+ throw new reserved_segment_1.PathSyntaxError(path, "a field path must not be empty");
20
+ }
21
+ const segments = [];
22
+ for (const head of path.split(".")) {
23
+ appendHead(head, path, segments);
24
+ }
25
+ return Object.freeze(segments);
26
+ }
27
+ function appendHead(head, path, into) {
28
+ let key = head;
29
+ let eachCount = 0;
30
+ while (key.endsWith(EACH_SUFFIX)) {
31
+ key = key.slice(0, -EACH_SUFFIX.length);
32
+ eachCount += 1;
33
+ }
34
+ (0, reserved_segment_1.assertDeclarableKey)(key, path);
35
+ into.push(Object.freeze({ kind: "key", key }));
36
+ for (let i = 0; i < eachCount; i += 1)
37
+ into.push(EACH_SEGMENT);
38
+ }
39
+ /** The inverse of parseFieldPath. Exported so the round trip is testable and
40
+ * so parentFieldPath never rebuilds a path by string surgery. */
41
+ function formatFieldPath(segments) {
42
+ let rendered = "";
43
+ segments.forEach((segment, index) => {
44
+ if (segment.kind === "each") {
45
+ rendered += EACH_SUFFIX;
46
+ return;
47
+ }
48
+ rendered += index === 0 ? segment.key : `.${segment.key}`;
49
+ });
50
+ return rendered;
51
+ }
52
+ /**
53
+ * The declared path one level up, or null at the top. Step 9 groups declared
54
+ * child keys by this, so it must drop exactly one segment: the parent of
55
+ * `items[*]` is `items`, and the parent of `matrix[*][*]` is `matrix[*]`.
56
+ */
57
+ function parentFieldPath(path) {
58
+ const segments = parseFieldPath(path);
59
+ if (segments.length <= 1)
60
+ return null;
61
+ return formatFieldPath(segments.slice(0, -1));
62
+ }
63
+ /**
64
+ * The final key of a path, or null when the path ends in a wildcard — an
65
+ * element has an index, not a key. Returning null rather than `""` is what
66
+ * lets step 9 tell "a declared child key of this object" from "the elements of
67
+ * this array" without re-inspecting the string.
68
+ */
69
+ function leafKeyOf(path) {
70
+ const segments = parseFieldPath(path);
71
+ const last = segments[segments.length - 1];
72
+ if (last === undefined || last.kind === "each")
73
+ return null;
74
+ return last.key;
75
+ }
@@ -0,0 +1,69 @@
1
+ import { PathSyntaxError, assertDeclarableKey } from "./reserved-segment.mjs";
2
+ const EACH_SUFFIX = "[*]";
3
+ const EACH_SEGMENT = Object.freeze({ kind: "each" });
4
+ /**
5
+ * Grammar: `head ("." head)*` where `head` is `key ("[*]")*`.
6
+ *
7
+ * `[*]` is the DECLARATION wildcard and the only bracket form; `[0]` belongs
8
+ * to the issue grammar (see formatIssuePath) and is rejected here, so a
9
+ * wildcard path can never be emitted as an issue path or vice versa.
10
+ */
11
+ export function parseFieldPath(path) {
12
+ if (path === "") {
13
+ throw new PathSyntaxError(path, "a field path must not be empty");
14
+ }
15
+ const segments = [];
16
+ for (const head of path.split(".")) {
17
+ appendHead(head, path, segments);
18
+ }
19
+ return Object.freeze(segments);
20
+ }
21
+ function appendHead(head, path, into) {
22
+ let key = head;
23
+ let eachCount = 0;
24
+ while (key.endsWith(EACH_SUFFIX)) {
25
+ key = key.slice(0, -EACH_SUFFIX.length);
26
+ eachCount += 1;
27
+ }
28
+ assertDeclarableKey(key, path);
29
+ into.push(Object.freeze({ kind: "key", key }));
30
+ for (let i = 0; i < eachCount; i += 1)
31
+ into.push(EACH_SEGMENT);
32
+ }
33
+ /** The inverse of parseFieldPath. Exported so the round trip is testable and
34
+ * so parentFieldPath never rebuilds a path by string surgery. */
35
+ export function formatFieldPath(segments) {
36
+ let rendered = "";
37
+ segments.forEach((segment, index) => {
38
+ if (segment.kind === "each") {
39
+ rendered += EACH_SUFFIX;
40
+ return;
41
+ }
42
+ rendered += index === 0 ? segment.key : `.${segment.key}`;
43
+ });
44
+ return rendered;
45
+ }
46
+ /**
47
+ * The declared path one level up, or null at the top. Step 9 groups declared
48
+ * child keys by this, so it must drop exactly one segment: the parent of
49
+ * `items[*]` is `items`, and the parent of `matrix[*][*]` is `matrix[*]`.
50
+ */
51
+ export function parentFieldPath(path) {
52
+ const segments = parseFieldPath(path);
53
+ if (segments.length <= 1)
54
+ return null;
55
+ return formatFieldPath(segments.slice(0, -1));
56
+ }
57
+ /**
58
+ * The final key of a path, or null when the path ends in a wildcard — an
59
+ * element has an index, not a key. Returning null rather than `""` is what
60
+ * lets step 9 tell "a declared child key of this object" from "the elements of
61
+ * this array" without re-inspecting the string.
62
+ */
63
+ export function leafKeyOf(path) {
64
+ const segments = parseFieldPath(path);
65
+ const last = segments[segments.length - 1];
66
+ if (last === undefined || last.kind === "each")
67
+ return null;
68
+ return last.key;
69
+ }
@@ -0,0 +1,4 @@
1
+ /** The ONE recursion budget every path type counts down, so a self-referential
2
+ * model yields a finite path union instead of TS2589. */
3
+ export type PathDepthBudget = 6;
4
+ export type PreviousDepth = [never, 0, 1, 2, 3, 4, 5, 6, 7, 8];
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,27 @@
1
+ export interface KeySegment {
2
+ readonly key: string;
3
+ }
4
+ export interface EachSegment {
5
+ readonly each: true;
6
+ }
7
+ export type Segment = KeySegment | EachSegment;
8
+ /** Splits one dot-free head such as `items[*][*]` into its segments. */
9
+ type ParseHead<H extends string> = H extends `${infer K}[*]` ? [...ParseHead<K>, EachSegment] : [{
10
+ readonly key: H;
11
+ }];
12
+ export type ParsePath<P extends string> = P extends `${infer H}.${infer R}` ? [...ParseHead<H>, ...ParsePath<R>] : ParseHead<P>;
13
+ type HasEmptyKey<S extends readonly Segment[]> = S extends readonly [
14
+ infer H,
15
+ ...infer R extends readonly Segment[]
16
+ ] ? H extends {
17
+ readonly key: "";
18
+ } ? true : HasEmptyKey<R> : false;
19
+ export type IsWellFormedPath<P extends string> = ParsePath<P> extends readonly [Segment, ...Segment[]] ? HasEmptyKey<ParsePath<P>> extends true ? false : true : false;
20
+ /** The runtime segment shape parseFieldPath produces (same vocabulary). */
21
+ export type PathSegment = {
22
+ readonly kind: "key";
23
+ readonly key: string;
24
+ } | {
25
+ readonly kind: "each";
26
+ };
27
+ export {};
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });