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

@medialit/integration-tests

v0.2.0

Published

End-to-end tests and a synthetic check for MediaLit servers

Readme

@medialit/integration-tests

End-to-end tests and a synthetic check for a MediaLit server, hosted or self-hosted.

Synthetic check

A quick check that MediaLit works end to end. It checks /ready, then uploads a tiny public image, seals it, downloads it and deletes it, in about a second. It is safe to run against production every few minutes.

MEDIALIT_APIKEY=... MEDIALIT_SERVER=https://medialit.example.com \
  npx @medialit/[email protected] synthetic
  • Use the API key of an app that exists only for monitoring. The synthetic check never changes settings and only deletes files in its own __synthetic_ groups, including leftovers from runs that were cut short.
  • Set MEDIALIT_SYNTHETIC_HEARTBEAT_URL to a heartbeat monitor such as Better Stack or Healthchecks.io. The synthetic check requests the URL after each passing run and <url>/fail after a failing one, so you are alerted when MediaLit fails and when the synthetic check stops running.
  • It exits with 1 when a step fails, and names the step and the reason.
  • Pin the version. The monitoring key is in the synthetic check's environment, so don't run whatever version is newest.

Test suites

The suites cover the REST API, the MCP server and the CLI in depth. They upload files, change media settings and restore them, so run them against a test app with no other activity.

MEDIALIT_APIKEY=... MEDIALIT_SERVER=localhost:8000 \
  npx @medialit/[email protected] all

| Command | Runs | | ----------- | -------------------------------------------------------------------- | | synthetic | The synthetic check | | all | The REST, MCP and CLI suites | | rest | The REST API suite | | mcp | The MCP server suite | | cli | The CLI suite. Set MEDIALIT_CLI to the medialit command to test. |

Set MEDIALIT_EXPECTED_MAX_STORAGE to the storage limit, in bytes, that the test account's plan grants, and the MCP suite checks that get_total_storage and whoami report it.

In the MediaLit repository, run them with bun run test:integration, or bun --filter @medialit/integration-tests <script> with synthetic, test:rest, test:mcp or test:cli.

To run all three suites against a fresh local stack (Postgres, MinIO and Mailpit from docker-compose.local.yml, plus the API), the same way the pull request check does, run bun run test:integration:stack from the repository root. It needs Docker, uses its own ports, and leaves your dev stack and apps/api/.env alone.