fix: replace Bun-specific APIs with Node.js APIs for npm compatibility

- Replace Bun.spawn with exec from child_process in extract.ts
- Replace Bun.file().exists() with access from fs/promises
- Replace Bun.write with writeFile from fs/promises in github.ts
- Add cp and rm from fs/promises for file operations
- Bump version to 1.0.2

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Viet Tran
2025-12-02 19:23:28 +07:00
parent 77d47409c4
commit f9b65919cf
4 changed files with 40 additions and 33 deletions

View File

@@ -1,3 +1,4 @@
import { writeFile } from 'node:fs/promises';
import type { Release } from '../types/index.js';
const REPO_OWNER = 'nextlevelbuilder';
@@ -50,7 +51,7 @@ export async function downloadRelease(url: string, dest: string): Promise<void>
}
const buffer = await response.arrayBuffer();
await Bun.write(dest, buffer);
await writeFile(dest, Buffer.from(buffer));
}
export function getAssetUrl(release: Release): string | null {