decocms 2.178.0 → 2.178.2
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-DOAxiEBN.js → AlertCircle-12chRuly.js} +1 -1
- package/dist/client/assets/{AlignLeft-CRMPlioa.js → AlignLeft-_LT9deOt.js} +1 -1
- package/dist/client/assets/{ArrowDown-xJyK-tRR.js → ArrowDown-7rbX3zqZ.js} +1 -1
- package/dist/client/assets/{ArrowLeft-B-tpcvF0.js → ArrowLeft-erI8s3G2.js} +1 -1
- package/dist/client/assets/{ArrowUp-BO7WH9Uq.js → ArrowUp-DoIG5eQh.js} +1 -1
- package/dist/client/assets/{Building02-D30T2TCD.js → Building02-Dr7IyBdv.js} +1 -1
- package/dist/client/assets/{Check-BTP9VTUM.js → Check-DW8AVFkq.js} +1 -1
- package/dist/client/assets/{CheckCircle-DoZ7ERyW.js → CheckCircle-hBpanOsI.js} +1 -1
- package/dist/client/assets/{CheckSquare-Dbh9CJyx.js → CheckSquare-Cr3IzSXp.js} +1 -1
- package/dist/client/assets/{CheckVerified02-CyloHbYs.js → CheckVerified02-r17ymUCs.js} +1 -1
- package/dist/client/assets/{ChevronDown-CLapIRmf.js → ChevronDown-BIRGQoZ5.js} +1 -1
- package/dist/client/assets/{ChevronLeft-CMUbV0KP.js → ChevronLeft-D-e7F7Gj.js} +1 -1
- package/dist/client/assets/{ChevronRight-DWZgTrde.js → ChevronRight-DsjLlugM.js} +1 -1
- package/dist/client/assets/{ChevronUp-DGOtRvEF.js → ChevronUp-Bi3NMXzv.js} +1 -1
- package/dist/client/assets/{Clock-BYjyd9hX.js → Clock-D4xJnA3P.js} +1 -1
- package/dist/client/assets/{Code01-BkNgeom6.js → Code01-YGq5QwlZ.js} +1 -1
- package/dist/client/assets/{Container-D7IaxBn4.js → Container-DHyMOW_p.js} +1 -1
- package/dist/client/assets/{Copy01-BJ5f3Ft8.js → Copy01-DkcjIGiS.js} +1 -1
- package/dist/client/assets/{Dataflow03-DE7FXw07.js → Dataflow03-CD3eo8oO.js} +1 -1
- package/dist/client/assets/{DotsHorizontal-BFhhKBhk.js → DotsHorizontal-CjYGc80C.js} +1 -1
- package/dist/client/assets/{DotsVertical-CmyZ1eER.js → DotsVertical-2nyye7GD.js} +1 -1
- package/dist/client/assets/{Download01-C0zy7iAO.js → Download01-BvtNZalG.js} +1 -1
- package/dist/client/assets/{Edit01-BsJ32les.js → Edit01-CoeKfJ-u.js} +1 -1
- package/dist/client/assets/{Edit05-BD2d2k-5.js → Edit05-CbbEzOoe.js} +1 -1
- package/dist/client/assets/{Eye-B3PAdhmZ.js → Eye-hBqNQHpc.js} +1 -1
- package/dist/client/assets/{EyeOff-_G9JY6d-.js → EyeOff-CJoTkAtN.js} +1 -1
- package/dist/client/assets/{File02-CAND2NHE.js → File02-D19u2hUl.js} +1 -1
- package/dist/client/assets/{File06-Bvs2lp94.js → File06-Bp4ioOvR.js} +1 -1
- package/dist/client/assets/{FilterLines-D-lo1vJH.js → FilterLines-Dvk7BhWf.js} +1 -1
- package/dist/client/assets/{Globe01-jlGiKRJ-.js → Globe01-B8Ib7knn.js} +1 -1
- package/dist/client/assets/{Globe02-DpkPR1qQ.js → Globe02-wRhoc1N5.js} +1 -1
- package/dist/client/assets/{Grid01-Bootsry8.js → Grid01-C5e9ReQ4.js} +1 -1
- package/dist/client/assets/{Home02-Cn5GN0Zh.js → Home02-JZJR9jmQ.js} +1 -1
- package/dist/client/assets/{Image01-BGiNuXLR.js → Image01-DjoSkYp_.js} +1 -1
- package/dist/client/assets/{Inbox01-QN0h6e9y.js → Inbox01-ClVaT7W5.js} +1 -1
- package/dist/client/assets/{InfoCircle-BlKvj0NG.js → InfoCircle-DzyfpQes.js} +1 -1
- package/dist/client/assets/{Key01-p6odXPoE.js → Key01-qNySmY39.js} +1 -1
- package/dist/client/assets/{LayersTwo01-Dj6OMOTN.js → LayersTwo01-dfSlQT0y.js} +1 -1
- package/dist/client/assets/{LayoutLeft-Bl9wlb-l.js → LayoutLeft-B2KZfn2n.js} +1 -1
- package/dist/client/assets/{Link01-GDNtvq6w.js → Link01-Cz_ZRKoB.js} +1 -1
- package/dist/client/assets/{LinkExternal01-Cmp1Jq7T.js → LinkExternal01-CKvCiQnV.js} +1 -1
- package/dist/client/assets/{List-BFzJ8d3-.js → List-NLa0AhO4.js} +1 -1
- package/dist/client/assets/{Loading01-Bgt2pWQu.js → Loading01-Bb8FCosd.js} +1 -1
- package/dist/client/assets/{Lock01-CrtAKCVY.js → Lock01-CnZITIks.js} +1 -1
- package/dist/client/assets/{Play-C6mSLsW0.js → Play-Bw5lQw7j.js} +1 -1
- package/dist/client/assets/{Plus-Bah3bfIq.js → Plus-CajZ9VfC.js} +1 -1
- package/dist/client/assets/{RefreshCcw01-D6TQ-sWU.js → RefreshCcw01-B_NTitRE.js} +1 -1
- package/dist/client/assets/{Save01-DMdPXvfp.js → Save01-8oEsqMkJ.js} +1 -1
- package/dist/client/assets/{SearchMd-CbNARIB_.js → SearchMd-eZWeU0sP.js} +1 -1
- package/dist/client/assets/{Settings01-ncSo0UF1.js → Settings01-ClPVpLPy.js} +1 -1
- package/dist/client/assets/{Shield01-jjVa8gNb.js → Shield01-N4ace-oo.js} +1 -1
- package/dist/client/assets/{Terminal-BkHJq74m.js → Terminal-CGwuP-_5.js} +1 -1
- package/dist/client/assets/{Tool01-CCSFIqz9.js → Tool01-D1m8i7Ez.js} +1 -1
- package/dist/client/assets/{Trash01-DJLT0hlL.js → Trash01-B_4PTwjI.js} +1 -1
- package/dist/client/assets/{Upload01-CrylBwgE.js → Upload01-CLIOr3Tj.js} +1 -1
- package/dist/client/assets/{Users03-ClHTtWuU.js → Users03-Bv-hUQkl.js} +1 -1
- package/dist/client/assets/{X-Dr3IGE6q.js → X-LzehymHS.js} +1 -1
- package/dist/client/assets/{XClose-CM_PUH0D.js → XClose-CcNXqPQc.js} +1 -1
- package/dist/client/assets/{Zap-DNAzZ691.js → Zap-BFN1DqIC.js} +1 -1
- package/dist/client/assets/{agent-connections-preview-D9yVR2mI.js → agent-connections-preview-3pYXfstj.js} +1 -1
- package/dist/client/assets/{agent-detail-D9yhjqjE.js → agent-detail-DMK-u3yi.js} +1 -1
- package/dist/client/assets/{agents-UYgbyoc-.js → agents-Wfe5dNfh.js} +1 -1
- package/dist/client/assets/{ai-providers-logos-CKXeyPmY.js → ai-providers-logos-CCp39UCk.js} +1 -1
- package/dist/client/assets/{alert-dialog-CGRFjIvo.js → alert-dialog-B_ae3oRt.js} +1 -1
- package/dist/client/assets/{auth-catchall-DJtyBhDQ.js → auth-catchall-DAx9m28t.js} +1 -1
- package/dist/client/assets/{automation-detail-Da-KIL0v.js → automation-detail-DfFkGT_5.js} +1 -1
- package/dist/client/assets/{automations-BBeFyOp2.js → automations-A8NOzTSS.js} +1 -1
- package/dist/client/assets/{avatar-B6y4oqG6.js → avatar-B2yArl-q.js} +1 -1
- package/dist/client/assets/{badge-BWsagPlP.js → badge-DtRom7JO.js} +1 -1
- package/dist/client/assets/{binder-BfA1Jrrc.js → binder-D4cqx_Kx.js} +1 -1
- package/dist/client/assets/{breadcrumb-D8mb9kpq.js → breadcrumb-C2RG4nAQ.js} +1 -1
- package/dist/client/assets/{card-C0MItTW_.js → card-B8qDZGCZ.js} +1 -1
- package/dist/client/assets/{checkbox-DUU3Nuea.js → checkbox-B1rexahu.js} +1 -1
- package/dist/client/assets/{collapsible-CtLdTa6t.js → collapsible-BtjeaBAE.js} +1 -1
- package/dist/client/assets/{collection-detail-DPIki4up.js → collection-detail-BaBGI9i2.js} +1 -1
- package/dist/client/assets/{collection-display-button-DdFInvSR.js → collection-display-button-CpVZ4wHm.js} +1 -1
- package/dist/client/assets/{collection-search-CGfzh4mC.js → collection-search-BYV7N3mr.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-DLe2aR6i.js → collection-table-wrapper-CHFJQd21.js} +1 -1
- package/dist/client/assets/{collection-tabs-DAHXpc2n.js → collection-tabs-CJEa3dRy.js} +1 -1
- package/dist/client/assets/{command-C4HnUxgr.js → command-Drksh_DO.js} +1 -1
- package/dist/client/assets/{connection-card-DRd8H1I5.js → connection-card-Bak2l1_M.js} +1 -1
- package/dist/client/assets/{connection-detail-MKWBWpRr.js → connection-detail-BKy2ZsS6.js} +1 -1
- package/dist/client/assets/{connections-CIQDC3QM.js → connections-Dxf4eIOE.js} +1 -1
- package/dist/client/assets/{constants-C6R-Odkq.js → constants-D7qXOYRn.js} +1 -1
- package/dist/client/assets/{context-BFTRA5vP.js → context-DxQMlFKC.js} +1 -1
- package/dist/client/assets/{create-organization-dialog-Bez2nZe0.js → create-organization-dialog-CNWB-72r.js} +1 -1
- package/dist/client/assets/{create-project-dialog-MCGuKGij.js → create-project-dialog-BeIY4Oy9.js} +1 -1
- package/dist/client/assets/{danger-D1zng7LS.js → danger-YWbxrjNq.js} +1 -1
- package/dist/client/assets/{danger-zone-DbcRzYYG.js → danger-zone-DGg0ZzSy.js} +1 -1
- package/dist/client/assets/{dependencies-B8EkZe-H.js → dependencies-DtAVTWu-.js} +1 -1
- package/dist/client/assets/{dialog-Bw5T2ogY.js → dialog-ChXYvlDt.js} +1 -1
- package/dist/client/assets/{dropdown-menu-Dan8nMb8.js → dropdown-menu-BxlQMXgW.js} +1 -1
- package/dist/client/assets/{dynamic-plugin-layout-BDxV3RAS.js → dynamic-plugin-layout-JpZTv0Ay.js} +1 -1
- package/dist/client/assets/{editable-task-title-wfBXYVIh.js → editable-task-title-Cm-uIwFs.js} +1 -1
- package/dist/client/assets/{empty-state-CoA3_x_6.js → empty-state-qLM_bVsv.js} +1 -1
- package/dist/client/assets/{empty-state-C1iyyf7G.js → empty-state-xIvMMy-_.js} +1 -1
- package/dist/client/assets/{env-vars-editor-CxyeKMFS.js → env-vars-editor-Yss1wn0m.js} +1 -1
- package/dist/client/assets/{extract-connection-data-C8ZedtM3.js → extract-connection-data-48N591A_.js} +1 -1
- package/dist/client/assets/{file-browser-CShFs9BG.js → file-browser-BbqpPFZK.js} +2 -2
- package/dist/client/assets/{form-B1LLlQBa.js → form-CaFPTMVC.js} +1 -1
- package/dist/client/assets/{general-Dnfj_B7U.js → general-DI9irVIQ.js} +1 -1
- package/dist/client/assets/{generate-id-WpAuYSZF.js → generate-id-BiV6m8fS.js} +1 -1
- package/dist/client/assets/{grid-view-PzYdekcz.js → grid-view-DurgUMuo.js} +1 -1
- package/dist/client/assets/{home-CKa-gWjN.js → home-CspK560n.js} +1 -1
- package/dist/client/assets/{index-lUO5B2Do.js → index-ChUIqRBi.js} +1 -1
- package/dist/client/assets/{index-D-AXXJqO.js → index-CqWJIMlG.js} +1 -1
- package/dist/client/assets/{index-CgSAwZ8g.js → index-CqtWW-Tq.js} +1 -1
- package/dist/client/assets/{index-DtZLm-Fz.js → index-CqyqI90F.js} +1 -1
- package/dist/client/assets/{index-BaVHKLOw.js → index-De1iYnQy.js} +1 -1
- package/dist/client/assets/{index-De7oAufQ.js → index-NjMxPJgF.js} +3 -3
- package/dist/client/assets/{index-BkxamE0W.js → index-TV8hw8s3.js} +1 -1
- package/dist/client/assets/{index-CVayrapI.js → index-YL7q5tyF.js} +1 -1
- package/dist/client/assets/{index-BFJo8BQ3.js → index-YRudAQp7.js} +1 -1
- package/dist/client/assets/{index-J5pIXVfD.js → index-yiVP4brl.js} +1 -1
- package/dist/client/assets/{index-OdE2HBl6.js → index-zWpUeKAz.js} +1 -1
- package/dist/client/assets/{infiniteQueryObserver-C7xXp1jr.js → infiniteQueryObserver-JZ0YxCW-.js} +1 -1
- package/dist/client/assets/{input-_VKm0O_1.js → input-B89sozd8.js} +1 -1
- package/dist/client/assets/{integration-icon-BkY1vh6I.js → integration-icon-BPVDVJvP.js} +1 -1
- package/dist/client/assets/{label-BhDDQ3-n.js → label-DkiEYJcU.js} +1 -1
- package/dist/client/assets/{layout-BIFV7MZL.js → layout-Cqn-h1Jz.js} +1 -1
- package/dist/client/assets/{layout-CZKgiZuG.js → layout-DcmGLVHZ.js} +1 -1
- package/dist/client/assets/{login-uo65TNIo.js → login-qT_ItpIx.js} +1 -1
- package/dist/client/assets/{logo-upload-CXS8-AgL.js → logo-upload-CoGaedUC.js} +1 -1
- package/dist/client/assets/{mcp-app-renderer-BcsrfZJp.js → mcp-app-renderer-By1mQEU9.js} +1 -1
- package/dist/client/assets/{mcp-server-card-Bp6C5W6n.js → mcp-server-card-B3Nrrgyk.js} +1 -1
- package/dist/client/assets/{mcp-server-detail-Ctbkl5jL.js → mcp-server-detail-DMfy0V9h.js} +2 -2
- package/dist/client/assets/{members-DCfL7gNX.js → members-Q81LXZu1.js} +1 -1
- package/dist/client/assets/{monaco-editor-DPC7_J-G.js → monaco-editor-ZB27PMAe.js} +1 -1
- package/dist/client/assets/{monitoring-ByXLzXVV.js → monitoring-C31A03PZ.js} +1 -1
- package/dist/client/assets/{monitoring-dashboard-edit-YR1gT6FF.js → monitoring-dashboard-edit-Dfi8Jxeb.js} +1 -1
- package/dist/client/assets/{monitoring-dashboard-view-BbtnIBfa.js → monitoring-dashboard-view-CxjxBHLW.js} +1 -1
- package/dist/client/assets/{monitoring-stats-row-Df9ANyzv.js → monitoring-stats-row-CAn-8pVZ.js} +1 -1
- package/dist/client/assets/{oauth-callback-DAQSPrcu.js → oauth-callback-B8DRnSok.js} +1 -1
- package/dist/client/assets/{oauth-callback-ai-provider-BM5LYNPq.js → oauth-callback-ai-provider-CsTCxPAY.js} +1 -1
- package/dist/client/assets/{org-ai-providers-6KYO-veN.js → org-ai-providers-DaYyItUL.js} +1 -1
- package/dist/client/assets/{page-JhhtSWZh.js → page-BjLk0DX_.js} +1 -1
- package/dist/client/assets/{page-30eMAMiN.js → page-C2I5Nlmu.js} +1 -1
- package/dist/client/assets/{plugin-empty-state-Cl2I2geD.js → plugin-empty-state-K02oXRNN.js} +1 -1
- package/dist/client/assets/{plugin-empty-state-R2BzERoW.js → plugin-empty-state-l30u7dec.js} +1 -1
- package/dist/client/assets/{plugin-header-Bakz3z0e.js → plugin-header-B_wkRb4Y.js} +1 -1
- package/dist/client/assets/{plugin-header-aEsNVQjp.js → plugin-header-CE-BhILm.js} +1 -1
- package/dist/client/assets/plugins-6p4XZdw1.js +1 -0
- package/dist/client/assets/{popover-D_qGIJiq.js → popover-Br8QkMK3.js} +1 -1
- package/dist/client/assets/{project-app-view-BFgEphLV.js → project-app-view-CRe7LVZk.js} +1 -1
- package/dist/client/assets/{project-layout-C8oyOOGc.js → project-layout-Bg1hlIaM.js} +1 -1
- package/dist/client/assets/{project-plugins-BVt_WzcU.js → project-plugins-BHOZZsH7.js} +1 -1
- package/dist/client/assets/{projects-list-C02pKlJj.js → projects-list-i4ZvUqtI.js} +1 -1
- package/dist/client/assets/{registry-layout-C-yQnDXG.js → registry-layout-DQV7LhSo.js} +1 -1
- package/dist/client/assets/{registry-utils-Dqc_kCiP.js → registry-utils-cjX9P5J9.js} +1 -1
- package/dist/client/assets/{reset-password-Cqvt_aDI.js → reset-password-Cgcrl5ZG.js} +1 -1
- package/dist/client/assets/{resizable-CO0Uh73H.js → resizable-Nu1SqaJD.js} +1 -1
- package/dist/client/assets/{save-actions-ju1vjafj.js → save-actions-CVl6VtT2.js} +1 -1
- package/dist/client/assets/{scroll-area-DL2xzsPP.js → scroll-area-BTJQ86Ry.js} +1 -1
- package/dist/client/assets/{select-B4liIMVc.js → select-Dx3T3-4n.js} +1 -1
- package/dist/client/assets/{select-virtual-mcp-CuflMlTt.js → select-virtual-mcp-BS537pmy.js} +1 -1
- package/dist/client/assets/{sheet-Cjr3EcYH.js → sheet-C3HM0Uwr.js} +1 -1
- package/dist/client/assets/{shell-layout-DfTROeX_.js → shell-layout-Bco0BFOl.js} +2 -2
- package/dist/client/assets/{sidebar-settings-BljNzJVO.js → sidebar-settings-JhN4X_jg.js} +1 -1
- package/dist/client/assets/{skeleton-Bt7MRTvB.js → skeleton-Cjm8s7CT.js} +1 -1
- package/dist/client/assets/{spinner-Cse1gKnw.js → spinner-Dzx7B3Jl.js} +1 -1
- package/dist/client/assets/{store-invite-D8XeTZbu.js → store-invite-BPcFU0aw.js} +1 -1
- package/dist/client/assets/{switch-DHS6rwq-.js → switch-CA_oYDia.js} +1 -1
- package/dist/client/assets/{table-BPkNFl3F.js → table-C-1rP_rt.js} +1 -1
- package/dist/client/assets/{tabs-D9xzXdQn.js → tabs-BSOe8gLq.js} +1 -1
- package/dist/client/assets/{task-status-DPcRgg7n.js → task-status-DYx9R7EL.js} +24 -24
- package/dist/client/assets/tasks-D1X8oLa3.js +1 -0
- package/dist/client/assets/{tasks-panel-i3VUreUx.js → tasks-panel-BJ3TfA-_.js} +1 -1
- package/dist/client/assets/{textarea-C_pKpP9s.js → textarea-DIJzFUWn.js} +1 -1
- package/dist/client/assets/{time-range-picker-BuykPBni.js → time-range-picker-CGBh-D6p.js} +1 -1
- package/dist/client/assets/{toggle-group-VpRSF_Gl.js → toggle-group-DlZGDyPQ.js} +1 -1
- package/dist/client/assets/{tools-list-DDFWIxxm.js → tools-list-D-T64862.js} +1 -1
- package/dist/client/assets/{tooltip-C4rlkzSj.js → tooltip-BJMSu0c2.js} +1 -1
- package/dist/client/assets/{topbar-portal-CF1YRovU.js → topbar-portal-ChPXVsi1.js} +1 -1
- package/dist/client/assets/{types-DQbIwrMI.js → types-BHeMLyAV.js} +1 -1
- package/dist/client/assets/{use-automations-C1HgdvUZ.js → use-automations-Bmw3x7Dk.js} +1 -1
- package/dist/client/assets/{use-collections-CN-KZdhF.js → use-collections-C0cYiFfV.js} +1 -1
- package/dist/client/assets/{use-connection-C4RNTGYe.js → use-connection-CHFdKnsr.js} +1 -1
- package/dist/client/assets/{use-copy-Cyun7kVE.js → use-copy-xhdji_Bl.js} +1 -1
- package/dist/client/assets/{use-create-virtual-mcp-4JnIm_fY.js → use-create-virtual-mcp-B7odZ_c3.js} +1 -1
- package/dist/client/assets/{use-infinite-scroll-B1b4xMpn.js → use-infinite-scroll-CPhZNIw7.js} +1 -1
- package/dist/client/assets/{use-install-from-registry-CytyaLQX.js → use-install-from-registry-BzwuBLOx.js} +1 -1
- package/dist/client/assets/{use-list-state-CCkxYz8q.js → use-list-state-CbsN6RbJ.js} +1 -1
- package/dist/client/assets/{use-mcp-prompts-BGZnglwN.js → use-mcp-prompts-Bel4H4rh.js} +1 -1
- package/dist/client/assets/{use-mcp-resources-DSKOWSEO.js → use-mcp-resources-qGdymfRz.js} +1 -1
- package/dist/client/assets/{use-mcp-tools-C2aTDAuJ.js → use-mcp-tools-BCZI_Wqc.js} +1 -1
- package/dist/client/assets/{use-members-DjL_-1xN.js → use-members-B4ncWtMV.js} +1 -1
- package/dist/client/assets/{use-mobile-CMHMyYVi.js → use-mobile-DOUfTohp.js} +1 -1
- package/dist/client/assets/{use-project-DxPDjIre.js → use-project-b5C3lq5-.js} +1 -1
- package/dist/client/assets/{use-store-discovery-BBXrVOcG.js → use-store-discovery-B402mTHd.js} +1 -1
- package/dist/client/assets/{use-view-mode-CXln2RGt.js → use-view-mode-ss3eRodO.js} +1 -1
- package/dist/client/assets/{use-virtual-mcp-AdVimCkX.js → use-virtual-mcp-BP6aaUzw.js} +1 -1
- package/dist/client/assets/useInfiniteQuery-BXDrDvlH.js +1 -0
- package/dist/client/assets/{useMutation-BDzOMrvq.js → useMutation-68NxhXCf.js} +1 -1
- package/dist/client/assets/useQuery-BYBCFxgb.js +1 -0
- package/dist/client/assets/useSuspenseInfiniteQuery-X3jXt04i.js +1 -0
- package/dist/client/assets/{user-DSh4pFej.js → user-iDZRuimU.js} +1 -1
- package/dist/client/assets/{workflow-mIahQD3R.js → workflow-CrrTPehP.js} +1 -1
- package/dist/client/index.html +1 -1
- package/dist/server/cli.js +2 -2
- package/dist/server/migrate.js +1 -1
- package/dist/server/node_modules/pg-cloudflare/README.md +112 -0
- package/dist/server/node_modules/pg-cloudflare/dist/empty.d.ts +2 -0
- package/dist/server/node_modules/pg-cloudflare/dist/empty.js +6 -0
- package/dist/server/node_modules/pg-cloudflare/dist/empty.js.map +1 -0
- package/dist/server/node_modules/pg-cloudflare/dist/index.d.ts +31 -0
- package/dist/server/node_modules/pg-cloudflare/dist/index.js +152 -0
- package/dist/server/node_modules/pg-cloudflare/dist/index.js.map +1 -0
- package/dist/server/node_modules/pg-cloudflare/esm/index.mjs +3 -0
- package/dist/server/node_modules/pg-cloudflare/package.json +39 -0
- package/dist/server/node_modules/pg-cloudflare/src/empty.ts +3 -0
- package/dist/server/node_modules/pg-cloudflare/src/index.ts +166 -0
- package/dist/server/node_modules/pg-cloudflare/src/types.d.ts +25 -0
- package/dist/server/node_modules/pg-connection-string/LICENSE +21 -0
- 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/pg-int8/LICENSE +13 -0
- package/dist/server/node_modules/pg-int8/README.md +16 -0
- package/dist/server/node_modules/pg-int8/index.js +100 -0
- package/dist/server/node_modules/pg-int8/package.json +24 -0
- package/dist/server/node_modules/pg-pool/LICENSE +21 -0
- package/dist/server/node_modules/pg-pool/README.md +357 -0
- package/dist/server/node_modules/pg-pool/esm/index.mjs +5 -0
- package/dist/server/node_modules/pg-pool/index.js +517 -0
- package/dist/server/node_modules/pg-pool/package.json +51 -0
- package/dist/server/node_modules/pg-protocol/LICENSE +21 -0
- package/dist/server/node_modules/pg-protocol/README.md +3 -0
- package/dist/server/node_modules/pg-protocol/dist/b.d.ts +1 -0
- package/dist/server/node_modules/pg-protocol/dist/b.js +23 -0
- package/dist/server/node_modules/pg-protocol/dist/b.js.map +1 -0
- package/dist/server/node_modules/pg-protocol/dist/buffer-reader.d.ts +15 -0
- package/dist/server/node_modules/pg-protocol/dist/buffer-reader.js +55 -0
- package/dist/server/node_modules/pg-protocol/dist/buffer-reader.js.map +1 -0
- package/dist/server/node_modules/pg-protocol/dist/buffer-writer.d.ts +16 -0
- package/dist/server/node_modules/pg-protocol/dist/buffer-writer.js +81 -0
- package/dist/server/node_modules/pg-protocol/dist/buffer-writer.js.map +1 -0
- package/dist/server/node_modules/pg-protocol/dist/inbound-parser.test.d.ts +1 -0
- package/dist/server/node_modules/pg-protocol/dist/inbound-parser.test.js +530 -0
- package/dist/server/node_modules/pg-protocol/dist/inbound-parser.test.js.map +1 -0
- package/dist/server/node_modules/pg-protocol/dist/index.d.ts +6 -0
- package/dist/server/node_modules/pg-protocol/dist/index.js +15 -0
- package/dist/server/node_modules/pg-protocol/dist/index.js.map +1 -0
- package/dist/server/node_modules/pg-protocol/dist/messages.d.ts +162 -0
- package/dist/server/node_modules/pg-protocol/dist/messages.js +160 -0
- package/dist/server/node_modules/pg-protocol/dist/messages.js.map +1 -0
- package/dist/server/node_modules/pg-protocol/dist/outbound-serializer.test.d.ts +1 -0
- package/dist/server/node_modules/pg-protocol/dist/outbound-serializer.test.js +252 -0
- package/dist/server/node_modules/pg-protocol/dist/outbound-serializer.test.js.map +1 -0
- package/dist/server/node_modules/pg-protocol/dist/parser.d.ts +24 -0
- package/dist/server/node_modules/pg-protocol/dist/parser.js +324 -0
- package/dist/server/node_modules/pg-protocol/dist/parser.js.map +1 -0
- package/dist/server/node_modules/pg-protocol/dist/serializer.d.ts +42 -0
- package/dist/server/node_modules/pg-protocol/dist/serializer.js +189 -0
- package/dist/server/node_modules/pg-protocol/dist/serializer.js.map +1 -0
- package/dist/server/node_modules/pg-protocol/esm/index.js +11 -0
- package/dist/server/node_modules/pg-protocol/package.json +45 -0
- package/dist/server/node_modules/pg-protocol/src/b.ts +25 -0
- package/dist/server/node_modules/pg-protocol/src/buffer-reader.ts +58 -0
- package/dist/server/node_modules/pg-protocol/src/buffer-writer.ts +85 -0
- package/dist/server/node_modules/pg-protocol/src/inbound-parser.test.ts +575 -0
- package/dist/server/node_modules/pg-protocol/src/index.ts +11 -0
- package/dist/server/node_modules/pg-protocol/src/messages.ts +262 -0
- package/dist/server/node_modules/pg-protocol/src/outbound-serializer.test.ts +276 -0
- package/dist/server/node_modules/pg-protocol/src/parser.ts +413 -0
- package/dist/server/node_modules/pg-protocol/src/serializer.ts +274 -0
- package/dist/server/node_modules/pg-protocol/src/testing/buffer-list.ts +67 -0
- package/dist/server/node_modules/pg-protocol/src/testing/test-buffers.ts +166 -0
- package/dist/server/node_modules/pg-protocol/src/types/chunky.d.ts +1 -0
- package/dist/server/node_modules/pg-types/.travis.yml +7 -0
- package/dist/server/node_modules/pg-types/Makefile +14 -0
- package/dist/server/node_modules/pg-types/README.md +75 -0
- package/dist/server/node_modules/pg-types/index.d.ts +137 -0
- package/dist/server/node_modules/pg-types/index.js +47 -0
- package/dist/server/node_modules/pg-types/index.test-d.ts +21 -0
- package/dist/server/node_modules/pg-types/lib/arrayParser.js +11 -0
- package/dist/server/node_modules/pg-types/lib/binaryParsers.js +257 -0
- package/dist/server/node_modules/pg-types/lib/builtins.js +73 -0
- package/dist/server/node_modules/pg-types/lib/textParsers.js +215 -0
- package/dist/server/node_modules/pg-types/package.json +42 -0
- package/dist/server/node_modules/pg-types/test/index.js +24 -0
- package/dist/server/node_modules/pg-types/test/types.js +597 -0
- package/dist/server/node_modules/pgpass/README.md +74 -0
- package/dist/server/node_modules/pgpass/lib/helper.js +233 -0
- package/dist/server/node_modules/pgpass/lib/index.js +23 -0
- package/dist/server/node_modules/pgpass/package.json +41 -0
- package/dist/server/node_modules/postgres-array/index.d.ts +4 -0
- package/dist/server/node_modules/postgres-array/index.js +97 -0
- package/dist/server/node_modules/postgres-array/license +21 -0
- package/dist/server/node_modules/postgres-array/package.json +35 -0
- package/dist/server/node_modules/postgres-array/readme.md +43 -0
- package/dist/server/node_modules/postgres-bytea/index.js +33 -0
- package/dist/server/node_modules/postgres-bytea/license +21 -0
- package/dist/server/node_modules/postgres-bytea/package.json +34 -0
- package/dist/server/node_modules/postgres-bytea/readme.md +34 -0
- package/dist/server/node_modules/postgres-date/index.js +116 -0
- package/dist/server/node_modules/postgres-date/license +21 -0
- package/dist/server/node_modules/postgres-date/package.json +33 -0
- package/dist/server/node_modules/postgres-date/readme.md +49 -0
- package/dist/server/node_modules/postgres-interval/index.d.ts +20 -0
- package/dist/server/node_modules/postgres-interval/index.js +125 -0
- package/dist/server/node_modules/postgres-interval/license +21 -0
- package/dist/server/node_modules/postgres-interval/package.json +36 -0
- package/dist/server/node_modules/postgres-interval/readme.md +48 -0
- package/dist/server/node_modules/split2/LICENSE +13 -0
- package/dist/server/node_modules/split2/README.md +85 -0
- package/dist/server/node_modules/split2/bench.js +27 -0
- package/dist/server/node_modules/split2/index.js +141 -0
- package/dist/server/node_modules/split2/package.json +39 -0
- package/dist/server/node_modules/split2/test.js +409 -0
- package/dist/server/server.js +2 -2
- package/package.json +1 -1
- package/dist/client/assets/plugins-CJOgdAgY.js +0 -1
- package/dist/client/assets/tasks-CAcIEtSF.js +0 -1
- package/dist/client/assets/useInfiniteQuery-Dw4aF3nd.js +0 -1
- package/dist/client/assets/useQuery-CTePvczf.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-All2JJwt.js +0 -1
- package/dist/server/node_modules/pg/README.md +0 -95
- package/dist/server/node_modules/pg/esm/index.mjs +0 -20
- package/dist/server/node_modules/pg/lib/client.js +0 -743
- package/dist/server/node_modules/pg/lib/connection-parameters.js +0 -171
- package/dist/server/node_modules/pg/lib/connection.js +0 -221
- package/dist/server/node_modules/pg/lib/crypto/cert-signatures.js +0 -122
- package/dist/server/node_modules/pg/lib/crypto/sasl.js +0 -212
- package/dist/server/node_modules/pg/lib/crypto/utils-legacy.js +0 -43
- package/dist/server/node_modules/pg/lib/crypto/utils-webcrypto.js +0 -89
- package/dist/server/node_modules/pg/lib/crypto/utils.js +0 -9
- package/dist/server/node_modules/pg/lib/defaults.js +0 -91
- package/dist/server/node_modules/pg/lib/index.js +0 -73
- package/dist/server/node_modules/pg/lib/native/client.js +0 -323
- 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 -252
- package/dist/server/node_modules/pg/lib/result.js +0 -109
- package/dist/server/node_modules/pg/lib/stream.js +0 -83
- package/dist/server/node_modules/pg/lib/type-overrides.js +0 -35
- package/dist/server/node_modules/pg/lib/utils.js +0 -217
- package/dist/server/node_modules/pg/package.json +0 -76
- /package/dist/server/node_modules/{pg → pg-cloudflare}/LICENSE +0 -0
|
@@ -1,212 +0,0 @@
|
|
|
1
|
-
'use strict'
|
|
2
|
-
const crypto = require('./utils')
|
|
3
|
-
const { signatureAlgorithmHashFromCertificate } = require('./cert-signatures')
|
|
4
|
-
|
|
5
|
-
function startSession(mechanisms, stream) {
|
|
6
|
-
const candidates = ['SCRAM-SHA-256']
|
|
7
|
-
if (stream) candidates.unshift('SCRAM-SHA-256-PLUS') // higher-priority, so placed first
|
|
8
|
-
|
|
9
|
-
const mechanism = candidates.find((candidate) => mechanisms.includes(candidate))
|
|
10
|
-
|
|
11
|
-
if (!mechanism) {
|
|
12
|
-
throw new Error('SASL: Only mechanism(s) ' + candidates.join(' and ') + ' are supported')
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
if (mechanism === 'SCRAM-SHA-256-PLUS' && typeof stream.getPeerCertificate !== 'function') {
|
|
16
|
-
// this should never happen if we are really talking to a Postgres server
|
|
17
|
-
throw new Error('SASL: Mechanism SCRAM-SHA-256-PLUS requires a certificate')
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
const clientNonce = crypto.randomBytes(18).toString('base64')
|
|
21
|
-
const gs2Header = mechanism === 'SCRAM-SHA-256-PLUS' ? 'p=tls-server-end-point' : stream ? 'y' : 'n'
|
|
22
|
-
|
|
23
|
-
return {
|
|
24
|
-
mechanism,
|
|
25
|
-
clientNonce,
|
|
26
|
-
response: gs2Header + ',,n=*,r=' + clientNonce,
|
|
27
|
-
message: 'SASLInitialResponse',
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
async function continueSession(session, password, serverData, stream) {
|
|
32
|
-
if (session.message !== 'SASLInitialResponse') {
|
|
33
|
-
throw new Error('SASL: Last message was not SASLInitialResponse')
|
|
34
|
-
}
|
|
35
|
-
if (typeof password !== 'string') {
|
|
36
|
-
throw new Error('SASL: SCRAM-SERVER-FIRST-MESSAGE: client password must be a string')
|
|
37
|
-
}
|
|
38
|
-
if (password === '') {
|
|
39
|
-
throw new Error('SASL: SCRAM-SERVER-FIRST-MESSAGE: client password must be a non-empty string')
|
|
40
|
-
}
|
|
41
|
-
if (typeof serverData !== 'string') {
|
|
42
|
-
throw new Error('SASL: SCRAM-SERVER-FIRST-MESSAGE: serverData must be a string')
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
const sv = parseServerFirstMessage(serverData)
|
|
46
|
-
|
|
47
|
-
if (!sv.nonce.startsWith(session.clientNonce)) {
|
|
48
|
-
throw new Error('SASL: SCRAM-SERVER-FIRST-MESSAGE: server nonce does not start with client nonce')
|
|
49
|
-
} else if (sv.nonce.length === session.clientNonce.length) {
|
|
50
|
-
throw new Error('SASL: SCRAM-SERVER-FIRST-MESSAGE: server nonce is too short')
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
const clientFirstMessageBare = 'n=*,r=' + session.clientNonce
|
|
54
|
-
const serverFirstMessage = 'r=' + sv.nonce + ',s=' + sv.salt + ',i=' + sv.iteration
|
|
55
|
-
|
|
56
|
-
// without channel binding:
|
|
57
|
-
let channelBinding = stream ? 'eSws' : 'biws' // 'y,,' or 'n,,', base64-encoded
|
|
58
|
-
|
|
59
|
-
// override if channel binding is in use:
|
|
60
|
-
if (session.mechanism === 'SCRAM-SHA-256-PLUS') {
|
|
61
|
-
const peerCert = stream.getPeerCertificate().raw
|
|
62
|
-
let hashName = signatureAlgorithmHashFromCertificate(peerCert)
|
|
63
|
-
if (hashName === 'MD5' || hashName === 'SHA-1') hashName = 'SHA-256'
|
|
64
|
-
const certHash = await crypto.hashByName(hashName, peerCert)
|
|
65
|
-
const bindingData = Buffer.concat([Buffer.from('p=tls-server-end-point,,'), Buffer.from(certHash)])
|
|
66
|
-
channelBinding = bindingData.toString('base64')
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
const clientFinalMessageWithoutProof = 'c=' + channelBinding + ',r=' + sv.nonce
|
|
70
|
-
const authMessage = clientFirstMessageBare + ',' + serverFirstMessage + ',' + clientFinalMessageWithoutProof
|
|
71
|
-
|
|
72
|
-
const saltBytes = Buffer.from(sv.salt, 'base64')
|
|
73
|
-
const saltedPassword = await crypto.deriveKey(password, saltBytes, sv.iteration)
|
|
74
|
-
const clientKey = await crypto.hmacSha256(saltedPassword, 'Client Key')
|
|
75
|
-
const storedKey = await crypto.sha256(clientKey)
|
|
76
|
-
const clientSignature = await crypto.hmacSha256(storedKey, authMessage)
|
|
77
|
-
const clientProof = xorBuffers(Buffer.from(clientKey), Buffer.from(clientSignature)).toString('base64')
|
|
78
|
-
const serverKey = await crypto.hmacSha256(saltedPassword, 'Server Key')
|
|
79
|
-
const serverSignatureBytes = await crypto.hmacSha256(serverKey, authMessage)
|
|
80
|
-
|
|
81
|
-
session.message = 'SASLResponse'
|
|
82
|
-
session.serverSignature = Buffer.from(serverSignatureBytes).toString('base64')
|
|
83
|
-
session.response = clientFinalMessageWithoutProof + ',p=' + clientProof
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
function finalizeSession(session, serverData) {
|
|
87
|
-
if (session.message !== 'SASLResponse') {
|
|
88
|
-
throw new Error('SASL: Last message was not SASLResponse')
|
|
89
|
-
}
|
|
90
|
-
if (typeof serverData !== 'string') {
|
|
91
|
-
throw new Error('SASL: SCRAM-SERVER-FINAL-MESSAGE: serverData must be a string')
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
const { serverSignature } = parseServerFinalMessage(serverData)
|
|
95
|
-
|
|
96
|
-
if (serverSignature !== session.serverSignature) {
|
|
97
|
-
throw new Error('SASL: SCRAM-SERVER-FINAL-MESSAGE: server signature does not match')
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
/**
|
|
102
|
-
* printable = %x21-2B / %x2D-7E
|
|
103
|
-
* ;; Printable ASCII except ",".
|
|
104
|
-
* ;; Note that any "printable" is also
|
|
105
|
-
* ;; a valid "value".
|
|
106
|
-
*/
|
|
107
|
-
function isPrintableChars(text) {
|
|
108
|
-
if (typeof text !== 'string') {
|
|
109
|
-
throw new TypeError('SASL: text must be a string')
|
|
110
|
-
}
|
|
111
|
-
return text
|
|
112
|
-
.split('')
|
|
113
|
-
.map((_, i) => text.charCodeAt(i))
|
|
114
|
-
.every((c) => (c >= 0x21 && c <= 0x2b) || (c >= 0x2d && c <= 0x7e))
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
/**
|
|
118
|
-
* base64-char = ALPHA / DIGIT / "/" / "+"
|
|
119
|
-
*
|
|
120
|
-
* base64-4 = 4base64-char
|
|
121
|
-
*
|
|
122
|
-
* base64-3 = 3base64-char "="
|
|
123
|
-
*
|
|
124
|
-
* base64-2 = 2base64-char "=="
|
|
125
|
-
*
|
|
126
|
-
* base64 = *base64-4 [base64-3 / base64-2]
|
|
127
|
-
*/
|
|
128
|
-
function isBase64(text) {
|
|
129
|
-
return /^(?:[a-zA-Z0-9+/]{4})*(?:[a-zA-Z0-9+/]{2}==|[a-zA-Z0-9+/]{3}=)?$/.test(text)
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
function parseAttributePairs(text) {
|
|
133
|
-
if (typeof text !== 'string') {
|
|
134
|
-
throw new TypeError('SASL: attribute pairs text must be a string')
|
|
135
|
-
}
|
|
136
|
-
|
|
137
|
-
return new Map(
|
|
138
|
-
text.split(',').map((attrValue) => {
|
|
139
|
-
if (!/^.=/.test(attrValue)) {
|
|
140
|
-
throw new Error('SASL: Invalid attribute pair entry')
|
|
141
|
-
}
|
|
142
|
-
const name = attrValue[0]
|
|
143
|
-
const value = attrValue.substring(2)
|
|
144
|
-
return [name, value]
|
|
145
|
-
})
|
|
146
|
-
)
|
|
147
|
-
}
|
|
148
|
-
|
|
149
|
-
function parseServerFirstMessage(data) {
|
|
150
|
-
const attrPairs = parseAttributePairs(data)
|
|
151
|
-
|
|
152
|
-
const nonce = attrPairs.get('r')
|
|
153
|
-
if (!nonce) {
|
|
154
|
-
throw new Error('SASL: SCRAM-SERVER-FIRST-MESSAGE: nonce missing')
|
|
155
|
-
} else if (!isPrintableChars(nonce)) {
|
|
156
|
-
throw new Error('SASL: SCRAM-SERVER-FIRST-MESSAGE: nonce must only contain printable characters')
|
|
157
|
-
}
|
|
158
|
-
const salt = attrPairs.get('s')
|
|
159
|
-
if (!salt) {
|
|
160
|
-
throw new Error('SASL: SCRAM-SERVER-FIRST-MESSAGE: salt missing')
|
|
161
|
-
} else if (!isBase64(salt)) {
|
|
162
|
-
throw new Error('SASL: SCRAM-SERVER-FIRST-MESSAGE: salt must be base64')
|
|
163
|
-
}
|
|
164
|
-
const iterationText = attrPairs.get('i')
|
|
165
|
-
if (!iterationText) {
|
|
166
|
-
throw new Error('SASL: SCRAM-SERVER-FIRST-MESSAGE: iteration missing')
|
|
167
|
-
} else if (!/^[1-9][0-9]*$/.test(iterationText)) {
|
|
168
|
-
throw new Error('SASL: SCRAM-SERVER-FIRST-MESSAGE: invalid iteration count')
|
|
169
|
-
}
|
|
170
|
-
const iteration = parseInt(iterationText, 10)
|
|
171
|
-
|
|
172
|
-
return {
|
|
173
|
-
nonce,
|
|
174
|
-
salt,
|
|
175
|
-
iteration,
|
|
176
|
-
}
|
|
177
|
-
}
|
|
178
|
-
|
|
179
|
-
function parseServerFinalMessage(serverData) {
|
|
180
|
-
const attrPairs = parseAttributePairs(serverData)
|
|
181
|
-
const serverSignature = attrPairs.get('v')
|
|
182
|
-
if (!serverSignature) {
|
|
183
|
-
throw new Error('SASL: SCRAM-SERVER-FINAL-MESSAGE: server signature is missing')
|
|
184
|
-
} else if (!isBase64(serverSignature)) {
|
|
185
|
-
throw new Error('SASL: SCRAM-SERVER-FINAL-MESSAGE: server signature must be base64')
|
|
186
|
-
}
|
|
187
|
-
return {
|
|
188
|
-
serverSignature,
|
|
189
|
-
}
|
|
190
|
-
}
|
|
191
|
-
|
|
192
|
-
function xorBuffers(a, b) {
|
|
193
|
-
if (!Buffer.isBuffer(a)) {
|
|
194
|
-
throw new TypeError('first argument must be a Buffer')
|
|
195
|
-
}
|
|
196
|
-
if (!Buffer.isBuffer(b)) {
|
|
197
|
-
throw new TypeError('second argument must be a Buffer')
|
|
198
|
-
}
|
|
199
|
-
if (a.length !== b.length) {
|
|
200
|
-
throw new Error('Buffer lengths must match')
|
|
201
|
-
}
|
|
202
|
-
if (a.length === 0) {
|
|
203
|
-
throw new Error('Buffers cannot be empty')
|
|
204
|
-
}
|
|
205
|
-
return Buffer.from(a.map((_, i) => a[i] ^ b[i]))
|
|
206
|
-
}
|
|
207
|
-
|
|
208
|
-
module.exports = {
|
|
209
|
-
startSession,
|
|
210
|
-
continueSession,
|
|
211
|
-
finalizeSession,
|
|
212
|
-
}
|
|
@@ -1,43 +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
|
-
const inner = md5(password + user)
|
|
14
|
-
const 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 hashByName(hashName, text) {
|
|
23
|
-
hashName = hashName.replace(/(\D)-/, '$1') // e.g. SHA-256 -> SHA256
|
|
24
|
-
return nodeCrypto.createHash(hashName).update(text).digest()
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
function hmacSha256(key, msg) {
|
|
28
|
-
return nodeCrypto.createHmac('sha256', key).update(msg).digest()
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
async function deriveKey(password, salt, iterations) {
|
|
32
|
-
return nodeCrypto.pbkdf2Sync(password, salt, iterations, 32, 'sha256')
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
module.exports = {
|
|
36
|
-
postgresMd5PasswordHash,
|
|
37
|
-
randomBytes: nodeCrypto.randomBytes,
|
|
38
|
-
deriveKey,
|
|
39
|
-
sha256,
|
|
40
|
-
hashByName,
|
|
41
|
-
hmacSha256,
|
|
42
|
-
md5,
|
|
43
|
-
}
|
|
@@ -1,89 +0,0 @@
|
|
|
1
|
-
const nodeCrypto = require('crypto')
|
|
2
|
-
|
|
3
|
-
module.exports = {
|
|
4
|
-
postgresMd5PasswordHash,
|
|
5
|
-
randomBytes,
|
|
6
|
-
deriveKey,
|
|
7
|
-
sha256,
|
|
8
|
-
hashByName,
|
|
9
|
-
hmacSha256,
|
|
10
|
-
md5,
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
/**
|
|
14
|
-
* The Web Crypto API - grabbed from the Node.js library or the global
|
|
15
|
-
* @type Crypto
|
|
16
|
-
*/
|
|
17
|
-
// eslint-disable-next-line no-undef
|
|
18
|
-
const webCrypto = nodeCrypto.webcrypto || globalThis.crypto
|
|
19
|
-
/**
|
|
20
|
-
* The SubtleCrypto API for low level crypto operations.
|
|
21
|
-
* @type SubtleCrypto
|
|
22
|
-
*/
|
|
23
|
-
const subtleCrypto = webCrypto.subtle
|
|
24
|
-
const textEncoder = new TextEncoder()
|
|
25
|
-
|
|
26
|
-
/**
|
|
27
|
-
*
|
|
28
|
-
* @param {*} length
|
|
29
|
-
* @returns
|
|
30
|
-
*/
|
|
31
|
-
function randomBytes(length) {
|
|
32
|
-
return webCrypto.getRandomValues(Buffer.alloc(length))
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
async function md5(string) {
|
|
36
|
-
try {
|
|
37
|
-
return nodeCrypto.createHash('md5').update(string, 'utf-8').digest('hex')
|
|
38
|
-
} catch (e) {
|
|
39
|
-
// `createHash()` failed so we are probably not in Node.js, use the WebCrypto API instead.
|
|
40
|
-
// Note that the MD5 algorithm on WebCrypto is not available in Node.js.
|
|
41
|
-
// This is why we cannot just use WebCrypto in all environments.
|
|
42
|
-
const data = typeof string === 'string' ? textEncoder.encode(string) : string
|
|
43
|
-
const hash = await subtleCrypto.digest('MD5', data)
|
|
44
|
-
return Array.from(new Uint8Array(hash))
|
|
45
|
-
.map((b) => b.toString(16).padStart(2, '0'))
|
|
46
|
-
.join('')
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
// See AuthenticationMD5Password at https://www.postgresql.org/docs/current/static/protocol-flow.html
|
|
51
|
-
async function postgresMd5PasswordHash(user, password, salt) {
|
|
52
|
-
const inner = await md5(password + user)
|
|
53
|
-
const outer = await md5(Buffer.concat([Buffer.from(inner), salt]))
|
|
54
|
-
return 'md5' + outer
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
/**
|
|
58
|
-
* Create a SHA-256 digest of the given data
|
|
59
|
-
* @param {Buffer} data
|
|
60
|
-
*/
|
|
61
|
-
async function sha256(text) {
|
|
62
|
-
return await subtleCrypto.digest('SHA-256', text)
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
async function hashByName(hashName, text) {
|
|
66
|
-
return await subtleCrypto.digest(hashName, text)
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
/**
|
|
70
|
-
* Sign the message with the given key
|
|
71
|
-
* @param {ArrayBuffer} keyBuffer
|
|
72
|
-
* @param {string} msg
|
|
73
|
-
*/
|
|
74
|
-
async function hmacSha256(keyBuffer, msg) {
|
|
75
|
-
const key = await subtleCrypto.importKey('raw', keyBuffer, { name: 'HMAC', hash: 'SHA-256' }, false, ['sign'])
|
|
76
|
-
return await subtleCrypto.sign('HMAC', key, textEncoder.encode(msg))
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
/**
|
|
80
|
-
* Derive a key from the password and salt
|
|
81
|
-
* @param {string} password
|
|
82
|
-
* @param {Uint8Array} salt
|
|
83
|
-
* @param {number} iterations
|
|
84
|
-
*/
|
|
85
|
-
async function deriveKey(password, salt, iterations) {
|
|
86
|
-
const key = await subtleCrypto.importKey('raw', textEncoder.encode(password), 'PBKDF2', false, ['deriveBits'])
|
|
87
|
-
const params = { name: 'PBKDF2', hash: 'SHA-256', salt: salt, iterations: iterations }
|
|
88
|
-
return await subtleCrypto.deriveBits(params, key, 32 * 8, ['deriveBits'])
|
|
89
|
-
}
|
|
@@ -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
|
-
}
|
|
@@ -1,91 +0,0 @@
|
|
|
1
|
-
'use strict'
|
|
2
|
-
|
|
3
|
-
let user
|
|
4
|
-
try {
|
|
5
|
-
user = process.platform === 'win32' ? process.env.USERNAME : process.env.USER
|
|
6
|
-
} catch {
|
|
7
|
-
// ignore, e.g., Deno without --allow-env
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
module.exports = {
|
|
11
|
-
// database host. defaults to localhost
|
|
12
|
-
host: 'localhost',
|
|
13
|
-
|
|
14
|
-
// database user's name
|
|
15
|
-
user,
|
|
16
|
-
|
|
17
|
-
// name of database to connect
|
|
18
|
-
database: undefined,
|
|
19
|
-
|
|
20
|
-
// database user's password
|
|
21
|
-
password: null,
|
|
22
|
-
|
|
23
|
-
// a Postgres connection string to be used instead of setting individual connection items
|
|
24
|
-
// NOTE: Setting this value will cause it to override any other value (such as database or user) defined
|
|
25
|
-
// in the defaults object.
|
|
26
|
-
connectionString: undefined,
|
|
27
|
-
|
|
28
|
-
// database port
|
|
29
|
-
port: 5432,
|
|
30
|
-
|
|
31
|
-
// number of rows to return at a time from a prepared statement's
|
|
32
|
-
// portal. 0 will return all rows at once
|
|
33
|
-
rows: 0,
|
|
34
|
-
|
|
35
|
-
// binary result mode
|
|
36
|
-
binary: false,
|
|
37
|
-
|
|
38
|
-
// Connection pool options - see https://github.com/brianc/node-pg-pool
|
|
39
|
-
|
|
40
|
-
// number of connections to use in connection pool
|
|
41
|
-
// 0 will disable connection pooling
|
|
42
|
-
max: 10,
|
|
43
|
-
|
|
44
|
-
// max milliseconds a client can go unused before it is removed
|
|
45
|
-
// from the pool and destroyed
|
|
46
|
-
idleTimeoutMillis: 30000,
|
|
47
|
-
|
|
48
|
-
client_encoding: '',
|
|
49
|
-
|
|
50
|
-
ssl: false,
|
|
51
|
-
|
|
52
|
-
application_name: undefined,
|
|
53
|
-
|
|
54
|
-
fallback_application_name: undefined,
|
|
55
|
-
|
|
56
|
-
options: undefined,
|
|
57
|
-
|
|
58
|
-
parseInputDatesAsUTC: false,
|
|
59
|
-
|
|
60
|
-
// max milliseconds any query using this connection will execute for before timing out in error.
|
|
61
|
-
// false=unlimited
|
|
62
|
-
statement_timeout: false,
|
|
63
|
-
|
|
64
|
-
// Abort any statement that waits longer than the specified duration in milliseconds while attempting to acquire a lock.
|
|
65
|
-
// false=unlimited
|
|
66
|
-
lock_timeout: false,
|
|
67
|
-
|
|
68
|
-
// Terminate any session with an open transaction that has been idle for longer than the specified duration in milliseconds
|
|
69
|
-
// false=unlimited
|
|
70
|
-
idle_in_transaction_session_timeout: false,
|
|
71
|
-
|
|
72
|
-
// max milliseconds to wait for query to complete (client side)
|
|
73
|
-
query_timeout: false,
|
|
74
|
-
|
|
75
|
-
connect_timeout: 0,
|
|
76
|
-
|
|
77
|
-
keepalives: 1,
|
|
78
|
-
|
|
79
|
-
keepalives_idle: 0,
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
const pgTypes = require('pg-types')
|
|
83
|
-
// save default parsers
|
|
84
|
-
const parseBigInteger = pgTypes.getTypeParser(20, 'text')
|
|
85
|
-
const parseBigIntegerArray = pgTypes.getTypeParser(1016, 'text')
|
|
86
|
-
|
|
87
|
-
// parse int8 so you can get your count values as actual numbers
|
|
88
|
-
module.exports.__defineSetter__('parseInt8', function (val) {
|
|
89
|
-
pgTypes.setTypeParser(20, 'text', val ? pgTypes.getTypeParser(23, 'text') : parseBigInteger)
|
|
90
|
-
pgTypes.setTypeParser(1016, 'text', val ? pgTypes.getTypeParser(1007, 'text') : parseBigIntegerArray)
|
|
91
|
-
})
|
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
'use strict'
|
|
2
|
-
|
|
3
|
-
const Client = require('./client')
|
|
4
|
-
const defaults = require('./defaults')
|
|
5
|
-
const Connection = require('./connection')
|
|
6
|
-
const Result = require('./result')
|
|
7
|
-
const utils = require('./utils')
|
|
8
|
-
const Pool = require('pg-pool')
|
|
9
|
-
const TypeOverrides = require('./type-overrides')
|
|
10
|
-
const { DatabaseError } = require('pg-protocol')
|
|
11
|
-
const { escapeIdentifier, escapeLiteral } = require('./utils')
|
|
12
|
-
|
|
13
|
-
const poolFactory = (Client) => {
|
|
14
|
-
return class BoundPool extends Pool {
|
|
15
|
-
constructor(options) {
|
|
16
|
-
super(options, Client)
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
const PG = function (clientConstructor) {
|
|
22
|
-
this.defaults = defaults
|
|
23
|
-
this.Client = clientConstructor
|
|
24
|
-
this.Query = this.Client.Query
|
|
25
|
-
this.Pool = poolFactory(this.Client)
|
|
26
|
-
this._pools = []
|
|
27
|
-
this.Connection = Connection
|
|
28
|
-
this.types = require('pg-types')
|
|
29
|
-
this.DatabaseError = DatabaseError
|
|
30
|
-
this.TypeOverrides = TypeOverrides
|
|
31
|
-
this.escapeIdentifier = escapeIdentifier
|
|
32
|
-
this.escapeLiteral = escapeLiteral
|
|
33
|
-
this.Result = Result
|
|
34
|
-
this.utils = utils
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
let clientConstructor = Client
|
|
38
|
-
|
|
39
|
-
let forceNative = false
|
|
40
|
-
try {
|
|
41
|
-
forceNative = !!process.env.NODE_PG_FORCE_NATIVE
|
|
42
|
-
} catch {
|
|
43
|
-
// ignore, e.g., Deno without --allow-env
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
if (forceNative) {
|
|
47
|
-
clientConstructor = require('./native')
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
module.exports = new PG(clientConstructor)
|
|
51
|
-
|
|
52
|
-
// lazy require native module...the native module may not have installed
|
|
53
|
-
Object.defineProperty(module.exports, 'native', {
|
|
54
|
-
configurable: true,
|
|
55
|
-
enumerable: false,
|
|
56
|
-
get() {
|
|
57
|
-
let native = null
|
|
58
|
-
try {
|
|
59
|
-
native = new PG(require('./native'))
|
|
60
|
-
} catch (err) {
|
|
61
|
-
if (err.code !== 'MODULE_NOT_FOUND') {
|
|
62
|
-
throw err
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
// overwrite module.exports.native so that getter is never called again
|
|
67
|
-
Object.defineProperty(module.exports, 'native', {
|
|
68
|
-
value: native,
|
|
69
|
-
})
|
|
70
|
-
|
|
71
|
-
return native
|
|
72
|
-
},
|
|
73
|
-
})
|