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

@adventurelabs/scout-core

v2.2.1

Published

Core utilities and helpers for Adventure Labs Scout applications

Readme

Scout Core

Core utilities and helpers for Adventure Labs Scout applications.

Imports

Scout Core has separate browser and server entrypoints:

import { get_devices_by_herd } from "@adventurelabs/scout-core/client";

const response = await get_devices_by_herd(supabase, herdId);
import { get_devices_by_herd } from "@adventurelabs/scout-core/server";

const response = await get_devices_by_herd(herdId);

Client data helpers accept a Supabase client as their first argument. Matching server helpers create a cookie-backed Supabase client and use the same remaining arguments. Both paths therefore apply the current user's row-level security policies.

Use @adventurelabs/scout-core/types for type-only imports. Hooks, providers, Redux, IndexedDB cache helpers, and browser client factories are available only from /client. Middleware, cookie handling, API-key actions, and privileged key operations are available only from /server.

Use /server/middleware for updateSession and /server/supabase for newServerClient so middleware and RSC bundles do not load the full helper barrel.

ScoutRefreshProvider accepts an existing browser Supabase client and otherwise creates one stable client. Its automatic refresh uses a fresh IndexedDB cache without another request; manual and reconnect refreshes still query the API. Returning to a visible tab revalidates herd data and refreshes JWT mints that are near expiry, covering browsers that suspend background timers. Offline PWAs can pass a persisted offlineUserId to restore that user's herd modules and JWT mints before online authentication is revalidated. Cached mints remain available when expired; pass false as the fourth argument to can_herd_ability only for offline UI gates. The ID scopes cached data; it does not synthesize a Supabase User when no validated user is available. Use createScoutBrowserClient() when the application needs the same configured client outside the provider. Provider descendants should call useScoutRefreshActions() for handleRefresh and clearCache instead of creating another useScoutRefresh() instance. Create Redux state explicitly with configureScoutStore() and keep that instance stable in the application provider.

The package root is not an entrypoint. Replace imports from @adventurelabs/scout-core with /client, /server, or /types.

Server helper names no longer include the server_ prefix. Existing client-injected helper names are unchanged. Software-version reads expose get_versions_software_with_build_urls when signed build artifact URLs are needed. The diagnostic-only test_event_loading and test_api_key_loading exports were removed.