decocms 2.311.1 → 2.311.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-GVxuU95v.js → AlertCircle-DZ5eg3QE.js} +1 -1
- package/dist/client/assets/{ArrowNarrowLeft-CZSxj8rY.js → ArrowNarrowLeft-1yI5FVCq.js} +1 -1
- package/dist/client/assets/{ArrowUpRight-C9_9n6RS.js → ArrowUpRight-BHidxwxm.js} +1 -1
- package/dist/client/assets/{Check-B7RZVj2P.js → Check-Dw0791ut.js} +1 -1
- package/dist/client/assets/{CheckCircle-CpSCTcKF.js → CheckCircle-BpVjAVGG.js} +1 -1
- package/dist/client/assets/{ChevronDown-PN1FfGGP.js → ChevronDown-C4G6jLVm.js} +1 -1
- package/dist/client/assets/{ChevronRight-B87-4gCD.js → ChevronRight-L-rlViOq.js} +1 -1
- package/dist/client/assets/{ChevronUp-DXZ6bMcP.js → ChevronUp-4oGwYYrV.js} +1 -1
- package/dist/client/assets/{Container-Bn1bP0Yi.js → Container-1OJhud4n.js} +1 -1
- package/dist/client/assets/{DotsVertical-0NEZeBK_.js → DotsVertical-CRhKzL3Z.js} +1 -1
- package/dist/client/assets/{LinkExternal01-Cl6M9_6y.js → LinkExternal01-CT0C3v5M.js} +1 -1
- package/dist/client/assets/{Lock01-BNDVtNp3.js → Lock01-NALqVAd4.js} +1 -1
- package/dist/client/assets/{Palette-BgYWS9GS.js → Palette-B49S2k5j.js} +1 -1
- package/dist/client/assets/{Play-jAQMD8Zy.js → Play-D2-YC-0X.js} +1 -1
- package/dist/client/assets/{Plus-Decn041v.js → Plus-BwRT24yO.js} +1 -1
- package/dist/client/assets/{RefreshCcw01-2tEGwXNO.js → RefreshCcw01-BJA8p2-V.js} +1 -1
- package/dist/client/assets/{SearchMd-xzJx66s8.js → SearchMd-8EQr6MDa.js} +1 -1
- package/dist/client/assets/{Settings02-I39qsUEU.js → Settings02-BR7-LgkT.js} +1 -1
- package/dist/client/assets/{Shield01-DJsSZNak.js → Shield01-CmUy76z8.js} +1 -1
- package/dist/client/assets/{Star01-VbAdZ1nM.js → Star01-CrZZMK_h.js} +1 -1
- package/dist/client/assets/{Sun-qACU13Q-.js → Sun-BrBo82rN.js} +1 -1
- package/dist/client/assets/{Tool01-BqlBf1k7.js → Tool01-CnVLW8Ff.js} +1 -1
- package/dist/client/assets/{Trash01-BqSCZqrj.js → Trash01-CqcArs7X.js} +1 -1
- package/dist/client/assets/{User01-w8zyOHhj.js → User01-CBWDKiqM.js} +1 -1
- package/dist/client/assets/{Users03-n9zzJAad.js → Users03-lMWEL75e.js} +1 -1
- package/dist/client/assets/{X-Cwv9W6IH.js → X-Bgn4m6iE.js} +1 -1
- package/dist/client/assets/{XCircle-VMAL-xhy.js → XCircle-C7dtAhFo.js} +1 -1
- package/dist/client/assets/{XClose-GzEq-HU9.js → XClose-DAS6g7IB.js} +1 -1
- package/dist/client/assets/{Zap-D93qKeqm.js → Zap-D4YLhHLH.js} +1 -1
- package/dist/client/assets/{ZapSquare-CGJC1mww.js → ZapSquare-DW8WgORO.js} +1 -1
- package/dist/client/assets/{accordion-ZNyW-Q9t.js → accordion-w2pr29VL.js} +1 -1
- package/dist/client/assets/{agent-icon-zc2fqM1k.js → agent-icon-CoSygmB4.js} +1 -1
- package/dist/client/assets/{agents-list-UtLvJq-k.js → agents-list-BmcHuxVe.js} +1 -1
- package/dist/client/assets/ai-providers-wvV25hLp.js +1 -0
- package/dist/client/assets/{alert-dialog-7vNv5N4P.js → alert-dialog-j_H6Duj2.js} +1 -1
- package/dist/client/assets/{auth-catchall-DnPh1GEo.js → auth-catchall-g0qxiTpM.js} +1 -1
- package/dist/client/assets/{automation-list-row-Cu-q04m4.js → automation-list-row-BwSlxsKi.js} +1 -1
- package/dist/client/assets/{automations-CU2EtM_4.js → automations-CZKFrDcG.js} +1 -1
- package/dist/client/assets/{avatar-Dda8SxzC.js → avatar-DH5nI_or.js} +1 -1
- package/dist/client/assets/{badge-C_Ey5yTa.js → badge-BITu5EVC.js} +1 -1
- package/dist/client/assets/{brand-context-pyqxXmJT.js → brand-context-6Yt9jzFn.js} +1 -1
- package/dist/client/assets/{card-BqDVz8rB.js → card-En6r2E_A.js} +1 -1
- package/dist/client/assets/{chat-context-B6Fg09sU.js → chat-context-CdP_0Ara.js} +1 -1
- package/dist/client/assets/{checkbox-CwdZbdGd.js → checkbox-DfdgwpYz.js} +1 -1
- package/dist/client/assets/{collection-detail-WOE1iHbK.js → collection-detail-Cq2qud8Y.js} +1 -1
- package/dist/client/assets/{collection-display-button-QyBcFXO8.js → collection-display-button-C9fQJGtX.js} +1 -1
- package/dist/client/assets/{collection-search-FuJrX0DL.js → collection-search-DFFtMlUb.js} +1 -1
- package/dist/client/assets/{collection-search-BPpIzKqG.js → collection-search-LW_e8pOY.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-k2i9yb0q.js → collection-table-wrapper-B2VGx1DA.js} +1 -1
- package/dist/client/assets/{collection-tabs-Bbxi3Lhu.js → collection-tabs-ie4BgKCV.js} +1 -1
- package/dist/client/assets/{collections-BXMI7Hvf.js → collections-D8nUEds8.js} +1 -1
- package/dist/client/assets/{command-CcKs3phr.js → command-BXrAL_Fp.js} +1 -1
- package/dist/client/assets/{connection-card-C9ObrVFa.js → connection-card-B3usJZNT.js} +1 -1
- package/dist/client/assets/{connection-detail-DXmyznni.js → connection-detail-BLvhyH8Y.js} +1 -1
- package/dist/client/assets/{connection-form-helpers-CLWU-iGL.js → connection-form-helpers-DJ9jYCyJ.js} +1 -1
- package/dist/client/assets/{connections-EFejJy4T.js → connections-JJSt3920.js} +1 -1
- package/dist/client/assets/{constants-DNYERMOq.js → constants-C_0Pvn36.js} +1 -1
- package/dist/client/assets/{constants-Bad0DdgK.js → constants-xCxa-gM5.js} +1 -1
- package/dist/client/assets/{dialog-BcmogFZk.js → dialog-CQJ1jbHU.js} +1 -1
- package/dist/client/assets/{domain-settings-QGlFO294.js → domain-settings-KzIawZDz.js} +1 -1
- package/dist/client/assets/{drawer-CFDUaOVL.js → drawer-CRXUsV25.js} +1 -1
- package/dist/client/assets/{dropdown-menu-NvUf9a-j.js → dropdown-menu-B0p6J489.js} +1 -1
- package/dist/client/assets/{dynamic-plugin-layout-CNm9aSBE.js → dynamic-plugin-layout-hX-cElnB.js} +1 -1
- package/dist/client/assets/{empty-state-Dg7DOfxH.js → empty-state-CTTNNvC-.js} +1 -1
- package/dist/client/assets/{empty-state-CYPi3AWF.js → empty-state-DiIlkZVx.js} +1 -1
- package/dist/client/assets/{extract-connection-data-Crk93y-a.js → extract-connection-data-D5DCgJwZ.js} +1 -1
- package/dist/client/assets/{features-c-yBM4_h.js → features-CcS8M1BD.js} +1 -1
- package/dist/client/assets/{form-BbDiaTsN.js → form-D0XM9Oz-.js} +1 -1
- package/dist/client/assets/{general-BxBx3E8g.js → general-Ci0gKW7e.js} +1 -1
- package/dist/client/assets/{index-D-aGIpWM.js → index-08_qSeNu.js} +1 -1
- package/dist/client/assets/{index-DDUZQ_xH.js → index-8ASwCWdl.js} +1 -1
- package/dist/client/assets/{index-C3btaY0r.js → index-B2YlGv2D.js} +1 -1
- package/dist/client/assets/{index-D5c2Coqp.js → index-BbCoi7Kc.js} +3 -3
- package/dist/client/assets/{index-D3w8D7D3.js → index-BkAVJvYj.js} +1 -1
- package/dist/client/assets/{index-bUNQ5NEg.js → index-BuupSAqF.js} +1 -1
- package/dist/client/assets/{index-CvwiLDhg.js → index-Bzm-pgKW.js} +1 -1
- package/dist/client/assets/{index-Dl4CZy6K.js → index-Ce3hTrjw.js} +1 -1
- package/dist/client/assets/{index-BEwswwod.js → index-CtORjixM.js} +1 -1
- package/dist/client/assets/{index-Bom1zwxj.js → index-DN5Efs9x.js} +1 -1
- package/dist/client/assets/{index-rnnpRGp3.js → index-DvT00rVT.js} +1 -1
- package/dist/client/assets/{index-DmMHdsYF.js → index-Kg1PzPFs.js} +1 -1
- package/dist/client/assets/{index--qrsfEvC.js → index-N3u8642D.js} +1 -1
- package/dist/client/assets/{index-BVe-IL8_.js → index-TmBzv9_n.js} +1 -1
- package/dist/client/assets/{index-B3GjV7OW.js → index-XtKSdEVT.js} +2 -2
- package/dist/client/assets/{index-CLSBe_a4.js → index-gf-c6sSg.js} +1 -1
- package/dist/client/assets/{infiniteQueryObserver-RMKX6Nq0.js → infiniteQueryObserver-CGPZBNLK.js} +1 -1
- package/dist/client/assets/{input-bkK8ZE7l.js → input-CA3wFziO.js} +1 -1
- package/dist/client/assets/{integration-icon-dKiJ5-c6.js → integration-icon-DB1BI0re.js} +1 -1
- package/dist/client/assets/{label-DTMz5O44.js → label-CsQ7X2nY.js} +1 -1
- package/dist/client/assets/{layout-LMk5O_ZK.js → layout-_eILQ4qX.js} +1 -1
- package/dist/client/assets/{lean-canvas-recruit-modal-BAnvgszw.js → lean-canvas-recruit-modal-DS3BEBlK.js} +1 -1
- package/dist/client/assets/{login-DL4UCCOO.js → login-BlD2FW6R.js} +1 -1
- package/dist/client/assets/{members-xgiddo21.js → members-CWZmvp91.js} +1 -1
- package/dist/client/assets/{monaco-editor-C2N0lO8-.js → monaco-editor-CoS3uflL.js} +1 -1
- package/dist/client/assets/{monitoring-stats-row-B1WEuAdI.js → monitoring-stats-row-CViWaRD_.js} +1 -1
- package/dist/client/assets/{oauth-callback-CEDkVwJ-.js → oauth-callback-CU5hLq_2.js} +1 -1
- package/dist/client/assets/{oauth-callback-ai-provider-Dg9MI2Au.js → oauth-callback-ai-provider-BeHCFfTz.js} +1 -1
- package/dist/client/assets/{onboarding-DkXotH-C.js → onboarding-1sE9lrXr.js} +1 -1
- package/dist/client/assets/{org-layout-BZIyzExD.js → org-layout-DjQQV-Zl.js} +1 -1
- package/dist/client/assets/{org-plugin-layout-DMO9tynz.js → org-plugin-layout-DAhuto61.js} +1 -1
- package/dist/client/assets/{pair-Cbmyley2.js → pair-2_9kst7n.js} +1 -1
- package/dist/client/assets/{plugin-empty-state-9QQH63Km.js → plugin-empty-state-HCn3LT7f.js} +1 -1
- package/dist/client/assets/{plugin-header-Ca6fhiCD.js → plugin-header-BURSuFWr.js} +1 -1
- package/dist/client/assets/{plugin-layout-CL9tTgtN.js → plugin-layout-D26XJiuJ.js} +1 -1
- package/dist/client/assets/{popover-a3tMurU4.js → popover-DVrNLUGd.js} +1 -1
- package/dist/client/assets/{profile-D7pjioBj.js → profile-u4Q_ge8P.js} +1 -1
- package/dist/client/assets/{project-app-view-BhV2wKdY.js → project-app-view-TR-LCEsF.js} +1 -1
- package/dist/client/assets/registry-9FuEyggS.js +2 -0
- package/dist/client/assets/{registry-layout-BaWcD2qA.js → registry-layout-CBmViIei.js} +1 -1
- package/dist/client/assets/{required-auth-layout-CnaH9rpW.js → required-auth-layout-zpm5EQiY.js} +1 -1
- package/dist/client/assets/{reset-password-vwj49aZP.js → reset-password-BBgklwFT.js} +1 -1
- package/dist/client/assets/{roles-DphWxHYt.js → roles-BFmJtd_3.js} +1 -1
- package/dist/client/assets/{scroll-area-DqbokeCV.js → scroll-area-CTB7VMjJ.js} +1 -1
- package/dist/client/assets/{search-input-DAsaTE5l.js → search-input-CDZEhQeH.js} +1 -1
- package/dist/client/assets/{select-Dli7sWvO.js → select-Ck5CQAzm.js} +1 -1
- package/dist/client/assets/{select-model-BaOTlcuq.js → select-model-WqEqjF0n.js} +1 -1
- package/dist/client/assets/{settings-layout-CjXYIm0R.js → settings-layout-OR4Oj5Bz.js} +1 -1
- package/dist/client/assets/{settings-section-DBJaYBiY.js → settings-section-hGFEsbcg.js} +1 -1
- package/dist/client/assets/{shell-layout-BMRtkmni.js → shell-layout-DgbQScgJ.js} +1 -1
- package/dist/client/assets/{skeleton-H0I9mnBy.js → skeleton-15S9YHo5.js} +1 -1
- package/dist/client/assets/{sso-DYCaqBsm.js → sso-Clf1UBGT.js} +1 -1
- package/dist/client/assets/store-registry-D1p6Sky6.js +2 -0
- package/dist/client/assets/{store-uDsU3GrB.js → store-s535k-0R.js} +1 -1
- package/dist/client/assets/{switch-BdqZBTdM.js → switch-DZpAuoR4.js} +1 -1
- package/dist/client/assets/{table-DK414n0F.js → table-Di3ejdIM.js} +1 -1
- package/dist/client/assets/{tabs-CeGpUpHP.js → tabs-CZODVyGB.js} +1 -1
- package/dist/client/assets/{task-status-CqDAnW9H.js → task-status-B-brbBsk.js} +1 -1
- package/dist/client/assets/{textarea-DYbvm35p.js → textarea-BZSNnTf-.js} +1 -1
- package/dist/client/assets/{toggle-group-DXYK5Kmg.js → toggle-group-C6O7_FmI.js} +1 -1
- package/dist/client/assets/{tools-list-DQqEXfVG.js → tools-list-E1FCeDba.js} +1 -1
- package/dist/client/assets/{tooltip-M7OSSLPB.js → tooltip-DzR2OkiC.js} +1 -1
- package/dist/client/assets/{types-aUaKAv-0.js → types-DsXhCCX5.js} +1 -1
- package/dist/client/assets/{use-ai-providers-CmHinIUs.js → use-ai-providers-CASknL33.js} +1 -1
- package/dist/client/assets/{use-collections-Cy_Omosv.js → use-collections-Clg_Ncfr.js} +1 -1
- package/dist/client/assets/{use-connection-BTNmhjS_.js → use-connection-CN-YbXIm.js} +1 -1
- package/dist/client/assets/{use-copy-CkkAJAvS.js → use-copy-B4Vw-FGS.js} +1 -1
- package/dist/client/assets/{use-create-virtual-mcp-BuaKZJs7.js → use-create-virtual-mcp-DDS948Ec.js} +1 -1
- package/dist/client/assets/{use-debounced-autosave-CO57B6nX.js → use-debounced-autosave-DY33egle.js} +1 -1
- package/dist/client/assets/{use-decopilot-events-CQ1IkvCh.js → use-decopilot-events-CDc7_gFj.js} +1 -1
- package/dist/client/assets/{use-delete-connection-6dZbEpz0.js → use-delete-connection-B_kG1S-Z.js} +1 -1
- package/dist/client/assets/{use-infinite-scroll-ZPBLdFp5.js → use-infinite-scroll-C65PuA8D.js} +1 -1
- package/dist/client/assets/{use-list-state-C6g9hGA4.js → use-list-state-D0QSC4li.js} +1 -1
- package/dist/client/assets/{use-mcp-tools-BxVuuTSL.js → use-mcp-tools-P1EYh7Ne.js} +1 -1
- package/dist/client/assets/{use-members-Bi_cxyIQ.js → use-members-B8Y7w6A6.js} +1 -1
- package/dist/client/assets/{use-navigate-to-agent-CSPyzm0t.js → use-navigate-to-agent-CdjjjAzp.js} +1 -1
- package/dist/client/assets/{use-org-auth-client-C0e9yR_n.js → use-org-auth-client-DgZS2gPK.js} +1 -1
- package/dist/client/assets/{use-org-sso-BBRAkASE.js → use-org-sso-DUuDwVMq.js} +1 -1
- package/dist/client/assets/{use-organization-roles-C1ELHN87.js → use-organization-roles-COI0teJ2.js} +1 -1
- package/dist/client/assets/{use-organization-settings-DTcFJGZh.js → use-organization-settings-DFYG1X4S.js} +1 -1
- package/dist/client/assets/{use-registry-connections-BTwHNugi.js → use-registry-connections-DtGSBXyx.js} +1 -1
- package/dist/client/assets/{use-status-sounds-DtamCVeq.js → use-status-sounds-Bzo-hQFh.js} +1 -1
- package/dist/client/assets/{use-tasks-B6YSkeM5.js → use-tasks-BkEjm0jr.js} +1 -1
- package/dist/client/assets/{use-view-mode-BT7njn-W.js → use-view-mode-QyxMfzTw.js} +1 -1
- package/dist/client/assets/{use-virtual-mcp-CSMhsIFC.js → use-virtual-mcp-CywGzNw_.js} +1 -1
- package/dist/client/assets/useInfiniteQuery-BnoAFbMi.js +1 -0
- package/dist/client/assets/useSuspenseInfiniteQuery-DALOqmfR.js +1 -0
- package/dist/client/assets/{user-D3wZendk.js → user-B1nA5pjb.js} +1 -1
- package/dist/client/assets/{view-mode-toggle-DrXoiKTK.js → view-mode-toggle-Cj3KDqTE.js} +1 -1
- package/dist/client/assets/{workflow-BfcwUbw-.js → workflow-DHFQknOK.js} +1 -1
- package/dist/client/assets/workflow-detail-Dq-mKRWi.js +1 -0
- package/dist/client/index.html +1 -1
- package/dist/server/cli.js +6 -2
- package/dist/server/node_modules/ansi-styles/index.d.ts +236 -0
- package/dist/server/node_modules/ansi-styles/index.js +223 -0
- package/dist/server/node_modules/{ansi-regex → ansi-styles}/package.json +13 -20
- package/dist/server/node_modules/ansi-styles/readme.md +173 -0
- package/dist/server/node_modules/convert-to-spaces/dist/index.d.ts +2 -0
- package/dist/server/node_modules/convert-to-spaces/dist/index.js +4 -0
- package/dist/server/node_modules/convert-to-spaces/license +21 -0
- package/dist/server/node_modules/convert-to-spaces/package.json +40 -0
- package/dist/server/node_modules/convert-to-spaces/readme.md +39 -0
- package/dist/server/node_modules/environment/index.d.ts +74 -0
- package/dist/server/node_modules/environment/index.js +47 -0
- package/dist/server/node_modules/environment/package.json +74 -0
- package/dist/server/node_modules/environment/readme.md +94 -0
- package/dist/server/node_modules/escape-string-regexp/index.d.ts +18 -0
- package/dist/server/node_modules/escape-string-regexp/index.js +11 -0
- package/dist/server/node_modules/escape-string-regexp/license +9 -0
- package/dist/server/node_modules/escape-string-regexp/package.json +43 -0
- package/dist/server/node_modules/escape-string-regexp/readme.md +29 -0
- package/dist/server/node_modules/get-east-asian-width/index.d.ts +60 -0
- package/dist/server/node_modules/get-east-asian-width/index.js +30 -0
- package/dist/server/node_modules/{ink → get-east-asian-width}/license +0 -1
- package/dist/server/node_modules/get-east-asian-width/lookup-data.js +18 -0
- package/dist/server/node_modules/get-east-asian-width/lookup.js +135 -0
- package/dist/server/node_modules/get-east-asian-width/package.json +71 -0
- package/dist/server/node_modules/get-east-asian-width/readme.md +65 -0
- package/dist/server/node_modules/get-east-asian-width/utilities.js +24 -0
- package/dist/server/node_modules/is-fullwidth-code-point/index.d.ts +17 -0
- package/dist/server/node_modules/is-fullwidth-code-point/index.js +12 -0
- package/dist/server/node_modules/is-fullwidth-code-point/license +9 -0
- package/dist/server/node_modules/is-fullwidth-code-point/package.json +53 -0
- package/dist/server/node_modules/is-fullwidth-code-point/readme.md +31 -0
- package/dist/server/node_modules/is-unicode-supported/index.d.ts +12 -0
- package/dist/server/node_modules/is-unicode-supported/index.js +21 -0
- package/dist/server/node_modules/is-unicode-supported/license +9 -0
- package/dist/server/node_modules/is-unicode-supported/package.json +47 -0
- package/dist/server/node_modules/is-unicode-supported/readme.md +35 -0
- package/dist/server/node_modules/pg-cloudflare/LICENSE +21 -0
- 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-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.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/restore-cursor/index.d.ts +11 -0
- package/dist/server/node_modules/restore-cursor/index.js +11 -0
- package/dist/server/node_modules/restore-cursor/license +9 -0
- package/dist/server/node_modules/restore-cursor/package.json +55 -0
- package/dist/server/node_modules/restore-cursor/readme.md +31 -0
- package/dist/server/node_modules/string-width/index.d.ts +39 -0
- package/dist/server/node_modules/string-width/index.js +82 -0
- package/dist/server/node_modules/string-width/license +9 -0
- package/dist/server/node_modules/string-width/package.json +64 -0
- package/dist/server/node_modules/string-width/readme.md +66 -0
- package/dist/server/server.js +5 -1
- package/package.json +1 -1
- package/dist/client/assets/ai-providers-CfDd4KX1.js +0 -1
- package/dist/client/assets/registry-CWfZJmtj.js +0 -2
- package/dist/client/assets/store-registry-CBTBvJpl.js +0 -2
- package/dist/client/assets/useInfiniteQuery-96c4mtDU.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-HyWQwfY6.js +0 -1
- package/dist/client/assets/workflow-detail-C0BgSrtB.js +0 -1
- package/dist/server/node_modules/ansi-regex/index.d.ts +0 -33
- package/dist/server/node_modules/ansi-regex/index.js +0 -14
- package/dist/server/node_modules/ansi-regex/readme.md +0 -66
- package/dist/server/node_modules/emoji-regex/LICENSE-MIT.txt +0 -20
- package/dist/server/node_modules/emoji-regex/README.md +0 -107
- package/dist/server/node_modules/emoji-regex/index.d.ts +0 -3
- package/dist/server/node_modules/emoji-regex/index.js +0 -4
- package/dist/server/node_modules/emoji-regex/index.mjs +0 -4
- package/dist/server/node_modules/emoji-regex/package.json +0 -45
- package/dist/server/node_modules/ink/build/ansi-tokenizer.d.ts +0 -38
- package/dist/server/node_modules/ink/build/ansi-tokenizer.js +0 -316
- package/dist/server/node_modules/ink/build/ansi-tokenizer.js.map +0 -1
- package/dist/server/node_modules/ink/build/apply-styles.js +0 -175
- package/dist/server/node_modules/ink/build/build-layout.js +0 -77
- package/dist/server/node_modules/ink/build/calculate-wrapped-text.js +0 -53
- package/dist/server/node_modules/ink/build/colorize.d.ts +0 -3
- package/dist/server/node_modules/ink/build/colorize.js +0 -48
- package/dist/server/node_modules/ink/build/colorize.js.map +0 -1
- package/dist/server/node_modules/ink/build/components/AccessibilityContext.d.ts +0 -3
- package/dist/server/node_modules/ink/build/components/AccessibilityContext.js +0 -5
- package/dist/server/node_modules/ink/build/components/AccessibilityContext.js.map +0 -1
- package/dist/server/node_modules/ink/build/components/App.d.ts +0 -18
- package/dist/server/node_modules/ink/build/components/App.js +0 -351
- package/dist/server/node_modules/ink/build/components/App.js.map +0 -1
- package/dist/server/node_modules/ink/build/components/AppContext.d.ts +0 -15
- package/dist/server/node_modules/ink/build/components/AppContext.js +0 -11
- package/dist/server/node_modules/ink/build/components/AppContext.js.map +0 -1
- package/dist/server/node_modules/ink/build/components/BackgroundContext.d.ts +0 -4
- package/dist/server/node_modules/ink/build/components/BackgroundContext.js +0 -3
- package/dist/server/node_modules/ink/build/components/BackgroundContext.js.map +0 -1
- package/dist/server/node_modules/ink/build/components/Box.d.ts +0 -117
- package/dist/server/node_modules/ink/build/components/Box.js +0 -34
- package/dist/server/node_modules/ink/build/components/Box.js.map +0 -1
- package/dist/server/node_modules/ink/build/components/Color.js +0 -62
- package/dist/server/node_modules/ink/build/components/Cursor.d.ts +0 -83
- package/dist/server/node_modules/ink/build/components/Cursor.js +0 -53
- package/dist/server/node_modules/ink/build/components/Cursor.js.map +0 -1
- package/dist/server/node_modules/ink/build/components/CursorContext.d.ts +0 -11
- package/dist/server/node_modules/ink/build/components/CursorContext.js +0 -8
- package/dist/server/node_modules/ink/build/components/CursorContext.js.map +0 -1
- package/dist/server/node_modules/ink/build/components/ErrorBoundary.d.ts +0 -18
- package/dist/server/node_modules/ink/build/components/ErrorBoundary.js +0 -23
- package/dist/server/node_modules/ink/build/components/ErrorBoundary.js.map +0 -1
- package/dist/server/node_modules/ink/build/components/ErrorOverview.d.ts +0 -6
- package/dist/server/node_modules/ink/build/components/ErrorOverview.js +0 -84
- package/dist/server/node_modules/ink/build/components/ErrorOverview.js.map +0 -1
- package/dist/server/node_modules/ink/build/components/FocusContext.d.ts +0 -16
- package/dist/server/node_modules/ink/build/components/FocusContext.js +0 -17
- package/dist/server/node_modules/ink/build/components/FocusContext.js.map +0 -1
- package/dist/server/node_modules/ink/build/components/Newline.d.ts +0 -13
- package/dist/server/node_modules/ink/build/components/Newline.js +0 -8
- package/dist/server/node_modules/ink/build/components/Newline.js.map +0 -1
- package/dist/server/node_modules/ink/build/components/Spacer.d.ts +0 -7
- package/dist/server/node_modules/ink/build/components/Spacer.js +0 -11
- package/dist/server/node_modules/ink/build/components/Spacer.js.map +0 -1
- package/dist/server/node_modules/ink/build/components/Static.d.ts +0 -24
- package/dist/server/node_modules/ink/build/components/Static.js +0 -28
- package/dist/server/node_modules/ink/build/components/Static.js.map +0 -1
- package/dist/server/node_modules/ink/build/components/StderrContext.d.ts +0 -15
- package/dist/server/node_modules/ink/build/components/StderrContext.js +0 -13
- package/dist/server/node_modules/ink/build/components/StderrContext.js.map +0 -1
- package/dist/server/node_modules/ink/build/components/StdinContext.d.ts +0 -22
- package/dist/server/node_modules/ink/build/components/StdinContext.js +0 -19
- package/dist/server/node_modules/ink/build/components/StdinContext.js.map +0 -1
- package/dist/server/node_modules/ink/build/components/StdoutContext.d.ts +0 -15
- package/dist/server/node_modules/ink/build/components/StdoutContext.js +0 -13
- package/dist/server/node_modules/ink/build/components/StdoutContext.js.map +0 -1
- package/dist/server/node_modules/ink/build/components/Text.d.ts +0 -55
- package/dist/server/node_modules/ink/build/components/Text.js +0 -50
- package/dist/server/node_modules/ink/build/components/Text.js.map +0 -1
- package/dist/server/node_modules/ink/build/components/Transform.d.ts +0 -16
- package/dist/server/node_modules/ink/build/components/Transform.js +0 -15
- package/dist/server/node_modules/ink/build/components/Transform.js.map +0 -1
- package/dist/server/node_modules/ink/build/cursor-helpers.d.ts +0 -38
- package/dist/server/node_modules/ink/build/cursor-helpers.js +0 -56
- package/dist/server/node_modules/ink/build/cursor-helpers.js.map +0 -1
- package/dist/server/node_modules/ink/build/devtools-window-polyfill.js +0 -65
- package/dist/server/node_modules/ink/build/devtools-window-polyfill.js.map +0 -1
- package/dist/server/node_modules/ink/build/devtools.d.ts +0 -1
- package/dist/server/node_modules/ink/build/devtools.js +0 -11
- package/dist/server/node_modules/ink/build/devtools.js.map +0 -1
- package/dist/server/node_modules/ink/build/dom.d.ts +0 -56
- package/dist/server/node_modules/ink/build/dom.js +0 -124
- package/dist/server/node_modules/ink/build/dom.js.map +0 -1
- package/dist/server/node_modules/ink/build/experimental/apply-style.js +0 -140
- package/dist/server/node_modules/ink/build/experimental/dom.js +0 -123
- package/dist/server/node_modules/ink/build/experimental/output.js +0 -91
- package/dist/server/node_modules/ink/build/experimental/reconciler.js +0 -141
- package/dist/server/node_modules/ink/build/experimental/renderer.js +0 -81
- package/dist/server/node_modules/ink/build/get-max-width.d.ts +0 -3
- package/dist/server/node_modules/ink/build/get-max-width.js +0 -10
- package/dist/server/node_modules/ink/build/get-max-width.js.map +0 -1
- package/dist/server/node_modules/ink/build/hooks/use-app.d.ts +0 -5
- package/dist/server/node_modules/ink/build/hooks/use-app.js +0 -8
- package/dist/server/node_modules/ink/build/hooks/use-app.js.map +0 -1
- package/dist/server/node_modules/ink/build/hooks/use-cursor.d.ts +0 -12
- package/dist/server/node_modules/ink/build/hooks/use-cursor.js +0 -29
- package/dist/server/node_modules/ink/build/hooks/use-cursor.js.map +0 -1
- package/dist/server/node_modules/ink/build/hooks/use-focus-manager.d.ts +0 -28
- package/dist/server/node_modules/ink/build/hooks/use-focus-manager.js +0 -17
- package/dist/server/node_modules/ink/build/hooks/use-focus-manager.js.map +0 -1
- package/dist/server/node_modules/ink/build/hooks/use-focus.d.ts +0 -29
- package/dist/server/node_modules/ink/build/hooks/use-focus.js +0 -42
- package/dist/server/node_modules/ink/build/hooks/use-focus.js.map +0 -1
- package/dist/server/node_modules/ink/build/hooks/use-input.d.ts +0 -131
- package/dist/server/node_modules/ink/build/hooks/use-input.js +0 -124
- package/dist/server/node_modules/ink/build/hooks/use-input.js.map +0 -1
- package/dist/server/node_modules/ink/build/hooks/use-is-screen-reader-enabled.d.ts +0 -5
- package/dist/server/node_modules/ink/build/hooks/use-is-screen-reader-enabled.js +0 -11
- package/dist/server/node_modules/ink/build/hooks/use-is-screen-reader-enabled.js.map +0 -1
- package/dist/server/node_modules/ink/build/hooks/use-stderr.d.ts +0 -5
- package/dist/server/node_modules/ink/build/hooks/use-stderr.js +0 -8
- package/dist/server/node_modules/ink/build/hooks/use-stderr.js.map +0 -1
- package/dist/server/node_modules/ink/build/hooks/use-stdin.d.ts +0 -5
- package/dist/server/node_modules/ink/build/hooks/use-stdin.js +0 -8
- package/dist/server/node_modules/ink/build/hooks/use-stdin.js.map +0 -1
- package/dist/server/node_modules/ink/build/hooks/use-stdout.d.ts +0 -5
- package/dist/server/node_modules/ink/build/hooks/use-stdout.js +0 -8
- package/dist/server/node_modules/ink/build/hooks/use-stdout.js.map +0 -1
- package/dist/server/node_modules/ink/build/hooks/useInput.js +0 -38
- package/dist/server/node_modules/ink/build/index.d.ts +0 -34
- package/dist/server/node_modules/ink/build/index.js +0 -20
- package/dist/server/node_modules/ink/build/index.js.map +0 -1
- package/dist/server/node_modules/ink/build/ink.d.ts +0 -90
- package/dist/server/node_modules/ink/build/ink.js +0 -637
- package/dist/server/node_modules/ink/build/ink.js.map +0 -1
- package/dist/server/node_modules/ink/build/input-parser.d.ts +0 -7
- package/dist/server/node_modules/ink/build/input-parser.js +0 -154
- package/dist/server/node_modules/ink/build/input-parser.js.map +0 -1
- package/dist/server/node_modules/ink/build/instance.js +0 -205
- package/dist/server/node_modules/ink/build/instances.d.ts +0 -3
- package/dist/server/node_modules/ink/build/instances.js +0 -8
- package/dist/server/node_modules/ink/build/instances.js.map +0 -1
- package/dist/server/node_modules/ink/build/kitty-keyboard.d.ts +0 -23
- package/dist/server/node_modules/ink/build/kitty-keyboard.js +0 -32
- package/dist/server/node_modules/ink/build/kitty-keyboard.js.map +0 -1
- package/dist/server/node_modules/ink/build/layout.d.ts +0 -7
- package/dist/server/node_modules/ink/build/layout.js +0 -33
- package/dist/server/node_modules/ink/build/layout.js.map +0 -1
- package/dist/server/node_modules/ink/build/log-update.d.ts +0 -19
- package/dist/server/node_modules/ink/build/log-update.js +0 -242
- package/dist/server/node_modules/ink/build/log-update.js.map +0 -1
- package/dist/server/node_modules/ink/build/measure-element.d.ts +0 -16
- package/dist/server/node_modules/ink/build/measure-element.js +0 -9
- package/dist/server/node_modules/ink/build/measure-element.js.map +0 -1
- package/dist/server/node_modules/ink/build/measure-text.d.ts +0 -6
- package/dist/server/node_modules/ink/build/measure-text.js +0 -21
- package/dist/server/node_modules/ink/build/measure-text.js.map +0 -1
- package/dist/server/node_modules/ink/build/options.d.ts +0 -52
- package/dist/server/node_modules/ink/build/options.js +0 -2
- package/dist/server/node_modules/ink/build/options.js.map +0 -1
- package/dist/server/node_modules/ink/build/output.d.ts +0 -35
- package/dist/server/node_modules/ink/build/output.js +0 -183
- package/dist/server/node_modules/ink/build/output.js.map +0 -1
- package/dist/server/node_modules/ink/build/parse-keypress.d.ts +0 -22
- package/dist/server/node_modules/ink/build/parse-keypress.js +0 -493
- package/dist/server/node_modules/ink/build/parse-keypress.js.map +0 -1
- package/dist/server/node_modules/ink/build/reconciler.d.ts +0 -4
- package/dist/server/node_modules/ink/build/reconciler.js +0 -274
- package/dist/server/node_modules/ink/build/reconciler.js.map +0 -1
- package/dist/server/node_modules/ink/build/render-background.d.ts +0 -4
- package/dist/server/node_modules/ink/build/render-background.js +0 -25
- package/dist/server/node_modules/ink/build/render-background.js.map +0 -1
- package/dist/server/node_modules/ink/build/render-border.d.ts +0 -4
- package/dist/server/node_modules/ink/build/render-border.js +0 -73
- package/dist/server/node_modules/ink/build/render-border.js.map +0 -1
- package/dist/server/node_modules/ink/build/render-node-to-output.d.ts +0 -14
- package/dist/server/node_modules/ink/build/render-node-to-output.js +0 -147
- package/dist/server/node_modules/ink/build/render-node-to-output.js.map +0 -1
- package/dist/server/node_modules/ink/build/render-to-string.d.ts +0 -38
- package/dist/server/node_modules/ink/build/render-to-string.js +0 -115
- package/dist/server/node_modules/ink/build/render-to-string.js.map +0 -1
- package/dist/server/node_modules/ink/build/render.d.ts +0 -121
- package/dist/server/node_modules/ink/build/render.js +0 -55
- package/dist/server/node_modules/ink/build/render.js.map +0 -1
- package/dist/server/node_modules/ink/build/renderer.d.ts +0 -8
- package/dist/server/node_modules/ink/build/renderer.js +0 -55
- package/dist/server/node_modules/ink/build/renderer.js.map +0 -1
- package/dist/server/node_modules/ink/build/sanitize-ansi.d.ts +0 -2
- package/dist/server/node_modules/ink/build/sanitize-ansi.js +0 -27
- package/dist/server/node_modules/ink/build/sanitize-ansi.js.map +0 -1
- package/dist/server/node_modules/ink/build/screen-reader-update.d.ts +0 -13
- package/dist/server/node_modules/ink/build/screen-reader-update.js +0 -38
- package/dist/server/node_modules/ink/build/screen-reader-update.js.map +0 -1
- package/dist/server/node_modules/ink/build/squash-text-nodes.d.ts +0 -3
- package/dist/server/node_modules/ink/build/squash-text-nodes.js +0 -36
- package/dist/server/node_modules/ink/build/squash-text-nodes.js.map +0 -1
- package/dist/server/node_modules/ink/build/styles.d.ts +0 -240
- package/dist/server/node_modules/ink/build/styles.js +0 -232
- package/dist/server/node_modules/ink/build/styles.js.map +0 -1
- package/dist/server/node_modules/ink/build/utils.d.ts +0 -2
- package/dist/server/node_modules/ink/build/utils.js +0 -4
- package/dist/server/node_modules/ink/build/utils.js.map +0 -1
- package/dist/server/node_modules/ink/build/wrap-text.d.ts +0 -3
- package/dist/server/node_modules/ink/build/wrap-text.js +0 -31
- package/dist/server/node_modules/ink/build/wrap-text.js.map +0 -1
- package/dist/server/node_modules/ink/build/write-synchronized.d.ts +0 -4
- package/dist/server/node_modules/ink/build/write-synchronized.js +0 -7
- package/dist/server/node_modules/ink/build/write-synchronized.js.map +0 -1
- package/dist/server/node_modules/ink/package.json +0 -201
- package/dist/server/node_modules/ink/readme.md +0 -2636
- package/dist/server/node_modules/onetime/index.d.ts +0 -64
- package/dist/server/node_modules/onetime/index.js +0 -44
- package/dist/server/node_modules/onetime/package.json +0 -43
- package/dist/server/node_modules/onetime/readme.md +0 -94
- /package/dist/server/node_modules/{ansi-regex → ansi-styles}/license +0 -0
- /package/dist/server/node_modules/{onetime → environment}/license +0 -0
- /package/dist/server/node_modules/{ink/build/devtools-window-polyfill.d.ts → pg-protocol/dist/b.d.ts} +0 -0
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "is-unicode-supported",
|
|
3
|
+
"version": "2.1.0",
|
|
4
|
+
"description": "Detect whether the terminal supports Unicode",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"repository": "sindresorhus/is-unicode-supported",
|
|
7
|
+
"funding": "https://github.com/sponsors/sindresorhus",
|
|
8
|
+
"author": {
|
|
9
|
+
"name": "Sindre Sorhus",
|
|
10
|
+
"email": "sindresorhus@gmail.com",
|
|
11
|
+
"url": "https://sindresorhus.com"
|
|
12
|
+
},
|
|
13
|
+
"type": "module",
|
|
14
|
+
"exports": {
|
|
15
|
+
"types": "./index.d.ts",
|
|
16
|
+
"default": "./index.js"
|
|
17
|
+
},
|
|
18
|
+
"sideEffects": false,
|
|
19
|
+
"engines": {
|
|
20
|
+
"node": ">=18"
|
|
21
|
+
},
|
|
22
|
+
"scripts": {
|
|
23
|
+
"test": "xo && ava && tsd"
|
|
24
|
+
},
|
|
25
|
+
"files": [
|
|
26
|
+
"index.js",
|
|
27
|
+
"index.d.ts"
|
|
28
|
+
],
|
|
29
|
+
"keywords": [
|
|
30
|
+
"terminal",
|
|
31
|
+
"unicode",
|
|
32
|
+
"detect",
|
|
33
|
+
"utf8",
|
|
34
|
+
"console",
|
|
35
|
+
"shell",
|
|
36
|
+
"support",
|
|
37
|
+
"supports",
|
|
38
|
+
"supported",
|
|
39
|
+
"check",
|
|
40
|
+
"detection"
|
|
41
|
+
],
|
|
42
|
+
"devDependencies": {
|
|
43
|
+
"ava": "^6.1.3",
|
|
44
|
+
"tsd": "^0.31.2",
|
|
45
|
+
"xo": "^0.59.3"
|
|
46
|
+
}
|
|
47
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# is-unicode-supported
|
|
2
|
+
|
|
3
|
+
> Detect whether the terminal supports Unicode
|
|
4
|
+
|
|
5
|
+
This can be useful to decide whether to use Unicode characters or fallback ASCII characters in command-line output.
|
|
6
|
+
|
|
7
|
+
Note that the check is quite naive. It just assumes all non-Windows terminals support Unicode and hard-codes which Windows terminals that do support Unicode. However, I have been using this logic in some popular packages for years without problems.
|
|
8
|
+
|
|
9
|
+
## Install
|
|
10
|
+
|
|
11
|
+
```sh
|
|
12
|
+
npm install is-unicode-supported
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Usage
|
|
16
|
+
|
|
17
|
+
```js
|
|
18
|
+
import isUnicodeSupported from 'is-unicode-supported';
|
|
19
|
+
|
|
20
|
+
isUnicodeSupported();
|
|
21
|
+
//=> true
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
## API
|
|
25
|
+
|
|
26
|
+
### isUnicodeSupported()
|
|
27
|
+
|
|
28
|
+
Returns a `boolean` for whether the terminal supports Unicode.
|
|
29
|
+
|
|
30
|
+
## Related
|
|
31
|
+
|
|
32
|
+
- [is-interactive](https://github.com/sindresorhus/is-interactive) - Check if stdout or stderr is interactive
|
|
33
|
+
- [supports-color](https://github.com/chalk/supports-color) - Detect whether a terminal supports color
|
|
34
|
+
- [figures](https://github.com/sindresorhus/figures) - Unicode symbols with Windows fallbacks
|
|
35
|
+
- [log-symbols](https://github.com/sindresorhus/log-symbols) - Colored symbols for various log levels
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2010 - 2021 Brian Carlson
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
# pg-cloudflare
|
|
2
|
+
|
|
3
|
+
`pg-cloudflare` makes it easier to take an existing package that relies on `tls` and `net`, and make it work in environments where only `connect()` is supported, such as Cloudflare Workers.
|
|
4
|
+
|
|
5
|
+
`pg-cloudflare` wraps `connect()`, the [TCP Socket API](https://github.com/wintercg/proposal-sockets-api) proposed within WinterCG, and implemented in [Cloudflare Workers](https://developers.cloudflare.com/workers/runtime-apis/tcp-sockets/), and exposes an interface with methods similar to what the `net` and `tls` modules in Node.js expose. (ex: `net.connect(path[, options][, callback])`). This minimizes the number of changes needed in order to make an existing package work across JavaScript runtimes.
|
|
6
|
+
|
|
7
|
+
## Installation
|
|
8
|
+
|
|
9
|
+
```
|
|
10
|
+
npm i --save-dev pg-cloudflare
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
The package uses conditional exports to support bundlers that don't know about
|
|
14
|
+
`cloudflare:sockets`, so the consumer code by default imports an empty file. To
|
|
15
|
+
enable the package, resolve to the `cloudflare` condition in your bundler's
|
|
16
|
+
config. For example:
|
|
17
|
+
|
|
18
|
+
- `webpack.config.js`
|
|
19
|
+
```js
|
|
20
|
+
export default {
|
|
21
|
+
...,
|
|
22
|
+
resolve: { conditionNames: [..., "workerd"] },
|
|
23
|
+
plugins: [
|
|
24
|
+
// ignore cloudflare:sockets imports
|
|
25
|
+
new webpack.IgnorePlugin({
|
|
26
|
+
resourceRegExp: /^cloudflare:sockets$/,
|
|
27
|
+
}),
|
|
28
|
+
],
|
|
29
|
+
}
|
|
30
|
+
```
|
|
31
|
+
- `vite.config.js`
|
|
32
|
+
|
|
33
|
+
> [!NOTE]
|
|
34
|
+
> If you are using the [Cloudflare Vite plugin](https://www.npmjs.com/package/@cloudflare/vite-plugin) then the following configuration is not necessary.
|
|
35
|
+
|
|
36
|
+
```js
|
|
37
|
+
export default defineConfig({
|
|
38
|
+
...,
|
|
39
|
+
resolve: {
|
|
40
|
+
conditions: [..., "workerd"],
|
|
41
|
+
},
|
|
42
|
+
build: {
|
|
43
|
+
...,
|
|
44
|
+
// don't try to bundle cloudflare:sockets
|
|
45
|
+
rollupOptions: {
|
|
46
|
+
external: [..., 'cloudflare:sockets'],
|
|
47
|
+
},
|
|
48
|
+
},
|
|
49
|
+
})
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
- `rollup.config.js`
|
|
53
|
+
```js
|
|
54
|
+
export default defineConfig({
|
|
55
|
+
...,
|
|
56
|
+
plugins: [..., nodeResolve({ exportConditions: [..., 'workerd'] })],
|
|
57
|
+
// don't try to bundle cloudflare:sockets
|
|
58
|
+
external: [..., 'cloudflare:sockets'],
|
|
59
|
+
})
|
|
60
|
+
```
|
|
61
|
+
- `esbuild.config.js`
|
|
62
|
+
```js
|
|
63
|
+
await esbuild.build({
|
|
64
|
+
...,
|
|
65
|
+
conditions: [..., 'workerd'],
|
|
66
|
+
})
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
The concrete examples can be found in `packages/pg-bundler-test`.
|
|
70
|
+
|
|
71
|
+
## How to use conditionally, in non-Node.js environments
|
|
72
|
+
|
|
73
|
+
As implemented in `pg` [here](https://github.com/brianc/node-postgres/commit/07553428e9c0eacf761a5d4541a3300ff7859578#diff-34588ad868ebcb232660aba7ee6a99d1e02f4bc93f73497d2688c3f074e60533R5-R13), a typical use case might look as follows, where in a Node.js environment the `net` module is used, while in a non-Node.js environment, where `net` is unavailable, `pg-cloudflare` is used instead, providing an equivalent interface:
|
|
74
|
+
|
|
75
|
+
```js
|
|
76
|
+
module.exports.getStream = function getStream(ssl = false) {
|
|
77
|
+
const net = require('net')
|
|
78
|
+
if (typeof net.Socket === 'function') {
|
|
79
|
+
return net.Socket()
|
|
80
|
+
}
|
|
81
|
+
const { CloudflareSocket } = require('pg-cloudflare')
|
|
82
|
+
return new CloudflareSocket(ssl)
|
|
83
|
+
}
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
## Node.js implementation of the Socket API proposal
|
|
87
|
+
|
|
88
|
+
If you're looking for a way to rely on `connect()` as the interface you use to interact with raw sockets, but need this interface to be available in a Node.js environment, [`@arrowood.dev/socket`](https://github.com/Ethan-Arrowood/socket) provides a Node.js implementation of the Socket API.
|
|
89
|
+
|
|
90
|
+
### license
|
|
91
|
+
|
|
92
|
+
The MIT License (MIT)
|
|
93
|
+
|
|
94
|
+
Copyright (c) 2023 Brian M. Carlson
|
|
95
|
+
|
|
96
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
97
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
98
|
+
in the Software without restriction, including without limitation the rights
|
|
99
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
100
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
101
|
+
furnished to do so, subject to the following conditions:
|
|
102
|
+
|
|
103
|
+
The above copyright notice and this permission notice shall be included in
|
|
104
|
+
all copies or substantial portions of the Software.
|
|
105
|
+
|
|
106
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
107
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
108
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
109
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
110
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
111
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
112
|
+
THE SOFTWARE.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"empty.js","sourceRoot":"","sources":["../src/empty.ts"],"names":[],"mappings":";;AAAA,kFAAkF;AAClF,0CAA0C;AAC1C,kBAAe,EAAE,CAAA"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/// <reference types="node" />
|
|
2
|
+
/// <reference types="node" />
|
|
3
|
+
/// <reference types="node" />
|
|
4
|
+
import { TlsOptions } from 'cloudflare:sockets';
|
|
5
|
+
import { EventEmitter } from 'events';
|
|
6
|
+
/**
|
|
7
|
+
* Wrapper around the Cloudflare built-in socket that can be used by the `Connection`.
|
|
8
|
+
*/
|
|
9
|
+
export declare class CloudflareSocket extends EventEmitter {
|
|
10
|
+
readonly ssl: boolean;
|
|
11
|
+
writable: boolean;
|
|
12
|
+
destroyed: boolean;
|
|
13
|
+
private _upgrading;
|
|
14
|
+
private _upgraded;
|
|
15
|
+
private _cfSocket;
|
|
16
|
+
private _cfWriter;
|
|
17
|
+
private _cfReader;
|
|
18
|
+
constructor(ssl: boolean);
|
|
19
|
+
setNoDelay(): this;
|
|
20
|
+
setKeepAlive(): this;
|
|
21
|
+
ref(): this;
|
|
22
|
+
unref(): this;
|
|
23
|
+
connect(port: number, host: string, connectListener?: (...args: unknown[]) => void): Promise<this | undefined>;
|
|
24
|
+
_listen(): Promise<void>;
|
|
25
|
+
_listenOnce(): Promise<void>;
|
|
26
|
+
write(data: Uint8Array | string, encoding?: BufferEncoding, callback?: (...args: unknown[]) => void): true | void;
|
|
27
|
+
end(data?: Buffer, encoding?: BufferEncoding, callback?: (...args: unknown[]) => void): this;
|
|
28
|
+
destroy(reason: string): this;
|
|
29
|
+
startTls(options: TlsOptions): void;
|
|
30
|
+
_addClosedHandler(): void;
|
|
31
|
+
}
|
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CloudflareSocket = void 0;
|
|
4
|
+
const events_1 = require("events");
|
|
5
|
+
/**
|
|
6
|
+
* Wrapper around the Cloudflare built-in socket that can be used by the `Connection`.
|
|
7
|
+
*/
|
|
8
|
+
class CloudflareSocket extends events_1.EventEmitter {
|
|
9
|
+
constructor(ssl) {
|
|
10
|
+
super();
|
|
11
|
+
this.ssl = ssl;
|
|
12
|
+
this.writable = false;
|
|
13
|
+
this.destroyed = false;
|
|
14
|
+
this._upgrading = false;
|
|
15
|
+
this._upgraded = false;
|
|
16
|
+
this._cfSocket = null;
|
|
17
|
+
this._cfWriter = null;
|
|
18
|
+
this._cfReader = null;
|
|
19
|
+
}
|
|
20
|
+
setNoDelay() {
|
|
21
|
+
return this;
|
|
22
|
+
}
|
|
23
|
+
setKeepAlive() {
|
|
24
|
+
return this;
|
|
25
|
+
}
|
|
26
|
+
ref() {
|
|
27
|
+
return this;
|
|
28
|
+
}
|
|
29
|
+
unref() {
|
|
30
|
+
return this;
|
|
31
|
+
}
|
|
32
|
+
async connect(port, host, connectListener) {
|
|
33
|
+
try {
|
|
34
|
+
log('connecting');
|
|
35
|
+
if (connectListener)
|
|
36
|
+
this.once('connect', connectListener);
|
|
37
|
+
const options = this.ssl ? { secureTransport: 'starttls' } : {};
|
|
38
|
+
const mod = await import('cloudflare:sockets');
|
|
39
|
+
const connect = mod.connect;
|
|
40
|
+
this._cfSocket = connect(`${host}:${port}`, options);
|
|
41
|
+
this._cfWriter = this._cfSocket.writable.getWriter();
|
|
42
|
+
this._addClosedHandler();
|
|
43
|
+
this._cfReader = this._cfSocket.readable.getReader();
|
|
44
|
+
if (this.ssl) {
|
|
45
|
+
this._listenOnce().catch((e) => this.emit('error', e));
|
|
46
|
+
}
|
|
47
|
+
else {
|
|
48
|
+
this._listen().catch((e) => this.emit('error', e));
|
|
49
|
+
}
|
|
50
|
+
await this._cfWriter.ready;
|
|
51
|
+
log('socket ready');
|
|
52
|
+
this.writable = true;
|
|
53
|
+
this.emit('connect');
|
|
54
|
+
return this;
|
|
55
|
+
}
|
|
56
|
+
catch (e) {
|
|
57
|
+
this.emit('error', e);
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
async _listen() {
|
|
61
|
+
// eslint-disable-next-line no-constant-condition
|
|
62
|
+
while (true) {
|
|
63
|
+
log('awaiting receive from CF socket');
|
|
64
|
+
const { done, value } = await this._cfReader.read();
|
|
65
|
+
log('CF socket received:', done, value);
|
|
66
|
+
if (done) {
|
|
67
|
+
log('done');
|
|
68
|
+
break;
|
|
69
|
+
}
|
|
70
|
+
this.emit('data', Buffer.from(value));
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
async _listenOnce() {
|
|
74
|
+
log('awaiting first receive from CF socket');
|
|
75
|
+
const { done, value } = await this._cfReader.read();
|
|
76
|
+
log('First CF socket received:', done, value);
|
|
77
|
+
this.emit('data', Buffer.from(value));
|
|
78
|
+
}
|
|
79
|
+
write(data, encoding = 'utf8', callback = () => { }) {
|
|
80
|
+
if (data.length === 0)
|
|
81
|
+
return callback();
|
|
82
|
+
if (typeof data === 'string')
|
|
83
|
+
data = Buffer.from(data, encoding);
|
|
84
|
+
log('sending data direct:', data);
|
|
85
|
+
this._cfWriter.write(data).then(() => {
|
|
86
|
+
log('data sent');
|
|
87
|
+
callback();
|
|
88
|
+
}, (err) => {
|
|
89
|
+
log('send error', err);
|
|
90
|
+
callback(err);
|
|
91
|
+
});
|
|
92
|
+
return true;
|
|
93
|
+
}
|
|
94
|
+
end(data = Buffer.alloc(0), encoding = 'utf8', callback = () => { }) {
|
|
95
|
+
log('ending CF socket');
|
|
96
|
+
this.write(data, encoding, (err) => {
|
|
97
|
+
this._cfSocket.close();
|
|
98
|
+
if (callback)
|
|
99
|
+
callback(err);
|
|
100
|
+
});
|
|
101
|
+
return this;
|
|
102
|
+
}
|
|
103
|
+
destroy(reason) {
|
|
104
|
+
log('destroying CF socket', reason);
|
|
105
|
+
this.destroyed = true;
|
|
106
|
+
return this.end();
|
|
107
|
+
}
|
|
108
|
+
startTls(options) {
|
|
109
|
+
if (this._upgraded) {
|
|
110
|
+
// Don't try to upgrade again.
|
|
111
|
+
this.emit('error', 'Cannot call `startTls()` more than once on a socket');
|
|
112
|
+
return;
|
|
113
|
+
}
|
|
114
|
+
this._cfWriter.releaseLock();
|
|
115
|
+
this._cfReader.releaseLock();
|
|
116
|
+
this._upgrading = true;
|
|
117
|
+
this._cfSocket = this._cfSocket.startTls(options);
|
|
118
|
+
this._cfWriter = this._cfSocket.writable.getWriter();
|
|
119
|
+
this._cfReader = this._cfSocket.readable.getReader();
|
|
120
|
+
this._addClosedHandler();
|
|
121
|
+
this._listen().catch((e) => this.emit('error', e));
|
|
122
|
+
}
|
|
123
|
+
_addClosedHandler() {
|
|
124
|
+
this._cfSocket.closed.then(() => {
|
|
125
|
+
if (!this._upgrading) {
|
|
126
|
+
log('CF socket closed');
|
|
127
|
+
this._cfSocket = null;
|
|
128
|
+
this.emit('close');
|
|
129
|
+
}
|
|
130
|
+
else {
|
|
131
|
+
this._upgrading = false;
|
|
132
|
+
this._upgraded = true;
|
|
133
|
+
}
|
|
134
|
+
}).catch((e) => this.emit('error', e));
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
exports.CloudflareSocket = CloudflareSocket;
|
|
138
|
+
const debug = false;
|
|
139
|
+
function dump(data) {
|
|
140
|
+
if (data instanceof Uint8Array || data instanceof ArrayBuffer) {
|
|
141
|
+
const hex = Buffer.from(data).toString('hex');
|
|
142
|
+
const str = new TextDecoder().decode(data);
|
|
143
|
+
return `\n>>> STR: "${str.replace(/\n/g, '\\n')}"\n>>> HEX: ${hex}\n`;
|
|
144
|
+
}
|
|
145
|
+
else {
|
|
146
|
+
return data;
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
function log(...args) {
|
|
150
|
+
debug && console.log(...args.map(dump));
|
|
151
|
+
}
|
|
152
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "pg-cloudflare",
|
|
3
|
+
"version": "1.3.0",
|
|
4
|
+
"description": "A socket implementation that can run on Cloudflare Workers using native TCP connections.",
|
|
5
|
+
"main": "dist/index.js",
|
|
6
|
+
"types": "dist/index.d.ts",
|
|
7
|
+
"license": "MIT",
|
|
8
|
+
"devDependencies": {
|
|
9
|
+
"ts-node": "^8.5.4",
|
|
10
|
+
"typescript": "^4.0.3"
|
|
11
|
+
},
|
|
12
|
+
"exports": {
|
|
13
|
+
".": {
|
|
14
|
+
"workerd": {
|
|
15
|
+
"import": "./esm/index.mjs",
|
|
16
|
+
"require": "./dist/index.js"
|
|
17
|
+
},
|
|
18
|
+
"default": "./dist/empty.js"
|
|
19
|
+
},
|
|
20
|
+
"./package.json": "./package.json"
|
|
21
|
+
},
|
|
22
|
+
"scripts": {
|
|
23
|
+
"build": "tsc",
|
|
24
|
+
"build:watch": "tsc --watch",
|
|
25
|
+
"prepublish": "yarn build",
|
|
26
|
+
"test": "echo e2e test in pg package"
|
|
27
|
+
},
|
|
28
|
+
"repository": {
|
|
29
|
+
"type": "git",
|
|
30
|
+
"url": "git://github.com/brianc/node-postgres.git",
|
|
31
|
+
"directory": "packages/pg-cloudflare"
|
|
32
|
+
},
|
|
33
|
+
"files": [
|
|
34
|
+
"/dist/*{js,ts,map}",
|
|
35
|
+
"/src",
|
|
36
|
+
"/esm"
|
|
37
|
+
],
|
|
38
|
+
"gitHead": "d10e09c888f94abf77382aba6f353ca665a1cf09"
|
|
39
|
+
}
|
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
import { SocketOptions, Socket, TlsOptions } from 'cloudflare:sockets'
|
|
2
|
+
import { EventEmitter } from 'events'
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Wrapper around the Cloudflare built-in socket that can be used by the `Connection`.
|
|
6
|
+
*/
|
|
7
|
+
export class CloudflareSocket extends EventEmitter {
|
|
8
|
+
writable = false
|
|
9
|
+
destroyed = false
|
|
10
|
+
|
|
11
|
+
private _upgrading = false
|
|
12
|
+
private _upgraded = false
|
|
13
|
+
private _cfSocket: Socket | null = null
|
|
14
|
+
private _cfWriter: WritableStreamDefaultWriter | null = null
|
|
15
|
+
private _cfReader: ReadableStreamDefaultReader | null = null
|
|
16
|
+
|
|
17
|
+
constructor(readonly ssl: boolean) {
|
|
18
|
+
super()
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
setNoDelay() {
|
|
22
|
+
return this
|
|
23
|
+
}
|
|
24
|
+
setKeepAlive() {
|
|
25
|
+
return this
|
|
26
|
+
}
|
|
27
|
+
ref() {
|
|
28
|
+
return this
|
|
29
|
+
}
|
|
30
|
+
unref() {
|
|
31
|
+
return this
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
async connect(port: number, host: string, connectListener?: (...args: unknown[]) => void) {
|
|
35
|
+
try {
|
|
36
|
+
log('connecting')
|
|
37
|
+
if (connectListener) this.once('connect', connectListener)
|
|
38
|
+
|
|
39
|
+
const options: SocketOptions = this.ssl ? { secureTransport: 'starttls' } : {}
|
|
40
|
+
const mod = await import('cloudflare:sockets')
|
|
41
|
+
const connect = mod.connect
|
|
42
|
+
this._cfSocket = connect(`${host}:${port}`, options)
|
|
43
|
+
this._cfWriter = this._cfSocket.writable.getWriter()
|
|
44
|
+
this._addClosedHandler()
|
|
45
|
+
|
|
46
|
+
this._cfReader = this._cfSocket.readable.getReader()
|
|
47
|
+
if (this.ssl) {
|
|
48
|
+
this._listenOnce().catch((e) => this.emit('error', e))
|
|
49
|
+
} else {
|
|
50
|
+
this._listen().catch((e) => this.emit('error', e))
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
await this._cfWriter!.ready
|
|
54
|
+
log('socket ready')
|
|
55
|
+
this.writable = true
|
|
56
|
+
this.emit('connect')
|
|
57
|
+
|
|
58
|
+
return this
|
|
59
|
+
} catch (e) {
|
|
60
|
+
this.emit('error', e)
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
async _listen() {
|
|
65
|
+
// eslint-disable-next-line no-constant-condition
|
|
66
|
+
while (true) {
|
|
67
|
+
log('awaiting receive from CF socket')
|
|
68
|
+
const { done, value } = await this._cfReader!.read()
|
|
69
|
+
log('CF socket received:', done, value)
|
|
70
|
+
if (done) {
|
|
71
|
+
log('done')
|
|
72
|
+
break
|
|
73
|
+
}
|
|
74
|
+
this.emit('data', Buffer.from(value))
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
async _listenOnce() {
|
|
79
|
+
log('awaiting first receive from CF socket')
|
|
80
|
+
const { done, value } = await this._cfReader!.read()
|
|
81
|
+
log('First CF socket received:', done, value)
|
|
82
|
+
this.emit('data', Buffer.from(value))
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
write(
|
|
86
|
+
data: Uint8Array | string,
|
|
87
|
+
encoding: BufferEncoding = 'utf8',
|
|
88
|
+
callback: (...args: unknown[]) => void = () => {}
|
|
89
|
+
) {
|
|
90
|
+
if (data.length === 0) return callback()
|
|
91
|
+
if (typeof data === 'string') data = Buffer.from(data, encoding)
|
|
92
|
+
|
|
93
|
+
log('sending data direct:', data)
|
|
94
|
+
this._cfWriter!.write(data).then(
|
|
95
|
+
() => {
|
|
96
|
+
log('data sent')
|
|
97
|
+
callback()
|
|
98
|
+
},
|
|
99
|
+
(err) => {
|
|
100
|
+
log('send error', err)
|
|
101
|
+
callback(err)
|
|
102
|
+
}
|
|
103
|
+
)
|
|
104
|
+
return true
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
end(data = Buffer.alloc(0), encoding: BufferEncoding = 'utf8', callback: (...args: unknown[]) => void = () => {}) {
|
|
108
|
+
log('ending CF socket')
|
|
109
|
+
this.write(data, encoding, (err) => {
|
|
110
|
+
this._cfSocket!.close()
|
|
111
|
+
if (callback) callback(err)
|
|
112
|
+
})
|
|
113
|
+
return this
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
destroy(reason: string) {
|
|
117
|
+
log('destroying CF socket', reason)
|
|
118
|
+
this.destroyed = true
|
|
119
|
+
return this.end()
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
startTls(options: TlsOptions) {
|
|
123
|
+
if (this._upgraded) {
|
|
124
|
+
// Don't try to upgrade again.
|
|
125
|
+
this.emit('error', 'Cannot call `startTls()` more than once on a socket')
|
|
126
|
+
return
|
|
127
|
+
}
|
|
128
|
+
this._cfWriter!.releaseLock()
|
|
129
|
+
this._cfReader!.releaseLock()
|
|
130
|
+
this._upgrading = true
|
|
131
|
+
this._cfSocket = this._cfSocket!.startTls(options)
|
|
132
|
+
this._cfWriter = this._cfSocket.writable.getWriter()
|
|
133
|
+
this._cfReader = this._cfSocket.readable.getReader()
|
|
134
|
+
this._addClosedHandler()
|
|
135
|
+
this._listen().catch((e) => this.emit('error', e))
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
_addClosedHandler() {
|
|
139
|
+
this._cfSocket!.closed.then(() => {
|
|
140
|
+
if (!this._upgrading) {
|
|
141
|
+
log('CF socket closed')
|
|
142
|
+
this._cfSocket = null
|
|
143
|
+
this.emit('close')
|
|
144
|
+
} else {
|
|
145
|
+
this._upgrading = false
|
|
146
|
+
this._upgraded = true
|
|
147
|
+
}
|
|
148
|
+
}).catch((e) => this.emit('error', e))
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
const debug = false
|
|
153
|
+
|
|
154
|
+
function dump(data: unknown) {
|
|
155
|
+
if (data instanceof Uint8Array || data instanceof ArrayBuffer) {
|
|
156
|
+
const hex = Buffer.from(data).toString('hex')
|
|
157
|
+
const str = new TextDecoder().decode(data)
|
|
158
|
+
return `\n>>> STR: "${str.replace(/\n/g, '\\n')}"\n>>> HEX: ${hex}\n`
|
|
159
|
+
} else {
|
|
160
|
+
return data
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
function log(...args: unknown[]) {
|
|
165
|
+
debug && console.log(...args.map(dump))
|
|
166
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
declare module 'cloudflare:sockets' {
|
|
2
|
+
export class Socket {
|
|
3
|
+
public readonly readable: any
|
|
4
|
+
public readonly writable: any
|
|
5
|
+
public readonly closed: Promise<void>
|
|
6
|
+
public close(): Promise<void>
|
|
7
|
+
public startTls(options: TlsOptions): Socket
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export type TlsOptions = {
|
|
11
|
+
expectedServerHostname?: string
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export type SocketAddress = {
|
|
15
|
+
hostname: string
|
|
16
|
+
port: number
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export type SocketOptions = {
|
|
20
|
+
secureTransport?: 'off' | 'on' | 'starttls'
|
|
21
|
+
allowHalfOpen?: boolean
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export function connect(address: string | SocketAddress, options?: SocketOptions): Socket
|
|
25
|
+
}
|