rezo 1.0.78 → 1.0.80
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/entries/curl.d.ts +25 -2
- package/dist/adapters/entries/fetch.d.ts +25 -2
- package/dist/adapters/entries/http.d.ts +25 -2
- package/dist/adapters/entries/http2.d.ts +25 -2
- package/dist/adapters/entries/react-native.d.ts +25 -2
- package/dist/adapters/entries/xhr.d.ts +25 -2
- package/dist/adapters/index.cjs +6 -6
- package/dist/cache/index.cjs +9 -9
- package/dist/crawler/index.cjs +42 -42
- package/dist/crawler/plugin/index.cjs +1 -1
- package/dist/crawler.d.ts +24 -1
- package/dist/entries/crawler.cjs +4 -4
- package/dist/index.cjs +31 -30
- package/dist/index.d.ts +45 -2
- package/dist/index.js +1 -1
- package/dist/internal/agents/index.cjs +14 -14
- package/dist/platform/browser.d.ts +25 -2
- package/dist/platform/bun.d.ts +25 -2
- package/dist/platform/deno.d.ts +25 -2
- package/dist/platform/node.d.ts +25 -2
- package/dist/platform/react-native.d.ts +25 -2
- package/dist/platform/worker.d.ts +25 -2
- package/dist/proxy/index.cjs +4 -4
- package/dist/proxy/manager.cjs +26 -0
- package/dist/proxy/manager.js +26 -0
- package/dist/queue/http-queue.cjs +22 -6
- package/dist/queue/http-queue.js +22 -6
- package/dist/queue/index.cjs +9 -8
- package/dist/queue/index.js +1 -1
- package/dist/responses/universal/index.cjs +11 -11
- package/dist/version.cjs +1 -1
- package/dist/version.js +1 -1
- package/dist/wget/index.cjs +49 -49
- package/dist/wget/index.d.ts +24 -1
- package/package.json +1 -1
|
@@ -928,6 +928,11 @@ export interface ProxyManagerBaseConfig {
|
|
|
928
928
|
* If not set or enabled: false, proxies are permanently removed when disabled
|
|
929
929
|
*/
|
|
930
930
|
cooldown?: ProxyCooldownConfig;
|
|
931
|
+
/**
|
|
932
|
+
* Shorthand for cooldown duration in milliseconds
|
|
933
|
+
* Equivalent to: cooldown: { enabled: true, durationMs: cooldownPeriod }
|
|
934
|
+
*/
|
|
935
|
+
cooldownPeriod?: number;
|
|
931
936
|
/**
|
|
932
937
|
* Whether to throw error when no proxy is available
|
|
933
938
|
* - true (default): Throw RezoError when no proxies available
|
|
@@ -945,6 +950,21 @@ export interface ProxyManagerBaseConfig {
|
|
|
945
950
|
* @default 3
|
|
946
951
|
*/
|
|
947
952
|
maxProxyRetries?: number;
|
|
953
|
+
/**
|
|
954
|
+
* Event hooks for proxy lifecycle events
|
|
955
|
+
* Alternative to setting hooks after construction
|
|
956
|
+
*/
|
|
957
|
+
hooks?: {
|
|
958
|
+
beforeProxySelect?: ((context: BeforeProxySelectContext) => ProxyInfo | void | Promise<ProxyInfo | void>)[];
|
|
959
|
+
afterProxySelect?: ((context: AfterProxySelectContext) => void | Promise<void>)[];
|
|
960
|
+
beforeProxyError?: ((context: BeforeProxyErrorContext) => void | Promise<void>)[];
|
|
961
|
+
afterProxyError?: ((context: AfterProxyErrorContext) => void | Promise<void>)[];
|
|
962
|
+
beforeProxyDisable?: ((context: BeforeProxyDisableContext) => boolean | void | Promise<boolean | void>)[];
|
|
963
|
+
afterProxyDisable?: ((context: AfterProxyDisableContext) => void | Promise<void>)[];
|
|
964
|
+
afterProxyRotate?: ((context: AfterProxyRotateContext) => void | Promise<void>)[];
|
|
965
|
+
afterProxyEnable?: ((context: AfterProxyEnableContext) => void | Promise<void>)[];
|
|
966
|
+
onNoProxiesAvailable?: ((context: OnNoProxiesAvailableContext) => void | Promise<void>)[];
|
|
967
|
+
};
|
|
948
968
|
}
|
|
949
969
|
/**
|
|
950
970
|
* Full proxy manager configuration
|
|
@@ -3053,7 +3073,10 @@ declare class ProxyManager {
|
|
|
3053
3073
|
* Create a new ProxyManager instance
|
|
3054
3074
|
* @param config - Proxy manager configuration
|
|
3055
3075
|
*/
|
|
3056
|
-
constructor(config: ProxyManagerConfig
|
|
3076
|
+
constructor(config: ProxyManagerConfig & {
|
|
3077
|
+
cooldownPeriod?: number;
|
|
3078
|
+
hooks?: Partial<ProxyHooks>;
|
|
3079
|
+
});
|
|
3057
3080
|
/**
|
|
3058
3081
|
* Create initial state for a proxy
|
|
3059
3082
|
*/
|
|
@@ -4582,7 +4605,7 @@ export interface RezoInstance extends Rezo {
|
|
|
4582
4605
|
*
|
|
4583
4606
|
* IMPORTANT: Update these values when bumping package version.
|
|
4584
4607
|
*/
|
|
4585
|
-
export declare const VERSION = "1.0.
|
|
4608
|
+
export declare const VERSION = "1.0.80";
|
|
4586
4609
|
/**
|
|
4587
4610
|
* cURL Options Configuration
|
|
4588
4611
|
*
|
|
@@ -928,6 +928,11 @@ export interface ProxyManagerBaseConfig {
|
|
|
928
928
|
* If not set or enabled: false, proxies are permanently removed when disabled
|
|
929
929
|
*/
|
|
930
930
|
cooldown?: ProxyCooldownConfig;
|
|
931
|
+
/**
|
|
932
|
+
* Shorthand for cooldown duration in milliseconds
|
|
933
|
+
* Equivalent to: cooldown: { enabled: true, durationMs: cooldownPeriod }
|
|
934
|
+
*/
|
|
935
|
+
cooldownPeriod?: number;
|
|
931
936
|
/**
|
|
932
937
|
* Whether to throw error when no proxy is available
|
|
933
938
|
* - true (default): Throw RezoError when no proxies available
|
|
@@ -945,6 +950,21 @@ export interface ProxyManagerBaseConfig {
|
|
|
945
950
|
* @default 3
|
|
946
951
|
*/
|
|
947
952
|
maxProxyRetries?: number;
|
|
953
|
+
/**
|
|
954
|
+
* Event hooks for proxy lifecycle events
|
|
955
|
+
* Alternative to setting hooks after construction
|
|
956
|
+
*/
|
|
957
|
+
hooks?: {
|
|
958
|
+
beforeProxySelect?: ((context: BeforeProxySelectContext) => ProxyInfo | void | Promise<ProxyInfo | void>)[];
|
|
959
|
+
afterProxySelect?: ((context: AfterProxySelectContext) => void | Promise<void>)[];
|
|
960
|
+
beforeProxyError?: ((context: BeforeProxyErrorContext) => void | Promise<void>)[];
|
|
961
|
+
afterProxyError?: ((context: AfterProxyErrorContext) => void | Promise<void>)[];
|
|
962
|
+
beforeProxyDisable?: ((context: BeforeProxyDisableContext) => boolean | void | Promise<boolean | void>)[];
|
|
963
|
+
afterProxyDisable?: ((context: AfterProxyDisableContext) => void | Promise<void>)[];
|
|
964
|
+
afterProxyRotate?: ((context: AfterProxyRotateContext) => void | Promise<void>)[];
|
|
965
|
+
afterProxyEnable?: ((context: AfterProxyEnableContext) => void | Promise<void>)[];
|
|
966
|
+
onNoProxiesAvailable?: ((context: OnNoProxiesAvailableContext) => void | Promise<void>)[];
|
|
967
|
+
};
|
|
948
968
|
}
|
|
949
969
|
/**
|
|
950
970
|
* Full proxy manager configuration
|
|
@@ -3053,7 +3073,10 @@ declare class ProxyManager {
|
|
|
3053
3073
|
* Create a new ProxyManager instance
|
|
3054
3074
|
* @param config - Proxy manager configuration
|
|
3055
3075
|
*/
|
|
3056
|
-
constructor(config: ProxyManagerConfig
|
|
3076
|
+
constructor(config: ProxyManagerConfig & {
|
|
3077
|
+
cooldownPeriod?: number;
|
|
3078
|
+
hooks?: Partial<ProxyHooks>;
|
|
3079
|
+
});
|
|
3057
3080
|
/**
|
|
3058
3081
|
* Create initial state for a proxy
|
|
3059
3082
|
*/
|
|
@@ -4582,7 +4605,7 @@ export interface RezoInstance extends Rezo {
|
|
|
4582
4605
|
*
|
|
4583
4606
|
* IMPORTANT: Update these values when bumping package version.
|
|
4584
4607
|
*/
|
|
4585
|
-
export declare const VERSION = "1.0.
|
|
4608
|
+
export declare const VERSION = "1.0.80";
|
|
4586
4609
|
export declare const isRezoError: typeof RezoError.isRezoError;
|
|
4587
4610
|
export declare const Cancel: typeof RezoError;
|
|
4588
4611
|
export declare const CancelToken: {
|
|
@@ -928,6 +928,11 @@ export interface ProxyManagerBaseConfig {
|
|
|
928
928
|
* If not set or enabled: false, proxies are permanently removed when disabled
|
|
929
929
|
*/
|
|
930
930
|
cooldown?: ProxyCooldownConfig;
|
|
931
|
+
/**
|
|
932
|
+
* Shorthand for cooldown duration in milliseconds
|
|
933
|
+
* Equivalent to: cooldown: { enabled: true, durationMs: cooldownPeriod }
|
|
934
|
+
*/
|
|
935
|
+
cooldownPeriod?: number;
|
|
931
936
|
/**
|
|
932
937
|
* Whether to throw error when no proxy is available
|
|
933
938
|
* - true (default): Throw RezoError when no proxies available
|
|
@@ -945,6 +950,21 @@ export interface ProxyManagerBaseConfig {
|
|
|
945
950
|
* @default 3
|
|
946
951
|
*/
|
|
947
952
|
maxProxyRetries?: number;
|
|
953
|
+
/**
|
|
954
|
+
* Event hooks for proxy lifecycle events
|
|
955
|
+
* Alternative to setting hooks after construction
|
|
956
|
+
*/
|
|
957
|
+
hooks?: {
|
|
958
|
+
beforeProxySelect?: ((context: BeforeProxySelectContext) => ProxyInfo | void | Promise<ProxyInfo | void>)[];
|
|
959
|
+
afterProxySelect?: ((context: AfterProxySelectContext) => void | Promise<void>)[];
|
|
960
|
+
beforeProxyError?: ((context: BeforeProxyErrorContext) => void | Promise<void>)[];
|
|
961
|
+
afterProxyError?: ((context: AfterProxyErrorContext) => void | Promise<void>)[];
|
|
962
|
+
beforeProxyDisable?: ((context: BeforeProxyDisableContext) => boolean | void | Promise<boolean | void>)[];
|
|
963
|
+
afterProxyDisable?: ((context: AfterProxyDisableContext) => void | Promise<void>)[];
|
|
964
|
+
afterProxyRotate?: ((context: AfterProxyRotateContext) => void | Promise<void>)[];
|
|
965
|
+
afterProxyEnable?: ((context: AfterProxyEnableContext) => void | Promise<void>)[];
|
|
966
|
+
onNoProxiesAvailable?: ((context: OnNoProxiesAvailableContext) => void | Promise<void>)[];
|
|
967
|
+
};
|
|
948
968
|
}
|
|
949
969
|
/**
|
|
950
970
|
* Full proxy manager configuration
|
|
@@ -3053,7 +3073,10 @@ declare class ProxyManager {
|
|
|
3053
3073
|
* Create a new ProxyManager instance
|
|
3054
3074
|
* @param config - Proxy manager configuration
|
|
3055
3075
|
*/
|
|
3056
|
-
constructor(config: ProxyManagerConfig
|
|
3076
|
+
constructor(config: ProxyManagerConfig & {
|
|
3077
|
+
cooldownPeriod?: number;
|
|
3078
|
+
hooks?: Partial<ProxyHooks>;
|
|
3079
|
+
});
|
|
3057
3080
|
/**
|
|
3058
3081
|
* Create initial state for a proxy
|
|
3059
3082
|
*/
|
|
@@ -4582,7 +4605,7 @@ export interface RezoInstance extends Rezo {
|
|
|
4582
4605
|
*
|
|
4583
4606
|
* IMPORTANT: Update these values when bumping package version.
|
|
4584
4607
|
*/
|
|
4585
|
-
export declare const VERSION = "1.0.
|
|
4608
|
+
export declare const VERSION = "1.0.80";
|
|
4586
4609
|
/**
|
|
4587
4610
|
* Type guard to check if an error is a RezoError instance.
|
|
4588
4611
|
*/
|
|
@@ -928,6 +928,11 @@ export interface ProxyManagerBaseConfig {
|
|
|
928
928
|
* If not set or enabled: false, proxies are permanently removed when disabled
|
|
929
929
|
*/
|
|
930
930
|
cooldown?: ProxyCooldownConfig;
|
|
931
|
+
/**
|
|
932
|
+
* Shorthand for cooldown duration in milliseconds
|
|
933
|
+
* Equivalent to: cooldown: { enabled: true, durationMs: cooldownPeriod }
|
|
934
|
+
*/
|
|
935
|
+
cooldownPeriod?: number;
|
|
931
936
|
/**
|
|
932
937
|
* Whether to throw error when no proxy is available
|
|
933
938
|
* - true (default): Throw RezoError when no proxies available
|
|
@@ -945,6 +950,21 @@ export interface ProxyManagerBaseConfig {
|
|
|
945
950
|
* @default 3
|
|
946
951
|
*/
|
|
947
952
|
maxProxyRetries?: number;
|
|
953
|
+
/**
|
|
954
|
+
* Event hooks for proxy lifecycle events
|
|
955
|
+
* Alternative to setting hooks after construction
|
|
956
|
+
*/
|
|
957
|
+
hooks?: {
|
|
958
|
+
beforeProxySelect?: ((context: BeforeProxySelectContext) => ProxyInfo | void | Promise<ProxyInfo | void>)[];
|
|
959
|
+
afterProxySelect?: ((context: AfterProxySelectContext) => void | Promise<void>)[];
|
|
960
|
+
beforeProxyError?: ((context: BeforeProxyErrorContext) => void | Promise<void>)[];
|
|
961
|
+
afterProxyError?: ((context: AfterProxyErrorContext) => void | Promise<void>)[];
|
|
962
|
+
beforeProxyDisable?: ((context: BeforeProxyDisableContext) => boolean | void | Promise<boolean | void>)[];
|
|
963
|
+
afterProxyDisable?: ((context: AfterProxyDisableContext) => void | Promise<void>)[];
|
|
964
|
+
afterProxyRotate?: ((context: AfterProxyRotateContext) => void | Promise<void>)[];
|
|
965
|
+
afterProxyEnable?: ((context: AfterProxyEnableContext) => void | Promise<void>)[];
|
|
966
|
+
onNoProxiesAvailable?: ((context: OnNoProxiesAvailableContext) => void | Promise<void>)[];
|
|
967
|
+
};
|
|
948
968
|
}
|
|
949
969
|
/**
|
|
950
970
|
* Full proxy manager configuration
|
|
@@ -3053,7 +3073,10 @@ declare class ProxyManager {
|
|
|
3053
3073
|
* Create a new ProxyManager instance
|
|
3054
3074
|
* @param config - Proxy manager configuration
|
|
3055
3075
|
*/
|
|
3056
|
-
constructor(config: ProxyManagerConfig
|
|
3076
|
+
constructor(config: ProxyManagerConfig & {
|
|
3077
|
+
cooldownPeriod?: number;
|
|
3078
|
+
hooks?: Partial<ProxyHooks>;
|
|
3079
|
+
});
|
|
3057
3080
|
/**
|
|
3058
3081
|
* Create initial state for a proxy
|
|
3059
3082
|
*/
|
|
@@ -4582,7 +4605,7 @@ export interface RezoInstance extends Rezo {
|
|
|
4582
4605
|
*
|
|
4583
4606
|
* IMPORTANT: Update these values when bumping package version.
|
|
4584
4607
|
*/
|
|
4585
|
-
export declare const VERSION = "1.0.
|
|
4608
|
+
export declare const VERSION = "1.0.80";
|
|
4586
4609
|
export declare const isRezoError: typeof RezoError.isRezoError;
|
|
4587
4610
|
export declare const Cancel: typeof RezoError;
|
|
4588
4611
|
export declare const CancelToken: {
|
|
@@ -928,6 +928,11 @@ export interface ProxyManagerBaseConfig {
|
|
|
928
928
|
* If not set or enabled: false, proxies are permanently removed when disabled
|
|
929
929
|
*/
|
|
930
930
|
cooldown?: ProxyCooldownConfig;
|
|
931
|
+
/**
|
|
932
|
+
* Shorthand for cooldown duration in milliseconds
|
|
933
|
+
* Equivalent to: cooldown: { enabled: true, durationMs: cooldownPeriod }
|
|
934
|
+
*/
|
|
935
|
+
cooldownPeriod?: number;
|
|
931
936
|
/**
|
|
932
937
|
* Whether to throw error when no proxy is available
|
|
933
938
|
* - true (default): Throw RezoError when no proxies available
|
|
@@ -945,6 +950,21 @@ export interface ProxyManagerBaseConfig {
|
|
|
945
950
|
* @default 3
|
|
946
951
|
*/
|
|
947
952
|
maxProxyRetries?: number;
|
|
953
|
+
/**
|
|
954
|
+
* Event hooks for proxy lifecycle events
|
|
955
|
+
* Alternative to setting hooks after construction
|
|
956
|
+
*/
|
|
957
|
+
hooks?: {
|
|
958
|
+
beforeProxySelect?: ((context: BeforeProxySelectContext) => ProxyInfo | void | Promise<ProxyInfo | void>)[];
|
|
959
|
+
afterProxySelect?: ((context: AfterProxySelectContext) => void | Promise<void>)[];
|
|
960
|
+
beforeProxyError?: ((context: BeforeProxyErrorContext) => void | Promise<void>)[];
|
|
961
|
+
afterProxyError?: ((context: AfterProxyErrorContext) => void | Promise<void>)[];
|
|
962
|
+
beforeProxyDisable?: ((context: BeforeProxyDisableContext) => boolean | void | Promise<boolean | void>)[];
|
|
963
|
+
afterProxyDisable?: ((context: AfterProxyDisableContext) => void | Promise<void>)[];
|
|
964
|
+
afterProxyRotate?: ((context: AfterProxyRotateContext) => void | Promise<void>)[];
|
|
965
|
+
afterProxyEnable?: ((context: AfterProxyEnableContext) => void | Promise<void>)[];
|
|
966
|
+
onNoProxiesAvailable?: ((context: OnNoProxiesAvailableContext) => void | Promise<void>)[];
|
|
967
|
+
};
|
|
948
968
|
}
|
|
949
969
|
/**
|
|
950
970
|
* Full proxy manager configuration
|
|
@@ -3053,7 +3073,10 @@ declare class ProxyManager {
|
|
|
3053
3073
|
* Create a new ProxyManager instance
|
|
3054
3074
|
* @param config - Proxy manager configuration
|
|
3055
3075
|
*/
|
|
3056
|
-
constructor(config: ProxyManagerConfig
|
|
3076
|
+
constructor(config: ProxyManagerConfig & {
|
|
3077
|
+
cooldownPeriod?: number;
|
|
3078
|
+
hooks?: Partial<ProxyHooks>;
|
|
3079
|
+
});
|
|
3057
3080
|
/**
|
|
3058
3081
|
* Create initial state for a proxy
|
|
3059
3082
|
*/
|
|
@@ -4582,7 +4605,7 @@ export interface RezoInstance extends Rezo {
|
|
|
4582
4605
|
*
|
|
4583
4606
|
* IMPORTANT: Update these values when bumping package version.
|
|
4584
4607
|
*/
|
|
4585
|
-
export declare const VERSION = "1.0.
|
|
4608
|
+
export declare const VERSION = "1.0.80";
|
|
4586
4609
|
export declare const isRezoError: typeof RezoError.isRezoError;
|
|
4587
4610
|
export declare const Cancel: typeof RezoError;
|
|
4588
4611
|
export declare const CancelToken: {
|
|
@@ -928,6 +928,11 @@ export interface ProxyManagerBaseConfig {
|
|
|
928
928
|
* If not set or enabled: false, proxies are permanently removed when disabled
|
|
929
929
|
*/
|
|
930
930
|
cooldown?: ProxyCooldownConfig;
|
|
931
|
+
/**
|
|
932
|
+
* Shorthand for cooldown duration in milliseconds
|
|
933
|
+
* Equivalent to: cooldown: { enabled: true, durationMs: cooldownPeriod }
|
|
934
|
+
*/
|
|
935
|
+
cooldownPeriod?: number;
|
|
931
936
|
/**
|
|
932
937
|
* Whether to throw error when no proxy is available
|
|
933
938
|
* - true (default): Throw RezoError when no proxies available
|
|
@@ -945,6 +950,21 @@ export interface ProxyManagerBaseConfig {
|
|
|
945
950
|
* @default 3
|
|
946
951
|
*/
|
|
947
952
|
maxProxyRetries?: number;
|
|
953
|
+
/**
|
|
954
|
+
* Event hooks for proxy lifecycle events
|
|
955
|
+
* Alternative to setting hooks after construction
|
|
956
|
+
*/
|
|
957
|
+
hooks?: {
|
|
958
|
+
beforeProxySelect?: ((context: BeforeProxySelectContext) => ProxyInfo | void | Promise<ProxyInfo | void>)[];
|
|
959
|
+
afterProxySelect?: ((context: AfterProxySelectContext) => void | Promise<void>)[];
|
|
960
|
+
beforeProxyError?: ((context: BeforeProxyErrorContext) => void | Promise<void>)[];
|
|
961
|
+
afterProxyError?: ((context: AfterProxyErrorContext) => void | Promise<void>)[];
|
|
962
|
+
beforeProxyDisable?: ((context: BeforeProxyDisableContext) => boolean | void | Promise<boolean | void>)[];
|
|
963
|
+
afterProxyDisable?: ((context: AfterProxyDisableContext) => void | Promise<void>)[];
|
|
964
|
+
afterProxyRotate?: ((context: AfterProxyRotateContext) => void | Promise<void>)[];
|
|
965
|
+
afterProxyEnable?: ((context: AfterProxyEnableContext) => void | Promise<void>)[];
|
|
966
|
+
onNoProxiesAvailable?: ((context: OnNoProxiesAvailableContext) => void | Promise<void>)[];
|
|
967
|
+
};
|
|
948
968
|
}
|
|
949
969
|
/**
|
|
950
970
|
* Full proxy manager configuration
|
|
@@ -3053,7 +3073,10 @@ declare class ProxyManager {
|
|
|
3053
3073
|
* Create a new ProxyManager instance
|
|
3054
3074
|
* @param config - Proxy manager configuration
|
|
3055
3075
|
*/
|
|
3056
|
-
constructor(config: ProxyManagerConfig
|
|
3076
|
+
constructor(config: ProxyManagerConfig & {
|
|
3077
|
+
cooldownPeriod?: number;
|
|
3078
|
+
hooks?: Partial<ProxyHooks>;
|
|
3079
|
+
});
|
|
3057
3080
|
/**
|
|
3058
3081
|
* Create initial state for a proxy
|
|
3059
3082
|
*/
|
|
@@ -4582,7 +4605,7 @@ export interface RezoInstance extends Rezo {
|
|
|
4582
4605
|
*
|
|
4583
4606
|
* IMPORTANT: Update these values when bumping package version.
|
|
4584
4607
|
*/
|
|
4585
|
-
export declare const VERSION = "1.0.
|
|
4608
|
+
export declare const VERSION = "1.0.80";
|
|
4586
4609
|
export declare const isRezoError: typeof RezoError.isRezoError;
|
|
4587
4610
|
export declare const Cancel: typeof RezoError;
|
|
4588
4611
|
export declare const CancelToken: {
|
package/dist/adapters/index.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
const
|
|
2
|
-
exports.detectRuntime =
|
|
3
|
-
exports.getAdapterCapabilities =
|
|
4
|
-
exports.buildAdapterContext =
|
|
5
|
-
exports.getAvailableAdapters =
|
|
6
|
-
exports.selectAdapter =
|
|
1
|
+
const _mod_dwsrky = require('./picker.cjs');
|
|
2
|
+
exports.detectRuntime = _mod_dwsrky.detectRuntime;
|
|
3
|
+
exports.getAdapterCapabilities = _mod_dwsrky.getAdapterCapabilities;
|
|
4
|
+
exports.buildAdapterContext = _mod_dwsrky.buildAdapterContext;
|
|
5
|
+
exports.getAvailableAdapters = _mod_dwsrky.getAvailableAdapters;
|
|
6
|
+
exports.selectAdapter = _mod_dwsrky.selectAdapter;;
|
package/dist/cache/index.cjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
const
|
|
2
|
-
exports.LRUCache =
|
|
3
|
-
const
|
|
4
|
-
exports.DNSCache =
|
|
5
|
-
exports.getGlobalDNSCache =
|
|
6
|
-
exports.resetGlobalDNSCache =
|
|
7
|
-
const
|
|
8
|
-
exports.ResponseCache =
|
|
9
|
-
exports.normalizeResponseCacheConfig =
|
|
1
|
+
const _mod_gxwmpj = require('./lru-cache.cjs');
|
|
2
|
+
exports.LRUCache = _mod_gxwmpj.LRUCache;;
|
|
3
|
+
const _mod_bkeaig = require('./dns-cache.cjs');
|
|
4
|
+
exports.DNSCache = _mod_bkeaig.DNSCache;
|
|
5
|
+
exports.getGlobalDNSCache = _mod_bkeaig.getGlobalDNSCache;
|
|
6
|
+
exports.resetGlobalDNSCache = _mod_bkeaig.resetGlobalDNSCache;;
|
|
7
|
+
const _mod_r8jxol = require('./response-cache.cjs');
|
|
8
|
+
exports.ResponseCache = _mod_r8jxol.ResponseCache;
|
|
9
|
+
exports.normalizeResponseCacheConfig = _mod_r8jxol.normalizeResponseCacheConfig;;
|
package/dist/crawler/index.cjs
CHANGED
|
@@ -1,42 +1,42 @@
|
|
|
1
|
-
const
|
|
2
|
-
exports.Crawler =
|
|
3
|
-
const
|
|
4
|
-
exports.CrawlerOptions =
|
|
5
|
-
const
|
|
6
|
-
exports.RobotsTxt =
|
|
7
|
-
const
|
|
8
|
-
exports.FileCacher =
|
|
9
|
-
const
|
|
10
|
-
exports.UrlStore =
|
|
11
|
-
const
|
|
12
|
-
exports.NavigationHistory =
|
|
13
|
-
const
|
|
14
|
-
exports.Oxylabs =
|
|
15
|
-
const
|
|
16
|
-
exports.OXYLABS_BROWSER_TYPES =
|
|
17
|
-
exports.OXYLABS_COMMON_LOCALES =
|
|
18
|
-
exports.OXYLABS_COMMON_GEO_LOCATIONS =
|
|
19
|
-
exports.OXYLABS_US_STATES =
|
|
20
|
-
exports.OXYLABS_EUROPEAN_COUNTRIES =
|
|
21
|
-
exports.OXYLABS_ASIAN_COUNTRIES =
|
|
22
|
-
exports.getRandomOxylabsBrowserType =
|
|
23
|
-
exports.getRandomOxylabsLocale =
|
|
24
|
-
exports.getRandomOxylabsGeoLocation =
|
|
25
|
-
const
|
|
26
|
-
exports.isRestrictedDomain =
|
|
27
|
-
const
|
|
28
|
-
exports.Decodo =
|
|
29
|
-
const
|
|
30
|
-
exports.DECODO_DEVICE_TYPES =
|
|
31
|
-
exports.DECODO_HEADLESS_MODES =
|
|
32
|
-
exports.DECODO_COMMON_LOCALES =
|
|
33
|
-
exports.DECODO_COMMON_COUNTRIES =
|
|
34
|
-
exports.DECODO_EUROPEAN_COUNTRIES =
|
|
35
|
-
exports.DECODO_ASIAN_COUNTRIES =
|
|
36
|
-
exports.DECODO_US_STATES =
|
|
37
|
-
exports.DECODO_COMMON_CITIES =
|
|
38
|
-
exports.getRandomDecodoDeviceType =
|
|
39
|
-
exports.getRandomDecodoLocale =
|
|
40
|
-
exports.getRandomDecodoCountry =
|
|
41
|
-
exports.getRandomDecodoCity =
|
|
42
|
-
exports.generateDecodoSessionId =
|
|
1
|
+
const _mod_qdoesj = require('./crawler.cjs');
|
|
2
|
+
exports.Crawler = _mod_qdoesj.Crawler;;
|
|
3
|
+
const _mod_sk9yq6 = require('./crawler-options.cjs');
|
|
4
|
+
exports.CrawlerOptions = _mod_sk9yq6.CrawlerOptions;;
|
|
5
|
+
const _mod_62ph10 = require('./plugin/robots-txt.cjs');
|
|
6
|
+
exports.RobotsTxt = _mod_62ph10.RobotsTxt;;
|
|
7
|
+
const _mod_e3e1ae = require('./plugin/file-cacher.cjs');
|
|
8
|
+
exports.FileCacher = _mod_e3e1ae.FileCacher;;
|
|
9
|
+
const _mod_el2myk = require('./plugin/url-store.cjs');
|
|
10
|
+
exports.UrlStore = _mod_el2myk.UrlStore;;
|
|
11
|
+
const _mod_uer9zk = require('./plugin/navigation-history.cjs');
|
|
12
|
+
exports.NavigationHistory = _mod_uer9zk.NavigationHistory;;
|
|
13
|
+
const _mod_nkyvsn = require('./addon/oxylabs/index.cjs');
|
|
14
|
+
exports.Oxylabs = _mod_nkyvsn.Oxylabs;;
|
|
15
|
+
const _mod_2t4j27 = require('./addon/oxylabs/options.cjs');
|
|
16
|
+
exports.OXYLABS_BROWSER_TYPES = _mod_2t4j27.OXYLABS_BROWSER_TYPES;
|
|
17
|
+
exports.OXYLABS_COMMON_LOCALES = _mod_2t4j27.OXYLABS_COMMON_LOCALES;
|
|
18
|
+
exports.OXYLABS_COMMON_GEO_LOCATIONS = _mod_2t4j27.OXYLABS_COMMON_GEO_LOCATIONS;
|
|
19
|
+
exports.OXYLABS_US_STATES = _mod_2t4j27.OXYLABS_US_STATES;
|
|
20
|
+
exports.OXYLABS_EUROPEAN_COUNTRIES = _mod_2t4j27.OXYLABS_EUROPEAN_COUNTRIES;
|
|
21
|
+
exports.OXYLABS_ASIAN_COUNTRIES = _mod_2t4j27.OXYLABS_ASIAN_COUNTRIES;
|
|
22
|
+
exports.getRandomOxylabsBrowserType = _mod_2t4j27.getRandomBrowserType;
|
|
23
|
+
exports.getRandomOxylabsLocale = _mod_2t4j27.getRandomLocale;
|
|
24
|
+
exports.getRandomOxylabsGeoLocation = _mod_2t4j27.getRandomGeoLocation;;
|
|
25
|
+
const _mod_9sy3r0 = require('./scraper.cjs');
|
|
26
|
+
exports.isRestrictedDomain = _mod_9sy3r0.isRestrictedDomain;;
|
|
27
|
+
const _mod_h4brah = require('./addon/decodo/index.cjs');
|
|
28
|
+
exports.Decodo = _mod_h4brah.Decodo;;
|
|
29
|
+
const _mod_0snyum = require('./addon/decodo/options.cjs');
|
|
30
|
+
exports.DECODO_DEVICE_TYPES = _mod_0snyum.DECODO_DEVICE_TYPES;
|
|
31
|
+
exports.DECODO_HEADLESS_MODES = _mod_0snyum.DECODO_HEADLESS_MODES;
|
|
32
|
+
exports.DECODO_COMMON_LOCALES = _mod_0snyum.DECODO_COMMON_LOCALES;
|
|
33
|
+
exports.DECODO_COMMON_COUNTRIES = _mod_0snyum.DECODO_COMMON_COUNTRIES;
|
|
34
|
+
exports.DECODO_EUROPEAN_COUNTRIES = _mod_0snyum.DECODO_EUROPEAN_COUNTRIES;
|
|
35
|
+
exports.DECODO_ASIAN_COUNTRIES = _mod_0snyum.DECODO_ASIAN_COUNTRIES;
|
|
36
|
+
exports.DECODO_US_STATES = _mod_0snyum.DECODO_US_STATES;
|
|
37
|
+
exports.DECODO_COMMON_CITIES = _mod_0snyum.DECODO_COMMON_CITIES;
|
|
38
|
+
exports.getRandomDecodoDeviceType = _mod_0snyum.getRandomDeviceType;
|
|
39
|
+
exports.getRandomDecodoLocale = _mod_0snyum.getRandomLocale;
|
|
40
|
+
exports.getRandomDecodoCountry = _mod_0snyum.getRandomCountry;
|
|
41
|
+
exports.getRandomDecodoCity = _mod_0snyum.getRandomCity;
|
|
42
|
+
exports.generateDecodoSessionId = _mod_0snyum.generateSessionId;;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var e=require("./file-cacher.cjs");exports.FileCacher=e.FileCacher;var r=require("./url-store.cjs");exports.UrlStore=r.UrlStore;var o=require("./result-stream.cjs");exports.ResultStream=o.ResultStream;var t=require("./memory-monitor.cjs");exports.MemoryMonitor=t.MemoryMonitor;var a=require("./health-metrics.cjs");exports.HealthMetrics=a.HealthMetrics;var
|
|
1
|
+
var e=require("./file-cacher.cjs");exports.FileCacher=e.FileCacher;var r=require("./url-store.cjs");exports.UrlStore=r.UrlStore;var o=require("./result-stream.cjs");exports.ResultStream=o.ResultStream;var t=require("./memory-monitor.cjs");exports.MemoryMonitor=t.MemoryMonitor;var a=require("./health-metrics.cjs");exports.HealthMetrics=a.HealthMetrics;var c=require("./capped-map.cjs");exports.CappedMap=c.CappedMap;var d=require("./capped-array.cjs");exports.CappedArray=d.CappedArray;
|
package/dist/crawler.d.ts
CHANGED
|
@@ -1056,6 +1056,11 @@ export interface ProxyManagerBaseConfig {
|
|
|
1056
1056
|
* If not set or enabled: false, proxies are permanently removed when disabled
|
|
1057
1057
|
*/
|
|
1058
1058
|
cooldown?: ProxyCooldownConfig;
|
|
1059
|
+
/**
|
|
1060
|
+
* Shorthand for cooldown duration in milliseconds
|
|
1061
|
+
* Equivalent to: cooldown: { enabled: true, durationMs: cooldownPeriod }
|
|
1062
|
+
*/
|
|
1063
|
+
cooldownPeriod?: number;
|
|
1059
1064
|
/**
|
|
1060
1065
|
* Whether to throw error when no proxy is available
|
|
1061
1066
|
* - true (default): Throw RezoError when no proxies available
|
|
@@ -1073,6 +1078,21 @@ export interface ProxyManagerBaseConfig {
|
|
|
1073
1078
|
* @default 3
|
|
1074
1079
|
*/
|
|
1075
1080
|
maxProxyRetries?: number;
|
|
1081
|
+
/**
|
|
1082
|
+
* Event hooks for proxy lifecycle events
|
|
1083
|
+
* Alternative to setting hooks after construction
|
|
1084
|
+
*/
|
|
1085
|
+
hooks?: {
|
|
1086
|
+
beforeProxySelect?: ((context: BeforeProxySelectContext) => ProxyInfo | void | Promise<ProxyInfo | void>)[];
|
|
1087
|
+
afterProxySelect?: ((context: AfterProxySelectContext) => void | Promise<void>)[];
|
|
1088
|
+
beforeProxyError?: ((context: BeforeProxyErrorContext) => void | Promise<void>)[];
|
|
1089
|
+
afterProxyError?: ((context: AfterProxyErrorContext) => void | Promise<void>)[];
|
|
1090
|
+
beforeProxyDisable?: ((context: BeforeProxyDisableContext) => boolean | void | Promise<boolean | void>)[];
|
|
1091
|
+
afterProxyDisable?: ((context: AfterProxyDisableContext) => void | Promise<void>)[];
|
|
1092
|
+
afterProxyRotate?: ((context: AfterProxyRotateContext) => void | Promise<void>)[];
|
|
1093
|
+
afterProxyEnable?: ((context: AfterProxyEnableContext) => void | Promise<void>)[];
|
|
1094
|
+
onNoProxiesAvailable?: ((context: OnNoProxiesAvailableContext) => void | Promise<void>)[];
|
|
1095
|
+
};
|
|
1076
1096
|
}
|
|
1077
1097
|
/**
|
|
1078
1098
|
* Full proxy manager configuration
|
|
@@ -3076,7 +3096,10 @@ declare class ProxyManager {
|
|
|
3076
3096
|
* Create a new ProxyManager instance
|
|
3077
3097
|
* @param config - Proxy manager configuration
|
|
3078
3098
|
*/
|
|
3079
|
-
constructor(config: ProxyManagerConfig
|
|
3099
|
+
constructor(config: ProxyManagerConfig & {
|
|
3100
|
+
cooldownPeriod?: number;
|
|
3101
|
+
hooks?: Partial<ProxyHooks>;
|
|
3102
|
+
});
|
|
3080
3103
|
/**
|
|
3081
3104
|
* Create initial state for a proxy
|
|
3082
3105
|
*/
|
package/dist/entries/crawler.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const
|
|
2
|
-
exports.Crawler =
|
|
3
|
-
const
|
|
4
|
-
exports.CrawlerOptions =
|
|
1
|
+
const _mod_hi3vdx = require('../crawler/crawler.cjs');
|
|
2
|
+
exports.Crawler = _mod_hi3vdx.Crawler;;
|
|
3
|
+
const _mod_fqhomx = require('../crawler/crawler-options.cjs');
|
|
4
|
+
exports.CrawlerOptions = _mod_fqhomx.CrawlerOptions;;
|
package/dist/index.cjs
CHANGED
|
@@ -1,30 +1,31 @@
|
|
|
1
|
-
const
|
|
2
|
-
exports.Rezo =
|
|
3
|
-
exports.createRezoInstance =
|
|
4
|
-
exports.createDefaultInstance =
|
|
5
|
-
const
|
|
6
|
-
exports.RezoError =
|
|
7
|
-
exports.RezoErrorCode =
|
|
8
|
-
const
|
|
9
|
-
exports.RezoHeaders =
|
|
10
|
-
const
|
|
11
|
-
exports.RezoFormData =
|
|
12
|
-
const
|
|
13
|
-
exports.RezoCookieJar =
|
|
14
|
-
exports.Cookie =
|
|
15
|
-
const
|
|
16
|
-
exports.toCurl =
|
|
17
|
-
exports.fromCurl =
|
|
18
|
-
const
|
|
19
|
-
exports.createDefaultHooks =
|
|
20
|
-
exports.mergeHooks =
|
|
21
|
-
const
|
|
22
|
-
exports.ProxyManager =
|
|
23
|
-
const
|
|
24
|
-
exports.RezoQueue =
|
|
25
|
-
exports.HttpQueue =
|
|
26
|
-
exports.
|
|
27
|
-
exports.
|
|
1
|
+
const _mod_0hv5pr = require('./core/rezo.cjs');
|
|
2
|
+
exports.Rezo = _mod_0hv5pr.Rezo;
|
|
3
|
+
exports.createRezoInstance = _mod_0hv5pr.createRezoInstance;
|
|
4
|
+
exports.createDefaultInstance = _mod_0hv5pr.createDefaultInstance;;
|
|
5
|
+
const _mod_0kszsa = require('./errors/rezo-error.cjs');
|
|
6
|
+
exports.RezoError = _mod_0kszsa.RezoError;
|
|
7
|
+
exports.RezoErrorCode = _mod_0kszsa.RezoErrorCode;;
|
|
8
|
+
const _mod_zuqpjx = require('./utils/headers.cjs');
|
|
9
|
+
exports.RezoHeaders = _mod_zuqpjx.RezoHeaders;;
|
|
10
|
+
const _mod_3se2kn = require('./utils/form-data.cjs');
|
|
11
|
+
exports.RezoFormData = _mod_3se2kn.RezoFormData;;
|
|
12
|
+
const _mod_6mgcjl = require('./utils/cookies.cjs');
|
|
13
|
+
exports.RezoCookieJar = _mod_6mgcjl.RezoCookieJar;
|
|
14
|
+
exports.Cookie = _mod_6mgcjl.Cookie;;
|
|
15
|
+
const _mod_6a0fg6 = require('./utils/curl.cjs');
|
|
16
|
+
exports.toCurl = _mod_6a0fg6.toCurl;
|
|
17
|
+
exports.fromCurl = _mod_6a0fg6.fromCurl;;
|
|
18
|
+
const _mod_srretc = require('./core/hooks.cjs');
|
|
19
|
+
exports.createDefaultHooks = _mod_srretc.createDefaultHooks;
|
|
20
|
+
exports.mergeHooks = _mod_srretc.mergeHooks;;
|
|
21
|
+
const _mod_aaqfxn = require('./proxy/manager.cjs');
|
|
22
|
+
exports.ProxyManager = _mod_aaqfxn.ProxyManager;;
|
|
23
|
+
const _mod_z5zllp = require('./queue/index.cjs');
|
|
24
|
+
exports.RezoQueue = _mod_z5zllp.RezoQueue;
|
|
25
|
+
exports.HttpQueue = _mod_z5zllp.HttpQueue;
|
|
26
|
+
exports.RezoHttpQueue = _mod_z5zllp.RezoHttpQueue;
|
|
27
|
+
exports.Priority = _mod_z5zllp.Priority;
|
|
28
|
+
exports.HttpMethodPriority = _mod_z5zllp.HttpMethodPriority;;
|
|
28
29
|
const { RezoError } = require('./errors/rezo-error.cjs');
|
|
29
30
|
const isRezoError = exports.isRezoError = RezoError.isRezoError;
|
|
30
31
|
const Cancel = exports.Cancel = RezoError;
|
|
@@ -34,9 +35,9 @@ const isCancel = exports.isCancel = (error) => {
|
|
|
34
35
|
};
|
|
35
36
|
const all = exports.all = Promise.all.bind(Promise);
|
|
36
37
|
const spread = exports.spread = (callback) => (array) => callback(...array);
|
|
37
|
-
const
|
|
38
|
-
exports.VERSION =
|
|
39
|
-
exports.PACKAGE_NAME =
|
|
38
|
+
const _mod_ty0pi5 = require('./version.cjs');
|
|
39
|
+
exports.VERSION = _mod_ty0pi5.VERSION;
|
|
40
|
+
exports.PACKAGE_NAME = _mod_ty0pi5.PACKAGE_NAME;;
|
|
40
41
|
const { executeRequest } = require('./adapters/http.cjs');
|
|
41
42
|
const { setGlobalAdapter, createRezoInstance } = require('./core/rezo.cjs');
|
|
42
43
|
setGlobalAdapter(executeRequest);
|