@tickernelz/paperclip-pro-plugin-daytona 2026.925.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +49 -0
- package/dist/duplex-command-stream.d.ts +97 -0
- package/dist/duplex-command-stream.d.ts.map +1 -0
- package/dist/duplex-command-stream.js +205 -0
- package/dist/duplex-command-stream.js.map +1 -0
- package/dist/duplex-command-stream.live.test.d.ts +2 -0
- package/dist/duplex-command-stream.live.test.d.ts.map +1 -0
- package/dist/duplex-command-stream.live.test.js +324 -0
- package/dist/duplex-command-stream.live.test.js.map +1 -0
- package/dist/duplex-command-stream.test.d.ts +2 -0
- package/dist/duplex-command-stream.test.d.ts.map +1 -0
- package/dist/duplex-command-stream.test.js +519 -0
- package/dist/duplex-command-stream.test.js.map +1 -0
- package/dist/file-sync.d.ts +77 -0
- package/dist/file-sync.d.ts.map +1 -0
- package/dist/file-sync.js +1055 -0
- package/dist/file-sync.js.map +1 -0
- package/dist/file-sync.test.d.ts +2 -0
- package/dist/file-sync.test.d.ts.map +1 -0
- package/dist/file-sync.test.js +974 -0
- package/dist/file-sync.test.js.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +3 -0
- package/dist/index.js.map +1 -0
- package/dist/login-pty.d.ts +162 -0
- package/dist/login-pty.d.ts.map +1 -0
- package/dist/login-pty.js +258 -0
- package/dist/login-pty.js.map +1 -0
- package/dist/login-pty.test.d.ts +2 -0
- package/dist/login-pty.test.d.ts.map +1 -0
- package/dist/login-pty.test.js +319 -0
- package/dist/login-pty.test.js.map +1 -0
- package/dist/manifest.d.ts +4 -0
- package/dist/manifest.d.ts.map +1 -0
- package/dist/manifest.js +179 -0
- package/dist/manifest.js.map +1 -0
- package/dist/plugin.d.ts +49 -0
- package/dist/plugin.d.ts.map +1 -0
- package/dist/plugin.js +2563 -0
- package/dist/plugin.js.map +1 -0
- package/dist/plugin.test.d.ts +2 -0
- package/dist/plugin.test.d.ts.map +1 -0
- package/dist/plugin.test.js +4701 -0
- package/dist/plugin.test.js.map +1 -0
- package/dist/pty-chunked-input.d.ts +48 -0
- package/dist/pty-chunked-input.d.ts.map +1 -0
- package/dist/pty-chunked-input.js +74 -0
- package/dist/pty-chunked-input.js.map +1 -0
- package/dist/pty-chunked-input.test.d.ts +2 -0
- package/dist/pty-chunked-input.test.d.ts.map +1 -0
- package/dist/pty-chunked-input.test.js +115 -0
- package/dist/pty-chunked-input.test.js.map +1 -0
- package/dist/worker.d.ts +3 -0
- package/dist/worker.d.ts.map +1 -0
- package/dist/worker.js +5 -0
- package/dist/worker.js.map +1 -0
- package/package.json +44 -0
|
@@ -0,0 +1,324 @@
|
|
|
1
|
+
// Live characterization of the Daytona duplex channel against the real provider.
|
|
2
|
+
//
|
|
3
|
+
// The test is credential-gated by design. It runs only when the run shell holds a
|
|
4
|
+
// Daytona API key, and it skips cleanly when the key is absent. The key comes from
|
|
5
|
+
// `DAYTONA_API_KEY`, which the plugin also reads as the credential fallback
|
|
6
|
+
// (`plugin.ts`). A skip is acceptable: the merged live coverage re-runs at a later
|
|
7
|
+
// phase and at rollout.
|
|
8
|
+
//
|
|
9
|
+
// What it proves on one live sandbox:
|
|
10
|
+
// 1. The duplex channel and an ordinary command run at the same time.
|
|
11
|
+
// 2. Host input sent after the child starts arrives, with no terminal echo and
|
|
12
|
+
// no frame corruption.
|
|
13
|
+
// 3. Channel teardown leaves no leaked provider session.
|
|
14
|
+
//
|
|
15
|
+
// The channel runs `cat` as the child. `cat` copies its input to its output, so a
|
|
16
|
+
// host write returns one time as program output. The launch wrapper sets the
|
|
17
|
+
// pseudo-terminal to raw mode with echo off, so the terminal adds no second copy
|
|
18
|
+
// and no newline translation. A returned line that equals the sent line, one time,
|
|
19
|
+
// proves both the delivery and the clean stream.
|
|
20
|
+
//
|
|
21
|
+
// The Daytona SDK is a runtime dependency of this live test only. The module loads
|
|
22
|
+
// it with a dynamic import inside the gated block, so the file imports with no SDK
|
|
23
|
+
// present and the other Daytona tests still run without it.
|
|
24
|
+
import { afterAll, beforeAll, describe, expect, it } from "vitest";
|
|
25
|
+
import { randomUUID } from "node:crypto";
|
|
26
|
+
import http2 from "node:http2";
|
|
27
|
+
import { Duplex } from "node:stream";
|
|
28
|
+
import { openDaytonaDuplexChannelSession, } from "./duplex-command-stream.js";
|
|
29
|
+
const DAYTONA_API_KEY = process.env.DAYTONA_API_KEY?.trim() ?? "";
|
|
30
|
+
const HAS_DAYTONA_CREDENTIAL = DAYTONA_API_KEY.length > 0;
|
|
31
|
+
const describeLive = HAS_DAYTONA_CREDENTIAL ? describe : describe.skip;
|
|
32
|
+
if (!HAS_DAYTONA_CREDENTIAL) {
|
|
33
|
+
// eslint-disable-next-line no-console
|
|
34
|
+
console.warn("Skipping the Daytona duplex channel live test: DAYTONA_API_KEY is not set in the run shell.");
|
|
35
|
+
}
|
|
36
|
+
// A live sandbox create and destroy needs a generous timeout. The provider round
|
|
37
|
+
// trip dominates the wall-clock time.
|
|
38
|
+
const LIVE_TIMEOUT_MS = 180_000;
|
|
39
|
+
/**
|
|
40
|
+
* Wait until `predicate(text)` is true for the running output, or reject after
|
|
41
|
+
* `timeoutMs`. The poll interval is short, so the wait ends soon after the output
|
|
42
|
+
* arrives.
|
|
43
|
+
*/
|
|
44
|
+
async function waitFor(readOutput, predicate, timeoutMs, label) {
|
|
45
|
+
const deadline = Date.now() + timeoutMs;
|
|
46
|
+
for (;;) {
|
|
47
|
+
if (predicate(readOutput()))
|
|
48
|
+
return;
|
|
49
|
+
if (Date.now() > deadline) {
|
|
50
|
+
throw new Error(`Timed out waiting for ${label}. Output so far: ${JSON.stringify(readOutput())}`);
|
|
51
|
+
}
|
|
52
|
+
await new Promise((resolve) => setTimeout(resolve, 100));
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
/** Open a `cat` duplex channel and collect its output into a growing string. */
|
|
56
|
+
async function openCatChannel(sandbox) {
|
|
57
|
+
let output = "";
|
|
58
|
+
const session = await openDaytonaDuplexChannelSession(sandbox.process, ["cat"]);
|
|
59
|
+
session.onData((chunk) => {
|
|
60
|
+
output += chunk;
|
|
61
|
+
});
|
|
62
|
+
return { session, readOutput: () => output };
|
|
63
|
+
}
|
|
64
|
+
describeLive("Daytona duplex channel (live)", () => {
|
|
65
|
+
let sandbox = null;
|
|
66
|
+
beforeAll(async () => {
|
|
67
|
+
const { Daytona } = await import("@daytonaio/sdk");
|
|
68
|
+
const client = new Daytona({ apiKey: DAYTONA_API_KEY });
|
|
69
|
+
sandbox = (await client.create());
|
|
70
|
+
}, LIVE_TIMEOUT_MS);
|
|
71
|
+
afterAll(async () => {
|
|
72
|
+
await sandbox?.delete().catch(() => undefined);
|
|
73
|
+
}, LIVE_TIMEOUT_MS);
|
|
74
|
+
it("runs the duplex channel and an ordinary command on one live sandbox", async () => {
|
|
75
|
+
const live = sandbox;
|
|
76
|
+
const { session, readOutput } = await openCatChannel(live);
|
|
77
|
+
try {
|
|
78
|
+
// Run an ordinary command while the channel child stays alive. Both use the
|
|
79
|
+
// same live sandbox, so a success on both proves they coexist.
|
|
80
|
+
const token = `ordinary-${randomUUID()}`;
|
|
81
|
+
const ordinary = await live.process.executeCommand(`printf %s ${token}`);
|
|
82
|
+
expect(ordinary.exitCode ?? 0).toBe(0);
|
|
83
|
+
expect(ordinary.result ?? "").toContain(token);
|
|
84
|
+
// The channel child still answers. A write returns as program output.
|
|
85
|
+
const ping = `chan-${randomUUID()}`;
|
|
86
|
+
session.write(Buffer.from(`${ping}\n`));
|
|
87
|
+
await waitFor(readOutput, (text) => text.includes(ping), 30_000, "channel echo");
|
|
88
|
+
}
|
|
89
|
+
finally {
|
|
90
|
+
await session.close();
|
|
91
|
+
}
|
|
92
|
+
}, LIVE_TIMEOUT_MS);
|
|
93
|
+
it("delivers host input sent after startup with no echo and no frame corruption", async () => {
|
|
94
|
+
const live = sandbox;
|
|
95
|
+
const { session, readOutput } = await openCatChannel(live);
|
|
96
|
+
try {
|
|
97
|
+
// Let the launch wrapper run `stty raw -echo` before the host input. The
|
|
98
|
+
// wrapper output echoes in cooked mode, so wait for the raw-mode switch
|
|
99
|
+
// before the measured write.
|
|
100
|
+
await new Promise((resolve) => setTimeout(resolve, 4_000));
|
|
101
|
+
const baseline = readOutput().length;
|
|
102
|
+
const line = `PING-${randomUUID()}`;
|
|
103
|
+
session.write(Buffer.from(`${line}\n`));
|
|
104
|
+
await waitFor(readOutput, (text) => text.slice(baseline).includes(line), 30_000, "delayed host input");
|
|
105
|
+
// Only `cat` writes the line, one time. Raw mode with echo off adds no
|
|
106
|
+
// second copy, so the sent token appears exactly one time after the write.
|
|
107
|
+
const afterWrite = readOutput().slice(baseline);
|
|
108
|
+
const occurrences = afterWrite.split(line).length - 1;
|
|
109
|
+
expect(occurrences).toBe(1);
|
|
110
|
+
// The stream carries the frame bytes with no newline translation. The
|
|
111
|
+
// returned line keeps its single line-feed and gains no carriage return.
|
|
112
|
+
expect(afterWrite).toContain(`${line}\n`);
|
|
113
|
+
expect(afterWrite).not.toContain(`${line}\r`);
|
|
114
|
+
}
|
|
115
|
+
finally {
|
|
116
|
+
await session.close();
|
|
117
|
+
}
|
|
118
|
+
}, LIVE_TIMEOUT_MS);
|
|
119
|
+
it("leaves no leaked provider session after channel close", async () => {
|
|
120
|
+
const live = sandbox;
|
|
121
|
+
const listSessions = live.process.listSessions?.bind(live.process);
|
|
122
|
+
const baseline = listSessions ? (await listSessions()).length : 0;
|
|
123
|
+
const { session } = await openCatChannel(live);
|
|
124
|
+
await session.close();
|
|
125
|
+
if (listSessions) {
|
|
126
|
+
// The channel uses a pseudo-terminal, not an ordinary session. So the
|
|
127
|
+
// session list stays at the baseline. A leaked session would raise the
|
|
128
|
+
// count.
|
|
129
|
+
const after = (await listSessions()).length;
|
|
130
|
+
expect(after).toBe(baseline);
|
|
131
|
+
}
|
|
132
|
+
// The child exits after close, so a fresh ordinary command still succeeds on
|
|
133
|
+
// the same sandbox. A leaked channel would block or corrupt the sandbox.
|
|
134
|
+
const token = `after-close-${randomUUID()}`;
|
|
135
|
+
const probe = await live.process.executeCommand(`printf %s ${token}`);
|
|
136
|
+
expect(probe.exitCode ?? 0).toBe(0);
|
|
137
|
+
expect(probe.result ?? "").toContain(token);
|
|
138
|
+
}, LIVE_TIMEOUT_MS);
|
|
139
|
+
it("serves repeated channel round trips with no idle polling and no per-request session growth", async () => {
|
|
140
|
+
const live = sandbox;
|
|
141
|
+
const listSessions = live.process.listSessions?.bind(live.process);
|
|
142
|
+
const { session, readOutput } = await openCatChannel(live);
|
|
143
|
+
try {
|
|
144
|
+
// Wait for the raw-mode switch, then take the open baseline. The channel
|
|
145
|
+
// uses a pseudo-terminal, not an ordinary session, so the session list
|
|
146
|
+
// stays flat through the whole exchange.
|
|
147
|
+
await new Promise((resolve) => setTimeout(resolve, 4_000));
|
|
148
|
+
const openSessions = listSessions ? (await listSessions()).length : 0;
|
|
149
|
+
// Send a batch of request-shaped lines over the one open channel and
|
|
150
|
+
// measure the round-trip latency of each. The transport writes no queue
|
|
151
|
+
// file and runs no exec per line, so the round trip is the stream latency.
|
|
152
|
+
const latenciesMs = [];
|
|
153
|
+
const rounds = 10;
|
|
154
|
+
for (let index = 0; index < rounds; index += 1) {
|
|
155
|
+
const line = `RTT-${index}-${randomUUID()}`;
|
|
156
|
+
const baseline = readOutput().length;
|
|
157
|
+
const start = Date.now();
|
|
158
|
+
session.write(Buffer.from(`${line}\n`));
|
|
159
|
+
await waitFor(readOutput, (text) => text.slice(baseline).includes(line), 30_000, "channel round trip");
|
|
160
|
+
latenciesMs.push(Date.now() - start);
|
|
161
|
+
}
|
|
162
|
+
// Hold the channel idle. A polling transport would run a provider exec on
|
|
163
|
+
// each tick and raise the session count. The duplex channel polls nothing.
|
|
164
|
+
await new Promise((resolve) => setTimeout(resolve, 5_000));
|
|
165
|
+
if (listSessions) {
|
|
166
|
+
const afterSessions = (await listSessions()).length;
|
|
167
|
+
// Zero idle polls and zero per-request session growth: the session count
|
|
168
|
+
// never rose above the open baseline.
|
|
169
|
+
expect(afterSessions).toBe(openSessions);
|
|
170
|
+
}
|
|
171
|
+
const min = Math.min(...latenciesMs);
|
|
172
|
+
const max = Math.max(...latenciesMs);
|
|
173
|
+
const avg = Math.round(latenciesMs.reduce((sum, value) => sum + value, 0) / latenciesMs.length);
|
|
174
|
+
// eslint-disable-next-line no-console
|
|
175
|
+
console.log(`[duplex-live] channel round-trip latency over ${rounds} requests: min=${min}ms avg=${avg}ms max=${max}ms; idle-poll session growth=0; per-request session growth=0`);
|
|
176
|
+
expect(latenciesMs.length).toBe(rounds);
|
|
177
|
+
}
|
|
178
|
+
finally {
|
|
179
|
+
await session.close();
|
|
180
|
+
}
|
|
181
|
+
}, LIVE_TIMEOUT_MS);
|
|
182
|
+
it("leaves no leaked session and keeps the sandbox usable after a forced mid-flight disconnect", async () => {
|
|
183
|
+
const live = sandbox;
|
|
184
|
+
const listSessions = live.process.listSessions?.bind(live.process);
|
|
185
|
+
const baseline = listSessions ? (await listSessions()).length : 0;
|
|
186
|
+
const { session, readOutput } = await openCatChannel(live);
|
|
187
|
+
// Wait for the raw-mode switch, then start a write and force a disconnect
|
|
188
|
+
// before its echo returns. The abrupt close models a lost provider channel.
|
|
189
|
+
await new Promise((resolve) => setTimeout(resolve, 4_000));
|
|
190
|
+
const inFlight = `INFLIGHT-${randomUUID()}`;
|
|
191
|
+
session.write(Buffer.from(`${inFlight}\n`));
|
|
192
|
+
// Close at once, without waiting for the echo. The pending round trip never
|
|
193
|
+
// settles through the stream; the channel tears down instead.
|
|
194
|
+
await session.close();
|
|
195
|
+
if (listSessions) {
|
|
196
|
+
// The forced disconnect left no leaked provider session. The count is back
|
|
197
|
+
// at the baseline that preceded the channel.
|
|
198
|
+
const after = (await listSessions()).length;
|
|
199
|
+
expect(after).toBe(baseline);
|
|
200
|
+
}
|
|
201
|
+
// Do not read the in-flight echo; the disconnect settled the run. Reference
|
|
202
|
+
// the output length only to keep the reader wired.
|
|
203
|
+
expect(readOutput().length).toBeGreaterThanOrEqual(0);
|
|
204
|
+
// The sandbox stays usable: a fresh ordinary command still succeeds. A
|
|
205
|
+
// leaked channel would block or corrupt the sandbox.
|
|
206
|
+
const token = `post-disconnect-${randomUUID()}`;
|
|
207
|
+
const probe = await live.process.executeCommand(`printf %s ${token}`);
|
|
208
|
+
expect(probe.exitCode ?? 0).toBe(0);
|
|
209
|
+
expect(probe.result ?? "").toContain(token);
|
|
210
|
+
// eslint-disable-next-line no-console
|
|
211
|
+
console.log("[duplex-live] forced mid-flight disconnect: leaked sessions=0; sandbox usable after=yes");
|
|
212
|
+
}, LIVE_TIMEOUT_MS);
|
|
213
|
+
it("test_live_daytona_run_uses_http2_v1_end_to_end", async () => {
|
|
214
|
+
// Phase 4 selects http2_v1 by running one Node HTTP/2 session directly
|
|
215
|
+
// on this same pseudo-terminal channel, right after the READY line.
|
|
216
|
+
// This package ships standalone (see the file header), so it cannot
|
|
217
|
+
// import the host readiness gate or the preface scan from
|
|
218
|
+
// `@tickernelz/paperclip-pro-adapter-utils`; this test reimplements the minimal,
|
|
219
|
+
// self-contained version of both, using only `node:http2`, so the
|
|
220
|
+
// proof runs against a real Daytona PTY end to end.
|
|
221
|
+
const live = sandbox;
|
|
222
|
+
const nonce = randomUUID();
|
|
223
|
+
// The 24-octet HTTP/2 client connection preface (RFC 9113, Section 3.4).
|
|
224
|
+
const CLIENT_PREFACE = Buffer.from("505249202a20485454502f322e300d0a0d0a534d0d0a0d0a", "hex");
|
|
225
|
+
// The sandbox-side child: send the READY line, then hand stdin/stdout to
|
|
226
|
+
// a real HTTP/2 client session and dispatch one request — the same
|
|
227
|
+
// shape `runHttp2Gateway()` in `sandbox-callback-bridge.ts` runs.
|
|
228
|
+
const nodeScript = [
|
|
229
|
+
`process.stdout.write(JSON.stringify({version:2,type:"ready",nonce:${JSON.stringify(nonce)}})+"\\n");`,
|
|
230
|
+
`const http2=require("node:http2");`,
|
|
231
|
+
`const {Duplex}=require("node:stream");`,
|
|
232
|
+
`const stdio=new Duplex({read(){},write(chunk,enc,cb){const ok=process.stdout.write(chunk);if(ok)cb();else process.stdout.once("drain",cb);}});`,
|
|
233
|
+
`process.stdin.on("data",c=>stdio.push(c));`,
|
|
234
|
+
`process.stdin.on("end",()=>stdio.push(null));`,
|
|
235
|
+
`const session=http2.connect("http://bridge.internal",{createConnection:()=>stdio});`,
|
|
236
|
+
`session.on("error",()=>process.exit(1));`,
|
|
237
|
+
`const stream=session.request({":method":"GET",":path":"/ping"});`,
|
|
238
|
+
`let body="";`,
|
|
239
|
+
`stream.on("data",c=>{body+=c;});`,
|
|
240
|
+
`stream.on("error",()=>process.exit(3));`,
|
|
241
|
+
`stream.on("end",()=>{session.close(()=>process.exit(body==="pong"?0:2));});`,
|
|
242
|
+
`stream.end();`,
|
|
243
|
+
].join("");
|
|
244
|
+
const session = await openDaytonaDuplexChannelSession(live.process, ["node", "-e", nodeScript]);
|
|
245
|
+
try {
|
|
246
|
+
// Reads bytes from the channel until it finds one complete newline-
|
|
247
|
+
// terminated READY line, then hands every later byte — including any
|
|
248
|
+
// already-buffered suffix of the same chunk — to `onAfterReady`.
|
|
249
|
+
const readyAndAfter = await new Promise((resolve, reject) => {
|
|
250
|
+
let buffer = Buffer.alloc(0);
|
|
251
|
+
const timer = setTimeout(() => reject(new Error(`Timed out waiting for the READY line. Bytes so far: ${buffer.length}`)), 30_000);
|
|
252
|
+
session.onData((chunk) => {
|
|
253
|
+
buffer = Buffer.concat([buffer, Buffer.isBuffer(chunk) ? chunk : Buffer.from(chunk)]);
|
|
254
|
+
const newlineIndex = buffer.indexOf(0x0a);
|
|
255
|
+
if (newlineIndex === -1)
|
|
256
|
+
return;
|
|
257
|
+
clearTimeout(timer);
|
|
258
|
+
const line = buffer.subarray(0, newlineIndex).toString("utf8");
|
|
259
|
+
const decoded = JSON.parse(line);
|
|
260
|
+
resolve({ nonce: decoded.nonce ?? "", afterReady: Buffer.from(buffer.subarray(newlineIndex + 1)) });
|
|
261
|
+
});
|
|
262
|
+
});
|
|
263
|
+
expect(readyAndAfter.nonce).toBe(nonce);
|
|
264
|
+
// Scan the retained suffix for the client preface, the same rule
|
|
265
|
+
// `createHttp2PrefaceScanningChannel` in `execution-target.ts` applies:
|
|
266
|
+
// the scan window opens only on bytes after the accepted READY line.
|
|
267
|
+
let sawPreface = false;
|
|
268
|
+
let downstream = null;
|
|
269
|
+
let pendingAfterPreface = Buffer.alloc(0);
|
|
270
|
+
let scanBuffer = readyAndAfter.afterReady;
|
|
271
|
+
function deliver(chunk) {
|
|
272
|
+
if (downstream)
|
|
273
|
+
downstream(chunk);
|
|
274
|
+
else
|
|
275
|
+
pendingAfterPreface = Buffer.concat([pendingAfterPreface, chunk]);
|
|
276
|
+
}
|
|
277
|
+
function handleChunk(chunk) {
|
|
278
|
+
if (sawPreface) {
|
|
279
|
+
deliver(chunk);
|
|
280
|
+
return;
|
|
281
|
+
}
|
|
282
|
+
scanBuffer = Buffer.concat([scanBuffer, chunk]);
|
|
283
|
+
const offset = scanBuffer.indexOf(CLIENT_PREFACE);
|
|
284
|
+
if (offset === -1)
|
|
285
|
+
return;
|
|
286
|
+
sawPreface = true;
|
|
287
|
+
const fromPreface = Buffer.from(scanBuffer.subarray(offset));
|
|
288
|
+
scanBuffer = Buffer.alloc(0);
|
|
289
|
+
deliver(fromPreface);
|
|
290
|
+
}
|
|
291
|
+
// The already-retained suffix might already hold the preface.
|
|
292
|
+
handleChunk(Buffer.alloc(0));
|
|
293
|
+
session.onData((chunk) => handleChunk(Buffer.isBuffer(chunk) ? chunk : Buffer.from(chunk)));
|
|
294
|
+
// Wrap the channel as a Node `Duplex` starting at the preface offset,
|
|
295
|
+
// and bind one plaintext HTTP/2 server session on it.
|
|
296
|
+
const boundDuplex = new Duplex({
|
|
297
|
+
read() { },
|
|
298
|
+
write(chunk, _encoding, callback) {
|
|
299
|
+
session.write(Buffer.isBuffer(chunk) ? chunk : Buffer.from(chunk));
|
|
300
|
+
callback();
|
|
301
|
+
},
|
|
302
|
+
});
|
|
303
|
+
downstream = (chunk) => boundDuplex.push(chunk);
|
|
304
|
+
if (pendingAfterPreface.length > 0) {
|
|
305
|
+
boundDuplex.push(pendingAfterPreface);
|
|
306
|
+
pendingAfterPreface = Buffer.alloc(0);
|
|
307
|
+
}
|
|
308
|
+
const server = http2.createServer();
|
|
309
|
+
server.on("stream", (stream) => {
|
|
310
|
+
stream.respond({ ":status": 200 });
|
|
311
|
+
stream.end("pong");
|
|
312
|
+
});
|
|
313
|
+
server.emit("connection", boundDuplex);
|
|
314
|
+
const exit = await session.wait();
|
|
315
|
+
expect(exit.exitCode).toBe(0);
|
|
316
|
+
// eslint-disable-next-line no-console
|
|
317
|
+
console.log("[duplex-live] http2_v1: READY, then the real client preface, then one full HTTP/2 round trip, all over one live Daytona PTY.");
|
|
318
|
+
}
|
|
319
|
+
finally {
|
|
320
|
+
await session.close();
|
|
321
|
+
}
|
|
322
|
+
}, LIVE_TIMEOUT_MS);
|
|
323
|
+
});
|
|
324
|
+
//# sourceMappingURL=duplex-command-stream.live.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"duplex-command-stream.live.test.js","sourceRoot":"","sources":["../src/duplex-command-stream.live.test.ts"],"names":[],"mappings":"AAAA,iFAAiF;AACjF,EAAE;AACF,kFAAkF;AAClF,mFAAmF;AACnF,4EAA4E;AAC5E,mFAAmF;AACnF,wBAAwB;AACxB,EAAE;AACF,sCAAsC;AACtC,wEAAwE;AACxE,iFAAiF;AACjF,4BAA4B;AAC5B,2DAA2D;AAC3D,EAAE;AACF,kFAAkF;AAClF,6EAA6E;AAC7E,iFAAiF;AACjF,mFAAmF;AACnF,iDAAiD;AACjD,EAAE;AACF,mFAAmF;AACnF,mFAAmF;AACnF,4DAA4D;AAE5D,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,QAAQ,CAAC;AACnE,OAAO,EAAE,UAAU,EA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