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

@reneos/auth

v0.1.18

Published

An intermediate microservice for applications that implements authentication and authorization in your services

Downloads

25

Readme

reneos.auth

Applications for authorization and user authentication, optimized for microservices architecture.

How to use:

npm i @reneos/auth

see ./examples/

On russian https://habr.com/ru/post/591319/

Request processing queue configurations define the stages of request processing. In the "workers" folder, each script is a link in the processing chain. The result returned from each "module" is passed to the next "module". If the "module" did not return a result (or returned null), processing ends. You can make "module" in any order in a "chain". If you have not found the required processing option - write your "module".

Worker Module Guidelines

This document provides instructions for creating modules to be used within the worker pipeline system. Follow these guidelines to ensure compatibility and functionality.


Module Requirements

Exported Function

Each module must export a default function that serves as a handler in the processing chain. The function should have the following structure:

export default async function (options, input, req, res) {
    console.log(options, input, req)
    const output = {}
    return output; // Return the processed result
}

Function Arguments

The exported function must handle the following arguments:

  1. options: An object of settings defined in the configuration.
  2. input: The result from the previous handler in the chain (or an empty object for the first handler).
  3. req: The HTTP request object.
  4. res: The HTTP response object.

Function Output

The function must return a processed result, either synchronously or asynchronously. Returning undefined or null will terminate the chain with an error.

Error Handling

Errors occurring within the module should be thrown using throw. These will be captured and emitted through _emitter.emit('errorchain').

Module Integration

Module Naming

The name specified in the configuration must match the name of the exported module.

Module Files

Modules must be passed through the mods object when calling Worker.Start.


Configuration Example

{
  "configs": [
    {
      "routes": [
        {
          "path": "/example",
          "workers": [
            { "name": "Logger", "options": { "level": "info" } },
            { "name": "Processor", "options": { "type": "json" } }
          ]
        }
      ]
    }
  ]
}

Route Processing (/example)

  1. The Logger module is called with { "level": "info" } as options.
  2. Its result is passed to the Processor module with { "type": "json" } as options.

Events

errorchain

Emitted when an error occurs in a module or during route processing. Use this for debugging and monitoring.

ready

Emitted after all routes are successfully registered.

endchain

Emitted when an module return null


Example Configuration for Testing

To test modules in isolation, use a simple configuration structure to simulate inputs and verify expected behavior.