[wasm] fix: properly export function to fetch package version

This commit is contained in:
鲁树人 2024-09-19 00:03:52 +01:00
parent a149b4e469
commit 5748d92af4
3 changed files with 8 additions and 5 deletions

View File

@ -1,6 +1,6 @@
{ {
"name": "@unlock-music/crypto", "name": "@unlock-music/crypto",
"version": "0.0.0-alpha.14", "version": "0.0.0-alpha.15",
"description": "Project Unlock Music: 加解密支持库", "description": "Project Unlock Music: 加解密支持库",
"scripts": { "scripts": {
"build": "node build.js", "build": "node build.js",

View File

@ -1,2 +1,9 @@
export * from '../pkg/um_wasm'; export * from '../pkg/um_wasm';
/**
* Get package version.
* @returns {string}
*/
export function getUmcVersion(): string;
export const ready: Promise<void>; export const ready: Promise<void>;

View File

@ -21,10 +21,6 @@ function loader() {
} }
} }
/**
* Get package version.
* @returns {string}
*/
export function getUmcVersion() { export function getUmcVersion() {
return process.env.UMC_VERSION; return process.env.UMC_VERSION;
} }