htn-tunnel 0.3.1 → 0.3.3
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/bin/htn-tunnel.js +20 -0
- package/package.json +6 -1
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
// Shim: finds and executes the htn-tunnel binary downloaded by postinstall.
|
|
3
|
+
const path = require("path");
|
|
4
|
+
const os = require("os");
|
|
5
|
+
const fs = require("fs");
|
|
6
|
+
|
|
7
|
+
const ext = os.platform() === "win32" ? ".exe" : "";
|
|
8
|
+
const binPath = path.join(__dirname, `htn-tunnel${ext}`);
|
|
9
|
+
|
|
10
|
+
if (!fs.existsSync(binPath)) {
|
|
11
|
+
console.error("htn-tunnel: binary not found. Try reinstalling:");
|
|
12
|
+
console.error(" npm install -g htn-tunnel");
|
|
13
|
+
process.exit(1);
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
const result = require("child_process").spawnSync(binPath, process.argv.slice(2), {
|
|
17
|
+
stdio: "inherit",
|
|
18
|
+
windowsHide: false,
|
|
19
|
+
});
|
|
20
|
+
process.exit(result.status ?? 1);
|
package/package.json
CHANGED
|
@@ -1,10 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "htn-tunnel",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.3",
|
|
4
4
|
"description": "Self-hosted tunnel client — expose localhost to the internet",
|
|
5
5
|
"bin": {
|
|
6
6
|
"htn-tunnel": "./bin/htn-tunnel.js"
|
|
7
7
|
},
|
|
8
|
+
"files": [
|
|
9
|
+
"bin/htn-tunnel.js",
|
|
10
|
+
"lib/install.js",
|
|
11
|
+
"README.md"
|
|
12
|
+
],
|
|
8
13
|
"scripts": {
|
|
9
14
|
"postinstall": "node lib/install.js"
|
|
10
15
|
},
|