taglib-wasm 2.4.0 → 2.4.1
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/LICENSE +0 -29
- package/NOTICE +35 -0
- package/README.md +29 -27
- package/dist/_virtual/{_@oxc-project_runtime@0.152.0 → _@oxc-project_runtime@0.154.0}/helpers/esm/assertClassBrand.js +1 -1
- package/dist/_virtual/{_@oxc-project_runtime@0.152.0 → _@oxc-project_runtime@0.154.0}/helpers/esm/checkPrivateRedeclaration.js +1 -1
- package/dist/_virtual/{_@oxc-project_runtime@0.152.0 → _@oxc-project_runtime@0.154.0}/helpers/esm/classPrivateFieldGet2.js +1 -1
- package/dist/_virtual/{_@oxc-project_runtime@0.152.0 → _@oxc-project_runtime@0.154.0}/helpers/esm/classPrivateFieldInitSpec.js +1 -1
- package/dist/_virtual/{_@oxc-project_runtime@0.152.0 → _@oxc-project_runtime@0.154.0}/helpers/esm/classPrivateFieldSet2.js +1 -1
- package/dist/_virtual/{_@oxc-project_runtime@0.152.0 → _@oxc-project_runtime@0.154.0}/helpers/esm/defineProperty.js +1 -1
- package/dist/_virtual/{_@oxc-project_runtime@0.152.0 → _@oxc-project_runtime@0.154.0}/helpers/esm/toPrimitive.js +1 -1
- package/dist/_virtual/{_@oxc-project_runtime@0.152.0 → _@oxc-project_runtime@0.154.0}/helpers/esm/toPropertyKey.js +1 -1
- package/dist/_virtual/{_@oxc-project_runtime@0.152.0 → _@oxc-project_runtime@0.154.0}/helpers/esm/typeof.js +1 -1
- package/dist/_virtual/{_@oxc-project_runtime@0.152.0 → _@oxc-project_runtime@0.154.0}/helpers/esm/usingCtx.js +1 -1
- package/dist/constants/properties.d.ts.map +1 -1
- package/dist/constants/properties.js +2 -0
- package/dist/constants/specialized-properties.d.ts +14 -0
- package/dist/constants/specialized-properties.d.ts.map +1 -1
- package/dist/constants/specialized-properties.js +21 -0
- package/dist/index.browser.js +30 -6
- package/dist/rating.js +1 -2
- package/dist/runtime/wasi-adapter/adapter.js +1 -1
- package/dist/runtime/wasi-adapter/file-handle.js +1 -1
- package/dist/runtime/wasi-adapter/index.js +1 -2
- package/dist/runtime/wasi-adapter/wasm-io.js +1 -1
- package/dist/runtime/wasi-memory.js +3 -3
- package/dist/simple/picture-operations.d.ts +6 -0
- package/dist/simple/picture-operations.d.ts.map +1 -1
- package/dist/simple/picture-operations.js +6 -0
- package/dist/simple/tag-operations.d.ts +7 -0
- package/dist/simple/tag-operations.d.ts.map +1 -1
- package/dist/simple/tag-operations.js +7 -0
- package/dist/simple/with-audio-file.d.ts.map +1 -1
- package/dist/simple/with-audio-file.js +2 -1
- package/dist/simple.browser.js +30 -6
- package/dist/taglib/audio-file-base.js +1 -1
- package/dist/taglib/audio-file-impl.js +1 -1
- package/dist/taglib/taglib-class.js +1 -1
- package/dist/taglib-web.wasm +0 -0
- package/dist/taglib-wrapper.js +1 -1
- package/dist/types/metadata-mappings.d.ts.map +1 -1
- package/dist/types/metadata-mappings.js +8 -0
- package/dist/types/tags.d.ts +4 -0
- package/dist/types/tags.d.ts.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/dist/web.browser.js +30 -6
- package/legal/COPYING.LGPL +502 -0
- package/package.json +16 -10
package/LICENSE
CHANGED
|
@@ -19,32 +19,3 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
|
19
19
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
20
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
21
|
SOFTWARE.
|
|
22
|
-
|
|
23
|
-
---
|
|
24
|
-
|
|
25
|
-
ADDITIONAL LICENSING INFORMATION:
|
|
26
|
-
|
|
27
|
-
This product includes software developed by Scott Wheeler and the TagLib
|
|
28
|
-
contributors (https://taglib.org/).
|
|
29
|
-
|
|
30
|
-
The WebAssembly binaries (build/taglib-web.wasm for the Emscripten backend
|
|
31
|
-
and build/taglib-wasi.wasm for the WASI backend, shipped as dist/*.wasm)
|
|
32
|
-
contain compiled TagLib code which is licensed under LGPL-2.1-or-later.
|
|
33
|
-
The original TagLib source code is located in lib/taglib/. See
|
|
34
|
-
lib/taglib/COPYING.LGPL for the full LGPL license terms.
|
|
35
|
-
|
|
36
|
-
LGPL COMPLIANCE:
|
|
37
|
-
The WebAssembly binaries are subject to LGPL requirements. This means:
|
|
38
|
-
- You may use them in commercial applications
|
|
39
|
-
- Modifications to TagLib must be shared under LGPL
|
|
40
|
-
- You must enable users to relink with modified TagLib versions
|
|
41
|
-
|
|
42
|
-
To rebuild the WebAssembly binaries with a modified TagLib:
|
|
43
|
-
1. Modify the TagLib source in lib/taglib/
|
|
44
|
-
2. Run: pnpm run build:wasm (builds both backends; requires the
|
|
45
|
-
Emscripten SDK and WASI SDK 34 — see .github/CONTRIBUTING.md)
|
|
46
|
-
3. The new binaries will be in build/taglib-web.wasm and
|
|
47
|
-
build/taglib-wasi.wasm
|
|
48
|
-
|
|
49
|
-
For more information about LGPL compliance and dual licensing, see:
|
|
50
|
-
https://github.com/CharlesWiltgen/TagLib-Wasm#licensing
|
package/NOTICE
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
NOTICE
|
|
2
|
+
======
|
|
3
|
+
|
|
4
|
+
Third-party and binary licensing for taglib-wasm. The project's own
|
|
5
|
+
TypeScript/JavaScript code is MIT — see LICENSE.
|
|
6
|
+
|
|
7
|
+
This product includes software developed by Scott Wheeler and the TagLib
|
|
8
|
+
contributors (https://taglib.org/).
|
|
9
|
+
|
|
10
|
+
The WebAssembly binaries (build/taglib-web.wasm for the Emscripten backend and
|
|
11
|
+
build/taglib-wasi.wasm for the WASI backend, shipped as dist/*.wasm) contain
|
|
12
|
+
compiled TagLib code, which is licensed under LGPL-2.1-or-later (TagLib is
|
|
13
|
+
dual-licensed LGPL-2.1-or-later / MPL-1.1). The full LGPL-2.1 text ships with
|
|
14
|
+
this package as legal/COPYING.LGPL — a verbatim copy of the same file in the
|
|
15
|
+
vendored TagLib source at lib/taglib/ (git submodule).
|
|
16
|
+
|
|
17
|
+
LGPL compliance
|
|
18
|
+
---------------
|
|
19
|
+
|
|
20
|
+
The WebAssembly binaries are subject to LGPL requirements. This means:
|
|
21
|
+
|
|
22
|
+
- You may use them in commercial applications
|
|
23
|
+
- Modifications to TagLib must be shared under LGPL
|
|
24
|
+
- You must enable users to relink with modified TagLib versions
|
|
25
|
+
|
|
26
|
+
To rebuild the WebAssembly binaries with a modified TagLib:
|
|
27
|
+
|
|
28
|
+
1. Modify the TagLib source in lib/taglib/
|
|
29
|
+
2. Run: pnpm run build:wasm (builds both backends; requires the
|
|
30
|
+
Emscripten SDK and WASI SDK 34 — see .github/CONTRIBUTING.md)
|
|
31
|
+
3. The new binaries will be in build/taglib-web.wasm and
|
|
32
|
+
build/taglib-wasi.wasm
|
|
33
|
+
|
|
34
|
+
Rendered licensing notes:
|
|
35
|
+
https://github.com/CharlesWiltgen/TagLib-Wasm/blob/main/README.md#license
|
package/README.md
CHANGED
|
@@ -581,28 +581,28 @@ Where a build splits its output into several files, the figure is the total of
|
|
|
581
581
|
every JavaScript chunk it emits. Exact invocations, so the table can be
|
|
582
582
|
reproduced:
|
|
583
583
|
|
|
584
|
-
- **esbuild 0.28.2**
|
|
585
|
-
--target=es2022 --platform=browser --external:
|
|
584
|
+
- **esbuild 0.28.2** – `esbuild <app> --bundle --minify --format=esm
|
|
585
|
+
--target=es2022 --platform=browser --external:module` for the browser
|
|
586
586
|
column; the same with `--platform=node` and no `--external` for the Node
|
|
587
|
-
column. The `--external` matches the dynamic `import("
|
|
587
|
+
column. The `--external` matches the dynamic `import("module")` in
|
|
588
588
|
`dist/taglib-wrapper.js`. (`--external` takes a colon, not `=`.)
|
|
589
|
-
- **rollup 4.63.3**
|
|
589
|
+
- **rollup 4.63.3** – `input: <app>`, plugins `@rollup/plugin-node-resolve`
|
|
590
590
|
(`{ browser: true, exportConditions: ["browser", "default"] }` for the browser
|
|
591
591
|
column, default options for the Node column) and `@rollup/plugin-terser`,
|
|
592
592
|
output `{ format: "esm", inlineDynamicImports: true }`.
|
|
593
|
-
- **vite 8.3.0**
|
|
593
|
+
- **vite 8.3.0** – A real app build: `index.html` plus a
|
|
594
594
|
`<script type="module">` pointing at the entry, `build.minify: "esbuild"`,
|
|
595
595
|
`target: "es2022"`. Vite builds for the browser; the figures below that name
|
|
596
596
|
the `node` condition instead add `resolve.conditions: ["node"]`.
|
|
597
|
-
- **webpack 5.111.1**
|
|
597
|
+
- **webpack 5.111.1** – `mode: "production"`, `target: "web"`,
|
|
598
598
|
`externals: { module: "module" }`. `target: "web"` alone fails on the
|
|
599
|
-
`import("
|
|
599
|
+
`import("module")` inside `dist/taglib-wrapper.js`.
|
|
600
600
|
|
|
601
601
|
| Consumer app | esbuild (browser)¹ | rollup (browser)¹ | vite (app) | webpack (web)² | esbuild (Node)³ | rollup (Node)³ |
|
|
602
602
|
| ------------------------------------- | ------------------ | ----------------- | ---------- | -------------- | --------------- | -------------- |
|
|
603
|
-
| `taglib-wasm` — `TagLib.initialize()` |
|
|
604
|
-
| `taglib-wasm/simple` — `getTagLib()` |
|
|
605
|
-
| `taglib-wasm/folder` — `scanFolder`⁴ | — |
|
|
603
|
+
| `taglib-wasm` — `TagLib.initialize()` | 81,300 | 78,526 | 83,770 | 81,322 | 147,532 | 136,929 |
|
|
604
|
+
| `taglib-wasm/simple` — `getTagLib()` | 81,036 | 78,804 | 83,518 | 82,152 | 148,553 | 137,330 |
|
|
605
|
+
| `taglib-wasm/folder` — `scanFolder`⁴ | — | 140,717⁴ | 150,043⁴ | — | 151,898 | 140,717 |
|
|
606
606
|
|
|
607
607
|
¹ the `browser` `exports` condition. ² `target: "web"`. ³ the Node `exports`
|
|
608
608
|
condition. ⁴ Node-only entry — see below.
|
|
@@ -623,15 +623,15 @@ browser, scan on a server and post the result; the pure
|
|
|
623
623
|
|
|
624
624
|
**`./web` builds for the browser.** It declares a `browser` condition, so a
|
|
625
625
|
browser-targeted build resolves an Emscripten-only build of that entry and pulls
|
|
626
|
-
**`taglib-web.wasm` alone**
|
|
627
|
-
`pictureToDataURL` from `taglib-wasm/web`: one
|
|
626
|
+
**`taglib-web.wasm` alone** – Measured with the vite invocation above on
|
|
627
|
+
`pictureToDataURL` from `taglib-wasm/web`: one 673,441-byte Wasm asset, where
|
|
628
628
|
the vite build on the `node` condition instead emits both `taglib-web.wasm` and
|
|
629
|
-
`taglib-wasi.wasm` (1,
|
|
629
|
+
`taglib-wasi.wasm` (1,428,196 bytes of assets for a call that needs neither
|
|
630
630
|
engine). The browser build is a pre-bundled file like `index.browser.js`, so it
|
|
631
|
-
barely tree-shakes: that call is
|
|
631
|
+
barely tree-shakes: that call is 82,511 bytes in the vite app build and 80,021
|
|
632
632
|
under the esbuild browser column, against 205 bytes under esbuild's Node column —
|
|
633
633
|
and importing any pure helper from the barrel costs ~80 KB there too. Rollup is
|
|
634
|
-
the exception: it shakes the pre-bundled file down to
|
|
634
|
+
the exception: it shakes the pre-bundled file down to 784 bytes, though still
|
|
635
635
|
not to the 210-byte leaf its Node column reaches. That granularity is a property
|
|
636
636
|
of the pre-bundled browser entries, not of this subpath.
|
|
637
637
|
|
|
@@ -657,8 +657,8 @@ instead of a bundler error — and importing `bwf`, `groupAlbums`,
|
|
|
657
657
|
mismatch is what produced the original silent failure.
|
|
658
658
|
|
|
659
659
|
**Bundler interop.** `dist/taglib-wrapper.js` — the Emscripten glue — contains a
|
|
660
|
-
dynamic `import("
|
|
661
|
-
two targets need one line each: esbuild `--external:
|
|
660
|
+
dynamic `import("module")`, and browser targets have no such builtin, so the
|
|
661
|
+
two targets need one line each: esbuild `--external:module`, webpack
|
|
662
662
|
`externals: { module: "module" }` (webpack `target: "web"` alone fails on it).
|
|
663
663
|
Rollup needs nothing extra; vite externalizes it for the browser with a warning.
|
|
664
664
|
The `browser` condition itself is resolved by default by esbuild
|
|
@@ -667,7 +667,7 @@ The `browser` condition itself is resolved by default by esbuild
|
|
|
667
667
|
|
|
668
668
|
**The barrel is not a tax.** Adding an API to an import that already loads the
|
|
669
669
|
engine costs only that API. Against the `taglib-wasm` row above (esbuild, Node
|
|
670
|
-
column): adding `scanFolder` costs **4,
|
|
670
|
+
column): adding `scanFolder` costs **4,381 bytes** and adding
|
|
671
671
|
`pictureToDataURL` costs **187 bytes**, because neither drags in the rest of the
|
|
672
672
|
Folder or Web module tree.
|
|
673
673
|
|
|
@@ -676,16 +676,16 @@ pre-bundled file, so a consumer of the barrel downloads the whole file whatever
|
|
|
676
676
|
it imports; adding the pure `bwf` / `groupAlbums` / `discFolderInfo` exports to
|
|
677
677
|
that file's export list therefore costs nothing measurable. Bundling
|
|
678
678
|
`import { TagLib }` against the entry with and without those three export names
|
|
679
|
-
gives identical bytes under esbuild (
|
|
680
|
-
more under vite (
|
|
679
|
+
gives identical bytes under esbuild (81,300) and rollup (78,526) and 12 bytes
|
|
680
|
+
more under vite (83,758 → 83,770). Nothing else moved: the Folder and Web APIs
|
|
681
681
|
are still reached only when imported, and the Node entries are unchanged.
|
|
682
682
|
|
|
683
683
|
**Entry-point choice is not a size lever.** `taglib-wasm` and
|
|
684
684
|
`taglib-wasm/simple` differ by about a kilobyte either way — in a browser bundle
|
|
685
|
-
`simple` is
|
|
685
|
+
`simple` is 264 bytes _smaller_, on Node 1,021 bytes _larger_, because
|
|
686
686
|
`getTagLib()` reaches the full `TagLib` class through a dynamic import. Pick by
|
|
687
687
|
API surface. The lever that does matter is the `browser` export condition: a
|
|
688
|
-
browser-targeted bundle is ~80 KB where a Node-targeted one is ~
|
|
688
|
+
browser-targeted bundle is ~80 KB where a Node-targeted one is ~148 KB.
|
|
689
689
|
|
|
690
690
|
**`"sideEffects": false`** is set in `package.json`, so a bundler may drop any
|
|
691
691
|
module whose exports go unused. Before that field, importers of the sub-entries
|
|
@@ -737,7 +737,7 @@ This project uses dual licensing:
|
|
|
737
737
|
|
|
738
738
|
- **TypeScript/JavaScript code** – MIT License (see [LICENSE](LICENSE))
|
|
739
739
|
- **WebAssembly binaries (taglib-web.wasm, taglib-wasi.wasm)** – LGPL-2.1-or-later
|
|
740
|
-
(inherited from TagLib)
|
|
740
|
+
(inherited from TagLib; the compliance and relinking notes ship in [NOTICE](NOTICE))
|
|
741
741
|
|
|
742
742
|
The TagLib library is dual-licensed under LGPL/MPL. When compiled to
|
|
743
743
|
WebAssembly, the resulting binary must comply with LGPL requirements. This
|
|
@@ -747,10 +747,12 @@ means:
|
|
|
747
747
|
- If you modify the TagLib C++ code, you must share those changes
|
|
748
748
|
- You must provide a way for users to relink with a modified TagLib
|
|
749
749
|
|
|
750
|
-
For details, see [
|
|
751
|
-
—
|
|
752
|
-
|
|
753
|
-
|
|
750
|
+
For details, see [NOTICE](NOTICE) and the LGPL text it ships with
|
|
751
|
+
([legal/COPYING.LGPL](legal/COPYING.LGPL)) — both travel with the published
|
|
752
|
+
package — and
|
|
753
|
+
[TagLib's COPYING.LGPL](https://github.com/taglib/taglib/blob/master/COPYING.LGPL);
|
|
754
|
+
this repository vendors TagLib as a git submodule at `lib/taglib`, so that path
|
|
755
|
+
belongs to the submodule rather than to this tree.
|
|
754
756
|
|
|
755
757
|
## Acknowledgments
|
|
756
758
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
//#region \0@oxc-project+runtime@0.
|
|
1
|
+
//#region \0@oxc-project+runtime@0.154.0/helpers/esm/assertClassBrand.js
|
|
2
2
|
function _assertClassBrand(e, t, n) {
|
|
3
3
|
if ("function" == typeof e ? e === t : e.has(t)) return arguments.length < 3 ? t : n;
|
|
4
4
|
throw new TypeError("Private element is not present on this object");
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
//#region \0@oxc-project+runtime@0.
|
|
1
|
+
//#region \0@oxc-project+runtime@0.154.0/helpers/esm/checkPrivateRedeclaration.js
|
|
2
2
|
function _checkPrivateRedeclaration(e, t) {
|
|
3
3
|
if (t.has(e)) throw new TypeError("Cannot initialize the same private elements twice on an object");
|
|
4
4
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import _assertClassBrand from "./assertClassBrand.js";
|
|
2
|
-
//#region \0@oxc-project+runtime@0.
|
|
2
|
+
//#region \0@oxc-project+runtime@0.154.0/helpers/esm/classPrivateFieldGet2.js
|
|
3
3
|
function _classPrivateFieldGet2(s, a) {
|
|
4
4
|
return s.get(_assertClassBrand(s, a));
|
|
5
5
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import _checkPrivateRedeclaration from "./checkPrivateRedeclaration.js";
|
|
2
|
-
//#region \0@oxc-project+runtime@0.
|
|
2
|
+
//#region \0@oxc-project+runtime@0.154.0/helpers/esm/classPrivateFieldInitSpec.js
|
|
3
3
|
function _classPrivateFieldInitSpec(e, t, a) {
|
|
4
4
|
_checkPrivateRedeclaration(e, t), t.set(e, a);
|
|
5
5
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import _assertClassBrand from "./assertClassBrand.js";
|
|
2
|
-
//#region \0@oxc-project+runtime@0.
|
|
2
|
+
//#region \0@oxc-project+runtime@0.154.0/helpers/esm/classPrivateFieldSet2.js
|
|
3
3
|
function _classPrivateFieldSet2(s, a, r) {
|
|
4
4
|
return s.set(_assertClassBrand(s, a), r), r;
|
|
5
5
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import toPropertyKey from "./toPropertyKey.js";
|
|
2
|
-
//#region \0@oxc-project+runtime@0.
|
|
2
|
+
//#region \0@oxc-project+runtime@0.154.0/helpers/esm/defineProperty.js
|
|
3
3
|
function _defineProperty(e, r, t) {
|
|
4
4
|
return (r = toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
|
|
5
5
|
value: t,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import _typeof from "./typeof.js";
|
|
2
|
-
//#region \0@oxc-project+runtime@0.
|
|
2
|
+
//#region \0@oxc-project+runtime@0.154.0/helpers/esm/toPrimitive.js
|
|
3
3
|
function toPrimitive(t, r) {
|
|
4
4
|
if ("object" != _typeof(t) || !t) return t;
|
|
5
5
|
var e = t[Symbol.toPrimitive];
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import _typeof from "./typeof.js";
|
|
2
2
|
import toPrimitive from "./toPrimitive.js";
|
|
3
|
-
//#region \0@oxc-project+runtime@0.
|
|
3
|
+
//#region \0@oxc-project+runtime@0.154.0/helpers/esm/toPropertyKey.js
|
|
4
4
|
function toPropertyKey(t) {
|
|
5
5
|
var i = toPrimitive(t, "string");
|
|
6
6
|
return "symbol" == _typeof(i) ? i : i + "";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
//#region \0@oxc-project+runtime@0.
|
|
1
|
+
//#region \0@oxc-project+runtime@0.154.0/helpers/esm/typeof.js
|
|
2
2
|
function _typeof(o) {
|
|
3
3
|
"@babel/helpers - typeof";
|
|
4
4
|
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"properties.d.ts","sourceRoot":"","sources":["../../src/constants/properties.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AACnE,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,EAAE,2BAA2B,EAAE,MAAM,kCAAkC,CAAC;AAC/E,OAAO,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AAUrE,eAAO,MAAM,UAAU,EAAE,OAAO,gBAAgB,GAC9C,OAAO,2BAA2B,GAClC,OAAO,sBAAsB,GAC7B,OAAO,qBAKC,CAAC;AAEX;;;GAGG;AACH,MAAM,MAAM,WAAW,GAAG,MAAM,OAAO,UAAU,CAAC;AAElD;;;GAGG;AACH,MAAM,MAAM,aAAa,CAAC,CAAC,SAAS,WAAW,IAC7C,CAAC,OAAO,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,SAAS,QAAQ,GAC3C,MAAM,GACN,CAAC,OAAO,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,SAAS,QAAQ,GAC7C,MAAM,GACN,CAAC,OAAO,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,SAAS,SAAS,GAC9C,OAAO,GACP,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"properties.d.ts","sourceRoot":"","sources":["../../src/constants/properties.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AACnE,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,EAAE,2BAA2B,EAAE,MAAM,kCAAkC,CAAC;AAC/E,OAAO,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AAUrE,eAAO,MAAM,UAAU,EAAE,OAAO,gBAAgB,GAC9C,OAAO,2BAA2B,GAClC,OAAO,sBAAsB,GAC7B,OAAO,qBAKC,CAAC;AAEX;;;GAGG;AACH,MAAM,MAAM,WAAW,GAAG,MAAM,OAAO,UAAU,CAAC;AAElD;;;GAGG;AACH,MAAM,MAAM,aAAa,CAAC,CAAC,SAAS,WAAW,IAC7C,CAAC,OAAO,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,SAAS,QAAQ,GAC3C,MAAM,GACN,CAAC,OAAO,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,SAAS,QAAQ,GAC7C,MAAM,GACN,CAAC,OAAO,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,SAAS,SAAS,GAC9C,OAAO,GACP,MAAM,CAAC;AAoDjB,mGAAmG;AACnG,wBAAgB,WAAW,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAE/C;AAsDD;;;GAGG;AACH,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAE/D;AAED;;;GAGG;AACH,wBAAgB,oBAAoB,CAAC,QAAQ,EAAE,QAAQ,CAAC,MAAM,CAAC,GAAG,MAAM,EAAE,CAOzE;AAED,mGAAmG;AACnG,wBAAgB,aAAa,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAEjD;AAED,qEAAqE;AACrE,wBAAgB,mBAAmB,CAAC,CAAC,EACnC,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,CAAC,CAAC,GACrB,MAAM,CAAC,MAAM,EAAE,CAAC,CAAC,CASnB;AAGD,YAAY,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC"}
|
|
@@ -41,6 +41,8 @@ const READ_ALIASES = {
|
|
|
41
41
|
TOTALDISCS: "DISCTOTAL",
|
|
42
42
|
MUSICBRAINZ_ALBUMTYPE: "RELEASETYPE",
|
|
43
43
|
"MusicBrainz Album Type": "RELEASETYPE",
|
|
44
|
+
MUSICBRAINZ_ALBUMSTATUS: "RELEASESTATUS",
|
|
45
|
+
"MusicBrainz Album Status": "RELEASESTATUS",
|
|
44
46
|
CONTENTADVISORY: "ITUNESADVISORY",
|
|
45
47
|
EXPLICIT: "ITUNESADVISORY"
|
|
46
48
|
};
|
|
@@ -87,6 +87,20 @@ export declare const SPECIALIZED_PROPERTIES: {
|
|
|
87
87
|
readonly mp4: "----:com.apple.iTunes:MusicBrainz Album Release Country";
|
|
88
88
|
};
|
|
89
89
|
};
|
|
90
|
+
readonly releaseStatus: {
|
|
91
|
+
readonly key: "RELEASESTATUS";
|
|
92
|
+
readonly description: "Release status (official, promotion, bootleg, ...). TagLib 2.3.2 translates the RELEASESTATUS key per format: ID3v2 TXXX 'MUSICBRAINZ ALBUM STATUS' (TagLib's description casing), MP4 freeform atom 'MusicBrainz Album Status', APEv2 MUSICBRAINZ_ALBUMSTATUS, ASF 'MusicBrainz/Album Status', Vorbis/Matroska raw RELEASESTATUS";
|
|
93
|
+
readonly type: "string";
|
|
94
|
+
readonly supportedFormats: readonly ["ID3v2", "MP4", "Vorbis", "APE", "ASF", "Matroska"];
|
|
95
|
+
readonly mappings: {
|
|
96
|
+
readonly id3v2: {
|
|
97
|
+
readonly frame: "TXXX";
|
|
98
|
+
readonly description: "MusicBrainz Album Status";
|
|
99
|
+
};
|
|
100
|
+
readonly vorbis: "RELEASESTATUS";
|
|
101
|
+
readonly mp4: "----:com.apple.iTunes:MusicBrainz Album Status";
|
|
102
|
+
};
|
|
103
|
+
};
|
|
90
104
|
readonly itunesAdvisory: {
|
|
91
105
|
readonly key: "ITUNESADVISORY";
|
|
92
106
|
readonly description: "Content advisory in the ITUNESADVISORY convention ('1' = explicit, '2' = clean, '0' = unspecified). On MP4 the value is stored in the native rtng atom and surfaced here. The typed tri-state lives on ExtendedTag.advisory; aliases CONTENTADVISORY and EXPLICIT resolve here";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"specialized-properties.d.ts","sourceRoot":"","sources":["../../src/constants/specialized-properties.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,eAAO,MAAM,sBAAsB
|
|
1
|
+
{"version":3,"file":"specialized-properties.d.ts","sourceRoot":"","sources":["../../src/constants/specialized-properties.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAkOjC;;;;;;;;OAQG;;;;;;;;;;;;;;;CAYK,CAAC"}
|
|
@@ -119,6 +119,27 @@ const SPECIALIZED_PROPERTIES = {
|
|
|
119
119
|
mp4: "----:com.apple.iTunes:MusicBrainz Album Release Country"
|
|
120
120
|
}
|
|
121
121
|
},
|
|
122
|
+
releaseStatus: {
|
|
123
|
+
key: "RELEASESTATUS",
|
|
124
|
+
description: "Release status (official, promotion, bootleg, ...). TagLib 2.3.2 translates the RELEASESTATUS key per format: ID3v2 TXXX 'MUSICBRAINZ ALBUM STATUS' (TagLib's description casing), MP4 freeform atom 'MusicBrainz Album Status', APEv2 MUSICBRAINZ_ALBUMSTATUS, ASF 'MusicBrainz/Album Status', Vorbis/Matroska raw RELEASESTATUS",
|
|
125
|
+
type: "string",
|
|
126
|
+
supportedFormats: [
|
|
127
|
+
"ID3v2",
|
|
128
|
+
"MP4",
|
|
129
|
+
"Vorbis",
|
|
130
|
+
"APE",
|
|
131
|
+
"ASF",
|
|
132
|
+
"Matroska"
|
|
133
|
+
],
|
|
134
|
+
mappings: {
|
|
135
|
+
id3v2: {
|
|
136
|
+
frame: "TXXX",
|
|
137
|
+
description: "MusicBrainz Album Status"
|
|
138
|
+
},
|
|
139
|
+
vorbis: "RELEASESTATUS",
|
|
140
|
+
mp4: "----:com.apple.iTunes:MusicBrainz Album Status"
|
|
141
|
+
}
|
|
142
|
+
},
|
|
122
143
|
itunesAdvisory: {
|
|
123
144
|
key: "ITUNESADVISORY",
|
|
124
145
|
description: "Content advisory in the ITUNESADVISORY convention ('1' = explicit, '2' = clean, '0' = unspecified). On MP4 the value is stored in the native rtng atom and surfaced here. The typed tri-state lives on ExtendedTag.advisory; aliases CONTENTADVISORY and EXPLICIT resolve here",
|
package/dist/index.browser.js
CHANGED
|
@@ -1371,6 +1371,27 @@ var init_specialized_properties = __esmMin((() => {
|
|
|
1371
1371
|
mp4: "----:com.apple.iTunes:MusicBrainz Album Release Country"
|
|
1372
1372
|
}
|
|
1373
1373
|
},
|
|
1374
|
+
releaseStatus: {
|
|
1375
|
+
key: "RELEASESTATUS",
|
|
1376
|
+
description: "Release status (official, promotion, bootleg, ...). TagLib 2.3.2 translates the RELEASESTATUS key per format: ID3v2 TXXX 'MUSICBRAINZ ALBUM STATUS' (TagLib's description casing), MP4 freeform atom 'MusicBrainz Album Status', APEv2 MUSICBRAINZ_ALBUMSTATUS, ASF 'MusicBrainz/Album Status', Vorbis/Matroska raw RELEASESTATUS",
|
|
1377
|
+
type: "string",
|
|
1378
|
+
supportedFormats: [
|
|
1379
|
+
"ID3v2",
|
|
1380
|
+
"MP4",
|
|
1381
|
+
"Vorbis",
|
|
1382
|
+
"APE",
|
|
1383
|
+
"ASF",
|
|
1384
|
+
"Matroska"
|
|
1385
|
+
],
|
|
1386
|
+
mappings: {
|
|
1387
|
+
id3v2: {
|
|
1388
|
+
frame: "TXXX",
|
|
1389
|
+
description: "MusicBrainz Album Status"
|
|
1390
|
+
},
|
|
1391
|
+
vorbis: "RELEASESTATUS",
|
|
1392
|
+
mp4: "----:com.apple.iTunes:MusicBrainz Album Status"
|
|
1393
|
+
}
|
|
1394
|
+
},
|
|
1374
1395
|
itunesAdvisory: {
|
|
1375
1396
|
key: "ITUNESADVISORY",
|
|
1376
1397
|
description: "Content advisory in the ITUNESADVISORY convention ('1' = explicit, '2' = clean, '0' = unspecified). On MP4 the value is stored in the native rtng atom and surfaced here. The typed tri-state lives on ExtendedTag.advisory; aliases CONTENTADVISORY and EXPLICIT resolve here",
|
|
@@ -1637,6 +1658,8 @@ var init_properties = __esmMin((() => {
|
|
|
1637
1658
|
TOTALDISCS: "DISCTOTAL",
|
|
1638
1659
|
MUSICBRAINZ_ALBUMTYPE: "RELEASETYPE",
|
|
1639
1660
|
"MusicBrainz Album Type": "RELEASETYPE",
|
|
1661
|
+
MUSICBRAINZ_ALBUMSTATUS: "RELEASESTATUS",
|
|
1662
|
+
"MusicBrainz Album Status": "RELEASESTATUS",
|
|
1640
1663
|
CONTENTADVISORY: "ITUNESADVISORY",
|
|
1641
1664
|
EXPLICIT: "ITUNESADVISORY"
|
|
1642
1665
|
};
|
|
@@ -1763,7 +1786,7 @@ var init_auto_dispose = __esmMin((() => {
|
|
|
1763
1786
|
});
|
|
1764
1787
|
}));
|
|
1765
1788
|
//#endregion
|
|
1766
|
-
//#region \0@oxc-project+runtime@0.
|
|
1789
|
+
//#region \0@oxc-project+runtime@0.154.0/helpers/esm/typeof.js
|
|
1767
1790
|
function _typeof(o) {
|
|
1768
1791
|
"@babel/helpers - typeof";
|
|
1769
1792
|
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o) {
|
|
@@ -1774,7 +1797,7 @@ function _typeof(o) {
|
|
|
1774
1797
|
}
|
|
1775
1798
|
var init_typeof = __esmMin((() => {}));
|
|
1776
1799
|
//#endregion
|
|
1777
|
-
//#region \0@oxc-project+runtime@0.
|
|
1800
|
+
//#region \0@oxc-project+runtime@0.154.0/helpers/esm/toPrimitive.js
|
|
1778
1801
|
function toPrimitive(t, r) {
|
|
1779
1802
|
if ("object" != _typeof(t) || !t) return t;
|
|
1780
1803
|
var e = t[Symbol.toPrimitive];
|
|
@@ -1789,7 +1812,7 @@ var init_toPrimitive = __esmMin((() => {
|
|
|
1789
1812
|
init_typeof();
|
|
1790
1813
|
}));
|
|
1791
1814
|
//#endregion
|
|
1792
|
-
//#region \0@oxc-project+runtime@0.
|
|
1815
|
+
//#region \0@oxc-project+runtime@0.154.0/helpers/esm/toPropertyKey.js
|
|
1793
1816
|
function toPropertyKey(t) {
|
|
1794
1817
|
var i = toPrimitive(t, "string");
|
|
1795
1818
|
return "symbol" == _typeof(i) ? i : i + "";
|
|
@@ -1799,7 +1822,7 @@ var init_toPropertyKey = __esmMin((() => {
|
|
|
1799
1822
|
init_toPrimitive();
|
|
1800
1823
|
}));
|
|
1801
1824
|
//#endregion
|
|
1802
|
-
//#region \0@oxc-project+runtime@0.
|
|
1825
|
+
//#region \0@oxc-project+runtime@0.154.0/helpers/esm/defineProperty.js
|
|
1803
1826
|
function _defineProperty(e, r, t) {
|
|
1804
1827
|
return (r = toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
|
|
1805
1828
|
value: t,
|
|
@@ -3249,7 +3272,7 @@ var init_tag_mapping = __esmMin((() => {
|
|
|
3249
3272
|
//#region src/version.ts
|
|
3250
3273
|
var VERSION;
|
|
3251
3274
|
var init_version = __esmMin((() => {
|
|
3252
|
-
VERSION = "2.4.
|
|
3275
|
+
VERSION = "2.4.1";
|
|
3253
3276
|
}));
|
|
3254
3277
|
//#endregion
|
|
3255
3278
|
//#region src/runtime/module-loader-browser.ts
|
|
@@ -3452,6 +3475,7 @@ async function getTagLib() {
|
|
|
3452
3475
|
//#endregion
|
|
3453
3476
|
//#region src/simple/with-audio-file.ts
|
|
3454
3477
|
init_errors();
|
|
3478
|
+
init_file();
|
|
3455
3479
|
async function withAudioFile(file, fn, options) {
|
|
3456
3480
|
const audioFile = await (await getTagLib()).open(file, options);
|
|
3457
3481
|
try {
|
|
@@ -3462,7 +3486,7 @@ async function withAudioFile(file, fn, options) {
|
|
|
3462
3486
|
}
|
|
3463
3487
|
}
|
|
3464
3488
|
async function withAudioFileSave(file, fn) {
|
|
3465
|
-
return withAudioFile(file, (audioFile) => {
|
|
3489
|
+
return withAudioFile(typeof file === "string" ? await readFileData(file) : file, (audioFile) => {
|
|
3466
3490
|
fn(audioFile);
|
|
3467
3491
|
if (!audioFile.save()) throw new FileOperationError("save", "Failed to save metadata changes. The file may be read-only or corrupted.");
|
|
3468
3492
|
return audioFile.getFileBuffer();
|
package/dist/rating.js
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export { RatingUtils, clamp, fromNormalized, fromPercent, fromPopm, fromStars, isValid, normalized, popm, toNormalized, toPercent, toPopm, toStars };
|
|
1
|
+
export { RatingUtils, clamp, fromNormalized, fromPercent, fromPopm, fromStars, isValid, normalized, popm, toNormalized, toPercent, toPopm, toStars } from "./utils/rating.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { MemoryError } from "../../errors/classes.js";
|
|
2
|
-
import _defineProperty from "../../_virtual/_@oxc-project_runtime@0.
|
|
2
|
+
import _defineProperty from "../../_virtual/_@oxc-project_runtime@0.154.0/helpers/esm/defineProperty.js";
|
|
3
3
|
import { WasmerExecutionError } from "../wasmer-sdk-loader/types.js";
|
|
4
4
|
import { WasiFileHandle } from "./file-handle.js";
|
|
5
5
|
import { openAudioPath } from "./path-open.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import _defineProperty from "../../_virtual/_@oxc-project_runtime@0.
|
|
1
|
+
import _defineProperty from "../../_virtual/_@oxc-project_runtime@0.154.0/helpers/esm/defineProperty.js";
|
|
2
2
|
import { WasmerExecutionError } from "../wasmer-sdk-loader/types.js";
|
|
3
3
|
import { createHandleState, destroy, getBuffer, isValid, loadBuffer, loadPath, save } from "./handle-state.js";
|
|
4
4
|
import { getAudioProperties, getFormat, isMP4 } from "./audio-properties.js";
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export { WasiToTagLibAdapter };
|
|
1
|
+
export { WasiToTagLibAdapter } from "./adapter.js";
|
|
@@ -2,7 +2,7 @@ import { FileOperationError, InvalidFormatError, UnsupportedFormatError } from "
|
|
|
2
2
|
import { decodeMessagePack } from "../../msgpack/decoder.js";
|
|
3
3
|
import { encodeTagData } from "../../msgpack/encoder.js";
|
|
4
4
|
import { WasmArena, WasmMemoryError } from "../wasi-memory.js";
|
|
5
|
-
import _usingCtx from "../../_virtual/_@oxc-project_runtime@0.
|
|
5
|
+
import _usingCtx from "../../_virtual/_@oxc-project_runtime@0.154.0/helpers/esm/usingCtx.js";
|
|
6
6
|
//#region src/runtime/wasi-adapter/wasm-io.ts
|
|
7
7
|
const TL_ERROR_INVALID_INPUT = -1;
|
|
8
8
|
const TL_ERROR_UNSUPPORTED_FORMAT = -2;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { TagLibError } from "../errors/base.js";
|
|
2
2
|
import { MemoryError } from "../errors/classes.js";
|
|
3
|
-
import _classPrivateFieldInitSpec from "../_virtual/_@oxc-project_runtime@0.
|
|
4
|
-
import _classPrivateFieldSet2 from "../_virtual/_@oxc-project_runtime@0.
|
|
5
|
-
import _classPrivateFieldGet2 from "../_virtual/_@oxc-project_runtime@0.
|
|
3
|
+
import _classPrivateFieldInitSpec from "../_virtual/_@oxc-project_runtime@0.154.0/helpers/esm/classPrivateFieldInitSpec.js";
|
|
4
|
+
import _classPrivateFieldSet2 from "../_virtual/_@oxc-project_runtime@0.154.0/helpers/esm/classPrivateFieldSet2.js";
|
|
5
|
+
import _classPrivateFieldGet2 from "../_virtual/_@oxc-project_runtime@0.154.0/helpers/esm/classPrivateFieldGet2.js";
|
|
6
6
|
//#region src/runtime/wasi-memory.ts
|
|
7
7
|
/**
|
|
8
8
|
* @fileoverview RAII Memory Management for WASI
|
|
@@ -11,6 +11,9 @@ export declare function readPictures(file: AudioFileInput): Promise<Picture[]>;
|
|
|
11
11
|
/**
|
|
12
12
|
* Replaces all embedded pictures in an audio file and returns the modified content as a buffer.
|
|
13
13
|
*
|
|
14
|
+
* The input is read, never written: a path is only where the bytes come from,
|
|
15
|
+
* so the file on disk is left untouched.
|
|
16
|
+
*
|
|
14
17
|
* @param file - File path, Uint8Array, ArrayBuffer, or File object
|
|
15
18
|
* @param pictures - Complete set of pictures to embed; replaces any existing pictures
|
|
16
19
|
* @returns Modified audio file contents with the updated picture set
|
|
@@ -22,6 +25,9 @@ export declare function applyPictures(file: AudioFileInput, pictures: Picture[])
|
|
|
22
25
|
/**
|
|
23
26
|
* Appends a single picture to an audio file's existing embedded pictures.
|
|
24
27
|
*
|
|
28
|
+
* The input is read, never written: a path is only where the bytes come from,
|
|
29
|
+
* so the file on disk is left untouched.
|
|
30
|
+
*
|
|
25
31
|
* @param file - File path, Uint8Array, ArrayBuffer, or File object
|
|
26
32
|
* @param picture - Picture to append to the file
|
|
27
33
|
* @returns Modified audio file contents with the new picture added
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"picture-operations.d.ts","sourceRoot":"","sources":["../../src/simple/picture-operations.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAGxE;;;;;;;GAOG;AACH,wBAAsB,YAAY,CAAC,IAAI,EAAE,cAAc,GAAG,OAAO,CAAC,OAAO,EAAE,CAAC,CAE3E;AAED
|
|
1
|
+
{"version":3,"file":"picture-operations.d.ts","sourceRoot":"","sources":["../../src/simple/picture-operations.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAGxE;;;;;;;GAOG;AACH,wBAAsB,YAAY,CAAC,IAAI,EAAE,cAAc,GAAG,OAAO,CAAC,OAAO,EAAE,CAAC,CAE3E;AAED;;;;;;;;;;;;GAYG;AACH,wBAAsB,aAAa,CACjC,IAAI,EAAE,cAAc,EACpB,QAAQ,EAAE,OAAO,EAAE,GAClB,OAAO,CAAC,UAAU,CAAC,CAIrB;AAED;;;;;;;;;;;;GAYG;AACH,wBAAsB,UAAU,CAC9B,IAAI,EAAE,cAAc,EACpB,OAAO,EAAE,OAAO,GACf,OAAO,CAAC,UAAU,CAAC,CAIrB;AAED;;;;;;;;GAQG;AACH,wBAAsB,aAAa,CAAC,IAAI,EAAE,cAAc,GAAG,OAAO,CAAC,UAAU,CAAC,CAE7E;AAED;;;;;;;GAOG;AACH,wBAAsB,YAAY,CAChC,IAAI,EAAE,cAAc,GACnB,OAAO,CAAC,UAAU,GAAG,SAAS,CAAC,CAYjC;AAED;;;;;;;;;;GAUG;AACH,wBAAsB,aAAa,CACjC,IAAI,EAAE,cAAc,EACpB,SAAS,EAAE,UAAU,EACrB,QAAQ,EAAE,MAAM,GACf,OAAO,CAAC,UAAU,CAAC,CAQrB;AAED;;;;;;GAMG;AACH,wBAAgB,iBAAiB,CAC/B,QAAQ,EAAE,OAAO,EAAE,EACnB,IAAI,EAAE,WAAW,GAChB,OAAO,GAAG,SAAS,CAErB;AAED;;;;;;;;;GASG;AACH,wBAAsB,oBAAoB,CACxC,IAAI,EAAE,cAAc,EACpB,UAAU,EAAE,OAAO,GAClB,OAAO,CAAC,UAAU,CAAC,CAUrB;AAED;;;;;;;GAOG;AACH,wBAAsB,mBAAmB,CAAC,IAAI,EAAE,cAAc,GAAG,OAAO,CACtE,KAAK,CAAC;IACJ,IAAI,EAAE,WAAW,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,IAAI,EAAE,MAAM,CAAC;CACd,CAAC,CACH,CAQA"}
|
|
@@ -14,6 +14,9 @@ async function readPictures(file) {
|
|
|
14
14
|
/**
|
|
15
15
|
* Replaces all embedded pictures in an audio file and returns the modified content as a buffer.
|
|
16
16
|
*
|
|
17
|
+
* The input is read, never written: a path is only where the bytes come from,
|
|
18
|
+
* so the file on disk is left untouched.
|
|
19
|
+
*
|
|
17
20
|
* @param file - File path, Uint8Array, ArrayBuffer, or File object
|
|
18
21
|
* @param pictures - Complete set of pictures to embed; replaces any existing pictures
|
|
19
22
|
* @returns Modified audio file contents with the updated picture set
|
|
@@ -29,6 +32,9 @@ async function applyPictures(file, pictures) {
|
|
|
29
32
|
/**
|
|
30
33
|
* Appends a single picture to an audio file's existing embedded pictures.
|
|
31
34
|
*
|
|
35
|
+
* The input is read, never written: a path is only where the bytes come from,
|
|
36
|
+
* so the file on disk is left untouched.
|
|
37
|
+
*
|
|
32
38
|
* @param file - File path, Uint8Array, ArrayBuffer, or File object
|
|
33
39
|
* @param picture - Picture to append to the file
|
|
34
40
|
* @returns Modified audio file contents with the new picture added
|
|
@@ -15,6 +15,10 @@ export declare function readTags(file: AudioFileInput, options?: {
|
|
|
15
15
|
/**
|
|
16
16
|
* Applies metadata tag changes to an audio file and returns the modified content as a buffer.
|
|
17
17
|
*
|
|
18
|
+
* The input is read, never written: a path is only where the bytes come from,
|
|
19
|
+
* so the file on disk is left untouched. Use {@link applyTagsToFile} for an
|
|
20
|
+
* in-place update.
|
|
21
|
+
*
|
|
18
22
|
* @param file - File path, Uint8Array, ArrayBuffer, or File object
|
|
19
23
|
* @param tags - Partial tag fields to merge with existing metadata
|
|
20
24
|
* @returns Modified audio file contents with updated tags
|
|
@@ -63,6 +67,9 @@ export declare function readFormat(file: AudioFileInput): Promise<FileType | und
|
|
|
63
67
|
/**
|
|
64
68
|
* Removes all metadata tags and pictures from an audio file and returns the stripped content.
|
|
65
69
|
*
|
|
70
|
+
* The input is read, never written: a path is only where the bytes come from,
|
|
71
|
+
* so the file on disk is left untouched.
|
|
72
|
+
*
|
|
66
73
|
* @param file - File path, Uint8Array, ArrayBuffer, or File object
|
|
67
74
|
* @returns Modified audio file contents with all tags and pictures cleared
|
|
68
75
|
* @throws {TagLibInitializationError} If the Wasm module fails to initialize
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tag-operations.d.ts","sourceRoot":"","sources":["../../src/simple/tag-operations.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,cAAc,EACd,eAAe,EACf,WAAW,EACX,QAAQ,EAER,QAAQ,EACT,MAAM,aAAa,CAAC;AAWrB;;;;;;;;;GASG;AACH,wBAAsB,QAAQ,CAC5B,IAAI,EAAE,cAAc,EACpB,OAAO,GAAE;IAAE,iBAAiB,CAAC,EAAE,MAAM,EAAE,CAAA;CAAO,GAC7C,OAAO,CAAC,WAAW,CAAC,CAItB;AAED
|
|
1
|
+
{"version":3,"file":"tag-operations.d.ts","sourceRoot":"","sources":["../../src/simple/tag-operations.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,cAAc,EACd,eAAe,EACf,WAAW,EACX,QAAQ,EAER,QAAQ,EACT,MAAM,aAAa,CAAC;AAWrB;;;;;;;;;GASG;AACH,wBAAsB,QAAQ,CAC5B,IAAI,EAAE,cAAc,EACpB,OAAO,GAAE;IAAE,iBAAiB,CAAC,EAAE,MAAM,EAAE,CAAA;CAAO,GAC7C,OAAO,CAAC,WAAW,CAAC,CAItB;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAsB,SAAS,CAC7B,IAAI,EAAE,cAAc,EACpB,IAAI,EAAE,OAAO,CAAC,QAAQ,CAAC,GACtB,OAAO,CAAC,UAAU,CAAC,CAIrB;AAED;;;;;;;;;;GAUG;AACH,wBAAsB,eAAe,CACnC,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,OAAO,CAAC,QAAQ,CAAC,GACtB,OAAO,CAAC,IAAI,CAAC,CAWf;AAED;;;;;;;;GAQG;AACH,wBAAsB,cAAc,CAClC,IAAI,EAAE,cAAc,GACnB,OAAO,CAAC,eAAe,CAAC,CAY1B;AAED;;;;;GAKG;AACH,wBAAsB,gBAAgB,CAAC,IAAI,EAAE,cAAc,GAAG,OAAO,CAAC,OAAO,CAAC,CAY7E;AAED;;;;;;GAMG;AACH,wBAAsB,UAAU,CAC9B,IAAI,EAAE,cAAc,GACnB,OAAO,CAAC,QAAQ,GAAG,SAAS,CAAC,CAW/B;AAED;;;;;;;;;;;GAWG;AACH,wBAAsB,SAAS,CAAC,IAAI,EAAE,cAAc,GAAG,OAAO,CAAC,UAAU,CAAC,CAsBzE"}
|
|
@@ -20,6 +20,10 @@ async function readTags(file, options = {}) {
|
|
|
20
20
|
/**
|
|
21
21
|
* Applies metadata tag changes to an audio file and returns the modified content as a buffer.
|
|
22
22
|
*
|
|
23
|
+
* The input is read, never written: a path is only where the bytes come from,
|
|
24
|
+
* so the file on disk is left untouched. Use {@link applyTagsToFile} for an
|
|
25
|
+
* in-place update.
|
|
26
|
+
*
|
|
23
27
|
* @param file - File path, Uint8Array, ArrayBuffer, or File object
|
|
24
28
|
* @param tags - Partial tag fields to merge with existing metadata
|
|
25
29
|
* @returns Modified audio file contents with updated tags
|
|
@@ -102,6 +106,9 @@ async function readFormat(file) {
|
|
|
102
106
|
/**
|
|
103
107
|
* Removes all metadata tags and pictures from an audio file and returns the stripped content.
|
|
104
108
|
*
|
|
109
|
+
* The input is read, never written: a path is only where the bytes come from,
|
|
110
|
+
* so the file on disk is left untouched.
|
|
111
|
+
*
|
|
105
112
|
* @param file - File path, Uint8Array, ArrayBuffer, or File object
|
|
106
113
|
* @returns Modified audio file contents with all tags and pictures cleared
|
|
107
114
|
* @throws {TagLibInitializationError} If the Wasm module fails to initialize
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"with-audio-file.d.ts","sourceRoot":"","sources":["../../src/simple/with-audio-file.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,mCAAmC,CAAC;AACnE,OAAO,KAAK,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"with-audio-file.d.ts","sourceRoot":"","sources":["../../src/simple/with-audio-file.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,mCAAmC,CAAC;AACnE,OAAO,KAAK,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAK/D,wBAAsB,aAAa,CAAC,CAAC,EACnC,IAAI,EAAE,cAAc,EACpB,EAAE,EAAE,CAAC,SAAS,EAAE,SAAS,KAAK,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,EAC5C,OAAO,CAAC,EAAE,WAAW,GACpB,OAAO,CAAC,CAAC,CAAC,CAaZ;AAED,wBAAsB,iBAAiB,CACrC,IAAI,EAAE,cAAc,EACpB,EAAE,EAAE,CAAC,SAAS,EAAE,SAAS,KAAK,IAAI,GACjC,OAAO,CAAC,UAAU,CAAC,CAoBrB;AAED,wBAAsB,uBAAuB,CAC3C,IAAI,EAAE,MAAM,EACZ,EAAE,EAAE,CAAC,SAAS,EAAE,SAAS,KAAK,IAAI,GACjC,OAAO,CAAC,IAAI,CAAC,CAKf"}
|