@farm.js/core 0.1.31 → 0.1.35
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.
- package/README.md +1 -1
- package/dist/agent-runtime.cjs +70 -15
- package/dist/agent-runtime.d.mts +4 -5
- package/dist/agent-runtime.d.ts +4 -5
- package/dist/agent-runtime.mjs +59 -4
- package/dist/api/route-manager.cjs +17 -14
- package/dist/api/route-manager.d.mts +6 -7
- package/dist/api/route-manager.d.ts +6 -7
- package/dist/api/route-manager.mjs +16 -13
- package/dist/api/runtime.cjs +12 -8
- package/dist/api/runtime.d.mts +4 -5
- package/dist/api/runtime.d.ts +4 -5
- package/dist/api/runtime.mjs +12 -8
- package/dist/api.cjs +20 -17
- package/dist/api.d.mts +7 -8
- package/dist/api.d.ts +7 -8
- package/dist/api.mjs +19 -16
- package/dist/{app-sUJ3jnTZ.d.ts → app-BXB3JZYc.d.ts} +38 -12
- package/dist/{app-DAuUTIZf.d.mts → app-D_j9AAVL.d.mts} +38 -12
- package/dist/app-markdown.cjs +8 -6
- package/dist/app-markdown.d.mts +6 -7
- package/dist/app-markdown.d.ts +6 -7
- package/dist/app-markdown.mjs +7 -5
- package/dist/cache.cjs +2 -2
- package/dist/cache.d.mts +10 -1
- package/dist/cache.d.ts +10 -1
- package/dist/cache.mjs +1 -1
- package/dist/{chunk-BXFWA23T.mjs → chunk-22LTEMGQ.mjs} +3 -3
- package/dist/{chunk-YZTASLPQ.cjs → chunk-27ZWSI3W.cjs} +2 -2
- package/dist/{chunk-WBIH66JK.mjs → chunk-2ELDTQRN.mjs} +5 -2
- package/dist/{chunk-K7CELQLK.cjs → chunk-2F2ER724.cjs} +54 -29
- package/dist/{chunk-O3DTUAX2.mjs → chunk-2G2NNLE2.mjs} +6 -77
- package/dist/{chunk-NRVGEI5I.mjs → chunk-2NNMOPDN.mjs} +4 -210
- package/dist/{chunk-CTV2TTNP.cjs → chunk-3BHT4WMP.cjs} +16 -87
- package/dist/chunk-3BU22U3M.cjs +237 -0
- package/dist/{chunk-MM5D6VLP.mjs → chunk-3KZS4SUS.mjs} +33 -14
- package/dist/{chunk-VA62MHFV.mjs → chunk-3PXS2MHU.mjs} +1 -1
- package/dist/chunk-3SDFA7UF.cjs +701 -0
- package/dist/{chunk-4IEPYMHF.mjs → chunk-3UEVPCGW.mjs} +1 -1
- package/dist/{chunk-MXDTKXO6.cjs → chunk-3UH7MRCP.cjs} +73 -26
- package/dist/{chunk-7QOCTYBS.mjs → chunk-4JHOT46A.mjs} +37 -1
- package/dist/{chunk-6L6DQR5W.mjs → chunk-4KU5Q7C2.mjs} +917 -305
- package/dist/{chunk-3FCFQP5V.cjs → chunk-4MMGO7YW.cjs} +25 -25
- package/dist/{chunk-5HGR3W6O.mjs → chunk-5SJWVY6R.mjs} +8 -0
- package/dist/{chunk-KZLND3D2.cjs → chunk-62XKI4Z3.cjs} +7 -5
- package/dist/{chunk-FJZ3DQLK.mjs → chunk-6DU6UFUE.mjs} +13 -12
- package/dist/{chunk-TEN4FIZU.mjs → chunk-6ETPZTJI.mjs} +513 -3
- package/dist/{chunk-VUMAE7NC.mjs → chunk-6TJOML4E.mjs} +92 -31
- package/dist/{chunk-3ATMYLLJ.mjs → chunk-6WCPV6G2.mjs} +1 -1
- package/dist/{chunk-FYRBX5IY.cjs → chunk-73MC7ZL6.cjs} +2 -2
- package/dist/chunk-75RZHGLS.cjs +135 -0
- package/dist/{chunk-QZRVZSPN.cjs → chunk-77GNHH2Z.cjs} +3 -3
- package/dist/{chunk-FXUUWYAX.cjs → chunk-7GLPRTTF.cjs} +12 -2
- package/dist/{chunk-A777V5WU.cjs → chunk-7L5V3KQO.cjs} +2 -2
- package/dist/{chunk-4ZQQL4IU.mjs → chunk-AHGECQEW.mjs} +1 -1
- package/dist/{chunk-RG3ZOTG5.cjs → chunk-AI7QMY7O.cjs} +10 -3
- package/dist/{chunk-YMCXWPWK.mjs → chunk-BCMSYSN2.mjs} +4 -1
- package/dist/{chunk-I6XDAKWQ.mjs → chunk-BTHHUD7Q.mjs} +14 -0
- package/dist/{chunk-LI2LMOLR.mjs → chunk-C35ZBVRD.mjs} +12 -3
- package/dist/chunk-C4SPBWFM.cjs +26 -0
- package/dist/{chunk-YQVSHTMR.mjs → chunk-CP6X4AEU.mjs} +1 -1
- package/dist/{chunk-QZCT2CQ4.mjs → chunk-CXEN47J3.mjs} +64 -2
- package/dist/{chunk-WNLBF77X.cjs → chunk-D227TIEN.cjs} +28 -16
- package/dist/{chunk-ROUTX2E5.cjs → chunk-DBNKI4NF.cjs} +12 -3
- package/dist/{chunk-J3LOGE4T.cjs → chunk-DQQOKWYA.cjs} +5 -5
- package/dist/chunk-E5GNDG5F.mjs +701 -0
- package/dist/{chunk-X7KZBF63.cjs → chunk-EFCQPQMG.cjs} +40 -4
- package/dist/{chunk-K3F2E6GS.cjs → chunk-EJQT6KZN.cjs} +2 -2
- package/dist/{chunk-3LUF2PE2.cjs → chunk-EK4QAEFZ.cjs} +67 -5
- package/dist/{chunk-VVBO3QH7.mjs → chunk-ENLZ4R3Y.mjs} +10 -1
- package/dist/{chunk-KJ2TIHZZ.cjs → chunk-EUV4YR3V.cjs} +3 -2
- package/dist/{chunk-E76XC6ZG.mjs → chunk-EZDQRNQ7.mjs} +2 -2
- package/dist/{chunk-TOVMYGYW.mjs → chunk-F2SE2VDO.mjs} +1 -1
- package/dist/{chunk-MNUGPHLN.mjs → chunk-F6Z3Y5KL.mjs} +5 -3
- package/dist/{chunk-DFLLARUK.cjs → chunk-F7JZENPF.cjs} +35 -34
- package/dist/{chunk-BSPQVJ4A.mjs → chunk-FDR64H6B.mjs} +13 -0
- package/dist/{chunk-5OVTOKGH.cjs → chunk-FFFW3OQ7.cjs} +2 -2
- package/dist/{chunk-D4JE5NNV.cjs → chunk-FNO7A7CM.cjs} +5 -5
- package/dist/{chunk-Z5HIWVDP.cjs → chunk-FTFYRMQQ.cjs} +80 -91
- package/dist/chunk-FZ6YYU2W.mjs +65 -0
- package/dist/{chunk-X7WVQMIB.mjs → chunk-G5RT7EXW.mjs} +11 -5
- package/dist/{chunk-IXUY2F5U.mjs → chunk-GCXWJJKH.mjs} +4 -7
- package/dist/{chunk-ES4B2IXW.cjs → chunk-GFHLGIYC.cjs} +8 -8
- package/dist/{chunk-SORB3MAR.cjs → chunk-GQ3Z3IZI.cjs} +17 -17
- package/dist/{chunk-75WGQVQA.cjs → chunk-HITLGIAO.cjs} +10 -1
- package/dist/{chunk-HBTUGXHS.cjs → chunk-HLJ6MBUZ.cjs} +7 -4
- package/dist/{chunk-JLCQGPXE.mjs → chunk-HMIJDL7S.mjs} +51 -62
- package/dist/{chunk-F6XEGFHO.mjs → chunk-HUMR6LSU.mjs} +11 -1
- package/dist/{chunk-IMB4PIAR.cjs → chunk-ICUQICNC.cjs} +1441 -828
- package/dist/{chunk-ZCU4NZ3M.cjs → chunk-IE7XCHH3.cjs} +4 -4
- package/dist/{chunk-I26CZYPV.cjs → chunk-IHNIDL6H.cjs} +50 -7
- package/dist/{chunk-2FQHH5SC.mjs → chunk-IHNMMXHV.mjs} +49 -24
- package/dist/{chunk-YVGAEAA5.cjs → chunk-IPXLADVO.cjs} +522 -12
- package/dist/{chunk-VHJGDMCG.cjs → chunk-IWZKTWHZ.cjs} +2 -2
- package/dist/chunk-JG6DJF5A.mjs +238 -0
- package/dist/{chunk-KROWKCUH.cjs → chunk-JGLC4TO3.cjs} +8 -1
- package/dist/{chunk-5TISYEQF.mjs → chunk-JM5XPKWH.mjs} +10 -3
- package/dist/{chunk-BJJATPEC.mjs → chunk-KN7K4VQN.mjs} +1 -1
- package/dist/{chunk-WPYFSQKK.cjs → chunk-KNBBQHO2.cjs} +15 -1
- package/dist/{chunk-XWAWFQFS.cjs → chunk-KXWRO25S.cjs} +7 -4
- package/dist/chunk-LSKZMJMP.cjs +65 -0
- package/dist/{chunk-2N5PX3LS.mjs → chunk-LYV44OIR.mjs} +7 -1
- package/dist/chunk-M7MKQXAF.cjs +87 -0
- package/dist/{chunk-IV6CQY7O.mjs → chunk-MSSFIQGM.mjs} +63 -13
- package/dist/{chunk-KH7BN726.cjs → chunk-N4UOK6ZI.cjs} +8 -2
- package/dist/{chunk-JNGIWIY6.mjs → chunk-NPC7VWJE.mjs} +2 -2
- package/dist/chunk-NRDBW4MP.mjs +45 -0
- package/dist/{chunk-ILWLPEVO.mjs → chunk-NRSN7G7E.mjs} +2 -2
- package/dist/chunk-OFZUJMCU.mjs +601 -0
- package/dist/{chunk-L4DVIHOC.mjs → chunk-OKZUAXHF.mjs} +1 -1
- package/dist/{chunk-EM6SBQKM.cjs → chunk-OMVAU7NT.cjs} +27 -2
- package/dist/{chunk-AHAJGAYD.mjs → chunk-PDOCJ6RY.mjs} +2 -2
- package/dist/{chunk-IFI5FXEZ.cjs → chunk-PFQKNERH.cjs} +562 -251
- package/dist/{chunk-S5GDHOE4.mjs → chunk-PZNL3WEG.mjs} +48 -5
- package/dist/{chunk-GZYH4OER.mjs → chunk-Q3VLETLE.mjs} +2 -2
- package/dist/{chunk-WG2KHOMN.mjs → chunk-QAU5JD57.mjs} +571 -260
- package/dist/{chunk-FV45CKBC.mjs → chunk-QCFBDFRS.mjs} +1 -1
- package/dist/{chunk-75BRBIFP.cjs → chunk-QCVE2OCI.cjs} +5 -8
- package/dist/{chunk-6ZCMSZ5U.mjs → chunk-QE6VAKLT.mjs} +1 -1
- package/dist/{chunk-QG5HNS7P.mjs → chunk-QORUJDIV.mjs} +2 -2
- package/dist/chunk-RHAZ22ZN.mjs +87 -0
- package/dist/{chunk-CUMINO7Z.cjs → chunk-RU3M2FIK.cjs} +18 -14
- package/dist/{chunk-DGXN3L4D.mjs → chunk-SAZVVAJH.mjs} +5 -5
- package/dist/{chunk-MKMBQSNQ.mjs → chunk-SC2WYWPF.mjs} +3 -3
- package/dist/{chunk-QCFFHV5H.mjs → chunk-SMHH4VDG.mjs} +1 -1
- package/dist/{chunk-UAFSBWNT.mjs → chunk-SOMHP6GF.mjs} +63 -16
- package/dist/{chunk-ND224OE2.cjs → chunk-TKSCR644.cjs} +34 -15
- package/dist/{chunk-4V7GIE2U.mjs → chunk-UAORZ7QA.mjs} +3 -3
- package/dist/{chunk-IQXFRNY2.cjs → chunk-UFDAAQFX.cjs} +2 -2
- package/dist/{chunk-6VYZOPOT.mjs → chunk-UJD4PHYB.mjs} +15 -11
- package/dist/{chunk-ZHVYQL3H.cjs → chunk-ULAWS2PA.cjs} +97 -36
- package/dist/{chunk-5ZSWG4UX.cjs → chunk-UXFQ3UDA.cjs} +14 -1
- package/dist/{chunk-MPEYMSCF.cjs → chunk-VFQT3LAO.cjs} +5 -5
- package/dist/{chunk-2FXWWUE5.cjs → chunk-VZJR7UTG.cjs} +6 -6
- package/dist/{chunk-2AKFKCHA.mjs → chunk-W7LF2J2S.mjs} +1 -1
- package/dist/chunk-WWFTAUFG.cjs +45 -0
- package/dist/{chunk-JBC2FKRW.mjs → chunk-WWIKMBRN.mjs} +2 -1
- package/dist/{chunk-75DYEVXI.cjs → chunk-X6W5FFH6.cjs} +11 -11
- package/dist/{chunk-EXLKRR4U.cjs → chunk-XBML5KMG.cjs} +12 -12
- package/dist/{chunk-PZNCMPJF.cjs → chunk-XCACDAZZ.cjs} +18 -12
- package/dist/{chunk-JATSG2ZO.mjs → chunk-XCMCS4DA.mjs} +15 -3
- package/dist/{chunk-UJ2C4ICS.cjs → chunk-XJXBIP67.cjs} +4 -4
- package/dist/{chunk-XF7Q24PF.mjs → chunk-Y7RKTKYI.mjs} +25 -0
- package/dist/{chunk-VYZSOYR4.cjs → chunk-YC6V7PWE.cjs} +1 -1
- package/dist/{chunk-F6OHXPWR.mjs → chunk-YFILVET3.mjs} +8 -1
- package/dist/{chunk-JLRDISQL.cjs → chunk-YKX5BK66.cjs} +7 -7
- package/dist/{chunk-DYEJQTDN.cjs → chunk-YSCV4SJF.cjs} +4 -4
- package/dist/chunk-YSLWRWWP.cjs +601 -0
- package/dist/{chunk-5LJCOSKT.mjs → chunk-YULD7ICZ.mjs} +1 -1
- package/dist/{chunk-2SDO73HK.cjs → chunk-YWN746US.cjs} +64 -14
- package/dist/chunk-Z2HLU4IX.cjs +238 -0
- package/dist/chunk-ZLAT2CWY.mjs +135 -0
- package/dist/{chunk-T5CERMEH.cjs → chunk-ZXGAFZDO.cjs} +2 -2
- package/dist/{client-plugins-BX2ptm4H.d.mts → client-plugins-CvIslxWi.d.mts} +232 -8
- package/dist/{client-plugins-BmxM5KW_.d.ts → client-plugins-HIyulDym.d.ts} +232 -8
- package/dist/client-plugins.d.mts +4 -5
- package/dist/client-plugins.d.ts +4 -5
- package/dist/client.cjs +10 -10
- package/dist/client.d.mts +8 -9
- package/dist/client.d.ts +8 -9
- package/dist/client.mjs +9 -9
- package/dist/config.d.mts +4 -5
- package/dist/config.d.ts +4 -5
- package/dist/{devtools-EWRDHCD5.cjs → devtools-EAUY43BS.cjs} +14 -12
- package/dist/{devtools-BPBCYOU6.mjs → devtools-EE5RIBTH.mjs} +13 -11
- package/dist/docs.cjs +17 -15
- package/dist/docs.d.mts +46 -4
- package/dist/docs.d.ts +46 -4
- package/dist/docs.mjs +16 -14
- package/dist/environment/vite.cjs +2 -2
- package/dist/environment/vite.mjs +1 -1
- package/dist/headers.cjs +4 -4
- package/dist/headers.mjs +3 -3
- package/dist/i18n/client.cjs +14 -13
- package/dist/i18n/client.d.mts +2 -2
- package/dist/i18n/client.d.ts +2 -2
- package/dist/i18n/client.mjs +5 -4
- package/dist/i18n/index.cjs +3 -2
- package/dist/i18n/index.d.mts +3 -3
- package/dist/i18n/index.d.ts +3 -3
- package/dist/i18n/index.mjs +2 -1
- package/dist/i18n/server.cjs +6 -5
- package/dist/i18n/server.d.mts +5 -5
- package/dist/i18n/server.d.ts +5 -5
- package/dist/i18n/server.mjs +5 -4
- package/dist/image/server.cjs +3 -3
- package/dist/image/server.mjs +2 -2
- package/dist/image/sharp.cjs +10 -10
- package/dist/image/sharp.mjs +2 -2
- package/dist/{index-a-8Z5kZU.d.mts → index-BJJfLxJo.d.mts} +2 -2
- package/dist/{index-BWVfxIsO.d.ts → index-CwoOP-MW.d.ts} +2 -2
- package/dist/index.cjs +75 -60
- package/dist/index.d.mts +21 -22
- package/dist/index.d.ts +21 -22
- package/dist/index.mjs +79 -64
- package/dist/integrations.cjs +7 -4
- package/dist/integrations.d.mts +4 -5
- package/dist/integrations.d.ts +4 -5
- package/dist/integrations.mjs +8 -5
- package/dist/internal/app-markdown-runtime.cjs +7 -5
- package/dist/internal/app-markdown-runtime.d.mts +17 -7
- package/dist/internal/app-markdown-runtime.d.ts +17 -7
- package/dist/internal/app-markdown-runtime.mjs +6 -4
- package/dist/internal/build-runtime.cjs +44 -41
- package/dist/internal/build-runtime.d.mts +6 -7
- package/dist/internal/build-runtime.d.ts +6 -7
- package/dist/internal/build-runtime.mjs +43 -40
- package/dist/internal/cli-runtime.cjs +23 -20
- package/dist/internal/cli-runtime.mjs +22 -19
- package/dist/internal/client-error-overlay.cjs +6 -6
- package/dist/internal/client-error-overlay.mjs +2 -2
- package/dist/internal/client-runtime.cjs +5 -3
- package/dist/internal/client-runtime.d.mts +9 -1
- package/dist/internal/client-runtime.d.ts +9 -1
- package/dist/internal/client-runtime.mjs +4 -2
- package/dist/internal/compression-runtime.d.mts +4 -5
- package/dist/internal/compression-runtime.d.ts +4 -5
- package/dist/internal/config-runtime.cjs +14 -12
- package/dist/internal/config-runtime.d.mts +5 -6
- package/dist/internal/config-runtime.d.ts +5 -6
- package/dist/internal/config-runtime.mjs +13 -11
- package/dist/internal/infra-analytics-runtime.cjs +4 -4
- package/dist/internal/infra-analytics-runtime.mjs +2 -2
- package/dist/internal/isolated-boundary.cjs +3 -2
- package/dist/internal/isolated-boundary.d.mts +1 -0
- package/dist/internal/isolated-boundary.d.ts +1 -0
- package/dist/internal/isolated-boundary.mjs +2 -1
- package/dist/internal/metadata-image-runtime.cjs +3 -3
- package/dist/internal/metadata-image-runtime.mjs +2 -2
- package/dist/internal/product-telemetry-runtime.cjs +2 -2
- package/dist/internal/product-telemetry-runtime.mjs +1 -1
- package/dist/internal/production-runtime.cjs +61 -31
- package/dist/internal/production-runtime.d.mts +165 -18
- package/dist/internal/production-runtime.d.ts +165 -18
- package/dist/internal/production-runtime.mjs +57 -27
- package/dist/internal/request-cookies.cjs +4 -2
- package/dist/internal/request-cookies.d.mts +9 -1
- package/dist/internal/request-cookies.d.ts +9 -1
- package/dist/internal/request-cookies.mjs +3 -1
- package/dist/internal/server-tree.cjs +12 -0
- package/dist/internal/server-tree.d.mts +27 -0
- package/dist/internal/server-tree.d.ts +27 -0
- package/dist/internal/server-tree.mjs +12 -0
- package/dist/markdown.cjs +4 -4
- package/dist/markdown.d.mts +4 -5
- package/dist/markdown.d.ts +4 -5
- package/dist/markdown.mjs +3 -3
- package/dist/{metadata-DsEaK7mQ.d.mts → metadata-BnLDsUOS.d.ts} +16 -2
- package/dist/{metadata-fwZ3gfG6.d.ts → metadata-WGpBYcGn.d.mts} +16 -2
- package/dist/middleware.cjs +18 -8
- package/dist/middleware.d.mts +27 -9
- package/dist/middleware.d.ts +27 -9
- package/dist/middleware.mjs +18 -8
- package/dist/navigation.cjs +7 -7
- package/dist/navigation.d.mts +7 -8
- package/dist/navigation.d.ts +7 -8
- package/dist/navigation.mjs +6 -6
- package/dist/{nitro-NAKCRVHX.mjs → nitro-MXRDCXWZ.mjs} +5 -5
- package/dist/{nitro-VYDZGYFY.cjs → nitro-OVPLKPE2.cjs} +7 -7
- package/dist/{observability-BupkiN0m.d.mts → observability-CoXunYhS.d.mts} +4 -3
- package/dist/{observability-BupkiN0m.d.ts → observability-CoXunYhS.d.ts} +4 -3
- package/dist/observability.d.mts +1 -1
- package/dist/observability.d.ts +1 -1
- package/dist/plugin.cjs +39 -36
- package/dist/plugin.d.mts +4 -5
- package/dist/plugin.d.ts +4 -5
- package/dist/plugin.mjs +38 -35
- package/dist/{production-runtime-Baqgwtvc.d.mts → production-runtime-0sRnuYc-.d.mts} +11 -4
- package/dist/{production-runtime-DNkpFnmg.d.ts → production-runtime-Crq6CJ-2.d.ts} +11 -4
- package/dist/query/client.cjs +8 -8
- package/dist/query/client.mjs +4 -4
- package/dist/{render-plan-rkIK9wd9.d.ts → render-plan-8ozZh2Qv.d.ts} +1 -1
- package/dist/{render-plan-DhwQnmmX.d.mts → render-plan-gs9GGPzw.d.mts} +1 -1
- package/dist/renderer/react/server.cjs +10 -4
- package/dist/renderer/react/server.d.mts +2 -1
- package/dist/renderer/react/server.d.ts +2 -1
- package/dist/renderer/react/server.mjs +7 -1
- package/dist/renderer-client.cjs +40 -20
- package/dist/renderer-client.d.mts +6 -7
- package/dist/renderer-client.d.ts +6 -7
- package/dist/renderer-client.mjs +29 -9
- package/dist/renderer.d.mts +2 -0
- package/dist/renderer.d.ts +2 -0
- package/dist/{request-BcY4RYPC.d.ts → request-B5G8rLBH.d.ts} +7 -2
- package/dist/{request-CFy1BltJ.d.mts → request-fkhiynXe.d.mts} +7 -2
- package/dist/request.cjs +2 -2
- package/dist/request.d.mts +5 -6
- package/dist/request.d.ts +5 -6
- package/dist/request.mjs +1 -1
- package/dist/{resolver-PPEeiJ6M.d.ts → resolver-DadfRL6F.d.ts} +1 -1
- package/dist/{resolver-DhW0CqZN.d.mts → resolver-khasx3fU.d.mts} +1 -1
- package/dist/{route-rendering-BkS0TBlB.d.mts → route-rendering-CLnS7AZj.d.mts} +1 -1
- package/dist/{route-rendering-D4XpMjam.d.ts → route-rendering-lS5nUMua.d.ts} +1 -1
- package/dist/{router-Cq7BcZxg.d.ts → router-4iuiYnOW.d.ts} +1 -1
- package/dist/{router-C4zPlC3V.d.mts → router-ifU8Dui1.d.mts} +1 -1
- package/dist/routes.cjs +3 -3
- package/dist/routes.d.mts +4 -5
- package/dist/routes.d.ts +4 -5
- package/dist/routes.mjs +2 -2
- package/dist/{runtime-BirxPwbZ.d.ts → runtime-BgDQzBiu.d.ts} +2 -2
- package/dist/{runtime-AOJge4vQ.d.mts → runtime-CV2UCV-5.d.mts} +2 -2
- package/dist/server-action-security.cjs +3 -3
- package/dist/server-action-security.mjs +2 -2
- package/dist/server-fn.cjs +5 -5
- package/dist/server-fn.mjs +4 -4
- package/dist/server-plugins.cjs +4 -4
- package/dist/server-plugins.d.mts +5 -6
- package/dist/server-plugins.d.ts +5 -6
- package/dist/server-plugins.mjs +3 -3
- package/dist/server-query-client.cjs +3 -3
- package/dist/server-query-client.mjs +2 -2
- package/dist/server-query.cjs +6 -6
- package/dist/server-query.mjs +5 -5
- package/dist/server.cjs +66 -63
- package/dist/server.d.mts +13 -14
- package/dist/server.d.ts +13 -14
- package/dist/server.mjs +43 -40
- package/dist/{spa-router-DzPZH-AO.d.mts → spa-router-Bq7VCOwx.d.mts} +3 -3
- package/dist/{spa-router-B1HI3X9k.d.ts → spa-router-DaJk5Re4.d.ts} +3 -3
- package/dist/testing.cjs +22 -20
- package/dist/testing.d.mts +4 -5
- package/dist/testing.d.ts +4 -5
- package/dist/testing.mjs +18 -16
- package/dist/theme/server.cjs +4 -3
- package/dist/theme/server.mjs +3 -2
- package/dist/{types-Z0aotQ8w.d.mts → types-CnH8DOqo.d.mts} +1 -1
- package/dist/{types-Z0aotQ8w.d.ts → types-CnH8DOqo.d.ts} +1 -1
- package/dist/{utils-DMD1Hzta.d.ts → utils-BXLmFsVR.d.ts} +1 -1
- package/dist/{utils-CEBktlBG.d.mts → utils-XJn0c9bj.d.mts} +1 -1
- package/dist/version.cjs +2 -2
- package/dist/version.mjs +1 -1
- package/dist/vite.cjs +39 -36
- package/dist/vite.d.mts +4 -5
- package/dist/vite.d.ts +4 -5
- package/dist/vite.mjs +38 -35
- package/dist/{workflows-CR9ex-gz.d.ts → workflows-jZ4BcdoZ.d.mts} +1 -1
- package/dist/{workflows-CR9ex-gz.d.mts → workflows-jZ4BcdoZ.d.ts} +1 -1
- package/dist/workflows.cjs +3 -3
- package/dist/workflows.d.mts +1 -1
- package/dist/workflows.d.ts +1 -1
- package/dist/workflows.mjs +2 -2
- package/package.json +10 -2
- package/dist/chunk-22GUSVNJ.cjs +0 -351
- package/dist/chunk-5MKEDGLD.cjs +0 -53
- package/dist/chunk-O6XNAMBV.mjs +0 -53
- package/dist/chunk-SWN467MP.cjs +0 -18
- package/dist/chunk-XGC343EY.cjs +0 -443
- package/dist/chunk-ZSH2Y4LN.mjs +0 -351
- package/dist/types-DFbjpjXX.d.mts +0 -105
- package/dist/types-DFbjpjXX.d.ts +0 -105
- /package/dist/{chunk-SUIBNSNO.cjs → chunk-SJNMVDDF.cjs} +0 -0
- /package/dist/{chunk-LNZ7JZUS.mjs → chunk-UDNPLXW7.mjs} +0 -0
|
@@ -1,12 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
parseRequestCookieHeader
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-JM5XPKWH.mjs";
|
|
4
4
|
import {
|
|
5
5
|
createWebRequestFromFarmRequest
|
|
6
|
-
} from "./chunk-
|
|
7
|
-
import {
|
|
8
|
-
canonicalizeRequestPathname
|
|
9
|
-
} from "./chunk-CQ6OSQ3K.mjs";
|
|
6
|
+
} from "./chunk-FDR64H6B.mjs";
|
|
10
7
|
import {
|
|
11
8
|
__name
|
|
12
9
|
} from "./chunk-LPEX4YW6.mjs";
|
|
@@ -93,7 +90,7 @@ function serializeMiddlewareCookie(name, value, options = {}) {
|
|
|
93
90
|
if (resolved.expires) cookie += `; Expires=${resolved.expires.toUTCString()}`;
|
|
94
91
|
cookie += `; Path=${resolved.path || "/"}`;
|
|
95
92
|
if (resolved.domain) cookie += `; Domain=${resolved.domain}`;
|
|
96
|
-
if (resolved.secure) cookie += "; Secure";
|
|
93
|
+
if (resolved.secure || resolved.sameSite === "none") cookie += "; Secure";
|
|
97
94
|
if (resolved.httpOnly) cookie += "; HttpOnly";
|
|
98
95
|
if (resolved.sameSite) {
|
|
99
96
|
cookie += `; SameSite=${resolved.sameSite.charAt(0).toUpperCase()}${resolved.sameSite.slice(1)}`;
|
|
@@ -225,205 +222,6 @@ function normalizeMiddlewareModule(middlewareModule, routePath) {
|
|
|
225
222
|
}
|
|
226
223
|
__name(normalizeMiddlewareModule, "normalizeMiddlewareModule");
|
|
227
224
|
|
|
228
|
-
// src/middleware/matcher.ts
|
|
229
|
-
var compiledConfigCache = /* @__PURE__ */ new WeakMap();
|
|
230
|
-
var compiledRouteCache = /* @__PURE__ */ new WeakMap();
|
|
231
|
-
function compileMiddlewareRoute(entry) {
|
|
232
|
-
const path = entry.path;
|
|
233
|
-
if (path === "/") return void 0;
|
|
234
|
-
const cached = compiledRouteCache.get(entry);
|
|
235
|
-
if (cached?.path === path) return cached;
|
|
236
|
-
const compiled = {
|
|
237
|
-
path,
|
|
238
|
-
exact: compilePattern(path),
|
|
239
|
-
nested: compilePattern(`${path}/:__farmRest*`)
|
|
240
|
-
};
|
|
241
|
-
compiledRouteCache.set(entry, compiled);
|
|
242
|
-
return compiled;
|
|
243
|
-
}
|
|
244
|
-
__name(compileMiddlewareRoute, "compileMiddlewareRoute");
|
|
245
|
-
function matchesMiddlewareRoute(pathname, entry) {
|
|
246
|
-
const compiled = compileMiddlewareRoute(entry);
|
|
247
|
-
if (!compiled) return { matched: true };
|
|
248
|
-
const canonicalPathname = canonicalizeRequestPathname(pathname);
|
|
249
|
-
const exactMatch = matchPattern(compiled.exact, canonicalPathname);
|
|
250
|
-
if (exactMatch.matched) return exactMatch;
|
|
251
|
-
const nestedMatch = matchPattern(compiled.nested, canonicalPathname);
|
|
252
|
-
if (!nestedMatch.matched) return { matched: false };
|
|
253
|
-
const params = { ...nestedMatch.params };
|
|
254
|
-
delete params.__farmRest;
|
|
255
|
-
return { matched: true, params: Object.keys(params).length > 0 ? params : void 0 };
|
|
256
|
-
}
|
|
257
|
-
__name(matchesMiddlewareRoute, "matchesMiddlewareRoute");
|
|
258
|
-
function sameEntries(current, previous) {
|
|
259
|
-
return current === void 0 || previous === void 0 ? current === previous : current.length === previous.length && current.every((entry, index) => entry === previous[index]);
|
|
260
|
-
}
|
|
261
|
-
__name(sameEntries, "sameEntries");
|
|
262
|
-
function toMatcherList(matcher) {
|
|
263
|
-
if (!matcher) return [];
|
|
264
|
-
return Array.isArray(matcher) ? matcher : [matcher];
|
|
265
|
-
}
|
|
266
|
-
__name(toMatcherList, "toMatcherList");
|
|
267
|
-
function escapeRegex(value) {
|
|
268
|
-
return value.replace(/[|\\{}()[\]^$+?.]/g, "\\$&");
|
|
269
|
-
}
|
|
270
|
-
__name(escapeRegex, "escapeRegex");
|
|
271
|
-
function parseColonParam(segment) {
|
|
272
|
-
const raw = segment.slice(1);
|
|
273
|
-
const last = raw[raw.length - 1];
|
|
274
|
-
const modifier = last === "*" || last === "+" || last === "?" ? last : void 0;
|
|
275
|
-
return {
|
|
276
|
-
name: modifier ? raw.slice(0, -1) : raw,
|
|
277
|
-
modifier
|
|
278
|
-
};
|
|
279
|
-
}
|
|
280
|
-
__name(parseColonParam, "parseColonParam");
|
|
281
|
-
function compilePathPattern(pattern, trailingSlash = false) {
|
|
282
|
-
const params = [];
|
|
283
|
-
const segments = pattern.split("/").filter(Boolean);
|
|
284
|
-
if (segments.length === 0) {
|
|
285
|
-
return { kind: "path", regex: /^\/$/, params };
|
|
286
|
-
}
|
|
287
|
-
const parts = segments.map((segment) => {
|
|
288
|
-
if (segment === "**") {
|
|
289
|
-
return "(?:/.*)?";
|
|
290
|
-
}
|
|
291
|
-
if (segment === "*") {
|
|
292
|
-
return "/[^/]+";
|
|
293
|
-
}
|
|
294
|
-
if (segment.startsWith(":")) {
|
|
295
|
-
const { name, modifier } = parseColonParam(segment);
|
|
296
|
-
params.push(name);
|
|
297
|
-
if (modifier === "*") {
|
|
298
|
-
return "(?:/(.*))?";
|
|
299
|
-
}
|
|
300
|
-
if (modifier === "+") {
|
|
301
|
-
return "/(.+)";
|
|
302
|
-
}
|
|
303
|
-
return "/([^/]+)";
|
|
304
|
-
}
|
|
305
|
-
if (segment.startsWith("[...") && segment.endsWith("]")) {
|
|
306
|
-
params.push(segment.slice(4, -1));
|
|
307
|
-
return "(?:/(.*))?";
|
|
308
|
-
}
|
|
309
|
-
if (segment.startsWith("[") && segment.endsWith("]")) {
|
|
310
|
-
params.push(segment.slice(1, -1));
|
|
311
|
-
return "/([^/]+)";
|
|
312
|
-
}
|
|
313
|
-
return `/${escapeRegex(segment).replace(/\\\*/g, "[^/]*")}`;
|
|
314
|
-
});
|
|
315
|
-
return {
|
|
316
|
-
kind: "path",
|
|
317
|
-
regex: new RegExp(`^${parts.join("")}${trailingSlash ? "/?" : ""}$`),
|
|
318
|
-
params
|
|
319
|
-
};
|
|
320
|
-
}
|
|
321
|
-
__name(compilePathPattern, "compilePathPattern");
|
|
322
|
-
function compileMatcherPattern(pattern) {
|
|
323
|
-
if (typeof pattern === "string" && pattern !== "*" && !pattern.endsWith("(.*)")) {
|
|
324
|
-
return compilePathPattern(pattern, true);
|
|
325
|
-
}
|
|
326
|
-
return compilePattern(pattern);
|
|
327
|
-
}
|
|
328
|
-
__name(compileMatcherPattern, "compileMatcherPattern");
|
|
329
|
-
function compilePattern(pattern) {
|
|
330
|
-
if (pattern instanceof RegExp) {
|
|
331
|
-
return { kind: "regexp", regex: pattern };
|
|
332
|
-
}
|
|
333
|
-
if (pattern === "*" || pattern === "/(.*)") {
|
|
334
|
-
return { kind: "all" };
|
|
335
|
-
}
|
|
336
|
-
if (pattern.endsWith("(.*)")) {
|
|
337
|
-
return {
|
|
338
|
-
kind: "subtree",
|
|
339
|
-
prefix: pattern.slice(0, -4).replace(/\/$/, "")
|
|
340
|
-
};
|
|
341
|
-
}
|
|
342
|
-
return compilePathPattern(pattern);
|
|
343
|
-
}
|
|
344
|
-
__name(compilePattern, "compilePattern");
|
|
345
|
-
function compileMiddlewareConfig(config) {
|
|
346
|
-
const compiled = {
|
|
347
|
-
matcher: config.matcher ? toMatcherList(config.matcher).map(
|
|
348
|
-
(matcher) => typeof matcher === "function" ? matcher : compileMatcherPattern(matcher)
|
|
349
|
-
) : void 0,
|
|
350
|
-
exclude: config.exclude?.map(compilePattern)
|
|
351
|
-
};
|
|
352
|
-
compiledConfigCache.set(config, {
|
|
353
|
-
compiled,
|
|
354
|
-
matcher: config.matcher,
|
|
355
|
-
matcherEntries: Array.isArray(config.matcher) ? config.matcher.slice() : void 0,
|
|
356
|
-
excludeEntries: config.exclude?.slice()
|
|
357
|
-
});
|
|
358
|
-
return compiled;
|
|
359
|
-
}
|
|
360
|
-
__name(compileMiddlewareConfig, "compileMiddlewareConfig");
|
|
361
|
-
function matchPattern(pattern, pathname) {
|
|
362
|
-
if (pattern.kind === "all") {
|
|
363
|
-
return { matched: true };
|
|
364
|
-
}
|
|
365
|
-
if (pattern.kind === "subtree") {
|
|
366
|
-
return {
|
|
367
|
-
matched: pathname === pattern.prefix || pathname.startsWith(`${pattern.prefix}/`)
|
|
368
|
-
};
|
|
369
|
-
}
|
|
370
|
-
pattern.regex.lastIndex = 0;
|
|
371
|
-
const match = pattern.regex.exec(pathname);
|
|
372
|
-
if (!match) {
|
|
373
|
-
return { matched: false };
|
|
374
|
-
}
|
|
375
|
-
if (pattern.kind === "regexp") {
|
|
376
|
-
return {
|
|
377
|
-
matched: true,
|
|
378
|
-
params: match.groups ? { ...match.groups } : void 0
|
|
379
|
-
};
|
|
380
|
-
}
|
|
381
|
-
const values = {};
|
|
382
|
-
pattern.params.forEach((param, index) => {
|
|
383
|
-
values[param] = match[index + 1] || "";
|
|
384
|
-
});
|
|
385
|
-
return {
|
|
386
|
-
matched: true,
|
|
387
|
-
params: Object.keys(values).length > 0 ? values : void 0
|
|
388
|
-
};
|
|
389
|
-
}
|
|
390
|
-
__name(matchPattern, "matchPattern");
|
|
391
|
-
function matchesCompiledMiddlewareConfig(pathname, config, ctx) {
|
|
392
|
-
let canonicalPathname;
|
|
393
|
-
const getCanonicalPathname = /* @__PURE__ */ __name(() => canonicalPathname ?? (canonicalPathname = canonicalizeRequestPathname(pathname)), "getCanonicalPathname");
|
|
394
|
-
if (config.exclude) {
|
|
395
|
-
for (const pattern of config.exclude) {
|
|
396
|
-
if (matchPattern(pattern, getCanonicalPathname()).matched) {
|
|
397
|
-
return { matched: false };
|
|
398
|
-
}
|
|
399
|
-
}
|
|
400
|
-
}
|
|
401
|
-
if (config.matcher) {
|
|
402
|
-
for (const matcher of config.matcher) {
|
|
403
|
-
if (typeof matcher === "function") {
|
|
404
|
-
if (matcher(ctx)) {
|
|
405
|
-
return { matched: true };
|
|
406
|
-
}
|
|
407
|
-
continue;
|
|
408
|
-
}
|
|
409
|
-
const result = matchPattern(matcher, getCanonicalPathname());
|
|
410
|
-
if (result.matched) {
|
|
411
|
-
return result;
|
|
412
|
-
}
|
|
413
|
-
}
|
|
414
|
-
return { matched: false };
|
|
415
|
-
}
|
|
416
|
-
return { matched: true };
|
|
417
|
-
}
|
|
418
|
-
__name(matchesCompiledMiddlewareConfig, "matchesCompiledMiddlewareConfig");
|
|
419
|
-
function matchesMiddlewareConfig(pathname, config, ctx) {
|
|
420
|
-
const cached = compiledConfigCache.get(config);
|
|
421
|
-
const unchanged = cached && (Array.isArray(config.matcher) ? sameEntries(config.matcher, cached.matcherEntries) : config.matcher === cached.matcher) && sameEntries(config.exclude, cached.excludeEntries);
|
|
422
|
-
const compiled = unchanged ? cached.compiled : compileMiddlewareConfig(config);
|
|
423
|
-
return matchesCompiledMiddlewareConfig(pathname, compiled, ctx);
|
|
424
|
-
}
|
|
425
|
-
__name(matchesMiddlewareConfig, "matchesMiddlewareConfig");
|
|
426
|
-
|
|
427
225
|
export {
|
|
428
226
|
_clearCurrentMiddlewareData,
|
|
429
227
|
_clearCurrentMiddlewareContext,
|
|
@@ -435,9 +233,5 @@ export {
|
|
|
435
233
|
parseMiddlewareCookieHeader,
|
|
436
234
|
serializeMiddlewareCookie,
|
|
437
235
|
serializeMiddlewareCookieDeletion,
|
|
438
|
-
normalizeMiddlewareModule
|
|
439
|
-
compileMiddlewareRoute,
|
|
440
|
-
matchesMiddlewareRoute,
|
|
441
|
-
compileMiddlewareConfig,
|
|
442
|
-
matchesMiddlewareConfig
|
|
236
|
+
normalizeMiddlewareModule
|
|
443
237
|
};
|
|
@@ -26,13 +26,16 @@ var _chunkVPTDD5XFcjs = require('./chunk-VPTDD5XF.cjs');
|
|
|
26
26
|
var _chunkPSV6XKPOcjs = require('./chunk-PSV6XKPO.cjs');
|
|
27
27
|
|
|
28
28
|
|
|
29
|
-
var
|
|
29
|
+
var _chunkM7MKQXAFcjs = require('./chunk-M7MKQXAF.cjs');
|
|
30
30
|
|
|
31
31
|
|
|
32
|
-
var
|
|
32
|
+
var _chunkSJNMVDDFcjs = require('./chunk-SJNMVDDF.cjs');
|
|
33
33
|
|
|
34
34
|
|
|
35
|
-
var
|
|
35
|
+
var _chunkUFDAAQFXcjs = require('./chunk-UFDAAQFX.cjs');
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
var _chunkIWZKTWHZcjs = require('./chunk-IWZKTWHZ.cjs');
|
|
36
39
|
|
|
37
40
|
|
|
38
41
|
var _chunk5QIKR7RRcjs = require('./chunk-5QIKR7RR.cjs');
|
|
@@ -645,78 +648,6 @@ _chunkS3JO3N4Hcjs.__name.call(void 0, matchSSGPage, "matchSSGPage");
|
|
|
645
648
|
// src/routing/generate-route-types.ts
|
|
646
649
|
var _path = require('path'); var path = _interopRequireWildcard(_path); var path3 = _interopRequireWildcard(_path);
|
|
647
650
|
var _fs = require('fs'); var fs = _interopRequireWildcard(_fs); var fs2 = _interopRequireWildcard(_fs);
|
|
648
|
-
|
|
649
|
-
// src/routing/route-slots.ts
|
|
650
|
-
var SLOT_SEGMENT = /^@([A-Za-z][A-Za-z0-9_-]*)$/;
|
|
651
|
-
function parseRouteSlotFile(filePath) {
|
|
652
|
-
const normalized = filePath.replace(/\\/g, "/");
|
|
653
|
-
const parts = normalized.split("/").filter(Boolean);
|
|
654
|
-
const fileName = _nullishCoalesce(parts.at(-1), () => ( ""));
|
|
655
|
-
const baseName = fileName.replace(/\.(tsx?|jsx?|vue|svelte)$/, "");
|
|
656
|
-
if (baseName !== "page" && baseName !== "default") return null;
|
|
657
|
-
const slotIndex = parts.findIndex((part) => SLOT_SEGMENT.test(part));
|
|
658
|
-
if (slotIndex < 0) return null;
|
|
659
|
-
if (parts.slice(slotIndex + 1, -1).some((part) => SLOT_SEGMENT.test(part))) {
|
|
660
|
-
throw new Error(`Nested route slots are not supported in "${filePath}"`);
|
|
661
|
-
}
|
|
662
|
-
const slotMatch = parts[slotIndex].match(SLOT_SEGMENT);
|
|
663
|
-
const name = _optionalChain([slotMatch, 'optionalAccess', _44 => _44[1]]);
|
|
664
|
-
if (!name) return null;
|
|
665
|
-
const ownerParts = parts.slice(0, slotIndex);
|
|
666
|
-
const contentParts = parts.slice(slotIndex + 1, -1);
|
|
667
|
-
const marker = parseInterceptionMarker(contentParts[0]);
|
|
668
|
-
let targetBase = ownerParts;
|
|
669
|
-
let targetParts = contentParts;
|
|
670
|
-
if (marker) {
|
|
671
|
-
targetBase = marker.root === true ? [] : ownerParts.slice(0, Math.max(0, ownerParts.length - marker.up));
|
|
672
|
-
targetParts = [...marker.remainder ? [marker.remainder] : [], ...contentParts.slice(1)];
|
|
673
|
-
}
|
|
674
|
-
const ownerFile = [...ownerParts, "layout.tsx"].join("/");
|
|
675
|
-
const routeFile = [
|
|
676
|
-
...baseName === "default" ? ownerParts : targetBase,
|
|
677
|
-
...baseName === "default" ? [] : targetParts,
|
|
678
|
-
"page.tsx"
|
|
679
|
-
].join("/");
|
|
680
|
-
return {
|
|
681
|
-
name,
|
|
682
|
-
ownerRoute: _chunk5QIKR7RRcjs.parseRoutePath.call(void 0, ownerFile || "layout.tsx"),
|
|
683
|
-
route: _chunk5QIKR7RRcjs.parseRoutePath.call(void 0, routeFile || "page.tsx"),
|
|
684
|
-
interception: marker !== null,
|
|
685
|
-
fallback: baseName === "default"
|
|
686
|
-
};
|
|
687
|
-
}
|
|
688
|
-
_chunkS3JO3N4Hcjs.__name.call(void 0, parseRouteSlotFile, "parseRouteSlotFile");
|
|
689
|
-
function createRouteSlotContainerId(name, ownerPattern) {
|
|
690
|
-
const owner = ownerPattern === "/" ? "root" : ownerPattern.replace(/^\//, "").replace(/[^A-Za-z0-9_-]+/g, "-").replace(/^-+|-+$/g, "");
|
|
691
|
-
return `__farm_slot_${name}_${owner || "root"}__`;
|
|
692
|
-
}
|
|
693
|
-
_chunkS3JO3N4Hcjs.__name.call(void 0, createRouteSlotContainerId, "createRouteSlotContainerId");
|
|
694
|
-
function parseInterceptionMarker(segment) {
|
|
695
|
-
if (!segment) return null;
|
|
696
|
-
if (segment.startsWith("(...)")) {
|
|
697
|
-
return {
|
|
698
|
-
up: 0,
|
|
699
|
-
root: true,
|
|
700
|
-
remainder: segment.slice(5)
|
|
701
|
-
};
|
|
702
|
-
}
|
|
703
|
-
if (segment.startsWith("(.)")) {
|
|
704
|
-
return {
|
|
705
|
-
up: 0,
|
|
706
|
-
remainder: segment.slice(3)
|
|
707
|
-
};
|
|
708
|
-
}
|
|
709
|
-
let remainder = segment;
|
|
710
|
-
let up = 0;
|
|
711
|
-
while (remainder.startsWith("(..)")) {
|
|
712
|
-
up += 1;
|
|
713
|
-
remainder = remainder.slice(4);
|
|
714
|
-
}
|
|
715
|
-
return up > 0 ? { up, remainder } : null;
|
|
716
|
-
}
|
|
717
|
-
_chunkS3JO3N4Hcjs.__name.call(void 0, parseInterceptionMarker, "parseInterceptionMarker");
|
|
718
|
-
|
|
719
|
-
// src/routing/generate-route-types.ts
|
|
720
651
|
function routeSegmentsToTsTypeLiteral(segments) {
|
|
721
652
|
if (segments.length === 0) return '"/"';
|
|
722
653
|
const hasDynamic = segments.some((s) => s.startsWith("["));
|
|
@@ -796,7 +727,7 @@ async function createRouteTypeDeclarations(options, outPath) {
|
|
|
796
727
|
}
|
|
797
728
|
);
|
|
798
729
|
for (const file of routeModuleFiles) {
|
|
799
|
-
if (parseRouteSlotFile(file)) continue;
|
|
730
|
+
if (_chunkM7MKQXAFcjs.parseRouteSlotFile.call(void 0, file)) continue;
|
|
800
731
|
const route = _chunk5QIKR7RRcjs.parseRoutePath.call(void 0, file);
|
|
801
732
|
const pattern = createRoutePattern(route);
|
|
802
733
|
routeModulePatterns.add(pattern);
|
|
@@ -805,7 +736,7 @@ async function createRouteTypeDeclarations(options, outPath) {
|
|
|
805
736
|
}
|
|
806
737
|
}
|
|
807
738
|
}
|
|
808
|
-
for (const route of await
|
|
739
|
+
for (const route of await _chunkSJNMVDDFcjs.discoverProgrammaticRoutePaths.call(void 0, source.root, source.srcDir)) {
|
|
809
740
|
patterns.add(route);
|
|
810
741
|
routeModulePatterns.add(route);
|
|
811
742
|
}
|
|
@@ -910,7 +841,7 @@ _chunkS3JO3N4Hcjs.__name.call(void 0, createFarmImageTypeDeclarations, "createFa
|
|
|
910
841
|
|
|
911
842
|
async function generateFarmI18nTypes(options) {
|
|
912
843
|
if (!options.config.enabled) return void 0;
|
|
913
|
-
const { signatures } = await
|
|
844
|
+
const { signatures } = await _chunkUFDAAQFXcjs.readFarmI18nCatalogs.call(void 0, options.config);
|
|
914
845
|
const outFile = options.outFile ? _path.resolve.call(void 0, options.root, options.outFile) : _path.join.call(void 0, _path.resolve.call(void 0, options.root), options.srcDir || "src", "farm-i18n.d.ts");
|
|
915
846
|
const content = renderFarmI18nTypes(options.config.locales, signatures);
|
|
916
847
|
_fs.mkdirSync.call(void 0, _path.dirname.call(void 0, outFile), { recursive: true });
|
|
@@ -1130,7 +1061,7 @@ function fieldTsType(field) {
|
|
|
1130
1061
|
case "json":
|
|
1131
1062
|
return "unknown";
|
|
1132
1063
|
case "enum":
|
|
1133
|
-
return _optionalChain([field, 'access',
|
|
1064
|
+
return _optionalChain([field, 'access', _44 => _44.values, 'optionalAccess', _45 => _45.length]) ? field.values.map((value) => JSON.stringify(value)).join(" | ") : "string";
|
|
1134
1065
|
// id, uuid, string, text, datetime all travel as strings over JSON.
|
|
1135
1066
|
default:
|
|
1136
1067
|
return "string";
|
|
@@ -1157,7 +1088,7 @@ async function generateFarmTypeArtifacts(options) {
|
|
|
1157
1088
|
const shouldGenerateApi = options.api !== false;
|
|
1158
1089
|
const shouldGenerateEnv = options.env !== false;
|
|
1159
1090
|
const shouldGenerateImages = options.images !== false;
|
|
1160
|
-
const shouldGenerateI18n = options.i18n !== false && _optionalChain([options, 'access',
|
|
1091
|
+
const shouldGenerateI18n = options.i18n !== false && _optionalChain([options, 'access', _46 => _46.i18nConfig, 'optionalAccess', _47 => _47.enabled]);
|
|
1161
1092
|
const sourceRoots = _chunkVPTDD5XFcjs.getFarmSourceRoots.call(void 0, { root, srcDir, layers: options.layers });
|
|
1162
1093
|
const appDirs = _chunkVPTDD5XFcjs.getFarmAppDirectories.call(void 0, { root, srcDir, layers: options.layers });
|
|
1163
1094
|
const result = {
|
|
@@ -1201,7 +1132,7 @@ async function generateFarmTypeArtifacts(options) {
|
|
|
1201
1132
|
const generator = new (0, _chunkXSIRSMAScjs.APITypeGenerator)(appDirs);
|
|
1202
1133
|
const apiRoutes = generator.scanAPIRoutes();
|
|
1203
1134
|
const apiTypesPath = options.apiTypesOutFile ? _path.resolve.call(void 0, root, options.apiTypesOutFile) : _path.join.call(void 0, root, srcDir, "lib", "api.generated.ts");
|
|
1204
|
-
const pluginRoutes =
|
|
1135
|
+
const pluginRoutes = _chunkIWZKTWHZcjs.resolvePluginRoutes.call(void 0, options.plugins);
|
|
1205
1136
|
const configFiles = [
|
|
1206
1137
|
...(_nullishCoalesce(options.layers, () => ( []))).map((layer) => layer.configFile).filter((file) => Boolean(file)),
|
|
1207
1138
|
options.configPath ? _path.resolve.call(void 0, root, options.configPath) : [
|
|
@@ -1277,14 +1208,14 @@ async function generateFarmTypeArtifacts(options) {
|
|
|
1277
1208
|
});
|
|
1278
1209
|
}
|
|
1279
1210
|
}
|
|
1280
|
-
if (shouldRefreshUnifiedTypes && _optionalChain([options, 'access',
|
|
1281
|
-
const { signatures } = await
|
|
1211
|
+
if (shouldRefreshUnifiedTypes && _optionalChain([options, 'access', _48 => _48.i18nConfig, 'optionalAccess', _49 => _49.enabled]) && !options.i18nTypesOutFile) {
|
|
1212
|
+
const { signatures } = await _chunkUFDAAQFXcjs.readFarmI18nCatalogs.call(void 0, options.i18nConfig);
|
|
1282
1213
|
unifiedSections.push(renderFarmI18nTypes(options.i18nConfig.locales, signatures));
|
|
1283
1214
|
result.i18nTypesPath = unifiedTypesPath;
|
|
1284
1215
|
} else if (shouldGenerateI18n && options.i18nConfig) {
|
|
1285
1216
|
if (options.check) {
|
|
1286
1217
|
const i18nTypesPath = resolveGeneratedPath(root, srcDir, options.i18nTypesOutFile, false);
|
|
1287
|
-
const { signatures } = await
|
|
1218
|
+
const { signatures } = await _chunkUFDAAQFXcjs.readFarmI18nCatalogs.call(void 0, options.i18nConfig);
|
|
1288
1219
|
checkGeneratedFile(
|
|
1289
1220
|
i18nTypesPath,
|
|
1290
1221
|
renderFarmI18nTypes(options.i18nConfig.locales, signatures),
|
|
@@ -1410,6 +1341,4 @@ _chunkS3JO3N4Hcjs.__name.call(void 0, collectLegacyTypeArtifacts, "collectLegacy
|
|
|
1410
1341
|
|
|
1411
1342
|
|
|
1412
1343
|
|
|
1413
|
-
|
|
1414
|
-
|
|
1415
|
-
exports.resolveRouteRenderingConfig = resolveRouteRenderingConfig; exports.resolveRouteRenderingConfigFromFile = resolveRouteRenderingConfigFromFile; exports.analyzeStaticRouteCandidate = analyzeStaticRouteCandidate; exports.findRequestBoundSourceBlockers = findRequestBoundSourceBlockers; exports.parseRouteRenderingDirective = parseRouteRenderingDirective; exports.collectSSGPages = collectSSGPages; exports.isSSGModule = isSSGModule; exports.hasISR = hasISR; exports.getRevalidateInterval = getRevalidateInterval; exports.hasPPR = hasPPR; exports.generateSSGManifest = generateSSGManifest; exports.matchSSGPage = matchSSGPage; exports.parseRouteSlotFile = parseRouteSlotFile; exports.createRouteSlotContainerId = createRouteSlotContainerId; exports.generateRouteTypes = generateRouteTypes; exports.generateFarmImageTypes = generateFarmImageTypes; exports.createFarmImageTypeDeclarations = createFarmImageTypeDeclarations; exports.generateFarmI18nTypes = generateFarmI18nTypes; exports.generateFarmTypeArtifacts = generateFarmTypeArtifacts;
|
|
1344
|
+
exports.resolveRouteRenderingConfig = resolveRouteRenderingConfig; exports.resolveRouteRenderingConfigFromFile = resolveRouteRenderingConfigFromFile; exports.analyzeStaticRouteCandidate = analyzeStaticRouteCandidate; exports.findRequestBoundSourceBlockers = findRequestBoundSourceBlockers; exports.parseRouteRenderingDirective = parseRouteRenderingDirective; exports.collectSSGPages = collectSSGPages; exports.isSSGModule = isSSGModule; exports.hasISR = hasISR; exports.getRevalidateInterval = getRevalidateInterval; exports.hasPPR = hasPPR; exports.generateSSGManifest = generateSSGManifest; exports.matchSSGPage = matchSSGPage; exports.generateRouteTypes = generateRouteTypes; exports.generateFarmImageTypes = generateFarmImageTypes; exports.createFarmImageTypeDeclarations = createFarmImageTypeDeclarations; exports.generateFarmI18nTypes = generateFarmI18nTypes; exports.generateFarmTypeArtifacts = generateFarmTypeArtifacts;
|
|
@@ -0,0 +1,237 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
|
|
2
|
+
|
|
3
|
+
var _chunkAI7QMY7Ocjs = require('./chunk-AI7QMY7O.cjs');
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
var _chunkUXFQ3UDAcjs = require('./chunk-UXFQ3UDA.cjs');
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
var _chunkS3JO3N4Hcjs = require('./chunk-S3JO3N4H.cjs');
|
|
10
|
+
|
|
11
|
+
// src/middleware/server.ts
|
|
12
|
+
var _async_hooks = require('async_hooks');
|
|
13
|
+
var MIDDLEWARE_DATA_STORE_KEY = /* @__PURE__ */ Symbol.for("farm.middlewareDataStore");
|
|
14
|
+
var MIDDLEWARE_CONTEXT_STORE_KEY = /* @__PURE__ */ Symbol.for("farm.middlewareContextStore");
|
|
15
|
+
function getGlobalMiddlewareStore(key) {
|
|
16
|
+
const state = globalThis;
|
|
17
|
+
const existing = state[key];
|
|
18
|
+
if (existing instanceof _async_hooks.AsyncLocalStorage) {
|
|
19
|
+
return existing;
|
|
20
|
+
}
|
|
21
|
+
const store = new (0, _async_hooks.AsyncLocalStorage)();
|
|
22
|
+
state[key] = store;
|
|
23
|
+
return store;
|
|
24
|
+
}
|
|
25
|
+
_chunkS3JO3N4Hcjs.__name.call(void 0, getGlobalMiddlewareStore, "getGlobalMiddlewareStore");
|
|
26
|
+
var middlewareStore = getGlobalMiddlewareStore(MIDDLEWARE_DATA_STORE_KEY);
|
|
27
|
+
var middlewareContextStore = getGlobalMiddlewareStore(MIDDLEWARE_CONTEXT_STORE_KEY);
|
|
28
|
+
function toMiddlewareMap(data) {
|
|
29
|
+
if (data instanceof Map) {
|
|
30
|
+
return new Map(data);
|
|
31
|
+
}
|
|
32
|
+
return new Map(Object.entries(data));
|
|
33
|
+
}
|
|
34
|
+
_chunkS3JO3N4Hcjs.__name.call(void 0, toMiddlewareMap, "toMiddlewareMap");
|
|
35
|
+
function _clearCurrentMiddlewareData() {
|
|
36
|
+
middlewareStore.enterWith(/* @__PURE__ */ new Map());
|
|
37
|
+
}
|
|
38
|
+
_chunkS3JO3N4Hcjs.__name.call(void 0, _clearCurrentMiddlewareData, "_clearCurrentMiddlewareData");
|
|
39
|
+
function _clearCurrentMiddlewareContext() {
|
|
40
|
+
middlewareContextStore.enterWith(/* @__PURE__ */ new Map());
|
|
41
|
+
}
|
|
42
|
+
_chunkS3JO3N4Hcjs.__name.call(void 0, _clearCurrentMiddlewareContext, "_clearCurrentMiddlewareContext");
|
|
43
|
+
async function _runWithMiddlewareData(data, fn) {
|
|
44
|
+
return middlewareStore.run(toMiddlewareMap(data), fn);
|
|
45
|
+
}
|
|
46
|
+
_chunkS3JO3N4Hcjs.__name.call(void 0, _runWithMiddlewareData, "_runWithMiddlewareData");
|
|
47
|
+
async function _runWithMiddlewareContext(context, fn) {
|
|
48
|
+
return middlewareContextStore.run(toMiddlewareMap(context), fn);
|
|
49
|
+
}
|
|
50
|
+
_chunkS3JO3N4Hcjs.__name.call(void 0, _runWithMiddlewareContext, "_runWithMiddlewareContext");
|
|
51
|
+
function getMiddlewareData() {
|
|
52
|
+
return middlewareStore.getStore() || /* @__PURE__ */ new Map();
|
|
53
|
+
}
|
|
54
|
+
_chunkS3JO3N4Hcjs.__name.call(void 0, getMiddlewareData, "getMiddlewareData");
|
|
55
|
+
function getMiddlewareValue(key) {
|
|
56
|
+
const data = getMiddlewareData();
|
|
57
|
+
return data.get(key);
|
|
58
|
+
}
|
|
59
|
+
_chunkS3JO3N4Hcjs.__name.call(void 0, getMiddlewareValue, "getMiddlewareValue");
|
|
60
|
+
function getMiddlewareContext() {
|
|
61
|
+
return middlewareContextStore.getStore() || /* @__PURE__ */ new Map();
|
|
62
|
+
}
|
|
63
|
+
_chunkS3JO3N4Hcjs.__name.call(void 0, getMiddlewareContext, "getMiddlewareContext");
|
|
64
|
+
|
|
65
|
+
// src/middleware/cookie-header.ts
|
|
66
|
+
function parseMiddlewareCookieHeader(cookieHeader) {
|
|
67
|
+
const cookies = /* @__PURE__ */ Object.create(null);
|
|
68
|
+
for (const cookie of _chunkAI7QMY7Ocjs.parseRequestCookieHeader.call(void 0, cookieHeader)) {
|
|
69
|
+
if (!Object.prototype.hasOwnProperty.call(cookies, cookie.name)) {
|
|
70
|
+
cookies[cookie.name] = cookie.value;
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
return cookies;
|
|
74
|
+
}
|
|
75
|
+
_chunkS3JO3N4Hcjs.__name.call(void 0, parseMiddlewareCookieHeader, "parseMiddlewareCookieHeader");
|
|
76
|
+
function applyCookieNamePrefixRequirements(name, options) {
|
|
77
|
+
if (name.startsWith("__Host-")) {
|
|
78
|
+
return { ...options, secure: true, path: "/", domain: void 0 };
|
|
79
|
+
}
|
|
80
|
+
if (name.startsWith("__Secure-")) {
|
|
81
|
+
return { ...options, secure: true };
|
|
82
|
+
}
|
|
83
|
+
return options;
|
|
84
|
+
}
|
|
85
|
+
_chunkS3JO3N4Hcjs.__name.call(void 0, applyCookieNamePrefixRequirements, "applyCookieNamePrefixRequirements");
|
|
86
|
+
function serializeMiddlewareCookie(name, value, options = {}) {
|
|
87
|
+
const resolved = applyCookieNamePrefixRequirements(name, options);
|
|
88
|
+
let cookie = `${encodeURIComponent(name)}=${encodeURIComponent(value)}`;
|
|
89
|
+
if (resolved.maxAge != null) cookie += `; Max-Age=${resolved.maxAge}`;
|
|
90
|
+
if (resolved.expires) cookie += `; Expires=${resolved.expires.toUTCString()}`;
|
|
91
|
+
cookie += `; Path=${resolved.path || "/"}`;
|
|
92
|
+
if (resolved.domain) cookie += `; Domain=${resolved.domain}`;
|
|
93
|
+
if (resolved.secure || resolved.sameSite === "none") cookie += "; Secure";
|
|
94
|
+
if (resolved.httpOnly) cookie += "; HttpOnly";
|
|
95
|
+
if (resolved.sameSite) {
|
|
96
|
+
cookie += `; SameSite=${resolved.sameSite.charAt(0).toUpperCase()}${resolved.sameSite.slice(1)}`;
|
|
97
|
+
}
|
|
98
|
+
return cookie;
|
|
99
|
+
}
|
|
100
|
+
_chunkS3JO3N4Hcjs.__name.call(void 0, serializeMiddlewareCookie, "serializeMiddlewareCookie");
|
|
101
|
+
function serializeMiddlewareCookieDeletion(name, options = {}) {
|
|
102
|
+
return serializeMiddlewareCookie(name, "", { ...options, maxAge: 0, expires: /* @__PURE__ */ new Date(0) });
|
|
103
|
+
}
|
|
104
|
+
_chunkS3JO3N4Hcjs.__name.call(void 0, serializeMiddlewareCookieDeletion, "serializeMiddlewareCookieDeletion");
|
|
105
|
+
|
|
106
|
+
// src/middleware/module.ts
|
|
107
|
+
function isWebRequest(request) {
|
|
108
|
+
return typeof Request !== "undefined" && request instanceof Request;
|
|
109
|
+
}
|
|
110
|
+
_chunkS3JO3N4Hcjs.__name.call(void 0, isWebRequest, "isWebRequest");
|
|
111
|
+
function toWebRequest(ctx) {
|
|
112
|
+
if (isWebRequest(ctx.request)) {
|
|
113
|
+
return ctx.request;
|
|
114
|
+
}
|
|
115
|
+
return _chunkUXFQ3UDAcjs.createWebRequestFromFarmRequest.call(void 0, ctx.request, { origin: ctx.url.origin });
|
|
116
|
+
}
|
|
117
|
+
_chunkS3JO3N4Hcjs.__name.call(void 0, toWebRequest, "toWebRequest");
|
|
118
|
+
function createRequestMiddlewareContext(ctx) {
|
|
119
|
+
const context = {
|
|
120
|
+
get url() {
|
|
121
|
+
return ctx.url;
|
|
122
|
+
},
|
|
123
|
+
get pathname() {
|
|
124
|
+
return ctx.pathname;
|
|
125
|
+
},
|
|
126
|
+
get searchParams() {
|
|
127
|
+
return ctx.searchParams;
|
|
128
|
+
},
|
|
129
|
+
get method() {
|
|
130
|
+
return ctx.method;
|
|
131
|
+
},
|
|
132
|
+
get params() {
|
|
133
|
+
return ctx.params;
|
|
134
|
+
},
|
|
135
|
+
get route() {
|
|
136
|
+
return ctx.route;
|
|
137
|
+
},
|
|
138
|
+
get locals() {
|
|
139
|
+
return ctx.locals;
|
|
140
|
+
},
|
|
141
|
+
get data() {
|
|
142
|
+
return ctx.data;
|
|
143
|
+
},
|
|
144
|
+
get headers() {
|
|
145
|
+
return ctx.headers;
|
|
146
|
+
},
|
|
147
|
+
get cookies() {
|
|
148
|
+
return ctx.cookies;
|
|
149
|
+
},
|
|
150
|
+
get(key) {
|
|
151
|
+
return ctx.locals.get(key);
|
|
152
|
+
},
|
|
153
|
+
has(key) {
|
|
154
|
+
return ctx.locals.has(key);
|
|
155
|
+
},
|
|
156
|
+
set(key, value) {
|
|
157
|
+
ctx.locals.set(key, value);
|
|
158
|
+
},
|
|
159
|
+
delete(key) {
|
|
160
|
+
return ctx.locals.delete(key);
|
|
161
|
+
},
|
|
162
|
+
redirect(url, status) {
|
|
163
|
+
ctx.redirect(url, status);
|
|
164
|
+
},
|
|
165
|
+
rewrite(url) {
|
|
166
|
+
ctx.rewrite(url);
|
|
167
|
+
},
|
|
168
|
+
json(data, status) {
|
|
169
|
+
ctx.json(data, status);
|
|
170
|
+
},
|
|
171
|
+
text(content, status) {
|
|
172
|
+
ctx.text(content, status);
|
|
173
|
+
},
|
|
174
|
+
html(content, status) {
|
|
175
|
+
ctx.html(content, status);
|
|
176
|
+
}
|
|
177
|
+
};
|
|
178
|
+
return context;
|
|
179
|
+
}
|
|
180
|
+
_chunkS3JO3N4Hcjs.__name.call(void 0, createRequestMiddlewareContext, "createRequestMiddlewareContext");
|
|
181
|
+
function normalizeMiddlewareModule(middlewareModule, routePath) {
|
|
182
|
+
const module = middlewareModule;
|
|
183
|
+
const defaultExport = module.default;
|
|
184
|
+
const namedExport = module.middleware;
|
|
185
|
+
const hasNamedExport = typeof namedExport === "function";
|
|
186
|
+
if (namedExport !== void 0 && !hasNamedExport) {
|
|
187
|
+
throw new TypeError("The named middleware export must be a function");
|
|
188
|
+
}
|
|
189
|
+
if (defaultExport && hasNamedExport) {
|
|
190
|
+
throw new Error(
|
|
191
|
+
"A middleware file cannot export both a default handler and a named middleware handler"
|
|
192
|
+
);
|
|
193
|
+
}
|
|
194
|
+
if (hasNamedExport) {
|
|
195
|
+
return {
|
|
196
|
+
handlers: [
|
|
197
|
+
async (ctx) => {
|
|
198
|
+
return namedExport(toWebRequest(ctx), createRequestMiddlewareContext(ctx));
|
|
199
|
+
}
|
|
200
|
+
],
|
|
201
|
+
config: module.config
|
|
202
|
+
};
|
|
203
|
+
}
|
|
204
|
+
if (defaultExport && typeof defaultExport === "object" && "build" in defaultExport) {
|
|
205
|
+
if (typeof defaultExport.setBasePath === "function") {
|
|
206
|
+
defaultExport.setBasePath(routePath);
|
|
207
|
+
}
|
|
208
|
+
const built = defaultExport.build();
|
|
209
|
+
const handlers = Array.isArray(_optionalChain([built, 'optionalAccess', _ => _.handlers])) ? built.handlers.filter((handler) => typeof handler === "function") : [];
|
|
210
|
+
return handlers.length > 0 ? {
|
|
211
|
+
handlers,
|
|
212
|
+
config: module.config || _optionalChain([built, 'optionalAccess', _2 => _2.config])
|
|
213
|
+
} : null;
|
|
214
|
+
}
|
|
215
|
+
if (typeof defaultExport === "function") {
|
|
216
|
+
return {
|
|
217
|
+
handlers: [defaultExport],
|
|
218
|
+
config: module.config
|
|
219
|
+
};
|
|
220
|
+
}
|
|
221
|
+
return null;
|
|
222
|
+
}
|
|
223
|
+
_chunkS3JO3N4Hcjs.__name.call(void 0, normalizeMiddlewareModule, "normalizeMiddlewareModule");
|
|
224
|
+
|
|
225
|
+
|
|
226
|
+
|
|
227
|
+
|
|
228
|
+
|
|
229
|
+
|
|
230
|
+
|
|
231
|
+
|
|
232
|
+
|
|
233
|
+
|
|
234
|
+
|
|
235
|
+
|
|
236
|
+
|
|
237
|
+
exports._clearCurrentMiddlewareData = _clearCurrentMiddlewareData; exports._clearCurrentMiddlewareContext = _clearCurrentMiddlewareContext; exports._runWithMiddlewareData = _runWithMiddlewareData; exports._runWithMiddlewareContext = _runWithMiddlewareContext; exports.getMiddlewareData = getMiddlewareData; exports.getMiddlewareValue = getMiddlewareValue; exports.getMiddlewareContext = getMiddlewareContext; exports.parseMiddlewareCookieHeader = parseMiddlewareCookieHeader; exports.serializeMiddlewareCookie = serializeMiddlewareCookie; exports.serializeMiddlewareCookieDeletion = serializeMiddlewareCookieDeletion; exports.normalizeMiddlewareModule = normalizeMiddlewareModule;
|