fix(core): update

This commit is contained in:
2023-06-23 18:39:01 +02:00
parent 6c05bf6ae3
commit 6206b55deb
5 changed files with 415 additions and 518 deletions

View File

@ -341,8 +341,6 @@ export const listFileTree = async (
miniMatchFilter: string,
absolutePathsBool: boolean = false
): Promise<string[]> => {
const done = plugins.smartpromise.defer<string[]>();
// handle absolute miniMatchFilter
let dirPath: string;
if (plugins.path.isAbsolute(miniMatchFilter)) {
@ -356,15 +354,9 @@ export const listFileTree = async (
nodir: true,
dot: true,
};
plugins.glob(miniMatchFilter, options, (err, files: string[]) => {
if (err) {
console.log(err);
done.reject(err);
}
done.resolve(files);
});
let fileList = await done.promise;
let fileList = await plugins.glob.glob(miniMatchFilter, options)
if (absolutePathsBool) {
fileList = fileList.map((filePath) => {
return plugins.path.resolve(plugins.path.join(dirPath, filePath));