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

@abstraktor/actorjs

v0.0.0-aj-beta.12

Published

Trigger, mock, and intercept anything - ActorJs is a tool for end-to-end testing that you run in a browser.

Downloads

64

Readme

ActorJs

ActorJs is a tool for end-to-end testing that you run in a browser.

Trigger, mock, and intercept anything.

ActorJs simulates all processes and services surrounding a System Under Test, allowing you to isolate a System Under Test in a very efficient way, no matter how many surrounding systems or protocols the System Under Test needs to use. You create Actors (very small simulators) that use stacks for communication.

Prerequisites

Nodejs – 20.x.x or later Git – 2.26.0 or later

Install ActorJs

npm install @abstraktor/actorjs

Update ActorJs

npm update

Build ActorJs Server

aj release

If you make changes to files, but ActorJs has not been started, or if you pull updates from your local repos, you must build the server again using aj release. Otherwise, just use aj to start ActorJs.

Linux & Mac: To use the command aj, an alias is needed for the actorjs.sh file in the installation folder. During installation, aliases are added to .bashrc (Linux and Mac) and .zshrc (Mac). If you use another shell, you have to add the alias yourself. The first time you install ActorJs, you need to restart the terminal or source the file containing the alias, for instance:

source ~/.bashrc

Start ActorJs Client

Open a browser with the url http://localhost:9005

Beta Testers

We are looking for beta testers! To apply, send an e-mail to: [email protected]

Documentation

Youtube

Further reading in the ActorJs tool

The ActorJs documentation can be found in the tool. To access it, click the following links when the tool is running.

Example code

HTTP - server

*run() {
  this.httpConnection.send(new HttpMsgGetRequest(this.requistUri));
    
  const response = this.httpConnection.receive();
  VERIFY_VALUE(HttpApi.StatusCode.OK, response.statusCode, ' HTTP response line status code:');
  VERIFY_CONTENT_OPTIONAL('content-name', response.getHeaderNumber(HttpApi.Header.CONTENT_LENGTH), response.getBody());
}

Websocket - client

*run() {
  this.httpConnection.send(new HttpGetUpgradeRequest(this.requistUri, this.wsProtocol));
 
  const response = this.httpConnection.receive();
  this.websocketConnection = this.switchProtocol('websocket', this.httpConnection);
    
  this.websocketConnection.send(new WebsocketStackApi.TextFrame(this.wsText, this.wsMask));
    
  this.websocketConnection.send(new WebsocketStackApi.CloseFrame());
}

Puppeteer - client

*run() {
  const page = this.puppeteerConnection.page;
  yield page.click('.w-button');
}

Socket - server

*run() {
  this.socketConnection.accept();
  const request = this.socketConnection.receiveLine();
  VERIFY_VALUE('Hello World!', request)
}