taglib-wasm 2.3.0 → 2.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +2 -2
- package/README.md +72 -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/constants/properties.d.ts +43 -0
- 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} +8 -2
- package/dist/deno-compile.d.ts.map +1 -0
- package/dist/deno-compile.js +113 -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 +4106 -4479
- 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 +19 -0
- package/dist/runtime/deno-detect.d.ts.map +1 -0
- package/dist/runtime/deno-detect.js +26 -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 +168 -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 +3405 -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 +138 -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-wasi.wasm +0 -0
- package/dist/taglib.d.ts.map +1 -0
- package/dist/taglib.js +7 -0
- package/dist/{src/types → types}/audio-formats.d.ts +5 -1
- 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 +3169 -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 +136 -100
- 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 +0 -877
- 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 +0 -8
- 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}/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}/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 @@
|
|
|
1
|
+
{"version":3,"file":"file.d.ts","sourceRoot":"","sources":["../../src/utils/file.ts"],"names":[],"mappings":"AAGA;;;GAGG;AACH,wBAAsB,YAAY,CAChC,IAAI,EAAE,MAAM,GAAG,UAAU,GAAG,WAAW,GAAG,IAAI,GAC7C,OAAO,CAAC,UAAU,CAAC,CAoBrB;AAED,2DAA2D;AAC3D,wBAAsB,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAQ/D;AAED,2DAA2D;AAC3D,wBAAsB,mBAAmB,CACvC,IAAI,EAAE,MAAM,EACZ,UAAU,EAAE,MAAM,EAClB,UAAU,EAAE,MAAM,GACjB,OAAO,CAAC,UAAU,CAAC,CAgBrB"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { EnvironmentError, FileOperationError } from "../errors/classes.js";
|
|
2
|
+
import "../errors.js";
|
|
3
|
+
import { getPlatformIO } from "../runtime/platform-io.js";
|
|
4
|
+
//#region src/utils/file.ts
|
|
5
|
+
/**
|
|
6
|
+
* Read a file's data from various sources.
|
|
7
|
+
* Supports file paths (Node.js/Deno/Bun), buffers, and File objects (browser).
|
|
8
|
+
*/
|
|
9
|
+
async function readFileData(file) {
|
|
10
|
+
if (file instanceof Uint8Array) return file;
|
|
11
|
+
if (file instanceof ArrayBuffer) return new Uint8Array(file);
|
|
12
|
+
if (typeof File !== "undefined" && file instanceof File) return new Uint8Array(await file.arrayBuffer());
|
|
13
|
+
if (typeof file === "string") try {
|
|
14
|
+
return await getPlatformIO().readFile(file);
|
|
15
|
+
} catch (error) {
|
|
16
|
+
if (error instanceof EnvironmentError) throw error;
|
|
17
|
+
throw new FileOperationError("read", error.message, file);
|
|
18
|
+
}
|
|
19
|
+
const inputType = Object.prototype.toString.call(file);
|
|
20
|
+
throw new FileOperationError("read", `Invalid file input type: ${inputType}. Expected string path, Uint8Array, ArrayBuffer, or File object.`);
|
|
21
|
+
}
|
|
22
|
+
/** Get the size of a file without reading its contents. */
|
|
23
|
+
async function getFileSize(path) {
|
|
24
|
+
try {
|
|
25
|
+
return (await getPlatformIO().stat(path)).size;
|
|
26
|
+
} catch (error) {
|
|
27
|
+
if (error instanceof EnvironmentError) throw error;
|
|
28
|
+
throw new FileOperationError("stat", error.message, path);
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
/** Read partial file data (header and footer sections). */
|
|
32
|
+
async function readPartialFileData(path, headerSize, footerSize) {
|
|
33
|
+
const io = getPlatformIO();
|
|
34
|
+
if (!io.readPartial) throw new EnvironmentError("current runtime", "does not support partial file reading", "filesystem access with seek support");
|
|
35
|
+
try {
|
|
36
|
+
return await io.readPartial(path, headerSize, footerSize);
|
|
37
|
+
} catch (error) {
|
|
38
|
+
if (error instanceof EnvironmentError) throw error;
|
|
39
|
+
throw new FileOperationError("read", error.message, path);
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
//#endregion
|
|
43
|
+
export { getFileSize, readFileData, readPartialFileData };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mirror-fields.d.ts","sourceRoot":"","sources":["../../src/utils/mirror-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EAAE,WAAW,EAClB,KAAK,EAAE,MAAM,GACZ,IAAI,CAQN;AAED;;;;GAIG;AACH,wBAAgB,iBAAiB,CAC/B,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC7B,KAAK,EAAE,WAAW,GACjB,MAAM,CAIR"}
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
//#region src/utils/mirror-fields.ts
|
|
2
|
+
const MIRROR_FIELDS = [{
|
|
3
|
+
raw: "date",
|
|
4
|
+
numeric: "year"
|
|
5
|
+
}, {
|
|
6
|
+
raw: "trackNumber",
|
|
7
|
+
numeric: "track"
|
|
8
|
+
}];
|
|
9
|
+
/**
|
|
10
|
+
* Leading integer of a raw field value, or `undefined` when it does not parse.
|
|
11
|
+
* The single definition of the narrowing convention: `parseInt` semantics, so
|
|
12
|
+
* "3/12" is 3 and "03" is 3, and a non-numeric value has no mirror at all.
|
|
13
|
+
*/
|
|
14
|
+
function parseLeadingInt(raw) {
|
|
15
|
+
const parsed = Number.parseInt(raw, 10);
|
|
16
|
+
return Number.isNaN(parsed) ? void 0 : parsed;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* The two pairs by name. Exported so callers need no unchecked cast over a
|
|
20
|
+
* lookup that can return undefined — renaming a field in MIRROR_FIELDS then
|
|
21
|
+
* fails at build time here instead of throwing at the first read.
|
|
22
|
+
*/
|
|
23
|
+
const DATE_MIRROR = MIRROR_FIELDS[0];
|
|
24
|
+
const TRACK_MIRROR = MIRROR_FIELDS[1];
|
|
25
|
+
/** The pair whose raw key is `key`, if any. */
|
|
26
|
+
function mirrorForRawKey(key) {
|
|
27
|
+
return MIRROR_FIELDS.find((f) => f.raw === key);
|
|
28
|
+
}
|
|
29
|
+
/** The pair whose numeric key is `key`, if any. */
|
|
30
|
+
function mirrorForNumericKey(key) {
|
|
31
|
+
return MIRROR_FIELDS.find((f) => f.numeric === key);
|
|
32
|
+
}
|
|
33
|
+
/** True when a value is present — tolerates the scalar/array shapes tagData mixes. */
|
|
34
|
+
function hasValue(v) {
|
|
35
|
+
if (Array.isArray(v)) return v.length > 0;
|
|
36
|
+
return v !== void 0 && v !== null && v !== "";
|
|
37
|
+
}
|
|
38
|
+
/** Stringify a primitive scalar; non-primitive values yield "". */
|
|
39
|
+
function stringifyScalar(v) {
|
|
40
|
+
const t = typeof v;
|
|
41
|
+
return t === "string" || t === "number" || t === "boolean" || t === "bigint" || t === "symbol" ? String(v) : "";
|
|
42
|
+
}
|
|
43
|
+
/** First element of an array value, or the scalar itself, as a string. */
|
|
44
|
+
function firstValueString(v) {
|
|
45
|
+
if (Array.isArray(v)) {
|
|
46
|
+
const first = v[0];
|
|
47
|
+
return stringifyScalar(first);
|
|
48
|
+
}
|
|
49
|
+
return v === void 0 || v === null ? "" : stringifyScalar(v);
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* True when `key` is a numeric mirror whose raw partner currently holds a value.
|
|
53
|
+
*
|
|
54
|
+
* Both keys translate to one wire key, so emitting both would collide — the raw
|
|
55
|
+
* string wins because it carries strictly more information. Used by the WASI
|
|
56
|
+
* property snapshot and by the msgpack encoder, which previously each inlined
|
|
57
|
+
* their own copy of this test.
|
|
58
|
+
*/
|
|
59
|
+
function isShadowedNumericMirror(data, key) {
|
|
60
|
+
const field = mirrorForNumericKey(key);
|
|
61
|
+
return field !== void 0 && hasValue(data[field.raw]);
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* Stage a RAW write: store the string and re-derive the mirror. An empty value
|
|
65
|
+
* list clears the field, which is what lets `clearTags()` remove it under WASI's
|
|
66
|
+
* merge model; an unparseable value drops the mirror rather than leaving a stale
|
|
67
|
+
* number behind. Mutates `target`.
|
|
68
|
+
*/
|
|
69
|
+
function stageRawWrite(target, field, values) {
|
|
70
|
+
const first = values[0] ?? "";
|
|
71
|
+
if (values.length === 0 || first === "") {
|
|
72
|
+
delete target[field.raw];
|
|
73
|
+
delete target[field.numeric];
|
|
74
|
+
return;
|
|
75
|
+
}
|
|
76
|
+
target[field.raw] = [...values];
|
|
77
|
+
const narrowed = parseLeadingInt(first);
|
|
78
|
+
if (narrowed === void 0) delete target[field.numeric];
|
|
79
|
+
else target[field.numeric] = narrowed;
|
|
80
|
+
}
|
|
81
|
+
/**
|
|
82
|
+
* Stage a NUMERIC write from the typed `tag()` surface: the number is
|
|
83
|
+
* authoritative, so the raw mirror is replaced rather than merged — a stale
|
|
84
|
+
* "3/12" must not shadow a newly set 7. A non-positive value is a clear, not a
|
|
85
|
+
* renumbering. Mutates `target`.
|
|
86
|
+
*/
|
|
87
|
+
function stageNumericWrite(target, field, value) {
|
|
88
|
+
if (value > 0) {
|
|
89
|
+
target[field.numeric] = value;
|
|
90
|
+
target[field.raw] = [String(value)];
|
|
91
|
+
} else {
|
|
92
|
+
delete target[field.numeric];
|
|
93
|
+
delete target[field.raw];
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
/**
|
|
97
|
+
* Numeric value for the typed surface: the mirror when present, otherwise
|
|
98
|
+
* narrowed from the raw string so a handle that only ever saw the raw value
|
|
99
|
+
* still reports a number.
|
|
100
|
+
*/
|
|
101
|
+
function readNumericMirror(data, field) {
|
|
102
|
+
const mirror = data[field.numeric];
|
|
103
|
+
if (typeof mirror === "number" && mirror !== 0) return mirror;
|
|
104
|
+
return parseLeadingInt(firstValueString(data[field.raw])) ?? 0;
|
|
105
|
+
}
|
|
106
|
+
//#endregion
|
|
107
|
+
export { DATE_MIRROR, MIRROR_FIELDS, TRACK_MIRROR, firstValueString, isShadowedNumericMirror, mirrorForNumericKey, mirrorForRawKey, parseLeadingInt, readNumericMirror, stageNumericWrite, stageRawWrite, stringifyScalar };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"node-fs.d.ts","sourceRoot":"","sources":["../../src/utils/node-fs.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,0EAA0E;AAC1E,MAAM,MAAM,UAAU,GAAG;IACvB,QAAQ,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC;IACpC,YAAY,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,UAAU,CAAC;CAC5C,CAAC;AAcF;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,aAAa,IAAI,UAAU,GAAG,IAAI,CAmBjD"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
//#region src/utils/node-fs.ts
|
|
2
|
+
function hasFsShape(fs) {
|
|
3
|
+
const candidate = fs;
|
|
4
|
+
return typeof candidate?.statSync === "function" && typeof candidate?.readFileSync === "function";
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* Acquire node:fs synchronously without tripping bundlers.
|
|
8
|
+
*
|
|
9
|
+
* `process.getBuiltinModule("node:fs")` is the primary strategy: it is
|
|
10
|
+
* synchronous, works in both ESM and CJS, and exists on every supported
|
|
11
|
+
* runtime (added in Node 22.3.0, backported to 20.16.0; the package's
|
|
12
|
+
* `engines` floor of node >= 22.6.0 gates installs, while Electron's
|
|
13
|
+
* embedded Node has shipped it since Electron 32). The legacy fallback
|
|
14
|
+
* reads `globalThis.require` directly — equivalent to evaluating
|
|
15
|
+
* `require(...)` in the global scope, which never resolves in standard
|
|
16
|
+
* module files — kept only for contexts that expose `require` globally
|
|
17
|
+
* (Electron renderers with nodeIntegration, node -e, the REPL) on runtimes
|
|
18
|
+
* predating getBuiltinModule. Results are shape-checked so a polyfilled
|
|
19
|
+
* `process` serving junk modules escalates to the next strategy instead of
|
|
20
|
+
* leaking a non-fs object to callers.
|
|
21
|
+
*/
|
|
22
|
+
function getNodeFsSync() {
|
|
23
|
+
const proc = globalThis.process;
|
|
24
|
+
try {
|
|
25
|
+
const fs = proc?.getBuiltinModule?.("node:fs");
|
|
26
|
+
if (hasFsShape(fs)) return fs;
|
|
27
|
+
} catch {}
|
|
28
|
+
try {
|
|
29
|
+
const g = globalThis;
|
|
30
|
+
const fs = typeof g.require === "function" ? g.require("node:fs") : void 0;
|
|
31
|
+
if (hasFsShape(fs)) return fs;
|
|
32
|
+
} catch {}
|
|
33
|
+
return null;
|
|
34
|
+
}
|
|
35
|
+
//#endregion
|
|
36
|
+
export { getNodeFsSync };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"path.d.ts","sourceRoot":"","sources":["../../src/utils/path.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;GAGG;AACH,wBAAgB,aAAa,CAAC,GAAG,EAAE,GAAG,GAAG,MAAM,CAK9C;AAED,0EAA0E;AAC1E,wBAAgB,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAG7C;AAED,4DAA4D;AAC5D,wBAAgB,QAAQ,CAAC,GAAG,QAAQ,EAAE,MAAM,EAAE,GAAG,MAAM,CAEtD;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,mBAAmB,CACjC,QAAQ,EAAE,MAAM,EAChB,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAC/B,MAAM,GAAG,SAAS,CAqBpB"}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
//#region src/utils/path.ts
|
|
2
|
+
/**
|
|
3
|
+
* Cross-platform path utilities that work in Deno, Node, Bun, and browsers
|
|
4
|
+
* without depending on @std/path or node:path.
|
|
5
|
+
*/
|
|
6
|
+
/**
|
|
7
|
+
* Convert a file:// URL to an OS filesystem path.
|
|
8
|
+
* On Windows, url.pathname returns "/C:/path" — this strips the leading slash.
|
|
9
|
+
*/
|
|
10
|
+
function fileUrlToPath(url) {
|
|
11
|
+
const p = decodeURIComponent(url.pathname);
|
|
12
|
+
if (/^\/[A-Za-z]:/.test(p)) return p.slice(1);
|
|
13
|
+
return p;
|
|
14
|
+
}
|
|
15
|
+
/** Extract the filename from a path (handles both / and \ separators). */
|
|
16
|
+
function basename(path) {
|
|
17
|
+
const i = Math.max(path.lastIndexOf("/"), path.lastIndexOf("\\"));
|
|
18
|
+
return i === -1 ? path : path.slice(i + 1);
|
|
19
|
+
}
|
|
20
|
+
/** Join path segments with the OS-appropriate separator. */
|
|
21
|
+
function joinPath(...segments) {
|
|
22
|
+
return segments.filter(Boolean).join("/").replaceAll(/\/+/g, "/");
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* The host path behind a WASI path, given the preopen map the guest was started
|
|
26
|
+
* with (`WasiHostLoaderConfig.preopens`): the inverse of the virtual-path
|
|
27
|
+
* mapping the host resolves `path_open` through, and the only way host-side code
|
|
28
|
+
* can read the same file the guest reads. On Windows the map is the drive list
|
|
29
|
+
* (`{"/C": "C:\\"}`), so `/C/music/a.mp3` is `C:\music\a.mp3`; on POSIX it is
|
|
30
|
+
* the identity (`{"/": "/"}`).
|
|
31
|
+
*
|
|
32
|
+
* Returns undefined for a path no preopen covers — the guest cannot open that
|
|
33
|
+
* path either, so there is nothing on the host side to read.
|
|
34
|
+
*/
|
|
35
|
+
function hostPathForPreopens(wasiPath, preopens) {
|
|
36
|
+
let best;
|
|
37
|
+
for (const [virtualPath, realPath] of Object.entries(preopens)) {
|
|
38
|
+
const prefix = virtualPath.replace(/\/+$/, "");
|
|
39
|
+
if (wasiPath === prefix) return realPath;
|
|
40
|
+
if (!wasiPath.startsWith(`${prefix}/`)) continue;
|
|
41
|
+
if (best && prefix.length <= best.prefixLength) continue;
|
|
42
|
+
best = {
|
|
43
|
+
realPath,
|
|
44
|
+
rest: wasiPath.slice(prefix.length + 1),
|
|
45
|
+
prefixLength: prefix.length
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
if (!best) return void 0;
|
|
49
|
+
return joinPath(best.realPath, best.rest);
|
|
50
|
+
}
|
|
51
|
+
//#endregion
|
|
52
|
+
export { basename, fileUrlToPath, hostPathForPreopens, joinPath };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rating.d.ts","sourceRoot":"","sources":["../../src/utils/rating.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH,KAAK,KA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;;;GAKG;AACH,wBAAgB,OAAO,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,IAAI,gBAAgB,CAOlE;AAED;;GAEG;AACH,eAAO,MAAM,WAAW;;;;;;;;;;;;;;CAcd,CAAC"}
|
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
//#region src/utils/rating.ts
|
|
2
|
+
/** Create a NormalizedRating from a plain number. */
|
|
3
|
+
function normalized(value) {
|
|
4
|
+
return value;
|
|
5
|
+
}
|
|
6
|
+
/** Create a PopmRating from a plain number. */
|
|
7
|
+
function popm(value) {
|
|
8
|
+
return value;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Convert POPM value (0-255) to normalized (0.0-1.0).
|
|
12
|
+
* Precision-preserving linear conversion.
|
|
13
|
+
*
|
|
14
|
+
* @param value - POPM rating value (0-255)
|
|
15
|
+
* @returns Normalized rating (0.0-1.0)
|
|
16
|
+
*/
|
|
17
|
+
function toNormalized(value) {
|
|
18
|
+
return value / 255;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Convert normalized (0.0-1.0) to POPM value (0-255).
|
|
22
|
+
* Precision-preserving linear conversion.
|
|
23
|
+
*
|
|
24
|
+
* @param value - Normalized rating (0.0-1.0)
|
|
25
|
+
* @returns POPM rating value (0-255)
|
|
26
|
+
*/
|
|
27
|
+
function fromNormalized(value) {
|
|
28
|
+
return Math.round(value * 255);
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Convert normalized rating to star value.
|
|
32
|
+
*
|
|
33
|
+
* @param value - Normalized rating (0.0-1.0)
|
|
34
|
+
* @param maxStars - Maximum star count (default: 5)
|
|
35
|
+
* @returns Star rating (0 to maxStars)
|
|
36
|
+
*/
|
|
37
|
+
function toStars(value, maxStars = 5) {
|
|
38
|
+
return Math.round(value * maxStars);
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Convert star rating to normalized value.
|
|
42
|
+
*
|
|
43
|
+
* @param stars - Star rating
|
|
44
|
+
* @param maxStars - Maximum star count (default: 5)
|
|
45
|
+
* @returns Normalized rating (0.0-1.0)
|
|
46
|
+
*/
|
|
47
|
+
function fromStars(stars, maxStars = 5) {
|
|
48
|
+
return stars / maxStars;
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* Standard POPM values for 5-star ratings.
|
|
52
|
+
* This mapping is widely used by media players (Windows Media Player, etc.)
|
|
53
|
+
*
|
|
54
|
+
* 0 = unrated
|
|
55
|
+
* 1 = 1 star
|
|
56
|
+
* 64 = 2 stars
|
|
57
|
+
* 128 = 3 stars
|
|
58
|
+
* 196 = 4 stars
|
|
59
|
+
* 255 = 5 stars
|
|
60
|
+
*/
|
|
61
|
+
const POPM_STAR_VALUES = [
|
|
62
|
+
0,
|
|
63
|
+
1,
|
|
64
|
+
64,
|
|
65
|
+
128,
|
|
66
|
+
196,
|
|
67
|
+
255
|
|
68
|
+
];
|
|
69
|
+
/**
|
|
70
|
+
* Convert normalized rating to standard POPM value.
|
|
71
|
+
* Uses the widely-adopted 5-star to POPM mapping.
|
|
72
|
+
*
|
|
73
|
+
* @param value - Normalized rating (0.0-1.0)
|
|
74
|
+
* @returns POPM value (0, 1, 64, 128, 196, or 255)
|
|
75
|
+
*/
|
|
76
|
+
function toPopm(value) {
|
|
77
|
+
const stars = Math.round(value * 5);
|
|
78
|
+
return POPM_STAR_VALUES[stars] ?? 0;
|
|
79
|
+
}
|
|
80
|
+
/**
|
|
81
|
+
* Convert POPM value to normalized rating using standard mapping.
|
|
82
|
+
* Handles the full 0-255 range by mapping to nearest star level.
|
|
83
|
+
*
|
|
84
|
+
* @param value - POPM rating value (0-255)
|
|
85
|
+
* @returns Normalized rating (0.0, 0.2, 0.4, 0.6, 0.8, or 1.0)
|
|
86
|
+
*/
|
|
87
|
+
function fromPopm(value) {
|
|
88
|
+
if (value === 0) return 0;
|
|
89
|
+
if (value <= 1) return .2;
|
|
90
|
+
if (value <= 64) return .4;
|
|
91
|
+
if (value <= 128) return .6;
|
|
92
|
+
if (value <= 196) return .8;
|
|
93
|
+
return 1;
|
|
94
|
+
}
|
|
95
|
+
/**
|
|
96
|
+
* Convert normalized rating to percentage.
|
|
97
|
+
*
|
|
98
|
+
* @param value - Normalized rating (0.0-1.0)
|
|
99
|
+
* @returns Percentage (0-100)
|
|
100
|
+
*/
|
|
101
|
+
function toPercent(value) {
|
|
102
|
+
return value * 100;
|
|
103
|
+
}
|
|
104
|
+
/**
|
|
105
|
+
* Convert percentage to normalized rating.
|
|
106
|
+
*
|
|
107
|
+
* @param percent - Percentage (0-100)
|
|
108
|
+
* @returns Normalized rating (0.0-1.0)
|
|
109
|
+
*/
|
|
110
|
+
function fromPercent(percent) {
|
|
111
|
+
return percent / 100;
|
|
112
|
+
}
|
|
113
|
+
/**
|
|
114
|
+
* Clamp a rating to the valid normalized range.
|
|
115
|
+
*
|
|
116
|
+
* @param rating - Rating value to clamp
|
|
117
|
+
* @returns Rating clamped to 0.0-1.0
|
|
118
|
+
*/
|
|
119
|
+
function clamp(rating) {
|
|
120
|
+
return Math.max(0, Math.min(1, rating));
|
|
121
|
+
}
|
|
122
|
+
/**
|
|
123
|
+
* Check if a rating is valid (within 0.0-1.0 range).
|
|
124
|
+
*
|
|
125
|
+
* @param rating - Rating value to check
|
|
126
|
+
* @returns True if rating is valid
|
|
127
|
+
*/
|
|
128
|
+
function isValid(rating) {
|
|
129
|
+
return typeof rating === "number" && !Number.isNaN(rating) && rating >= 0 && rating <= 1;
|
|
130
|
+
}
|
|
131
|
+
/**
|
|
132
|
+
* Namespace export for convenient grouped access.
|
|
133
|
+
*/
|
|
134
|
+
const RatingUtils = {
|
|
135
|
+
normalized,
|
|
136
|
+
popm,
|
|
137
|
+
toNormalized,
|
|
138
|
+
fromNormalized,
|
|
139
|
+
toStars,
|
|
140
|
+
fromStars,
|
|
141
|
+
toPopm,
|
|
142
|
+
fromPopm,
|
|
143
|
+
toPercent,
|
|
144
|
+
fromPercent,
|
|
145
|
+
clamp,
|
|
146
|
+
isValid,
|
|
147
|
+
POPM_STAR_VALUES
|
|
148
|
+
};
|
|
149
|
+
//#endregion
|
|
150
|
+
export { RatingUtils, clamp, fromNormalized, fromPercent, fromPopm, fromStars, isValid, normalized, popm, toNormalized, toPercent, toPopm, toStars };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tag-mapping.d.ts","sourceRoot":"","sources":["../../src/utils/tag-mapping.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,mCAAmC,CAAC;AACnE,OAAO,KAAK,EAAE,WAAW,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAqCtE;;;;;;;GAOG;AACH,wBAAgB,eAAe,CAC7B,SAAS,EAAE,SAAS,EACpB,iBAAiB,CAAC,EAAE,MAAM,EAAE,GAC3B,WAAW,CAwCb;AAED,wBAAgB,0BAA0B,CAAC,KAAK,EAAE,WAAW,GAAG,WAAW,CA+F1E;AAED;;;;;;GAMG;AACH,wBAAgB,mBAAmB,CACjC,YAAY,EAAE,WAAW,EACzB,IAAI,EAAE,OAAO,CAAC,QAAQ,CAAC,GACtB,WAAW,CAYb;AAED,wBAAgB,eAAe,CAC7B,IAAI,EAAE,SAAS,EACf,IAAI,EAAE,OAAO,CAAC,QAAQ,CAAC,GACtB,IAAI,CAEN;AAqDD,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,OAAO,CAAC,QAAQ,CAAC,GAAG,WAAW,CAsFvE"}
|
|
@@ -0,0 +1,207 @@
|
|
|
1
|
+
import { fromTagLibKey } from "../constants/properties.js";
|
|
2
|
+
import { parseLeadingInt } from "./mirror-fields.js";
|
|
3
|
+
//#region src/utils/tag-mapping.ts
|
|
4
|
+
const BASIC_PROPERTY_KEYS = {
|
|
5
|
+
title: "title",
|
|
6
|
+
artist: "artist",
|
|
7
|
+
album: "album",
|
|
8
|
+
comment: "comment",
|
|
9
|
+
genre: "genre",
|
|
10
|
+
date: "year",
|
|
11
|
+
trackNumber: "track"
|
|
12
|
+
};
|
|
13
|
+
const BASIC_FIELDS = /* @__PURE__ */ new Set([
|
|
14
|
+
"title",
|
|
15
|
+
"artist",
|
|
16
|
+
"album",
|
|
17
|
+
"comment",
|
|
18
|
+
"genre",
|
|
19
|
+
"year",
|
|
20
|
+
"date",
|
|
21
|
+
"track",
|
|
22
|
+
"trackNumber"
|
|
23
|
+
]);
|
|
24
|
+
const NUMERIC_FIELDS = /* @__PURE__ */ new Set([
|
|
25
|
+
"year",
|
|
26
|
+
"track",
|
|
27
|
+
"discNumber",
|
|
28
|
+
"totalTracks",
|
|
29
|
+
"totalDiscs",
|
|
30
|
+
"bpm"
|
|
31
|
+
]);
|
|
32
|
+
/**
|
|
33
|
+
* Build a complete ExtendedTag from an open file: the text PropertyMap PLUS the
|
|
34
|
+
* structured fields that ride their own accessors (pictures, ratings, lyrics,
|
|
35
|
+
* chapters, bext/bextData, ixml). readTags and the batch readers share this so
|
|
36
|
+
* the structured ExtendedTag fields are actually populated, not just declared
|
|
37
|
+
* (taglib-0co). Each field is included only when present, mirroring how
|
|
38
|
+
* {@link mapPropertiesToExtendedTag} omits absent text properties.
|
|
39
|
+
*/
|
|
40
|
+
function readExtendedTag(audioFile, includeProperties) {
|
|
41
|
+
const props = audioFile.properties();
|
|
42
|
+
const tag = mapPropertiesToExtendedTag(props);
|
|
43
|
+
const pictures = audioFile.getPictures();
|
|
44
|
+
if (pictures.length > 0) tag.pictures = pictures;
|
|
45
|
+
const ratings = audioFile.getRatings();
|
|
46
|
+
if (ratings.length > 0) tag.ratings = ratings;
|
|
47
|
+
const lyrics = audioFile.getLyrics();
|
|
48
|
+
if (lyrics.length > 0) tag.lyrics = lyrics;
|
|
49
|
+
const chapters = audioFile.getChapters();
|
|
50
|
+
if (chapters.length > 0) tag.chapters = chapters;
|
|
51
|
+
const bext = audioFile.getBext();
|
|
52
|
+
if (bext !== void 0) tag.bext = bext;
|
|
53
|
+
const bextData = audioFile.getBextData();
|
|
54
|
+
if (bextData !== void 0) tag.bextData = bextData;
|
|
55
|
+
const ixml = audioFile.getIxml();
|
|
56
|
+
if (ixml !== void 0) tag.ixml = ixml;
|
|
57
|
+
if (includeProperties !== void 0 && includeProperties.length > 0) {
|
|
58
|
+
const extraProperties = {};
|
|
59
|
+
for (const wireKey of includeProperties) {
|
|
60
|
+
const values = props[fromTagLibKey(wireKey)]?.filter((v) => v !== "");
|
|
61
|
+
if (values !== void 0 && values.length > 0) extraProperties[wireKey] = values;
|
|
62
|
+
}
|
|
63
|
+
if (Object.keys(extraProperties).length > 0) tag.extraProperties = extraProperties;
|
|
64
|
+
}
|
|
65
|
+
return tag;
|
|
66
|
+
}
|
|
67
|
+
function mapPropertiesToExtendedTag(props) {
|
|
68
|
+
const tag = {};
|
|
69
|
+
for (const [propKey, tagField] of Object.entries(BASIC_PROPERTY_KEYS)) {
|
|
70
|
+
const values = props[propKey];
|
|
71
|
+
if (!values || values.length === 0) continue;
|
|
72
|
+
if (tagField === "year" || tagField === "track") {
|
|
73
|
+
const num = parseLeadingInt(values[0]);
|
|
74
|
+
if (num !== void 0) tag[tagField] = num;
|
|
75
|
+
if (propKey === "date") tag.date = values.length === 1 ? values[0] : values;
|
|
76
|
+
if (propKey === "trackNumber") tag.trackNumber = values.length === 1 ? values[0] : values;
|
|
77
|
+
} else tag[tagField] = values;
|
|
78
|
+
}
|
|
79
|
+
for (const [propKey, totalField] of [["trackNumber", "totalTracks"], ["discNumber", "totalDiscs"]]) {
|
|
80
|
+
if (tag[totalField] !== void 0) continue;
|
|
81
|
+
const raw = props[propKey]?.[0];
|
|
82
|
+
const slash = raw?.indexOf("/") ?? -1;
|
|
83
|
+
if (raw === void 0 || slash === -1) continue;
|
|
84
|
+
const total = parseLeadingInt(raw.slice(slash + 1));
|
|
85
|
+
if (total !== void 0) tag[totalField] = total;
|
|
86
|
+
}
|
|
87
|
+
if (tag.date === void 0) {
|
|
88
|
+
const yearValues = props["YEAR"];
|
|
89
|
+
if (yearValues !== void 0 && yearValues.length > 0) {
|
|
90
|
+
const y = parseLeadingInt(yearValues[0]);
|
|
91
|
+
if (y !== void 0) tag.year = y;
|
|
92
|
+
tag.date = yearValues.length === 1 ? yearValues[0] : yearValues;
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
for (const [key, values] of Object.entries(props)) {
|
|
96
|
+
if (BASIC_PROPERTY_KEYS[key]) continue;
|
|
97
|
+
if (key === "YEAR") continue;
|
|
98
|
+
if (!values || values.length === 0) continue;
|
|
99
|
+
const camelKey = fromTagLibKey(key);
|
|
100
|
+
if (NUMERIC_FIELDS.has(camelKey)) {
|
|
101
|
+
const num = parseLeadingInt(values[0]);
|
|
102
|
+
if (num !== void 0) tag[camelKey] = num;
|
|
103
|
+
} else if (camelKey === "compilation") tag[camelKey] = values[0] === "1" || values[0] === "true";
|
|
104
|
+
else if (camelKey === "itunesAdvisory") {
|
|
105
|
+
tag[camelKey] = values;
|
|
106
|
+
if (values[0] === "1") tag.advisory = "explicit";
|
|
107
|
+
else if (values[0] === "2") tag.advisory = "clean";
|
|
108
|
+
else if (values[0] === "0") tag.advisory = "unspecified";
|
|
109
|
+
} else if (camelKey === "r128TrackGain" || camelKey === "r128AlbumGain") {
|
|
110
|
+
const raw = parseLeadingInt(values[0]);
|
|
111
|
+
if (raw !== void 0) tag[camelKey] = raw / 256;
|
|
112
|
+
} else tag[camelKey] = values;
|
|
113
|
+
}
|
|
114
|
+
return tag;
|
|
115
|
+
}
|
|
116
|
+
/**
|
|
117
|
+
* Pure read-modify-write merge of typed tag input into an existing property
|
|
118
|
+
* map, WITHOUT touching the file. Shared by {@link mergeTagUpdates} (the
|
|
119
|
+
* single-file path) and the batch writer, which must fold raw wire-key
|
|
120
|
+
* entries and removals into the SAME map so one `setProperties` call reaches
|
|
121
|
+
* the replace-style Emscripten backend (taglib-pmhp review).
|
|
122
|
+
*/
|
|
123
|
+
function mergeTagUpdatesInto(currentProps, tags) {
|
|
124
|
+
const newProps = normalizeTagInput(tags);
|
|
125
|
+
reconcilePairFields(currentProps, newProps, tags);
|
|
126
|
+
if (newProps.date !== void 0 || newProps.year !== void 0) currentProps.YEAR = [];
|
|
127
|
+
return {
|
|
128
|
+
...currentProps,
|
|
129
|
+
...newProps
|
|
130
|
+
};
|
|
131
|
+
}
|
|
132
|
+
function mergeTagUpdates(file, tags) {
|
|
133
|
+
file.setProperties(mergeTagUpdatesInto(file.properties(), tags));
|
|
134
|
+
}
|
|
135
|
+
/**
|
|
136
|
+
* Reconcile the two ways a track/disc pair can be expressed, against the value
|
|
137
|
+
* the file already has. Only this function has all three inputs — the current
|
|
138
|
+
* properties, the normalized update, and the caller's original intent — which is
|
|
139
|
+
* why neither `normalizeTagInput` (a pure transform, blind to the file) nor the
|
|
140
|
+
* `tag()` surface (blind to the update) can do it.
|
|
141
|
+
*
|
|
142
|
+
* Two rules, both learned from getting them wrong:
|
|
143
|
+
*
|
|
144
|
+
* - Setting only the NUMBER preserves an existing total. `tag().setTrack(5)` on
|
|
145
|
+
* a "3/12" yields "5/12", and `applyTags({track: 5})` used to yield "5" — the
|
|
146
|
+
* same intent producing different files.
|
|
147
|
+
* - A new raw pair supersedes any existing separate total. Spreading
|
|
148
|
+
* `currentProps` first meant a stale `totalTracks` of 5 could survive next to
|
|
149
|
+
* a new "3/12" and contradict it.
|
|
150
|
+
*/
|
|
151
|
+
function reconcilePairFields(currentProps, newProps, input) {
|
|
152
|
+
for (const [rawKey, totalKey, numericKey] of [[
|
|
153
|
+
"trackNumber",
|
|
154
|
+
"totalTracks",
|
|
155
|
+
"track"
|
|
156
|
+
], [
|
|
157
|
+
"discNumber",
|
|
158
|
+
"totalDiscs",
|
|
159
|
+
"discNumber"
|
|
160
|
+
]]) {
|
|
161
|
+
const incoming = newProps[rawKey]?.[0];
|
|
162
|
+
if (incoming?.includes("/")) {
|
|
163
|
+
newProps[totalKey] = [];
|
|
164
|
+
continue;
|
|
165
|
+
}
|
|
166
|
+
if (!(input[numericKey] !== void 0 && input[rawKey] === void 0) || incoming === void 0) continue;
|
|
167
|
+
const existing = currentProps[rawKey]?.[0];
|
|
168
|
+
const slash = existing?.indexOf("/") ?? -1;
|
|
169
|
+
if (existing !== void 0 && slash !== -1) newProps[rawKey] = [`${incoming}${existing.slice(slash)}`];
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
function normalizeTagInput(input) {
|
|
173
|
+
const props = {};
|
|
174
|
+
for (const field of [
|
|
175
|
+
"title",
|
|
176
|
+
"artist",
|
|
177
|
+
"album",
|
|
178
|
+
"comment",
|
|
179
|
+
"genre"
|
|
180
|
+
]) {
|
|
181
|
+
const val = input[field];
|
|
182
|
+
if (val === void 0) continue;
|
|
183
|
+
props[field] = Array.isArray(val) ? val : [val];
|
|
184
|
+
}
|
|
185
|
+
if (input.year !== void 0) props.date = [String(input.year)];
|
|
186
|
+
if (input.date !== void 0) props.date = Array.isArray(input.date) ? input.date : [input.date];
|
|
187
|
+
if (input.track !== void 0) props.trackNumber = [String(input.track)];
|
|
188
|
+
if (input.trackNumber !== void 0) props.trackNumber = Array.isArray(input.trackNumber) ? input.trackNumber : [input.trackNumber];
|
|
189
|
+
for (const [field, val] of Object.entries(input)) {
|
|
190
|
+
if (BASIC_FIELDS.has(field) || val === void 0) continue;
|
|
191
|
+
if (field === "extraProperties") continue;
|
|
192
|
+
if (field === "compilation") props[field] = [val ? "1" : "0"];
|
|
193
|
+
else if (field === "advisory") {
|
|
194
|
+
if (val === "explicit") props.itunesAdvisory = ["1"];
|
|
195
|
+
else if (val === "clean") props.itunesAdvisory = ["2"];
|
|
196
|
+
else if (val === "unspecified") props.itunesAdvisory = [];
|
|
197
|
+
} else if (field === "bpm") props[field] = [String(Math.trunc(val))];
|
|
198
|
+
else if (NUMERIC_FIELDS.has(field)) props[field] = [String(val)];
|
|
199
|
+
else if (field === "r128TrackGain" || field === "r128AlbumGain") props[field] = Array.isArray(val) ? val : [String(Math.round(val * 256))];
|
|
200
|
+
else if (typeof val === "string") props[field] = [val];
|
|
201
|
+
else if (Array.isArray(val)) props[field] = val;
|
|
202
|
+
}
|
|
203
|
+
for (const [rawField, totalField] of [["trackNumber", "totalTracks"], ["discNumber", "totalDiscs"]]) if (props[rawField]?.[0]?.includes("/")) delete props[totalField];
|
|
204
|
+
return props;
|
|
205
|
+
}
|
|
206
|
+
//#endregion
|
|
207
|
+
export { mapPropertiesToExtendedTag, mergeTagUpdates, mergeTagUpdatesInto, normalizeTagInput, readExtendedTag };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"write.d.ts","sourceRoot":"","sources":["../../src/utils/write.ts"],"names":[],"mappings":"AAGA;;;GAGG;AACH,wBAAsB,aAAa,CACjC,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,UAAU,GACf,OAAO,CAAC,IAAI,CAAC,CAOf"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { EnvironmentError, FileOperationError } from "../errors/classes.js";
|
|
2
|
+
import "../errors.js";
|
|
3
|
+
import { getPlatformIO } from "../runtime/platform-io.js";
|
|
4
|
+
//#region src/utils/write.ts
|
|
5
|
+
/**
|
|
6
|
+
* Write data to a file across different runtimes.
|
|
7
|
+
* Supports Node.js, Deno, and Bun environments.
|
|
8
|
+
*/
|
|
9
|
+
async function writeFileData(path, data) {
|
|
10
|
+
try {
|
|
11
|
+
await getPlatformIO().writeFile(path, data);
|
|
12
|
+
} catch (error) {
|
|
13
|
+
if (error instanceof EnvironmentError) throw error;
|
|
14
|
+
throw new FileOperationError("write", error.message, path);
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
//#endregion
|
|
18
|
+
export { writeFileData };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"version.d.ts","sourceRoot":"","sources":["../src/version.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,OAAO,UAAU,CAAC"}
|
package/dist/version.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"wasm.d.ts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