New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

mycli

Package Overview
Dependencies
Maintainers
1
Versions
21
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mycli

commandline tools

latest
Source
npmnpm
Version
1.5.1
Version published
Maintainers
1
Created
Source

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:
TypeDescription
proxy1.3.0 new feature, integrate http-proxy-middleware
gethandle GET request in extion for special api or mock api
posthandle 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

Keywords

nodejs

FAQs

Package last updated on 20 Mar 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts