SDK-neutral Aspire diagnostics, config parsing, contribution ports, and TypeScript AppHost
generation for NetScript plugin packages. This page is generated from the package's public
surface with deno doc (US-2). For the full index of packages and plugins return to the
reference overview.
The root entrypoint (@netscript/aspire) exposes the diagnostic contract only. Composition,
config, schema, type, adapter, and testing APIs live on typed sub-path exports:
Resolve the effective Deno permission flags for a resource.
resolveWorkdir
function
function resolveWorkdir(section: string, key: string, explicitWorkdir?: string): string
Resolve the default working directory for a resource entry.
resolveWorkspacePath
function
function resolveWorkspacePath(appHostDir: string, relativePath: string): string
Resolve a workspace-relative path from the AppHost directory.
Composition interfaces and type aliases
Symbol
Kind
Description
AspireBuilder
interface
Port implemented by adapters that emit Aspire AppHost resources.
AspireResource
interface
Resource descriptor returned by Aspire builder ports.
ComposeAppHostOptions
interface
Options for composing plugin Aspire contributions into an AppHost builder.
ComposeAppHostResult
interface
Result of composing an AppHost from plugin Aspire contributions.
ComposePluginManifest
interface
Minimal manifest shape consumed by Aspire composition.
ContributionContext
interface
Context passed to plugin Aspire contributions during AppHost composition.
PortAllocationOptions
interface
Port allocation options for Aspire composition.
ViteEnvVarNames
interface
Generated VITE environment variable name pair.
AspireResourceKind
type alias
Aspire resource kinds produced by plugin contributions.
OtelMode
type alias
Registration mode determining which OTEL env vars are needed.
Adapters (@netscript/aspire/adapters)
The SDK-neutral TypeScript builder adapter used to compose an AppHost.
Symbol
Kind
Signature
Description
AspireTypeScriptBuilder
class
class AspireTypeScriptBuilder extends MemoryAspireBuilder
SDK-neutral builder adapter for TypeScript AppHost composition tests.
createPortAllocator
function
function createPortAllocator(options: PortAllocationOptions): (key: string, fallback?: number) => number
Create a deterministic port allocator for plugin resources.
resolveEnvSource
function
function resolveEnvSource(source: EnvSource | string, options: ResolveEnvSourceOptions): string
Resolve an environment source into a concrete string.
AspireResource
interface
—
Resource descriptor returned by Aspire builder ports.
PortAllocationOptions
interface
—
Port allocation options for Aspire composition.
ResolveEnvSourceOptions
interface
—
Options for resolving plugin environment variable sources.
EnvSource
type alias
—
Source for an environment variable value in an AppHost composition.
Testing (@netscript/aspire/testing)
In-memory builder, the plugin contribution base class, and deterministic fixtures for plugin
authors writing Aspire composition tests.
Symbol
Kind
Signature
Description
AspireNSPluginContribution
class
—
Base class plugins extend to contribute Aspire resources to an AppHost.
MemoryAspireBuilder
class
class MemoryAspireBuilder implements AspireBuilder
In-memory Aspire builder used by tests and examples.
ExampleAspireContribution
class
class ExampleAspireContribution extends AspireNSPluginContribution
Example contribution used by public tests and README snippets.
createContributionContextFixture
function
function createContributionContextFixture(overrides: Partial<ContributionContext>): ContributionContext
Create a deterministic contribution context for Aspire tests.
AspireBuilder
interface
—
Port implemented by adapters that emit Aspire AppHost resources.
AspireResource
interface
—
Resource descriptor returned by Aspire builder ports.
ContributionContext
interface
—
Context passed to plugin Aspire contributions during AppHost composition.
CacheSpec
interface
—
Cache resource spec consumed by AspireBuilder.
ContainerSpec
interface
—
Container resource spec consumed by AspireBuilder.
DatabaseSpec
interface
—
Database resource spec consumed by AspireBuilder.
DenoServiceSpec
interface
—
Deno service resource spec consumed by AspireBuilder.
DenoBackgroundSpec
interface
—
Deno background process spec consumed by AspireBuilder.
HealthCheckSpec
interface
—
Health check expectation declared by a plugin contribution.
MemoryAspireReference
interface
—
Recorded relationship between two in-memory Aspire resources.
AspireResourceKind
type alias
—
Aspire resource kinds produced by plugin contributions.
Sub-path exports
The following entrypoints are published alongside the root export. Each is generated from its own
deno doc surface and documented in the sections above.
Export
Entrypoint
Purpose
@netscript/aspire
./mod.ts
Diagnostic contract (inspectAspire).
@netscript/aspire/config
./config.ts
appsettings.json parsing, Zod schemas, and entry interfaces.
@netscript/aspire/schema
./schema.ts
JSON Schema generation from the Zod config schema.
@netscript/aspire/types
./types.ts
Inferred config types and known-name extractors.
@netscript/aspire/constants
./constants.ts
Config keys, sections, and runtime defaults.
@netscript/aspire/application
./src/application/mod.ts
AppHost composition, contribution registry, and resolvers.
@netscript/aspire/adapters
./src/adapters/mod.ts
SDK-neutral TypeScript builder adapter.
@netscript/aspire/testing
./src/testing/mod.ts
In-memory builder, contribution base class, and fixtures.