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

@onderwijsin/nuxt-module-utils

v0.5.1

Published

Shared runtime and Nuxt module utilities for Onderwijs in modules.

Readme

@onderwijsin/nuxt-module-utils

Shared utilities for building the Onderwijs in Nuxt modules.

This package exists to keep recurring module concerns in one place: module setup and lifecycle logging, option validation, typed object helpers (toEntries, fromEntries, and keys), conditional dependency registration, retryable operations, server-side administrator authentication and request token checks, and primitive runtime guards. Keeping these contracts shared prevents each module from implementing subtly different behavior.

Why is this a published package?

Nuxt Module Builder copies runtime files into a module's output without bundling their package imports. Modules therefore need to declare runtime utilities as normal dependencies. Publishing this package allows a module's generated runtime code to resolve its imports in the consuming application's Vite or Nitro build, including Node.js and Cloudflare Workers targets.

Modules in this repository depend on it through the workspace during development. When published, pnpm converts the workspace range into a regular npm semver dependency, so application developers receive it transitively when they install a module.

Subpaths

Use the narrowest subpath for the code you are writing:

  • @onderwijsin/nuxt-module-utils/shared contains framework-neutral runtime helpers, including the typed Directus REST client factory.
  • @onderwijsin/nuxt-module-utils/build contains Node-only module setup, option validation, and build-time file discovery helpers, including the shared Directus setup cache.
  • @onderwijsin/nuxt-module-utils/server contains H3-dependent request-token and administrator-authentication helpers.
  • @onderwijsin/nuxt-module-utils is a compatibility alias for the shared exports.

The separate server entrypoint keeps H3-specific code out of shared and app-only dependency graphs. The app and types exports are reserved for package-level compatibility and type-only contracts.

Use moduleDependenciesWhenEnabled from the build subpath to register dependencies according to the standard module option contract. It returns the dependency map for undefined, {}, or { enabled: true }, and {} for false or { enabled: false }. Module setup must still skip its runtime registrations when disabled.

This package is primarily a dependency for module authors and published module runtime code. It is not intended to be an application-level Nuxt module or a package that consumers install directly.

Directus modules can use useDirectusSetupCache and withDirectusSetupCache from the build subpath to share successful build-time setup results for one Nuxt instance. Handler identities are process-local strings and are only suitable for the current build. The cache is not runtime state, is not written to Nuxt configuration, coalesces concurrent operations, removes failed operations, and is cleared after Nuxt finishes module setup (with instance close as a fallback).

API reference

For the complete utility list, signatures, behavior, and examples, see the module utilities cookbook and primitive guards guide.