@crawlee/cheerio 4.0.0-beta.85 → 4.0.0-beta.87

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.
@@ -8,7 +8,8 @@ export type CheerioErrorHandler<UserData extends Dictionary = any, // with defau
8
8
  JSONData extends Dictionary = any, // with default to Dictionary we cant use a typed router in untyped crawler
9
9
  ContextExtension = Dictionary<never>> = ErrorHandler<CrawlingContext, CheerioCrawlingContext<UserData, JSONData> & ContextExtension>;
10
10
  export interface CheerioCrawlerOptions<ContextExtension = Dictionary<never>, ExtendedContext extends CheerioCrawlingContext = CheerioCrawlingContext & ContextExtension, UserData extends Dictionary = any, // with default to Dictionary we cant use a typed router in untyped crawler
11
- JSONData extends Dictionary = any> extends HttpCrawlerOptions<CheerioCrawlingContext<UserData, JSONData>, ContextExtension, ExtendedContext> {
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<CheerioCrawlingContext<UserData, JSONData>, ContextExtension, ExtendedContext, Routes> {
12
13
  }
13
14
  export type CheerioHook<UserData extends Dictionary = any, // with default to Dictionary we cant use a typed router in untyped crawler
14
15
  JSONData extends Dictionary = any> = InternalHttpHook<CheerioCrawlingContext<UserData, JSONData>>;
@@ -137,11 +138,11 @@ JSONData extends Dictionary = any> = RequestHandler<CheerioCrawlingContext<UserD
137
138
  * ```
138
139
  * @category Crawlers
139
140
  */
140
- export declare class CheerioCrawler<ContextExtension = Dictionary<never>, ExtendedContext extends CheerioCrawlingContext = CheerioCrawlingContext & ContextExtension> extends HttpCrawler<CheerioCrawlingContext, ContextExtension, ExtendedContext> {
141
+ export declare class CheerioCrawler<ContextExtension = Dictionary<never>, ExtendedContext extends CheerioCrawlingContext = CheerioCrawlingContext & ContextExtension, Routes extends Record<keyof Routes, Dictionary> = Record<string, GetUserDataFromRequest<CheerioCrawlingContext['request']>>> extends HttpCrawler<CheerioCrawlingContext, ContextExtension, ExtendedContext, Routes> {
141
142
  /**
142
143
  * All `CheerioCrawler` parameters are passed via an options object.
143
144
  */
144
- constructor(options?: CheerioCrawlerOptions<ContextExtension, ExtendedContext>);
145
+ constructor(options?: CheerioCrawlerOptions<ContextExtension, ExtendedContext, any, any, Routes>);
145
146
  // @ts-ignore optional peer dependency or compatibility with es2022
146
147
  protected buildContextPipeline(): import("@crawlee/http").ContextPipeline<CrawlingContext<Dictionary>, InternalHttpCrawlingContext<any, any> & {
147
148
  readonly body: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@crawlee/cheerio",
3
- "version": "4.0.0-beta.85",
3
+ "version": "4.0.0-beta.87",
4
4
  "description": "The scalable web crawling and scraping library for JavaScript/Node.js. Enables development of data extraction and web automation jobs (not only) with headless Chrome and Puppeteer.",
5
5
  "engines": {
6
6
  "node": ">=22.0.0"
@@ -47,9 +47,9 @@
47
47
  "access": "public"
48
48
  },
49
49
  "dependencies": {
50
- "@crawlee/http": "4.0.0-beta.85",
51
- "@crawlee/types": "4.0.0-beta.85",
52
- "@crawlee/utils": "4.0.0-beta.85",
50
+ "@crawlee/http": "4.0.0-beta.87",
51
+ "@crawlee/types": "4.0.0-beta.87",
52
+ "@crawlee/utils": "4.0.0-beta.87",
53
53
  "cheerio": "^1.0.0",
54
54
  "htmlparser2": "^10.0.0",
55
55
  "tslib": "^2.8.1"
@@ -61,5 +61,5 @@
61
61
  }
62
62
  }
63
63
  },
64
- "gitHead": "8d6d3cd9da3dc9cb0b7822b28eb317019b6806bc"
64
+ "gitHead": "1b7604cd77b694460aac4448b4555444fa1b2bdb"
65
65
  }