Plugin List: Give DirName

This commit is contained in:
thororen1234 2025-09-02 16:46:02 -04:00
parent 145befc42b
commit 31e9fbc7b4
No known key found for this signature in database
3 changed files with 22 additions and 0 deletions

View file

@ -47,6 +47,7 @@ interface PluginData {
enabledByDefault: boolean;
target: "discordDesktop" | "vesktop" | "equibop" | "desktop" | "web" | "dev";
filePath: string;
dirName: string;
}
const devs = {} as Record<string, Dev>;
@ -237,6 +238,12 @@ async function parseFile(fileName: string) {
.join(posixSep)
.replace(/\/index\.([jt]sx?)$/, "");
data.dirName = posixNormalize(fileName)
.split(sep)
.join(posixSep)
.replace(/\/index\.([jt]sx?)$/, "")
.replace(/^src\/equicordplugins\//, "");
return [data] as const;
}

View file

@ -47,6 +47,7 @@ interface PluginData {
enabledByDefault: boolean;
target: "discordDesktop" | "vesktop" | "equibop" | "desktop" | "web" | "dev";
filePath: string;
dirName: string;
}
const devs = {} as Record<string, Dev>;
@ -237,6 +238,13 @@ async function parseFile(fileName: string) {
.join(posixSep)
.replace(/\/index\.([jt]sx?)$/, "");
data.dirName = posixNormalize(fileName)
.split(sep)
.join(posixSep)
.replace(/\/index\.([jt]sx?)$/, "")
.replace(/^src\/plugins\//, "")
.replace(/^src\/equicordplugins\//, "");
return [data] as const;
}

View file

@ -47,6 +47,7 @@ interface PluginData {
enabledByDefault: boolean;
target: "discordDesktop" | "vesktop" | "equibop" | "desktop" | "web" | "dev";
filePath: string;
dirName: string;
}
const devs = {} as Record<string, Dev>;
const equicordDevs = {} as Record<string, Dev>;
@ -236,6 +237,12 @@ async function parseFile(fileName: string) {
.join(posixSep)
.replace(/\/index\.([jt]sx?)$/, "");
data.dirName = posixNormalize(fileName)
.split(sep)
.join(posixSep)
.replace(/\/index\.([jt]sx?)$/, "")
.replace(/^src\/plugins\//, "");
return [data] as const;
}