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 +4 -0
- package/index.js +4 -2
- package/koon.win32-x64-msvc.node +0 -0
- package/package.json +1 -1
- package/koon.darwin-arm64.node +0 -0
- package/koon.darwin-x64.node +0 -0
- package/koon.linux-arm64-gnu.node +0 -0
- package/koon.linux-x64-gnu.node +0 -0
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
|
}
|
package/koon.win32-x64-msvc.node
CHANGED
|
Binary file
|
package/package.json
CHANGED
package/koon.darwin-arm64.node
DELETED
|
Binary file
|
package/koon.darwin-x64.node
DELETED
|
Binary file
|
|
Binary file
|
package/koon.linux-x64-gnu.node
DELETED
|
Binary file
|