Add polyglot exports for Aspire.Hosting.Azure.WebPubSub#14907
Merged
davidfowl merged 4 commits intorelease/13.2from Mar 4, 2026
Merged
Add polyglot exports for Aspire.Hosting.Azure.WebPubSub#14907davidfowl merged 4 commits intorelease/13.2from
davidfowl merged 4 commits intorelease/13.2from
Conversation
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
|
🚀 Dogfood this PR with:
curl -fsSL https://raw.githubusercontent.com/dotnet/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 14907Or
iex "& { $(irm https://raw.githubusercontent.com/dotnet/aspire/main/eng/scripts/get-aspire-cli-pr.ps1) } 14907" |
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds polyglot (capability-based) exports for Aspire.Hosting.Azure.WebPubSub and introduces a TypeScript “ValidationAppHost” playground with generated ATS client modules to validate the exports end-to-end.
Changes:
- Annotated
AddAzureWebPubSub,AddHuboverloads, andAddEventHandleroverloads withAspireExportfor polyglot app hosts. - Added a TypeScript validation AppHost project (tsconfig/package/apphost/run profile +
.aspiresettings). - Added generated TypeScript ATS transport/base/sdk modules and a codegen hash.
Reviewed changes
Copilot reviewed 9 out of 11 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| src/Aspire.Hosting.Azure.WebPubSub/AzureWebPubSubExtensions.cs | Adds AspireExport attributes to expose WebPubSub APIs to polyglot hosts |
| playground/polyglot/TypeScript/Aspire.Hosting.Azure.WebPubSub/ValidationAppHost/tsconfig.json | TypeScript build configuration for the validation host |
| playground/polyglot/TypeScript/Aspire.Hosting.Azure.WebPubSub/ValidationAppHost/package.json | Declares dependencies and scripts for the validation host |
| playground/polyglot/TypeScript/Aspire.Hosting.Azure.WebPubSub/ValidationAppHost/apphost.ts | Minimal TypeScript AppHost entrypoint using the generated modules |
| playground/polyglot/TypeScript/Aspire.Hosting.Azure.WebPubSub/ValidationAppHost/apphost.run.json | Run profile/environment variables for aspire run |
| playground/polyglot/TypeScript/Aspire.Hosting.Azure.WebPubSub/ValidationAppHost/.modules/transport.ts | JSON-RPC transport, handle/callback/cancellation plumbing for ATS |
| playground/polyglot/TypeScript/Aspire.Hosting.Azure.WebPubSub/ValidationAppHost/.modules/base.ts | Common TS wrappers for reference expressions and .NET collection helpers |
| playground/polyglot/TypeScript/Aspire.Hosting.Azure.WebPubSub/ValidationAppHost/.modules/aspire.ts | Generated ATS TypeScript SDK including the new WebPubSub capabilities |
| playground/polyglot/TypeScript/Aspire.Hosting.Azure.WebPubSub/ValidationAppHost/.modules/.codegen-hash | Records codegen hash for the generated module set |
| playground/polyglot/TypeScript/Aspire.Hosting.Azure.WebPubSub/ValidationAppHost/.aspire/settings.json | Configures the polyglot validation host package mapping |
Files not reviewed (1)
- playground/polyglot/TypeScript/Aspire.Hosting.Azure.WebPubSub/ValidationAppHost/package-lock.json: Language not supported
...ground/polyglot/TypeScript/Aspire.Hosting.Azure.WebPubSub/ValidationAppHost/.modules/base.ts
Show resolved
Hide resolved
...d/polyglot/TypeScript/Aspire.Hosting.Azure.WebPubSub/ValidationAppHost/.modules/transport.ts
Show resolved
Hide resolved
76 tasks
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
🎬 CLI E2E Test RecordingsThe following terminal recordings are available for commit
📹 Recordings uploaded automatically from CI run #22648232728 |
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Fix addHub collision: remove [AspireExport] from simple overload, keep fuller overload with capability ID 'addHub' - Add [AspireExportIgnore] to WithRoleAssignments with WebPubSubBuiltInRole[] - Create AzureWebPubSubRole internal enum for ATS-compatible role shim - Add polyglot WithRoleAssignments shim with [AspireExport] - Update validation apphost.ts to exercise all exported APIs - Regenerate TypeScript SDK Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
davidfowl
approved these changes
Mar 4, 2026
davidfowl
approved these changes
Mar 4, 2026
davidfowl
approved these changes
Mar 4, 2026
Copilot AI
pushed a commit
that referenced
this pull request
Mar 10, 2026
* Add polyglot exports for Aspire.Hosting.Azure.WebPubSub Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Refine AspireExport descriptions for polyglot-azure-webpubsub Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Use generated methods in azure-webpubsub apphost Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Fix AspireExport coverage for Azure WebPubSub integration - Fix addHub collision: remove [AspireExport] from simple overload, keep fuller overload with capability ID 'addHub' - Add [AspireExportIgnore] to WithRoleAssignments with WebPubSubBuiltInRole[] - Create AzureWebPubSubRole internal enum for ATS-compatible role shim - Add polyglot WithRoleAssignments shim with [AspireExport] - Update validation apphost.ts to exercise all exported APIs - Regenerate TypeScript SDK Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --------- 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.
Related to #14069