taglib-wasm 2.2.3 → 2.3.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 +1 -1
- package/README.md +206 -21
- package/dist/_virtual/_@oxc-project_runtime@0.152.0/helpers/esm/assertClassBrand.js +7 -0
- package/dist/_virtual/_@oxc-project_runtime@0.152.0/helpers/esm/checkPrivateRedeclaration.js +6 -0
- package/dist/_virtual/_@oxc-project_runtime@0.152.0/helpers/esm/classPrivateFieldGet2.js +7 -0
- package/dist/_virtual/_@oxc-project_runtime@0.152.0/helpers/esm/classPrivateFieldInitSpec.js +7 -0
- package/dist/_virtual/_@oxc-project_runtime@0.152.0/helpers/esm/classPrivateFieldSet2.js +7 -0
- package/dist/_virtual/_@oxc-project_runtime@0.152.0/helpers/esm/defineProperty.js +12 -0
- package/dist/_virtual/_@oxc-project_runtime@0.152.0/helpers/esm/toPrimitive.js +14 -0
- package/dist/_virtual/_@oxc-project_runtime@0.152.0/helpers/esm/toPropertyKey.js +9 -0
- package/dist/_virtual/_@oxc-project_runtime@0.152.0/helpers/esm/typeof.js +11 -0
- package/dist/_virtual/_@oxc-project_runtime@0.152.0/helpers/esm/usingCtx.js +57 -0
- package/dist/_virtual/_rolldown/runtime.js +13 -0
- package/dist/bwf/bext.d.ts.map +1 -0
- package/dist/bwf/bext.js +119 -0
- package/dist/{src/constants → constants}/additional-properties.d.ts.map +1 -1
- package/dist/constants/additional-properties.js +270 -0
- package/dist/constants/basic-properties.d.ts.map +1 -0
- package/dist/constants/basic-properties.js +128 -0
- package/dist/constants/complex-properties.d.ts.map +1 -0
- package/dist/constants/complex-properties.js +1 -0
- package/dist/constants/format-mappings.d.ts.map +1 -0
- package/dist/constants/format-mappings.js +58 -0
- package/dist/{src/constants → constants}/general-extended-properties.d.ts.map +1 -1
- package/dist/constants/general-extended-properties.js +272 -0
- package/dist/constants/index.d.ts.map +1 -0
- package/dist/constants/index.js +5 -0
- package/dist/{src/constants → constants}/properties.d.ts +1 -1
- package/dist/constants/properties.d.ts.map +1 -0
- package/dist/constants/properties.js +105 -0
- package/dist/constants/property-types.d.ts.map +1 -0
- package/dist/constants/property-types.js +1 -0
- package/dist/{src/constants → constants}/specialized-properties.d.ts.map +1 -1
- package/dist/constants/specialized-properties.js +335 -0
- package/dist/{src/constants → constants}/utilities.d.ts +1 -1
- package/dist/constants/utilities.d.ts.map +1 -0
- package/dist/constants/utilities.js +50 -0
- package/dist/constants.d.ts.map +1 -0
- package/dist/constants.js +5 -0
- package/dist/{src/deno-compile.d.ts → deno-compile.d.ts} +4 -2
- package/dist/deno-compile.d.ts.map +1 -0
- package/dist/deno-compile.js +109 -0
- package/dist/disc-folder.d.ts +4 -4
- package/dist/disc-folder.d.ts.map +1 -1
- package/dist/disc-folder.js +596 -544
- package/dist/errors/base.d.ts +38 -0
- package/dist/errors/base.d.ts.map +1 -0
- package/dist/errors/base.js +66 -0
- package/dist/errors/classes.d.ts.map +1 -0
- package/dist/errors/classes.js +164 -0
- package/dist/errors/guards.d.ts.map +1 -0
- package/dist/errors/guards.js +26 -0
- package/dist/errors/index.d.ts.map +1 -0
- package/dist/errors/index.js +4 -0
- package/dist/errors.d.ts.map +1 -0
- package/dist/errors.js +5 -0
- package/dist/file-utils/copy-and-find.d.ts.map +1 -0
- package/dist/file-utils/copy-and-find.js +107 -0
- package/dist/file-utils/export-operations.d.ts.map +1 -0
- package/dist/file-utils/export-operations.js +84 -0
- package/dist/file-utils/import-operations.d.ts.map +1 -0
- package/dist/file-utils/import-operations.js +109 -0
- package/dist/file-utils/index.d.ts.map +1 -0
- package/dist/file-utils/index.js +5 -0
- package/dist/file-utils/mime-detection.d.ts.map +1 -0
- package/dist/file-utils/mime-detection.js +44 -0
- package/dist/folder-api/album-corroborate.d.ts.map +1 -0
- package/dist/folder-api/album-corroborate.js +35 -0
- package/dist/folder-api/album-discs.d.ts.map +1 -0
- package/dist/folder-api/album-discs.js +119 -0
- package/dist/folder-api/album-grouping.d.ts.map +1 -0
- package/dist/folder-api/album-grouping.js +161 -0
- package/dist/folder-api/album-identity.d.ts.map +1 -0
- package/dist/folder-api/album-identity.js +165 -0
- package/dist/folder-api/album-types.d.ts.map +1 -0
- package/dist/folder-api/album-types.js +1 -0
- package/dist/folder-api/directory-walker.d.ts.map +1 -0
- package/dist/folder-api/directory-walker.js +27 -0
- package/dist/folder-api/file-processors.d.ts.map +1 -0
- package/dist/folder-api/file-processors.js +52 -0
- package/dist/folder-api/folder-disc.d.ts.map +1 -0
- package/dist/folder-api/folder-disc.js +166 -0
- package/dist/folder-api/folder-operations.d.ts.map +1 -0
- package/dist/folder-api/folder-operations.js +69 -0
- package/dist/folder-api/index.d.ts.map +1 -0
- package/dist/{src/folder-api → folder-api}/index.js +1 -8
- package/dist/folder-api/scan-for-albums.d.ts.map +1 -0
- package/dist/folder-api/scan-for-albums.js +25 -0
- package/dist/folder-api/scan-operations.d.ts.map +1 -0
- package/dist/folder-api/scan-operations.js +79 -0
- package/dist/folder-api/types.d.ts.map +1 -0
- package/dist/folder-api/types.js +21 -0
- package/dist/folder.d.ts +1 -1
- package/dist/folder.d.ts.map +1 -1
- package/dist/folder.js +7 -2
- package/dist/global.d.js +1 -0
- package/dist/index.browser.d.ts +40 -21
- package/dist/index.browser.d.ts.map +1 -1
- package/dist/index.browser.js +4194 -3656
- package/dist/index.d.ts +26 -25
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +40 -183
- package/dist/msgpack/decoder.d.ts.map +1 -0
- package/dist/msgpack/decoder.js +177 -0
- package/dist/msgpack/encoder.d.ts.map +1 -0
- package/dist/msgpack/encoder.js +211 -0
- package/dist/msgpack/index.d.ts.map +1 -0
- package/dist/msgpack/index.js +5 -0
- package/dist/{src/msgpack → msgpack}/types.d.ts +1 -1
- package/dist/msgpack/types.d.ts.map +1 -0
- package/dist/msgpack/types.js +13 -0
- package/dist/msgpack/utils.d.ts.map +1 -0
- package/dist/msgpack/utils.js +116 -0
- package/dist/rating.d.ts +1 -1
- package/dist/rating.d.ts.map +1 -1
- package/dist/rating.js +2 -2
- package/dist/runtime/deno-detect.d.ts.map +1 -0
- package/dist/runtime/deno-detect.js +12 -0
- package/dist/{src/runtime → runtime}/detector.d.ts +2 -0
- package/dist/runtime/detector.d.ts.map +1 -0
- package/dist/runtime/detector.js +173 -0
- package/dist/runtime/loader-types.d.ts.map +1 -0
- package/dist/runtime/loader-types.js +23 -0
- package/dist/runtime/module-loader-browser.d.ts.map +1 -0
- package/dist/runtime/module-loader-browser.js +33 -0
- package/dist/runtime/module-loader.d.ts.map +1 -0
- package/dist/runtime/module-loader.js +119 -0
- package/dist/runtime/platform-io.d.ts.map +1 -0
- package/dist/runtime/platform-io.js +153 -0
- package/dist/runtime/unified-loader/index.d.ts.map +1 -0
- package/dist/{src/runtime → runtime}/unified-loader/index.js +1 -7
- package/dist/runtime/unified-loader/loader.d.ts.map +1 -0
- package/dist/runtime/unified-loader/loader.js +64 -0
- package/dist/runtime/unified-loader/module-loading.d.ts.map +1 -0
- package/dist/runtime/unified-loader/module-loading.js +90 -0
- package/dist/runtime/unified-loader/module-selection.d.ts.map +1 -0
- package/dist/runtime/unified-loader/module-selection.js +25 -0
- package/dist/runtime/unified-loader/types.d.ts.map +1 -0
- package/dist/runtime/unified-loader/types.js +24 -0
- package/dist/{src/runtime → runtime}/wasi-adapter/adapter.d.ts +13 -1
- package/dist/runtime/wasi-adapter/adapter.d.ts.map +1 -0
- package/dist/runtime/wasi-adapter/adapter.js +114 -0
- package/dist/{src/runtime → runtime}/wasi-adapter/audio-properties.d.ts +4 -1
- package/dist/runtime/wasi-adapter/audio-properties.d.ts.map +1 -0
- package/dist/runtime/wasi-adapter/audio-properties.js +120 -0
- package/dist/runtime/wasi-adapter/file-handle.d.ts.map +1 -0
- package/dist/runtime/wasi-adapter/file-handle.js +181 -0
- package/dist/runtime/wasi-adapter/handle-state.d.ts.map +1 -0
- package/dist/runtime/wasi-adapter/handle-state.js +48 -0
- package/dist/runtime/wasi-adapter/index.d.ts.map +1 -0
- package/dist/{src/runtime → runtime}/wasi-adapter/index.js +1 -3
- package/dist/runtime/wasi-adapter/mp4-items.d.ts.map +1 -0
- package/dist/runtime/wasi-adapter/mp4-items.js +97 -0
- package/dist/runtime/wasi-adapter/path-open.d.ts +68 -0
- package/dist/runtime/wasi-adapter/path-open.d.ts.map +1 -0
- package/dist/runtime/wasi-adapter/path-open.js +101 -0
- package/dist/runtime/wasi-adapter/property-surface.d.ts.map +1 -0
- package/dist/runtime/wasi-adapter/property-surface.js +96 -0
- package/dist/runtime/wasi-adapter/structured-fields.d.ts.map +1 -0
- package/dist/runtime/wasi-adapter/structured-fields.js +144 -0
- package/dist/runtime/wasi-adapter/tag-keys.d.ts.map +1 -0
- package/dist/runtime/wasi-adapter/tag-keys.js +65 -0
- package/dist/runtime/wasi-adapter/wasm-io.d.ts.map +1 -0
- package/dist/runtime/wasi-adapter/wasm-io.js +154 -0
- package/dist/runtime/wasi-fs-deno.d.ts.map +1 -0
- package/dist/runtime/wasi-fs-deno.js +25 -0
- package/dist/runtime/wasi-fs-node.d.ts.map +1 -0
- package/dist/runtime/wasi-fs-node.js +58 -0
- package/dist/runtime/wasi-fs-provider.d.ts.map +1 -0
- package/dist/runtime/wasi-fs-provider.js +1 -0
- package/dist/runtime/wasi-host-loader.d.ts.map +1 -0
- package/dist/runtime/wasi-host-loader.js +101 -0
- package/dist/runtime/wasi-host.d.ts.map +1 -0
- package/dist/runtime/wasi-host.js +199 -0
- package/dist/runtime/wasi-memory.d.ts.map +1 -0
- package/dist/runtime/wasi-memory.js +179 -0
- package/dist/{src/runtime → runtime}/wasmer-sdk-loader/types.d.ts +13 -0
- package/dist/runtime/wasmer-sdk-loader/types.d.ts.map +1 -0
- package/dist/runtime/wasmer-sdk-loader/types.js +15 -0
- package/dist/simple/batch-operations.d.ts.map +1 -0
- package/dist/simple/batch-operations.js +245 -0
- package/dist/simple/checksum-operations.d.ts +25 -0
- package/dist/simple/checksum-operations.d.ts.map +1 -0
- package/dist/simple/checksum-operations.js +28 -0
- package/dist/simple/config.d.ts.map +1 -0
- package/dist/simple/config.js +17 -0
- package/dist/{src/simple → simple}/index.d.ts +2 -0
- package/dist/simple/index.d.ts.map +1 -0
- package/dist/simple/index.js +8 -0
- package/dist/simple/picture-operations.d.ts.map +1 -0
- package/dist/simple/picture-operations.js +132 -0
- package/dist/simple/tag-operations.d.ts.map +1 -0
- package/dist/simple/tag-operations.js +125 -0
- package/dist/simple/with-audio-file.d.ts.map +1 -0
- package/dist/simple/with-audio-file.js +28 -0
- package/dist/simple.browser.d.ts +2 -2
- package/dist/simple.browser.d.ts.map +1 -1
- package/dist/simple.browser.js +3462 -3425
- package/dist/simple.d.ts +1 -1
- package/dist/simple.d.ts.map +1 -1
- package/dist/simple.js +8 -2
- package/dist/taglib/audio-file-base.d.ts.map +1 -0
- package/dist/taglib/audio-file-base.js +166 -0
- package/dist/taglib/audio-file-bwf.d.ts.map +1 -0
- package/dist/taglib/audio-file-bwf.js +33 -0
- package/dist/taglib/audio-file-checksum.d.ts +47 -0
- package/dist/taglib/audio-file-checksum.d.ts.map +1 -0
- package/dist/taglib/audio-file-checksum.js +90 -0
- package/dist/{src/taglib → taglib}/audio-file-impl.d.ts +4 -0
- package/dist/taglib/audio-file-impl.d.ts.map +1 -0
- package/dist/taglib/audio-file-impl.js +234 -0
- package/dist/{src/taglib → taglib}/audio-file-interface.d.ts +17 -0
- package/dist/taglib/audio-file-interface.d.ts.map +1 -0
- package/dist/taglib/audio-file-interface.js +1 -0
- package/dist/taglib/auto-dispose.d.ts.map +1 -0
- package/dist/taglib/auto-dispose.js +34 -0
- package/dist/taglib/embind-adapter.d.ts.map +1 -0
- package/dist/taglib/embind-adapter.js +137 -0
- package/dist/taglib/extra-state-registry.d.ts.map +1 -0
- package/dist/taglib/extra-state-registry.js +72 -0
- package/dist/{src/taglib → taglib}/id3v2-frames.d.ts +0 -1
- package/dist/taglib/id3v2-frames.d.ts.map +1 -0
- package/dist/taglib/id3v2-frames.js +25 -0
- package/dist/taglib/index.d.ts.map +1 -0
- package/dist/taglib/index.js +7 -0
- package/dist/taglib/load-audio-data.d.ts.map +1 -0
- package/dist/taglib/load-audio-data.js +54 -0
- package/dist/taglib/media-ranges.d.ts +85 -0
- package/dist/taglib/media-ranges.d.ts.map +1 -0
- package/dist/taglib/media-ranges.js +309 -0
- package/dist/taglib/metadata-extent.d.ts +96 -0
- package/dist/taglib/metadata-extent.d.ts.map +1 -0
- package/dist/taglib/metadata-extent.js +394 -0
- package/dist/taglib/mp4-item-names.d.ts.map +1 -0
- package/dist/taglib/mp4-item-names.js +14 -0
- package/dist/taglib/mutable-tag-impl.d.ts.map +1 -0
- package/dist/taglib/mutable-tag-impl.js +81 -0
- package/dist/taglib/mutable-tag.d.ts.map +1 -0
- package/dist/taglib/mutable-tag.js +1 -0
- package/dist/taglib/save-reconstruct.d.ts.map +1 -0
- package/dist/taglib/save-reconstruct.js +53 -0
- package/dist/taglib/taglib-class.d.ts.map +1 -0
- package/dist/taglib/taglib-class.js +146 -0
- package/dist/taglib-wasi.wasm +0 -0
- package/dist/taglib-web.wasm +0 -0
- package/dist/taglib-wrapper.js +1 -1
- package/dist/taglib.d.ts.map +1 -0
- package/dist/taglib.js +7 -0
- package/dist/types/audio-formats.d.ts.map +1 -0
- package/dist/types/audio-formats.js +6 -0
- package/dist/types/bwf.d.ts.map +1 -0
- package/dist/types/bwf.js +1 -0
- package/dist/types/chapters.d.ts.map +1 -0
- package/dist/types/chapters.js +1 -0
- package/dist/types/config.d.ts.map +1 -0
- package/dist/types/config.js +1 -0
- package/dist/types/format-property-keys.d.ts.map +1 -0
- package/dist/types/format-property-keys.js +1 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/index.js +9 -0
- package/dist/types/metadata-mappings.d.ts.map +1 -0
- package/dist/types/metadata-mappings.js +323 -0
- package/dist/types/pictures.d.ts.map +1 -0
- package/dist/types/pictures.js +79 -0
- package/dist/types/tags.d.ts.map +1 -0
- package/dist/types/tags.js +1 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +5 -0
- package/dist/utils/file.d.ts.map +1 -0
- package/dist/utils/file.js +43 -0
- package/dist/utils/mirror-fields.d.ts.map +1 -0
- package/dist/utils/mirror-fields.js +107 -0
- package/dist/utils/node-fs.d.ts.map +1 -0
- package/dist/utils/node-fs.js +36 -0
- package/dist/utils/path.d.ts +26 -0
- package/dist/utils/path.d.ts.map +1 -0
- package/dist/utils/path.js +52 -0
- package/dist/utils/rating.d.ts.map +1 -0
- package/dist/utils/rating.js +150 -0
- package/dist/utils/tag-mapping.d.ts.map +1 -0
- package/dist/utils/tag-mapping.js +207 -0
- package/dist/utils/write.d.ts.map +1 -0
- package/dist/utils/write.js +18 -0
- package/dist/version.d.ts +2 -0
- package/dist/version.d.ts.map +1 -0
- package/dist/version.js +4 -0
- package/dist/{src/wasm.d.ts → wasm.d.ts} +9 -0
- package/dist/wasm.d.ts.map +1 -0
- package/dist/wasm.js +1 -0
- package/dist/web-utils/canvas.d.ts.map +1 -0
- package/dist/web-utils/canvas.js +97 -0
- package/dist/web-utils/data-url.d.ts.map +1 -0
- package/dist/web-utils/data-url.js +54 -0
- package/dist/web-utils/dom-integration.d.ts.map +1 -0
- package/dist/web-utils/dom-integration.js +105 -0
- package/dist/web-utils/index.d.ts.map +1 -0
- package/dist/web-utils/index.js +4 -0
- package/dist/web.browser.d.ts +13 -0
- package/dist/web.browser.d.ts.map +1 -0
- package/dist/web.browser.js +3387 -0
- package/dist/web.d.ts +1 -1
- package/dist/web.d.ts.map +1 -1
- package/dist/web.js +5 -2
- package/package.json +140 -97
- package/dist/src/bwf/bext.d.ts.map +0 -1
- package/dist/src/bwf/bext.js +0 -126
- package/dist/src/constants/additional-properties.js +0 -204
- package/dist/src/constants/basic-properties.d.ts.map +0 -1
- package/dist/src/constants/basic-properties.js +0 -89
- package/dist/src/constants/complex-properties.d.ts.map +0 -1
- package/dist/src/constants/complex-properties.js +0 -0
- package/dist/src/constants/format-mappings.d.ts.map +0 -1
- package/dist/src/constants/format-mappings.js +0 -54
- package/dist/src/constants/general-extended-properties.js +0 -254
- package/dist/src/constants/index.d.ts.map +0 -1
- package/dist/src/constants/index.js +0 -4
- package/dist/src/constants/properties.d.ts.map +0 -1
- package/dist/src/constants/properties.js +0 -95
- package/dist/src/constants/property-types.d.ts.map +0 -1
- package/dist/src/constants/property-types.js +0 -0
- package/dist/src/constants/specialized-properties.js +0 -223
- package/dist/src/constants/utilities.d.ts.map +0 -1
- package/dist/src/constants/utilities.js +0 -33
- package/dist/src/constants.d.ts.map +0 -1
- package/dist/src/constants.js +0 -1
- package/dist/src/deno-compile.d.ts.map +0 -1
- package/dist/src/deno-compile.js +0 -75
- package/dist/src/errors/base.d.ts +0 -23
- package/dist/src/errors/base.d.ts.map +0 -1
- package/dist/src/errors/base.js +0 -31
- package/dist/src/errors/classes.d.ts.map +0 -1
- package/dist/src/errors/classes.js +0 -170
- package/dist/src/errors/guards.d.ts.map +0 -1
- package/dist/src/errors/guards.js +0 -39
- package/dist/src/errors/index.d.ts.map +0 -1
- package/dist/src/errors/index.js +0 -39
- package/dist/src/errors.d.ts.map +0 -1
- package/dist/src/errors.js +0 -1
- package/dist/src/file-utils/copy-and-find.d.ts.map +0 -1
- package/dist/src/file-utils/copy-and-find.js +0 -89
- package/dist/src/file-utils/export-operations.d.ts.map +0 -1
- package/dist/src/file-utils/export-operations.js +0 -40
- package/dist/src/file-utils/import-operations.d.ts.map +0 -1
- package/dist/src/file-utils/import-operations.js +0 -42
- package/dist/src/file-utils/index.d.ts.map +0 -1
- package/dist/src/file-utils/index.js +0 -26
- package/dist/src/file-utils/mime-detection.d.ts.map +0 -1
- package/dist/src/file-utils/mime-detection.js +0 -45
- package/dist/src/folder-api/album-corroborate.d.ts.map +0 -1
- package/dist/src/folder-api/album-corroborate.js +0 -36
- package/dist/src/folder-api/album-discs.d.ts.map +0 -1
- package/dist/src/folder-api/album-discs.js +0 -122
- package/dist/src/folder-api/album-grouping.d.ts.map +0 -1
- package/dist/src/folder-api/album-grouping.js +0 -118
- package/dist/src/folder-api/album-identity.d.ts.map +0 -1
- package/dist/src/folder-api/album-identity.js +0 -151
- package/dist/src/folder-api/album-types.d.ts.map +0 -1
- package/dist/src/folder-api/album-types.js +0 -0
- package/dist/src/folder-api/directory-walker.d.ts.map +0 -1
- package/dist/src/folder-api/directory-walker.js +0 -35
- package/dist/src/folder-api/file-processors.d.ts.map +0 -1
- package/dist/src/folder-api/file-processors.js +0 -63
- package/dist/src/folder-api/folder-disc.d.ts.map +0 -1
- package/dist/src/folder-api/folder-disc.js +0 -169
- package/dist/src/folder-api/folder-operations.d.ts.map +0 -1
- package/dist/src/folder-api/folder-operations.js +0 -54
- package/dist/src/folder-api/index.d.ts.map +0 -1
- package/dist/src/folder-api/scan-for-albums.d.ts.map +0 -1
- package/dist/src/folder-api/scan-for-albums.js +0 -20
- package/dist/src/folder-api/scan-operations.d.ts.map +0 -1
- package/dist/src/folder-api/scan-operations.js +0 -77
- package/dist/src/folder-api/types.d.ts.map +0 -1
- package/dist/src/folder-api/types.js +0 -21
- package/dist/src/msgpack/decoder.d.ts.map +0 -1
- package/dist/src/msgpack/decoder.js +0 -215
- package/dist/src/msgpack/encoder.d.ts.map +0 -1
- package/dist/src/msgpack/encoder.js +0 -249
- package/dist/src/msgpack/index.d.ts.map +0 -1
- package/dist/src/msgpack/index.js +0 -56
- package/dist/src/msgpack/types.d.ts.map +0 -1
- package/dist/src/msgpack/types.js +0 -12
- package/dist/src/msgpack/utils.d.ts.map +0 -1
- package/dist/src/msgpack/utils.js +0 -134
- package/dist/src/runtime/deno-detect.d.ts.map +0 -1
- package/dist/src/runtime/deno-detect.js +0 -6
- package/dist/src/runtime/detector.d.ts.map +0 -1
- package/dist/src/runtime/detector.js +0 -181
- package/dist/src/runtime/loader-types.d.ts.map +0 -1
- package/dist/src/runtime/loader-types.js +0 -10
- package/dist/src/runtime/module-loader-browser.d.ts.map +0 -1
- package/dist/src/runtime/module-loader-browser.js +0 -37
- package/dist/src/runtime/module-loader.d.ts.map +0 -1
- package/dist/src/runtime/module-loader.js +0 -119
- package/dist/src/runtime/platform-io.d.ts.map +0 -1
- package/dist/src/runtime/platform-io.js +0 -188
- package/dist/src/runtime/unified-loader/index.d.ts.map +0 -1
- package/dist/src/runtime/unified-loader/loader.d.ts.map +0 -1
- package/dist/src/runtime/unified-loader/loader.js +0 -84
- package/dist/src/runtime/unified-loader/module-loading.d.ts.map +0 -1
- package/dist/src/runtime/unified-loader/module-loading.js +0 -122
- package/dist/src/runtime/unified-loader/module-selection.d.ts.map +0 -1
- package/dist/src/runtime/unified-loader/module-selection.js +0 -41
- package/dist/src/runtime/unified-loader/types.d.ts.map +0 -1
- package/dist/src/runtime/unified-loader/types.js +0 -25
- package/dist/src/runtime/wasi-adapter/adapter.d.ts.map +0 -1
- package/dist/src/runtime/wasi-adapter/adapter.js +0 -113
- package/dist/src/runtime/wasi-adapter/audio-properties.d.ts.map +0 -1
- package/dist/src/runtime/wasi-adapter/audio-properties.js +0 -85
- package/dist/src/runtime/wasi-adapter/file-handle.d.ts.map +0 -1
- package/dist/src/runtime/wasi-adapter/file-handle.js +0 -197
- package/dist/src/runtime/wasi-adapter/handle-state.d.ts.map +0 -1
- package/dist/src/runtime/wasi-adapter/handle-state.js +0 -58
- package/dist/src/runtime/wasi-adapter/index.d.ts.map +0 -1
- package/dist/src/runtime/wasi-adapter/mp4-items.d.ts.map +0 -1
- package/dist/src/runtime/wasi-adapter/mp4-items.js +0 -80
- package/dist/src/runtime/wasi-adapter/property-surface.d.ts.map +0 -1
- package/dist/src/runtime/wasi-adapter/property-surface.js +0 -104
- package/dist/src/runtime/wasi-adapter/structured-fields.d.ts.map +0 -1
- package/dist/src/runtime/wasi-adapter/structured-fields.js +0 -139
- package/dist/src/runtime/wasi-adapter/tag-keys.d.ts.map +0 -1
- package/dist/src/runtime/wasi-adapter/tag-keys.js +0 -46
- package/dist/src/runtime/wasi-adapter/wasm-io.d.ts.map +0 -1
- package/dist/src/runtime/wasi-adapter/wasm-io.js +0 -249
- package/dist/src/runtime/wasi-fs-deno.d.ts.map +0 -1
- package/dist/src/runtime/wasi-fs-deno.js +0 -26
- package/dist/src/runtime/wasi-fs-node.d.ts.map +0 -1
- package/dist/src/runtime/wasi-fs-node.js +0 -66
- package/dist/src/runtime/wasi-fs-provider.d.ts.map +0 -1
- package/dist/src/runtime/wasi-fs-provider.js +0 -0
- package/dist/src/runtime/wasi-host-loader.d.ts.map +0 -1
- package/dist/src/runtime/wasi-host-loader.js +0 -109
- package/dist/src/runtime/wasi-host.d.ts.map +0 -1
- package/dist/src/runtime/wasi-host.js +0 -202
- package/dist/src/runtime/wasi-memory.d.ts.map +0 -1
- package/dist/src/runtime/wasi-memory.js +0 -197
- package/dist/src/runtime/wasmer-sdk-loader/types.d.ts.map +0 -1
- package/dist/src/runtime/wasmer-sdk-loader/types.js +0 -12
- package/dist/src/simple/batch-operations.d.ts.map +0 -1
- package/dist/src/simple/batch-operations.js +0 -186
- package/dist/src/simple/config.d.ts.map +0 -1
- package/dist/src/simple/config.js +0 -18
- package/dist/src/simple/index.d.ts.map +0 -1
- package/dist/src/simple/index.js +0 -58
- package/dist/src/simple/picture-operations.d.ts.map +0 -1
- package/dist/src/simple/picture-operations.js +0 -68
- package/dist/src/simple/tag-operations.d.ts.map +0 -1
- package/dist/src/simple/tag-operations.js +0 -90
- package/dist/src/simple/with-audio-file.d.ts.map +0 -1
- package/dist/src/simple/with-audio-file.js +0 -39
- package/dist/src/taglib/audio-file-base.d.ts.map +0 -1
- package/dist/src/taglib/audio-file-base.js +0 -187
- package/dist/src/taglib/audio-file-bwf.d.ts.map +0 -1
- package/dist/src/taglib/audio-file-bwf.js +0 -41
- package/dist/src/taglib/audio-file-impl.d.ts.map +0 -1
- package/dist/src/taglib/audio-file-impl.js +0 -285
- package/dist/src/taglib/audio-file-interface.d.ts.map +0 -1
- package/dist/src/taglib/audio-file-interface.js +0 -0
- package/dist/src/taglib/auto-dispose.d.ts.map +0 -1
- package/dist/src/taglib/auto-dispose.js +0 -13
- package/dist/src/taglib/embind-adapter.d.ts.map +0 -1
- package/dist/src/taglib/embind-adapter.js +0 -141
- package/dist/src/taglib/extra-state-registry.d.ts.map +0 -1
- package/dist/src/taglib/extra-state-registry.js +0 -78
- package/dist/src/taglib/id3v2-frames.d.ts.map +0 -1
- package/dist/src/taglib/id3v2-frames.js +0 -42
- package/dist/src/taglib/index.d.ts.map +0 -1
- package/dist/src/taglib/index.js +0 -41
- package/dist/src/taglib/load-audio-data.d.ts.map +0 -1
- package/dist/src/taglib/load-audio-data.js +0 -51
- package/dist/src/taglib/metadata-extent.d.ts +0 -41
- package/dist/src/taglib/metadata-extent.d.ts.map +0 -1
- package/dist/src/taglib/metadata-extent.js +0 -171
- package/dist/src/taglib/mp4-item-names.d.ts.map +0 -1
- package/dist/src/taglib/mp4-item-names.js +0 -4
- package/dist/src/taglib/mutable-tag-impl.d.ts.map +0 -1
- package/dist/src/taglib/mutable-tag-impl.js +0 -88
- package/dist/src/taglib/mutable-tag.d.ts.map +0 -1
- package/dist/src/taglib/mutable-tag.js +0 -0
- package/dist/src/taglib/save-reconstruct.d.ts.map +0 -1
- package/dist/src/taglib/save-reconstruct.js +0 -43
- package/dist/src/taglib/taglib-class.d.ts.map +0 -1
- package/dist/src/taglib/taglib-class.js +0 -206
- package/dist/src/taglib.d.ts.map +0 -1
- package/dist/src/taglib.js +0 -1
- package/dist/src/types/audio-formats.d.ts.map +0 -1
- package/dist/src/types/audio-formats.js +0 -6
- package/dist/src/types/bwf.d.ts.map +0 -1
- package/dist/src/types/bwf.js +0 -0
- package/dist/src/types/chapters.d.ts.map +0 -1
- package/dist/src/types/chapters.js +0 -0
- package/dist/src/types/config.d.ts.map +0 -1
- package/dist/src/types/config.js +0 -0
- package/dist/src/types/format-property-keys.d.ts.map +0 -1
- package/dist/src/types/format-property-keys.js +0 -0
- package/dist/src/types/index.d.ts.map +0 -1
- package/dist/src/types/index.js +0 -8
- package/dist/src/types/metadata-mappings.d.ts.map +0 -1
- package/dist/src/types/metadata-mappings.js +0 -252
- package/dist/src/types/pictures.d.ts.map +0 -1
- package/dist/src/types/pictures.js +0 -64
- package/dist/src/types/tags.d.ts.map +0 -1
- package/dist/src/types/tags.js +0 -0
- package/dist/src/types.d.ts.map +0 -1
- package/dist/src/types.js +0 -1
- package/dist/src/utils/file.d.ts.map +0 -1
- package/dist/src/utils/file.js +0 -52
- package/dist/src/utils/mirror-fields.d.ts.map +0 -1
- package/dist/src/utils/mirror-fields.js +0 -75
- package/dist/src/utils/node-fs.d.ts.map +0 -1
- package/dist/src/utils/node-fs.js +0 -22
- package/dist/src/utils/path.d.ts +0 -14
- package/dist/src/utils/path.d.ts.map +0 -1
- package/dist/src/utils/path.js +0 -17
- package/dist/src/utils/rating.d.ts.map +0 -1
- package/dist/src/utils/rating.js +0 -73
- package/dist/src/utils/tag-mapping.d.ts.map +0 -1
- package/dist/src/utils/tag-mapping.js +0 -214
- package/dist/src/utils/write.d.ts.map +0 -1
- package/dist/src/utils/write.js +0 -17
- package/dist/src/version.d.ts +0 -2
- package/dist/src/version.d.ts.map +0 -1
- package/dist/src/version.js +0 -4
- package/dist/src/wasm.d.ts.map +0 -1
- package/dist/src/wasm.js +0 -0
- package/dist/src/web-utils/canvas.d.ts.map +0 -1
- package/dist/src/web-utils/canvas.js +0 -60
- package/dist/src/web-utils/data-url.d.ts.map +0 -1
- package/dist/src/web-utils/data-url.js +0 -34
- package/dist/src/web-utils/dom-integration.d.ts.map +0 -1
- package/dist/src/web-utils/dom-integration.js +0 -53
- package/dist/src/web-utils/index.d.ts.map +0 -1
- package/dist/src/web-utils/index.js +0 -21
- /package/dist/{src/bwf → bwf}/bext.d.ts +0 -0
- /package/dist/{src/constants → constants}/additional-properties.d.ts +0 -0
- /package/dist/{src/constants → constants}/basic-properties.d.ts +0 -0
- /package/dist/{src/constants → constants}/complex-properties.d.ts +0 -0
- /package/dist/{src/constants → constants}/format-mappings.d.ts +0 -0
- /package/dist/{src/constants → constants}/general-extended-properties.d.ts +0 -0
- /package/dist/{src/constants → constants}/index.d.ts +0 -0
- /package/dist/{src/constants → constants}/property-types.d.ts +0 -0
- /package/dist/{src/constants → constants}/specialized-properties.d.ts +0 -0
- /package/dist/{src/constants.d.ts → constants.d.ts} +0 -0
- /package/dist/{src/errors → errors}/classes.d.ts +0 -0
- /package/dist/{src/errors → errors}/guards.d.ts +0 -0
- /package/dist/{src/errors → errors}/index.d.ts +0 -0
- /package/dist/{src/errors.d.ts → errors.d.ts} +0 -0
- /package/dist/{src/file-utils → file-utils}/copy-and-find.d.ts +0 -0
- /package/dist/{src/file-utils → file-utils}/export-operations.d.ts +0 -0
- /package/dist/{src/file-utils → file-utils}/import-operations.d.ts +0 -0
- /package/dist/{src/file-utils → file-utils}/index.d.ts +0 -0
- /package/dist/{src/file-utils → file-utils}/mime-detection.d.ts +0 -0
- /package/dist/{src/folder-api → folder-api}/album-corroborate.d.ts +0 -0
- /package/dist/{src/folder-api → folder-api}/album-discs.d.ts +0 -0
- /package/dist/{src/folder-api → folder-api}/album-grouping.d.ts +0 -0
- /package/dist/{src/folder-api → folder-api}/album-identity.d.ts +0 -0
- /package/dist/{src/folder-api → folder-api}/album-types.d.ts +0 -0
- /package/dist/{src/folder-api → folder-api}/directory-walker.d.ts +0 -0
- /package/dist/{src/folder-api → folder-api}/file-processors.d.ts +0 -0
- /package/dist/{src/folder-api → folder-api}/folder-disc.d.ts +0 -0
- /package/dist/{src/folder-api → folder-api}/folder-operations.d.ts +0 -0
- /package/dist/{src/folder-api → folder-api}/index.d.ts +0 -0
- /package/dist/{src/folder-api → folder-api}/scan-for-albums.d.ts +0 -0
- /package/dist/{src/folder-api → folder-api}/scan-operations.d.ts +0 -0
- /package/dist/{src/folder-api → folder-api}/types.d.ts +0 -0
- /package/dist/{src/msgpack → msgpack}/decoder.d.ts +0 -0
- /package/dist/{src/msgpack → msgpack}/encoder.d.ts +0 -0
- /package/dist/{src/msgpack → msgpack}/index.d.ts +0 -0
- /package/dist/{src/msgpack → msgpack}/utils.d.ts +0 -0
- /package/dist/{src/runtime → runtime}/deno-detect.d.ts +0 -0
- /package/dist/{src/runtime → runtime}/loader-types.d.ts +0 -0
- /package/dist/{src/runtime → runtime}/module-loader-browser.d.ts +0 -0
- /package/dist/{src/runtime → runtime}/module-loader.d.ts +0 -0
- /package/dist/{src/runtime → runtime}/platform-io.d.ts +0 -0
- /package/dist/{src/runtime → runtime}/unified-loader/index.d.ts +0 -0
- /package/dist/{src/runtime → runtime}/unified-loader/loader.d.ts +0 -0
- /package/dist/{src/runtime → runtime}/unified-loader/module-loading.d.ts +0 -0
- /package/dist/{src/runtime → runtime}/unified-loader/module-selection.d.ts +0 -0
- /package/dist/{src/runtime → runtime}/unified-loader/types.d.ts +0 -0
- /package/dist/{src/runtime → runtime}/wasi-adapter/file-handle.d.ts +0 -0
- /package/dist/{src/runtime → runtime}/wasi-adapter/handle-state.d.ts +0 -0
- /package/dist/{src/runtime → runtime}/wasi-adapter/index.d.ts +0 -0
- /package/dist/{src/runtime → runtime}/wasi-adapter/mp4-items.d.ts +0 -0
- /package/dist/{src/runtime → runtime}/wasi-adapter/property-surface.d.ts +0 -0
- /package/dist/{src/runtime → runtime}/wasi-adapter/structured-fields.d.ts +0 -0
- /package/dist/{src/runtime → runtime}/wasi-adapter/tag-keys.d.ts +0 -0
- /package/dist/{src/runtime → runtime}/wasi-adapter/wasm-io.d.ts +0 -0
- /package/dist/{src/runtime → runtime}/wasi-fs-deno.d.ts +0 -0
- /package/dist/{src/runtime → runtime}/wasi-fs-node.d.ts +0 -0
- /package/dist/{src/runtime → runtime}/wasi-fs-provider.d.ts +0 -0
- /package/dist/{src/runtime → runtime}/wasi-host-loader.d.ts +0 -0
- /package/dist/{src/runtime → runtime}/wasi-host.d.ts +0 -0
- /package/dist/{src/runtime → runtime}/wasi-memory.d.ts +0 -0
- /package/dist/{src/simple → simple}/batch-operations.d.ts +0 -0
- /package/dist/{src/simple → simple}/config.d.ts +0 -0
- /package/dist/{src/simple → simple}/picture-operations.d.ts +0 -0
- /package/dist/{src/simple → simple}/tag-operations.d.ts +0 -0
- /package/dist/{src/simple → simple}/with-audio-file.d.ts +0 -0
- /package/dist/{src/taglib → taglib}/audio-file-base.d.ts +0 -0
- /package/dist/{src/taglib → taglib}/audio-file-bwf.d.ts +0 -0
- /package/dist/{src/taglib → taglib}/auto-dispose.d.ts +0 -0
- /package/dist/{src/taglib → taglib}/embind-adapter.d.ts +0 -0
- /package/dist/{src/taglib → taglib}/extra-state-registry.d.ts +0 -0
- /package/dist/{src/taglib → taglib}/index.d.ts +0 -0
- /package/dist/{src/taglib → taglib}/load-audio-data.d.ts +0 -0
- /package/dist/{src/taglib → taglib}/mp4-item-names.d.ts +0 -0
- /package/dist/{src/taglib → taglib}/mutable-tag-impl.d.ts +0 -0
- /package/dist/{src/taglib → taglib}/mutable-tag.d.ts +0 -0
- /package/dist/{src/taglib → taglib}/save-reconstruct.d.ts +0 -0
- /package/dist/{src/taglib → taglib}/taglib-class.d.ts +0 -0
- /package/dist/{src/taglib.d.ts → taglib.d.ts} +0 -0
- /package/dist/{src/types → types}/audio-formats.d.ts +0 -0
- /package/dist/{src/types → types}/bwf.d.ts +0 -0
- /package/dist/{src/types → types}/chapters.d.ts +0 -0
- /package/dist/{src/types → types}/config.d.ts +0 -0
- /package/dist/{src/types → types}/format-property-keys.d.ts +0 -0
- /package/dist/{src/types → types}/index.d.ts +0 -0
- /package/dist/{src/types → types}/metadata-mappings.d.ts +0 -0
- /package/dist/{src/types → types}/pictures.d.ts +0 -0
- /package/dist/{src/types → types}/tags.d.ts +0 -0
- /package/dist/{src/types.d.ts → types.d.ts} +0 -0
- /package/dist/{src/utils → utils}/file.d.ts +0 -0
- /package/dist/{src/utils → utils}/mirror-fields.d.ts +0 -0
- /package/dist/{src/utils → utils}/node-fs.d.ts +0 -0
- /package/dist/{src/utils → utils}/rating.d.ts +0 -0
- /package/dist/{src/utils → utils}/tag-mapping.d.ts +0 -0
- /package/dist/{src/utils → utils}/write.d.ts +0 -0
- /package/dist/{src/web-utils → web-utils}/canvas.d.ts +0 -0
- /package/dist/{src/web-utils → web-utils}/data-url.d.ts +0 -0
- /package/dist/{src/web-utils → web-utils}/dom-integration.d.ts +0 -0
- /package/dist/{src/web-utils → web-utils}/index.d.ts +0 -0
|
@@ -1,223 +0,0 @@
|
|
|
1
|
-
const SPECIALIZED_PROPERTIES = {
|
|
2
|
-
// MusicBrainz Identifiers
|
|
3
|
-
musicbrainzArtistId: {
|
|
4
|
-
key: "MUSICBRAINZ_ARTISTID",
|
|
5
|
-
description: "MusicBrainz Artist ID (UUID)",
|
|
6
|
-
type: "string",
|
|
7
|
-
supportedFormats: ["ID3v2", "MP4", "Vorbis"],
|
|
8
|
-
mappings: {
|
|
9
|
-
id3v2: { frame: "TXXX", description: "MusicBrainz Artist Id" },
|
|
10
|
-
vorbis: "MUSICBRAINZ_ARTISTID",
|
|
11
|
-
mp4: "----:com.apple.iTunes:MusicBrainz Artist Id"
|
|
12
|
-
}
|
|
13
|
-
},
|
|
14
|
-
musicbrainzReleaseId: {
|
|
15
|
-
key: "MUSICBRAINZ_ALBUMID",
|
|
16
|
-
description: "MusicBrainz Release ID (UUID)",
|
|
17
|
-
type: "string",
|
|
18
|
-
supportedFormats: ["ID3v2", "MP4", "Vorbis"],
|
|
19
|
-
mappings: {
|
|
20
|
-
id3v2: { frame: "TXXX", description: "MusicBrainz Album Id" },
|
|
21
|
-
vorbis: "MUSICBRAINZ_ALBUMID",
|
|
22
|
-
mp4: "----:com.apple.iTunes:MusicBrainz Album Id"
|
|
23
|
-
}
|
|
24
|
-
},
|
|
25
|
-
musicbrainzTrackId: {
|
|
26
|
-
key: "MUSICBRAINZ_TRACKID",
|
|
27
|
-
description: "MusicBrainz Recording ID (UUID)",
|
|
28
|
-
type: "string",
|
|
29
|
-
supportedFormats: ["ID3v2", "MP4", "Vorbis"],
|
|
30
|
-
mappings: {
|
|
31
|
-
id3v2: { frame: "UFID", description: "http://musicbrainz.org" },
|
|
32
|
-
vorbis: "MUSICBRAINZ_TRACKID",
|
|
33
|
-
mp4: "----:com.apple.iTunes:MusicBrainz Track Id"
|
|
34
|
-
}
|
|
35
|
-
},
|
|
36
|
-
musicbrainzReleaseGroupId: {
|
|
37
|
-
key: "MUSICBRAINZ_RELEASEGROUPID",
|
|
38
|
-
description: "MusicBrainz Release Group ID (UUID)",
|
|
39
|
-
type: "string",
|
|
40
|
-
supportedFormats: ["ID3v2", "MP4", "Vorbis"],
|
|
41
|
-
mappings: {
|
|
42
|
-
id3v2: { frame: "TXXX", description: "MusicBrainz Release Group Id" },
|
|
43
|
-
vorbis: "MUSICBRAINZ_RELEASEGROUPID",
|
|
44
|
-
mp4: "----:com.apple.iTunes:MusicBrainz Release Group Id"
|
|
45
|
-
}
|
|
46
|
-
},
|
|
47
|
-
releaseType: {
|
|
48
|
-
key: "RELEASETYPE",
|
|
49
|
-
description: "Release type (album, single, EP, compilation, ...). Multi-value (e.g. 'album' + 'EP'). TagLib 2.3.2 translates the RELEASETYPE key per format: ID3v2 TXXX 'MUSICBRAINZ ALBUM TYPE' (TagLib's description casing), MP4 freeform atom, APEv2 MUSICBRAINZ_ALBUMTYPE, ASF 'MusicBrainz/Album Type', Vorbis/Matroska raw RELEASETYPE",
|
|
50
|
-
type: "string",
|
|
51
|
-
supportedFormats: [
|
|
52
|
-
"ID3v2",
|
|
53
|
-
"MP4",
|
|
54
|
-
"Vorbis",
|
|
55
|
-
"APE",
|
|
56
|
-
"ASF",
|
|
57
|
-
"Matroska"
|
|
58
|
-
],
|
|
59
|
-
mappings: {
|
|
60
|
-
id3v2: { frame: "TXXX", description: "MusicBrainz Album Type" },
|
|
61
|
-
vorbis: "RELEASETYPE",
|
|
62
|
-
mp4: "----:com.apple.iTunes:MusicBrainz Album Type"
|
|
63
|
-
}
|
|
64
|
-
},
|
|
65
|
-
releaseCountry: {
|
|
66
|
-
key: "RELEASECOUNTRY",
|
|
67
|
-
description: "Release country (ISO 3166-1 code, e.g. 'US'). TagLib 2.3.2 translates the RELEASECOUNTRY key per format: ID3v2 TXXX 'MUSICBRAINZ ALBUM RELEASE COUNTRY' (TagLib's description casing; an uppercase TXXX:RELEASECOUNTRY description also reads back), MP4 freeform atom 'MusicBrainz Album Release Country', APEv2 raw RELEASECOUNTRY, ASF 'MusicBrainz/Album Release Country', WAV ICNT, Vorbis/Matroska raw RELEASECOUNTRY",
|
|
68
|
-
type: "string",
|
|
69
|
-
supportedFormats: [
|
|
70
|
-
"ID3v2",
|
|
71
|
-
"MP4",
|
|
72
|
-
"Vorbis",
|
|
73
|
-
"APE",
|
|
74
|
-
"ASF",
|
|
75
|
-
"Matroska",
|
|
76
|
-
"WAV"
|
|
77
|
-
],
|
|
78
|
-
mappings: {
|
|
79
|
-
id3v2: {
|
|
80
|
-
frame: "TXXX",
|
|
81
|
-
description: "MusicBrainz Album Release Country"
|
|
82
|
-
},
|
|
83
|
-
vorbis: "RELEASECOUNTRY",
|
|
84
|
-
mp4: "----:com.apple.iTunes:MusicBrainz Album Release Country"
|
|
85
|
-
}
|
|
86
|
-
},
|
|
87
|
-
itunesAdvisory: {
|
|
88
|
-
key: "ITUNESADVISORY",
|
|
89
|
-
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",
|
|
90
|
-
type: "string",
|
|
91
|
-
supportedFormats: ["ID3v2", "MP4", "Vorbis", "APE", "ASF"],
|
|
92
|
-
mappings: {
|
|
93
|
-
id3v2: { frame: "TXXX", description: "ITUNESADVISORY" },
|
|
94
|
-
vorbis: "ITUNESADVISORY",
|
|
95
|
-
mp4: "----:com.apple.iTunes:ITUNESADVISORY"
|
|
96
|
-
}
|
|
97
|
-
},
|
|
98
|
-
// ReplayGain Properties
|
|
99
|
-
replayGainTrackGain: {
|
|
100
|
-
key: "REPLAYGAIN_TRACK_GAIN",
|
|
101
|
-
description: "ReplayGain track gain in dB (e.g., '-6.54 dB')",
|
|
102
|
-
type: "string",
|
|
103
|
-
supportedFormats: ["ID3v2", "MP4", "Vorbis"],
|
|
104
|
-
mappings: {
|
|
105
|
-
id3v2: { frame: "TXXX", description: "ReplayGain_Track_Gain" },
|
|
106
|
-
vorbis: "REPLAYGAIN_TRACK_GAIN",
|
|
107
|
-
mp4: "----:com.apple.iTunes:replaygain_track_gain"
|
|
108
|
-
}
|
|
109
|
-
},
|
|
110
|
-
replayGainTrackPeak: {
|
|
111
|
-
key: "REPLAYGAIN_TRACK_PEAK",
|
|
112
|
-
description: "ReplayGain track peak value (0.0-1.0)",
|
|
113
|
-
type: "string",
|
|
114
|
-
supportedFormats: ["ID3v2", "MP4", "Vorbis"],
|
|
115
|
-
mappings: {
|
|
116
|
-
id3v2: { frame: "TXXX", description: "ReplayGain_Track_Peak" },
|
|
117
|
-
vorbis: "REPLAYGAIN_TRACK_PEAK",
|
|
118
|
-
mp4: "----:com.apple.iTunes:replaygain_track_peak"
|
|
119
|
-
}
|
|
120
|
-
},
|
|
121
|
-
replayGainAlbumGain: {
|
|
122
|
-
key: "REPLAYGAIN_ALBUM_GAIN",
|
|
123
|
-
description: "ReplayGain album gain in dB",
|
|
124
|
-
type: "string",
|
|
125
|
-
supportedFormats: ["ID3v2", "MP4", "Vorbis"],
|
|
126
|
-
mappings: {
|
|
127
|
-
id3v2: { frame: "TXXX", description: "ReplayGain_Album_Gain" },
|
|
128
|
-
vorbis: "REPLAYGAIN_ALBUM_GAIN",
|
|
129
|
-
mp4: "----:com.apple.iTunes:replaygain_album_gain"
|
|
130
|
-
}
|
|
131
|
-
},
|
|
132
|
-
replayGainAlbumPeak: {
|
|
133
|
-
key: "REPLAYGAIN_ALBUM_PEAK",
|
|
134
|
-
description: "ReplayGain album peak value (0.0-1.0)",
|
|
135
|
-
type: "string",
|
|
136
|
-
supportedFormats: ["ID3v2", "MP4", "Vorbis"],
|
|
137
|
-
mappings: {
|
|
138
|
-
id3v2: { frame: "TXXX", description: "ReplayGain_Album_Peak" },
|
|
139
|
-
vorbis: "REPLAYGAIN_ALBUM_PEAK",
|
|
140
|
-
mp4: "----:com.apple.iTunes:replaygain_album_peak"
|
|
141
|
-
}
|
|
142
|
-
},
|
|
143
|
-
r128TrackGain: {
|
|
144
|
-
key: "R128_TRACK_GAIN",
|
|
145
|
-
description: "EBU R128 track loudness gain (RFC 7845), raw wire value: signed Q7.8 integer (dB x 256, e.g. '-573' = -2.23828125 dB). readTags() converts to a decibel number (see ExtendedTag.r128TrackGain)",
|
|
146
|
-
type: "string",
|
|
147
|
-
supportedFormats: ["ID3v2", "MP4", "Vorbis", "ASF"],
|
|
148
|
-
mappings: {
|
|
149
|
-
id3v2: { frame: "TXXX", description: "R128_TRACK_GAIN" },
|
|
150
|
-
vorbis: "R128_TRACK_GAIN",
|
|
151
|
-
mp4: "----:com.apple.iTunes:R128_TRACK_GAIN"
|
|
152
|
-
}
|
|
153
|
-
},
|
|
154
|
-
r128AlbumGain: {
|
|
155
|
-
key: "R128_ALBUM_GAIN",
|
|
156
|
-
description: "EBU R128 album loudness gain (RFC 7845), raw wire value: signed Q7.8 integer (dB x 256). readTags() converts to a decibel number",
|
|
157
|
-
type: "string",
|
|
158
|
-
supportedFormats: ["ID3v2", "MP4", "Vorbis", "ASF"],
|
|
159
|
-
mappings: {
|
|
160
|
-
id3v2: { frame: "TXXX", description: "R128_ALBUM_GAIN" },
|
|
161
|
-
vorbis: "R128_ALBUM_GAIN",
|
|
162
|
-
mp4: "----:com.apple.iTunes:R128_ALBUM_GAIN"
|
|
163
|
-
}
|
|
164
|
-
},
|
|
165
|
-
// AcoustID Properties
|
|
166
|
-
acoustidFingerprint: {
|
|
167
|
-
key: "ACOUSTID_FINGERPRINT",
|
|
168
|
-
description: "AcoustID fingerprint (Chromaprint)",
|
|
169
|
-
type: "string",
|
|
170
|
-
supportedFormats: ["ID3v2", "MP4", "Vorbis"],
|
|
171
|
-
mappings: {
|
|
172
|
-
id3v2: { frame: "TXXX", description: "Acoustid Fingerprint" },
|
|
173
|
-
vorbis: "ACOUSTID_FINGERPRINT",
|
|
174
|
-
mp4: "----:com.apple.iTunes:Acoustid Fingerprint"
|
|
175
|
-
}
|
|
176
|
-
},
|
|
177
|
-
acoustidId: {
|
|
178
|
-
key: "ACOUSTID_ID",
|
|
179
|
-
description: "AcoustID UUID",
|
|
180
|
-
type: "string",
|
|
181
|
-
supportedFormats: ["ID3v2", "MP4", "Vorbis"],
|
|
182
|
-
mappings: {
|
|
183
|
-
id3v2: { frame: "TXXX", description: "Acoustid Id" },
|
|
184
|
-
vorbis: "ACOUSTID_ID",
|
|
185
|
-
mp4: "----:com.apple.iTunes:Acoustid Id"
|
|
186
|
-
}
|
|
187
|
-
},
|
|
188
|
-
// Apple Sound Check
|
|
189
|
-
appleSoundCheck: {
|
|
190
|
-
key: "ITUNNORM",
|
|
191
|
-
description: "Apple Sound Check normalization data",
|
|
192
|
-
type: "string",
|
|
193
|
-
supportedFormats: ["ID3v2", "MP4", "Vorbis"],
|
|
194
|
-
mappings: {
|
|
195
|
-
id3v2: { frame: "TXXX", description: "iTunNORM" },
|
|
196
|
-
vorbis: "ITUNNORM",
|
|
197
|
-
mp4: "----:com.apple.iTunes:iTunNORM"
|
|
198
|
-
}
|
|
199
|
-
},
|
|
200
|
-
/**
|
|
201
|
-
* Apple gapless-playback data (encoder delay, padding, original sample count).
|
|
202
|
-
*
|
|
203
|
-
* Exists so the two Apple freeform atoms are presented consistently: without
|
|
204
|
-
* it, `properties()` answered `appleSoundCheck` for iTunNORM but the raw
|
|
205
|
-
* uppercased `ITUNSMPB` for its sibling, because only one had an alias. The
|
|
206
|
-
* name mirrors `appleSoundCheck` — vendor-prefixed, feature-named rather than
|
|
207
|
-
* atom-named (tuneup-ibo).
|
|
208
|
-
*/
|
|
209
|
-
appleGaplessInfo: {
|
|
210
|
-
key: "ITUNSMPB",
|
|
211
|
-
description: "Apple gapless playback data (encoder delay and padding)",
|
|
212
|
-
type: "string",
|
|
213
|
-
supportedFormats: ["ID3v2", "MP4", "Vorbis"],
|
|
214
|
-
mappings: {
|
|
215
|
-
id3v2: { frame: "TXXX", description: "iTunSMPB" },
|
|
216
|
-
vorbis: "ITUNSMPB",
|
|
217
|
-
mp4: "----:com.apple.iTunes:iTunSMPB"
|
|
218
|
-
}
|
|
219
|
-
}
|
|
220
|
-
};
|
|
221
|
-
export {
|
|
222
|
-
SPECIALIZED_PROPERTIES
|
|
223
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"utilities.d.ts","sourceRoot":"","sources":["../../../src/constants/utilities.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,KAAK,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC/D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AACpD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAE5D;;GAEG;AACH,wBAAgB,eAAe,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,IAAI,WAAW,CAE/D;AAED;;GAEG;AACH,wBAAgB,mBAAmB,CAAC,CAAC,SAAS,WAAW,EACvD,GAAG,EAAE,CAAC,GACL,gBAAgB,GAAG,SAAS,CAE9B;AAED;;GAEG;AACH,wBAAgB,kBAAkB,IAAI,SAAS,WAAW,EAAE,CAE3D;AAED;;GAEG;AACH,wBAAgB,gBAAgB,IAAI,SAAS;IAC3C,WAAW;IACX,OAAO,UAAU,CAAC,WAAW,CAAC;CAC/B,EAAE,CAKF;AAED;;GAEG;AACH,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,MAAM,GAAG,WAAW,EAAE,CAInE;AAED;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,WAAW,EAAE,GAAG,EAAE,MAAM,GAAG,MAAM,EAAE,CAExE;AAED;;;GAGG;AACH,wBAAgB,aAAa,CAC3B,KAAK,EAAE,WAAW,EAClB,GAAG,EAAE,MAAM,GACV,MAAM,GAAG,SAAS,CAEpB"}
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import { PROPERTIES } from "./properties.js";
|
|
2
|
-
function isValidProperty(key) {
|
|
3
|
-
return key in PROPERTIES;
|
|
4
|
-
}
|
|
5
|
-
function getPropertyMetadata(key) {
|
|
6
|
-
return PROPERTIES[key];
|
|
7
|
-
}
|
|
8
|
-
function getAllPropertyKeys() {
|
|
9
|
-
return Object.keys(PROPERTIES);
|
|
10
|
-
}
|
|
11
|
-
function getAllProperties() {
|
|
12
|
-
return Object.entries(PROPERTIES);
|
|
13
|
-
}
|
|
14
|
-
function getPropertiesByFormat(format) {
|
|
15
|
-
return getAllPropertyKeys().filter(
|
|
16
|
-
(key) => PROPERTIES[key].supportedFormats.includes(format)
|
|
17
|
-
);
|
|
18
|
-
}
|
|
19
|
-
function propertyValues(props, key) {
|
|
20
|
-
return props[key] ?? [];
|
|
21
|
-
}
|
|
22
|
-
function propertyValue(props, key) {
|
|
23
|
-
return props[key]?.[0];
|
|
24
|
-
}
|
|
25
|
-
export {
|
|
26
|
-
getAllProperties,
|
|
27
|
-
getAllPropertyKeys,
|
|
28
|
-
getPropertiesByFormat,
|
|
29
|
-
getPropertyMetadata,
|
|
30
|
-
isValidProperty,
|
|
31
|
-
propertyValue,
|
|
32
|
-
propertyValues
|
|
33
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../src/constants.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,cAAc,sBAAsB,CAAC"}
|
package/dist/src/constants.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./constants/index.js";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"deno-compile.d.ts","sourceRoot":"","sources":["../../src/deno-compile.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAIrC,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAE1D;;;;;;;;;;GAUG;AACH,eAAO,MAAM,uBAAuB,EAAE,SAAS,MAAM,EAIpD,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAsB,wBAAwB,CAC5C,gBAAgB,SAAsB,GACrC,OAAO,CAAC,MAAM,CAAC,CA8BjB;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAsB,uBAAuB,CAC3C,UAAU,SAAsB,GAC/B,OAAO,CAAC,IAAI,CAAC,CAuCf"}
|
package/dist/src/deno-compile.js
DELETED
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
import { TagLib } from "./taglib.js";
|
|
2
|
-
import { FileOperationError } from "./errors/classes.js";
|
|
3
|
-
import { isDenoCompiled } from "./runtime/deno-detect.js";
|
|
4
|
-
import { fileUrlToPath } from "./utils/path.js";
|
|
5
|
-
import { isDenoCompiled as isDenoCompiled2 } from "./runtime/deno-detect.js";
|
|
6
|
-
const WASM_EMBED_SEARCH_PATHS = [
|
|
7
|
-
"../build/taglib-web.wasm",
|
|
8
|
-
"../dist/taglib-web.wasm",
|
|
9
|
-
"./node_modules/taglib-wasm/dist/taglib-web.wasm"
|
|
10
|
-
];
|
|
11
|
-
async function initializeForDenoCompile(embeddedWasmPath = "./taglib-web.wasm") {
|
|
12
|
-
if (isDenoCompiled()) {
|
|
13
|
-
const strategies = [
|
|
14
|
-
// Relative to user's entry point (where --include embeds files)
|
|
15
|
-
() => Deno.readFile(new URL(embeddedWasmPath, Deno.mainModule)),
|
|
16
|
-
// Relative to this library module
|
|
17
|
-
() => Deno.readFile(new URL(embeddedWasmPath, import.meta.url)),
|
|
18
|
-
// CWD fallback (last resort — depends on where the binary is invoked)
|
|
19
|
-
() => Deno.readFile(embeddedWasmPath)
|
|
20
|
-
];
|
|
21
|
-
for (const strategy of strategies) {
|
|
22
|
-
try {
|
|
23
|
-
const wasmBinary = await strategy();
|
|
24
|
-
return await TagLib.initialize({
|
|
25
|
-
wasmBinary,
|
|
26
|
-
forceWasmType: "emscripten"
|
|
27
|
-
});
|
|
28
|
-
} catch {
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
console.warn(`Could not load embedded WASM from ${embeddedWasmPath}`);
|
|
32
|
-
console.warn("Falling back to network fetch (requires --allow-net)");
|
|
33
|
-
}
|
|
34
|
-
return await TagLib.initialize({ forceWasmType: "emscripten" });
|
|
35
|
-
}
|
|
36
|
-
async function prepareWasmForEmbedding(outputPath = "./taglib-web.wasm") {
|
|
37
|
-
try {
|
|
38
|
-
const possiblePaths = WASM_EMBED_SEARCH_PATHS.map(
|
|
39
|
-
(p) => new URL(p, import.meta.url)
|
|
40
|
-
);
|
|
41
|
-
let wasmData = null;
|
|
42
|
-
let sourcePath = null;
|
|
43
|
-
for (const path of possiblePaths) {
|
|
44
|
-
try {
|
|
45
|
-
wasmData = await Deno.readFile(path);
|
|
46
|
-
sourcePath = fileUrlToPath(path);
|
|
47
|
-
break;
|
|
48
|
-
} catch {
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
if (!wasmData || !sourcePath) {
|
|
52
|
-
throw new FileOperationError(
|
|
53
|
-
"read",
|
|
54
|
-
"Could not find taglib-web.wasm in expected locations"
|
|
55
|
-
);
|
|
56
|
-
}
|
|
57
|
-
await Deno.writeFile(outputPath, wasmData);
|
|
58
|
-
console.log(`WASM file copied from ${sourcePath} to ${outputPath}`);
|
|
59
|
-
console.log(
|
|
60
|
-
`Include this file when compiling: deno compile --include ${outputPath} ...`
|
|
61
|
-
);
|
|
62
|
-
} catch (error) {
|
|
63
|
-
const message = error instanceof Error ? error.message : String(error);
|
|
64
|
-
throw new FileOperationError(
|
|
65
|
-
"read",
|
|
66
|
-
`Failed to prepare WASM for embedding: ${message}`
|
|
67
|
-
);
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
export {
|
|
71
|
-
WASM_EMBED_SEARCH_PATHS,
|
|
72
|
-
initializeForDenoCompile,
|
|
73
|
-
isDenoCompiled2 as isDenoCompiled,
|
|
74
|
-
prepareWasmForEmbedding
|
|
75
|
-
};
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* List of audio formats supported by TagLib-Wasm
|
|
3
|
-
*/
|
|
4
|
-
export declare const SUPPORTED_FORMATS: readonly ["MP3", "MP4", "M4A", "FLAC", "OGG", "WAV", "MKA"];
|
|
5
|
-
/**
|
|
6
|
-
* Error codes for programmatic error handling
|
|
7
|
-
*/
|
|
8
|
-
export type TagLibErrorCode = "INITIALIZATION" | "INVALID_FORMAT" | "UNSUPPORTED_FORMAT" | "FILE_OPERATION" | "METADATA" | "MEMORY" | "ENVIRONMENT" | "WASM_MEMORY" | "MODULE_LOAD" | "WASI_HOST";
|
|
9
|
-
/**
|
|
10
|
-
* Base error class for all TagLib-Wasm errors
|
|
11
|
-
*/
|
|
12
|
-
export declare class TagLibError extends Error {
|
|
13
|
-
readonly code: TagLibErrorCode;
|
|
14
|
-
readonly details?: Record<string, unknown> | undefined;
|
|
15
|
-
/**
|
|
16
|
-
* Creates a new TagLibError
|
|
17
|
-
* @param code - Error code for programmatic handling
|
|
18
|
-
* @param message - Human-readable error message
|
|
19
|
-
* @param details - Additional context about the error
|
|
20
|
-
*/
|
|
21
|
-
constructor(code: TagLibErrorCode, message: string, details?: Record<string, unknown> | undefined);
|
|
22
|
-
}
|
|
23
|
-
//# sourceMappingURL=base.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"base.d.ts","sourceRoot":"","sources":["../../../src/errors/base.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,eAAO,MAAM,iBAAiB,6DAQpB,CAAC;AAEX;;GAEG;AACH,MAAM,MAAM,eAAe,GACvB,gBAAgB,GAChB,gBAAgB,GAChB,oBAAoB,GACpB,gBAAgB,GAChB,UAAU,GACV,QAAQ,GACR,aAAa,GACb,aAAa,GACb,aAAa,GACb,WAAW,CAAC;AAEhB;;GAEG;AACH,qBAAa,WAAY,SAAQ,KAAK;aAQlB,IAAI,EAAE,eAAe;aAErB,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IATnD;;;;;OAKG;gBAEe,IAAI,EAAE,eAAe,EACrC,OAAO,EAAE,MAAM,EACC,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,YAAA;CAMpD"}
|
package/dist/src/errors/base.js
DELETED
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty;
|
|
2
|
-
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, 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);
|
|
4
|
-
const SUPPORTED_FORMATS = [
|
|
5
|
-
"MP3",
|
|
6
|
-
"MP4",
|
|
7
|
-
"M4A",
|
|
8
|
-
"FLAC",
|
|
9
|
-
"OGG",
|
|
10
|
-
"WAV",
|
|
11
|
-
"MKA"
|
|
12
|
-
];
|
|
13
|
-
class TagLibError extends Error {
|
|
14
|
-
/**
|
|
15
|
-
* Creates a new TagLibError
|
|
16
|
-
* @param code - Error code for programmatic handling
|
|
17
|
-
* @param message - Human-readable error message
|
|
18
|
-
* @param details - Additional context about the error
|
|
19
|
-
*/
|
|
20
|
-
constructor(code, message, details) {
|
|
21
|
-
super(message);
|
|
22
|
-
__publicField(this, "code", code);
|
|
23
|
-
__publicField(this, "details", details);
|
|
24
|
-
this.name = "TagLibError";
|
|
25
|
-
Object.setPrototypeOf(this, TagLibError.prototype);
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
export {
|
|
29
|
-
SUPPORTED_FORMATS,
|
|
30
|
-
TagLibError
|
|
31
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"classes.d.ts","sourceRoot":"","sources":["../../../src/errors/classes.ts"],"names":[],"mappings":"AAAA,OAAO,EAAqB,WAAW,EAAE,MAAM,WAAW,CAAC;AAE3D,wBAAgB,YAAY,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,CAEnD;AAYD;;GAEG;AACH,qBAAa,yBAA0B,SAAQ,WAAW;IACxD;;;;OAIG;gBACS,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;CAS/D;AAED;;GAEG;AACH,qBAAa,kBAAmB,SAAQ,WAAW;aAS/B,UAAU,CAAC,EAAE,MAAM;IARrC;;;;;OAKG;gBAED,OAAO,EAAE,MAAM,EACC,UAAU,CAAC,EAAE,MAAM,YAAA,EACnC,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;CAqBpC;AAED;;GAEG;AACH,qBAAa,sBAAuB,SAAQ,WAAW;aAQnC,MAAM,EAAE,MAAM;aACd,gBAAgB,EAAE,SAAS,MAAM,EAAE;IARrD;;;;;OAKG;gBAEe,MAAM,EAAE,MAAM,EACd,gBAAgB,GAAE,SAAS,MAAM,EAAsB,EACvE,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;CAYpC;AAED;;GAEG;AACH,qBAAa,kBAAmB,SAAQ,WAAW;aAS/B,SAAS,EAAE,MAAM,GAAG,OAAO,GAAG,MAAM,GAAG,MAAM;aAE7C,IAAI,CAAC,EAAE,MAAM;IAV/B;;;;;;OAMG;gBAEe,SAAS,EAAE,MAAM,GAAG,OAAO,GAAG,MAAM,GAAG,MAAM,EAC7D,OAAO,EAAE,MAAM,EACC,IAAI,CAAC,EAAE,MAAM,YAAA,EAC7B,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;CAgBpC;AAED;;GAEG;AACH,qBAAa,aAAc,SAAQ,WAAW;aAS1B,SAAS,EAAE,MAAM,GAAG,OAAO;aAE3B,KAAK,CAAC,EAAE,MAAM;IAVhC;;;;;;OAMG;gBAEe,SAAS,EAAE,MAAM,GAAG,OAAO,EAC3C,OAAO,EAAE,MAAM,EACC,KAAK,CAAC,EAAE,MAAM,YAAA,EAC9B,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;CAgBpC;AAED;;GAEG;AACH,qBAAa,WAAY,SAAQ,WAAW;IAC1C;;;;OAIG;gBACS,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;CAS/D;AAED;;GAEG;AACH,qBAAa,gBAAiB,SAAQ,WAAW;aAQ7B,WAAW,EAAE,MAAM;aACnB,MAAM,EAAE,MAAM;aACd,eAAe,CAAC,EAAE,MAAM;IAT1C;;;;;OAKG;gBAEe,WAAW,EAAE,MAAM,EACnB,MAAM,EAAE,MAAM,EACd,eAAe,CAAC,EAAE,MAAM,YAAA;CAS3C"}
|
|
@@ -1,170 +0,0 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty;
|
|
2
|
-
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, 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);
|
|
4
|
-
import { SUPPORTED_FORMATS, TagLibError } from "./base.js";
|
|
5
|
-
function errorMessage(error) {
|
|
6
|
-
return error instanceof Error ? error.message : String(error);
|
|
7
|
-
}
|
|
8
|
-
function createErrorMessage(prefix, details) {
|
|
9
|
-
return `${prefix}: ${details}`;
|
|
10
|
-
}
|
|
11
|
-
function formatFileSize(bytes) {
|
|
12
|
-
if (bytes < 1024) return `${bytes} bytes`;
|
|
13
|
-
if (bytes < 1024 * 1024) return `${(bytes / 1024).toFixed(1)} KB`;
|
|
14
|
-
return `${(bytes / (1024 * 1024)).toFixed(1)} MB`;
|
|
15
|
-
}
|
|
16
|
-
class TagLibInitializationError extends TagLibError {
|
|
17
|
-
/**
|
|
18
|
-
* Creates a new TagLibInitializationError
|
|
19
|
-
* @param message - Description of the initialization failure
|
|
20
|
-
* @param details - Additional context about the error
|
|
21
|
-
*/
|
|
22
|
-
constructor(message, details) {
|
|
23
|
-
super(
|
|
24
|
-
"INITIALIZATION",
|
|
25
|
-
createErrorMessage("Failed to initialize TagLib Wasm module", message),
|
|
26
|
-
details
|
|
27
|
-
);
|
|
28
|
-
this.name = "TagLibInitializationError";
|
|
29
|
-
Object.setPrototypeOf(this, TagLibInitializationError.prototype);
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
class InvalidFormatError extends TagLibError {
|
|
33
|
-
/**
|
|
34
|
-
* Creates a new InvalidFormatError
|
|
35
|
-
* @param message - Description of the format error
|
|
36
|
-
* @param bufferSize - Size of the audio buffer in bytes
|
|
37
|
-
* @param details - Additional context about the error
|
|
38
|
-
*/
|
|
39
|
-
constructor(message, bufferSize, details) {
|
|
40
|
-
const errorDetails = [`Invalid audio file format: ${message}`];
|
|
41
|
-
if (bufferSize !== void 0) {
|
|
42
|
-
errorDetails.push(`Buffer size: ${formatFileSize(bufferSize)}`);
|
|
43
|
-
if (bufferSize < 1024) {
|
|
44
|
-
errorDetails.push(
|
|
45
|
-
"Audio files must be at least 1KB to contain valid headers."
|
|
46
|
-
);
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
super(
|
|
50
|
-
"INVALID_FORMAT",
|
|
51
|
-
errorDetails.join(". "),
|
|
52
|
-
{ ...details, bufferSize }
|
|
53
|
-
);
|
|
54
|
-
__publicField(this, "bufferSize", bufferSize);
|
|
55
|
-
this.name = "InvalidFormatError";
|
|
56
|
-
Object.setPrototypeOf(this, InvalidFormatError.prototype);
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
class UnsupportedFormatError extends TagLibError {
|
|
60
|
-
/**
|
|
61
|
-
* Creates a new UnsupportedFormatError
|
|
62
|
-
* @param format - The unsupported format that was encountered
|
|
63
|
-
* @param supportedFormats - List of formats that are supported
|
|
64
|
-
* @param details - Additional context about the error
|
|
65
|
-
*/
|
|
66
|
-
constructor(format, supportedFormats = SUPPORTED_FORMATS, details) {
|
|
67
|
-
super(
|
|
68
|
-
"UNSUPPORTED_FORMAT",
|
|
69
|
-
`Unsupported audio format: ${format}. Supported formats: ${supportedFormats.join(", ")}`,
|
|
70
|
-
{ ...details, format, supportedFormats }
|
|
71
|
-
);
|
|
72
|
-
__publicField(this, "format", format);
|
|
73
|
-
__publicField(this, "supportedFormats", supportedFormats);
|
|
74
|
-
this.name = "UnsupportedFormatError";
|
|
75
|
-
Object.setPrototypeOf(this, UnsupportedFormatError.prototype);
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
class FileOperationError extends TagLibError {
|
|
79
|
-
/**
|
|
80
|
-
* Creates a new FileOperationError
|
|
81
|
-
* @param operation - The file operation that failed
|
|
82
|
-
* @param message - Description of the failure
|
|
83
|
-
* @param path - File path involved in the operation
|
|
84
|
-
* @param details - Additional context about the error
|
|
85
|
-
*/
|
|
86
|
-
constructor(operation, message, path, details) {
|
|
87
|
-
const errorDetails = [`Failed to ${operation} file`];
|
|
88
|
-
if (path) {
|
|
89
|
-
errorDetails.push(`Path: ${path}`);
|
|
90
|
-
}
|
|
91
|
-
errorDetails.push(message);
|
|
92
|
-
super(
|
|
93
|
-
"FILE_OPERATION",
|
|
94
|
-
errorDetails.join(". "),
|
|
95
|
-
{ ...details, operation, path }
|
|
96
|
-
);
|
|
97
|
-
__publicField(this, "operation", operation);
|
|
98
|
-
__publicField(this, "path", path);
|
|
99
|
-
this.name = "FileOperationError";
|
|
100
|
-
Object.setPrototypeOf(this, FileOperationError.prototype);
|
|
101
|
-
}
|
|
102
|
-
}
|
|
103
|
-
class MetadataError extends TagLibError {
|
|
104
|
-
/**
|
|
105
|
-
* Creates a new MetadataError
|
|
106
|
-
* @param operation - The metadata operation that failed
|
|
107
|
-
* @param message - Description of the failure
|
|
108
|
-
* @param field - The metadata field involved
|
|
109
|
-
* @param details - Additional context about the error
|
|
110
|
-
*/
|
|
111
|
-
constructor(operation, message, field, details) {
|
|
112
|
-
const errorDetails = [`Failed to ${operation} metadata`];
|
|
113
|
-
if (field) {
|
|
114
|
-
errorDetails.push(`Field: ${field}`);
|
|
115
|
-
}
|
|
116
|
-
errorDetails.push(message);
|
|
117
|
-
super(
|
|
118
|
-
"METADATA",
|
|
119
|
-
errorDetails.join(". "),
|
|
120
|
-
{ ...details, operation, field }
|
|
121
|
-
);
|
|
122
|
-
__publicField(this, "operation", operation);
|
|
123
|
-
__publicField(this, "field", field);
|
|
124
|
-
this.name = "MetadataError";
|
|
125
|
-
Object.setPrototypeOf(this, MetadataError.prototype);
|
|
126
|
-
}
|
|
127
|
-
}
|
|
128
|
-
class MemoryError extends TagLibError {
|
|
129
|
-
/**
|
|
130
|
-
* Creates a new MemoryError
|
|
131
|
-
* @param message - Description of the memory failure
|
|
132
|
-
* @param details - Additional context about the error
|
|
133
|
-
*/
|
|
134
|
-
constructor(message, details) {
|
|
135
|
-
super(
|
|
136
|
-
"MEMORY",
|
|
137
|
-
createErrorMessage("Memory allocation failed", message),
|
|
138
|
-
details
|
|
139
|
-
);
|
|
140
|
-
this.name = "MemoryError";
|
|
141
|
-
Object.setPrototypeOf(this, MemoryError.prototype);
|
|
142
|
-
}
|
|
143
|
-
}
|
|
144
|
-
class EnvironmentError extends TagLibError {
|
|
145
|
-
/**
|
|
146
|
-
* Creates a new EnvironmentError
|
|
147
|
-
* @param environment - The runtime environment name
|
|
148
|
-
* @param reason - Why the environment is incompatible
|
|
149
|
-
* @param requiredFeature - The feature that is missing
|
|
150
|
-
*/
|
|
151
|
-
constructor(environment, reason, requiredFeature) {
|
|
152
|
-
const message = requiredFeature ? `Environment '${environment}' ${reason}. Required feature: ${requiredFeature}.` : `Environment '${environment}' ${reason}.`;
|
|
153
|
-
super("ENVIRONMENT", message);
|
|
154
|
-
__publicField(this, "environment", environment);
|
|
155
|
-
__publicField(this, "reason", reason);
|
|
156
|
-
__publicField(this, "requiredFeature", requiredFeature);
|
|
157
|
-
this.name = "EnvironmentError";
|
|
158
|
-
Object.setPrototypeOf(this, EnvironmentError.prototype);
|
|
159
|
-
}
|
|
160
|
-
}
|
|
161
|
-
export {
|
|
162
|
-
EnvironmentError,
|
|
163
|
-
FileOperationError,
|
|
164
|
-
InvalidFormatError,
|
|
165
|
-
MemoryError,
|
|
166
|
-
MetadataError,
|
|
167
|
-
TagLibInitializationError,
|
|
168
|
-
UnsupportedFormatError,
|
|
169
|
-
errorMessage
|
|
170
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"guards.d.ts","sourceRoot":"","sources":["../../../src/errors/guards.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AACxC,OAAO,EACL,gBAAgB,EAChB,kBAAkB,EAClB,kBAAkB,EAClB,WAAW,EACX,aAAa,EACb,sBAAsB,EACvB,MAAM,cAAc,CAAC;AAEtB,wBAAgB,aAAa,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,WAAW,CAElE;AAED,wBAAgB,oBAAoB,CAClC,KAAK,EAAE,OAAO,GACb,KAAK,IAAI,kBAAkB,CAE7B;AAED,wBAAgB,wBAAwB,CACtC,KAAK,EAAE,OAAO,GACb,KAAK,IAAI,sBAAsB,CAEjC;AAED,wBAAgB,oBAAoB,CAClC,KAAK,EAAE,OAAO,GACb,KAAK,IAAI,kBAAkB,CAE7B;AAED,wBAAgB,eAAe,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,aAAa,CAEtE;AAED,wBAAgB,aAAa,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,WAAW,CAElE;AAED,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,gBAAgB,CAE5E"}
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import { TagLibError } from "./base.js";
|
|
2
|
-
import {
|
|
3
|
-
EnvironmentError,
|
|
4
|
-
FileOperationError,
|
|
5
|
-
InvalidFormatError,
|
|
6
|
-
MemoryError,
|
|
7
|
-
MetadataError,
|
|
8
|
-
UnsupportedFormatError
|
|
9
|
-
} from "./classes.js";
|
|
10
|
-
function isTagLibError(error) {
|
|
11
|
-
return error instanceof TagLibError;
|
|
12
|
-
}
|
|
13
|
-
function isInvalidFormatError(error) {
|
|
14
|
-
return error instanceof InvalidFormatError;
|
|
15
|
-
}
|
|
16
|
-
function isUnsupportedFormatError(error) {
|
|
17
|
-
return error instanceof UnsupportedFormatError;
|
|
18
|
-
}
|
|
19
|
-
function isFileOperationError(error) {
|
|
20
|
-
return error instanceof FileOperationError;
|
|
21
|
-
}
|
|
22
|
-
function isMetadataError(error) {
|
|
23
|
-
return error instanceof MetadataError;
|
|
24
|
-
}
|
|
25
|
-
function isMemoryError(error) {
|
|
26
|
-
return error instanceof MemoryError;
|
|
27
|
-
}
|
|
28
|
-
function isEnvironmentError(error) {
|
|
29
|
-
return error instanceof EnvironmentError;
|
|
30
|
-
}
|
|
31
|
-
export {
|
|
32
|
-
isEnvironmentError,
|
|
33
|
-
isFileOperationError,
|
|
34
|
-
isInvalidFormatError,
|
|
35
|
-
isMemoryError,
|
|
36
|
-
isMetadataError,
|
|
37
|
-
isTagLibError,
|
|
38
|
-
isUnsupportedFormatError
|
|
39
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/errors/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AAC3D,YAAY,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AACjD,OAAO,EACL,gBAAgB,EAChB,YAAY,EACZ,kBAAkB,EAClB,kBAAkB,EAClB,WAAW,EACX,aAAa,EACb,yBAAyB,EACzB,sBAAsB,GACvB,MAAM,cAAc,CAAC;AACtB,OAAO,EACL,kBAAkB,EAClB,oBAAoB,EACpB,oBAAoB,EACpB,aAAa,EACb,eAAe,EACf,aAAa,EACb,wBAAwB,GACzB,MAAM,aAAa,CAAC"}
|
package/dist/src/errors/index.js
DELETED
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import { SUPPORTED_FORMATS, TagLibError } from "./base.js";
|
|
2
|
-
import {
|
|
3
|
-
EnvironmentError,
|
|
4
|
-
errorMessage,
|
|
5
|
-
FileOperationError,
|
|
6
|
-
InvalidFormatError,
|
|
7
|
-
MemoryError,
|
|
8
|
-
MetadataError,
|
|
9
|
-
TagLibInitializationError,
|
|
10
|
-
UnsupportedFormatError
|
|
11
|
-
} from "./classes.js";
|
|
12
|
-
import {
|
|
13
|
-
isEnvironmentError,
|
|
14
|
-
isFileOperationError,
|
|
15
|
-
isInvalidFormatError,
|
|
16
|
-
isMemoryError,
|
|
17
|
-
isMetadataError,
|
|
18
|
-
isTagLibError,
|
|
19
|
-
isUnsupportedFormatError
|
|
20
|
-
} from "./guards.js";
|
|
21
|
-
export {
|
|
22
|
-
EnvironmentError,
|
|
23
|
-
FileOperationError,
|
|
24
|
-
InvalidFormatError,
|
|
25
|
-
MemoryError,
|
|
26
|
-
MetadataError,
|
|
27
|
-
SUPPORTED_FORMATS,
|
|
28
|
-
TagLibError,
|
|
29
|
-
TagLibInitializationError,
|
|
30
|
-
UnsupportedFormatError,
|
|
31
|
-
errorMessage,
|
|
32
|
-
isEnvironmentError,
|
|
33
|
-
isFileOperationError,
|
|
34
|
-
isInvalidFormatError,
|
|
35
|
-
isMemoryError,
|
|
36
|
-
isMetadataError,
|
|
37
|
-
isTagLibError,
|
|
38
|
-
isUnsupportedFormatError
|
|
39
|
-
};
|
package/dist/src/errors.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../src/errors.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,cAAc,mBAAmB,CAAC"}
|
package/dist/src/errors.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./errors/index.js";
|