payid-rule-engine 0.1.7 → 0.1.9

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/wasm.ts +6 -2
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "payid-rule-engine",
3
- "version": "0.1.7",
3
+ "version": "0.1.9",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "scripts": {
package/src/wasm.ts CHANGED
@@ -10,7 +10,11 @@ export async function loadWasm(
10
10
  wasi_snapshot_preview1: wasi.wasiImport
11
11
  });
12
12
 
13
- wasi.start(instance);
13
+ // rule_engine.wasm adalah reactor module — bukan command module.
14
+ // Node.js punya wasi.initialize(), tapi Bun belum support.
15
+ // Solusi: panggil _initialize export langsung dari WASM instance (portable).
16
+ const _init = instance.exports._initialize as (() => void) | undefined;
17
+ if (_init) _init();
14
18
 
15
19
  return instance;
16
- }
20
+ }