aladdin-ai 2.2.3 → 2.2.5
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/commands/doctor.js +12 -0
- package/package.json +1 -1
package/commands/doctor.js
CHANGED
|
@@ -169,6 +169,18 @@ export async function doctorCommand() {
|
|
|
169
169
|
warn('frontend not responding on :3000', 'check `npx aladdin-ai logs frontend`');
|
|
170
170
|
}
|
|
171
171
|
|
|
172
|
+
// ── Database readiness ───────────────────────────────────────────
|
|
173
|
+
console.log(chalk.bold('\nDatabase'));
|
|
174
|
+
const readyRes = await fetchWithTimeout('http://localhost:8000/ready');
|
|
175
|
+
if (readyRes && readyRes.status === 200) {
|
|
176
|
+
ok('database reachable and ready');
|
|
177
|
+
} else if (readyRes && readyRes.status === 503) {
|
|
178
|
+
bad('database not ready', 'check postgres container: `npx aladdin-ai logs postgres`');
|
|
179
|
+
failures++;
|
|
180
|
+
} else {
|
|
181
|
+
warn('readiness endpoint not responding', 'backend may not be running');
|
|
182
|
+
}
|
|
183
|
+
|
|
172
184
|
// ── Summary ──────────────────────────────────────────────────────
|
|
173
185
|
console.log();
|
|
174
186
|
if (failures === 0) {
|