Skip to content

Commit 014e53e

Browse files
committed
fmt
1 parent f6d9cf4 commit 014e53e

3 files changed

Lines changed: 43 additions & 9 deletions

File tree

src/commands/devbox/pty.ts

Lines changed: 31 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -116,12 +116,26 @@ async function execCommand(
116116
authToken,
117117
});
118118
const ws = await openPtyWebSocket(wsUrl, authToken);
119-
await refreshPtySessionAfterAttach(ws, baseUrl, sessionName, 80, 24, authToken);
119+
await refreshPtySessionAfterAttach(
120+
ws,
121+
baseUrl,
122+
sessionName,
123+
80,
124+
24,
125+
authToken,
126+
);
120127
ws.send(command + "\n");
121128

122129
return new Promise<void>((resolve, reject) => {
123-
const releaseOnce = createPtySessionReleaser(baseUrl, sessionName, authToken);
124-
const disposeInterruptSignals = registerPtyInterruptHandlers(ws, releaseOnce);
130+
const releaseOnce = createPtySessionReleaser(
131+
baseUrl,
132+
sessionName,
133+
authToken,
134+
);
135+
const disposeInterruptSignals = registerPtyInterruptHandlers(
136+
ws,
137+
releaseOnce,
138+
);
125139

126140
let timeoutId: ReturnType<typeof setTimeout> | undefined;
127141
if (PTY_EXEC_TIMEOUT_MS > 0) {
@@ -167,10 +181,22 @@ async function interactiveSession(
167181
authToken,
168182
});
169183
const ws = await openPtyWebSocket(wsUrl, authToken);
170-
await refreshPtySessionAfterAttach(ws, baseUrl, sessionName, cols, rows, authToken);
184+
await refreshPtySessionAfterAttach(
185+
ws,
186+
baseUrl,
187+
sessionName,
188+
cols,
189+
rows,
190+
authToken,
191+
);
171192

172193
const releaseOnce = createPtySessionReleaser(baseUrl, sessionName, authToken);
173-
const { dispose, done } = startPtyIoSession(ws, baseUrl, sessionName, authToken);
194+
const { dispose, done } = startPtyIoSession(
195+
ws,
196+
baseUrl,
197+
sessionName,
198+
authToken,
199+
);
174200
const disposeSignals = registerPtyInterruptHandlers(ws, releaseOnce);
175201

176202
try {

src/commands/object/upload.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,12 @@ async function readStdinBuffer(): Promise<Buffer> {
173173
export async function uploadObject(options: UploadObjectOptions) {
174174
try {
175175
const client = getClient();
176-
const { paths: rawPaths, name, contentType, output: outputFormat } = options;
176+
const {
177+
paths: rawPaths,
178+
name,
179+
contentType,
180+
output: outputFormat,
181+
} = options;
177182
const paths = [...rawPaths];
178183

179184
if (paths.length === 0) {

src/lib/pty-client.ts

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -372,9 +372,12 @@ export function startPtyIoSession(
372372
const onResize = () => {
373373
const cols = process.stdout.columns || 80;
374374
const rows = process.stdout.rows || 24;
375-
ptyControl(baseUrl, sessionName, { action: "resize", cols, rows }, authToken).catch(
376-
() => {},
377-
);
375+
ptyControl(
376+
baseUrl,
377+
sessionName,
378+
{ action: "resize", cols, rows },
379+
authToken,
380+
).catch(() => {});
378381
};
379382

380383
const onMessage = (data: WebSocket.RawData) => {

0 commit comments

Comments
 (0)