mirror of
https://github.com/EchoSixHIYA/WebSpeak-client-for-TeamSpeak.git
synced 2026-12-01 02:52:49 +08:00
feat: add verified console self-update for release packages
Check official GitHub Releases, require SHA256SUMS, safely extract and swap release-package code, roll back on failed health checks, and persist task state across restarts. Docker and source deployments stay check-only. Add updater tests, route security tests and five-language admin copy.
This commit is contained in:
1 parent
ae6788a796
commit
2de2e23fd3
32 files changed
+3573
-16
No files matched your search
@@ -45,6 +45,7 @@ const defaults = path => ({
|
||||
"/session": { authenticated: true, mustChangePassword: false, csrfToken: "test-csrf" },
|
||||
"/server": settings(), "/overview": overview, "/sessions": { sessions: [] }, "/invites": { invites: [] },
|
||||
"/diagnostics": { gateway: { version: "test", node: "test", platform: "test", arch: "test" }, database: { schemaVersion: 1 }, sessions: { created: 0 } },
|
||||
"/update": { currentVersion: "test", deployment: { mode: "source", platform: "test", architecture: "test", applyAllowed: false, reasonCode: "DEPLOYMENT_SOURCE", upgradePath: "source" }, task: null },
|
||||
"/logs?limit=100": { available: false, entries: [], sessions: [] }, "/audit?limit=50": { events: [] },
|
||||
"/skins": { skins: [], defaultSkinId: "builtin.light" },
|
||||
"/ts-admin/settings": tsSettings(), "/ts-admin/overview": tsOverview(),
|
||||
@@ -453,6 +454,15 @@ test("store install submits the reviewed revision once and reloads the instance
|
||||
});
|
||||
function manifestForStoreTest() { return { id: "store-test", name: "Fixture", version: "1.0.0", author: "Fixture", license: "MIT", minAppVersion: "0.2.8", installedAt: 1 }; }
|
||||
|
||||
test("all update maintenance copy is explicit in each supported language", async () => {
|
||||
const { adminOrganizationCopy } = await vite.ssrLoadModule("/src/i18n/admin-organization.ts");
|
||||
const keys = Object.keys(adminOrganizationCopy.zh).filter(key => key.startsWith("update")).sort();
|
||||
assert.ok(keys.length >= 30);
|
||||
for (const language of ["zh", "en", "de", "ru", "ja"]) {
|
||||
for (const key of keys) assert.ok(adminOrganizationCopy[language][key]?.trim(), `${language}.${key}`);
|
||||
}
|
||||
});
|
||||
|
||||
test("all store translations are explicit in each supported language", async () => {
|
||||
const { skinStoreCopy } = await vite.ssrLoadModule("/src/i18n/skin-store.ts");
|
||||
const keys = Object.keys(skinStoreCopy.zh).sort();
|
||||
|
||||
Reference in new issue
Block a user