feat(FN-1832): add daemon mode and auth-aware node connect
- Add --daemon flag to fn serve command for headless node operation - Add daemon-aware messaging to fn node connect (shows auth status) - Add CLI integration tests for daemon mode (serve.test.ts) - Add auth middleware integration tests (auth-middleware-integration.test.ts) - Fix auth middleware test for /api/health subpath - Update bin.test.ts with daemon mode test coverage
This commit is contained in:
@@ -288,7 +288,13 @@ export async function runNodeConnect(
|
||||
}
|
||||
|
||||
console.log();
|
||||
console.log(" ✓ Node connected successfully");
|
||||
if (options.apiKey && status === "online") {
|
||||
console.log(` ✓ Node '${node.name}' connected (authenticated)`);
|
||||
} else if (options.apiKey && (status === "offline" || status === "error")) {
|
||||
console.log(` ⚠ Node is offline — the API key may be incorrect or the node may be unreachable`);
|
||||
} else {
|
||||
console.log(" ✓ Node connected successfully");
|
||||
}
|
||||
console.log();
|
||||
} finally {
|
||||
await central.close();
|
||||
|
||||
Reference in New Issue
Block a user