modality-kit 0.17.6 → 0.17.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +10 -4
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -15606,9 +15606,10 @@ function recursiveScanForFiles(baseDir, options) {
|
|
|
15606
15606
|
} = options;
|
|
15607
15607
|
const extensionSet = new Set(fileExtensions);
|
|
15608
15608
|
function scanDirectory(dir, relativePath = "", isSearchingForTarget = true) {
|
|
15609
|
-
|
|
15610
|
-
|
|
15611
|
-
|
|
15609
|
+
const entries = readdirSync(dir);
|
|
15610
|
+
const errors3 = [];
|
|
15611
|
+
for (const entry of entries) {
|
|
15612
|
+
try {
|
|
15612
15613
|
if (excludePatterns.some((pattern) => entry.startsWith(pattern))) {
|
|
15613
15614
|
continue;
|
|
15614
15615
|
}
|
|
@@ -15626,8 +15627,13 @@ function recursiveScanForFiles(baseDir, options) {
|
|
|
15626
15627
|
} else if ((!fileExtensions || extensionSet.has(extname(entry))) && fileNameFilter(entry)) {
|
|
15627
15628
|
files.push({ filename: relPath, fullPath });
|
|
15628
15629
|
}
|
|
15630
|
+
} catch (e) {
|
|
15631
|
+
errors3.push(e);
|
|
15629
15632
|
}
|
|
15630
|
-
}
|
|
15633
|
+
}
|
|
15634
|
+
if (errors3.length > 0) {
|
|
15635
|
+
throw new Error(`Errors occurred while scanning directory "${dir}": ${errors3.map((err) => err.message).join("; ")}`);
|
|
15636
|
+
}
|
|
15631
15637
|
}
|
|
15632
15638
|
scanDirectory(baseDir, "", true);
|
|
15633
15639
|
return files.sort((a, b) => a.filename.localeCompare(b.filename));
|
package/package.json
CHANGED