Skip to content

core/builder

Interfaces

BuildAndDeployOptions

Defined in: venpm/src/core/builder.ts:94

Properties

discordBinary?
ts
optional discordBinary?: string;

Defined in: venpm/src/core/builder.ts:96

pnpmEnv?
ts
optional pnpmEnv?: Record<string, string>;

Defined in: venpm/src/core/builder.ts:97

restart?
ts
optional restart?: boolean;

Defined in: venpm/src/core/builder.ts:95


BuildVencordOptions

Defined in: venpm/src/core/builder.ts:24

Properties

pnpmEnv?
ts
optional pnpmEnv?: Record<string, string>;

Defined in: venpm/src/core/builder.ts:25


DeployResult

Defined in: venpm/src/core/builder.ts:16

Properties

deployed
ts
deployed: boolean;

Defined in: venpm/src/core/builder.ts:17

deployPath?
ts
optional deployPath?: string;

Defined in: venpm/src/core/builder.ts:18

restarted
ts
restarted: boolean;

Defined in: venpm/src/core/builder.ts:19

Variables

DEPLOY_PATHS

ts
const DEPLOY_PATHS: Record<"linux" | "darwin" | "win32", string>;

Defined in: venpm/src/core/builder.ts:8

Functions

buildAndDeploy()

ts
function buildAndDeploy(
   fs, 
   shell, 
   vencordPath, 
options?): Promise<DeployResult>;

Defined in: venpm/src/core/builder.ts:103

Orchestrate build → deploy → (optional) restart.

Parameters

ParameterType
fsFileSystem
shellShellRunner
vencordPathstring
optionsBuildAndDeployOptions

Returns

Promise<DeployResult>


buildVencord()

ts
function buildVencord(
   shell, 
   vencordPath, 
options?): Promise<void>;

Defined in: venpm/src/core/builder.ts:32

Run pnpm build inside vencordPath. Throws an error if the build exits with a non-zero code.

Parameters

ParameterType
shellShellRunner
vencordPathstring
optionsBuildVencordOptions

Returns

Promise<void>


deployDist()

ts
function deployDist(fs, vencordPath): Promise<DeployResult>;

Defined in: venpm/src/core/builder.ts:60

Copy <vencordPath>/dist/ to the platform-specific deployed location.

Creates the deploy directory if it doesn't exist. Previous behaviour was to skip silently when the directory was missing, which required users to run Vencord's own installer first to bootstrap it. On macOS Apple Silicon that installer is x86-only and often fails, so we make rebuild self-sufficient.

Parameters

ParameterType
fsFileSystem
vencordPathstring

Returns

Promise<DeployResult>


restartDiscord()

ts
function restartDiscord(
   fs, 
   shell, 
discordBinary): Promise<void>;

Defined in: venpm/src/core/builder.ts:82

Kill all running Discord processes, wait for confirmed exit, then spawn the binary detached. Uses /proc/<pid>/exe-based discovery so only verified Discord binaries are killed (no stray processes). SIGTERM is tried first; survivors are escalated to SIGKILL.

Parameters

ParameterType
fsFileSystem
shellShellRunner
discordBinarystring

Returns

Promise<void>

Disclaimer — Not affiliated with Discord Inc. or Vencord. Client mods are against Discord's ToS. Use at your own risk.