Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
Constaline committed Feb 26, 2024
1 parent 1fa2154 commit 37ee88f
Show file tree
Hide file tree
Showing 24 changed files with 1,636 additions and 615 deletions.
10 changes: 5 additions & 5 deletions lib/UnblockNeteaseMusic/.github/workflows/build-binaries.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,15 +37,15 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: Use Node.js 18
uses: actions/setup-node@v3
- name: Use Node.js 20
uses: actions/setup-node@v4
with:
node-version: 18
node-version: 20
cache: yarn

- name: Set up QEMU
id: qemu
uses: docker/setup-qemu-action@v2
uses: docker/setup-qemu-action@v3
with:
image: tonistiigi/binfmt:latest
platforms: all
Expand All @@ -63,7 +63,7 @@ jobs:
echo "ASSET_NAME=$(ls dist)" >> $GITHUB_ENV
- name: Publishing to GitHub Artifacts
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
if: github.event_name != 'release'
with:
name: ${{ env.ASSET_NAME }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@ jobs:
- name: Cleanup precompiled
run: rm -rf precompiled/*

- name: Use Node.js 18
uses: actions/setup-node@v3
- name: Use Node.js 20
uses: actions/setup-node@v4
with:
node-version: 18
node-version: 20
cache: yarn

- name: Install dependencies
Expand All @@ -39,7 +39,7 @@ jobs:
run: yarn build

- name: Create Pull Request
uses: peter-evans/create-pull-request@v5
uses: peter-evans/create-pull-request@v6
with:
token: ${{ github.token }}
commit-message: 'build(precompiled): make a bundle with the dependencies'
Expand Down
6 changes: 3 additions & 3 deletions lib/UnblockNeteaseMusic/.github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ jobs:

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
Expand All @@ -65,7 +65,7 @@ jobs:
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v2
uses: github/codeql-action/autobuild@v3

# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl
Expand All @@ -79,4 +79,4 @@ jobs:
# make release

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
uses: github/codeql-action/analyze@v3
6 changes: 3 additions & 3 deletions lib/UnblockNeteaseMusic/.github/workflows/jest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,10 @@ jobs:
- name: Checkout
uses: actions/checkout@v4

- name: Use Node.js 18
uses: actions/setup-node@v3
- name: Use Node.js 20
uses: actions/setup-node@v4
with:
node-version: 18
node-version: 20
cache: yarn

- name: Install dependencies
Expand Down
8 changes: 4 additions & 4 deletions lib/UnblockNeteaseMusic/.github/workflows/prettier.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ jobs:
- name: Checkout
uses: actions/checkout@v4

- name: Use Node.js 18
uses: actions/setup-node@v3
- name: Use Node.js 20
uses: actions/setup-node@v4
with:
node-version: 18
node-version: 20
cache: yarn

- name: Install dependencies
Expand All @@ -32,7 +32,7 @@ jobs:
run: yarn prettier -w .

- name: Create Pull Request
uses: peter-evans/create-pull-request@v5
uses: peter-evans/create-pull-request@v6
with:
token: ${{ github.token }}
commit-message: 'style: with prettier [skip ci]'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ jobs:
uses: actions/checkout@v4

# Setup .npmrc file to publish to npm
- uses: actions/setup-node@v3
- uses: actions/setup-node@v4
with:
node-version: '18.x'
node-version: 20

- run: yarn
- run: yarn npm publish
Expand All @@ -38,9 +38,9 @@ jobs:
uses: actions/checkout@v4

# Setup .npmrc file to publish to npm
- uses: actions/setup-node@v3
- uses: actions/setup-node@v4
with:
node-version: '18.x'
node-version: 20

- run: yarn
- run: yarn npm publish
Expand Down
12 changes: 6 additions & 6 deletions lib/UnblockNeteaseMusic/.github/workflows/push-docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,23 +32,23 @@ jobs:
uses: actions/checkout@v4

- name: Get the current tag name
uses: olegtarasov/get-tag@v2.1.2
uses: olegtarasov/get-tag@2.1.3
id: tagName

- name: Set up QEMU
uses: docker/setup-qemu-action@v2
uses: docker/setup-qemu-action@v3

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
uses: docker/setup-buildx-action@v3

- name: Login to DockerHub
uses: docker/login-action@v2
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Build and push the latest version
uses: docker/build-push-action@v4
uses: docker/build-push-action@v5
if: github.event_name != 'release'
with:
context: .
Expand All @@ -59,7 +59,7 @@ jobs:
cache-to: type=gha,mode=max

- name: Build and push the released version
uses: docker/build-push-action@v4
uses: docker/build-push-action@v5
if: github.event_name == 'release'
with:
context: .
Expand Down
875 changes: 875 additions & 0 deletions lib/UnblockNeteaseMusic/.yarn/releases/yarn-3.7.0.cjs

Large diffs are not rendered by default.

20 changes: 20 additions & 0 deletions lib/UnblockNeteaseMusic/.yarn/sdks/prettier/bin/prettier.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/usr/bin/env node

const {existsSync} = require(`fs`);
const {createRequire} = require(`module`);
const {resolve} = require(`path`);

const relPnpApiPath = "../../../../.pnp.cjs";

const absPnpApiPath = resolve(__dirname, relPnpApiPath);
const absRequire = createRequire(absPnpApiPath);

if (existsSync(absPnpApiPath)) {
if (!process.versions.pnp) {
// Setup the environment to be able to require prettier/bin/prettier.cjs
require(absPnpApiPath).setup();
}
}

// Defer to the real prettier/bin/prettier.cjs your application uses
module.exports = absRequire(`prettier/bin/prettier.cjs`);
20 changes: 20 additions & 0 deletions lib/UnblockNeteaseMusic/.yarn/sdks/prettier/index.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/usr/bin/env node

const {existsSync} = require(`fs`);
const {createRequire} = require(`module`);
const {resolve} = require(`path`);

const relPnpApiPath = "../../../.pnp.cjs";

const absPnpApiPath = resolve(__dirname, relPnpApiPath);
const absRequire = createRequire(absPnpApiPath);

if (existsSync(absPnpApiPath)) {
if (!process.versions.pnp) {
// Setup the environment to be able to require prettier
require(absPnpApiPath).setup();
}
}

// Defer to the real prettier your application uses
module.exports = absRequire(`prettier`);
7 changes: 4 additions & 3 deletions lib/UnblockNeteaseMusic/.yarn/sdks/prettier/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"name": "prettier",
"version": "3.0.3-sdk",
"main": "./index.js",
"type": "commonjs"
"version": "3.2.5-sdk",
"main": "./index.cjs",
"type": "commonjs",
"bin": "./bin/prettier.cjs"
}
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ const absRequire = createRequire(absPnpApiPath);

if (existsSync(absPnpApiPath)) {
if (!process.versions.pnp) {
// Setup the environment to be able to require typescript/lib/typescript.js
// Setup the environment to be able to require typescript
require(absPnpApiPath).setup();
}
}

// Defer to the real typescript/lib/typescript.js your application uses
module.exports = absRequire(`typescript/lib/typescript.js`);
// Defer to the real typescript your application uses
module.exports = absRequire(`typescript`);
8 changes: 6 additions & 2 deletions lib/UnblockNeteaseMusic/.yarn/sdks/typescript/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
{
"name": "typescript",
"version": "5.2.2-sdk",
"version": "5.3.3-sdk",
"main": "./lib/typescript.js",
"type": "commonjs"
"type": "commonjs",
"bin": {
"tsc": "./bin/tsc",
"tsserver": "./bin/tsserver"
}
}
2 changes: 1 addition & 1 deletion lib/UnblockNeteaseMusic/.yarnrc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ plugins:
- path: .yarn/plugins/@yarnpkg/plugin-interactive-tools.cjs
spec: '@yarnpkg/plugin-interactive-tools'

yarnPath: .yarn/releases/yarn-3.6.3.cjs
yarnPath: .yarn/releases/yarn-3.7.0.cjs
1 change: 1 addition & 0 deletions lib/UnblockNeteaseMusic/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,7 @@ node app.js -o bilibili ytdlp
| SIGN_CERT | path | 自定义证书文件 | `SIGN_CERT="./server.crt"` |
| SIGN_KEY | path | 自定义密钥文件 | `SIGN_KEY="./server.key"` |
| SEARCH_ALBUM | bool | 在其他音源搜索歌曲时携带专辑名称(默认搜索条件 `歌曲名 - 歌手`,启用后搜索条件 `歌曲名 - 歌手 专辑名`| `SEARCH_ALBUM=true` |
| NETEASE_COOKIE | str | 网易云 Cookie | `MUSIC_U=007554xxx` |
#### 日志等级 (`LOG_LEVEL`)
Expand Down
34 changes: 17 additions & 17 deletions lib/UnblockNeteaseMusic/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@unblockneteasemusic/server",
"version": "0.27.4",
"version": "0.27.5",
"description": "Revive unavailable songs for Netease Cloud Music",
"main": "src/provider/match.js",
"bin": {
Expand All @@ -22,10 +22,10 @@
"server.crt"
],
"targets": [
"node16-linux-arm64",
"node16-win-arm64",
"node16-linux-x64",
"node16-win-x64"
"node18-linux-arm64",
"node18-win-arm64",
"node18-linux-x64",
"node18-win-x64"
],
"outputPath": "dist"
},
Expand All @@ -41,20 +41,20 @@
"pino-pretty": "^7.6.1"
},
"devDependencies": {
"@swc/core": "^1.3.83",
"@types/node": "^20.5.9",
"@swc/core": "^1.4.2",
"@types/node": "^20.11.19",
"@types/pino": "6.3.12",
"@yarnpkg/sdks": "^3.0.0-rc.50",
"browserslist": "^4.21.10",
"core-js": "^3.32.1",
"@yarnpkg/sdks": "^3.1.0",
"browserslist": "^4.23.0",
"core-js": "^3.36.0",
"cross-env": "^7.0.3",
"jest": "^29.6.4",
"jest": "^29.7.0",
"pkg": "^5.8.1",
"prettier": "^3.0.3",
"swc-loader": "^0.2.3",
"terser-webpack-plugin": "^5.3.9",
"typescript": "^5.2.2",
"webpack": "^5.88.2",
"prettier": "^3.2.5",
"swc-loader": "^0.2.6",
"terser-webpack-plugin": "^5.3.10",
"typescript": "^5.3.3",
"webpack": "^5.90.3",
"webpack-cli": "^5.1.4"
},
"resolutions": {
Expand All @@ -66,5 +66,5 @@
"publishConfig": {
"access": "public"
},
"packageManager": "yarn@3.6.3"
"packageManager": "yarn@3.7.0"
}
6 changes: 3 additions & 3 deletions lib/UnblockNeteaseMusic/src/cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ const cli = {
.slice(1)
.split('')
.map((string) => '-' + string)
)
)
: result.concat(part),
[]
);
Expand Down Expand Up @@ -203,10 +203,10 @@ const help = () => {
` ${option[0]}${pad(align - option[0].length)} ${slice(
option[1]
)}`
)
)
: console.log(
` ${option[0]}\n${pad(align + 4)}${slice(option[1])}`
);
);
};
if (positionals.length) console.log('\npositional arguments:');
positionals.forEach(publish);
Expand Down
Loading

0 comments on commit 37ee88f

Please sign in to comment.