release: SnapCAD Studio 1.0.10 (desktop menuler, macOS kisayollari, YakNet SSO)
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
Desktop Release / Build macos desktop (push) Canceled after 0s
CI / Typecheck and unit tests (push) Canceled after 0s

This commit is contained in:
Enes Yakıştır
2026-11-12 10:12:35 +03:00
parent d5cc023856
commit ee28672e23
81 changed files with 10729 additions and 821 deletions
+21
View File
@@ -0,0 +1,21 @@
// Stages the single-threaded web-ifc WebAssembly runtime (1.68 MB) into
// apps/web/public/ifc/ so BIM architectural models (.ifc) can be decoded directly
// in the browser and desktop app without COOP/COEP headers or native servers.
import { cp, mkdir } from "node:fs/promises";
import { existsSync } from "node:fs";
import { dirname, join } from "node:path";
import { fileURLToPath } from "node:url";
const root = join(dirname(fileURLToPath(import.meta.url)), "..");
const src = join(root, "node_modules", "web-ifc", "web-ifc.wasm");
const destDir = join(root, "apps", "web", "public", "ifc");
if (!existsSync(src)) {
console.error(`[copy-ifc-wasm] web-ifc.wasm not found at ${src}. Run \`npm install\` first.`);
process.exit(1);
}
await mkdir(destDir, { recursive: true });
await cp(src, join(destDir, "web-ifc.wasm"));
console.log("[copy-ifc-wasm] staged web-ifc.wasm into apps/web/public/ifc/");
+25
View File
@@ -0,0 +1,25 @@
// Stages the FreeCAD PlaneGCS WebAssembly 2D constraint solver (planegcs.js +
// 484 KB planegcs.wasm) into apps/web/public/planegcs/ so the browser runtime can
// load it via a webpackIgnore dynamic import without bundler friction.
import { cp, mkdir } from "node:fs/promises";
import { existsSync } from "node:fs";
import { dirname, join } from "node:path";
import { fileURLToPath } from "node:url";
const root = join(dirname(fileURLToPath(import.meta.url)), "..");
const srcDir = join(root, "node_modules", "@salusoft89", "planegcs", "dist", "planegcs_dist");
const destDir = join(root, "apps", "web", "public", "planegcs");
const required = ["planegcs.js", "planegcs.wasm"];
for (const fileName of required) {
const fullPath = join(srcDir, fileName);
if (!existsSync(fullPath)) {
console.error(`[copy-planegcs-wasm] Missing ${fullPath}. Run \`npm install\` first.`);
process.exit(1);
}
}
await mkdir(destDir, { recursive: true });
await Promise.all(required.map((fileName) => cp(join(srcDir, fileName), join(destDir, fileName))));
console.log("[copy-planegcs-wasm] staged planegcs.js + planegcs.wasm into apps/web/public/planegcs/");
+55
View File
@@ -0,0 +1,55 @@
import { copyFileSync, existsSync, mkdirSync, readFileSync, statSync } from "node:fs";
import { basename, dirname, join } from "node:path";
import { fileURLToPath } from "node:url";
const repoRoot = dirname(dirname(fileURLToPath(import.meta.url)));
const distDir = join(repoRoot, "dist", "desktop");
const updatesDir = join(repoRoot, "updates");
const latestYmlPath = join(distDir, "latest.yml");
if (!existsSync(latestYmlPath)) {
console.error(`[publish-desktop-updates] Bulunamadı: ${latestYmlPath}. Önce 'npm run desktop:dist' çalıştırın.`);
process.exit(1);
}
const yamlText = readFileSync(latestYmlPath, "utf8");
const urlMatches = Array.from(yamlText.matchAll(/^\s*-\s*url:\s*([^\r\n]+)$/gm)).map((m) => m[1].trim());
const pathMatch = yamlText.match(/^path:\s*([^\r\n]+)$/m)?.[1]?.trim();
const artifactNames = new Set(urlMatches);
if (pathMatch) artifactNames.add(pathMatch);
if (artifactNames.size === 0) {
console.error("[publish-desktop-updates] latest.yml içinde kurulum dosyası referansı bulunamadı.");
process.exit(1);
}
mkdirSync(updatesDir, { recursive: true });
const copied = [];
for (const rawName of artifactNames) {
const safeName = basename(rawName);
const srcArtifact = join(distDir, safeName);
if (!existsSync(srcArtifact)) {
console.error(`[publish-desktop-updates] Eksik dosya: ${srcArtifact}`);
process.exit(1);
}
const destArtifact = join(updatesDir, safeName);
copyFileSync(srcArtifact, destArtifact);
copied.push({ name: safeName, bytes: statSync(destArtifact).size });
const blockmapName = `${safeName}.blockmap`;
const srcBlockmap = join(distDir, blockmapName);
if (existsSync(srcBlockmap)) {
const destBlockmap = join(updatesDir, blockmapName);
copyFileSync(srcBlockmap, destBlockmap);
copied.push({ name: blockmapName, bytes: statSync(destBlockmap).size });
}
}
const destYml = join(updatesDir, "latest.yml");
copyFileSync(latestYmlPath, destYml);
copied.push({ name: "latest.yml", bytes: statSync(destYml).size });
for (const item of copied) {
console.log(`[publish-desktop-updates] Yayınlandı: updates/${item.name} (${(item.bytes / (1024 * 1024)).toFixed(2)} MB)`);
}
+13 -11
View File
@@ -35,22 +35,24 @@ async function runAudit() {
console.log("▶ BÖLÜM 1: 2B CAD VE POLİGON MOTORU DOĞRULAMASI");
console.log("--------------------------------------------------------------------------------");
// Test 1.1: 2D Poligon Kırpma (Union & Difference)
const polygonClipping = (await import("polygon-clipping")).default;
const squareA = [[[0, 0], [50, 0], [50, 50], [0, 50], [0, 0]]];
const squareB = [[[25, 25], [75, 25], [75, 75], [25, 75], [25, 25]]];
// Test 1.1: 2D Poligon Kırpma (Union & Difference) via Clipper2
const { Clipper, ClipType, FillRule, Point64 } = await import("clipper2-js");
const toPath64 = (pts) => pts.map(([x, y]) => new Point64(x * 1000, y * 1000));
const squareA = toPath64([[0, 0], [50, 0], [50, 50], [0, 50]]);
const squareB = toPath64([[25, 25], [75, 25], [75, 75], [25, 75]]);
const unionResult = polygonClipping.union(squareA, squareB);
const unionResult = Clipper.BooleanOp(ClipType.Union, [squareA], [squareB], FillRule.NonZero);
assert(
unionResult.length === 1 && unionResult[0][0].length >= 8,
"İki çakışan karenin Boolean Birleşimi (Union)",
`Tek poligon oluştu, köşe sayısı: ${unionResult[0][0].length}`
unionResult.length === 1 && unionResult[0].length >= 8,
"İki çakışan karenin Boolean Birleşimi (Union - Clipper2)",
`Tek poligon oluştu, köşe sayısı: ${unionResult[0]?.length ?? 0}`
);
const diffHole = polygonClipping.difference(squareA, [[[10, 10], [30, 10], [30, 30], [10, 30], [10, 10]]]);
const holeBox = toPath64([[10, 10], [30, 10], [30, 30], [10, 30]]);
const diffHole = Clipper.BooleanOp(ClipType.Difference, [squareA], [holeBox], FillRule.NonZero);
assert(
diffHole.length === 1 && diffHole[0].length === 2,
"İç delik çıkarma Boolean Farkı (A - B)",
diffHole.length === 2,
"İç delik çıkarma Boolean Farkı (A - B - Clipper2)",
`Dış kontur ve 1 adet iç delik halkası oluşturuldu`
);
+1
View File
@@ -18,6 +18,7 @@ const protectedEntries = new Set([
"callback.php",
"login.php",
"logout.php",
"updates",
]);
if (!existsSync(exportDir)) {