Bob The Fixer

This commit is contained in:
thororen1234 2024-09-16 14:35:13 -04:00
parent 9dd488ba4c
commit 9f4c4f30ab
6 changed files with 12 additions and 8 deletions

View file

@ -186,6 +186,7 @@ await Promise.all([
sourcemap,
plugins: [
globPlugins("vencordDesktop"),
globPlugins("fullcordDesktop"),
...commonOpts.plugins
],
define: {
@ -238,6 +239,7 @@ await Promise.all([
sourcemap,
plugins: [
globPlugins("equicordDesktop"),
globPlugins("fullcordDesktop"),
...commonOpts.plugins
],
define: {

View file

@ -98,7 +98,7 @@ export const makeAllPackagesExternalPlugin = {
};
/**
* @type {(kind: "web" | "discordDesktop" | "vencordDesktop" | "equicordDesktop") => import("esbuild").Plugin}
* @type {(kind: "web" | "discordDesktop" | "vencordDesktop" | "equicordDesktop" | "fullcordDesktop") => import("esbuild").Plugin}
*/
export const globPlugins = kind => ({
name: "glob-plugins",
@ -138,7 +138,8 @@ export const globPlugins = kind => ({
(target === "desktop" && kind === "web") ||
(target === "discordDesktop" && kind !== "discordDesktop") ||
(target === "vencordDesktop" && kind !== "vencordDesktop") ||
(target === "equicordDesktop" && kind !== "equicordDesktop");
(target === "equicordDesktop" && kind !== "equicordDesktop") ||
(target === "fullcordDesktop" && kind !== "fullcordDesktop");
if (excluded) {
const name = await resolvePluginName(fullDir, file);

View file

@ -39,7 +39,7 @@ interface PluginData {
hasCommands: boolean;
required: boolean;
enabledByDefault: boolean;
target: "discordDesktop" | "vencordDesktop" | "equicordDesktop" | "desktop" | "web" | "dev";
target: "discordDesktop" | "vencordDesktop" | "equicordDesktop" | "fullcordDesktop" | "desktop" | "web" | "dev";
filePath: string;
}
@ -195,7 +195,7 @@ async function parseFile(fileName: string) {
const target = getPluginTarget(fileName);
if (target) {
if (!["web", "discordDesktop", "vencordDesktop", "equicordDesktop", "desktop", "dev"].includes(target)) throw fail(`invalid target ${target}`);
if (!["web", "discordDesktop", "vencordDesktop", "equicordDesktop", "fullcordDesktop", "desktop", "dev"].includes(target)) throw fail(`invalid target ${target}`);
data.target = target as any;
}

View file

@ -39,7 +39,7 @@ interface PluginData {
hasCommands: boolean;
required: boolean;
enabledByDefault: boolean;
target: "discordDesktop" | "vencordDesktop" | "equicordDesktop" | "desktop" | "web" | "dev";
target: "discordDesktop" | "vencordDesktop" | "equicordDesktop" | "fullcordDesktop" | "desktop" | "web" | "dev";
filePath: string;
}
@ -195,7 +195,7 @@ async function parseFile(fileName: string) {
const target = getPluginTarget(fileName);
if (target) {
if (!["web", "discordDesktop", "vencordDesktop", "equicordDesktop", "desktop", "dev"].includes(target)) throw fail(`invalid target ${target}`);
if (!["web", "discordDesktop", "vencordDesktop", "equicordDesktop", "fullcordDesktop", "desktop", "dev"].includes(target)) throw fail(`invalid target ${target}`);
data.target = target as any;
}