Aspirerelease/17.0
Watch Aspire live streamsDocsTry Aspire

DenoAppResource

Handle
📦 Aspire.Hosting.JavaScript v17.0.0

A resource that represents a Deno application.

type DenoAppResource interface {
IComputeResource
IContainerFilesDestinationResource
Resource
ResourceWithArgs
ResourceWithContainerFiles
ResourceWithEndpoints
ResourceWithEnvironment
ResourceWithServiceDiscovery
ResourceWithWaitSupport
}

Properties

propertyResourceTypeDisplayNamestringget
Gets the ResourceTypeDisplayName property
ResourceTypeDisplayName() (string, error)

Methods

methodWithDenoAllowbuilder
Grants a Deno permission, optionally scoped to the supplied values.
WithDenoAllow(
kind DenoPermissionKind,
values []string,
) DenoAppResource
kindDenoPermissionKindThe permission to grant.
values[]stringOptional values that scope the permission. When empty, all access of the selected kind is allowed.
DenoAppResource

The resource builder.

Returns a handle; failures surface later via Err().

methodWithDenoAllowAllbuilder
Controls the blanket -A/--allow-all grant.
WithDenoAllowAll(options ...*WithDenoAllowAllOptions) DenoAppResource
options...*WithDenoAllowAllOptionsOptional settings, described under Options.

Optional parameters are passed in a trailing options ...*WithDenoAllowAllOptions argument.

Enabled*boolWhether to emit -A/--allow-all. Pass false to grant only permissions configured with WithDenoAllow.
DenoAppResource

The resource builder.

Returns a handle; failures surface later via Err().

methodWithDenoConfigbuilder
Sets --config <file> (path to a deno.json/deno.jsonc).
WithDenoConfig(configFile string) DenoAppResource
configFilestringThe Deno configuration file path.
DenoAppResource

The resource builder.

Returns a handle; failures surface later via Err().

methodWithDenoDenybuilder
Denies a Deno permission, optionally scoped to the supplied values.
WithDenoDeny(
kind DenoPermissionKind,
values []string,
) DenoAppResource
kindDenoPermissionKindThe permission to deny.
values[]stringOptional values that scope the permission. When empty, all access of the selected kind is denied.
DenoAppResource

The resource builder.

Returns a handle; failures surface later via Err().

methodWithDenoImportMapbuilder
Sets --import-map <file>.
WithDenoImportMap(importMapFile string) DenoAppResource
importMapFilestringThe import map file path.
DenoAppResource

The resource builder.

Returns a handle; failures surface later via Err().

methodWithDenoInspectbuilder
Enables a Deno inspector mode, optionally at hostPort (for example 127.0.0.1:9229).
WithDenoInspect(options ...*WithDenoInspectOptions) DenoAppResource
options...*WithDenoInspectOptionsOptional settings, described under Options.

Optional parameters are passed in a trailing options ...*WithDenoInspectOptions argument.

Mode*DenoInspectModeThe inspector mode to enable.
HostPort*stringThe optional inspector host:port value.
DenoAppResource

The resource builder.

Returns a handle; failures surface later via Err().

methodWithDenoLockbuilder
Sets --lock <file>.
WithDenoLock(lockFile string) DenoAppResource
lockFilestringThe lockfile path.
DenoAppResource

The resource builder.

Returns a handle; failures surface later via Err().

Sets --node-modules-dir, optionally with a mode emitted as --node-modules-dir=<mode>.
WithDenoNodeModulesDir(options ...*WithDenoNodeModulesDirOptions) DenoAppResource
options...*WithDenoNodeModulesDirOptionsOptional settings, described under Options.

Optional parameters are passed in a trailing options ...*WithDenoNodeModulesDirOptions argument.

Mode*DenoNodeModulesDirModeThe node_modules mode. When null, emits --node-modules-dir without a value.
DenoAppResource

The resource builder.

Returns a handle; failures surface later via Err().

methodWithDenoNoLockbuilder
Sets --no-lock, disabling lockfile use.
WithDenoNoLock() DenoAppResource
DenoAppResource

The resource builder.

Returns a handle; failures surface later via Err().

methodWithDenoRunbuilder
Selects the deno run <entrypoint> mode (the default).
WithDenoRun() DenoAppResource
DenoAppResource

The resource builder.

Returns a handle; failures surface later via Err().

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
args[]stringThe runtime arguments to append before the entrypoint or task name.
DenoAppResource

The resource builder.

Returns a handle; failures surface later via Err().

methodWithDenoScriptArgsbuilder
Appends arguments passed to the script AFTER the entrypoint. Deno forwards everything after the entrypoint to the running program.
WithDenoScriptArgs(args []string) DenoAppResource
args[]stringThe script arguments to append after the entrypoint or task name.
DenoAppResource

The resource builder.

Returns a handle; failures surface later via Err().

methodWithDenoServebuilder
Selects the deno serve <entrypoint> mode for serving an HTTP entrypoint.
WithDenoServe() DenoAppResource
DenoAppResource

The resource builder.

Returns a handle; failures surface later via Err().

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

The resource builder.

Returns a handle; failures surface later via Err().

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
features[]stringThe unstable feature names or fully-qualified --unstable-* flags to emit.
DenoAppResource

The resource builder.

Returns a handle; failures surface later via Err().

methodWithDenoWatchbuilder
Enables --watch (or --watch-hmr when hmr is true).
WithDenoWatch(options ...*WithDenoWatchOptions) DenoAppResource
options...*WithDenoWatchOptionsOptional settings, described under Options.

Optional parameters are passed in a trailing options ...*WithDenoWatchOptions argument.

Hmr*boolWhether to emit --watch-hmr instead of --watch.
DenoAppResource

The resource builder.

Returns a handle; failures surface later via Err().