@farm.js/core 0.1.0-beta.4 → 0.1.0-beta.6

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 (441) hide show
  1. package/dist/internal/build-runtime.cjs +1 -1
  2. package/dist/internal/build-runtime.cjs.map +1 -1
  3. package/dist/internal/build-runtime.mjs +5 -5
  4. package/dist/plugin.cjs.map +1 -1
  5. package/dist/plugin.mjs +4 -4
  6. package/dist/server-query-client.cjs +1 -1
  7. package/dist/server-query-client.cjs.map +1 -1
  8. package/dist/server-query-client.mjs +1 -1
  9. package/dist/server.cjs +1 -1
  10. package/dist/server.cjs.map +1 -1
  11. package/dist/server.mjs +4 -4
  12. package/dist/version.cjs +1 -1
  13. package/dist/version.cjs.map +1 -1
  14. package/dist/version.mjs +1 -1
  15. package/dist/vite.cjs +1 -1
  16. package/dist/vite.cjs.map +1 -1
  17. package/dist/vite.mjs +4 -4
  18. package/package.json +1 -1
  19. package/dist/after.cjs +0 -227
  20. package/dist/after.cjs.map +0 -1
  21. package/dist/after.d.mts +0 -25
  22. package/dist/after.d.ts +0 -25
  23. package/dist/after.mjs +0 -14
  24. package/dist/after.mjs.map +0 -1
  25. package/dist/agent-runtime.cjs +0 -2379
  26. package/dist/agent-runtime.cjs.map +0 -1
  27. package/dist/agent-runtime.d.mts +0 -94
  28. package/dist/agent-runtime.d.ts +0 -94
  29. package/dist/agent-runtime.mjs +0 -479
  30. package/dist/agent-runtime.mjs.map +0 -1
  31. package/dist/api/route-manager.d.mts +0 -66
  32. package/dist/api/route-manager.d.ts +0 -66
  33. package/dist/api/runtime.d.mts +0 -3
  34. package/dist/api/runtime.d.ts +0 -3
  35. package/dist/api.cjs +0 -4100
  36. package/dist/api.cjs.map +0 -1
  37. package/dist/api.d.mts +0 -48
  38. package/dist/api.d.ts +0 -48
  39. package/dist/api.mjs +0 -93
  40. package/dist/api.mjs.map +0 -1
  41. package/dist/app-BjN-da13.d.ts +0 -300
  42. package/dist/app-CakAr8Be.d.mts +0 -300
  43. package/dist/app-markdown.cjs +0 -220
  44. package/dist/app-markdown.cjs.map +0 -1
  45. package/dist/app-markdown.d.mts +0 -22
  46. package/dist/app-markdown.d.ts +0 -22
  47. package/dist/app-markdown.mjs +0 -26
  48. package/dist/app-markdown.mjs.map +0 -1
  49. package/dist/cache.cjs +0 -945
  50. package/dist/cache.cjs.map +0 -1
  51. package/dist/cache.d.mts +0 -192
  52. package/dist/cache.d.ts +0 -192
  53. package/dist/cache.mjs +0 -46
  54. package/dist/cache.mjs.map +0 -1
  55. package/dist/chunk-2CUKEMVR.mjs +0 -872
  56. package/dist/chunk-2CUKEMVR.mjs.map +0 -1
  57. package/dist/chunk-2ED5Q2GH.mjs +0 -422
  58. package/dist/chunk-2ED5Q2GH.mjs.map +0 -1
  59. package/dist/chunk-32W4QEJP.mjs +0 -158
  60. package/dist/chunk-32W4QEJP.mjs.map +0 -1
  61. package/dist/chunk-3U3ZUQAQ.mjs +0 -41
  62. package/dist/chunk-3U3ZUQAQ.mjs.map +0 -1
  63. package/dist/chunk-3XNTL3FQ.mjs +0 -452
  64. package/dist/chunk-3XNTL3FQ.mjs.map +0 -1
  65. package/dist/chunk-44ZCFSKE.mjs +0 -84
  66. package/dist/chunk-44ZCFSKE.mjs.map +0 -1
  67. package/dist/chunk-4S3ORGFA.mjs +0 -44
  68. package/dist/chunk-4S3ORGFA.mjs.map +0 -1
  69. package/dist/chunk-5BY76U2M.mjs +0 -1
  70. package/dist/chunk-5BY76U2M.mjs.map +0 -1
  71. package/dist/chunk-5ZGPRGWV.mjs +0 -136
  72. package/dist/chunk-5ZGPRGWV.mjs.map +0 -1
  73. package/dist/chunk-65A7QIKI.mjs +0 -142
  74. package/dist/chunk-65A7QIKI.mjs.map +0 -1
  75. package/dist/chunk-74YTBPTY.mjs +0 -450
  76. package/dist/chunk-74YTBPTY.mjs.map +0 -1
  77. package/dist/chunk-7HO6AEOP.mjs +0 -74
  78. package/dist/chunk-7HO6AEOP.mjs.map +0 -1
  79. package/dist/chunk-7MABZJIM.mjs +0 -29
  80. package/dist/chunk-7MABZJIM.mjs.map +0 -1
  81. package/dist/chunk-7ZY5AIJO.mjs +0 -161
  82. package/dist/chunk-7ZY5AIJO.mjs.map +0 -1
  83. package/dist/chunk-AJWRO5WE.mjs +0 -6241
  84. package/dist/chunk-AJWRO5WE.mjs.map +0 -1
  85. package/dist/chunk-ALCLXXTY.mjs +0 -187
  86. package/dist/chunk-ALCLXXTY.mjs.map +0 -1
  87. package/dist/chunk-AOBXKNS5.mjs +0 -7631
  88. package/dist/chunk-AOBXKNS5.mjs.map +0 -1
  89. package/dist/chunk-AZ7YUVNR.mjs +0 -65
  90. package/dist/chunk-AZ7YUVNR.mjs.map +0 -1
  91. package/dist/chunk-B232I2GP.mjs +0 -163
  92. package/dist/chunk-B232I2GP.mjs.map +0 -1
  93. package/dist/chunk-BHG3LVHH.mjs +0 -176
  94. package/dist/chunk-BHG3LVHH.mjs.map +0 -1
  95. package/dist/chunk-C2ROET2V.mjs +0 -718
  96. package/dist/chunk-C2ROET2V.mjs.map +0 -1
  97. package/dist/chunk-C3DLZMBU.mjs +0 -597
  98. package/dist/chunk-C3DLZMBU.mjs.map +0 -1
  99. package/dist/chunk-CGILA3WO.mjs +0 -14
  100. package/dist/chunk-CGILA3WO.mjs.map +0 -1
  101. package/dist/chunk-E2MPIBRE.mjs +0 -149
  102. package/dist/chunk-E2MPIBRE.mjs.map +0 -1
  103. package/dist/chunk-E6EPN5BT.mjs +0 -203
  104. package/dist/chunk-E6EPN5BT.mjs.map +0 -1
  105. package/dist/chunk-EJ7T4TPB.mjs +0 -622
  106. package/dist/chunk-EJ7T4TPB.mjs.map +0 -1
  107. package/dist/chunk-FQYDHKKU.mjs +0 -128
  108. package/dist/chunk-FQYDHKKU.mjs.map +0 -1
  109. package/dist/chunk-FRPWCMMG.mjs +0 -299
  110. package/dist/chunk-FRPWCMMG.mjs.map +0 -1
  111. package/dist/chunk-GN72QAIH.mjs +0 -146
  112. package/dist/chunk-GN72QAIH.mjs.map +0 -1
  113. package/dist/chunk-GQVGIUSN.mjs +0 -149
  114. package/dist/chunk-GQVGIUSN.mjs.map +0 -1
  115. package/dist/chunk-GS6K5OCM.mjs +0 -407
  116. package/dist/chunk-GS6K5OCM.mjs.map +0 -1
  117. package/dist/chunk-GXASWWJU.mjs +0 -364
  118. package/dist/chunk-GXASWWJU.mjs.map +0 -1
  119. package/dist/chunk-GY2STC2S.mjs +0 -180
  120. package/dist/chunk-GY2STC2S.mjs.map +0 -1
  121. package/dist/chunk-H2FA2SBS.mjs +0 -51
  122. package/dist/chunk-H2FA2SBS.mjs.map +0 -1
  123. package/dist/chunk-HNIQFZKB.mjs +0 -3550
  124. package/dist/chunk-HNIQFZKB.mjs.map +0 -1
  125. package/dist/chunk-ITN462YM.mjs +0 -98
  126. package/dist/chunk-ITN462YM.mjs.map +0 -1
  127. package/dist/chunk-J23HNLFY.mjs +0 -72
  128. package/dist/chunk-J23HNLFY.mjs.map +0 -1
  129. package/dist/chunk-J4FNJ5IU.mjs +0 -179
  130. package/dist/chunk-J4FNJ5IU.mjs.map +0 -1
  131. package/dist/chunk-JDEOUK5V.mjs +0 -427
  132. package/dist/chunk-JDEOUK5V.mjs.map +0 -1
  133. package/dist/chunk-JK25YEN6.mjs +0 -219
  134. package/dist/chunk-JK25YEN6.mjs.map +0 -1
  135. package/dist/chunk-K4667E2Q.mjs +0 -1916
  136. package/dist/chunk-K4667E2Q.mjs.map +0 -1
  137. package/dist/chunk-LGHEOHBU.mjs +0 -218
  138. package/dist/chunk-LGHEOHBU.mjs.map +0 -1
  139. package/dist/chunk-LLC7BNXW.mjs +0 -275
  140. package/dist/chunk-LLC7BNXW.mjs.map +0 -1
  141. package/dist/chunk-LM2YNO4U.mjs +0 -24
  142. package/dist/chunk-LM2YNO4U.mjs.map +0 -1
  143. package/dist/chunk-MIUW47JX.mjs +0 -639
  144. package/dist/chunk-MIUW47JX.mjs.map +0 -1
  145. package/dist/chunk-NM3CRAAL.mjs +0 -467
  146. package/dist/chunk-NM3CRAAL.mjs.map +0 -1
  147. package/dist/chunk-NNLCAVB6.mjs +0 -391
  148. package/dist/chunk-NNLCAVB6.mjs.map +0 -1
  149. package/dist/chunk-P7QDS5AT.mjs +0 -191
  150. package/dist/chunk-P7QDS5AT.mjs.map +0 -1
  151. package/dist/chunk-PFE6GMNE.mjs +0 -603
  152. package/dist/chunk-PFE6GMNE.mjs.map +0 -1
  153. package/dist/chunk-QGOHVJ6J.mjs +0 -63
  154. package/dist/chunk-QGOHVJ6J.mjs.map +0 -1
  155. package/dist/chunk-QGQX7SFC.mjs +0 -180
  156. package/dist/chunk-QGQX7SFC.mjs.map +0 -1
  157. package/dist/chunk-QKVUNGAH.mjs +0 -39
  158. package/dist/chunk-QKVUNGAH.mjs.map +0 -1
  159. package/dist/chunk-QM746KUO.mjs +0 -56
  160. package/dist/chunk-QM746KUO.mjs.map +0 -1
  161. package/dist/chunk-RBRLLZL5.mjs +0 -81
  162. package/dist/chunk-RBRLLZL5.mjs.map +0 -1
  163. package/dist/chunk-RHIFZZUI.mjs +0 -69
  164. package/dist/chunk-RHIFZZUI.mjs.map +0 -1
  165. package/dist/chunk-RSKVYESE.mjs +0 -187
  166. package/dist/chunk-RSKVYESE.mjs.map +0 -1
  167. package/dist/chunk-SADGIRS2.mjs +0 -211
  168. package/dist/chunk-SADGIRS2.mjs.map +0 -1
  169. package/dist/chunk-SCFX4UTD.mjs +0 -28
  170. package/dist/chunk-SCFX4UTD.mjs.map +0 -1
  171. package/dist/chunk-SL6HTIOK.mjs +0 -66
  172. package/dist/chunk-SL6HTIOK.mjs.map +0 -1
  173. package/dist/chunk-SPBBQLXI.mjs +0 -207
  174. package/dist/chunk-SPBBQLXI.mjs.map +0 -1
  175. package/dist/chunk-T4QJQK76.mjs +0 -459
  176. package/dist/chunk-T4QJQK76.mjs.map +0 -1
  177. package/dist/chunk-TQAEEJB4.mjs +0 -157
  178. package/dist/chunk-TQAEEJB4.mjs.map +0 -1
  179. package/dist/chunk-UB5UOSHB.mjs +0 -458
  180. package/dist/chunk-UB5UOSHB.mjs.map +0 -1
  181. package/dist/chunk-USWZZUEH.mjs +0 -25
  182. package/dist/chunk-USWZZUEH.mjs.map +0 -1
  183. package/dist/chunk-UVCIEUJC.mjs +0 -16
  184. package/dist/chunk-UVCIEUJC.mjs.map +0 -1
  185. package/dist/chunk-UXUAWNO5.mjs +0 -396
  186. package/dist/chunk-UXUAWNO5.mjs.map +0 -1
  187. package/dist/chunk-V3XURYJO.mjs +0 -756
  188. package/dist/chunk-V3XURYJO.mjs.map +0 -1
  189. package/dist/chunk-V6WE6JSZ.mjs +0 -352
  190. package/dist/chunk-V6WE6JSZ.mjs.map +0 -1
  191. package/dist/chunk-V7RBCSDJ.mjs +0 -170
  192. package/dist/chunk-V7RBCSDJ.mjs.map +0 -1
  193. package/dist/chunk-VCANOYFI.mjs +0 -588
  194. package/dist/chunk-VCANOYFI.mjs.map +0 -1
  195. package/dist/chunk-VVKWFZAH.mjs +0 -753
  196. package/dist/chunk-VVKWFZAH.mjs.map +0 -1
  197. package/dist/chunk-VY2UYN5R.mjs +0 -224
  198. package/dist/chunk-VY2UYN5R.mjs.map +0 -1
  199. package/dist/chunk-W2CRQFF6.mjs +0 -1352
  200. package/dist/chunk-W2CRQFF6.mjs.map +0 -1
  201. package/dist/chunk-W4UIVMVI.mjs +0 -10
  202. package/dist/chunk-W4UIVMVI.mjs.map +0 -1
  203. package/dist/chunk-WZ5QFROO.mjs +0 -23
  204. package/dist/chunk-WZ5QFROO.mjs.map +0 -1
  205. package/dist/chunk-XIVV5IWN.mjs +0 -541
  206. package/dist/chunk-XIVV5IWN.mjs.map +0 -1
  207. package/dist/chunk-YW7OBE6Q.mjs +0 -119
  208. package/dist/chunk-YW7OBE6Q.mjs.map +0 -1
  209. package/dist/chunk-Z5CQMP54.mjs +0 -365
  210. package/dist/chunk-Z5CQMP54.mjs.map +0 -1
  211. package/dist/chunk-ZBE6MLHL.mjs +0 -230
  212. package/dist/chunk-ZBE6MLHL.mjs.map +0 -1
  213. package/dist/chunk-ZZ57EH5Z.mjs +0 -173
  214. package/dist/chunk-ZZ57EH5Z.mjs.map +0 -1
  215. package/dist/client-BT1mFQas.d.mts +0 -447
  216. package/dist/client-Nn0q4eO4.d.ts +0 -447
  217. package/dist/client-cache-CIlyBlmx.d.ts +0 -6
  218. package/dist/client-cache-D-EZ7XVW.d.mts +0 -6
  219. package/dist/client-plugins-Cw4qUGsw.d.ts +0 -1855
  220. package/dist/client-plugins-DQQ1adXM.d.mts +0 -1855
  221. package/dist/client-plugins.cjs +0 -415
  222. package/dist/client-plugins.cjs.map +0 -1
  223. package/dist/client-plugins.d.mts +0 -22
  224. package/dist/client-plugins.d.ts +0 -22
  225. package/dist/client-plugins.mjs +0 -10
  226. package/dist/client-plugins.mjs.map +0 -1
  227. package/dist/client.cjs +0 -5402
  228. package/dist/client.cjs.map +0 -1
  229. package/dist/client.d.mts +0 -447
  230. package/dist/client.d.ts +0 -447
  231. package/dist/client.mjs +0 -110
  232. package/dist/client.mjs.map +0 -1
  233. package/dist/config.cjs +0 -38
  234. package/dist/config.cjs.map +0 -1
  235. package/dist/config.d.mts +0 -29
  236. package/dist/config.d.ts +0 -29
  237. package/dist/config.mjs +0 -10
  238. package/dist/config.mjs.map +0 -1
  239. package/dist/cron.cjs +0 -406
  240. package/dist/cron.cjs.map +0 -1
  241. package/dist/cron.d.mts +0 -78
  242. package/dist/cron.d.ts +0 -78
  243. package/dist/cron.mjs +0 -30
  244. package/dist/cron.mjs.map +0 -1
  245. package/dist/deferred.cjs +0 -438
  246. package/dist/deferred.cjs.map +0 -1
  247. package/dist/deferred.d.mts +0 -42
  248. package/dist/deferred.d.ts +0 -42
  249. package/dist/deferred.mjs +0 -28
  250. package/dist/deferred.mjs.map +0 -1
  251. package/dist/deployment.cjs +0 -199
  252. package/dist/deployment.cjs.map +0 -1
  253. package/dist/deployment.d.mts +0 -34
  254. package/dist/deployment.d.ts +0 -34
  255. package/dist/deployment.mjs +0 -38
  256. package/dist/deployment.mjs.map +0 -1
  257. package/dist/devtools-LVC3VB5P.mjs +0 -370
  258. package/dist/devtools-LVC3VB5P.mjs.map +0 -1
  259. package/dist/devtools-client-3XRTBND5.mjs +0 -216
  260. package/dist/devtools-client-3XRTBND5.mjs.map +0 -1
  261. package/dist/devtools-ui-NJKFORTG.mjs +0 -1349
  262. package/dist/devtools-ui-NJKFORTG.mjs.map +0 -1
  263. package/dist/docs.cjs +0 -5553
  264. package/dist/docs.cjs.map +0 -1
  265. package/dist/docs.d.mts +0 -69
  266. package/dist/docs.d.ts +0 -69
  267. package/dist/docs.mjs +0 -46
  268. package/dist/docs.mjs.map +0 -1
  269. package/dist/env-types.cjs +0 -223
  270. package/dist/env-types.cjs.map +0 -1
  271. package/dist/env-types.d.mts +0 -11
  272. package/dist/env-types.d.ts +0 -11
  273. package/dist/env-types.mjs +0 -9
  274. package/dist/env-types.mjs.map +0 -1
  275. package/dist/env.cjs +0 -215
  276. package/dist/env.cjs.map +0 -1
  277. package/dist/env.d.mts +0 -45
  278. package/dist/env.d.ts +0 -45
  279. package/dist/env.mjs +0 -22
  280. package/dist/env.mjs.map +0 -1
  281. package/dist/environment/vite.d.mts +0 -22
  282. package/dist/environment/vite.d.ts +0 -22
  283. package/dist/environment.cjs +0 -96
  284. package/dist/environment.cjs.map +0 -1
  285. package/dist/environment.d.mts +0 -18
  286. package/dist/environment.d.ts +0 -18
  287. package/dist/environment.mjs +0 -14
  288. package/dist/environment.mjs.map +0 -1
  289. package/dist/headers.cjs +0 -126
  290. package/dist/headers.cjs.map +0 -1
  291. package/dist/headers.d.mts +0 -22
  292. package/dist/headers.d.ts +0 -22
  293. package/dist/headers.mjs +0 -12
  294. package/dist/headers.mjs.map +0 -1
  295. package/dist/i18n/client.d.mts +0 -32
  296. package/dist/i18n/client.d.ts +0 -32
  297. package/dist/i18n/index.d.mts +0 -20
  298. package/dist/i18n/index.d.ts +0 -20
  299. package/dist/i18n/server.d.mts +0 -30
  300. package/dist/i18n/server.d.ts +0 -30
  301. package/dist/image/server.d.mts +0 -37
  302. package/dist/image/server.d.ts +0 -37
  303. package/dist/image/sharp.d.mts +0 -7
  304. package/dist/image/sharp.d.ts +0 -7
  305. package/dist/image-config-Duob7wER.d.mts +0 -50
  306. package/dist/image-config-Duob7wER.d.ts +0 -50
  307. package/dist/image.cjs +0 -209
  308. package/dist/image.cjs.map +0 -1
  309. package/dist/image.d.mts +0 -39
  310. package/dist/image.d.ts +0 -39
  311. package/dist/image.mjs +0 -165
  312. package/dist/image.mjs.map +0 -1
  313. package/dist/index.cjs +0 -41822
  314. package/dist/index.cjs.map +0 -1
  315. package/dist/index.d.mts +0 -452
  316. package/dist/index.d.ts +0 -452
  317. package/dist/index.mjs +0 -973
  318. package/dist/index.mjs.map +0 -1
  319. package/dist/integration-api-CHT2OKAf.d.mts +0 -93
  320. package/dist/integration-api-CHT2OKAf.d.ts +0 -93
  321. package/dist/integration-orm-GQLGU66X.mjs +0 -13
  322. package/dist/integration-orm-GQLGU66X.mjs.map +0 -1
  323. package/dist/integrations.cjs +0 -2820
  324. package/dist/integrations.cjs.map +0 -1
  325. package/dist/integrations.d.mts +0 -22
  326. package/dist/integrations.d.ts +0 -22
  327. package/dist/integrations.mjs +0 -51
  328. package/dist/integrations.mjs.map +0 -1
  329. package/dist/internal/build-runtime.d.mts +0 -39
  330. package/dist/internal/build-runtime.d.ts +0 -39
  331. package/dist/internal/client-runtime.d.mts +0 -2
  332. package/dist/internal/client-runtime.d.ts +0 -2
  333. package/dist/internal/config-runtime.d.mts +0 -39
  334. package/dist/internal/config-runtime.d.ts +0 -39
  335. package/dist/internal/production-node-env.d.mts +0 -12
  336. package/dist/internal/production-node-env.d.ts +0 -12
  337. package/dist/internal/production-runtime.d.mts +0 -39
  338. package/dist/internal/production-runtime.d.ts +0 -39
  339. package/dist/layers-VWVDTPUZ.mjs +0 -16
  340. package/dist/layers-VWVDTPUZ.mjs.map +0 -1
  341. package/dist/manager-THKFTOFE.mjs +0 -10
  342. package/dist/manager-THKFTOFE.mjs.map +0 -1
  343. package/dist/markdown.cjs +0 -299
  344. package/dist/markdown.cjs.map +0 -1
  345. package/dist/markdown.d.mts +0 -43
  346. package/dist/markdown.d.ts +0 -43
  347. package/dist/markdown.mjs +0 -14
  348. package/dist/markdown.mjs.map +0 -1
  349. package/dist/metadata-BAPg_Nmo.d.ts +0 -22
  350. package/dist/metadata-_6i9oFG3.d.mts +0 -22
  351. package/dist/middleware.cjs +0 -2148
  352. package/dist/middleware.cjs.map +0 -1
  353. package/dist/middleware.d.mts +0 -164
  354. package/dist/middleware.d.ts +0 -164
  355. package/dist/middleware.mjs +0 -49
  356. package/dist/middleware.mjs.map +0 -1
  357. package/dist/navigation-errors-Dvwpzaer.d.mts +0 -13
  358. package/dist/navigation-errors-Dvwpzaer.d.ts +0 -13
  359. package/dist/navigation.cjs +0 -1329
  360. package/dist/navigation.cjs.map +0 -1
  361. package/dist/navigation.d.mts +0 -14
  362. package/dist/navigation.d.ts +0 -14
  363. package/dist/navigation.mjs +0 -33
  364. package/dist/navigation.mjs.map +0 -1
  365. package/dist/nitro-QO5LV6QK.mjs +0 -689
  366. package/dist/nitro-QO5LV6QK.mjs.map +0 -1
  367. package/dist/observability.cjs +0 -186
  368. package/dist/observability.cjs.map +0 -1
  369. package/dist/observability.d.mts +0 -335
  370. package/dist/observability.d.ts +0 -335
  371. package/dist/observability.mjs +0 -16
  372. package/dist/observability.mjs.map +0 -1
  373. package/dist/params-BALtrRim.d.ts +0 -15
  374. package/dist/params-ry-lxqmy.d.mts +0 -15
  375. package/dist/plugin-BJDf43dc.d.mts +0 -165
  376. package/dist/plugin-BJDf43dc.d.ts +0 -165
  377. package/dist/plugin.cjs +0 -23225
  378. package/dist/plugin.d.mts +0 -22
  379. package/dist/plugin.d.ts +0 -22
  380. package/dist/production-runtime-BoJDc5mc.d.ts +0 -79
  381. package/dist/production-runtime-C_B79w2P.d.mts +0 -28
  382. package/dist/production-runtime-DDEM1D2q.d.ts +0 -28
  383. package/dist/production-runtime-DPfgMV9Y.d.mts +0 -79
  384. package/dist/query/client.d.mts +0 -61
  385. package/dist/query/client.d.ts +0 -61
  386. package/dist/query/index.d.mts +0 -90
  387. package/dist/query/index.d.ts +0 -90
  388. package/dist/query/parsers.d.mts +0 -25
  389. package/dist/query/parsers.d.ts +0 -25
  390. package/dist/query/server.d.mts +0 -55
  391. package/dist/query/server.d.ts +0 -55
  392. package/dist/request-BrFBuc8G.d.mts +0 -6
  393. package/dist/request-BslSZIRz.d.ts +0 -6
  394. package/dist/request.d.mts +0 -2
  395. package/dist/request.d.ts +0 -2
  396. package/dist/resolver-C6iecsDV.d.ts +0 -14
  397. package/dist/resolver-DlOPpjkB.d.mts +0 -14
  398. package/dist/route-runtime-DoOHzCAD.d.mts +0 -38
  399. package/dist/route-runtime-DoOHzCAD.d.ts +0 -38
  400. package/dist/router.d.mts +0 -36
  401. package/dist/router.d.ts +0 -36
  402. package/dist/routes.d.mts +0 -224
  403. package/dist/routes.d.ts +0 -224
  404. package/dist/runtime-9nQjVM7X.d.mts +0 -206
  405. package/dist/runtime-B6GvwDS1.d.ts +0 -27
  406. package/dist/runtime-DeAAZ6gO.d.mts +0 -27
  407. package/dist/runtime-DgeS2skB.d.ts +0 -206
  408. package/dist/server-action-security.d.mts +0 -43
  409. package/dist/server-action-security.d.ts +0 -43
  410. package/dist/server-fn-client.d.mts +0 -32
  411. package/dist/server-fn-client.d.ts +0 -32
  412. package/dist/server-fn.d.mts +0 -93
  413. package/dist/server-fn.d.ts +0 -93
  414. package/dist/server-plugins.d.mts +0 -55
  415. package/dist/server-plugins.d.ts +0 -55
  416. package/dist/server-query-client.d.mts +0 -50
  417. package/dist/server-query-client.d.ts +0 -50
  418. package/dist/server-query.d.mts +0 -36
  419. package/dist/server-query.d.ts +0 -36
  420. package/dist/server.d.mts +0 -48
  421. package/dist/server.d.ts +0 -48
  422. package/dist/storage.d.mts +0 -52
  423. package/dist/storage.d.ts +0 -52
  424. package/dist/testing.d.mts +0 -101
  425. package/dist/testing.d.ts +0 -101
  426. package/dist/transport-BmbGTXA5.d.mts +0 -49
  427. package/dist/transport-BmbGTXA5.d.ts +0 -49
  428. package/dist/types-BH1lhg5G.d.mts +0 -81
  429. package/dist/types-BH1lhg5G.d.ts +0 -81
  430. package/dist/types-C9N-nk5R.d.mts +0 -53
  431. package/dist/types-C9N-nk5R.d.ts +0 -53
  432. package/dist/types-D1A6-XvH.d.mts +0 -73
  433. package/dist/types-D1A6-XvH.d.ts +0 -73
  434. package/dist/utils-CHXlMDkg.d.mts +0 -23
  435. package/dist/utils-Drsyz1Vj.d.ts +0 -23
  436. package/dist/version.d.mts +0 -3
  437. package/dist/version.d.ts +0 -3
  438. package/dist/vite.d.mts +0 -22
  439. package/dist/vite.d.ts +0 -22
  440. package/dist/workflows.d.mts +0 -110
  441. package/dist/workflows.d.ts +0 -110
@@ -1,639 +0,0 @@
1
- import {
2
- normalizeMiddlewareModule
3
- } from "./chunk-P7QDS5AT.mjs";
4
- import {
5
- sendWebResponse
6
- } from "./chunk-QGOHVJ6J.mjs";
7
- import {
8
- logger
9
- } from "./chunk-J4FNJ5IU.mjs";
10
- import {
11
- stripFarmLocaleFromPathname
12
- } from "./chunk-44ZCFSKE.mjs";
13
- import {
14
- emitFarmEvent
15
- } from "./chunk-7ZY5AIJO.mjs";
16
- import {
17
- __name,
18
- __require
19
- } from "./chunk-CGILA3WO.mjs";
20
-
21
- // src/middleware/context.ts
22
- function parseCookies(cookieHeader) {
23
- if (!cookieHeader) return {};
24
- return cookieHeader.split(";").reduce(
25
- (cookies, cookie) => {
26
- const [name, ...rest] = cookie.split("=");
27
- const value = rest.join("=").trim();
28
- if (name && value) {
29
- cookies[name.trim()] = decodeURIComponent(value);
30
- }
31
- return cookies;
32
- },
33
- {}
34
- );
35
- }
36
- __name(parseCookies, "parseCookies");
37
- function serializeCookie(name, value, options = {}) {
38
- let cookie = `${encodeURIComponent(name)}=${encodeURIComponent(value)}`;
39
- if (options.maxAge) {
40
- cookie += `; Max-Age=${options.maxAge}`;
41
- }
42
- if (options.expires) {
43
- cookie += `; Expires=${options.expires.toUTCString()}`;
44
- }
45
- if (options.path) {
46
- cookie += `; Path=${options.path}`;
47
- } else {
48
- cookie += "; Path=/";
49
- }
50
- if (options.domain) {
51
- cookie += `; Domain=${options.domain}`;
52
- }
53
- if (options.secure) {
54
- cookie += "; Secure";
55
- }
56
- if (options.httpOnly) {
57
- cookie += "; HttpOnly";
58
- }
59
- if (options.sameSite) {
60
- cookie += `; SameSite=${options.sameSite.charAt(0).toUpperCase() + options.sameSite.slice(1)}`;
61
- }
62
- return cookie;
63
- }
64
- __name(serializeCookie, "serializeCookie");
65
- var _CookieJarImpl = class _CookieJarImpl {
66
- constructor(req, res) {
67
- this.req = req;
68
- this.res = res;
69
- this.setCookies = [];
70
- this.cookies = parseCookies(req.headers.cookie);
71
- }
72
- get(name) {
73
- return this.cookies[name];
74
- }
75
- set(name, value, options = {}) {
76
- this.cookies[name] = value;
77
- const cookieString = serializeCookie(name, value, options);
78
- this.setCookies.push(cookieString);
79
- this.res.setHeader("Set-Cookie", this.setCookies);
80
- }
81
- delete(name) {
82
- delete this.cookies[name];
83
- const cookieString = serializeCookie(name, "", {
84
- maxAge: 0,
85
- expires: /* @__PURE__ */ new Date(0)
86
- });
87
- this.setCookies.push(cookieString);
88
- this.res.setHeader("Set-Cookie", this.setCookies);
89
- }
90
- getAll() {
91
- return { ...this.cookies };
92
- }
93
- };
94
- __name(_CookieJarImpl, "CookieJarImpl");
95
- var CookieJarImpl = _CookieJarImpl;
96
- function createContext(req, res, viteServer, parent) {
97
- const url = new URL(req.url || "/", `http://${req.headers.host || "localhost"}`);
98
- const headers = /* @__PURE__ */ new Map();
99
- const data = parent?.data ? new Map(parent.data) : /* @__PURE__ */ new Map();
100
- const locals = parent?.locals ? new Map(parent.locals) : /* @__PURE__ */ new Map();
101
- const cookies = new CookieJarImpl(req, res);
102
- Object.entries(req.headers).forEach(([key, value]) => {
103
- if (typeof value === "string") {
104
- headers.set(key, value);
105
- } else if (Array.isArray(value)) {
106
- headers.set(key, value.join(", "));
107
- }
108
- });
109
- if (parent?.headers) {
110
- for (const [key, value] of Object.entries(parent.headers)) {
111
- headers.set(key, value);
112
- }
113
- }
114
- let handled = false;
115
- const ctx = {
116
- request: req,
117
- response: res,
118
- url,
119
- pathname: url.pathname,
120
- searchParams: url.searchParams,
121
- method: req.method || "GET",
122
- params: {},
123
- route: url.pathname,
124
- parent,
125
- vite: {
126
- isDev: process.env.NODE_ENV !== "production",
127
- hmr: !!viteServer?.hot,
128
- server: viteServer
129
- },
130
- data,
131
- locals,
132
- headers,
133
- cookies,
134
- _handled: false,
135
- redirect(redirectUrl, status = 307) {
136
- if (handled) {
137
- console.warn("Response already sent, cannot redirect");
138
- return;
139
- }
140
- ctx._redirectUrl = redirectUrl;
141
- ctx._handled = true;
142
- handled = true;
143
- res.writeHead(status, {
144
- Location: redirectUrl,
145
- "Content-Type": "text/plain"
146
- });
147
- res.end(`Redirecting to ${redirectUrl}`);
148
- },
149
- rewrite(rewriteUrl) {
150
- ctx._rewriteUrl = rewriteUrl;
151
- const newUrl = new URL(rewriteUrl, `http://${req.headers.host || "localhost"}`);
152
- ctx.url = newUrl;
153
- ctx.pathname = newUrl.pathname;
154
- ctx.searchParams = newUrl.searchParams;
155
- req.url = rewriteUrl;
156
- },
157
- json(jsonData, status = 200) {
158
- if (handled) {
159
- console.warn("Response already sent, cannot send JSON");
160
- return;
161
- }
162
- ctx._handled = true;
163
- handled = true;
164
- res.writeHead(status, {
165
- "Content-Type": "application/json"
166
- });
167
- res.end(JSON.stringify(jsonData));
168
- },
169
- text(content, status = 200) {
170
- if (handled) {
171
- console.warn("Response already sent, cannot send text");
172
- return;
173
- }
174
- ctx._handled = true;
175
- handled = true;
176
- res.writeHead(status, {
177
- "Content-Type": "text/plain"
178
- });
179
- res.end(content);
180
- },
181
- html(content, status = 200) {
182
- if (handled) {
183
- console.warn("Response already sent, cannot send HTML");
184
- return;
185
- }
186
- ctx._handled = true;
187
- handled = true;
188
- res.writeHead(status, {
189
- "Content-Type": "text/html"
190
- });
191
- res.end(content);
192
- }
193
- };
194
- return ctx;
195
- }
196
- __name(createContext, "createContext");
197
-
198
- // src/middleware/manager.ts
199
- import * as fs from "fs";
200
- import * as path from "path";
201
- function isMiddlewareResponse(value) {
202
- return value instanceof Response;
203
- }
204
- __name(isMiddlewareResponse, "isMiddlewareResponse");
205
- var _MiddlewareManager = class _MiddlewareManager {
206
- constructor(appDir, viteServer, config, i18n) {
207
- this.middleware = [];
208
- this.configMiddleware = [];
209
- this.appDirs = Array.isArray(appDir) ? [...appDir] : [appDir];
210
- this.viteServer = viteServer;
211
- this.i18n = i18n;
212
- this.configure(config);
213
- }
214
- configure(config) {
215
- this.configMiddleware = [];
216
- this.globalConfig = void 0;
217
- if (!config) return;
218
- const entries = Array.isArray(config) ? config : [config];
219
- for (const [index, entry] of entries.entries()) {
220
- const handlers = this.getConfigHandlers(entry);
221
- const middlewareConfig = this.toMiddlewareConfig(entry);
222
- if (handlers.length === 0) {
223
- this.globalConfig = middlewareConfig;
224
- continue;
225
- }
226
- this.configMiddleware.push({
227
- path: "/",
228
- filePath: `farm.config.ts#middleware-${index}`,
229
- handlers,
230
- config: middlewareConfig,
231
- source: "config"
232
- });
233
- }
234
- }
235
- /**
236
- * Discover all middleware.ts files
237
- */
238
- async discover() {
239
- const middlewareByPath = /* @__PURE__ */ new Map();
240
- for (const appDir of this.appDirs) {
241
- const discovered = [];
242
- await this.discoverInDirectory(appDir, "/", discovered);
243
- for (const middleware of discovered) {
244
- middlewareByPath.set(middleware.path, middleware);
245
- }
246
- }
247
- this.middleware = Array.from(middlewareByPath.values());
248
- this.middleware.sort((a, b) => {
249
- const depthA = a.path.split("/").length;
250
- const depthB = b.path.split("/").length;
251
- return depthA - depthB;
252
- });
253
- if (process.env.FARM_VERBOSE && this.middleware.length > 0) {
254
- logger.success(`Discovered ${this.middleware.length} middleware files`);
255
- for (const mw of this.middleware) {
256
- logger.info(` ${mw.path} (${mw.handlers.length} handlers)`);
257
- }
258
- }
259
- }
260
- /**
261
- * Recursively discover middleware files
262
- */
263
- async discoverInDirectory(dir, routePath, discovered) {
264
- if (!fs.existsSync(dir)) {
265
- return;
266
- }
267
- const middlewareFile = this.findMiddlewareFile(dir);
268
- if (middlewareFile) {
269
- const middleware = await this.loadMiddleware(middlewareFile, routePath);
270
- if (middleware) {
271
- discovered.push(middleware);
272
- }
273
- }
274
- const entries = fs.readdirSync(dir, { withFileTypes: true });
275
- for (const entry of entries) {
276
- if (entry.isDirectory() && !entry.name.startsWith(".") && !entry.name.startsWith("_")) {
277
- const subPath = path.join(dir, entry.name);
278
- const subRoutePath = path.posix.join(routePath, entry.name);
279
- await this.discoverInDirectory(subPath, subRoutePath, discovered);
280
- }
281
- }
282
- }
283
- /**
284
- * Find middleware file in directory
285
- */
286
- findMiddlewareFile(dir) {
287
- const extensions = [".ts", ".tsx", ".js", ".jsx"];
288
- for (const ext of extensions) {
289
- const filePath = path.join(dir, `middleware${ext}`);
290
- if (fs.existsSync(filePath)) {
291
- return filePath;
292
- }
293
- }
294
- return null;
295
- }
296
- /**
297
- * Load a middleware file
298
- */
299
- async loadMiddleware(filePath, routePath) {
300
- try {
301
- let module;
302
- if (this.viteServer) {
303
- module = await this.viteServer.ssrLoadModule(filePath);
304
- } else {
305
- const fileUrl = `file://${filePath}`;
306
- module = await import(
307
- /* @vite-ignore */
308
- fileUrl
309
- );
310
- }
311
- const normalized = normalizeMiddlewareModule(module, routePath);
312
- if (!normalized) {
313
- logger.warn(
314
- `Middleware file ${filePath} must export a default handler or a named middleware handler`
315
- );
316
- return null;
317
- }
318
- return {
319
- path: routePath,
320
- filePath,
321
- handlers: normalized.handlers,
322
- config: normalized.config,
323
- source: "file"
324
- };
325
- } catch (error) {
326
- logger.error(`Failed to load middleware ${filePath}: ${error}`);
327
- return null;
328
- }
329
- }
330
- /**
331
- * Execute middleware for a request
332
- */
333
- async execute(req, res) {
334
- const url = new URL(req.url || "/", `http://${req.headers.host || "localhost"}`);
335
- const pathname = url.pathname;
336
- const routePathname = this.i18n?.enabled ? stripFarmLocaleFromPathname(pathname, this.i18n) : pathname;
337
- const method = req.method || "GET";
338
- const startTime = Date.now();
339
- let parentData;
340
- let ctx = createContext(req, res, this.viteServer);
341
- if (this.globalConfig) {
342
- const globalMatch = this.matchesConfig(routePathname, this.globalConfig, ctx);
343
- if (!globalMatch.matched) {
344
- return false;
345
- }
346
- if (globalMatch.params) {
347
- ctx.params = { ...ctx.params, ...globalMatch.params };
348
- }
349
- }
350
- const applicable = [
351
- ...this.configMiddleware.map((mw) => ({ mw, routeMatch: { matched: true } })),
352
- ...this.middleware.map((mw) => ({ mw, routeMatch: this.matchRoutePath(routePathname, mw.path) })).filter((entry) => entry.routeMatch.matched)
353
- ];
354
- if (applicable.length === 0) {
355
- return false;
356
- }
357
- try {
358
- const pc = __require("picocolors");
359
- const middlewarePaths = applicable.map(({ mw }) => mw.path).join(", ");
360
- const log = [
361
- pc.dim("[") + pc.bold(pc.blue("FARM")) + pc.dim("]"),
362
- pc.dim("[") + pc.bold(pc.magenta("MIDDLEWARE")) + pc.dim("]"),
363
- pc.dim("[") + pc.bold(pc.white(method.padEnd(3))) + pc.dim("]"),
364
- pc.gray("Executing middleware: "),
365
- pc.gray(pathname),
366
- pc.dim(` (${(Date.now() - startTime).toFixed(2)}ms)`)
367
- ].join(" ");
368
- console.log(log);
369
- } catch {
370
- console.log(
371
- `[FARM] [MIDDLEWARE] [${method}] Executing ${pathname} (${applicable.length} middleware)`
372
- );
373
- }
374
- for (const entry of applicable) {
375
- const { mw, routeMatch } = entry;
376
- const configMatch = mw.config ? this.matchesConfig(routePathname, mw.config, ctx) : { matched: true };
377
- if (!configMatch.matched) {
378
- continue;
379
- }
380
- if (routeMatch.params) {
381
- ctx.params = { ...ctx.params, ...routeMatch.params };
382
- }
383
- if (configMatch.params) {
384
- ctx.params = { ...ctx.params, ...configMatch.params };
385
- }
386
- if (parentData) {
387
- ctx = createContext(req, res, this.viteServer, parentData);
388
- if (routeMatch.params) {
389
- ctx.params = { ...ctx.params, ...routeMatch.params };
390
- }
391
- if (configMatch.params) {
392
- ctx.params = { ...ctx.params, ...configMatch.params };
393
- }
394
- }
395
- const middlewareStartTime = Date.now();
396
- const middlewareEvent = {
397
- route: mw.path,
398
- pathname,
399
- name: mw.filePath
400
- };
401
- emitFarmEvent({ type: "middleware.start", ...middlewareEvent });
402
- try {
403
- let handlerIndex = 0;
404
- let returnedResponse;
405
- const executeNext = /* @__PURE__ */ __name(async () => {
406
- if (handlerIndex < mw.handlers.length) {
407
- const handler = mw.handlers[handlerIndex++];
408
- const result2 = await handler(ctx, executeNext);
409
- if (isMiddlewareResponse(result2)) {
410
- returnedResponse = result2;
411
- return result2;
412
- }
413
- }
414
- return returnedResponse;
415
- }, "executeNext");
416
- const result = await executeNext();
417
- const response = isMiddlewareResponse(result) ? result : returnedResponse;
418
- if (response) {
419
- if (!res.headersSent && !res.writableEnded) {
420
- for (const [key, value] of ctx.headers) {
421
- try {
422
- res.setHeader(key, value);
423
- } catch (error) {
424
- }
425
- }
426
- }
427
- emitFarmEvent({
428
- type: "middleware.shortCircuit",
429
- ...middlewareEvent,
430
- status: response.status
431
- });
432
- await sendWebResponse(res, response);
433
- return true;
434
- }
435
- if (ctx._handled || res.headersSent || res.writableEnded) {
436
- emitFarmEvent({
437
- type: "middleware.shortCircuit",
438
- ...middlewareEvent,
439
- status: res.statusCode
440
- });
441
- return true;
442
- }
443
- emitFarmEvent({
444
- type: "middleware.complete",
445
- ...middlewareEvent,
446
- durationMs: Date.now() - middlewareStartTime
447
- });
448
- } catch (error) {
449
- emitFarmEvent({
450
- type: "middleware.error",
451
- ...middlewareEvent,
452
- error
453
- });
454
- throw error;
455
- }
456
- parentData = {
457
- data: new Map(ctx.data),
458
- locals: new Map(ctx.locals),
459
- headers: Object.fromEntries(ctx.headers)
460
- };
461
- }
462
- if (!res.headersSent && !res.writableEnded) {
463
- for (const [key, value] of ctx.headers) {
464
- try {
465
- res.setHeader(key, value);
466
- } catch (error) {
467
- }
468
- }
469
- }
470
- req.__FARM_MIDDLEWARE_DATA__ = new Map(ctx.data);
471
- req.__FARM_MIDDLEWARE_CONTEXT__ = new Map(ctx.locals);
472
- return false;
473
- }
474
- /**
475
- * Check if pathname matches middleware config
476
- */
477
- matchesConfig(pathname, config, ctx) {
478
- if (config.exclude) {
479
- for (const pattern of config.exclude) {
480
- if (this.matchPattern(pattern, pathname).matched) {
481
- return { matched: false };
482
- }
483
- }
484
- }
485
- if (config.matcher) {
486
- for (const matcher of this.toMatcherList(config.matcher)) {
487
- if (typeof matcher === "string" || matcher instanceof RegExp) {
488
- const result = this.matchPattern(matcher, pathname);
489
- if (result.matched) {
490
- return result;
491
- }
492
- } else if (typeof matcher === "function") {
493
- return { matched: matcher(ctx) };
494
- }
495
- }
496
- return { matched: false };
497
- }
498
- return { matched: true };
499
- }
500
- /**
501
- * Match a pattern against pathname
502
- */
503
- matchPattern(pattern, pathname) {
504
- if (pattern instanceof RegExp) {
505
- pattern.lastIndex = 0;
506
- const match2 = pattern.exec(pathname);
507
- return {
508
- matched: !!match2,
509
- params: match2?.groups ? { ...match2.groups } : void 0
510
- };
511
- }
512
- if (pattern === "*" || pattern === "/(.*)") {
513
- return { matched: true };
514
- }
515
- if (pattern.endsWith("(.*)")) {
516
- const prefix = pattern.slice(0, -4);
517
- return { matched: pathname === prefix || pathname.startsWith(`${prefix}/`) };
518
- }
519
- const { regex, params } = this.compilePathPattern(pattern);
520
- const match = regex.exec(pathname);
521
- if (!match) {
522
- return { matched: false };
523
- }
524
- const values = {};
525
- params.forEach((param, index) => {
526
- values[param] = decodeURIComponent(match[index + 1] || "");
527
- });
528
- return {
529
- matched: true,
530
- params: Object.keys(values).length > 0 ? values : void 0
531
- };
532
- }
533
- /**
534
- * Reload middleware (for HMR)
535
- */
536
- async reload() {
537
- await this.discover();
538
- }
539
- getMiddlewares() {
540
- return [...this.configMiddleware, ...this.middleware];
541
- }
542
- hasMiddleware() {
543
- return this.configMiddleware.length > 0 || this.middleware.length > 0;
544
- }
545
- matchRoutePath(pathname, middlewarePath) {
546
- if (middlewarePath === "/") return { matched: true };
547
- const exactMatch = this.matchPattern(middlewarePath, pathname);
548
- if (exactMatch.matched) {
549
- return exactMatch;
550
- }
551
- const nestedMatch = this.matchPattern(`${middlewarePath}/:__farmRest*`, pathname);
552
- if (!nestedMatch.matched) {
553
- return { matched: false };
554
- }
555
- const params = { ...nestedMatch.params };
556
- delete params.__farmRest;
557
- return {
558
- matched: true,
559
- params: Object.keys(params).length > 0 ? params : void 0
560
- };
561
- }
562
- toMatcherList(matcher) {
563
- if (!matcher) return [];
564
- return Array.isArray(matcher) ? matcher : [matcher];
565
- }
566
- getConfigHandlers(entry) {
567
- const handlers = [];
568
- if ("handler" in entry && typeof entry.handler === "function") {
569
- handlers.push(entry.handler);
570
- }
571
- if ("handlers" in entry && Array.isArray(entry.handlers)) {
572
- handlers.push(...entry.handlers.filter((handler) => typeof handler === "function"));
573
- }
574
- return handlers;
575
- }
576
- toMiddlewareConfig(entry) {
577
- const { matcher, exclude, runtime } = entry;
578
- return { matcher, exclude, runtime };
579
- }
580
- compilePathPattern(pattern) {
581
- const params = [];
582
- const segments = pattern.split("/").filter(Boolean);
583
- if (segments.length === 0) {
584
- return { regex: /^\/$/, params };
585
- }
586
- const parts = segments.map((segment) => {
587
- if (segment === "**") {
588
- return "(?:/.*)?";
589
- }
590
- if (segment === "*") {
591
- return "/[^/]+";
592
- }
593
- if (segment.startsWith(":")) {
594
- const { name, modifier } = this.parseColonParam(segment);
595
- params.push(name);
596
- if (modifier === "*") {
597
- return "(?:/(.*))?";
598
- }
599
- if (modifier === "+") {
600
- return "/(.+)";
601
- }
602
- return "/([^/]+)";
603
- }
604
- if (segment.startsWith("[...") && segment.endsWith("]")) {
605
- params.push(segment.slice(4, -1));
606
- return "(?:/(.*))?";
607
- }
608
- if (segment.startsWith("[") && segment.endsWith("]")) {
609
- params.push(segment.slice(1, -1));
610
- return "/([^/]+)";
611
- }
612
- return `/${this.escapeRegex(segment).replace(/\\\*/g, "[^/]*")}`;
613
- });
614
- return {
615
- regex: new RegExp(`^${parts.join("")}$`),
616
- params
617
- };
618
- }
619
- parseColonParam(segment) {
620
- const raw = segment.slice(1);
621
- const last = raw[raw.length - 1];
622
- const modifier = last === "*" || last === "+" || last === "?" ? last : void 0;
623
- return {
624
- name: modifier ? raw.slice(0, -1) : raw,
625
- modifier
626
- };
627
- }
628
- escapeRegex(value) {
629
- return value.replace(/[|\\{}()[\]^$+?.]/g, "\\$&");
630
- }
631
- };
632
- __name(_MiddlewareManager, "MiddlewareManager");
633
- var MiddlewareManager = _MiddlewareManager;
634
-
635
- export {
636
- createContext,
637
- MiddlewareManager
638
- };
639
- //# sourceMappingURL=chunk-MIUW47JX.mjs.map