Skip to content

Update npm package README: TypeScript-only examples and standalone dashboard#18220

Open
adamint wants to merge 4 commits into
microsoft:mainfrom
adamint:adamint/npm-readme-ts-dashboard
Open

Update npm package README: TypeScript-only examples and standalone dashboard#18220
adamint wants to merge 4 commits into
microsoft:mainfrom
adamint:adamint/npm-readme-ts-dashboard

Conversation

@adamint

@adamint adamint commented Jun 15, 2026

Copy link
Copy Markdown
Member

Description

Updates the Aspire CLI npm package README (eng/scripts/pack-cli-npm-package.pointer.README.md) to:

  • Remove the C# AppHost example, keeping only TypeScript. The npm package targets JS/TS users, so the C# sample added noise.
  • Refresh the TypeScript example to match the official aspire-ts-starter template (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 is awaited.
  • Add a second example showing how to wire backing services (Postgres + Redis) with withReference/waitFor, mirroring playground/TypeScriptAppHost/apphost.mts.
  • Document the standalone dashboard with the one-line aspire dashboard run, including the OTLP endpoint apps point at via OTEL_EXPORTER_OTLP_ENDPOINT and the common options.

All API/CLI claims were verified against authoritative sources in this repo: the ts-starter template (src/Aspire.Cli/Templating/Templates/ts-starter/apphost.mts), the TypeScript playground apphosts, DashboardRunCommand.cs (defaults: frontend 18888, OTLP gRPC 4317, HTTP 4318), the npm engines node = '>=20' value, and the aspire.dev first-app guide.

Fixes # (n/a)

Checklist

  • Is this feature complete?
    • Yes. Ready to ship.
    • No. Follow-up changes expected.
  • Are you including unit tests for the changes and scenario tests if relevant?
    • Yes
    • No (docs only; existing NpmCliPackageTests renders this template and continues to pass)
  • Did you add public API?
    • No
  • Does the change make any security assumptions or guarantees?
    • No

…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>
Copilot AI review requested due to automatic review settings June 15, 2026 19:55
@github-actions

github-actions Bot commented Jun 15, 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/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 18220

Or

  • Run remotely in PowerShell:
iex "& { $(irm https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.ps1) } 18220"

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 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 run and 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>
@github-actions

Copy link
Copy Markdown
Contributor

Retrying the failed CI jobs for this pull request from the CI run attempt. The rerun is being tracked in the rerun attempt.

@adamint adamint marked this pull request as ready for review June 15, 2026 21:26
Copilot AI review requested due to automatic review settings June 15, 2026 21:26

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.

Copilot's findings

  • Files reviewed: 2/2 changed files
  • Comments generated: 0 new

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>
Copilot AI review requested due to automatic review settings June 15, 2026 21:45

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.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

@github-actions

Copy link
Copy Markdown
Contributor

Retrying the failed CI jobs for this pull request from the CI run attempt. The rerun is being tracked in the rerun attempt.

@github-actions

Copy link
Copy Markdown
Contributor

Retrying the failed CI jobs for this pull request from the CI run attempt. The rerun is being tracked in the rerun attempt.

@github-actions

Copy link
Copy Markdown
Contributor

Retrying the failed CI jobs for this pull request from the CI run attempt. The rerun is being tracked in the rerun attempt.

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