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

universal_edges

v3.1.0

Published

Universal Edges v2: link Clusterio instances with belts, fluids, power and trains

Downloads

481

Readme

Universal Edges v2

Links Clusterio instances along their edges for Factorio 2.1. Belts, fluids, power, trains, vehicles, players, circuit networks and logistic requests cross from one server to the next. Trains route and keep their schedules across servers, and radars share what they see. Its prototypes ship as the universal_edges mod.

Requirements

  • Clusterio 2.1.1 or later. Built from source, the plugin builds inside Clusterio's pnpm workspace. This version doesn't load on Clusterio 2.0, use tag v2.2.1 of this plugin there.
  • Node 22 or later, and pnpm at the version in Clusterio's packageManager.
  • zip (the mod build), and lua5.2 and luacheck (tests and lint).

Install

In a Clusterio checkout:

git clone https://github.com/clusterio/universal_edges.git external_plugins/universal_edges
pnpm install
pnpm build
pnpm run -r --if-present prepare

prepare compiles the plugin, bundles its web page and zips its mod to dist/universal_edges_<mod version>.zip. The mod's version is the package's, kept in step in mod/info.json and module/module.json. Add the plugin to the controller's plugin list with npx clusteriocontroller plugin add ./external_plugins/universal_edges and to each host's with npx clusteriohost plugin add ./external_plugins/universal_edges, from the checkout (a path needs the ./). Upload the mod with npx clusterioctl mod upload external_plugins/universal_edges/dist/universal_edges_<mod version>.zip, and add it to the instances' mod pack with npx clusterioctl mod-pack edit <pack> --add-mods universal_edges:<mod version>.

Metrics

The controller's /metrics endpoint carries these, labelled by instance_id:

| Metric | Labels | Meaning | |---|---|---| | clusterio_universal_edges_task_total | task, kind | The Lua runtime's counters: scheduler task runs, units, deferrals, drops and so on. | | clusterio_universal_edges_lane_batches_total | result | Lane batches by result: sent, delivered, held, stale, rejected and so on. | | clusterio_universal_edges_power_link_energy_kj | link, direction (sent, got) | Energy a power link has sent or got. A running total that restarts at 0 when the link is rebuilt, so it's a gauge: read it with deriv(). | | clusterio_universal_edges_power_link_send_kj | link | What the power hub gave the link to send this second. | | clusterio_universal_edges_power_flow_kw | class (solar_output, primary_output, secondary_output, tertiary_output, primary_demand, secondary_demand, tertiary_demand) | The instance's linked electric networks' mean flows, less UE's own interfaces, summed. | | clusterio_universal_edges_power_stock_kj, clusterio_universal_edges_power_capacity_kj | | The linked networks' stored energy (less what their links owe, so it can go below 0) and capacity, summed. |

The power series come from each instance's latest power report, so only instances with a linked electric network have them. They go when the report is over 5 s old or the instance stops.

Test and lint

Run these from inside the Clusterio checkout, where Oxlint is installed:

pnpm --filter universal_edges run test   # TypeScript and Lua unit tests; run prepare first
pnpm --filter universal_edges run lint   # Oxlint with Clusterio's rules, and luacheck

Game tests (headless Factorio, the *_game_test.lua files) and multi-instance end-to-end tests run from the clusterio-v2 integration repo, which isn't public. The design documents that code comments cite by section (§) live there too.

Release

npm version minor   # or major/patch: bumps package.json, mod/info.json and module/module.json, commits and tags v<version>
git push --follow-tags

A pushed v* tag runs CI's release job once the tests pass. It publishes the package to npm through trusted publishing (no token), and uploads universal_edges_<version>.zip to the mod portal with the FACTORIO_MOD_TOKEN secret, a factorio.com API key with the "ModPortal: Upload Mods" usage.

Licence

Blue Oak Model License 1.0.0, in LICENSE.md.