Update editor, workspace, Git services, appearance, and project guides

This commit is contained in:
Knotty Wyvern
2026-10-11 09:41:16 -07:00
parent a8b1defb9d
commit 909894b9c8
153 changed files with 7967 additions and 775 deletions
+15
View File
@@ -0,0 +1,15 @@
import { test } from "node:test";
import assert from "node:assert/strict";
import { parseCustomTheme } from "../src/lib/theme/customThemes.ts";
const palette = { bg: "#123", text: "#abcdef", accent: "#AABBCC" };
const theme = { schema: 1, id: "my-theme", name: "My theme", light: palette, dark: palette };
test("theme files accept explicit color tokens in both appearances", () => {
assert.deepEqual(parseCustomTheme(theme), theme);
});
test("theme files reject CSS injection, unknown tokens, and incomplete palettes", () => {
for (const dark of [{ ...palette, bg: "url(https://invalid.test)" }, { ...palette, position: "fixed" }, { bg: "#000" }, []]) {
assert.throws(() => parseCustomTheme({ ...theme, dark }));
}
assert.throws(() => parseCustomTheme({ ...theme, id: "../unsafe" }));
});