decocms 2.366.7 → 2.366.8
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/client/assets/{AlertCircle-DFcOa31f.js → AlertCircle-Dyh2dUBt.js} +1 -1
- package/dist/client/assets/{ArrowNarrowLeft-CbOlEr1w.js → ArrowNarrowLeft-DOeeOVat.js} +1 -1
- package/dist/client/assets/{ArrowUpRight-C6axmKPR.js → ArrowUpRight-C5h8eEJl.js} +1 -1
- package/dist/client/assets/{Check-JQri_6PS.js → Check-BBN8jtrj.js} +1 -1
- package/dist/client/assets/{CheckCircle-B6HzfzYv.js → CheckCircle-BodpoDGR.js} +1 -1
- package/dist/client/assets/{ChevronDown-CNNU2L0m.js → ChevronDown-BHt79TDc.js} +1 -1
- package/dist/client/assets/{ChevronRight-BuVcgGSu.js → ChevronRight-CgiGzJK2.js} +1 -1
- package/dist/client/assets/{ChevronUp-DyIOyS2u.js → ChevronUp-Hv5s5GCl.js} +1 -1
- package/dist/client/assets/{Container-Cy3AGglh.js → Container-CmZ_UAMx.js} +1 -1
- package/dist/client/assets/{DotsVertical-DIehc2A5.js → DotsVertical-BFb-15-m.js} +1 -1
- package/dist/client/assets/{FilterLines-DHlq5ZtE.js → FilterLines-BNco6Knh.js} +1 -1
- package/dist/client/assets/{HardDrive-CAAHpLeS.js → HardDrive-Bs4cIN_I.js} +1 -1
- package/dist/client/assets/{Key01-C29UL5qH.js → Key01-BOHiIHj-.js} +1 -1
- package/dist/client/assets/{LayoutLeft-5sSkIfFI.js → LayoutLeft-NsiLg-Hz.js} +1 -1
- package/dist/client/assets/{LinkExternal01-QpHHOJbZ.js → LinkExternal01-DXkr_udM.js} +1 -1
- package/dist/client/assets/{Lock01-Ju5ifHNn.js → Lock01-BheAsQQx.js} +1 -1
- package/dist/client/assets/{Monitor01-DHHvwXbl.js → Monitor01-BkzEm6bw.js} +1 -1
- package/dist/client/assets/{Palette-CJqBw6AH.js → Palette-DPP_bV0e.js} +1 -1
- package/dist/client/assets/{Play-DPs1Pbq2.js → Play-BqGgMbL5.js} +1 -1
- package/dist/client/assets/{Plus-DgrNRFK5.js → Plus-C5l4faC1.js} +1 -1
- package/dist/client/assets/{RefreshCcw01-Bf15qfNS.js → RefreshCcw01-Cr7WlxPS.js} +1 -1
- package/dist/client/assets/{SearchMd-CuY4_41I.js → SearchMd-rTsELW21.js} +1 -1
- package/dist/client/assets/{Settings02-Cjzbasby.js → Settings02-BSu9v11-.js} +1 -1
- package/dist/client/assets/{Shield01-rI42zX_N.js → Shield01-BzHuCaEB.js} +1 -1
- package/dist/client/assets/{Star01-CiaU9xFe.js → Star01-HKceyVo1.js} +1 -1
- package/dist/client/assets/{Stars02-BHNtUcIC.js → Stars02-LrVE5fus.js} +1 -1
- package/dist/client/assets/{Sun-DA9iSyj3.js → Sun-D9eEy7za.js} +1 -1
- package/dist/client/assets/{SwitchHorizontal01-B0nDhziZ.js → SwitchHorizontal01-C1fzb4rn.js} +1 -1
- package/dist/client/assets/{Tool01-BpLh90bx.js → Tool01-DHXrZh_c.js} +1 -1
- package/dist/client/assets/{Trash01-BU1vvG1i.js → Trash01-v5Dy47Wj.js} +1 -1
- package/dist/client/assets/{Upload01-D2aoviL7.js → Upload01-p8VtXdXS.js} +1 -1
- package/dist/client/assets/{User01-BUxAdPGO.js → User01-CtanRIko.js} +1 -1
- package/dist/client/assets/{Users01-X9W80ATA.js → Users01-BbxKMG6t.js} +1 -1
- package/dist/client/assets/{Users03-DERc_3KT.js → Users03-Bq46oqMB.js} +1 -1
- package/dist/client/assets/{X-CpxCwBcO.js → X-DkujvqvQ.js} +1 -1
- package/dist/client/assets/{XCircle-BlhQtOFW.js → XCircle-BkF11s9b.js} +1 -1
- package/dist/client/assets/{XClose-6T_HfnSF.js → XClose-DgRHRNhM.js} +1 -1
- package/dist/client/assets/{Zap-C_gPmGTu.js → Zap-XzlBn_sj.js} +1 -1
- package/dist/client/assets/{ZapSquare-D-9nYZGQ.js → ZapSquare-sMv-roxP.js} +1 -1
- package/dist/client/assets/{accordion-CBF1VPy1.js → accordion-dqQUHOnH.js} +1 -1
- package/dist/client/assets/{add-connection-dialog-WM_qTQCr.js → add-connection-dialog-Doxko4pY.js} +1 -1
- package/dist/client/assets/{agent-icon-BZLvaskO.js → agent-icon-q6iHyexc.js} +1 -1
- package/dist/client/assets/{agent-icons-ZEbpuDyp.js → agent-icons-A7w_l1KK.js} +1 -1
- package/dist/client/assets/{agents-list-BD4seTwq.js → agents-list-_CO5Xl7p.js} +1 -1
- package/dist/client/assets/{ai-providers-Dps_1J2i.js → ai-providers-B1ZbPwoq.js} +1 -1
- package/dist/client/assets/{alert-CmozMRgO.js → alert-DL1cbRoM.js} +1 -1
- package/dist/client/assets/{alert-dialog-Bzj7Dj8A.js → alert-dialog-B_i_ps7f.js} +1 -1
- package/dist/client/assets/{auth-catchall-Ck-h53ka.js → auth-catchall-AHvA5vWD.js} +1 -1
- package/dist/client/assets/{auth-split-layout-COCXQjkb.js → auth-split-layout-CT4AkDzg.js} +1 -1
- package/dist/client/assets/{automation-list-row-BK4XzBrA.js → automation-list-row-DxuoSGb8.js} +1 -1
- package/dist/client/assets/{automations-BIQRZeWE.js → automations-CmZJlJt9.js} +1 -1
- package/dist/client/assets/{avatar-DCmff7mq.js → avatar-BRyrVRDm.js} +1 -1
- package/dist/client/assets/{badge-ONnaTLOr.js → badge-BTq6_dwU.js} +1 -1
- package/dist/client/assets/{brand-context-DWdSQDXw.js → brand-context-D5z_TG2J.js} +1 -1
- package/dist/client/assets/{card-BsL17xby.js → card-CSM7jg8b.js} +1 -1
- package/dist/client/assets/{chat-context-4LDn0s0C.js → chat-context-CICjyzMY.js} +1 -1
- package/dist/client/assets/{checkbox-CupWiQrC.js → checkbox-Dz5JG34i.js} +1 -1
- package/dist/client/assets/{cli-auth-success-C_FSoZy8.js → cli-auth-success-CvhsqEgg.js} +1 -1
- package/dist/client/assets/{collection-detail-rvEMorEg.js → collection-detail-CzazaoJP.js} +1 -1
- package/dist/client/assets/{collection-display-button-BMPAqbiG.js → collection-display-button-mD3oc4np.js} +1 -1
- package/dist/client/assets/{collection-search-DBZ50buZ.js → collection-search-BRyI5tKN.js} +1 -1
- package/dist/client/assets/{collection-search-Um_OB9Yj.js → collection-search-CXtVb7nz.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-Dtog_f2p.js → collection-table-wrapper-C7oTCBDJ.js} +1 -1
- package/dist/client/assets/{collection-tabs-DBGScRHK.js → collection-tabs-BzSk0IWN.js} +1 -1
- package/dist/client/assets/{collections-B7Zm82Yd.js → collections-BvhsS_z2.js} +1 -1
- package/dist/client/assets/{command-BbOyBJF2.js → command-CE-N-Fow.js} +1 -1
- package/dist/client/assets/{connect-desktop-dialog-BB6OqliN.js → connect-desktop-dialog-C-R7zEUP.js} +1 -1
- package/dist/client/assets/{connection-card-CfeWMSHF.js → connection-card-PlQwrunz.js} +1 -1
- package/dist/client/assets/{connection-detail-pLHIqTQT.js → connection-detail-B7sBzrsj.js} +1 -1
- package/dist/client/assets/{connection-form-helpers-CU39ex55.js → connection-form-helpers-BPskqY8x.js} +1 -1
- package/dist/client/assets/{connections-Dcfpl5Vt.js → connections-BO5GNb9A.js} +1 -1
- package/dist/client/assets/{constants-z8N0NNar.js → constants-B8os5nMI.js} +1 -1
- package/dist/client/assets/{decopilot-sse-pool-BmH40IlP.js → decopilot-sse-pool-CibYuCaE.js} +1 -1
- package/dist/client/assets/{dialog-1TuinsgZ.js → dialog-C40tWbjB.js} +1 -1
- package/dist/client/assets/{domain-settings-CK5mrQIi.js → domain-settings-CzQQxHOD.js} +1 -1
- package/dist/client/assets/{drawer-DQoKQZB2.js → drawer-im0a0-JE.js} +1 -1
- package/dist/client/assets/{dropdown-menu-Dzjyztci.js → dropdown-menu-nlgjcLMp.js} +1 -1
- package/dist/client/assets/{dynamic-plugin-layout-VBJnbblQ.js → dynamic-plugin-layout-DlWKLIeK.js} +1 -1
- package/dist/client/assets/{empty-state-oNm48kH8.js → empty-state-Cw3XK_Gs.js} +1 -1
- package/dist/client/assets/{empty-state-DoRCByZ3.js → empty-state-Rnc2dhkR.js} +1 -1
- package/dist/client/assets/{extract-connection-data-DhUh4JIU.js → extract-connection-data-D00SSnkh.js} +1 -1
- package/dist/client/assets/{features-BLue5eI4.js → features-DZ0ghQyn.js} +1 -1
- package/dist/client/assets/{file-explorer-CEsWFSVG.js → file-explorer-DMwROQk0.js} +1 -1
- package/dist/client/assets/{files-DnOIW6UR.js → files-mqgIbtsb.js} +1 -1
- package/dist/client/assets/{form-BACtGvj-.js → form-C2fWcpmD.js} +1 -1
- package/dist/client/assets/{general-D8M9QTub.js → general-BGSI6aBj.js} +1 -1
- package/dist/client/assets/{generate-id-D8MMm0i_.js → generate-id-DzmzOPfM.js} +1 -1
- package/dist/client/assets/{github-repo-picker-rt9Vt0dE.js → github-repo-picker-C0GpV9eM.js} +1 -1
- package/dist/client/assets/{hooks-BsbVht9n.js → hooks-NevP65mb.js} +1 -1
- package/dist/client/assets/{hover-card-CxINYsQV.js → hover-card-RfUTMsZA.js} +1 -1
- package/dist/client/assets/{import-from-deco-dialog-C0AXmTvu.js → import-from-deco-dialog-B0MmDUtr.js} +1 -1
- package/dist/client/assets/{index-raVE4iMU.js → index-Bf7aO1A-.js} +2 -2
- package/dist/client/assets/{index-CZPd3hrs.js → index-Bj3Gsvmx.js} +4 -4
- package/dist/client/assets/{index-BuEd39Tz.js → index-BlXuTZUL.js} +1 -1
- package/dist/client/assets/{index-D2D8zFsJ.js → index-CP1SUcsr.js} +1 -1
- package/dist/client/assets/{index-CdAXbXCD.js → index-CPUASH8Y.js} +1 -1
- package/dist/client/assets/{index-B7X0Dr5K.js → index-CbpIdzH6.js} +1 -1
- package/dist/client/assets/{index-DRu0KGyt.js → index-Ce5SKvT1.js} +1 -1
- package/dist/client/assets/{index-Bid6pGzX.js → index-D1V7gFaI.js} +1 -1
- package/dist/client/assets/{index-DsfxL555.js → index-D3AvleZU.js} +1 -1
- package/dist/client/assets/{index-zqEjYnv0.js → index-D3GzwlSX.js} +1 -1
- package/dist/client/assets/{index-CSjyCM-u.js → index-DBGGjq4P.js} +1 -1
- package/dist/client/assets/{index-DktH-nwk.js → index-DBIBJV0k.js} +1 -1
- package/dist/client/assets/{index-5btRi0pB.js → index-DGa9X7kA.js} +1 -1
- package/dist/client/assets/{index-oYU8P956.js → index-DPqqDw7W.js} +1 -1
- package/dist/client/assets/{index-DOyZEChd.js → index-DokSGh4p.js} +1 -1
- package/dist/client/assets/{index-Btb-lxzO.js → index-DsxbUaF_.js} +1 -1
- package/dist/client/assets/{infiniteQueryObserver-ZgItTY4U.js → infiniteQueryObserver-Cv7QlLOi.js} +1 -1
- package/dist/client/assets/{input-CcEL_8zI.js → input-Fpo5hVEP.js} +1 -1
- package/dist/client/assets/{integration-icon-C6CHfqhT.js → integration-icon-DX7WoZFw.js} +1 -1
- package/dist/client/assets/{label-P_F_-Q8z.js → label-FRw7B4TG.js} +1 -1
- package/dist/client/assets/{layout-Cy8BIgv4.js → layout-DRV6GiLr.js} +1 -1
- package/dist/client/assets/{login-C0__NyWq.js → login-CfCMY-Xx.js} +1 -1
- package/dist/client/assets/{members-CvLryIsr.js → members-xAPoZeMG.js} +1 -1
- package/dist/client/assets/{monaco-editor-BeYwPRx7.js → monaco-editor-BqbZT3K3.js} +1 -1
- package/dist/client/assets/{monitoring-stats-row-oa232c6w.js → monitoring-stats-row-BFEaeHW_.js} +1 -1
- package/dist/client/assets/{oauth-callback-nhW5Hk7K.js → oauth-callback-ZvrYBv1e.js} +1 -1
- package/dist/client/assets/{oauth-callback-ai-provider-CBGn5V2N.js → oauth-callback-ai-provider-BUr_Gk3g.js} +1 -1
- package/dist/client/assets/{onboarding-CJebl9bX.js → onboarding-DAlRszwq.js} +1 -1
- package/dist/client/assets/{org-layout-C77vl6Iy.js → org-layout-CG7hQKSm.js} +1 -1
- package/dist/client/assets/{org-plugin-layout-iBgNZvjR.js → org-plugin-layout-B2xqOhgA.js} +1 -1
- package/dist/client/assets/{pair-D5k2ePIl.js → pair-D1bgeRCX.js} +1 -1
- package/dist/client/assets/{plugin-empty-state-C6vbSsTR.js → plugin-empty-state-CuVTFSVp.js} +1 -1
- package/dist/client/assets/{plugin-header-CERNSvWs.js → plugin-header-CLNGHNmz.js} +1 -1
- package/dist/client/assets/{plugin-layout-Dqtz19-C.js → plugin-layout-DD5D4ZYp.js} +1 -1
- package/dist/client/assets/{popover-Biu5bUpE.js → popover-BkyXjLv-.js} +1 -1
- package/dist/client/assets/{profile-CiZbXHxj.js → profile-DJyl7mco.js} +1 -1
- package/dist/client/assets/{project-app-view-C5c0g4mg.js → project-app-view-BBzvPrjP.js} +1 -1
- package/dist/client/assets/registry-CZacfzmC.js +2 -0
- package/dist/client/assets/{registry-layout-BV5ALzTv.js → registry-layout-DmSpIEFO.js} +1 -1
- package/dist/client/assets/{required-auth-layout-6caiGmq6.js → required-auth-layout-CawOOa2O.js} +1 -1
- package/dist/client/assets/{reset-password-D0Ak5nrj.js → reset-password-rYx9wxY5.js} +1 -1
- package/dist/client/assets/{roles-DaLbowGy.js → roles-DRxguWZW.js} +1 -1
- package/dist/client/assets/{search-input-DN3bxChj.js → search-input-DglPcAnH.js} +1 -1
- package/dist/client/assets/{secrets-B6jYZgCT.js → secrets-DmZX9LsT.js} +1 -1
- package/dist/client/assets/{sections-editor-2l7dT3ea.js → sections-editor-BMpgMeff.js} +1 -1
- package/dist/client/assets/{select-BI295XE-.js → select-ufdAhrF_.js} +1 -1
- package/dist/client/assets/{settings-layout-0UTQAxIu.js → settings-layout-BBUh6Vlw.js} +1 -1
- package/dist/client/assets/{settings-section-DCgrgvZN.js → settings-section-DbssupiX.js} +1 -1
- package/dist/client/assets/{shell-controls-B5In6zvk.js → shell-controls-wYSme1hd.js} +1 -1
- package/dist/client/assets/{shell-layout-B4sASmIz.js → shell-layout-iPI2JI8_.js} +1 -1
- package/dist/client/assets/{sidebar-BQJxM_Xs.js → sidebar-CkEPveNS.js} +1 -1
- package/dist/client/assets/{skeleton-Cz-aBL4t.js → skeleton-DYoQoQqq.js} +1 -1
- package/dist/client/assets/{sortable.esm-CVet_wfm.js → sortable.esm-DUaPlB_W.js} +1 -1
- package/dist/client/assets/{spinner-CW1wo-Y2.js → spinner-CvW_7LWr.js} +1 -1
- package/dist/client/assets/{sso-DLX1tDyb.js → sso-BQiNOjXF.js} +1 -1
- package/dist/client/assets/{store-yTIcf52L.js → store-DkONcJaZ.js} +1 -1
- package/dist/client/assets/store-registry-DdExMpCJ.js +2 -0
- package/dist/client/assets/{switch-Cgc8prv4.js → switch-C_oh8iVS.js} +1 -1
- package/dist/client/assets/{table-Guyc6r0i.js → table-Dy93uecr.js} +1 -1
- package/dist/client/assets/{tabs-CbnJ7Xfx.js → tabs-Bnmd0UmR.js} +1 -1
- package/dist/client/assets/{task-status-D5nCekWh.js → task-status-Bn2_Ktxd.js} +1 -1
- package/dist/client/assets/{textarea-CUr0kaZB.js → textarea-Cna17PTh.js} +1 -1
- package/dist/client/assets/{toggle-group-D-Azql3v.js → toggle-group-Cwno-ULj.js} +1 -1
- package/dist/client/assets/{toolbar-DWP3DcTB.js → toolbar-BBemLolp.js} +1 -1
- package/dist/client/assets/{tools-list-Yx20h0-O.js → tools-list-DF6pe9Ta.js} +1 -1
- package/dist/client/assets/{tooltip-BrUaJepM.js → tooltip-Kfr4gA8D.js} +1 -1
- package/dist/client/assets/{types-C22VRq2r.js → types-DLDiONif.js} +1 -1
- package/dist/client/assets/{use-ai-providers-DWeBiBfE.js → use-ai-providers-CewbWKWW.js} +1 -1
- package/dist/client/assets/{use-collections-DBbGR_3H.js → use-collections-JGA7MsfD.js} +1 -1
- package/dist/client/assets/{use-connection-3197jn_F.js → use-connection-IocO3s2Q.js} +1 -1
- package/dist/client/assets/{use-copy-DeOqBGNE.js → use-copy-DQ7SkKXE.js} +1 -1
- package/dist/client/assets/{use-create-virtual-mcp-CDYPVS3p.js → use-create-virtual-mcp-BSfa--sD.js} +1 -1
- package/dist/client/assets/{use-debounced-autosave-Blm-Cns4.js → use-debounced-autosave-DWrKZmHW.js} +1 -1
- package/dist/client/assets/{use-delete-connection-CgDNCbAv.js → use-delete-connection-Bg4nH-Nd.js} +1 -1
- package/dist/client/assets/{use-file-configs-CkITamMd.js → use-file-configs-DDjVwmYE.js} +1 -1
- package/dist/client/assets/{use-infinite-scroll-C3Cp1KLu.js → use-infinite-scroll-jDpA-_cW.js} +1 -1
- package/dist/client/assets/{use-list-state-D2ojxj9D.js → use-list-state--Z7pVdDS.js} +1 -1
- package/dist/client/assets/{use-mcp-prompts-DgIPs9M6.js → use-mcp-prompts-CvpPBs_y.js} +1 -1
- package/dist/client/assets/{use-mcp-tools-DycYaXyV.js → use-mcp-tools-POhiNXdT.js} +1 -1
- package/dist/client/assets/{use-members-XY8cJPkc.js → use-members-cPnrxPK_.js} +1 -1
- package/dist/client/assets/{use-navigate-to-agent-VrXIL0dL.js → use-navigate-to-agent-DIIPigDX.js} +1 -1
- package/dist/client/assets/{use-org-auth-client--KUUMHp0.js → use-org-auth-client-DOzELmrd.js} +1 -1
- package/dist/client/assets/{use-org-sso-mHvkRXYR.js → use-org-sso-CyDwJDEM.js} +1 -1
- package/dist/client/assets/{use-organization-roles-DvMKsAzI.js → use-organization-roles-CZP0dNKh.js} +1 -1
- package/dist/client/assets/{use-organization-settings-yjaKZxoH.js → use-organization-settings-DJc_W4n4.js} +1 -1
- package/dist/client/assets/{use-registry-connections-CPtKKagv.js → use-registry-connections-SwizXZVX.js} +1 -1
- package/dist/client/assets/{use-secrets-DaKsY9Qa.js → use-secrets-BAD7O6nA.js} +1 -1
- package/dist/client/assets/{use-status-sounds-piyGyRnD.js → use-status-sounds-RHGSJdHR.js} +1 -1
- package/dist/client/assets/{use-view-mode-FiZLQ7H4.js → use-view-mode-isYjr9TL.js} +1 -1
- package/dist/client/assets/{use-virtual-mcp-wzufKfmA.js → use-virtual-mcp-D3NBTQSJ.js} +1 -1
- package/dist/client/assets/useInfiniteQuery-CedWd5FM.js +1 -0
- package/dist/client/assets/{useRouterState-C5I8d05V.js → useRouterState-CD2kdIEW.js} +1 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-Cu6z25rm.js +1 -0
- package/dist/client/assets/{user-CGJGTWyL.js → user-Csugwi5K.js} +1 -1
- package/dist/client/assets/{view-mode-toggle-BV9N1_6z.js → view-mode-toggle-DXRcEzPg.js} +1 -1
- package/dist/client/assets/{workflow-BhGQkDG3.js → workflow-DvcXfyy4.js} +1 -1
- package/dist/client/assets/workflow-detail-BrOvUZpc.js +1 -0
- package/dist/client/index.html +1 -1
- package/dist/server/cli.js +1 -1
- package/dist/server/node_modules/@opentelemetry/otlp-transformer/build/esm/generated/root.js +6 -36
- package/dist/server/node_modules/@opentelemetry/otlp-transformer/build/esm/generated/root.js.map +1 -1
- package/dist/server/node_modules/@opentelemetry/otlp-transformer/build/esm/trace/internal.js +0 -15
- package/dist/server/node_modules/@opentelemetry/otlp-transformer/build/esm/trace/internal.js.map +1 -1
- package/dist/server/node_modules/@opentelemetry/otlp-transformer/build/esnext/generated/root.js +6 -36
- package/dist/server/node_modules/@opentelemetry/otlp-transformer/build/esnext/generated/root.js.map +1 -1
- package/dist/server/node_modules/@opentelemetry/otlp-transformer/build/esnext/trace/internal.js +0 -15
- package/dist/server/node_modules/@opentelemetry/otlp-transformer/build/esnext/trace/internal.js.map +1 -1
- package/dist/server/node_modules/@opentelemetry/otlp-transformer/build/src/generated/root.js +6 -36
- package/dist/server/node_modules/@opentelemetry/otlp-transformer/build/src/generated/root.js.map +1 -1
- package/dist/server/node_modules/@opentelemetry/otlp-transformer/build/src/trace/internal.js +0 -15
- package/dist/server/node_modules/@opentelemetry/otlp-transformer/build/src/trace/internal.js.map +1 -1
- package/dist/server/node_modules/@opentelemetry/otlp-transformer/package.json +14 -12
- package/dist/server/node_modules/{pg → pg-connection-string}/LICENSE +3 -3
- package/dist/server/node_modules/pg-connection-string/README.md +105 -0
- package/dist/server/node_modules/pg-connection-string/esm/index.mjs +8 -0
- package/dist/server/node_modules/pg-connection-string/index.d.ts +36 -0
- package/dist/server/node_modules/pg-connection-string/index.js +231 -0
- package/dist/server/node_modules/pg-connection-string/package.json +52 -0
- package/dist/server/node_modules/protobufjs/dist/light/protobuf.js +10 -13
- package/dist/server/node_modules/protobufjs/dist/light/protobuf.js.map +1 -1
- package/dist/server/node_modules/protobufjs/dist/light/protobuf.min.js +3 -3
- package/dist/server/node_modules/protobufjs/dist/light/protobuf.min.js.map +1 -1
- package/dist/server/node_modules/protobufjs/dist/minimal/protobuf.js +2 -2
- package/dist/server/node_modules/protobufjs/dist/minimal/protobuf.min.js +2 -2
- package/dist/server/node_modules/protobufjs/dist/protobuf.js +55 -14
- package/dist/server/node_modules/protobufjs/dist/protobuf.js.map +1 -1
- package/dist/server/node_modules/protobufjs/dist/protobuf.min.js +3 -3
- package/dist/server/node_modules/protobufjs/dist/protobuf.min.js.map +1 -1
- package/dist/server/node_modules/protobufjs/package.json +1 -1
- package/dist/server/node_modules/protobufjs/src/message.js +3 -7
- package/dist/server/node_modules/protobufjs/src/object.js +6 -3
- package/dist/server/node_modules/protobufjs/src/parse.js +45 -1
- package/dist/server/node_modules/protobufjs/src/type.js +0 -1
- package/package.json +1 -1
- package/dist/client/assets/registry-a_Y0eqBG.js +0 -2
- package/dist/client/assets/store-registry-ClO-HCd4.js +0 -2
- package/dist/client/assets/useInfiniteQuery-Dn69KZzX.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-CFbzjyFd.js +0 -1
- package/dist/client/assets/workflow-detail-CgGFXY1-.js +0 -1
- package/dist/server/node_modules/pg/README.md +0 -89
- package/dist/server/node_modules/pg/lib/client.js +0 -631
- package/dist/server/node_modules/pg/lib/connection-parameters.js +0 -167
- package/dist/server/node_modules/pg/lib/connection.js +0 -223
- package/dist/server/node_modules/pg/lib/crypto/sasl.js +0 -186
- package/dist/server/node_modules/pg/lib/crypto/utils-legacy.js +0 -37
- package/dist/server/node_modules/pg/lib/crypto/utils-webcrypto.js +0 -83
- package/dist/server/node_modules/pg/lib/crypto/utils.js +0 -9
- package/dist/server/node_modules/pg/lib/defaults.js +0 -84
- package/dist/server/node_modules/pg/lib/index.js +0 -58
- package/dist/server/node_modules/pg/lib/native/client.js +0 -307
- package/dist/server/node_modules/pg/lib/native/index.js +0 -2
- package/dist/server/node_modules/pg/lib/native/query.js +0 -165
- package/dist/server/node_modules/pg/lib/query.js +0 -241
- package/dist/server/node_modules/pg/lib/result.js +0 -107
- package/dist/server/node_modules/pg/lib/stream.js +0 -28
- package/dist/server/node_modules/pg/lib/type-overrides.js +0 -35
- package/dist/server/node_modules/pg/lib/utils.js +0 -204
- package/dist/server/node_modules/pg/package.json +0 -64
|
@@ -1,631 +0,0 @@
|
|
|
1
|
-
'use strict'
|
|
2
|
-
|
|
3
|
-
var EventEmitter = require('events').EventEmitter
|
|
4
|
-
var utils = require('./utils')
|
|
5
|
-
var sasl = require('./crypto/sasl')
|
|
6
|
-
var TypeOverrides = require('./type-overrides')
|
|
7
|
-
|
|
8
|
-
var ConnectionParameters = require('./connection-parameters')
|
|
9
|
-
var Query = require('./query')
|
|
10
|
-
var defaults = require('./defaults')
|
|
11
|
-
var Connection = require('./connection')
|
|
12
|
-
const crypto = require('./crypto/utils')
|
|
13
|
-
|
|
14
|
-
class Client extends EventEmitter {
|
|
15
|
-
constructor(config) {
|
|
16
|
-
super()
|
|
17
|
-
|
|
18
|
-
this.connectionParameters = new ConnectionParameters(config)
|
|
19
|
-
this.user = this.connectionParameters.user
|
|
20
|
-
this.database = this.connectionParameters.database
|
|
21
|
-
this.port = this.connectionParameters.port
|
|
22
|
-
this.host = this.connectionParameters.host
|
|
23
|
-
|
|
24
|
-
// "hiding" the password so it doesn't show up in stack traces
|
|
25
|
-
// or if the client is console.logged
|
|
26
|
-
Object.defineProperty(this, 'password', {
|
|
27
|
-
configurable: true,
|
|
28
|
-
enumerable: false,
|
|
29
|
-
writable: true,
|
|
30
|
-
value: this.connectionParameters.password,
|
|
31
|
-
})
|
|
32
|
-
|
|
33
|
-
this.replication = this.connectionParameters.replication
|
|
34
|
-
|
|
35
|
-
var c = config || {}
|
|
36
|
-
|
|
37
|
-
this._Promise = c.Promise || global.Promise
|
|
38
|
-
this._types = new TypeOverrides(c.types)
|
|
39
|
-
this._ending = false
|
|
40
|
-
this._ended = false
|
|
41
|
-
this._connecting = false
|
|
42
|
-
this._connected = false
|
|
43
|
-
this._connectionError = false
|
|
44
|
-
this._queryable = true
|
|
45
|
-
|
|
46
|
-
this.connection =
|
|
47
|
-
c.connection ||
|
|
48
|
-
new Connection({
|
|
49
|
-
stream: c.stream,
|
|
50
|
-
ssl: this.connectionParameters.ssl,
|
|
51
|
-
keepAlive: c.keepAlive || false,
|
|
52
|
-
keepAliveInitialDelayMillis: c.keepAliveInitialDelayMillis || 0,
|
|
53
|
-
encoding: this.connectionParameters.client_encoding || 'utf8',
|
|
54
|
-
})
|
|
55
|
-
this.queryQueue = []
|
|
56
|
-
this.binary = c.binary || defaults.binary
|
|
57
|
-
this.processID = null
|
|
58
|
-
this.secretKey = null
|
|
59
|
-
this.ssl = this.connectionParameters.ssl || false
|
|
60
|
-
// As with Password, make SSL->Key (the private key) non-enumerable.
|
|
61
|
-
// It won't show up in stack traces
|
|
62
|
-
// or if the client is console.logged
|
|
63
|
-
if (this.ssl && this.ssl.key) {
|
|
64
|
-
Object.defineProperty(this.ssl, 'key', {
|
|
65
|
-
enumerable: false,
|
|
66
|
-
})
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
this._connectionTimeoutMillis = c.connectionTimeoutMillis || 0
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
_errorAllQueries(err) {
|
|
73
|
-
const enqueueError = (query) => {
|
|
74
|
-
process.nextTick(() => {
|
|
75
|
-
query.handleError(err, this.connection)
|
|
76
|
-
})
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
if (this.activeQuery) {
|
|
80
|
-
enqueueError(this.activeQuery)
|
|
81
|
-
this.activeQuery = null
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
this.queryQueue.forEach(enqueueError)
|
|
85
|
-
this.queryQueue.length = 0
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
_connect(callback) {
|
|
89
|
-
var self = this
|
|
90
|
-
var con = this.connection
|
|
91
|
-
this._connectionCallback = callback
|
|
92
|
-
|
|
93
|
-
if (this._connecting || this._connected) {
|
|
94
|
-
const err = new Error('Client has already been connected. You cannot reuse a client.')
|
|
95
|
-
process.nextTick(() => {
|
|
96
|
-
callback(err)
|
|
97
|
-
})
|
|
98
|
-
return
|
|
99
|
-
}
|
|
100
|
-
this._connecting = true
|
|
101
|
-
|
|
102
|
-
this.connectionTimeoutHandle
|
|
103
|
-
if (this._connectionTimeoutMillis > 0) {
|
|
104
|
-
this.connectionTimeoutHandle = setTimeout(() => {
|
|
105
|
-
con._ending = true
|
|
106
|
-
con.stream.destroy(new Error('timeout expired'))
|
|
107
|
-
}, this._connectionTimeoutMillis)
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
if (this.host && this.host.indexOf('/') === 0) {
|
|
111
|
-
con.connect(this.host + '/.s.PGSQL.' + this.port)
|
|
112
|
-
} else {
|
|
113
|
-
con.connect(this.port, this.host)
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
// once connection is established send startup message
|
|
117
|
-
con.on('connect', function () {
|
|
118
|
-
if (self.ssl) {
|
|
119
|
-
con.requestSsl()
|
|
120
|
-
} else {
|
|
121
|
-
con.startup(self.getStartupConf())
|
|
122
|
-
}
|
|
123
|
-
})
|
|
124
|
-
|
|
125
|
-
con.on('sslconnect', function () {
|
|
126
|
-
con.startup(self.getStartupConf())
|
|
127
|
-
})
|
|
128
|
-
|
|
129
|
-
this._attachListeners(con)
|
|
130
|
-
|
|
131
|
-
con.once('end', () => {
|
|
132
|
-
const error = this._ending ? new Error('Connection terminated') : new Error('Connection terminated unexpectedly')
|
|
133
|
-
|
|
134
|
-
clearTimeout(this.connectionTimeoutHandle)
|
|
135
|
-
this._errorAllQueries(error)
|
|
136
|
-
this._ended = true
|
|
137
|
-
|
|
138
|
-
if (!this._ending) {
|
|
139
|
-
// if the connection is ended without us calling .end()
|
|
140
|
-
// on this client then we have an unexpected disconnection
|
|
141
|
-
// treat this as an error unless we've already emitted an error
|
|
142
|
-
// during connection.
|
|
143
|
-
if (this._connecting && !this._connectionError) {
|
|
144
|
-
if (this._connectionCallback) {
|
|
145
|
-
this._connectionCallback(error)
|
|
146
|
-
} else {
|
|
147
|
-
this._handleErrorEvent(error)
|
|
148
|
-
}
|
|
149
|
-
} else if (!this._connectionError) {
|
|
150
|
-
this._handleErrorEvent(error)
|
|
151
|
-
}
|
|
152
|
-
}
|
|
153
|
-
|
|
154
|
-
process.nextTick(() => {
|
|
155
|
-
this.emit('end')
|
|
156
|
-
})
|
|
157
|
-
})
|
|
158
|
-
}
|
|
159
|
-
|
|
160
|
-
connect(callback) {
|
|
161
|
-
if (callback) {
|
|
162
|
-
this._connect(callback)
|
|
163
|
-
return
|
|
164
|
-
}
|
|
165
|
-
|
|
166
|
-
return new this._Promise((resolve, reject) => {
|
|
167
|
-
this._connect((error) => {
|
|
168
|
-
if (error) {
|
|
169
|
-
reject(error)
|
|
170
|
-
} else {
|
|
171
|
-
resolve()
|
|
172
|
-
}
|
|
173
|
-
})
|
|
174
|
-
})
|
|
175
|
-
}
|
|
176
|
-
|
|
177
|
-
_attachListeners(con) {
|
|
178
|
-
// password request handling
|
|
179
|
-
con.on('authenticationCleartextPassword', this._handleAuthCleartextPassword.bind(this))
|
|
180
|
-
// password request handling
|
|
181
|
-
con.on('authenticationMD5Password', this._handleAuthMD5Password.bind(this))
|
|
182
|
-
// password request handling (SASL)
|
|
183
|
-
con.on('authenticationSASL', this._handleAuthSASL.bind(this))
|
|
184
|
-
con.on('authenticationSASLContinue', this._handleAuthSASLContinue.bind(this))
|
|
185
|
-
con.on('authenticationSASLFinal', this._handleAuthSASLFinal.bind(this))
|
|
186
|
-
con.on('backendKeyData', this._handleBackendKeyData.bind(this))
|
|
187
|
-
con.on('error', this._handleErrorEvent.bind(this))
|
|
188
|
-
con.on('errorMessage', this._handleErrorMessage.bind(this))
|
|
189
|
-
con.on('readyForQuery', this._handleReadyForQuery.bind(this))
|
|
190
|
-
con.on('notice', this._handleNotice.bind(this))
|
|
191
|
-
con.on('rowDescription', this._handleRowDescription.bind(this))
|
|
192
|
-
con.on('dataRow', this._handleDataRow.bind(this))
|
|
193
|
-
con.on('portalSuspended', this._handlePortalSuspended.bind(this))
|
|
194
|
-
con.on('emptyQuery', this._handleEmptyQuery.bind(this))
|
|
195
|
-
con.on('commandComplete', this._handleCommandComplete.bind(this))
|
|
196
|
-
con.on('parseComplete', this._handleParseComplete.bind(this))
|
|
197
|
-
con.on('copyInResponse', this._handleCopyInResponse.bind(this))
|
|
198
|
-
con.on('copyData', this._handleCopyData.bind(this))
|
|
199
|
-
con.on('notification', this._handleNotification.bind(this))
|
|
200
|
-
}
|
|
201
|
-
|
|
202
|
-
// TODO(bmc): deprecate pgpass "built in" integration since this.password can be a function
|
|
203
|
-
// it can be supplied by the user if required - this is a breaking change!
|
|
204
|
-
_checkPgPass(cb) {
|
|
205
|
-
const con = this.connection
|
|
206
|
-
if (typeof this.password === 'function') {
|
|
207
|
-
this._Promise
|
|
208
|
-
.resolve()
|
|
209
|
-
.then(() => this.password())
|
|
210
|
-
.then((pass) => {
|
|
211
|
-
if (pass !== undefined) {
|
|
212
|
-
if (typeof pass !== 'string') {
|
|
213
|
-
con.emit('error', new TypeError('Password must be a string'))
|
|
214
|
-
return
|
|
215
|
-
}
|
|
216
|
-
this.connectionParameters.password = this.password = pass
|
|
217
|
-
} else {
|
|
218
|
-
this.connectionParameters.password = this.password = null
|
|
219
|
-
}
|
|
220
|
-
cb()
|
|
221
|
-
})
|
|
222
|
-
.catch((err) => {
|
|
223
|
-
con.emit('error', err)
|
|
224
|
-
})
|
|
225
|
-
} else if (this.password !== null) {
|
|
226
|
-
cb()
|
|
227
|
-
} else {
|
|
228
|
-
try {
|
|
229
|
-
const pgPass = require('pgpass')
|
|
230
|
-
pgPass(this.connectionParameters, (pass) => {
|
|
231
|
-
if (undefined !== pass) {
|
|
232
|
-
this.connectionParameters.password = this.password = pass
|
|
233
|
-
}
|
|
234
|
-
cb()
|
|
235
|
-
})
|
|
236
|
-
} catch (e) {
|
|
237
|
-
this.emit('error', e)
|
|
238
|
-
}
|
|
239
|
-
}
|
|
240
|
-
}
|
|
241
|
-
|
|
242
|
-
_handleAuthCleartextPassword(msg) {
|
|
243
|
-
this._checkPgPass(() => {
|
|
244
|
-
this.connection.password(this.password)
|
|
245
|
-
})
|
|
246
|
-
}
|
|
247
|
-
|
|
248
|
-
_handleAuthMD5Password(msg) {
|
|
249
|
-
this._checkPgPass(async () => {
|
|
250
|
-
try {
|
|
251
|
-
const hashedPassword = await crypto.postgresMd5PasswordHash(this.user, this.password, msg.salt)
|
|
252
|
-
this.connection.password(hashedPassword)
|
|
253
|
-
} catch (e) {
|
|
254
|
-
this.emit('error', e)
|
|
255
|
-
}
|
|
256
|
-
})
|
|
257
|
-
}
|
|
258
|
-
|
|
259
|
-
_handleAuthSASL(msg) {
|
|
260
|
-
this._checkPgPass(() => {
|
|
261
|
-
try {
|
|
262
|
-
this.saslSession = sasl.startSession(msg.mechanisms)
|
|
263
|
-
this.connection.sendSASLInitialResponseMessage(this.saslSession.mechanism, this.saslSession.response)
|
|
264
|
-
} catch (err) {
|
|
265
|
-
this.connection.emit('error', err)
|
|
266
|
-
}
|
|
267
|
-
})
|
|
268
|
-
}
|
|
269
|
-
|
|
270
|
-
async _handleAuthSASLContinue(msg) {
|
|
271
|
-
try {
|
|
272
|
-
await sasl.continueSession(this.saslSession, this.password, msg.data)
|
|
273
|
-
this.connection.sendSCRAMClientFinalMessage(this.saslSession.response)
|
|
274
|
-
} catch (err) {
|
|
275
|
-
this.connection.emit('error', err)
|
|
276
|
-
}
|
|
277
|
-
}
|
|
278
|
-
|
|
279
|
-
_handleAuthSASLFinal(msg) {
|
|
280
|
-
try {
|
|
281
|
-
sasl.finalizeSession(this.saslSession, msg.data)
|
|
282
|
-
this.saslSession = null
|
|
283
|
-
} catch (err) {
|
|
284
|
-
this.connection.emit('error', err)
|
|
285
|
-
}
|
|
286
|
-
}
|
|
287
|
-
|
|
288
|
-
_handleBackendKeyData(msg) {
|
|
289
|
-
this.processID = msg.processID
|
|
290
|
-
this.secretKey = msg.secretKey
|
|
291
|
-
}
|
|
292
|
-
|
|
293
|
-
_handleReadyForQuery(msg) {
|
|
294
|
-
if (this._connecting) {
|
|
295
|
-
this._connecting = false
|
|
296
|
-
this._connected = true
|
|
297
|
-
clearTimeout(this.connectionTimeoutHandle)
|
|
298
|
-
|
|
299
|
-
// process possible callback argument to Client#connect
|
|
300
|
-
if (this._connectionCallback) {
|
|
301
|
-
this._connectionCallback(null, this)
|
|
302
|
-
// remove callback for proper error handling
|
|
303
|
-
// after the connect event
|
|
304
|
-
this._connectionCallback = null
|
|
305
|
-
}
|
|
306
|
-
this.emit('connect')
|
|
307
|
-
}
|
|
308
|
-
const { activeQuery } = this
|
|
309
|
-
this.activeQuery = null
|
|
310
|
-
this.readyForQuery = true
|
|
311
|
-
if (activeQuery) {
|
|
312
|
-
activeQuery.handleReadyForQuery(this.connection)
|
|
313
|
-
}
|
|
314
|
-
this._pulseQueryQueue()
|
|
315
|
-
}
|
|
316
|
-
|
|
317
|
-
// if we receieve an error event or error message
|
|
318
|
-
// during the connection process we handle it here
|
|
319
|
-
_handleErrorWhileConnecting(err) {
|
|
320
|
-
if (this._connectionError) {
|
|
321
|
-
// TODO(bmc): this is swallowing errors - we shouldn't do this
|
|
322
|
-
return
|
|
323
|
-
}
|
|
324
|
-
this._connectionError = true
|
|
325
|
-
clearTimeout(this.connectionTimeoutHandle)
|
|
326
|
-
if (this._connectionCallback) {
|
|
327
|
-
return this._connectionCallback(err)
|
|
328
|
-
}
|
|
329
|
-
this.emit('error', err)
|
|
330
|
-
}
|
|
331
|
-
|
|
332
|
-
// if we're connected and we receive an error event from the connection
|
|
333
|
-
// this means the socket is dead - do a hard abort of all queries and emit
|
|
334
|
-
// the socket error on the client as well
|
|
335
|
-
_handleErrorEvent(err) {
|
|
336
|
-
if (this._connecting) {
|
|
337
|
-
return this._handleErrorWhileConnecting(err)
|
|
338
|
-
}
|
|
339
|
-
this._queryable = false
|
|
340
|
-
this._errorAllQueries(err)
|
|
341
|
-
this.emit('error', err)
|
|
342
|
-
}
|
|
343
|
-
|
|
344
|
-
// handle error messages from the postgres backend
|
|
345
|
-
_handleErrorMessage(msg) {
|
|
346
|
-
if (this._connecting) {
|
|
347
|
-
return this._handleErrorWhileConnecting(msg)
|
|
348
|
-
}
|
|
349
|
-
const activeQuery = this.activeQuery
|
|
350
|
-
|
|
351
|
-
if (!activeQuery) {
|
|
352
|
-
this._handleErrorEvent(msg)
|
|
353
|
-
return
|
|
354
|
-
}
|
|
355
|
-
|
|
356
|
-
this.activeQuery = null
|
|
357
|
-
activeQuery.handleError(msg, this.connection)
|
|
358
|
-
}
|
|
359
|
-
|
|
360
|
-
_handleRowDescription(msg) {
|
|
361
|
-
// delegate rowDescription to active query
|
|
362
|
-
this.activeQuery.handleRowDescription(msg)
|
|
363
|
-
}
|
|
364
|
-
|
|
365
|
-
_handleDataRow(msg) {
|
|
366
|
-
// delegate dataRow to active query
|
|
367
|
-
this.activeQuery.handleDataRow(msg)
|
|
368
|
-
}
|
|
369
|
-
|
|
370
|
-
_handlePortalSuspended(msg) {
|
|
371
|
-
// delegate portalSuspended to active query
|
|
372
|
-
this.activeQuery.handlePortalSuspended(this.connection)
|
|
373
|
-
}
|
|
374
|
-
|
|
375
|
-
_handleEmptyQuery(msg) {
|
|
376
|
-
// delegate emptyQuery to active query
|
|
377
|
-
this.activeQuery.handleEmptyQuery(this.connection)
|
|
378
|
-
}
|
|
379
|
-
|
|
380
|
-
_handleCommandComplete(msg) {
|
|
381
|
-
// delegate commandComplete to active query
|
|
382
|
-
this.activeQuery.handleCommandComplete(msg, this.connection)
|
|
383
|
-
}
|
|
384
|
-
|
|
385
|
-
_handleParseComplete(msg) {
|
|
386
|
-
// if a prepared statement has a name and properly parses
|
|
387
|
-
// we track that its already been executed so we don't parse
|
|
388
|
-
// it again on the same client
|
|
389
|
-
if (this.activeQuery.name) {
|
|
390
|
-
this.connection.parsedStatements[this.activeQuery.name] = this.activeQuery.text
|
|
391
|
-
}
|
|
392
|
-
}
|
|
393
|
-
|
|
394
|
-
_handleCopyInResponse(msg) {
|
|
395
|
-
this.activeQuery.handleCopyInResponse(this.connection)
|
|
396
|
-
}
|
|
397
|
-
|
|
398
|
-
_handleCopyData(msg) {
|
|
399
|
-
this.activeQuery.handleCopyData(msg, this.connection)
|
|
400
|
-
}
|
|
401
|
-
|
|
402
|
-
_handleNotification(msg) {
|
|
403
|
-
this.emit('notification', msg)
|
|
404
|
-
}
|
|
405
|
-
|
|
406
|
-
_handleNotice(msg) {
|
|
407
|
-
this.emit('notice', msg)
|
|
408
|
-
}
|
|
409
|
-
|
|
410
|
-
getStartupConf() {
|
|
411
|
-
var params = this.connectionParameters
|
|
412
|
-
|
|
413
|
-
var data = {
|
|
414
|
-
user: params.user,
|
|
415
|
-
database: params.database,
|
|
416
|
-
}
|
|
417
|
-
|
|
418
|
-
var appName = params.application_name || params.fallback_application_name
|
|
419
|
-
if (appName) {
|
|
420
|
-
data.application_name = appName
|
|
421
|
-
}
|
|
422
|
-
if (params.replication) {
|
|
423
|
-
data.replication = '' + params.replication
|
|
424
|
-
}
|
|
425
|
-
if (params.statement_timeout) {
|
|
426
|
-
data.statement_timeout = String(parseInt(params.statement_timeout, 10))
|
|
427
|
-
}
|
|
428
|
-
if (params.lock_timeout) {
|
|
429
|
-
data.lock_timeout = String(parseInt(params.lock_timeout, 10))
|
|
430
|
-
}
|
|
431
|
-
if (params.idle_in_transaction_session_timeout) {
|
|
432
|
-
data.idle_in_transaction_session_timeout = String(parseInt(params.idle_in_transaction_session_timeout, 10))
|
|
433
|
-
}
|
|
434
|
-
if (params.options) {
|
|
435
|
-
data.options = params.options
|
|
436
|
-
}
|
|
437
|
-
|
|
438
|
-
return data
|
|
439
|
-
}
|
|
440
|
-
|
|
441
|
-
cancel(client, query) {
|
|
442
|
-
if (client.activeQuery === query) {
|
|
443
|
-
var con = this.connection
|
|
444
|
-
|
|
445
|
-
if (this.host && this.host.indexOf('/') === 0) {
|
|
446
|
-
con.connect(this.host + '/.s.PGSQL.' + this.port)
|
|
447
|
-
} else {
|
|
448
|
-
con.connect(this.port, this.host)
|
|
449
|
-
}
|
|
450
|
-
|
|
451
|
-
// once connection is established send cancel message
|
|
452
|
-
con.on('connect', function () {
|
|
453
|
-
con.cancel(client.processID, client.secretKey)
|
|
454
|
-
})
|
|
455
|
-
} else if (client.queryQueue.indexOf(query) !== -1) {
|
|
456
|
-
client.queryQueue.splice(client.queryQueue.indexOf(query), 1)
|
|
457
|
-
}
|
|
458
|
-
}
|
|
459
|
-
|
|
460
|
-
setTypeParser(oid, format, parseFn) {
|
|
461
|
-
return this._types.setTypeParser(oid, format, parseFn)
|
|
462
|
-
}
|
|
463
|
-
|
|
464
|
-
getTypeParser(oid, format) {
|
|
465
|
-
return this._types.getTypeParser(oid, format)
|
|
466
|
-
}
|
|
467
|
-
|
|
468
|
-
// escapeIdentifier and escapeLiteral moved to utility functions & exported
|
|
469
|
-
// on PG
|
|
470
|
-
// re-exported here for backwards compatibility
|
|
471
|
-
escapeIdentifier(str) {
|
|
472
|
-
return utils.escapeIdentifier(str)
|
|
473
|
-
}
|
|
474
|
-
|
|
475
|
-
escapeLiteral(str) {
|
|
476
|
-
return utils.escapeLiteral(str)
|
|
477
|
-
}
|
|
478
|
-
|
|
479
|
-
_pulseQueryQueue() {
|
|
480
|
-
if (this.readyForQuery === true) {
|
|
481
|
-
this.activeQuery = this.queryQueue.shift()
|
|
482
|
-
if (this.activeQuery) {
|
|
483
|
-
this.readyForQuery = false
|
|
484
|
-
this.hasExecuted = true
|
|
485
|
-
|
|
486
|
-
const queryError = this.activeQuery.submit(this.connection)
|
|
487
|
-
if (queryError) {
|
|
488
|
-
process.nextTick(() => {
|
|
489
|
-
this.activeQuery.handleError(queryError, this.connection)
|
|
490
|
-
this.readyForQuery = true
|
|
491
|
-
this._pulseQueryQueue()
|
|
492
|
-
})
|
|
493
|
-
}
|
|
494
|
-
} else if (this.hasExecuted) {
|
|
495
|
-
this.activeQuery = null
|
|
496
|
-
this.emit('drain')
|
|
497
|
-
}
|
|
498
|
-
}
|
|
499
|
-
}
|
|
500
|
-
|
|
501
|
-
query(config, values, callback) {
|
|
502
|
-
// can take in strings, config object or query object
|
|
503
|
-
var query
|
|
504
|
-
var result
|
|
505
|
-
var readTimeout
|
|
506
|
-
var readTimeoutTimer
|
|
507
|
-
var queryCallback
|
|
508
|
-
|
|
509
|
-
if (config === null || config === undefined) {
|
|
510
|
-
throw new TypeError('Client was passed a null or undefined query')
|
|
511
|
-
} else if (typeof config.submit === 'function') {
|
|
512
|
-
readTimeout = config.query_timeout || this.connectionParameters.query_timeout
|
|
513
|
-
result = query = config
|
|
514
|
-
if (typeof values === 'function') {
|
|
515
|
-
query.callback = query.callback || values
|
|
516
|
-
}
|
|
517
|
-
} else {
|
|
518
|
-
readTimeout = this.connectionParameters.query_timeout
|
|
519
|
-
query = new Query(config, values, callback)
|
|
520
|
-
if (!query.callback) {
|
|
521
|
-
result = new this._Promise((resolve, reject) => {
|
|
522
|
-
query.callback = (err, res) => (err ? reject(err) : resolve(res))
|
|
523
|
-
}).catch(err => {
|
|
524
|
-
// replace the stack trace that leads to `TCP.onStreamRead` with one that leads back to the
|
|
525
|
-
// application that created the query
|
|
526
|
-
Error.captureStackTrace(err);
|
|
527
|
-
throw err;
|
|
528
|
-
})
|
|
529
|
-
}
|
|
530
|
-
}
|
|
531
|
-
|
|
532
|
-
if (readTimeout) {
|
|
533
|
-
queryCallback = query.callback
|
|
534
|
-
|
|
535
|
-
readTimeoutTimer = setTimeout(() => {
|
|
536
|
-
var error = new Error('Query read timeout')
|
|
537
|
-
|
|
538
|
-
process.nextTick(() => {
|
|
539
|
-
query.handleError(error, this.connection)
|
|
540
|
-
})
|
|
541
|
-
|
|
542
|
-
queryCallback(error)
|
|
543
|
-
|
|
544
|
-
// we already returned an error,
|
|
545
|
-
// just do nothing if query completes
|
|
546
|
-
query.callback = () => {}
|
|
547
|
-
|
|
548
|
-
// Remove from queue
|
|
549
|
-
var index = this.queryQueue.indexOf(query)
|
|
550
|
-
if (index > -1) {
|
|
551
|
-
this.queryQueue.splice(index, 1)
|
|
552
|
-
}
|
|
553
|
-
|
|
554
|
-
this._pulseQueryQueue()
|
|
555
|
-
}, readTimeout)
|
|
556
|
-
|
|
557
|
-
query.callback = (err, res) => {
|
|
558
|
-
clearTimeout(readTimeoutTimer)
|
|
559
|
-
queryCallback(err, res)
|
|
560
|
-
}
|
|
561
|
-
}
|
|
562
|
-
|
|
563
|
-
if (this.binary && !query.binary) {
|
|
564
|
-
query.binary = true
|
|
565
|
-
}
|
|
566
|
-
|
|
567
|
-
if (query._result && !query._result._types) {
|
|
568
|
-
query._result._types = this._types
|
|
569
|
-
}
|
|
570
|
-
|
|
571
|
-
if (!this._queryable) {
|
|
572
|
-
process.nextTick(() => {
|
|
573
|
-
query.handleError(new Error('Client has encountered a connection error and is not queryable'), this.connection)
|
|
574
|
-
})
|
|
575
|
-
return result
|
|
576
|
-
}
|
|
577
|
-
|
|
578
|
-
if (this._ending) {
|
|
579
|
-
process.nextTick(() => {
|
|
580
|
-
query.handleError(new Error('Client was closed and is not queryable'), this.connection)
|
|
581
|
-
})
|
|
582
|
-
return result
|
|
583
|
-
}
|
|
584
|
-
|
|
585
|
-
this.queryQueue.push(query)
|
|
586
|
-
this._pulseQueryQueue()
|
|
587
|
-
return result
|
|
588
|
-
}
|
|
589
|
-
|
|
590
|
-
ref() {
|
|
591
|
-
this.connection.ref()
|
|
592
|
-
}
|
|
593
|
-
|
|
594
|
-
unref() {
|
|
595
|
-
this.connection.unref()
|
|
596
|
-
}
|
|
597
|
-
|
|
598
|
-
end(cb) {
|
|
599
|
-
this._ending = true
|
|
600
|
-
|
|
601
|
-
// if we have never connected, then end is a noop, callback immediately
|
|
602
|
-
if (!this.connection._connecting || this._ended) {
|
|
603
|
-
if (cb) {
|
|
604
|
-
cb()
|
|
605
|
-
} else {
|
|
606
|
-
return this._Promise.resolve()
|
|
607
|
-
}
|
|
608
|
-
}
|
|
609
|
-
|
|
610
|
-
if (this.activeQuery || !this._queryable) {
|
|
611
|
-
// if we have an active query we need to force a disconnect
|
|
612
|
-
// on the socket - otherwise a hung query could block end forever
|
|
613
|
-
this.connection.stream.destroy()
|
|
614
|
-
} else {
|
|
615
|
-
this.connection.end()
|
|
616
|
-
}
|
|
617
|
-
|
|
618
|
-
if (cb) {
|
|
619
|
-
this.connection.once('end', cb)
|
|
620
|
-
} else {
|
|
621
|
-
return new this._Promise((resolve) => {
|
|
622
|
-
this.connection.once('end', resolve)
|
|
623
|
-
})
|
|
624
|
-
}
|
|
625
|
-
}
|
|
626
|
-
}
|
|
627
|
-
|
|
628
|
-
// expose a Query constructor
|
|
629
|
-
Client.Query = Query
|
|
630
|
-
|
|
631
|
-
module.exports = Client
|