@thingd/cli 0.40.0 → 0.40.1
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":"cloud.d.ts","sourceRoot":"","sources":["../../src/commands/cloud.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"cloud.d.ts","sourceRoot":"","sources":["../../src/commands/cloud.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,UAAU,EAA2C,MAAM,aAAa,CAAC;AAiBvF,wBAAsB,QAAQ,CAAC,OAAO,EAAE,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC,CA4BjE"}
|
package/dist/commands/cloud.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { readCloudConfig, writeCloudConfig, removeCloudConfig } from "../lib/cloud-config.js";
|
|
2
|
-
import { getMe, listProjects, createProject, listInstances, createInstance, createApiKey, CloudApiError, } from "../lib/cloud-api.js";
|
|
3
|
-
import { requiredToken, requiredFlag, stringFlag } from "../index.js";
|
|
4
1
|
import pc from "picocolors";
|
|
2
|
+
import { requiredFlag, requiredToken, stringFlag } from "../index.js";
|
|
3
|
+
import { CloudApiError, createApiKey, createInstance, createProject, getMe, listInstances, listProjects, } from "../lib/cloud-api.js";
|
|
4
|
+
import { readCloudConfig, removeCloudConfig, writeCloudConfig, } from "../lib/cloud-config.js";
|
|
5
5
|
export async function runCloud(context) {
|
|
6
6
|
const sub = requiredToken(context.parsed, 1, "subcommand");
|
|
7
7
|
switch (sub) {
|
|
@@ -61,7 +61,7 @@ async function runLogout(context) {
|
|
|
61
61
|
async function runCloudStatus(context) {
|
|
62
62
|
const config = readCloudConfig();
|
|
63
63
|
if (!config) {
|
|
64
|
-
context.stdout.write(
|
|
64
|
+
context.stdout.write(`Not logged in. Run ${pc.cyan("thingd cloud login")}\n`);
|
|
65
65
|
return;
|
|
66
66
|
}
|
|
67
67
|
try {
|
|
@@ -70,13 +70,13 @@ async function runCloudStatus(context) {
|
|
|
70
70
|
`API: ${config.url ?? "https://api.thingd.cloud"}\n`);
|
|
71
71
|
}
|
|
72
72
|
catch {
|
|
73
|
-
context.stdout.write(
|
|
73
|
+
context.stdout.write(`Token expired. Run ${pc.cyan("thingd cloud login")}\n`);
|
|
74
74
|
}
|
|
75
75
|
}
|
|
76
76
|
async function requireConfig(context) {
|
|
77
77
|
const config = readCloudConfig();
|
|
78
78
|
if (!config) {
|
|
79
|
-
context.stderr.write(
|
|
79
|
+
context.stderr.write(`Not logged in. Run ${pc.cyan("thingd cloud login")} first.\n`);
|
|
80
80
|
throw new Error("not_logged_in");
|
|
81
81
|
}
|
|
82
82
|
return config;
|
package/dist/lib/cloud-api.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cloud-api.d.ts","sourceRoot":"","sources":["../../src/lib/cloud-api.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"cloud-api.d.ts","sourceRoot":"","sources":["../../src/lib/cloud-api.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AASrD,MAAM,MAAM,YAAY,GAAG;IACzB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF,MAAM,MAAM,aAAa,GAAG;IAC1B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF,MAAM,MAAM,WAAW,GAAG;IACxB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,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readFileSync,
|
|
1
|
+
import { existsSync, readFileSync, unlinkSync, writeFileSync } from "node:fs";
|
|
2
2
|
import { join } from "node:path";
|
|
3
3
|
import { defaultThingdDir, ensureThingdDir } from "../paths.js";
|
|
4
4
|
const CONFIG_FILE = "cloud-config.json";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@thingd/cli",
|
|
3
|
-
"version": "0.40.
|
|
3
|
+
"version": "0.40.1",
|
|
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.40.
|
|
47
|
+
"@thingd/sdk": "0.40.1"
|
|
48
48
|
},
|
|
49
49
|
"engines": {
|
|
50
50
|
"node": ">=24.0.0"
|