koonjs 0.5.0 → 0.5.2

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/index.d.ts CHANGED
@@ -88,6 +88,8 @@ export class KoonResponse {
88
88
  readonly tlsResumed: boolean;
89
89
  /** Whether an existing pooled connection was reused. */
90
90
  readonly connectionReused: boolean;
91
+ /** Remote IP address of the peer (e.g. "1.2.3.4" or "::1"), or null for H3/QUIC. */
92
+ readonly remoteAddress: string | null;
91
93
 
92
94
  /** Decode response body as UTF-8 string. */
93
95
  text(): string;
@@ -166,6 +168,8 @@ export class KoonStreamingResponse {
166
168
  readonly url: string;
167
169
  /** Approximate bytes sent for this request. */
168
170
  readonly bytesSent: number;
171
+ /** Remote IP address of the peer, or null for H3/QUIC. */
172
+ readonly remoteAddress: string | null;
169
173
 
170
174
  /** Approximate bytes received so far (headers + body chunks consumed). */
171
175
  bytesReceived(): number;
package/index.js CHANGED
@@ -22,9 +22,11 @@ let nativeModule;
22
22
  try {
23
23
  nativeModule = require(`./${binding}`);
24
24
  } catch (e) {
25
+ const hint = platform === 'darwin'
26
+ ? ` macOS binary may not be included in this version — try: npm install koonjs@0.5.0`
27
+ : ` Make sure you've built it with: cargo build --release -p koon-node`;
25
28
  throw new Error(
26
- `koon: failed to load native module ${binding}. ` +
27
- `Make sure you've built it with: cargo build --release -p koon-node\n` +
29
+ `koon: failed to load native module ${binding}.${hint}\n` +
28
30
  `Original error: ${e.message}`
29
31
  );
30
32
  }
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "koonjs",
3
- "version": "0.5.0",
3
+ "version": "0.5.2",
4
4
  "description": "Browser-impersonating HTTP client with TLS/HTTP2 fingerprint spoofing",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",
Binary file
Binary file
Binary file
Binary file