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

vct

v0.0.1

Published

VSOA Command line Tool

Downloads

1

Readme

VSOA Command line Tool

A command line toolbox of VSOA in JavaScript, which runs over JSRE of SylixOS, EdgerOS or Node.js for other platforms.

In addition to the client mode, this command line tool also works in server mode which support data mocking and proxy mode which is able to record all the data payloads passing through. The recorded payload could be loaded with -l option to start a replay server.

Get started

# start a mocking server
npx vct serv -j -b 'date/pub={time: new Date()}' localhost:3000 &

# start a proxy server (optionally)
npx vct proxy 

# connect the mocking server and listen (subscribe)
npx vct -l localhost:3000/date/pub

Note, installing the vct locally as devDependencies would make the command startup more quickly.

Command line options

vct [cli]   [options] HOST
vct s|serv  [options] HOST
vct x|proxy [options] HOST

GENERAL OPTIONS
  -h                Print this help message.
  -v                Print version info (including VSOA version).

CLIENT MODE OPTIONS

  -p PASSWORD       Client authentication password.
  [-g JSON] URL     Send GET reqeust with optional param JSON string.
  -s [JSON] URL     Send SET reqeust with optional param JSON string.
  -e                Use JSON payload as JavaScript to be evaluated.
  -w URL            Read from URL(or file) then write it to the server as stream
                    Url could be local filepath, VSOSA or HTTP GET endpoint.
  -r URL            Read stream from server then forward it to URL, which can
                      be local filepath, VSOA SET or HTTP POST endpoint that
                      accept streamed payload.
  -l PATH[..,PATH]  Listen (subscribe) comma separated topic paths.

SERVER MODE OPTIONS

  -p PASSWORD       Server password.
  -e                Execute the JSON payload as JavaScript.
  -c CERT           Certificate to be used to start a SSL server.
  -k KEY            Private KEY for the SSL cert.
  -l URL            Load saved records from stdin '-' or FILE loaded from URL.
  -r [PATH=]URL     Mock RPC responses, with JSON or binary loaded from URL.
  -g [PATH=]URL     Mock RPC GET response with JSON or binary loaded from URL.
  -s [PATH=]URL     Mock RPC SET response with JSON or binary loaded from URL.
  -d [PATH=]URL     Mock DATAGRAM response with JSON loaded from URL.
  -b [PATH=]URL     Mock pub/sub Broadcast with JSON loaded from URL.
  -e                Use loaded resource as JavaScript to be evaluated.

PROXY MODE OPTIONS

  -p PASSWORD       Server password.
  -c CERT           CERT to be used to start a SSL server.
  -k KEY            Private KEY for the SSL cert.
  -x [PATH=]URL     Proxy the VSOA server of given URL and optionally mount to
                      PATH. Multiple '-x' may be set but only one without
                      "PATH=" is acceptable.
  -r FILE           Record and save the requests to local JSON Record FILE.
  -n MAX            Maximum records to save, defaults 1000.

JSON Record File