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

@first-lego-league/clock

v3.0.0

Published

Clock for

Downloads

78

Readme

npm codecov Build status GitHub

Clock

Web based application showing the FLL match timer. Works in the latest versions of chrome, firefox and internet explorer

Mhub events

The clock creates to the following mhub messages (on the protected node)

| Topic | Fired On | Data | | -------------- | ---------------------------------------------- | ------------------------------- | | clock:start | Fired when the countdown is starting to run | | | clock:stop | Fired when a countdown have stop in the middle | | | clock:end | Fired at the end of the countdown | | | clock:reload | Fired when the clock is reset the time | | | clock:time | Fired each second during the countdown | Seconds to end of the countdown |

Using the Clock API

In order to use the API, you first need to get an authenticity token. You can get this by sending an authentication request to the Identity Provider module (AKA IdP). It runs on the server computer, typically listening on port 2030.

Send a request: POST idp-endpoint/login?callbackUrl=url with the body { username: admin, password: your-admin-password }

You will receive a 304 Redirect with set-cookie header that contains the auth token. You can use that. Once you have the authenticity token, you send it as a header in each request you make.

The timer API has four actions:

  • POST timer-endpoint/action/start - will start the timer, only if it isn't running already. If the timer is running it will return 400 Bad Request.
  • POST timer-endpoint/action/stop - will stop the timer, only if it's running. If the timer isn't running it will return 400 Bad Request.
  • POST timer-endpoint/action/reload- will set the timer back to 2:30, only if it's done running. If the timer isn't done running it will return 400 Bad Request.

Publishing to NPM

When you want to publish to npm, run the command yarn publish. First you will be asked to enter a new version to publish. Following that the build script will run the packing stage (prepack).

Note: Publish from a version branch (e.g. v2.2.3) so that you can do a PR.

$ yarn publish
yarn publish v1.12.1
[1/4] Bumping version...
info Current version: 2.2.2
question New version: 2.2.3
info New version: 2.2.3
[2/4] Logging in...
[3/4] Publishing...
$ webpack --mode production --config webpack.prod.js
.....
success Published.
[4/4] Revoking token...
info Not revoking login token, specified via config file.
Done in 140.79s.

Adding new version to the launcher

To include your update in the launcher build, update the clock version in launcher/dev-scripts/config-get.js.

Warning: Warning:
Prior to version 1.9.0, Yarn has a bug with using the .npmignore file correctly. Therefore make sure your Yarn version is 1.9.0 or later. If not, either upgrade your yarn or use the command npm publish instead.