@crawlee/core 4.0.0-beta.11 → 4.0.0-beta.111
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/README.md +17 -13
- package/autoscaling/autoscaled_pool.d.ts +67 -172
- package/autoscaling/autoscaled_pool.js +165 -320
- package/autoscaling/client_load_signal.d.ts +55 -0
- package/autoscaling/client_load_signal.js +73 -0
- package/autoscaling/concurrency_system.d.ts +268 -0
- package/autoscaling/concurrency_system.js +351 -0
- package/autoscaling/cpu_load_signal.d.ts +43 -0
- package/autoscaling/cpu_load_signal.js +46 -0
- package/autoscaling/event_loop_load_signal.d.ts +51 -0
- package/autoscaling/event_loop_load_signal.js +60 -0
- package/autoscaling/index.d.ts +6 -1
- package/autoscaling/index.js +6 -1
- package/autoscaling/load_signal.d.ts +99 -0
- package/autoscaling/load_signal.js +104 -0
- package/autoscaling/memory_load_signal.d.ts +47 -0
- package/autoscaling/memory_load_signal.js +105 -0
- package/autoscaling/snapshotter.d.ts +58 -163
- package/autoscaling/snapshotter.js +45 -263
- package/autoscaling/system_status.d.ts +62 -84
- package/autoscaling/system_status.js +92 -122
- package/autoscaling/weighted_avg.d.ts +5 -0
- package/autoscaling/weighted_avg.js +14 -0
- package/byte_utils.d.ts +17 -0
- package/byte_utils.js +42 -0
- package/configuration.d.ts +96 -223
- package/configuration.js +170 -222
- package/cookie_utils.d.ts +4 -3
- package/cookie_utils.js +22 -13
- package/crawlers/context_pipeline.d.ts +10 -1
- package/crawlers/context_pipeline.js +31 -8
- package/crawlers/crawler_commons.d.ts +90 -83
- package/crawlers/crawler_commons.js +1 -116
- package/crawlers/error_snapshotter.d.ts +1 -4
- package/crawlers/error_snapshotter.js +3 -6
- package/crawlers/error_tracker.d.ts +0 -1
- package/crawlers/error_tracker.js +0 -1
- package/crawlers/index.d.ts +1 -3
- package/crawlers/index.js +0 -3
- package/crawlers/internals/types.d.ts +0 -1
- package/crawlers/internals/types.js +0 -1
- package/crawlers/statistics.d.ts +91 -41
- package/crawlers/statistics.js +83 -72
- package/debug.d.ts +36 -0
- package/debug.js +70 -0
- package/enqueue_links/enqueue_links.d.ts +59 -68
- package/enqueue_links/enqueue_links.js +57 -62
- package/enqueue_links/index.d.ts +0 -1
- package/enqueue_links/index.js +0 -1
- package/enqueue_links/shared.d.ts +40 -27
- package/enqueue_links/shared.js +90 -68
- package/errors.d.ts +41 -4
- package/errors.js +50 -5
- package/events/event_manager.d.ts +34 -8
- package/events/event_manager.js +8 -10
- package/events/index.d.ts +0 -1
- package/events/index.js +0 -1
- package/events/local_event_manager.d.ts +15 -3
- package/events/local_event_manager.js +37 -11
- package/index.d.ts +6 -4
- package/index.js +5 -3
- package/iterables.d.ts +79 -0
- package/iterables.js +134 -0
- package/log.d.ts +82 -3
- package/log.js +106 -1
- package/memory-storage/consts.d.ts +4 -0
- package/memory-storage/consts.js +4 -0
- package/memory-storage/index.d.ts +1 -0
- package/memory-storage/index.js +1 -0
- package/memory-storage/memory-storage.d.ts +42 -0
- package/memory-storage/memory-storage.js +136 -0
- package/memory-storage/resource-clients/common/base-client.d.ts +4 -0
- package/memory-storage/resource-clients/common/base-client.js +6 -0
- package/memory-storage/resource-clients/dataset.d.ts +40 -0
- package/memory-storage/resource-clients/dataset.js +114 -0
- package/memory-storage/resource-clients/key-value-store.d.ts +63 -0
- package/memory-storage/resource-clients/key-value-store.js +204 -0
- package/memory-storage/resource-clients/request-queue.d.ts +77 -0
- package/memory-storage/resource-clients/request-queue.js +422 -0
- package/memory-storage/utils.d.ts +16 -0
- package/memory-storage/utils.js +41 -0
- package/owned_or_injected.d.ts +58 -0
- package/owned_or_injected.js +98 -0
- package/package.json +13 -12
- package/proxy_configuration.d.ts +27 -152
- package/proxy_configuration.js +27 -179
- package/recoverable_state.d.ts +111 -0
- package/recoverable_state.js +143 -0
- package/request.d.ts +86 -17
- package/request.js +117 -41
- package/router.d.ts +193 -21
- package/router.js +188 -43
- package/serialization.d.ts +0 -1
- package/serialization.js +9 -11
- package/service_locator.d.ts +147 -0
- package/service_locator.js +244 -0
- package/session_pool/consts.d.ts +1 -2
- package/session_pool/consts.js +1 -2
- package/session_pool/errors.d.ts +0 -1
- package/session_pool/errors.js +0 -1
- package/session_pool/fingerprint.d.ts +9 -0
- package/session_pool/fingerprint.js +30 -0
- package/session_pool/index.d.ts +0 -2
- package/session_pool/index.js +0 -2
- package/session_pool/session.d.ts +37 -86
- package/session_pool/session.js +85 -138
- package/session_pool/session_pool.d.ts +77 -91
- package/session_pool/session_pool.js +159 -147
- package/storages/dataset.d.ts +114 -54
- package/storages/dataset.js +285 -144
- package/storages/index.d.ts +9 -8
- package/storages/index.js +7 -8
- package/storages/key_value_store.d.ts +185 -42
- package/storages/key_value_store.js +424 -151
- package/storages/key_value_store_codec.d.ts +32 -0
- package/storages/key_value_store_codec.js +113 -0
- package/storages/request_dedup_cache.d.ts +22 -0
- package/storages/request_dedup_cache.js +48 -0
- package/storages/request_list.d.ts +52 -116
- package/storages/request_list.js +158 -133
- package/storages/request_loader.d.ts +96 -0
- package/storages/request_loader.js +1 -0
- package/storages/request_manager.d.ts +33 -0
- package/storages/request_manager.js +1 -0
- package/storages/request_manager_tandem.d.ts +97 -0
- package/storages/request_manager_tandem.js +197 -0
- package/storages/request_queue.d.ts +290 -47
- package/storages/request_queue.js +825 -216
- package/storages/{sitemap_request_list.d.ts → sitemap_request_loader.d.ts} +37 -88
- package/storages/{sitemap_request_list.js → sitemap_request_loader.js} +136 -143
- package/storages/storage_instance_manager.d.ts +87 -0
- package/storages/storage_instance_manager.js +256 -0
- package/storages/storage_stats.d.ts +48 -0
- package/storages/storage_stats.js +29 -0
- package/storages/transaction.d.ts +252 -0
- package/storages/transaction.js +251 -0
- package/storages/utils.d.ts +54 -9
- package/storages/utils.js +64 -13
- package/system-info/cpu-info.d.ts +67 -0
- package/system-info/cpu-info.js +216 -0
- package/system-info/memory-info.d.ts +31 -0
- package/system-info/memory-info.js +115 -0
- package/system-info/ps-tree.d.ts +17 -0
- package/system-info/ps-tree.js +144 -0
- package/system-info/runtime.d.ts +14 -0
- package/system-info/runtime.js +80 -0
- package/typedefs.d.ts +0 -6
- package/typedefs.js +0 -1
- package/validators.d.ts +8 -1
- package/validators.js +10 -3
- package/autoscaling/autoscaled_pool.d.ts.map +0 -1
- package/autoscaling/autoscaled_pool.js.map +0 -1
- package/autoscaling/index.d.ts.map +0 -1
- package/autoscaling/index.js.map +0 -1
- package/autoscaling/snapshotter.d.ts.map +0 -1
- package/autoscaling/snapshotter.js.map +0 -1
- package/autoscaling/system_status.d.ts.map +0 -1
- package/autoscaling/system_status.js.map +0 -1
- package/configuration.d.ts.map +0 -1
- package/configuration.js.map +0 -1
- package/cookie_utils.d.ts.map +0 -1
- package/cookie_utils.js.map +0 -1
- package/crawlers/context_pipeline.d.ts.map +0 -1
- package/crawlers/context_pipeline.js.map +0 -1
- package/crawlers/crawler_commons.d.ts.map +0 -1
- package/crawlers/crawler_commons.js.map +0 -1
- package/crawlers/crawler_utils.d.ts +0 -10
- package/crawlers/crawler_utils.d.ts.map +0 -1
- package/crawlers/crawler_utils.js +0 -12
- package/crawlers/crawler_utils.js.map +0 -1
- package/crawlers/error_snapshotter.d.ts.map +0 -1
- package/crawlers/error_snapshotter.js.map +0 -1
- package/crawlers/error_tracker.d.ts.map +0 -1
- package/crawlers/error_tracker.js.map +0 -1
- package/crawlers/index.d.ts.map +0 -1
- package/crawlers/index.js.map +0 -1
- package/crawlers/internals/types.d.ts.map +0 -1
- package/crawlers/internals/types.js.map +0 -1
- package/crawlers/statistics.d.ts.map +0 -1
- package/crawlers/statistics.js.map +0 -1
- package/enqueue_links/enqueue_links.d.ts.map +0 -1
- package/enqueue_links/enqueue_links.js.map +0 -1
- package/enqueue_links/index.d.ts.map +0 -1
- package/enqueue_links/index.js.map +0 -1
- package/enqueue_links/shared.d.ts.map +0 -1
- package/enqueue_links/shared.js.map +0 -1
- package/errors.d.ts.map +0 -1
- package/errors.js.map +0 -1
- package/events/event_manager.d.ts.map +0 -1
- package/events/event_manager.js.map +0 -1
- package/events/index.d.ts.map +0 -1
- package/events/index.js.map +0 -1
- package/events/local_event_manager.d.ts.map +0 -1
- package/events/local_event_manager.js.map +0 -1
- package/http_clients/base-http-client.d.ts +0 -134
- package/http_clients/base-http-client.d.ts.map +0 -1
- package/http_clients/base-http-client.js +0 -33
- package/http_clients/base-http-client.js.map +0 -1
- package/http_clients/form-data-like.d.ts +0 -67
- package/http_clients/form-data-like.d.ts.map +0 -1
- package/http_clients/form-data-like.js +0 -5
- package/http_clients/form-data-like.js.map +0 -1
- package/http_clients/got-scraping-http-client.d.ts +0 -15
- package/http_clients/got-scraping-http-client.d.ts.map +0 -1
- package/http_clients/got-scraping-http-client.js +0 -69
- package/http_clients/got-scraping-http-client.js.map +0 -1
- package/http_clients/index.d.ts +0 -3
- package/http_clients/index.d.ts.map +0 -1
- package/http_clients/index.js +0 -3
- package/http_clients/index.js.map +0 -1
- package/index.d.ts.map +0 -1
- package/index.js.map +0 -1
- package/log.d.ts.map +0 -1
- package/log.js.map +0 -1
- package/proxy_configuration.d.ts.map +0 -1
- package/proxy_configuration.js.map +0 -1
- package/request.d.ts.map +0 -1
- package/request.js.map +0 -1
- package/router.d.ts.map +0 -1
- package/router.js.map +0 -1
- package/serialization.d.ts.map +0 -1
- package/serialization.js.map +0 -1
- package/session_pool/consts.d.ts.map +0 -1
- package/session_pool/consts.js.map +0 -1
- package/session_pool/errors.d.ts.map +0 -1
- package/session_pool/errors.js.map +0 -1
- package/session_pool/events.d.ts +0 -3
- package/session_pool/events.d.ts.map +0 -1
- package/session_pool/events.js +0 -3
- package/session_pool/events.js.map +0 -1
- package/session_pool/index.d.ts.map +0 -1
- package/session_pool/index.js.map +0 -1
- package/session_pool/session.d.ts.map +0 -1
- package/session_pool/session.js.map +0 -1
- package/session_pool/session_pool.d.ts.map +0 -1
- package/session_pool/session_pool.js.map +0 -1
- package/storages/access_checking.d.ts +0 -13
- package/storages/access_checking.d.ts.map +0 -1
- package/storages/access_checking.js +0 -14
- package/storages/access_checking.js.map +0 -1
- package/storages/dataset.d.ts.map +0 -1
- package/storages/dataset.js.map +0 -1
- package/storages/index.d.ts.map +0 -1
- package/storages/index.js.map +0 -1
- package/storages/key_value_store.d.ts.map +0 -1
- package/storages/key_value_store.js.map +0 -1
- package/storages/request_list.d.ts.map +0 -1
- package/storages/request_list.js.map +0 -1
- package/storages/request_provider.d.ts +0 -308
- package/storages/request_provider.d.ts.map +0 -1
- package/storages/request_provider.js +0 -555
- package/storages/request_provider.js.map +0 -1
- package/storages/request_queue.d.ts.map +0 -1
- package/storages/request_queue.js.map +0 -1
- package/storages/request_queue_v2.d.ts +0 -87
- package/storages/request_queue_v2.d.ts.map +0 -1
- package/storages/request_queue_v2.js +0 -438
- package/storages/request_queue_v2.js.map +0 -1
- package/storages/sitemap_request_list.d.ts.map +0 -1
- package/storages/sitemap_request_list.js.map +0 -1
- package/storages/storage_manager.d.ts +0 -58
- package/storages/storage_manager.d.ts.map +0 -1
- package/storages/storage_manager.js +0 -105
- package/storages/storage_manager.js.map +0 -1
- package/storages/utils.d.ts.map +0 -1
- package/storages/utils.js.map +0 -1
- package/tsconfig.build.tsbuildinfo +0 -1
- package/typedefs.d.ts.map +0 -1
- package/typedefs.js.map +0 -1
- package/validators.d.ts.map +0 -1
- package/validators.js.map +0 -1
package/enqueue_links/shared.js
CHANGED
|
@@ -1,13 +1,10 @@
|
|
|
1
1
|
import { URL } from 'node:url';
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
import { Request } from '../request.js';
|
|
5
|
-
export { tryAbsoluteURL } from '@crawlee/utils';
|
|
2
|
+
import { Minimatch } from 'minimatch';
|
|
3
|
+
export { tryAbsoluteURL } from '@crawlee/utils/internal';
|
|
6
4
|
const MAX_ENQUEUE_LINKS_CACHE_SIZE = 1000;
|
|
7
5
|
/**
|
|
8
|
-
* To
|
|
9
|
-
*
|
|
10
|
-
* by the `enqueueLinks()` function.
|
|
6
|
+
* To keep high performance when the same patterns are passed on every `enqueueLinks()` call,
|
|
7
|
+
* each glob/regexp is only compiled once and then kept in a cache.
|
|
11
8
|
* @ignore
|
|
12
9
|
*/
|
|
13
10
|
const enqueueLinksPatternCache = new Map();
|
|
@@ -21,28 +18,6 @@ export function updateEnqueueLinksPatternCache(item, pattern) {
|
|
|
21
18
|
enqueueLinksPatternCache.delete(key);
|
|
22
19
|
}
|
|
23
20
|
}
|
|
24
|
-
/**
|
|
25
|
-
* Helper factory used in the `enqueueLinks()` and enqueueLinksByClickingElements() function
|
|
26
|
-
* to construct RegExps from PseudoUrl strings.
|
|
27
|
-
* @ignore
|
|
28
|
-
*/
|
|
29
|
-
export function constructRegExpObjectsFromPseudoUrls(pseudoUrls) {
|
|
30
|
-
return pseudoUrls.map((item) => {
|
|
31
|
-
// Get pseudoUrl object from cache.
|
|
32
|
-
let regexpObject = enqueueLinksPatternCache.get(item);
|
|
33
|
-
if (regexpObject)
|
|
34
|
-
return regexpObject;
|
|
35
|
-
if (typeof item === 'string') {
|
|
36
|
-
regexpObject = { regexp: purlToRegExp(item) };
|
|
37
|
-
}
|
|
38
|
-
else {
|
|
39
|
-
const { purl, ...requestOptions } = item;
|
|
40
|
-
regexpObject = { regexp: purlToRegExp(purl), ...requestOptions };
|
|
41
|
-
}
|
|
42
|
-
updateEnqueueLinksPatternCache(item, regexpObject);
|
|
43
|
-
return regexpObject;
|
|
44
|
-
});
|
|
45
|
-
}
|
|
46
21
|
/**
|
|
47
22
|
* Helper factory used in the `enqueueLinks()` and enqueueLinksByClickingElements() function
|
|
48
23
|
* to construct Glob objects from Glob pattern strings.
|
|
@@ -72,8 +47,7 @@ export function constructGlobObjectsFromGlobs(globs) {
|
|
|
72
47
|
globObject = { glob: validateGlobPattern(item) };
|
|
73
48
|
}
|
|
74
49
|
else {
|
|
75
|
-
|
|
76
|
-
globObject = { glob: validateGlobPattern(glob), ...requestOptions };
|
|
50
|
+
globObject = { glob: validateGlobPattern(item.glob) };
|
|
77
51
|
}
|
|
78
52
|
updateEnqueueLinksPatternCache(item, globObject);
|
|
79
53
|
return globObject;
|
|
@@ -103,58 +77,60 @@ export function constructRegExpObjectsFromRegExps(regexps) {
|
|
|
103
77
|
regexpObject = { regexp: item };
|
|
104
78
|
}
|
|
105
79
|
else {
|
|
106
|
-
regexpObject = item;
|
|
80
|
+
regexpObject = { regexp: item.regexp };
|
|
107
81
|
}
|
|
108
82
|
updateEnqueueLinksPatternCache(item, regexpObject);
|
|
109
83
|
return regexpObject;
|
|
110
84
|
});
|
|
111
85
|
}
|
|
112
86
|
/**
|
|
87
|
+
* Helper factory used in the `enqueueLinks()` function to construct UrlPatternObjects
|
|
88
|
+
* from a mixed array of glob strings, glob objects, RegExp instances, and regexp objects.
|
|
89
|
+
* @ignore
|
|
90
|
+
*/
|
|
91
|
+
export function constructUrlPatternObjects(patterns) {
|
|
92
|
+
const result = [];
|
|
93
|
+
for (const item of patterns) {
|
|
94
|
+
if (typeof item === 'string' || 'glob' in item) {
|
|
95
|
+
result.push(...constructGlobObjectsFromGlobs([item]));
|
|
96
|
+
}
|
|
97
|
+
else if (item instanceof RegExp || 'regexp' in item) {
|
|
98
|
+
result.push(...constructRegExpObjectsFromRegExps([item]));
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
return result;
|
|
102
|
+
}
|
|
103
|
+
/**
|
|
104
|
+
* Filters request options by URL patterns.
|
|
105
|
+
*
|
|
106
|
+
* When `includePatterns` is empty/undefined, all options pass through (only exclude filtering applies).
|
|
113
107
|
* @ignore
|
|
114
108
|
*/
|
|
115
|
-
export function
|
|
109
|
+
export function filterRequestOptionsByPatterns(requestOptions, includePatterns, excludePatterns = [], strategy, onSkippedUrl) {
|
|
110
|
+
const excludeMatchers = excludePatterns.map(createPatternObjectMatcher);
|
|
111
|
+
const includeMatchers = includePatterns?.length ? includePatterns.map(createPatternObjectMatcher) : undefined;
|
|
116
112
|
return requestOptions
|
|
117
|
-
.map((opts) => ({ url: typeof opts === 'string' ? opts : opts.url, opts }))
|
|
118
113
|
.filter(({ url }) => {
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
}
|
|
114
|
+
const matchesExclude = excludeMatchers.some(({ match }) => match(url));
|
|
115
|
+
if (matchesExclude) {
|
|
116
|
+
onSkippedUrl?.(url);
|
|
117
|
+
}
|
|
118
|
+
return !matchesExclude;
|
|
123
119
|
})
|
|
124
|
-
.map((
|
|
125
|
-
if (!
|
|
126
|
-
return
|
|
127
|
-
}
|
|
128
|
-
for (const
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
const request = typeof opts === 'string'
|
|
132
|
-
? { url: opts, ...requestRegExpOptions, enqueueStrategy: strategy }
|
|
133
|
-
: { ...opts, ...requestRegExpOptions, enqueueStrategy: strategy };
|
|
134
|
-
return new Request(request);
|
|
120
|
+
.map((opts) => {
|
|
121
|
+
if (!includeMatchers) {
|
|
122
|
+
return { ...opts, enqueueStrategy: strategy };
|
|
123
|
+
}
|
|
124
|
+
for (const { match } of includeMatchers) {
|
|
125
|
+
if (match(opts.url)) {
|
|
126
|
+
return { ...opts, enqueueStrategy: strategy };
|
|
135
127
|
}
|
|
136
128
|
}
|
|
137
129
|
// didn't match any positive pattern
|
|
130
|
+
onSkippedUrl?.(opts.url);
|
|
138
131
|
return null;
|
|
139
132
|
})
|
|
140
|
-
.filter((
|
|
141
|
-
}
|
|
142
|
-
export function filterRequestsByPatterns(requests, patterns) {
|
|
143
|
-
if (!patterns?.length) {
|
|
144
|
-
return requests;
|
|
145
|
-
}
|
|
146
|
-
const filtered = [];
|
|
147
|
-
for (const request of requests) {
|
|
148
|
-
for (const urlPatternObject of patterns) {
|
|
149
|
-
const { regexp, glob } = urlPatternObject;
|
|
150
|
-
if ((regexp && request.url.match(regexp)) || (glob && minimatch(request.url, glob, { nocase: true }))) {
|
|
151
|
-
filtered.push(request);
|
|
152
|
-
// Break the pattern loop, as we already matched this request once
|
|
153
|
-
break;
|
|
154
|
-
}
|
|
155
|
-
}
|
|
156
|
-
}
|
|
157
|
-
return filtered;
|
|
133
|
+
.filter((opts) => opts !== null);
|
|
158
134
|
}
|
|
159
135
|
/**
|
|
160
136
|
* @ignore
|
|
@@ -184,7 +160,53 @@ export function createRequestOptions(sources, options = {}) {
|
|
|
184
160
|
if (options.skipNavigation) {
|
|
185
161
|
requestOptions.skipNavigation = true;
|
|
186
162
|
}
|
|
163
|
+
if (options.sessionId) {
|
|
164
|
+
requestOptions.sessionId = options.sessionId;
|
|
165
|
+
}
|
|
187
166
|
return requestOptions;
|
|
188
167
|
});
|
|
189
168
|
}
|
|
190
|
-
|
|
169
|
+
/**
|
|
170
|
+
* @ignore
|
|
171
|
+
*/
|
|
172
|
+
function createPatternObjectMatcher(urlPatternObject) {
|
|
173
|
+
const { regexp, glob } = urlPatternObject;
|
|
174
|
+
let match;
|
|
175
|
+
if (regexp) {
|
|
176
|
+
match = (url) => regexp.test(url);
|
|
177
|
+
}
|
|
178
|
+
else if (glob) {
|
|
179
|
+
const m = new Minimatch(glob, { nocase: true });
|
|
180
|
+
match = (url) => m.match(url);
|
|
181
|
+
}
|
|
182
|
+
else {
|
|
183
|
+
match = () => false;
|
|
184
|
+
}
|
|
185
|
+
return { match };
|
|
186
|
+
}
|
|
187
|
+
/**
|
|
188
|
+
* Applies a {@link RequestTransform} function to a list of request options.
|
|
189
|
+
* Options for which the transform returns a falsy value are removed from the list.
|
|
190
|
+
* @param onSkipped Called with the original request options when the transform returns a falsy value (i.e. the request is skipped).
|
|
191
|
+
* @ignore
|
|
192
|
+
* @internal
|
|
193
|
+
*/
|
|
194
|
+
export function applyRequestTransform(requestOptions, transformFn, onSkipped) {
|
|
195
|
+
return requestOptions
|
|
196
|
+
.map((opts) => {
|
|
197
|
+
const transformed = transformFn(opts);
|
|
198
|
+
if (transformed === 'skip') {
|
|
199
|
+
onSkipped?.(opts);
|
|
200
|
+
return null;
|
|
201
|
+
}
|
|
202
|
+
if (transformed === 'unchanged') {
|
|
203
|
+
return opts;
|
|
204
|
+
}
|
|
205
|
+
if (!transformed) {
|
|
206
|
+
onSkipped?.(opts);
|
|
207
|
+
return null;
|
|
208
|
+
}
|
|
209
|
+
return transformed;
|
|
210
|
+
})
|
|
211
|
+
.filter((r) => r !== null);
|
|
212
|
+
}
|
package/errors.d.ts
CHANGED
|
@@ -14,6 +14,26 @@ export declare class CriticalError extends NonRetryableError {
|
|
|
14
14
|
*/
|
|
15
15
|
export declare class MissingRouteError extends CriticalError {
|
|
16
16
|
}
|
|
17
|
+
/**
|
|
18
|
+
* Thrown when a request's `userData` does not match the {@link RouteSchemas|Standard Schema} registered for its label.
|
|
19
|
+
*
|
|
20
|
+
* As the `userData` does not change between attempts, this error is non-retryable.
|
|
21
|
+
*/
|
|
22
|
+
export declare class RequestValidationError extends NonRetryableError {
|
|
23
|
+
readonly label: string | symbol;
|
|
24
|
+
readonly issues: readonly {
|
|
25
|
+
readonly message: string;
|
|
26
|
+
readonly path?: readonly (PropertyKey | {
|
|
27
|
+
key: PropertyKey;
|
|
28
|
+
})[];
|
|
29
|
+
}[];
|
|
30
|
+
constructor(label: string | symbol, issues: readonly {
|
|
31
|
+
readonly message: string;
|
|
32
|
+
readonly path?: readonly (PropertyKey | {
|
|
33
|
+
key: PropertyKey;
|
|
34
|
+
})[];
|
|
35
|
+
}[]);
|
|
36
|
+
}
|
|
17
37
|
/**
|
|
18
38
|
* Errors of `RetryRequestError` type will always be retried by the crawler.
|
|
19
39
|
*
|
|
@@ -23,13 +43,19 @@ export declare class RetryRequestError extends Error {
|
|
|
23
43
|
constructor(message?: string);
|
|
24
44
|
}
|
|
25
45
|
/**
|
|
26
|
-
* Errors of `SessionError` type
|
|
46
|
+
* Errors of `SessionError` type retire the session associated with the request and trigger a regular retry.
|
|
27
47
|
*
|
|
28
|
-
*
|
|
48
|
+
* The retry counts towards the `maxRequestRetries` limit, just like any other error.
|
|
29
49
|
*/
|
|
30
|
-
export declare class SessionError extends
|
|
50
|
+
export declare class SessionError extends Error {
|
|
31
51
|
constructor(message?: string);
|
|
32
52
|
}
|
|
53
|
+
/**
|
|
54
|
+
* Thrown when a requested session is not found in the referenced SessionPool.
|
|
55
|
+
*/
|
|
56
|
+
export declare class MissingSessionError extends Error {
|
|
57
|
+
constructor(sessionId?: string);
|
|
58
|
+
}
|
|
33
59
|
export declare class ContextPipelineInterruptedError extends Error {
|
|
34
60
|
constructor(message?: string);
|
|
35
61
|
}
|
|
@@ -42,4 +68,15 @@ export declare class ContextPipelineCleanupError extends CriticalError {
|
|
|
42
68
|
export declare class RequestHandlerError extends Error {
|
|
43
69
|
constructor(error: unknown, options?: ErrorOptions);
|
|
44
70
|
}
|
|
45
|
-
|
|
71
|
+
/**
|
|
72
|
+
* Thrown when attempting to set a different service instance after one has already been retrieved.
|
|
73
|
+
*/
|
|
74
|
+
export declare class ServiceConflictError extends Error {
|
|
75
|
+
constructor(serviceName: string, newValue: unknown, existingValue: unknown);
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
* Thrown by crawlers when `skipNavigation` is used on a request.
|
|
79
|
+
* Subclasses can catch this error to skip their own navigation-dependent logic.
|
|
80
|
+
*/
|
|
81
|
+
export declare class NavigationSkippedError extends NonRetryableError {
|
|
82
|
+
}
|
package/errors.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { inspectValue } from './debug.js';
|
|
1
2
|
/**
|
|
2
3
|
* Errors of `NonRetryableError` type will never be retried by the crawler.
|
|
3
4
|
*/
|
|
@@ -14,6 +15,28 @@ export class CriticalError extends NonRetryableError {
|
|
|
14
15
|
*/
|
|
15
16
|
export class MissingRouteError extends CriticalError {
|
|
16
17
|
}
|
|
18
|
+
/**
|
|
19
|
+
* Thrown when a request's `userData` does not match the {@link RouteSchemas|Standard Schema} registered for its label.
|
|
20
|
+
*
|
|
21
|
+
* As the `userData` does not change between attempts, this error is non-retryable.
|
|
22
|
+
*/
|
|
23
|
+
export class RequestValidationError extends NonRetryableError {
|
|
24
|
+
label;
|
|
25
|
+
issues;
|
|
26
|
+
constructor(label, issues) {
|
|
27
|
+
const details = issues
|
|
28
|
+
.map((issue) => {
|
|
29
|
+
const path = (issue.path ?? [])
|
|
30
|
+
.map((segment) => (typeof segment === 'object' ? segment.key : segment))
|
|
31
|
+
.join('.');
|
|
32
|
+
return `- ${path ? `${path}: ` : ''}${issue.message}`;
|
|
33
|
+
})
|
|
34
|
+
.join('\n');
|
|
35
|
+
super(`Request userData for label '${String(label)}' failed schema validation:\n${details}`);
|
|
36
|
+
this.label = label;
|
|
37
|
+
this.issues = issues;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
17
40
|
/**
|
|
18
41
|
* Errors of `RetryRequestError` type will always be retried by the crawler.
|
|
19
42
|
*
|
|
@@ -25,13 +48,21 @@ export class RetryRequestError extends Error {
|
|
|
25
48
|
}
|
|
26
49
|
}
|
|
27
50
|
/**
|
|
28
|
-
* Errors of `SessionError` type
|
|
51
|
+
* Errors of `SessionError` type retire the session associated with the request and trigger a regular retry.
|
|
29
52
|
*
|
|
30
|
-
*
|
|
53
|
+
* The retry counts towards the `maxRequestRetries` limit, just like any other error.
|
|
31
54
|
*/
|
|
32
|
-
export class SessionError extends
|
|
55
|
+
export class SessionError extends Error {
|
|
33
56
|
constructor(message) {
|
|
34
|
-
super(`Detected a session error,
|
|
57
|
+
super(`Detected a session error, retiring session... ${message ? `\n${message}` : ''}`);
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* Thrown when a requested session is not found in the referenced SessionPool.
|
|
62
|
+
*/
|
|
63
|
+
export class MissingSessionError extends Error {
|
|
64
|
+
constructor(sessionId) {
|
|
65
|
+
super(`The current SessionPool instance couldn't find a valid session${sessionId ? ` for the following id: ${sessionId}.` : '.'}`);
|
|
35
66
|
}
|
|
36
67
|
}
|
|
37
68
|
export class ContextPipelineInterruptedError extends Error {
|
|
@@ -54,4 +85,18 @@ export class RequestHandlerError extends Error {
|
|
|
54
85
|
super(undefined, { cause: error, ...options });
|
|
55
86
|
}
|
|
56
87
|
}
|
|
57
|
-
|
|
88
|
+
/**
|
|
89
|
+
* Thrown when attempting to set a different service instance after one has already been retrieved.
|
|
90
|
+
*/
|
|
91
|
+
export class ServiceConflictError extends Error {
|
|
92
|
+
constructor(serviceName, newValue, existingValue) {
|
|
93
|
+
super(`Service ${serviceName} is already in use. ` +
|
|
94
|
+
`Existing value: ${inspectValue(existingValue)}, attempted new value: ${inspectValue(newValue)}.`);
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
/**
|
|
98
|
+
* Thrown by crawlers when `skipNavigation` is used on a request.
|
|
99
|
+
* Subclasses can catch this error to skip their own navigation-dependent logic.
|
|
100
|
+
*/
|
|
101
|
+
export class NavigationSkippedError extends NonRetryableError {
|
|
102
|
+
}
|
|
@@ -1,28 +1,55 @@
|
|
|
1
1
|
import { AsyncEventEmitter } from '@vladfrangu/async_event_emitter';
|
|
2
2
|
import type { BetterIntervalID } from '@apify/utilities';
|
|
3
|
-
|
|
3
|
+
export interface EventManagerOptions {
|
|
4
|
+
/** Interval between emitted `persistState` events in milliseconds. */
|
|
5
|
+
persistStateIntervalMillis: number;
|
|
6
|
+
}
|
|
4
7
|
export declare const enum EventType {
|
|
5
8
|
PERSIST_STATE = "persistState",
|
|
6
9
|
SYSTEM_INFO = "systemInfo",
|
|
7
10
|
MIGRATING = "migrating",
|
|
8
11
|
ABORTING = "aborting",
|
|
9
|
-
EXIT = "exit"
|
|
12
|
+
EXIT = "exit",
|
|
13
|
+
STATUS_MESSAGE = "statusMessage"
|
|
14
|
+
}
|
|
15
|
+
export type EventTypeName = EventType | 'systemInfo' | 'persistState' | 'migrating' | 'aborting' | 'exit' | 'statusMessage';
|
|
16
|
+
/**
|
|
17
|
+
* Payload emitted with the {@link EventType.STATUS_MESSAGE|`statusMessage`} event.
|
|
18
|
+
*
|
|
19
|
+
* The crawler broadcasts these whenever it wants to report its progress (e.g. periodically, or on
|
|
20
|
+
* start/finish). Consumers such as the Apify SDK can listen for the event and propagate the message
|
|
21
|
+
* to the platform. This keeps the crawler decoupled from any specific status-reporting backend.
|
|
22
|
+
*/
|
|
23
|
+
export interface EventStatusMessageData {
|
|
24
|
+
/**
|
|
25
|
+
* Identifies the crawler that emitted the message.
|
|
26
|
+
*
|
|
27
|
+
* Either the user-provided `id` from the crawler options, or a randomly generated one.
|
|
28
|
+
* Since a single event manager may be shared by multiple crawlers, consumers can use this
|
|
29
|
+
* to attribute the message to a specific crawler instance.
|
|
30
|
+
*/
|
|
31
|
+
crawlerId: string;
|
|
32
|
+
/** The human-readable status message. */
|
|
33
|
+
message: string;
|
|
34
|
+
/** Whether this is the final status message of the run. */
|
|
35
|
+
isStatusMessageTerminal?: boolean;
|
|
36
|
+
/** The log level the message was logged with. */
|
|
37
|
+
level?: 'DEBUG' | 'INFO' | 'WARNING' | 'ERROR';
|
|
10
38
|
}
|
|
11
|
-
export type EventTypeName = EventType | 'systemInfo' | 'persistState' | 'migrating' | 'aborting' | 'exit';
|
|
12
39
|
interface Intervals {
|
|
13
40
|
persistState?: BetterIntervalID;
|
|
14
41
|
systemInfo?: BetterIntervalID;
|
|
15
42
|
}
|
|
16
43
|
export declare abstract class EventManager {
|
|
17
|
-
|
|
44
|
+
#private;
|
|
18
45
|
protected events: AsyncEventEmitter<{}>;
|
|
19
46
|
protected initialized: boolean;
|
|
20
47
|
protected intervals: Intervals;
|
|
21
48
|
// @ts-ignore optional peer dependency or compatibility with es2022
|
|
22
|
-
protected log: import("@
|
|
23
|
-
constructor(
|
|
49
|
+
protected log: import("@crawlee/types").CrawleeLogger;
|
|
50
|
+
constructor(options: EventManagerOptions);
|
|
24
51
|
/**
|
|
25
|
-
* Initializes the event manager by
|
|
52
|
+
* Initializes the event manager by starting the `persistState` event interval.
|
|
26
53
|
* This is automatically called at the beginning of `crawler.run()`.
|
|
27
54
|
*/
|
|
28
55
|
init(): Promise<void>;
|
|
@@ -49,4 +76,3 @@ export declare abstract class EventManager {
|
|
|
49
76
|
waitForAllListenersToComplete(): Promise<boolean>;
|
|
50
77
|
}
|
|
51
78
|
export {};
|
|
52
|
-
//# sourceMappingURL=event_manager.d.ts.map
|
package/events/event_manager.js
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { AsyncEventEmitter } from '@vladfrangu/async_event_emitter';
|
|
2
|
-
import log from '@apify/log';
|
|
3
2
|
import { betterClearInterval, betterSetInterval } from '@apify/utilities';
|
|
4
|
-
import {
|
|
3
|
+
import { serviceLocator } from '../service_locator.js';
|
|
5
4
|
export var EventType;
|
|
6
5
|
(function (EventType) {
|
|
7
6
|
EventType["PERSIST_STATE"] = "persistState";
|
|
@@ -9,30 +8,30 @@ export var EventType;
|
|
|
9
8
|
EventType["MIGRATING"] = "migrating";
|
|
10
9
|
EventType["ABORTING"] = "aborting";
|
|
11
10
|
EventType["EXIT"] = "exit";
|
|
11
|
+
EventType["STATUS_MESSAGE"] = "statusMessage";
|
|
12
12
|
})(EventType || (EventType = {}));
|
|
13
13
|
export class EventManager {
|
|
14
|
-
config;
|
|
15
14
|
events = new AsyncEventEmitter();
|
|
16
15
|
initialized = false;
|
|
17
16
|
intervals = {};
|
|
18
|
-
log =
|
|
19
|
-
|
|
20
|
-
|
|
17
|
+
log = serviceLocator.getLogger().child({ prefix: 'Events' });
|
|
18
|
+
#persistStateIntervalMillis;
|
|
19
|
+
constructor(options) {
|
|
20
|
+
this.#persistStateIntervalMillis = options.persistStateIntervalMillis;
|
|
21
21
|
this.events.setMaxListeners(50);
|
|
22
22
|
}
|
|
23
23
|
/**
|
|
24
|
-
* Initializes the event manager by
|
|
24
|
+
* Initializes the event manager by starting the `persistState` event interval.
|
|
25
25
|
* This is automatically called at the beginning of `crawler.run()`.
|
|
26
26
|
*/
|
|
27
27
|
async init() {
|
|
28
28
|
if (this.initialized) {
|
|
29
29
|
return;
|
|
30
30
|
}
|
|
31
|
-
const persistStateIntervalMillis = this.config.get('persistStateIntervalMillis');
|
|
32
31
|
this.intervals.persistState = betterSetInterval((intervalCallback) => {
|
|
33
32
|
this.emit("persistState" /* EventType.PERSIST_STATE */, { isMigrating: false });
|
|
34
33
|
intervalCallback();
|
|
35
|
-
}, persistStateIntervalMillis);
|
|
34
|
+
}, this.#persistStateIntervalMillis);
|
|
36
35
|
this.initialized = true;
|
|
37
36
|
}
|
|
38
37
|
/**
|
|
@@ -86,4 +85,3 @@ export class EventManager {
|
|
|
86
85
|
return this.events.waitForAllListenersToComplete();
|
|
87
86
|
}
|
|
88
87
|
}
|
|
89
|
-
//# sourceMappingURL=event_manager.js.map
|
package/events/index.d.ts
CHANGED
package/events/index.js
CHANGED
|
@@ -1,7 +1,19 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { Configuration } from '../configuration.js';
|
|
2
|
+
import { EventManager, type EventManagerOptions } from './event_manager.js';
|
|
3
|
+
export interface LocalEventManagerOptions extends EventManagerOptions {
|
|
4
|
+
/** Interval between emitted `systemInfo` events in milliseconds. */
|
|
5
|
+
systemInfoIntervalMillis: number;
|
|
6
|
+
}
|
|
2
7
|
export declare class LocalEventManager extends EventManager {
|
|
8
|
+
#private;
|
|
9
|
+
constructor(options: LocalEventManagerOptions);
|
|
10
|
+
/**
|
|
11
|
+
* Creates a new `LocalEventManager` based on the provided `Configuration`.
|
|
12
|
+
* Uses the global configuration from the service locator if none is provided.
|
|
13
|
+
*/
|
|
14
|
+
static fromConfiguration(configuration?: Configuration): LocalEventManager;
|
|
3
15
|
/**
|
|
4
|
-
* Initializes the EventManager and sets up periodic `systemInfo`
|
|
16
|
+
* Initializes the EventManager and sets up periodic `systemInfo` events.
|
|
5
17
|
* This is automatically called at the beginning of `crawler.run()`.
|
|
6
18
|
*/
|
|
7
19
|
init(): Promise<void>;
|
|
@@ -23,5 +35,5 @@ export declare class LocalEventManager extends EventManager {
|
|
|
23
35
|
private createSystemInfo;
|
|
24
36
|
private createCpuInfo;
|
|
25
37
|
private createMemoryInfo;
|
|
38
|
+
private getMemoryInfo;
|
|
26
39
|
}
|
|
27
|
-
//# sourceMappingURL=local_event_manager.d.ts.map
|
|
@@ -1,10 +1,25 @@
|
|
|
1
|
-
import { getCurrentCpuTicksV2, getMemoryInfo, isContainerized } from '@crawlee/utils';
|
|
2
|
-
import log from '@apify/log';
|
|
3
1
|
import { betterClearInterval, betterSetInterval } from '@apify/utilities';
|
|
2
|
+
import { serviceLocator } from '../service_locator.js';
|
|
4
3
|
import { EventManager } from './event_manager.js';
|
|
5
4
|
export class LocalEventManager extends EventManager {
|
|
5
|
+
#systemInfoIntervalMillis;
|
|
6
|
+
constructor(options) {
|
|
7
|
+
super(options);
|
|
8
|
+
this.#systemInfoIntervalMillis = options.systemInfoIntervalMillis;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Creates a new `LocalEventManager` based on the provided `Configuration`.
|
|
12
|
+
* Uses the global configuration from the service locator if none is provided.
|
|
13
|
+
*/
|
|
14
|
+
static fromConfiguration(configuration) {
|
|
15
|
+
const resolvedConfiguration = configuration ?? serviceLocator.getConfiguration();
|
|
16
|
+
return new LocalEventManager({
|
|
17
|
+
persistStateIntervalMillis: resolvedConfiguration.persistStateIntervalMillis,
|
|
18
|
+
systemInfoIntervalMillis: resolvedConfiguration.systemInfoIntervalMillis,
|
|
19
|
+
});
|
|
20
|
+
}
|
|
6
21
|
/**
|
|
7
|
-
* Initializes the EventManager and sets up periodic `systemInfo`
|
|
22
|
+
* Initializes the EventManager and sets up periodic `systemInfo` events.
|
|
8
23
|
* This is automatically called at the beginning of `crawler.run()`.
|
|
9
24
|
*/
|
|
10
25
|
async init() {
|
|
@@ -12,9 +27,8 @@ export class LocalEventManager extends EventManager {
|
|
|
12
27
|
return;
|
|
13
28
|
}
|
|
14
29
|
await super.init();
|
|
15
|
-
const systemInfoIntervalMillis = this.config.get('systemInfoIntervalMillis');
|
|
16
30
|
this.emitSystemInfoEvent = this.emitSystemInfoEvent.bind(this);
|
|
17
|
-
this.intervals.systemInfo = betterSetInterval(this.emitSystemInfoEvent.bind(this), systemInfoIntervalMillis);
|
|
31
|
+
this.intervals.systemInfo = betterSetInterval(this.emitSystemInfoEvent.bind(this), this.#systemInfoIntervalMillis);
|
|
18
32
|
}
|
|
19
33
|
/**
|
|
20
34
|
* @inheritDoc
|
|
@@ -31,7 +45,7 @@ export class LocalEventManager extends EventManager {
|
|
|
31
45
|
*/
|
|
32
46
|
async emitSystemInfoEvent(intervalCallback) {
|
|
33
47
|
const info = await this.createSystemInfo({
|
|
34
|
-
maxUsedCpuRatio:
|
|
48
|
+
maxUsedCpuRatio: serviceLocator.getConfiguration().maxUsedCpuRatio,
|
|
35
49
|
});
|
|
36
50
|
this.events.emit("systemInfo" /* EventType.SYSTEM_INFO */, info);
|
|
37
51
|
intervalCallback();
|
|
@@ -40,7 +54,8 @@ export class LocalEventManager extends EventManager {
|
|
|
40
54
|
* @internal
|
|
41
55
|
*/
|
|
42
56
|
async isContainerizedWrapper() {
|
|
43
|
-
|
|
57
|
+
const { isContainerized } = await import('../system-info/runtime.js');
|
|
58
|
+
return serviceLocator.getConfiguration().containerized ?? (await isContainerized());
|
|
44
59
|
}
|
|
45
60
|
/**
|
|
46
61
|
* Creates a SystemInfo object based on local metrics.
|
|
@@ -53,7 +68,11 @@ export class LocalEventManager extends EventManager {
|
|
|
53
68
|
};
|
|
54
69
|
}
|
|
55
70
|
async createCpuInfo(options) {
|
|
56
|
-
const
|
|
71
|
+
const { getCurrentCpuTicksV2 } = await import('../system-info/cpu-info.js');
|
|
72
|
+
const usedCpuRatio = await getCurrentCpuTicksV2({
|
|
73
|
+
containerized: await this.isContainerizedWrapper(),
|
|
74
|
+
logger: serviceLocator.getLogger(),
|
|
75
|
+
});
|
|
57
76
|
return {
|
|
58
77
|
cpuCurrentUsage: usedCpuRatio * 100,
|
|
59
78
|
isCpuOverloaded: usedCpuRatio > options.maxUsedCpuRatio,
|
|
@@ -61,15 +80,22 @@ export class LocalEventManager extends EventManager {
|
|
|
61
80
|
}
|
|
62
81
|
async createMemoryInfo() {
|
|
63
82
|
try {
|
|
64
|
-
const memInfo = await
|
|
83
|
+
const memInfo = await this.getMemoryInfo();
|
|
65
84
|
return {
|
|
85
|
+
memTotalBytes: memInfo.totalBytes,
|
|
66
86
|
memCurrentBytes: memInfo.mainProcessBytes + memInfo.childProcessesBytes,
|
|
67
87
|
};
|
|
68
88
|
}
|
|
69
89
|
catch (err) {
|
|
70
|
-
log.exception(err, 'Memory snapshot failed.');
|
|
90
|
+
this.log.exception(err, 'Memory snapshot failed.');
|
|
71
91
|
return {};
|
|
72
92
|
}
|
|
73
93
|
}
|
|
94
|
+
async getMemoryInfo() {
|
|
95
|
+
const { getMemoryInfo } = await import('../system-info/memory-info.js');
|
|
96
|
+
return getMemoryInfo({
|
|
97
|
+
containerized: await this.isContainerizedWrapper(),
|
|
98
|
+
logger: serviceLocator.getLogger(),
|
|
99
|
+
});
|
|
100
|
+
}
|
|
74
101
|
}
|
|
75
|
-
//# sourceMappingURL=local_event_manager.js.map
|
package/index.d.ts
CHANGED
|
@@ -1,19 +1,21 @@
|
|
|
1
|
+
export * from './debug.js';
|
|
1
2
|
export * from './errors.js';
|
|
2
3
|
export * from './autoscaling/index.js';
|
|
3
4
|
export * from './configuration.js';
|
|
5
|
+
export * from './service_locator.js';
|
|
4
6
|
export * from './crawlers/index.js';
|
|
5
7
|
export * from './enqueue_links/index.js';
|
|
6
8
|
export * from './events/index.js';
|
|
7
|
-
export * from './http_clients/index.js';
|
|
8
9
|
export * from './log.js';
|
|
10
|
+
export * from './owned_or_injected.js';
|
|
9
11
|
export * from './proxy_configuration.js';
|
|
10
12
|
export * from './request.js';
|
|
11
13
|
export * from './router.js';
|
|
12
14
|
export * from './serialization.js';
|
|
13
15
|
export * from './session_pool/index.js';
|
|
14
16
|
export * from './storages/index.js';
|
|
17
|
+
export * from './memory-storage/index.js';
|
|
15
18
|
export * from './validators.js';
|
|
16
19
|
export * from './cookie_utils.js';
|
|
17
|
-
export
|
|
18
|
-
export {
|
|
19
|
-
//# sourceMappingURL=index.d.ts.map
|
|
20
|
+
export * from './recoverable_state.js';
|
|
21
|
+
export type { StorageBackend } from '@crawlee/types';
|
package/index.js
CHANGED
|
@@ -1,18 +1,20 @@
|
|
|
1
|
+
export * from './debug.js';
|
|
1
2
|
export * from './errors.js';
|
|
2
3
|
export * from './autoscaling/index.js';
|
|
3
4
|
export * from './configuration.js';
|
|
5
|
+
export * from './service_locator.js';
|
|
4
6
|
export * from './crawlers/index.js';
|
|
5
7
|
export * from './enqueue_links/index.js';
|
|
6
8
|
export * from './events/index.js';
|
|
7
|
-
export * from './http_clients/index.js';
|
|
8
9
|
export * from './log.js';
|
|
10
|
+
export * from './owned_or_injected.js';
|
|
9
11
|
export * from './proxy_configuration.js';
|
|
10
12
|
export * from './request.js';
|
|
11
13
|
export * from './router.js';
|
|
12
14
|
export * from './serialization.js';
|
|
13
15
|
export * from './session_pool/index.js';
|
|
14
16
|
export * from './storages/index.js';
|
|
17
|
+
export * from './memory-storage/index.js';
|
|
15
18
|
export * from './validators.js';
|
|
16
19
|
export * from './cookie_utils.js';
|
|
17
|
-
export
|
|
18
|
-
//# sourceMappingURL=index.js.map
|
|
20
|
+
export * from './recoverable_state.js';
|