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 🙏

© 2024 – Pkg Stats / Ryan Hefner

verdaccio-profile-api

v0.2.7

Published

npm profile API implementaion for Verdaccio 2.x

Downloads

6

Readme

Verdaccio 2.x/3.x module for npm profile commands

build codecov npm downloads

Basic Verdaccio 2.x/3.x module for handling npm profile commands and changing password with verdaccio-htpasswd authentication plugin

Install

As simple as running:

$ npm install -g verdaccio-profile-api

Configure

Plugin configuration:

middlewares:
  profile-api:
    password_hash: md5
    password_policy: (?=.{9,})(?=.*?[^\w\s])(?=.*?[0-9])(?=.*?[A-Z]).*?[a-z].*

password_hash

  • md5: use apache-md5 hash
  • sha1: use crypt sha-1 hash
  • leave empty to use crypt DES from unix-crypt-td-js

password_policy

Regular expression to check for password policy. (?=.{9,})(?=.*?[^\w\s])(?=.*?[0-9])(?=.*?[A-Z]).*?[a-z].* for lenght at least 9 characters, at least one upper, lower, number and special character

Usage

  • First log in to npm private registry
    $ npm login --registry http://localhost:4873
  • Once logged in, you can view your profile. Except username all fields are blank, which is okey, as Verdaccio does not store profile information
    $ npm profile get --registry http://localhost:4873
    ┌─────────────────┬──────────────┐
    │ name            │ adam         │
    ├─────────────────┼──────────────┤
    │ email           │ (unverified) │
    ├─────────────────┼──────────────┤
    │ two-factor auth │ disabled     │
    ├─────────────────┼──────────────┤
    │ fullname        │              │
    ├─────────────────┼──────────────┤
    │ homepage        │              │
    ├─────────────────┼──────────────┤
    │ freenode        │              │
    ├─────────────────┼──────────────┤
    │ twitter         │              │
    ├─────────────────┼──────────────┤
    │ github          │              │
    ├─────────────────┼──────────────┤
    │ created         │              │
    ├─────────────────┼──────────────┤
    │ updated         │              │
    └─────────────────┴──────────────┘
  • Change your password (works only for htpasswd authetification) by running
    $ npm profile set password --registry http://localhost:4873
    Current password: 
    New password: 
    Again: 
    Set password
    Now you can logout and login with your new credentials.
  • If password policy is configured, server returns E400 for passwords not matching password policy

How does it work

Plugin implements npm user API. Currently only npm profile get and npm profile set password is supported.

Usefull links