@farm.js/core 0.1.39 → 0.1.41
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/dist/{agent-mcp-HcTYQmNX.d.ts → agent-mcp-BOqIxJLI.d.mts} +8 -2
- package/dist/{agent-mcp-BhneNPb4.d.mts → agent-mcp-D0eZKfci.d.ts} +8 -2
- package/dist/{agent-mcp-handler-OLRMZONF.mjs → agent-mcp-handler-HVV5LNXF.mjs} +6 -6
- package/dist/{agent-mcp-handler-MRGP3WJ3.cjs → agent-mcp-handler-YKG7KVCY.cjs} +7 -7
- package/dist/agent-runtime.cjs +10 -6
- package/dist/agent-runtime.d.mts +6 -8
- package/dist/agent-runtime.d.ts +6 -8
- package/dist/agent-runtime.mjs +9 -5
- package/dist/api/client.cjs +3 -3
- package/dist/api/client.d.mts +3 -3
- package/dist/api/client.d.ts +3 -3
- package/dist/api/client.mjs +2 -2
- package/dist/api/route-manager.cjs +15 -13
- package/dist/api/route-manager.d.mts +8 -10
- package/dist/api/route-manager.d.ts +8 -10
- package/dist/api/route-manager.mjs +14 -12
- package/dist/api/runtime.cjs +12 -10
- package/dist/api/runtime.d.mts +7 -9
- package/dist/api/runtime.d.ts +7 -9
- package/dist/api/runtime.mjs +11 -9
- package/dist/{api-client-CyFtZFJ4.d.ts → api-client-BJv9mTbO.d.ts} +2 -2
- package/dist/{api-client-BjMmY8OD.d.mts → api-client-Dk9QOLwr.d.mts} +2 -2
- package/dist/api.cjs +17 -15
- package/dist/api.d.mts +10 -12
- package/dist/api.d.ts +10 -12
- package/dist/api.mjs +16 -14
- package/dist/{app-DVzmmbNO.d.mts → app-CzTSMJaf.d.mts} +12 -5
- package/dist/{app-CMkoghtp.d.ts → app-DM8e1z3G.d.ts} +12 -5
- package/dist/app-markdown.cjs +7 -6
- package/dist/app-markdown.d.mts +7 -9
- package/dist/app-markdown.d.ts +7 -9
- package/dist/app-markdown.mjs +6 -5
- package/dist/cache.cjs +6 -3
- package/dist/cache.d.mts +23 -2
- package/dist/cache.d.ts +23 -2
- package/dist/cache.mjs +5 -2
- package/dist/{chunk-EGCTIS5F.mjs → chunk-24SP5TGU.mjs} +1 -1
- package/dist/{chunk-2ZYGC6SS.cjs → chunk-25LPIZSX.cjs} +3 -3
- package/dist/{chunk-ARC7I3O2.mjs → chunk-26RUNDIR.mjs} +1 -1
- package/dist/{chunk-472NCAZ7.cjs → chunk-2FUIT2G2.cjs} +3 -3
- package/dist/{chunk-YFYUYWL7.cjs → chunk-32TZ3QTP.cjs} +723 -454
- package/dist/{chunk-CQMVIOYP.mjs → chunk-35WS7P2V.mjs} +29 -131
- package/dist/{chunk-QTXBII4Z.cjs → chunk-3TB5QGUW.cjs} +5 -5
- package/dist/chunk-45QJHGZM.cjs +1063 -0
- package/dist/{chunk-677THUVP.mjs → chunk-4C7KTKX7.mjs} +1 -1
- package/dist/{chunk-FUZEBRP3.mjs → chunk-4GP3XZ4Z.mjs} +5 -3
- package/dist/{chunk-KTSUBU2E.mjs → chunk-4KQDHTWX.mjs} +2 -2
- package/dist/chunk-4TLUFAIP.cjs +92 -0
- package/dist/chunk-4U5XZDLG.cjs +80 -0
- package/dist/{chunk-P664ZVTV.mjs → chunk-4ZZNPK25.mjs} +2 -2
- package/dist/{chunk-KIIMAWOJ.cjs → chunk-5NAVKJCZ.cjs} +35 -105
- package/dist/{chunk-LSKZMJMP.cjs → chunk-64SBBZDU.cjs} +38 -1
- package/dist/chunk-6BWKJ6QS.cjs +43 -0
- package/dist/{chunk-JSROZYYO.cjs → chunk-6D24SDKO.cjs} +1 -20
- package/dist/chunk-6IZWX6ES.cjs +74 -0
- package/dist/{chunk-QRKIMN7T.mjs → chunk-6LVRDOAW.mjs} +32 -6
- package/dist/{chunk-YWN746US.cjs → chunk-6MVFHNYZ.cjs} +85 -54
- package/dist/{chunk-VWBHM3F6.mjs → chunk-6PKXK4TY.mjs} +3 -3
- package/dist/chunk-6QOLZITB.cjs +22 -0
- package/dist/{chunk-OAHTRMIC.mjs → chunk-724JLMS4.mjs} +11 -11
- package/dist/chunk-7GNWGLWB.mjs +14 -0
- package/dist/{chunk-34UCJRQO.cjs → chunk-7RNAKBWF.cjs} +2 -2
- package/dist/{chunk-U6QLDL3G.mjs → chunk-7UEEHAW7.mjs} +1 -1
- package/dist/{chunk-UPJLHLJU.cjs → chunk-ALPWLT27.cjs} +4 -4
- package/dist/{chunk-ATSDUUFK.mjs → chunk-AX7S67YV.mjs} +33 -40
- package/dist/{chunk-MSSFIQGM.mjs → chunk-B2GSRB3P.mjs} +41 -10
- package/dist/chunk-BGGWKZ2V.mjs +6096 -0
- package/dist/{chunk-H5CLOUZS.cjs → chunk-BMOBTMDR.cjs} +5 -5
- package/dist/{chunk-Q2KB32T4.mjs → chunk-BPNRQ5BA.mjs} +6 -6
- package/dist/{chunk-E2ROOWQC.cjs → chunk-BPOTSHDO.cjs} +24 -87
- package/dist/chunk-BRYPZIMB.mjs +6 -0
- package/dist/{chunk-WFRT7JPX.mjs → chunk-BYQVROIP.mjs} +2 -2
- package/dist/{chunk-HALDNTIV.mjs → chunk-BYR3RQPB.mjs} +10 -73
- package/dist/{chunk-5PWXMJOH.cjs → chunk-C5KVWHIH.cjs} +36 -36
- package/dist/chunk-CALY6QG6.mjs +963 -0
- package/dist/{chunk-WC5UV2HQ.cjs → chunk-CBXBGM72.cjs} +2 -2
- package/dist/{chunk-WW46B6HA.cjs → chunk-CGR525MJ.cjs} +84 -45
- package/dist/{chunk-6V4TDWEC.cjs → chunk-CGVPXIRN.cjs} +18 -1
- package/dist/chunk-COABSY3U.mjs +196 -0
- package/dist/chunk-CZS6OACQ.mjs +63 -0
- package/dist/{chunk-SGBJ247Q.cjs → chunk-D4ROBNTK.cjs} +2 -2
- package/dist/{chunk-WEW2JVA4.cjs → chunk-D5IHNDHI.cjs} +6 -6
- package/dist/{chunk-QG775BRV.cjs → chunk-D64OPY6A.cjs} +72 -54
- package/dist/{chunk-QUCXCDE2.cjs → chunk-EH3464KF.cjs} +1 -1
- package/dist/{chunk-75HN5IZ3.mjs → chunk-ENOBPDKZ.mjs} +21 -19
- package/dist/{chunk-HD5CF3OE.mjs → chunk-ETPEZLS3.mjs} +2 -2
- package/dist/{chunk-HRETEZ2Z.cjs → chunk-EX4MKHXN.cjs} +37 -35
- package/dist/{chunk-TO4GJ56K.cjs → chunk-FEYQCYT7.cjs} +58 -18
- package/dist/chunk-FGH3ZXTP.mjs +1063 -0
- package/dist/{chunk-CUM5NYL5.mjs → chunk-FIAPD365.mjs} +1 -1
- package/dist/{chunk-HYTZYOW2.mjs → chunk-FJGIVDA5.mjs} +1197 -7906
- package/dist/chunk-FVPXT2JR.cjs +63 -0
- package/dist/{chunk-MYIZXDZA.mjs → chunk-FWCGUVVL.mjs} +1 -1
- package/dist/{chunk-D2ULAULS.cjs → chunk-FXFKIJDA.cjs} +9 -7
- package/dist/{chunk-RW63BOV7.cjs → chunk-GB7LDGY5.cjs} +2 -2
- package/dist/chunk-GC3EM6H4.mjs +80 -0
- package/dist/{chunk-E3UK5IIB.cjs → chunk-GS3WR5HX.cjs} +5 -3
- package/dist/{chunk-QFW2IH5E.mjs → chunk-GZTUT75U.mjs} +5 -2
- package/dist/chunk-H3EGVQE5.mjs +22 -0
- package/dist/chunk-HANGSYMB.mjs +67 -0
- package/dist/{chunk-RSOJ7DRT.mjs → chunk-HCSVR4YZ.mjs} +1 -58
- package/dist/{chunk-QYMZOOC5.mjs → chunk-HJ64F4GS.mjs} +12 -44
- package/dist/{chunk-P3PLW4FR.mjs → chunk-HKFBMHCD.mjs} +4 -4
- package/dist/{chunk-BXDJXFQG.cjs → chunk-I5MG3TKE.cjs} +4 -4
- package/dist/{chunk-VNGH5MLF.mjs → chunk-I6UVKUYK.mjs} +1 -1
- package/dist/{chunk-EPYU2EBL.mjs → chunk-IF4NU2NG.mjs} +1 -1
- package/dist/{chunk-WXJLNP33.cjs → chunk-IFWSR7YZ.cjs} +9 -7
- package/dist/{chunk-IVLZZZEI.mjs → chunk-IM7DY3ED.mjs} +1 -1
- package/dist/{chunk-W36M2BQ4.mjs → chunk-IN6RCKLL.mjs} +6 -5
- package/dist/{chunk-F5QO4FNE.mjs → chunk-INQ64HTJ.mjs} +43 -11
- package/dist/{chunk-SDOTRX3V.cjs → chunk-JEIG3EWE.cjs} +8 -8
- package/dist/{chunk-UWPLULNK.mjs → chunk-JGHCKIRI.mjs} +84 -24
- package/dist/{chunk-BFJTHYTN.mjs → chunk-JIYYX7WU.mjs} +10 -8
- package/dist/{chunk-CIOT4HGT.cjs → chunk-JOTUZIM4.cjs} +14 -14
- package/dist/{chunk-SKVTP5PR.mjs → chunk-JOW4HDJO.mjs} +1 -62
- package/dist/{chunk-6MVFL3R5.cjs → chunk-JR4QCLJY.cjs} +1 -58
- package/dist/{chunk-CGBDNNSM.cjs → chunk-KEXK442I.cjs} +44 -12
- package/dist/{chunk-FUCSUGDM.cjs → chunk-KF6VDJH7.cjs} +3 -3
- package/dist/{chunk-EA5K5BKU.mjs → chunk-KNHBTJP6.mjs} +18 -1
- package/dist/{chunk-MVL2RAJW.mjs → chunk-KYN5ODF6.mjs} +1 -1
- package/dist/{chunk-LMPAPBUA.cjs → chunk-L6A26QT5.cjs} +36 -68
- package/dist/{chunk-RVXFINNS.cjs → chunk-L6HYACBE.cjs} +31 -31
- package/dist/chunk-LFHCG2DU.mjs +43 -0
- package/dist/{chunk-5OKBARDN.cjs → chunk-LIZTLA5F.cjs} +12 -11
- package/dist/{chunk-HXRYZWTA.mjs → chunk-LLUA2LSC.mjs} +3 -3
- package/dist/{chunk-B5J2YVG7.cjs → chunk-LYIZHJTK.cjs} +2 -2
- package/dist/{chunk-3UEVPCGW.mjs → chunk-MEASUNVY.mjs} +6 -1
- package/dist/{chunk-FZ6YYU2W.mjs → chunk-MGMF4VP7.mjs} +38 -1
- package/dist/{chunk-CNNOLE4O.mjs → chunk-MHHCLYXU.mjs} +1 -1
- package/dist/{chunk-HRSAQ23K.cjs → chunk-MHN4UR5U.cjs} +4 -4
- package/dist/{chunk-3LOLJTFV.cjs → chunk-MN4TQJ3W.cjs} +11 -11
- package/dist/{chunk-PGZDEPTM.cjs → chunk-MY5PZYAD.cjs} +10 -10
- package/dist/{chunk-ZXH4TS3F.cjs → chunk-NBPNUQYO.cjs} +3 -64
- package/dist/{chunk-VXEEATVD.cjs → chunk-NFG4PUPI.cjs} +2 -2
- package/dist/{chunk-INL3THCU.mjs → chunk-O7USYJ4U.mjs} +1 -1
- package/dist/{chunk-4ZFL5GFN.cjs → chunk-OILHPMFX.cjs} +86 -26
- package/dist/{chunk-AJQTP4OO.mjs → chunk-OJ7JP7RJ.mjs} +1 -1
- package/dist/chunk-OQ4YXWH4.cjs +6097 -0
- package/dist/{chunk-DMEPTZTI.mjs → chunk-P2UJF4SS.mjs} +47 -7
- package/dist/{chunk-T5OJPTVN.cjs → chunk-P4TYB4SF.cjs} +2 -2
- package/dist/chunk-P7XDC7UJ.mjs +92 -0
- package/dist/{chunk-SHLXACIO.cjs → chunk-PJ42JESY.cjs} +1 -9
- package/dist/{chunk-5ULKUBIA.cjs → chunk-PN676AZF.cjs} +6 -6
- package/dist/{chunk-YKZRDB5Z.mjs → chunk-PYHPXPSW.mjs} +2 -2
- package/dist/{chunk-KMTGADN3.mjs → chunk-QCVIRVHE.mjs} +1 -9
- package/dist/{chunk-5D2JIPLH.cjs → chunk-QEILRWVV.cjs} +36 -138
- package/dist/{chunk-XKG2BLFN.cjs → chunk-QIBP5EFA.cjs} +18 -35
- package/dist/{chunk-ZUPXLIGB.mjs → chunk-R65GCA6A.mjs} +647 -378
- package/dist/{chunk-BWIQR4DH.cjs → chunk-RHGK2JEN.cjs} +56 -63
- package/dist/{chunk-AS2VPMEE.cjs → chunk-ROQ4C4LJ.cjs} +1465 -8174
- package/dist/{chunk-QV4VE2OW.mjs → chunk-S6ENKNNG.mjs} +5 -3
- package/dist/{chunk-RWFLWR5J.cjs → chunk-S7MTDRYA.cjs} +17 -15
- package/dist/{chunk-PVZE2JGJ.mjs → chunk-SGB4IW7K.mjs} +43 -25
- package/dist/{chunk-GKBWWRBG.mjs → chunk-SVPGWJZF.mjs} +12 -12
- package/dist/{chunk-EKN7NSZO.cjs → chunk-SZLNU3GJ.cjs} +8 -5
- package/dist/chunk-TI7UANHI.cjs +77 -0
- package/dist/{chunk-6BK3K2GB.mjs → chunk-UIDWEU7M.mjs} +83 -44
- package/dist/{chunk-MLY2RP5R.mjs → chunk-ULQOP5UI.mjs} +6 -2
- package/dist/chunk-UNJZGVPU.cjs +6 -0
- package/dist/{chunk-5BWWFHR2.mjs → chunk-UQUEANTY.mjs} +3 -3
- package/dist/chunk-VDRM36QB.cjs +963 -0
- package/dist/chunk-VHRS3MCW.cjs +196 -0
- package/dist/{chunk-SOP2EAA6.mjs → chunk-VLPII2JJ.mjs} +1 -1
- package/dist/{chunk-RG4A6LB2.cjs → chunk-VNPXKF3G.cjs} +7 -7
- package/dist/chunk-VQDBNVOO.cjs +14 -0
- package/dist/chunk-VQGKD7RV.mjs +25 -0
- package/dist/{chunk-6HB6V3R7.mjs → chunk-VTBXE6QG.mjs} +10 -27
- package/dist/{chunk-ZMSZZXOR.mjs → chunk-WDMIW6Q6.mjs} +0 -19
- package/dist/{chunk-NBBEQLOK.cjs → chunk-WLHA5USH.cjs} +9 -9
- package/dist/{chunk-BZHXGVMA.mjs → chunk-WMBRZI5V.mjs} +5 -3
- package/dist/{chunk-4WVJLURN.mjs → chunk-WMHG64DA.mjs} +1 -1
- package/dist/{chunk-JCYYXBAJ.cjs → chunk-WROEFVNO.cjs} +3 -3
- package/dist/{chunk-A657YSP4.cjs → chunk-WSOBCAYO.cjs} +37 -35
- package/dist/{chunk-IWZKTWHZ.cjs → chunk-WU7ZS3EM.cjs} +7 -2
- package/dist/{chunk-J63ZH5OQ.cjs → chunk-X3GMHKO3.cjs} +2 -2
- package/dist/{chunk-POSPE3IO.mjs → chunk-X3NGFVRF.mjs} +61 -21
- package/dist/{chunk-VT4WFRHA.mjs → chunk-XUC6CFLE.mjs} +1 -1
- package/dist/chunk-Y5RG6B7S.mjs +77 -0
- package/dist/{chunk-EIPC3FDA.cjs → chunk-YWCYV7QC.cjs} +9 -5
- package/dist/{chunk-WLL43JMO.mjs → chunk-YYQVGKO5.mjs} +7 -5
- package/dist/chunk-YZAKIXRL.cjs +67 -0
- package/dist/chunk-ZQRCSUSB.cjs +25 -0
- package/dist/{chunk-6XWDE2P2.cjs → chunk-ZTP3BJG6.cjs} +64 -24
- package/dist/{chunk-ZMMBIVQM.mjs → chunk-ZZGQD7A4.mjs} +16 -86
- package/dist/{client-plugins-CsCuCLBz.d.mts → client-plugins-CkYwvDJ0.d.mts} +2545 -2665
- package/dist/{client-plugins-D0ke-Hc8.d.ts → client-plugins-DfeKd0sD.d.ts} +2545 -2665
- package/dist/client-plugins.d.mts +6 -8
- package/dist/client-plugins.d.ts +6 -8
- package/dist/client.cjs +5 -5
- package/dist/client.d.mts +12 -13
- package/dist/client.d.ts +12 -13
- package/dist/client.mjs +4 -4
- package/dist/client.react-server.mjs +2 -0
- package/dist/config.d.mts +6 -8
- package/dist/config.d.ts +6 -8
- package/dist/{devtools-LW4QQ5J3.cjs → devtools-2YHAJYH6.cjs} +21 -18
- package/dist/{devtools-5AFIPVUJ.mjs → devtools-N3QLRIQU.mjs} +20 -17
- package/dist/docs.cjs +23 -20
- package/dist/docs.d.mts +7 -9
- package/dist/docs.d.ts +7 -9
- package/dist/docs.mjs +22 -19
- package/dist/{endpoint-CA-TNX60.d.ts → endpoint-BOE0IAaG.d.ts} +6 -3
- package/dist/{endpoint-CCHFqyTE.d.mts → endpoint-DGZRZHux.d.mts} +6 -3
- package/dist/environment/vite.cjs +6 -2
- package/dist/environment/vite.d.mts +11 -2
- package/dist/environment/vite.d.ts +11 -2
- package/dist/environment/vite.mjs +5 -1
- package/dist/headers.cjs +4 -4
- package/dist/headers.mjs +3 -3
- package/dist/image/server.cjs +7 -3
- package/dist/image/server.d.mts +10 -2
- package/dist/image/server.d.ts +10 -2
- package/dist/image/server.mjs +6 -2
- package/dist/image/sharp.cjs +12 -10
- package/dist/image/sharp.d.mts +1 -1
- package/dist/image/sharp.d.ts +1 -1
- package/dist/image/sharp.mjs +4 -2
- package/dist/{image-config-Duob7wER.d.ts → image-config-BpH1q5R8.d.mts} +4 -1
- package/dist/{image-config-Duob7wER.d.mts → image-config-BpH1q5R8.d.ts} +4 -1
- package/dist/image.d.mts +1 -1
- package/dist/image.d.ts +1 -1
- package/dist/index.cjs +90 -68
- package/dist/index.d.mts +28 -145
- package/dist/index.d.ts +28 -145
- package/dist/index.mjs +103 -81
- package/dist/{integration-api-BPJo5oXb.d.ts → integration-api-BuPHMeKz.d.ts} +2 -2
- package/dist/{integration-api-0y4FXJpC.d.mts → integration-api-DWyMmvrR.d.mts} +2 -2
- package/dist/integration-orm-P2II2EBK.cjs +14 -0
- package/dist/{integration-orm-KV5B3BGZ.mjs → integration-orm-RBKCIQYZ.mjs} +4 -3
- package/dist/integrations.cjs +7 -5
- package/dist/integrations.d.mts +8 -10
- package/dist/integrations.d.ts +8 -10
- package/dist/integrations.mjs +6 -4
- package/dist/internal/app-markdown-runtime.cjs +6 -5
- package/dist/internal/app-markdown-runtime.d.mts +7 -9
- package/dist/internal/app-markdown-runtime.d.ts +7 -9
- package/dist/internal/app-markdown-runtime.mjs +5 -4
- package/dist/internal/build-runtime.cjs +57 -56
- package/dist/internal/build-runtime.d.mts +8 -10
- package/dist/internal/build-runtime.d.ts +8 -10
- package/dist/internal/build-runtime.mjs +56 -55
- package/dist/internal/cli-runtime.cjs +37 -31
- package/dist/internal/cli-runtime.mjs +37 -31
- package/dist/internal/client-error-overlay.cjs +4 -4
- package/dist/internal/client-error-overlay.mjs +1 -1
- package/dist/internal/compression-runtime.d.mts +6 -8
- package/dist/internal/compression-runtime.d.ts +6 -8
- package/dist/internal/config-runtime.cjs +21 -18
- package/dist/internal/config-runtime.d.mts +7 -9
- package/dist/internal/config-runtime.d.ts +7 -9
- package/dist/internal/config-runtime.mjs +20 -17
- package/dist/internal/docs-precompiled-runtime.cjs +3 -3
- package/dist/internal/docs-precompiled-runtime.mjs +2 -2
- package/dist/internal/infra-analytics-runtime.cjs +7 -7
- package/dist/internal/infra-analytics-runtime.mjs +5 -5
- package/dist/internal/metadata-image-runtime.cjs +4 -3
- package/dist/internal/metadata-image-runtime.mjs +3 -2
- package/dist/internal/product-telemetry-runtime.cjs +2 -2
- package/dist/internal/product-telemetry-runtime.mjs +1 -1
- package/dist/internal/production-node-env.cjs +2 -2
- package/dist/internal/production-node-env.mjs +1 -1
- package/dist/internal/production-runtime.cjs +53 -28
- package/dist/internal/production-runtime.d.mts +46 -15
- package/dist/internal/production-runtime.d.ts +46 -15
- package/dist/internal/production-runtime.mjs +57 -32
- package/dist/layers-CM5i6T7z.d.mts +55 -0
- package/dist/layers-CM5i6T7z.d.ts +55 -0
- package/dist/markdown.cjs +4 -4
- package/dist/markdown.d.mts +6 -8
- package/dist/markdown.d.ts +6 -8
- package/dist/markdown.mjs +3 -3
- package/dist/middleware.cjs +16 -10
- package/dist/middleware.d.mts +8 -10
- package/dist/middleware.d.ts +8 -10
- package/dist/middleware.mjs +19 -13
- package/dist/navigation.cjs +4 -4
- package/dist/navigation.d.mts +9 -10
- package/dist/navigation.d.ts +9 -10
- package/dist/navigation.mjs +3 -3
- package/dist/{nitro-MPZJGPXK.mjs → nitro-KDACKNHU.mjs} +3 -2
- package/dist/{nitro-7F65EZZS.cjs → nitro-NPGU6VBT.cjs} +4 -3
- package/dist/observability.cjs +2 -2
- package/dist/observability.mjs +1 -1
- package/dist/plugin-DBBZ4JI2.cjs +32 -0
- package/dist/plugin-SYMK7PQ2.mjs +32 -0
- package/dist/plugin.cjs +56 -43
- package/dist/plugin.d.mts +25 -8
- package/dist/plugin.d.ts +25 -8
- package/dist/plugin.mjs +57 -44
- package/dist/{production-runtime-DfRP0cV0.d.mts → production-runtime-BTkXQdYy.d.mts} +17 -3
- package/dist/{production-runtime-BaI3WHnV.d.ts → production-runtime-DFC7pgbp.d.ts} +17 -3
- package/dist/query/client.cjs +2 -2
- package/dist/query/client.mjs +3 -3
- package/dist/{render-plan-Dg8RBYFa.d.mts → render-plan-5rFeWmk7.d.mts} +1 -1
- package/dist/{render-plan-CfIdJKAf.d.ts → render-plan-BoAK9xFC.d.ts} +1 -1
- package/dist/renderer-client.d.mts +8 -9
- package/dist/renderer-client.d.ts +8 -9
- package/dist/{request-DfE02G_A.d.mts → request-BxBWigtl.d.mts} +1 -1
- package/dist/{request-CEbHIIl4.d.ts → request-fciwmd3n.d.ts} +1 -1
- package/dist/request.cjs +3 -3
- package/dist/request.d.mts +7 -9
- package/dist/request.d.ts +7 -9
- package/dist/request.mjs +2 -2
- package/dist/{route-rendering-C4oHbv6C.d.ts → route-rendering-BCM1QzEf.d.mts} +1 -1
- package/dist/{route-rendering-BHyOfXjD.d.mts → route-rendering-BLZT0IP0.d.ts} +1 -1
- package/dist/{router-uRN_29Em.d.ts → router-CkheNX3-.d.ts} +1 -1
- package/dist/{router-DwhA61SB.d.mts → router-DyZJWc1_.d.mts} +1 -1
- package/dist/routes.cjs +6 -5
- package/dist/routes.d.mts +6 -8
- package/dist/routes.d.ts +6 -8
- package/dist/routes.mjs +5 -4
- package/dist/{runtime-COk03hmx.d.ts → runtime-DfU4sKa5.d.ts} +3 -3
- package/dist/{runtime-BEdHhN4C.d.mts → runtime-wexvUN5J.d.mts} +3 -3
- package/dist/{schema-dev-notice-Y7MQEFGN.cjs → schema-dev-notice-5JPE67AI.cjs} +6 -4
- package/dist/{schema-dev-notice-O67CPXJ6.mjs → schema-dev-notice-WLPZ6WKU.mjs} +4 -2
- package/dist/server-action-security.cjs +4 -3
- package/dist/server-action-security.mjs +3 -2
- package/dist/server-client-bridge-DKWDl5NB.d.mts +7 -0
- package/dist/server-client-bridge-DKWDl5NB.d.ts +7 -0
- package/dist/server-fn-client.d.mts +3 -3
- package/dist/server-fn-client.d.ts +3 -3
- package/dist/server-fn.cjs +8 -7
- package/dist/server-fn.d.mts +1 -1
- package/dist/server-fn.d.ts +1 -1
- package/dist/server-fn.mjs +7 -6
- package/dist/server-plugins.cjs +5 -5
- package/dist/server-plugins.d.mts +7 -9
- package/dist/server-plugins.d.ts +7 -9
- package/dist/server-plugins.mjs +4 -4
- package/dist/server-query-client.d.mts +1 -1
- package/dist/server-query-client.d.ts +1 -1
- package/dist/server-query.cjs +9 -8
- package/dist/server-query.d.mts +1 -1
- package/dist/server-query.d.ts +1 -1
- package/dist/server-query.mjs +8 -7
- package/dist/server.cjs +97 -73
- package/dist/server.d.mts +18 -13
- package/dist/server.d.ts +18 -13
- package/dist/server.mjs +82 -58
- package/dist/{spa-router-DrVOBVGg.d.ts → spa-router-CcejECnG.d.ts} +2 -2
- package/dist/{spa-router-w4aFOuyn.d.mts → spa-router-DgsMXqfX.d.mts} +2 -2
- package/dist/ssg-1FGaFISl.d.ts +184 -0
- package/dist/ssg-Bg4bMMhM.d.mts +184 -0
- package/dist/storage.cjs +6 -2
- package/dist/storage.d.mts +9 -1
- package/dist/storage.d.ts +9 -1
- package/dist/storage.mjs +5 -1
- package/dist/testing.cjs +20 -18
- package/dist/testing.d.mts +7 -9
- package/dist/testing.d.ts +7 -9
- package/dist/testing.mjs +16 -14
- package/dist/theme/server.cjs +4 -4
- package/dist/theme/server.mjs +3 -3
- package/dist/{utils-Dhuqwmd2.d.ts → utils-8wtTYiH4.d.mts} +1 -1
- package/dist/{utils-BtYehqeU.d.mts → utils-Dxbh6Hgj.d.ts} +1 -1
- package/dist/version.cjs +2 -2
- package/dist/version.mjs +1 -1
- package/dist/vite.cjs +75 -46
- package/dist/vite.d.mts +130 -11
- package/dist/vite.d.ts +130 -11
- package/dist/vite.mjs +76 -47
- package/dist/{workflows-jZ4BcdoZ.d.ts → workflows-IWP1ddBm.d.mts} +5 -2
- package/dist/{workflows-jZ4BcdoZ.d.mts → workflows-IWP1ddBm.d.ts} +5 -2
- package/dist/workflows.cjs +4 -3
- package/dist/workflows.d.mts +1 -1
- package/dist/workflows.d.ts +1 -1
- package/dist/workflows.mjs +3 -2
- package/package.json +3 -1
- package/dist/chunk-3SDFA7UF.cjs +0 -701
- package/dist/chunk-DAO7JGTS.mjs +0 -73
- package/dist/chunk-E5GNDG5F.mjs +0 -701
- package/dist/chunk-SYQ3MOWW.cjs +0 -73
- package/dist/chunk-ULASELLA.cjs +0 -48
- package/dist/integration-orm-55F7CII5.cjs +0 -13
|
@@ -9,10 +9,10 @@ import {
|
|
|
9
9
|
} from "./chunk-IOEH4VWN.mjs";
|
|
10
10
|
import {
|
|
11
11
|
APIRouteConflictError
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-YYQVGKO5.mjs";
|
|
13
13
|
import {
|
|
14
14
|
findProgrammaticRouteFilesInDir
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-FWCGUVVL.mjs";
|
|
16
16
|
import {
|
|
17
17
|
isFarmAPIRouteFileName
|
|
18
18
|
} from "./chunk-CU625VAY.mjs";
|
|
@@ -23,21 +23,16 @@ import {
|
|
|
23
23
|
matchAPIRouteAtBasePath,
|
|
24
24
|
mergePluginAPIRoutes,
|
|
25
25
|
resolveAPIRouteEndpoint
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-VTBXE6QG.mjs";
|
|
27
27
|
import {
|
|
28
28
|
isProgrammaticRoutesFileName
|
|
29
|
-
} from "./chunk-
|
|
30
|
-
import {
|
|
31
|
-
createFarmRequestBodyErrorResponse,
|
|
32
|
-
readNodeRequestBody,
|
|
33
|
-
resolveFarmServerConfig
|
|
34
|
-
} from "./chunk-ZMMBIVQM.mjs";
|
|
29
|
+
} from "./chunk-KNHBTJP6.mjs";
|
|
35
30
|
import {
|
|
36
31
|
createCliColors
|
|
37
32
|
} from "./chunk-I2BHUNBU.mjs";
|
|
38
33
|
import {
|
|
39
34
|
loadFarmDevModule
|
|
40
|
-
} from "./chunk-
|
|
35
|
+
} from "./chunk-QCVIRVHE.mjs";
|
|
41
36
|
import {
|
|
42
37
|
toPosixPath,
|
|
43
38
|
toViteModuleId
|
|
@@ -45,9 +40,14 @@ import {
|
|
|
45
40
|
import {
|
|
46
41
|
sendWebResponse
|
|
47
42
|
} from "./chunk-Z2RZJZIZ.mjs";
|
|
43
|
+
import {
|
|
44
|
+
createFarmRequestBodyErrorResponse,
|
|
45
|
+
readNodeRequestBody,
|
|
46
|
+
resolveFarmServerConfig
|
|
47
|
+
} from "./chunk-ZZGQD7A4.mjs";
|
|
48
48
|
import {
|
|
49
49
|
resolveFarmRequestURL
|
|
50
|
-
} from "./chunk-
|
|
50
|
+
} from "./chunk-X3NGFVRF.mjs";
|
|
51
51
|
import {
|
|
52
52
|
AmbiguousRouteError,
|
|
53
53
|
assertUniqueRouteParameters,
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import {
|
|
2
|
+
__name
|
|
3
|
+
} from "./chunk-LPEX4YW6.mjs";
|
|
4
|
+
|
|
5
|
+
// src/utils/file-module.ts
|
|
6
|
+
import { pathToFileURL } from "url";
|
|
7
|
+
function toFileModuleUrl(filePath) {
|
|
8
|
+
return pathToFileURL(filePath).href;
|
|
9
|
+
}
|
|
10
|
+
__name(toFileModuleUrl, "toFileModuleUrl");
|
|
11
|
+
|
|
12
|
+
export {
|
|
13
|
+
toFileModuleUrl
|
|
14
|
+
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } } function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } 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
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkSZLNU3GJcjs = require('./chunk-SZLNU3GJ.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
var _chunkS3JO3N4Hcjs = require('./chunk-S3JO3N4H.cjs');
|
|
@@ -11,7 +11,7 @@ var _path = require('path'); var _path2 = _interopRequireDefault(_path);
|
|
|
11
11
|
var _url = require('url');
|
|
12
12
|
async function createFarmMarkdownRouteModuleFromFile(filePath, options = {}) {
|
|
13
13
|
const source = await _promises.readFile.call(void 0, filePath, "utf8");
|
|
14
|
-
return
|
|
14
|
+
return _chunkSZLNU3GJcjs.createFarmMarkdownRouteModule.call(void 0, {
|
|
15
15
|
source,
|
|
16
16
|
filePath,
|
|
17
17
|
components: options.components,
|
|
@@ -67,18 +67,18 @@ function parseColonParam(segment) {
|
|
|
67
67
|
}
|
|
68
68
|
_chunkS3JO3N4Hcjs.__name.call(void 0, parseColonParam, "parseColonParam");
|
|
69
69
|
var MATCHER_PARAM_NAME = /^[\p{L}\p{N}_$-]+$/u;
|
|
70
|
-
var
|
|
70
|
+
var MATCHER_UNSUPPORTED_LITERAL = /[()[\]|\\{}^$?:]|\.[*+]/;
|
|
71
71
|
var MATCHER_BRACKET_PARAM = /^\[\[\.\.\.(.+)\]\]$|^\[\.\.\.(.+)\]$|^\[(.+)\]$/;
|
|
72
72
|
function isSupportedMatcherSegment(segment) {
|
|
73
73
|
if (segment === "*" || segment === "**") return true;
|
|
74
74
|
if (segment.startsWith(":")) return MATCHER_PARAM_NAME.test(parseColonParam(segment).name);
|
|
75
75
|
const bracket = MATCHER_BRACKET_PARAM.exec(segment);
|
|
76
76
|
if (bracket) return MATCHER_PARAM_NAME.test(_nullishCoalesce(_nullishCoalesce(bracket[1], () => ( bracket[2])), () => ( bracket[3])));
|
|
77
|
-
return !
|
|
77
|
+
return !MATCHER_UNSUPPORTED_LITERAL.test(segment);
|
|
78
78
|
}
|
|
79
79
|
_chunkS3JO3N4Hcjs.__name.call(void 0, isSupportedMatcherSegment, "isSupportedMatcherSegment");
|
|
80
80
|
function isLiteralMatcherSegment(segment) {
|
|
81
|
-
return !
|
|
81
|
+
return !MATCHER_UNSUPPORTED_LITERAL.test(segment) && !segment.includes("*");
|
|
82
82
|
}
|
|
83
83
|
_chunkS3JO3N4Hcjs.__name.call(void 0, isLiteralMatcherSegment, "isLiteralMatcherSegment");
|
|
84
84
|
function assertSupportedMiddlewareMatcher(pattern) {
|
|
@@ -88,7 +88,7 @@ function assertSupportedMiddlewareMatcher(pattern) {
|
|
|
88
88
|
const segments = path.split("/").filter(Boolean);
|
|
89
89
|
if (segments.every(subtree ? isLiteralMatcherSegment : isSupportedMatcherSegment)) return;
|
|
90
90
|
throw new Error(
|
|
91
|
-
`Middleware matcher "${pattern}" is not a supported string pattern, so it would never match a request and the middleware would not run. String matchers do not accept regular-expression syntax such as groups, alternation, character classes, or
|
|
91
|
+
`Middleware matcher "${pattern}" is not a supported string pattern, so it would never match a request and the middleware would not run. String matchers do not accept regular-expression syntax such as groups, alternation, character classes, lookaheads, or \`.*\`, or a param after literal text such as \`/user-:id\`. Pass a RegExp instead, for example \`matcher: /^\\/(?!api|_next).*/\`, or use the supported forms: /path/:param, /path/:param*, /path/[param], /path/[...param], /path/*, /path/**, or a trailing (.*) such as /path(.*).`
|
|
92
92
|
);
|
|
93
93
|
}
|
|
94
94
|
_chunkS3JO3N4Hcjs.__name.call(void 0, assertSupportedMiddlewareMatcher, "assertSupportedMiddlewareMatcher");
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
import {
|
|
2
|
+
setFarmPluginIntegrationContext
|
|
3
|
+
} from "./chunk-H3EGVQE5.mjs";
|
|
1
4
|
import {
|
|
2
5
|
defineSchema
|
|
3
6
|
} from "./chunk-44SYJEG3.mjs";
|
|
@@ -5,19 +8,10 @@ import {
|
|
|
5
8
|
assertSupportedMiddlewareMatcher,
|
|
6
9
|
compileMiddlewareConfig,
|
|
7
10
|
matchesCompiledMiddlewareConfig
|
|
8
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-HKFBMHCD.mjs";
|
|
9
12
|
import {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
createFarmRequestBodyErrorResponse,
|
|
13
|
-
deleteRequestContext,
|
|
14
|
-
getRequestContext,
|
|
15
|
-
getRequestContextSnapshot,
|
|
16
|
-
hasRequestContext,
|
|
17
|
-
readNodeRequestBody,
|
|
18
|
-
resolveFarmServerConfig,
|
|
19
|
-
setRequestContext
|
|
20
|
-
} from "./chunk-ZMMBIVQM.mjs";
|
|
13
|
+
toPublicValidationIssues
|
|
14
|
+
} from "./chunk-MGMF4VP7.mjs";
|
|
21
15
|
import {
|
|
22
16
|
applyWebResponseHeaders,
|
|
23
17
|
sendWebResponse
|
|
@@ -26,6 +20,21 @@ import {
|
|
|
26
20
|
createFarmAPIMiddlewarePathnames,
|
|
27
21
|
resolveFarmAPIServerBasePath
|
|
28
22
|
} from "./chunk-BTHHUD7Q.mjs";
|
|
23
|
+
import {
|
|
24
|
+
bufferFarmRequestBody,
|
|
25
|
+
createFarmRequestBodyErrorResponse,
|
|
26
|
+
readNodeRequestBody,
|
|
27
|
+
resolveFarmServerConfig,
|
|
28
|
+
withFarmRequestClientAddress
|
|
29
|
+
} from "./chunk-ZZGQD7A4.mjs";
|
|
30
|
+
import {
|
|
31
|
+
clearRequestContext,
|
|
32
|
+
deleteRequestContext,
|
|
33
|
+
getRequestContext,
|
|
34
|
+
getRequestContextSnapshot,
|
|
35
|
+
hasRequestContext,
|
|
36
|
+
setRequestContext
|
|
37
|
+
} from "./chunk-P7XDC7UJ.mjs";
|
|
29
38
|
import {
|
|
30
39
|
api,
|
|
31
40
|
defineIntegrationAPIOperation
|
|
@@ -53,20 +62,6 @@ import {
|
|
|
53
62
|
__name
|
|
54
63
|
} from "./chunk-LPEX4YW6.mjs";
|
|
55
64
|
|
|
56
|
-
// src/plugin-integration-context.ts
|
|
57
|
-
var FARM_PLUGIN_INTEGRATION_CONTEXT = /* @__PURE__ */ Symbol.for("@farm.js/core/plugin-integration-context");
|
|
58
|
-
function setFarmPluginIntegrationContext(plugin, integration) {
|
|
59
|
-
Object.defineProperty(plugin, FARM_PLUGIN_INTEGRATION_CONTEXT, {
|
|
60
|
-
value: integration
|
|
61
|
-
});
|
|
62
|
-
}
|
|
63
|
-
__name(setFarmPluginIntegrationContext, "setFarmPluginIntegrationContext");
|
|
64
|
-
function getFarmPluginIntegrationContext(plugin) {
|
|
65
|
-
const value = plugin[FARM_PLUGIN_INTEGRATION_CONTEXT];
|
|
66
|
-
return value && typeof value === "object" ? value : void 0;
|
|
67
|
-
}
|
|
68
|
-
__name(getFarmPluginIntegrationContext, "getFarmPluginIntegrationContext");
|
|
69
|
-
|
|
70
65
|
// src/integrations.ts
|
|
71
66
|
var FARM_INTEGRATION_INTERNAL_DISPATCH_CONTEXT_KEY = "farm.integration.internalDispatch";
|
|
72
67
|
var FARM_INTEGRATION_SET_COOKIES_KEY = "farm:integration:set-cookies";
|
|
@@ -863,7 +858,11 @@ function createIntegrationPlugin(integrationKey, integration) {
|
|
|
863
858
|
}, "getRequestBody");
|
|
864
859
|
const createHandlerRequest = /* @__PURE__ */ __name(async () => {
|
|
865
860
|
try {
|
|
866
|
-
return
|
|
861
|
+
return withFarmRequestClientAddress(
|
|
862
|
+
createWebRequest(req, fullUrl, await getRequestBody()),
|
|
863
|
+
resolveFarmServerConfig(context.config.server).trustProxy,
|
|
864
|
+
req.socket?.remoteAddress
|
|
865
|
+
);
|
|
867
866
|
} catch (error) {
|
|
868
867
|
const response = createFarmRequestBodyErrorResponse(error);
|
|
869
868
|
if (!response) throw error;
|
|
@@ -1353,18 +1352,13 @@ function createIntegrationValidationResponse(issues) {
|
|
|
1353
1352
|
__name(createIntegrationValidationResponse, "createIntegrationValidationResponse");
|
|
1354
1353
|
function normalizeIntegrationValidationIssues(source, error) {
|
|
1355
1354
|
if (Array.isArray(error.issues) && error.issues.length > 0) {
|
|
1356
|
-
return error.
|
|
1357
|
-
source,
|
|
1358
|
-
path: normalizeIntegrationValidationPath(issue.path),
|
|
1359
|
-
code: issue.code,
|
|
1360
|
-
message: issue.message || "Invalid input"
|
|
1361
|
-
}));
|
|
1355
|
+
return toPublicValidationIssues(error).map((issue) => ({ source, ...issue }));
|
|
1362
1356
|
}
|
|
1363
1357
|
return [
|
|
1364
1358
|
{
|
|
1365
1359
|
source,
|
|
1366
1360
|
path: [],
|
|
1367
|
-
message:
|
|
1361
|
+
message: "Invalid input"
|
|
1368
1362
|
}
|
|
1369
1363
|
];
|
|
1370
1364
|
}
|
|
@@ -1441,7 +1435,7 @@ function createIntegrationRouteArgs(input) {
|
|
|
1441
1435
|
`Integration "${input.integration.type}" does not define a schema for ctx.args.db.`
|
|
1442
1436
|
);
|
|
1443
1437
|
}
|
|
1444
|
-
ormPromise ?? (ormPromise = import("./integration-orm-
|
|
1438
|
+
ormPromise ?? (ormPromise = import("./integration-orm-RBKCIQYZ.mjs").then(
|
|
1445
1439
|
({ createIntegrationOrm }) => createIntegrationOrm({
|
|
1446
1440
|
schema: input.integration.schema,
|
|
1447
1441
|
config: input.config
|
|
@@ -1571,16 +1565,15 @@ function createFormInput(formData) {
|
|
|
1571
1565
|
}
|
|
1572
1566
|
__name(createFormInput, "createFormInput");
|
|
1573
1567
|
async function dispatchIntegrationRequest(runtime, request, options = {}) {
|
|
1568
|
+
const serverConfig = resolveFarmServerConfig(runtime.config.server);
|
|
1574
1569
|
try {
|
|
1575
|
-
request = await bufferFarmRequestBody(
|
|
1576
|
-
request,
|
|
1577
|
-
resolveFarmServerConfig(runtime.config.server).bodySizeLimit
|
|
1578
|
-
);
|
|
1570
|
+
request = await bufferFarmRequestBody(request, serverConfig.bodySizeLimit);
|
|
1579
1571
|
} catch (error) {
|
|
1580
1572
|
const response = createFarmRequestBodyErrorResponse(error);
|
|
1581
1573
|
if (response) return response;
|
|
1582
1574
|
throw error;
|
|
1583
1575
|
}
|
|
1576
|
+
request = withFarmRequestClientAddress(request, serverConfig.trustProxy, options.clientAddress);
|
|
1584
1577
|
const integration = runtime.integration;
|
|
1585
1578
|
const url = new URL(request.url);
|
|
1586
1579
|
const pathname = url.pathname;
|
|
@@ -1862,6 +1855,7 @@ async function dispatchIntegrationRequests(integrations, runtime, request, optio
|
|
|
1862
1855
|
{
|
|
1863
1856
|
currentRequest: options.currentRequest,
|
|
1864
1857
|
ranMiddleware: options.ranMiddleware,
|
|
1858
|
+
clientAddress: options.clientAddress,
|
|
1865
1859
|
onForwardedCookies: /* @__PURE__ */ __name((cookies) => setCookies.push(...cookies), "onForwardedCookies")
|
|
1866
1860
|
}
|
|
1867
1861
|
);
|
|
@@ -2184,7 +2178,6 @@ function normalizeMatcher(matcher) {
|
|
|
2184
2178
|
__name(normalizeMatcher, "normalizeMatcher");
|
|
2185
2179
|
|
|
2186
2180
|
export {
|
|
2187
|
-
getFarmPluginIntegrationContext,
|
|
2188
2181
|
FARM_INTEGRATION_INTERNAL_DISPATCH_CONTEXT_KEY,
|
|
2189
2182
|
FARM_INTEGRATION_SET_COOKIES_KEY,
|
|
2190
2183
|
forwardIntegrationSetCookies,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
emitFarmEvent
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-4GP3XZ4Z.mjs";
|
|
4
4
|
import {
|
|
5
5
|
getActiveFarmI18nSnapshot
|
|
6
6
|
} from "./chunk-C4NCTZLM.mjs";
|
|
@@ -15,6 +15,9 @@ import {
|
|
|
15
15
|
notifyFarmCacheTask,
|
|
16
16
|
subscribeFarmCacheInvalidation
|
|
17
17
|
} from "./chunk-4SIYUGRY.mjs";
|
|
18
|
+
import {
|
|
19
|
+
_runInSharedCacheScope
|
|
20
|
+
} from "./chunk-6LVRDOAW.mjs";
|
|
18
21
|
import {
|
|
19
22
|
__name
|
|
20
23
|
} from "./chunk-LPEX4YW6.mjs";
|
|
@@ -208,6 +211,7 @@ async function encodeStorageKeySegment(value) {
|
|
|
208
211
|
}
|
|
209
212
|
__name(encodeStorageKeySegment, "encodeStorageKeySegment");
|
|
210
213
|
var MIN_STALE_RETENTION_MS = 6e4;
|
|
214
|
+
var PPR_SHELL_ADAPTER_TTL_SECONDS = 86400;
|
|
211
215
|
function getFarmCacheEntryExpiresAt(createdAt, revalidate, now = Date.now()) {
|
|
212
216
|
if (typeof revalidate !== "number") return void 0;
|
|
213
217
|
const revalidateMs = revalidate * 1e3;
|
|
@@ -232,6 +236,8 @@ var _FarmDataCache = class _FarmDataCache {
|
|
|
232
236
|
this.namespace = "farm";
|
|
233
237
|
this.local = true;
|
|
234
238
|
this.maxEntries = 1024;
|
|
239
|
+
this.config = {};
|
|
240
|
+
this.isShellCache = false;
|
|
235
241
|
this.lease = {
|
|
236
242
|
enabled: true,
|
|
237
243
|
ttlMs: 1e4,
|
|
@@ -241,6 +247,8 @@ var _FarmDataCache = class _FarmDataCache {
|
|
|
241
247
|
this.configure(config);
|
|
242
248
|
}
|
|
243
249
|
configure(config = {}) {
|
|
250
|
+
this.config = config;
|
|
251
|
+
this.shells?.configure(config);
|
|
244
252
|
this.generation++;
|
|
245
253
|
this.entries.clear();
|
|
246
254
|
this.entriesByTag.clear();
|
|
@@ -267,6 +275,19 @@ var _FarmDataCache = class _FarmDataCache {
|
|
|
267
275
|
)
|
|
268
276
|
};
|
|
269
277
|
}
|
|
278
|
+
/**
|
|
279
|
+
* Where PPR shells live: the same adapter and namespace, so path and tag invalidation
|
|
280
|
+
* reaches them, but their own in-memory LRU of `maxEntries`.
|
|
281
|
+
* @internal
|
|
282
|
+
*/
|
|
283
|
+
get pprShellCache() {
|
|
284
|
+
if (this.isShellCache) return this;
|
|
285
|
+
if (!this.shells) {
|
|
286
|
+
this.shells = new _FarmDataCache(this.config);
|
|
287
|
+
this.shells.isShellCache = true;
|
|
288
|
+
}
|
|
289
|
+
return this.shells;
|
|
290
|
+
}
|
|
270
291
|
get adapterName() {
|
|
271
292
|
return this.adapter?.name || (this.adapter ? "custom" : "memory");
|
|
272
293
|
}
|
|
@@ -396,7 +417,7 @@ var _FarmDataCache = class _FarmDataCache {
|
|
|
396
417
|
const tags = normalizeCacheOptionsTags(options);
|
|
397
418
|
const capturedVersions = tagVersions ?? await this.getAdapterTagVersions(Array.from(tags.values()));
|
|
398
419
|
const createdAt = options.createdAt ?? Date.now();
|
|
399
|
-
const expiresAt = getFarmCacheEntryExpiresAt(createdAt, revalidate);
|
|
420
|
+
const expiresAt = getFarmCacheEntryExpiresAt(createdAt, revalidate) ?? (this.isShellCache && this.adapter ? createdAt + PPR_SHELL_ADAPTER_TTL_SECONDS * 1e3 : void 0);
|
|
400
421
|
const entry = {
|
|
401
422
|
key,
|
|
402
423
|
value,
|
|
@@ -435,6 +456,11 @@ var _FarmDataCache = class _FarmDataCache {
|
|
|
435
456
|
return this.adapter ? true : deleted;
|
|
436
457
|
}
|
|
437
458
|
clear() {
|
|
459
|
+
const count = this.entries.size + (this.shells?.resetLocal() ?? 0);
|
|
460
|
+
this.resetLocal();
|
|
461
|
+
emitFarmEvent({ type: "cache.clear", count });
|
|
462
|
+
}
|
|
463
|
+
resetLocal() {
|
|
438
464
|
const count = this.entries.size;
|
|
439
465
|
this.generation++;
|
|
440
466
|
this.entries.clear();
|
|
@@ -443,7 +469,7 @@ var _FarmDataCache = class _FarmDataCache {
|
|
|
443
469
|
this.invalidatedTagVersions.clear();
|
|
444
470
|
this.activeGenerations.clear();
|
|
445
471
|
this.version = 0;
|
|
446
|
-
|
|
472
|
+
return count;
|
|
447
473
|
}
|
|
448
474
|
async clearAsync() {
|
|
449
475
|
this.clear();
|
|
@@ -469,7 +495,7 @@ var _FarmDataCache = class _FarmDataCache {
|
|
|
469
495
|
}
|
|
470
496
|
revalidateTag(tag, options = {}) {
|
|
471
497
|
const normalized = normalizeCacheTag(tag);
|
|
472
|
-
const count = this.invalidateTag(normalized);
|
|
498
|
+
const count = this.invalidateTag(normalized) + (this.shells?.invalidateTag(normalized) ?? 0);
|
|
473
499
|
emitFarmEvent(
|
|
474
500
|
options.source === "updateTag" ? { type: "cache.updateTag", tag: normalized, count } : { type: "cache.revalidateTag", tag: normalized, profile: options.profile, count }
|
|
475
501
|
);
|
|
@@ -477,7 +503,7 @@ var _FarmDataCache = class _FarmDataCache {
|
|
|
477
503
|
}
|
|
478
504
|
async revalidateTagAsync(tag, options = {}) {
|
|
479
505
|
const normalized = normalizeCacheTag(tag);
|
|
480
|
-
const count = this.invalidateTag(normalized);
|
|
506
|
+
const count = this.invalidateTag(normalized) + (this.shells?.invalidateTag(normalized) ?? 0);
|
|
481
507
|
await this.adapter?.invalidateTags?.([this.createAdapterTag(normalized)]);
|
|
482
508
|
emitFarmEvent(
|
|
483
509
|
options.source === "updateTag" ? { type: "cache.updateTag", tag: normalized, count } : { type: "cache.revalidateTag", tag: normalized, profile: options.profile, count }
|
|
@@ -487,8 +513,8 @@ var _FarmDataCache = class _FarmDataCache {
|
|
|
487
513
|
revalidatePath(routePath) {
|
|
488
514
|
const normalizedPath = normalizeRevalidatePath(routePath);
|
|
489
515
|
const pathTag = createPathCacheTag(normalizedPath);
|
|
490
|
-
const pprCount = this.countEntriesForTags([pathTag, "ppr"]);
|
|
491
|
-
const count = this.invalidateTag(pathTag);
|
|
516
|
+
const pprCount = this.countEntriesForTags([pathTag, "ppr"]) + (this.shells?.countEntriesForTags([pathTag, "ppr"]) ?? 0);
|
|
517
|
+
const count = this.invalidateTag(pathTag) + (this.shells?.invalidateTag(pathTag) ?? 0);
|
|
492
518
|
emitFarmEvent({ type: "cache.revalidatePath", path: normalizedPath, count });
|
|
493
519
|
if (pprCount > 0) {
|
|
494
520
|
emitFarmEvent({
|
|
@@ -503,8 +529,8 @@ var _FarmDataCache = class _FarmDataCache {
|
|
|
503
529
|
async revalidatePathAsync(routePath) {
|
|
504
530
|
const normalizedPath = normalizeRevalidatePath(routePath);
|
|
505
531
|
const pathTag = createPathCacheTag(normalizedPath);
|
|
506
|
-
const pprCount = this.countEntriesForTags([pathTag, "ppr"]);
|
|
507
|
-
const count = this.invalidateTag(pathTag);
|
|
532
|
+
const pprCount = this.countEntriesForTags([pathTag, "ppr"]) + (this.shells?.countEntriesForTags([pathTag, "ppr"]) ?? 0);
|
|
533
|
+
const count = this.invalidateTag(pathTag) + (this.shells?.invalidateTag(pathTag) ?? 0);
|
|
508
534
|
await this.adapter?.invalidateTags?.([this.createAdapterTag(pathTag)]);
|
|
509
535
|
emitFarmEvent({ type: "cache.revalidatePath", path: normalizedPath, count });
|
|
510
536
|
if (pprCount > 0) {
|
|
@@ -785,7 +811,11 @@ function unstable_cache(fn, keyParts = [], options = {}) {
|
|
|
785
811
|
keyParts,
|
|
786
812
|
args
|
|
787
813
|
]);
|
|
788
|
-
return getFarmDataCache().getOrSet(
|
|
814
|
+
return getFarmDataCache().getOrSet(
|
|
815
|
+
key,
|
|
816
|
+
() => _runInSharedCacheScope("unstable_cache()", () => fn(...args)),
|
|
817
|
+
options
|
|
818
|
+
);
|
|
789
819
|
};
|
|
790
820
|
}
|
|
791
821
|
__name(unstable_cache, "unstable_cache");
|
|
@@ -986,6 +1016,7 @@ export {
|
|
|
986
1016
|
createFarmCacheInvalidationStream,
|
|
987
1017
|
defineCacheKey,
|
|
988
1018
|
storageCacheAdapter,
|
|
1019
|
+
PPR_SHELL_ADAPTER_TTL_SECONDS,
|
|
989
1020
|
FarmDataCache,
|
|
990
1021
|
getFarmDataCache,
|
|
991
1022
|
configureFarmCache,
|