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 🙏

© 2026 – Pkg Stats / Ryan Hefner

coros-connect

v0.1.5

Published

Interface to connect with Coros API

Readme

coros-connect

Nodejs library to interact with COROS Api.

⚠️ It does NOT support browser as it uses node libraries.

⚠️ This repository is using a non-public API from COROS Training Hub that could break anytime.

This project is inspired by:

Instalation

npm install coros-connect

Usage

You can setup a configuration file on your project root called coros.config.json containing your email and password.

{
    "email": "[email protected]",
    "password": "MySecretPassword"
}

Or you can provide on the constructor or login command.

const coros = new CorosApi({
    email: "[email protected]",
    password: "MySecretPassword"
});

await coros.login("[email protected]","MySecretPassword");

Configuration

You can change some default configuration for the service to adapt to the coros website changes on the environment variable.

// check properties that can be update from the function types
coros.config({
    stsConfig: STSConfigs.EU
})

Reuse token

You can store the access token to a file so you can reuse the same token when creating a new client. This is useful as you can get a 429 response from COROS Api.

if (isDirectory(tokenFolder)) {
    coros.loadTokenByFile(tokenFolder);
} else {
    await coros.login();
    coros.exportTokenToFile(tokenFolder);
}

⚠️ The token can expire at any time, and COROS Api does not provide any information about it, and it can no be extracted from the token. So it is up to you to handle Unauthorized errors from COROS Api to get a new valid token.

Functionality

This library only supports the following:

  • Login on Coros and get an access token.
  • Get list of activities.
  • Get activity detail (and other data used on the Coros page for the activity).
  • Download an activity file.
  • Store and reuse access token.
  • Get profile
  • Upload activity file (fit and tcx) from other providers. (see upload notes on coros webapp).
  • Delete activity
  • Change configuration to adapt to different environment

TODO

  • [ ] Handle token expiration or invalid token. NOTE when you login using this package, it will automatically logout from the webapp (mobile app is ok). And when you login into the webapp, it will invalidate your token. So at the moment you have to handle this logic.

Example

You can find one example on here

License

MIT License