Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions docs-src/spectrum-ts/webhooks.mdx.vel
Original file line number Diff line number Diff line change
Expand Up @@ -75,15 +75,15 @@ Pass the raw body bytes. The HMAC is computed over the exact bytes on the wire.

## Framework adapters

First-party adapters mount the endpoint for you and handle raw-body parsing correctly. Each is an optional subpath import — install the framework as a peer dependency only if you use it.
First-party adapters mount the endpoint for you and handle raw-body parsing correctly. Each adapter is a standalone package — install the one for your framework alongside `spectrum-ts`.

<Tabs>
<Tab title="Hono">
```ts
import { Hono } from "hono";
import { Spectrum } from "spectrum-ts";
import { imessage } from "spectrum-ts/providers/imessage";
import { spectrum } from "spectrum-ts/hono";
import { spectrum } from "@spectrum-ts/hono";

const app = await Spectrum({
projectId: process.env.PROJECT_ID!,
Expand Down Expand Up @@ -112,7 +112,7 @@ First-party adapters mount the endpoint for you and handle raw-body parsing corr
import express from "express";
import { Spectrum } from "spectrum-ts";
import { imessage } from "spectrum-ts/providers/imessage";
import { spectrum } from "spectrum-ts/express";
import { spectrum } from "@spectrum-ts/express";

const app = await Spectrum({
projectId: process.env.PROJECT_ID!,
Expand Down Expand Up @@ -145,7 +145,7 @@ First-party adapters mount the endpoint for you and handle raw-body parsing corr
import { Elysia } from "elysia";
import { Spectrum } from "spectrum-ts";
import { imessage } from "spectrum-ts/providers/imessage";
import { spectrum } from "spectrum-ts/elysia";
import { spectrum } from "@spectrum-ts/elysia";

const app = await Spectrum({
projectId: process.env.PROJECT_ID!,
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"eslint-plugin-format": "^2.0.1",
"husky": "^9.1.7",
"oxfmt": "^0.44.0",
"spectrum-ts": "5.2.0",
"spectrum-ts": "7.0.0",
"tsx": "^4.21.0",
"typescript": "^5.9.3"
}
Expand Down
111 changes: 55 additions & 56 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading