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 πŸ™

Β© 2025 – Pkg Stats / Ryan Hefner

@hedystia/swagger

v1.7.5

Published

<div align="center"> <p> <strong>πŸš€ Hedystia Framework</strong> </p>

Readme

🌟 Superpowers

  • 🌐 Multi-runtime support - Bun (default), Deno, Node.js, Vercel, Cloudflare Workers, Fastly Compute, Lambda, etc.
  • πŸ”’ End-to-end type safety - From params to response, full TypeScript integration
  • ⚑ Bun-native performance - Built for Bun runtime with native validation
  • 🧩 Client integration - Auto-generated type-safe HTTP client
  • πŸ›‘οΈ Validation built-in - Zod integration for runtime safety
  • πŸ”Œ Extensible architecture - Middleware, hooks and macros system
  • πŸ“ Standard Schema - Compatibility with the standard schema so you can use it with Zod, Arktype, etc.

πŸš€ Launch in 30 Seconds

  1. Install with Bun:
bun add hedystia
  1. Create your first API:
import { Hedystia, h } from "hedystia";

const app = new Hedystia()
  .get("/hello/:name", (ctx) => `Hello ${ctx.params.name}!`, {
    params: h.object({ name: h.string() }),
    response: h.string()
  })
  .listen(3000);
  1. Generate client and consume API:
import { createClient } from "@hedystia/client";

const client = createClient<typeof app>("http://localhost:3000");

// Fully typed request!
const { data } = await client.hello.name("World").get();
console.log(data); // "Hello World!"

πŸ’‘ Why Developers Love Hedystia

πŸ”„ Full-stack Type Safety

// Server-side validation
.post("/users", (ctx) => {...}, {
  body: h.object({
    email: h.email(),
    age: h.number()
  })
})

// Client-side types
await client.users.post({
  body: {
      email: "[email protected]", // Autocompletes!
      age: 25 // Type-checked
  }
});

πŸ“– Swagger Integration

import { swagger } from "@hedystia/swagger";

const swaggerPlugin = swagger({
  title: "My API",
  description: "An example API with Swagger",
  version: "1.0.0",
  tags: [
    { name: "users", description: "User operations" },
  ],
});

app.use("/swagger", swaggerPlugin.plugin(app));

app.listen(3000);

⚑ Performance First

  • Bun runtime optimized
  • Faster by default
  • Own type validation system
  • Faster than Express
  • Built-in response compression

🧩 Modern Feature Set

// File uploads
.post("/upload", async (ctx) => {
  const formData = await ctx.body; // FormData type
})

// Binary responses
.get("/pdf", () => new Blob([...]), {
  response: h.instanceof(Blob)
})

// Nested routing
.group("/api/v1", (v1) => v1
  .group("/users", (users) => users
    .get("/:id", ...)
  )
)

πŸ› οΈ Development Roadmap

Core Features

  • βœ… HTTP Methods: GET, POST, PUT, PATCH, DELETE
  • βœ… Response Types: JSON, Text, FormData, Blob, ArrayBuffer
  • βœ… Router Groups & Middleware
  • βœ… Type-safe Client Generation
  • βœ… WebSocket Support
  • βœ… Adapter System to work with other frameworks

Advanced Capabilities

  • βœ… Standard Schema Compatibility
  • βœ… Hooks System (onRequest, onError, etc)
  • βœ… Macro System for Auth/Rate Limiting
  • βœ… OpenAPI - Swagger Integration

πŸ’Ό Production Ready

// Error handling
.onError((err) => {
  return Response.json({ 
    error: err.message 
  }, { status: 500 })
})

// Rate limiting macro
.macro({
  rateLimit: () => ({
    resolve: async (ctx) => {
      // Implement your logic
    }
  })
})

πŸ“œ License

MIT License Β© 2025 Hedystia

πŸ—£οΈ Community