@thingd/cli 0.52.2 → 0.52.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/dist/interactive.d.ts.map +1 -1
- package/dist/interactive.js +38 -15
- package/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"interactive.d.ts","sourceRoot":"","sources":["../src/interactive.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"interactive.d.ts","sourceRoot":"","sources":["../src/interactive.ts"],"names":[],"mappings":"AAilEA,wBAAsB,iBAAiB,IAAI,OAAO,CAAC,IAAI,CAAC,CAyDvD"}
|
package/dist/interactive.js
CHANGED
|
@@ -212,23 +212,41 @@ async function fetchResourcesFallback() {
|
|
|
212
212
|
}
|
|
213
213
|
collections = Array.from(defaultCols).sort();
|
|
214
214
|
streams = Array.from(defaultStrs).sort();
|
|
215
|
-
// Fallback totals
|
|
216
|
-
totalObjects = await db.countObjects();
|
|
217
|
-
totalEventsCount = await db.countEvents();
|
|
218
|
-
totalActiveJobsCount = await db.countActiveJobs();
|
|
219
|
-
totalDeadJobsCount = await db.countDeadJobs();
|
|
220
215
|
}
|
|
221
216
|
catch (err) {
|
|
222
217
|
const msg = err instanceof Error ? err.message : String(err);
|
|
223
218
|
cloudError = `Failed to load resources: ${msg}`;
|
|
224
219
|
collections = [];
|
|
225
220
|
streams = [];
|
|
226
|
-
totalObjects = 0;
|
|
227
|
-
// Show error in viewer if it's currently showing the default message
|
|
228
221
|
if (viewerLines.length === 1 && viewerLines[0] === "Select an item to view details.") {
|
|
229
222
|
viewerLines = [pc.yellow(cloudError), pc.dim("Press 'r' to retry or 's' to switch driver.")];
|
|
230
223
|
}
|
|
231
224
|
}
|
|
225
|
+
// Counts — independent try/catch so one failure doesn't clear collections
|
|
226
|
+
try {
|
|
227
|
+
totalObjects = await db.countObjects();
|
|
228
|
+
}
|
|
229
|
+
catch {
|
|
230
|
+
totalObjects = 0;
|
|
231
|
+
}
|
|
232
|
+
try {
|
|
233
|
+
totalEventsCount = await db.countEvents();
|
|
234
|
+
}
|
|
235
|
+
catch {
|
|
236
|
+
totalEventsCount = 0;
|
|
237
|
+
}
|
|
238
|
+
try {
|
|
239
|
+
totalActiveJobsCount = await db.countActiveJobs();
|
|
240
|
+
}
|
|
241
|
+
catch {
|
|
242
|
+
totalActiveJobsCount = 0;
|
|
243
|
+
}
|
|
244
|
+
try {
|
|
245
|
+
totalDeadJobsCount = await db.countDeadJobs();
|
|
246
|
+
}
|
|
247
|
+
catch {
|
|
248
|
+
totalDeadJobsCount = 0;
|
|
249
|
+
}
|
|
232
250
|
// Queues
|
|
233
251
|
try {
|
|
234
252
|
const listed = await db.listQueues();
|
|
@@ -1957,14 +1975,19 @@ export async function runInteractiveCli() {
|
|
|
1957
1975
|
// Background polling loop for real-time updates
|
|
1958
1976
|
pollTimer = setInterval(async () => {
|
|
1959
1977
|
if (connected && !formState?.active) {
|
|
1960
|
-
|
|
1961
|
-
|
|
1962
|
-
|
|
1963
|
-
|
|
1964
|
-
|
|
1965
|
-
|
|
1966
|
-
|
|
1967
|
-
|
|
1978
|
+
try {
|
|
1979
|
+
const snapItemId = loadedItemId;
|
|
1980
|
+
await fetchResources();
|
|
1981
|
+
draw();
|
|
1982
|
+
const tree = buildTree();
|
|
1983
|
+
const n = tree[cursorIndex];
|
|
1984
|
+
// Silently reload content if the same node is still actively viewed
|
|
1985
|
+
if (n && snapItemId === n.id && n.type !== "category") {
|
|
1986
|
+
await loadContent(n).catch(() => { });
|
|
1987
|
+
}
|
|
1988
|
+
}
|
|
1989
|
+
catch {
|
|
1990
|
+
// Prevent unhandled rejection from killing the process
|
|
1968
1991
|
}
|
|
1969
1992
|
}
|
|
1970
1993
|
}, 2000);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@thingd/cli",
|
|
3
|
-
"version": "0.52.
|
|
3
|
+
"version": "0.52.4",
|
|
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
|
"homepage": "https://engine.thingd.cloud",
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
"cli-table3": "^0.6.5",
|
|
46
46
|
"picocolors": "^1.1.1",
|
|
47
47
|
"zod": "^4.4.3",
|
|
48
|
-
"@thingd/sdk": "0.52.
|
|
48
|
+
"@thingd/sdk": "0.52.4"
|
|
49
49
|
},
|
|
50
50
|
"engines": {
|
|
51
51
|
"node": ">=24.0.0"
|