webtun 1.4.1 → 1.4.2

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 (3) hide show
  1. package/README.md +11 -1
  2. package/package.json +1 -1
  3. package/server.js +14 -3
package/README.md CHANGED
@@ -106,7 +106,17 @@ npx webtun --tunnel # With Cloudflare Tunnel
106
106
  npx webtun -p 4000 -t # Port 4000 + tunnel
107
107
  ```
108
108
 
109
- **Note:** `node-pty` requires build tools on first install:
109
+ **Note:** npm 12+ blocks install scripts by default. Allow them for `node-pty` (native module):
110
+ ```bash
111
+ # Allow scripts once during install
112
+ npm install -g --allow-scripts=webtun,node-pty webtun
113
+
114
+ # Or allow globally (one-time setup)
115
+ npm config set allow-scripts=webtun,node-pty --location=user
116
+ npm install -g webtun
117
+ ```
118
+
119
+ Build tools are also required (for compiling native modules):
110
120
  ```bash
111
121
  # Debian/Ubuntu
112
122
  sudo apt-get install -y python3 make g++
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "webtun",
3
- "version": "1.4.1",
3
+ "version": "1.4.2",
4
4
  "description": "Self-hosted web terminal with Cloudflare Tunnel, file explorer, and PWA support",
5
5
  "author": {
6
6
  "name": "Gaurang Patel",
package/server.js CHANGED
@@ -20,11 +20,22 @@ let pty;
20
20
  try {
21
21
  pty = require('node-pty');
22
22
  } catch (e) {
23
- console.error('\n Error: node-pty failed to load. Terminal functionality requires native build tools.');
24
- console.error(' Install build tools and reinstall:');
23
+ console.error('');
24
+ console.error(' Error: node-pty native module not found.');
25
+ console.error('');
26
+ console.error(' npm 12+ blocks install scripts by default. To fix:');
27
+ console.error('');
28
+ console.error(' Option 1 — Allow scripts once:');
29
+ console.error(' npm install -g --allow-scripts=webtun,node-pty webtun');
30
+ console.error('');
31
+ console.error(' Option 2 — Allow scripts globally (one-time):');
32
+ console.error(' npm config set allow-scripts=webtun,node-pty --location=user');
33
+ console.error(' npm install -g webtun');
34
+ console.error('');
35
+ console.error(' Option 3 — If building from source, install build tools first:');
25
36
  console.error(' Linux: sudo apt-get install -y python3 make g++');
26
37
  console.error(' macOS: xcode-select --install');
27
- console.error(' Then reinstall: npm install webtun\n');
38
+ console.error('');
28
39
  process.exit(1);
29
40
  }
30
41
  const multer = require('multer');