WR
vite-plus-wrangler VITE+ WRANGLER INTEGRATION
VITE+ WRANGLER INTEGRATION • v0.1.0

Vite+ Wrangler

Cloudflare Wrangler plugin and CLI for the Vite+ toolchain — task wiring, account guards, D1 migrations, and config discovery.

ENGINEERING OVERVIEW

Seamless Cloudflare Wrangler orchestration for Vite+. Integrates native Rust account safety guards (preventing accidental production deployments), automated D1 schema migrations, and zero-config Wrangler discovery.

COMMAND LINE & WORKFLOW EXAMPLES

Build & Package with Wrangler Plugin
Compiles release Rust binaries, bundles TypeScript CLI, and links Wrangler task bindings.
pnpm build
Run Safe Account Guarded Deploy
Validates target Cloudflare Account ID against allowlists before deploying.
vite-plus-wrangler deploy --env production
Orchestrate D1 Database Migrations
Applies pending SQL schema migrations with pre-flight dry-run verification.
vite-plus-wrangler d1 migrations apply DB --remote

RULE & POLICY SPECIFICATIONS

Rule ID Category Severity Rule Description
CF-ACCOUNT-GUARD Safety Guard CRITICAL Prevents deploying to production Cloudflare accounts from unverified branch environments.
D1-MIGRATION-SYNC Database ERROR Ensures local SQL migration files match remote Cloudflare D1 applied schema versions.
WRANGLER-CONFIG-DISCOVERY Configuration INFO Auto-discovers wrangler.jsonc / wrangler.toml across monorepo packages.