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

mycli

v1.5.1

Published

commandline tools

Downloads

45

Readme

Nodejs CLI TOOLS

Build Status Coverage Status NPM Version NPM Downloads

watch & copy command:

fs-extra, async to create a simple file and directory monitor & synchronize tool.

mycli watch-cp <source> <destination>

SimpleHTTPServer(like python one)

serve-static, express to provide static resouce http server, we create add extions feature. Please fellow below guide to provide extions js file.

mycli http-server <path> <port> [--https=true] [-e extionsService.js]

Extions definition:

| Type | Description | |----------|:-----------:| | proxy | 1.3.0 new feature, integrate http-proxy-middleware | | get | handle GET request in extion for special api or mock api | | post | handle POST request in extion for special api or mock api |


Extions e.g:
   // For proxy api extion:
	var ext = {
	    "/crservices":{
	        proxyURL:'http://staging.cross-v.me',
	        changeOrigin: true,
	        type:"proxy"
	    }
	};
	
	module.exports = ext;
   // For GET request extion:
	var ext = {
  		"/test/:name":{
    		fn:function(request, response){
      			response.send(request.params.name+' Hello World!');
    		},
    		type:"get"
  		}
	};

	module.exports = ext;

HTTP Proxy

js-yaml, nedb using yaml to provide proxy configuration and using nedb to record all response data.

mycli http-proxy <configuration file path>

We can through "http://127.0.0.1:[8888]/proxyDB" to manage proxy cache data.

please follow below structure to provide your yaml file:

	---
		server:
			port: 8888
			proxyType: "HTTP"             # if want to proxy HTTPS please change to HTTPS
			replay: false				   # if want to reuse local store response, change to true
		target:
			host: "query.yahooapis.com"
			port: 80
			#key: "./privateKey.pem"      # follow nodejs api doc to provide key for HTTPS
			#cert: "./certificate.pem"    # follow nodejs api doc to provide cert for HTTPS
			#passphrase: "password"       # a string of passphrase for the private key

Release description

1.4.1 - bug fix, (1)resolve http-proxy target server disconnect the proccess crash issue. (2)fixed recording error status response issue. (3) fixed PUT, DELETE issue.

1.4.0 - add proxy API whitelist feature

1.3.1 - minor bug fix

1.3.0 - add proxy extions in http-server

1.2.1 - add proxy datatbase manage page - http://127.0.0.1:[port]/proxyDB