@vulfram/transport-wasm 0.5.6-alpha → 0.5.8-alpha
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/package.json +3 -5
- package/src/index.ts +2 -3
package/package.json
CHANGED
|
@@ -1,16 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vulfram/transport-wasm",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.8-alpha",
|
|
4
4
|
"module": "src/index.ts",
|
|
5
5
|
"main": "src/index.ts",
|
|
6
6
|
"types": "src/index.ts",
|
|
7
7
|
"type": "module",
|
|
8
8
|
"dependencies": {
|
|
9
|
-
"@vulfram/transport-types": "^0.2.
|
|
10
|
-
"buffer": "^6.0.3"
|
|
9
|
+
"@vulfram/transport-types": "^0.2.2"
|
|
11
10
|
},
|
|
12
11
|
"devDependencies": {
|
|
13
|
-
"@types/bun": "^1.3.
|
|
14
|
-
"typescript": "^5.9.3"
|
|
12
|
+
"@types/bun": "^1.3.8"
|
|
15
13
|
}
|
|
16
14
|
}
|
package/src/index.ts
CHANGED
|
@@ -14,7 +14,6 @@ import initWasm, {
|
|
|
14
14
|
type BufferResult as WasmBufferResult,
|
|
15
15
|
type InitInput,
|
|
16
16
|
} from '../lib/vulfram_core.js';
|
|
17
|
-
import { Buffer } from 'buffer';
|
|
18
17
|
|
|
19
18
|
let initialized = false;
|
|
20
19
|
|
|
@@ -35,10 +34,10 @@ function ensureInitialized(): void {
|
|
|
35
34
|
}
|
|
36
35
|
|
|
37
36
|
function unwrapBufferResult(result: WasmBufferResult): {
|
|
38
|
-
buffer:
|
|
37
|
+
buffer: Uint8Array;
|
|
39
38
|
result: number;
|
|
40
39
|
} {
|
|
41
|
-
const buffer =
|
|
40
|
+
const buffer = result.buffer;
|
|
42
41
|
const code = result.result;
|
|
43
42
|
result.free();
|
|
44
43
|
return { buffer, result: code };
|