fix(FN-0000): include compound engineering dashboard css

This commit is contained in:
gsxdsm
2026-06-08 12:55:52 -07:00
parent a1411b1e0b
commit 7d417a1f9c
4 changed files with 35 additions and 1 deletions

View File

@@ -15,7 +15,7 @@
}
},
"scripts": {
"build": "tsc",
"build": "tsc && node scripts/copy-css.mjs",
"test": "vitest run --silent=passed-only --reporter=dot"
},
"dependencies": {

View File

@@ -0,0 +1,23 @@
#!/usr/bin/env node
// Copies every .css file under src/ to the mirrored path under dist/.
import { cp, mkdir, readdir } from "node:fs/promises";
import { dirname, join, relative } from "node:path";
import { fileURLToPath } from "node:url";
const root = dirname(fileURLToPath(import.meta.url)) + "/..";
const srcDir = join(root, "src");
const distDir = join(root, "dist");
async function* cssFiles(dir) {
for (const entry of await readdir(dir, { withFileTypes: true })) {
const full = join(dir, entry.name);
if (entry.isDirectory()) yield* cssFiles(full);
else if (entry.isFile() && entry.name.endsWith(".css")) yield full;
}
}
for await (const file of cssFiles(srcDir)) {
const dest = join(distDir, relative(srcDir, file));
await mkdir(dirname(dest), { recursive: true });
await cp(file, dest);
}

View File

@@ -1,5 +1,6 @@
import { describe, expect, it } from "vitest";
import manifest from "../../manifest.json";
import packageJson from "../../package.json";
import plugin from "../index.js";
import { COMPOUND_ENGINEERING_SKILLS } from "../skills.js";
import { settingsSchema } from "../settings.js";
@@ -75,6 +76,11 @@ describe("compound engineering plugin manifest", () => {
expect(typeof plugin.hooks?.onLoad).toBe("function");
});
it("copies dashboard CSS into dist during build", () => {
expect(packageJson.scripts.build).toContain("tsc");
expect(packageJson.scripts.build).toContain("node scripts/copy-css.mjs");
});
it("wires the settings schema onto the runtime manifest and manifest.json (U9)", () => {
const expectedKeys = [
"defaultProvider",