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

@openpolicy/vite

v0.0.34

Published

Vite plugin that scans source files for @openpolicy/sdk collecting()/thirdParty() calls and populates the auto-collected registry at build time

Readme

@openpolicy/vite

Vite plugin that scans source files for OpenPolicy collecting() and thirdParty() calls and populates the SDK's auto-collected registry at build time.

At buildStart the plugin walks your srcDir, extracts every collecting() / thirdParty() call from @openpolicy/sdk, and exposes the merged result as dataCollected / thirdParties on @openpolicy/sdk. Your policy config spreads those values into the runtime-rendered policy — no files are written to disk.

Install

bun add -D @openpolicy/vite
bun add @openpolicy/sdk
# or: npm install --save-dev @openpolicy/vite && npm install @openpolicy/sdk

Setup

// vite.config.ts
import { defineConfig } from "vite";
import { openPolicy } from "@openpolicy/vite";

export default defineConfig({
	plugins: [openPolicy()],
});

Astro users: add it the same way under vite.plugins in astro.config.mjs.

Options

| Option | Type | Default | Description | | ----------------------------- | ---------- | ----------------- | ----------------------------------------------------------------------------------------------------------------------------------------------- | | srcDir | string | "src" | Directory walked for collecting() / thirdParty() calls, relative to the Vite root. | | extensions | string[] | [".ts", ".tsx"] | File extensions to scan. | | ignore | string[] | [] | Extra directory basenames to skip (appended to the built-in list: node_modules, dist, .git, .next, .output, .svelte-kit, .cache). | | thirdParties.usePackageJson | boolean | false | Auto-detect third-party services from package.json dependencies against the built-in registry (Stripe, Sentry, PostHog, etc.). |

Documentation

openpolicy.sh/docs

Links