@earntori/cli 0.2.11 → 0.2.12

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.
Files changed (2) hide show
  1. package/dist/index.js +2 -2
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { readdirSync } from "node:fs";
2
+ import { readdirSync, realpathSync } from "node:fs";
3
3
  // @earntori/cli — tori login | status | key --limit N [--write env] | stats | logout
4
4
  import { readFileSync, writeFileSync, mkdirSync, existsSync, appendFileSync, unlinkSync } from "node:fs";
5
5
  import { homedir } from "node:os";
@@ -166,7 +166,7 @@ function writeJson(p, o) { mkdirSync(dirname(resolve(p)), { recursive: true });
166
166
  const TORI_MCP_VERSION = "0.1.7";
167
167
  function cliVersion(cliBin) {
168
168
  try {
169
- return JSON.parse(readFileSync(resolve(dirname(cliBin), "..", "package.json"), "utf8")).version ?? "latest";
169
+ return JSON.parse(readFileSync(resolve(dirname(realpathSync(cliBin)), "..", "package.json"), "utf8")).version ?? "latest";
170
170
  }
171
171
  catch {
172
172
  return "latest";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@earntori/cli",
3
- "version": "0.2.11",
3
+ "version": "0.2.12",
4
4
  "description": "Tori CLI \u2014 sign in with GitHub, check your credits, mint a capped AI key into your tools.",
5
5
  "license": "MIT",
6
6
  "type": "module",