@tracepanel/js 0.3.3 → 0.4.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 +71 -4
- package/dist/agent.d.ts +25 -2
- package/dist/agent.js +75 -24
- package/dist/agent.js.map +1 -1
- package/dist/body.d.ts +32 -0
- package/dist/body.js +314 -0
- package/dist/body.js.map +1 -0
- package/dist/browser.d.ts +2 -2
- package/dist/browser.js +15 -7
- package/dist/browser.js.map +1 -1
- package/dist/bullmq.d.ts +76 -1
- package/dist/bullmq.js +215 -6
- package/dist/bullmq.js.map +1 -1
- package/dist/bun.js +81 -11
- package/dist/bun.js.map +1 -1
- package/dist/config.d.ts +20 -0
- package/dist/config.js +13 -0
- package/dist/config.js.map +1 -1
- package/dist/console.d.ts +5 -0
- package/dist/console.js +16 -0
- package/dist/console.js.map +1 -1
- package/dist/express.js +94 -23
- package/dist/express.js.map +1 -1
- package/dist/headers.js +54 -8
- package/dist/headers.js.map +1 -1
- package/dist/inspector.d.ts +9 -0
- package/dist/inspector.js +47 -0
- package/dist/inspector.js.map +1 -0
- package/dist/locals.d.ts +51 -0
- package/dist/locals.js +269 -0
- package/dist/locals.js.map +1 -0
- package/dist/loggers.d.ts +50 -0
- package/dist/loggers.js +201 -0
- package/dist/loggers.js.map +1 -0
- package/dist/model.d.ts +23 -2
- package/dist/model.js.map +1 -1
- package/dist/next-widget.d.ts +13 -2
- package/dist/next-widget.js +16 -6
- package/dist/next-widget.js.map +1 -1
- package/dist/next.d.ts +6 -0
- package/dist/next.js +63 -2
- package/dist/next.js.map +1 -1
- package/dist/nuxt-plugin.d.ts +1 -0
- package/dist/nuxt-plugin.js +6 -0
- package/dist/nuxt-plugin.js.map +1 -1
- package/dist/processor.d.ts +23 -2
- package/dist/processor.js +65 -17
- package/dist/processor.js.map +1 -1
- package/dist/profile.d.ts +63 -0
- package/dist/profile.js +300 -0
- package/dist/profile.js.map +1 -0
- package/dist/proxy.d.ts +22 -0
- package/dist/proxy.js +72 -0
- package/dist/proxy.js.map +1 -0
- package/dist/request.d.ts +61 -0
- package/dist/request.js +244 -0
- package/dist/request.js.map +1 -0
- package/dist/runtime.d.ts +9 -0
- package/dist/runtime.js.map +1 -1
- package/dist/session.d.ts +10 -0
- package/dist/session.js +45 -0
- package/dist/session.js.map +1 -0
- package/dist/setup.js +10 -1
- package/dist/setup.js.map +1 -1
- package/dist/stack.d.ts +27 -3
- package/dist/stack.js +106 -9
- package/dist/stack.js.map +1 -1
- package/dist/vite.d.ts +1 -1
- package/dist/vite.js +2 -45
- package/dist/vite.js.map +1 -1
- package/dist/widget.d.ts +24 -0
- package/dist/widget.js +66 -3
- package/dist/widget.js.map +1 -1
- package/package.json +17 -5
package/README.md
CHANGED
|
@@ -122,6 +122,19 @@ export default function RootLayout({ children }) {
|
|
|
122
122
|
A request's handler is its page or route handler, named by its route
|
|
123
123
|
(`/api/books/[id]`).
|
|
124
124
|
|
|
125
|
+
In development the app's server also serves the console at `/__tracepanel__/`
|
|
126
|
+
on its own origin, for this machine only, and the badge loads from there.
|
|
127
|
+
`<Tracepanel />` records the pages in the browser too, as the Vite plugin
|
|
128
|
+
does (see below). It takes the same options:
|
|
129
|
+
|
|
130
|
+
```tsx
|
|
131
|
+
<Tracepanel browser={{ service: "shop-web", propagateTo: ["http://127.0.0.1:8000"] }} />
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
The recording is inline in `<head>`, so it wraps `fetch` before the app's
|
|
135
|
+
scripts run, even a client that keeps `fetch` from when it is made
|
|
136
|
+
(`openapi-fetch`). `browser={false}` leaves it out.
|
|
137
|
+
|
|
125
138
|
### Nuxt
|
|
126
139
|
|
|
127
140
|
Add the module and start `nuxt dev` with Tracepanel loaded, so it hooks the
|
|
@@ -212,10 +225,35 @@ page's, such as a dev server's client.
|
|
|
212
225
|
|
|
213
226
|
## What it records
|
|
214
227
|
|
|
215
|
-
- HTTP requests, with the route and the handler that served them
|
|
228
|
+
- HTTP requests, with the route and the handler that served them, and what
|
|
229
|
+
each one carried: its headers, query and cookies, the body as far as the
|
|
230
|
+
app read it, and the response's headers. Values under names such as
|
|
231
|
+
`password`, `token`, `session` or `csrf` are masked, and they never leave
|
|
232
|
+
your machine. A body is what the app read, up to 16 KB: in Express and
|
|
233
|
+
Nest what a body parser read (`req.body`, an upload's files by name and
|
|
234
|
+
size); in Next.js, Nuxt and under `withTracepanel()` the bytes the app's
|
|
235
|
+
own reads took from the request's stream, a copy of their start kept as
|
|
236
|
+
they pass. JSON and forms have their secrets masked, text is cut at
|
|
237
|
+
16 KB, and binary bodies are left out. A multipart form keeps its fields
|
|
238
|
+
and its files by name and size, never their contents, however large the
|
|
239
|
+
upload. JSON or a URL-encoded form past 16 KB is left out, since its
|
|
240
|
+
secrets can't be masked from a part of it. A body the app never reads is
|
|
241
|
+
not recorded, and Tracepanel never reads it or waits for it.
|
|
242
|
+
- The request's session as the handler left it: express-session's or
|
|
243
|
+
cookie-session's `req.session` in Express and Nest, and in Nuxt the
|
|
244
|
+
sessions h3's `useSession()` read (nuxt-auth-utils' among them). Each
|
|
245
|
+
value is text, masked under a sensitive name and below one, and
|
|
246
|
+
nuxt-auth-utils' `secure` data always is. Next.js and Bun have no
|
|
247
|
+
session of their own, and a sealed cookie (iron-session, Auth.js) takes
|
|
248
|
+
the app's secret to read, so none is recorded there: `setUser()` names
|
|
249
|
+
the signed-in user instead.
|
|
250
|
+
- A form's POST that redirects to another page: the panel on that page
|
|
251
|
+
lists the POST before it.
|
|
216
252
|
- SQL from `pg` and `mysql2` (and so Drizzle, Knex, Sequelize, TypeORM and
|
|
217
253
|
Prisma's driver adapters), with the line of your code that ran each
|
|
218
|
-
statement.
|
|
254
|
+
statement. A statement no code of yours made, such as a session store's,
|
|
255
|
+
names the library code that asked for it, past the driver and the ORM;
|
|
256
|
+
so do Redis and MongoDB commands. Prisma's operations show as steps.
|
|
219
257
|
- Transactions: BEGIN … COMMIT (or ROLLBACK) on a `pg` client or a `mysql2`
|
|
220
258
|
connection, with its statements and the calls made inside it, and its
|
|
221
259
|
savepoints.
|
|
@@ -224,8 +262,24 @@ page's, such as a dev server's client.
|
|
|
224
262
|
- Outgoing HTTP calls: `fetch()`, and `node:http` clients such as axios, on
|
|
225
263
|
Node and on Bun.
|
|
226
264
|
- BullMQ: each job a worker runs is a task, each job the app adds a step.
|
|
227
|
-
|
|
228
|
-
|
|
265
|
+
While a job is in flight, the console's Tasks page lists it under Now:
|
|
266
|
+
queued, running in its worker, or waiting for its next attempt, and the
|
|
267
|
+
workers that run them.
|
|
268
|
+
- Logs made during a request: `console` calls, Nest's `Logger`, and pino's
|
|
269
|
+
and winston's loggers, with their fields and the error they carry.
|
|
270
|
+
- Errors thrown in a handler, with your frames, their source and their
|
|
271
|
+
local variables. Node's inspector reads the variables as the error is
|
|
272
|
+
thrown, in your own frames only, while a request runs; a value under a
|
|
273
|
+
name such as `password` or `token` is masked, and a long one is cut. A
|
|
274
|
+
caller waiting on an `await` has none. Each error read costs about a
|
|
275
|
+
millisecond, at most 50 a second; a process under a debugger
|
|
276
|
+
(`--inspect`) is left alone.
|
|
277
|
+
- Where a request's time goes in code, for the console's flame graph, when
|
|
278
|
+
it asks: the panel's Profile toggle, or an `X-Tracepanel-Profile: 1`
|
|
279
|
+
header. V8's profiler samples the whole process, and one event loop runs
|
|
280
|
+
every request at once, so a profile keeps the samples taken while its
|
|
281
|
+
request was the only one running, and counts the rest
|
|
282
|
+
(`tracepanel.dropped_samples`). Time spent waiting on I/O is not in it.
|
|
229
283
|
- The caller's trace, when a request carries a W3C `traceparent`: the agent
|
|
230
284
|
links the two.
|
|
231
285
|
|
|
@@ -276,6 +330,11 @@ Environment variables, as in the Python SDK:
|
|
|
276
330
|
| `TRACEPANEL_LONG_TRANSACTION_MS` | `500` | a long transaction |
|
|
277
331
|
| `TRACEPANEL_QUEUE_WAIT_MS` | `1000` | a task that waited long for a worker |
|
|
278
332
|
| `TRACEPANEL_LARGE_RESULT_ROWS` | `1000` | a query without a LIMIT that read too many rows |
|
|
333
|
+
| `TRACEPANEL_CAPTURE_REQUEST` | on | `0` stops keeping each request's headers, query, cookies and body |
|
|
334
|
+
| `TRACEPANEL_CAPTURE_LOCALS` | on | `0` stops reading an error's local variables |
|
|
335
|
+
| `TRACEPANEL_PROFILE` | off | `1` profiles every trace, not only a request that asks |
|
|
336
|
+
| `TRACEPANEL_PROFILE_ENABLED` | on | `0` profiles nothing, and the console offers no Profile toggle |
|
|
337
|
+
| `TRACEPANEL_PROFILE_INTERVAL_MS` | `1` | how often a profiled trace is sampled |
|
|
279
338
|
|
|
280
339
|
## Command line
|
|
281
340
|
|
|
@@ -285,6 +344,14 @@ Environment variables, as in the Python SDK:
|
|
|
285
344
|
| `tracepanel dev` | runs the agent in the foreground, with the console on http://127.0.0.1:8765/ |
|
|
286
345
|
| `tracepanel mcp` | gives an AI coding agent your traces over MCP |
|
|
287
346
|
|
|
347
|
+
## Documentation
|
|
348
|
+
|
|
349
|
+
The documentation is at
|
|
350
|
+
[tracepanel.dev/docs/javascript](https://tracepanel.dev/docs/javascript):
|
|
351
|
+
installing, the integrations, the browser recording, settings and the command
|
|
352
|
+
line. The panel, the console and the issues are the same in every framework,
|
|
353
|
+
under [tracepanel.dev/docs](https://tracepanel.dev/docs).
|
|
354
|
+
|
|
288
355
|
## License
|
|
289
356
|
|
|
290
357
|
Licensed under the [MIT License](LICENSE).
|
package/dist/agent.d.ts
CHANGED
|
@@ -19,20 +19,43 @@ export declare class ConsoleUrl {
|
|
|
19
19
|
private url;
|
|
20
20
|
private checked;
|
|
21
21
|
constructor(storeDir: string);
|
|
22
|
-
|
|
22
|
+
/** `fresh`: read now, as a proxy to the console does for each request (a new agent listens on a new port). */
|
|
23
|
+
get(fresh?: boolean): string;
|
|
23
24
|
}
|
|
24
|
-
/**
|
|
25
|
+
/**
|
|
26
|
+
* A task event: a job queued, started, retried or finished, or a worker's heartbeat, with what that step knows (see
|
|
27
|
+
* bullmq.ts). The console's Live list of tasks in flight is made of them, before a task's trace exists.
|
|
28
|
+
*/
|
|
29
|
+
export type TaskEvent = Record<string, unknown>;
|
|
30
|
+
/** Say in the hello that this app sends `name` (`live_tasks`). */
|
|
31
|
+
export declare function sends(name: string): void;
|
|
32
|
+
/**
|
|
33
|
+
* The first line to the agent: it finds the issues with this project's limits. What the app offers the console, said
|
|
34
|
+
* here only: it can EXPLAIN a query on its database, its traces hold what each request carried while that is kept,
|
|
35
|
+
* and a request that asks is profiled while profiling is on (the console's Profile toggle shows then); and what it
|
|
36
|
+
* sends besides traces (`live_tasks`).
|
|
37
|
+
*/
|
|
38
|
+
export declare function hello(config: Config): Record<string, unknown>;
|
|
39
|
+
/**
|
|
40
|
+
* Batches traces and task events to the agent in the background; a full queue drops one rather than slow a request
|
|
41
|
+
* down.
|
|
42
|
+
*/
|
|
25
43
|
export declare class Sender {
|
|
26
44
|
private readonly config;
|
|
27
45
|
private readonly starter;
|
|
28
46
|
private queue;
|
|
47
|
+
private events;
|
|
29
48
|
private timer;
|
|
30
49
|
private socket;
|
|
31
50
|
private connecting;
|
|
32
51
|
private retryAt;
|
|
33
52
|
private warned;
|
|
53
|
+
/** What the connection's hello said the app sends: a module that sends more loaded after it (bullmq) reconnects. */
|
|
54
|
+
private said;
|
|
34
55
|
constructor(config: Config, starter: Starter);
|
|
35
56
|
submit(trace: Trace): void;
|
|
57
|
+
/** A task event, sent with the next batch: not counted with the traces, and dropped while no agent answers. */
|
|
58
|
+
submitEvent(event: TaskEvent): void;
|
|
36
59
|
private flushSoon;
|
|
37
60
|
private flush;
|
|
38
61
|
private connection;
|
package/dist/agent.js
CHANGED
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
// Traces go to the project's agent, which finds their issues, keeps them and serves the console. Its addresses are in
|
|
2
2
|
// <store>/agent.addr and console.addr. The wire: a hello line, then frames of a 4-byte big-endian length and a JSON
|
|
3
|
-
// array of traces
|
|
3
|
+
// array of traces, or an object of task events (`{"tasks": [...]}`: a queue's jobs while they are in flight). The
|
|
4
|
+
// agent starts on demand, as the other SDKs start it, and outlives the app's restarts.
|
|
4
5
|
import { spawn } from "node:child_process";
|
|
5
6
|
import { closeSync, mkdirSync, openSync, readFileSync, rmSync } from "node:fs";
|
|
6
7
|
import { createRequire } from "node:module";
|
|
7
8
|
import { connect } from "node:net";
|
|
8
9
|
import { join } from "node:path";
|
|
9
10
|
import { explain } from "./explain.js";
|
|
11
|
+
import { available as canProfile } from "./profile.js";
|
|
10
12
|
const PROTOCOL = 1;
|
|
11
13
|
const QUEUE_SIZE = 1000;
|
|
12
14
|
const BATCH_SIZE = 50;
|
|
@@ -111,27 +113,60 @@ export class ConsoleUrl {
|
|
|
111
113
|
constructor(storeDir) {
|
|
112
114
|
this.storeDir = storeDir;
|
|
113
115
|
}
|
|
114
|
-
|
|
116
|
+
/** `fresh`: read now, as a proxy to the console does for each request (a new agent listens on a new port). */
|
|
117
|
+
get(fresh = false) {
|
|
115
118
|
const configured = process.env.TRACEPANEL_CONSOLE_URL;
|
|
116
119
|
if (configured)
|
|
117
120
|
return configured.endsWith("/") ? configured : `${configured}/`;
|
|
118
|
-
if (!this.url || Date.now() - this.checked > CONSOLE_CHECK_MS) {
|
|
121
|
+
if (fresh || !this.url || Date.now() - this.checked > CONSOLE_CHECK_MS) {
|
|
119
122
|
this.checked = Date.now();
|
|
120
123
|
this.url = readAddress(join(this.storeDir, "console.addr"));
|
|
121
124
|
}
|
|
122
125
|
return this.url;
|
|
123
126
|
}
|
|
124
127
|
}
|
|
125
|
-
/**
|
|
128
|
+
/** What the integrations send the agent beyond traces (`live_tasks`: BullMQ's task events), as they say on load. */
|
|
129
|
+
const SENDS = new Set();
|
|
130
|
+
/** Say in the hello that this app sends `name` (`live_tasks`). */
|
|
131
|
+
export function sends(name) {
|
|
132
|
+
SENDS.add(name);
|
|
133
|
+
}
|
|
134
|
+
/**
|
|
135
|
+
* The first line to the agent: it finds the issues with this project's limits. What the app offers the console, said
|
|
136
|
+
* here only: it can EXPLAIN a query on its database, its traces hold what each request carried while that is kept,
|
|
137
|
+
* and a request that asks is profiled while profiling is on (the console's Profile toggle shows then); and what it
|
|
138
|
+
* sends besides traces (`live_tasks`).
|
|
139
|
+
*/
|
|
140
|
+
export function hello(config) {
|
|
141
|
+
return {
|
|
142
|
+
protocol: PROTOCOL,
|
|
143
|
+
max_traces: config.maxTraces,
|
|
144
|
+
thresholds: config.thresholds,
|
|
145
|
+
service: config.service,
|
|
146
|
+
capabilities: [
|
|
147
|
+
"explain",
|
|
148
|
+
...(config.captureRequest ? ["request"] : []),
|
|
149
|
+
...(config.profileEnabled && canProfile() ? ["profile"] : []),
|
|
150
|
+
...[...SENDS].sort(),
|
|
151
|
+
],
|
|
152
|
+
};
|
|
153
|
+
}
|
|
154
|
+
/**
|
|
155
|
+
* Batches traces and task events to the agent in the background; a full queue drops one rather than slow a request
|
|
156
|
+
* down.
|
|
157
|
+
*/
|
|
126
158
|
export class Sender {
|
|
127
159
|
config;
|
|
128
160
|
starter;
|
|
129
161
|
queue = [];
|
|
162
|
+
events = [];
|
|
130
163
|
timer;
|
|
131
164
|
socket;
|
|
132
165
|
connecting;
|
|
133
166
|
retryAt = 0;
|
|
134
167
|
warned = false;
|
|
168
|
+
/** What the connection's hello said the app sends: a module that sends more loaded after it (bullmq) reconnects. */
|
|
169
|
+
said = "";
|
|
135
170
|
constructor(config, starter) {
|
|
136
171
|
this.config = config;
|
|
137
172
|
this.starter = starter;
|
|
@@ -145,6 +180,16 @@ export class Sender {
|
|
|
145
180
|
else
|
|
146
181
|
this.flushSoon(BATCH_WAIT_MS);
|
|
147
182
|
}
|
|
183
|
+
/** A task event, sent with the next batch: not counted with the traces, and dropped while no agent answers. */
|
|
184
|
+
submitEvent(event) {
|
|
185
|
+
if (this.events.length >= QUEUE_SIZE)
|
|
186
|
+
return;
|
|
187
|
+
this.events.push(event);
|
|
188
|
+
if (this.events.length >= BATCH_SIZE)
|
|
189
|
+
this.flushSoon(0);
|
|
190
|
+
else
|
|
191
|
+
this.flushSoon(BATCH_WAIT_MS);
|
|
192
|
+
}
|
|
148
193
|
flushSoon(delay) {
|
|
149
194
|
if (this.timer && delay > 0)
|
|
150
195
|
return;
|
|
@@ -157,19 +202,25 @@ export class Sender {
|
|
|
157
202
|
}
|
|
158
203
|
async flush() {
|
|
159
204
|
const batch = this.queue.splice(0, BATCH_SIZE);
|
|
160
|
-
|
|
205
|
+
const events = this.events.splice(0, BATCH_SIZE);
|
|
206
|
+
if (batch.length === 0 && events.length === 0)
|
|
161
207
|
return;
|
|
162
208
|
const socket = await this.connection();
|
|
163
209
|
if (!socket)
|
|
164
210
|
return;
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
if (this.queue.length > 0)
|
|
211
|
+
if (batch.length > 0)
|
|
212
|
+
writeFrame(socket, batch);
|
|
213
|
+
if (events.length > 0)
|
|
214
|
+
writeFrame(socket, { tasks: events });
|
|
215
|
+
if (this.queue.length > 0 || this.events.length > 0)
|
|
170
216
|
this.flushSoon(0);
|
|
171
217
|
}
|
|
172
218
|
async connection() {
|
|
219
|
+
if (this.socket && !this.socket.destroyed && this.said !== saying(this.config)) {
|
|
220
|
+
// The hello is the one place the app says what it sends: a new connection says it again.
|
|
221
|
+
this.socket.destroy();
|
|
222
|
+
this.socket = undefined;
|
|
223
|
+
}
|
|
173
224
|
if (this.socket && !this.socket.destroyed)
|
|
174
225
|
return this.socket;
|
|
175
226
|
if (Date.now() < this.retryAt)
|
|
@@ -220,16 +271,8 @@ export class Sender {
|
|
|
220
271
|
socket.setTimeout(500, fail);
|
|
221
272
|
socket.once("error", fail);
|
|
222
273
|
socket.once("connect", () => {
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
const hello = {
|
|
226
|
-
protocol: PROTOCOL,
|
|
227
|
-
max_traces: this.config.maxTraces,
|
|
228
|
-
thresholds: this.config.thresholds,
|
|
229
|
-
service: this.config.service,
|
|
230
|
-
capabilities: ["explain"],
|
|
231
|
-
};
|
|
232
|
-
socket.write(`${JSON.stringify(hello)}\n`);
|
|
274
|
+
this.said = saying(this.config);
|
|
275
|
+
socket.write(`${JSON.stringify(hello(this.config))}\n`);
|
|
233
276
|
});
|
|
234
277
|
let received = Buffer.alloc(0);
|
|
235
278
|
socket.on("data", function onData(chunk) {
|
|
@@ -255,6 +298,17 @@ export class Sender {
|
|
|
255
298
|
});
|
|
256
299
|
}
|
|
257
300
|
}
|
|
301
|
+
/** What a hello says the app sends, to tell when it says more. */
|
|
302
|
+
function saying(config) {
|
|
303
|
+
return JSON.stringify(hello(config).capabilities);
|
|
304
|
+
}
|
|
305
|
+
/** One frame: a 4-byte big-endian length, then the JSON. */
|
|
306
|
+
function writeFrame(socket, payload) {
|
|
307
|
+
const data = Buffer.from(JSON.stringify(payload));
|
|
308
|
+
const length = Buffer.alloc(4);
|
|
309
|
+
length.writeUInt32BE(data.length);
|
|
310
|
+
socket.write(Buffer.concat([length, data]));
|
|
311
|
+
}
|
|
258
312
|
function hostPort(value) {
|
|
259
313
|
const at = value.lastIndexOf(":");
|
|
260
314
|
return { host: value.slice(0, at).replace(/^\[|\]$/g, ""), port: Number(value.slice(at + 1)) };
|
|
@@ -289,10 +343,7 @@ async function answer(socket, request) {
|
|
|
289
343
|
catch (error) {
|
|
290
344
|
reply = { answer: request.id, error: error instanceof Error ? error.message : String(error) };
|
|
291
345
|
}
|
|
292
|
-
const data = Buffer.from(JSON.stringify(reply));
|
|
293
|
-
const length = Buffer.alloc(4);
|
|
294
|
-
length.writeUInt32BE(data.length);
|
|
295
346
|
if (!socket.destroyed)
|
|
296
|
-
socket
|
|
347
|
+
writeFrame(socket, reply);
|
|
297
348
|
}
|
|
298
349
|
//# sourceMappingURL=agent.js.map
|
package/dist/agent.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agent.js","sourceRoot":"","sources":["../src/agent.ts"],"names":[],"mappings":"AAAA,sHAAsH;AACtH,oHAAoH;AACpH,4GAA4G;AAE5G,OAAO,EA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YAAC,MAAM,CAAC;gBACP,gEAAgE;YAClE,CAAC;QACH,CAAC;IACH,CAAC,CAAC;IACF,MAAM,CAAC,EAAE,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;IACxB,IAAI,CAAC,KAAK,CAAC,CAAC;AACd,CAAC;AAED,0FAA0F;AAC1F,KAAK,UAAU,MAAM,CAAC,MAAc,EAAE,OAAqB;IACzD,IAAI,CAAC,OAAO,CAAC,OAAO;QAAE,OAAO;IAC7B,IAAI,KAA8B,CAAC;IACnC,IAAI,CAAC;QACH,KAAK,GAAG,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,EAAE,GAAG,CAAC,MAAM,OAAO,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,EAAE,CAAC;IACtE,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,KAAK,GAAG,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,EAAE,KAAK,EAAE,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC;IAChG,CAAC;IACD,IAAI,CAAC,MAAM,CAAC,SAAS;QAAE,UAAU,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;AACnD,CAAC"}
|
package/dist/body.d.ts
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import type { IncomingMessage } from "node:http";
|
|
2
|
+
import type { Attrs } from "./model.js";
|
|
3
|
+
/** What the app read of a request's body, kept as it passed: its start, its size, and whether it read it all. */
|
|
4
|
+
export declare class BodyTap {
|
|
5
|
+
private readonly contentType;
|
|
6
|
+
private readonly kept;
|
|
7
|
+
private size;
|
|
8
|
+
private ended;
|
|
9
|
+
private readonly form;
|
|
10
|
+
constructor(contentType: string);
|
|
11
|
+
/** A piece of the body on its way to the app. */
|
|
12
|
+
feed(chunk: unknown): void;
|
|
13
|
+
/** The app read the body to its end. */
|
|
14
|
+
end(): void;
|
|
15
|
+
/** http.request.body, as far as the app read it. */
|
|
16
|
+
attrs(): Attrs;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* A Node request whose body pieces pass the tap on their way to the app: every reader of a stream (a `data`
|
|
20
|
+
* listener, `read()`, async iteration, `pipe()`) gets them through its `emit("data")`. The tap is the request's from
|
|
21
|
+
* then on (`tapOf`). A framework that puts another stream's `emit` on the request (Next.js does, for a body a
|
|
22
|
+
* middleware read too) gets it tapped as well.
|
|
23
|
+
*/
|
|
24
|
+
export declare function tapIncoming(req: IncomingMessage): BodyTap;
|
|
25
|
+
/** The tap on a Node request's body, if it has one. */
|
|
26
|
+
export declare function tapOf(req: IncomingMessage | undefined): BodyTap | undefined;
|
|
27
|
+
/**
|
|
28
|
+
* A fetch Request whose body passes the tap on its way to the handler: `request.body` and its readers (`text()`,
|
|
29
|
+
* `json()`, `formData()`, ...) read through it, piece by piece as the handler pulls them. The request stays the one
|
|
30
|
+
* the server made (Bun's `params` and `cookies` with it); `clone()` is its own, untapped.
|
|
31
|
+
*/
|
|
32
|
+
export declare function tapRequest(request: Request): BodyTap | undefined;
|