Watch Aspire live streamsDocsTry Aspire

DenoAppResource

Handle
📦 Aspire.Hosting.JavaScript v13.6.0
interface DenoAppResource
extends IComputeResource,
IContainerFilesDestinationResource,
IResource,
IResourceWithArgs,
IResourceWithEndpoints,
IResourceWithEnvironment,
IResourceWithProbes,
IResourceWithWaitSupport,
IResourceWithContainerFiles,
IResourceWithServiceDiscovery {
withDenoAllow(
kind: DenoPermissionKind,
values: string[]): DenoAppResource;
withDenoAllowAll(enabled?: boolean): DenoAppResource;
withDenoConfig(configFile: string): DenoAppResource;
withDenoDeny(
kind: DenoPermissionKind,
values: string[]): DenoAppResource;
withDenoImportMap(importMapFile: string): DenoAppResource;
withDenoInspect(
mode?: DenoInspectMode,
hostPort?: string): DenoAppResource;
withDenoLock(lockFile: string): DenoAppResource;
withDenoNodeModulesDir(mode?: DenoNodeModulesDirMode): DenoAppResource;
withDenoNoLock(): DenoAppResource;
withDenoRun(): DenoAppResource;
withDenoRuntimeArgs(args: string[]): DenoAppResource;
withDenoScriptArgs(args: string[]): DenoAppResource;
withDenoServe(): DenoAppResource;
withDenoTask(taskName: string): DenoAppResource;
withDenoUnstable(features: string[]): DenoAppResource;
withDenoWatch(hmr?: boolean): DenoAppResource;
}

Methods

methodwithDenoAllowbuilder
Grants a Deno permission, optionally scoped to the supplied values.
withDenoAllow(
kind: DenoPermissionKind,
values: string[]): DenoAppResource
kindDenoPermissionKind
valuesstring[]
DenoAppResource
methodwithDenoAllowAllbuilder
Controls the blanket `-A`/`--allow-all` grant.
withDenoAllowAll(enabled?: boolean): DenoAppResource
enabledbooleanoptional= True
DenoAppResource
methodwithDenoConfigbuilder
Sets `--config <file>` (path to a `deno.json`/`deno.jsonc`).
withDenoConfig(configFile: string): DenoAppResource
configFilestring
DenoAppResource
methodwithDenoDenybuilder
Denies a Deno permission, optionally scoped to the supplied values.
withDenoDeny(
kind: DenoPermissionKind,
values: string[]): DenoAppResource
kindDenoPermissionKind
valuesstring[]
DenoAppResource
methodwithDenoImportMapbuilder
Sets `--import-map <file>`.
withDenoImportMap(importMapFile: string): DenoAppResource
importMapFilestring
DenoAppResource
methodwithDenoInspectbuilder
Enables a Deno inspector mode, optionally at `hostPort` (for example `127.0.0.1:9229`).
withDenoInspect(
mode?: DenoInspectMode,
hostPort?: string): DenoAppResource
modeDenoInspectModeoptional= Inspect
hostPortstringoptional
DenoAppResource
methodwithDenoLockbuilder
Sets `--lock <file>`.
withDenoLock(lockFile: string): DenoAppResource
lockFilestring
DenoAppResource
Sets `--node-modules-dir`, optionally with a mode emitted as `--node-modules-dir=<mode>`.
withDenoNodeModulesDir(mode?: DenoNodeModulesDirMode): DenoAppResource
modeDenoNodeModulesDirModeoptional
DenoAppResource
methodwithDenoNoLockbuilder
Sets `--no-lock`, disabling lockfile use.
withDenoNoLock(): DenoAppResource
DenoAppResource
methodwithDenoRunbuilder
Selects the `deno run <entrypoint>` mode (the default).
withDenoRun(): DenoAppResource
DenoAppResource
methodwithDenoRuntimeArgsbuilder
Appends raw runtime arguments injected verbatim BEFORE the entrypoint. This is the escape hatch that gives full parity with `AddExecutable("name", "deno", workdir, args...)` for any flag not covered by a dedicated `WithDeno*` method.
withDenoRuntimeArgs(args: string[]): DenoAppResource
argsstring[]
DenoAppResource
methodwithDenoScriptArgsbuilder
Appends arguments passed to the script AFTER the entrypoint. Deno forwards everything after the entrypoint to the running program.
withDenoScriptArgs(args: string[]): DenoAppResource
argsstring[]
DenoAppResource
methodwithDenoServebuilder
Selects the `deno serve <entrypoint>` mode for serving an HTTP entrypoint.
withDenoServe(): DenoAppResource
DenoAppResource
methodwithDenoTaskbuilder
Selects the `deno task <taskName>` mode, running a task defined in `deno.json` instead of a script entrypoint. Permissions are defined by the task itself and are not emitted for this mode.
withDenoTask(taskName: string): DenoAppResource
taskNamestring
DenoAppResource
methodwithDenoUnstablebuilder
Adds one or more `--unstable-*` flags. Each feature may be supplied bare (for example `"kv"`, `"worker-options"`, `"sloppy-imports"`) or fully qualified (`"--unstable-kv"`).
withDenoUnstable(features: string[]): DenoAppResource
featuresstring[]
DenoAppResource
methodwithDenoWatchbuilder
Enables `--watch` (or `--watch-hmr` when `hmr` is `true`).
withDenoWatch(hmr?: boolean): DenoAppResource
hmrbooleanoptional= False
DenoAppResource