ViteHub is still experimental. Expect bugs and breaking changes.

Provider output

Reference generated deployment and runtime artifacts owned by ViteHub package integrations.

Provider Output is generated deployment or runtime artifacts required by a provider. It belongs to the package that owns the primitive. Application code does not edit or import it.

Output families

OutputProviderOwnerPurpose
deployment.jsonAll built-in presetsvite-hubRecords the resolved deployment identity and source with the host, runtime, output, and service contract.
Worker bundleCloudflarePackage integration using Cloudflare outputRuns server or primitive runtime code in Workers.
wrangler.json entriesCloudflareBlob, Database, Queue, Rate Limit, Schedule, Workflow, Sandbox, Agent state as applicableDeclares bindings, crons, durable objects, queues, Rate Limiting bindings, and other worker config.
Vercel Build OutputVercelPackage integration using Vercel outputWrites functions, static files, routes, and function config under .vercel/output.
Netlify function outputNetlifyAgent and Schedule PackagesWrites generated functions and static config under .netlify/v1.
Deno Agent server outputDenoAgent PackageWrites .vitehub/agent/deno-server.ts for Deno.serve chat and webhook routes.
Deno cron outputDenoSchedule PackageWrites .vitehub/schedule/deno-cron.mjs for Deno.cron static schedule wake output.
Rate Limit manifestLocal and hostedRate Limit PackageWrites .vitehub/rate-limit/manifest.json with sorted Rate Limit IDs, resolved providers, and driver capabilities.
Generated Runtime RegistryLocal and hostedPackage that discovers DefinitionsMaps Discovery Identity to lazy-loaded Definitions.
Generated Nitro handler or pluginNitro-shaped hostsPackage that requires a host bridgeRegisters package-owned routes or runtime hooks.
Provision StateLocal development and build inputViteHub CLI plus package Provision StepsStores non-secret provider ids under .vitehub/provision.json.

Generation timing

Provider Output is normally written during production-shaped builds. Vite dev proves discovery and local generated files; Netlify local development also materialises package functions for Netlify CLI.

Terminal
pnpm build
find .vitehub -maxdepth 4 -type f | sort
find .vercel/output -maxdepth 4 -type f | sort
find dist -maxdepth 4 -type f | sort

Rate Limit output

Rate Limit writes .vitehub/rate-limit/manifest.json during Vite config resolution and refreshes it during Provider Output. Its schemaVersion: 2 document contains sorted rateLimits entries shaped as { name, provider, capabilities }. Inspect it before deploy; do not import it from application code.

When Cloudflare is selected, each handler-local requireRateLimit() policy adds one ratelimits entry to generated wrangler.json. The entry contains a ViteHub-derived binding name, a stable namespace id, and the guard's static limit and 10-second or 60-second period.

The Rate Limit integration owns only binding names derived from declared stable IDs. It preserves unrelated app and package entries, and removes stale entries when a handle is renamed, deleted, or built with a non-Cloudflare provider while the integration remains active.

Application code calls requireRateLimit() with the H3 event. Do not persist the generated provider binding name as source authority.

Provider Output Contracts

Provider Output Contracts assert generated artifact shape without deploying to a cloud account. Use them for bindings, emitted functions, generated worker config, bundle purity, cron entries, and selected provider dependency reachability.

Terminal
pnpm --filter @vite-hub/database test
pnpm --filter @vite-hub/workflow test

Public boundary

Application code imports Runtime Helpers and documented handlers. Generated Provider Output may import generated files, virtual modules, or provider runtime packages internally.

Netlify Agent output is Provider Output, not an app import: there is no stable @vite-hub/agent/netlify import. Inspect .netlify/v1/functions/vitehub-agent.mjs and .vitehub/agent/netlify-function.mjs during deployment debugging instead of importing them from application code. Nuxt keeps generated Agent source artifacts under <buildDir>/vitehub/agent (normally .nuxt/vitehub/agent), so inspect the Netlify wrapper or Deno entrypoint there. Provider-owned .netlify/v1 output and project-owned non-Agent .vitehub output do not move.

DoAvoid
Call runQueue('welcome-email', payload).Import a generated queue consumer from .vitehub.
Import useServerEnv() from #vitehub/env/server.Import .vitehub/env/server.mjs directly.
Inspect .vercel/output during deployment debugging.Treat .vercel/output files as source files to edit.