decocms 2.178.0 → 2.178.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-DOAxiEBN.js → AlertCircle-CI8iQIN4.js} +1 -1
- package/dist/client/assets/{AlignLeft-CRMPlioa.js → AlignLeft-D1a9nQq5.js} +1 -1
- package/dist/client/assets/{ArrowDown-xJyK-tRR.js → ArrowDown-bcBjuFxH.js} +1 -1
- package/dist/client/assets/{ArrowLeft-B-tpcvF0.js → ArrowLeft-BaV7db3X.js} +1 -1
- package/dist/client/assets/{ArrowUp-BO7WH9Uq.js → ArrowUp-BtIkmj4Y.js} +1 -1
- package/dist/client/assets/{Building02-D30T2TCD.js → Building02-R_mkgdQ4.js} +1 -1
- package/dist/client/assets/{Check-BTP9VTUM.js → Check-GOz4_bBS.js} +1 -1
- package/dist/client/assets/{CheckCircle-DoZ7ERyW.js → CheckCircle-DosFvCW2.js} +1 -1
- package/dist/client/assets/{CheckSquare-Dbh9CJyx.js → CheckSquare-Be1kXxvn.js} +1 -1
- package/dist/client/assets/{CheckVerified02-CyloHbYs.js → CheckVerified02-CZakFFpv.js} +1 -1
- package/dist/client/assets/{ChevronDown-CLapIRmf.js → ChevronDown-DElgod-p.js} +1 -1
- package/dist/client/assets/{ChevronLeft-CMUbV0KP.js → ChevronLeft-Bk7mc5_w.js} +1 -1
- package/dist/client/assets/{ChevronRight-DWZgTrde.js → ChevronRight-Ys0vr-YD.js} +1 -1
- package/dist/client/assets/{ChevronUp-DGOtRvEF.js → ChevronUp-CKkWbsZ5.js} +1 -1
- package/dist/client/assets/{Clock-BYjyd9hX.js → Clock-DRICOB0c.js} +1 -1
- package/dist/client/assets/{Code01-BkNgeom6.js → Code01-CDxb4LVl.js} +1 -1
- package/dist/client/assets/{Container-D7IaxBn4.js → Container-C8ScaknS.js} +1 -1
- package/dist/client/assets/{Copy01-BJ5f3Ft8.js → Copy01-DhAVspEC.js} +1 -1
- package/dist/client/assets/{Dataflow03-DE7FXw07.js → Dataflow03-ONoSH2VT.js} +1 -1
- package/dist/client/assets/{DotsHorizontal-BFhhKBhk.js → DotsHorizontal-BaiN7u8r.js} +1 -1
- package/dist/client/assets/{DotsVertical-CmyZ1eER.js → DotsVertical-rvqtR29a.js} +1 -1
- package/dist/client/assets/{Download01-C0zy7iAO.js → Download01-CVEqgoRT.js} +1 -1
- package/dist/client/assets/{Edit01-BsJ32les.js → Edit01-BaPedGGl.js} +1 -1
- package/dist/client/assets/{Edit05-BD2d2k-5.js → Edit05-DSl3Jqkp.js} +1 -1
- package/dist/client/assets/{Eye-B3PAdhmZ.js → Eye-BgAytXDm.js} +1 -1
- package/dist/client/assets/{EyeOff-_G9JY6d-.js → EyeOff-CucokIoZ.js} +1 -1
- package/dist/client/assets/{File02-CAND2NHE.js → File02-gbFS8GtC.js} +1 -1
- package/dist/client/assets/{File06-Bvs2lp94.js → File06-Dpi3gJhU.js} +1 -1
- package/dist/client/assets/{FilterLines-D-lo1vJH.js → FilterLines-BeHTcRH-.js} +1 -1
- package/dist/client/assets/{Globe01-jlGiKRJ-.js → Globe01-Ceb6Pyzg.js} +1 -1
- package/dist/client/assets/{Globe02-DpkPR1qQ.js → Globe02-4oAOo4_d.js} +1 -1
- package/dist/client/assets/{Grid01-Bootsry8.js → Grid01-NwJJaoW7.js} +1 -1
- package/dist/client/assets/{Home02-Cn5GN0Zh.js → Home02-DQJpzzIE.js} +1 -1
- package/dist/client/assets/{Image01-BGiNuXLR.js → Image01-BwGUDEUi.js} +1 -1
- package/dist/client/assets/{Inbox01-QN0h6e9y.js → Inbox01-CDOpLWwZ.js} +1 -1
- package/dist/client/assets/{InfoCircle-BlKvj0NG.js → InfoCircle-CfTVXLYm.js} +1 -1
- package/dist/client/assets/{Key01-p6odXPoE.js → Key01-BZkaWvm5.js} +1 -1
- package/dist/client/assets/{LayersTwo01-Dj6OMOTN.js → LayersTwo01-D9dHuPjU.js} +1 -1
- package/dist/client/assets/{LayoutLeft-Bl9wlb-l.js → LayoutLeft-BHhw95T0.js} +1 -1
- package/dist/client/assets/{Link01-GDNtvq6w.js → Link01-CU6UcWFS.js} +1 -1
- package/dist/client/assets/{LinkExternal01-Cmp1Jq7T.js → LinkExternal01-DOdBEG1U.js} +1 -1
- package/dist/client/assets/{List-BFzJ8d3-.js → List-DD3BKPLz.js} +1 -1
- package/dist/client/assets/{Loading01-Bgt2pWQu.js → Loading01-B85tVuIU.js} +1 -1
- package/dist/client/assets/{Lock01-CrtAKCVY.js → Lock01-WwvDQaaT.js} +1 -1
- package/dist/client/assets/{Play-C6mSLsW0.js → Play-DTPauCd1.js} +1 -1
- package/dist/client/assets/{Plus-Bah3bfIq.js → Plus-C9dY5EOr.js} +1 -1
- package/dist/client/assets/{RefreshCcw01-D6TQ-sWU.js → RefreshCcw01-DJsZi8Hz.js} +1 -1
- package/dist/client/assets/{Save01-DMdPXvfp.js → Save01-COu7GfwR.js} +1 -1
- package/dist/client/assets/{SearchMd-CbNARIB_.js → SearchMd-CKp0BoPW.js} +1 -1
- package/dist/client/assets/{Settings01-ncSo0UF1.js → Settings01-DunsMQ-m.js} +1 -1
- package/dist/client/assets/{Shield01-jjVa8gNb.js → Shield01-CCMtDdxH.js} +1 -1
- package/dist/client/assets/{Terminal-BkHJq74m.js → Terminal-COsHV7Wy.js} +1 -1
- package/dist/client/assets/{Tool01-CCSFIqz9.js → Tool01-Delk_MGO.js} +1 -1
- package/dist/client/assets/{Trash01-DJLT0hlL.js → Trash01-BtiNjuw3.js} +1 -1
- package/dist/client/assets/{Upload01-CrylBwgE.js → Upload01-DqqcM3M6.js} +1 -1
- package/dist/client/assets/{Users03-ClHTtWuU.js → Users03-CQa5jfkV.js} +1 -1
- package/dist/client/assets/{X-Dr3IGE6q.js → X-CaaFSPD_.js} +1 -1
- package/dist/client/assets/{XClose-CM_PUH0D.js → XClose-Dey3r3af.js} +1 -1
- package/dist/client/assets/{Zap-DNAzZ691.js → Zap-DX02pf-a.js} +1 -1
- package/dist/client/assets/{agent-connections-preview-D9yVR2mI.js → agent-connections-preview-BCTZ6BnP.js} +1 -1
- package/dist/client/assets/{agent-detail-D9yhjqjE.js → agent-detail-BBSZrHWb.js} +1 -1
- package/dist/client/assets/{agents-UYgbyoc-.js → agents-DVOxH2hb.js} +1 -1
- package/dist/client/assets/{ai-providers-logos-CKXeyPmY.js → ai-providers-logos-BWU0RfRJ.js} +1 -1
- package/dist/client/assets/{alert-dialog-CGRFjIvo.js → alert-dialog-BGZzdkI2.js} +1 -1
- package/dist/client/assets/{auth-catchall-DJtyBhDQ.js → auth-catchall-1PjzZ5eD.js} +1 -1
- package/dist/client/assets/{automation-detail-Da-KIL0v.js → automation-detail-dSH73muX.js} +1 -1
- package/dist/client/assets/{automations-BBeFyOp2.js → automations-CEr8CMbK.js} +1 -1
- package/dist/client/assets/{avatar-B6y4oqG6.js → avatar-DWAYNsNK.js} +1 -1
- package/dist/client/assets/{badge-BWsagPlP.js → badge-B_BTuJZe.js} +1 -1
- package/dist/client/assets/{binder-BfA1Jrrc.js → binder-l1kCmNCE.js} +1 -1
- package/dist/client/assets/{breadcrumb-D8mb9kpq.js → breadcrumb-ijphtzQp.js} +1 -1
- package/dist/client/assets/{card-C0MItTW_.js → card-CwEWrOs9.js} +1 -1
- package/dist/client/assets/{checkbox-DUU3Nuea.js → checkbox-B_91sMwd.js} +1 -1
- package/dist/client/assets/{collapsible-CtLdTa6t.js → collapsible-DILfwVxb.js} +1 -1
- package/dist/client/assets/{collection-detail-DPIki4up.js → collection-detail-lkCxiUzr.js} +1 -1
- package/dist/client/assets/{collection-display-button-DdFInvSR.js → collection-display-button-kCOiEzLn.js} +1 -1
- package/dist/client/assets/{collection-search-CGfzh4mC.js → collection-search-Bdxpglbf.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-DLe2aR6i.js → collection-table-wrapper-D-vPJPam.js} +1 -1
- package/dist/client/assets/{collection-tabs-DAHXpc2n.js → collection-tabs-IdlFD1jR.js} +1 -1
- package/dist/client/assets/{command-C4HnUxgr.js → command-BgTh2_vK.js} +1 -1
- package/dist/client/assets/{connection-card-DRd8H1I5.js → connection-card-BWZAp_hO.js} +1 -1
- package/dist/client/assets/{connection-detail-MKWBWpRr.js → connection-detail-DPSHmWyz.js} +1 -1
- package/dist/client/assets/{connections-CIQDC3QM.js → connections-BvYzdmU4.js} +1 -1
- package/dist/client/assets/{constants-C6R-Odkq.js → constants-BCt7c81T.js} +1 -1
- package/dist/client/assets/{context-BFTRA5vP.js → context-BTMVzdan.js} +1 -1
- package/dist/client/assets/{create-organization-dialog-Bez2nZe0.js → create-organization-dialog-Du7uAMNm.js} +1 -1
- package/dist/client/assets/{create-project-dialog-MCGuKGij.js → create-project-dialog-Bb7dubB7.js} +1 -1
- package/dist/client/assets/{danger-D1zng7LS.js → danger-CfnLHwII.js} +1 -1
- package/dist/client/assets/{danger-zone-DbcRzYYG.js → danger-zone-DjN4GhuT.js} +1 -1
- package/dist/client/assets/{dependencies-B8EkZe-H.js → dependencies-CwSG23CA.js} +1 -1
- package/dist/client/assets/{dialog-Bw5T2ogY.js → dialog-BDa2Gsq9.js} +1 -1
- package/dist/client/assets/{dropdown-menu-Dan8nMb8.js → dropdown-menu-DEQ5DCnG.js} +1 -1
- package/dist/client/assets/{dynamic-plugin-layout-BDxV3RAS.js → dynamic-plugin-layout-DP6UGwOE.js} +1 -1
- package/dist/client/assets/{editable-task-title-wfBXYVIh.js → editable-task-title-CaE6DIBf.js} +1 -1
- package/dist/client/assets/{empty-state-C1iyyf7G.js → empty-state-C4c2sKjV.js} +1 -1
- package/dist/client/assets/{empty-state-CoA3_x_6.js → empty-state-DmgqwjeV.js} +1 -1
- package/dist/client/assets/{env-vars-editor-CxyeKMFS.js → env-vars-editor-Ah5xyGmz.js} +1 -1
- package/dist/client/assets/{extract-connection-data-C8ZedtM3.js → extract-connection-data-BxJWN5u-.js} +1 -1
- package/dist/client/assets/{file-browser-CShFs9BG.js → file-browser-BRFmGA__.js} +2 -2
- package/dist/client/assets/{form-B1LLlQBa.js → form-BWoxqZfk.js} +1 -1
- package/dist/client/assets/{general-Dnfj_B7U.js → general-BKqD1lIr.js} +1 -1
- package/dist/client/assets/{generate-id-WpAuYSZF.js → generate-id-BaIFvm62.js} +1 -1
- package/dist/client/assets/{grid-view-PzYdekcz.js → grid-view-DGZvuOwZ.js} +1 -1
- package/dist/client/assets/{home-CKa-gWjN.js → home-B7jB9Gxp.js} +1 -1
- package/dist/client/assets/{index-D-AXXJqO.js → index--PLXALUm.js} +1 -1
- package/dist/client/assets/{index-DtZLm-Fz.js → index-10S4l3se.js} +1 -1
- package/dist/client/assets/{index-J5pIXVfD.js → index-B5vgf28x.js} +1 -1
- package/dist/client/assets/{index-CVayrapI.js → index-Bc448aeG.js} +1 -1
- package/dist/client/assets/{index-lUO5B2Do.js → index-BgoahoDu.js} +1 -1
- package/dist/client/assets/{index-OdE2HBl6.js → index-CM7_8eMu.js} +1 -1
- package/dist/client/assets/{index-BFJo8BQ3.js → index-CTjqFNkw.js} +1 -1
- package/dist/client/assets/{index-BkxamE0W.js → index-DGLQ2uQ5.js} +1 -1
- package/dist/client/assets/{index-BaVHKLOw.js → index-DZ6p-ZXx.js} +1 -1
- package/dist/client/assets/{index-De7oAufQ.js → index-DcxE8oe_.js} +3 -3
- package/dist/client/assets/{index-CgSAwZ8g.js → index-WTO-ZRzC.js} +1 -1
- package/dist/client/assets/{infiniteQueryObserver-C7xXp1jr.js → infiniteQueryObserver-CzIVu_kK.js} +1 -1
- package/dist/client/assets/{input-_VKm0O_1.js → input-DPpAbHbD.js} +1 -1
- package/dist/client/assets/{integration-icon-BkY1vh6I.js → integration-icon-6jcHFHZV.js} +1 -1
- package/dist/client/assets/{label-BhDDQ3-n.js → label-BtaiiWJ8.js} +1 -1
- package/dist/client/assets/{layout-BIFV7MZL.js → layout-Cjef80qc.js} +1 -1
- package/dist/client/assets/{layout-CZKgiZuG.js → layout-DG9LlvE6.js} +1 -1
- package/dist/client/assets/{login-uo65TNIo.js → login-D1Xb70mS.js} +1 -1
- package/dist/client/assets/{logo-upload-CXS8-AgL.js → logo-upload-79T6Ecg3.js} +1 -1
- package/dist/client/assets/{mcp-app-renderer-BcsrfZJp.js → mcp-app-renderer-DgOOTmoQ.js} +1 -1
- package/dist/client/assets/{mcp-server-card-Bp6C5W6n.js → mcp-server-card-CqBs71hZ.js} +1 -1
- package/dist/client/assets/{mcp-server-detail-Ctbkl5jL.js → mcp-server-detail-D_BCRi3w.js} +2 -2
- package/dist/client/assets/{members-DCfL7gNX.js → members-BkdG_-Nh.js} +1 -1
- package/dist/client/assets/{monaco-editor-DPC7_J-G.js → monaco-editor-D5smiy7k.js} +1 -1
- package/dist/client/assets/{monitoring-dashboard-edit-YR1gT6FF.js → monitoring-dashboard-edit-S2Ut1cvD.js} +1 -1
- package/dist/client/assets/{monitoring-dashboard-view-BbtnIBfa.js → monitoring-dashboard-view-gNG_IQ8M.js} +1 -1
- package/dist/client/assets/{monitoring-ByXLzXVV.js → monitoring-kw0ipyvO.js} +1 -1
- package/dist/client/assets/{monitoring-stats-row-Df9ANyzv.js → monitoring-stats-row-D3PlzPcP.js} +1 -1
- package/dist/client/assets/{oauth-callback-DAQSPrcu.js → oauth-callback-9ngEzskH.js} +1 -1
- package/dist/client/assets/{oauth-callback-ai-provider-BM5LYNPq.js → oauth-callback-ai-provider-CpdQKMVl.js} +1 -1
- package/dist/client/assets/{org-ai-providers-6KYO-veN.js → org-ai-providers-CrQ3OeB5.js} +1 -1
- package/dist/client/assets/{page-JhhtSWZh.js → page-C2HdbsvN.js} +1 -1
- package/dist/client/assets/{page-30eMAMiN.js → page-DmVGFJaY.js} +1 -1
- package/dist/client/assets/{plugin-empty-state-R2BzERoW.js → plugin-empty-state-CWxRJkeE.js} +1 -1
- package/dist/client/assets/{plugin-empty-state-Cl2I2geD.js → plugin-empty-state-DXhpvNlI.js} +1 -1
- package/dist/client/assets/{plugin-header-Bakz3z0e.js → plugin-header-C3JJ8Nq_.js} +1 -1
- package/dist/client/assets/{plugin-header-aEsNVQjp.js → plugin-header-TcX-3hN2.js} +1 -1
- package/dist/client/assets/plugins-BfcAD8Xs.js +1 -0
- package/dist/client/assets/{popover-D_qGIJiq.js → popover-CNIkv0WT.js} +1 -1
- package/dist/client/assets/{project-app-view-BFgEphLV.js → project-app-view-BVSK5NCb.js} +1 -1
- package/dist/client/assets/{project-layout-C8oyOOGc.js → project-layout-Bd1vlG83.js} +1 -1
- package/dist/client/assets/{project-plugins-BVt_WzcU.js → project-plugins-az_ZXSwN.js} +1 -1
- package/dist/client/assets/{projects-list-C02pKlJj.js → projects-list-D8eiYeUr.js} +1 -1
- package/dist/client/assets/{registry-layout-C-yQnDXG.js → registry-layout-BXceDqEw.js} +1 -1
- package/dist/client/assets/{registry-utils-Dqc_kCiP.js → registry-utils-CkCRcmq4.js} +1 -1
- package/dist/client/assets/{reset-password-Cqvt_aDI.js → reset-password-xlfm2d95.js} +1 -1
- package/dist/client/assets/{resizable-CO0Uh73H.js → resizable-B7fIdnoq.js} +1 -1
- package/dist/client/assets/{save-actions-ju1vjafj.js → save-actions-DIKaTzi7.js} +1 -1
- package/dist/client/assets/{scroll-area-DL2xzsPP.js → scroll-area-B-pB6oMr.js} +1 -1
- package/dist/client/assets/{select-B4liIMVc.js → select-DeNgR918.js} +1 -1
- package/dist/client/assets/{select-virtual-mcp-CuflMlTt.js → select-virtual-mcp-CFDIRCp8.js} +1 -1
- package/dist/client/assets/{sheet-Cjr3EcYH.js → sheet-BBLyN2xl.js} +1 -1
- package/dist/client/assets/{shell-layout-DfTROeX_.js → shell-layout-CiKn6BP6.js} +2 -2
- package/dist/client/assets/{sidebar-settings-BljNzJVO.js → sidebar-settings-DOwlHFdj.js} +1 -1
- package/dist/client/assets/{skeleton-Bt7MRTvB.js → skeleton-CNgs5GJt.js} +1 -1
- package/dist/client/assets/{spinner-Cse1gKnw.js → spinner-BZdAS5i2.js} +1 -1
- package/dist/client/assets/{store-invite-D8XeTZbu.js → store-invite-BXcKXIzr.js} +1 -1
- package/dist/client/assets/{switch-DHS6rwq-.js → switch-CmREXk8C.js} +1 -1
- package/dist/client/assets/{table-BPkNFl3F.js → table-C4WVepD4.js} +1 -1
- package/dist/client/assets/{tabs-D9xzXdQn.js → tabs-BeYHPY-1.js} +1 -1
- package/dist/client/assets/{task-status-DPcRgg7n.js → task-status-DauQRqAW.js} +24 -24
- package/dist/client/assets/tasks-fQ7kFf17.js +1 -0
- package/dist/client/assets/{tasks-panel-i3VUreUx.js → tasks-panel-DqbQRMGq.js} +1 -1
- package/dist/client/assets/{textarea-C_pKpP9s.js → textarea-C7YqhWTc.js} +1 -1
- package/dist/client/assets/{time-range-picker-BuykPBni.js → time-range-picker-CM-9xODE.js} +1 -1
- package/dist/client/assets/{toggle-group-VpRSF_Gl.js → toggle-group-B7g3fYap.js} +1 -1
- package/dist/client/assets/{tools-list-DDFWIxxm.js → tools-list-4D_tBiUe.js} +1 -1
- package/dist/client/assets/{tooltip-C4rlkzSj.js → tooltip-CXZH0tSC.js} +1 -1
- package/dist/client/assets/{topbar-portal-CF1YRovU.js → topbar-portal-CjA9qO3_.js} +1 -1
- package/dist/client/assets/{types-DQbIwrMI.js → types-CPj3Y6i2.js} +1 -1
- package/dist/client/assets/{use-automations-C1HgdvUZ.js → use-automations-B0CZymwk.js} +1 -1
- package/dist/client/assets/{use-collections-CN-KZdhF.js → use-collections-CObsJD7p.js} +1 -1
- package/dist/client/assets/{use-connection-C4RNTGYe.js → use-connection-Cv_-e2MS.js} +1 -1
- package/dist/client/assets/{use-copy-Cyun7kVE.js → use-copy-sxHnzQ3E.js} +1 -1
- package/dist/client/assets/{use-create-virtual-mcp-4JnIm_fY.js → use-create-virtual-mcp-dSjfTRl8.js} +1 -1
- package/dist/client/assets/{use-infinite-scroll-B1b4xMpn.js → use-infinite-scroll-CqxPDCSp.js} +1 -1
- package/dist/client/assets/{use-install-from-registry-CytyaLQX.js → use-install-from-registry-wW1d1HtB.js} +1 -1
- package/dist/client/assets/{use-list-state-CCkxYz8q.js → use-list-state-CWVUvMhj.js} +1 -1
- package/dist/client/assets/{use-mcp-prompts-BGZnglwN.js → use-mcp-prompts-C4X4lEEg.js} +1 -1
- package/dist/client/assets/{use-mcp-resources-DSKOWSEO.js → use-mcp-resources-DoUnZI9j.js} +1 -1
- package/dist/client/assets/{use-mcp-tools-C2aTDAuJ.js → use-mcp-tools-Cnh4vEBm.js} +1 -1
- package/dist/client/assets/{use-members-DjL_-1xN.js → use-members-BHa-Fb-h.js} +1 -1
- package/dist/client/assets/{use-mobile-CMHMyYVi.js → use-mobile-v2XXLV0O.js} +1 -1
- package/dist/client/assets/{use-project-DxPDjIre.js → use-project-B-9YXhNP.js} +1 -1
- package/dist/client/assets/{use-store-discovery-BBXrVOcG.js → use-store-discovery-z8nwAYJJ.js} +1 -1
- package/dist/client/assets/{use-view-mode-CXln2RGt.js → use-view-mode-XMRPR1ke.js} +1 -1
- package/dist/client/assets/{use-virtual-mcp-AdVimCkX.js → use-virtual-mcp-DfPJ-WDb.js} +1 -1
- package/dist/client/assets/useInfiniteQuery-BIejUr4H.js +1 -0
- package/dist/client/assets/{useMutation-BDzOMrvq.js → useMutation-CV3IN68C.js} +1 -1
- package/dist/client/assets/useQuery-CEE9SUlS.js +1 -0
- package/dist/client/assets/useSuspenseInfiniteQuery-B7NkSjI9.js +1 -0
- package/dist/client/assets/{user-DSh4pFej.js → user-_Hc5WOWn.js} +1 -1
- package/dist/client/assets/{workflow-mIahQD3R.js → workflow-DKAllKJO.js} +1 -1
- package/dist/client/index.html +1 -1
- 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-int8/LICENSE +13 -0
- package/dist/server/node_modules/pg-int8/README.md +16 -0
- package/dist/server/node_modules/pg-int8/index.js +100 -0
- package/dist/server/node_modules/pg-int8/package.json +24 -0
- package/dist/server/node_modules/pg-protocol/LICENSE +21 -0
- package/dist/server/node_modules/pg-protocol/README.md +3 -0
- package/dist/server/node_modules/pg-protocol/dist/b.d.ts +1 -0
- package/dist/server/node_modules/pg-protocol/dist/b.js +23 -0
- package/dist/server/node_modules/pg-protocol/dist/b.js.map +1 -0
- package/dist/server/node_modules/pg-protocol/dist/buffer-reader.d.ts +15 -0
- package/dist/server/node_modules/pg-protocol/dist/buffer-reader.js +55 -0
- package/dist/server/node_modules/pg-protocol/dist/buffer-reader.js.map +1 -0
- package/dist/server/node_modules/pg-protocol/dist/buffer-writer.d.ts +16 -0
- package/dist/server/node_modules/pg-protocol/dist/buffer-writer.js +81 -0
- package/dist/server/node_modules/pg-protocol/dist/buffer-writer.js.map +1 -0
- package/dist/server/node_modules/pg-protocol/dist/inbound-parser.test.d.ts +1 -0
- package/dist/server/node_modules/pg-protocol/dist/inbound-parser.test.js +530 -0
- package/dist/server/node_modules/pg-protocol/dist/inbound-parser.test.js.map +1 -0
- package/dist/server/node_modules/pg-protocol/dist/index.d.ts +6 -0
- package/dist/server/node_modules/pg-protocol/dist/index.js +15 -0
- package/dist/server/node_modules/pg-protocol/dist/index.js.map +1 -0
- package/dist/server/node_modules/pg-protocol/dist/messages.d.ts +162 -0
- package/dist/server/node_modules/pg-protocol/dist/messages.js +160 -0
- package/dist/server/node_modules/pg-protocol/dist/messages.js.map +1 -0
- package/dist/server/node_modules/pg-protocol/dist/outbound-serializer.test.d.ts +1 -0
- package/dist/server/node_modules/pg-protocol/dist/outbound-serializer.test.js +252 -0
- package/dist/server/node_modules/pg-protocol/dist/outbound-serializer.test.js.map +1 -0
- package/dist/server/node_modules/pg-protocol/dist/parser.d.ts +24 -0
- package/dist/server/node_modules/pg-protocol/dist/parser.js +324 -0
- package/dist/server/node_modules/pg-protocol/dist/parser.js.map +1 -0
- package/dist/server/node_modules/pg-protocol/dist/serializer.d.ts +42 -0
- package/dist/server/node_modules/pg-protocol/dist/serializer.js +189 -0
- package/dist/server/node_modules/pg-protocol/dist/serializer.js.map +1 -0
- package/dist/server/node_modules/pg-protocol/esm/index.js +11 -0
- package/dist/server/node_modules/pg-protocol/package.json +45 -0
- package/dist/server/node_modules/pg-protocol/src/b.ts +25 -0
- package/dist/server/node_modules/pg-protocol/src/buffer-reader.ts +58 -0
- package/dist/server/node_modules/pg-protocol/src/buffer-writer.ts +85 -0
- package/dist/server/node_modules/pg-protocol/src/inbound-parser.test.ts +575 -0
- package/dist/server/node_modules/pg-protocol/src/index.ts +11 -0
- package/dist/server/node_modules/pg-protocol/src/messages.ts +262 -0
- package/dist/server/node_modules/pg-protocol/src/outbound-serializer.test.ts +276 -0
- package/dist/server/node_modules/pg-protocol/src/parser.ts +413 -0
- package/dist/server/node_modules/pg-protocol/src/serializer.ts +274 -0
- package/dist/server/node_modules/pg-protocol/src/testing/buffer-list.ts +67 -0
- package/dist/server/node_modules/pg-protocol/src/testing/test-buffers.ts +166 -0
- package/dist/server/node_modules/pg-protocol/src/types/chunky.d.ts +1 -0
- package/dist/server/node_modules/pg-types/.travis.yml +7 -0
- package/dist/server/node_modules/pg-types/Makefile +14 -0
- package/dist/server/node_modules/pg-types/README.md +75 -0
- package/dist/server/node_modules/pg-types/index.d.ts +137 -0
- package/dist/server/node_modules/pg-types/index.js +47 -0
- package/dist/server/node_modules/pg-types/index.test-d.ts +21 -0
- package/dist/server/node_modules/pg-types/lib/arrayParser.js +11 -0
- package/dist/server/node_modules/pg-types/lib/binaryParsers.js +257 -0
- package/dist/server/node_modules/pg-types/lib/builtins.js +73 -0
- package/dist/server/node_modules/pg-types/lib/textParsers.js +215 -0
- package/dist/server/node_modules/pg-types/package.json +42 -0
- package/dist/server/node_modules/pg-types/test/index.js +24 -0
- package/dist/server/node_modules/pg-types/test/types.js +597 -0
- package/dist/server/node_modules/pgpass/README.md +74 -0
- package/dist/server/node_modules/pgpass/lib/helper.js +233 -0
- package/dist/server/node_modules/pgpass/lib/index.js +23 -0
- package/dist/server/node_modules/pgpass/package.json +41 -0
- package/dist/server/node_modules/postgres-array/index.d.ts +4 -0
- package/dist/server/node_modules/postgres-array/index.js +97 -0
- package/dist/server/node_modules/postgres-array/license +21 -0
- package/dist/server/node_modules/postgres-array/package.json +35 -0
- package/dist/server/node_modules/postgres-array/readme.md +43 -0
- package/dist/server/node_modules/postgres-bytea/index.js +33 -0
- package/dist/server/node_modules/postgres-bytea/license +21 -0
- package/dist/server/node_modules/postgres-bytea/package.json +34 -0
- package/dist/server/node_modules/postgres-bytea/readme.md +34 -0
- package/dist/server/node_modules/postgres-date/index.js +116 -0
- package/dist/server/node_modules/postgres-date/license +21 -0
- package/dist/server/node_modules/postgres-date/package.json +33 -0
- package/dist/server/node_modules/postgres-date/readme.md +49 -0
- package/dist/server/node_modules/postgres-interval/index.d.ts +20 -0
- package/dist/server/node_modules/postgres-interval/index.js +125 -0
- package/dist/server/node_modules/postgres-interval/license +21 -0
- package/dist/server/node_modules/postgres-interval/package.json +36 -0
- package/dist/server/node_modules/postgres-interval/readme.md +48 -0
- package/dist/server/node_modules/split2/LICENSE +13 -0
- package/dist/server/node_modules/split2/README.md +85 -0
- package/dist/server/node_modules/split2/bench.js +27 -0
- package/dist/server/node_modules/split2/index.js +141 -0
- package/dist/server/node_modules/split2/package.json +39 -0
- package/dist/server/node_modules/split2/test.js +409 -0
- package/package.json +1 -1
- package/dist/client/assets/plugins-CJOgdAgY.js +0 -1
- package/dist/client/assets/tasks-CAcIEtSF.js +0 -1
- package/dist/client/assets/useInfiniteQuery-Dw4aF3nd.js +0 -1
- package/dist/client/assets/useQuery-CTePvczf.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-All2JJwt.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as ne,j as t,B as ge,e as pt,f as ft,u as $e,r as ht,O as Fe,v as ke,w as gt,K as Ke}from"./index-De7oAufQ.js";import{u as Je,a as Qe}from"./constants-C6R-Odkq.js";import{B as xt,g as Me}from"./generate-id-WpAuYSZF.js";import{C as Ye}from"./collection-display-button-DdFInvSR.js";import{C as jt}from"./collection-search-CGfzh4mC.js";import{C as Ct}from"./card-C0MItTW_.js";import{I as Xe}from"./integration-icon-BkY1vh6I.js";import{D as Ze,a as et,b as tt,c as L}from"./dropdown-menu-Dan8nMb8.js";import{a as st}from"./Copy01-BJ5f3Ft8.js";import{i as ot}from"./DotsVertical-CmyZ1eER.js";import{i as nt}from"./Edit01-BsJ32les.js";import{s as it}from"./Eye-B3PAdhmZ.js";import{s as rt}from"./Trash01-DJLT0hlL.js";import{C as bt}from"./collection-table-wrapper-DLe2aR6i.js";import{E as Ue}from"./empty-state-CoA3_x_6.js";import{n as We}from"./Inbox01-QN0h6e9y.js";import{U as yt}from"./user-DSh4pFej.js";import{E as lt}from"./empty-state-C1iyyf7G.js";import{u as vt}from"./use-list-state-CCkxYz8q.js";import{g as Nt}from"./connection-slug-Bw8dtz1U.js";import{A as wt,h as St,c as _t,b as Pt,d as Dt,e as It,a as At,f as Tt}from"./alert-dialog-CGRFjIvo.js";import{u as Et,e as Ot}from"./use-collections-CN-KZdhF.js";import{u as $t}from"./use-connection-C4RNTGYe.js";import{s as kt}from"./Plus-Bah3bfIq.js";import{V as Lt}from"./layout-CZKgiZuG.js";import{u as zt}from"./useMutation-BDzOMrvq.js";import{P as k}from"./index-BaVHKLOw.js";import{B as Be,a as Re,b as He,c as Ge}from"./breadcrumb-D8mb9kpq.js";import{e as Ft}from"./Dataflow03-DE7FXw07.js";import"./ArrowDown-xJyK-tRR.js";import"./ArrowUp-BO7WH9Uq.js";import"./Check-BTP9VTUM.js";import"./Grid01-Bootsry8.js";import"./List-BFzJ8d3-.js";import"./tooltip-C4rlkzSj.js";import"./index-DtZLm-Fz.js";import"./badge-BWsagPlP.js";import"./Loading01-Bgt2pWQu.js";import"./SearchMd-CbNARIB_.js";import"./input-_VKm0O_1.js";import"./Container-D7IaxBn4.js";import"./ChevronRight-DWZgTrde.js";import"./table-BPkNFl3F.js";import"./avatar-B6y4oqG6.js";import"./useQuery-CTePvczf.js";import"./use-view-mode-CXln2RGt.js";import"./use-mobile-CMHMyYVi.js";import"./slugify-CEUa2lfQ.js";function Kt(s,e){const o=s.properties||{};for(const i in o){const l=o[i];if(l&&l.type==="string"&&(l.format==="url"||l.format==="uri")&&e&&typeof e=="object"&&i in e&&e[i])return e[i]}const a=["image","img","avatar","icon","logo","thumbnail","cover"];for(const i of a)if(e&&typeof e=="object"&&i in e&&typeof e[i]=="string")return e[i]}function Mt(s){const e=ne.c(25),{item:o,schema:a,actions:i}=s;let l;e[0]!==o||e[1]!==a?(l=Kt(a,o),e[0]=o,e[1]=a,e[2]=l):l=e[2];const r=l,c=o&&typeof o=="object"&&"description"in o&&typeof o.description=="string"?o.description:void 0;let p;e[3]!==i?(p=i&&Object.keys(i).length>0,e[3]=i,e[4]=p):p=e[4];const n=p;let m;e[5]!==r||e[6]!==o.title?(m=t.jsx(Xe,{icon:r,name:o.title,size:"md",className:"shrink-0 shadow-sm"}),e[5]=r,e[6]=o.title,e[7]=m):m=e[7];let f;e[8]!==o.title?(f=t.jsx("h3",{className:"text-base font-medium text-foreground truncate",children:o.title}),e[8]=o.title,e[9]=f):f=e[9];const d=c||"No description";let u;e[10]!==d?(u=t.jsx("p",{className:"text-base text-muted-foreground line-clamp-2",children:d}),e[10]=d,e[11]=u):u=e[11];let b;e[12]!==f||e[13]!==u?(b=t.jsxs("div",{className:"flex flex-col gap-0 flex-1",children:[f,u]}),e[12]=f,e[13]=u,e[14]=b):b=e[14];let x;e[15]!==m||e[16]!==b?(x=t.jsxs("div",{className:"flex flex-col gap-4 p-6 flex-1",children:[m,b]}),e[15]=m,e[16]=b,e[17]=x):x=e[17];let N;e[18]!==i||e[19]!==n||e[20]!==o?(N=n&&t.jsx("div",{className:"absolute top-6 right-6 opacity-0 group-hover:opacity-100 transition-opacity",onClick:Rt,onMouseDown:Bt,children:t.jsxs(Ze,{children:[t.jsx(et,{asChild:!0,children:t.jsx(ge,{variant:"ghost",size:"icon",className:"h-8 w-8",onClick:Wt,children:t.jsx(ot,{size:20})})}),t.jsxs(tt,{align:"end",onClick:Ut,children:[i.open&&t.jsxs(L,{onClick:g=>{g.stopPropagation(),i.open?.(o)},children:[t.jsx(it,{size:16}),"Open"]}),i.edit&&t.jsxs(L,{onClick:g=>{g.stopPropagation(),i.edit?.(o)},children:[t.jsx(nt,{size:16}),"Edit"]}),i.duplicate&&t.jsxs(L,{onClick:g=>{g.stopPropagation(),i.duplicate?.(o)},children:[t.jsx(st,{size:16}),"Duplicate"]}),i.delete&&t.jsxs(L,{variant:"destructive",onClick:g=>{g.stopPropagation(),i.delete?.(o)},children:[t.jsx(rt,{size:16}),"Delete"]})]})]})}),e[18]=i,e[19]=n,e[20]=o,e[21]=N):N=e[21];let j;return e[22]!==x||e[23]!==N?(j=t.jsxs(Ct,{className:"cursor-pointer transition-colors h-full flex flex-col group relative",children:[x,N]}),e[22]=x,e[23]=N,e[24]=j):j=e[24],j}function Ut(s){return s.stopPropagation()}function Wt(s){return s.stopPropagation()}function Bt(s){return s.stopPropagation()}function Rt(s){return s.stopPropagation()}const Ht=["icon","avatar","logo"],Ve=["created_at","created_by","id"];function Gt(s){return Object.keys(s).find(e=>Ht.includes(e.toLowerCase()))}function at(s,e){return Object.keys(s.properties||{}).filter(o=>["id","created_at","updated_at","created_by","updated_by"].includes(o)?!1:e?e.includes(o):!0).map(o=>({id:o,label:o.charAt(0).toUpperCase()+o.slice(1).replace(/_/g," ")}))}function Vt(s){const e=ne.c(30),{data:o,schema:a,viewMode:i,search:l,sortKey:r,sortDirection:c,onSort:p,actions:n,onItemClick:m,headerActions:f,emptyState:d,readOnly:u,columns:b,hideToolbar:x,sortableFields:N}=s,j=c===void 0?"asc":c,g=p===void 0?Yt:p;let h;e[0]!==n?(h=n===void 0?{}:n,e[0]=n,e[1]=h):h=e[1];const E=h,T=m===void 0?Qt:m,w=f===void 0?null:f,O=d===void 0?null:d,S=u===void 0?!1:u,_=b===void 0?void 0:b,z=x===void 0?!1:x,y=N===void 0?void 0:N;let v;e[2]!==_||e[3]!==a||e[4]!==y?(v=_?_.filter(Jt).filter(A=>!y||y.includes(A.id)).map(qt):at(a,y),e[2]=_,e[3]=a,e[4]=y,e[5]=v):v=e[5];const I=v;let P;e[6]!==w||e[7]!==z||e[8]!==g||e[9]!==j||e[10]!==r||e[11]!==I?(P=!z&&t.jsx("div",{className:"shrink-0 w-full border-b border-border h-12",children:t.jsxs("div",{className:"flex items-center gap-3 h-12 px-4",children:[t.jsx("div",{className:"flex items-center gap-2 flex-1",children:w}),t.jsx("div",{className:"flex items-center gap-2 shrink-0",children:t.jsx(Ye,{sortKey:r,sortDirection:j,onSort:g,sortOptions:I})})]})}),e[6]=w,e[7]=z,e[8]=g,e[9]=j,e[10]=r,e[11]=I,e[12]=P):P=e[12];let D;e[13]!==E||e[14]!==_||e[15]!==o||e[16]!==O||e[17]!==T||e[18]!==g||e[19]!==S||e[20]!==a||e[21]!==l||e[22]!==j||e[23]!==r||e[24]!==y||e[25]!==i?(D=i==="cards"?t.jsx("div",{className:"flex-1 overflow-auto p-5",children:o.length===0?t.jsx("div",{className:"flex items-center justify-center h-full",children:O||t.jsx(Ue,{icon:t.jsx(We,{size:36,className:"text-muted-foreground"}),title:"No items found",description:l?"Try adjusting your search":"No items to display"})}):t.jsx("div",{className:"grid grid-cols-[repeat(auto-fill,minmax(280px,1fr))] gap-4",children:o.map(A=>t.jsx("div",{onClick:()=>T?.(A),className:"cursor-pointer h-full",children:t.jsx(Mt,{item:A,schema:a,readOnly:S,actions:E})},A.id))})}):t.jsx(bt,{columns:es(_,a,y,E),data:o,sortKey:r,sortDirection:j,onSort:g,onRowClick:T,emptyState:O||t.jsx(Ue,{icon:t.jsx(We,{size:36,className:"text-muted-foreground"}),title:"No items found",description:l?"Try adjusting your search":"No items to display"})}),e[13]=E,e[14]=_,e[15]=o,e[16]=O,e[17]=T,e[18]=g,e[19]=S,e[20]=a,e[21]=l,e[22]=j,e[23]=r,e[24]=y,e[25]=i,e[26]=D):D=e[26];let $;return e[27]!==P||e[28]!==D?($=t.jsxs("div",{className:"h-full flex flex-col overflow-hidden",children:[P,D]}),e[27]=P,e[28]=D,e[29]=$):$=e[29],$}function qt(s){return{id:s.id,label:typeof s.header=="string"?s.header:s.id}}function Jt(s){return s.sortable!==!1}function Qt(){}function Yt(){}function Xt(s){return{id:"actions",header:"",render:e=>t.jsxs(Ze,{children:[t.jsx(et,{asChild:!0,children:t.jsx(ge,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0",onClick:o=>o.stopPropagation(),children:t.jsx(ot,{size:20})})}),t.jsxs(tt,{align:"end",onClick:o=>o.stopPropagation(),children:[s.open&&t.jsxs(L,{onClick:o=>{o.stopPropagation(),s.open?.(e)},children:[t.jsx(it,{size:16}),"Open"]}),s.edit&&t.jsxs(L,{onClick:o=>{o.stopPropagation(),s.edit?.(e)},children:[t.jsx(nt,{size:16}),"Edit"]}),s.duplicate&&t.jsxs(L,{onClick:o=>{o.stopPropagation(),s.duplicate?.(e)},children:[t.jsx(st,{size:16}),"Duplicate"]}),s.delete&&t.jsxs(L,{variant:"destructive",onClick:o=>{o.stopPropagation(),s.delete?.(e)},children:[t.jsx(rt,{size:16}),"Delete"]})]})]}),cellClassName:"w-[60px]",sortable:!1}}function ct(s){const e=s.type;return Array.isArray(e)?e.every(o=>ct({type:o})):e==="string"||e==="number"||e==="integer"||e==="boolean"||e==="null"}function Zt(s,e){const o=s.properties||{},a=Object.keys(o).filter(n=>{const m=o[n];return m&&ct(m)}),i=Gt(o),l=[],r=new Set;i&&a.includes(i)&&(l.push(i),r.add(i));const c=["title","description","updated_at","updated_by"];for(const n of c)a.includes(n)&&!r.has(n)&&(l.push(n),r.add(n));const p=a.filter(n=>!r.has(n)&&!Ve.includes(n)).sort((n,m)=>n.localeCompare(m));for(const n of p)l.push(n),r.add(n);for(const n of Ve)a.includes(n)&&!r.has(n)&&(l.push(n),r.add(n));return l.map(n=>{const m=o[n],f=e?e.includes(n):!["id"].includes(n);return n===i?{id:n,header:"",render:d=>{const u=d[n];return t.jsx(Xe,{icon:u,name:d.title,size:"sm",className:"shrink-0 shadow-sm"})},sortable:!1,cellClassName:"w-16 shrink-0",wrap:!0}:n==="description"?{id:n,header:"Description",render:d=>{const u=d[n];return u==null?"—":t.jsx("span",{className:"block truncate max-w-[50ch]",children:String(u)})},sortable:f,cellClassName:"max-w-[50ch]"}:n==="created_by"||n==="updated_by"?{id:n,header:n.charAt(0).toUpperCase()+n.slice(1).replace(/_/g," "),render:d=>{const u=d[n];return u?t.jsx(yt,{id:String(u),size:"xs"}):"—"},sortable:f,cellClassName:"max-w-[250px]"}:m?.format==="date-time"||n.endsWith("_at")?{id:n,header:n.charAt(0).toUpperCase()+n.slice(1).replace(/_/g," "),render:d=>{const u=d[n];return u?t.jsx("span",{className:"block truncate max-w-full",children:new Date(u).toLocaleDateString()}):"—"},sortable:f,cellClassName:"max-w-[200px]"}:{id:n,header:n.charAt(0).toUpperCase()+n.slice(1).replace(/_/g," "),render:d=>{const u=d[n];return u==null?"—":t.jsx("span",{className:"block truncate max-w-full",children:String(u)})},sortable:f,cellClassName:"max-w-[200px]"}})}function es(s,e,o,a){const i=s||Zt(e,o);return i.some(c=>c.id==="actions")?i:Object.keys(a).length>0?[...i,Xt(a)]:i}function ts(s){const e=ne.c(114),{connectionId:o,org:a,activeCollection:i}=s,l=i.name,r=i.schema??xt,c=i.hasCreateTool,p=i.hasUpdateTool,n=i.hasDeleteTool,m=pt(),{data:f}=ft.useSession(),d=f?.user?.id||"unknown",u=$t(o);let b;e[0]!==u||e[1]!==o?(b=u?Nt(u):o,e[0]=u,e[1]=o,e[2]=b):b=e[2];const x=b,{org:N}=$e();let j;e[3]!==o||e[4]!==N.id?(j={connectionId:o,orgId:N.id},e[3]=o,e[4]=N.id,e[5]=j):j=e[5];const g=Je(j),h=Et(o,l,g),E=`${o}-${l}`;let T;e[6]!==a||e[7]!==E?(T={namespace:a,resource:E,defaultSortKey:"updated_at"},e[6]=a,e[7]=E,e[8]=T):T=e[8];const{search:w,searchTerm:O,setSearch:S,viewMode:_,setViewMode:z,sortKey:y,sortDirection:v,handleSort:I}=vt(T);let P;e[9]!==O||e[10]!==v||e[11]!==y?(P={searchTerm:O,sortKey:y,sortDirection:v},e[9]=O,e[10]=v,e[11]=y,e[12]=P):P=e[12];const D=Ot(o,l,g,P),$=!c&&!p&&!n;let A;e[13]!==x||e[14]!==l||e[15]!==m||e[16]!==a?(A=C=>{m({to:"/$org/$project/mcps/$appSlug/$collectionName/$itemId",params:{org:a,project:Fe,appSlug:x,collectionName:l,itemId:C.id}})},e[13]=x,e[14]=l,e[15]=m,e[16]=a,e[17]=A):A=e[17];const F=A;let ie;e[18]!==h.create||e[19]!==d?(ie=async C=>{const he=new Date().toISOString();await h.create.mutateAsync({...C,id:Me("conn"),title:`${C.title} (Copy)`,created_at:he,updated_at:he,created_by:d,updated_by:d})},e[18]=h.create,e[19]=d,e[20]=ie):ie=e[20];const xe=ie,[K,je]=ht.useState(null);let re;e[21]===Symbol.for("react.memo_cache_sentinel")?(re=C=>{je(C)},e[21]=re):re=e[21];const dt=re;let M;e[22]!==F||e[23]!==p?(M=p&&{edit:F},e[22]=F,e[23]=p,e[24]=M):M=e[24];let U;e[25]!==xe||e[26]!==c?(U=c&&{duplicate:xe},e[25]=xe,e[26]=c,e[27]=U):U=e[27];let W;e[28]!==n?(W=n&&{delete:dt},e[28]=n,e[29]=W):W=e[29];let le;e[30]!==U||e[31]!==W||e[32]!==M?(le={...M,...U,...W},e[30]=U,e[31]=W,e[32]=M,e[33]=le):le=e[33];const Ce=le;let ae;e[34]!==h.delete||e[35]!==K?(ae=async()=>{K&&(await h.delete.mutateAsync(K.id),je(null))},e[34]=h.delete,e[35]=K,e[36]=ae):ae=e[36];const be=ae;let ce;e[37]!==h.create||e[38]!==x||e[39]!==l||e[40]!==c||e[41]!==m||e[42]!==a||e[43]!==d?(ce=async()=>{if(!c){ke.error("Create operation is not available for this collection");return}const C=new Date().toISOString(),he={id:Me("conn"),title:"New Item",description:"A brief description of the item",created_at:C,updated_at:C,created_by:d,updated_by:d};try{const Oe=await h.create.mutateAsync(he);m({to:"/$org/$project/mcps/$appSlug/$collectionName/$itemId",params:{org:a,project:Fe,appSlug:x,collectionName:l,itemId:Oe.id}})}catch(Oe){console.error("Failed to create item:",Oe)}},e[37]=h.create,e[38]=x,e[39]=l,e[40]=c,e[41]=m,e[42]=a,e[43]=d,e[44]=ce):ce=e[44];const ye=ce;let de;e[45]!==r?(de=at(r),e[45]=r,e[46]=de):de=e[46];const ve=de,Le=(D?.length??0)>0,ut=c&&Le,mt=c&&!Le&&!w;let ue;e[47]!==h.create||e[48]!==ye||e[49]!==c?(ue=c?t.jsxs(ge,{onClick:ye,size:"sm",disabled:h.create.isPending,className:"h-7",children:[t.jsx(kt,{className:"mr-2 h-4 w-4"}),h.create.isPending?"Creating...":"Create"]}):null,e[47]=h.create,e[48]=ye,e[49]=c,e[50]=ue):ue=e[50];const ze=ue,Ne=y;let B;e[51]!==I||e[52]!==v||e[53]!==ve||e[54]!==Ne?(B=t.jsx(Ye,{sortKey:Ne,sortDirection:v,onSort:I,sortOptions:ve}),e[51]=I,e[52]=v,e[53]=ve,e[54]=Ne,e[55]=B):B=e[55];const we=ut&&ze;let R;e[56]!==B||e[57]!==we?(R=t.jsxs(Lt,{children:[B,we]}),e[56]=B,e[57]=we,e[58]=R):R=e[58];const Se=`Search ${l}...`;let H;e[59]!==S?(H=C=>{C.key==="Escape"&&(S(""),C.target.blur())},e[59]=S,e[60]=H):H=e[60];let G;e[61]!==w||e[62]!==S||e[63]!==Se||e[64]!==H?(G=t.jsx(jt,{value:w,onChange:S,placeholder:Se,onKeyDown:H}),e[61]=w,e[62]=S,e[63]=Se,e[64]=H,e[65]=G):G=e[65];let V;e[66]!==D?(V=D??[],e[66]=D,e[67]=V):V=e[67];const _e=y;let q;e[68]!==F?(q=C=>F(C),e[68]=F,e[69]=q):q=e[69];const Pe="No items found",De=w?"Try adjusting your search terms":"This collection doesn't have any items yet.",Ie=mt?ze:void 0;let J;e[70]!==Pe||e[71]!==De||e[72]!==Ie?(J=t.jsx(lt,{image:null,title:Pe,description:De,actions:Ie}),e[70]=Pe,e[71]=De,e[72]=Ie,e[73]=J):J=e[73];let Q;e[74]!==I||e[75]!==$||e[76]!==Ce||e[77]!==r||e[78]!==w||e[79]!==S||e[80]!==z||e[81]!==v||e[82]!==V||e[83]!==_e||e[84]!==q||e[85]!==J||e[86]!==_?(Q=t.jsx("div",{className:"flex-1 overflow-auto",children:t.jsx(Vt,{hideToolbar:!0,data:V,schema:r,viewMode:_,onViewModeChange:z,search:w,onSearchChange:S,sortKey:_e,sortDirection:v,onSort:I,actions:Ce,onItemClick:q,readOnly:$,emptyState:J})}),e[74]=I,e[75]=$,e[76]=Ce,e[77]=r,e[78]=w,e[79]=S,e[80]=z,e[81]=v,e[82]=V,e[83]=_e,e[84]=q,e[85]=J,e[86]=_,e[87]=Q):Q=e[87];let Y;e[88]!==G||e[89]!==Q?(Y=t.jsxs("div",{className:"flex flex-col h-full overflow-hidden",children:[G,Q]}),e[88]=G,e[89]=Q,e[90]=Y):Y=e[90];const Ae=!!K;let me;e[91]===Symbol.for("react.memo_cache_sentinel")?(me=C=>{C||je(null)},e[91]=me):me=e[91];let pe;e[92]===Symbol.for("react.memo_cache_sentinel")?(pe=t.jsx(_t,{children:"Delete item?"}),e[92]=pe):pe=e[92];const Te=K?.title;let X;e[93]!==Te?(X=t.jsxs(Pt,{children:[pe,t.jsxs(Dt,{children:['Are you sure you want to delete "',Te,'"? This action cannot be undone.']})]}),e[93]=Te,e[94]=X):X=e[94];let Z;e[95]!==h.delete.isPending?(Z=t.jsx(wt,{disabled:h.delete.isPending,children:"Cancel"}),e[95]=h.delete.isPending,e[96]=Z):Z=e[96];const Ee=h.delete.isPending?"Deleting...":"Delete";let ee;e[97]!==h.delete.isPending||e[98]!==be||e[99]!==Ee?(ee=t.jsx(St,{onClick:be,disabled:h.delete.isPending,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:Ee}),e[97]=h.delete.isPending,e[98]=be,e[99]=Ee,e[100]=ee):ee=e[100];let te;e[101]!==Z||e[102]!==ee?(te=t.jsxs(It,{children:[Z,ee]}),e[101]=Z,e[102]=ee,e[103]=te):te=e[103];let se;e[104]!==X||e[105]!==te?(se=t.jsxs(At,{children:[X,te]}),e[104]=X,e[105]=te,e[106]=se):se=e[106];let oe;e[107]!==Ae||e[108]!==se?(oe=t.jsx(Tt,{open:Ae,onOpenChange:me,children:se}),e[107]=Ae,e[108]=se,e[109]=oe):oe=e[109];let fe;return e[110]!==R||e[111]!==Y||e[112]!==oe?(fe=t.jsxs(t.Fragment,{children:[R,Y,oe]}),e[110]=R,e[111]=Y,e[112]=oe,e[113]=fe):fe=e[113],fe}function ss(){const s=ne.c(12),{org:e,project:o}=$e(),a=gt();let i;s[0]!==e.id?(i={connectionId:Qe,orgId:e.id},s[0]=e.id,s[1]=i):i=s[1];const l=Je(i);let r;s[2]!==l||s[3]!==o?(r=async m=>{const f=o.enabledPlugins??[];if(f.includes(m))return;const d=[...f,m],u=await l.callTool({name:"PROJECT_UPDATE",arguments:{projectId:o.id,enabledPlugins:d}});return u.structuredContent??u},s[2]=l,s[3]=o,s[4]=r):r=s[4];let c;s[5]!==e.id||s[6]!==o||s[7]!==a?(c=()=>{a.invalidateQueries({queryKey:Ke.project(e.id,o.slug)}),a.invalidateQueries({queryKey:Ke.projects(e.id)})},s[5]=e.id,s[6]=o,s[7]=a,s[8]=c):c=s[8];let p;return s[9]!==r||s[10]!==c?(p={mutationFn:r,onSuccess:c,onError:os},s[9]=r,s[10]=c,s[11]=p):p=s[11],zt(p)}function os(s){ke.error("Failed to enable plugin: "+(s instanceof Error?s.message:"Unknown error"))}function ns(s){const e=ne.c(12),{pluginId:o,title:a,description:i,icon:l}=s,r=ss();let c;e[0]!==r||e[1]!==o?(c=async()=>{try{await r.mutateAsync(o),ke.success("Plugin enabled!")}catch{}},e[0]=r,e[1]=o,e[2]=c):c=e[2];const p=c,n=l??null,m=r.isPending?"Enabling…":"Enable plugin";let f;e[3]!==r.isPending||e[4]!==p||e[5]!==m?(f=t.jsx(ge,{onClick:p,disabled:r.isPending,children:m}),e[3]=r.isPending,e[4]=p,e[5]=m,e[6]=f):f=e[6];let d;return e[7]!==i||e[8]!==n||e[9]!==f||e[10]!==a?(d=t.jsx(lt,{image:n,title:a,description:i,actions:f}),e[7]=i,e[8]=n,e[9]=f,e[10]=a,e[11]=d):d=e[11],d}const qe="workflows",is={name:"WORKFLOW",displayName:"Workflow",hasCreateTool:!0,hasUpdateTool:!0,hasDeleteTool:!0};function to(){const s=ne.c(5),{project:e,org:o}=$e();if(!(e.enabledPlugins??[]).includes(qe)){let c;s[0]===Symbol.for("react.memo_cache_sentinel")?(c=t.jsx(k.Header,{children:t.jsx(k.Header.Left,{children:t.jsx(Be,{children:t.jsx(Re,{children:t.jsx(He,{children:t.jsx(Ge,{children:"Workflows"})})})})})}),s[0]=c):c=s[0];let p;return s[1]===Symbol.for("react.memo_cache_sentinel")?(p=t.jsxs(k,{children:[c,t.jsx(k.Content,{children:t.jsx("div",{className:"flex flex-col items-center justify-center h-full",children:t.jsx(ns,{pluginId:qe,title:"Enable Workflows",description:"Automate multi-step processes by enabling the Workflows plugin. Once enabled you can create, run, and monitor workflows.",icon:t.jsx("div",{className:"bg-muted p-4 rounded-full",children:t.jsx(Ft,{className:"size-8 text-muted-foreground"})})})})})]}),s[1]=p):p=s[1],p}let l;s[2]===Symbol.for("react.memo_cache_sentinel")?(l=t.jsx(k.Header,{children:t.jsx(k.Header.Left,{children:t.jsx(Be,{children:t.jsx(Re,{children:t.jsx(He,{children:t.jsx(Ge,{children:"Workflows"})})})})})}),s[2]=l):l=s[2];let r;return s[3]!==o.slug?(r=t.jsxs(k,{children:[l,t.jsx(k.Content,{children:t.jsx(ts,{connectionId:Qe,org:o.slug,activeCollection:is})})]}),s[3]=o.slug,s[4]=r):r=s[4],r}export{to as default};
|
|
1
|
+
import{c as ne,j as t,B as ge,e as pt,f as ft,u as $e,r as ht,O as Fe,v as ke,w as gt,K as Ke}from"./index-DcxE8oe_.js";import{u as Je,a as Qe}from"./constants-BCt7c81T.js";import{B as xt,g as Me}from"./generate-id-BaIFvm62.js";import{C as Ye}from"./collection-display-button-kCOiEzLn.js";import{C as jt}from"./collection-search-Bdxpglbf.js";import{C as Ct}from"./card-CwEWrOs9.js";import{I as Xe}from"./integration-icon-6jcHFHZV.js";import{D as Ze,a as et,b as tt,c as L}from"./dropdown-menu-DEQ5DCnG.js";import{a as st}from"./Copy01-DhAVspEC.js";import{i as ot}from"./DotsVertical-rvqtR29a.js";import{i as nt}from"./Edit01-BaPedGGl.js";import{s as it}from"./Eye-BgAytXDm.js";import{s as rt}from"./Trash01-BtiNjuw3.js";import{C as bt}from"./collection-table-wrapper-D-vPJPam.js";import{E as Ue}from"./empty-state-DmgqwjeV.js";import{n as We}from"./Inbox01-CDOpLWwZ.js";import{U as yt}from"./user-_Hc5WOWn.js";import{E as lt}from"./empty-state-C4c2sKjV.js";import{u as vt}from"./use-list-state-CWVUvMhj.js";import{g as Nt}from"./connection-slug-Bw8dtz1U.js";import{A as wt,h as St,c as _t,b as Pt,d as Dt,e as It,a as At,f as Tt}from"./alert-dialog-BGZzdkI2.js";import{u as Et,e as Ot}from"./use-collections-CObsJD7p.js";import{u as $t}from"./use-connection-Cv_-e2MS.js";import{s as kt}from"./Plus-C9dY5EOr.js";import{V as Lt}from"./layout-DG9LlvE6.js";import{u as zt}from"./useMutation-CV3IN68C.js";import{P as k}from"./index-DZ6p-ZXx.js";import{B as Be,a as Re,b as He,c as Ge}from"./breadcrumb-ijphtzQp.js";import{e as Ft}from"./Dataflow03-ONoSH2VT.js";import"./ArrowDown-bcBjuFxH.js";import"./ArrowUp-BtIkmj4Y.js";import"./Check-GOz4_bBS.js";import"./Grid01-NwJJaoW7.js";import"./List-DD3BKPLz.js";import"./tooltip-CXZH0tSC.js";import"./index-10S4l3se.js";import"./badge-B_BTuJZe.js";import"./Loading01-B85tVuIU.js";import"./SearchMd-CKp0BoPW.js";import"./input-DPpAbHbD.js";import"./Container-C8ScaknS.js";import"./ChevronRight-Ys0vr-YD.js";import"./table-C4WVepD4.js";import"./avatar-DWAYNsNK.js";import"./useQuery-CEE9SUlS.js";import"./use-view-mode-XMRPR1ke.js";import"./use-mobile-v2XXLV0O.js";import"./slugify-CEUa2lfQ.js";function Kt(s,e){const o=s.properties||{};for(const i in o){const l=o[i];if(l&&l.type==="string"&&(l.format==="url"||l.format==="uri")&&e&&typeof e=="object"&&i in e&&e[i])return e[i]}const a=["image","img","avatar","icon","logo","thumbnail","cover"];for(const i of a)if(e&&typeof e=="object"&&i in e&&typeof e[i]=="string")return e[i]}function Mt(s){const e=ne.c(25),{item:o,schema:a,actions:i}=s;let l;e[0]!==o||e[1]!==a?(l=Kt(a,o),e[0]=o,e[1]=a,e[2]=l):l=e[2];const r=l,c=o&&typeof o=="object"&&"description"in o&&typeof o.description=="string"?o.description:void 0;let p;e[3]!==i?(p=i&&Object.keys(i).length>0,e[3]=i,e[4]=p):p=e[4];const n=p;let m;e[5]!==r||e[6]!==o.title?(m=t.jsx(Xe,{icon:r,name:o.title,size:"md",className:"shrink-0 shadow-sm"}),e[5]=r,e[6]=o.title,e[7]=m):m=e[7];let f;e[8]!==o.title?(f=t.jsx("h3",{className:"text-base font-medium text-foreground truncate",children:o.title}),e[8]=o.title,e[9]=f):f=e[9];const d=c||"No description";let u;e[10]!==d?(u=t.jsx("p",{className:"text-base text-muted-foreground line-clamp-2",children:d}),e[10]=d,e[11]=u):u=e[11];let b;e[12]!==f||e[13]!==u?(b=t.jsxs("div",{className:"flex flex-col gap-0 flex-1",children:[f,u]}),e[12]=f,e[13]=u,e[14]=b):b=e[14];let x;e[15]!==m||e[16]!==b?(x=t.jsxs("div",{className:"flex flex-col gap-4 p-6 flex-1",children:[m,b]}),e[15]=m,e[16]=b,e[17]=x):x=e[17];let N;e[18]!==i||e[19]!==n||e[20]!==o?(N=n&&t.jsx("div",{className:"absolute top-6 right-6 opacity-0 group-hover:opacity-100 transition-opacity",onClick:Rt,onMouseDown:Bt,children:t.jsxs(Ze,{children:[t.jsx(et,{asChild:!0,children:t.jsx(ge,{variant:"ghost",size:"icon",className:"h-8 w-8",onClick:Wt,children:t.jsx(ot,{size:20})})}),t.jsxs(tt,{align:"end",onClick:Ut,children:[i.open&&t.jsxs(L,{onClick:g=>{g.stopPropagation(),i.open?.(o)},children:[t.jsx(it,{size:16}),"Open"]}),i.edit&&t.jsxs(L,{onClick:g=>{g.stopPropagation(),i.edit?.(o)},children:[t.jsx(nt,{size:16}),"Edit"]}),i.duplicate&&t.jsxs(L,{onClick:g=>{g.stopPropagation(),i.duplicate?.(o)},children:[t.jsx(st,{size:16}),"Duplicate"]}),i.delete&&t.jsxs(L,{variant:"destructive",onClick:g=>{g.stopPropagation(),i.delete?.(o)},children:[t.jsx(rt,{size:16}),"Delete"]})]})]})}),e[18]=i,e[19]=n,e[20]=o,e[21]=N):N=e[21];let j;return e[22]!==x||e[23]!==N?(j=t.jsxs(Ct,{className:"cursor-pointer transition-colors h-full flex flex-col group relative",children:[x,N]}),e[22]=x,e[23]=N,e[24]=j):j=e[24],j}function Ut(s){return s.stopPropagation()}function Wt(s){return s.stopPropagation()}function Bt(s){return s.stopPropagation()}function Rt(s){return s.stopPropagation()}const Ht=["icon","avatar","logo"],Ve=["created_at","created_by","id"];function Gt(s){return Object.keys(s).find(e=>Ht.includes(e.toLowerCase()))}function at(s,e){return Object.keys(s.properties||{}).filter(o=>["id","created_at","updated_at","created_by","updated_by"].includes(o)?!1:e?e.includes(o):!0).map(o=>({id:o,label:o.charAt(0).toUpperCase()+o.slice(1).replace(/_/g," ")}))}function Vt(s){const e=ne.c(30),{data:o,schema:a,viewMode:i,search:l,sortKey:r,sortDirection:c,onSort:p,actions:n,onItemClick:m,headerActions:f,emptyState:d,readOnly:u,columns:b,hideToolbar:x,sortableFields:N}=s,j=c===void 0?"asc":c,g=p===void 0?Yt:p;let h;e[0]!==n?(h=n===void 0?{}:n,e[0]=n,e[1]=h):h=e[1];const E=h,T=m===void 0?Qt:m,w=f===void 0?null:f,O=d===void 0?null:d,S=u===void 0?!1:u,_=b===void 0?void 0:b,z=x===void 0?!1:x,y=N===void 0?void 0:N;let v;e[2]!==_||e[3]!==a||e[4]!==y?(v=_?_.filter(Jt).filter(A=>!y||y.includes(A.id)).map(qt):at(a,y),e[2]=_,e[3]=a,e[4]=y,e[5]=v):v=e[5];const I=v;let P;e[6]!==w||e[7]!==z||e[8]!==g||e[9]!==j||e[10]!==r||e[11]!==I?(P=!z&&t.jsx("div",{className:"shrink-0 w-full border-b border-border h-12",children:t.jsxs("div",{className:"flex items-center gap-3 h-12 px-4",children:[t.jsx("div",{className:"flex items-center gap-2 flex-1",children:w}),t.jsx("div",{className:"flex items-center gap-2 shrink-0",children:t.jsx(Ye,{sortKey:r,sortDirection:j,onSort:g,sortOptions:I})})]})}),e[6]=w,e[7]=z,e[8]=g,e[9]=j,e[10]=r,e[11]=I,e[12]=P):P=e[12];let D;e[13]!==E||e[14]!==_||e[15]!==o||e[16]!==O||e[17]!==T||e[18]!==g||e[19]!==S||e[20]!==a||e[21]!==l||e[22]!==j||e[23]!==r||e[24]!==y||e[25]!==i?(D=i==="cards"?t.jsx("div",{className:"flex-1 overflow-auto p-5",children:o.length===0?t.jsx("div",{className:"flex items-center justify-center h-full",children:O||t.jsx(Ue,{icon:t.jsx(We,{size:36,className:"text-muted-foreground"}),title:"No items found",description:l?"Try adjusting your search":"No items to display"})}):t.jsx("div",{className:"grid grid-cols-[repeat(auto-fill,minmax(280px,1fr))] gap-4",children:o.map(A=>t.jsx("div",{onClick:()=>T?.(A),className:"cursor-pointer h-full",children:t.jsx(Mt,{item:A,schema:a,readOnly:S,actions:E})},A.id))})}):t.jsx(bt,{columns:es(_,a,y,E),data:o,sortKey:r,sortDirection:j,onSort:g,onRowClick:T,emptyState:O||t.jsx(Ue,{icon:t.jsx(We,{size:36,className:"text-muted-foreground"}),title:"No items found",description:l?"Try adjusting your search":"No items to display"})}),e[13]=E,e[14]=_,e[15]=o,e[16]=O,e[17]=T,e[18]=g,e[19]=S,e[20]=a,e[21]=l,e[22]=j,e[23]=r,e[24]=y,e[25]=i,e[26]=D):D=e[26];let $;return e[27]!==P||e[28]!==D?($=t.jsxs("div",{className:"h-full flex flex-col overflow-hidden",children:[P,D]}),e[27]=P,e[28]=D,e[29]=$):$=e[29],$}function qt(s){return{id:s.id,label:typeof s.header=="string"?s.header:s.id}}function Jt(s){return s.sortable!==!1}function Qt(){}function Yt(){}function Xt(s){return{id:"actions",header:"",render:e=>t.jsxs(Ze,{children:[t.jsx(et,{asChild:!0,children:t.jsx(ge,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0",onClick:o=>o.stopPropagation(),children:t.jsx(ot,{size:20})})}),t.jsxs(tt,{align:"end",onClick:o=>o.stopPropagation(),children:[s.open&&t.jsxs(L,{onClick:o=>{o.stopPropagation(),s.open?.(e)},children:[t.jsx(it,{size:16}),"Open"]}),s.edit&&t.jsxs(L,{onClick:o=>{o.stopPropagation(),s.edit?.(e)},children:[t.jsx(nt,{size:16}),"Edit"]}),s.duplicate&&t.jsxs(L,{onClick:o=>{o.stopPropagation(),s.duplicate?.(e)},children:[t.jsx(st,{size:16}),"Duplicate"]}),s.delete&&t.jsxs(L,{variant:"destructive",onClick:o=>{o.stopPropagation(),s.delete?.(e)},children:[t.jsx(rt,{size:16}),"Delete"]})]})]}),cellClassName:"w-[60px]",sortable:!1}}function ct(s){const e=s.type;return Array.isArray(e)?e.every(o=>ct({type:o})):e==="string"||e==="number"||e==="integer"||e==="boolean"||e==="null"}function Zt(s,e){const o=s.properties||{},a=Object.keys(o).filter(n=>{const m=o[n];return m&&ct(m)}),i=Gt(o),l=[],r=new Set;i&&a.includes(i)&&(l.push(i),r.add(i));const c=["title","description","updated_at","updated_by"];for(const n of c)a.includes(n)&&!r.has(n)&&(l.push(n),r.add(n));const p=a.filter(n=>!r.has(n)&&!Ve.includes(n)).sort((n,m)=>n.localeCompare(m));for(const n of p)l.push(n),r.add(n);for(const n of Ve)a.includes(n)&&!r.has(n)&&(l.push(n),r.add(n));return l.map(n=>{const m=o[n],f=e?e.includes(n):!["id"].includes(n);return n===i?{id:n,header:"",render:d=>{const u=d[n];return t.jsx(Xe,{icon:u,name:d.title,size:"sm",className:"shrink-0 shadow-sm"})},sortable:!1,cellClassName:"w-16 shrink-0",wrap:!0}:n==="description"?{id:n,header:"Description",render:d=>{const u=d[n];return u==null?"—":t.jsx("span",{className:"block truncate max-w-[50ch]",children:String(u)})},sortable:f,cellClassName:"max-w-[50ch]"}:n==="created_by"||n==="updated_by"?{id:n,header:n.charAt(0).toUpperCase()+n.slice(1).replace(/_/g," "),render:d=>{const u=d[n];return u?t.jsx(yt,{id:String(u),size:"xs"}):"—"},sortable:f,cellClassName:"max-w-[250px]"}:m?.format==="date-time"||n.endsWith("_at")?{id:n,header:n.charAt(0).toUpperCase()+n.slice(1).replace(/_/g," "),render:d=>{const u=d[n];return u?t.jsx("span",{className:"block truncate max-w-full",children:new Date(u).toLocaleDateString()}):"—"},sortable:f,cellClassName:"max-w-[200px]"}:{id:n,header:n.charAt(0).toUpperCase()+n.slice(1).replace(/_/g," "),render:d=>{const u=d[n];return u==null?"—":t.jsx("span",{className:"block truncate max-w-full",children:String(u)})},sortable:f,cellClassName:"max-w-[200px]"}})}function es(s,e,o,a){const i=s||Zt(e,o);return i.some(c=>c.id==="actions")?i:Object.keys(a).length>0?[...i,Xt(a)]:i}function ts(s){const e=ne.c(114),{connectionId:o,org:a,activeCollection:i}=s,l=i.name,r=i.schema??xt,c=i.hasCreateTool,p=i.hasUpdateTool,n=i.hasDeleteTool,m=pt(),{data:f}=ft.useSession(),d=f?.user?.id||"unknown",u=$t(o);let b;e[0]!==u||e[1]!==o?(b=u?Nt(u):o,e[0]=u,e[1]=o,e[2]=b):b=e[2];const x=b,{org:N}=$e();let j;e[3]!==o||e[4]!==N.id?(j={connectionId:o,orgId:N.id},e[3]=o,e[4]=N.id,e[5]=j):j=e[5];const g=Je(j),h=Et(o,l,g),E=`${o}-${l}`;let T;e[6]!==a||e[7]!==E?(T={namespace:a,resource:E,defaultSortKey:"updated_at"},e[6]=a,e[7]=E,e[8]=T):T=e[8];const{search:w,searchTerm:O,setSearch:S,viewMode:_,setViewMode:z,sortKey:y,sortDirection:v,handleSort:I}=vt(T);let P;e[9]!==O||e[10]!==v||e[11]!==y?(P={searchTerm:O,sortKey:y,sortDirection:v},e[9]=O,e[10]=v,e[11]=y,e[12]=P):P=e[12];const D=Ot(o,l,g,P),$=!c&&!p&&!n;let A;e[13]!==x||e[14]!==l||e[15]!==m||e[16]!==a?(A=C=>{m({to:"/$org/$project/mcps/$appSlug/$collectionName/$itemId",params:{org:a,project:Fe,appSlug:x,collectionName:l,itemId:C.id}})},e[13]=x,e[14]=l,e[15]=m,e[16]=a,e[17]=A):A=e[17];const F=A;let ie;e[18]!==h.create||e[19]!==d?(ie=async C=>{const he=new Date().toISOString();await h.create.mutateAsync({...C,id:Me("conn"),title:`${C.title} (Copy)`,created_at:he,updated_at:he,created_by:d,updated_by:d})},e[18]=h.create,e[19]=d,e[20]=ie):ie=e[20];const xe=ie,[K,je]=ht.useState(null);let re;e[21]===Symbol.for("react.memo_cache_sentinel")?(re=C=>{je(C)},e[21]=re):re=e[21];const dt=re;let M;e[22]!==F||e[23]!==p?(M=p&&{edit:F},e[22]=F,e[23]=p,e[24]=M):M=e[24];let U;e[25]!==xe||e[26]!==c?(U=c&&{duplicate:xe},e[25]=xe,e[26]=c,e[27]=U):U=e[27];let W;e[28]!==n?(W=n&&{delete:dt},e[28]=n,e[29]=W):W=e[29];let le;e[30]!==U||e[31]!==W||e[32]!==M?(le={...M,...U,...W},e[30]=U,e[31]=W,e[32]=M,e[33]=le):le=e[33];const Ce=le;let ae;e[34]!==h.delete||e[35]!==K?(ae=async()=>{K&&(await h.delete.mutateAsync(K.id),je(null))},e[34]=h.delete,e[35]=K,e[36]=ae):ae=e[36];const be=ae;let ce;e[37]!==h.create||e[38]!==x||e[39]!==l||e[40]!==c||e[41]!==m||e[42]!==a||e[43]!==d?(ce=async()=>{if(!c){ke.error("Create operation is not available for this collection");return}const C=new Date().toISOString(),he={id:Me("conn"),title:"New Item",description:"A brief description of the item",created_at:C,updated_at:C,created_by:d,updated_by:d};try{const Oe=await h.create.mutateAsync(he);m({to:"/$org/$project/mcps/$appSlug/$collectionName/$itemId",params:{org:a,project:Fe,appSlug:x,collectionName:l,itemId:Oe.id}})}catch(Oe){console.error("Failed to create item:",Oe)}},e[37]=h.create,e[38]=x,e[39]=l,e[40]=c,e[41]=m,e[42]=a,e[43]=d,e[44]=ce):ce=e[44];const ye=ce;let de;e[45]!==r?(de=at(r),e[45]=r,e[46]=de):de=e[46];const ve=de,Le=(D?.length??0)>0,ut=c&&Le,mt=c&&!Le&&!w;let ue;e[47]!==h.create||e[48]!==ye||e[49]!==c?(ue=c?t.jsxs(ge,{onClick:ye,size:"sm",disabled:h.create.isPending,className:"h-7",children:[t.jsx(kt,{className:"mr-2 h-4 w-4"}),h.create.isPending?"Creating...":"Create"]}):null,e[47]=h.create,e[48]=ye,e[49]=c,e[50]=ue):ue=e[50];const ze=ue,Ne=y;let B;e[51]!==I||e[52]!==v||e[53]!==ve||e[54]!==Ne?(B=t.jsx(Ye,{sortKey:Ne,sortDirection:v,onSort:I,sortOptions:ve}),e[51]=I,e[52]=v,e[53]=ve,e[54]=Ne,e[55]=B):B=e[55];const we=ut&&ze;let R;e[56]!==B||e[57]!==we?(R=t.jsxs(Lt,{children:[B,we]}),e[56]=B,e[57]=we,e[58]=R):R=e[58];const Se=`Search ${l}...`;let H;e[59]!==S?(H=C=>{C.key==="Escape"&&(S(""),C.target.blur())},e[59]=S,e[60]=H):H=e[60];let G;e[61]!==w||e[62]!==S||e[63]!==Se||e[64]!==H?(G=t.jsx(jt,{value:w,onChange:S,placeholder:Se,onKeyDown:H}),e[61]=w,e[62]=S,e[63]=Se,e[64]=H,e[65]=G):G=e[65];let V;e[66]!==D?(V=D??[],e[66]=D,e[67]=V):V=e[67];const _e=y;let q;e[68]!==F?(q=C=>F(C),e[68]=F,e[69]=q):q=e[69];const Pe="No items found",De=w?"Try adjusting your search terms":"This collection doesn't have any items yet.",Ie=mt?ze:void 0;let J;e[70]!==Pe||e[71]!==De||e[72]!==Ie?(J=t.jsx(lt,{image:null,title:Pe,description:De,actions:Ie}),e[70]=Pe,e[71]=De,e[72]=Ie,e[73]=J):J=e[73];let Q;e[74]!==I||e[75]!==$||e[76]!==Ce||e[77]!==r||e[78]!==w||e[79]!==S||e[80]!==z||e[81]!==v||e[82]!==V||e[83]!==_e||e[84]!==q||e[85]!==J||e[86]!==_?(Q=t.jsx("div",{className:"flex-1 overflow-auto",children:t.jsx(Vt,{hideToolbar:!0,data:V,schema:r,viewMode:_,onViewModeChange:z,search:w,onSearchChange:S,sortKey:_e,sortDirection:v,onSort:I,actions:Ce,onItemClick:q,readOnly:$,emptyState:J})}),e[74]=I,e[75]=$,e[76]=Ce,e[77]=r,e[78]=w,e[79]=S,e[80]=z,e[81]=v,e[82]=V,e[83]=_e,e[84]=q,e[85]=J,e[86]=_,e[87]=Q):Q=e[87];let Y;e[88]!==G||e[89]!==Q?(Y=t.jsxs("div",{className:"flex flex-col h-full overflow-hidden",children:[G,Q]}),e[88]=G,e[89]=Q,e[90]=Y):Y=e[90];const Ae=!!K;let me;e[91]===Symbol.for("react.memo_cache_sentinel")?(me=C=>{C||je(null)},e[91]=me):me=e[91];let pe;e[92]===Symbol.for("react.memo_cache_sentinel")?(pe=t.jsx(_t,{children:"Delete item?"}),e[92]=pe):pe=e[92];const Te=K?.title;let X;e[93]!==Te?(X=t.jsxs(Pt,{children:[pe,t.jsxs(Dt,{children:['Are you sure you want to delete "',Te,'"? This action cannot be undone.']})]}),e[93]=Te,e[94]=X):X=e[94];let Z;e[95]!==h.delete.isPending?(Z=t.jsx(wt,{disabled:h.delete.isPending,children:"Cancel"}),e[95]=h.delete.isPending,e[96]=Z):Z=e[96];const Ee=h.delete.isPending?"Deleting...":"Delete";let ee;e[97]!==h.delete.isPending||e[98]!==be||e[99]!==Ee?(ee=t.jsx(St,{onClick:be,disabled:h.delete.isPending,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:Ee}),e[97]=h.delete.isPending,e[98]=be,e[99]=Ee,e[100]=ee):ee=e[100];let te;e[101]!==Z||e[102]!==ee?(te=t.jsxs(It,{children:[Z,ee]}),e[101]=Z,e[102]=ee,e[103]=te):te=e[103];let se;e[104]!==X||e[105]!==te?(se=t.jsxs(At,{children:[X,te]}),e[104]=X,e[105]=te,e[106]=se):se=e[106];let oe;e[107]!==Ae||e[108]!==se?(oe=t.jsx(Tt,{open:Ae,onOpenChange:me,children:se}),e[107]=Ae,e[108]=se,e[109]=oe):oe=e[109];let fe;return e[110]!==R||e[111]!==Y||e[112]!==oe?(fe=t.jsxs(t.Fragment,{children:[R,Y,oe]}),e[110]=R,e[111]=Y,e[112]=oe,e[113]=fe):fe=e[113],fe}function ss(){const s=ne.c(12),{org:e,project:o}=$e(),a=gt();let i;s[0]!==e.id?(i={connectionId:Qe,orgId:e.id},s[0]=e.id,s[1]=i):i=s[1];const l=Je(i);let r;s[2]!==l||s[3]!==o?(r=async m=>{const f=o.enabledPlugins??[];if(f.includes(m))return;const d=[...f,m],u=await l.callTool({name:"PROJECT_UPDATE",arguments:{projectId:o.id,enabledPlugins:d}});return u.structuredContent??u},s[2]=l,s[3]=o,s[4]=r):r=s[4];let c;s[5]!==e.id||s[6]!==o||s[7]!==a?(c=()=>{a.invalidateQueries({queryKey:Ke.project(e.id,o.slug)}),a.invalidateQueries({queryKey:Ke.projects(e.id)})},s[5]=e.id,s[6]=o,s[7]=a,s[8]=c):c=s[8];let p;return s[9]!==r||s[10]!==c?(p={mutationFn:r,onSuccess:c,onError:os},s[9]=r,s[10]=c,s[11]=p):p=s[11],zt(p)}function os(s){ke.error("Failed to enable plugin: "+(s instanceof Error?s.message:"Unknown error"))}function ns(s){const e=ne.c(12),{pluginId:o,title:a,description:i,icon:l}=s,r=ss();let c;e[0]!==r||e[1]!==o?(c=async()=>{try{await r.mutateAsync(o),ke.success("Plugin enabled!")}catch{}},e[0]=r,e[1]=o,e[2]=c):c=e[2];const p=c,n=l??null,m=r.isPending?"Enabling…":"Enable plugin";let f;e[3]!==r.isPending||e[4]!==p||e[5]!==m?(f=t.jsx(ge,{onClick:p,disabled:r.isPending,children:m}),e[3]=r.isPending,e[4]=p,e[5]=m,e[6]=f):f=e[6];let d;return e[7]!==i||e[8]!==n||e[9]!==f||e[10]!==a?(d=t.jsx(lt,{image:n,title:a,description:i,actions:f}),e[7]=i,e[8]=n,e[9]=f,e[10]=a,e[11]=d):d=e[11],d}const qe="workflows",is={name:"WORKFLOW",displayName:"Workflow",hasCreateTool:!0,hasUpdateTool:!0,hasDeleteTool:!0};function to(){const s=ne.c(5),{project:e,org:o}=$e();if(!(e.enabledPlugins??[]).includes(qe)){let c;s[0]===Symbol.for("react.memo_cache_sentinel")?(c=t.jsx(k.Header,{children:t.jsx(k.Header.Left,{children:t.jsx(Be,{children:t.jsx(Re,{children:t.jsx(He,{children:t.jsx(Ge,{children:"Workflows"})})})})})}),s[0]=c):c=s[0];let p;return s[1]===Symbol.for("react.memo_cache_sentinel")?(p=t.jsxs(k,{children:[c,t.jsx(k.Content,{children:t.jsx("div",{className:"flex flex-col items-center justify-center h-full",children:t.jsx(ns,{pluginId:qe,title:"Enable Workflows",description:"Automate multi-step processes by enabling the Workflows plugin. Once enabled you can create, run, and monitor workflows.",icon:t.jsx("div",{className:"bg-muted p-4 rounded-full",children:t.jsx(Ft,{className:"size-8 text-muted-foreground"})})})})})]}),s[1]=p):p=s[1],p}let l;s[2]===Symbol.for("react.memo_cache_sentinel")?(l=t.jsx(k.Header,{children:t.jsx(k.Header.Left,{children:t.jsx(Be,{children:t.jsx(Re,{children:t.jsx(He,{children:t.jsx(Ge,{children:"Workflows"})})})})})}),s[2]=l):l=s[2];let r;return s[3]!==o.slug?(r=t.jsxs(k,{children:[l,t.jsx(k.Content,{children:t.jsx(ts,{connectionId:Qe,org:o.slug,activeCollection:is})})]}),s[3]=o.slug,s[4]=r):r=s[4],r}export{to as default};
|
package/dist/client/index.html
CHANGED
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
<meta name="twitter:description" content="Hire specialized agents, give them access to your tools, and let them deliver real projects — with planning, verification, and observability built in." />
|
|
13
13
|
<meta name="twitter:image" content="/og-image.png" />
|
|
14
14
|
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
|
|
15
|
-
<script type="module" crossorigin src="/assets/index-
|
|
15
|
+
<script type="module" crossorigin src="/assets/index-DcxE8oe_.js"></script>
|
|
16
16
|
<link rel="stylesheet" crossorigin href="/assets/index-Dqux8LBJ.css">
|
|
17
17
|
</head>
|
|
18
18
|
<body>
|
|
@@ -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
|
+
}
|