chore(pcd): cleanup unused files for schema deps

This commit is contained in:
Sam Chau
2025-11-04 07:02:05 +10:30
parent 37ae5164e6
commit 58bd036a3a

View File

@@ -38,6 +38,16 @@ async function cloneDependency(
// Checkout the specific version tag
await git.checkout(depPath, version);
// Clean up dependency - keep only ops folder and pcd.json
const keepItems = new Set(['ops', 'pcd.json']);
for await (const entry of Deno.readDir(depPath)) {
if (!keepItems.has(entry.name)) {
const itemPath = `${depPath}/${entry.name}`;
await Deno.remove(itemPath, { recursive: true });
}
}
}
/**