core/builder
Interfaces
BuildAndDeployOptions
Defined in: venpm/src/core/builder.ts:136
Properties
discordBinary?
optional discordBinary?: string;Defined in: venpm/src/core/builder.ts:138
pnpmEnv?
optional pnpmEnv?: Record<string, string>;Defined in: venpm/src/core/builder.ts:139
restart?
optional restart?: boolean;Defined in: venpm/src/core/builder.ts:137
restartOptions?
optional restartOptions?: RestartOptions;Defined in: venpm/src/core/builder.ts:140
BuildVencordOptions
Defined in: venpm/src/core/builder.ts:50
Properties
pnpmEnv?
optional pnpmEnv?: Record<string, string>;Defined in: venpm/src/core/builder.ts:51
DeployResult
Defined in: venpm/src/core/builder.ts:40
Properties
deployed
deployed: boolean;Defined in: venpm/src/core/builder.ts:41
deployPath?
optional deployPath?: string;Defined in: venpm/src/core/builder.ts:42
restarted
restarted: boolean;Defined in: venpm/src/core/builder.ts:43
restartedPids?
optional restartedPids?: number[];Defined in: venpm/src/core/builder.ts:45
PIDs of the Discord processes confirmed alive after the restart.
RestartOptions
Defined in: venpm/src/core/builder.ts:7
Properties
env?
optional env?: Record<string, string | undefined>;Defined in: venpm/src/core/builder.ts:13
logFile?
optional logFile?: string;Defined in: venpm/src/core/builder.ts:10
platform?
optional platform?: Platform;Defined in: venpm/src/core/builder.ts:12
Overrides for tests and for callers that launch into another session.
settleMs?
optional settleMs?: number;Defined in: venpm/src/core/builder.ts:8
startupTimeoutMs?
optional startupTimeoutMs?: number;Defined in: venpm/src/core/builder.ts:9
Variables
DEPLOY_PATHS
const DEPLOY_PATHS: Record<"linux" | "darwin" | "win32", string>;Defined in: venpm/src/core/builder.ts:32
Functions
buildAndDeploy()
function buildAndDeploy(
fs,
shell,
vencordPath,
options?): Promise<DeployResult>;Defined in: venpm/src/core/builder.ts:146
Orchestrate build → deploy → (optional) restart.
Parameters
| Parameter | Type |
|---|---|
fs | FileSystem |
shell | ShellRunner |
vencordPath | string |
options | BuildAndDeployOptions |
Returns
Promise<DeployResult>
buildVencord()
function buildVencord(
shell,
vencordPath,
options?): Promise<void>;Defined in: venpm/src/core/builder.ts:58
Run pnpm build inside vencordPath. Throws an error if the build exits with a non-zero code.
Parameters
| Parameter | Type |
|---|---|
shell | ShellRunner |
vencordPath | string |
options | BuildVencordOptions |
Returns
Promise<void>
deployDist()
function deployDist(fs, vencordPath): Promise<DeployResult>;Defined in: venpm/src/core/builder.ts:86
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
| Parameter | Type |
|---|---|
fs | FileSystem |
vencordPath | string |
Returns
Promise<DeployResult>
getLaunchLogPath()
function getLaunchLogPath(): string;Defined in: venpm/src/core/builder.ts:17
Where a failed launch leaves its output, so the error can quote it.
Returns
string
restartDiscord()
function restartDiscord(
fs,
shell,
discordBinary,
options?): Promise<LaunchVerification>;Defined in: venpm/src/core/builder.ts:112
Kill all running Discord processes, wait for confirmed exit, then start the binary again and prove it came back. 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.
The launch is platform-aware (Wayland/X11 on Linux, open -a on macOS) and verified: an exit during the settle window raises an error instead of the caller reporting a restart that never happened.
Parameters
| Parameter | Type |
|---|---|
fs | FileSystem |
shell | ShellRunner |
discordBinary | string |
options | RestartOptions |
Returns
Promise<LaunchVerification>