mirror of
https://github.com/HugoAura/Seewo-HugoAura.git
synced 2026-06-20 23:14:28 +08:00
[Fix] <PLS> More verbose logging & Change API domain
This commit is contained in:
@@ -123,6 +123,7 @@ const composableFunctions = {
|
|||||||
failedTemplate.message =
|
failedTemplate.message =
|
||||||
"Request error: Unexpected error while downloading file";
|
"Request error: Unexpected error while downloading file";
|
||||||
failedTemplate.errorObj = e;
|
failedTemplate.errorObj = e;
|
||||||
|
console.error(`[HugoAura / IPC / FS / ERROR] Error downloading file from ${url}, errorObj:`, e);
|
||||||
progressCallback(failedTemplate);
|
progressCallback(failedTemplate);
|
||||||
global.__HUGO_AURA__.fsTasks?.downloadTasks.delete(taskId);
|
global.__HUGO_AURA__.fsTasks?.downloadTasks.delete(taskId);
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
@@ -427,10 +427,6 @@ const applyPlsIpcHandler = (ipcMain) => {
|
|||||||
async (_event, arg) => {
|
async (_event, arg) => {
|
||||||
const logHeader = "[HugoAura / IPC / PLS] <plsLifecycleControl>";
|
const logHeader = "[HugoAura / IPC / PLS] <plsLifecycleControl>";
|
||||||
|
|
||||||
if (!global.__HUGO_AURA__.plsStats?.installed) {
|
|
||||||
return { success: false, errorObj: new Error("PLS not installed") };
|
|
||||||
}
|
|
||||||
|
|
||||||
switch (arg.target) {
|
switch (arg.target) {
|
||||||
case "instSvc":
|
case "instSvc":
|
||||||
return await functions.execCommand(
|
return await functions.execCommand(
|
||||||
@@ -452,6 +448,10 @@ const applyPlsIpcHandler = (ipcMain) => {
|
|||||||
success: false,
|
success: false,
|
||||||
errorObj: error,
|
errorObj: error,
|
||||||
});
|
});
|
||||||
|
console.error(
|
||||||
|
`${logHeader} Failed to remove PLS bin, error:`,
|
||||||
|
error
|
||||||
|
);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -185,7 +185,9 @@ if (!global.__HUGO_AURA_UI_REACTIVES__.subConfig)
|
|||||||
global.__HUGO_AURA_UI_FUNCTIONS__.subConfig.plsStatus.updateToast(
|
global.__HUGO_AURA_UI_FUNCTIONS__.subConfig.plsStatus.updateToast(
|
||||||
"error",
|
"error",
|
||||||
"内核删除失败",
|
"内核删除失败",
|
||||||
"<p>检查日志以获取详细信息</p>",
|
`<p>
|
||||||
|
${ret.errorObj ? ret.errorObj : "检查日志以获取详细信息"}
|
||||||
|
</p>`,
|
||||||
true,
|
true,
|
||||||
false,
|
false,
|
||||||
null
|
null
|
||||||
@@ -218,7 +220,14 @@ if (!global.__HUGO_AURA_UI_REACTIVES__.subConfig)
|
|||||||
global.__HUGO_AURA_UI_FUNCTIONS__.subConfig.plsStatus.updateToast(
|
global.__HUGO_AURA_UI_FUNCTIONS__.subConfig.plsStatus.updateToast(
|
||||||
"error",
|
"error",
|
||||||
"服务卸载失败: 无法停止服务",
|
"服务卸载失败: 无法停止服务",
|
||||||
"<p>检查日志以获取详细信息</p><p>您可以尝试手动停止 PLS 服务</p>",
|
`<p>${
|
||||||
|
stopRet.errorObj
|
||||||
|
? stopRet.errorObj
|
||||||
|
: "检查日志以获取详细信息"
|
||||||
|
}</p>
|
||||||
|
<p>
|
||||||
|
您可以尝试手动停止 PLS 服务
|
||||||
|
</p>`,
|
||||||
true,
|
true,
|
||||||
false,
|
false,
|
||||||
null
|
null
|
||||||
@@ -565,7 +574,9 @@ if (!global.__HUGO_AURA_UI_REACTIVES__.subConfig)
|
|||||||
"下载失败",
|
"下载失败",
|
||||||
`<p>${
|
`<p>${
|
||||||
info.message ? info.message : "检查日志以获取错误信息"
|
info.message ? info.message : "检查日志以获取错误信息"
|
||||||
}</p>`,
|
}</p><p>
|
||||||
|
${info.errorObj ? info.errorObj : ""}
|
||||||
|
</p>`,
|
||||||
true,
|
true,
|
||||||
true,
|
true,
|
||||||
5000
|
5000
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ if (!global.__HUGO_AURA__) {
|
|||||||
if (!global.__HUGO_AURA_API__) {
|
if (!global.__HUGO_AURA_API__) {
|
||||||
/** @type {import("../aura/types/shared/global").GlobalHugoAuraApiInfo} */
|
/** @type {import("../aura/types/shared/global").GlobalHugoAuraApiInfo} */
|
||||||
const __HUGO_AURA_API__ = {
|
const __HUGO_AURA_API__ = {
|
||||||
baseUrl: "https://api-aura.xwx.li",
|
baseUrl: "https://api.aura.vim.moe",
|
||||||
plsUpdate: "/api/v1/getPLSLatestVersion",
|
plsUpdate: "/api/v1/getPLSLatestVersion",
|
||||||
auraUpdate: "/api/v1/getAuraLatestVersion",
|
auraUpdate: "/api/v1/getAuraLatestVersion",
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user