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

@swirepay-developer/sparo-embed-sdk

v1.0.9

Published

SPARO embedding SDK for guest-token based iframe integration

Readme

SPARO Embed SDK

@swirepay-developer/sparo-embed-sdk embeds SPARO in web apps (including gateway React) using guest-token auth and an iframe.

Bitbucket: https://bitbucket.org/zetametrics/sparo-swirepay-frontend.git


Who does what

| Role | Action | |------|--------| | You (SDK) | Push this repo to Bitbucket (sdkmaster or release branch). Bump version in package.json for each release. | | DevOps | Clone repo → npm cinpm publish. See DEVOPS-NPM-PUBLISH.md. | | Gateway developer | SDK: GATEWAY-REACT-GUIDE.md · Middleware: ../sparo-key-backend |

Until DevOps publishes, gateway will show:

Module not found: Can't resolve '@swirepay-developer/sparo-embed-sdk'

That is expected — the package is not on npm yet.


Gateway install (after DevOps publish)

npm install @swirepay-developer/sparo-embed-sdk
{
  "dependencies": {
    "@swirepay-developer/sparo-embed-sdk": "^1.0.8"
  }
}

Private package: use .npmrc.example with org NPM_TOKEN (DevOps provides access).


Quick Start (Java guest-token API)

Gateway Java API (URLs from host env, not SDK):

| Environment | Guest-token URL | |-------------|-----------------| | Staging | https://staging-backend.swirepay.com/v1/sparo/guest-token | | Production | https://backend.swirepay.com/v1/sparo/guest-token |

import {
  embed,
  createGuestTokenFetcher,
} from '@swirepay-developer/sparo-embed-sdk';

const handle = embed({
  id: 'sparo-chat',
  sparoDomain: process.env.REACT_APP_SPARO_DOMAIN,
  mountPoint: document.getElementById('sparo'),

  fetchGuestToken: createGuestTokenFetcher(
    process.env.REACT_APP_SPARO_GUEST_TOKEN_URL,
    { getAuthorization: getGatewayBearerToken },
  ),

  uiConfig: { theme: 'light' },
  onReady: () => console.log('[Sparo] ready'),
  onError: (err) => console.error('[Sparo]', err.code, err.message),
});

getGatewayBearerToken() returns the logged-in user's gateway JWT (same as other API calls).


Docs

| Document | Audience | |----------|----------| | DEVOPS-NPM-PUBLISH.md | DevOps — publish to npm | | GATEWAY-REACT-GUIDE.md | Gateway React — SparoChat integration | | SPARO-EMBEDDING.md | Backend + architecture | | INSTALL.md | npm install / troubleshooting | | MAVEN-PUBLISH.md | Java/WebJar only (not gateway) |


Development (SDK repo only)

npm install
npm run verify

Build outputs: dist/index.js, dist/index.mjs, dist/sparo-embed-sdk.global.js

dist/ is built during npm publish via prepublishOnly — do not commit dist/.