/
nayvok
/
livecoding
Обзор
Документация
Войти
/
nayvok
/
livecoding
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
CI/CD
Аналитика
Безопасность
main
runner/src/executors/node.ts
22 строки
685 B
nayvok
fix: harden sessions and WebRTC recovery
17 июн 2026, 22:02
17 июн 2026, 22:02
37b9a92
Код
Авторство
О чём код?
import { executeChild } from './child.js' import type { RunResult } from '../types.js' const DEFAULT_NODE_MEMORY_LIMIT_BYTES = 160 * 1024 * 1024 export function executeNode(code: string, timeoutMs: number): Promise<RunResult> { const configuredMemoryLimit = Number( process.env.EXECUTION_MEMORY_LIMIT_BYTES, ) const memoryLimitBytes = Number.isSafeInteger(configuredMemoryLimit) && configuredMemoryLimit > 0 ? configuredMemoryLimit : DEFAULT_NODE_MEMORY_LIMIT_BYTES return executeChild({ command: 'node', args: ['--permission', '--max-old-space-size=96', '--no-warnings', '-'], stdinPayload: code, timeoutMs, memoryLimitBytes, }) }