Files
OmniRoute/scripts/query_all_provider_connections.cjs
jowimila 34251a1c37 chore(dev): bump better-sqlite3 and add DB query scripts for provider_connections (Anthropic/Claude debugging) (#9325)
Validated in local merge-train (devbox-vm-06-dev002) @ combined-tip (FAST gates green: static + changed tests + vitest — only pre-existing audit.test.ts flake). Evidence: /home/diegosouzapw/dev/proxys/OmniRoute/.claude/worktrees/merge-train-20260805-213228-suite.log
2026-08-05 21:46:27 -03:00

13 lines
546 B
JavaScript

const Database = require('better-sqlite3');
const path = require('path');
const dbPath = path.resolve(process.env.USERPROFILE, '.omniroute', 'storage.sqlite');
try {
const db = new Database(dbPath, { readonly: true });
const rows = db.prepare(`SELECT id, provider, name, auth_type, is_active, last_error, test_status, updated_at FROM provider_connections ORDER BY updated_at DESC LIMIT 200`).all();
console.log(JSON.stringify(rows, null, 2));
db.close();
} catch (err) {
console.error('ERROR', err && err.message);
process.exit(2);
}