taglib-wasm 1.0.0-beta.2 → 1.0.0-beta.4
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 +4 -8
- package/dist/index.d.ts +3 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +8 -8
- package/dist/src/file-utils.js +7 -7
- package/dist/src/folder-api.d.ts.map +1 -1
- package/dist/src/folder-api.js +112 -113
- package/dist/src/msgpack/decoder.d.ts.map +1 -1
- package/dist/src/msgpack/decoder.js +24 -14
- package/dist/src/runtime/detector.d.ts +5 -4
- package/dist/src/runtime/detector.d.ts.map +1 -1
- package/dist/src/runtime/detector.js +15 -1
- package/dist/src/runtime/unified-loader.d.ts.map +1 -1
- package/dist/src/runtime/unified-loader.js +24 -17
- package/dist/src/runtime/wasi-fs-deno.d.ts +8 -0
- package/dist/src/runtime/wasi-fs-deno.d.ts.map +1 -0
- package/dist/src/runtime/wasi-fs-deno.js +26 -0
- package/dist/src/runtime/wasi-fs-node.d.ts +9 -0
- package/dist/src/runtime/wasi-fs-node.d.ts.map +1 -0
- package/dist/src/runtime/wasi-fs-node.js +60 -0
- package/dist/src/runtime/wasi-fs-provider.d.ts +25 -0
- package/dist/src/runtime/wasi-fs-provider.d.ts.map +1 -0
- package/dist/src/runtime/wasi-fs-provider.js +0 -0
- package/dist/src/runtime/wasi-host-loader.d.ts +2 -0
- package/dist/src/runtime/wasi-host-loader.d.ts.map +1 -1
- package/dist/src/runtime/wasi-host-loader.js +14 -3
- package/dist/src/runtime/wasi-host.d.ts +3 -1
- package/dist/src/runtime/wasi-host.d.ts.map +1 -1
- package/dist/src/runtime/wasi-host.js +21 -16
- package/dist/src/runtime/wasi-loader.d.ts +4 -0
- package/dist/src/runtime/wasi-loader.d.ts.map +1 -1
- package/dist/src/runtime/wasmer-sdk-loader.d.ts.map +1 -1
- package/dist/src/runtime/wasmer-sdk-loader.js +2 -1
- package/dist/src/simple.d.ts +12 -12
- package/dist/src/simple.d.ts.map +1 -1
- package/dist/src/simple.js +15 -11
- package/dist/src/taglib/audio-file-base.d.ts +0 -1
- package/dist/src/taglib/audio-file-base.d.ts.map +1 -1
- package/dist/src/taglib/audio-file-base.js +30 -10
- package/dist/src/taglib/audio-file-impl.d.ts.map +1 -1
- package/dist/src/taglib/audio-file-impl.js +0 -1
- package/dist/src/taglib/mutable-tag.d.ts +7 -7
- package/dist/src/taglib/mutable-tag.d.ts.map +1 -1
- package/dist/src/taglib/taglib-class.d.ts +2 -0
- package/dist/src/taglib/taglib-class.d.ts.map +1 -1
- package/dist/src/taglib/taglib-class.js +14 -0
- package/dist/src/workers/taglib-worker.js +2 -2
- package/package.json +1 -1
|
@@ -2,11 +2,6 @@ var __defProp = Object.defineProperty;
|
|
|
2
2
|
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
3
3
|
var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
4
4
|
import { detectRuntime } from "./detector.js";
|
|
5
|
-
import {
|
|
6
|
-
initializeWasmer,
|
|
7
|
-
isWasmerAvailable,
|
|
8
|
-
loadWasmerWasi
|
|
9
|
-
} from "./wasmer-sdk-loader.js";
|
|
10
5
|
class UnifiedLoaderError extends Error {
|
|
11
6
|
constructor(message, cause) {
|
|
12
7
|
super(message);
|
|
@@ -30,7 +25,7 @@ async function loadUnifiedTagLibModule(options = {}) {
|
|
|
30
25
|
if (options.debug) {
|
|
31
26
|
console.log(`[UnifiedLoader] Detected runtime: ${runtime.environment}`);
|
|
32
27
|
}
|
|
33
|
-
const wasmType =
|
|
28
|
+
const wasmType = selectWasmType(runtime, options);
|
|
34
29
|
if (options.debug) {
|
|
35
30
|
console.log(
|
|
36
31
|
`[UnifiedLoader] Selected ${wasmType} for ${runtime.environment}`
|
|
@@ -53,14 +48,14 @@ async function loadUnifiedTagLibModule(options = {}) {
|
|
|
53
48
|
}
|
|
54
49
|
return unifiedModule;
|
|
55
50
|
}
|
|
56
|
-
|
|
51
|
+
function selectWasmType(runtime, options) {
|
|
57
52
|
if (options.forceWasmType) {
|
|
58
53
|
return options.forceWasmType;
|
|
59
54
|
}
|
|
60
55
|
if (options.disableOptimizations) {
|
|
61
56
|
return "emscripten";
|
|
62
57
|
}
|
|
63
|
-
if (runtime.
|
|
58
|
+
if (runtime.wasmType === "wasi" && runtime.supportsFilesystem) {
|
|
64
59
|
return "wasi";
|
|
65
60
|
}
|
|
66
61
|
return "emscripten";
|
|
@@ -77,6 +72,18 @@ async function loadModule(wasmType, _runtime, options) {
|
|
|
77
72
|
}
|
|
78
73
|
async function loadWasiModuleWithFallback(options) {
|
|
79
74
|
try {
|
|
75
|
+
const { loadWasiHost } = await import("./wasi-host-loader.js");
|
|
76
|
+
const wasiModule = await loadWasiHost({
|
|
77
|
+
wasmPath: options.wasmUrl || "./dist/wasi/taglib_wasi.wasm"
|
|
78
|
+
});
|
|
79
|
+
return { module: wasiModule, actualWasmType: "wasi" };
|
|
80
|
+
} catch (hostError) {
|
|
81
|
+
if (options.debug) {
|
|
82
|
+
console.warn(`[UnifiedLoader] WASI host failed:`, hostError);
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
try {
|
|
86
|
+
const { initializeWasmer, loadWasmerWasi } = await import("./wasmer-sdk-loader.js");
|
|
80
87
|
await initializeWasmer(options.useInlineWasm);
|
|
81
88
|
const wasiModule = await loadWasmerWasi({
|
|
82
89
|
wasmPath: options.wasmUrl || "./dist/taglib-wasi.wasm",
|
|
@@ -84,18 +91,18 @@ async function loadWasiModuleWithFallback(options) {
|
|
|
84
91
|
debug: options.debug
|
|
85
92
|
});
|
|
86
93
|
return { module: wasiModule, actualWasmType: "wasi" };
|
|
87
|
-
} catch (
|
|
94
|
+
} catch (sdkError) {
|
|
88
95
|
if (options.debug) {
|
|
89
|
-
console.warn(
|
|
90
|
-
`[UnifiedLoader] WASI loading failed, falling back to Emscripten:`,
|
|
91
|
-
error
|
|
92
|
-
);
|
|
96
|
+
console.warn(`[UnifiedLoader] Wasmer SDK failed:`, sdkError);
|
|
93
97
|
}
|
|
94
|
-
return {
|
|
95
|
-
module: await loadEmscriptenModule(options),
|
|
96
|
-
actualWasmType: "emscripten"
|
|
97
|
-
};
|
|
98
98
|
}
|
|
99
|
+
if (options.debug) {
|
|
100
|
+
console.warn(`[UnifiedLoader] All WASI loaders failed, using Emscripten`);
|
|
101
|
+
}
|
|
102
|
+
return {
|
|
103
|
+
module: await loadEmscriptenModule(options),
|
|
104
|
+
actualWasmType: "emscripten"
|
|
105
|
+
};
|
|
99
106
|
}
|
|
100
107
|
async function loadEmscriptenModule(options) {
|
|
101
108
|
try {
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview Deno filesystem provider for WASI host
|
|
3
|
+
*
|
|
4
|
+
* Thin wrapper mapping Deno APIs to the FileSystemProvider interface.
|
|
5
|
+
*/
|
|
6
|
+
import type { FileSystemProvider } from "./wasi-fs-provider.ts";
|
|
7
|
+
export declare function createDenoFsProvider(): FileSystemProvider;
|
|
8
|
+
//# sourceMappingURL=wasi-fs-deno.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"wasi-fs-deno.d.ts","sourceRoot":"","sources":["../../../src/runtime/wasi-fs-deno.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EACV,kBAAkB,EAGnB,MAAM,uBAAuB,CAAC;AAa/B,wBAAgB,oBAAoB,IAAI,kBAAkB,CAazD"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
function wrapDenoFile(file) {
|
|
2
|
+
return {
|
|
3
|
+
readSync: (target) => file.readSync(target),
|
|
4
|
+
writeSync: (data) => file.writeSync(data),
|
|
5
|
+
seekSync: (offset, whence) => file.seekSync(offset, whence),
|
|
6
|
+
truncateSync: (size) => file.truncateSync(size),
|
|
7
|
+
close: () => file.close()
|
|
8
|
+
};
|
|
9
|
+
}
|
|
10
|
+
function createDenoFsProvider() {
|
|
11
|
+
return {
|
|
12
|
+
openSync(path, options) {
|
|
13
|
+
const file = Deno.openSync(path, options);
|
|
14
|
+
return wrapDenoFile(file);
|
|
15
|
+
},
|
|
16
|
+
readFile(path) {
|
|
17
|
+
return Deno.readFile(path);
|
|
18
|
+
},
|
|
19
|
+
isNotFoundError(error) {
|
|
20
|
+
return error instanceof Deno.errors.NotFound;
|
|
21
|
+
}
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
export {
|
|
25
|
+
createDenoFsProvider
|
|
26
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview Node.js/Bun filesystem provider for WASI host
|
|
3
|
+
*
|
|
4
|
+
* Uses node:fs with manual position tracking since Node lacks seekSync.
|
|
5
|
+
* Bun implements node:fs faithfully, so this provider covers both.
|
|
6
|
+
*/
|
|
7
|
+
import type { FileSystemProvider } from "./wasi-fs-provider.ts";
|
|
8
|
+
export declare function createNodeFsProvider(): Promise<FileSystemProvider>;
|
|
9
|
+
//# sourceMappingURL=wasi-fs-node.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"wasi-fs-node.d.ts","sourceRoot":"","sources":["../../../src/runtime/wasi-fs-node.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EACV,kBAAkB,EAGnB,MAAM,uBAAuB,CAAC;AA+C/B,wBAAsB,oBAAoB,IAAI,OAAO,CAAC,kBAAkB,CAAC,CAiBxE"}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
function mapOpenFlags(options) {
|
|
2
|
+
if (options.create && options.truncate) return "w+";
|
|
3
|
+
if (options.create) return "a+";
|
|
4
|
+
if (options.write) return "r+";
|
|
5
|
+
return "r";
|
|
6
|
+
}
|
|
7
|
+
function createNodeFileHandle(fs, fd) {
|
|
8
|
+
let position = 0;
|
|
9
|
+
return {
|
|
10
|
+
readSync(target) {
|
|
11
|
+
const n = fs.readSync(fd, target, 0, target.length, position);
|
|
12
|
+
if (n === 0) return null;
|
|
13
|
+
position += n;
|
|
14
|
+
return n;
|
|
15
|
+
},
|
|
16
|
+
writeSync(data) {
|
|
17
|
+
const n = fs.writeSync(fd, data, 0, data.length, position);
|
|
18
|
+
position += n;
|
|
19
|
+
return n;
|
|
20
|
+
},
|
|
21
|
+
seekSync(offset, whence) {
|
|
22
|
+
if (whence === 0) {
|
|
23
|
+
position = offset;
|
|
24
|
+
} else if (whence === 1) {
|
|
25
|
+
position += offset;
|
|
26
|
+
} else {
|
|
27
|
+
const stat = fs.fstatSync(fd);
|
|
28
|
+
position = stat.size + offset;
|
|
29
|
+
}
|
|
30
|
+
if (position < 0) throw new Error(`Invalid seek position: ${position}`);
|
|
31
|
+
return position;
|
|
32
|
+
},
|
|
33
|
+
truncateSync(size) {
|
|
34
|
+
fs.ftruncateSync(fd, size);
|
|
35
|
+
},
|
|
36
|
+
close() {
|
|
37
|
+
fs.closeSync(fd);
|
|
38
|
+
}
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
async function createNodeFsProvider() {
|
|
42
|
+
const fs = await import("node:fs");
|
|
43
|
+
const fsp = await import("node:fs/promises");
|
|
44
|
+
return {
|
|
45
|
+
openSync(path, options) {
|
|
46
|
+
const flags = mapOpenFlags(options);
|
|
47
|
+
const fd = fs.openSync(path, flags);
|
|
48
|
+
return createNodeFileHandle(fs, fd);
|
|
49
|
+
},
|
|
50
|
+
async readFile(path) {
|
|
51
|
+
return new Uint8Array(await fsp.readFile(path));
|
|
52
|
+
},
|
|
53
|
+
isNotFoundError(error) {
|
|
54
|
+
return error?.code === "ENOENT";
|
|
55
|
+
}
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
export {
|
|
59
|
+
createNodeFsProvider
|
|
60
|
+
};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview Filesystem provider interface for runtime-agnostic WASI host
|
|
3
|
+
*
|
|
4
|
+
* Abstracts the 6 file operations needed by WASI syscalls so that
|
|
5
|
+
* Deno, Node.js, and Bun can all use seek-based I/O.
|
|
6
|
+
*/
|
|
7
|
+
export type WasiFileHandle = {
|
|
8
|
+
readSync(target: Uint8Array): number | null;
|
|
9
|
+
writeSync(data: Uint8Array): number;
|
|
10
|
+
seekSync(offset: number, whence: 0 | 1 | 2): number;
|
|
11
|
+
truncateSync(size: number): void;
|
|
12
|
+
close(): void;
|
|
13
|
+
};
|
|
14
|
+
export type WasiOpenOptions = {
|
|
15
|
+
read: boolean;
|
|
16
|
+
write: boolean;
|
|
17
|
+
create?: boolean;
|
|
18
|
+
truncate?: boolean;
|
|
19
|
+
};
|
|
20
|
+
export type FileSystemProvider = {
|
|
21
|
+
openSync(path: string, options: WasiOpenOptions): WasiFileHandle;
|
|
22
|
+
readFile(path: string): Promise<Uint8Array>;
|
|
23
|
+
isNotFoundError(error: unknown): boolean;
|
|
24
|
+
};
|
|
25
|
+
//# sourceMappingURL=wasi-fs-provider.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"wasi-fs-provider.d.ts","sourceRoot":"","sources":["../../../src/runtime/wasi-fs-provider.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,MAAM,MAAM,cAAc,GAAG;IAC3B,QAAQ,CAAC,MAAM,EAAE,UAAU,GAAG,MAAM,GAAG,IAAI,CAAC;IAC5C,SAAS,CAAC,IAAI,EAAE,UAAU,GAAG,MAAM,CAAC;IACpC,QAAQ,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,MAAM,CAAC;IACpD,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACjC,KAAK,IAAI,IAAI,CAAC;CACf,CAAC;AAEF,MAAM,MAAM,eAAe,GAAG;IAC5B,IAAI,EAAE,OAAO,CAAC;IACd,KAAK,EAAE,OAAO,CAAC;IACf,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB,CAAC;AAEF,MAAM,MAAM,kBAAkB,GAAG;IAC/B,QAAQ,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,eAAe,GAAG,cAAc,CAAC;IACjE,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,UAAU,CAAC,CAAC;IAC5C,eAAe,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,CAAC;CAC1C,CAAC"}
|
|
File without changes
|
|
@@ -5,10 +5,12 @@
|
|
|
5
5
|
* implementations, enabling efficient seek-based file I/O without
|
|
6
6
|
* the Wasmtime sidecar subprocess.
|
|
7
7
|
*/
|
|
8
|
+
import type { FileSystemProvider } from "./wasi-fs-provider.ts";
|
|
8
9
|
import type { WasiModule } from "./wasmer-sdk-loader.ts";
|
|
9
10
|
export interface WasiHostLoaderConfig {
|
|
10
11
|
wasmPath?: string;
|
|
11
12
|
preopens?: Record<string, string>;
|
|
13
|
+
fs?: FileSystemProvider;
|
|
12
14
|
}
|
|
13
15
|
export declare class WasiHostLoadError extends Error {
|
|
14
16
|
readonly code: "WASI_HOST_LOAD_ERROR";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"wasi-host-loader.d.ts","sourceRoot":"","sources":["../../../src/runtime/wasi-host-loader.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAOH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AAEzD,MAAM,WAAW,oBAAoB;IACnC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"wasi-host-loader.d.ts","sourceRoot":"","sources":["../../../src/runtime/wasi-host-loader.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAOH,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAChE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AAEzD,MAAM,WAAW,oBAAoB;IACnC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAClC,EAAE,CAAC,EAAE,kBAAkB,CAAC;CACzB;AAED,qBAAa,iBAAkB,SAAQ,KAAK;IAC1C,QAAQ,CAAC,IAAI,EAAG,sBAAsB,CAAU;gBACpC,OAAO,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,OAAO;CAI7C;AAcD,wBAAsB,YAAY,CAChC,MAAM,EAAE,oBAAoB,GAC3B,OAAO,CAAC,UAAU,GAAG,UAAU,CAAC,CAyClC"}
|
|
@@ -11,14 +11,25 @@ class WasiHostLoadError extends Error {
|
|
|
11
11
|
this.name = "WasiHostLoadError";
|
|
12
12
|
}
|
|
13
13
|
}
|
|
14
|
+
async function resolveFs(provided) {
|
|
15
|
+
if (provided) return provided;
|
|
16
|
+
if (typeof Deno !== "undefined") {
|
|
17
|
+
const { createDenoFsProvider } = await import("./wasi-fs-deno.js");
|
|
18
|
+
return createDenoFsProvider();
|
|
19
|
+
}
|
|
20
|
+
const { createNodeFsProvider } = await import("./wasi-fs-node.js");
|
|
21
|
+
return createNodeFsProvider();
|
|
22
|
+
}
|
|
14
23
|
async function loadWasiHost(config) {
|
|
15
24
|
const wasmPath = config.wasmPath ?? "./dist/wasi/taglib_wasi.wasm";
|
|
16
25
|
const preopens = config.preopens ?? {};
|
|
17
|
-
const
|
|
26
|
+
const fs = await resolveFs(config.fs);
|
|
27
|
+
const wasmBytes = await loadWasmBinary(wasmPath, fs);
|
|
18
28
|
const wasmModule = await WebAssembly.compile(wasmBytes);
|
|
19
29
|
const memoryProxy = { buffer: new ArrayBuffer(0) };
|
|
20
30
|
const hostConfig = {
|
|
21
31
|
preopens,
|
|
32
|
+
fs,
|
|
22
33
|
stderr: (data) => {
|
|
23
34
|
const text = new TextDecoder().decode(data);
|
|
24
35
|
if (text.trim()) console.error(`[wasi-host] ${text}`);
|
|
@@ -39,7 +50,7 @@ async function loadWasiHost(config) {
|
|
|
39
50
|
}
|
|
40
51
|
return createWasiModuleFromInstance(instance, memory, wasiImports);
|
|
41
52
|
}
|
|
42
|
-
async function loadWasmBinary(path) {
|
|
53
|
+
async function loadWasmBinary(path, fs) {
|
|
43
54
|
if (path.startsWith("http://") || path.startsWith("https://")) {
|
|
44
55
|
const response = await fetch(path);
|
|
45
56
|
if (!response.ok) {
|
|
@@ -50,7 +61,7 @@ async function loadWasmBinary(path) {
|
|
|
50
61
|
return new Uint8Array(await response.arrayBuffer());
|
|
51
62
|
}
|
|
52
63
|
try {
|
|
53
|
-
return await
|
|
64
|
+
return await fs.readFile(path);
|
|
54
65
|
} catch (cause) {
|
|
55
66
|
throw new WasiHostLoadError(
|
|
56
67
|
`Failed to read Wasm binary: ${path}`,
|
|
@@ -2,10 +2,12 @@
|
|
|
2
2
|
* @fileoverview WASI P1 syscall implementations backed by real filesystem
|
|
3
3
|
*
|
|
4
4
|
* Provides synchronous WASI imports for in-process Wasm execution.
|
|
5
|
-
* Uses
|
|
5
|
+
* Uses a FileSystemProvider for runtime-agnostic file operations.
|
|
6
6
|
*/
|
|
7
|
+
import type { FileSystemProvider } from "./wasi-fs-provider.ts";
|
|
7
8
|
export interface WasiHostConfig {
|
|
8
9
|
preopens: Record<string, string>;
|
|
10
|
+
fs: FileSystemProvider;
|
|
9
11
|
stdout?: (data: Uint8Array) => void;
|
|
10
12
|
stderr?: (data: Uint8Array) => void;
|
|
11
13
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"wasi-host.d.ts","sourceRoot":"","sources":["../../../src/runtime/wasi-host.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,MAAM,WAAW,cAAc;IAC7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B,MAAM,EAAE;IAAE,MAAM,EAAE,WAAW,CAAA;CAAE,EAC/B,MAAM,EAAE,cAAc,GACrB,oBAAoB,CA0PtB"}
|
|
@@ -18,14 +18,14 @@ function createWasiImports(memory, config) {
|
|
|
18
18
|
}
|
|
19
19
|
function resolvePath(dirFd, pathPtr, pathLen) {
|
|
20
20
|
const dir = fds.get(dirFd);
|
|
21
|
-
if (
|
|
21
|
+
if (dir?.type !== "preopen") return null;
|
|
22
22
|
const { u8 } = getMemory();
|
|
23
23
|
const relPath = new TextDecoder().decode(
|
|
24
24
|
u8.slice(pathPtr, pathPtr + pathLen)
|
|
25
25
|
);
|
|
26
|
-
const normalized = relPath.
|
|
26
|
+
const normalized = relPath.replaceAll("\\", "/");
|
|
27
27
|
const segments = normalized.split("/");
|
|
28
|
-
if (segments.
|
|
28
|
+
if (segments.includes("..") || normalized.startsWith("/")) {
|
|
29
29
|
return null;
|
|
30
30
|
}
|
|
31
31
|
return `${dir.realPath}/${normalized}`;
|
|
@@ -64,7 +64,7 @@ function createWasiImports(memory, config) {
|
|
|
64
64
|
fd_fdstat_set_flags: (_fd, _flags) => WASI_ESUCCESS,
|
|
65
65
|
fd_filestat_set_size: (fd, size) => {
|
|
66
66
|
const entry = fds.get(fd);
|
|
67
|
-
if (
|
|
67
|
+
if (entry?.type !== "file") return WASI_EBADF;
|
|
68
68
|
try {
|
|
69
69
|
entry.file.truncateSync(Number(size));
|
|
70
70
|
return WASI_ESUCCESS;
|
|
@@ -74,7 +74,7 @@ function createWasiImports(memory, config) {
|
|
|
74
74
|
},
|
|
75
75
|
fd_prestat_get: (fd, buf) => {
|
|
76
76
|
const entry = fds.get(fd);
|
|
77
|
-
if (
|
|
77
|
+
if (entry?.type !== "preopen") return WASI_EBADF;
|
|
78
78
|
const { dv } = getMemory();
|
|
79
79
|
const pathBytes = new TextEncoder().encode(entry.virtualPath);
|
|
80
80
|
dv.setUint32(buf, 0, true);
|
|
@@ -83,7 +83,7 @@ function createWasiImports(memory, config) {
|
|
|
83
83
|
},
|
|
84
84
|
fd_prestat_dir_name: (fd, pathPtr, pathLen) => {
|
|
85
85
|
const entry = fds.get(fd);
|
|
86
|
-
if (
|
|
86
|
+
if (entry?.type !== "preopen") return WASI_EBADF;
|
|
87
87
|
const { u8 } = getMemory();
|
|
88
88
|
const pathBytes = new TextEncoder().encode(entry.virtualPath);
|
|
89
89
|
u8.set(pathBytes.subarray(0, pathLen), pathPtr);
|
|
@@ -91,7 +91,7 @@ function createWasiImports(memory, config) {
|
|
|
91
91
|
},
|
|
92
92
|
fd_read: (fd, iovsPtr, iovsLen, nreadPtr) => {
|
|
93
93
|
const entry = fds.get(fd);
|
|
94
|
-
if (
|
|
94
|
+
if (entry?.type !== "file") return WASI_EBADF;
|
|
95
95
|
const { u8, dv } = getMemory();
|
|
96
96
|
let totalRead = 0;
|
|
97
97
|
for (let i = 0; i < iovsLen; i++) {
|
|
@@ -108,10 +108,12 @@ function createWasiImports(memory, config) {
|
|
|
108
108
|
},
|
|
109
109
|
fd_seek: (fd, offset, whence, newoffsetPtr) => {
|
|
110
110
|
const entry = fds.get(fd);
|
|
111
|
-
if (
|
|
112
|
-
const seekMode = whence === 0 ? Deno.SeekMode.Start : whence === 1 ? Deno.SeekMode.Current : Deno.SeekMode.End;
|
|
111
|
+
if (entry?.type !== "file") return WASI_EBADF;
|
|
113
112
|
try {
|
|
114
|
-
const newPos = entry.file.seekSync(
|
|
113
|
+
const newPos = entry.file.seekSync(
|
|
114
|
+
Number(offset),
|
|
115
|
+
whence
|
|
116
|
+
);
|
|
115
117
|
const { dv } = getMemory();
|
|
116
118
|
dv.setBigInt64(newoffsetPtr, BigInt(newPos), true);
|
|
117
119
|
return WASI_ESUCCESS;
|
|
@@ -134,7 +136,7 @@ function createWasiImports(memory, config) {
|
|
|
134
136
|
totalWritten += bufLen;
|
|
135
137
|
} else {
|
|
136
138
|
const entry = fds.get(fd);
|
|
137
|
-
if (
|
|
139
|
+
if (entry?.type !== "file") return WASI_EBADF;
|
|
138
140
|
totalWritten += entry.file.writeSync(data);
|
|
139
141
|
}
|
|
140
142
|
}
|
|
@@ -149,17 +151,20 @@ function createWasiImports(memory, config) {
|
|
|
149
151
|
const RIGHTS_FD_WRITE = 1n << 6n;
|
|
150
152
|
try {
|
|
151
153
|
const wantWrite = (_rightsBase & RIGHTS_FD_WRITE) !== 0n || (oflags & (OFLAGS_CREAT | OFLAGS_TRUNC)) !== 0;
|
|
152
|
-
const options = {
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
154
|
+
const options = {
|
|
155
|
+
read: true,
|
|
156
|
+
write: wantWrite,
|
|
157
|
+
create: (oflags & OFLAGS_CREAT) !== 0,
|
|
158
|
+
truncate: (oflags & OFLAGS_TRUNC) !== 0
|
|
159
|
+
};
|
|
160
|
+
const file = config.fs.openSync(realPath, options);
|
|
156
161
|
const fd = nextFd++;
|
|
157
162
|
fds.set(fd, { type: "file", file, path: realPath });
|
|
158
163
|
const { dv } = getMemory();
|
|
159
164
|
dv.setUint32(openedFdPtr, fd, true);
|
|
160
165
|
return WASI_ESUCCESS;
|
|
161
166
|
} catch (e) {
|
|
162
|
-
if (
|
|
167
|
+
if (config.fs.isNotFoundError(e)) return WASI_ENOENT;
|
|
163
168
|
return WASI_EINVAL;
|
|
164
169
|
}
|
|
165
170
|
},
|
|
@@ -59,14 +59,17 @@ export interface WasiLoaderConfig {
|
|
|
59
59
|
}
|
|
60
60
|
/**
|
|
61
61
|
* Primary WASI loader function with automatic runtime detection
|
|
62
|
+
* @deprecated Use {@link loadWasiHost} from `./wasi-host-loader.ts` instead.
|
|
62
63
|
*/
|
|
63
64
|
export declare function loadWasi(userConfig?: Partial<WasiLoaderConfig>): Promise<WasiExports>;
|
|
64
65
|
/**
|
|
65
66
|
* Check if WASI is available in the current environment
|
|
67
|
+
* @deprecated Use {@link loadWasiHost} from `./wasi-host-loader.ts` instead.
|
|
66
68
|
*/
|
|
67
69
|
export declare function isWasiAvailable(): Promise<boolean>;
|
|
68
70
|
/**
|
|
69
71
|
* Get WASI capability information for the current environment
|
|
72
|
+
* @deprecated Use {@link loadWasiHost} from `./wasi-host-loader.ts` instead.
|
|
70
73
|
*/
|
|
71
74
|
export declare function getWasiCapabilities(): Promise<{
|
|
72
75
|
available: boolean;
|
|
@@ -81,6 +84,7 @@ export declare function getWasiCapabilities(): Promise<{
|
|
|
81
84
|
/**
|
|
82
85
|
* Create a WASI loader instance with caching
|
|
83
86
|
* Useful for applications that need to load multiple files
|
|
87
|
+
* @deprecated Use {@link loadWasiHost} from `./wasi-host-loader.ts` instead.
|
|
84
88
|
*/
|
|
85
89
|
export declare class CachedWasiLoader {
|
|
86
90
|
private instance;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"wasi-loader.d.ts","sourceRoot":"","sources":["../../../src/runtime/wasi-loader.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH;;GAEG;AACH,MAAM,WAAW,WAAW;IAE1B,MAAM,EAAE,WAAW,CAAC,MAAM,CAAC;IAC3B,MAAM,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,CAAC;IACjC,IAAI,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAC;IAG5B,YAAY,EAAE,CACZ,OAAO,EAAE,MAAM,EACf,MAAM,EAAE,MAAM,EACd,GAAG,EAAE,MAAM,EACX,UAAU,EAAE,MAAM,KACf,MAAM,CAAC;IACZ,eAAe,EAAE,CACf,OAAO,EAAE,MAAM,EACf,MAAM,EAAE,MAAM,EACd,GAAG,EAAE,MAAM,EACX,MAAM,EAAE,MAAM,EACd,UAAU,EAAE,MAAM,KACf,MAAM,CAAC;IACZ,aAAa,EAAE,CACb,OAAO,EAAE,MAAM,EACf,MAAM,EAAE,MAAM,EACd,GAAG,EAAE,MAAM,EACX,OAAO,EAAE,MAAM,EACf,QAAQ,EAAE,MAAM,EAChB,SAAS,EAAE,MAAM,EACjB,UAAU,EAAE,MAAM,KACf,MAAM,CAA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AG,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC7B,uCAAuC;IACvC,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;IAChB,0BAA0B;IAC1B,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB;AAKD;;GAEG;AACH,wBAAsB,gBAAgB,CAAC,SAAS,UAAQ,GAAG,OAAO,CAAC,IAAI,CAAC,CAwBvE;AAED;;GAEG;AACH,wBAAsB,cAAc,CAClC,MAAM,GAAE,kBAAuB,GAC9B,OAAO,CAAC,UAAU,CAAC,CA6CrB;AAwOD;;;GAGG;AACH,wBAAsB,gBAAgB,CACpC,WAAW,EAAE,UAAU,EACvB,UAAU,EAAE,UAAU,GACrB,OAAO,CAAC,UAAU,CAAC,CA2CrB;AAED;;GAEG;AACH,wBAAsB,iBAAiB,IAAI,OAAO,CAAC,OAAO,CAAC,CAO1D"}
|
|
@@ -137,7 +137,8 @@ async function loadWasmBinary(path) {
|
|
|
137
137
|
}
|
|
138
138
|
return new Uint8Array(await response.arrayBuffer());
|
|
139
139
|
} else {
|
|
140
|
-
|
|
140
|
+
const { readFileData } = await import("../utils/file.js");
|
|
141
|
+
return await readFileData(path);
|
|
141
142
|
}
|
|
142
143
|
}
|
|
143
144
|
async function instantiateWasi(wasmModule, config) {
|
package/dist/src/simple.d.ts
CHANGED
|
@@ -205,18 +205,18 @@ export declare const DiscNumber = "discnumber";
|
|
|
205
205
|
*/
|
|
206
206
|
export declare function isValidAudioFile(file: string | Uint8Array | ArrayBuffer | File): Promise<boolean>;
|
|
207
207
|
/**
|
|
208
|
-
*
|
|
208
|
+
* Read the audio format of a file
|
|
209
209
|
*
|
|
210
210
|
* @param file - File path, Uint8Array buffer, ArrayBuffer, or File object
|
|
211
211
|
* @returns Audio format string (e.g., "MP3", "FLAC", "OGG") or undefined
|
|
212
212
|
*
|
|
213
213
|
* @example
|
|
214
214
|
* ```typescript
|
|
215
|
-
* const format = await
|
|
215
|
+
* const format = await readFormat("song.mp3");
|
|
216
216
|
* console.log(`File format: ${format}`); // "MP3"
|
|
217
217
|
* ```
|
|
218
218
|
*/
|
|
219
|
-
export declare function
|
|
219
|
+
export declare function readFormat(file: string | Uint8Array | ArrayBuffer | File): Promise<string | undefined>;
|
|
220
220
|
/**
|
|
221
221
|
* Clear all tags from a file
|
|
222
222
|
*
|
|
@@ -303,7 +303,7 @@ export declare function addPicture(file: string | Uint8Array | ArrayBuffer | Fil
|
|
|
303
303
|
*/
|
|
304
304
|
export declare function clearPictures(file: string | Uint8Array | ArrayBuffer | File): Promise<Uint8Array>;
|
|
305
305
|
/**
|
|
306
|
-
*
|
|
306
|
+
* Read the primary cover art from an audio file
|
|
307
307
|
*
|
|
308
308
|
* Returns the front cover if available, otherwise the first picture found.
|
|
309
309
|
* Returns null if no pictures are present.
|
|
@@ -313,15 +313,15 @@ export declare function clearPictures(file: string | Uint8Array | ArrayBuffer |
|
|
|
313
313
|
*
|
|
314
314
|
* @example
|
|
315
315
|
* ```typescript
|
|
316
|
-
* const coverArt = await
|
|
316
|
+
* const coverArt = await readCoverArt("song.mp3");
|
|
317
317
|
* if (coverArt) {
|
|
318
318
|
* console.log(`Cover art size: ${coverArt.length} bytes`);
|
|
319
319
|
* }
|
|
320
320
|
* ```
|
|
321
321
|
*/
|
|
322
|
-
export declare function
|
|
322
|
+
export declare function readCoverArt(file: string | Uint8Array | ArrayBuffer | File): Promise<Uint8Array | null>;
|
|
323
323
|
/**
|
|
324
|
-
*
|
|
324
|
+
* Apply primary cover art to an audio file and return the modified buffer
|
|
325
325
|
*
|
|
326
326
|
* Replaces all existing pictures with a single front cover image.
|
|
327
327
|
*
|
|
@@ -333,10 +333,10 @@ export declare function getCoverArt(file: string | Uint8Array | ArrayBuffer | Fi
|
|
|
333
333
|
* @example
|
|
334
334
|
* ```typescript
|
|
335
335
|
* const jpegData = await Deno.readFile("cover.jpg");
|
|
336
|
-
* const modifiedBuffer = await
|
|
336
|
+
* const modifiedBuffer = await applyCoverArt("song.mp3", jpegData, "image/jpeg");
|
|
337
337
|
* ```
|
|
338
338
|
*/
|
|
339
|
-
export declare function
|
|
339
|
+
export declare function applyCoverArt(file: string | Uint8Array | ArrayBuffer | File, imageData: Uint8Array, mimeType: string): Promise<Uint8Array>;
|
|
340
340
|
/**
|
|
341
341
|
* Find a picture by its type
|
|
342
342
|
*
|
|
@@ -377,7 +377,7 @@ export declare function findPictureByType(pictures: Picture[], type: PictureType
|
|
|
377
377
|
*/
|
|
378
378
|
export declare function replacePictureByType(file: string | Uint8Array | ArrayBuffer | File, newPicture: Picture): Promise<Uint8Array>;
|
|
379
379
|
/**
|
|
380
|
-
*
|
|
380
|
+
* Read picture metadata without the actual image data
|
|
381
381
|
*
|
|
382
382
|
* Useful for checking what pictures are present without loading
|
|
383
383
|
* potentially large image data into memory.
|
|
@@ -387,13 +387,13 @@ export declare function replacePictureByType(file: string | Uint8Array | ArrayBu
|
|
|
387
387
|
*
|
|
388
388
|
* @example
|
|
389
389
|
* ```typescript
|
|
390
|
-
* const metadata = await
|
|
390
|
+
* const metadata = await readPictureMetadata("song.mp3");
|
|
391
391
|
* for (const info of metadata) {
|
|
392
392
|
* console.log(`${info.description}: ${info.mimeType}, ${info.size} bytes`);
|
|
393
393
|
* }
|
|
394
394
|
* ```
|
|
395
395
|
*/
|
|
396
|
-
export declare function
|
|
396
|
+
export declare function readPictureMetadata(file: string | Uint8Array | ArrayBuffer | File): Promise<Array<{
|
|
397
397
|
type: number;
|
|
398
398
|
mimeType: string;
|
|
399
399
|
description?: string;
|
package/dist/src/simple.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"simple.d.ts","sourceRoot":"","sources":["../../src/simple.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AAGH,OAAO,KAAK,EACV,cAAc,EACd,eAAe,EACf,OAAO,EACP,WAAW,EACX,GAAG,EACJ,MAAM,YAAY,CAAC;AAQpB,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