Files
PaperClipAI/tests/runner-e2e/source-startup.ts
T

19 lines
595 B
TypeScript

import { execFile } from "node:child_process";
import path from "node:path";
import { promisify } from "node:util";
/** The source entry imports tool authority before the CLI can prepare these packages. */
export async function prepareSourceServerDependencies(
repositoryRoot: string,
environment: NodeJS.ProcessEnv,
installed: boolean,
) {
if (installed) return;
await promisify(execFile)(process.execPath, [path.join(repositoryRoot, "scripts/ensure-plugin-build-deps.mjs")], {
cwd: repositoryRoot,
env: environment,
timeout: 120_000,
maxBuffer: 1024 * 1024,
});
}