sdx-cli 0.3.0 → 0.3.2

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.
@@ -61,15 +61,20 @@ function upsertRepos(db, repos) {
61
61
  }
62
62
  function setLocalRepoPath(db, name, localPath, org) {
63
63
  const normalized = node_path_1.default.resolve(localPath);
64
+ const now = new Date().toISOString();
64
65
  const existing = db
65
66
  .prepare('SELECT * FROM repo_registry WHERE name = ?')
66
67
  .get(name);
67
68
  if (existing) {
68
- db.prepare(`UPDATE repo_registry SET local_path = ?, source = CASE WHEN source='github' THEN 'hybrid' ELSE 'local' END WHERE name = ?`).run(normalized, name);
69
+ db.prepare(`UPDATE repo_registry
70
+ SET local_path = ?,
71
+ source = CASE WHEN source='github' THEN 'hybrid' ELSE 'local' END,
72
+ last_synced_at = ?
73
+ WHERE name = ?`).run(normalized, now, name);
69
74
  }
70
75
  else {
71
- db.prepare(`INSERT INTO repo_registry (name, full_name, org, archived, fork, local_path, source)
72
- VALUES (?, ?, ?, 0, 0, ?, 'local')`).run(name, org ? `${org}/${name}` : name, org ?? 'local', normalized);
76
+ db.prepare(`INSERT INTO repo_registry (name, full_name, org, archived, fork, local_path, source, last_synced_at)
77
+ VALUES (?, ?, ?, 0, 0, ?, 'local', ?)`).run(name, org ? `${org}/${name}` : name, org ?? 'local', normalized, now);
73
78
  }
74
79
  return getRepoByName(db, name);
75
80
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sdx-cli",
3
- "version": "0.3.0",
3
+ "version": "0.3.2",
4
4
  "description": "System Design Intelligence CLI",
5
5
  "type": "commonjs",
6
6
  "bin": {