rezo 1.0.89 → 1.0.91
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/dist/adapters/curl.cjs +1 -1
- package/dist/adapters/curl.js +1 -1
- package/dist/adapters/entries/curl.cjs +1 -1
- package/dist/adapters/entries/curl.d.ts +23 -22
- package/dist/adapters/entries/curl.js +1 -1
- package/dist/adapters/entries/fetch.cjs +1 -1
- package/dist/adapters/entries/fetch.d.ts +23 -22
- package/dist/adapters/entries/fetch.js +1 -1
- package/dist/adapters/entries/http.cjs +1 -1
- package/dist/adapters/entries/http.d.ts +23 -22
- package/dist/adapters/entries/http.js +1 -1
- package/dist/adapters/entries/http2.cjs +1 -1
- package/dist/adapters/entries/http2.d.ts +23 -22
- package/dist/adapters/entries/http2.js +1 -1
- package/dist/adapters/entries/react-native.cjs +1 -1
- package/dist/adapters/entries/react-native.d.ts +23 -22
- package/dist/adapters/entries/react-native.js +1 -1
- package/dist/adapters/entries/xhr.cjs +1 -1
- package/dist/adapters/entries/xhr.d.ts +23 -22
- package/dist/adapters/entries/xhr.js +1 -1
- package/dist/adapters/fetch.cjs +1 -1
- package/dist/adapters/fetch.js +1 -1
- package/dist/adapters/http.cjs +1 -1
- package/dist/adapters/http.js +1 -1
- package/dist/adapters/http2.cjs +1 -1
- package/dist/adapters/http2.js +1 -1
- package/dist/adapters/index.cjs +6 -6
- package/dist/adapters/react-native.cjs +1 -1
- package/dist/adapters/react-native.js +1 -1
- package/dist/adapters/xhr.cjs +1 -1
- package/dist/adapters/xhr.js +1 -1
- package/dist/cache/index.cjs +9 -9
- package/dist/{utils/cookies.cjs → cookies/cookie-jar.cjs} +12 -87
- package/dist/{utils/cookies.js → cookies/cookie-jar.js} +10 -86
- package/dist/cookies/cookie-store.cjs +266 -0
- package/dist/cookies/cookie-store.js +264 -0
- package/dist/cookies/cookie.cjs +83 -0
- package/dist/cookies/cookie.js +84 -0
- package/dist/cookies/file-store.cjs +226 -0
- package/dist/cookies/file-store.js +224 -0
- package/dist/cookies/index.cjs +6 -0
- package/dist/cookies/index.js +6 -0
- package/dist/cookies/memory-store.cjs +6 -0
- package/dist/cookies/memory-store.js +4 -0
- package/dist/core/rezo.cjs +4 -1
- package/dist/core/rezo.js +4 -1
- package/dist/crawler/index.cjs +42 -42
- package/dist/crawler/plugin/index.cjs +1 -1
- package/dist/crawler.d.ts +22 -21
- package/dist/entries/crawler.cjs +6 -6
- package/dist/index.cjs +34 -31
- package/dist/index.d.ts +111 -22
- package/dist/index.js +2 -1
- package/dist/internal/agents/index.cjs +14 -14
- package/dist/platform/browser.cjs +1 -1
- package/dist/platform/browser.d.ts +23 -22
- package/dist/platform/browser.js +1 -1
- package/dist/platform/bun.cjs +1 -1
- package/dist/platform/bun.d.ts +23 -22
- package/dist/platform/bun.js +1 -1
- package/dist/platform/deno.cjs +1 -1
- package/dist/platform/deno.d.ts +23 -22
- package/dist/platform/deno.js +1 -1
- package/dist/platform/node.cjs +1 -1
- package/dist/platform/node.d.ts +23 -22
- package/dist/platform/node.js +1 -1
- package/dist/platform/react-native.cjs +1 -1
- package/dist/platform/react-native.d.ts +23 -22
- package/dist/platform/react-native.js +1 -1
- package/dist/platform/worker.cjs +1 -1
- package/dist/platform/worker.d.ts +23 -22
- package/dist/platform/worker.js +1 -1
- package/dist/proxy/index.cjs +4 -4
- package/dist/queue/index.cjs +9 -9
- package/dist/responses/buildResponse.cjs +1 -1
- package/dist/responses/buildResponse.js +1 -1
- package/dist/responses/universal/index.cjs +11 -11
- package/dist/utils/http-config.cjs +1 -1
- package/dist/utils/http-config.js +1 -1
- package/dist/utils/index.cjs +1 -1
- package/dist/utils/index.js +1 -1
- package/dist/version.cjs +1 -1
- package/dist/version.js +1 -1
- package/dist/wget/index.cjs +51 -51
- package/dist/wget/index.d.ts +22 -21
- package/package.json +1 -1
- /package/dist/{utils → cookies}/cookies.browser.cjs +0 -0
- /package/dist/{utils → cookies}/cookies.browser.js +0 -0
package/dist/adapters/curl.cjs
CHANGED
|
@@ -7,7 +7,7 @@ const { Readable } = require("node:stream");
|
|
|
7
7
|
const { EventEmitter } = require("node:events");
|
|
8
8
|
const { RezoError } = require('../errors/rezo-error.cjs');
|
|
9
9
|
const { buildSmartError, builErrorFromResponse } = require('../responses/buildError.cjs');
|
|
10
|
-
const { RezoCookieJar, Cookie } = require('../
|
|
10
|
+
const { RezoCookieJar, Cookie } = require('../cookies/cookie-jar.cjs');
|
|
11
11
|
const RezoFormData = require('../utils/form-data.cjs');
|
|
12
12
|
const { existsSync } = require("node:fs");
|
|
13
13
|
const { getDefaultConfig, prepareHTTPOptions, calculateRetryDelay } = require('../utils/http-config.cjs');
|
package/dist/adapters/curl.js
CHANGED
|
@@ -7,7 +7,7 @@ import { Readable } from "node:stream";
|
|
|
7
7
|
import { EventEmitter } from "node:events";
|
|
8
8
|
import { RezoError } from '../errors/rezo-error.js';
|
|
9
9
|
import { buildSmartError, builErrorFromResponse } from '../responses/buildError.js';
|
|
10
|
-
import { RezoCookieJar, Cookie } from '../
|
|
10
|
+
import { RezoCookieJar, Cookie } from '../cookies/cookie-jar.js';
|
|
11
11
|
import RezoFormData from '../utils/form-data.js';
|
|
12
12
|
import { existsSync } from "node:fs";
|
|
13
13
|
import { getDefaultConfig, prepareHTTPOptions, calculateRetryDelay } from '../utils/http-config.js';
|
|
@@ -3,7 +3,7 @@ const { setGlobalAdapter, createRezoInstance, Rezo } = require('../../core/rezo.
|
|
|
3
3
|
const { RezoError, RezoErrorCode } = require('../../errors/rezo-error.cjs');
|
|
4
4
|
const { RezoHeaders } = require('../../utils/headers.cjs');
|
|
5
5
|
const { RezoFormData } = require('../../utils/form-data.cjs');
|
|
6
|
-
const { RezoCookieJar, Cookie } = require('../../
|
|
6
|
+
const { RezoCookieJar, Cookie } = require('../../cookies/cookie-jar.cjs');
|
|
7
7
|
const { createDefaultHooks, mergeHooks } = require('../../core/hooks.cjs');
|
|
8
8
|
const { VERSION } = require('../../version.cjs');
|
|
9
9
|
|
|
@@ -3,7 +3,7 @@ import { Agent as HttpAgent, OutgoingHttpHeaders } from 'node:http';
|
|
|
3
3
|
import { Agent as HttpsAgent } from 'node:https';
|
|
4
4
|
import { Socket } from 'node:net';
|
|
5
5
|
import { SecureContext, TLSSocket } from 'node:tls';
|
|
6
|
-
import { Cookie as TouchCookie, CookieJar as TouchCookieJar, CreateCookieOptions } from 'tough-cookie';
|
|
6
|
+
import { Cookie as TouchCookie, CookieJar as TouchCookieJar, CreateCookieJarOptions, CreateCookieOptions, Nullable, Store } from 'tough-cookie';
|
|
7
7
|
|
|
8
8
|
export interface RezoHttpHeaders {
|
|
9
9
|
accept?: string | undefined;
|
|
@@ -139,19 +139,6 @@ export declare class RezoHeaders extends Headers {
|
|
|
139
139
|
]>;
|
|
140
140
|
get [Symbol.toStringTag](): string;
|
|
141
141
|
}
|
|
142
|
-
export interface SerializedCookie {
|
|
143
|
-
key: string;
|
|
144
|
-
value: string;
|
|
145
|
-
expires?: string;
|
|
146
|
-
maxAge?: number | "Infinity" | "-Infinity";
|
|
147
|
-
domain?: string;
|
|
148
|
-
path?: string;
|
|
149
|
-
secure?: boolean;
|
|
150
|
-
hostOnly?: boolean;
|
|
151
|
-
creation?: string;
|
|
152
|
-
lastAccessed?: string;
|
|
153
|
-
[key: string]: unknown;
|
|
154
|
-
}
|
|
155
142
|
export declare class Cookie extends TouchCookie {
|
|
156
143
|
constructor(options?: CreateCookieOptions);
|
|
157
144
|
/**
|
|
@@ -187,10 +174,31 @@ export declare class Cookie extends TouchCookie {
|
|
|
187
174
|
*/
|
|
188
175
|
static isCookie(cookie: any): cookie is Cookie;
|
|
189
176
|
}
|
|
177
|
+
export interface SerializedCookie {
|
|
178
|
+
key: string;
|
|
179
|
+
value: string;
|
|
180
|
+
expires?: string;
|
|
181
|
+
maxAge?: number | "Infinity" | "-Infinity";
|
|
182
|
+
domain?: string;
|
|
183
|
+
path?: string;
|
|
184
|
+
secure?: boolean;
|
|
185
|
+
hostOnly?: boolean;
|
|
186
|
+
creation?: string;
|
|
187
|
+
lastAccessed?: string;
|
|
188
|
+
[key: string]: unknown;
|
|
189
|
+
}
|
|
190
|
+
export interface Cookies {
|
|
191
|
+
array: Cookie[];
|
|
192
|
+
serialized: SerializedCookie[];
|
|
193
|
+
netscape: string;
|
|
194
|
+
string: string;
|
|
195
|
+
setCookiesString: string[];
|
|
196
|
+
}
|
|
190
197
|
export declare class RezoCookieJar extends TouchCookieJar {
|
|
191
198
|
constructor();
|
|
192
199
|
constructor(cookies: Cookie[]);
|
|
193
200
|
constructor(cookies: Cookie[], url: string);
|
|
201
|
+
constructor(store: Nullable<Store>, options?: CreateCookieJarOptions | boolean);
|
|
194
202
|
private generateCookies;
|
|
195
203
|
/**
|
|
196
204
|
* Get all cookies from the cookie jar.
|
|
@@ -309,13 +317,6 @@ export declare class RezoCookieJar extends TouchCookieJar {
|
|
|
309
317
|
*/
|
|
310
318
|
static fromFile(filePath: string, defaultUrl?: string): RezoCookieJar;
|
|
311
319
|
}
|
|
312
|
-
export interface Cookies {
|
|
313
|
-
array: Cookie[];
|
|
314
|
-
serialized: SerializedCookie[];
|
|
315
|
-
netscape: string;
|
|
316
|
-
string: string;
|
|
317
|
-
setCookiesString: string[];
|
|
318
|
-
}
|
|
319
320
|
/**
|
|
320
321
|
* Universal FormData wrapper using native FormData API
|
|
321
322
|
* Works in Node.js 18+, Bun, Deno, browsers, CF Workers, edge runtimes
|
|
@@ -5114,7 +5115,7 @@ export interface RezoInstance extends Rezo, RezoCallable {
|
|
|
5114
5115
|
*
|
|
5115
5116
|
* IMPORTANT: Update these values when bumping package version.
|
|
5116
5117
|
*/
|
|
5117
|
-
export declare const VERSION = "1.0.
|
|
5118
|
+
export declare const VERSION = "1.0.91";
|
|
5118
5119
|
/**
|
|
5119
5120
|
* cURL Options Configuration
|
|
5120
5121
|
*
|
|
@@ -3,7 +3,7 @@ import { setGlobalAdapter, createRezoInstance, Rezo } from '../../core/rezo.js';
|
|
|
3
3
|
import { RezoError, RezoErrorCode } from '../../errors/rezo-error.js';
|
|
4
4
|
import { RezoHeaders } from '../../utils/headers.js';
|
|
5
5
|
import { RezoFormData } from '../../utils/form-data.js';
|
|
6
|
-
import { RezoCookieJar, Cookie } from '../../
|
|
6
|
+
import { RezoCookieJar, Cookie } from '../../cookies/cookie-jar.js';
|
|
7
7
|
import { createDefaultHooks, mergeHooks } from '../../core/hooks.js';
|
|
8
8
|
import { VERSION } from '../../version.js';
|
|
9
9
|
|
|
@@ -3,7 +3,7 @@ const { setGlobalAdapter, createRezoInstance, Rezo } = require('../../core/rezo.
|
|
|
3
3
|
const { RezoError, RezoErrorCode } = require('../../errors/rezo-error.cjs');
|
|
4
4
|
const { RezoHeaders } = require('../../utils/headers.cjs');
|
|
5
5
|
const { RezoFormData } = require('../../utils/form-data.cjs');
|
|
6
|
-
const { RezoCookieJar, Cookie } = require('../../
|
|
6
|
+
const { RezoCookieJar, Cookie } = require('../../cookies/cookie-jar.cjs');
|
|
7
7
|
const { createDefaultHooks, mergeHooks } = require('../../core/hooks.cjs');
|
|
8
8
|
const { VERSION } = require('../../version.cjs');
|
|
9
9
|
|
|
@@ -3,7 +3,7 @@ import { Agent as HttpAgent, OutgoingHttpHeaders } from 'node:http';
|
|
|
3
3
|
import { Agent as HttpsAgent } from 'node:https';
|
|
4
4
|
import { Socket } from 'node:net';
|
|
5
5
|
import { SecureContext, TLSSocket } from 'node:tls';
|
|
6
|
-
import { Cookie as TouchCookie, CookieJar as TouchCookieJar, CreateCookieOptions } from 'tough-cookie';
|
|
6
|
+
import { Cookie as TouchCookie, CookieJar as TouchCookieJar, CreateCookieJarOptions, CreateCookieOptions, Nullable, Store } from 'tough-cookie';
|
|
7
7
|
|
|
8
8
|
export interface RezoHttpHeaders {
|
|
9
9
|
accept?: string | undefined;
|
|
@@ -139,19 +139,6 @@ export declare class RezoHeaders extends Headers {
|
|
|
139
139
|
]>;
|
|
140
140
|
get [Symbol.toStringTag](): string;
|
|
141
141
|
}
|
|
142
|
-
export interface SerializedCookie {
|
|
143
|
-
key: string;
|
|
144
|
-
value: string;
|
|
145
|
-
expires?: string;
|
|
146
|
-
maxAge?: number | "Infinity" | "-Infinity";
|
|
147
|
-
domain?: string;
|
|
148
|
-
path?: string;
|
|
149
|
-
secure?: boolean;
|
|
150
|
-
hostOnly?: boolean;
|
|
151
|
-
creation?: string;
|
|
152
|
-
lastAccessed?: string;
|
|
153
|
-
[key: string]: unknown;
|
|
154
|
-
}
|
|
155
142
|
export declare class Cookie extends TouchCookie {
|
|
156
143
|
constructor(options?: CreateCookieOptions);
|
|
157
144
|
/**
|
|
@@ -187,10 +174,31 @@ export declare class Cookie extends TouchCookie {
|
|
|
187
174
|
*/
|
|
188
175
|
static isCookie(cookie: any): cookie is Cookie;
|
|
189
176
|
}
|
|
177
|
+
export interface SerializedCookie {
|
|
178
|
+
key: string;
|
|
179
|
+
value: string;
|
|
180
|
+
expires?: string;
|
|
181
|
+
maxAge?: number | "Infinity" | "-Infinity";
|
|
182
|
+
domain?: string;
|
|
183
|
+
path?: string;
|
|
184
|
+
secure?: boolean;
|
|
185
|
+
hostOnly?: boolean;
|
|
186
|
+
creation?: string;
|
|
187
|
+
lastAccessed?: string;
|
|
188
|
+
[key: string]: unknown;
|
|
189
|
+
}
|
|
190
|
+
export interface Cookies {
|
|
191
|
+
array: Cookie[];
|
|
192
|
+
serialized: SerializedCookie[];
|
|
193
|
+
netscape: string;
|
|
194
|
+
string: string;
|
|
195
|
+
setCookiesString: string[];
|
|
196
|
+
}
|
|
190
197
|
export declare class RezoCookieJar extends TouchCookieJar {
|
|
191
198
|
constructor();
|
|
192
199
|
constructor(cookies: Cookie[]);
|
|
193
200
|
constructor(cookies: Cookie[], url: string);
|
|
201
|
+
constructor(store: Nullable<Store>, options?: CreateCookieJarOptions | boolean);
|
|
194
202
|
private generateCookies;
|
|
195
203
|
/**
|
|
196
204
|
* Get all cookies from the cookie jar.
|
|
@@ -309,13 +317,6 @@ export declare class RezoCookieJar extends TouchCookieJar {
|
|
|
309
317
|
*/
|
|
310
318
|
static fromFile(filePath: string, defaultUrl?: string): RezoCookieJar;
|
|
311
319
|
}
|
|
312
|
-
export interface Cookies {
|
|
313
|
-
array: Cookie[];
|
|
314
|
-
serialized: SerializedCookie[];
|
|
315
|
-
netscape: string;
|
|
316
|
-
string: string;
|
|
317
|
-
setCookiesString: string[];
|
|
318
|
-
}
|
|
319
320
|
/**
|
|
320
321
|
* Universal FormData wrapper using native FormData API
|
|
321
322
|
* Works in Node.js 18+, Bun, Deno, browsers, CF Workers, edge runtimes
|
|
@@ -5114,7 +5115,7 @@ export interface RezoInstance extends Rezo, RezoCallable {
|
|
|
5114
5115
|
*
|
|
5115
5116
|
* IMPORTANT: Update these values when bumping package version.
|
|
5116
5117
|
*/
|
|
5117
|
-
export declare const VERSION = "1.0.
|
|
5118
|
+
export declare const VERSION = "1.0.91";
|
|
5118
5119
|
export declare const isRezoError: typeof RezoError.isRezoError;
|
|
5119
5120
|
export declare const Cancel: typeof RezoError;
|
|
5120
5121
|
export declare const CancelToken: {
|
|
@@ -3,7 +3,7 @@ import { setGlobalAdapter, createRezoInstance, Rezo } from '../../core/rezo.js';
|
|
|
3
3
|
import { RezoError, RezoErrorCode } from '../../errors/rezo-error.js';
|
|
4
4
|
import { RezoHeaders } from '../../utils/headers.js';
|
|
5
5
|
import { RezoFormData } from '../../utils/form-data.js';
|
|
6
|
-
import { RezoCookieJar, Cookie } from '../../
|
|
6
|
+
import { RezoCookieJar, Cookie } from '../../cookies/cookie-jar.js';
|
|
7
7
|
import { createDefaultHooks, mergeHooks } from '../../core/hooks.js';
|
|
8
8
|
import { VERSION } from '../../version.js';
|
|
9
9
|
|
|
@@ -3,7 +3,7 @@ const { setGlobalAdapter, createRezoInstance, Rezo } = require('../../core/rezo.
|
|
|
3
3
|
const { RezoError, RezoErrorCode } = require('../../errors/rezo-error.cjs');
|
|
4
4
|
const { RezoHeaders } = require('../../utils/headers.cjs');
|
|
5
5
|
const { RezoFormData } = require('../../utils/form-data.cjs');
|
|
6
|
-
const { RezoCookieJar, Cookie } = require('../../
|
|
6
|
+
const { RezoCookieJar, Cookie } = require('../../cookies/cookie-jar.cjs');
|
|
7
7
|
const { createDefaultHooks, mergeHooks } = require('../../core/hooks.cjs');
|
|
8
8
|
const { VERSION } = require('../../version.cjs');
|
|
9
9
|
|
|
@@ -3,7 +3,7 @@ import { Agent as HttpAgent, OutgoingHttpHeaders } from 'node:http';
|
|
|
3
3
|
import { Agent as HttpsAgent } from 'node:https';
|
|
4
4
|
import { Socket } from 'node:net';
|
|
5
5
|
import { SecureContext, TLSSocket } from 'node:tls';
|
|
6
|
-
import { Cookie as TouchCookie, CookieJar as TouchCookieJar, CreateCookieOptions } from 'tough-cookie';
|
|
6
|
+
import { Cookie as TouchCookie, CookieJar as TouchCookieJar, CreateCookieJarOptions, CreateCookieOptions, Nullable, Store } from 'tough-cookie';
|
|
7
7
|
|
|
8
8
|
export interface RezoHttpHeaders {
|
|
9
9
|
accept?: string | undefined;
|
|
@@ -139,19 +139,6 @@ export declare class RezoHeaders extends Headers {
|
|
|
139
139
|
]>;
|
|
140
140
|
get [Symbol.toStringTag](): string;
|
|
141
141
|
}
|
|
142
|
-
export interface SerializedCookie {
|
|
143
|
-
key: string;
|
|
144
|
-
value: string;
|
|
145
|
-
expires?: string;
|
|
146
|
-
maxAge?: number | "Infinity" | "-Infinity";
|
|
147
|
-
domain?: string;
|
|
148
|
-
path?: string;
|
|
149
|
-
secure?: boolean;
|
|
150
|
-
hostOnly?: boolean;
|
|
151
|
-
creation?: string;
|
|
152
|
-
lastAccessed?: string;
|
|
153
|
-
[key: string]: unknown;
|
|
154
|
-
}
|
|
155
142
|
export declare class Cookie extends TouchCookie {
|
|
156
143
|
constructor(options?: CreateCookieOptions);
|
|
157
144
|
/**
|
|
@@ -187,10 +174,31 @@ export declare class Cookie extends TouchCookie {
|
|
|
187
174
|
*/
|
|
188
175
|
static isCookie(cookie: any): cookie is Cookie;
|
|
189
176
|
}
|
|
177
|
+
export interface SerializedCookie {
|
|
178
|
+
key: string;
|
|
179
|
+
value: string;
|
|
180
|
+
expires?: string;
|
|
181
|
+
maxAge?: number | "Infinity" | "-Infinity";
|
|
182
|
+
domain?: string;
|
|
183
|
+
path?: string;
|
|
184
|
+
secure?: boolean;
|
|
185
|
+
hostOnly?: boolean;
|
|
186
|
+
creation?: string;
|
|
187
|
+
lastAccessed?: string;
|
|
188
|
+
[key: string]: unknown;
|
|
189
|
+
}
|
|
190
|
+
export interface Cookies {
|
|
191
|
+
array: Cookie[];
|
|
192
|
+
serialized: SerializedCookie[];
|
|
193
|
+
netscape: string;
|
|
194
|
+
string: string;
|
|
195
|
+
setCookiesString: string[];
|
|
196
|
+
}
|
|
190
197
|
export declare class RezoCookieJar extends TouchCookieJar {
|
|
191
198
|
constructor();
|
|
192
199
|
constructor(cookies: Cookie[]);
|
|
193
200
|
constructor(cookies: Cookie[], url: string);
|
|
201
|
+
constructor(store: Nullable<Store>, options?: CreateCookieJarOptions | boolean);
|
|
194
202
|
private generateCookies;
|
|
195
203
|
/**
|
|
196
204
|
* Get all cookies from the cookie jar.
|
|
@@ -309,13 +317,6 @@ export declare class RezoCookieJar extends TouchCookieJar {
|
|
|
309
317
|
*/
|
|
310
318
|
static fromFile(filePath: string, defaultUrl?: string): RezoCookieJar;
|
|
311
319
|
}
|
|
312
|
-
export interface Cookies {
|
|
313
|
-
array: Cookie[];
|
|
314
|
-
serialized: SerializedCookie[];
|
|
315
|
-
netscape: string;
|
|
316
|
-
string: string;
|
|
317
|
-
setCookiesString: string[];
|
|
318
|
-
}
|
|
319
320
|
/**
|
|
320
321
|
* Universal FormData wrapper using native FormData API
|
|
321
322
|
* Works in Node.js 18+, Bun, Deno, browsers, CF Workers, edge runtimes
|
|
@@ -5114,7 +5115,7 @@ export interface RezoInstance extends Rezo, RezoCallable {
|
|
|
5114
5115
|
*
|
|
5115
5116
|
* IMPORTANT: Update these values when bumping package version.
|
|
5116
5117
|
*/
|
|
5117
|
-
export declare const VERSION = "1.0.
|
|
5118
|
+
export declare const VERSION = "1.0.91";
|
|
5118
5119
|
/**
|
|
5119
5120
|
* Type guard to check if an error is a RezoError instance.
|
|
5120
5121
|
*/
|
|
@@ -3,7 +3,7 @@ import { setGlobalAdapter, createRezoInstance, Rezo } from '../../core/rezo.js';
|
|
|
3
3
|
import { RezoError, RezoErrorCode } from '../../errors/rezo-error.js';
|
|
4
4
|
import { RezoHeaders } from '../../utils/headers.js';
|
|
5
5
|
import { RezoFormData } from '../../utils/form-data.js';
|
|
6
|
-
import { RezoCookieJar, Cookie } from '../../
|
|
6
|
+
import { RezoCookieJar, Cookie } from '../../cookies/cookie-jar.js';
|
|
7
7
|
import { createDefaultHooks, mergeHooks } from '../../core/hooks.js';
|
|
8
8
|
import { VERSION } from '../../version.js';
|
|
9
9
|
|
|
@@ -3,7 +3,7 @@ const { setGlobalAdapter, createRezoInstance, Rezo } = require('../../core/rezo.
|
|
|
3
3
|
const { RezoError, RezoErrorCode } = require('../../errors/rezo-error.cjs');
|
|
4
4
|
const { RezoHeaders } = require('../../utils/headers.cjs');
|
|
5
5
|
const { RezoFormData } = require('../../utils/form-data.cjs');
|
|
6
|
-
const { RezoCookieJar, Cookie } = require('../../
|
|
6
|
+
const { RezoCookieJar, Cookie } = require('../../cookies/cookie-jar.cjs');
|
|
7
7
|
const { createDefaultHooks, mergeHooks } = require('../../core/hooks.cjs');
|
|
8
8
|
const { VERSION } = require('../../version.cjs');
|
|
9
9
|
|
|
@@ -3,7 +3,7 @@ import { Agent as HttpAgent, OutgoingHttpHeaders } from 'node:http';
|
|
|
3
3
|
import { Agent as HttpsAgent } from 'node:https';
|
|
4
4
|
import { Socket } from 'node:net';
|
|
5
5
|
import { SecureContext, TLSSocket } from 'node:tls';
|
|
6
|
-
import { Cookie as TouchCookie, CookieJar as TouchCookieJar, CreateCookieOptions } from 'tough-cookie';
|
|
6
|
+
import { Cookie as TouchCookie, CookieJar as TouchCookieJar, CreateCookieJarOptions, CreateCookieOptions, Nullable, Store } from 'tough-cookie';
|
|
7
7
|
|
|
8
8
|
export interface RezoHttpHeaders {
|
|
9
9
|
accept?: string | undefined;
|
|
@@ -139,19 +139,6 @@ export declare class RezoHeaders extends Headers {
|
|
|
139
139
|
]>;
|
|
140
140
|
get [Symbol.toStringTag](): string;
|
|
141
141
|
}
|
|
142
|
-
export interface SerializedCookie {
|
|
143
|
-
key: string;
|
|
144
|
-
value: string;
|
|
145
|
-
expires?: string;
|
|
146
|
-
maxAge?: number | "Infinity" | "-Infinity";
|
|
147
|
-
domain?: string;
|
|
148
|
-
path?: string;
|
|
149
|
-
secure?: boolean;
|
|
150
|
-
hostOnly?: boolean;
|
|
151
|
-
creation?: string;
|
|
152
|
-
lastAccessed?: string;
|
|
153
|
-
[key: string]: unknown;
|
|
154
|
-
}
|
|
155
142
|
export declare class Cookie extends TouchCookie {
|
|
156
143
|
constructor(options?: CreateCookieOptions);
|
|
157
144
|
/**
|
|
@@ -187,10 +174,31 @@ export declare class Cookie extends TouchCookie {
|
|
|
187
174
|
*/
|
|
188
175
|
static isCookie(cookie: any): cookie is Cookie;
|
|
189
176
|
}
|
|
177
|
+
export interface SerializedCookie {
|
|
178
|
+
key: string;
|
|
179
|
+
value: string;
|
|
180
|
+
expires?: string;
|
|
181
|
+
maxAge?: number | "Infinity" | "-Infinity";
|
|
182
|
+
domain?: string;
|
|
183
|
+
path?: string;
|
|
184
|
+
secure?: boolean;
|
|
185
|
+
hostOnly?: boolean;
|
|
186
|
+
creation?: string;
|
|
187
|
+
lastAccessed?: string;
|
|
188
|
+
[key: string]: unknown;
|
|
189
|
+
}
|
|
190
|
+
export interface Cookies {
|
|
191
|
+
array: Cookie[];
|
|
192
|
+
serialized: SerializedCookie[];
|
|
193
|
+
netscape: string;
|
|
194
|
+
string: string;
|
|
195
|
+
setCookiesString: string[];
|
|
196
|
+
}
|
|
190
197
|
export declare class RezoCookieJar extends TouchCookieJar {
|
|
191
198
|
constructor();
|
|
192
199
|
constructor(cookies: Cookie[]);
|
|
193
200
|
constructor(cookies: Cookie[], url: string);
|
|
201
|
+
constructor(store: Nullable<Store>, options?: CreateCookieJarOptions | boolean);
|
|
194
202
|
private generateCookies;
|
|
195
203
|
/**
|
|
196
204
|
* Get all cookies from the cookie jar.
|
|
@@ -309,13 +317,6 @@ export declare class RezoCookieJar extends TouchCookieJar {
|
|
|
309
317
|
*/
|
|
310
318
|
static fromFile(filePath: string, defaultUrl?: string): RezoCookieJar;
|
|
311
319
|
}
|
|
312
|
-
export interface Cookies {
|
|
313
|
-
array: Cookie[];
|
|
314
|
-
serialized: SerializedCookie[];
|
|
315
|
-
netscape: string;
|
|
316
|
-
string: string;
|
|
317
|
-
setCookiesString: string[];
|
|
318
|
-
}
|
|
319
320
|
/**
|
|
320
321
|
* Universal FormData wrapper using native FormData API
|
|
321
322
|
* Works in Node.js 18+, Bun, Deno, browsers, CF Workers, edge runtimes
|
|
@@ -5114,7 +5115,7 @@ export interface RezoInstance extends Rezo, RezoCallable {
|
|
|
5114
5115
|
*
|
|
5115
5116
|
* IMPORTANT: Update these values when bumping package version.
|
|
5116
5117
|
*/
|
|
5117
|
-
export declare const VERSION = "1.0.
|
|
5118
|
+
export declare const VERSION = "1.0.91";
|
|
5118
5119
|
export declare const isRezoError: typeof RezoError.isRezoError;
|
|
5119
5120
|
export declare const Cancel: typeof RezoError;
|
|
5120
5121
|
export declare const CancelToken: {
|
|
@@ -3,7 +3,7 @@ import { setGlobalAdapter, createRezoInstance, Rezo } from '../../core/rezo.js';
|
|
|
3
3
|
import { RezoError, RezoErrorCode } from '../../errors/rezo-error.js';
|
|
4
4
|
import { RezoHeaders } from '../../utils/headers.js';
|
|
5
5
|
import { RezoFormData } from '../../utils/form-data.js';
|
|
6
|
-
import { RezoCookieJar, Cookie } from '../../
|
|
6
|
+
import { RezoCookieJar, Cookie } from '../../cookies/cookie-jar.js';
|
|
7
7
|
import { createDefaultHooks, mergeHooks } from '../../core/hooks.js';
|
|
8
8
|
import { VERSION } from '../../version.js';
|
|
9
9
|
|
|
@@ -3,7 +3,7 @@ const { setGlobalAdapter, createRezoInstance, Rezo } = require('../../core/rezo.
|
|
|
3
3
|
const { RezoError, RezoErrorCode } = require('../../errors/rezo-error.cjs');
|
|
4
4
|
const { RezoHeaders } = require('../../utils/headers.cjs');
|
|
5
5
|
const { RezoFormData } = require('../../utils/form-data.cjs');
|
|
6
|
-
const { RezoCookieJar, Cookie } = require('../../
|
|
6
|
+
const { RezoCookieJar, Cookie } = require('../../cookies/cookie-jar.cjs');
|
|
7
7
|
const { createDefaultHooks, mergeHooks } = require('../../core/hooks.cjs');
|
|
8
8
|
const { VERSION } = require('../../version.cjs');
|
|
9
9
|
|
|
@@ -3,7 +3,7 @@ import { Agent as HttpAgent, OutgoingHttpHeaders } from 'node:http';
|
|
|
3
3
|
import { Agent as HttpsAgent } from 'node:https';
|
|
4
4
|
import { Socket } from 'node:net';
|
|
5
5
|
import { SecureContext, TLSSocket } from 'node:tls';
|
|
6
|
-
import { Cookie as TouchCookie, CookieJar as TouchCookieJar, CreateCookieOptions } from 'tough-cookie';
|
|
6
|
+
import { Cookie as TouchCookie, CookieJar as TouchCookieJar, CreateCookieJarOptions, CreateCookieOptions, Nullable, Store } from 'tough-cookie';
|
|
7
7
|
|
|
8
8
|
export interface RezoHttpHeaders {
|
|
9
9
|
accept?: string | undefined;
|
|
@@ -139,19 +139,6 @@ export declare class RezoHeaders extends Headers {
|
|
|
139
139
|
]>;
|
|
140
140
|
get [Symbol.toStringTag](): string;
|
|
141
141
|
}
|
|
142
|
-
export interface SerializedCookie {
|
|
143
|
-
key: string;
|
|
144
|
-
value: string;
|
|
145
|
-
expires?: string;
|
|
146
|
-
maxAge?: number | "Infinity" | "-Infinity";
|
|
147
|
-
domain?: string;
|
|
148
|
-
path?: string;
|
|
149
|
-
secure?: boolean;
|
|
150
|
-
hostOnly?: boolean;
|
|
151
|
-
creation?: string;
|
|
152
|
-
lastAccessed?: string;
|
|
153
|
-
[key: string]: unknown;
|
|
154
|
-
}
|
|
155
142
|
export declare class Cookie extends TouchCookie {
|
|
156
143
|
constructor(options?: CreateCookieOptions);
|
|
157
144
|
/**
|
|
@@ -187,10 +174,31 @@ export declare class Cookie extends TouchCookie {
|
|
|
187
174
|
*/
|
|
188
175
|
static isCookie(cookie: any): cookie is Cookie;
|
|
189
176
|
}
|
|
177
|
+
export interface SerializedCookie {
|
|
178
|
+
key: string;
|
|
179
|
+
value: string;
|
|
180
|
+
expires?: string;
|
|
181
|
+
maxAge?: number | "Infinity" | "-Infinity";
|
|
182
|
+
domain?: string;
|
|
183
|
+
path?: string;
|
|
184
|
+
secure?: boolean;
|
|
185
|
+
hostOnly?: boolean;
|
|
186
|
+
creation?: string;
|
|
187
|
+
lastAccessed?: string;
|
|
188
|
+
[key: string]: unknown;
|
|
189
|
+
}
|
|
190
|
+
export interface Cookies {
|
|
191
|
+
array: Cookie[];
|
|
192
|
+
serialized: SerializedCookie[];
|
|
193
|
+
netscape: string;
|
|
194
|
+
string: string;
|
|
195
|
+
setCookiesString: string[];
|
|
196
|
+
}
|
|
190
197
|
export declare class RezoCookieJar extends TouchCookieJar {
|
|
191
198
|
constructor();
|
|
192
199
|
constructor(cookies: Cookie[]);
|
|
193
200
|
constructor(cookies: Cookie[], url: string);
|
|
201
|
+
constructor(store: Nullable<Store>, options?: CreateCookieJarOptions | boolean);
|
|
194
202
|
private generateCookies;
|
|
195
203
|
/**
|
|
196
204
|
* Get all cookies from the cookie jar.
|
|
@@ -309,13 +317,6 @@ export declare class RezoCookieJar extends TouchCookieJar {
|
|
|
309
317
|
*/
|
|
310
318
|
static fromFile(filePath: string, defaultUrl?: string): RezoCookieJar;
|
|
311
319
|
}
|
|
312
|
-
export interface Cookies {
|
|
313
|
-
array: Cookie[];
|
|
314
|
-
serialized: SerializedCookie[];
|
|
315
|
-
netscape: string;
|
|
316
|
-
string: string;
|
|
317
|
-
setCookiesString: string[];
|
|
318
|
-
}
|
|
319
320
|
/**
|
|
320
321
|
* Universal FormData wrapper using native FormData API
|
|
321
322
|
* Works in Node.js 18+, Bun, Deno, browsers, CF Workers, edge runtimes
|
|
@@ -5114,7 +5115,7 @@ export interface RezoInstance extends Rezo, RezoCallable {
|
|
|
5114
5115
|
*
|
|
5115
5116
|
* IMPORTANT: Update these values when bumping package version.
|
|
5116
5117
|
*/
|
|
5117
|
-
export declare const VERSION = "1.0.
|
|
5118
|
+
export declare const VERSION = "1.0.91";
|
|
5118
5119
|
export declare const isRezoError: typeof RezoError.isRezoError;
|
|
5119
5120
|
export declare const Cancel: typeof RezoError;
|
|
5120
5121
|
export declare const CancelToken: {
|
|
@@ -3,7 +3,7 @@ import { setGlobalAdapter, createRezoInstance, Rezo } from '../../core/rezo.js';
|
|
|
3
3
|
import { RezoError, RezoErrorCode } from '../../errors/rezo-error.js';
|
|
4
4
|
import { RezoHeaders } from '../../utils/headers.js';
|
|
5
5
|
import { RezoFormData } from '../../utils/form-data.js';
|
|
6
|
-
import { RezoCookieJar, Cookie } from '../../
|
|
6
|
+
import { RezoCookieJar, Cookie } from '../../cookies/cookie-jar.js';
|
|
7
7
|
import { createDefaultHooks, mergeHooks } from '../../core/hooks.js';
|
|
8
8
|
import { VERSION } from '../../version.js';
|
|
9
9
|
|
|
@@ -3,7 +3,7 @@ const { setGlobalAdapter, createRezoInstance, Rezo } = require('../../core/rezo.
|
|
|
3
3
|
const { RezoError, RezoErrorCode } = require('../../errors/rezo-error.cjs');
|
|
4
4
|
const { RezoHeaders } = require('../../utils/headers.cjs');
|
|
5
5
|
const { RezoFormData } = require('../../utils/form-data.cjs');
|
|
6
|
-
const { RezoCookieJar, Cookie } = require('../../
|
|
6
|
+
const { RezoCookieJar, Cookie } = require('../../cookies/cookie-jar.cjs');
|
|
7
7
|
const { createDefaultHooks, mergeHooks } = require('../../core/hooks.cjs');
|
|
8
8
|
const { VERSION } = require('../../version.cjs');
|
|
9
9
|
|
|
@@ -3,7 +3,7 @@ import { Agent as HttpAgent, OutgoingHttpHeaders } from 'node:http';
|
|
|
3
3
|
import { Agent as HttpsAgent } from 'node:https';
|
|
4
4
|
import { Socket } from 'node:net';
|
|
5
5
|
import { SecureContext, TLSSocket } from 'node:tls';
|
|
6
|
-
import { Cookie as TouchCookie, CookieJar as TouchCookieJar, CreateCookieOptions } from 'tough-cookie';
|
|
6
|
+
import { Cookie as TouchCookie, CookieJar as TouchCookieJar, CreateCookieJarOptions, CreateCookieOptions, Nullable, Store } from 'tough-cookie';
|
|
7
7
|
|
|
8
8
|
export interface RezoHttpHeaders {
|
|
9
9
|
accept?: string | undefined;
|
|
@@ -139,19 +139,6 @@ export declare class RezoHeaders extends Headers {
|
|
|
139
139
|
]>;
|
|
140
140
|
get [Symbol.toStringTag](): string;
|
|
141
141
|
}
|
|
142
|
-
export interface SerializedCookie {
|
|
143
|
-
key: string;
|
|
144
|
-
value: string;
|
|
145
|
-
expires?: string;
|
|
146
|
-
maxAge?: number | "Infinity" | "-Infinity";
|
|
147
|
-
domain?: string;
|
|
148
|
-
path?: string;
|
|
149
|
-
secure?: boolean;
|
|
150
|
-
hostOnly?: boolean;
|
|
151
|
-
creation?: string;
|
|
152
|
-
lastAccessed?: string;
|
|
153
|
-
[key: string]: unknown;
|
|
154
|
-
}
|
|
155
142
|
export declare class Cookie extends TouchCookie {
|
|
156
143
|
constructor(options?: CreateCookieOptions);
|
|
157
144
|
/**
|
|
@@ -187,10 +174,31 @@ export declare class Cookie extends TouchCookie {
|
|
|
187
174
|
*/
|
|
188
175
|
static isCookie(cookie: any): cookie is Cookie;
|
|
189
176
|
}
|
|
177
|
+
export interface SerializedCookie {
|
|
178
|
+
key: string;
|
|
179
|
+
value: string;
|
|
180
|
+
expires?: string;
|
|
181
|
+
maxAge?: number | "Infinity" | "-Infinity";
|
|
182
|
+
domain?: string;
|
|
183
|
+
path?: string;
|
|
184
|
+
secure?: boolean;
|
|
185
|
+
hostOnly?: boolean;
|
|
186
|
+
creation?: string;
|
|
187
|
+
lastAccessed?: string;
|
|
188
|
+
[key: string]: unknown;
|
|
189
|
+
}
|
|
190
|
+
export interface Cookies {
|
|
191
|
+
array: Cookie[];
|
|
192
|
+
serialized: SerializedCookie[];
|
|
193
|
+
netscape: string;
|
|
194
|
+
string: string;
|
|
195
|
+
setCookiesString: string[];
|
|
196
|
+
}
|
|
190
197
|
export declare class RezoCookieJar extends TouchCookieJar {
|
|
191
198
|
constructor();
|
|
192
199
|
constructor(cookies: Cookie[]);
|
|
193
200
|
constructor(cookies: Cookie[], url: string);
|
|
201
|
+
constructor(store: Nullable<Store>, options?: CreateCookieJarOptions | boolean);
|
|
194
202
|
private generateCookies;
|
|
195
203
|
/**
|
|
196
204
|
* Get all cookies from the cookie jar.
|
|
@@ -309,13 +317,6 @@ export declare class RezoCookieJar extends TouchCookieJar {
|
|
|
309
317
|
*/
|
|
310
318
|
static fromFile(filePath: string, defaultUrl?: string): RezoCookieJar;
|
|
311
319
|
}
|
|
312
|
-
export interface Cookies {
|
|
313
|
-
array: Cookie[];
|
|
314
|
-
serialized: SerializedCookie[];
|
|
315
|
-
netscape: string;
|
|
316
|
-
string: string;
|
|
317
|
-
setCookiesString: string[];
|
|
318
|
-
}
|
|
319
320
|
/**
|
|
320
321
|
* Universal FormData wrapper using native FormData API
|
|
321
322
|
* Works in Node.js 18+, Bun, Deno, browsers, CF Workers, edge runtimes
|
|
@@ -5114,7 +5115,7 @@ export interface RezoInstance extends Rezo, RezoCallable {
|
|
|
5114
5115
|
*
|
|
5115
5116
|
* IMPORTANT: Update these values when bumping package version.
|
|
5116
5117
|
*/
|
|
5117
|
-
export declare const VERSION = "1.0.
|
|
5118
|
+
export declare const VERSION = "1.0.91";
|
|
5118
5119
|
export declare const isRezoError: typeof RezoError.isRezoError;
|
|
5119
5120
|
export declare const Cancel: typeof RezoError;
|
|
5120
5121
|
export declare const CancelToken: {
|
|
@@ -3,7 +3,7 @@ import { setGlobalAdapter, createRezoInstance, Rezo } from '../../core/rezo.js';
|
|
|
3
3
|
import { RezoError, RezoErrorCode } from '../../errors/rezo-error.js';
|
|
4
4
|
import { RezoHeaders } from '../../utils/headers.js';
|
|
5
5
|
import { RezoFormData } from '../../utils/form-data.js';
|
|
6
|
-
import { RezoCookieJar, Cookie } from '../../
|
|
6
|
+
import { RezoCookieJar, Cookie } from '../../cookies/cookie-jar.js';
|
|
7
7
|
import { createDefaultHooks, mergeHooks } from '../../core/hooks.js';
|
|
8
8
|
import { VERSION } from '../../version.js';
|
|
9
9
|
|
package/dist/adapters/fetch.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
const { RezoError } = require('../errors/rezo-error.cjs');
|
|
2
2
|
const { buildSmartError, builErrorFromResponse, buildDownloadError } = require('../responses/buildError.cjs');
|
|
3
|
-
const { RezoCookieJar } = require('../
|
|
3
|
+
const { RezoCookieJar } = require('../cookies/index.cjs');
|
|
4
4
|
const RezoFormData = require('../utils/form-data.cjs');
|
|
5
5
|
const { getDefaultConfig, prepareHTTPOptions, calculateRetryDelay, shouldRetry } = require('../utils/http-config.cjs');
|
|
6
6
|
const { RezoHeaders } = require('../utils/headers.cjs');
|
package/dist/adapters/fetch.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { RezoError } from '../errors/rezo-error.js';
|
|
2
2
|
import { buildSmartError, builErrorFromResponse, buildDownloadError } from '../responses/buildError.js';
|
|
3
|
-
import { RezoCookieJar } from '../
|
|
3
|
+
import { RezoCookieJar } from '../cookies/index.js';
|
|
4
4
|
import RezoFormData from '../utils/form-data.js';
|
|
5
5
|
import { getDefaultConfig, prepareHTTPOptions, calculateRetryDelay, shouldRetry } from '../utils/http-config.js';
|
|
6
6
|
import { RezoHeaders } from '../utils/headers.js';
|