koonjs 0.6.1 → 0.6.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.
Files changed (2) hide show
  1. package/index.d.ts +6 -0
  2. package/package.json +5 -5
package/index.d.ts CHANGED
@@ -67,6 +67,8 @@ export interface KoonOptions {
67
67
  export class KoonResponse {
68
68
  /** HTTP status code. */
69
69
  readonly status: number;
70
+ /** Alias for `status` (compatibility with fetch/axios conventions). */
71
+ readonly statusCode: number;
70
72
  /** Response headers as [name, value] pairs. */
71
73
  readonly headers: Array<{ name: string; value: string }>;
72
74
  /** Response body as Buffer. */
@@ -110,6 +112,8 @@ export interface KoonRequestOptions {
110
112
  headers?: Record<string, string>;
111
113
  /** Per-request timeout in seconds. Overrides constructor-level timeout. */
112
114
  timeout?: number;
115
+ /** Per-request proxy URL (http://, https://, socks5://). Overrides constructor-level proxy. */
116
+ proxy?: string;
113
117
  }
114
118
 
115
119
  export interface KoonMultipartField {
@@ -165,6 +169,8 @@ export class Koon {
165
169
 
166
170
  export class KoonStreamingResponse {
167
171
  readonly status: number;
172
+ /** Alias for `status`. */
173
+ readonly statusCode: number;
168
174
  readonly headers: Array<{ name: string; value: string }>;
169
175
  readonly version: string;
170
176
  readonly url: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "koonjs",
3
- "version": "0.6.1",
3
+ "version": "0.6.2",
4
4
  "description": "Browser-impersonating HTTP client with TLS/HTTP2 fingerprint spoofing",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",
@@ -21,10 +21,10 @@
21
21
  "index.d.ts"
22
22
  ],
23
23
  "optionalDependencies": {
24
- "@koonjs/win32-x64-msvc": "0.6.1",
25
- "@koonjs/linux-x64-gnu": "0.6.1",
26
- "@koonjs/darwin-arm64": "0.6.1",
27
- "@koonjs/darwin-x64": "0.6.1"
24
+ "@koonjs/win32-x64-msvc": "0.6.2",
25
+ "@koonjs/linux-x64-gnu": "0.6.2",
26
+ "@koonjs/darwin-arm64": "0.6.2",
27
+ "@koonjs/darwin-x64": "0.6.2"
28
28
  },
29
29
  "scripts": {
30
30
  "build": "cargo build --release -p koon-node && node -e \"require('fs').copyFileSync(require('path').resolve(__dirname,'../../target/release/koon_node.dll'), require('path').resolve(__dirname,'koon.win32-x64-msvc.node'))\"",