taglib-wasm 2.3.0 → 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 +70 -64
- 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.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 +29 -30
- package/dist/index.browser.d.ts.map +1 -1
- package/dist/index.browser.js +4101 -4478
- package/dist/index.d.ts +26 -26
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +40 -185
- 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/runtime/wasi-adapter/adapter.d.ts.map +1 -0
- package/dist/runtime/wasi-adapter/adapter.js +114 -0
- 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.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/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.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/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 +3404 -3692
- 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.map +1 -0
- package/dist/taglib/audio-file-checksum.js +90 -0
- package/dist/taglib/audio-file-impl.d.ts.map +1 -0
- package/dist/taglib/audio-file-impl.js +234 -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.map +1 -0
- package/dist/taglib/media-ranges.js +309 -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-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.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/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 +5 -5
- package/dist/web.browser.d.ts.map +1 -1
- package/dist/web.browser.js +3168 -3411
- package/dist/web.d.ts +1 -1
- package/dist/web.d.ts.map +1 -1
- package/dist/web.js +5 -2
- package/package.json +131 -96
- 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.map +0 -1
- package/dist/src/errors/base.js +0 -49
- 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 -130
- package/dist/src/runtime/wasi-adapter/audio-properties.d.ts.map +0 -1
- package/dist/src/runtime/wasi-adapter/audio-properties.js +0 -102
- 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/path-open.d.ts.map +0 -1
- package/dist/src/runtime/wasi-adapter/path-open.js +0 -76
- 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 -257
- 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 -114
- 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/checksum-operations.d.ts.map +0 -1
- package/dist/src/simple/checksum-operations.js +0 -7
- 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 -60
- 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-checksum.d.ts.map +0 -1
- package/dist/src/taglib/audio-file-checksum.js +0 -77
- package/dist/src/taglib/audio-file-impl.d.ts.map +0 -1
- package/dist/src/taglib/audio-file-impl.js +0 -317
- 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/media-ranges.d.ts.map +0 -1
- package/dist/src/taglib/media-ranges.js +0 -192
- package/dist/src/taglib/metadata-extent.d.ts.map +0 -1
- package/dist/src/taglib/metadata-extent.js +0 -189
- 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 -195
- 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.map +0 -1
- package/dist/src/utils/path.js +0 -36
- 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}/base.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/adapter.d.ts +0 -0
- /package/dist/{src/runtime → runtime}/wasi-adapter/audio-properties.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/path-open.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/runtime → runtime}/wasmer-sdk-loader/types.d.ts +0 -0
- /package/dist/{src/simple → simple}/batch-operations.d.ts +0 -0
- /package/dist/{src/simple → simple}/checksum-operations.d.ts +0 -0
- /package/dist/{src/simple → simple}/config.d.ts +0 -0
- /package/dist/{src/simple → simple}/index.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}/audio-file-checksum.d.ts +0 -0
- /package/dist/{src/taglib → taglib}/audio-file-impl.d.ts +0 -0
- /package/dist/{src/taglib → taglib}/audio-file-interface.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}/media-ranges.d.ts +0 -0
- /package/dist/{src/taglib → taglib}/metadata-extent.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}/path.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/wasm.d.ts → wasm.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
|
@@ -0,0 +1,335 @@
|
|
|
1
|
+
//#region src/constants/specialized-properties.ts
|
|
2
|
+
/**
|
|
3
|
+
* Specialized audio metadata properties.
|
|
4
|
+
* Includes MusicBrainz IDs, ReplayGain values, AcoustID fingerprints, and Apple Sound Check.
|
|
5
|
+
*/
|
|
6
|
+
const SPECIALIZED_PROPERTIES = {
|
|
7
|
+
musicbrainzArtistId: {
|
|
8
|
+
key: "MUSICBRAINZ_ARTISTID",
|
|
9
|
+
description: "MusicBrainz Artist ID (UUID)",
|
|
10
|
+
type: "string",
|
|
11
|
+
supportedFormats: [
|
|
12
|
+
"ID3v2",
|
|
13
|
+
"MP4",
|
|
14
|
+
"Vorbis"
|
|
15
|
+
],
|
|
16
|
+
mappings: {
|
|
17
|
+
id3v2: {
|
|
18
|
+
frame: "TXXX",
|
|
19
|
+
description: "MusicBrainz Artist Id"
|
|
20
|
+
},
|
|
21
|
+
vorbis: "MUSICBRAINZ_ARTISTID",
|
|
22
|
+
mp4: "----:com.apple.iTunes:MusicBrainz Artist Id"
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
musicbrainzReleaseId: {
|
|
26
|
+
key: "MUSICBRAINZ_ALBUMID",
|
|
27
|
+
description: "MusicBrainz Release ID (UUID)",
|
|
28
|
+
type: "string",
|
|
29
|
+
supportedFormats: [
|
|
30
|
+
"ID3v2",
|
|
31
|
+
"MP4",
|
|
32
|
+
"Vorbis"
|
|
33
|
+
],
|
|
34
|
+
mappings: {
|
|
35
|
+
id3v2: {
|
|
36
|
+
frame: "TXXX",
|
|
37
|
+
description: "MusicBrainz Album Id"
|
|
38
|
+
},
|
|
39
|
+
vorbis: "MUSICBRAINZ_ALBUMID",
|
|
40
|
+
mp4: "----:com.apple.iTunes:MusicBrainz Album Id"
|
|
41
|
+
}
|
|
42
|
+
},
|
|
43
|
+
musicbrainzTrackId: {
|
|
44
|
+
key: "MUSICBRAINZ_TRACKID",
|
|
45
|
+
description: "MusicBrainz Recording ID (UUID)",
|
|
46
|
+
type: "string",
|
|
47
|
+
supportedFormats: [
|
|
48
|
+
"ID3v2",
|
|
49
|
+
"MP4",
|
|
50
|
+
"Vorbis"
|
|
51
|
+
],
|
|
52
|
+
mappings: {
|
|
53
|
+
id3v2: {
|
|
54
|
+
frame: "UFID",
|
|
55
|
+
description: "http://musicbrainz.org"
|
|
56
|
+
},
|
|
57
|
+
vorbis: "MUSICBRAINZ_TRACKID",
|
|
58
|
+
mp4: "----:com.apple.iTunes:MusicBrainz Track Id"
|
|
59
|
+
}
|
|
60
|
+
},
|
|
61
|
+
musicbrainzReleaseGroupId: {
|
|
62
|
+
key: "MUSICBRAINZ_RELEASEGROUPID",
|
|
63
|
+
description: "MusicBrainz Release Group ID (UUID)",
|
|
64
|
+
type: "string",
|
|
65
|
+
supportedFormats: [
|
|
66
|
+
"ID3v2",
|
|
67
|
+
"MP4",
|
|
68
|
+
"Vorbis"
|
|
69
|
+
],
|
|
70
|
+
mappings: {
|
|
71
|
+
id3v2: {
|
|
72
|
+
frame: "TXXX",
|
|
73
|
+
description: "MusicBrainz Release Group Id"
|
|
74
|
+
},
|
|
75
|
+
vorbis: "MUSICBRAINZ_RELEASEGROUPID",
|
|
76
|
+
mp4: "----:com.apple.iTunes:MusicBrainz Release Group Id"
|
|
77
|
+
}
|
|
78
|
+
},
|
|
79
|
+
releaseType: {
|
|
80
|
+
key: "RELEASETYPE",
|
|
81
|
+
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",
|
|
82
|
+
type: "string",
|
|
83
|
+
supportedFormats: [
|
|
84
|
+
"ID3v2",
|
|
85
|
+
"MP4",
|
|
86
|
+
"Vorbis",
|
|
87
|
+
"APE",
|
|
88
|
+
"ASF",
|
|
89
|
+
"Matroska"
|
|
90
|
+
],
|
|
91
|
+
mappings: {
|
|
92
|
+
id3v2: {
|
|
93
|
+
frame: "TXXX",
|
|
94
|
+
description: "MusicBrainz Album Type"
|
|
95
|
+
},
|
|
96
|
+
vorbis: "RELEASETYPE",
|
|
97
|
+
mp4: "----:com.apple.iTunes:MusicBrainz Album Type"
|
|
98
|
+
}
|
|
99
|
+
},
|
|
100
|
+
releaseCountry: {
|
|
101
|
+
key: "RELEASECOUNTRY",
|
|
102
|
+
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",
|
|
103
|
+
type: "string",
|
|
104
|
+
supportedFormats: [
|
|
105
|
+
"ID3v2",
|
|
106
|
+
"MP4",
|
|
107
|
+
"Vorbis",
|
|
108
|
+
"APE",
|
|
109
|
+
"ASF",
|
|
110
|
+
"Matroska",
|
|
111
|
+
"WAV"
|
|
112
|
+
],
|
|
113
|
+
mappings: {
|
|
114
|
+
id3v2: {
|
|
115
|
+
frame: "TXXX",
|
|
116
|
+
description: "MusicBrainz Album Release Country"
|
|
117
|
+
},
|
|
118
|
+
vorbis: "RELEASECOUNTRY",
|
|
119
|
+
mp4: "----:com.apple.iTunes:MusicBrainz Album Release Country"
|
|
120
|
+
}
|
|
121
|
+
},
|
|
122
|
+
itunesAdvisory: {
|
|
123
|
+
key: "ITUNESADVISORY",
|
|
124
|
+
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",
|
|
125
|
+
type: "string",
|
|
126
|
+
supportedFormats: [
|
|
127
|
+
"ID3v2",
|
|
128
|
+
"MP4",
|
|
129
|
+
"Vorbis",
|
|
130
|
+
"APE",
|
|
131
|
+
"ASF"
|
|
132
|
+
],
|
|
133
|
+
mappings: {
|
|
134
|
+
id3v2: {
|
|
135
|
+
frame: "TXXX",
|
|
136
|
+
description: "ITUNESADVISORY"
|
|
137
|
+
},
|
|
138
|
+
vorbis: "ITUNESADVISORY",
|
|
139
|
+
mp4: "----:com.apple.iTunes:ITUNESADVISORY"
|
|
140
|
+
}
|
|
141
|
+
},
|
|
142
|
+
replayGainTrackGain: {
|
|
143
|
+
key: "REPLAYGAIN_TRACK_GAIN",
|
|
144
|
+
description: "ReplayGain track gain in dB (e.g., '-6.54 dB')",
|
|
145
|
+
type: "string",
|
|
146
|
+
supportedFormats: [
|
|
147
|
+
"ID3v2",
|
|
148
|
+
"MP4",
|
|
149
|
+
"Vorbis"
|
|
150
|
+
],
|
|
151
|
+
mappings: {
|
|
152
|
+
id3v2: {
|
|
153
|
+
frame: "TXXX",
|
|
154
|
+
description: "ReplayGain_Track_Gain"
|
|
155
|
+
},
|
|
156
|
+
vorbis: "REPLAYGAIN_TRACK_GAIN",
|
|
157
|
+
mp4: "----:com.apple.iTunes:replaygain_track_gain"
|
|
158
|
+
}
|
|
159
|
+
},
|
|
160
|
+
replayGainTrackPeak: {
|
|
161
|
+
key: "REPLAYGAIN_TRACK_PEAK",
|
|
162
|
+
description: "ReplayGain track peak value (0.0-1.0)",
|
|
163
|
+
type: "string",
|
|
164
|
+
supportedFormats: [
|
|
165
|
+
"ID3v2",
|
|
166
|
+
"MP4",
|
|
167
|
+
"Vorbis"
|
|
168
|
+
],
|
|
169
|
+
mappings: {
|
|
170
|
+
id3v2: {
|
|
171
|
+
frame: "TXXX",
|
|
172
|
+
description: "ReplayGain_Track_Peak"
|
|
173
|
+
},
|
|
174
|
+
vorbis: "REPLAYGAIN_TRACK_PEAK",
|
|
175
|
+
mp4: "----:com.apple.iTunes:replaygain_track_peak"
|
|
176
|
+
}
|
|
177
|
+
},
|
|
178
|
+
replayGainAlbumGain: {
|
|
179
|
+
key: "REPLAYGAIN_ALBUM_GAIN",
|
|
180
|
+
description: "ReplayGain album gain in dB",
|
|
181
|
+
type: "string",
|
|
182
|
+
supportedFormats: [
|
|
183
|
+
"ID3v2",
|
|
184
|
+
"MP4",
|
|
185
|
+
"Vorbis"
|
|
186
|
+
],
|
|
187
|
+
mappings: {
|
|
188
|
+
id3v2: {
|
|
189
|
+
frame: "TXXX",
|
|
190
|
+
description: "ReplayGain_Album_Gain"
|
|
191
|
+
},
|
|
192
|
+
vorbis: "REPLAYGAIN_ALBUM_GAIN",
|
|
193
|
+
mp4: "----:com.apple.iTunes:replaygain_album_gain"
|
|
194
|
+
}
|
|
195
|
+
},
|
|
196
|
+
replayGainAlbumPeak: {
|
|
197
|
+
key: "REPLAYGAIN_ALBUM_PEAK",
|
|
198
|
+
description: "ReplayGain album peak value (0.0-1.0)",
|
|
199
|
+
type: "string",
|
|
200
|
+
supportedFormats: [
|
|
201
|
+
"ID3v2",
|
|
202
|
+
"MP4",
|
|
203
|
+
"Vorbis"
|
|
204
|
+
],
|
|
205
|
+
mappings: {
|
|
206
|
+
id3v2: {
|
|
207
|
+
frame: "TXXX",
|
|
208
|
+
description: "ReplayGain_Album_Peak"
|
|
209
|
+
},
|
|
210
|
+
vorbis: "REPLAYGAIN_ALBUM_PEAK",
|
|
211
|
+
mp4: "----:com.apple.iTunes:replaygain_album_peak"
|
|
212
|
+
}
|
|
213
|
+
},
|
|
214
|
+
r128TrackGain: {
|
|
215
|
+
key: "R128_TRACK_GAIN",
|
|
216
|
+
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)",
|
|
217
|
+
type: "string",
|
|
218
|
+
supportedFormats: [
|
|
219
|
+
"ID3v2",
|
|
220
|
+
"MP4",
|
|
221
|
+
"Vorbis",
|
|
222
|
+
"ASF"
|
|
223
|
+
],
|
|
224
|
+
mappings: {
|
|
225
|
+
id3v2: {
|
|
226
|
+
frame: "TXXX",
|
|
227
|
+
description: "R128_TRACK_GAIN"
|
|
228
|
+
},
|
|
229
|
+
vorbis: "R128_TRACK_GAIN",
|
|
230
|
+
mp4: "----:com.apple.iTunes:R128_TRACK_GAIN"
|
|
231
|
+
}
|
|
232
|
+
},
|
|
233
|
+
r128AlbumGain: {
|
|
234
|
+
key: "R128_ALBUM_GAIN",
|
|
235
|
+
description: "EBU R128 album loudness gain (RFC 7845), raw wire value: signed Q7.8 integer (dB x 256). readTags() converts to a decibel number",
|
|
236
|
+
type: "string",
|
|
237
|
+
supportedFormats: [
|
|
238
|
+
"ID3v2",
|
|
239
|
+
"MP4",
|
|
240
|
+
"Vorbis",
|
|
241
|
+
"ASF"
|
|
242
|
+
],
|
|
243
|
+
mappings: {
|
|
244
|
+
id3v2: {
|
|
245
|
+
frame: "TXXX",
|
|
246
|
+
description: "R128_ALBUM_GAIN"
|
|
247
|
+
},
|
|
248
|
+
vorbis: "R128_ALBUM_GAIN",
|
|
249
|
+
mp4: "----:com.apple.iTunes:R128_ALBUM_GAIN"
|
|
250
|
+
}
|
|
251
|
+
},
|
|
252
|
+
acoustidFingerprint: {
|
|
253
|
+
key: "ACOUSTID_FINGERPRINT",
|
|
254
|
+
description: "AcoustID fingerprint (Chromaprint)",
|
|
255
|
+
type: "string",
|
|
256
|
+
supportedFormats: [
|
|
257
|
+
"ID3v2",
|
|
258
|
+
"MP4",
|
|
259
|
+
"Vorbis"
|
|
260
|
+
],
|
|
261
|
+
mappings: {
|
|
262
|
+
id3v2: {
|
|
263
|
+
frame: "TXXX",
|
|
264
|
+
description: "Acoustid Fingerprint"
|
|
265
|
+
},
|
|
266
|
+
vorbis: "ACOUSTID_FINGERPRINT",
|
|
267
|
+
mp4: "----:com.apple.iTunes:Acoustid Fingerprint"
|
|
268
|
+
}
|
|
269
|
+
},
|
|
270
|
+
acoustidId: {
|
|
271
|
+
key: "ACOUSTID_ID",
|
|
272
|
+
description: "AcoustID UUID",
|
|
273
|
+
type: "string",
|
|
274
|
+
supportedFormats: [
|
|
275
|
+
"ID3v2",
|
|
276
|
+
"MP4",
|
|
277
|
+
"Vorbis"
|
|
278
|
+
],
|
|
279
|
+
mappings: {
|
|
280
|
+
id3v2: {
|
|
281
|
+
frame: "TXXX",
|
|
282
|
+
description: "Acoustid Id"
|
|
283
|
+
},
|
|
284
|
+
vorbis: "ACOUSTID_ID",
|
|
285
|
+
mp4: "----:com.apple.iTunes:Acoustid Id"
|
|
286
|
+
}
|
|
287
|
+
},
|
|
288
|
+
appleSoundCheck: {
|
|
289
|
+
key: "ITUNNORM",
|
|
290
|
+
description: "Apple Sound Check normalization data",
|
|
291
|
+
type: "string",
|
|
292
|
+
supportedFormats: [
|
|
293
|
+
"ID3v2",
|
|
294
|
+
"MP4",
|
|
295
|
+
"Vorbis"
|
|
296
|
+
],
|
|
297
|
+
mappings: {
|
|
298
|
+
id3v2: {
|
|
299
|
+
frame: "TXXX",
|
|
300
|
+
description: "iTunNORM"
|
|
301
|
+
},
|
|
302
|
+
vorbis: "ITUNNORM",
|
|
303
|
+
mp4: "----:com.apple.iTunes:iTunNORM"
|
|
304
|
+
}
|
|
305
|
+
},
|
|
306
|
+
/**
|
|
307
|
+
* Apple gapless-playback data (encoder delay, padding, original sample count).
|
|
308
|
+
*
|
|
309
|
+
* Exists so the two Apple freeform atoms are presented consistently: without
|
|
310
|
+
* it, `properties()` answered `appleSoundCheck` for iTunNORM but the raw
|
|
311
|
+
* uppercased `ITUNSMPB` for its sibling, because only one had an alias. The
|
|
312
|
+
* name mirrors `appleSoundCheck` — vendor-prefixed, feature-named rather than
|
|
313
|
+
* atom-named (tuneup-ibo).
|
|
314
|
+
*/
|
|
315
|
+
appleGaplessInfo: {
|
|
316
|
+
key: "ITUNSMPB",
|
|
317
|
+
description: "Apple gapless playback data (encoder delay and padding)",
|
|
318
|
+
type: "string",
|
|
319
|
+
supportedFormats: [
|
|
320
|
+
"ID3v2",
|
|
321
|
+
"MP4",
|
|
322
|
+
"Vorbis"
|
|
323
|
+
],
|
|
324
|
+
mappings: {
|
|
325
|
+
id3v2: {
|
|
326
|
+
frame: "TXXX",
|
|
327
|
+
description: "iTunSMPB"
|
|
328
|
+
},
|
|
329
|
+
vorbis: "ITUNSMPB",
|
|
330
|
+
mp4: "----:com.apple.iTunes:iTunSMPB"
|
|
331
|
+
}
|
|
332
|
+
}
|
|
333
|
+
};
|
|
334
|
+
//#endregion
|
|
335
|
+
export { SPECIALIZED_PROPERTIES };
|
|
@@ -18,7 +18,7 @@ export declare function getAllPropertyKeys(): readonly PropertyKey[];
|
|
|
18
18
|
*/
|
|
19
19
|
export declare function getAllProperties(): readonly [
|
|
20
20
|
PropertyKey,
|
|
21
|
-
typeof PROPERTIES[PropertyKey]
|
|
21
|
+
(typeof PROPERTIES)[PropertyKey]
|
|
22
22
|
][];
|
|
23
23
|
/**
|
|
24
24
|
* Filter properties by supported format
|
|
@@ -0,0 +1 @@
|
|
|
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,CAAC,OAAO,UAAU,CAAC,CAAC,WAAW,CAAC;CACjC,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"}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { PROPERTIES } from "./properties.js";
|
|
2
|
+
//#region src/constants/utilities.ts
|
|
3
|
+
/**
|
|
4
|
+
* Type guard to check if a string is a valid property key
|
|
5
|
+
*/
|
|
6
|
+
function isValidProperty(key) {
|
|
7
|
+
return key in PROPERTIES;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Get property metadata for a given property key
|
|
11
|
+
*/
|
|
12
|
+
function getPropertyMetadata(key) {
|
|
13
|
+
return PROPERTIES[key];
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Get all available property keys as an array
|
|
17
|
+
*/
|
|
18
|
+
function getAllPropertyKeys() {
|
|
19
|
+
return Object.keys(PROPERTIES);
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Get all available property definitions as an array of [key, metadata] pairs
|
|
23
|
+
*/
|
|
24
|
+
function getAllProperties() {
|
|
25
|
+
return Object.entries(PROPERTIES);
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Filter properties by supported format
|
|
29
|
+
*/
|
|
30
|
+
function getPropertiesByFormat(format) {
|
|
31
|
+
return getAllPropertyKeys().filter((key) => PROPERTIES[key].supportedFormats.includes(format));
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* All values for a property key in a PropertyMap; `[]` when absent
|
|
35
|
+
* (taglib-lk8u). Removes the narrowing filter at the call site: the map's
|
|
36
|
+
* index signature must admit undefined, so a bare read is
|
|
37
|
+
* `string[] | undefined` even for known keys.
|
|
38
|
+
*/
|
|
39
|
+
function propertyValues(props, key) {
|
|
40
|
+
return props[key] ?? [];
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* First value for a property key in a PropertyMap; `undefined` when absent.
|
|
44
|
+
* The common single-value read, without the `?.[0]` at every call site.
|
|
45
|
+
*/
|
|
46
|
+
function propertyValue(props, key) {
|
|
47
|
+
return props[key]?.[0];
|
|
48
|
+
}
|
|
49
|
+
//#endregion
|
|
50
|
+
export { getAllProperties, getAllPropertyKeys, getPropertiesByFormat, getPropertyMetadata, isValidProperty, propertyValue, propertyValues };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,cAAc,sBAAsB,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { PROPERTIES, fromTagLibKey, mp4AtomWireKey, mp4FreeformAtomNames, remapKeysFromTagLib, toTagLibKey } from "./constants/properties.js";
|
|
2
|
+
import { FormatMappings } from "./constants/format-mappings.js";
|
|
3
|
+
import { getAllProperties, getAllPropertyKeys, getPropertiesByFormat, getPropertyMetadata, isValidProperty, propertyValue, propertyValues } from "./constants/utilities.js";
|
|
4
|
+
import "./constants/index.js";
|
|
5
|
+
export { FormatMappings, PROPERTIES, fromTagLibKey, getAllProperties, getAllPropertyKeys, getPropertiesByFormat, getPropertyMetadata, isValidProperty, mp4AtomWireKey, mp4FreeformAtomNames, propertyValue, propertyValues, remapKeysFromTagLib, toTagLibKey };
|
|
@@ -24,8 +24,10 @@ export declare const WASM_EMBED_SEARCH_PATHS: readonly string[];
|
|
|
24
24
|
* Initialize TagLib with automatic handling for Deno compiled binaries.
|
|
25
25
|
*
|
|
26
26
|
* In compiled binaries, this function attempts to load embedded WASM from a
|
|
27
|
-
* specified path relative to the binary. If the embedded WASM is not found
|
|
28
|
-
* or
|
|
27
|
+
* specified path relative to the binary. If the embedded WASM is not found —
|
|
28
|
+
* or when running from source — it falls back to the Wasm resolved from this
|
|
29
|
+
* package, which exists in a development tree but not inside a compiled
|
|
30
|
+
* binary: a binary built without `--include` fails to initialize.
|
|
29
31
|
*
|
|
30
32
|
* @param embeddedWasmPath - Path to embedded WASM file (default: './taglib-web.wasm')
|
|
31
33
|
* @returns Promise resolving to initialized TagLib instance
|
|
@@ -0,0 +1 @@
|
|
|
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;;;;;;;;;;;;;;;;;;;;;;;GAuBG;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"}
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
import { FileOperationError } from "./errors/classes.js";
|
|
2
|
+
import { TagLib } from "./taglib/taglib-class.js";
|
|
3
|
+
import "./taglib.js";
|
|
4
|
+
import { isDenoCompiled } from "./runtime/deno-detect.js";
|
|
5
|
+
import { fileUrlToPath } from "./utils/path.js";
|
|
6
|
+
//#region src/deno-compile.ts
|
|
7
|
+
/**
|
|
8
|
+
* @fileoverview Helper utilities for using TagLib-Wasm in Deno compiled binaries
|
|
9
|
+
*
|
|
10
|
+
* This module provides simplified initialization for offline usage in compiled
|
|
11
|
+
* Deno binaries, with automatic detection and embedded WASM loading.
|
|
12
|
+
*
|
|
13
|
+
* @module taglib-wasm/deno-compile
|
|
14
|
+
*/
|
|
15
|
+
/**
|
|
16
|
+
* Where {@link prepareWasmForEmbedding} looks for the Emscripten binary, in
|
|
17
|
+
* order, resolved relative to this module.
|
|
18
|
+
*
|
|
19
|
+
* `build/` comes first deliberately: it holds the committed, authoritative
|
|
20
|
+
* artifact, while `dist/` is gitignored scratch that only the npm chain
|
|
21
|
+
* (`build:copy-wasm`/`postbuild`) refreshes. A stale `dist/` in a working
|
|
22
|
+
* checkout would otherwise silently shadow a freshly built binary. Published
|
|
23
|
+
* packages ship no `build/` (it is absent from package.json's `files`), so
|
|
24
|
+
* resolution there falls through to `dist/` exactly as before.
|
|
25
|
+
*/
|
|
26
|
+
const WASM_EMBED_SEARCH_PATHS = [
|
|
27
|
+
"../build/taglib-web.wasm",
|
|
28
|
+
"../dist/taglib-web.wasm",
|
|
29
|
+
"./node_modules/taglib-wasm/dist/taglib-web.wasm"
|
|
30
|
+
];
|
|
31
|
+
/**
|
|
32
|
+
* Initialize TagLib with automatic handling for Deno compiled binaries.
|
|
33
|
+
*
|
|
34
|
+
* In compiled binaries, this function attempts to load embedded WASM from a
|
|
35
|
+
* specified path relative to the binary. If the embedded WASM is not found —
|
|
36
|
+
* or when running from source — it falls back to the Wasm resolved from this
|
|
37
|
+
* package, which exists in a development tree but not inside a compiled
|
|
38
|
+
* binary: a binary built without `--include` fails to initialize.
|
|
39
|
+
*
|
|
40
|
+
* @param embeddedWasmPath - Path to embedded WASM file (default: './taglib-web.wasm')
|
|
41
|
+
* @returns Promise resolving to initialized TagLib instance
|
|
42
|
+
*
|
|
43
|
+
* @example
|
|
44
|
+
* ```typescript
|
|
45
|
+
* // Basic usage with default path
|
|
46
|
+
* const taglib = await initializeForDenoCompile();
|
|
47
|
+
*
|
|
48
|
+
* // Custom embedded WASM path
|
|
49
|
+
* const taglib = await initializeForDenoCompile('./assets/taglib-web.wasm');
|
|
50
|
+
*
|
|
51
|
+
* // Compile command:
|
|
52
|
+
* // deno compile --allow-read --include taglib-web.wasm myapp.ts
|
|
53
|
+
* ```
|
|
54
|
+
*/
|
|
55
|
+
async function initializeForDenoCompile(embeddedWasmPath = "./taglib-web.wasm") {
|
|
56
|
+
if (isDenoCompiled()) {
|
|
57
|
+
const strategies = [
|
|
58
|
+
() => Deno.readFile(new URL(embeddedWasmPath, Deno.mainModule)),
|
|
59
|
+
() => Deno.readFile(new URL(embeddedWasmPath, import.meta.url)),
|
|
60
|
+
() => Deno.readFile(embeddedWasmPath)
|
|
61
|
+
];
|
|
62
|
+
for (const strategy of strategies) try {
|
|
63
|
+
const wasmBinary = await strategy();
|
|
64
|
+
return await TagLib.initialize({
|
|
65
|
+
wasmBinary,
|
|
66
|
+
forceWasmType: "emscripten"
|
|
67
|
+
});
|
|
68
|
+
} catch {}
|
|
69
|
+
console.warn(`Could not load embedded WASM from ${embeddedWasmPath}`);
|
|
70
|
+
console.warn("Falling back to network fetch (requires --allow-net)");
|
|
71
|
+
}
|
|
72
|
+
return await TagLib.initialize({ forceWasmType: "emscripten" });
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* Helper function to prepare a WASM file for embedding in a compiled binary.
|
|
76
|
+
* This function copies the WASM file from node_modules to a local path.
|
|
77
|
+
*
|
|
78
|
+
* @param outputPath - Where to save the WASM file (default: './taglib-web.wasm')
|
|
79
|
+
*
|
|
80
|
+
* @example
|
|
81
|
+
* ```typescript
|
|
82
|
+
* // In your build script:
|
|
83
|
+
* await prepareWasmForEmbedding('./assets/taglib-web.wasm');
|
|
84
|
+
*
|
|
85
|
+
* // Then compile with:
|
|
86
|
+
* // deno compile --allow-read --include assets/taglib-web.wasm myapp.ts
|
|
87
|
+
* ```
|
|
88
|
+
*/
|
|
89
|
+
async function prepareWasmForEmbedding(outputPath = "./taglib-web.wasm") {
|
|
90
|
+
try {
|
|
91
|
+
const possiblePaths = WASM_EMBED_SEARCH_PATHS.map((p) => new URL(p, import.meta.url));
|
|
92
|
+
let wasmData = null;
|
|
93
|
+
let sourcePath = null;
|
|
94
|
+
for (const path of possiblePaths) try {
|
|
95
|
+
wasmData = await Deno.readFile(path);
|
|
96
|
+
sourcePath = fileUrlToPath(path);
|
|
97
|
+
break;
|
|
98
|
+
} catch {}
|
|
99
|
+
if (!wasmData || !sourcePath) throw new FileOperationError("read", "Could not find taglib-web.wasm in expected locations");
|
|
100
|
+
await Deno.writeFile(outputPath, wasmData);
|
|
101
|
+
console.log(`WASM file copied from ${sourcePath} to ${outputPath}`);
|
|
102
|
+
console.log(`Include this file when compiling: deno compile --include ${outputPath} ...`);
|
|
103
|
+
} catch (error) {
|
|
104
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
105
|
+
throw new FileOperationError("read", `Failed to prepare WASM for embedding: ${message}`);
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
//#endregion
|
|
109
|
+
export { WASM_EMBED_SEARCH_PATHS, initializeForDenoCompile, isDenoCompiled, prepareWasmForEmbedding };
|
package/dist/disc-folder.d.ts
CHANGED
|
@@ -14,8 +14,8 @@
|
|
|
14
14
|
* discFolderInfo("CD1"); // { kind: "exact", number: 1, ... }
|
|
15
15
|
* ```
|
|
16
16
|
*/
|
|
17
|
-
export { discFolderInfo } from "./
|
|
18
|
-
export { groupAlbums } from "./
|
|
19
|
-
export type { AlbumDisc, AlbumGroup, AlbumGroupingResult, AlbumGroupItem, AlbumGroupKey, DiscConfidence, DiscFolderInfo, GroupAlbumsOptions, } from "./
|
|
20
|
-
export type { FolderScanResult } from "./
|
|
17
|
+
export { discFolderInfo } from "./folder-api/folder-disc.js";
|
|
18
|
+
export { groupAlbums } from "./folder-api/album-grouping.js";
|
|
19
|
+
export type { AlbumDisc, AlbumGroup, AlbumGroupingResult, AlbumGroupItem, AlbumGroupKey, DiscConfidence, DiscFolderInfo, GroupAlbumsOptions, } from "./folder-api/album-types.js";
|
|
20
|
+
export type { FolderScanResult } from "./folder-api/types.js";
|
|
21
21
|
//# sourceMappingURL=disc-folder.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"disc-folder.d.ts","sourceRoot":"","sources":["../disc-folder.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAGH,OAAO,EAAE,cAAc,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"disc-folder.d.ts","sourceRoot":"","sources":["../src/disc-folder.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAGH,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAC7D,OAAO,EAAE,WAAW,EAAE,MAAM,gCAAgC,CAAC;AAC7D,YAAY,EACV,SAAS,EACT,UAAU,EACV,mBAAmB,EACnB,cAAc,EACd,aAAa,EACb,cAAc,EACd,cAAc,EACd,kBAAkB,GACnB,MAAM,6BAA6B,CAAC;AACrC,YAAY,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC"}
|