@tangle-network/tcloud 0.4.3 → 0.4.5

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/cli.cjs CHANGED
@@ -1829,6 +1829,7 @@ var fs = __toESM(require("fs"), 1);
1829
1829
  var path = __toESM(require("path"), 1);
1830
1830
  var readline = __toESM(require("readline"), 1);
1831
1831
  var import_child_process = require("child_process");
1832
+ var import_meta = {};
1832
1833
  var CONFIG_DIR = path.join(process.env.HOME || "~", ".tcloud");
1833
1834
  var CONFIG_FILE = path.join(CONFIG_DIR, "config.json");
1834
1835
  var WALLETS_FILE = path.join(CONFIG_DIR, "wallets.json");
@@ -1884,8 +1885,18 @@ function teeType(value) {
1884
1885
  if (!value) return void 0;
1885
1886
  return value.toLowerCase();
1886
1887
  }
1888
+ function packageVersion() {
1889
+ try {
1890
+ const packageJson = JSON.parse(
1891
+ fs.readFileSync(new URL("../package.json", import_meta.url), "utf-8")
1892
+ );
1893
+ if (typeof packageJson.version === "string") return packageJson.version;
1894
+ } catch {
1895
+ }
1896
+ return "0.0.0";
1897
+ }
1887
1898
  var program = new import_commander.Command();
1888
- program.name("tcloud").description("Tangle AI Cloud CLI").version("0.1.0");
1899
+ program.name("tcloud").description("Tangle AI Cloud CLI").version(packageVersion());
1889
1900
  program.command("config").description("View or update configuration").option("--api-url <url>", "API base URL").option("--sandbox-url <url>", "Sandbox API base URL").option("--api-key <key>", "API key").option("--model <model>", "Default model").option("--chain <id>", "Chain ID").action((opts) => {
1890
1901
  const c = loadConfig();
1891
1902
  if (opts.apiUrl) c.apiUrl = opts.apiUrl;
package/dist/cli.js CHANGED
@@ -71,8 +71,18 @@ function teeType(value) {
71
71
  if (!value) return void 0;
72
72
  return value.toLowerCase();
73
73
  }
74
+ function packageVersion() {
75
+ try {
76
+ const packageJson = JSON.parse(
77
+ fs.readFileSync(new URL("../package.json", import.meta.url), "utf-8")
78
+ );
79
+ if (typeof packageJson.version === "string") return packageJson.version;
80
+ } catch {
81
+ }
82
+ return "0.0.0";
83
+ }
74
84
  var program = new Command();
75
- program.name("tcloud").description("Tangle AI Cloud CLI").version("0.1.0");
85
+ program.name("tcloud").description("Tangle AI Cloud CLI").version(packageVersion());
76
86
  program.command("config").description("View or update configuration").option("--api-url <url>", "API base URL").option("--sandbox-url <url>", "Sandbox API base URL").option("--api-key <key>", "API key").option("--model <model>", "Default model").option("--chain <id>", "Chain ID").action((opts) => {
77
87
  const c = loadConfig();
78
88
  if (opts.apiUrl) c.apiUrl = opts.apiUrl;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tangle-network/tcloud",
3
- "version": "0.4.3",
3
+ "version": "0.4.5",
4
4
  "description": "TypeScript SDK and CLI for Tangle AI Cloud — decentralized LLM inference",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",
@@ -75,7 +75,7 @@
75
75
  "@scure/bip32": "^2.2.0",
76
76
  "@scure/bip39": "^2.2.0",
77
77
  "@tangle-network/sandbox": "^0.1.2",
78
- "@tangle-network/tcloud-attestation": "workspace:^",
78
+ "@tangle-network/tcloud-attestation": "^0.1.0",
79
79
  "commander": "^14.0.3",
80
80
  "viem": "^2.48.4"
81
81
  },