@farm.js/core 0.1.38 → 0.1.40
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{agent-mcp-BwKlpnc7.d.mts → agent-mcp-DRlXq3lM.d.ts} +1 -1
- package/dist/{agent-mcp-De1imoMS.d.ts → agent-mcp-XNF4JqHw.d.mts} +1 -1
- package/dist/{agent-mcp-handler-OLRMZONF.mjs → agent-mcp-handler-HVV5LNXF.mjs} +6 -6
- package/dist/{agent-mcp-handler-MRGP3WJ3.cjs → agent-mcp-handler-YKG7KVCY.cjs} +7 -7
- package/dist/agent-runtime.cjs +10 -6
- package/dist/agent-runtime.d.mts +5 -7
- package/dist/agent-runtime.d.ts +5 -7
- package/dist/agent-runtime.mjs +9 -5
- package/dist/api/client.cjs +3 -3
- package/dist/api/client.d.mts +3 -3
- package/dist/api/client.d.ts +3 -3
- package/dist/api/client.mjs +2 -2
- package/dist/api/route-manager.cjs +15 -13
- package/dist/api/route-manager.d.mts +7 -9
- package/dist/api/route-manager.d.ts +7 -9
- package/dist/api/route-manager.mjs +14 -12
- package/dist/api/runtime.cjs +12 -10
- package/dist/api/runtime.d.mts +6 -8
- package/dist/api/runtime.d.ts +6 -8
- package/dist/api/runtime.mjs +11 -9
- package/dist/{api-client-CyFtZFJ4.d.ts → api-client-BJv9mTbO.d.ts} +2 -2
- package/dist/{api-client-BjMmY8OD.d.mts → api-client-Dk9QOLwr.d.mts} +2 -2
- package/dist/api.cjs +17 -15
- package/dist/api.d.mts +9 -11
- package/dist/api.d.ts +9 -11
- package/dist/api.mjs +16 -14
- package/dist/{app-kT_QXTdx.d.ts → app-CDJHPqZn.d.ts} +11 -4
- package/dist/{app-CFZt-srr.d.mts → app-CWjCklhF.d.mts} +11 -4
- package/dist/app-markdown.cjs +7 -6
- package/dist/app-markdown.d.mts +6 -8
- package/dist/app-markdown.d.ts +6 -8
- package/dist/app-markdown.mjs +6 -5
- package/dist/cache.cjs +6 -3
- package/dist/cache.d.mts +23 -2
- package/dist/cache.d.ts +23 -2
- package/dist/cache.mjs +5 -2
- package/dist/{chunk-3UEVPCGW.mjs → chunk-2DMWQWNJ.mjs} +6 -1
- package/dist/{chunk-ZXH4TS3F.cjs → chunk-2JG2LJDI.cjs} +3 -64
- package/dist/{chunk-QTXBII4Z.cjs → chunk-3TB5QGUW.cjs} +5 -5
- package/dist/chunk-45QJHGZM.cjs +1063 -0
- package/dist/{chunk-JCKYH4LG.mjs → chunk-45UZKX2J.mjs} +12 -44
- package/dist/{chunk-FUCSUGDM.cjs → chunk-4A3YUB4D.cjs} +3 -3
- package/dist/{chunk-FUZEBRP3.mjs → chunk-4GP3XZ4Z.mjs} +5 -3
- package/dist/chunk-4TLUFAIP.cjs +92 -0
- package/dist/chunk-4U5XZDLG.cjs +80 -0
- package/dist/{chunk-VXEEATVD.cjs → chunk-4XO5GSD6.cjs} +2 -2
- package/dist/{chunk-P664ZVTV.mjs → chunk-4ZZNPK25.mjs} +2 -2
- package/dist/{chunk-TGFQVLLF.cjs → chunk-54QWHSNR.cjs} +697 -422
- package/dist/{chunk-W36M2BQ4.mjs → chunk-5E65AL7P.mjs} +3 -3
- package/dist/{chunk-3LOLJTFV.cjs → chunk-5JEC43MQ.cjs} +11 -11
- package/dist/{chunk-INL3THCU.mjs → chunk-5LL6TKII.mjs} +1 -1
- package/dist/{chunk-KIIMAWOJ.cjs → chunk-5NAVKJCZ.cjs} +35 -105
- package/dist/{chunk-PGZDEPTM.cjs → chunk-5XS5NCVM.cjs} +10 -10
- package/dist/{chunk-HXRYZWTA.mjs → chunk-62DY5GKS.mjs} +3 -3
- package/dist/{chunk-LSKZMJMP.cjs → chunk-64SBBZDU.cjs} +38 -1
- package/dist/chunk-6BWKJ6QS.cjs +43 -0
- package/dist/{chunk-JSROZYYO.cjs → chunk-6D24SDKO.cjs} +1 -20
- package/dist/{chunk-EIPC3FDA.cjs → chunk-6ILGLCXF.cjs} +9 -5
- package/dist/chunk-6QOLZITB.cjs +22 -0
- package/dist/{chunk-CXEN47J3.mjs → chunk-73WX6PRY.mjs} +25 -0
- package/dist/{chunk-RW63BOV7.cjs → chunk-7FHZ3E6D.cjs} +2 -2
- package/dist/chunk-7GNWGLWB.mjs +14 -0
- package/dist/{chunk-34UCJRQO.cjs → chunk-7RNAKBWF.cjs} +2 -2
- package/dist/{chunk-MSSFIQGM.mjs → chunk-7VAJSSPG.mjs} +41 -10
- package/dist/{chunk-KHKLMNI5.mjs → chunk-ACLPN56I.mjs} +43 -25
- package/dist/{chunk-JCYYXBAJ.cjs → chunk-AGR7F3LA.cjs} +3 -3
- package/dist/{chunk-4GWRFP22.cjs → chunk-ALPWLT27.cjs} +35 -3
- package/dist/{chunk-IBUQWVYA.mjs → chunk-AX7S67YV.mjs} +43 -40
- package/dist/{chunk-CUM5NYL5.mjs → chunk-AXB5P7BK.mjs} +1 -1
- package/dist/{chunk-2ZYGC6SS.cjs → chunk-B6IMBBOS.cjs} +3 -3
- package/dist/{chunk-472NCAZ7.cjs → chunk-B77AUCBV.cjs} +3 -3
- package/dist/{chunk-FWE7LEQC.cjs → chunk-BD3D7EZV.cjs} +4 -4
- package/dist/{chunk-H5CLOUZS.cjs → chunk-BMOBTMDR.cjs} +5 -5
- package/dist/{chunk-CQMVIOYP.mjs → chunk-BPGO2IEP.mjs} +7 -7
- package/dist/{chunk-E2ROOWQC.cjs → chunk-BPOTSHDO.cjs} +24 -87
- package/dist/chunk-BRYPZIMB.mjs +6 -0
- package/dist/{chunk-WFRT7JPX.mjs → chunk-BYQVROIP.mjs} +2 -2
- package/dist/{chunk-HALDNTIV.mjs → chunk-BYR3RQPB.mjs} +10 -73
- package/dist/{chunk-IWZKTWHZ.cjs → chunk-CA62IQY3.cjs} +7 -2
- package/dist/chunk-CALY6QG6.mjs +963 -0
- package/dist/{chunk-WC5UV2HQ.cjs → chunk-CBXBGM72.cjs} +2 -2
- package/dist/{chunk-WW46B6HA.cjs → chunk-CGR525MJ.cjs} +84 -45
- package/dist/{chunk-6V4TDWEC.cjs → chunk-CGVPXIRN.cjs} +18 -1
- package/dist/{chunk-TYMMBFN2.mjs → chunk-CKFK3Z2V.mjs} +1 -1
- package/dist/chunk-CZS6OACQ.mjs +63 -0
- package/dist/{chunk-SGBJ247Q.cjs → chunk-D4ROBNTK.cjs} +2 -2
- package/dist/{chunk-WEW2JVA4.cjs → chunk-D5IHNDHI.cjs} +6 -6
- package/dist/{chunk-ULASELLA.cjs → chunk-DATEWH3W.cjs} +13 -1
- package/dist/{chunk-KKSTAEMY.cjs → chunk-DKU6NXRK.cjs} +1 -1
- package/dist/{chunk-NBBEQLOK.cjs → chunk-E55H6UKH.cjs} +9 -9
- package/dist/{chunk-YR2VBEMO.cjs → chunk-EGCT3AHF.cjs} +1455 -8187
- package/dist/{chunk-SDOTRX3V.cjs → chunk-EORXKFLR.cjs} +7 -7
- package/dist/{chunk-HD5CF3OE.mjs → chunk-ETPEZLS3.mjs} +2 -2
- package/dist/{chunk-2DD4JMQC.cjs → chunk-EW4MEVLE.cjs} +30 -30
- package/dist/{chunk-TUBTR2OP.mjs → chunk-FCOLU5P6.mjs} +1173 -7905
- package/dist/chunk-FGH3ZXTP.mjs +1063 -0
- package/dist/{chunk-Q3NXS4MU.cjs → chunk-FLZ4H25A.cjs} +44 -32
- package/dist/chunk-FVPXT2JR.cjs +63 -0
- package/dist/{chunk-D2ULAULS.cjs → chunk-FXFKIJDA.cjs} +9 -7
- package/dist/chunk-GC3EM6H4.mjs +80 -0
- package/dist/chunk-GKQL726H.cjs +6096 -0
- package/dist/{chunk-5PWXMJOH.cjs → chunk-GNVEJUT5.cjs} +36 -36
- package/dist/{chunk-E3UK5IIB.cjs → chunk-GS3WR5HX.cjs} +5 -3
- package/dist/{chunk-QFW2IH5E.mjs → chunk-GZTUT75U.mjs} +5 -2
- package/dist/chunk-H3EGVQE5.mjs +22 -0
- package/dist/{chunk-KCQBAKIY.cjs → chunk-H44XGLFU.cjs} +36 -68
- package/dist/{chunk-LI2F57NI.mjs → chunk-H56MQYEG.mjs} +1 -1
- package/dist/chunk-HANGSYMB.mjs +67 -0
- package/dist/{chunk-5BWWFHR2.mjs → chunk-HBEBV7OZ.mjs} +3 -3
- package/dist/{chunk-RSOJ7DRT.mjs → chunk-HCSVR4YZ.mjs} +1 -58
- package/dist/{chunk-HZFM2LWQ.mjs → chunk-HKFBMHCD.mjs} +34 -2
- package/dist/{chunk-MLY2RP5R.mjs → chunk-I63UCMXW.mjs} +6 -2
- package/dist/{chunk-TO4GJ56K.cjs → chunk-I64GEPOB.cjs} +58 -18
- package/dist/{chunk-VNGH5MLF.mjs → chunk-I6UVKUYK.mjs} +1 -1
- package/dist/{chunk-EPYU2EBL.mjs → chunk-IF4NU2NG.mjs} +1 -1
- package/dist/{chunk-IVLZZZEI.mjs → chunk-IM7DY3ED.mjs} +1 -1
- package/dist/{chunk-A3EAIURZ.mjs → chunk-IMQO6ZUU.mjs} +2 -2
- package/dist/{chunk-F5QO4FNE.mjs → chunk-INQ64HTJ.mjs} +43 -11
- package/dist/{chunk-XKVVMZP5.cjs → chunk-IRYK4Z5M.cjs} +4 -4
- package/dist/{chunk-UWPLULNK.mjs → chunk-JGHCKIRI.mjs} +84 -24
- package/dist/{chunk-7FPTZLKH.mjs → chunk-JIYYX7WU.mjs} +10 -8
- package/dist/{chunk-6MVFL3R5.cjs → chunk-JR4QCLJY.cjs} +1 -58
- package/dist/{chunk-Q2KB32T4.mjs → chunk-JXB6DVCO.mjs} +5 -5
- package/dist/{chunk-CGBDNNSM.cjs → chunk-KEXK442I.cjs} +44 -12
- package/dist/{chunk-5D2JIPLH.cjs → chunk-KK22JPQM.cjs} +10 -10
- package/dist/{chunk-EA5K5BKU.mjs → chunk-KNHBTJP6.mjs} +18 -1
- package/dist/{chunk-MVL2RAJW.mjs → chunk-KYN5ODF6.mjs} +1 -1
- package/dist/{chunk-TYJALEHQ.cjs → chunk-LDPKAYVS.cjs} +16 -16
- package/dist/chunk-LFHCG2DU.mjs +43 -0
- package/dist/{chunk-EK4QAEFZ.cjs → chunk-LZESP4IR.cjs} +25 -0
- package/dist/{chunk-FZ6YYU2W.mjs → chunk-MGMF4VP7.mjs} +38 -1
- package/dist/{chunk-EKF7KDFD.mjs → chunk-MNUSIXGS.mjs} +2 -2
- package/dist/{chunk-MYIZXDZA.mjs → chunk-MOSYH4CY.mjs} +1 -1
- package/dist/{chunk-4ZFL5GFN.cjs → chunk-OILHPMFX.cjs} +86 -26
- package/dist/{chunk-AJQTP4OO.mjs → chunk-OJ7JP7RJ.mjs} +1 -1
- package/dist/{chunk-7PEP3BUT.mjs → chunk-OLQ73ZO5.mjs} +2 -2
- package/dist/{chunk-5OKBARDN.cjs → chunk-OZN4XL6L.cjs} +10 -10
- package/dist/{chunk-T5OJPTVN.cjs → chunk-P4TYB4SF.cjs} +2 -2
- package/dist/chunk-P7XDC7UJ.mjs +92 -0
- package/dist/{chunk-4E5QXOCL.cjs → chunk-PGW7HZE2.cjs} +6 -6
- package/dist/{chunk-SHLXACIO.cjs → chunk-PJ42JESY.cjs} +1 -9
- package/dist/{chunk-U6QLDL3G.mjs → chunk-PNCM5MFD.mjs} +1 -1
- package/dist/{chunk-OAHTRMIC.mjs → chunk-PYQ3ZG4Z.mjs} +11 -11
- package/dist/{chunk-KMTGADN3.mjs → chunk-QCVIRVHE.mjs} +1 -9
- package/dist/{chunk-RWFLWR5J.cjs → chunk-QJM7A4CR.cjs} +17 -15
- package/dist/{chunk-VU6AAZVY.cjs → chunk-RHGK2JEN.cjs} +65 -62
- package/dist/{chunk-QV4VE2OW.mjs → chunk-S6ENKNNG.mjs} +5 -3
- package/dist/{chunk-EMO6K4YY.cjs → chunk-SHFXCE5A.cjs} +7 -7
- package/dist/{chunk-EKN7NSZO.cjs → chunk-SZLNU3GJ.cjs} +8 -5
- package/dist/{chunk-WLL43JMO.mjs → chunk-T36UJS3X.mjs} +7 -5
- package/dist/{chunk-CNNOLE4O.mjs → chunk-T4II4MMW.mjs} +1 -1
- package/dist/{chunk-B6G5CKMC.mjs → chunk-T6DLMX5V.mjs} +11 -11
- package/dist/{chunk-4IE345DM.cjs → chunk-TAKG7ZCD.cjs} +14 -14
- package/dist/{chunk-SKVTP5PR.mjs → chunk-TFX4RTH2.mjs} +1 -62
- package/dist/chunk-TI7UANHI.cjs +77 -0
- package/dist/{chunk-ND2CWPOD.mjs → chunk-TS4JHGUJ.mjs} +1 -1
- package/dist/{chunk-6BK3K2GB.mjs → chunk-UIDWEU7M.mjs} +83 -44
- package/dist/{chunk-DRLKAXDM.mjs → chunk-UM3ZV5EP.mjs} +2 -2
- package/dist/{chunk-YWN746US.cjs → chunk-UMQAK3KP.cjs} +85 -54
- package/dist/chunk-UNJZGVPU.cjs +6 -0
- package/dist/{chunk-XKG2BLFN.cjs → chunk-UXMIFB44.cjs} +18 -35
- package/dist/{chunk-DMEPTZTI.mjs → chunk-VBN3UAPQ.mjs} +47 -7
- package/dist/chunk-VDRM36QB.cjs +963 -0
- package/dist/{chunk-RG4A6LB2.cjs → chunk-VNPXKF3G.cjs} +7 -7
- package/dist/chunk-VQDBNVOO.cjs +14 -0
- package/dist/chunk-VQGKD7RV.mjs +25 -0
- package/dist/{chunk-6HB6V3R7.mjs → chunk-WCWV25PG.mjs} +10 -27
- package/dist/{chunk-ZMSZZXOR.mjs → chunk-WDMIW6Q6.mjs} +0 -19
- package/dist/{chunk-4WVJLURN.mjs → chunk-WMHG64DA.mjs} +1 -1
- package/dist/{chunk-L4DD7ODZ.cjs → chunk-WSOBCAYO.cjs} +37 -35
- package/dist/{chunk-ARC7I3O2.mjs → chunk-WW374SGU.mjs} +1 -1
- package/dist/{chunk-J63ZH5OQ.cjs → chunk-X3GMHKO3.cjs} +2 -2
- package/dist/{chunk-VT4WFRHA.mjs → chunk-XJAEZCT6.mjs} +1 -1
- package/dist/{chunk-OCIEZME4.mjs → chunk-XKIUHXHW.mjs} +618 -343
- package/dist/{chunk-6XWDE2P2.cjs → chunk-XVIEGKTT.cjs} +30 -5
- package/dist/{chunk-N32CC42M.cjs → chunk-Y2GNNXGV.cjs} +72 -54
- package/dist/{chunk-ZJD2PN6Z.mjs → chunk-Y4QVEU67.mjs} +30 -18
- package/dist/chunk-Y5RG6B7S.mjs +77 -0
- package/dist/{chunk-QRKIMN7T.mjs → chunk-Y6LRPO2K.mjs} +13 -1
- package/dist/{chunk-BZHXGVMA.mjs → chunk-YJBWB6GF.mjs} +5 -3
- package/dist/{chunk-WXJLNP33.cjs → chunk-YR2P74F7.cjs} +9 -7
- package/dist/chunk-YZAKIXRL.cjs +67 -0
- package/dist/chunk-ZKVJYQPO.mjs +6095 -0
- package/dist/{chunk-POSPE3IO.mjs → chunk-ZOABCQGT.mjs} +27 -2
- package/dist/chunk-ZQRCSUSB.cjs +25 -0
- package/dist/{chunk-ZMMBIVQM.mjs → chunk-ZZGQD7A4.mjs} +16 -86
- package/dist/{client-plugins-DUrIYX9B.d.mts → client-plugins-B_5QbNrp.d.mts} +2551 -2653
- package/dist/{client-plugins-BvlNhGEB.d.ts → client-plugins-DgSfIWIF.d.ts} +2551 -2653
- package/dist/client-plugins.d.mts +5 -7
- package/dist/client-plugins.d.ts +5 -7
- package/dist/client.cjs +7 -7
- package/dist/client.d.mts +11 -12
- package/dist/client.d.ts +11 -12
- package/dist/client.mjs +6 -6
- package/dist/config.d.mts +5 -7
- package/dist/config.d.ts +5 -7
- package/dist/{devtools-VQWJANJV.cjs → devtools-ANJ7JAPQ.cjs} +21 -18
- package/dist/{devtools-JYJNOLPQ.mjs → devtools-VEQQDVHE.mjs} +20 -17
- package/dist/docs.cjs +23 -20
- package/dist/docs.d.mts +6 -8
- package/dist/docs.d.ts +6 -8
- package/dist/docs.mjs +22 -19
- package/dist/{endpoint-CA-TNX60.d.ts → endpoint-BOE0IAaG.d.ts} +6 -3
- package/dist/{endpoint-CCHFqyTE.d.mts → endpoint-DGZRZHux.d.mts} +6 -3
- package/dist/environment/vite.cjs +6 -2
- package/dist/environment/vite.d.mts +11 -2
- package/dist/environment/vite.d.ts +11 -2
- package/dist/environment/vite.mjs +5 -1
- package/dist/headers.cjs +4 -4
- package/dist/headers.mjs +3 -3
- package/dist/image/server.cjs +7 -3
- package/dist/image/server.d.mts +9 -1
- package/dist/image/server.d.ts +9 -1
- package/dist/image/server.mjs +6 -2
- package/dist/image/sharp.cjs +12 -10
- package/dist/image/sharp.mjs +4 -2
- package/dist/index.cjs +89 -69
- package/dist/index.d.mts +27 -24
- package/dist/index.d.ts +27 -24
- package/dist/index.mjs +102 -82
- package/dist/{integration-api-BPJo5oXb.d.ts → integration-api-BuPHMeKz.d.ts} +2 -2
- package/dist/{integration-api-0y4FXJpC.d.mts → integration-api-DWyMmvrR.d.mts} +2 -2
- package/dist/integration-orm-P2II2EBK.cjs +14 -0
- package/dist/{integration-orm-KV5B3BGZ.mjs → integration-orm-RBKCIQYZ.mjs} +4 -3
- package/dist/integrations.cjs +7 -5
- package/dist/integrations.d.mts +7 -9
- package/dist/integrations.d.ts +7 -9
- package/dist/integrations.mjs +6 -4
- package/dist/internal/app-markdown-runtime.cjs +6 -5
- package/dist/internal/app-markdown-runtime.d.mts +6 -8
- package/dist/internal/app-markdown-runtime.d.ts +6 -8
- package/dist/internal/app-markdown-runtime.mjs +5 -4
- package/dist/internal/build-runtime.cjs +57 -56
- package/dist/internal/build-runtime.d.mts +7 -9
- package/dist/internal/build-runtime.d.ts +7 -9
- package/dist/internal/build-runtime.mjs +56 -55
- package/dist/internal/cli-runtime.cjs +36 -30
- package/dist/internal/cli-runtime.mjs +36 -30
- package/dist/internal/client-error-overlay.cjs +4 -4
- package/dist/internal/client-error-overlay.mjs +1 -1
- package/dist/internal/compression-runtime.d.mts +5 -7
- package/dist/internal/compression-runtime.d.ts +5 -7
- package/dist/internal/config-runtime.cjs +21 -18
- package/dist/internal/config-runtime.d.mts +6 -8
- package/dist/internal/config-runtime.d.ts +6 -8
- package/dist/internal/config-runtime.mjs +20 -17
- package/dist/internal/docs-precompiled-runtime.cjs +3 -3
- package/dist/internal/docs-precompiled-runtime.mjs +2 -2
- package/dist/internal/infra-analytics-runtime.cjs +7 -7
- package/dist/internal/infra-analytics-runtime.mjs +5 -5
- package/dist/internal/metadata-image-runtime.cjs +4 -3
- package/dist/internal/metadata-image-runtime.mjs +3 -2
- package/dist/internal/product-telemetry-runtime.cjs +2 -2
- package/dist/internal/product-telemetry-runtime.mjs +1 -1
- package/dist/internal/production-node-env.cjs +2 -2
- package/dist/internal/production-node-env.mjs +1 -1
- package/dist/internal/production-runtime.cjs +47 -28
- package/dist/internal/production-runtime.d.mts +25 -14
- package/dist/internal/production-runtime.d.ts +25 -14
- package/dist/internal/production-runtime.mjs +50 -31
- package/dist/layers-CM5i6T7z.d.mts +55 -0
- package/dist/layers-CM5i6T7z.d.ts +55 -0
- package/dist/markdown.cjs +4 -4
- package/dist/markdown.d.mts +5 -7
- package/dist/markdown.d.ts +5 -7
- package/dist/markdown.mjs +3 -3
- package/dist/middleware.cjs +16 -10
- package/dist/middleware.d.mts +7 -9
- package/dist/middleware.d.ts +7 -9
- package/dist/middleware.mjs +19 -13
- package/dist/navigation.cjs +6 -6
- package/dist/navigation.d.mts +8 -9
- package/dist/navigation.d.ts +8 -9
- package/dist/navigation.mjs +5 -5
- package/dist/{nitro-MPZJGPXK.mjs → nitro-NFG2LBRC.mjs} +3 -2
- package/dist/{nitro-7F65EZZS.cjs → nitro-S2QABUFA.cjs} +4 -3
- package/dist/observability.cjs +2 -2
- package/dist/observability.mjs +1 -1
- package/dist/plugin-DBBZ4JI2.cjs +32 -0
- package/dist/plugin-SYMK7PQ2.mjs +32 -0
- package/dist/plugin.cjs +56 -43
- package/dist/plugin.d.mts +23 -7
- package/dist/plugin.d.ts +23 -7
- package/dist/plugin.mjs +57 -44
- package/dist/{production-runtime-D2aMyzjr.d.ts → production-runtime-DfknD3g_.d.ts} +17 -3
- package/dist/{production-runtime-BQ4_WLwQ.d.mts → production-runtime-j_WCfuwB.d.mts} +17 -3
- package/dist/programmatic-routes-client-DcoxEaLe.d.mts +55 -0
- package/dist/programmatic-routes-client-DcoxEaLe.d.ts +55 -0
- package/dist/query/client.cjs +8 -8
- package/dist/query/client.mjs +3 -3
- package/dist/{render-plan-25p4hrj4.d.ts → render-plan-CFIhcYYS.d.ts} +1 -1
- package/dist/{render-plan-DtkXMN8D.d.mts → render-plan-ChUtsymc.d.mts} +1 -1
- package/dist/renderer-client.cjs +5 -5
- package/dist/renderer-client.d.mts +7 -8
- package/dist/renderer-client.d.ts +7 -8
- package/dist/renderer-client.mjs +2 -2
- package/dist/{request-DgCkIdcn.d.mts → request-F4HRwzSd.d.mts} +1 -1
- package/dist/{request-jF4jwx8f.d.ts → request-RJvelT8L.d.ts} +1 -1
- package/dist/request.cjs +3 -3
- package/dist/request.d.mts +6 -8
- package/dist/request.d.ts +6 -8
- package/dist/request.mjs +2 -2
- package/dist/{route-rendering-Bji6S6a_.d.ts → route-rendering-3a4fbNyC.d.mts} +1 -1
- package/dist/{route-rendering-CSBF78Ya.d.mts → route-rendering-D4coJ-kw.d.ts} +1 -1
- package/dist/{router-B09Ui3Qm.d.mts → router-DqIssGRO.d.mts} +1 -1
- package/dist/{router-CPB9cXtG.d.ts → router-WLEW3Te1.d.ts} +1 -1
- package/dist/routes.cjs +6 -5
- package/dist/routes.d.mts +5 -7
- package/dist/routes.d.ts +5 -7
- package/dist/routes.mjs +5 -4
- package/dist/{runtime-EDMwLdjv.d.ts → runtime-BrNdLOq9.d.ts} +3 -3
- package/dist/{runtime-CM6E6yuI.d.mts → runtime-CmE_j-js.d.mts} +3 -3
- package/dist/{schema-dev-notice-Y7MQEFGN.cjs → schema-dev-notice-5JPE67AI.cjs} +6 -4
- package/dist/{schema-dev-notice-O67CPXJ6.mjs → schema-dev-notice-WLPZ6WKU.mjs} +4 -2
- package/dist/server-action-security.cjs +4 -3
- package/dist/server-action-security.mjs +3 -2
- package/dist/server-client-bridge-DKWDl5NB.d.mts +7 -0
- package/dist/server-client-bridge-DKWDl5NB.d.ts +7 -0
- package/dist/server-fn-client.d.mts +3 -3
- package/dist/server-fn-client.d.ts +3 -3
- package/dist/server-fn.cjs +8 -7
- package/dist/server-fn.d.mts +1 -1
- package/dist/server-fn.d.ts +1 -1
- package/dist/server-fn.mjs +7 -6
- package/dist/server-plugins.cjs +5 -5
- package/dist/server-plugins.d.mts +6 -8
- package/dist/server-plugins.d.ts +6 -8
- package/dist/server-plugins.mjs +4 -4
- package/dist/server-query-client.d.mts +1 -1
- package/dist/server-query-client.d.ts +1 -1
- package/dist/server-query.cjs +9 -8
- package/dist/server-query.d.mts +1 -1
- package/dist/server-query.d.ts +1 -1
- package/dist/server-query.mjs +8 -7
- package/dist/server.cjs +97 -73
- package/dist/server.d.mts +16 -12
- package/dist/server.d.ts +16 -12
- package/dist/server.mjs +82 -58
- package/dist/{spa-router-Cgimzfbi.d.mts → spa-router-C41zjnFl.d.mts} +2 -2
- package/dist/{spa-router-B_N8XgVu.d.ts → spa-router-D_0VXqPC.d.ts} +2 -2
- package/dist/storage.cjs +6 -2
- package/dist/storage.d.mts +9 -1
- package/dist/storage.d.ts +9 -1
- package/dist/storage.mjs +5 -1
- package/dist/testing.cjs +20 -18
- package/dist/testing.d.mts +6 -8
- package/dist/testing.d.ts +6 -8
- package/dist/testing.mjs +16 -14
- package/dist/theme/server.cjs +4 -4
- package/dist/theme/server.mjs +3 -3
- package/dist/{utils-DZciYXYl.d.mts → utils-BKWSe3S7.d.mts} +1 -1
- package/dist/{utils-BNxAKAuT.d.ts → utils-YYcWsOJp.d.ts} +1 -1
- package/dist/version.cjs +2 -2
- package/dist/version.mjs +1 -1
- package/dist/vite.cjs +58 -45
- package/dist/vite.d.mts +92 -10
- package/dist/vite.d.ts +92 -10
- package/dist/vite.mjs +59 -46
- package/dist/{workflows-jZ4BcdoZ.d.ts → workflows-IWP1ddBm.d.mts} +5 -2
- package/dist/{workflows-jZ4BcdoZ.d.mts → workflows-IWP1ddBm.d.ts} +5 -2
- package/dist/workflows.cjs +4 -3
- package/dist/workflows.d.mts +1 -1
- package/dist/workflows.d.ts +1 -1
- package/dist/workflows.mjs +3 -2
- package/package.json +2 -1
- package/dist/chunk-3SDFA7UF.cjs +0 -701
- package/dist/chunk-E5GNDG5F.mjs +0 -701
- package/dist/integration-orm-55F7CII5.cjs +0 -13
|
@@ -3,38 +3,40 @@
|
|
|
3
3
|
|
|
4
4
|
|
|
5
5
|
|
|
6
|
+
var _chunkJR4QCLJYcjs = require('./chunk-JR4QCLJY.cjs');
|
|
6
7
|
|
|
7
|
-
var _chunk6MVFL3R5cjs = require('./chunk-6MVFL3R5.cjs');
|
|
8
8
|
|
|
9
9
|
|
|
10
|
-
var _chunkYJRZR7VUcjs = require('./chunk-YJRZR7VU.cjs');
|
|
11
10
|
|
|
11
|
+
var _chunkQ5B3KJBPcjs = require('./chunk-Q5B3KJBP.cjs');
|
|
12
12
|
|
|
13
13
|
|
|
14
|
+
var _chunkFVPXT2JRcjs = require('./chunk-FVPXT2JR.cjs');
|
|
14
15
|
|
|
15
|
-
var _chunkQ5B3KJBPcjs = require('./chunk-Q5B3KJBP.cjs');
|
|
16
16
|
|
|
17
|
+
var _chunkYJRZR7VUcjs = require('./chunk-YJRZR7VU.cjs');
|
|
17
18
|
|
|
18
19
|
|
|
19
|
-
var _chunkWBKEZXWEcjs = require('./chunk-WBKEZXWE.cjs');
|
|
20
20
|
|
|
21
|
+
var _chunkPSV6XKPOcjs = require('./chunk-PSV6XKPO.cjs');
|
|
21
22
|
|
|
22
23
|
|
|
23
|
-
var _chunkPSV6XKPOcjs = require('./chunk-PSV6XKPO.cjs');
|
|
24
24
|
|
|
25
25
|
|
|
26
26
|
|
|
27
|
+
var _chunk3TB5QGUWcjs = require('./chunk-3TB5QGUW.cjs');
|
|
27
28
|
|
|
28
29
|
|
|
29
|
-
var
|
|
30
|
+
var _chunkD5IHNDHIcjs = require('./chunk-D5IHNDHI.cjs');
|
|
30
31
|
|
|
31
32
|
|
|
32
|
-
var _chunkWEW2JVA4cjs = require('./chunk-WEW2JVA4.cjs');
|
|
33
33
|
|
|
34
34
|
|
|
35
|
+
var _chunkB6IMBBOScjs = require('./chunk-B6IMBBOS.cjs');
|
|
35
36
|
|
|
36
37
|
|
|
37
|
-
|
|
38
|
+
|
|
39
|
+
var _chunkWBKEZXWEcjs = require('./chunk-WBKEZXWE.cjs');
|
|
38
40
|
|
|
39
41
|
|
|
40
42
|
var _chunkYFPGHF5Fcjs = require('./chunk-YFPGHF5F.cjs');
|
|
@@ -43,7 +45,7 @@ var _chunkYFPGHF5Fcjs = require('./chunk-YFPGHF5F.cjs');
|
|
|
43
45
|
var _chunk6EXBPJ24cjs = require('./chunk-6EXBPJ24.cjs');
|
|
44
46
|
|
|
45
47
|
|
|
46
|
-
var
|
|
48
|
+
var _chunkP4TYB4SFcjs = require('./chunk-P4TYB4SF.cjs');
|
|
47
49
|
|
|
48
50
|
|
|
49
51
|
|
|
@@ -53,22 +55,22 @@ var _chunkVEKFLAQMcjs = require('./chunk-VEKFLAQM.cjs');
|
|
|
53
55
|
var _chunkOHY2ZWUGcjs = require('./chunk-OHY2ZWUG.cjs');
|
|
54
56
|
|
|
55
57
|
|
|
56
|
-
var
|
|
58
|
+
var _chunkD4ROBNTKcjs = require('./chunk-D4ROBNTK.cjs');
|
|
57
59
|
|
|
58
60
|
|
|
59
61
|
var _chunkUYIHRDE4cjs = require('./chunk-UYIHRDE4.cjs');
|
|
60
62
|
|
|
61
63
|
|
|
62
|
-
var
|
|
64
|
+
var _chunkEORXKFLRcjs = require('./chunk-EORXKFLR.cjs');
|
|
63
65
|
|
|
64
66
|
|
|
65
67
|
var _chunkOI6CMLWXcjs = require('./chunk-OI6CMLWX.cjs');
|
|
66
68
|
|
|
67
69
|
|
|
68
|
-
var
|
|
70
|
+
var _chunkRHGK2JENcjs = require('./chunk-RHGK2JEN.cjs');
|
|
69
71
|
|
|
70
72
|
|
|
71
|
-
var
|
|
73
|
+
var _chunkALPWLT27cjs = require('./chunk-ALPWLT27.cjs');
|
|
72
74
|
|
|
73
75
|
|
|
74
76
|
var _chunkHLJ6MBUZcjs = require('./chunk-HLJ6MBUZ.cjs');
|
|
@@ -77,6 +79,9 @@ var _chunkHLJ6MBUZcjs = require('./chunk-HLJ6MBUZ.cjs');
|
|
|
77
79
|
var _chunk5QIKR7RRcjs = require('./chunk-5QIKR7RR.cjs');
|
|
78
80
|
|
|
79
81
|
|
|
82
|
+
var _chunk5NAVKJCZcjs = require('./chunk-5NAVKJCZ.cjs');
|
|
83
|
+
|
|
84
|
+
|
|
80
85
|
var _chunkS3A45T7Fcjs = require('./chunk-S3A45T7F.cjs');
|
|
81
86
|
|
|
82
87
|
|
|
@@ -140,13 +145,13 @@ function resolveFarmAgentConfig(input, context = {}) {
|
|
|
140
145
|
const jsonLd = _optionalChain([input, 'optionalAccess', _ => _.jsonLd]);
|
|
141
146
|
return {
|
|
142
147
|
jsonLd: jsonLd === void 0 ? { ...DEFAULT_JSON_LD } : !jsonLd ? false : jsonLd === true ? {} : jsonLd,
|
|
143
|
-
noindexPreviews:
|
|
148
|
+
noindexPreviews: _chunk3TB5QGUWcjs.resolveFarmNoindexPreviews.call(void 0, _optionalChain([input, 'optionalAccess', _2 => _2.noindexPreviews])),
|
|
144
149
|
// The docs engine answers /llms.txt with its own pages; a default here would replace it.
|
|
145
150
|
// llms-full.txt renders every listed page, so it stays opt-in.
|
|
146
|
-
llmsTxt:
|
|
151
|
+
llmsTxt: _chunkD5IHNDHIcjs.resolveFarmLlmsTxtConfig.call(void 0, _nullishCoalesce(_optionalChain([input, 'optionalAccess', _3 => _3.llmsTxt]), () => ( (context.docs ? false : { full: false })))),
|
|
147
152
|
// Same rule as llms.txt: the docs engine answers /sitemap.xml with its own pages.
|
|
148
|
-
sitemap:
|
|
149
|
-
crawlers:
|
|
153
|
+
sitemap: _chunk3TB5QGUWcjs.resolveFarmAgentSitemap.call(void 0, _nullishCoalesce(_optionalChain([input, 'optionalAccess', _4 => _4.sitemap]), () => ( !context.docs))),
|
|
154
|
+
crawlers: _chunk3TB5QGUWcjs.resolveFarmAgentCrawlers.call(void 0, _optionalChain([input, 'optionalAccess', _5 => _5.crawlers])),
|
|
150
155
|
apiCatalog: resolveFarmAgentBoolean(_optionalChain([input, 'optionalAccess', _6 => _6.apiCatalog]), "apiCatalog", false),
|
|
151
156
|
aiCatalog: resolveFarmAgentBoolean(_optionalChain([input, 'optionalAccess', _7 => _7.aiCatalog]), "aiCatalog", true),
|
|
152
157
|
manifest: resolveFarmAgentBoolean(_optionalChain([input, 'optionalAccess', _8 => _8.manifest]), "manifest", true),
|
|
@@ -659,6 +664,13 @@ function validateRedirectConfigs(redirects, field) {
|
|
|
659
664
|
return redirects;
|
|
660
665
|
}
|
|
661
666
|
_chunkS3JO3N4Hcjs.__name.call(void 0, validateRedirectConfigs, "validateRedirectConfigs");
|
|
667
|
+
function validateMiddlewareConfig(middleware) {
|
|
668
|
+
for (const entry of Array.isArray(middleware) ? middleware : middleware ? [middleware] : []) {
|
|
669
|
+
_chunkALPWLT27cjs.compileMiddlewareConfig.call(void 0, { matcher: entry.matcher, exclude: entry.exclude });
|
|
670
|
+
}
|
|
671
|
+
return middleware;
|
|
672
|
+
}
|
|
673
|
+
_chunkS3JO3N4Hcjs.__name.call(void 0, validateMiddlewareConfig, "validateMiddlewareConfig");
|
|
662
674
|
function validateConfigRouteSources(routes, field) {
|
|
663
675
|
for (const [index, route] of routes.entries()) {
|
|
664
676
|
_chunkDVM4FKZLcjs.validateConfigRouteSource.call(void 0, route.source, `${field}[${index}].source`);
|
|
@@ -699,9 +711,9 @@ async function resolveConfig(userConfig, mode) {
|
|
|
699
711
|
const routeRules = _chunkQ5B3KJBPcjs.normalizeRouteRules.call(void 0, userConfig.routeRules);
|
|
700
712
|
const routeRuleRedirects = _chunkQ5B3KJBPcjs.routeRulesToRedirects.call(void 0, routeRules);
|
|
701
713
|
const routeRuleHeaders = _chunkQ5B3KJBPcjs.routeRulesToHeaders.call(void 0, routeRules);
|
|
702
|
-
const security =
|
|
703
|
-
const securityHeader =
|
|
704
|
-
if (
|
|
714
|
+
const security = _chunkB6IMBBOScjs.resolveFarmSecurityConfig.call(void 0, userConfig.security);
|
|
715
|
+
const securityHeader = _chunkB6IMBBOScjs.getFarmSecurityHeader.call(void 0, security);
|
|
716
|
+
if (_chunkB6IMBBOScjs.farmCspBlocksFrameworkInlineScripts.call(void 0, security)) {
|
|
705
717
|
_chunk5QIKR7RRcjs.logger.warn(
|
|
706
718
|
"security.csp blocks the inline scripts Farm injects for theming and hydration. Set security.csp.nonce to true for managed dynamic nonces and prerendered hashes, or make the governing script directive allow 'unsafe-inline' without a nonce, hash, or 'strict-dynamic' source."
|
|
707
719
|
);
|
|
@@ -709,21 +721,21 @@ async function resolveConfig(userConfig, mode) {
|
|
|
709
721
|
const deploy = resolveDeployConfig(userConfig);
|
|
710
722
|
const root = userConfig.root || process.cwd();
|
|
711
723
|
const srcDir = userConfig.srcDir || "src";
|
|
712
|
-
|
|
724
|
+
_chunkJR4QCLJYcjs.setFarmProjectSourceDir.call(void 0, root, srcDir);
|
|
713
725
|
const docs = await resolveDocsConfig(userConfig.docs, { root, srcDir });
|
|
714
|
-
const md =
|
|
726
|
+
const md = _chunkD4ROBNTKcjs.resolveMarkdownConfig.call(void 0, userConfig.md);
|
|
715
727
|
const mdx = _chunkOHY2ZWUGcjs.resolveMdxConfig.call(void 0, userConfig.mdx);
|
|
716
728
|
const env = _chunkVEKFLAQMcjs.resolveEnv.call(void 0, userConfig.env, process.env);
|
|
717
729
|
_chunkVEKFLAQMcjs.setEnv.call(void 0, env);
|
|
718
730
|
const api = await _chunkS3A45T7Fcjs.resolveFarmAPIConfig.call(void 0, userConfig.api, { root, mode, env });
|
|
719
|
-
const auth =
|
|
731
|
+
const auth = _chunkJR4QCLJYcjs.resolveFarmAuthConfig.call(void 0, userConfig.auth);
|
|
720
732
|
const mcp = resolveFarmMCPConfig(userConfig.mcp);
|
|
721
733
|
if (auth.enabled && _optionalChain([userConfig, 'access', _27 => _27.integrations, 'optionalAccess', _28 => _28.auth])) {
|
|
722
734
|
throw new Error(
|
|
723
735
|
"Choose either the top-level `auth` config or `integrations.auth`; they cannot both own the auth route."
|
|
724
736
|
);
|
|
725
737
|
}
|
|
726
|
-
const nativeAuthIntegration = await
|
|
738
|
+
const nativeAuthIntegration = await _chunkJR4QCLJYcjs.resolveFarmAuthIntegration.call(void 0, auth, {
|
|
727
739
|
root,
|
|
728
740
|
mode
|
|
729
741
|
});
|
|
@@ -766,7 +778,7 @@ async function resolveConfig(userConfig, mode) {
|
|
|
766
778
|
mdx,
|
|
767
779
|
migrations: resolveMigrationsConfig(userConfig.migrations),
|
|
768
780
|
cron: _chunk6EXBPJ24cjs.resolveCronConfig.call(void 0, userConfig.cron),
|
|
769
|
-
workflows:
|
|
781
|
+
workflows: _chunkEORXKFLRcjs.resolveWorkflowsConfig.call(void 0, userConfig.workflows),
|
|
770
782
|
api,
|
|
771
783
|
observability: _nullishCoalesce(userConfig.observability, () => ( false)),
|
|
772
784
|
telemetry: userConfig.telemetry !== false,
|
|
@@ -787,7 +799,7 @@ async function resolveConfig(userConfig, mode) {
|
|
|
787
799
|
},
|
|
788
800
|
agent: resolveFarmAgentConfig(userConfig.agent, { docs: docs.enabled }),
|
|
789
801
|
plugins: [
|
|
790
|
-
...
|
|
802
|
+
..._chunkRHGK2JENcjs.resolveIntegrationPlugins.call(void 0, integrations),
|
|
791
803
|
...nativeMCPPlugin ? [nativeMCPPlugin] : [],
|
|
792
804
|
...userConfig.plugins || []
|
|
793
805
|
],
|
|
@@ -802,28 +814,28 @@ async function resolveConfig(userConfig, mode) {
|
|
|
802
814
|
], "headers"),
|
|
803
815
|
routeRules,
|
|
804
816
|
images: _chunkYFPGHF5Fcjs.resolveFarmImageConfig.call(void 0, userConfig.images),
|
|
805
|
-
performance:
|
|
817
|
+
performance: _chunk3TB5QGUWcjs.resolveFarmPerformanceConfig.call(void 0, userConfig.performance),
|
|
806
818
|
theme: _chunkOI6CMLWXcjs.resolveFarmThemeConfig.call(void 0, userConfig.theme, basePath),
|
|
807
819
|
publicDir: userConfig.publicDir || "public",
|
|
808
820
|
i18n: _chunkHLJ6MBUZcjs.resolveFarmI18nConfig.call(void 0, userConfig.i18n, { root, mode, basePath }),
|
|
809
821
|
openapi,
|
|
810
|
-
middleware: userConfig.middleware || {},
|
|
822
|
+
middleware: validateMiddlewareConfig(userConfig.middleware) || {},
|
|
811
823
|
notFound: userConfig.notFound || {},
|
|
812
824
|
context: userConfig.context || (() => void 0),
|
|
813
|
-
server:
|
|
814
|
-
serverActions:
|
|
825
|
+
server: _chunk5NAVKJCZcjs.resolveFarmServerConfig.call(void 0, userConfig.server),
|
|
826
|
+
serverActions: _chunkP4TYB4SFcjs.resolveServerActionsConfig.call(void 0, userConfig.serverActions),
|
|
815
827
|
security,
|
|
816
828
|
deploymentId,
|
|
817
829
|
distDir: userConfig.distDir || ".farm",
|
|
818
830
|
generateBuildId,
|
|
819
831
|
compress: _nullishCoalesce(userConfig.compress, () => ( true)),
|
|
820
|
-
devIndicators:
|
|
832
|
+
devIndicators: _chunkJR4QCLJYcjs.resolveFarmDevIndicatorsConfig.call(void 0, userConfig.devIndicators, mode),
|
|
821
833
|
serverRuntimeConfig: userConfig.serverRuntimeConfig || {},
|
|
822
834
|
publicRuntimeConfig: userConfig.publicRuntimeConfig || {},
|
|
823
835
|
env,
|
|
824
836
|
vite: typeof userConfig.vite === "function" ? userConfig.vite({}) : userConfig.vite || {}
|
|
825
837
|
};
|
|
826
|
-
|
|
838
|
+
_chunkFVPXT2JRcjs.assertPluginDependencies.call(void 0, resolved.plugins, resolved.integrations);
|
|
827
839
|
return resolved;
|
|
828
840
|
}
|
|
829
841
|
_chunkS3JO3N4Hcjs.__name.call(void 0, resolveConfig, "resolveConfig");
|
|
@@ -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) {
|
|
@@ -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
|
+
};
|