Skip to content

Commit 7664cbf

Browse files
committed
chore: Add development environment configuration for Exceptionless Aspire
1 parent b1987a4 commit 7664cbf

1 file changed

Lines changed: 144 additions & 0 deletions

File tree

Lines changed: 144 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,144 @@
1+
# THIS IS AUTOGENERATED. DO NOT EDIT MANUALLY
2+
version = 1
3+
name = "Exceptionless Aspire"
4+
5+
[setup]
6+
script = '''
7+
Set-StrictMode -Version Latest
8+
$ErrorActionPreference = "Stop"
9+
10+
Set-Location $env:CODEX_WORKTREE_PATH
11+
12+
Write-Host "Setting up Exceptionless Aspire worktree: $env:CODEX_WORKTREE_PATH"
13+
14+
if (-not (Get-Command dotnet -ErrorAction SilentlyContinue)) {
15+
throw "dotnet is not installed or not on PATH. Exceptionless requires .NET 10."
16+
}
17+
18+
if (-not (Get-Command node -ErrorAction SilentlyContinue)) {
19+
throw "node is not installed or not on PATH. Exceptionless requires Node 24+."
20+
}
21+
22+
if (-not (Get-Command npm -ErrorAction SilentlyContinue)) {
23+
throw "npm is not installed or not on PATH."
24+
}
25+
26+
Write-Host "dotnet:"
27+
dotnet --version
28+
29+
Write-Host "node:"
30+
node --version
31+
32+
Write-Host "npm:"
33+
npm --version
34+
35+
Write-Host "Restoring .NET workloads..."
36+
dotnet workload restore
37+
38+
Write-Host "Restoring Exceptionless.slnx..."
39+
dotnet restore Exceptionless.slnx
40+
41+
Write-Host "Installing Svelte frontend dependencies..."
42+
npm ci --prefix src/Exceptionless.Web/ClientApp --prefer-offline --no-audit
43+
44+
Write-Host "Installing legacy Angular frontend dependencies..."
45+
npm ci --prefix src/Exceptionless.Web/ClientApp.angular --prefer-offline --no-audit
46+
47+
Write-Host "Setup complete. Use the Run Aspire action to start the app."
48+
'''
49+
50+
[cleanup]
51+
script = '''
52+
Set-StrictMode -Version Latest
53+
$ErrorActionPreference = "Continue"
54+
55+
Set-Location $env:CODEX_WORKTREE_PATH
56+
57+
Write-Host "Cleaning Exceptionless worktree-local output only: $env:CODEX_WORKTREE_PATH"
58+
59+
Write-Host "Removing repo-local temp/test output only..."
60+
61+
Remove-Item -Recurse -Force .cache/tmp -ErrorAction SilentlyContinue
62+
Remove-Item -Recurse -Force .aspire -ErrorAction SilentlyContinue
63+
Remove-Item -Recurse -Force TestResults -ErrorAction SilentlyContinue
64+
65+
Get-ChildItem -Recurse -Directory -Force -ErrorAction SilentlyContinue |
66+
Where-Object { $_.Name -in @("TestResults", ".vite", ".svelte-kit") } |
67+
Remove-Item -Recurse -Force -ErrorAction SilentlyContinue
68+
69+
Write-Host "Cleanup complete."
70+
Write-Host "Aspire infrastructure containers and Docker volumes were intentionally left alone."
71+
'''
72+
73+
[[actions]]
74+
name = "Run Aspire"
75+
icon = "run"
76+
command = '''
77+
Set-StrictMode -Version Latest
78+
$ErrorActionPreference = "Stop"
79+
80+
Set-Location $env:CODEX_WORKTREE_PATH
81+
82+
$env:AppMode = "Development"
83+
$env:DOTNET_ENVIRONMENT = "Development"
84+
$env:ASPNETCORE_ENVIRONMENT = "Development"
85+
86+
if (Get-Command aspire -ErrorAction SilentlyContinue) {
87+
aspire run
88+
} else {
89+
dotnet run --project src/Exceptionless.AppHost/Exceptionless.AppHost.csproj
90+
}
91+
'''
92+
93+
[[actions]]
94+
name = "Stop Aspire Containers, keep data"
95+
icon = "tool"
96+
command = '''
97+
if command -v docker >/dev/null 2>&1 && docker info >/dev/null 2>&1; then
98+
docker stop \
99+
Exceptionless-Elasticsearch \
100+
Exceptionless-Kibana \
101+
Exceptionless-Redis \
102+
Exceptionless-RedisInsight \
103+
Redis-insight \
104+
Exceptionless-Storage \
105+
Exceptionless-Mail \
106+
2>/dev/null || true
107+
fi
108+
'''
109+
110+
[[actions]]
111+
name = "Reset Aspire Containers, keep volumes"
112+
icon = "tool"
113+
command = '''
114+
if command -v docker >/dev/null 2>&1 && docker info >/dev/null 2>&1; then
115+
docker rm -f \
116+
Exceptionless-Elasticsearch \
117+
Exceptionless-Kibana \
118+
Exceptionless-Redis \
119+
Exceptionless-RedisInsight \
120+
Redis-insight \
121+
Exceptionless-Storage \
122+
Exceptionless-Mail \
123+
2>/dev/null || true
124+
fi
125+
'''
126+
127+
[[actions]]
128+
name = "Hard reset Aspire data"
129+
icon = "tool"
130+
command = '''
131+
if command -v docker >/dev/null 2>&1 && docker info >/dev/null 2>&1; then
132+
docker rm -f \
133+
Exceptionless-Elasticsearch \
134+
Exceptionless-Kibana \
135+
Exceptionless-Redis \
136+
Exceptionless-RedisInsight \
137+
Redis-insight \
138+
Exceptionless-Storage \
139+
Exceptionless-Mail \
140+
2>/dev/null || true
141+
142+
docker volume rm exceptionless.data.v1 2>/dev/null || true
143+
fi
144+
'''

0 commit comments

Comments
 (0)