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

@deeptimes/directus-schema-kit

v1.0.0

Published

Declarative schema provisioning toolkit for Directus

Readme

Directus Schema Kit (DSK)

Directus Schema Kit 是面向 Directus 本地开发项目的声明式 Schema Provisioning 工具。TypeScript DSL 负责人工编写,版本化 JSON Manifest 负责校验、规划和执行边界。

当前认证环境为 Node.js 22+、Directus 11.17.4 和 SQLite。其他 Directus 版本会被 CLI 明确拒绝。

当前实现

  • 固定、严格类型的 collection()field.*()env()ref() DSL。
  • dsk init:识别 Directus 项目,幂等创建统一的 dsk/ 工作区,支持 --dry-run
  • dsk build:确定性加载目录化 DSL,展开字段关系并生成带 SHA-256 源码摘要的 Manifest。
  • dsk build --check:检查 Manifest 是否最新,不写文件。
  • dsk validate:离线校验配置、Manifest 语义、源码新鲜度和 JSON seed。
  • dsk plan:只读获取本地 Directus 状态,分类 create、update、unchanged、conflict 和 dangerous。
  • dsk apply:全量预检后按依赖顺序执行安全 create/update,默认阻断 conflict/dangerous。
  • dsk seed:严格 JSON Seed,自然键 upsert、跨集合/同集合引用以及 plan/apply。
  • dsk resources apply:Directus 11 的 folders、roles、policies、access、permissions、presets 同步。
  • dsk clear:全量自定义 Schema 清理计划、交互确认、系统集合硬保护及非交互 --confirm
  • --cwd--config--format json 与稳定错误退出码。

开发

pnpm install
pnpm typecheck
pnpm test
pnpm build

项目内使用

安装后在 Directus 项目中执行:

pnpm dsk init
pnpm dsk build
pnpm dsk validate
pnpm dsk plan
pnpm dsk apply --dry-run
pnpm dsk apply
pnpm dsk seed --dry-run
pnpm dsk seed --plan
pnpm dsk seed
pnpm dsk resources apply --dry-run
pnpm dsk clear
pnpm dsk clear --dry-run
pnpm dsk clear --confirm

build 会执行可信的项目 TypeScript 源码;后续 plan/apply 执行层只允许消费 dsk/generated/manifest.json

详细文档从 文档首页 开始,也可直接查看 快速开始CLI 参考Schema DSLManifest V1兼容性