From 6c93b4d7ec8770fcbdc1bd63efaa65b82a7c6b7c Mon Sep 17 00:00:00 2001 From: sadan <117494111+sadan4@users.noreply.github.com> Date: Sun, 18 Aug 2024 10:09:38 -0400 Subject: [PATCH] update imports --- src/plugins/devCompanion.dev/index.tsx | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/src/plugins/devCompanion.dev/index.tsx b/src/plugins/devCompanion.dev/index.tsx index 1f894bf8f..dc063c26c 100644 --- a/src/plugins/devCompanion.dev/index.tsx +++ b/src/plugins/devCompanion.dev/index.tsx @@ -22,7 +22,7 @@ import { Devs } from "@utils/constants"; import { Logger } from "@utils/Logger"; import { canonicalizeMatch, canonicalizeReplace } from "@utils/patches"; import definePlugin, { OptionType, ReporterTestable } from "@utils/types"; -import { filters, findAll, search, wreq } from "@webpack"; +import { CodeFilter, filters, findAll, search, stringMatches, wreq } from "@webpack"; const PORT = 8485; const NAV_ID = "dev-companion-reconnect"; @@ -87,13 +87,7 @@ function parseNode(node: Node) { throw new Error("Unknown Node Type " + (node as any).type); } } -type CodeFilter = Array; -const stringMatches = (s: string, filter: CodeFilter) => - filter.every(f => - typeof f === "string" - ? s.includes(f) - : f.test(s) - ); +// we need to have our own because the one in webpack returns the first with no handling of more than one module function findModuleId(find: CodeFilter) { const matches: string[] = []; for (const id in wreq.m) {