ci: fix npm ci (#27)

This commit is contained in:
Axel Cocat 2022-06-27 23:43:46 +02:00 committed by GitHub
parent 58ca06d1e0
commit dc1af0802f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 140 additions and 150 deletions

View file

@ -4,7 +4,7 @@ import * as path from "path";
import * as pako from "pako";
import * as mkdirp from "mkdirp";
import * as glob from "glob-promise";
import * as glob from "glob";
import "source-map-support/register";
import * as prettyMs from "pretty-ms";
import * as cliProgress from "cli-progress";
@ -15,6 +15,18 @@ import { DbcManager, IItemAppearanceDbc, IItemModifiedAppearanceDbc, IMountDbc,
const baseUrl = "https://wow.zamimg.com/modelviewer/live";
const globAsync = (pattern: string, options?: glob.IOptions) => {
return new Promise<string[]>((res, rej) => {
glob(pattern, options, (err, matches) => {
if (err) {
rej(err);
} else {
res(matches);
}
});
});
};
class Stopwatch {
private startTime: number;
@ -367,7 +379,7 @@ async function downloadBones(): Promise<void> {
}
async function parseModels(): Promise<void> {
const files = await glob("data/mo3/*.mo3");
const files = await globAsync("data/mo3/*.mo3");
const progress = new Progress("Reading model files for texture references...", files.length);
await promisepool.PromisePool.for(files)