vg-coder-cli 2.0.30 → 2.0.31

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vg-coder-cli",
3
- "version": "2.0.30",
3
+ "version": "2.0.31",
4
4
  "description": "🚀 CLI tool to analyze projects, concatenate source files, count tokens, and export HTML with syntax highlighting and copy functionality",
5
5
  "main": "src/index.js",
6
6
  "bin": {
@@ -13,17 +13,27 @@ if (!fs.existsSync(nodePtyPath)) {
13
13
  process.exit(0);
14
14
  }
15
15
 
16
- console.log('🔨 Building node-pty native binaries...');
16
+ console.log('🔨 Building node-pty native binaries from source...');
17
17
 
18
18
  try {
19
- // Run npm install in node-pty directory (which triggers its install scripts)
19
+ // Remove prebuilds directory to force rebuild from source
20
+ const prebuildsPath = path.join(nodePtyPath, 'prebuilds');
21
+ if (fs.existsSync(prebuildsPath)) {
22
+ console.log(' Removing prebuilds directory to force source build...');
23
+ fs.rmSync(prebuildsPath, { recursive: true, force: true });
24
+ }
25
+
26
+ // Force rebuild from source using node-gyp
20
27
  execSync('npm run install', {
21
28
  cwd: nodePtyPath,
22
29
  stdio: 'inherit'
23
30
  });
24
- console.log('✅ node-pty built successfully!');
31
+ console.log('✅ node-pty built successfully from source!');
25
32
  } catch (error) {
26
33
  console.warn('⚠️ node-pty rebuild failed. Terminal functionality may not work.');
34
+ console.warn(' Please ensure you have:');
35
+ console.warn(' - Python 3.x installed');
36
+ console.warn(' - C++ compiler (Xcode Command Line Tools on macOS, Visual Studio Build Tools on Windows)');
27
37
  console.warn(' Run manually: cd node_modules/node-pty && npm run install');
28
38
  // Don't fail the installation
29
39
  process.exit(0);
package/test-pty.js ADDED
@@ -0,0 +1,31 @@
1
+ const pty = require('/Users/vetgo/.nvm/versions/node/v22.15.1/lib/node_modules/vg-coder-cli/node_modules/node-pty');
2
+
3
+ console.log('Testing node-pty spawn...');
4
+
5
+ try {
6
+ const term = pty.spawn('/bin/zsh', [], {
7
+ name: 'xterm-256color',
8
+ cols: 80,
9
+ rows: 24,
10
+ cwd: process.cwd(),
11
+ env: process.env
12
+ });
13
+
14
+ console.log('✅ Terminal spawned successfully!');
15
+ console.log('PID:', term.pid);
16
+
17
+ term.onData((data) => {
18
+ console.log('Data:', data);
19
+ });
20
+
21
+ setTimeout(() => {
22
+ term.kill();
23
+ console.log('Terminal killed');
24
+ process.exit(0);
25
+ }, 1000);
26
+
27
+ } catch (error) {
28
+ console.error('❌ Failed to spawn terminal:');
29
+ console.error(error);
30
+ process.exit(1);
31
+ }