25 lines
777 B
JavaScript
25 lines
777 B
JavaScript
import assert from "node:assert/strict";
|
|
import { readdirSync } from "node:fs";
|
|
import { dirname, resolve } from "node:path";
|
|
import { fileURLToPath } from "node:url";
|
|
|
|
const webRoot = resolve(dirname(fileURLToPath(import.meta.url)), "../..");
|
|
const distRoot = resolve(webRoot, "app/dist");
|
|
const forbidden = [];
|
|
|
|
function walk(directory) {
|
|
for (const entry of readdirSync(directory, { withFileTypes: true })) {
|
|
const path = resolve(directory, entry.name);
|
|
if (entry.name === "__pycache__" || /\.py[co]$/i.test(entry.name)) {
|
|
forbidden.push(path);
|
|
continue;
|
|
}
|
|
if (entry.isDirectory()) walk(path);
|
|
}
|
|
}
|
|
|
|
walk(distRoot);
|
|
assert.deepEqual(forbidden, []);
|
|
console.log("static_release_python_cache_count=0");
|
|
console.log("static_release_hygiene=ok");
|