diff --git a/scripts/generateReport.ts b/scripts/generateReport.ts index 54db96e6..a91e8187 100644 --- a/scripts/generateReport.ts +++ b/scripts/generateReport.ts @@ -211,9 +211,12 @@ page.on("console", async e => { switch (tag) { case "WebpackInterceptor:": + const patchFailMatch = message.match(/Patch by (.+?) (had no effect|errored|found no module) \(Module id is (.+?)\): (.+)/)!; + if (!patchFailMatch) break; + process.exitCode = 1; - const [, plugin, type, id, regex] = message.match(/Patch by (.+?) (had no effect|errored|found no module) \(Module id is (.+?)\): (.+)/)!; + const [, plugin, type, id, regex] = patchFailMatch; report.badPatches.push({ plugin, type, @@ -253,7 +256,7 @@ page.on("console", async e => { ).then(a => a.join(" ").trim()); - if (text.length && !text.startsWith("Failed to load resource: the server responded with a status of") && !text.includes("found no module Filter:")) { + if (text.length && !text.startsWith("Failed to load resource: the server responded with a status of") && !text.includes("Webpack")) { console.error("[Unexpected Error]", text); report.otherErrors.push(text); } @@ -293,6 +296,7 @@ function runTime(token: string) { p.patches?.forEach(patch => { patch.plugin = p.name; delete patch.predicate; + delete patch.group; if (!Array.isArray(patch.replacement)) patch.replacement = [patch.replacement]; diff --git a/src/plugins/alwaysAnimate/index.ts b/src/plugins/alwaysAnimate/index.ts index eae5a5d3..dbec3b4e 100644 --- a/src/plugins/alwaysAnimate/index.ts +++ b/src/plugins/alwaysAnimate/index.ts @@ -48,9 +48,10 @@ export default definePlugin({ } }, { + // Guild Banner find: ".animatedBannerHoverLayer,onMouseEnter:", replacement: { - match: /(?<=guildBanner:\i,animate:)\i/, + match: /(?<=guildBanner:\i,animate:)\i(?=}\))/, replace: "!0" } }