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

@wbce/projen-d9-extension

v0.0.15

Published

Projen constructs for authoring [d9](https://github.com/LaWebcapsule/d9) (Directus 9) extensions. It provides:

Readme

@wbce/projen-d9-extension

Projen constructs for authoring d9 (Directus 9) extensions. It provides:

  • ExtensionFolder — a pnpm workspace that holds extension packages
  • D9ExtensionProject — a TypeScript project for a single extension or a bundle of related extensions
  • D9ExtensionType — enum of supported extension kinds

This package is typically consumed via @wbce/projen-d9, which wires up an ExtensionFolder automatically and exposes project.addExtension(...).

Usage

In a D9Project:

import { D9Project } from '@wbce/projen-d9';
import { D9ExtensionType } from '@wbce/projen-d9-extension';

const project = new D9Project({
  name: 'my-d9',
  defaultReleaseBranch: 'main',
});

// Single-type extension
project.addExtension('my-hook', [D9ExtensionType.HOOK]);

// Bundle: multiple types in one package
project.addExtension('my-bundle', [
  D9ExtensionType.INTERFACE,
  D9ExtensionType.DISPLAY,
]);

// Shared library (no extension type) — can be depended on by other extensions
project.addExtension('shared', []);

// Cross-extension dependency
const myHook = project.addExtension('feature', [D9ExtensionType.HOOK]);
myHook.addDeps('shared@workspace:');

project.synth();

Extension types

D9ExtensionType values:

| Type | Kind | | --- | --- | | INTERFACE | UI | | DISPLAY | UI | | LAYOUT | UI | | MODULE | UI | | PANEL | UI | | ENDPOINT | API | | HOOK | API | | OPERATION | API |

Passing [] produces a plain TypeScript library that emits lib/ with type declarations — useful for sharing code between extensions.

What gets generated

Per extension:

  • A TypeScript project under <extensions-folder>/<name>/
  • Sample src/index.ts from a template matching the chosen type(s)
  • directus:extension field in package.json (single type) or a bundle config (multiple types)
  • Build step that runs directus-extension build and copies dist/ into the parent project's extensions/ tree at the right subfolder (hooks/<name>, endpoints/<name>, …)
  • Vue is added as a devDep automatically when a UI type is included

The ExtensionFolder itself is a pnpm workspace; running pnpm install + pnpm run --recursive build inside it builds every extension. This is what the parent D9Project's build-extensions task does.

Direct usage

The constructs can be used outside D9Project if needed:

import { ExtensionFolder, D9ExtensionType } from '@wbce/projen-d9-extension';

const folder = new ExtensionFolder({ parent: someProject, name: 'plugins' });
folder.add('my-endpoint', [D9ExtensionType.ENDPOINT]);

License

GPL-3.0-or-later