Compare commits
No commits in common. "a149b4e4690b4dc7b84fb275cbb08451fad10c4f" and "b1605f65bacee24495216943713d23513e1f6db9" have entirely different histories.
a149b4e469
...
b1605f65ba
@ -1,5 +1,5 @@
|
|||||||
use crate::errors::map_js_error;
|
use crate::errors::map_js_error;
|
||||||
use umc_qmc::footer::{Data as FooterData, FooterParseError};
|
use umc_qmc::footer::FooterParseError;
|
||||||
use umc_qmc::QMCv2Cipher;
|
use umc_qmc::QMCv2Cipher;
|
||||||
use wasm_bindgen::prelude::wasm_bindgen;
|
use wasm_bindgen::prelude::wasm_bindgen;
|
||||||
use wasm_bindgen::JsError;
|
use wasm_bindgen::JsError;
|
||||||
@ -57,13 +57,4 @@ impl JsQMCFooter {
|
|||||||
pub fn size(&self) -> usize {
|
pub fn size(&self) -> usize {
|
||||||
self.0.size
|
self.0.size
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Get media name (MusicEx)
|
|
||||||
#[wasm_bindgen(getter, js_name=mediaName)]
|
|
||||||
pub fn get_media_name(&self) -> Option<String> {
|
|
||||||
match &self.0.data {
|
|
||||||
FooterData::PCv2MusicEx(metadata) => Some(metadata.media_filename.clone()),
|
|
||||||
_ => None,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@unlock-music/crypto",
|
"name": "@unlock-music/crypto",
|
||||||
"version": "0.0.0-alpha.14",
|
"version": "0.0.0-alpha.13",
|
||||||
"description": "Project Unlock Music: 加解密支持库",
|
"description": "Project Unlock Music: 加解密支持库",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "node build.js",
|
"build": "node build.js",
|
||||||
|
@ -2,9 +2,6 @@ import { defineConfig } from 'rollup';
|
|||||||
import { wasm } from '@rollup/plugin-wasm';
|
import { wasm } from '@rollup/plugin-wasm';
|
||||||
import replace from '@rollup/plugin-replace';
|
import replace from '@rollup/plugin-replace';
|
||||||
import { dts } from 'rollup-plugin-dts';
|
import { dts } from 'rollup-plugin-dts';
|
||||||
import { readFileSync } from 'node:fs';
|
|
||||||
|
|
||||||
const pkgJson = JSON.parse(readFileSync(new URL('package.json', import.meta.url), 'utf-8'));
|
|
||||||
|
|
||||||
function makePlugins({ sync }) {
|
function makePlugins({ sync }) {
|
||||||
const plugins = [];
|
const plugins = [];
|
||||||
@ -19,7 +16,6 @@ function makePlugins({ sync }) {
|
|||||||
preventAssignment: true,
|
preventAssignment: true,
|
||||||
values: {
|
values: {
|
||||||
'process.env.UMC_INLINE_BUILD': JSON.stringify(String(sync ? 1 : 0)),
|
'process.env.UMC_INLINE_BUILD': JSON.stringify(String(sync ? 1 : 0)),
|
||||||
'process.env.UMC_VERSION': JSON.stringify(pkgJson.version),
|
|
||||||
},
|
},
|
||||||
}),
|
}),
|
||||||
);
|
);
|
||||||
|
@ -21,12 +21,4 @@ function loader() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Get package version.
|
|
||||||
* @returns {string}
|
|
||||||
*/
|
|
||||||
export function getUmcVersion() {
|
|
||||||
return process.env.UMC_VERSION;
|
|
||||||
}
|
|
||||||
|
|
||||||
export const ready = loader();
|
export const ready = loader();
|
||||||
|
Loading…
Reference in New Issue
Block a user