mirror of
https://github.com/Equicord/Equicord.git
synced 2025-03-14 14:10:26 -04:00
Bob The Fixer
This commit is contained in:
parent
9dd488ba4c
commit
9f4c4f30ab
6 changed files with 12 additions and 8 deletions
|
@ -186,6 +186,7 @@ await Promise.all([
|
||||||
sourcemap,
|
sourcemap,
|
||||||
plugins: [
|
plugins: [
|
||||||
globPlugins("vencordDesktop"),
|
globPlugins("vencordDesktop"),
|
||||||
|
globPlugins("fullcordDesktop"),
|
||||||
...commonOpts.plugins
|
...commonOpts.plugins
|
||||||
],
|
],
|
||||||
define: {
|
define: {
|
||||||
|
@ -238,6 +239,7 @@ await Promise.all([
|
||||||
sourcemap,
|
sourcemap,
|
||||||
plugins: [
|
plugins: [
|
||||||
globPlugins("equicordDesktop"),
|
globPlugins("equicordDesktop"),
|
||||||
|
globPlugins("fullcordDesktop"),
|
||||||
...commonOpts.plugins
|
...commonOpts.plugins
|
||||||
],
|
],
|
||||||
define: {
|
define: {
|
||||||
|
|
|
@ -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 => ({
|
export const globPlugins = kind => ({
|
||||||
name: "glob-plugins",
|
name: "glob-plugins",
|
||||||
|
@ -138,7 +138,8 @@ export const globPlugins = kind => ({
|
||||||
(target === "desktop" && kind === "web") ||
|
(target === "desktop" && kind === "web") ||
|
||||||
(target === "discordDesktop" && kind !== "discordDesktop") ||
|
(target === "discordDesktop" && kind !== "discordDesktop") ||
|
||||||
(target === "vencordDesktop" && kind !== "vencordDesktop") ||
|
(target === "vencordDesktop" && kind !== "vencordDesktop") ||
|
||||||
(target === "equicordDesktop" && kind !== "equicordDesktop");
|
(target === "equicordDesktop" && kind !== "equicordDesktop") ||
|
||||||
|
(target === "fullcordDesktop" && kind !== "fullcordDesktop");
|
||||||
|
|
||||||
if (excluded) {
|
if (excluded) {
|
||||||
const name = await resolvePluginName(fullDir, file);
|
const name = await resolvePluginName(fullDir, file);
|
||||||
|
|
|
@ -39,7 +39,7 @@ interface PluginData {
|
||||||
hasCommands: boolean;
|
hasCommands: boolean;
|
||||||
required: boolean;
|
required: boolean;
|
||||||
enabledByDefault: boolean;
|
enabledByDefault: boolean;
|
||||||
target: "discordDesktop" | "vencordDesktop" | "equicordDesktop" | "desktop" | "web" | "dev";
|
target: "discordDesktop" | "vencordDesktop" | "equicordDesktop" | "fullcordDesktop" | "desktop" | "web" | "dev";
|
||||||
filePath: string;
|
filePath: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -195,7 +195,7 @@ async function parseFile(fileName: string) {
|
||||||
|
|
||||||
const target = getPluginTarget(fileName);
|
const target = getPluginTarget(fileName);
|
||||||
if (target) {
|
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;
|
data.target = target as any;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -39,7 +39,7 @@ interface PluginData {
|
||||||
hasCommands: boolean;
|
hasCommands: boolean;
|
||||||
required: boolean;
|
required: boolean;
|
||||||
enabledByDefault: boolean;
|
enabledByDefault: boolean;
|
||||||
target: "discordDesktop" | "vencordDesktop" | "equicordDesktop" | "desktop" | "web" | "dev";
|
target: "discordDesktop" | "vencordDesktop" | "equicordDesktop" | "fullcordDesktop" | "desktop" | "web" | "dev";
|
||||||
filePath: string;
|
filePath: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -195,7 +195,7 @@ async function parseFile(fileName: string) {
|
||||||
|
|
||||||
const target = getPluginTarget(fileName);
|
const target = getPluginTarget(fileName);
|
||||||
if (target) {
|
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;
|
data.target = target as any;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -176,11 +176,12 @@ function ExcludedPluginsList({ search }: { search: string; }) {
|
||||||
const matchingExcludedPlugins = Object.entries(ExcludedPlugins)
|
const matchingExcludedPlugins = Object.entries(ExcludedPlugins)
|
||||||
.filter(([name]) => name.toLowerCase().includes(search));
|
.filter(([name]) => name.toLowerCase().includes(search));
|
||||||
|
|
||||||
const ExcludedReasons: Record<"web" | "discordDesktop" | "vencordDesktop" | "equicordDesktop" | "desktop" | "dev", string> = {
|
const ExcludedReasons: Record<"web" | "discordDesktop" | "vencordDesktop" | "equicordDesktop" | "fullcordDesktop" | "desktop" | "dev", string> = {
|
||||||
desktop: "Discord Desktop app or Vesktop",
|
desktop: "Discord Desktop app or Vesktop",
|
||||||
discordDesktop: "Discord Desktop app",
|
discordDesktop: "Discord Desktop app",
|
||||||
vencordDesktop: "Vesktop app",
|
vencordDesktop: "Vesktop app",
|
||||||
equicordDesktop: "Equibop app",
|
equicordDesktop: "Equibop app",
|
||||||
|
fullcordDesktop: "Equibop and Vesktop apps",
|
||||||
web: "Vesktop app and the Web version of Discord",
|
web: "Vesktop app and the Web version of Discord",
|
||||||
dev: "Developer version of Equicord"
|
dev: "Developer version of Equicord"
|
||||||
};
|
};
|
||||||
|
|
2
src/modules.d.ts
vendored
2
src/modules.d.ts
vendored
|
@ -25,7 +25,7 @@ declare module "~plugins" {
|
||||||
folderName: string;
|
folderName: string;
|
||||||
userPlugin: boolean;
|
userPlugin: boolean;
|
||||||
}>;
|
}>;
|
||||||
export const ExcludedPlugins: Record<string, "web" | "discordDesktop" | "vencordDesktop" | "equicordDesktop" | "desktop" | "dev">;
|
export const ExcludedPlugins: Record<string, "web" | "discordDesktop" | "vencordDesktop" | "equicordDesktop" | "fullcordDesktop" | "desktop" | "dev">;
|
||||||
}
|
}
|
||||||
|
|
||||||
declare module "~pluginNatives" {
|
declare module "~pluginNatives" {
|
||||||
|
|
Loading…
Add table
Reference in a new issue