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

systemview

v1.13.8

Published

A documentation and testing suite for SystemLynx

Downloads

537

Readme

Establishing a connection between SystemView and the Test Services

SystemView Plugin

const SystemView = require("systemView")({
  SystemViewConnection: "http://localhost:3000", //default
  SystemViewDocumentation: "./SystemView", //default
  projectCode: "ProjectName", //optional. Used to conveniently load multiple services as one project
  serviceId: "ServiceName", //required. If not included
});

App.use(SystemView);

Every time the app reload the plugin will load the SystemView Service using the SystemViewConnection value provided. It also adds a local module called SystemView to the test Service with the following methods and event:

  • SystemView.saveDoc
  • SystemView.getDoc
  • SystemView.emit("specs-updated")

Once the test Service is ready the plugin will send the system data to the SystemView Service via the following method call.

SystemView.connect({
  system,
  projectCode,
  serviceId,
});

The SystemView Service will Store the system data in memory. When the SystemView app makes a request for a connection (SystemView.getConnection), then the it will return the data from memory or from the service directly

Normally it's not a good idea to hold data in memory or maintain state with in a service but since this is a local project it won't be an issue.

Loading One or More Services

  1. User enters a projectCode or a serviceUrl in the search input
  2. The SystemView.api.getConnection(projectCode || servicerUrl) method will be called. This method will facilitate the process of retrieving the connectionData for the Service or Services being searched.
  • if a url is passed it will first check for a system in memory with that url and return that, or make a request for the connectionData and return that
  • if a projectCode is passed the service will check for a system in memory with the same projectCode and return that data to the app, or a 404 error

    It's ok to use memory as this is a local project

Saving Tests and Documentation

  1. SystemView plugin creates a SystemView module in the test Service
    • SystemView.saveDoc
    • SystemView.getDoc
  2. The plugin also adds the SystemView service and calls SystemView.connect when the app is read
  3. The users enters a project code in the search input

Quick Testing Random Services (Without the plugin)

  1. User enters a service url in the search input