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

ridge-npm-service

v1.0.0

Published

Npm Package Management Service

Readme

asset service

本地资源服务

install & test


npm install
npm run module

参数

| 参数 | 右对齐 | 居中对齐 | | :-----| :---- | :---- | | npmServer | 源NPM服务器地址 | https://registry.npmjs.org | | assetsPackageStorage | 本地存放下载的资源包文件夹 | ./ |

示例


module.exports = {
    npmServer: 'http://10.10.247.1:4873',
    port: 8082, // REST服务端口
    assetsPackageStorage: path.resolve(__dirname, '../asset_store/npm_packages'),
    assetsDbName: 'assetsdb',
    lowdb: {
        store: path.resolve(__dirname, '../asset_store')
    },
    log4js: {
        appenders: {
            out: { type: 'stdout' },
            app: {
                type: 'file',
                filename: 'application.log'
            },
            project: {
                type: 'file',
                filename: 'project.log'
            }
        },
        categories: {
            default: {
                appenders: ['out', 'app'],
                level: 'debug'
            },
            project: {
                appenders: ['project'],
                level: 'debug'
            }
        }
    },
    api: '/api' // 默认rest接口统一前缀
};

API

获取所有资源包

GET http://10.10.247.1:4877/api/assets/list

{
  "code": "0",
  "msg": "成功",
  "data":{
  "skip": 0,
  "limit": 100,
  "total": 1,
  "list":[
    {
      "name": "@gw/components-pack-sample",
      "version": "0.1.7",
      "description": "开发类图元包样例",
      "time": "2020-06-15T08:13:37.860Z",
      "id": "a7ed582a-ec91-4aa9-92e1-3e45475b1bb1"
    }
    ]
  }
}

获取资源包内图元

GET http://10.10.247.1:4877/api/assets/@gw/components-pack-sample/0.1.7/fcs

  • 参数: 包名 (@gw/components-pack-sample) 版本 (0.1.7)

返回

{
  "code": "0",
  "msg": "成功",
  "data":{
  "packageVersion": "0.1.7",
  "components":[
    "./build/Status.component.js"
    ]
  }
}

下载资源包图元

GET http://10.10.247.1:4877/api/assets/download/@gw/components-pack-sample-0.1.7/package/build/Status.component.js

参数:包名 (@gw/components-pack-sample)版本 (0.1.7) 组件名称 build/Status.component.js

返回js脚本

this["@gw/components-pack-sample/build/Status.stories.js"]=function(e){}

安装图元包

GET http://10.10.247.1:4877/api/assets/install?name=@gw/components-pack-sample&version=0.1.7

  • 参数: 包名 (@gw/components-pack-sample) 版本 (0.1.7)

获取图元包版本列表

GET http://10.10.247.1:4877/api/assets/@gw/components-pack-sample/versions

参数:包名 (@gw/components-pack-sample)

通过此方法可以获取特定的图元包版本


{
  "code": "0",
  "msg": "成功",
  "data":{
  "package":{"name": "@gw/components-pack-sample", "description": "开发类图元包样例", "author":{"name": "刘晗",…},
  "versions":[
    {
    "name": "@gw/components-pack-sample",
    "version": "0.1.7",
    "description": "开发类图元包样例",
    "time": "2020-06-15T08:13:37.860Z",
    "id": "a7ed582a-ec91-4aa9-92e1-3e45475b1bb1"
    },
    {
    "name": "@gw/components-pack-sample",
    "version": "0.1.8",
    "description": "开发类图元包样例",
    "time": "2020-06-16T01:26:49.442Z",
    "id": "cc3e8069-4c63-4621-8139-519212d5159d"
    }
    ]
  }
}

说明