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

coderetreat

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

coderetreat

Automatically run your tests, and connect to the Code Retreat Game of Life server to be part of the bigger picture

latest
Source
npmnpm
Version
1.2.1
Version published
Maintainers
1
Created
Source

code-retreat-js

Javascript runner for code retreat

Getting set up

The first step is to run the script bin/addToPath.sh. This will add the JavaScript, Ruby and Python wrappers to your PATH for your current session.

What do I do

  • Run coderetreat NAMEOFMYFILE
  • Edit file in your editor, add some tests
  • Save!
  • Look at the terminal output for test results
  • Rinse and repeat

Development

Contributing

This project welcomes pull requests! We also love issues and generally knowing that this project is (or at least could be) useful! Reach out to us in comments, issues or on Twitter.

Local testing

You can use netcat to simulate the server and send messages:

netcat -lp 8787

Messaging

The coderetreat wrapper communicates with a central stats-collecting server using simple stream connections and JSON payloads.

Stats update

Whenever a test is run the stats are posted to the server in the following format:

{
  "action": "consumeTestsResults",
  "payload": {
    "testsRun": 10,
    "testsFailed": 5,
    "testsIgnored": 2
  }
}

This is the only unsolicited transmission from client.

Process an iteration

The server requests an iteration:

{
  "action": "processIteration",
  "payload": {
    "generation0": "000011101010101110111101101"
  }
}

The client responds with the next iteration:

{
  "respondingTo": "processIteration",
  "payload": {
    "generation0": "000100100111101011101011010101",
    "generation1": "000100100111101011101011010101",
  }
}

or an error:

{
  "respondingTo": "processIteration",
  "payload": {
    "error": "The function could not be executed."
  }
}

Provide information about the team (OPTIONAL)

To build a running commentary of who has worked on which session/table, the server requests the team information:

{
  "action": "getClientInfo",
}

In turn the client responds with information about the team members:

{
  "respondingTo": "getClientInfo",
  "payload": {
    "team": [
      {"name": "Ryan Brooks"},
      {"name": "Ben Foxall"}
    ],
    "session": 0,
    "language": "javascript",
  }
}

FAQs

Package last updated on 05 Jul 2014

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