@ngrok/ngrok 0.7.0 → 0.7.1
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/CHANGELOG.md +4 -0
- package/Cargo.toml +1 -1
- package/examples/ngrok-connect-full.js +1 -1
- package/examples/ngrok-labeled.js +1 -1
- package/index.d.ts +1 -1
- package/index.js +7 -3
- package/package.json +14 -14
- package/src/config.rs +1 -1
- package/trailer.js +6 -2
package/CHANGELOG.md
CHANGED
package/Cargo.toml
CHANGED
|
@@ -22,7 +22,7 @@ ngrok.consoleLog("INFO"); // turn on info logging
|
|
|
22
22
|
(async function () {
|
|
23
23
|
const url = await ngrok.connect({
|
|
24
24
|
// session configuration
|
|
25
|
-
addr: `
|
|
25
|
+
addr: `unix:${UNIX_SOCKET}`,
|
|
26
26
|
// addr: `localhost:8080`,
|
|
27
27
|
// authtoken: "<authtoken>",
|
|
28
28
|
authtoken_from_env: true,
|
package/index.d.ts
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
export interface Config {
|
|
12
12
|
/**
|
|
13
13
|
* Port, network address, or named pipe. Defaults to 80.
|
|
14
|
-
* Examples: "80", "localhost:8080", "
|
|
14
|
+
* Examples: "80", "localhost:8080", "unix:/tmp/my.sock", "pipe://./my-pipe"
|
|
15
15
|
*/
|
|
16
16
|
addr?: number|string
|
|
17
17
|
auth?: string|Array<string>
|
package/index.js
CHANGED
|
@@ -17,7 +17,7 @@ function isMusl() {
|
|
|
17
17
|
// For Node 10
|
|
18
18
|
if (!process.report || typeof process.report.getReport !== 'function') {
|
|
19
19
|
try {
|
|
20
|
-
const lddPath = require('child_process').execSync('which ldd').toString().trim()
|
|
20
|
+
const lddPath = require('child_process').execSync('which ldd').toString().trim()
|
|
21
21
|
return readFileSync(lddPath, 'utf8').includes('musl')
|
|
22
22
|
} catch (e) {
|
|
23
23
|
return true
|
|
@@ -488,8 +488,12 @@ async function ngrokLinkPipe(tunnel, server) {
|
|
|
488
488
|
console.debug("Cannot change permissions of file: " + filename);
|
|
489
489
|
}
|
|
490
490
|
// forward tunnel
|
|
491
|
-
|
|
492
|
-
|
|
491
|
+
var addr = "unix:" + filename;
|
|
492
|
+
if (platform == "win32") {
|
|
493
|
+
// convert pipe path to url
|
|
494
|
+
addr = "pipe:" + filename.replace("\\\\.\\pipe\\", "//./");
|
|
495
|
+
}
|
|
496
|
+
tunnel.forward(addr);
|
|
493
497
|
socket.path = filename; // surface to caller
|
|
494
498
|
|
|
495
499
|
return socket;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ngrok/ngrok",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.1",
|
|
4
4
|
"main": "index.js",
|
|
5
5
|
"types": "index.d.ts",
|
|
6
6
|
"napi": {
|
|
@@ -55,18 +55,18 @@
|
|
|
55
55
|
"description": "The ngrok agent in library form, suitable for integrating directly into your NodeJS application.",
|
|
56
56
|
"repository": "https://github.com/ngrok/ngrok-nodejs",
|
|
57
57
|
"optionalDependencies": {
|
|
58
|
-
"@ngrok/ngrok-win32-x64-msvc": "0.7.
|
|
59
|
-
"@ngrok/ngrok-darwin-x64": "0.7.
|
|
60
|
-
"@ngrok/ngrok-linux-x64-gnu": "0.7.
|
|
61
|
-
"@ngrok/ngrok-darwin-arm64": "0.7.
|
|
62
|
-
"@ngrok/ngrok-android-arm64": "0.7.
|
|
63
|
-
"@ngrok/ngrok-linux-arm64-gnu": "0.7.
|
|
64
|
-
"@ngrok/ngrok-linux-arm64-musl": "0.7.
|
|
65
|
-
"@ngrok/ngrok-linux-arm-gnueabihf": "0.7.
|
|
66
|
-
"@ngrok/ngrok-linux-x64-musl": "0.7.
|
|
67
|
-
"@ngrok/ngrok-freebsd-x64": "0.7.
|
|
68
|
-
"@ngrok/ngrok-win32-ia32-msvc": "0.7.
|
|
69
|
-
"@ngrok/ngrok-android-arm-eabi": "0.7.
|
|
70
|
-
"@ngrok/ngrok-darwin-universal": "0.7.
|
|
58
|
+
"@ngrok/ngrok-win32-x64-msvc": "0.7.1",
|
|
59
|
+
"@ngrok/ngrok-darwin-x64": "0.7.1",
|
|
60
|
+
"@ngrok/ngrok-linux-x64-gnu": "0.7.1",
|
|
61
|
+
"@ngrok/ngrok-darwin-arm64": "0.7.1",
|
|
62
|
+
"@ngrok/ngrok-android-arm64": "0.7.1",
|
|
63
|
+
"@ngrok/ngrok-linux-arm64-gnu": "0.7.1",
|
|
64
|
+
"@ngrok/ngrok-linux-arm64-musl": "0.7.1",
|
|
65
|
+
"@ngrok/ngrok-linux-arm-gnueabihf": "0.7.1",
|
|
66
|
+
"@ngrok/ngrok-linux-x64-musl": "0.7.1",
|
|
67
|
+
"@ngrok/ngrok-freebsd-x64": "0.7.1",
|
|
68
|
+
"@ngrok/ngrok-win32-ia32-msvc": "0.7.1",
|
|
69
|
+
"@ngrok/ngrok-android-arm-eabi": "0.7.1",
|
|
70
|
+
"@ngrok/ngrok-darwin-universal": "0.7.1"
|
|
71
71
|
}
|
|
72
72
|
}
|
package/src/config.rs
CHANGED
|
@@ -7,7 +7,7 @@ use napi_derive::napi;
|
|
|
7
7
|
#[derive(Default)]
|
|
8
8
|
pub struct Config {
|
|
9
9
|
/// Port, network address, or named pipe. Defaults to 80.
|
|
10
|
-
/// Examples: "80", "localhost:8080", "
|
|
10
|
+
/// Examples: "80", "localhost:8080", "unix:/tmp/my.sock", "pipe://./my-pipe"
|
|
11
11
|
#[napi(ts_type = "number|string")]
|
|
12
12
|
pub addr: Option<String>,
|
|
13
13
|
// Synonym for basic_auth
|
package/trailer.js
CHANGED
|
@@ -216,8 +216,12 @@ async function ngrokLinkPipe(tunnel, server) {
|
|
|
216
216
|
console.debug("Cannot change permissions of file: " + filename);
|
|
217
217
|
}
|
|
218
218
|
// forward tunnel
|
|
219
|
-
|
|
220
|
-
|
|
219
|
+
var addr = "unix:" + filename;
|
|
220
|
+
if (platform == "win32") {
|
|
221
|
+
// convert pipe path to url
|
|
222
|
+
addr = "pipe:" + filename.replace("\\\\.\\pipe\\", "//./");
|
|
223
|
+
}
|
|
224
|
+
tunnel.forward(addr);
|
|
221
225
|
socket.path = filename; // surface to caller
|
|
222
226
|
|
|
223
227
|
return socket;
|