Skip to main content

vigil_core 0.1.2 copy "vigil_core: ^0.1.2" to clipboard
vigil_core: ^0.1.2 copied to clipboard

Core request models, privacy masking, trace context, timing parsers, and cURL export primitives for the Vigil network inspector.

vigil_core #

Core, platform-independent primitives for the Vigil network inspector. This package owns captured-call models, privacy masking, W3C trace context, Server-Timing parsing, debug payload parsing, and cURL export.

Most Flutter applications should install the umbrella vigil package instead. The matching Node packages are @vigiljs/core for protocol helpers and @vigiljs/express for server timing, gated error diagnostics, and optional ingest.

Installation #

dart pub add vigil_core

Usage #

import 'package:vigil_core/vigil_core.dart';

void main() {
  Vigil.instance.init(
    config: const VigilConfig(
      maxCalls: 200,
      maxBodyBytes: 32 * 1024,
      maskHeaders: {'authorization', 'cookie', 'set-cookie'},
      maskBodyFields: {'password', 'token', 'secret'},
    ),
  );

  final trace = VigilTraceContext.generate();
  print(trace.toHeader());

  final timings = VigilServerTimingParser.parse(
    'db;dur=24.5;desc="Load account", cache;dur=2.1',
  );
  print(timings.length);
}

Captured values are held in memory and exposed as immutable call-list views. Bodies are capped by maxBodyBytes; common credential headers and body fields are masked by default. Extend those sets for the vocabulary used by your API. VigilCurlExporter turns a captured request into cURL so it can be reproduced or shared with a backend teammate. The Flutter inspector in vigil adds one-tap Copy cURL and lifecycle sharing. Review URLs and query parameters before sharing captured data.

See the Vigil repository for architecture, security guidance, and related packages.

0
likes
160
points
738
downloads

Documentation

API reference

Publisher

verified publisherguptan404.com

Weekly Downloads

Core request models, privacy masking, trace context, timing parsers, and cURL export primitives for the Vigil network inspector.

Repository (GitHub)
View/report issues

Topics

#network-monitoring #http #debugging #observability #developer-tools

License

BSD-3-Clause (license)

More

Packages that depend on vigil_core