MCPcopy Create free account
hub / github.com/Noumena-Network/code / requireCompiledBinaryPath

Function requireCompiledBinaryPath

src/testing/wrapperPtyHarness.ts:280–310  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

278}
279
280export function requireCompiledBinaryPath(): string {
281 let compiledBinaryPath = resolveCompiledBinaryPath()
282 if (!compiledBinaryPath) {
283 const build = Bun.spawnSync({
284 cmd: [
285 getWrapperHarnessBunBin(),
286 './build/package.mjs',
287 '--build-mode',
288 'external',
289 '--skip-archive',
290 ],
291 cwd: WRAPPER_HARNESS_REPO_ROOT,
292 stdout: 'inherit',
293 stderr: 'inherit',
294 })
295 if (build.exitCode === 0) {
296 compiledBinaryPath = resolveCompiledBinaryPath()
297 }
298 }
299 if (compiledBinaryPath) {
300 return compiledBinaryPath
301 }
302
303 throw new Error(
304 [
305 'Missing self-contained artifact for wrapper PTY tests.',
306 'Build it first with:',
307 ' bun run build',
308 ].join('\n'),
309 )
310}
311
312export async function spawnStagingWrapperPromptFixture(): Promise<WrapperPtyFixture> {
313 const compiledBinaryPath = requireCompiledBinaryPath()

Calls 2

getWrapperHarnessBunBinFunction · 0.85

Tested by

no test coverage detected