chainlesschain 0.47.9 → 0.49.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/bin/chainlesschain.js +0 -0
- package/package.json +1 -1
- package/src/assets/web-panel/.build-hash +1 -1
- package/src/assets/web-panel/assets/{AppLayout-6SPt_8Y_.js → AppLayout-Rvi759IS.js} +1 -1
- package/src/assets/web-panel/assets/Dashboard-BS-tzGNj.css +1 -0
- package/src/assets/web-panel/assets/{Dashboard-Br7kCwKJ.js → Dashboard-DBhFxXYQ.js} +2 -2
- package/src/assets/web-panel/assets/{index-tN-8TosE.js → index-uL0cZ8N_.js} +2 -2
- package/src/assets/web-panel/index.html +2 -2
- package/src/commands/codegen.js +303 -0
- package/src/commands/collab.js +482 -0
- package/src/commands/crosschain.js +382 -0
- package/src/commands/dbevo.js +388 -0
- package/src/commands/dev.js +411 -0
- package/src/commands/federation.js +427 -0
- package/src/commands/fusion.js +332 -0
- package/src/commands/governance.js +505 -0
- package/src/commands/hardening.js +110 -0
- package/src/commands/incentive.js +373 -0
- package/src/commands/inference.js +304 -0
- package/src/commands/infra.js +361 -0
- package/src/commands/kg.js +371 -0
- package/src/commands/marketplace.js +326 -0
- package/src/commands/mcp.js +97 -18
- package/src/commands/nlprog.js +329 -0
- package/src/commands/ops.js +408 -0
- package/src/commands/perception.js +385 -0
- package/src/commands/pqc.js +34 -0
- package/src/commands/privacy.js +345 -0
- package/src/commands/quantization.js +280 -0
- package/src/commands/recommend.js +336 -0
- package/src/commands/reputation.js +349 -0
- package/src/commands/runtime.js +500 -0
- package/src/commands/sla.js +352 -0
- package/src/commands/stress.js +252 -0
- package/src/commands/tech.js +268 -0
- package/src/commands/tenant.js +576 -0
- package/src/commands/trust.js +366 -0
- package/src/harness/mcp-client.js +330 -54
- package/src/index.js +112 -0
- package/src/lib/aiops.js +523 -0
- package/src/lib/autonomous-developer.js +524 -0
- package/src/lib/code-agent.js +442 -0
- package/src/lib/collaboration-governance.js +556 -0
- package/src/lib/community-governance.js +649 -0
- package/src/lib/content-recommendation.js +600 -0
- package/src/lib/cross-chain.js +669 -0
- package/src/lib/dbevo.js +669 -0
- package/src/lib/decentral-infra.js +445 -0
- package/src/lib/federation-hardening.js +587 -0
- package/src/lib/hardening-manager.js +409 -0
- package/src/lib/inference-network.js +407 -0
- package/src/lib/knowledge-graph.js +530 -0
- package/src/lib/mcp-client.js +3 -0
- package/src/lib/multimodal.js +698 -0
- package/src/lib/nl-programming.js +595 -0
- package/src/lib/perception.js +500 -0
- package/src/lib/pqc-manager.js +141 -9
- package/src/lib/privacy-computing.js +575 -0
- package/src/lib/protocol-fusion.js +535 -0
- package/src/lib/quantization.js +362 -0
- package/src/lib/reputation-optimizer.js +509 -0
- package/src/lib/skill-marketplace.js +397 -0
- package/src/lib/sla-manager.js +484 -0
- package/src/lib/stress-tester.js +383 -0
- package/src/lib/tech-learning-engine.js +651 -0
- package/src/lib/tenant-saas.js +831 -0
- package/src/lib/token-incentive.js +513 -0
- package/src/lib/trust-security.js +473 -0
- package/src/lib/universal-runtime.js +771 -0
- package/src/assets/web-panel/assets/Dashboard-CKeMmCoT.css +0 -1
|
@@ -0,0 +1,388 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `cc dbevo` — CLI surface for Phase 80 Database Evolution Framework.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import { Command } from "commander";
|
|
6
|
+
|
|
7
|
+
import {
|
|
8
|
+
MIGRATION_STATUS,
|
|
9
|
+
MIGRATION_DIRECTION,
|
|
10
|
+
SUGGESTION_TYPE,
|
|
11
|
+
ensureDbEvoTables,
|
|
12
|
+
registerMigration,
|
|
13
|
+
listRegisteredMigrations,
|
|
14
|
+
getCurrentVersion,
|
|
15
|
+
getPendingMigrations,
|
|
16
|
+
migrateUp,
|
|
17
|
+
migrateDown,
|
|
18
|
+
getMigrationHistory,
|
|
19
|
+
getMigrationStatus,
|
|
20
|
+
validateMigrations,
|
|
21
|
+
logQuery,
|
|
22
|
+
getQueryStats,
|
|
23
|
+
setSlowQueryThreshold,
|
|
24
|
+
clearQueryLog,
|
|
25
|
+
analyzeQueries,
|
|
26
|
+
listSuggestions,
|
|
27
|
+
getSuggestion,
|
|
28
|
+
applySuggestion,
|
|
29
|
+
getDbEvoStats,
|
|
30
|
+
} from "../lib/dbevo.js";
|
|
31
|
+
|
|
32
|
+
function _dbFromCtx(cmd) {
|
|
33
|
+
const root = cmd?.parent?.parent ?? cmd?.parent;
|
|
34
|
+
return root?._db;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export function registerDbEvoCommand(program) {
|
|
38
|
+
const dbevo = new Command("dbevo")
|
|
39
|
+
.description("Database evolution & migration framework (Phase 80)")
|
|
40
|
+
.hook("preAction", (thisCmd) => {
|
|
41
|
+
const db = _dbFromCtx(thisCmd);
|
|
42
|
+
if (db) ensureDbEvoTables(db);
|
|
43
|
+
});
|
|
44
|
+
|
|
45
|
+
/* ── Catalogs ────────────────────────────────────── */
|
|
46
|
+
|
|
47
|
+
dbevo
|
|
48
|
+
.command("migration-statuses")
|
|
49
|
+
.description("List migration statuses")
|
|
50
|
+
.option("--json", "JSON output")
|
|
51
|
+
.action((opts) => {
|
|
52
|
+
const statuses = Object.values(MIGRATION_STATUS);
|
|
53
|
+
if (opts.json) return console.log(JSON.stringify(statuses, null, 2));
|
|
54
|
+
for (const s of statuses) console.log(` ${s}`);
|
|
55
|
+
});
|
|
56
|
+
|
|
57
|
+
dbevo
|
|
58
|
+
.command("directions")
|
|
59
|
+
.description("List migration directions")
|
|
60
|
+
.option("--json", "JSON output")
|
|
61
|
+
.action((opts) => {
|
|
62
|
+
const dirs = Object.values(MIGRATION_DIRECTION);
|
|
63
|
+
if (opts.json) return console.log(JSON.stringify(dirs, null, 2));
|
|
64
|
+
for (const d of dirs) console.log(` ${d}`);
|
|
65
|
+
});
|
|
66
|
+
|
|
67
|
+
dbevo
|
|
68
|
+
.command("suggestion-types")
|
|
69
|
+
.description("List index suggestion types")
|
|
70
|
+
.option("--json", "JSON output")
|
|
71
|
+
.action((opts) => {
|
|
72
|
+
const types = Object.values(SUGGESTION_TYPE);
|
|
73
|
+
if (opts.json) return console.log(JSON.stringify(types, null, 2));
|
|
74
|
+
for (const t of types) console.log(` ${t}`);
|
|
75
|
+
});
|
|
76
|
+
|
|
77
|
+
/* ── Migration Registration ──────────────────────── */
|
|
78
|
+
|
|
79
|
+
dbevo
|
|
80
|
+
.command("register <version>")
|
|
81
|
+
.description("Register a migration version")
|
|
82
|
+
.requiredOption("-u, --up <sql>", "Up migration SQL")
|
|
83
|
+
.option("-d, --down <sql>", "Down migration SQL")
|
|
84
|
+
.option("--description <text>", "Migration description")
|
|
85
|
+
.option("--json", "JSON output")
|
|
86
|
+
.action((version, opts) => {
|
|
87
|
+
const result = registerMigration(version, {
|
|
88
|
+
description: opts.description,
|
|
89
|
+
upSql: opts.up,
|
|
90
|
+
downSql: opts.down,
|
|
91
|
+
});
|
|
92
|
+
if (opts.json) return console.log(JSON.stringify(result, null, 2));
|
|
93
|
+
if (result.registered) {
|
|
94
|
+
console.log(
|
|
95
|
+
`Migration registered: ${version} (checksum: ${result.checksum})`,
|
|
96
|
+
);
|
|
97
|
+
} else {
|
|
98
|
+
console.log(`Failed: ${result.reason}`);
|
|
99
|
+
}
|
|
100
|
+
});
|
|
101
|
+
|
|
102
|
+
dbevo
|
|
103
|
+
.command("registered")
|
|
104
|
+
.description("List registered migrations")
|
|
105
|
+
.option("--json", "JSON output")
|
|
106
|
+
.action((opts) => {
|
|
107
|
+
const migs = listRegisteredMigrations();
|
|
108
|
+
if (opts.json) return console.log(JSON.stringify(migs, null, 2));
|
|
109
|
+
if (migs.length === 0) return console.log("No migrations registered.");
|
|
110
|
+
for (const m of migs) {
|
|
111
|
+
console.log(
|
|
112
|
+
` ${m.version.padEnd(12)} ${(m.description || "").padEnd(30)} ${m.hasDown ? "up/down" : "up only"} ${m.checksum}`,
|
|
113
|
+
);
|
|
114
|
+
}
|
|
115
|
+
});
|
|
116
|
+
|
|
117
|
+
dbevo
|
|
118
|
+
.command("validate")
|
|
119
|
+
.description("Validate registered migrations")
|
|
120
|
+
.option("--json", "JSON output")
|
|
121
|
+
.action((opts) => {
|
|
122
|
+
const result = validateMigrations();
|
|
123
|
+
if (opts.json) return console.log(JSON.stringify(result, null, 2));
|
|
124
|
+
if (result.valid) {
|
|
125
|
+
console.log("All migrations valid.");
|
|
126
|
+
} else {
|
|
127
|
+
console.log("Issues found:");
|
|
128
|
+
for (const issue of result.issues) {
|
|
129
|
+
if (issue.type === "gap") {
|
|
130
|
+
console.log(
|
|
131
|
+
` Gap between versions ${issue.between[0]} and ${issue.between[1]}`,
|
|
132
|
+
);
|
|
133
|
+
} else if (issue.type === "missing_down") {
|
|
134
|
+
console.log(
|
|
135
|
+
` Missing down migration for version ${issue.version}`,
|
|
136
|
+
);
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
});
|
|
141
|
+
|
|
142
|
+
/* ── Migration Execution ─────────────────────────── */
|
|
143
|
+
|
|
144
|
+
dbevo
|
|
145
|
+
.command("status")
|
|
146
|
+
.description("Show migration status")
|
|
147
|
+
.option("--json", "JSON output")
|
|
148
|
+
.action((opts) => {
|
|
149
|
+
const db = _dbFromCtx(dbevo);
|
|
150
|
+
const s = getMigrationStatus(db);
|
|
151
|
+
if (opts.json) return console.log(JSON.stringify(s, null, 2));
|
|
152
|
+
console.log(`Current version: ${s.currentVersion || "(none)"}`);
|
|
153
|
+
console.log(`Registered: ${s.totalRegistered}`);
|
|
154
|
+
console.log(`Executed: ${s.totalExecuted}`);
|
|
155
|
+
console.log(`Pending: ${s.pendingCount}`);
|
|
156
|
+
if (s.pendingVersions.length > 0) {
|
|
157
|
+
console.log(`Pending versions: ${s.pendingVersions.join(", ")}`);
|
|
158
|
+
}
|
|
159
|
+
});
|
|
160
|
+
|
|
161
|
+
dbevo
|
|
162
|
+
.command("up")
|
|
163
|
+
.description("Migrate up (apply pending migrations)")
|
|
164
|
+
.option("-t, --target <version>", "Target version")
|
|
165
|
+
.option("--json", "JSON output")
|
|
166
|
+
.action((opts) => {
|
|
167
|
+
const db = _dbFromCtx(dbevo);
|
|
168
|
+
const result = migrateUp(db, opts.target);
|
|
169
|
+
if (opts.json) return console.log(JSON.stringify(result, null, 2));
|
|
170
|
+
if (result.migrated) {
|
|
171
|
+
console.log(`Migrated ${result.count} version(s):`);
|
|
172
|
+
for (const r of result.results) {
|
|
173
|
+
console.log(` ${r.version} — ${r.status}`);
|
|
174
|
+
}
|
|
175
|
+
} else {
|
|
176
|
+
console.log(`No migrations to run: ${result.reason}`);
|
|
177
|
+
}
|
|
178
|
+
});
|
|
179
|
+
|
|
180
|
+
dbevo
|
|
181
|
+
.command("down")
|
|
182
|
+
.description("Rollback migrations")
|
|
183
|
+
.option("-t, --target <version>", "Target version to rollback to")
|
|
184
|
+
.option("--json", "JSON output")
|
|
185
|
+
.action((opts) => {
|
|
186
|
+
const db = _dbFromCtx(dbevo);
|
|
187
|
+
const result = migrateDown(db, opts.target);
|
|
188
|
+
if (opts.json) return console.log(JSON.stringify(result, null, 2));
|
|
189
|
+
if (result.rolledBack) {
|
|
190
|
+
console.log(`Rolled back ${result.count} version(s):`);
|
|
191
|
+
for (const r of result.results) {
|
|
192
|
+
console.log(` ${r.version} — ${r.status}`);
|
|
193
|
+
}
|
|
194
|
+
} else {
|
|
195
|
+
console.log(`Cannot rollback: ${result.reason}`);
|
|
196
|
+
if (result.versions) {
|
|
197
|
+
console.log(` Missing down for: ${result.versions.join(", ")}`);
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
});
|
|
201
|
+
|
|
202
|
+
dbevo
|
|
203
|
+
.command("history")
|
|
204
|
+
.description("Show migration history")
|
|
205
|
+
.option("--limit <n>", "Max results", parseInt)
|
|
206
|
+
.option("--json", "JSON output")
|
|
207
|
+
.action((opts) => {
|
|
208
|
+
const db = _dbFromCtx(dbevo);
|
|
209
|
+
const history = getMigrationHistory(db, { limit: opts.limit });
|
|
210
|
+
if (opts.json) return console.log(JSON.stringify(history, null, 2));
|
|
211
|
+
if (history.length === 0) return console.log("No migration history.");
|
|
212
|
+
for (const h of history) {
|
|
213
|
+
const dir = h.direction === "up" ? "UP " : "DOWN";
|
|
214
|
+
console.log(
|
|
215
|
+
` ${dir} ${h.version.padEnd(12)} ${h.status.padEnd(12)} ${h.duration_ms}ms ${new Date(h.executed_at).toISOString().slice(0, 19)}`,
|
|
216
|
+
);
|
|
217
|
+
}
|
|
218
|
+
});
|
|
219
|
+
|
|
220
|
+
/* ── Query Logging ───────────────────────────────── */
|
|
221
|
+
|
|
222
|
+
dbevo
|
|
223
|
+
.command("query-log <sql> <duration-ms>")
|
|
224
|
+
.description("Log a query with duration")
|
|
225
|
+
.option("-s, --source <source>", "Query source")
|
|
226
|
+
.option("-p, --params <json>", "Query params JSON")
|
|
227
|
+
.option("--json", "JSON output")
|
|
228
|
+
.action((sql, durationMs, opts) => {
|
|
229
|
+
const db = _dbFromCtx(dbevo);
|
|
230
|
+
const params = opts.params ? JSON.parse(opts.params) : undefined;
|
|
231
|
+
const result = logQuery(db, sql, parseFloat(durationMs), {
|
|
232
|
+
params,
|
|
233
|
+
source: opts.source,
|
|
234
|
+
});
|
|
235
|
+
if (opts.json) return console.log(JSON.stringify(result, null, 2));
|
|
236
|
+
if (result.logged) {
|
|
237
|
+
console.log(
|
|
238
|
+
`Query logged: ${result.id.slice(0, 8)}${result.isSlow ? " (SLOW)" : ""}`,
|
|
239
|
+
);
|
|
240
|
+
} else {
|
|
241
|
+
console.log(`Failed: ${result.reason}`);
|
|
242
|
+
}
|
|
243
|
+
});
|
|
244
|
+
|
|
245
|
+
dbevo
|
|
246
|
+
.command("query-stats")
|
|
247
|
+
.description("Show query statistics")
|
|
248
|
+
.option("--json", "JSON output")
|
|
249
|
+
.action((opts) => {
|
|
250
|
+
const db = _dbFromCtx(dbevo);
|
|
251
|
+
const s = getQueryStats(db);
|
|
252
|
+
if (opts.json) return console.log(JSON.stringify(s, null, 2));
|
|
253
|
+
console.log(`Total queries: ${s.totalQueries}`);
|
|
254
|
+
console.log(
|
|
255
|
+
`Slow queries: ${s.slowQueries} (threshold: ${s.slowQueryThresholdMs}ms)`,
|
|
256
|
+
);
|
|
257
|
+
console.log(`Avg duration: ${s.avgDurationMs}ms`);
|
|
258
|
+
console.log(`Max duration: ${s.maxDurationMs}ms`);
|
|
259
|
+
if (s.topSlow.length > 0) {
|
|
260
|
+
console.log("Top slow queries:");
|
|
261
|
+
for (const q of s.topSlow.slice(0, 5)) {
|
|
262
|
+
console.log(
|
|
263
|
+
` ${String(q.durationMs).padEnd(8)}ms ${q.sql.slice(0, 60)}`,
|
|
264
|
+
);
|
|
265
|
+
}
|
|
266
|
+
}
|
|
267
|
+
});
|
|
268
|
+
|
|
269
|
+
dbevo
|
|
270
|
+
.command("slow-threshold <ms>")
|
|
271
|
+
.description("Set slow query threshold")
|
|
272
|
+
.option("--json", "JSON output")
|
|
273
|
+
.action((ms, opts) => {
|
|
274
|
+
const result = setSlowQueryThreshold(parseFloat(ms));
|
|
275
|
+
if (opts.json) return console.log(JSON.stringify(result, null, 2));
|
|
276
|
+
if (result.set) {
|
|
277
|
+
console.log(`Slow query threshold set to ${result.thresholdMs}ms`);
|
|
278
|
+
} else {
|
|
279
|
+
console.log(`Failed: ${result.reason}`);
|
|
280
|
+
}
|
|
281
|
+
});
|
|
282
|
+
|
|
283
|
+
dbevo
|
|
284
|
+
.command("query-clear")
|
|
285
|
+
.description("Clear query log")
|
|
286
|
+
.option("--json", "JSON output")
|
|
287
|
+
.action((opts) => {
|
|
288
|
+
const db = _dbFromCtx(dbevo);
|
|
289
|
+
const result = clearQueryLog(db);
|
|
290
|
+
if (opts.json) return console.log(JSON.stringify(result, null, 2));
|
|
291
|
+
console.log(`Cleared ${result.count} log entries.`);
|
|
292
|
+
});
|
|
293
|
+
|
|
294
|
+
/* ── Index Optimization ──────────────────────────── */
|
|
295
|
+
|
|
296
|
+
dbevo
|
|
297
|
+
.command("analyze")
|
|
298
|
+
.description("Analyze slow queries and generate index suggestions")
|
|
299
|
+
.option("--min-count <n>", "Min query count for suggestion", parseInt)
|
|
300
|
+
.option("--json", "JSON output")
|
|
301
|
+
.action((opts) => {
|
|
302
|
+
const db = _dbFromCtx(dbevo);
|
|
303
|
+
const result = analyzeQueries(db, { minQueryCount: opts.minCount });
|
|
304
|
+
if (opts.json) return console.log(JSON.stringify(result, null, 2));
|
|
305
|
+
console.log(`Analyzed ${result.slowQueriesAnalyzed || 0} slow queries.`);
|
|
306
|
+
console.log(`Generated ${result.suggestionsGenerated} new suggestions.`);
|
|
307
|
+
});
|
|
308
|
+
|
|
309
|
+
dbevo
|
|
310
|
+
.command("suggestions")
|
|
311
|
+
.description("List index suggestions")
|
|
312
|
+
.option("-a, --applied", "Only applied")
|
|
313
|
+
.option("-p, --pending", "Only pending")
|
|
314
|
+
.option("--json", "JSON output")
|
|
315
|
+
.action((opts) => {
|
|
316
|
+
const db = _dbFromCtx(dbevo);
|
|
317
|
+
const applied = opts.applied ? true : opts.pending ? false : undefined;
|
|
318
|
+
const sugs = listSuggestions(db, { applied });
|
|
319
|
+
if (opts.json) return console.log(JSON.stringify(sugs, null, 2));
|
|
320
|
+
if (sugs.length === 0) return console.log("No suggestions.");
|
|
321
|
+
for (const s of sugs) {
|
|
322
|
+
const status = s.applied ? "APPLIED" : "PENDING";
|
|
323
|
+
console.log(
|
|
324
|
+
` ${status.padEnd(8)} ${s.table_name.padEnd(20)} ${s.columns.padEnd(20)} ${s.suggestion_type.padEnd(18)} queries:${s.query_count} ${s.id.slice(0, 8)}`,
|
|
325
|
+
);
|
|
326
|
+
}
|
|
327
|
+
});
|
|
328
|
+
|
|
329
|
+
dbevo
|
|
330
|
+
.command("suggestion-show <id>")
|
|
331
|
+
.description("Show suggestion details")
|
|
332
|
+
.option("--json", "JSON output")
|
|
333
|
+
.action((id, opts) => {
|
|
334
|
+
const db = _dbFromCtx(dbevo);
|
|
335
|
+
const s = getSuggestion(db, id);
|
|
336
|
+
if (!s) return console.log("Suggestion not found.");
|
|
337
|
+
if (opts.json) return console.log(JSON.stringify(s, null, 2));
|
|
338
|
+
console.log(`ID: ${s.id}`);
|
|
339
|
+
console.log(`Table: ${s.table_name}`);
|
|
340
|
+
console.log(`Columns: ${s.columns}`);
|
|
341
|
+
console.log(`Type: ${s.suggestion_type}`);
|
|
342
|
+
console.log(
|
|
343
|
+
`Improvement: ${(s.estimated_improvement * 100).toFixed(0)}%`,
|
|
344
|
+
);
|
|
345
|
+
console.log(`Queries: ${s.query_count}`);
|
|
346
|
+
console.log(`Applied: ${s.applied ? "YES" : "NO"}`);
|
|
347
|
+
});
|
|
348
|
+
|
|
349
|
+
dbevo
|
|
350
|
+
.command("apply <id>")
|
|
351
|
+
.description("Apply an index suggestion")
|
|
352
|
+
.option("--json", "JSON output")
|
|
353
|
+
.action((id, opts) => {
|
|
354
|
+
const db = _dbFromCtx(dbevo);
|
|
355
|
+
const result = applySuggestion(db, id);
|
|
356
|
+
if (opts.json) return console.log(JSON.stringify(result, null, 2));
|
|
357
|
+
if (result.applied) {
|
|
358
|
+
console.log("Suggestion applied.");
|
|
359
|
+
console.log(` SQL: ${result.indexSql}`);
|
|
360
|
+
} else {
|
|
361
|
+
console.log(`Failed: ${result.reason}`);
|
|
362
|
+
}
|
|
363
|
+
});
|
|
364
|
+
|
|
365
|
+
/* ── Stats ───────────────────────────────────────── */
|
|
366
|
+
|
|
367
|
+
dbevo
|
|
368
|
+
.command("stats")
|
|
369
|
+
.description("Database evolution statistics")
|
|
370
|
+
.option("--json", "JSON output")
|
|
371
|
+
.action((opts) => {
|
|
372
|
+
const db = _dbFromCtx(dbevo);
|
|
373
|
+
const s = getDbEvoStats(db);
|
|
374
|
+
if (opts.json) return console.log(JSON.stringify(s, null, 2));
|
|
375
|
+
console.log(
|
|
376
|
+
`Migrations: ${s.migrations.registered} registered, ${s.migrations.executed} executed, ${s.migrations.pending} pending`,
|
|
377
|
+
);
|
|
378
|
+
console.log(` Current: ${s.migrations.currentVersion || "(none)"}`);
|
|
379
|
+
console.log(
|
|
380
|
+
`Query log: ${s.queryLog.total} total, ${s.queryLog.slowQueries} slow (threshold: ${s.queryLog.thresholdMs}ms)`,
|
|
381
|
+
);
|
|
382
|
+
console.log(
|
|
383
|
+
`Suggestions: ${s.suggestions.total} total, ${s.suggestions.pending} pending, ${s.suggestions.applied} applied`,
|
|
384
|
+
);
|
|
385
|
+
});
|
|
386
|
+
|
|
387
|
+
program.addCommand(dbevo);
|
|
388
|
+
}
|