Git Komut Rehberi & Terminal Asistanı
Sıfırdan Yeni Bir Depo Başlatın:
Mevcut Bir Git Deposu veya Klasörü Gönderin:
Hataları Geri Alma, İptal & Temizlik:
Son commit'i geri al (yapılan değişiklikleri korur):
git reset --soft HEAD~1
Yapılan yerel değişiklikleri iptal et (çalışma ağacını temizler):
git restore .
Takip edilmeyen gereksiz dosyaları sil:
git clean -fd
Değişiklikleri geçici sakla ve geri getir (stash):
git stash git stash pop
Dal (Branch) ve Sürüm Etiketleri:
Yeni dal aç ve geçiş yap:
git checkout -b yeni-ozellik git push -u origin yeni-ozellik
Sürüm etiketi (tag) oluştur ve gönder:
git tag -a v1.0.0 -m "Sürüm 1.0.0" git push origin --tags
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
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:
@@ -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/");
|
||||
@@ -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/");
|
||||
@@ -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
@@ -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`
|
||||
);
|
||||
|
||||
|
||||
@@ -18,6 +18,7 @@ const protectedEntries = new Set([
|
||||
"callback.php",
|
||||
"login.php",
|
||||
"logout.php",
|
||||
"updates",
|
||||
]);
|
||||
|
||||
if (!existsSync(exportDir)) {
|
||||
|
||||
Reference in New Issue
Block a user