Some Fixes For Merge
This commit is contained in:
parent
961b9b2cad
commit
9c543bad54
3 changed files with 4 additions and 17 deletions
|
|
@ -23,6 +23,7 @@ import { normalize as posixNormalize, sep as posixSep } from "path/posix";
|
|||
import { BigIntLiteral, createSourceFile, Identifier, isArrayLiteralExpression, isCallExpression, isExportAssignment, isIdentifier, isObjectLiteralExpression, isPropertyAccessExpression, isPropertyAssignment, isSatisfiesExpression, isStringLiteral, isVariableStatement, NamedDeclaration, NodeArray, ObjectLiteralExpression, PropertyAssignment, ScriptTarget, StringLiteral, SyntaxKind } from "typescript";
|
||||
|
||||
import { getPluginTarget } from "./utils.mjs";
|
||||
import { PluginTarget, PluginTargets } from "@utils/pluginTargets";
|
||||
|
||||
export interface Dev {
|
||||
name: string;
|
||||
|
|
@ -46,7 +47,7 @@ export interface PluginData {
|
|||
commands: Command[];
|
||||
required: boolean;
|
||||
enabledByDefault: boolean;
|
||||
target: "discordDesktop" | "vesktop" | "equibop" | "desktop" | "web" | "browser" | "dev";
|
||||
target?: PluginTarget;
|
||||
filePath: string;
|
||||
dirName: string;
|
||||
isModified: boolean;
|
||||
|
|
@ -235,7 +236,7 @@ export async function parseFile(fileName: string) {
|
|||
|
||||
const target = getPluginTarget(fileName);
|
||||
if (target) {
|
||||
if (!["web", "browser", "discordDesktop", "vesktop", "equibop", "desktop", "dev"].includes(target)) throw fail(`invalid target ${target}`);
|
||||
if (!PluginTargets.includes(target as PluginTarget)) throw fail(`invalid target ${target}`);
|
||||
data.target = target as any;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -45,19 +45,5 @@ export default definePlugin({
|
|||
replace: "decorators:[Vencord.Api.MemberListDecorators.__getDecorators(arguments[0],'dm'),$1]"
|
||||
}
|
||||
},
|
||||
// fix discords styling for now
|
||||
{
|
||||
find: '"AvatarWithText"',
|
||||
replacement: [
|
||||
{
|
||||
match: /(?<=className:.{0,10}),\{.{0,10}\}\)(?=,children:)/,
|
||||
replace: ')+" vc-member-list-decorators-display-names"'
|
||||
},
|
||||
{
|
||||
match: /(?<=className:\i\.\i)(?=,children:\i\}\))/,
|
||||
replace: '+" vc-member-list-decorators-display-names"'
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
});
|
||||
|
|
|
|||
|
|
@ -4,5 +4,5 @@
|
|||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*/
|
||||
|
||||
export const PluginTargets = ["web", "browser", "discordDesktop", "vesktop", "desktop", "dev"] as const;
|
||||
export const PluginTargets = ["web", "browser", "discordDesktop", "vesktop", "equibop", "desktop", "dev"] as const;
|
||||
export type PluginTarget = typeof PluginTargets[number];
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue