A compact JavaScript SDK for HTTP packet capture, traffic inspection, and replay workflows.
npm install @dustticket/kitA compact JavaScript SDK for HTTP packet capture, traffic inspection, and replay workflows.
- 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.
``bash`
pnpm add @dustticket/kit
`ts
import { execAlpha } from '@dustticket/kit'
const traces = await execAlpha({
ticketUrl: 'https://api.example.com/v1/orders',
type: 'http',
})
if (!traces) {
// capture pipeline unavailable
}
`$3
- 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:
`ts``
Promise