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

publish-avrae

v1.0.3

Published

Publish Avrae is nodejs package for publishing your avrae project automatically.

Downloads

205

Readme

Publish Avrae

Publish Avrae is nodejs package for publishing your avrae project automatically.

Installation

npm install --save publish-avrae

Usage

Add a file at the root of your project called deploy.js

const { deploy } = require("publish-avrae");
const sourceMap = require("./sourcemap.json");

console.log("Starting Deployment");
deploy(sourceMap)
  .then(() => console.log("Deployment Sucessful"))
  .catch((e) => {
    console.error(e);
    console.log("Deployment Failed");
    process.exit(1);
  });

Then add to your package.json scripts a script called deploy which you can then call to deploy your project:

{
  // ...
  "scripts": {
    // ...
    "deploy": "node deploy.js",
    // ...
  },
  // ...
}

You can call this script by running npm run deploy.

Avrae Token

Firstly, you'll need to set the environment variable AVRAE_TOKEN

You can get an AVRAE_TOKEN by:

Go to Avrae and log in to the dashboard Open the Developer Tools Go to the Application tab On the left, select https://avrae.io under Local Storage Copy the Value next to the avrae-token key

Sourcemap

You'll first need to write a sourcemap for your project. This is a json file which will be used to map the files within your project to the aliases, snippets and gvars you wish to publish.

If you only want to publish gvars then the workshop property is optional, otherwise you must specify a workshop to publish the changes to.

{
  "workshop": {
    "id": "aaaaaaaaaaaaaaaaaaaaaaaa"
  },
  "aliases": [
    {
      "name": "my_alias",
      "file": "my_alias.alias"
    },
    {
      "name": "my_other_alias",
      "file": "my_other_alias.alias",
      "sub_aliases": [
        {
          "name": "do_thing",
          "file": "my_other_alias/do_thing.alias"
        }
      ]
    }
  ],
  "snippets": [
    {
      "name": "my_snippet",
      "file": "my_snippet.snippet"
    }
  ],
  "gvars": [
    {
      "name": "my_gvar",
      "file": "src/gvars/my_gvar.gvar",
      "id": "AAAAAAAA-AAAA-AAAA-AAAA-AAAAAAAAAAAA"
    }
  ]
}

Workshop ID

This should be the id from the url when you visit the workshop on the avrae dashboard.

Eg. https://avrae.io/dashboard/workshop/5f6a4623f4c89c324d6a5cd3 has the workshop id 5f6a4623f4c89c324d6a5cd3

Workshop Environment

You may optionally want to publish your changes to multiple workshops, for example if you have a testing environment and a production environment.

In this case you will want to configure the workshop.environment option in your sourcemap, which can be used to replace a gvar within your project called env.

workshop.environment should be a gvar id for a file which lists the gvar ids to use in that environment.

A typical env gvar might look something like.

ENV = "Development"

gvars = {
    "my_gvar": "AAAAAAAA-AAAA-AAAA-AAAA-AAAAAAAAAAAA"
}

def get_gvar_id_by_name(name):
    if name in gvars:
        return gvars[name]

    {}[f"Didn't find GVAR for name {name}!"]

And then you would use that gvar within your project like so:

using(env="AAAAAAAA-AAAA-AAAA-AAAA-AAAAAAAAAAAA")
using(
    my_gvar = env.get_gvar_id_by_name("my_gvar")
)

my_gvar.do_a_thing()

Github Actions Integration

You can use the following github workflow by adding it to your project

name: Deploy

on:
  push:
    branches: ["main"]

jobs:
  build:
    runs-on: ubuntu-latest

    strategy:
      matrix:
        node-version: [22.x]

    steps:
      - uses: actions/checkout@v4
      - name: Use Node.js ${{ matrix.node-version }}
        uses: actions/setup-node@v4
        with:
          node-version: ${{ matrix.node-version }}
          cache: "npm"
      - run: npm ci
      - name: Deploy
        run: npm run deploy
        env:
          AVRAE_TOKEN: ${{ secrets.AVRAE_TOKEN }}