Skip to content
Closed
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
e2c6486
Increment patch version to 13.4.1 (#17819)
joperezr Jun 2, 2026
7535685
[release/13.4] Add Aspire CLI npm package release integration (#17766)
adamint Jun 2, 2026
b4653b3
Remove duplicated profiles block from empty C# AppHost aspire.config.…
aspire-repo-bot[bot] Jun 2, 2026
62d6f98
[release/13.4] Defer explicit-start DCP registration (#17826)
aspire-repo-bot[bot] Jun 2, 2026
cf985fa
[release/13.4] Add proxyless endpoint on-demand allocation (#17859)
aspire-repo-bot[bot] Jun 3, 2026
a5e571b
[release/13.4] Fix Redis persistent lifetime startup (#17850)
aspire-repo-bot[bot] Jun 3, 2026
d7d0b67
Bump release patch version to 13.4.2 (#17876)
danegsta Jun 3, 2026
7b53b8c
[release/13.4] Add persistent container test coverage (#17884)
aspire-repo-bot[bot] Jun 5, 2026
59e06a4
[release/13.4] Unblock WinGet Manifest job on locked-down 1ES agents;…
aspire-repo-bot[bot] Jun 5, 2026
4f21893
Fix persistent container endpoint allocation (#17960)
danegsta Jun 5, 2026
0a8bdf9
Reconnect if necessary during DCP request execution (#18096)
karolz-ms Jun 10, 2026
163dd34
[release/13.4] Improve npm publish validation and CLI package metadat…
adamint Jun 12, 2026
ccc566c
[release/13.4] Filter resources with resource.excludeFromMcp from CLI…
aspire-repo-bot[bot] Jun 12, 2026
57b9485
[release/13.4] Add coding agent telemetry detection and report copilo…
aspire-repo-bot[bot] Jun 16, 2026
60f48b4
Validate playwrightCliVersion shape with strict SemVer (#18205)
mitchdenny Jun 16, 2026
a157bd9
[release/13.4] Bump StreamJsonRpc to 2.25.29 to clear MessagePack NU1…
aspire-repo-bot[bot] Jun 16, 2026
58d33ac
Require exactly one npm ESRP owner in release pipeline (#18219)
adamint Jun 16, 2026
c2d09cf
[release/13.4] Make npm package README TypeScript-only and document s…
adamint Jun 16, 2026
73114e8
[release/13.4] Bumping patch version (#18245)
joperezr Jun 16, 2026
471120e
Merge remote-tracking branch 'origin/main' into joperezr/forward-port…
joperezr Jun 17, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
67 changes: 43 additions & 24 deletions eng/scripts/pack-cli-npm-package.pointer.README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,52 +13,61 @@ Use an AppHost to describe how services, frontends, containers, databases, cache

## A simple app definition

The same application definition can be written in different languages.
You describe your app in a TypeScript AppHost (`apphost.mts`). The example below runs an Express API and a Vite frontend, exposes the API over HTTP, and wires the frontend to it:

__C#__ (`apphost.cs`)
```typescript
import { createBuilder } from './.aspire/modules/aspire.mjs';

```csharp
var builder = DistributedApplication.CreateBuilder(args);
const builder = await createBuilder();

var cache = builder.AddRedis("cache");
// Run the Express API and expose its HTTP endpoint externally.
const app = await builder
.addNodeApp("app", "./api", "src/index.ts")
.withHttpEndpoint({ env: "PORT" })
.withExternalHttpEndpoints();

var api = builder.AddNodeApp("api", "./api", "src/index.ts")
.WithReference(cache)
.WaitFor(cache)
.WithHttpEndpoint(env: "PORT")
.WithExternalHttpEndpoints();
// Run the Vite frontend after the API and inject the API URL for local proxying.
const frontend = await builder
.addViteApp("frontend", "./frontend")
.withReference(app)
.waitFor(app);

builder.AddViteApp("frontend", "./frontend")
.WithReference(api)
.WaitFor(api);
// Bundle the frontend build output into the API container for publish/deploy.
await app.publishWithContainerFiles(frontend, "./static");

builder.Build().Run();
await builder.build().run();
```

__TypeScript__ (`apphost.mts`)
Each builder call returns a promise, so `await` is used to get the resource before referencing it from another resource. `aspire run` builds and launches everything, then opens the dashboard.

### Add backing services

Resources like databases and caches are added the same way and connected with `withReference`. `waitFor` holds dependents until the resource is ready:

```typescript
import { createBuilder } from './.aspire/modules/aspire.mjs';

const builder = await createBuilder();

const postgres = await builder.addPostgres("postgres");
const db = await postgres.addDatabase("db");

const cache = await builder.addRedis("cache");

const api = await builder
await builder
.addNodeApp("api", "./api", "src/index.ts")
.withReference(cache)
.waitFor(cache)
.withHttpEndpoint({ env: "PORT" })
.withExternalHttpEndpoints();

await builder
.addViteApp("frontend", "./frontend")
.withReference(api)
.waitFor(api);
.withExternalHttpEndpoints()
.withReference(db)
.withReference(cache)
.waitFor(db)
.waitFor(cache);

await builder.build().run();
```

`addPostgres` and `addRedis` become available once the matching integrations are installed with `aspire add postgresql` and `aspire add redis`.

## Install

This package requires Node.js 20 or later.
Expand All @@ -83,6 +92,16 @@ aspire run

The native platform packages are installed through npm optional dependencies. Do not install this package with optional dependencies disabled, or the `aspire` launcher will not be able to find the native CLI binary.

## Standalone dashboard

The Aspire dashboard shows logs, traces, and metrics for any app that exports OpenTelemetry, even without an AppHost. Start one in a single command:

```bash
aspire dashboard run
```

This launches the dashboard with an OTLP endpoint your apps can point at via `OTEL_EXPORTER_OTLP_ENDPOINT`. Use `aspire dashboard run --help` to see options such as `--frontend-url`, `--otlp-grpc-url`, and `--allow-anonymous`.

## Update

```bash
Expand Down
Loading