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

Function buildSafeDevConfig

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

Source from the content-addressed store, hash-verified

537 * @returns {SafeDevConfig} Configuration object
538 */
539export function buildSafeDevConfig(cwd = process.cwd(), env = process.env) {
540 const backendPort = parsePort(
541 env.OH_CANVAS_SAFE_BACKEND_PORT,
542 DEFAULT_BACKEND_PORT,
543 );
544 const vscodePort = parsePort(env.OH_CANVAS_SAFE_VSCODE_PORT, backendPort + 1);
545
546 return buildConfigFromPorts({ backendPort, vscodePort }, cwd, env);
547}
548
549/**
550 * 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