moonflower 1.2.0 → 1.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (435) hide show
  1. package/cli/entry.cjs +1 -1
  2. package/dist/cli/cli.cjs +2 -0
  3. package/dist/cli/cli.cjs.map +1 -0
  4. package/dist/cli/cli.d.ts +2 -0
  5. package/dist/cli/cli.d.ts.map +1 -0
  6. package/dist/cli/cli.mjs +62 -0
  7. package/dist/cli/cli.mjs.map +1 -0
  8. package/dist/cli/prettyprint.cjs +2 -0
  9. package/dist/cli/prettyprint.cjs.map +1 -0
  10. package/dist/cli/prettyprint.d.ts +5 -0
  11. package/dist/cli/prettyprint.d.ts.map +1 -0
  12. package/dist/cli/prettyprint.mjs +15 -0
  13. package/dist/cli/prettyprint.mjs.map +1 -0
  14. package/dist/errors/UserFacingErrors.cjs +1 -1
  15. package/dist/errors/UserFacingErrors.cjs.map +1 -1
  16. package/dist/errors/UserFacingErrors.d.ts +27 -0
  17. package/dist/errors/UserFacingErrors.d.ts.map +1 -1
  18. package/dist/errors/UserFacingErrors.mjs +67 -13
  19. package/dist/errors/UserFacingErrors.mjs.map +1 -1
  20. package/dist/hooks/usePathParams.cjs +1 -1
  21. package/dist/hooks/usePathParams.cjs.map +1 -1
  22. package/dist/hooks/usePathParams.d.ts.map +1 -1
  23. package/dist/hooks/usePathParams.mjs +20 -27
  24. package/dist/hooks/usePathParams.mjs.map +1 -1
  25. package/dist/hooks/useQueryParams.cjs +1 -1
  26. package/dist/hooks/useQueryParams.cjs.map +1 -1
  27. package/dist/hooks/useQueryParams.d.ts +4 -3
  28. package/dist/hooks/useQueryParams.d.ts.map +1 -1
  29. package/dist/hooks/useQueryParams.mjs +24 -33
  30. package/dist/hooks/useQueryParams.mjs.map +1 -1
  31. package/dist/hooks/useRequestBody.cjs +1 -1
  32. package/dist/hooks/useRequestBody.cjs.map +1 -1
  33. package/dist/hooks/useRequestBody.d.ts +4 -3
  34. package/dist/hooks/useRequestBody.d.ts.map +1 -1
  35. package/dist/hooks/useRequestBody.mjs +23 -34
  36. package/dist/hooks/useRequestBody.mjs.map +1 -1
  37. package/dist/index.cjs +1 -1
  38. package/dist/index.mjs +64 -55
  39. package/dist/node_modules/zod/index.cjs +2 -0
  40. package/dist/node_modules/zod/index.cjs.map +1 -0
  41. package/dist/node_modules/zod/index.mjs +6 -0
  42. package/dist/node_modules/zod/index.mjs.map +1 -0
  43. package/dist/node_modules/zod/v4/classic/checks.cjs +2 -0
  44. package/dist/node_modules/zod/v4/classic/checks.cjs.map +1 -0
  45. package/dist/node_modules/zod/v4/classic/checks.mjs +34 -0
  46. package/dist/node_modules/zod/v4/classic/checks.mjs.map +1 -0
  47. package/dist/node_modules/zod/v4/classic/coerce.cjs +2 -0
  48. package/dist/node_modules/zod/v4/classic/coerce.cjs.map +1 -0
  49. package/dist/node_modules/zod/v4/classic/coerce.mjs +26 -0
  50. package/dist/node_modules/zod/v4/classic/coerce.mjs.map +1 -0
  51. package/dist/node_modules/zod/v4/classic/compat.cjs +2 -0
  52. package/dist/node_modules/zod/v4/classic/compat.cjs.map +1 -0
  53. package/dist/node_modules/zod/v4/classic/compat.mjs +35 -0
  54. package/dist/node_modules/zod/v4/classic/compat.mjs.map +1 -0
  55. package/dist/node_modules/zod/v4/classic/errors.cjs +2 -0
  56. package/dist/node_modules/zod/v4/classic/errors.cjs.map +1 -0
  57. package/dist/node_modules/zod/v4/classic/errors.mjs +41 -0
  58. package/dist/node_modules/zod/v4/classic/errors.mjs.map +1 -0
  59. package/dist/node_modules/zod/v4/classic/external.cjs +2 -0
  60. package/dist/node_modules/zod/v4/classic/external.cjs.map +1 -0
  61. package/dist/node_modules/zod/v4/classic/external.mjs +260 -0
  62. package/dist/node_modules/zod/v4/classic/external.mjs.map +1 -0
  63. package/dist/node_modules/zod/v4/classic/from-json-schema.cjs +2 -0
  64. package/dist/node_modules/zod/v4/classic/from-json-schema.cjs.map +1 -0
  65. package/dist/node_modules/zod/v4/classic/from-json-schema.mjs +287 -0
  66. package/dist/node_modules/zod/v4/classic/from-json-schema.mjs.map +1 -0
  67. package/dist/node_modules/zod/v4/classic/iso.cjs +2 -0
  68. package/dist/node_modules/zod/v4/classic/iso.cjs.map +1 -0
  69. package/dist/node_modules/zod/v4/classic/iso.mjs +40 -0
  70. package/dist/node_modules/zod/v4/classic/iso.mjs.map +1 -0
  71. package/dist/node_modules/zod/v4/classic/parse.cjs +2 -0
  72. package/dist/node_modules/zod/v4/classic/parse.cjs.map +1 -0
  73. package/dist/node_modules/zod/v4/classic/parse.mjs +19 -0
  74. package/dist/node_modules/zod/v4/classic/parse.mjs.map +1 -0
  75. package/dist/node_modules/zod/v4/classic/schemas.cjs +2 -0
  76. package/dist/node_modules/zod/v4/classic/schemas.cjs.map +1 -0
  77. package/dist/node_modules/zod/v4/classic/schemas.mjs +912 -0
  78. package/dist/node_modules/zod/v4/classic/schemas.mjs.map +1 -0
  79. package/dist/node_modules/zod/v4/core/api.cjs +2 -0
  80. package/dist/node_modules/zod/v4/core/api.cjs.map +1 -0
  81. package/dist/node_modules/zod/v4/core/api.mjs +1110 -0
  82. package/dist/node_modules/zod/v4/core/api.mjs.map +1 -0
  83. package/dist/node_modules/zod/v4/core/checks.cjs +2 -0
  84. package/dist/node_modules/zod/v4/core/checks.cjs.map +1 -0
  85. package/dist/node_modules/zod/v4/core/checks.mjs +421 -0
  86. package/dist/node_modules/zod/v4/core/checks.mjs.map +1 -0
  87. package/dist/node_modules/zod/v4/core/core.cjs +2 -0
  88. package/dist/node_modules/zod/v4/core/core.cjs.map +1 -0
  89. package/dist/node_modules/zod/v4/core/core.mjs +62 -0
  90. package/dist/node_modules/zod/v4/core/core.mjs.map +1 -0
  91. package/dist/node_modules/zod/v4/core/doc.cjs +4 -0
  92. package/dist/node_modules/zod/v4/core/doc.cjs.map +1 -0
  93. package/dist/node_modules/zod/v4/core/doc.mjs +27 -0
  94. package/dist/node_modules/zod/v4/core/doc.mjs.map +1 -0
  95. package/dist/node_modules/zod/v4/core/errors.cjs +3 -0
  96. package/dist/node_modules/zod/v4/core/errors.cjs.map +1 -0
  97. package/dist/node_modules/zod/v4/core/errors.mjs +89 -0
  98. package/dist/node_modules/zod/v4/core/errors.mjs.map +1 -0
  99. package/dist/node_modules/zod/v4/core/index.cjs +2 -0
  100. package/dist/node_modules/zod/v4/core/index.cjs.map +1 -0
  101. package/dist/node_modules/zod/v4/core/index.mjs +293 -0
  102. package/dist/node_modules/zod/v4/core/index.mjs.map +1 -0
  103. package/dist/node_modules/zod/v4/core/json-schema-generator.cjs +2 -0
  104. package/dist/node_modules/zod/v4/core/json-schema-generator.cjs.map +1 -0
  105. package/dist/node_modules/zod/v4/core/json-schema-generator.mjs +66 -0
  106. package/dist/node_modules/zod/v4/core/json-schema-generator.mjs.map +1 -0
  107. package/dist/node_modules/zod/v4/core/json-schema-processors.cjs +2 -0
  108. package/dist/node_modules/zod/v4/core/json-schema-processors.cjs.map +1 -0
  109. package/dist/node_modules/zod/v4/core/json-schema-processors.mjs +346 -0
  110. package/dist/node_modules/zod/v4/core/json-schema-processors.mjs.map +1 -0
  111. package/dist/node_modules/zod/v4/core/json-schema.cjs +2 -0
  112. package/dist/node_modules/zod/v4/core/json-schema.cjs.map +1 -0
  113. package/dist/node_modules/zod/v4/core/json-schema.mjs +2 -0
  114. package/dist/node_modules/zod/v4/core/json-schema.mjs.map +1 -0
  115. package/dist/node_modules/zod/v4/core/parse.cjs +2 -0
  116. package/dist/node_modules/zod/v4/core/parse.cjs.map +1 -0
  117. package/dist/node_modules/zod/v4/core/parse.mjs +75 -0
  118. package/dist/node_modules/zod/v4/core/parse.mjs.map +1 -0
  119. package/dist/node_modules/zod/v4/core/regexes.cjs +2 -0
  120. package/dist/node_modules/zod/v4/core/regexes.cjs.map +1 -0
  121. package/dist/node_modules/zod/v4/core/regexes.mjs +94 -0
  122. package/dist/node_modules/zod/v4/core/regexes.mjs.map +1 -0
  123. package/dist/node_modules/zod/v4/core/registries.cjs +2 -0
  124. package/dist/node_modules/zod/v4/core/registries.cjs.map +1 -0
  125. package/dist/node_modules/zod/v4/core/registries.mjs +44 -0
  126. package/dist/node_modules/zod/v4/core/registries.mjs.map +1 -0
  127. package/dist/node_modules/zod/v4/core/schemas.cjs +36 -0
  128. package/dist/node_modules/zod/v4/core/schemas.cjs.map +1 -0
  129. package/dist/node_modules/zod/v4/core/schemas.mjs +1319 -0
  130. package/dist/node_modules/zod/v4/core/schemas.mjs.map +1 -0
  131. package/dist/node_modules/zod/v4/core/to-json-schema.cjs +4 -0
  132. package/dist/node_modules/zod/v4/core/to-json-schema.cjs.map +1 -0
  133. package/dist/node_modules/zod/v4/core/to-json-schema.mjs +244 -0
  134. package/dist/node_modules/zod/v4/core/to-json-schema.mjs.map +1 -0
  135. package/dist/node_modules/zod/v4/core/util.cjs +2 -0
  136. package/dist/node_modules/zod/v4/core/util.cjs.map +1 -0
  137. package/dist/node_modules/zod/v4/core/util.mjs +523 -0
  138. package/dist/node_modules/zod/v4/core/util.mjs.map +1 -0
  139. package/dist/node_modules/zod/v4/core/versions.cjs +2 -0
  140. package/dist/node_modules/zod/v4/core/versions.cjs.map +1 -0
  141. package/dist/node_modules/zod/v4/core/versions.mjs +9 -0
  142. package/dist/node_modules/zod/v4/core/versions.mjs.map +1 -0
  143. package/dist/node_modules/zod/v4/locales/ar.cjs +2 -0
  144. package/dist/node_modules/zod/v4/locales/ar.cjs.map +1 -0
  145. package/dist/node_modules/zod/v4/locales/ar.mjs +87 -0
  146. package/dist/node_modules/zod/v4/locales/ar.mjs.map +1 -0
  147. package/dist/node_modules/zod/v4/locales/az.cjs +2 -0
  148. package/dist/node_modules/zod/v4/locales/az.cjs.map +1 -0
  149. package/dist/node_modules/zod/v4/locales/az.mjs +87 -0
  150. package/dist/node_modules/zod/v4/locales/az.mjs.map +1 -0
  151. package/dist/node_modules/zod/v4/locales/be.cjs +2 -0
  152. package/dist/node_modules/zod/v4/locales/be.cjs.map +1 -0
  153. package/dist/node_modules/zod/v4/locales/be.mjs +129 -0
  154. package/dist/node_modules/zod/v4/locales/be.mjs.map +1 -0
  155. package/dist/node_modules/zod/v4/locales/bg.cjs +2 -0
  156. package/dist/node_modules/zod/v4/locales/bg.cjs.map +1 -0
  157. package/dist/node_modules/zod/v4/locales/bg.mjs +98 -0
  158. package/dist/node_modules/zod/v4/locales/bg.mjs.map +1 -0
  159. package/dist/node_modules/zod/v4/locales/ca.cjs +2 -0
  160. package/dist/node_modules/zod/v4/locales/ca.cjs.map +1 -0
  161. package/dist/node_modules/zod/v4/locales/ca.mjs +88 -0
  162. package/dist/node_modules/zod/v4/locales/ca.mjs.map +1 -0
  163. package/dist/node_modules/zod/v4/locales/cs.cjs +2 -0
  164. package/dist/node_modules/zod/v4/locales/cs.cjs.map +1 -0
  165. package/dist/node_modules/zod/v4/locales/cs.mjs +91 -0
  166. package/dist/node_modules/zod/v4/locales/cs.mjs.map +1 -0
  167. package/dist/node_modules/zod/v4/locales/da.cjs +2 -0
  168. package/dist/node_modules/zod/v4/locales/da.cjs.map +1 -0
  169. package/dist/node_modules/zod/v4/locales/da.mjs +94 -0
  170. package/dist/node_modules/zod/v4/locales/da.mjs.map +1 -0
  171. package/dist/node_modules/zod/v4/locales/de.cjs +2 -0
  172. package/dist/node_modules/zod/v4/locales/de.cjs.map +1 -0
  173. package/dist/node_modules/zod/v4/locales/de.mjs +89 -0
  174. package/dist/node_modules/zod/v4/locales/de.mjs.map +1 -0
  175. package/dist/node_modules/zod/v4/locales/en.cjs +2 -0
  176. package/dist/node_modules/zod/v4/locales/en.cjs.map +1 -0
  177. package/dist/node_modules/zod/v4/locales/en.mjs +91 -0
  178. package/dist/node_modules/zod/v4/locales/en.mjs.map +1 -0
  179. package/dist/node_modules/zod/v4/locales/eo.cjs +2 -0
  180. package/dist/node_modules/zod/v4/locales/eo.cjs.map +1 -0
  181. package/dist/node_modules/zod/v4/locales/eo.mjs +90 -0
  182. package/dist/node_modules/zod/v4/locales/eo.mjs.map +1 -0
  183. package/dist/node_modules/zod/v4/locales/es.cjs +2 -0
  184. package/dist/node_modules/zod/v4/locales/es.cjs.map +1 -0
  185. package/dist/node_modules/zod/v4/locales/es.mjs +111 -0
  186. package/dist/node_modules/zod/v4/locales/es.mjs.map +1 -0
  187. package/dist/node_modules/zod/v4/locales/fa.cjs +2 -0
  188. package/dist/node_modules/zod/v4/locales/fa.cjs.map +1 -0
  189. package/dist/node_modules/zod/v4/locales/fa.mjs +89 -0
  190. package/dist/node_modules/zod/v4/locales/fa.mjs.map +1 -0
  191. package/dist/node_modules/zod/v4/locales/fi.cjs +2 -0
  192. package/dist/node_modules/zod/v4/locales/fi.cjs.map +1 -0
  193. package/dist/node_modules/zod/v4/locales/fi.mjs +91 -0
  194. package/dist/node_modules/zod/v4/locales/fi.mjs.map +1 -0
  195. package/dist/node_modules/zod/v4/locales/fr-CA.cjs +2 -0
  196. package/dist/node_modules/zod/v4/locales/fr-CA.cjs.map +1 -0
  197. package/dist/node_modules/zod/v4/locales/fr-CA.mjs +87 -0
  198. package/dist/node_modules/zod/v4/locales/fr-CA.mjs.map +1 -0
  199. package/dist/node_modules/zod/v4/locales/fr.cjs +2 -0
  200. package/dist/node_modules/zod/v4/locales/fr.cjs.map +1 -0
  201. package/dist/node_modules/zod/v4/locales/fr.mjs +89 -0
  202. package/dist/node_modules/zod/v4/locales/fr.mjs.map +1 -0
  203. package/dist/node_modules/zod/v4/locales/he.cjs +2 -0
  204. package/dist/node_modules/zod/v4/locales/he.cjs.map +1 -0
  205. package/dist/node_modules/zod/v4/locales/he.mjs +152 -0
  206. package/dist/node_modules/zod/v4/locales/he.mjs.map +1 -0
  207. package/dist/node_modules/zod/v4/locales/hu.cjs +2 -0
  208. package/dist/node_modules/zod/v4/locales/hu.cjs.map +1 -0
  209. package/dist/node_modules/zod/v4/locales/hu.mjs +89 -0
  210. package/dist/node_modules/zod/v4/locales/hu.mjs.map +1 -0
  211. package/dist/node_modules/zod/v4/locales/hy.cjs +2 -0
  212. package/dist/node_modules/zod/v4/locales/hy.cjs.map +1 -0
  213. package/dist/node_modules/zod/v4/locales/hy.mjs +130 -0
  214. package/dist/node_modules/zod/v4/locales/hy.mjs.map +1 -0
  215. package/dist/node_modules/zod/v4/locales/id.cjs +2 -0
  216. package/dist/node_modules/zod/v4/locales/id.cjs.map +1 -0
  217. package/dist/node_modules/zod/v4/locales/id.mjs +87 -0
  218. package/dist/node_modules/zod/v4/locales/id.mjs.map +1 -0
  219. package/dist/node_modules/zod/v4/locales/index.cjs +2 -0
  220. package/dist/node_modules/zod/v4/locales/index.cjs.map +1 -0
  221. package/dist/node_modules/zod/v4/locales/index.mjs +101 -0
  222. package/dist/node_modules/zod/v4/locales/index.mjs.map +1 -0
  223. package/dist/node_modules/zod/v4/locales/is.cjs +2 -0
  224. package/dist/node_modules/zod/v4/locales/is.cjs.map +1 -0
  225. package/dist/node_modules/zod/v4/locales/is.mjs +89 -0
  226. package/dist/node_modules/zod/v4/locales/is.mjs.map +1 -0
  227. package/dist/node_modules/zod/v4/locales/it.cjs +2 -0
  228. package/dist/node_modules/zod/v4/locales/it.cjs.map +1 -0
  229. package/dist/node_modules/zod/v4/locales/it.mjs +89 -0
  230. package/dist/node_modules/zod/v4/locales/it.mjs.map +1 -0
  231. package/dist/node_modules/zod/v4/locales/ja.cjs +2 -0
  232. package/dist/node_modules/zod/v4/locales/ja.cjs.map +1 -0
  233. package/dist/node_modules/zod/v4/locales/ja.mjs +89 -0
  234. package/dist/node_modules/zod/v4/locales/ja.mjs.map +1 -0
  235. package/dist/node_modules/zod/v4/locales/ka.cjs +2 -0
  236. package/dist/node_modules/zod/v4/locales/ka.cjs.map +1 -0
  237. package/dist/node_modules/zod/v4/locales/ka.mjs +92 -0
  238. package/dist/node_modules/zod/v4/locales/ka.mjs.map +1 -0
  239. package/dist/node_modules/zod/v4/locales/kh.cjs +2 -0
  240. package/dist/node_modules/zod/v4/locales/kh.cjs.map +1 -0
  241. package/dist/node_modules/zod/v4/locales/kh.mjs +8 -0
  242. package/dist/node_modules/zod/v4/locales/kh.mjs.map +1 -0
  243. package/dist/node_modules/zod/v4/locales/km.cjs +2 -0
  244. package/dist/node_modules/zod/v4/locales/km.cjs.map +1 -0
  245. package/dist/node_modules/zod/v4/locales/km.mjs +90 -0
  246. package/dist/node_modules/zod/v4/locales/km.mjs.map +1 -0
  247. package/dist/node_modules/zod/v4/locales/ko.cjs +2 -0
  248. package/dist/node_modules/zod/v4/locales/ko.cjs.map +1 -0
  249. package/dist/node_modules/zod/v4/locales/ko.mjs +87 -0
  250. package/dist/node_modules/zod/v4/locales/ko.mjs.map +1 -0
  251. package/dist/node_modules/zod/v4/locales/lt.cjs +2 -0
  252. package/dist/node_modules/zod/v4/locales/lt.cjs.map +1 -0
  253. package/dist/node_modules/zod/v4/locales/lt.mjs +178 -0
  254. package/dist/node_modules/zod/v4/locales/lt.mjs.map +1 -0
  255. package/dist/node_modules/zod/v4/locales/mk.cjs +2 -0
  256. package/dist/node_modules/zod/v4/locales/mk.cjs.map +1 -0
  257. package/dist/node_modules/zod/v4/locales/mk.mjs +89 -0
  258. package/dist/node_modules/zod/v4/locales/mk.mjs.map +1 -0
  259. package/dist/node_modules/zod/v4/locales/ms.cjs +2 -0
  260. package/dist/node_modules/zod/v4/locales/ms.cjs.map +1 -0
  261. package/dist/node_modules/zod/v4/locales/ms.mjs +88 -0
  262. package/dist/node_modules/zod/v4/locales/ms.mjs.map +1 -0
  263. package/dist/node_modules/zod/v4/locales/nl.cjs +2 -0
  264. package/dist/node_modules/zod/v4/locales/nl.cjs.map +1 -0
  265. package/dist/node_modules/zod/v4/locales/nl.mjs +88 -0
  266. package/dist/node_modules/zod/v4/locales/nl.mjs.map +1 -0
  267. package/dist/node_modules/zod/v4/locales/no.cjs +2 -0
  268. package/dist/node_modules/zod/v4/locales/no.cjs.map +1 -0
  269. package/dist/node_modules/zod/v4/locales/no.mjs +89 -0
  270. package/dist/node_modules/zod/v4/locales/no.mjs.map +1 -0
  271. package/dist/node_modules/zod/v4/locales/ota.cjs +2 -0
  272. package/dist/node_modules/zod/v4/locales/ota.cjs.map +1 -0
  273. package/dist/node_modules/zod/v4/locales/ota.mjs +90 -0
  274. package/dist/node_modules/zod/v4/locales/ota.mjs.map +1 -0
  275. package/dist/node_modules/zod/v4/locales/pl.cjs +2 -0
  276. package/dist/node_modules/zod/v4/locales/pl.cjs.map +1 -0
  277. package/dist/node_modules/zod/v4/locales/pl.mjs +89 -0
  278. package/dist/node_modules/zod/v4/locales/pl.mjs.map +1 -0
  279. package/dist/node_modules/zod/v4/locales/ps.cjs +2 -0
  280. package/dist/node_modules/zod/v4/locales/ps.cjs.map +1 -0
  281. package/dist/node_modules/zod/v4/locales/ps.mjs +89 -0
  282. package/dist/node_modules/zod/v4/locales/ps.mjs.map +1 -0
  283. package/dist/node_modules/zod/v4/locales/pt.cjs +2 -0
  284. package/dist/node_modules/zod/v4/locales/pt.cjs.map +1 -0
  285. package/dist/node_modules/zod/v4/locales/pt.mjs +89 -0
  286. package/dist/node_modules/zod/v4/locales/pt.mjs.map +1 -0
  287. package/dist/node_modules/zod/v4/locales/ru.cjs +2 -0
  288. package/dist/node_modules/zod/v4/locales/ru.cjs.map +1 -0
  289. package/dist/node_modules/zod/v4/locales/ru.mjs +129 -0
  290. package/dist/node_modules/zod/v4/locales/ru.mjs.map +1 -0
  291. package/dist/node_modules/zod/v4/locales/sl.cjs +2 -0
  292. package/dist/node_modules/zod/v4/locales/sl.cjs.map +1 -0
  293. package/dist/node_modules/zod/v4/locales/sl.mjs +89 -0
  294. package/dist/node_modules/zod/v4/locales/sl.mjs.map +1 -0
  295. package/dist/node_modules/zod/v4/locales/sv.cjs +2 -0
  296. package/dist/node_modules/zod/v4/locales/sv.cjs.map +1 -0
  297. package/dist/node_modules/zod/v4/locales/sv.mjs +89 -0
  298. package/dist/node_modules/zod/v4/locales/sv.mjs.map +1 -0
  299. package/dist/node_modules/zod/v4/locales/ta.cjs +2 -0
  300. package/dist/node_modules/zod/v4/locales/ta.cjs.map +1 -0
  301. package/dist/node_modules/zod/v4/locales/ta.mjs +90 -0
  302. package/dist/node_modules/zod/v4/locales/ta.mjs.map +1 -0
  303. package/dist/node_modules/zod/v4/locales/th.cjs +2 -0
  304. package/dist/node_modules/zod/v4/locales/th.cjs.map +1 -0
  305. package/dist/node_modules/zod/v4/locales/th.mjs +90 -0
  306. package/dist/node_modules/zod/v4/locales/th.mjs.map +1 -0
  307. package/dist/node_modules/zod/v4/locales/tr.cjs +2 -0
  308. package/dist/node_modules/zod/v4/locales/tr.cjs.map +1 -0
  309. package/dist/node_modules/zod/v4/locales/tr.mjs +87 -0
  310. package/dist/node_modules/zod/v4/locales/tr.mjs.map +1 -0
  311. package/dist/node_modules/zod/v4/locales/ua.cjs +2 -0
  312. package/dist/node_modules/zod/v4/locales/ua.cjs.map +1 -0
  313. package/dist/node_modules/zod/v4/locales/ua.mjs +8 -0
  314. package/dist/node_modules/zod/v4/locales/ua.mjs.map +1 -0
  315. package/dist/node_modules/zod/v4/locales/uk.cjs +2 -0
  316. package/dist/node_modules/zod/v4/locales/uk.cjs.map +1 -0
  317. package/dist/node_modules/zod/v4/locales/uk.mjs +89 -0
  318. package/dist/node_modules/zod/v4/locales/uk.mjs.map +1 -0
  319. package/dist/node_modules/zod/v4/locales/ur.cjs +2 -0
  320. package/dist/node_modules/zod/v4/locales/ur.cjs.map +1 -0
  321. package/dist/node_modules/zod/v4/locales/ur.mjs +90 -0
  322. package/dist/node_modules/zod/v4/locales/ur.mjs.map +1 -0
  323. package/dist/node_modules/zod/v4/locales/uz.cjs +2 -0
  324. package/dist/node_modules/zod/v4/locales/uz.cjs.map +1 -0
  325. package/dist/node_modules/zod/v4/locales/uz.mjs +90 -0
  326. package/dist/node_modules/zod/v4/locales/uz.mjs.map +1 -0
  327. package/dist/node_modules/zod/v4/locales/vi.cjs +2 -0
  328. package/dist/node_modules/zod/v4/locales/vi.cjs.map +1 -0
  329. package/dist/node_modules/zod/v4/locales/vi.mjs +89 -0
  330. package/dist/node_modules/zod/v4/locales/vi.mjs.map +1 -0
  331. package/dist/node_modules/zod/v4/locales/yo.cjs +2 -0
  332. package/dist/node_modules/zod/v4/locales/yo.cjs.map +1 -0
  333. package/dist/node_modules/zod/v4/locales/yo.mjs +89 -0
  334. package/dist/node_modules/zod/v4/locales/yo.mjs.map +1 -0
  335. package/dist/node_modules/zod/v4/locales/zh-CN.cjs +2 -0
  336. package/dist/node_modules/zod/v4/locales/zh-CN.cjs.map +1 -0
  337. package/dist/node_modules/zod/v4/locales/zh-CN.mjs +90 -0
  338. package/dist/node_modules/zod/v4/locales/zh-CN.mjs.map +1 -0
  339. package/dist/node_modules/zod/v4/locales/zh-TW.cjs +2 -0
  340. package/dist/node_modules/zod/v4/locales/zh-TW.cjs.map +1 -0
  341. package/dist/node_modules/zod/v4/locales/zh-TW.mjs +87 -0
  342. package/dist/node_modules/zod/v4/locales/zh-TW.mjs.map +1 -0
  343. package/dist/openapi/analyzerModule/analyzerModule.cjs +1 -1
  344. package/dist/openapi/analyzerModule/analyzerModule.cjs.map +1 -1
  345. package/dist/openapi/analyzerModule/analyzerModule.d.ts.map +1 -1
  346. package/dist/openapi/analyzerModule/analyzerModule.mjs +42 -42
  347. package/dist/openapi/analyzerModule/analyzerModule.mjs.map +1 -1
  348. package/dist/openapi/analyzerModule/nodeParsers.cjs +1 -1
  349. package/dist/openapi/analyzerModule/nodeParsers.cjs.map +1 -1
  350. package/dist/openapi/analyzerModule/nodeParsers.d.ts +1 -0
  351. package/dist/openapi/analyzerModule/nodeParsers.d.ts.map +1 -1
  352. package/dist/openapi/analyzerModule/nodeParsers.mjs +261 -206
  353. package/dist/openapi/analyzerModule/nodeParsers.mjs.map +1 -1
  354. package/dist/openapi/analyzerModule/parseEndpoint.cjs +1 -1
  355. package/dist/openapi/analyzerModule/parseEndpoint.cjs.map +1 -1
  356. package/dist/openapi/analyzerModule/parseEndpoint.d.ts.map +1 -1
  357. package/dist/openapi/analyzerModule/parseEndpoint.mjs +62 -62
  358. package/dist/openapi/analyzerModule/parseEndpoint.mjs.map +1 -1
  359. package/dist/openapi/analyzerModule/test/TestCase.d.ts +9 -0
  360. package/dist/openapi/analyzerModule/test/TestCase.d.ts.map +1 -0
  361. package/dist/openapi/analyzerModule/test/openApiAnalyzer.zod.spec.d.ts +2 -0
  362. package/dist/openapi/analyzerModule/test/openApiAnalyzer.zod.spec.d.ts.map +1 -0
  363. package/dist/openapi/analyzerModule/test/openApiAnalyzer.zod.spec.data.d.ts +2 -0
  364. package/dist/openapi/analyzerModule/test/openApiAnalyzer.zod.spec.data.d.ts.map +1 -0
  365. package/dist/openapi/initOpenApiEngine.cjs +1 -1
  366. package/dist/openapi/initOpenApiEngine.cjs.map +1 -1
  367. package/dist/openapi/initOpenApiEngine.d.ts +7 -2
  368. package/dist/openapi/initOpenApiEngine.d.ts.map +1 -1
  369. package/dist/openapi/initOpenApiEngine.mjs +13 -7
  370. package/dist/openapi/initOpenApiEngine.mjs.map +1 -1
  371. package/dist/openapi/manager/OpenApiManager.cjs +1 -1
  372. package/dist/openapi/manager/OpenApiManager.cjs.map +1 -1
  373. package/dist/openapi/manager/OpenApiManager.d.ts +4 -0
  374. package/dist/openapi/manager/OpenApiManager.d.ts.map +1 -1
  375. package/dist/openapi/manager/OpenApiManager.mjs +11 -2
  376. package/dist/openapi/manager/OpenApiManager.mjs.map +1 -1
  377. package/dist/openapi/router/OpenApiRouter.cjs +1 -1
  378. package/dist/openapi/router/OpenApiRouter.cjs.map +1 -1
  379. package/dist/openapi/router/OpenApiRouter.d.ts.map +1 -1
  380. package/dist/openapi/router/OpenApiRouter.mjs +9 -6
  381. package/dist/openapi/router/OpenApiRouter.mjs.map +1 -1
  382. package/dist/utils/getValueAsNullableString.cjs +2 -0
  383. package/dist/utils/getValueAsNullableString.cjs.map +1 -0
  384. package/dist/utils/getValueAsNullableString.d.ts +2 -0
  385. package/dist/utils/getValueAsNullableString.d.ts.map +1 -0
  386. package/dist/utils/getValueAsNullableString.mjs +7 -0
  387. package/dist/utils/getValueAsNullableString.mjs.map +1 -0
  388. package/dist/utils/validationMessages.cjs +1 -1
  389. package/dist/utils/validationMessages.cjs.map +1 -1
  390. package/dist/utils/validationMessages.d.ts +1 -1
  391. package/dist/utils/validationMessages.d.ts.map +1 -1
  392. package/dist/utils/validationMessages.mjs +8 -8
  393. package/dist/utils/validationMessages.mjs.map +1 -1
  394. package/dist/validators/types.d.ts +4 -0
  395. package/dist/validators/types.d.ts.map +1 -1
  396. package/dist/validators/validateMissingParams.cjs +2 -0
  397. package/dist/validators/validateMissingParams.cjs.map +1 -0
  398. package/dist/validators/validateMissingParams.d.ts +7 -0
  399. package/dist/validators/validateMissingParams.d.ts.map +1 -0
  400. package/dist/validators/validateMissingParams.mjs +17 -0
  401. package/dist/validators/validateMissingParams.mjs.map +1 -0
  402. package/dist/validators/validateParam.cjs +2 -0
  403. package/dist/validators/validateParam.cjs.map +1 -0
  404. package/dist/validators/validateParam.d.ts +8 -0
  405. package/dist/validators/validateParam.d.ts.map +1 -0
  406. package/dist/validators/validateParam.mjs +41 -0
  407. package/dist/validators/validateParam.mjs.map +1 -0
  408. package/package.json +12 -5
  409. package/{cli → src/cli}/cli.ts +26 -6
  410. package/{cli → src/cli}/prettyprint.ts +2 -2
  411. package/src/errors/UserFacingErrors.ts +54 -0
  412. package/src/hooks/usePathParams.spec.ts +27 -0
  413. package/src/hooks/usePathParams.ts +5 -13
  414. package/src/hooks/useQueryParams.spec.ts +99 -0
  415. package/src/hooks/useQueryParams.ts +16 -25
  416. package/src/hooks/useRequestBody.spec.ts +99 -0
  417. package/src/hooks/useRequestBody.ts +16 -35
  418. package/src/openapi/analyzerModule/analyzerModule.ts +2 -3
  419. package/src/openapi/analyzerModule/nodeParsers.ts +113 -8
  420. package/src/openapi/analyzerModule/parseEndpoint.ts +2 -2
  421. package/src/openapi/analyzerModule/test/TestCase.ts +8 -0
  422. package/src/openapi/analyzerModule/test/openApiAnalyzer.spec.data.ts +9 -0
  423. package/src/openapi/analyzerModule/test/openApiAnalyzer.spec.ts +21 -0
  424. package/src/openapi/analyzerModule/test/openApiAnalyzer.zod.spec.data.ts +87 -0
  425. package/src/openapi/analyzerModule/test/openApiAnalyzer.zod.spec.ts +178 -0
  426. package/src/openapi/initOpenApiEngine.ts +48 -6
  427. package/src/openapi/manager/OpenApiManager.ts +16 -0
  428. package/src/openapi/router/OpenApiRouter.ts +6 -1
  429. package/src/test/app.spec.ts +27 -0
  430. package/src/utils/getValueAsNullableString.ts +8 -0
  431. package/src/utils/validationMessages.ts +4 -0
  432. package/src/validators/types.ts +5 -0
  433. package/src/validators/validateMissingParams.ts +27 -0
  434. package/src/validators/validateParam.ts +69 -0
  435. package/vite.config.ts +3 -0
@@ -1,279 +1,325 @@
1
1
  import { SyntaxKind as e } from "ts-morph";
2
- import { Logger as K } from "../../utils/logger.mjs";
3
- import { OpenApiManager as k } from "../manager/OpenApiManager.mjs";
4
- const S = /* @__PURE__ */ new WeakMap(), c = (t) => {
5
- const r = S.get(t);
6
- if (r)
7
- return r;
2
+ import { Logger as m } from "../../utils/logger.mjs";
3
+ import { OpenApiManager as O } from "../manager/OpenApiManager.mjs";
4
+ const L = /* @__PURE__ */ new WeakMap(), c = (t) => {
5
+ const n = L.get(t);
6
+ if (n)
7
+ return n;
8
8
  if (t.getKind() === e.Identifier) {
9
- const i = t.asKind(e.Identifier).getImplementations()[0]?.getNode();
10
- if (i) {
11
- const o = i.getParent().getLastChild();
9
+ const r = t.asKind(e.Identifier).getImplementations()[0]?.getNode();
10
+ if (r) {
11
+ const o = r.getParent().getLastChild();
12
12
  if (o === t)
13
13
  throw new Error("Recursive implementation found");
14
- const g = c(o);
15
- return S.set(t, g), g;
14
+ const p = c(o);
15
+ return L.set(t, p), p;
16
16
  }
17
- const f = t.asKind(e.Identifier).getDefinitions()[0]?.getNode();
18
- if (f) {
19
- const o = f.getParent().getLastChild();
17
+ const l = t.asKind(e.Identifier).getDefinitions()[0]?.getNode();
18
+ if (l) {
19
+ const o = l.getParent().getLastChild();
20
20
  if (o === t)
21
21
  throw new Error("Recursive implementation found");
22
- const g = c(o);
23
- return S.set(t, g), g;
22
+ const p = c(o);
23
+ return L.set(t, p), p;
24
24
  }
25
25
  throw new Error("No implementation nor definition available");
26
26
  }
27
- return S.set(t, t), t;
28
- }, x = (t) => {
29
- const r = t.getChildrenOfKind(e.Identifier);
30
- return r.length === 2 ? c(r[1]) : t.getChildren().reverse().find(
31
- (f) => f.getKind() !== e.GreaterThanToken && f.getKind() !== e.CommaToken && f.getKind() !== e.SemicolonToken
27
+ return L.set(t, t), t;
28
+ }, C = (t) => {
29
+ const n = t.getChildrenOfKind(e.Identifier);
30
+ return n.length === 2 ? c(n[1]) : t.getChildren().reverse().find(
31
+ (l) => l.getKind() !== e.GreaterThanToken && l.getKind() !== e.CommaToken && l.getKind() !== e.SemicolonToken
32
32
  );
33
- }, w = (t) => {
34
- const r = t.getFirstChildByKind(e.SyntaxList);
35
- return r.isKind(e.SyntaxList) ? y(r.getFirstChild()) : y(r);
33
+ }, P = (t) => {
34
+ const n = t.getFirstChildByKind(e.SyntaxList);
35
+ return n.isKind(e.SyntaxList) ? y(n.getFirstChild()) : y(n);
36
36
  }, y = (t) => {
37
- const r = t.getSymbol()?.getName();
38
- if (r && k.getInstance().hasExposedModel(r))
37
+ const n = t.getSymbol()?.getName();
38
+ if (n && O.getInstance().hasExposedModel(n))
39
39
  return [
40
40
  {
41
41
  role: "ref",
42
- shape: r,
42
+ shape: n,
43
43
  optional: !1
44
44
  }
45
45
  ];
46
- const i = c(t);
47
- if (i.asKind(e.UndefinedKeyword))
46
+ const r = c(t);
47
+ if (r.asKind(e.UndefinedKeyword))
48
48
  return "undefined";
49
- const n = i.asKind(e.LiteralType);
50
- if (n) {
51
- if (n.getFirstChildByKind(e.TrueKeyword))
49
+ const i = r.asKind(e.LiteralType);
50
+ if (i) {
51
+ if (i.getFirstChildByKind(e.TrueKeyword))
52
52
  return "true";
53
- if (n.getFirstChildByKind(e.FalseKeyword))
53
+ if (i.getFirstChildByKind(e.FalseKeyword))
54
54
  return "false";
55
55
  }
56
- if (i.asKind(e.BooleanKeyword) || i.asKind(e.TrueKeyword) || i.asKind(e.FalseKeyword))
56
+ if (r.asKind(e.BooleanKeyword) || r.asKind(e.TrueKeyword) || r.asKind(e.FalseKeyword))
57
57
  return "boolean";
58
- if (i.asKind(e.StringKeyword) || i.asKind(e.StringLiteral))
58
+ if (r.asKind(e.StringKeyword) || r.asKind(e.StringLiteral))
59
59
  return "string";
60
- if (i.asKind(e.NumberKeyword) || i.asKind(e.NumericLiteral))
60
+ if (r.asKind(e.NumberKeyword) || r.asKind(e.NumericLiteral))
61
61
  return "number";
62
- if (i.asKind(e.BigIntKeyword) || i.asKind(e.BigIntLiteral))
62
+ if (r.asKind(e.BigIntKeyword) || r.asKind(e.BigIntLiteral))
63
63
  return "bigint";
64
- const s = i.asKind(e.TypeLiteral);
64
+ const s = r.asKind(e.TypeLiteral);
65
65
  if (s)
66
- return s.getFirstChildByKind(e.SyntaxList).getChildrenOfKind(e.PropertySignature).map((B) => {
67
- const E = B.getFirstChildByKind(e.Identifier), I = x(B), D = E.getNextSiblingIfKind(e.QuestionToken);
66
+ return s.getFirstChildByKind(e.SyntaxList).getChildrenOfKind(e.PropertySignature).map((I) => {
67
+ const k = I.getFirstChildByKind(e.Identifier), v = C(I), R = k.getNextSiblingIfKind(e.QuestionToken);
68
68
  return {
69
69
  role: "property",
70
- identifier: E.getText(),
71
- shape: y(I),
72
- optional: I.getType().isNullable() || !!D
70
+ identifier: k.getText(),
71
+ shape: y(v),
72
+ optional: v.getType().isNullable() || !!R
73
73
  };
74
74
  });
75
- const d = i.asKind(e.TypeReference);
75
+ const d = r.asKind(e.TypeReference);
76
76
  if (d)
77
77
  return y(d.getFirstChild());
78
- if (i.asKind(e.PropertyAccessExpression)) {
79
- const P = c(i.getLastChild());
80
- return u(P.asKind(e.CallExpression).getReturnType(), P);
78
+ if (r.asKind(e.PropertyAccessExpression)) {
79
+ const w = c(r.getLastChild());
80
+ return f(w.asKind(e.CallExpression).getReturnType(), w);
81
81
  }
82
- const h = i.asKind(e.UnionType);
82
+ const h = r.asKind(e.UnionType);
83
83
  if (h)
84
- return u(h.getType(), i);
85
- const T = i.asKind(e.TypeQuery);
86
- if (T)
87
- return y(T.getLastChild());
88
- const C = i.asKind(e.QualifiedName);
89
- if (C)
90
- return y(C.getLastChild());
91
- const N = i.asKind(e.CallExpression);
92
- if (N)
93
- return u(N.getReturnType(), N);
94
- const A = i.asKind(e.AwaitExpression);
95
- if (A)
96
- return y(A.getChildAtIndex(1));
97
- const b = i.asKind(e.AsExpression);
98
- if (b)
99
- return y(b.getChildAtIndex(2));
100
- const V = i.getSourceFile().getFilePath().split("/").pop();
101
- return K.warn(`[${V}] Unknown node type: ${i.getKindName()}`), "unknown_1";
102
- }, j = (t) => t.getFirstDescendantByKind(e.SyntaxList).getChildrenOfKind(e.PropertyAssignment).map((n) => {
103
- const o = n.getFirstChild(), g = (() => {
84
+ return f(h.getType(), r);
85
+ const S = r.asKind(e.TypeQuery);
86
+ if (S)
87
+ return y(S.getLastChild());
88
+ const F = r.asKind(e.QualifiedName);
89
+ if (F)
90
+ return y(F.getLastChild());
91
+ const x = r.asKind(e.CallExpression);
92
+ if (x)
93
+ return f(x.getReturnType(), x);
94
+ const B = r.asKind(e.AwaitExpression);
95
+ if (B)
96
+ return y(B.getChildAtIndex(1));
97
+ const E = r.asKind(e.AsExpression);
98
+ if (E)
99
+ return y(E.getChildAtIndex(2));
100
+ const D = r.getSourceFile().getFilePath().split("/").pop();
101
+ return m.warn(`[${D}] Unknown node type: ${r.getKindName()}`), "unknown_1";
102
+ }, z = (t) => t.getFirstDescendantByKind(e.SyntaxList).getChildrenOfKind(e.PropertyAssignment).map((i) => {
103
+ const o = i.getFirstChild(), p = (() => {
104
104
  if (o.isKind(e.Identifier))
105
105
  return o.getText();
106
106
  if (o.isKind(e.StringLiteral))
107
107
  return o.getLiteralText();
108
- const s = n.getSourceFile().getFilePath().split("/").pop();
109
- return K.warn(`[${s}] Unknown identifier name: ${o.getText()}`), "unknown_30";
110
- })(), a = n.getLastChild(), p = c(a);
108
+ const s = i.getSourceFile().getFilePath().split("/").pop();
109
+ return m.warn(`[${s}] Unknown identifier name: ${o.getText()}`), "unknown_30";
110
+ })(), a = i.getLastChild(), u = c(a);
111
111
  return {
112
112
  role: "property",
113
- identifier: g,
114
- shape: F(p),
115
- optional: v(p),
116
- description: m(p, "description"),
117
- errorMessage: m(p, "errorMessage")
113
+ identifier: p,
114
+ shape: N(u),
115
+ optional: V(u),
116
+ description: K(u, "description"),
117
+ errorMessage: K(u, "errorMessage")
118
118
  };
119
- }) || [], F = (t) => {
120
- const r = t.getParent().getFirstChildByKind(e.AsExpression);
121
- if (r) {
122
- const s = r.getLastChildByKind(e.TypeReference);
123
- return w(s);
119
+ }) || [], T = (t) => {
120
+ const n = t.asKind(e.CallExpression);
121
+ return n ? (n.getReturnType().getSymbol()?.getName() ?? "").startsWith("Zod") : !1;
122
+ }, A = (t) => {
123
+ const n = t.asKind(e.CallExpression), l = n.getReturnType().getSymbol()?.getName() ?? "";
124
+ if (l === "ZodNumber")
125
+ return "number";
126
+ if (l === "ZodString")
127
+ return "string";
128
+ if (l === "ZodBoolean")
129
+ return "boolean";
130
+ if (l === "ZodBigInt")
131
+ return "bigint";
132
+ if (l === "ZodObject") {
133
+ const p = n.getFirstChildByKind(e.SyntaxList)?.getFirstChild()?.asKind(e.ObjectLiteralExpression);
134
+ if (!p)
135
+ return "unknown_zod_object";
136
+ const a = p.getFirstChildByKind(e.SyntaxList);
137
+ return a ? a.getChildrenOfKind(e.PropertyAssignment).map((s) => {
138
+ const d = s.getFirstChildByKind(e.Identifier).getText(), g = s.getLastChild();
139
+ return {
140
+ role: "property",
141
+ identifier: d,
142
+ shape: T(g) ? A(g) : N(g),
143
+ optional: !1
144
+ };
145
+ }) : [];
124
146
  }
125
- const i = t.getParent().getFirstChildByKind(e.TypeReference);
126
- if (i)
127
- return w(i);
147
+ if (l === "ZodArray") {
148
+ const o = n.getFirstChildByKind(e.SyntaxList)?.getFirstChild();
149
+ return o ? [
150
+ {
151
+ role: "array",
152
+ shape: T(o) ? A(o) : N(o),
153
+ optional: !1
154
+ }
155
+ ] : "unknown_zod_array";
156
+ }
157
+ const i = t.getSourceFile().getFilePath().split("/").pop();
158
+ return m.warn(`[${i}] Unknown zod type: ${l}`), "unknown_zod";
159
+ }, N = (t) => {
160
+ if (T(t))
161
+ return A(t);
162
+ const n = t.getParent().getFirstChildByKind(e.AsExpression);
163
+ if (n) {
164
+ const s = n.getLastChildByKind(e.TypeReference);
165
+ return P(s);
166
+ }
167
+ const r = t.getParent().getFirstChildByKind(e.TypeReference);
168
+ if (r)
169
+ return P(r);
128
170
  if (t.getParent().getChildrenOfKind(e.SyntaxList).length >= 2) {
129
171
  const s = t.getParent().getFirstChildByKind(e.SyntaxList).getFirstChild();
130
172
  return y(s);
131
173
  }
132
- const f = t.getParent().getFirstChildByKind(e.CallExpression);
133
- if (f) {
174
+ const l = t.getParent().getFirstChildByKind(e.CallExpression);
175
+ if (l) {
134
176
  const s = c(
135
- f.getFirstChildByKind(e.SyntaxList).getFirstChild()
177
+ l.getFirstChildByKind(e.SyntaxList).getFirstChild()
136
178
  ), d = s.getParent().getFirstChildByKind(e.TypeReference);
137
179
  if (d)
138
- return u(d.getType(), d, []);
139
- const l = s.getParent().getFirstChildByKind(e.ObjectLiteralExpression);
140
- if (l)
141
- return F(l);
180
+ return f(d.getType(), d, []);
181
+ const g = s.getParent().getFirstChildByKind(e.ObjectLiteralExpression);
182
+ if (g)
183
+ return N(g);
142
184
  if (s.getKind() === e.CallExpression || s.getKind() === e.IntersectionType)
143
- return F(s);
185
+ return N(s);
144
186
  const h = t.getSourceFile().getFilePath().split("/").pop();
145
- return K.warn(`[${h}] Unknown call expression argument: ${s.getKindName()}`), "unknown_3";
187
+ return m.warn(`[${h}] Unknown call expression argument: ${s.getKindName()}`), "unknown_3";
146
188
  }
147
189
  const o = t.getFirstChildByKind(e.SyntaxList).getChildrenOfKind(e.PropertyAssignment).find((s) => s.getFirstChildByKind(e.Identifier)?.getText() === "parse");
148
190
  if (o) {
149
- const s = x(o).asKind(e.ArrowFunction).getReturnType();
150
- return u(s, o);
191
+ const s = C(o).asKind(e.ArrowFunction).getReturnType();
192
+ return f(s, o);
151
193
  }
152
- const g = t.getFirstChildByKind(e.SyntaxList)?.getFirstChildByKind(e.ImportType);
153
- if (g) {
154
- const s = g.getLastChildByKind(e.GreaterThanToken).getChildIndex(), d = g.getChildAtIndex(s - 1);
194
+ const p = t.getFirstChildByKind(e.SyntaxList)?.getFirstChildByKind(e.ImportType);
195
+ if (p) {
196
+ const s = p.getLastChildByKind(e.GreaterThanToken).getChildIndex(), d = p.getChildAtIndex(s - 1);
155
197
  return y(d.getFirstChild());
156
198
  }
157
199
  const a = t.isKind(e.IntersectionType) ? t : t.getParent()?.isKind(e.VariableDeclaration) ? t.getParent()?.getFirstChildByKind(e.IntersectionType) : null;
158
200
  if (a) {
159
201
  const s = a.getFirstChildByKind(e.TypeReference);
160
202
  if (s)
161
- return w(s);
203
+ return P(s);
162
204
  }
163
- const p = t.getSourceFile().getFilePath().split("/").pop();
164
- return K.warn(`[${p}] Unknown import type node`), "unknown_2";
165
- }, v = (t) => {
166
- const r = t.asKind(e.CallExpression);
167
- if (r) {
168
- const n = r.getFirstChildByKind(e.Identifier);
169
- if (n?.getText() === "OptionalParam")
205
+ const u = t.getSourceFile().getFilePath().split("/").pop();
206
+ return m.warn(`[${u}] Unknown import type node`), "unknown_2";
207
+ }, V = (t) => {
208
+ if (T(t))
209
+ return !1;
210
+ const n = t.asKind(e.CallExpression);
211
+ if (n) {
212
+ const i = n.getFirstChildByKind(e.Identifier);
213
+ if (i?.getText() === "OptionalParam")
170
214
  return !0;
171
- if (n?.getText() === "RequiredParam")
215
+ if (i?.getText() === "RequiredParam")
172
216
  return !1;
173
- const o = r.getFirstChildByKind(e.SyntaxList), g = c(o.getFirstChild());
174
- return v(g);
217
+ const o = n.getFirstChildByKind(e.SyntaxList), p = c(o.getFirstChild());
218
+ return V(p);
175
219
  }
176
- return t.getFirstDescendantByKind(e.SyntaxList).getChildrenOfKind(e.PropertyAssignment).some((n) => n.getFirstDescendantByKind(e.Identifier).getText() === "optional" ? x(n).getKind() === e.TrueKeyword : !1);
177
- }, m = (t, r) => {
178
- const i = c(t), f = i.asKind(e.CallExpression);
179
- if (f) {
180
- const d = f.getLastChildByKind(e.SyntaxList);
181
- return m(d, r);
220
+ return t.getFirstDescendantByKind(e.SyntaxList).getChildrenOfKind(e.PropertyAssignment).some((i) => i.getFirstDescendantByKind(e.Identifier).getText() === "optional" ? C(i).getKind() === e.TrueKeyword : !1);
221
+ }, K = (t, n) => {
222
+ if (T(t))
223
+ return "";
224
+ const r = c(t), l = r.asKind(e.CallExpression);
225
+ if (l) {
226
+ const d = l.getLastChildByKind(e.SyntaxList);
227
+ return K(d, n);
182
228
  }
183
- const n = i.asKind(e.SyntaxList);
184
- if (n)
185
- return n.getChildren().map((l) => m(l, r)).find((l) => !!l && l !== "unknown_25") || "";
186
- const o = i.asKind(e.ObjectLiteralExpression);
229
+ const i = r.asKind(e.SyntaxList);
230
+ if (i)
231
+ return i.getChildren().map((g) => K(g, n)).find((g) => !!g && g !== "unknown_25") || "";
232
+ const o = r.asKind(e.ObjectLiteralExpression);
187
233
  if (o) {
188
- const l = O(o).find((h) => h.identifier === r);
189
- return l ? Array.isArray(l.value) ? "array" : l.value || "" : "";
234
+ const g = _(o).find((h) => h.identifier === n);
235
+ return g ? Array.isArray(g.value) ? "array" : g.value || "" : "";
190
236
  }
191
- const g = i.asKind(e.IntersectionType);
192
- if (g)
193
- return g.getTypeNodes().flatMap((d) => m(d, r)).filter((d) => !!d && d !== "unknown_25")[0] || "unknown_27";
194
- const a = i.asKind(e.TypeLiteral);
237
+ const p = r.asKind(e.IntersectionType);
238
+ if (p)
239
+ return p.getTypeNodes().flatMap((d) => K(d, n)).filter((d) => !!d && d !== "unknown_25")[0] || "unknown_27";
240
+ const a = r.asKind(e.TypeLiteral);
195
241
  if (a)
196
- return m(a.getFirstChildByKind(e.SyntaxList), r);
197
- const p = i.asKind(e.PropertySignature);
198
- if (p && i.getFirstDescendantByKind(e.Identifier).getText() === r)
199
- return x(p).getFirstDescendantByKind(
242
+ return K(a.getFirstChildByKind(e.SyntaxList), n);
243
+ const u = r.asKind(e.PropertySignature);
244
+ if (u && r.getFirstDescendantByKind(e.Identifier).getText() === n)
245
+ return C(u).getFirstDescendantByKind(
200
246
  e.StringLiteral
201
247
  ).getLiteralText();
202
- const s = i.getSourceFile().getFilePath().split("/").pop();
203
- return K.dev(`[${s}] Unknown property string value node ${i.getKindName()}`), "unknown_25";
204
- }, R = (t) => {
205
- const r = t.getSymbol();
206
- if (!t.isObject() || !r)
248
+ const s = r.getSourceFile().getFilePath().split("/").pop();
249
+ return m.dev(`[${s}] Unknown property string value node ${r.getKindName()}`), "unknown_25";
250
+ }, $ = (t) => {
251
+ const n = t.getSymbol();
252
+ if (!t.isObject() || !n)
207
253
  return !1;
208
- const i = t.getTypeArguments();
209
- return r.getName() === "Promise" && i.length === 1;
210
- }, u = (t, r, i = []) => {
211
- const f = t.getAliasSymbol()?.getName();
212
- if (f && k.getInstance().hasExposedModel(f))
254
+ const r = t.getTypeArguments();
255
+ return n.getName() === "Promise" && r.length === 1;
256
+ }, f = (t, n, r = []) => {
257
+ const l = t.getAliasSymbol()?.getName();
258
+ if (l && O.getInstance().hasExposedModel(l))
213
259
  return [
214
260
  {
215
261
  role: "ref",
216
- shape: f,
262
+ shape: l,
217
263
  optional: !1
218
264
  }
219
265
  ];
220
- const n = R(t) ? t.getTypeArguments()[0] : t;
221
- if (i.some((a) => a === n))
266
+ const i = $(t) ? t.getTypeArguments()[0] : t;
267
+ if (r.some((a) => a === i))
222
268
  return "circular";
223
- const o = i.concat(n);
224
- if (n.getText() === "void")
269
+ const o = r.concat(i);
270
+ if (i.getText() === "void")
225
271
  return "void";
226
- if (n.isAny())
272
+ if (i.isAny())
227
273
  return "any";
228
- if (n.isNull())
274
+ if (i.isNull())
229
275
  return "null";
230
- if (n.isUndefined())
276
+ if (i.isUndefined())
231
277
  return "undefined";
232
- if (n.isBoolean() || n.isBooleanLiteral())
278
+ if (i.isBoolean() || i.isBooleanLiteral())
233
279
  return "boolean";
234
- if (n.isStringLiteral())
280
+ if (i.isStringLiteral())
235
281
  return [
236
282
  {
237
283
  role: "literal_string",
238
- shape: String(n.getLiteralValue()),
284
+ shape: String(i.getLiteralValue()),
239
285
  optional: !1
240
286
  }
241
287
  ];
242
- if (n.isNumberLiteral())
288
+ if (i.isNumberLiteral())
243
289
  return [
244
290
  {
245
291
  role: "literal_number",
246
- shape: String(n.getLiteralValue()),
292
+ shape: String(i.getLiteralValue()),
247
293
  optional: !1
248
294
  }
249
295
  ];
250
- if (n.isString() || n.isTemplateLiteral())
296
+ if (i.isString() || i.isTemplateLiteral())
251
297
  return "string";
252
- if (n.isNumber())
298
+ if (i.isNumber())
253
299
  return "number";
254
- if (n.getText() === "bigint")
300
+ if (i.getText() === "bigint")
255
301
  return "bigint";
256
- if (n.isTuple())
302
+ if (i.isTuple())
257
303
  return [
258
304
  {
259
305
  role: "tuple",
260
- shape: n.getTupleElements().map((a) => ({
306
+ shape: i.getTupleElements().map((a) => ({
261
307
  role: "tuple_entry",
262
- shape: u(a, r, o),
308
+ shape: f(a, n, o),
263
309
  optional: !1
264
310
  })),
265
311
  optional: !1
266
312
  }
267
313
  ];
268
- if (n.isArray())
314
+ if (i.isArray())
269
315
  return [
270
316
  {
271
317
  role: "array",
272
- shape: u(n.getArrayElementType(), r, o),
318
+ shape: f(i.getArrayElementType(), n, o),
273
319
  optional: !1
274
320
  }
275
321
  ];
276
- if (n.isObject() && n.getText() === "Buffer")
322
+ if (i.isObject() && i.getText() === "Buffer")
277
323
  return [
278
324
  {
279
325
  role: "buffer",
@@ -281,49 +327,50 @@ const S = /* @__PURE__ */ new WeakMap(), c = (t) => {
281
327
  optional: !1
282
328
  }
283
329
  ];
284
- if (n.isObject() && n.getProperties().length === 0) {
285
- const a = n.getAliasTypeArguments()[1];
286
- return [
287
- {
288
- role: "record",
289
- shape: u(a, r, o),
290
- optional: !1
291
- }
292
- ];
330
+ if (i.isObject() && i.getProperties().length === 0) {
331
+ const a = i.getAliasTypeArguments()[1] ?? i.getStringIndexType();
332
+ if (a)
333
+ return [
334
+ {
335
+ role: "record",
336
+ shape: f(a, n, o),
337
+ optional: !1
338
+ }
339
+ ];
293
340
  }
294
- if (n.isObject())
295
- return n.getText() === "Date" ? "Date" : n.getProperties().map((a) => {
296
- const p = a.getValueDeclaration() || a.getDeclarations()[0];
297
- if (!p)
341
+ if (i.isObject())
342
+ return i.getText() === "Date" ? "Date" : i.getProperties().map((a) => {
343
+ const u = a.getValueDeclaration() || a.getDeclarations()[0];
344
+ if (!u)
298
345
  return {
299
346
  role: "property",
300
347
  identifier: a.getName(),
301
- shape: u(a.getTypeAtLocation(r), r, o),
348
+ shape: f(a.getTypeAtLocation(n), n, o),
302
349
  optional: !1
303
350
  };
304
- if (!(p.asKind(e.PropertySignature) || p.asKind(e.PropertyAssignment) || p.asKind(e.ShorthandPropertyAssignment)))
351
+ if (!(u.asKind(e.PropertySignature) || u.asKind(e.PropertyAssignment) || u.asKind(e.ShorthandPropertyAssignment)))
305
352
  return {
306
353
  role: "property",
307
354
  identifier: a.getName(),
308
- shape: u(a.getTypeAtLocation(r), r, o),
355
+ shape: f(a.getTypeAtLocation(n), n, o),
309
356
  optional: !1
310
357
  };
311
- const d = a.getTypeAtLocation(r).isNullable(), l = u(a.getTypeAtLocation(r), r, o);
358
+ const d = a.getTypeAtLocation(n).isNullable(), g = f(a.getTypeAtLocation(n), n, o);
312
359
  return {
313
360
  role: "property",
314
361
  identifier: a.getName(),
315
- shape: l,
362
+ shape: g,
316
363
  optional: d
317
364
  };
318
365
  }).filter((a) => a.shape !== "undefined");
319
- if (n.isUnion()) {
320
- const p = n.getUnionTypes().map((l) => ({
366
+ if (i.isUnion()) {
367
+ const u = i.getUnionTypes().map((g) => ({
321
368
  role: "union_entry",
322
- shape: u(l, r, o),
369
+ shape: f(g, n, o),
323
370
  optional: !1
324
371
  })).filter(
325
- (l, h, T) => !T.find((C, N) => C.shape === l.shape && N > h)
326
- ), s = p.some((l) => l.shape === "undefined"), d = p.filter((l) => l.shape !== "undefined");
372
+ (g, h, S) => !S.find((F, x) => F.shape === g.shape && x > h)
373
+ ), s = u.some((g) => g.shape === "undefined"), d = u.filter((g) => g.shape !== "undefined");
327
374
  return d.length === 1 ? d[0].shape : [
328
375
  {
329
376
  role: "union",
@@ -332,40 +379,48 @@ const S = /* @__PURE__ */ new WeakMap(), c = (t) => {
332
379
  }
333
380
  ];
334
381
  }
335
- if (n.isIntersection())
336
- return n.getIntersectionTypes().map((s) => u(s, r, o)).filter((s) => typeof s != "string").reduce((s, d) => [...s, ...d], []);
337
- const g = r.getSourceFile().getFilePath().split("/").pop();
338
- return K.warn(`[${g}] Unknown type shape node ${t.getText()}`), "unknown_5";
339
- }, L = (t) => {
382
+ if (i.isIntersection())
383
+ return i.getIntersectionTypes().map((s) => f(s, n, o)).filter((s) => typeof s != "string").reduce((s, d) => [...s, ...d], []);
384
+ const p = n.getSourceFile().getFilePath().split("/").pop();
385
+ return m.warn(`[${p}] Unknown type shape node ${t.getText()}`), "unknown_5";
386
+ }, b = (t) => {
340
387
  if (t.isKind(e.Identifier))
341
- return L(c(t));
388
+ return b(c(t));
342
389
  if (t.isKind(e.StringLiteral))
343
390
  return t.getLiteralValue();
344
391
  if (t.isKind(e.ArrayLiteralExpression))
345
- return t.forEachChildAsArray().map((i) => L(i));
392
+ return t.forEachChildAsArray().map((r) => b(r));
346
393
  if (t.isKind(e.PropertyAccessExpression))
347
- return L(x(t));
394
+ return b(C(t));
348
395
  if (t.isKind(e.ObjectLiteralExpression))
349
- return O(t);
350
- const r = t.getSourceFile().getFilePath().split("/").pop();
351
- return K.dev(`[${r}] Unknown literal value node ${t.getKindName()}`), "unknown_6";
352
- }, O = (t) => t.getFirstDescendantByKind(e.SyntaxList).getChildrenOfKind(e.PropertyAssignment).map((n) => {
353
- const g = n.getFirstDescendantByKind(e.Identifier).getText(), a = n.getLastChild(), p = c(a), s = L(p);
396
+ return _(t);
397
+ const n = t.getSourceFile().getFilePath().split("/").pop();
398
+ return m.dev(`[${n}] Unknown literal value node ${t.getKindName()}`), "unknown_6";
399
+ }, Q = (t) => {
400
+ const n = t.getFirstDescendantByKind(e.CallExpression);
401
+ if (!n) return null;
402
+ const r = n.getArguments()[0];
403
+ if (!r) return null;
404
+ const l = r.getType();
405
+ return l.isStringLiteral() ? l.getLiteralValue() : null;
406
+ }, _ = (t) => t.getFirstDescendantByKind(e.SyntaxList).getChildrenOfKind(e.PropertyAssignment).map((i) => {
407
+ const p = i.getFirstDescendantByKind(e.Identifier).getText(), a = i.getLastChild(), u = c(a), s = b(u);
354
408
  return {
355
- identifier: g,
409
+ identifier: p,
356
410
  value: s
357
411
  };
358
412
  }) || [];
359
413
  export {
360
414
  c as findNodeImplementation,
361
- x as findPropertyAssignmentValueNode,
362
- u as getProperTypeShape,
415
+ C as findPropertyAssignmentValueNode,
416
+ f as getProperTypeShape,
363
417
  y as getRecursiveNodeShape,
364
- j as getShapeOfValidatorLiteral,
365
- w as getTypeReferenceShape,
366
- v as getValidatorPropertyOptionality,
367
- F as getValidatorPropertyShape,
368
- m as getValidatorPropertyStringValue,
369
- O as getValuesOfObjectLiteral
418
+ z as getShapeOfValidatorLiteral,
419
+ P as getTypeReferenceShape,
420
+ V as getValidatorPropertyOptionality,
421
+ N as getValidatorPropertyShape,
422
+ K as getValidatorPropertyStringValue,
423
+ _ as getValuesOfObjectLiteral,
424
+ Q as resolveEndpointPath
370
425
  };
371
426
  //# sourceMappingURL=nodeParsers.mjs.map