A module for Nitro v3 that provides Cloudflare Queue support. It automatically configures queue routes by scanning a queues directory, generates TypeScript types for queue payloads, and handles routing from cloudflare:queue. Currently at version 0.0.7, it requires Nitro ^3.0.1-alpha.2 and has not been thoroughly tested. It differentiates by integrating directly with Nitro's module system and automating type generation with wrangler.
npm install nitro-queueNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows module setup, defining a queue handler, and sending a message from a route.
Test extensively before using in production; open issues for bugs.
Ensure Nitro version is ^3.0.1-alpha.2 or newer.
Run 'wrangler types cloudflare.d.ts' before 'npx nitro-queue types cloudflare.d.ts'.
Monitor Nitro and nitro-queue releases for updates.
Run 'pnpm add nitro-queue' (or npm/yarn) and ensure it's listed in package.json.
Use import { defineQueue } from 'nitro-queue' (named import).Use 'import queue from "nitro-queue"' and call queue() as a function: modules: [queue()]
Generate Cloudflare types with wrangler and run 'npx nitro-queue types' to update cloudflare.d.ts.