@ngrok/ngrok 0.7.1 → 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.
Files changed (75) hide show
  1. package/CHANGELOG.md +15 -10
  2. package/Cargo.toml +2 -2
  3. package/README.md +37 -21
  4. package/docs/assets/highlight.css +10 -10
  5. package/docs/assets/search.js +1 -1
  6. package/docs/classes/HttpListenerBuilder.html +594 -0
  7. package/docs/classes/LabeledListenerBuilder.html +206 -0
  8. package/docs/classes/Listener.html +241 -0
  9. package/docs/classes/Session.html +207 -0
  10. package/docs/classes/SessionBuilder.html +465 -0
  11. package/docs/classes/TcpListenerBuilder.html +281 -0
  12. package/docs/classes/TlsListenerBuilder.html +322 -0
  13. package/docs/classes/UpdateRequest.html +46 -43
  14. package/docs/functions/authtoken.html +30 -29
  15. package/docs/functions/connect.html +31 -30
  16. package/docs/functions/consoleLog.html +30 -29
  17. package/docs/functions/disconnect.html +31 -30
  18. package/docs/functions/getListener.html +89 -0
  19. package/docs/functions/getListenerByUrl.html +89 -0
  20. package/docs/functions/kill.html +31 -30
  21. package/docs/functions/listen.html +33 -32
  22. package/docs/functions/listenable.html +31 -30
  23. package/docs/functions/listeners.html +84 -0
  24. package/docs/functions/loggingCallback.html +30 -29
  25. package/docs/index.html +66 -58
  26. package/docs/interfaces/Config.html +445 -319
  27. package/docs/modules.html +48 -48
  28. package/examples/express/ngrok-express-quickstart.js +1 -1
  29. package/examples/express/ngrok-express.js +6 -6
  30. package/examples/fastify/ngrok-fastify.js +4 -4
  31. package/examples/hapi/ngrok-hapi.js +4 -4
  32. package/examples/koa/ngrok-koa.js +1 -1
  33. package/examples/nestjs/src/main.ts +5 -5
  34. package/examples/nextjs/README.md +3 -0
  35. package/examples/nextjs/ngrok.config.js +7 -7
  36. package/examples/ngrok-connect-full.js +6 -2
  37. package/examples/ngrok-http-full.js +9 -6
  38. package/examples/ngrok-http-minimum.js +6 -6
  39. package/examples/ngrok-labeled.js +6 -6
  40. package/examples/ngrok-listen.js +1 -1
  41. package/examples/ngrok-tcp.js +5 -5
  42. package/examples/ngrok-tls.js +5 -5
  43. package/examples/ngrok-typescript.ts +12 -12
  44. package/examples/ngrok-windows-pipe.js +4 -4
  45. package/examples/ngrok-winston.js +2 -2
  46. package/examples/remix/ngrok.config.js +4 -4
  47. package/examples/svelte/ngrok.config.cjs +4 -4
  48. package/examples/vue/ngrok.config.ts +4 -4
  49. package/index.d.ts +510 -265
  50. package/index.js +75 -73
  51. package/package.json +14 -14
  52. package/scripts/gc-node-drop.js +7 -7
  53. package/scripts/gc-rust-drop.js +9 -9
  54. package/src/config.rs +113 -10
  55. package/src/connect.rs +32 -28
  56. package/src/http.rs +89 -23
  57. package/src/lib.rs +2 -2
  58. package/src/{tunnel.rs → listener.rs} +134 -134
  59. package/src/{tunnel_builder.rs → listener_builder.rs} +63 -54
  60. package/src/session.rs +57 -49
  61. package/src/tcp.rs +6 -3
  62. package/src/tls.rs +17 -7
  63. package/trailer.d.ts +5 -5
  64. package/trailer.js +64 -62
  65. package/typedoc.json +1 -1
  66. package/docs/classes/NgrokHttpTunnelBuilder.html +0 -510
  67. package/docs/classes/NgrokLabeledTunnelBuilder.html +0 -199
  68. package/docs/classes/NgrokSession.html +0 -199
  69. package/docs/classes/NgrokSessionBuilder.html +0 -449
  70. package/docs/classes/NgrokTcpTunnelBuilder.html +0 -268
  71. package/docs/classes/NgrokTlsTunnelBuilder.html +0 -304
  72. package/docs/classes/NgrokTunnel.html +0 -231
  73. package/docs/functions/getTunnel.html +0 -88
  74. package/docs/functions/getTunnelByUrl.html +0 -88
  75. 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.NgrokSessionBuilder().authtokenFromEnv().connect();
11
- const tunnel = await session.httpEndpoint().listen();
12
- console.log(`Forwarding to: localhost:${port} from ingress at: ${tunnel.url()}`);
13
- tunnel.forward(`localhost:${port}`);
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.NgrokSessionBuilder().authtokenFromEnv().connect();
15
- const tunnel = await session.httpEndpoint().listen();
16
- console.log(`Forwarding to: ${host}:${port} from ingress at: ${tunnel.url()}`);
17
- tunnel.forward(`${host}:${port}`);
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.NgrokSessionBuilder().authtokenFromEnv().connect();
13
- const tunnel = await session.httpEndpoint().listen();
14
- console.log(`Forwarding to: ${host}:${port} from ingress at: ${tunnel.url()}`);
15
- tunnel.forward(`${host}:${port}`);
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();