Track bundled vendor runtime sources
Some checks failed
CI / main (push) Has been cancelled
CI / release-e2e (push) Has been cancelled

This commit is contained in:
2026-07-07 10:05:50 +08:00
parent fbe179ab53
commit 52636c91ae
2111 changed files with 1850012 additions and 14 deletions

View File

@@ -0,0 +1,37 @@
import { AppConfig } from "../../../src/config";
import {
platformArch,
platformName,
platformUUID,
platformVersion,
} from "../../lib/env";
const checkForUpdate = async () => {
try {
const res = await fetch(AppConfig.updaterUrl, {
method: "POST",
headers: {
"Content-Type": "application/json",
},
body: JSON.stringify({
version: AppConfig.version,
uuid: platformUUID(),
platform: {
name: platformName(),
version: platformVersion(),
arch: platformArch(),
},
}),
});
return await res.json();
} catch (e) {
return {
code: -1,
msg: `Failed to check update : ${e.message}`,
};
}
};
export default {
checkForUpdate,
};