@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
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
|
|
5
|
-
var
|
|
5
|
+
var _chunkBMOBTMDRcjs = require('./chunk-BMOBTMDR.cjs');
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
var _chunkI57LW5VZcjs = require('./chunk-I57LW5VZ.cjs');
|
|
@@ -41,10 +41,10 @@ async function handleFarmDefaultMCPRequest(request, context) {
|
|
|
41
41
|
return transportError(403, "Cross-origin requests are not allowed.");
|
|
42
42
|
}
|
|
43
43
|
const protocolHeader = request.headers.get("mcp-protocol-version");
|
|
44
|
-
if (protocolHeader && !
|
|
44
|
+
if (protocolHeader && !_chunkBMOBTMDRcjs.FARM_DEFAULT_MCP_PROTOCOL_VERSIONS.includes(protocolHeader.trim())) {
|
|
45
45
|
return transportError(
|
|
46
46
|
400,
|
|
47
|
-
`Unsupported MCP-Protocol-Version: ${protocolHeader.slice(0, 32)}. Supported: ${
|
|
47
|
+
`Unsupported MCP-Protocol-Version: ${protocolHeader.slice(0, 32)}. Supported: ${_chunkBMOBTMDRcjs.FARM_DEFAULT_MCP_PROTOCOL_VERSIONS.join(", ")}.`
|
|
48
48
|
);
|
|
49
49
|
}
|
|
50
50
|
const contentType = _nullishCoalesce(request.headers.get("content-type"), () => ( ""));
|
|
@@ -102,7 +102,7 @@ async function dispatch(method, params, request, context) {
|
|
|
102
102
|
switch (method) {
|
|
103
103
|
case "initialize": {
|
|
104
104
|
const requested = isRecord(params) ? params.protocolVersion : void 0;
|
|
105
|
-
const protocolVersion = typeof requested === "string" &&
|
|
105
|
+
const protocolVersion = typeof requested === "string" && _chunkBMOBTMDRcjs.FARM_DEFAULT_MCP_PROTOCOL_VERSIONS.includes(requested) ? requested : _chunkBMOBTMDRcjs.FARM_DEFAULT_MCP_PROTOCOL_VERSIONS[0];
|
|
106
106
|
return {
|
|
107
107
|
protocolVersion,
|
|
108
108
|
capabilities: { tools: { listChanged: false } },
|
|
@@ -110,7 +110,7 @@ async function dispatch(method, params, request, context) {
|
|
|
110
110
|
name: context.server.name,
|
|
111
111
|
version: context.server.version,
|
|
112
112
|
...context.server.title ? { title: context.server.title } : {},
|
|
113
|
-
description:
|
|
113
|
+
description: _chunkBMOBTMDRcjs.FARM_DEFAULT_MCP_DESCRIPTION
|
|
114
114
|
},
|
|
115
115
|
instructions: INSTRUCTIONS
|
|
116
116
|
};
|
|
@@ -118,7 +118,7 @@ async function dispatch(method, params, request, context) {
|
|
|
118
118
|
case "ping":
|
|
119
119
|
return {};
|
|
120
120
|
case "tools/list":
|
|
121
|
-
return { tools:
|
|
121
|
+
return { tools: _chunkBMOBTMDRcjs.FARM_DEFAULT_MCP_TOOLS };
|
|
122
122
|
case "tools/call":
|
|
123
123
|
return callTool(params, request, context);
|
|
124
124
|
default:
|
|
@@ -130,7 +130,7 @@ async function callTool(params, request, context) {
|
|
|
130
130
|
if (!isRecord(params) || typeof params.name !== "string") {
|
|
131
131
|
throw new FarmMCPRequestError(INVALID_PARAMS, "tools/call needs a tool name.");
|
|
132
132
|
}
|
|
133
|
-
const tool =
|
|
133
|
+
const tool = _chunkBMOBTMDRcjs.FARM_DEFAULT_MCP_TOOLS.find(({ name }) => name === params.name);
|
|
134
134
|
if (!tool) {
|
|
135
135
|
throw new FarmMCPRequestError(INVALID_PARAMS, `Unknown tool: ${params.name.slice(0, 64)}`);
|
|
136
136
|
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
|
+
|
|
3
|
+
var _chunkS3JO3N4Hcjs = require('./chunk-S3JO3N4H.cjs');
|
|
4
|
+
|
|
5
|
+
// src/utils/file-module.ts
|
|
6
|
+
var _url = require('url');
|
|
7
|
+
function toFileModuleUrl(filePath) {
|
|
8
|
+
return _url.pathToFileURL.call(void 0, filePath).href;
|
|
9
|
+
}
|
|
10
|
+
_chunkS3JO3N4Hcjs.__name.call(void 0, toFileModuleUrl, "toFileModuleUrl");
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
exports.toFileModuleUrl = toFileModuleUrl;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import {
|
|
2
|
+
__name
|
|
3
|
+
} from "./chunk-LPEX4YW6.mjs";
|
|
4
|
+
|
|
5
|
+
// src/schema-capabilities.ts
|
|
6
|
+
function assertNoSchemaListField(field, fieldPath, target) {
|
|
7
|
+
if (!field.list) {
|
|
8
|
+
return;
|
|
9
|
+
}
|
|
10
|
+
throw new Error(
|
|
11
|
+
`Schema field "${fieldPath}" declares list: true, but ${target} does not support list fields. Use type: "json" for an array value or model the values in a related table.`
|
|
12
|
+
);
|
|
13
|
+
}
|
|
14
|
+
__name(assertNoSchemaListField, "assertNoSchemaListField");
|
|
15
|
+
|
|
16
|
+
// src/schema-reference.ts
|
|
17
|
+
function isDatabaseEnforcedReference(reference) {
|
|
18
|
+
return reference.enforced === void 0 || reference.enforced === "db";
|
|
19
|
+
}
|
|
20
|
+
__name(isDatabaseEnforcedReference, "isDatabaseEnforcedReference");
|
|
21
|
+
|
|
22
|
+
export {
|
|
23
|
+
assertNoSchemaListField,
|
|
24
|
+
isDatabaseEnforcedReference
|
|
25
|
+
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
isEndpointFailure,
|
|
3
3
|
resolvePluginRoutes
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-2DMWQWNJ.mjs";
|
|
5
5
|
import {
|
|
6
6
|
registerAPIRouteShape
|
|
7
7
|
} from "./chunk-W3B4PKAW.mjs";
|
|
@@ -9,16 +9,18 @@ import {
|
|
|
9
9
|
omitFarmResponseBody
|
|
10
10
|
} from "./chunk-5WI2S4CO.mjs";
|
|
11
11
|
import {
|
|
12
|
+
parseRouteSchema,
|
|
13
|
+
toPublicValidationIssues,
|
|
12
14
|
validateIntegrationRequestOrigin
|
|
13
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-MGMF4VP7.mjs";
|
|
16
|
+
import {
|
|
17
|
+
resolveFarmAPICanonicalPathname
|
|
18
|
+
} from "./chunk-BTHHUD7Q.mjs";
|
|
14
19
|
import {
|
|
15
20
|
DEFAULT_FARM_SERVER_BODY_SIZE_LIMIT,
|
|
16
21
|
bufferFarmRequestBody,
|
|
17
22
|
createFarmRequestBodyErrorResponse
|
|
18
|
-
} from "./chunk-
|
|
19
|
-
import {
|
|
20
|
-
resolveFarmAPICanonicalPathname
|
|
21
|
-
} from "./chunk-BTHHUD7Q.mjs";
|
|
23
|
+
} from "./chunk-ZZGQD7A4.mjs";
|
|
22
24
|
import {
|
|
23
25
|
createStaticAPIRouteMatcher,
|
|
24
26
|
matchAPIRoute
|
|
@@ -34,25 +36,11 @@ import {
|
|
|
34
36
|
} from "./chunk-4SIYUGRY.mjs";
|
|
35
37
|
import {
|
|
36
38
|
_runWithCurrentRequest
|
|
37
|
-
} from "./chunk-
|
|
39
|
+
} from "./chunk-ZOABCQGT.mjs";
|
|
38
40
|
import {
|
|
39
41
|
__name
|
|
40
42
|
} from "./chunk-LPEX4YW6.mjs";
|
|
41
43
|
|
|
42
|
-
// src/api/route-schema.ts
|
|
43
|
-
async function parseRouteSchema(schema, value) {
|
|
44
|
-
if (schema.parseAsync) return schema.parseAsync(value);
|
|
45
|
-
if (schema["~standard"]) {
|
|
46
|
-
const result = await schema["~standard"].validate(value);
|
|
47
|
-
if (result.issues)
|
|
48
|
-
throw Object.assign(new Error("Validation failed"), { issues: result.issues });
|
|
49
|
-
return result.value;
|
|
50
|
-
}
|
|
51
|
-
if (schema.parse) return schema.parse(value);
|
|
52
|
-
throw new TypeError("Route validators must implement Standard Schema or parse().");
|
|
53
|
-
}
|
|
54
|
-
__name(parseRouteSchema, "parseRouteSchema");
|
|
55
|
-
|
|
56
44
|
// src/api/plugin-route-runtime.ts
|
|
57
45
|
function mergePluginAPIRoutes(existing, plugins, expected, options = {}) {
|
|
58
46
|
const routes = /* @__PURE__ */ new Map();
|
|
@@ -465,11 +453,7 @@ async function validateInput(schema, value, error) {
|
|
|
465
453
|
return Response.json(
|
|
466
454
|
{
|
|
467
455
|
error,
|
|
468
|
-
details: (validationError
|
|
469
|
-
path: issue.path,
|
|
470
|
-
message: issue.message,
|
|
471
|
-
code: issue.code
|
|
472
|
-
}))
|
|
456
|
+
details: toPublicValidationIssues(validationError)
|
|
473
457
|
},
|
|
474
458
|
{ status: 400 }
|
|
475
459
|
);
|
|
@@ -478,7 +462,6 @@ async function validateInput(schema, value, error) {
|
|
|
478
462
|
__name(validateInput, "validateInput");
|
|
479
463
|
|
|
480
464
|
export {
|
|
481
|
-
parseRouteSchema,
|
|
482
465
|
API_ROUTE_METHODS,
|
|
483
466
|
resolveAPIRouteEndpoint,
|
|
484
467
|
getAllowedAPIRouteMethods,
|
|
@@ -2,23 +2,6 @@ import {
|
|
|
2
2
|
__name
|
|
3
3
|
} from "./chunk-LPEX4YW6.mjs";
|
|
4
4
|
|
|
5
|
-
// src/schema-capabilities.ts
|
|
6
|
-
function assertNoSchemaListField(field, fieldPath, target) {
|
|
7
|
-
if (!field.list) {
|
|
8
|
-
return;
|
|
9
|
-
}
|
|
10
|
-
throw new Error(
|
|
11
|
-
`Schema field "${fieldPath}" declares list: true, but ${target} does not support list fields. Use type: "json" for an array value or model the values in a related table.`
|
|
12
|
-
);
|
|
13
|
-
}
|
|
14
|
-
__name(assertNoSchemaListField, "assertNoSchemaListField");
|
|
15
|
-
|
|
16
|
-
// src/schema-reference.ts
|
|
17
|
-
function isDatabaseEnforcedReference(reference) {
|
|
18
|
-
return reference.enforced === void 0 || reference.enforced === "db";
|
|
19
|
-
}
|
|
20
|
-
__name(isDatabaseEnforcedReference, "isDatabaseEnforcedReference");
|
|
21
|
-
|
|
22
5
|
// src/schema-primary-key.ts
|
|
23
6
|
var SUPPORTED_PRIMARY_KEY_TYPES = /* @__PURE__ */ new Set(["id", "uuid", "string", "integer"]);
|
|
24
7
|
function assertSupportedPrimaryKeyField(location, field) {
|
|
@@ -157,8 +140,6 @@ function cloneSchemaModel(model) {
|
|
|
157
140
|
__name(cloneSchemaModel, "cloneSchemaModel");
|
|
158
141
|
|
|
159
142
|
export {
|
|
160
|
-
assertNoSchemaListField,
|
|
161
|
-
isDatabaseEnforcedReference,
|
|
162
143
|
assertSupportedPrimaryKeyField,
|
|
163
144
|
resolveSchemaModels
|
|
164
145
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkFXFKIJDAcjs = require('./chunk-FXFKIJDA.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
@@ -17,17 +17,19 @@ var _chunkD2ULAULScjs = require('./chunk-D2ULAULS.cjs');
|
|
|
17
17
|
|
|
18
18
|
|
|
19
19
|
|
|
20
|
+
var _chunkBPOTSHDOcjs = require('./chunk-BPOTSHDO.cjs');
|
|
20
21
|
|
|
21
22
|
|
|
22
23
|
|
|
23
24
|
|
|
24
|
-
var _chunkE2ROOWQCcjs = require('./chunk-E2ROOWQC.cjs');
|
|
25
25
|
|
|
26
|
+
var _chunk4U5XZDLGcjs = require('./chunk-4U5XZDLG.cjs');
|
|
26
27
|
|
|
27
|
-
var _chunkJSROZYYOcjs = require('./chunk-JSROZYYO.cjs');
|
|
28
28
|
|
|
29
|
+
var _chunk6D24SDKOcjs = require('./chunk-6D24SDKO.cjs');
|
|
29
30
|
|
|
30
|
-
|
|
31
|
+
|
|
32
|
+
var _chunkRHGK2JENcjs = require('./chunk-RHGK2JEN.cjs');
|
|
31
33
|
|
|
32
34
|
|
|
33
35
|
var _chunkS3JO3N4Hcjs = require('./chunk-S3JO3N4H.cjs');
|
|
@@ -40,8 +42,8 @@ function collectSchemaDependencies(owners) {
|
|
|
40
42
|
const claimedKeys = /* @__PURE__ */ new Map();
|
|
41
43
|
for (const owner of owners) {
|
|
42
44
|
try {
|
|
43
|
-
known.set(owner.name,
|
|
44
|
-
for (const model of
|
|
45
|
+
known.set(owner.name, _chunk6D24SDKOcjs.resolveSchemaModels.call(void 0, owner.name, owner.schema));
|
|
46
|
+
for (const model of _chunkBPOTSHDOcjs.collectSchemaModels.call(void 0, [[owner.name, owner.schema, owner.models]])) {
|
|
45
47
|
creators.set(model.modelName.toLowerCase(), owner.name);
|
|
46
48
|
claimedKeys.set(model.modelKey, owner.name);
|
|
47
49
|
}
|
|
@@ -65,12 +67,12 @@ function collectSchemaDependencies(owners) {
|
|
|
65
67
|
if (creator && creator !== owner.name) needs.add(creator);
|
|
66
68
|
}, "add");
|
|
67
69
|
try {
|
|
68
|
-
for (const model of
|
|
70
|
+
for (const model of _chunkBPOTSHDOcjs.collectSchemaModels.call(void 0, [[owner.name, owner.schema, owner.models]])) {
|
|
69
71
|
for (const field of Object.values(model.model.fields)) {
|
|
70
72
|
if (field.reference) add(referencedTable(owner.name, field.reference.model));
|
|
71
73
|
}
|
|
72
74
|
}
|
|
73
|
-
for (const extension of
|
|
75
|
+
for (const extension of _chunk4U5XZDLGcjs.collectSchemaExtensions.call(void 0, owner.name, owner.schema, owner.models)) {
|
|
74
76
|
add(extension.table);
|
|
75
77
|
}
|
|
76
78
|
} catch (e2) {
|
|
@@ -119,17 +121,17 @@ _chunkS3JO3N4Hcjs.__name.call(void 0, withTimeout, "withTimeout");
|
|
|
119
121
|
var formatSeconds = /* @__PURE__ */ _chunkS3JO3N4Hcjs.__name.call(void 0, (ms) => ms < 1e3 ? `${ms}ms` : `${Number((ms / 1e3).toFixed(1))}s`, "formatSeconds");
|
|
120
122
|
function collectSchemaOwners(config) {
|
|
121
123
|
const owners = [];
|
|
122
|
-
const integrationSchemas =
|
|
124
|
+
const integrationSchemas = _chunkRHGK2JENcjs.getIntegrationSchemas.call(void 0, config.integrations);
|
|
123
125
|
let integrationClient;
|
|
124
126
|
for (const [name, schema] of Object.entries(integrationSchemas)) {
|
|
125
127
|
owners.push({
|
|
126
128
|
name,
|
|
127
129
|
kind: "integration",
|
|
128
130
|
schema,
|
|
129
|
-
resolveClient: /* @__PURE__ */ _chunkS3JO3N4Hcjs.__name.call(void 0, (resolved) => _nullishCoalesce(integrationClient, () => ( (integrationClient =
|
|
131
|
+
resolveClient: /* @__PURE__ */ _chunkS3JO3N4Hcjs.__name.call(void 0, (resolved) => _nullishCoalesce(integrationClient, () => ( (integrationClient = _chunkFXFKIJDAcjs.resolveIntegrationOrmRuntimeClient.call(void 0, { config: resolved })))), "resolveClient")
|
|
130
132
|
});
|
|
131
133
|
}
|
|
132
|
-
for (const declaration of
|
|
134
|
+
for (const declaration of _chunkBPOTSHDOcjs.findSchemaTableOwners.call(void 0, config)) {
|
|
133
135
|
if (owners.some((owner) => owner.name === declaration.name)) continue;
|
|
134
136
|
owners.push({
|
|
135
137
|
name: declaration.name,
|
|
@@ -159,7 +161,7 @@ function resolveSchemaExecutor(client, owner, timeoutMs) {
|
|
|
159
161
|
if (candidate === void 0 || candidate === null) continue;
|
|
160
162
|
let adapter;
|
|
161
163
|
try {
|
|
162
|
-
adapter =
|
|
164
|
+
adapter = _chunkBPOTSHDOcjs.createSchemaExecutor.call(void 0, candidate, owner);
|
|
163
165
|
} catch (e3) {
|
|
164
166
|
continue;
|
|
165
167
|
}
|
|
@@ -179,7 +181,7 @@ function resolveSchemaExecutor(client, owner, timeoutMs) {
|
|
|
179
181
|
return void 0;
|
|
180
182
|
}
|
|
181
183
|
_chunkS3JO3N4Hcjs.__name.call(void 0, resolveSchemaExecutor, "resolveSchemaExecutor");
|
|
182
|
-
var describeReferencedTable = /* @__PURE__ */ _chunkS3JO3N4Hcjs.__name.call(void 0, (database, table) =>
|
|
184
|
+
var describeReferencedTable = /* @__PURE__ */ _chunkS3JO3N4Hcjs.__name.call(void 0, (database, table) => _chunkBPOTSHDOcjs.describeSchemaTable.call(void 0, database.executor, database.dialect, table), "describeReferencedTable");
|
|
183
185
|
async function checkSchema(config, options = {}) {
|
|
184
186
|
const timeoutMs = _nullishCoalesce(options.timeoutMs, () => ( DEFAULT_TIMEOUT_MS));
|
|
185
187
|
if (!Number.isFinite(timeoutMs) || timeoutMs <= 0) {
|
|
@@ -191,7 +193,7 @@ async function checkSchema(config, options = {}) {
|
|
|
191
193
|
const issues = [];
|
|
192
194
|
const declared = /* @__PURE__ */ new Map();
|
|
193
195
|
for (const candidate of _nullishCoalesce(config.plugins, () => ( []))) {
|
|
194
|
-
const declaration =
|
|
196
|
+
const declaration = _chunk4U5XZDLGcjs.readSchemaTables.call(void 0, candidate);
|
|
195
197
|
if (!declaration) continue;
|
|
196
198
|
const schemas = _nullishCoalesce(declared.get(declaration.name), () => ( []));
|
|
197
199
|
if (!schemas.includes(declaration.schema)) schemas.push(declaration.schema);
|
|
@@ -212,8 +214,8 @@ async function checkSchema(config, options = {}) {
|
|
|
212
214
|
const ownedModels = /* @__PURE__ */ new Map();
|
|
213
215
|
for (const owner of owners) {
|
|
214
216
|
try {
|
|
215
|
-
knownModels.set(owner.name,
|
|
216
|
-
ownedModels.set(owner.name,
|
|
217
|
+
knownModels.set(owner.name, _chunk6D24SDKOcjs.resolveSchemaModels.call(void 0, owner.name, owner.schema));
|
|
218
|
+
ownedModels.set(owner.name, _chunkBPOTSHDOcjs.collectSchemaModels.call(void 0, [[owner.name, owner.schema, owner.models]]));
|
|
217
219
|
} catch (error) {
|
|
218
220
|
issues.push({
|
|
219
221
|
severity: "error",
|
|
@@ -329,7 +331,7 @@ async function checkSchema(config, options = {}) {
|
|
|
329
331
|
for (const owner of owners) {
|
|
330
332
|
if (!ownedModels.has(owner.name)) continue;
|
|
331
333
|
try {
|
|
332
|
-
const owned =
|
|
334
|
+
const owned = _chunk4U5XZDLGcjs.collectSchemaExtensions.call(void 0, owner.name, owner.schema, owner.models);
|
|
333
335
|
extensions.set(owner.name, owned);
|
|
334
336
|
for (const extension of owned) {
|
|
335
337
|
for (const { field } of extension.fields) {
|
|
@@ -369,9 +371,9 @@ async function checkSchema(config, options = {}) {
|
|
|
369
371
|
const database = databases.get(owner.name);
|
|
370
372
|
if (!models || !database) continue;
|
|
371
373
|
try {
|
|
372
|
-
const crossOwner = await
|
|
374
|
+
const crossOwner = await _chunkBPOTSHDOcjs.planCrossOwnerReferences.call(void 0,
|
|
373
375
|
owner,
|
|
374
|
-
|
|
376
|
+
_chunkBPOTSHDOcjs.findSchemaTableOwners.call(void 0, config),
|
|
375
377
|
database.dialect,
|
|
376
378
|
database.executor
|
|
377
379
|
);
|
|
@@ -384,7 +386,7 @@ async function checkSchema(config, options = {}) {
|
|
|
384
386
|
onDelete: reference.onDelete
|
|
385
387
|
};
|
|
386
388
|
}
|
|
387
|
-
const stepPlan = _optionalChain([owner, 'access', _30 => _30.migrations, 'optionalAccess', _31 => _31.length]) ? await
|
|
389
|
+
const stepPlan = _optionalChain([owner, 'access', _30 => _30.migrations, 'optionalAccess', _31 => _31.length]) ? await _chunkBPOTSHDOcjs.planOwnerSchemaSteps.call(void 0, {
|
|
388
390
|
owner: owner.name,
|
|
389
391
|
schema: owner.schema,
|
|
390
392
|
steps: owner.migrations,
|
|
@@ -399,15 +401,15 @@ async function checkSchema(config, options = {}) {
|
|
|
399
401
|
const plan = await checkOwnerTables(
|
|
400
402
|
owner,
|
|
401
403
|
// What a pending rename will produce is not missing yet.
|
|
402
|
-
|
|
404
|
+
_chunkBPOTSHDOcjs.withoutRenameTargets.call(void 0, models, stepPlan),
|
|
403
405
|
database.dialect,
|
|
404
406
|
database.executor,
|
|
405
407
|
issues
|
|
406
408
|
);
|
|
407
409
|
const pending = plan.statements.length + (_nullishCoalesce(_optionalChain([plan, 'access', _32 => _32.upgrades, 'optionalAccess', _33 => _33.length]), () => ( 0)));
|
|
408
|
-
const state = pending > 0 ? await
|
|
409
|
-
const changes = state ?
|
|
410
|
-
if (state && changes &&
|
|
410
|
+
const state = pending > 0 ? await _chunkBPOTSHDOcjs.readSchemaState.call(void 0, database.executor, database.dialect, owner.name) : void 0;
|
|
411
|
+
const changes = state ? _chunkBPOTSHDOcjs.diffSchemaSnapshots.call(void 0, state.snapshot, _chunkBPOTSHDOcjs.createSchemaSnapshot.call(void 0, models)) : void 0;
|
|
412
|
+
if (state && changes && _chunkBPOTSHDOcjs.hasSchemaChanges.call(void 0, changes)) {
|
|
411
413
|
const versions = state.version && owner.version && state.version !== owner.version ? `upgraded ${state.version} \u2192 ${owner.version}` : "changed since it was last migrated";
|
|
412
414
|
issues.push({
|
|
413
415
|
severity: "warning",
|
|
@@ -444,7 +446,7 @@ async function checkSchema(config, options = {}) {
|
|
|
444
446
|
}
|
|
445
447
|
_chunkS3JO3N4Hcjs.__name.call(void 0, checkSchema, "checkSchema");
|
|
446
448
|
async function checkOwnerTables(owner, models, dialect, executor, issues) {
|
|
447
|
-
const plan = await
|
|
449
|
+
const plan = await _chunkBPOTSHDOcjs.planSchemaMigration.call(void 0, models, dialect, executor);
|
|
448
450
|
const present = /* @__PURE__ */ new Set([
|
|
449
451
|
...plan.upToDate,
|
|
450
452
|
...plan.drift.map((drift) => drift.table),
|
|
@@ -525,7 +527,7 @@ async function checkOwnerTables(owner, models, dialect, executor, issues) {
|
|
|
525
527
|
table: key.table,
|
|
526
528
|
column: key.column,
|
|
527
529
|
message: `"${key.table}.${key.column}" has no foreign key to "${key.referencedTable}.${key.referencedColumn}", which ${owner.name} could have.`,
|
|
528
|
-
hint: dialect === "sqlite" ? "SQLite can only add a foreign key when it creates the table." : `Allow it with \`${
|
|
530
|
+
hint: dialect === "sqlite" ? "SQLite can only add a foreign key when it creates the table." : `Allow it with \`${_chunkBPOTSHDOcjs.describeForeignKeyApproval.call(void 0, { owner: owner.name, modelKey: key.modelKey })}\` in farm.config, then run \`farm ${owner.name} migrate --apply\`. Rows that point at nothing are checked first.`
|
|
529
531
|
});
|
|
530
532
|
}
|
|
531
533
|
return plan;
|
|
@@ -609,9 +611,9 @@ async function checkReferences(owner, models, database, databases, resolveTarget
|
|
|
609
611
|
continue;
|
|
610
612
|
}
|
|
611
613
|
if (database.dialect === "sqlite" || dialect === "sqlite") continue;
|
|
612
|
-
const expected =
|
|
613
|
-
const mine =
|
|
614
|
-
const theirs =
|
|
614
|
+
const expected = _chunkBPOTSHDOcjs.getSqlColumnType.call(void 0, field, database.dialect);
|
|
615
|
+
const mine = _chunkBPOTSHDOcjs.columnTypeFamily.call(void 0, expected);
|
|
616
|
+
const theirs = _chunkBPOTSHDOcjs.columnTypeFamily.call(void 0, column.type);
|
|
615
617
|
if (mine && theirs && mine !== theirs) {
|
|
616
618
|
issues.push({
|
|
617
619
|
severity: "warning",
|
|
@@ -630,7 +632,7 @@ _chunkS3JO3N4Hcjs.__name.call(void 0, checkReferences, "checkReferences");
|
|
|
630
632
|
async function checkExtensions(owner, extensions, databaseForTable, ownDatabase, allowExtend, issues) {
|
|
631
633
|
for (const extension of extensions) {
|
|
632
634
|
const database = _nullishCoalesce(databaseForTable(extension.table), () => ( ownDatabase));
|
|
633
|
-
const table = await
|
|
635
|
+
const table = await _chunkBPOTSHDOcjs.describeSchemaTable.call(void 0, database.executor, database.dialect, extension.table);
|
|
634
636
|
const columns = extension.fields.map(({ field }) => field.name);
|
|
635
637
|
if (!table) {
|
|
636
638
|
issues.push({
|
|
@@ -643,7 +645,7 @@ async function checkExtensions(owner, extensions, databaseForTable, ownDatabase,
|
|
|
643
645
|
});
|
|
644
646
|
continue;
|
|
645
647
|
}
|
|
646
|
-
const allowed =
|
|
648
|
+
const allowed = _chunk4U5XZDLGcjs.isSchemaExtensionAllowed.call(void 0, allowExtend, extension);
|
|
647
649
|
for (const { field } of extension.fields) {
|
|
648
650
|
const existing = table.columns.find(
|
|
649
651
|
(column) => database.dialect === "postgres" ? column.name === field.name : column.name.toLowerCase() === field.name.toLowerCase()
|
|
@@ -657,14 +659,14 @@ async function checkExtensions(owner, extensions, databaseForTable, ownDatabase,
|
|
|
657
659
|
table: extension.table,
|
|
658
660
|
column: field.name,
|
|
659
661
|
message: `${owner.name} needs "${extension.table}.${field.name}", which does not exist.`,
|
|
660
|
-
hint: allowed ? `Add it with ${command}. If your ORM owns "${extension.table}", add the column to its schema instead.` : `Allow it in farm.config with \`${
|
|
662
|
+
hint: allowed ? `Add it with ${command}. If your ORM owns "${extension.table}", add the column to its schema instead.` : `Allow it in farm.config with \`${_chunk4U5XZDLGcjs.describeSchemaExtensionApproval.call(void 0, extension)}\`, then add it with ${command}. If your ORM owns "${extension.table}", add the column to its schema instead.`
|
|
661
663
|
});
|
|
662
664
|
continue;
|
|
663
665
|
}
|
|
664
666
|
if (database.dialect === "sqlite") continue;
|
|
665
|
-
const expected =
|
|
666
|
-
const mine =
|
|
667
|
-
const theirs =
|
|
667
|
+
const expected = _chunkBPOTSHDOcjs.getSqlColumnType.call(void 0, field, database.dialect);
|
|
668
|
+
const mine = _chunkBPOTSHDOcjs.columnTypeFamily.call(void 0, expected);
|
|
669
|
+
const theirs = _chunkBPOTSHDOcjs.columnTypeFamily.call(void 0, existing.type);
|
|
668
670
|
if (mine && theirs && mine !== theirs) {
|
|
669
671
|
issues.push({
|
|
670
672
|
severity: "warning",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } }
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkGS3WR5HXcjs = require('./chunk-GS3WR5HX.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
var _chunkS3JO3N4Hcjs = require('./chunk-S3JO3N4H.cjs');
|
|
@@ -44,7 +44,7 @@ function emitFarmAgentRead(request, surface, status, view) {
|
|
|
44
44
|
} catch (e) {
|
|
45
45
|
return;
|
|
46
46
|
}
|
|
47
|
-
|
|
47
|
+
_chunkGS3WR5HXcjs.emitFarmEvent.call(void 0, {
|
|
48
48
|
type: "agent.read",
|
|
49
49
|
surface,
|
|
50
50
|
route,
|