createBunAdapter
Generated reference page for the createBunAdapter function export.
- Import:
@kjanat/dreamcli/runtime - Export kind: function
- Declared in:
src/runtime/bun.ts - Source link:
packages/dreamcli/src/runtime/bun.ts:48
Signatures
ts
function createBunAdapter(proc?: NodeProcess): RuntimeAdapter;| Parameter | Type | Description |
|---|---|---|
proc | NodeProcess | undefined | Override the process object (useful for testing the adapter itself). |
Members
Members
createBunAdapter
Create a runtime adapter backed by Bun's Node-compatible process global.
Bun exposes globalThis.process with the same shape as Node.js, so this delegates entirely to createNodeAdapter. If Bun-specific optimizations are needed in the future (e.g. Bun.write for I/O), they can be layered here without changing the public API.
ts
(proc?: NodeProcess): RuntimeAdapter;Examples
ts
import { cli } from '@kjanat/dreamcli';
import { createBunAdapter } from '@kjanat/dreamcli/runtime';
cli('mycli')
.command(deploy)
.run({ adapter: createBunAdapter() });