Update npm package README: TypeScript-only examples and standalone dashboard#18220
Update npm package README: TypeScript-only examples and standalone dashboard#18220adamint wants to merge 4 commits into
Conversation
…shboard Remove the C# AppHost example and keep TypeScript, aligning the sample with the official aspire-ts-starter template (Express API + Vite frontend). Add a second example showing how to wire backing services (Postgres, Redis) with references, and document starting the standalone dashboard with 'aspire dashboard run'. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
🚀 Dogfood this PR with:
curl -fsSL https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 18220Or
iex "& { $(irm https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.ps1) } 18220" |
There was a problem hiding this comment.
Pull request overview
This PR updates the Aspire CLI npm package README to be TypeScript-focused, replacing the dual C#/TypeScript example with TypeScript-only content that matches the current ts-starter template, adds a backing services example, and documents the standalone dashboard feature.
Changes:
- Replaced the C# + TypeScript dual example with a single TypeScript example matching
src/Aspire.Cli/Templating/Templates/ts-starter/apphost.mts - Added a "backing services" section showing Postgres + Redis usage with
withReference/waitFor - Added a "Standalone dashboard" section documenting
aspire dashboard runand its key options
Show a summary per file
| File | Description |
|---|---|
| eng/scripts/pack-cli-npm-package.pointer.README.md | Rewrites the app definition examples to TypeScript-only, adds backing services example, adds standalone dashboard documentation |
Copilot's findings
- Files reviewed: 1/1 changed files
- Comments generated: 0
- Update NpmCliPackageTests to match the TypeScript-only README (the old __TypeScript__ heading was removed) and assert the C# example is gone and the standalone dashboard command is documented. - Standalone 'aspire dashboard run' surfaces OTLP logs/traces/metrics but not resource health checks (a resource-service/AppHost concept), so drop 'health checks' from the standalone-mode description. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
Retrying the failed CI jobs for this pull request from the CI run attempt. The rerun is being tracked in the rerun attempt. |
The generated TypeScript SDK only exposes integration methods (addPostgres, addRedis) when the matching packages are installed, so document the 'aspire add postgresql' / 'aspire add redis' prerequisite for the backing services example. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Code review found the install instructions were orphaned under the 'Add backing services' subsection after the C# example removal. Restore the '## Install' heading so install steps render as their own section. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
Retrying the failed CI jobs for this pull request from the CI run attempt. The rerun is being tracked in the rerun attempt. |
|
Retrying the failed CI jobs for this pull request from the CI run attempt. The rerun is being tracked in the rerun attempt. |
|
Retrying the failed CI jobs for this pull request from the CI run attempt. The rerun is being tracked in the rerun attempt. |
Description
Updates the Aspire CLI npm package README (
eng/scripts/pack-cli-npm-package.pointer.README.md) to:aspire-ts-startertemplate (Express API + Vite frontend,withHttpEndpoint/withExternalHttpEndpoints/withReference/waitFor/publishWithContainerFiles). This is the exact code shown on aspire.dev's "Build your first app" guide, so the README stays in lockstep with the docs. Added a one-line note explaining why each builder call isawaited.withReference/waitFor, mirroringplayground/TypeScriptAppHost/apphost.mts.aspire dashboard run, including the OTLP endpoint apps point at viaOTEL_EXPORTER_OTLP_ENDPOINTand the common options.All API/CLI claims were verified against authoritative sources in this repo: the
ts-startertemplate (src/Aspire.Cli/Templating/Templates/ts-starter/apphost.mts), the TypeScript playground apphosts,DashboardRunCommand.cs(defaults: frontend18888, OTLP gRPC4317, HTTP4318), the npmengines node = '>=20'value, and the aspire.dev first-app guide.Fixes # (n/a)
Checklist
NpmCliPackageTestsrenders this template and continues to pass)