@atlashub/smartstack-cli 4.39.0 → 4.40.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +20 -9
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/templates/skills/dev-start/SKILL.md +10 -6
package/package.json
CHANGED
|
@@ -278,7 +278,9 @@ If `--frontend-only`: skip backend checks.
|
|
|
278
278
|
|
|
279
279
|
## Step 5: Launch backend
|
|
280
280
|
|
|
281
|
-
|
|
281
|
+
Track whether the backend was just launched: `BACKEND_JUST_LAUNCHED=true/false`. This is used in Step 7 for cache invalidation.
|
|
282
|
+
|
|
283
|
+
If NOT already running and NOT `--frontend-only` (set `BACKEND_JUST_LAUNCHED=true`):
|
|
282
284
|
|
|
283
285
|
```bash
|
|
284
286
|
# cd into the API directory first
|
|
@@ -313,8 +315,10 @@ Use `Bash(run_in_background=true)` so it runs in background.
|
|
|
313
315
|
|
|
314
316
|
## Step 7: Handle admin password
|
|
315
317
|
|
|
316
|
-
|
|
317
|
-
|
|
318
|
+
**Cache invalidation rule:** If the backend was just launched in Step 5 (i.e., it was NOT already running), the cache is STALE because `MigrateAsync()` + `HasData()` may have re-seeded the admin user with the default password hash, overwriting any previously set password. In this case, ALWAYS run a fresh admin reset regardless of `dev-session.json`.
|
|
319
|
+
|
|
320
|
+
1. If `.claude/dev-session.json` exists and contains a password AND `--reset` NOT specified AND the backend was already running (NOT launched in Step 5) -> reuse stored credentials
|
|
321
|
+
2. If `--reset` OR no stored password OR backend was just launched in Step 5:
|
|
318
322
|
a. If backend was just launched, wait for it to be UP first.
|
|
319
323
|
Run the full wait in a **single bash command** to avoid multiple tool calls:
|
|
320
324
|
```bash
|
|
@@ -335,9 +339,9 @@ Use `Bash(run_in_background=true)` so it runs in background.
|
|
|
335
339
|
If `/scalar` does not respond after 30s, warn the user and attempt the reset anyway.
|
|
336
340
|
b. Run admin reset using the connection string extracted from appsettings (Step 3):
|
|
337
341
|
```bash
|
|
338
|
-
smartstack admin reset --connection
|
|
342
|
+
smartstack admin reset --connection '{CONN_STR}' --force --json
|
|
339
343
|
```
|
|
340
|
-
**IMPORTANT:** Always pass `--connection` with the full connection string. Without it, the CLI shows an interactive environment picker that blocks execution.
|
|
344
|
+
**IMPORTANT:** Always pass `--connection` with the full connection string (single-quoted to avoid shell expansion). Without it, the CLI shows an interactive environment picker that blocks execution.
|
|
341
345
|
c. Parse JSON output to extract email and password
|
|
342
346
|
d. Write `.claude/dev-session.json`:
|
|
343
347
|
```json
|
|
@@ -380,7 +384,7 @@ Use `Bash(run_in_background=true)` so it runs in background.
|
|
|
380
384
|
1. **NEVER debug or fix code** - This skill ONLY starts processes. If the backend or frontend fails to start, display the error and STOP. Do NOT attempt to: clean/restore/rebuild, upgrade packages, inspect DLLs, clear NuGet cache, read .csproj files, or any other diagnostic/repair action. The user will fix the issue themselves.
|
|
381
385
|
2. **Fail-fast on crash** - After launching backend in background, wait 5s then check TaskOutput. If the process already exited or shows errors, report and STOP immediately.
|
|
382
386
|
3. **Backend must be READY before admin reset** - First poll the port (netstat), then poll the `/scalar` endpoint (HTTP 200/302) to confirm the API is fully initialized. Kestrel binds the port before the app finishes starting, so port-only checks are insufficient.
|
|
383
|
-
4. **Admin reset requires --connection** - Always pass `--connection
|
|
387
|
+
4. **Admin reset requires --connection** - Always pass `--connection '{CONN_STR}'` (single-quoted to avoid shell expansion) to avoid the interactive environment picker.
|
|
384
388
|
5. **Read config files in parallel** - When reading appsettings, .env, and launchSettings, use multiple Read calls in a single message.
|
|
385
389
|
6. **Cross-worktree support** - Detect the correct API directory regardless of which worktree we're in.
|
|
386
390
|
7. **No MCP required** - This skill only uses bash commands and the `smartstack` CLI.
|