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,167 +0,0 @@
|
|
|
1
|
-
'use strict'
|
|
2
|
-
|
|
3
|
-
var dns = require('dns')
|
|
4
|
-
|
|
5
|
-
var defaults = require('./defaults')
|
|
6
|
-
|
|
7
|
-
var parse = require('pg-connection-string').parse // parses a connection string
|
|
8
|
-
|
|
9
|
-
var val = function (key, config, envVar) {
|
|
10
|
-
if (envVar === undefined) {
|
|
11
|
-
envVar = process.env['PG' + key.toUpperCase()]
|
|
12
|
-
} else if (envVar === false) {
|
|
13
|
-
// do nothing ... use false
|
|
14
|
-
} else {
|
|
15
|
-
envVar = process.env[envVar]
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
return config[key] || envVar || defaults[key]
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
var readSSLConfigFromEnvironment = function () {
|
|
22
|
-
switch (process.env.PGSSLMODE) {
|
|
23
|
-
case 'disable':
|
|
24
|
-
return false
|
|
25
|
-
case 'prefer':
|
|
26
|
-
case 'require':
|
|
27
|
-
case 'verify-ca':
|
|
28
|
-
case 'verify-full':
|
|
29
|
-
return true
|
|
30
|
-
case 'no-verify':
|
|
31
|
-
return { rejectUnauthorized: false }
|
|
32
|
-
}
|
|
33
|
-
return defaults.ssl
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
// Convert arg to a string, surround in single quotes, and escape single quotes and backslashes
|
|
37
|
-
var quoteParamValue = function (value) {
|
|
38
|
-
return "'" + ('' + value).replace(/\\/g, '\\\\').replace(/'/g, "\\'") + "'"
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
var add = function (params, config, paramName) {
|
|
42
|
-
var value = config[paramName]
|
|
43
|
-
if (value !== undefined && value !== null) {
|
|
44
|
-
params.push(paramName + '=' + quoteParamValue(value))
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
class ConnectionParameters {
|
|
49
|
-
constructor(config) {
|
|
50
|
-
// if a string is passed, it is a raw connection string so we parse it into a config
|
|
51
|
-
config = typeof config === 'string' ? parse(config) : config || {}
|
|
52
|
-
|
|
53
|
-
// if the config has a connectionString defined, parse IT into the config we use
|
|
54
|
-
// this will override other default values with what is stored in connectionString
|
|
55
|
-
if (config.connectionString) {
|
|
56
|
-
config = Object.assign({}, config, parse(config.connectionString))
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
this.user = val('user', config)
|
|
60
|
-
this.database = val('database', config)
|
|
61
|
-
|
|
62
|
-
if (this.database === undefined) {
|
|
63
|
-
this.database = this.user
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
this.port = parseInt(val('port', config), 10)
|
|
67
|
-
this.host = val('host', config)
|
|
68
|
-
|
|
69
|
-
// "hiding" the password so it doesn't show up in stack traces
|
|
70
|
-
// or if the client is console.logged
|
|
71
|
-
Object.defineProperty(this, 'password', {
|
|
72
|
-
configurable: true,
|
|
73
|
-
enumerable: false,
|
|
74
|
-
writable: true,
|
|
75
|
-
value: val('password', config),
|
|
76
|
-
})
|
|
77
|
-
|
|
78
|
-
this.binary = val('binary', config)
|
|
79
|
-
this.options = val('options', config)
|
|
80
|
-
|
|
81
|
-
this.ssl = typeof config.ssl === 'undefined' ? readSSLConfigFromEnvironment() : config.ssl
|
|
82
|
-
|
|
83
|
-
if (typeof this.ssl === 'string') {
|
|
84
|
-
if (this.ssl === 'true') {
|
|
85
|
-
this.ssl = true
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
// support passing in ssl=no-verify via connection string
|
|
89
|
-
if (this.ssl === 'no-verify') {
|
|
90
|
-
this.ssl = { rejectUnauthorized: false }
|
|
91
|
-
}
|
|
92
|
-
if (this.ssl && this.ssl.key) {
|
|
93
|
-
Object.defineProperty(this.ssl, 'key', {
|
|
94
|
-
enumerable: false,
|
|
95
|
-
})
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
this.client_encoding = val('client_encoding', config)
|
|
99
|
-
this.replication = val('replication', config)
|
|
100
|
-
// a domain socket begins with '/'
|
|
101
|
-
this.isDomainSocket = !(this.host || '').indexOf('/')
|
|
102
|
-
|
|
103
|
-
this.application_name = val('application_name', config, 'PGAPPNAME')
|
|
104
|
-
this.fallback_application_name = val('fallback_application_name', config, false)
|
|
105
|
-
this.statement_timeout = val('statement_timeout', config, false)
|
|
106
|
-
this.lock_timeout = val('lock_timeout', config, false)
|
|
107
|
-
this.idle_in_transaction_session_timeout = val('idle_in_transaction_session_timeout', config, false)
|
|
108
|
-
this.query_timeout = val('query_timeout', config, false)
|
|
109
|
-
|
|
110
|
-
if (config.connectionTimeoutMillis === undefined) {
|
|
111
|
-
this.connect_timeout = process.env.PGCONNECT_TIMEOUT || 0
|
|
112
|
-
} else {
|
|
113
|
-
this.connect_timeout = Math.floor(config.connectionTimeoutMillis / 1000)
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
if (config.keepAlive === false) {
|
|
117
|
-
this.keepalives = 0
|
|
118
|
-
} else if (config.keepAlive === true) {
|
|
119
|
-
this.keepalives = 1
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
if (typeof config.keepAliveInitialDelayMillis === 'number') {
|
|
123
|
-
this.keepalives_idle = Math.floor(config.keepAliveInitialDelayMillis / 1000)
|
|
124
|
-
}
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
getLibpqConnectionString(cb) {
|
|
128
|
-
var params = []
|
|
129
|
-
add(params, this, 'user')
|
|
130
|
-
add(params, this, 'password')
|
|
131
|
-
add(params, this, 'port')
|
|
132
|
-
add(params, this, 'application_name')
|
|
133
|
-
add(params, this, 'fallback_application_name')
|
|
134
|
-
add(params, this, 'connect_timeout')
|
|
135
|
-
add(params, this, 'options')
|
|
136
|
-
|
|
137
|
-
var ssl = typeof this.ssl === 'object' ? this.ssl : this.ssl ? { sslmode: this.ssl } : {}
|
|
138
|
-
add(params, ssl, 'sslmode')
|
|
139
|
-
add(params, ssl, 'sslca')
|
|
140
|
-
add(params, ssl, 'sslkey')
|
|
141
|
-
add(params, ssl, 'sslcert')
|
|
142
|
-
add(params, ssl, 'sslrootcert')
|
|
143
|
-
|
|
144
|
-
if (this.database) {
|
|
145
|
-
params.push('dbname=' + quoteParamValue(this.database))
|
|
146
|
-
}
|
|
147
|
-
if (this.replication) {
|
|
148
|
-
params.push('replication=' + quoteParamValue(this.replication))
|
|
149
|
-
}
|
|
150
|
-
if (this.host) {
|
|
151
|
-
params.push('host=' + quoteParamValue(this.host))
|
|
152
|
-
}
|
|
153
|
-
if (this.isDomainSocket) {
|
|
154
|
-
return cb(null, params.join(' '))
|
|
155
|
-
}
|
|
156
|
-
if (this.client_encoding) {
|
|
157
|
-
params.push('client_encoding=' + quoteParamValue(this.client_encoding))
|
|
158
|
-
}
|
|
159
|
-
dns.lookup(this.host, function (err, address) {
|
|
160
|
-
if (err) return cb(err, null)
|
|
161
|
-
params.push('hostaddr=' + quoteParamValue(address))
|
|
162
|
-
return cb(null, params.join(' '))
|
|
163
|
-
})
|
|
164
|
-
}
|
|
165
|
-
}
|
|
166
|
-
|
|
167
|
-
module.exports = ConnectionParameters
|
|
@@ -1,223 +0,0 @@
|
|
|
1
|
-
'use strict'
|
|
2
|
-
|
|
3
|
-
var net = require('net')
|
|
4
|
-
var EventEmitter = require('events').EventEmitter
|
|
5
|
-
|
|
6
|
-
const { parse, serialize } = require('pg-protocol')
|
|
7
|
-
const { getStream, getSecureStream } = require('./stream')
|
|
8
|
-
|
|
9
|
-
const flushBuffer = serialize.flush()
|
|
10
|
-
const syncBuffer = serialize.sync()
|
|
11
|
-
const endBuffer = serialize.end()
|
|
12
|
-
|
|
13
|
-
// TODO(bmc) support binary mode at some point
|
|
14
|
-
class Connection extends EventEmitter {
|
|
15
|
-
constructor(config) {
|
|
16
|
-
super()
|
|
17
|
-
config = config || {}
|
|
18
|
-
|
|
19
|
-
this.stream = config.stream || getStream(config.ssl)
|
|
20
|
-
if (typeof this.stream === 'function') {
|
|
21
|
-
this.stream = this.stream(config)
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
this._keepAlive = config.keepAlive
|
|
25
|
-
this._keepAliveInitialDelayMillis = config.keepAliveInitialDelayMillis
|
|
26
|
-
this.lastBuffer = false
|
|
27
|
-
this.parsedStatements = {}
|
|
28
|
-
this.ssl = config.ssl || false
|
|
29
|
-
this._ending = false
|
|
30
|
-
this._emitMessage = false
|
|
31
|
-
var self = this
|
|
32
|
-
this.on('newListener', function (eventName) {
|
|
33
|
-
if (eventName === 'message') {
|
|
34
|
-
self._emitMessage = true
|
|
35
|
-
}
|
|
36
|
-
})
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
connect(port, host) {
|
|
40
|
-
var self = this
|
|
41
|
-
|
|
42
|
-
this._connecting = true
|
|
43
|
-
this.stream.setNoDelay(true)
|
|
44
|
-
this.stream.connect(port, host)
|
|
45
|
-
|
|
46
|
-
this.stream.once('connect', function () {
|
|
47
|
-
if (self._keepAlive) {
|
|
48
|
-
self.stream.setKeepAlive(true, self._keepAliveInitialDelayMillis)
|
|
49
|
-
}
|
|
50
|
-
self.emit('connect')
|
|
51
|
-
})
|
|
52
|
-
|
|
53
|
-
const reportStreamError = function (error) {
|
|
54
|
-
// errors about disconnections should be ignored during disconnect
|
|
55
|
-
if (self._ending && (error.code === 'ECONNRESET' || error.code === 'EPIPE')) {
|
|
56
|
-
return
|
|
57
|
-
}
|
|
58
|
-
self.emit('error', error)
|
|
59
|
-
}
|
|
60
|
-
this.stream.on('error', reportStreamError)
|
|
61
|
-
|
|
62
|
-
this.stream.on('close', function () {
|
|
63
|
-
self.emit('end')
|
|
64
|
-
})
|
|
65
|
-
|
|
66
|
-
if (!this.ssl) {
|
|
67
|
-
return this.attachListeners(this.stream)
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
this.stream.once('data', function (buffer) {
|
|
71
|
-
var responseCode = buffer.toString('utf8')
|
|
72
|
-
switch (responseCode) {
|
|
73
|
-
case 'S': // Server supports SSL connections, continue with a secure connection
|
|
74
|
-
break
|
|
75
|
-
case 'N': // Server does not support SSL connections
|
|
76
|
-
self.stream.end()
|
|
77
|
-
return self.emit('error', new Error('The server does not support SSL connections'))
|
|
78
|
-
default:
|
|
79
|
-
// Any other response byte, including 'E' (ErrorResponse) indicating a server error
|
|
80
|
-
self.stream.end()
|
|
81
|
-
return self.emit('error', new Error('There was an error establishing an SSL connection'))
|
|
82
|
-
}
|
|
83
|
-
const options = {
|
|
84
|
-
socket: self.stream,
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
if (self.ssl !== true) {
|
|
88
|
-
Object.assign(options, self.ssl)
|
|
89
|
-
|
|
90
|
-
if ('key' in self.ssl) {
|
|
91
|
-
options.key = self.ssl.key
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
var net = require('net')
|
|
96
|
-
if (net.isIP && net.isIP(host) === 0) {
|
|
97
|
-
options.servername = host
|
|
98
|
-
}
|
|
99
|
-
try {
|
|
100
|
-
self.stream = getSecureStream(options)
|
|
101
|
-
} catch (err) {
|
|
102
|
-
return self.emit('error', err)
|
|
103
|
-
}
|
|
104
|
-
self.attachListeners(self.stream)
|
|
105
|
-
self.stream.on('error', reportStreamError)
|
|
106
|
-
|
|
107
|
-
self.emit('sslconnect')
|
|
108
|
-
})
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
attachListeners(stream) {
|
|
112
|
-
parse(stream, (msg) => {
|
|
113
|
-
var eventName = msg.name === 'error' ? 'errorMessage' : msg.name
|
|
114
|
-
if (this._emitMessage) {
|
|
115
|
-
this.emit('message', msg)
|
|
116
|
-
}
|
|
117
|
-
this.emit(eventName, msg)
|
|
118
|
-
})
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
requestSsl() {
|
|
122
|
-
this.stream.write(serialize.requestSsl())
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
startup(config) {
|
|
126
|
-
this.stream.write(serialize.startup(config))
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
cancel(processID, secretKey) {
|
|
130
|
-
this._send(serialize.cancel(processID, secretKey))
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
password(password) {
|
|
134
|
-
this._send(serialize.password(password))
|
|
135
|
-
}
|
|
136
|
-
|
|
137
|
-
sendSASLInitialResponseMessage(mechanism, initialResponse) {
|
|
138
|
-
this._send(serialize.sendSASLInitialResponseMessage(mechanism, initialResponse))
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
sendSCRAMClientFinalMessage(additionalData) {
|
|
142
|
-
this._send(serialize.sendSCRAMClientFinalMessage(additionalData))
|
|
143
|
-
}
|
|
144
|
-
|
|
145
|
-
_send(buffer) {
|
|
146
|
-
if (!this.stream.writable) {
|
|
147
|
-
return false
|
|
148
|
-
}
|
|
149
|
-
return this.stream.write(buffer)
|
|
150
|
-
}
|
|
151
|
-
|
|
152
|
-
query(text) {
|
|
153
|
-
this._send(serialize.query(text))
|
|
154
|
-
}
|
|
155
|
-
|
|
156
|
-
// send parse message
|
|
157
|
-
parse(query) {
|
|
158
|
-
this._send(serialize.parse(query))
|
|
159
|
-
}
|
|
160
|
-
|
|
161
|
-
// send bind message
|
|
162
|
-
bind(config) {
|
|
163
|
-
this._send(serialize.bind(config))
|
|
164
|
-
}
|
|
165
|
-
|
|
166
|
-
// send execute message
|
|
167
|
-
execute(config) {
|
|
168
|
-
this._send(serialize.execute(config))
|
|
169
|
-
}
|
|
170
|
-
|
|
171
|
-
flush() {
|
|
172
|
-
if (this.stream.writable) {
|
|
173
|
-
this.stream.write(flushBuffer)
|
|
174
|
-
}
|
|
175
|
-
}
|
|
176
|
-
|
|
177
|
-
sync() {
|
|
178
|
-
this._ending = true
|
|
179
|
-
this._send(syncBuffer)
|
|
180
|
-
}
|
|
181
|
-
|
|
182
|
-
ref() {
|
|
183
|
-
this.stream.ref()
|
|
184
|
-
}
|
|
185
|
-
|
|
186
|
-
unref() {
|
|
187
|
-
this.stream.unref()
|
|
188
|
-
}
|
|
189
|
-
|
|
190
|
-
end() {
|
|
191
|
-
// 0x58 = 'X'
|
|
192
|
-
this._ending = true
|
|
193
|
-
if (!this._connecting || !this.stream.writable) {
|
|
194
|
-
this.stream.end()
|
|
195
|
-
return
|
|
196
|
-
}
|
|
197
|
-
return this.stream.write(endBuffer, () => {
|
|
198
|
-
this.stream.end()
|
|
199
|
-
})
|
|
200
|
-
}
|
|
201
|
-
|
|
202
|
-
close(msg) {
|
|
203
|
-
this._send(serialize.close(msg))
|
|
204
|
-
}
|
|
205
|
-
|
|
206
|
-
describe(msg) {
|
|
207
|
-
this._send(serialize.describe(msg))
|
|
208
|
-
}
|
|
209
|
-
|
|
210
|
-
sendCopyFromChunk(chunk) {
|
|
211
|
-
this._send(serialize.copyData(chunk))
|
|
212
|
-
}
|
|
213
|
-
|
|
214
|
-
endCopyFrom() {
|
|
215
|
-
this._send(serialize.copyDone())
|
|
216
|
-
}
|
|
217
|
-
|
|
218
|
-
sendCopyFail(msg) {
|
|
219
|
-
this._send(serialize.copyFail(msg))
|
|
220
|
-
}
|
|
221
|
-
}
|
|
222
|
-
|
|
223
|
-
module.exports = Connection
|
|
@@ -1,186 +0,0 @@
|
|
|
1
|
-
'use strict'
|
|
2
|
-
const crypto = require('./utils')
|
|
3
|
-
|
|
4
|
-
function startSession(mechanisms) {
|
|
5
|
-
if (mechanisms.indexOf('SCRAM-SHA-256') === -1) {
|
|
6
|
-
throw new Error('SASL: Only mechanism SCRAM-SHA-256 is currently supported')
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
const clientNonce = crypto.randomBytes(18).toString('base64')
|
|
10
|
-
|
|
11
|
-
return {
|
|
12
|
-
mechanism: 'SCRAM-SHA-256',
|
|
13
|
-
clientNonce,
|
|
14
|
-
response: 'n,,n=*,r=' + clientNonce,
|
|
15
|
-
message: 'SASLInitialResponse',
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
async function continueSession(session, password, serverData) {
|
|
20
|
-
if (session.message !== 'SASLInitialResponse') {
|
|
21
|
-
throw new Error('SASL: Last message was not SASLInitialResponse')
|
|
22
|
-
}
|
|
23
|
-
if (typeof password !== 'string') {
|
|
24
|
-
throw new Error('SASL: SCRAM-SERVER-FIRST-MESSAGE: client password must be a string')
|
|
25
|
-
}
|
|
26
|
-
if (password === '') {
|
|
27
|
-
throw new Error('SASL: SCRAM-SERVER-FIRST-MESSAGE: client password must be a non-empty string')
|
|
28
|
-
}
|
|
29
|
-
if (typeof serverData !== 'string') {
|
|
30
|
-
throw new Error('SASL: SCRAM-SERVER-FIRST-MESSAGE: serverData must be a string')
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
const sv = parseServerFirstMessage(serverData)
|
|
34
|
-
|
|
35
|
-
if (!sv.nonce.startsWith(session.clientNonce)) {
|
|
36
|
-
throw new Error('SASL: SCRAM-SERVER-FIRST-MESSAGE: server nonce does not start with client nonce')
|
|
37
|
-
} else if (sv.nonce.length === session.clientNonce.length) {
|
|
38
|
-
throw new Error('SASL: SCRAM-SERVER-FIRST-MESSAGE: server nonce is too short')
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
var clientFirstMessageBare = 'n=*,r=' + session.clientNonce
|
|
42
|
-
var serverFirstMessage = 'r=' + sv.nonce + ',s=' + sv.salt + ',i=' + sv.iteration
|
|
43
|
-
var clientFinalMessageWithoutProof = 'c=biws,r=' + sv.nonce
|
|
44
|
-
var authMessage = clientFirstMessageBare + ',' + serverFirstMessage + ',' + clientFinalMessageWithoutProof
|
|
45
|
-
|
|
46
|
-
var saltBytes = Buffer.from(sv.salt, 'base64')
|
|
47
|
-
var saltedPassword = await crypto.deriveKey(password, saltBytes, sv.iteration)
|
|
48
|
-
var clientKey = await crypto.hmacSha256(saltedPassword, 'Client Key')
|
|
49
|
-
var storedKey = await crypto.sha256(clientKey)
|
|
50
|
-
var clientSignature = await crypto.hmacSha256(storedKey, authMessage)
|
|
51
|
-
var clientProof = xorBuffers(Buffer.from(clientKey), Buffer.from(clientSignature)).toString('base64')
|
|
52
|
-
var serverKey = await crypto.hmacSha256(saltedPassword, 'Server Key')
|
|
53
|
-
var serverSignatureBytes = await crypto.hmacSha256(serverKey, authMessage)
|
|
54
|
-
|
|
55
|
-
session.message = 'SASLResponse'
|
|
56
|
-
session.serverSignature = Buffer.from(serverSignatureBytes).toString('base64')
|
|
57
|
-
session.response = clientFinalMessageWithoutProof + ',p=' + clientProof
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
function finalizeSession(session, serverData) {
|
|
61
|
-
if (session.message !== 'SASLResponse') {
|
|
62
|
-
throw new Error('SASL: Last message was not SASLResponse')
|
|
63
|
-
}
|
|
64
|
-
if (typeof serverData !== 'string') {
|
|
65
|
-
throw new Error('SASL: SCRAM-SERVER-FINAL-MESSAGE: serverData must be a string')
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
const { serverSignature } = parseServerFinalMessage(serverData)
|
|
69
|
-
|
|
70
|
-
if (serverSignature !== session.serverSignature) {
|
|
71
|
-
throw new Error('SASL: SCRAM-SERVER-FINAL-MESSAGE: server signature does not match')
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
/**
|
|
76
|
-
* printable = %x21-2B / %x2D-7E
|
|
77
|
-
* ;; Printable ASCII except ",".
|
|
78
|
-
* ;; Note that any "printable" is also
|
|
79
|
-
* ;; a valid "value".
|
|
80
|
-
*/
|
|
81
|
-
function isPrintableChars(text) {
|
|
82
|
-
if (typeof text !== 'string') {
|
|
83
|
-
throw new TypeError('SASL: text must be a string')
|
|
84
|
-
}
|
|
85
|
-
return text
|
|
86
|
-
.split('')
|
|
87
|
-
.map((_, i) => text.charCodeAt(i))
|
|
88
|
-
.every((c) => (c >= 0x21 && c <= 0x2b) || (c >= 0x2d && c <= 0x7e))
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
/**
|
|
92
|
-
* base64-char = ALPHA / DIGIT / "/" / "+"
|
|
93
|
-
*
|
|
94
|
-
* base64-4 = 4base64-char
|
|
95
|
-
*
|
|
96
|
-
* base64-3 = 3base64-char "="
|
|
97
|
-
*
|
|
98
|
-
* base64-2 = 2base64-char "=="
|
|
99
|
-
*
|
|
100
|
-
* base64 = *base64-4 [base64-3 / base64-2]
|
|
101
|
-
*/
|
|
102
|
-
function isBase64(text) {
|
|
103
|
-
return /^(?:[a-zA-Z0-9+/]{4})*(?:[a-zA-Z0-9+/]{2}==|[a-zA-Z0-9+/]{3}=)?$/.test(text)
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
function parseAttributePairs(text) {
|
|
107
|
-
if (typeof text !== 'string') {
|
|
108
|
-
throw new TypeError('SASL: attribute pairs text must be a string')
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
return new Map(
|
|
112
|
-
text.split(',').map((attrValue) => {
|
|
113
|
-
if (!/^.=/.test(attrValue)) {
|
|
114
|
-
throw new Error('SASL: Invalid attribute pair entry')
|
|
115
|
-
}
|
|
116
|
-
const name = attrValue[0]
|
|
117
|
-
const value = attrValue.substring(2)
|
|
118
|
-
return [name, value]
|
|
119
|
-
})
|
|
120
|
-
)
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
function parseServerFirstMessage(data) {
|
|
124
|
-
const attrPairs = parseAttributePairs(data)
|
|
125
|
-
|
|
126
|
-
const nonce = attrPairs.get('r')
|
|
127
|
-
if (!nonce) {
|
|
128
|
-
throw new Error('SASL: SCRAM-SERVER-FIRST-MESSAGE: nonce missing')
|
|
129
|
-
} else if (!isPrintableChars(nonce)) {
|
|
130
|
-
throw new Error('SASL: SCRAM-SERVER-FIRST-MESSAGE: nonce must only contain printable characters')
|
|
131
|
-
}
|
|
132
|
-
const salt = attrPairs.get('s')
|
|
133
|
-
if (!salt) {
|
|
134
|
-
throw new Error('SASL: SCRAM-SERVER-FIRST-MESSAGE: salt missing')
|
|
135
|
-
} else if (!isBase64(salt)) {
|
|
136
|
-
throw new Error('SASL: SCRAM-SERVER-FIRST-MESSAGE: salt must be base64')
|
|
137
|
-
}
|
|
138
|
-
const iterationText = attrPairs.get('i')
|
|
139
|
-
if (!iterationText) {
|
|
140
|
-
throw new Error('SASL: SCRAM-SERVER-FIRST-MESSAGE: iteration missing')
|
|
141
|
-
} else if (!/^[1-9][0-9]*$/.test(iterationText)) {
|
|
142
|
-
throw new Error('SASL: SCRAM-SERVER-FIRST-MESSAGE: invalid iteration count')
|
|
143
|
-
}
|
|
144
|
-
const iteration = parseInt(iterationText, 10)
|
|
145
|
-
|
|
146
|
-
return {
|
|
147
|
-
nonce,
|
|
148
|
-
salt,
|
|
149
|
-
iteration,
|
|
150
|
-
}
|
|
151
|
-
}
|
|
152
|
-
|
|
153
|
-
function parseServerFinalMessage(serverData) {
|
|
154
|
-
const attrPairs = parseAttributePairs(serverData)
|
|
155
|
-
const serverSignature = attrPairs.get('v')
|
|
156
|
-
if (!serverSignature) {
|
|
157
|
-
throw new Error('SASL: SCRAM-SERVER-FINAL-MESSAGE: server signature is missing')
|
|
158
|
-
} else if (!isBase64(serverSignature)) {
|
|
159
|
-
throw new Error('SASL: SCRAM-SERVER-FINAL-MESSAGE: server signature must be base64')
|
|
160
|
-
}
|
|
161
|
-
return {
|
|
162
|
-
serverSignature,
|
|
163
|
-
}
|
|
164
|
-
}
|
|
165
|
-
|
|
166
|
-
function xorBuffers(a, b) {
|
|
167
|
-
if (!Buffer.isBuffer(a)) {
|
|
168
|
-
throw new TypeError('first argument must be a Buffer')
|
|
169
|
-
}
|
|
170
|
-
if (!Buffer.isBuffer(b)) {
|
|
171
|
-
throw new TypeError('second argument must be a Buffer')
|
|
172
|
-
}
|
|
173
|
-
if (a.length !== b.length) {
|
|
174
|
-
throw new Error('Buffer lengths must match')
|
|
175
|
-
}
|
|
176
|
-
if (a.length === 0) {
|
|
177
|
-
throw new Error('Buffers cannot be empty')
|
|
178
|
-
}
|
|
179
|
-
return Buffer.from(a.map((_, i) => a[i] ^ b[i]))
|
|
180
|
-
}
|
|
181
|
-
|
|
182
|
-
module.exports = {
|
|
183
|
-
startSession,
|
|
184
|
-
continueSession,
|
|
185
|
-
finalizeSession,
|
|
186
|
-
}
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
'use strict'
|
|
2
|
-
// This file contains crypto utility functions for versions of Node.js < 15.0.0,
|
|
3
|
-
// which does not support the WebCrypto.subtle API.
|
|
4
|
-
|
|
5
|
-
const nodeCrypto = require('crypto')
|
|
6
|
-
|
|
7
|
-
function md5(string) {
|
|
8
|
-
return nodeCrypto.createHash('md5').update(string, 'utf-8').digest('hex')
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
// See AuthenticationMD5Password at https://www.postgresql.org/docs/current/static/protocol-flow.html
|
|
12
|
-
function postgresMd5PasswordHash(user, password, salt) {
|
|
13
|
-
var inner = md5(password + user)
|
|
14
|
-
var outer = md5(Buffer.concat([Buffer.from(inner), salt]))
|
|
15
|
-
return 'md5' + outer
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
function sha256(text) {
|
|
19
|
-
return nodeCrypto.createHash('sha256').update(text).digest()
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
function hmacSha256(key, msg) {
|
|
23
|
-
return nodeCrypto.createHmac('sha256', key).update(msg).digest()
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
async function deriveKey(password, salt, iterations) {
|
|
27
|
-
return nodeCrypto.pbkdf2Sync(password, salt, iterations, 32, 'sha256')
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
module.exports = {
|
|
31
|
-
postgresMd5PasswordHash,
|
|
32
|
-
randomBytes: nodeCrypto.randomBytes,
|
|
33
|
-
deriveKey,
|
|
34
|
-
sha256,
|
|
35
|
-
hmacSha256,
|
|
36
|
-
md5,
|
|
37
|
-
}
|
|
@@ -1,83 +0,0 @@
|
|
|
1
|
-
const nodeCrypto = require('crypto')
|
|
2
|
-
|
|
3
|
-
module.exports = {
|
|
4
|
-
postgresMd5PasswordHash,
|
|
5
|
-
randomBytes,
|
|
6
|
-
deriveKey,
|
|
7
|
-
sha256,
|
|
8
|
-
hmacSha256,
|
|
9
|
-
md5,
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
/**
|
|
13
|
-
* The Web Crypto API - grabbed from the Node.js library or the global
|
|
14
|
-
* @type Crypto
|
|
15
|
-
*/
|
|
16
|
-
const webCrypto = nodeCrypto.webcrypto || globalThis.crypto
|
|
17
|
-
/**
|
|
18
|
-
* The SubtleCrypto API for low level crypto operations.
|
|
19
|
-
* @type SubtleCrypto
|
|
20
|
-
*/
|
|
21
|
-
const subtleCrypto = webCrypto.subtle
|
|
22
|
-
const textEncoder = new TextEncoder()
|
|
23
|
-
|
|
24
|
-
/**
|
|
25
|
-
*
|
|
26
|
-
* @param {*} length
|
|
27
|
-
* @returns
|
|
28
|
-
*/
|
|
29
|
-
function randomBytes(length) {
|
|
30
|
-
return webCrypto.getRandomValues(Buffer.alloc(length))
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
async function md5(string) {
|
|
34
|
-
try {
|
|
35
|
-
return nodeCrypto.createHash('md5').update(string, 'utf-8').digest('hex')
|
|
36
|
-
} catch (e) {
|
|
37
|
-
// `createHash()` failed so we are probably not in Node.js, use the WebCrypto API instead.
|
|
38
|
-
// Note that the MD5 algorithm on WebCrypto is not available in Node.js.
|
|
39
|
-
// This is why we cannot just use WebCrypto in all environments.
|
|
40
|
-
const data = typeof string === 'string' ? textEncoder.encode(string) : string
|
|
41
|
-
const hash = await subtleCrypto.digest('MD5', data)
|
|
42
|
-
return Array.from(new Uint8Array(hash))
|
|
43
|
-
.map((b) => b.toString(16).padStart(2, '0'))
|
|
44
|
-
.join('')
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
// See AuthenticationMD5Password at https://www.postgresql.org/docs/current/static/protocol-flow.html
|
|
49
|
-
async function postgresMd5PasswordHash(user, password, salt) {
|
|
50
|
-
var inner = await md5(password + user)
|
|
51
|
-
var outer = await md5(Buffer.concat([Buffer.from(inner), salt]))
|
|
52
|
-
return 'md5' + outer
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
/**
|
|
56
|
-
* Create a SHA-256 digest of the given data
|
|
57
|
-
* @param {Buffer} data
|
|
58
|
-
*/
|
|
59
|
-
async function sha256(text) {
|
|
60
|
-
return await subtleCrypto.digest('SHA-256', text)
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
/**
|
|
64
|
-
* Sign the message with the given key
|
|
65
|
-
* @param {ArrayBuffer} keyBuffer
|
|
66
|
-
* @param {string} msg
|
|
67
|
-
*/
|
|
68
|
-
async function hmacSha256(keyBuffer, msg) {
|
|
69
|
-
const key = await subtleCrypto.importKey('raw', keyBuffer, { name: 'HMAC', hash: 'SHA-256' }, false, ['sign'])
|
|
70
|
-
return await subtleCrypto.sign('HMAC', key, textEncoder.encode(msg))
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
/**
|
|
74
|
-
* Derive a key from the password and salt
|
|
75
|
-
* @param {string} password
|
|
76
|
-
* @param {Uint8Array} salt
|
|
77
|
-
* @param {number} iterations
|
|
78
|
-
*/
|
|
79
|
-
async function deriveKey(password, salt, iterations) {
|
|
80
|
-
const key = await subtleCrypto.importKey('raw', textEncoder.encode(password), 'PBKDF2', false, ['deriveBits'])
|
|
81
|
-
const params = { name: 'PBKDF2', hash: 'SHA-256', salt: salt, iterations: iterations }
|
|
82
|
-
return await subtleCrypto.deriveBits(params, key, 32 * 8, ['deriveBits'])
|
|
83
|
-
}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
'use strict'
|
|
2
|
-
|
|
3
|
-
const useLegacyCrypto = parseInt(process.versions && process.versions.node && process.versions.node.split('.')[0]) < 15
|
|
4
|
-
if (useLegacyCrypto) {
|
|
5
|
-
// We are on an old version of Node.js that requires legacy crypto utilities.
|
|
6
|
-
module.exports = require('./utils-legacy')
|
|
7
|
-
} else {
|
|
8
|
-
module.exports = require('./utils-webcrypto');
|
|
9
|
-
}
|