Skip to content

Add TypeScript AppHost examples and tests for hosting integrations#1423

Open
aaronpowell wants to merge 4 commits into
mainfrom
aaronpowell/typescript-apphost-backfill
Open

Add TypeScript AppHost examples and tests for hosting integrations#1423
aaronpowell wants to merge 4 commits into
mainfrom
aaronpowell/typescript-apphost-backfill

Conversation

@aaronpowell

Copy link
Copy Markdown
Member

Closes #<ISSUE_NUMBER> (N/A - no linked issue)

This PR backfills TypeScript AppHost coverage for the missing hosting integrations and adds matching TypeScript AppHost tests so the examples are actually validated end-to-end. It also corrects scope by removing the accidental MassTransit RabbitMQ TypeScript AppHost because that package is a client integration, not a hosting integration.

The approach was:

  • Add *.AppHost.TypeScript examples for the targeted hosting integrations.
  • Align each TypeScript AppHost with its C# AppHost intent (resource wiring, references, waits, parameters) where current TS bindings support it.
  • Add TypeScriptAppHostTests.cs to the corresponding hosting test projects using TypeScriptAppHostTest.Run(...).
  • Remove examples/masstransit-rabbitmq/CommunityToolkit.Aspire.Hosting.MassTransit.RabbitMQ.AppHost.TypeScript.

PR Checklist

  • Created a feature/dev branch in your fork (vs. submitting directly from a commit on main)
  • Based off latest main branch of toolkit
  • PR doesn't include merge commits (always rebase on top of our main, if needed)
  • New integration
    • Docs are written
    • Added description of major feature to project description for NuGet package (4000 total character limit, so don't push entire description over that)
  • Tests for the changes have been added (for bug fixes / features) (if applicable)
  • Contains NO breaking changes
  • Every new API (including internal ones) has full XML docs
  • Code follows all style conventions

Other information

Added TypeScript AppHost tests for:

  • Azure.Extensions
  • Azure.Dapr
  • Dapr
  • DuckDB
  • Logto
  • PowerShell
  • RavenDB
  • RustFs

Validation included running the affected test projects and TypeScript AppHost compile/restore flows (npm ci, aspire restore, npx tsc --noEmit) for the new examples.

For Azure.Dapr, there is an existing environment-dependent test in that project requiring Dapr CLI availability; targeted TypeScript AppHost test validation was used to avoid conflating that unrelated prerequisite with this change set.

aaronpowell and others added 2 commits June 18, 2026 14:06
Backfill TypeScript apphost examples for previously missing integrations and align resource wiring with their C# AppHost counterparts where TypeScript APIs allow.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Add TypeScriptAppHostTests coverage for Azure Extensions, Azure Dapr, Dapr, DuckDB, Logto, PowerShell, RavenDB, and RustFs, and remove the accidental MassTransit RabbitMQ TypeScript AppHost (client integration).

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings June 18, 2026 05:25
@github-actions

github-actions Bot commented Jun 18, 2026

Copy link
Copy Markdown
Contributor

🚀 Dogfood this PR with:

⚠️ WARNING: Do not do this without first carefully reviewing the code of this PR to satisfy yourself it is safe.

curl -fsSL https://raw.githubusercontent.com/CommunityToolkit/Aspire/main/eng/scripts/dogfood-pr.sh | bash -s -- 1423

Or

  • Run remotely in PowerShell:
iex "& { $(irm https://raw.githubusercontent.com/CommunityToolkit/Aspire/main/eng/scripts/dogfood-pr.ps1) } 1423"

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR expands the repo’s polyglot validation coverage by adding TypeScript AppHost examples for several hosting integrations and introducing matching test coverage to validate that those TypeScript AppHosts restore/compile and can be started by the Aspire CLI.

Changes:

  • Added new *.AppHost.TypeScript example projects for multiple hosting integrations (RustFs, RavenDB, PowerShell, Logto, DuckDB, Dapr, Azure.Dapr, Azure.Extensions).
  • Added TypeScriptAppHostTests.cs to the corresponding test projects to exercise the shared TypeScript AppHost validation flow (TypeScriptAppHostTest.Run(...)).
  • Removed the accidental MassTransit RabbitMQ TypeScript AppHost example (client integration, not hosting) per PR description.
Show a summary per file
File Description
tests/CommunityToolkit.Aspire.Hosting.RustFs.Tests/TypeScriptAppHostTests.cs Adds TypeScript AppHost validation coverage for the RustFs example.
tests/CommunityToolkit.Aspire.Hosting.RavenDB.Tests/TypeScriptAppHostTests.cs Adds TypeScript AppHost validation coverage for the RavenDB example.
tests/CommunityToolkit.Aspire.Hosting.PowerShell.Tests/TypeScriptAppHostTests.cs Adds TypeScript AppHost validation coverage for the PowerShell example.
tests/CommunityToolkit.Aspire.Hosting.Logto.Tests/TypeScriptAppHostTests.cs Adds TypeScript AppHost validation coverage for the Logto example.
tests/CommunityToolkit.Aspire.Hosting.DuckDB.Tests/TypeScriptAppHostTests.cs Adds TypeScript AppHost validation coverage for the DuckDB example.
tests/CommunityToolkit.Aspire.Hosting.Dapr.Tests/TypeScriptAppHostTests.cs Adds (currently skipped) TypeScript AppHost validation coverage for the Dapr example.
tests/CommunityToolkit.Aspire.Hosting.Azure.Extensions.Tests/TypeScriptAppHostTests.cs Adds TypeScript AppHost validation coverage for the Azure.Extensions example.
tests/CommunityToolkit.Aspire.Hosting.Azure.Dapr.Tests/TypeScriptAppHostTests.cs Adds (currently skipped) TypeScript AppHost validation coverage for the Azure.Dapr example.
examples/rustfs/CommunityToolkit.Aspire.Hosting.RustFs.AppHost.TypeScript/apphost.mts TypeScript AppHost wiring for RustFs resources and parameters.
examples/rustfs/CommunityToolkit.Aspire.Hosting.RustFs.AppHost.TypeScript/aspire.config.json Aspire TS AppHost configuration + local package mapping for RustFs.
examples/rustfs/CommunityToolkit.Aspire.Hosting.RustFs.AppHost.TypeScript/eslint.config.mjs ESLint configuration for the RustFs TS AppHost.
examples/rustfs/CommunityToolkit.Aspire.Hosting.RustFs.AppHost.TypeScript/package.json Node/TypeScript toolchain definition for RustFs TS AppHost.
examples/rustfs/CommunityToolkit.Aspire.Hosting.RustFs.AppHost.TypeScript/package-lock.json Locked dependency graph for RustFs TS AppHost (npm ci).
examples/rustfs/CommunityToolkit.Aspire.Hosting.RustFs.AppHost.TypeScript/tsconfig.json TypeScript compiler configuration for RustFs TS AppHost.
examples/ravendb/CommunityToolkit.Aspire.Hosting.RavenDB.AppHost.TypeScript/apphost.mts TypeScript AppHost wiring for RavenDB + ApiService project reference.
examples/ravendb/CommunityToolkit.Aspire.Hosting.RavenDB.AppHost.TypeScript/aspire.config.json Aspire TS AppHost configuration + local package mapping for RavenDB.
examples/ravendb/CommunityToolkit.Aspire.Hosting.RavenDB.AppHost.TypeScript/eslint.config.mjs ESLint configuration for the RavenDB TS AppHost.
examples/ravendb/CommunityToolkit.Aspire.Hosting.RavenDB.AppHost.TypeScript/package.json Node/TypeScript toolchain definition for RavenDB TS AppHost.
examples/ravendb/CommunityToolkit.Aspire.Hosting.RavenDB.AppHost.TypeScript/package-lock.json Locked dependency graph for RavenDB TS AppHost (npm ci).
examples/ravendb/CommunityToolkit.Aspire.Hosting.RavenDB.AppHost.TypeScript/tsconfig.json TypeScript compiler configuration for RavenDB TS AppHost.
examples/powershell/CommunityToolkit.Aspire.PowerShell.AppHost.TypeScript/apphost.mts TypeScript AppHost wiring for PowerShell runspace and scripts.
examples/powershell/CommunityToolkit.Aspire.PowerShell.AppHost.TypeScript/aspire.config.json Aspire TS AppHost configuration + local package mapping for PowerShell hosting package.
examples/powershell/CommunityToolkit.Aspire.PowerShell.AppHost.TypeScript/eslint.config.mjs ESLint configuration for the PowerShell TS AppHost.
examples/powershell/CommunityToolkit.Aspire.PowerShell.AppHost.TypeScript/package.json Node/TypeScript toolchain definition for PowerShell TS AppHost.
examples/powershell/CommunityToolkit.Aspire.PowerShell.AppHost.TypeScript/package-lock.json Locked dependency graph for PowerShell TS AppHost (npm ci).
examples/powershell/CommunityToolkit.Aspire.PowerShell.AppHost.TypeScript/tsconfig.json TypeScript compiler configuration for PowerShell TS AppHost.
examples/logto/CommunityToolkit.Aspire.Hosting.Logto.AppHost.TypeScript/apphost.mts TypeScript AppHost wiring for Logto, Postgres, Redis, and client projects.
examples/logto/CommunityToolkit.Aspire.Hosting.Logto.AppHost.TypeScript/aspire.config.json Aspire TS AppHost configuration + local package mapping for Logto.
examples/logto/CommunityToolkit.Aspire.Hosting.Logto.AppHost.TypeScript/eslint.config.mjs ESLint configuration for the Logto TS AppHost.
examples/logto/CommunityToolkit.Aspire.Hosting.Logto.AppHost.TypeScript/package.json Node/TypeScript toolchain definition for Logto TS AppHost.
examples/logto/CommunityToolkit.Aspire.Hosting.Logto.AppHost.TypeScript/package-lock.json Locked dependency graph for Logto TS AppHost (npm ci).
examples/logto/CommunityToolkit.Aspire.Hosting.Logto.AppHost.TypeScript/tsconfig.json TypeScript compiler configuration for Logto TS AppHost.
examples/duckdb/CommunityToolkit.Aspire.DuckDB.AppHost.TypeScript/apphost.mts TypeScript AppHost wiring for DuckDB + API project reference.
examples/duckdb/CommunityToolkit.Aspire.DuckDB.AppHost.TypeScript/aspire.config.json Aspire TS AppHost configuration + local package mapping for DuckDB hosting package.
examples/duckdb/CommunityToolkit.Aspire.DuckDB.AppHost.TypeScript/eslint.config.mjs ESLint configuration for the DuckDB TS AppHost.
examples/duckdb/CommunityToolkit.Aspire.DuckDB.AppHost.TypeScript/package.json Node/TypeScript toolchain definition for DuckDB TS AppHost.
examples/duckdb/CommunityToolkit.Aspire.DuckDB.AppHost.TypeScript/package-lock.json Locked dependency graph for DuckDB TS AppHost (npm ci).
examples/duckdb/CommunityToolkit.Aspire.DuckDB.AppHost.TypeScript/tsconfig.json TypeScript compiler configuration for DuckDB TS AppHost.
examples/dapr/CommunityToolkit.Aspire.Hosting.Dapr.AppHost.TypeScript/apphost.mts TypeScript AppHost wiring for Dapr components + projects.
examples/dapr/CommunityToolkit.Aspire.Hosting.Dapr.AppHost.TypeScript/aspire.config.json Aspire TS AppHost configuration + local package mapping for Dapr.
examples/dapr/CommunityToolkit.Aspire.Hosting.Dapr.AppHost.TypeScript/eslint.config.mjs ESLint configuration for the Dapr TS AppHost.
examples/dapr/CommunityToolkit.Aspire.Hosting.Dapr.AppHost.TypeScript/package.json Node/TypeScript toolchain definition for Dapr TS AppHost.
examples/dapr/CommunityToolkit.Aspire.Hosting.Dapr.AppHost.TypeScript/package-lock.json Locked dependency graph for Dapr TS AppHost (npm ci).
examples/dapr/CommunityToolkit.Aspire.Hosting.Dapr.AppHost.TypeScript/tsconfig.json TypeScript compiler configuration for Dapr TS AppHost.
examples/dapr/CommunityToolkit.Aspire.Hosting.Azure.Dapr.AppHost.TypeScript/apphost.mts TypeScript AppHost wiring for Azure Container Apps env + Dapr resources.
examples/dapr/CommunityToolkit.Aspire.Hosting.Azure.Dapr.AppHost.TypeScript/aspire.config.json Aspire TS AppHost configuration + local package mapping for Azure.Dapr.
examples/dapr/CommunityToolkit.Aspire.Hosting.Azure.Dapr.AppHost.TypeScript/eslint.config.mjs ESLint configuration for Azure.Dapr TS AppHost.
examples/dapr/CommunityToolkit.Aspire.Hosting.Azure.Dapr.AppHost.TypeScript/package.json Node/TypeScript toolchain definition for Azure.Dapr TS AppHost.
examples/dapr/CommunityToolkit.Aspire.Hosting.Azure.Dapr.AppHost.TypeScript/package-lock.json Locked dependency graph for Azure.Dapr TS AppHost (npm ci).
examples/dapr/CommunityToolkit.Aspire.Hosting.Azure.Dapr.AppHost.TypeScript/tsconfig.json TypeScript compiler configuration for Azure.Dapr TS AppHost.
examples/azure-ext/CommunityToolkit.Aspire.Azure.Extensions.AppHost.TypeScript/apphost.mts TypeScript AppHost wiring for Azure Storage emulator + Storage Explorer.
examples/azure-ext/CommunityToolkit.Aspire.Azure.Extensions.AppHost.TypeScript/aspire.config.json Aspire TS AppHost configuration + local package mapping for Azure.Extensions.
examples/azure-ext/CommunityToolkit.Aspire.Azure.Extensions.AppHost.TypeScript/eslint.config.mjs ESLint configuration for Azure.Extensions TS AppHost.
examples/azure-ext/CommunityToolkit.Aspire.Azure.Extensions.AppHost.TypeScript/package.json Node/TypeScript toolchain definition for Azure.Extensions TS AppHost.
examples/azure-ext/CommunityToolkit.Aspire.Azure.Extensions.AppHost.TypeScript/package-lock.json Locked dependency graph for Azure.Extensions TS AppHost (npm ci).
examples/azure-ext/CommunityToolkit.Aspire.Azure.Extensions.AppHost.TypeScript/tsconfig.json TypeScript compiler configuration for Azure.Extensions TS AppHost.

Copilot's findings

Files not reviewed (8)
  • examples/azure-ext/CommunityToolkit.Aspire.Azure.Extensions.AppHost.TypeScript/package-lock.json: Generated file
  • examples/dapr/CommunityToolkit.Aspire.Hosting.Azure.Dapr.AppHost.TypeScript/package-lock.json: Generated file
  • examples/dapr/CommunityToolkit.Aspire.Hosting.Dapr.AppHost.TypeScript/package-lock.json: Generated file
  • examples/duckdb/CommunityToolkit.Aspire.DuckDB.AppHost.TypeScript/package-lock.json: Generated file
  • examples/logto/CommunityToolkit.Aspire.Hosting.Logto.AppHost.TypeScript/package-lock.json: Generated file
  • examples/powershell/CommunityToolkit.Aspire.PowerShell.AppHost.TypeScript/package-lock.json: Generated file
  • examples/ravendb/CommunityToolkit.Aspire.Hosting.RavenDB.AppHost.TypeScript/package-lock.json: Generated file
  • examples/rustfs/CommunityToolkit.Aspire.Hosting.RustFs.AppHost.TypeScript/package-lock.json: Generated file
  • Files reviewed: 48/56 changed files
  • Comments generated: 2

Comment on lines +14 to +17
packageName: "CommunityToolkit.Aspire.Hosting.Dapr",
exampleName: "dapr",
waitForResources: ["redis", "servicea"],
waitStatus: "up",
Comment on lines +14 to +17
packageName: "CommunityToolkit.Aspire.Hosting.Azure.Dapr",
exampleName: "dapr",
waitForResources: ["redisState", "servicea"],
waitStatus: "up",
@aaronpowell aaronpowell deployed to azure-artifacts June 18, 2026 05:35 — with GitHub Actions Active
aaronpowell and others added 2 commits June 18, 2026 16:47
Added fail_on_low_coverage input to code-coverage workflow (default false).
Updated dotnet-main.yml to pass fail_on_low_coverage: true so that coverage
thresholds block main branch commits while remaining warnings for PR builds.

This allows new features and integrations to be merged via PR while
maintaining strict coverage requirements on main.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Updated dotnet-release.yml to pass fail_on_low_coverage: true so that
coverage requirements are strictly enforced for release builds.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants