pruny 1.6.0 → 1.7.0
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 +13 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -9938,7 +9938,19 @@ program2.action(async (options) => {
|
|
|
9938
9938
|
return "Root";
|
|
9939
9939
|
};
|
|
9940
9940
|
const matchesFilter = (path2) => {
|
|
9941
|
-
|
|
9941
|
+
const lowerPath = path2.toLowerCase();
|
|
9942
|
+
const appName = getAppName2(path2).toLowerCase();
|
|
9943
|
+
if (appName.includes(filter2))
|
|
9944
|
+
return true;
|
|
9945
|
+
const segments = lowerPath.split("/");
|
|
9946
|
+
for (const segment of segments) {
|
|
9947
|
+
if (segment === filter2)
|
|
9948
|
+
return true;
|
|
9949
|
+
const withoutExt = segment.replace(/\.[^.]+$/, "");
|
|
9950
|
+
if (withoutExt === filter2)
|
|
9951
|
+
return true;
|
|
9952
|
+
}
|
|
9953
|
+
return lowerPath.includes(filter2);
|
|
9942
9954
|
};
|
|
9943
9955
|
result.routes = result.routes.filter((r) => matchesFilter(r.filePath));
|
|
9944
9956
|
if (result.publicAssets) {
|