decocms 2.186.0 → 2.186.1
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-vb3SCqTR.js → AlertCircle-K-Pdcic9.js} +1 -1
- package/dist/client/assets/{ArrowLeft-UgY0HH3_.js → ArrowLeft-DbjuKsKJ.js} +1 -1
- package/dist/client/assets/{ArrowUp-BQ0GwMhq.js → ArrowUp-CVgf-IuM.js} +1 -1
- package/dist/client/assets/{Check-EBIfpKfk.js → Check-5J8pLufa.js} +1 -1
- package/dist/client/assets/{ChevronDown-TWcZ4kJ9.js → ChevronDown-azX3X6AX.js} +1 -1
- package/dist/client/assets/{ChevronRight-BpkTLj3y.js → ChevronRight-BU9wyepR.js} +1 -1
- package/dist/client/assets/{ChevronUp-DMmIo8iD.js → ChevronUp-ISSymo50.js} +1 -1
- package/dist/client/assets/{Container-Dt8UalAF.js → Container-DO3SbooR.js} +1 -1
- package/dist/client/assets/{Dataflow03-DLl2RzQp.js → Dataflow03-DDjLJJPt.js} +1 -1
- package/dist/client/assets/{Download01-Dw7P9-4i.js → Download01-CSi5s7rT.js} +1 -1
- package/dist/client/assets/{FolderClosed-D8TIwtpx.js → FolderClosed-DG1khNab.js} +1 -1
- package/dist/client/assets/{Grid01-CmDjkAry.js → Grid01-1OtRlqYA.js} +1 -1
- package/dist/client/assets/{List-3ufZUeAi.js → List-CD8zd6Wa.js} +1 -1
- package/dist/client/assets/{Loading01-oEWzHjsc.js → Loading01-CYdiDh3l.js} +1 -1
- package/dist/client/assets/{Play-eTAbgb-w.js → Play-3YhDYx27.js} +1 -1
- package/dist/client/assets/{Plus-BA7Rfpr-.js → Plus-V1Th1jdv.js} +1 -1
- package/dist/client/assets/{RefreshCcw01-B6mp4o28.js → RefreshCcw01-Bk3rOtaE.js} +1 -1
- package/dist/client/assets/{SearchMd-4_up1TLU.js → SearchMd-BvvZzTkV.js} +1 -1
- package/dist/client/assets/{Settings01-lbicxKIn.js → Settings01-BhEewSHV.js} +1 -1
- package/dist/client/assets/{Trash01-eIuymuN8.js → Trash01-DEYpLJs9.js} +1 -1
- package/dist/client/assets/{Type01-DCWXkwdC.js → Type01-DPCWeoOo.js} +1 -1
- package/dist/client/assets/{Upload01-BSFuoakK.js → Upload01-CVsYMTIG.js} +1 -1
- package/dist/client/assets/{User01-DN32uzYn.js → User01-B6InEsCV.js} +1 -1
- package/dist/client/assets/{VideoRecorder-BQGrK2bZ.js → VideoRecorder-DWwuCAKx.js} +1 -1
- package/dist/client/assets/{X-DaCoKlVZ.js → X-DSEUOZBv.js} +1 -1
- package/dist/client/assets/{XCircle-DZHeGFcX.js → XCircle-BDF0JqjY.js} +1 -1
- package/dist/client/assets/{XClose-D_0o1f9F.js → XClose-C-lSsuAr.js} +1 -1
- package/dist/client/assets/{Zap-D0bIVVjW.js → Zap-Md9DJ6rv.js} +1 -1
- package/dist/client/assets/{agent-connections-preview-BI-eeQCx.js → agent-connections-preview-BjYZmjl3.js} +1 -1
- package/dist/client/assets/{agent-detail-Cawai6IA.js → agent-detail-Dj0OUG-D.js} +1 -1
- package/dist/client/assets/{agents-BoYaKa_N.js → agents-DZR4cSbV.js} +1 -1
- package/dist/client/assets/{ai-providers-logos-D_53AnVk.js → ai-providers-logos-pBxdceXx.js} +1 -1
- package/dist/client/assets/{alert-dialog-C5dI6ng4.js → alert-dialog-CJVLkF8s.js} +1 -1
- package/dist/client/assets/{auth-catchall-O2S6cfz6.js → auth-catchall-CyapYNp9.js} +1 -1
- package/dist/client/assets/{automation-detail-BlNEANzL.js → automation-detail-DUb_NKWf.js} +1 -1
- package/dist/client/assets/{automations-BQAwNfu2.js → automations-B339F6Fn.js} +1 -1
- package/dist/client/assets/{avatar-CojTV7kK.js → avatar-BiJdl6Xf.js} +1 -1
- package/dist/client/assets/{badge-Cj2aOlgl.js → badge-BbY1Vzps.js} +1 -1
- package/dist/client/assets/{binder-2uXLdWyj.js → binder-3anAL5WI.js} +1 -1
- package/dist/client/assets/{breadcrumb--82F68FS.js → breadcrumb-BM2hSfLB.js} +1 -1
- package/dist/client/assets/{card-ChQFWIen.js → card-D1l6f7HS.js} +1 -1
- package/dist/client/assets/{checkbox-D_kbciPC.js → checkbox-GcV7rItk.js} +1 -1
- package/dist/client/assets/{collapsible-Doonaq5y.js → collapsible-E7EbAleb.js} +1 -1
- package/dist/client/assets/{collection-detail-BLWjMoWG.js → collection-detail-md2_reRY.js} +1 -1
- package/dist/client/assets/{collection-display-button-B_YB0Pvz.js → collection-display-button-BN69LmBz.js} +1 -1
- package/dist/client/assets/{collection-search-BWbixDRp.js → collection-search-CcVBsN85.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-DQMCUU4F.js → collection-table-wrapper-BPFLr1-v.js} +1 -1
- package/dist/client/assets/{collection-tabs-BnCzVfgA.js → collection-tabs-BijGeHYB.js} +1 -1
- package/dist/client/assets/{command-CtOWm1VV.js → command-KtP0d-HZ.js} +1 -1
- package/dist/client/assets/{connection-card-DcT51RGy.js → connection-card-DT3Fx28T.js} +1 -1
- package/dist/client/assets/{connection-detail-BRK14vIh.js → connection-detail-DwgDpXcB.js} +1 -1
- package/dist/client/assets/{connections-D2sLUHTG.js → connections-C_kRN8jY.js} +1 -1
- package/dist/client/assets/{constants-DEVLPir8.js → constants-2OCwh60p.js} +1 -1
- package/dist/client/assets/constants-BwEgB5ct.js +1 -0
- package/dist/client/assets/{context-BPeBGjOy.js → context-CuNDOhoh.js} +1 -1
- package/dist/client/assets/{create-organization-dialog-R77KhBvZ.js → create-organization-dialog-Cd0g9HkW.js} +1 -1
- package/dist/client/assets/{create-project-dialog-D41xkdsb.js → create-project-dialog-CU5VLoep.js} +1 -1
- package/dist/client/assets/{danger-zX3Qk8cM.js → danger-CFl_eB5k.js} +1 -1
- package/dist/client/assets/{danger-zone-DqYkGDIc.js → danger-zone-BSvLmne8.js} +1 -1
- package/dist/client/assets/{dependencies-9-wz4Xxc.js → dependencies-DDWJJnWt.js} +1 -1
- package/dist/client/assets/{dialog-BCMFAhkI.js → dialog-D46ZA88r.js} +1 -1
- package/dist/client/assets/{drawer-Bl6NlnaH.js → drawer-DsEaI2mC.js} +1 -1
- package/dist/client/assets/{dropdown-menu-BbHSISkN.js → dropdown-menu-BJLjCuY0.js} +1 -1
- package/dist/client/assets/{dynamic-plugin-layout-BIILduy1.js → dynamic-plugin-layout-DQu_PXGi.js} +1 -1
- package/dist/client/assets/{editable-task-title-Br5O_iLC.js → editable-task-title-BXxkXNIX.js} +1 -1
- package/dist/client/assets/{empty-state-C0dwe4U0.js → empty-state-B7nlLEUe.js} +1 -1
- package/dist/client/assets/{empty-state-5noOSGfK.js → empty-state-unH0aOxb.js} +1 -1
- package/dist/client/assets/{env-vars-editor-CmxN_shK.js → env-vars-editor-COVavLgR.js} +1 -1
- package/dist/client/assets/{extract-connection-data-DJbja1-q.js → extract-connection-data-BxATAvFG.js} +1 -1
- package/dist/client/assets/{file-browser-DUjv8sIJ.js → file-browser-Y37oB16s.js} +2 -2
- package/dist/client/assets/{form-DUoo-ylF.js → form-BC654cr0.js} +1 -1
- package/dist/client/assets/{general-CGJ44hLj.js → general-DnNKCd5D.js} +1 -1
- package/dist/client/assets/{grid-view-BoGBtir5.js → grid-view-DBiOShLC.js} +1 -1
- package/dist/client/assets/{home-C0TXQswt.js → home-DoIljK7E.js} +1 -1
- package/dist/client/assets/{index-BKxenrdO.js → index-BRbdC8tb.js} +3 -3
- package/dist/client/assets/{index-DHg1fc5U.js → index-BbKz4tLm.js} +1 -1
- package/dist/client/assets/{index-hk9wzRwg.js → index-CKlHjZGl.js} +1 -1
- package/dist/client/assets/{index-D-VE8zlf.js → index-CvdTWVPu.js} +1 -1
- package/dist/client/assets/{index-C7rxOK6C.js → index-DSSbY8iZ.js} +1 -1
- package/dist/client/assets/{index-DaynUkW8.js → index-DSiECZF0.js} +1 -1
- package/dist/client/assets/{index-D73K8P0E.js → index-DW3Gddt1.js} +1 -1
- package/dist/client/assets/{index-Do3azGem.js → index-DhwDaiqy.js} +1 -1
- package/dist/client/assets/{index-CJahu32N.js → index-Do980wUe.js} +1 -1
- package/dist/client/assets/{index-BHTlDqaD.js → index-P1BeuVDU.js} +1 -1
- package/dist/client/assets/{index-BZ1qyalZ.js → index-Z-Bosamk.js} +1 -1
- package/dist/client/assets/{infiniteQueryObserver-D-mOGz06.js → infiniteQueryObserver-DozliAIg.js} +1 -1
- package/dist/client/assets/{input-BOFUz0aj.js → input-BOjviNKP.js} +1 -1
- package/dist/client/assets/{integration-icon-DgW660ho.js → integration-icon-BxAcqR_W.js} +1 -1
- package/dist/client/assets/{label-CwYk_3Ey.js → label-h0Vcc2GK.js} +1 -1
- package/dist/client/assets/{layout-DAeDMG0b.js → layout-B-xxTjgY.js} +1 -1
- package/dist/client/assets/{layout-C3AUYf3J.js → layout-B1L9zKc4.js} +1 -1
- package/dist/client/assets/{login-DuIR9S1j.js → login-DGiUNRC7.js} +1 -1
- package/dist/client/assets/{logo-upload-CgauH7P2.js → logo-upload-PCOmxOCx.js} +1 -1
- package/dist/client/assets/{mcp-app-renderer-DGEXm5IH.js → mcp-app-renderer-CRS3A1HB.js} +1 -1
- package/dist/client/assets/{mcp-server-card-CK4sGKdu.js → mcp-server-card-B6PFNGFX.js} +1 -1
- package/dist/client/assets/{mcp-server-detail-D69tJNJ-.js → mcp-server-detail-oU638r_U.js} +2 -2
- package/dist/client/assets/{members-BE0-LX8z.js → members-CNzL9zLR.js} +1 -1
- package/dist/client/assets/{monaco-editor-DKgjhGyK.js → monaco-editor-vJr8RDGl.js} +1 -1
- package/dist/client/assets/{monitoring-mL0YGaG3.js → monitoring-CxIOWArS.js} +1 -1
- package/dist/client/assets/{monitoring-dashboard-edit-BU6wqp6k.js → monitoring-dashboard-edit-DxfJ4WNy.js} +1 -1
- package/dist/client/assets/{monitoring-dashboard-view-DpgR3HBD.js → monitoring-dashboard-view-BL4nPi_-.js} +1 -1
- package/dist/client/assets/{monitoring-stats-row-DGTvXy8L.js → monitoring-stats-row-CrNnPzpZ.js} +1 -1
- package/dist/client/assets/{oauth-callback-DXq4VAB4.js → oauth-callback-Cq38djsA.js} +1 -1
- package/dist/client/assets/{oauth-callback-ai-provider-DLq9Afvv.js → oauth-callback-ai-provider-CYTOAGu5.js} +1 -1
- package/dist/client/assets/{org-ai-providers-Cz242a6o.js → org-ai-providers-DtsI9IWI.js} +1 -1
- package/dist/client/assets/{page-x_-Jc14s.js → page-CYpcNv9e.js} +1 -1
- package/dist/client/assets/{page-D3b1s6a2.js → page-zavfyW1i.js} +1 -1
- package/dist/client/assets/{plugin-empty-state-B3_dpS13.js → plugin-empty-state-CgDAJvPC.js} +1 -1
- package/dist/client/assets/{plugin-empty-state-Cj0RnDfG.js → plugin-empty-state-Dl_2Uo0y.js} +1 -1
- package/dist/client/assets/{plugin-header-BKXZ081u.js → plugin-header-D43xaGJs.js} +1 -1
- package/dist/client/assets/{plugin-header-DlN-1PR6.js → plugin-header-Dv9ESxEb.js} +1 -1
- package/dist/client/assets/plugins-DBMyeN4D.js +1 -0
- package/dist/client/assets/{popover-CRZZJD6X.js → popover-DWheVeA1.js} +1 -1
- package/dist/client/assets/{project-app-view-Dei8g4l2.js → project-app-view-9tWFjZrt.js} +1 -1
- package/dist/client/assets/{project-layout-dAA71zE-.js → project-layout-Dv-Q6xBk.js} +1 -1
- package/dist/client/assets/{project-plugins-BaJYUdT2.js → project-plugins-Bw8tiinl.js} +1 -1
- package/dist/client/assets/{projects-list-Cv_y3Y1y.js → projects-list-DokYG2lJ.js} +1 -1
- package/dist/client/assets/{registry-layout-C04LM3fN.js → registry-layout-CxVYwTXn.js} +1 -1
- package/dist/client/assets/{registry-utils-C0FVK22y.js → registry-utils-BSd5ITwa.js} +1 -1
- package/dist/client/assets/{reset-password-CKoF4675.js → reset-password-C7Dj7QEf.js} +1 -1
- package/dist/client/assets/{resizable-nYmcarWg.js → resizable-DixBhzs0.js} +1 -1
- package/dist/client/assets/{save-actions-eZ1LrcFs.js → save-actions-qtl58c-n.js} +1 -1
- package/dist/client/assets/{scroll-area-BTvSahh5.js → scroll-area-COTWSYpJ.js} +1 -1
- package/dist/client/assets/{select-LSyRUUkM.js → select-Duo4-kjU.js} +1 -1
- package/dist/client/assets/{select-virtual-mcp-CQf_NH1Z.js → select-virtual-mcp-DmwglbWt.js} +1 -1
- package/dist/client/assets/{shell-layout-DaNKzCH1.js → shell-layout-BKPGcmv4.js} +2 -2
- package/dist/client/assets/{sidebar-settings-CArfFMjP.js → sidebar-settings-Bvnz3xIL.js} +1 -1
- package/dist/client/assets/{skeleton-DdkQJ8Ke.js → skeleton-CxmuAljC.js} +1 -1
- package/dist/client/assets/{spinner-BbwK2nZf.js → spinner-Bvsf8yBr.js} +1 -1
- package/dist/client/assets/{store-invite-38lQwS2V.js → store-invite-B3ZITnmR.js} +1 -1
- package/dist/client/assets/{switch-C4iOvYgm.js → switch-DgSoD5A_.js} +1 -1
- package/dist/client/assets/{table-CvG2iH0y.js → table-6Exocylh.js} +1 -1
- package/dist/client/assets/{tabs-D48yslt8.js → tabs-BawFIUQp.js} +1 -1
- package/dist/client/assets/{task-status-CfdaAVDd.js → task-status-DCcRj1iH.js} +32 -32
- package/dist/client/assets/tasks-BXLnBJIq.js +1 -0
- package/dist/client/assets/{tasks-panel-CngVyrSR.js → tasks-panel-DWjSzHZC.js} +1 -1
- package/dist/client/assets/{textarea-pMGiDvfM.js → textarea-DdRl57bf.js} +1 -1
- package/dist/client/assets/{time-range-picker-hMmDbLQS.js → time-range-picker-DOqabEZA.js} +1 -1
- package/dist/client/assets/{toggle-group-DB7gCSVI.js → toggle-group-B0IrEjNf.js} +1 -1
- package/dist/client/assets/{tools-list-DqDOl_iw.js → tools-list-DbIvei1P.js} +1 -1
- package/dist/client/assets/{tooltip-BYpVdvUr.js → tooltip-xl3GoSVP.js} +1 -1
- package/dist/client/assets/{topbar-portal-BT3L0OHL.js → topbar-portal-DVwzk_zs.js} +1 -1
- package/dist/client/assets/{types-1J8PljZw.js → types-DPAE4wXV.js} +1 -1
- package/dist/client/assets/{use-automations-BMRGIsk5.js → use-automations-BTjhSzA_.js} +1 -1
- package/dist/client/assets/{use-collections-DNZPF16v.js → use-collections-Bqp5H9bu.js} +1 -1
- package/dist/client/assets/{use-connection-OaJxXLK-.js → use-connection-De5rVqrE.js} +1 -1
- package/dist/client/assets/{use-copy-RSAu7_j7.js → use-copy-CogCWJQ7.js} +1 -1
- package/dist/client/assets/{use-create-virtual-mcp-CrkA34pw.js → use-create-virtual-mcp-CdSUPhk5.js} +1 -1
- package/dist/client/assets/{use-infinite-scroll-cI-C0iaq.js → use-infinite-scroll-CQVKBMoy.js} +1 -1
- package/dist/client/assets/{use-install-from-registry-Cw1tOxSk.js → use-install-from-registry-D7V-rpJ0.js} +1 -1
- package/dist/client/assets/{use-list-state-CSTOpaV4.js → use-list-state-BtvQgv8T.js} +1 -1
- package/dist/client/assets/{use-mcp-prompts-FfAzq9P9.js → use-mcp-prompts-k7CgkVwI.js} +1 -1
- package/dist/client/assets/{use-mcp-resources-Jm6NvGgP.js → use-mcp-resources-BfKeTtfq.js} +1 -1
- package/dist/client/assets/{use-mcp-tools-B10GVMq1.js → use-mcp-tools-iD-VGNhw.js} +1 -1
- package/dist/client/assets/{use-members-BEgSet5G.js → use-members-CYI2sNHs.js} +1 -1
- package/dist/client/assets/{use-project-BxO41BBL.js → use-project-DdgxiICX.js} +1 -1
- package/dist/client/assets/{use-store-discovery-DVCWh6aJ.js → use-store-discovery-DdbArpnw.js} +1 -1
- package/dist/client/assets/{use-view-mode-0u9SIVO4.js → use-view-mode-BiSEdh0M.js} +1 -1
- package/dist/client/assets/{use-virtual-mcp-BZiKlRZJ.js → use-virtual-mcp-DxTKYWLn.js} +1 -1
- package/dist/client/assets/useInfiniteQuery-DMnx1-Vs.js +1 -0
- package/dist/client/assets/{useMutation-BaFlpWJP.js → useMutation-C_Uj7oOe.js} +1 -1
- package/dist/client/assets/useQuery-C31bP6Ck.js +1 -0
- package/dist/client/assets/useSuspenseInfiniteQuery-D-WGLpBh.js +1 -0
- package/dist/client/assets/{user-Bx46t5R3.js → user-tg9kwvXU.js} +1 -1
- package/dist/client/assets/{workflow-BIBTFj9e.js → workflow-D6TrKvm2.js} +1 -1
- package/dist/client/index.html +1 -1
- package/dist/server/node_modules/async-exit-hook/CHANGELOG.md +62 -0
- package/dist/server/node_modules/async-exit-hook/index.js +171 -0
- package/dist/server/node_modules/{postgres-array → async-exit-hook}/license +1 -1
- package/dist/server/node_modules/async-exit-hook/package.json +66 -0
- package/dist/server/node_modules/async-exit-hook/readme.md +118 -0
- package/package.json +1 -1
- package/dist/client/assets/constants-BLFOykPL.js +0 -1
- package/dist/client/assets/plugins-D1_YmAIA.js +0 -1
- package/dist/client/assets/tasks-CHK2wNRc.js +0 -1
- package/dist/client/assets/useInfiniteQuery-DzvJ2Vyd.js +0 -1
- package/dist/client/assets/useQuery-DG4WKkPy.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-DKieyXx7.js +0 -1
- package/dist/server/node_modules/pg/LICENSE +0 -21
- 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-int8/LICENSE +0 -13
- package/dist/server/node_modules/pg-int8/README.md +0 -16
- package/dist/server/node_modules/pg-int8/index.js +0 -100
- package/dist/server/node_modules/pg-int8/package.json +0 -24
- package/dist/server/node_modules/pg-pool/LICENSE +0 -21
- package/dist/server/node_modules/pg-pool/README.md +0 -357
- package/dist/server/node_modules/pg-pool/esm/index.mjs +0 -5
- package/dist/server/node_modules/pg-pool/index.js +0 -517
- package/dist/server/node_modules/pg-pool/package.json +0 -51
- package/dist/server/node_modules/pg-protocol/LICENSE +0 -21
- package/dist/server/node_modules/pg-protocol/README.md +0 -3
- package/dist/server/node_modules/pg-protocol/dist/b.d.ts +0 -1
- package/dist/server/node_modules/pg-protocol/dist/b.js +0 -23
- package/dist/server/node_modules/pg-protocol/dist/b.js.map +0 -1
- package/dist/server/node_modules/pg-protocol/dist/buffer-reader.d.ts +0 -15
- package/dist/server/node_modules/pg-protocol/dist/buffer-reader.js +0 -55
- package/dist/server/node_modules/pg-protocol/dist/buffer-reader.js.map +0 -1
- package/dist/server/node_modules/pg-protocol/dist/buffer-writer.d.ts +0 -16
- package/dist/server/node_modules/pg-protocol/dist/buffer-writer.js +0 -81
- package/dist/server/node_modules/pg-protocol/dist/buffer-writer.js.map +0 -1
- package/dist/server/node_modules/pg-protocol/dist/inbound-parser.test.d.ts +0 -1
- package/dist/server/node_modules/pg-protocol/dist/inbound-parser.test.js +0 -530
- package/dist/server/node_modules/pg-protocol/dist/inbound-parser.test.js.map +0 -1
- package/dist/server/node_modules/pg-protocol/dist/index.d.ts +0 -6
- package/dist/server/node_modules/pg-protocol/dist/index.js +0 -15
- package/dist/server/node_modules/pg-protocol/dist/index.js.map +0 -1
- package/dist/server/node_modules/pg-protocol/dist/messages.d.ts +0 -162
- package/dist/server/node_modules/pg-protocol/dist/messages.js +0 -160
- package/dist/server/node_modules/pg-protocol/dist/messages.js.map +0 -1
- package/dist/server/node_modules/pg-protocol/dist/outbound-serializer.test.d.ts +0 -1
- package/dist/server/node_modules/pg-protocol/dist/outbound-serializer.test.js +0 -252
- package/dist/server/node_modules/pg-protocol/dist/outbound-serializer.test.js.map +0 -1
- package/dist/server/node_modules/pg-protocol/dist/parser.d.ts +0 -24
- package/dist/server/node_modules/pg-protocol/dist/parser.js +0 -324
- package/dist/server/node_modules/pg-protocol/dist/parser.js.map +0 -1
- package/dist/server/node_modules/pg-protocol/dist/serializer.d.ts +0 -42
- package/dist/server/node_modules/pg-protocol/dist/serializer.js +0 -189
- package/dist/server/node_modules/pg-protocol/dist/serializer.js.map +0 -1
- package/dist/server/node_modules/pg-protocol/esm/index.js +0 -11
- package/dist/server/node_modules/pg-protocol/package.json +0 -45
- package/dist/server/node_modules/pg-protocol/src/b.ts +0 -25
- package/dist/server/node_modules/pg-protocol/src/buffer-reader.ts +0 -58
- package/dist/server/node_modules/pg-protocol/src/buffer-writer.ts +0 -85
- package/dist/server/node_modules/pg-protocol/src/inbound-parser.test.ts +0 -575
- package/dist/server/node_modules/pg-protocol/src/index.ts +0 -11
- package/dist/server/node_modules/pg-protocol/src/messages.ts +0 -262
- package/dist/server/node_modules/pg-protocol/src/outbound-serializer.test.ts +0 -276
- package/dist/server/node_modules/pg-protocol/src/parser.ts +0 -413
- package/dist/server/node_modules/pg-protocol/src/serializer.ts +0 -274
- package/dist/server/node_modules/pg-protocol/src/testing/buffer-list.ts +0 -67
- package/dist/server/node_modules/pg-protocol/src/testing/test-buffers.ts +0 -166
- package/dist/server/node_modules/pg-protocol/src/types/chunky.d.ts +0 -1
- package/dist/server/node_modules/pg-types/.travis.yml +0 -7
- package/dist/server/node_modules/pg-types/Makefile +0 -14
- package/dist/server/node_modules/pg-types/README.md +0 -75
- package/dist/server/node_modules/pg-types/index.d.ts +0 -137
- package/dist/server/node_modules/pg-types/index.js +0 -47
- package/dist/server/node_modules/pg-types/index.test-d.ts +0 -21
- package/dist/server/node_modules/pg-types/lib/arrayParser.js +0 -11
- package/dist/server/node_modules/pg-types/lib/binaryParsers.js +0 -257
- package/dist/server/node_modules/pg-types/lib/builtins.js +0 -73
- package/dist/server/node_modules/pg-types/lib/textParsers.js +0 -215
- package/dist/server/node_modules/pg-types/package.json +0 -42
- package/dist/server/node_modules/pg-types/test/index.js +0 -24
- package/dist/server/node_modules/pg-types/test/types.js +0 -597
- package/dist/server/node_modules/postgres-array/index.d.ts +0 -4
- package/dist/server/node_modules/postgres-array/index.js +0 -97
- package/dist/server/node_modules/postgres-array/package.json +0 -35
- package/dist/server/node_modules/postgres-array/readme.md +0 -43
- package/dist/server/node_modules/postgres-date/index.js +0 -116
- package/dist/server/node_modules/postgres-date/license +0 -21
- package/dist/server/node_modules/postgres-date/package.json +0 -33
- package/dist/server/node_modules/postgres-date/readme.md +0 -49
- package/dist/server/node_modules/split2/LICENSE +0 -13
- package/dist/server/node_modules/split2/README.md +0 -85
- package/dist/server/node_modules/split2/bench.js +0 -27
- package/dist/server/node_modules/split2/index.js +0 -141
- package/dist/server/node_modules/split2/package.json +0 -39
- package/dist/server/node_modules/split2/test.js +0 -409
- package/dist/server/node_modules/xtend/.jshintrc +0 -30
- package/dist/server/node_modules/xtend/LICENSE +0 -20
- package/dist/server/node_modules/xtend/README.md +0 -32
- package/dist/server/node_modules/xtend/immutable.js +0 -19
- package/dist/server/node_modules/xtend/mutable.js +0 -17
- package/dist/server/node_modules/xtend/package.json +0 -55
- package/dist/server/node_modules/xtend/test.js +0 -103
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
export class BufferReader {
|
|
2
|
-
private buffer: Buffer = Buffer.allocUnsafe(0)
|
|
3
|
-
|
|
4
|
-
// TODO(bmc): support non-utf8 encoding?
|
|
5
|
-
private encoding: string = 'utf-8'
|
|
6
|
-
|
|
7
|
-
constructor(private offset: number = 0) {}
|
|
8
|
-
|
|
9
|
-
public setBuffer(offset: number, buffer: Buffer): void {
|
|
10
|
-
this.offset = offset
|
|
11
|
-
this.buffer = buffer
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
public int16(): number {
|
|
15
|
-
const result = this.buffer.readInt16BE(this.offset)
|
|
16
|
-
this.offset += 2
|
|
17
|
-
return result
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
public byte(): number {
|
|
21
|
-
const result = this.buffer[this.offset]
|
|
22
|
-
this.offset++
|
|
23
|
-
return result
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
public int32(): number {
|
|
27
|
-
const result = this.buffer.readInt32BE(this.offset)
|
|
28
|
-
this.offset += 4
|
|
29
|
-
return result
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
public uint32(): number {
|
|
33
|
-
const result = this.buffer.readUInt32BE(this.offset)
|
|
34
|
-
this.offset += 4
|
|
35
|
-
return result
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
public string(length: number): string {
|
|
39
|
-
const result = this.buffer.toString(this.encoding, this.offset, this.offset + length)
|
|
40
|
-
this.offset += length
|
|
41
|
-
return result
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
public cstring(): string {
|
|
45
|
-
const start = this.offset
|
|
46
|
-
let end = start
|
|
47
|
-
// eslint-disable-next-line no-empty
|
|
48
|
-
while (this.buffer[end++] !== 0) {}
|
|
49
|
-
this.offset = end
|
|
50
|
-
return this.buffer.toString(this.encoding, start, end - 1)
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
public bytes(length: number): Buffer {
|
|
54
|
-
const result = this.buffer.slice(this.offset, this.offset + length)
|
|
55
|
-
this.offset += length
|
|
56
|
-
return result
|
|
57
|
-
}
|
|
58
|
-
}
|
|
@@ -1,85 +0,0 @@
|
|
|
1
|
-
//binary data writer tuned for encoding binary specific to the postgres binary protocol
|
|
2
|
-
|
|
3
|
-
export class Writer {
|
|
4
|
-
private buffer: Buffer
|
|
5
|
-
private offset: number = 5
|
|
6
|
-
private headerPosition: number = 0
|
|
7
|
-
constructor(private size = 256) {
|
|
8
|
-
this.buffer = Buffer.allocUnsafe(size)
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
private ensure(size: number): void {
|
|
12
|
-
const remaining = this.buffer.length - this.offset
|
|
13
|
-
if (remaining < size) {
|
|
14
|
-
const oldBuffer = this.buffer
|
|
15
|
-
// exponential growth factor of around ~ 1.5
|
|
16
|
-
// https://stackoverflow.com/questions/2269063/buffer-growth-strategy
|
|
17
|
-
const newSize = oldBuffer.length + (oldBuffer.length >> 1) + size
|
|
18
|
-
this.buffer = Buffer.allocUnsafe(newSize)
|
|
19
|
-
oldBuffer.copy(this.buffer)
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
public addInt32(num: number): Writer {
|
|
24
|
-
this.ensure(4)
|
|
25
|
-
this.buffer[this.offset++] = (num >>> 24) & 0xff
|
|
26
|
-
this.buffer[this.offset++] = (num >>> 16) & 0xff
|
|
27
|
-
this.buffer[this.offset++] = (num >>> 8) & 0xff
|
|
28
|
-
this.buffer[this.offset++] = (num >>> 0) & 0xff
|
|
29
|
-
return this
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
public addInt16(num: number): Writer {
|
|
33
|
-
this.ensure(2)
|
|
34
|
-
this.buffer[this.offset++] = (num >>> 8) & 0xff
|
|
35
|
-
this.buffer[this.offset++] = (num >>> 0) & 0xff
|
|
36
|
-
return this
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
public addCString(string: string): Writer {
|
|
40
|
-
if (!string) {
|
|
41
|
-
this.ensure(1)
|
|
42
|
-
} else {
|
|
43
|
-
const len = Buffer.byteLength(string)
|
|
44
|
-
this.ensure(len + 1) // +1 for null terminator
|
|
45
|
-
this.buffer.write(string, this.offset, 'utf-8')
|
|
46
|
-
this.offset += len
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
this.buffer[this.offset++] = 0 // null terminator
|
|
50
|
-
return this
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
public addString(string: string = ''): Writer {
|
|
54
|
-
const len = Buffer.byteLength(string)
|
|
55
|
-
this.ensure(len)
|
|
56
|
-
this.buffer.write(string, this.offset)
|
|
57
|
-
this.offset += len
|
|
58
|
-
return this
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
public add(otherBuffer: Buffer): Writer {
|
|
62
|
-
this.ensure(otherBuffer.length)
|
|
63
|
-
otherBuffer.copy(this.buffer, this.offset)
|
|
64
|
-
this.offset += otherBuffer.length
|
|
65
|
-
return this
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
private join(code?: number): Buffer {
|
|
69
|
-
if (code) {
|
|
70
|
-
this.buffer[this.headerPosition] = code
|
|
71
|
-
//length is everything in this packet minus the code
|
|
72
|
-
const length = this.offset - (this.headerPosition + 1)
|
|
73
|
-
this.buffer.writeInt32BE(length, this.headerPosition + 1)
|
|
74
|
-
}
|
|
75
|
-
return this.buffer.slice(code ? 0 : 5, this.offset)
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
public flush(code?: number): Buffer {
|
|
79
|
-
const result = this.join(code)
|
|
80
|
-
this.offset = 5
|
|
81
|
-
this.headerPosition = 0
|
|
82
|
-
this.buffer = Buffer.allocUnsafe(this.size)
|
|
83
|
-
return result
|
|
84
|
-
}
|
|
85
|
-
}
|
|
@@ -1,575 +0,0 @@
|
|
|
1
|
-
import buffers from './testing/test-buffers'
|
|
2
|
-
import BufferList from './testing/buffer-list'
|
|
3
|
-
import { parse } from '.'
|
|
4
|
-
import assert from 'assert'
|
|
5
|
-
import { PassThrough } from 'stream'
|
|
6
|
-
import { BackendMessage } from './messages'
|
|
7
|
-
import { Parser } from './parser'
|
|
8
|
-
|
|
9
|
-
const authOkBuffer = buffers.authenticationOk()
|
|
10
|
-
const paramStatusBuffer = buffers.parameterStatus('client_encoding', 'UTF8')
|
|
11
|
-
const readyForQueryBuffer = buffers.readyForQuery()
|
|
12
|
-
const backendKeyDataBuffer = buffers.backendKeyData(1, 2)
|
|
13
|
-
const commandCompleteBuffer = buffers.commandComplete('SELECT 3')
|
|
14
|
-
const parseCompleteBuffer = buffers.parseComplete()
|
|
15
|
-
const bindCompleteBuffer = buffers.bindComplete()
|
|
16
|
-
const portalSuspendedBuffer = buffers.portalSuspended()
|
|
17
|
-
|
|
18
|
-
const row1 = {
|
|
19
|
-
name: 'id',
|
|
20
|
-
tableID: 1,
|
|
21
|
-
attributeNumber: 2,
|
|
22
|
-
dataTypeID: 3,
|
|
23
|
-
dataTypeSize: 4,
|
|
24
|
-
typeModifier: 5,
|
|
25
|
-
formatCode: 0,
|
|
26
|
-
}
|
|
27
|
-
const oneRowDescBuff = buffers.rowDescription([row1])
|
|
28
|
-
row1.name = 'bang'
|
|
29
|
-
|
|
30
|
-
const twoRowBuf = buffers.rowDescription([
|
|
31
|
-
row1,
|
|
32
|
-
{
|
|
33
|
-
name: 'whoah',
|
|
34
|
-
tableID: 10,
|
|
35
|
-
attributeNumber: 11,
|
|
36
|
-
dataTypeID: 12,
|
|
37
|
-
dataTypeSize: 13,
|
|
38
|
-
typeModifier: 14,
|
|
39
|
-
formatCode: 0,
|
|
40
|
-
},
|
|
41
|
-
])
|
|
42
|
-
|
|
43
|
-
const rowWithBigOids = {
|
|
44
|
-
name: 'bigoid',
|
|
45
|
-
tableID: 3000000001,
|
|
46
|
-
attributeNumber: 2,
|
|
47
|
-
dataTypeID: 3000000003,
|
|
48
|
-
dataTypeSize: 4,
|
|
49
|
-
typeModifier: 5,
|
|
50
|
-
formatCode: 0,
|
|
51
|
-
}
|
|
52
|
-
const bigOidDescBuff = buffers.rowDescription([rowWithBigOids])
|
|
53
|
-
|
|
54
|
-
const emptyRowFieldBuf = buffers.dataRow([])
|
|
55
|
-
|
|
56
|
-
const oneFieldBuf = buffers.dataRow(['test'])
|
|
57
|
-
|
|
58
|
-
const expectedAuthenticationOkayMessage = {
|
|
59
|
-
name: 'authenticationOk',
|
|
60
|
-
length: 8,
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
const expectedParameterStatusMessage = {
|
|
64
|
-
name: 'parameterStatus',
|
|
65
|
-
parameterName: 'client_encoding',
|
|
66
|
-
parameterValue: 'UTF8',
|
|
67
|
-
length: 25,
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
const expectedBackendKeyDataMessage = {
|
|
71
|
-
name: 'backendKeyData',
|
|
72
|
-
processID: 1,
|
|
73
|
-
secretKey: 2,
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
const expectedReadyForQueryMessage = {
|
|
77
|
-
name: 'readyForQuery',
|
|
78
|
-
length: 5,
|
|
79
|
-
status: 'I',
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
const expectedCommandCompleteMessage = {
|
|
83
|
-
name: 'commandComplete',
|
|
84
|
-
length: 13,
|
|
85
|
-
text: 'SELECT 3',
|
|
86
|
-
}
|
|
87
|
-
const emptyRowDescriptionBuffer = new BufferList()
|
|
88
|
-
.addInt16(0) // number of fields
|
|
89
|
-
.join(true, 'T')
|
|
90
|
-
|
|
91
|
-
const expectedEmptyRowDescriptionMessage = {
|
|
92
|
-
name: 'rowDescription',
|
|
93
|
-
length: 6,
|
|
94
|
-
fieldCount: 0,
|
|
95
|
-
fields: [],
|
|
96
|
-
}
|
|
97
|
-
const expectedOneRowMessage = {
|
|
98
|
-
name: 'rowDescription',
|
|
99
|
-
length: 27,
|
|
100
|
-
fieldCount: 1,
|
|
101
|
-
fields: [
|
|
102
|
-
{
|
|
103
|
-
name: 'id',
|
|
104
|
-
tableID: 1,
|
|
105
|
-
columnID: 2,
|
|
106
|
-
dataTypeID: 3,
|
|
107
|
-
dataTypeSize: 4,
|
|
108
|
-
dataTypeModifier: 5,
|
|
109
|
-
format: 'text',
|
|
110
|
-
},
|
|
111
|
-
],
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
const expectedTwoRowMessage = {
|
|
115
|
-
name: 'rowDescription',
|
|
116
|
-
length: 53,
|
|
117
|
-
fieldCount: 2,
|
|
118
|
-
fields: [
|
|
119
|
-
{
|
|
120
|
-
name: 'bang',
|
|
121
|
-
tableID: 1,
|
|
122
|
-
columnID: 2,
|
|
123
|
-
dataTypeID: 3,
|
|
124
|
-
dataTypeSize: 4,
|
|
125
|
-
dataTypeModifier: 5,
|
|
126
|
-
format: 'text',
|
|
127
|
-
},
|
|
128
|
-
{
|
|
129
|
-
name: 'whoah',
|
|
130
|
-
tableID: 10,
|
|
131
|
-
columnID: 11,
|
|
132
|
-
dataTypeID: 12,
|
|
133
|
-
dataTypeSize: 13,
|
|
134
|
-
dataTypeModifier: 14,
|
|
135
|
-
format: 'text',
|
|
136
|
-
},
|
|
137
|
-
],
|
|
138
|
-
}
|
|
139
|
-
const expectedBigOidMessage = {
|
|
140
|
-
name: 'rowDescription',
|
|
141
|
-
length: 31,
|
|
142
|
-
fieldCount: 1,
|
|
143
|
-
fields: [
|
|
144
|
-
{
|
|
145
|
-
name: 'bigoid',
|
|
146
|
-
tableID: 3000000001,
|
|
147
|
-
columnID: 2,
|
|
148
|
-
dataTypeID: 3000000003,
|
|
149
|
-
dataTypeSize: 4,
|
|
150
|
-
dataTypeModifier: 5,
|
|
151
|
-
format: 'text',
|
|
152
|
-
},
|
|
153
|
-
],
|
|
154
|
-
}
|
|
155
|
-
|
|
156
|
-
const emptyParameterDescriptionBuffer = new BufferList()
|
|
157
|
-
.addInt16(0) // number of parameters
|
|
158
|
-
.join(true, 't')
|
|
159
|
-
|
|
160
|
-
const oneParameterDescBuf = buffers.parameterDescription([1111])
|
|
161
|
-
|
|
162
|
-
const twoParameterDescBuf = buffers.parameterDescription([2222, 3333])
|
|
163
|
-
|
|
164
|
-
const expectedEmptyParameterDescriptionMessage = {
|
|
165
|
-
name: 'parameterDescription',
|
|
166
|
-
length: 6,
|
|
167
|
-
parameterCount: 0,
|
|
168
|
-
dataTypeIDs: [],
|
|
169
|
-
}
|
|
170
|
-
|
|
171
|
-
const expectedOneParameterMessage = {
|
|
172
|
-
name: 'parameterDescription',
|
|
173
|
-
length: 10,
|
|
174
|
-
parameterCount: 1,
|
|
175
|
-
dataTypeIDs: [1111],
|
|
176
|
-
}
|
|
177
|
-
|
|
178
|
-
const expectedTwoParameterMessage = {
|
|
179
|
-
name: 'parameterDescription',
|
|
180
|
-
length: 14,
|
|
181
|
-
parameterCount: 2,
|
|
182
|
-
dataTypeIDs: [2222, 3333],
|
|
183
|
-
}
|
|
184
|
-
|
|
185
|
-
const testForMessage = function (buffer: Buffer, expectedMessage: any) {
|
|
186
|
-
it('receives and parses ' + expectedMessage.name, async () => {
|
|
187
|
-
const messages = await parseBuffers([buffer])
|
|
188
|
-
const [lastMessage] = messages
|
|
189
|
-
|
|
190
|
-
for (const key in expectedMessage) {
|
|
191
|
-
assert.deepEqual((lastMessage as any)[key], expectedMessage[key])
|
|
192
|
-
}
|
|
193
|
-
})
|
|
194
|
-
}
|
|
195
|
-
|
|
196
|
-
const plainPasswordBuffer = buffers.authenticationCleartextPassword()
|
|
197
|
-
const md5PasswordBuffer = buffers.authenticationMD5Password()
|
|
198
|
-
const SASLBuffer = buffers.authenticationSASL()
|
|
199
|
-
const SASLContinueBuffer = buffers.authenticationSASLContinue()
|
|
200
|
-
const SASLFinalBuffer = buffers.authenticationSASLFinal()
|
|
201
|
-
|
|
202
|
-
const expectedPlainPasswordMessage = {
|
|
203
|
-
name: 'authenticationCleartextPassword',
|
|
204
|
-
}
|
|
205
|
-
|
|
206
|
-
const expectedMD5PasswordMessage = {
|
|
207
|
-
name: 'authenticationMD5Password',
|
|
208
|
-
salt: Buffer.from([1, 2, 3, 4]),
|
|
209
|
-
}
|
|
210
|
-
|
|
211
|
-
const expectedSASLMessage = {
|
|
212
|
-
name: 'authenticationSASL',
|
|
213
|
-
mechanisms: ['SCRAM-SHA-256'],
|
|
214
|
-
}
|
|
215
|
-
|
|
216
|
-
const expectedSASLContinueMessage = {
|
|
217
|
-
name: 'authenticationSASLContinue',
|
|
218
|
-
data: 'data',
|
|
219
|
-
}
|
|
220
|
-
|
|
221
|
-
const expectedSASLFinalMessage = {
|
|
222
|
-
name: 'authenticationSASLFinal',
|
|
223
|
-
data: 'data',
|
|
224
|
-
}
|
|
225
|
-
|
|
226
|
-
const notificationResponseBuffer = buffers.notification(4, 'hi', 'boom')
|
|
227
|
-
const expectedNotificationResponseMessage = {
|
|
228
|
-
name: 'notification',
|
|
229
|
-
processId: 4,
|
|
230
|
-
channel: 'hi',
|
|
231
|
-
payload: 'boom',
|
|
232
|
-
}
|
|
233
|
-
|
|
234
|
-
const parseBuffers = async (buffers: Buffer[]): Promise<BackendMessage[]> => {
|
|
235
|
-
const stream = new PassThrough()
|
|
236
|
-
for (const buffer of buffers) {
|
|
237
|
-
stream.write(buffer)
|
|
238
|
-
}
|
|
239
|
-
stream.end()
|
|
240
|
-
const msgs: BackendMessage[] = []
|
|
241
|
-
await parse(stream, (msg) => msgs.push(msg))
|
|
242
|
-
return msgs
|
|
243
|
-
}
|
|
244
|
-
|
|
245
|
-
describe('PgPacketStream', function () {
|
|
246
|
-
testForMessage(authOkBuffer, expectedAuthenticationOkayMessage)
|
|
247
|
-
testForMessage(plainPasswordBuffer, expectedPlainPasswordMessage)
|
|
248
|
-
testForMessage(md5PasswordBuffer, expectedMD5PasswordMessage)
|
|
249
|
-
testForMessage(SASLBuffer, expectedSASLMessage)
|
|
250
|
-
testForMessage(SASLContinueBuffer, expectedSASLContinueMessage)
|
|
251
|
-
|
|
252
|
-
// this exercises a found bug in the parser:
|
|
253
|
-
// https://github.com/brianc/node-postgres/pull/2210#issuecomment-627626084
|
|
254
|
-
// and adds a test which is deterministic, rather than relying on network packet chunking
|
|
255
|
-
const extendedSASLContinueBuffer = Buffer.concat([SASLContinueBuffer, Buffer.from([1, 2, 3, 4])])
|
|
256
|
-
testForMessage(extendedSASLContinueBuffer, expectedSASLContinueMessage)
|
|
257
|
-
|
|
258
|
-
testForMessage(SASLFinalBuffer, expectedSASLFinalMessage)
|
|
259
|
-
|
|
260
|
-
// this exercises a found bug in the parser:
|
|
261
|
-
// https://github.com/brianc/node-postgres/pull/2210#issuecomment-627626084
|
|
262
|
-
// and adds a test which is deterministic, rather than relying on network packet chunking
|
|
263
|
-
const extendedSASLFinalBuffer = Buffer.concat([SASLFinalBuffer, Buffer.from([1, 2, 4, 5])])
|
|
264
|
-
testForMessage(extendedSASLFinalBuffer, expectedSASLFinalMessage)
|
|
265
|
-
|
|
266
|
-
testForMessage(paramStatusBuffer, expectedParameterStatusMessage)
|
|
267
|
-
testForMessage(backendKeyDataBuffer, expectedBackendKeyDataMessage)
|
|
268
|
-
testForMessage(readyForQueryBuffer, expectedReadyForQueryMessage)
|
|
269
|
-
testForMessage(commandCompleteBuffer, expectedCommandCompleteMessage)
|
|
270
|
-
testForMessage(notificationResponseBuffer, expectedNotificationResponseMessage)
|
|
271
|
-
testForMessage(buffers.emptyQuery(), {
|
|
272
|
-
name: 'emptyQuery',
|
|
273
|
-
length: 4,
|
|
274
|
-
})
|
|
275
|
-
|
|
276
|
-
testForMessage(Buffer.from([0x6e, 0, 0, 0, 4]), {
|
|
277
|
-
name: 'noData',
|
|
278
|
-
})
|
|
279
|
-
|
|
280
|
-
describe('rowDescription messages', function () {
|
|
281
|
-
testForMessage(emptyRowDescriptionBuffer, expectedEmptyRowDescriptionMessage)
|
|
282
|
-
testForMessage(oneRowDescBuff, expectedOneRowMessage)
|
|
283
|
-
testForMessage(twoRowBuf, expectedTwoRowMessage)
|
|
284
|
-
testForMessage(bigOidDescBuff, expectedBigOidMessage)
|
|
285
|
-
})
|
|
286
|
-
|
|
287
|
-
describe('parameterDescription messages', function () {
|
|
288
|
-
testForMessage(emptyParameterDescriptionBuffer, expectedEmptyParameterDescriptionMessage)
|
|
289
|
-
testForMessage(oneParameterDescBuf, expectedOneParameterMessage)
|
|
290
|
-
testForMessage(twoParameterDescBuf, expectedTwoParameterMessage)
|
|
291
|
-
})
|
|
292
|
-
|
|
293
|
-
describe('parsing rows', function () {
|
|
294
|
-
describe('parsing empty row', function () {
|
|
295
|
-
testForMessage(emptyRowFieldBuf, {
|
|
296
|
-
name: 'dataRow',
|
|
297
|
-
fieldCount: 0,
|
|
298
|
-
})
|
|
299
|
-
})
|
|
300
|
-
|
|
301
|
-
describe('parsing data row with fields', function () {
|
|
302
|
-
testForMessage(oneFieldBuf, {
|
|
303
|
-
name: 'dataRow',
|
|
304
|
-
fieldCount: 1,
|
|
305
|
-
fields: ['test'],
|
|
306
|
-
})
|
|
307
|
-
})
|
|
308
|
-
})
|
|
309
|
-
|
|
310
|
-
describe('notice message', function () {
|
|
311
|
-
// this uses the same logic as error message
|
|
312
|
-
const buff = buffers.notice([{ type: 'C', value: 'code' }])
|
|
313
|
-
testForMessage(buff, {
|
|
314
|
-
name: 'notice',
|
|
315
|
-
code: 'code',
|
|
316
|
-
})
|
|
317
|
-
})
|
|
318
|
-
|
|
319
|
-
testForMessage(buffers.error([]), {
|
|
320
|
-
name: 'error',
|
|
321
|
-
})
|
|
322
|
-
|
|
323
|
-
describe('with all the fields', function () {
|
|
324
|
-
const buffer = buffers.error([
|
|
325
|
-
{
|
|
326
|
-
type: 'S',
|
|
327
|
-
value: 'ERROR',
|
|
328
|
-
},
|
|
329
|
-
{
|
|
330
|
-
type: 'C',
|
|
331
|
-
value: 'code',
|
|
332
|
-
},
|
|
333
|
-
{
|
|
334
|
-
type: 'M',
|
|
335
|
-
value: 'message',
|
|
336
|
-
},
|
|
337
|
-
{
|
|
338
|
-
type: 'D',
|
|
339
|
-
value: 'details',
|
|
340
|
-
},
|
|
341
|
-
{
|
|
342
|
-
type: 'H',
|
|
343
|
-
value: 'hint',
|
|
344
|
-
},
|
|
345
|
-
{
|
|
346
|
-
type: 'P',
|
|
347
|
-
value: '100',
|
|
348
|
-
},
|
|
349
|
-
{
|
|
350
|
-
type: 'p',
|
|
351
|
-
value: '101',
|
|
352
|
-
},
|
|
353
|
-
{
|
|
354
|
-
type: 'q',
|
|
355
|
-
value: 'query',
|
|
356
|
-
},
|
|
357
|
-
{
|
|
358
|
-
type: 'W',
|
|
359
|
-
value: 'where',
|
|
360
|
-
},
|
|
361
|
-
{
|
|
362
|
-
type: 'F',
|
|
363
|
-
value: 'file',
|
|
364
|
-
},
|
|
365
|
-
{
|
|
366
|
-
type: 'L',
|
|
367
|
-
value: 'line',
|
|
368
|
-
},
|
|
369
|
-
{
|
|
370
|
-
type: 'R',
|
|
371
|
-
value: 'routine',
|
|
372
|
-
},
|
|
373
|
-
{
|
|
374
|
-
type: 'Z', // ignored
|
|
375
|
-
value: 'alsdkf',
|
|
376
|
-
},
|
|
377
|
-
])
|
|
378
|
-
|
|
379
|
-
testForMessage(buffer, {
|
|
380
|
-
name: 'error',
|
|
381
|
-
severity: 'ERROR',
|
|
382
|
-
code: 'code',
|
|
383
|
-
message: 'message',
|
|
384
|
-
detail: 'details',
|
|
385
|
-
hint: 'hint',
|
|
386
|
-
position: '100',
|
|
387
|
-
internalPosition: '101',
|
|
388
|
-
internalQuery: 'query',
|
|
389
|
-
where: 'where',
|
|
390
|
-
file: 'file',
|
|
391
|
-
line: 'line',
|
|
392
|
-
routine: 'routine',
|
|
393
|
-
})
|
|
394
|
-
})
|
|
395
|
-
|
|
396
|
-
testForMessage(parseCompleteBuffer, {
|
|
397
|
-
name: 'parseComplete',
|
|
398
|
-
})
|
|
399
|
-
|
|
400
|
-
testForMessage(bindCompleteBuffer, {
|
|
401
|
-
name: 'bindComplete',
|
|
402
|
-
})
|
|
403
|
-
|
|
404
|
-
testForMessage(bindCompleteBuffer, {
|
|
405
|
-
name: 'bindComplete',
|
|
406
|
-
})
|
|
407
|
-
|
|
408
|
-
testForMessage(buffers.closeComplete(), {
|
|
409
|
-
name: 'closeComplete',
|
|
410
|
-
})
|
|
411
|
-
|
|
412
|
-
describe('parses portal suspended message', function () {
|
|
413
|
-
testForMessage(portalSuspendedBuffer, {
|
|
414
|
-
name: 'portalSuspended',
|
|
415
|
-
})
|
|
416
|
-
})
|
|
417
|
-
|
|
418
|
-
describe('parses replication start message', function () {
|
|
419
|
-
testForMessage(Buffer.from([0x57, 0x00, 0x00, 0x00, 0x04]), {
|
|
420
|
-
name: 'replicationStart',
|
|
421
|
-
length: 4,
|
|
422
|
-
})
|
|
423
|
-
})
|
|
424
|
-
|
|
425
|
-
describe('copy', () => {
|
|
426
|
-
testForMessage(buffers.copyIn(0), {
|
|
427
|
-
name: 'copyInResponse',
|
|
428
|
-
length: 7,
|
|
429
|
-
binary: false,
|
|
430
|
-
columnTypes: [],
|
|
431
|
-
})
|
|
432
|
-
|
|
433
|
-
testForMessage(buffers.copyIn(2), {
|
|
434
|
-
name: 'copyInResponse',
|
|
435
|
-
length: 11,
|
|
436
|
-
binary: false,
|
|
437
|
-
columnTypes: [0, 1],
|
|
438
|
-
})
|
|
439
|
-
|
|
440
|
-
testForMessage(buffers.copyOut(0), {
|
|
441
|
-
name: 'copyOutResponse',
|
|
442
|
-
length: 7,
|
|
443
|
-
binary: false,
|
|
444
|
-
columnTypes: [],
|
|
445
|
-
})
|
|
446
|
-
|
|
447
|
-
testForMessage(buffers.copyOut(3), {
|
|
448
|
-
name: 'copyOutResponse',
|
|
449
|
-
length: 13,
|
|
450
|
-
binary: false,
|
|
451
|
-
columnTypes: [0, 1, 2],
|
|
452
|
-
})
|
|
453
|
-
|
|
454
|
-
testForMessage(buffers.copyDone(), {
|
|
455
|
-
name: 'copyDone',
|
|
456
|
-
length: 4,
|
|
457
|
-
})
|
|
458
|
-
|
|
459
|
-
testForMessage(buffers.copyData(Buffer.from([5, 6, 7])), {
|
|
460
|
-
name: 'copyData',
|
|
461
|
-
length: 7,
|
|
462
|
-
chunk: Buffer.from([5, 6, 7]),
|
|
463
|
-
})
|
|
464
|
-
})
|
|
465
|
-
|
|
466
|
-
// since the data message on a stream can randomly divide the incomming
|
|
467
|
-
// tcp packets anywhere, we need to make sure we can parse every single
|
|
468
|
-
// split on a tcp message
|
|
469
|
-
describe('split buffer, single message parsing', function () {
|
|
470
|
-
const fullBuffer = buffers.dataRow([null, 'bang', 'zug zug', null, '!'])
|
|
471
|
-
|
|
472
|
-
it('parses when full buffer comes in', async function () {
|
|
473
|
-
const messages = await parseBuffers([fullBuffer])
|
|
474
|
-
const message = messages[0] as any
|
|
475
|
-
assert.equal(message.fields.length, 5)
|
|
476
|
-
assert.equal(message.fields[0], null)
|
|
477
|
-
assert.equal(message.fields[1], 'bang')
|
|
478
|
-
assert.equal(message.fields[2], 'zug zug')
|
|
479
|
-
assert.equal(message.fields[3], null)
|
|
480
|
-
assert.equal(message.fields[4], '!')
|
|
481
|
-
})
|
|
482
|
-
|
|
483
|
-
const testMessageReceivedAfterSplitAt = async function (split: number) {
|
|
484
|
-
const firstBuffer = Buffer.alloc(fullBuffer.length - split)
|
|
485
|
-
const secondBuffer = Buffer.alloc(fullBuffer.length - firstBuffer.length)
|
|
486
|
-
fullBuffer.copy(firstBuffer, 0, 0)
|
|
487
|
-
fullBuffer.copy(secondBuffer, 0, firstBuffer.length)
|
|
488
|
-
const messages = await parseBuffers([firstBuffer, secondBuffer])
|
|
489
|
-
const message = messages[0] as any
|
|
490
|
-
assert.equal(message.fields.length, 5)
|
|
491
|
-
assert.equal(message.fields[0], null)
|
|
492
|
-
assert.equal(message.fields[1], 'bang')
|
|
493
|
-
assert.equal(message.fields[2], 'zug zug')
|
|
494
|
-
assert.equal(message.fields[3], null)
|
|
495
|
-
assert.equal(message.fields[4], '!')
|
|
496
|
-
}
|
|
497
|
-
|
|
498
|
-
it('parses when split in the middle', function () {
|
|
499
|
-
return testMessageReceivedAfterSplitAt(6)
|
|
500
|
-
})
|
|
501
|
-
|
|
502
|
-
it('parses when split at end', function () {
|
|
503
|
-
return testMessageReceivedAfterSplitAt(2)
|
|
504
|
-
})
|
|
505
|
-
|
|
506
|
-
it('parses when split at beginning', function () {
|
|
507
|
-
return Promise.all([
|
|
508
|
-
testMessageReceivedAfterSplitAt(fullBuffer.length - 2),
|
|
509
|
-
testMessageReceivedAfterSplitAt(fullBuffer.length - 1),
|
|
510
|
-
testMessageReceivedAfterSplitAt(fullBuffer.length - 5),
|
|
511
|
-
])
|
|
512
|
-
})
|
|
513
|
-
})
|
|
514
|
-
|
|
515
|
-
describe('split buffer, multiple message parsing', function () {
|
|
516
|
-
const dataRowBuffer = buffers.dataRow(['!'])
|
|
517
|
-
const readyForQueryBuffer = buffers.readyForQuery()
|
|
518
|
-
const fullBuffer = Buffer.alloc(dataRowBuffer.length + readyForQueryBuffer.length)
|
|
519
|
-
dataRowBuffer.copy(fullBuffer, 0, 0)
|
|
520
|
-
readyForQueryBuffer.copy(fullBuffer, dataRowBuffer.length, 0)
|
|
521
|
-
|
|
522
|
-
const verifyMessages = function (messages: any[]) {
|
|
523
|
-
assert.strictEqual(messages.length, 2)
|
|
524
|
-
assert.deepEqual(messages[0], {
|
|
525
|
-
name: 'dataRow',
|
|
526
|
-
fieldCount: 1,
|
|
527
|
-
length: 11,
|
|
528
|
-
fields: ['!'],
|
|
529
|
-
})
|
|
530
|
-
assert.equal(messages[0].fields[0], '!')
|
|
531
|
-
assert.deepEqual(messages[1], {
|
|
532
|
-
name: 'readyForQuery',
|
|
533
|
-
length: 5,
|
|
534
|
-
status: 'I',
|
|
535
|
-
})
|
|
536
|
-
}
|
|
537
|
-
// sanity check
|
|
538
|
-
it('receives both messages when packet is not split', async function () {
|
|
539
|
-
const messages = await parseBuffers([fullBuffer])
|
|
540
|
-
verifyMessages(messages)
|
|
541
|
-
})
|
|
542
|
-
|
|
543
|
-
const splitAndVerifyTwoMessages = async function (split: number) {
|
|
544
|
-
const firstBuffer = Buffer.alloc(fullBuffer.length - split)
|
|
545
|
-
const secondBuffer = Buffer.alloc(fullBuffer.length - firstBuffer.length)
|
|
546
|
-
fullBuffer.copy(firstBuffer, 0, 0)
|
|
547
|
-
fullBuffer.copy(secondBuffer, 0, firstBuffer.length)
|
|
548
|
-
const messages = await parseBuffers([firstBuffer, secondBuffer])
|
|
549
|
-
verifyMessages(messages)
|
|
550
|
-
}
|
|
551
|
-
|
|
552
|
-
describe('receives both messages when packet is split', function () {
|
|
553
|
-
it('in the middle', function () {
|
|
554
|
-
return splitAndVerifyTwoMessages(11)
|
|
555
|
-
})
|
|
556
|
-
it('at the front', function () {
|
|
557
|
-
return Promise.all([
|
|
558
|
-
splitAndVerifyTwoMessages(fullBuffer.length - 1),
|
|
559
|
-
splitAndVerifyTwoMessages(fullBuffer.length - 4),
|
|
560
|
-
splitAndVerifyTwoMessages(fullBuffer.length - 6),
|
|
561
|
-
])
|
|
562
|
-
})
|
|
563
|
-
|
|
564
|
-
it('at the end', function () {
|
|
565
|
-
return Promise.all([splitAndVerifyTwoMessages(8), splitAndVerifyTwoMessages(1)])
|
|
566
|
-
})
|
|
567
|
-
})
|
|
568
|
-
})
|
|
569
|
-
|
|
570
|
-
it('cleans up the reader after handling a packet', function () {
|
|
571
|
-
const parser = new Parser()
|
|
572
|
-
parser.parse(oneFieldBuf, () => {})
|
|
573
|
-
assert.strictEqual((parser as any).reader.buffer.byteLength, 0)
|
|
574
|
-
})
|
|
575
|
-
})
|