@kya-os/checkpoint-wasm-runtime 1.1.1 → 1.1.2

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.
@@ -1,72 +0,0 @@
1
- import { i as IWasmLoader, h as IWasmBindings } from './rules-detector-DjbTJ1-Q.mjs';
2
-
3
- /**
4
- * Static WASM Loader for Edge Runtime
5
- *
6
- * This loader is designed for environments that require static WASM imports,
7
- * such as Vercel Edge Runtime and Cloudflare Workers.
8
- *
9
- * Usage:
10
- * ```typescript
11
- * // In your middleware.ts:
12
- * import wasmModule from '@kya-os/checkpoint-wasm-runtime/wasm?module';
13
- * import { StaticWasmLoader, WasmDetector } from '@kya-os/checkpoint-wasm-runtime/edge';
14
- *
15
- * const loader = new StaticWasmLoader(wasmModule);
16
- * const detector = new WasmDetector(loader);
17
- * ```
18
- *
19
- * The `?module` suffix tells bundlers (webpack, esbuild) to import the WASM
20
- * as a pre-compiled WebAssembly.Module, which is required for Edge Runtime.
21
- */
22
-
23
- /**
24
- * Static WASM Loader
25
- *
26
- * For Edge Runtime environments that require pre-compiled WASM modules.
27
- * The consumer must provide the WASM module via a static import with `?module` suffix.
28
- *
29
- * This loader uses the wasm-bindgen generated JS glue code to properly
30
- * initialize the WASM module with all required imports.
31
- */
32
- declare class StaticWasmLoader implements IWasmLoader {
33
- private readonly wasmModule;
34
- private bindings;
35
- private loadPromise;
36
- private wasmExports;
37
- /**
38
- * Create a new StaticWasmLoader
39
- * @param wasmModule - Pre-compiled WebAssembly.Module from static import
40
- */
41
- constructor(wasmModule: WebAssembly.Module);
42
- /**
43
- * Load and instantiate the WASM module
44
- */
45
- load(): Promise<void>;
46
- /**
47
- * Internal load implementation using wasm-bindgen initSync
48
- */
49
- private doLoad;
50
- /**
51
- * Get the WASM bindings after loading
52
- */
53
- getBindings(): IWasmBindings;
54
- /**
55
- * Check if WASM is loaded
56
- */
57
- isLoaded(): boolean;
58
- /**
59
- * Get the loading strategy name
60
- */
61
- getStrategy(): string;
62
- /**
63
- * Create bindings wrapper using wasm-bindgen exports
64
- */
65
- private createBindings;
66
- }
67
- /**
68
- * Create a static loader with validation
69
- */
70
- declare function createStaticLoader(wasmModule: WebAssembly.Module): StaticWasmLoader;
71
-
72
- export { StaticWasmLoader as S, createStaticLoader as c };