@thingd/cli 0.37.2 → 0.37.3

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.
@@ -1224,7 +1224,7 @@ async function handleMaintenance() {
1224
1224
  if (op === "backup") {
1225
1225
  const backupPath = `thingd-backup-${Date.now()}.db`;
1226
1226
  try {
1227
- if (typeof db !== "undefined" && "backupTo" in db) {
1227
+ if (db?.backupTo) {
1228
1228
  db.backupTo(backupPath);
1229
1229
  viewerLines = [` Backup created: ${backupPath}`, ``];
1230
1230
  }
@@ -1238,7 +1238,7 @@ async function handleMaintenance() {
1238
1238
  }
1239
1239
  else if (op === "checkpoint") {
1240
1240
  try {
1241
- if (typeof db !== "undefined" && "walCheckpoint" in db) {
1241
+ if (db?.walCheckpoint) {
1242
1242
  const result = db.walCheckpoint();
1243
1243
  viewerLines = [
1244
1244
  ` WAL Checkpoint complete`,
@@ -1260,7 +1260,7 @@ async function handleMaintenance() {
1260
1260
  }
1261
1261
  else {
1262
1262
  try {
1263
- if (typeof db !== "undefined" && "countObjects" in db) {
1263
+ if (typeof db !== "undefined" && typeof db.countObjects === "function") {
1264
1264
  await db.countObjects();
1265
1265
  viewerLines = [` Integrity check passed`, ``];
1266
1266
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thingd/cli",
3
- "version": "0.37.2",
3
+ "version": "0.37.3",
4
4
  "description": "CLI, Interactive TUI Dashboard, and MCP server for thingd — a fast object-first data engine for applications and AI agents.",
5
5
  "type": "module",
6
6
  "author": "Sayan Mohsin",
@@ -44,7 +44,7 @@
44
44
  "cli-table3": "^0.6.5",
45
45
  "picocolors": "^1.1.1",
46
46
  "zod": "^4.4.3",
47
- "@thingd/sdk": "0.37.2"
47
+ "@thingd/sdk": "0.37.3"
48
48
  },
49
49
  "engines": {
50
50
  "node": ">=24.0.0"