project-compass 3.8.0 → 3.9.0

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/commands.md CHANGED
@@ -21,7 +21,6 @@ This document lists all supported languages, frameworks, and their built-in comm
21
21
  | **Shift+X** | **Clear** active task output logs |
22
22
  | **Shift+E** | **Export** logs to a timestamped `.txt` file |
23
23
  | **Shift+L** | **Rerun** the last executed command |
24
- | Page Up / Page Down | Jump a full page of projects in the Navigator |
25
24
  | **Shift+C** | Add a **Custom Command** (`label|cmd`) in detail view |
26
25
  | **Shift+Q** | **Quit** application (Confirms if tasks are running) |
27
26
  | Shift+↑ / ↓ | Scroll output logs |
@@ -79,7 +78,6 @@ Compass scans for the following manifests and requires their binaries in your PA
79
78
  - **A**: Add a new package to the project.
80
79
  - **R**: Remove an existing package.
81
80
  - **S**: **Internal Switcher**: Quick-swap between detected projects.
82
- - Add/Remove commands automatically run the workspace's preferred package manager (npm/pnpm/yarn/bun, pip, cargo, composer, dotnet).
83
81
  - **Esc / Shift+P**: Return to Navigator.
84
82
 
85
83
  ## Project Architect Shortcuts (Shift+N)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "project-compass",
3
- "version": "3.8.0",
3
+ "version": "3.9.0",
4
4
  "description": "Futuristic project navigator and runner for Node, Python, Rust, and Go",
5
5
  "main": "src/cli.js",
6
6
  "bin": {
package/src/cli.js CHANGED
@@ -293,7 +293,7 @@ function Compass({rootPath, initialView = 'navigator'}) {
293
293
 
294
294
  useInput((input, key) => {
295
295
  if (quitConfirm) {
296
- if (input?.toLowerCase() === 'y') { killAllTasks(); exit(); return; }
296
+ if (input?.toLowerCase() === 'y') { killAllTasks(); console.clear(); exit(); return; }
297
297
  if (input?.toLowerCase() === 'n' || key.escape) { setQuitConfirm(false); return; }
298
298
  return;
299
299
  }
@@ -466,7 +466,7 @@ function Compass({rootPath, initialView = 'navigator'}) {
466
466
  return;
467
467
  }
468
468
  if (shiftCombo('q') || isCtrlC) {
469
- if (hasRunningTasks) setQuitConfirm(true); else exit();
469
+ if (hasRunningTasks) setQuitConfirm(true); else { console.clear(); exit(); }
470
470
  return;
471
471
  }
472
472
  if (shiftCombo('c') && viewMode === 'detail' && selectedProject) { setCustomMode(true); setCustomInput(''); setCustomCursor(0); return; }
@@ -2,7 +2,6 @@ import React, {useState, memo} from 'react';
2
2
  import {Box, Text, useInput} from 'ink';
3
3
 
4
4
  const create = React.createElement;
5
-
6
5
  const NODE_PACKAGE_COMMANDS = {
7
6
  npm: { add: ['npm', 'install'], remove: ['npm', 'uninstall'] },
8
7
  pnpm: { add: ['pnpm', 'add'], remove: ['pnpm', 'remove'] },
@@ -11,18 +10,14 @@ const NODE_PACKAGE_COMMANDS = {
11
10
  };
12
11
 
13
12
  const resolveNodePackageCommand = (project, pkg, action) => {
14
- if (!project || !pkg) {
15
- return null;
16
- }
13
+ if (!project || !pkg) return null;
17
14
  const manager = (project.metadata?.packageManager || 'npm').toLowerCase();
18
15
  const template = (NODE_PACKAGE_COMMANDS[manager] || NODE_PACKAGE_COMMANDS.npm)[action];
19
16
  return template ? [...template, pkg] : null;
20
17
  };
21
18
 
22
19
  const getAddCmd = (project, pkg) => {
23
- if (!project || !pkg) {
24
- return null;
25
- }
20
+ if (!project || !pkg) return null;
26
21
  const type = project.type;
27
22
  if (type === 'Node.js') return resolveNodePackageCommand(project, pkg, 'add');
28
23
  if (type === 'Python') return ['pip', 'install', pkg];
@@ -33,9 +28,7 @@ const getAddCmd = (project, pkg) => {
33
28
  };
34
29
 
35
30
  const getRemoveCmd = (project, pkg) => {
36
- if (!project || !pkg) {
37
- return null;
38
- }
31
+ if (!project || !pkg) return null;
39
32
  const type = project.type;
40
33
  if (type === 'Node.js') return resolveNodePackageCommand(project, pkg, 'remove');
41
34
  if (type === 'Python') return ['pip', 'uninstall', '-y', pkg];
@@ -45,6 +38,7 @@ const getRemoveCmd = (project, pkg) => {
45
38
  return null;
46
39
  };
47
40
 
41
+
48
42
  const PackageRegistry = memo(({selectedProject, projects = [], onRunCommand, CursorText, onSelectProject}) => {
49
43
  const [view, setView] = useState(selectedProject ? 'manage' : 'select'); // select | manage
50
44
  const [mode, setMode] = useState('list'); // list | add | remove
@@ -70,7 +64,7 @@ const PackageRegistry = memo(({selectedProject, projects = [], onRunCommand, Cur
70
64
 
71
65
  if (mode === 'add' || mode === 'remove') {
72
66
  if (key.return) {
73
- if (input.trim() && activeProject) {
67
+ if (input.trim()) {
74
68
  const cmd = mode === 'add' ? getAddCmd(activeProject, input.trim()) : getRemoveCmd(activeProject, input.trim());
75
69
  if (cmd) onRunCommand({label: `${mode === 'add' ? 'Add' : 'Remove'} ${input}`, command: cmd}, activeProject);
76
70
  }
@@ -102,6 +96,8 @@ const PackageRegistry = memo(({selectedProject, projects = [], onRunCommand, Cur
102
96
  }
103
97
  });
104
98
 
99
+
100
+
105
101
  if (view === 'select') {
106
102
  return create(
107
103
  Box,
@@ -114,7 +114,7 @@ export const builtInFrameworks = [
114
114
  return dependencyMatches(project, 'django') || hasProjectFile(project.path, 'manage.py');
115
115
  },
116
116
  commands(project) {
117
- const commands = {};
117
+ const commands = {};
118
118
  if (hasProjectFile(project.path, 'requirements.txt')) {
119
119
  commands.install = { label: 'Pip install', command: ['pip', 'install', '-r', 'requirements.txt'], source: 'framework' };
120
120
  }
@@ -163,7 +163,8 @@ export const builtInFrameworks = [
163
163
  },
164
164
  commands(project) {
165
165
  const pm = project.metadata?.packageManager || 'npm';
166
- return { install: { label: 'Tailwind install', command: [pm, 'install', '-D', 'tailwindcss'], source: 'framework' } };
166
+ // Moved to 'setup' to avoid hijacking the primary 'install' (I) macro
167
+ return { setup: { label: 'Tailwind Init', command: [pm, 'install', '-D', 'tailwindcss'], source: 'framework' } };
167
168
  }
168
169
  },
169
170
  {