claude code drop from npm

This commit is contained in:
2026-04-02 11:51:49 +03:00
commit ffe24f128e
1905 changed files with 513700 additions and 0 deletions

22
utils/bundledMode.ts Normal file
View File

@@ -0,0 +1,22 @@
/**
* Detects if the current runtime is Bun.
* Returns true when:
* - Running a JS file via the `bun` command
* - Running a Bun-compiled standalone executable
*/
export function isRunningWithBun(): boolean {
// https://bun.com/guides/util/detect-bun
return process.versions.bun !== undefined
}
/**
* Detects if running as a Bun-compiled standalone executable.
* This checks for embedded files which are present in compiled binaries.
*/
export function isInBundledMode(): boolean {
return (
typeof Bun !== 'undefined' &&
Array.isArray(Bun.embeddedFiles) &&
Bun.embeddedFiles.length > 0
)
}