@farm.js/core 0.1.38 → 0.1.40
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-BwKlpnc7.d.mts → agent-mcp-DRlXq3lM.d.ts} +1 -1
- package/dist/{agent-mcp-De1imoMS.d.ts → agent-mcp-XNF4JqHw.d.mts} +1 -1
- 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 +5 -7
- package/dist/agent-runtime.d.ts +5 -7
- 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 +7 -9
- package/dist/api/route-manager.d.ts +7 -9
- package/dist/api/route-manager.mjs +14 -12
- package/dist/api/runtime.cjs +12 -10
- package/dist/api/runtime.d.mts +6 -8
- package/dist/api/runtime.d.ts +6 -8
- 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 +9 -11
- package/dist/api.d.ts +9 -11
- package/dist/api.mjs +16 -14
- package/dist/{app-kT_QXTdx.d.ts → app-CDJHPqZn.d.ts} +11 -4
- package/dist/{app-CFZt-srr.d.mts → app-CWjCklhF.d.mts} +11 -4
- package/dist/app-markdown.cjs +7 -6
- package/dist/app-markdown.d.mts +6 -8
- package/dist/app-markdown.d.ts +6 -8
- 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-3UEVPCGW.mjs → chunk-2DMWQWNJ.mjs} +6 -1
- package/dist/{chunk-ZXH4TS3F.cjs → chunk-2JG2LJDI.cjs} +3 -64
- package/dist/{chunk-QTXBII4Z.cjs → chunk-3TB5QGUW.cjs} +5 -5
- package/dist/chunk-45QJHGZM.cjs +1063 -0
- package/dist/{chunk-JCKYH4LG.mjs → chunk-45UZKX2J.mjs} +12 -44
- package/dist/{chunk-FUCSUGDM.cjs → chunk-4A3YUB4D.cjs} +3 -3
- package/dist/{chunk-FUZEBRP3.mjs → chunk-4GP3XZ4Z.mjs} +5 -3
- package/dist/chunk-4TLUFAIP.cjs +92 -0
- package/dist/chunk-4U5XZDLG.cjs +80 -0
- package/dist/{chunk-VXEEATVD.cjs → chunk-4XO5GSD6.cjs} +2 -2
- package/dist/{chunk-P664ZVTV.mjs → chunk-4ZZNPK25.mjs} +2 -2
- package/dist/{chunk-TGFQVLLF.cjs → chunk-54QWHSNR.cjs} +697 -422
- package/dist/{chunk-W36M2BQ4.mjs → chunk-5E65AL7P.mjs} +3 -3
- package/dist/{chunk-3LOLJTFV.cjs → chunk-5JEC43MQ.cjs} +11 -11
- package/dist/{chunk-INL3THCU.mjs → chunk-5LL6TKII.mjs} +1 -1
- package/dist/{chunk-KIIMAWOJ.cjs → chunk-5NAVKJCZ.cjs} +35 -105
- package/dist/{chunk-PGZDEPTM.cjs → chunk-5XS5NCVM.cjs} +10 -10
- package/dist/{chunk-HXRYZWTA.mjs → chunk-62DY5GKS.mjs} +3 -3
- 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-EIPC3FDA.cjs → chunk-6ILGLCXF.cjs} +9 -5
- package/dist/chunk-6QOLZITB.cjs +22 -0
- package/dist/{chunk-CXEN47J3.mjs → chunk-73WX6PRY.mjs} +25 -0
- package/dist/{chunk-RW63BOV7.cjs → chunk-7FHZ3E6D.cjs} +2 -2
- package/dist/chunk-7GNWGLWB.mjs +14 -0
- package/dist/{chunk-34UCJRQO.cjs → chunk-7RNAKBWF.cjs} +2 -2
- package/dist/{chunk-MSSFIQGM.mjs → chunk-7VAJSSPG.mjs} +41 -10
- package/dist/{chunk-KHKLMNI5.mjs → chunk-ACLPN56I.mjs} +43 -25
- package/dist/{chunk-JCYYXBAJ.cjs → chunk-AGR7F3LA.cjs} +3 -3
- package/dist/{chunk-4GWRFP22.cjs → chunk-ALPWLT27.cjs} +35 -3
- package/dist/{chunk-IBUQWVYA.mjs → chunk-AX7S67YV.mjs} +43 -40
- package/dist/{chunk-CUM5NYL5.mjs → chunk-AXB5P7BK.mjs} +1 -1
- package/dist/{chunk-2ZYGC6SS.cjs → chunk-B6IMBBOS.cjs} +3 -3
- package/dist/{chunk-472NCAZ7.cjs → chunk-B77AUCBV.cjs} +3 -3
- package/dist/{chunk-FWE7LEQC.cjs → chunk-BD3D7EZV.cjs} +4 -4
- package/dist/{chunk-H5CLOUZS.cjs → chunk-BMOBTMDR.cjs} +5 -5
- package/dist/{chunk-CQMVIOYP.mjs → chunk-BPGO2IEP.mjs} +7 -7
- 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-IWZKTWHZ.cjs → chunk-CA62IQY3.cjs} +7 -2
- 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-TYMMBFN2.mjs → chunk-CKFK3Z2V.mjs} +1 -1
- 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-ULASELLA.cjs → chunk-DATEWH3W.cjs} +13 -1
- package/dist/{chunk-KKSTAEMY.cjs → chunk-DKU6NXRK.cjs} +1 -1
- package/dist/{chunk-NBBEQLOK.cjs → chunk-E55H6UKH.cjs} +9 -9
- package/dist/{chunk-YR2VBEMO.cjs → chunk-EGCT3AHF.cjs} +1455 -8187
- package/dist/{chunk-SDOTRX3V.cjs → chunk-EORXKFLR.cjs} +7 -7
- package/dist/{chunk-HD5CF3OE.mjs → chunk-ETPEZLS3.mjs} +2 -2
- package/dist/{chunk-2DD4JMQC.cjs → chunk-EW4MEVLE.cjs} +30 -30
- package/dist/{chunk-TUBTR2OP.mjs → chunk-FCOLU5P6.mjs} +1173 -7905
- package/dist/chunk-FGH3ZXTP.mjs +1063 -0
- package/dist/{chunk-Q3NXS4MU.cjs → chunk-FLZ4H25A.cjs} +44 -32
- package/dist/chunk-FVPXT2JR.cjs +63 -0
- package/dist/{chunk-D2ULAULS.cjs → chunk-FXFKIJDA.cjs} +9 -7
- package/dist/chunk-GC3EM6H4.mjs +80 -0
- package/dist/chunk-GKQL726H.cjs +6096 -0
- package/dist/{chunk-5PWXMJOH.cjs → chunk-GNVEJUT5.cjs} +36 -36
- 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-KCQBAKIY.cjs → chunk-H44XGLFU.cjs} +36 -68
- package/dist/{chunk-LI2F57NI.mjs → chunk-H56MQYEG.mjs} +1 -1
- package/dist/chunk-HANGSYMB.mjs +67 -0
- package/dist/{chunk-5BWWFHR2.mjs → chunk-HBEBV7OZ.mjs} +3 -3
- package/dist/{chunk-RSOJ7DRT.mjs → chunk-HCSVR4YZ.mjs} +1 -58
- package/dist/{chunk-HZFM2LWQ.mjs → chunk-HKFBMHCD.mjs} +34 -2
- package/dist/{chunk-MLY2RP5R.mjs → chunk-I63UCMXW.mjs} +6 -2
- package/dist/{chunk-TO4GJ56K.cjs → chunk-I64GEPOB.cjs} +58 -18
- package/dist/{chunk-VNGH5MLF.mjs → chunk-I6UVKUYK.mjs} +1 -1
- package/dist/{chunk-EPYU2EBL.mjs → chunk-IF4NU2NG.mjs} +1 -1
- package/dist/{chunk-IVLZZZEI.mjs → chunk-IM7DY3ED.mjs} +1 -1
- package/dist/{chunk-A3EAIURZ.mjs → chunk-IMQO6ZUU.mjs} +2 -2
- package/dist/{chunk-F5QO4FNE.mjs → chunk-INQ64HTJ.mjs} +43 -11
- package/dist/{chunk-XKVVMZP5.cjs → chunk-IRYK4Z5M.cjs} +4 -4
- package/dist/{chunk-UWPLULNK.mjs → chunk-JGHCKIRI.mjs} +84 -24
- package/dist/{chunk-7FPTZLKH.mjs → chunk-JIYYX7WU.mjs} +10 -8
- package/dist/{chunk-6MVFL3R5.cjs → chunk-JR4QCLJY.cjs} +1 -58
- package/dist/{chunk-Q2KB32T4.mjs → chunk-JXB6DVCO.mjs} +5 -5
- package/dist/{chunk-CGBDNNSM.cjs → chunk-KEXK442I.cjs} +44 -12
- package/dist/{chunk-5D2JIPLH.cjs → chunk-KK22JPQM.cjs} +10 -10
- package/dist/{chunk-EA5K5BKU.mjs → chunk-KNHBTJP6.mjs} +18 -1
- package/dist/{chunk-MVL2RAJW.mjs → chunk-KYN5ODF6.mjs} +1 -1
- package/dist/{chunk-TYJALEHQ.cjs → chunk-LDPKAYVS.cjs} +16 -16
- package/dist/chunk-LFHCG2DU.mjs +43 -0
- package/dist/{chunk-EK4QAEFZ.cjs → chunk-LZESP4IR.cjs} +25 -0
- package/dist/{chunk-FZ6YYU2W.mjs → chunk-MGMF4VP7.mjs} +38 -1
- package/dist/{chunk-EKF7KDFD.mjs → chunk-MNUSIXGS.mjs} +2 -2
- package/dist/{chunk-MYIZXDZA.mjs → chunk-MOSYH4CY.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-7PEP3BUT.mjs → chunk-OLQ73ZO5.mjs} +2 -2
- package/dist/{chunk-5OKBARDN.cjs → chunk-OZN4XL6L.cjs} +10 -10
- package/dist/{chunk-T5OJPTVN.cjs → chunk-P4TYB4SF.cjs} +2 -2
- package/dist/chunk-P7XDC7UJ.mjs +92 -0
- package/dist/{chunk-4E5QXOCL.cjs → chunk-PGW7HZE2.cjs} +6 -6
- package/dist/{chunk-SHLXACIO.cjs → chunk-PJ42JESY.cjs} +1 -9
- package/dist/{chunk-U6QLDL3G.mjs → chunk-PNCM5MFD.mjs} +1 -1
- package/dist/{chunk-OAHTRMIC.mjs → chunk-PYQ3ZG4Z.mjs} +11 -11
- package/dist/{chunk-KMTGADN3.mjs → chunk-QCVIRVHE.mjs} +1 -9
- package/dist/{chunk-RWFLWR5J.cjs → chunk-QJM7A4CR.cjs} +17 -15
- package/dist/{chunk-VU6AAZVY.cjs → chunk-RHGK2JEN.cjs} +65 -62
- package/dist/{chunk-QV4VE2OW.mjs → chunk-S6ENKNNG.mjs} +5 -3
- package/dist/{chunk-EMO6K4YY.cjs → chunk-SHFXCE5A.cjs} +7 -7
- package/dist/{chunk-EKN7NSZO.cjs → chunk-SZLNU3GJ.cjs} +8 -5
- package/dist/{chunk-WLL43JMO.mjs → chunk-T36UJS3X.mjs} +7 -5
- package/dist/{chunk-CNNOLE4O.mjs → chunk-T4II4MMW.mjs} +1 -1
- package/dist/{chunk-B6G5CKMC.mjs → chunk-T6DLMX5V.mjs} +11 -11
- package/dist/{chunk-4IE345DM.cjs → chunk-TAKG7ZCD.cjs} +14 -14
- package/dist/{chunk-SKVTP5PR.mjs → chunk-TFX4RTH2.mjs} +1 -62
- package/dist/chunk-TI7UANHI.cjs +77 -0
- package/dist/{chunk-ND2CWPOD.mjs → chunk-TS4JHGUJ.mjs} +1 -1
- package/dist/{chunk-6BK3K2GB.mjs → chunk-UIDWEU7M.mjs} +83 -44
- package/dist/{chunk-DRLKAXDM.mjs → chunk-UM3ZV5EP.mjs} +2 -2
- package/dist/{chunk-YWN746US.cjs → chunk-UMQAK3KP.cjs} +85 -54
- package/dist/chunk-UNJZGVPU.cjs +6 -0
- package/dist/{chunk-XKG2BLFN.cjs → chunk-UXMIFB44.cjs} +18 -35
- package/dist/{chunk-DMEPTZTI.mjs → chunk-VBN3UAPQ.mjs} +47 -7
- package/dist/chunk-VDRM36QB.cjs +963 -0
- 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-WCWV25PG.mjs} +10 -27
- package/dist/{chunk-ZMSZZXOR.mjs → chunk-WDMIW6Q6.mjs} +0 -19
- package/dist/{chunk-4WVJLURN.mjs → chunk-WMHG64DA.mjs} +1 -1
- package/dist/{chunk-L4DD7ODZ.cjs → chunk-WSOBCAYO.cjs} +37 -35
- package/dist/{chunk-ARC7I3O2.mjs → chunk-WW374SGU.mjs} +1 -1
- package/dist/{chunk-J63ZH5OQ.cjs → chunk-X3GMHKO3.cjs} +2 -2
- package/dist/{chunk-VT4WFRHA.mjs → chunk-XJAEZCT6.mjs} +1 -1
- package/dist/{chunk-OCIEZME4.mjs → chunk-XKIUHXHW.mjs} +618 -343
- package/dist/{chunk-6XWDE2P2.cjs → chunk-XVIEGKTT.cjs} +30 -5
- package/dist/{chunk-N32CC42M.cjs → chunk-Y2GNNXGV.cjs} +72 -54
- package/dist/{chunk-ZJD2PN6Z.mjs → chunk-Y4QVEU67.mjs} +30 -18
- package/dist/chunk-Y5RG6B7S.mjs +77 -0
- package/dist/{chunk-QRKIMN7T.mjs → chunk-Y6LRPO2K.mjs} +13 -1
- package/dist/{chunk-BZHXGVMA.mjs → chunk-YJBWB6GF.mjs} +5 -3
- package/dist/{chunk-WXJLNP33.cjs → chunk-YR2P74F7.cjs} +9 -7
- package/dist/chunk-YZAKIXRL.cjs +67 -0
- package/dist/chunk-ZKVJYQPO.mjs +6095 -0
- package/dist/{chunk-POSPE3IO.mjs → chunk-ZOABCQGT.mjs} +27 -2
- package/dist/chunk-ZQRCSUSB.cjs +25 -0
- package/dist/{chunk-ZMMBIVQM.mjs → chunk-ZZGQD7A4.mjs} +16 -86
- package/dist/{client-plugins-DUrIYX9B.d.mts → client-plugins-B_5QbNrp.d.mts} +2551 -2653
- package/dist/{client-plugins-BvlNhGEB.d.ts → client-plugins-DgSfIWIF.d.ts} +2551 -2653
- package/dist/client-plugins.d.mts +5 -7
- package/dist/client-plugins.d.ts +5 -7
- package/dist/client.cjs +7 -7
- package/dist/client.d.mts +11 -12
- package/dist/client.d.ts +11 -12
- package/dist/client.mjs +6 -6
- package/dist/config.d.mts +5 -7
- package/dist/config.d.ts +5 -7
- package/dist/{devtools-VQWJANJV.cjs → devtools-ANJ7JAPQ.cjs} +21 -18
- package/dist/{devtools-JYJNOLPQ.mjs → devtools-VEQQDVHE.mjs} +20 -17
- package/dist/docs.cjs +23 -20
- package/dist/docs.d.mts +6 -8
- package/dist/docs.d.ts +6 -8
- 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 +9 -1
- package/dist/image/server.d.ts +9 -1
- package/dist/image/server.mjs +6 -2
- package/dist/image/sharp.cjs +12 -10
- package/dist/image/sharp.mjs +4 -2
- package/dist/index.cjs +89 -69
- package/dist/index.d.mts +27 -24
- package/dist/index.d.ts +27 -24
- package/dist/index.mjs +102 -82
- 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 +7 -9
- package/dist/integrations.d.ts +7 -9
- package/dist/integrations.mjs +6 -4
- package/dist/internal/app-markdown-runtime.cjs +6 -5
- package/dist/internal/app-markdown-runtime.d.mts +6 -8
- package/dist/internal/app-markdown-runtime.d.ts +6 -8
- package/dist/internal/app-markdown-runtime.mjs +5 -4
- package/dist/internal/build-runtime.cjs +57 -56
- package/dist/internal/build-runtime.d.mts +7 -9
- package/dist/internal/build-runtime.d.ts +7 -9
- package/dist/internal/build-runtime.mjs +56 -55
- package/dist/internal/cli-runtime.cjs +36 -30
- package/dist/internal/cli-runtime.mjs +36 -30
- 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 +5 -7
- package/dist/internal/compression-runtime.d.ts +5 -7
- package/dist/internal/config-runtime.cjs +21 -18
- package/dist/internal/config-runtime.d.mts +6 -8
- package/dist/internal/config-runtime.d.ts +6 -8
- 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 +47 -28
- package/dist/internal/production-runtime.d.mts +25 -14
- package/dist/internal/production-runtime.d.ts +25 -14
- package/dist/internal/production-runtime.mjs +50 -31
- 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 +5 -7
- package/dist/markdown.d.ts +5 -7
- package/dist/markdown.mjs +3 -3
- package/dist/middleware.cjs +16 -10
- package/dist/middleware.d.mts +7 -9
- package/dist/middleware.d.ts +7 -9
- package/dist/middleware.mjs +19 -13
- package/dist/navigation.cjs +6 -6
- package/dist/navigation.d.mts +8 -9
- package/dist/navigation.d.ts +8 -9
- package/dist/navigation.mjs +5 -5
- package/dist/{nitro-MPZJGPXK.mjs → nitro-NFG2LBRC.mjs} +3 -2
- package/dist/{nitro-7F65EZZS.cjs → nitro-S2QABUFA.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 +23 -7
- package/dist/plugin.d.ts +23 -7
- package/dist/plugin.mjs +57 -44
- package/dist/{production-runtime-D2aMyzjr.d.ts → production-runtime-DfknD3g_.d.ts} +17 -3
- package/dist/{production-runtime-BQ4_WLwQ.d.mts → production-runtime-j_WCfuwB.d.mts} +17 -3
- package/dist/programmatic-routes-client-DcoxEaLe.d.mts +55 -0
- package/dist/programmatic-routes-client-DcoxEaLe.d.ts +55 -0
- package/dist/query/client.cjs +8 -8
- package/dist/query/client.mjs +3 -3
- package/dist/{render-plan-25p4hrj4.d.ts → render-plan-CFIhcYYS.d.ts} +1 -1
- package/dist/{render-plan-DtkXMN8D.d.mts → render-plan-ChUtsymc.d.mts} +1 -1
- package/dist/renderer-client.cjs +5 -5
- package/dist/renderer-client.d.mts +7 -8
- package/dist/renderer-client.d.ts +7 -8
- package/dist/renderer-client.mjs +2 -2
- package/dist/{request-DgCkIdcn.d.mts → request-F4HRwzSd.d.mts} +1 -1
- package/dist/{request-jF4jwx8f.d.ts → request-RJvelT8L.d.ts} +1 -1
- package/dist/request.cjs +3 -3
- package/dist/request.d.mts +6 -8
- package/dist/request.d.ts +6 -8
- package/dist/request.mjs +2 -2
- package/dist/{route-rendering-Bji6S6a_.d.ts → route-rendering-3a4fbNyC.d.mts} +1 -1
- package/dist/{route-rendering-CSBF78Ya.d.mts → route-rendering-D4coJ-kw.d.ts} +1 -1
- package/dist/{router-B09Ui3Qm.d.mts → router-DqIssGRO.d.mts} +1 -1
- package/dist/{router-CPB9cXtG.d.ts → router-WLEW3Te1.d.ts} +1 -1
- package/dist/routes.cjs +6 -5
- package/dist/routes.d.mts +5 -7
- package/dist/routes.d.ts +5 -7
- package/dist/routes.mjs +5 -4
- package/dist/{runtime-EDMwLdjv.d.ts → runtime-BrNdLOq9.d.ts} +3 -3
- package/dist/{runtime-CM6E6yuI.d.mts → runtime-CmE_j-js.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 +6 -8
- package/dist/server-plugins.d.ts +6 -8
- 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 +16 -12
- package/dist/server.d.ts +16 -12
- package/dist/server.mjs +82 -58
- package/dist/{spa-router-Cgimzfbi.d.mts → spa-router-C41zjnFl.d.mts} +2 -2
- package/dist/{spa-router-B_N8XgVu.d.ts → spa-router-D_0VXqPC.d.ts} +2 -2
- 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 +6 -8
- package/dist/testing.d.ts +6 -8
- package/dist/testing.mjs +16 -14
- package/dist/theme/server.cjs +4 -4
- package/dist/theme/server.mjs +3 -3
- package/dist/{utils-DZciYXYl.d.mts → utils-BKWSe3S7.d.mts} +1 -1
- package/dist/{utils-BNxAKAuT.d.ts → utils-YYcWsOJp.d.ts} +1 -1
- package/dist/version.cjs +2 -2
- package/dist/version.mjs +1 -1
- package/dist/vite.cjs +58 -45
- package/dist/vite.d.mts +92 -10
- package/dist/vite.d.ts +92 -10
- package/dist/vite.mjs +59 -46
- 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 +2 -1
- package/dist/chunk-3SDFA7UF.cjs +0 -701
- package/dist/chunk-E5GNDG5F.mjs +0 -701
- package/dist/integration-orm-55F7CII5.cjs +0 -13
|
@@ -7,13 +7,13 @@ var _chunkSU7MH53Pcjs = require('./chunk-SU7MH53P.cjs');
|
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
|
|
10
|
-
var
|
|
10
|
+
var _chunkBD3D7EZVcjs = require('./chunk-BD3D7EZV.cjs');
|
|
11
11
|
|
|
12
12
|
|
|
13
13
|
var _chunkS6FJO323cjs = require('./chunk-S6FJO323.cjs');
|
|
14
14
|
|
|
15
15
|
|
|
16
|
-
var
|
|
16
|
+
var _chunkDATEWH3Wcjs = require('./chunk-DATEWH3W.cjs');
|
|
17
17
|
|
|
18
18
|
|
|
19
19
|
var _chunkBIDYX3SLcjs = require('./chunk-BIDYX3SL.cjs');
|
|
@@ -52,7 +52,7 @@ _chunkS3JO3N4Hcjs.__name.call(void 0, shouldBlockUnload, "shouldBlockUnload");
|
|
|
52
52
|
function navigateViaRouter(href, basePath, replace, options = {}) {
|
|
53
53
|
if (typeof window === "undefined") return;
|
|
54
54
|
const url = _chunkI57LW5VZcjs.applyFarmBasePath.call(void 0, href, basePath);
|
|
55
|
-
const spaRouter =
|
|
55
|
+
const spaRouter = _chunkBD3D7EZVcjs.getInstalledFarmSPARouter.call(void 0, );
|
|
56
56
|
if (spaRouter) {
|
|
57
57
|
void spaRouter.navigate(url, {
|
|
58
58
|
replace,
|
|
@@ -65,7 +65,7 @@ function navigateViaRouter(href, basePath, replace, options = {}) {
|
|
|
65
65
|
} else {
|
|
66
66
|
window.history.pushState(null, "", url);
|
|
67
67
|
}
|
|
68
|
-
|
|
68
|
+
_chunkBD3D7EZVcjs.notifyHistoryChange.call(void 0, "url-search");
|
|
69
69
|
}
|
|
70
70
|
_chunkS3JO3N4Hcjs.__name.call(void 0, navigateViaRouter, "navigateViaRouter");
|
|
71
71
|
function useRouter(options = {}) {
|
|
@@ -85,7 +85,7 @@ function useRouter(options = {}) {
|
|
|
85
85
|
setState(readRouterState(basePath, routeMatcher));
|
|
86
86
|
}, "handlePopState");
|
|
87
87
|
handlePopState();
|
|
88
|
-
const unsubscribe =
|
|
88
|
+
const unsubscribe = _chunkBD3D7EZVcjs.subscribeHistoryChange.call(void 0, handlePopState);
|
|
89
89
|
return unsubscribe;
|
|
90
90
|
}, [basePath, routeMatcher]);
|
|
91
91
|
const push = /* @__PURE__ */ _chunkS3JO3N4Hcjs.__name.call(void 0, (href, navigateOptions) => {
|
|
@@ -96,11 +96,11 @@ function useRouter(options = {}) {
|
|
|
96
96
|
}, "replace");
|
|
97
97
|
const pushState = /* @__PURE__ */ _chunkS3JO3N4Hcjs.__name.call(void 0, (pageState, href) => {
|
|
98
98
|
if (typeof window === "undefined") return;
|
|
99
|
-
|
|
99
|
+
_chunkBD3D7EZVcjs.getRouter.call(void 0, ).pushState(pageState, resolveClientHref(href, basePath));
|
|
100
100
|
}, "pushState");
|
|
101
101
|
const replaceState = /* @__PURE__ */ _chunkS3JO3N4Hcjs.__name.call(void 0, (pageState, href) => {
|
|
102
102
|
if (typeof window === "undefined") return;
|
|
103
|
-
|
|
103
|
+
_chunkBD3D7EZVcjs.getRouter.call(void 0, ).replaceState(pageState, resolveClientHref(href, basePath));
|
|
104
104
|
}, "replaceState");
|
|
105
105
|
const back = /* @__PURE__ */ _chunkS3JO3N4Hcjs.__name.call(void 0, () => {
|
|
106
106
|
if (typeof window !== "undefined") {
|
|
@@ -124,25 +124,25 @@ function useRouter(options = {}) {
|
|
|
124
124
|
}
|
|
125
125
|
_chunkS3JO3N4Hcjs.__name.call(void 0, useRouter, "useRouter");
|
|
126
126
|
function usePageState() {
|
|
127
|
-
const [state, setState] = _react.useState.call(void 0, () =>
|
|
127
|
+
const [state, setState] = _react.useState.call(void 0, () => _chunkBD3D7EZVcjs.readPageState.call(void 0, ));
|
|
128
128
|
_react.useEffect.call(void 0, () => {
|
|
129
129
|
if (typeof window === "undefined") return;
|
|
130
130
|
const handlePopState = /* @__PURE__ */ _chunkS3JO3N4Hcjs.__name.call(void 0, () => {
|
|
131
|
-
setState(
|
|
131
|
+
setState(_chunkBD3D7EZVcjs.readPageState.call(void 0, ));
|
|
132
132
|
}, "handlePopState");
|
|
133
133
|
handlePopState();
|
|
134
|
-
return
|
|
134
|
+
return _chunkBD3D7EZVcjs.subscribeHistoryChange.call(void 0, handlePopState);
|
|
135
135
|
}, []);
|
|
136
136
|
return state;
|
|
137
137
|
}
|
|
138
138
|
_chunkS3JO3N4Hcjs.__name.call(void 0, usePageState, "usePageState");
|
|
139
139
|
function useNavigation() {
|
|
140
140
|
const [state, setState] = _react.useState.call(void 0,
|
|
141
|
-
() =>
|
|
141
|
+
() => _chunkBD3D7EZVcjs.getRouter.call(void 0, ).getNavigationState()
|
|
142
142
|
);
|
|
143
143
|
_react.useEffect.call(void 0, () => {
|
|
144
144
|
if (typeof window === "undefined") return;
|
|
145
|
-
return
|
|
145
|
+
return _chunkBD3D7EZVcjs.getRouter.call(void 0, ).subscribeNavigation(setState);
|
|
146
146
|
}, []);
|
|
147
147
|
return state;
|
|
148
148
|
}
|
|
@@ -155,7 +155,7 @@ function useBlocker(options) {
|
|
|
155
155
|
if (typeof window === "undefined" || !active) {
|
|
156
156
|
return;
|
|
157
157
|
}
|
|
158
|
-
return
|
|
158
|
+
return _chunkBD3D7EZVcjs.getRouter.call(void 0, ).addBlocker(
|
|
159
159
|
async (context) => {
|
|
160
160
|
const current = optionsRef.current;
|
|
161
161
|
const when = typeof current.when === "function" ? current.when(context) : current.when;
|
|
@@ -179,7 +179,7 @@ function useScrollRestoration(key) {
|
|
|
179
179
|
_react.useEffect.call(void 0, () => {
|
|
180
180
|
const element = ref.current;
|
|
181
181
|
if (!element) return;
|
|
182
|
-
return
|
|
182
|
+
return _chunkBD3D7EZVcjs.getRouter.call(void 0, ).registerScrollElement(key, element);
|
|
183
183
|
}, [key]);
|
|
184
184
|
return ref;
|
|
185
185
|
}
|
|
@@ -201,7 +201,7 @@ function readRouterState(basePath, routeMatcher) {
|
|
|
201
201
|
pathname,
|
|
202
202
|
searchParams: url.searchParams,
|
|
203
203
|
params: _optionalChain([routeMatcher, 'optionalAccess', _5 => _5.match, 'call', _6 => _6(routePathname), 'optionalAccess', _7 => _7.params]) || {},
|
|
204
|
-
pageState: typeof window === "undefined" ? null :
|
|
204
|
+
pageState: typeof window === "undefined" ? null : _chunkBD3D7EZVcjs.readPageState.call(void 0, )
|
|
205
205
|
};
|
|
206
206
|
}
|
|
207
207
|
_chunkS3JO3N4Hcjs.__name.call(void 0, readRouterState, "readRouterState");
|
|
@@ -213,7 +213,7 @@ function readCurrentUrl() {
|
|
|
213
213
|
return void 0;
|
|
214
214
|
}
|
|
215
215
|
}
|
|
216
|
-
const request =
|
|
216
|
+
const request = _chunkDATEWH3Wcjs._resolveCurrentRequest.call(void 0, );
|
|
217
217
|
if (!request) return void 0;
|
|
218
218
|
try {
|
|
219
219
|
return new URL(request.url);
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import {
|
|
2
|
+
isRouteSlotSegment,
|
|
3
|
+
parseInterceptionMarker
|
|
4
|
+
} from "./chunk-RHAZ22ZN.mjs";
|
|
5
|
+
import {
|
|
6
|
+
__name
|
|
7
|
+
} from "./chunk-LPEX4YW6.mjs";
|
|
8
|
+
|
|
9
|
+
// src/middleware/path.ts
|
|
10
|
+
function appendMiddlewareRoutePath(routePath, directoryName) {
|
|
11
|
+
const marker = parseInterceptionMarker(directoryName);
|
|
12
|
+
if (marker) {
|
|
13
|
+
const owner = routePath.split("/").filter(Boolean);
|
|
14
|
+
const parts = [
|
|
15
|
+
...marker.root ? [] : owner.slice(0, Math.max(0, owner.length - marker.up)),
|
|
16
|
+
...marker.remainder ? [marker.remainder] : []
|
|
17
|
+
];
|
|
18
|
+
return `/${parts.join("/")}`;
|
|
19
|
+
}
|
|
20
|
+
if (directoryName.startsWith("(") && directoryName.endsWith(")") || isRouteSlotSegment(directoryName)) {
|
|
21
|
+
return routePath;
|
|
22
|
+
}
|
|
23
|
+
return routePath === "/" ? `/${directoryName}` : `${routePath}/${directoryName}`;
|
|
24
|
+
}
|
|
25
|
+
__name(appendMiddlewareRoutePath, "appendMiddlewareRoutePath");
|
|
26
|
+
function appendMiddlewareDirectory(directory, directoryName) {
|
|
27
|
+
return directory === "" ? directoryName : `${directory}/${directoryName}`;
|
|
28
|
+
}
|
|
29
|
+
__name(appendMiddlewareDirectory, "appendMiddlewareDirectory");
|
|
30
|
+
function countSegments(value) {
|
|
31
|
+
return value.split("/").filter(Boolean).length;
|
|
32
|
+
}
|
|
33
|
+
__name(countSegments, "countSegments");
|
|
34
|
+
function compareMiddlewareRouteLocations(left, right) {
|
|
35
|
+
return countSegments(left.path) - countSegments(right.path) || left.path.localeCompare(right.path) || countSegments(left.directory) - countSegments(right.directory) || left.directory.localeCompare(right.directory);
|
|
36
|
+
}
|
|
37
|
+
__name(compareMiddlewareRouteLocations, "compareMiddlewareRouteLocations");
|
|
38
|
+
|
|
39
|
+
export {
|
|
40
|
+
appendMiddlewareRoutePath,
|
|
41
|
+
appendMiddlewareDirectory,
|
|
42
|
+
compareMiddlewareRouteLocations
|
|
43
|
+
};
|
|
@@ -304,6 +304,13 @@ function appendOpenGraph(tags, input, metadataBase, page) {
|
|
|
304
304
|
appendMetaProperty(tags, "og:image:alt", image.alt);
|
|
305
305
|
appendMetaProperty(tags, "og:image:type", image.type);
|
|
306
306
|
}
|
|
307
|
+
for (const video of normalizeMetadataVideos(openGraph.videos, metadataBase)) {
|
|
308
|
+
appendMetaProperty(tags, "og:video", video.url);
|
|
309
|
+
appendMetaProperty(tags, "og:video:secure_url", video.secureUrl);
|
|
310
|
+
appendMetaProperty(tags, "og:video:type", video.type);
|
|
311
|
+
appendMetaProperty(tags, "og:video:width", video.width);
|
|
312
|
+
appendMetaProperty(tags, "og:video:height", video.height);
|
|
313
|
+
}
|
|
307
314
|
if (openGraph.type === "article") {
|
|
308
315
|
appendMetaProperty(tags, "article:published_time", normalizeDate(openGraph.publishedTime));
|
|
309
316
|
appendMetaProperty(tags, "article:modified_time", normalizeDate(openGraph.modifiedTime));
|
|
@@ -432,6 +439,24 @@ function normalizeMetadataImages(value, metadataBase) {
|
|
|
432
439
|
}).filter((item) => item !== null);
|
|
433
440
|
}
|
|
434
441
|
_chunkS3JO3N4Hcjs.__name.call(void 0, normalizeMetadataImages, "normalizeMetadataImages");
|
|
442
|
+
function normalizeMetadataVideos(value, metadataBase) {
|
|
443
|
+
return normalizeArray(value).map((item) => {
|
|
444
|
+
if (typeof item === "string") {
|
|
445
|
+
return { url: resolveMetadataUrl(item, metadataBase) || item };
|
|
446
|
+
}
|
|
447
|
+
if (!isRecord(item)) return null;
|
|
448
|
+
const url = resolveMetadataUrl(item.url, metadataBase);
|
|
449
|
+
if (!url) return null;
|
|
450
|
+
return {
|
|
451
|
+
url,
|
|
452
|
+
secureUrl: resolveMetadataUrl(item.secureUrl, metadataBase) || void 0,
|
|
453
|
+
width: normalizeNumber(item.width),
|
|
454
|
+
height: normalizeNumber(item.height),
|
|
455
|
+
type: typeof item.type === "string" ? item.type : void 0
|
|
456
|
+
};
|
|
457
|
+
}).filter((item) => item !== null);
|
|
458
|
+
}
|
|
459
|
+
_chunkS3JO3N4Hcjs.__name.call(void 0, normalizeMetadataVideos, "normalizeMetadataVideos");
|
|
435
460
|
function normalizeArray(value) {
|
|
436
461
|
if (value == null) return [];
|
|
437
462
|
return Array.isArray(value) ? value : [value];
|
|
@@ -58,8 +58,45 @@ function describeIntegrationOriginRejection(reason) {
|
|
|
58
58
|
}
|
|
59
59
|
__name(describeIntegrationOriginRejection, "describeIntegrationOriginRejection");
|
|
60
60
|
|
|
61
|
+
// src/api/route-schema.ts
|
|
62
|
+
async function parseRouteSchema(schema, value) {
|
|
63
|
+
if (schema.parseAsync) return schema.parseAsync(value);
|
|
64
|
+
if (schema["~standard"]) {
|
|
65
|
+
const result = await schema["~standard"].validate(value);
|
|
66
|
+
if (result.issues)
|
|
67
|
+
throw Object.assign(new Error("Validation failed"), { issues: result.issues });
|
|
68
|
+
return result.value;
|
|
69
|
+
}
|
|
70
|
+
if (schema.parse) return schema.parse(value);
|
|
71
|
+
throw new TypeError("Route validators must implement Standard Schema or parse().");
|
|
72
|
+
}
|
|
73
|
+
__name(parseRouteSchema, "parseRouteSchema");
|
|
74
|
+
var PUBLIC_MESSAGE_CODES = /* @__PURE__ */ new Set(["custom", "invalid_type"]);
|
|
75
|
+
function toPublicValidationIssues(error) {
|
|
76
|
+
const issues = error?.issues;
|
|
77
|
+
const list = Array.isArray(issues) ? issues : Array.isArray(error?.errors) ? error.errors : [];
|
|
78
|
+
return list.map((issue) => {
|
|
79
|
+
const { path, code, message } = issue ?? {};
|
|
80
|
+
return {
|
|
81
|
+
path: Array.isArray(path) ? path.map(toPublicPathSegment) : [],
|
|
82
|
+
...typeof code === "string" ? { code } : {},
|
|
83
|
+
message: PUBLIC_MESSAGE_CODES.has(code) && typeof message === "string" && message ? message : "Invalid value"
|
|
84
|
+
};
|
|
85
|
+
});
|
|
86
|
+
}
|
|
87
|
+
__name(toPublicValidationIssues, "toPublicValidationIssues");
|
|
88
|
+
function toPublicPathSegment(segment) {
|
|
89
|
+
const key = segment && typeof segment === "object" && "key" in segment ? segment.key : segment;
|
|
90
|
+
if (typeof key === "number") return key;
|
|
91
|
+
if (typeof key === "symbol") return key.description || key.toString();
|
|
92
|
+
return String(key);
|
|
93
|
+
}
|
|
94
|
+
__name(toPublicPathSegment, "toPublicPathSegment");
|
|
95
|
+
|
|
61
96
|
export {
|
|
62
97
|
resolveIntegrationAllowedOrigins,
|
|
63
98
|
validateIntegrationRequestOrigin,
|
|
64
|
-
describeIntegrationOriginRejection
|
|
99
|
+
describeIntegrationOriginRejection,
|
|
100
|
+
parseRouteSchema,
|
|
101
|
+
toPublicValidationIssues
|
|
65
102
|
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
MiddlewareManager
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-45UZKX2J.mjs";
|
|
4
4
|
import {
|
|
5
5
|
matchesMiddlewarePredicate
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-HKFBMHCD.mjs";
|
|
7
7
|
import {
|
|
8
8
|
resolveFarmI18nConfig
|
|
9
9
|
} from "./chunk-BCMSYSN2.mjs";
|
|
@@ -5,66 +5,81 @@ var _chunkS3JO3N4Hcjs = require('./chunk-S3JO3N4H.cjs');
|
|
|
5
5
|
// src/storage/index.ts
|
|
6
6
|
var _unstorage = require('unstorage');
|
|
7
7
|
var _memory = require('unstorage/drivers/memory'); var _memory2 = _interopRequireDefault(_memory);
|
|
8
|
-
var
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
8
|
+
var STORAGE_MODULES_KEY = /* @__PURE__ */ Symbol.for("farmjs.storage.modules");
|
|
9
|
+
function getRegisteredStorageModules() {
|
|
10
|
+
return globalThis[STORAGE_MODULES_KEY];
|
|
11
|
+
}
|
|
12
|
+
_chunkS3JO3N4Hcjs.__name.call(void 0, getRegisteredStorageModules, "getRegisteredStorageModules");
|
|
13
|
+
var loadModule = /* @__PURE__ */ _chunkS3JO3N4Hcjs.__name.call(void 0, (specifier) => {
|
|
14
|
+
const registered = _optionalChain([getRegisteredStorageModules, 'call', _ => _(), 'optionalAccess', _2 => _2[specifier]]);
|
|
15
|
+
return registered ? registered() : import(
|
|
16
|
+
/* @vite-ignore */
|
|
17
|
+
specifier
|
|
18
|
+
);
|
|
19
|
+
}, "loadModule");
|
|
20
|
+
function _registerFarmStorageModules(loaders) {
|
|
21
|
+
globalThis[STORAGE_MODULES_KEY] = {
|
|
22
|
+
...getRegisteredStorageModules(),
|
|
23
|
+
...loaders
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
_chunkS3JO3N4Hcjs.__name.call(void 0, _registerFarmStorageModules, "_registerFarmStorageModules");
|
|
12
27
|
var DATABASE_CONNECTORS = {
|
|
13
28
|
sqlite: {
|
|
14
29
|
connector: "node-sqlite",
|
|
15
|
-
|
|
30
|
+
module: "db0/connectors/node-sqlite"
|
|
16
31
|
},
|
|
17
32
|
"node-sqlite": {
|
|
18
33
|
connector: "node-sqlite",
|
|
19
|
-
|
|
34
|
+
module: "db0/connectors/node-sqlite"
|
|
20
35
|
},
|
|
21
36
|
sqlite3: {
|
|
22
37
|
connector: "sqlite3",
|
|
23
|
-
|
|
38
|
+
module: "db0/connectors/sqlite3"
|
|
24
39
|
},
|
|
25
40
|
"better-sqlite3": {
|
|
26
41
|
connector: "better-sqlite3",
|
|
27
|
-
|
|
42
|
+
module: "db0/connectors/better-sqlite3"
|
|
28
43
|
},
|
|
29
44
|
postgres: {
|
|
30
45
|
connector: "postgresql",
|
|
31
|
-
|
|
46
|
+
module: "db0/connectors/postgresql"
|
|
32
47
|
},
|
|
33
48
|
postgresql: {
|
|
34
49
|
connector: "postgresql",
|
|
35
|
-
|
|
50
|
+
module: "db0/connectors/postgresql"
|
|
36
51
|
},
|
|
37
52
|
pg: {
|
|
38
53
|
connector: "postgresql",
|
|
39
|
-
|
|
54
|
+
module: "db0/connectors/postgresql"
|
|
40
55
|
},
|
|
41
56
|
mysql: {
|
|
42
57
|
connector: "mysql2",
|
|
43
|
-
|
|
58
|
+
module: "db0/connectors/mysql2"
|
|
44
59
|
},
|
|
45
60
|
mysql2: {
|
|
46
61
|
connector: "mysql2",
|
|
47
|
-
|
|
62
|
+
module: "db0/connectors/mysql2"
|
|
48
63
|
},
|
|
49
64
|
pglite: {
|
|
50
65
|
connector: "pglite",
|
|
51
|
-
|
|
66
|
+
module: "db0/connectors/pglite"
|
|
52
67
|
},
|
|
53
68
|
planetscale: {
|
|
54
69
|
connector: "planetscale",
|
|
55
|
-
|
|
70
|
+
module: "db0/connectors/planetscale"
|
|
56
71
|
},
|
|
57
72
|
libsql: {
|
|
58
73
|
connector: "libsql",
|
|
59
|
-
|
|
74
|
+
module: "db0/connectors/libsql/node"
|
|
60
75
|
},
|
|
61
76
|
"libsql-node": {
|
|
62
77
|
connector: "libsql-node",
|
|
63
|
-
|
|
78
|
+
module: "db0/connectors/libsql/node"
|
|
64
79
|
},
|
|
65
80
|
"libsql-http": {
|
|
66
81
|
connector: "libsql-http",
|
|
67
|
-
|
|
82
|
+
module: "db0/connectors/libsql/http"
|
|
68
83
|
}
|
|
69
84
|
};
|
|
70
85
|
function createMemoryStorage() {
|
|
@@ -133,6 +148,7 @@ function extractDriverOptions(config) {
|
|
|
133
148
|
}
|
|
134
149
|
_chunkS3JO3N4Hcjs.__name.call(void 0, extractDriverOptions, "extractDriverOptions");
|
|
135
150
|
async function loadBuiltinDriver(name, options) {
|
|
151
|
+
if (name === "memory") return _memory2.default.call(void 0, );
|
|
136
152
|
const modulePath = _unstorage.builtinDrivers[name];
|
|
137
153
|
if (!modulePath) {
|
|
138
154
|
throw new Error(`Unsupported storage driver "${name}".`);
|
|
@@ -145,7 +161,7 @@ async function loadDatabaseDriver(config) {
|
|
|
145
161
|
const connectorEntry = DATABASE_CONNECTORS[config.driver];
|
|
146
162
|
const [{ createDatabase }, connectorModule, db0DriverModule] = await Promise.all([
|
|
147
163
|
loadModule("db0"),
|
|
148
|
-
connectorEntry.
|
|
164
|
+
loadModule(connectorEntry.module),
|
|
149
165
|
loadModule("unstorage/drivers/db0")
|
|
150
166
|
]);
|
|
151
167
|
const database = createDatabase(connectorModule.default(extractDriverOptions(config) || {}));
|
|
@@ -165,7 +181,7 @@ async function resolveDriver(config) {
|
|
|
165
181
|
if (config && isStorageClient(config)) {
|
|
166
182
|
return config.resolveDriver();
|
|
167
183
|
}
|
|
168
|
-
const driverInput = _nullishCoalesce(_optionalChain([config, 'optionalAccess',
|
|
184
|
+
const driverInput = _nullishCoalesce(_optionalChain([config, 'optionalAccess', _3 => _3.driver]), () => ( "memory"));
|
|
169
185
|
if (typeof driverInput === "function") {
|
|
170
186
|
return await driverInput();
|
|
171
187
|
}
|
|
@@ -184,7 +200,8 @@ async function resolveDriver(config) {
|
|
|
184
200
|
);
|
|
185
201
|
}
|
|
186
202
|
_chunkS3JO3N4Hcjs.__name.call(void 0, resolveDriver, "resolveDriver");
|
|
187
|
-
|
|
203
|
+
var STORAGE_CLIENT_MODULES_KEY = /* @__PURE__ */ Symbol.for("farmjs.storage.clientModules");
|
|
204
|
+
function createStorageClientFromResolver(resolveDriver2, modules = []) {
|
|
188
205
|
let driverPromise;
|
|
189
206
|
let storagePromise;
|
|
190
207
|
const ensureDriver = /* @__PURE__ */ _chunkS3JO3N4Hcjs.__name.call(void 0, () => {
|
|
@@ -216,7 +233,8 @@ function createStorageClientFromResolver(resolveDriver2) {
|
|
|
216
233
|
kind: "farm-storage-client",
|
|
217
234
|
ready: ensureStorage,
|
|
218
235
|
createStorage: ensureStorage,
|
|
219
|
-
resolveDriver: ensureDriver
|
|
236
|
+
resolveDriver: ensureDriver,
|
|
237
|
+
[STORAGE_CLIENT_MODULES_KEY]: modules
|
|
220
238
|
};
|
|
221
239
|
return new Proxy(target, {
|
|
222
240
|
get(currentTarget, prop, receiver) {
|
|
@@ -249,7 +267,10 @@ function defineStorageClient(resolveDriver2) {
|
|
|
249
267
|
}
|
|
250
268
|
_chunkS3JO3N4Hcjs.__name.call(void 0, defineStorageClient, "defineStorageClient");
|
|
251
269
|
function createStorageClient(config) {
|
|
252
|
-
return
|
|
270
|
+
return createStorageClientFromResolver(
|
|
271
|
+
() => resolveDriver(config),
|
|
272
|
+
_collectFarmStorageModules(config)
|
|
273
|
+
);
|
|
253
274
|
}
|
|
254
275
|
_chunkS3JO3N4Hcjs.__name.call(void 0, createStorageClient, "createStorageClient");
|
|
255
276
|
function driverStorage(driver) {
|
|
@@ -257,14 +278,14 @@ function driverStorage(driver) {
|
|
|
257
278
|
}
|
|
258
279
|
_chunkS3JO3N4Hcjs.__name.call(void 0, driverStorage, "driverStorage");
|
|
259
280
|
function databaseStorage(database, options = {}) {
|
|
260
|
-
return
|
|
281
|
+
return createStorageClientFromResolver(async () => {
|
|
261
282
|
const db0DriverModule = await loadModule("unstorage/drivers/db0");
|
|
262
283
|
const { dispose: _dispose, ...driver } = db0DriverModule.default({
|
|
263
284
|
database,
|
|
264
285
|
tableName: options.tableName
|
|
265
286
|
});
|
|
266
287
|
return driver;
|
|
267
|
-
});
|
|
288
|
+
}, ["unstorage/drivers/db0"]);
|
|
268
289
|
}
|
|
269
290
|
_chunkS3JO3N4Hcjs.__name.call(void 0, databaseStorage, "databaseStorage");
|
|
270
291
|
function memoryStorage() {
|
|
@@ -377,6 +398,38 @@ function vercelBlobStorage(options) {
|
|
|
377
398
|
});
|
|
378
399
|
}
|
|
379
400
|
_chunkS3JO3N4Hcjs.__name.call(void 0, vercelBlobStorage, "vercelBlobStorage");
|
|
401
|
+
function collectDriverModules(config, modules) {
|
|
402
|
+
if (!config || typeof config !== "object") return;
|
|
403
|
+
if (isStorageClient(config)) {
|
|
404
|
+
const clientModules = config[STORAGE_CLIENT_MODULES_KEY];
|
|
405
|
+
if (Array.isArray(clientModules)) for (const module of clientModules) modules.add(module);
|
|
406
|
+
return;
|
|
407
|
+
}
|
|
408
|
+
if (isStorageInstance(config)) return;
|
|
409
|
+
const source = config;
|
|
410
|
+
const driver = source.driver;
|
|
411
|
+
if (typeof driver === "string") {
|
|
412
|
+
if (isDatabaseDriverName(driver)) {
|
|
413
|
+
modules.add("db0");
|
|
414
|
+
modules.add(DATABASE_CONNECTORS[driver].module);
|
|
415
|
+
modules.add("unstorage/drivers/db0");
|
|
416
|
+
} else if (driver !== "memory") {
|
|
417
|
+
const module = _unstorage.builtinDrivers[driver === "local" ? "fs-lite" : driver];
|
|
418
|
+
if (module) modules.add(module);
|
|
419
|
+
}
|
|
420
|
+
}
|
|
421
|
+
collectDriverModules(source.client, modules);
|
|
422
|
+
if (source.mounts && typeof source.mounts === "object") {
|
|
423
|
+
for (const mount of Object.values(source.mounts)) collectDriverModules(mount, modules);
|
|
424
|
+
}
|
|
425
|
+
}
|
|
426
|
+
_chunkS3JO3N4Hcjs.__name.call(void 0, collectDriverModules, "collectDriverModules");
|
|
427
|
+
function _collectFarmStorageModules(config) {
|
|
428
|
+
const modules = /* @__PURE__ */ new Set();
|
|
429
|
+
collectDriverModules(config, modules);
|
|
430
|
+
return [...modules];
|
|
431
|
+
}
|
|
432
|
+
_chunkS3JO3N4Hcjs.__name.call(void 0, _collectFarmStorageModules, "_collectFarmStorageModules");
|
|
380
433
|
async function mountNamespaces(storage, mounts) {
|
|
381
434
|
if (!mounts) {
|
|
382
435
|
return;
|
|
@@ -434,6 +487,11 @@ function getStorage(namespace) {
|
|
|
434
487
|
globalStorage = getActiveGlobalStorage();
|
|
435
488
|
const base = normalizeMountKey(namespace);
|
|
436
489
|
if (!base) {
|
|
490
|
+
if (namespace) {
|
|
491
|
+
throw new TypeError(
|
|
492
|
+
`getStorage(${JSON.stringify(namespace)}) names no namespace. Pass a non-empty name, or call getStorage() for the root store.`
|
|
493
|
+
);
|
|
494
|
+
}
|
|
437
495
|
return globalStorage;
|
|
438
496
|
}
|
|
439
497
|
const namespaced = _unstorage.prefixStorage.call(void 0, globalStorage, base);
|
|
@@ -517,4 +575,6 @@ _chunkS3JO3N4Hcjs.__name.call(void 0, disposeStorage, "disposeStorage");
|
|
|
517
575
|
|
|
518
576
|
|
|
519
577
|
|
|
520
|
-
|
|
578
|
+
|
|
579
|
+
|
|
580
|
+
exports._registerFarmStorageModules = _registerFarmStorageModules; exports.defineStorageClient = defineStorageClient; exports.createStorageClient = createStorageClient; exports.driverStorage = driverStorage; exports.databaseStorage = databaseStorage; exports.memoryStorage = memoryStorage; exports.localStorage = localStorage; exports.sqliteStorage = sqliteStorage; exports.mysqlStorage = mysqlStorage; exports.mysql2Storage = mysql2Storage; exports.postgresStorage = postgresStorage; exports.pgStorage = pgStorage; exports.pgliteStorage = pgliteStorage; exports.planetscaleStorage = planetscaleStorage; exports.libsqlStorage = libsqlStorage; exports.redisStorage = redisStorage; exports.s3Storage = s3Storage; exports.mongodbStorage = mongodbStorage; exports.upstashStorage = upstashStorage; exports.netlifyBlobsStorage = netlifyBlobsStorage; exports.vercelKVStorage = vercelKVStorage; exports.vercelBlobStorage = vercelBlobStorage; exports._collectFarmStorageModules = _collectFarmStorageModules; exports.createFarmStorage = createFarmStorage; exports.resolveStorageRuntimeClient = resolveStorageRuntimeClient; exports.initStorage = initStorage; exports.getStorage = getStorage; exports.disposeStorage = disposeStorage;
|
|
@@ -7,13 +7,13 @@ import {
|
|
|
7
7
|
notifyHistoryChange,
|
|
8
8
|
readPageState,
|
|
9
9
|
subscribeHistoryChange
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-TS4JHGUJ.mjs";
|
|
11
11
|
import {
|
|
12
12
|
getFarmI18nClientState
|
|
13
13
|
} from "./chunk-IHQIOZLC.mjs";
|
|
14
14
|
import {
|
|
15
15
|
_resolveCurrentRequest
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-Y6LRPO2K.mjs";
|
|
17
17
|
import {
|
|
18
18
|
stripFarmLocaleFromPathname
|
|
19
19
|
} from "./chunk-L3KT7IXV.mjs";
|
|
@@ -4,16 +4,16 @@
|
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
7
|
-
var
|
|
7
|
+
var _chunkP4TYB4SFcjs = require('./chunk-P4TYB4SF.cjs');
|
|
8
8
|
|
|
9
9
|
|
|
10
|
-
var
|
|
10
|
+
var _chunkUMQAK3KPcjs = require('./chunk-UMQAK3KP.cjs');
|
|
11
11
|
|
|
12
12
|
|
|
13
13
|
var _chunkOX6O6WVAcjs = require('./chunk-OX6O6WVA.cjs');
|
|
14
14
|
|
|
15
15
|
|
|
16
|
-
var
|
|
16
|
+
var _chunkDATEWH3Wcjs = require('./chunk-DATEWH3W.cjs');
|
|
17
17
|
|
|
18
18
|
|
|
19
19
|
var _chunkS3JO3N4Hcjs = require('./chunk-S3JO3N4H.cjs');
|
|
@@ -70,13 +70,13 @@ async function _invokeServerFunction(value, input, request) {
|
|
|
70
70
|
throw new TypeError("Expected a function created with createServerFn or createServerQuery");
|
|
71
71
|
}
|
|
72
72
|
try {
|
|
73
|
-
const data = await
|
|
73
|
+
const data = await _chunkP4TYB4SFcjs.runWithServerActionRequest.call(void 0, request, () => runner.run(input));
|
|
74
74
|
return { ok: true, data };
|
|
75
75
|
} catch (error) {
|
|
76
76
|
if (error instanceof ServerFnInputError) {
|
|
77
77
|
return { ok: false, reason: "input", error: error.cause };
|
|
78
78
|
}
|
|
79
|
-
if (
|
|
79
|
+
if (_chunkP4TYB4SFcjs.isServerFnFailure.call(void 0, error)) return { ok: false, reason: "failure", failure: error };
|
|
80
80
|
const redirect = _chunkOX6O6WVAcjs.getFarmRedirectError.call(void 0, error);
|
|
81
81
|
if (redirect) {
|
|
82
82
|
return { ok: false, reason: "redirect", url: redirect.url, status: redirect.status };
|
|
@@ -117,9 +117,9 @@ function createServerFn(options) {
|
|
|
117
117
|
} catch (cause) {
|
|
118
118
|
throw labelInputErrors && isSchemaValidationFailure(cause) ? new ServerFnInputError(cause) : cause;
|
|
119
119
|
}
|
|
120
|
-
const executionContext =
|
|
121
|
-
const request = _nullishCoalesce(_optionalChain([executionContext, 'optionalAccess', _ => _.request]), () => (
|
|
122
|
-
const signal = _nullishCoalesce(_nullishCoalesce(_optionalChain([executionContext, 'optionalAccess', _2 => _2.signal]), () => ( _optionalChain([request, 'optionalAccess', _3 => _3.signal]))), () => (
|
|
120
|
+
const executionContext = _chunkP4TYB4SFcjs.getServerActionExecutionContext.call(void 0, );
|
|
121
|
+
const request = _nullishCoalesce(_optionalChain([executionContext, 'optionalAccess', _ => _.request]), () => ( _chunkDATEWH3Wcjs._resolveCurrentRequestForApp.call(void 0, )));
|
|
122
|
+
const signal = _nullishCoalesce(_nullishCoalesce(_optionalChain([executionContext, 'optionalAccess', _2 => _2.signal]), () => ( _optionalChain([request, 'optionalAccess', _3 => _3.signal]))), () => ( _chunkP4TYB4SFcjs.getServerActionSignal.call(void 0, )));
|
|
123
123
|
const handlerContext = {
|
|
124
124
|
input,
|
|
125
125
|
rawInput,
|
|
@@ -139,7 +139,7 @@ function createServerFn(options) {
|
|
|
139
139
|
context: resolvedContext,
|
|
140
140
|
result: parsedResult
|
|
141
141
|
}) : options.invalidates;
|
|
142
|
-
await
|
|
142
|
+
await _chunkUMQAK3KPcjs.applyFarmCacheInvalidationTargets.call(void 0, declaration);
|
|
143
143
|
}
|
|
144
144
|
return parsedResult;
|
|
145
145
|
}, "run");
|
|
@@ -245,7 +245,7 @@ function createServerFnErrorHandler(definitions) {
|
|
|
245
245
|
throw new TypeError(`Server function error "${code}" is not declared`);
|
|
246
246
|
}
|
|
247
247
|
const parsed = parseServerFnFailureData(code, definition.data, data);
|
|
248
|
-
throw new (0,
|
|
248
|
+
throw new (0, _chunkP4TYB4SFcjs.ServerFnFailure)(code, parsed, {
|
|
249
249
|
status: definition.status,
|
|
250
250
|
message: _nullishCoalesce(definition.message, () => ( "Server function failed"))
|
|
251
251
|
});
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
var _chunkSVRTJOUFcjs = require('./chunk-SVRTJOUF.cjs');
|
|
7
7
|
|
|
8
8
|
|
|
9
|
-
var
|
|
9
|
+
var _chunk5NAVKJCZcjs = require('./chunk-5NAVKJCZ.cjs');
|
|
10
10
|
|
|
11
11
|
|
|
12
12
|
|
|
@@ -107,7 +107,7 @@ function resolveServerActionsConfig(config) {
|
|
|
107
107
|
const allowedOrigins = (_nullishCoalesce(_optionalChain([config, 'optionalAccess', _ => _.allowedOrigins]), () => ( []))).map(
|
|
108
108
|
(value) => _chunkSVRTJOUFcjs.normalizeAllowedOriginPattern.call(void 0, value, SERVER_ACTION_ALLOWED_ORIGINS_LABEL)
|
|
109
109
|
);
|
|
110
|
-
const bodySizeLimit =
|
|
110
|
+
const bodySizeLimit = _chunk5NAVKJCZcjs.parseBodySizeLimit.call(void 0,
|
|
111
111
|
_nullishCoalesce(_optionalChain([config, 'optionalAccess', _2 => _2.bodySizeLimit]), () => ( DEFAULT_SERVER_ACTION_BODY_SIZE_LIMIT)),
|
|
112
112
|
"serverActions.bodySizeLimit"
|
|
113
113
|
);
|