@veripublica/epubveri-wasm 0.37.0 → 0.38.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.
@@ -10,7 +10,7 @@ Generated by `cargo run -p epubveri-harness --bin notices`; do not edit.
10
10
 
11
11
  ================================================================
12
12
  bitflags 2.13.2 (MIT)
13
- log 0.4.34 (MIT)
13
+ log 0.4.35 (MIT)
14
14
  ================================================================
15
15
 
16
16
  Copyright (c) 2014 The Rust Project Developers
@@ -73,10 +73,10 @@ DEALINGS IN THE SOFTWARE.
73
73
 
74
74
  ================================================================
75
75
  cfg-if 1.0.5 (MIT)
76
- js-sys 0.3.106 (MIT)
77
- wasm-bindgen 0.2.129 (MIT)
78
- wasm-bindgen-shared 0.2.129 (MIT)
79
- web-sys 0.3.106 (MIT)
76
+ js-sys 0.3.107 (MIT)
77
+ wasm-bindgen 0.2.130 (MIT)
78
+ wasm-bindgen-shared 0.2.130 (MIT)
79
+ web-sys 0.3.107 (MIT)
80
80
  ================================================================
81
81
 
82
82
  Copyright (c) 2014 Alex Crichton
@@ -107,7 +107,189 @@ DEALINGS IN THE SOFTWARE.
107
107
 
108
108
 
109
109
  ================================================================
110
- crc32fast 1.5.2 (MIT)
110
+ constant_time_eq 0.6.1 (Apache-2.0)
111
+ ================================================================
112
+
113
+ Apache License
114
+ Version 2.0, January 2004
115
+ http://www.apache.org/licenses/
116
+
117
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
118
+
119
+ 1. Definitions.
120
+
121
+ "License" shall mean the terms and conditions for use, reproduction,
122
+ and distribution as defined by Sections 1 through 9 of this document.
123
+
124
+ "Licensor" shall mean the copyright owner or entity authorized by
125
+ the copyright owner that is granting the License.
126
+
127
+ "Legal Entity" shall mean the union of the acting entity and all
128
+ other entities that control, are controlled by, or are under common
129
+ control with that entity. For the purposes of this definition,
130
+ "control" means (i) the power, direct or indirect, to cause the
131
+ direction or management of such entity, whether by contract or
132
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
133
+ outstanding shares, or (iii) beneficial ownership of such entity.
134
+
135
+ "You" (or "Your") shall mean an individual or Legal Entity
136
+ exercising permissions granted by this License.
137
+
138
+ "Source" form shall mean the preferred form for making modifications,
139
+ including but not limited to software source code, documentation
140
+ source, and configuration files.
141
+
142
+ "Object" form shall mean any form resulting from mechanical
143
+ transformation or translation of a Source form, including but
144
+ not limited to compiled object code, generated documentation,
145
+ and conversions to other media types.
146
+
147
+ "Work" shall mean the work of authorship, whether in Source or
148
+ Object form, made available under the License, as indicated by a
149
+ copyright notice that is included in or attached to the work
150
+ (an example is provided in the Appendix below).
151
+
152
+ "Derivative Works" shall mean any work, whether in Source or Object
153
+ form, that is based on (or derived from) the Work and for which the
154
+ editorial revisions, annotations, elaborations, or other modifications
155
+ represent, as a whole, an original work of authorship. For the purposes
156
+ of this License, Derivative Works shall not include works that remain
157
+ separable from, or merely link (or bind by name) to the interfaces of,
158
+ the Work and Derivative Works thereof.
159
+
160
+ "Contribution" shall mean any work of authorship, including
161
+ the original version of the Work and any modifications or additions
162
+ to that Work or Derivative Works thereof, that is intentionally
163
+ submitted to Licensor for inclusion in the Work by the copyright owner
164
+ or by an individual or Legal Entity authorized to submit on behalf of
165
+ the copyright owner. For the purposes of this definition, "submitted"
166
+ means any form of electronic, verbal, or written communication sent
167
+ to the Licensor or its representatives, including but not limited to
168
+ communication on electronic mailing lists, source code control systems,
169
+ and issue tracking systems that are managed by, or on behalf of, the
170
+ Licensor for the purpose of discussing and improving the Work, but
171
+ excluding communication that is conspicuously marked or otherwise
172
+ designated in writing by the copyright owner as "Not a Contribution."
173
+
174
+ "Contributor" shall mean Licensor and any individual or Legal Entity
175
+ on behalf of whom a Contribution has been received by Licensor and
176
+ subsequently incorporated within the Work.
177
+
178
+ 2. Grant of Copyright License. Subject to the terms and conditions of
179
+ this License, each Contributor hereby grants to You a perpetual,
180
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
181
+ copyright license to reproduce, prepare Derivative Works of,
182
+ publicly display, publicly perform, sublicense, and distribute the
183
+ Work and such Derivative Works in Source or Object form.
184
+
185
+ 3. Grant of Patent License. Subject to the terms and conditions of
186
+ this License, each Contributor hereby grants to You a perpetual,
187
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
188
+ (except as stated in this section) patent license to make, have made,
189
+ use, offer to sell, sell, import, and otherwise transfer the Work,
190
+ where such license applies only to those patent claims licensable
191
+ by such Contributor that are necessarily infringed by their
192
+ Contribution(s) alone or by combination of their Contribution(s)
193
+ with the Work to which such Contribution(s) was submitted. If You
194
+ institute patent litigation against any entity (including a
195
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
196
+ or a Contribution incorporated within the Work constitutes direct
197
+ or contributory patent infringement, then any patent licenses
198
+ granted to You under this License for that Work shall terminate
199
+ as of the date such litigation is filed.
200
+
201
+ 4. Redistribution. You may reproduce and distribute copies of the
202
+ Work or Derivative Works thereof in any medium, with or without
203
+ modifications, and in Source or Object form, provided that You
204
+ meet the following conditions:
205
+
206
+ (a) You must give any other recipients of the Work or
207
+ Derivative Works a copy of this License; and
208
+
209
+ (b) You must cause any modified files to carry prominent notices
210
+ stating that You changed the files; and
211
+
212
+ (c) You must retain, in the Source form of any Derivative Works
213
+ that You distribute, all copyright, patent, trademark, and
214
+ attribution notices from the Source form of the Work,
215
+ excluding those notices that do not pertain to any part of
216
+ the Derivative Works; and
217
+
218
+ (d) If the Work includes a "NOTICE" text file as part of its
219
+ distribution, then any Derivative Works that You distribute must
220
+ include a readable copy of the attribution notices contained
221
+ within such NOTICE file, excluding those notices that do not
222
+ pertain to any part of the Derivative Works, in at least one
223
+ of the following places: within a NOTICE text file distributed
224
+ as part of the Derivative Works; within the Source form or
225
+ documentation, if provided along with the Derivative Works; or,
226
+ within a display generated by the Derivative Works, if and
227
+ wherever such third-party notices normally appear. The contents
228
+ of the NOTICE file are for informational purposes only and
229
+ do not modify the License. You may add Your own attribution
230
+ notices within Derivative Works that You distribute, alongside
231
+ or as an addendum to the NOTICE text from the Work, provided
232
+ that such additional attribution notices cannot be construed
233
+ as modifying the License.
234
+
235
+ You may add Your own copyright statement to Your modifications and
236
+ may provide additional or different license terms and conditions
237
+ for use, reproduction, or distribution of Your modifications, or
238
+ for any such Derivative Works as a whole, provided Your use,
239
+ reproduction, and distribution of the Work otherwise complies with
240
+ the conditions stated in this License.
241
+
242
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
243
+ any Contribution intentionally submitted for inclusion in the Work
244
+ by You to the Licensor shall be under the terms and conditions of
245
+ this License, without any additional terms or conditions.
246
+ Notwithstanding the above, nothing herein shall supersede or modify
247
+ the terms of any separate license agreement you may have executed
248
+ with Licensor regarding such Contributions.
249
+
250
+ 6. Trademarks. This License does not grant permission to use the trade
251
+ names, trademarks, service marks, or product names of the Licensor,
252
+ except as required for reasonable and customary use in describing the
253
+ origin of the Work and reproducing the content of the NOTICE file.
254
+
255
+ 7. Disclaimer of Warranty. Unless required by applicable law or
256
+ agreed to in writing, Licensor provides the Work (and each
257
+ Contributor provides its Contributions) on an "AS IS" BASIS,
258
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
259
+ implied, including, without limitation, any warranties or conditions
260
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
261
+ PARTICULAR PURPOSE. You are solely responsible for determining the
262
+ appropriateness of using or redistributing the Work and assume any
263
+ risks associated with Your exercise of permissions under this License.
264
+
265
+ 8. Limitation of Liability. In no event and under no legal theory,
266
+ whether in tort (including negligence), contract, or otherwise,
267
+ unless required by applicable law (such as deliberate and grossly
268
+ negligent acts) or agreed to in writing, shall any Contributor be
269
+ liable to You for damages, including any direct, indirect, special,
270
+ incidental, or consequential damages of any character arising as a
271
+ result of this License or out of the use or inability to use the
272
+ Work (including but not limited to damages for loss of goodwill,
273
+ work stoppage, computer failure or malfunction, or any and all
274
+ other commercial damages or losses), even if such Contributor
275
+ has been advised of the possibility of such damages.
276
+
277
+ 9. Accepting Warranty or Additional Liability. While redistributing
278
+ the Work or Derivative Works thereof, You may choose to offer,
279
+ and charge a fee for, acceptance of support, warranty, indemnity,
280
+ or other liability obligations and/or rights consistent with this
281
+ License. However, in accepting such obligations, You may act only
282
+ on Your own behalf and on Your sole responsibility, not on behalf
283
+ of any other Contributor, and only if You agree to indemnify,
284
+ defend, and hold each Contributor harmless for any liability
285
+ incurred by, or claims asserted against, such Contributor by reason
286
+ of your accepting any such warranty or additional liability.
287
+
288
+ END OF TERMS AND CONDITIONS
289
+
290
+
291
+ ================================================================
292
+ crc32fast 1.5.4 (MIT)
111
293
  ================================================================
112
294
 
113
295
  MIT License
@@ -165,7 +347,7 @@ DEALINGS IN THE SOFTWARE.
165
347
 
166
348
 
167
349
  ================================================================
168
- flate2 1.1.10 (MIT)
350
+ flate2 1.1.11 (MIT)
169
351
  ================================================================
170
352
 
171
353
  Copyright (c) 2014-2026 Alex Crichton
@@ -349,7 +531,6 @@ DEALINGS IN THE SOFTWARE.
349
531
 
350
532
  ================================================================
351
533
  itoa 1.0.18 (MIT)
352
- once_cell 1.21.4 (MIT)
353
534
  pin-project-lite 0.2.17 (MIT)
354
535
  serde 1.0.229 (MIT)
355
536
  serde_core 1.0.229 (MIT)
@@ -470,7 +651,7 @@ THE SOFTWARE.
470
651
 
471
652
 
472
653
  ================================================================
473
- roxmltree 0.21.1 (MIT)
654
+ roxmltree 0.21.2 (MIT)
474
655
  ================================================================
475
656
 
476
657
  The MIT License (MIT)
@@ -729,7 +910,38 @@ MIT License
729
910
 
730
911
 
731
912
  ================================================================
732
- zip 9.1.3 (MIT)
913
+ zeroize 1.9.1 (MIT)
914
+ ================================================================
915
+
916
+ Copyright (c) 2018-2026 The RustCrypto Project Developers
917
+
918
+ Permission is hereby granted, free of charge, to any
919
+ person obtaining a copy of this software and associated
920
+ documentation files (the "Software"), to deal in the
921
+ Software without restriction, including without
922
+ limitation the rights to use, copy, modify, merge,
923
+ publish, distribute, sublicense, and/or sell copies of
924
+ the Software, and to permit persons to whom the Software
925
+ is furnished to do so, subject to the following
926
+ conditions:
927
+
928
+ The above copyright notice and this permission notice
929
+ shall be included in all copies or substantial portions
930
+ of the Software.
931
+
932
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF
933
+ ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
934
+ TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
935
+ PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT
936
+ SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
937
+ CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
938
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
939
+ IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
940
+ DEALINGS IN THE SOFTWARE.
941
+
942
+
943
+ ================================================================
944
+ zip 9.4.2 (MIT)
733
945
  ================================================================
734
946
 
735
947
  The MIT License (MIT)
package/README.md CHANGED
@@ -60,7 +60,7 @@ interface Item {
60
60
  params: string[]; // the values interpolated into `message`
61
61
  element_path?: string; // XPath-style path to the offending node
62
62
  namespaces: Map<string, string>; // bindings that resolve element_path — a Map, see below
63
- advisory_basis?: string; // "spec-ahead" | "spec-silent", on ADV-*/NEXT-* only
63
+ advisory_basis?: string; // "spec-silent", on ADV-* only
64
64
  violation_kind?: string; // which of six kinds a schema violation is
65
65
  };
66
66
  }
@@ -83,15 +83,8 @@ function version(): string;
83
83
  ### Advisory checks
84
84
 
85
85
  `advisory` mirrors the CLI `--advisory` flag: pass `true` to also emit the opt-in findings
86
- epubcheck has no verdict on, in two families, both at `usage` severity:
87
-
88
- - **`NEXT-*`** — a published specification requires it and epubcheck has not implemented it
89
- yet, so it becomes an ordinary error the day it catches up: a `mimetype` file that is
90
- compressed (EPUB 3.3 forbids it; epubcheck compares only its contents), and a CSS `url()`
91
- inside another function, such as `image-set()`, whose target is missing, undeclared,
92
- outside the container or a `file:` URL (epubcheck does not read urls there). The four EPUB 3.4
93
- rules that were here first graduated when epubcheck 5.4.0 implemented them, and now report
94
- under its own ids without this flag.
86
+ no specification requires, at `usage` severity:
87
+
95
88
  - **`ADV-*`** — no specification requires it, but the book is still probably wrong
96
89
  (unknown CSS property and descriptor names, a type selector naming no known element, an
97
90
  EPUB 2 package written in EPUB 3, two navigation entries landing on one document, an
@@ -106,9 +99,13 @@ epubcheck has no verdict on, in two families, both at `usage` severity:
106
99
  value its property cannot take such as `font-style: bold`).
107
100
 
108
101
  It is **off by default**: leaving the argument out, or passing `false`/`undefined`,
109
- produces a byte-identical report, so existing two-argument callers are unaffected. Neither
110
- family ever affects `status` — a book that passes epubcheck passes epubveri, with or
111
- without the flag.
102
+ produces a byte-identical report, so existing two-argument callers are unaffected. It never
103
+ affects `status`.
104
+
105
+ The verdict follows the specification, not epubcheck, so in a few listed cases a book that
106
+ passes epubcheck does not pass epubveri (a compressed `mimetype`, for one). The list, with
107
+ each clause, is in
108
+ [AGENTS.md](https://github.com/veripublica/epubveri/blob/main/AGENTS.md#known-differences-from-epubcheck).
112
109
 
113
110
  ### Forcing a version
114
111
 
package/epubveri.d.ts CHANGED
@@ -158,7 +158,7 @@ export interface Data {
158
158
  * lowercase) is filename-based and intentionally not reachable here — this
159
159
  * entry point only ever sees bytes, never a filename.
160
160
  */
161
- export function validate(bytes: Uint8Array, profile?: string | null, advisory?: boolean | null, epub_version?: string | null): Report;
161
+ export function validate(bytes: Uint8Array | number[], profile?: string | null, advisory?: boolean | null, epub_version?: string | null): Report;
162
162
 
163
163
  /**
164
164
  * The validator version — [`epubveri::VERSION`], the one string the CLI's
package/epubveri_bg.js CHANGED
@@ -25,19 +25,27 @@
25
25
  * Note: the CLI-only PKG-016 check (the `.epub` file extension should be
26
26
  * lowercase) is filename-based and intentionally not reachable here — this
27
27
  * entry point only ever sees bytes, never a filename.
28
- * @param {Uint8Array} bytes
28
+ * @param {Uint8Array | number[]} bytes
29
29
  * @param {string | null} [profile]
30
30
  * @param {boolean | null} [advisory]
31
31
  * @param {string | null} [epub_version]
32
32
  * @returns {Report}
33
33
  */
34
34
  export function validate(bytes, profile, advisory, epub_version) {
35
- const ptr0 = passArray8ToWasm0(bytes, wasm.__wbindgen_malloc);
36
- const len0 = WASM_VECTOR_LEN;
37
- var ptr1 = isLikeNone(profile) ? 0 : passStringToWasm0(profile, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
38
- var len1 = WASM_VECTOR_LEN;
39
- var ptr2 = isLikeNone(epub_version) ? 0 : passStringToWasm0(epub_version, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
40
- var len2 = WASM_VECTOR_LEN;
35
+ let ptr0, len0, ptr1, len1, ptr2, len2;
36
+ try {
37
+ ptr0 = passArray8ToWasm0(bytes, wasm.__wbindgen_malloc);
38
+ len0 = WASM_VECTOR_LEN;
39
+ ptr1 = isLikeNone(profile) ? 0 : passStringToWasm0(profile, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
40
+ len1 = WASM_VECTOR_LEN;
41
+ ptr2 = isLikeNone(epub_version) ? 0 : passStringToWasm0(epub_version, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
42
+ len2 = WASM_VECTOR_LEN;
43
+ } catch (e) {
44
+ if (ptr2) { wasm.__wbindgen_free(ptr2, len2 * 1, 1); }
45
+ if (ptr1) { wasm.__wbindgen_free(ptr1, len1 * 1, 1); }
46
+ if (ptr0) { wasm.__wbindgen_free(ptr0, len0 * 1, 1); }
47
+ throw e;
48
+ }
41
49
  const ret = wasm.validate(ptr0, len0, ptr1, len1, isLikeNone(advisory) ? 0xFFFFFF : advisory ? 1 : 0, ptr2, len2);
42
50
  if (ret[2]) {
43
51
  throw takeFromExternrefTable0(ret[1]);
@@ -63,7 +71,7 @@ export function version() {
63
71
  wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
64
72
  }
65
73
  }
66
- export function __wbg_Error_30c8987f7c2ed4e2(arg0, arg1) {
74
+ export function __wbg_Error_208446807d0d1e30(arg0, arg1) {
67
75
  const ret = Error(getStringFromWasm0(arg0, arg1));
68
76
  return ret;
69
77
  }
@@ -71,38 +79,38 @@ export function __wbg_String_8564e559799eccda(arg0, arg1) {
71
79
  const ret = String(arg1);
72
80
  const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
73
81
  const len1 = WASM_VECTOR_LEN;
74
- getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
75
- getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
82
+ getDataViewMemory0().setInt32((arg0 >>> 0) + 4 * 1, len1, true);
83
+ getDataViewMemory0().setInt32((arg0 >>> 0) + 4 * 0, ptr1, true);
76
84
  }
77
- export function __wbg___wbindgen_is_string_90b56bc79aad6f6c(arg0) {
85
+ export function __wbg___wbindgen_is_string_fc456fee5d3317de(arg0) {
78
86
  const ret = typeof(arg0) === 'string';
79
87
  return ret;
80
88
  }
81
- export function __wbg___wbindgen_throw_41e9ee4f547fc59a(arg0, arg1) {
89
+ export function __wbg___wbindgen_throw_4c88d8bf264fd984(arg0, arg1) {
82
90
  throw new Error(getStringFromWasm0(arg0, arg1));
83
91
  }
84
- export function __wbg_new_28744009d011f847() {
85
- const ret = new Map();
92
+ export function __wbg_new_37eb45aaf5eeb820() {
93
+ const ret = new Array();
86
94
  return ret;
87
95
  }
88
- export function __wbg_new_617a8cdb8bb1130e() {
89
- const ret = new Object();
96
+ export function __wbg_new_7075786089b89c5e() {
97
+ const ret = new Map();
90
98
  return ret;
91
99
  }
92
- export function __wbg_new_ee2291f50781bf1d() {
93
- const ret = new Array();
100
+ export function __wbg_new_cd4348290afae586() {
101
+ const ret = new Object();
94
102
  return ret;
95
103
  }
96
- export function __wbg_set_6ae97e73113c4f0b(arg0, arg1, arg2) {
104
+ export function __wbg_set_8282f7e0d2d01336(arg0, arg1, arg2) {
97
105
  const ret = arg0.set(arg1, arg2);
98
106
  return ret;
99
107
  }
100
- export function __wbg_set_6be42768c690e380(arg0, arg1, arg2) {
101
- arg0[arg1] = arg2;
102
- }
103
- export function __wbg_set_bea140a88be9b277(arg0, arg1, arg2) {
108
+ export function __wbg_set_d2d33b52458e984a(arg0, arg1, arg2) {
104
109
  arg0[arg1 >>> 0] = arg2;
105
110
  }
111
+ export function __wbg_set_e4b9a833d288759a(arg0, arg1, arg2) {
112
+ arg0[arg1] = arg2;
113
+ }
106
114
  export function __wbindgen_generic_0000000000000001(arg0) {
107
115
  // Cast intrinsic for `F64 -> Externref`.
108
116
  const ret = arg0;
@@ -120,12 +128,11 @@ export function __wbindgen_generic_0000000000000003(arg0) {
120
128
  }
121
129
  export function __wbindgen_init_externref_table() {
122
130
  const table = wasm.__wbindgen_externrefs;
123
- const offset = table.grow(4);
124
131
  table.set(0, undefined);
125
- table.set(offset + 0, undefined);
126
- table.set(offset + 1, null);
127
- table.set(offset + 2, true);
128
- table.set(offset + 3, false);
132
+ table.set(1024, undefined);
133
+ table.set(1025, null);
134
+ table.set(1026, true);
135
+ table.set(1027, false);
129
136
  }
130
137
  let cachedDataViewMemory0 = null;
131
138
  function getDataViewMemory0() {
@@ -136,7 +143,8 @@ function getDataViewMemory0() {
136
143
  }
137
144
 
138
145
  function getStringFromWasm0(ptr, len) {
139
- return decodeText(ptr >>> 0, len);
146
+ ptr = ptr >>> 0;
147
+ return decodeText(getUint8ArrayMemory0().subarray(ptr, ptr + len));
140
148
  }
141
149
 
142
150
  let cachedUint8ArrayMemory0 = null;
@@ -201,18 +209,18 @@ function takeFromExternrefTable0(idx) {
201
209
  return value;
202
210
  }
203
211
 
204
- let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
212
+ let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true });
205
213
  cachedTextDecoder.decode();
206
214
  const MAX_SAFARI_DECODE_BYTES = 2146435072;
207
215
  let numBytesDecoded = 0;
208
- function decodeText(ptr, len) {
209
- numBytesDecoded += len;
216
+ function decodeText(bytes) {
217
+ numBytesDecoded += bytes.length;
210
218
  if (numBytesDecoded >= MAX_SAFARI_DECODE_BYTES) {
211
- cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
219
+ cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true });
212
220
  cachedTextDecoder.decode();
213
- numBytesDecoded = len;
221
+ numBytesDecoded = bytes.length;
214
222
  }
215
- return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));
223
+ return cachedTextDecoder.decode(bytes);
216
224
  }
217
225
 
218
226
  const cachedTextEncoder = new TextEncoder();
package/epubveri_bg.wasm CHANGED
Binary file
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@veripublica/epubveri-wasm",
3
3
  "type": "module",
4
4
  "description": "WebAssembly bindings for epubveri — a pure-Rust, JVM-free EPUB validator that runs in the browser.",
5
- "version": "0.37.0",
5
+ "version": "0.38.0",
6
6
  "license": "AGPL-3.0-only OR LicenseRef-veripublica-Commercial",
7
7
  "repository": {
8
8
  "type": "git",