@crawlee/jsdom 4.0.0-beta.1 → 4.0.0-beta.100
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/index.d.ts +0 -1
- package/index.js +0 -1
- package/internals/jsdom-crawler.d.ts +67 -43
- package/internals/jsdom-crawler.js +156 -133
- package/package.json +8 -8
- package/index.d.ts.map +0 -1
- package/index.js.map +0 -1
- package/internals/jsdom-crawler.d.ts.map +0 -1
- package/internals/jsdom-crawler.js.map +0 -1
- package/tsconfig.build.tsbuildinfo +0 -1
package/README.md
CHANGED
|
@@ -1,19 +1,23 @@
|
|
|
1
1
|
<h1 align="center">
|
|
2
2
|
<a href="https://crawlee.dev">
|
|
3
3
|
<picture>
|
|
4
|
-
<source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/apify/crawlee/master/website/static/img/crawlee-dark.svg?sanitize=true"
|
|
5
|
-
<img alt="Crawlee" src="https://raw.githubusercontent.com/apify/crawlee/master/website/static/img/crawlee-light.svg?sanitize=true" width="500"
|
|
4
|
+
<source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/apify/crawlee/master/website/static/img/crawlee-dark.svg?sanitize=true" />
|
|
5
|
+
<img alt="Crawlee" src="https://raw.githubusercontent.com/apify/crawlee/master/website/static/img/crawlee-light.svg?sanitize=true" width="500" />
|
|
6
6
|
</picture>
|
|
7
7
|
</a>
|
|
8
|
-
<br
|
|
8
|
+
<br />
|
|
9
9
|
<small>A web scraping and browser automation library</small>
|
|
10
10
|
</h1>
|
|
11
11
|
|
|
12
|
-
<p align=center>
|
|
13
|
-
<a href="https://
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
12
|
+
<p align="center">
|
|
13
|
+
<a href="https://trendshift.io/repositories/5179" target="_blank"><img src="https://trendshift.io/api/badge/repositories/5179" alt="apify%2Fcrawlee | Trendshift" width="250" height="55"/></a>
|
|
14
|
+
</p>
|
|
15
|
+
|
|
16
|
+
<p align="center">
|
|
17
|
+
<a href="https://www.npmjs.com/package/@crawlee/core" rel="nofollow"><img src="https://img.shields.io/npm/v/@crawlee/core.svg" alt="NPM latest version" data-canonical-src="https://img.shields.io/npm/v/@crawlee/core/next.svg" /></a>
|
|
18
|
+
<a href="https://www.npmjs.com/package/@crawlee/core" rel="nofollow"><img src="https://img.shields.io/npm/dm/@crawlee/core.svg" alt="Downloads" data-canonical-src="https://img.shields.io/npm/dm/@crawlee/core.svg" /></a>
|
|
19
|
+
<a href="https://discord.gg/jyEM2PRvMU" rel="nofollow"><img src="https://img.shields.io/discord/801163717915574323?label=discord" alt="Chat on discord" data-canonical-src="https://img.shields.io/discord/801163717915574323?label=discord" /></a>
|
|
20
|
+
<a href="https://github.com/apify/crawlee/actions/workflows/test-ci.yml"><img src="https://github.com/apify/crawlee/actions/workflows/test-ci.yml/badge.svg?branch=master" alt="Build Status" /></a>
|
|
17
21
|
</p>
|
|
18
22
|
|
|
19
23
|
Crawlee covers your crawling and scraping end-to-end and **helps you build reliable scrapers. Fast.**
|
|
@@ -24,7 +28,7 @@ Crawlee is available as the [`crawlee`](https://www.npmjs.com/package/crawlee) N
|
|
|
24
28
|
|
|
25
29
|
> 👉 **View full documentation, guides and examples on the [Crawlee project website](https://crawlee.dev)** 👈
|
|
26
30
|
|
|
27
|
-
>
|
|
31
|
+
> Do you prefer 🐍 Python instead of JavaScript? [👉 Checkout Crawlee for Python 👈](https://github.com/apify/crawlee-python).
|
|
28
32
|
|
|
29
33
|
## Installation
|
|
30
34
|
|
|
@@ -85,7 +89,7 @@ By default, Crawlee stores data to `./storage` in the current working directory.
|
|
|
85
89
|
We provide automated beta builds for every merged code change in Crawlee. You can find them in the npm [list of releases](https://www.npmjs.com/package/crawlee?activeTab=versions). If you want to test new features or bug fixes before we release them, feel free to install a beta build like this:
|
|
86
90
|
|
|
87
91
|
```bash
|
|
88
|
-
npm install crawlee@
|
|
92
|
+
npm install crawlee@next
|
|
89
93
|
```
|
|
90
94
|
|
|
91
95
|
If you also use the [Apify SDK](https://github.com/apify/apify-sdk-js), you need to specify dependency overrides in your `package.json` file so that you don't end up with multiple versions of Crawlee installed:
|
|
@@ -94,9 +98,9 @@ If you also use the [Apify SDK](https://github.com/apify/apify-sdk-js), you need
|
|
|
94
98
|
{
|
|
95
99
|
"overrides": {
|
|
96
100
|
"apify": {
|
|
97
|
-
"@crawlee/core": "
|
|
98
|
-
"@crawlee/types": "
|
|
99
|
-
"@crawlee/utils": "
|
|
101
|
+
"@crawlee/core": "$crawlee",
|
|
102
|
+
"@crawlee/types": "$crawlee",
|
|
103
|
+
"@crawlee/utils": "$crawlee"
|
|
100
104
|
}
|
|
101
105
|
}
|
|
102
106
|
}
|
package/index.d.ts
CHANGED
package/index.js
CHANGED
|
@@ -1,14 +1,15 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type { Configuration, EnqueueLinksOptions, ErrorHandler, GetUserDataFromRequest, HttpCrawlerOptions, InternalHttpCrawlingContext, InternalHttpHook, RequestHandler, RequestProvider, RouterRoutes, SkippedRequestCallback } from '@crawlee/http';
|
|
1
|
+
import type { BasicCrawlingContext, CrawlingContext, EnqueueLinksOptions, ErrorHandler, GetUserDataFromRequest, HttpCrawlerOptions, InternalHttpCrawlingContext, InternalHttpHook, IRequestManager, RequestHandler, RouterHandler, RouterRoutes, RouteSchemas, RoutesFromSchemas, SkippedRequestCallback } from '@crawlee/http';
|
|
3
2
|
import { HttpCrawler } from '@crawlee/http';
|
|
4
3
|
import type { Dictionary } from '@crawlee/types';
|
|
5
4
|
import { type CheerioRoot, type RobotsTxtFile } from '@crawlee/utils';
|
|
6
5
|
import type { DOMWindow } from 'jsdom';
|
|
7
6
|
import { VirtualConsole } from 'jsdom';
|
|
8
7
|
export type JSDOMErrorHandler<UserData extends Dictionary = any, // with default to Dictionary we cant use a typed router in untyped crawler
|
|
9
|
-
JSONData extends Dictionary = any
|
|
10
|
-
|
|
11
|
-
|
|
8
|
+
JSONData extends Dictionary = any, // with default to Dictionary we cant use a typed router in untyped crawler
|
|
9
|
+
ContextExtension = Dictionary<never>> = ErrorHandler<CrawlingContext, JSDOMCrawlingContext<UserData, JSONData> & ContextExtension>;
|
|
10
|
+
export interface JSDOMCrawlerOptions<ContextExtension = Dictionary<never>, ExtendedContext extends JSDOMCrawlingContext = JSDOMCrawlingContext & ContextExtension, UserData extends Dictionary = any, // with default to Dictionary we cant use a typed router in untyped crawler
|
|
11
|
+
JSONData extends Dictionary = any, // with default to Dictionary we cant use a typed router in untyped crawler
|
|
12
|
+
Routes extends Record<keyof Routes, Dictionary> = Record<string, UserData>> extends HttpCrawlerOptions<JSDOMCrawlingContext<UserData, JSONData>, ContextExtension, ExtendedContext, Routes> {
|
|
12
13
|
/**
|
|
13
14
|
* Download and run scripts.
|
|
14
15
|
*/
|
|
@@ -21,9 +22,10 @@ JSONData extends Dictionary = any> extends HttpCrawlerOptions<JSDOMCrawlingConte
|
|
|
21
22
|
export type JSDOMHook<UserData extends Dictionary = any, // with default to Dictionary we cant use a typed router in untyped crawler
|
|
22
23
|
JSONData extends Dictionary = any> = InternalHttpHook<JSDOMCrawlingContext<UserData, JSONData>>;
|
|
23
24
|
export interface JSDOMCrawlingContext<UserData extends Dictionary = any, // with default to Dictionary we cant use a typed router in untyped crawler
|
|
24
|
-
JSONData extends Dictionary = any> extends InternalHttpCrawlingContext<UserData, JSONData
|
|
25
|
+
JSONData extends Dictionary = any> extends InternalHttpCrawlingContext<UserData, JSONData> {
|
|
25
26
|
window: DOMWindow;
|
|
26
27
|
document: Document;
|
|
28
|
+
body: string;
|
|
27
29
|
/**
|
|
28
30
|
* Wait for an element matching the selector to appear.
|
|
29
31
|
* Timeout defaults to 5s.
|
|
@@ -54,7 +56,7 @@ JSONData extends Dictionary = any> extends InternalHttpCrawlingContext<UserData,
|
|
|
54
56
|
}
|
|
55
57
|
export type JSDOMRequestHandler<UserData extends Dictionary = any, // with default to Dictionary we cant use a typed router in untyped crawler
|
|
56
58
|
JSONData extends Dictionary = any> = RequestHandler<JSDOMCrawlingContext<UserData, JSONData>>;
|
|
57
|
-
export declare class JSDOMCrawler extends HttpCrawler<JSDOMCrawlingContext> {
|
|
59
|
+
export declare class JSDOMCrawler<ContextExtension = Dictionary<never>, ExtendedContext extends JSDOMCrawlingContext = JSDOMCrawlingContext & ContextExtension, Routes extends Record<keyof Routes, Dictionary> = Record<string, GetUserDataFromRequest<JSDOMCrawlingContext['request']>>> extends HttpCrawler<JSDOMCrawlingContext, ContextExtension, ExtendedContext, Routes> {
|
|
58
60
|
protected static optionsShape: {
|
|
59
61
|
// @ts-ignore optional peer dependency or compatibility with es2022
|
|
60
62
|
runScripts: import("ow").BooleanPredicate & import("ow").BasePredicate<boolean | undefined>;
|
|
@@ -71,17 +73,15 @@ export declare class JSDOMCrawler extends HttpCrawler<JSDOMCrawlingContext> {
|
|
|
71
73
|
// @ts-ignore optional peer dependency or compatibility with es2022
|
|
72
74
|
forceResponseEncoding: import("ow").StringPredicate & import("ow").BasePredicate<string | undefined>;
|
|
73
75
|
// @ts-ignore optional peer dependency or compatibility with es2022
|
|
74
|
-
|
|
75
|
-
// @ts-ignore optional peer dependency or compatibility with es2022
|
|
76
|
-
persistCookiesPerSession: import("ow").BooleanPredicate & import("ow").BasePredicate<boolean | undefined>;
|
|
77
|
-
// @ts-ignore optional peer dependency or compatibility with es2022
|
|
78
|
-
additionalHttpErrorStatusCodes: import("ow").ArrayPredicate<number>;
|
|
79
|
-
// @ts-ignore optional peer dependency or compatibility with es2022
|
|
80
|
-
ignoreHttpErrorStatusCodes: import("ow").ArrayPredicate<number>;
|
|
76
|
+
saveResponseCookies: import("ow").BooleanPredicate & import("ow").BasePredicate<boolean | undefined>;
|
|
81
77
|
// @ts-ignore optional peer dependency or compatibility with es2022
|
|
82
78
|
preNavigationHooks: import("ow").ArrayPredicate<unknown> & import("ow").BasePredicate<unknown[] | undefined>;
|
|
83
79
|
// @ts-ignore optional peer dependency or compatibility with es2022
|
|
84
80
|
postNavigationHooks: import("ow").ArrayPredicate<unknown> & import("ow").BasePredicate<unknown[] | undefined>;
|
|
81
|
+
// @ts-ignore optional peer dependency or compatibility with es2022
|
|
82
|
+
contextPipelineBuilder: import("ow").ObjectPredicate<object> & import("ow").BasePredicate<object | undefined>;
|
|
83
|
+
// @ts-ignore optional peer dependency or compatibility with es2022
|
|
84
|
+
extendContext: import("ow").Predicate<Function> & import("ow").BasePredicate<Function | undefined>;
|
|
85
85
|
// @ts-ignore optional peer dependency or compatibility with es2022
|
|
86
86
|
requestList: import("ow").ObjectPredicate<object> & import("ow").BasePredicate<object | undefined>;
|
|
87
87
|
// @ts-ignore optional peer dependency or compatibility with es2022
|
|
@@ -98,28 +98,44 @@ export declare class JSDOMCrawler extends HttpCrawler<JSDOMCrawlingContext> {
|
|
|
98
98
|
maxRequestRetries: import("ow").NumberPredicate & import("ow").BasePredicate<number | undefined>;
|
|
99
99
|
// @ts-ignore optional peer dependency or compatibility with es2022
|
|
100
100
|
sameDomainDelaySecs: import("ow").NumberPredicate & import("ow").BasePredicate<number | undefined>;
|
|
101
|
-
// @ts-ignore optional peer dependency or compatibility with es2022
|
|
102
|
-
maxSessionRotations: import("ow").NumberPredicate & import("ow").BasePredicate<number | undefined>;
|
|
103
101
|
// @ts-ignore optional peer dependency or compatibility with es2022
|
|
104
102
|
maxRequestsPerCrawl: import("ow").NumberPredicate & import("ow").BasePredicate<number | undefined>;
|
|
105
103
|
// @ts-ignore optional peer dependency or compatibility with es2022
|
|
106
|
-
|
|
104
|
+
maxCrawlDepth: import("ow").NumberPredicate & import("ow").BasePredicate<number | undefined>;
|
|
105
|
+
// @ts-ignore optional peer dependency or compatibility with es2022
|
|
106
|
+
taskLoopOptions: import("ow").ObjectPredicate<object> & import("ow").BasePredicate<object | undefined>;
|
|
107
107
|
// @ts-ignore optional peer dependency or compatibility with es2022
|
|
108
|
-
|
|
108
|
+
concurrencySystem: import("ow").ObjectPredicate<object> & import("ow").BasePredicate<object | undefined>;
|
|
109
109
|
// @ts-ignore optional peer dependency or compatibility with es2022
|
|
110
|
-
|
|
110
|
+
sessionPool: import("ow").ObjectPredicate<object> & import("ow").BasePredicate<object | undefined>;
|
|
111
|
+
// @ts-ignore optional peer dependency or compatibility with es2022
|
|
112
|
+
proxyConfiguration: import("ow").ObjectPredicate<object> & import("ow").BasePredicate<object | undefined>;
|
|
111
113
|
// @ts-ignore optional peer dependency or compatibility with es2022
|
|
112
114
|
statusMessageLoggingInterval: import("ow").NumberPredicate & import("ow").BasePredicate<number | undefined>;
|
|
113
115
|
// @ts-ignore optional peer dependency or compatibility with es2022
|
|
114
116
|
statusMessageCallback: import("ow").Predicate<Function> & import("ow").BasePredicate<Function | undefined>;
|
|
117
|
+
// @ts-ignore optional peer dependency or compatibility with es2022
|
|
118
|
+
additionalHttpErrorStatusCodes: import("ow").ArrayPredicate<number>;
|
|
119
|
+
// @ts-ignore optional peer dependency or compatibility with es2022
|
|
120
|
+
ignoreHttpErrorStatusCodes: import("ow").ArrayPredicate<number>;
|
|
121
|
+
// @ts-ignore optional peer dependency or compatibility with es2022
|
|
122
|
+
blockedStatusCodes: import("ow").ArrayPredicate<number>;
|
|
115
123
|
// @ts-ignore optional peer dependency or compatibility with es2022
|
|
116
124
|
retryOnBlocked: import("ow").BooleanPredicate & import("ow").BasePredicate<boolean | undefined>;
|
|
117
125
|
// @ts-ignore optional peer dependency or compatibility with es2022
|
|
118
|
-
respectRobotsTxtFile: import("ow").
|
|
126
|
+
respectRobotsTxtFile: import("ow").AnyPredicate<boolean | object>;
|
|
119
127
|
// @ts-ignore optional peer dependency or compatibility with es2022
|
|
120
128
|
onSkippedRequest: import("ow").Predicate<Function> & import("ow").BasePredicate<Function | undefined>;
|
|
121
129
|
// @ts-ignore optional peer dependency or compatibility with es2022
|
|
122
130
|
httpClient: import("ow").ObjectPredicate<object> & import("ow").BasePredicate<object | undefined>;
|
|
131
|
+
// @ts-ignore optional peer dependency or compatibility with es2022
|
|
132
|
+
configuration: import("ow").ObjectPredicate<object> & import("ow").BasePredicate<object | undefined>;
|
|
133
|
+
// @ts-ignore optional peer dependency or compatibility with es2022
|
|
134
|
+
storageBackend: import("ow").ObjectPredicate<object> & import("ow").BasePredicate<object | undefined>;
|
|
135
|
+
// @ts-ignore optional peer dependency or compatibility with es2022
|
|
136
|
+
eventManager: import("ow").ObjectPredicate<object> & import("ow").BasePredicate<object | undefined>;
|
|
137
|
+
// @ts-ignore optional peer dependency or compatibility with es2022
|
|
138
|
+
logger: import("ow").ObjectPredicate<object> & import("ow").BasePredicate<object | undefined>;
|
|
123
139
|
// @ts-ignore optional peer dependency or compatibility with es2022
|
|
124
140
|
minConcurrency: import("ow").NumberPredicate & import("ow").BasePredicate<number | undefined>;
|
|
125
141
|
// @ts-ignore optional peer dependency or compatibility with es2022
|
|
@@ -128,17 +144,26 @@ export declare class JSDOMCrawler extends HttpCrawler<JSDOMCrawlingContext> {
|
|
|
128
144
|
maxRequestsPerMinute: import("ow").NumberPredicate & import("ow").BasePredicate<number | undefined>;
|
|
129
145
|
// @ts-ignore optional peer dependency or compatibility with es2022
|
|
130
146
|
keepAlive: import("ow").BooleanPredicate & import("ow").BasePredicate<boolean | undefined>;
|
|
131
|
-
// @ts-ignore optional peer dependency or compatibility with es2022
|
|
132
|
-
log: import("ow").ObjectPredicate<object> & import("ow").BasePredicate<object | undefined>;
|
|
133
|
-
// @ts-ignore optional peer dependency or compatibility with es2022
|
|
134
|
-
experiments: import("ow").ObjectPredicate<object> & import("ow").BasePredicate<object | undefined>;
|
|
135
147
|
// @ts-ignore optional peer dependency or compatibility with es2022
|
|
136
148
|
statisticsOptions: import("ow").ObjectPredicate<object> & import("ow").BasePredicate<object | undefined>;
|
|
149
|
+
// @ts-ignore optional peer dependency or compatibility with es2022
|
|
150
|
+
id: import("ow").StringPredicate & import("ow").BasePredicate<string | undefined>;
|
|
137
151
|
};
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
constructor(options?: JSDOMCrawlerOptions,
|
|
152
|
+
private runScripts;
|
|
153
|
+
private hideInternalConsole;
|
|
154
|
+
private virtualConsole;
|
|
155
|
+
constructor(options?: JSDOMCrawlerOptions<ContextExtension, ExtendedContext, any, any, Routes>);
|
|
156
|
+
// @ts-ignore optional peer dependency or compatibility with es2022
|
|
157
|
+
protected buildContextPipeline(): import("@crawlee/http").ContextPipeline<CrawlingContext<Dictionary>, InternalHttpCrawlingContext<any, any> & {
|
|
158
|
+
readonly window: DOMWindow;
|
|
159
|
+
readonly body: string;
|
|
160
|
+
readonly document: Document;
|
|
161
|
+
} & {
|
|
162
|
+
enqueueLinks: (enqueueOptions?: EnqueueLinksOptions) => Promise<unknown>;
|
|
163
|
+
waitForSelector(selector: string, timeoutMs?: number): Promise<void>;
|
|
164
|
+
// @ts-ignore optional peer dependency or compatibility with es2022
|
|
165
|
+
parseWithCheerio(selector?: string, _timeoutMs?: number): Promise<import("cheerio").CheerioAPI>;
|
|
166
|
+
}>;
|
|
142
167
|
/**
|
|
143
168
|
* Returns the currently used `VirtualConsole` instance. Can be used to listen for the JSDOM's internal console messages.
|
|
144
169
|
*
|
|
@@ -155,28 +180,27 @@ export declare class JSDOMCrawler extends HttpCrawler<JSDOMCrawlingContext> {
|
|
|
155
180
|
*/
|
|
156
181
|
getVirtualConsole(): VirtualConsole;
|
|
157
182
|
private readonly jsdomErrorHandler;
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
window: DOMWindow;
|
|
161
|
-
readonly body: string;
|
|
162
|
-
readonly document: Document;
|
|
163
|
-
// @ts-ignore optional peer dependency or compatibility with es2022
|
|
164
|
-
enqueueLinks: (enqueueOptions?: EnqueueLinksOptions) => Promise<import("@crawlee/types").BatchAddRequestsResult>;
|
|
165
|
-
}>;
|
|
166
|
-
_runRequestHandler(context: JSDOMCrawlingContext): Promise<void>;
|
|
183
|
+
private parseContent;
|
|
184
|
+
private addHelpers;
|
|
167
185
|
}
|
|
168
186
|
interface EnqueueLinksInternalOptions {
|
|
169
187
|
options?: EnqueueLinksOptions;
|
|
170
188
|
window: DOMWindow | null;
|
|
171
|
-
|
|
189
|
+
requestManager: IRequestManager;
|
|
172
190
|
robotsTxtFile?: RobotsTxtFile;
|
|
173
191
|
onSkippedRequest?: SkippedRequestCallback;
|
|
174
192
|
originalRequestUrl: string;
|
|
175
193
|
finalRequestUrl?: string;
|
|
176
194
|
}
|
|
195
|
+
interface BoundEnqueueLinksInternalOptions {
|
|
196
|
+
enqueueLinks: BasicCrawlingContext['enqueueLinks'];
|
|
197
|
+
options?: EnqueueLinksOptions;
|
|
198
|
+
window: DOMWindow | null;
|
|
199
|
+
originalRequestUrl: string;
|
|
200
|
+
finalRequestUrl?: string;
|
|
201
|
+
}
|
|
177
202
|
/** @internal */
|
|
178
|
-
|
|
179
|
-
export declare function domCrawlerEnqueueLinks({ options, window, requestQueue, robotsTxtFile, onSkippedRequest, originalRequestUrl, finalRequestUrl, }: EnqueueLinksInternalOptions): Promise<import("@crawlee/types").BatchAddRequestsResult>;
|
|
203
|
+
export declare function domCrawlerEnqueueLinks(options: EnqueueLinksInternalOptions | BoundEnqueueLinksInternalOptions): Promise<unknown>;
|
|
180
204
|
/**
|
|
181
205
|
* Creates new {@link Router} instance that works based on request labels.
|
|
182
206
|
* This instance can then serve as a `requestHandler` of your {@link JSDOMCrawler}.
|
|
@@ -201,7 +225,7 @@ export declare function domCrawlerEnqueueLinks({ options, window, requestQueue,
|
|
|
201
225
|
* await crawler.run();
|
|
202
226
|
* ```
|
|
203
227
|
*/
|
|
204
|
-
|
|
205
|
-
export declare function createJSDOMRouter<Context extends JSDOMCrawlingContext = JSDOMCrawlingContext, UserData extends Dictionary = GetUserDataFromRequest<Context['request']>>(routes?: RouterRoutes<Context, UserData
|
|
228
|
+
export declare function createJSDOMRouter<Context extends JSDOMCrawlingContext = JSDOMCrawlingContext, Routes extends Record<keyof Routes, Dictionary> = Record<string, GetUserDataFromRequest<Context['request']>>>(routes?: RouterRoutes<Context, Routes>): RouterHandler<Context, Routes>;
|
|
229
|
+
export declare function createJSDOMRouter<Context extends JSDOMCrawlingContext = JSDOMCrawlingContext, UserData extends Dictionary = GetUserDataFromRequest<Context['request']>>(routes?: RouterRoutes<Context, Record<string, UserData>>): RouterHandler<Context, Record<string, UserData>>;
|
|
230
|
+
export declare function createJSDOMRouter<Context extends JSDOMCrawlingContext = JSDOMCrawlingContext, const Schemas extends RouteSchemas = RouteSchemas>(schemas: Schemas): RouterHandler<Context, RoutesFromSchemas<Schemas>>;
|
|
206
231
|
export {};
|
|
207
|
-
//# sourceMappingURL=jsdom-crawler.d.ts.map
|