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)
This commit is contained in:
1 parent
66d06ef48a
commit
96f6a7fe91
13 files changed
+570
-94
No files matched your search
+1
-1
@@ -9,7 +9,7 @@
|
||||
"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/smoke-test.ts"
|
||||
"test": "pnpm run typecheck && node test/source-simple-test.ts && node test/smoke-test.ts"
|
||||
},
|
||||
"dependencies": {
|
||||
"@fastify/cors": "^11.3.0",
|
||||
|
||||
Reference in new issue
Block a user