viba-cli 0.19.0 → 0.21.0
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/.next/BUILD_ID +1 -1
- package/.next/build-manifest.json +2 -2
- package/.next/fallback-build-manifest.json +2 -2
- package/.next/prerender-manifest.json +3 -3
- package/.next/server/app/_global-error.html +2 -2
- package/.next/server/app/_global-error.rsc +1 -1
- package/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/.next/server/app/_not-found.html +1 -1
- package/.next/server/app/_not-found.rsc +2 -2
- package/.next/server/app/_not-found.segments/_full.segment.rsc +2 -2
- package/.next/server/app/_not-found.segments/_head.segment.rsc +1 -1
- package/.next/server/app/_not-found.segments/_index.segment.rsc +2 -2
- package/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
- package/.next/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
- package/.next/server/app/_not-found.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/credentials/page/server-reference-manifest.json +4 -4
- package/.next/server/app/credentials/page.js.nft.json +1 -1
- package/.next/server/app/credentials/page_client-reference-manifest.js +1 -1
- package/.next/server/app/credentials.html +1 -1
- package/.next/server/app/credentials.rsc +3 -3
- package/.next/server/app/credentials.segments/_full.segment.rsc +3 -3
- package/.next/server/app/credentials.segments/_head.segment.rsc +1 -1
- package/.next/server/app/credentials.segments/_index.segment.rsc +2 -2
- package/.next/server/app/credentials.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/credentials.segments/credentials/__PAGE__.segment.rsc +2 -2
- package/.next/server/app/credentials.segments/credentials.segment.rsc +1 -1
- package/.next/server/app/index.html +1 -1
- package/.next/server/app/index.rsc +3 -3
- package/.next/server/app/index.segments/__PAGE__.segment.rsc +2 -2
- package/.next/server/app/index.segments/_full.segment.rsc +3 -3
- package/.next/server/app/index.segments/_head.segment.rsc +1 -1
- package/.next/server/app/index.segments/_index.segment.rsc +2 -2
- package/.next/server/app/index.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/new/page/server-reference-manifest.json +24 -24
- package/.next/server/app/new/page.js.nft.json +1 -1
- package/.next/server/app/new/page_client-reference-manifest.js +1 -1
- package/.next/server/app/page/server-reference-manifest.json +24 -24
- package/.next/server/app/page.js.nft.json +1 -1
- package/.next/server/app/page_client-reference-manifest.js +1 -1
- package/.next/server/app/session/[sessionId]/page/server-reference-manifest.json +20 -20
- package/.next/server/app/session/[sessionId]/page.js.nft.json +1 -1
- package/.next/server/app/session/[sessionId]/page_client-reference-manifest.js +1 -1
- package/.next/server/chunks/[root-of-the-server]__c6a126af._.js +65 -1
- package/.next/server/chunks/[root-of-the-server]__c6a126af._.js.map +1 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__213d5b40._.js +1 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__213d5b40._.js.map +1 -1
- package/.next/server/chunks/ssr/{[root-of-the-server]__d07cf0e3._.js → [root-of-the-server]__284fa850._.js} +2 -2
- package/.next/server/chunks/ssr/{[root-of-the-server]__d07cf0e3._.js.map → [root-of-the-server]__284fa850._.js.map} +1 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__319c1c59._.js +1 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__319c1c59._.js.map +1 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__352d2b3c._.js +1 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__3e7d3e82._.js +1 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__3e7d3e82._.js.map +1 -1
- package/.next/server/chunks/ssr/{[root-of-the-server]__4a339c8f._.js → [root-of-the-server]__7f8cd2b9._.js} +2 -2
- package/.next/server/chunks/ssr/{[root-of-the-server]__4a339c8f._.js.map → [root-of-the-server]__7f8cd2b9._.js.map} +1 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__8169dd30._.js +3 -0
- package/.next/server/chunks/ssr/{[root-of-the-server]__0d6c1eaa._.js.map → [root-of-the-server]__8169dd30._.js.map} +1 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__9201693f._.js +1 -1
- package/.next/server/chunks/ssr/{[root-of-the-server]__465506fb._.js → [root-of-the-server]__d5706047._.js} +2 -2
- package/.next/server/chunks/ssr/{[root-of-the-server]__465506fb._.js.map → [root-of-the-server]__d5706047._.js.map} +1 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__ee9c5185._.js +1 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__ee9c5185._.js.map +1 -1
- package/.next/server/chunks/ssr/src_app_session_[sessionId]_SessionPageClient_tsx_dab490d7._.js +1 -1
- package/.next/server/chunks/ssr/src_app_session_[sessionId]_SessionPageClient_tsx_dab490d7._.js.map +1 -1
- package/.next/server/chunks/ssr/src_components_GitRepoSelector_tsx_05c81afa._.js +2 -2
- package/.next/server/chunks/ssr/src_components_GitRepoSelector_tsx_05c81afa._.js.map +1 -1
- package/.next/server/pages/404.html +1 -1
- package/.next/server/pages/500.html +2 -2
- package/.next/server/server-reference-manifest.js +1 -1
- package/.next/server/server-reference-manifest.json +43 -43
- package/.next/static/chunks/{3ccb056bb06defd9.css → 16f42a25676d2900.css} +1 -1
- package/.next/static/chunks/{6a155eddb97350ad.js → 1891e07f938de79e.js} +3 -3
- package/.next/static/chunks/{a1db4a7daf17246a.js → 32cdf7e667231c75.js} +1 -1
- package/.next/static/chunks/{23ea6e0c3ec36f45.js → 5f3a2db85aacc485.js} +2 -2
- package/.next/static/chunks/{abf75d4c9646daac.js → b453010d797f0f5c.js} +1 -1
- package/.next/static/chunks/c76f31165986fed7.js +1 -0
- package/.next/static/chunks/d8a68fb48b3718f5.js +3 -0
- package/package.json +1 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__0d6c1eaa._.js +0 -3
- package/.next/static/chunks/5a698c283b43c75e.js +0 -1
- package/.next/static/chunks/9b14e927da55903f.js +0 -3
- /package/.next/static/{OvVVXN8N9S6UXr-F40y-W → a3AUzSUWZmXcIvA31ymCS}/_buildManifest.js +0 -0
- /package/.next/static/{OvVVXN8N9S6UXr-F40y-W → a3AUzSUWZmXcIvA31ymCS}/_clientMiddlewareManifest.json +0 -0
- /package/.next/static/{OvVVXN8N9S6UXr-F40y-W → a3AUzSUWZmXcIvA31ymCS}/_ssgManifest.js +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../node_modules/next/src/server/route-modules/app-page/vendored/ssr/react.ts","../../../../node_modules/next/src/server/route-modules/app-page/vendored/ssr/react-dom.ts","../../../../node_modules/next/src/server/route-modules/app-page/vendored/ssr/react-server-dom-turbopack-client.ts","../../../../node_modules/next/src/server/route-modules/app-page/vendored/contexts/app-router-context.ts","../../../../node_modules/next/src/server/route-modules/app-page/vendored/contexts/hooks-client-context.ts","../../../../node_modules/next/src/server/route-modules/app-page/vendored/contexts/server-inserted-html.ts","../../../../node_modules/next/src/server/route-modules/app-page/module.compiled.js","../../../../node_modules/next/src/server/route-modules/app-page/vendored/ssr/react-jsx-runtime.ts","turbopack:///[project]/src/data/agent-providers.json","../../../../node_modules/lucide-react/src/icons/key-round.ts","../../../../src/app/actions/data%3Abdd875%20%3Ctext/javascript%3E","../../../../node_modules/lucide-react/src/icons/plus.ts","../../../../node_modules/lucide-react/src/icons/git-branch.ts","../../../../node_modules/lucide-react/src/icons/play.ts","../../../../node_modules/lucide-react/src/icons/external-link.ts","../../../../src/app/actions/data%3A0edf61%20%3Ctext/javascript%3E","../../../../src/hooks/useDialogKeyboardShortcuts.ts","../../../../src/lib/path.ts","../../../../node_modules/lucide-react/src/icons/folder.ts","../../../../src/app/actions/data%3A2b0960%20%3Ctext/javascript%3E","../../../../src/app/actions/data%3A75bdd1%20%3Ctext/javascript%3E","../../../../src/app/actions/data%3A6dc37f%20%3Ctext/javascript%3E","../../../../src/app/actions/data%3Aa6f299%20%3Ctext/javascript%3E","../../../../src/lib/session-updates.ts","../../../../src/app/page.tsx"],"sourcesContent":["module.exports = (\n require('../../module.compiled') as typeof import('../../module.compiled')\n).vendored['react-ssr']!.React\n","module.exports = (\n require('../../module.compiled') as typeof import('../../module.compiled')\n).vendored['react-ssr']!.ReactDOM\n","module.exports = (\n require('../../module.compiled') as typeof import('../../module.compiled')\n).vendored['react-ssr']!.ReactServerDOMTurbopackClient\n","module.exports = (\n require('../../module.compiled') as typeof import('../../module.compiled')\n).vendored['contexts'].AppRouterContext\n","module.exports = (\n require('../../module.compiled') as typeof import('../../module.compiled')\n).vendored['contexts'].HooksClientContext\n","module.exports = (\n require('../../module.compiled') as typeof import('../../module.compiled')\n).vendored['contexts'].ServerInsertedHtml\n","if (process.env.NEXT_RUNTIME === 'edge') {\n module.exports = require('next/dist/server/route-modules/app-page/module.js')\n} else {\n if (process.env.__NEXT_EXPERIMENTAL_REACT) {\n if (process.env.NODE_ENV === 'development') {\n if (process.env.TURBOPACK) {\n module.exports = require('next/dist/compiled/next-server/app-page-turbo-experimental.runtime.dev.js')\n } else {\n module.exports = require('next/dist/compiled/next-server/app-page-experimental.runtime.dev.js')\n }\n } else {\n if (process.env.TURBOPACK) {\n module.exports = require('next/dist/compiled/next-server/app-page-turbo-experimental.runtime.prod.js')\n } else {\n module.exports = require('next/dist/compiled/next-server/app-page-experimental.runtime.prod.js')\n }\n }\n } else {\n if (process.env.NODE_ENV === 'development') {\n if (process.env.TURBOPACK) {\n module.exports = require('next/dist/compiled/next-server/app-page-turbo.runtime.dev.js')\n } else {\n module.exports = require('next/dist/compiled/next-server/app-page.runtime.dev.js')\n }\n } else {\n if (process.env.TURBOPACK) {\n module.exports = require('next/dist/compiled/next-server/app-page-turbo.runtime.prod.js')\n } else {\n module.exports = require('next/dist/compiled/next-server/app-page.runtime.prod.js')\n }\n }\n }\n}\n","module.exports = (\n require('../../module.compiled') as typeof import('../../module.compiled')\n).vendored['react-ssr']!.ReactJsxRuntime\n","[{\"name\":\"Codex\",\"cli\":\"codex\",\"description\":\"OpenAI's specialized models for agentic coding and deep reasoning.\",\"models\":[{\"id\":\"gpt-5.3-codex\",\"label\":\"GPT-5.3 Codex\",\"description\":\"Latest frontier agentic coding model.\"},{\"id\":\"gpt-5.2-codex\",\"label\":\"GPT-5.2 Codex\",\"description\":\"Frontier agentic coding model.\"},{\"id\":\"gpt-5.1-codex-max\",\"label\":\"GPT-5.1 Codex Max\",\"description\":\"Codex-optimized flagship for deep and fast reasoning.\"},{\"id\":\"gpt-5.2\",\"label\":\"GPT-5.2\",\"description\":\"Latest frontier model with improvements across knowledge, reasoning and coding\"},{\"id\":\"gpt-5.1-codex-mini\",\"label\":\"GPT-5.1 Codex Mini\",\"description\":\"Optimized for codex. Cheaper, faster, but less capable.\"}]},{\"name\":\"Gemini\",\"cli\":\"gemini\",\"description\":\"Google's powerful multimodal models with large context windows.\",\"models\":[{\"id\":\"gemini-3-pro-preview\",\"label\":\"Gemini 3 Pro Preview\",\"description\":\"Google's most capable model for complex reasoning and coding tasks.\"},{\"id\":\"gemini-3-flash-preview\",\"label\":\"Gemini 3 Flash Preview\",\"description\":\"Fast and efficient model optimized for speed and low latency.\"},{\"id\":\"gemini-2.5-pro\",\"label\":\"Gemini 2.5 Pro\",\"description\":\"High-performance model with excellent reasoning capabilities.\"},{\"id\":\"gemini-2.5-flash\",\"label\":\"Gemini 2.5 Flash\",\"description\":\"Streamlined model for quick responses and iterative tasks.\"},{\"id\":\"gemini-2.5-flash-lite\",\"label\":\"Gemini 2.5 Flash Lite\",\"description\":\"Optimized for extreme speed and cost efficiency.\"}]},{\"name\":\"Cursor Agent\",\"cli\":\"agent\",\"description\":\"Integrated agentic experience powered by Claude and GPT models.\",\"models\":[{\"id\":\"auto\",\"label\":\"Auto\"},{\"id\":\"composer-1.5\",\"label\":\"Composer 1.5\"},{\"id\":\"composer-1\",\"label\":\"Composer 1\"},{\"id\":\"gpt-5.3-codex\",\"label\":\"GPT-5.3 Codex\"},{\"id\":\"gpt-5.3-codex-low\",\"label\":\"GPT-5.3 Codex Low\"},{\"id\":\"gpt-5.3-codex-high\",\"label\":\"GPT-5.3 Codex High\"},{\"id\":\"gpt-5.3-codex-xhigh\",\"label\":\"GPT-5.3 Codex Extra High\"},{\"id\":\"gpt-5.3-codex-fast\",\"label\":\"GPT-5.3 Codex Fast\"},{\"id\":\"gpt-5.3-codex-low-fast\",\"label\":\"GPT-5.3 Codex Low Fast\"},{\"id\":\"gpt-5.3-codex-high-fast\",\"label\":\"GPT-5.3 Codex High Fast\"},{\"id\":\"gpt-5.3-codex-xhigh-fast\",\"label\":\"GPT-5.3 Codex Extra High Fast\"},{\"id\":\"gpt-5.2\",\"label\":\"GPT-5.2\"},{\"id\":\"gpt-5.2-codex\",\"label\":\"GPT-5.2 Codex\"},{\"id\":\"gpt-5.2-codex-high\",\"label\":\"GPT-5.2 Codex High\"},{\"id\":\"gpt-5.2-codex-low\",\"label\":\"GPT-5.2 Codex Low\"},{\"id\":\"gpt-5.2-codex-xhigh\",\"label\":\"GPT-5.2 Codex Extra High\"},{\"id\":\"gpt-5.2-codex-fast\",\"label\":\"GPT-5.2 Codex Fast\"},{\"id\":\"gpt-5.2-codex-high-fast\",\"label\":\"GPT-5.2 Codex High Fast\"},{\"id\":\"gpt-5.2-codex-low-fast\",\"label\":\"GPT-5.2 Codex Low Fast\"},{\"id\":\"gpt-5.2-codex-xhigh-fast\",\"label\":\"GPT-5.2 Codex Extra High Fast\"},{\"id\":\"gpt-5.1-codex-max\",\"label\":\"GPT-5.1 Codex Max\"},{\"id\":\"gpt-5.1-codex-max-high\",\"label\":\"GPT-5.1 Codex Max High\"},{\"id\":\"opus-4.6-thinking\",\"label\":\"Claude 4.6 Opus (Thinking) (default)\"},{\"id\":\"sonnet-4.5-thinking\",\"label\":\"Claude 4.5 Sonnet (Thinking)\"},{\"id\":\"gpt-5.2-high\",\"label\":\"GPT-5.2 High\"},{\"id\":\"opus-4.6\",\"label\":\"Claude 4.6 Opus\"},{\"id\":\"opus-4.5\",\"label\":\"Claude 4.5 Opus\"},{\"id\":\"opus-4.5-thinking\",\"label\":\"Claude 4.5 Opus (Thinking)\"},{\"id\":\"sonnet-4.5\",\"label\":\"Claude 4.5 Sonnet\"},{\"id\":\"gpt-5.1-high\",\"label\":\"GPT-5.1 High\"},{\"id\":\"gemini-3-pro\",\"label\":\"Gemini 3 Pro\"},{\"id\":\"gemini-3-flash\",\"label\":\"Gemini 3 Flash\"},{\"id\":\"grok\",\"label\":\"Grok\"}]}]","import createLucideIcon from '../createLucideIcon';\nimport { IconNode } from '../types';\n\nexport const __iconNode: IconNode = [\n [\n 'path',\n {\n d: 'M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z',\n key: '1s6t7t',\n },\n ],\n ['circle', { cx: '16.5', cy: '7.5', r: '.5', fill: 'currentColor', key: 'w0ekpg' }],\n];\n\n/**\n * @component @name KeyRound\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview  - https://lucide.dev/icons/key-round\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst KeyRound = createLucideIcon('key-round', __iconNode);\n\nexport default KeyRound;\n","/* __next_internal_action_entry_do_not_use__ [{\"006edcb834638d6a409c75d84a4bb1f2b48b6df3b2\":\"listCredentials\"},\"src/app/actions/credentials.ts\",\"\"] */\"use turbopack no side effects\";import{createServerReference,callServer,findSourceMapURL}from\"private-next-rsc-action-client-wrapper\";const $$RSC_SERVER_ACTION_0=/*#__PURE__*/createServerReference(\"006edcb834638d6a409c75d84a4bb1f2b48b6df3b2\",callServer,void 0,findSourceMapURL,\"listCredentials\");export{$$RSC_SERVER_ACTION_0 as listCredentials};","import createLucideIcon from '../createLucideIcon';\nimport { IconNode } from '../types';\n\nexport const __iconNode: IconNode = [\n ['path', { d: 'M5 12h14', key: '1ays0h' }],\n ['path', { d: 'M12 5v14', key: 's699le' }],\n];\n\n/**\n * @component @name Plus\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview  - https://lucide.dev/icons/plus\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst Plus = createLucideIcon('plus', __iconNode);\n\nexport default Plus;\n","import createLucideIcon from '../createLucideIcon';\nimport { IconNode } from '../types';\n\nexport const __iconNode: IconNode = [\n ['line', { x1: '6', x2: '6', y1: '3', y2: '15', key: '17qcm7' }],\n ['circle', { cx: '18', cy: '6', r: '3', key: '1h7g24' }],\n ['circle', { cx: '6', cy: '18', r: '3', key: 'fqmcym' }],\n ['path', { d: 'M18 9a9 9 0 0 1-9 9', key: 'n2h4wq' }],\n];\n\n/**\n * @component @name GitBranch\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview  - https://lucide.dev/icons/git-branch\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst GitBranch = createLucideIcon('git-branch', __iconNode);\n\nexport default GitBranch;\n","import createLucideIcon from '../createLucideIcon';\nimport { IconNode } from '../types';\n\nexport const __iconNode: IconNode = [\n [\n 'path',\n {\n d: 'M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z',\n key: '10ikf1',\n },\n ],\n];\n\n/**\n * @component @name Play\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview  - https://lucide.dev/icons/play\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst Play = createLucideIcon('play', __iconNode);\n\nexport default Play;\n","import createLucideIcon from '../createLucideIcon';\nimport { IconNode } from '../types';\n\nexport const __iconNode: IconNode = [\n ['path', { d: 'M15 3h6v6', key: '1q9fwt' }],\n ['path', { d: 'M10 14 21 3', key: 'gplh6r' }],\n ['path', { d: 'M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6', key: 'a6xqqp' }],\n];\n\n/**\n * @component @name ExternalLink\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview  - https://lucide.dev/icons/external-link\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst ExternalLink = createLucideIcon('external-link', __iconNode);\n\nexport default ExternalLink;\n","/* __next_internal_action_entry_do_not_use__ [{\"00932efbca78981f6c54a3e5e46b4aaec8a353f6ae\":\"getHomeDirectory\"},\"src/app/actions/git.ts\",\"\"] */\"use turbopack no side effects\";import{createServerReference,callServer,findSourceMapURL}from\"private-next-rsc-action-client-wrapper\";const $$RSC_SERVER_ACTION_0=/*#__PURE__*/createServerReference(\"00932efbca78981f6c54a3e5e46b4aaec8a353f6ae\",callServer,void 0,findSourceMapURL,\"getHomeDirectory\");export{$$RSC_SERVER_ACTION_0 as getHomeDirectory};","import { useEffect } from 'react';\n\ntype UseDialogKeyboardShortcutsOptions = {\n enabled?: boolean;\n onConfirm?: () => void | Promise<unknown>;\n onDismiss: () => void;\n canConfirm?: boolean;\n};\n\nconst isEditableTarget = (target: EventTarget | null): boolean => {\n if (!(target instanceof HTMLElement)) return false;\n const tagName = target.tagName.toUpperCase();\n return tagName === 'INPUT' || tagName === 'TEXTAREA' || tagName === 'SELECT' || target.isContentEditable;\n};\n\nexport function useDialogKeyboardShortcuts({\n enabled = true,\n onConfirm,\n onDismiss,\n canConfirm = true,\n}: UseDialogKeyboardShortcutsOptions) {\n useEffect(() => {\n if (!enabled) return;\n\n const handleKeyDown = (event: KeyboardEvent) => {\n if (event.key === 'Escape') {\n event.preventDefault();\n onDismiss();\n return;\n }\n\n if (event.key !== 'Enter') return;\n if (!onConfirm || !canConfirm) return;\n if (event.defaultPrevented) return;\n if (event.metaKey || event.ctrlKey || event.altKey || event.shiftKey) return;\n if (isEditableTarget(event.target)) return;\n\n event.preventDefault();\n void onConfirm();\n };\n\n window.addEventListener('keydown', handleKeyDown);\n return () => {\n window.removeEventListener('keydown', handleKeyDown);\n };\n }, [enabled, onConfirm, onDismiss, canConfirm]);\n}\n","export function getBaseName(path: string): string {\n if (!path) return '';\n // Support both Windows (\\) and POSIX (/) separators\n // Using a simpler approach to avoid regex escaping issues in some environments\n const normalized = path.replace(/\\\\/g, '/');\n const parts = normalized.split('/');\n // Filter out empty strings which can happen with trailing slashes or absolute paths\n return parts.filter(Boolean).pop() || '';\n}\n\nexport function getDirName(path: string): string {\n if (!path) return '';\n \n // Normalize separators to / for easier processing\n const normalized = path.replace(/\\\\/g, '/');\n \n // Remove trailing slash if it exists (but not if it's the root '/')\n const withoutTrailing = (normalized.length > 1 && normalized.endsWith('/')) \n ? normalized.slice(0, -1) \n : normalized;\n \n const lastIdx = withoutTrailing.lastIndexOf('/');\n \n if (lastIdx === -1) {\n // No separator found. Could be a relative path or a Windows drive root like \"C:\"\n // For \"C:\\\" or \"C:\", we return the normalized version (C:/ or C:)\n if (path.includes(':') && path.length <= 3) return normalized;\n return '.';\n }\n \n if (lastIdx === 0) return '/';\n \n // On Windows, if we're at \"C:/\", lastIdx might be 2.\n if (path.includes(':') && lastIdx === 2) {\n return withoutTrailing.substring(0, 3); // \"C:/\"\n }\n \n return withoutTrailing.substring(0, lastIdx);\n}\n\nexport function isWindowsAbsolutePath(value: string): boolean {\n return /^[a-zA-Z]:[\\\\/]/.test(value);\n}\n","import createLucideIcon from '../createLucideIcon';\nimport { IconNode } from '../types';\n\nexport const __iconNode: IconNode = [\n [\n 'path',\n {\n d: 'M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z',\n key: '1kt360',\n },\n ],\n];\n\n/**\n * @component @name Folder\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview  - https://lucide.dev/icons/folder\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst Folder = createLucideIcon('folder', __iconNode);\n\nexport default Folder;\n","/* __next_internal_action_entry_do_not_use__ [{\"7fd4c4c46dd5412a32f4702da6146cb506ea26cec4\":\"startTtydProcess\"},\"src/app/actions/git.ts\",\"\"] */\"use turbopack no side effects\";import{createServerReference,callServer,findSourceMapURL}from\"private-next-rsc-action-client-wrapper\";const $$RSC_SERVER_ACTION_10=/*#__PURE__*/createServerReference(\"7fd4c4c46dd5412a32f4702da6146cb506ea26cec4\",callServer,void 0,findSourceMapURL,\"startTtydProcess\");export{$$RSC_SERVER_ACTION_10 as startTtydProcess};","/* __next_internal_action_entry_do_not_use__ [{\"7f3c7b8db24eebc1200045e18c6bf25f0612568e56\":\"saveAttachments\"},\"src/app/actions/git.ts\",\"\"] */\"use turbopack no side effects\";import{createServerReference,callServer,findSourceMapURL}from\"private-next-rsc-action-client-wrapper\";const $$RSC_SERVER_ACTION_19=/*#__PURE__*/createServerReference(\"7f3c7b8db24eebc1200045e18c6bf25f0612568e56\",callServer,void 0,findSourceMapURL,\"saveAttachments\");export{$$RSC_SERVER_ACTION_19 as saveAttachments};","/* __next_internal_action_entry_do_not_use__ [{\"0064bbd6227c75dbf903098659aedd84ad0d4e0e53\":\"getConfig\"},\"src/app/actions/config.ts\",\"\"] */\"use turbopack no side effects\";import{createServerReference,callServer,findSourceMapURL}from\"private-next-rsc-action-client-wrapper\";const $$RSC_SERVER_ACTION_0=/*#__PURE__*/createServerReference(\"0064bbd6227c75dbf903098659aedd84ad0d4e0e53\",callServer,void 0,findSourceMapURL,\"getConfig\");export{$$RSC_SERVER_ACTION_0 as getConfig};","/* __next_internal_action_entry_do_not_use__ [{\"408a2152db3e44bd4b023e85e8fa81763f311e16d8\":\"updateConfig\"},\"src/app/actions/config.ts\",\"\"] */\"use turbopack no side effects\";import{createServerReference,callServer,findSourceMapURL}from\"private-next-rsc-action-client-wrapper\";const $$RSC_SERVER_ACTION_2=/*#__PURE__*/createServerReference(\"408a2152db3e44bd4b023e85e8fa81763f311e16d8\",callServer,void 0,findSourceMapURL,\"updateConfig\");export{$$RSC_SERVER_ACTION_2 as updateConfig};","export const SESSIONS_UPDATED_STORAGE_KEY = 'viba:sessions-updated-at';\nexport const SESSIONS_UPDATED_EVENT = 'viba:sessions-updated';\n\nexport function notifySessionsUpdated(): void {\n if (typeof window === 'undefined') return;\n\n try {\n localStorage.setItem(SESSIONS_UPDATED_STORAGE_KEY, new Date().toISOString());\n } catch {\n // Ignore localStorage failures (private mode, quota, etc.)\n }\n\n window.dispatchEvent(new CustomEvent(SESSIONS_UPDATED_EVENT));\n}\n","'use client';\n\nimport Image from \"next/image\";\nimport GitRepoSelector from \"@/components/GitRepoSelector\";\n\nexport default function Home() {\n return (\n <>\n <a\n href=\"https://github.com/m0o0scar/viba\"\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n aria-label=\"Open Viba GitHub repository\"\n className=\"fixed top-0 right-0 z-50 h-20 w-20 cursor-pointer border-l border-b border-gray-400 bg-gray-300/95 shadow-sm backdrop-blur-sm transition-colors hover:bg-gray-500/95\"\n style={{ clipPath: \"polygon(100% 0, 0 0, 100% 100%)\" }}\n >\n <span className=\"absolute left-[67%] top-[33%] -translate-x-1/2 -translate-y-1/2\">\n <Image src=\"/github.png\" alt=\"GitHub\" width={22} height={22} priority className=\"rotate-45\" />\n </span>\n </a>\n <main className=\"flex min-h-screen flex-col items-center justify-center bg-base-100 p-4 md:p-24\">\n <GitRepoSelector mode=\"home\" />\n </main>\n </>\n );\n}\n"],"names":["module","exports","require","vendored","React","ReactDOM","ReactServerDOMTurbopackClient","AppRouterContext","HooksClientContext","ServerInsertedHtml","process","env","NEXT_RUNTIME","__NEXT_EXPERIMENTAL_REACT","NODE_ENV","TURBOPACK","ReactJsxRuntime"],"mappings":"6CAAAA,EAAOC,OAAO,CACZC,EAAQ,CAAA,CAAA,IAAA,GACRC,QAAQ,CAAC,YAAY,CAAEC,KAAK,+BCF9BJ,EAAOC,OAAO,CACZC,EAAQ,CAAA,CAAA,IAAA,GACRC,QAAQ,CAAC,YAAY,CAAEE,QAAQ,8BCFjCL,GAAOC,OAAO,CACZC,EAAQ,CAAA,CAAA,IAAA,GACRC,QAAQ,CAAC,YAAY,CAAEG,6BAA6B,6BCFtDN,GAAOC,OAAO,CACZC,EAAQ,CAAA,CAAA,IAAA,GACRC,QAAQ,CAAC,QAAW,CAACI,gBAAgB,+BCFvCP,EAAOC,OAAO,CACZC,EAAQ,CAAA,CAAA,IAAA,GACRC,QAAQ,CAAC,QAAW,CAACK,kBAAkB,8BCFzCR,GAAOC,OAAO,CACZC,EAAQ,CAAA,CAAA,IAAA,GACRC,QAAQ,CAAC,QAAW,CAACM,kBAAkB,+sBCwBjCT,EAAOC,OAAO,CAAGC,EAAQ,CAAA,CAAA,IAAA,iCC1BjCF,EAAOC,OAAO,CACZC,EAAQ,CAAA,CAAA,IAAA,GACRC,QAAQ,CAAC,YAAY,CAAEa,eAAe,YCFxC,EAAA,CAAA,CAAA,CAAA,CAAA,KAAA,QAAA,IAAA,QAAA,YAAA,qEAAA,OAAA,CAAA,CAAA,GAAA,gBAAA,MAAA,gBAAA,YAAA,uCAAA,EAAA,CAAA,GAAA,gBAAA,MAAA,gBAAA,YAAA,gCAAA,EAAA,CAAA,GAAA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AAK,UAAU,2EACd,CAAA,EAAA,EAAA,GAAA,EAAC,EAAA,OAAK,CAAA,CAAC,IAAI,cAAc,IAAI,SAAS,MAAO,GAAI,OAAQ,GAAI,QAAQ,CAAA,CAAA,EAAC,UAAU,kBAGpF,CAAA,EAAA,EAAA,GAAA,EAAC,OAAA,CAAK,UAAU,0FACd,CAAA,EAAA,EAAA,GAAA,EAAC,EAAA,OAAe,CAAA,CAAC,KAAK,aAI9B","ignoreList":[0,1,2,3,4,5,6,7,9,11,12,13,14,18]}
|
|
1
|
+
{"version":3,"sources":["../../../../node_modules/next/src/server/route-modules/app-page/vendored/ssr/react.ts","../../../../node_modules/next/src/server/route-modules/app-page/vendored/ssr/react-dom.ts","../../../../node_modules/next/src/server/route-modules/app-page/vendored/ssr/react-server-dom-turbopack-client.ts","../../../../node_modules/next/src/server/route-modules/app-page/vendored/contexts/app-router-context.ts","../../../../node_modules/next/src/server/route-modules/app-page/vendored/contexts/hooks-client-context.ts","../../../../node_modules/next/src/server/route-modules/app-page/vendored/contexts/server-inserted-html.ts","../../../../node_modules/next/src/server/route-modules/app-page/module.compiled.js","../../../../node_modules/next/src/server/route-modules/app-page/vendored/ssr/react-jsx-runtime.ts","turbopack:///[project]/src/data/agent-providers.json","../../../../node_modules/lucide-react/src/icons/key-round.ts","../../../../src/app/actions/data%3A929531%20%3Ctext/javascript%3E","../../../../node_modules/lucide-react/src/icons/plus.ts","../../../../node_modules/lucide-react/src/icons/git-branch.ts","../../../../node_modules/lucide-react/src/icons/play.ts","../../../../node_modules/lucide-react/src/icons/external-link.ts","../../../../src/app/actions/data%3A0da981%20%3Ctext/javascript%3E","../../../../src/hooks/useDialogKeyboardShortcuts.ts","../../../../src/lib/path.ts","../../../../node_modules/lucide-react/src/icons/folder.ts","../../../../src/app/actions/data%3Af66433%20%3Ctext/javascript%3E","../../../../src/app/actions/data%3Afd9ca0%20%3Ctext/javascript%3E","../../../../src/app/actions/data%3Aced04d%20%3Ctext/javascript%3E","../../../../src/app/actions/data%3Afd43a8%20%3Ctext/javascript%3E","../../../../src/lib/session-updates.ts","../../../../src/app/page.tsx"],"sourcesContent":["module.exports = (\n require('../../module.compiled') as typeof import('../../module.compiled')\n).vendored['react-ssr']!.React\n","module.exports = (\n require('../../module.compiled') as typeof import('../../module.compiled')\n).vendored['react-ssr']!.ReactDOM\n","module.exports = (\n require('../../module.compiled') as typeof import('../../module.compiled')\n).vendored['react-ssr']!.ReactServerDOMTurbopackClient\n","module.exports = (\n require('../../module.compiled') as typeof import('../../module.compiled')\n).vendored['contexts'].AppRouterContext\n","module.exports = (\n require('../../module.compiled') as typeof import('../../module.compiled')\n).vendored['contexts'].HooksClientContext\n","module.exports = (\n require('../../module.compiled') as typeof import('../../module.compiled')\n).vendored['contexts'].ServerInsertedHtml\n","if (process.env.NEXT_RUNTIME === 'edge') {\n module.exports = require('next/dist/server/route-modules/app-page/module.js')\n} else {\n if (process.env.__NEXT_EXPERIMENTAL_REACT) {\n if (process.env.NODE_ENV === 'development') {\n if (process.env.TURBOPACK) {\n module.exports = require('next/dist/compiled/next-server/app-page-turbo-experimental.runtime.dev.js')\n } else {\n module.exports = require('next/dist/compiled/next-server/app-page-experimental.runtime.dev.js')\n }\n } else {\n if (process.env.TURBOPACK) {\n module.exports = require('next/dist/compiled/next-server/app-page-turbo-experimental.runtime.prod.js')\n } else {\n module.exports = require('next/dist/compiled/next-server/app-page-experimental.runtime.prod.js')\n }\n }\n } else {\n if (process.env.NODE_ENV === 'development') {\n if (process.env.TURBOPACK) {\n module.exports = require('next/dist/compiled/next-server/app-page-turbo.runtime.dev.js')\n } else {\n module.exports = require('next/dist/compiled/next-server/app-page.runtime.dev.js')\n }\n } else {\n if (process.env.TURBOPACK) {\n module.exports = require('next/dist/compiled/next-server/app-page-turbo.runtime.prod.js')\n } else {\n module.exports = require('next/dist/compiled/next-server/app-page.runtime.prod.js')\n }\n }\n }\n}\n","module.exports = (\n require('../../module.compiled') as typeof import('../../module.compiled')\n).vendored['react-ssr']!.ReactJsxRuntime\n","[{\"name\":\"Codex\",\"cli\":\"codex\",\"description\":\"OpenAI's specialized models for agentic coding and deep reasoning.\",\"models\":[{\"id\":\"gpt-5.3-codex\",\"label\":\"GPT-5.3 Codex\",\"description\":\"Latest frontier agentic coding model.\"},{\"id\":\"gpt-5.2-codex\",\"label\":\"GPT-5.2 Codex\",\"description\":\"Frontier agentic coding model.\"},{\"id\":\"gpt-5.1-codex-max\",\"label\":\"GPT-5.1 Codex Max\",\"description\":\"Codex-optimized flagship for deep and fast reasoning.\"},{\"id\":\"gpt-5.2\",\"label\":\"GPT-5.2\",\"description\":\"Latest frontier model with improvements across knowledge, reasoning and coding\"},{\"id\":\"gpt-5.1-codex-mini\",\"label\":\"GPT-5.1 Codex Mini\",\"description\":\"Optimized for codex. Cheaper, faster, but less capable.\"}]},{\"name\":\"Gemini\",\"cli\":\"gemini\",\"description\":\"Google's powerful multimodal models with large context windows.\",\"models\":[{\"id\":\"gemini-3-pro-preview\",\"label\":\"Gemini 3 Pro Preview\",\"description\":\"Google's most capable model for complex reasoning and coding tasks.\"},{\"id\":\"gemini-3-flash-preview\",\"label\":\"Gemini 3 Flash Preview\",\"description\":\"Fast and efficient model optimized for speed and low latency.\"},{\"id\":\"gemini-2.5-pro\",\"label\":\"Gemini 2.5 Pro\",\"description\":\"High-performance model with excellent reasoning capabilities.\"},{\"id\":\"gemini-2.5-flash\",\"label\":\"Gemini 2.5 Flash\",\"description\":\"Streamlined model for quick responses and iterative tasks.\"},{\"id\":\"gemini-2.5-flash-lite\",\"label\":\"Gemini 2.5 Flash Lite\",\"description\":\"Optimized for extreme speed and cost efficiency.\"}]},{\"name\":\"Cursor Agent\",\"cli\":\"agent\",\"description\":\"Integrated agentic experience powered by Claude and GPT models.\",\"models\":[{\"id\":\"auto\",\"label\":\"Auto\"},{\"id\":\"composer-1.5\",\"label\":\"Composer 1.5\"},{\"id\":\"composer-1\",\"label\":\"Composer 1\"},{\"id\":\"gpt-5.3-codex\",\"label\":\"GPT-5.3 Codex\"},{\"id\":\"gpt-5.3-codex-low\",\"label\":\"GPT-5.3 Codex Low\"},{\"id\":\"gpt-5.3-codex-high\",\"label\":\"GPT-5.3 Codex High\"},{\"id\":\"gpt-5.3-codex-xhigh\",\"label\":\"GPT-5.3 Codex Extra High\"},{\"id\":\"gpt-5.3-codex-fast\",\"label\":\"GPT-5.3 Codex Fast\"},{\"id\":\"gpt-5.3-codex-low-fast\",\"label\":\"GPT-5.3 Codex Low Fast\"},{\"id\":\"gpt-5.3-codex-high-fast\",\"label\":\"GPT-5.3 Codex High Fast\"},{\"id\":\"gpt-5.3-codex-xhigh-fast\",\"label\":\"GPT-5.3 Codex Extra High Fast\"},{\"id\":\"gpt-5.2\",\"label\":\"GPT-5.2\"},{\"id\":\"gpt-5.2-codex\",\"label\":\"GPT-5.2 Codex\"},{\"id\":\"gpt-5.2-codex-high\",\"label\":\"GPT-5.2 Codex High\"},{\"id\":\"gpt-5.2-codex-low\",\"label\":\"GPT-5.2 Codex Low\"},{\"id\":\"gpt-5.2-codex-xhigh\",\"label\":\"GPT-5.2 Codex Extra High\"},{\"id\":\"gpt-5.2-codex-fast\",\"label\":\"GPT-5.2 Codex Fast\"},{\"id\":\"gpt-5.2-codex-high-fast\",\"label\":\"GPT-5.2 Codex High Fast\"},{\"id\":\"gpt-5.2-codex-low-fast\",\"label\":\"GPT-5.2 Codex Low Fast\"},{\"id\":\"gpt-5.2-codex-xhigh-fast\",\"label\":\"GPT-5.2 Codex Extra High Fast\"},{\"id\":\"gpt-5.1-codex-max\",\"label\":\"GPT-5.1 Codex Max\"},{\"id\":\"gpt-5.1-codex-max-high\",\"label\":\"GPT-5.1 Codex Max High\"},{\"id\":\"opus-4.6-thinking\",\"label\":\"Claude 4.6 Opus (Thinking) (default)\"},{\"id\":\"sonnet-4.5-thinking\",\"label\":\"Claude 4.5 Sonnet (Thinking)\"},{\"id\":\"gpt-5.2-high\",\"label\":\"GPT-5.2 High\"},{\"id\":\"opus-4.6\",\"label\":\"Claude 4.6 Opus\"},{\"id\":\"opus-4.5\",\"label\":\"Claude 4.5 Opus\"},{\"id\":\"opus-4.5-thinking\",\"label\":\"Claude 4.5 Opus (Thinking)\"},{\"id\":\"sonnet-4.5\",\"label\":\"Claude 4.5 Sonnet\"},{\"id\":\"gpt-5.1-high\",\"label\":\"GPT-5.1 High\"},{\"id\":\"gemini-3-pro\",\"label\":\"Gemini 3 Pro\"},{\"id\":\"gemini-3-flash\",\"label\":\"Gemini 3 Flash\"},{\"id\":\"grok\",\"label\":\"Grok\"}]}]","import createLucideIcon from '../createLucideIcon';\nimport { IconNode } from '../types';\n\nexport const __iconNode: IconNode = [\n [\n 'path',\n {\n d: 'M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z',\n key: '1s6t7t',\n },\n ],\n ['circle', { cx: '16.5', cy: '7.5', r: '.5', fill: 'currentColor', key: 'w0ekpg' }],\n];\n\n/**\n * @component @name KeyRound\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview  - https://lucide.dev/icons/key-round\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst KeyRound = createLucideIcon('key-round', __iconNode);\n\nexport default KeyRound;\n","/* __next_internal_action_entry_do_not_use__ [{\"009a52b5211f7188280192b7f54d2b7d360227dbb3\":\"listCredentials\"},\"src/app/actions/credentials.ts\",\"\"] */\"use turbopack no side effects\";import{createServerReference,callServer,findSourceMapURL}from\"private-next-rsc-action-client-wrapper\";const $$RSC_SERVER_ACTION_0=/*#__PURE__*/createServerReference(\"009a52b5211f7188280192b7f54d2b7d360227dbb3\",callServer,void 0,findSourceMapURL,\"listCredentials\");export{$$RSC_SERVER_ACTION_0 as listCredentials};","import createLucideIcon from '../createLucideIcon';\nimport { IconNode } from '../types';\n\nexport const __iconNode: IconNode = [\n ['path', { d: 'M5 12h14', key: '1ays0h' }],\n ['path', { d: 'M12 5v14', key: 's699le' }],\n];\n\n/**\n * @component @name Plus\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview  - https://lucide.dev/icons/plus\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst Plus = createLucideIcon('plus', __iconNode);\n\nexport default Plus;\n","import createLucideIcon from '../createLucideIcon';\nimport { IconNode } from '../types';\n\nexport const __iconNode: IconNode = [\n ['line', { x1: '6', x2: '6', y1: '3', y2: '15', key: '17qcm7' }],\n ['circle', { cx: '18', cy: '6', r: '3', key: '1h7g24' }],\n ['circle', { cx: '6', cy: '18', r: '3', key: 'fqmcym' }],\n ['path', { d: 'M18 9a9 9 0 0 1-9 9', key: 'n2h4wq' }],\n];\n\n/**\n * @component @name GitBranch\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview  - https://lucide.dev/icons/git-branch\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst GitBranch = createLucideIcon('git-branch', __iconNode);\n\nexport default GitBranch;\n","import createLucideIcon from '../createLucideIcon';\nimport { IconNode } from '../types';\n\nexport const __iconNode: IconNode = [\n [\n 'path',\n {\n d: 'M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z',\n key: '10ikf1',\n },\n ],\n];\n\n/**\n * @component @name Play\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview  - https://lucide.dev/icons/play\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst Play = createLucideIcon('play', __iconNode);\n\nexport default Play;\n","import createLucideIcon from '../createLucideIcon';\nimport { IconNode } from '../types';\n\nexport const __iconNode: IconNode = [\n ['path', { d: 'M15 3h6v6', key: '1q9fwt' }],\n ['path', { d: 'M10 14 21 3', key: 'gplh6r' }],\n ['path', { d: 'M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6', key: 'a6xqqp' }],\n];\n\n/**\n * @component @name ExternalLink\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview  - https://lucide.dev/icons/external-link\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst ExternalLink = createLucideIcon('external-link', __iconNode);\n\nexport default ExternalLink;\n","/* __next_internal_action_entry_do_not_use__ [{\"005d259cc8fa8d952f814b4fb979df53e92986d9a5\":\"getHomeDirectory\"},\"src/app/actions/git.ts\",\"\"] */\"use turbopack no side effects\";import{createServerReference,callServer,findSourceMapURL}from\"private-next-rsc-action-client-wrapper\";const $$RSC_SERVER_ACTION_0=/*#__PURE__*/createServerReference(\"005d259cc8fa8d952f814b4fb979df53e92986d9a5\",callServer,void 0,findSourceMapURL,\"getHomeDirectory\");export{$$RSC_SERVER_ACTION_0 as getHomeDirectory};","import { useEffect } from 'react';\n\ntype UseDialogKeyboardShortcutsOptions = {\n enabled?: boolean;\n onConfirm?: () => void | Promise<unknown>;\n onDismiss: () => void;\n canConfirm?: boolean;\n};\n\nconst isEditableTarget = (target: EventTarget | null): boolean => {\n if (!(target instanceof HTMLElement)) return false;\n const tagName = target.tagName.toUpperCase();\n return tagName === 'INPUT' || tagName === 'TEXTAREA' || tagName === 'SELECT' || target.isContentEditable;\n};\n\nexport function useDialogKeyboardShortcuts({\n enabled = true,\n onConfirm,\n onDismiss,\n canConfirm = true,\n}: UseDialogKeyboardShortcutsOptions) {\n useEffect(() => {\n if (!enabled) return;\n\n const handleKeyDown = (event: KeyboardEvent) => {\n if (event.key === 'Escape') {\n event.preventDefault();\n onDismiss();\n return;\n }\n\n if (event.key !== 'Enter') return;\n if (!onConfirm || !canConfirm) return;\n if (event.defaultPrevented) return;\n if (event.metaKey || event.ctrlKey || event.altKey || event.shiftKey) return;\n if (isEditableTarget(event.target)) return;\n\n event.preventDefault();\n void onConfirm();\n };\n\n window.addEventListener('keydown', handleKeyDown);\n return () => {\n window.removeEventListener('keydown', handleKeyDown);\n };\n }, [enabled, onConfirm, onDismiss, canConfirm]);\n}\n","export function getBaseName(path: string): string {\n if (!path) return '';\n // Support both Windows (\\) and POSIX (/) separators\n // Using a simpler approach to avoid regex escaping issues in some environments\n const normalized = path.replace(/\\\\/g, '/');\n const parts = normalized.split('/');\n // Filter out empty strings which can happen with trailing slashes or absolute paths\n return parts.filter(Boolean).pop() || '';\n}\n\nexport function getDirName(path: string): string {\n if (!path) return '';\n \n // Normalize separators to / for easier processing\n const normalized = path.replace(/\\\\/g, '/');\n \n // Remove trailing slash if it exists (but not if it's the root '/')\n const withoutTrailing = (normalized.length > 1 && normalized.endsWith('/')) \n ? normalized.slice(0, -1) \n : normalized;\n \n const lastIdx = withoutTrailing.lastIndexOf('/');\n \n if (lastIdx === -1) {\n // No separator found. Could be a relative path or a Windows drive root like \"C:\"\n // For \"C:\\\" or \"C:\", we return the normalized version (C:/ or C:)\n if (path.includes(':') && path.length <= 3) return normalized;\n return '.';\n }\n \n if (lastIdx === 0) return '/';\n \n // On Windows, if we're at \"C:/\", lastIdx might be 2.\n if (path.includes(':') && lastIdx === 2) {\n return withoutTrailing.substring(0, 3); // \"C:/\"\n }\n \n return withoutTrailing.substring(0, lastIdx);\n}\n\nexport function isWindowsAbsolutePath(value: string): boolean {\n return /^[a-zA-Z]:[\\\\/]/.test(value);\n}\n","import createLucideIcon from '../createLucideIcon';\nimport { IconNode } from '../types';\n\nexport const __iconNode: IconNode = [\n [\n 'path',\n {\n d: 'M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z',\n key: '1kt360',\n },\n ],\n];\n\n/**\n * @component @name Folder\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview  - https://lucide.dev/icons/folder\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst Folder = createLucideIcon('folder', __iconNode);\n\nexport default Folder;\n","/* __next_internal_action_entry_do_not_use__ [{\"7f9f1c8bfbea857703a62a8b12c5404cc5fe241ff2\":\"startTtydProcess\"},\"src/app/actions/git.ts\",\"\"] */\"use turbopack no side effects\";import{createServerReference,callServer,findSourceMapURL}from\"private-next-rsc-action-client-wrapper\";const $$RSC_SERVER_ACTION_10=/*#__PURE__*/createServerReference(\"7f9f1c8bfbea857703a62a8b12c5404cc5fe241ff2\",callServer,void 0,findSourceMapURL,\"startTtydProcess\");export{$$RSC_SERVER_ACTION_10 as startTtydProcess};","/* __next_internal_action_entry_do_not_use__ [{\"7f5447571c45e842042484075d6317cc6616d95234\":\"saveAttachments\"},\"src/app/actions/git.ts\",\"\"] */\"use turbopack no side effects\";import{createServerReference,callServer,findSourceMapURL}from\"private-next-rsc-action-client-wrapper\";const $$RSC_SERVER_ACTION_19=/*#__PURE__*/createServerReference(\"7f5447571c45e842042484075d6317cc6616d95234\",callServer,void 0,findSourceMapURL,\"saveAttachments\");export{$$RSC_SERVER_ACTION_19 as saveAttachments};","/* __next_internal_action_entry_do_not_use__ [{\"00cd80dc5a4a84c6544b997eb412d9fec0f08638d5\":\"getConfig\"},\"src/app/actions/config.ts\",\"\"] */\"use turbopack no side effects\";import{createServerReference,callServer,findSourceMapURL}from\"private-next-rsc-action-client-wrapper\";const $$RSC_SERVER_ACTION_0=/*#__PURE__*/createServerReference(\"00cd80dc5a4a84c6544b997eb412d9fec0f08638d5\",callServer,void 0,findSourceMapURL,\"getConfig\");export{$$RSC_SERVER_ACTION_0 as getConfig};","/* __next_internal_action_entry_do_not_use__ [{\"4014476978d1b7b7928122371ecaf1a366c694b482\":\"updateConfig\"},\"src/app/actions/config.ts\",\"\"] */\"use turbopack no side effects\";import{createServerReference,callServer,findSourceMapURL}from\"private-next-rsc-action-client-wrapper\";const $$RSC_SERVER_ACTION_2=/*#__PURE__*/createServerReference(\"4014476978d1b7b7928122371ecaf1a366c694b482\",callServer,void 0,findSourceMapURL,\"updateConfig\");export{$$RSC_SERVER_ACTION_2 as updateConfig};","export const SESSIONS_UPDATED_STORAGE_KEY = 'viba:sessions-updated-at';\nexport const SESSIONS_UPDATED_EVENT = 'viba:sessions-updated';\n\nexport function notifySessionsUpdated(): void {\n if (typeof window === 'undefined') return;\n\n try {\n localStorage.setItem(SESSIONS_UPDATED_STORAGE_KEY, new Date().toISOString());\n } catch {\n // Ignore localStorage failures (private mode, quota, etc.)\n }\n\n window.dispatchEvent(new CustomEvent(SESSIONS_UPDATED_EVENT));\n}\n","'use client';\n\nimport Image from \"next/image\";\nimport GitRepoSelector from \"@/components/GitRepoSelector\";\n\nexport default function Home() {\n return (\n <>\n <a\n href=\"https://github.com/m0o0scar/viba\"\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n aria-label=\"Open Viba GitHub repository\"\n className=\"fixed top-0 right-0 z-50 h-20 w-20 cursor-pointer border-l border-b border-gray-400 bg-gray-300/95 shadow-sm backdrop-blur-sm transition-colors hover:bg-gray-500/95\"\n style={{ clipPath: \"polygon(100% 0, 0 0, 100% 100%)\" }}\n >\n <span className=\"absolute left-[67%] top-[33%] -translate-x-1/2 -translate-y-1/2\">\n <Image src=\"/github.png\" alt=\"GitHub\" width={22} height={22} priority className=\"rotate-45\" />\n </span>\n </a>\n <main className=\"flex min-h-screen flex-col items-center justify-center bg-base-100 p-4 md:p-24\">\n <GitRepoSelector mode=\"home\" />\n </main>\n </>\n );\n}\n"],"names":["module","exports","require","vendored","React","ReactDOM","ReactServerDOMTurbopackClient","AppRouterContext","HooksClientContext","ServerInsertedHtml","process","env","NEXT_RUNTIME","__NEXT_EXPERIMENTAL_REACT","NODE_ENV","TURBOPACK","ReactJsxRuntime"],"mappings":"6CAAAA,EAAOC,OAAO,CACZC,EAAQ,CAAA,CAAA,IAAA,GACRC,QAAQ,CAAC,YAAY,CAAEC,KAAK,+BCF9BJ,EAAOC,OAAO,CACZC,EAAQ,CAAA,CAAA,IAAA,GACRC,QAAQ,CAAC,YAAY,CAAEE,QAAQ,8BCFjCL,GAAOC,OAAO,CACZC,EAAQ,CAAA,CAAA,IAAA,GACRC,QAAQ,CAAC,YAAY,CAAEG,6BAA6B,6BCFtDN,GAAOC,OAAO,CACZC,EAAQ,CAAA,CAAA,IAAA,GACRC,QAAQ,CAAC,QAAW,CAACI,gBAAgB,+BCFvCP,EAAOC,OAAO,CACZC,EAAQ,CAAA,CAAA,IAAA,GACRC,QAAQ,CAAC,QAAW,CAACK,kBAAkB,8BCFzCR,GAAOC,OAAO,CACZC,EAAQ,CAAA,CAAA,IAAA,GACRC,QAAQ,CAAC,QAAW,CAACM,kBAAkB,+sBCwBjCT,EAAOC,OAAO,CAAGC,EAAQ,CAAA,CAAA,IAAA,iCC1BjCF,EAAOC,OAAO,CACZC,EAAQ,CAAA,CAAA,IAAA,GACRC,QAAQ,CAAC,YAAY,CAAEa,eAAe,YCFxC,EAAA,CAAA,CAAA,CAAA,CAAA,KAAA,QAAA,IAAA,QAAA,YAAA,qEAAA,OAAA,CAAA,CAAA,GAAA,gBAAA,MAAA,gBAAA,YAAA,uCAAA,EAAA,CAAA,GAAA,gBAAA,MAAA,gBAAA,YAAA,gCAAA,EAAA,CAAA,GAAA,oBAAA,MAAA,oBAAA,YAAA,uDAAA,EAAA,CAAA,GAAA,UAAA,MAAA,UAAA,YAAA,gFAAA,EAA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,SAAS,MAAO,GAAI,OAAQ,GAAI,QAAQ,CAAA,CAAA,EAAC,UAAU,kBAGpF,CAAA,EAAA,EAAA,GAAA,EAAC,OAAA,CAAK,UAAU,0FACd,CAAA,EAAA,EAAA,GAAA,EAAC,EAAA,OAAe,CAAA,CAAC,KAAK,aAI9B","ignoreList":[0,1,2,3,4,5,6,7,9,11,12,13,14,18]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
module.exports=[33405,(a,b,c)=>{b.exports=a.x("child_process",()=>require("child_process"))},70722,(a,b,c)=>{b.exports=a.x("tty",()=>require("tty"))},24868,(a,b,c)=>{b.exports=a.x("fs/promises",()=>require("fs/promises"))},46786,(a,b,c)=>{b.exports=a.x("os",()=>require("os"))},37936,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0}),Object.defineProperty(c,"registerServerReference",{enumerable:!0,get:function(){return d.registerServerReference}});let d=a.r(11857)},13095,(a,b,c)=>{"use strict";function d(a){for(let b=0;b<a.length;b++){let c=a[b];if("function"!=typeof c)throw Object.defineProperty(Error(`A "use server" file can only export async functions, found ${typeof c}.
|
|
2
|
-
Read more: https://nextjs.org/docs/messages/invalid-use-server-value`),"__NEXT_ERROR_CODE",{value:"E352",enumerable:!1,configurable:!0})}}Object.defineProperty(c,"__esModule",{value:!0}),Object.defineProperty(c,"ensureServerEntryExports",{enumerable:!0,get:function(){return d}})},70798,a=>{"use strict";var b=a.i(24868),c=a.i(46786),d=a.i(14747);let e="viba-git-credentials",f=null,g=null,h=!1;function i(){return g?`Secure credential storage is unavailable: ${g}`:"Secure credential storage is unavailable in this runtime."}async function j(){return f||(f=a.A(45581).then(a=>a.default??a).catch(a=>(g=a instanceof Error?a.message:String(a),h||(h=!0,console.warn(`[credentials] ${i()}`)),null))),f}async function k(){let a=await j();if(!a)throw Error(i());return a}function l(){return`${Date.now()}-${Math.random().toString(36).slice(2,9)}`}function m(a){return a.trim().replace(/\/$/,"")}function n(a){return`credential-${a}`}function o(a){return`credential-${a}`}function p(a){return a.keytarAccount||n(a.id)}function q(a){return"gitlab"===a.type?{id:a.id,type:"gitlab",username:a.username,serverUrl:a.serverUrl||"https://gitlab.com",createdAt:a.createdAt,updatedAt:a.updatedAt}:{id:a.id,type:"github",username:a.username,createdAt:a.createdAt,updatedAt:a.updatedAt}}async function r(){let a=d.default.join(c.default.homedir(),".viba");return await b.default.mkdir(a,{recursive:!0}),d.default.join(a,"credentials.json")}function s(a,b){return!!a&&"object"==typeof a&&a.type===b&&"string"==typeof a.username&&"string"==typeof a.createdAt&&"string"==typeof a.updatedAt&&("gitlab"!==b||"string"==typeof a.serverUrl)}function t(a){return!!a&&"object"==typeof a&&"string"==typeof a.id&&!!a.id.trim()&&("github"===a.type||"gitlab"===a.type)&&"string"==typeof a.username&&"string"==typeof a.createdAt&&"string"==typeof a.updatedAt&&(void 0===a.keytarAccount||"string"==typeof a.keytarAccount)&&("gitlab"!==a.type||"string"==typeof a.serverUrl)}async function u(a){let c=await r();await b.default.writeFile(c,JSON.stringify(a,null,2),"utf-8")}async function v(){let a=await r();try{let c=await b.default.readFile(a,"utf-8"),d=JSON.parse(c);if(Array.isArray(d))return d.filter(t);if(!d||"object"!=typeof d)return[];let e=[];if(s(d.github,"github")){let a=d.github;e.push({id:l(),type:"github",username:a.username,createdAt:a.createdAt,updatedAt:a.updatedAt,keytarAccount:o("github")})}if(s(d.gitlab,"gitlab")){let a=d.gitlab;e.push({id:l(),type:"gitlab",username:a.username,serverUrl:a.serverUrl,createdAt:a.createdAt,updatedAt:a.updatedAt,keytarAccount:o("gitlab")})}return e.length>0&&await u(e),e}catch(a){if(a?.code==="ENOENT")return[];return console.error("Failed to parse credentials metadata:",a),[]}}async function w(){return(await v()).map(q).sort((a,b)=>b.updatedAt.localeCompare(a.updatedAt))}async function x(a){let b=(await v()).find(b=>b.id===a);return b?q(b):null}async function y(a){let b=(await v()).find(b=>b.id===a);if(!b)return null;let c=await j();return c?c.getPassword(e,p(b)):null}async function z(a){try{let b=await fetch("https://api.github.com/user",{headers:{Authorization:`Bearer ${a}`,Accept:"application/vnd.github+json","X-GitHub-Api-Version":"2022-11-28"}});if(!b.ok){if(401===b.status)return{valid:!1,error:"Invalid or expired GitHub token."};return{valid:!1,error:`GitHub API returned ${b.status}.`}}let c=await b.json(),d="string"==typeof c?.login?c.login:null;if(!d)return{valid:!1,error:"GitHub API response did not include a username."};return{valid:!0,username:d}}catch(a){return{valid:!1,error:`Failed to verify GitHub token: ${a.message}`}}}async function A(a,b){try{let c=m(a),d=await fetch(`${c}/api/v4/user`,{headers:{"PRIVATE-TOKEN":b}});if(!d.ok){if(401===d.status)return{valid:!1,error:"Invalid or expired GitLab token."};return{valid:!1,error:`GitLab API returned ${d.status}.`}}let e=await d.json(),f="string"==typeof e?.username?e.username:null;if(!f)return{valid:!1,error:"GitLab API response did not include a username."};return{valid:!0,username:f}}catch(a){return{valid:!1,error:`Failed to verify GitLab token: ${a.message}`}}}async function B(a){let b,c=a.trim();if(!c)return{success:!1,error:"GitHub token is required."};try{b=await k()}catch(a){return{success:!1,error:a.message}}let d=await z(c);if(!d.valid||!d.username)return{success:!1,error:d.error||"Failed to verify GitHub token."};let f=await v();if(f.find(a=>"github"===a.type&&a.username===d.username))return{success:!1,error:`A GitHub credential for ${d.username} already exists.`};let g=l(),h=new Date().toISOString(),i=n(g);await b.setPassword(e,i,c);let j={id:g,type:"github",username:d.username,createdAt:h,updatedAt:h,keytarAccount:i};return f.push(j),await u(f),{success:!0,credential:{id:j.id,type:"github",username:j.username,createdAt:j.createdAt,updatedAt:j.updatedAt}}}async function C(a,b){let c,d=m(a),f=b.trim();if(!d)return{success:!1,error:"GitLab server URL is required."};try{new URL(d)}catch{return{success:!1,error:"GitLab server URL must be a valid URL."}}if(!f)return{success:!1,error:"GitLab token is required."};try{c=await k()}catch(a){return{success:!1,error:a.message}}let g=await A(d,f);if(!g.valid||!g.username)return{success:!1,error:g.error||"Failed to verify GitLab token."};let h=await v();if(h.find(a=>"gitlab"===a.type&&a.username===g.username&&a.serverUrl===d))return{success:!1,error:`A GitLab credential for ${g.username} on ${d} already exists.`};let i=l(),j=new Date().toISOString(),o=n(i);await c.setPassword(e,o,f);let p={id:i,type:"gitlab",username:g.username,serverUrl:d,createdAt:j,updatedAt:j,keytarAccount:o};return h.push(p),await u(h),{success:!0,credential:{id:p.id,type:"gitlab",username:p.username,serverUrl:p.serverUrl||d,createdAt:p.createdAt,updatedAt:p.updatedAt}}}async function D(a){let b=await v(),c=b.findIndex(b=>b.id===a);if(-1===c)return{success:!1,error:"Credential not found."};let d=b[c];b.splice(c,1),await u(b);let f=await j();return f&&await f.deletePassword(e,p(d)),{success:!0}}a.s(["createGitHubCredential",()=>B,"createGitLabCredential",()=>C,"deleteCredential",()=>D,"getAllCredentials",()=>w,"getCredentialById",()=>x,"getCredentialToken",()=>y])},39298,a=>{"use strict";var b=a.i(51817),c=a.i(15271),d=a.i(38642);a.s([],99637),a.i(99637),a.s(["
|
|
2
|
+
Read more: https://nextjs.org/docs/messages/invalid-use-server-value`),"__NEXT_ERROR_CODE",{value:"E352",enumerable:!1,configurable:!0})}}Object.defineProperty(c,"__esModule",{value:!0}),Object.defineProperty(c,"ensureServerEntryExports",{enumerable:!0,get:function(){return d}})},70798,a=>{"use strict";var b=a.i(24868),c=a.i(46786),d=a.i(14747);let e="viba-git-credentials",f=null,g=null,h=!1;function i(){return g?`Secure credential storage is unavailable: ${g}`:"Secure credential storage is unavailable in this runtime."}async function j(){return f||(f=a.A(45581).then(a=>a.default??a).catch(a=>(g=a instanceof Error?a.message:String(a),h||(h=!0,console.warn(`[credentials] ${i()}`)),null))),f}async function k(){let a=await j();if(!a)throw Error(i());return a}function l(){return`${Date.now()}-${Math.random().toString(36).slice(2,9)}`}function m(a){return a.trim().replace(/\/$/,"")}function n(a){return`credential-${a}`}function o(a){return`credential-${a}`}function p(a){return a.keytarAccount||n(a.id)}function q(a){return"gitlab"===a.type?{id:a.id,type:"gitlab",username:a.username,serverUrl:a.serverUrl||"https://gitlab.com",createdAt:a.createdAt,updatedAt:a.updatedAt}:{id:a.id,type:"github",username:a.username,createdAt:a.createdAt,updatedAt:a.updatedAt}}async function r(){let a=d.default.join(c.default.homedir(),".viba");return await b.default.mkdir(a,{recursive:!0}),d.default.join(a,"credentials.json")}function s(a,b){return!!a&&"object"==typeof a&&a.type===b&&"string"==typeof a.username&&"string"==typeof a.createdAt&&"string"==typeof a.updatedAt&&("gitlab"!==b||"string"==typeof a.serverUrl)}function t(a){return!!a&&"object"==typeof a&&"string"==typeof a.id&&!!a.id.trim()&&("github"===a.type||"gitlab"===a.type)&&"string"==typeof a.username&&"string"==typeof a.createdAt&&"string"==typeof a.updatedAt&&(void 0===a.keytarAccount||"string"==typeof a.keytarAccount)&&("gitlab"!==a.type||"string"==typeof a.serverUrl)}async function u(a){let c=await r();await b.default.writeFile(c,JSON.stringify(a,null,2),"utf-8")}async function v(){let a=await r();try{let c=await b.default.readFile(a,"utf-8"),d=JSON.parse(c);if(Array.isArray(d))return d.filter(t);if(!d||"object"!=typeof d)return[];let e=[];if(s(d.github,"github")){let a=d.github;e.push({id:l(),type:"github",username:a.username,createdAt:a.createdAt,updatedAt:a.updatedAt,keytarAccount:o("github")})}if(s(d.gitlab,"gitlab")){let a=d.gitlab;e.push({id:l(),type:"gitlab",username:a.username,serverUrl:a.serverUrl,createdAt:a.createdAt,updatedAt:a.updatedAt,keytarAccount:o("gitlab")})}return e.length>0&&await u(e),e}catch(a){if(a?.code==="ENOENT")return[];return console.error("Failed to parse credentials metadata:",a),[]}}async function w(){return(await v()).map(q).sort((a,b)=>b.updatedAt.localeCompare(a.updatedAt))}async function x(a){let b=(await v()).find(b=>b.id===a);return b?q(b):null}async function y(a){let b=(await v()).find(b=>b.id===a);if(!b)return null;let c=await j();return c?c.getPassword(e,p(b)):null}async function z(a){try{let b=await fetch("https://api.github.com/user",{headers:{Authorization:`Bearer ${a}`,Accept:"application/vnd.github+json","X-GitHub-Api-Version":"2022-11-28"}});if(!b.ok){if(401===b.status)return{valid:!1,error:"Invalid or expired GitHub token."};return{valid:!1,error:`GitHub API returned ${b.status}.`}}let c=await b.json(),d="string"==typeof c?.login?c.login:null;if(!d)return{valid:!1,error:"GitHub API response did not include a username."};return{valid:!0,username:d}}catch(a){return{valid:!1,error:`Failed to verify GitHub token: ${a.message}`}}}async function A(a,b){try{let c=m(a),d=await fetch(`${c}/api/v4/user`,{headers:{"PRIVATE-TOKEN":b}});if(!d.ok){if(401===d.status)return{valid:!1,error:"Invalid or expired GitLab token."};return{valid:!1,error:`GitLab API returned ${d.status}.`}}let e=await d.json(),f="string"==typeof e?.username?e.username:null;if(!f)return{valid:!1,error:"GitLab API response did not include a username."};return{valid:!0,username:f}}catch(a){return{valid:!1,error:`Failed to verify GitLab token: ${a.message}`}}}async function B(a){let b,c=a.trim();if(!c)return{success:!1,error:"GitHub token is required."};try{b=await k()}catch(a){return{success:!1,error:a.message}}let d=await z(c);if(!d.valid||!d.username)return{success:!1,error:d.error||"Failed to verify GitHub token."};let f=await v();if(f.find(a=>"github"===a.type&&a.username===d.username))return{success:!1,error:`A GitHub credential for ${d.username} already exists.`};let g=l(),h=new Date().toISOString(),i=n(g);await b.setPassword(e,i,c);let j={id:g,type:"github",username:d.username,createdAt:h,updatedAt:h,keytarAccount:i};return f.push(j),await u(f),{success:!0,credential:{id:j.id,type:"github",username:j.username,createdAt:j.createdAt,updatedAt:j.updatedAt}}}async function C(a,b){let c,d=m(a),f=b.trim();if(!d)return{success:!1,error:"GitLab server URL is required."};try{new URL(d)}catch{return{success:!1,error:"GitLab server URL must be a valid URL."}}if(!f)return{success:!1,error:"GitLab token is required."};try{c=await k()}catch(a){return{success:!1,error:a.message}}let g=await A(d,f);if(!g.valid||!g.username)return{success:!1,error:g.error||"Failed to verify GitLab token."};let h=await v();if(h.find(a=>"gitlab"===a.type&&a.username===g.username&&a.serverUrl===d))return{success:!1,error:`A GitLab credential for ${g.username} on ${d} already exists.`};let i=l(),j=new Date().toISOString(),o=n(i);await c.setPassword(e,o,f);let p={id:i,type:"gitlab",username:g.username,serverUrl:d,createdAt:j,updatedAt:j,keytarAccount:o};return h.push(p),await u(h),{success:!0,credential:{id:p.id,type:"gitlab",username:p.username,serverUrl:p.serverUrl||d,createdAt:p.createdAt,updatedAt:p.updatedAt}}}async function D(a){let b=await v(),c=b.findIndex(b=>b.id===a);if(-1===c)return{success:!1,error:"Credential not found."};let d=b[c];b.splice(c,1),await u(b);let f=await j();return f&&await f.deletePassword(e,p(d)),{success:!0}}a.s(["createGitHubCredential",()=>B,"createGitLabCredential",()=>C,"deleteCredential",()=>D,"getAllCredentials",()=>w,"getCredentialById",()=>x,"getCredentialToken",()=>y])},39298,a=>{"use strict";var b=a.i(51817),c=a.i(15271),d=a.i(38642);a.s([],99637),a.i(99637),a.s(["005d259cc8fa8d952f814b4fb979df53e92986d9a5",()=>c.getHomeDirectory,"00cd80dc5a4a84c6544b997eb412d9fec0f08638d5",()=>d.getConfig,"4003e7c19a1d64b9d311a6e8f69bfed651e6c0a0c7",()=>b.markSessionInitialized,"4014476978d1b7b7928122371ecaf1a366c694b482",()=>d.updateConfig,"403d01ddfa46ce8610976246966b664f0946702936",()=>b.consumeSessionLaunchContext,"406bf07eea307746af974ede033e2bff5d4ae45879",()=>c.listPathEntries,"40839d6f1980de68ef06e70656efb94571720dfe31",()=>b.mergeSessionToBase,"4097dda25382b44a878e1536ddfd83526a3409dbb7",()=>b.getSessionMetadata,"409caa86065050fbcadc5ba1f111667b17eb6a147d",()=>b.listSessionBaseBranches,"40acb5533c82b54fda92c8cd116bc5eff1ca93ed05",()=>b.deleteSessionInBackground,"40c0b0e8e3886b168c56bf35ad920be9c717054f39",()=>b.getSessionDivergence,"40d3528b66f4430a24d29f869e74cde78aea7f86a9",()=>b.rebaseSessionOntoBase,"40fb152558189cb58884e7d0acd4ca9278c762232f",()=>b.getSessionUncommittedFileCount,"602d2564016faf134d089f3103b15d3fecde7154ff",()=>b.writeSessionPromptFile,"60ea9ee38855f2f1636724f1b870ab21757c2118f3",()=>b.updateSessionBaseBranch,"7f2bb66b69f4d8e13fd64cd717458dfa96dd7f3fd3",()=>c.setTmuxSessionStatusVisibility,"7f5447571c45e842042484075d6317cc6616d95234",()=>c.saveAttachments,"7f5dded1f90b9ee17c0318b47640fddefe4a9839b9",()=>c.getSessionTerminalSources,"7f9f1c8bfbea857703a62a8b12c5404cc5fe241ff2",()=>c.startTtydProcess,"7fe326048282569666932c39dc794e059cf2360686",()=>c.setTmuxSessionMouseMode],39298)},45581,a=>{a.v(b=>Promise.all(["server/chunks/ssr/[externals]_keytar_23140f5c._.js"].map(b=>a.l(b))).then(()=>b(83034)))},44264,a=>{a.v(a=>Promise.resolve().then(()=>a(33405)))},37706,a=>{a.v(b=>Promise.all(["server/chunks/ssr/[root-of-the-server]__edf0aa7a._.js"].map(b=>a.l(b))).then(()=>b(78775)))}];
|
|
3
3
|
|
|
4
4
|
//# sourceMappingURL=%5Broot-of-the-server%5D__ee9c5185._.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../node_modules/next/src/build/webpack/loaders/next-flight-loader/server-reference.ts","../../../../node_modules/next/src/build/webpack/loaders/next-flight-loader/action-validate.ts","../../../../src/lib/credentials.ts","../../../../.next-internal/server/app/session/%5BsessionId%5D/page/actions.js%20%28server%20actions%20loader%29"],"sourcesContent":["/* eslint-disable import/no-extraneous-dependencies */\nexport { registerServerReference } from 'react-server-dom-webpack/server'\n","// This function ensures that all the exported values are valid server actions,\n// during the runtime. By definition all actions are required to be async\n// functions, but here we can only check that they are functions.\nexport function ensureServerEntryExports(actions: any[]) {\n for (let i = 0; i < actions.length; i++) {\n const action = actions[i]\n if (typeof action !== 'function') {\n throw new Error(\n `A \"use server\" file can only export async functions, found ${typeof action}.\\nRead more: https://nextjs.org/docs/messages/invalid-use-server-value`\n )\n }\n }\n}\n","import fs from 'fs/promises';\nimport os from 'os';\nimport path from 'path';\n\nconst SERVICE_NAME = 'viba-git-credentials';\nconst CREDENTIALS_FILE_NAME = 'credentials.json';\n\nexport type CredentialType = 'github' | 'gitlab';\n\nexport interface BaseCredential {\n id: string;\n type: CredentialType;\n username: string;\n createdAt: string;\n updatedAt: string;\n}\n\nexport interface GitHubCredential extends BaseCredential {\n type: 'github';\n}\n\nexport interface GitLabCredential extends BaseCredential {\n type: 'gitlab';\n serverUrl: string;\n}\n\nexport type Credential = GitHubCredential | GitLabCredential;\n\ntype CredentialMetadata = {\n id: string;\n type: CredentialType;\n username: string;\n serverUrl?: string;\n createdAt: string;\n updatedAt: string;\n keytarAccount?: string;\n};\n\ntype LegacyCredentialMetadata = {\n type: CredentialType;\n username: string;\n serverUrl?: string;\n createdAt: string;\n updatedAt: string;\n};\n\ntype KeytarModule = {\n getPassword(service: string, account: string): Promise<string | null>;\n setPassword(service: string, account: string, password: string): Promise<void>;\n deletePassword(service: string, account: string): Promise<boolean>;\n};\n\nlet keytarPromise: Promise<KeytarModule | null> | null = null;\nlet keytarUnavailableReason: string | null = null;\nlet didLogKeytarWarning = false;\n\nfunction keytarUnavailableMessage(): string {\n if (keytarUnavailableReason) {\n return `Secure credential storage is unavailable: ${keytarUnavailableReason}`;\n }\n return 'Secure credential storage is unavailable in this runtime.';\n}\n\nasync function loadKeytar(): Promise<KeytarModule | null> {\n if (!keytarPromise) {\n keytarPromise = import('keytar')\n .then((module) => (module.default ?? module) as KeytarModule)\n .catch((error: unknown) => {\n keytarUnavailableReason = error instanceof Error ? error.message : String(error);\n if (!didLogKeytarWarning) {\n didLogKeytarWarning = true;\n console.warn(`[credentials] ${keytarUnavailableMessage()}`);\n }\n return null;\n });\n }\n\n return keytarPromise;\n}\n\nasync function requireKeytar(): Promise<KeytarModule> {\n const keytar = await loadKeytar();\n if (!keytar) {\n throw new Error(keytarUnavailableMessage());\n }\n return keytar;\n}\n\nfunction generateId(): string {\n return `${Date.now()}-${Math.random().toString(36).slice(2, 9)}`;\n}\n\nfunction normalizeGitLabServerUrl(serverUrl: string): string {\n return serverUrl.trim().replace(/\\/$/, '');\n}\n\nfunction getDefaultKeytarAccount(id: string): string {\n return `credential-${id}`;\n}\n\nfunction getLegacyKeytarAccount(type: CredentialType): string {\n return `credential-${type}`;\n}\n\nfunction getKeytarAccountForMetadata(metadata: CredentialMetadata): string {\n return metadata.keytarAccount || getDefaultKeytarAccount(metadata.id);\n}\n\nfunction toCredential(metadata: CredentialMetadata): Credential {\n if (metadata.type === 'gitlab') {\n return {\n id: metadata.id,\n type: 'gitlab',\n username: metadata.username,\n serverUrl: metadata.serverUrl || 'https://gitlab.com',\n createdAt: metadata.createdAt,\n updatedAt: metadata.updatedAt,\n };\n }\n\n return {\n id: metadata.id,\n type: 'github',\n username: metadata.username,\n createdAt: metadata.createdAt,\n updatedAt: metadata.updatedAt,\n };\n}\n\nasync function getCredentialsFilePath(): Promise<string> {\n const vibaDir = path.join(os.homedir(), '.viba');\n await fs.mkdir(vibaDir, { recursive: true });\n return path.join(vibaDir, CREDENTIALS_FILE_NAME);\n}\n\nfunction isLegacyCredentialMetadata(value: unknown, expectedType: CredentialType): value is LegacyCredentialMetadata {\n if (!value || typeof value !== 'object') return false;\n\n const candidate = value as Record<string, unknown>;\n if (candidate.type !== expectedType) return false;\n if (typeof candidate.username !== 'string') return false;\n if (typeof candidate.createdAt !== 'string') return false;\n if (typeof candidate.updatedAt !== 'string') return false;\n\n if (expectedType === 'gitlab') {\n return typeof candidate.serverUrl === 'string';\n }\n\n return true;\n}\n\nfunction isCredentialMetadata(value: unknown): value is CredentialMetadata {\n if (!value || typeof value !== 'object') return false;\n\n const candidate = value as Record<string, unknown>;\n if (typeof candidate.id !== 'string' || !candidate.id.trim()) return false;\n if (candidate.type !== 'github' && candidate.type !== 'gitlab') return false;\n if (typeof candidate.username !== 'string') return false;\n if (typeof candidate.createdAt !== 'string') return false;\n if (typeof candidate.updatedAt !== 'string') return false;\n if (candidate.keytarAccount !== undefined && typeof candidate.keytarAccount !== 'string') return false;\n\n if (candidate.type === 'gitlab') {\n return typeof candidate.serverUrl === 'string';\n }\n\n return true;\n}\n\nasync function writeCredentialsMetadata(metadata: CredentialMetadata[]): Promise<void> {\n const credentialsFilePath = await getCredentialsFilePath();\n await fs.writeFile(credentialsFilePath, JSON.stringify(metadata, null, 2), 'utf-8');\n}\n\nasync function readCredentialsMetadata(): Promise<CredentialMetadata[]> {\n const credentialsFilePath = await getCredentialsFilePath();\n\n try {\n const content = await fs.readFile(credentialsFilePath, 'utf-8');\n const parsed = JSON.parse(content) as unknown;\n\n if (Array.isArray(parsed)) {\n return parsed.filter(isCredentialMetadata);\n }\n\n if (!parsed || typeof parsed !== 'object') {\n return [];\n }\n\n const legacyMapped = parsed as Record<string, unknown>;\n const migrated: CredentialMetadata[] = [];\n\n if (isLegacyCredentialMetadata(legacyMapped.github, 'github')) {\n const metadata = legacyMapped.github;\n migrated.push({\n id: generateId(),\n type: 'github',\n username: metadata.username,\n createdAt: metadata.createdAt,\n updatedAt: metadata.updatedAt,\n keytarAccount: getLegacyKeytarAccount('github'),\n });\n }\n\n if (isLegacyCredentialMetadata(legacyMapped.gitlab, 'gitlab')) {\n const metadata = legacyMapped.gitlab;\n migrated.push({\n id: generateId(),\n type: 'gitlab',\n username: metadata.username,\n serverUrl: metadata.serverUrl,\n createdAt: metadata.createdAt,\n updatedAt: metadata.updatedAt,\n keytarAccount: getLegacyKeytarAccount('gitlab'),\n });\n }\n\n if (migrated.length > 0) {\n await writeCredentialsMetadata(migrated);\n }\n\n return migrated;\n } catch (error) {\n if ((error as NodeJS.ErrnoException)?.code === 'ENOENT') {\n return [];\n }\n\n console.error('Failed to parse credentials metadata:', error);\n return [];\n }\n}\n\nexport async function getAllCredentials(): Promise<Credential[]> {\n const metadata = await readCredentialsMetadata();\n\n return metadata\n .map(toCredential)\n .sort((a, b) => b.updatedAt.localeCompare(a.updatedAt));\n}\n\nexport async function getCredentialById(id: string): Promise<Credential | null> {\n const metadata = await readCredentialsMetadata();\n const found = metadata.find((credential) => credential.id === id);\n return found ? toCredential(found) : null;\n}\n\nexport async function getCredentialToken(id: string): Promise<string | null> {\n const metadata = await readCredentialsMetadata();\n const found = metadata.find((credential) => credential.id === id);\n if (!found) {\n return null;\n }\n\n const keytar = await loadKeytar();\n if (!keytar) {\n return null;\n }\n\n return keytar.getPassword(SERVICE_NAME, getKeytarAccountForMetadata(found));\n}\n\nasync function verifyGitHubToken(token: string): Promise<{ valid: boolean; username?: string; error?: string }> {\n try {\n const response = await fetch('https://api.github.com/user', {\n headers: {\n Authorization: `Bearer ${token}`,\n Accept: 'application/vnd.github+json',\n 'X-GitHub-Api-Version': '2022-11-28',\n },\n });\n\n if (!response.ok) {\n if (response.status === 401) {\n return { valid: false, error: 'Invalid or expired GitHub token.' };\n }\n return { valid: false, error: `GitHub API returned ${response.status}.` };\n }\n\n const data = await response.json();\n const username = typeof data?.login === 'string' ? data.login : null;\n if (!username) {\n return { valid: false, error: 'GitHub API response did not include a username.' };\n }\n\n return { valid: true, username };\n } catch (error) {\n return { valid: false, error: `Failed to verify GitHub token: ${(error as Error).message}` };\n }\n}\n\nasync function verifyGitLabToken(serverUrl: string, token: string): Promise<{ valid: boolean; username?: string; error?: string }> {\n try {\n const normalizedUrl = normalizeGitLabServerUrl(serverUrl);\n const response = await fetch(`${normalizedUrl}/api/v4/user`, {\n headers: {\n 'PRIVATE-TOKEN': token,\n },\n });\n\n if (!response.ok) {\n if (response.status === 401) {\n return { valid: false, error: 'Invalid or expired GitLab token.' };\n }\n return { valid: false, error: `GitLab API returned ${response.status}.` };\n }\n\n const data = await response.json();\n const username = typeof data?.username === 'string' ? data.username : null;\n if (!username) {\n return { valid: false, error: 'GitLab API response did not include a username.' };\n }\n\n return { valid: true, username };\n } catch (error) {\n return { valid: false, error: `Failed to verify GitLab token: ${(error as Error).message}` };\n }\n}\n\nexport async function createGitHubCredential(token: string): Promise<{ success: boolean; credential?: GitHubCredential; error?: string }> {\n const trimmedToken = token.trim();\n if (!trimmedToken) {\n return { success: false, error: 'GitHub token is required.' };\n }\n\n let keytar: KeytarModule;\n try {\n keytar = await requireKeytar();\n } catch (error) {\n return { success: false, error: (error as Error).message };\n }\n\n const verification = await verifyGitHubToken(trimmedToken);\n if (!verification.valid || !verification.username) {\n return { success: false, error: verification.error || 'Failed to verify GitHub token.' };\n }\n\n const metadata = await readCredentialsMetadata();\n const duplicate = metadata.find((credential) => (\n credential.type === 'github'\n && credential.username === verification.username\n ));\n\n if (duplicate) {\n return { success: false, error: `A GitHub credential for ${verification.username} already exists.` };\n }\n\n const id = generateId();\n const now = new Date().toISOString();\n const keytarAccount = getDefaultKeytarAccount(id);\n\n await keytar.setPassword(SERVICE_NAME, keytarAccount, trimmedToken);\n\n const created: CredentialMetadata = {\n id,\n type: 'github',\n username: verification.username,\n createdAt: now,\n updatedAt: now,\n keytarAccount,\n };\n\n metadata.push(created);\n await writeCredentialsMetadata(metadata);\n\n return {\n success: true,\n credential: {\n id: created.id,\n type: 'github',\n username: created.username,\n createdAt: created.createdAt,\n updatedAt: created.updatedAt,\n },\n };\n}\n\nexport async function createGitLabCredential(\n serverUrl: string,\n token: string,\n): Promise<{ success: boolean; credential?: GitLabCredential; error?: string }> {\n const normalizedServerUrl = normalizeGitLabServerUrl(serverUrl);\n const trimmedToken = token.trim();\n\n if (!normalizedServerUrl) {\n return { success: false, error: 'GitLab server URL is required.' };\n }\n\n try {\n new URL(normalizedServerUrl);\n } catch {\n return { success: false, error: 'GitLab server URL must be a valid URL.' };\n }\n\n if (!trimmedToken) {\n return { success: false, error: 'GitLab token is required.' };\n }\n\n let keytar: KeytarModule;\n try {\n keytar = await requireKeytar();\n } catch (error) {\n return { success: false, error: (error as Error).message };\n }\n\n const verification = await verifyGitLabToken(normalizedServerUrl, trimmedToken);\n if (!verification.valid || !verification.username) {\n return { success: false, error: verification.error || 'Failed to verify GitLab token.' };\n }\n\n const metadata = await readCredentialsMetadata();\n const duplicate = metadata.find((credential) => (\n credential.type === 'gitlab'\n && credential.username === verification.username\n && credential.serverUrl === normalizedServerUrl\n ));\n\n if (duplicate) {\n return {\n success: false,\n error: `A GitLab credential for ${verification.username} on ${normalizedServerUrl} already exists.`,\n };\n }\n\n const id = generateId();\n const now = new Date().toISOString();\n const keytarAccount = getDefaultKeytarAccount(id);\n\n await keytar.setPassword(SERVICE_NAME, keytarAccount, trimmedToken);\n\n const created: CredentialMetadata = {\n id,\n type: 'gitlab',\n username: verification.username,\n serverUrl: normalizedServerUrl,\n createdAt: now,\n updatedAt: now,\n keytarAccount,\n };\n\n metadata.push(created);\n await writeCredentialsMetadata(metadata);\n\n return {\n success: true,\n credential: {\n id: created.id,\n type: 'gitlab',\n username: created.username,\n serverUrl: created.serverUrl || normalizedServerUrl,\n createdAt: created.createdAt,\n updatedAt: created.updatedAt,\n },\n };\n}\n\nexport async function deleteCredential(id: string): Promise<{ success: boolean; error?: string }> {\n const metadata = await readCredentialsMetadata();\n const index = metadata.findIndex((credential) => credential.id === id);\n\n if (index === -1) {\n return { success: false, error: 'Credential not found.' };\n }\n\n const credential = metadata[index];\n metadata.splice(index, 1);\n await writeCredentialsMetadata(metadata);\n\n const keytar = await loadKeytar();\n if (keytar) {\n await keytar.deletePassword(SERVICE_NAME, getKeytarAccountForMetadata(credential));\n }\n\n return { success: true };\n}\n","export {deleteSessionInBackground as '4072ed53ae48548c51e6fca9790c416fd9f0136941'} from 'ACTIONS_MODULE0'\nexport {getSessionDivergence as '407dcdacfbc8f612bcf486357e577aab848471f7cc'} from 'ACTIONS_MODULE0'\nexport {getSessionUncommittedFileCount as '40ce52df2aca62d16813d0e9bf7aaefe9b51139b83'} from 'ACTIONS_MODULE0'\nexport {listSessionBaseBranches as '40fd6652b21394ddfaa7d74e8fcab8c0299349549e'} from 'ACTIONS_MODULE0'\nexport {mergeSessionToBase as '4075509c9ca75e716fbb77aa6243ab9605f4910f7e'} from 'ACTIONS_MODULE0'\nexport {rebaseSessionOntoBase as '40fb7e550cb61e15dd52425818984998264d227ecb'} from 'ACTIONS_MODULE0'\nexport {updateSessionBaseBranch as '6003527ebf841b19b07f86c1650e242fa256de1170'} from 'ACTIONS_MODULE0'\nexport {writeSessionPromptFile as '60e99919936f208f2bc189087ee13ff6507a556a30'} from 'ACTIONS_MODULE0'\nexport {setTmuxSessionMouseMode as '7f1b4e31ab932df596c73b843b3758ada17759d201'} from 'ACTIONS_MODULE1'\nexport {setTmuxSessionStatusVisibility as '7faeeb7a11afb764e0be8460053beb7f01730866b2'} from 'ACTIONS_MODULE1'\nexport {getConfig as '0064bbd6227c75dbf903098659aedd84ad0d4e0e53'} from 'ACTIONS_MODULE2'\nexport {updateConfig as '408a2152db3e44bd4b023e85e8fa81763f311e16d8'} from 'ACTIONS_MODULE2'\nexport {getHomeDirectory as '00932efbca78981f6c54a3e5e46b4aaec8a353f6ae'} from 'ACTIONS_MODULE1'\nexport {listPathEntries as '400316c169e4b2dfb1380e231f83dbdf00422cf1bb'} from 'ACTIONS_MODULE1'\nexport {saveAttachments as '7f3c7b8db24eebc1200045e18c6bf25f0612568e56'} from 'ACTIONS_MODULE1'\nexport {consumeSessionLaunchContext as '404c24c7880bc6066fe63140ba0459db8b538db987'} from 'ACTIONS_MODULE0'\nexport {getSessionMetadata as '40205ef4d81e010797b89cbf8b5d50091ec5dd1af4'} from 'ACTIONS_MODULE0'\nexport {markSessionInitialized as '4079b8e2b4780b9bb6ac0f577addd04bd4d22c2707'} from 'ACTIONS_MODULE0'\nexport {getSessionTerminalSources as '7f32262b8d833b8711814894e88957ec6a5721ee71'} from 'ACTIONS_MODULE1'\nexport {startTtydProcess as '7fd4c4c46dd5412a32f4702da6146cb506ea26cec4'} from 'ACTIONS_MODULE1'\n"],"names":["registerServerReference","ensureServerEntryExports","actions","i","length","action","Error"],"mappings":"mTAAoD,OAAA,cAAA,CAAA,EAAA,aAAA,oCAC3CA,0BAAAA,qCAAAA,EAAAA,uBAAuB,YAAQ,CAAA,CAAA,IAAA,iCCEjC,SAASC,EAAyBC,CAAc,EACrD,IAAK,IAAIC,EAAI,EAAGA,E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AE,SAAS,CAAK,CACzB,sMCzdA,IAAA,EAAA,EAAA,CAAA,CAAA,OAQA,EAAA,EAAA,CAAA,CAAA,OAEA,EAAA,EAAA,CAAA,CAAA","ignoreList":[0,1]}
|
|
1
|
+
{"version":3,"sources":["../../../../node_modules/next/src/build/webpack/loaders/next-flight-loader/server-reference.ts","../../../../node_modules/next/src/build/webpack/loaders/next-flight-loader/action-validate.ts","../../../../src/lib/credentials.ts","../../../../.next-internal/server/app/session/%5BsessionId%5D/page/actions.js%20%28server%20actions%20loader%29"],"sourcesContent":["/* eslint-disable import/no-extraneous-dependencies */\nexport { registerServerReference } from 'react-server-dom-webpack/server'\n","// This function ensures that all the exported values are valid server actions,\n// during the runtime. By definition all actions are required to be async\n// functions, but here we can only check that they are functions.\nexport function ensureServerEntryExports(actions: any[]) {\n for (let i = 0; i < actions.length; i++) {\n const action = actions[i]\n if (typeof action !== 'function') {\n throw new Error(\n `A \"use server\" file can only export async functions, found ${typeof action}.\\nRead more: https://nextjs.org/docs/messages/invalid-use-server-value`\n )\n }\n }\n}\n","import fs from 'fs/promises';\nimport os from 'os';\nimport path from 'path';\n\nconst SERVICE_NAME = 'viba-git-credentials';\nconst CREDENTIALS_FILE_NAME = 'credentials.json';\n\nexport type CredentialType = 'github' | 'gitlab';\n\nexport interface BaseCredential {\n id: string;\n type: CredentialType;\n username: string;\n createdAt: string;\n updatedAt: string;\n}\n\nexport interface GitHubCredential extends BaseCredential {\n type: 'github';\n}\n\nexport interface GitLabCredential extends BaseCredential {\n type: 'gitlab';\n serverUrl: string;\n}\n\nexport type Credential = GitHubCredential | GitLabCredential;\n\ntype CredentialMetadata = {\n id: string;\n type: CredentialType;\n username: string;\n serverUrl?: string;\n createdAt: string;\n updatedAt: string;\n keytarAccount?: string;\n};\n\ntype LegacyCredentialMetadata = {\n type: CredentialType;\n username: string;\n serverUrl?: string;\n createdAt: string;\n updatedAt: string;\n};\n\ntype KeytarModule = {\n getPassword(service: string, account: string): Promise<string | null>;\n setPassword(service: string, account: string, password: string): Promise<void>;\n deletePassword(service: string, account: string): Promise<boolean>;\n};\n\nlet keytarPromise: Promise<KeytarModule | null> | null = null;\nlet keytarUnavailableReason: string | null = null;\nlet didLogKeytarWarning = false;\n\nfunction keytarUnavailableMessage(): string {\n if (keytarUnavailableReason) {\n return `Secure credential storage is unavailable: ${keytarUnavailableReason}`;\n }\n return 'Secure credential storage is unavailable in this runtime.';\n}\n\nasync function loadKeytar(): Promise<KeytarModule | null> {\n if (!keytarPromise) {\n keytarPromise = import('keytar')\n .then((module) => (module.default ?? module) as KeytarModule)\n .catch((error: unknown) => {\n keytarUnavailableReason = error instanceof Error ? error.message : String(error);\n if (!didLogKeytarWarning) {\n didLogKeytarWarning = true;\n console.warn(`[credentials] ${keytarUnavailableMessage()}`);\n }\n return null;\n });\n }\n\n return keytarPromise;\n}\n\nasync function requireKeytar(): Promise<KeytarModule> {\n const keytar = await loadKeytar();\n if (!keytar) {\n throw new Error(keytarUnavailableMessage());\n }\n return keytar;\n}\n\nfunction generateId(): string {\n return `${Date.now()}-${Math.random().toString(36).slice(2, 9)}`;\n}\n\nfunction normalizeGitLabServerUrl(serverUrl: string): string {\n return serverUrl.trim().replace(/\\/$/, '');\n}\n\nfunction getDefaultKeytarAccount(id: string): string {\n return `credential-${id}`;\n}\n\nfunction getLegacyKeytarAccount(type: CredentialType): string {\n return `credential-${type}`;\n}\n\nfunction getKeytarAccountForMetadata(metadata: CredentialMetadata): string {\n return metadata.keytarAccount || getDefaultKeytarAccount(metadata.id);\n}\n\nfunction toCredential(metadata: CredentialMetadata): Credential {\n if (metadata.type === 'gitlab') {\n return {\n id: metadata.id,\n type: 'gitlab',\n username: metadata.username,\n serverUrl: metadata.serverUrl || 'https://gitlab.com',\n createdAt: metadata.createdAt,\n updatedAt: metadata.updatedAt,\n };\n }\n\n return {\n id: metadata.id,\n type: 'github',\n username: metadata.username,\n createdAt: metadata.createdAt,\n updatedAt: metadata.updatedAt,\n };\n}\n\nasync function getCredentialsFilePath(): Promise<string> {\n const vibaDir = path.join(os.homedir(), '.viba');\n await fs.mkdir(vibaDir, { recursive: true });\n return path.join(vibaDir, CREDENTIALS_FILE_NAME);\n}\n\nfunction isLegacyCredentialMetadata(value: unknown, expectedType: CredentialType): value is LegacyCredentialMetadata {\n if (!value || typeof value !== 'object') return false;\n\n const candidate = value as Record<string, unknown>;\n if (candidate.type !== expectedType) return false;\n if (typeof candidate.username !== 'string') return false;\n if (typeof candidate.createdAt !== 'string') return false;\n if (typeof candidate.updatedAt !== 'string') return false;\n\n if (expectedType === 'gitlab') {\n return typeof candidate.serverUrl === 'string';\n }\n\n return true;\n}\n\nfunction isCredentialMetadata(value: unknown): value is CredentialMetadata {\n if (!value || typeof value !== 'object') return false;\n\n const candidate = value as Record<string, unknown>;\n if (typeof candidate.id !== 'string' || !candidate.id.trim()) return false;\n if (candidate.type !== 'github' && candidate.type !== 'gitlab') return false;\n if (typeof candidate.username !== 'string') return false;\n if (typeof candidate.createdAt !== 'string') return false;\n if (typeof candidate.updatedAt !== 'string') return false;\n if (candidate.keytarAccount !== undefined && typeof candidate.keytarAccount !== 'string') return false;\n\n if (candidate.type === 'gitlab') {\n return typeof candidate.serverUrl === 'string';\n }\n\n return true;\n}\n\nasync function writeCredentialsMetadata(metadata: CredentialMetadata[]): Promise<void> {\n const credentialsFilePath = await getCredentialsFilePath();\n await fs.writeFile(credentialsFilePath, JSON.stringify(metadata, null, 2), 'utf-8');\n}\n\nasync function readCredentialsMetadata(): Promise<CredentialMetadata[]> {\n const credentialsFilePath = await getCredentialsFilePath();\n\n try {\n const content = await fs.readFile(credentialsFilePath, 'utf-8');\n const parsed = JSON.parse(content) as unknown;\n\n if (Array.isArray(parsed)) {\n return parsed.filter(isCredentialMetadata);\n }\n\n if (!parsed || typeof parsed !== 'object') {\n return [];\n }\n\n const legacyMapped = parsed as Record<string, unknown>;\n const migrated: CredentialMetadata[] = [];\n\n if (isLegacyCredentialMetadata(legacyMapped.github, 'github')) {\n const metadata = legacyMapped.github;\n migrated.push({\n id: generateId(),\n type: 'github',\n username: metadata.username,\n createdAt: metadata.createdAt,\n updatedAt: metadata.updatedAt,\n keytarAccount: getLegacyKeytarAccount('github'),\n });\n }\n\n if (isLegacyCredentialMetadata(legacyMapped.gitlab, 'gitlab')) {\n const metadata = legacyMapped.gitlab;\n migrated.push({\n id: generateId(),\n type: 'gitlab',\n username: metadata.username,\n serverUrl: metadata.serverUrl,\n createdAt: metadata.createdAt,\n updatedAt: metadata.updatedAt,\n keytarAccount: getLegacyKeytarAccount('gitlab'),\n });\n }\n\n if (migrated.length > 0) {\n await writeCredentialsMetadata(migrated);\n }\n\n return migrated;\n } catch (error) {\n if ((error as NodeJS.ErrnoException)?.code === 'ENOENT') {\n return [];\n }\n\n console.error('Failed to parse credentials metadata:', error);\n return [];\n }\n}\n\nexport async function getAllCredentials(): Promise<Credential[]> {\n const metadata = await readCredentialsMetadata();\n\n return metadata\n .map(toCredential)\n .sort((a, b) => b.updatedAt.localeCompare(a.updatedAt));\n}\n\nexport async function getCredentialById(id: string): Promise<Credential | null> {\n const metadata = await readCredentialsMetadata();\n const found = metadata.find((credential) => credential.id === id);\n return found ? toCredential(found) : null;\n}\n\nexport async function getCredentialToken(id: string): Promise<string | null> {\n const metadata = await readCredentialsMetadata();\n const found = metadata.find((credential) => credential.id === id);\n if (!found) {\n return null;\n }\n\n const keytar = await loadKeytar();\n if (!keytar) {\n return null;\n }\n\n return keytar.getPassword(SERVICE_NAME, getKeytarAccountForMetadata(found));\n}\n\nasync function verifyGitHubToken(token: string): Promise<{ valid: boolean; username?: string; error?: string }> {\n try {\n const response = await fetch('https://api.github.com/user', {\n headers: {\n Authorization: `Bearer ${token}`,\n Accept: 'application/vnd.github+json',\n 'X-GitHub-Api-Version': '2022-11-28',\n },\n });\n\n if (!response.ok) {\n if (response.status === 401) {\n return { valid: false, error: 'Invalid or expired GitHub token.' };\n }\n return { valid: false, error: `GitHub API returned ${response.status}.` };\n }\n\n const data = await response.json();\n const username = typeof data?.login === 'string' ? data.login : null;\n if (!username) {\n return { valid: false, error: 'GitHub API response did not include a username.' };\n }\n\n return { valid: true, username };\n } catch (error) {\n return { valid: false, error: `Failed to verify GitHub token: ${(error as Error).message}` };\n }\n}\n\nasync function verifyGitLabToken(serverUrl: string, token: string): Promise<{ valid: boolean; username?: string; error?: string }> {\n try {\n const normalizedUrl = normalizeGitLabServerUrl(serverUrl);\n const response = await fetch(`${normalizedUrl}/api/v4/user`, {\n headers: {\n 'PRIVATE-TOKEN': token,\n },\n });\n\n if (!response.ok) {\n if (response.status === 401) {\n return { valid: false, error: 'Invalid or expired GitLab token.' };\n }\n return { valid: false, error: `GitLab API returned ${response.status}.` };\n }\n\n const data = await response.json();\n const username = typeof data?.username === 'string' ? data.username : null;\n if (!username) {\n return { valid: false, error: 'GitLab API response did not include a username.' };\n }\n\n return { valid: true, username };\n } catch (error) {\n return { valid: false, error: `Failed to verify GitLab token: ${(error as Error).message}` };\n }\n}\n\nexport async function createGitHubCredential(token: string): Promise<{ success: boolean; credential?: GitHubCredential; error?: string }> {\n const trimmedToken = token.trim();\n if (!trimmedToken) {\n return { success: false, error: 'GitHub token is required.' };\n }\n\n let keytar: KeytarModule;\n try {\n keytar = await requireKeytar();\n } catch (error) {\n return { success: false, error: (error as Error).message };\n }\n\n const verification = await verifyGitHubToken(trimmedToken);\n if (!verification.valid || !verification.username) {\n return { success: false, error: verification.error || 'Failed to verify GitHub token.' };\n }\n\n const metadata = await readCredentialsMetadata();\n const duplicate = metadata.find((credential) => (\n credential.type === 'github'\n && credential.username === verification.username\n ));\n\n if (duplicate) {\n return { success: false, error: `A GitHub credential for ${verification.username} already exists.` };\n }\n\n const id = generateId();\n const now = new Date().toISOString();\n const keytarAccount = getDefaultKeytarAccount(id);\n\n await keytar.setPassword(SERVICE_NAME, keytarAccount, trimmedToken);\n\n const created: CredentialMetadata = {\n id,\n type: 'github',\n username: verification.username,\n createdAt: now,\n updatedAt: now,\n keytarAccount,\n };\n\n metadata.push(created);\n await writeCredentialsMetadata(metadata);\n\n return {\n success: true,\n credential: {\n id: created.id,\n type: 'github',\n username: created.username,\n createdAt: created.createdAt,\n updatedAt: created.updatedAt,\n },\n };\n}\n\nexport async function createGitLabCredential(\n serverUrl: string,\n token: string,\n): Promise<{ success: boolean; credential?: GitLabCredential; error?: string }> {\n const normalizedServerUrl = normalizeGitLabServerUrl(serverUrl);\n const trimmedToken = token.trim();\n\n if (!normalizedServerUrl) {\n return { success: false, error: 'GitLab server URL is required.' };\n }\n\n try {\n new URL(normalizedServerUrl);\n } catch {\n return { success: false, error: 'GitLab server URL must be a valid URL.' };\n }\n\n if (!trimmedToken) {\n return { success: false, error: 'GitLab token is required.' };\n }\n\n let keytar: KeytarModule;\n try {\n keytar = await requireKeytar();\n } catch (error) {\n return { success: false, error: (error as Error).message };\n }\n\n const verification = await verifyGitLabToken(normalizedServerUrl, trimmedToken);\n if (!verification.valid || !verification.username) {\n return { success: false, error: verification.error || 'Failed to verify GitLab token.' };\n }\n\n const metadata = await readCredentialsMetadata();\n const duplicate = metadata.find((credential) => (\n credential.type === 'gitlab'\n && credential.username === verification.username\n && credential.serverUrl === normalizedServerUrl\n ));\n\n if (duplicate) {\n return {\n success: false,\n error: `A GitLab credential for ${verification.username} on ${normalizedServerUrl} already exists.`,\n };\n }\n\n const id = generateId();\n const now = new Date().toISOString();\n const keytarAccount = getDefaultKeytarAccount(id);\n\n await keytar.setPassword(SERVICE_NAME, keytarAccount, trimmedToken);\n\n const created: CredentialMetadata = {\n id,\n type: 'gitlab',\n username: verification.username,\n serverUrl: normalizedServerUrl,\n createdAt: now,\n updatedAt: now,\n keytarAccount,\n };\n\n metadata.push(created);\n await writeCredentialsMetadata(metadata);\n\n return {\n success: true,\n credential: {\n id: created.id,\n type: 'gitlab',\n username: created.username,\n serverUrl: created.serverUrl || normalizedServerUrl,\n createdAt: created.createdAt,\n updatedAt: created.updatedAt,\n },\n };\n}\n\nexport async function deleteCredential(id: string): Promise<{ success: boolean; error?: string }> {\n const metadata = await readCredentialsMetadata();\n const index = metadata.findIndex((credential) => credential.id === id);\n\n if (index === -1) {\n return { success: false, error: 'Credential not found.' };\n }\n\n const credential = metadata[index];\n metadata.splice(index, 1);\n await writeCredentialsMetadata(metadata);\n\n const keytar = await loadKeytar();\n if (keytar) {\n await keytar.deletePassword(SERVICE_NAME, getKeytarAccountForMetadata(credential));\n }\n\n return { success: true };\n}\n","export {deleteSessionInBackground as '40acb5533c82b54fda92c8cd116bc5eff1ca93ed05'} from 'ACTIONS_MODULE0'\nexport {getSessionDivergence as '40c0b0e8e3886b168c56bf35ad920be9c717054f39'} from 'ACTIONS_MODULE0'\nexport {getSessionUncommittedFileCount as '40fb152558189cb58884e7d0acd4ca9278c762232f'} from 'ACTIONS_MODULE0'\nexport {listSessionBaseBranches as '409caa86065050fbcadc5ba1f111667b17eb6a147d'} from 'ACTIONS_MODULE0'\nexport {mergeSessionToBase as '40839d6f1980de68ef06e70656efb94571720dfe31'} from 'ACTIONS_MODULE0'\nexport {rebaseSessionOntoBase as '40d3528b66f4430a24d29f869e74cde78aea7f86a9'} from 'ACTIONS_MODULE0'\nexport {updateSessionBaseBranch as '60ea9ee38855f2f1636724f1b870ab21757c2118f3'} from 'ACTIONS_MODULE0'\nexport {writeSessionPromptFile as '602d2564016faf134d089f3103b15d3fecde7154ff'} from 'ACTIONS_MODULE0'\nexport {setTmuxSessionMouseMode as '7fe326048282569666932c39dc794e059cf2360686'} from 'ACTIONS_MODULE1'\nexport {setTmuxSessionStatusVisibility as '7f2bb66b69f4d8e13fd64cd717458dfa96dd7f3fd3'} from 'ACTIONS_MODULE1'\nexport {getConfig as '00cd80dc5a4a84c6544b997eb412d9fec0f08638d5'} from 'ACTIONS_MODULE2'\nexport {updateConfig as '4014476978d1b7b7928122371ecaf1a366c694b482'} from 'ACTIONS_MODULE2'\nexport {getHomeDirectory as '005d259cc8fa8d952f814b4fb979df53e92986d9a5'} from 'ACTIONS_MODULE1'\nexport {listPathEntries as '406bf07eea307746af974ede033e2bff5d4ae45879'} from 'ACTIONS_MODULE1'\nexport {saveAttachments as '7f5447571c45e842042484075d6317cc6616d95234'} from 'ACTIONS_MODULE1'\nexport {consumeSessionLaunchContext as '403d01ddfa46ce8610976246966b664f0946702936'} from 'ACTIONS_MODULE0'\nexport {getSessionMetadata as '4097dda25382b44a878e1536ddfd83526a3409dbb7'} from 'ACTIONS_MODULE0'\nexport {markSessionInitialized as '4003e7c19a1d64b9d311a6e8f69bfed651e6c0a0c7'} from 'ACTIONS_MODULE0'\nexport {getSessionTerminalSources as '7f5dded1f90b9ee17c0318b47640fddefe4a9839b9'} from 'ACTIONS_MODULE1'\nexport {startTtydProcess as '7f9f1c8bfbea857703a62a8b12c5404cc5fe241ff2'} from 'ACTIONS_MODULE1'\n"],"names":["registerServerReference","ensureServerEntryExports","actions","i","length","action","Error"],"mappings":"mTAAoD,OAAA,cAAA,CAAA,EAAA,aAAA,oCAC3CA,0BAAAA,qCAAAA,EAAAA,uBAAuB,YAAQ,CAAA,CAAA,IAAA,iCCEjC,SAASC,EAAyBC,CAAc,EACrD,IAAK,IAAIC,EAAI,EAAGA,EAAID,EAAQE,MAAM,CAAED,IAAK,CACvC,IAAME,EAASH,CAAO,CAACC,EAAE,CACzB,GAAI,AAAkB,YAAY,OAAvBE,EACT,MAAM,OAAA,cAEL,CAFK,AAAIC,MACR,CAAC,2DAA2D,EAAE,OAAOD,EAAO;AAAA,oEAAuE,CAAC,EADhJ,oBAAA,OAAA,mBAAA,gBAAA,CAEN,EAEJ,CACF,0EATgBJ,2BAAAA,qCAAAA,6BCHhB,IAAA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OAEA,IAAM,EAAe,uBAgDjB,EAAqD,KACrD,EAAyC,KACzC,GAAsB,EAE1B,SAAS,WACP,AAAI,EACK,CAAC,sBADmB,oBACuB,EAAE,EAAA,CAAyB,CAExE,2DACT,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