rezo 1.0.68 → 1.0.69
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/index.cjs +6 -6
- package/dist/cache/index.cjs +9 -9
- package/dist/crawler/index.cjs +40 -40
- package/dist/entries/crawler.cjs +4 -4
- package/dist/index.cjs +27 -27
- package/dist/internal/agents/index.cjs +10 -10
- package/dist/proxy/index.cjs +4 -4
- package/dist/queue/index.cjs +8 -8
- package/dist/responses/universal/index.cjs +11 -11
- package/dist/wget/index.cjs +49 -49
- package/dist/wget/index.d.ts +8 -0
- package/dist/wget/link-converter.cjs +51 -6
- package/dist/wget/link-converter.js +51 -6
- package/package.json +1 -1
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_0ucncv = require('./picker.cjs');
|
|
2
|
+
exports.detectRuntime = _mod_0ucncv.detectRuntime;
|
|
3
|
+
exports.getAdapterCapabilities = _mod_0ucncv.getAdapterCapabilities;
|
|
4
|
+
exports.buildAdapterContext = _mod_0ucncv.buildAdapterContext;
|
|
5
|
+
exports.getAvailableAdapters = _mod_0ucncv.getAvailableAdapters;
|
|
6
|
+
exports.selectAdapter = _mod_0ucncv.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_j647we = require('./lru-cache.cjs');
|
|
2
|
+
exports.LRUCache = _mod_j647we.LRUCache;;
|
|
3
|
+
const _mod_hcc2rv = require('./dns-cache.cjs');
|
|
4
|
+
exports.DNSCache = _mod_hcc2rv.DNSCache;
|
|
5
|
+
exports.getGlobalDNSCache = _mod_hcc2rv.getGlobalDNSCache;
|
|
6
|
+
exports.resetGlobalDNSCache = _mod_hcc2rv.resetGlobalDNSCache;;
|
|
7
|
+
const _mod_50u526 = require('./response-cache.cjs');
|
|
8
|
+
exports.ResponseCache = _mod_50u526.ResponseCache;
|
|
9
|
+
exports.normalizeResponseCacheConfig = _mod_50u526.normalizeResponseCacheConfig;;
|
package/dist/crawler/index.cjs
CHANGED
|
@@ -1,40 +1,40 @@
|
|
|
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.Decodo =
|
|
27
|
-
const
|
|
28
|
-
exports.DECODO_DEVICE_TYPES =
|
|
29
|
-
exports.DECODO_HEADLESS_MODES =
|
|
30
|
-
exports.DECODO_COMMON_LOCALES =
|
|
31
|
-
exports.DECODO_COMMON_COUNTRIES =
|
|
32
|
-
exports.DECODO_EUROPEAN_COUNTRIES =
|
|
33
|
-
exports.DECODO_ASIAN_COUNTRIES =
|
|
34
|
-
exports.DECODO_US_STATES =
|
|
35
|
-
exports.DECODO_COMMON_CITIES =
|
|
36
|
-
exports.getRandomDecodoDeviceType =
|
|
37
|
-
exports.getRandomDecodoLocale =
|
|
38
|
-
exports.getRandomDecodoCountry =
|
|
39
|
-
exports.getRandomDecodoCity =
|
|
40
|
-
exports.generateDecodoSessionId =
|
|
1
|
+
const _mod_yagn5j = require('./crawler.cjs');
|
|
2
|
+
exports.Crawler = _mod_yagn5j.Crawler;;
|
|
3
|
+
const _mod_3k0ryn = require('./crawler-options.cjs');
|
|
4
|
+
exports.CrawlerOptions = _mod_3k0ryn.CrawlerOptions;;
|
|
5
|
+
const _mod_onwxdt = require('./plugin/robots-txt.cjs');
|
|
6
|
+
exports.RobotsTxt = _mod_onwxdt.RobotsTxt;;
|
|
7
|
+
const _mod_teoelp = require('./plugin/file-cacher.cjs');
|
|
8
|
+
exports.FileCacher = _mod_teoelp.FileCacher;;
|
|
9
|
+
const _mod_nzqu74 = require('./plugin/url-store.cjs');
|
|
10
|
+
exports.UrlStore = _mod_nzqu74.UrlStore;;
|
|
11
|
+
const _mod_csbuno = require('./plugin/navigation-history.cjs');
|
|
12
|
+
exports.NavigationHistory = _mod_csbuno.NavigationHistory;;
|
|
13
|
+
const _mod_uztcdl = require('./addon/oxylabs/index.cjs');
|
|
14
|
+
exports.Oxylabs = _mod_uztcdl.Oxylabs;;
|
|
15
|
+
const _mod_lqzitg = require('./addon/oxylabs/options.cjs');
|
|
16
|
+
exports.OXYLABS_BROWSER_TYPES = _mod_lqzitg.OXYLABS_BROWSER_TYPES;
|
|
17
|
+
exports.OXYLABS_COMMON_LOCALES = _mod_lqzitg.OXYLABS_COMMON_LOCALES;
|
|
18
|
+
exports.OXYLABS_COMMON_GEO_LOCATIONS = _mod_lqzitg.OXYLABS_COMMON_GEO_LOCATIONS;
|
|
19
|
+
exports.OXYLABS_US_STATES = _mod_lqzitg.OXYLABS_US_STATES;
|
|
20
|
+
exports.OXYLABS_EUROPEAN_COUNTRIES = _mod_lqzitg.OXYLABS_EUROPEAN_COUNTRIES;
|
|
21
|
+
exports.OXYLABS_ASIAN_COUNTRIES = _mod_lqzitg.OXYLABS_ASIAN_COUNTRIES;
|
|
22
|
+
exports.getRandomOxylabsBrowserType = _mod_lqzitg.getRandomBrowserType;
|
|
23
|
+
exports.getRandomOxylabsLocale = _mod_lqzitg.getRandomLocale;
|
|
24
|
+
exports.getRandomOxylabsGeoLocation = _mod_lqzitg.getRandomGeoLocation;;
|
|
25
|
+
const _mod_pswguy = require('./addon/decodo/index.cjs');
|
|
26
|
+
exports.Decodo = _mod_pswguy.Decodo;;
|
|
27
|
+
const _mod_mw7ov1 = require('./addon/decodo/options.cjs');
|
|
28
|
+
exports.DECODO_DEVICE_TYPES = _mod_mw7ov1.DECODO_DEVICE_TYPES;
|
|
29
|
+
exports.DECODO_HEADLESS_MODES = _mod_mw7ov1.DECODO_HEADLESS_MODES;
|
|
30
|
+
exports.DECODO_COMMON_LOCALES = _mod_mw7ov1.DECODO_COMMON_LOCALES;
|
|
31
|
+
exports.DECODO_COMMON_COUNTRIES = _mod_mw7ov1.DECODO_COMMON_COUNTRIES;
|
|
32
|
+
exports.DECODO_EUROPEAN_COUNTRIES = _mod_mw7ov1.DECODO_EUROPEAN_COUNTRIES;
|
|
33
|
+
exports.DECODO_ASIAN_COUNTRIES = _mod_mw7ov1.DECODO_ASIAN_COUNTRIES;
|
|
34
|
+
exports.DECODO_US_STATES = _mod_mw7ov1.DECODO_US_STATES;
|
|
35
|
+
exports.DECODO_COMMON_CITIES = _mod_mw7ov1.DECODO_COMMON_CITIES;
|
|
36
|
+
exports.getRandomDecodoDeviceType = _mod_mw7ov1.getRandomDeviceType;
|
|
37
|
+
exports.getRandomDecodoLocale = _mod_mw7ov1.getRandomLocale;
|
|
38
|
+
exports.getRandomDecodoCountry = _mod_mw7ov1.getRandomCountry;
|
|
39
|
+
exports.getRandomDecodoCity = _mod_mw7ov1.getRandomCity;
|
|
40
|
+
exports.generateDecodoSessionId = _mod_mw7ov1.generateSessionId;;
|
package/dist/entries/crawler.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const
|
|
2
|
-
exports.Crawler =
|
|
3
|
-
const
|
|
4
|
-
exports.CrawlerOptions =
|
|
1
|
+
const _mod_q8cseu = require('../crawler/crawler.cjs');
|
|
2
|
+
exports.Crawler = _mod_q8cseu.Crawler;;
|
|
3
|
+
const _mod_l7ehke = require('../crawler/crawler-options.cjs');
|
|
4
|
+
exports.CrawlerOptions = _mod_l7ehke.CrawlerOptions;;
|
package/dist/index.cjs
CHANGED
|
@@ -1,30 +1,30 @@
|
|
|
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.Priority =
|
|
27
|
-
exports.HttpMethodPriority =
|
|
1
|
+
const _mod_xixjh0 = require('./core/rezo.cjs');
|
|
2
|
+
exports.Rezo = _mod_xixjh0.Rezo;
|
|
3
|
+
exports.createRezoInstance = _mod_xixjh0.createRezoInstance;
|
|
4
|
+
exports.createDefaultInstance = _mod_xixjh0.createDefaultInstance;;
|
|
5
|
+
const _mod_dru4p8 = require('./errors/rezo-error.cjs');
|
|
6
|
+
exports.RezoError = _mod_dru4p8.RezoError;
|
|
7
|
+
exports.RezoErrorCode = _mod_dru4p8.RezoErrorCode;;
|
|
8
|
+
const _mod_vev2y0 = require('./utils/headers.cjs');
|
|
9
|
+
exports.RezoHeaders = _mod_vev2y0.RezoHeaders;;
|
|
10
|
+
const _mod_mpahdi = require('./utils/form-data.cjs');
|
|
11
|
+
exports.RezoFormData = _mod_mpahdi.RezoFormData;;
|
|
12
|
+
const _mod_ardhhn = require('./utils/cookies.cjs');
|
|
13
|
+
exports.RezoCookieJar = _mod_ardhhn.RezoCookieJar;
|
|
14
|
+
exports.Cookie = _mod_ardhhn.Cookie;;
|
|
15
|
+
const _mod_tcg6vk = require('./utils/curl.cjs');
|
|
16
|
+
exports.toCurl = _mod_tcg6vk.toCurl;
|
|
17
|
+
exports.fromCurl = _mod_tcg6vk.fromCurl;;
|
|
18
|
+
const _mod_917g5a = require('./core/hooks.cjs');
|
|
19
|
+
exports.createDefaultHooks = _mod_917g5a.createDefaultHooks;
|
|
20
|
+
exports.mergeHooks = _mod_917g5a.mergeHooks;;
|
|
21
|
+
const _mod_9gwr4w = require('./proxy/manager.cjs');
|
|
22
|
+
exports.ProxyManager = _mod_9gwr4w.ProxyManager;;
|
|
23
|
+
const _mod_obf2zi = require('./queue/index.cjs');
|
|
24
|
+
exports.RezoQueue = _mod_obf2zi.RezoQueue;
|
|
25
|
+
exports.HttpQueue = _mod_obf2zi.HttpQueue;
|
|
26
|
+
exports.Priority = _mod_obf2zi.Priority;
|
|
27
|
+
exports.HttpMethodPriority = _mod_obf2zi.HttpMethodPriority;;
|
|
28
28
|
const { RezoError } = require('./errors/rezo-error.cjs');
|
|
29
29
|
const isRezoError = exports.isRezoError = RezoError.isRezoError;
|
|
30
30
|
const Cancel = exports.Cancel = RezoError;
|
|
@@ -1,10 +1,10 @@
|
|
|
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 =
|
|
1
|
+
const _mod_b3fm92 = require('./base.cjs');
|
|
2
|
+
exports.Agent = _mod_b3fm92.Agent;;
|
|
3
|
+
const _mod_n2p0e8 = require('./http-proxy.cjs');
|
|
4
|
+
exports.HttpProxyAgent = _mod_n2p0e8.HttpProxyAgent;;
|
|
5
|
+
const _mod_dzaoe1 = require('./https-proxy.cjs');
|
|
6
|
+
exports.HttpsProxyAgent = _mod_dzaoe1.HttpsProxyAgent;;
|
|
7
|
+
const _mod_1srko3 = require('./socks-proxy.cjs');
|
|
8
|
+
exports.SocksProxyAgent = _mod_1srko3.SocksProxyAgent;;
|
|
9
|
+
const _mod_2uq734 = require('./socks-client.cjs');
|
|
10
|
+
exports.SocksClient = _mod_2uq734.SocksClient;;
|
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_q2w2p0 = require('./manager.cjs');
|
|
4
|
+
exports.ProxyManager = _mod_q2w2p0.ProxyManager;;
|
|
5
|
+
const _mod_slmjoo = require('./parse.cjs');
|
|
6
|
+
exports.parseProxyString = _mod_slmjoo.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_koupdr = require('./queue.cjs');
|
|
2
|
+
exports.RezoQueue = _mod_koupdr.RezoQueue;;
|
|
3
|
+
const _mod_vqe9kc = require('./http-queue.cjs');
|
|
4
|
+
exports.HttpQueue = _mod_vqe9kc.HttpQueue;
|
|
5
|
+
exports.extractDomain = _mod_vqe9kc.extractDomain;;
|
|
6
|
+
const _mod_9bbxt0 = require('./types.cjs');
|
|
7
|
+
exports.Priority = _mod_9bbxt0.Priority;
|
|
8
|
+
exports.HttpMethodPriority = _mod_9bbxt0.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_caza62 = require('./event-emitter.cjs');
|
|
2
|
+
exports.UniversalEventEmitter = _mod_caza62.UniversalEventEmitter;;
|
|
3
|
+
const _mod_98esrj = require('./stream.cjs');
|
|
4
|
+
exports.UniversalStreamResponse = _mod_98esrj.UniversalStreamResponse;
|
|
5
|
+
exports.StreamResponse = _mod_98esrj.StreamResponse;;
|
|
6
|
+
const _mod_6nakn6 = require('./download.cjs');
|
|
7
|
+
exports.UniversalDownloadResponse = _mod_6nakn6.UniversalDownloadResponse;
|
|
8
|
+
exports.DownloadResponse = _mod_6nakn6.DownloadResponse;;
|
|
9
|
+
const _mod_onhyvp = require('./upload.cjs');
|
|
10
|
+
exports.UniversalUploadResponse = _mod_onhyvp.UniversalUploadResponse;
|
|
11
|
+
exports.UploadResponse = _mod_onhyvp.UploadResponse;;
|
package/dist/wget/index.cjs
CHANGED
|
@@ -1,52 +1,52 @@
|
|
|
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.Downloader =
|
|
21
|
-
const
|
|
22
|
-
exports.AssetOrganizer =
|
|
23
|
-
exports.DEFAULT_ASSET_FOLDERS =
|
|
24
|
-
const
|
|
25
|
-
exports.DownloadCache =
|
|
26
|
-
const
|
|
27
|
-
exports.EXECUTABLE_EXTENSIONS =
|
|
28
|
-
exports.ARCHIVE_EXTENSIONS =
|
|
29
|
-
exports.DOCUMENT_EXTENSIONS =
|
|
30
|
-
exports.IMAGE_EXTENSIONS =
|
|
31
|
-
exports.VIDEO_EXTENSIONS =
|
|
32
|
-
exports.AUDIO_EXTENSIONS =
|
|
33
|
-
exports.FONT_EXTENSIONS =
|
|
34
|
-
exports.WEB_ASSET_EXTENSIONS =
|
|
35
|
-
exports.DATA_EXTENSIONS =
|
|
36
|
-
exports.EXECUTABLE_MIME_TYPES =
|
|
37
|
-
exports.ARCHIVE_MIME_TYPES =
|
|
38
|
-
exports.DOCUMENT_MIME_TYPES =
|
|
39
|
-
exports.IMAGE_MIME_TYPES =
|
|
40
|
-
exports.VIDEO_MIME_TYPES =
|
|
41
|
-
exports.AUDIO_MIME_TYPES =
|
|
42
|
-
exports.FONT_MIME_TYPES =
|
|
43
|
-
exports.WEB_ASSET_MIME_TYPES =
|
|
44
|
-
exports.DATA_MIME_TYPES =
|
|
45
|
-
exports.SAFE_WEB_PRESET =
|
|
46
|
-
exports.DOCUMENTS_ONLY_PRESET =
|
|
47
|
-
exports.NO_MEDIA_PRESET =
|
|
48
|
-
exports.MINIMAL_MIRROR_PRESET =
|
|
49
|
-
exports.TEXT_ONLY_PRESET =
|
|
1
|
+
const _mod_1sms7v = require('./types.cjs');
|
|
2
|
+
exports.WgetError = _mod_1sms7v.WgetError;;
|
|
3
|
+
const _mod_9nj1wb = require('./asset-extractor.cjs');
|
|
4
|
+
exports.AssetExtractor = _mod_9nj1wb.AssetExtractor;;
|
|
5
|
+
const _mod_fk10p5 = require('./url-filter.cjs');
|
|
6
|
+
exports.UrlFilter = _mod_fk10p5.UrlFilter;;
|
|
7
|
+
const _mod_mdmjap = require('./file-writer.cjs');
|
|
8
|
+
exports.FileWriter = _mod_mdmjap.FileWriter;;
|
|
9
|
+
const _mod_h74gd7 = require('./robots.cjs');
|
|
10
|
+
exports.RobotsHandler = _mod_h74gd7.RobotsHandler;;
|
|
11
|
+
const _mod_fi4008 = require('./resume.cjs');
|
|
12
|
+
exports.ResumeHandler = _mod_fi4008.ResumeHandler;;
|
|
13
|
+
const _mod_2oq0rl = require('./progress.cjs');
|
|
14
|
+
exports.ProgressReporter = _mod_2oq0rl.ProgressReporter;
|
|
15
|
+
exports.ProgressTracker = _mod_2oq0rl.ProgressTracker;
|
|
16
|
+
exports.parseSize = _mod_2oq0rl.parseSize;;
|
|
17
|
+
const _mod_mctdil = require('./link-converter.cjs');
|
|
18
|
+
exports.LinkConverter = _mod_mctdil.LinkConverter;;
|
|
19
|
+
const _mod_w0wki7 = require('./downloader.cjs');
|
|
20
|
+
exports.Downloader = _mod_w0wki7.Downloader;;
|
|
21
|
+
const _mod_sq65jo = require('./asset-organizer.cjs');
|
|
22
|
+
exports.AssetOrganizer = _mod_sq65jo.AssetOrganizer;
|
|
23
|
+
exports.DEFAULT_ASSET_FOLDERS = _mod_sq65jo.DEFAULT_ASSET_FOLDERS;;
|
|
24
|
+
const _mod_iafdrn = require('./download-cache.cjs');
|
|
25
|
+
exports.DownloadCache = _mod_iafdrn.DownloadCache;;
|
|
26
|
+
const _mod_dgbc2q = require('./filter-lists.cjs');
|
|
27
|
+
exports.EXECUTABLE_EXTENSIONS = _mod_dgbc2q.EXECUTABLE_EXTENSIONS;
|
|
28
|
+
exports.ARCHIVE_EXTENSIONS = _mod_dgbc2q.ARCHIVE_EXTENSIONS;
|
|
29
|
+
exports.DOCUMENT_EXTENSIONS = _mod_dgbc2q.DOCUMENT_EXTENSIONS;
|
|
30
|
+
exports.IMAGE_EXTENSIONS = _mod_dgbc2q.IMAGE_EXTENSIONS;
|
|
31
|
+
exports.VIDEO_EXTENSIONS = _mod_dgbc2q.VIDEO_EXTENSIONS;
|
|
32
|
+
exports.AUDIO_EXTENSIONS = _mod_dgbc2q.AUDIO_EXTENSIONS;
|
|
33
|
+
exports.FONT_EXTENSIONS = _mod_dgbc2q.FONT_EXTENSIONS;
|
|
34
|
+
exports.WEB_ASSET_EXTENSIONS = _mod_dgbc2q.WEB_ASSET_EXTENSIONS;
|
|
35
|
+
exports.DATA_EXTENSIONS = _mod_dgbc2q.DATA_EXTENSIONS;
|
|
36
|
+
exports.EXECUTABLE_MIME_TYPES = _mod_dgbc2q.EXECUTABLE_MIME_TYPES;
|
|
37
|
+
exports.ARCHIVE_MIME_TYPES = _mod_dgbc2q.ARCHIVE_MIME_TYPES;
|
|
38
|
+
exports.DOCUMENT_MIME_TYPES = _mod_dgbc2q.DOCUMENT_MIME_TYPES;
|
|
39
|
+
exports.IMAGE_MIME_TYPES = _mod_dgbc2q.IMAGE_MIME_TYPES;
|
|
40
|
+
exports.VIDEO_MIME_TYPES = _mod_dgbc2q.VIDEO_MIME_TYPES;
|
|
41
|
+
exports.AUDIO_MIME_TYPES = _mod_dgbc2q.AUDIO_MIME_TYPES;
|
|
42
|
+
exports.FONT_MIME_TYPES = _mod_dgbc2q.FONT_MIME_TYPES;
|
|
43
|
+
exports.WEB_ASSET_MIME_TYPES = _mod_dgbc2q.WEB_ASSET_MIME_TYPES;
|
|
44
|
+
exports.DATA_MIME_TYPES = _mod_dgbc2q.DATA_MIME_TYPES;
|
|
45
|
+
exports.SAFE_WEB_PRESET = _mod_dgbc2q.SAFE_WEB_PRESET;
|
|
46
|
+
exports.DOCUMENTS_ONLY_PRESET = _mod_dgbc2q.DOCUMENTS_ONLY_PRESET;
|
|
47
|
+
exports.NO_MEDIA_PRESET = _mod_dgbc2q.NO_MEDIA_PRESET;
|
|
48
|
+
exports.MINIMAL_MIRROR_PRESET = _mod_dgbc2q.MINIMAL_MIRROR_PRESET;
|
|
49
|
+
exports.TEXT_ONLY_PRESET = _mod_dgbc2q.TEXT_ONLY_PRESET;;
|
|
50
50
|
const { Downloader } = require('./downloader.cjs');
|
|
51
51
|
const rezo = require('../index.cjs');
|
|
52
52
|
const { promises: fs } = require("node:fs");
|
package/dist/wget/index.d.ts
CHANGED
|
@@ -2924,6 +2924,14 @@ export declare class LinkConverter {
|
|
|
2924
2924
|
* @returns Relative path from source to target
|
|
2925
2925
|
*/
|
|
2926
2926
|
private getRelativePath;
|
|
2927
|
+
/**
|
|
2928
|
+
* Gets the organized path for a URL based on its extension.
|
|
2929
|
+
* Used when organizeAssets is enabled to predict where an asset would be stored.
|
|
2930
|
+
*
|
|
2931
|
+
* @param url - URL path (e.g., "/core/misc/tree.png")
|
|
2932
|
+
* @returns Organized path (e.g., "images/tree.png") or undefined if not an asset
|
|
2933
|
+
*/
|
|
2934
|
+
private getOrganizedPathForUrl;
|
|
2927
2935
|
/**
|
|
2928
2936
|
* Finds a site-root relative URL in the urlMap.
|
|
2929
2937
|
* Searches for URLs ending with the given path across all domains.
|
|
@@ -1,6 +1,35 @@
|
|
|
1
1
|
const { promises: fs } = require("node:fs");
|
|
2
|
-
const { dirname, relative, join, extname } = require("node:path");
|
|
2
|
+
const { dirname, relative, join, extname, basename } = require("node:path");
|
|
3
3
|
const { parseHTML } = require('../dom/index.cjs');
|
|
4
|
+
const EXT_TO_FOLDER = {
|
|
5
|
+
".css": "css",
|
|
6
|
+
".js": "js",
|
|
7
|
+
".mjs": "js",
|
|
8
|
+
".cjs": "js",
|
|
9
|
+
".jpg": "images",
|
|
10
|
+
".jpeg": "images",
|
|
11
|
+
".png": "images",
|
|
12
|
+
".gif": "images",
|
|
13
|
+
".webp": "images",
|
|
14
|
+
".svg": "images",
|
|
15
|
+
".ico": "images",
|
|
16
|
+
".bmp": "images",
|
|
17
|
+
".avif": "images",
|
|
18
|
+
".woff": "fonts",
|
|
19
|
+
".woff2": "fonts",
|
|
20
|
+
".ttf": "fonts",
|
|
21
|
+
".otf": "fonts",
|
|
22
|
+
".eot": "fonts",
|
|
23
|
+
".mp3": "audio",
|
|
24
|
+
".wav": "audio",
|
|
25
|
+
".ogg": "audio",
|
|
26
|
+
".aac": "audio",
|
|
27
|
+
".flac": "audio",
|
|
28
|
+
".mp4": "video",
|
|
29
|
+
".webm": "video",
|
|
30
|
+
".ogv": "video",
|
|
31
|
+
".mov": "video"
|
|
32
|
+
};
|
|
4
33
|
|
|
5
34
|
class LinkConverter {
|
|
6
35
|
options;
|
|
@@ -226,6 +255,18 @@ class LinkConverter {
|
|
|
226
255
|
if (url.startsWith("/")) {
|
|
227
256
|
const baseDir = dirname(baseFile);
|
|
228
257
|
const parts = baseDir.split("/").filter((p) => p && p !== ".");
|
|
258
|
+
const matchingPath = this.findSiteRootUrlInMap(url, urlMap);
|
|
259
|
+
if (matchingPath) {
|
|
260
|
+
const relativePath = this.getRelativePath(baseDir, matchingPath);
|
|
261
|
+
return { converted: relativePath, type: "relative" };
|
|
262
|
+
}
|
|
263
|
+
if (this.options.organizeAssets) {
|
|
264
|
+
const organizedPath = this.getOrganizedPathForUrl(url);
|
|
265
|
+
if (organizedPath) {
|
|
266
|
+
const relativePath = this.getRelativePath(baseDir, organizedPath);
|
|
267
|
+
return { converted: relativePath, type: "relative" };
|
|
268
|
+
}
|
|
269
|
+
}
|
|
229
270
|
if (parts.length > 0) {
|
|
230
271
|
const firstPart = parts[0];
|
|
231
272
|
if (firstPart.includes(".")) {
|
|
@@ -233,11 +274,6 @@ class LinkConverter {
|
|
|
233
274
|
const relativePath = this.getRelativePath(baseDir, targetPath);
|
|
234
275
|
return { converted: relativePath, type: "relative" };
|
|
235
276
|
}
|
|
236
|
-
const matchingPath = this.findSiteRootUrlInMap(url, urlMap);
|
|
237
|
-
if (matchingPath) {
|
|
238
|
-
const relativePath = this.getRelativePath(baseDir, matchingPath);
|
|
239
|
-
return { converted: relativePath, type: "relative" };
|
|
240
|
-
}
|
|
241
277
|
const depth = parts.length;
|
|
242
278
|
const prefix = depth > 0 ? "../".repeat(depth) : "./";
|
|
243
279
|
return { converted: prefix + url.slice(1), type: "relative" };
|
|
@@ -257,6 +293,15 @@ class LinkConverter {
|
|
|
257
293
|
}
|
|
258
294
|
return relativePath;
|
|
259
295
|
}
|
|
296
|
+
getOrganizedPathForUrl(url) {
|
|
297
|
+
const ext = extname(url).toLowerCase();
|
|
298
|
+
const folder = EXT_TO_FOLDER[ext];
|
|
299
|
+
if (!folder) {
|
|
300
|
+
return;
|
|
301
|
+
}
|
|
302
|
+
const filename = basename(url);
|
|
303
|
+
return join(folder, filename);
|
|
304
|
+
}
|
|
260
305
|
findSiteRootUrlInMap(siteRootUrl, urlMap) {
|
|
261
306
|
for (const [fullUrl, localPath] of urlMap) {
|
|
262
307
|
try {
|
|
@@ -1,6 +1,35 @@
|
|
|
1
1
|
import { promises as fs } from "node:fs";
|
|
2
|
-
import { dirname, relative, join, extname } from "node:path";
|
|
2
|
+
import { dirname, relative, join, extname, basename } from "node:path";
|
|
3
3
|
import { parseHTML } from '../dom/index.js';
|
|
4
|
+
const EXT_TO_FOLDER = {
|
|
5
|
+
".css": "css",
|
|
6
|
+
".js": "js",
|
|
7
|
+
".mjs": "js",
|
|
8
|
+
".cjs": "js",
|
|
9
|
+
".jpg": "images",
|
|
10
|
+
".jpeg": "images",
|
|
11
|
+
".png": "images",
|
|
12
|
+
".gif": "images",
|
|
13
|
+
".webp": "images",
|
|
14
|
+
".svg": "images",
|
|
15
|
+
".ico": "images",
|
|
16
|
+
".bmp": "images",
|
|
17
|
+
".avif": "images",
|
|
18
|
+
".woff": "fonts",
|
|
19
|
+
".woff2": "fonts",
|
|
20
|
+
".ttf": "fonts",
|
|
21
|
+
".otf": "fonts",
|
|
22
|
+
".eot": "fonts",
|
|
23
|
+
".mp3": "audio",
|
|
24
|
+
".wav": "audio",
|
|
25
|
+
".ogg": "audio",
|
|
26
|
+
".aac": "audio",
|
|
27
|
+
".flac": "audio",
|
|
28
|
+
".mp4": "video",
|
|
29
|
+
".webm": "video",
|
|
30
|
+
".ogv": "video",
|
|
31
|
+
".mov": "video"
|
|
32
|
+
};
|
|
4
33
|
|
|
5
34
|
export class LinkConverter {
|
|
6
35
|
options;
|
|
@@ -226,6 +255,18 @@ export class LinkConverter {
|
|
|
226
255
|
if (url.startsWith("/")) {
|
|
227
256
|
const baseDir = dirname(baseFile);
|
|
228
257
|
const parts = baseDir.split("/").filter((p) => p && p !== ".");
|
|
258
|
+
const matchingPath = this.findSiteRootUrlInMap(url, urlMap);
|
|
259
|
+
if (matchingPath) {
|
|
260
|
+
const relativePath = this.getRelativePath(baseDir, matchingPath);
|
|
261
|
+
return { converted: relativePath, type: "relative" };
|
|
262
|
+
}
|
|
263
|
+
if (this.options.organizeAssets) {
|
|
264
|
+
const organizedPath = this.getOrganizedPathForUrl(url);
|
|
265
|
+
if (organizedPath) {
|
|
266
|
+
const relativePath = this.getRelativePath(baseDir, organizedPath);
|
|
267
|
+
return { converted: relativePath, type: "relative" };
|
|
268
|
+
}
|
|
269
|
+
}
|
|
229
270
|
if (parts.length > 0) {
|
|
230
271
|
const firstPart = parts[0];
|
|
231
272
|
if (firstPart.includes(".")) {
|
|
@@ -233,11 +274,6 @@ export class LinkConverter {
|
|
|
233
274
|
const relativePath = this.getRelativePath(baseDir, targetPath);
|
|
234
275
|
return { converted: relativePath, type: "relative" };
|
|
235
276
|
}
|
|
236
|
-
const matchingPath = this.findSiteRootUrlInMap(url, urlMap);
|
|
237
|
-
if (matchingPath) {
|
|
238
|
-
const relativePath = this.getRelativePath(baseDir, matchingPath);
|
|
239
|
-
return { converted: relativePath, type: "relative" };
|
|
240
|
-
}
|
|
241
277
|
const depth = parts.length;
|
|
242
278
|
const prefix = depth > 0 ? "../".repeat(depth) : "./";
|
|
243
279
|
return { converted: prefix + url.slice(1), type: "relative" };
|
|
@@ -257,6 +293,15 @@ export class LinkConverter {
|
|
|
257
293
|
}
|
|
258
294
|
return relativePath;
|
|
259
295
|
}
|
|
296
|
+
getOrganizedPathForUrl(url) {
|
|
297
|
+
const ext = extname(url).toLowerCase();
|
|
298
|
+
const folder = EXT_TO_FOLDER[ext];
|
|
299
|
+
if (!folder) {
|
|
300
|
+
return;
|
|
301
|
+
}
|
|
302
|
+
const filename = basename(url);
|
|
303
|
+
return join(folder, filename);
|
|
304
|
+
}
|
|
260
305
|
findSiteRootUrlInMap(siteRootUrl, urlMap) {
|
|
261
306
|
for (const [fullUrl, localPath] of urlMap) {
|
|
262
307
|
try {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "rezo",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.69",
|
|
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",
|