@farm.js/core 0.1.39 → 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-BhneNPb4.d.mts → agent-mcp-DRlXq3lM.d.ts} +1 -1
- package/dist/{agent-mcp-HcTYQmNX.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-CMkoghtp.d.ts → app-CDJHPqZn.d.ts} +11 -4
- package/dist/{app-DVzmmbNO.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-QYMZOOC5.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-YFYUYWL7.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-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-PVZE2JGJ.mjs → chunk-ACLPN56I.mjs} +43 -25
- package/dist/{chunk-JCYYXBAJ.cjs → chunk-AGR7F3LA.cjs} +3 -3
- package/dist/{chunk-UPJLHLJU.cjs → chunk-ALPWLT27.cjs} +4 -4
- package/dist/{chunk-ATSDUUFK.mjs → chunk-AX7S67YV.mjs} +33 -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-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-677THUVP.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-QUCXCDE2.cjs → chunk-DKU6NXRK.cjs} +1 -1
- package/dist/{chunk-NBBEQLOK.cjs → chunk-E55H6UKH.cjs} +9 -9
- package/dist/{chunk-AS2VPMEE.cjs → chunk-EGCT3AHF.cjs} +1440 -8172
- package/dist/{chunk-SDOTRX3V.cjs → chunk-EORXKFLR.cjs} +7 -7
- package/dist/{chunk-HD5CF3OE.mjs → chunk-ETPEZLS3.mjs} +2 -2
- package/dist/{chunk-RVXFINNS.cjs → chunk-EW4MEVLE.cjs} +30 -30
- package/dist/{chunk-HYTZYOW2.mjs → chunk-FCOLU5P6.mjs} +1172 -7904
- package/dist/chunk-FGH3ZXTP.mjs +1063 -0
- package/dist/{chunk-HRETEZ2Z.cjs → chunk-FLZ4H25A.cjs} +37 -35
- 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-LMPAPBUA.cjs → chunk-H44XGLFU.cjs} +36 -68
- package/dist/{chunk-SOP2EAA6.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-P3PLW4FR.mjs → chunk-HKFBMHCD.mjs} +4 -4
- 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-YKZRDB5Z.mjs → chunk-IMQO6ZUU.mjs} +2 -2
- package/dist/{chunk-F5QO4FNE.mjs → chunk-INQ64HTJ.mjs} +43 -11
- package/dist/{chunk-BXDJXFQG.cjs → chunk-IRYK4Z5M.cjs} +4 -4
- package/dist/{chunk-UWPLULNK.mjs → chunk-JGHCKIRI.mjs} +84 -24
- package/dist/{chunk-BFJTHYTN.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-B5J2YVG7.cjs → chunk-LDPKAYVS.cjs} +2 -2
- package/dist/chunk-LFHCG2DU.mjs +43 -0
- package/dist/{chunk-FZ6YYU2W.mjs → chunk-MGMF4VP7.mjs} +38 -1
- package/dist/{chunk-KTSUBU2E.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-VWBHM3F6.mjs → chunk-OLQ73ZO5.mjs} +1 -1
- 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-5ULKUBIA.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-BWIQR4DH.cjs → chunk-RHGK2JEN.cjs} +56 -63
- package/dist/{chunk-QV4VE2OW.mjs → chunk-S6ENKNNG.mjs} +5 -3
- package/dist/{chunk-HRSAQ23K.cjs → chunk-SHFXCE5A.cjs} +4 -4
- 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-GKBWWRBG.mjs → chunk-T6DLMX5V.mjs} +11 -11
- package/dist/{chunk-CIOT4HGT.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-6BK3K2GB.mjs → chunk-UIDWEU7M.mjs} +83 -44
- package/dist/{chunk-EGCTIS5F.mjs → chunk-UM3ZV5EP.mjs} +1 -1
- 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-A657YSP4.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-ZUPXLIGB.mjs → chunk-XKIUHXHW.mjs} +618 -343
- package/dist/{chunk-6XWDE2P2.cjs → chunk-XVIEGKTT.cjs} +30 -5
- package/dist/{chunk-QG775BRV.cjs → chunk-Y2GNNXGV.cjs} +72 -54
- package/dist/{chunk-75HN5IZ3.mjs → chunk-Y4QVEU67.mjs} +21 -19
- 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-CsCuCLBz.d.mts → client-plugins-B_5QbNrp.d.mts} +2544 -2664
- package/dist/{client-plugins-D0ke-Hc8.d.ts → client-plugins-DgSfIWIF.d.ts} +2544 -2664
- package/dist/client-plugins.d.mts +5 -7
- package/dist/client-plugins.d.ts +5 -7
- package/dist/client.cjs +5 -5
- package/dist/client.d.mts +11 -12
- package/dist/client.d.ts +11 -12
- package/dist/client.mjs +4 -4
- package/dist/config.d.mts +5 -7
- package/dist/config.d.ts +5 -7
- package/dist/{devtools-LW4QQ5J3.cjs → devtools-ANJ7JAPQ.cjs} +21 -18
- package/dist/{devtools-5AFIPVUJ.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 +87 -67
- package/dist/index.d.mts +27 -24
- package/dist/index.d.ts +27 -24
- package/dist/index.mjs +100 -80
- 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 +56 -55
- package/dist/internal/build-runtime.d.mts +7 -9
- package/dist/internal/build-runtime.d.ts +7 -9
- package/dist/internal/build-runtime.mjs +55 -54
- 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 +44 -27
- package/dist/internal/production-runtime.d.mts +25 -14
- package/dist/internal/production-runtime.d.ts +25 -14
- package/dist/internal/production-runtime.mjs +47 -30
- 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 +4 -4
- package/dist/navigation.d.mts +8 -9
- package/dist/navigation.d.ts +8 -9
- package/dist/navigation.mjs +3 -3
- 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 +55 -42
- package/dist/plugin.d.mts +23 -7
- package/dist/plugin.d.ts +23 -7
- package/dist/plugin.mjs +56 -43
- package/dist/{production-runtime-BaI3WHnV.d.ts → production-runtime-DfknD3g_.d.ts} +17 -3
- package/dist/{production-runtime-DfRP0cV0.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 +2 -2
- package/dist/query/client.mjs +1 -1
- package/dist/{render-plan-CfIdJKAf.d.ts → render-plan-CFIhcYYS.d.ts} +1 -1
- package/dist/{render-plan-Dg8RBYFa.d.mts → render-plan-ChUtsymc.d.mts} +1 -1
- package/dist/renderer-client.d.mts +7 -8
- package/dist/renderer-client.d.ts +7 -8
- package/dist/{request-DfE02G_A.d.mts → request-F4HRwzSd.d.mts} +1 -1
- package/dist/{request-CEbHIIl4.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-C4oHbv6C.d.ts → route-rendering-3a4fbNyC.d.mts} +1 -1
- package/dist/{route-rendering-BHyOfXjD.d.mts → route-rendering-D4coJ-kw.d.ts} +1 -1
- package/dist/{router-DwhA61SB.d.mts → router-DqIssGRO.d.mts} +1 -1
- package/dist/{router-uRN_29Em.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-COk03hmx.d.ts → runtime-BrNdLOq9.d.ts} +3 -3
- package/dist/{runtime-BEdHhN4C.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 +96 -72
- package/dist/server.d.mts +16 -12
- package/dist/server.d.ts +16 -12
- package/dist/server.mjs +81 -57
- package/dist/{spa-router-w4aFOuyn.d.mts → spa-router-C41zjnFl.d.mts} +2 -2
- package/dist/{spa-router-DrVOBVGg.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-Dhuqwmd2.d.ts → utils-BKWSe3S7.d.mts} +1 -1
- package/dist/{utils-BtYehqeU.d.mts → utils-YYcWsOJp.d.ts} +1 -1
- package/dist/version.cjs +2 -2
- package/dist/version.mjs +1 -1
- package/dist/vite.cjs +57 -44
- package/dist/vite.d.mts +92 -10
- package/dist/vite.d.ts +92 -10
- package/dist/vite.mjs +58 -45
- 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,10 +3,10 @@ import {
|
|
|
3
3
|
} from "./chunk-F3VB7ONA.mjs";
|
|
4
4
|
import {
|
|
5
5
|
readSchemaTables
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-GC3EM6H4.mjs";
|
|
7
7
|
import {
|
|
8
8
|
resolveSchemaModels
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-WDMIW6Q6.mjs";
|
|
10
10
|
import {
|
|
11
11
|
mergeRouteRenderingDirectiveConfig
|
|
12
12
|
} from "./chunk-DAO7JGTS.mjs";
|
|
@@ -17,25 +17,25 @@ import {
|
|
|
17
17
|
import {
|
|
18
18
|
writeFileIfChanged
|
|
19
19
|
} from "./chunk-4JCQDWPX.mjs";
|
|
20
|
+
import {
|
|
21
|
+
resolveFarmComponentExtensions
|
|
22
|
+
} from "./chunk-DAATZTKJ.mjs";
|
|
20
23
|
import {
|
|
21
24
|
getFarmAppDirectories,
|
|
22
25
|
getFarmSourceRoots
|
|
23
26
|
} from "./chunk-BUGNQIHC.mjs";
|
|
24
|
-
import {
|
|
25
|
-
resolveFarmComponentExtensions
|
|
26
|
-
} from "./chunk-DAATZTKJ.mjs";
|
|
27
27
|
import {
|
|
28
28
|
parseRouteSlotFile
|
|
29
29
|
} from "./chunk-RHAZ22ZN.mjs";
|
|
30
30
|
import {
|
|
31
31
|
discoverProgrammaticRoutePaths
|
|
32
|
-
} from "./chunk-
|
|
32
|
+
} from "./chunk-MOSYH4CY.mjs";
|
|
33
33
|
import {
|
|
34
34
|
readFarmI18nCatalogs
|
|
35
35
|
} from "./chunk-QCFBDFRS.mjs";
|
|
36
36
|
import {
|
|
37
37
|
resolvePluginRoutes
|
|
38
|
-
} from "./chunk-
|
|
38
|
+
} from "./chunk-2DMWQWNJ.mjs";
|
|
39
39
|
import {
|
|
40
40
|
parseRoutePath
|
|
41
41
|
} from "./chunk-KI3MESHB.mjs";
|
|
@@ -1,8 +1,16 @@
|
|
|
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; } async function _asyncOptionalChain(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 = await fn(value); } else if (op === 'call' || op === 'optionalCall') { value = await 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
|
+
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
var _chunk4U5XZDLGcjs = require('./chunk-4U5XZDLG.cjs');
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
var _chunk6D24SDKOcjs = require('./chunk-6D24SDKO.cjs');
|
|
6
14
|
|
|
7
15
|
|
|
8
16
|
var _chunkS3JO3N4Hcjs = require('./chunk-S3JO3N4H.cjs');
|
|
@@ -47,7 +55,7 @@ function collectSchemaModels(entries) {
|
|
|
47
55
|
const collectedModels = [];
|
|
48
56
|
const seenModelNames = /* @__PURE__ */ new Map();
|
|
49
57
|
for (const [ownerKey, schema, only] of entries) {
|
|
50
|
-
const resolvedModels =
|
|
58
|
+
const resolvedModels = _chunk6D24SDKOcjs.resolveSchemaModels.call(void 0, ownerKey, schema);
|
|
51
59
|
for (const [modelKey, model] of Object.entries(resolvedModels)) {
|
|
52
60
|
if (only && !only.includes(modelKey)) continue;
|
|
53
61
|
if (model.external) continue;
|
|
@@ -126,7 +134,7 @@ function renderSqlTable(model, dialect, modelLookup) {
|
|
|
126
134
|
const columns = [];
|
|
127
135
|
const internalReferences = createInternalReferenceLookup(model, dialect, modelLookup);
|
|
128
136
|
for (const [fieldKey, field] of Object.entries(model.model.fields)) {
|
|
129
|
-
|
|
137
|
+
_chunkZQRCSUSBcjs.assertNoSchemaListField.call(void 0,
|
|
130
138
|
field,
|
|
131
139
|
`${model.ownerKey}.${model.modelKey}.${fieldKey}`,
|
|
132
140
|
`${dialect} SQL generation`
|
|
@@ -212,7 +220,7 @@ _chunkS3JO3N4Hcjs.__name.call(void 0, renderSqlIndexes, "renderSqlIndexes");
|
|
|
212
220
|
function createInternalReferenceLookup(model, dialect, modelLookup) {
|
|
213
221
|
const lookup = /* @__PURE__ */ new Map();
|
|
214
222
|
for (const [fieldKey, field] of Object.entries(model.model.fields)) {
|
|
215
|
-
if (!field.reference || !
|
|
223
|
+
if (!field.reference || !_chunkZQRCSUSBcjs.isDatabaseEnforcedReference.call(void 0, field.reference)) {
|
|
216
224
|
continue;
|
|
217
225
|
}
|
|
218
226
|
const referencedModel = modelLookup.get(`${model.ownerKey}.${field.reference.model}`);
|
|
@@ -326,7 +334,7 @@ function orderSchemaModelsByReferences(models, modelLookup) {
|
|
|
326
334
|
stack.push(model);
|
|
327
335
|
const dependencies = /* @__PURE__ */ new Set();
|
|
328
336
|
for (const field of Object.values(model.model.fields)) {
|
|
329
|
-
if (field.reference &&
|
|
337
|
+
if (field.reference && _chunkZQRCSUSBcjs.isDatabaseEnforcedReference.call(void 0, field.reference)) {
|
|
330
338
|
dependencies.add(`${model.ownerKey}.${field.reference.model}`);
|
|
331
339
|
}
|
|
332
340
|
}
|
|
@@ -867,7 +875,7 @@ _chunkS3JO3N4Hcjs.__name.call(void 0, collectExpectedIndexes, "collectExpectedIn
|
|
|
867
875
|
function collectExpectedReferences(model, modelLookup) {
|
|
868
876
|
const references = [];
|
|
869
877
|
for (const field of Object.values(model.model.fields)) {
|
|
870
|
-
if (!field.reference || !
|
|
878
|
+
if (!field.reference || !_chunkZQRCSUSBcjs.isDatabaseEnforcedReference.call(void 0, field.reference)) continue;
|
|
871
879
|
const target = modelLookup.get(`${model.ownerKey}.${field.reference.model}`);
|
|
872
880
|
if (!target) continue;
|
|
873
881
|
references.push({
|
|
@@ -1181,52 +1189,6 @@ function createSchemaExecutor(client, owner) {
|
|
|
1181
1189
|
}
|
|
1182
1190
|
_chunkS3JO3N4Hcjs.__name.call(void 0, createSchemaExecutor, "createSchemaExecutor");
|
|
1183
1191
|
|
|
1184
|
-
// src/schema-extend.ts
|
|
1185
|
-
function collectSchemaExtensions(owner, schema, models) {
|
|
1186
|
-
if (!schema.extend) return [];
|
|
1187
|
-
const resolved = _chunkJSROZYYOcjs.resolveSchemaModels.call(void 0, owner, schema);
|
|
1188
|
-
const extensions = [];
|
|
1189
|
-
for (const [modelKey, extension] of Object.entries(schema.extend)) {
|
|
1190
|
-
const model = resolved[modelKey];
|
|
1191
|
-
if (!model || !model.external && (!models || models.includes(modelKey))) continue;
|
|
1192
|
-
const fields = Object.keys(_nullishCoalesce(extension.fields, () => ( {}))).map((fieldKey) => {
|
|
1193
|
-
const field = model.fields[fieldKey];
|
|
1194
|
-
assertAddableColumn(owner, modelKey, fieldKey, field);
|
|
1195
|
-
return { fieldKey, field };
|
|
1196
|
-
});
|
|
1197
|
-
if (fields.length > 0) {
|
|
1198
|
-
extensions.push({ owner, modelKey, table: model.name, fields });
|
|
1199
|
-
}
|
|
1200
|
-
}
|
|
1201
|
-
return extensions;
|
|
1202
|
-
}
|
|
1203
|
-
_chunkS3JO3N4Hcjs.__name.call(void 0, collectSchemaExtensions, "collectSchemaExtensions");
|
|
1204
|
-
function assertAddableColumn(owner, modelKey, fieldKey, field) {
|
|
1205
|
-
const where = `${owner} adds "${modelKey}.${fieldKey}" to a table it does not own`;
|
|
1206
|
-
if (field.primaryKey || field.unique || field.index || field.list) {
|
|
1207
|
-
const what = field.primaryKey ? "a primary key" : field.unique ? "unique" : field.index ? "indexed" : "a list";
|
|
1208
|
-
throw new Error(`${where}, which cannot be ${what}. Remove it from the extension.`);
|
|
1209
|
-
}
|
|
1210
|
-
if (field.nullable !== true && field.required !== false && field.default === void 0) {
|
|
1211
|
-
throw new Error(
|
|
1212
|
-
`${where}. The table may already have rows, so the column needs a \`default\` or \`nullable: true\`.`
|
|
1213
|
-
);
|
|
1214
|
-
}
|
|
1215
|
-
}
|
|
1216
|
-
_chunkS3JO3N4Hcjs.__name.call(void 0, assertAddableColumn, "assertAddableColumn");
|
|
1217
|
-
function isSchemaExtensionAllowed(allowExtend, extension) {
|
|
1218
|
-
if (!allowExtend || !Object.prototype.hasOwnProperty.call(allowExtend, extension.owner)) {
|
|
1219
|
-
return false;
|
|
1220
|
-
}
|
|
1221
|
-
const allowed = _nullishCoalesce(allowExtend[extension.owner], () => ( []));
|
|
1222
|
-
return allowed.includes(extension.modelKey) || allowed.includes(extension.table);
|
|
1223
|
-
}
|
|
1224
|
-
_chunkS3JO3N4Hcjs.__name.call(void 0, isSchemaExtensionAllowed, "isSchemaExtensionAllowed");
|
|
1225
|
-
function describeSchemaExtensionApproval(extension) {
|
|
1226
|
-
return `schema: { allowExtend: { ${JSON.stringify(extension.owner)}: [${JSON.stringify(extension.modelKey)}] } }`;
|
|
1227
|
-
}
|
|
1228
|
-
_chunkS3JO3N4Hcjs.__name.call(void 0, describeSchemaExtensionApproval, "describeSchemaExtensionApproval");
|
|
1229
|
-
|
|
1230
1192
|
// src/schema-state.ts
|
|
1231
1193
|
var literal = /* @__PURE__ */ _chunkS3JO3N4Hcjs.__name.call(void 0, (dialect, value) => value === null ? "NULL" : `'${escapeSqlString(value, dialect)}'`, "literal");
|
|
1232
1194
|
var FARM_SCHEMA_STATE_TABLE = "farm_schema_state";
|
|
@@ -1396,7 +1358,7 @@ _chunkS3JO3N4Hcjs.__name.call(void 0, recordStatement, "recordStatement");
|
|
|
1396
1358
|
async function planSchemaSteps(input) {
|
|
1397
1359
|
const { owner, dialect, executor, applied } = input;
|
|
1398
1360
|
const plan = { steps: [], edited: [], fresh: input.fresh };
|
|
1399
|
-
const models =
|
|
1361
|
+
const models = _chunk6D24SDKOcjs.resolveSchemaModels.call(void 0, owner, input.schema);
|
|
1400
1362
|
const q = /* @__PURE__ */ _chunkS3JO3N4Hcjs.__name.call(void 0, (name) => quoteSqlIdentifier(dialect, name), "q");
|
|
1401
1363
|
const columnsOf = /* @__PURE__ */ _chunkS3JO3N4Hcjs.__name.call(void 0, async (table) => await _asyncOptionalChain([(await describeSchemaTable(executor, dialect, table)), 'optionalAccess', async _48 => _48.columns, 'access', async _49 => _49.map, 'call', async _50 => _50((column) => column.name)]), "columnsOf");
|
|
1402
1364
|
const has = /* @__PURE__ */ _chunkS3JO3N4Hcjs.__name.call(void 0, (columns, name) => Boolean(
|
|
@@ -1606,29 +1568,10 @@ async function planOwnerSchemaSteps(input) {
|
|
|
1606
1568
|
}
|
|
1607
1569
|
_chunkS3JO3N4Hcjs.__name.call(void 0, planOwnerSchemaSteps, "planOwnerSchemaSteps");
|
|
1608
1570
|
|
|
1609
|
-
// src/schema-owner.ts
|
|
1610
|
-
var FARM_SCHEMA_TABLES = /* @__PURE__ */ Symbol.for("farm.schema-tables");
|
|
1611
|
-
function declareSchemaTables(target, declaration) {
|
|
1612
|
-
Object.defineProperty(target, FARM_SCHEMA_TABLES, {
|
|
1613
|
-
value: declaration,
|
|
1614
|
-
enumerable: false,
|
|
1615
|
-
configurable: true
|
|
1616
|
-
});
|
|
1617
|
-
return target;
|
|
1618
|
-
}
|
|
1619
|
-
_chunkS3JO3N4Hcjs.__name.call(void 0, declareSchemaTables, "declareSchemaTables");
|
|
1620
|
-
function readSchemaTables(candidate) {
|
|
1621
|
-
if (!candidate || typeof candidate !== "object" && typeof candidate !== "function") {
|
|
1622
|
-
return void 0;
|
|
1623
|
-
}
|
|
1624
|
-
return candidate[FARM_SCHEMA_TABLES];
|
|
1625
|
-
}
|
|
1626
|
-
_chunkS3JO3N4Hcjs.__name.call(void 0, readSchemaTables, "readSchemaTables");
|
|
1627
|
-
|
|
1628
1571
|
// src/schema-foreign-keys.ts
|
|
1629
1572
|
async function planCrossOwnerReferences(owner, others, dialect, executor) {
|
|
1630
1573
|
const plan = { eligible: [], waiting: [], skipped: [] };
|
|
1631
|
-
const own =
|
|
1574
|
+
const own = _chunk6D24SDKOcjs.resolveSchemaModels.call(void 0, owner.name, owner.schema);
|
|
1632
1575
|
const creators = /* @__PURE__ */ new Map();
|
|
1633
1576
|
const byKey = /* @__PURE__ */ new Map();
|
|
1634
1577
|
for (const other of others) {
|
|
@@ -1644,7 +1587,7 @@ async function planCrossOwnerReferences(owner, others, dialect, executor) {
|
|
|
1644
1587
|
for (const model of collectSchemaModels([[owner.name, owner.schema, owner.models]])) {
|
|
1645
1588
|
for (const [fieldKey, field] of Object.entries(model.model.fields)) {
|
|
1646
1589
|
const reference = field.reference;
|
|
1647
|
-
if (!reference || !
|
|
1590
|
+
if (!reference || !_chunkZQRCSUSBcjs.isDatabaseEnforcedReference.call(void 0, reference)) continue;
|
|
1648
1591
|
const described = Object.prototype.hasOwnProperty.call(own, reference.model) ? own[reference.model].name : _optionalChain([byKey, 'access', _63 => _63.get, 'call', _64 => _64(reference.model), 'optionalAccess', _65 => _65.modelName]);
|
|
1649
1592
|
const creator = described ? creators.get(described.toLowerCase()) : void 0;
|
|
1650
1593
|
if (!creator) continue;
|
|
@@ -1718,7 +1661,7 @@ function findSchemaTableOwners(config) {
|
|
|
1718
1661
|
];
|
|
1719
1662
|
const owners = [];
|
|
1720
1663
|
for (const candidate of candidates) {
|
|
1721
|
-
const declaration = readSchemaTables(candidate);
|
|
1664
|
+
const declaration = _chunk4U5XZDLGcjs.readSchemaTables.call(void 0, candidate);
|
|
1722
1665
|
if (declaration && !owners.some((owner) => owner.name === declaration.name)) {
|
|
1723
1666
|
owners.push(declaration);
|
|
1724
1667
|
}
|
|
@@ -1865,13 +1808,13 @@ async function migrateSchemaTables(owner, options = {}) {
|
|
|
1865
1808
|
);
|
|
1866
1809
|
const foreignKeysUnapproved = dialect === "sqlite" ? [] : addable.filter((key) => !foreignKeysAllowed.includes(key));
|
|
1867
1810
|
const extensionsPlan = await planSchemaExtensions(
|
|
1868
|
-
collectSchemaExtensions(owner.name, owner.schema, owner.models),
|
|
1811
|
+
_chunk4U5XZDLGcjs.collectSchemaExtensions.call(void 0, owner.name, owner.schema, owner.models),
|
|
1869
1812
|
dialect,
|
|
1870
1813
|
executor
|
|
1871
1814
|
);
|
|
1872
1815
|
const allowExtend = _optionalChain([schemaConfig, 'optionalAccess', _79 => _79.allowExtend]);
|
|
1873
1816
|
const approved = reportOnly ? [] : extensionsPlan.statements.filter(
|
|
1874
|
-
(statement) => isSchemaExtensionAllowed(allowExtend, statement.extension)
|
|
1817
|
+
(statement) => _chunk4U5XZDLGcjs.isSchemaExtensionAllowed.call(void 0, allowExtend, statement.extension)
|
|
1875
1818
|
);
|
|
1876
1819
|
const unapproved = reportOnly ? [] : extensionsPlan.statements.filter((statement) => !approved.includes(statement));
|
|
1877
1820
|
const sql = formatSteps(stepPlan, "before", reportOnly) + formatSchemaMigration(plan, owner.name, {
|
|
@@ -1953,9 +1896,9 @@ ${describeSchemaDrift(plan.drift)}`
|
|
|
1953
1896
|
return result([]);
|
|
1954
1897
|
}
|
|
1955
1898
|
for (const approval of new Set(
|
|
1956
|
-
unapproved.map((statement) => describeSchemaExtensionApproval(statement.extension))
|
|
1899
|
+
unapproved.map((statement) => _chunk4U5XZDLGcjs.describeSchemaExtensionApproval.call(void 0, statement.extension))
|
|
1957
1900
|
)) {
|
|
1958
|
-
const columns = unapproved.filter((statement) => describeSchemaExtensionApproval(statement.extension) === approval).map((statement) => statement.target);
|
|
1901
|
+
const columns = unapproved.filter((statement) => _chunk4U5XZDLGcjs.describeSchemaExtensionApproval.call(void 0, statement.extension) === approval).map((statement) => statement.target);
|
|
1959
1902
|
log(
|
|
1960
1903
|
`Not allowed yet, so not added: ${columns.join(", ")}. To allow it, add to farm.config: ${approval}`
|
|
1961
1904
|
);
|
|
@@ -2139,7 +2082,7 @@ function formatExtensions(owner, groups) {
|
|
|
2139
2082
|
if (groups.unapproved.length > 0) {
|
|
2140
2083
|
const approvals = [
|
|
2141
2084
|
...new Set(
|
|
2142
|
-
groups.unapproved.map((statement) => describeSchemaExtensionApproval(statement.extension))
|
|
2085
|
+
groups.unapproved.map((statement) => _chunk4U5XZDLGcjs.describeSchemaExtensionApproval.call(void 0, statement.extension))
|
|
2143
2086
|
)
|
|
2144
2087
|
];
|
|
2145
2088
|
sections.push(
|
|
@@ -2216,10 +2159,4 @@ _chunkS3JO3N4Hcjs.__name.call(void 0, logExtensionProblems, "logExtensionProblem
|
|
|
2216
2159
|
|
|
2217
2160
|
|
|
2218
2161
|
|
|
2219
|
-
|
|
2220
|
-
|
|
2221
|
-
|
|
2222
|
-
|
|
2223
|
-
|
|
2224
|
-
|
|
2225
|
-
exports.describeSchemaReference = describeSchemaReference; exports.collectSchemaModels = collectSchemaModels; exports.generateSqlStatements = generateSqlStatements; exports.renderSqlSchemaFile = renderSqlSchemaFile; exports.getSqlColumnType = getSqlColumnType; exports.getSqlDefaultExpression = getSqlDefaultExpression; exports.isNullableField = isNullableField; exports.quoteSqlIdentifier = quoteSqlIdentifier; exports.toSnakeCase = toSnakeCase; exports.toPascalCase = toPascalCase; exports.toCamelCase = toCamelCase; exports.escapeSqlString = escapeSqlString; exports.planSchemaMigration = planSchemaMigration; exports.describeSchemaTable = describeSchemaTable; exports.applySchemaMigration = applySchemaMigration; exports.columnTypeFamily = columnTypeFamily; exports.planSchemaExtensions = planSchemaExtensions; exports.formatSchemaMigration = formatSchemaMigration; exports.describeSchemaDrift = describeSchemaDrift; exports.createSchemaExecutor = createSchemaExecutor; exports.collectSchemaExtensions = collectSchemaExtensions; exports.isSchemaExtensionAllowed = isSchemaExtensionAllowed; exports.describeSchemaExtensionApproval = describeSchemaExtensionApproval; exports.FARM_SCHEMA_STATE_TABLE = FARM_SCHEMA_STATE_TABLE; exports.createSchemaSnapshot = createSchemaSnapshot; exports.diffSchemaSnapshots = diffSchemaSnapshots; exports.hasSchemaChanges = hasSchemaChanges; exports.readSchemaState = readSchemaState; exports.FARM_SCHEMA_STEPS_TABLE = FARM_SCHEMA_STEPS_TABLE; exports.withoutRenameTargets = withoutRenameTargets; exports.planOwnerSchemaSteps = planOwnerSchemaSteps; exports.planCrossOwnerReferences = planCrossOwnerReferences; exports.describeForeignKeyApproval = describeForeignKeyApproval; exports.FARM_SCHEMA_TABLES = FARM_SCHEMA_TABLES; exports.declareSchemaTables = declareSchemaTables; exports.readSchemaTables = readSchemaTables; exports.findSchemaTableOwners = findSchemaTableOwners; exports.collectOwnerModels = collectOwnerModels; exports.migrateSchemaTables = migrateSchemaTables;
|
|
2162
|
+
exports.describeSchemaReference = describeSchemaReference; exports.collectSchemaModels = collectSchemaModels; exports.generateSqlStatements = generateSqlStatements; exports.renderSqlSchemaFile = renderSqlSchemaFile; exports.getSqlColumnType = getSqlColumnType; exports.getSqlDefaultExpression = getSqlDefaultExpression; exports.isNullableField = isNullableField; exports.quoteSqlIdentifier = quoteSqlIdentifier; exports.toSnakeCase = toSnakeCase; exports.toPascalCase = toPascalCase; exports.toCamelCase = toCamelCase; exports.escapeSqlString = escapeSqlString; exports.planSchemaMigration = planSchemaMigration; exports.describeSchemaTable = describeSchemaTable; exports.applySchemaMigration = applySchemaMigration; exports.columnTypeFamily = columnTypeFamily; exports.planSchemaExtensions = planSchemaExtensions; exports.formatSchemaMigration = formatSchemaMigration; exports.describeSchemaDrift = describeSchemaDrift; exports.createSchemaExecutor = createSchemaExecutor; exports.FARM_SCHEMA_STATE_TABLE = FARM_SCHEMA_STATE_TABLE; exports.createSchemaSnapshot = createSchemaSnapshot; exports.diffSchemaSnapshots = diffSchemaSnapshots; exports.hasSchemaChanges = hasSchemaChanges; exports.readSchemaState = readSchemaState; exports.FARM_SCHEMA_STEPS_TABLE = FARM_SCHEMA_STEPS_TABLE; exports.withoutRenameTargets = withoutRenameTargets; exports.planOwnerSchemaSteps = planOwnerSchemaSteps; exports.planCrossOwnerReferences = planCrossOwnerReferences; exports.describeForeignKeyApproval = describeForeignKeyApproval; exports.findSchemaTableOwners = findSchemaTableOwners; exports.collectOwnerModels = collectOwnerModels; exports.migrateSchemaTables = migrateSchemaTables;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
isFarmMetadataNoIndex
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-ETPEZLS3.mjs";
|
|
4
4
|
import {
|
|
5
5
|
matchesFarmMarkdownRoutePattern
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-I6UVKUYK.mjs";
|
|
7
7
|
import {
|
|
8
8
|
applyFarmBasePath
|
|
9
9
|
} from "./chunk-4RB44K6Z.mjs";
|
|
@@ -1,8 +1,16 @@
|
|
|
1
1
|
import {
|
|
2
2
|
assertNoSchemaListField,
|
|
3
|
-
isDatabaseEnforcedReference
|
|
3
|
+
isDatabaseEnforcedReference
|
|
4
|
+
} from "./chunk-VQGKD7RV.mjs";
|
|
5
|
+
import {
|
|
6
|
+
collectSchemaExtensions,
|
|
7
|
+
describeSchemaExtensionApproval,
|
|
8
|
+
isSchemaExtensionAllowed,
|
|
9
|
+
readSchemaTables
|
|
10
|
+
} from "./chunk-GC3EM6H4.mjs";
|
|
11
|
+
import {
|
|
4
12
|
resolveSchemaModels
|
|
5
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-WDMIW6Q6.mjs";
|
|
6
14
|
import {
|
|
7
15
|
__name
|
|
8
16
|
} from "./chunk-LPEX4YW6.mjs";
|
|
@@ -1181,52 +1189,6 @@ function createSchemaExecutor(client, owner) {
|
|
|
1181
1189
|
}
|
|
1182
1190
|
__name(createSchemaExecutor, "createSchemaExecutor");
|
|
1183
1191
|
|
|
1184
|
-
// src/schema-extend.ts
|
|
1185
|
-
function collectSchemaExtensions(owner, schema, models) {
|
|
1186
|
-
if (!schema.extend) return [];
|
|
1187
|
-
const resolved = resolveSchemaModels(owner, schema);
|
|
1188
|
-
const extensions = [];
|
|
1189
|
-
for (const [modelKey, extension] of Object.entries(schema.extend)) {
|
|
1190
|
-
const model = resolved[modelKey];
|
|
1191
|
-
if (!model || !model.external && (!models || models.includes(modelKey))) continue;
|
|
1192
|
-
const fields = Object.keys(extension.fields ?? {}).map((fieldKey) => {
|
|
1193
|
-
const field = model.fields[fieldKey];
|
|
1194
|
-
assertAddableColumn(owner, modelKey, fieldKey, field);
|
|
1195
|
-
return { fieldKey, field };
|
|
1196
|
-
});
|
|
1197
|
-
if (fields.length > 0) {
|
|
1198
|
-
extensions.push({ owner, modelKey, table: model.name, fields });
|
|
1199
|
-
}
|
|
1200
|
-
}
|
|
1201
|
-
return extensions;
|
|
1202
|
-
}
|
|
1203
|
-
__name(collectSchemaExtensions, "collectSchemaExtensions");
|
|
1204
|
-
function assertAddableColumn(owner, modelKey, fieldKey, field) {
|
|
1205
|
-
const where = `${owner} adds "${modelKey}.${fieldKey}" to a table it does not own`;
|
|
1206
|
-
if (field.primaryKey || field.unique || field.index || field.list) {
|
|
1207
|
-
const what = field.primaryKey ? "a primary key" : field.unique ? "unique" : field.index ? "indexed" : "a list";
|
|
1208
|
-
throw new Error(`${where}, which cannot be ${what}. Remove it from the extension.`);
|
|
1209
|
-
}
|
|
1210
|
-
if (field.nullable !== true && field.required !== false && field.default === void 0) {
|
|
1211
|
-
throw new Error(
|
|
1212
|
-
`${where}. The table may already have rows, so the column needs a \`default\` or \`nullable: true\`.`
|
|
1213
|
-
);
|
|
1214
|
-
}
|
|
1215
|
-
}
|
|
1216
|
-
__name(assertAddableColumn, "assertAddableColumn");
|
|
1217
|
-
function isSchemaExtensionAllowed(allowExtend, extension) {
|
|
1218
|
-
if (!allowExtend || !Object.prototype.hasOwnProperty.call(allowExtend, extension.owner)) {
|
|
1219
|
-
return false;
|
|
1220
|
-
}
|
|
1221
|
-
const allowed = allowExtend[extension.owner] ?? [];
|
|
1222
|
-
return allowed.includes(extension.modelKey) || allowed.includes(extension.table);
|
|
1223
|
-
}
|
|
1224
|
-
__name(isSchemaExtensionAllowed, "isSchemaExtensionAllowed");
|
|
1225
|
-
function describeSchemaExtensionApproval(extension) {
|
|
1226
|
-
return `schema: { allowExtend: { ${JSON.stringify(extension.owner)}: [${JSON.stringify(extension.modelKey)}] } }`;
|
|
1227
|
-
}
|
|
1228
|
-
__name(describeSchemaExtensionApproval, "describeSchemaExtensionApproval");
|
|
1229
|
-
|
|
1230
1192
|
// src/schema-state.ts
|
|
1231
1193
|
var literal = /* @__PURE__ */ __name((dialect, value) => value === null ? "NULL" : `'${escapeSqlString(value, dialect)}'`, "literal");
|
|
1232
1194
|
var FARM_SCHEMA_STATE_TABLE = "farm_schema_state";
|
|
@@ -1606,25 +1568,6 @@ async function planOwnerSchemaSteps(input) {
|
|
|
1606
1568
|
}
|
|
1607
1569
|
__name(planOwnerSchemaSteps, "planOwnerSchemaSteps");
|
|
1608
1570
|
|
|
1609
|
-
// src/schema-owner.ts
|
|
1610
|
-
var FARM_SCHEMA_TABLES = /* @__PURE__ */ Symbol.for("farm.schema-tables");
|
|
1611
|
-
function declareSchemaTables(target, declaration) {
|
|
1612
|
-
Object.defineProperty(target, FARM_SCHEMA_TABLES, {
|
|
1613
|
-
value: declaration,
|
|
1614
|
-
enumerable: false,
|
|
1615
|
-
configurable: true
|
|
1616
|
-
});
|
|
1617
|
-
return target;
|
|
1618
|
-
}
|
|
1619
|
-
__name(declareSchemaTables, "declareSchemaTables");
|
|
1620
|
-
function readSchemaTables(candidate) {
|
|
1621
|
-
if (!candidate || typeof candidate !== "object" && typeof candidate !== "function") {
|
|
1622
|
-
return void 0;
|
|
1623
|
-
}
|
|
1624
|
-
return candidate[FARM_SCHEMA_TABLES];
|
|
1625
|
-
}
|
|
1626
|
-
__name(readSchemaTables, "readSchemaTables");
|
|
1627
|
-
|
|
1628
1571
|
// src/schema-foreign-keys.ts
|
|
1629
1572
|
async function planCrossOwnerReferences(owner, others, dialect, executor) {
|
|
1630
1573
|
const plan = { eligible: [], waiting: [], skipped: [] };
|
|
@@ -2203,9 +2146,6 @@ export {
|
|
|
2203
2146
|
formatSchemaMigration,
|
|
2204
2147
|
describeSchemaDrift,
|
|
2205
2148
|
createSchemaExecutor,
|
|
2206
|
-
collectSchemaExtensions,
|
|
2207
|
-
isSchemaExtensionAllowed,
|
|
2208
|
-
describeSchemaExtensionApproval,
|
|
2209
2149
|
FARM_SCHEMA_STATE_TABLE,
|
|
2210
2150
|
createSchemaSnapshot,
|
|
2211
2151
|
diffSchemaSnapshots,
|
|
@@ -2216,9 +2156,6 @@ export {
|
|
|
2216
2156
|
planOwnerSchemaSteps,
|
|
2217
2157
|
planCrossOwnerReferences,
|
|
2218
2158
|
describeForeignKeyApproval,
|
|
2219
|
-
FARM_SCHEMA_TABLES,
|
|
2220
|
-
declareSchemaTables,
|
|
2221
|
-
readSchemaTables,
|
|
2222
2159
|
findSchemaTableOwners,
|
|
2223
2160
|
collectOwnerModels,
|
|
2224
2161
|
migrateSchemaTables
|
|
@@ -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 _chunkUMQAK3KPcjs = require('./chunk-UMQAK3KP.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
var _chunkARJWXNQLcjs = require('./chunk-ARJWXNQL.cjs');
|
|
@@ -50,6 +50,11 @@ function createEndpoint(pathOrOptions, optionsOrHandler, maybeHandler) {
|
|
|
50
50
|
if (typeof handler !== "function") {
|
|
51
51
|
throw new TypeError("createEndpoint requires a handler function");
|
|
52
52
|
}
|
|
53
|
+
if (options.use !== void 0) {
|
|
54
|
+
throw new TypeError(
|
|
55
|
+
"createEndpoint does not support the `use` option. Move these functions to `middleware`: each receives the endpoint context and returns an object, true, false, or a Response."
|
|
56
|
+
);
|
|
57
|
+
}
|
|
53
58
|
const middleware = normalizeEndpointMiddleware(options.middleware);
|
|
54
59
|
const errors = normalizeEndpointErrors(options.errors);
|
|
55
60
|
const error = createEndpointErrorHandler(errors);
|
|
@@ -220,7 +225,7 @@ async function applyEndpointInvalidations(declaration, context, result) {
|
|
|
220
225
|
"Endpoint invalidates must resolve to an array of { key }, { path }, or { tag } targets"
|
|
221
226
|
);
|
|
222
227
|
}
|
|
223
|
-
return
|
|
228
|
+
return _chunkUMQAK3KPcjs.applyFarmCacheInvalidationTargets.call(void 0, targets);
|
|
224
229
|
}
|
|
225
230
|
_chunkS3JO3N4Hcjs.__name.call(void 0, applyEndpointInvalidations, "applyEndpointInvalidations");
|
|
226
231
|
function createInitialEndpointContext(value) {
|