The best way to control Claude Code, Codex and more from any computer or phone
Mirrored from https://github.com/Camo67/t3code.git
Synced Nov 21, 03:37 UTC
| 1 | /** Keep bundler externals aligned with the staged production dependency list. */ |
| 2 | const DESKTOP_RUNTIME_EXTERNAL_PREFIXES = [ |
| 3 | "@napi-rs/keyring", |
| 4 | "@crowecawcaw/xa11y", |
| 5 | "@clerk/electron-passkeys", |
| 6 | "electron-webauthn", |
| 7 | "ffi-rs", |
| 8 | "@yuuang/", |
| 9 | // Playwright reads its runtime bundle/driver from disk; inlining cannot replace those files. |
| 10 | "playwright-core", |
| 11 | ] as const; |
| 12 | |
| 13 | export function isDesktopRuntimeExternalDependency(id: string): boolean { |
| 14 | return DESKTOP_RUNTIME_EXTERNAL_PREFIXES.some((prefix) => id.startsWith(prefix)); |
| 15 | } |
| 16 | |
| 17 | export function selectDesktopRuntimeExternalDependencies( |
| 18 | dependencies: Readonly<Record<string, string>>, |
| 19 | ): Record<string, string> { |
| 20 | return Object.fromEntries( |
| 21 | Object.entries(dependencies).filter(([name]) => isDesktopRuntimeExternalDependency(name)), |
| 22 | ); |
| 23 | } |