@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
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } }
|
|
2
|
+
|
|
3
|
+
var _chunkS3JO3N4Hcjs = require('./chunk-S3JO3N4H.cjs');
|
|
4
|
+
|
|
5
|
+
// src/plugin-dependencies.ts
|
|
6
|
+
function pluginShortName(name) {
|
|
7
|
+
return name.slice(Math.max(name.lastIndexOf(":"), name.lastIndexOf("/")) + 1);
|
|
8
|
+
}
|
|
9
|
+
_chunkS3JO3N4Hcjs.__name.call(void 0, pluginShortName, "pluginShortName");
|
|
10
|
+
function assertPluginDependencies(plugins, integrations) {
|
|
11
|
+
const integrationKeys = integrations && !Array.isArray(integrations) ? Object.keys(integrations) : [];
|
|
12
|
+
const matches = /* @__PURE__ */ _chunkS3JO3N4Hcjs.__name.call(void 0, (plugin, dependency) => plugin.name === dependency || pluginShortName(plugin.name) === dependency, "matches");
|
|
13
|
+
for (const plugin of plugins) {
|
|
14
|
+
if (plugin.dependsOn === void 0) continue;
|
|
15
|
+
if (!Array.isArray(plugin.dependsOn) || plugin.dependsOn.some((entry) => typeof entry !== "string" || entry.trim() === "")) {
|
|
16
|
+
throw new TypeError(
|
|
17
|
+
`Plugin "${plugin.name}" has an invalid \`dependsOn\`: list plugin names, such as ["teams"].`
|
|
18
|
+
);
|
|
19
|
+
}
|
|
20
|
+
for (const dependency of plugin.dependsOn) {
|
|
21
|
+
if (matches(plugin, dependency)) {
|
|
22
|
+
throw new Error(`Plugin "${plugin.name}" lists itself in \`dependsOn\`.`);
|
|
23
|
+
}
|
|
24
|
+
const found = plugins.some((candidate) => candidate !== plugin && matches(candidate, dependency)) || integrationKeys.includes(dependency);
|
|
25
|
+
if (!found) {
|
|
26
|
+
const configured = [
|
|
27
|
+
...plugins.map((candidate) => candidate.name),
|
|
28
|
+
...integrationKeys
|
|
29
|
+
].filter((name) => name !== plugin.name);
|
|
30
|
+
throw new Error(
|
|
31
|
+
`Plugin "${plugin.name}" depends on "${dependency}", which is not configured. Add it to \`plugins\` (or \`integrations\`) in farm.config.${configured.length > 0 ? ` Configured: ${configured.join(", ")}.` : ""}`
|
|
32
|
+
);
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
const state = /* @__PURE__ */ new Map();
|
|
37
|
+
const path = [];
|
|
38
|
+
const visit = /* @__PURE__ */ _chunkS3JO3N4Hcjs.__name.call(void 0, (plugin) => {
|
|
39
|
+
if (state.get(plugin) === "done") return;
|
|
40
|
+
if (state.get(plugin) === "visiting") {
|
|
41
|
+
const cycle = [...path.slice(path.indexOf(plugin)), plugin].map(
|
|
42
|
+
(entry) => pluginShortName(entry.name)
|
|
43
|
+
);
|
|
44
|
+
throw new Error(`Plugins depend on each other in a cycle: ${cycle.join(" \u2192 ")}.`);
|
|
45
|
+
}
|
|
46
|
+
state.set(plugin, "visiting");
|
|
47
|
+
path.push(plugin);
|
|
48
|
+
for (const dependency of _nullishCoalesce(plugin.dependsOn, () => ( []))) {
|
|
49
|
+
for (const candidate of plugins) {
|
|
50
|
+
if (candidate !== plugin && matches(candidate, dependency)) visit(candidate);
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
path.pop();
|
|
54
|
+
state.set(plugin, "done");
|
|
55
|
+
}, "visit");
|
|
56
|
+
for (const plugin of plugins) visit(plugin);
|
|
57
|
+
}
|
|
58
|
+
_chunkS3JO3N4Hcjs.__name.call(void 0, assertPluginDependencies, "assertPluginDependencies");
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
exports.pluginShortName = pluginShortName; exports.assertPluginDependencies = assertPluginDependencies;
|
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } } function _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
3
|
|
|
4
|
+
var _chunkZQRCSUSBcjs = require('./chunk-ZQRCSUSB.cjs');
|
|
4
5
|
|
|
5
6
|
|
|
6
|
-
var _chunkJSROZYYOcjs = require('./chunk-JSROZYYO.cjs');
|
|
7
7
|
|
|
8
|
+
var _chunk6D24SDKOcjs = require('./chunk-6D24SDKO.cjs');
|
|
8
9
|
|
|
9
|
-
|
|
10
|
+
|
|
11
|
+
var _chunkOILHPMFXcjs = require('./chunk-OILHPMFX.cjs');
|
|
10
12
|
|
|
11
13
|
|
|
12
14
|
var _chunkS3JO3N4Hcjs = require('./chunk-S3JO3N4H.cjs');
|
|
@@ -33,13 +35,13 @@ async function resolveIntegrationOrmRuntimeClient(options) {
|
|
|
33
35
|
if (options.client !== void 0) {
|
|
34
36
|
return typeof options.client === "function" ? await options.client() : options.client;
|
|
35
37
|
}
|
|
36
|
-
return
|
|
38
|
+
return _chunkOILHPMFXcjs.resolveStorageRuntimeClient.call(void 0, _nullishCoalesce(options.storage, () => ( _optionalChain([options, 'access', _ => _.config, 'optionalAccess', _2 => _2.storage]))));
|
|
37
39
|
}
|
|
38
40
|
_chunkS3JO3N4Hcjs.__name.call(void 0, resolveIntegrationOrmRuntimeClient, "resolveIntegrationOrmRuntimeClient");
|
|
39
41
|
async function farmIntegrationSchemaToOrmSchema(schema) {
|
|
40
42
|
for (const [modelKey, modelSchema] of Object.entries(schema.models)) {
|
|
41
43
|
for (const [fieldKey, fieldSchema] of Object.entries(modelSchema.fields)) {
|
|
42
|
-
|
|
44
|
+
_chunkZQRCSUSBcjs.assertNoSchemaListField.call(void 0,
|
|
43
45
|
fieldSchema,
|
|
44
46
|
`${modelKey}.${fieldKey}`,
|
|
45
47
|
"the Farm integration runtime ORM"
|
|
@@ -48,7 +50,7 @@ async function farmIntegrationSchemaToOrmSchema(schema) {
|
|
|
48
50
|
}
|
|
49
51
|
const orm = await import("@farming-labs/orm");
|
|
50
52
|
const models = {};
|
|
51
|
-
const resolvedModels =
|
|
53
|
+
const resolvedModels = _chunk6D24SDKOcjs.resolveSchemaModels.call(void 0, "integration", schema);
|
|
52
54
|
for (const [modelKey, modelSchema] of Object.entries(resolvedModels)) {
|
|
53
55
|
models[modelKey] = orm.model({
|
|
54
56
|
table: _nullishCoalesce(modelSchema.name, () => ( modelKey)),
|
|
@@ -70,7 +72,7 @@ function createOrmModelFields(orm, modelKey, modelSchema) {
|
|
|
70
72
|
}
|
|
71
73
|
_chunkS3JO3N4Hcjs.__name.call(void 0, createOrmModelFields, "createOrmModelFields");
|
|
72
74
|
function createOrmField(orm, modelKey, fieldKey, field) {
|
|
73
|
-
|
|
75
|
+
_chunk6D24SDKOcjs.assertSupportedPrimaryKeyField.call(void 0, `integration.${modelKey}.${fieldKey}`, field);
|
|
74
76
|
let builder = createOrmFieldBuilder(orm, fieldKey, field);
|
|
75
77
|
if (!field.primaryKey && field.unique) {
|
|
76
78
|
builder = builder.unique();
|
|
@@ -81,7 +83,7 @@ function createOrmField(orm, modelKey, fieldKey, field) {
|
|
|
81
83
|
if (field.default !== void 0) {
|
|
82
84
|
builder = field.type === "datetime" && field.default === "now" ? builder.defaultNow() : builder.default(field.default);
|
|
83
85
|
}
|
|
84
|
-
if (field.reference &&
|
|
86
|
+
if (field.reference && _chunkZQRCSUSBcjs.isDatabaseEnforcedReference.call(void 0, field.reference)) {
|
|
85
87
|
builder = builder.references(`${field.reference.model}.${field.reference.field}`);
|
|
86
88
|
}
|
|
87
89
|
if (field.name && field.name !== fieldKey) {
|
|
@@ -34,7 +34,7 @@ var _chunkS3A45T7Fcjs = require('./chunk-S3A45T7F.cjs');
|
|
|
34
34
|
var _chunkZEG3OPIBcjs = require('./chunk-ZEG3OPIB.cjs');
|
|
35
35
|
|
|
36
36
|
|
|
37
|
-
var
|
|
37
|
+
var _chunk6IZWX6EScjs = require('./chunk-6IZWX6ES.cjs');
|
|
38
38
|
|
|
39
39
|
|
|
40
40
|
var _chunkS3JO3N4Hcjs = require('./chunk-S3JO3N4H.cjs');
|
|
@@ -1119,7 +1119,7 @@ function createApiClients(options = {}) {
|
|
|
1119
1119
|
"api is server-only. Use apiClient from createApiClients() in the browser."
|
|
1120
1120
|
);
|
|
1121
1121
|
}
|
|
1122
|
-
const currentRequest =
|
|
1122
|
+
const currentRequest = _chunk6IZWX6EScjs._resolveCurrentRequest.call(void 0, );
|
|
1123
1123
|
const runtime = _chunk72ADZ6GQcjs.resolveAPIRequestRuntime.call(void 0, );
|
|
1124
1124
|
if (!currentRequest || !runtime) {
|
|
1125
1125
|
throw new Error(
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import {
|
|
2
|
+
resolveSchemaModels
|
|
3
|
+
} from "./chunk-WDMIW6Q6.mjs";
|
|
4
|
+
import {
|
|
5
|
+
__name
|
|
6
|
+
} from "./chunk-LPEX4YW6.mjs";
|
|
7
|
+
|
|
8
|
+
// src/schema-extend.ts
|
|
9
|
+
function collectSchemaExtensions(owner, schema, models) {
|
|
10
|
+
if (!schema.extend) return [];
|
|
11
|
+
const resolved = resolveSchemaModels(owner, schema);
|
|
12
|
+
const extensions = [];
|
|
13
|
+
for (const [modelKey, extension] of Object.entries(schema.extend)) {
|
|
14
|
+
const model = resolved[modelKey];
|
|
15
|
+
if (!model || !model.external && (!models || models.includes(modelKey))) continue;
|
|
16
|
+
const fields = Object.keys(extension.fields ?? {}).map((fieldKey) => {
|
|
17
|
+
const field = model.fields[fieldKey];
|
|
18
|
+
assertAddableColumn(owner, modelKey, fieldKey, field);
|
|
19
|
+
return { fieldKey, field };
|
|
20
|
+
});
|
|
21
|
+
if (fields.length > 0) {
|
|
22
|
+
extensions.push({ owner, modelKey, table: model.name, fields });
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
return extensions;
|
|
26
|
+
}
|
|
27
|
+
__name(collectSchemaExtensions, "collectSchemaExtensions");
|
|
28
|
+
function assertAddableColumn(owner, modelKey, fieldKey, field) {
|
|
29
|
+
const where = `${owner} adds "${modelKey}.${fieldKey}" to a table it does not own`;
|
|
30
|
+
if (field.primaryKey || field.unique || field.index || field.list) {
|
|
31
|
+
const what = field.primaryKey ? "a primary key" : field.unique ? "unique" : field.index ? "indexed" : "a list";
|
|
32
|
+
throw new Error(`${where}, which cannot be ${what}. Remove it from the extension.`);
|
|
33
|
+
}
|
|
34
|
+
if (field.nullable !== true && field.required !== false && field.default === void 0) {
|
|
35
|
+
throw new Error(
|
|
36
|
+
`${where}. The table may already have rows, so the column needs a \`default\` or \`nullable: true\`.`
|
|
37
|
+
);
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
__name(assertAddableColumn, "assertAddableColumn");
|
|
41
|
+
function isSchemaExtensionAllowed(allowExtend, extension) {
|
|
42
|
+
if (!allowExtend || !Object.prototype.hasOwnProperty.call(allowExtend, extension.owner)) {
|
|
43
|
+
return false;
|
|
44
|
+
}
|
|
45
|
+
const allowed = allowExtend[extension.owner] ?? [];
|
|
46
|
+
return allowed.includes(extension.modelKey) || allowed.includes(extension.table);
|
|
47
|
+
}
|
|
48
|
+
__name(isSchemaExtensionAllowed, "isSchemaExtensionAllowed");
|
|
49
|
+
function describeSchemaExtensionApproval(extension) {
|
|
50
|
+
return `schema: { allowExtend: { ${JSON.stringify(extension.owner)}: [${JSON.stringify(extension.modelKey)}] } }`;
|
|
51
|
+
}
|
|
52
|
+
__name(describeSchemaExtensionApproval, "describeSchemaExtensionApproval");
|
|
53
|
+
|
|
54
|
+
// src/schema-owner.ts
|
|
55
|
+
var FARM_SCHEMA_TABLES = /* @__PURE__ */ Symbol.for("farm.schema-tables");
|
|
56
|
+
function declareSchemaTables(target, declaration) {
|
|
57
|
+
Object.defineProperty(target, FARM_SCHEMA_TABLES, {
|
|
58
|
+
value: declaration,
|
|
59
|
+
enumerable: false,
|
|
60
|
+
configurable: true
|
|
61
|
+
});
|
|
62
|
+
return target;
|
|
63
|
+
}
|
|
64
|
+
__name(declareSchemaTables, "declareSchemaTables");
|
|
65
|
+
function readSchemaTables(candidate) {
|
|
66
|
+
if (!candidate || typeof candidate !== "object" && typeof candidate !== "function") {
|
|
67
|
+
return void 0;
|
|
68
|
+
}
|
|
69
|
+
return candidate[FARM_SCHEMA_TABLES];
|
|
70
|
+
}
|
|
71
|
+
__name(readSchemaTables, "readSchemaTables");
|
|
72
|
+
|
|
73
|
+
export {
|
|
74
|
+
collectSchemaExtensions,
|
|
75
|
+
isSchemaExtensionAllowed,
|
|
76
|
+
describeSchemaExtensionApproval,
|
|
77
|
+
FARM_SCHEMA_TABLES,
|
|
78
|
+
declareSchemaTables,
|
|
79
|
+
readSchemaTables
|
|
80
|
+
};
|
|
@@ -307,12 +307,11 @@ function hashFarmCacheKey(value) {
|
|
|
307
307
|
_chunkS3JO3N4Hcjs.__name.call(void 0, hashFarmCacheKey, "hashFarmCacheKey");
|
|
308
308
|
function toEventAttributes(event) {
|
|
309
309
|
const attributes = {};
|
|
310
|
-
const redactKey = typeof event.type === "string" && event.type.startsWith("cache.");
|
|
311
310
|
for (const [key, value] of Object.entries(event)) {
|
|
312
311
|
if (key === "timestamp" || key === "level" || key === "error" || key === "traceId" || key === "spanId" || key === "traceSampled" || value === void 0) {
|
|
313
312
|
continue;
|
|
314
313
|
}
|
|
315
|
-
if (
|
|
314
|
+
if (key === "key" && typeof value === "string") {
|
|
316
315
|
attributes["farm.key_hash"] = hashFarmCacheKey(value);
|
|
317
316
|
continue;
|
|
318
317
|
}
|
|
@@ -432,6 +431,7 @@ function emitFarmEvent(input) {
|
|
|
432
431
|
level: inferFarmEventLevel(input.type),
|
|
433
432
|
...input
|
|
434
433
|
};
|
|
434
|
+
if (event.type === "route.redirect") event.to = event.to.replace(/[?#][\s\S]*$/, "");
|
|
435
435
|
const traceContext = recordFarmEventTrace(event);
|
|
436
436
|
if (traceContext) {
|
|
437
437
|
event.traceId = traceContext.traceId;
|
|
@@ -553,7 +553,9 @@ function formatFarmEventDetails(event) {
|
|
|
553
553
|
"count"
|
|
554
554
|
]) {
|
|
555
555
|
const value = record[key];
|
|
556
|
-
if (value
|
|
556
|
+
if (key === "key" && typeof value === "string") {
|
|
557
|
+
details.push(`key_hash=${hashFarmCacheKey(value)}`);
|
|
558
|
+
} else if (value !== void 0) {
|
|
557
559
|
details.push(`${key}=${formatDetailValue(value)}`);
|
|
558
560
|
}
|
|
559
561
|
}
|
|
@@ -1,9 +1,12 @@
|
|
|
1
|
+
import {
|
|
2
|
+
FARM_ANONYMOUS_CLIENT_ADDRESS
|
|
3
|
+
} from "./chunk-BRYPZIMB.mjs";
|
|
1
4
|
import {
|
|
2
5
|
FARM_MARKDOWN_PAGE_CHECK_HEADER,
|
|
3
6
|
_getFarmMarkdownPageCheckToken,
|
|
4
7
|
createFarmMarkdownViewResponse,
|
|
5
8
|
requestAcceptsMarkdown
|
|
6
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-I6UVKUYK.mjs";
|
|
7
10
|
import {
|
|
8
11
|
__name
|
|
9
12
|
} from "./chunk-LPEX4YW6.mjs";
|
|
@@ -194,7 +197,7 @@ function hasOnlyAnonymousHeaders(headers) {
|
|
|
194
197
|
return true;
|
|
195
198
|
}
|
|
196
199
|
__name(hasOnlyAnonymousHeaders, "hasOnlyAnonymousHeaders");
|
|
197
|
-
var FARM_MARKDOWN_ANONYMOUS_CLIENT_ADDRESS =
|
|
200
|
+
var FARM_MARKDOWN_ANONYMOUS_CLIENT_ADDRESS = FARM_ANONYMOUS_CLIENT_ADDRESS;
|
|
198
201
|
async function createFarmMarkdownSourceResponse(options) {
|
|
199
202
|
if (options.request.method !== "GET" && options.request.method !== "HEAD") {
|
|
200
203
|
return null;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import {
|
|
2
|
+
__name
|
|
3
|
+
} from "./chunk-LPEX4YW6.mjs";
|
|
4
|
+
|
|
5
|
+
// src/plugin-integration-context.ts
|
|
6
|
+
var FARM_PLUGIN_INTEGRATION_CONTEXT = /* @__PURE__ */ Symbol.for("@farm.js/core/plugin-integration-context");
|
|
7
|
+
function setFarmPluginIntegrationContext(plugin, integration) {
|
|
8
|
+
Object.defineProperty(plugin, FARM_PLUGIN_INTEGRATION_CONTEXT, {
|
|
9
|
+
value: integration
|
|
10
|
+
});
|
|
11
|
+
}
|
|
12
|
+
__name(setFarmPluginIntegrationContext, "setFarmPluginIntegrationContext");
|
|
13
|
+
function getFarmPluginIntegrationContext(plugin) {
|
|
14
|
+
const value = plugin[FARM_PLUGIN_INTEGRATION_CONTEXT];
|
|
15
|
+
return value && typeof value === "object" ? value : void 0;
|
|
16
|
+
}
|
|
17
|
+
__name(getFarmPluginIntegrationContext, "getFarmPluginIntegrationContext");
|
|
18
|
+
|
|
19
|
+
export {
|
|
20
|
+
setFarmPluginIntegrationContext,
|
|
21
|
+
getFarmPluginIntegrationContext
|
|
22
|
+
};
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import {
|
|
2
|
+
__name
|
|
3
|
+
} from "./chunk-LPEX4YW6.mjs";
|
|
4
|
+
|
|
5
|
+
// src/middleware/server.ts
|
|
6
|
+
import { AsyncLocalStorage } from "async_hooks";
|
|
7
|
+
var MIDDLEWARE_DATA_STORE_KEY = /* @__PURE__ */ Symbol.for("farm.middlewareDataStore");
|
|
8
|
+
var MIDDLEWARE_CONTEXT_STORE_KEY = /* @__PURE__ */ Symbol.for("farm.middlewareContextStore");
|
|
9
|
+
function getGlobalMiddlewareStore(key) {
|
|
10
|
+
const state = globalThis;
|
|
11
|
+
const existing = state[key];
|
|
12
|
+
if (existing instanceof AsyncLocalStorage) {
|
|
13
|
+
return existing;
|
|
14
|
+
}
|
|
15
|
+
const store = new AsyncLocalStorage();
|
|
16
|
+
state[key] = store;
|
|
17
|
+
return store;
|
|
18
|
+
}
|
|
19
|
+
__name(getGlobalMiddlewareStore, "getGlobalMiddlewareStore");
|
|
20
|
+
var middlewareStore = getGlobalMiddlewareStore(MIDDLEWARE_DATA_STORE_KEY);
|
|
21
|
+
var middlewareContextStore = getGlobalMiddlewareStore(MIDDLEWARE_CONTEXT_STORE_KEY);
|
|
22
|
+
function toMiddlewareMap(data) {
|
|
23
|
+
if (data instanceof Map) {
|
|
24
|
+
return new Map(data);
|
|
25
|
+
}
|
|
26
|
+
return new Map(Object.entries(data));
|
|
27
|
+
}
|
|
28
|
+
__name(toMiddlewareMap, "toMiddlewareMap");
|
|
29
|
+
function _clearCurrentMiddlewareData() {
|
|
30
|
+
middlewareStore.enterWith(/* @__PURE__ */ new Map());
|
|
31
|
+
}
|
|
32
|
+
__name(_clearCurrentMiddlewareData, "_clearCurrentMiddlewareData");
|
|
33
|
+
function _clearCurrentMiddlewareContext() {
|
|
34
|
+
middlewareContextStore.enterWith(/* @__PURE__ */ new Map());
|
|
35
|
+
}
|
|
36
|
+
__name(_clearCurrentMiddlewareContext, "_clearCurrentMiddlewareContext");
|
|
37
|
+
async function _runWithMiddlewareData(data, fn) {
|
|
38
|
+
return middlewareStore.run(toMiddlewareMap(data), fn);
|
|
39
|
+
}
|
|
40
|
+
__name(_runWithMiddlewareData, "_runWithMiddlewareData");
|
|
41
|
+
async function _runWithMiddlewareContext(context, fn) {
|
|
42
|
+
return middlewareContextStore.run(toMiddlewareMap(context), fn);
|
|
43
|
+
}
|
|
44
|
+
__name(_runWithMiddlewareContext, "_runWithMiddlewareContext");
|
|
45
|
+
function getMiddlewareData() {
|
|
46
|
+
return middlewareStore.getStore() || /* @__PURE__ */ new Map();
|
|
47
|
+
}
|
|
48
|
+
__name(getMiddlewareData, "getMiddlewareData");
|
|
49
|
+
function getMiddlewareValue(key) {
|
|
50
|
+
const data = getMiddlewareData();
|
|
51
|
+
return data.get(key);
|
|
52
|
+
}
|
|
53
|
+
__name(getMiddlewareValue, "getMiddlewareValue");
|
|
54
|
+
function getMiddlewareContext() {
|
|
55
|
+
return middlewareContextStore.getStore() || /* @__PURE__ */ new Map();
|
|
56
|
+
}
|
|
57
|
+
__name(getMiddlewareContext, "getMiddlewareContext");
|
|
58
|
+
|
|
59
|
+
export {
|
|
60
|
+
_clearCurrentMiddlewareData,
|
|
61
|
+
_clearCurrentMiddlewareContext,
|
|
62
|
+
_runWithMiddlewareData,
|
|
63
|
+
_runWithMiddlewareContext,
|
|
64
|
+
getMiddlewareData,
|
|
65
|
+
getMiddlewareValue,
|
|
66
|
+
getMiddlewareContext
|
|
67
|
+
};
|
|
@@ -304,61 +304,6 @@ if (import.meta.hot) {
|
|
|
304
304
|
}
|
|
305
305
|
__name(generateFarmDevIndicatorsClientRuntime, "generateFarmDevIndicatorsClientRuntime");
|
|
306
306
|
|
|
307
|
-
// src/plugin-dependencies.ts
|
|
308
|
-
function pluginShortName(name) {
|
|
309
|
-
return name.slice(Math.max(name.lastIndexOf(":"), name.lastIndexOf("/")) + 1);
|
|
310
|
-
}
|
|
311
|
-
__name(pluginShortName, "pluginShortName");
|
|
312
|
-
function assertPluginDependencies(plugins, integrations) {
|
|
313
|
-
const integrationKeys = integrations && !Array.isArray(integrations) ? Object.keys(integrations) : [];
|
|
314
|
-
const matches = /* @__PURE__ */ __name((plugin, dependency) => plugin.name === dependency || pluginShortName(plugin.name) === dependency, "matches");
|
|
315
|
-
for (const plugin of plugins) {
|
|
316
|
-
if (plugin.dependsOn === void 0) continue;
|
|
317
|
-
if (!Array.isArray(plugin.dependsOn) || plugin.dependsOn.some((entry) => typeof entry !== "string" || entry.trim() === "")) {
|
|
318
|
-
throw new TypeError(
|
|
319
|
-
`Plugin "${plugin.name}" has an invalid \`dependsOn\`: list plugin names, such as ["teams"].`
|
|
320
|
-
);
|
|
321
|
-
}
|
|
322
|
-
for (const dependency of plugin.dependsOn) {
|
|
323
|
-
if (matches(plugin, dependency)) {
|
|
324
|
-
throw new Error(`Plugin "${plugin.name}" lists itself in \`dependsOn\`.`);
|
|
325
|
-
}
|
|
326
|
-
const found = plugins.some((candidate) => candidate !== plugin && matches(candidate, dependency)) || integrationKeys.includes(dependency);
|
|
327
|
-
if (!found) {
|
|
328
|
-
const configured = [
|
|
329
|
-
...plugins.map((candidate) => candidate.name),
|
|
330
|
-
...integrationKeys
|
|
331
|
-
].filter((name) => name !== plugin.name);
|
|
332
|
-
throw new Error(
|
|
333
|
-
`Plugin "${plugin.name}" depends on "${dependency}", which is not configured. Add it to \`plugins\` (or \`integrations\`) in farm.config.${configured.length > 0 ? ` Configured: ${configured.join(", ")}.` : ""}`
|
|
334
|
-
);
|
|
335
|
-
}
|
|
336
|
-
}
|
|
337
|
-
}
|
|
338
|
-
const state = /* @__PURE__ */ new Map();
|
|
339
|
-
const path3 = [];
|
|
340
|
-
const visit = /* @__PURE__ */ __name((plugin) => {
|
|
341
|
-
if (state.get(plugin) === "done") return;
|
|
342
|
-
if (state.get(plugin) === "visiting") {
|
|
343
|
-
const cycle = [...path3.slice(path3.indexOf(plugin)), plugin].map(
|
|
344
|
-
(entry) => pluginShortName(entry.name)
|
|
345
|
-
);
|
|
346
|
-
throw new Error(`Plugins depend on each other in a cycle: ${cycle.join(" \u2192 ")}.`);
|
|
347
|
-
}
|
|
348
|
-
state.set(plugin, "visiting");
|
|
349
|
-
path3.push(plugin);
|
|
350
|
-
for (const dependency of plugin.dependsOn ?? []) {
|
|
351
|
-
for (const candidate of plugins) {
|
|
352
|
-
if (candidate !== plugin && matches(candidate, dependency)) visit(candidate);
|
|
353
|
-
}
|
|
354
|
-
}
|
|
355
|
-
path3.pop();
|
|
356
|
-
state.set(plugin, "done");
|
|
357
|
-
}, "visit");
|
|
358
|
-
for (const plugin of plugins) visit(plugin);
|
|
359
|
-
}
|
|
360
|
-
__name(assertPluginDependencies, "assertPluginDependencies");
|
|
361
|
-
|
|
362
307
|
// src/utils/source-dir.ts
|
|
363
308
|
import path from "path";
|
|
364
309
|
var FARM_PROJECT_SOURCE_DIRS = /* @__PURE__ */ Symbol.for("farm.projectSourceDirs");
|
|
@@ -500,7 +445,5 @@ export {
|
|
|
500
445
|
resolveFarmDevIndicatorsConfig,
|
|
501
446
|
generateFarmDevIndicatorsClientRuntime,
|
|
502
447
|
resolveFarmAuthConfig,
|
|
503
|
-
resolveFarmAuthIntegration
|
|
504
|
-
pluginShortName,
|
|
505
|
-
assertPluginDependencies
|
|
448
|
+
resolveFarmAuthIntegration
|
|
506
449
|
};
|
|
@@ -1,33 +1,36 @@
|
|
|
1
1
|
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
appendMiddlewareDirectory,
|
|
3
|
+
appendMiddlewareRoutePath,
|
|
4
|
+
compareMiddlewareRouteLocations
|
|
5
|
+
} from "./chunk-LFHCG2DU.mjs";
|
|
5
6
|
import {
|
|
6
7
|
normalizeMiddlewareModule,
|
|
7
8
|
parseMiddlewareCookieHeader,
|
|
8
9
|
serializeMiddlewareCookie,
|
|
9
10
|
serializeMiddlewareCookieDeletion
|
|
10
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-JOW4HDJO.mjs";
|
|
11
12
|
import {
|
|
12
13
|
compileMiddlewareConfig,
|
|
13
14
|
compileMiddlewareRoute,
|
|
14
15
|
matchesMiddlewareConfigAt,
|
|
15
16
|
matchesMiddlewareRouteAt,
|
|
16
17
|
toMiddlewareRoutePathname
|
|
17
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-HKFBMHCD.mjs";
|
|
18
19
|
import {
|
|
19
20
|
createCliColors
|
|
20
21
|
} from "./chunk-I2BHUNBU.mjs";
|
|
21
22
|
import {
|
|
22
|
-
loadFarmDevModule,
|
|
23
23
|
toFileModuleUrl
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-7GNWGLWB.mjs";
|
|
25
|
+
import {
|
|
26
|
+
loadFarmDevModule
|
|
27
|
+
} from "./chunk-QCVIRVHE.mjs";
|
|
25
28
|
import {
|
|
26
29
|
logger
|
|
27
30
|
} from "./chunk-KI3MESHB.mjs";
|
|
28
31
|
import {
|
|
29
32
|
emitFarmEvent
|
|
30
|
-
} from "./chunk-
|
|
33
|
+
} from "./chunk-4GP3XZ4Z.mjs";
|
|
31
34
|
import {
|
|
32
35
|
sendWebResponse
|
|
33
36
|
} from "./chunk-Z2RZJZIZ.mjs";
|
|
@@ -41,7 +44,7 @@ import {
|
|
|
41
44
|
} from "./chunk-CBBLJMR5.mjs";
|
|
42
45
|
import {
|
|
43
46
|
resolveFarmRequestURL
|
|
44
|
-
} from "./chunk-
|
|
47
|
+
} from "./chunk-X3NGFVRF.mjs";
|
|
45
48
|
import {
|
|
46
49
|
stripFarmLocaleFromPathname
|
|
47
50
|
} from "./chunk-L3KT7IXV.mjs";
|
|
@@ -194,38 +197,6 @@ __name(createContext, "createContext");
|
|
|
194
197
|
// src/middleware/manager.ts
|
|
195
198
|
import * as fs from "fs";
|
|
196
199
|
import * as path from "path";
|
|
197
|
-
|
|
198
|
-
// src/middleware/path.ts
|
|
199
|
-
function appendMiddlewareRoutePath(routePath, directoryName) {
|
|
200
|
-
const marker = parseInterceptionMarker(directoryName);
|
|
201
|
-
if (marker) {
|
|
202
|
-
const owner = routePath.split("/").filter(Boolean);
|
|
203
|
-
const parts = [
|
|
204
|
-
...marker.root ? [] : owner.slice(0, Math.max(0, owner.length - marker.up)),
|
|
205
|
-
...marker.remainder ? [marker.remainder] : []
|
|
206
|
-
];
|
|
207
|
-
return `/${parts.join("/")}`;
|
|
208
|
-
}
|
|
209
|
-
if (directoryName.startsWith("(") && directoryName.endsWith(")") || isRouteSlotSegment(directoryName)) {
|
|
210
|
-
return routePath;
|
|
211
|
-
}
|
|
212
|
-
return routePath === "/" ? `/${directoryName}` : `${routePath}/${directoryName}`;
|
|
213
|
-
}
|
|
214
|
-
__name(appendMiddlewareRoutePath, "appendMiddlewareRoutePath");
|
|
215
|
-
function appendMiddlewareDirectory(directory, directoryName) {
|
|
216
|
-
return directory === "" ? directoryName : `${directory}/${directoryName}`;
|
|
217
|
-
}
|
|
218
|
-
__name(appendMiddlewareDirectory, "appendMiddlewareDirectory");
|
|
219
|
-
function countSegments(value) {
|
|
220
|
-
return value.split("/").filter(Boolean).length;
|
|
221
|
-
}
|
|
222
|
-
__name(countSegments, "countSegments");
|
|
223
|
-
function compareMiddlewareRouteLocations(left, right) {
|
|
224
|
-
return countSegments(left.path) - countSegments(right.path) || left.path.localeCompare(right.path) || countSegments(left.directory) - countSegments(right.directory) || left.directory.localeCompare(right.directory);
|
|
225
|
-
}
|
|
226
|
-
__name(compareMiddlewareRouteLocations, "compareMiddlewareRouteLocations");
|
|
227
|
-
|
|
228
|
-
// src/middleware/manager.ts
|
|
229
200
|
function isMiddlewareResponse(value) {
|
|
230
201
|
return value instanceof Response;
|
|
231
202
|
}
|
|
@@ -562,8 +533,5 @@ var MiddlewareManager = _MiddlewareManager;
|
|
|
562
533
|
|
|
563
534
|
export {
|
|
564
535
|
createContext,
|
|
565
|
-
appendMiddlewareRoutePath,
|
|
566
|
-
appendMiddlewareDirectory,
|
|
567
|
-
compareMiddlewareRouteLocations,
|
|
568
536
|
MiddlewareManager
|
|
569
537
|
};
|
|
@@ -67,18 +67,18 @@ function parseColonParam(segment) {
|
|
|
67
67
|
}
|
|
68
68
|
__name(parseColonParam, "parseColonParam");
|
|
69
69
|
var MATCHER_PARAM_NAME = /^[\p{L}\p{N}_$-]+$/u;
|
|
70
|
-
var
|
|
70
|
+
var MATCHER_UNSUPPORTED_LITERAL = /[()[\]|\\{}^$?:]|\.[*+]/;
|
|
71
71
|
var MATCHER_BRACKET_PARAM = /^\[\[\.\.\.(.+)\]\]$|^\[\.\.\.(.+)\]$|^\[(.+)\]$/;
|
|
72
72
|
function isSupportedMatcherSegment(segment) {
|
|
73
73
|
if (segment === "*" || segment === "**") return true;
|
|
74
74
|
if (segment.startsWith(":")) return MATCHER_PARAM_NAME.test(parseColonParam(segment).name);
|
|
75
75
|
const bracket = MATCHER_BRACKET_PARAM.exec(segment);
|
|
76
76
|
if (bracket) return MATCHER_PARAM_NAME.test(bracket[1] ?? bracket[2] ?? bracket[3]);
|
|
77
|
-
return !
|
|
77
|
+
return !MATCHER_UNSUPPORTED_LITERAL.test(segment);
|
|
78
78
|
}
|
|
79
79
|
__name(isSupportedMatcherSegment, "isSupportedMatcherSegment");
|
|
80
80
|
function isLiteralMatcherSegment(segment) {
|
|
81
|
-
return !
|
|
81
|
+
return !MATCHER_UNSUPPORTED_LITERAL.test(segment) && !segment.includes("*");
|
|
82
82
|
}
|
|
83
83
|
__name(isLiteralMatcherSegment, "isLiteralMatcherSegment");
|
|
84
84
|
function assertSupportedMiddlewareMatcher(pattern) {
|
|
@@ -88,7 +88,7 @@ function assertSupportedMiddlewareMatcher(pattern) {
|
|
|
88
88
|
const segments = path.split("/").filter(Boolean);
|
|
89
89
|
if (segments.every(subtree ? isLiteralMatcherSegment : isSupportedMatcherSegment)) return;
|
|
90
90
|
throw new Error(
|
|
91
|
-
`Middleware matcher "${pattern}" is not a supported string pattern, so it would never match a request and the middleware would not run. String matchers do not accept regular-expression syntax such as groups, alternation, character classes, or
|
|
91
|
+
`Middleware matcher "${pattern}" is not a supported string pattern, so it would never match a request and the middleware would not run. String matchers do not accept regular-expression syntax such as groups, alternation, character classes, lookaheads, or \`.*\`, or a param after literal text such as \`/user-:id\`. Pass a RegExp instead, for example \`matcher: /^\\/(?!api|_next).*/\`, or use the supported forms: /path/:param, /path/:param*, /path/[param], /path/[...param], /path/*, /path/**, or a trailing (.*) such as /path(.*).`
|
|
92
92
|
);
|
|
93
93
|
}
|
|
94
94
|
__name(assertSupportedMiddlewareMatcher, "assertSupportedMiddlewareMatcher");
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } 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 _chunkL6A26QT5cjs = require('./chunk-L6A26QT5.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
var
|
|
6
|
+
var _chunkALPWLT27cjs = require('./chunk-ALPWLT27.cjs');
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
var _chunkHLJ6MBUZcjs = require('./chunk-HLJ6MBUZ.cjs');
|
|
@@ -213,7 +213,7 @@ var _MiddlewareChainImpl = class _MiddlewareChainImpl {
|
|
|
213
213
|
*/
|
|
214
214
|
when(condition, fn) {
|
|
215
215
|
const conditionalMiddleware = /* @__PURE__ */ _chunkS3JO3N4Hcjs.__name.call(void 0, async (ctx, next) => {
|
|
216
|
-
const shouldRun = typeof condition === "function" ?
|
|
216
|
+
const shouldRun = typeof condition === "function" ? _chunkALPWLT27cjs.matchesMiddlewarePredicate.call(void 0, condition, ctx) : condition;
|
|
217
217
|
if (!shouldRun) {
|
|
218
218
|
return next();
|
|
219
219
|
}
|
|
@@ -418,7 +418,7 @@ function farmMiddlewarePlugin(options = {}) {
|
|
|
418
418
|
mode: server.config.mode === "production" ? "production" : "development",
|
|
419
419
|
basePath: _nullishCoalesce(options.basePath, () => ( "/"))
|
|
420
420
|
});
|
|
421
|
-
manager = new (0,
|
|
421
|
+
manager = new (0, _chunkL6A26QT5cjs.MiddlewareManager)(
|
|
422
422
|
getMiddlewareAppDirectory(server.config.root, srcDir),
|
|
423
423
|
server,
|
|
424
424
|
options.middleware,
|