rezo 1.0.132 → 1.0.133
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 +1 -1
- package/dist/adapters/entries/fetch.d.ts +1 -1
- package/dist/adapters/entries/http.d.ts +1 -1
- package/dist/adapters/entries/http2.d.ts +1 -1
- package/dist/adapters/entries/react-native.cjs +6 -6
- package/dist/adapters/entries/react-native.d.ts +1 -1
- package/dist/adapters/entries/xhr.d.ts +1 -1
- package/dist/adapters/index.cjs +6 -6
- package/dist/cache/index.cjs +9 -9
- package/dist/cookies/cookie-jar.cjs +4 -4
- package/dist/cookies/index.cjs +10 -10
- package/dist/crawler/addon/oxylabs/index.cjs +1 -1
- package/dist/crawler/index.cjs +42 -42
- package/dist/crawler/plugin/index.cjs +1 -1
- package/dist/entries/crawler.cjs +6 -6
- package/dist/index.cjs +48 -48
- package/dist/index.d.ts +1 -1
- package/dist/internal/agents/index.cjs +14 -14
- package/dist/platform/browser.d.ts +1 -1
- package/dist/platform/bun.d.ts +1 -1
- package/dist/platform/deno.d.ts +1 -1
- package/dist/platform/node.d.ts +1 -1
- package/dist/platform/react-native.cjs +6 -6
- package/dist/platform/react-native.d.ts +1 -1
- package/dist/platform/worker.d.ts +1 -1
- package/dist/proxy/index.cjs +4 -4
- package/dist/queue/index.cjs +8 -8
- package/dist/responses/universal/index.cjs +11 -11
- package/dist/stealth/index.cjs +17 -17
- package/dist/stealth/profiles/index.cjs +10 -10
- package/dist/version.cjs +1 -1
- package/dist/version.js +1 -1
- package/dist/wget/downloader.cjs +22 -3
- package/dist/wget/downloader.js +22 -3
- package/dist/wget/index.cjs +51 -51
- package/dist/wget/index.d.ts +7 -1
- package/dist/wget/url-filter.cjs +4 -1
- package/dist/wget/url-filter.js +4 -1
- package/package.json +1 -1
|
@@ -6027,7 +6027,7 @@ export interface RezoInstance extends Rezo, RezoCallable {
|
|
|
6027
6027
|
*
|
|
6028
6028
|
* IMPORTANT: Update these values when bumping package version.
|
|
6029
6029
|
*/
|
|
6030
|
-
export declare const VERSION = "1.0.
|
|
6030
|
+
export declare const VERSION = "1.0.133";
|
|
6031
6031
|
/**
|
|
6032
6032
|
* cURL Options Configuration
|
|
6033
6033
|
*
|
|
@@ -6027,7 +6027,7 @@ export interface RezoInstance extends Rezo, RezoCallable {
|
|
|
6027
6027
|
*
|
|
6028
6028
|
* IMPORTANT: Update these values when bumping package version.
|
|
6029
6029
|
*/
|
|
6030
|
-
export declare const VERSION = "1.0.
|
|
6030
|
+
export declare const VERSION = "1.0.133";
|
|
6031
6031
|
export declare const isRezoError: typeof RezoError.isRezoError;
|
|
6032
6032
|
export declare const Cancel: typeof RezoError;
|
|
6033
6033
|
export declare const CancelToken: {
|
|
@@ -6027,7 +6027,7 @@ export interface RezoInstance extends Rezo, RezoCallable {
|
|
|
6027
6027
|
*
|
|
6028
6028
|
* IMPORTANT: Update these values when bumping package version.
|
|
6029
6029
|
*/
|
|
6030
|
-
export declare const VERSION = "1.0.
|
|
6030
|
+
export declare const VERSION = "1.0.133";
|
|
6031
6031
|
/**
|
|
6032
6032
|
* Type guard to check if an error is a RezoError instance.
|
|
6033
6033
|
*/
|
|
@@ -6027,7 +6027,7 @@ export interface RezoInstance extends Rezo, RezoCallable {
|
|
|
6027
6027
|
*
|
|
6028
6028
|
* IMPORTANT: Update these values when bumping package version.
|
|
6029
6029
|
*/
|
|
6030
|
-
export declare const VERSION = "1.0.
|
|
6030
|
+
export declare const VERSION = "1.0.133";
|
|
6031
6031
|
export declare const isRezoError: typeof RezoError.isRezoError;
|
|
6032
6032
|
export declare const Cancel: typeof RezoError;
|
|
6033
6033
|
export declare const CancelToken: {
|
|
@@ -6,12 +6,12 @@ const { RezoFormData } = require('../../utils/form-data.cjs');
|
|
|
6
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
|
-
const
|
|
10
|
-
exports.createFetchStreamTransport =
|
|
11
|
-
exports.createExpoFileSystemAdapter =
|
|
12
|
-
exports.createReactNativeFsAdapter =
|
|
13
|
-
exports.createNetInfoProvider =
|
|
14
|
-
exports.createExpoBackgroundTaskProvider =
|
|
9
|
+
const _mod_6jezic = require('../../platform/react-native-providers.cjs');
|
|
10
|
+
exports.createFetchStreamTransport = _mod_6jezic.createFetchStreamTransport;
|
|
11
|
+
exports.createExpoFileSystemAdapter = _mod_6jezic.createExpoFileSystemAdapter;
|
|
12
|
+
exports.createReactNativeFsAdapter = _mod_6jezic.createReactNativeFsAdapter;
|
|
13
|
+
exports.createNetInfoProvider = _mod_6jezic.createNetInfoProvider;
|
|
14
|
+
exports.createExpoBackgroundTaskProvider = _mod_6jezic.createExpoBackgroundTaskProvider;;
|
|
15
15
|
exports.Rezo = Rezo;
|
|
16
16
|
exports.RezoError = RezoError;
|
|
17
17
|
exports.RezoErrorCode = RezoErrorCode;
|
|
@@ -6027,7 +6027,7 @@ export interface RezoInstance extends Rezo, RezoCallable {
|
|
|
6027
6027
|
*
|
|
6028
6028
|
* IMPORTANT: Update these values when bumping package version.
|
|
6029
6029
|
*/
|
|
6030
|
-
export declare const VERSION = "1.0.
|
|
6030
|
+
export declare const VERSION = "1.0.133";
|
|
6031
6031
|
export interface ExpoFileSystemFileLike {
|
|
6032
6032
|
uri?: string;
|
|
6033
6033
|
size?: number;
|
|
@@ -6027,7 +6027,7 @@ export interface RezoInstance extends Rezo, RezoCallable {
|
|
|
6027
6027
|
*
|
|
6028
6028
|
* IMPORTANT: Update these values when bumping package version.
|
|
6029
6029
|
*/
|
|
6030
|
-
export declare const VERSION = "1.0.
|
|
6030
|
+
export declare const VERSION = "1.0.133";
|
|
6031
6031
|
export declare const isRezoError: typeof RezoError.isRezoError;
|
|
6032
6032
|
export declare const Cancel: typeof RezoError;
|
|
6033
6033
|
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_wl45y9 = require('./picker.cjs');
|
|
2
|
+
exports.detectRuntime = _mod_wl45y9.detectRuntime;
|
|
3
|
+
exports.getAdapterCapabilities = _mod_wl45y9.getAdapterCapabilities;
|
|
4
|
+
exports.buildAdapterContext = _mod_wl45y9.buildAdapterContext;
|
|
5
|
+
exports.getAvailableAdapters = _mod_wl45y9.getAvailableAdapters;
|
|
6
|
+
exports.selectAdapter = _mod_wl45y9.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_pwv10q = require('./lru-cache.cjs');
|
|
2
|
+
exports.LRUCache = _mod_pwv10q.LRUCache;;
|
|
3
|
+
const _mod_r89cab = require('./dns-cache.cjs');
|
|
4
|
+
exports.DNSCache = _mod_r89cab.DNSCache;
|
|
5
|
+
exports.getGlobalDNSCache = _mod_r89cab.getGlobalDNSCache;
|
|
6
|
+
exports.resetGlobalDNSCache = _mod_r89cab.resetGlobalDNSCache;;
|
|
7
|
+
const _mod_vz9afj = require('./response-cache.cjs');
|
|
8
|
+
exports.ResponseCache = _mod_vz9afj.ResponseCache;
|
|
9
|
+
exports.normalizeResponseCacheConfig = _mod_vz9afj.normalizeResponseCacheConfig;;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
const { CookieJar: TouchCookieJar } = require("tough-cookie");
|
|
2
2
|
const { Cookie } = require('./cookie.cjs');
|
|
3
3
|
const { requireNodeModule } = require('../utils/node-runtime.cjs');
|
|
4
|
-
const
|
|
5
|
-
exports.Cookie =
|
|
4
|
+
const _mod_egd39a = require('./cookie.cjs');
|
|
5
|
+
exports.Cookie = _mod_egd39a.Cookie;;
|
|
6
6
|
|
|
7
7
|
class RezoCookieJar extends TouchCookieJar {
|
|
8
8
|
constructor(store, options) {
|
|
@@ -481,7 +481,7 @@ class RezoCookieJar extends TouchCookieJar {
|
|
|
481
481
|
}
|
|
482
482
|
}
|
|
483
483
|
const CookieJar = exports.CookieJar = RezoCookieJar;
|
|
484
|
-
const
|
|
485
|
-
exports.Store =
|
|
484
|
+
const _mod_uokl3t = require("tough-cookie");
|
|
485
|
+
exports.Store = _mod_uokl3t.Store;;
|
|
486
486
|
|
|
487
487
|
exports.RezoCookieJar = RezoCookieJar;
|
package/dist/cookies/index.cjs
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
const
|
|
2
|
-
exports.Cookie =
|
|
3
|
-
exports.RezoCookie =
|
|
4
|
-
const
|
|
5
|
-
exports.RezoCookieStore =
|
|
6
|
-
const
|
|
7
|
-
exports.RezoCookieJar =
|
|
8
|
-
exports.CookieJar =
|
|
9
|
-
const
|
|
10
|
-
exports.Store =
|
|
1
|
+
const _mod_3anom3 = require('./cookie.cjs');
|
|
2
|
+
exports.Cookie = _mod_3anom3.Cookie;
|
|
3
|
+
exports.RezoCookie = _mod_3anom3.RezoCookie;;
|
|
4
|
+
const _mod_p2lai5 = require('./cookie-store.cjs');
|
|
5
|
+
exports.RezoCookieStore = _mod_p2lai5.RezoCookieStore;;
|
|
6
|
+
const _mod_dze7qd = require('./cookie-jar.cjs');
|
|
7
|
+
exports.RezoCookieJar = _mod_dze7qd.RezoCookieJar;
|
|
8
|
+
exports.CookieJar = _mod_dze7qd.CookieJar;;
|
|
9
|
+
const _mod_e0fpg1 = require("tough-cookie");
|
|
10
|
+
exports.Store = _mod_e0fpg1.Store;;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var{Rezo:
|
|
1
|
+
var{Rezo:_}=require("../../../core/rezo.cjs"),a=require("./options.cjs");exports.OXYLABS_BROWSER_TYPES=a.OXYLABS_BROWSER_TYPES;exports.OXYLABS_COMMON_LOCALES=a.OXYLABS_COMMON_LOCALES;exports.OXYLABS_COMMON_GEO_LOCATIONS=a.OXYLABS_COMMON_GEO_LOCATIONS;exports.OXYLABS_US_STATES=a.OXYLABS_US_STATES;exports.OXYLABS_EUROPEAN_COUNTRIES=a.OXYLABS_EUROPEAN_COUNTRIES;exports.OXYLABS_ASIAN_COUNTRIES=a.OXYLABS_ASIAN_COUNTRIES;exports.getRandomBrowserType=a.getRandomBrowserType;exports.getRandomLocale=a.getRandomLocale;exports.getRandomGeoLocation=a.getRandomGeoLocation;var i="https://realtime.oxylabs.io/v1/queries";class d{config;http;authHeader;constructor(s){if(!s.username||!s.password)throw Error("Oxylabs username and password are required");this.config={username:s.username,password:s.password,browserType:s.browserType??"desktop",locale:s.locale??"en-US",geoLocation:s.geoLocation??"",render:s.render??!1,context:s.context??{},timeout:s.timeout??120000},this.http=new _({baseURL:i,timeout:this.config.timeout}),this.authHeader=`Basic ${Buffer.from(`${s.username}:${s.password}`).toString("base64")}`}async scrape(s,e){let t={...this.config,...e},r=this.buildRequestBody(s,t),o=(await this.http.postJson(i,r,{headers:{Authorization:this.authHeader,"Content-Type":"application/json"}})).data;if(o.error)throw Error(`Oxylabs API error: ${o.error}`);if(!o.results||o.results.length===0)throw Error("Oxylabs API returned no results");let n=o.results[0],l=n._response?.cookies||[],h=n._response?.headers||{};return{statusCode:n.status_code,url:n.url,content:n.content,cookies:l,headers:h,jobId:o.job_id||n.job_id,rendered:t.render,geoLocation:t.geoLocation||void 0,locale:t.locale,browserType:t.browserType,raw:o}}async scrapeMany(s,e,t=1000){let r=[];for(let u=0;u<s.length;u++){let o=await this.scrape(s[u],e);if(r.push(o),u<s.length-1&&t>0)await new Promise((n)=>setTimeout(n,t))}return r}buildRequestBody(s,e){let t=[];if(t.push({key:"return_page_cookies",value:!0}),t.push({key:"return_page_headers",value:!0}),e.context)for(let[u,o]of Object.entries(e.context))t.push({key:u,value:o});if(e.headers&&Object.keys(e.headers).length>0)t.push({key:"headers",value:e.headers});if(e.cookies&&e.cookies.length>0)t.push({key:"cookies",value:e.cookies});if(e.session_id)t.push({key:"session_id",value:e.session_id});if(e.http_method)t.push({key:"http_method",value:e.http_method});if(e.base64Body)t.push({key:"content",value:e.base64Body});if(typeof e.follow_redirects==="boolean")t.push({key:"follow_redirects",value:e.follow_redirects});if(e.successful_status_codes&&e.successful_status_codes.length>0)t.push({key:"successful_status_codes",value:e.successful_status_codes});let r={source:"universal",url:s,context:t};if(e.render||e.javascript_rendering)r.render="html";if(e.browserType)r.user_agent_type=e.browserType;if(e.locale)r.locale=e.locale;if(e.geoLocation)r.geo_location=e.geoLocation;if(e.returnAsBase64)r.content_encoding="base64";return r}getConfig(){return{...this.config,password:"***"}}withConfig(s){return new d({...this.config,...s})}async testConnection(){try{return await this.scrape("https://httpbin.org/ip"),!0}catch(s){throw Error(`Oxylabs connection test failed: ${s.message}`)}}}exports.Oxylabs=d;exports.default=d;module.exports=Object.assign(d,exports);
|
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_0d9h80 = require('./crawler.cjs');
|
|
2
|
+
exports.Crawler = _mod_0d9h80.Crawler;;
|
|
3
|
+
const _mod_flsl96 = require('./crawler-options.cjs');
|
|
4
|
+
exports.CrawlerOptions = _mod_flsl96.CrawlerOptions;;
|
|
5
|
+
const _mod_hshb8k = require('./plugin/robots-txt.cjs');
|
|
6
|
+
exports.RobotsTxt = _mod_hshb8k.RobotsTxt;;
|
|
7
|
+
const _mod_qmo1zd = require('./plugin/file-cacher.cjs');
|
|
8
|
+
exports.FileCacher = _mod_qmo1zd.FileCacher;;
|
|
9
|
+
const _mod_lktnzz = require('./plugin/url-store.cjs');
|
|
10
|
+
exports.UrlStore = _mod_lktnzz.UrlStore;;
|
|
11
|
+
const _mod_g62vuv = require('./plugin/navigation-history.cjs');
|
|
12
|
+
exports.NavigationHistory = _mod_g62vuv.NavigationHistory;;
|
|
13
|
+
const _mod_dfvupb = require('./addon/oxylabs/index.cjs');
|
|
14
|
+
exports.Oxylabs = _mod_dfvupb.Oxylabs;;
|
|
15
|
+
const _mod_lffstj = require('./addon/oxylabs/options.cjs');
|
|
16
|
+
exports.OXYLABS_BROWSER_TYPES = _mod_lffstj.OXYLABS_BROWSER_TYPES;
|
|
17
|
+
exports.OXYLABS_COMMON_LOCALES = _mod_lffstj.OXYLABS_COMMON_LOCALES;
|
|
18
|
+
exports.OXYLABS_COMMON_GEO_LOCATIONS = _mod_lffstj.OXYLABS_COMMON_GEO_LOCATIONS;
|
|
19
|
+
exports.OXYLABS_US_STATES = _mod_lffstj.OXYLABS_US_STATES;
|
|
20
|
+
exports.OXYLABS_EUROPEAN_COUNTRIES = _mod_lffstj.OXYLABS_EUROPEAN_COUNTRIES;
|
|
21
|
+
exports.OXYLABS_ASIAN_COUNTRIES = _mod_lffstj.OXYLABS_ASIAN_COUNTRIES;
|
|
22
|
+
exports.getRandomOxylabsBrowserType = _mod_lffstj.getRandomBrowserType;
|
|
23
|
+
exports.getRandomOxylabsLocale = _mod_lffstj.getRandomLocale;
|
|
24
|
+
exports.getRandomOxylabsGeoLocation = _mod_lffstj.getRandomGeoLocation;;
|
|
25
|
+
const _mod_6v3fut = require('./scraper.cjs');
|
|
26
|
+
exports.isRestrictedDomain = _mod_6v3fut.isRestrictedDomain;;
|
|
27
|
+
const _mod_jcv8ev = require('./addon/decodo/index.cjs');
|
|
28
|
+
exports.Decodo = _mod_jcv8ev.Decodo;;
|
|
29
|
+
const _mod_quo7cv = require('./addon/decodo/options.cjs');
|
|
30
|
+
exports.DECODO_DEVICE_TYPES = _mod_quo7cv.DECODO_DEVICE_TYPES;
|
|
31
|
+
exports.DECODO_HEADLESS_MODES = _mod_quo7cv.DECODO_HEADLESS_MODES;
|
|
32
|
+
exports.DECODO_COMMON_LOCALES = _mod_quo7cv.DECODO_COMMON_LOCALES;
|
|
33
|
+
exports.DECODO_COMMON_COUNTRIES = _mod_quo7cv.DECODO_COMMON_COUNTRIES;
|
|
34
|
+
exports.DECODO_EUROPEAN_COUNTRIES = _mod_quo7cv.DECODO_EUROPEAN_COUNTRIES;
|
|
35
|
+
exports.DECODO_ASIAN_COUNTRIES = _mod_quo7cv.DECODO_ASIAN_COUNTRIES;
|
|
36
|
+
exports.DECODO_US_STATES = _mod_quo7cv.DECODO_US_STATES;
|
|
37
|
+
exports.DECODO_COMMON_CITIES = _mod_quo7cv.DECODO_COMMON_CITIES;
|
|
38
|
+
exports.getRandomDecodoDeviceType = _mod_quo7cv.getRandomDeviceType;
|
|
39
|
+
exports.getRandomDecodoLocale = _mod_quo7cv.getRandomLocale;
|
|
40
|
+
exports.getRandomDecodoCountry = _mod_quo7cv.getRandomCountry;
|
|
41
|
+
exports.getRandomDecodoCity = _mod_quo7cv.getRandomCity;
|
|
42
|
+
exports.generateDecodoSessionId = _mod_quo7cv.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 i=require("./capped-map.cjs");exports.CappedMap=i.CappedMap;var d=require("./capped-array.cjs");exports.CappedArray=d.CappedArray;
|
package/dist/entries/crawler.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
const
|
|
2
|
-
exports.Crawler =
|
|
3
|
-
const
|
|
4
|
-
exports.CrawlerOptions =
|
|
5
|
-
const
|
|
6
|
-
exports.isRestrictedDomain =
|
|
1
|
+
const _mod_wm9qc2 = require('../crawler/crawler.cjs');
|
|
2
|
+
exports.Crawler = _mod_wm9qc2.Crawler;;
|
|
3
|
+
const _mod_f6e2gx = require('../crawler/crawler-options.cjs');
|
|
4
|
+
exports.CrawlerOptions = _mod_f6e2gx.CrawlerOptions;;
|
|
5
|
+
const _mod_bbd1z9 = require('../crawler/scraper.cjs');
|
|
6
|
+
exports.isRestrictedDomain = _mod_bbd1z9.isRestrictedDomain;;
|
package/dist/index.cjs
CHANGED
|
@@ -1,48 +1,48 @@
|
|
|
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.CookieJar =
|
|
15
|
-
exports.Cookie =
|
|
16
|
-
exports.Store =
|
|
17
|
-
const
|
|
18
|
-
exports.RezoCookieStore =
|
|
19
|
-
const
|
|
20
|
-
exports.toCurl =
|
|
21
|
-
exports.fromCurl =
|
|
22
|
-
const
|
|
23
|
-
exports.parseLinkHeader =
|
|
24
|
-
const
|
|
25
|
-
exports.RezoUri =
|
|
26
|
-
const
|
|
27
|
-
exports.createDefaultHooks =
|
|
28
|
-
exports.mergeHooks =
|
|
29
|
-
const
|
|
30
|
-
exports.RequestInterceptorManager =
|
|
31
|
-
exports.ResponseInterceptorManager =
|
|
32
|
-
const
|
|
33
|
-
exports.ProxyManager =
|
|
34
|
-
const
|
|
35
|
-
exports.RezoStealth =
|
|
36
|
-
const
|
|
37
|
-
exports.listProfiles =
|
|
38
|
-
exports.getProfile =
|
|
39
|
-
exports.getProfilesByFamily =
|
|
40
|
-
const
|
|
41
|
-
exports.RezoQueue =
|
|
42
|
-
exports.HttpQueue =
|
|
43
|
-
exports.RezoHttpQueue =
|
|
44
|
-
exports.Priority =
|
|
45
|
-
exports.HttpMethodPriority =
|
|
1
|
+
const _mod_5r50lg = require('./core/rezo.cjs');
|
|
2
|
+
exports.Rezo = _mod_5r50lg.Rezo;
|
|
3
|
+
exports.createRezoInstance = _mod_5r50lg.createRezoInstance;
|
|
4
|
+
exports.createDefaultInstance = _mod_5r50lg.createDefaultInstance;;
|
|
5
|
+
const _mod_2h60iq = require('./errors/rezo-error.cjs');
|
|
6
|
+
exports.RezoError = _mod_2h60iq.RezoError;
|
|
7
|
+
exports.RezoErrorCode = _mod_2h60iq.RezoErrorCode;;
|
|
8
|
+
const _mod_zjowb0 = require('./utils/headers.cjs');
|
|
9
|
+
exports.RezoHeaders = _mod_zjowb0.RezoHeaders;;
|
|
10
|
+
const _mod_zjjrhp = require('./utils/form-data.cjs');
|
|
11
|
+
exports.RezoFormData = _mod_zjjrhp.RezoFormData;;
|
|
12
|
+
const _mod_95wtvh = require('./cookies/cookie-jar.cjs');
|
|
13
|
+
exports.RezoCookieJar = _mod_95wtvh.RezoCookieJar;
|
|
14
|
+
exports.CookieJar = _mod_95wtvh.CookieJar;
|
|
15
|
+
exports.Cookie = _mod_95wtvh.Cookie;
|
|
16
|
+
exports.Store = _mod_95wtvh.Store;;
|
|
17
|
+
const _mod_39ty5j = require('./cookies/cookie-store.cjs');
|
|
18
|
+
exports.RezoCookieStore = _mod_39ty5j.RezoCookieStore;;
|
|
19
|
+
const _mod_pnwvmk = require('./utils/curl.cjs');
|
|
20
|
+
exports.toCurl = _mod_pnwvmk.toCurl;
|
|
21
|
+
exports.fromCurl = _mod_pnwvmk.fromCurl;;
|
|
22
|
+
const _mod_7qprnz = require('./utils/link-header.cjs');
|
|
23
|
+
exports.parseLinkHeader = _mod_7qprnz.parseLinkHeader;;
|
|
24
|
+
const _mod_3g2tl2 = require('./utils/uri.cjs');
|
|
25
|
+
exports.RezoUri = _mod_3g2tl2.RezoUri;;
|
|
26
|
+
const _mod_msn7n0 = require('./core/hooks.cjs');
|
|
27
|
+
exports.createDefaultHooks = _mod_msn7n0.createDefaultHooks;
|
|
28
|
+
exports.mergeHooks = _mod_msn7n0.mergeHooks;;
|
|
29
|
+
const _mod_qoopaf = require('./core/interceptor-manager.cjs');
|
|
30
|
+
exports.RequestInterceptorManager = _mod_qoopaf.RequestInterceptorManager;
|
|
31
|
+
exports.ResponseInterceptorManager = _mod_qoopaf.ResponseInterceptorManager;;
|
|
32
|
+
const _mod_oysz24 = require('./proxy/manager.cjs');
|
|
33
|
+
exports.ProxyManager = _mod_oysz24.ProxyManager;;
|
|
34
|
+
const _mod_n7z5kh = require('./stealth/stealth.cjs');
|
|
35
|
+
exports.RezoStealth = _mod_n7z5kh.RezoStealth;;
|
|
36
|
+
const _mod_pcf9pk = require('./stealth/profiles/index.cjs');
|
|
37
|
+
exports.listProfiles = _mod_pcf9pk.listProfiles;
|
|
38
|
+
exports.getProfile = _mod_pcf9pk.getProfile;
|
|
39
|
+
exports.getProfilesByFamily = _mod_pcf9pk.getProfilesByFamily;;
|
|
40
|
+
const _mod_1sfv4p = require('./queue/index.cjs');
|
|
41
|
+
exports.RezoQueue = _mod_1sfv4p.RezoQueue;
|
|
42
|
+
exports.HttpQueue = _mod_1sfv4p.HttpQueue;
|
|
43
|
+
exports.RezoHttpQueue = _mod_1sfv4p.HttpQueue;
|
|
44
|
+
exports.Priority = _mod_1sfv4p.Priority;
|
|
45
|
+
exports.HttpMethodPriority = _mod_1sfv4p.HttpMethodPriority;;
|
|
46
46
|
const { RezoError } = require('./errors/rezo-error.cjs');
|
|
47
47
|
const isRezoError = exports.isRezoError = RezoError.isRezoError;
|
|
48
48
|
const Cancel = exports.Cancel = RezoError;
|
|
@@ -52,9 +52,9 @@ const isCancel = exports.isCancel = (error) => {
|
|
|
52
52
|
};
|
|
53
53
|
const all = exports.all = Promise.all.bind(Promise);
|
|
54
54
|
const spread = exports.spread = (callback) => (array) => callback(...array);
|
|
55
|
-
const
|
|
56
|
-
exports.VERSION =
|
|
57
|
-
exports.PACKAGE_NAME =
|
|
55
|
+
const _mod_dc2wx5 = require('./version.cjs');
|
|
56
|
+
exports.VERSION = _mod_dc2wx5.VERSION;
|
|
57
|
+
exports.PACKAGE_NAME = _mod_dc2wx5.PACKAGE_NAME;;
|
|
58
58
|
const { executeRequest } = require('./adapters/http.cjs');
|
|
59
59
|
const { setGlobalAdapter, createRezoInstance } = require('./core/rezo.cjs');
|
|
60
60
|
setGlobalAdapter(executeRequest);
|
package/dist/index.d.ts
CHANGED
|
@@ -6279,7 +6279,7 @@ export declare function listProfiles(): string[];
|
|
|
6279
6279
|
*
|
|
6280
6280
|
* IMPORTANT: Update these values when bumping package version.
|
|
6281
6281
|
*/
|
|
6282
|
-
export declare const VERSION = "1.0.
|
|
6282
|
+
export declare const VERSION = "1.0.133";
|
|
6283
6283
|
export declare const PACKAGE_NAME = "rezo";
|
|
6284
6284
|
export declare const isRezoError: typeof RezoError.isRezoError;
|
|
6285
6285
|
export declare const Cancel: typeof RezoError;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
const
|
|
2
|
-
exports.Agent =
|
|
3
|
-
const
|
|
4
|
-
exports.HttpProxyAgent =
|
|
5
|
-
const
|
|
6
|
-
exports.HttpsProxyAgent =
|
|
7
|
-
const
|
|
8
|
-
exports.SocksProxyAgent =
|
|
9
|
-
const
|
|
10
|
-
exports.SocksClient =
|
|
11
|
-
const
|
|
12
|
-
exports.bunHttp =
|
|
13
|
-
exports.isBunRuntime =
|
|
14
|
-
exports.isBunSocksRequest =
|
|
1
|
+
const _mod_am0y4t = require('./base.cjs');
|
|
2
|
+
exports.Agent = _mod_am0y4t.Agent;;
|
|
3
|
+
const _mod_hn327t = require('./http-proxy.cjs');
|
|
4
|
+
exports.HttpProxyAgent = _mod_hn327t.HttpProxyAgent;;
|
|
5
|
+
const _mod_rf1os6 = require('./https-proxy.cjs');
|
|
6
|
+
exports.HttpsProxyAgent = _mod_rf1os6.HttpsProxyAgent;;
|
|
7
|
+
const _mod_trm7bq = require('./socks-proxy.cjs');
|
|
8
|
+
exports.SocksProxyAgent = _mod_trm7bq.SocksProxyAgent;;
|
|
9
|
+
const _mod_0vuln4 = require('./socks-client.cjs');
|
|
10
|
+
exports.SocksClient = _mod_0vuln4.SocksClient;;
|
|
11
|
+
const _mod_n2lb6g = require('./bun-socks-http.cjs');
|
|
12
|
+
exports.bunHttp = _mod_n2lb6g.bunHttp;
|
|
13
|
+
exports.isBunRuntime = _mod_n2lb6g.isBunRuntime;
|
|
14
|
+
exports.isBunSocksRequest = _mod_n2lb6g.isBunSocksRequest;;
|
|
@@ -6027,7 +6027,7 @@ export interface RezoInstance extends Rezo, RezoCallable {
|
|
|
6027
6027
|
*
|
|
6028
6028
|
* IMPORTANT: Update these values when bumping package version.
|
|
6029
6029
|
*/
|
|
6030
|
-
export declare const VERSION = "1.0.
|
|
6030
|
+
export declare const VERSION = "1.0.133";
|
|
6031
6031
|
export declare const isRezoError: typeof RezoError.isRezoError;
|
|
6032
6032
|
export declare const Cancel: typeof RezoError;
|
|
6033
6033
|
export declare const CancelToken: {
|
package/dist/platform/bun.d.ts
CHANGED
|
@@ -6027,7 +6027,7 @@ export interface RezoInstance extends Rezo, RezoCallable {
|
|
|
6027
6027
|
*
|
|
6028
6028
|
* IMPORTANT: Update these values when bumping package version.
|
|
6029
6029
|
*/
|
|
6030
|
-
export declare const VERSION = "1.0.
|
|
6030
|
+
export declare const VERSION = "1.0.133";
|
|
6031
6031
|
export declare const isRezoError: typeof RezoError.isRezoError;
|
|
6032
6032
|
export declare const Cancel: typeof RezoError;
|
|
6033
6033
|
export declare const CancelToken: {
|
package/dist/platform/deno.d.ts
CHANGED
|
@@ -6027,7 +6027,7 @@ export interface RezoInstance extends Rezo, RezoCallable {
|
|
|
6027
6027
|
*
|
|
6028
6028
|
* IMPORTANT: Update these values when bumping package version.
|
|
6029
6029
|
*/
|
|
6030
|
-
export declare const VERSION = "1.0.
|
|
6030
|
+
export declare const VERSION = "1.0.133";
|
|
6031
6031
|
export declare const isRezoError: typeof RezoError.isRezoError;
|
|
6032
6032
|
export declare const Cancel: typeof RezoError;
|
|
6033
6033
|
export declare const CancelToken: {
|
package/dist/platform/node.d.ts
CHANGED
|
@@ -6027,7 +6027,7 @@ export interface RezoInstance extends Rezo, RezoCallable {
|
|
|
6027
6027
|
*
|
|
6028
6028
|
* IMPORTANT: Update these values when bumping package version.
|
|
6029
6029
|
*/
|
|
6030
|
-
export declare const VERSION = "1.0.
|
|
6030
|
+
export declare const VERSION = "1.0.133";
|
|
6031
6031
|
export declare const isRezoError: typeof RezoError.isRezoError;
|
|
6032
6032
|
export declare const Cancel: typeof RezoError;
|
|
6033
6033
|
export declare const CancelToken: {
|
|
@@ -6,12 +6,12 @@ const { RezoFormData } = require('../utils/form-data.cjs');
|
|
|
6
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
|
-
const
|
|
10
|
-
exports.createFetchStreamTransport =
|
|
11
|
-
exports.createExpoFileSystemAdapter =
|
|
12
|
-
exports.createReactNativeFsAdapter =
|
|
13
|
-
exports.createNetInfoProvider =
|
|
14
|
-
exports.createExpoBackgroundTaskProvider =
|
|
9
|
+
const _mod_8jbe03 = require('./react-native-providers.cjs');
|
|
10
|
+
exports.createFetchStreamTransport = _mod_8jbe03.createFetchStreamTransport;
|
|
11
|
+
exports.createExpoFileSystemAdapter = _mod_8jbe03.createExpoFileSystemAdapter;
|
|
12
|
+
exports.createReactNativeFsAdapter = _mod_8jbe03.createReactNativeFsAdapter;
|
|
13
|
+
exports.createNetInfoProvider = _mod_8jbe03.createNetInfoProvider;
|
|
14
|
+
exports.createExpoBackgroundTaskProvider = _mod_8jbe03.createExpoBackgroundTaskProvider;;
|
|
15
15
|
exports.Rezo = Rezo;
|
|
16
16
|
exports.RezoError = RezoError;
|
|
17
17
|
exports.RezoErrorCode = RezoErrorCode;
|
|
@@ -6027,7 +6027,7 @@ export interface RezoInstance extends Rezo, RezoCallable {
|
|
|
6027
6027
|
*
|
|
6028
6028
|
* IMPORTANT: Update these values when bumping package version.
|
|
6029
6029
|
*/
|
|
6030
|
-
export declare const VERSION = "1.0.
|
|
6030
|
+
export declare const VERSION = "1.0.133";
|
|
6031
6031
|
export interface ExpoFileSystemFileLike {
|
|
6032
6032
|
uri?: string;
|
|
6033
6033
|
size?: number;
|
|
@@ -6027,7 +6027,7 @@ export interface RezoInstance extends Rezo, RezoCallable {
|
|
|
6027
6027
|
*
|
|
6028
6028
|
* IMPORTANT: Update these values when bumping package version.
|
|
6029
6029
|
*/
|
|
6030
|
-
export declare const VERSION = "1.0.
|
|
6030
|
+
export declare const VERSION = "1.0.133";
|
|
6031
6031
|
export declare const isRezoError: typeof RezoError.isRezoError;
|
|
6032
6032
|
export declare const Cancel: typeof RezoError;
|
|
6033
6033
|
export declare const CancelToken: {
|
package/dist/proxy/index.cjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
const { Agent, HttpProxyAgent, HttpsProxyAgent, SocksProxyAgent } = require('../internal/agents/index.cjs');
|
|
2
2
|
const { parseProxyString } = require('./parse.cjs');
|
|
3
|
-
const
|
|
4
|
-
exports.ProxyManager =
|
|
5
|
-
const
|
|
6
|
-
exports.parseProxyString =
|
|
3
|
+
const _mod_jhbmnd = require('./manager.cjs');
|
|
4
|
+
exports.ProxyManager = _mod_jhbmnd.ProxyManager;;
|
|
5
|
+
const _mod_lsyccz = require('./parse.cjs');
|
|
6
|
+
exports.parseProxyString = _mod_lsyccz.parseProxyString;;
|
|
7
7
|
function createOptions(uri, opts) {
|
|
8
8
|
if (uri instanceof URL || typeof uri === "string") {
|
|
9
9
|
return {
|
package/dist/queue/index.cjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
const
|
|
2
|
-
exports.RezoQueue =
|
|
3
|
-
const
|
|
4
|
-
exports.HttpQueue =
|
|
5
|
-
exports.extractDomain =
|
|
6
|
-
const
|
|
7
|
-
exports.Priority =
|
|
8
|
-
exports.HttpMethodPriority =
|
|
1
|
+
const _mod_okla9p = require('./queue.cjs');
|
|
2
|
+
exports.RezoQueue = _mod_okla9p.RezoQueue;;
|
|
3
|
+
const _mod_nczcwi = require('./http-queue.cjs');
|
|
4
|
+
exports.HttpQueue = _mod_nczcwi.HttpQueue;
|
|
5
|
+
exports.extractDomain = _mod_nczcwi.extractDomain;;
|
|
6
|
+
const _mod_aafvzw = require('./types.cjs');
|
|
7
|
+
exports.Priority = _mod_aafvzw.Priority;
|
|
8
|
+
exports.HttpMethodPriority = _mod_aafvzw.HttpMethodPriority;;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
const
|
|
2
|
-
exports.UniversalEventEmitter =
|
|
3
|
-
const
|
|
4
|
-
exports.UniversalStreamResponse =
|
|
5
|
-
exports.StreamResponse =
|
|
6
|
-
const
|
|
7
|
-
exports.UniversalDownloadResponse =
|
|
8
|
-
exports.DownloadResponse =
|
|
9
|
-
const
|
|
10
|
-
exports.UniversalUploadResponse =
|
|
11
|
-
exports.UploadResponse =
|
|
1
|
+
const _mod_7rnez5 = require('./event-emitter.cjs');
|
|
2
|
+
exports.UniversalEventEmitter = _mod_7rnez5.UniversalEventEmitter;;
|
|
3
|
+
const _mod_1f58bm = require('./stream.cjs');
|
|
4
|
+
exports.UniversalStreamResponse = _mod_1f58bm.UniversalStreamResponse;
|
|
5
|
+
exports.StreamResponse = _mod_1f58bm.StreamResponse;;
|
|
6
|
+
const _mod_u23280 = require('./download.cjs');
|
|
7
|
+
exports.UniversalDownloadResponse = _mod_u23280.UniversalDownloadResponse;
|
|
8
|
+
exports.DownloadResponse = _mod_u23280.DownloadResponse;;
|
|
9
|
+
const _mod_lkphan = require('./upload.cjs');
|
|
10
|
+
exports.UniversalUploadResponse = _mod_lkphan.UniversalUploadResponse;
|
|
11
|
+
exports.UploadResponse = _mod_lkphan.UploadResponse;;
|
package/dist/stealth/index.cjs
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
const
|
|
2
|
-
exports.RezoStealth =
|
|
3
|
-
const
|
|
4
|
-
exports.createSecureContext =
|
|
5
|
-
exports.buildTlsOptions =
|
|
6
|
-
const
|
|
7
|
-
exports.resolveProfile =
|
|
8
|
-
exports.detectProfileFromUserAgent =
|
|
9
|
-
const
|
|
10
|
-
exports.getProfile =
|
|
11
|
-
exports.getProfilesByFamily =
|
|
12
|
-
exports.getProfilesByDevice =
|
|
13
|
-
exports.getRandomProfile =
|
|
14
|
-
exports.getRandomProfileByFamily =
|
|
15
|
-
exports.listProfiles =
|
|
16
|
-
exports.listProfilesByFamily =
|
|
17
|
-
exports.PROFILE_REGISTRY =
|
|
1
|
+
const _mod_k0xjnw = require('./stealth.cjs');
|
|
2
|
+
exports.RezoStealth = _mod_k0xjnw.RezoStealth;;
|
|
3
|
+
const _mod_l4pmuc = require('./tls-fingerprint.cjs');
|
|
4
|
+
exports.createSecureContext = _mod_l4pmuc.createSecureContext;
|
|
5
|
+
exports.buildTlsOptions = _mod_l4pmuc.buildTlsOptions;;
|
|
6
|
+
const _mod_bie623 = require('./resolver.cjs');
|
|
7
|
+
exports.resolveProfile = _mod_bie623.resolveProfile;
|
|
8
|
+
exports.detectProfileFromUserAgent = _mod_bie623.detectProfileFromUserAgent;;
|
|
9
|
+
const _mod_65utbx = require('./profiles/index.cjs');
|
|
10
|
+
exports.getProfile = _mod_65utbx.getProfile;
|
|
11
|
+
exports.getProfilesByFamily = _mod_65utbx.getProfilesByFamily;
|
|
12
|
+
exports.getProfilesByDevice = _mod_65utbx.getProfilesByDevice;
|
|
13
|
+
exports.getRandomProfile = _mod_65utbx.getRandomProfile;
|
|
14
|
+
exports.getRandomProfileByFamily = _mod_65utbx.getRandomProfileByFamily;
|
|
15
|
+
exports.listProfiles = _mod_65utbx.listProfiles;
|
|
16
|
+
exports.listProfilesByFamily = _mod_65utbx.listProfilesByFamily;
|
|
17
|
+
exports.PROFILE_REGISTRY = _mod_65utbx.PROFILE_REGISTRY;;
|
|
@@ -43,16 +43,16 @@ function getRandomProfileByFamily(family) {
|
|
|
43
43
|
throw new Error(`No profiles found for family: ${family}`);
|
|
44
44
|
return profiles[Math.floor(Math.random() * profiles.length)];
|
|
45
45
|
}
|
|
46
|
-
const
|
|
47
|
-
exports.expandPseudoOrder =
|
|
48
|
-
const
|
|
49
|
-
exports.CHROME_PROFILES =
|
|
50
|
-
const
|
|
51
|
-
exports.FIREFOX_PROFILES =
|
|
52
|
-
const
|
|
53
|
-
exports.SAFARI_PROFILES =
|
|
54
|
-
const
|
|
55
|
-
exports.EDGE_PROFILES =
|
|
46
|
+
const _mod_dftgvh = require('./constants.cjs');
|
|
47
|
+
exports.expandPseudoOrder = _mod_dftgvh.expandPseudoOrder;;
|
|
48
|
+
const _mod_rb00vx = require('./chrome-profiles.cjs');
|
|
49
|
+
exports.CHROME_PROFILES = _mod_rb00vx.CHROME_PROFILES;;
|
|
50
|
+
const _mod_7crtxb = require('./firefox-profiles.cjs');
|
|
51
|
+
exports.FIREFOX_PROFILES = _mod_7crtxb.FIREFOX_PROFILES;;
|
|
52
|
+
const _mod_cx670y = require('./safari-profiles.cjs');
|
|
53
|
+
exports.SAFARI_PROFILES = _mod_cx670y.SAFARI_PROFILES;;
|
|
54
|
+
const _mod_nj74ws = require('./edge-profiles.cjs');
|
|
55
|
+
exports.EDGE_PROFILES = _mod_nj74ws.EDGE_PROFILES;;
|
|
56
56
|
|
|
57
57
|
exports.getProfile = getProfile;
|
|
58
58
|
exports.getProfilesByFamily = getProfilesByFamily;
|
package/dist/version.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const VERSION = exports.VERSION = "1.0.
|
|
1
|
+
const VERSION = exports.VERSION = "1.0.133";
|
|
2
2
|
const PACKAGE_NAME = exports.PACKAGE_NAME = "rezo";
|
package/dist/version.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export const VERSION = "1.0.
|
|
1
|
+
export const VERSION = "1.0.133";
|
|
2
2
|
export const PACKAGE_NAME = "rezo";
|
package/dist/wget/downloader.cjs
CHANGED
|
@@ -149,7 +149,13 @@ class Downloader {
|
|
|
149
149
|
this.debug(` Proxy: ${proxy.protocol}://${proxy.host}:${proxy.port}`);
|
|
150
150
|
}
|
|
151
151
|
}
|
|
152
|
-
|
|
152
|
+
const normalizedSeeds = [];
|
|
153
|
+
for (const raw of urlArray) {
|
|
154
|
+
const n = this.normalizeUrl(raw);
|
|
155
|
+
if (n)
|
|
156
|
+
normalizedSeeds.push(n);
|
|
157
|
+
}
|
|
158
|
+
this.seedUrls = normalizedSeeds.length > 0 ? normalizedSeeds : urlArray.slice();
|
|
153
159
|
if (this.options.cache !== false) {
|
|
154
160
|
const baseUrl = urlArray[0];
|
|
155
161
|
this.cache = new DownloadCache(this.options.outputDir || ".", baseUrl);
|
|
@@ -177,7 +183,7 @@ class Downloader {
|
|
|
177
183
|
}
|
|
178
184
|
}
|
|
179
185
|
}
|
|
180
|
-
for (const url of
|
|
186
|
+
for (const url of this.seedUrls) {
|
|
181
187
|
this.urlFilter.addStartUrl(url);
|
|
182
188
|
}
|
|
183
189
|
if (this.options.mirror) {
|
|
@@ -683,6 +689,8 @@ class Downloader {
|
|
|
683
689
|
}
|
|
684
690
|
normalizeUrl(url) {
|
|
685
691
|
if (url.startsWith("./") || url.startsWith("../") || /^[A-Za-z]:[\\/]/.test(url) || url.startsWith("/") && !url.startsWith("//")) {
|
|
692
|
+
if (!isSupportedLocalExtension(url))
|
|
693
|
+
return null;
|
|
686
694
|
try {
|
|
687
695
|
return pathToFileURL(resolvePath(url)).href;
|
|
688
696
|
} catch {
|
|
@@ -691,7 +699,10 @@ class Downloader {
|
|
|
691
699
|
}
|
|
692
700
|
try {
|
|
693
701
|
const parsed = new URL(url);
|
|
694
|
-
if (parsed.protocol
|
|
702
|
+
if (parsed.protocol === "file:") {
|
|
703
|
+
return isSupportedLocalExtension(parsed.pathname) ? parsed.href : null;
|
|
704
|
+
}
|
|
705
|
+
if (parsed.protocol !== "http:" && parsed.protocol !== "https:") {
|
|
695
706
|
return null;
|
|
696
707
|
}
|
|
697
708
|
return parsed.href;
|
|
@@ -876,6 +887,14 @@ class Downloader {
|
|
|
876
887
|
}
|
|
877
888
|
}
|
|
878
889
|
}
|
|
890
|
+
function isSupportedLocalExtension(pathOrUrl) {
|
|
891
|
+
const cleanPath = pathOrUrl.split(/[?#]/, 1)[0];
|
|
892
|
+
const dot = cleanPath.lastIndexOf(".");
|
|
893
|
+
if (dot < 0)
|
|
894
|
+
return false;
|
|
895
|
+
const ext = cleanPath.slice(dot).toLowerCase();
|
|
896
|
+
return ext === ".html" || ext === ".htm" || ext === ".xhtml" || ext === ".xml" || ext === ".css";
|
|
897
|
+
}
|
|
879
898
|
function inferMimeFromPath(path) {
|
|
880
899
|
const ext = path.slice(path.lastIndexOf(".")).toLowerCase();
|
|
881
900
|
const map = {
|
package/dist/wget/downloader.js
CHANGED
|
@@ -149,7 +149,13 @@ export class Downloader {
|
|
|
149
149
|
this.debug(` Proxy: ${proxy.protocol}://${proxy.host}:${proxy.port}`);
|
|
150
150
|
}
|
|
151
151
|
}
|
|
152
|
-
|
|
152
|
+
const normalizedSeeds = [];
|
|
153
|
+
for (const raw of urlArray) {
|
|
154
|
+
const n = this.normalizeUrl(raw);
|
|
155
|
+
if (n)
|
|
156
|
+
normalizedSeeds.push(n);
|
|
157
|
+
}
|
|
158
|
+
this.seedUrls = normalizedSeeds.length > 0 ? normalizedSeeds : urlArray.slice();
|
|
153
159
|
if (this.options.cache !== false) {
|
|
154
160
|
const baseUrl = urlArray[0];
|
|
155
161
|
this.cache = new DownloadCache(this.options.outputDir || ".", baseUrl);
|
|
@@ -177,7 +183,7 @@ export class Downloader {
|
|
|
177
183
|
}
|
|
178
184
|
}
|
|
179
185
|
}
|
|
180
|
-
for (const url of
|
|
186
|
+
for (const url of this.seedUrls) {
|
|
181
187
|
this.urlFilter.addStartUrl(url);
|
|
182
188
|
}
|
|
183
189
|
if (this.options.mirror) {
|
|
@@ -683,6 +689,8 @@ export class Downloader {
|
|
|
683
689
|
}
|
|
684
690
|
normalizeUrl(url) {
|
|
685
691
|
if (url.startsWith("./") || url.startsWith("../") || /^[A-Za-z]:[\\/]/.test(url) || url.startsWith("/") && !url.startsWith("//")) {
|
|
692
|
+
if (!isSupportedLocalExtension(url))
|
|
693
|
+
return null;
|
|
686
694
|
try {
|
|
687
695
|
return pathToFileURL(resolvePath(url)).href;
|
|
688
696
|
} catch {
|
|
@@ -691,7 +699,10 @@ export class Downloader {
|
|
|
691
699
|
}
|
|
692
700
|
try {
|
|
693
701
|
const parsed = new URL(url);
|
|
694
|
-
if (parsed.protocol
|
|
702
|
+
if (parsed.protocol === "file:") {
|
|
703
|
+
return isSupportedLocalExtension(parsed.pathname) ? parsed.href : null;
|
|
704
|
+
}
|
|
705
|
+
if (parsed.protocol !== "http:" && parsed.protocol !== "https:") {
|
|
695
706
|
return null;
|
|
696
707
|
}
|
|
697
708
|
return parsed.href;
|
|
@@ -876,6 +887,14 @@ export class Downloader {
|
|
|
876
887
|
}
|
|
877
888
|
}
|
|
878
889
|
}
|
|
890
|
+
function isSupportedLocalExtension(pathOrUrl) {
|
|
891
|
+
const cleanPath = pathOrUrl.split(/[?#]/, 1)[0];
|
|
892
|
+
const dot = cleanPath.lastIndexOf(".");
|
|
893
|
+
if (dot < 0)
|
|
894
|
+
return false;
|
|
895
|
+
const ext = cleanPath.slice(dot).toLowerCase();
|
|
896
|
+
return ext === ".html" || ext === ".htm" || ext === ".xhtml" || ext === ".xml" || ext === ".css";
|
|
897
|
+
}
|
|
879
898
|
function inferMimeFromPath(path) {
|
|
880
899
|
const ext = path.slice(path.lastIndexOf(".")).toLowerCase();
|
|
881
900
|
const map = {
|
package/dist/wget/index.cjs
CHANGED
|
@@ -1,54 +1,54 @@
|
|
|
1
|
-
const
|
|
2
|
-
exports.WgetError =
|
|
3
|
-
const
|
|
4
|
-
exports.AssetExtractor =
|
|
5
|
-
const
|
|
6
|
-
exports.UrlFilter =
|
|
7
|
-
const
|
|
8
|
-
exports.FileWriter =
|
|
9
|
-
const
|
|
10
|
-
exports.RobotsHandler =
|
|
11
|
-
const
|
|
12
|
-
exports.ResumeHandler =
|
|
13
|
-
const
|
|
14
|
-
exports.ProgressReporter =
|
|
15
|
-
exports.ProgressTracker =
|
|
16
|
-
exports.parseSize =
|
|
17
|
-
const
|
|
18
|
-
exports.LinkConverter =
|
|
19
|
-
const
|
|
20
|
-
exports.StyleExtractor =
|
|
21
|
-
const
|
|
22
|
-
exports.Downloader =
|
|
23
|
-
const
|
|
24
|
-
exports.AssetOrganizer =
|
|
25
|
-
exports.DEFAULT_ASSET_FOLDERS =
|
|
26
|
-
const
|
|
27
|
-
exports.DownloadCache =
|
|
28
|
-
const
|
|
29
|
-
exports.EXECUTABLE_EXTENSIONS =
|
|
30
|
-
exports.ARCHIVE_EXTENSIONS =
|
|
31
|
-
exports.DOCUMENT_EXTENSIONS =
|
|
32
|
-
exports.IMAGE_EXTENSIONS =
|
|
33
|
-
exports.VIDEO_EXTENSIONS =
|
|
34
|
-
exports.AUDIO_EXTENSIONS =
|
|
35
|
-
exports.FONT_EXTENSIONS =
|
|
36
|
-
exports.WEB_ASSET_EXTENSIONS =
|
|
37
|
-
exports.DATA_EXTENSIONS =
|
|
38
|
-
exports.EXECUTABLE_MIME_TYPES =
|
|
39
|
-
exports.ARCHIVE_MIME_TYPES =
|
|
40
|
-
exports.DOCUMENT_MIME_TYPES =
|
|
41
|
-
exports.IMAGE_MIME_TYPES =
|
|
42
|
-
exports.VIDEO_MIME_TYPES =
|
|
43
|
-
exports.AUDIO_MIME_TYPES =
|
|
44
|
-
exports.FONT_MIME_TYPES =
|
|
45
|
-
exports.WEB_ASSET_MIME_TYPES =
|
|
46
|
-
exports.DATA_MIME_TYPES =
|
|
47
|
-
exports.SAFE_WEB_PRESET =
|
|
48
|
-
exports.DOCUMENTS_ONLY_PRESET =
|
|
49
|
-
exports.NO_MEDIA_PRESET =
|
|
50
|
-
exports.MINIMAL_MIRROR_PRESET =
|
|
51
|
-
exports.TEXT_ONLY_PRESET =
|
|
1
|
+
const _mod_dvjzpx = require('./types.cjs');
|
|
2
|
+
exports.WgetError = _mod_dvjzpx.WgetError;;
|
|
3
|
+
const _mod_3hbik9 = require('./asset-extractor.cjs');
|
|
4
|
+
exports.AssetExtractor = _mod_3hbik9.AssetExtractor;;
|
|
5
|
+
const _mod_6lt54e = require('./url-filter.cjs');
|
|
6
|
+
exports.UrlFilter = _mod_6lt54e.UrlFilter;;
|
|
7
|
+
const _mod_xxh5y6 = require('./file-writer.cjs');
|
|
8
|
+
exports.FileWriter = _mod_xxh5y6.FileWriter;;
|
|
9
|
+
const _mod_budpdl = require('./robots.cjs');
|
|
10
|
+
exports.RobotsHandler = _mod_budpdl.RobotsHandler;;
|
|
11
|
+
const _mod_jlo646 = require('./resume.cjs');
|
|
12
|
+
exports.ResumeHandler = _mod_jlo646.ResumeHandler;;
|
|
13
|
+
const _mod_l113d2 = require('./progress.cjs');
|
|
14
|
+
exports.ProgressReporter = _mod_l113d2.ProgressReporter;
|
|
15
|
+
exports.ProgressTracker = _mod_l113d2.ProgressTracker;
|
|
16
|
+
exports.parseSize = _mod_l113d2.parseSize;;
|
|
17
|
+
const _mod_8eqn0l = require('./link-converter.cjs');
|
|
18
|
+
exports.LinkConverter = _mod_8eqn0l.LinkConverter;;
|
|
19
|
+
const _mod_o7culm = require('./style-extractor.cjs');
|
|
20
|
+
exports.StyleExtractor = _mod_o7culm.StyleExtractor;;
|
|
21
|
+
const _mod_ui490l = require('./downloader.cjs');
|
|
22
|
+
exports.Downloader = _mod_ui490l.Downloader;;
|
|
23
|
+
const _mod_u8735q = require('./asset-organizer.cjs');
|
|
24
|
+
exports.AssetOrganizer = _mod_u8735q.AssetOrganizer;
|
|
25
|
+
exports.DEFAULT_ASSET_FOLDERS = _mod_u8735q.DEFAULT_ASSET_FOLDERS;;
|
|
26
|
+
const _mod_eylyo7 = require('./download-cache.cjs');
|
|
27
|
+
exports.DownloadCache = _mod_eylyo7.DownloadCache;;
|
|
28
|
+
const _mod_2akfm0 = require('./filter-lists.cjs');
|
|
29
|
+
exports.EXECUTABLE_EXTENSIONS = _mod_2akfm0.EXECUTABLE_EXTENSIONS;
|
|
30
|
+
exports.ARCHIVE_EXTENSIONS = _mod_2akfm0.ARCHIVE_EXTENSIONS;
|
|
31
|
+
exports.DOCUMENT_EXTENSIONS = _mod_2akfm0.DOCUMENT_EXTENSIONS;
|
|
32
|
+
exports.IMAGE_EXTENSIONS = _mod_2akfm0.IMAGE_EXTENSIONS;
|
|
33
|
+
exports.VIDEO_EXTENSIONS = _mod_2akfm0.VIDEO_EXTENSIONS;
|
|
34
|
+
exports.AUDIO_EXTENSIONS = _mod_2akfm0.AUDIO_EXTENSIONS;
|
|
35
|
+
exports.FONT_EXTENSIONS = _mod_2akfm0.FONT_EXTENSIONS;
|
|
36
|
+
exports.WEB_ASSET_EXTENSIONS = _mod_2akfm0.WEB_ASSET_EXTENSIONS;
|
|
37
|
+
exports.DATA_EXTENSIONS = _mod_2akfm0.DATA_EXTENSIONS;
|
|
38
|
+
exports.EXECUTABLE_MIME_TYPES = _mod_2akfm0.EXECUTABLE_MIME_TYPES;
|
|
39
|
+
exports.ARCHIVE_MIME_TYPES = _mod_2akfm0.ARCHIVE_MIME_TYPES;
|
|
40
|
+
exports.DOCUMENT_MIME_TYPES = _mod_2akfm0.DOCUMENT_MIME_TYPES;
|
|
41
|
+
exports.IMAGE_MIME_TYPES = _mod_2akfm0.IMAGE_MIME_TYPES;
|
|
42
|
+
exports.VIDEO_MIME_TYPES = _mod_2akfm0.VIDEO_MIME_TYPES;
|
|
43
|
+
exports.AUDIO_MIME_TYPES = _mod_2akfm0.AUDIO_MIME_TYPES;
|
|
44
|
+
exports.FONT_MIME_TYPES = _mod_2akfm0.FONT_MIME_TYPES;
|
|
45
|
+
exports.WEB_ASSET_MIME_TYPES = _mod_2akfm0.WEB_ASSET_MIME_TYPES;
|
|
46
|
+
exports.DATA_MIME_TYPES = _mod_2akfm0.DATA_MIME_TYPES;
|
|
47
|
+
exports.SAFE_WEB_PRESET = _mod_2akfm0.SAFE_WEB_PRESET;
|
|
48
|
+
exports.DOCUMENTS_ONLY_PRESET = _mod_2akfm0.DOCUMENTS_ONLY_PRESET;
|
|
49
|
+
exports.NO_MEDIA_PRESET = _mod_2akfm0.NO_MEDIA_PRESET;
|
|
50
|
+
exports.MINIMAL_MIRROR_PRESET = _mod_2akfm0.MINIMAL_MIRROR_PRESET;
|
|
51
|
+
exports.TEXT_ONLY_PRESET = _mod_2akfm0.TEXT_ONLY_PRESET;;
|
|
52
52
|
const { Downloader } = require('./downloader.cjs');
|
|
53
53
|
const rezo = require('../index.cjs');
|
|
54
54
|
const { promises: fs } = require("node:fs");
|
package/dist/wget/index.d.ts
CHANGED
|
@@ -9056,8 +9056,14 @@ export declare class Downloader {
|
|
|
9056
9056
|
* Accepts http://, https://, and file://. Plain paths ("./foo.html", "/abs/x.html")
|
|
9057
9057
|
* are auto-converted to file:// URLs so users can seed local documents.
|
|
9058
9058
|
*
|
|
9059
|
+
* Local-file support is restricted to HTML / XHTML / XML / CSS — those are
|
|
9060
|
+
* the only formats where "look inside for remote assets and download them"
|
|
9061
|
+
* makes sense. Other local files (images, PDFs, binaries) are rejected so
|
|
9062
|
+
* relative references inside an HTML file don't silently succeed on bogus
|
|
9063
|
+
* local paths.
|
|
9064
|
+
*
|
|
9059
9065
|
* @param url - URL or path to normalize
|
|
9060
|
-
* @returns Normalized URL or null if invalid
|
|
9066
|
+
* @returns Normalized URL or null if invalid / unsupported local type
|
|
9061
9067
|
*/
|
|
9062
9068
|
private normalizeUrl;
|
|
9063
9069
|
/**
|
package/dist/wget/url-filter.cjs
CHANGED
|
@@ -74,7 +74,7 @@ class UrlFilter {
|
|
|
74
74
|
};
|
|
75
75
|
}
|
|
76
76
|
if (parsed.protocol !== "http:" && parsed.protocol !== "https:") {
|
|
77
|
-
if (parsed.protocol === "ftp:" && this.options.followFTP) {} else {
|
|
77
|
+
if (parsed.protocol === "file:") {} else if (parsed.protocol === "ftp:" && this.options.followFTP) {} else {
|
|
78
78
|
return {
|
|
79
79
|
allowed: false,
|
|
80
80
|
reason: "unsupported-protocol",
|
|
@@ -127,6 +127,9 @@ class UrlFilter {
|
|
|
127
127
|
if (this.options.spanHosts) {
|
|
128
128
|
return { allowed: true };
|
|
129
129
|
}
|
|
130
|
+
if ((parsed.protocol === "http:" || parsed.protocol === "https:") && this.startHosts.has("")) {
|
|
131
|
+
return { allowed: true };
|
|
132
|
+
}
|
|
130
133
|
if (this.startHosts.has(host)) {
|
|
131
134
|
return { allowed: true };
|
|
132
135
|
}
|
package/dist/wget/url-filter.js
CHANGED
|
@@ -74,7 +74,7 @@ export class UrlFilter {
|
|
|
74
74
|
};
|
|
75
75
|
}
|
|
76
76
|
if (parsed.protocol !== "http:" && parsed.protocol !== "https:") {
|
|
77
|
-
if (parsed.protocol === "ftp:" && this.options.followFTP) {} else {
|
|
77
|
+
if (parsed.protocol === "file:") {} else if (parsed.protocol === "ftp:" && this.options.followFTP) {} else {
|
|
78
78
|
return {
|
|
79
79
|
allowed: false,
|
|
80
80
|
reason: "unsupported-protocol",
|
|
@@ -127,6 +127,9 @@ export class UrlFilter {
|
|
|
127
127
|
if (this.options.spanHosts) {
|
|
128
128
|
return { allowed: true };
|
|
129
129
|
}
|
|
130
|
+
if ((parsed.protocol === "http:" || parsed.protocol === "https:") && this.startHosts.has("")) {
|
|
131
|
+
return { allowed: true };
|
|
132
|
+
}
|
|
130
133
|
if (this.startHosts.has(host)) {
|
|
131
134
|
return { allowed: true };
|
|
132
135
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "rezo",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.133",
|
|
4
4
|
"description": "Lightning-fast, enterprise-grade HTTP client for modern JavaScript. Full HTTP/2 support, intelligent cookie management, multiple adapters (HTTP, Fetch, cURL, XHR), streaming, proxy support (HTTP/HTTPS/SOCKS), and cross-environment compatibility.",
|
|
5
5
|
"main": "dist/index.cjs",
|
|
6
6
|
"module": "dist/index.js",
|