mirror of
https://github.com/NeteaseCloudMusicApiEnhanced/api-enhanced.git
synced 2026-10-20 22:51:23 +08:00
bump 5.0.0
This commit is contained in:
@@ -14,15 +14,15 @@ jobs:
|
||||
include:
|
||||
- os: ubuntu-latest
|
||||
platform: linux
|
||||
target: node18-linux-x64
|
||||
target: node22-linux-x64
|
||||
output: precompiled/app
|
||||
- os: windows-latest
|
||||
platform: win
|
||||
target: node18-win-x64
|
||||
target: node22-win-x64
|
||||
output: precompiled/app.exe
|
||||
- os: macos-latest
|
||||
platform: macos
|
||||
target: node18-macos-x64
|
||||
target: node22-macos-x64
|
||||
output: precompiled/app
|
||||
|
||||
steps:
|
||||
@@ -32,7 +32,7 @@ jobs:
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@v6
|
||||
with:
|
||||
node-version: '18'
|
||||
node-version: '24'
|
||||
|
||||
- name: Setup pnpm
|
||||
run: npm install -g pnpm@9
|
||||
|
||||
@@ -163,7 +163,7 @@ docker run -d -p 3000:3000 moefurina/ncm-api:latest
|
||||
```bash
|
||||
#!/bin/bash
|
||||
export PORT=9000
|
||||
/var/lang/node16/bin/node app.js
|
||||
/var/lang/node22/bin/node app.js
|
||||
```
|
||||
4. 完成部署后,访问 API 网关的 URL 即可
|
||||
|
||||
|
||||
@@ -3,6 +3,17 @@ const fs = require('fs')
|
||||
const path = require('path')
|
||||
const tmpPath = require('os').tmpdir()
|
||||
|
||||
// engines 字段只在 npm/pnpm 安装时生效,直接 node app.js 不会被拦截,
|
||||
// 这里给出友好的最低版本检查(>=22,与 package.json engines 保持一致)
|
||||
const [major] = process.versions.node.split('.').map(Number)
|
||||
if (major < 22) {
|
||||
console.error(
|
||||
`[${new Date().toLocaleString()}] Node.js >= 22 is required (current: ${process.versions.node}). ` +
|
||||
'请升级 Node.js 后重试 / Please upgrade Node.js to v22 or newer.',
|
||||
)
|
||||
process.exit(1)
|
||||
}
|
||||
|
||||
async function start() {
|
||||
// 检测是否存在 anonymous_token 文件,没有则生成
|
||||
if (!fs.existsSync(path.resolve(tmpPath, 'anonymous_token'))) {
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@neteasecloudmusicapienhanced/api",
|
||||
"version": "4.41.1",
|
||||
"version": "5.0.0",
|
||||
"description": "全网最全的网易云音乐API接口 || A revival project for NeteaseCloudMusicApi Node.js Services (Half Refactor & Enhanced)",
|
||||
"scripts": {
|
||||
"dev": "nodemon app.js",
|
||||
|
||||
Reference in New Issue
Block a user