@xberg-io/crawlberg-wasm 1.11.0 → 1.12.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 +3 -3
- package/pkg/bundler/crawlberg_wasm.d.ts +43 -3
- package/pkg/bundler/crawlberg_wasm.js +1 -1
- package/pkg/bundler/crawlberg_wasm_bg.js +214 -17
- package/pkg/bundler/crawlberg_wasm_bg.wasm +0 -0
- package/pkg/bundler/crawlberg_wasm_bg.wasm.d.ts +25 -6
- package/pkg/bundler/package.json +1 -1
- package/pkg/deno/crawlberg_wasm.d.ts +43 -3
- package/pkg/deno/crawlberg_wasm.js +214 -17
- package/pkg/deno/crawlberg_wasm_bg.wasm +0 -0
- package/pkg/deno/crawlberg_wasm_bg.wasm.d.ts +25 -6
- package/pkg/nodejs/crawlberg_wasm.d.ts +43 -3
- package/pkg/nodejs/crawlberg_wasm.js +215 -17
- package/pkg/nodejs/crawlberg_wasm_bg.wasm +0 -0
- package/pkg/nodejs/crawlberg_wasm_bg.wasm.d.ts +25 -6
- package/pkg/nodejs/package.json +1 -1
- package/pkg/web/crawlberg_wasm.d.ts +68 -9
- package/pkg/web/crawlberg_wasm.js +214 -17
- package/pkg/web/crawlberg_wasm_bg.wasm +0 -0
- package/pkg/web/crawlberg_wasm_bg.wasm.d.ts +25 -6
- package/pkg/web/package.json +1 -1
package/package.json
CHANGED
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
}
|
|
11
11
|
],
|
|
12
12
|
"name": "@xberg-io/crawlberg-wasm",
|
|
13
|
-
"version": "1.
|
|
13
|
+
"version": "1.12.0",
|
|
14
14
|
"private": false,
|
|
15
15
|
"description": "High-performance web crawling engine",
|
|
16
16
|
"license": "MIT",
|
|
@@ -45,8 +45,8 @@
|
|
|
45
45
|
"node": ">= 22"
|
|
46
46
|
},
|
|
47
47
|
"devDependencies": {
|
|
48
|
-
"@vitest/coverage-v8": "^5.0.
|
|
49
|
-
"vitest": "^5.0.
|
|
48
|
+
"@vitest/coverage-v8": "^5.0.5",
|
|
49
|
+
"vitest": "^5.0.5"
|
|
50
50
|
},
|
|
51
51
|
"scripts": {
|
|
52
52
|
"build": "wasm-pack build --target nodejs --out-dir pkg/nodejs",
|
|
@@ -260,7 +260,7 @@ export class WasmBrowserConfig {
|
|
|
260
260
|
* keep a handle you already hold, build with `default()` and assign the property instead:
|
|
261
261
|
* the generated setter borrows and leaves your handle alive.
|
|
262
262
|
*/
|
|
263
|
-
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);
|
|
263
|
+
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, scrollContainers?: boolean | null, domQuietWindow?: bigint | null);
|
|
264
264
|
get backend(): string;
|
|
265
265
|
set backend(value: WasmBrowserBackend);
|
|
266
266
|
blockUrlPatterns: string[];
|
|
@@ -268,6 +268,8 @@ export class WasmBrowserConfig {
|
|
|
268
268
|
chromeArgs: string[];
|
|
269
269
|
get chromePath(): string | undefined;
|
|
270
270
|
set chromePath(value: string | null | undefined);
|
|
271
|
+
get domQuietWindow(): bigint | undefined;
|
|
272
|
+
set domQuietWindow(value: bigint | null | undefined);
|
|
271
273
|
get endpoint(): string | undefined;
|
|
272
274
|
set endpoint(value: string | null | undefined);
|
|
273
275
|
get evalScript(): string | undefined;
|
|
@@ -288,6 +290,7 @@ export class WasmBrowserConfig {
|
|
|
288
290
|
set proxy(value: WasmProxyConfig);
|
|
289
291
|
get robotsUserAgent(): string | undefined;
|
|
290
292
|
set robotsUserAgent(value: string | null | undefined);
|
|
293
|
+
scrollContainers: boolean;
|
|
291
294
|
sessionAffinity: boolean;
|
|
292
295
|
get shutdownTimeout(): bigint | undefined;
|
|
293
296
|
set shutdownTimeout(value: bigint | null | undefined);
|
|
@@ -506,7 +509,7 @@ export class WasmCrawlConfig {
|
|
|
506
509
|
* keep a handle you already hold, build with `default()` and assign the property instead:
|
|
507
510
|
* the generated setter borrows and leaves your handle alive.
|
|
508
511
|
*/
|
|
509
|
-
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);
|
|
512
|
+
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, dangerAcceptInvalidCerts?: boolean | null);
|
|
510
513
|
/**
|
|
511
514
|
* Validate the configuration, returning an error if any values are invalid.
|
|
512
515
|
*
|
|
@@ -545,6 +548,7 @@ export class WasmCrawlConfig {
|
|
|
545
548
|
get crawlStrategy(): string;
|
|
546
549
|
set crawlStrategy(value: WasmCrawlStrategyKind);
|
|
547
550
|
customHeaders: any;
|
|
551
|
+
dangerAcceptInvalidCerts: boolean;
|
|
548
552
|
dedupIncludeQuery: boolean;
|
|
549
553
|
get documentContentEncoding(): string | undefined;
|
|
550
554
|
set documentContentEncoding(value: WasmDocumentContentEncoding | null | undefined);
|
|
@@ -754,6 +758,7 @@ export class WasmCrawlPageResult {
|
|
|
754
758
|
export class WasmCrawlResult {
|
|
755
759
|
free(): void;
|
|
756
760
|
[Symbol.dispose](): void;
|
|
761
|
+
clearWafBlock(): void;
|
|
757
762
|
/**
|
|
758
763
|
* Return an independent handle for an ownership-taking API.
|
|
759
764
|
*
|
|
@@ -763,11 +768,16 @@ export class WasmCrawlResult {
|
|
|
763
768
|
copyForTransfer(): WasmCrawlResult;
|
|
764
769
|
static default(): WasmCrawlResult;
|
|
765
770
|
/**
|
|
771
|
+
* Takes ownership of `wafBlock`.
|
|
772
|
+
* wasm-bindgen lowers a by-value class argument through `__destroy_into_raw()`, so each
|
|
773
|
+
* of those handles is dead once this returns. Passing a freshly built value is fine. To
|
|
774
|
+
* keep a handle you already hold, build with `default()` and assign the property instead:
|
|
775
|
+
* the generated setter borrows and leaves your handle alive.
|
|
766
776
|
* Takes ownership of every element in `pages`, `cookies`.
|
|
767
777
|
* wasm-bindgen cannot borrow class values nested in an array. To keep those handles,
|
|
768
778
|
* copy each retained element with `copyForTransfer()` before passing the array.
|
|
769
779
|
*/
|
|
770
|
-
constructor(pages?: WasmCrawlPageResult[] | null, finalUrl?: string | null, redirectCount?: number | null, wasSkipped?: boolean | null, cookies?: WasmCookieInfo[] | null, stayedOnDomain?: boolean | null, browserUsed?: boolean | null, error?: string | null);
|
|
780
|
+
constructor(pages?: WasmCrawlPageResult[] | null, finalUrl?: string | null, redirectCount?: number | null, wasSkipped?: boolean | null, cookies?: WasmCookieInfo[] | null, stayedOnDomain?: boolean | null, browserUsed?: boolean | null, error?: string | null, wafBlock?: WasmWafBlockDetails | null);
|
|
771
781
|
/**
|
|
772
782
|
* Returns the count of unique normalized URLs encountered during crawling.
|
|
773
783
|
*
|
|
@@ -799,6 +809,14 @@ export class WasmCrawlResult {
|
|
|
799
809
|
pages: WasmCrawlPageResult[];
|
|
800
810
|
redirectCount: number;
|
|
801
811
|
stayedOnDomain: boolean;
|
|
812
|
+
/**
|
|
813
|
+
* Returns a detached copy of `wafBlock`.
|
|
814
|
+
*
|
|
815
|
+
* Changes to the returned value do not update this object. To update `wafBlock`,
|
|
816
|
+
* read it, modify the copy, then assign the copy back to `wafBlock`.
|
|
817
|
+
*/
|
|
818
|
+
get wafBlock(): WasmWafBlockDetails | undefined;
|
|
819
|
+
set wafBlock(value: WasmWafBlockDetails);
|
|
802
820
|
wasSkipped: boolean;
|
|
803
821
|
}
|
|
804
822
|
|
|
@@ -1661,6 +1679,28 @@ export class WasmSsrfPolicy {
|
|
|
1661
1679
|
schemeAllowlist: string[];
|
|
1662
1680
|
}
|
|
1663
1681
|
|
|
1682
|
+
/**
|
|
1683
|
+
* Structured context for a WAF-blocked response. <!-- -->
|
|
1684
|
+
*/
|
|
1685
|
+
export class WasmWafBlockDetails {
|
|
1686
|
+
free(): void;
|
|
1687
|
+
[Symbol.dispose](): void;
|
|
1688
|
+
/**
|
|
1689
|
+
* Return an independent handle for an ownership-taking API.
|
|
1690
|
+
*
|
|
1691
|
+
* Use `copyForTransfer()` for each class value placed in an array when the original
|
|
1692
|
+
* handle must remain usable.
|
|
1693
|
+
*/
|
|
1694
|
+
copyForTransfer(): WasmWafBlockDetails;
|
|
1695
|
+
static default(): WasmWafBlockDetails;
|
|
1696
|
+
constructor(vendor?: string | null, status?: number | null, bodyPrefix?: string | null);
|
|
1697
|
+
get bodyPrefix(): string | undefined;
|
|
1698
|
+
set bodyPrefix(value: string | null | undefined);
|
|
1699
|
+
get status(): number | undefined;
|
|
1700
|
+
set status(value: number | null | undefined);
|
|
1701
|
+
vendor: string;
|
|
1702
|
+
}
|
|
1703
|
+
|
|
1664
1704
|
/**
|
|
1665
1705
|
* Crawl multiple seed URLs concurrently, each following links to configured depth.
|
|
1666
1706
|
*/
|
|
@@ -5,5 +5,5 @@ import { __wbg_set_wasm } from "./crawlberg_wasm_bg.js";
|
|
|
5
5
|
__wbg_set_wasm(wasm);
|
|
6
6
|
wasm.__wbindgen_start();
|
|
7
7
|
export {
|
|
8
|
-
WasmActionResult, WasmArticleMetadata, WasmAssetCategory, WasmAuthConfig, WasmBatchCrawlResult, WasmBatchCrawlResults, WasmBatchScrapeResult, WasmBatchScrapeResults, WasmBrowserBackend, WasmBrowserConfig, WasmBrowserExtras, WasmBrowserMode, WasmBrowserWait, WasmCitationReference, WasmCitationResult, WasmContentConfig, WasmContentFilterKind, WasmCookieInfo, WasmCrawlConfig, WasmCrawlEngineHandle, WasmCrawlPageResult, WasmCrawlResult, WasmCrawlStrategyKind, WasmDocumentContentEncoding, WasmDownloadedAsset, WasmDownloadedDocument, WasmExtractionMeta, WasmFaviconInfo, WasmFeedInfo, WasmFeedType, WasmHeadingInfo, WasmHostMatcher, WasmHreflangEntry, WasmImageInfo, WasmImageSource, WasmInteractionResult, WasmJsonLdEntry, WasmLinkInfo, WasmLinkType, WasmMapResult, WasmMarkdownResult, WasmPageAction, WasmPageMetadata, WasmProxyConfig, WasmResponseMeta, WasmScrapeResult, WasmScrollDirection, WasmSitemapUrl, WasmSsrfPolicy, batchCrawl, batchScrape, crawl, createEngine, generateCitations, interact, mapUrls, scrape
|
|
8
|
+
WasmActionResult, WasmArticleMetadata, WasmAssetCategory, WasmAuthConfig, WasmBatchCrawlResult, WasmBatchCrawlResults, WasmBatchScrapeResult, WasmBatchScrapeResults, WasmBrowserBackend, WasmBrowserConfig, WasmBrowserExtras, WasmBrowserMode, WasmBrowserWait, WasmCitationReference, WasmCitationResult, WasmContentConfig, WasmContentFilterKind, WasmCookieInfo, WasmCrawlConfig, WasmCrawlEngineHandle, WasmCrawlPageResult, WasmCrawlResult, WasmCrawlStrategyKind, WasmDocumentContentEncoding, WasmDownloadedAsset, WasmDownloadedDocument, WasmExtractionMeta, WasmFaviconInfo, WasmFeedInfo, WasmFeedType, WasmHeadingInfo, WasmHostMatcher, WasmHreflangEntry, WasmImageInfo, WasmImageSource, WasmInteractionResult, WasmJsonLdEntry, WasmLinkInfo, WasmLinkType, WasmMapResult, WasmMarkdownResult, WasmPageAction, WasmPageMetadata, WasmProxyConfig, WasmResponseMeta, WasmScrapeResult, WasmScrollDirection, WasmSitemapUrl, WasmSsrfPolicy, WasmWafBlockDetails, batchCrawl, batchScrape, crawl, createEngine, generateCitations, interact, mapUrls, scrape
|
|
9
9
|
} from "./crawlberg_wasm_bg.js";
|
|
@@ -1103,6 +1103,13 @@ export class WasmBrowserConfig {
|
|
|
1103
1103
|
const ret = wasm.wasmbrowserconfig_default();
|
|
1104
1104
|
return WasmBrowserConfig.__wrap(ret);
|
|
1105
1105
|
}
|
|
1106
|
+
/**
|
|
1107
|
+
* @returns {bigint | undefined}
|
|
1108
|
+
*/
|
|
1109
|
+
get domQuietWindow() {
|
|
1110
|
+
const ret = wasm.wasmbrowserconfig_domQuietWindow(this.__wbg_ptr);
|
|
1111
|
+
return ret[0] === 0 ? undefined : BigInt.asUintN(64, ret[1]);
|
|
1112
|
+
}
|
|
1106
1113
|
/**
|
|
1107
1114
|
* @returns {string | undefined}
|
|
1108
1115
|
*/
|
|
@@ -1172,8 +1179,10 @@ export class WasmBrowserConfig {
|
|
|
1172
1179
|
* @param {string | null} [evalScript]
|
|
1173
1180
|
* @param {string | null} [robotsUserAgent]
|
|
1174
1181
|
* @param {string | null} [chromePath]
|
|
1182
|
+
* @param {boolean | null} [scrollContainers]
|
|
1183
|
+
* @param {bigint | null} [domQuietWindow]
|
|
1175
1184
|
*/
|
|
1176
|
-
constructor(mode, backend, timeout, overallTimeout, shutdownTimeout, wait, blockUrlPatterns, captureNetworkEvents, sessionAffinity, chromeArgs, endpoint, waitSelector, extraWait, proxy, evalScript, robotsUserAgent, chromePath) {
|
|
1185
|
+
constructor(mode, backend, timeout, overallTimeout, shutdownTimeout, wait, blockUrlPatterns, captureNetworkEvents, sessionAffinity, chromeArgs, endpoint, waitSelector, extraWait, proxy, evalScript, robotsUserAgent, chromePath, scrollContainers, domQuietWindow) {
|
|
1177
1186
|
var ptr0 = isLikeNone(blockUrlPatterns) ? 0 : passArrayJsValueToWasm0(blockUrlPatterns, wasm.__wbindgen_malloc);
|
|
1178
1187
|
var len0 = WASM_VECTOR_LEN;
|
|
1179
1188
|
var ptr1 = isLikeNone(chromeArgs) ? 0 : passArrayJsValueToWasm0(chromeArgs, wasm.__wbindgen_malloc);
|
|
@@ -1193,7 +1202,7 @@ export class WasmBrowserConfig {
|
|
|
1193
1202
|
var len6 = WASM_VECTOR_LEN;
|
|
1194
1203
|
var ptr7 = isLikeNone(chromePath) ? 0 : passStringToWasm0(chromePath, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1195
1204
|
var len7 = WASM_VECTOR_LEN;
|
|
1196
|
-
const ret = wasm.wasmbrowserconfig_new(isLikeNone(mode) ? 4 : mode, isLikeNone(backend) ? 2 : backend, !isLikeNone(timeout), isLikeNone(timeout) ? BigInt(0) : timeout, !isLikeNone(overallTimeout), isLikeNone(overallTimeout) ? BigInt(0) : overallTimeout, !isLikeNone(shutdownTimeout), isLikeNone(shutdownTimeout) ? BigInt(0) : shutdownTimeout, isLikeNone(wait) ? 3 : wait, ptr0, len0, isLikeNone(captureNetworkEvents) ? 0xFFFFFF : captureNetworkEvents ? 1 : 0, isLikeNone(sessionAffinity) ? 0xFFFFFF : sessionAffinity ? 1 : 0, ptr1, len1, ptr2, len2, ptr3, len3, !isLikeNone(extraWait), isLikeNone(extraWait) ? BigInt(0) : extraWait, ptr4, ptr5, len5, ptr6, len6, ptr7, len7);
|
|
1205
|
+
const ret = wasm.wasmbrowserconfig_new(isLikeNone(mode) ? 4 : mode, isLikeNone(backend) ? 2 : backend, !isLikeNone(timeout), isLikeNone(timeout) ? BigInt(0) : timeout, !isLikeNone(overallTimeout), isLikeNone(overallTimeout) ? BigInt(0) : overallTimeout, !isLikeNone(shutdownTimeout), isLikeNone(shutdownTimeout) ? BigInt(0) : shutdownTimeout, isLikeNone(wait) ? 3 : wait, ptr0, len0, isLikeNone(captureNetworkEvents) ? 0xFFFFFF : captureNetworkEvents ? 1 : 0, isLikeNone(sessionAffinity) ? 0xFFFFFF : sessionAffinity ? 1 : 0, ptr1, len1, ptr2, len2, ptr3, len3, !isLikeNone(extraWait), isLikeNone(extraWait) ? BigInt(0) : extraWait, ptr4, ptr5, len5, ptr6, len6, ptr7, len7, isLikeNone(scrollContainers) ? 0xFFFFFF : scrollContainers ? 1 : 0, !isLikeNone(domQuietWindow), isLikeNone(domQuietWindow) ? BigInt(0) : domQuietWindow);
|
|
1197
1206
|
this.__wbg_ptr = ret;
|
|
1198
1207
|
WasmBrowserConfigFinalization.register(this, this.__wbg_ptr, this);
|
|
1199
1208
|
return this;
|
|
@@ -1228,6 +1237,13 @@ export class WasmBrowserConfig {
|
|
|
1228
1237
|
}
|
|
1229
1238
|
return v1;
|
|
1230
1239
|
}
|
|
1240
|
+
/**
|
|
1241
|
+
* @returns {boolean}
|
|
1242
|
+
*/
|
|
1243
|
+
get scrollContainers() {
|
|
1244
|
+
const ret = wasm.wasmbrowserconfig_scrollContainers(this.__wbg_ptr);
|
|
1245
|
+
return ret !== 0;
|
|
1246
|
+
}
|
|
1231
1247
|
/**
|
|
1232
1248
|
* @returns {boolean}
|
|
1233
1249
|
*/
|
|
@@ -1271,6 +1287,12 @@ export class WasmBrowserConfig {
|
|
|
1271
1287
|
var len0 = WASM_VECTOR_LEN;
|
|
1272
1288
|
wasm.wasmbrowserconfig_set_chromePath(this.__wbg_ptr, ptr0, len0);
|
|
1273
1289
|
}
|
|
1290
|
+
/**
|
|
1291
|
+
* @param {bigint | null} [value]
|
|
1292
|
+
*/
|
|
1293
|
+
set domQuietWindow(value) {
|
|
1294
|
+
wasm.wasmbrowserconfig_set_domQuietWindow(this.__wbg_ptr, !isLikeNone(value), isLikeNone(value) ? BigInt(0) : value);
|
|
1295
|
+
}
|
|
1274
1296
|
/**
|
|
1275
1297
|
* @param {string | null} [value]
|
|
1276
1298
|
*/
|
|
@@ -1320,6 +1342,12 @@ export class WasmBrowserConfig {
|
|
|
1320
1342
|
var len0 = WASM_VECTOR_LEN;
|
|
1321
1343
|
wasm.wasmbrowserconfig_set_robotsUserAgent(this.__wbg_ptr, ptr0, len0);
|
|
1322
1344
|
}
|
|
1345
|
+
/**
|
|
1346
|
+
* @param {boolean} value
|
|
1347
|
+
*/
|
|
1348
|
+
set scrollContainers(value) {
|
|
1349
|
+
wasm.wasmbrowserconfig_set_scrollContainers(this.__wbg_ptr, value);
|
|
1350
|
+
}
|
|
1323
1351
|
/**
|
|
1324
1352
|
* @param {boolean} value
|
|
1325
1353
|
*/
|
|
@@ -2493,6 +2521,13 @@ export class WasmCrawlConfig {
|
|
|
2493
2521
|
const ret = wasm.wasmcrawlconfig_customHeaders(this.__wbg_ptr);
|
|
2494
2522
|
return ret;
|
|
2495
2523
|
}
|
|
2524
|
+
/**
|
|
2525
|
+
* @returns {boolean}
|
|
2526
|
+
*/
|
|
2527
|
+
get dangerAcceptInvalidCerts() {
|
|
2528
|
+
const ret = wasm.wasmcrawlconfig_dangerAcceptInvalidCerts(this.__wbg_ptr);
|
|
2529
|
+
return ret !== 0;
|
|
2530
|
+
}
|
|
2496
2531
|
/**
|
|
2497
2532
|
* @returns {boolean}
|
|
2498
2533
|
*/
|
|
@@ -2722,8 +2757,9 @@ export class WasmCrawlConfig {
|
|
|
2722
2757
|
* @param {string | null} [warcOutput]
|
|
2723
2758
|
* @param {string | null} [browserProfile]
|
|
2724
2759
|
* @param {boolean | null} [ssrfDenyPrivateExplicit]
|
|
2760
|
+
* @param {boolean | null} [dangerAcceptInvalidCerts]
|
|
2725
2761
|
*/
|
|
2726
|
-
constructor(crawlStrategy, respectRobotsTxt, softHttpErrors, stayOnDomain, allowSubdomains, includePaths, excludePaths, pathPatternsMatchQuery, pathPatternsMatchUrl, dedupIncludeQuery, stripTrackingParams, trackingParams, customHeaders, requestTimeout, maxRedirects, retryCount, retryCodes, retryInitialDelayMs, retryMaxDelayMs, rateLimitJitterRatio, cookiesEnabled, removeTags, content, downloadAssets, assetTypes, browser, userAgents, captureScreenshot, followDocumentUrls, downloadDocuments, documentMimeTypes, saveBrowserProfile, ssrf, maxDepth, maxPages, maxLinksPerPage, maxConcurrent, contentFilter, bm25Query, bm25Threshold, userAgent, rateLimitMs, auth, maxBodySize, mapLimit, mapSearch, maxAssetSize, proxy, documentUrlDepth, documentMaxSize, documentOutputDir, documentContentEncoding, warcOutput, browserProfile, ssrfDenyPrivateExplicit) {
|
|
2762
|
+
constructor(crawlStrategy, respectRobotsTxt, softHttpErrors, stayOnDomain, allowSubdomains, includePaths, excludePaths, pathPatternsMatchQuery, pathPatternsMatchUrl, dedupIncludeQuery, stripTrackingParams, trackingParams, customHeaders, requestTimeout, maxRedirects, retryCount, retryCodes, retryInitialDelayMs, retryMaxDelayMs, rateLimitJitterRatio, cookiesEnabled, removeTags, content, downloadAssets, assetTypes, browser, userAgents, captureScreenshot, followDocumentUrls, downloadDocuments, documentMimeTypes, saveBrowserProfile, ssrf, maxDepth, maxPages, maxLinksPerPage, maxConcurrent, contentFilter, bm25Query, bm25Threshold, userAgent, rateLimitMs, auth, maxBodySize, mapLimit, mapSearch, maxAssetSize, proxy, documentUrlDepth, documentMaxSize, documentOutputDir, documentContentEncoding, warcOutput, browserProfile, ssrfDenyPrivateExplicit, dangerAcceptInvalidCerts) {
|
|
2727
2763
|
var ptr0 = isLikeNone(includePaths) ? 0 : passArrayJsValueToWasm0(includePaths, wasm.__wbindgen_malloc);
|
|
2728
2764
|
var len0 = WASM_VECTOR_LEN;
|
|
2729
2765
|
var ptr1 = isLikeNone(excludePaths) ? 0 : passArrayJsValueToWasm0(excludePaths, wasm.__wbindgen_malloc);
|
|
@@ -2772,7 +2808,7 @@ export class WasmCrawlConfig {
|
|
|
2772
2808
|
var len16 = WASM_VECTOR_LEN;
|
|
2773
2809
|
var ptr17 = isLikeNone(browserProfile) ? 0 : passStringToWasm0(browserProfile, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
2774
2810
|
var len17 = WASM_VECTOR_LEN;
|
|
2775
|
-
const ret = wasm.wasmcrawlconfig_new(isLikeNone(crawlStrategy) ? 4 : crawlStrategy, isLikeNone(respectRobotsTxt) ? 0xFFFFFF : respectRobotsTxt ? 1 : 0, isLikeNone(softHttpErrors) ? 0xFFFFFF : softHttpErrors ? 1 : 0, isLikeNone(stayOnDomain) ? 0xFFFFFF : stayOnDomain ? 1 : 0, isLikeNone(allowSubdomains) ? 0xFFFFFF : allowSubdomains ? 1 : 0, ptr0, len0, ptr1, len1, isLikeNone(pathPatternsMatchQuery) ? 0xFFFFFF : pathPatternsMatchQuery ? 1 : 0, isLikeNone(pathPatternsMatchUrl) ? 0xFFFFFF : pathPatternsMatchUrl ? 1 : 0, isLikeNone(dedupIncludeQuery) ? 0xFFFFFF : dedupIncludeQuery ? 1 : 0, isLikeNone(stripTrackingParams) ? 0xFFFFFF : stripTrackingParams ? 1 : 0, ptr2, len2, isLikeNone(customHeaders) ? 0 : addToExternrefTable0(customHeaders), !isLikeNone(requestTimeout), isLikeNone(requestTimeout) ? BigInt(0) : requestTimeout, isLikeNone(maxRedirects) ? Number.MAX_SAFE_INTEGER : (maxRedirects) >>> 0, isLikeNone(retryCount) ? Number.MAX_SAFE_INTEGER : (retryCount) >>> 0, ptr3, len3, !isLikeNone(retryInitialDelayMs), isLikeNone(retryInitialDelayMs) ? BigInt(0) : retryInitialDelayMs, !isLikeNone(retryMaxDelayMs), isLikeNone(retryMaxDelayMs) ? BigInt(0) : retryMaxDelayMs, !isLikeNone(rateLimitJitterRatio), isLikeNone(rateLimitJitterRatio) ? 0 : rateLimitJitterRatio, isLikeNone(cookiesEnabled) ? 0xFFFFFF : cookiesEnabled ? 1 : 0, ptr4, len4, ptr5, isLikeNone(downloadAssets) ? 0xFFFFFF : downloadAssets ? 1 : 0, ptr6, len6, ptr7, ptr8, len8, isLikeNone(captureScreenshot) ? 0xFFFFFF : captureScreenshot ? 1 : 0, isLikeNone(followDocumentUrls) ? 0xFFFFFF : followDocumentUrls ? 1 : 0, isLikeNone(downloadDocuments) ? 0xFFFFFF : downloadDocuments ? 1 : 0, ptr9, len9, isLikeNone(saveBrowserProfile) ? 0xFFFFFF : saveBrowserProfile ? 1 : 0, ptr10, isLikeNone(maxDepth) ? Number.MAX_SAFE_INTEGER : (maxDepth) >>> 0, isLikeNone(maxPages) ? Number.MAX_SAFE_INTEGER : (maxPages) >>> 0, isLikeNone(maxLinksPerPage) ? Number.MAX_SAFE_INTEGER : (maxLinksPerPage) >>> 0, isLikeNone(maxConcurrent) ? Number.MAX_SAFE_INTEGER : (maxConcurrent) >>> 0, isLikeNone(contentFilter) ? 1 : contentFilter, ptr11, len11, !isLikeNone(bm25Threshold), isLikeNone(bm25Threshold) ? 0 : bm25Threshold, ptr12, len12, !isLikeNone(rateLimitMs), isLikeNone(rateLimitMs) ? BigInt(0) : rateLimitMs, isLikeNone(auth) ? 0 : addToExternrefTable0(auth), isLikeNone(maxBodySize) ? Number.MAX_SAFE_INTEGER : (maxBodySize) >>> 0, isLikeNone(mapLimit) ? Number.MAX_SAFE_INTEGER : (mapLimit) >>> 0, ptr13, len13, isLikeNone(maxAssetSize) ? Number.MAX_SAFE_INTEGER : (maxAssetSize) >>> 0, ptr14, isLikeNone(documentUrlDepth) ? Number.MAX_SAFE_INTEGER : (documentUrlDepth) >>> 0, isLikeNone(documentMaxSize) ? Number.MAX_SAFE_INTEGER : (documentMaxSize) >>> 0, ptr15, len15, isLikeNone(documentContentEncoding) ? 1 : documentContentEncoding, ptr16, len16, ptr17, len17, isLikeNone(ssrfDenyPrivateExplicit) ? 0xFFFFFF : ssrfDenyPrivateExplicit ? 1 : 0);
|
|
2811
|
+
const ret = wasm.wasmcrawlconfig_new(isLikeNone(crawlStrategy) ? 4 : crawlStrategy, isLikeNone(respectRobotsTxt) ? 0xFFFFFF : respectRobotsTxt ? 1 : 0, isLikeNone(softHttpErrors) ? 0xFFFFFF : softHttpErrors ? 1 : 0, isLikeNone(stayOnDomain) ? 0xFFFFFF : stayOnDomain ? 1 : 0, isLikeNone(allowSubdomains) ? 0xFFFFFF : allowSubdomains ? 1 : 0, ptr0, len0, ptr1, len1, isLikeNone(pathPatternsMatchQuery) ? 0xFFFFFF : pathPatternsMatchQuery ? 1 : 0, isLikeNone(pathPatternsMatchUrl) ? 0xFFFFFF : pathPatternsMatchUrl ? 1 : 0, isLikeNone(dedupIncludeQuery) ? 0xFFFFFF : dedupIncludeQuery ? 1 : 0, isLikeNone(stripTrackingParams) ? 0xFFFFFF : stripTrackingParams ? 1 : 0, ptr2, len2, isLikeNone(customHeaders) ? 0 : addToExternrefTable0(customHeaders), !isLikeNone(requestTimeout), isLikeNone(requestTimeout) ? BigInt(0) : requestTimeout, isLikeNone(maxRedirects) ? Number.MAX_SAFE_INTEGER : (maxRedirects) >>> 0, isLikeNone(retryCount) ? Number.MAX_SAFE_INTEGER : (retryCount) >>> 0, ptr3, len3, !isLikeNone(retryInitialDelayMs), isLikeNone(retryInitialDelayMs) ? BigInt(0) : retryInitialDelayMs, !isLikeNone(retryMaxDelayMs), isLikeNone(retryMaxDelayMs) ? BigInt(0) : retryMaxDelayMs, !isLikeNone(rateLimitJitterRatio), isLikeNone(rateLimitJitterRatio) ? 0 : rateLimitJitterRatio, isLikeNone(cookiesEnabled) ? 0xFFFFFF : cookiesEnabled ? 1 : 0, ptr4, len4, ptr5, isLikeNone(downloadAssets) ? 0xFFFFFF : downloadAssets ? 1 : 0, ptr6, len6, ptr7, ptr8, len8, isLikeNone(captureScreenshot) ? 0xFFFFFF : captureScreenshot ? 1 : 0, isLikeNone(followDocumentUrls) ? 0xFFFFFF : followDocumentUrls ? 1 : 0, isLikeNone(downloadDocuments) ? 0xFFFFFF : downloadDocuments ? 1 : 0, ptr9, len9, isLikeNone(saveBrowserProfile) ? 0xFFFFFF : saveBrowserProfile ? 1 : 0, ptr10, isLikeNone(maxDepth) ? Number.MAX_SAFE_INTEGER : (maxDepth) >>> 0, isLikeNone(maxPages) ? Number.MAX_SAFE_INTEGER : (maxPages) >>> 0, isLikeNone(maxLinksPerPage) ? Number.MAX_SAFE_INTEGER : (maxLinksPerPage) >>> 0, isLikeNone(maxConcurrent) ? Number.MAX_SAFE_INTEGER : (maxConcurrent) >>> 0, isLikeNone(contentFilter) ? 1 : contentFilter, ptr11, len11, !isLikeNone(bm25Threshold), isLikeNone(bm25Threshold) ? 0 : bm25Threshold, ptr12, len12, !isLikeNone(rateLimitMs), isLikeNone(rateLimitMs) ? BigInt(0) : rateLimitMs, isLikeNone(auth) ? 0 : addToExternrefTable0(auth), isLikeNone(maxBodySize) ? Number.MAX_SAFE_INTEGER : (maxBodySize) >>> 0, isLikeNone(mapLimit) ? Number.MAX_SAFE_INTEGER : (mapLimit) >>> 0, ptr13, len13, isLikeNone(maxAssetSize) ? Number.MAX_SAFE_INTEGER : (maxAssetSize) >>> 0, ptr14, isLikeNone(documentUrlDepth) ? Number.MAX_SAFE_INTEGER : (documentUrlDepth) >>> 0, isLikeNone(documentMaxSize) ? Number.MAX_SAFE_INTEGER : (documentMaxSize) >>> 0, ptr15, len15, isLikeNone(documentContentEncoding) ? 1 : documentContentEncoding, ptr16, len16, ptr17, len17, isLikeNone(ssrfDenyPrivateExplicit) ? 0xFFFFFF : ssrfDenyPrivateExplicit ? 1 : 0, isLikeNone(dangerAcceptInvalidCerts) ? 0xFFFFFF : dangerAcceptInvalidCerts ? 1 : 0);
|
|
2776
2812
|
this.__wbg_ptr = ret;
|
|
2777
2813
|
WasmCrawlConfigFinalization.register(this, this.__wbg_ptr, this);
|
|
2778
2814
|
return this;
|
|
@@ -2962,6 +2998,12 @@ export class WasmCrawlConfig {
|
|
|
2962
2998
|
set customHeaders(value) {
|
|
2963
2999
|
wasm.wasmcrawlconfig_set_customHeaders(this.__wbg_ptr, value);
|
|
2964
3000
|
}
|
|
3001
|
+
/**
|
|
3002
|
+
* @param {boolean} value
|
|
3003
|
+
*/
|
|
3004
|
+
set dangerAcceptInvalidCerts(value) {
|
|
3005
|
+
wasm.wasmcrawlconfig_set_dangerAcceptInvalidCerts(this.__wbg_ptr, value);
|
|
3006
|
+
}
|
|
2965
3007
|
/**
|
|
2966
3008
|
* @param {boolean} value
|
|
2967
3009
|
*/
|
|
@@ -4027,6 +4069,9 @@ export class WasmCrawlResult {
|
|
|
4027
4069
|
const ret = wasm.wasmcrawlresult_browserUsed(this.__wbg_ptr);
|
|
4028
4070
|
return ret !== 0;
|
|
4029
4071
|
}
|
|
4072
|
+
clearWafBlock() {
|
|
4073
|
+
wasm.wasmcrawlresult_clearWafBlock(this.__wbg_ptr);
|
|
4074
|
+
}
|
|
4030
4075
|
/**
|
|
4031
4076
|
* Returns detached copies of the elements in `cookies`.
|
|
4032
4077
|
*
|
|
@@ -4086,6 +4131,11 @@ export class WasmCrawlResult {
|
|
|
4086
4131
|
}
|
|
4087
4132
|
}
|
|
4088
4133
|
/**
|
|
4134
|
+
* Takes ownership of `wafBlock`.
|
|
4135
|
+
* wasm-bindgen lowers a by-value class argument through `__destroy_into_raw()`, so each
|
|
4136
|
+
* of those handles is dead once this returns. Passing a freshly built value is fine. To
|
|
4137
|
+
* keep a handle you already hold, build with `default()` and assign the property instead:
|
|
4138
|
+
* the generated setter borrows and leaves your handle alive.
|
|
4089
4139
|
* Takes ownership of every element in `pages`, `cookies`.
|
|
4090
4140
|
* wasm-bindgen cannot borrow class values nested in an array. To keep those handles,
|
|
4091
4141
|
* copy each retained element with `copyForTransfer()` before passing the array.
|
|
@@ -4097,8 +4147,9 @@ export class WasmCrawlResult {
|
|
|
4097
4147
|
* @param {boolean | null} [stayedOnDomain]
|
|
4098
4148
|
* @param {boolean | null} [browserUsed]
|
|
4099
4149
|
* @param {string | null} [error]
|
|
4150
|
+
* @param {WasmWafBlockDetails | null} [wafBlock]
|
|
4100
4151
|
*/
|
|
4101
|
-
constructor(pages, finalUrl, redirectCount, wasSkipped, cookies, stayedOnDomain, browserUsed, error) {
|
|
4152
|
+
constructor(pages, finalUrl, redirectCount, wasSkipped, cookies, stayedOnDomain, browserUsed, error, wafBlock) {
|
|
4102
4153
|
var ptr0 = isLikeNone(pages) ? 0 : passArrayJsValueToWasm0(pages, wasm.__wbindgen_malloc);
|
|
4103
4154
|
var len0 = WASM_VECTOR_LEN;
|
|
4104
4155
|
var ptr1 = isLikeNone(finalUrl) ? 0 : passStringToWasm0(finalUrl, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
@@ -4107,7 +4158,12 @@ export class WasmCrawlResult {
|
|
|
4107
4158
|
var len2 = WASM_VECTOR_LEN;
|
|
4108
4159
|
var ptr3 = isLikeNone(error) ? 0 : passStringToWasm0(error, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
4109
4160
|
var len3 = WASM_VECTOR_LEN;
|
|
4110
|
-
|
|
4161
|
+
let ptr4 = 0;
|
|
4162
|
+
if (!isLikeNone(wafBlock)) {
|
|
4163
|
+
_assertClass(wafBlock, WasmWafBlockDetails);
|
|
4164
|
+
ptr4 = wafBlock.__destroy_into_raw();
|
|
4165
|
+
}
|
|
4166
|
+
const ret = wasm.wasmcrawlresult_new(ptr0, len0, ptr1, len1, isLikeNone(redirectCount) ? Number.MAX_SAFE_INTEGER : (redirectCount) >>> 0, isLikeNone(wasSkipped) ? 0xFFFFFF : wasSkipped ? 1 : 0, ptr2, len2, isLikeNone(stayedOnDomain) ? 0xFFFFFF : stayedOnDomain ? 1 : 0, isLikeNone(browserUsed) ? 0xFFFFFF : browserUsed ? 1 : 0, ptr3, len3, ptr4);
|
|
4111
4167
|
this.__wbg_ptr = ret;
|
|
4112
4168
|
WasmCrawlResultFinalization.register(this, this.__wbg_ptr, this);
|
|
4113
4169
|
return this;
|
|
@@ -4188,6 +4244,13 @@ export class WasmCrawlResult {
|
|
|
4188
4244
|
set stayedOnDomain(value) {
|
|
4189
4245
|
wasm.wasmcrawlresult_set_stayedOnDomain(this.__wbg_ptr, value);
|
|
4190
4246
|
}
|
|
4247
|
+
/**
|
|
4248
|
+
* @param {WasmWafBlockDetails} value
|
|
4249
|
+
*/
|
|
4250
|
+
set wafBlock(value) {
|
|
4251
|
+
_assertClass(value, WasmWafBlockDetails);
|
|
4252
|
+
wasm.wasmcrawlresult_set_wafBlock(this.__wbg_ptr, value.__wbg_ptr);
|
|
4253
|
+
}
|
|
4191
4254
|
/**
|
|
4192
4255
|
* @param {boolean} value
|
|
4193
4256
|
*/
|
|
@@ -4216,6 +4279,17 @@ export class WasmCrawlResult {
|
|
|
4216
4279
|
const ret = wasm.wasmcrawlresult_uniqueNormalizedUrls(this.__wbg_ptr);
|
|
4217
4280
|
return ret >>> 0;
|
|
4218
4281
|
}
|
|
4282
|
+
/**
|
|
4283
|
+
* Returns a detached copy of `wafBlock`.
|
|
4284
|
+
*
|
|
4285
|
+
* Changes to the returned value do not update this object. To update `wafBlock`,
|
|
4286
|
+
* read it, modify the copy, then assign the copy back to `wafBlock`.
|
|
4287
|
+
* @returns {WasmWafBlockDetails | undefined}
|
|
4288
|
+
*/
|
|
4289
|
+
get wafBlock() {
|
|
4290
|
+
const ret = wasm.wasmcrawlresult_wafBlock(this.__wbg_ptr);
|
|
4291
|
+
return ret === 0 ? undefined : WasmWafBlockDetails.__wrap(ret);
|
|
4292
|
+
}
|
|
4219
4293
|
/**
|
|
4220
4294
|
* @returns {boolean}
|
|
4221
4295
|
*/
|
|
@@ -8887,6 +8961,118 @@ export class WasmSsrfPolicy {
|
|
|
8887
8961
|
}
|
|
8888
8962
|
if (Symbol.dispose) WasmSsrfPolicy.prototype[Symbol.dispose] = WasmSsrfPolicy.prototype.free;
|
|
8889
8963
|
|
|
8964
|
+
/**
|
|
8965
|
+
* Structured context for a WAF-blocked response. <!-- -->
|
|
8966
|
+
*/
|
|
8967
|
+
export class WasmWafBlockDetails {
|
|
8968
|
+
static __wrap(ptr) {
|
|
8969
|
+
const obj = Object.create(WasmWafBlockDetails.prototype);
|
|
8970
|
+
obj.__wbg_ptr = ptr;
|
|
8971
|
+
WasmWafBlockDetailsFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
8972
|
+
return obj;
|
|
8973
|
+
}
|
|
8974
|
+
__destroy_into_raw() {
|
|
8975
|
+
const ptr = this.__wbg_ptr;
|
|
8976
|
+
this.__wbg_ptr = 0;
|
|
8977
|
+
WasmWafBlockDetailsFinalization.unregister(this);
|
|
8978
|
+
return ptr;
|
|
8979
|
+
}
|
|
8980
|
+
free() {
|
|
8981
|
+
const ptr = this.__destroy_into_raw();
|
|
8982
|
+
wasm.__wbg_wasmwafblockdetails_free(ptr, 0);
|
|
8983
|
+
}
|
|
8984
|
+
/**
|
|
8985
|
+
* @returns {string | undefined}
|
|
8986
|
+
*/
|
|
8987
|
+
get bodyPrefix() {
|
|
8988
|
+
const ret = wasm.wasmwafblockdetails_bodyPrefix(this.__wbg_ptr);
|
|
8989
|
+
let v1;
|
|
8990
|
+
if (ret[0] !== 0) {
|
|
8991
|
+
v1 = getStringFromWasm0(ret[0], ret[1]);
|
|
8992
|
+
wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
|
|
8993
|
+
}
|
|
8994
|
+
return v1;
|
|
8995
|
+
}
|
|
8996
|
+
/**
|
|
8997
|
+
* Return an independent handle for an ownership-taking API.
|
|
8998
|
+
*
|
|
8999
|
+
* Use `copyForTransfer()` for each class value placed in an array when the original
|
|
9000
|
+
* handle must remain usable.
|
|
9001
|
+
* @returns {WasmWafBlockDetails}
|
|
9002
|
+
*/
|
|
9003
|
+
copyForTransfer() {
|
|
9004
|
+
const ret = wasm.wasmwafblockdetails_copyForTransfer(this.__wbg_ptr);
|
|
9005
|
+
return WasmWafBlockDetails.__wrap(ret);
|
|
9006
|
+
}
|
|
9007
|
+
/**
|
|
9008
|
+
* @returns {WasmWafBlockDetails}
|
|
9009
|
+
*/
|
|
9010
|
+
static default() {
|
|
9011
|
+
const ret = wasm.wasmwafblockdetails_default();
|
|
9012
|
+
return WasmWafBlockDetails.__wrap(ret);
|
|
9013
|
+
}
|
|
9014
|
+
/**
|
|
9015
|
+
* @param {string | null} [vendor]
|
|
9016
|
+
* @param {number | null} [status]
|
|
9017
|
+
* @param {string | null} [bodyPrefix]
|
|
9018
|
+
*/
|
|
9019
|
+
constructor(vendor, status, bodyPrefix) {
|
|
9020
|
+
var ptr0 = isLikeNone(vendor) ? 0 : passStringToWasm0(vendor, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
9021
|
+
var len0 = WASM_VECTOR_LEN;
|
|
9022
|
+
var ptr1 = isLikeNone(bodyPrefix) ? 0 : passStringToWasm0(bodyPrefix, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
9023
|
+
var len1 = WASM_VECTOR_LEN;
|
|
9024
|
+
const ret = wasm.wasmwafblockdetails_new(ptr0, len0, isLikeNone(status) ? 0xFFFFFF : status, ptr1, len1);
|
|
9025
|
+
this.__wbg_ptr = ret;
|
|
9026
|
+
WasmWafBlockDetailsFinalization.register(this, this.__wbg_ptr, this);
|
|
9027
|
+
return this;
|
|
9028
|
+
}
|
|
9029
|
+
/**
|
|
9030
|
+
* @param {string | null} [value]
|
|
9031
|
+
*/
|
|
9032
|
+
set bodyPrefix(value) {
|
|
9033
|
+
var ptr0 = isLikeNone(value) ? 0 : passStringToWasm0(value, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
9034
|
+
var len0 = WASM_VECTOR_LEN;
|
|
9035
|
+
wasm.wasmwafblockdetails_set_bodyPrefix(this.__wbg_ptr, ptr0, len0);
|
|
9036
|
+
}
|
|
9037
|
+
/**
|
|
9038
|
+
* @param {number | null} [value]
|
|
9039
|
+
*/
|
|
9040
|
+
set status(value) {
|
|
9041
|
+
wasm.wasmwafblockdetails_set_status(this.__wbg_ptr, isLikeNone(value) ? 0xFFFFFF : value);
|
|
9042
|
+
}
|
|
9043
|
+
/**
|
|
9044
|
+
* @param {string} value
|
|
9045
|
+
*/
|
|
9046
|
+
set vendor(value) {
|
|
9047
|
+
const ptr0 = passStringToWasm0(value, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
9048
|
+
const len0 = WASM_VECTOR_LEN;
|
|
9049
|
+
wasm.wasmwafblockdetails_set_vendor(this.__wbg_ptr, ptr0, len0);
|
|
9050
|
+
}
|
|
9051
|
+
/**
|
|
9052
|
+
* @returns {number | undefined}
|
|
9053
|
+
*/
|
|
9054
|
+
get status() {
|
|
9055
|
+
const ret = wasm.wasmwafblockdetails_status(this.__wbg_ptr);
|
|
9056
|
+
return ret === 0xFFFFFF ? undefined : ret;
|
|
9057
|
+
}
|
|
9058
|
+
/**
|
|
9059
|
+
* @returns {string}
|
|
9060
|
+
*/
|
|
9061
|
+
get vendor() {
|
|
9062
|
+
let deferred1_0;
|
|
9063
|
+
let deferred1_1;
|
|
9064
|
+
try {
|
|
9065
|
+
const ret = wasm.wasmwafblockdetails_vendor(this.__wbg_ptr);
|
|
9066
|
+
deferred1_0 = ret[0];
|
|
9067
|
+
deferred1_1 = ret[1];
|
|
9068
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
9069
|
+
} finally {
|
|
9070
|
+
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
9071
|
+
}
|
|
9072
|
+
}
|
|
9073
|
+
}
|
|
9074
|
+
if (Symbol.dispose) WasmWafBlockDetails.prototype[Symbol.dispose] = WasmWafBlockDetails.prototype.free;
|
|
9075
|
+
|
|
8890
9076
|
/**
|
|
8891
9077
|
* Crawl multiple seed URLs concurrently, each following links to configured depth.
|
|
8892
9078
|
* @param {WasmCrawlEngineHandle} engine
|
|
@@ -9133,6 +9319,10 @@ export function __wbg_fetch_efc64baf325b084d(arg0, arg1) {
|
|
|
9133
9319
|
export function __wbg_getRandomValues_a608c4436c19407a() { return handleError(function (arg0, arg1) {
|
|
9134
9320
|
globalThis.crypto.getRandomValues(getArrayU8FromWasm0(arg0, arg1));
|
|
9135
9321
|
}, arguments); }
|
|
9322
|
+
export function __wbg_getTime_f5a55efff2585d5d(arg0) {
|
|
9323
|
+
const ret = arg0.getTime();
|
|
9324
|
+
return ret;
|
|
9325
|
+
}
|
|
9136
9326
|
export function __wbg_get_658f6698067d9515() { return handleError(function (arg0, arg1) {
|
|
9137
9327
|
const ret = Reflect.get(arg0, arg1);
|
|
9138
9328
|
return ret;
|
|
@@ -9213,6 +9403,10 @@ export function __wbg_length_d4bdea10311bd9cf(arg0) {
|
|
|
9213
9403
|
const ret = arg0.length;
|
|
9214
9404
|
return ret;
|
|
9215
9405
|
}
|
|
9406
|
+
export function __wbg_new_0_72d020f0c63443d4() {
|
|
9407
|
+
const ret = new Date();
|
|
9408
|
+
return ret;
|
|
9409
|
+
}
|
|
9216
9410
|
export function __wbg_new_1dbf7428bba60a42(arg0) {
|
|
9217
9411
|
const ret = new Uint8Array(arg0);
|
|
9218
9412
|
return ret;
|
|
@@ -9248,7 +9442,7 @@ export function __wbg_new_typed_b01cb72a8af741a3(arg0, arg1) {
|
|
|
9248
9442
|
const a = state0.a;
|
|
9249
9443
|
state0.a = 0;
|
|
9250
9444
|
try {
|
|
9251
|
-
return
|
|
9445
|
+
return wasm_bindgen_a37d5a31ee71bc5f___convert__closures_____invoke___js_sys_a6a58716f022baea___Function_fn_wasm_bindgen_a37d5a31ee71bc5f___JsValue_____wasm_bindgen_a37d5a31ee71bc5f___sys__Undefined___js_sys_a6a58716f022baea___Function_fn_wasm_bindgen_a37d5a31ee71bc5f___JsValue_____wasm_bindgen_a37d5a31ee71bc5f___sys__Undefined_______true_(a, state0.b, arg0, arg1);
|
|
9252
9446
|
} finally {
|
|
9253
9447
|
state0.a = a;
|
|
9254
9448
|
}
|
|
@@ -9542,13 +9736,13 @@ export function __wbg_wasmsitemapurl_unwrap(arg0) {
|
|
|
9542
9736
|
return ret;
|
|
9543
9737
|
}
|
|
9544
9738
|
export function __wbindgen_generic_0000000000000001(arg0, arg1) {
|
|
9545
|
-
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx:
|
|
9546
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
9739
|
+
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx: 1512, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
|
|
9740
|
+
const ret = makeMutClosure(arg0, arg1, wasm_bindgen_a37d5a31ee71bc5f___convert__closures_____invoke___wasm_bindgen_a37d5a31ee71bc5f___JsValue__core_37ee0ce0c4cd57d5___result__Result_____wasm_bindgen_a37d5a31ee71bc5f___JsError___true_);
|
|
9547
9741
|
return ret;
|
|
9548
9742
|
}
|
|
9549
9743
|
export function __wbindgen_generic_0000000000000002(arg0, arg1) {
|
|
9550
|
-
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [], shim_idx:
|
|
9551
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
9744
|
+
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [], shim_idx: 1354, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
9745
|
+
const ret = makeMutClosure(arg0, arg1, wasm_bindgen_a37d5a31ee71bc5f___convert__closures_____invoke_______true_);
|
|
9552
9746
|
return ret;
|
|
9553
9747
|
}
|
|
9554
9748
|
export function __wbindgen_generic_0000000000000003(arg0) {
|
|
@@ -9580,19 +9774,19 @@ export function __wbindgen_init_externref_table() {
|
|
|
9580
9774
|
table.set(offset + 2, true);
|
|
9581
9775
|
table.set(offset + 3, false);
|
|
9582
9776
|
}
|
|
9583
|
-
function
|
|
9584
|
-
wasm.
|
|
9777
|
+
function wasm_bindgen_a37d5a31ee71bc5f___convert__closures_____invoke_______true_(arg0, arg1) {
|
|
9778
|
+
wasm.wasm_bindgen_a37d5a31ee71bc5f___convert__closures_____invoke_______true_(arg0, arg1);
|
|
9585
9779
|
}
|
|
9586
9780
|
|
|
9587
|
-
function
|
|
9588
|
-
const ret = wasm.
|
|
9781
|
+
function wasm_bindgen_a37d5a31ee71bc5f___convert__closures_____invoke___wasm_bindgen_a37d5a31ee71bc5f___JsValue__core_37ee0ce0c4cd57d5___result__Result_____wasm_bindgen_a37d5a31ee71bc5f___JsError___true_(arg0, arg1, arg2) {
|
|
9782
|
+
const ret = wasm.wasm_bindgen_a37d5a31ee71bc5f___convert__closures_____invoke___wasm_bindgen_a37d5a31ee71bc5f___JsValue__core_37ee0ce0c4cd57d5___result__Result_____wasm_bindgen_a37d5a31ee71bc5f___JsError___true_(arg0, arg1, arg2);
|
|
9589
9783
|
if (ret[1]) {
|
|
9590
9784
|
throw takeFromExternrefTable0(ret[0]);
|
|
9591
9785
|
}
|
|
9592
9786
|
}
|
|
9593
9787
|
|
|
9594
|
-
function
|
|
9595
|
-
wasm.
|
|
9788
|
+
function wasm_bindgen_a37d5a31ee71bc5f___convert__closures_____invoke___js_sys_a6a58716f022baea___Function_fn_wasm_bindgen_a37d5a31ee71bc5f___JsValue_____wasm_bindgen_a37d5a31ee71bc5f___sys__Undefined___js_sys_a6a58716f022baea___Function_fn_wasm_bindgen_a37d5a31ee71bc5f___JsValue_____wasm_bindgen_a37d5a31ee71bc5f___sys__Undefined_______true_(arg0, arg1, arg2, arg3) {
|
|
9789
|
+
wasm.wasm_bindgen_a37d5a31ee71bc5f___convert__closures_____invoke___js_sys_a6a58716f022baea___Function_fn_wasm_bindgen_a37d5a31ee71bc5f___JsValue_____wasm_bindgen_a37d5a31ee71bc5f___sys__Undefined___js_sys_a6a58716f022baea___Function_fn_wasm_bindgen_a37d5a31ee71bc5f___JsValue_____wasm_bindgen_a37d5a31ee71bc5f___sys__Undefined_______true_(arg0, arg1, arg2, arg3);
|
|
9596
9790
|
}
|
|
9597
9791
|
|
|
9598
9792
|
|
|
@@ -9720,6 +9914,9 @@ const WasmSitemapUrlFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
|
9720
9914
|
const WasmSsrfPolicyFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
9721
9915
|
? { register: () => {}, unregister: () => {} }
|
|
9722
9916
|
: new FinalizationRegistry(ptr => wasm.__wbg_wasmssrfpolicy_free(ptr, 1));
|
|
9917
|
+
const WasmWafBlockDetailsFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
9918
|
+
? { register: () => {}, unregister: () => {} }
|
|
9919
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_wasmwafblockdetails_free(ptr, 1));
|
|
9723
9920
|
|
|
9724
9921
|
function addToExternrefTable0(obj) {
|
|
9725
9922
|
const idx = wasm.__externref_table_alloc();
|
|
Binary file
|