add provider_list

This commit is contained in:
Dax Raad
2025-05-28 12:53:22 -04:00
parent 4132fcc1b2
commit 55a6fcdd3f
14 changed files with 458 additions and 76 deletions

25
js/src/bun/index.ts Normal file
View File

@@ -0,0 +1,25 @@
import path from "node:path";
import { Log } from "../util/log";
export namespace BunProc {
const log = Log.create({ service: "bun" });
export function run(
cmd: string[],
options?: Bun.SpawnOptions.OptionsObject<any, any, any>,
) {
const root = path.resolve(process.cwd(), process.argv0);
log.info("running", {
cmd: [root, ...cmd],
options,
});
const result = Bun.spawnSync([root, ...cmd], {
...options,
argv0: "bun",
env: {
...process.env,
...options?.env,
},
});
return result;
}
}