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

@lastshotlabs/slingshot-emoji

v0.0.2

Published

Custom emoji management for slingshot — CRUD with storage integration

Downloads

168

Readme


title: Human Guide description: Human-maintained guidance for @lastshotlabs/slingshot-emoji

@lastshotlabs/slingshot-emoji adds custom emoji as a manifest-backed domain. It stores emoji metadata as entities and expects file upload bytes to be handled by the platform upload system.

When To Use It

Use this package when your app needs:

  • org-scoped custom emoji that users can create and delete
  • entity-backed emoji metadata instead of one-off tables or route handlers
  • delete cascades from emoji records back into uploaded asset storage

Do not use it if you only need static built-in emoji. This package exists for managed custom emoji.

What You Need Before Wiring It In

The plugin always depends on slingshot-auth.

Permissions work in one of two modes:

  • pass permissions explicitly in plugin config, or
  • register slingshot-permissions before this plugin so it can read shared permission state

The plugin does not upload files itself. Clients must upload the image first and then create the emoji record using the resulting uploadKey.

Minimum Setup

The most common config is:

  • mountPath, which defaults to /emoji
  • optional explicit permissions

If you omit permissions, the plugin declares a dependency on slingshot-permissions and throws at startup if the shared state is missing.

What You Get

The package uses createEntityPlugin() under the hood, so it provides the standard entity-backed emoji CRUD surface and publishes the manifest-defined schema and operations.

It also adds package-specific behavior:

  • create-time shortcode validation
  • org-scoped uniqueness on [orgId, shortcode]
  • delete cascades that remove the underlying uploaded asset from storage

The API record shape includes fields such as name, shortcode, category, animated, uploadKey, and ownership metadata.

Common Customization

The main decisions are:

  • whether to supply explicit permissions or rely on shared permissions state
  • whether to keep the default /emoji mount path

If you need to modify behavior, start in:

  • src/plugin.ts for plugin composition, permissions resolution, and delete cascade logic
  • src/emoji.ts for the entity manifest
  • src/types.ts for config and API record contracts

Gotchas

  • Shortcodes must match ^[a-z0-9_]{2,32}$. Uppercase names, hyphens, and one-character codes are rejected.
  • The plugin does not own upload ingestion. Missing upload plumbing is an app integration problem, not an emoji-plugin feature gap.
  • presignExpirySeconds is a deprecated legacy field. If supplied, the plugin warns and ignores it.
  • Delete cascades require an upload storage adapter. Without one, the plugin logs a warning and the metadata row is deleted without removing the file bytes.
  • Passing explicit permissions changes dependencies: the plugin then depends only on slingshot-auth.

Key Files

  • src/index.ts
  • src/plugin.ts
  • src/emoji.ts
  • src/types.ts