/
Alex_Ural
/
opencode
Обзор
Документация
Войти
/
Alex_Ural
/
opencode
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
dev
packages/core/src/pty/pty.bun.ts
26 строк
567 B
Shoubhit Dash
refactor(core): consolidate pty service (#30537)
03 июн 2026, 12:47
Не верифицирован
03 июн 2026, 12:47
932fb6c
Код
Авторство
О чём код?
import { spawn as create } from "bun-pty" import type { Opts, Proc } from "./pty" export type { Disp, Exit, Opts, Proc } from "./pty" export function spawn(file: string, args: string[], opts: Opts): Proc { const pty = create(file, args, opts) return { pid: pty.pid, onData(listener) { return pty.onData(listener) }, onExit(listener) { return pty.onExit(listener) }, write(data) { pty.write(data) }, resize(cols, rows) { pty.resize(cols, rows) }, kill(signal) { pty.kill(signal) }, } }