diff --git a/docs-src/spectrum-ts/webhooks.mdx.vel b/docs-src/spectrum-ts/webhooks.mdx.vel index 243f9a5..bcdd722 100644 --- a/docs-src/spectrum-ts/webhooks.mdx.vel +++ b/docs-src/spectrum-ts/webhooks.mdx.vel @@ -75,7 +75,7 @@ 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`. @@ -83,7 +83,7 @@ First-party adapters mount the endpoint for you and handle raw-body parsing corr 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!, @@ -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!, @@ -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!, diff --git a/package.json b/package.json index 745b4db..badbcbc 100644 --- a/package.json +++ b/package.json @@ -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" } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 11734b2..34a05ca 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -57,8 +57,8 @@ importers: specifier: ^0.44.0 version: 0.44.0 spectrum-ts: - specifier: 5.2.0 - version: 5.2.0(typescript@5.9.3) + specifier: 7.0.0 + version: 7.0.0(typescript@5.9.3) tsx: specifier: ^4.21.0 version: 4.21.0 @@ -927,6 +927,10 @@ packages: resolution: {integrity: sha512-3mjzy1IIBtsCQK6kAB8dbFCK0np7hS256wwW+nqNL8vKz0W5nRhu1iKAwyZxP8Z470dtNX5RjNgcl9I4wZeuTA==} engines: {node: '>=18.17'} + '@photon-ai/advanced-imessage@0.12.0': + resolution: {integrity: sha512-cqSq/ew48P3S+4xXpQmS/mDgpa+ijlKYKkQ4MExsQEjHfrJ0DpPJGuY5VHgzfTqV9wYVGyA3TNkDfse/ZRDxoA==} + engines: {node: '>=18.17'} + '@photon-ai/imessage-kit@2.1.2': resolution: {integrity: sha512-xteMkPqqWkPLv40M9gA1HJGS/fHXIWzzXNCwRfnC4+bj120KMXMacT9zOSoEcGk4MA0pGXcUMQPE16MdB+Bf/g==} engines: {node: '>=18.0.0'} @@ -1011,52 +1015,43 @@ packages: '@socket.io/component-emitter@3.1.2': resolution: {integrity: sha512-9BCxFwvbGg/RsZK9tjXd8s4UcwR0MWeFQ1XEKIQVVvAGJyINdrqKMcTRyLoK8Rse1GjzLV9cwjWV1olXRWEXVA==} - '@spectrum-ts/core@5.2.0': - resolution: {integrity: sha512-aQSWZ75B9eEiJ00Wa72T/GEEPX9RVIlOPXnsdp0lWWgT5K9+twnL25Kob7L1pgQPbzrgoLH/rjQf3iVktriEwg==} + '@spectrum-ts/core@7.0.0': + resolution: {integrity: sha512-zZmXHeVmoM8RBgGSlVW46njM/vNM2M35NQOTHu8vzufWp25eOT3ERIry1AX2vbri7X34Le3V9W1lwuQYZ+hufw==} peerDependencies: - elysia: ^1 - express: ^4 || ^5 ffmpeg-static: ^5 - hono: ^4 typescript: ^5 || ^6.0.0 peerDependenciesMeta: - elysia: - optional: true - express: - optional: true ffmpeg-static: optional: true - hono: - optional: true - '@spectrum-ts/imessage@5.2.0': - resolution: {integrity: sha512-AZztks7jex8J3dnK7xUdjcN87xsXcZK+LCDlhC/gwZ4defH4mxPVcxFKUVND/CO7W3tN4pBD0LDfKUO7jx9uaA==} + '@spectrum-ts/imessage@7.0.0': + resolution: {integrity: sha512-j3btkqaxvq21QZRQUCHcamM/8md4bTxa1TWuACToxju3VUl0dafyLDLk6g1Y27DFn3ivo+8ZyLRNi4MiI7HwiA==} peerDependencies: - '@spectrum-ts/core': ^5.0.0 + '@spectrum-ts/core': ^7.0.0 typescript: ^5 || ^6.0.0 - '@spectrum-ts/slack@5.2.0': - resolution: {integrity: sha512-ql6pHuEOxq7xAd9iIfVV9xXqpdmy5T8kUK+87HE8R87YFJm5L6z7df0wE0g0vpgQ6J7FkmTII0XNw/X7//odiw==} + '@spectrum-ts/slack@7.0.0': + resolution: {integrity: sha512-sDNBUE6oObEuu9qgUVyX47sJ4uB6EbNYlMH09KBjBCYOrnYvuNox2n1I7xnKu3c2zKV3hSQluP7b9+1o3jubTA==} peerDependencies: - '@spectrum-ts/core': ^5.0.0 + '@spectrum-ts/core': ^7.0.0 typescript: ^5 || ^6.0.0 - '@spectrum-ts/telegram@5.2.0': - resolution: {integrity: sha512-ofG2OKK/63Sxkv3a7MEJWkjtCy3Rs8HLEB2pxHSSlofQmAP7SDkXlBEzfgEr1SeM/mIFvE3gXNpIhb97Nz1Dog==} + '@spectrum-ts/telegram@7.0.0': + resolution: {integrity: sha512-W+OGwH4S7aOMZ7/KHwsVZsGbs+9MqEUK83g10kJmOpVQxVR7Bp9jkQTBvNJlP++ilJhb5ETow+67ky+fMA1yfA==} peerDependencies: - '@spectrum-ts/core': ^5.0.0 + '@spectrum-ts/core': ^7.0.0 typescript: ^5 || ^6.0.0 - '@spectrum-ts/terminal@5.2.0': - resolution: {integrity: sha512-OHSg4HKOgLXhv3mzm0M9eIPiwxdKel9yZglfUWGfUyafibnpCnF2XI069zc9hkDgdvCHynLfxM+TsPXPzdiMbw==} + '@spectrum-ts/terminal@7.0.0': + resolution: {integrity: sha512-2fSqdcRogOdk+B+pDVnMj7cdRTlvcFjS6haK/77yjRXhkwx+99hLrTe3skmU/jIVUXTC3Ujy67x0A4R2D3X4Vw==} peerDependencies: - '@spectrum-ts/core': ^5.0.0 + '@spectrum-ts/core': ^7.0.0 typescript: ^5 || ^6.0.0 - '@spectrum-ts/whatsapp-business@5.2.0': - resolution: {integrity: sha512-JZJwzug6UviSe7FqWb8y9f1Frq3RJ9IOQ/TgCYhijm5uchXtym/HdC+FAmCG06njcFx+ea7boUhwFs8579V4Bg==} + '@spectrum-ts/whatsapp-business@7.0.0': + resolution: {integrity: sha512-3EPP7bUn9RgURus3J1RCOAyfXSDJ5KehD5mMPfTQysZRyRBM5ePDU6w11p4/DiosLk+5X0hXaA9G9uz1gmNZxQ==} peerDependencies: - '@spectrum-ts/core': ^5.0.0 + '@spectrum-ts/core': ^7.0.0 typescript: ^5 || ^6.0.0 '@stylistic/eslint-plugin@5.10.0': @@ -2341,8 +2336,8 @@ packages: ms@2.1.3: resolution: {integrity: sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==} - nanoid@3.3.14: - resolution: {integrity: sha512-U9kYi5bpVMEI31yC8iw4bJJp0avcHXA0W8/wNfLfnvJYzihQo2ZRPYPvpAAd570HAcCBjCTN7vnr+v4StKl1IQ==} + nanoid@3.3.15: + resolution: {integrity: sha512-y7Wygv/7mEOvxTuEQDB8StXdMRBWf1kR/tlhAzBRUFkB2jfcLOAxO/SHmOO2zgz1pVgK29/kyupn059/bCHdjA==} engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1} hasBin: true @@ -2630,8 +2625,8 @@ packages: spdx-license-ids@3.0.23: resolution: {integrity: sha512-CWLcCCH7VLu13TgOH+r8p1O/Znwhqv/dbb6lqWy67G+pT1kHmeD/+V36AVb/vq8QMIQwVShJ6Ssl5FPh0fuSdw==} - spectrum-ts@5.2.0: - resolution: {integrity: sha512-CfHz7ZhKP9Cmunb3i7m4r5stXOGl1HNKOkBp/Fkl1DwDmhnGl+PRDy97FC5JBY+XYxAKxKnMRSbVTl8ldczTNg==} + spectrum-ts@7.0.0: + resolution: {integrity: sha512-YdfU5CEZKQL7feyyQylwbzwG+f7Kk4h7OZxztok5iNdYGY1dTpUvJrTpkkLCwXOewsJR9M2n4os5hmJvUWeO6g==} string-width@4.2.3: resolution: {integrity: sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==} @@ -3489,6 +3484,13 @@ snapshots: nice-grpc: 2.1.16 nice-grpc-common: 2.0.3 + '@photon-ai/advanced-imessage@0.12.0': + dependencies: + '@bufbuild/protobuf': 2.12.0 + '@grpc/grpc-js': 1.14.4 + nice-grpc: 2.1.16 + nice-grpc-common: 2.0.3 + '@photon-ai/imessage-kit@2.1.2': dependencies: node-typedstream: 1.4.1 @@ -3578,7 +3580,7 @@ snapshots: '@socket.io/component-emitter@3.1.2': {} - '@spectrum-ts/core@5.2.0(typescript@5.9.3)': + '@spectrum-ts/core@7.0.0(typescript@5.9.3)': dependencies: '@photon-ai/otel': 1.0.0(typescript@5.9.3) '@photon-ai/proto': 0.2.4 @@ -3590,42 +3592,42 @@ snapshots: vcf: 2.1.2 zod: 4.4.3 - '@spectrum-ts/imessage@5.2.0(@spectrum-ts/core@5.2.0(typescript@5.9.3))(typescript@5.9.3)': + '@spectrum-ts/imessage@7.0.0(@spectrum-ts/core@7.0.0(typescript@5.9.3))(typescript@5.9.3)': dependencies: - '@photon-ai/advanced-imessage': 0.11.2 + '@photon-ai/advanced-imessage': 0.12.0 '@photon-ai/imessage-kit': 3.0.0 '@photon-ai/otel': 1.0.0(typescript@5.9.3) - '@spectrum-ts/core': 5.2.0(typescript@5.9.3) + '@spectrum-ts/core': 7.0.0(typescript@5.9.3) lru-cache: 11.5.1 marked: 18.0.5 typescript: 5.9.3 zod: 4.4.3 - '@spectrum-ts/slack@5.2.0(@spectrum-ts/core@5.2.0(typescript@5.9.3))(typescript@5.9.3)': + '@spectrum-ts/slack@7.0.0(@spectrum-ts/core@7.0.0(typescript@5.9.3))(typescript@5.9.3)': dependencies: '@photon-ai/slack': 0.2.0 - '@spectrum-ts/core': 5.2.0(typescript@5.9.3) + '@spectrum-ts/core': 7.0.0(typescript@5.9.3) typescript: 5.9.3 zod: 4.4.3 - '@spectrum-ts/telegram@5.2.0(@spectrum-ts/core@5.2.0(typescript@5.9.3))(typescript@5.9.3)': + '@spectrum-ts/telegram@7.0.0(@spectrum-ts/core@7.0.0(typescript@5.9.3))(typescript@5.9.3)': dependencies: '@photon-ai/telegram-ts': 10.0.0 - '@spectrum-ts/core': 5.2.0(typescript@5.9.3) + '@spectrum-ts/core': 7.0.0(typescript@5.9.3) marked: 18.0.5 typescript: 5.9.3 zod: 4.4.3 - '@spectrum-ts/terminal@5.2.0(@spectrum-ts/core@5.2.0(typescript@5.9.3))(typescript@5.9.3)': + '@spectrum-ts/terminal@7.0.0(@spectrum-ts/core@7.0.0(typescript@5.9.3))(typescript@5.9.3)': dependencies: - '@spectrum-ts/core': 5.2.0(typescript@5.9.3) + '@spectrum-ts/core': 7.0.0(typescript@5.9.3) typescript: 5.9.3 zod: 4.4.3 - '@spectrum-ts/whatsapp-business@5.2.0(@spectrum-ts/core@5.2.0(typescript@5.9.3))(typescript@5.9.3)': + '@spectrum-ts/whatsapp-business@7.0.0(@spectrum-ts/core@7.0.0(typescript@5.9.3))(typescript@5.9.3)': dependencies: '@photon-ai/whatsapp-business': 0.1.1 - '@spectrum-ts/core': 5.2.0(typescript@5.9.3) + '@spectrum-ts/core': 7.0.0(typescript@5.9.3) mime-types: 3.0.2 typescript: 5.9.3 zod: 4.4.3 @@ -5217,7 +5219,7 @@ snapshots: ms@2.1.3: {} - nanoid@3.3.14: {} + nanoid@3.3.15: {} napi-build-utils@2.0.0: optional: true @@ -5404,7 +5406,7 @@ snapshots: postcss@8.5.15: dependencies: - nanoid: 3.3.14 + nanoid: 3.3.15 picocolors: 1.1.1 source-map-js: 1.2.1 @@ -5620,19 +5622,16 @@ snapshots: spdx-license-ids@3.0.23: {} - spectrum-ts@5.2.0(typescript@5.9.3): + spectrum-ts@7.0.0(typescript@5.9.3): dependencies: - '@spectrum-ts/core': 5.2.0(typescript@5.9.3) - '@spectrum-ts/imessage': 5.2.0(@spectrum-ts/core@5.2.0(typescript@5.9.3))(typescript@5.9.3) - '@spectrum-ts/slack': 5.2.0(@spectrum-ts/core@5.2.0(typescript@5.9.3))(typescript@5.9.3) - '@spectrum-ts/telegram': 5.2.0(@spectrum-ts/core@5.2.0(typescript@5.9.3))(typescript@5.9.3) - '@spectrum-ts/terminal': 5.2.0(@spectrum-ts/core@5.2.0(typescript@5.9.3))(typescript@5.9.3) - '@spectrum-ts/whatsapp-business': 5.2.0(@spectrum-ts/core@5.2.0(typescript@5.9.3))(typescript@5.9.3) + '@spectrum-ts/core': 7.0.0(typescript@5.9.3) + '@spectrum-ts/imessage': 7.0.0(@spectrum-ts/core@7.0.0(typescript@5.9.3))(typescript@5.9.3) + '@spectrum-ts/slack': 7.0.0(@spectrum-ts/core@7.0.0(typescript@5.9.3))(typescript@5.9.3) + '@spectrum-ts/telegram': 7.0.0(@spectrum-ts/core@7.0.0(typescript@5.9.3))(typescript@5.9.3) + '@spectrum-ts/terminal': 7.0.0(@spectrum-ts/core@7.0.0(typescript@5.9.3))(typescript@5.9.3) + '@spectrum-ts/whatsapp-business': 7.0.0(@spectrum-ts/core@7.0.0(typescript@5.9.3))(typescript@5.9.3) transitivePeerDependencies: - - elysia - - express - ffmpeg-static - - hono - typescript string-width@4.2.3: