@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
|
@@ -1,12 +1,12 @@
|
|
|
1
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
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkX3GMHKO3cjs = require('./chunk-X3GMHKO3.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
var
|
|
6
|
+
var _chunkGS3WR5HXcjs = require('./chunk-GS3WR5HX.cjs');
|
|
7
7
|
|
|
8
8
|
|
|
9
|
-
var
|
|
9
|
+
var _chunkZTP3BJG6cjs = require('./chunk-ZTP3BJG6.cjs');
|
|
10
10
|
|
|
11
11
|
|
|
12
12
|
var _chunkS3JO3N4Hcjs = require('./chunk-S3JO3N4H.cjs');
|
|
@@ -79,7 +79,7 @@ function resolveFarmInfraAnalytics(env = processEnv()) {
|
|
|
79
79
|
}
|
|
80
80
|
_chunkS3JO3N4Hcjs.__name.call(void 0, resolveFarmInfraAnalytics, "resolveFarmInfraAnalytics");
|
|
81
81
|
function classifyFarmInfraAgent(userAgent) {
|
|
82
|
-
return
|
|
82
|
+
return _chunkX3GMHKO3cjs.classifyFarmAgent.call(void 0, userAgent);
|
|
83
83
|
}
|
|
84
84
|
_chunkS3JO3N4Hcjs.__name.call(void 0, classifyFarmInfraAgent, "classifyFarmInfraAgent");
|
|
85
85
|
function routeTemplate(pattern) {
|
|
@@ -294,12 +294,14 @@ function farmInfraAnalyticsPlugin(options, send) {
|
|
|
294
294
|
return state;
|
|
295
295
|
},
|
|
296
296
|
runtime: {
|
|
297
|
+
// Recording a request decides nothing about who may read the response.
|
|
298
|
+
cache: "public",
|
|
297
299
|
start(context) {
|
|
298
300
|
const { exporter } = context.state;
|
|
299
|
-
context.state.unsubscribe =
|
|
301
|
+
context.state.unsubscribe = _chunkGS3WR5HXcjs.onFarmEvent.call(void 0,
|
|
300
302
|
(event) => {
|
|
301
303
|
if (!isToolEvent(event)) return;
|
|
302
|
-
const request =
|
|
304
|
+
const request = _chunkZTP3BJG6cjs.getCurrentRequestOrNull.call(void 0, );
|
|
303
305
|
if (!request) return;
|
|
304
306
|
const metadata = context.requestContext.get(request, contextKey);
|
|
305
307
|
if (!metadata) return;
|
|
@@ -339,7 +341,7 @@ _chunkS3JO3N4Hcjs.__name.call(void 0, farmInfraAnalyticsPlugin, "farmInfraAnalyt
|
|
|
339
341
|
function farmInfraAnalyticsRecorder(options, send) {
|
|
340
342
|
const exporter = createFarmInfraAnalyticsExporter(options, send);
|
|
341
343
|
const requests = new (0, _async_hooks.AsyncLocalStorage)();
|
|
342
|
-
const unsubscribe =
|
|
344
|
+
const unsubscribe = _chunkGS3WR5HXcjs.onFarmEvent.call(void 0,
|
|
343
345
|
(event) => {
|
|
344
346
|
if (!isToolEvent(event)) return;
|
|
345
347
|
const metadata = requests.getStore();
|
|
@@ -4,16 +4,17 @@ import {
|
|
|
4
4
|
getServerActionSignal,
|
|
5
5
|
isServerFnFailure,
|
|
6
6
|
runWithServerActionRequest
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-WMHG64DA.mjs";
|
|
8
8
|
import {
|
|
9
9
|
applyFarmCacheInvalidationTargets
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-B2GSRB3P.mjs";
|
|
11
11
|
import {
|
|
12
12
|
getFarmRedirectError
|
|
13
13
|
} from "./chunk-CBBLJMR5.mjs";
|
|
14
14
|
import {
|
|
15
|
-
_resolveCurrentRequestForApp
|
|
16
|
-
|
|
15
|
+
_resolveCurrentRequestForApp,
|
|
16
|
+
_toAppRequestView
|
|
17
|
+
} from "./chunk-6LVRDOAW.mjs";
|
|
17
18
|
import {
|
|
18
19
|
__name
|
|
19
20
|
} from "./chunk-LPEX4YW6.mjs";
|
|
@@ -118,7 +119,7 @@ function createServerFn(options) {
|
|
|
118
119
|
throw labelInputErrors && isSchemaValidationFailure(cause) ? new ServerFnInputError(cause) : cause;
|
|
119
120
|
}
|
|
120
121
|
const executionContext = getServerActionExecutionContext();
|
|
121
|
-
const request = executionContext
|
|
122
|
+
const request = executionContext ? _toAppRequestView(executionContext.request) : _resolveCurrentRequestForApp();
|
|
122
123
|
const signal = executionContext?.signal ?? request?.signal ?? getServerActionSignal();
|
|
123
124
|
const handlerContext = {
|
|
124
125
|
input,
|
|
@@ -1,6 +1,9 @@
|
|
|
1
|
+
import {
|
|
2
|
+
FARM_ANONYMOUS_CLIENT_ADDRESS
|
|
3
|
+
} from "./chunk-BRYPZIMB.mjs";
|
|
1
4
|
import {
|
|
2
5
|
matchesFarmIfNoneMatch
|
|
3
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-ZZGQD7A4.mjs";
|
|
4
7
|
import {
|
|
5
8
|
__name
|
|
6
9
|
} from "./chunk-LPEX4YW6.mjs";
|
|
@@ -122,7 +125,7 @@ ${negotiatedFormat}`;
|
|
|
122
125
|
return entry;
|
|
123
126
|
});
|
|
124
127
|
}
|
|
125
|
-
return createOptimizedImageResponse(request, optimized
|
|
128
|
+
return createOptimizedImageResponse(request, optimized);
|
|
126
129
|
} catch (error) {
|
|
127
130
|
if (!(error instanceof FarmImageRequestError) && !isAbortError(error)) {
|
|
128
131
|
try {
|
|
@@ -352,14 +355,18 @@ async function fetchImageSource(initialUrl, requestOrigin, trustedLocalOrigin, c
|
|
|
352
355
|
let currentUrl = initialUrl;
|
|
353
356
|
for (let redirectCount = 0; ; redirectCount += 1) {
|
|
354
357
|
throwIfAborted(signal);
|
|
355
|
-
const
|
|
358
|
+
const isTrustedLocal = currentUrl.origin === trustedLocalOrigin;
|
|
359
|
+
const sourceFetcher = isTrustedLocal ? fetcher : fetchRemote ?? fetcher;
|
|
356
360
|
const response = await sourceFetcher(currentUrl, {
|
|
357
361
|
method: "GET",
|
|
358
362
|
redirect: "manual",
|
|
359
363
|
signal,
|
|
360
364
|
headers: {
|
|
361
365
|
accept: "image/avif,image/webp,image/*,*/*;q=0.8",
|
|
362
|
-
"user-agent": "Farm.js Image Optimizer"
|
|
366
|
+
"user-agent": "Farm.js Image Optimizer",
|
|
367
|
+
// This server fetching from itself arrives from a loopback address.
|
|
368
|
+
// Mark it so the app sees an anonymous visitor, not a trusted local one.
|
|
369
|
+
...isTrustedLocal ? { [FARM_IMAGE_SOURCE_HEADER]: getFarmImageSourceToken() } : {}
|
|
363
370
|
}
|
|
364
371
|
});
|
|
365
372
|
if (![301, 302, 303, 307, 308].includes(response.status)) {
|
|
@@ -398,6 +405,19 @@ async function fetchImageSource(initialUrl, requestOrigin, trustedLocalOrigin, c
|
|
|
398
405
|
}
|
|
399
406
|
}
|
|
400
407
|
__name(fetchImageSource, "fetchImageSource");
|
|
408
|
+
var FARM_IMAGE_SOURCE_HEADER = "x-farm-image-source";
|
|
409
|
+
var FARM_IMAGE_SOURCE_TOKEN = /* @__PURE__ */ Symbol.for("farm.image.sourceToken");
|
|
410
|
+
function getFarmImageSourceToken() {
|
|
411
|
+
const state = globalThis;
|
|
412
|
+
return state[FARM_IMAGE_SOURCE_TOKEN] ?? (state[FARM_IMAGE_SOURCE_TOKEN] = globalThis.crypto.randomUUID());
|
|
413
|
+
}
|
|
414
|
+
__name(getFarmImageSourceToken, "getFarmImageSourceToken");
|
|
415
|
+
function _withFarmImageSourceClientAddress(request, context) {
|
|
416
|
+
const token = globalThis[FARM_IMAGE_SOURCE_TOKEN];
|
|
417
|
+
if (!token || request.headers.get(FARM_IMAGE_SOURCE_HEADER) !== token) return context;
|
|
418
|
+
return { ...context, clientAddress: FARM_ANONYMOUS_CLIENT_ADDRESS };
|
|
419
|
+
}
|
|
420
|
+
__name(_withFarmImageSourceClientAddress, "_withFarmImageSourceClientAddress");
|
|
401
421
|
function resolveTrustedLocalOrigin(configured) {
|
|
402
422
|
const value = typeof configured === "function" ? configured() : configured;
|
|
403
423
|
if (!value) return void 0;
|
|
@@ -532,12 +552,23 @@ function validateTransformedResult(result, config) {
|
|
|
532
552
|
if (!contentType || contentType === "image/svg+xml" && !config.dangerouslyAllowSVG) {
|
|
533
553
|
throw new Error("The image transformer returned an unsupported content type");
|
|
534
554
|
}
|
|
555
|
+
if (detectImageContentType(result.body) !== contentType) {
|
|
556
|
+
throw new Error("The image transformer returned bytes that do not match their content type");
|
|
557
|
+
}
|
|
535
558
|
result.contentType = contentType;
|
|
536
559
|
}
|
|
537
560
|
__name(validateTransformedResult, "validateTransformedResult");
|
|
561
|
+
var OPTIMIZED_IMAGE_TYPES = /* @__PURE__ */ new Set([
|
|
562
|
+
"image/png",
|
|
563
|
+
"image/jpeg",
|
|
564
|
+
"image/gif",
|
|
565
|
+
"image/webp",
|
|
566
|
+
"image/avif",
|
|
567
|
+
"image/svg+xml"
|
|
568
|
+
]);
|
|
538
569
|
function normalizeImageContentType(value) {
|
|
539
570
|
const type = value?.split(";", 1)[0].trim().toLowerCase() ?? "";
|
|
540
|
-
return
|
|
571
|
+
return OPTIMIZED_IMAGE_TYPES.has(type) ? type : "";
|
|
541
572
|
}
|
|
542
573
|
__name(normalizeImageContentType, "normalizeImageContentType");
|
|
543
574
|
function matchesRemoteSource(url, config) {
|
|
@@ -570,7 +601,7 @@ function matchesHostname(hostname, pattern) {
|
|
|
570
601
|
return normalizedHostname === normalizedPattern;
|
|
571
602
|
}
|
|
572
603
|
__name(matchesHostname, "matchesHostname");
|
|
573
|
-
function createOptimizedImageResponse(request, image
|
|
604
|
+
function createOptimizedImageResponse(request, image) {
|
|
574
605
|
const headers = new Headers({
|
|
575
606
|
"cache-control": image.cacheControl,
|
|
576
607
|
"content-type": image.contentType,
|
|
@@ -578,11 +609,11 @@ function createOptimizedImageResponse(request, image, config) {
|
|
|
578
609
|
"content-disposition": "inline",
|
|
579
610
|
etag: image.etag,
|
|
580
611
|
vary: "Accept",
|
|
581
|
-
"x-content-type-options": "nosniff"
|
|
612
|
+
"x-content-type-options": "nosniff",
|
|
613
|
+
// Every optimized image, not only SVG: if a response is ever rendered as a
|
|
614
|
+
// document, it still cannot run script or load anything.
|
|
615
|
+
"content-security-policy": "default-src 'none'; sandbox"
|
|
582
616
|
});
|
|
583
|
-
if (image.contentType === "image/svg+xml" && config.dangerouslyAllowSVG) {
|
|
584
|
-
headers.set("content-security-policy", "default-src 'none'; sandbox");
|
|
585
|
-
}
|
|
586
617
|
if (matchesFarmIfNoneMatch(request.headers.get("if-none-match"), image.etag)) {
|
|
587
618
|
headers.delete("content-length");
|
|
588
619
|
return new Response(null, { status: 304, headers });
|
|
@@ -660,5 +691,6 @@ export {
|
|
|
660
691
|
createFarmImageHandler,
|
|
661
692
|
createCloudflareImageTransformer,
|
|
662
693
|
selectOutputFormat,
|
|
663
|
-
isPrivateImageAddress
|
|
694
|
+
isPrivateImageAddress,
|
|
695
|
+
_withFarmImageSourceClientAddress
|
|
664
696
|
};
|
|
@@ -7,15 +7,15 @@ var _chunkJDNHKPTDcjs = require('./chunk-JDNHKPTD.cjs');
|
|
|
7
7
|
var _chunkCMGMGHUZcjs = require('./chunk-CMGMGHUZ.cjs');
|
|
8
8
|
|
|
9
9
|
|
|
10
|
+
var _chunk5QIKR7RRcjs = require('./chunk-5QIKR7RR.cjs');
|
|
10
11
|
|
|
11
12
|
|
|
12
|
-
var
|
|
13
|
+
var _chunkQNPEUFHQcjs = require('./chunk-QNPEUFHQ.cjs');
|
|
13
14
|
|
|
14
15
|
|
|
15
|
-
var _chunk5QIKR7RRcjs = require('./chunk-5QIKR7RR.cjs');
|
|
16
16
|
|
|
17
17
|
|
|
18
|
-
var
|
|
18
|
+
var _chunk5NAVKJCZcjs = require('./chunk-5NAVKJCZ.cjs');
|
|
19
19
|
|
|
20
20
|
|
|
21
21
|
var _chunkDVM4FKZLcjs = require('./chunk-DVM4FKZL.cjs');
|
|
@@ -136,10 +136,10 @@ function createFarmWorkflowRequestHandler(options) {
|
|
|
136
136
|
try {
|
|
137
137
|
payload = await readWorkflowPayload(
|
|
138
138
|
request,
|
|
139
|
-
|
|
139
|
+
_chunk5NAVKJCZcjs.resolveFarmServerConfig.call(void 0, options.server).bodySizeLimit
|
|
140
140
|
);
|
|
141
141
|
} catch (error) {
|
|
142
|
-
const response =
|
|
142
|
+
const response = _chunk5NAVKJCZcjs.createFarmRequestBodyErrorResponse.call(void 0, error);
|
|
143
143
|
if (response) return response;
|
|
144
144
|
if (error instanceof SyntaxError) {
|
|
145
145
|
return Response.json({ error: "Invalid workflow request body." }, { status: 400 });
|
|
@@ -220,7 +220,7 @@ async function prepareFarmWorkflowsForNitro(config) {
|
|
|
220
220
|
createNitroWorkflowHTTPHandler(
|
|
221
221
|
workflowConfig,
|
|
222
222
|
workflows,
|
|
223
|
-
|
|
223
|
+
_chunk5NAVKJCZcjs.resolveFarmServerConfig.call(void 0, config.server)
|
|
224
224
|
),
|
|
225
225
|
"utf8"
|
|
226
226
|
);
|
|
@@ -446,7 +446,7 @@ export default defineTask({
|
|
|
446
446
|
_chunkS3JO3N4Hcjs.__name.call(void 0, createNitroTaskWrapper, "createNitroTaskWrapper");
|
|
447
447
|
function createNitroWorkflowHTTPHandler(config, workflows, server) {
|
|
448
448
|
return `
|
|
449
|
-
import { H3 } from "h3";
|
|
449
|
+
import { H3 } from "nitro/h3";
|
|
450
450
|
import { runTask } from "nitro/task";
|
|
451
451
|
import {
|
|
452
452
|
createFarmRequestBodyErrorResponse,
|
|
@@ -591,7 +591,7 @@ async function readWorkflowPayload(request, bodySizeLimit) {
|
|
|
591
591
|
if (request.method === "GET" || request.method === "HEAD") {
|
|
592
592
|
return _chunkQNPEUFHQcjs.searchParamsToObject.call(void 0, url.searchParams);
|
|
593
593
|
}
|
|
594
|
-
const bytes = await
|
|
594
|
+
const bytes = await _chunk5NAVKJCZcjs.readFarmRequestBody.call(void 0, request, bodySizeLimit);
|
|
595
595
|
const text = new TextDecoder().decode(bytes);
|
|
596
596
|
if (!text) return {};
|
|
597
597
|
const contentType = (request.headers.get("content-type") || "").split(";", 1)[0].trim().toLowerCase();
|
|
@@ -5,66 +5,81 @@ import {
|
|
|
5
5
|
// src/storage/index.ts
|
|
6
6
|
import { createStorage, prefixStorage, builtinDrivers } from "unstorage";
|
|
7
7
|
import memoryDriver from "unstorage/drivers/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
|
+
__name(getRegisteredStorageModules, "getRegisteredStorageModules");
|
|
13
|
+
var loadModule = /* @__PURE__ */ __name((specifier) => {
|
|
14
|
+
const registered = getRegisteredStorageModules()?.[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
|
+
__name(_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
|
__name(extractDriverOptions, "extractDriverOptions");
|
|
135
150
|
async function loadBuiltinDriver(name, options) {
|
|
151
|
+
if (name === "memory") return memoryDriver();
|
|
136
152
|
const modulePath = 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) || {}));
|
|
@@ -184,7 +200,8 @@ async function resolveDriver(config) {
|
|
|
184
200
|
);
|
|
185
201
|
}
|
|
186
202
|
__name(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__ */ __name(() => {
|
|
@@ -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
|
__name(defineStorageClient, "defineStorageClient");
|
|
251
269
|
function createStorageClient(config) {
|
|
252
|
-
return
|
|
270
|
+
return createStorageClientFromResolver(
|
|
271
|
+
() => resolveDriver(config),
|
|
272
|
+
_collectFarmStorageModules(config)
|
|
273
|
+
);
|
|
253
274
|
}
|
|
254
275
|
__name(createStorageClient, "createStorageClient");
|
|
255
276
|
function driverStorage(driver) {
|
|
@@ -257,14 +278,14 @@ function driverStorage(driver) {
|
|
|
257
278
|
}
|
|
258
279
|
__name(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
|
__name(databaseStorage, "databaseStorage");
|
|
270
291
|
function memoryStorage() {
|
|
@@ -377,6 +398,38 @@ function vercelBlobStorage(options) {
|
|
|
377
398
|
});
|
|
378
399
|
}
|
|
379
400
|
__name(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 = 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
|
+
__name(collectDriverModules, "collectDriverModules");
|
|
427
|
+
function _collectFarmStorageModules(config) {
|
|
428
|
+
const modules = /* @__PURE__ */ new Set();
|
|
429
|
+
collectDriverModules(config, modules);
|
|
430
|
+
return [...modules];
|
|
431
|
+
}
|
|
432
|
+
__name(_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 = prefixStorage(globalStorage, base);
|
|
@@ -491,6 +549,7 @@ async function disposeStorage() {
|
|
|
491
549
|
__name(disposeStorage, "disposeStorage");
|
|
492
550
|
|
|
493
551
|
export {
|
|
552
|
+
_registerFarmStorageModules,
|
|
494
553
|
defineStorageClient,
|
|
495
554
|
createStorageClient,
|
|
496
555
|
driverStorage,
|
|
@@ -512,6 +571,7 @@ export {
|
|
|
512
571
|
netlifyBlobsStorage,
|
|
513
572
|
vercelKVStorage,
|
|
514
573
|
vercelBlobStorage,
|
|
574
|
+
_collectFarmStorageModules,
|
|
515
575
|
createFarmStorage,
|
|
516
576
|
resolveStorageRuntimeClient,
|
|
517
577
|
initStorage,
|
|
@@ -1,33 +1,35 @@
|
|
|
1
1
|
import {
|
|
2
2
|
resolveIntegrationOrmRuntimeClient
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-S6ENKNNG.mjs";
|
|
4
4
|
import {
|
|
5
|
-
collectSchemaExtensions,
|
|
6
5
|
collectSchemaModels,
|
|
7
6
|
columnTypeFamily,
|
|
8
7
|
createSchemaExecutor,
|
|
9
8
|
createSchemaSnapshot,
|
|
10
9
|
describeForeignKeyApproval,
|
|
11
|
-
describeSchemaExtensionApproval,
|
|
12
10
|
describeSchemaTable,
|
|
13
11
|
diffSchemaSnapshots,
|
|
14
12
|
findSchemaTableOwners,
|
|
15
13
|
getSqlColumnType,
|
|
16
14
|
hasSchemaChanges,
|
|
17
|
-
isSchemaExtensionAllowed,
|
|
18
15
|
planCrossOwnerReferences,
|
|
19
16
|
planOwnerSchemaSteps,
|
|
20
17
|
planSchemaMigration,
|
|
21
18
|
readSchemaState,
|
|
22
|
-
readSchemaTables,
|
|
23
19
|
withoutRenameTargets
|
|
24
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-BYR3RQPB.mjs";
|
|
21
|
+
import {
|
|
22
|
+
collectSchemaExtensions,
|
|
23
|
+
describeSchemaExtensionApproval,
|
|
24
|
+
isSchemaExtensionAllowed,
|
|
25
|
+
readSchemaTables
|
|
26
|
+
} from "./chunk-GC3EM6H4.mjs";
|
|
25
27
|
import {
|
|
26
28
|
resolveSchemaModels
|
|
27
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-WDMIW6Q6.mjs";
|
|
28
30
|
import {
|
|
29
31
|
getIntegrationSchemas
|
|
30
|
-
} from "./chunk-
|
|
32
|
+
} from "./chunk-AX7S67YV.mjs";
|
|
31
33
|
import {
|
|
32
34
|
__name
|
|
33
35
|
} from "./chunk-LPEX4YW6.mjs";
|
|
@@ -4,14 +4,14 @@
|
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
7
|
-
var
|
|
7
|
+
var _chunkMY5PZYADcjs = require('./chunk-MY5PZYAD.cjs');
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
|
|
11
11
|
var _chunkIK6LVLKCcjs = require('./chunk-IK6LVLKC.cjs');
|
|
12
12
|
|
|
13
13
|
|
|
14
|
-
var
|
|
14
|
+
var _chunkEX4MKHXNcjs = require('./chunk-EX4MKHXN.cjs');
|
|
15
15
|
|
|
16
16
|
|
|
17
17
|
|
|
@@ -30,7 +30,7 @@ function hasFarmDocsRuntimeAdapter(docs) {
|
|
|
30
30
|
_chunkS3JO3N4Hcjs.__name.call(void 0, hasFarmDocsRuntimeAdapter, "hasFarmDocsRuntimeAdapter");
|
|
31
31
|
function assertFarmDocsAdapterServesNoGuardedPages(docs, options, isPathGuarded) {
|
|
32
32
|
if (!isPathGuarded || !hasFarmDocsRuntimeAdapter(docs)) return;
|
|
33
|
-
const guarded =
|
|
33
|
+
const guarded = _chunkMY5PZYADcjs.discoverFarmDocsPages.call(void 0, _chunkMY5PZYADcjs.resolveFarmDocsContentDir.call(void 0, docs, options), docs).filter((page) => isPathGuarded(page.href) || isPathGuarded(_chunkMY5PZYADcjs.getFarmDocsMarkdownPath.call(void 0, page.href))).map((page) => page.href);
|
|
34
34
|
if (guarded.length === 0) return;
|
|
35
35
|
throw new Error(
|
|
36
36
|
`Docs pages behind a path guard (${guarded.join(", ")}) would be public: the docs adapter ${JSON.stringify(docs.adapter.id)} serves their content in llms-full.txt, search, Markdown, and MCP without running the app's guards. Move those pages out of the docs content directory, or set docs.adapter = false to use Farm's built-in docs runtime, which keeps guarded pages off anonymous surfaces.`
|
|
@@ -50,7 +50,7 @@ function createFarmDocsAdapterRuntimeConfig(docs, options, moduleConfig) {
|
|
|
50
50
|
...moduleConfig ? { ...moduleConfig, ...docs.configOverrides } : _nullishCoalesce(docs.runtimeConfig, () => ( docs.config)),
|
|
51
51
|
entry: docs.config.entry || docs.entry.replace(/^\/+|\/+$/g, "") || "docs",
|
|
52
52
|
docsPath: docs.entry,
|
|
53
|
-
contentDir:
|
|
53
|
+
contentDir: _chunkMY5PZYADcjs.resolveFarmDocsContentDir.call(void 0, docs, options)
|
|
54
54
|
};
|
|
55
55
|
}
|
|
56
56
|
_chunkS3JO3N4Hcjs.__name.call(void 0, createFarmDocsAdapterRuntimeConfig, "createFarmDocsAdapterRuntimeConfig");
|
|
@@ -288,25 +288,25 @@ function getDocsDescription(docs) {
|
|
|
288
288
|
}
|
|
289
289
|
_chunkS3JO3N4Hcjs.__name.call(void 0, getDocsDescription, "getDocsDescription");
|
|
290
290
|
function getLoadedDocsPages(context) {
|
|
291
|
-
return
|
|
291
|
+
return _chunkMY5PZYADcjs.discoverFarmDocsPages.call(void 0, context.contentDir, context.docs).filter((page) => !context.isPathGuarded(page.href)).map((page) => _chunkMY5PZYADcjs.loadFarmDocsPage.call(void 0, context.contentDir, context.docs, page.slug)).filter((page) => Boolean(page));
|
|
292
292
|
}
|
|
293
293
|
_chunkS3JO3N4Hcjs.__name.call(void 0, getLoadedDocsPages, "getLoadedDocsPages");
|
|
294
294
|
function toDocsSourcePage(page) {
|
|
295
295
|
return {
|
|
296
|
-
...
|
|
296
|
+
..._chunkMY5PZYADcjs.toFarmDocsMarkdownPage.call(void 0, page),
|
|
297
297
|
sourcePath: page.sourcePath
|
|
298
298
|
};
|
|
299
299
|
}
|
|
300
300
|
_chunkS3JO3N4Hcjs.__name.call(void 0, toDocsSourcePage, "toDocsSourcePage");
|
|
301
301
|
function toDocsSitemapPage(page) {
|
|
302
302
|
return {
|
|
303
|
-
...
|
|
303
|
+
..._chunkMY5PZYADcjs.toFarmDocsMarkdownPage.call(void 0, page),
|
|
304
304
|
sourcePath: page.sourcePath
|
|
305
305
|
};
|
|
306
306
|
}
|
|
307
307
|
_chunkS3JO3N4Hcjs.__name.call(void 0, toDocsSitemapPage, "toDocsSitemapPage");
|
|
308
308
|
function toDocsLlmsPage(page) {
|
|
309
|
-
return
|
|
309
|
+
return _chunkMY5PZYADcjs.toFarmDocsMarkdownPage.call(void 0, page);
|
|
310
310
|
}
|
|
311
311
|
_chunkS3JO3N4Hcjs.__name.call(void 0, toDocsLlmsPage, "toDocsLlmsPage");
|
|
312
312
|
function getDocsLlmsOptions(context, request) {
|
|
@@ -400,7 +400,7 @@ _chunkS3JO3N4Hcjs.__name.call(void 0, renderAgentsDocument, "renderAgentsDocumen
|
|
|
400
400
|
function buildAgentSpec(context, request) {
|
|
401
401
|
const url = new URL(request.url);
|
|
402
402
|
const origin = url.origin;
|
|
403
|
-
const pages =
|
|
403
|
+
const pages = _chunkMY5PZYADcjs.discoverFarmDocsPages.call(void 0, context.contentDir, context.docs).filter(
|
|
404
404
|
(page) => !context.isPathGuarded(page.href)
|
|
405
405
|
);
|
|
406
406
|
const spec = _chunkIK6LVLKCcjs.docsEngine.call(void 0, ).buildDocsAgentDiscoverySpec(getDocsDiscoveryOptions(context, request));
|
|
@@ -492,7 +492,7 @@ function buildPublicConfig(context) {
|
|
|
492
492
|
}
|
|
493
493
|
_chunkS3JO3N4Hcjs.__name.call(void 0, buildPublicConfig, "buildPublicConfig");
|
|
494
494
|
function buildDiagnostics(context) {
|
|
495
|
-
const pages =
|
|
495
|
+
const pages = _chunkMY5PZYADcjs.discoverFarmDocsPages.call(void 0, context.contentDir, context.docs);
|
|
496
496
|
const diagnostics = _chunkIK6LVLKCcjs.docsEngine.call(void 0, ).buildDocsDiagnostics(context.docs.config, {
|
|
497
497
|
entry: context.docs.entry,
|
|
498
498
|
mcp: {
|
|
@@ -564,13 +564,13 @@ async function resolveAPIContext(options) {
|
|
|
564
564
|
config: options.config,
|
|
565
565
|
configPath: options.configPath
|
|
566
566
|
}));
|
|
567
|
-
const docs = isResolvedDocsConfig(docsInput) ? docsInput : await
|
|
567
|
+
const docs = isResolvedDocsConfig(docsInput) ? docsInput : await _chunkEX4MKHXNcjs.resolveDocsConfig.call(void 0, docsInput, { root, srcDir });
|
|
568
568
|
const guardedPaths = new Set(_nullishCoalesce(_optionalChain([runtimeConfig, 'optionalAccess', _20 => _20.guardedPaths]), () => ( [])));
|
|
569
569
|
return {
|
|
570
570
|
root,
|
|
571
571
|
srcDir,
|
|
572
572
|
docs,
|
|
573
|
-
contentDir:
|
|
573
|
+
contentDir: _chunkMY5PZYADcjs.resolveFarmDocsContentDir.call(void 0, docs, { root, srcDir }),
|
|
574
574
|
diagnostics: options.diagnostics === true,
|
|
575
575
|
isPathGuarded: _nullishCoalesce(options.isPathGuarded, () => ( ((pathname) => guardedPaths.has(pathname))))
|
|
576
576
|
};
|
|
@@ -630,12 +630,12 @@ async function handleDocsAPIGet(request, context) {
|
|
|
630
630
|
if (format === "markdown" || url.pathname.endsWith(".md")) {
|
|
631
631
|
const pathParam = url.searchParams.get("path") || url.searchParams.get("slug");
|
|
632
632
|
const slug = normalizeDocsApiSlug(_nullishCoalesce(_nullishCoalesce(pathParam, () => ( pathTarget.slug)), () => ( "")), context.docs);
|
|
633
|
-
const page =
|
|
633
|
+
const page = _chunkMY5PZYADcjs.loadFarmDocsPage.call(void 0, context.contentDir, context.docs, slug);
|
|
634
634
|
if (!page || context.isPathGuarded(page.href)) {
|
|
635
635
|
return text("Docs page not found\n", "text/plain; charset=utf-8", { status: 404 });
|
|
636
636
|
}
|
|
637
637
|
return text(
|
|
638
|
-
_chunkIK6LVLKCcjs.docsEngine.call(void 0, ).renderDocsMarkdownDocument(
|
|
638
|
+
_chunkIK6LVLKCcjs.docsEngine.call(void 0, ).renderDocsMarkdownDocument(_chunkMY5PZYADcjs.toFarmDocsMarkdownPage.call(void 0, page), {
|
|
639
639
|
origin: new URL(request.url).origin,
|
|
640
640
|
llms: getDocsLlmsOptions(context, request),
|
|
641
641
|
sitemap: context.docs.config.sitemap
|