@ngrok/ngrok 0.7.0 → 0.8.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/CHANGELOG.md +19 -10
- package/Cargo.toml +2 -2
- package/README.md +37 -21
- package/docs/assets/highlight.css +10 -10
- package/docs/assets/search.js +1 -1
- package/docs/classes/HttpListenerBuilder.html +594 -0
- package/docs/classes/LabeledListenerBuilder.html +206 -0
- package/docs/classes/Listener.html +241 -0
- package/docs/classes/Session.html +207 -0
- package/docs/classes/SessionBuilder.html +465 -0
- package/docs/classes/TcpListenerBuilder.html +281 -0
- package/docs/classes/TlsListenerBuilder.html +322 -0
- package/docs/classes/UpdateRequest.html +46 -43
- package/docs/functions/authtoken.html +30 -29
- package/docs/functions/connect.html +31 -30
- package/docs/functions/consoleLog.html +30 -29
- package/docs/functions/disconnect.html +31 -30
- package/docs/functions/getListener.html +89 -0
- package/docs/functions/getListenerByUrl.html +89 -0
- package/docs/functions/kill.html +31 -30
- package/docs/functions/listen.html +33 -32
- package/docs/functions/listenable.html +31 -30
- package/docs/functions/listeners.html +84 -0
- package/docs/functions/loggingCallback.html +30 -29
- package/docs/index.html +66 -58
- package/docs/interfaces/Config.html +445 -319
- package/docs/modules.html +48 -48
- package/examples/express/ngrok-express-quickstart.js +1 -1
- package/examples/express/ngrok-express.js +6 -6
- package/examples/fastify/ngrok-fastify.js +4 -4
- package/examples/hapi/ngrok-hapi.js +4 -4
- package/examples/koa/ngrok-koa.js +1 -1
- package/examples/nestjs/src/main.ts +5 -5
- package/examples/nextjs/README.md +3 -0
- package/examples/nextjs/ngrok.config.js +7 -7
- package/examples/ngrok-connect-full.js +7 -3
- package/examples/ngrok-http-full.js +9 -6
- package/examples/ngrok-http-minimum.js +6 -6
- package/examples/ngrok-labeled.js +7 -7
- package/examples/ngrok-listen.js +1 -1
- package/examples/ngrok-tcp.js +5 -5
- package/examples/ngrok-tls.js +5 -5
- package/examples/ngrok-typescript.ts +12 -12
- package/examples/ngrok-windows-pipe.js +4 -4
- package/examples/ngrok-winston.js +2 -2
- package/examples/remix/ngrok.config.js +4 -4
- package/examples/svelte/ngrok.config.cjs +4 -4
- package/examples/vue/ngrok.config.ts +4 -4
- package/index.d.ts +511 -266
- package/index.js +81 -75
- package/package.json +14 -14
- package/scripts/gc-node-drop.js +7 -7
- package/scripts/gc-rust-drop.js +9 -9
- package/src/config.rs +114 -11
- package/src/connect.rs +32 -28
- package/src/http.rs +89 -23
- package/src/lib.rs +2 -2
- package/src/{tunnel.rs → listener.rs} +134 -134
- package/src/{tunnel_builder.rs → listener_builder.rs} +63 -54
- package/src/session.rs +57 -49
- package/src/tcp.rs +6 -3
- package/src/tls.rs +17 -7
- package/trailer.d.ts +5 -5
- package/trailer.js +69 -63
- package/typedoc.json +1 -1
- package/docs/classes/NgrokHttpTunnelBuilder.html +0 -510
- package/docs/classes/NgrokLabeledTunnelBuilder.html +0 -199
- package/docs/classes/NgrokSession.html +0 -199
- package/docs/classes/NgrokSessionBuilder.html +0 -449
- package/docs/classes/NgrokTcpTunnelBuilder.html +0 -268
- package/docs/classes/NgrokTlsTunnelBuilder.html +0 -304
- package/docs/classes/NgrokTunnel.html +0 -231
- package/docs/functions/getTunnel.html +0 -88
- package/docs/functions/getTunnelByUrl.html +0 -88
- package/docs/functions/tunnels.html +0 -83
|
@@ -7,10 +7,10 @@ process.argv.forEach((item, index) => {
|
|
|
7
7
|
});
|
|
8
8
|
|
|
9
9
|
async function setup() {
|
|
10
|
-
const session = await new ngrok.
|
|
11
|
-
const
|
|
12
|
-
console.log(`Forwarding to: localhost:${port} from ingress at: ${
|
|
13
|
-
|
|
10
|
+
const session = await new ngrok.SessionBuilder().authtokenFromEnv().connect();
|
|
11
|
+
const listener = await session.httpEndpoint().listen();
|
|
12
|
+
console.log(`Forwarding to: localhost:${port} from ingress at: ${listener.url()}`);
|
|
13
|
+
listener.forward(`localhost:${port}`);
|
|
14
14
|
}
|
|
15
15
|
|
|
16
16
|
setup();
|
|
@@ -11,10 +11,10 @@ process.argv.forEach((item, index) => {
|
|
|
11
11
|
});
|
|
12
12
|
|
|
13
13
|
async function setup() {
|
|
14
|
-
const session = await new ngrok.
|
|
15
|
-
const
|
|
16
|
-
console.log(`Forwarding to: ${host}:${port} from ingress at: ${
|
|
17
|
-
|
|
14
|
+
const session = await new ngrok.SessionBuilder().authtokenFromEnv().connect();
|
|
15
|
+
const listener = await session.httpEndpoint().listen();
|
|
16
|
+
console.log(`Forwarding to: ${host}:${port} from ingress at: ${listener.url()}`);
|
|
17
|
+
listener.forward(`${host}:${port}`);
|
|
18
18
|
}
|
|
19
19
|
|
|
20
20
|
if (run) setup();
|
|
@@ -9,10 +9,10 @@ process.argv.forEach((item, index) => {
|
|
|
9
9
|
});
|
|
10
10
|
|
|
11
11
|
async function setup() {
|
|
12
|
-
const session = await new ngrok.
|
|
13
|
-
const
|
|
14
|
-
console.log(`Forwarding to: ${host}:${port} from ingress at: ${
|
|
15
|
-
|
|
12
|
+
const session = await new ngrok.SessionBuilder().authtokenFromEnv().connect();
|
|
13
|
+
const listener = await session.httpEndpoint().listen();
|
|
14
|
+
console.log(`Forwarding to: ${host}:${port} from ingress at: ${listener.url()}`);
|
|
15
|
+
listener.forward(`${host}:${port}`);
|
|
16
16
|
}
|
|
17
17
|
|
|
18
18
|
setup();
|