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/tournament

v3.0.5

Published

[![npm](https://img.shields.io/npm/v/@first-lego-league/tournament.svg)](https://www.npmjs.com/package/@first-lego-league/tournament) [![codecov](https://codecov.io/gh/FirstLegoLeague/tournament/branch/master/graph/badge.svg)](https://codecov.io/gh/First

Downloads

10

Readme

npm codecov Build status GitHub

Tournament Module

This module is used as an API that handles all the tournament specific data. Data like teams, matches, table names and more.

The API

The API is REST based, And those are the available models.

  • team
    {
        number: number,
        name: string,
        affiliation: string, // optional
        cityState: string, // optional
        country: string, // optional
        coach1: string, // optional
        coach2: string, // optional
        judgingGroup: number // optional
        pitNumber: number, // optional
        pitLocation: number, // optional
        translationNeeded: boolean // optional
    }
  • match
    {
     matchId: number,
     startTime: date,
     endTime: date,
     stage: string,
     matchTeams: [
       {
         teamNumber: number,
         tableId: number
       }
     ]
    }
  • table
    {
     tableId: number,
     tableName: string
    }

And this are the available endpoints for those models:

  • GET /model/all - return all the objects
  • GET /model/:id - return the object with that id
  • POST /model - add a new object (as described later)
  • PUT /model/:id - edit the object with that id
  • DELETE /model/:id - delete the object with that id

There are 2 more APIs available, the Images API and the Tournament Settings API

The Images API

Used to retrieve images for the Display. Please be noted that the images are retrieved and sent with Base64 encoding.

The endpoint is /image and the available options are:

  • GET /all - returns an array of all the images.
  • GET /:imageName - returns the image with the specified name The response structure:
    {
       imageName: image-name,
      image: base64 encoding image 
    }
  • POST / - Used to add a new image. Body with that structure:
    {
      imageName: image-name,
      image: 
    }
  • DELETE /:imageName - Used to delete an image

The Tournament Settings API

There is no option to add a setting with this api. This API is for reading and updating the settings.

  • GET /settings/:settingName - Returns the setting with settingName
  • PUT /settings/:settingName - Updates the setting with settingName, The body of the request:
  {
     setting: settingContent
  }

Be aware that reading the data is available for all, but updating/deleting/inserting only for certain users.


Publishing to NPM

When you are ready to publish to npm

  • run the command yarn publish from the repo root directory.
  • You will be asked to update the version number.
  • Following that the script will run the build ng build --prod and publish the artifacts to @first-lego-league/tournament.

Notes:

  • You must be a member of the npm first-lego-league organization to publish the package.
  • Verify version in npm [@first-lego-league/tournament] after the publish has completed (https://www.npmjs.com/package/@first-lego-league/tournament)
  • Remember to push package.xml (containing the updated version).

Adding new version to the launcher

Please see the Launcher README for instructions on how to include your update in the launcher build.

Contributing

To contribute to this repository, please make a fork, make your changes and submit a pull request.

This way of work allows us to maintain proper code quality, which is important when working with a large amount of people on the same project.

The best way to work on a feature or a bug is to follow these steps:

  • fork the repository to your own github account
  • if already forked, make sure your fork is up to date with the base repo
  • create a new branch for your feature or bugfix
  • work
  • test
  • create a pull request to merge your development branch into a branch in the base repo
  • we will review your pull request, when ok, we will merge it into master