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-auth-gitlab

v2.0.0-beta.11

Published

Verdaccio authentication plugin by gitlab personal access token or oauth token or ci job token.

Downloads

68

Readme

verdaccio-auth-gitlab

Verdaccio authentication plugin by gitlab personal access token or oauth token or ci job token.

Installation

npm install --global verdaccio-auth-gitlab

Configure

config.yaml

auth:
  auth-gitlab:
    # Gitlab server (default: https://gitlab.com)
    url: https://gitlab.com

    # Gitlab token type (default: personal)
    tokenType: personal # options: personal/oauth/job

    # Use full group path (default: false)
    fullGroupPath: false

    # Use full project path with namespace (default: false)
    fullProjectPath: false

    # Any group list api options (default: null)
    extendGroupOptions: null

    # Any project list api options (default: null)
    extendProjectOptions: null

    # Check gitlab Role
    role:
      # Gitlab user role (default: true)
      # Warning: Set to false will disable all role
      #          Disable user role will make it impossible to check the relevance between username and token
      user: true

      # Gitlab group owner role (default: false)
      # Warning: Set to true will cause performance degradation
      groupOwner: false

      # Gitlab group member role (default: false)
      # Warning: Set to true will cause performance degradation
      groupMember: false

      # Gitlab group minimal access level (default: [])
      # Warning: Set to non-empty array will cause performance degradation
      #          Supported by gitlab 11.2
      groupMinAccessLevel: [] # access level array e.g. [30, 40]

      # Gitlab project owner role (default: false)
      # Warning: Set to true will cause performance degradation
      projectOwner: false

      # Gitlab project member role (default: false)
      # Warning: Set to true will cause performance degradation
      projectMember: false

      # Gitlab project minimal access level (default: [])
      # Warning: Set to non-empty array will cause performance degradation
      #          Supported by gitlab 11.2
      projectMinAccessLevel: [] # access level array e.g. [30, 40]

    # Cache gitlab user
    cache:
      # Max cache count (default: 1000)
      # Warning: Set to 0 will cause performance degradation
      maxCount: 1000

      # Max cache second (default: 300)
      # Warning: Set to 0 will cause performance degradation
      maxSecond: 300

    # Limit the scope of the all function
    page:
      # Number of items to list per page (default: 100)
      # Warning: The maximum value is 100
      perPage: 100
      # Max page number (default: 0)
      # Warning: Set to 0 will get all data
      maxPages: 0

Role

config.yaml

packages:
  '@scope/*':
    access: $gitlab:user
    publish: $gitlab:user:xxx

$gitlab:user All users
$gitlab:user:xxx The user whose username is encodeURIComponent(xxx)
$gitlab:group:xxx:owner Owner of the group which path is encodeURIComponent(xxx)
$gitlab:group:xxx:member Member of the group which path is encodeURIComponent(xxx)
$gitlab:group:xxx:level:40 Maintainer(Master) or owner of the group which path is encodeURIComponent(xxx)
$gitlab:project:xxx:owner Owner of the project which path is encodeURIComponent(xxx)
$gitlab:project:xxx:member Member of the project which path is encodeURIComponent(xxx)
$gitlab:project:xxx:level:30 Developer or maintainer(master) or owner of the project which path is encodeURIComponent(xxx)

The following placeholder is allowed in xxx
[pkgScope] package scope
[pkgName] package name (without scope)

e.g.
Access or publish a package @scope/name:
$gitlab:group:[pkgScope]:owner Owner of the group which path is scope
$gitlab:project:[pkgName]:owner Owner of the project which path is name

Valid access levels

The access levels are defined in the Gitlab::Access module. Currently, these levels are recognized:

10 => Guest access
20 => Reporter access
30 => Developer access
40 => Maintainer access
50 => Owner access # Only valid for groups

Use

npm login --registry=http://xxx

Username: gitlab username
Password: gitlab personal/oauth/job token

License

This project is licensed under MIT.