[docs] Add TypeScript publish lifecycle event APIs to eventing docs#998
Open
aspire-repo-bot[bot] wants to merge 1 commit into
Open
[docs] Add TypeScript publish lifecycle event APIs to eventing docs#998aspire-repo-bot[bot] wants to merge 1 commit into
aspire-repo-bot[bot] wants to merge 1 commit into
Conversation
…eventing page Documents the new publish lifecycle event APIs for polyglot AppHosts added in microsoft/aspire#17129. TypeScript AppHosts can now subscribe to BeforePublishEvent and AfterPublishEvent using subscribeBeforePublish and subscribeAfterPublish builder methods. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
14 tasks
Contributor
There was a problem hiding this comment.
Pull request overview
Updates the AppHost eventing documentation to include the newly added TypeScript publish lifecycle event subscription APIs, aligning the docs with recent polyglot AppHost SDK capabilities.
Changes:
- Adds a TypeScript reference table for builder-level AppHost event subscription methods, including publish events.
- Wraps the “Publishing events” example in synced language tabs and adds a TypeScript example using the new publish subscriptions.
Comments suppressed due to low confidence (1)
src/frontend/src/content/docs/app-host/eventing.mdx:432
- Same as above:
subscribeAfterPublishisn’t present in the current Twoslashaspire.d.tstypings, so thistwoslashsnippet is likely to error during docs validation unless the typings are updated (or the block isn’t type-checked).
await builder.subscribeAfterPublish(async (event) => {
// Post-publish actions
console.log("AfterPublishEvent");
});
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+423
to
+427
|
|
||
| await builder.subscribeBeforePublish(async (event) => { | ||
| // Validate resources before publishing | ||
| console.log("BeforePublishEvent"); | ||
| }); |
Comment on lines
+97
to
+99
| | `subscribeBeforeStart` | `BeforeStartEvent` — raised before the AppHost starts | | ||
| | `subscribeAfterResourcesCreated` | `AfterResourcesCreatedEvent` — raised after the AppHost created resources | | ||
| | `subscribeBeforePublish` | `BeforePublishEvent` — raised before manifest publishing begins | |
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.
Documents changes from microsoft/aspire#17129 by
@sebastienrosTargeting
release/13.4based on the source PR milestone13.4.Why this PR is needed
PR microsoft/aspire#17129 added
subscribeBeforePublishandsubscribeAfterPublishbuilder methods to the TypeScript polyglot AppHost SDK, allowing TypeScript (and other non-C#) AppHosts to subscribe to publish lifecycle events (BeforePublishEventandAfterPublishEvent). Previously these events were only accessible in C# viaOnBeforePublish/OnAfterPublish. The eventing docs covered the C# side but had no TypeScript examples for publish events.Changes
src/frontend/src/content/docs/app-host/eventing.mdx:subscribeBeforePublishandsubscribeAfterPublish.<Tabs syncKey='aspire-lang'>component and added a TypeScript tab showingsubscribeBeforePublish/subscribeAfterPublishalongside the existing C# tab.Files modified
src/frontend/src/content/docs/app-host/eventing.mdx(updated)