@xberg-io/crawlberg-wasm 1.10.2 → 1.11.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/README.md CHANGED
@@ -1,5 +1,5 @@
1
1
  <!-- This file is auto-generated by alef — DO NOT EDIT. -->
2
- <!-- alef:hash:3e2f4a488c2c856faef7619c7da3856ab9b8cdad4534264dea7b27a2ebf8bf35 -->
2
+ <!-- alef:hash:317aa594b0d20c83a18e8cdb5342b90b90f56e94e51ba85fc80ebb44ab9c1331 -->
3
3
  <!-- To regenerate: alef readme -->
4
4
  <!-- To verify freshness: alef verify -->
5
5
 
@@ -101,14 +101,14 @@ pnpm add @xberg-io/crawlberg-wasm
101
101
 
102
102
  ## Agent plugin
103
103
 
104
- The `crawlberg` plugin is available via the `xberg-io/plugins` marketplace.
104
+ The `crawlberg` plugin is available via the `xberg-io/crawlberg` marketplace.
105
105
 
106
106
  ```text
107
- /plugin marketplace add xberg-io/plugins
108
- /plugin install crawlberg@xberg
107
+ /plugin marketplace add xberg-io/crawlberg
108
+ /plugin install crawlberg@crawlberg
109
109
  ```
110
110
 
111
- Works with Claude Code, Codex, Cursor, Gemini CLI, Factory Droid, GitHub Copilot CLI, and opencode. See [the marketplace README](https://github.com/xberg-io/plugins) for harness-specific install instructions.
111
+ See [the plugin guide](https://github.com/xberg-io/crawlberg/blob/main/plugin/README.md) for all supported runtimes, CLI prerequisites and standalone public skills.
112
112
 
113
113
  ## Quick Start
114
114
 
package/package.json CHANGED
@@ -1,6 +1,16 @@
1
1
  {
2
+ "author": {
3
+ "name": "Na'aman Hirschfeld",
4
+ "email": "naaman@xberg.io"
5
+ },
6
+ "contributors": [
7
+ {
8
+ "name": "Tobias Perlstein",
9
+ "email": "tobias@xberg.io"
10
+ }
11
+ ],
2
12
  "name": "@xberg-io/crawlberg-wasm",
3
- "version": "1.10.2",
13
+ "version": "1.11.0",
4
14
  "private": false,
5
15
  "description": "High-performance web crawling engine",
6
16
  "license": "MIT",
@@ -13,7 +23,12 @@
13
23
  "access": "public"
14
24
  },
15
25
  "type": "module",
16
- "files": ["pkg", "*.wasm", "*.d.ts", "README.md"],
26
+ "files": [
27
+ "pkg",
28
+ "*.wasm",
29
+ "*.d.ts",
30
+ "README.md"
31
+ ],
17
32
  "main": "pkg/nodejs/crawlberg_wasm.js",
18
33
  "module": "pkg/web/crawlberg_wasm.js",
19
34
  "types": "pkg/nodejs/crawlberg_wasm.d.ts",
@@ -29,6 +44,10 @@
29
44
  "engines": {
30
45
  "node": ">= 22"
31
46
  },
47
+ "devDependencies": {
48
+ "@vitest/coverage-v8": "^5.0.4",
49
+ "vitest": "^5.0.4"
50
+ },
32
51
  "scripts": {
33
52
  "build": "wasm-pack build --target nodejs --out-dir pkg/nodejs",
34
53
  "build:ci": "wasm-pack build --release --target nodejs --out-dir pkg/nodejs",
@@ -36,14 +55,10 @@
36
55
  "build:wasm:bundler": "wasm-pack build --release --target bundler --out-dir pkg/bundler",
37
56
  "build:wasm:nodejs": "wasm-pack build --release --target nodejs --out-dir pkg/nodejs",
38
57
  "build:wasm:deno": "wasm-pack build --release --target deno --out-dir pkg/deno",
39
- "build:all": "npm run build:wasm:web && npm run build:wasm:bundler && npm run build:wasm:nodejs && npm run build:wasm:deno && find pkg -name .gitignore -delete",
58
+ "build:all": "pnpm run build:wasm:web && pnpm run build:wasm:bundler && pnpm run build:wasm:nodejs && pnpm run build:wasm:deno && find pkg -name .gitignore -delete",
40
59
  "test": "vitest run",
41
60
  "test:watch": "vitest watch",
42
61
  "test:coverage": "vitest run --coverage",
43
62
  "clean": "rm -rf pkg dist"
44
- },
45
- "devDependencies": {
46
- "vitest": "^5.0.0",
47
- "@vitest/coverage-v8": "^5.0.0"
48
63
  }
49
- }
64
+ }
@@ -1,5 +1,5 @@
1
1
  <!-- This file is auto-generated by alef — DO NOT EDIT. -->
2
- <!-- alef:hash:3e2f4a488c2c856faef7619c7da3856ab9b8cdad4534264dea7b27a2ebf8bf35 -->
2
+ <!-- alef:hash:317aa594b0d20c83a18e8cdb5342b90b90f56e94e51ba85fc80ebb44ab9c1331 -->
3
3
  <!-- To regenerate: alef readme -->
4
4
  <!-- To verify freshness: alef verify -->
5
5
 
@@ -101,14 +101,14 @@ pnpm add @xberg-io/crawlberg-wasm
101
101
 
102
102
  ## Agent plugin
103
103
 
104
- The `crawlberg` plugin is available via the `xberg-io/plugins` marketplace.
104
+ The `crawlberg` plugin is available via the `xberg-io/crawlberg` marketplace.
105
105
 
106
106
  ```text
107
- /plugin marketplace add xberg-io/plugins
108
- /plugin install crawlberg@xberg
107
+ /plugin marketplace add xberg-io/crawlberg
108
+ /plugin install crawlberg@crawlberg
109
109
  ```
110
110
 
111
- Works with Claude Code, Codex, Cursor, Gemini CLI, Factory Droid, GitHub Copilot CLI, and opencode. See [the marketplace README](https://github.com/xberg-io/plugins) for harness-specific install instructions.
111
+ See [the plugin guide](https://github.com/xberg-io/crawlberg/blob/main/plugin/README.md) for all supported runtimes, CLI prerequisites and standalone public skills.
112
112
 
113
113
  ## Quick Start
114
114
 
@@ -427,10 +427,15 @@ export class WasmContentConfig {
427
427
  */
428
428
  copyForTransfer(): WasmContentConfig;
429
429
  static default(): WasmContentConfig;
430
- 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);
430
+ 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, stripNewlines?: boolean | null, bullets?: string | null, listIndentWidth?: number | null, strongEmSymbol?: string | null, compactTables?: boolean | null, keepInlineImagesIn?: string[] | null, keepHidden?: boolean | null);
431
+ bullets: string;
432
+ compactTables: boolean;
431
433
  excludeSelectors: string[];
432
434
  extractMetadata: boolean;
433
435
  includeDocumentStructure: boolean;
436
+ keepHidden: boolean;
437
+ keepInlineImagesIn: string[];
438
+ listIndentWidth: number;
434
439
  get maxDepth(): number | undefined;
435
440
  set maxDepth(value: number | null | undefined);
436
441
  outputFormat: string;
@@ -439,7 +444,9 @@ export class WasmContentConfig {
439
444
  removeForms: boolean;
440
445
  removeNavigation: boolean;
441
446
  skipImages: boolean;
447
+ stripNewlines: boolean;
442
448
  stripTags: string[];
449
+ strongEmSymbol: string;
443
450
  wrapWidth: number;
444
451
  wrap: boolean;
445
452
  }
@@ -452,7 +459,10 @@ export enum WasmContentFilterKind {
452
459
  }
453
460
 
454
461
  /**
455
- * Information about an HTTP cookie received from a response.
462
+ * Information about a cookie that a crawled page set.
463
+ *
464
+ * A crawl result gives `domain` and `path` as the browser stores the cookie, so a cookie has
465
+ * the same fields whether an HTTP fetch or the browser received it.
456
466
  */
457
467
  export class WasmCookieInfo {
458
468
  free(): void;
@@ -655,7 +665,7 @@ export class WasmCrawlPageResult {
655
665
  * wasm-bindgen cannot borrow class values nested in an array. To keep those handles,
656
666
  * copy each retained element with `copyForTransfer()` before passing the array.
657
667
  */
658
- 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);
668
+ 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, originalUrl?: string | null);
659
669
  bodySize: number;
660
670
  browserUsed: boolean;
661
671
  contentType: string;
@@ -729,6 +739,7 @@ export class WasmCrawlPageResult {
729
739
  nofollowDetected: boolean;
730
740
  noindexDetected: boolean;
731
741
  normalizedUrl: string;
742
+ originalUrl: string;
732
743
  redirectCount: number;
733
744
  ssrfRefusedUrls: string[];
734
745
  statusCode: number;
@@ -1126,10 +1137,11 @@ export class WasmLinkInfo {
1126
1137
  */
1127
1138
  copyForTransfer(): WasmLinkInfo;
1128
1139
  static default(): WasmLinkInfo;
1129
- constructor(url?: string | null, text?: string | null, linkType?: WasmLinkType | null, nofollow?: boolean | null, rel?: string | null);
1140
+ constructor(url?: string | null, text?: string | null, linkType?: WasmLinkType | null, nofollow?: boolean | null, rel?: string | null, originalUrl?: string | null);
1130
1141
  get linkType(): string;
1131
1142
  set linkType(value: WasmLinkType);
1132
1143
  nofollow: boolean;
1144
+ originalUrl: string;
1133
1145
  get rel(): string | undefined;
1134
1146
  set rel(value: string | null | undefined);
1135
1147
  text: string;
@@ -1790,6 +1790,28 @@ export class WasmContentConfig {
1790
1790
  const ptr = this.__destroy_into_raw();
1791
1791
  wasm.__wbg_wasmcontentconfig_free(ptr, 0);
1792
1792
  }
1793
+ /**
1794
+ * @returns {string}
1795
+ */
1796
+ get bullets() {
1797
+ let deferred1_0;
1798
+ let deferred1_1;
1799
+ try {
1800
+ const ret = wasm.wasmcontentconfig_bullets(this.__wbg_ptr);
1801
+ deferred1_0 = ret[0];
1802
+ deferred1_1 = ret[1];
1803
+ return getStringFromWasm0(ret[0], ret[1]);
1804
+ } finally {
1805
+ wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
1806
+ }
1807
+ }
1808
+ /**
1809
+ * @returns {boolean}
1810
+ */
1811
+ get compactTables() {
1812
+ const ret = wasm.wasmcontentconfig_compactTables(this.__wbg_ptr);
1813
+ return ret !== 0;
1814
+ }
1793
1815
  /**
1794
1816
  * Return an independent handle for an ownership-taking API.
1795
1817
  *
@@ -1831,6 +1853,29 @@ export class WasmContentConfig {
1831
1853
  const ret = wasm.wasmcontentconfig_includeDocumentStructure(this.__wbg_ptr);
1832
1854
  return ret !== 0;
1833
1855
  }
1856
+ /**
1857
+ * @returns {boolean}
1858
+ */
1859
+ get keepHidden() {
1860
+ const ret = wasm.wasmcontentconfig_keepHidden(this.__wbg_ptr);
1861
+ return ret !== 0;
1862
+ }
1863
+ /**
1864
+ * @returns {string[]}
1865
+ */
1866
+ get keepInlineImagesIn() {
1867
+ const ret = wasm.wasmcontentconfig_keepInlineImagesIn(this.__wbg_ptr);
1868
+ var v1 = getArrayJsValueFromWasm0(ret[0], ret[1]);
1869
+ wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
1870
+ return v1;
1871
+ }
1872
+ /**
1873
+ * @returns {number}
1874
+ */
1875
+ get listIndentWidth() {
1876
+ const ret = wasm.wasmcontentconfig_listIndentWidth(this.__wbg_ptr);
1877
+ return ret >>> 0;
1878
+ }
1834
1879
  /**
1835
1880
  * @returns {number | undefined}
1836
1881
  */
@@ -1852,8 +1897,15 @@ export class WasmContentConfig {
1852
1897
  * @param {boolean | null} [includeDocumentStructure]
1853
1898
  * @param {boolean | null} [extractMetadata]
1854
1899
  * @param {number | null} [maxDepth]
1855
- */
1856
- constructor(outputFormat, preprocessingPreset, removeNavigation, removeForms, stripTags, preserveTags, excludeSelectors, skipImages, wrap, wrapWidth, includeDocumentStructure, extractMetadata, maxDepth) {
1900
+ * @param {boolean | null} [stripNewlines]
1901
+ * @param {string | null} [bullets]
1902
+ * @param {number | null} [listIndentWidth]
1903
+ * @param {string | null} [strongEmSymbol]
1904
+ * @param {boolean | null} [compactTables]
1905
+ * @param {string[] | null} [keepInlineImagesIn]
1906
+ * @param {boolean | null} [keepHidden]
1907
+ */
1908
+ constructor(outputFormat, preprocessingPreset, removeNavigation, removeForms, stripTags, preserveTags, excludeSelectors, skipImages, wrap, wrapWidth, includeDocumentStructure, extractMetadata, maxDepth, stripNewlines, bullets, listIndentWidth, strongEmSymbol, compactTables, keepInlineImagesIn, keepHidden) {
1857
1909
  var ptr0 = isLikeNone(outputFormat) ? 0 : passStringToWasm0(outputFormat, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1858
1910
  var len0 = WASM_VECTOR_LEN;
1859
1911
  var ptr1 = isLikeNone(preprocessingPreset) ? 0 : passStringToWasm0(preprocessingPreset, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
@@ -1864,7 +1916,13 @@ export class WasmContentConfig {
1864
1916
  var len3 = WASM_VECTOR_LEN;
1865
1917
  var ptr4 = isLikeNone(excludeSelectors) ? 0 : passArrayJsValueToWasm0(excludeSelectors, wasm.__wbindgen_malloc);
1866
1918
  var len4 = WASM_VECTOR_LEN;
1867
- const ret = wasm.wasmcontentconfig_new(ptr0, len0, ptr1, len1, isLikeNone(removeNavigation) ? 0xFFFFFF : removeNavigation ? 1 : 0, isLikeNone(removeForms) ? 0xFFFFFF : removeForms ? 1 : 0, ptr2, len2, ptr3, len3, ptr4, len4, isLikeNone(skipImages) ? 0xFFFFFF : skipImages ? 1 : 0, isLikeNone(wrap) ? 0xFFFFFF : wrap ? 1 : 0, isLikeNone(wrapWidth) ? Number.MAX_SAFE_INTEGER : (wrapWidth) >>> 0, isLikeNone(includeDocumentStructure) ? 0xFFFFFF : includeDocumentStructure ? 1 : 0, isLikeNone(extractMetadata) ? 0xFFFFFF : extractMetadata ? 1 : 0, isLikeNone(maxDepth) ? Number.MAX_SAFE_INTEGER : (maxDepth) >>> 0);
1919
+ var ptr5 = isLikeNone(bullets) ? 0 : passStringToWasm0(bullets, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1920
+ var len5 = WASM_VECTOR_LEN;
1921
+ var ptr6 = isLikeNone(strongEmSymbol) ? 0 : passStringToWasm0(strongEmSymbol, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1922
+ var len6 = WASM_VECTOR_LEN;
1923
+ var ptr7 = isLikeNone(keepInlineImagesIn) ? 0 : passArrayJsValueToWasm0(keepInlineImagesIn, wasm.__wbindgen_malloc);
1924
+ var len7 = WASM_VECTOR_LEN;
1925
+ const ret = wasm.wasmcontentconfig_new(ptr0, len0, ptr1, len1, isLikeNone(removeNavigation) ? 0xFFFFFF : removeNavigation ? 1 : 0, isLikeNone(removeForms) ? 0xFFFFFF : removeForms ? 1 : 0, ptr2, len2, ptr3, len3, ptr4, len4, isLikeNone(skipImages) ? 0xFFFFFF : skipImages ? 1 : 0, isLikeNone(wrap) ? 0xFFFFFF : wrap ? 1 : 0, isLikeNone(wrapWidth) ? Number.MAX_SAFE_INTEGER : (wrapWidth) >>> 0, isLikeNone(includeDocumentStructure) ? 0xFFFFFF : includeDocumentStructure ? 1 : 0, isLikeNone(extractMetadata) ? 0xFFFFFF : extractMetadata ? 1 : 0, isLikeNone(maxDepth) ? Number.MAX_SAFE_INTEGER : (maxDepth) >>> 0, isLikeNone(stripNewlines) ? 0xFFFFFF : stripNewlines ? 1 : 0, ptr5, len5, isLikeNone(listIndentWidth) ? Number.MAX_SAFE_INTEGER : (listIndentWidth) >>> 0, ptr6, len6, isLikeNone(compactTables) ? 0xFFFFFF : compactTables ? 1 : 0, ptr7, len7, isLikeNone(keepHidden) ? 0xFFFFFF : keepHidden ? 1 : 0);
1868
1926
  this.__wbg_ptr = ret;
1869
1927
  WasmContentConfigFinalization.register(this, this.__wbg_ptr, this);
1870
1928
  return this;
@@ -1922,6 +1980,20 @@ export class WasmContentConfig {
1922
1980
  const ret = wasm.wasmcontentconfig_removeNavigation(this.__wbg_ptr);
1923
1981
  return ret !== 0;
1924
1982
  }
1983
+ /**
1984
+ * @param {string} value
1985
+ */
1986
+ set bullets(value) {
1987
+ const ptr0 = passStringToWasm0(value, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1988
+ const len0 = WASM_VECTOR_LEN;
1989
+ wasm.wasmcontentconfig_set_bullets(this.__wbg_ptr, ptr0, len0);
1990
+ }
1991
+ /**
1992
+ * @param {boolean} value
1993
+ */
1994
+ set compactTables(value) {
1995
+ wasm.wasmcontentconfig_set_compactTables(this.__wbg_ptr, value);
1996
+ }
1925
1997
  /**
1926
1998
  * @param {string[]} value
1927
1999
  */
@@ -1942,6 +2014,26 @@ export class WasmContentConfig {
1942
2014
  set includeDocumentStructure(value) {
1943
2015
  wasm.wasmcontentconfig_set_includeDocumentStructure(this.__wbg_ptr, value);
1944
2016
  }
2017
+ /**
2018
+ * @param {boolean} value
2019
+ */
2020
+ set keepHidden(value) {
2021
+ wasm.wasmcontentconfig_set_keepHidden(this.__wbg_ptr, value);
2022
+ }
2023
+ /**
2024
+ * @param {string[]} value
2025
+ */
2026
+ set keepInlineImagesIn(value) {
2027
+ const ptr0 = passArrayJsValueToWasm0(value, wasm.__wbindgen_malloc);
2028
+ const len0 = WASM_VECTOR_LEN;
2029
+ wasm.wasmcontentconfig_set_keepInlineImagesIn(this.__wbg_ptr, ptr0, len0);
2030
+ }
2031
+ /**
2032
+ * @param {number} value
2033
+ */
2034
+ set listIndentWidth(value) {
2035
+ wasm.wasmcontentconfig_set_listIndentWidth(this.__wbg_ptr, value);
2036
+ }
1945
2037
  /**
1946
2038
  * @param {number | null} [value]
1947
2039
  */
@@ -1990,6 +2082,12 @@ export class WasmContentConfig {
1990
2082
  set skipImages(value) {
1991
2083
  wasm.wasmcontentconfig_set_skipImages(this.__wbg_ptr, value);
1992
2084
  }
2085
+ /**
2086
+ * @param {boolean} value
2087
+ */
2088
+ set stripNewlines(value) {
2089
+ wasm.wasmcontentconfig_set_stripNewlines(this.__wbg_ptr, value);
2090
+ }
1993
2091
  /**
1994
2092
  * @param {string[]} value
1995
2093
  */
@@ -1998,6 +2096,14 @@ export class WasmContentConfig {
1998
2096
  const len0 = WASM_VECTOR_LEN;
1999
2097
  wasm.wasmcontentconfig_set_stripTags(this.__wbg_ptr, ptr0, len0);
2000
2098
  }
2099
+ /**
2100
+ * @param {string} value
2101
+ */
2102
+ set strongEmSymbol(value) {
2103
+ const ptr0 = passStringToWasm0(value, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
2104
+ const len0 = WASM_VECTOR_LEN;
2105
+ wasm.wasmcontentconfig_set_strongEmSymbol(this.__wbg_ptr, ptr0, len0);
2106
+ }
2001
2107
  /**
2002
2108
  * @param {number} value
2003
2109
  */
@@ -2017,6 +2123,13 @@ export class WasmContentConfig {
2017
2123
  const ret = wasm.wasmcontentconfig_skipImages(this.__wbg_ptr);
2018
2124
  return ret !== 0;
2019
2125
  }
2126
+ /**
2127
+ * @returns {boolean}
2128
+ */
2129
+ get stripNewlines() {
2130
+ const ret = wasm.wasmcontentconfig_stripNewlines(this.__wbg_ptr);
2131
+ return ret !== 0;
2132
+ }
2020
2133
  /**
2021
2134
  * @returns {string[]}
2022
2135
  */
@@ -2026,6 +2139,21 @@ export class WasmContentConfig {
2026
2139
  wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
2027
2140
  return v1;
2028
2141
  }
2142
+ /**
2143
+ * @returns {string}
2144
+ */
2145
+ get strongEmSymbol() {
2146
+ let deferred1_0;
2147
+ let deferred1_1;
2148
+ try {
2149
+ const ret = wasm.wasmcontentconfig_strongEmSymbol(this.__wbg_ptr);
2150
+ deferred1_0 = ret[0];
2151
+ deferred1_1 = ret[1];
2152
+ return getStringFromWasm0(ret[0], ret[1]);
2153
+ } finally {
2154
+ wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
2155
+ }
2156
+ }
2029
2157
  /**
2030
2158
  * @returns {number}
2031
2159
  */
@@ -2052,7 +2180,10 @@ export const WasmContentFilterKind = Object.freeze({
2052
2180
  });
2053
2181
 
2054
2182
  /**
2055
- * Information about an HTTP cookie received from a response.
2183
+ * Information about a cookie that a crawled page set.
2184
+ *
2185
+ * A crawl result gives `domain` and `path` as the browser stores the cookie, so a cookie has
2186
+ * the same fields whether an HTTP fetch or the browser received it.
2056
2187
  */
2057
2188
  export class WasmCookieInfo {
2058
2189
  static __wrap(ptr) {
@@ -3516,8 +3647,9 @@ export class WasmCrawlPageResult {
3516
3647
  * @param {any | null} [extractedData]
3517
3648
  * @param {WasmExtractionMeta | null} [extractionMeta]
3518
3649
  * @param {WasmDownloadedDocument | null} [downloadedDocument]
3650
+ * @param {string | null} [originalUrl]
3519
3651
  */
3520
- constructor(url, normalizedUrl, statusCode, contentType, html, bodySize, metadata, links, images, feeds, jsonLd, depth, stayedOnDomain, wasSkipped, isPdf, browserUsed, finalUrl, redirectCount, noindexDetected, nofollowDetected, ssrfRefusedUrls, detectedCharset, markdown, extractedData, extractionMeta, downloadedDocument) {
3652
+ constructor(url, normalizedUrl, statusCode, contentType, html, bodySize, metadata, links, images, feeds, jsonLd, depth, stayedOnDomain, wasSkipped, isPdf, browserUsed, finalUrl, redirectCount, noindexDetected, nofollowDetected, ssrfRefusedUrls, detectedCharset, markdown, extractedData, extractionMeta, downloadedDocument, originalUrl) {
3521
3653
  var ptr0 = isLikeNone(url) ? 0 : passStringToWasm0(url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
3522
3654
  var len0 = WASM_VECTOR_LEN;
3523
3655
  var ptr1 = isLikeNone(normalizedUrl) ? 0 : passStringToWasm0(normalizedUrl, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
@@ -3560,7 +3692,9 @@ export class WasmCrawlPageResult {
3560
3692
  _assertClass(downloadedDocument, WasmDownloadedDocument);
3561
3693
  ptr14 = downloadedDocument.__destroy_into_raw();
3562
3694
  }
3563
- const ret = wasm.wasmcrawlpageresult_new(ptr0, len0, ptr1, len1, isLikeNone(statusCode) ? 0xFFFFFF : statusCode, ptr2, len2, ptr3, len3, isLikeNone(bodySize) ? Number.MAX_SAFE_INTEGER : (bodySize) >>> 0, ptr4, ptr5, len5, ptr6, len6, ptr7, len7, ptr8, len8, isLikeNone(depth) ? Number.MAX_SAFE_INTEGER : (depth) >>> 0, isLikeNone(stayedOnDomain) ? 0xFFFFFF : stayedOnDomain ? 1 : 0, isLikeNone(wasSkipped) ? 0xFFFFFF : wasSkipped ? 1 : 0, isLikeNone(isPdf) ? 0xFFFFFF : isPdf ? 1 : 0, isLikeNone(browserUsed) ? 0xFFFFFF : browserUsed ? 1 : 0, ptr9, len9, isLikeNone(redirectCount) ? Number.MAX_SAFE_INTEGER : (redirectCount) >>> 0, isLikeNone(noindexDetected) ? 0xFFFFFF : noindexDetected ? 1 : 0, isLikeNone(nofollowDetected) ? 0xFFFFFF : nofollowDetected ? 1 : 0, ptr10, len10, ptr11, len11, ptr12, isLikeNone(extractedData) ? 0 : addToExternrefTable0(extractedData), ptr13, ptr14);
3695
+ var ptr15 = isLikeNone(originalUrl) ? 0 : passStringToWasm0(originalUrl, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
3696
+ var len15 = WASM_VECTOR_LEN;
3697
+ const ret = wasm.wasmcrawlpageresult_new(ptr0, len0, ptr1, len1, isLikeNone(statusCode) ? 0xFFFFFF : statusCode, ptr2, len2, ptr3, len3, isLikeNone(bodySize) ? Number.MAX_SAFE_INTEGER : (bodySize) >>> 0, ptr4, ptr5, len5, ptr6, len6, ptr7, len7, ptr8, len8, isLikeNone(depth) ? Number.MAX_SAFE_INTEGER : (depth) >>> 0, isLikeNone(stayedOnDomain) ? 0xFFFFFF : stayedOnDomain ? 1 : 0, isLikeNone(wasSkipped) ? 0xFFFFFF : wasSkipped ? 1 : 0, isLikeNone(isPdf) ? 0xFFFFFF : isPdf ? 1 : 0, isLikeNone(browserUsed) ? 0xFFFFFF : browserUsed ? 1 : 0, ptr9, len9, isLikeNone(redirectCount) ? Number.MAX_SAFE_INTEGER : (redirectCount) >>> 0, isLikeNone(noindexDetected) ? 0xFFFFFF : noindexDetected ? 1 : 0, isLikeNone(nofollowDetected) ? 0xFFFFFF : nofollowDetected ? 1 : 0, ptr10, len10, ptr11, len11, ptr12, isLikeNone(extractedData) ? 0 : addToExternrefTable0(extractedData), ptr13, ptr14, ptr15, len15);
3564
3698
  this.__wbg_ptr = ret;
3565
3699
  WasmCrawlPageResultFinalization.register(this, this.__wbg_ptr, this);
3566
3700
  return this;
@@ -3594,6 +3728,21 @@ export class WasmCrawlPageResult {
3594
3728
  wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
3595
3729
  }
3596
3730
  }
3731
+ /**
3732
+ * @returns {string}
3733
+ */
3734
+ get originalUrl() {
3735
+ let deferred1_0;
3736
+ let deferred1_1;
3737
+ try {
3738
+ const ret = wasm.wasmcrawlpageresult_originalUrl(this.__wbg_ptr);
3739
+ deferred1_0 = ret[0];
3740
+ deferred1_1 = ret[1];
3741
+ return getStringFromWasm0(ret[0], ret[1]);
3742
+ } finally {
3743
+ wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
3744
+ }
3745
+ }
3597
3746
  /**
3598
3747
  * @returns {number}
3599
3748
  */
@@ -3755,6 +3904,14 @@ export class WasmCrawlPageResult {
3755
3904
  const len0 = WASM_VECTOR_LEN;
3756
3905
  wasm.wasmcrawlpageresult_set_normalizedUrl(this.__wbg_ptr, ptr0, len0);
3757
3906
  }
3907
+ /**
3908
+ * @param {string} value
3909
+ */
3910
+ set originalUrl(value) {
3911
+ const ptr0 = passStringToWasm0(value, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
3912
+ const len0 = WASM_VECTOR_LEN;
3913
+ wasm.wasmcrawlpageresult_set_originalUrl(this.__wbg_ptr, ptr0, len0);
3914
+ }
3758
3915
  /**
3759
3916
  * @param {number} value
3760
3917
  */
@@ -5774,15 +5931,18 @@ export class WasmLinkInfo {
5774
5931
  * @param {WasmLinkType | null} [linkType]
5775
5932
  * @param {boolean | null} [nofollow]
5776
5933
  * @param {string | null} [rel]
5934
+ * @param {string | null} [originalUrl]
5777
5935
  */
5778
- constructor(url, text, linkType, nofollow, rel) {
5936
+ constructor(url, text, linkType, nofollow, rel, originalUrl) {
5779
5937
  var ptr0 = isLikeNone(url) ? 0 : passStringToWasm0(url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
5780
5938
  var len0 = WASM_VECTOR_LEN;
5781
5939
  var ptr1 = isLikeNone(text) ? 0 : passStringToWasm0(text, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
5782
5940
  var len1 = WASM_VECTOR_LEN;
5783
5941
  var ptr2 = isLikeNone(rel) ? 0 : passStringToWasm0(rel, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
5784
5942
  var len2 = WASM_VECTOR_LEN;
5785
- const ret = wasm.wasmlinkinfo_new(ptr0, len0, ptr1, len1, isLikeNone(linkType) ? 4 : linkType, isLikeNone(nofollow) ? 0xFFFFFF : nofollow ? 1 : 0, ptr2, len2);
5943
+ var ptr3 = isLikeNone(originalUrl) ? 0 : passStringToWasm0(originalUrl, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
5944
+ var len3 = WASM_VECTOR_LEN;
5945
+ const ret = wasm.wasmlinkinfo_new(ptr0, len0, ptr1, len1, isLikeNone(linkType) ? 4 : linkType, isLikeNone(nofollow) ? 0xFFFFFF : nofollow ? 1 : 0, ptr2, len2, ptr3, len3);
5786
5946
  this.__wbg_ptr = ret;
5787
5947
  WasmLinkInfoFinalization.register(this, this.__wbg_ptr, this);
5788
5948
  return this;
@@ -5794,6 +5954,21 @@ export class WasmLinkInfo {
5794
5954
  const ret = wasm.wasmlinkinfo_nofollow(this.__wbg_ptr);
5795
5955
  return ret !== 0;
5796
5956
  }
5957
+ /**
5958
+ * @returns {string}
5959
+ */
5960
+ get originalUrl() {
5961
+ let deferred1_0;
5962
+ let deferred1_1;
5963
+ try {
5964
+ const ret = wasm.wasmlinkinfo_originalUrl(this.__wbg_ptr);
5965
+ deferred1_0 = ret[0];
5966
+ deferred1_1 = ret[1];
5967
+ return getStringFromWasm0(ret[0], ret[1]);
5968
+ } finally {
5969
+ wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
5970
+ }
5971
+ }
5797
5972
  /**
5798
5973
  * @returns {string | undefined}
5799
5974
  */
@@ -5818,6 +5993,14 @@ export class WasmLinkInfo {
5818
5993
  set nofollow(value) {
5819
5994
  wasm.wasmlinkinfo_set_nofollow(this.__wbg_ptr, value);
5820
5995
  }
5996
+ /**
5997
+ * @param {string} value
5998
+ */
5999
+ set originalUrl(value) {
6000
+ const ptr0 = passStringToWasm0(value, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
6001
+ const len0 = WASM_VECTOR_LEN;
6002
+ wasm.wasmlinkinfo_set_originalUrl(this.__wbg_ptr, ptr0, len0);
6003
+ }
5821
6004
  /**
5822
6005
  * @param {string | null} [value]
5823
6006
  */
@@ -9065,7 +9248,7 @@ export function __wbg_new_typed_b01cb72a8af741a3(arg0, arg1) {
9065
9248
  const a = state0.a;
9066
9249
  state0.a = 0;
9067
9250
  try {
9068
- return wasm_bindgen__convert__closures_____invoke__h8ad11faaa2905452(a, state0.b, arg0, arg1);
9251
+ return wasm_bindgen_ceaac9754e66b2fe___convert__closures_____invoke___js_sys_6b40a5061b778857___Function_fn_wasm_bindgen_ceaac9754e66b2fe___JsValue_____wasm_bindgen_ceaac9754e66b2fe___sys__Undefined___js_sys_6b40a5061b778857___Function_fn_wasm_bindgen_ceaac9754e66b2fe___JsValue_____wasm_bindgen_ceaac9754e66b2fe___sys__Undefined_______true_(a, state0.b, arg0, arg1);
9069
9252
  } finally {
9070
9253
  state0.a = a;
9071
9254
  }
@@ -9359,13 +9542,13 @@ export function __wbg_wasmsitemapurl_unwrap(arg0) {
9359
9542
  return ret;
9360
9543
  }
9361
9544
  export function __wbindgen_generic_0000000000000001(arg0, arg1) {
9362
- // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx: 1331, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
9363
- const ret = makeMutClosure(arg0, arg1, wasm_bindgen__convert__closures_____invoke__h2eedacf566f3748c);
9545
+ // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx: 1467, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
9546
+ const ret = makeMutClosure(arg0, arg1, wasm_bindgen_ceaac9754e66b2fe___convert__closures_____invoke___wasm_bindgen_ceaac9754e66b2fe___JsValue__core_608f92abc48d28da___result__Result_____wasm_bindgen_ceaac9754e66b2fe___JsError___true_);
9364
9547
  return ret;
9365
9548
  }
9366
9549
  export function __wbindgen_generic_0000000000000002(arg0, arg1) {
9367
- // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [], shim_idx: 1222, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
9368
- const ret = makeMutClosure(arg0, arg1, wasm_bindgen__convert__closures_____invoke__h3a7ccac3e94bbb5c);
9550
+ // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [], shim_idx: 1309, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
9551
+ const ret = makeMutClosure(arg0, arg1, wasm_bindgen_ceaac9754e66b2fe___convert__closures_____invoke_______true_);
9369
9552
  return ret;
9370
9553
  }
9371
9554
  export function __wbindgen_generic_0000000000000003(arg0) {
@@ -9397,19 +9580,19 @@ export function __wbindgen_init_externref_table() {
9397
9580
  table.set(offset + 2, true);
9398
9581
  table.set(offset + 3, false);
9399
9582
  }
9400
- function wasm_bindgen__convert__closures_____invoke__h3a7ccac3e94bbb5c(arg0, arg1) {
9401
- wasm.wasm_bindgen__convert__closures_____invoke__h3a7ccac3e94bbb5c(arg0, arg1);
9583
+ function wasm_bindgen_ceaac9754e66b2fe___convert__closures_____invoke_______true_(arg0, arg1) {
9584
+ wasm.wasm_bindgen_ceaac9754e66b2fe___convert__closures_____invoke_______true_(arg0, arg1);
9402
9585
  }
9403
9586
 
9404
- function wasm_bindgen__convert__closures_____invoke__h2eedacf566f3748c(arg0, arg1, arg2) {
9405
- const ret = wasm.wasm_bindgen__convert__closures_____invoke__h2eedacf566f3748c(arg0, arg1, arg2);
9587
+ function wasm_bindgen_ceaac9754e66b2fe___convert__closures_____invoke___wasm_bindgen_ceaac9754e66b2fe___JsValue__core_608f92abc48d28da___result__Result_____wasm_bindgen_ceaac9754e66b2fe___JsError___true_(arg0, arg1, arg2) {
9588
+ const ret = wasm.wasm_bindgen_ceaac9754e66b2fe___convert__closures_____invoke___wasm_bindgen_ceaac9754e66b2fe___JsValue__core_608f92abc48d28da___result__Result_____wasm_bindgen_ceaac9754e66b2fe___JsError___true_(arg0, arg1, arg2);
9406
9589
  if (ret[1]) {
9407
9590
  throw takeFromExternrefTable0(ret[0]);
9408
9591
  }
9409
9592
  }
9410
9593
 
9411
- function wasm_bindgen__convert__closures_____invoke__h8ad11faaa2905452(arg0, arg1, arg2, arg3) {
9412
- wasm.wasm_bindgen__convert__closures_____invoke__h8ad11faaa2905452(arg0, arg1, arg2, arg3);
9594
+ function wasm_bindgen_ceaac9754e66b2fe___convert__closures_____invoke___js_sys_6b40a5061b778857___Function_fn_wasm_bindgen_ceaac9754e66b2fe___JsValue_____wasm_bindgen_ceaac9754e66b2fe___sys__Undefined___js_sys_6b40a5061b778857___Function_fn_wasm_bindgen_ceaac9754e66b2fe___JsValue_____wasm_bindgen_ceaac9754e66b2fe___sys__Undefined_______true_(arg0, arg1, arg2, arg3) {
9595
+ wasm.wasm_bindgen_ceaac9754e66b2fe___convert__closures_____invoke___js_sys_6b40a5061b778857___Function_fn_wasm_bindgen_ceaac9754e66b2fe___JsValue_____wasm_bindgen_ceaac9754e66b2fe___sys__Undefined___js_sys_6b40a5061b778857___Function_fn_wasm_bindgen_ceaac9754e66b2fe___JsValue_____wasm_bindgen_ceaac9754e66b2fe___sys__Undefined_______true_(arg0, arg1, arg2, arg3);
9413
9596
  }
9414
9597
 
9415
9598
 
Binary file