@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.
- package/CHANGELOG.md +55 -0
- package/dist/edge.d.mts +531 -4
- package/dist/edge.d.ts +531 -4
- package/dist/engine.js +11 -0
- package/dist/engine.mjs +17 -1
- package/dist/index.d.mts +72 -5
- package/dist/index.d.ts +72 -5
- package/dist/index.js +2 -0
- package/dist/node.d.mts +2 -3
- package/dist/node.d.ts +2 -3
- package/dist/orchestrator-edge.d.mts +199 -5
- package/dist/orchestrator-edge.d.ts +199 -5
- package/dist/orchestrator-node.d.mts +313 -5
- package/dist/orchestrator-node.d.ts +313 -5
- package/dist/orchestrator-node.js +23 -0
- package/dist/orchestrator-node.mjs +29 -1
- package/dist/orchestrator.d.mts +86 -6
- package/dist/orchestrator.d.ts +86 -6
- package/dist/orchestrator.js +29 -2
- package/dist/orchestrator.mjs +31 -1
- package/dist/{rules-detector-DjbTJ1-Q.d.mts → rules-detector-ZIKHN-_y.d.mts} +63 -1
- package/dist/{rules-detector-DjbTJ1-Q.d.ts → rules-detector-ZIKHN-_y.d.ts} +63 -1
- package/package.json +1 -1
- package/dist/dynamic-loader-cS-pUisw.d.ts +0 -65
- package/dist/dynamic-loader-qGJacfEC.d.mts +0 -65
- package/dist/render-decision-C1a-iuiW.d.mts +0 -200
- package/dist/render-decision-Dsjwt96g.d.ts +0 -200
- package/dist/static-loader-C1hUlksK.d.ts +0 -72
- package/dist/static-loader-Ds4iNw7c.d.mts +0 -72
|
@@ -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 };
|