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

@flightdev/adapter-vercel

v0.0.7

Published

Vercel adapter for Flight Framework - deploy to Vercel Edge/Serverless

Readme

@flightdev/adapter-vercel

Vercel deployment adapter for Flight Framework. Supports both Serverless and Edge runtimes.

Table of Contents


Installation

npm install @flightdev/adapter-vercel

Quick Start

// flight.config.ts
import { defineConfig } from '@flightdev/core';
import vercel from '@flightdev/adapter-vercel';

export default defineConfig({
    adapter: vercel(),
});

Deploy:

npm run build
vercel --prod

Configuration

vercel({
    // Node.js runtime version
    runtime: 'nodejs20.x',
    
    // Deployment regions
    regions: ['iad1', 'sfo1', 'cdg1'],
    
    // Function memory (MB)
    memory: 1024,
    
    // Max execution time (seconds)
    maxDuration: 30,
    
    // Split routes into separate functions
    split: true,
    
    // Enable ISR
    isr: {
        expiration: 60,
        bypassToken: process.env.ISR_BYPASS_TOKEN,
    },
    
    // Images configuration
    images: {
        domains: ['example.com'],
        sizes: [640, 750, 828, 1080, 1200],
    },
});

Edge Runtime

Deploy API routes to the edge for low latency:

// Per-route configuration
// src/routes/api/fast.get.ts
export const config = {
    runtime: 'edge',
    regions: ['iad1', 'sfo1', 'cdg1', 'hnd1'],
};

export async function GET(request: Request) {
    return Response.json({ fast: true });
}

Or configure globally:

vercel({
    runtime: 'edge',
    regions: ['iad1', 'sfo1'],
});

ISR

Incremental Static Regeneration for dynamic content:

// flight.config.ts
vercel({
    isr: {
        expiration: 60,  // Revalidate every 60 seconds
    },
});

Per-route configuration:

// src/routes/products/[id].page.tsx
export const config = {
    isr: {
        expiration: 3600,  // 1 hour
    },
};

On-demand revalidation:

// src/routes/api/revalidate.post.ts
import { revalidatePath } from '@flightdev/adapter-vercel';

export async function POST(request: Request) {
    const { path, secret } = await request.json();
    
    if (secret !== process.env.REVALIDATE_SECRET) {
        return Response.json({ error: 'Invalid secret' }, { status: 401 });
    }
    
    await revalidatePath(path);
    return Response.json({ revalidated: true });
}

Build Output

The adapter generates Vercel Build Output API format:

.vercel/
└── output/
    ├── config.json              # Vercel configuration
    ├── functions/
    │   ├── index.func/          # SSR function
    │   └── api/
    │       └── [...path].func/  # API routes
    └── static/
        ├── assets/              # Hashed static files
        └── _next/               # Client bundles

Deployment

Vercel CLI

# Install Vercel CLI
npm install -g vercel

# Build
npm run build

# Deploy to preview
vercel

# Deploy to production
vercel --prod

Git Integration

Connect your repository in the Vercel dashboard for automatic deployments on push.

Environment Variables

Set in Vercel dashboard or via CLI:

vercel env add DATABASE_URL production
vercel env add API_KEY production preview development

Environment Variables

| Variable | Description | |----------|-------------| | VERCEL | Set to 1 when running on Vercel | | VERCEL_ENV | production, preview, or development | | VERCEL_URL | Deployment URL | | VERCEL_REGION | Current region code |


API Reference

Adapter Options

| Option | Type | Default | Description | |--------|------|---------|-------------| | runtime | string | 'nodejs20.x' | Runtime version | | regions | string[] | ['iad1'] | Deployment regions | | memory | number | 1024 | Function memory (MB) | | maxDuration | number | 30 | Max execution (seconds) | | split | boolean | true | Split into functions | | isr | object | - | ISR configuration |

Regions

| Code | Location | |------|----------| | iad1 | Washington, D.C. | | sfo1 | San Francisco | | cdg1 | Paris | | hnd1 | Tokyo | | syd1 | Sydney | | gru1 | Sao Paulo |


License

MIT