Skip to main content
Module

x/dectyl/mod.ts>DeployOptions

Prototype library for testing Deno Deploy scripts using the Deno CLI
Go to Latest
interface DeployOptions
implements DeployWorkerOptions
import { type DeployOptions } from "https://deno.land/x/dectyl@0.10.3/mod.ts";

Properties

optional
bundle: boolean

Determines if the Deploy script should be bundled before being imported into the worker. This defaults to true.

If not bundling before deploying in the worker, it means the Deno CLI process will import the root module and all of its dependencies, applying the Deno CLI settings. This means by default it will type check any TypeScript modules and has different defaults for JSX/TSX if used in the application. You may want to use --no-check and --config to change these behaviors.

optional
cwd: string

A fully qualified path to what should be used for the cwd overriding the default Deno.cwd(). When local file URLs are relative the value of the cwd is used to fully resolve the path.

optional
host: string

The host to use when sending requests into the worker. Defaults to localhost.

optional
localAddr: Deno.NetAddr

What the local address will appear as in network connections. Defaults to { hostname: "127.0.0.1", port: 80, transport: "tcp" }

optional
fetchHandler: FetchHandler | FetchHandler[]

An optional handler for fetch requests coming from the deploy script. This is design to allow outbound fetch requests from the Deploy script to be intercepted. If the respondWith() is not called in the handler, then the request will simply be passed through to the native fetch().

If the value is an array, each handler in the array will be called until one responds, if none of them responds, then the request will be passed to the native fetch().

optional
name: string

The name of the deploy worker. If undefined a unique name will be generated.

optional
watch: boolean

If the deploy specifier is a local specifier, watch it, and its dependencies for changes and reload the worker when changed.