taglib-wasm 1.0.8 → 1.1.0
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/dist/index.browser.js +61 -8
- package/dist/simple.browser.js +61 -8
- package/dist/src/deno-compile.js +1 -1
- package/dist/src/runtime/module-loader.d.ts.map +1 -1
- package/dist/src/runtime/module-loader.js +2 -3
- package/dist/src/runtime/unified-loader/module-loading.js +5 -19
- package/dist/src/runtime/unified-loader/module-selection.d.ts.map +1 -1
- package/dist/src/runtime/unified-loader/module-selection.js +0 -1
- package/dist/src/runtime/unified-loader/types.d.ts +1 -3
- package/dist/src/runtime/unified-loader/types.d.ts.map +1 -1
- package/dist/src/runtime/wasi-adapter/adapter.d.ts +1 -1
- package/dist/src/runtime/wasi-adapter/adapter.js +1 -1
- package/dist/src/runtime/wasi-adapter/file-handle.d.ts +3 -2
- package/dist/src/runtime/wasi-adapter/file-handle.d.ts.map +1 -1
- package/dist/src/runtime/wasi-adapter/file-handle.js +27 -11
- package/dist/src/runtime/wasi-adapter/wasm-io.d.ts +3 -1
- package/dist/src/runtime/wasi-adapter/wasm-io.d.ts.map +1 -1
- package/dist/src/runtime/wasi-adapter/wasm-io.js +66 -1
- package/dist/src/runtime/wasi-host-loader.d.ts +1 -1
- package/dist/src/runtime/wasi-host-loader.js +1 -1
- package/dist/src/runtime/wasmer-sdk-loader/types.d.ts +1 -24
- package/dist/src/runtime/wasmer-sdk-loader/types.d.ts.map +1 -1
- package/dist/src/runtime/wasmer-sdk-loader/types.js +1 -19
- package/dist/src/taglib/audio-file-impl.d.ts +1 -0
- package/dist/src/taglib/audio-file-impl.d.ts.map +1 -1
- package/dist/src/taglib/audio-file-impl.js +37 -6
- package/dist/src/taglib/taglib-class.d.ts.map +1 -1
- package/dist/src/taglib/taglib-class.js +26 -0
- package/dist/src/version.d.ts +1 -1
- package/dist/src/version.js +1 -1
- package/dist/src/wasm.d.ts +3 -0
- package/dist/src/wasm.d.ts.map +1 -1
- package/dist/taglib_wasi.wasm +0 -0
- package/package.json +2 -2
- package/dist/src/runtime/wasmer-sdk-loader/high-level-api.d.ts +0 -10
- package/dist/src/runtime/wasmer-sdk-loader/high-level-api.d.ts.map +0 -1
- package/dist/src/runtime/wasmer-sdk-loader/high-level-api.js +0 -83
- package/dist/src/runtime/wasmer-sdk-loader/index.d.ts +0 -6
- package/dist/src/runtime/wasmer-sdk-loader/index.d.ts.map +0 -1
- package/dist/src/runtime/wasmer-sdk-loader/index.js +0 -17
- package/dist/src/runtime/wasmer-sdk-loader/initialization.d.ts +0 -16
- package/dist/src/runtime/wasmer-sdk-loader/initialization.d.ts.map +0 -1
- package/dist/src/runtime/wasmer-sdk-loader/initialization.js +0 -55
- package/dist/src/runtime/wasmer-sdk-loader/loader.d.ts +0 -9
- package/dist/src/runtime/wasmer-sdk-loader/loader.d.ts.map +0 -1
- package/dist/src/runtime/wasmer-sdk-loader/loader.js +0 -47
- package/dist/src/runtime/wasmer-sdk-loader/module-creation.d.ts +0 -9
- package/dist/src/runtime/wasmer-sdk-loader/module-creation.d.ts.map +0 -1
- package/dist/src/runtime/wasmer-sdk-loader/module-creation.js +0 -71
- package/dist/src/runtime/wasmer-sdk-loader/wasi-stubs.d.ts +0 -16
- package/dist/src/runtime/wasmer-sdk-loader/wasi-stubs.d.ts.map +0 -1
- package/dist/src/runtime/wasmer-sdk-loader/wasi-stubs.js +0 -64
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/runtime/wasmer-sdk-loader/types.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAEnD,qBAAa,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/runtime/wasmer-sdk-loader/types.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAEnD,qBAAa,oBAAqB,SAAQ,WAAW;gBACvC,OAAO,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,OAAO;CAM7C;AAED;;GAEG;AACH,MAAM,WAAW,UAAU;IAEzB,UAAU,IAAI,MAAM,CAAC;IACrB,cAAc,IAAI,MAAM,CAAC;IAGzB,MAAM,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAAC;IAC7B,IAAI,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,CAAC;IAGxB,YAAY,CACV,OAAO,EAAE,MAAM,EACf,MAAM,EAAE,MAAM,EACd,GAAG,EAAE,MAAM,EACX,UAAU,EAAE,MAAM,GACjB,MAAM,CAAC;IACV,aAAa,CACX,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,GACjB,MAAM,CAAC;IAGV,iBAAiB,IAAI,MAAM,CAAC;IAC5B,sBAAsB,IAAI,MAAM,CAAC;IACjC,cAAc,IAAI,IAAI,CAAC;IAGvB,MAAM,EAAE,WAAW,CAAC,MAAM,CAAC;CAC5B"}
|
|
@@ -1,20 +1,4 @@
|
|
|
1
1
|
import { TagLibError } from "../../errors/base.js";
|
|
2
|
-
class WasmerInitError extends TagLibError {
|
|
3
|
-
constructor(message, cause) {
|
|
4
|
-
super("MODULE_LOAD", message, cause ? { cause } : void 0);
|
|
5
|
-
this.name = "WasmerInitError";
|
|
6
|
-
if (cause) this.cause = cause;
|
|
7
|
-
Object.setPrototypeOf(this, WasmerInitError.prototype);
|
|
8
|
-
}
|
|
9
|
-
}
|
|
10
|
-
class WasmerLoadError extends TagLibError {
|
|
11
|
-
constructor(message, cause) {
|
|
12
|
-
super("MODULE_LOAD", message, cause ? { cause } : void 0);
|
|
13
|
-
this.name = "WasmerLoadError";
|
|
14
|
-
if (cause) this.cause = cause;
|
|
15
|
-
Object.setPrototypeOf(this, WasmerLoadError.prototype);
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
2
|
class WasmerExecutionError extends TagLibError {
|
|
19
3
|
constructor(message, cause) {
|
|
20
4
|
super("WASM_MEMORY", message, cause ? { cause } : void 0);
|
|
@@ -24,7 +8,5 @@ class WasmerExecutionError extends TagLibError {
|
|
|
24
8
|
}
|
|
25
9
|
}
|
|
26
10
|
export {
|
|
27
|
-
WasmerExecutionError
|
|
28
|
-
WasmerInitError,
|
|
29
|
-
WasmerLoadError
|
|
11
|
+
WasmerExecutionError
|
|
30
12
|
};
|
|
@@ -10,6 +10,7 @@ import { BaseAudioFileImpl } from "./audio-file-base.js";
|
|
|
10
10
|
* Use TagLib.open() to create instances.
|
|
11
11
|
*/
|
|
12
12
|
export declare class AudioFileImpl extends BaseAudioFileImpl implements AudioFile {
|
|
13
|
+
private pathModeBuffer;
|
|
13
14
|
constructor(module: TagLibModule, fileHandle: FileHandle, sourcePath?: string, originalSource?: string | Uint8Array | ArrayBuffer | File, isPartiallyLoaded?: boolean, partialLoadOptions?: OpenOptions);
|
|
14
15
|
save(): boolean;
|
|
15
16
|
getFileBuffer(): Uint8Array;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"audio-file-impl.d.ts","sourceRoot":"","sources":["../../../src/taglib/audio-file-impl.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAC3D,OAAO,KAAK,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAExD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,oCAAoC,CAAC;AAIjE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AAC3D,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"audio-file-impl.d.ts","sourceRoot":"","sources":["../../../src/taglib/audio-file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key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
3
|
+
var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
1
4
|
import { PICTURE_TYPE_NAMES, PICTURE_TYPE_VALUES } from "../types.js";
|
|
2
5
|
import { FileOperationError, InvalidFormatError } from "../errors.js";
|
|
3
6
|
import { readFileData } from "../utils/file.js";
|
|
4
7
|
import { writeFileData } from "../utils/write.js";
|
|
5
8
|
import { BaseAudioFileImpl } from "./audio-file-base.js";
|
|
9
|
+
let _nodeFs;
|
|
10
|
+
function readFileSync(path) {
|
|
11
|
+
if (typeof Deno !== "undefined") return Deno.readFileSync(path);
|
|
12
|
+
if (_nodeFs === void 0) {
|
|
13
|
+
try {
|
|
14
|
+
_nodeFs = new Function("return require('node:fs')")();
|
|
15
|
+
} catch {
|
|
16
|
+
_nodeFs = null;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
if (_nodeFs) return new Uint8Array(_nodeFs.readFileSync(path));
|
|
20
|
+
return new Uint8Array(0);
|
|
21
|
+
}
|
|
6
22
|
class AudioFileImpl extends BaseAudioFileImpl {
|
|
7
23
|
constructor(module, fileHandle, sourcePath, originalSource, isPartiallyLoaded = false, partialLoadOptions) {
|
|
8
24
|
super(
|
|
@@ -13,6 +29,7 @@ class AudioFileImpl extends BaseAudioFileImpl {
|
|
|
13
29
|
isPartiallyLoaded,
|
|
14
30
|
partialLoadOptions
|
|
15
31
|
);
|
|
32
|
+
__publicField(this, "pathModeBuffer", null);
|
|
16
33
|
}
|
|
17
34
|
save() {
|
|
18
35
|
if (this.isPartiallyLoaded && this.originalSource) {
|
|
@@ -26,7 +43,17 @@ class AudioFileImpl extends BaseAudioFileImpl {
|
|
|
26
43
|
}
|
|
27
44
|
getFileBuffer() {
|
|
28
45
|
const buffer = this.handle.getBuffer();
|
|
29
|
-
|
|
46
|
+
if (buffer.length > 0) return buffer;
|
|
47
|
+
if (this.pathModeBuffer) return this.pathModeBuffer;
|
|
48
|
+
if (this.sourcePath) {
|
|
49
|
+
try {
|
|
50
|
+
this.pathModeBuffer = readFileSync(this.sourcePath);
|
|
51
|
+
return this.pathModeBuffer;
|
|
52
|
+
} catch {
|
|
53
|
+
return new Uint8Array(0);
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
return new Uint8Array(0);
|
|
30
57
|
}
|
|
31
58
|
async saveToFile(path) {
|
|
32
59
|
const targetPath = path ?? this.sourcePath;
|
|
@@ -37,14 +64,15 @@ class AudioFileImpl extends BaseAudioFileImpl {
|
|
|
37
64
|
);
|
|
38
65
|
}
|
|
39
66
|
if (this.isPartiallyLoaded && this.originalSource) {
|
|
40
|
-
const fullData = await readFileData(this.originalSource);
|
|
41
67
|
const fullFileHandle = this.module.createFileHandle();
|
|
42
68
|
try {
|
|
43
|
-
const success =
|
|
69
|
+
const success = await (async () => {
|
|
70
|
+
const data = await readFileData(this.originalSource);
|
|
71
|
+
return fullFileHandle.loadFromBuffer(data);
|
|
72
|
+
})();
|
|
44
73
|
if (!success) {
|
|
45
74
|
throw new InvalidFormatError(
|
|
46
|
-
"Failed to load full audio file for saving"
|
|
47
|
-
fullData.byteLength
|
|
75
|
+
"Failed to load full audio file for saving"
|
|
48
76
|
);
|
|
49
77
|
}
|
|
50
78
|
const partialTag = this.handle.getTag();
|
|
@@ -80,7 +108,10 @@ class AudioFileImpl extends BaseAudioFileImpl {
|
|
|
80
108
|
"Failed to save changes to in-memory buffer"
|
|
81
109
|
);
|
|
82
110
|
}
|
|
83
|
-
|
|
111
|
+
const buffer = this.handle.getBuffer();
|
|
112
|
+
if (buffer.length > 0) {
|
|
113
|
+
await writeFileData(targetPath, buffer);
|
|
114
|
+
}
|
|
84
115
|
}
|
|
85
116
|
}
|
|
86
117
|
getPictures() {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taglib-class.d.ts","sourceRoot":"","sources":["../../../src/taglib/taglib-class.ts"],"names":[],"mappings":"AAAA,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AI,CACR,KAAK,EAAE,cAAc,EACrB,OAAO,CAAC,EAAE,WAAW,GACpB,OAAO,CAAC,SAAS,CAAC;IA4FrB;;;;;;;;;OASG;IACG,IAAI,CACR,KAAK,EAAE,MAAM,EACb,EAAE,EAAE,CAAC,IAAI,EAAE,SAAS,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,GAC5C,OAAO,CAAC,IAAI,CAAC;IACV,IAAI,CACR,KAAK,EAAE,UAAU,GAAG,WAAW,GAAG,IAAI,GAAG,eAAe,EACxD,EAAE,EAAE,CAAC,IAAI,EAAE,SAAS,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,GAC5C,OAAO,CAAC,UAAU,CAAC;IAmBtB;;;;;;OAMG;IACG,UAAU,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,CAAC,QAAQ,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC;IAUtE;;;;;;;OAOG;IACG,YAAY,CAChB,UAAU,EAAE,MAAM,EAClB,QAAQ,EAAE,MAAM,EAChB,IAAI,EAAE,OAAO,CAAC,QAAQ,CAAC,GACtB,OAAO,CAAC,IAAI,CAAC;IAUhB,oEAAoE;IACpE,OAAO,IAAI,MAAM;IAIjB,OAAO,CAAC,aAAa;CAStB;AAED;;GAEG;AACH,wBAAsB,YAAY,CAAC,MAAM,EAAE,UAAU,GAAG,OAAO,CAAC,MAAM,CAAC,CAEtE"}
|
|
@@ -41,6 +41,32 @@ class TagLib {
|
|
|
41
41
|
}
|
|
42
42
|
const actualInput = isNamedAudioInput(input) ? input.data : input;
|
|
43
43
|
const sourcePath = typeof actualInput === "string" ? actualInput : void 0;
|
|
44
|
+
if (typeof actualInput === "string" && this.module.isWasi) {
|
|
45
|
+
const fileHandle2 = this.module.createFileHandle();
|
|
46
|
+
try {
|
|
47
|
+
const fh = fileHandle2;
|
|
48
|
+
if (fh.loadFromPath) {
|
|
49
|
+
const success = fh.loadFromPath(actualInput);
|
|
50
|
+
if (!success) {
|
|
51
|
+
throw new InvalidFormatError(
|
|
52
|
+
`Failed to load audio file. Path: ${actualInput}`
|
|
53
|
+
);
|
|
54
|
+
}
|
|
55
|
+
return new AudioFileImpl(
|
|
56
|
+
this.module,
|
|
57
|
+
fileHandle2,
|
|
58
|
+
sourcePath,
|
|
59
|
+
actualInput,
|
|
60
|
+
false
|
|
61
|
+
);
|
|
62
|
+
}
|
|
63
|
+
} catch (error) {
|
|
64
|
+
if (typeof fileHandle2.destroy === "function") {
|
|
65
|
+
fileHandle2.destroy();
|
|
66
|
+
}
|
|
67
|
+
throw error;
|
|
68
|
+
}
|
|
69
|
+
}
|
|
44
70
|
const opts = {
|
|
45
71
|
partial: true,
|
|
46
72
|
maxHeaderSize: 1024 * 1024,
|
package/dist/src/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "1.0
|
|
1
|
+
export declare const VERSION = "1.1.0";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
package/dist/src/version.js
CHANGED
package/dist/src/wasm.d.ts
CHANGED
|
@@ -37,6 +37,7 @@ export interface EmscriptenModule {
|
|
|
37
37
|
}
|
|
38
38
|
export interface FileHandle {
|
|
39
39
|
loadFromBuffer(data: Uint8Array): boolean;
|
|
40
|
+
loadFromPath?(path: string): boolean;
|
|
40
41
|
isValid(): boolean;
|
|
41
42
|
save(): boolean;
|
|
42
43
|
getFormat(): string;
|
|
@@ -104,6 +105,8 @@ export interface AudioPropertiesWrapper {
|
|
|
104
105
|
* @internal Most users should use {@link TagLib} instead of accessing this directly.
|
|
105
106
|
*/
|
|
106
107
|
export interface TagLibModule extends Omit<EmscriptenModule, "then"> {
|
|
108
|
+
/** Whether this module uses the WASI backend (vs Emscripten) */
|
|
109
|
+
isWasi?: boolean;
|
|
107
110
|
/** @internal Embind FileHandle class constructor */
|
|
108
111
|
FileHandle: new () => FileHandle;
|
|
109
112
|
/** @internal Embind TagWrapper class constructor */
|
package/dist/src/wasm.d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,MAAM,CAAC;IAC3D,wDAAwD;IACxD,kCAAkC,CAAC,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAAC;IAC9D,yDAAyD;IACzD,gCAAgC,CAAC,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAAC;CAC7D;AAED,MAAM,WAAW,UAAW,SAAQ,gBAAgB;IAElD,UAAU,CAAC,EAAE,UAAU,UAAU,CAAC;IAClC,gBAAgB,CAAC,IAAI,UAAU,CAAC;CACjC"}
|
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "taglib-wasm",
|
|
3
|
-
"version": "1.0
|
|
3
|
+
"version": "1.1.0",
|
|
4
4
|
"description": "TagLib-Wasm is the universal tagging library for TypeScript/JavaScript platforms: Browsers, Node.js, Deno, Bun, Cloudflare Workers, and Electron apps",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -78,7 +78,7 @@
|
|
|
78
78
|
"build:wasm": "./build/build-wasm.sh",
|
|
79
79
|
"build:ts": "tsc && deno run --allow-read --allow-write --allow-run --allow-env scripts/build-js.mjs",
|
|
80
80
|
"postbuild": "deno run --allow-read --allow-write --allow-run --allow-env scripts/postbuild.mjs",
|
|
81
|
-
"build:copy-wasm": "mkdir -p dist && cp build/taglib-web.wasm build/taglib-wrapper.js build/taglib-wrapper.d.ts dist/",
|
|
81
|
+
"build:copy-wasm": "mkdir -p dist && cp build/taglib-web.wasm build/taglib_wasi.wasm build/taglib-wrapper.js build/taglib-wrapper.d.ts dist/",
|
|
82
82
|
"build": "npm run build:wasm && npm run build:copy-wasm && npm run build:ts && npm run postbuild",
|
|
83
83
|
"test": "deno test --allow-read --allow-write --allow-env tests/",
|
|
84
84
|
"test:all": "deno test --allow-read --allow-write --allow-env tests/index.test.ts",
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @fileoverview High-level API for reading tags using WASI
|
|
3
|
-
*/
|
|
4
|
-
import type { WasiModule } from "./types.js";
|
|
5
|
-
/**
|
|
6
|
-
* High-level API for reading tags from audio files using WASI
|
|
7
|
-
* Uses RAII pattern with automatic memory cleanup
|
|
8
|
-
*/
|
|
9
|
-
export declare function readTagsWithWasi(audioBuffer: Uint8Array, wasiModule: WasiModule): Uint8Array;
|
|
10
|
-
//# sourceMappingURL=high-level-api.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"high-level-api.d.ts","sourceRoot":"","sources":["../../../../src/runtime/wasmer-sdk-loader/high-level-api.ts"],"names":[],"mappings":"AAAA;;GAEG;AAOH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAE7C;;;GAGG;AACH,wBAAgB,gBAAgB,CAC9B,WAAW,EAAE,UAAU,EACvB,UAAU,EAAE,UAAU,GACrB,UAAU,CA2BZ"}
|
|
@@ -1,83 +0,0 @@
|
|
|
1
|
-
var __knownSymbol = (name, symbol) => (symbol = Symbol[name]) ? symbol : /* @__PURE__ */ Symbol.for("Symbol." + name);
|
|
2
|
-
var __typeError = (msg) => {
|
|
3
|
-
throw TypeError(msg);
|
|
4
|
-
};
|
|
5
|
-
var __using = (stack, value, async) => {
|
|
6
|
-
if (value != null) {
|
|
7
|
-
if (typeof value !== "object" && typeof value !== "function") __typeError("Object expected");
|
|
8
|
-
var dispose, inner;
|
|
9
|
-
if (async) dispose = value[__knownSymbol("asyncDispose")];
|
|
10
|
-
if (dispose === void 0) {
|
|
11
|
-
dispose = value[__knownSymbol("dispose")];
|
|
12
|
-
if (async) inner = dispose;
|
|
13
|
-
}
|
|
14
|
-
if (typeof dispose !== "function") __typeError("Object not disposable");
|
|
15
|
-
if (inner) dispose = function() {
|
|
16
|
-
try {
|
|
17
|
-
inner.call(this);
|
|
18
|
-
} catch (e) {
|
|
19
|
-
return Promise.reject(e);
|
|
20
|
-
}
|
|
21
|
-
};
|
|
22
|
-
stack.push([async, dispose, value]);
|
|
23
|
-
} else if (async) {
|
|
24
|
-
stack.push([async]);
|
|
25
|
-
}
|
|
26
|
-
return value;
|
|
27
|
-
};
|
|
28
|
-
var __callDispose = (stack, error, hasError) => {
|
|
29
|
-
var E = typeof SuppressedError === "function" ? SuppressedError : function(e, s, m, _) {
|
|
30
|
-
return _ = Error(m), _.name = "SuppressedError", _.error = e, _.suppressed = s, _;
|
|
31
|
-
};
|
|
32
|
-
var fail = (e) => error = hasError ? new E(e, error, "An error was suppressed during disposal") : (hasError = true, e);
|
|
33
|
-
var next = (it) => {
|
|
34
|
-
while (it = stack.pop()) {
|
|
35
|
-
try {
|
|
36
|
-
var result = it[1] && it[1].call(it[2]);
|
|
37
|
-
if (it[0]) return Promise.resolve(result).then(next, (e) => (fail(e), next()));
|
|
38
|
-
} catch (e) {
|
|
39
|
-
fail(e);
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
if (hasError) throw error;
|
|
43
|
-
};
|
|
44
|
-
return next();
|
|
45
|
-
};
|
|
46
|
-
import {
|
|
47
|
-
WasmArena,
|
|
48
|
-
WasmMemoryError
|
|
49
|
-
} from "../wasi-memory.js";
|
|
50
|
-
function readTagsWithWasi(audioBuffer, wasiModule) {
|
|
51
|
-
var _stack = [];
|
|
52
|
-
try {
|
|
53
|
-
const arena = __using(_stack, new WasmArena(wasiModule));
|
|
54
|
-
const inputBuf = arena.allocBuffer(audioBuffer);
|
|
55
|
-
const outSizePtr = arena.allocUint32();
|
|
56
|
-
const resultPtr = wasiModule.tl_read_tags(
|
|
57
|
-
0,
|
|
58
|
-
inputBuf.ptr,
|
|
59
|
-
inputBuf.size,
|
|
60
|
-
outSizePtr.ptr
|
|
61
|
-
);
|
|
62
|
-
if (resultPtr === 0) {
|
|
63
|
-
const errorCode = wasiModule.tl_get_last_error_code();
|
|
64
|
-
throw new WasmMemoryError(
|
|
65
|
-
`error code ${errorCode}. Buffer size: ${audioBuffer.length} bytes`,
|
|
66
|
-
"read tags",
|
|
67
|
-
errorCode
|
|
68
|
-
);
|
|
69
|
-
}
|
|
70
|
-
const outSize = outSizePtr.readUint32();
|
|
71
|
-
const u8 = new Uint8Array(wasiModule.memory.buffer);
|
|
72
|
-
const result = new Uint8Array(u8.slice(resultPtr, resultPtr + outSize));
|
|
73
|
-
wasiModule.free(resultPtr);
|
|
74
|
-
return result;
|
|
75
|
-
} catch (_) {
|
|
76
|
-
var _error = _, _hasError = true;
|
|
77
|
-
} finally {
|
|
78
|
-
__callDispose(_stack, _error, _hasError);
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
export {
|
|
82
|
-
readTagsWithWasi
|
|
83
|
-
};
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
export { WasmerExecutionError, WasmerInitError, WasmerLoadError, } from "./types.js";
|
|
2
|
-
export type { WasiModule, WasmerLoaderConfig } from "./types.js";
|
|
3
|
-
export { initializeWasmer, isWasmerAvailable } from "./initialization.js";
|
|
4
|
-
export { loadWasmerWasi } from "./loader.js";
|
|
5
|
-
export { readTagsWithWasi } from "./high-level-api.js";
|
|
6
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/runtime/wasmer-sdk-loader/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,oBAAoB,EACpB,eAAe,EACf,eAAe,GAChB,MAAM,YAAY,CAAC;AACpB,YAAY,EAAE,UAAU,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AACjE,OAAO,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAC1E,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAC7C,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC"}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
WasmerExecutionError,
|
|
3
|
-
WasmerInitError,
|
|
4
|
-
WasmerLoadError
|
|
5
|
-
} from "./types.js";
|
|
6
|
-
import { initializeWasmer, isWasmerAvailable } from "./initialization.js";
|
|
7
|
-
import { loadWasmerWasi } from "./loader.js";
|
|
8
|
-
import { readTagsWithWasi } from "./high-level-api.js";
|
|
9
|
-
export {
|
|
10
|
-
WasmerExecutionError,
|
|
11
|
-
WasmerInitError,
|
|
12
|
-
WasmerLoadError,
|
|
13
|
-
initializeWasmer,
|
|
14
|
-
isWasmerAvailable,
|
|
15
|
-
loadWasmerWasi,
|
|
16
|
-
readTagsWithWasi
|
|
17
|
-
};
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @fileoverview Wasmer SDK initialization and WASM binary loading
|
|
3
|
-
*/
|
|
4
|
-
/**
|
|
5
|
-
* Initialize Wasmer SDK (must be called once before any Wasmer APIs)
|
|
6
|
-
*/
|
|
7
|
-
export declare function initializeWasmer(useInline?: boolean): Promise<void>;
|
|
8
|
-
/**
|
|
9
|
-
* Load WASM binary from file or URL
|
|
10
|
-
*/
|
|
11
|
-
export declare function loadWasmBinary(path: string): Promise<Uint8Array>;
|
|
12
|
-
/**
|
|
13
|
-
* Check if Wasmer SDK is available and can be initialized
|
|
14
|
-
*/
|
|
15
|
-
export declare function isWasmerAvailable(): Promise<boolean>;
|
|
16
|
-
//# sourceMappingURL=initialization.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"initialization.d.ts","sourceRoot":"","sources":["../../../../src/runtime/wasmer-sdk-loader/initialization.ts"],"names":[],"mappings":"AAAA;;GAEG;AAYH;;GAEG;AACH,wBAAsB,gBAAgB,CAAC,SAAS,UAAQ,GAAG,OAAO,CAAC,IAAI,CAAC,CAwBvE;AAED;;GAEG;AACH,wBAAsB,cAAc,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,UAAU,CAAC,CAatE;AAED;;GAEG;AACH,wBAAsB,iBAAiB,IAAI,OAAO,CAAC,OAAO,CAAC,CAO1D"}
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
import { init } from "@wasmer/sdk";
|
|
2
|
-
import { WasmerInitError } from "./types.js";
|
|
3
|
-
import {
|
|
4
|
-
errorMessage,
|
|
5
|
-
TagLibInitializationError
|
|
6
|
-
} from "../../errors/classes.js";
|
|
7
|
-
let isInitialized = false;
|
|
8
|
-
async function initializeWasmer(useInline = false) {
|
|
9
|
-
if (isInitialized) return;
|
|
10
|
-
try {
|
|
11
|
-
if (useInline) {
|
|
12
|
-
try {
|
|
13
|
-
const wasmInline = await import("@wasmer/sdk/wasm-inline");
|
|
14
|
-
await init({ module: wasmInline.default || wasmInline });
|
|
15
|
-
} catch {
|
|
16
|
-
await init();
|
|
17
|
-
}
|
|
18
|
-
} else {
|
|
19
|
-
await init();
|
|
20
|
-
}
|
|
21
|
-
isInitialized = true;
|
|
22
|
-
} catch (error) {
|
|
23
|
-
throw new WasmerInitError(
|
|
24
|
-
`Failed to initialize Wasmer SDK: ${errorMessage(error)}`,
|
|
25
|
-
error
|
|
26
|
-
);
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
async function loadWasmBinary(path) {
|
|
30
|
-
if (path.startsWith("http://") || path.startsWith("https://")) {
|
|
31
|
-
const response = await fetch(path);
|
|
32
|
-
if (!response.ok) {
|
|
33
|
-
throw new TagLibInitializationError(
|
|
34
|
-
`Failed to fetch WASM: ${response.statusText}`
|
|
35
|
-
);
|
|
36
|
-
}
|
|
37
|
-
return new Uint8Array(await response.arrayBuffer());
|
|
38
|
-
} else {
|
|
39
|
-
const { readFileData } = await import("../../utils/file.js");
|
|
40
|
-
return await readFileData(path);
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
async function isWasmerAvailable() {
|
|
44
|
-
try {
|
|
45
|
-
await initializeWasmer();
|
|
46
|
-
return true;
|
|
47
|
-
} catch {
|
|
48
|
-
return false;
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
export {
|
|
52
|
-
initializeWasmer,
|
|
53
|
-
isWasmerAvailable,
|
|
54
|
-
loadWasmBinary
|
|
55
|
-
};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @fileoverview Main Wasmer WASI loader function
|
|
3
|
-
*/
|
|
4
|
-
import type { WasiModule, WasmerLoaderConfig } from "./types.js";
|
|
5
|
-
/**
|
|
6
|
-
* Load WASI module using Wasmer SDK
|
|
7
|
-
*/
|
|
8
|
-
export declare function loadWasmerWasi(config?: WasmerLoaderConfig): Promise<WasiModule>;
|
|
9
|
-
//# sourceMappingURL=loader.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"loader.d.ts","sourceRoot":"","sources":["../../../../src/runtime/wasmer-sdk-loader/loader.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAO,KAAK,EAAE,UAAU,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAQjE;;GAEG;AACH,wBAAsB,cAAc,CAClC,MAAM,GAAE,kBAAuB,GAC9B,OAAO,CAAC,UAAU,CAAC,CAgDrB"}
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
import { Directory } from "@wasmer/sdk";
|
|
2
|
-
import { WasmerLoadError } from "./types.js";
|
|
3
|
-
import { initializeWasmer, loadWasmBinary } from "./initialization.js";
|
|
4
|
-
import { errorMessage } from "../../errors/classes.js";
|
|
5
|
-
import { instantiateWasi } from "./wasi-stubs.js";
|
|
6
|
-
import { createWasiModule } from "./module-creation.js";
|
|
7
|
-
import { fileUrlToPath } from "../../utils/path.js";
|
|
8
|
-
async function loadWasmerWasi(config = {}) {
|
|
9
|
-
const {
|
|
10
|
-
wasmPath = (() => {
|
|
11
|
-
const url = new URL("../../../build/taglib_wasi.wasm", import.meta.url);
|
|
12
|
-
return url.protocol === "file:" ? fileUrlToPath(url) : url.href;
|
|
13
|
-
})(),
|
|
14
|
-
useInlineWasm = false,
|
|
15
|
-
mounts = {},
|
|
16
|
-
env = {},
|
|
17
|
-
args = [],
|
|
18
|
-
debug = false
|
|
19
|
-
} = config;
|
|
20
|
-
await initializeWasmer(useInlineWasm);
|
|
21
|
-
if (debug) {
|
|
22
|
-
console.log("[WasmerSDK] Loading WASI module from:", wasmPath);
|
|
23
|
-
}
|
|
24
|
-
try {
|
|
25
|
-
const wasmBytes = await loadWasmBinary(wasmPath);
|
|
26
|
-
const wasmModule = await WebAssembly.compile(wasmBytes);
|
|
27
|
-
const mountConfig = {
|
|
28
|
-
"/": new Directory(),
|
|
29
|
-
// Root directory
|
|
30
|
-
...mounts
|
|
31
|
-
};
|
|
32
|
-
const instance = await instantiateWasi(wasmModule, {
|
|
33
|
-
env,
|
|
34
|
-
args,
|
|
35
|
-
mount: mountConfig
|
|
36
|
-
});
|
|
37
|
-
return createWasiModule(instance, debug);
|
|
38
|
-
} catch (error) {
|
|
39
|
-
throw new WasmerLoadError(
|
|
40
|
-
`Failed to load WASI module from ${wasmPath}: ${errorMessage(error)}`,
|
|
41
|
-
error
|
|
42
|
-
);
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
export {
|
|
46
|
-
loadWasmerWasi
|
|
47
|
-
};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @fileoverview WASI module creation and interface wrapping
|
|
3
|
-
*/
|
|
4
|
-
import type { WasiModule } from "./types.js";
|
|
5
|
-
/**
|
|
6
|
-
* Create WasiModule interface from WebAssembly instance
|
|
7
|
-
*/
|
|
8
|
-
export declare function createWasiModule(instance: WebAssembly.Instance, debug: boolean): WasiModule;
|
|
9
|
-
//# sourceMappingURL=module-creation.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"module-creation.d.ts","sourceRoot":"","sources":["../../../../src/runtime/wasmer-sdk-loader/module-creation.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAyB7C;;GAEG;AACH,wBAAgB,gBAAgB,CAC9B,QAAQ,EAAE,WAAW,CAAC,QAAQ,EAC9B,KAAK,EAAE,OAAO,GACb,UAAU,CAeZ"}
|
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
import { heapViews } from "../wasi-memory.js";
|
|
2
|
-
import { validateWasiExports } from "./wasi-stubs.js";
|
|
3
|
-
function createMemoryUtils(memory) {
|
|
4
|
-
const views = heapViews(memory);
|
|
5
|
-
return {
|
|
6
|
-
readCString: (ptr) => {
|
|
7
|
-
if (!ptr) return "";
|
|
8
|
-
let end = ptr;
|
|
9
|
-
while (views.u8[end] !== 0) end++;
|
|
10
|
-
return new TextDecoder().decode(views.u8.slice(ptr, end));
|
|
11
|
-
},
|
|
12
|
-
writeCString: (str, ptr) => {
|
|
13
|
-
const bytes = new TextEncoder().encode(str);
|
|
14
|
-
views.u8.set(bytes, ptr);
|
|
15
|
-
views.u8[ptr + bytes.length] = 0;
|
|
16
|
-
}
|
|
17
|
-
};
|
|
18
|
-
}
|
|
19
|
-
function createWasiModule(instance, debug) {
|
|
20
|
-
const exports = instance.exports;
|
|
21
|
-
validateWasiExports(exports);
|
|
22
|
-
const memory = exports.memory;
|
|
23
|
-
const memUtils = createMemoryUtils(memory);
|
|
24
|
-
if (debug) {
|
|
25
|
-
console.log(
|
|
26
|
-
"[WasmerSDK] WASI module loaded with exports:",
|
|
27
|
-
Object.keys(exports)
|
|
28
|
-
);
|
|
29
|
-
}
|
|
30
|
-
return createWasiInterface(exports, memory, memUtils);
|
|
31
|
-
}
|
|
32
|
-
function createWasiInterface(exports, memory, memUtils) {
|
|
33
|
-
return {
|
|
34
|
-
// Core metadata
|
|
35
|
-
tl_version: () => {
|
|
36
|
-
const ptr = exports.tl_version();
|
|
37
|
-
return memUtils.readCString(ptr);
|
|
38
|
-
},
|
|
39
|
-
tl_api_version: () => {
|
|
40
|
-
return exports.tl_api_version ? exports.tl_api_version() : 100;
|
|
41
|
-
},
|
|
42
|
-
// Memory management
|
|
43
|
-
malloc: (size) => exports.tl_malloc(size),
|
|
44
|
-
free: (ptr) => exports.tl_free(ptr),
|
|
45
|
-
// MessagePack API
|
|
46
|
-
tl_read_tags: (pathPtr, bufPtr, len, outSizePtr) => exports.tl_read_tags(
|
|
47
|
-
pathPtr,
|
|
48
|
-
bufPtr,
|
|
49
|
-
len,
|
|
50
|
-
outSizePtr
|
|
51
|
-
),
|
|
52
|
-
tl_write_tags: (pathPtr, bufPtr, len, tagsPtr, tagsSize, outBufPtr, outSizePtr) => exports.tl_write_tags(
|
|
53
|
-
pathPtr,
|
|
54
|
-
bufPtr,
|
|
55
|
-
len,
|
|
56
|
-
tagsPtr,
|
|
57
|
-
tagsSize,
|
|
58
|
-
outBufPtr,
|
|
59
|
-
outSizePtr
|
|
60
|
-
),
|
|
61
|
-
// Error handling
|
|
62
|
-
tl_get_last_error: () => exports.tl_get_last_error(),
|
|
63
|
-
tl_get_last_error_code: () => exports.tl_get_last_error_code(),
|
|
64
|
-
tl_clear_error: () => exports.tl_clear_error(),
|
|
65
|
-
// Memory access
|
|
66
|
-
memory
|
|
67
|
-
};
|
|
68
|
-
}
|
|
69
|
-
export {
|
|
70
|
-
createWasiModule
|
|
71
|
-
};
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @fileoverview WASI P1 stubs and export validation for buffer-only mode
|
|
3
|
-
*/
|
|
4
|
-
/**
|
|
5
|
-
* Instantiate WASI module with stub imports (no filesystem access)
|
|
6
|
-
*/
|
|
7
|
-
export declare function instantiateWasi(wasmModule: WebAssembly.Module, _config: {
|
|
8
|
-
env: Record<string, string>;
|
|
9
|
-
args: string[];
|
|
10
|
-
mount: Record<string, unknown>;
|
|
11
|
-
}): Promise<WebAssembly.Instance>;
|
|
12
|
-
/**
|
|
13
|
-
* Validate required WASI exports are present
|
|
14
|
-
*/
|
|
15
|
-
export declare function validateWasiExports(exports: WebAssembly.Exports): void;
|
|
16
|
-
//# sourceMappingURL=wasi-stubs.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"wasi-stubs.d.ts","sourceRoot":"","sources":["../../../../src/runtime/wasmer-sdk-loader/wasi-stubs.ts"],"names":[],"mappings":"AAAA;;GAEG;AAIH;;GAEG;AACH,wBAAsB,eAAe,CACnC,UAAU,EAAE,WAAW,CAAC,MAAM,EAC9B,OAAO,EAAE;IACP,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC5B,IAAI,EAAE,MAAM,EAAE,CAAC;IACf,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CAChC,GACA,OAAO,CAAC,WAAW,CAAC,QAAQ,CAAC,CAwD/B;AAED;;GAEG;AACH,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,WAAW,CAAC,OAAO,GAAG,IAAI,CAkBtE"}
|