createDenoAdapter
Generated reference page for the createDenoAdapter function export.
- Import:
@kjanat/dreamcli/runtime - Export kind: function
- Declared in:
src/runtime/deno.ts - Source link:
packages/dreamcli/src/runtime/deno.ts:170
Signatures
ts
function createDenoAdapter(ns?: DenoNamespace): RuntimeAdapter;| Parameter | Type | Description |
|---|---|---|
ns | DenoNamespace | undefined | Override the Deno namespace (useful for testing the adapter itself). |
Members
Members
createDenoAdapter
Create a runtime adapter backed by the Deno namespace.
Reads Deno.args, Deno.env, Deno.cwd(), and wraps Deno's stream-based I/O into the WriteFn/ReadFn functions expected by the framework.
Unlike Node/Bun, Deno strips the binary and script path from Deno.args. The adapter prepends synthetic entries (['deno', 'run']) so the argv shape matches the RuntimeAdapter contract (binary + script + user args).
ts
(ns?: DenoNamespace): RuntimeAdapter;Examples
ts
import { cli } from '@kjanat/dreamcli';
import { createDenoAdapter } from '@kjanat/dreamcli/runtime';
cli('mycli')
.command(deploy)
.run({ adapter: createDenoAdapter() });