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

vite-hub

v0.0.3

Published

The cohesive ViteHub framework distribution for Vite applications and agents.

Readme

vite-hub

vite-hub is the cohesive ViteHub framework distribution. It gives applications one ViteHub dependency, one vitehub() Vite entry, and deliberate feature subpaths while every @vite-hub/* package keeps owning its implementation and remains independently installable.

Install

pnpm add vite-hub

Configure ViteHub

Choose one built-in deployment preset. Application routes and feature imports stay unchanged when the target changes.

// vite.config.ts
import { vitehub } from "vite-hub"
import { defineConfig } from "vite"

export default defineConfig({
  plugins: [vitehub({ preset: "node" })],
})

The public presets are cloudflare, netlify, vercel, deno, and node. Each resolves once to a host, runtime, Nitro output, packaging policy, and service adapters; do not also set nitro.preset, NITRO_PRESET, SERVER_PRESET, or VITEHUB_HOSTING.

ViteHub derives one deployment identity from the nearest package.json name, falling back to the Vite root directory name. Set name to pin the identity explicitly. VITEHUB_DEPLOYMENT_NAME remains a compatibility input, and conflicts with an explicit name fail configuration. Cloudflare Workers Builds supplies its connected Worker through WRANGLER_CI_OVERRIDE_NAME; the Cloudflare preset uses it after explicit ViteHub identity inputs and fails when those inputs resolve to another name because the connected Worker remains the deployment target. Cloudflare uses the resolved identity for the default Worker, Blob bucket, Queue prefix, Rate Limit namespace, Sandbox, and Container names. Explicit Wrangler Worker names remain authoritative outside Workers Builds, while explicit Blob bucket, driver, and store options still win. The Workers Builds fallback derives deterministic names but does not provision the corresponding R2 bucket or Queue.

Blob, Agent, Auth, Database, Email, KV, Queue, Rate Limit, Sandbox, Schedule, Workflow, and Workspace are opt-in:

vitehub({
  agent: true,
  blob: true,
  preset: "cloudflare",
  auth: true,
  database: true,
  email: true,
  kv: true,
  queue: true,
  rateLimit: true,
  sandbox: true,
  schedule: true,
  workflow: true,
  workspace: true,
})

| Preset | Blob | Queue | Rate Limit | Sandbox | Schedule | | --- | --- | --- | --- | --- | --- | | cloudflare | R2 | Cloudflare Queues | Cloudflare | Cloudflare Containers | Supported | | netlify | Netlify Blobs | Unsupported | Unsupported | Unsupported | Supported | | vercel | Vercel Blob | Vercel Queues | Unsupported | Vercel Sandbox | Supported | | deno | Unsupported | Unsupported | Unsupported | Unsupported | Unsupported | | node | Local filesystem (single host) | Unsupported | Process memory (single process) | Unsupported | Supported |

Selecting an unsupported opt-in capability fails the build with the preset policy. You can instead configure an explicit Blob driver through blob or compose an owner package directly when the application provides its own portable implementation.

The Deno preset uses Nitro's Deno entrypoint, so it rejects Schedule and agent.runtime: "deno"; those owner-package outputs require an explicit deployment integration.

The Deno preset emits .output/deno.json, stages emitted runtime packages and installed optional native dependencies under .output/node_modules, and writes .output/deploy.mjs, a non-interactive create-or-update runner used by the node ./deploy.mjs command in .output/nitro.json; set DENO_DEPLOY_ORG plus DENO_DEPLOY_APP or VITEHUB_DEPLOYMENT_NAME before deployment. The runner uploads node modules when it creates or updates an app. The Node preset emits a plain Node server artifact suitable for a VPS or container image; Docker is not a hosting preset.

Configure TypeScript

Extend vite-hub/tsconfig to load ViteHub's generated declarations without adding .vitehub to your application include. This config requires TypeScript 5.5 or newer.

{
  "extends": ["vite-hub/tsconfig"],
  "include": ["server/**/*.ts", "vite.config.ts"]
}

Run vitehub types prepare after installation so editors have .vitehub/types.d.ts before the first dev build:

{
  "scripts": {
    "postinstall": "vitehub types prepare"
  }
}

Vite config resolution and builds also refresh the entry. Defining files in the application config replaces the inherited entry, so include .vitehub/types.d.ts there when taking ownership of files.

Use feature APIs

import { defineAgent } from "vite-hub/agent"
import { workspaceShell } from "vite-hub/agent/capabilities"
import { env } from "vite-hub/env"
import { renderMarkdownTemplate } from "vite-hub/markdown-template"
import { defineWorkspace } from "vite-hub/workspace"
import { defineWorkflow } from "vite-hub/workflow"

The root export intentionally contains only the framework configuration API. Feature code belongs on a feature subpath, which forwards to the package that owns it.

Built-in Agent Drivers and Box runtimes are selected by literal or tagged values, so they do not need provider-specific ViteHub imports. Install an optional external provider or SDK explicitly when its runtime requires one.

Install an @vite-hub/* owner package directly when building a custom composition, another framework integration, or package-level tooling.