@xberg-io/crawlberg-wasm 1.7.2 → 1.9.0

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xberg-io/crawlberg-wasm",
3
- "version": "1.7.2",
3
+ "version": "1.9.0",
4
4
  "private": false,
5
5
  "description": "High-performance web crawling engine",
6
6
  "license": "MIT",
@@ -153,11 +153,14 @@ export class WasmBrowserConfig {
153
153
  free(): void;
154
154
  [Symbol.dispose](): void;
155
155
  static default(): WasmBrowserConfig;
156
- constructor(mode?: WasmBrowserMode | null, backend?: WasmBrowserBackend | null, timeout?: bigint | null, wait?: WasmBrowserWait | null, blockUrlPatterns?: string[] | null, captureNetworkEvents?: boolean | null, sessionAffinity?: boolean | null, endpoint?: string | null, waitSelector?: string | null, extraWait?: bigint | null, proxy?: WasmProxyConfig | null, evalScript?: string | null, robotsUserAgent?: string | null);
156
+ constructor(mode?: WasmBrowserMode | null, backend?: WasmBrowserBackend | null, timeout?: bigint | null, overallTimeout?: bigint | null, shutdownTimeout?: bigint | null, wait?: WasmBrowserWait | null, blockUrlPatterns?: string[] | null, captureNetworkEvents?: boolean | null, sessionAffinity?: boolean | null, chromeArgs?: string[] | null, endpoint?: string | null, waitSelector?: string | null, extraWait?: bigint | null, proxy?: WasmProxyConfig | null, evalScript?: string | null, robotsUserAgent?: string | null, chromePath?: string | null);
157
157
  get backend(): string;
158
158
  set backend(value: WasmBrowserBackend);
159
159
  blockUrlPatterns: string[];
160
160
  captureNetworkEvents: boolean;
161
+ chromeArgs: string[];
162
+ get chromePath(): string | undefined;
163
+ set chromePath(value: string | null | undefined);
161
164
  get endpoint(): string | undefined;
162
165
  set endpoint(value: string | null | undefined);
163
166
  get evalScript(): string | undefined;
@@ -166,11 +169,15 @@ export class WasmBrowserConfig {
166
169
  set extraWait(value: bigint | null | undefined);
167
170
  get mode(): string;
168
171
  set mode(value: WasmBrowserMode);
172
+ get overallTimeout(): bigint | undefined;
173
+ set overallTimeout(value: bigint | null | undefined);
169
174
  get proxy(): WasmProxyConfig | undefined;
170
175
  set proxy(value: WasmProxyConfig | null | undefined);
171
176
  get robotsUserAgent(): string | undefined;
172
177
  set robotsUserAgent(value: string | null | undefined);
173
178
  sessionAffinity: boolean;
179
+ get shutdownTimeout(): bigint | undefined;
180
+ set shutdownTimeout(value: bigint | null | undefined);
174
181
  get timeout(): bigint | undefined;
175
182
  set timeout(value: bigint | null | undefined);
176
183
  get waitSelector(): string | undefined;
@@ -251,8 +258,9 @@ export class WasmContentConfig {
251
258
  free(): void;
252
259
  [Symbol.dispose](): void;
253
260
  static default(): WasmContentConfig;
254
- constructor(outputFormat?: string | null, preprocessingPreset?: string | null, removeNavigation?: boolean | null, removeForms?: boolean | null, stripTags?: string[] | null, preserveTags?: string[] | null, excludeSelectors?: string[] | null, skipImages?: boolean | null, wrap?: boolean | null, wrapWidth?: number | null, includeDocumentStructure?: boolean | null, maxDepth?: number | null);
261
+ constructor(outputFormat?: string | null, preprocessingPreset?: string | null, removeNavigation?: boolean | null, removeForms?: boolean | null, stripTags?: string[] | null, preserveTags?: string[] | null, excludeSelectors?: string[] | null, skipImages?: boolean | null, wrap?: boolean | null, wrapWidth?: number | null, includeDocumentStructure?: boolean | null, extractMetadata?: boolean | null, maxDepth?: number | null);
255
262
  excludeSelectors: string[];
263
+ extractMetadata: boolean;
256
264
  includeDocumentStructure: boolean;
257
265
  get maxDepth(): number | undefined;
258
266
  set maxDepth(value: number | null | undefined);
@@ -297,7 +305,7 @@ export class WasmCrawlConfig {
297
305
  free(): void;
298
306
  [Symbol.dispose](): void;
299
307
  static default(): WasmCrawlConfig;
300
- constructor(crawlStrategy?: WasmCrawlStrategyKind | null, respectRobotsTxt?: boolean | null, softHttpErrors?: boolean | null, stayOnDomain?: boolean | null, allowSubdomains?: boolean | null, includePaths?: string[] | null, excludePaths?: string[] | null, customHeaders?: any | null, requestTimeout?: bigint | null, maxRedirects?: number | null, retryCount?: number | null, retryCodes?: Uint16Array | null, cookiesEnabled?: boolean | null, removeTags?: string[] | null, content?: WasmContentConfig | null, downloadAssets?: boolean | null, assetTypes?: WasmAssetCategory[] | null, browser?: WasmBrowserConfig | null, userAgents?: string[] | null, captureScreenshot?: boolean | null, followDocumentUrls?: boolean | null, downloadDocuments?: boolean | null, documentMimeTypes?: string[] | null, saveBrowserProfile?: boolean | null, ssrf?: WasmSsrfPolicy | null, maxDepth?: number | null, maxPages?: number | null, maxLinksPerPage?: number | null, maxConcurrent?: number | null, contentFilter?: WasmContentFilterKind | null, bm25Query?: string | null, bm25Threshold?: number | null, userAgent?: string | null, rateLimitMs?: bigint | null, auth?: any | null, maxBodySize?: number | null, mapLimit?: number | null, mapSearch?: string | null, maxAssetSize?: number | null, proxy?: WasmProxyConfig | null, documentUrlDepth?: number | null, documentMaxSize?: number | null, documentOutputDir?: string | null, documentContentEncoding?: WasmDocumentContentEncoding | null, warcOutput?: string | null, browserProfile?: string | null, ssrfDenyPrivateExplicit?: boolean | null);
308
+ constructor(crawlStrategy?: WasmCrawlStrategyKind | null, respectRobotsTxt?: boolean | null, softHttpErrors?: boolean | null, stayOnDomain?: boolean | null, allowSubdomains?: boolean | null, includePaths?: string[] | null, excludePaths?: string[] | null, pathPatternsMatchQuery?: boolean | null, pathPatternsMatchUrl?: boolean | null, dedupIncludeQuery?: boolean | null, stripTrackingParams?: boolean | null, trackingParams?: string[] | null, customHeaders?: any | null, requestTimeout?: bigint | null, maxRedirects?: number | null, retryCount?: number | null, retryCodes?: Uint16Array | null, retryInitialDelayMs?: bigint | null, retryMaxDelayMs?: bigint | null, rateLimitJitterRatio?: number | null, cookiesEnabled?: boolean | null, removeTags?: string[] | null, content?: WasmContentConfig | null, downloadAssets?: boolean | null, assetTypes?: WasmAssetCategory[] | null, browser?: WasmBrowserConfig | null, userAgents?: string[] | null, captureScreenshot?: boolean | null, followDocumentUrls?: boolean | null, downloadDocuments?: boolean | null, documentMimeTypes?: string[] | null, saveBrowserProfile?: boolean | null, ssrf?: WasmSsrfPolicy | null, maxDepth?: number | null, maxPages?: number | null, maxLinksPerPage?: number | null, maxConcurrent?: number | null, contentFilter?: WasmContentFilterKind | null, bm25Query?: string | null, bm25Threshold?: number | null, userAgent?: string | null, rateLimitMs?: bigint | null, auth?: any | null, maxBodySize?: number | null, mapLimit?: number | null, mapSearch?: string | null, maxAssetSize?: number | null, proxy?: WasmProxyConfig | null, documentUrlDepth?: number | null, documentMaxSize?: number | null, documentOutputDir?: string | null, documentContentEncoding?: WasmDocumentContentEncoding | null, warcOutput?: string | null, browserProfile?: string | null, ssrfDenyPrivateExplicit?: boolean | null);
301
309
  /**
302
310
  * Validate the configuration, returning an error if any values are invalid.
303
311
  *
@@ -324,6 +332,7 @@ export class WasmCrawlConfig {
324
332
  get crawlStrategy(): string;
325
333
  set crawlStrategy(value: WasmCrawlStrategyKind);
326
334
  customHeaders: any;
335
+ dedupIncludeQuery: boolean;
327
336
  get documentContentEncoding(): string | undefined;
328
337
  set documentContentEncoding(value: WasmDocumentContentEncoding | null | undefined);
329
338
  get documentMaxSize(): number | undefined;
@@ -355,8 +364,11 @@ export class WasmCrawlConfig {
355
364
  get maxPages(): number | undefined;
356
365
  set maxPages(value: number | null | undefined);
357
366
  maxRedirects: number;
367
+ pathPatternsMatchQuery: boolean;
368
+ pathPatternsMatchUrl: boolean;
358
369
  get proxy(): WasmProxyConfig | undefined;
359
370
  set proxy(value: WasmProxyConfig | null | undefined);
371
+ rateLimitJitterRatio: number;
360
372
  get rateLimitMs(): bigint | undefined;
361
373
  set rateLimitMs(value: bigint | null | undefined);
362
374
  removeTags: string[];
@@ -365,12 +377,16 @@ export class WasmCrawlConfig {
365
377
  respectRobotsTxt: boolean;
366
378
  retryCodes: Uint16Array;
367
379
  retryCount: number;
380
+ retryInitialDelayMs: bigint;
381
+ retryMaxDelayMs: bigint;
368
382
  saveBrowserProfile: boolean;
369
383
  softHttpErrors: boolean;
370
384
  get ssrfDenyPrivateExplicit(): boolean | undefined;
371
385
  set ssrfDenyPrivateExplicit(value: boolean | null | undefined);
372
386
  ssrf: WasmSsrfPolicy;
373
387
  stayOnDomain: boolean;
388
+ stripTrackingParams: boolean;
389
+ trackingParams: string[];
374
390
  get userAgent(): string | undefined;
375
391
  set userAgent(value: string | null | undefined);
376
392
  userAgents: string[];
@@ -397,7 +413,7 @@ export class WasmCrawlPageResult {
397
413
  free(): void;
398
414
  [Symbol.dispose](): void;
399
415
  static default(): WasmCrawlPageResult;
400
- constructor(url?: string | null, normalizedUrl?: string | null, statusCode?: number | null, contentType?: string | null, html?: string | null, bodySize?: number | null, metadata?: WasmPageMetadata | null, links?: WasmLinkInfo[] | null, images?: WasmImageInfo[] | null, feeds?: WasmFeedInfo[] | null, jsonLd?: WasmJsonLdEntry[] | null, depth?: number | null, stayedOnDomain?: boolean | null, wasSkipped?: boolean | null, isPdf?: boolean | null, browserUsed?: boolean | null, detectedCharset?: string | null, markdown?: WasmMarkdownResult | null, extractedData?: any | null, extractionMeta?: WasmExtractionMeta | null, downloadedDocument?: WasmDownloadedDocument | null);
416
+ constructor(url?: string | null, normalizedUrl?: string | null, statusCode?: number | null, contentType?: string | null, html?: string | null, bodySize?: number | null, metadata?: WasmPageMetadata | null, links?: WasmLinkInfo[] | null, images?: WasmImageInfo[] | null, feeds?: WasmFeedInfo[] | null, jsonLd?: WasmJsonLdEntry[] | null, depth?: number | null, stayedOnDomain?: boolean | null, wasSkipped?: boolean | null, isPdf?: boolean | null, browserUsed?: boolean | null, finalUrl?: string | null, redirectCount?: number | null, noindexDetected?: boolean | null, nofollowDetected?: boolean | null, ssrfRefusedUrls?: string[] | null, detectedCharset?: string | null, markdown?: WasmMarkdownResult | null, extractedData?: any | null, extractionMeta?: WasmExtractionMeta | null, downloadedDocument?: WasmDownloadedDocument | null);
401
417
  bodySize: number;
402
418
  browserUsed: boolean;
403
419
  contentType: string;
@@ -411,6 +427,7 @@ export class WasmCrawlPageResult {
411
427
  get extractionMeta(): WasmExtractionMeta | undefined;
412
428
  set extractionMeta(value: WasmExtractionMeta | null | undefined);
413
429
  feeds: WasmFeedInfo[];
430
+ finalUrl: string;
414
431
  html: string;
415
432
  images: WasmImageInfo[];
416
433
  isPdf: boolean;
@@ -419,7 +436,11 @@ export class WasmCrawlPageResult {
419
436
  get markdown(): WasmMarkdownResult | undefined;
420
437
  set markdown(value: WasmMarkdownResult | null | undefined);
421
438
  metadata: WasmPageMetadata;
439
+ nofollowDetected: boolean;
440
+ noindexDetected: boolean;
422
441
  normalizedUrl: string;
442
+ redirectCount: number;
443
+ ssrfRefusedUrls: string[];
423
444
  statusCode: number;
424
445
  stayedOnDomain: boolean;
425
446
  url: string;
@@ -673,12 +694,13 @@ export class WasmInteractionResult {
673
694
  free(): void;
674
695
  [Symbol.dispose](): void;
675
696
  static default(): WasmInteractionResult;
676
- constructor(actionResults?: WasmActionResult[] | null, finalHtml?: string | null, finalUrl?: string | null, screenshotBase64?: string | null);
697
+ constructor(actionResults?: WasmActionResult[] | null, finalHtml?: string | null, finalUrl?: string | null, ssrfRefusedUrls?: string[] | null, screenshotBase64?: string | null);
677
698
  actionResults: WasmActionResult[];
678
699
  finalHtml: string;
679
700
  finalUrl: string;
680
701
  get screenshotBase64(): string | undefined;
681
702
  set screenshotBase64(value: string | null | undefined);
703
+ ssrfRefusedUrls: string[];
682
704
  }
683
705
 
684
706
  /**
@@ -923,7 +945,7 @@ export class WasmScrapeResult {
923
945
  free(): void;
924
946
  [Symbol.dispose](): void;
925
947
  static default(): WasmScrapeResult;
926
- constructor(statusCode?: number | null, finalUrl?: string | null, contentType?: string | null, html?: string | null, bodySize?: number | null, metadata?: WasmPageMetadata | null, links?: WasmLinkInfo[] | null, images?: WasmImageInfo[] | null, feeds?: WasmFeedInfo[] | null, jsonLd?: WasmJsonLdEntry[] | null, isAllowed?: boolean | null, noindexDetected?: boolean | null, nofollowDetected?: boolean | null, isPdf?: boolean | null, wasSkipped?: boolean | null, authHeaderSent?: boolean | null, assets?: WasmDownloadedAsset[] | null, jsRenderHint?: boolean | null, browserUsed?: boolean | null, crawlDelay?: bigint | null, xRobotsTag?: string | null, detectedCharset?: string | null, responseMeta?: WasmResponseMeta | null, markdown?: WasmMarkdownResult | null, extractedData?: any | null, extractionMeta?: WasmExtractionMeta | null, screenshotBase64?: string | null, downloadedDocument?: WasmDownloadedDocument | null, browser?: WasmBrowserExtras | null);
948
+ constructor(statusCode?: number | null, finalUrl?: string | null, contentType?: string | null, html?: string | null, bodySize?: number | null, metadata?: WasmPageMetadata | null, links?: WasmLinkInfo[] | null, images?: WasmImageInfo[] | null, feeds?: WasmFeedInfo[] | null, jsonLd?: WasmJsonLdEntry[] | null, isAllowed?: boolean | null, noindexDetected?: boolean | null, nofollowDetected?: boolean | null, isPdf?: boolean | null, wasSkipped?: boolean | null, authHeaderSent?: boolean | null, assets?: WasmDownloadedAsset[] | null, jsRenderHint?: boolean | null, browserUsed?: boolean | null, ssrfRefusedUrls?: string[] | null, crawlDelay?: bigint | null, xRobotsTag?: string | null, detectedCharset?: string | null, responseMeta?: WasmResponseMeta | null, markdown?: WasmMarkdownResult | null, extractedData?: any | null, extractionMeta?: WasmExtractionMeta | null, screenshotBase64?: string | null, downloadedDocument?: WasmDownloadedDocument | null, browser?: WasmBrowserExtras | null);
927
949
  assets: WasmDownloadedAsset[];
928
950
  authHeaderSent: boolean;
929
951
  bodySize: number;
@@ -959,6 +981,7 @@ export class WasmScrapeResult {
959
981
  set responseMeta(value: WasmResponseMeta | null | undefined);
960
982
  get screenshotBase64(): string | undefined;
961
983
  set screenshotBase64(value: string | null | undefined);
984
+ ssrfRefusedUrls: string[];
962
985
  statusCode: number;
963
986
  wasSkipped: boolean;
964
987
  get xRobotsTag(): string | undefined;