mirror of
https://github.com/HighCapable/YukiHookAPI-ProjectBuilder.git
synced 2025-09-01 08:15:27 +08:00
Fix YukiHookAPI releases version problem in render
This commit is contained in:
@@ -451,7 +451,7 @@ const projectDepends = {
|
|||||||
androidGradlePlugin: 'https://developer.android.google.cn/studio/releases/gradle-plugin.html',
|
androidGradlePlugin: 'https://developer.android.google.cn/studio/releases/gradle-plugin.html',
|
||||||
kotlin: 'https://api.github.com/repos/JetBrains/kotlin/releases',
|
kotlin: 'https://api.github.com/repos/JetBrains/kotlin/releases',
|
||||||
kotlinKsp: 'https://api.github.com/repos/google/ksp/releases',
|
kotlinKsp: 'https://api.github.com/repos/google/ksp/releases',
|
||||||
yukiHookApi: 'https://s01.oss.sonatype.org/content/repositories/releases/com/highcapable/yukihookapi/api'
|
yukiHookApi: 'https://api.github.com/repos/fankes/YukiHookAPI/releases'
|
||||||
},
|
},
|
||||||
/** 搜索项目依赖 */
|
/** 搜索项目依赖 */
|
||||||
search() {
|
search() {
|
||||||
@@ -571,16 +571,8 @@ const projectDepends = {
|
|||||||
findYukiHookApiVersion: () => {
|
findYukiHookApiVersion: () => {
|
||||||
httpClient.requestDepends('YukiHookAPI', projectDepends.urls.yukiHookApi, (body) => {
|
httpClient.requestDepends('YukiHookAPI', projectDepends.urls.yukiHookApi, (body) => {
|
||||||
dependenciesConfigs.yukiHookApiVersions = [];
|
dependenciesConfigs.yukiHookApiVersions = [];
|
||||||
$(body).find('td').each((_, element) => {
|
const latestVersion = body.length > 0 ? body[0]['tag_name'] : '';
|
||||||
if (element.innerText.endsWith('/') && element.innerText.indexOf('fix') < 0)
|
if (latestVersion !== '') {
|
||||||
dependenciesConfigs.yukiHookApiVersions.push(element.innerText.replace('/', '').trim());
|
|
||||||
});
|
|
||||||
if (dependenciesConfigs.yukiHookApiVersions.length > 0) {
|
|
||||||
dependenciesConfigs.yukiHookApiVersions.sort((a, b) => {
|
|
||||||
return b.localeCompare(a);
|
|
||||||
});
|
|
||||||
const latestVersion = dependenciesConfigs.yukiHookApiVersions[0];
|
|
||||||
dependenciesConfigs.yukiHookApiVersions = [];
|
|
||||||
dependenciesConfigs.yukiHookApiVersions.push(latestVersion);
|
dependenciesConfigs.yukiHookApiVersions.push(latestVersion);
|
||||||
projectDepends.loaded();
|
projectDepends.loaded();
|
||||||
} else projectDepends.failure('YukiHookAPI', false);
|
} else projectDepends.failure('YukiHookAPI', false);
|
||||||
|
Reference in New Issue
Block a user