fix(dev): consolidate generated cache directories
Quality / quality (ubuntu-latest) (push) Failing after 9m50s
Quality / quality (windows-latest) (push) Canceled after 0s

This commit is contained in:
2026-08-12 22:25:12 +05:30
parent e638c6be6a
commit b508b49058
8 changed files with 28 additions and 13 deletions
@@ -63,14 +63,14 @@ export default defineAuthz({ permissions: { "post:read": { title: "View posts" }
try {
expect(hasAuthzCatalog()).toBe(true);
expect(getAuthzCatalog().permissions.has("post:read")).toBe(true);
const cacheDir = join(appDir, "..", `.wrnexus-${process.pid}`);
const cacheDir = join(appDir, "..", ".wrnexus", "cache");
mkdirSync(cacheDir, { recursive: true });
writeFileSync(join(cacheDir, "generated.js"), "generated", "utf8");
expect(existsSync(cacheDir)).toBe(true);
} finally {
server.stop();
}
expect(existsSync(join(appDir, "..", `.wrnexus-${process.pid}`))).toBe(false);
expect(existsSync(join(appDir, "..", ".wrnexus", "cache"))).toBe(false);
});
test("an app with no app/authz declarations boots without throwing", async () => {
@@ -18,7 +18,7 @@ test("per-process dev caches are excluded from root and example project tools",
const projects = ["basic-app", "inter-app-api-showcase"].map((name) =>
join(root, "examples", name),
);
const caches = projects.map((project) => join(project, ".wrnexus-123"));
const caches = projects.map((project) => join(project, ".wrnexus", "cache"));
for (const project of projects) {
const projectEslint = readFileSync(join(project, "eslint.config.js"), "utf8");