Watch Aspire live streamsDocsTry Aspire

DenoAppResource

Handle
📦 Aspire.Hosting.JavaScript v13.6.4
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
kindDenoPermissionKindThe permission to grant.
valuesstring[]Optional values that scope the permission. When empty, all access of the selected kind is allowed.
DenoAppResource
methodwithDenoAllowAllbuilder
Controls the blanket `-A`/`--allow-all` grant.
withDenoAllowAll(enabled?: boolean): DenoAppResource
enabledbooleanoptional= TrueWhether to emit `-A`/`--allow-all`. Pass `false` to grant only permissions configured with `WithDenoAllow`.
DenoAppResource
methodwithDenoConfigbuilder
Sets `--config <file>` (path to a `deno.json`/`deno.jsonc`).
withDenoConfig(configFile: string): DenoAppResource
configFilestringThe Deno configuration file path.
DenoAppResource
methodwithDenoDenybuilder
Denies a Deno permission, optionally scoped to the supplied values.
withDenoDeny(
kind: DenoPermissionKind,
values: string[]): DenoAppResource
kindDenoPermissionKindThe permission to deny.
valuesstring[]Optional values that scope the permission. When empty, all access of the selected kind is denied.
DenoAppResource
methodwithDenoImportMapbuilder
Sets `--import-map <file>`.
withDenoImportMap(importMapFile: string): DenoAppResource
importMapFilestringThe import map file path.
DenoAppResource
methodwithDenoInspectbuilder
Enables a Deno inspector mode, optionally at `hostPort` (for example `127.0.0.1:9229`).
withDenoInspect(
mode?: DenoInspectMode,
hostPort?: string): DenoAppResource
modeDenoInspectModeoptional= InspectThe inspector mode to enable.
hostPortstringoptionalThe optional inspector host:port value.
DenoAppResource
methodwithDenoLockbuilder
Sets `--lock <file>`.
withDenoLock(lockFile: string): DenoAppResource
lockFilestringThe lockfile path.
DenoAppResource
Sets `--node-modules-dir`, optionally with a mode emitted as `--node-modules-dir=<mode>`.
withDenoNodeModulesDir(mode?: DenoNodeModulesDirMode): DenoAppResource
modeDenoNodeModulesDirModeoptionalThe node_modules mode. When `null`, emits `--node-modules-dir` without a value.
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[]The runtime arguments to append before the entrypoint or task name.
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[]The script arguments to append after the entrypoint or task name.
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
taskNamestringThe name of the task in `deno.json` to run.
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[]The unstable feature names or fully-qualified `--unstable-*` flags to emit.
DenoAppResource
methodwithDenoWatchbuilder
Enables `--watch` (or `--watch-hmr` when `hmr` is `true`).
withDenoWatch(hmr?: boolean): DenoAppResource
hmrbooleanoptional= FalseWhether to emit `--watch-hmr` instead of `--watch`.
DenoAppResource