Skip to content

Epic: TypeScript AppHost - Complete Integration Support #14069

@davidfowl

Description

@davidfowl

Epic: TypeScript AppHost - Complete Integration Support

Summary

Enable TypeScript AppHosts to use all Aspire integrations by adding [AspireExport] attributes across the entire integration surface and filling gaps in core framework type capabilities.

Background

The TypeScript AppHost infrastructure is complete:

  • ✅ ATS capability scanner discovers [AspireExport] attributes
  • ✅ JSON-RPC protocol for guest/host communication
  • ✅ TypeScript code generation, runtime SDK, fluent async chaining
  • ✅ Reference expressions, callbacks, handle registry, collection wrappers
  • ✅ CLI integration (aspire new/init --language typescript, aspire run, hot reload)
  • ✅ Core integrations: Redis, PostgreSQL, JavaScript already exported

Remaining work:

  • ~40 integrations are inaccessible to TypeScript AppHosts (no [AspireExport])
  • Core framework types have gaps (IConfiguration, IServiceProvider limited)
  • No documentation for TypeScript AppHost developers

Part 2: Core Framework Types (Gaps)

#15153

IConfiguration

  • getSection(key) → returns IConfigurationSection handle
  • getChildren() → returns array of section keys
  • exists(key) → boolean check
  • Export IConfigurationSection type with properties

IHostEnvironment

  • contentRootPath, applicationName property getters
  • isProduction(), isStaging(), isEnvironment(name) capabilities

IServiceProvider

  • Expand s_serviceTypes dictionary with common services
  • hasService(typeId) capability

Logging

  • Export ILogger / ILoggerFactory
  • logInformation, logWarning, logError capabilities

Eventing

  • subscribeBeforeStart, subscribeAfterResourcesCreated, subscribeBeforeResourceStarted callbacks
  • Resolve IServiceProvider callback exposure blocker

User secrets management


Part 3: Integration Exports

Per-Integration Checklist

For each integration:

  • Add [AspireExport] to all Add*, With*, Run*/As* extension methods
  • Add [AspireExport] to resource types
  • Add [AspireDto] to options/configuration classes
  • Handle method overloads with unique IDs
  • Test TypeScript code generation

Phase 1: High Priority (>500K Downloads)

Phase 2: Medium-High Priority (200K-500K Downloads)

Phase 3: Medium Priority (100K-200K Downloads)

Phase 4: Lower Priority (50K-100K Downloads)

Phase 5: Lowest Priority (<50K Downloads)


Part 3: Documentation

  • Getting started guide for TypeScript AppHost
  • TypeScript AppHost API reference
  • Integration usage examples (per-integration TypeScript samples)
  • Migration guide from C# AppHost to TypeScript
  • Troubleshooting / FAQ for TypeScript AppHost

Part 4: Extensibility for Integration Authors

  • ATS capability scanner detects [AspireExport] by attribute name (not just type), so third-party authors don't need a package reference Switch ATS attribute discovery to name-based matching for third-party support #14977
  • [AspireExport] and [AspireDto] attributes available in a public NuGet package
  • Documentation for integration authors on how to annotate their APIs
  • SDK generation works for third-party integration libraries (not just built-in)
  • End-to-end sample: custom integration with [AspireExport] → TypeScript SDK generated → used in TypeScript AppHost

Part 5: Polyglot-Compatible Integration Discovery

  • NuGet package metadata / marker that identifies a package as polyglot-compatible (has [AspireExport] coverage)
  • aspire add filters and surfaces only polyglot-compatible integrations when used in a TypeScript AppHost
  • Clear indication in CLI output when an integration is not available for TypeScript

Success Criteria

  • All Phase 1-3 integrations (25 packages) have full [AspireExport] coverage
  • Core framework types are fully usable from TypeScript
  • Can install the Aspire CLI and use a TypeScript AppHost without .NET SDK installed
  • aspire run works end-to-end with TypeScript AppHost
  • aspire do works end-to-end with TypeScript AppHost
  • aspire publish works end-to-end with TypeScript AppHost
  • aspire deploy works end-to-end with TypeScript AppHost
  • Sample TypeScript AppHost apps demonstrate all major integrations Type script app host dotnet/eShop#974

Out of Scope


Related

/cc @davidfowl @DamianEdwards

Metadata

Metadata

Labels

area-integrationsIssues pertaining to Aspire Integrations packagesarea-polyglotIssues related to polyglot apphosts

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions