Reporter Bad Webpack Finds logs cleanups
This commit is contained in:
parent
fa948e8639
commit
f70cc5205c
|
@ -529,9 +529,21 @@ async function runtime(token: string) {
|
||||||
parsedArgs === args &&
|
parsedArgs === args &&
|
||||||
["waitFor", "find", "findComponent", "webpackDependantLazy", "webpackDependantLazyComponent"].includes(searchType)
|
["waitFor", "find", "findComponent", "webpackDependantLazy", "webpackDependantLazyComponent"].includes(searchType)
|
||||||
) {
|
) {
|
||||||
logMessage += `(${parsedArgs[0].toString().slice(0, 147)}...)`;
|
let filter = parsedArgs[0].toString();
|
||||||
|
if (filter.length > 150) {
|
||||||
|
filter = filter.slice(0, 147) + "...";
|
||||||
|
}
|
||||||
|
|
||||||
|
logMessage += `(${filter})`;
|
||||||
} else if (searchType === "extractAndLoadChunks") {
|
} else if (searchType === "extractAndLoadChunks") {
|
||||||
logMessage += `([${parsedArgs[0].map((arg: any) => `"${arg}"`).join(", ")}], ${parsedArgs[1].toString()})`;
|
let regexStr: string;
|
||||||
|
if (parsedArgs[1] === Vencord.Webpack.DefaultExtractAndLoadChunksRegex) {
|
||||||
|
regexStr = "DefaultExtractAndLoadChunksRegex";
|
||||||
|
} else {
|
||||||
|
regexStr = parsedArgs[1].toString();
|
||||||
|
}
|
||||||
|
|
||||||
|
logMessage += `([${parsedArgs[0].map((arg: any) => `"${arg}"`).join(", ")}], ${regexStr})`;
|
||||||
} else {
|
} else {
|
||||||
logMessage += `(${filterName.length ? `${filterName}(` : ""}${parsedArgs.map(arg => `"${arg}"`).join(", ")})${filterName.length ? ")" : ""}`;
|
logMessage += `(${filterName.length ? `${filterName}(` : ""}${parsedArgs.map(arg => `"${arg}"`).join(", ")})${filterName.length ? ")" : ""}`;
|
||||||
}
|
}
|
||||||
|
|
|
@ -614,7 +614,7 @@ export const findAll = deprecatedRedirect("findAll", "cacheFindAll", cacheFindAl
|
||||||
*/
|
*/
|
||||||
export const findBulk = deprecatedRedirect("findBulk", "cacheFindBulk", cacheFindBulk);
|
export const findBulk = deprecatedRedirect("findBulk", "cacheFindBulk", cacheFindBulk);
|
||||||
|
|
||||||
const DefaultExtractAndLoadChunksRegex = /(?:Promise\.all\((\[\i\.\i\(".+?"\).+?\])\)|Promise\.resolve\(\)).then\(\i\.bind\(\i,"(.+?)"\)\)/;
|
export const DefaultExtractAndLoadChunksRegex = /(?:Promise\.all\((\[\i\.\i\(".+?"\).+?\])\)|Promise\.resolve\(\)).then\(\i\.bind\(\i,"(.+?)"\)\)/;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Extract and load chunks using their entry point.
|
* Extract and load chunks using their entry point.
|
||||||
|
|
Loading…
Reference in a new issue