prjct-cli 0.29.3 → 0.29.4

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.
@@ -12508,7 +12508,7 @@ var require_package = __commonJS({
12508
12508
  "package.json"(exports, module) {
12509
12509
  module.exports = {
12510
12510
  name: "prjct-cli",
12511
- version: "0.29.2",
12511
+ version: "0.29.3",
12512
12512
  description: "Built for Claude - Ship fast, track progress, stay focused. Developer momentum tool for indie hackers.",
12513
12513
  main: "core/index.ts",
12514
12514
  bin: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "prjct-cli",
3
- "version": "0.29.3",
3
+ "version": "0.29.4",
4
4
  "description": "Built for Claude - Ship fast, track progress, stay focused. Developer momentum tool for indie hackers.",
5
5
  "main": "core/index.ts",
6
6
  "bin": {
@@ -25,22 +25,42 @@ const ROOT = path.resolve(__dirname, '..')
25
25
  * Detect if this is a global npm install
26
26
  */
27
27
  function isGlobalInstall() {
28
- // Check npm config
28
+ // Check npm config (most reliable)
29
29
  if (process.env.npm_config_global === 'true') {
30
30
  return true
31
31
  }
32
32
 
33
- // Check install location
33
+ // Check install location against known global paths
34
34
  const installPath = __dirname
35
35
  const globalPaths = [
36
+ // macOS Intel
36
37
  '/usr/local/lib/node_modules',
38
+ // macOS M1/M2 (Homebrew)
39
+ '/opt/homebrew/lib/node_modules',
40
+ // Linux
37
41
  '/usr/lib/node_modules',
42
+ // Custom npm prefix
38
43
  path.join(process.env.HOME || '', '.npm-global', 'lib', 'node_modules'),
44
+ // nvm
39
45
  path.join(process.env.HOME || '', '.nvm'),
46
+ // Windows
40
47
  path.join(process.env.APPDATA || '', 'npm', 'node_modules'),
48
+ // pnpm global
49
+ path.join(process.env.HOME || '', '.local', 'share', 'pnpm'),
50
+ // Volta
51
+ path.join(process.env.HOME || '', '.volta'),
41
52
  ]
42
53
 
43
- return globalPaths.some((p) => installPath.includes(p))
54
+ if (globalPaths.some((p) => installPath.includes(p))) {
55
+ return true
56
+ }
57
+
58
+ // Fallback: if we're in ANY node_modules that's not in cwd, assume global
59
+ if (installPath.includes('node_modules') && !installPath.includes(process.cwd())) {
60
+ return true
61
+ }
62
+
63
+ return false
44
64
  }
45
65
 
46
66
  /**