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

@danielklein/ci-sdk

v0.0.5

Published

Nx-native CI engine + CLI for Bun monorepos — codecheck / nx-sync / wrangler-types drift / typecheck / test, affected-aware. Bun-only.

Downloads

778

Readme

@danielklein/ci-sdk

Nx-native CI engine + CLI pro Bun monorepa — orchestruje standardní quality checks (release-age policy / codecheck / nx-sync / wrangler-types drift / typecheck / test) čistě přes nx + biome + wrangler. Affected-aware. Sourozenec @danielklein/deploy-sdk (CD).

Bun-only: engine používá $ z bun (každý nx/biome/wrangler call přes bunx).

Koncept

Konzument je Nx workspace na Bunu (per-worker project.json s targety typecheck / test / types) + biome.json + commitnuté worker-configuration.d.ts. ci-sdk dodá orchestraci + CLI; consumer dodá tenký GH workflow (workflow_call) a nrwl/nx-set-shas pro affected base/head.

Nahrazuje sdílený reusable CI workflow — checky jdou spustit i lokálně (bunx ci-sdk check).

Adopce na novém projektu — krok za krokem

0. Předpoklady (Nx workspace na Bunu)

  • root nx.json + per-worker/packages project.json s targety:
    • typecheck (tsc --noEmit -p <projekt>/tsconfig.json)
    • test (vitest; workery přes @cloudflare/vitest-pool-workers)
    • types (wrangler types ./worker-configuration.d.ts -c ./wrangler.dev.jsonc, cache: false)
    • volitelně build (naplní build matrix)
  • root biome.json; commitnuté worker-configuration.d.ts per worker (drift check je hlídá).
  • Vzor kompletního setupu: dbu-txs-preview-lab.

1. Instalace

bun add -d @danielklein/ci-sdk

2. Workflow — zkopíruj šablonu

cp node_modules/@danielklein/ci-sdk/templates/ci.yml .github/workflows/ci.yml

(templates/ci.ymlpull_request only; push do stable větví gate-uje deploy-stable z deploy-sdk šablon, ať CI neběží 2×.) Uprav branches + bun-version.

3. Gotchas

  • permissions: actions: read je POVINNÉ u callera — nrwl/nx-set-shas se ptá Actions API.
  • ci-sdk repo je private → cross-repo uses: chce access grant (jednorázově, vlastník): gh api -X PUT repos/danielklein-arch/ci-sdk/actions/permissions/access -f access_level=user
  • Projekt mimo Nx graf (root topology.ts apod.) ci-sdk nepokryje → vlastní „glue" job (tsc --noEmit -p tsconfig.json).

4. Branch protection

Vyžaduj checks ci / check (+ ci / build (...) dle potřeby) na PR větvích.

5. Reusable workflow inputs

affected (default false → run-many vše), bun-version, skip-codecheck|nx-sync|wrangler-types|typecheck|tests|release-age|build. Jobs: check (sekvence checků) → targetsbuild (matrix projektů s build targetem).

6. Supply-chain hardening (bunfig minimumReleaseAge)

check failne, když root bunfig.toml nemá [install] minimumReleaseAge172800 (2 dny) — Bun 1.3 cooldown proti compromised-and-yanked verzím. Gatuje resolution (bun add/update), NE bun install --frozen-lockfile → chrání při bumpu deps + lokálně, ne při frozen CI installu. Doporučená hodnota 259200 (3 dny):

cp node_modules/@danielklein/ci-sdk/templates/bunfig.toml bunfig.toml   # greenfield

Repo se stávajícím bunfigem: přidej minimumReleaseAge = 259200 do [install] (nepřepisuj cp-čkem linker/exact/@jsr). Escape hatch: --skip-release-age / input skip-release-age: true. Vyžaduje Bun ≥ 1.3 (jinak no-op + warning).

CLI

bunx ci-sdk check                 # release-age · codecheck · nx-sync · wrangler-types · typecheck · test
  --skip-codecheck --skip-nx-sync --skip-wrangler-types --skip-typecheck --skip-tests --skip-release-age
  --affected [--base <sha> --head <sha>]   # jen dotčené projekty (jinak run-many = vše)

bunx ci-sdk build-targets [--affected]     # JSON pole projektů s 'build' targetem (matrix)
bunx ci-sdk wrangler-types [--check]       # regeneruj typy; --check = drift check (exit 1)

--affected bez --base/--head čte NX_BASE/NX_HEAD (nastaví nrwl/nx-set-shas@v4).

wrangler-types drift check (--check): regeneruje worker-configuration.d.ts (nx run-many -t types) a ověří přes git diff (+ git add -N → chytí i nové untracked), že commitnuté verze jsou aktuální. Řeší to, co sdílená platform CI má zatím zakomentované.

Veřejné API

import {
  runCheck, checkWranglerTypes, generateTypes, buildTargets,
  type CheckOptions, type AffectedOptions,
} from '@danielklein/ci-sdk'

await runCheck({ affected: true, skipTests: true })   // CI sekvence honoring skips
await checkWranglerTypes()                            // drift check (throw on drift)
const targets = await buildTargets({ affected: true }) // string[] pro matrix

Stav

0.0.5 — extrahováno z dbu-txs-preview-lab (referenční consumer). Reusable workflow_call workflow (@v1) + consumer šablona v templates/. v0.0.5: release-age policy check (supply-chain hardening — vynucený bunfig minimumReleaseAge, viz adopce §6).

Build

bun install
bun run build      # bun build → dist/{index,cli}.js + tsc → dist/*.d.ts

Peer deps: nx >=20, wrangler >=4 (+ consumer má @biomejs/biome).