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

@virke/sveltekit-adapter

v1.1.0

Published

SvelteKit adapter for Virke/Fastly Compute.

Readme

@virke/sveltekit-adapter

SvelteKit adapter for Virke/Fastly Compute.

Features

  • Static assets → Object Storage (served free via VCL)
  • SSR routes → Fastly Compute service (StarlingMonkey Wasm)
  • Virke bindings available in hooks and endpoints: env.db, env.kv, env.os3

Installation

bun add -D @virke/sveltekit-adapter

Configuration

In svelte.config.js:

import adapter from '@virke/sveltekit-adapter'

export default {
  kit: {
    adapter: adapter({
      staticDir: 'build/static',  // Static assets output
      serverDir: 'build/server',  // SSR server bundle output
      prerender: true             // Include prerendered pages in static
    })
  }
}

Using Virke Bindings

Initialize in hooks

src/hooks.server.ts:

import { initVirke } from '@virke/sveltekit-adapter'

export const virke = initVirke({
  db: 'my-database',    // Virke DB name
  kv: 'my_kv_store',    // KV Store resource link name
  os3: 'my-bucket'      // Object Storage bucket
})

export async function handle({ event, resolve }) {
  // Attach Virke bindings to event.locals
  event.locals.virke = virke
  return resolve(event)
}

Use in routes

src/routes/+page.server.ts:

export const load = async ({ locals }) => {
  const users = await locals.virke.db.query("SELECT * FROM users")
  const settings = await locals.virke.kv.getJson("app:settings")

  return { users, settings }
}

src/routes/api/upload/+server.ts:

export const POST = async ({ request, locals }) => {
  const data = await request.formData()
  const file = data.get('file')

  if (file instanceof File) {
    const buffer = await file.arrayBuffer()
    await locals.virke.os3.put(`uploads/${file.name}`, buffer, file.type)
    return new Response('OK', { status: 200 })
  }

  return new Response('Bad Request', { status: 400 })
}

Deployment

1. Build the app

bun run build

2. Deploy static assets to Object Storage

virke deploy static build/static

3. Deploy SSR server to Fastly Compute

cd build/server
fastly compute build
fastly compute deploy

TypeScript Support

Add to src/app.d.ts:

import type { VirkeDB, VirkeKV, VirkeOS3 } from '@virke/runtime'

declare global {
  namespace App {
    interface Locals {
      virke: {
        db: VirkeDB
        kv: VirkeKV
        os3: VirkeOS3
      }
    }
  }
}

export {}

Architecture

  • Static files (CSS, JS, images, prerendered HTML) are uploaded to Fastly Object Storage and served via free VCL service
  • SSR routes run on a dedicated Fastly Compute service using StarlingMonkey (JS runtime compiled to Wasm)
  • Virke bindings provide access to Virke DB (SQL), Virke KV (key-value), and Virke OS3 (object storage)

License

MIT