decocms 2.302.2 → 2.302.3
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-BkX4HzbS.js → AlertCircle-BptNXaSw.js} +1 -1
- package/dist/client/assets/{ArrowNarrowLeft-BebHkn1X.js → ArrowNarrowLeft-C9BqYGqa.js} +1 -1
- package/dist/client/assets/{ArrowUpRight-uszsF274.js → ArrowUpRight-Dx8OyXJJ.js} +1 -1
- package/dist/client/assets/{CheckCircle-Boq6G01L.js → CheckCircle-BJH_Faer.js} +1 -1
- package/dist/client/assets/{ChevronDown-ByP-e484.js → ChevronDown-AFfzS9Fd.js} +1 -1
- package/dist/client/assets/{ChevronRight-BUfZMnd9.js → ChevronRight-DCTFzP_v.js} +1 -1
- package/dist/client/assets/{ChevronUp-TwiYbtUW.js → ChevronUp-Vi7GtFBv.js} +1 -1
- package/dist/client/assets/{Container-DzkLD13G.js → Container-DNCiFX-u.js} +1 -1
- package/dist/client/assets/{DotsVertical-BrUfBHwt.js → DotsVertical-uwZMGC-k.js} +1 -1
- package/dist/client/assets/{LinkExternal01-gfL-Fk4b.js → LinkExternal01-Bia8wPa4.js} +1 -1
- package/dist/client/assets/{Lock01-CI-miN4g.js → Lock01-Yik0Dryf.js} +1 -1
- package/dist/client/assets/{Palette-1HvN4NnC.js → Palette-jQWe009s.js} +1 -1
- package/dist/client/assets/{Play-O7ldNAxa.js → Play-DRYhRmoj.js} +1 -1
- package/dist/client/assets/{Plus-Bihyskqy.js → Plus--8V8C-wH.js} +1 -1
- package/dist/client/assets/{RefreshCcw01-BzT-xyrO.js → RefreshCcw01-Dkvc9_WI.js} +1 -1
- package/dist/client/assets/{SearchMd-vBRV-l3E.js → SearchMd-CX1-PTYv.js} +1 -1
- package/dist/client/assets/{Settings02-eiwWD3s7.js → Settings02-BB9KNyr0.js} +1 -1
- package/dist/client/assets/{Shield01-D7ml37xT.js → Shield01-DmqRtciA.js} +1 -1
- package/dist/client/assets/{Star01-ByzmPd4J.js → Star01-B98NJUiy.js} +1 -1
- package/dist/client/assets/{Sun-xA_CdWAJ.js → Sun-B-U9j0qH.js} +1 -1
- package/dist/client/assets/{Tool01-Dqyo2VjJ.js → Tool01-Bx-eFA4e.js} +1 -1
- package/dist/client/assets/{Trash01-f4CvhuWB.js → Trash01-LNBC98cZ.js} +1 -1
- package/dist/client/assets/{User01-lDhxACAV.js → User01-nWV_walc.js} +1 -1
- package/dist/client/assets/{Users03-IortA-KV.js → Users03-Bjiog5sl.js} +1 -1
- package/dist/client/assets/{X-BiphajNJ.js → X-DuAzorTa.js} +1 -1
- package/dist/client/assets/{XCircle-Dp1Lqd1t.js → XCircle-zfE3hdKz.js} +1 -1
- package/dist/client/assets/{XClose-lRlzG-cb.js → XClose-B3J1bUSM.js} +1 -1
- package/dist/client/assets/{Zap-ebWdIwXf.js → Zap-D0QVNb5R.js} +1 -1
- package/dist/client/assets/{ZapSquare-_fsDSSOX.js → ZapSquare-rAJexnnQ.js} +1 -1
- package/dist/client/assets/{accordion-D3c87Mh0.js → accordion-BoK92gPa.js} +1 -1
- package/dist/client/assets/{agent-icon-Be_PnRh0.js → agent-icon-C-x4n6CJ.js} +1 -1
- package/dist/client/assets/{agents-list-45a0yQhW.js → agents-list-DfhnQOt-.js} +1 -1
- package/dist/client/assets/ai-providers-BF29zhuW.js +1 -0
- package/dist/client/assets/{alert-dialog-BUApN05b.js → alert-dialog-DAYJ8Pv5.js} +1 -1
- package/dist/client/assets/{auth-catchall-DH0bWyBT.js → auth-catchall-ldYToNDs.js} +1 -1
- package/dist/client/assets/{automation-list-row-DETQBuFK.js → automation-list-row-CNea-O4y.js} +1 -1
- package/dist/client/assets/{automations-DvIFzGM7.js → automations-DWhqJ0ka.js} +1 -1
- package/dist/client/assets/{avatar-BBnvw18x.js → avatar-Cmh5AQXg.js} +1 -1
- package/dist/client/assets/{badge-CRHmlYav.js → badge-DNOR1-Ec.js} +1 -1
- package/dist/client/assets/{brand-context-CH2SSDlY.js → brand-context-BQymYCXk.js} +1 -1
- package/dist/client/assets/{card-DoqftRz7.js → card-Po-cYdLK.js} +1 -1
- package/dist/client/assets/{chat-context-JbYHex_O.js → chat-context-BYrL3EkF.js} +1 -1
- package/dist/client/assets/{checkbox-CHYA_sQZ.js → checkbox-BrI9Ksua.js} +1 -1
- package/dist/client/assets/{collection-detail-Bb5ojn6D.js → collection-detail-TRSI4X8Y.js} +1 -1
- package/dist/client/assets/{collection-display-button-C2ECPv0_.js → collection-display-button-BsfwI3ub.js} +1 -1
- package/dist/client/assets/{collection-search-C-2UZGyD.js → collection-search-B1m_HjcE.js} +1 -1
- package/dist/client/assets/{collection-search-B8mdZm7u.js → collection-search-B1nlgO0n.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-pDRU_Alr.js → collection-table-wrapper-B-8Kj-5C.js} +1 -1
- package/dist/client/assets/{collection-tabs-Bj7BShdC.js → collection-tabs-CY6Bf75C.js} +1 -1
- package/dist/client/assets/{collections-CjrHbdtT.js → collections-D2htjE9G.js} +1 -1
- package/dist/client/assets/{command-CZWy1buB.js → command-CNtIgq0F.js} +1 -1
- package/dist/client/assets/{connection-card-HM9ImVMm.js → connection-card-BEVGFXND.js} +1 -1
- package/dist/client/assets/{connection-detail-CWdb5LvI.js → connection-detail-DWvLndm9.js} +1 -1
- package/dist/client/assets/{connection-form-helpers-Cr0s3TXQ.js → connection-form-helpers-yUAHpH2r.js} +1 -1
- package/dist/client/assets/{connections-CpsKPW6X.js → connections-BPd8FGPo.js} +1 -1
- package/dist/client/assets/{constants-DE2tzNng.js → constants-BIs5QB0D.js} +1 -1
- package/dist/client/assets/{constants-Cj0U39_n.js → constants-LMWkDYwt.js} +1 -1
- package/dist/client/assets/{dialog-BdVY7mqq.js → dialog-BDbHlLyI.js} +1 -1
- package/dist/client/assets/{domain-settings-DALXcXKA.js → domain-settings-CKoWBLNs.js} +1 -1
- package/dist/client/assets/{drawer-0C4xllAB.js → drawer-CZBkzpCr.js} +1 -1
- package/dist/client/assets/{dropdown-menu-Bq-aRZ_r.js → dropdown-menu-C4EY44xH.js} +1 -1
- package/dist/client/assets/{dynamic-plugin-layout-CXa5_dk-.js → dynamic-plugin-layout-BJRUQSsI.js} +1 -1
- package/dist/client/assets/{empty-state-Cw5GxS3i.js → empty-state-CbpDBVKq.js} +1 -1
- package/dist/client/assets/{empty-state-S_EjXlZP.js → empty-state-Cy6vpOm1.js} +1 -1
- package/dist/client/assets/{extract-connection-data-DN-EBamj.js → extract-connection-data-DUTmlwgd.js} +1 -1
- package/dist/client/assets/{features-CZe-SpPx.js → features-BZeCR5pR.js} +1 -1
- package/dist/client/assets/{form-Stkhqjoi.js → form-BhMcn426.js} +1 -1
- package/dist/client/assets/{general-aMP5BKAQ.js → general-NxDgjjeP.js} +1 -1
- package/dist/client/assets/{index-Crkc58Yb.js → index-9LJebD4k.js} +1 -1
- package/dist/client/assets/{index-DCOURowK.js → index-B4CjjxeQ.js} +1 -1
- package/dist/client/assets/{index-BZhxvvXQ.js → index-BBbvJ269.js} +1 -1
- package/dist/client/assets/{index-BP0vNLKa.js → index-BI1isstj.js} +1 -1
- package/dist/client/assets/index-Bq822nJW.js +1 -0
- package/dist/client/assets/{index-ClNUcJ8s.js → index-C2_tPdnv.js} +1 -1
- package/dist/client/assets/{index-C--avMTn.js → index-CFy1HhlL.js} +1 -1
- package/dist/client/assets/{index-ZmvI6xf3.js → index-Cgp_c7tW.js} +1 -1
- package/dist/client/assets/{index-y9YjpvN-.js → index-CzcBbEI8.js} +1 -1
- package/dist/client/assets/{index-DhThG5rF.js → index-D98XeMPC.js} +3 -3
- package/dist/client/assets/{index-B7sUvMqz.js → index-DVhu6vyO.js} +1 -1
- package/dist/client/assets/{index-D58bzP3p.js → index-DxpKDFQM.js} +1 -1
- package/dist/client/assets/{index-BY8F27EB.js → index-IgcAKuQ2.js} +1 -1
- package/dist/client/assets/{index-CAum6J1D.js → index-JmAWXIyD.js} +1 -1
- package/dist/client/assets/{index-b_n-uXmh.js → index-ZX5QMr5P.js} +2 -2
- package/dist/client/assets/{index-pdnGjAa-.js → index-m7g5E96J.js} +1 -1
- package/dist/client/assets/{infiniteQueryObserver-DMFjl81X.js → infiniteQueryObserver-CN1qz-tT.js} +1 -1
- package/dist/client/assets/{input-C80VzPpQ.js → input-BP7nCP6h.js} +1 -1
- package/dist/client/assets/{integration-icon-LX1nChXa.js → integration-icon-BkL7x5yc.js} +1 -1
- package/dist/client/assets/{label-2a4WSF52.js → label-C5PYuLC_.js} +1 -1
- package/dist/client/assets/{layout-BAy6nHY2.js → layout-BfrWqBYK.js} +1 -1
- package/dist/client/assets/{lean-canvas-recruit-modal-C1vNRy0q.js → lean-canvas-recruit-modal-BA2zXgWK.js} +1 -1
- package/dist/client/assets/{login-BwOZspJc.js → login-CAFTkpUR.js} +1 -1
- package/dist/client/assets/{members-BxmUMFwY.js → members-BbC2zCXn.js} +1 -1
- package/dist/client/assets/{monaco-editor-BY6pRUNM.js → monaco-editor-BUSmOT7P.js} +1 -1
- package/dist/client/assets/{monitoring-stats-row-BPKt_N1O.js → monitoring-stats-row-CTX5zI99.js} +1 -1
- package/dist/client/assets/{oauth-callback-Dkjb5tCM.js → oauth-callback-B7CxvFLu.js} +1 -1
- package/dist/client/assets/{oauth-callback-ai-provider-mujJmFGt.js → oauth-callback-ai-provider-Brm9lVni.js} +1 -1
- package/dist/client/assets/{onboarding-C1DRaGue.js → onboarding-CixwRwdD.js} +1 -1
- package/dist/client/assets/{org-layout-DioVArtE.js → org-layout-C_WhliuX.js} +1 -1
- package/dist/client/assets/{org-plugin-layout-BZoT2SIg.js → org-plugin-layout-DtNPlf-G.js} +1 -1
- package/dist/client/assets/{pair-CBvrXYZC.js → pair-BiYYtxTt.js} +1 -1
- package/dist/client/assets/{plugin-empty-state-DRAuC0gx.js → plugin-empty-state-DVjP-Rnh.js} +1 -1
- package/dist/client/assets/{plugin-header-Y35bsPBd.js → plugin-header-BdoNK1XH.js} +1 -1
- package/dist/client/assets/{plugin-layout-BM2m7Nsv.js → plugin-layout-MuJgZDC5.js} +1 -1
- package/dist/client/assets/{popover-CALdcEX7.js → popover-D6debZb9.js} +1 -1
- package/dist/client/assets/{profile-Cz2Ymv3u.js → profile-Bk87fXbc.js} +1 -1
- package/dist/client/assets/{project-app-view-BJIaTnR2.js → project-app-view-CoOHX_Lz.js} +1 -1
- package/dist/client/assets/registry-UJ0uJ7Vn.js +2 -0
- package/dist/client/assets/{registry-layout-Bg8yl9if.js → registry-layout-BDnTuu0d.js} +1 -1
- package/dist/client/assets/{required-auth-layout-CnSE-XLF.js → required-auth-layout-DY0oCaUA.js} +1 -1
- package/dist/client/assets/{reset-password-BEfzUzVH.js → reset-password-Bc4vD2TS.js} +1 -1
- package/dist/client/assets/{roles-CFSaKkJP.js → roles-B5CBX92p.js} +1 -1
- package/dist/client/assets/{scroll-area-18YOEnqD.js → scroll-area-_40Z84a3.js} +1 -1
- package/dist/client/assets/{search-input-6INcGAwd.js → search-input-5x6a4ZOP.js} +1 -1
- package/dist/client/assets/{select-CaDZpVbI.js → select-IOJ1NROY.js} +1 -1
- package/dist/client/assets/{select-model-S5cFobu5.js → select-model-D4-AQ-d0.js} +1 -1
- package/dist/client/assets/{settings-layout-jEkhhHU3.js → settings-layout-CoUwUB_u.js} +1 -1
- package/dist/client/assets/{settings-section-e84UGEbx.js → settings-section-CnmwdBGZ.js} +1 -1
- package/dist/client/assets/{shell-layout-Cdsgdqci.js → shell-layout--_qoatmg.js} +1 -1
- package/dist/client/assets/{skeleton-DCXc9Mjl.js → skeleton-CgTiHNyE.js} +1 -1
- package/dist/client/assets/{sso-DTC2FHjx.js → sso-WsfGyd84.js} +1 -1
- package/dist/client/assets/{store-pc-wftmt.js → store-Dcg4ejbD.js} +1 -1
- package/dist/client/assets/store-registry-CaLdFlkC.js +2 -0
- package/dist/client/assets/{switch-BUxRExf5.js → switch-CjxzycvO.js} +1 -1
- package/dist/client/assets/{table-CT5HWSPV.js → table-OrYO3Bzv.js} +1 -1
- package/dist/client/assets/{tabs-Cge-9ZTd.js → tabs-cdUPCCcY.js} +1 -1
- package/dist/client/assets/{task-status-tGA8S8H-.js → task-status-CHDtbBBE.js} +1 -1
- package/dist/client/assets/{textarea-Dx8hdqfA.js → textarea-B3fwCl7r.js} +1 -1
- package/dist/client/assets/{toggle-group-psHBbDPI.js → toggle-group-BjEYUnoX.js} +1 -1
- package/dist/client/assets/{tools-list-tDufGw9O.js → tools-list-NvozBHeM.js} +1 -1
- package/dist/client/assets/{tooltip-B-nRvfy-.js → tooltip-Bw3OrKLc.js} +1 -1
- package/dist/client/assets/{types-hw9no7At.js → types-BhugUgY-.js} +1 -1
- package/dist/client/assets/{use-ai-providers-Bc_Jl0e6.js → use-ai-providers-CuAPNurr.js} +1 -1
- package/dist/client/assets/{use-collections-CqIGWKSp.js → use-collections-BINoTxiO.js} +1 -1
- package/dist/client/assets/{use-connection-DuXPSqwF.js → use-connection-CUwpr33T.js} +1 -1
- package/dist/client/assets/{use-copy-CJlR4d5Y.js → use-copy-BgXwbgmv.js} +1 -1
- package/dist/client/assets/{use-create-virtual-mcp-B-gULvH7.js → use-create-virtual-mcp-BOwt89Zn.js} +1 -1
- package/dist/client/assets/{use-decopilot-events-CWIgEPKA.js → use-decopilot-events-CZEQkDgz.js} +1 -1
- package/dist/client/assets/{use-delete-connection-mOKpqJ4Z.js → use-delete-connection-Cd6eQXca.js} +1 -1
- package/dist/client/assets/{use-infinite-scroll-HGu4x7ZU.js → use-infinite-scroll-DSXLyALF.js} +1 -1
- package/dist/client/assets/{use-list-state-Dlljnhsv.js → use-list-state-BN00buoy.js} +1 -1
- package/dist/client/assets/{use-mcp-tools-BkDSNv3W.js → use-mcp-tools-wHT7E3kx.js} +1 -1
- package/dist/client/assets/{use-members-8sha4K9R.js → use-members-k9Ulx9NZ.js} +1 -1
- package/dist/client/assets/{use-navigate-to-agent-B5j-9-p3.js → use-navigate-to-agent-6pQqUuko.js} +1 -1
- package/dist/client/assets/{use-org-auth-client-Ev284uyK.js → use-org-auth-client-CBWdYW0V.js} +1 -1
- package/dist/client/assets/{use-org-sso-CD6laYaL.js → use-org-sso-B8sHBE7m.js} +1 -1
- package/dist/client/assets/{use-organization-roles-CN53ZUes.js → use-organization-roles-BoFuyqv3.js} +1 -1
- package/dist/client/assets/{use-organization-settings-DFNDQvXK.js → use-organization-settings-CKBs_-6H.js} +1 -1
- package/dist/client/assets/{use-registry-connections-D1xCWobU.js → use-registry-connections-nuSfHTmJ.js} +1 -1
- package/dist/client/assets/{use-status-sounds-ojr3d2EQ.js → use-status-sounds-Zlpm2y7B.js} +1 -1
- package/dist/client/assets/{use-tasks-DFEEn9nC.js → use-tasks-BNIrwitI.js} +1 -1
- package/dist/client/assets/{use-view-mode-BjLGHFfJ.js → use-view-mode-DN_piLH_.js} +1 -1
- package/dist/client/assets/{use-virtual-mcp-Qy5dDA1Q.js → use-virtual-mcp-DK2HDA8s.js} +1 -1
- package/dist/client/assets/useInfiniteQuery-DhGaAFoF.js +1 -0
- package/dist/client/assets/useSuspenseInfiniteQuery-CsxWE14j.js +1 -0
- package/dist/client/assets/{user-ysfLNnXi.js → user-DilxC-j3.js} +1 -1
- package/dist/client/assets/{view-mode-toggle-C5L447if.js → view-mode-toggle-BUlKNj6a.js} +1 -1
- package/dist/client/assets/{workflow-CWouU_7K.js → workflow-CXAfxdgV.js} +1 -1
- package/dist/client/assets/workflow-detail-ekqeRgxB.js +1 -0
- package/dist/client/index.html +1 -1
- package/dist/server/cli.js +11 -1
- package/dist/server/node_modules/is-fullwidth-code-point/index.d.ts +17 -0
- package/dist/server/node_modules/is-fullwidth-code-point/index.js +12 -0
- package/dist/server/node_modules/is-fullwidth-code-point/license +9 -0
- package/dist/server/node_modules/is-fullwidth-code-point/package.json +53 -0
- package/dist/server/node_modules/is-fullwidth-code-point/readme.md +31 -0
- package/dist/server/node_modules/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-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/xtend/.jshintrc +30 -0
- package/dist/server/node_modules/xtend/LICENSE +20 -0
- package/dist/server/node_modules/xtend/README.md +32 -0
- package/dist/server/node_modules/xtend/immutable.js +19 -0
- package/dist/server/node_modules/xtend/mutable.js +17 -0
- package/dist/server/node_modules/xtend/package.json +55 -0
- package/dist/server/node_modules/xtend/test.js +103 -0
- package/dist/server/server.js +10 -0
- package/package.json +1 -1
- package/dist/client/assets/ai-providers-BzCSRpkV.js +0 -1
- package/dist/client/assets/index-D2fHFr2F.js +0 -1
- package/dist/client/assets/registry-Bm6dPwQv.js +0 -2
- package/dist/client/assets/store-registry-BCuueIrr.js +0 -2
- package/dist/client/assets/useInfiniteQuery-B82zG1fE.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-4BiVmPoE.js +0 -1
- package/dist/client/assets/workflow-detail-rg2LspQv.js +0 -1
package/dist/server/cli.js
CHANGED
|
@@ -1623,7 +1623,7 @@ AS SELECT
|
|
|
1623
1623
|
FROM monitoring_metrics
|
|
1624
1624
|
GROUP BY organization_id, name, bucket, connection_id, tool_name, status
|
|
1625
1625
|
`}),console.log("[clickhouse-schema] monitoring_metrics_rollup_1m_mv view ready")}finally{await G.close()}}catch(Y){console.error("[clickhouse-schema] Failed to create rollup DDL (queries will fall back to raw table):",Y)}}async function qA1(X){let Y={...process.env},G=S$1(X,Y),Q=G.settings.encryptionKey;console.log(`[settings] ENCRYPTION_KEY = ${JSON.stringify(Q)} (${Q.length} chars)`);let{ensureServices:J}=await Promise.resolve().then(() => (T$1(),A$1)),{outputs:W,services:Z}=await J({home:G.settings.dataDir,externalDatabaseUrl:G.externalDatabaseUrl,externalNatsUrl:G.externalNatsUrl});if(!G.skipMigrations){let{migrateBetterAuth:K}=await Promise.resolve().then(() => (w30(),gx4));await K(W.databaseUrl);let{createDatabase:H}=await Promise.resolve().then(() => (QU(),hx4)),{migrateToLatest:U}=await Promise.resolve().then(() => (ir4(),cr4)),B=H(W.databaseUrl);await U({keepOpen:!0,database:B,skipBetterAuth:!0})}if(G.settings.clickhouseUrl){let{ensureClickHouseRollup:K}=await Promise.resolve().then(() => ps4);await K(G.settings.clickhouseUrl)}let $={...G.settings,databaseUrl:W.databaseUrl,natsUrls:W.natsUrls};return Xt1($),{settings:$,services:Z.map((K)=>({name:K.name==="PostgreSQL"?"Postgres":K.name,port:K.port})),managedServiceNames:Z.filter((K)=>K.owner==="managed").map((K)=>K.name)}}var iB0=D(()=>{en1();l9()});var IA1={};j0(IA1,{updateService:()=>rt,toggleViewMode:()=>nB0,toggleVibeState:()=>aB0,toggleLogFlow:()=>tB0,subscribeCliState:()=>qX1,setVibe:()=>Pp5,setTuiConsoleIntercepted:()=>AA1,setServerUrl:()=>TX1,setMigrationsDone:()=>AX1,setEnv:()=>IX1,setDevMode:()=>Lp5,setDataDir:()=>Ep5,isTuiConsoleIntercepted:()=>TA1,getCliState:()=>PX1,addLogEntry:()=>$z});function qU(){for(let X of pB0)X()}function PX1(){return X7}function qX1(X){return pB0.add(X),()=>pB0.delete(X)}function rt(X){X7={...X7,services:X7.services.map((Y)=>Y.name===X.name?X:Y)},qU()}function AX1(){X7={...X7,migrationsStatus:"done"},qU()}function TX1(X){X7={...X7,serverUrl:X},qU()}function IX1(X){X7={...X7,env:X},qU()}function $z(X){let Y=[...X7.logs,X];X7={...X7,logs:Y.length>500?Y.slice(-500):Y},qU()}function Lp5(){X7={...X7,services:[...X7.services,{name:"Vite",status:"pending",port:0}]},qU()}function nB0(){X7={...X7,viewMode:X7.viewMode==="requests"?"config":"requests"},qU()}function tB0(){X7={...X7,logFlow:!X7.logFlow},qU()}function Ep5(X){X7={...X7,dataDir:X},qU()}function Pp5(X){X7={...X7,vibe:X},qU()}function aB0(){X7={...X7,vibe:!X7.vibe},qU()}function AA1(X){ns4=X}function TA1(){return ns4}var X7,pB0,ns4=!1;var Kz=D(()=>{X7={services:[{name:"Postgres",status:"pending",port:0},{name:"NATS",status:"pending",port:0}],migrationsStatus:"pending",serverUrl:null,env:null,logs:[],viewMode:"requests",logFlow:!1,vibe:!1,dataDir:null},pB0=new Set});import{createServer as ts4}from"net";function qp5(X){return new Promise((Y)=>{let G=ts4();G.once("error",()=>Y(!1)),G.listen(X,"0.0.0.0",()=>{G.close(()=>Y(!0))})})}async function VA1(X){if(await qp5(X))return X;let Y=await new Promise((G,Q)=>{let J=ts4();J.once("error",Q),J.listen(0,"0.0.0.0",()=>{let W=J.address(),Z=typeof W==="object"&&W?W.port:0;J.close(()=>G(Z))})});return console.warn(`Port ${X} is in use, using port ${Y} instead.`),Y}var rB0=()=>{};var oB0={};j0(oB0,{startDevServer:()=>Tp5});import{join as Ap5}from"path";function as4(X){return X.replace(/\x1b\[[0-9;]*m/g,"")}function rs4(X){let Y=X.getReader(),G=new TextDecoder,Q="";function J(){let W=Q.split(`
|
|
1626
|
-
`);Q=W.pop()??"";for(let Z of W){let $=as4(Z).replace(/^\[\d+\]\s*/,"").trim();if(!$)continue;$z({method:"",path:"",status:0,duration:0,timestamp:new Date,rawLine:$})}}(async()=>{for(;;){let{done:W,value:Z}=await Y.read();if(W)break;Q+=G.decode(Z,{stream:!0}),J()}if(Q.trim()){let W=as4(Q).replace(/^\[\d+\]\s*/,"").trim();if(W)$z({method:"",path:"",status:0,duration:0,timestamp:new Date,rawLine:W})}})()}async function Tp5(X){let{vitePort:Y,baseUrl:G,noTui:Q}=X,J=await VA1(Number(X.port)),{settings:W,services:Z,managedServiceNames:$}=await qA1({port:String(J),home:X.home,baseUrl:X.baseUrl,localMode:X.localMode,skipMigrations:X.skipMigrations,noTui:X.noTui,vitePort:X.vitePort});for(let z of Z)rt({name:z.name,status:"ready",port:z.port});IX1(W),AX1();let K=Ap5(import.meta.dir,"..","..","..","..",".."),H=Q===!0,U=Bun.spawn(["bun","run","--cwd=apps/mesh","dev:servers"],{cwd:K,env:{...process.env,PORT:String(W.port),VITE_PORT:String(Y),DATABASE_URL:W.databaseUrl,NATS_URL:W.natsUrls.join(","),NODE_ENV:W.nodeEnv,DECOCMS_LOCAL_MODE:String(W.localMode),DECOCMS_HOME:W.dataDir,DATA_DIR:W.dataDir,DECO_CLI:"1",...W.baseUrl?{BASE_URL:W.baseUrl}:{}},stdio:["inherit",H?"inherit":"pipe",H?"inherit":"pipe"]});if(!H)rs4(U.stdout),rs4(U.stderr);let B=G||`http://localhost:${W.port}`;TX1(B),rt({name:"Vite",status:"ready",port:Number(Y)});let N=async(z)=>{if(U.kill(z),$.length>0){let{stopServices:O}=await Promise.resolve().then(() => (T$1(),A$1));await O(W.dataDir)}};return process.on("SIGINT",()=>N("SIGINT")),process.on("SIGTERM",()=>N("SIGTERM")),{port:Number(W.port),process:U}}var sB0=D(()=>{iB0();Kz();rB0()});import{Box as eB0,Text as XN0}from"ink";import{jsx as ss4,jsxs as jA1}from"react/jsx-runtime";function os4(X){if(!X)return"not set";try{let Y=new URL(X);if(Y.password)Y.password="***";if(Y.username&&Y.username.length>3)Y.username=Y.username.slice(0,3)+"***";return Y.pathname="/",Y.search="",Y.hash="",Y.toString()}catch{if(X.length<=10)return X;return X.slice(0,6)+"***"+X.slice(-4)}}function jp5(X,Y){if(Ip5.has(X))return Y?{text:"\u25CF\u25CF\u25CF\u25CF\u25CF\u25CF",dimColor:!0}:{text:"not set",dimColor:!0};if(Vp5.has(X)){if(Array.isArray(Y)){if(Y.length===0)return{text:"not set",dimColor:!0};return{text:Y.map((W)=>os4(W)).join(", "),color:"cyan"}}let Q=os4(Y);return Q==="not set"?{text:Q,dimColor:!0}:{text:Q,color:"cyan"}}if(Y===void 0||Y===null||Y==="")return{text:"not set",dimColor:!0};let G=String(Y);if(G==="true")return{text:G,color:"green"};if(G==="false")return{text:G,color:"yellow"};try{return new URL(G),{text:G,color:"cyan"}}catch{return{text:G}}}function Mp5(X){return[{title:"Core",entries:[{key:"NODE_ENV",value:X.nodeEnv},{key:"PORT",value:X.port},{key:"BASE_URL",value:X.baseUrl??`http://localhost:${X.port}`},{key:"DATA_DIR",value:X.dataDir}]},{title:"Database",entries:[{key:"DATABASE_URL",value:X.databaseUrl},{key:"DATABASE_PG_SSL",value:X.databasePgSsl}]},{title:"Auth & Secrets",entries:[{key:"BETTER_AUTH_SECRET",value:X.betterAuthSecret},{key:"ENCRYPTION_KEY",value:X.encryptionKey},{key:"MESH_JWT_SECRET",value:X.meshJwtSecret},{key:"STUDIO_PROVISION_SECRET_KEY",value:X.studioProvisionSecretKey},{key:"DISABLE_RATE_LIMIT",value:X.disableRateLimit}]},{title:"Auth Providers",entries:[{key:"AUTH_EMAIL_PASSWORD_ENABLED",value:process.env.AUTH_EMAIL_PASSWORD_ENABLED??"true"},{key:"AUTH_GOOGLE_CLIENT_ID",value:!!process.env.AUTH_GOOGLE_CLIENT_ID},{key:"AUTH_GITHUB_CLIENT_ID",value:!!process.env.AUTH_GITHUB_CLIENT_ID},{key:"AUTH_RESEND_API_KEY",value:!!process.env.AUTH_RESEND_API_KEY},{key:"AUTH_SENDGRID_API_KEY",value:!!process.env.AUTH_SENDGRID_API_KEY},{key:"AUTH_SSO_MS_CLIENT_ID",value:!!process.env.AUTH_SSO_MS_CLIENT_ID},{key:"AUTH_MAGIC_LINK_ENABLED",value:process.env.AUTH_MAGIC_LINK_ENABLED==="true"},{key:"AUTH_EMAIL_OTP_ENABLED",value:process.env.AUTH_EMAIL_OTP_ENABLED==="true"}]},{title:"Observability",entries:[{key:"CLICKHOUSE_URL",value:X.clickhouseUrl},{key:"OTEL_SERVICE_NAME",value:X.otelServiceName}]},{title:"Event Bus & Networking",entries:[{key:"NATS_URL",value:X.natsUrls}]},{title:"Config Files",entries:[{key:"CONFIG_PATH",value:X.configPath}]},{title:"AI Gateway",entries:[{key:"DECO_AI_GATEWAY_ENABLED",value:X.aiGatewayEnabled},{key:"DECO_AI_GATEWAY_URL",value:X.aiGatewayUrl}]}]}function es4({env:X}){let Y=Mp5(X);return ss4(eB0,{flexDirection:"column",children:Y.map((G)=>jA1(eB0,{flexDirection:"column",marginTop:1,children:[jA1(XN0,{dimColor:!0,children:[" ","\u2500\u2500 ",G.title," ","\u2500".repeat(Math.max(0,38-G.title.length))]}),G.entries.map(({key:Q,value:J})=>{let W=jp5(Q,J);return jA1(eB0,{children:[jA1(XN0,{dimColor:!0,children:[" ",Q.padEnd(36)]}),ss4(XN0,{color:W.color,dimColor:W.dimColor,children:W.text})]},Q)})]},G.title))})}var Ip5,Vp5;var Xe4=D(()=>{Ip5=new Set(["BETTER_AUTH_SECRET","ENCRYPTION_KEY","MESH_JWT_SECRET","STUDIO_PROVISION_SECRET_KEY"]),Vp5=new Set(["DATABASE_URL","CLICKHOUSE_URL","NATS_URL"])});var YN0;var Ye4=D(()=>{YN0={name:"decocms",version:"2.302.2",description:"Deco CMS \u2014 Self-hostable MCP Gateway for managing AI connections and tools",author:"Deco team",repository:{type:"git",url:"git+https://github.com/decocms/studio.git",directory:"apps/mesh"},bugs:{url:"https://github.com/decocms/studio/issues"},type:"module",bin:{deco:"./dist/server/cli.js"},files:["dist/**/*"],scripts:{dev:'bun run migrate && concurrently "bun run dev:client" "bun run dev:server"',"dev:servers":'concurrently "bun run dev:client" "bun run dev:server"',"dev:client":"bun --bun vite dev","dev:server":"bun run --cwd=../../packages/sandbox build && NODE_ENV=development bun --env-file=.env --hot run src/index.ts","build:client":"bun --bun vite build","build:server":"bun run scripts/bundle-server-script.ts --dist ./dist/server","db:migrate":"bun run ./dist/server/migrate.js",check:"tsc --noEmit",start:"bun run ./dist/server/server.js",migrate:"bun run src/database/migrate.ts",test:"bun test","test:e2e":"playwright test","test:e2e:ui":"playwright test --ui","better-auth:migrate":"bunx --bun @better-auth/cli migrate -y --config src/auth/index.ts",prepublishOnly:"bun run build:client && bun run build:server"},optionalDependencies:{"@duckdb/node-api":"^1.5.0-r.1","@freestyle-sh/with-bun":"^0.2.12","@freestyle-sh/with-deno":"^0.0.4","@freestyle-sh/with-nodejs":"^0.2.9","freestyle-sandboxes":"^0.1.46"},dependencies:{"@ai-sdk/anthropic":"^3.0.58","@ai-sdk/google":"^3.0.60","@ai-sdk/openai":"^3.0.50","@anthropic-ai/sdk":"^0.79.0","@aws-sdk/client-s3":"^3.1013.0","@aws-sdk/s3-request-presigner":"^3.1013.0","@clickhouse/client":"^1.8.1","@dnd-kit/core":"^6.3.1","@dnd-kit/sortable":"^10.0.0","@dnd-kit/utilities":"^3.2.2","@inkjs/ui":"^2.0.0","@modelcontextprotocol/ext-apps":"^1.2.2","@openrouter/ai-sdk-provider":"^2.2.5","@opentelemetry/core":"^2.6.0","@tanstack/react-virtual":"^3.13.21","@xterm/addon-fit":"^0.11.0","@xterm/xterm":"^6.0.0","ai-sdk-provider-claude-code":"^3.4.4","ai-sdk-provider-codex-cli":"^1.1.0","embedded-postgres":"^18.3.0-beta.16",ink:"^6.8.0",kysely:"^0.28.12",nats:"^2.29.3","node-pty":"^1.0.0","posthog-js":"^1.371.1","posthog-node":"^5.0.0",react:"^19.2.0","react-dom":"^19.2.0"},devDependencies:{"@ai-sdk/provider":"^3.0.8","@ai-sdk/react":"^3.0.118","@anthropic-ai/claude-agent-sdk":"^0.2.80","@better-auth/sso":"1.4.1","@daveyplate/better-auth-ui":"^3.2.7","@deco/ui":"workspace:*","@decocms/better-auth":"1.5.17","@decocms/bindings":"workspace:*","@decocms/mcp-utils":"workspace:*","@decocms/mesh-sdk":"workspace:*","@decocms/runtime":"workspace:*","@decocms/vite-plugin":"workspace:*","@electric-sql/pglite":"^0.3.15","@floating-ui/react":"^0.27.16","@hookform/resolvers":"^5.2.2","@jitl/quickjs-wasmfile-release-sync":"0.31.0","@modelcontextprotocol/sdk":"1.27.1","@monaco-editor/react":"^4.7.0","@opentelemetry/api":"^1.9.0","@opentelemetry/api-logs":"^0.211.0","@opentelemetry/exporter-logs-otlp-proto":"^0.211.0","@opentelemetry/exporter-prometheus":"^0.208.0","@opentelemetry/exporter-trace-otlp-proto":"^0.207.0","@opentelemetry/instrumentation-runtime-node":"^0.24.0","@opentelemetry/sdk-logs":"^0.211.0","@opentelemetry/sdk-metrics":"^2.2.0","@opentelemetry/sdk-node":"^0.207.0","@opentelemetry/sdk-trace-base":"^2.5.0","@playwright/test":"^1.58.2","@radix-ui/react-avatar":"^1.1.10","@radix-ui/react-checkbox":"^1.3.3","@radix-ui/react-dialog":"^1.1.15","@radix-ui/react-dropdown-menu":"^2.1.16","@radix-ui/react-label":"^2.1.7","@radix-ui/react-select":"^2.2.6","@radix-ui/react-separator":"^1.1.7","@radix-ui/react-slot":"^1.2.3","@radix-ui/react-tabs":"^1.1.13","@rjsf/core":"^6.1.2","@rjsf/shadcn":"^6.1.2","@rjsf/utils":"^6.1.2","@rjsf/validator-ajv8":"^6.1.2","@tailwindcss/vite":"^4.1.17","@tanstack/react-query":"5.90.11","@tanstack/react-router":"^1.139.7","@tiptap/core":"3.20.2","@tiptap/extension-mention":"3.20.2","@tiptap/extension-placeholder":"3.20.2","@tiptap/pm":"3.20.2","@tiptap/react":"3.20.2","@tiptap/starter-kit":"3.20.2","@tiptap/suggestion":"3.20.2","@types/bun":"^1.3.1","@types/pg":"^8.15.6","@types/react-syntax-highlighter":"^15.5.13","@untitledui/icons":"^0.0.19","@vercel/nft":"^1.1.1","@vitejs/plugin-react":"^5.1.0",ai:"^6.0.116","babel-plugin-react-compiler":"^1.0.0","better-auth":"1.4.5","class-variance-authority":"^0.7.1",clsx:"^2.1.1",concurrently:"^9.2.1",croner:"^9.1.0","date-fns":"^4.1.0",degit:"^2.8.4",hono:"^4.10.7","input-otp":"^1.4.2",jose:"^6.0.11","kysely-pglite":"^0.6.1","lucide-react":"^0.468.0",marked:"^15.0.6","@decocms/sandbox":"workspace:*","mesh-plugin-workflows":"workspace:*",nanoid:"^5.1.6",pg:"^8.16.3",prettier:"^3.4.2","react-hook-form":"^7.66.0","react-markdown":"^10.1.0","react-resizable-panels":"^2.1.7","react-syntax-highlighter":"^15.6.1",recharts:"^3.6.0","rehype-raw":"^7.0.0","remark-gfm":"^4.0.0","sass-embedded":"^1.97.2",sonner:"^2.0.7","tailwind-merge":"^3.3.1",tailwindcss:"^4.1.17",typescript:"^5.9.3",vite:"^7.2.1","vite-tsconfig-paths":"^5.1.4",zod:"^4.0.0",zustand:"^5.0.9"},homepage:"https://github.com/decocms/studio",keywords:["mcp","model-context-protocol","ai","gateway","self-hosted","mesh","tools"],license:"MIT",publishConfig:{access:"public"}}});import{Box as AU,Text as RX}from"ink";import{Spinner as Sp5}from"@inkjs/ui";import{useSyncExternalStore as Ge4}from"react";import{jsx as AY,jsxs as sQ}from"react/jsx-runtime";function fp5(X,Y){if(!X||!_p5.has(X))return X;let G=GN0[Y]??GN0[GN0.length-1];return X==="#875f00"?G[0]:G[1]}function Qe4({status:X}){if(X==="pending")return AY(Sp5,{label:""});return AY(RX,{color:"green",children:"\u2713"})}function Je4({services:X,migrationsStatus:Y,home:G,serverUrl:Q,vibe:J}){let W=Ge4(Vl0,Il0),Z=Ge4(Cl0,kl0);return sQ(AU,{flexDirection:"column",paddingBottom:1,children:[J?sQ(AU,{flexDirection:"column",children:[W.map(($,K)=>{let H=Z[K],U=$.reduce((N,z)=>N+z.text.length,0),B=Math.max(0,vp5-U);return sQ(AU,{flexDirection:"row",children:[$.map((N,z)=>{let O=fp5(N.color,K);return O?AY(RX,{color:O,children:N.text},z):AY(RX,{children:N.text},z)}),AY(RX,{children:" ".repeat(B+2)}),H?.map((N,z)=>N.color?AY(RX,{color:N.color,children:N.char},z):AY(RX,{children:N.char},z))]},K)}),sQ(RX,{dimColor:!0,children:[" v",YN0.version]})]}):sQ(AU,{flexDirection:"column",marginTop:1,children:[kp5.map(($,K)=>AY(RX,{color:Cp5[K],children:$},K)),sQ(RX,{dimColor:!0,children:[" v",YN0.version]})]}),AY(AU,{marginBottom:1,children:AY(RX,{dimColor:!0,children:"\u2500".repeat(80)})}),AY(AU,{children:sQ(RX,{dimColor:!0,children:["Home: ",G]})}),sQ(AU,{gap:2,children:[X.map(($)=>sQ(AU,{gap:1,children:[sQ(RX,{children:[$.name," :",$.port||"...."]}),AY(Qe4,{status:$.status})]},$.name)),sQ(AU,{gap:1,children:[AY(RX,{children:"Migrations"}),AY(Qe4,{status:Y})]})]}),AY(AU,{children:Q?sQ(RX,{children:["Open in browser: ",AY(RX,{color:"cyan",children:Q})]}):AY(RX,{dimColor:!0,children:"Starting..."})}),sQ(AU,{gap:2,children:[sQ(RX,{dimColor:!0,children:[AY(RX,{bold:!0,dimColor:!0,children:"K"})," ","toggle config"]}),sQ(RX,{dimColor:!0,children:[AY(RX,{bold:!0,dimColor:!0,children:"L"})," ","toggle log flow"]}),sQ(RX,{dimColor:!0,children:[AY(RX,{bold:!0,dimColor:!0,children:"V"})," ","toggle vibe ",J?"\u266A Nihilore \xB7 CC BY 4.0":""]}),J&&sQ(RX,{dimColor:!0,children:[AY(RX,{bold:!0,dimColor:!0,children:"N"})," ","skip song"]})]})]})}var kp5,Cp5,GN0,vp5=30,_p5;var Ze4=D(()=>{Ye4();mn1();tn1();kp5=[" \u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588 \u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588 \u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588 \u2588\u2588\u2588\u2588\u2588\u2588\u2588 ","\u2591\u2591\u2588\u2588\u2588\u2591\u2591\u2591\u2591\u2588\u2588\u2588 \u2591\u2591\u2588\u2588\u2588\u2591\u2591\u2591\u2591\u2591\u2588 \u2588\u2588\u2588\u2591\u2591\u2591\u2591\u2591\u2588\u2588\u2588 \u2588\u2588\u2588\u2591\u2591\u2591\u2591\u2591\u2588\u2588\u2588 "," \u2591\u2588\u2588\u2588 \u2591\u2591\u2588\u2588\u2588 \u2591\u2588\u2588\u2588 \u2588 \u2591 \u2588\u2588\u2588 \u2591\u2591\u2591 \u2588\u2588\u2588 \u2591\u2591\u2588\u2588\u2588"," \u2591\u2588\u2588\u2588 \u2591\u2588\u2588\u2588 \u2591\u2588\u2588\u2588\u2588\u2588\u2588 \u2591\u2588\u2588\u2588 \u2591\u2588\u2588\u2588 \u2591\u2588\u2588\u2588"," \u2591\u2588\u2588\u2588 \u2591\u2588\u2588\u2588 \u2591\u2588\u2588\u2588\u2591\u2591\u2588 \u2591\u2588\u2588\u2588 \u2591\u2588\u2588\u2588 \u2591\u2588\u2588\u2588"," \u2591\u2588\u2588\u2588 \u2588\u2588\u2588 \u2591\u2588\u2588\u2588 \u2591 \u2588\u2591\u2591\u2588\u2588\u2588 \u2588\u2588\u2588\u2591\u2591\u2588\u2588\u2588 \u2588\u2588\u2588 "," \u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588 \u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588 \u2591\u2591\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588 \u2591\u2591\u2591\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2591 ","\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591 \u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591 \u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591 \u2591\u2591\u2591\u2591\u2591\u2591\u2591 "],Cp5=["#00ff64","#00ee5e","#00dc56","#00c84e","#00b444","#00a03c","#008832","#006e28"],GN0=[["#00ff64","#00cc50"],["#00f060","#00c04c"],["#00e05c","#00b448"],["#00d058","#00a844"],["#00c054","#009c40"],["#00b050","#00903c"],["#00a04c","#008438"],["#009048","#007834"],["#008044","#006c30"],["#007040","#00602c"],["#00603c","#005428"]],_p5=new Set(["#875f00","#5f3800"])});import{useSyncExternalStore as bp5}from"react";function yp5(){let X=process.stdout.rows||24,Y=process.stdout.columns||80;if(X!==MA1.rows||Y!==MA1.columns)MA1={rows:X,columns:Y};return MA1}function xp5(X){return process.stdout.on("resize",X),()=>{process.stdout.off("resize",X)}}function We4(){return bp5(xp5,yp5)}var MA1;var $e4=D(()=>{MA1={rows:process.stdout.rows||24,columns:process.stdout.columns||80}});import{Box as hp5,Text as VX1}from"ink";import{useSyncExternalStore as gp5}from"react";import{jsx as QN0,jsxs as JN0}from"react/jsx-runtime";function up5(X){if(X>=500)return"red";if(X>=400)return"yellow";if(X>=300)return"cyan";return"green"}function Ke4({logs:X,headerHeight:Y}){let{rows:G}=We4(),{logFlow:Q}=gp5(qX1,PX1),J=Math.max(1,G-Y-1),W=Q?X:X.slice(-J);return QN0(hp5,{flexDirection:"column",children:W.map((Z,$)=>{if(Z.rawLine)return QN0(VX1,{dimColor:!0,children:Z.rawLine},$);let K=Z.duration<1000?`${Z.duration}ms`:`${(Z.duration/1000).toFixed(1)}s`;return JN0(VX1,{children:[JN0(VX1,{dimColor:!0,children:[Z.method.padEnd(6)," ",Z.path.padEnd(30)," "]}),QN0(VX1,{color:up5(Z.status),children:Z.status}),JN0(VX1,{dimColor:!0,children:[" ",K.padStart(8)]})]},$)})})}var He4=D(()=>{Kz();$e4()});var ZN0={};j0(ZN0,{App:()=>np5});import{Box as lp5,Text as mp5,useInput as dp5}from"ink";import{useSyncExternalStore as cp5}from"react";import{jsx as RA1,jsxs as tp5}from"react/jsx-runtime";function np5({home:X}){let Y=cp5(qX1,PX1);return dp5((G)=>{if(G==="k"||G==="K")nB0();if(G==="l"||G==="L")tB0();if((G==="v"||G==="V")&&Y.dataDir)sn1(Y.dataDir),aB0();if((G==="n"||G==="N")&&Y.vibe)on1()}),tp5(lp5,{flexDirection:"column",children:[RA1(Je4,{services:Y.services,migrationsStatus:Y.migrationsStatus,home:X,serverUrl:Y.serverUrl,vibe:Y.vibe}),Y.viewMode==="config"?Y.env?RA1(es4,{env:Y.env}):RA1(mp5,{dimColor:!0,children:"Loading configuration..."}):RA1(Ke4,{logs:Y.logs,headerHeight:Y.vibe?pp5:ip5})]})}var ip5=15,pp5=19;var WN0=D(()=>{Xe4();Ze4();He4();Kz();Sd()});function Fe4(X,Y={}){return{PORT:String(X.port),NODE_ENV:X.nodeEnv,BASE_URL:X.baseUrl,DATA_DIR:X.dataDir,DECOCMS_HOME:X.dataDir,DATABASE_URL:X.databaseUrl,DATABASE_PG_SSL:String(X.databasePgSsl),DATABASE_POOL_MAX:String(X.databasePoolMax),NATS_URL:X.natsUrls.join(","),BETTER_AUTH_SECRET:X.betterAuthSecret,ENCRYPTION_KEY:X.encryptionKey,MESH_JWT_SECRET:X.meshJwtSecret,DECOCMS_LOCAL_MODE:String(X.localMode),DISABLE_RATE_LIMIT:String(X.disableRateLimit),STUDIO_PROVISION_SECRET_KEY:X.studioProvisionSecretKey,CONFIG_PATH:X.configPath,...Object.fromEntries(Object.entries(process.env).filter(([G])=>G.startsWith("AUTH_"))),DECO_AI_GATEWAY_ENABLED:String(X.aiGatewayEnabled),DECO_AI_GATEWAY_URL:X.aiGatewayUrl,ENABLE_DECO_IMPORT:String(X.enableDecoImport),S3_ENDPOINT:X.s3Endpoint,S3_BUCKET:X.s3Bucket,S3_REGION:X.s3Region,S3_ACCESS_KEY_ID:X.s3AccessKeyId,S3_SECRET_ACCESS_KEY:X.s3SecretAccessKey,S3_FORCE_PATH_STYLE:String(X.s3ForcePathStyle),OTEL_SERVICE_NAME:X.otelServiceName,CLICKHOUSE_URL:X.clickhouseUrl,DECO_SUPABASE_URL:X.decoSupabaseUrl,DECO_SUPABASE_SERVICE_KEY:X.decoSupabaseServiceKey,FIRECRAWL_API_KEY:X.firecrawlApiKey,STUDIO_SANDBOX_RUNNER:process.env.STUDIO_SANDBOX_RUNNER,STUDIO_SANDBOX_TEMPLATE_NAME:process.env.STUDIO_SANDBOX_TEMPLATE_NAME,STUDIO_ENV:process.env.STUDIO_ENV,STUDIO_SANDBOX_PREVIEW_URL_PATTERN:process.env.STUDIO_SANDBOX_PREVIEW_URL_PATTERN,STUDIO_SANDBOX_PREVIEW_GATEWAY_NAME:process.env.STUDIO_SANDBOX_PREVIEW_GATEWAY_NAME,STUDIO_SANDBOX_PREVIEW_GATEWAY_NAMESPACE:process.env.STUDIO_SANDBOX_PREVIEW_GATEWAY_NAMESPACE,STUDIO_SANDBOX_SENTINEL_TOKEN:process.env.STUDIO_SANDBOX_SENTINEL_TOKEN,KUBERNETES_SERVICE_HOST:process.env.KUBERNETES_SERVICE_HOST,KUBERNETES_SERVICE_PORT:process.env.KUBERNETES_SERVICE_PORT,FREESTYLE_API_KEY:process.env.FREESTYLE_API_KEY,BROWSERLESS_TOKEN:process.env.BROWSERLESS_TOKEN,NODE_EXTRA_CA_CERTS:process.env.NODE_EXTRA_CA_CERTS,DECO_CLI:"1",DECO_NO_TUI:"true",...Y}}var vj=k((Xn5)=>{Xn5.HttpAuthLocation=void 0;(function(X){X.HEADER="header",X.QUERY="query"})(Xn5.HttpAuthLocation||(Xn5.HttpAuthLocation={}));Xn5.HttpApiKeyAuthLocation=void 0;(function(X){X.HEADER="header",X.QUERY="query"})(Xn5.HttpApiKeyAuthLocation||(Xn5.HttpApiKeyAuthLocation={}));Xn5.EndpointURLScheme=void 0;(function(X){X.HTTP="http",X.HTTPS="https"})(Xn5.EndpointURLScheme||(Xn5.EndpointURLScheme={}));Xn5.AlgorithmId=void 0;(function(X){X.MD5="md5",X.CRC32="crc32",X.CRC32C="crc32c",X.SHA1="sha1",X.SHA256="sha256"})(Xn5.AlgorithmId||(Xn5.AlgorithmId={}));var ap5=(X)=>{let Y=[];if(X.sha256!==void 0)Y.push({algorithmId:()=>Xn5.AlgorithmId.SHA256,checksumConstructor:()=>X.sha256});if(X.md5!=null)Y.push({algorithmId:()=>Xn5.AlgorithmId.MD5,checksumConstructor:()=>X.md5});return{addChecksumAlgorithm(G){Y.push(G)},checksumAlgorithms(){return Y}}},rp5=(X)=>{let Y={};return X.checksumAlgorithms().forEach((G)=>{Y[G.algorithmId()]=G.checksumConstructor()}),Y},op5=(X)=>{return ap5(X)},sp5=(X)=>{return rp5(X)};Xn5.FieldPosition=void 0;(function(X){X[X.HEADER=0]="HEADER",X[X.TRAILER=1]="TRAILER"})(Xn5.FieldPosition||(Xn5.FieldPosition={}));var ep5="__smithy_context";Xn5.IniSectionType=void 0;(function(X){X.PROFILE="profile",X.SSO_SESSION="sso-session",X.SERVICES="services"})(Xn5.IniSectionType||(Xn5.IniSectionType={}));Xn5.RequestHandlerProtocol=void 0;(function(X){X.HTTP_0_9="http/0.9",X.HTTP_1_0="http/1.0",X.TDS_8_0="tds/8.0"})(Xn5.RequestHandlerProtocol||(Xn5.RequestHandlerProtocol={}));Xn5.SMITHY_CONTEXT_KEY=ep5;Xn5.getDefaultClientConfiguration=op5;Xn5.resolveDefaultRuntimeConfig=sp5});var u7=k((Hn5)=>{var Jn5=vj(),Zn5=(X)=>{return{setHttpHandler(Y){X.httpHandler=Y},httpHandler(){return X.httpHandler},updateHttpClientConfig(Y,G){X.httpHandler?.updateHttpClientConfig(Y,G)},httpHandlerConfigs(){return X.httpHandler.httpHandlerConfigs()}}},Wn5=(X)=>{return{httpHandler:X.httpHandler()}};class Ue4{name;kind;values;constructor({name:X,kind:Y=Jn5.FieldPosition.HEADER,values:G=[]}){this.name=X,this.kind=Y,this.values=G}add(X){this.values.push(X)}set(X){this.values=X}remove(X){this.values=this.values.filter((Y)=>Y!==X)}toString(){return this.values.map((X)=>X.includes(",")||X.includes(" ")?`"${X}"`:X).join(", ")}get(){return this.values}}class Be4{entries={};encoding;constructor({fields:X=[],encoding:Y="utf-8"}){X.forEach(this.setField.bind(this)),this.encoding=Y}setField(X){this.entries[X.name.toLowerCase()]=X}getField(X){return this.entries[X.toLowerCase()]}removeField(X){delete this.entries[X.toLowerCase()]}getByType(X){return Object.values(this.entries).filter((Y)=>Y.kind===X)}}class SA1{method;protocol;hostname;port;path;query;headers;username;password;fragment;body;constructor(X){this.method=X.method||"GET",this.hostname=X.hostname||"localhost",this.port=X.port,this.query=X.query||{},this.headers=X.headers||{},this.body=X.body,this.protocol=X.protocol?X.protocol.slice(-1)!==":"?`${X.protocol}:`:X.protocol:"https:",this.path=X.path?X.path.charAt(0)!=="/"?`/${X.path}`:X.path:"/",this.username=X.username,this.password=X.password,this.fragment=X.fragment}static clone(X){let Y=new SA1({...X,headers:{...X.headers}});if(Y.query)Y.query=$n5(Y.query);return Y}static isInstance(X){if(!X)return!1;let Y=X;return"method"in Y&&"protocol"in Y&&"hostname"in Y&&"path"in Y&&typeof Y.query==="object"&&typeof Y.headers==="object"}clone(){return SA1.clone(this)}}function $n5(X){return Object.keys(X).reduce((Y,G)=>{let Q=X[G];return{...Y,[G]:Array.isArray(Q)?[...Q]:Q}},{})}class Ne4{statusCode;reason;headers;body;constructor(X){this.statusCode=X.statusCode,this.reason=X.reason,this.headers=X.headers||{},this.body=X.body}static isInstance(X){if(!X)return!1;let Y=X;return typeof Y.statusCode==="number"&&typeof Y.headers==="object"}}function Kn5(X){return/^[a-z0-9][a-z0-9\.\-]*[a-z0-9]$/.test(X)}Hn5.Field=Ue4;Hn5.Fields=Be4;Hn5.HttpRequest=SA1;Hn5.HttpResponse=Ne4;Hn5.getHttpHandlerExtensionConfiguration=Zn5;Hn5.isValidHostname=Kn5;Hn5.resolveHttpHandlerRuntimeConfig=Wn5});function wn5(X){return(Y)=>async(G)=>{let{request:Q}=G;if(X.expectContinueHeader!==!1&&ze4.HttpRequest.isInstance(Q)&&Q.body&&X.runtime==="node"&&X.requestHandler?.constructor?.name!=="FetchHttpHandler"){let J=!0;if(typeof X.expectContinueHeader==="number")try{J=(Number(Q.headers?.["content-length"])??X.bodyLengthChecker?.(Q.body)??1/0)>=X.expectContinueHeader}catch(W){}else J=!!X.expectContinueHeader;if(J)Q.headers.Expect="100-continue"}return Y({...G,request:Q})}}var ze4,Ln5,Oe4=(X)=>({applyToStack:(Y)=>{Y.add(wn5(X),Ln5)}});var De4=D(()=>{ze4=Y1(u7(),1);Ln5={step:"build",tags:["SET_EXPECT_HEADER","EXPECT_HEADER"],name:"addExpectContinueMiddleware",override:!0}});var wH,kA1,_j,CA1,E9,we4,MX1;var LH=D(()=>{wH={WHEN_SUPPORTED:"WHEN_SUPPORTED",WHEN_REQUIRED:"WHEN_REQUIRED"},kA1=wH.WHEN_SUPPORTED,_j={WHEN_SUPPORTED:"WHEN_SUPPORTED",WHEN_REQUIRED:"WHEN_REQUIRED"},CA1=wH.WHEN_SUPPORTED;(function(X){X.MD5="MD5",X.CRC32="CRC32",X.CRC32C="CRC32C",X.CRC64NVME="CRC64NVME",X.SHA1="SHA1",X.SHA256="SHA256"})(E9||(E9={}));(function(X){X.HEADER="header",X.TRAILER="trailer"})(we4||(we4={}));MX1=E9.CRC32});var Rq,ot=(X,Y,G,Q)=>{if(!(Y in X))return;let J=X[Y].toUpperCase();if(!Object.values(G).includes(J))throw TypeError(`Cannot load ${Q} '${Y}'. Expected one of ${Object.values(G)}, got '${X[Y]}'.`);return J};var NN0=D(()=>{(function(X){X.ENV="env",X.CONFIG="shared config entry"})(Rq||(Rq={}))});var En5="AWS_REQUEST_CHECKSUM_CALCULATION",Pn5="request_checksum_calculation",Le4;var Ee4=D(()=>{LH();NN0();Le4={environmentVariableSelector:(X)=>ot(X,En5,wH,Rq.ENV),configFileSelector:(X)=>ot(X,Pn5,wH,Rq.CONFIG),default:kA1}});var qn5="AWS_RESPONSE_CHECKSUM_VALIDATION",An5="response_checksum_validation",Pe4;var qe4=D(()=>{LH();NN0();Pe4={environmentVariableSelector:(X)=>ot(X,qn5,_j,Rq.ENV),configFileSelector:(X)=>ot(X,An5,_j,Rq.CONFIG),default:CA1}});var ON0=k((vn5)=>{var Tn5=["AuthFailure","InvalidSignatureException","RequestExpired","RequestInTheFuture","RequestTimeTooSkewed","SignatureDoesNotMatch"],In5=["BandwidthLimitExceeded","EC2ThrottledException","LimitExceededException","PriorRequestNotComplete","ProvisionedThroughputExceededException","RequestLimitExceeded","RequestThrottled","RequestThrottledException","SlowDown","ThrottledException","Throttling","ThrottlingException","TooManyRequestsException","TransactionInProgressException"],Vn5=["TimeoutError","RequestTimeout","RequestTimeoutException"],jn5=[500,502,503,504],Mn5=["ECONNRESET","ECONNREFUSED","EPIPE","ETIMEDOUT"],Rn5=["EHOSTUNREACH","ENETUNREACH","ENOTFOUND"],Ae4=(X)=>X?.$retryable!==void 0,Sn5=(X)=>Tn5.includes(X.name),Te4=(X)=>X.$metadata?.clockSkewCorrected,Ie4=(X)=>{let Y=new Set(["Failed to fetch","NetworkError when attempting to fetch resource","The Internet connection appears to be offline","Load failed","Network request failed"]);if(!(X&&X instanceof TypeError))return!1;return Y.has(X.message)},kn5=(X)=>X.$metadata?.httpStatusCode===429||In5.includes(X.name)||X.$retryable?.throttling==!0,zN0=(X,Y=0)=>Ae4(X)||Te4(X)||X.name==="InvalidSignatureException"&&X.message?.includes("Signature expired")||Vn5.includes(X.name)||Mn5.includes(X?.code||"")||Rn5.includes(X?.code||"")||jn5.includes(X.$metadata?.httpStatusCode||0)||Ie4(X)||Ve4(X)||X.cause!==void 0&&Y<=10&&zN0(X.cause,Y+1),Cn5=(X)=>{if(X.$metadata?.httpStatusCode!==void 0){let Y=X.$metadata.httpStatusCode;if(500<=Y&&Y<=599&&!zN0(X))return!0;return!1}return!1};function Ve4(X){return X.code==="ERR_HTTP2_STREAM_ERROR"&&X.message.includes("NGHTTP2_REFUSED_STREAM")}vn5.isBrowserNetworkError=Ie4;vn5.isClockSkewCorrectedError=Te4;vn5.isClockSkewError=Sn5;vn5.isNodeJsHttp2TransientError=Ve4;vn5.isRetryableByTrait=Ae4;vn5.isServerError=Cn5;vn5.isThrottlingError=kn5;vn5.isTransientError=zN0});var Dw=k((an5)=>{var ln5=ON0();an5.RETRY_MODES=void 0;(function(X){X.STANDARD="standard",X.ADAPTIVE="adaptive"})(an5.RETRY_MODES||(an5.RETRY_MODES={}));var _A1=3,mn5=an5.RETRY_MODES.STANDARD;class fA1{static setTimeoutFn=setTimeout;beta;minCapacity;minFillRate;scaleConstant;smooth;enabled=!1;availableTokens=0;lastMaxRate=0;measuredTxRate=0;requestCount=0;fillRate;lastThrottleTime;lastTimestamp=0;lastTxRateBucket;maxCapacity;timeWindow=0;constructor(X){this.beta=X?.beta??0.7,this.minCapacity=X?.minCapacity??1,this.minFillRate=X?.minFillRate??0.5,this.scaleConstant=X?.scaleConstant??0.4,this.smooth=X?.smooth??0.8,this.lastThrottleTime=this.getCurrentTimeInSeconds(),this.lastTxRateBucket=Math.floor(this.getCurrentTimeInSeconds()),this.fillRate=this.minFillRate,this.maxCapacity=this.minCapacity}async getSendToken(){return this.acquireTokenBucket(1)}updateClientSendingRate(X){let Y;this.updateMeasuredRate();let G=X;if(G?.errorType==="THROTTLING"||ln5.isThrottlingError(G?.error??X)){let W=!this.enabled?this.measuredTxRate:Math.min(this.measuredTxRate,this.fillRate);this.lastMaxRate=W,this.calculateTimeWindow(),this.lastThrottleTime=this.getCurrentTimeInSeconds(),Y=this.cubicThrottle(W),this.enableTokenBucket()}else this.calculateTimeWindow(),Y=this.cubicSuccess(this.getCurrentTimeInSeconds());let J=Math.min(Y,2*this.measuredTxRate);this.updateTokenBucketRate(J)}getCurrentTimeInSeconds(){return Date.now()/1000}async acquireTokenBucket(X){if(!this.enabled)return;if(this.refillTokenBucket(),X>this.availableTokens){let Y=(X-this.availableTokens)/this.fillRate*1000;await new Promise((G)=>fA1.setTimeoutFn(G,Y))}this.availableTokens=this.availableTokens-X}refillTokenBucket(){let X=this.getCurrentTimeInSeconds();if(!this.lastTimestamp){this.lastTimestamp=X;return}let Y=(X-this.lastTimestamp)*this.fillRate;this.availableTokens=Math.min(this.maxCapacity,this.availableTokens+Y),this.lastTimestamp=X}calculateTimeWindow(){this.timeWindow=this.getPrecise(Math.pow(this.lastMaxRate*(1-this.beta)/this.scaleConstant,0.3333333333333333))}cubicThrottle(X){return this.getPrecise(X*this.beta)}cubicSuccess(X){return this.getPrecise(this.scaleConstant*Math.pow(X-this.lastThrottleTime-this.timeWindow,3)+this.lastMaxRate)}enableTokenBucket(){this.enabled=!0}updateTokenBucketRate(X){this.refillTokenBucket(),this.fillRate=Math.max(X,this.minFillRate),this.maxCapacity=Math.max(X,this.minCapacity),this.availableTokens=Math.min(this.availableTokens,this.maxCapacity)}updateMeasuredRate(){let X=this.getCurrentTimeInSeconds(),Y=Math.floor(X*2)/2;if(this.requestCount++,Y>this.lastTxRateBucket){let G=this.requestCount/(Y-this.lastTxRateBucket);this.measuredTxRate=this.getPrecise(G*this.smooth+this.measuredTxRate*(1-this.smooth)),this.requestCount=0,this.lastTxRateBucket=Y}}getPrecise(X){return parseFloat(X.toFixed(8))}}var dn5=100,LN0=20000,cn5=500,DN0=500,in5=5,pn5=10,je4=1,nn5="amz-sdk-invocation-id",tn5="amz-sdk-request";class eQ{static v2026=typeof process<"u"&&process.env?.SMITHY_NEW_RETRIES_2026==="true";static delay(){return eQ.v2026?50:100}static throttlingDelay(){return eQ.v2026?1000:500}static cost(){return eQ.v2026?14:5}static throttlingCost(){return eQ.v2026?5:10}static modifiedCostType(){return eQ.v2026?"THROTTLING":"TRANSIENT"}}class Me4{x=eQ.delay();computeNextBackoffDelay(X){let Y=Math.random(),G=2,Q=Y*Math.min(this.x*2**X,LN0);return Math.floor(Q)}setDelayBase(X){this.x=X}}class wN0{delay;count;cost;longPoll;constructor(X,Y,G,Q){this.delay=X,this.count=Y,this.cost=G,this.longPoll=Q}getRetryCount(){return this.count}getRetryDelay(){return Math.min(LN0,this.delay)}getRetryCost(){return this.cost}isLongPoll(){return this.longPoll}}var vA1={incompatible:1,attempts:2,capacity:3};class RX1{mode=an5.RETRY_MODES.STANDARD;capacity=DN0;retryBackoffStrategy;maxAttemptsProvider;baseDelay;constructor(X){if(typeof X==="number")this.maxAttemptsProvider=async()=>X;else if(typeof X==="function")this.maxAttemptsProvider=X;else if(X&&typeof X==="object")this.maxAttemptsProvider=async()=>X.maxAttempts,this.baseDelay=X.baseDelay,this.retryBackoffStrategy=X.backoff;this.maxAttemptsProvider??=async()=>_A1,this.baseDelay??=eQ.delay(),this.retryBackoffStrategy??=new Me4}async acquireInitialRetryToken(X){return new wN0(eQ.delay(),0,void 0,eQ.v2026&&X.includes(":longpoll"))}async refreshRetryTokenForRetry(X,Y){let G=await this.getMaxAttempts(),Q=this.retryCode(X,Y,G),J=Q===0,W=X.isLongPoll?.();if(J||W){let Z=Y.errorType;this.retryBackoffStrategy.setDelayBase(Z==="THROTTLING"?eQ.throttlingDelay():this.baseDelay);let $=this.retryBackoffStrategy.computeNextBackoffDelay(X.getRetryCount()),K=$;if(Y.retryAfterHint instanceof Date)K=Math.max($,Math.min(Y.retryAfterHint.getTime()-Date.now(),$+5000));if(!J)throw Object.assign(Error("No retry token available"),{$backoff:eQ.v2026&&Q===vA1.capacity&&W?K:0});else{let H=this.getCapacityCost(Z);return this.capacity-=H,new wN0(K,X.getRetryCount()+1,H,X.isLongPoll?.()??!1)}}throw Error("No retry token available")}recordSuccess(X){this.capacity=Math.min(DN0,this.capacity+(X.getRetryCost()??je4))}getCapacity(){return this.capacity}async maxAttempts(){return this.maxAttemptsProvider()}async getMaxAttempts(){try{return await this.maxAttemptsProvider()}catch(X){return console.warn(`Max attempts provider could not resolve. Using default of ${_A1}`),_A1}}retryCode(X,Y,G){let Q=X.getRetryCount()+1,J=this.isRetryableError(Y.errorType)?0:vA1.incompatible,W=Q<G?0:vA1.attempts,Z=this.capacity>=this.getCapacityCost(Y.errorType)?0:vA1.capacity;return J||W||Z}getCapacityCost(X){return X===eQ.modifiedCostType()?eQ.throttlingCost():eQ.cost()}isRetryableError(X){return X==="THROTTLING"||X==="TRANSIENT"}}class Re4{mode=an5.RETRY_MODES.ADAPTIVE;rateLimiter;standardRetryStrategy;constructor(X,Y){let{rateLimiter:G}=Y??{};this.rateLimiter=G??new fA1,this.standardRetryStrategy=Y?new RX1({maxAttempts:typeof X==="number"?X:3,...Y}):new RX1(X)}async acquireInitialRetryToken(X){return await this.rateLimiter.getSendToken(),this.standardRetryStrategy.acquireInitialRetryToken(X)}async refreshRetryTokenForRetry(X,Y){return this.rateLimiter.updateClientSendingRate(Y),this.standardRetryStrategy.refreshRetryTokenForRetry(X,Y)}recordSuccess(X){this.rateLimiter.updateClientSendingRate({}),this.standardRetryStrategy.recordSuccess(X)}async maxAttemptsProvider(){return this.standardRetryStrategy.maxAttempts()}}class Se4 extends RX1{computeNextBackoffDelay;constructor(X,Y=eQ.delay()){super(typeof X==="function"?X:async()=>X);if(typeof Y==="number")this.computeNextBackoffDelay=()=>Y;else this.computeNextBackoffDelay=Y}async refreshRetryTokenForRetry(X,Y){let G=await super.refreshRetryTokenForRetry(X,Y);return G.getRetryDelay=()=>this.computeNextBackoffDelay(G.getRetryCount()),G}}an5.AdaptiveRetryStrategy=Re4;an5.ConfiguredRetryStrategy=Se4;an5.DEFAULT_MAX_ATTEMPTS=_A1;an5.DEFAULT_RETRY_DELAY_BASE=dn5;an5.DEFAULT_RETRY_MODE=mn5;an5.DefaultRateLimiter=fA1;an5.INITIAL_RETRY_TOKENS=DN0;an5.INVOCATION_ID_HEADER=nn5;an5.MAXIMUM_RETRY_DELAY=LN0;an5.NO_RETRY_INCREMENT=je4;an5.REQUEST_HEADER=tn5;an5.RETRY_COST=in5;an5.Retry=eQ;an5.StandardRetryStrategy=RX1;an5.THROTTLING_RETRY_DELAY_BASE=cn5;an5.TIMEOUT_RETRY_COST=pn5});var WX=k((Pt5)=>{var Bt5=Dw(),EN0={warningEmitted:!1},Nt5=(X)=>{if(X&&!EN0.warningEmitted&&parseInt(X.substring(1,X.indexOf(".")))<20)EN0.warningEmitted=!0,process.emitWarning(`NodeDeprecationWarning: The AWS SDK for JavaScript (v3) will
|
|
1626
|
+
`);Q=W.pop()??"";for(let Z of W){let $=as4(Z).replace(/^\[\d+\]\s*/,"").trim();if(!$)continue;$z({method:"",path:"",status:0,duration:0,timestamp:new Date,rawLine:$})}}(async()=>{for(;;){let{done:W,value:Z}=await Y.read();if(W)break;Q+=G.decode(Z,{stream:!0}),J()}if(Q.trim()){let W=as4(Q).replace(/^\[\d+\]\s*/,"").trim();if(W)$z({method:"",path:"",status:0,duration:0,timestamp:new Date,rawLine:W})}})()}async function Tp5(X){let{vitePort:Y,baseUrl:G,noTui:Q}=X,J=await VA1(Number(X.port)),{settings:W,services:Z,managedServiceNames:$}=await qA1({port:String(J),home:X.home,baseUrl:X.baseUrl,localMode:X.localMode,skipMigrations:X.skipMigrations,noTui:X.noTui,vitePort:X.vitePort});for(let z of Z)rt({name:z.name,status:"ready",port:z.port});IX1(W),AX1();let K=Ap5(import.meta.dir,"..","..","..","..",".."),H=Q===!0,U=Bun.spawn(["bun","run","--cwd=apps/mesh","dev:servers"],{cwd:K,env:{...process.env,PORT:String(W.port),VITE_PORT:String(Y),DATABASE_URL:W.databaseUrl,NATS_URL:W.natsUrls.join(","),NODE_ENV:W.nodeEnv,DECOCMS_LOCAL_MODE:String(W.localMode),DECOCMS_HOME:W.dataDir,DATA_DIR:W.dataDir,DECO_CLI:"1",...W.baseUrl?{BASE_URL:W.baseUrl}:{}},stdio:["inherit",H?"inherit":"pipe",H?"inherit":"pipe"]});if(!H)rs4(U.stdout),rs4(U.stderr);let B=G||`http://localhost:${W.port}`;TX1(B),rt({name:"Vite",status:"ready",port:Number(Y)});let N=async(z)=>{if(U.kill(z),$.length>0){let{stopServices:O}=await Promise.resolve().then(() => (T$1(),A$1));await O(W.dataDir)}};return process.on("SIGINT",()=>N("SIGINT")),process.on("SIGTERM",()=>N("SIGTERM")),{port:Number(W.port),process:U}}var sB0=D(()=>{iB0();Kz();rB0()});import{Box as eB0,Text as XN0}from"ink";import{jsx as ss4,jsxs as jA1}from"react/jsx-runtime";function os4(X){if(!X)return"not set";try{let Y=new URL(X);if(Y.password)Y.password="***";if(Y.username&&Y.username.length>3)Y.username=Y.username.slice(0,3)+"***";return Y.pathname="/",Y.search="",Y.hash="",Y.toString()}catch{if(X.length<=10)return X;return X.slice(0,6)+"***"+X.slice(-4)}}function jp5(X,Y){if(Ip5.has(X))return Y?{text:"\u25CF\u25CF\u25CF\u25CF\u25CF\u25CF",dimColor:!0}:{text:"not set",dimColor:!0};if(Vp5.has(X)){if(Array.isArray(Y)){if(Y.length===0)return{text:"not set",dimColor:!0};return{text:Y.map((W)=>os4(W)).join(", "),color:"cyan"}}let Q=os4(Y);return Q==="not set"?{text:Q,dimColor:!0}:{text:Q,color:"cyan"}}if(Y===void 0||Y===null||Y==="")return{text:"not set",dimColor:!0};let G=String(Y);if(G==="true")return{text:G,color:"green"};if(G==="false")return{text:G,color:"yellow"};try{return new URL(G),{text:G,color:"cyan"}}catch{return{text:G}}}function Mp5(X){return[{title:"Core",entries:[{key:"NODE_ENV",value:X.nodeEnv},{key:"PORT",value:X.port},{key:"BASE_URL",value:X.baseUrl??`http://localhost:${X.port}`},{key:"DATA_DIR",value:X.dataDir}]},{title:"Database",entries:[{key:"DATABASE_URL",value:X.databaseUrl},{key:"DATABASE_PG_SSL",value:X.databasePgSsl}]},{title:"Auth & Secrets",entries:[{key:"BETTER_AUTH_SECRET",value:X.betterAuthSecret},{key:"ENCRYPTION_KEY",value:X.encryptionKey},{key:"MESH_JWT_SECRET",value:X.meshJwtSecret},{key:"STUDIO_PROVISION_SECRET_KEY",value:X.studioProvisionSecretKey},{key:"DISABLE_RATE_LIMIT",value:X.disableRateLimit}]},{title:"Auth Providers",entries:[{key:"AUTH_EMAIL_PASSWORD_ENABLED",value:process.env.AUTH_EMAIL_PASSWORD_ENABLED??"true"},{key:"AUTH_GOOGLE_CLIENT_ID",value:!!process.env.AUTH_GOOGLE_CLIENT_ID},{key:"AUTH_GITHUB_CLIENT_ID",value:!!process.env.AUTH_GITHUB_CLIENT_ID},{key:"AUTH_RESEND_API_KEY",value:!!process.env.AUTH_RESEND_API_KEY},{key:"AUTH_SENDGRID_API_KEY",value:!!process.env.AUTH_SENDGRID_API_KEY},{key:"AUTH_SSO_MS_CLIENT_ID",value:!!process.env.AUTH_SSO_MS_CLIENT_ID},{key:"AUTH_MAGIC_LINK_ENABLED",value:process.env.AUTH_MAGIC_LINK_ENABLED==="true"},{key:"AUTH_EMAIL_OTP_ENABLED",value:process.env.AUTH_EMAIL_OTP_ENABLED==="true"}]},{title:"Observability",entries:[{key:"CLICKHOUSE_URL",value:X.clickhouseUrl},{key:"OTEL_SERVICE_NAME",value:X.otelServiceName}]},{title:"Event Bus & Networking",entries:[{key:"NATS_URL",value:X.natsUrls}]},{title:"Config Files",entries:[{key:"CONFIG_PATH",value:X.configPath}]},{title:"AI Gateway",entries:[{key:"DECO_AI_GATEWAY_ENABLED",value:X.aiGatewayEnabled},{key:"DECO_AI_GATEWAY_URL",value:X.aiGatewayUrl}]}]}function es4({env:X}){let Y=Mp5(X);return ss4(eB0,{flexDirection:"column",children:Y.map((G)=>jA1(eB0,{flexDirection:"column",marginTop:1,children:[jA1(XN0,{dimColor:!0,children:[" ","\u2500\u2500 ",G.title," ","\u2500".repeat(Math.max(0,38-G.title.length))]}),G.entries.map(({key:Q,value:J})=>{let W=jp5(Q,J);return jA1(eB0,{children:[jA1(XN0,{dimColor:!0,children:[" ",Q.padEnd(36)]}),ss4(XN0,{color:W.color,dimColor:W.dimColor,children:W.text})]},Q)})]},G.title))})}var Ip5,Vp5;var Xe4=D(()=>{Ip5=new Set(["BETTER_AUTH_SECRET","ENCRYPTION_KEY","MESH_JWT_SECRET","STUDIO_PROVISION_SECRET_KEY"]),Vp5=new Set(["DATABASE_URL","CLICKHOUSE_URL","NATS_URL"])});var YN0;var Ye4=D(()=>{YN0={name:"decocms",version:"2.302.3",description:"Deco CMS \u2014 Self-hostable MCP Gateway for managing AI connections and tools",author:"Deco team",repository:{type:"git",url:"git+https://github.com/decocms/studio.git",directory:"apps/mesh"},bugs:{url:"https://github.com/decocms/studio/issues"},type:"module",bin:{deco:"./dist/server/cli.js"},files:["dist/**/*"],scripts:{dev:'bun run migrate && concurrently "bun run dev:client" "bun run dev:server"',"dev:servers":'concurrently "bun run dev:client" "bun run dev:server"',"dev:client":"bun --bun vite dev","dev:server":"bun run --cwd=../../packages/sandbox build && NODE_ENV=development bun --env-file=.env --hot run src/index.ts","build:client":"bun --bun vite build","build:server":"bun run scripts/bundle-server-script.ts --dist ./dist/server","db:migrate":"bun run ./dist/server/migrate.js",check:"tsc --noEmit",start:"bun run ./dist/server/server.js",migrate:"bun run src/database/migrate.ts",test:"bun test","test:e2e":"playwright test","test:e2e:ui":"playwright test --ui","better-auth:migrate":"bunx --bun @better-auth/cli migrate -y --config src/auth/index.ts",prepublishOnly:"bun run build:client && bun run build:server"},optionalDependencies:{"@duckdb/node-api":"^1.5.0-r.1","@freestyle-sh/with-bun":"^0.2.12","@freestyle-sh/with-deno":"^0.0.4","@freestyle-sh/with-nodejs":"^0.2.9","freestyle-sandboxes":"^0.1.46"},dependencies:{"@ai-sdk/anthropic":"^3.0.58","@ai-sdk/google":"^3.0.60","@ai-sdk/openai":"^3.0.50","@anthropic-ai/sdk":"^0.79.0","@aws-sdk/client-s3":"^3.1013.0","@aws-sdk/s3-request-presigner":"^3.1013.0","@clickhouse/client":"^1.8.1","@dnd-kit/core":"^6.3.1","@dnd-kit/sortable":"^10.0.0","@dnd-kit/utilities":"^3.2.2","@inkjs/ui":"^2.0.0","@modelcontextprotocol/ext-apps":"^1.2.2","@openrouter/ai-sdk-provider":"^2.2.5","@opentelemetry/core":"^2.6.0","@tanstack/react-virtual":"^3.13.21","@xterm/addon-fit":"^0.11.0","@xterm/xterm":"^6.0.0","ai-sdk-provider-claude-code":"^3.4.4","ai-sdk-provider-codex-cli":"^1.1.0","embedded-postgres":"^18.3.0-beta.16",ink:"^6.8.0",kysely:"^0.28.12",nats:"^2.29.3","node-pty":"^1.0.0","posthog-js":"^1.371.1","posthog-node":"^5.0.0",react:"^19.2.0","react-dom":"^19.2.0"},devDependencies:{"@ai-sdk/provider":"^3.0.8","@ai-sdk/react":"^3.0.118","@anthropic-ai/claude-agent-sdk":"^0.2.80","@better-auth/sso":"1.4.1","@daveyplate/better-auth-ui":"^3.2.7","@deco/ui":"workspace:*","@decocms/better-auth":"1.5.17","@decocms/bindings":"workspace:*","@decocms/mcp-utils":"workspace:*","@decocms/mesh-sdk":"workspace:*","@decocms/runtime":"workspace:*","@decocms/vite-plugin":"workspace:*","@electric-sql/pglite":"^0.3.15","@floating-ui/react":"^0.27.16","@hookform/resolvers":"^5.2.2","@jitl/quickjs-wasmfile-release-sync":"0.31.0","@modelcontextprotocol/sdk":"1.27.1","@monaco-editor/react":"^4.7.0","@opentelemetry/api":"^1.9.0","@opentelemetry/api-logs":"^0.211.0","@opentelemetry/exporter-logs-otlp-proto":"^0.211.0","@opentelemetry/exporter-prometheus":"^0.208.0","@opentelemetry/exporter-trace-otlp-proto":"^0.207.0","@opentelemetry/instrumentation-runtime-node":"^0.24.0","@opentelemetry/sdk-logs":"^0.211.0","@opentelemetry/sdk-metrics":"^2.2.0","@opentelemetry/sdk-node":"^0.207.0","@opentelemetry/sdk-trace-base":"^2.5.0","@playwright/test":"^1.58.2","@radix-ui/react-avatar":"^1.1.10","@radix-ui/react-checkbox":"^1.3.3","@radix-ui/react-dialog":"^1.1.15","@radix-ui/react-dropdown-menu":"^2.1.16","@radix-ui/react-label":"^2.1.7","@radix-ui/react-select":"^2.2.6","@radix-ui/react-separator":"^1.1.7","@radix-ui/react-slot":"^1.2.3","@radix-ui/react-tabs":"^1.1.13","@rjsf/core":"^6.1.2","@rjsf/shadcn":"^6.1.2","@rjsf/utils":"^6.1.2","@rjsf/validator-ajv8":"^6.1.2","@tailwindcss/vite":"^4.1.17","@tanstack/react-query":"5.90.11","@tanstack/react-router":"^1.139.7","@tiptap/core":"3.20.2","@tiptap/extension-mention":"3.20.2","@tiptap/extension-placeholder":"3.20.2","@tiptap/pm":"3.20.2","@tiptap/react":"3.20.2","@tiptap/starter-kit":"3.20.2","@tiptap/suggestion":"3.20.2","@types/bun":"^1.3.1","@types/pg":"^8.15.6","@types/react-syntax-highlighter":"^15.5.13","@untitledui/icons":"^0.0.19","@vercel/nft":"^1.1.1","@vitejs/plugin-react":"^5.1.0",ai:"^6.0.116","babel-plugin-react-compiler":"^1.0.0","better-auth":"1.4.5","class-variance-authority":"^0.7.1",clsx:"^2.1.1",concurrently:"^9.2.1",croner:"^9.1.0","date-fns":"^4.1.0",degit:"^2.8.4",hono:"^4.10.7","input-otp":"^1.4.2",jose:"^6.0.11","kysely-pglite":"^0.6.1","lucide-react":"^0.468.0",marked:"^15.0.6","@decocms/sandbox":"workspace:*","mesh-plugin-workflows":"workspace:*",nanoid:"^5.1.6",pg:"^8.16.3",prettier:"^3.4.2","react-hook-form":"^7.66.0","react-markdown":"^10.1.0","react-resizable-panels":"^2.1.7","react-syntax-highlighter":"^15.6.1",recharts:"^3.6.0","rehype-raw":"^7.0.0","remark-gfm":"^4.0.0","sass-embedded":"^1.97.2",sonner:"^2.0.7","tailwind-merge":"^3.3.1",tailwindcss:"^4.1.17",typescript:"^5.9.3",vite:"^7.2.1","vite-tsconfig-paths":"^5.1.4",zod:"^4.0.0",zustand:"^5.0.9"},homepage:"https://github.com/decocms/studio",keywords:["mcp","model-context-protocol","ai","gateway","self-hosted","mesh","tools"],license:"MIT",publishConfig:{access:"public"}}});import{Box as AU,Text as RX}from"ink";import{Spinner as Sp5}from"@inkjs/ui";import{useSyncExternalStore as Ge4}from"react";import{jsx as AY,jsxs as sQ}from"react/jsx-runtime";function fp5(X,Y){if(!X||!_p5.has(X))return X;let G=GN0[Y]??GN0[GN0.length-1];return X==="#875f00"?G[0]:G[1]}function Qe4({status:X}){if(X==="pending")return AY(Sp5,{label:""});return AY(RX,{color:"green",children:"\u2713"})}function Je4({services:X,migrationsStatus:Y,home:G,serverUrl:Q,vibe:J}){let W=Ge4(Vl0,Il0),Z=Ge4(Cl0,kl0);return sQ(AU,{flexDirection:"column",paddingBottom:1,children:[J?sQ(AU,{flexDirection:"column",children:[W.map(($,K)=>{let H=Z[K],U=$.reduce((N,z)=>N+z.text.length,0),B=Math.max(0,vp5-U);return sQ(AU,{flexDirection:"row",children:[$.map((N,z)=>{let O=fp5(N.color,K);return O?AY(RX,{color:O,children:N.text},z):AY(RX,{children:N.text},z)}),AY(RX,{children:" ".repeat(B+2)}),H?.map((N,z)=>N.color?AY(RX,{color:N.color,children:N.char},z):AY(RX,{children:N.char},z))]},K)}),sQ(RX,{dimColor:!0,children:[" v",YN0.version]})]}):sQ(AU,{flexDirection:"column",marginTop:1,children:[kp5.map(($,K)=>AY(RX,{color:Cp5[K],children:$},K)),sQ(RX,{dimColor:!0,children:[" v",YN0.version]})]}),AY(AU,{marginBottom:1,children:AY(RX,{dimColor:!0,children:"\u2500".repeat(80)})}),AY(AU,{children:sQ(RX,{dimColor:!0,children:["Home: ",G]})}),sQ(AU,{gap:2,children:[X.map(($)=>sQ(AU,{gap:1,children:[sQ(RX,{children:[$.name," :",$.port||"...."]}),AY(Qe4,{status:$.status})]},$.name)),sQ(AU,{gap:1,children:[AY(RX,{children:"Migrations"}),AY(Qe4,{status:Y})]})]}),AY(AU,{children:Q?sQ(RX,{children:["Open in browser: ",AY(RX,{color:"cyan",children:Q})]}):AY(RX,{dimColor:!0,children:"Starting..."})}),sQ(AU,{gap:2,children:[sQ(RX,{dimColor:!0,children:[AY(RX,{bold:!0,dimColor:!0,children:"K"})," ","toggle config"]}),sQ(RX,{dimColor:!0,children:[AY(RX,{bold:!0,dimColor:!0,children:"L"})," ","toggle log flow"]}),sQ(RX,{dimColor:!0,children:[AY(RX,{bold:!0,dimColor:!0,children:"V"})," ","toggle vibe ",J?"\u266A Nihilore \xB7 CC BY 4.0":""]}),J&&sQ(RX,{dimColor:!0,children:[AY(RX,{bold:!0,dimColor:!0,children:"N"})," ","skip song"]})]})]})}var kp5,Cp5,GN0,vp5=30,_p5;var Ze4=D(()=>{Ye4();mn1();tn1();kp5=[" \u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588 \u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588 \u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588 \u2588\u2588\u2588\u2588\u2588\u2588\u2588 ","\u2591\u2591\u2588\u2588\u2588\u2591\u2591\u2591\u2591\u2588\u2588\u2588 \u2591\u2591\u2588\u2588\u2588\u2591\u2591\u2591\u2591\u2591\u2588 \u2588\u2588\u2588\u2591\u2591\u2591\u2591\u2591\u2588\u2588\u2588 \u2588\u2588\u2588\u2591\u2591\u2591\u2591\u2591\u2588\u2588\u2588 "," \u2591\u2588\u2588\u2588 \u2591\u2591\u2588\u2588\u2588 \u2591\u2588\u2588\u2588 \u2588 \u2591 \u2588\u2588\u2588 \u2591\u2591\u2591 \u2588\u2588\u2588 \u2591\u2591\u2588\u2588\u2588"," \u2591\u2588\u2588\u2588 \u2591\u2588\u2588\u2588 \u2591\u2588\u2588\u2588\u2588\u2588\u2588 \u2591\u2588\u2588\u2588 \u2591\u2588\u2588\u2588 \u2591\u2588\u2588\u2588"," \u2591\u2588\u2588\u2588 \u2591\u2588\u2588\u2588 \u2591\u2588\u2588\u2588\u2591\u2591\u2588 \u2591\u2588\u2588\u2588 \u2591\u2588\u2588\u2588 \u2591\u2588\u2588\u2588"," \u2591\u2588\u2588\u2588 \u2588\u2588\u2588 \u2591\u2588\u2588\u2588 \u2591 \u2588\u2591\u2591\u2588\u2588\u2588 \u2588\u2588\u2588\u2591\u2591\u2588\u2588\u2588 \u2588\u2588\u2588 "," \u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588 \u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588 \u2591\u2591\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588 \u2591\u2591\u2591\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2591 ","\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591 \u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591 \u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591 \u2591\u2591\u2591\u2591\u2591\u2591\u2591 "],Cp5=["#00ff64","#00ee5e","#00dc56","#00c84e","#00b444","#00a03c","#008832","#006e28"],GN0=[["#00ff64","#00cc50"],["#00f060","#00c04c"],["#00e05c","#00b448"],["#00d058","#00a844"],["#00c054","#009c40"],["#00b050","#00903c"],["#00a04c","#008438"],["#009048","#007834"],["#008044","#006c30"],["#007040","#00602c"],["#00603c","#005428"]],_p5=new Set(["#875f00","#5f3800"])});import{useSyncExternalStore as bp5}from"react";function yp5(){let X=process.stdout.rows||24,Y=process.stdout.columns||80;if(X!==MA1.rows||Y!==MA1.columns)MA1={rows:X,columns:Y};return MA1}function xp5(X){return process.stdout.on("resize",X),()=>{process.stdout.off("resize",X)}}function We4(){return bp5(xp5,yp5)}var MA1;var $e4=D(()=>{MA1={rows:process.stdout.rows||24,columns:process.stdout.columns||80}});import{Box as hp5,Text as VX1}from"ink";import{useSyncExternalStore as gp5}from"react";import{jsx as QN0,jsxs as JN0}from"react/jsx-runtime";function up5(X){if(X>=500)return"red";if(X>=400)return"yellow";if(X>=300)return"cyan";return"green"}function Ke4({logs:X,headerHeight:Y}){let{rows:G}=We4(),{logFlow:Q}=gp5(qX1,PX1),J=Math.max(1,G-Y-1),W=Q?X:X.slice(-J);return QN0(hp5,{flexDirection:"column",children:W.map((Z,$)=>{if(Z.rawLine)return QN0(VX1,{dimColor:!0,children:Z.rawLine},$);let K=Z.duration<1000?`${Z.duration}ms`:`${(Z.duration/1000).toFixed(1)}s`;return JN0(VX1,{children:[JN0(VX1,{dimColor:!0,children:[Z.method.padEnd(6)," ",Z.path.padEnd(30)," "]}),QN0(VX1,{color:up5(Z.status),children:Z.status}),JN0(VX1,{dimColor:!0,children:[" ",K.padStart(8)]})]},$)})})}var He4=D(()=>{Kz();$e4()});var ZN0={};j0(ZN0,{App:()=>np5});import{Box as lp5,Text as mp5,useInput as dp5}from"ink";import{useSyncExternalStore as cp5}from"react";import{jsx as RA1,jsxs as tp5}from"react/jsx-runtime";function np5({home:X}){let Y=cp5(qX1,PX1);return dp5((G)=>{if(G==="k"||G==="K")nB0();if(G==="l"||G==="L")tB0();if((G==="v"||G==="V")&&Y.dataDir)sn1(Y.dataDir),aB0();if((G==="n"||G==="N")&&Y.vibe)on1()}),tp5(lp5,{flexDirection:"column",children:[RA1(Je4,{services:Y.services,migrationsStatus:Y.migrationsStatus,home:X,serverUrl:Y.serverUrl,vibe:Y.vibe}),Y.viewMode==="config"?Y.env?RA1(es4,{env:Y.env}):RA1(mp5,{dimColor:!0,children:"Loading configuration..."}):RA1(Ke4,{logs:Y.logs,headerHeight:Y.vibe?pp5:ip5})]})}var ip5=15,pp5=19;var WN0=D(()=>{Xe4();Ze4();He4();Kz();Sd()});function Fe4(X,Y={}){return{PORT:String(X.port),NODE_ENV:X.nodeEnv,BASE_URL:X.baseUrl,DATA_DIR:X.dataDir,DECOCMS_HOME:X.dataDir,DATABASE_URL:X.databaseUrl,DATABASE_PG_SSL:String(X.databasePgSsl),DATABASE_POOL_MAX:String(X.databasePoolMax),NATS_URL:X.natsUrls.join(","),BETTER_AUTH_SECRET:X.betterAuthSecret,ENCRYPTION_KEY:X.encryptionKey,MESH_JWT_SECRET:X.meshJwtSecret,DECOCMS_LOCAL_MODE:String(X.localMode),DISABLE_RATE_LIMIT:String(X.disableRateLimit),STUDIO_PROVISION_SECRET_KEY:X.studioProvisionSecretKey,CONFIG_PATH:X.configPath,...Object.fromEntries(Object.entries(process.env).filter(([G])=>G.startsWith("AUTH_"))),DECO_AI_GATEWAY_ENABLED:String(X.aiGatewayEnabled),DECO_AI_GATEWAY_URL:X.aiGatewayUrl,ENABLE_DECO_IMPORT:String(X.enableDecoImport),S3_ENDPOINT:X.s3Endpoint,S3_BUCKET:X.s3Bucket,S3_REGION:X.s3Region,S3_ACCESS_KEY_ID:X.s3AccessKeyId,S3_SECRET_ACCESS_KEY:X.s3SecretAccessKey,S3_FORCE_PATH_STYLE:String(X.s3ForcePathStyle),OTEL_SERVICE_NAME:X.otelServiceName,CLICKHOUSE_URL:X.clickhouseUrl,DECO_SUPABASE_URL:X.decoSupabaseUrl,DECO_SUPABASE_SERVICE_KEY:X.decoSupabaseServiceKey,FIRECRAWL_API_KEY:X.firecrawlApiKey,STUDIO_SANDBOX_RUNNER:process.env.STUDIO_SANDBOX_RUNNER,STUDIO_SANDBOX_TEMPLATE_NAME:process.env.STUDIO_SANDBOX_TEMPLATE_NAME,STUDIO_ENV:process.env.STUDIO_ENV,STUDIO_SANDBOX_PREVIEW_URL_PATTERN:process.env.STUDIO_SANDBOX_PREVIEW_URL_PATTERN,STUDIO_SANDBOX_PREVIEW_GATEWAY_NAME:process.env.STUDIO_SANDBOX_PREVIEW_GATEWAY_NAME,STUDIO_SANDBOX_PREVIEW_GATEWAY_NAMESPACE:process.env.STUDIO_SANDBOX_PREVIEW_GATEWAY_NAMESPACE,STUDIO_SANDBOX_SENTINEL_TOKEN:process.env.STUDIO_SANDBOX_SENTINEL_TOKEN,KUBERNETES_SERVICE_HOST:process.env.KUBERNETES_SERVICE_HOST,KUBERNETES_SERVICE_PORT:process.env.KUBERNETES_SERVICE_PORT,FREESTYLE_API_KEY:process.env.FREESTYLE_API_KEY,BROWSERLESS_TOKEN:process.env.BROWSERLESS_TOKEN,NODE_EXTRA_CA_CERTS:process.env.NODE_EXTRA_CA_CERTS,DECO_CLI:"1",DECO_NO_TUI:"true",...Y}}var vj=k((Xn5)=>{Xn5.HttpAuthLocation=void 0;(function(X){X.HEADER="header",X.QUERY="query"})(Xn5.HttpAuthLocation||(Xn5.HttpAuthLocation={}));Xn5.HttpApiKeyAuthLocation=void 0;(function(X){X.HEADER="header",X.QUERY="query"})(Xn5.HttpApiKeyAuthLocation||(Xn5.HttpApiKeyAuthLocation={}));Xn5.EndpointURLScheme=void 0;(function(X){X.HTTP="http",X.HTTPS="https"})(Xn5.EndpointURLScheme||(Xn5.EndpointURLScheme={}));Xn5.AlgorithmId=void 0;(function(X){X.MD5="md5",X.CRC32="crc32",X.CRC32C="crc32c",X.SHA1="sha1",X.SHA256="sha256"})(Xn5.AlgorithmId||(Xn5.AlgorithmId={}));var ap5=(X)=>{let Y=[];if(X.sha256!==void 0)Y.push({algorithmId:()=>Xn5.AlgorithmId.SHA256,checksumConstructor:()=>X.sha256});if(X.md5!=null)Y.push({algorithmId:()=>Xn5.AlgorithmId.MD5,checksumConstructor:()=>X.md5});return{addChecksumAlgorithm(G){Y.push(G)},checksumAlgorithms(){return Y}}},rp5=(X)=>{let Y={};return X.checksumAlgorithms().forEach((G)=>{Y[G.algorithmId()]=G.checksumConstructor()}),Y},op5=(X)=>{return ap5(X)},sp5=(X)=>{return rp5(X)};Xn5.FieldPosition=void 0;(function(X){X[X.HEADER=0]="HEADER",X[X.TRAILER=1]="TRAILER"})(Xn5.FieldPosition||(Xn5.FieldPosition={}));var ep5="__smithy_context";Xn5.IniSectionType=void 0;(function(X){X.PROFILE="profile",X.SSO_SESSION="sso-session",X.SERVICES="services"})(Xn5.IniSectionType||(Xn5.IniSectionType={}));Xn5.RequestHandlerProtocol=void 0;(function(X){X.HTTP_0_9="http/0.9",X.HTTP_1_0="http/1.0",X.TDS_8_0="tds/8.0"})(Xn5.RequestHandlerProtocol||(Xn5.RequestHandlerProtocol={}));Xn5.SMITHY_CONTEXT_KEY=ep5;Xn5.getDefaultClientConfiguration=op5;Xn5.resolveDefaultRuntimeConfig=sp5});var u7=k((Hn5)=>{var Jn5=vj(),Zn5=(X)=>{return{setHttpHandler(Y){X.httpHandler=Y},httpHandler(){return X.httpHandler},updateHttpClientConfig(Y,G){X.httpHandler?.updateHttpClientConfig(Y,G)},httpHandlerConfigs(){return X.httpHandler.httpHandlerConfigs()}}},Wn5=(X)=>{return{httpHandler:X.httpHandler()}};class Ue4{name;kind;values;constructor({name:X,kind:Y=Jn5.FieldPosition.HEADER,values:G=[]}){this.name=X,this.kind=Y,this.values=G}add(X){this.values.push(X)}set(X){this.values=X}remove(X){this.values=this.values.filter((Y)=>Y!==X)}toString(){return this.values.map((X)=>X.includes(",")||X.includes(" ")?`"${X}"`:X).join(", ")}get(){return this.values}}class Be4{entries={};encoding;constructor({fields:X=[],encoding:Y="utf-8"}){X.forEach(this.setField.bind(this)),this.encoding=Y}setField(X){this.entries[X.name.toLowerCase()]=X}getField(X){return this.entries[X.toLowerCase()]}removeField(X){delete this.entries[X.toLowerCase()]}getByType(X){return Object.values(this.entries).filter((Y)=>Y.kind===X)}}class SA1{method;protocol;hostname;port;path;query;headers;username;password;fragment;body;constructor(X){this.method=X.method||"GET",this.hostname=X.hostname||"localhost",this.port=X.port,this.query=X.query||{},this.headers=X.headers||{},this.body=X.body,this.protocol=X.protocol?X.protocol.slice(-1)!==":"?`${X.protocol}:`:X.protocol:"https:",this.path=X.path?X.path.charAt(0)!=="/"?`/${X.path}`:X.path:"/",this.username=X.username,this.password=X.password,this.fragment=X.fragment}static clone(X){let Y=new SA1({...X,headers:{...X.headers}});if(Y.query)Y.query=$n5(Y.query);return Y}static isInstance(X){if(!X)return!1;let Y=X;return"method"in Y&&"protocol"in Y&&"hostname"in Y&&"path"in Y&&typeof Y.query==="object"&&typeof Y.headers==="object"}clone(){return SA1.clone(this)}}function $n5(X){return Object.keys(X).reduce((Y,G)=>{let Q=X[G];return{...Y,[G]:Array.isArray(Q)?[...Q]:Q}},{})}class Ne4{statusCode;reason;headers;body;constructor(X){this.statusCode=X.statusCode,this.reason=X.reason,this.headers=X.headers||{},this.body=X.body}static isInstance(X){if(!X)return!1;let Y=X;return typeof Y.statusCode==="number"&&typeof Y.headers==="object"}}function Kn5(X){return/^[a-z0-9][a-z0-9\.\-]*[a-z0-9]$/.test(X)}Hn5.Field=Ue4;Hn5.Fields=Be4;Hn5.HttpRequest=SA1;Hn5.HttpResponse=Ne4;Hn5.getHttpHandlerExtensionConfiguration=Zn5;Hn5.isValidHostname=Kn5;Hn5.resolveHttpHandlerRuntimeConfig=Wn5});function wn5(X){return(Y)=>async(G)=>{let{request:Q}=G;if(X.expectContinueHeader!==!1&&ze4.HttpRequest.isInstance(Q)&&Q.body&&X.runtime==="node"&&X.requestHandler?.constructor?.name!=="FetchHttpHandler"){let J=!0;if(typeof X.expectContinueHeader==="number")try{J=(Number(Q.headers?.["content-length"])??X.bodyLengthChecker?.(Q.body)??1/0)>=X.expectContinueHeader}catch(W){}else J=!!X.expectContinueHeader;if(J)Q.headers.Expect="100-continue"}return Y({...G,request:Q})}}var ze4,Ln5,Oe4=(X)=>({applyToStack:(Y)=>{Y.add(wn5(X),Ln5)}});var De4=D(()=>{ze4=Y1(u7(),1);Ln5={step:"build",tags:["SET_EXPECT_HEADER","EXPECT_HEADER"],name:"addExpectContinueMiddleware",override:!0}});var wH,kA1,_j,CA1,E9,we4,MX1;var LH=D(()=>{wH={WHEN_SUPPORTED:"WHEN_SUPPORTED",WHEN_REQUIRED:"WHEN_REQUIRED"},kA1=wH.WHEN_SUPPORTED,_j={WHEN_SUPPORTED:"WHEN_SUPPORTED",WHEN_REQUIRED:"WHEN_REQUIRED"},CA1=wH.WHEN_SUPPORTED;(function(X){X.MD5="MD5",X.CRC32="CRC32",X.CRC32C="CRC32C",X.CRC64NVME="CRC64NVME",X.SHA1="SHA1",X.SHA256="SHA256"})(E9||(E9={}));(function(X){X.HEADER="header",X.TRAILER="trailer"})(we4||(we4={}));MX1=E9.CRC32});var Rq,ot=(X,Y,G,Q)=>{if(!(Y in X))return;let J=X[Y].toUpperCase();if(!Object.values(G).includes(J))throw TypeError(`Cannot load ${Q} '${Y}'. Expected one of ${Object.values(G)}, got '${X[Y]}'.`);return J};var NN0=D(()=>{(function(X){X.ENV="env",X.CONFIG="shared config entry"})(Rq||(Rq={}))});var En5="AWS_REQUEST_CHECKSUM_CALCULATION",Pn5="request_checksum_calculation",Le4;var Ee4=D(()=>{LH();NN0();Le4={environmentVariableSelector:(X)=>ot(X,En5,wH,Rq.ENV),configFileSelector:(X)=>ot(X,Pn5,wH,Rq.CONFIG),default:kA1}});var qn5="AWS_RESPONSE_CHECKSUM_VALIDATION",An5="response_checksum_validation",Pe4;var qe4=D(()=>{LH();NN0();Pe4={environmentVariableSelector:(X)=>ot(X,qn5,_j,Rq.ENV),configFileSelector:(X)=>ot(X,An5,_j,Rq.CONFIG),default:CA1}});var ON0=k((vn5)=>{var Tn5=["AuthFailure","InvalidSignatureException","RequestExpired","RequestInTheFuture","RequestTimeTooSkewed","SignatureDoesNotMatch"],In5=["BandwidthLimitExceeded","EC2ThrottledException","LimitExceededException","PriorRequestNotComplete","ProvisionedThroughputExceededException","RequestLimitExceeded","RequestThrottled","RequestThrottledException","SlowDown","ThrottledException","Throttling","ThrottlingException","TooManyRequestsException","TransactionInProgressException"],Vn5=["TimeoutError","RequestTimeout","RequestTimeoutException"],jn5=[500,502,503,504],Mn5=["ECONNRESET","ECONNREFUSED","EPIPE","ETIMEDOUT"],Rn5=["EHOSTUNREACH","ENETUNREACH","ENOTFOUND"],Ae4=(X)=>X?.$retryable!==void 0,Sn5=(X)=>Tn5.includes(X.name),Te4=(X)=>X.$metadata?.clockSkewCorrected,Ie4=(X)=>{let Y=new Set(["Failed to fetch","NetworkError when attempting to fetch resource","The Internet connection appears to be offline","Load failed","Network request failed"]);if(!(X&&X instanceof TypeError))return!1;return Y.has(X.message)},kn5=(X)=>X.$metadata?.httpStatusCode===429||In5.includes(X.name)||X.$retryable?.throttling==!0,zN0=(X,Y=0)=>Ae4(X)||Te4(X)||X.name==="InvalidSignatureException"&&X.message?.includes("Signature expired")||Vn5.includes(X.name)||Mn5.includes(X?.code||"")||Rn5.includes(X?.code||"")||jn5.includes(X.$metadata?.httpStatusCode||0)||Ie4(X)||Ve4(X)||X.cause!==void 0&&Y<=10&&zN0(X.cause,Y+1),Cn5=(X)=>{if(X.$metadata?.httpStatusCode!==void 0){let Y=X.$metadata.httpStatusCode;if(500<=Y&&Y<=599&&!zN0(X))return!0;return!1}return!1};function Ve4(X){return X.code==="ERR_HTTP2_STREAM_ERROR"&&X.message.includes("NGHTTP2_REFUSED_STREAM")}vn5.isBrowserNetworkError=Ie4;vn5.isClockSkewCorrectedError=Te4;vn5.isClockSkewError=Sn5;vn5.isNodeJsHttp2TransientError=Ve4;vn5.isRetryableByTrait=Ae4;vn5.isServerError=Cn5;vn5.isThrottlingError=kn5;vn5.isTransientError=zN0});var Dw=k((an5)=>{var ln5=ON0();an5.RETRY_MODES=void 0;(function(X){X.STANDARD="standard",X.ADAPTIVE="adaptive"})(an5.RETRY_MODES||(an5.RETRY_MODES={}));var _A1=3,mn5=an5.RETRY_MODES.STANDARD;class fA1{static setTimeoutFn=setTimeout;beta;minCapacity;minFillRate;scaleConstant;smooth;enabled=!1;availableTokens=0;lastMaxRate=0;measuredTxRate=0;requestCount=0;fillRate;lastThrottleTime;lastTimestamp=0;lastTxRateBucket;maxCapacity;timeWindow=0;constructor(X){this.beta=X?.beta??0.7,this.minCapacity=X?.minCapacity??1,this.minFillRate=X?.minFillRate??0.5,this.scaleConstant=X?.scaleConstant??0.4,this.smooth=X?.smooth??0.8,this.lastThrottleTime=this.getCurrentTimeInSeconds(),this.lastTxRateBucket=Math.floor(this.getCurrentTimeInSeconds()),this.fillRate=this.minFillRate,this.maxCapacity=this.minCapacity}async getSendToken(){return this.acquireTokenBucket(1)}updateClientSendingRate(X){let Y;this.updateMeasuredRate();let G=X;if(G?.errorType==="THROTTLING"||ln5.isThrottlingError(G?.error??X)){let W=!this.enabled?this.measuredTxRate:Math.min(this.measuredTxRate,this.fillRate);this.lastMaxRate=W,this.calculateTimeWindow(),this.lastThrottleTime=this.getCurrentTimeInSeconds(),Y=this.cubicThrottle(W),this.enableTokenBucket()}else this.calculateTimeWindow(),Y=this.cubicSuccess(this.getCurrentTimeInSeconds());let J=Math.min(Y,2*this.measuredTxRate);this.updateTokenBucketRate(J)}getCurrentTimeInSeconds(){return Date.now()/1000}async acquireTokenBucket(X){if(!this.enabled)return;if(this.refillTokenBucket(),X>this.availableTokens){let Y=(X-this.availableTokens)/this.fillRate*1000;await new Promise((G)=>fA1.setTimeoutFn(G,Y))}this.availableTokens=this.availableTokens-X}refillTokenBucket(){let X=this.getCurrentTimeInSeconds();if(!this.lastTimestamp){this.lastTimestamp=X;return}let Y=(X-this.lastTimestamp)*this.fillRate;this.availableTokens=Math.min(this.maxCapacity,this.availableTokens+Y),this.lastTimestamp=X}calculateTimeWindow(){this.timeWindow=this.getPrecise(Math.pow(this.lastMaxRate*(1-this.beta)/this.scaleConstant,0.3333333333333333))}cubicThrottle(X){return this.getPrecise(X*this.beta)}cubicSuccess(X){return this.getPrecise(this.scaleConstant*Math.pow(X-this.lastThrottleTime-this.timeWindow,3)+this.lastMaxRate)}enableTokenBucket(){this.enabled=!0}updateTokenBucketRate(X){this.refillTokenBucket(),this.fillRate=Math.max(X,this.minFillRate),this.maxCapacity=Math.max(X,this.minCapacity),this.availableTokens=Math.min(this.availableTokens,this.maxCapacity)}updateMeasuredRate(){let X=this.getCurrentTimeInSeconds(),Y=Math.floor(X*2)/2;if(this.requestCount++,Y>this.lastTxRateBucket){let G=this.requestCount/(Y-this.lastTxRateBucket);this.measuredTxRate=this.getPrecise(G*this.smooth+this.measuredTxRate*(1-this.smooth)),this.requestCount=0,this.lastTxRateBucket=Y}}getPrecise(X){return parseFloat(X.toFixed(8))}}var dn5=100,LN0=20000,cn5=500,DN0=500,in5=5,pn5=10,je4=1,nn5="amz-sdk-invocation-id",tn5="amz-sdk-request";class eQ{static v2026=typeof process<"u"&&process.env?.SMITHY_NEW_RETRIES_2026==="true";static delay(){return eQ.v2026?50:100}static throttlingDelay(){return eQ.v2026?1000:500}static cost(){return eQ.v2026?14:5}static throttlingCost(){return eQ.v2026?5:10}static modifiedCostType(){return eQ.v2026?"THROTTLING":"TRANSIENT"}}class Me4{x=eQ.delay();computeNextBackoffDelay(X){let Y=Math.random(),G=2,Q=Y*Math.min(this.x*2**X,LN0);return Math.floor(Q)}setDelayBase(X){this.x=X}}class wN0{delay;count;cost;longPoll;constructor(X,Y,G,Q){this.delay=X,this.count=Y,this.cost=G,this.longPoll=Q}getRetryCount(){return this.count}getRetryDelay(){return Math.min(LN0,this.delay)}getRetryCost(){return this.cost}isLongPoll(){return this.longPoll}}var vA1={incompatible:1,attempts:2,capacity:3};class RX1{mode=an5.RETRY_MODES.STANDARD;capacity=DN0;retryBackoffStrategy;maxAttemptsProvider;baseDelay;constructor(X){if(typeof X==="number")this.maxAttemptsProvider=async()=>X;else if(typeof X==="function")this.maxAttemptsProvider=X;else if(X&&typeof X==="object")this.maxAttemptsProvider=async()=>X.maxAttempts,this.baseDelay=X.baseDelay,this.retryBackoffStrategy=X.backoff;this.maxAttemptsProvider??=async()=>_A1,this.baseDelay??=eQ.delay(),this.retryBackoffStrategy??=new Me4}async acquireInitialRetryToken(X){return new wN0(eQ.delay(),0,void 0,eQ.v2026&&X.includes(":longpoll"))}async refreshRetryTokenForRetry(X,Y){let G=await this.getMaxAttempts(),Q=this.retryCode(X,Y,G),J=Q===0,W=X.isLongPoll?.();if(J||W){let Z=Y.errorType;this.retryBackoffStrategy.setDelayBase(Z==="THROTTLING"?eQ.throttlingDelay():this.baseDelay);let $=this.retryBackoffStrategy.computeNextBackoffDelay(X.getRetryCount()),K=$;if(Y.retryAfterHint instanceof Date)K=Math.max($,Math.min(Y.retryAfterHint.getTime()-Date.now(),$+5000));if(!J)throw Object.assign(Error("No retry token available"),{$backoff:eQ.v2026&&Q===vA1.capacity&&W?K:0});else{let H=this.getCapacityCost(Z);return this.capacity-=H,new wN0(K,X.getRetryCount()+1,H,X.isLongPoll?.()??!1)}}throw Error("No retry token available")}recordSuccess(X){this.capacity=Math.min(DN0,this.capacity+(X.getRetryCost()??je4))}getCapacity(){return this.capacity}async maxAttempts(){return this.maxAttemptsProvider()}async getMaxAttempts(){try{return await this.maxAttemptsProvider()}catch(X){return console.warn(`Max attempts provider could not resolve. Using default of ${_A1}`),_A1}}retryCode(X,Y,G){let Q=X.getRetryCount()+1,J=this.isRetryableError(Y.errorType)?0:vA1.incompatible,W=Q<G?0:vA1.attempts,Z=this.capacity>=this.getCapacityCost(Y.errorType)?0:vA1.capacity;return J||W||Z}getCapacityCost(X){return X===eQ.modifiedCostType()?eQ.throttlingCost():eQ.cost()}isRetryableError(X){return X==="THROTTLING"||X==="TRANSIENT"}}class Re4{mode=an5.RETRY_MODES.ADAPTIVE;rateLimiter;standardRetryStrategy;constructor(X,Y){let{rateLimiter:G}=Y??{};this.rateLimiter=G??new fA1,this.standardRetryStrategy=Y?new RX1({maxAttempts:typeof X==="number"?X:3,...Y}):new RX1(X)}async acquireInitialRetryToken(X){return await this.rateLimiter.getSendToken(),this.standardRetryStrategy.acquireInitialRetryToken(X)}async refreshRetryTokenForRetry(X,Y){return this.rateLimiter.updateClientSendingRate(Y),this.standardRetryStrategy.refreshRetryTokenForRetry(X,Y)}recordSuccess(X){this.rateLimiter.updateClientSendingRate({}),this.standardRetryStrategy.recordSuccess(X)}async maxAttemptsProvider(){return this.standardRetryStrategy.maxAttempts()}}class Se4 extends RX1{computeNextBackoffDelay;constructor(X,Y=eQ.delay()){super(typeof X==="function"?X:async()=>X);if(typeof Y==="number")this.computeNextBackoffDelay=()=>Y;else this.computeNextBackoffDelay=Y}async refreshRetryTokenForRetry(X,Y){let G=await super.refreshRetryTokenForRetry(X,Y);return G.getRetryDelay=()=>this.computeNextBackoffDelay(G.getRetryCount()),G}}an5.AdaptiveRetryStrategy=Re4;an5.ConfiguredRetryStrategy=Se4;an5.DEFAULT_MAX_ATTEMPTS=_A1;an5.DEFAULT_RETRY_DELAY_BASE=dn5;an5.DEFAULT_RETRY_MODE=mn5;an5.DefaultRateLimiter=fA1;an5.INITIAL_RETRY_TOKENS=DN0;an5.INVOCATION_ID_HEADER=nn5;an5.MAXIMUM_RETRY_DELAY=LN0;an5.NO_RETRY_INCREMENT=je4;an5.REQUEST_HEADER=tn5;an5.RETRY_COST=in5;an5.Retry=eQ;an5.StandardRetryStrategy=RX1;an5.THROTTLING_RETRY_DELAY_BASE=cn5;an5.TIMEOUT_RETRY_COST=pn5});var WX=k((Pt5)=>{var Bt5=Dw(),EN0={warningEmitted:!1},Nt5=(X)=>{if(X&&!EN0.warningEmitted&&parseInt(X.substring(1,X.indexOf(".")))<20)EN0.warningEmitted=!0,process.emitWarning(`NodeDeprecationWarning: The AWS SDK for JavaScript (v3) will
|
|
1627
1627
|
no longer support Node.js ${X} in January 2026.
|
|
1628
1628
|
|
|
1629
1629
|
To continue receiving updates to AWS services, bug fixes, and security
|
|
@@ -7235,6 +7235,16 @@ Bun.serve({
|
|
|
7235
7235
|
process.on("SIGTERM", () => {
|
|
7236
7236
|
taskManager.shutdown();
|
|
7237
7237
|
appService.shutdown();
|
|
7238
|
+
const branch = store.read()?.git?.repository?.branch;
|
|
7239
|
+
if (branch) {
|
|
7240
|
+
try {
|
|
7241
|
+
gitSync(["add", "-A"], { cwd: bootConfig.repoDir });
|
|
7242
|
+
gitSync(["commit", "--allow-empty", "-m", "autosave"], {
|
|
7243
|
+
cwd: bootConfig.repoDir
|
|
7244
|
+
});
|
|
7245
|
+
gitSync(["push", "origin", branch], { cwd: bootConfig.repoDir });
|
|
7246
|
+
} catch {}
|
|
7247
|
+
}
|
|
7238
7248
|
try {
|
|
7239
7249
|
if (existsSync4(join5(CONFIG_DIR, CONFIG_FILENAME))) {}
|
|
7240
7250
|
unlinkSync4(join5(CONFIG_DIR, "config.json.tmp"));
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
Check if the character represented by a given [Unicode code point](https://en.wikipedia.org/wiki/Code_point) is [fullwidth](https://en.wikipedia.org/wiki/Halfwidth_and_fullwidth_forms).
|
|
3
|
+
|
|
4
|
+
@param codePoint - The [code point](https://en.wikipedia.org/wiki/Code_point) of a character.
|
|
5
|
+
|
|
6
|
+
@example
|
|
7
|
+
```
|
|
8
|
+
import isFullwidthCodePoint from 'is-fullwidth-code-point';
|
|
9
|
+
|
|
10
|
+
isFullwidthCodePoint('谢'.codePointAt(0));
|
|
11
|
+
//=> true
|
|
12
|
+
|
|
13
|
+
isFullwidthCodePoint('a'.codePointAt(0));
|
|
14
|
+
//=> false
|
|
15
|
+
```
|
|
16
|
+
*/
|
|
17
|
+
export default function isFullwidthCodePoint(codePoint: number): boolean;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import {
|
|
2
|
+
_isFullWidth as isFullWidth,
|
|
3
|
+
_isWide as isWide,
|
|
4
|
+
} from 'get-east-asian-width';
|
|
5
|
+
|
|
6
|
+
export default function isFullwidthCodePoint(codePoint) {
|
|
7
|
+
if (!Number.isInteger(codePoint)) {
|
|
8
|
+
return false;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
return isFullWidth(codePoint) || isWide(codePoint);
|
|
12
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (https://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,53 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "is-fullwidth-code-point",
|
|
3
|
+
"version": "5.1.0",
|
|
4
|
+
"description": "Check if the character represented by a given Unicode code point is fullwidth",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"repository": "sindresorhus/is-fullwidth-code-point",
|
|
7
|
+
"funding": "https://github.com/sponsors/sindresorhus",
|
|
8
|
+
"author": {
|
|
9
|
+
"name": "Sindre Sorhus",
|
|
10
|
+
"email": "sindresorhus@gmail.com",
|
|
11
|
+
"url": "https://sindresorhus.com"
|
|
12
|
+
},
|
|
13
|
+
"type": "module",
|
|
14
|
+
"exports": {
|
|
15
|
+
"types": "./index.d.ts",
|
|
16
|
+
"default": "./index.js"
|
|
17
|
+
},
|
|
18
|
+
"sideEffects": false,
|
|
19
|
+
"engines": {
|
|
20
|
+
"node": ">=18"
|
|
21
|
+
},
|
|
22
|
+
"scripts": {
|
|
23
|
+
"test": "xo && ava && tsd"
|
|
24
|
+
},
|
|
25
|
+
"files": [
|
|
26
|
+
"index.js",
|
|
27
|
+
"index.d.ts"
|
|
28
|
+
],
|
|
29
|
+
"keywords": [
|
|
30
|
+
"fullwidth",
|
|
31
|
+
"full-width",
|
|
32
|
+
"full",
|
|
33
|
+
"width",
|
|
34
|
+
"unicode",
|
|
35
|
+
"character",
|
|
36
|
+
"string",
|
|
37
|
+
"codepoint",
|
|
38
|
+
"code",
|
|
39
|
+
"point",
|
|
40
|
+
"is",
|
|
41
|
+
"detect",
|
|
42
|
+
"check",
|
|
43
|
+
"east-asian-width"
|
|
44
|
+
],
|
|
45
|
+
"devDependencies": {
|
|
46
|
+
"ava": "^5.3.1",
|
|
47
|
+
"tsd": "^0.29.0",
|
|
48
|
+
"xo": "^0.56.0"
|
|
49
|
+
},
|
|
50
|
+
"dependencies": {
|
|
51
|
+
"get-east-asian-width": "^1.3.1"
|
|
52
|
+
}
|
|
53
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# is-fullwidth-code-point
|
|
2
|
+
|
|
3
|
+
> Check if the character represented by a given [Unicode code point](https://en.wikipedia.org/wiki/Code_point) is [fullwidth](https://en.wikipedia.org/wiki/Halfwidth_and_fullwidth_forms)
|
|
4
|
+
|
|
5
|
+
## Install
|
|
6
|
+
|
|
7
|
+
```sh
|
|
8
|
+
npm install is-fullwidth-code-point
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Usage
|
|
12
|
+
|
|
13
|
+
```js
|
|
14
|
+
import isFullwidthCodePoint from 'is-fullwidth-code-point';
|
|
15
|
+
|
|
16
|
+
isFullwidthCodePoint('谢'.codePointAt(0));
|
|
17
|
+
//=> true
|
|
18
|
+
|
|
19
|
+
isFullwidthCodePoint('a'.codePointAt(0));
|
|
20
|
+
//=> false
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
## API
|
|
24
|
+
|
|
25
|
+
### isFullwidthCodePoint(codePoint)
|
|
26
|
+
|
|
27
|
+
#### codePoint
|
|
28
|
+
|
|
29
|
+
Type: `number`
|
|
30
|
+
|
|
31
|
+
The [code point](https://en.wikipedia.org/wiki/Code_point) of a character.
|
|
@@ -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,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
|
+
}
|