@thingd/cli 0.52.9 → 0.52.10
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../../src/dashboard/server.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAqErD,wBAAsB,oBAAoB,CACxC,iBAAiB,EAAE,iBAAiB,EACpC,IAAI,EAAE,MAAM,GACX,OAAO,CAAC;IAAE,MAAM,EAAE,OAAO,WAAW,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAA;CAAE,CAAC,
|
|
1
|
+
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../../src/dashboard/server.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAqErD,wBAAsB,oBAAoB,CACxC,iBAAiB,EAAE,iBAAiB,EACpC,IAAI,EAAE,MAAM,GACX,OAAO,CAAC;IAAE,MAAM,EAAE,OAAO,WAAW,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAA;CAAE,CAAC,CA2nB7E"}
|
package/dist/dashboard/server.js
CHANGED
|
@@ -128,13 +128,14 @@ export async function startDashboardServer(connectionOptions, port) {
|
|
|
128
128
|
// POST /api/connect (Dynamic connection swapping)
|
|
129
129
|
if (pathname === "/api/connect" && req.method === "POST") {
|
|
130
130
|
const bodyStr = await readBody(req);
|
|
131
|
-
const { path, driver, authToken } = JSON.parse(bodyStr);
|
|
131
|
+
const { path, driver, authToken, instanceSlug } = JSON.parse(bodyStr);
|
|
132
132
|
if (!path || !driver) {
|
|
133
133
|
sendError(res, 400, "Fields 'path' and 'driver' are required.");
|
|
134
134
|
return;
|
|
135
135
|
}
|
|
136
136
|
const cloudMode = isCloudPath(path);
|
|
137
137
|
const resolvedToken = authToken || (cloudMode ? readCloudConfig()?.token : undefined);
|
|
138
|
+
const resolvedInstanceSlug = instanceSlug || activeOptions.instanceSlug;
|
|
138
139
|
// Safely shut down the old db instance
|
|
139
140
|
await db.close();
|
|
140
141
|
// Spawn new db connection dynamically
|
|
@@ -143,12 +144,14 @@ export async function startDashboardServer(connectionOptions, port) {
|
|
|
143
144
|
url: cloudMode ? path : undefined,
|
|
144
145
|
driver,
|
|
145
146
|
authToken: resolvedToken,
|
|
147
|
+
instanceSlug: resolvedInstanceSlug,
|
|
146
148
|
});
|
|
147
149
|
activeOptions = {
|
|
148
150
|
path,
|
|
149
151
|
driver,
|
|
150
152
|
authToken: resolvedToken,
|
|
151
153
|
cloud: cloudMode,
|
|
154
|
+
instanceSlug: resolvedInstanceSlug,
|
|
152
155
|
};
|
|
153
156
|
res.writeHead(200, { "Content-Type": "application/json" });
|
|
154
157
|
res.end(JSON.stringify({ success: true, path, driver }));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@thingd/cli",
|
|
3
|
-
"version": "0.52.
|
|
3
|
+
"version": "0.52.10",
|
|
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.10"
|
|
49
49
|
},
|
|
50
50
|
"engines": {
|
|
51
51
|
"node": ">=24.0.0"
|