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 🙏

© 2025 – Pkg Stats / Ryan Hefner

tournament-assistant-client

v0.9.8

Published

A typescript based client for Tournament Assistant a Beat Saber tournament mod

Readme

Tournament Assistant Client

NPM Version

A typescript & websocket based client for Tournament Assistant a Beat Saber tournament mod

Install

npm i tournament-assistant-client

Usage

The following will setup a basic Coordinator client and connect you to the TA server.

Import

import { Client } from "tournament-assistant-client";

new Client("Danny", {
    url: "ws://localhost:2053"
});

Browser Script

<script src="https://www.unpkg.com/[email protected]/dist/tournament-assistant-client.min.js"></script>
<script>
    const taWS = new TournamentAssistantClient.Client("Danny", {
        url: "ws://localhost:2053"
    });
</script>

Base Options

| option | type | desc | required | | ---------- | ------------------ | ----------------------------------------------------------------- | -------- | | url | string | a websocket url that the TA server is hosted at | true | | password | string | Password to access the TA server if it has one | false | | userId | string | User Id of the connecting coordinator | false | | options | connection options | Specific connection options to manage the TA Client, listed below | false |

Connection Options

| option | type | desc | Default | | ------------------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------- | | autoReconnect | boolean | Determines if it the client will attempt to reconnect to the server whenever it loses connection. | true | | autoReconnectInterval | number | The number of ms to wait after losing connection before attempting to reconnect. | 10000 | | autoReconnectMaxRetries | number | Maximum number of failed connection attempts to the server before it gives up. Setting to -1 will disable the option | -1 | | handshakeTimeout | number | Websocket handshake timeout | 0 | | autoInit | boolean | Whether or not to automatically initiate the connection when the constructor is called | true | | sendToSocket | function | An alternate function that the client can use to send packets to the TA server. This can be used in conjunction with the previous option if you'd like to integrate your own websocket implementation as opposed to using the built in one | null |

Custom Transport

By providing a sendToSocket function and disabling autoInit you can overwrite the default websocket implementation in place for your own. sendToSocket will be used by any internal functions to send packets out through that websocket and incoming packets can be passed to handlePacket.

Events

import { Client } from "tournament-assistant-client";

const taClient = new Client("Danny", {
    url: "ws://localhost:2053"
});

taClient.on("EVENT_NAME", e => {
    // listen to events here
});

Supported Events

User Events
  • userAdded
  • userUpdated
  • userLeft
Match Events
  • matchCreated
  • matchUpdated
  • matchDeleted
Qualifier Events
  • qualifierEventCreated
  • qualifierEventUpdated
  • qualifierEventDeleted
Commands
  • loadSong
  • playSong
  • sendBotMessage
  • showModal
Push Events
  • pushLeaderboardScore
  • songFinished
  • realtimeScore
Requests
  • connectRequest
  • leaderboardScoreRequest
  • preloadImageForStreamSync
Responses
  • connectResponse
  • leaderboardScoreResponse
  • loadedSong
  • modalResponse
  • imagePreloaded
Other
  • acknowledgement
  • forwardingPacket
  • packet
Non-TA related Events
  • wsConnected
  • taConnected
  • close
  • error

Versions

| TA Version | Client Version | | ------------- | -------------- | | 0.7.4 | 0.9.5 ~ 0.9.6 | | 0.7.3 | 0.9.4 | | 0.7.2 | 0.9.2 | | 0.7.0 ~ 0.7.1 | 0.9.1 |

License

MIT