@thingd/cli 0.47.1 → 0.47.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.
- package/dist/interactive.d.ts.map +1 -1
- package/dist/interactive.js +52 -17
- 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":"AAy1DA,wBAAsB,iBAAiB,IAAI,OAAO,CAAC,IAAI,CAAC,CA4CvD"}
|
package/dist/interactive.js
CHANGED
|
@@ -1591,29 +1591,52 @@ async function handleConnect(node) {
|
|
|
1591
1591
|
draw();
|
|
1592
1592
|
}
|
|
1593
1593
|
catch {
|
|
1594
|
-
viewerLines = [
|
|
1594
|
+
viewerLines = [
|
|
1595
|
+
pc.yellow("Could not fetch cloud instances."),
|
|
1596
|
+
pc.dim("Enter the MCP URL manually."),
|
|
1597
|
+
];
|
|
1595
1598
|
draw();
|
|
1596
1599
|
}
|
|
1597
1600
|
}
|
|
1598
1601
|
}
|
|
1599
1602
|
if (selectedDriver === "native" || selectedDriver === "cloud") {
|
|
1600
1603
|
const cloudCfg = selectedDriver === "cloud" ? readCloudConfig() : null;
|
|
1601
|
-
const
|
|
1604
|
+
const baseUrl = cloudCfg?.url ?? "https://api.thingd.cloud";
|
|
1605
|
+
const isCloudWithConfig = selectedDriver === "cloud" && cloudCfg?.token;
|
|
1602
1606
|
openForm(`Connect to ${selectedDriver}`, [
|
|
1603
1607
|
...(selectedDriver === "cloud"
|
|
1604
|
-
?
|
|
1605
|
-
|
|
1606
|
-
|
|
1607
|
-
|
|
1608
|
-
|
|
1609
|
-
|
|
1610
|
-
|
|
1611
|
-
|
|
1612
|
-
|
|
1613
|
-
|
|
1614
|
-
|
|
1615
|
-
|
|
1616
|
-
|
|
1608
|
+
? isCloudWithConfig
|
|
1609
|
+
? [
|
|
1610
|
+
{
|
|
1611
|
+
id: "project",
|
|
1612
|
+
label: "Cloud Project (slug)",
|
|
1613
|
+
value: "",
|
|
1614
|
+
},
|
|
1615
|
+
{
|
|
1616
|
+
id: "instance",
|
|
1617
|
+
label: "Cloud Instance (slug)",
|
|
1618
|
+
value: "",
|
|
1619
|
+
},
|
|
1620
|
+
{
|
|
1621
|
+
id: "token",
|
|
1622
|
+
label: "Bearer Token (optional)",
|
|
1623
|
+
isSecret: true,
|
|
1624
|
+
value: cloudCfg?.token ?? "",
|
|
1625
|
+
},
|
|
1626
|
+
]
|
|
1627
|
+
: [
|
|
1628
|
+
{
|
|
1629
|
+
id: "url",
|
|
1630
|
+
label: "MCP URL (from thingd.cloud dashboard)",
|
|
1631
|
+
value: "",
|
|
1632
|
+
},
|
|
1633
|
+
{
|
|
1634
|
+
id: "token",
|
|
1635
|
+
label: "Bearer Token (optional)",
|
|
1636
|
+
isSecret: true,
|
|
1637
|
+
value: cloudCfg?.token ?? "",
|
|
1638
|
+
},
|
|
1639
|
+
]
|
|
1617
1640
|
: [
|
|
1618
1641
|
{
|
|
1619
1642
|
id: "path",
|
|
@@ -1622,8 +1645,20 @@ async function handleConnect(node) {
|
|
|
1622
1645
|
},
|
|
1623
1646
|
]),
|
|
1624
1647
|
], async (vals) => {
|
|
1625
|
-
|
|
1626
|
-
|
|
1648
|
+
let mcpUrl;
|
|
1649
|
+
if (selectedDriver === "cloud") {
|
|
1650
|
+
if (isCloudWithConfig) {
|
|
1651
|
+
// Construct URL from project + instance slugs
|
|
1652
|
+
mcpUrl = `${baseUrl}/mcp/${encodeURIComponent(vals.project || "")}/${encodeURIComponent(vals.instance || "")}`;
|
|
1653
|
+
}
|
|
1654
|
+
else {
|
|
1655
|
+
mcpUrl = vals.url || "";
|
|
1656
|
+
}
|
|
1657
|
+
await connectToDriver(selectedDriver, mcpUrl, mcpUrl, vals.token);
|
|
1658
|
+
}
|
|
1659
|
+
else {
|
|
1660
|
+
await connectToDriver(selectedDriver, vals.path || "", undefined, undefined);
|
|
1661
|
+
}
|
|
1627
1662
|
});
|
|
1628
1663
|
}
|
|
1629
1664
|
else {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@thingd/cli",
|
|
3
|
-
"version": "0.47.
|
|
3
|
+
"version": "0.47.2",
|
|
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.47.
|
|
48
|
+
"@thingd/sdk": "0.47.2"
|
|
49
49
|
},
|
|
50
50
|
"engines": {
|
|
51
51
|
"node": ">=24.0.0"
|