@crawlee/cheerio 4.0.0-beta.77 → 4.0.0-beta.79

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.
@@ -1,11 +1,12 @@
1
- import type { BasicCrawlingContext, EnqueueLinksOptions, ErrorHandler, GetUserDataFromRequest, HttpCrawlerOptions, InternalHttpCrawlingContext, InternalHttpHook, IRequestManager, RequestHandler, RouterHandler, RouterRoutes, RouteSchemas, RoutesFromSchemas, 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';
2
2
  import { HttpCrawler } from '@crawlee/http';
3
3
  import type { BatchAddRequestsResult, Dictionary } from '@crawlee/types';
4
4
  import { type CheerioRoot, type RobotsTxtFile } from '@crawlee/utils';
5
5
  import type { CheerioAPI } from 'cheerio';
6
6
  import * as cheerio from 'cheerio';
7
7
  export type CheerioErrorHandler<UserData extends Dictionary = any, // with default to Dictionary we cant use a typed router in untyped crawler
8
- JSONData extends Dictionary = any> = ErrorHandler<CheerioCrawlingContext<UserData, JSONData>>;
8
+ JSONData extends Dictionary = any, // with default to Dictionary we cant use a typed router in untyped crawler
9
+ ContextExtension = Dictionary<never>> = ErrorHandler<CrawlingContext, CheerioCrawlingContext<UserData, JSONData> & ContextExtension>;
9
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
10
11
  JSONData extends Dictionary = any> extends HttpCrawlerOptions<CheerioCrawlingContext<UserData, JSONData>, ContextExtension, ExtendedContext> {
11
12
  }
@@ -142,7 +143,7 @@ export declare class CheerioCrawler<ContextExtension = Dictionary<never>, Extend
142
143
  */
143
144
  constructor(options?: CheerioCrawlerOptions<ContextExtension, ExtendedContext>);
144
145
  // @ts-ignore optional peer dependency or compatibility with es2022
145
- protected buildContextPipeline(): import("@crawlee/http").ContextPipeline<import("@crawlee/http").CrawlingContext<Dictionary>, InternalHttpCrawlingContext<any, any> & {
146
+ protected buildContextPipeline(): import("@crawlee/http").ContextPipeline<CrawlingContext<Dictionary>, InternalHttpCrawlingContext<any, any> & {
146
147
  readonly body: string;
147
148
  readonly $: CheerioAPI;
148
149
  } & {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@crawlee/cheerio",
3
- "version": "4.0.0-beta.77",
3
+ "version": "4.0.0-beta.79",
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.77",
51
- "@crawlee/types": "4.0.0-beta.77",
52
- "@crawlee/utils": "4.0.0-beta.77",
50
+ "@crawlee/http": "4.0.0-beta.79",
51
+ "@crawlee/types": "4.0.0-beta.79",
52
+ "@crawlee/utils": "4.0.0-beta.79",
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": "671ef0dab0f67275d0db5c289b940ea100ad3ef9"
64
+ "gitHead": "e897f0881c8142a1fd32f315263751296b4f1a22"
65
65
  }