Aspirerelease/17.0
Watch Aspire live streamsDocsTry Aspire

Aspire.Hosting.JavaScript

Official
📦 Aspire.Hosting.JavaScriptv17.0.0
Import pathapphost/modules/aspire
35Functions
10Types

Handles

Enums

Functions

DenoAppResource

methodWithDenoAllowbuilder
Grants a Deno permission, optionally scoped to the supplied values.
WithDenoAllow(kind DenoPermissionKind, values []string) DenoAppResource
methodWithDenoAllowAllbuilder
Controls the blanket -A/--allow-all grant.
WithDenoAllowAll(options ...*WithDenoAllowAllOptions) DenoAppResource
methodWithDenoConfigbuilder
Sets --config <file> (path to a deno.json/deno.jsonc).
WithDenoConfig(configFile string) DenoAppResource
methodWithDenoDenybuilder
Denies a Deno permission, optionally scoped to the supplied values.
WithDenoDeny(kind DenoPermissionKind, values []string) DenoAppResource
methodWithDenoImportMapbuilder
Sets --import-map <file>.
WithDenoImportMap(importMapFile string) DenoAppResource
methodWithDenoInspectbuilder
Enables a Deno inspector mode, optionally at hostPort (for example 127.0.0.1:9229).
WithDenoInspect(options ...*WithDenoInspectOptions) DenoAppResource
methodWithDenoLockbuilder
Sets --lock <file>.
WithDenoLock(lockFile string) DenoAppResource
methodWithDenoNodeModulesDirbuilder
Sets --node-modules-dir, optionally with a mode emitted as --node-modules-dir=<mode>.
WithDenoNodeModulesDir(options ...*WithDenoNodeModulesDirOptions) DenoAppResource
methodWithDenoNoLockbuilder
Sets --no-lock, disabling lockfile use.
WithDenoNoLock() DenoAppResource
methodWithDenoRunbuilder
Selects the deno run <entrypoint> mode (the default).
WithDenoRun() 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
methodWithDenoScriptArgsbuilder
Appends arguments passed to the script AFTER the entrypoint. Deno forwards everything after the entrypoint to the running program.
WithDenoScriptArgs(args []string) DenoAppResource
methodWithDenoServebuilder
Selects the deno serve <entrypoint> mode for serving an HTTP entrypoint.
WithDenoServe() 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
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
methodWithDenoWatchbuilder
Enables --watch (or --watch-hmr when hmr is true).
WithDenoWatch(options ...*WithDenoWatchOptions) DenoAppResource

JavaScriptAppResource

methodPublishAsNodeServerbuilder
Configures the JavaScript application to publish as a standalone Node.js server that runs a built artifact directly.
PublishAsNodeServer(entryPoint string, options ...*PublishAsNodeServerOptions) JavaScriptAppResource
methodPublishAsPackageScriptbuilder
Configures the JavaScript application to publish as a server that runs a package manager script at runtime.
PublishAsPackageScript(options ...*PublishAsPackageScriptOptions) JavaScriptAppResource
methodPublishAsStaticWebsitebuilder
Publishes the JavaScript application as a standalone static website using YARP.
PublishAsStaticWebsite(options ...*PublishAsStaticWebsiteOptions) JavaScriptAppResource
methodWithBrowserDebuggerbuilder
Configures a browser debugger for the JavaScript application resource, enabling browser-based debugging through a child resource that launches when the parent application is ready.
WithBrowserDebugger(options ...*WithBrowserDebuggerOptions) JavaScriptAppResource
methodWithBuildScriptbuilder
Adds a build script annotation to the resource builder using the specified command-line arguments.
WithBuildScript(scriptName string, options ...*WithBuildScriptOptions) JavaScriptAppResource
methodWithBunbuilder
Configures the JavaScript resource to use Bun as the package manager and optionally installs packages before the application starts.
WithBun(options ...*WithBunOptions) JavaScriptAppResource
methodWithDenobuilder
Configures the JavaScript resource to use Deno as the package manager.
WithDeno(options ...*WithDenoOptions) JavaScriptAppResource
methodWithNpmbuilder
Configures the Node.js resource to use npm as the package manager and optionally installs packages before the application starts.
WithNpm(options ...*WithNpmOptions) JavaScriptAppResource
methodWithPnpmbuilder
Configures the Node.js resource to use pnpm as the package manager and optionally installs packages before the application starts.
WithPnpm(options ...*WithPnpmOptions) JavaScriptAppResource
methodWithRunScriptbuilder
Adds a run script annotation to the specified JavaScript application resource builder, specifying the script to execute and its arguments during run mode.
WithRunScript(scriptName string, options ...*WithRunScriptOptions) JavaScriptAppResource
methodWithYarnbuilder
Configures the Node.js resource to use yarn as the package manager and optionally installs packages before the application starts.
WithYarn(options ...*WithYarnOptions) JavaScriptAppResource