mirror of
https://github.com/Equicord/Equicord.git
synced 2025-06-09 06:33:03 -04:00
fix imports causing a crash and add missing if statment
This commit is contained in:
parent
982b52d6e9
commit
4f92052d49
5 changed files with 73 additions and 51 deletions
48
src/debug/reporterData.ts
Normal file
48
src/debug/reporterData.ts
Normal file
|
@ -0,0 +1,48 @@
|
|||
/*
|
||||
* Vencord, a Discord client mod
|
||||
* Copyright (c) 2024 Vendicated and contributors
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*/
|
||||
|
||||
/**
|
||||
* this file is needed to avoid an import of plugins in ./runReporter.ts
|
||||
*/
|
||||
import { Patch } from "@utils/types";
|
||||
import { TypeWebpackSearchHistory } from "@webpack";
|
||||
|
||||
interface EvaledPatch extends Patch {
|
||||
id: number | string;
|
||||
}
|
||||
interface ReporterData {
|
||||
failedPatches: {
|
||||
foundNoModule: Patch[];
|
||||
hadNoEffect: EvaledPatch[];
|
||||
undoingPatchGroup: EvaledPatch[];
|
||||
erroredPatch: EvaledPatch[];
|
||||
};
|
||||
failedWebpack: Record<TypeWebpackSearchHistory, string[][]>;
|
||||
}
|
||||
export const reporterData: ReporterData = {
|
||||
failedPatches: {
|
||||
foundNoModule: [],
|
||||
hadNoEffect: [],
|
||||
undoingPatchGroup: [],
|
||||
erroredPatch: []
|
||||
},
|
||||
failedWebpack: {
|
||||
find: [],
|
||||
findByProps: [],
|
||||
findByCode: [],
|
||||
findStore: [],
|
||||
findComponent: [],
|
||||
findComponentByCode: [],
|
||||
findExportedComponent: [],
|
||||
waitFor: [],
|
||||
waitForComponent: [],
|
||||
waitForStore: [],
|
||||
proxyLazyWebpack: [],
|
||||
LazyComponentWebpack: [],
|
||||
extractAndLoadChunks: [],
|
||||
mapMangledModule: []
|
||||
}
|
||||
};
|
|
@ -5,49 +5,13 @@
|
|||
*/
|
||||
|
||||
import { Logger } from "@utils/Logger";
|
||||
import { Patch } from "@utils/types";
|
||||
import * as Webpack from "@webpack";
|
||||
import { patches } from "plugins";
|
||||
|
||||
import { loadLazyChunks } from "./loadLazyChunks";
|
||||
import { reporterData } from "./reporterData";
|
||||
|
||||
const ReporterLogger = new Logger("Reporter");
|
||||
interface EvaledPatch extends Patch {
|
||||
id: number | string;
|
||||
}
|
||||
interface ReporterData {
|
||||
failedPatches: {
|
||||
foundNoModule: Patch[];
|
||||
hadNoEffect: EvaledPatch[];
|
||||
undoingPatchGroup: EvaledPatch[];
|
||||
erroredPatch: EvaledPatch[];
|
||||
};
|
||||
failedWebpack: Record<Webpack.TypeWebpackSearchHistory, string[][]>;
|
||||
}
|
||||
export const reporterData: ReporterData = {
|
||||
failedPatches: {
|
||||
foundNoModule: [],
|
||||
hadNoEffect: [],
|
||||
undoingPatchGroup: [],
|
||||
erroredPatch: []
|
||||
},
|
||||
failedWebpack: {
|
||||
find: [],
|
||||
findByProps: [],
|
||||
findByCode: [],
|
||||
findStore: [],
|
||||
findComponent: [],
|
||||
findComponentByCode: [],
|
||||
findExportedComponent: [],
|
||||
waitFor: [],
|
||||
waitForComponent: [],
|
||||
waitForStore: [],
|
||||
proxyLazyWebpack: [],
|
||||
LazyComponentWebpack: [],
|
||||
extractAndLoadChunks: [],
|
||||
mapMangledModule: []
|
||||
}
|
||||
};
|
||||
async function runReporter() {
|
||||
try {
|
||||
ReporterLogger.log("Starting test...");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue