@stll/scan-engine 0.1.1 → 0.1.3

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
@@ -119,4 +119,16 @@ bun run build:wasm && bun run check:wasm --check
119
119
  ```
120
120
 
121
121
  Generated bindings in `generated/` are committed and ship in the package next
122
- to `dist/`.
122
+ to `dist/`. CI requires them byte for byte, so `build:wasm` runs only on x86_64
123
+ Linux with the Rust version in `rust-toolchain.toml`. On any other host (macOS,
124
+ ARM64 Linux), run `bun run build:wasm:container`: it runs the same script in
125
+ the official `linux/amd64` Rust image pinned by digest, through Docker or a
126
+ compatible runtime such as OrbStack. Crates, the `wasm-bindgen` CLI and the
127
+ build cache stay in Docker volumes, never in the host's `~/.cargo`. A cold run
128
+ compiles `wasm-bindgen` under emulation and takes several minutes.
129
+
130
+ Update crates with `bun run cargo:update --manifest-path
131
+ packages/scan-engine/Cargo.toml <crate>` from the repository root, never with a
132
+ bare `cargo update`: it keeps every new pin out of the release-age quarantine
133
+ that CI enforces on `Cargo.lock`. `deny.toml` is the crate's `cargo deny`
134
+ policy (licenses, bans, sources and advisories).
package/dist/review.d.ts CHANGED
@@ -1,6 +1,5 @@
1
1
  import { CleanScanResult, PhysicalPageSize, RasterizedScanPage, ScanEngine, ScanEngineError, ScanOptions, ScanPageRotation } from "./types.js";
2
2
  import { Result } from "better-result";
3
- //#region src/review.d.ts
4
3
  type CleanedScan = Extract<CleanScanResult, {
5
4
  type: "cleaned";
6
5
  }>;
@@ -47,5 +46,4 @@ export type TargetPageBox = PhysicalPageSize & {
47
46
  rotation: ScanPageRotation;
48
47
  };
49
48
  export declare const targetPageBox: (pageSize: PhysicalPageSize, rotation: ScanPageRotation) => TargetPageBox;
50
- //#endregion
51
49
  export {};
package/dist/review.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { Result, panic } from "better-result";
2
- //#region src/review.ts
2
+ // src/review.ts
3
3
  const reviewPage = async ({ engine, pageId, page, options }) => {
4
4
  const result = await engine.clean(page, options);
5
5
  if (result.isErr()) return Result.err(result.error);
@@ -78,5 +78,4 @@ const targetPageBox = (pageSize, rotation) => ({
78
78
  heightPoints: pageSize.heightPoints,
79
79
  rotation
80
80
  });
81
- //#endregion
82
81
  export { applyAll, applyOne, createCleanScanReview, rejectOne, reviewPage, setPageReview, targetPageBox, undoCleanScanReview };
@@ -1,5 +1,4 @@
1
1
  import { RasterizedScanPage, ScanEngine, ScanOptions } from "./types.js";
2
- //#region src/worker-protocol.d.ts
3
2
  type SerializedWasmResult = {
4
3
  status: string;
5
4
  reason: string;
@@ -25,8 +24,6 @@ type WorkerResponse = {
25
24
  errorType: "runtime-trap" | "failure";
26
25
  message: string;
27
26
  };
28
- //#endregion
29
- //#region src/scan-engine.d.ts
30
27
  type WasmScanResult = {
31
28
  free: () => void;
32
29
  readonly status: string;
@@ -54,5 +51,4 @@ type WorkerEngineOptions = {
54
51
  };
55
52
  export declare const createScanEngine: (load?: WasmLoader, workerOptions?: WorkerEngineOptions) => ScanEngine;
56
53
  export declare const scanEngine: ScanEngine;
57
- //#endregion
58
54
  export {};
@@ -3,7 +3,7 @@ import { Result } from "better-result";
3
3
  import { fetchWithTimeout } from "@stll/fetch";
4
4
  import { readBodyWithIdleDeadline } from "@stll/fetch/body-reader";
5
5
  import { clean_scan_rgba, initSync } from "../generated/scan_engine.js";
6
- //#region src/scan-engine.ts
6
+ // src/scan-engine.ts
7
7
  const WASM_LOAD_TIMEOUT_MS = 1e4;
8
8
  const WORKER_REQUEST_TIMEOUT_MS = 1e4;
9
9
  const loadWasmBindings = async () => {
@@ -220,5 +220,4 @@ const createScanEngine = (load, workerOptions) => {
220
220
  }) };
221
221
  };
222
222
  const scanEngine = createScanEngine();
223
- //#endregion
224
223
  export { createScanEngine, scanEngine };
@@ -1,7 +1,7 @@
1
1
  import { fetchWithTimeout } from "@stll/fetch";
2
2
  import { readBodyWithIdleDeadline } from "@stll/fetch/body-reader";
3
3
  import initWasm, { clean_scan_rgba } from "../generated/scan_engine.js";
4
- //#region src/scan-engine.worker.ts
4
+ // src/scan-engine.worker.ts
5
5
  const WASM_LOAD_TIMEOUT_MS = 1e4;
6
6
  const post = (response, transfer = []) => {
7
7
  Reflect.apply(postMessage, globalThis, [response, transfer]);
@@ -58,4 +58,3 @@ addEventListener("message", (event) => {
58
58
  });
59
59
  });
60
60
  });
61
- //#endregion
package/dist/types.d.ts CHANGED
@@ -1,5 +1,4 @@
1
1
  import { Result } from "better-result";
2
- //#region src/types.d.ts
3
2
  export type ScanPageRotation = 0 | 90 | 180 | 270;
4
3
  export type PhysicalPageSize = {
5
4
  widthPoints: number;
@@ -69,5 +68,4 @@ export declare class ScanEngineError extends ScanEngineError_base<{
69
68
  export type ScanEngine = {
70
69
  clean: (page: RasterizedScanPage, options: ScanOptions) => Promise<Result<CleanScanResult, ScanEngineError>>;
71
70
  };
72
- //#endregion
73
71
  export {};
package/dist/types.js CHANGED
@@ -1,5 +1,4 @@
1
1
  import { TaggedError } from "better-result";
2
- //#region src/types.ts
2
+ // src/types.ts
3
3
  var ScanEngineError = class extends TaggedError("ScanEngineError") {};
4
- //#endregion
5
4
  export { ScanEngineError };
@@ -17,7 +17,7 @@ export class WasmScanResult {
17
17
  export function clean_scan_rgba(
18
18
  width: number,
19
19
  height: number,
20
- pixels: Uint8Array,
20
+ pixels: Uint8Array | number[],
21
21
  dpi: number,
22
22
  output: string,
23
23
  content_crop: boolean,
@@ -44,21 +44,24 @@ export interface InitOutput {
44
44
  ) => void;
45
45
  readonly wasmscanresult_applied_quad: (a: number, b: number) => void;
46
46
  readonly wasmscanresult_content_box: (a: number, b: number) => void;
47
+ readonly wasmscanresult_height: (a: number) => number;
47
48
  readonly wasmscanresult_pixels: (a: number, b: number) => void;
48
49
  readonly wasmscanresult_reason: (a: number, b: number) => void;
49
- readonly wasmscanresult_status: (a: number, b: number) => void;
50
- readonly wasmscanresult_height: (a: number) => number;
51
50
  readonly wasmscanresult_skew_degrees: (a: number) => number;
51
+ readonly wasmscanresult_status: (a: number, b: number) => void;
52
52
  readonly wasmscanresult_width: (a: number) => number;
53
+ readonly __wbindgen_externrefs: WebAssembly.Table;
53
54
  readonly __wbindgen_add_to_stack_pointer: (a: number) => number;
54
55
  readonly __wbindgen_export: (a: number, b: number) => number;
55
- readonly __wbindgen_export2: (
56
+ readonly __wbindgen_export2: (a: number, b: number, c: number) => void;
57
+ readonly __wbindgen_export3: (
56
58
  a: number,
57
59
  b: number,
58
60
  c: number,
59
61
  d: number,
60
62
  ) => number;
61
- readonly __wbindgen_export3: (a: number, b: number, c: number) => void;
63
+ readonly __wbindgen_export4: (a: number) => void;
64
+ readonly __wbindgen_start: () => void;
62
65
  }
63
66
 
64
67
  export type SyncInitInput = BufferSource | WebAssembly.Module;
@@ -22,12 +22,12 @@ export class WasmScanResult {
22
22
  */
23
23
  get applied_quad() {
24
24
  try {
25
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
25
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16) >>> 0;
26
26
  wasm.wasmscanresult_applied_quad(retptr, this.__wbg_ptr);
27
27
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
28
28
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
29
29
  var v1 = getArrayF32FromWasm0(r0, r1).slice();
30
- wasm.__wbindgen_export3(r0, r1 * 4, 4);
30
+ wasm.__wbindgen_export2(r0, r1 * 4, 4);
31
31
  return v1;
32
32
  } finally {
33
33
  wasm.__wbindgen_add_to_stack_pointer(16);
@@ -38,12 +38,12 @@ export class WasmScanResult {
38
38
  */
39
39
  get content_box() {
40
40
  try {
41
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
41
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16) >>> 0;
42
42
  wasm.wasmscanresult_content_box(retptr, this.__wbg_ptr);
43
43
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
44
44
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
45
45
  var v1 = getArrayU32FromWasm0(r0, r1).slice();
46
- wasm.__wbindgen_export3(r0, r1 * 4, 4);
46
+ wasm.__wbindgen_export2(r0, r1 * 4, 4);
47
47
  return v1;
48
48
  } finally {
49
49
  wasm.__wbindgen_add_to_stack_pointer(16);
@@ -61,12 +61,12 @@ export class WasmScanResult {
61
61
  */
62
62
  get pixels() {
63
63
  try {
64
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
64
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16) >>> 0;
65
65
  wasm.wasmscanresult_pixels(retptr, this.__wbg_ptr);
66
66
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
67
67
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
68
68
  var v1 = getArrayU8FromWasm0(r0, r1).slice();
69
- wasm.__wbindgen_export3(r0, r1 * 1, 1);
69
+ wasm.__wbindgen_export2(r0, r1 * 1, 1);
70
70
  return v1;
71
71
  } finally {
72
72
  wasm.__wbindgen_add_to_stack_pointer(16);
@@ -79,7 +79,7 @@ export class WasmScanResult {
79
79
  let deferred1_0;
80
80
  let deferred1_1;
81
81
  try {
82
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
82
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16) >>> 0;
83
83
  wasm.wasmscanresult_reason(retptr, this.__wbg_ptr);
84
84
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
85
85
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
@@ -88,7 +88,7 @@ export class WasmScanResult {
88
88
  return getStringFromWasm0(r0, r1);
89
89
  } finally {
90
90
  wasm.__wbindgen_add_to_stack_pointer(16);
91
- wasm.__wbindgen_export3(deferred1_0, deferred1_1, 1);
91
+ wasm.__wbindgen_export2(deferred1_0, deferred1_1, 1);
92
92
  }
93
93
  }
94
94
  /**
@@ -105,7 +105,7 @@ export class WasmScanResult {
105
105
  let deferred1_0;
106
106
  let deferred1_1;
107
107
  try {
108
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
108
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16) >>> 0;
109
109
  wasm.wasmscanresult_status(retptr, this.__wbg_ptr);
110
110
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
111
111
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
@@ -114,7 +114,7 @@ export class WasmScanResult {
114
114
  return getStringFromWasm0(r0, r1);
115
115
  } finally {
116
116
  wasm.__wbindgen_add_to_stack_pointer(16);
117
- wasm.__wbindgen_export3(deferred1_0, deferred1_1, 1);
117
+ wasm.__wbindgen_export2(deferred1_0, deferred1_1, 1);
118
118
  }
119
119
  }
120
120
  /**
@@ -131,7 +131,7 @@ if (Symbol.dispose)
131
131
  /**
132
132
  * @param {number} width
133
133
  * @param {number} height
134
- * @param {Uint8Array} pixels
134
+ * @param {Uint8Array | number[]} pixels
135
135
  * @param {number} dpi
136
136
  * @param {string} output
137
137
  * @param {boolean} content_crop
@@ -148,32 +148,48 @@ export function clean_scan_rgba(
148
148
  deskew,
149
149
  ) {
150
150
  try {
151
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
152
- const ptr0 = passArray8ToWasm0(pixels, wasm.__wbindgen_export);
153
- const len0 = WASM_VECTOR_LEN;
154
- const ptr1 = passStringToWasm0(
155
- output,
156
- wasm.__wbindgen_export,
157
- wasm.__wbindgen_export2,
158
- );
159
- const len1 = WASM_VECTOR_LEN;
151
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16) >>> 0;
152
+ const val3 = +width;
153
+ const val4 = +height;
154
+ const val5 = +dpi;
155
+ const val6 = +content_crop;
156
+ const val7 = +deskew;
157
+ let ptr0, len0, ptr1, len1;
158
+ try {
159
+ ptr0 = passArray8ToWasm0(pixels, wasm.__wbindgen_export);
160
+ len0 = WASM_VECTOR_LEN;
161
+ ptr1 = passStringToWasm0(
162
+ output,
163
+ wasm.__wbindgen_export,
164
+ wasm.__wbindgen_export3,
165
+ );
166
+ len1 = WASM_VECTOR_LEN;
167
+ } catch (e) {
168
+ if (ptr1) {
169
+ wasm.__wbindgen_export2(ptr1, len1 * 1, 1);
170
+ }
171
+ if (ptr0) {
172
+ wasm.__wbindgen_export2(ptr0, len0 * 1, 1);
173
+ }
174
+ throw e;
175
+ }
160
176
  wasm.clean_scan_rgba(
161
177
  retptr,
162
- width,
163
- height,
178
+ val3,
179
+ val4,
164
180
  ptr0,
165
181
  len0,
166
- dpi,
182
+ val5,
167
183
  ptr1,
168
184
  len1,
169
- content_crop,
170
- deskew,
185
+ val6,
186
+ val7,
171
187
  );
172
188
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
173
189
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
174
190
  var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
175
191
  if (r2) {
176
- throw takeObject(r1);
192
+ throw takeFromExternrefTable0(r1);
177
193
  }
178
194
  return WasmScanResult.__wrap(r0);
179
195
  } finally {
@@ -183,13 +199,21 @@ export function clean_scan_rgba(
183
199
  function __wbg_get_imports() {
184
200
  const import0 = {
185
201
  __proto__: null,
186
- __wbg___wbindgen_throw_344f42d3211c4765: function (arg0, arg1) {
202
+ __wbg___wbindgen_throw_4c88d8bf264fd984: function (arg0, arg1) {
187
203
  throw new Error(getStringFromWasm0(arg0, arg1));
188
204
  },
189
- __wbindgen_cast_0000000000000001: function (arg0, arg1) {
205
+ __wbindgen_generic_0000000000000001: function (arg0, arg1) {
190
206
  // Cast intrinsic for `Ref(String) -> Externref`.
191
207
  const ret = getStringFromWasm0(arg0, arg1);
192
- return addHeapObject(ret);
208
+ return ret;
209
+ },
210
+ __wbindgen_init_externref_table: function () {
211
+ const table = wasm.__wbindgen_externrefs;
212
+ table.set(0, undefined);
213
+ table.set(1024, undefined);
214
+ table.set(1025, null);
215
+ table.set(1026, true);
216
+ table.set(1027, false);
193
217
  },
194
218
  };
195
219
  return {
@@ -203,21 +227,6 @@ const WasmScanResultFinalization =
203
227
  ? { register: () => {}, unregister: () => {} }
204
228
  : new FinalizationRegistry((ptr) => wasm.__wbg_wasmscanresult_free(ptr, 1));
205
229
 
206
- function addHeapObject(obj) {
207
- if (heap_next === heap.length) heap.push(heap.length + 1);
208
- const idx = heap_next;
209
- heap_next = heap[idx];
210
-
211
- heap[idx] = obj;
212
- return idx;
213
- }
214
-
215
- function dropObject(idx) {
216
- if (idx < 1028) return;
217
- heap[idx] = heap_next;
218
- heap_next = idx;
219
- }
220
-
221
230
  function getArrayF32FromWasm0(ptr, len) {
222
231
  ptr = ptr >>> 0;
223
232
  return getFloat32ArrayMemory0().subarray(ptr / 4, ptr / 4 + len);
@@ -258,7 +267,8 @@ function getFloat32ArrayMemory0() {
258
267
  }
259
268
 
260
269
  function getStringFromWasm0(ptr, len) {
261
- return decodeText(ptr >>> 0, len);
270
+ ptr = ptr >>> 0;
271
+ return decodeText(getUint8ArrayMemory0().subarray(ptr, ptr + len));
262
272
  }
263
273
 
264
274
  let cachedUint32ArrayMemory0 = null;
@@ -283,15 +293,6 @@ function getUint8ArrayMemory0() {
283
293
  return cachedUint8ArrayMemory0;
284
294
  }
285
295
 
286
- function getObject(idx) {
287
- return heap[idx];
288
- }
289
-
290
- let heap = new Array(1024).fill(undefined);
291
- heap.push(undefined, null, true, false);
292
-
293
- let heap_next = heap.length;
294
-
295
296
  function passArray8ToWasm0(arg, malloc) {
296
297
  const ptr = malloc(arg.length * 1, 1) >>> 0;
297
298
  getUint8ArrayMemory0().set(arg, ptr / 1);
@@ -338,32 +339,24 @@ function passStringToWasm0(arg, malloc, realloc) {
338
339
  return ptr;
339
340
  }
340
341
 
341
- function takeObject(idx) {
342
- const ret = getObject(idx);
343
- dropObject(idx);
344
- return ret;
342
+ function takeFromExternrefTable0(idx) {
343
+ const value = wasm.__wbindgen_externrefs.get(idx);
344
+ wasm.__wbindgen_export4(idx);
345
+ return value;
345
346
  }
346
347
 
347
- let cachedTextDecoder = new TextDecoder("utf-8", {
348
- ignoreBOM: true,
349
- fatal: true,
350
- });
348
+ let cachedTextDecoder = new TextDecoder("utf-8", { ignoreBOM: true });
351
349
  cachedTextDecoder.decode();
352
350
  const MAX_SAFARI_DECODE_BYTES = 2146435072;
353
351
  let numBytesDecoded = 0;
354
- function decodeText(ptr, len) {
355
- numBytesDecoded += len;
352
+ function decodeText(bytes) {
353
+ numBytesDecoded += bytes.length;
356
354
  if (numBytesDecoded >= MAX_SAFARI_DECODE_BYTES) {
357
- cachedTextDecoder = new TextDecoder("utf-8", {
358
- ignoreBOM: true,
359
- fatal: true,
360
- });
355
+ cachedTextDecoder = new TextDecoder("utf-8", { ignoreBOM: true });
361
356
  cachedTextDecoder.decode();
362
- numBytesDecoded = len;
357
+ numBytesDecoded = bytes.length;
363
358
  }
364
- return cachedTextDecoder.decode(
365
- getUint8ArrayMemory0().subarray(ptr, ptr + len),
366
- );
359
+ return cachedTextDecoder.decode(bytes);
367
360
  }
368
361
 
369
362
  const cachedTextEncoder = new TextEncoder();
@@ -390,16 +383,23 @@ function __wbg_finalize_init(instance, module) {
390
383
  cachedFloat32ArrayMemory0 = null;
391
384
  cachedUint32ArrayMemory0 = null;
392
385
  cachedUint8ArrayMemory0 = null;
386
+ wasm.__wbindgen_start();
393
387
  return wasm;
394
388
  }
395
389
 
396
390
  async function __wbg_load(module, imports) {
397
391
  if (typeof Response === "function" && module instanceof Response) {
392
+ if (!module.ok) {
393
+ throw new Error(
394
+ `failed to fetch Wasm: ${module.status} ${module.statusText} fetching '${module.url}'`,
395
+ );
396
+ }
397
+
398
398
  if (typeof WebAssembly.instantiateStreaming === "function") {
399
399
  try {
400
400
  return await WebAssembly.instantiateStreaming(module, imports);
401
401
  } catch (e) {
402
- const validResponse = module.ok && expectedResponseType(module.type);
402
+ const validResponse = expectedResponseType(module.type);
403
403
 
404
404
  if (
405
405
  validResponse &&
@@ -457,7 +457,18 @@ function initSync(module) {
457
457
  return __wbg_finalize_init(instance, module);
458
458
  }
459
459
 
460
+ let __wbg_init_promise;
460
461
  async function __wbg_init(module_or_path) {
462
+ if (__wbg_init_promise === undefined) {
463
+ __wbg_init_promise = __wbg_init_once(module_or_path);
464
+ __wbg_init_promise.catch(() => {
465
+ __wbg_init_promise = undefined;
466
+ });
467
+ }
468
+ return __wbg_init_promise;
469
+ }
470
+
471
+ async function __wbg_init_once(module_or_path) {
461
472
  if (module_or_path !== undefined) {
462
473
  if (Object.getPrototypeOf(module_or_path) === Object.prototype) {
463
474
  ({ module_or_path } = module_or_path);
Binary file
@@ -15,18 +15,21 @@ export const clean_scan_rgba: (
15
15
  ) => void;
16
16
  export const wasmscanresult_applied_quad: (a: number, b: number) => void;
17
17
  export const wasmscanresult_content_box: (a: number, b: number) => void;
18
+ export const wasmscanresult_height: (a: number) => number;
18
19
  export const wasmscanresult_pixels: (a: number, b: number) => void;
19
20
  export const wasmscanresult_reason: (a: number, b: number) => void;
20
- export const wasmscanresult_status: (a: number, b: number) => void;
21
- export const wasmscanresult_height: (a: number) => number;
22
21
  export const wasmscanresult_skew_degrees: (a: number) => number;
22
+ export const wasmscanresult_status: (a: number, b: number) => void;
23
23
  export const wasmscanresult_width: (a: number) => number;
24
+ export const __wbindgen_externrefs: WebAssembly.Table;
24
25
  export const __wbindgen_add_to_stack_pointer: (a: number) => number;
25
26
  export const __wbindgen_export: (a: number, b: number) => number;
26
- export const __wbindgen_export2: (
27
+ export const __wbindgen_export2: (a: number, b: number, c: number) => void;
28
+ export const __wbindgen_export3: (
27
29
  a: number,
28
30
  b: number,
29
31
  c: number,
30
32
  d: number,
31
33
  ) => number;
32
- export const __wbindgen_export3: (a: number, b: number, c: number) => void;
34
+ export const __wbindgen_export4: (a: number) => void;
35
+ export const __wbindgen_start: () => void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stll/scan-engine",
3
- "version": "0.1.1",
3
+ "version": "0.1.3",
4
4
  "description": "Document scan cleanup engine (Rust, WebAssembly): deskew, content crop and binarization off the main thread, plus a per-page review state machine",
5
5
  "keywords": [
6
6
  "binarization",
@@ -56,6 +56,7 @@
56
56
  "lint:fix": "cd ../.. && bun --bun oxlint -c oxlint.config.ts --type-aware --fix packages/scan-engine",
57
57
  "format:rust": "cargo fmt",
58
58
  "build:wasm": "bash scripts/build-wasm.sh",
59
+ "build:wasm:container": "bash scripts/build-wasm-container.sh",
59
60
  "check:wasm": "bun --preload ../../scripts/offline-network-preload.ts scripts/check-wasm.ts",
60
61
  "generate:fixtures": "bun scripts/generate-fixtures.ts",
61
62
  "check:fixtures": "bun scripts/generate-fixtures.ts --check",
@@ -68,7 +69,7 @@
68
69
  "devDependencies": {
69
70
  "@stll/typescript-config": "0.0.0",
70
71
  "bun-types": "1.4.4",
71
- "tsdown": "0.23.1"
72
+ "tsdown": "0.23.4"
72
73
  },
73
74
  "main": "./dist/scan-engine.js",
74
75
  "types": "./dist/scan-engine.d.ts"