Skip to content

createDenoAdapter

Generated reference page for the createDenoAdapter function export.

Signatures

ts
function createDenoAdapter(ns?: DenoNamespace): RuntimeAdapter;
ParameterTypeDescription
nsDenoNamespace | undefinedOverride 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() });

See Also

Released under the MIT License.