@farm.js/core 0.1.39 → 0.1.41
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{agent-mcp-HcTYQmNX.d.ts → agent-mcp-BOqIxJLI.d.mts} +8 -2
- package/dist/{agent-mcp-BhneNPb4.d.mts → agent-mcp-D0eZKfci.d.ts} +8 -2
- package/dist/{agent-mcp-handler-OLRMZONF.mjs → agent-mcp-handler-HVV5LNXF.mjs} +6 -6
- package/dist/{agent-mcp-handler-MRGP3WJ3.cjs → agent-mcp-handler-YKG7KVCY.cjs} +7 -7
- package/dist/agent-runtime.cjs +10 -6
- package/dist/agent-runtime.d.mts +6 -8
- package/dist/agent-runtime.d.ts +6 -8
- package/dist/agent-runtime.mjs +9 -5
- package/dist/api/client.cjs +3 -3
- package/dist/api/client.d.mts +3 -3
- package/dist/api/client.d.ts +3 -3
- package/dist/api/client.mjs +2 -2
- package/dist/api/route-manager.cjs +15 -13
- package/dist/api/route-manager.d.mts +8 -10
- package/dist/api/route-manager.d.ts +8 -10
- package/dist/api/route-manager.mjs +14 -12
- package/dist/api/runtime.cjs +12 -10
- package/dist/api/runtime.d.mts +7 -9
- package/dist/api/runtime.d.ts +7 -9
- package/dist/api/runtime.mjs +11 -9
- package/dist/{api-client-CyFtZFJ4.d.ts → api-client-BJv9mTbO.d.ts} +2 -2
- package/dist/{api-client-BjMmY8OD.d.mts → api-client-Dk9QOLwr.d.mts} +2 -2
- package/dist/api.cjs +17 -15
- package/dist/api.d.mts +10 -12
- package/dist/api.d.ts +10 -12
- package/dist/api.mjs +16 -14
- package/dist/{app-DVzmmbNO.d.mts → app-CzTSMJaf.d.mts} +12 -5
- package/dist/{app-CMkoghtp.d.ts → app-DM8e1z3G.d.ts} +12 -5
- package/dist/app-markdown.cjs +7 -6
- package/dist/app-markdown.d.mts +7 -9
- package/dist/app-markdown.d.ts +7 -9
- package/dist/app-markdown.mjs +6 -5
- package/dist/cache.cjs +6 -3
- package/dist/cache.d.mts +23 -2
- package/dist/cache.d.ts +23 -2
- package/dist/cache.mjs +5 -2
- package/dist/{chunk-EGCTIS5F.mjs → chunk-24SP5TGU.mjs} +1 -1
- package/dist/{chunk-2ZYGC6SS.cjs → chunk-25LPIZSX.cjs} +3 -3
- package/dist/{chunk-ARC7I3O2.mjs → chunk-26RUNDIR.mjs} +1 -1
- package/dist/{chunk-472NCAZ7.cjs → chunk-2FUIT2G2.cjs} +3 -3
- package/dist/{chunk-YFYUYWL7.cjs → chunk-32TZ3QTP.cjs} +723 -454
- package/dist/{chunk-CQMVIOYP.mjs → chunk-35WS7P2V.mjs} +29 -131
- package/dist/{chunk-QTXBII4Z.cjs → chunk-3TB5QGUW.cjs} +5 -5
- package/dist/chunk-45QJHGZM.cjs +1063 -0
- package/dist/{chunk-677THUVP.mjs → chunk-4C7KTKX7.mjs} +1 -1
- package/dist/{chunk-FUZEBRP3.mjs → chunk-4GP3XZ4Z.mjs} +5 -3
- package/dist/{chunk-KTSUBU2E.mjs → chunk-4KQDHTWX.mjs} +2 -2
- package/dist/chunk-4TLUFAIP.cjs +92 -0
- package/dist/chunk-4U5XZDLG.cjs +80 -0
- package/dist/{chunk-P664ZVTV.mjs → chunk-4ZZNPK25.mjs} +2 -2
- package/dist/{chunk-KIIMAWOJ.cjs → chunk-5NAVKJCZ.cjs} +35 -105
- package/dist/{chunk-LSKZMJMP.cjs → chunk-64SBBZDU.cjs} +38 -1
- package/dist/chunk-6BWKJ6QS.cjs +43 -0
- package/dist/{chunk-JSROZYYO.cjs → chunk-6D24SDKO.cjs} +1 -20
- package/dist/chunk-6IZWX6ES.cjs +74 -0
- package/dist/{chunk-QRKIMN7T.mjs → chunk-6LVRDOAW.mjs} +32 -6
- package/dist/{chunk-YWN746US.cjs → chunk-6MVFHNYZ.cjs} +85 -54
- package/dist/{chunk-VWBHM3F6.mjs → chunk-6PKXK4TY.mjs} +3 -3
- package/dist/chunk-6QOLZITB.cjs +22 -0
- package/dist/{chunk-OAHTRMIC.mjs → chunk-724JLMS4.mjs} +11 -11
- package/dist/chunk-7GNWGLWB.mjs +14 -0
- package/dist/{chunk-34UCJRQO.cjs → chunk-7RNAKBWF.cjs} +2 -2
- package/dist/{chunk-U6QLDL3G.mjs → chunk-7UEEHAW7.mjs} +1 -1
- package/dist/{chunk-UPJLHLJU.cjs → chunk-ALPWLT27.cjs} +4 -4
- package/dist/{chunk-ATSDUUFK.mjs → chunk-AX7S67YV.mjs} +33 -40
- package/dist/{chunk-MSSFIQGM.mjs → chunk-B2GSRB3P.mjs} +41 -10
- package/dist/chunk-BGGWKZ2V.mjs +6096 -0
- package/dist/{chunk-H5CLOUZS.cjs → chunk-BMOBTMDR.cjs} +5 -5
- package/dist/{chunk-Q2KB32T4.mjs → chunk-BPNRQ5BA.mjs} +6 -6
- package/dist/{chunk-E2ROOWQC.cjs → chunk-BPOTSHDO.cjs} +24 -87
- package/dist/chunk-BRYPZIMB.mjs +6 -0
- package/dist/{chunk-WFRT7JPX.mjs → chunk-BYQVROIP.mjs} +2 -2
- package/dist/{chunk-HALDNTIV.mjs → chunk-BYR3RQPB.mjs} +10 -73
- package/dist/{chunk-5PWXMJOH.cjs → chunk-C5KVWHIH.cjs} +36 -36
- package/dist/chunk-CALY6QG6.mjs +963 -0
- package/dist/{chunk-WC5UV2HQ.cjs → chunk-CBXBGM72.cjs} +2 -2
- package/dist/{chunk-WW46B6HA.cjs → chunk-CGR525MJ.cjs} +84 -45
- package/dist/{chunk-6V4TDWEC.cjs → chunk-CGVPXIRN.cjs} +18 -1
- package/dist/chunk-COABSY3U.mjs +196 -0
- package/dist/chunk-CZS6OACQ.mjs +63 -0
- package/dist/{chunk-SGBJ247Q.cjs → chunk-D4ROBNTK.cjs} +2 -2
- package/dist/{chunk-WEW2JVA4.cjs → chunk-D5IHNDHI.cjs} +6 -6
- package/dist/{chunk-QG775BRV.cjs → chunk-D64OPY6A.cjs} +72 -54
- package/dist/{chunk-QUCXCDE2.cjs → chunk-EH3464KF.cjs} +1 -1
- package/dist/{chunk-75HN5IZ3.mjs → chunk-ENOBPDKZ.mjs} +21 -19
- package/dist/{chunk-HD5CF3OE.mjs → chunk-ETPEZLS3.mjs} +2 -2
- package/dist/{chunk-HRETEZ2Z.cjs → chunk-EX4MKHXN.cjs} +37 -35
- package/dist/{chunk-TO4GJ56K.cjs → chunk-FEYQCYT7.cjs} +58 -18
- package/dist/chunk-FGH3ZXTP.mjs +1063 -0
- package/dist/{chunk-CUM5NYL5.mjs → chunk-FIAPD365.mjs} +1 -1
- package/dist/{chunk-HYTZYOW2.mjs → chunk-FJGIVDA5.mjs} +1197 -7906
- package/dist/chunk-FVPXT2JR.cjs +63 -0
- package/dist/{chunk-MYIZXDZA.mjs → chunk-FWCGUVVL.mjs} +1 -1
- package/dist/{chunk-D2ULAULS.cjs → chunk-FXFKIJDA.cjs} +9 -7
- package/dist/{chunk-RW63BOV7.cjs → chunk-GB7LDGY5.cjs} +2 -2
- package/dist/chunk-GC3EM6H4.mjs +80 -0
- package/dist/{chunk-E3UK5IIB.cjs → chunk-GS3WR5HX.cjs} +5 -3
- package/dist/{chunk-QFW2IH5E.mjs → chunk-GZTUT75U.mjs} +5 -2
- package/dist/chunk-H3EGVQE5.mjs +22 -0
- package/dist/chunk-HANGSYMB.mjs +67 -0
- package/dist/{chunk-RSOJ7DRT.mjs → chunk-HCSVR4YZ.mjs} +1 -58
- package/dist/{chunk-QYMZOOC5.mjs → chunk-HJ64F4GS.mjs} +12 -44
- package/dist/{chunk-P3PLW4FR.mjs → chunk-HKFBMHCD.mjs} +4 -4
- package/dist/{chunk-BXDJXFQG.cjs → chunk-I5MG3TKE.cjs} +4 -4
- package/dist/{chunk-VNGH5MLF.mjs → chunk-I6UVKUYK.mjs} +1 -1
- package/dist/{chunk-EPYU2EBL.mjs → chunk-IF4NU2NG.mjs} +1 -1
- package/dist/{chunk-WXJLNP33.cjs → chunk-IFWSR7YZ.cjs} +9 -7
- package/dist/{chunk-IVLZZZEI.mjs → chunk-IM7DY3ED.mjs} +1 -1
- package/dist/{chunk-W36M2BQ4.mjs → chunk-IN6RCKLL.mjs} +6 -5
- package/dist/{chunk-F5QO4FNE.mjs → chunk-INQ64HTJ.mjs} +43 -11
- package/dist/{chunk-SDOTRX3V.cjs → chunk-JEIG3EWE.cjs} +8 -8
- package/dist/{chunk-UWPLULNK.mjs → chunk-JGHCKIRI.mjs} +84 -24
- package/dist/{chunk-BFJTHYTN.mjs → chunk-JIYYX7WU.mjs} +10 -8
- package/dist/{chunk-CIOT4HGT.cjs → chunk-JOTUZIM4.cjs} +14 -14
- package/dist/{chunk-SKVTP5PR.mjs → chunk-JOW4HDJO.mjs} +1 -62
- package/dist/{chunk-6MVFL3R5.cjs → chunk-JR4QCLJY.cjs} +1 -58
- package/dist/{chunk-CGBDNNSM.cjs → chunk-KEXK442I.cjs} +44 -12
- package/dist/{chunk-FUCSUGDM.cjs → chunk-KF6VDJH7.cjs} +3 -3
- package/dist/{chunk-EA5K5BKU.mjs → chunk-KNHBTJP6.mjs} +18 -1
- package/dist/{chunk-MVL2RAJW.mjs → chunk-KYN5ODF6.mjs} +1 -1
- package/dist/{chunk-LMPAPBUA.cjs → chunk-L6A26QT5.cjs} +36 -68
- package/dist/{chunk-RVXFINNS.cjs → chunk-L6HYACBE.cjs} +31 -31
- package/dist/chunk-LFHCG2DU.mjs +43 -0
- package/dist/{chunk-5OKBARDN.cjs → chunk-LIZTLA5F.cjs} +12 -11
- package/dist/{chunk-HXRYZWTA.mjs → chunk-LLUA2LSC.mjs} +3 -3
- package/dist/{chunk-B5J2YVG7.cjs → chunk-LYIZHJTK.cjs} +2 -2
- package/dist/{chunk-3UEVPCGW.mjs → chunk-MEASUNVY.mjs} +6 -1
- package/dist/{chunk-FZ6YYU2W.mjs → chunk-MGMF4VP7.mjs} +38 -1
- package/dist/{chunk-CNNOLE4O.mjs → chunk-MHHCLYXU.mjs} +1 -1
- package/dist/{chunk-HRSAQ23K.cjs → chunk-MHN4UR5U.cjs} +4 -4
- package/dist/{chunk-3LOLJTFV.cjs → chunk-MN4TQJ3W.cjs} +11 -11
- package/dist/{chunk-PGZDEPTM.cjs → chunk-MY5PZYAD.cjs} +10 -10
- package/dist/{chunk-ZXH4TS3F.cjs → chunk-NBPNUQYO.cjs} +3 -64
- package/dist/{chunk-VXEEATVD.cjs → chunk-NFG4PUPI.cjs} +2 -2
- package/dist/{chunk-INL3THCU.mjs → chunk-O7USYJ4U.mjs} +1 -1
- package/dist/{chunk-4ZFL5GFN.cjs → chunk-OILHPMFX.cjs} +86 -26
- package/dist/{chunk-AJQTP4OO.mjs → chunk-OJ7JP7RJ.mjs} +1 -1
- package/dist/chunk-OQ4YXWH4.cjs +6097 -0
- package/dist/{chunk-DMEPTZTI.mjs → chunk-P2UJF4SS.mjs} +47 -7
- package/dist/{chunk-T5OJPTVN.cjs → chunk-P4TYB4SF.cjs} +2 -2
- package/dist/chunk-P7XDC7UJ.mjs +92 -0
- package/dist/{chunk-SHLXACIO.cjs → chunk-PJ42JESY.cjs} +1 -9
- package/dist/{chunk-5ULKUBIA.cjs → chunk-PN676AZF.cjs} +6 -6
- package/dist/{chunk-YKZRDB5Z.mjs → chunk-PYHPXPSW.mjs} +2 -2
- package/dist/{chunk-KMTGADN3.mjs → chunk-QCVIRVHE.mjs} +1 -9
- package/dist/{chunk-5D2JIPLH.cjs → chunk-QEILRWVV.cjs} +36 -138
- package/dist/{chunk-XKG2BLFN.cjs → chunk-QIBP5EFA.cjs} +18 -35
- package/dist/{chunk-ZUPXLIGB.mjs → chunk-R65GCA6A.mjs} +647 -378
- package/dist/{chunk-BWIQR4DH.cjs → chunk-RHGK2JEN.cjs} +56 -63
- package/dist/{chunk-AS2VPMEE.cjs → chunk-ROQ4C4LJ.cjs} +1465 -8174
- package/dist/{chunk-QV4VE2OW.mjs → chunk-S6ENKNNG.mjs} +5 -3
- package/dist/{chunk-RWFLWR5J.cjs → chunk-S7MTDRYA.cjs} +17 -15
- package/dist/{chunk-PVZE2JGJ.mjs → chunk-SGB4IW7K.mjs} +43 -25
- package/dist/{chunk-GKBWWRBG.mjs → chunk-SVPGWJZF.mjs} +12 -12
- package/dist/{chunk-EKN7NSZO.cjs → chunk-SZLNU3GJ.cjs} +8 -5
- package/dist/chunk-TI7UANHI.cjs +77 -0
- package/dist/{chunk-6BK3K2GB.mjs → chunk-UIDWEU7M.mjs} +83 -44
- package/dist/{chunk-MLY2RP5R.mjs → chunk-ULQOP5UI.mjs} +6 -2
- package/dist/chunk-UNJZGVPU.cjs +6 -0
- package/dist/{chunk-5BWWFHR2.mjs → chunk-UQUEANTY.mjs} +3 -3
- package/dist/chunk-VDRM36QB.cjs +963 -0
- package/dist/chunk-VHRS3MCW.cjs +196 -0
- package/dist/{chunk-SOP2EAA6.mjs → chunk-VLPII2JJ.mjs} +1 -1
- package/dist/{chunk-RG4A6LB2.cjs → chunk-VNPXKF3G.cjs} +7 -7
- package/dist/chunk-VQDBNVOO.cjs +14 -0
- package/dist/chunk-VQGKD7RV.mjs +25 -0
- package/dist/{chunk-6HB6V3R7.mjs → chunk-VTBXE6QG.mjs} +10 -27
- package/dist/{chunk-ZMSZZXOR.mjs → chunk-WDMIW6Q6.mjs} +0 -19
- package/dist/{chunk-NBBEQLOK.cjs → chunk-WLHA5USH.cjs} +9 -9
- package/dist/{chunk-BZHXGVMA.mjs → chunk-WMBRZI5V.mjs} +5 -3
- package/dist/{chunk-4WVJLURN.mjs → chunk-WMHG64DA.mjs} +1 -1
- package/dist/{chunk-JCYYXBAJ.cjs → chunk-WROEFVNO.cjs} +3 -3
- package/dist/{chunk-A657YSP4.cjs → chunk-WSOBCAYO.cjs} +37 -35
- package/dist/{chunk-IWZKTWHZ.cjs → chunk-WU7ZS3EM.cjs} +7 -2
- package/dist/{chunk-J63ZH5OQ.cjs → chunk-X3GMHKO3.cjs} +2 -2
- package/dist/{chunk-POSPE3IO.mjs → chunk-X3NGFVRF.mjs} +61 -21
- package/dist/{chunk-VT4WFRHA.mjs → chunk-XUC6CFLE.mjs} +1 -1
- package/dist/chunk-Y5RG6B7S.mjs +77 -0
- package/dist/{chunk-EIPC3FDA.cjs → chunk-YWCYV7QC.cjs} +9 -5
- package/dist/{chunk-WLL43JMO.mjs → chunk-YYQVGKO5.mjs} +7 -5
- package/dist/chunk-YZAKIXRL.cjs +67 -0
- package/dist/chunk-ZQRCSUSB.cjs +25 -0
- package/dist/{chunk-6XWDE2P2.cjs → chunk-ZTP3BJG6.cjs} +64 -24
- package/dist/{chunk-ZMMBIVQM.mjs → chunk-ZZGQD7A4.mjs} +16 -86
- package/dist/{client-plugins-CsCuCLBz.d.mts → client-plugins-CkYwvDJ0.d.mts} +2545 -2665
- package/dist/{client-plugins-D0ke-Hc8.d.ts → client-plugins-DfeKd0sD.d.ts} +2545 -2665
- package/dist/client-plugins.d.mts +6 -8
- package/dist/client-plugins.d.ts +6 -8
- package/dist/client.cjs +5 -5
- package/dist/client.d.mts +12 -13
- package/dist/client.d.ts +12 -13
- package/dist/client.mjs +4 -4
- package/dist/client.react-server.mjs +2 -0
- package/dist/config.d.mts +6 -8
- package/dist/config.d.ts +6 -8
- package/dist/{devtools-LW4QQ5J3.cjs → devtools-2YHAJYH6.cjs} +21 -18
- package/dist/{devtools-5AFIPVUJ.mjs → devtools-N3QLRIQU.mjs} +20 -17
- package/dist/docs.cjs +23 -20
- package/dist/docs.d.mts +7 -9
- package/dist/docs.d.ts +7 -9
- package/dist/docs.mjs +22 -19
- package/dist/{endpoint-CA-TNX60.d.ts → endpoint-BOE0IAaG.d.ts} +6 -3
- package/dist/{endpoint-CCHFqyTE.d.mts → endpoint-DGZRZHux.d.mts} +6 -3
- package/dist/environment/vite.cjs +6 -2
- package/dist/environment/vite.d.mts +11 -2
- package/dist/environment/vite.d.ts +11 -2
- package/dist/environment/vite.mjs +5 -1
- package/dist/headers.cjs +4 -4
- package/dist/headers.mjs +3 -3
- package/dist/image/server.cjs +7 -3
- package/dist/image/server.d.mts +10 -2
- package/dist/image/server.d.ts +10 -2
- package/dist/image/server.mjs +6 -2
- package/dist/image/sharp.cjs +12 -10
- package/dist/image/sharp.d.mts +1 -1
- package/dist/image/sharp.d.ts +1 -1
- package/dist/image/sharp.mjs +4 -2
- package/dist/{image-config-Duob7wER.d.ts → image-config-BpH1q5R8.d.mts} +4 -1
- package/dist/{image-config-Duob7wER.d.mts → image-config-BpH1q5R8.d.ts} +4 -1
- package/dist/image.d.mts +1 -1
- package/dist/image.d.ts +1 -1
- package/dist/index.cjs +90 -68
- package/dist/index.d.mts +28 -145
- package/dist/index.d.ts +28 -145
- package/dist/index.mjs +103 -81
- package/dist/{integration-api-BPJo5oXb.d.ts → integration-api-BuPHMeKz.d.ts} +2 -2
- package/dist/{integration-api-0y4FXJpC.d.mts → integration-api-DWyMmvrR.d.mts} +2 -2
- package/dist/integration-orm-P2II2EBK.cjs +14 -0
- package/dist/{integration-orm-KV5B3BGZ.mjs → integration-orm-RBKCIQYZ.mjs} +4 -3
- package/dist/integrations.cjs +7 -5
- package/dist/integrations.d.mts +8 -10
- package/dist/integrations.d.ts +8 -10
- package/dist/integrations.mjs +6 -4
- package/dist/internal/app-markdown-runtime.cjs +6 -5
- package/dist/internal/app-markdown-runtime.d.mts +7 -9
- package/dist/internal/app-markdown-runtime.d.ts +7 -9
- package/dist/internal/app-markdown-runtime.mjs +5 -4
- package/dist/internal/build-runtime.cjs +57 -56
- package/dist/internal/build-runtime.d.mts +8 -10
- package/dist/internal/build-runtime.d.ts +8 -10
- package/dist/internal/build-runtime.mjs +56 -55
- package/dist/internal/cli-runtime.cjs +37 -31
- package/dist/internal/cli-runtime.mjs +37 -31
- package/dist/internal/client-error-overlay.cjs +4 -4
- package/dist/internal/client-error-overlay.mjs +1 -1
- package/dist/internal/compression-runtime.d.mts +6 -8
- package/dist/internal/compression-runtime.d.ts +6 -8
- package/dist/internal/config-runtime.cjs +21 -18
- package/dist/internal/config-runtime.d.mts +7 -9
- package/dist/internal/config-runtime.d.ts +7 -9
- package/dist/internal/config-runtime.mjs +20 -17
- package/dist/internal/docs-precompiled-runtime.cjs +3 -3
- package/dist/internal/docs-precompiled-runtime.mjs +2 -2
- package/dist/internal/infra-analytics-runtime.cjs +7 -7
- package/dist/internal/infra-analytics-runtime.mjs +5 -5
- package/dist/internal/metadata-image-runtime.cjs +4 -3
- package/dist/internal/metadata-image-runtime.mjs +3 -2
- package/dist/internal/product-telemetry-runtime.cjs +2 -2
- package/dist/internal/product-telemetry-runtime.mjs +1 -1
- package/dist/internal/production-node-env.cjs +2 -2
- package/dist/internal/production-node-env.mjs +1 -1
- package/dist/internal/production-runtime.cjs +53 -28
- package/dist/internal/production-runtime.d.mts +46 -15
- package/dist/internal/production-runtime.d.ts +46 -15
- package/dist/internal/production-runtime.mjs +57 -32
- package/dist/layers-CM5i6T7z.d.mts +55 -0
- package/dist/layers-CM5i6T7z.d.ts +55 -0
- package/dist/markdown.cjs +4 -4
- package/dist/markdown.d.mts +6 -8
- package/dist/markdown.d.ts +6 -8
- package/dist/markdown.mjs +3 -3
- package/dist/middleware.cjs +16 -10
- package/dist/middleware.d.mts +8 -10
- package/dist/middleware.d.ts +8 -10
- package/dist/middleware.mjs +19 -13
- package/dist/navigation.cjs +4 -4
- package/dist/navigation.d.mts +9 -10
- package/dist/navigation.d.ts +9 -10
- package/dist/navigation.mjs +3 -3
- package/dist/{nitro-MPZJGPXK.mjs → nitro-KDACKNHU.mjs} +3 -2
- package/dist/{nitro-7F65EZZS.cjs → nitro-NPGU6VBT.cjs} +4 -3
- package/dist/observability.cjs +2 -2
- package/dist/observability.mjs +1 -1
- package/dist/plugin-DBBZ4JI2.cjs +32 -0
- package/dist/plugin-SYMK7PQ2.mjs +32 -0
- package/dist/plugin.cjs +56 -43
- package/dist/plugin.d.mts +25 -8
- package/dist/plugin.d.ts +25 -8
- package/dist/plugin.mjs +57 -44
- package/dist/{production-runtime-DfRP0cV0.d.mts → production-runtime-BTkXQdYy.d.mts} +17 -3
- package/dist/{production-runtime-BaI3WHnV.d.ts → production-runtime-DFC7pgbp.d.ts} +17 -3
- package/dist/query/client.cjs +2 -2
- package/dist/query/client.mjs +3 -3
- package/dist/{render-plan-Dg8RBYFa.d.mts → render-plan-5rFeWmk7.d.mts} +1 -1
- package/dist/{render-plan-CfIdJKAf.d.ts → render-plan-BoAK9xFC.d.ts} +1 -1
- package/dist/renderer-client.d.mts +8 -9
- package/dist/renderer-client.d.ts +8 -9
- package/dist/{request-DfE02G_A.d.mts → request-BxBWigtl.d.mts} +1 -1
- package/dist/{request-CEbHIIl4.d.ts → request-fciwmd3n.d.ts} +1 -1
- package/dist/request.cjs +3 -3
- package/dist/request.d.mts +7 -9
- package/dist/request.d.ts +7 -9
- package/dist/request.mjs +2 -2
- package/dist/{route-rendering-C4oHbv6C.d.ts → route-rendering-BCM1QzEf.d.mts} +1 -1
- package/dist/{route-rendering-BHyOfXjD.d.mts → route-rendering-BLZT0IP0.d.ts} +1 -1
- package/dist/{router-uRN_29Em.d.ts → router-CkheNX3-.d.ts} +1 -1
- package/dist/{router-DwhA61SB.d.mts → router-DyZJWc1_.d.mts} +1 -1
- package/dist/routes.cjs +6 -5
- package/dist/routes.d.mts +6 -8
- package/dist/routes.d.ts +6 -8
- package/dist/routes.mjs +5 -4
- package/dist/{runtime-COk03hmx.d.ts → runtime-DfU4sKa5.d.ts} +3 -3
- package/dist/{runtime-BEdHhN4C.d.mts → runtime-wexvUN5J.d.mts} +3 -3
- package/dist/{schema-dev-notice-Y7MQEFGN.cjs → schema-dev-notice-5JPE67AI.cjs} +6 -4
- package/dist/{schema-dev-notice-O67CPXJ6.mjs → schema-dev-notice-WLPZ6WKU.mjs} +4 -2
- package/dist/server-action-security.cjs +4 -3
- package/dist/server-action-security.mjs +3 -2
- package/dist/server-client-bridge-DKWDl5NB.d.mts +7 -0
- package/dist/server-client-bridge-DKWDl5NB.d.ts +7 -0
- package/dist/server-fn-client.d.mts +3 -3
- package/dist/server-fn-client.d.ts +3 -3
- package/dist/server-fn.cjs +8 -7
- package/dist/server-fn.d.mts +1 -1
- package/dist/server-fn.d.ts +1 -1
- package/dist/server-fn.mjs +7 -6
- package/dist/server-plugins.cjs +5 -5
- package/dist/server-plugins.d.mts +7 -9
- package/dist/server-plugins.d.ts +7 -9
- package/dist/server-plugins.mjs +4 -4
- package/dist/server-query-client.d.mts +1 -1
- package/dist/server-query-client.d.ts +1 -1
- package/dist/server-query.cjs +9 -8
- package/dist/server-query.d.mts +1 -1
- package/dist/server-query.d.ts +1 -1
- package/dist/server-query.mjs +8 -7
- package/dist/server.cjs +97 -73
- package/dist/server.d.mts +18 -13
- package/dist/server.d.ts +18 -13
- package/dist/server.mjs +82 -58
- package/dist/{spa-router-DrVOBVGg.d.ts → spa-router-CcejECnG.d.ts} +2 -2
- package/dist/{spa-router-w4aFOuyn.d.mts → spa-router-DgsMXqfX.d.mts} +2 -2
- package/dist/ssg-1FGaFISl.d.ts +184 -0
- package/dist/ssg-Bg4bMMhM.d.mts +184 -0
- package/dist/storage.cjs +6 -2
- package/dist/storage.d.mts +9 -1
- package/dist/storage.d.ts +9 -1
- package/dist/storage.mjs +5 -1
- package/dist/testing.cjs +20 -18
- package/dist/testing.d.mts +7 -9
- package/dist/testing.d.ts +7 -9
- package/dist/testing.mjs +16 -14
- package/dist/theme/server.cjs +4 -4
- package/dist/theme/server.mjs +3 -3
- package/dist/{utils-Dhuqwmd2.d.ts → utils-8wtTYiH4.d.mts} +1 -1
- package/dist/{utils-BtYehqeU.d.mts → utils-Dxbh6Hgj.d.ts} +1 -1
- package/dist/version.cjs +2 -2
- package/dist/version.mjs +1 -1
- package/dist/vite.cjs +75 -46
- package/dist/vite.d.mts +130 -11
- package/dist/vite.d.ts +130 -11
- package/dist/vite.mjs +76 -47
- package/dist/{workflows-jZ4BcdoZ.d.ts → workflows-IWP1ddBm.d.mts} +5 -2
- package/dist/{workflows-jZ4BcdoZ.d.mts → workflows-IWP1ddBm.d.ts} +5 -2
- package/dist/workflows.cjs +4 -3
- package/dist/workflows.d.mts +1 -1
- package/dist/workflows.d.ts +1 -1
- package/dist/workflows.mjs +3 -2
- package/package.json +3 -1
- package/dist/chunk-3SDFA7UF.cjs +0 -701
- package/dist/chunk-DAO7JGTS.mjs +0 -73
- package/dist/chunk-E5GNDG5F.mjs +0 -701
- package/dist/chunk-SYQ3MOWW.cjs +0 -73
- package/dist/chunk-ULASELLA.cjs +0 -48
- package/dist/integration-orm-55F7CII5.cjs +0 -13
|
@@ -1,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 _chunk6MVFHNYZcjs = require('./chunk-6MVFHNYZ.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 _chunk6MVFHNYZcjs.applyFarmCacheInvalidationTargets.call(void 0, targets);
|
|
224
229
|
}
|
|
225
230
|
_chunkS3JO3N4Hcjs.__name.call(void 0, applyEndpointInvalidations, "applyEndpointInvalidations");
|
|
226
231
|
function createInitialEndpointContext(value) {
|
|
@@ -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,
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
_setAppRequestView,
|
|
3
3
|
_setCspNonceResolver,
|
|
4
|
-
_setCurrentRequestResolver
|
|
5
|
-
|
|
4
|
+
_setCurrentRequestResolver,
|
|
5
|
+
_setSharedCacheScopeRunner
|
|
6
|
+
} from "./chunk-6LVRDOAW.mjs";
|
|
6
7
|
import {
|
|
7
8
|
__name
|
|
8
9
|
} from "./chunk-LPEX4YW6.mjs";
|
|
@@ -23,6 +24,26 @@ function getRequestStore() {
|
|
|
23
24
|
}
|
|
24
25
|
__name(getRequestStore, "getRequestStore");
|
|
25
26
|
var requestStore = getRequestStore();
|
|
27
|
+
var SHARED_CACHE_SCOPE_KEY = /* @__PURE__ */ Symbol.for("@farm.js/core/shared-cache-scope");
|
|
28
|
+
function getSharedCacheScopeStore() {
|
|
29
|
+
const runtime = globalThis;
|
|
30
|
+
const existing = runtime[SHARED_CACHE_SCOPE_KEY];
|
|
31
|
+
if (existing instanceof AsyncLocalStorage) return existing;
|
|
32
|
+
const storage = new AsyncLocalStorage();
|
|
33
|
+
runtime[SHARED_CACHE_SCOPE_KEY] = storage;
|
|
34
|
+
return storage;
|
|
35
|
+
}
|
|
36
|
+
__name(getSharedCacheScopeStore, "getSharedCacheScopeStore");
|
|
37
|
+
var sharedCacheScope = getSharedCacheScopeStore();
|
|
38
|
+
_setSharedCacheScopeRunner((label, fn) => sharedCacheScope.run(label, fn));
|
|
39
|
+
function _assertRequestReadAllowed(api) {
|
|
40
|
+
const scope = sharedCacheScope.getStore();
|
|
41
|
+
if (!scope) return;
|
|
42
|
+
throw new Error(
|
|
43
|
+
`${api} cannot be called inside ${scope}: its result is cached and shared by every request, so one visitor's request data would be served to others. Read it outside the cached function and pass the value in as an argument, which also makes it part of the cache key.`
|
|
44
|
+
);
|
|
45
|
+
}
|
|
46
|
+
__name(_assertRequestReadAllowed, "_assertRequestReadAllowed");
|
|
26
47
|
var REQUEST_READS_KEY = /* @__PURE__ */ Symbol.for("@farm.js/core/request-reads");
|
|
27
48
|
function getRequestReads() {
|
|
28
49
|
const runtime = globalThis;
|
|
@@ -42,32 +63,49 @@ function getAppRequestView(request) {
|
|
|
42
63
|
if (request.method !== "GET" && request.method !== "HEAD") {
|
|
43
64
|
countRequestRead(request);
|
|
44
65
|
view = request;
|
|
66
|
+
try {
|
|
67
|
+
guardRequestReads(view, request, request.headers, request.clone);
|
|
68
|
+
} catch {
|
|
69
|
+
}
|
|
45
70
|
} else {
|
|
46
71
|
view = new Request(request);
|
|
47
|
-
Object.
|
|
48
|
-
|
|
49
|
-
signal: { configurable: true, get: /* @__PURE__ */ __name(() => request.signal, "get") },
|
|
50
|
-
headers: {
|
|
51
|
-
configurable: true,
|
|
52
|
-
get() {
|
|
53
|
-
countRequestRead(request);
|
|
54
|
-
return request.headers;
|
|
55
|
-
}
|
|
56
|
-
},
|
|
57
|
-
clone: {
|
|
58
|
-
configurable: true,
|
|
59
|
-
value() {
|
|
60
|
-
countRequestRead(request);
|
|
61
|
-
return request.clone();
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
});
|
|
72
|
+
Object.defineProperty(view, "signal", { configurable: true, get: /* @__PURE__ */ __name(() => request.signal, "get") });
|
|
73
|
+
guardRequestReads(view, request, request.headers, request.clone);
|
|
65
74
|
}
|
|
66
75
|
appRequestViews.set(request, view);
|
|
67
76
|
return view;
|
|
68
77
|
}
|
|
69
78
|
__name(getAppRequestView, "getAppRequestView");
|
|
70
|
-
|
|
79
|
+
function guardRequestReads(view, request, requestHeaders, clone) {
|
|
80
|
+
Object.defineProperties(view, {
|
|
81
|
+
headers: {
|
|
82
|
+
configurable: true,
|
|
83
|
+
get() {
|
|
84
|
+
_assertRequestReadAllowed("request.headers");
|
|
85
|
+
countRequestRead(request);
|
|
86
|
+
return requestHeaders;
|
|
87
|
+
}
|
|
88
|
+
},
|
|
89
|
+
clone: {
|
|
90
|
+
configurable: true,
|
|
91
|
+
value() {
|
|
92
|
+
_assertRequestReadAllowed("request.clone()");
|
|
93
|
+
countRequestRead(request);
|
|
94
|
+
return clone.call(request);
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
});
|
|
98
|
+
}
|
|
99
|
+
__name(guardRequestReads, "guardRequestReads");
|
|
100
|
+
_setCurrentRequestResolver(
|
|
101
|
+
() => {
|
|
102
|
+
_assertRequestReadAllowed(
|
|
103
|
+
"A helper that reads the current request (such as auth.user() or the server api client)"
|
|
104
|
+
);
|
|
105
|
+
return requestStore.getStore();
|
|
106
|
+
},
|
|
107
|
+
() => requestStore.getStore()
|
|
108
|
+
);
|
|
71
109
|
var CSP_NONCE_STORAGE_KEY = /* @__PURE__ */ Symbol.for("@farm.js/core/csp-nonce-storage");
|
|
72
110
|
function getCspNonceStore() {
|
|
73
111
|
const runtime = globalThis;
|
|
@@ -166,6 +204,7 @@ async function _runWithCurrentRequest(request, fn) {
|
|
|
166
204
|
}
|
|
167
205
|
__name(_runWithCurrentRequest, "_runWithCurrentRequest");
|
|
168
206
|
function getCurrentRequest() {
|
|
207
|
+
_assertRequestReadAllowed("getCurrentRequest()");
|
|
169
208
|
const request = requestStore.getStore();
|
|
170
209
|
if (!request) {
|
|
171
210
|
throw new Error(
|
|
@@ -186,6 +225,7 @@ function getCurrentRequestOrNull() {
|
|
|
186
225
|
__name(getCurrentRequestOrNull, "getCurrentRequestOrNull");
|
|
187
226
|
|
|
188
227
|
export {
|
|
228
|
+
_assertRequestReadAllowed,
|
|
189
229
|
_runWithFarmCspNonce,
|
|
190
230
|
resolveFarmRequestURL,
|
|
191
231
|
resolveFarmWebRequestOrigin,
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import {
|
|
2
|
+
__name
|
|
3
|
+
} from "./chunk-LPEX4YW6.mjs";
|
|
4
|
+
|
|
5
|
+
// src/plugin-runtime-endpoint.ts
|
|
6
|
+
function normalizeFarmPluginRuntimeEndpointPath(pathname, label = "Farm plugin runtime endpoint") {
|
|
7
|
+
if (typeof pathname !== "string" || pathname.trim() !== pathname || pathname.length === 0) {
|
|
8
|
+
throw new TypeError(`${label} path must be a non-empty pathname without surrounding spaces`);
|
|
9
|
+
}
|
|
10
|
+
if (!pathname.startsWith("/") || pathname.startsWith("//") || pathname.includes("?") || pathname.includes("#") || pathname.includes("*")) {
|
|
11
|
+
throw new TypeError(`${label} path must be an exact pathname such as "/status"`);
|
|
12
|
+
}
|
|
13
|
+
if (pathname.includes("\\") || Array.from(pathname).some((character) => {
|
|
14
|
+
const code = character.charCodeAt(0);
|
|
15
|
+
return code <= 31 || code >= 127 && code <= 159;
|
|
16
|
+
})) {
|
|
17
|
+
throw new TypeError(`${label} path cannot contain backslashes or control characters`);
|
|
18
|
+
}
|
|
19
|
+
for (const segment of pathname.split("/").slice(1)) {
|
|
20
|
+
let decoded = segment;
|
|
21
|
+
try {
|
|
22
|
+
decoded = decodeURIComponent(segment);
|
|
23
|
+
} catch {
|
|
24
|
+
throw new TypeError(`${label} path contains a malformed percent escape`);
|
|
25
|
+
}
|
|
26
|
+
if (decoded.includes("/") || decoded.includes("\\")) {
|
|
27
|
+
throw new TypeError(`${label} path cannot contain percent-encoded path separators`);
|
|
28
|
+
}
|
|
29
|
+
if (Array.from(decoded).some((character) => {
|
|
30
|
+
const code = character.charCodeAt(0);
|
|
31
|
+
return code <= 31 || code >= 127 && code <= 159;
|
|
32
|
+
})) {
|
|
33
|
+
throw new TypeError(`${label} path cannot contain control characters`);
|
|
34
|
+
}
|
|
35
|
+
if (decoded === "." || decoded === "..") {
|
|
36
|
+
throw new TypeError(`${label} path cannot contain dot segments`);
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
return normalizeRuntimeEndpointRequestPath(pathname);
|
|
40
|
+
}
|
|
41
|
+
__name(normalizeFarmPluginRuntimeEndpointPath, "normalizeFarmPluginRuntimeEndpointPath");
|
|
42
|
+
function normalizeRuntimeEndpointRequestPath(pathname) {
|
|
43
|
+
return pathname.length > 1 ? pathname.replace(/\/+$/, "") || "/" : pathname;
|
|
44
|
+
}
|
|
45
|
+
__name(normalizeRuntimeEndpointRequestPath, "normalizeRuntimeEndpointRequestPath");
|
|
46
|
+
function farmPluginMayAffectRuntimePath(plugin, pathname) {
|
|
47
|
+
const runtime = plugin.runtime;
|
|
48
|
+
const endpoints = runtime?.endpoints;
|
|
49
|
+
const hasUnscopedRequestHooks = Boolean(
|
|
50
|
+
plugin.init || plugin.ready || plugin.shutdown || runtime?.context || runtime?.before || runtime?.after || runtime?.error || plugin.router || plugin.render || plugin.beforeRouteMatch || plugin.afterRouteMatch || plugin.beforeRender || plugin.afterRender || plugin.onError || plugin.transformHTML || plugin.beforeRequest || plugin.afterResponse
|
|
51
|
+
);
|
|
52
|
+
if (hasUnscopedRequestHooks) return true;
|
|
53
|
+
if (Array.isArray(endpoints) && endpoints.length > 0) {
|
|
54
|
+
const normalizedPathname = normalizeRuntimeEndpointRequestPath(pathname);
|
|
55
|
+
return endpoints.some(
|
|
56
|
+
(endpoint) => normalizeFarmPluginRuntimeEndpointPath(
|
|
57
|
+
endpoint.path,
|
|
58
|
+
`Farm plugin "${plugin.name}" runtime endpoint`
|
|
59
|
+
) === normalizedPathname
|
|
60
|
+
);
|
|
61
|
+
}
|
|
62
|
+
return Boolean(plugin.setup || runtime?.start || runtime?.close);
|
|
63
|
+
}
|
|
64
|
+
__name(farmPluginMayAffectRuntimePath, "farmPluginMayAffectRuntimePath");
|
|
65
|
+
function _farmPluginsKeepResponsesPrivate(plugins) {
|
|
66
|
+
return plugins.some(
|
|
67
|
+
(plugin) => typeof plugin?.runtime?.before === "function" && plugin.runtime.cache !== "public"
|
|
68
|
+
);
|
|
69
|
+
}
|
|
70
|
+
__name(_farmPluginsKeepResponsesPrivate, "_farmPluginsKeepResponsesPrivate");
|
|
71
|
+
|
|
72
|
+
export {
|
|
73
|
+
normalizeFarmPluginRuntimeEndpointPath,
|
|
74
|
+
normalizeRuntimeEndpointRequestPath,
|
|
75
|
+
farmPluginMayAffectRuntimePath,
|
|
76
|
+
_farmPluginsKeepResponsesPrivate
|
|
77
|
+
};
|
|
@@ -3,21 +3,24 @@
|
|
|
3
3
|
var _chunkAI7QMY7Ocjs = require('./chunk-AI7QMY7O.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
var _chunk6XWDE2P2cjs = require('./chunk-6XWDE2P2.cjs');
|
|
7
6
|
|
|
7
|
+
var _chunkZTP3BJG6cjs = require('./chunk-ZTP3BJG6.cjs');
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
|
|
10
|
+
var _chunk6IZWX6EScjs = require('./chunk-6IZWX6ES.cjs');
|
|
10
11
|
|
|
11
12
|
|
|
12
13
|
var _chunkS3JO3N4Hcjs = require('./chunk-S3JO3N4H.cjs');
|
|
13
14
|
|
|
14
15
|
// src/headers.ts
|
|
15
16
|
function headers() {
|
|
16
|
-
|
|
17
|
+
_chunkZTP3BJG6cjs._assertRequestReadAllowed.call(void 0, "headers()");
|
|
18
|
+
return new Headers(_chunkZTP3BJG6cjs.getCurrentRequest.call(void 0, ).headers);
|
|
17
19
|
}
|
|
18
20
|
_chunkS3JO3N4Hcjs.__name.call(void 0, headers, "headers");
|
|
19
21
|
function cookies() {
|
|
20
|
-
|
|
22
|
+
_chunkZTP3BJG6cjs._assertRequestReadAllowed.call(void 0, "cookies()");
|
|
23
|
+
const cookieHeader = _chunkZTP3BJG6cjs.getCurrentRequest.call(void 0, ).headers.get("cookie") || "";
|
|
21
24
|
const parsed = _chunkAI7QMY7Ocjs.parseRequestCookieHeader.call(void 0, cookieHeader);
|
|
22
25
|
return {
|
|
23
26
|
get(name) {
|
|
@@ -39,7 +42,8 @@ function cookies() {
|
|
|
39
42
|
}
|
|
40
43
|
_chunkS3JO3N4Hcjs.__name.call(void 0, cookies, "cookies");
|
|
41
44
|
function getCspNonce() {
|
|
42
|
-
|
|
45
|
+
_chunkZTP3BJG6cjs._assertRequestReadAllowed.call(void 0, "getCspNonce()");
|
|
46
|
+
return _chunk6IZWX6EScjs._resolveCurrentCspNonce.call(void 0, );
|
|
43
47
|
}
|
|
44
48
|
_chunkS3JO3N4Hcjs.__name.call(void 0, getCspNonce, "getCspNonce");
|
|
45
49
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
findProgrammaticRouteFilesInDir
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-FWCGUVVL.mjs";
|
|
4
4
|
import {
|
|
5
5
|
isFarmAPIRouteFileName
|
|
6
6
|
} from "./chunk-CU625VAY.mjs";
|
|
@@ -17,21 +17,23 @@ import {
|
|
|
17
17
|
matchAPIRouteAtBasePath,
|
|
18
18
|
mergePluginAPIRoutes,
|
|
19
19
|
resolveAPIRouteEndpoint
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-VTBXE6QG.mjs";
|
|
21
21
|
import {
|
|
22
22
|
registerAPIRouteShape
|
|
23
23
|
} from "./chunk-W3B4PKAW.mjs";
|
|
24
24
|
import {
|
|
25
25
|
createProgrammaticRouteModuleId
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-KNHBTJP6.mjs";
|
|
27
27
|
import {
|
|
28
28
|
getFarmRouteRuntimeConfig,
|
|
29
29
|
normalizeFarmRouteRuntimeConfig
|
|
30
30
|
} from "./chunk-2J7W2WND.mjs";
|
|
31
31
|
import {
|
|
32
|
-
loadFarmDevModule,
|
|
33
32
|
toFileModuleUrl
|
|
34
|
-
} from "./chunk-
|
|
33
|
+
} from "./chunk-7GNWGLWB.mjs";
|
|
34
|
+
import {
|
|
35
|
+
loadFarmDevModule
|
|
36
|
+
} from "./chunk-QCVIRVHE.mjs";
|
|
35
37
|
import {
|
|
36
38
|
logger
|
|
37
39
|
} from "./chunk-KI3MESHB.mjs";
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
|
+
|
|
3
|
+
var _chunkS3JO3N4Hcjs = require('./chunk-S3JO3N4H.cjs');
|
|
4
|
+
|
|
5
|
+
// src/middleware/server.ts
|
|
6
|
+
var _async_hooks = require('async_hooks');
|
|
7
|
+
var MIDDLEWARE_DATA_STORE_KEY = /* @__PURE__ */ Symbol.for("farm.middlewareDataStore");
|
|
8
|
+
var MIDDLEWARE_CONTEXT_STORE_KEY = /* @__PURE__ */ Symbol.for("farm.middlewareContextStore");
|
|
9
|
+
function getGlobalMiddlewareStore(key) {
|
|
10
|
+
const state = globalThis;
|
|
11
|
+
const existing = state[key];
|
|
12
|
+
if (existing instanceof _async_hooks.AsyncLocalStorage) {
|
|
13
|
+
return existing;
|
|
14
|
+
}
|
|
15
|
+
const store = new (0, _async_hooks.AsyncLocalStorage)();
|
|
16
|
+
state[key] = store;
|
|
17
|
+
return store;
|
|
18
|
+
}
|
|
19
|
+
_chunkS3JO3N4Hcjs.__name.call(void 0, getGlobalMiddlewareStore, "getGlobalMiddlewareStore");
|
|
20
|
+
var middlewareStore = getGlobalMiddlewareStore(MIDDLEWARE_DATA_STORE_KEY);
|
|
21
|
+
var middlewareContextStore = getGlobalMiddlewareStore(MIDDLEWARE_CONTEXT_STORE_KEY);
|
|
22
|
+
function toMiddlewareMap(data) {
|
|
23
|
+
if (data instanceof Map) {
|
|
24
|
+
return new Map(data);
|
|
25
|
+
}
|
|
26
|
+
return new Map(Object.entries(data));
|
|
27
|
+
}
|
|
28
|
+
_chunkS3JO3N4Hcjs.__name.call(void 0, toMiddlewareMap, "toMiddlewareMap");
|
|
29
|
+
function _clearCurrentMiddlewareData() {
|
|
30
|
+
middlewareStore.enterWith(/* @__PURE__ */ new Map());
|
|
31
|
+
}
|
|
32
|
+
_chunkS3JO3N4Hcjs.__name.call(void 0, _clearCurrentMiddlewareData, "_clearCurrentMiddlewareData");
|
|
33
|
+
function _clearCurrentMiddlewareContext() {
|
|
34
|
+
middlewareContextStore.enterWith(/* @__PURE__ */ new Map());
|
|
35
|
+
}
|
|
36
|
+
_chunkS3JO3N4Hcjs.__name.call(void 0, _clearCurrentMiddlewareContext, "_clearCurrentMiddlewareContext");
|
|
37
|
+
async function _runWithMiddlewareData(data, fn) {
|
|
38
|
+
return middlewareStore.run(toMiddlewareMap(data), fn);
|
|
39
|
+
}
|
|
40
|
+
_chunkS3JO3N4Hcjs.__name.call(void 0, _runWithMiddlewareData, "_runWithMiddlewareData");
|
|
41
|
+
async function _runWithMiddlewareContext(context, fn) {
|
|
42
|
+
return middlewareContextStore.run(toMiddlewareMap(context), fn);
|
|
43
|
+
}
|
|
44
|
+
_chunkS3JO3N4Hcjs.__name.call(void 0, _runWithMiddlewareContext, "_runWithMiddlewareContext");
|
|
45
|
+
function getMiddlewareData() {
|
|
46
|
+
return middlewareStore.getStore() || /* @__PURE__ */ new Map();
|
|
47
|
+
}
|
|
48
|
+
_chunkS3JO3N4Hcjs.__name.call(void 0, getMiddlewareData, "getMiddlewareData");
|
|
49
|
+
function getMiddlewareValue(key) {
|
|
50
|
+
const data = getMiddlewareData();
|
|
51
|
+
return data.get(key);
|
|
52
|
+
}
|
|
53
|
+
_chunkS3JO3N4Hcjs.__name.call(void 0, getMiddlewareValue, "getMiddlewareValue");
|
|
54
|
+
function getMiddlewareContext() {
|
|
55
|
+
return middlewareContextStore.getStore() || /* @__PURE__ */ new Map();
|
|
56
|
+
}
|
|
57
|
+
_chunkS3JO3N4Hcjs.__name.call(void 0, getMiddlewareContext, "getMiddlewareContext");
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
exports._clearCurrentMiddlewareData = _clearCurrentMiddlewareData; exports._clearCurrentMiddlewareContext = _clearCurrentMiddlewareContext; exports._runWithMiddlewareData = _runWithMiddlewareData; exports._runWithMiddlewareContext = _runWithMiddlewareContext; exports.getMiddlewareData = getMiddlewareData; exports.getMiddlewareValue = getMiddlewareValue; exports.getMiddlewareContext = getMiddlewareContext;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
|
+
|
|
3
|
+
var _chunkS3JO3N4Hcjs = require('./chunk-S3JO3N4H.cjs');
|
|
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
|
+
_chunkS3JO3N4Hcjs.__name.call(void 0, assertNoSchemaListField, "assertNoSchemaListField");
|
|
15
|
+
|
|
16
|
+
// src/schema-reference.ts
|
|
17
|
+
function isDatabaseEnforcedReference(reference) {
|
|
18
|
+
return reference.enforced === void 0 || reference.enforced === "db";
|
|
19
|
+
}
|
|
20
|
+
_chunkS3JO3N4Hcjs.__name.call(void 0, isDatabaseEnforcedReference, "isDatabaseEnforcedReference");
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
exports.assertNoSchemaListField = assertNoSchemaListField; exports.isDatabaseEnforcedReference = isDatabaseEnforcedReference;
|