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

@hiclimba/spot

v0.0.11

Published

Browser SDK for Climba Spot tracking and Shopify embedded app bootstrap.

Readme

@hiclimba/spot

Browser SDK for Climba Spot tracking and Shopify embedded app bootstrap.

Script Usage

<script>
  window.climbaSpotConfig = {
    appToken: 'spotpk_xxx',
    bootstrapShopify: true,
    collectWebVitals: true,
    trackPageViews: true,
  };
</script>
<script async src="https://unpkg.com/@hiclimba/spot@latest/climba-spot.js?appToken=spotpk_xxx"></script>

The default API URL is https://api.hiclimba.com. Use apiUrl or endpoint only for local, staging, or private deployments.

customerId is optional in Shopify embedded apps. Spot resolves the shop from window.shopify.config.shop first and stores browser session state in sessionStorage under toasty_spot_session.

Browser API

window.climbaSpot.track('event_name');
window.climbaSpot.page();
window.climbaSpot.bootstrapShopify();
window.climbaSpot.refreshSubscription();
window.climbaSpot.flush();
window.climbaSpot.getSession();
window.climbaSpot.configure({ debug: true });
window.climbaSpot.destroy();

Spot events are untrusted and non-billable. Verified Shopify session bootstrap may create or update Customer, AppInstallation, CustomerContact, and safe Admin-observed snapshots. The SDK must not store Shopify tokens, client secrets, raw GraphQL payloads, or raw provider responses.

Spot is a browser only SDK.

Delivery and configuration

track() queues a JSON snapshot and attempts delivery; flush() attempts the memory queue. Requests contain at most 100 events with the same captured app, API destination, customer, and session-token context. Every event retains its caller-provided idempotency key, or a key generated once when queued. Retries reuse the same payload and key even if caller-owned properties or configuration change afterwards.

A successful HTTP batch is not an acknowledgment of every event. Spot removes only individually accepted items, discards conclusive invalid/conflicting requests with safe debug diagnostics, and retains other failures or uncertain responses for the next track() or flush(). Retained items are attempted at most once per flush and do not block later batches. There is no retry timer or persistent event store. Browser reloads lose pending events, and events captured with expired credentials may remain undeliverable.

Constructor sessionToken applies before automatic events. configure() changes future events without rewriting queued identity or sending provider requests. Explicit apiUrl takes precedence over endpoint when both are passed. Changing the app, API destination, or customer clears incompatible session authority unless a replacement token is supplied. configure({ sessionToken: '' }) clears the token. Changing or clearing the configured customer starts a fresh browser session ID; queued events retain their original session. Reapplying the same customer or changing only the token preserves the browser session. Tracking enablement and debounce updates do not create an extra page view. destroy() stops route listeners and pending route callbacks.

Subscription refresh coalesces concurrent calls for the same context. Only refreshed, joined, already_fresh, and not_applicable are stored as completed for that browser session and redirect hint. failed, in_progress, invalid responses, and network failures can be retried by a later explicit refresh or normal bootstrap/redirect trigger. No automatic polling is added. Late bootstrap or refresh responses from an older configured identity are ignored. Bootstrap that changes customer or token authority starts a separate refresh context instead of joining an older in-flight request. Late results from that older request are ignored. Concurrent bootstrap calls still coalesce, and a previously completed refresh stays deduplicated for the same session and hint.