Files
MusicServer/package.json
T
snowy-yang 96f6a7fe91 feat(source): 外部音源迁 src/ 并新增 source-simple 进程内直载
- apis/source(.ivm).ts → src/source(.ivm).ts(音源属服务端职责,不入 SDK)
- 新增 src/source-simple.ts:sources/*.mjs 进程内直载(getMusicUrl 极简契约),
  与 *.js 的 IVM 沙箱(globalThis.lx 契约)按扩展名混排候选链,失败降权冷却
- server 挂载决策:SOURCE_ENABLED 非 0/false 启用,/url 取流分流到外部音源;
  音源模式下登录态不参与取流,自动续期不启动(手动 /login/refresh 仍可用)
- 新增 src/env.ts(.env 最先加载)与 test/source-simple-test.ts(并入 pnpm test)
2026-10-01 16:35:08 +08:00

34 lines
922 B
JSON

{
"name": "music-server",
"version": "1.0.0",
"description": "多平台音乐聚合服务器",
"type": "module",
"main": "sdk/index.ts",
"packageManager": "pnpm@12.4.1",
"scripts": {
"typecheck": "tsc",
"start": "node src/server.ts",
"dev": "node --watch-path=./src --watch-path=./sdk --watch-path=./sources --watch --watch-preserve-output src/server.ts",
"test": "pnpm run typecheck && node test/source-simple-test.ts && node test/smoke-test.ts"
},
"dependencies": {
"@fastify/cors": "^11.3.0",
"@fastify/swagger": "^9.8.1",
"@fastify/swagger-ui": "^6.1.1",
"crypto-js": "^4.2.0",
"fastify": "^5.12.1",
"iconv-lite": "^0.6.3",
"isolated-vm": "^7.0.1",
"pako": "^2.1.0",
"qrcode": "^1.5.4"
},
"devDependencies": {
"@types/node": "^26.4.0",
"playwright": "^1.62.1",
"typescript": "^7.0.2"
},
"engines": {
"node": ">=22.18"
}
}