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

@walkeros/server-transformer-file

v3.0.2

Published

File serving transformer for walkerOS - serves static files via pluggable Store backend

Readme

@walkeros/server-transformer-file

File serving transformer for walkerOS server flows. Serves static files through any Store backend, making it I/O-agnostic. Works with FsStore for disk, MemoryStore for pre-loaded assets, or any custom Store implementation.

How it works

  1. Extracts ingest.path from the request
  2. Strips optional URL prefix (e.g., /static)
  3. Calls store.get(filePath) to fetch content
  4. Responds with content, correct Content-Type, and Content-Length
  5. Returns false to stop the transformer chain

If the file is not found or no store is provided, the event passes through unchanged.

Installation

npm install @walkeros/server-transformer-file

Configuration

Settings

| Option | Type | Default | Description | | ----------- | ------------------------ | ------- | ----------------------------------- | | prefix | string | — | URL prefix to strip before lookup | | headers | Record<string, string> | — | Default headers for all responses | | mimeTypes | Record<string, string> | — | Extension overrides (.ext → type) |

Env

| Option | Type | Description | | ------- | ----------- | --------------------------------------------------- | | store | FileStore | Store providing file content (required for serving) |

Example with FsStore

import { startFlow } from '@walkeros/collector';
import { transformerFile } from '@walkeros/server-transformer-file';
import { storeFsInit } from '@walkeros/server-store-fs';

const fileStore = storeFsInit({
  collector,
  logger,
  config: { settings: { basePath: './public' } },
  env: {},
  id: 'fs',
});

await startFlow({
  transformers: {
    file: {
      code: transformerFile,
      config: {
        settings: {
          prefix: '/static',
          headers: { 'Cache-Control': 'public, max-age=3600' },
        },
      },
      env: { store: fileStore },
    },
  },
});

Built-in MIME types

.js, .mjs, .css, .html, .json, .wasm, .map, .txt, .xml, .svg, .png, .jpg, .gif, .ico, .webp, .woff, .woff2

Unknown extensions default to application/octet-stream. Override with the mimeTypes setting.

Behavior notes

  • I/O-agnostic — delegates all storage to the injected Store
  • No store = passthrough — warns and lets the event continue
  • No path = passthrough — skips when ingest.path is missing
  • Prefix mismatch = passthrough — only serves paths matching the prefix
  • Stops chain on serve — returns false after responding