npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@deployagram/logger-client

v1.0.0

Published

HTTP client for the Deployagram Collector (living-http-logger), built on fetch. Node.js 22+.

Readme

@deployagram/logger-client

A client for the Deployagram Collector (living-http-logger), built on Node's fetch. It is the Node.js equivalent of the Java DiagramLoggerClient.

npm install @deployagram/logger-client
import { DiagramLoggerClient } from '@deployagram/logger-client';

const logger = new DiagramLoggerClient({ baseUrl: 'http://localhost:1152' });

await logger.log({
  timestamp: new Date().toISOString(),
  protocol: 'HTTP',
  source: 'EmailClient',
  target: 'Emailer',
  message: 'POST /Emailer/email',
  body: '{"email":"[email protected]"}',
});

const all = await logger.read();            // GET /log/read
const marked = await logger.read('marker'); // GET /log/read/{id}
await logger.markEnd('marker');             // POST /log/markEnd/{id}
await logger.flushToCloud('Emailer', 'run-1'); // POST /run/markTestRunEnd/{container}/{run}

| Method | Collector endpoint | |---|---| | log(log) | POST /log | | read() | GET /log/read | | read(id) | GET /log/read/{id} | | markEnd(id) | POST /log/markEnd/{id} | | flushToCloud(container, run) | POST /run/markTestRunEnd/{container}/{run} | | configureKafkaBroker(bootstrapServers) | PUT /kafka/configuration | | configureSchemaRegistry(url) | PUT /schemaRegistry/configuration | | kafkaConsumerRead(read) | POST /kafka/consumer | | kafkaProducerRecord(record) | POST /kafka/producer |

Differences from the Java client:

  • A non-2xx response throws CollectorError, which has status and responseBody. The Java client ignores the status.
  • Every method returns a Promise.
  • The configure calls need the Collector in runtime configuration mode. In static mode the Collector answers 409, which throws, so a test never silently reads from the wrong broker.
  • flushToCloud calls markTestRunEnd, as the Java client does. On a Collector with a Central Logger configured, that also sends the run to the cloud.

Testing

npm test

The tests need no Collector. They stub the Collector's endpoints with MSW (Mock Service Worker), declaring each route the way a WireMock stub is declared, then check the method, path, body and error handling. Any request without a matching stub fails the test. flushToCloud is not tested.