@openparachute/hub 0.7.4-rc.13 → 0.7.4-rc.15
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/package.json +1 -1
- package/src/__tests__/admin-lock.test.ts +7 -1
- package/src/__tests__/doctor.test.ts +464 -0
- package/src/api-admin-lock.ts +7 -0
- package/src/cli.ts +18 -0
- package/src/commands/doctor.ts +894 -0
- package/src/help.ts +38 -0
- package/web/ui/dist/assets/{index-DygKux-C.js → index-CkKBaPaO.js} +7 -7
- package/web/ui/dist/index.html +1 -1
package/src/help.ts
CHANGED
|
@@ -17,6 +17,7 @@ Usage:
|
|
|
17
17
|
parachute install <service> install and register a service
|
|
18
18
|
services: ${services}
|
|
19
19
|
parachute status show installed services, run state, health
|
|
20
|
+
parachute doctor run health checks + tell you the one thing to fix
|
|
20
21
|
parachute start [service] start a module via the supervisor (or ensure the hub is up)
|
|
21
22
|
parachute stop [service] stop a module via the supervisor (or stop the hub unit)
|
|
22
23
|
parachute restart [service] restart a module via the supervisor (or restart the hub unit)
|
|
@@ -367,6 +368,43 @@ Example:
|
|
|
367
368
|
`;
|
|
368
369
|
}
|
|
369
370
|
|
|
371
|
+
export function doctorHelp(): string {
|
|
372
|
+
return `parachute doctor — health / diagnostics for your Parachute install
|
|
373
|
+
|
|
374
|
+
Usage:
|
|
375
|
+
parachute doctor [--json]
|
|
376
|
+
|
|
377
|
+
What it does:
|
|
378
|
+
Runs a set of independent health checks and prints a grouped report
|
|
379
|
+
(✓ pass / ⚠ warn / ✗ fail), each with a one-line detail and — where there
|
|
380
|
+
is one — a copy-pasteable fix-it command. The single command that answers
|
|
381
|
+
"is my Parachute healthy, and if not, what's the one thing to fix?"
|
|
382
|
+
|
|
383
|
+
Checks (each PASSES on a fresh / fully-current install — doctor positively
|
|
384
|
+
detects a known-bad condition and never treats "not configured" as broken):
|
|
385
|
+
- Hub supervisor reachable on :1939 (/health).
|
|
386
|
+
- Each CONFIGURED module alive via its loopback /health (2xx or 401 = live).
|
|
387
|
+
- services.json parses + required fields valid (a missing file is the
|
|
388
|
+
fresh pre-install state, not a failure).
|
|
389
|
+
- operator.token exists, parses, and its issuer matches the hub (the
|
|
390
|
+
recurring "not signed in to the hub" / issuer-mismatch class).
|
|
391
|
+
- Each first-party module bin is executable (catches the lost-+x-bit
|
|
392
|
+
start-failure class).
|
|
393
|
+
- Migration: legacy detached install? known cruft at the ecosystem root?
|
|
394
|
+
(allowlist detectors only — a fresh root flags nothing).
|
|
395
|
+
- Exposure: if exposed, is the public origin reachable? If not exposed,
|
|
396
|
+
"loopback only" is reported as benign info, never a warning.
|
|
397
|
+
- Version freshness (cosmetic) — drift is WARN at most, never a failure.
|
|
398
|
+
|
|
399
|
+
Flags:
|
|
400
|
+
--json emit a single JSON object instead of the human report
|
|
401
|
+
|
|
402
|
+
Exit codes:
|
|
403
|
+
0 no failures (warnings are advisory and still exit 0)
|
|
404
|
+
1 one or more checks failed
|
|
405
|
+
`;
|
|
406
|
+
}
|
|
407
|
+
|
|
370
408
|
export function exposeHelp(): string {
|
|
371
409
|
return `parachute expose — route your services behind HTTPS on a network layer
|
|
372
410
|
|