refactor: migrate legacy wire namespace to wrn
Quality / quality (ubuntu-latest) (push) Failing after 9m49s
Quality / quality (windows-latest) (push) Canceled after 0s

This commit is contained in:
2026-08-12 18:51:15 +05:30
parent ec23dd4c93
commit 2c960fc1dc
488 changed files with 27306 additions and 19063 deletions
+3 -3
View File
@@ -57,7 +57,7 @@ test("resolveProfile: explicit > WRNEXUS_PROFILE > mode default", () => {
});
test("loadAppConfig deep-merges the active profile and strips `profiles`", async () => {
const dir = mkdtempSync(join(tmpdir(), "wire-cfg-"));
const dir = mkdtempSync(join(tmpdir(), "wrn-cfg-"));
writeFileSync(
join(dir, "wrnexus.config.mjs"),
`export default {
@@ -157,7 +157,7 @@ test("config layers resolve packages and reject dependency cycles", async () =>
});
test("loadEnv layers .env files by precedence; real env always wins", () => {
const dir = mkdtempSync(join(tmpdir(), "wire-env-"));
const dir = mkdtempSync(join(tmpdir(), "wrn-env-"));
writeFileSync(join(dir, ".env"), 'BASE=1\nSHARED=base\n# a comment\nQUOTED="hi there"\n');
writeFileSync(join(dir, ".env.prod"), "SHARED=prod\nPROD_ONLY=yes\nREALVAR=fromfile\n");
writeFileSync(join(dir, ".env.prod.local"), "SHARED=local\n");
@@ -177,7 +177,7 @@ test("loadEnv layers .env files by precedence; real env always wins", () => {
});
test("loadAppConfig loads env before evaluating the config module", async () => {
const dir = mkdtempSync(join(tmpdir(), "wire-config-env-"));
const dir = mkdtempSync(join(tmpdir(), "wrn-config-env-"));
writeFileSync(join(dir, ".env"), "DATABASE_URL=postgres://pms-from-env\n");
writeFileSync(
join(dir, "wrnexus.config.mjs"),
+5 -5
View File
@@ -31,11 +31,11 @@ describe("theme accents", () => {
expect(css).toContain('[data-theme="light"][data-accent="emerald"]');
expect(css).toContain('[data-theme="dark"][data-accent="emerald"]');
expect(css).toContain("--wire-color-primary-soft:");
expect(css).toContain("--wire-color-primary-muted:");
expect(css).toContain("--wire-color-primary-text:");
expect(css).toContain("--wire-color-on-primary:");
expect(css).toContain("--wire-color-secondary-soft:");
expect(css).toContain("--wrn-color-primary-soft:");
expect(css).toContain("--wrn-color-primary-muted:");
expect(css).toContain("--wrn-color-primary-text:");
expect(css).toContain("--wrn-color-on-primary:");
expect(css).toContain("--wrn-color-secondary-soft:");
});
test("runtime persists accents with cookies and never writes inline tokens", () => {
+2 -2
View File
@@ -7,6 +7,6 @@ test("typed theme token helpers preserve custom tokens and emit CSS variables",
"space-product-card": "1rem",
});
expect(tokens["space-product-card"]).toBe("1rem");
expect(themeVar("color-primary")).toBe("var(--wire-color-primary)");
expect(themeVar("color-text", "#111")).toBe("var(--wire-color-text, #111)");
expect(themeVar("color-primary")).toBe("var(--wrn-color-primary)");
expect(themeVar("color-text", "#111")).toBe("var(--wrn-color-text, #111)");
});
+4 -4
View File
@@ -74,7 +74,7 @@ test("resolveThemeName validates against configured names", () => {
expect(resolveThemeName(undefined, t)).toBe(t.default);
});
test("renderThemeCss emits :root + per-theme blocks and --wire-* vars", () => {
test("renderThemeCss emits :root + per-theme blocks and --wrn-* vars", () => {
const t = resolveThemeConfig({
default: "dark",
themes: { dark: { "color-primary": "#6c8cff" } },
@@ -82,9 +82,9 @@ test("renderThemeCss emits :root + per-theme blocks and --wire-* vars", () => {
const css = renderThemeCss(t);
expect(css).toContain(":root{");
expect(css).toContain('[data-theme="dark"]{');
expect(css).toContain("--wire-color-primary:#6c8cff");
expect(css).toContain("--wrn-color-primary:#6c8cff");
expect(css).toContain("color-scheme:dark"); // reserved token → native property
expect(css).toContain("font-family:var(--wire-font-sans");
expect(css).toContain("font-family:var(--wrn-font-sans");
});
test("active theme CSS contains only the selected theme and accent", () => {
@@ -101,7 +101,7 @@ test("active theme CSS contains only the selected theme and accent", () => {
test("renderThemeRuntime bakes the theme names for cycling", () => {
const t = resolveThemeConfig();
const js = renderThemeRuntime(t);
expect(js).toContain("data-wire-theme-toggle");
expect(js).toContain("data-wrn-theme-toggle");
expect(js).toContain(JSON.stringify(t.names));
expect(js).toContain('addEventListener("wrnexus:navigated"');
});