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

@cordis-tavern/ct-client-found

v0.1.0-rc.1

Published

cordis-tavern 的前端插件发现与加载内核

Readme

@cordis-tavern/ct-client-found

cordis-tavern 的前端插件发现与加载内核:装配插件表 → 发现各包的 ct.client 声明 → 拓扑排序 → 构建 __CT_BOOT__ 启动图 → 经 index-inject 事件线发布(CT_SEED / 模块表 / boot-runtime)→ 向 host 注册页面与模块路由。

行为

| 步骤 | 说明 | | --- | --- | | 装配 | 表来源按序:注入 table → 宿主 assembleTable → 本地读 profile/<env>/package.json 的 ct.profile 兜底;ctHome 来源:注入 → process.env.CT_HOME → cwd/.env(判据镜像 CLI) | | 发现 | 扫描已装配包的 ct.client(platform: 'web' / immediately / inject),模块入口为 exports["./client"] | | 启动图 | topo 按 inject 依赖排序 → __CT_BOOT__ / __CT_MODULES__ / __CT_SEED__(CT_SEED 为依赖真库工厂,非占位) | | 事件线 | index-inject 统一交由 ct-index-renderer 插入 index(本包不 provide distIndex) | | 路由 | exact 主页(SPA 壳,注入后的完整 HTML)+ prefix 模块 bundle(注册路径去尾斜杠以适配 host 的段边界匹配) |

无 indexRenderer 注入时(单测 / 未装载场景)本地组装 homepage HTML 并 warn,不静默丢注入。

配置

| 键 | 默认 | 说明 | | --- | --- | --- | | homepage | '/' | 主页路由(exact) | | bundlePrefix | '/bundles/' | 前端模块 bundle 前缀 |

未知键与非法值一律 TypeError 并指名键名。

装载

ct plugin add -g @cordis-tavern/ct-client-found        # 系统级($CT_HOME)
ct plugin add -p <环境名> @cordis-tavern/ct-client-found # 环境级(profile/<环境名>)
  • 安装前有契约预检($CT_HOME/tmp 内 npm pack 验包),不合格黄警中止、不落安装。
  • 两级目录皆可装载:解析锚在环境目录、按 Node 向上检索(环境级优先、系统级兜底)。
  • inject: ['webServer', 'indexRenderer'] —— 分别由 @cordis-tavern/ct-host-web 与 @cordis-tavern/ct-index-renderer 提供。
  • peer @cordis-tavern/cordis-tavern:*(宽松跟最新;宿主导出缺席时由本地 ct.profile 兜底接管)。

开发

pnpm build    # 根仓库:esbuild → ct-client-found/dist/
pnpm typecheck
pnpm test     # 对 dist/ 产物

状态

0.0.4-alpha.3(2026-09-27):apply 双兜底(.env / ct.profile)、bundle 路由段边界适配已修,实机冒烟通过。