Skip to content

Commit 954366d

Browse files
authored
Upgrade Dependencies (#324)
* chore: Upgrade dependencies * fix(engines/joox): Remove unnecessary # in raw literal * chore: Update lockfiles * fix: Set the workspace resolver to v2 * chore(napi): Update index.js * chore(provider/pyncmd): Update host This is a reverse proxy of pyncmd.vercel.app. Ported: UnblockNeteaseMusic/server@1f17840 * refactor: cargo clippy
1 parent 735b29c commit 954366d

File tree

26 files changed

+687
-762
lines changed

26 files changed

+687
-762
lines changed

Cargo.lock

+495-457
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
[workspace]
2+
resolver = "2"
23
members = [
34
# Core
45
"engine-base",

api-utils/Cargo.toml

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ readme = "./README.md"
99
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
1010

1111
[dependencies]
12-
concat-idents = "1.1.4"
13-
log = "0.4.17"
12+
concat-idents = "1.1.5"
13+
log = "0.4.19"
1414
unm_engine = { version = "0.4.0", path = "../engine-base" }
1515
unm_engine_bilibili = { version = "0.4.0", path = "../engines/bilibili" }
1616
unm_engine_joox = { version = "0.4.0", path = "../engines/joox" }

crypto/Cargo.toml

+10-10
Original file line numberDiff line numberDiff line change
@@ -10,22 +10,22 @@ publish = false
1010
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
1111

1212
[dependencies]
13-
base64 = "0.21.0"
13+
base64 = "0.21.2"
1414
concat-string = "1.0.1"
1515
faster-hex = "0.6.1"
16-
log = "0.4.17"
16+
log = "0.4.19"
1717
md5 = "0.7.0"
18-
once_cell = "1.17.0"
19-
openssl = { version = "0.10.49", features = ["vendored"] }
18+
once_cell = "1.18.0"
19+
openssl = { version = "0.10.55", features = ["vendored"] }
2020

21-
regex = "1.7.1"
21+
regex = "1.9.1"
2222

23-
serde = { version = "1.0.152", features = ["derive"] }
24-
serde_json = "1.0.95"
25-
smallvec = { version = "1.10.0", features = ["union", "const_generics", "const_new"] }
23+
serde = { version = "1.0.180", features = ["derive"] }
24+
serde_json = "1.0.104"
25+
smallvec = { version = "1.11.0", features = ["union", "const_generics", "const_new"] }
2626

27-
thiserror = "1.0.40"
28-
url = "2.3.1"
27+
thiserror = "1.0.44"
28+
url = "2.4.0"
2929

3030
[features]
3131

engine-base/Cargo.toml

+5-5
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ readme = "../README.md"
99
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
1010

1111
[dependencies]
12-
anyhow = "1.0.70"
13-
async-trait = "0.1.63"
14-
futures = "0.3.25"
15-
log = "0.4.17"
16-
thiserror = "1.0.40"
12+
anyhow = "1.0.72"
13+
async-trait = "0.1.72"
14+
futures = "0.3.28"
15+
log = "0.4.19"
16+
thiserror = "1.0.44"
1717
unm_types = { version = "0.4.0", path = "../types" }

engine-base/src/executor.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -98,11 +98,11 @@ impl Executor {
9898
let mut futures = match ctx.search_mode {
9999
SearchMode::FastFirst => {
100100
debug!("Use SearchMode::FastFirst mode!");
101-
futures::stream::FuturesUnordered::from_iter(futures.into_iter()).boxed()
101+
futures::stream::FuturesUnordered::from_iter(futures).boxed()
102102
}
103103
SearchMode::OrderFirst => {
104104
debug!("Use SearchMode::OrderFirst mode!");
105-
futures::stream::FuturesOrdered::from_iter(futures.into_iter()).boxed()
105+
futures::stream::FuturesOrdered::from_iter(futures).boxed()
106106
}
107107
_ => unimplemented!(),
108108
};

engine-demo/Cargo.toml

+3-3
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ publish = false
1010
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
1111

1212
[dependencies]
13-
futures = "0.3.25"
14-
mimalloc = "0.1.34"
15-
tokio = { version = "1.25.0", features = ["macros", "rt-multi-thread"] }
13+
futures = "0.3.28"
14+
mimalloc = "0.1.37"
15+
tokio = { version = "1.29.1", features = ["macros", "rt-multi-thread"] }
1616
unm_api_utils = { version = "0.4.0", path = "../api-utils" }
1717
unm_test_utils = { version = "0.1.0", path = "../test-utils" }
1818
unm_types = { version = "0.4.0", path = "../types" }

engines/bilibili/Cargo.toml

+6-6
Original file line numberDiff line numberDiff line change
@@ -10,17 +10,17 @@ include = ["src/**/*"]
1010
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
1111

1212
[dependencies]
13-
anyhow = "1.0.70"
14-
async-trait = "0.1.63"
13+
anyhow = "1.0.72"
14+
async-trait = "0.1.72"
1515
http = "0.2.9"
16-
log = "0.4.17"
17-
serde = { version = "1.0.152", features = ["derive"] }
16+
log = "0.4.19"
17+
serde = { version = "1.0.180", features = ["derive"] }
1818
unm_engine = { version = "0.4.0", path = "../../engine-base" }
1919
unm_request = { version = "0.4.0", path = "../../request" }
2020
unm_selector = { version = "0.4.0", path = "../../selector" }
2121
unm_types = { version = "0.4.0", path = "../../types" }
22-
url = "2.3.1"
22+
url = "2.4.0"
2323

2424
[dev-dependencies]
25-
tokio = { version = "1.25.0", features = ["macros", "rt-multi-thread"] }
25+
tokio = { version = "1.29.1", features = ["macros", "rt-multi-thread"] }
2626
unm_test_utils = { path = "../../test-utils" }

engines/joox/Cargo.toml

+9-9
Original file line numberDiff line numberDiff line change
@@ -10,20 +10,20 @@ include = ["src/lib.rs"]
1010
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
1111

1212
[dependencies]
13-
anyhow = "1.0.70"
14-
async-trait = "0.1.63"
15-
base64 = "0.21.0"
13+
anyhow = "1.0.72"
14+
async-trait = "0.1.72"
15+
base64 = "0.21.2"
1616
http = "0.2.9"
17-
log = "0.4.17"
18-
once_cell = "1.17.0"
19-
regex = "1.7.1"
20-
reqwest = { version = "0.11.14", features = ["native-tls-vendored"] }
21-
serde_json = "1.0.95"
17+
log = "0.4.19"
18+
once_cell = "1.18.0"
19+
regex = "1.9.1"
20+
reqwest = { version = "0.11.18", features = ["native-tls-vendored"] }
21+
serde_json = "1.0.104"
2222
unm_engine = { version = "0.4.0", path = "../../engine-base" }
2323
unm_request = { version = "0.4.0", path = "../../request" }
2424
unm_selector = { version = "0.4.0", path = "../../selector" }
2525
unm_types = { version = "0.4.0", path = "../../types" }
2626

2727
[dev-dependencies]
28-
tokio = { version = "1.25.0", features = ["macros", "rt-multi-thread"] }
28+
tokio = { version = "1.29.1", features = ["macros", "rt-multi-thread"] }
2929
unm_test_utils = { path = "../../test-utils" }

engines/joox/src/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ impl Engine for JooxEngine {
121121
log::debug!("Retrieving with Joox Engine…");
122122

123123
let replace_audio_url_regex = REPLACE_AUDIO_URL_REGEX
124-
.get_or_init(|| Regex::new(r#"M\d00([\w]+).mp3"#).expect("should be constructable"));
124+
.get_or_init(|| Regex::new(r"M\d00([\w]+)\.mp3").expect("should be constructable"));
125125
let joox_cookie = get_cookie(ctx);
126126

127127
let client = build_client(ctx.proxy_uri.as_deref())?;

engines/kugou/Cargo.toml

+8-8
Original file line numberDiff line numberDiff line change
@@ -10,20 +10,20 @@ include = ["src/lib.rs"]
1010
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
1111

1212
[dependencies]
13-
anyhow = "1.0.70"
14-
async-trait = "0.1.63"
13+
anyhow = "1.0.72"
14+
async-trait = "0.1.72"
1515
concat-string = "1.0.1"
16-
futures = "0.3.25"
16+
futures = "0.3.28"
1717
http = "0.2.9"
18-
log = "0.4.17"
19-
reqwest = { version = "0.11.14", features = ["native-tls-vendored"] }
20-
serde = { version = "1.0.152", features = ["derive"] }
21-
serde_json = "1.0.95"
18+
log = "0.4.19"
19+
reqwest = { version = "0.11.18", features = ["native-tls-vendored"] }
20+
serde = { version = "1.0.180", features = ["derive"] }
21+
serde_json = "1.0.104"
2222
unm_engine = { version = "0.4.0", path = "../../engine-base" }
2323
unm_request = { version = "0.4.0", path = "../../request" }
2424
unm_selector = { version = "0.4.0", path = "../../selector" }
2525
unm_types = { version = "0.4.0", path = "../../types" }
2626

2727
[dev-dependencies]
28-
tokio = { version = "1.25.0", features = ["macros", "rt-multi-thread"] }
28+
tokio = { version = "1.29.1", features = ["macros", "rt-multi-thread"] }
2929
unm_test_utils = { path = "../../test-utils" }

engines/kuwo/Cargo.toml

+6-6
Original file line numberDiff line numberDiff line change
@@ -10,20 +10,20 @@ include = ["src/**/*"]
1010
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
1111

1212
[dependencies]
13-
anyhow = "1.0.70"
14-
async-trait = "0.1.63"
13+
anyhow = "1.0.72"
14+
async-trait = "0.1.72"
1515
cached = "0.42.0"
1616
concat-string = "1.0.1"
1717
http = "0.2.9"
18-
log = "0.4.17"
18+
log = "0.4.19"
1919
random-string = "1.0.0"
20-
reqwest = { version = "0.11.14", features = ["native-tls-vendored"] }
21-
serde = { version = "1.0.152", features = ["derive"] }
20+
reqwest = { version = "0.11.18", features = ["native-tls-vendored"] }
21+
serde = { version = "1.0.180", features = ["derive"] }
2222
unm_engine = { version = "0.4.0", path = "../../engine-base" }
2323
unm_request = { version = "0.4.0", path = "../../request" }
2424
unm_selector = { version = "0.4.0", path = "../../selector" }
2525
unm_types = { version = "0.4.0", path = "../../types" }
2626

2727
[dev-dependencies]
28-
tokio = { version = "1.25.0", features = ["macros", "rt-multi-thread"] }
28+
tokio = { version = "1.29.1", features = ["macros", "rt-multi-thread"] }
2929
unm_test_utils = { path = "../../test-utils" }

engines/migu/Cargo.toml

+8-8
Original file line numberDiff line numberDiff line change
@@ -10,19 +10,19 @@ include = ["src/**/*"]
1010
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
1111

1212
[dependencies]
13-
anyhow = "1.0.70"
14-
async-trait = "0.1.63"
13+
anyhow = "1.0.72"
14+
async-trait = "0.1.72"
1515
http = "0.2.9"
16-
log = "0.4.17"
17-
serde = { version = "1.0.152", features = ["derive"] }
18-
serde_json = "1.0.95"
16+
log = "0.4.19"
17+
serde = { version = "1.0.180", features = ["derive"] }
18+
serde_json = "1.0.104"
1919
unm_engine = { version = "0.4.0", path = "../../engine-base" }
2020
unm_request = { version = "0.4.0", path = "../../request" }
2121
unm_selector = { version = "0.4.0", path = "../../selector" }
2222
unm_types = { version = "0.4.0", path = "../../types" }
23-
url = "2.3.1"
23+
url = "2.4.0"
2424

2525
[dev-dependencies]
26-
reqwest = { version = "0.11.14", features = ["native-tls-vendored"] }
27-
tokio = { version = "1.25.0", features = ["macros", "rt-multi-thread"] }
26+
reqwest = { version = "0.11.18", features = ["native-tls-vendored"] }
27+
tokio = { version = "1.29.1", features = ["macros", "rt-multi-thread"] }
2828
unm_test_utils = { path = "../../test-utils" }

engines/pyncm/Cargo.toml

+6-6
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,16 @@ edition = "2021"
99
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
1010

1111
[dependencies]
12-
anyhow = "1.0.70"
13-
async-trait = "0.1.63"
12+
anyhow = "1.0.72"
13+
async-trait = "0.1.72"
1414
http = "0.2.9"
15-
log = "0.4.17"
16-
serde = { version = "1.0.152", features = ["derive"] }
15+
log = "0.4.19"
16+
serde = { version = "1.0.180", features = ["derive"] }
1717
unm_engine = { version = "0.4.0", path = "../../engine-base" }
1818
unm_request = { version = "0.4.0", path = "../../request" }
1919
unm_types = { version = "0.4.0", path = "../../types" }
20-
url = "2.3.1"
20+
url = "2.4.0"
2121

2222
[dev-dependencies]
23-
tokio = { version = "1.25.0", features = ["macros", "rt-multi-thread"] }
23+
tokio = { version = "1.29.1", features = ["macros", "rt-multi-thread"] }
2424
unm_test_utils = { path = "../../test-utils" }

engines/pyncm/src/lib.rs

+2-7
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
//! It can fetch audio from the unofficial
44
//! Netease Cloud Music API.
55
6-
use http::header::HOST;
76
use log::{debug, info};
87
use serde::Deserialize;
98
use unm_engine::interface::Engine;
@@ -85,16 +84,12 @@ async fn fetch_song_info(id: &str, ctx: &Context) -> anyhow::Result<PyNCMRespons
8584

8685
let bitrate = if ctx.enable_flac { 999000 } else { 320000 };
8786
let url = Url::parse_with_params(
88-
"http://76.76.21.21/api/pyncm?module=track&method=GetTrackAudio",
87+
"https://pyncmd.apis.imouto.in/api/pyncm?module=track&method=GetTrackAudio",
8988
&[("song_ids", id), ("bitrate", &bitrate.to_string())],
9089
)?;
9190

9291
let client = build_client(ctx.proxy_uri.as_deref())?;
93-
let response = client
94-
.get(url)
95-
.header(HOST, "music.163-my-beloved.com")
96-
.send()
97-
.await?;
92+
let response = client.get(url).send().await?;
9893
Ok(response.json::<PyNCMResponse>().await?)
9994
}
10095

engines/qq/Cargo.toml

+13-13
Original file line numberDiff line numberDiff line change
@@ -10,28 +10,28 @@ include = ["src/**/*"]
1010
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
1111

1212
[dependencies]
13-
anyhow = "1.0.70"
14-
async-trait = "0.1.63"
13+
anyhow = "1.0.72"
14+
async-trait = "0.1.72"
1515
concat-string = "1.0.1"
1616
derive_builder = "0.12.0"
17-
fastrand = "1.8.0"
18-
futures = "0.3.25"
17+
fastrand = "1.9.0"
18+
futures = "0.3.28"
1919
http = "0.2.9"
20-
log = "0.4.17"
21-
once_cell = "1.17.0"
22-
regex = "1.7.1"
23-
reqwest = "0.11.14"
24-
serde = { version = "1.0.152", features = ["derive"] }
25-
serde_json = "1.0.95"
26-
thiserror = "1.0.40"
20+
log = "0.4.19"
21+
once_cell = "1.18.0"
22+
regex = "1.9.1"
23+
reqwest = "0.11.18"
24+
serde = { version = "1.0.180", features = ["derive"] }
25+
serde_json = "1.0.104"
26+
thiserror = "1.0.44"
2727
unm_engine = { version = "0.4.0", path = "../../engine-base" }
2828
unm_request = { version = "0.4.0", path = "../../request" }
2929
unm_selector = { version = "0.4.0", path = "../../selector" }
3030
unm_types = { version = "0.4.0", path = "../../types" }
31-
url = "2.3.1"
31+
url = "2.4.0"
3232

3333
[dev-dependencies]
34-
tokio = { version = "1.25.0", features = ["macros", "rt-multi-thread"] }
34+
tokio = { version = "1.29.1", features = ["macros", "rt-multi-thread"] }
3535
unm_test_utils = { path = "../../test-utils" }
3636

3737
[features]

engines/ytdl/Cargo.toml

+7-7
Original file line numberDiff line numberDiff line change
@@ -10,17 +10,17 @@ include = ["src/lib.rs"]
1010
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
1111

1212
[dependencies]
13-
anyhow = "1.0.70"
14-
async-trait = "0.1.63"
13+
anyhow = "1.0.72"
14+
async-trait = "0.1.72"
1515
concat-string = "1.0.1"
16-
log = "0.4.17"
17-
serde = { version = "1.0.152", features = ["derive"] }
18-
serde_json = "1.0.95"
19-
tokio = { version = "1.25.0", features = ["process"] }
16+
log = "0.4.19"
17+
serde = { version = "1.0.180", features = ["derive"] }
18+
serde_json = "1.0.104"
19+
tokio = { version = "1.29.1", features = ["process"] }
2020
unm_engine = { version = "0.4.0", path = "../../engine-base" }
2121
unm_types = { version = "0.4.0", path = "../../types" }
2222
winapi = "0.3.9"
2323

2424
[dev-dependencies]
25-
tokio = { version = "1.25.0", features = ["macros", "rt-multi-thread"] }
25+
tokio = { version = "1.29.1", features = ["macros", "rt-multi-thread"] }
2626
unm_test_utils = { path = "../../test-utils" }

napi/Cargo.toml

+4-4
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@ include = ["src/**/*", "README.md", "build.rs"]
1313
crate-type = ["cdylib"]
1414

1515
[dependencies]
16-
mimalloc = "0.1.34"
17-
napi = { version = "2.11.2", features = ["full"] }
18-
napi-derive = "2.11.1"
19-
simple_logger = "4.0.0"
16+
mimalloc = "0.1.37"
17+
napi = { version = "2.13.2", features = ["full"] }
18+
napi-derive = "2.13.0"
19+
simple_logger = "4.2.0"
2020
unm_api_utils = { version = "0.4.0", path = "../api-utils" }
2121
unm_engine = { version = "0.4.0", path = "../engine-base" }
2222
unm_types = { version = "0.4.0", path = "../types" }

napi/index.js

+7-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
/* tslint:disable */
2+
/* eslint-disable */
3+
/* prettier-ignore */
4+
5+
/* auto-generated by NAPI-RS */
6+
17
const { existsSync, readFileSync } = require('fs')
28
const { join } = require('path')
39

@@ -11,7 +17,7 @@ function isMusl() {
1117
// For Node 10
1218
if (!process.report || typeof process.report.getReport !== 'function') {
1319
try {
14-
const lddPath = require('child_process').execSync('which ldd').toString().trim();
20+
const lddPath = require('child_process').execSync('which ldd').toString().trim()
1521
return readFileSync(lddPath, 'utf8').includes('musl')
1622
} catch (e) {
1723
return true

0 commit comments

Comments
 (0)