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

@livespark/action-sdk

v0.1.0

Published

SDK client-side pour actions LiveSpark (iframe postMessage)

Readme

@livespark/action-sdk

SDK léger pour plugins/action LiveSpark exécutés dans une iframe.

But

  • Aucun appel HTTP requis.
  • Le runtime parent envoie déjà tous les événements live + configs via postMessage.
  • Cette lib simplifie l'écoute des messages, le contexte et les helpers.

Installation (plus tard, npm)

npm i @livespark/action-sdk

Utilisation

import {
  createActionSdk,
  shouldRunOnlyNewFollowers,
} from "@livespark/action-sdk";

const sdk = createActionSdk({
  // true par défaut: loggue uniquement quand triggerConfig change
  logTriggerConfigChanges: true,
  onInit(context) {
    console.log("INIT", context.initConfig);
  },
  onEvent(event, context) {
    // Filtrage dans le plugin (pas dans le runtime)
    if (
      !shouldRunOnlyNewFollowers(
        event,
        context.triggerConfig,
        event.eventType,
      )
    ) {
      return;
    }

    // logique action
    console.log(
      "EVENT",
      event.eventType,
      event.data,
    );
  },
});

// facultatif
// sdk.emit({ status: "done" });
// sdk.destroy();

Si tu veux couper les logs:

createActionSdk({
  logTriggerConfigChanges: false,
  onEvent(event, context) {
    // ...
  },
});

Messages entrants attendus

PLUGIN_INIT

{
  type: "PLUGIN_INIT",
  config: Record<string, unknown>,
  instanceId: string,
  timestamp: number
}

TRIGGER_EVENT

{
  type: "TRIGGER_EVENT",
  timestamp: number,
  event: {
    eventType: string,
    data: unknown,
    timestamp: string
  },
  trigger?: unknown,
  triggerConfig: Record<string, unknown>,
  automation?: unknown,
  action?: unknown
}

Développement local du package

cd plugins/action-sdk
npm install
npm run build

Exemple minimal local

Un exemple prêt à tester est disponible dans plugins/action-sdk/examples/minimal-action.

1) Build du SDK

cd plugins/action-sdk
npm run build

Le build copie automatiquement le bundle SDK dans examples/minimal-action/dist.

2) Servir l'exemple

Depuis le dossier plugins/action-sdk/examples/minimal-action, lance un serveur statique (au choix):

npx serve . -l 5174

ou

npx http-server . -p 5174

3) Dans le backoffice plugin dev

Renseigne l'URL de dev avec:

http://localhost:5174

Le runtime chargera automatiquement index.html.

Publication npm plus tard

npm version patch
npm publish --access public