From abd001b7f524c8e3c1197d29dbe0c8a656d326ac Mon Sep 17 00:00:00 2001 From: ysicing Date: Thu, 1 Oct 2026 18:12:39 +0800 Subject: [PATCH] =?UTF-8?q?chore(repo):=20=E6=B8=85=E7=90=86=E6=97=A7?= =?UTF-8?q?=E5=AE=98=E7=BD=91=E5=9F=9F=E5=90=8D=E5=BC=95=E7=94=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../XStatsKit/Sources/Localization/Resources/ar.tsv | 1 - .../XStatsKit/Sources/Localization/Resources/de.tsv | 1 - .../XStatsKit/Sources/Localization/Resources/es.tsv | 1 - .../XStatsKit/Sources/Localization/Resources/fr.tsv | 1 - .../XStatsKit/Sources/Localization/Resources/ja.tsv | 1 - .../XStatsKit/Sources/Localization/Resources/ko.tsv | 1 - .../Sources/Localization/Resources/zh-Hant.tsv | 1 - .../XStatsKit/Sources/Localization/Translations.swift | 1 - .../XStatsKit/Tests/UpdatesTests/UpdateFeedTests.swift | 10 +++++----- server/api/main_test.go | 10 +++++----- web/index.html | 3 --- web/privacy.html | 1 - 12 files changed, 10 insertions(+), 22 deletions(-) diff --git a/Packages/XStatsKit/Sources/Localization/Resources/ar.tsv b/Packages/XStatsKit/Sources/Localization/Resources/ar.tsv index f9cf4c8..e069a97 100644 --- a/Packages/XStatsKit/Sources/Localization/Resources/ar.tsv +++ b/Packages/XStatsKit/Sources/Localization/Resources/ar.tsv @@ -746,7 +746,6 @@ uv 下载的 Python 包与构建缓存,由 uv 自行清理 ذاكرة حزم P 最高 الأقصى 最高 / 平均 الأقصى / المتوسط 最高温度 أعلى حرارة -服务器在 getopenstats.com,不上传任何监控数据;随时可以删除。 الخادم في getopenstats.com؛ لا تُرفع بيانات مراقبة ويمكنك حذف كل شيء متى شئت. 服务器返回 {} أعاد الخادم {} 服务器返回的数据格式不正确 أعاد الخادم بيانات بتنسيق غير صحيح 未使用 غير مستخدم diff --git a/Packages/XStatsKit/Sources/Localization/Resources/de.tsv b/Packages/XStatsKit/Sources/Localization/Resources/de.tsv index 57e83f9..b7440ab 100644 --- a/Packages/XStatsKit/Sources/Localization/Resources/de.tsv +++ b/Packages/XStatsKit/Sources/Localization/Resources/de.tsv @@ -746,7 +746,6 @@ uv 下载的 Python 包与构建缓存,由 uv 自行清理 Von uv geladener Py 最高 Maximum 最高 / 平均 Max. / Ø 最高温度 Höchsttemperatur -服务器在 getopenstats.com,不上传任何监控数据;随时可以删除。 Der Server befindet sich auf getopenstats.com. Überwachungsdaten werden nicht hochgeladen; Sie können alles jederzeit löschen. 服务器返回 {} Server meldet {} 服务器返回的数据格式不正确 Der Server hat ungültig formatierte Daten geliefert 未使用 Unbenutzt diff --git a/Packages/XStatsKit/Sources/Localization/Resources/es.tsv b/Packages/XStatsKit/Sources/Localization/Resources/es.tsv index 71afc65..483a779 100644 --- a/Packages/XStatsKit/Sources/Localization/Resources/es.tsv +++ b/Packages/XStatsKit/Sources/Localization/Resources/es.tsv @@ -746,7 +746,6 @@ uv 下载的 Python 包与构建缓存,由 uv 自行清理 Cachés de paquetes 最高 Máximo 最高 / 平均 Máx. / Media 最高温度 Temperatura máxima -服务器在 getopenstats.com,不上传任何监控数据;随时可以删除。 El servidor está en getopenstats.com; no se suben datos de supervisión y puedes borrar todo cuando quieras. 服务器返回 {} El servidor devolvió {} 服务器返回的数据格式不正确 El servidor devolvió datos con formato incorrecto 未使用 Sin usar diff --git a/Packages/XStatsKit/Sources/Localization/Resources/fr.tsv b/Packages/XStatsKit/Sources/Localization/Resources/fr.tsv index ab33fdb..f5b4cf7 100644 --- a/Packages/XStatsKit/Sources/Localization/Resources/fr.tsv +++ b/Packages/XStatsKit/Sources/Localization/Resources/fr.tsv @@ -746,7 +746,6 @@ uv 下载的 Python 包与构建缓存,由 uv 自行清理 Caches de paquets P 最高 Maximum 最高 / 平均 Max. / Moy. 最高温度 Température maximale -服务器在 getopenstats.com,不上传任何监控数据;随时可以删除。 Le serveur se trouve sur getopenstats.com. Aucune donnée de surveillance n’est envoyée ; vous pouvez tout supprimer à tout moment. 服务器返回 {} Le serveur a renvoyé {} 服务器返回的数据格式不正确 Le serveur a renvoyé des données mal formées 未使用 Inutilisé diff --git a/Packages/XStatsKit/Sources/Localization/Resources/ja.tsv b/Packages/XStatsKit/Sources/Localization/Resources/ja.tsv index d409f9f..39a69cb 100644 --- a/Packages/XStatsKit/Sources/Localization/Resources/ja.tsv +++ b/Packages/XStatsKit/Sources/Localization/Resources/ja.tsv @@ -746,7 +746,6 @@ uv 下载的 Python 包与构建缓存,由 uv 自行清理 uvのPythonパッ 最高 最大 最高 / 平均 最大 / 平均 最高温度 最高温度 -服务器在 getopenstats.com,不上传任何监控数据;随时可以删除。 サーバーはgetopenstats.comにあります。監視データはアップロードせず、いつでもすべて削除できます。 服务器返回 {} サーバーの応答 {} 服务器返回的数据格式不正确 サーバーの応答形式が正しくありません 未使用 未使用 diff --git a/Packages/XStatsKit/Sources/Localization/Resources/ko.tsv b/Packages/XStatsKit/Sources/Localization/Resources/ko.tsv index c26d25e..352c188 100644 --- a/Packages/XStatsKit/Sources/Localization/Resources/ko.tsv +++ b/Packages/XStatsKit/Sources/Localization/Resources/ko.tsv @@ -746,7 +746,6 @@ uv 下载的 Python 包与构建缓存,由 uv 自行清理 uv의 Python 패키 最高 최대 最高 / 平均 최대 / 평균 最高温度 최고 온도 -服务器在 getopenstats.com,不上传任何监控数据;随时可以删除。 서버는 getopenstats.com에 있습니다. 모니터링 데이터는 업로드하지 않으며 언제든 모두 삭제할 수 있습니다. 服务器返回 {} 서버 응답 {} 服务器返回的数据格式不正确 서버가 잘못된 형식의 데이터를 반환했습니다 未使用 미사용 diff --git a/Packages/XStatsKit/Sources/Localization/Resources/zh-Hant.tsv b/Packages/XStatsKit/Sources/Localization/Resources/zh-Hant.tsv index 409b9ee..f616338 100644 --- a/Packages/XStatsKit/Sources/Localization/Resources/zh-Hant.tsv +++ b/Packages/XStatsKit/Sources/Localization/Resources/zh-Hant.tsv @@ -747,7 +747,6 @@ uv 下载的 Python 包与构建缓存,由 uv 自行清理 uv 下載的 Python 最高 最高 最高 / 平均 最高 / 平均 最高温度 最高溫度 -服务器在 getopenstats.com,不上传任何监控数据;随时可以删除。 服務器在 getopenstats.com,不上傳任何監控數據;隨時可以刪除。 服务器返回 {} 服務器返回 {} 服务器返回的数据格式不正确 服務器返回的數據格式不正確 未使用 未使用 diff --git a/Packages/XStatsKit/Sources/Localization/Translations.swift b/Packages/XStatsKit/Sources/Localization/Translations.swift index bce45cb..b9c231d 100644 --- a/Packages/XStatsKit/Sources/Localization/Translations.swift +++ b/Packages/XStatsKit/Sources/Localization/Translations.swift @@ -865,7 +865,6 @@ uv 下载的 Python 包与构建缓存,由 uv 自行清理 Python package and 最高 Max 最高 / 平均 Max / Avg 最高温度 Max temperature -服务器在 getopenstats.com,不上传任何监控数据;随时可以删除。 The server is at getopenstats.com; no monitoring data is uploaded, and you can delete everything at any time. 服务器返回 {} Server returned {} 服务器返回的数据格式不正确 The server returned malformed data 未使用 Unused diff --git a/Packages/XStatsKit/Tests/UpdatesTests/UpdateFeedTests.swift b/Packages/XStatsKit/Tests/UpdatesTests/UpdateFeedTests.swift index 3a17e7b..6875fbd 100644 --- a/Packages/XStatsKit/Tests/UpdatesTests/UpdateFeedTests.swift +++ b/Packages/XStatsKit/Tests/UpdatesTests/UpdateFeedTests.swift @@ -48,13 +48,13 @@ import Testing } @Test func parsesAndRejectsBadFeeds() throws { - let good = #"{"version":"0.3.0","build":"3","date":"2026-09-20","minimumSystem":"14.0","url":"https://getopenstats.com/download/OpenStats-0.3.0.zip","sha256":"\#(String(repeating: "a", count: 64))","size":123,"dmg":"https://getopenstats.com/download/OpenStats-0.3.0.dmg","notes":["新增在线升级"],"changelog":null}"# + let good = #"{"version":"0.3.0","build":"3","date":"2026-09-20","minimumSystem":"14.0","url":"https://updates.example.invalid/download/XStats-0.3.0.zip","sha256":"\#(String(repeating: "a", count: 64))","size":123,"dmg":"https://updates.example.invalid/download/XStats-0.3.0.dmg","notes":["新增在线升级"],"changelog":null}"# let release = try #require(UpdateFeed.parse(Data(good.utf8))) #expect(release.version == "0.3.0") #expect(release.notes == ["新增在线升级"]) #expect(release.englishNotes == nil) #expect(release.notes(for: "en") == release.notes) - let insecure = good.replacingOccurrences(of: "https://getopenstats.com/download/OpenStats-0.3.0.zip", with: "http://example.com/x.zip") + let insecure = good.replacingOccurrences(of: "https://updates.example.invalid/download/XStats-0.3.0.zip", with: "http://example.com/x.zip") #expect(UpdateFeed.parse(Data(insecure.utf8)) == nil) let badHash = good.replacingOccurrences(of: String(repeating: "a", count: 64), with: "abc") #expect(UpdateFeed.parse(Data(badHash.utf8)) == nil) @@ -79,16 +79,16 @@ import Testing @Test func picksInstallerForChip() throws { let hash = String(repeating: "a", count: 64), intelHash = String(repeating: "b", count: 64) - let base = #"{"version":"0.3.1","build":"51","date":"2026-09-16","minimumSystem":"14.0","url":"https://getopenstats.com/download/OpenStats-0.3.1-AppleSilicon.zip","sha256":"\#(hash)","size":1,"dmg":null,"notes":[],"changelog":null"# + let base = #"{"version":"0.3.1","build":"51","date":"2026-09-16","minimumSystem":"14.0","url":"https://updates.example.invalid/download/XStats-0.3.1-AppleSilicon.zip","sha256":"\#(hash)","size":1,"dmg":null,"notes":[],"changelog":null"# // 0.3.0 那样只有 Apple 芯片版的清单:Intel 上不提供升级 let appleOnly = try #require(UpdateFeed.parse(Data((base + "}").utf8))) #expect(UpdateFeed.release(appleOnly, for: .appleSilicon) == appleOnly) #expect(UpdateFeed.release(appleOnly, for: .intel) == nil) - let both = try #require(UpdateFeed.parse(Data((base + #","intel":{"url":"https://getopenstats.com/download/OpenStats-0.3.1-Intel.zip","sha256":"\#(intelHash)","size":2,"dmg":"https://getopenstats.com/download/OpenStats-0.3.1-Intel.dmg"}}"#).utf8))) + let both = try #require(UpdateFeed.parse(Data((base + #","intel":{"url":"https://updates.example.invalid/download/XStats-0.3.1-Intel.zip","sha256":"\#(intelHash)","size":2,"dmg":"https://updates.example.invalid/download/XStats-0.3.1-Intel.dmg"}}"#).utf8))) #expect(UpdateFeed.release(both, for: .appleSilicon)?.sha256 == hash) let intel = try #require(UpdateFeed.release(both, for: .intel)) - #expect(intel.url.lastPathComponent == "OpenStats-0.3.1-Intel.zip") + #expect(intel.url.lastPathComponent == "XStats-0.3.1-Intel.zip") #expect(intel.sha256 == intelHash && intel.size == 2 && intel.version == "0.3.1") } } diff --git a/server/api/main_test.go b/server/api/main_test.go index 1181759..aae8149 100644 --- a/server/api/main_test.go +++ b/server/api/main_test.go @@ -54,7 +54,7 @@ func TestPublishReleaseRejectsInsecureAssetURL(t *testing.T) { } body := `{ "version":"2026.09.21.03","build":"108","date":"2026-09-21","minimumSystem":"14.0", - "url":"https://getopenstats.com/download/XStats.zip", + "url":"https://updates.example.invalid/download/XStats.zip", "sha256":"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "size":123456,"dmg":"http://example.test/XStats.dmg","notes":["新增安装统计"] }` @@ -81,12 +81,12 @@ func TestPublishedReleaseIsReturnedByUpdateCheck(t *testing.T) { "build":"108", "date":"2026-09-21", "minimumSystem":"14.0", - "url":"https://getopenstats.com/download/XStats-2026.09.21.03-AppleSilicon.zip", + "url":"https://updates.example.invalid/download/XStats-2026.09.21.03-AppleSilicon.zip", "sha256":"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "size":123456, - "dmg":"https://getopenstats.com/download/XStats-2026.09.21.03-AppleSilicon.dmg", + "dmg":"https://updates.example.invalid/download/XStats-2026.09.21.03-AppleSilicon.dmg", "notes":["新增安装统计"], - "changelog":"https://getopenstats.com/#changelog" + "changelog":"https://updates.example.invalid/#changelog" }` publish := httptest.NewRequest(http.MethodPut, "/api/v1/releases/current", strings.NewReader(publishBody)) publish.Header.Set("Content-Type", "application/json") @@ -172,7 +172,7 @@ func TestDashboardAggregatesInstallationsWithoutExposingIdentifiers(t *testing.T publish := httptest.NewRequest(http.MethodPut, "/api/v1/releases/current", strings.NewReader(`{ "version":"2026.09.21.03","build":"108","date":"2026-09-21","minimumSystem":"14.0", - "url":"https://getopenstats.com/download/XStats.zip", + "url":"https://updates.example.invalid/download/XStats.zip", "sha256":"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "size":123456,"notes":["新增安装统计"] }`)) diff --git a/web/index.html b/web/index.html index 07fc587..f4f5d1b 100644 --- a/web/index.html +++ b/web/index.html @@ -7,14 +7,11 @@ - - - diff --git a/web/privacy.html b/web/privacy.html index 3139b7f..5afedd8 100644 --- a/web/privacy.html +++ b/web/privacy.html @@ -7,7 +7,6 @@ -