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,84 +0,0 @@
|
|
|
1
|
-
'use strict'
|
|
2
|
-
|
|
3
|
-
module.exports = {
|
|
4
|
-
// database host. defaults to localhost
|
|
5
|
-
host: 'localhost',
|
|
6
|
-
|
|
7
|
-
// database user's name
|
|
8
|
-
user: process.platform === 'win32' ? process.env.USERNAME : process.env.USER,
|
|
9
|
-
|
|
10
|
-
// name of database to connect
|
|
11
|
-
database: undefined,
|
|
12
|
-
|
|
13
|
-
// database user's password
|
|
14
|
-
password: null,
|
|
15
|
-
|
|
16
|
-
// a Postgres connection string to be used instead of setting individual connection items
|
|
17
|
-
// NOTE: Setting this value will cause it to override any other value (such as database or user) defined
|
|
18
|
-
// in the defaults object.
|
|
19
|
-
connectionString: undefined,
|
|
20
|
-
|
|
21
|
-
// database port
|
|
22
|
-
port: 5432,
|
|
23
|
-
|
|
24
|
-
// number of rows to return at a time from a prepared statement's
|
|
25
|
-
// portal. 0 will return all rows at once
|
|
26
|
-
rows: 0,
|
|
27
|
-
|
|
28
|
-
// binary result mode
|
|
29
|
-
binary: false,
|
|
30
|
-
|
|
31
|
-
// Connection pool options - see https://github.com/brianc/node-pg-pool
|
|
32
|
-
|
|
33
|
-
// number of connections to use in connection pool
|
|
34
|
-
// 0 will disable connection pooling
|
|
35
|
-
max: 10,
|
|
36
|
-
|
|
37
|
-
// max milliseconds a client can go unused before it is removed
|
|
38
|
-
// from the pool and destroyed
|
|
39
|
-
idleTimeoutMillis: 30000,
|
|
40
|
-
|
|
41
|
-
client_encoding: '',
|
|
42
|
-
|
|
43
|
-
ssl: false,
|
|
44
|
-
|
|
45
|
-
application_name: undefined,
|
|
46
|
-
|
|
47
|
-
fallback_application_name: undefined,
|
|
48
|
-
|
|
49
|
-
options: undefined,
|
|
50
|
-
|
|
51
|
-
parseInputDatesAsUTC: false,
|
|
52
|
-
|
|
53
|
-
// max milliseconds any query using this connection will execute for before timing out in error.
|
|
54
|
-
// false=unlimited
|
|
55
|
-
statement_timeout: false,
|
|
56
|
-
|
|
57
|
-
// Abort any statement that waits longer than the specified duration in milliseconds while attempting to acquire a lock.
|
|
58
|
-
// false=unlimited
|
|
59
|
-
lock_timeout: false,
|
|
60
|
-
|
|
61
|
-
// Terminate any session with an open transaction that has been idle for longer than the specified duration in milliseconds
|
|
62
|
-
// false=unlimited
|
|
63
|
-
idle_in_transaction_session_timeout: false,
|
|
64
|
-
|
|
65
|
-
// max milliseconds to wait for query to complete (client side)
|
|
66
|
-
query_timeout: false,
|
|
67
|
-
|
|
68
|
-
connect_timeout: 0,
|
|
69
|
-
|
|
70
|
-
keepalives: 1,
|
|
71
|
-
|
|
72
|
-
keepalives_idle: 0,
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
var pgTypes = require('pg-types')
|
|
76
|
-
// save default parsers
|
|
77
|
-
var parseBigInteger = pgTypes.getTypeParser(20, 'text')
|
|
78
|
-
var parseBigIntegerArray = pgTypes.getTypeParser(1016, 'text')
|
|
79
|
-
|
|
80
|
-
// parse int8 so you can get your count values as actual numbers
|
|
81
|
-
module.exports.__defineSetter__('parseInt8', function (val) {
|
|
82
|
-
pgTypes.setTypeParser(20, 'text', val ? pgTypes.getTypeParser(23, 'text') : parseBigInteger)
|
|
83
|
-
pgTypes.setTypeParser(1016, 'text', val ? pgTypes.getTypeParser(1007, 'text') : parseBigIntegerArray)
|
|
84
|
-
})
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
'use strict'
|
|
2
|
-
|
|
3
|
-
var Client = require('./client')
|
|
4
|
-
var defaults = require('./defaults')
|
|
5
|
-
var Connection = require('./connection')
|
|
6
|
-
var Pool = require('pg-pool')
|
|
7
|
-
const { DatabaseError } = require('pg-protocol')
|
|
8
|
-
const { escapeIdentifier, escapeLiteral } = require('./utils')
|
|
9
|
-
|
|
10
|
-
const poolFactory = (Client) => {
|
|
11
|
-
return class BoundPool extends Pool {
|
|
12
|
-
constructor(options) {
|
|
13
|
-
super(options, Client)
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
var PG = function (clientConstructor) {
|
|
19
|
-
this.defaults = defaults
|
|
20
|
-
this.Client = clientConstructor
|
|
21
|
-
this.Query = this.Client.Query
|
|
22
|
-
this.Pool = poolFactory(this.Client)
|
|
23
|
-
this._pools = []
|
|
24
|
-
this.Connection = Connection
|
|
25
|
-
this.types = require('pg-types')
|
|
26
|
-
this.DatabaseError = DatabaseError
|
|
27
|
-
this.escapeIdentifier = escapeIdentifier
|
|
28
|
-
this.escapeLiteral = escapeLiteral
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
if (typeof process.env.NODE_PG_FORCE_NATIVE !== 'undefined') {
|
|
32
|
-
module.exports = new PG(require('./native'))
|
|
33
|
-
} else {
|
|
34
|
-
module.exports = new PG(Client)
|
|
35
|
-
|
|
36
|
-
// lazy require native module...the native module may not have installed
|
|
37
|
-
Object.defineProperty(module.exports, 'native', {
|
|
38
|
-
configurable: true,
|
|
39
|
-
enumerable: false,
|
|
40
|
-
get() {
|
|
41
|
-
var native = null
|
|
42
|
-
try {
|
|
43
|
-
native = new PG(require('./native'))
|
|
44
|
-
} catch (err) {
|
|
45
|
-
if (err.code !== 'MODULE_NOT_FOUND') {
|
|
46
|
-
throw err
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
// overwrite module.exports.native so that getter is never called again
|
|
51
|
-
Object.defineProperty(module.exports, 'native', {
|
|
52
|
-
value: native,
|
|
53
|
-
})
|
|
54
|
-
|
|
55
|
-
return native
|
|
56
|
-
},
|
|
57
|
-
})
|
|
58
|
-
}
|
|
@@ -1,307 +0,0 @@
|
|
|
1
|
-
'use strict'
|
|
2
|
-
|
|
3
|
-
// eslint-disable-next-line
|
|
4
|
-
var Native
|
|
5
|
-
try {
|
|
6
|
-
// Wrap this `require()` in a try-catch to avoid upstream bundlers from complaining that this might not be available since it is an optional import
|
|
7
|
-
Native = require('pg-native')
|
|
8
|
-
} catch (e) {
|
|
9
|
-
throw e
|
|
10
|
-
}
|
|
11
|
-
var TypeOverrides = require('../type-overrides')
|
|
12
|
-
var EventEmitter = require('events').EventEmitter
|
|
13
|
-
var util = require('util')
|
|
14
|
-
var ConnectionParameters = require('../connection-parameters')
|
|
15
|
-
|
|
16
|
-
var NativeQuery = require('./query')
|
|
17
|
-
|
|
18
|
-
var Client = (module.exports = function (config) {
|
|
19
|
-
EventEmitter.call(this)
|
|
20
|
-
config = config || {}
|
|
21
|
-
|
|
22
|
-
this._Promise = config.Promise || global.Promise
|
|
23
|
-
this._types = new TypeOverrides(config.types)
|
|
24
|
-
|
|
25
|
-
this.native = new Native({
|
|
26
|
-
types: this._types,
|
|
27
|
-
})
|
|
28
|
-
|
|
29
|
-
this._queryQueue = []
|
|
30
|
-
this._ending = false
|
|
31
|
-
this._connecting = false
|
|
32
|
-
this._connected = false
|
|
33
|
-
this._queryable = true
|
|
34
|
-
|
|
35
|
-
// keep these on the object for legacy reasons
|
|
36
|
-
// for the time being. TODO: deprecate all this jazz
|
|
37
|
-
var cp = (this.connectionParameters = new ConnectionParameters(config))
|
|
38
|
-
if (config.nativeConnectionString) cp.nativeConnectionString = config.nativeConnectionString
|
|
39
|
-
this.user = cp.user
|
|
40
|
-
|
|
41
|
-
// "hiding" the password so it doesn't show up in stack traces
|
|
42
|
-
// or if the client is console.logged
|
|
43
|
-
Object.defineProperty(this, 'password', {
|
|
44
|
-
configurable: true,
|
|
45
|
-
enumerable: false,
|
|
46
|
-
writable: true,
|
|
47
|
-
value: cp.password,
|
|
48
|
-
})
|
|
49
|
-
this.database = cp.database
|
|
50
|
-
this.host = cp.host
|
|
51
|
-
this.port = cp.port
|
|
52
|
-
|
|
53
|
-
// a hash to hold named queries
|
|
54
|
-
this.namedQueries = {}
|
|
55
|
-
})
|
|
56
|
-
|
|
57
|
-
Client.Query = NativeQuery
|
|
58
|
-
|
|
59
|
-
util.inherits(Client, EventEmitter)
|
|
60
|
-
|
|
61
|
-
Client.prototype._errorAllQueries = function (err) {
|
|
62
|
-
const enqueueError = (query) => {
|
|
63
|
-
process.nextTick(() => {
|
|
64
|
-
query.native = this.native
|
|
65
|
-
query.handleError(err)
|
|
66
|
-
})
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
if (this._hasActiveQuery()) {
|
|
70
|
-
enqueueError(this._activeQuery)
|
|
71
|
-
this._activeQuery = null
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
this._queryQueue.forEach(enqueueError)
|
|
75
|
-
this._queryQueue.length = 0
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
// connect to the backend
|
|
79
|
-
// pass an optional callback to be called once connected
|
|
80
|
-
// or with an error if there was a connection error
|
|
81
|
-
Client.prototype._connect = function (cb) {
|
|
82
|
-
var self = this
|
|
83
|
-
|
|
84
|
-
if (this._connecting) {
|
|
85
|
-
process.nextTick(() => cb(new Error('Client has already been connected. You cannot reuse a client.')))
|
|
86
|
-
return
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
this._connecting = true
|
|
90
|
-
|
|
91
|
-
this.connectionParameters.getLibpqConnectionString(function (err, conString) {
|
|
92
|
-
if (self.connectionParameters.nativeConnectionString) conString = self.connectionParameters.nativeConnectionString
|
|
93
|
-
if (err) return cb(err)
|
|
94
|
-
self.native.connect(conString, function (err) {
|
|
95
|
-
if (err) {
|
|
96
|
-
self.native.end()
|
|
97
|
-
return cb(err)
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
// set internal states to connected
|
|
101
|
-
self._connected = true
|
|
102
|
-
|
|
103
|
-
// handle connection errors from the native layer
|
|
104
|
-
self.native.on('error', function (err) {
|
|
105
|
-
self._queryable = false
|
|
106
|
-
self._errorAllQueries(err)
|
|
107
|
-
self.emit('error', err)
|
|
108
|
-
})
|
|
109
|
-
|
|
110
|
-
self.native.on('notification', function (msg) {
|
|
111
|
-
self.emit('notification', {
|
|
112
|
-
channel: msg.relname,
|
|
113
|
-
payload: msg.extra,
|
|
114
|
-
})
|
|
115
|
-
})
|
|
116
|
-
|
|
117
|
-
// signal we are connected now
|
|
118
|
-
self.emit('connect')
|
|
119
|
-
self._pulseQueryQueue(true)
|
|
120
|
-
|
|
121
|
-
cb()
|
|
122
|
-
})
|
|
123
|
-
})
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
Client.prototype.connect = function (callback) {
|
|
127
|
-
if (callback) {
|
|
128
|
-
this._connect(callback)
|
|
129
|
-
return
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
return new this._Promise((resolve, reject) => {
|
|
133
|
-
this._connect((error) => {
|
|
134
|
-
if (error) {
|
|
135
|
-
reject(error)
|
|
136
|
-
} else {
|
|
137
|
-
resolve()
|
|
138
|
-
}
|
|
139
|
-
})
|
|
140
|
-
})
|
|
141
|
-
}
|
|
142
|
-
|
|
143
|
-
// send a query to the server
|
|
144
|
-
// this method is highly overloaded to take
|
|
145
|
-
// 1) string query, optional array of parameters, optional function callback
|
|
146
|
-
// 2) object query with {
|
|
147
|
-
// string query
|
|
148
|
-
// optional array values,
|
|
149
|
-
// optional function callback instead of as a separate parameter
|
|
150
|
-
// optional string name to name & cache the query plan
|
|
151
|
-
// optional string rowMode = 'array' for an array of results
|
|
152
|
-
// }
|
|
153
|
-
Client.prototype.query = function (config, values, callback) {
|
|
154
|
-
var query
|
|
155
|
-
var result
|
|
156
|
-
var readTimeout
|
|
157
|
-
var readTimeoutTimer
|
|
158
|
-
var queryCallback
|
|
159
|
-
|
|
160
|
-
if (config === null || config === undefined) {
|
|
161
|
-
throw new TypeError('Client was passed a null or undefined query')
|
|
162
|
-
} else if (typeof config.submit === 'function') {
|
|
163
|
-
readTimeout = config.query_timeout || this.connectionParameters.query_timeout
|
|
164
|
-
result = query = config
|
|
165
|
-
// accept query(new Query(...), (err, res) => { }) style
|
|
166
|
-
if (typeof values === 'function') {
|
|
167
|
-
config.callback = values
|
|
168
|
-
}
|
|
169
|
-
} else {
|
|
170
|
-
readTimeout = this.connectionParameters.query_timeout
|
|
171
|
-
query = new NativeQuery(config, values, callback)
|
|
172
|
-
if (!query.callback) {
|
|
173
|
-
let resolveOut, rejectOut
|
|
174
|
-
result = new this._Promise((resolve, reject) => {
|
|
175
|
-
resolveOut = resolve
|
|
176
|
-
rejectOut = reject
|
|
177
|
-
}).catch(err => {
|
|
178
|
-
Error.captureStackTrace(err);
|
|
179
|
-
throw err;
|
|
180
|
-
})
|
|
181
|
-
query.callback = (err, res) => (err ? rejectOut(err) : resolveOut(res))
|
|
182
|
-
}
|
|
183
|
-
}
|
|
184
|
-
|
|
185
|
-
if (readTimeout) {
|
|
186
|
-
queryCallback = query.callback
|
|
187
|
-
|
|
188
|
-
readTimeoutTimer = setTimeout(() => {
|
|
189
|
-
var error = new Error('Query read timeout')
|
|
190
|
-
|
|
191
|
-
process.nextTick(() => {
|
|
192
|
-
query.handleError(error, this.connection)
|
|
193
|
-
})
|
|
194
|
-
|
|
195
|
-
queryCallback(error)
|
|
196
|
-
|
|
197
|
-
// we already returned an error,
|
|
198
|
-
// just do nothing if query completes
|
|
199
|
-
query.callback = () => {}
|
|
200
|
-
|
|
201
|
-
// Remove from queue
|
|
202
|
-
var index = this._queryQueue.indexOf(query)
|
|
203
|
-
if (index > -1) {
|
|
204
|
-
this._queryQueue.splice(index, 1)
|
|
205
|
-
}
|
|
206
|
-
|
|
207
|
-
this._pulseQueryQueue()
|
|
208
|
-
}, readTimeout)
|
|
209
|
-
|
|
210
|
-
query.callback = (err, res) => {
|
|
211
|
-
clearTimeout(readTimeoutTimer)
|
|
212
|
-
queryCallback(err, res)
|
|
213
|
-
}
|
|
214
|
-
}
|
|
215
|
-
|
|
216
|
-
if (!this._queryable) {
|
|
217
|
-
query.native = this.native
|
|
218
|
-
process.nextTick(() => {
|
|
219
|
-
query.handleError(new Error('Client has encountered a connection error and is not queryable'))
|
|
220
|
-
})
|
|
221
|
-
return result
|
|
222
|
-
}
|
|
223
|
-
|
|
224
|
-
if (this._ending) {
|
|
225
|
-
query.native = this.native
|
|
226
|
-
process.nextTick(() => {
|
|
227
|
-
query.handleError(new Error('Client was closed and is not queryable'))
|
|
228
|
-
})
|
|
229
|
-
return result
|
|
230
|
-
}
|
|
231
|
-
|
|
232
|
-
this._queryQueue.push(query)
|
|
233
|
-
this._pulseQueryQueue()
|
|
234
|
-
return result
|
|
235
|
-
}
|
|
236
|
-
|
|
237
|
-
// disconnect from the backend server
|
|
238
|
-
Client.prototype.end = function (cb) {
|
|
239
|
-
var self = this
|
|
240
|
-
|
|
241
|
-
this._ending = true
|
|
242
|
-
|
|
243
|
-
if (!this._connected) {
|
|
244
|
-
this.once('connect', this.end.bind(this, cb))
|
|
245
|
-
}
|
|
246
|
-
var result
|
|
247
|
-
if (!cb) {
|
|
248
|
-
result = new this._Promise(function (resolve, reject) {
|
|
249
|
-
cb = (err) => (err ? reject(err) : resolve())
|
|
250
|
-
})
|
|
251
|
-
}
|
|
252
|
-
this.native.end(function () {
|
|
253
|
-
self._errorAllQueries(new Error('Connection terminated'))
|
|
254
|
-
|
|
255
|
-
process.nextTick(() => {
|
|
256
|
-
self.emit('end')
|
|
257
|
-
if (cb) cb()
|
|
258
|
-
})
|
|
259
|
-
})
|
|
260
|
-
return result
|
|
261
|
-
}
|
|
262
|
-
|
|
263
|
-
Client.prototype._hasActiveQuery = function () {
|
|
264
|
-
return this._activeQuery && this._activeQuery.state !== 'error' && this._activeQuery.state !== 'end'
|
|
265
|
-
}
|
|
266
|
-
|
|
267
|
-
Client.prototype._pulseQueryQueue = function (initialConnection) {
|
|
268
|
-
if (!this._connected) {
|
|
269
|
-
return
|
|
270
|
-
}
|
|
271
|
-
if (this._hasActiveQuery()) {
|
|
272
|
-
return
|
|
273
|
-
}
|
|
274
|
-
var query = this._queryQueue.shift()
|
|
275
|
-
if (!query) {
|
|
276
|
-
if (!initialConnection) {
|
|
277
|
-
this.emit('drain')
|
|
278
|
-
}
|
|
279
|
-
return
|
|
280
|
-
}
|
|
281
|
-
this._activeQuery = query
|
|
282
|
-
query.submit(this)
|
|
283
|
-
var self = this
|
|
284
|
-
query.once('_done', function () {
|
|
285
|
-
self._pulseQueryQueue()
|
|
286
|
-
})
|
|
287
|
-
}
|
|
288
|
-
|
|
289
|
-
// attempt to cancel an in-progress query
|
|
290
|
-
Client.prototype.cancel = function (query) {
|
|
291
|
-
if (this._activeQuery === query) {
|
|
292
|
-
this.native.cancel(function () {})
|
|
293
|
-
} else if (this._queryQueue.indexOf(query) !== -1) {
|
|
294
|
-
this._queryQueue.splice(this._queryQueue.indexOf(query), 1)
|
|
295
|
-
}
|
|
296
|
-
}
|
|
297
|
-
|
|
298
|
-
Client.prototype.ref = function () {}
|
|
299
|
-
Client.prototype.unref = function () {}
|
|
300
|
-
|
|
301
|
-
Client.prototype.setTypeParser = function (oid, format, parseFn) {
|
|
302
|
-
return this._types.setTypeParser(oid, format, parseFn)
|
|
303
|
-
}
|
|
304
|
-
|
|
305
|
-
Client.prototype.getTypeParser = function (oid, format) {
|
|
306
|
-
return this._types.getTypeParser(oid, format)
|
|
307
|
-
}
|
|
@@ -1,165 +0,0 @@
|
|
|
1
|
-
'use strict'
|
|
2
|
-
|
|
3
|
-
var EventEmitter = require('events').EventEmitter
|
|
4
|
-
var util = require('util')
|
|
5
|
-
var utils = require('../utils')
|
|
6
|
-
|
|
7
|
-
var NativeQuery = (module.exports = function (config, values, callback) {
|
|
8
|
-
EventEmitter.call(this)
|
|
9
|
-
config = utils.normalizeQueryConfig(config, values, callback)
|
|
10
|
-
this.text = config.text
|
|
11
|
-
this.values = config.values
|
|
12
|
-
this.name = config.name
|
|
13
|
-
this.callback = config.callback
|
|
14
|
-
this.state = 'new'
|
|
15
|
-
this._arrayMode = config.rowMode === 'array'
|
|
16
|
-
|
|
17
|
-
// if the 'row' event is listened for
|
|
18
|
-
// then emit them as they come in
|
|
19
|
-
// without setting singleRowMode to true
|
|
20
|
-
// this has almost no meaning because libpq
|
|
21
|
-
// reads all rows into memory befor returning any
|
|
22
|
-
this._emitRowEvents = false
|
|
23
|
-
this.on(
|
|
24
|
-
'newListener',
|
|
25
|
-
function (event) {
|
|
26
|
-
if (event === 'row') this._emitRowEvents = true
|
|
27
|
-
}.bind(this)
|
|
28
|
-
)
|
|
29
|
-
})
|
|
30
|
-
|
|
31
|
-
util.inherits(NativeQuery, EventEmitter)
|
|
32
|
-
|
|
33
|
-
var errorFieldMap = {
|
|
34
|
-
/* eslint-disable quote-props */
|
|
35
|
-
sqlState: 'code',
|
|
36
|
-
statementPosition: 'position',
|
|
37
|
-
messagePrimary: 'message',
|
|
38
|
-
context: 'where',
|
|
39
|
-
schemaName: 'schema',
|
|
40
|
-
tableName: 'table',
|
|
41
|
-
columnName: 'column',
|
|
42
|
-
dataTypeName: 'dataType',
|
|
43
|
-
constraintName: 'constraint',
|
|
44
|
-
sourceFile: 'file',
|
|
45
|
-
sourceLine: 'line',
|
|
46
|
-
sourceFunction: 'routine',
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
NativeQuery.prototype.handleError = function (err) {
|
|
50
|
-
// copy pq error fields into the error object
|
|
51
|
-
var fields = this.native.pq.resultErrorFields()
|
|
52
|
-
if (fields) {
|
|
53
|
-
for (var key in fields) {
|
|
54
|
-
var normalizedFieldName = errorFieldMap[key] || key
|
|
55
|
-
err[normalizedFieldName] = fields[key]
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
if (this.callback) {
|
|
59
|
-
this.callback(err)
|
|
60
|
-
} else {
|
|
61
|
-
this.emit('error', err)
|
|
62
|
-
}
|
|
63
|
-
this.state = 'error'
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
NativeQuery.prototype.then = function (onSuccess, onFailure) {
|
|
67
|
-
return this._getPromise().then(onSuccess, onFailure)
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
NativeQuery.prototype.catch = function (callback) {
|
|
71
|
-
return this._getPromise().catch(callback)
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
NativeQuery.prototype._getPromise = function () {
|
|
75
|
-
if (this._promise) return this._promise
|
|
76
|
-
this._promise = new Promise(
|
|
77
|
-
function (resolve, reject) {
|
|
78
|
-
this._once('end', resolve)
|
|
79
|
-
this._once('error', reject)
|
|
80
|
-
}.bind(this)
|
|
81
|
-
)
|
|
82
|
-
return this._promise
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
NativeQuery.prototype.submit = function (client) {
|
|
86
|
-
this.state = 'running'
|
|
87
|
-
var self = this
|
|
88
|
-
this.native = client.native
|
|
89
|
-
client.native.arrayMode = this._arrayMode
|
|
90
|
-
|
|
91
|
-
var after = function (err, rows, results) {
|
|
92
|
-
client.native.arrayMode = false
|
|
93
|
-
setImmediate(function () {
|
|
94
|
-
self.emit('_done')
|
|
95
|
-
})
|
|
96
|
-
|
|
97
|
-
// handle possible query error
|
|
98
|
-
if (err) {
|
|
99
|
-
return self.handleError(err)
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
// emit row events for each row in the result
|
|
103
|
-
if (self._emitRowEvents) {
|
|
104
|
-
if (results.length > 1) {
|
|
105
|
-
rows.forEach((rowOfRows, i) => {
|
|
106
|
-
rowOfRows.forEach((row) => {
|
|
107
|
-
self.emit('row', row, results[i])
|
|
108
|
-
})
|
|
109
|
-
})
|
|
110
|
-
} else {
|
|
111
|
-
rows.forEach(function (row) {
|
|
112
|
-
self.emit('row', row, results)
|
|
113
|
-
})
|
|
114
|
-
}
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
// handle successful result
|
|
118
|
-
self.state = 'end'
|
|
119
|
-
self.emit('end', results)
|
|
120
|
-
if (self.callback) {
|
|
121
|
-
self.callback(null, results)
|
|
122
|
-
}
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
if (process.domain) {
|
|
126
|
-
after = process.domain.bind(after)
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
// named query
|
|
130
|
-
if (this.name) {
|
|
131
|
-
if (this.name.length > 63) {
|
|
132
|
-
/* eslint-disable no-console */
|
|
133
|
-
console.error('Warning! Postgres only supports 63 characters for query names.')
|
|
134
|
-
console.error('You supplied %s (%s)', this.name, this.name.length)
|
|
135
|
-
console.error('This can cause conflicts and silent errors executing queries')
|
|
136
|
-
/* eslint-enable no-console */
|
|
137
|
-
}
|
|
138
|
-
var values = (this.values || []).map(utils.prepareValue)
|
|
139
|
-
|
|
140
|
-
// check if the client has already executed this named query
|
|
141
|
-
// if so...just execute it again - skip the planning phase
|
|
142
|
-
if (client.namedQueries[this.name]) {
|
|
143
|
-
if (this.text && client.namedQueries[this.name] !== this.text) {
|
|
144
|
-
const err = new Error(`Prepared statements must be unique - '${this.name}' was used for a different statement`)
|
|
145
|
-
return after(err)
|
|
146
|
-
}
|
|
147
|
-
return client.native.execute(this.name, values, after)
|
|
148
|
-
}
|
|
149
|
-
// plan the named query the first time, then execute it
|
|
150
|
-
return client.native.prepare(this.name, this.text, values.length, function (err) {
|
|
151
|
-
if (err) return after(err)
|
|
152
|
-
client.namedQueries[self.name] = self.text
|
|
153
|
-
return self.native.execute(self.name, values, after)
|
|
154
|
-
})
|
|
155
|
-
} else if (this.values) {
|
|
156
|
-
if (!Array.isArray(this.values)) {
|
|
157
|
-
const err = new Error('Query values must be an array')
|
|
158
|
-
return after(err)
|
|
159
|
-
}
|
|
160
|
-
var vals = this.values.map(utils.prepareValue)
|
|
161
|
-
client.native.query(this.text, vals, after)
|
|
162
|
-
} else {
|
|
163
|
-
client.native.query(this.text, after)
|
|
164
|
-
}
|
|
165
|
-
}
|