@ngrok/ngrok 1.5.2 → 1.6.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 (3) hide show
  1. package/CHANGELOG.md +37 -12
  2. package/index.d.ts +24 -0
  3. package/package.json +15 -15
package/CHANGELOG.md CHANGED
@@ -1,5 +1,16 @@
1
+ ## Unreleased
2
+
3
+ - Support manually specifying bindings
4
+
5
+ ## 1.6.0
6
+
7
+ - Updated the internal ngrok SDK
8
+ - Added support for internal endpoints
9
+
1
10
  ## 1.5.0
2
- Adds `poolingEnabled` to listener builders, allowing the endpoint to pool with other endpoints with the same host/port/binding
11
+
12
+ - Adds `poolingEnabled` to listener builders, allowing the endpoint to pool with
13
+ other endpoints with the same host/port/binding
3
14
 
4
15
  ## 1.4.1
5
16
 
@@ -9,24 +20,33 @@ Adds `poolingEnabled` to listener builders, allowing the endpoint to pool with o
9
20
 
10
21
  - Rename `policy` to `traffic_policy`
11
22
  - Fix quickstart example in README
12
- - Add Microsoft Visual C++ Redistributable requirement for Windows to documentation
23
+ - Add Microsoft Visual C++ Redistributable requirement for Windows to
24
+ documentation
13
25
 
14
26
  ## 1.3.0:
15
27
 
16
- - Add `rootCas` to session builder and `root_cas` to `ngrok.forward`. Setting this to `host` will use the host's trusted certificates to connect for the ngrok session.
17
- - Add `session_ca_cert` and `server_addr` to `ngrok.forward`, which correspond to the same functions in the session builder.
28
+ - Add `rootCas` to session builder and `root_cas` to `ngrok.forward`. Setting
29
+ this to `host` will use the host's trusted certificates to connect for the
30
+ ngrok session.
31
+ - Add `session_ca_cert` and `server_addr` to `ngrok.forward`, which correspond
32
+ to the same functions in the session builder.
18
33
 
19
34
  ## 1.2.0:
20
35
 
21
- - Add `verifyUpstreamTls` to listener builders and `verify_upstream_tls` to `ngrok.forward`. Setting this to false will skip verification of the upstream application's TLS certificate.
36
+ - Add `verifyUpstreamTls` to listener builders and `verify_upstream_tls` to
37
+ `ngrok.forward`. Setting this to false will skip verification of the upstream
38
+ application's TLS certificate.
22
39
 
23
40
  ## 1.1.1:
24
41
 
25
- - Add `appProtocol(string)` to the labeled listener builder. Setting this to "http2" will enable HTTP/2 support to the backend application.
42
+ - Add `appProtocol(string)` to the labeled listener builder. Setting this to
43
+ "http2" will enable HTTP/2 support to the backend application.
26
44
 
27
45
  ## 1.1.0:
28
46
 
29
- - Add `appProtocol(string)` to http listener builder, and `app_protocol: string` as a `ngrok.forward()` argument. Setting this to "http2" will enable HTTP/2 support to the backend application.
47
+ - Add `appProtocol(string)` to http listener builder, and `app_protocol: string`
48
+ as a `ngrok.forward()` argument. Setting this to "http2" will enable HTTP/2
49
+ support to the backend application.
30
50
 
31
51
  ## 1.0.0:
32
52
 
@@ -58,8 +78,10 @@ Adds `poolingEnabled` to listener builders, allowing the endpoint to pool with o
58
78
 
59
79
  ## 0.6.0:
60
80
 
61
- - Flattened `listener.forwardPipe()` and `listener.forwardTcp()` into `listener.forward()`. Determination will be made based on `addr` input.
62
- - Add `ngrok.listeners()` and `session.listeners()` to get a list of current non-closed listeners for the process or session, respectively.
81
+ - Flattened `listener.forwardPipe()` and `listener.forwardTcp()` into
82
+ `listener.forward()`. Determination will be made based on `addr` input.
83
+ - Add `ngrok.listeners()` and `session.listeners()` to get a list of current
84
+ non-closed listeners for the process or session, respectively.
63
85
  - Add `errorCode` field to thrown errors, where possible.
64
86
  - More heuristics for automatic unix socket file placement.
65
87
  - Connect heuristic improved for strings parseable as numbers.
@@ -89,12 +111,14 @@ Adds `poolingEnabled` to listener builders, allowing the endpoint to pool with o
89
111
 
90
112
  ## 0.3.0:
91
113
 
92
- - Added `ngrok.connect(Config)`, `ngrok.authtoken()`, and `ngrok.disconnect(url)`.
114
+ - Added `ngrok.connect(Config)`, `ngrok.authtoken()`, and
115
+ `ngrok.disconnect(url)`.
93
116
  - Examples cleanup.
94
117
 
95
118
  ## 0.2.0:
96
119
 
97
- - Now have examples for Express, Fastify, Hapi, Koa, Nest.js, Next.js, Remix, Svelte, and Vue.
120
+ - Now have examples for Express, Fastify, Hapi, Koa, Nest.js, Next.js, Remix,
121
+ Svelte, and Vue.
98
122
  - Add `prettier` auto code formatting.
99
123
 
100
124
  ## 0.1.1:
@@ -132,7 +156,8 @@ Adds `poolingEnabled` to listener builders, allowing the endpoint to pool with o
132
156
 
133
157
  ## 0.0.7:
134
158
 
135
- - Improved memory management, removing need to keep NodeJS from garbage collecting certain objects.
159
+ - Improved memory management, removing need to keep NodeJS from garbage
160
+ collecting certain objects.
136
161
  - Support callbacks for remote operations (stop, restart, update).
137
162
  - Typescript support for getSocket and listen.
138
163
 
package/index.d.ts CHANGED
@@ -345,6 +345,12 @@ export interface Config {
345
345
  web_addr?: string
346
346
  /** Convert incoming websocket connections to TCP-like streams. */
347
347
  websocket_tcp_converter?: boolean
348
+ /**
349
+ * Sets the ingress configuration for this endpoint.
350
+ * Valid values: "public", "internal", "kubernetes"
351
+ * If not specified, the ngrok service will use its default binding configuration.
352
+ */
353
+ binding?: string
348
354
  }
349
355
  /**
350
356
  * Alias for {@link forward}.
@@ -592,6 +598,12 @@ export declare class HttpListenerBuilder {
592
598
  forwardsTo(forwardsTo: string): this
593
599
  policy(policy: string): this
594
600
  trafficPolicy(trafficPolicy: string): this
601
+ /**
602
+ * Sets the ingress configuration for this endpoint.
603
+ * Valid values: "public", "internal", "kubernetes"
604
+ * If not specified, the ngrok service will use its default binding configuration.
605
+ */
606
+ binding(binding: string): this
595
607
  }
596
608
  /**
597
609
  *r" An ngrok listener backing a TCP endpoint.
@@ -644,6 +656,12 @@ export declare class TcpListenerBuilder {
644
656
  forwardsTo(forwardsTo: string): this
645
657
  policy(policy: string): this
646
658
  trafficPolicy(trafficPolicy: string): this
659
+ /**
660
+ * Sets the ingress configuration for this endpoint.
661
+ * Valid values: "public", "internal", "kubernetes"
662
+ * If not specified, the ngrok service will use its default binding configuration.
663
+ */
664
+ binding(binding: string): this
647
665
  /**
648
666
  * The TCP address to request for this edge.
649
667
  * These addresses can be reserved in the [ngrok dashboard] to use across sessions. For example: remote_addr("2.tcp.ngrok.io:21746")
@@ -705,6 +723,12 @@ export declare class TlsListenerBuilder {
705
723
  forwardsTo(forwardsTo: string): this
706
724
  policy(policy: string): this
707
725
  trafficPolicy(trafficPolicy: string): this
726
+ /**
727
+ * Sets the ingress configuration for this endpoint.
728
+ * Valid values: "public", "internal", "kubernetes"
729
+ * If not specified, the ngrok service will use its default binding configuration.
730
+ */
731
+ binding(binding: string): this
708
732
  /**
709
733
  * The domain to request for this edge, any valid domain or hostname that you have
710
734
  * previously registered with ngrok. If using a custom domain, this requires
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ngrok/ngrok",
3
- "version": "1.5.2",
3
+ "version": "1.6.0",
4
4
  "main": "index.js",
5
5
  "types": "index.d.ts",
6
6
  "files": [
@@ -56,7 +56,7 @@
56
56
  },
57
57
  "scripts": {
58
58
  "artifacts": "napi artifacts",
59
- "build": "napi build --platform --release --js gen.js --dts gen.d.ts --pipe 'node post-build.js trailer index'",
59
+ "build": "AWS_LC_SYS_CC_aarch64_unknown_linux_musl=aarch64-linux-musl-gcc AWS_LC_SYS_CXX_aarch64_unknown_linux_musl=aarch64-linux-musl-g++ napi build --platform --release --js gen.js --dts gen.d.ts --pipe 'node post-build.js trailer index'",
60
60
  "build:debug": "napi build --platform",
61
61
  "clean": "rm -rf node_modules/ target/",
62
62
  "docs": "mv trailer.d.ts trailer.d.hidden; mv examples .examples; npx typedoc index.d.ts --navigation.includeGroups; mv .examples examples; mv trailer.d.hidden trailer.d.ts",
@@ -95,18 +95,18 @@
95
95
  }
96
96
  },
97
97
  "optionalDependencies": {
98
- "@ngrok/ngrok-win32-x64-msvc": "1.5.2",
99
- "@ngrok/ngrok-darwin-x64": "1.5.2",
100
- "@ngrok/ngrok-linux-x64-gnu": "1.5.2",
101
- "@ngrok/ngrok-darwin-arm64": "1.5.2",
102
- "@ngrok/ngrok-android-arm64": "1.5.2",
103
- "@ngrok/ngrok-win32-arm64-msvc": "1.5.2",
104
- "@ngrok/ngrok-linux-arm64-gnu": "1.5.2",
105
- "@ngrok/ngrok-linux-arm64-musl": "1.5.2",
106
- "@ngrok/ngrok-linux-arm-gnueabihf": "1.5.2",
107
- "@ngrok/ngrok-linux-x64-musl": "1.5.2",
108
- "@ngrok/ngrok-freebsd-x64": "1.5.2",
109
- "@ngrok/ngrok-win32-ia32-msvc": "1.5.2",
110
- "@ngrok/ngrok-darwin-universal": "1.5.2"
98
+ "@ngrok/ngrok-win32-x64-msvc": "1.6.0",
99
+ "@ngrok/ngrok-darwin-x64": "1.6.0",
100
+ "@ngrok/ngrok-linux-x64-gnu": "1.6.0",
101
+ "@ngrok/ngrok-darwin-arm64": "1.6.0",
102
+ "@ngrok/ngrok-android-arm64": "1.6.0",
103
+ "@ngrok/ngrok-win32-arm64-msvc": "1.6.0",
104
+ "@ngrok/ngrok-linux-arm64-gnu": "1.6.0",
105
+ "@ngrok/ngrok-linux-arm64-musl": "1.6.0",
106
+ "@ngrok/ngrok-linux-arm-gnueabihf": "1.6.0",
107
+ "@ngrok/ngrok-linux-x64-musl": "1.6.0",
108
+ "@ngrok/ngrok-freebsd-x64": "1.6.0",
109
+ "@ngrok/ngrok-win32-ia32-msvc": "1.6.0",
110
+ "@ngrok/ngrok-darwin-universal": "1.6.0"
111
111
  }
112
112
  }