Vesktop Stuff

This commit is contained in:
thororen 2024-07-16 00:15:41 -04:00
parent 3b980f2736
commit 16b33ba8fa
12 changed files with 40 additions and 24 deletions

View file

@ -113,7 +113,8 @@ await Promise.all([
define: {
...defines,
IS_DISCORD_DESKTOP: true,
IS_VESKTOP: false
IS_VESKTOP: false,
IS_EQUIBOP: false
},
plugins: [
...nodeCommonOpts.plugins,
@ -136,7 +137,8 @@ await Promise.all([
define: {
...defines,
IS_DISCORD_DESKTOP: true,
IS_VESKTOP: false
IS_VESKTOP: false,
IS_EQUIBOP: false
}
}),
esbuild.build({
@ -148,7 +150,8 @@ await Promise.all([
define: {
...defines,
IS_DISCORD_DESKTOP: true,
IS_VESKTOP: false
IS_VESKTOP: false,
IS_EQUIBOP: false
}
}),
@ -162,7 +165,8 @@ await Promise.all([
define: {
...defines,
IS_DISCORD_DESKTOP: false,
IS_VESKTOP: true
IS_VESKTOP: true,
IS_EQUIBOP: true
},
plugins: [
...nodeCommonOpts.plugins,
@ -185,7 +189,8 @@ await Promise.all([
define: {
...defines,
IS_DISCORD_DESKTOP: false,
IS_VESKTOP: true
IS_VESKTOP: true,
IS_EQUIBOP: true
}
}),
esbuild.build({
@ -197,7 +202,8 @@ await Promise.all([
define: {
...defines,
IS_DISCORD_DESKTOP: false,
IS_VESKTOP: true
IS_VESKTOP: true,
IS_EQUIBOP: true
}
}),
]).catch(err => {

View file

@ -47,6 +47,7 @@ const commonOptions = {
IS_REPORTER,
IS_DISCORD_DESKTOP: false,
IS_VESKTOP: false,
IS_EQUIBOP: false,
IS_UPDATER_DISABLED: true,
VERSION: JSON.stringify(VERSION),
BUILD_TIMESTAMP

View file

@ -98,7 +98,7 @@ export const makeAllPackagesExternalPlugin = {
};
/**
* @type {(kind: "web" | "discordDesktop" | "vencordDesktop") => import("esbuild").Plugin}
* @type {(kind: "web" | "discordDesktop" | "vencordDesktop" | "equicordDesktop") => import("esbuild").Plugin}
*/
export const globPlugins = kind => ({
name: "glob-plugins",
@ -137,7 +137,8 @@ export const globPlugins = kind => ({
(target === "web" && kind === "discordDesktop") ||
(target === "desktop" && kind === "web") ||
(target === "discordDesktop" && kind !== "discordDesktop") ||
(target === "vencordDesktop" && kind !== "vencordDesktop");
(target === "vencordDesktop" && kind !== "vencordDesktop") ||
(target === "equicordDesktop" && kind !== "equicordDesktop");
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" | "desktop" | "web" | "dev";
target: "discordDesktop" | "vencordDesktop" | "equicordDesktop" | "desktop" | "web" | "dev";
filePath: string;
}
@ -195,7 +195,7 @@ async function parseFile(fileName: string) {
const target = getPluginTarget(fileName);
if (target) {
if (!["web", "discordDesktop", "vencordDesktop", "desktop", "dev"].includes(target)) throw fail(`invalid target ${target}`);
if (!["web", "discordDesktop", "vencordDesktop", "equicordDesktop", "desktop", "dev"].includes(target)) throw fail(`invalid target ${target}`);
data.target = target as any;
}