release: SnapCAD Studio 1.0.11 (Mimari BIM & Metraj Studyosu, IFC4 ihraci, canli guncelleme ilerlemesi, YakNet SSO iyilestirmesi)
Build and Push Docker Images / build (push) Canceled after 0s
Desktop Release / Build linux desktop (push) Canceled after 0s
Desktop Release / Build windows desktop (push) Canceled after 0s
Desktop Release / Attach packages to release (push) Canceled after 0s
CI / Typecheck and unit tests (push) Canceled after 0s
Desktop Release / Build macos desktop (push) Canceled after 0s

This commit is contained in:
Enes Yakıştır
2026-11-12 11:57:21 +03:00
parent ee28672e23
commit 6769717276
28 changed files with 8103 additions and 1115 deletions
+57 -1
View File
@@ -4,6 +4,8 @@ import { describe, expect, it } from "vitest";
import {
exportFiltersForFilename,
formatFriendlyUpdateError,
formatUpdateBytes,
formatUpdateTransferSummary,
getDesktopBridge,
isAllowedExternalUrl,
isDesktopRuntime,
@@ -61,7 +63,9 @@ describe("desktopBridge", () => {
it("distinguishes global vs 3D-editor-only menu commands", () => {
expect(isEditorOnlyMenuAction("file:new")).toBe(false);
expect(isEditorOnlyMenuAction("file:open")).toBe(false);
expect(isEditorOnlyMenuAction("file:save-and-update")).toBe(false);
expect(isEditorOnlyMenuAction("file:dashboard")).toBe(false);
expect(parseMenuAction("file:save-and-update")).toBe("file:save-and-update");
expect(isEditorOnlyMenuAction("window:drawing")).toBe(false);
expect(isEditorOnlyMenuAction("window:classrooms")).toBe(false);
expect(isEditorOnlyMenuAction("window:shared")).toBe(false);
@@ -128,6 +132,58 @@ describe("desktopBridge", () => {
expect(formatFriendlyUpdateError("Özel sunucu mesajı")).toBe("Özel sunucu mesajı");
});
it("formats live update download byte sizes and transfer summaries", () => {
expect(formatUpdateBytes(0)).toBe("0 B");
expect(formatUpdateBytes(512 * 1024)).toBe("512 KB");
expect(formatUpdateBytes(25.4 * 1024 * 1024)).toBe("25.4 MB");
expect(formatUpdateTransferSummary(null)).toBe("");
expect(
formatUpdateTransferSummary({
transferred: 12 * 1024 * 1024,
total: 0,
bytesPerSecond: 0,
}),
).toBe("12.0 MB indirildi");
expect(
formatUpdateTransferSummary({
currentVersion: "1.0.10",
latestVersion: "1.0.11",
updateAvailable: true,
downloaded: false,
checkedAt: "2026-01-01T00:00:00.000Z",
status: "downloading",
progressPercent: 45,
transferred: 45 * 1024 * 1024,
total: 100 * 1024 * 1024,
bytesPerSecond: 5.2 * 1024 * 1024,
}),
).toBe("45.0 MB / 100.0 MB • 5.2 MB/sn");
});
it("keeps desktop update safeguard and auth sync IPC channels in parity", () => {
const repoRoot = path.resolve(__dirname, "../..");
const mainSource = fs.readFileSync(path.join(repoRoot, "apps/desktop/main.cjs"), "utf8");
const preloadSource = fs.readFileSync(path.join(repoRoot, "apps/desktop/preload.cjs"), "utf8");
const pageSource = fs.readFileSync(path.join(repoRoot, "apps/web/src/app/page.tsx"), "utf8");
const requiredChannels = [
"snapcad:get-auth-state-sync",
"snapcad:get-auth-state",
"snapcad:open-update-progress",
"snapcad:set-active-work-state",
"snapcad:prepare-before-update",
"snapcad:prepare-before-update-result",
"snapcad:confirm-update-after-save",
"snapcad:cancel-pending-update-install",
];
for (const channel of requiredChannels) {
expect(mainSource, `Missing in main.cjs: ${channel}`).toContain(channel);
expect(preloadSource, `Missing in preload.cjs: ${channel}`).toContain(channel);
}
expect(pageSource).toContain(`case "file:save-and-update":`);
});
it("allows only http and https external URLs", () => {
expect(isAllowedExternalUrl("https://snap.yakhub.com.tr")).toBe(true);
expect(isAllowedExternalUrl("http://127.0.0.1:62158")).toBe(true);
@@ -191,7 +247,7 @@ describe("desktopBridge", () => {
};
const swSource = fs.readFileSync(path.join(repoRoot, "apps/web/public/sw.js"), "utf8");
expect(pkg.version).toBe("1.0.10");
expect(pkg.version).toBe("1.0.11");
expect(lock.version).toBe(pkg.version);
expect(lock.packages[""]?.version).toBe(pkg.version);
expect(SKF_CREATED_WITH_VERSION).toBe(pkg.version);