protovibe 1.1.7 → 1.1.8

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.mjs +24 -19
  2. package/package.json +2 -1
package/dist/index.mjs CHANGED
@@ -76,20 +76,23 @@ function InfoBox({ version }) {
76
76
  import { existsSync, readFileSync } from "fs";
77
77
  import { join } from "path";
78
78
  import { homedir } from "os";
79
- function getClaudeCredentialsPath() {
80
- return join(homedir(), ".claude", ".credentials.json");
81
- }
79
+ var CREDENTIAL_PATHS = [
80
+ join(homedir(), ".claude", ".credentials.json"),
81
+ join(homedir(), ".claude", "auth.json")
82
+ ];
82
83
  function isAuthenticated() {
83
- const credPath = getClaudeCredentialsPath();
84
- if (!existsSync(credPath)) return false;
85
- try {
86
- const content = readFileSync(credPath, "utf-8").trim();
87
- if (!content) return false;
88
- const parsed = JSON.parse(content);
89
- return Object.keys(parsed).length > 0;
90
- } catch {
91
- return false;
84
+ for (const credPath of CREDENTIAL_PATHS) {
85
+ if (!existsSync(credPath)) continue;
86
+ try {
87
+ const content = readFileSync(credPath, "utf-8").trim();
88
+ if (!content) continue;
89
+ const parsed = JSON.parse(content);
90
+ if (Object.keys(parsed).length > 0) return true;
91
+ } catch {
92
+ continue;
93
+ }
92
94
  }
95
+ return existsSync(join(homedir(), ".claude", "settings.json"));
93
96
  }
94
97
 
95
98
  // src/spawn.ts
@@ -680,14 +683,10 @@ function App({ terminalWidth, version }) {
680
683
 
681
684
  // src/index.tsx
682
685
  import { execSync as execSync2, spawnSync as spawnSync2 } from "child_process";
683
- import { readFileSync as readFileSync2 } from "fs";
684
- import { fileURLToPath } from "url";
685
- import { dirname as dirname2, join as join3 } from "path";
686
+ import { createRequire } from "module";
686
687
  import { get } from "https";
687
- var __dirname = dirname2(fileURLToPath(import.meta.url));
688
- var pkg = JSON.parse(
689
- readFileSync2(join3(__dirname, "..", "package.json"), "utf-8")
690
- );
688
+ var require2 = createRequire(import.meta.url);
689
+ var pkg = require2("../package.json");
691
690
  function isNewerVersion(current, latest) {
692
691
  const parse = (v) => v.split(".").map(Number);
693
692
  const [cMaj, cMin, cPatch] = parse(current);
@@ -721,6 +720,12 @@ function fetchLatestVersion() {
721
720
  });
722
721
  }
723
722
  async function main() {
723
+ if (process.argv[1]?.includes("node_modules")) {
724
+ process.stderr.write(
725
+ "\n \u2717 protovibe was installed locally.\n\n Option 1 \u2014 run it right now:\n npx protovibe\n\n Option 2 \u2014 install globally (recommended):\n npm install -g protovibe\n\n"
726
+ );
727
+ process.exit(1);
728
+ }
724
729
  if (process.env.PROTOVIBE_UPDATED !== "1") {
725
730
  const latest = await fetchLatestVersion();
726
731
  if (latest && isNewerVersion(pkg.version, latest)) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "protovibe",
3
- "version": "1.1.7",
3
+ "version": "1.1.8",
4
4
  "description": "A branded CLI platform layer on top of Claude Code",
5
5
  "author": "razorgojo",
6
6
  "license": "MIT",
@@ -40,6 +40,7 @@
40
40
  "@clack/prompts": "^1.1.0",
41
41
  "chalk": "^5.6.2",
42
42
  "ink": "^6.8.0",
43
+ "protovibe": "^1.1.7",
43
44
  "react": "^19.2.4"
44
45
  },
45
46
  "devDependencies": {