Add TypeScript AppHost examples and tests for hosting integrations#1423
Open
aaronpowell wants to merge 4 commits into
Open
Add TypeScript AppHost examples and tests for hosting integrations#1423aaronpowell wants to merge 4 commits into
aaronpowell wants to merge 4 commits into
Conversation
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>
Contributor
|
🚀 Dogfood this PR with:
curl -fsSL https://raw.githubusercontent.com/CommunityToolkit/Aspire/main/eng/scripts/dogfood-pr.sh | bash -s -- 1423Or
iex "& { $(irm https://raw.githubusercontent.com/CommunityToolkit/Aspire/main/eng/scripts/dogfood-pr.ps1) } 1423" |
Contributor
There was a problem hiding this comment.
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.TypeScriptexample projects for multiple hosting integrations (RustFs, RavenDB, PowerShell, Logto, DuckDB, Dapr, Azure.Dapr, Azure.Extensions). - Added
TypeScriptAppHostTests.csto 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", |
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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:
*.AppHost.TypeScriptexamples for the targeted hosting integrations.TypeScriptAppHostTests.csto the corresponding hosting test projects usingTypeScriptAppHostTest.Run(...).examples/masstransit-rabbitmq/CommunityToolkit.Aspire.Hosting.MassTransit.RabbitMQ.AppHost.TypeScript.PR Checklist
Other information
Added TypeScript AppHost tests for:
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.