ts: only read .json files when parsing IDLs
@@ -47,7 +47,9 @@ const workspace = new Proxy({} as any, {
}
const idlMap = new Map<string, Idl>();
- fs.readdirSync(idlFolder).forEach((file) => {
+ fs.readdirSync(idlFolder)
+ .filter((file) => file.endsWith(".json"))
+ .forEach((file) => {
const filePath = `${idlFolder}/${file}`;
const idlStr = fs.readFileSync(filePath);
const idl = JSON.parse(idlStr);
