UNPKG

@bitkyc08/opencodex

Version:

Universal provider proxy for OpenAI Codex & Claude Code — use any LLM with Codex CLI/App/SDK and Claude Code

17 lines (14 loc) • 741 B
import { delimiter, posix, win32 } from "node:path"; /** Shell-local version-manager bins disappear when the installing shell exits. */ export function isTransientServiceLauncherPath(path: string, platform: NodeJS.Platform = process.platform): boolean { const pathTools = platform === "win32" ? win32 : posix; return pathTools.normalize(path).replace(/\\/g, "/").split("/").some(component => /^(?:asdf|fnm|mise|nvm|volta)_multishells?$/i.test(component)); } export function filterTransientServicePath( path: string, pathDelimiter = delimiter, platform: NodeJS.Platform = process.platform, ): string { return path.split(pathDelimiter).filter(entry => !isTransientServiceLauncherPath(entry, platform)).join(pathDelimiter); }