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

@brain-bbqs/ember-client

v0.2.0

Published

Browser client for the EMBER (DANDI) archive as the BBQS companion apps use it: PKCE sign-in, bearer-authenticated API calls, the Incoming dataset picker, the human-subjects gate, dandi-etag hashing, and persisted settings.

Readme

@brain-bbqs/ember-client

The browser-side EMBER (DANDI) archive client that clip-extractor and bbqs-uploader each carried a copy of under src/lib/. Backend-free by design: the browser runs the whole PKCE flow and talks to the archive's REST API and S3 directly.

npm install @brain-bbqs/ember-client

| Export | Was | | --------------------------------------------------------------------------- | --------------------------------------------------- | | EMBER_INSTANCE, ADMIN_CHECK_BASE_URL, DandiInstance | lib/instances.ts | | ArchiveConfig, OAuthTokenSet, FilePart, ServerPart, Asset, ... | lib/types.ts (UploaderConfig in bbqs-uploader) | | apiFetch, listedTitle, nextPagePath, diagnoseCors | lib/api.ts | | ApiError, friendlyError | lib/errors.ts | | createOAuthClient | lib/oauth.ts | | fetchArchiveUser | lib/users.ts (clip-extractor), ui/connection.ts | | listIncomingDandisets | lib/dandisets.ts | | HUMAN_SUBJECTS_PHRASE, containsHumanSubjects, fetchDraftMetadata | lib/humanSubjects.ts | | planParts, hashPart, combineDigests, computeDandiEtag, computeMd5 | lib/etag.ts | | resolveConfig, configProblems, createArchiveSettingsStore | lib/settings.ts |

What each app keeps

  • Its OAuth client id. Each app is a separate public OAuth2 application on the archive so the tools can be revoked and audited independently:

    export const oauth = createOAuthClient({
      clientId: "KoQNdyPaJULkfRJXa9YSm6PTC29TLzEz8yZH3vNv",
      storageKey: "bbqs-uploader.oauth-pkce.v1",
    });
  • Its storage keys. createArchiveSettingsStore("bbqs-uploader.settings.v1") keeps the key where the pre-paint script (@brain-bbqs/config/pre-paint) and the tests can read it.

  • Its wording. friendlyError(e, { 403: "Permission denied: your account cannot add assets to this dataset." }) overrides any of the 401/403/404 messages.

Behaviour merged from the two copies

  • apiFetch omits the Authorization header when there is no token (clip-extractor's fix), so an anonymous call reaches public endpoints as a real anonymous request.
  • listIncomingDandisets returns { datasets, unverified } (clip-extractor's shape), so a UI can say "couldn't verify" instead of "you have no datasets" when the admin-check service is down. bbqs-uploader destructures .datasets.
  • Every hash takes an optional AbortSignal (clip-extractor's interruption), read at each 16MB chunk boundary. bbqs-uploader's worker pool keeps calling hashPart per part and combineDigests at the end.
  • sanitize helpers moved to @brain-bbqs/utils; nothing here touches the DOM.