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

ts2077

v1.0.2

Published

TypeScript framework for OPEN//77 plugins. Compiles gameplay to Lua 5.4 and can host a React WebUI and an optional Node companion.

Readme

TS77

Write OPEN//77 plugins in TypeScript. TS77 compiles the client and the server to Lua 5.4, writes the open77.lua manifest, and can build a React page and an optional Node companion.

The game runs the Lua. It does not run TypeScript. A web page cannot call natives. The server decides anything a player can gain.

The full guide is at imviloh.github.io/TS77.

Create a plugin

You need Node.js 20 or newer. A plugin with a Node companion needs Node.js 22 for that process.

npx ts2077 create my_plugin --template basic --no-install
cd my_plugin
npm install
npm run dev

The npm package is ts2077. It installs the ts77 and open77-ts commands. npm run dev watches src/ and rebuilds Lua when you save.

Open the folder in your editor. tsconfig.json is already there, so @open77/sdk/client and the native declarations resolve.

The folder name is the resource name: a lowercase letter, then letters, digits, or underscores, 3 to 64 characters. my_plugin is valid. my-plugin is not.

| Template | What you get | |---|---| | basic | A client and a server that print a greeting. No network permission. | | gameplay | One typed event from the client to the server and back. | | webui | Gameplay plus a React page in ui/. | | fullstack | Gameplay, a React page, and a Node companion. |

npx ts2077 create my_job --template gameplay
npx ts2077 create my_hud --template webui
npx ts2077 create my_notes --template fullstack

Commands

Inside the plugin, package.json already has these scripts:

npm run dev
npm run build
npm run deploy
npm run validate

The same actions from any directory:

npx ts2077 build my_plugin
npx ts2077 watch my_plugin
npx ts2077 validate my_plugin
npx ts2077 doctor my_plugin

build writes open77.lua, dist/client/main.lua, and dist/server/main.lua. Leave those files alone. Change the TypeScript and build again.

Gameplay

Client code is src/client. Server code is src/server. Code imported by both is src/shared.

import { onClientResourceStart } from "@open77/sdk/client";
import { greet } from "../shared/greeting";

onClientResourceStart(() => {
    print(greet(GetCurrentResourceName()));
});
import { authenticatedPlayer, emitClient, onNet } from "@open77/sdk/server";

onNet("demo:ping", (payload) => {
    const player = authenticatedPlayer();
    if (player === undefined) return;
    emitClient(player, "demo:pong", payload);
});

authenticatedPlayer() is the server-assigned player. A client cannot choose that id. Check the payload before you use it.

Natives come from the OPEN//77 catalogue shipped with this package, 2.50.0+op77.148. A client file cannot call TriggerClientEvent. A server file cannot call TriggerServerEvent. class, async, and Node.js imports are compile errors in gameplay.

Deploy

npx ts2077 deploy --server <server-directory>

<server-directory> is the folder that contains server.jsonc. TS77 copies the built resource into resources/<plugin> inside it. Restart that resource on the server afterward. TS77 does not reload the server.

React and Node

A webui plugin keeps its page in ui/. Run npm install there before the first page build. The page uses window.Open77 only: ready, on, emit, and invoke.

A fullstack plugin adds src/backend. Set OPEN77_BRIDGE_SECRET to the same value on Node and on the game server before the companion will accept a call. Databases and other npm packages belong in that process, not in Lua.

Details, the native index, and the companion protocol are in the guide.