@farm.js/core 0.1.77 → 0.1.80
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/after.cjs +1 -1
- package/dist/after.mjs +1 -1
- package/dist/{agent-mcp-handler-PJKZHYSA.mjs → agent-mcp-handler-GDY5CPPW.mjs} +6 -6
- package/dist/{agent-mcp-handler-73SGWVZT.cjs → agent-mcp-handler-IUL6OPC3.cjs} +7 -7
- package/dist/{agent-mcp.d-B1h3RznZ.d.ts → agent-mcp.d-BPa5n0ld.d.ts} +1 -1
- package/dist/{agent-mcp.d-WFQotg8M.d.mts → agent-mcp.d-DOP95Jxm.d.mts} +1 -1
- package/dist/agent-runtime.cjs +3 -3
- package/dist/agent-runtime.d.mts +4 -4
- package/dist/agent-runtime.d.ts +4 -4
- package/dist/agent-runtime.mjs +2 -2
- package/dist/{analyzer-64YS2OXQ.mjs → analyzer-F7CWE5VA.mjs} +3 -3
- package/dist/analyzer-I7RBBQ65.cjs +16 -0
- package/dist/api/client.cjs +1 -1
- package/dist/api/client.mjs +1 -1
- package/dist/api/client.native.cjs +1 -1
- package/dist/api/client.native.mjs +1 -1
- package/dist/api/node.cjs +7 -7
- package/dist/api/node.d.mts +6 -6
- package/dist/api/node.d.ts +6 -6
- package/dist/api/node.mjs +6 -6
- package/dist/api/route-manager.cjs +10 -10
- package/dist/api/route-manager.d.mts +6 -6
- package/dist/api/route-manager.d.ts +6 -6
- package/dist/api/route-manager.mjs +9 -9
- package/dist/api/runtime.cjs +6 -6
- package/dist/api/runtime.d.mts +5 -5
- package/dist/api/runtime.d.ts +5 -5
- package/dist/api/runtime.mjs +5 -5
- package/dist/api.cjs +12 -12
- package/dist/api.d.mts +7 -7
- package/dist/api.d.ts +7 -7
- package/dist/api.mjs +11 -11
- package/dist/{app-manifest.d-EZEYG-tD.d.mts → app-manifest.d-9UD6BznX.d.mts} +1 -1
- package/dist/{app-manifest.d-Ktsqsuk9.d.ts → app-manifest.d-CO6Iu0Hx.d.ts} +1 -1
- package/dist/app-markdown.cjs +6 -6
- package/dist/app-markdown.d.mts +5 -5
- package/dist/app-markdown.d.ts +5 -5
- package/dist/app-markdown.mjs +5 -5
- package/dist/{app.d-DTkqYcIr.d.mts → app.d-DXeRWZK7.d.mts} +4 -4
- package/dist/{app.d-CSh3y8w8.d.ts → app.d-DwX1ePhs.d.ts} +4 -4
- package/dist/cache.cjs +4 -4
- package/dist/cache.mjs +3 -3
- package/dist/{chunk-QYOAGT3E.cjs → chunk-2BEGVSDF.cjs} +6 -5
- package/dist/{chunk-WW62HKA2.cjs → chunk-2FK47RRZ.cjs} +15 -15
- package/dist/{chunk-2YJ4DHTD.cjs → chunk-2NOHVIJ3.cjs} +2 -2
- package/dist/{chunk-GDM3ZD2O.cjs → chunk-2OFP3IVA.cjs} +5 -1
- package/dist/{chunk-JRBWBMP2.mjs → chunk-2RRTOKRZ.mjs} +1 -1
- package/dist/{chunk-BTHNOAOF.mjs → chunk-3JQBQG7K.mjs} +4 -4
- package/dist/{chunk-H76C5AOU.mjs → chunk-3K2E55BJ.mjs} +2 -2
- package/dist/{chunk-VJ6L7TII.cjs → chunk-3SPECQXI.cjs} +31 -20
- package/dist/{chunk-FNVGK72M.mjs → chunk-44G4XHEL.mjs} +15 -8
- package/dist/{chunk-63EFR2WF.cjs → chunk-4H4ZXUNB.cjs} +3 -3
- package/dist/{chunk-ZBE5EHVJ.mjs → chunk-4MIDUSIX.mjs} +14 -14
- package/dist/{chunk-F4ID7BGO.cjs → chunk-4OFWG4IK.cjs} +7 -7
- package/dist/{chunk-WXMR3OHY.mjs → chunk-4WXNTAOM.mjs} +1 -1
- package/dist/{chunk-LTDMJD2F.cjs → chunk-5OAN7BG5.cjs} +12 -12
- package/dist/{chunk-MQW4LHJR.cjs → chunk-5VDJEKGK.cjs} +4 -4
- package/dist/{chunk-CYNQPKA4.cjs → chunk-5ZHC6QGD.cjs} +2 -2
- package/dist/{chunk-ALEUMLJN.mjs → chunk-67JTJCAS.mjs} +3 -2
- package/dist/{chunk-WHNNDFCJ.mjs → chunk-6GJZJAED.mjs} +1 -1
- package/dist/{chunk-SYPEMXW2.mjs → chunk-6MZSTPD2.mjs} +1 -1
- package/dist/{chunk-SFSTZ7TB.cjs → chunk-7DD5TNPS.cjs} +8 -8
- package/dist/{chunk-GC5ROI3A.cjs → chunk-7U4XF76R.cjs} +1 -1
- package/dist/{chunk-QVBXTSIZ.mjs → chunk-7V5M43ND.mjs} +1 -1
- package/dist/{chunk-62DZHPDK.cjs → chunk-7YLDUB4R.cjs} +10 -10
- package/dist/{chunk-7EOSFIPN.cjs → chunk-A4WWKG2B.cjs} +2 -2
- package/dist/{chunk-OCKQ3YOH.mjs → chunk-A5D3UMLJ.mjs} +2 -2
- package/dist/{chunk-DSRWQ4SJ.cjs → chunk-ANZLZNNX.cjs} +83 -25
- package/dist/{chunk-CSAIIMY3.mjs → chunk-ATISIC6G.mjs} +1 -1
- package/dist/{chunk-FVVGEGQ2.cjs → chunk-AXA2BSX3.cjs} +2 -2
- package/dist/{chunk-BNCKXPCU.cjs → chunk-BIAGSYIZ.cjs} +30 -30
- package/dist/{chunk-FPGSIOWS.mjs → chunk-BPWTSPK6.mjs} +3 -3
- package/dist/{chunk-UYACD4SH.cjs → chunk-CCMP4JD2.cjs} +1 -1
- package/dist/{chunk-JHZ6HULQ.cjs → chunk-CGIVCGH5.cjs} +2 -2
- package/dist/{chunk-ERT6HQAI.mjs → chunk-CNDBLUKI.mjs} +2 -2
- package/dist/{chunk-3AJQFVWW.mjs → chunk-COTFX4GT.mjs} +2 -2
- package/dist/{chunk-RK4MGL6Q.mjs → chunk-CYRO3WP4.mjs} +4 -3
- package/dist/{chunk-PUEPDMWY.cjs → chunk-DVHFIETW.cjs} +29 -22
- package/dist/{chunk-F35C3TJZ.mjs → chunk-E4E4Y5FD.mjs} +1 -1
- package/dist/{chunk-TQOYIPMQ.mjs → chunk-EG5YBYHO.mjs} +2 -2
- package/dist/{chunk-2DA7CLY7.mjs → chunk-EILUVBKS.mjs} +14 -0
- package/dist/{chunk-GAAK3HDZ.mjs → chunk-EY7ED5UW.mjs} +6 -6
- package/dist/{chunk-ZO6TOLHL.mjs → chunk-FS55CNTC.mjs} +1 -1
- package/dist/{chunk-YRQ44JTF.cjs → chunk-G4SZC2WH.cjs} +649 -446
- package/dist/{chunk-OQZF6H6G.cjs → chunk-GAWSWJJ2.cjs} +27 -27
- package/dist/{chunk-QUEYL2WM.cjs → chunk-GBESKA76.cjs} +4 -4
- package/dist/{chunk-NTHAZLVS.mjs → chunk-GBW5DU7V.mjs} +385 -182
- package/dist/{chunk-OVUU2RCQ.mjs → chunk-HD5FLXP2.mjs} +1 -1
- package/dist/{chunk-Q2EKSSEG.cjs → chunk-HEDGTXXB.cjs} +14 -14
- package/dist/{chunk-5QZT2EQN.cjs → chunk-HNUBRUFQ.cjs} +2 -2
- package/dist/{chunk-JA6RML7C.mjs → chunk-HR4N2K4V.mjs} +2 -2
- package/dist/{chunk-6D3CJFNU.cjs → chunk-HR5GU4UU.cjs} +7 -7
- package/dist/{chunk-SX535SU5.cjs → chunk-IJPRCQHW.cjs} +10 -10
- package/dist/{chunk-SMYDCZBW.mjs → chunk-JGEN2FIT.mjs} +1 -1
- package/dist/{chunk-3GMD2E4Q.mjs → chunk-K3XKEZR6.mjs} +3 -3
- package/dist/{chunk-LPXJEZJK.mjs → chunk-KCJBIWBM.mjs} +2 -2
- package/dist/{chunk-IXC6WDMT.mjs → chunk-KEU55O2D.mjs} +1 -1
- package/dist/{chunk-5WFPZG7K.mjs → chunk-KKVRWNDH.mjs} +6 -6
- package/dist/{chunk-NSNQLBHR.cjs → chunk-KMGHXIDA.cjs} +2 -2
- package/dist/{chunk-Z2FFLTF5.mjs → chunk-LTXKRIST.mjs} +2 -2
- package/dist/{chunk-YROK6CJC.cjs → chunk-LVGB5PYK.cjs} +30 -30
- package/dist/{chunk-QODXWUGQ.mjs → chunk-MDEFTF63.mjs} +69 -14
- package/dist/{chunk-FTQUNBRN.cjs → chunk-MHKPXX3J.cjs} +2 -2
- package/dist/{chunk-HFJLMALC.cjs → chunk-MQOHYV6L.cjs} +17 -17
- package/dist/{chunk-BGUTIQII.mjs → chunk-MUZHULW2.mjs} +1 -1
- package/dist/{chunk-WGNGM6MJ.mjs → chunk-MZ5QGWRW.mjs} +2 -2
- package/dist/{chunk-DZZHTMWM.cjs → chunk-N3H7UPBM.cjs} +3 -2
- package/dist/{chunk-CF74ABRI.mjs → chunk-NJ4OASLP.mjs} +4 -4
- package/dist/{chunk-RFXEQYPH.cjs → chunk-NW3DL2PM.cjs} +83 -24
- package/dist/{chunk-QDHR54S6.cjs → chunk-OBVBII5K.cjs} +5 -5
- package/dist/{chunk-WRWJ7IWT.cjs → chunk-OLKYHTLN.cjs} +5 -5
- package/dist/{chunk-EVIWKPJV.cjs → chunk-PLJMEUAN.cjs} +15 -1
- package/dist/{chunk-EMTN5ABC.mjs → chunk-POVHO46S.mjs} +1 -1
- package/dist/{chunk-X3Y6JWJG.cjs → chunk-PWMJBCAN.cjs} +3 -3
- package/dist/{chunk-PG7J7XYT.cjs → chunk-Q4TRGTO7.cjs} +6 -6
- package/dist/{chunk-KUXEII7V.mjs → chunk-Q4YEAWUK.mjs} +1 -1
- package/dist/{chunk-D2RLADWN.mjs → chunk-QBJ6N5MT.mjs} +83 -24
- package/dist/{chunk-PKXGFQZS.mjs → chunk-QD34VE4N.mjs} +1 -1
- package/dist/{chunk-2QPTZMGK.mjs → chunk-QHAISITM.mjs} +1 -1
- package/dist/{chunk-VJI2LWTL.cjs → chunk-RFNQTQ44.cjs} +2 -2
- package/dist/{chunk-TZ2YPXLB.cjs → chunk-RLCOWWE5.cjs} +7 -7
- package/dist/{chunk-IG2JE6WJ.mjs → chunk-RLEAVG6G.mjs} +1 -1
- package/dist/{chunk-SL2BSPDJ.mjs → chunk-RPA45OQS.mjs} +2 -2
- package/dist/{chunk-ORWXJDUN.mjs → chunk-RQBGHHOQ.mjs} +1 -1
- package/dist/{chunk-GC2BSXQS.cjs → chunk-SDICLSQU.cjs} +11 -11
- package/dist/{chunk-FE6KYDHC.cjs → chunk-SHDCKRP4.cjs} +3 -3
- package/dist/{chunk-DUSTJ6A5.mjs → chunk-SLEHAGGV.mjs} +2 -2
- package/dist/{chunk-IIVZTGGP.cjs → chunk-T3SMMLSB.cjs} +2 -2
- package/dist/{chunk-K6DXKHFE.mjs → chunk-TE7AX6HB.mjs} +1 -1
- package/dist/chunk-TIZJYHB7.mjs +42 -0
- package/dist/{chunk-NQZWLIPT.cjs → chunk-TS3ZHJN5.cjs} +3 -3
- package/dist/{chunk-KHS3T3E5.mjs → chunk-TYHWZOA2.mjs} +1 -1
- package/dist/{chunk-Z3QXQN4U.mjs → chunk-U6GMCDRS.mjs} +1 -1
- package/dist/{chunk-URQW27KO.mjs → chunk-UBLKPREL.mjs} +1 -1
- package/dist/{chunk-DD22NQFX.cjs → chunk-UGLTOLTJ.cjs} +2 -2
- package/dist/{chunk-PE2LEWXA.mjs → chunk-UJPE75GF.mjs} +1 -1
- package/dist/{chunk-6ZFGWB75.cjs → chunk-UWOCYINY.cjs} +4 -4
- package/dist/chunk-UZM3PDKK.cjs +46 -0
- package/dist/{chunk-YTGNMKRA.mjs → chunk-V73Y4UBL.mjs} +67 -9
- package/dist/{chunk-G7B6NU4X.cjs → chunk-VFMHE5D3.cjs} +3 -3
- package/dist/{chunk-IXO6O2EL.cjs → chunk-VGVRGGP4.cjs} +2 -2
- package/dist/{chunk-YRXPDKMM.cjs → chunk-W53Z4WDI.cjs} +8 -8
- package/dist/{chunk-47R7CX4A.mjs → chunk-WBPVLCNE.mjs} +1 -1
- package/dist/{chunk-4VLXQ55O.cjs → chunk-WIZRYFB2.cjs} +3 -3
- package/dist/{chunk-WZVESREI.cjs → chunk-WJ2O2MPP.cjs} +312 -291
- package/dist/{chunk-SIYELCIX.cjs → chunk-X4TSMQWF.cjs} +339 -309
- package/dist/{chunk-DASQJ5UD.mjs → chunk-XF7MJSUS.mjs} +1 -1
- package/dist/{chunk-S7QEQCVV.mjs → chunk-XGL42MQ7.mjs} +1 -1
- package/dist/{chunk-YN7G22MP.cjs → chunk-XKUKWMGX.cjs} +3 -3
- package/dist/{chunk-JD42G6BN.cjs → chunk-XY5OZQF6.cjs} +2 -2
- package/dist/{chunk-7EXFAJST.mjs → chunk-XZBBKZGW.mjs} +80 -59
- package/dist/{chunk-3QM74STY.cjs → chunk-Y2FEFQAY.cjs} +3 -3
- package/dist/{chunk-ZJGFAW5U.mjs → chunk-YHHOTKUT.mjs} +5 -1
- package/dist/{chunk-65XXHTVJ.mjs → chunk-YN3YMSKD.mjs} +4 -4
- package/dist/{chunk-PDACTAVX.mjs → chunk-YOVSWY2E.mjs} +1 -1
- package/dist/{chunk-R5X7FDOG.mjs → chunk-YU2MNIIY.mjs} +1 -1
- package/dist/{chunk-42EUEYW6.cjs → chunk-YUQUGVSV.cjs} +8 -8
- package/dist/{chunk-DZ3AZ7UK.cjs → chunk-Z4SMFUZ7.cjs} +28 -28
- package/dist/{chunk-7SAGHWWU.cjs → chunk-Z5BANEQD.cjs} +6 -6
- package/dist/{chunk-IHMSLS2O.mjs → chunk-ZDYYZX73.mjs} +63 -33
- package/dist/{chunk-4PWGLPL6.mjs → chunk-ZIEO3DQ3.mjs} +26 -15
- package/dist/{chunk-FCHEO3LG.cjs → chunk-ZPEZXQTM.cjs} +22 -22
- package/dist/{chunk-PMKUTZGR.cjs → chunk-ZVSQN7NC.cjs} +135 -80
- package/dist/{cli-runtime.d-DljFfr8T.d.ts → cli-runtime.d-8BhZy_wr.d.ts} +7 -6
- package/dist/{cli-runtime.d-HSkdfvoq.d.mts → cli-runtime.d-DPNTN-JV.d.mts} +7 -6
- package/dist/client/lifecycle.cjs +1 -1
- package/dist/client/lifecycle.d.mts +1 -1
- package/dist/client/lifecycle.d.ts +1 -1
- package/dist/client/lifecycle.mjs +1 -1
- package/dist/{client-component.d-B-1dIlsw.d.mts → client-component.d-CMCdyAr8.d.mts} +1 -1
- package/dist/{client-component.d-_otXB__v.d.ts → client-component.d-CkDcob6D.d.ts} +1 -1
- package/dist/client-plugins.cjs +1 -1
- package/dist/{client-plugins.d-MjxlvbCK.d.ts → client-plugins.d-BYIovYqX.d.ts} +4 -4
- package/dist/{client-plugins.d-BmBzvfSP.d.mts → client-plugins.d-WcMwOZGZ.d.mts} +4 -4
- package/dist/client-plugins.d.mts +4 -4
- package/dist/client-plugins.d.ts +4 -4
- package/dist/client-plugins.mjs +1 -1
- package/dist/client.cjs +4 -4
- package/dist/client.d.mts +9 -9
- package/dist/client.d.ts +9 -9
- package/dist/client.mjs +3 -3
- package/dist/config.cjs +1 -1
- package/dist/config.d.mts +4 -4
- package/dist/config.d.ts +4 -4
- package/dist/config.mjs +1 -1
- package/dist/cron.cjs +4 -4
- package/dist/cron.mjs +3 -3
- package/dist/deferred.cjs +1 -1
- package/dist/deferred.mjs +1 -1
- package/dist/deployment.cjs +1 -1
- package/dist/deployment.mjs +1 -1
- package/dist/desktop.cjs +1 -1
- package/dist/desktop.d.mts +5 -5
- package/dist/desktop.d.ts +5 -5
- package/dist/desktop.mjs +1 -1
- package/dist/{dev-guard-ZDIELV6Q.mjs → dev-guard-K3GJDPEQ.mjs} +1 -1
- package/dist/{dev-guard-ZLLKVO5T.cjs → dev-guard-VIEEA4LS.cjs} +1 -1
- package/dist/{devtools-7LHXG2VS.mjs → devtools-F3FDFV26.mjs} +11 -11
- package/dist/{devtools-NNQN66EZ.cjs → devtools-JJOYTIMS.cjs} +13 -13
- package/dist/{devtools-client-X5OQCXDF.cjs → devtools-client-BKBCCORT.cjs} +1 -1
- package/dist/{devtools-client-SU4XH46J.mjs → devtools-client-L4MUWD6K.mjs} +1 -1
- package/dist/{devtools-ui-CYBVFLPH.mjs → devtools-ui-BOG33MT5.mjs} +1 -1
- package/dist/{devtools-ui-SYRUXUA7.cjs → devtools-ui-C2EMF2SO.cjs} +1 -1
- package/dist/docs.cjs +15 -15
- package/dist/docs.d.mts +6 -6
- package/dist/docs.d.ts +6 -6
- package/dist/docs.mjs +14 -14
- package/dist/env-types.cjs +1 -1
- package/dist/env-types.mjs +1 -1
- package/dist/env.cjs +1 -1
- package/dist/env.mjs +1 -1
- package/dist/environment/vite.cjs +6 -6
- package/dist/environment/vite.d.mts +9 -0
- package/dist/environment/vite.d.ts +9 -0
- package/dist/environment/vite.mjs +5 -5
- package/dist/environment.cjs +1 -1
- package/dist/environment.mjs +1 -1
- package/dist/font.cjs +1 -1
- package/dist/font.mjs +1 -1
- package/dist/{handler.d-C53zFDmp.d.ts → handler.d-BwdOyc9x.d.ts} +1 -1
- package/dist/{handler.d-CaYopqaD.d.mts → handler.d-s3IM6pbJ.d.mts} +1 -1
- package/dist/headers.cjs +1 -1
- package/dist/{headers.d-MBkD9ZLf.d.mts → headers.d-BR-OXrqQ.d.mts} +1 -1
- package/dist/{headers.d-BvtpC90T.d.ts → headers.d-CAW4wPey.d.ts} +1 -1
- package/dist/headers.mjs +1 -1
- package/dist/i18n/client.cjs +1 -1
- package/dist/i18n/client.mjs +1 -1
- package/dist/i18n/index.cjs +1 -1
- package/dist/i18n/index.mjs +1 -1
- package/dist/i18n/server.cjs +1 -1
- package/dist/i18n/server.mjs +1 -1
- package/dist/image/server.cjs +1 -1
- package/dist/image/server.mjs +1 -1
- package/dist/image/sharp.cjs +1 -1
- package/dist/image/sharp.mjs +1 -1
- package/dist/image.cjs +1 -1
- package/dist/image.mjs +1 -1
- package/dist/index.cjs +74 -68
- package/dist/{index.d-Mikf-tdP.d.mts → index.d-BEVK61zS.d.mts} +1 -1
- package/dist/{index.d-2hQpPZ-P.d.ts → index.d-ah2c89Wu.d.ts} +1 -1
- package/dist/index.d.mts +25 -25
- package/dist/index.d.ts +25 -25
- package/dist/index.mjs +72 -66
- package/dist/instrumentation.cjs +1 -1
- package/dist/instrumentation.mjs +1 -1
- package/dist/integrations/orm.cjs +4 -4
- package/dist/integrations/orm.d.mts +4 -4
- package/dist/integrations/orm.d.ts +4 -4
- package/dist/integrations/orm.mjs +3 -3
- package/dist/integrations.cjs +3 -3
- package/dist/integrations.d.mts +4 -4
- package/dist/integrations.d.ts +4 -4
- package/dist/integrations.mjs +2 -2
- package/dist/internal/app-markdown-runtime.cjs +5 -5
- package/dist/internal/app-markdown-runtime.d.mts +5 -5
- package/dist/internal/app-markdown-runtime.d.ts +5 -5
- package/dist/internal/app-markdown-runtime.mjs +4 -4
- package/dist/internal/build-runtime.cjs +51 -51
- package/dist/internal/build-runtime.d.mts +7 -7
- package/dist/internal/build-runtime.d.ts +7 -7
- package/dist/internal/build-runtime.mjs +50 -50
- package/dist/internal/cli-runtime.cjs +31 -28
- package/dist/internal/cli-runtime.d.mts +11 -11
- package/dist/internal/cli-runtime.d.ts +11 -11
- package/dist/internal/cli-runtime.mjs +30 -27
- package/dist/internal/client-error-overlay.cjs +5 -5
- package/dist/internal/client-error-overlay.mjs +2 -2
- package/dist/internal/client-runtime.cjs +49 -12
- package/dist/internal/client-runtime.d.mts +17 -21
- package/dist/internal/client-runtime.d.ts +17 -21
- package/dist/internal/client-runtime.mjs +38 -1
- package/dist/internal/compression-runtime.cjs +1 -1
- package/dist/internal/compression-runtime.d.mts +4 -4
- package/dist/internal/compression-runtime.d.ts +4 -4
- package/dist/internal/compression-runtime.mjs +1 -1
- package/dist/internal/config-runtime.cjs +13 -13
- package/dist/internal/config-runtime.d.mts +6 -6
- package/dist/internal/config-runtime.d.ts +6 -6
- package/dist/internal/config-runtime.mjs +12 -12
- package/dist/internal/desktop-guard.cjs +1 -1
- package/dist/internal/desktop-guard.mjs +1 -1
- package/dist/internal/docs-precompiled-runtime.cjs +1 -1
- package/dist/internal/docs-precompiled-runtime.mjs +1 -1
- package/dist/internal/form-actions-client.cjs +1 -1
- package/dist/internal/form-actions-client.mjs +1 -1
- package/dist/internal/form-actions.cjs +1 -1
- package/dist/internal/form-actions.mjs +1 -1
- package/dist/internal/infra-analytics-runtime.cjs +11 -11
- package/dist/internal/infra-analytics-runtime.mjs +9 -9
- package/dist/internal/island-codec.cjs +1 -1
- package/dist/internal/island-codec.mjs +1 -1
- package/dist/internal/island-value-store.cjs +1 -1
- package/dist/internal/island-value-store.mjs +1 -1
- package/dist/internal/islands-boot.cjs +59 -10
- package/dist/internal/islands-boot.d.mts +19 -1
- package/dist/internal/islands-boot.d.ts +19 -1
- package/dist/internal/islands-boot.mjs +55 -6
- package/dist/internal/islands-runtime.cjs +1 -1
- package/dist/internal/islands-runtime.mjs +1 -1
- package/dist/internal/islands-server.cjs +1 -1
- package/dist/internal/islands-server.mjs +1 -1
- package/dist/internal/islx-client.cjs +1 -1
- package/dist/internal/islx-react.cjs +1 -1
- package/dist/internal/islx-server.cjs +1 -1
- package/dist/internal/isolated-boundary.cjs +1 -1
- package/dist/internal/isolated-boundary.mjs +1 -1
- package/dist/internal/metadata-image-runtime.cjs +1 -1
- package/dist/internal/metadata-image-runtime.mjs +1 -1
- package/dist/internal/native-server-fns.cjs +5 -5
- package/dist/internal/native-server-fns.mjs +4 -4
- package/dist/internal/product-telemetry-runtime.cjs +4 -4
- package/dist/internal/product-telemetry-runtime.mjs +3 -3
- package/dist/internal/production-node-env.cjs +1 -1
- package/dist/internal/production-node-env.mjs +1 -1
- package/dist/internal/production-runtime.cjs +27 -27
- package/dist/internal/production-runtime.d.mts +14 -13
- package/dist/internal/production-runtime.d.ts +14 -13
- package/dist/internal/production-runtime.mjs +28 -28
- package/dist/internal/react-cache.cjs +1 -1
- package/dist/internal/react-cache.mjs +1 -1
- package/dist/internal/request-cookies.cjs +1 -1
- package/dist/internal/request-cookies.mjs +1 -1
- package/dist/internal/server-fn-transform.cjs +1 -1
- package/dist/internal/server-fn-transform.mjs +1 -1
- package/dist/internal/server-tree.cjs +1 -1
- package/dist/internal/server-tree.mjs +1 -1
- package/dist/internal/spa-router.cjs +44 -0
- package/dist/internal/spa-router.d.mts +41 -0
- package/dist/internal/spa-router.d.ts +41 -0
- package/dist/internal/spa-router.mjs +44 -0
- package/dist/internal/start-manifest.cjs +1 -1
- package/dist/internal/start-manifest.d.mts +4 -4
- package/dist/internal/start-manifest.d.ts +4 -4
- package/dist/internal/start-manifest.mjs +1 -1
- package/dist/internal/vercel-edge-middleware.cjs +4 -4
- package/dist/internal/vercel-edge-middleware.mjs +3 -3
- package/dist/json-ld.cjs +1 -1
- package/dist/json-ld.mjs +1 -1
- package/dist/{layers-I7VE5Q2Y.mjs → layers-5ZD4764G.mjs} +1 -1
- package/dist/{layers-WP5K5F7W.cjs → layers-HMEGUEXM.cjs} +1 -1
- package/dist/libsql-http-2QD224YS.mjs +600 -0
- package/dist/libsql-http-M6LMNXCN.cjs +600 -0
- package/dist/{lifecycle.d-VzcXyEyn.d.ts → lifecycle.d-OtGWAvJT.d.mts} +1 -1
- package/dist/{lifecycle.d-VzcXyEyn.d.mts → lifecycle.d-OtGWAvJT.d.ts} +1 -1
- package/dist/{manager-YO2RHDYU.mjs → manager-OMTC5FOJ.mjs} +2 -2
- package/dist/{manager-R7FV4A56.cjs → manager-PX4QN4HK.cjs} +4 -4
- package/dist/markdown.cjs +4 -4
- package/dist/markdown.d.mts +4 -4
- package/dist/markdown.d.ts +4 -4
- package/dist/markdown.mjs +3 -3
- package/dist/middleware.cjs +10 -10
- package/dist/middleware.d.mts +4 -4
- package/dist/middleware.d.ts +4 -4
- package/dist/middleware.mjs +9 -9
- package/dist/mobile.cjs +1 -1
- package/dist/mobile.mjs +1 -1
- package/dist/{modules-KOKD4XS6.mjs → modules-3Q2ZCY4Q.mjs} +1 -1
- package/dist/{modules-QTP7WJPD.cjs → modules-KDHFBQ6L.cjs} +1 -1
- package/dist/{mount.d-GU-tNxbE.d.ts → mount.d-DcoPFqv5.d.ts} +1 -1
- package/dist/{mount.d-DsP46XCy.d.mts → mount.d-Ylo-CmzK.d.mts} +1 -1
- package/dist/{native-server-fn-handler-LII4MDRR.mjs → native-server-fn-handler-OXFTI6V5.mjs} +5 -5
- package/dist/{native-server-fn-handler-IWNKQEXK.cjs → native-server-fn-handler-TNVFEQW3.cjs} +6 -6
- package/dist/{native-specs-LDV6IZ4N.mjs → native-specs-A7YOL463.mjs} +1 -1
- package/dist/{native-specs-5OLED4MM.cjs → native-specs-JDPH26AO.cjs} +1 -1
- package/dist/{native-tree-D3PW64ZL.cjs → native-tree-5TENEQ7Y.cjs} +5 -5
- package/dist/{native-tree-G6ZWS7IR.mjs → native-tree-LNO7K6JR.mjs} +4 -4
- package/dist/native.cjs +1 -1
- package/dist/native.mjs +1 -1
- package/dist/{navigation-delegate.d-DsxNPrLT.d.ts → navigation-delegate.d-2MK4YSlL.d.ts} +1 -1
- package/dist/{navigation-delegate.d-CUtNOYLi.d.mts → navigation-delegate.d-BA5h0fbE.d.mts} +1 -1
- package/dist/navigation.cjs +5 -5
- package/dist/navigation.d.mts +7 -7
- package/dist/navigation.d.ts +7 -7
- package/dist/navigation.mjs +4 -4
- package/dist/{nitro-HKMVYIXY.cjs → nitro-6UOJXJZ6.cjs} +8 -8
- package/dist/{nitro-RHLKLYXH.mjs → nitro-C3MYDX7V.mjs} +4 -4
- package/dist/{node-module-bundle-LIZ2KMVW.cjs → node-module-bundle-M6BISE2P.cjs} +1 -1
- package/dist/{node-module-bundle-VR6NV6AI.mjs → node-module-bundle-XPLBMXRD.mjs} +1 -1
- package/dist/observability.cjs +9 -3
- package/dist/{observability.d-DdJRiaIX.d.ts → observability.d-mXSbp4jc.d.mts} +17 -1
- package/dist/{observability.d-DdJRiaIX.d.mts → observability.d-mXSbp4jc.d.ts} +17 -1
- package/dist/observability.d.mts +1 -1
- package/dist/observability.d.ts +1 -1
- package/dist/observability.mjs +8 -2
- package/dist/og.cjs +1 -1
- package/dist/og.mjs +1 -1
- package/dist/platform.cjs +1 -1
- package/dist/platform.mjs +1 -1
- package/dist/{plugin-2KWR2X4B.mjs → plugin-33I3V42N.mjs} +2 -2
- package/dist/{plugin-MW7IDV76.cjs → plugin-LN3JBZRR.cjs} +3 -3
- package/dist/plugin.cjs +41 -41
- package/dist/plugin.d.mts +8 -8
- package/dist/plugin.d.ts +8 -8
- package/dist/plugin.mjs +40 -40
- package/dist/{port-CLL4BC4O.mjs → port-CEZTV776.mjs} +1 -1
- package/dist/{port-HASZTQGY.cjs → port-STMSGUVU.cjs} +1 -1
- package/dist/query/client.cjs +7 -7
- package/dist/query/client.mjs +2 -2
- package/dist/query/index.cjs +1 -1
- package/dist/query/index.mjs +1 -1
- package/dist/query/parsers.cjs +1 -1
- package/dist/query/parsers.mjs +1 -1
- package/dist/query/server.cjs +1 -1
- package/dist/query/server.mjs +1 -1
- package/dist/{render-plan.d-8K6S0h0L.d.ts → render-plan.d-2o-AG-ot.d.ts} +1 -1
- package/dist/{render-plan.d-B7Xp-PPW.d.mts → render-plan.d-ChYBMhLu.d.mts} +1 -1
- package/dist/renderer/none/server.cjs +1 -1
- package/dist/renderer/none/server.mjs +1 -1
- package/dist/renderer/react/client.cjs +1 -1
- package/dist/renderer/react/client.mjs +1 -1
- package/dist/renderer/react/server.cjs +1 -1
- package/dist/renderer/react/server.mjs +1 -1
- package/dist/renderer/react/vite.cjs +1 -1
- package/dist/renderer/react/vite.mjs +1 -1
- package/dist/renderer-client.cjs +5 -5
- package/dist/renderer-client.d.mts +7 -7
- package/dist/renderer-client.d.ts +7 -7
- package/dist/renderer-client.mjs +2 -2
- package/dist/renderer.cjs +1 -1
- package/dist/renderer.d.mts +16 -1
- package/dist/renderer.d.ts +16 -1
- package/dist/renderer.mjs +1 -1
- package/dist/request.cjs +1 -1
- package/dist/{request.d-CuQxmOqX.d.ts → request.d-CE0FIkiM.d.ts} +1 -1
- package/dist/{request.d-nhqciCAz.d.mts → request.d-RCnCBuWq.d.mts} +1 -1
- package/dist/request.d.mts +5 -5
- package/dist/request.d.ts +5 -5
- package/dist/request.mjs +1 -1
- package/dist/{route-rendering.d-BSsdDYC1.d.ts → route-rendering.d-BTPOM2nU.d.ts} +1 -1
- package/dist/{route-rendering.d-CeF1FOnl.d.mts → route-rendering.d-BZJnfKsp.d.mts} +1 -1
- package/dist/router.cjs +1 -1
- package/dist/{router.d-C7yGlhDL.d.ts → router.d-BU_WE6Ol.d.ts} +1 -1
- package/dist/{router.d-D462OX24.d.mts → router.d-D8Vvwl4i.d.mts} +1 -1
- package/dist/router.mjs +1 -1
- package/dist/routes.cjs +5 -5
- package/dist/routes.d.mts +4 -4
- package/dist/routes.d.ts +4 -4
- package/dist/routes.mjs +4 -4
- package/dist/{rsc-pipeline-7PV6ARDS.cjs → rsc-pipeline-A3R4U26C.cjs} +17 -17
- package/dist/{rsc-pipeline-EZU4W4RL.mjs → rsc-pipeline-JZWVSHOR.mjs} +16 -16
- package/dist/{runtime-RWLFEPS3.mjs → runtime-SQFRHRGJ.mjs} +20 -20
- package/dist/{runtime-QOE3NRXF.cjs → runtime-WZ3CHHGJ.cjs} +28 -28
- package/dist/{runtime.d-C-BHQMy5.d.mts → runtime.d-BnmuOXVD.d.mts} +1 -1
- package/dist/{runtime.d-CORDJQMy.d.ts → runtime.d-DJ6IIKcF.d.ts} +1 -1
- package/dist/safe-fetch.cjs +1 -1
- package/dist/safe-fetch.mjs +1 -1
- package/dist/{schema-dev-notice-CA55V57L.mjs → schema-dev-notice-EUPAUJVN.mjs} +3 -3
- package/dist/{schema-dev-notice-RWA2UTR6.cjs → schema-dev-notice-ZSCL47CT.cjs} +6 -6
- package/dist/schema.cjs +1 -1
- package/dist/schema.mjs +1 -1
- package/dist/search-client-A7YJT7JZ.cjs +15 -0
- package/dist/{search-client-OXH6GBNO.mjs → search-client-GIXIEU75.mjs} +2 -2
- package/dist/server-action-security.cjs +1 -1
- package/dist/server-action-security.mjs +1 -1
- package/dist/{server-components-status.d-BbADqqjq.d.ts → server-components-status.d-BeqSXcjM.d.ts} +1 -1
- package/dist/{server-components-status.d-BJ6huueH.d.mts → server-components-status.d-BzOg9M8g.d.mts} +1 -1
- package/dist/server-fn-client.cjs +1 -1
- package/dist/server-fn-client.mjs +1 -1
- package/dist/server-fn.cjs +5 -5
- package/dist/server-fn.mjs +4 -4
- package/dist/server-plugins.cjs +1 -1
- package/dist/server-plugins.d.mts +6 -6
- package/dist/server-plugins.d.ts +6 -6
- package/dist/server-plugins.mjs +1 -1
- package/dist/server-query-client.cjs +1 -1
- package/dist/server-query-client.mjs +1 -1
- package/dist/server-query.cjs +6 -6
- package/dist/server-query.mjs +5 -5
- package/dist/server.cjs +122 -100
- package/dist/server.d.mts +15 -15
- package/dist/server.d.ts +15 -15
- package/dist/server.mjs +77 -55
- package/dist/{session-WPAT6H76.mjs → session-4IB34X35.mjs} +3 -3
- package/dist/session-MOYQJ7E6.cjs +24 -0
- package/dist/{spa-router.d-DyGJLQc_.d.ts → spa-router.d-BOwuVkMl.d.ts} +20 -4
- package/dist/{spa-router.d-DfjafHyX.d.mts → spa-router.d-CDpftSsk.d.mts} +20 -4
- package/dist/{ssg.d-D11lz_wr.d.ts → ssg.d-BTVqyq8T.d.ts} +2 -2
- package/dist/{ssg.d-iiLTyLAO.d.mts → ssg.d-Bx_WFuwg.d.mts} +2 -2
- package/dist/storage.cjs +3 -3
- package/dist/storage.d.mts +112 -96
- package/dist/storage.d.ts +112 -96
- package/dist/storage.mjs +2 -2
- package/dist/testing.cjs +13 -13
- package/dist/testing.d.mts +4 -4
- package/dist/testing.d.ts +4 -4
- package/dist/testing.mjs +10 -10
- package/dist/theme/client.cjs +1 -1
- package/dist/theme/client.mjs +1 -1
- package/dist/theme/index.cjs +1 -1
- package/dist/theme/index.mjs +1 -1
- package/dist/theme/runtime.cjs +1 -1
- package/dist/theme/runtime.mjs +1 -1
- package/dist/theme/server.cjs +1 -1
- package/dist/theme/server.mjs +1 -1
- package/dist/{types.d-DC97bnjj.d.mts → types.d-C5hlNbHa.d.mts} +14 -2
- package/dist/{types.d-DC97bnjj.d.ts → types.d-C5hlNbHa.d.ts} +14 -2
- package/dist/{utils.d-fW-95yEh.d.mts → utils.d-JkrpS-NJ.d.mts} +1 -1
- package/dist/{utils.d-D-GQeEfa.d.ts → utils.d-_dvevm5s.d.ts} +1 -1
- package/dist/version.cjs +3 -3
- package/dist/version.mjs +2 -2
- package/dist/vite.cjs +43 -41
- package/dist/vite.d.mts +15 -10
- package/dist/vite.d.ts +15 -10
- package/dist/vite.mjs +42 -40
- package/dist/workflows.cjs +4 -4
- package/dist/workflows.mjs +3 -3
- package/package.json +9 -5
- package/types/images.d.ts +9 -0
- package/dist/analyzer-HTNXLX6N.cjs +0 -16
- package/dist/chunk-BTZ5O6VM.cjs +0 -14
- package/dist/chunk-Y6FXYEAI.mjs +0 -10
- package/dist/search-client-ZZLKVO5R.cjs +0 -15
- package/dist/session-OU7M4CIF.cjs +0 -24
- package/dist/{chunk-GFXKO4UW.mjs → chunk-3XTRT3MB.mjs} +48 -48
- package/dist/{chunk-BEXH6BGH.mjs → chunk-6JWXHPVR.mjs} +0 -0
- package/dist/{chunk-RL47VZ6J.mjs → chunk-C2OLXVUC.mjs} +0 -0
- package/dist/{chunk-YTNE4KGC.cjs → chunk-HS4JPIGR.cjs} +0 -0
- package/dist/{chunk-PC5OZ4YR.cjs → chunk-TCMRLW3K.cjs} +0 -0
- package/dist/{chunk-UOE6ZZZP.mjs → chunk-URBP6DLH.mjs} +0 -0
- package/dist/{chunk-AF3PNVVF.cjs → chunk-WGWWRV2M.cjs} +0 -0
- package/dist/{chunk-L7Y65BQU.cjs → chunk-WHEQJN4G.cjs} +48 -48
|
@@ -0,0 +1,600 @@
|
|
|
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 _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } }
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
var _chunkUZM3PDKKcjs = require('./chunk-UZM3PDKK.cjs');
|
|
9
|
+
|
|
10
|
+
// ../../node_modules/.pnpm/@libsql+client@0.17.4/node_modules/@libsql/client/lib-esm/http.js
|
|
11
|
+
var http_exports = {};
|
|
12
|
+
_chunkUZM3PDKKcjs.__export.call(void 0, http_exports, {
|
|
13
|
+
HttpClient: () => HttpClient,
|
|
14
|
+
HttpTransaction: () => HttpTransaction,
|
|
15
|
+
_createClient: () => _createClient,
|
|
16
|
+
createClient: () => createClient
|
|
17
|
+
});
|
|
18
|
+
var _hranaclient = require('@libsql/hrana-client'); var hrana2 = _interopRequireWildcard(_hranaclient); var hrana = _interopRequireWildcard(_hranaclient);
|
|
19
|
+
var _api = require('@libsql/core/api'); var api_star = _interopRequireWildcard(_api);
|
|
20
|
+
var _config = require('@libsql/core/config');
|
|
21
|
+
|
|
22
|
+
// ../../node_modules/.pnpm/@libsql+client@0.17.4/node_modules/@libsql/client/lib-esm/hrana.js
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
var _util = require('@libsql/core/util');
|
|
26
|
+
var _mode, _version, _started;
|
|
27
|
+
var HranaTransaction = class {
|
|
28
|
+
/** @private */
|
|
29
|
+
constructor(mode, version) {
|
|
30
|
+
_chunkUZM3PDKKcjs.__privateAdd.call(void 0, this, _mode);
|
|
31
|
+
_chunkUZM3PDKKcjs.__privateAdd.call(void 0, this, _version);
|
|
32
|
+
// Promise that is resolved when the BEGIN statement completes, or `undefined` if we haven't executed the
|
|
33
|
+
// BEGIN statement yet.
|
|
34
|
+
_chunkUZM3PDKKcjs.__privateAdd.call(void 0, this, _started);
|
|
35
|
+
_chunkUZM3PDKKcjs.__privateSet.call(void 0, this, _mode, mode);
|
|
36
|
+
_chunkUZM3PDKKcjs.__privateSet.call(void 0, this, _version, version);
|
|
37
|
+
_chunkUZM3PDKKcjs.__privateSet.call(void 0, this, _started, void 0);
|
|
38
|
+
}
|
|
39
|
+
execute(stmt) {
|
|
40
|
+
return this.batch([stmt]).then((results) => results[0]);
|
|
41
|
+
}
|
|
42
|
+
async batch(stmts) {
|
|
43
|
+
const stream = this._getStream();
|
|
44
|
+
if (stream.closed) {
|
|
45
|
+
throw new (0, _api.LibsqlError)("Cannot execute statements because the transaction is closed", "TRANSACTION_CLOSED");
|
|
46
|
+
}
|
|
47
|
+
try {
|
|
48
|
+
const hranaStmts = stmts.map(stmtToHrana);
|
|
49
|
+
let rowsPromises;
|
|
50
|
+
if (_chunkUZM3PDKKcjs.__privateGet.call(void 0, this, _started) === void 0) {
|
|
51
|
+
this._getSqlCache().apply(hranaStmts);
|
|
52
|
+
const batch = stream.batch(_chunkUZM3PDKKcjs.__privateGet.call(void 0, this, _version) >= 3);
|
|
53
|
+
const beginStep = batch.step();
|
|
54
|
+
const beginPromise = beginStep.run(_util.transactionModeToBegin.call(void 0, _chunkUZM3PDKKcjs.__privateGet.call(void 0, this, _mode)));
|
|
55
|
+
let lastStep = beginStep;
|
|
56
|
+
rowsPromises = hranaStmts.map((hranaStmt) => {
|
|
57
|
+
const stmtStep = batch.step().condition(hrana.BatchCond.ok(lastStep));
|
|
58
|
+
if (_chunkUZM3PDKKcjs.__privateGet.call(void 0, this, _version) >= 3) {
|
|
59
|
+
stmtStep.condition(hrana.BatchCond.not(hrana.BatchCond.isAutocommit(batch)));
|
|
60
|
+
}
|
|
61
|
+
const rowsPromise = stmtStep.query(hranaStmt);
|
|
62
|
+
rowsPromise.catch(() => void 0);
|
|
63
|
+
lastStep = stmtStep;
|
|
64
|
+
return rowsPromise;
|
|
65
|
+
});
|
|
66
|
+
_chunkUZM3PDKKcjs.__privateSet.call(void 0, this, _started, batch.execute().then(() => beginPromise).then(() => void 0));
|
|
67
|
+
try {
|
|
68
|
+
await _chunkUZM3PDKKcjs.__privateGet.call(void 0, this, _started);
|
|
69
|
+
} catch (e) {
|
|
70
|
+
this.close();
|
|
71
|
+
throw e;
|
|
72
|
+
}
|
|
73
|
+
} else {
|
|
74
|
+
if (_chunkUZM3PDKKcjs.__privateGet.call(void 0, this, _version) < 3) {
|
|
75
|
+
await _chunkUZM3PDKKcjs.__privateGet.call(void 0, this, _started);
|
|
76
|
+
} else {
|
|
77
|
+
}
|
|
78
|
+
this._getSqlCache().apply(hranaStmts);
|
|
79
|
+
const batch = stream.batch(_chunkUZM3PDKKcjs.__privateGet.call(void 0, this, _version) >= 3);
|
|
80
|
+
let lastStep = void 0;
|
|
81
|
+
rowsPromises = hranaStmts.map((hranaStmt) => {
|
|
82
|
+
const stmtStep = batch.step();
|
|
83
|
+
if (lastStep !== void 0) {
|
|
84
|
+
stmtStep.condition(hrana.BatchCond.ok(lastStep));
|
|
85
|
+
}
|
|
86
|
+
if (_chunkUZM3PDKKcjs.__privateGet.call(void 0, this, _version) >= 3) {
|
|
87
|
+
stmtStep.condition(hrana.BatchCond.not(hrana.BatchCond.isAutocommit(batch)));
|
|
88
|
+
}
|
|
89
|
+
const rowsPromise = stmtStep.query(hranaStmt);
|
|
90
|
+
rowsPromise.catch(() => void 0);
|
|
91
|
+
lastStep = stmtStep;
|
|
92
|
+
return rowsPromise;
|
|
93
|
+
});
|
|
94
|
+
await batch.execute();
|
|
95
|
+
}
|
|
96
|
+
const resultSets = [];
|
|
97
|
+
for (let i = 0; i < rowsPromises.length; i++) {
|
|
98
|
+
try {
|
|
99
|
+
const rows = await rowsPromises[i];
|
|
100
|
+
if (rows === void 0) {
|
|
101
|
+
throw new (0, _api.LibsqlBatchError)("Statement in a transaction was not executed, probably because the transaction has been rolled back", i, "TRANSACTION_CLOSED");
|
|
102
|
+
}
|
|
103
|
+
resultSets.push(resultSetFromHrana(rows));
|
|
104
|
+
} catch (e) {
|
|
105
|
+
if (e instanceof _api.LibsqlBatchError) {
|
|
106
|
+
throw e;
|
|
107
|
+
}
|
|
108
|
+
const mappedError = mapHranaError(e);
|
|
109
|
+
if (mappedError instanceof _api.LibsqlError) {
|
|
110
|
+
throw new (0, _api.LibsqlBatchError)(mappedError.message, i, mappedError.code, mappedError.extendedCode, mappedError.rawCode, mappedError.cause instanceof Error ? mappedError.cause : void 0);
|
|
111
|
+
}
|
|
112
|
+
throw mappedError;
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
return resultSets;
|
|
116
|
+
} catch (e) {
|
|
117
|
+
throw mapHranaError(e);
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
async executeMultiple(sql) {
|
|
121
|
+
const stream = this._getStream();
|
|
122
|
+
if (stream.closed) {
|
|
123
|
+
throw new (0, _api.LibsqlError)("Cannot execute statements because the transaction is closed", "TRANSACTION_CLOSED");
|
|
124
|
+
}
|
|
125
|
+
try {
|
|
126
|
+
if (_chunkUZM3PDKKcjs.__privateGet.call(void 0, this, _started) === void 0) {
|
|
127
|
+
_chunkUZM3PDKKcjs.__privateSet.call(void 0, this, _started, stream.run(_util.transactionModeToBegin.call(void 0, _chunkUZM3PDKKcjs.__privateGet.call(void 0, this, _mode))).then(() => void 0));
|
|
128
|
+
try {
|
|
129
|
+
await _chunkUZM3PDKKcjs.__privateGet.call(void 0, this, _started);
|
|
130
|
+
} catch (e) {
|
|
131
|
+
this.close();
|
|
132
|
+
throw e;
|
|
133
|
+
}
|
|
134
|
+
} else {
|
|
135
|
+
await _chunkUZM3PDKKcjs.__privateGet.call(void 0, this, _started);
|
|
136
|
+
}
|
|
137
|
+
await stream.sequence(sql);
|
|
138
|
+
} catch (e) {
|
|
139
|
+
throw mapHranaError(e);
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
async rollback() {
|
|
143
|
+
try {
|
|
144
|
+
const stream = this._getStream();
|
|
145
|
+
if (stream.closed) {
|
|
146
|
+
return;
|
|
147
|
+
}
|
|
148
|
+
if (_chunkUZM3PDKKcjs.__privateGet.call(void 0, this, _started) !== void 0) {
|
|
149
|
+
} else {
|
|
150
|
+
return;
|
|
151
|
+
}
|
|
152
|
+
const promise = stream.run("ROLLBACK").catch((e) => {
|
|
153
|
+
throw mapHranaError(e);
|
|
154
|
+
});
|
|
155
|
+
stream.closeGracefully();
|
|
156
|
+
await promise;
|
|
157
|
+
} catch (e) {
|
|
158
|
+
throw mapHranaError(e);
|
|
159
|
+
} finally {
|
|
160
|
+
this.close();
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
async commit() {
|
|
164
|
+
try {
|
|
165
|
+
const stream = this._getStream();
|
|
166
|
+
if (stream.closed) {
|
|
167
|
+
throw new (0, _api.LibsqlError)("Cannot commit the transaction because it is already closed", "TRANSACTION_CLOSED");
|
|
168
|
+
}
|
|
169
|
+
if (_chunkUZM3PDKKcjs.__privateGet.call(void 0, this, _started) !== void 0) {
|
|
170
|
+
await _chunkUZM3PDKKcjs.__privateGet.call(void 0, this, _started);
|
|
171
|
+
} else {
|
|
172
|
+
return;
|
|
173
|
+
}
|
|
174
|
+
const promise = stream.run("COMMIT").catch((e) => {
|
|
175
|
+
throw mapHranaError(e);
|
|
176
|
+
});
|
|
177
|
+
stream.closeGracefully();
|
|
178
|
+
await promise;
|
|
179
|
+
} catch (e) {
|
|
180
|
+
throw mapHranaError(e);
|
|
181
|
+
} finally {
|
|
182
|
+
this.close();
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
};
|
|
186
|
+
_mode = new WeakMap();
|
|
187
|
+
_version = new WeakMap();
|
|
188
|
+
_started = new WeakMap();
|
|
189
|
+
async function executeHranaBatch(mode, version, batch, hranaStmts, disableForeignKeys = false) {
|
|
190
|
+
if (disableForeignKeys) {
|
|
191
|
+
batch.step().run("PRAGMA foreign_keys=off");
|
|
192
|
+
}
|
|
193
|
+
const beginStep = batch.step();
|
|
194
|
+
const beginPromise = beginStep.run(_util.transactionModeToBegin.call(void 0, mode));
|
|
195
|
+
let lastStep = beginStep;
|
|
196
|
+
const stmtPromises = hranaStmts.map((hranaStmt) => {
|
|
197
|
+
const stmtStep = batch.step().condition(hrana.BatchCond.ok(lastStep));
|
|
198
|
+
if (version >= 3) {
|
|
199
|
+
stmtStep.condition(hrana.BatchCond.not(hrana.BatchCond.isAutocommit(batch)));
|
|
200
|
+
}
|
|
201
|
+
const stmtPromise = stmtStep.query(hranaStmt);
|
|
202
|
+
lastStep = stmtStep;
|
|
203
|
+
return stmtPromise;
|
|
204
|
+
});
|
|
205
|
+
const commitStep = batch.step().condition(hrana.BatchCond.ok(lastStep));
|
|
206
|
+
if (version >= 3) {
|
|
207
|
+
commitStep.condition(hrana.BatchCond.not(hrana.BatchCond.isAutocommit(batch)));
|
|
208
|
+
}
|
|
209
|
+
const commitPromise = commitStep.run("COMMIT");
|
|
210
|
+
const rollbackStep = batch.step().condition(hrana.BatchCond.not(hrana.BatchCond.ok(commitStep)));
|
|
211
|
+
rollbackStep.run("ROLLBACK").catch((_) => void 0);
|
|
212
|
+
if (disableForeignKeys) {
|
|
213
|
+
batch.step().run("PRAGMA foreign_keys=on");
|
|
214
|
+
}
|
|
215
|
+
await batch.execute();
|
|
216
|
+
const resultSets = [];
|
|
217
|
+
await beginPromise;
|
|
218
|
+
for (let i = 0; i < stmtPromises.length; i++) {
|
|
219
|
+
try {
|
|
220
|
+
const hranaRows = await stmtPromises[i];
|
|
221
|
+
if (hranaRows === void 0) {
|
|
222
|
+
throw new (0, _api.LibsqlBatchError)("Statement in a batch was not executed, probably because the transaction has been rolled back", i, "TRANSACTION_CLOSED");
|
|
223
|
+
}
|
|
224
|
+
resultSets.push(resultSetFromHrana(hranaRows));
|
|
225
|
+
} catch (e) {
|
|
226
|
+
if (e instanceof _api.LibsqlBatchError) {
|
|
227
|
+
throw e;
|
|
228
|
+
}
|
|
229
|
+
const mappedError = mapHranaError(e);
|
|
230
|
+
if (mappedError instanceof _api.LibsqlError) {
|
|
231
|
+
throw new (0, _api.LibsqlBatchError)(mappedError.message, i, mappedError.code, mappedError.extendedCode, mappedError.rawCode, mappedError.cause instanceof Error ? mappedError.cause : void 0);
|
|
232
|
+
}
|
|
233
|
+
throw mappedError;
|
|
234
|
+
}
|
|
235
|
+
}
|
|
236
|
+
await commitPromise;
|
|
237
|
+
return resultSets;
|
|
238
|
+
}
|
|
239
|
+
function stmtToHrana(stmt) {
|
|
240
|
+
let sql;
|
|
241
|
+
let args;
|
|
242
|
+
if (Array.isArray(stmt)) {
|
|
243
|
+
[sql, args] = stmt;
|
|
244
|
+
} else if (typeof stmt === "string") {
|
|
245
|
+
sql = stmt;
|
|
246
|
+
} else {
|
|
247
|
+
sql = stmt.sql;
|
|
248
|
+
args = stmt.args;
|
|
249
|
+
}
|
|
250
|
+
const hranaStmt = new hrana.Stmt(sql);
|
|
251
|
+
if (args) {
|
|
252
|
+
if (Array.isArray(args)) {
|
|
253
|
+
hranaStmt.bindIndexes(args);
|
|
254
|
+
} else {
|
|
255
|
+
for (const [key, value] of Object.entries(args)) {
|
|
256
|
+
hranaStmt.bindName(key, value);
|
|
257
|
+
}
|
|
258
|
+
}
|
|
259
|
+
}
|
|
260
|
+
return hranaStmt;
|
|
261
|
+
}
|
|
262
|
+
function resultSetFromHrana(hranaRows) {
|
|
263
|
+
const columns = hranaRows.columnNames.map((c) => _nullishCoalesce(c, () => ( "")));
|
|
264
|
+
const columnTypes = hranaRows.columnDecltypes.map((c) => _nullishCoalesce(c, () => ( "")));
|
|
265
|
+
const rows = hranaRows.rows;
|
|
266
|
+
const rowsAffected = hranaRows.affectedRowCount;
|
|
267
|
+
const lastInsertRowid = hranaRows.lastInsertRowid !== void 0 ? hranaRows.lastInsertRowid : void 0;
|
|
268
|
+
return new (0, _util.ResultSetImpl)(columns, columnTypes, rows, rowsAffected, lastInsertRowid);
|
|
269
|
+
}
|
|
270
|
+
function mapHranaError(e) {
|
|
271
|
+
if (e instanceof hrana.ClientError) {
|
|
272
|
+
const code = mapHranaErrorCode(e);
|
|
273
|
+
return new (0, _api.LibsqlError)(e.message, code, void 0, void 0, e);
|
|
274
|
+
}
|
|
275
|
+
return e;
|
|
276
|
+
}
|
|
277
|
+
function mapHranaErrorCode(e) {
|
|
278
|
+
if (e instanceof hrana.ResponseError && e.code !== void 0) {
|
|
279
|
+
return e.code;
|
|
280
|
+
} else if (e instanceof hrana.ProtoError) {
|
|
281
|
+
return "HRANA_PROTO_ERROR";
|
|
282
|
+
} else if (e instanceof hrana.ClosedError) {
|
|
283
|
+
return e.cause instanceof hrana.ClientError ? mapHranaErrorCode(e.cause) : "HRANA_CLOSED_ERROR";
|
|
284
|
+
} else if (e instanceof hrana.WebSocketError) {
|
|
285
|
+
return "HRANA_WEBSOCKET_ERROR";
|
|
286
|
+
} else if (e instanceof hrana.HttpServerError) {
|
|
287
|
+
return "SERVER_ERROR";
|
|
288
|
+
} else if (e instanceof hrana.ProtocolVersionError) {
|
|
289
|
+
return "PROTOCOL_VERSION_ERROR";
|
|
290
|
+
} else if (e instanceof hrana.InternalError) {
|
|
291
|
+
return "INTERNAL_ERROR";
|
|
292
|
+
} else {
|
|
293
|
+
return "UNKNOWN";
|
|
294
|
+
}
|
|
295
|
+
}
|
|
296
|
+
|
|
297
|
+
// ../../node_modules/.pnpm/@libsql+client@0.17.4/node_modules/@libsql/client/lib-esm/sql_cache.js
|
|
298
|
+
var _owner, _sqls;
|
|
299
|
+
var SqlCache = class {
|
|
300
|
+
constructor(owner, capacity) {
|
|
301
|
+
_chunkUZM3PDKKcjs.__privateAdd.call(void 0, this, _owner);
|
|
302
|
+
_chunkUZM3PDKKcjs.__privateAdd.call(void 0, this, _sqls);
|
|
303
|
+
_chunkUZM3PDKKcjs.__publicField.call(void 0, this, "capacity");
|
|
304
|
+
_chunkUZM3PDKKcjs.__privateSet.call(void 0, this, _owner, owner);
|
|
305
|
+
_chunkUZM3PDKKcjs.__privateSet.call(void 0, this, _sqls, new Lru());
|
|
306
|
+
this.capacity = capacity;
|
|
307
|
+
}
|
|
308
|
+
// Replaces SQL strings with cached `hrana.Sql` objects in the statements in `hranaStmts`. After this
|
|
309
|
+
// function returns, we guarantee that all `hranaStmts` refer to valid (not closed) `hrana.Sql` objects,
|
|
310
|
+
// but _we may invalidate any other `hrana.Sql` objects_ (by closing them, thus removing them from the
|
|
311
|
+
// server).
|
|
312
|
+
//
|
|
313
|
+
// In practice, this means that after calling this function, you can use the statements only up to the
|
|
314
|
+
// first `await`, because concurrent code may also use the cache and invalidate those statements.
|
|
315
|
+
apply(hranaStmts) {
|
|
316
|
+
if (this.capacity <= 0) {
|
|
317
|
+
return;
|
|
318
|
+
}
|
|
319
|
+
const usedSqlObjs = /* @__PURE__ */ new Set();
|
|
320
|
+
for (const hranaStmt of hranaStmts) {
|
|
321
|
+
if (typeof hranaStmt.sql !== "string") {
|
|
322
|
+
continue;
|
|
323
|
+
}
|
|
324
|
+
const sqlText = hranaStmt.sql;
|
|
325
|
+
if (sqlText.length >= 5e3) {
|
|
326
|
+
continue;
|
|
327
|
+
}
|
|
328
|
+
let sqlObj = _chunkUZM3PDKKcjs.__privateGet.call(void 0, this, _sqls).get(sqlText);
|
|
329
|
+
if (sqlObj === void 0) {
|
|
330
|
+
while (_chunkUZM3PDKKcjs.__privateGet.call(void 0, this, _sqls).size + 1 > this.capacity) {
|
|
331
|
+
const [evictSqlText, evictSqlObj] = _chunkUZM3PDKKcjs.__privateGet.call(void 0, this, _sqls).peekLru();
|
|
332
|
+
if (usedSqlObjs.has(evictSqlObj)) {
|
|
333
|
+
break;
|
|
334
|
+
}
|
|
335
|
+
evictSqlObj.close();
|
|
336
|
+
_chunkUZM3PDKKcjs.__privateGet.call(void 0, this, _sqls).delete(evictSqlText);
|
|
337
|
+
}
|
|
338
|
+
if (_chunkUZM3PDKKcjs.__privateGet.call(void 0, this, _sqls).size + 1 <= this.capacity) {
|
|
339
|
+
sqlObj = _chunkUZM3PDKKcjs.__privateGet.call(void 0, this, _owner).storeSql(sqlText);
|
|
340
|
+
_chunkUZM3PDKKcjs.__privateGet.call(void 0, this, _sqls).set(sqlText, sqlObj);
|
|
341
|
+
}
|
|
342
|
+
}
|
|
343
|
+
if (sqlObj !== void 0) {
|
|
344
|
+
hranaStmt.sql = sqlObj;
|
|
345
|
+
usedSqlObjs.add(sqlObj);
|
|
346
|
+
}
|
|
347
|
+
}
|
|
348
|
+
}
|
|
349
|
+
};
|
|
350
|
+
_owner = new WeakMap();
|
|
351
|
+
_sqls = new WeakMap();
|
|
352
|
+
var _cache;
|
|
353
|
+
var Lru = class {
|
|
354
|
+
constructor() {
|
|
355
|
+
// This maps keys to the cache values. The entries are ordered by their last use (entires that were used
|
|
356
|
+
// most recently are at the end).
|
|
357
|
+
_chunkUZM3PDKKcjs.__privateAdd.call(void 0, this, _cache);
|
|
358
|
+
_chunkUZM3PDKKcjs.__privateSet.call(void 0, this, _cache, /* @__PURE__ */ new Map());
|
|
359
|
+
}
|
|
360
|
+
get(key) {
|
|
361
|
+
const value = _chunkUZM3PDKKcjs.__privateGet.call(void 0, this, _cache).get(key);
|
|
362
|
+
if (value !== void 0) {
|
|
363
|
+
_chunkUZM3PDKKcjs.__privateGet.call(void 0, this, _cache).delete(key);
|
|
364
|
+
_chunkUZM3PDKKcjs.__privateGet.call(void 0, this, _cache).set(key, value);
|
|
365
|
+
}
|
|
366
|
+
return value;
|
|
367
|
+
}
|
|
368
|
+
set(key, value) {
|
|
369
|
+
_chunkUZM3PDKKcjs.__privateGet.call(void 0, this, _cache).set(key, value);
|
|
370
|
+
}
|
|
371
|
+
peekLru() {
|
|
372
|
+
for (const entry of _chunkUZM3PDKKcjs.__privateGet.call(void 0, this, _cache).entries()) {
|
|
373
|
+
return entry;
|
|
374
|
+
}
|
|
375
|
+
return void 0;
|
|
376
|
+
}
|
|
377
|
+
delete(key) {
|
|
378
|
+
_chunkUZM3PDKKcjs.__privateGet.call(void 0, this, _cache).delete(key);
|
|
379
|
+
}
|
|
380
|
+
get size() {
|
|
381
|
+
return _chunkUZM3PDKKcjs.__privateGet.call(void 0, this, _cache).size;
|
|
382
|
+
}
|
|
383
|
+
};
|
|
384
|
+
_cache = new WeakMap();
|
|
385
|
+
|
|
386
|
+
// ../../node_modules/.pnpm/@libsql+client@0.17.4/node_modules/@libsql/client/lib-esm/http.js
|
|
387
|
+
_chunkUZM3PDKKcjs.__reExport.call(void 0, http_exports, api_star);
|
|
388
|
+
var _uri = require('@libsql/core/uri');
|
|
389
|
+
|
|
390
|
+
var _promiselimit = require('promise-limit'); var _promiselimit2 = _interopRequireDefault(_promiselimit);
|
|
391
|
+
|
|
392
|
+
function createClient(config) {
|
|
393
|
+
return _createClient(_config.expandConfig.call(void 0, config, true));
|
|
394
|
+
}
|
|
395
|
+
function _createClient(config) {
|
|
396
|
+
if (config.scheme !== "https" && config.scheme !== "http") {
|
|
397
|
+
throw new (0, _api.LibsqlError)(`The HTTP client supports only "libsql:", "https:" and "http:" URLs, got ${JSON.stringify(config.scheme + ":")}. For more information, please read ${_util.supportedUrlLink}`, "URL_SCHEME_NOT_SUPPORTED");
|
|
398
|
+
}
|
|
399
|
+
if (config.encryptionKey !== void 0) {
|
|
400
|
+
throw new (0, _api.LibsqlError)("Encryption key is not supported by the remote client.", "ENCRYPTION_KEY_NOT_SUPPORTED");
|
|
401
|
+
}
|
|
402
|
+
if (config.scheme === "http" && config.tls) {
|
|
403
|
+
throw new (0, _api.LibsqlError)(`A "http:" URL cannot opt into TLS by using ?tls=1`, "URL_INVALID");
|
|
404
|
+
} else if (config.scheme === "https" && !config.tls) {
|
|
405
|
+
throw new (0, _api.LibsqlError)(`A "https:" URL cannot opt out of TLS by using ?tls=0`, "URL_INVALID");
|
|
406
|
+
}
|
|
407
|
+
const url = _uri.encodeBaseUrl.call(void 0, config.scheme, config.authority, config.path);
|
|
408
|
+
return new HttpClient(url, config.authToken, config.intMode, config.fetch, config.concurrency, config.remoteEncryptionKey);
|
|
409
|
+
}
|
|
410
|
+
var sqlCacheCapacity = 30;
|
|
411
|
+
var _client, _url, _intMode, _customFetch, _concurrency, _authToken, _remoteEncryptionKey, _promiseLimitFunction;
|
|
412
|
+
var HttpClient = class {
|
|
413
|
+
/** @private */
|
|
414
|
+
constructor(url, authToken, intMode, customFetch, concurrency, remoteEncryptionKey) {
|
|
415
|
+
_chunkUZM3PDKKcjs.__privateAdd.call(void 0, this, _client);
|
|
416
|
+
_chunkUZM3PDKKcjs.__publicField.call(void 0, this, "protocol");
|
|
417
|
+
_chunkUZM3PDKKcjs.__privateAdd.call(void 0, this, _url);
|
|
418
|
+
_chunkUZM3PDKKcjs.__privateAdd.call(void 0, this, _intMode);
|
|
419
|
+
_chunkUZM3PDKKcjs.__privateAdd.call(void 0, this, _customFetch);
|
|
420
|
+
_chunkUZM3PDKKcjs.__privateAdd.call(void 0, this, _concurrency);
|
|
421
|
+
_chunkUZM3PDKKcjs.__privateAdd.call(void 0, this, _authToken);
|
|
422
|
+
_chunkUZM3PDKKcjs.__privateAdd.call(void 0, this, _remoteEncryptionKey);
|
|
423
|
+
_chunkUZM3PDKKcjs.__privateAdd.call(void 0, this, _promiseLimitFunction);
|
|
424
|
+
_chunkUZM3PDKKcjs.__privateSet.call(void 0, this, _url, url);
|
|
425
|
+
_chunkUZM3PDKKcjs.__privateSet.call(void 0, this, _authToken, authToken);
|
|
426
|
+
_chunkUZM3PDKKcjs.__privateSet.call(void 0, this, _intMode, intMode);
|
|
427
|
+
_chunkUZM3PDKKcjs.__privateSet.call(void 0, this, _customFetch, customFetch);
|
|
428
|
+
_chunkUZM3PDKKcjs.__privateSet.call(void 0, this, _concurrency, concurrency);
|
|
429
|
+
_chunkUZM3PDKKcjs.__privateSet.call(void 0, this, _remoteEncryptionKey, remoteEncryptionKey);
|
|
430
|
+
_chunkUZM3PDKKcjs.__privateSet.call(void 0, this, _client, hrana2.openHttp(_chunkUZM3PDKKcjs.__privateGet.call(void 0, this, _url), _chunkUZM3PDKKcjs.__privateGet.call(void 0, this, _authToken), _chunkUZM3PDKKcjs.__privateGet.call(void 0, this, _customFetch), remoteEncryptionKey));
|
|
431
|
+
_chunkUZM3PDKKcjs.__privateGet.call(void 0, this, _client).intMode = _chunkUZM3PDKKcjs.__privateGet.call(void 0, this, _intMode);
|
|
432
|
+
this.protocol = "http";
|
|
433
|
+
_chunkUZM3PDKKcjs.__privateSet.call(void 0, this, _promiseLimitFunction, _promiselimit2.default.call(void 0, _chunkUZM3PDKKcjs.__privateGet.call(void 0, this, _concurrency)));
|
|
434
|
+
}
|
|
435
|
+
async limit(fn) {
|
|
436
|
+
return _chunkUZM3PDKKcjs.__privateGet.call(void 0, this, _promiseLimitFunction).call(this, fn);
|
|
437
|
+
}
|
|
438
|
+
async execute(stmtOrSql, args) {
|
|
439
|
+
let stmt;
|
|
440
|
+
if (typeof stmtOrSql === "string") {
|
|
441
|
+
stmt = {
|
|
442
|
+
sql: stmtOrSql,
|
|
443
|
+
args: args || []
|
|
444
|
+
};
|
|
445
|
+
} else {
|
|
446
|
+
stmt = stmtOrSql;
|
|
447
|
+
}
|
|
448
|
+
return this.limit(async () => {
|
|
449
|
+
try {
|
|
450
|
+
const hranaStmt = stmtToHrana(stmt);
|
|
451
|
+
let rowsPromise;
|
|
452
|
+
const stream = _chunkUZM3PDKKcjs.__privateGet.call(void 0, this, _client).openStream();
|
|
453
|
+
try {
|
|
454
|
+
rowsPromise = stream.query(hranaStmt);
|
|
455
|
+
} finally {
|
|
456
|
+
stream.closeGracefully();
|
|
457
|
+
}
|
|
458
|
+
const rowsResult = await rowsPromise;
|
|
459
|
+
return resultSetFromHrana(rowsResult);
|
|
460
|
+
} catch (e) {
|
|
461
|
+
throw mapHranaError(e);
|
|
462
|
+
}
|
|
463
|
+
});
|
|
464
|
+
}
|
|
465
|
+
async batch(stmts, mode = "deferred") {
|
|
466
|
+
return this.limit(async () => {
|
|
467
|
+
try {
|
|
468
|
+
const normalizedStmts = stmts.map((stmt) => {
|
|
469
|
+
if (Array.isArray(stmt)) {
|
|
470
|
+
return {
|
|
471
|
+
sql: stmt[0],
|
|
472
|
+
args: stmt[1] || []
|
|
473
|
+
};
|
|
474
|
+
}
|
|
475
|
+
return stmt;
|
|
476
|
+
});
|
|
477
|
+
const hranaStmts = normalizedStmts.map(stmtToHrana);
|
|
478
|
+
const version = await _chunkUZM3PDKKcjs.__privateGet.call(void 0, this, _client).getVersion();
|
|
479
|
+
let resultsPromise;
|
|
480
|
+
const stream = _chunkUZM3PDKKcjs.__privateGet.call(void 0, this, _client).openStream();
|
|
481
|
+
try {
|
|
482
|
+
const sqlCache = new SqlCache(stream, sqlCacheCapacity);
|
|
483
|
+
sqlCache.apply(hranaStmts);
|
|
484
|
+
const batch = stream.batch(false);
|
|
485
|
+
resultsPromise = executeHranaBatch(mode, version, batch, hranaStmts);
|
|
486
|
+
} finally {
|
|
487
|
+
stream.closeGracefully();
|
|
488
|
+
}
|
|
489
|
+
const results = await resultsPromise;
|
|
490
|
+
return results;
|
|
491
|
+
} catch (e) {
|
|
492
|
+
throw mapHranaError(e);
|
|
493
|
+
}
|
|
494
|
+
});
|
|
495
|
+
}
|
|
496
|
+
async migrate(stmts) {
|
|
497
|
+
return this.limit(async () => {
|
|
498
|
+
try {
|
|
499
|
+
const hranaStmts = stmts.map(stmtToHrana);
|
|
500
|
+
const version = await _chunkUZM3PDKKcjs.__privateGet.call(void 0, this, _client).getVersion();
|
|
501
|
+
let resultsPromise;
|
|
502
|
+
const stream = _chunkUZM3PDKKcjs.__privateGet.call(void 0, this, _client).openStream();
|
|
503
|
+
try {
|
|
504
|
+
const batch = stream.batch(false);
|
|
505
|
+
resultsPromise = executeHranaBatch("deferred", version, batch, hranaStmts, true);
|
|
506
|
+
} finally {
|
|
507
|
+
stream.closeGracefully();
|
|
508
|
+
}
|
|
509
|
+
const results = await resultsPromise;
|
|
510
|
+
return results;
|
|
511
|
+
} catch (e) {
|
|
512
|
+
throw mapHranaError(e);
|
|
513
|
+
}
|
|
514
|
+
});
|
|
515
|
+
}
|
|
516
|
+
async transaction(mode = "write") {
|
|
517
|
+
return this.limit(async () => {
|
|
518
|
+
try {
|
|
519
|
+
const version = await _chunkUZM3PDKKcjs.__privateGet.call(void 0, this, _client).getVersion();
|
|
520
|
+
return new HttpTransaction(_chunkUZM3PDKKcjs.__privateGet.call(void 0, this, _client).openStream(), mode, version);
|
|
521
|
+
} catch (e) {
|
|
522
|
+
throw mapHranaError(e);
|
|
523
|
+
}
|
|
524
|
+
});
|
|
525
|
+
}
|
|
526
|
+
async executeMultiple(sql) {
|
|
527
|
+
return this.limit(async () => {
|
|
528
|
+
try {
|
|
529
|
+
let promise;
|
|
530
|
+
const stream = _chunkUZM3PDKKcjs.__privateGet.call(void 0, this, _client).openStream();
|
|
531
|
+
try {
|
|
532
|
+
promise = stream.sequence(sql);
|
|
533
|
+
} finally {
|
|
534
|
+
stream.closeGracefully();
|
|
535
|
+
}
|
|
536
|
+
await promise;
|
|
537
|
+
} catch (e) {
|
|
538
|
+
throw mapHranaError(e);
|
|
539
|
+
}
|
|
540
|
+
});
|
|
541
|
+
}
|
|
542
|
+
sync() {
|
|
543
|
+
throw new (0, _api.LibsqlError)("sync not supported in http mode", "SYNC_NOT_SUPPORTED");
|
|
544
|
+
}
|
|
545
|
+
close() {
|
|
546
|
+
_chunkUZM3PDKKcjs.__privateGet.call(void 0, this, _client).close();
|
|
547
|
+
}
|
|
548
|
+
async reconnect() {
|
|
549
|
+
try {
|
|
550
|
+
if (!this.closed) {
|
|
551
|
+
_chunkUZM3PDKKcjs.__privateGet.call(void 0, this, _client).close();
|
|
552
|
+
}
|
|
553
|
+
} finally {
|
|
554
|
+
_chunkUZM3PDKKcjs.__privateSet.call(void 0, this, _client, hrana2.openHttp(_chunkUZM3PDKKcjs.__privateGet.call(void 0, this, _url), _chunkUZM3PDKKcjs.__privateGet.call(void 0, this, _authToken), _chunkUZM3PDKKcjs.__privateGet.call(void 0, this, _customFetch), _chunkUZM3PDKKcjs.__privateGet.call(void 0, this, _remoteEncryptionKey)));
|
|
555
|
+
_chunkUZM3PDKKcjs.__privateGet.call(void 0, this, _client).intMode = _chunkUZM3PDKKcjs.__privateGet.call(void 0, this, _intMode);
|
|
556
|
+
}
|
|
557
|
+
}
|
|
558
|
+
get closed() {
|
|
559
|
+
return _chunkUZM3PDKKcjs.__privateGet.call(void 0, this, _client).closed;
|
|
560
|
+
}
|
|
561
|
+
};
|
|
562
|
+
_client = new WeakMap();
|
|
563
|
+
_url = new WeakMap();
|
|
564
|
+
_intMode = new WeakMap();
|
|
565
|
+
_customFetch = new WeakMap();
|
|
566
|
+
_concurrency = new WeakMap();
|
|
567
|
+
_authToken = new WeakMap();
|
|
568
|
+
_remoteEncryptionKey = new WeakMap();
|
|
569
|
+
_promiseLimitFunction = new WeakMap();
|
|
570
|
+
var _stream, _sqlCache;
|
|
571
|
+
var HttpTransaction = class extends HranaTransaction {
|
|
572
|
+
/** @private */
|
|
573
|
+
constructor(stream, mode, version) {
|
|
574
|
+
super(mode, version);
|
|
575
|
+
_chunkUZM3PDKKcjs.__privateAdd.call(void 0, this, _stream);
|
|
576
|
+
_chunkUZM3PDKKcjs.__privateAdd.call(void 0, this, _sqlCache);
|
|
577
|
+
_chunkUZM3PDKKcjs.__privateSet.call(void 0, this, _stream, stream);
|
|
578
|
+
_chunkUZM3PDKKcjs.__privateSet.call(void 0, this, _sqlCache, new SqlCache(stream, sqlCacheCapacity));
|
|
579
|
+
}
|
|
580
|
+
/** @private */
|
|
581
|
+
_getStream() {
|
|
582
|
+
return _chunkUZM3PDKKcjs.__privateGet.call(void 0, this, _stream);
|
|
583
|
+
}
|
|
584
|
+
/** @private */
|
|
585
|
+
_getSqlCache() {
|
|
586
|
+
return _chunkUZM3PDKKcjs.__privateGet.call(void 0, this, _sqlCache);
|
|
587
|
+
}
|
|
588
|
+
close() {
|
|
589
|
+
_chunkUZM3PDKKcjs.__privateGet.call(void 0, this, _stream).close();
|
|
590
|
+
}
|
|
591
|
+
get closed() {
|
|
592
|
+
return _chunkUZM3PDKKcjs.__privateGet.call(void 0, this, _stream).closed;
|
|
593
|
+
}
|
|
594
|
+
};
|
|
595
|
+
_stream = new WeakMap();
|
|
596
|
+
_sqlCache = new WeakMap();
|
|
597
|
+
|
|
598
|
+
|
|
599
|
+
exports.createClient = createClient;
|
|
600
|
+
/*! Includes @libsql/client/http 0.17.4, MIT License, https://github.com/tursodatabase/libsql-client-ts */
|
|
@@ -183,4 +183,4 @@ declare class FarmClientPluginManager {
|
|
|
183
183
|
}
|
|
184
184
|
declare function createClientPluginManager(registrations: readonly FarmClientPluginRegistration[], options: FarmClientPluginManagerOptions): FarmClientPluginManager;
|
|
185
185
|
|
|
186
|
-
export { FarmClientPluginManager as F, type
|
|
186
|
+
export { FarmClientPluginManager as F, type FarmClientNavigationSession as a, type FarmClientPlugin as b, createClientPluginManager as c, type FarmClientHydrationCompleteEvent as d, type FarmClientHydrationEvent as e, type FarmClientHydrationMode as f, type FarmClientHydrationSession as g, type FarmClientLocation as h, type FarmClientNavigationAction as i, type FarmClientNavigationErrorEvent as j, type FarmClientNavigationEvent as k, type FarmClientNavigationLoadedEvent as l, type FarmClientNavigationResolvedEvent as m, type FarmClientPerformanceEvent as n, type FarmClientPluginCloseEvent as o, type FarmClientPluginEnforce as p, type FarmClientPluginErrorEvent as q, type FarmClientPluginErrorPhase as r, type FarmClientPluginManagerOptions as s, type FarmClientPluginMetadata as t, type FarmClientPluginRegistration as u, type FarmClientPluginRouter as v, type FarmClientPluginSetupEvent as w, type FarmClientPluginStateEvent as x, defineClient as y };
|
|
@@ -183,4 +183,4 @@ declare class FarmClientPluginManager {
|
|
|
183
183
|
}
|
|
184
184
|
declare function createClientPluginManager(registrations: readonly FarmClientPluginRegistration[], options: FarmClientPluginManagerOptions): FarmClientPluginManager;
|
|
185
185
|
|
|
186
|
-
export { FarmClientPluginManager as F, type
|
|
186
|
+
export { FarmClientPluginManager as F, type FarmClientNavigationSession as a, type FarmClientPlugin as b, createClientPluginManager as c, type FarmClientHydrationCompleteEvent as d, type FarmClientHydrationEvent as e, type FarmClientHydrationMode as f, type FarmClientHydrationSession as g, type FarmClientLocation as h, type FarmClientNavigationAction as i, type FarmClientNavigationErrorEvent as j, type FarmClientNavigationEvent as k, type FarmClientNavigationLoadedEvent as l, type FarmClientNavigationResolvedEvent as m, type FarmClientPerformanceEvent as n, type FarmClientPluginCloseEvent as o, type FarmClientPluginEnforce as p, type FarmClientPluginErrorEvent as q, type FarmClientPluginErrorPhase as r, type FarmClientPluginManagerOptions as s, type FarmClientPluginMetadata as t, type FarmClientPluginRegistration as u, type FarmClientPluginRouter as v, type FarmClientPluginSetupEvent as w, type FarmClientPluginStateEvent as x, defineClient as y };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
OpenAPIManager,
|
|
3
3
|
renderOpenAPIReferenceHTML
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-6MZSTPD2.mjs";
|
|
5
5
|
import "./chunk-HQ2VAJLW.mjs";
|
|
6
6
|
import "./chunk-YFTGIHNC.mjs";
|
|
7
7
|
import "./chunk-NRWEY2CM.mjs";
|
|
@@ -11,7 +11,7 @@ import "./chunk-ZIAWO6BC.mjs";
|
|
|
11
11
|
import "./chunk-VHIXGZYH.mjs";
|
|
12
12
|
import "./chunk-YT3SLLZK.mjs";
|
|
13
13
|
import "./chunk-5KAEGBIL.mjs";
|
|
14
|
-
import "./chunk-
|
|
14
|
+
import "./chunk-TIZJYHB7.mjs";
|
|
15
15
|
export {
|
|
16
16
|
OpenAPIManager,
|
|
17
17
|
renderOpenAPIReferenceHTML
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
var
|
|
5
|
-
require('./chunk-
|
|
4
|
+
var _chunkOBVBII5Kcjs = require('./chunk-OBVBII5K.cjs');
|
|
5
|
+
require('./chunk-A4WWKG2B.cjs');
|
|
6
6
|
require('./chunk-AQIRXBBY.cjs');
|
|
7
7
|
require('./chunk-VWIW47FW.cjs');
|
|
8
8
|
require('./chunk-SBDWCDS6.cjs');
|
|
@@ -11,8 +11,8 @@ require('./chunk-LQWIIBI2.cjs');
|
|
|
11
11
|
require('./chunk-SNP33A33.cjs');
|
|
12
12
|
require('./chunk-HLYRXN2I.cjs');
|
|
13
13
|
require('./chunk-ML4TOUZP.cjs');
|
|
14
|
-
require('./chunk-
|
|
14
|
+
require('./chunk-UZM3PDKK.cjs');
|
|
15
15
|
|
|
16
16
|
|
|
17
17
|
|
|
18
|
-
exports.OpenAPIManager =
|
|
18
|
+
exports.OpenAPIManager = _chunkOBVBII5Kcjs.OpenAPIManager; exports.renderOpenAPIReferenceHTML = _chunkOBVBII5Kcjs.renderOpenAPIReferenceHTML;
|