MCPcopy Create free account
hub / github.com/OpenHands/OpenHands / buildSafeDevConfig

Function buildSafeDevConfig

scripts/dev-safe.mjs:550–558  ·  view source on GitHub ↗
(cwd = process.cwd(), env = process.env)

Source from the content-addressed store, hash-verified

548 * @returns {SafeDevConfig} Configuration object
549 */
550export function buildSafeDevConfig(cwd = process.cwd(), env = process.env) {
551 const backendPort = parsePort(
552 env.OH_CANVAS_SAFE_BACKEND_PORT,
553 DEFAULT_BACKEND_PORT,
554 );
555 const vscodePort = parsePort(env.OH_CANVAS_SAFE_VSCODE_PORT, backendPort + 1);
556
557 return buildConfigFromPorts({ backendPort, vscodePort }, cwd, env);
558}
559
560/**
561 * Build safe dev configuration with dynamic port allocation.

Callers 6

buildConfigFunction · 0.90
startAgentServerFunction · 0.90
buildExtraBackendConfigFunction · 0.90
startAgentServerFunction · 0.90
dev-safe.test.tsFile · 0.90

Calls 2

buildConfigFromPortsFunction · 0.85
parsePortFunction · 0.70

Tested by

no test coverage detected