@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
|
@@ -0,0 +1,238 @@
|
|
|
1
|
+
import {
|
|
2
|
+
canonicalizeRequestPathname
|
|
3
|
+
} from "./chunk-CQ6OSQ3K.mjs";
|
|
4
|
+
import {
|
|
5
|
+
__name
|
|
6
|
+
} from "./chunk-LPEX4YW6.mjs";
|
|
7
|
+
|
|
8
|
+
// src/middleware/matcher.ts
|
|
9
|
+
var compiledConfigCache = /* @__PURE__ */ new WeakMap();
|
|
10
|
+
var compiledRouteCache = /* @__PURE__ */ new WeakMap();
|
|
11
|
+
function compileMiddlewareRoute(entry) {
|
|
12
|
+
const path = entry.path;
|
|
13
|
+
if (path === "/") return void 0;
|
|
14
|
+
const cached = compiledRouteCache.get(entry);
|
|
15
|
+
if (cached?.path === path) return cached;
|
|
16
|
+
const compiled = {
|
|
17
|
+
path,
|
|
18
|
+
exact: compilePattern(path),
|
|
19
|
+
nested: compilePattern(`${path}/:__farmRest*`)
|
|
20
|
+
};
|
|
21
|
+
compiledRouteCache.set(entry, compiled);
|
|
22
|
+
return compiled;
|
|
23
|
+
}
|
|
24
|
+
__name(compileMiddlewareRoute, "compileMiddlewareRoute");
|
|
25
|
+
function matchesMiddlewareRoute(pathname, entry) {
|
|
26
|
+
const compiled = compileMiddlewareRoute(entry);
|
|
27
|
+
if (!compiled) return { matched: true };
|
|
28
|
+
const canonicalPathname = canonicalizeRequestPathname(pathname);
|
|
29
|
+
const exactMatch = matchPattern(compiled.exact, canonicalPathname);
|
|
30
|
+
if (exactMatch.matched) return exactMatch;
|
|
31
|
+
const nestedMatch = matchPattern(compiled.nested, canonicalPathname);
|
|
32
|
+
if (!nestedMatch.matched) return { matched: false };
|
|
33
|
+
const params = { ...nestedMatch.params };
|
|
34
|
+
delete params.__farmRest;
|
|
35
|
+
return { matched: true, params: Object.keys(params).length > 0 ? params : void 0 };
|
|
36
|
+
}
|
|
37
|
+
__name(matchesMiddlewareRoute, "matchesMiddlewareRoute");
|
|
38
|
+
function matchesMiddlewareRouteAt(pathnames, entry) {
|
|
39
|
+
for (const pathname of pathnames) {
|
|
40
|
+
const match = matchesMiddlewareRoute(pathname, entry);
|
|
41
|
+
if (match.matched) return match;
|
|
42
|
+
}
|
|
43
|
+
return { matched: false };
|
|
44
|
+
}
|
|
45
|
+
__name(matchesMiddlewareRouteAt, "matchesMiddlewareRouteAt");
|
|
46
|
+
function sameEntries(current, previous) {
|
|
47
|
+
return current === void 0 || previous === void 0 ? current === previous : current.length === previous.length && current.every((entry, index) => entry === previous[index]);
|
|
48
|
+
}
|
|
49
|
+
__name(sameEntries, "sameEntries");
|
|
50
|
+
function toMatcherList(matcher) {
|
|
51
|
+
if (!matcher) return [];
|
|
52
|
+
return Array.isArray(matcher) ? matcher : [matcher];
|
|
53
|
+
}
|
|
54
|
+
__name(toMatcherList, "toMatcherList");
|
|
55
|
+
function escapeRegex(value) {
|
|
56
|
+
return value.replace(/[|\\{}()[\]^$*+?.]/g, "\\$&");
|
|
57
|
+
}
|
|
58
|
+
__name(escapeRegex, "escapeRegex");
|
|
59
|
+
function parseColonParam(segment) {
|
|
60
|
+
const raw = segment.slice(1);
|
|
61
|
+
const last = raw[raw.length - 1];
|
|
62
|
+
const modifier = last === "*" || last === "+" || last === "?" ? last : void 0;
|
|
63
|
+
return {
|
|
64
|
+
name: modifier ? raw.slice(0, -1) : raw,
|
|
65
|
+
modifier
|
|
66
|
+
};
|
|
67
|
+
}
|
|
68
|
+
__name(parseColonParam, "parseColonParam");
|
|
69
|
+
function compilePathPattern(pattern, trailingSlash = false) {
|
|
70
|
+
const params = [];
|
|
71
|
+
const segments = pattern.split("/").filter(Boolean);
|
|
72
|
+
if (segments.length === 0) {
|
|
73
|
+
return { kind: "path", regex: /^\/$/, params };
|
|
74
|
+
}
|
|
75
|
+
const parts = segments.map((segment) => {
|
|
76
|
+
if (segment === "**") {
|
|
77
|
+
return "(?:/.*)?";
|
|
78
|
+
}
|
|
79
|
+
if (segment === "*") {
|
|
80
|
+
return "/[^/]+";
|
|
81
|
+
}
|
|
82
|
+
if (segment.startsWith(":")) {
|
|
83
|
+
const { name, modifier } = parseColonParam(segment);
|
|
84
|
+
params.push(name);
|
|
85
|
+
if (modifier === "*") {
|
|
86
|
+
return "(?:/(.*))?";
|
|
87
|
+
}
|
|
88
|
+
if (modifier === "+") {
|
|
89
|
+
return "/(.+)";
|
|
90
|
+
}
|
|
91
|
+
if (modifier === "?") {
|
|
92
|
+
return "(?:/([^/]+))?";
|
|
93
|
+
}
|
|
94
|
+
return "/([^/]+)";
|
|
95
|
+
}
|
|
96
|
+
if (segment.startsWith("[[...") && segment.endsWith("]]")) {
|
|
97
|
+
params.push(segment.slice(5, -2));
|
|
98
|
+
return "(?:/(.*))?";
|
|
99
|
+
}
|
|
100
|
+
if (segment.startsWith("[...") && segment.endsWith("]")) {
|
|
101
|
+
params.push(segment.slice(4, -1));
|
|
102
|
+
return "(?:/(.*))?";
|
|
103
|
+
}
|
|
104
|
+
if (segment.startsWith("[") && segment.endsWith("]")) {
|
|
105
|
+
params.push(segment.slice(1, -1));
|
|
106
|
+
return "/([^/]+)";
|
|
107
|
+
}
|
|
108
|
+
return `/${escapeRegex(segment).replace(/\\\*/g, "[^/]*")}`;
|
|
109
|
+
});
|
|
110
|
+
return {
|
|
111
|
+
kind: "path",
|
|
112
|
+
regex: new RegExp(`^${parts.join("")}${trailingSlash ? "/?" : ""}$`),
|
|
113
|
+
params
|
|
114
|
+
};
|
|
115
|
+
}
|
|
116
|
+
__name(compilePathPattern, "compilePathPattern");
|
|
117
|
+
function compileMatcherPattern(pattern) {
|
|
118
|
+
if (typeof pattern === "string" && pattern !== "*" && !pattern.endsWith("(.*)")) {
|
|
119
|
+
return compilePathPattern(pattern, true);
|
|
120
|
+
}
|
|
121
|
+
return compilePattern(pattern);
|
|
122
|
+
}
|
|
123
|
+
__name(compileMatcherPattern, "compileMatcherPattern");
|
|
124
|
+
function compilePattern(pattern) {
|
|
125
|
+
if (pattern instanceof RegExp) {
|
|
126
|
+
return { kind: "regexp", regex: pattern };
|
|
127
|
+
}
|
|
128
|
+
if (pattern === "*" || pattern === "/(.*)") {
|
|
129
|
+
return { kind: "all" };
|
|
130
|
+
}
|
|
131
|
+
if (pattern.endsWith("(.*)")) {
|
|
132
|
+
return {
|
|
133
|
+
kind: "subtree",
|
|
134
|
+
prefix: pattern.slice(0, -4).replace(/\/$/, "")
|
|
135
|
+
};
|
|
136
|
+
}
|
|
137
|
+
return compilePathPattern(pattern);
|
|
138
|
+
}
|
|
139
|
+
__name(compilePattern, "compilePattern");
|
|
140
|
+
function compileMiddlewareConfig(config) {
|
|
141
|
+
const compiled = {
|
|
142
|
+
matcher: config.matcher ? toMatcherList(config.matcher).map(
|
|
143
|
+
(matcher) => typeof matcher === "function" ? matcher : compileMatcherPattern(matcher)
|
|
144
|
+
) : void 0,
|
|
145
|
+
exclude: config.exclude?.map(compilePattern)
|
|
146
|
+
};
|
|
147
|
+
compiledConfigCache.set(config, {
|
|
148
|
+
compiled,
|
|
149
|
+
matcher: config.matcher,
|
|
150
|
+
matcherEntries: Array.isArray(config.matcher) ? config.matcher.slice() : void 0,
|
|
151
|
+
excludeEntries: config.exclude?.slice()
|
|
152
|
+
});
|
|
153
|
+
return compiled;
|
|
154
|
+
}
|
|
155
|
+
__name(compileMiddlewareConfig, "compileMiddlewareConfig");
|
|
156
|
+
function matchPattern(pattern, pathname) {
|
|
157
|
+
if (pattern.kind === "all") {
|
|
158
|
+
return { matched: true };
|
|
159
|
+
}
|
|
160
|
+
if (pattern.kind === "subtree") {
|
|
161
|
+
return {
|
|
162
|
+
matched: pathname === pattern.prefix || pathname.startsWith(`${pattern.prefix}/`)
|
|
163
|
+
};
|
|
164
|
+
}
|
|
165
|
+
pattern.regex.lastIndex = 0;
|
|
166
|
+
const match = pattern.regex.exec(pathname);
|
|
167
|
+
if (!match) {
|
|
168
|
+
return { matched: false };
|
|
169
|
+
}
|
|
170
|
+
if (pattern.kind === "regexp") {
|
|
171
|
+
return {
|
|
172
|
+
matched: true,
|
|
173
|
+
params: match.groups ? { ...match.groups } : void 0
|
|
174
|
+
};
|
|
175
|
+
}
|
|
176
|
+
const values = {};
|
|
177
|
+
pattern.params.forEach((param, index) => {
|
|
178
|
+
values[param] = match[index + 1] || "";
|
|
179
|
+
});
|
|
180
|
+
return {
|
|
181
|
+
matched: true,
|
|
182
|
+
params: Object.keys(values).length > 0 ? values : void 0
|
|
183
|
+
};
|
|
184
|
+
}
|
|
185
|
+
__name(matchPattern, "matchPattern");
|
|
186
|
+
function matchesCompiledMiddlewareConfig(pathname, config, ctx) {
|
|
187
|
+
let canonicalPathname;
|
|
188
|
+
const getCanonicalPathname = /* @__PURE__ */ __name(() => canonicalPathname ?? (canonicalPathname = canonicalizeRequestPathname(pathname)), "getCanonicalPathname");
|
|
189
|
+
if (config.exclude) {
|
|
190
|
+
for (const pattern of config.exclude) {
|
|
191
|
+
if (matchPattern(pattern, getCanonicalPathname()).matched) {
|
|
192
|
+
return { matched: false };
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
if (config.matcher) {
|
|
197
|
+
for (const matcher of config.matcher) {
|
|
198
|
+
if (typeof matcher === "function") {
|
|
199
|
+
if (matcher(ctx)) {
|
|
200
|
+
return { matched: true };
|
|
201
|
+
}
|
|
202
|
+
continue;
|
|
203
|
+
}
|
|
204
|
+
const result = matchPattern(matcher, getCanonicalPathname());
|
|
205
|
+
if (result.matched) {
|
|
206
|
+
return result;
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
return { matched: false };
|
|
210
|
+
}
|
|
211
|
+
return { matched: true };
|
|
212
|
+
}
|
|
213
|
+
__name(matchesCompiledMiddlewareConfig, "matchesCompiledMiddlewareConfig");
|
|
214
|
+
function matchesMiddlewareConfig(pathname, config, ctx) {
|
|
215
|
+
const cached = compiledConfigCache.get(config);
|
|
216
|
+
const unchanged = cached && (Array.isArray(config.matcher) ? sameEntries(config.matcher, cached.matcherEntries) : config.matcher === cached.matcher) && sameEntries(config.exclude, cached.excludeEntries);
|
|
217
|
+
const compiled = unchanged ? cached.compiled : compileMiddlewareConfig(config);
|
|
218
|
+
return matchesCompiledMiddlewareConfig(pathname, compiled, ctx);
|
|
219
|
+
}
|
|
220
|
+
__name(matchesMiddlewareConfig, "matchesMiddlewareConfig");
|
|
221
|
+
function matchesMiddlewareConfigAt(pathnames, config, ctx) {
|
|
222
|
+
for (const pathname of pathnames) {
|
|
223
|
+
const match = matchesMiddlewareConfig(pathname, config, ctx);
|
|
224
|
+
if (match.matched) return match;
|
|
225
|
+
}
|
|
226
|
+
return { matched: false };
|
|
227
|
+
}
|
|
228
|
+
__name(matchesMiddlewareConfigAt, "matchesMiddlewareConfigAt");
|
|
229
|
+
|
|
230
|
+
export {
|
|
231
|
+
compileMiddlewareRoute,
|
|
232
|
+
matchesMiddlewareRoute,
|
|
233
|
+
matchesMiddlewareRouteAt,
|
|
234
|
+
compileMiddlewareConfig,
|
|
235
|
+
matchesCompiledMiddlewareConfig,
|
|
236
|
+
matchesMiddlewareConfig,
|
|
237
|
+
matchesMiddlewareConfigAt
|
|
238
|
+
};
|
|
@@ -137,7 +137,14 @@ function getEventTargetAssetUrl(value) {
|
|
|
137
137
|
return void 0;
|
|
138
138
|
}
|
|
139
139
|
const tagName = typeof target.tagName === "string" ? target.tagName.toLowerCase() : "";
|
|
140
|
-
if (tagName
|
|
140
|
+
if (tagName === "script") {
|
|
141
|
+
if (target.type !== "module" && target.noModule !== true) return void 0;
|
|
142
|
+
} else if (tagName === "link") {
|
|
143
|
+
const rel = typeof target.rel === "string" ? target.rel.toLowerCase().split(/\s+/) : [];
|
|
144
|
+
if (!rel.some((value2) => ["stylesheet", "modulepreload", "preload"].includes(value2))) {
|
|
145
|
+
return void 0;
|
|
146
|
+
}
|
|
147
|
+
} else {
|
|
141
148
|
return void 0;
|
|
142
149
|
}
|
|
143
150
|
return typeof target.src === "string" && target.src ? target.src : typeof target.href === "string" && target.href ? target.href : void 0;
|
|
@@ -9,17 +9,23 @@ function parseRequestCookieHeader(header) {
|
|
|
9
9
|
const separatorIndex = part.indexOf("=");
|
|
10
10
|
if (separatorIndex === -1) {
|
|
11
11
|
return {
|
|
12
|
-
name:
|
|
12
|
+
name: decodeCookieName(part),
|
|
13
13
|
value: ""
|
|
14
14
|
};
|
|
15
15
|
}
|
|
16
16
|
return {
|
|
17
|
-
name:
|
|
17
|
+
name: decodeCookieName(part.slice(0, separatorIndex).trim()),
|
|
18
18
|
value: decodeCookiePart(part.slice(separatorIndex + 1).trim())
|
|
19
19
|
};
|
|
20
20
|
}).filter((cookie) => cookie.name.length > 0);
|
|
21
21
|
}
|
|
22
22
|
__name(parseRequestCookieHeader, "parseRequestCookieHeader");
|
|
23
|
+
var RESERVED_PREFIX = /^__(host|secure)-/i;
|
|
24
|
+
function decodeCookieName(raw) {
|
|
25
|
+
const decoded = decodeCookiePart(raw);
|
|
26
|
+
return RESERVED_PREFIX.test(decoded) && !RESERVED_PREFIX.test(raw) ? raw : decoded;
|
|
27
|
+
}
|
|
28
|
+
__name(decodeCookieName, "decodeCookieName");
|
|
23
29
|
function decodeCookiePart(value) {
|
|
24
30
|
try {
|
|
25
31
|
return decodeURIComponent(value);
|
|
@@ -30,5 +36,6 @@ function decodeCookiePart(value) {
|
|
|
30
36
|
__name(decodeCookiePart, "decodeCookiePart");
|
|
31
37
|
|
|
32
38
|
export {
|
|
33
|
-
parseRequestCookieHeader
|
|
39
|
+
parseRequestCookieHeader,
|
|
40
|
+
decodeCookieName
|
|
34
41
|
};
|
|
@@ -25,6 +25,19 @@ function resolveFarmAPICanonicalPathname(pathname, serverBasePath = _chunkS3A45T
|
|
|
25
25
|
return pathname;
|
|
26
26
|
}
|
|
27
27
|
_chunkS3JO3N4Hcjs.__name.call(void 0, resolveFarmAPICanonicalPathname, "resolveFarmAPICanonicalPathname");
|
|
28
|
+
function createFarmAPIMiddlewarePathnames(serverBasePath = _chunkS3A45T7Fcjs.DEFAULT_FARM_API_BASE_PATH) {
|
|
29
|
+
const basePath = _chunkS3A45T7Fcjs.normalizeFarmAPIBasePath.call(void 0, serverBasePath);
|
|
30
|
+
if (basePath === _chunkS3A45T7Fcjs.DEFAULT_FARM_API_BASE_PATH) return (pathname) => [pathname];
|
|
31
|
+
const prefix = _chunkS3A45T7Fcjs.DEFAULT_FARM_API_BASE_PATH;
|
|
32
|
+
return (pathname) => {
|
|
33
|
+
const canonical = resolveFarmAPICanonicalPathname(pathname, basePath);
|
|
34
|
+
if (canonical !== prefix && !canonical.startsWith(`${prefix}/`)) return [pathname];
|
|
35
|
+
const suffix = canonical.slice(prefix.length);
|
|
36
|
+
const publicPath = basePath === "/" ? suffix || "/" : `${basePath}${suffix}`;
|
|
37
|
+
return [.../* @__PURE__ */ new Set([pathname, canonical, publicPath])];
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
_chunkS3JO3N4Hcjs.__name.call(void 0, createFarmAPIMiddlewarePathnames, "createFarmAPIMiddlewarePathnames");
|
|
28
41
|
function resolveFarmAPIServerRoutePath(routePath, serverBasePath = _chunkS3A45T7Fcjs.DEFAULT_FARM_API_BASE_PATH) {
|
|
29
42
|
return _chunkS3A45T7Fcjs.resolveFarmAPIRequestURL.call(void 0, routePath, serverBasePath).pathname;
|
|
30
43
|
}
|
|
@@ -34,4 +47,5 @@ _chunkS3JO3N4Hcjs.__name.call(void 0, resolveFarmAPIServerRoutePath, "resolveFar
|
|
|
34
47
|
|
|
35
48
|
|
|
36
49
|
|
|
37
|
-
|
|
50
|
+
|
|
51
|
+
exports.resolveFarmAPIServerBasePath = resolveFarmAPIServerBasePath; exports.resolveFarmAPICanonicalPathname = resolveFarmAPICanonicalPathname; exports.createFarmAPIMiddlewarePathnames = createFarmAPIMiddlewarePathnames; exports.resolveFarmAPIServerRoutePath = resolveFarmAPIServerRoutePath;
|
|
@@ -6,7 +6,10 @@ var _chunkOI6CMLWXcjs = require('./chunk-OI6CMLWX.cjs');
|
|
|
6
6
|
var _chunk7W3CPVXScjs = require('./chunk-7W3CPVXS.cjs');
|
|
7
7
|
|
|
8
8
|
|
|
9
|
-
var
|
|
9
|
+
var _chunkAI7QMY7Ocjs = require('./chunk-AI7QMY7O.cjs');
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
var _chunkUXFQ3UDAcjs = require('./chunk-UXFQ3UDA.cjs');
|
|
10
13
|
|
|
11
14
|
|
|
12
15
|
var _chunkS3JO3N4Hcjs = require('./chunk-S3JO3N4H.cjs');
|
|
@@ -17,12 +20,12 @@ function _setDefaultFarmThemeConfig(config, basePath = "/") {
|
|
|
17
20
|
defaultThemeConfig = _chunkOI6CMLWXcjs.resolveFarmThemeConfig.call(void 0, config, basePath);
|
|
18
21
|
}
|
|
19
22
|
_chunkS3JO3N4Hcjs.__name.call(void 0, _setDefaultFarmThemeConfig, "_setDefaultFarmThemeConfig");
|
|
20
|
-
function getTheme(request =
|
|
23
|
+
function getTheme(request = _chunkUXFQ3UDAcjs.getCurrentRequestOrNull.call(void 0, )) {
|
|
21
24
|
if (!request) return defaultThemeConfig.default;
|
|
22
25
|
return readFarmThemePreference(request, defaultThemeConfig);
|
|
23
26
|
}
|
|
24
27
|
_chunkS3JO3N4Hcjs.__name.call(void 0, getTheme, "getTheme");
|
|
25
|
-
function getThemeSnapshot(request =
|
|
28
|
+
function getThemeSnapshot(request = _chunkUXFQ3UDAcjs.getCurrentRequestOrNull.call(void 0, )) {
|
|
26
29
|
const theme = request ? readFarmThemePreference(request, defaultThemeConfig) : defaultThemeConfig.default;
|
|
27
30
|
return {
|
|
28
31
|
theme,
|
|
@@ -42,7 +45,7 @@ function readCookie(cookieHeader, name) {
|
|
|
42
45
|
for (const entry of cookieHeader.split(";")) {
|
|
43
46
|
const separator = entry.indexOf("=");
|
|
44
47
|
if (separator < 0) continue;
|
|
45
|
-
const key =
|
|
48
|
+
const key = _chunkAI7QMY7Ocjs.decodeCookieName.call(void 0, entry.slice(0, separator).trim());
|
|
46
49
|
if (key !== name) continue;
|
|
47
50
|
return decodeCookieValue(entry.slice(separator + 1).trim());
|
|
48
51
|
}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } 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
|
+
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
var _chunkSVRTJOUFcjs = require('./chunk-SVRTJOUF.cjs');
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
var _chunkS3JO3N4Hcjs = require('./chunk-S3JO3N4H.cjs');
|
|
10
|
+
|
|
11
|
+
// src/integration-request-security.ts
|
|
12
|
+
function resolveIntegrationAllowedOrigins(values, label) {
|
|
13
|
+
return Object.freeze((_nullishCoalesce(values, () => ( []))).map((value) => _chunkSVRTJOUFcjs.normalizeAllowedOriginPattern.call(void 0, value, label)));
|
|
14
|
+
}
|
|
15
|
+
_chunkS3JO3N4Hcjs.__name.call(void 0, resolveIntegrationAllowedOrigins, "resolveIntegrationAllowedOrigins");
|
|
16
|
+
function validateIntegrationRequestOrigin(request, policy = {}) {
|
|
17
|
+
const allowedOrigins = _nullishCoalesce(policy.allowedOrigins, () => ( []));
|
|
18
|
+
const requireOriginMetadata = _nullishCoalesce(policy.requireOriginMetadata, () => ( true));
|
|
19
|
+
const fetchSite = _optionalChain([request, 'access', _ => _.headers, 'access', _2 => _2.get, 'call', _3 => _3("sec-fetch-site"), 'optionalAccess', _4 => _4.trim, 'call', _5 => _5(), 'access', _6 => _6.toLowerCase, 'call', _7 => _7()]);
|
|
20
|
+
const source = _chunkSVRTJOUFcjs.getRequestSourceOrigin.call(void 0, request);
|
|
21
|
+
if (!source.ok) {
|
|
22
|
+
return { ok: false, reason: source.reason };
|
|
23
|
+
}
|
|
24
|
+
if (source.origin === null) {
|
|
25
|
+
if (fetchSite === "same-origin") {
|
|
26
|
+
return { ok: true };
|
|
27
|
+
}
|
|
28
|
+
if (requireOriginMetadata) {
|
|
29
|
+
return { ok: false, reason: fetchSite === "cross-site" ? "cross-site" : "missing-origin" };
|
|
30
|
+
}
|
|
31
|
+
return fetchSite === "cross-site" ? { ok: false, reason: "cross-site" } : { ok: true };
|
|
32
|
+
}
|
|
33
|
+
const requestUrl = new URL(request.url);
|
|
34
|
+
const matchesConfiguredOrigin = allowedOrigins.some(
|
|
35
|
+
(pattern) => _chunkSVRTJOUFcjs.matchesAllowedOrigin.call(void 0, source.origin, pattern)
|
|
36
|
+
);
|
|
37
|
+
const matchesRequest = source.origin === requestUrl.origin || _chunkSVRTJOUFcjs.matchesHostHeader.call(void 0, source.origin, request);
|
|
38
|
+
if (!matchesRequest && !matchesConfiguredOrigin) {
|
|
39
|
+
return { ok: false, reason: "cross-site" };
|
|
40
|
+
}
|
|
41
|
+
if (fetchSite === "cross-site" && !matchesConfiguredOrigin) {
|
|
42
|
+
return { ok: false, reason: "cross-site" };
|
|
43
|
+
}
|
|
44
|
+
return { ok: true };
|
|
45
|
+
}
|
|
46
|
+
_chunkS3JO3N4Hcjs.__name.call(void 0, validateIntegrationRequestOrigin, "validateIntegrationRequestOrigin");
|
|
47
|
+
function describeIntegrationOriginRejection(reason) {
|
|
48
|
+
switch (reason) {
|
|
49
|
+
case "missing-origin":
|
|
50
|
+
return "Request is missing same-origin metadata.";
|
|
51
|
+
case "opaque-origin":
|
|
52
|
+
return "Opaque origins are not allowed.";
|
|
53
|
+
case "invalid-origin":
|
|
54
|
+
return "Invalid request origin.";
|
|
55
|
+
case "cross-site":
|
|
56
|
+
return "Cross-site request was rejected.";
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
_chunkS3JO3N4Hcjs.__name.call(void 0, describeIntegrationOriginRejection, "describeIntegrationOriginRejection");
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
exports.resolveIntegrationAllowedOrigins = resolveIntegrationAllowedOrigins; exports.validateIntegrationRequestOrigin = validateIntegrationRequestOrigin; exports.describeIntegrationOriginRejection = describeIntegrationOriginRejection;
|
|
@@ -59,8 +59,12 @@ function claimServerQueryKey(owner, key) {
|
|
|
59
59
|
}
|
|
60
60
|
__name(claimServerQueryKey, "claimServerQueryKey");
|
|
61
61
|
var RAW_SERVER_QUERY_SYMBOL = /* @__PURE__ */ Symbol.for("farm.server-query");
|
|
62
|
+
function isFarmServerQueryBrowserRuntime() {
|
|
63
|
+
return typeof window !== "undefined" && typeof document !== "undefined";
|
|
64
|
+
}
|
|
65
|
+
__name(isFarmServerQueryBrowserRuntime, "isFarmServerQueryBrowserRuntime");
|
|
62
66
|
function assertNotRawServerQueryInBrowser(query) {
|
|
63
|
-
if (
|
|
67
|
+
if (!isFarmServerQueryBrowserRuntime()) return;
|
|
64
68
|
if (!query?.[RAW_SERVER_QUERY_SYMBOL]) return;
|
|
65
69
|
throw new Error(
|
|
66
70
|
[
|
|
@@ -129,6 +133,7 @@ function createServerQueryCallKey(query, input) {
|
|
|
129
133
|
}
|
|
130
134
|
__name(createServerQueryCallKey, "createServerQueryCallKey");
|
|
131
135
|
async function fetchServerQuery(query, input, options = {}) {
|
|
136
|
+
if (!isFarmServerQueryBrowserRuntime()) return query(input);
|
|
132
137
|
const cache = getFarmClientDataCache();
|
|
133
138
|
const provisionalKey = createServerQueryCallKey(query, input);
|
|
134
139
|
const entry = cache.get(provisionalKey);
|
|
@@ -241,6 +246,7 @@ __name(normalizeServerQueryError, "normalizeServerQueryError");
|
|
|
241
246
|
|
|
242
247
|
export {
|
|
243
248
|
attachRevalidationListeners,
|
|
249
|
+
isFarmServerQueryBrowserRuntime,
|
|
244
250
|
beginFarmServerQueryAction,
|
|
245
251
|
completeFarmServerQueryAction,
|
|
246
252
|
shouldApplyFarmServerQueryActionResult,
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } 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 _chunk5QIKR7RRcjs = require('./chunk-5QIKR7RR.cjs');
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
var _chunkS3JO3N4Hcjs = require('./chunk-S3JO3N4H.cjs');
|
|
7
|
+
|
|
8
|
+
// src/routing/route-slots.ts
|
|
9
|
+
var SLOT_SEGMENT = /^@([A-Za-z][A-Za-z0-9_-]*)$/;
|
|
10
|
+
function isRouteSlotSegment(segment) {
|
|
11
|
+
return SLOT_SEGMENT.test(segment);
|
|
12
|
+
}
|
|
13
|
+
_chunkS3JO3N4Hcjs.__name.call(void 0, isRouteSlotSegment, "isRouteSlotSegment");
|
|
14
|
+
function parseRouteSlotFile(filePath) {
|
|
15
|
+
const normalized = filePath.replace(/\\/g, "/");
|
|
16
|
+
const parts = normalized.split("/").filter(Boolean);
|
|
17
|
+
const fileName = _nullishCoalesce(parts.at(-1), () => ( ""));
|
|
18
|
+
const baseName = fileName.replace(/\.(tsx?|jsx?|vue|svelte)$/, "");
|
|
19
|
+
if (baseName !== "page" && baseName !== "default") return null;
|
|
20
|
+
const slotIndex = parts.findIndex((part) => SLOT_SEGMENT.test(part));
|
|
21
|
+
if (slotIndex < 0) return null;
|
|
22
|
+
if (parts.slice(slotIndex + 1, -1).some((part) => SLOT_SEGMENT.test(part))) {
|
|
23
|
+
throw new Error(`Nested route slots are not supported in "${filePath}"`);
|
|
24
|
+
}
|
|
25
|
+
const slotMatch = parts[slotIndex].match(SLOT_SEGMENT);
|
|
26
|
+
const name = _optionalChain([slotMatch, 'optionalAccess', _ => _[1]]);
|
|
27
|
+
if (!name) return null;
|
|
28
|
+
const ownerParts = parts.slice(0, slotIndex);
|
|
29
|
+
const contentParts = parts.slice(slotIndex + 1, -1);
|
|
30
|
+
const marker = parseInterceptionMarker(contentParts[0]);
|
|
31
|
+
let targetBase = ownerParts;
|
|
32
|
+
let targetParts = contentParts;
|
|
33
|
+
if (marker) {
|
|
34
|
+
targetBase = marker.root === true ? [] : ownerParts.slice(0, Math.max(0, ownerParts.length - marker.up));
|
|
35
|
+
targetParts = [...marker.remainder ? [marker.remainder] : [], ...contentParts.slice(1)];
|
|
36
|
+
}
|
|
37
|
+
const ownerFile = [...ownerParts, "layout.tsx"].join("/");
|
|
38
|
+
const routeFile = [
|
|
39
|
+
...baseName === "default" ? ownerParts : targetBase,
|
|
40
|
+
...baseName === "default" ? [] : targetParts,
|
|
41
|
+
"page.tsx"
|
|
42
|
+
].join("/");
|
|
43
|
+
return {
|
|
44
|
+
name,
|
|
45
|
+
ownerRoute: _chunk5QIKR7RRcjs.parseRoutePath.call(void 0, ownerFile || "layout.tsx"),
|
|
46
|
+
route: _chunk5QIKR7RRcjs.parseRoutePath.call(void 0, routeFile || "page.tsx"),
|
|
47
|
+
interception: marker !== null,
|
|
48
|
+
fallback: baseName === "default"
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
_chunkS3JO3N4Hcjs.__name.call(void 0, parseRouteSlotFile, "parseRouteSlotFile");
|
|
52
|
+
function createRouteSlotContainerId(name, ownerPattern) {
|
|
53
|
+
const owner = ownerPattern === "/" ? "root" : ownerPattern.replace(/^\//, "").replace(/[^A-Za-z0-9_-]+/g, "-").replace(/^-+|-+$/g, "");
|
|
54
|
+
return `__farm_slot_${name}_${owner || "root"}__`;
|
|
55
|
+
}
|
|
56
|
+
_chunkS3JO3N4Hcjs.__name.call(void 0, createRouteSlotContainerId, "createRouteSlotContainerId");
|
|
57
|
+
function parseInterceptionMarker(segment) {
|
|
58
|
+
if (!segment) return null;
|
|
59
|
+
if (segment.startsWith("(...)")) {
|
|
60
|
+
return {
|
|
61
|
+
up: 0,
|
|
62
|
+
root: true,
|
|
63
|
+
remainder: segment.slice(5)
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
if (segment.startsWith("(.)")) {
|
|
67
|
+
return {
|
|
68
|
+
up: 0,
|
|
69
|
+
remainder: segment.slice(3)
|
|
70
|
+
};
|
|
71
|
+
}
|
|
72
|
+
let remainder = segment;
|
|
73
|
+
let up = 0;
|
|
74
|
+
while (remainder.startsWith("(..)")) {
|
|
75
|
+
up += 1;
|
|
76
|
+
remainder = remainder.slice(4);
|
|
77
|
+
}
|
|
78
|
+
return up > 0 ? { up, remainder } : null;
|
|
79
|
+
}
|
|
80
|
+
_chunkS3JO3N4Hcjs.__name.call(void 0, parseInterceptionMarker, "parseInterceptionMarker");
|
|
81
|
+
|
|
82
|
+
|
|
83
|
+
|
|
84
|
+
|
|
85
|
+
|
|
86
|
+
|
|
87
|
+
exports.isRouteSlotSegment = isRouteSlotSegment; exports.parseRouteSlotFile = parseRouteSlotFile; exports.createRouteSlotContainerId = createRouteSlotContainerId; exports.parseInterceptionMarker = parseInterceptionMarker;
|