@dustticket/kit
v2.1.24
Published
A compact JavaScript SDK for HTTP packet capture, traffic inspection, and replay workflows.
Downloads
19
Readme
Packet Capture SDK
A compact JavaScript SDK for HTTP packet capture, traffic inspection, and replay workflows.
Features
- Request/response capture pipeline with lifecycle hooks.
- Header and payload sanitization before persistence.
- Session-based trace grouping for multi-step flows.
- Export support for JSONL and HAR-like snapshots.
- Optional replay mode for deterministic debugging.
Install
pnpm add @dustticket/kitQuick Example
import { execAlpha } from '@dustticket/kit'
const traces = await execAlpha({
ticketUrl: 'https://api.example.com/v1/orders',
type: 'http',
})
if (!traces) {
// capture pipeline unavailable
}SDK Methods
execAlpha(input: CaptureInput)- starts a standard capture flow.execBeta(input: CaptureInput)- starts an extended capture flow.execGamma(input: CaptureInput)- starts a replay-oriented capture flow.
Return type:
Promise<Record<string, any>[] | undefined>