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

@postshiba/trigger

v0.1.0

Published

PostShiba adapter for Trigger.dev

Readme

PostShiba Trigger.dev

[!NOTE] PostShiba skills connect agents to MCP for first send, domains, inboxes, and sandbox mail.

PostShiba email delivery inside a Trigger.dev task.

Installation

npm install @postshiba/trigger @trigger.dev/sdk

Node 18 or later. Open pull requests on postshiba/sdks.

How It Works

sendEmail posts to POST /api/v1/teams/:teamId/clusters/:clusterId/sends. clusterId is required. Put catchPostShibaError on the task. A 429 with error throttled waits until the next hour. Permanent errors skip retrying.

import { task } from "@trigger.dev/sdk"
import { catchPostShibaError, defaultRetry, sendEmail } from "@postshiba/trigger"

export const sendWelcome = task({
  id: "send-welcome",
  retry: defaultRetry,
  catchError: async ({ error }) => catchPostShibaError(error),
  run: async (payload: { to: string; id: string }) => {
    return await sendEmail(
      {
        apiKey: process.env.POSTSHIBA_API_KEY!,
        teamId: "KjkAJW",
        clusterId: "NmQpXr",
      },
      {
        from: "[email protected]",
        to: [payload.to],
        subject: "Welcome",
        text: "Glad you are here.",
        idempotencyKey: payload.id,
      },
    )
  },
})

Pass a stable idempotencyKey so a retried task does not double-send.

Template send. Pass template and skip html and text. from and subject override the template when you set them.

await sendEmail(config, {
  from: "[email protected]",
  to: [payload.to],
  template: { id: "welcome", variables: { name: payload.name } },
  idempotencyKey: payload.id,
})

Webhooks

import { handleWebhook } from "@postshiba/trigger"

export async function POST(req: Request) {
  return handleWebhook(req, {
    secret: process.env.POSTSHIBA_WEBHOOK_SECRET!,
    trigger: async (event) => {
      await processEmailEvent.trigger(event)
    },
  })
}

HMAC-SHA256 of {timestamp}.{rawBody} against X-Capsule-Signature with a sha256= prefix. X-Capsule-Timestamp must be within 300 seconds.

Errors and throttling

Non-2xx responses throw PostShibaHttpError with status, code, and retryable. Permanent errors become AbortTaskRunError.

A 429 with error throttled is the cluster hourly send limit. catchPostShibaError waits until the next hour.

See Errors.

Contributing

npm install
npm test

Tests mock HTTP. They do not call production.