pretty: ci

This commit is contained in:
cha0s 2024-02-04 14:25:53 -06:00
parent 7af9d9083a
commit b5d317b9da

View File

@ -14,12 +14,10 @@ const {workspaces} = require(join(FLECKS_CORE_ROOT, 'package.json'));
const paths = (await Promise.all(workspaces.map((path) => glob(join(FLECKS_CORE_ROOT, path))))) const paths = (await Promise.all(workspaces.map((path) => glob(join(FLECKS_CORE_ROOT, path)))))
.flat(); .flat();
const cpus = new Array(require('os').cpus().length).fill(Promise.resolve(0)); const cpus = new Array(require('os').cpus().length).fill(Promise.resolve(0));
for (let i = 0; i < paths.length; ++i) { paths.forEach((cwd, i) => {
// then= :) // then= :)
cpus[i % cpus.length] = cpus[i % cpus.length] cpus[i % cpus.length] = cpus[i % cpus.length]
.then(((cwd) => async (code) => ( .then(async (code) => (await processCode(spawnWith(args, {cwd}))) || code);
(await processCode(spawnWith(args, {cwd}))) || code });
))(paths[i]));
}
process.exitCode = (await Promise.all(cpus)).find((code) => code !== 0) || 0; process.exitCode = (await Promise.all(cpus)).find((code) => code !== 0) || 0;
})(); })();