Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
29 changes: 2 additions & 27 deletions docs/specs/cli-output-formats.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,32 +95,7 @@ If discovery finds no AppHost candidates, the stream emits no lines. The stream
]
```

Use `aspire ps --format json --resources` to include each AppHost's current resources:

```json
[
{
"appHostPath": "/path/to/MyApp.AppHost/MyApp.AppHost.csproj",
"appHostPid": 12345,
"status": "running",
"resources": [
{
"name": "api",
"displayName": "api",
"resourceType": "Project",
"state": "Running",
"healthStatus": "Healthy",
"urls": [
{
"name": "https",
"url": "https://localhost:5001"
}
]
}
]
}
]
```
`aspire ps` returns only AppHost-level information. Use [`aspire describe`](#aspire-describe) to inspect or stream the resources that belong to an AppHost.

`aspire ps --follow --format json` streams newline-delimited AppHost objects. New or changed AppHosts are emitted with `"status": "running"`. When an AppHost stops, it is emitted one last time with `"status": "stopped"` so consumers can remove it from their state:
Comment thread
mitchdenny marked this conversation as resolved.

Expand Down Expand Up @@ -172,7 +147,7 @@ Use `aspire ps --format json --resources` to include each AppHost's current reso

#### Resource fields

`aspire describe`, `aspire describe --follow`, and `aspire ps --resources` share the resource object shape:
`aspire describe` and `aspire describe --follow` share the resource object shape:

| Field | Description |
| ----- | ----------- |
Expand Down
10 changes: 5 additions & 5 deletions extension/Extension.proj
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,13 @@
<!-- Override package.json version if ExtensionVersionOverride is set, saving original first -->
<Copy SourceFiles="$(_PackageJsonPath)" DestinationFiles="$(_PackageJsonPath).bak"
Condition="'$(ExtensionVersionOverride)' != ''" />
<Exec Command="yarn version --new-version &quot;$(ExtensionVersionOverride)&quot; --no-git-tag-version"
<Exec Command="corepack yarn@1.22.22 version --new-version &quot;$(ExtensionVersionOverride)&quot; --no-git-tag-version"
Condition="'$(ExtensionVersionOverride)' != ''"
WorkingDirectory="$(ExtensionSrcDir)" />

<!-- Install dependencies and compile -->
<Exec Command="yarn install --frozen-lockfile --non-interactive" WorkingDirectory="$(ExtensionSrcDir)" IgnoreStandardErrorWarningFormat="true" />
<Exec Command="yarn compile" WorkingDirectory="$(ExtensionSrcDir)" IgnoreStandardErrorWarningFormat="true" />
<Exec Command="corepack yarn@1.22.22 install --frozen-lockfile --non-interactive" WorkingDirectory="$(ExtensionSrcDir)" IgnoreStandardErrorWarningFormat="true" />
Comment thread
adamint marked this conversation as resolved.
<Exec Command="corepack yarn@1.22.22 compile" WorkingDirectory="$(ExtensionSrcDir)" IgnoreStandardErrorWarningFormat="true" />

<!-- Make extension directory -->
<MakeDir Directories="$(_VscodeOutputDir)" />
Expand Down Expand Up @@ -88,12 +88,12 @@
</Target>

<Target Name="CheckYarnInstalled">
<Exec Command="yarn --version" ContinueOnError="true" ConsoleToMSBuild="true" IgnoreStandardErrorWarningFormat="true">
<Exec Command="corepack yarn@1.22.22 --version" ContinueOnError="true" ConsoleToMSBuild="true" IgnoreStandardErrorWarningFormat="true">
<Output TaskParameter="ExitCode" PropertyName="YarnExitCode" />
<Output TaskParameter="ConsoleOutput" PropertyName="YarnVersion" />
</Exec>

<Error Condition="'$(YarnExitCode)' != '0'" Text="yarn is not installed or not available in PATH. To build the extension, install yarn: https://yarnpkg.com/getting-started/install" />
<Error Condition="'$(YarnExitCode)' != '0'" Text="Corepack is not installed or cannot run Yarn Classic. To build the extension, install a Node.js version that includes Corepack." />

<Message Importance="high" Text="yarn version: $(YarnVersion)" />
</Target>
Expand Down
11 changes: 5 additions & 6 deletions extension/build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,9 @@ if (-not (Get-Command node -ErrorAction SilentlyContinue)) {
exit 1
}

# Check for yarn
if (-not (Get-Command yarn -ErrorAction SilentlyContinue)) {
Write-Error "Error: yarn is not installed. Please install yarn first."
Write-Host "You can install yarn by running: npm install -g yarn"
# Check for Corepack so the build uses the Yarn Classic version that matches extension/yarn.lock.
if (-not (Get-Command corepack -ErrorAction SilentlyContinue)) {
Write-Error "Error: Corepack is not installed. Please install a Node.js version that includes Corepack."
exit 1
}

Expand Down Expand Up @@ -41,7 +40,7 @@ Set-Location $PSScriptRoot

Write-Host ""
Write-Host "Running yarn install..."
yarn install --frozen-lockfile --non-interactive
corepack yarn@1.22.22 install --frozen-lockfile --non-interactive

if ($LASTEXITCODE -ne 0) {
Write-Error "yarn install failed with exit code $LASTEXITCODE"
Expand All @@ -50,7 +49,7 @@ if ($LASTEXITCODE -ne 0) {

Write-Host ""
Write-Host "Running yarn compile..."
yarn compile
corepack yarn@1.22.22 compile

if ($LASTEXITCODE -ne 0) {
Write-Error "yarn compile failed with exit code $LASTEXITCODE"
Expand Down
11 changes: 5 additions & 6 deletions extension/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,9 @@ if ! command -v node &> /dev/null; then
exit 1
fi

# Check for yarn
if ! command -v yarn &> /dev/null; then
echo "Error: yarn is not installed. Please install yarn first."
echo "You can install yarn by running: npm install -g yarn"
# Check for Corepack so the build uses the Yarn Classic version that matches extension/yarn.lock.
if ! command -v corepack &> /dev/null; then
echo "Error: Corepack is not installed. Please install a Node.js version that includes Corepack."
exit 1
fi

Expand All @@ -38,11 +37,11 @@ cd "$SCRIPT_DIR"

echo ""
echo "Running yarn install..."
yarn install --frozen-lockfile --non-interactive
corepack yarn@1.22.22 install --frozen-lockfile --non-interactive

echo ""
echo "Running yarn compile..."
yarn compile
corepack yarn@1.22.22 compile

echo ""
echo "Building Aspire CLI..."
Expand Down
2 changes: 1 addition & 1 deletion extension/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"displayName": "Aspire",
"description": "%extension.description%",
"publisher": "microsoft-aspire",
"version": "1.0.9",
"version": "1.10.0",
"aiKey": "0c6ae279ed8443289764825290e4f9e2-1a736e7c-1324-4338-be46-fc2a58ae4d14-7255",
"icon": "dotnet-aspire-logo-128.png",
"license": "SEE LICENSE IN LICENSE.TXT",
Expand Down
Loading
Loading