decocms 2.293.4 → 2.293.5
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-BjOZmb3_.js → AlertCircle-BzwZh4Zl.js} +1 -1
- package/dist/client/assets/{ArrowNarrowLeft-BcLjzBdj.js → ArrowNarrowLeft-DU3JdF0_.js} +1 -1
- package/dist/client/assets/{ArrowUpRight-K-qOhs5U.js → ArrowUpRight-C84Vhba5.js} +1 -1
- package/dist/client/assets/{CheckCircle-idEJRWqm.js → CheckCircle-C8G8LwxI.js} +1 -1
- package/dist/client/assets/{ChevronDown-8gFfkCAT.js → ChevronDown-B1KJEunc.js} +1 -1
- package/dist/client/assets/{ChevronRight-jn2TY6bg.js → ChevronRight-pxra21qH.js} +1 -1
- package/dist/client/assets/{ChevronUp-GCRvOXUm.js → ChevronUp-DBmcocMx.js} +1 -1
- package/dist/client/assets/{Container-Oz2YNmUh.js → Container-B3xcDrr9.js} +1 -1
- package/dist/client/assets/{DotsVertical-Db4taJ9K.js → DotsVertical-M7OP_kdi.js} +1 -1
- package/dist/client/assets/{LinkExternal01-BCvnibSo.js → LinkExternal01-Dq-dCCCw.js} +1 -1
- package/dist/client/assets/{Lock01-Q6LUoAej.js → Lock01-CVUwQODJ.js} +1 -1
- package/dist/client/assets/{Palette-DeXO2UD-.js → Palette-Czyfskax.js} +1 -1
- package/dist/client/assets/{Play-DQtgluIz.js → Play-BgS-BLqI.js} +1 -1
- package/dist/client/assets/{Plus--NQ8Lzv-.js → Plus-BEIPlAug.js} +1 -1
- package/dist/client/assets/{RefreshCcw01-C_DCJmlp.js → RefreshCcw01-D49W2KKP.js} +1 -1
- package/dist/client/assets/{SearchMd-BSaOo_JL.js → SearchMd-CQmi0vTD.js} +1 -1
- package/dist/client/assets/{Settings02-Dqsstum2.js → Settings02-CvWJhznv.js} +1 -1
- package/dist/client/assets/{Shield01-s7fnlBYV.js → Shield01-D_PgpXDU.js} +1 -1
- package/dist/client/assets/{Star01-UkNlRUFe.js → Star01-O454dIt4.js} +1 -1
- package/dist/client/assets/{Sun-BbHWHHyR.js → Sun-C3hG-7_j.js} +1 -1
- package/dist/client/assets/{Tool01-DbnLjlM2.js → Tool01-DaOorIYv.js} +1 -1
- package/dist/client/assets/{Trash01-zq3BxN1h.js → Trash01-Dj97eTWF.js} +1 -1
- package/dist/client/assets/{User01-BMocx1Ia.js → User01-xJrFa-5i.js} +1 -1
- package/dist/client/assets/{Users03-C4e5uWHr.js → Users03-Dq9QO4iD.js} +1 -1
- package/dist/client/assets/{X-D3ENSJsC.js → X-bXKeRXer.js} +1 -1
- package/dist/client/assets/{XCircle-CaQruiTo.js → XCircle-D52NGz2j.js} +1 -1
- package/dist/client/assets/{XClose-CgOLivFw.js → XClose-sHlfiFPJ.js} +1 -1
- package/dist/client/assets/{Zap-1gz6p0Ma.js → Zap-BuQ1Mub6.js} +1 -1
- package/dist/client/assets/{ZapSquare-BfOpflPt.js → ZapSquare-DlhcZHZC.js} +1 -1
- package/dist/client/assets/{accordion-W_paWQqo.js → accordion-BL_cObLl.js} +1 -1
- package/dist/client/assets/{agent-icon-Cn5oclCs.js → agent-icon-CYCsLMY8.js} +1 -1
- package/dist/client/assets/{agents-list-Bq1lupYm.js → agents-list-wf1-JXYG.js} +1 -1
- package/dist/client/assets/ai-providers-5Oh8bAI9.js +1 -0
- package/dist/client/assets/{alert-dialog-D3pi5b6N.js → alert-dialog-gD-y-16H.js} +1 -1
- package/dist/client/assets/{auth-catchall-fKkOuHdo.js → auth-catchall-CVgWV0bX.js} +1 -1
- package/dist/client/assets/{automation-list-row-DMHIeTUi.js → automation-list-row-BRwFIQ6n.js} +1 -1
- package/dist/client/assets/{automations-BXoe1Q0T.js → automations-JVOMglnF.js} +1 -1
- package/dist/client/assets/{avatar-BhPS0sEl.js → avatar-DFtLsn4k.js} +1 -1
- package/dist/client/assets/{badge-CDfiJQQR.js → badge-9rYE5D0k.js} +1 -1
- package/dist/client/assets/{brand-context-DoPWwJ4r.js → brand-context-m0MAWa6T.js} +1 -1
- package/dist/client/assets/{card-CP805zsI.js → card-DhVwh0JB.js} +1 -1
- package/dist/client/assets/{chat-context-DI872wNm.js → chat-context-CJt5mvhM.js} +1 -1
- package/dist/client/assets/{checkbox-CKpV5oyn.js → checkbox-Co1RL5s6.js} +1 -1
- package/dist/client/assets/{collection-detail-DbpaXe2t.js → collection-detail-C6DXw69j.js} +1 -1
- package/dist/client/assets/{collection-display-button-k9crQV9d.js → collection-display-button-yd9SLQKA.js} +1 -1
- package/dist/client/assets/{collection-search-BpswMTjk.js → collection-search-B84D_FVY.js} +1 -1
- package/dist/client/assets/{collection-search-4JBAiA2C.js → collection-search-eJBrKq3k.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-BHZQvL_J.js → collection-table-wrapper-DVDH_cyl.js} +1 -1
- package/dist/client/assets/{collection-tabs-B3lthMg8.js → collection-tabs-Dk5F4rCw.js} +1 -1
- package/dist/client/assets/{collections-DBXLtq3P.js → collections-DIWSRpRc.js} +1 -1
- package/dist/client/assets/{command-CRl-8DjA.js → command-CsAjukV5.js} +1 -1
- package/dist/client/assets/{connection-card-CdhlAzve.js → connection-card-2KzXnvEe.js} +1 -1
- package/dist/client/assets/{connection-detail-Cf4BNVC3.js → connection-detail-RcoR1uYz.js} +1 -1
- package/dist/client/assets/{connection-form-helpers-Dj6Xs5eA.js → connection-form-helpers-3mXWA4iM.js} +1 -1
- package/dist/client/assets/{connections-C72dpEi8.js → connections-DpXrmeb_.js} +1 -1
- package/dist/client/assets/{constants-tJ81fG25.js → constants-Cf5QbDCh.js} +1 -1
- package/dist/client/assets/{constants-BXf9ANTR.js → constants-ratRqg73.js} +1 -1
- package/dist/client/assets/{dialog-RLyF4eg5.js → dialog-BuC4uwKW.js} +1 -1
- package/dist/client/assets/{domain-settings-BfKS_avD.js → domain-settings-C6ZYhRL9.js} +1 -1
- package/dist/client/assets/{drawer-CG78q1nt.js → drawer-Bl05iru7.js} +1 -1
- package/dist/client/assets/{dropdown-menu-BDa5fLDC.js → dropdown-menu-CEE4ZMkb.js} +1 -1
- package/dist/client/assets/{dynamic-plugin-layout-wXXoe_5G.js → dynamic-plugin-layout-BB4q2C2r.js} +1 -1
- package/dist/client/assets/{empty-state-ErnajtAj.js → empty-state-DidTtVmj.js} +1 -1
- package/dist/client/assets/{empty-state-L95wna48.js → empty-state-UPZNWdZx.js} +1 -1
- package/dist/client/assets/{extract-connection-data-BPBT-cx0.js → extract-connection-data-DbsvqD5Y.js} +1 -1
- package/dist/client/assets/{features-DMy2j_1-.js → features-BU1R__DA.js} +1 -1
- package/dist/client/assets/{form-BhTWNirH.js → form-B9LcVw9F.js} +1 -1
- package/dist/client/assets/{general-X1U_18Wj.js → general-DNpYZ6EL.js} +1 -1
- package/dist/client/assets/{index-D1bA9zIu.js → index-B9TaiaI8.js} +1 -1
- package/dist/client/assets/index-BDaakylR.js +1 -0
- package/dist/client/assets/{index-SvQIjOEI.js → index-Bb0xkdWO.js} +1 -1
- package/dist/client/assets/{index-CBpHmYGS.js → index-BibArEPs.js} +1 -1
- package/dist/client/assets/{index-BKqtR3N2.js → index-CDUWTUlI.js} +2 -2
- package/dist/client/assets/{index-DCHTg4LB.js → index-Ck9cg_5e.js} +1 -1
- package/dist/client/assets/{index-DO0uF7Gp.js → index-D8Xx8vq1.js} +1 -1
- package/dist/client/assets/{index-BSi_7pdx.js → index-D8fB6LIK.js} +1 -1
- package/dist/client/assets/{index-CycJh0eW.js → index-D8zM056i.js} +1 -1
- package/dist/client/assets/{index-DsGCV5t1.js → index-DJJnwTGq.js} +1 -1
- package/dist/client/assets/{index-kw8l6ykm.js → index-DSqlqHtR.js} +3 -3
- package/dist/client/assets/{index-C3bqKLs_.js → index-DeYhLxte.js} +1 -1
- package/dist/client/assets/{index-DlmBTdhU.js → index-DnlpEh__.js} +1 -1
- package/dist/client/assets/{index-C4mKQp91.js → index-axEutp6C.js} +1 -1
- package/dist/client/assets/{index-DyOW0RUm.js → index-lAT0a-lp.js} +1 -1
- package/dist/client/assets/{index-DfvjXpA6.js → index-nCei82Pv.js} +1 -1
- package/dist/client/assets/{infiniteQueryObserver-BDzPf9xQ.js → infiniteQueryObserver-CdlVSD6U.js} +1 -1
- package/dist/client/assets/{input-DdZFm5QD.js → input-B9YRLZzT.js} +1 -1
- package/dist/client/assets/{integration-icon-GgmeOaov.js → integration-icon-BT3MTkMk.js} +1 -1
- package/dist/client/assets/{label-BfGjYD3l.js → label-BnJEOV4m.js} +1 -1
- package/dist/client/assets/{layout-C8Q8lJIU.js → layout-BMrv9IJk.js} +1 -1
- package/dist/client/assets/{lean-canvas-recruit-modal-DS8lrn_0.js → lean-canvas-recruit-modal-Clo5pXS8.js} +1 -1
- package/dist/client/assets/{login-3GauQMNJ.js → login-Ba2KjTcs.js} +1 -1
- package/dist/client/assets/{members-wC3LaYXM.js → members-BUslCVys.js} +1 -1
- package/dist/client/assets/{monaco-editor-DEH3BQYV.js → monaco-editor-DY7iVY5q.js} +1 -1
- package/dist/client/assets/{monitoring-stats-row-p4rwLqzV.js → monitoring-stats-row-T-DBfNKc.js} +1 -1
- package/dist/client/assets/{oauth-callback-cXl4wz4V.js → oauth-callback-C7vFEfz2.js} +1 -1
- package/dist/client/assets/{oauth-callback-ai-provider-fZrOq5Z5.js → oauth-callback-ai-provider-CItODIeI.js} +1 -1
- package/dist/client/assets/{onboarding-pK8C-td_.js → onboarding-DnXzTisH.js} +1 -1
- package/dist/client/assets/{org-layout-BjvDCQaj.js → org-layout-C6RdEBDI.js} +1 -1
- package/dist/client/assets/{org-plugin-layout-BsxDAG3R.js → org-plugin-layout-B1gZZHFJ.js} +1 -1
- package/dist/client/assets/{pair-BjuR1Vev.js → pair-D7_5CZbo.js} +1 -1
- package/dist/client/assets/{plugin-empty-state-Yj66KVWm.js → plugin-empty-state-B8bGa_3C.js} +1 -1
- package/dist/client/assets/{plugin-header-Cl0DmTkb.js → plugin-header-BmY5QXZp.js} +1 -1
- package/dist/client/assets/{plugin-layout-DyHctLfj.js → plugin-layout-Da9PGtnW.js} +1 -1
- package/dist/client/assets/{popover-Ck8t9DNd.js → popover-CoIn4MCb.js} +1 -1
- package/dist/client/assets/{profile-ClJRsqlz.js → profile-CPbUULaF.js} +1 -1
- package/dist/client/assets/{project-app-view-PrZuri_l.js → project-app-view-CzPIl-hq.js} +1 -1
- package/dist/client/assets/registry-BjoC1aBP.js +2 -0
- package/dist/client/assets/{registry-layout-CzSdO28_.js → registry-layout-acF_MpdN.js} +1 -1
- package/dist/client/assets/{required-auth-layout-CXpY2cQd.js → required-auth-layout-HXCzQjRG.js} +1 -1
- package/dist/client/assets/{reset-password-CMm6pkup.js → reset-password-8qLTz3V8.js} +1 -1
- package/dist/client/assets/{roles-O8p4CFWf.js → roles-CTSAC5Vc.js} +1 -1
- package/dist/client/assets/{scroll-area-DJUXiZ9b.js → scroll-area-DBfE0bZp.js} +1 -1
- package/dist/client/assets/{search-input-D9rgJLcT.js → search-input-y8HgveN3.js} +1 -1
- package/dist/client/assets/{select-BtT3gpc8.js → select-DDVbfw52.js} +1 -1
- package/dist/client/assets/{select-model-BYU8vEdG.js → select-model-BcOKSvAJ.js} +1 -1
- package/dist/client/assets/{settings-layout-DVDnaToH.js → settings-layout-BvaDpRCp.js} +1 -1
- package/dist/client/assets/{settings-section-A8NDDpFq.js → settings-section-2oSIvsU8.js} +1 -1
- package/dist/client/assets/{shell-layout-BzqO6QrK.js → shell-layout-BjUFPe81.js} +1 -1
- package/dist/client/assets/{skeleton-BkW87z8Y.js → skeleton-B9B8q_Po.js} +1 -1
- package/dist/client/assets/{sso-DtYY3WTz.js → sso-qsKGi1As.js} +1 -1
- package/dist/client/assets/{store-CbZ5JO_W.js → store-N6Hq49_J.js} +1 -1
- package/dist/client/assets/store-registry-yaXg4QLv.js +2 -0
- package/dist/client/assets/{switch-CeIz4a0t.js → switch-B_u1vojZ.js} +1 -1
- package/dist/client/assets/{table-BW-rIPEf.js → table-DvbyCaYw.js} +1 -1
- package/dist/client/assets/{tabs-C5GRvtY8.js → tabs-McHIAn-A.js} +1 -1
- package/dist/client/assets/{task-status-ChvkxFoN.js → task-status-CEq9fKdf.js} +1 -1
- package/dist/client/assets/{textarea-DLbi42IX.js → textarea-DHpnAboW.js} +1 -1
- package/dist/client/assets/{toggle-group-D9s6Qnlj.js → toggle-group-D8MGreiA.js} +1 -1
- package/dist/client/assets/{tools-list-Bl0UtEt-.js → tools-list-rfSyOhU9.js} +1 -1
- package/dist/client/assets/{tooltip-Dmy1JK40.js → tooltip-BrE5dSu8.js} +1 -1
- package/dist/client/assets/{types-BJMFxBFM.js → types-Mo8TVbbA.js} +1 -1
- package/dist/client/assets/{use-ai-providers-CrOxHqDh.js → use-ai-providers-CQe5dDDP.js} +1 -1
- package/dist/client/assets/{use-collections-D6UN6Et8.js → use-collections-C-WSpVk0.js} +1 -1
- package/dist/client/assets/{use-connection-okJtNg-z.js → use-connection-BaC0qG5N.js} +1 -1
- package/dist/client/assets/{use-copy-GhMNNjgc.js → use-copy-CwireOyz.js} +1 -1
- package/dist/client/assets/{use-create-virtual-mcp-BK5MfCsr.js → use-create-virtual-mcp-O_UjHYAk.js} +1 -1
- package/dist/client/assets/{use-decopilot-events-CH_hOp3h.js → use-decopilot-events-CUiJ-4dG.js} +1 -1
- package/dist/client/assets/{use-delete-connection-CFVqRzdi.js → use-delete-connection-BIlpbYGx.js} +1 -1
- package/dist/client/assets/{use-infinite-scroll-BJayiynP.js → use-infinite-scroll-DerRN4-q.js} +1 -1
- package/dist/client/assets/{use-list-state-jGWeHOcg.js → use-list-state-zKA7fSBh.js} +1 -1
- package/dist/client/assets/{use-mcp-tools-DrTCTUYm.js → use-mcp-tools-DLLCCWMt.js} +1 -1
- package/dist/client/assets/{use-members-DdbTjqv-.js → use-members-CtpKVKUl.js} +1 -1
- package/dist/client/assets/{use-navigate-to-agent-BYNqqJQ5.js → use-navigate-to-agent-CWsNVcm6.js} +1 -1
- package/dist/client/assets/{use-org-sso-Bsg_IZFZ.js → use-org-sso-BUvrwtPm.js} +1 -1
- package/dist/client/assets/{use-organization-roles-BmLHoXKs.js → use-organization-roles-DImXXICa.js} +1 -1
- package/dist/client/assets/{use-organization-settings-j6PDzIGz.js → use-organization-settings-Bj7t39ti.js} +1 -1
- package/dist/client/assets/{use-registry-connections-CgQyGHAH.js → use-registry-connections-_yyeoUB2.js} +1 -1
- package/dist/client/assets/{use-status-sounds-_L8GZOUh.js → use-status-sounds-BTnx4_U2.js} +1 -1
- package/dist/client/assets/{use-tasks-DK2by51E.js → use-tasks-DMo7I-VJ.js} +1 -1
- package/dist/client/assets/{use-view-mode-DZXCRWHN.js → use-view-mode-DDTQ72i6.js} +1 -1
- package/dist/client/assets/{use-virtual-mcp-D50Foh5R.js → use-virtual-mcp-RThtSAmZ.js} +1 -1
- package/dist/client/assets/useInfiniteQuery-37elVpOp.js +1 -0
- package/dist/client/assets/useSuspenseInfiniteQuery-DQSo9Er3.js +1 -0
- package/dist/client/assets/{user-DLXr9rpE.js → user-CTmtoSZB.js} +1 -1
- package/dist/client/assets/{view-mode-toggle-C03hOMgr.js → view-mode-toggle-BWe0qZ6h.js} +1 -1
- package/dist/client/assets/{workflow-CX2neNEp.js → workflow-C1Sjdebj.js} +1 -1
- package/dist/client/assets/workflow-detail-BJCHk7qV.js +1 -0
- package/dist/client/index.html +1 -1
- package/dist/server/cli.js +2 -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-styles/package.json +54 -0
- package/dist/server/node_modules/ansi-styles/readme.md +173 -0
- package/dist/server/node_modules/mimic-fn/index.d.ts +54 -0
- package/dist/server/node_modules/mimic-fn/index.js +13 -0
- package/dist/server/node_modules/mimic-fn/license +9 -0
- package/dist/server/node_modules/mimic-fn/package.json +42 -0
- package/dist/server/node_modules/mimic-fn/readme.md +69 -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/{xtend/LICENSE → postgres-array/license} +2 -1
- 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/server.js +1 -1
- package/package.json +1 -1
- package/dist/client/assets/ai-providers-FTRlEUdE.js +0 -1
- package/dist/client/assets/index-BIAsUusp.js +0 -1
- package/dist/client/assets/registry-ChBuKs9l.js +0 -2
- package/dist/client/assets/store-registry-gwif4zfV.js +0 -2
- package/dist/client/assets/useInfiniteQuery-DXe6VMYm.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-CO9lgsHl.js +0 -1
- package/dist/client/assets/workflow-detail-ichjN1O3.js +0 -1
- package/dist/server/node_modules/is-fullwidth-code-point/index.d.ts +0 -17
- package/dist/server/node_modules/is-fullwidth-code-point/index.js +0 -12
- package/dist/server/node_modules/is-fullwidth-code-point/package.json +0 -53
- package/dist/server/node_modules/is-fullwidth-code-point/readme.md +0 -31
- package/dist/server/node_modules/xtend/.jshintrc +0 -30
- package/dist/server/node_modules/xtend/README.md +0 -32
- package/dist/server/node_modules/xtend/immutable.js +0 -19
- package/dist/server/node_modules/xtend/mutable.js +0 -17
- package/dist/server/node_modules/xtend/package.json +0 -55
- package/dist/server/node_modules/xtend/test.js +0 -103
- /package/dist/server/node_modules/{is-fullwidth-code-point → ansi-styles}/license +0 -0
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
declare const mimicFn: {
|
|
2
|
+
/**
|
|
3
|
+
Make a function mimic another one. It will copy over the properties `name`, `length`, `displayName`, and any custom properties you may have set.
|
|
4
|
+
|
|
5
|
+
@param to - Mimicking function.
|
|
6
|
+
@param from - Function to mimic.
|
|
7
|
+
@returns The modified `to` function.
|
|
8
|
+
|
|
9
|
+
@example
|
|
10
|
+
```
|
|
11
|
+
import mimicFn = require('mimic-fn');
|
|
12
|
+
|
|
13
|
+
function foo() {}
|
|
14
|
+
foo.unicorn = '🦄';
|
|
15
|
+
|
|
16
|
+
function wrapper() {
|
|
17
|
+
return foo();
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
console.log(wrapper.name);
|
|
21
|
+
//=> 'wrapper'
|
|
22
|
+
|
|
23
|
+
mimicFn(wrapper, foo);
|
|
24
|
+
|
|
25
|
+
console.log(wrapper.name);
|
|
26
|
+
//=> 'foo'
|
|
27
|
+
|
|
28
|
+
console.log(wrapper.unicorn);
|
|
29
|
+
//=> '🦄'
|
|
30
|
+
```
|
|
31
|
+
*/
|
|
32
|
+
<
|
|
33
|
+
ArgumentsType extends unknown[],
|
|
34
|
+
ReturnType,
|
|
35
|
+
FunctionType extends (...arguments: ArgumentsType) => ReturnType
|
|
36
|
+
>(
|
|
37
|
+
to: (...arguments: ArgumentsType) => ReturnType,
|
|
38
|
+
from: FunctionType
|
|
39
|
+
): FunctionType;
|
|
40
|
+
|
|
41
|
+
// TODO: Remove this for the next major release, refactor the whole definition to:
|
|
42
|
+
// declare function mimicFn<
|
|
43
|
+
// ArgumentsType extends unknown[],
|
|
44
|
+
// ReturnType,
|
|
45
|
+
// FunctionType extends (...arguments: ArgumentsType) => ReturnType
|
|
46
|
+
// >(
|
|
47
|
+
// to: (...arguments: ArgumentsType) => ReturnType,
|
|
48
|
+
// from: FunctionType
|
|
49
|
+
// ): FunctionType;
|
|
50
|
+
// export = mimicFn;
|
|
51
|
+
default: typeof mimicFn;
|
|
52
|
+
};
|
|
53
|
+
|
|
54
|
+
export = mimicFn;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
const mimicFn = (to, from) => {
|
|
4
|
+
for (const prop of Reflect.ownKeys(from)) {
|
|
5
|
+
Object.defineProperty(to, prop, Object.getOwnPropertyDescriptor(from, prop));
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
return to;
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
module.exports = mimicFn;
|
|
12
|
+
// TODO: Remove this for the next major release
|
|
13
|
+
module.exports.default = mimicFn;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
6
|
+
|
|
7
|
+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
|
8
|
+
|
|
9
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "mimic-fn",
|
|
3
|
+
"version": "2.1.0",
|
|
4
|
+
"description": "Make a function mimic another one",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"repository": "sindresorhus/mimic-fn",
|
|
7
|
+
"author": {
|
|
8
|
+
"name": "Sindre Sorhus",
|
|
9
|
+
"email": "sindresorhus@gmail.com",
|
|
10
|
+
"url": "sindresorhus.com"
|
|
11
|
+
},
|
|
12
|
+
"engines": {
|
|
13
|
+
"node": ">=6"
|
|
14
|
+
},
|
|
15
|
+
"scripts": {
|
|
16
|
+
"test": "xo && ava && tsd"
|
|
17
|
+
},
|
|
18
|
+
"files": [
|
|
19
|
+
"index.js",
|
|
20
|
+
"index.d.ts"
|
|
21
|
+
],
|
|
22
|
+
"keywords": [
|
|
23
|
+
"function",
|
|
24
|
+
"mimic",
|
|
25
|
+
"imitate",
|
|
26
|
+
"rename",
|
|
27
|
+
"copy",
|
|
28
|
+
"inherit",
|
|
29
|
+
"properties",
|
|
30
|
+
"name",
|
|
31
|
+
"func",
|
|
32
|
+
"fn",
|
|
33
|
+
"set",
|
|
34
|
+
"infer",
|
|
35
|
+
"change"
|
|
36
|
+
],
|
|
37
|
+
"devDependencies": {
|
|
38
|
+
"ava": "^1.4.1",
|
|
39
|
+
"tsd": "^0.7.1",
|
|
40
|
+
"xo": "^0.24.0"
|
|
41
|
+
}
|
|
42
|
+
}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
# mimic-fn [](https://travis-ci.org/sindresorhus/mimic-fn)
|
|
2
|
+
|
|
3
|
+
> Make a function mimic another one
|
|
4
|
+
|
|
5
|
+
Useful when you wrap a function in another function and like to preserve the original name and other properties.
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
## Install
|
|
9
|
+
|
|
10
|
+
```
|
|
11
|
+
$ npm install mimic-fn
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
## Usage
|
|
16
|
+
|
|
17
|
+
```js
|
|
18
|
+
const mimicFn = require('mimic-fn');
|
|
19
|
+
|
|
20
|
+
function foo() {}
|
|
21
|
+
foo.unicorn = '🦄';
|
|
22
|
+
|
|
23
|
+
function wrapper() {
|
|
24
|
+
return foo();
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
console.log(wrapper.name);
|
|
28
|
+
//=> 'wrapper'
|
|
29
|
+
|
|
30
|
+
mimicFn(wrapper, foo);
|
|
31
|
+
|
|
32
|
+
console.log(wrapper.name);
|
|
33
|
+
//=> 'foo'
|
|
34
|
+
|
|
35
|
+
console.log(wrapper.unicorn);
|
|
36
|
+
//=> '🦄'
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
## API
|
|
41
|
+
|
|
42
|
+
It will copy over the properties `name`, `length`, `displayName`, and any custom properties you may have set.
|
|
43
|
+
|
|
44
|
+
### mimicFn(to, from)
|
|
45
|
+
|
|
46
|
+
Modifies the `to` function and returns it.
|
|
47
|
+
|
|
48
|
+
#### to
|
|
49
|
+
|
|
50
|
+
Type: `Function`
|
|
51
|
+
|
|
52
|
+
Mimicking function.
|
|
53
|
+
|
|
54
|
+
#### from
|
|
55
|
+
|
|
56
|
+
Type: `Function`
|
|
57
|
+
|
|
58
|
+
Function to mimic.
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
## Related
|
|
62
|
+
|
|
63
|
+
- [rename-fn](https://github.com/sindresorhus/rename-fn) - Rename a function
|
|
64
|
+
- [keep-func-props](https://github.com/ehmicky/keep-func-props) - Wrap a function without changing its name, length and other properties
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
## License
|
|
68
|
+
|
|
69
|
+
MIT © [Sindre Sorhus](https://sindresorhus.com)
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
'use strict'
|
|
2
|
+
|
|
3
|
+
exports.parse = function (source, transform) {
|
|
4
|
+
return new ArrayParser(source, transform).parse()
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
class ArrayParser {
|
|
8
|
+
constructor (source, transform) {
|
|
9
|
+
this.source = source
|
|
10
|
+
this.transform = transform || identity
|
|
11
|
+
this.position = 0
|
|
12
|
+
this.entries = []
|
|
13
|
+
this.recorded = []
|
|
14
|
+
this.dimension = 0
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
isEof () {
|
|
18
|
+
return this.position >= this.source.length
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
nextCharacter () {
|
|
22
|
+
var character = this.source[this.position++]
|
|
23
|
+
if (character === '\\') {
|
|
24
|
+
return {
|
|
25
|
+
value: this.source[this.position++],
|
|
26
|
+
escaped: true
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
return {
|
|
30
|
+
value: character,
|
|
31
|
+
escaped: false
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
record (character) {
|
|
36
|
+
this.recorded.push(character)
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
newEntry (includeEmpty) {
|
|
40
|
+
var entry
|
|
41
|
+
if (this.recorded.length > 0 || includeEmpty) {
|
|
42
|
+
entry = this.recorded.join('')
|
|
43
|
+
if (entry === 'NULL' && !includeEmpty) {
|
|
44
|
+
entry = null
|
|
45
|
+
}
|
|
46
|
+
if (entry !== null) entry = this.transform(entry)
|
|
47
|
+
this.entries.push(entry)
|
|
48
|
+
this.recorded = []
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
consumeDimensions () {
|
|
53
|
+
if (this.source[0] === '[') {
|
|
54
|
+
while (!this.isEof()) {
|
|
55
|
+
var char = this.nextCharacter()
|
|
56
|
+
if (char.value === '=') break
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
parse (nested) {
|
|
62
|
+
var character, parser, quote
|
|
63
|
+
this.consumeDimensions()
|
|
64
|
+
while (!this.isEof()) {
|
|
65
|
+
character = this.nextCharacter()
|
|
66
|
+
if (character.value === '{' && !quote) {
|
|
67
|
+
this.dimension++
|
|
68
|
+
if (this.dimension > 1) {
|
|
69
|
+
parser = new ArrayParser(this.source.substr(this.position - 1), this.transform)
|
|
70
|
+
this.entries.push(parser.parse(true))
|
|
71
|
+
this.position += parser.position - 2
|
|
72
|
+
}
|
|
73
|
+
} else if (character.value === '}' && !quote) {
|
|
74
|
+
this.dimension--
|
|
75
|
+
if (!this.dimension) {
|
|
76
|
+
this.newEntry()
|
|
77
|
+
if (nested) return this.entries
|
|
78
|
+
}
|
|
79
|
+
} else if (character.value === '"' && !character.escaped) {
|
|
80
|
+
if (quote) this.newEntry(true)
|
|
81
|
+
quote = !quote
|
|
82
|
+
} else if (character.value === ',' && !quote) {
|
|
83
|
+
this.newEntry()
|
|
84
|
+
} else {
|
|
85
|
+
this.record(character.value)
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
if (this.dimension !== 0) {
|
|
89
|
+
throw new Error('array dimension not balanced')
|
|
90
|
+
}
|
|
91
|
+
return this.entries
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
function identity (value) {
|
|
96
|
+
return value
|
|
97
|
+
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
The MIT License (MIT)
|
|
2
|
-
|
|
2
|
+
|
|
3
|
+
Copyright (c) Ben Drucker <bvdrucker@gmail.com> (bendrucker.me)
|
|
3
4
|
|
|
4
5
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
5
6
|
of this software and associated documentation files (the "Software"), to deal
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "postgres-array",
|
|
3
|
+
"main": "index.js",
|
|
4
|
+
"version": "2.0.0",
|
|
5
|
+
"description": "Parse postgres array columns",
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"repository": "bendrucker/postgres-array",
|
|
8
|
+
"author": {
|
|
9
|
+
"name": "Ben Drucker",
|
|
10
|
+
"email": "bvdrucker@gmail.com",
|
|
11
|
+
"url": "bendrucker.me"
|
|
12
|
+
},
|
|
13
|
+
"engines": {
|
|
14
|
+
"node": ">=4"
|
|
15
|
+
},
|
|
16
|
+
"scripts": {
|
|
17
|
+
"test": "standard && tape test.js"
|
|
18
|
+
},
|
|
19
|
+
"types": "index.d.ts",
|
|
20
|
+
"keywords": [
|
|
21
|
+
"postgres",
|
|
22
|
+
"array",
|
|
23
|
+
"parser"
|
|
24
|
+
],
|
|
25
|
+
"dependencies": {},
|
|
26
|
+
"devDependencies": {
|
|
27
|
+
"standard": "^12.0.1",
|
|
28
|
+
"tape": "^4.0.0"
|
|
29
|
+
},
|
|
30
|
+
"files": [
|
|
31
|
+
"index.js",
|
|
32
|
+
"index.d.ts",
|
|
33
|
+
"readme.md"
|
|
34
|
+
]
|
|
35
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
# postgres-array [](https://travis-ci.org/bendrucker/postgres-array)
|
|
2
|
+
|
|
3
|
+
> Parse postgres array columns
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
## Install
|
|
7
|
+
|
|
8
|
+
```
|
|
9
|
+
$ npm install --save postgres-array
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
## Usage
|
|
14
|
+
|
|
15
|
+
```js
|
|
16
|
+
var postgresArray = require('postgres-array')
|
|
17
|
+
|
|
18
|
+
postgresArray.parse('{1,2,3}', (value) => parseInt(value, 10))
|
|
19
|
+
//=> [1, 2, 3]
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
## API
|
|
23
|
+
|
|
24
|
+
#### `parse(input, [transform])` -> `array`
|
|
25
|
+
|
|
26
|
+
##### input
|
|
27
|
+
|
|
28
|
+
*Required*
|
|
29
|
+
Type: `string`
|
|
30
|
+
|
|
31
|
+
A Postgres array string.
|
|
32
|
+
|
|
33
|
+
##### transform
|
|
34
|
+
|
|
35
|
+
Type: `function`
|
|
36
|
+
Default: `identity`
|
|
37
|
+
|
|
38
|
+
A function that transforms non-null values inserted into the array.
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
## License
|
|
42
|
+
|
|
43
|
+
MIT © [Ben Drucker](http://bendrucker.me)
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
'use strict'
|
|
2
|
+
|
|
3
|
+
var bufferFrom = Buffer.from || Buffer
|
|
4
|
+
|
|
5
|
+
module.exports = function parseBytea (input) {
|
|
6
|
+
if (/^\\x/.test(input)) {
|
|
7
|
+
// new 'hex' style response (pg >9.0)
|
|
8
|
+
return bufferFrom(input.substr(2), 'hex')
|
|
9
|
+
}
|
|
10
|
+
var output = ''
|
|
11
|
+
var i = 0
|
|
12
|
+
while (i < input.length) {
|
|
13
|
+
if (input[i] !== '\\') {
|
|
14
|
+
output += input[i]
|
|
15
|
+
++i
|
|
16
|
+
} else {
|
|
17
|
+
if (/[0-7]{3}/.test(input.substr(i + 1, 3))) {
|
|
18
|
+
output += String.fromCharCode(parseInt(input.substr(i + 1, 3), 8))
|
|
19
|
+
i += 4
|
|
20
|
+
} else {
|
|
21
|
+
var backslashes = 1
|
|
22
|
+
while (i + backslashes < input.length && input[i + backslashes] === '\\') {
|
|
23
|
+
backslashes++
|
|
24
|
+
}
|
|
25
|
+
for (var k = 0; k < Math.floor(backslashes / 2); ++k) {
|
|
26
|
+
output += '\\'
|
|
27
|
+
}
|
|
28
|
+
i += Math.floor(backslashes / 2) * 2
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
return bufferFrom(output, 'binary')
|
|
33
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
The MIT License (MIT)
|
|
2
|
+
|
|
3
|
+
Copyright (c) Ben Drucker <bvdrucker@gmail.com> (bendrucker.me)
|
|
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
|
|
13
|
+
all 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
|
|
21
|
+
THE SOFTWARE.
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "postgres-bytea",
|
|
3
|
+
"main": "index.js",
|
|
4
|
+
"version": "1.0.1",
|
|
5
|
+
"description": "Postgres bytea parser",
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"repository": "bendrucker/postgres-bytea",
|
|
8
|
+
"author": {
|
|
9
|
+
"name": "Ben Drucker",
|
|
10
|
+
"email": "bvdrucker@gmail.com",
|
|
11
|
+
"url": "bendrucker.me"
|
|
12
|
+
},
|
|
13
|
+
"engines": {
|
|
14
|
+
"node": ">=0.10.0"
|
|
15
|
+
},
|
|
16
|
+
"scripts": {
|
|
17
|
+
"test": "standard && tape test.js"
|
|
18
|
+
},
|
|
19
|
+
"keywords": [
|
|
20
|
+
"bytea",
|
|
21
|
+
"postgres",
|
|
22
|
+
"binary",
|
|
23
|
+
"parser"
|
|
24
|
+
],
|
|
25
|
+
"dependencies": {},
|
|
26
|
+
"devDependencies": {
|
|
27
|
+
"tape": "^4.0.0",
|
|
28
|
+
"standard": "^4.0.0"
|
|
29
|
+
},
|
|
30
|
+
"files": [
|
|
31
|
+
"index.js",
|
|
32
|
+
"readme.md"
|
|
33
|
+
]
|
|
34
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# postgres-bytea [](https://travis-ci.org/bendrucker/postgres-bytea)
|
|
2
|
+
|
|
3
|
+
> Postgres bytea parser
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
## Install
|
|
7
|
+
|
|
8
|
+
```
|
|
9
|
+
$ npm install --save postgres-bytea
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
## Usage
|
|
14
|
+
|
|
15
|
+
```js
|
|
16
|
+
var bytea = require('postgres-bytea');
|
|
17
|
+
bytea('\\000\\100\\200')
|
|
18
|
+
//=> buffer
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
## API
|
|
22
|
+
|
|
23
|
+
#### `bytea(input)` -> `buffer`
|
|
24
|
+
|
|
25
|
+
##### input
|
|
26
|
+
|
|
27
|
+
*Required*
|
|
28
|
+
Type: `string`
|
|
29
|
+
|
|
30
|
+
A Postgres bytea binary string.
|
|
31
|
+
|
|
32
|
+
## License
|
|
33
|
+
|
|
34
|
+
MIT © [Ben Drucker](http://bendrucker.me)
|
package/dist/server/server.js
CHANGED
|
@@ -4630,7 +4630,7 @@ Caused by: ${X.stack}`}};Pt=class Pt extends g7{constructor(Y,X){super(Y,X);this
|
|
|
4630
4630
|
AND "organizationId" NOT IN (
|
|
4631
4631
|
SELECT "organizationId" FROM "member" WHERE "userId" = ${K.id}
|
|
4632
4632
|
)
|
|
4633
|
-
`.execute(H),await p1`DELETE FROM "member" WHERE "userId" = ${X.id}`.execute(H),await p1`DELETE FROM "user" WHERE "id" = ${X.id}`.execute(H)})}catch(H){console.error("[SSO] Failed to merge duplicate user:",H)}}var kd5=(Y)=>{return{trustEmailVerified:!0,provisionUser:Cd5,defaultSSO:[{domain:Y.domain,providerId:Y.providerId,oidcConfig:{issuer:`https://login.microsoftonline.com/${Y.MS_TENANT_ID}/v2.0`,pkce:!0,clientId:Y.MS_CLIENT_ID,clientSecret:Y.MS_CLIENT_SECRET,discoveryEndpoint:`https://login.microsoftonline.com/${Y.MS_TENANT_ID}/v2.0/.well-known/openid-configuration`,authorizationEndpoint:`https://login.microsoftonline.com/${Y.MS_TENANT_ID}/oauth2/v2.0/authorize`,tokenEndpoint:`https://login.microsoftonline.com/${Y.MS_TENANT_ID}/oauth2/v2.0/token`,jwksEndpoint:`https://login.microsoftonline.com/${Y.MS_TENANT_ID}/discovery/v2.0/keys`,userInfoEndpoint:"https://graph.microsoft.com/oidc/userinfo",tokenEndpointAuthentication:"client_secret_post",scopes:Y.scopes,mapping:{id:"sub",email:"email",emailVerified:"email_verified",name:"name",image:"picture",extraFields:{emailVerified:"email_verified",oid:"oid"}}}}]}},W18=(Y)=>{if(Y.providerId==="microsoft")return kd5(Y);throw Error(`Unsupported provider: ${Y.providerId}`)};var K18=D(()=>{DJ();T7();cE()});var O18={};l6(O18,{resetPasswordEnabled:()=>qu1,authConfig:()=>d9,auth:()=>D7,GENERIC_EMAIL_DOMAINS:()=>kq});function vd5(Y){return Y.toLowerCase().trim().replace(/[^a-z0-9\s_-]+/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}function _d5(){let Y=Math.floor(Math.random()*F18.length),X=Math.floor(Math.random()*H18.length),G=F18[Y]??"deco",Q=H18[X]??"studio";return`${G}-${Q}`}function md5(){let Y=[hQ1];try{let X=new URL(hQ1);if(X.hostname==="localhost")Y.push(hQ1.replace("localhost","127.0.0.1"));else if(X.hostname==="127.0.0.1")Y.push(hQ1.replace("127.0.0.1","localhost"))}catch{}return Y}var H18,F18,fd5,bd5,Pu1,yd5,xd5,hd5,U18,d9,B18=void 0,JR0=void 0,qu1=!1,gd5,kq,ud5,ld5,hQ1,N18,D7;var t2=D(()=>{YY();V60();ck4();Vv4();S70();oG0();L_4();E_4();YQ0();NX();mz();Cb4();cE();lb4();Gw1();db4();Z18();$18();hY1();K18();H18=["labs","agent","studio","workspace","systems","core","cloud","works"],F18=["capybara","guarana","deco","samba","feijoada","capoeira","carnival"];fd5=Object.values(l01()).map((Y)=>Y.map((X)=>X.name)).flat(),bd5={...qD1,self:["*",...fd5]},Pu1=tN(bd5),yd5=Pu1.newRole({self:["*"],...U81.statements}),xd5=Pu1.newRole({self:["*"],...U81.statements}),hd5=Pu1.newRole({self:["*"],...U81.statements}),U18=Object.values(l01()).map((Y)=>Y.map((X)=>`self:${X.name}`)).flat(),d9=LT().auth;if(d9.inviteEmailProviderId&&d9.emailProviders&&d9.emailProviders.length>0){let Y=jT(d9.emailProviders,d9.inviteEmailProviderId);if(Y){let X=IT(Y);B18=async(G)=>{let Q=G.inviter.user?.name||G.inviter.user?.email,J=`${J3()}/auth/accept-invitation?invitationId=${G.invitation.id}&redirectTo=/`;await X({to:G.email,subject:`You've been invited to join ${G.organization.name}`,html:TT({preheader:`${Q} has invited you to join ${G.organization.name} on deco Studio.`,heading:"You've been invited",subheading:`<strong>${Q}</strong> has invited you to join <strong>${G.organization.name}</strong> on deco Studio.`,body:b81("Accept invitation",J),footnote:"If you weren\u2019t expecting an invitation, you can safely ignore this email."})})}}}if(d9.resetPasswordEmailProviderId&&d9.emailProviders&&d9.emailProviders.length>0){let Y=jT(d9.emailProviders,d9.resetPasswordEmailProviderId);if(Y){let X=IT(Y);qu1=!0,JR0=async({user:G,url:Q})=>{await X({to:G.email,subject:"Reset your password",html:TT({preheader:"We received a request to reset the password on your deco Studio account.",heading:"Reset your password",subheading:"We received a password reset request for your account. Click the button below to choose a new password.",body:b81("Reset password",Q)+Qw1("This link expires in 24\xA0hours. If you didn\u2019t request a password reset, no action is needed.",!0),footnote:"If you didn\u2019t request a password reset, you can safely ignore this email."})})}}}gd5=[jG0({organizationCreation:{afterCreate:async(Y)=>{await J18(Y.organization.id,Y.member.userId)}},ac:Pu1,creatorRole:"owner",allowUserToCreateOrganization:!0,dynamicAccessControl:{enabled:!0,maximumRolesPerOrganization:500,enableCustomResources:!0,allowedRolesToCreateResources:on,resourceNameValidation:(Y)=>{return{valid:/^[a-zA-Z0-9-_]+$/.test(Y)}}},roles:{user:yd5,admin:xd5,owner:hd5},sendInvitationEmail:B18}),iG0({loginPage:"/login",oidcConfig:{scopes:U18,metadata:{scopes_supported:U18},loginPage:"/login"}}),cG0({enableMetadata:!0,maximumNameLength:64,keyExpiration:{minExpiresIn:0.003472222222222222},enableSessionForAPIKeys:!0,customAPIKeyGetter:(Y)=>{if(Y.headers?.get("X-MCP-Session-Auth")==="true")return null;let G=Y.headers?.get("Authorization");if(G?.startsWith("Bearer "))return G.replace("Bearer ","").trim();return null},permissions:{defaultPermissions:{self:["ORGANIZATION_LIST","ORGANIZATION_GET","ORGANIZATION_MEMBER_LIST","COLLECTION_CONNECTIONS_LIST","COLLECTION_CONNECTIONS_GET","API_KEY_CREATE","API_KEY_LIST"]}},rateLimit:{enabled:!1}}),CG0({defaultRole:"user",adminRoles:["admin","owner"]}),tG0(),fG0({jwt:{expirationTime:"5m"}}),dk4(d9.ssoConfig?W18(d9.ssoConfig):void 0),...d9.magicLinkConfig?.enabled&&d9.emailProviders&&d9.emailProviders.length>0?[rG0(mb4(d9.magicLinkConfig,d9.emailProviders))]:[],...d9.emailOtpConfig?.enabled&&d9.emailProviders&&d9.emailProviders.length>0?[_D1(ub4(d9.emailOtpConfig,d9.emailProviders))]:[]],kq=new Set(["gmail.com","googlemail.com","outlook.com","hotmail.com","live.com","yahoo.com","yahoo.co.uk","icloud.com","me.com","mac.com","aol.com","protonmail.com","proton.me","zoho.com","yandex.com","mail.com","gmx.com","gmx.net","tutanota.com","fastmail.com"]),ud5=f81(),ld5=yb4(ud5),hQ1=J3();N18=S4(),D7=R70({secret:N18.betterAuthSecret||"deco-default-secret-k7x9m2p4q8w3n5v6",baseURL:hQ1,trustedOrigins:md5(),database:ld5,socialProviders:d9.socialProviders,...d9.ssoConfig&&{account:{accountLinking:{trustedProviders:[d9.ssoConfig.providerId]}}},emailAndPassword:{enabled:d9.emailAndPassword.enabled,...JR0&&{sendResetPassword:JR0}},rateLimit:{enabled:!N18.disableRateLimit,window:60,max:1e4},plugins:gd5,databaseHooks:{user:{create:{after:async(Y)=>{if(QR0({id:Y.id,email:Y.email,name:Y.name??null,emailVerified:!!Y.emailVerified}),q6.capture({distinctId:Y.id,event:"user_signed_up",properties:{email:Y.email,email_domain:Y.email?.split("@")[1]?.toLowerCase()??null,email_verified:!!Y.emailVerified,has_name:!!Y.name}}),Y.emailVerified){let Q=Y.email?.split("@")[1]?.toLowerCase();if(Q&&!kq.has(Q)){let J=!1;try{let Z=await new dz(uX().db).getByDomain(Q);if(Z?.autoJoinEnabled){await D7.api.addMember({body:{userId:Y.id,role:"user",organizationId:Z.organizationId}});return}J=!0}catch($){console.error("[Auth] Domain auto-join check failed:",$)}if(J)return}}if(LT().autoCreateOrganizationOnSignup===!1)return;let X=Y.name?Y.name.split(" ")[0]:Y.email.split("@")[0],G=3;for(let Q=0;Q<G;Q++){let J=`${X} ${_d5()}`,$=vd5(J);try{let W=(await D7.api.createOrganization({body:{name:J,slug:$,userId:Y.id}}))?.id??void 0;if(W)q6.groupIdentify({groupType:"organization",groupKey:W,properties:{name:J,slug:$,created_at:new Date().toISOString(),created_via:"signup_default"}}),q6.capture({distinctId:Y.id,event:"organization_created",groups:{organization:W},properties:{organization_id:W,organization_slug:$,created_via:"signup_default"}});return}catch(Z){if(!(Z instanceof Error&&("body"in Z)&&Z.body?.code==="ORGANIZATION_ALREADY_EXISTS")||Q===G-1){console.error("Failed to create default organization:",Z);return}}}}}},session:{create:{after:async(Y)=>{let X=await uX().db.selectFrom("user").select(["id","email","name","emailVerified"]).where("id","=",Y.userId).executeTakeFirst();if(!X)return;QR0({id:X.id,email:X.email,name:X.name??null,emailVerified:!!X.emailVerified})}}}}})});function ZR0(Y,X){return`${Y}:${X}`}function z18(Y){let X=Y?.ttlMs??120000,G=Y?.maxSize??1e4,Q=new Map;function J(){if(Q.size<=G)return;let $=Date.now();for(let[Z,W]of Q)if(W.expiresAt<=$)Q.delete(Z);if(Q.size>G){let Z=Q.size-G,W=0;for(let K of Q.keys()){if(W>=Z)break;Q.delete(K),W++}}}return{get($,Z){let W=ZR0($,Z),K=Q.get(W);if(!K)return;if(K.expiresAt<=Date.now()){Q.delete(W);return}return K.role},set($,Z,W){let K=ZR0($,Z);Q.set(K,{role:W,expiresAt:Date.now()+X,organizationId:Z}),J()},invalidate($,Z){Q.delete(ZR0($,Z))},invalidateOrg($){for(let[Z,W]of Q)if(W.organizationId===$)Q.delete(Z)}}}class D18{db;constructor(Y){this.db=Y}mapRowToSubscription(Y){return{id:Y.id,organizationId:Y.organization_id,connectionId:Y.connection_id,publisher:Y.publisher,eventType:Y.event_type,filter:Y.filter,enabled:Boolean(Y.enabled),createdAt:Y.created_at,updatedAt:Y.updated_at}}async publishEvent(Y){let X=new Date().toISOString();return await this.db.insertInto("events").values({id:Y.id,organization_id:Y.organizationId,type:Y.type,source:Y.source,specversion:"1.0",subject:Y.subject??null,time:Y.time,datacontenttype:Y.datacontenttype??"application/json",dataschema:Y.dataschema??null,data:Y.data?JSON.stringify(Y.data):null,cron:Y.cron??null,status:"pending",attempts:0,last_error:null,next_retry_at:null,created_at:X,updated_at:X}).execute(),{id:Y.id,organizationId:Y.organizationId,type:Y.type,source:Y.source,specversion:"1.0",subject:Y.subject??null,time:Y.time,datacontenttype:Y.datacontenttype??"application/json",dataschema:Y.dataschema??null,data:Y.data??null,cron:Y.cron??null,status:"pending",attempts:0,lastError:null,nextRetryAt:null,createdAt:X,updatedAt:X}}async subscribe(Y){let X=this.db.selectFrom("event_subscriptions").selectAll().where("organization_id","=",Y.organizationId).where("connection_id","=",Y.connectionId).where("event_type","=",Y.eventType);if(Y.publisher)X=X.where("publisher","=",Y.publisher);else X=X.where("publisher","is",null);if(Y.filter)X=X.where("filter","=",Y.filter);else X=X.where("filter","is",null);let G=await X.executeTakeFirst();if(G)return this.mapRowToSubscription(G);let Q=new Date().toISOString();return await this.db.insertInto("event_subscriptions").values({id:Y.id,organization_id:Y.organizationId,connection_id:Y.connectionId,publisher:Y.publisher??null,event_type:Y.eventType,filter:Y.filter??null,enabled:!0,created_at:Q,updated_at:Q}).execute(),{id:Y.id,organizationId:Y.organizationId,connectionId:Y.connectionId,publisher:Y.publisher??null,eventType:Y.eventType,filter:Y.filter??null,enabled:!0,createdAt:Q,updatedAt:Q}}async unsubscribe(Y,X){return{success:((await this.db.deleteFrom("event_subscriptions").where("id","=",Y).where("organization_id","=",X).executeTakeFirst()).numDeletedRows??0n)>0n}}async listSubscriptions(Y,X){let G=this.db.selectFrom("event_subscriptions").selectAll().where("organization_id","=",Y);if(X)G=G.where("connection_id","=",X);return(await G.execute()).map((J)=>this.mapRowToSubscription(J))}async getSubscription(Y,X){let G=await this.db.selectFrom("event_subscriptions").selectAll().where("id","=",Y).where("organization_id","=",X).executeTakeFirst();if(!G)return null;return this.mapRowToSubscription(G)}async getMatchingSubscriptions(Y){return(await this.db.selectFrom("event_subscriptions").selectAll().where("organization_id","=",Y.organizationId).where("enabled","=",!0).where("event_type","=",Y.type).where((G)=>G.or([G("publisher","is",null),G("publisher","=",Y.source)])).execute()).map((G)=>this.mapRowToSubscription(G))}async createDeliveries(Y,X,G){if(X.length===0)return;let Q=new Date().toISOString(),J=G??null,$=X.map((Z)=>({id:crypto.randomUUID(),event_id:Y,subscription_id:Z,status:"pending",attempts:0,last_error:null,delivered_at:null,next_retry_at:J,created_at:Q}));await this.db.insertInto("event_deliveries").values($).execute()}async claimPendingDeliveries(Y){let X=new Date().toISOString(),Q=(await this.db.updateTable("event_deliveries").set({status:"processing"}).where("id","in",p1`(
|
|
4633
|
+
`.execute(H),await p1`DELETE FROM "member" WHERE "userId" = ${X.id}`.execute(H),await p1`DELETE FROM "user" WHERE "id" = ${X.id}`.execute(H)})}catch(H){console.error("[SSO] Failed to merge duplicate user:",H)}}var kd5=(Y)=>{return{trustEmailVerified:!0,provisionUser:Cd5,defaultSSO:[{domain:Y.domain,providerId:Y.providerId,oidcConfig:{issuer:`https://login.microsoftonline.com/${Y.MS_TENANT_ID}/v2.0`,pkce:!0,clientId:Y.MS_CLIENT_ID,clientSecret:Y.MS_CLIENT_SECRET,discoveryEndpoint:`https://login.microsoftonline.com/${Y.MS_TENANT_ID}/v2.0/.well-known/openid-configuration`,authorizationEndpoint:`https://login.microsoftonline.com/${Y.MS_TENANT_ID}/oauth2/v2.0/authorize`,tokenEndpoint:`https://login.microsoftonline.com/${Y.MS_TENANT_ID}/oauth2/v2.0/token`,jwksEndpoint:`https://login.microsoftonline.com/${Y.MS_TENANT_ID}/discovery/v2.0/keys`,userInfoEndpoint:"https://graph.microsoft.com/oidc/userinfo",tokenEndpointAuthentication:"client_secret_post",scopes:Y.scopes,mapping:{id:"sub",email:"email",emailVerified:"email_verified",name:"name",image:"picture",extraFields:{emailVerified:"email_verified",oid:"oid"}}}}]}},W18=(Y)=>{if(Y.providerId==="microsoft")return kd5(Y);throw Error(`Unsupported provider: ${Y.providerId}`)};var K18=D(()=>{DJ();T7();cE()});var O18={};l6(O18,{resetPasswordEnabled:()=>qu1,authConfig:()=>d9,auth:()=>D7,GENERIC_EMAIL_DOMAINS:()=>kq});function vd5(Y){return Y.toLowerCase().trim().replace(/[^a-z0-9\s_-]+/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}function _d5(){let Y=Math.floor(Math.random()*F18.length),X=Math.floor(Math.random()*H18.length),G=F18[Y]??"deco",Q=H18[X]??"studio";return`${G}-${Q}`}function md5(){let Y=[hQ1];try{let X=new URL(hQ1);if(X.hostname==="localhost")Y.push(hQ1.replace("localhost","127.0.0.1"));else if(X.hostname==="127.0.0.1")Y.push(hQ1.replace("127.0.0.1","localhost"))}catch{}return Y}var H18,F18,fd5,bd5,Pu1,yd5,xd5,hd5,U18,d9,B18=void 0,JR0=void 0,qu1=!1,gd5,kq,ud5,ld5,hQ1,N18,D7;var t2=D(()=>{YY();V60();ck4();Vv4();S70();oG0();L_4();E_4();YQ0();NX();mz();Cb4();cE();lb4();Gw1();db4();Z18();$18();hY1();K18();H18=["labs","agent","studio","workspace","systems","core","cloud","works"],F18=["capybara","guarana","deco","samba","feijoada","capoeira","carnival"];fd5=Object.values(l01()).map((Y)=>Y.map((X)=>X.name)).flat(),bd5={...qD1,self:["*",...fd5]},Pu1=tN(bd5),yd5=Pu1.newRole({self:["*"],...U81.statements}),xd5=Pu1.newRole({self:["*"],...U81.statements}),hd5=Pu1.newRole({self:["*"],...U81.statements}),U18=Object.values(l01()).map((Y)=>Y.map((X)=>`self:${X.name}`)).flat(),d9=LT().auth;if(d9.inviteEmailProviderId&&d9.emailProviders&&d9.emailProviders.length>0){let Y=jT(d9.emailProviders,d9.inviteEmailProviderId);if(Y){let X=IT(Y);B18=async(G)=>{let Q=G.inviter.user?.name||G.inviter.user?.email,J=`${J3()}/auth/accept-invitation?invitationId=${G.invitation.id}&redirectTo=/${G.organization.slug}`;await X({to:G.email,subject:`You've been invited to join ${G.organization.name}`,html:TT({preheader:`${Q} has invited you to join ${G.organization.name} on deco Studio.`,heading:"You've been invited",subheading:`<strong>${Q}</strong> has invited you to join <strong>${G.organization.name}</strong> on deco Studio.`,body:b81("Accept invitation",J),footnote:"If you weren\u2019t expecting an invitation, you can safely ignore this email."})})}}}if(d9.resetPasswordEmailProviderId&&d9.emailProviders&&d9.emailProviders.length>0){let Y=jT(d9.emailProviders,d9.resetPasswordEmailProviderId);if(Y){let X=IT(Y);qu1=!0,JR0=async({user:G,url:Q})=>{await X({to:G.email,subject:"Reset your password",html:TT({preheader:"We received a request to reset the password on your deco Studio account.",heading:"Reset your password",subheading:"We received a password reset request for your account. Click the button below to choose a new password.",body:b81("Reset password",Q)+Qw1("This link expires in 24\xA0hours. If you didn\u2019t request a password reset, no action is needed.",!0),footnote:"If you didn\u2019t request a password reset, you can safely ignore this email."})})}}}gd5=[jG0({organizationCreation:{afterCreate:async(Y)=>{await J18(Y.organization.id,Y.member.userId)}},ac:Pu1,creatorRole:"owner",allowUserToCreateOrganization:!0,dynamicAccessControl:{enabled:!0,maximumRolesPerOrganization:500,enableCustomResources:!0,allowedRolesToCreateResources:on,resourceNameValidation:(Y)=>{return{valid:/^[a-zA-Z0-9-_]+$/.test(Y)}}},roles:{user:yd5,admin:xd5,owner:hd5},sendInvitationEmail:B18}),iG0({loginPage:"/login",oidcConfig:{scopes:U18,metadata:{scopes_supported:U18},loginPage:"/login"}}),cG0({enableMetadata:!0,maximumNameLength:64,keyExpiration:{minExpiresIn:0.003472222222222222},enableSessionForAPIKeys:!0,customAPIKeyGetter:(Y)=>{if(Y.headers?.get("X-MCP-Session-Auth")==="true")return null;let G=Y.headers?.get("Authorization");if(G?.startsWith("Bearer "))return G.replace("Bearer ","").trim();return null},permissions:{defaultPermissions:{self:["ORGANIZATION_LIST","ORGANIZATION_GET","ORGANIZATION_MEMBER_LIST","COLLECTION_CONNECTIONS_LIST","COLLECTION_CONNECTIONS_GET","API_KEY_CREATE","API_KEY_LIST"]}},rateLimit:{enabled:!1}}),CG0({defaultRole:"user",adminRoles:["admin","owner"]}),tG0(),fG0({jwt:{expirationTime:"5m"}}),dk4(d9.ssoConfig?W18(d9.ssoConfig):void 0),...d9.magicLinkConfig?.enabled&&d9.emailProviders&&d9.emailProviders.length>0?[rG0(mb4(d9.magicLinkConfig,d9.emailProviders))]:[],...d9.emailOtpConfig?.enabled&&d9.emailProviders&&d9.emailProviders.length>0?[_D1(ub4(d9.emailOtpConfig,d9.emailProviders))]:[]],kq=new Set(["gmail.com","googlemail.com","outlook.com","hotmail.com","live.com","yahoo.com","yahoo.co.uk","icloud.com","me.com","mac.com","aol.com","protonmail.com","proton.me","zoho.com","yandex.com","mail.com","gmx.com","gmx.net","tutanota.com","fastmail.com"]),ud5=f81(),ld5=yb4(ud5),hQ1=J3();N18=S4(),D7=R70({secret:N18.betterAuthSecret||"deco-default-secret-k7x9m2p4q8w3n5v6",baseURL:hQ1,trustedOrigins:md5(),database:ld5,socialProviders:d9.socialProviders,...d9.ssoConfig&&{account:{accountLinking:{trustedProviders:[d9.ssoConfig.providerId]}}},emailAndPassword:{enabled:d9.emailAndPassword.enabled,...JR0&&{sendResetPassword:JR0}},rateLimit:{enabled:!N18.disableRateLimit,window:60,max:1e4},plugins:gd5,databaseHooks:{user:{create:{after:async(Y)=>{if(QR0({id:Y.id,email:Y.email,name:Y.name??null,emailVerified:!!Y.emailVerified}),q6.capture({distinctId:Y.id,event:"user_signed_up",properties:{email:Y.email,email_domain:Y.email?.split("@")[1]?.toLowerCase()??null,email_verified:!!Y.emailVerified,has_name:!!Y.name}}),Y.emailVerified){let Q=Y.email?.split("@")[1]?.toLowerCase();if(Q&&!kq.has(Q)){let J=!1;try{let Z=await new dz(uX().db).getByDomain(Q);if(Z?.autoJoinEnabled){await D7.api.addMember({body:{userId:Y.id,role:"user",organizationId:Z.organizationId}});return}J=!0}catch($){console.error("[Auth] Domain auto-join check failed:",$)}if(J)return}}if(LT().autoCreateOrganizationOnSignup===!1)return;let X=Y.name?Y.name.split(" ")[0]:Y.email.split("@")[0],G=3;for(let Q=0;Q<G;Q++){let J=`${X} ${_d5()}`,$=vd5(J);try{let W=(await D7.api.createOrganization({body:{name:J,slug:$,userId:Y.id}}))?.id??void 0;if(W)q6.groupIdentify({groupType:"organization",groupKey:W,properties:{name:J,slug:$,created_at:new Date().toISOString(),created_via:"signup_default"}}),q6.capture({distinctId:Y.id,event:"organization_created",groups:{organization:W},properties:{organization_id:W,organization_slug:$,created_via:"signup_default"}});return}catch(Z){if(!(Z instanceof Error&&("body"in Z)&&Z.body?.code==="ORGANIZATION_ALREADY_EXISTS")||Q===G-1){console.error("Failed to create default organization:",Z);return}}}}}},session:{create:{after:async(Y)=>{let X=await uX().db.selectFrom("user").select(["id","email","name","emailVerified"]).where("id","=",Y.userId).executeTakeFirst();if(!X)return;QR0({id:X.id,email:X.email,name:X.name??null,emailVerified:!!X.emailVerified})}}}}})});function ZR0(Y,X){return`${Y}:${X}`}function z18(Y){let X=Y?.ttlMs??120000,G=Y?.maxSize??1e4,Q=new Map;function J(){if(Q.size<=G)return;let $=Date.now();for(let[Z,W]of Q)if(W.expiresAt<=$)Q.delete(Z);if(Q.size>G){let Z=Q.size-G,W=0;for(let K of Q.keys()){if(W>=Z)break;Q.delete(K),W++}}}return{get($,Z){let W=ZR0($,Z),K=Q.get(W);if(!K)return;if(K.expiresAt<=Date.now()){Q.delete(W);return}return K.role},set($,Z,W){let K=ZR0($,Z);Q.set(K,{role:W,expiresAt:Date.now()+X,organizationId:Z}),J()},invalidate($,Z){Q.delete(ZR0($,Z))},invalidateOrg($){for(let[Z,W]of Q)if(W.organizationId===$)Q.delete(Z)}}}class D18{db;constructor(Y){this.db=Y}mapRowToSubscription(Y){return{id:Y.id,organizationId:Y.organization_id,connectionId:Y.connection_id,publisher:Y.publisher,eventType:Y.event_type,filter:Y.filter,enabled:Boolean(Y.enabled),createdAt:Y.created_at,updatedAt:Y.updated_at}}async publishEvent(Y){let X=new Date().toISOString();return await this.db.insertInto("events").values({id:Y.id,organization_id:Y.organizationId,type:Y.type,source:Y.source,specversion:"1.0",subject:Y.subject??null,time:Y.time,datacontenttype:Y.datacontenttype??"application/json",dataschema:Y.dataschema??null,data:Y.data?JSON.stringify(Y.data):null,cron:Y.cron??null,status:"pending",attempts:0,last_error:null,next_retry_at:null,created_at:X,updated_at:X}).execute(),{id:Y.id,organizationId:Y.organizationId,type:Y.type,source:Y.source,specversion:"1.0",subject:Y.subject??null,time:Y.time,datacontenttype:Y.datacontenttype??"application/json",dataschema:Y.dataschema??null,data:Y.data??null,cron:Y.cron??null,status:"pending",attempts:0,lastError:null,nextRetryAt:null,createdAt:X,updatedAt:X}}async subscribe(Y){let X=this.db.selectFrom("event_subscriptions").selectAll().where("organization_id","=",Y.organizationId).where("connection_id","=",Y.connectionId).where("event_type","=",Y.eventType);if(Y.publisher)X=X.where("publisher","=",Y.publisher);else X=X.where("publisher","is",null);if(Y.filter)X=X.where("filter","=",Y.filter);else X=X.where("filter","is",null);let G=await X.executeTakeFirst();if(G)return this.mapRowToSubscription(G);let Q=new Date().toISOString();return await this.db.insertInto("event_subscriptions").values({id:Y.id,organization_id:Y.organizationId,connection_id:Y.connectionId,publisher:Y.publisher??null,event_type:Y.eventType,filter:Y.filter??null,enabled:!0,created_at:Q,updated_at:Q}).execute(),{id:Y.id,organizationId:Y.organizationId,connectionId:Y.connectionId,publisher:Y.publisher??null,eventType:Y.eventType,filter:Y.filter??null,enabled:!0,createdAt:Q,updatedAt:Q}}async unsubscribe(Y,X){return{success:((await this.db.deleteFrom("event_subscriptions").where("id","=",Y).where("organization_id","=",X).executeTakeFirst()).numDeletedRows??0n)>0n}}async listSubscriptions(Y,X){let G=this.db.selectFrom("event_subscriptions").selectAll().where("organization_id","=",Y);if(X)G=G.where("connection_id","=",X);return(await G.execute()).map((J)=>this.mapRowToSubscription(J))}async getSubscription(Y,X){let G=await this.db.selectFrom("event_subscriptions").selectAll().where("id","=",Y).where("organization_id","=",X).executeTakeFirst();if(!G)return null;return this.mapRowToSubscription(G)}async getMatchingSubscriptions(Y){return(await this.db.selectFrom("event_subscriptions").selectAll().where("organization_id","=",Y.organizationId).where("enabled","=",!0).where("event_type","=",Y.type).where((G)=>G.or([G("publisher","is",null),G("publisher","=",Y.source)])).execute()).map((G)=>this.mapRowToSubscription(G))}async createDeliveries(Y,X,G){if(X.length===0)return;let Q=new Date().toISOString(),J=G??null,$=X.map((Z)=>({id:crypto.randomUUID(),event_id:Y,subscription_id:Z,status:"pending",attempts:0,last_error:null,delivered_at:null,next_retry_at:J,created_at:Q}));await this.db.insertInto("event_deliveries").values($).execute()}async claimPendingDeliveries(Y){let X=new Date().toISOString(),Q=(await this.db.updateTable("event_deliveries").set({status:"processing"}).where("id","in",p1`(
|
|
4634
4634
|
SELECT d.id
|
|
4635
4635
|
FROM event_deliveries d
|
|
4636
4636
|
INNER JOIN event_subscriptions s ON s.id = d.subscription_id
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{e as t,j as i}from"./index-BKqtR3N2.js";import{O as m}from"./select-model-BYU8vEdG.js";import"./checkbox-CKpV5oyn.js";import"./ChevronDown-8gFfkCAT.js";import"./input-DdZFm5QD.js";import"./dialog-RLyF4eg5.js";import"./X-D3ENSJsC.js";import"./drawer-CG78q1nt.js";import"./tooltip-Dmy1JK40.js";import"./select-BtT3gpc8.js";import"./ChevronUp-GCRvOXUm.js";import"./skeleton-BkW87z8Y.js";import"./Tool01-DbnLjlM2.js";import"./RefreshCcw01-C_DCJmlp.js";import"./SearchMd-BSaOo_JL.js";import"./Settings02-Dqsstum2.js";import"./use-ai-providers-CrOxHqDh.js";import"./constants-BXf9ANTR.js";import"./chat-context-DI872wNm.js";import"./use-virtual-mcp-D50Foh5R.js";import"./use-collections-D6UN6Et8.js";import"./use-decopilot-events-CH_hOp3h.js";import"./create-sse-subscription-CxkOgzKf.js";import"./use-tasks-DK2by51E.js";import"./use-organization-settings-j6PDzIGz.js";import"./ai-providers-logos-D6a8kmGH.js";import"./Zap-1gz6p0Ma.js";import"./AlertCircle-BjOZmb3_.js";import"./CheckCircle-idEJRWqm.js";import"./Trash01-zq3BxN1h.js";import"./index-DO0uF7Gp.js";import"./settings-section-A8NDDpFq.js";import"./card-CP805zsI.js";import"./ArrowUpRight-K-qOhs5U.js";import"./switch-CeIz4a0t.js";import"./toggle-group-D9s6Qnlj.js";import"./avatar-BhPS0sEl.js";import"./User01-BMocx1Ia.js";import"./alert-dialog-D3pi5b6N.js";import"./formatDistanceToNow-Cb2QZZJn.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./unwrap-tool-result-BYXdCQMg.js";function T(){const o=t.c(1);let r;return o[0]===Symbol.for("react.memo_cache_sentinel")?(r=i.jsx(m,{}),o[0]=r):r=o[0],r}export{T as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{e as n,j as r,r as d,g as h,O as f,l as u}from"./index-BKqtR3N2.js";import{S as j,a as b,b as S}from"./index-DO0uF7Gp.js";import{u as _}from"./tooltip-Dmy1JK40.js";import{u as k,T as y,a as T,b as i,S as g}from"./index-CycJh0eW.js";import{C as v}from"./chat-context-DI872wNm.js";import"./X-D3ENSJsC.js";import"./agent-icon-Cn5oclCs.js";import"./AlertCircle-BjOZmb3_.js";import"./Tool01-DbnLjlM2.js";import"./XClose-CgOLivFw.js";import"./RefreshCcw01-C_DCJmlp.js";import"./ArrowNarrowLeft-BcLjzBdj.js";import"./XCircle-CaQruiTo.js";import"./ArrowUpRight-K-qOhs5U.js";import"./ZapSquare-BfOpflPt.js";import"./Users03-C4e5uWHr.js";import"./CheckCircle-idEJRWqm.js";import"./ChevronDown-8gFfkCAT.js";import"./ChevronRight-jn2TY6bg.js";import"./ChevronUp-GCRvOXUm.js";import"./DotsVertical-Db4taJ9K.js";import"./Container-Oz2YNmUh.js";import"./Star01-UkNlRUFe.js";import"./Palette-DeXO2UD-.js";import"./SearchMd-BSaOo_JL.js";import"./LinkExternal01-BCvnibSo.js";import"./Lock01-Q6LUoAej.js";import"./Sun-BbHWHHyR.js";import"./Play-DQtgluIz.js";import"./Plus--NQ8Lzv-.js";import"./Settings02-Dqsstum2.js";import"./Shield01-s7fnlBYV.js";import"./Trash01-zq3BxN1h.js";import"./User01-BMocx1Ia.js";import"./Zap-1gz6p0Ma.js";import"./shell-layout-BzqO6QrK.js";import"./dialog-RLyF4eg5.js";import"./required-auth-layout-CXpY2cQd.js";import"./use-tasks-DK2by51E.js";import"./use-collections-D6UN6Et8.js";import"./constants-BXf9ANTR.js";import"./use-organization-settings-j6PDzIGz.js";import"./use-org-sso-Bsg_IZFZ.js";import"./pair-BjuR1Vev.js";import"./index-DfvjXpA6.js";import"./use-copy-GhMNNjgc.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./content-blocks-o63cs2vh.js";import"./types-BJMFxBFM.js";import"./integration-icon-GgmeOaov.js";import"./use-virtual-mcp-D50Foh5R.js";import"./skeleton-BkW87z8Y.js";import"./popover-Ck8t9DNd.js";import"./drawer-CG78q1nt.js";import"./avatar-BhPS0sEl.js";import"./alert-dialog-D3pi5b6N.js";import"./form-BhTWNirH.js";import"./label-BfGjYD3l.js";import"./input-DdZFm5QD.js";import"./index-BSi_7pdx.js";import"./use-mcp-tools-DrTCTUYm.js";import"./use-ai-providers-CrOxHqDh.js";import"./index-DsGCV5t1.js";import"./switch-CeIz4a0t.js";import"./use-connection-okJtNg-z.js";import"./lean-canvas-recruit-modal-DS8lrn_0.js";import"./use-navigate-to-agent-BYNqqJQ5.js";import"./collection-search-4JBAiA2C.js";import"./checkbox-CKpV5oyn.js";import"./extract-connection-data-BPBT-cx0.js";import"./constants-tJ81fG25.js";import"./collections-DBXLtq3P.js";import"./tabs-C5GRvtY8.js";import"./dropdown-menu-BDa5fLDC.js";import"./select-BtT3gpc8.js";import"./toggle-group-D9s6Qnlj.js";import"./select-model-BYU8vEdG.js";import"./ai-providers-logos-D6a8kmGH.js";import"./settings-section-A8NDDpFq.js";import"./card-CP805zsI.js";import"./formatDistanceToNow-Cb2QZZJn.js";import"./unwrap-tool-result-BYXdCQMg.js";import"./index-CBpHmYGS.js";import"./question-004-sINsf4GQ.js";import"./connection-slug-eyAPH6o3.js";import"./connection-card-CdhlAzve.js";import"./use-registry-connections-CgQyGHAH.js";import"./useInfiniteQuery-DXe6VMYm.js";import"./infiniteQueryObserver-BDzPf9xQ.js";import"./collection-tabs-B3lthMg8.js";import"./badge-CDfiJQQR.js";import"./textarea-DLbi42IX.js";import"./connection-form-helpers-Dj6Xs5eA.js";import"./use-infinite-scroll-BJayiynP.js";import"./useSuspenseInfiniteQuery-CO9lgsHl.js";import"./collection-search-BpswMTjk.js";import"./use-create-virtual-mcp-BK5MfCsr.js";import"./empty-state-ErnajtAj.js";import"./use-decopilot-events-CH_hOp3h.js";import"./create-sse-subscription-CxkOgzKf.js";import"./task-status-ChvkxFoN.js";const N=280;function P(){const t=n.c(2),{tasksOpen:e}=k();if(!e)return null;let o;t[0]===Symbol.for("react.memo_cache_sentinel")?(o={width:`${N}px`},t[0]=o):o=t[0];let m;return t[1]===Symbol.for("react.memo_cache_sentinel")?(m=r.jsx("aside",{className:"shrink-0 h-full bg-sidebar pb-1",style:o,children:r.jsx("div",{className:"h-full p-0.5 pt-0.25",children:r.jsx("div",{className:"h-full bg-background rounded-[0.75rem] overflow-hidden card-shadow",children:r.jsx(y,{})})})}),t[1]=m):m=t[1],m}function C(){const t=n.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=r.jsx(d.Suspense,{fallback:null,children:r.jsx(P,{})}),t[0]=e):e=t[0],e}function x(){const t=n.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=r.jsx("div",{className:"flex-1 flex items-center justify-center",children:r.jsx(u,{size:20,className:"animate-spin text-muted-foreground"})}),t[0]=e):e=t[0],e}function yr(){const t=n.c(7),e=_();let o;t[0]===Symbol.for("react.memo_cache_sentinel")?(o={strict:!1},t[0]=o):o=t[0];const c=!!h(o).taskId;let s;t[1]===Symbol.for("react.memo_cache_sentinel")?(s={"--sidebar-width-icon":"3.5rem"},t[1]=s):s=t[1];let l;t[2]===Symbol.for("react.memo_cache_sentinel")?(l=r.jsx(g,{}),t[2]=l):l=t[2];let p;t[3]===Symbol.for("react.memo_cache_sentinel")?(p={background:"transparent",containerType:"inline-size"},t[3]=p):p=t[3];let a;return t[4]!==c||t[5]!==e?(a=r.jsx(j,{defaultOpen:!1,children:r.jsx("div",{className:"flex flex-col h-dvh overflow-hidden",children:r.jsxs(b,{className:"flex-1 bg-sidebar",style:s,children:[l,r.jsx(S,{className:"flex flex-col",style:p,children:r.jsx(v,{children:r.jsx(T,{children:e?r.jsx(d.Suspense,{fallback:r.jsx(x,{}),children:r.jsx(f,{})}):r.jsxs(i,{children:[r.jsxs(i.Header,{children:[r.jsxs(i.LeftColumn,{children:[r.jsx(i.Nav,{}),r.jsx(i.TogglesSlot,{})]}),r.jsx(i.CenterSlot,{}),r.jsxs(i.RightColumn,{children:[r.jsx(i.TabsSlot,{}),r.jsx(i.RightSlot,{})]})]}),r.jsxs("div",{className:"flex-1 min-h-0 flex flex-row",children:[c&&r.jsx(C,{}),r.jsx(d.Suspense,{fallback:r.jsx(x,{}),children:r.jsx(f,{})})]})]})})})})]})})}),t[4]=c,t[5]=e,t[6]=a):a=t[6],a}export{yr as default};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/registry-layout-CzSdO28_.js","assets/index-BKqtR3N2.js","assets/index-CICJCo3v.css","assets/ArrowNarrowLeft-BcLjzBdj.js","assets/CheckCircle-idEJRWqm.js","assets/Container-Oz2YNmUh.js","assets/Settings02-Dqsstum2.js","assets/XCircle-CaQruiTo.js","assets/constants-BXf9ANTR.js","assets/useInfiniteQuery-DXe6VMYm.js","assets/infiniteQueryObserver-BDzPf9xQ.js","assets/badge-CDfiJQQR.js","assets/input-DdZFm5QD.js","assets/dropdown-menu-BDa5fLDC.js","assets/ChevronDown-8gFfkCAT.js","assets/ChevronRight-jn2TY6bg.js","assets/DotsVertical-Db4taJ9K.js","assets/table-BW-rIPEf.js","assets/toggle-group-D9s6Qnlj.js","assets/use-view-mode-DZXCRWHN.js","assets/tooltip-Dmy1JK40.js","assets/SearchMd-BSaOo_JL.js","assets/dialog-RLyF4eg5.js","assets/X-D3ENSJsC.js","assets/AlertCircle-BjOZmb3_.js","assets/alert-dialog-D3pi5b6N.js","assets/card-CP805zsI.js","assets/Trash01-zq3BxN1h.js","assets/label-BfGjYD3l.js","assets/select-BtT3gpc8.js","assets/ChevronUp-GCRvOXUm.js","assets/switch-CeIz4a0t.js","assets/textarea-DLbi42IX.js","assets/RefreshCcw01-C_DCJmlp.js","assets/checkbox-CKpV5oyn.js","assets/LinkExternal01-BCvnibSo.js","assets/use-copy-GhMNNjgc.js","assets/Plus--NQ8Lzv-.js","assets/Play-DQtgluIz.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{e as a,j as t,r,l as i,_ as o}from"./index-BKqtR3N2.js";const n=r.lazy(()=>o(()=>import("./registry-layout-CzSdO28_.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38])));function c(){const s=a.c(1);let e;return s[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx(r.Suspense,{fallback:t.jsx("div",{className:"flex-1 flex items-center justify-center",children:t.jsx(i,{size:20,className:"animate-spin text-muted-foreground"})}),children:t.jsx(n,{})}),s[0]=e):e=s[0],e}export{c as default};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/registry-layout-CzSdO28_.js","assets/index-BKqtR3N2.js","assets/index-CICJCo3v.css","assets/ArrowNarrowLeft-BcLjzBdj.js","assets/CheckCircle-idEJRWqm.js","assets/Container-Oz2YNmUh.js","assets/Settings02-Dqsstum2.js","assets/XCircle-CaQruiTo.js","assets/constants-BXf9ANTR.js","assets/useInfiniteQuery-DXe6VMYm.js","assets/infiniteQueryObserver-BDzPf9xQ.js","assets/badge-CDfiJQQR.js","assets/input-DdZFm5QD.js","assets/dropdown-menu-BDa5fLDC.js","assets/ChevronDown-8gFfkCAT.js","assets/ChevronRight-jn2TY6bg.js","assets/DotsVertical-Db4taJ9K.js","assets/table-BW-rIPEf.js","assets/toggle-group-D9s6Qnlj.js","assets/use-view-mode-DZXCRWHN.js","assets/tooltip-Dmy1JK40.js","assets/SearchMd-BSaOo_JL.js","assets/dialog-RLyF4eg5.js","assets/X-D3ENSJsC.js","assets/AlertCircle-BjOZmb3_.js","assets/alert-dialog-D3pi5b6N.js","assets/card-CP805zsI.js","assets/Trash01-zq3BxN1h.js","assets/label-BfGjYD3l.js","assets/select-BtT3gpc8.js","assets/ChevronUp-GCRvOXUm.js","assets/switch-CeIz4a0t.js","assets/textarea-DLbi42IX.js","assets/RefreshCcw01-C_DCJmlp.js","assets/checkbox-CKpV5oyn.js","assets/LinkExternal01-BCvnibSo.js","assets/use-copy-GhMNNjgc.js","assets/Plus--NQ8Lzv-.js","assets/Play-DQtgluIz.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{e as n,f as c,g as m,j as r,l as f,r as l,_ as u}from"./index-BKqtR3N2.js";const _=l.lazy(()=>u(()=>import("./registry-layout-CzSdO28_.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38])));function x(){const e=n.c(5),o=c();let t;e[0]===Symbol.for("react.memo_cache_sentinel")?(t={from:"/shell/$org"},e[0]=t):t=e[0];const{org:i}=m(t);let s;e[1]===Symbol.for("react.memo_cache_sentinel")?(s=r.jsx("div",{className:"h-full flex items-center justify-center",children:r.jsx(f,{size:20,className:"animate-spin text-muted-foreground"})}),e[1]=s):s=e[1];let a;return e[2]!==o||e[3]!==i?(a=r.jsx(l.Suspense,{fallback:s,children:r.jsx(_,{onBack:()=>o({to:"/$org/settings/store",params:{org:i}})})}),e[2]=o,e[3]=i,e[4]=a):a=e[4],a}export{x as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{I as u}from"./infiniteQueryObserver-BDzPf9xQ.js";import{c2 as i}from"./index-BKqtR3N2.js";function t(e,r){return i(e,u,r)}export{t as u};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{I as s}from"./infiniteQueryObserver-BDzPf9xQ.js";import{c2 as u,c3 as n}from"./index-BKqtR3N2.js";function a(r,e){return u({...r,enabled:!0,suspense:!0,throwOnError:n},s,e)}export{a as u};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{e as s,g as l,j as o,l as a,E as n,r as c}from"./index-BKqtR3N2.js";import{a as f}from"./index-SvQIjOEI.js";import"./index-DlmBTdhU.js";import"./constants-BXf9ANTR.js";import"./collections-DBXLtq3P.js";import"./index-DCHTg4LB.js";import"./use-virtual-mcp-D50Foh5R.js";import"./use-collections-D6UN6Et8.js";import"./monaco-editor-DEH3BQYV.js";import"./index-DfvjXpA6.js";import"./accordion-W_paWQqo.js";import"./agent-icon-Cn5oclCs.js";import"./AlertCircle-BjOZmb3_.js";import"./Tool01-DbnLjlM2.js";import"./XClose-CgOLivFw.js";import"./RefreshCcw01-C_DCJmlp.js";import"./ArrowNarrowLeft-BcLjzBdj.js";import"./XCircle-CaQruiTo.js";import"./ArrowUpRight-K-qOhs5U.js";import"./ZapSquare-BfOpflPt.js";import"./Users03-C4e5uWHr.js";import"./CheckCircle-idEJRWqm.js";import"./ChevronDown-8gFfkCAT.js";import"./ChevronRight-jn2TY6bg.js";import"./ChevronUp-GCRvOXUm.js";import"./DotsVertical-Db4taJ9K.js";import"./Container-Oz2YNmUh.js";import"./Star01-UkNlRUFe.js";import"./Palette-DeXO2UD-.js";import"./SearchMd-BSaOo_JL.js";import"./index-DO0uF7Gp.js";import"./tooltip-Dmy1JK40.js";import"./X-D3ENSJsC.js";import"./LinkExternal01-BCvnibSo.js";import"./Lock01-Q6LUoAej.js";import"./Sun-BbHWHHyR.js";import"./Play-DQtgluIz.js";import"./Plus--NQ8Lzv-.js";import"./Settings02-Dqsstum2.js";import"./Shield01-s7fnlBYV.js";import"./Trash01-zq3BxN1h.js";import"./User01-BMocx1Ia.js";import"./Zap-1gz6p0Ma.js";import"./badge-CDfiJQQR.js";import"./select-BtT3gpc8.js";import"./view-mode-toggle-C03hOMgr.js";import"./layout-C8Q8lJIU.js";import"./use-connection-okJtNg-z.js";import"./use-mcp-tools-DrTCTUYm.js";import"./dialog-RLyF4eg5.js";import"./index-CBpHmYGS.js";import"./dropdown-menu-BDa5fLDC.js";import"./integration-icon-GgmeOaov.js";import"./scroll-area-DJUXiZ9b.js";import"./index-BSi_7pdx.js";import"./empty-state-L95wna48.js";import"./create-sse-subscription-CxkOgzKf.js";import"./input-DdZFm5QD.js";function ht(){const t=s.c(4);let r;t[0]===Symbol.for("react.memo_cache_sentinel")?(r={from:"/shell/$org/settings/workflows/$itemId"},t[0]=r):r=t[0];const{itemId:e}=l(r);let i;t[1]===Symbol.for("react.memo_cache_sentinel")?(i=o.jsx("div",{className:"flex h-full items-center justify-center",children:o.jsx(a,{size:32,className:"animate-spin text-muted-foreground"})}),t[1]=i):i=t[1];const p=decodeURIComponent(e);let m;return t[2]!==p?(m=o.jsx(n,{children:o.jsx(c.Suspense,{fallback:i,children:o.jsx(f,{itemId:p})})}),t[2]=p,t[3]=m):m=t[3],m}export{ht as default};
|