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

@descope/flow-scripts

v1.0.19

Published

Browser scripts that run inside a Descope flow, on the end user's page. Each file in `src` is bundled to `dist/<name>.js` and published as `@descope/flow-scripts`, which the web component loads on demand.

Readme

Flow scripts

Browser scripts that run inside a Descope flow, on the end user's page. Each file in src is bundled to dist/<name>.js and published as @descope/flow-scripts, which the web component loads on demand.

A connector opts into one by naming it in its metadata.json, either as a top-level clientScripts entry (loaded on any screen that references the connector) or under a command's sdkScripts (loaded once at flow start when a flow uses that command). See connectors/README.md for the metadata shape.

Adding a script

Drop a <name>.ts in src - the rollup config discovers it automatically - and add a <name>.spec.ts beside it. The id in the connector metadata must match the file name.

The default export is a factory, called with the connector's initArgs, the flow context, an onTokenReady callback and a logger:

(initArgs, { baseUrl, ref }, onTokenReady, logger) => ScriptModule | void

onTokenReady must be called, otherwise the SDK waits on the script until it times out. Call it with the value the flow should receive, or null when the script produces nothing. A script that has no result to report should call it up front rather than after loading a third-party library, so a slow or blocked vendor CDN cannot delay the first screen.

See src/types.ts for ScriptModule and its optional start / stop / present / refresh hooks.

Logging

Everything a flow script logs reaches the end user's browser console. The SDK applies no level filtering, and browsers hide only console.debug by default. src/types.ts documents which level to pick; the short version:

  • debug for anything useful while troubleshooting
  • warn for a misconfiguration whoever set up the connector can fix
  • error only for a broken state the user would notice anyway
  • nothing at all for expected states that need no attention

Never log a token, key, or other credential. Log its length instead when the size matters.

That last one is enforced, not trusted: no-restricted-syntax in the repo's eslint config fails lint when a credential-looking value is passed to logger here or to console in a connector. It matches on the name, so configuration.writeKey and response.token are rejected while token.length, publicWriteKey and siteKey pass. Add the value you actually need rather than disabling the rule.

Working on one

npm test          # jest
npm run lint      # eslint
npm run build     # rollup, emits dist/<name>.js

A released version has to be picked up by the web component, which pins the @descope/flow-scripts version it loads, so a new script only resolves once that pin moves.