@vox-ai-app/storage 1.0.3 → 1.0.4
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
CHANGED
package/src/db.js
CHANGED
|
@@ -4,10 +4,11 @@ import path from 'node:path'
|
|
|
4
4
|
import { runMigrations } from './migrations/runner.js'
|
|
5
5
|
import * as initialSchema from './migrations/001_initial_schema.js'
|
|
6
6
|
import * as taskActivityTypes from './migrations/002_task_activity_types.js'
|
|
7
|
+
import * as mcpLastSynced from './migrations/003_mcp_last_synced.js'
|
|
7
8
|
|
|
8
9
|
const dbs = new Map()
|
|
9
10
|
|
|
10
|
-
const migrations = [initialSchema, taskActivityTypes]
|
|
11
|
+
const migrations = [initialSchema, taskActivityTypes, mcpLastSynced]
|
|
11
12
|
|
|
12
13
|
function resolveDbPath(dbPath) {
|
|
13
14
|
const normalized = String(dbPath || '').trim()
|
package/src/repos/mcp-servers.js
CHANGED
|
@@ -11,6 +11,7 @@ function mapServer(row) {
|
|
|
11
11
|
url: row.url || null,
|
|
12
12
|
env: JSON.parse(row.env),
|
|
13
13
|
isEnabled: !!row.is_enabled,
|
|
14
|
+
lastSyncedAt: row.last_synced_at || null,
|
|
14
15
|
createdAt: row.created_at,
|
|
15
16
|
updatedAt: row.updated_at
|
|
16
17
|
}
|
|
@@ -48,7 +49,7 @@ export function updateMcpServer(db, id, updates) {
|
|
|
48
49
|
|
|
49
50
|
db.prepare(
|
|
50
51
|
`UPDATE mcp_servers SET name = ?, transport = ?, command = ?, args = ?, url = ?,
|
|
51
|
-
env = ?, is_enabled = ?, updated_at = ?
|
|
52
|
+
env = ?, is_enabled = ?, last_synced_at = ?, updated_at = ?
|
|
52
53
|
WHERE id = ?`
|
|
53
54
|
).run(
|
|
54
55
|
String(merged.name),
|
|
@@ -58,6 +59,7 @@ export function updateMcpServer(db, id, updates) {
|
|
|
58
59
|
merged.url || null,
|
|
59
60
|
JSON.stringify(merged.env || {}),
|
|
60
61
|
merged.isEnabled === false ? 0 : 1,
|
|
62
|
+
merged.lastSyncedAt || null,
|
|
61
63
|
now,
|
|
62
64
|
id
|
|
63
65
|
)
|