diff --git a/.github/workflows/jam-server-deploy.yml b/.github/workflows/jam-server-deploy.yml
deleted file mode 100644
index fe183a98..00000000
--- a/.github/workflows/jam-server-deploy.yml
+++ /dev/null
@@ -1,40 +0,0 @@
-name: Deploy Jam server
-
-on:
- push:
- branches: [master]
- paths: ["jam-server/**"]
- workflow_dispatch:
-
-# The deploy only reads the repo; the Cloudflare token comes from secrets, which
-# workflows triggered by pull requests from forks never receive.
-permissions:
- contents: read
-
-concurrency:
- group: jam-server-deploy
- cancel-in-progress: false
-
-jobs:
- deploy:
- runs-on: ubuntu-latest
- defaults:
- run:
- working-directory: jam-server
- steps:
- - uses: actions/checkout@v7
- - uses: actions/setup-node@v6
- with:
- node-version: 24
- cache: npm
- cache-dependency-path: jam-server/package-lock.json
- - run: npm ci
- - run: npm run typecheck
- - name: Deploy
- run: npx wrangler deploy
- env:
- CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
- CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
- - name: Smoke test
- run: JAM_URL="${{ vars.JAM_SERVER_URL }}" npm test
- if: ${{ vars.JAM_SERVER_URL != '' }}
diff --git a/AGENTS.md b/AGENTS.md
index b2caeff0..9a0999af 100644
--- a/AGENTS.md
+++ b/AGENTS.md
@@ -27,13 +27,13 @@
- Do not add `ktor-client-cio`: on iOS it competes with Darwin as the default engine and has no TLS on Kotlin/Native, so every HTTPS request fails.
## Group Jam
-- Room server: `jam-server/` (Cloudflare Worker + one Durable Object per six-letter room code, TypeScript, wrangler). It relays/retains small JSON frames and serves the clock; no audio passes through it. Protocol in `jam-server/src/protocol.ts`; keep it in sync with the wire frames in `core/jam/JamRoomClient.kt` (bump `PROTOCOL_VERSION` on both sides for breaking changes).
+- Room server: separate repository, https://github.com/team-spotube/jam-server (Cloudflare Worker + one Durable Object per six-letter room code, TypeScript, wrangler). It relays/retains small JSON frames and serves the clock; no audio passes through it. Protocol in its `src/protocol.ts`; keep it in sync with the wire frames in `core/jam/JamRoomClient.kt` (bump `PROTOCOL_VERSION` on both sides for breaking changes, and land both changes together).
- App side: `core/jam/` — `JamRoomClient` (Ktor WebSocket, reconnects, keep-alives, clock pings), `JamClock`/`JamDriftCorrector` (sync math), `JamRoomService` (host broadcasts queue + playback anchors in server time; guests follow by nudging playback rate, seeking only when far off).
-- Cost and battery: the room is billed per incoming message and storage write, and on phones each transmission wakes the cellular radio. Don't add periodic frames or polling. Keep-alives go out once a minute. Guests' sync loop sleeps while the room is paused or buffering, and the host checks its own drift only while playing. Anchors go out on change (plus host drift and a 60 s heartbeat), keep-alives are runtime auto-responses, and anchors aren't persisted. See `jam-server/README.md`.
-- Security: the server enforces identity (per-install secret → per-room key → public id), device-level bans (`JamDevice.kt` traits, only ever sent hashed), host-only powers and flood limits. The app treats everything from peers as untrusted and runs it through `JamMediaItem.sanitized` before loading it. See "Security" in `jam-server/README.md`.
+- Cost and battery: the room is billed per incoming message and storage write, and on phones each transmission wakes the cellular radio. Don't add periodic frames or polling. Keep-alives go out once a minute. Guests' sync loop sleeps while the room is paused or buffering, and the host checks its own drift only while playing. Anchors go out on change (plus host drift and a 60 s heartbeat), keep-alives are runtime auto-responses, and anchors aren't persisted. See the jam-server README.
+- Security: the server enforces identity (per-install secret → per-room key → public id), device-level bans (`JamDevice.kt` traits, only ever sent hashed), host-only powers and flood limits. The app treats everything from peers as untrusted and runs it through `JamMediaItem.sanitized` before loading it. See "Security" in the jam-server README.
- A network drop must never crash the app: `JamRoomClient.pump` turns socket failures into a reconnect. `JamSessionSimulationTest.roomSurvivesNetworkLoss` cuts the network with `TcpProxy`.
- Server URL setting: `UserSettings.jamServerUrl` (default `DEFAULT_JAM_SERVER_URL` in `SettingsModels.kt`).
-- Tests: `JamSyncTest` (pure), plus `JamRoomClientIntegrationTest` and `JamSessionSimulationTest`, which only run with `JAM_TEST_URL` set (start `npm run dev` in `jam-server/`).
+- Tests: `JamSyncTest` (pure), plus `JamRoomClientIntegrationTest` and `JamSessionSimulationTest`, which only run with `JAM_TEST_URL` set (run `npm run dev` in a jam-server checkout).
## GraalVM native image (desktop)
- Enabled via `graalvm { }` inside `nucleus.application` in `composeApp/build.gradle.kts`. Nucleus downloads GraalVM CE itself (or uses `$GRAALVM_HOME`). Linux needs `gcc` + `patchelf`.
diff --git a/composeApp/src/commonMain/composeResources/values-ar/strings.xml b/composeApp/src/commonMain/composeResources/values-ar/strings.xml
index 848261ee..cc82d900 100644
--- a/composeApp/src/commonMain/composeResources/values-ar/strings.xml
+++ b/composeApp/src/commonMain/composeResources/values-ar/strings.xml
@@ -348,7 +348,7 @@
رابط الخادم
أدخل رابطًا يبدأ بـ https://
تحقّق من خادم الغرف قبل بدء غرفة.
- يستخدم الجام خادم الغرف المجاني من Spotube. للاستضافة الذاتية، انشر jam-server من مستودع Spotube وأدخل رابطه.
+ يستخدم الجام خادم الغرف المجاني من Spotube. للاستضافة الذاتية، انشر الخادم من github.com/team-spotube/jam-server وأدخل رابطه.
أنت
الخادم: %1$s
حدّد خادم غرف في الإعدادات لاستضافة غرفة أو الانضمام إليها.
diff --git a/composeApp/src/commonMain/composeResources/values-bn/strings.xml b/composeApp/src/commonMain/composeResources/values-bn/strings.xml
index 08dc21ff..a111017f 100644
--- a/composeApp/src/commonMain/composeResources/values-bn/strings.xml
+++ b/composeApp/src/commonMain/composeResources/values-bn/strings.xml
@@ -332,7 +332,7 @@
সার্ভার URL
https:// দিয়ে শুরু হওয়া একটি URL দিন
রুম শুরু করার আগে রুম সার্ভার পরীক্ষা করুন।
- জ্যাম Spotube-এর বিনামূল্যের রুম সার্ভার ব্যবহার করে। নিজে হোস্ট করতে Spotube রিপোজিটরি থেকে jam-server ডিপ্লয় করে তার URL দিন।
+ জ্যাম Spotube-এর বিনামূল্যের রুম সার্ভার ব্যবহার করে। নিজে হোস্ট করতে github.com/team-spotube/jam-server থেকে সার্ভার ডিপ্লয় করে তার URL দিন।
আপনি
সার্ভার: %1$s
রুম হোস্ট করতে বা যোগ দিতে সেটিংসে একটি রুম সার্ভার সেট করুন।
diff --git a/composeApp/src/commonMain/composeResources/values-de/strings.xml b/composeApp/src/commonMain/composeResources/values-de/strings.xml
index 34d0a674..3fb3063b 100644
--- a/composeApp/src/commonMain/composeResources/values-de/strings.xml
+++ b/composeApp/src/commonMain/composeResources/values-de/strings.xml
@@ -332,7 +332,7 @@
Server-URL
Gib eine URL ein, die mit https:// beginnt.
Prüfe den Raumserver, bevor du einen Raum startest.
- Jam nutzt den kostenlosen Raumserver von Spotube. Zum Selbsthosten stelle jam-server aus dem Spotube-Repository bereit und gib seine URL ein.
+ Jam nutzt den kostenlosen Raumserver von Spotube. Zum Selbsthosten stelle den Server von github.com/team-spotube/jam-server bereit und gib seine URL ein.
Du
Server: %1$s
Lege in den Einstellungen einen Raumserver fest, um einen Raum zu hosten oder beizutreten.
diff --git a/composeApp/src/commonMain/composeResources/values-es/strings.xml b/composeApp/src/commonMain/composeResources/values-es/strings.xml
index 4f9e7296..3a79f26d 100644
--- a/composeApp/src/commonMain/composeResources/values-es/strings.xml
+++ b/composeApp/src/commonMain/composeResources/values-es/strings.xml
@@ -336,7 +336,7 @@
URL del servidor
Introduce una URL que empiece por https://
Comprueba el servidor de salas antes de crear una sala.
- Jam usa el servidor de salas gratuito de Spotube. Para alojarlo tú mismo, despliega jam-server desde el repositorio de Spotube e introduce su URL.
+ Jam usa el servidor de salas gratuito de Spotube. Para alojarlo tú mismo, despliega el servidor de github.com/team-spotube/jam-server e introduce su URL.
Tú
Servidor: %1$s
Configura un servidor de salas en Ajustes para crear una sala o unirte a una.
diff --git a/composeApp/src/commonMain/composeResources/values-fa/strings.xml b/composeApp/src/commonMain/composeResources/values-fa/strings.xml
index ad55e61e..7ad121f8 100644
--- a/composeApp/src/commonMain/composeResources/values-fa/strings.xml
+++ b/composeApp/src/commonMain/composeResources/values-fa/strings.xml
@@ -332,7 +332,7 @@
نشانی سرور
نشانیای وارد کنید که با https:// شروع شود
پیش از شروع اتاق، سرور اتاقها را بررسی کنید.
- جم از سرور رایگان اتاقهای Spotube استفاده میکند. برای میزبانی شخصی، jam-server را از مخزن Spotube راهاندازی کنید و نشانی آن را وارد کنید.
+ جم از سرور رایگان اتاقهای Spotube استفاده میکند. برای میزبانی شخصی، سرور را از github.com/team-spotube/jam-server راهاندازی کنید و نشانی آن را وارد کنید.
شما
سرور: %1$s
برای میزبانی یا پیوستن به اتاق، در تنظیمات یک سرور اتاق تعیین کنید.
diff --git a/composeApp/src/commonMain/composeResources/values-fr/strings.xml b/composeApp/src/commonMain/composeResources/values-fr/strings.xml
index 08d0398c..a96a3b83 100644
--- a/composeApp/src/commonMain/composeResources/values-fr/strings.xml
+++ b/composeApp/src/commonMain/composeResources/values-fr/strings.xml
@@ -336,7 +336,7 @@
URL du serveur
Saisissez une URL commençant par https://
Vérifiez le serveur de salles avant de lancer une salle.
- Jam utilise le serveur de salles gratuit de Spotube. Pour l’héberger vous-même, déployez jam-server depuis le dépôt Spotube et saisissez son URL.
+ Jam utilise le serveur de salles gratuit de Spotube. Pour l’héberger vous-même, déployez le serveur depuis github.com/team-spotube/jam-server et saisissez son URL.
Vous
Serveur : %1$s
Définissez un serveur de salles dans les Paramètres pour créer ou rejoindre une salle.
diff --git a/composeApp/src/commonMain/composeResources/values-hi/strings.xml b/composeApp/src/commonMain/composeResources/values-hi/strings.xml
index 82cb35aa..5de37959 100644
--- a/composeApp/src/commonMain/composeResources/values-hi/strings.xml
+++ b/composeApp/src/commonMain/composeResources/values-hi/strings.xml
@@ -331,7 +331,7 @@
सर्वर URL
https:// से शुरू होने वाला URL डालें
रूम शुरू करने से पहले रूम सर्वर जांच लें।
- जैम Spotube के मुफ़्त रूम सर्वर का इस्तेमाल करता है। खुद होस्ट करने के लिए Spotube रिपॉज़िटरी से jam-server डिप्लॉय करें और उसका URL डालें।
+ जैम Spotube के मुफ़्त रूम सर्वर का इस्तेमाल करता है। खुद होस्ट करने के लिए github.com/team-spotube/jam-server से सर्वर डिप्लॉय करें और उसका URL डालें।
आप
सर्वर: %1$s
रूम होस्ट करने या उसमें शामिल होने के लिए सेटिंग में रूम सर्वर सेट करें।
diff --git a/composeApp/src/commonMain/composeResources/values-id/strings.xml b/composeApp/src/commonMain/composeResources/values-id/strings.xml
index 1f162c8d..0cd52e2e 100644
--- a/composeApp/src/commonMain/composeResources/values-id/strings.xml
+++ b/composeApp/src/commonMain/composeResources/values-id/strings.xml
@@ -328,7 +328,7 @@
URL server
Masukkan URL yang diawali https://
Periksa server ruang sebelum memulai ruang.
- Jam memakai server ruang gratis milik Spotube. Untuk meng-host sendiri, deploy jam-server dari repositori Spotube lalu masukkan URL-nya.
+ Jam memakai server ruang gratis milik Spotube. Untuk meng-host sendiri, deploy server dari github.com/team-spotube/jam-server lalu masukkan URL-nya.
Kamu
Server: %1$s
Atur server ruang di Pengaturan untuk membuat atau bergabung ke ruang.
diff --git a/composeApp/src/commonMain/composeResources/values-it/strings.xml b/composeApp/src/commonMain/composeResources/values-it/strings.xml
index eb429ba5..5ddcc190 100644
--- a/composeApp/src/commonMain/composeResources/values-it/strings.xml
+++ b/composeApp/src/commonMain/composeResources/values-it/strings.xml
@@ -336,7 +336,7 @@
URL del server
Inserisci un URL che inizi con https://
Controlla il server delle stanze prima di avviare una stanza.
- Jam usa il server delle stanze gratuito di Spotube. Per ospitarlo in proprio, distribuisci jam-server dal repository di Spotube e inseriscine l’URL.
+ Jam usa il server delle stanze gratuito di Spotube. Per ospitarlo in proprio, distribuisci il server da github.com/team-spotube/jam-server e inseriscine l’URL.
Tu
Server: %1$s
Imposta un server delle stanze nelle Impostazioni per ospitare una stanza o entrarci.
diff --git a/composeApp/src/commonMain/composeResources/values-ja/strings.xml b/composeApp/src/commonMain/composeResources/values-ja/strings.xml
index ce8e54a2..1464d695 100644
--- a/composeApp/src/commonMain/composeResources/values-ja/strings.xml
+++ b/composeApp/src/commonMain/composeResources/values-ja/strings.xml
@@ -328,7 +328,7 @@
サーバーURL
https:// で始まるURLを入力してください。
ルームを始める前にルームサーバーを確認します。
- ジャムはSpotubeの無料ルームサーバーを使います。自分でホストするには、Spotubeリポジトリのjam-serverをデプロイし、そのURLを入力してください。
+ ジャムはSpotubeの無料ルームサーバーを使います。自分でホストするには、github.com/team-spotube/jam-server のサーバーをデプロイし、そのURLを入力してください。
あなた
サーバー: %1$s
ルームをホストまたは参加するには、設定でルームサーバーを指定してください。
diff --git a/composeApp/src/commonMain/composeResources/values-ko/strings.xml b/composeApp/src/commonMain/composeResources/values-ko/strings.xml
index b7fb9f12..39b8854c 100644
--- a/composeApp/src/commonMain/composeResources/values-ko/strings.xml
+++ b/composeApp/src/commonMain/composeResources/values-ko/strings.xml
@@ -328,7 +328,7 @@
서버 URL
https://로 시작하는 URL을 입력하세요.
방을 시작하기 전에 방 서버를 확인하세요.
- 잼은 Spotube의 무료 방 서버를 사용합니다. 직접 호스팅하려면 Spotube 저장소의 jam-server를 배포하고 URL을 입력하세요.
+ 잼은 Spotube의 무료 방 서버를 사용합니다. 직접 호스팅하려면 github.com/team-spotube/jam-server의 서버를 배포하고 URL을 입력하세요.
나
서버: %1$s
방을 만들거나 참여하려면 설정에서 방 서버를 지정하세요.
diff --git a/composeApp/src/commonMain/composeResources/values-nl/strings.xml b/composeApp/src/commonMain/composeResources/values-nl/strings.xml
index 76fb4235..e3520c74 100644
--- a/composeApp/src/commonMain/composeResources/values-nl/strings.xml
+++ b/composeApp/src/commonMain/composeResources/values-nl/strings.xml
@@ -332,7 +332,7 @@
Server-URL
Voer een URL in die begint met https://
Controleer de sessieserver voordat je een sessie start.
- Jam gebruikt de gratis sessieserver van Spotube. Wil je hem zelf hosten, deploy dan jam-server uit de Spotube-repository en voer de URL in.
+ Jam gebruikt de gratis sessieserver van Spotube. Wil je hem zelf hosten, deploy dan de server van github.com/team-spotube/jam-server en voer de URL in.
Jij
Server: %1$s
Stel in Instellingen een sessieserver in om een sessie te hosten of eraan deel te nemen.
diff --git a/composeApp/src/commonMain/composeResources/values-pl/strings.xml b/composeApp/src/commonMain/composeResources/values-pl/strings.xml
index a196725e..92c9b443 100644
--- a/composeApp/src/commonMain/composeResources/values-pl/strings.xml
+++ b/composeApp/src/commonMain/composeResources/values-pl/strings.xml
@@ -340,7 +340,7 @@
Adres URL serwera
Wpisz adres URL zaczynający się od https://
Sprawdź serwer pokojów przed utworzeniem pokoju.
- Jam korzysta z darmowego serwera pokojów Spotube. Aby hostować własny, wdróż jam-server z repozytorium Spotube i wpisz jego adres URL.
+ Jam korzysta z darmowego serwera pokojów Spotube. Aby hostować własny, wdróż serwer z github.com/team-spotube/jam-server i wpisz jego adres URL.
Ty
Serwer: %1$s
Ustaw serwer pokojów w Ustawieniach, aby utworzyć pokój lub do niego dołączyć.
diff --git a/composeApp/src/commonMain/composeResources/values-pt/strings.xml b/composeApp/src/commonMain/composeResources/values-pt/strings.xml
index 76942052..0f971be6 100644
--- a/composeApp/src/commonMain/composeResources/values-pt/strings.xml
+++ b/composeApp/src/commonMain/composeResources/values-pt/strings.xml
@@ -336,7 +336,7 @@
URL do servidor
Digite uma URL que comece com https://
Verifique o servidor de salas antes de criar uma sala.
- O Jam usa o servidor de salas gratuito do Spotube. Para hospedar o seu, implante o jam-server do repositório do Spotube e informe a URL dele.
+ O Jam usa o servidor de salas gratuito do Spotube. Para hospedar o seu, implante o servidor de github.com/team-spotube/jam-server e informe a URL dele.
Você
Servidor: %1$s
Defina um servidor de salas nas Configurações para criar ou entrar em uma sala.
diff --git a/composeApp/src/commonMain/composeResources/values-ru/strings.xml b/composeApp/src/commonMain/composeResources/values-ru/strings.xml
index 3f89ffd8..b413416b 100644
--- a/composeApp/src/commonMain/composeResources/values-ru/strings.xml
+++ b/composeApp/src/commonMain/composeResources/values-ru/strings.xml
@@ -340,7 +340,7 @@
URL сервера
Введите URL, начинающийся с https://
Проверьте сервер комнат перед созданием комнаты.
- Джем использует бесплатный сервер комнат Spotube. Чтобы развернуть свой, установите jam-server из репозитория Spotube и укажите его URL.
+ Джем использует бесплатный сервер комнат Spotube. Чтобы развернуть свой, установите сервер из github.com/team-spotube/jam-server и укажите его URL.
Вы
Сервер: %1$s
Укажите сервер комнат в настройках, чтобы создать комнату или присоединиться к ней.
diff --git a/composeApp/src/commonMain/composeResources/values-th/strings.xml b/composeApp/src/commonMain/composeResources/values-th/strings.xml
index db86245d..6498a53b 100644
--- a/composeApp/src/commonMain/composeResources/values-th/strings.xml
+++ b/composeApp/src/commonMain/composeResources/values-th/strings.xml
@@ -328,7 +328,7 @@
URL ของเซิร์ฟเวอร์
ใส่ URL ที่ขึ้นต้นด้วย https://
ตรวจสอบเซิร์ฟเวอร์ห้องก่อนเริ่มห้อง
- แจมใช้เซิร์ฟเวอร์ห้องฟรีของ Spotube หากต้องการโฮสต์เอง ให้ติดตั้ง jam-server จากรีโพสิทอรีของ Spotube แล้วใส่ URL ของเซิร์ฟเวอร์นั้น
+ แจมใช้เซิร์ฟเวอร์ห้องฟรีของ Spotube หากต้องการโฮสต์เอง ให้ติดตั้งเซิร์ฟเวอร์จาก github.com/team-spotube/jam-server แล้วใส่ URL ของเซิร์ฟเวอร์นั้น
คุณ
เซิร์ฟเวอร์: %1$s
ตั้งค่าเซิร์ฟเวอร์ห้องในการตั้งค่าเพื่อโฮสต์หรือเข้าร่วมห้อง
diff --git a/composeApp/src/commonMain/composeResources/values-tr/strings.xml b/composeApp/src/commonMain/composeResources/values-tr/strings.xml
index c151fd39..fe357c8c 100644
--- a/composeApp/src/commonMain/composeResources/values-tr/strings.xml
+++ b/composeApp/src/commonMain/composeResources/values-tr/strings.xml
@@ -332,7 +332,7 @@
Sunucu URL’si
https:// ile başlayan bir URL gir.
Oda başlatmadan önce oda sunucusunu kontrol et.
- Jam, Spotube’un ücretsiz oda sunucusunu kullanır. Kendin barındırmak için Spotube deposundaki jam-server’ı kur ve URL’sini gir.
+ Jam, Spotube’un ücretsiz oda sunucusunu kullanır. Kendin barındırmak için github.com/team-spotube/jam-server adresindeki sunucuyu kur ve URL’sini gir.
Sen
Sunucu: %1$s
Oda açmak veya bir odaya katılmak için Ayarlar’da bir oda sunucusu belirle.
diff --git a/composeApp/src/commonMain/composeResources/values-uk/strings.xml b/composeApp/src/commonMain/composeResources/values-uk/strings.xml
index a2621789..966a429c 100644
--- a/composeApp/src/commonMain/composeResources/values-uk/strings.xml
+++ b/composeApp/src/commonMain/composeResources/values-uk/strings.xml
@@ -340,7 +340,7 @@
URL сервера
Введіть URL, що починається з https://
Перевірте сервер кімнат перед створенням кімнати.
- Джем використовує безкоштовний сервер кімнат Spotube. Щоб розгорнути власний, встановіть jam-server із репозиторію Spotube і вкажіть його URL.
+ Джем використовує безкоштовний сервер кімнат Spotube. Щоб розгорнути власний, встановіть сервер із github.com/team-spotube/jam-server і вкажіть його URL.
Ви
Сервер: %1$s
Укажіть сервер кімнат у налаштуваннях, щоб створити кімнату або приєднатися до неї.
diff --git a/composeApp/src/commonMain/composeResources/values-vi/strings.xml b/composeApp/src/commonMain/composeResources/values-vi/strings.xml
index f38ef955..7866e671 100644
--- a/composeApp/src/commonMain/composeResources/values-vi/strings.xml
+++ b/composeApp/src/commonMain/composeResources/values-vi/strings.xml
@@ -328,7 +328,7 @@
URL máy chủ
Nhập URL bắt đầu bằng https://
Kiểm tra máy chủ phòng trước khi tạo phòng.
- Jam dùng máy chủ phòng miễn phí của Spotube. Để tự lưu trữ, hãy triển khai jam-server từ kho mã Spotube rồi nhập URL của nó.
+ Jam dùng máy chủ phòng miễn phí của Spotube. Để tự lưu trữ, hãy triển khai máy chủ từ github.com/team-spotube/jam-server rồi nhập URL của nó.
Bạn
Máy chủ: %1$s
Đặt máy chủ phòng trong Cài đặt để tạo hoặc tham gia phòng.
diff --git a/composeApp/src/commonMain/composeResources/values-zh-rTW/strings.xml b/composeApp/src/commonMain/composeResources/values-zh-rTW/strings.xml
index 98f81efd..0bbee39f 100644
--- a/composeApp/src/commonMain/composeResources/values-zh-rTW/strings.xml
+++ b/composeApp/src/commonMain/composeResources/values-zh-rTW/strings.xml
@@ -328,7 +328,7 @@
伺服器網址
請輸入以 https:// 開頭的網址
建立房間前先檢查房間伺服器。
- Jam 使用 Spotube 的免費房間伺服器。若要自行架設,請部署 Spotube 儲存庫中的 jam-server 並輸入其網址。
+ Jam 使用 Spotube 的免費房間伺服器。若要自行架設,請部署 github.com/team-spotube/jam-server 中的伺服器並輸入其網址。
你
伺服器:%1$s
請在設定中指定房間伺服器,以建立或加入房間。
diff --git a/composeApp/src/commonMain/composeResources/values-zh/strings.xml b/composeApp/src/commonMain/composeResources/values-zh/strings.xml
index c4670129..c357b046 100644
--- a/composeApp/src/commonMain/composeResources/values-zh/strings.xml
+++ b/composeApp/src/commonMain/composeResources/values-zh/strings.xml
@@ -328,7 +328,7 @@
服务器网址
请输入以 https:// 开头的网址
创建房间前先检查房间服务器。
- 一起听使用 Spotube 的免费房间服务器。如需自行托管,请部署 Spotube 仓库中的 jam-server 并填写其网址。
+ 一起听使用 Spotube 的免费房间服务器。如需自行托管,请部署 github.com/team-spotube/jam-server 中的服务器并填写其网址。
你
服务器:%1$s
请在设置中指定房间服务器,以创建或加入房间。
diff --git a/composeApp/src/commonMain/composeResources/values/strings.xml b/composeApp/src/commonMain/composeResources/values/strings.xml
index e6c3b823..7784db8d 100644
--- a/composeApp/src/commonMain/composeResources/values/strings.xml
+++ b/composeApp/src/commonMain/composeResources/values/strings.xml
@@ -314,7 +314,7 @@
Server URL
Enter a URL starting with https://
Check the room server before starting a room.
- Jam uses Spotube’s free room server. To self-host, deploy jam-server from the Spotube repository and enter its URL.
+ Jam uses Spotube’s free room server. To self-host, deploy the server from github.com/team-spotube/jam-server and enter its URL.
Test connection
Testing…
Connected in %1$d ms
diff --git a/composeApp/src/commonMain/kotlin/org/spotube/spotube/core/jam/JamNames.kt b/composeApp/src/commonMain/kotlin/org/spotube/spotube/core/jam/JamNames.kt
index 023bd85c..bc35d56e 100644
--- a/composeApp/src/commonMain/kotlin/org/spotube/spotube/core/jam/JamNames.kt
+++ b/composeApp/src/commonMain/kotlin/org/spotube/spotube/core/jam/JamNames.kt
@@ -27,7 +27,7 @@ import spotube.composeapp.generated.resources.jam_name_format
/** Friendly default names for jam participants ("Mellow Otter"), like npm or Docker use. */
object JamNames {
- /** The server's limit (`MAX_NAME_LENGTH` in `jam-server/src/protocol.ts`). */
+ /** The server's limit (`MAX_NAME_LENGTH` in the jam-server repository's `src/protocol.ts`). */
const val MAX_LENGTH = 40
/**
diff --git a/composeApp/src/commonMain/kotlin/org/spotube/spotube/core/jam/JamRoomClient.kt b/composeApp/src/commonMain/kotlin/org/spotube/spotube/core/jam/JamRoomClient.kt
index fd529abf..5be59de1 100644
--- a/composeApp/src/commonMain/kotlin/org/spotube/spotube/core/jam/JamRoomClient.kt
+++ b/composeApp/src/commonMain/kotlin/org/spotube/spotube/core/jam/JamRoomClient.kt
@@ -74,7 +74,7 @@ import spotube.composeapp.generated.resources.settings_jam_server_test_ok
import kotlin.time.Clock
/**
- * WebSocket client for one jam room on the room server (`jam-server/`, a Cloudflare
+ * WebSocket client for one jam room on the room server (https://github.com/team-spotube/jam-server, a Cloudflare
* Durable Object per room code).
*
* The server keeps the host's latest queue and anchor for late joiners, routes guest
@@ -482,7 +482,7 @@ sealed interface JamRoomEvent {
/** The server refused to let us into the room. */
class JamRoomException(val code: String, message: String) : Exception(message)
-// ---------- Wire frames (see jam-server/src/protocol.ts) ----------
+// ---------- Wire frames (see src/protocol.ts in https://github.com/team-spotube/jam-server) ----------
@Serializable
private data class Health(val ok: Boolean = false, val v: Int = 0)
diff --git a/composeApp/src/commonMain/kotlin/org/spotube/spotube/core/jam/JamRoomService.kt b/composeApp/src/commonMain/kotlin/org/spotube/spotube/core/jam/JamRoomService.kt
index 252db77f..5f5bd986 100644
--- a/composeApp/src/commonMain/kotlin/org/spotube/spotube/core/jam/JamRoomService.kt
+++ b/composeApp/src/commonMain/kotlin/org/spotube/spotube/core/jam/JamRoomService.kt
@@ -872,7 +872,7 @@ class JamRoomService(
companion object {
private const val CREATE_ATTEMPTS = 3
- /** Keeps the host under the server's budgets (see `jam-server/src/protocol.ts`). */
+ /** Keeps the host under the server's budgets (see `src/protocol.ts` in the jam-server repository). */
private const val QUEUE_MIN_GAP_MS = 1_000L
private const val ANCHOR_MIN_GAP_MS = 250L
private const val MAX_SUGGESTED_ITEMS = 500
diff --git a/composeApp/src/commonMain/kotlin/org/spotube/spotube/modules/settings/SettingsModels.kt b/composeApp/src/commonMain/kotlin/org/spotube/spotube/modules/settings/SettingsModels.kt
index 5b93e6e7..fe66b4d9 100644
--- a/composeApp/src/commonMain/kotlin/org/spotube/spotube/modules/settings/SettingsModels.kt
+++ b/composeApp/src/commonMain/kotlin/org/spotube/spotube/modules/settings/SettingsModels.kt
@@ -61,7 +61,7 @@ data class UserSettings(
// Group Jam
val jamParticipantName: String = "",
- /** Room server (`jam-server/`); self-hosters point this at their own deployment. */
+ /** Room server (https://github.com/team-spotube/jam-server); self-hosters point this at their own deployment. */
val jamServerUrl: String = DEFAULT_JAM_SERVER_URL,
val lastJamCode: String = "",
/** Random per-install secret behind this device's jam identities (see `jamParticipantKey`). */
diff --git a/composeApp/src/commonTest/kotlin/org/spotube/spotube/core/jam/JamSecurityTest.kt b/composeApp/src/commonTest/kotlin/org/spotube/spotube/core/jam/JamSecurityTest.kt
index bc8cfcbb..7902dc3b 100644
--- a/composeApp/src/commonTest/kotlin/org/spotube/spotube/core/jam/JamSecurityTest.kt
+++ b/composeApp/src/commonTest/kotlin/org/spotube/spotube/core/jam/JamSecurityTest.kt
@@ -62,7 +62,7 @@ class JamSecurityTest {
fun clientKeysAreLongRandomAndAcceptedByTheServer() {
val keys = List(100) { JamRoomCode.newClientKey() }
assertEquals(keys.size, keys.toSet().size)
- // Mirrors CLIENT_KEY in jam-server/src/protocol.ts.
+ // Mirrors CLIENT_KEY in the jam-server repository's src/protocol.ts.
val serverPattern = Regex("^[A-Za-z0-9_-]{22,64}$")
assertTrue(keys.all { serverPattern.matches(it) })
}
@@ -82,7 +82,7 @@ class JamSecurityTest {
assertEquals(digest, jamDeviceDigest("ABCDEF"))
assertNotEquals(digest, jamDeviceDigest("ABCDEG"))
assertTrue(jamDeviceTraits().none { trait -> trait.length > 3 && trait in digest })
- // Mirrors DEVICE_DIGEST in jam-server/src/protocol.ts.
+ // Mirrors DEVICE_DIGEST in the jam-server repository's src/protocol.ts.
assertTrue(Regex("^[A-Za-z0-9_-]{16,64}$").matches(digest))
}
diff --git a/composeApp/src/jvmTest/kotlin/org/spotube/spotube/core/jam/JamRoomClientIntegrationTest.kt b/composeApp/src/jvmTest/kotlin/org/spotube/spotube/core/jam/JamRoomClientIntegrationTest.kt
index 90bdce47..32224f97 100644
--- a/composeApp/src/jvmTest/kotlin/org/spotube/spotube/core/jam/JamRoomClientIntegrationTest.kt
+++ b/composeApp/src/jvmTest/kotlin/org/spotube/spotube/core/jam/JamRoomClientIntegrationTest.kt
@@ -31,7 +31,7 @@ import kotlin.test.assertTrue
/**
* Runs the real client against a room server. Skipped unless `JAM_TEST_URL` is set:
- * `cd jam-server && npm run dev`, then `JAM_TEST_URL=http://127.0.0.1:8787 ./gradlew :composeApp:jvmTest`.
+ * run `npm run dev` in a checkout of https://github.com/team-spotube/jam-server, then `JAM_TEST_URL=http://127.0.0.1:8787 ./gradlew :composeApp:jvmTest`.
*/
class JamRoomClientIntegrationTest {
private val serverUrl: String? = System.getenv("JAM_TEST_URL")
diff --git a/jam-server/.gitignore b/jam-server/.gitignore
deleted file mode 100644
index a933f108..00000000
--- a/jam-server/.gitignore
+++ /dev/null
@@ -1,3 +0,0 @@
-node_modules/
-.wrangler/
-.dev.vars
diff --git a/jam-server/README.md b/jam-server/README.md
deleted file mode 100644
index cf7c020d..00000000
--- a/jam-server/README.md
+++ /dev/null
@@ -1,117 +0,0 @@
-# Spotube Jam server
-
-The room server behind Group Jam: a Cloudflare Worker with one
-[Durable Object](https://developers.cloudflare.com/durable-objects/) per room code.
-
-Each room relays a few small JSON frames between the host and its guests. Nobody streams
-audio through it (every device fetches its own), so a room costs a few KB per minute.
-
-Rooms are billed per incoming message (20 count as one request) and per storage write,
-so steady playback sends almost nothing:
-
-- The host sends a playback anchor only when playback changes (play/pause, seek, skip,
- speed), when its player drifts from its last anchor, and once a minute as a safety net.
- Guests extrapolate anchors with the shared clock in between.
-- Anchors are kept in memory, not storage. A room that hibernated wakes for a join, and
- the host answers the join with a fresh anchor. Only queue changes and membership
- bookkeeping are written.
-- Keep-alives (`"ping"` → `"pong"`) are answered by the runtime without waking the room.
- Clock pings go out on join and every 10 minutes.
-
-A four-person room sends roughly 200 messages an hour (about 10 billed requests).
-
-## What a room does
-
-- **Membership**: tracks who is connected, who hosts, and who is banned. If the host
- drops, it keeps hosting for 30 s (so it can reconnect, e.g. after switching networks), then the longest-connected guest
- takes over.
-- **Retained state**: keeps the host's latest queue (and, while awake, its playback
- anchor) so late joiners start in sync. An empty room keeps them for 10 minutes, then deletes itself.
-- **Routing**: guest commands (play/pause, skip, seek, suggestions) go to the host.
- Kicks and bans are enforced by the server.
-- **Clock**: answers pings with its own time. Every device syncs playback to this one
- clock (see `JamClock` in the app).
-
-The wire protocol is in [`src/protocol.ts`](src/protocol.ts). The app side is
-`composeApp/src/commonMain/kotlin/org/spotube/spotube/core/jam/`.
-
-## Security
-
-Anyone who knows a room code can join it, as with any party-code app. Everything else
-is enforced here, not in the app:
-
-- **Identity**: each install keeps a random secret, and its key for a room is derived
- from that secret and the room code. Everyone else only sees an id derived from the key
- (`participantId`, different in every room). Knowing someone's id, the host's included,
- doesn't let you connect as them, so nobody can take over hosting, kick people or replace
- someone's connection.
-- **Host powers**: only the current host can set the queue and anchor or kick and ban.
- Guests can only send commands, and those go to the host, which decides what to apply.
-- **Taking over rooms**: "create" only works on a fresh code, or for the room's own host
- bringing back a room that expired while everyone was offline.
-- **Abuse and cost**: connects are rate-limited per IP (60 a minute; also slows down code
- guessing). Each socket has a message budget and a queue budget (`FRAME_BUDGET`,
- `QUEUE_BUDGET`), and a client that floods is disconnected with `rate_limited`.
- Frames over 512 KB are refused, and names are cleaned of control characters.
-- **What the app does with peer data**: queue items and suggestions from other devices
- are cleaned before use (`JamMediaItem.sanitized`): streaming tracks only, no URLs, only
- https covers. The host credits suggestions to the sender the server reports, not to
- whatever name the sender claims. The host's local files go out as an opaque id, never
- as a path.
-- **Privacy**: participants never see each other's IP addresses, since everything goes
- through the room. The room keeps no history: the queue and bans are deleted 10 minutes
- after the last person leaves.
-
-Known limits:
-
-- **Bans**: a ban covers the identity (the same install gets the same identity in a
- room every time) and the device. The app sends a digest of stable device traits
- (model, OS version, locale, …) hashed with the room code. The server hashes that again
- with the network (IPv4 address or IPv6 /64), so the room only stores an opaque value
- that means nothing outside it. Someone who reinstalls and rejoins from the same device
- and network is refused. People who were already in the room aren't affected, so a
- friend on the same Wi-Fi with the same phone is never caught by someone else's ban.
- Ways around it: a different device or network, or a modified client. A new arrival
- with exactly the same phone, OS version and settings on the banned person's network
- would also be refused.
-- **Room codes**: six characters, about a billion codes. That's fine against guessing
- at the rate limit, but a code someone sees on your screen lets them in.
-- **Spending**: on the paid plan, a determined attacker with many IPs can still run up
- usage. Set a usage alert in the Cloudflare dashboard. The free plan just stops at its
- daily limit (00:00 UTC reset) instead of billing.
-
-## Develop
-
-```sh
-npm install
-npm run dev # http://127.0.0.1:8787
-npm test # smoke test against the dev server (another terminal)
-npm run typecheck
-```
-
-The app's end-to-end tests run against it too:
-
-```sh
-JAM_TEST_URL=http://127.0.0.1:8787 ./gradlew :composeApp:jvmTest --tests 'org.spotube.spotube.core.jam.*'
-```
-
-## Deploy
-
-```sh
-CLOUDFLARE_API_TOKEN=... CLOUDFLARE_ACCOUNT_ID=... npx wrangler deploy
-```
-
-The token needs the "Edit Cloudflare Workers" permissions. Durable Objects on the
-SQLite backend work on the free plan. `.github/workflows/jam-server-deploy.yml` deploys on
-pushes to `master` that touch this directory (secrets `CLOUDFLARE_API_TOKEN` and
-`CLOUDFLARE_ACCOUNT_ID`; optional variable `JAM_SERVER_URL` runs the smoke test after).
-
-## Self-host
-
-Deploy to your own Cloudflare account as above, then enter the Worker's URL in
-Spotube → Settings → Jam → Server URL.
-
-## Limits
-
-- 32 participants per room, 512 KB per frame.
-- 60 room connections per minute per IP (`CONNECT_LIMITER` in `wrangler.jsonc`).
diff --git a/jam-server/package-lock.json b/jam-server/package-lock.json
deleted file mode 100644
index a37d7265..00000000
--- a/jam-server/package-lock.json
+++ /dev/null
@@ -1,1606 +0,0 @@
-{
- "name": "spotube-jam-server",
- "lockfileVersion": 3,
- "requires": true,
- "packages": {
- "": {
- "name": "spotube-jam-server",
- "license": "AGPL-3.0-or-later",
- "devDependencies": {
- "typescript": "^5.9.3",
- "wrangler": "^4.156.0"
- }
- },
- "node_modules/@cloudflare/kv-asset-handler": {
- "version": "0.5.0",
- "resolved": "https://registry.npmjs.org/@cloudflare/kv-asset-handler/-/kv-asset-handler-0.5.0.tgz",
- "integrity": "sha512-jxQYkj8dSIzc0cD6cMMNdOc1UVjqSqu8BZdor5s8cGjW2I8BjODt/kWPVdY+u9zj3ms75Q5qaZgnxUad83+eAg==",
- "dev": true,
- "license": "MIT OR Apache-2.0",
- "engines": {
- "node": ">=22.0.0"
- }
- },
- "node_modules/@cloudflare/unenv-preset": {
- "version": "2.16.2",
- "resolved": "https://registry.npmjs.org/@cloudflare/unenv-preset/-/unenv-preset-2.16.2.tgz",
- "integrity": "sha512-JBP1+Z7ZSNG/d4mRP+y8VC5dka3tZVMLEZRvS+rzQ4DGV1EoxRFQckcJTTkXbHSQiTj0DtNI01Zwb/V2fX0mvQ==",
- "dev": true,
- "license": "MIT OR Apache-2.0",
- "peerDependencies": {
- "unenv": "2.0.0-rc.24",
- "workerd": ">1.20260305.0 <2.0.0-0"
- },
- "peerDependenciesMeta": {
- "workerd": {
- "optional": true
- }
- }
- },
- "node_modules/@cloudflare/workerd-darwin-64": {
- "version": "1.20261023.1",
- "resolved": "https://registry.npmjs.org/@cloudflare/workerd-darwin-64/-/workerd-darwin-64-1.20261023.1.tgz",
- "integrity": "sha512-lsEx0i7nR0PNG/erUFFHmQmiidEhLfDE5uQmAL9421/y4/ycuxDDOSaxu3VGGYFFPK5sduyUeMmjIlX4CwOBFg==",
- "cpu": [
- "x64"
- ],
- "dev": true,
- "license": "Apache-2.0",
- "optional": true,
- "os": [
- "darwin"
- ],
- "engines": {
- "node": ">=16"
- }
- },
- "node_modules/@cloudflare/workerd-darwin-arm64": {
- "version": "1.20261023.1",
- "resolved": "https://registry.npmjs.org/@cloudflare/workerd-darwin-arm64/-/workerd-darwin-arm64-1.20261023.1.tgz",
- "integrity": "sha512-5e79fHgabdDD8EgmjOhJ1S+xMsf6DbC7fL7IgTBizMnzOp0P2isDn7pYmUxI9AJZE9FVQ4RUilH/I36YNg+GQQ==",
- "cpu": [
- "arm64"
- ],
- "dev": true,
- "license": "Apache-2.0",
- "optional": true,
- "os": [
- "darwin"
- ],
- "engines": {
- "node": ">=16"
- }
- },
- "node_modules/@cloudflare/workerd-linux-64": {
- "version": "1.20261023.1",
- "resolved": "https://registry.npmjs.org/@cloudflare/workerd-linux-64/-/workerd-linux-64-1.20261023.1.tgz",
- "integrity": "sha512-VHQ6jKFSihjR2+x1buby8XTdBLLJztVnYiB7OLOTYO8aDXB+c1Rd2410PdgFuFYc4AgFEk6PCJLyCLL5L1KBnw==",
- "cpu": [
- "x64"
- ],
- "dev": true,
- "license": "Apache-2.0",
- "optional": true,
- "os": [
- "linux"
- ],
- "engines": {
- "node": ">=16"
- }
- },
- "node_modules/@cloudflare/workerd-linux-arm64": {
- "version": "1.20261023.1",
- "resolved": "https://registry.npmjs.org/@cloudflare/workerd-linux-arm64/-/workerd-linux-arm64-1.20261023.1.tgz",
- "integrity": "sha512-ilpRHzfDN8YFRM5CLRKuFw40x/LJBS89yVdhdQmxehlVDuBqjKpJB++zPFbTgKRRFaNupgnXc8RHktXAIhgCmQ==",
- "cpu": [
- "arm64"
- ],
- "dev": true,
- "license": "Apache-2.0",
- "optional": true,
- "os": [
- "linux"
- ],
- "engines": {
- "node": ">=16"
- }
- },
- "node_modules/@cloudflare/workerd-windows-64": {
- "version": "1.20261023.1",
- "resolved": "https://registry.npmjs.org/@cloudflare/workerd-windows-64/-/workerd-windows-64-1.20261023.1.tgz",
- "integrity": "sha512-279WLVjNsMycAwr0EZNiNEf0l2SY6NUtsN80NwZzbTHzakmiN+WSx4w38muxPm+PAU0oSPPAPXKVD+H6Hya8xw==",
- "cpu": [
- "x64"
- ],
- "dev": true,
- "license": "Apache-2.0",
- "optional": true,
- "os": [
- "win32"
- ],
- "engines": {
- "node": ">=16"
- }
- },
- "node_modules/@cspotcode/source-map-support": {
- "version": "0.8.1",
- "resolved": "https://registry.npmjs.org/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz",
- "integrity": "sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "@jridgewell/trace-mapping": "0.3.9"
- },
- "engines": {
- "node": ">=12"
- }
- },
- "node_modules/@emnapi/runtime": {
- "version": "1.11.3",
- "resolved": "https://registry.npmjs.org/@emnapi/runtime/-/runtime-1.11.3.tgz",
- "integrity": "sha512-Xz4Tpyki7XyrpbUK1jR1AhdAdaXyhhY4lZ3neLodmhpuWfy2PAQN5B46sAiU4liOXGLkHypn/qU+jvfWSCYYLA==",
- "dev": true,
- "license": "MIT",
- "optional": true,
- "dependencies": {
- "tslib": "^2.4.0"
- }
- },
- "node_modules/@esbuild/aix-ppc64": {
- "version": "0.28.2",
- "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.28.2.tgz",
- "integrity": "sha512-XExcO+dvLKvVtNTibSTBej1NCAbaGhWn9Ww1ZPx80qsahhPFe/8jgWP0IchNe0F3HwkU7n8ejhH8bjonqht8mQ==",
- "cpu": [
- "ppc64"
- ],
- "dev": true,
- "license": "MIT",
- "optional": true,
- "os": [
- "aix"
- ],
- "engines": {
- "node": ">=18"
- }
- },
- "node_modules/@esbuild/android-arm": {
- "version": "0.28.2",
- "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.28.2.tgz",
- "integrity": "sha512-kXXoiPVVGQcnIYGOeaovwOURpniDBpSq4A03qkQ+BMQqtGG6HYap3xne9C1O1yo4TR3qxlCX5IqqmX6fFo2Lqg==",
- "cpu": [
- "arm"
- ],
- "dev": true,
- "license": "MIT",
- "optional": true,
- "os": [
- "android"
- ],
- "engines": {
- "node": ">=18"
- }
- },
- "node_modules/@esbuild/android-arm64": {
- "version": "0.28.2",
- "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.28.2.tgz",
- "integrity": "sha512-5YfKeeI8qWfBZIX+u2xZC3Zlb3Os/gLS2sbEKM+I4ZOcsWmHS2WLysCcQZDAFRslDUU5Oiq44gf6PYN1vGwG5A==",
- "cpu": [
- "arm64"
- ],
- "dev": true,
- "license": "MIT",
- "optional": true,
- "os": [
- "android"
- ],
- "engines": {
- "node": ">=18"
- }
- },
- "node_modules/@esbuild/android-x64": {
- "version": "0.28.2",
- "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.28.2.tgz",
- "integrity": "sha512-O387ite7SzUyCcy3JQX4P4bLtEA7bLLkx+esve5JHnyYfNTxcVpXZo9jhdB0lTKN44gztELTdU7nS8Nr16Fs1Q==",
- "cpu": [
- "x64"
- ],
- "dev": true,
- "license": "MIT",
- "optional": true,
- "os": [
- "android"
- ],
- "engines": {
- "node": ">=18"
- }
- },
- "node_modules/@esbuild/darwin-arm64": {
- "version": "0.28.2",
- "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.28.2.tgz",
- "integrity": "sha512-n4KqkOQrraxHJcgjM1RvwbigfQKIKJVpM7xp+KsxiyUSrRdIXnt73VhrPAx0fV44hgfmIVKjxMN9J1t5jySVkw==",
- "cpu": [
- "arm64"
- ],
- "dev": true,
- "license": "MIT",
- "optional": true,
- "os": [
- "darwin"
- ],
- "engines": {
- "node": ">=18"
- }
- },
- "node_modules/@esbuild/darwin-x64": {
- "version": "0.28.2",
- "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.28.2.tgz",
- "integrity": "sha512-uq6suIWYP37qzGddBKPw5QEQPi6HiLGsO7UmkpfyaYNQ3D+rN6w6WfwH+nuqcGXWvawGwxOEroO4YGnFh95azw==",
- "cpu": [
- "x64"
- ],
- "dev": true,
- "license": "MIT",
- "optional": true,
- "os": [
- "darwin"
- ],
- "engines": {
- "node": ">=18"
- }
- },
- "node_modules/@esbuild/freebsd-arm64": {
- "version": "0.28.2",
- "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.28.2.tgz",
- "integrity": "sha512-n+I0BTSRIoy+d6RPKnEVwql5UwBJolytvY4mAOIEJorKlqgPII8ix6slVVrfZ5Tnj7glIZvloylbB/EJPMWEXw==",
- "cpu": [
- "arm64"
- ],
- "dev": true,
- "license": "MIT",
- "optional": true,
- "os": [
- "freebsd"
- ],
- "engines": {
- "node": ">=18"
- }
- },
- "node_modules/@esbuild/freebsd-x64": {
- "version": "0.28.2",
- "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.28.2.tgz",
- "integrity": "sha512-78XJTJkvPs0kz2w61301PJjXl4g7q3JqiYMZ/M/yVI73EHBrCRTgkhu9oqG7vPqq+a/yadEW8aD+agKlk5xrmg==",
- "cpu": [
- "x64"
- ],
- "dev": true,
- "license": "MIT",
- "optional": true,
- "os": [
- "freebsd"
- ],
- "engines": {
- "node": ">=18"
- }
- },
- "node_modules/@esbuild/linux-arm": {
- "version": "0.28.2",
- "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.28.2.tgz",
- "integrity": "sha512-XlDnu2q5yoqems+xay6wSAcg9DDD7K9RLKZEBOMZm3ckNpJBvOX20tSfby8KfrrhINDyv9V2YVZKY/SpoGJI8w==",
- "cpu": [
- "arm"
- ],
- "dev": true,
- "license": "MIT",
- "optional": true,
- "os": [
- "linux"
- ],
- "engines": {
- "node": ">=18"
- }
- },
- "node_modules/@esbuild/linux-arm64": {
- "version": "0.28.2",
- "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.28.2.tgz",
- "integrity": "sha512-pW4AC0P3it8c7do9MVM4p51FzHzdM/TZrerurgRcHJ2WTa1VQ1CIq18xncfpBJw4ojkiZZrKW2yIBWBP92j6Ug==",
- "cpu": [
- "arm64"
- ],
- "dev": true,
- "license": "MIT",
- "optional": true,
- "os": [
- "linux"
- ],
- "engines": {
- "node": ">=18"
- }
- },
- "node_modules/@esbuild/linux-ia32": {
- "version": "0.28.2",
- "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.28.2.tgz",
- "integrity": "sha512-CYbnj78HsIeA+DhgUKgFCfvNsTHFhMMrinUrMZpDXJXKN8T3XViTZ/+wtHeVxEWY8ewSzTFN+nRmSwO2tZaLUQ==",
- "cpu": [
- "ia32"
- ],
- "dev": true,
- "license": "MIT",
- "optional": true,
- "os": [
- "linux"
- ],
- "engines": {
- "node": ">=18"
- }
- },
- "node_modules/@esbuild/linux-loong64": {
- "version": "0.28.2",
- "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.28.2.tgz",
- "integrity": "sha512-buwkd8nsph4R+ajRvw0qM5Hja/TXQow3ptzWO2EbG/cqcIkHloRrdlBtQlshyYGTNFvfkfJ5tpPLVkY4DtsPfQ==",
- "cpu": [
- "loong64"
- ],
- "dev": true,
- "license": "MIT",
- "optional": true,
- "os": [
- "linux"
- ],
- "engines": {
- "node": ">=18"
- }
- },
- "node_modules/@esbuild/linux-mips64el": {
- "version": "0.28.2",
- "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.28.2.tgz",
- "integrity": "sha512-ZVykbDyk7519VwiNb9Lcj9m8XM6v5V9uKPvrEMkkEedVewf+0itkhahp4HDpgERXhwLRpWFypsGbG/J8s0QjJA==",
- "cpu": [
- "mips64el"
- ],
- "dev": true,
- "license": "MIT",
- "optional": true,
- "os": [
- "linux"
- ],
- "engines": {
- "node": ">=18"
- }
- },
- "node_modules/@esbuild/linux-ppc64": {
- "version": "0.28.2",
- "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.28.2.tgz",
- "integrity": "sha512-CAXl+Dtd9UUuJd8pKKdwh6MLm3MUMiqMPmhZ3tTSXPqfyQ3vDl6R5hZdZ/kYojK4ofXtdfSv1tFq8XzWx3heNQ==",
- "cpu": [
- "ppc64"
- ],
- "dev": true,
- "license": "MIT",
- "optional": true,
- "os": [
- "linux"
- ],
- "engines": {
- "node": ">=18"
- }
- },
- "node_modules/@esbuild/linux-riscv64": {
- "version": "0.28.2",
- "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.28.2.tgz",
- "integrity": "sha512-GeXCej4IQtU1B+QlDV8W/RRvbzI3O/Stss+/bCXv4lZls5WGRtu2a+3JkA3i4qIUlMXpcHebWpF8AkJhATowuA==",
- "cpu": [
- "riscv64"
- ],
- "dev": true,
- "license": "MIT",
- "optional": true,
- "os": [
- "linux"
- ],
- "engines": {
- "node": ">=18"
- }
- },
- "node_modules/@esbuild/linux-s390x": {
- "version": "0.28.2",
- "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.28.2.tgz",
- "integrity": "sha512-3H1weTYZPxt/WOhByszQZybS9w5lKzUn1FDMsgEChbHWQwHYQQRfBxgCcZvPhjHfKyJjIievvMmEUawJrdY9Dg==",
- "cpu": [
- "s390x"
- ],
- "dev": true,
- "license": "MIT",
- "optional": true,
- "os": [
- "linux"
- ],
- "engines": {
- "node": ">=18"
- }
- },
- "node_modules/@esbuild/linux-x64": {
- "version": "0.28.2",
- "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.28.2.tgz",
- "integrity": "sha512-4xTZr1FUmSoQW4XIWmit3tzQrUTZM+N3P0XV8xROKYF50XfI7xeO90+1bZvNwxIufQ9hDQVRJH5YhgPVF8A/HQ==",
- "cpu": [
- "x64"
- ],
- "dev": true,
- "license": "MIT",
- "optional": true,
- "os": [
- "linux"
- ],
- "engines": {
- "node": ">=18"
- }
- },
- "node_modules/@esbuild/netbsd-arm64": {
- "version": "0.28.2",
- "resolved": "https://registry.npmjs.org/@esbuild/netbsd-arm64/-/netbsd-arm64-0.28.2.tgz",
- "integrity": "sha512-sSATRjPeDBg3pdgHoQfoYBob11Kk1FGa9lui5RIHZCoCkJa9QKlvl3/vKz2usCmYYjs7ymJR/2Nnsqe+Hjt5nw==",
- "cpu": [
- "arm64"
- ],
- "dev": true,
- "license": "MIT",
- "optional": true,
- "os": [
- "netbsd"
- ],
- "engines": {
- "node": ">=18"
- }
- },
- "node_modules/@esbuild/netbsd-x64": {
- "version": "0.28.2",
- "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.28.2.tgz",
- "integrity": "sha512-lqnzCV+mM0gIADaKihiCg6ifgfU2L3h5E33rNQBN1Y4MaVGnzryzmvvf7UHxprpQdE8hpqLolJ9Rl+SkIRDpyw==",
- "cpu": [
- "x64"
- ],
- "dev": true,
- "license": "MIT",
- "optional": true,
- "os": [
- "netbsd"
- ],
- "engines": {
- "node": ">=18"
- }
- },
- "node_modules/@esbuild/openbsd-arm64": {
- "version": "0.28.2",
- "resolved": "https://registry.npmjs.org/@esbuild/openbsd-arm64/-/openbsd-arm64-0.28.2.tgz",
- "integrity": "sha512-AL2qJILH7lNjrDmCQDvdxMfAUIv8KMNZOvrwAQ8i8//ntL9FflhOyMJ8OZSMBb8/AWXe3/5v5S20y3zCoZWKoQ==",
- "cpu": [
- "arm64"
- ],
- "dev": true,
- "license": "MIT",
- "optional": true,
- "os": [
- "openbsd"
- ],
- "engines": {
- "node": ">=18"
- }
- },
- "node_modules/@esbuild/openbsd-x64": {
- "version": "0.28.2",
- "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.28.2.tgz",
- "integrity": "sha512-QtiuPytchRyC4rwUKhexJdQKvDuZ6hWloi3igqPQNUJCS1/v9EiO3UTOXR6A3FoMo4fnAKbWJdqaIwhOzh8qEw==",
- "cpu": [
- "x64"
- ],
- "dev": true,
- "license": "MIT",
- "optional": true,
- "os": [
- "openbsd"
- ],
- "engines": {
- "node": ">=18"
- }
- },
- "node_modules/@esbuild/openharmony-arm64": {
- "version": "0.28.2",
- "resolved": "https://registry.npmjs.org/@esbuild/openharmony-arm64/-/openharmony-arm64-0.28.2.tgz",
- "integrity": "sha512-WkhYDmpTjLvGlScA1rwjRUmhl4k8oXR3cIbtqWmELgU/dFeHHlEllxDvdWcNJV9rbzCexB5vz8gtNewWLgCT7Q==",
- "cpu": [
- "arm64"
- ],
- "dev": true,
- "license": "MIT",
- "optional": true,
- "os": [
- "openharmony"
- ],
- "engines": {
- "node": ">=18"
- }
- },
- "node_modules/@esbuild/sunos-x64": {
- "version": "0.28.2",
- "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.28.2.tgz",
- "integrity": "sha512-GPMSkTOtMnv2U2F8gxe4Io6qmVs+YKyp832Etqqxr0hFngmXQ3rzwytelm3GIn7T4VviRUlf3sOgBOiTdvaf7g==",
- "cpu": [
- "x64"
- ],
- "dev": true,
- "license": "MIT",
- "optional": true,
- "os": [
- "sunos"
- ],
- "engines": {
- "node": ">=18"
- }
- },
- "node_modules/@esbuild/win32-arm64": {
- "version": "0.28.2",
- "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.28.2.tgz",
- "integrity": "sha512-PIhhEkE9uPBleRBrQEJpUn7MBnibZzbGzYWPmY3x+YoVg/95zbjB4CxPPOQ8l5tYYM4mMaCthF8/1DIfBQQyWQ==",
- "cpu": [
- "arm64"
- ],
- "dev": true,
- "license": "MIT",
- "optional": true,
- "os": [
- "win32"
- ],
- "engines": {
- "node": ">=18"
- }
- },
- "node_modules/@esbuild/win32-ia32": {
- "version": "0.28.2",
- "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.28.2.tgz",
- "integrity": "sha512-YmJbfTlvU7Sdn9BB+4PRES4oB6pxgS37MAONj+hBr/cpXS1aBPKXxNnDbu+QCWPj0o9dgyxeq79g6c5P8KeuYA==",
- "cpu": [
- "ia32"
- ],
- "dev": true,
- "license": "MIT",
- "optional": true,
- "os": [
- "win32"
- ],
- "engines": {
- "node": ">=18"
- }
- },
- "node_modules/@esbuild/win32-x64": {
- "version": "0.28.2",
- "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.28.2.tgz",
- "integrity": "sha512-5ebpxr3nWMzrL/rnUI755Jkuee0bHL/Gq0WTF9lvcpv73wAp5eu8MfBUgWK9bhWvZjj7yX8etf/8tI8Ney695g==",
- "cpu": [
- "x64"
- ],
- "dev": true,
- "license": "MIT",
- "optional": true,
- "os": [
- "win32"
- ],
- "engines": {
- "node": ">=18"
- }
- },
- "node_modules/@img/colour": {
- "version": "1.1.0",
- "resolved": "https://registry.npmjs.org/@img/colour/-/colour-1.1.0.tgz",
- "integrity": "sha512-Td76q7j57o/tLVdgS746cYARfSyxk8iEfRxewL9h4OMzYhbW4TAcppl0mT4eyqXddh6L/jwoM75mo7ixa/pCeQ==",
- "dev": true,
- "license": "MIT",
- "engines": {
- "node": ">=18"
- }
- },
- "node_modules/@img/sharp-darwin-arm64": {
- "version": "0.35.5",
- "resolved": "https://registry.npmjs.org/@img/sharp-darwin-arm64/-/sharp-darwin-arm64-0.35.5.tgz",
- "integrity": "sha512-QRUlFQ0WxvdWyqqG/WtI3iupfD5rBzmCHXSdPsY91sAtVtTo7Q4cb6zOccZ3gqEqkr0f1As1ehLqmEpDsRf+lg==",
- "cpu": [
- "arm64"
- ],
- "dev": true,
- "license": "Apache-2.0",
- "optional": true,
- "os": [
- "darwin"
- ],
- "engines": {
- "node": ">=20.9.0"
- },
- "funding": {
- "url": "https://opencollective.com/libvips"
- },
- "optionalDependencies": {
- "@img/sharp-libvips-darwin-arm64": "1.3.4"
- }
- },
- "node_modules/@img/sharp-darwin-x64": {
- "version": "0.35.5",
- "resolved": "https://registry.npmjs.org/@img/sharp-darwin-x64/-/sharp-darwin-x64-0.35.5.tgz",
- "integrity": "sha512-+BR255RhDlpygUpOc/Jdt1nT6DQ3XG/ERo5wbcdOf5Q320dKtPCKPLR1LJs9VGXRaMa8l1uUa0tkCNOXiAxZUw==",
- "cpu": [
- "x64"
- ],
- "dev": true,
- "license": "Apache-2.0",
- "optional": true,
- "os": [
- "darwin"
- ],
- "engines": {
- "node": ">=20.9.0"
- },
- "funding": {
- "url": "https://opencollective.com/libvips"
- },
- "optionalDependencies": {
- "@img/sharp-libvips-darwin-x64": "1.3.4"
- }
- },
- "node_modules/@img/sharp-freebsd-wasm32": {
- "version": "0.35.5",
- "resolved": "https://registry.npmjs.org/@img/sharp-freebsd-wasm32/-/sharp-freebsd-wasm32-0.35.5.tgz",
- "integrity": "sha512-Y/z91nEZ4uIBX5X3nfTovjU9lHNKFYbL2lpHCLVNmXQK03VIZvXBBt0KxbPGp2SdGSF+2mQU4e+hQaWOt86iAw==",
- "dev": true,
- "license": "Apache-2.0",
- "optional": true,
- "os": [
- "freebsd"
- ],
- "dependencies": {
- "@img/sharp-wasm32": "0.35.5"
- },
- "engines": {
- "node": ">=20.9.0"
- },
- "funding": {
- "url": "https://opencollective.com/libvips"
- }
- },
- "node_modules/@img/sharp-libvips-darwin-arm64": {
- "version": "1.3.4",
- "resolved": "https://registry.npmjs.org/@img/sharp-libvips-darwin-arm64/-/sharp-libvips-darwin-arm64-1.3.4.tgz",
- "integrity": "sha512-5R89nBYiRdUlSWJxPhO+GVtaXzXSxKnRu/xqMn3KTA3L9EB9Oy/P+Nn2f2vlhPuUdy/Zusb2DarbyTpGCfEDuw==",
- "cpu": [
- "arm64"
- ],
- "dev": true,
- "license": "LGPL-3.0-or-later",
- "optional": true,
- "os": [
- "darwin"
- ],
- "funding": {
- "url": "https://opencollective.com/libvips"
- }
- },
- "node_modules/@img/sharp-libvips-darwin-x64": {
- "version": "1.3.4",
- "resolved": "https://registry.npmjs.org/@img/sharp-libvips-darwin-x64/-/sharp-libvips-darwin-x64-1.3.4.tgz",
- "integrity": "sha512-iR2OKH80yi0U+dUplyh3/xdpFvps6YkCwsXenIJxqxR1v9o+xtKTGbS9H7cps+2Vxjc8B1j96p75NmTGjIhtpQ==",
- "cpu": [
- "x64"
- ],
- "dev": true,
- "license": "LGPL-3.0-or-later",
- "optional": true,
- "os": [
- "darwin"
- ],
- "funding": {
- "url": "https://opencollective.com/libvips"
- }
- },
- "node_modules/@img/sharp-libvips-linux-arm": {
- "version": "1.3.4",
- "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linux-arm/-/sharp-libvips-linux-arm-1.3.4.tgz",
- "integrity": "sha512-LmRtTsOHuvM2+wlO2Db37dx5MiZhB0FvSunciw48YjdOkZz9KAiRbm8ujeMOA1INqmei5NapFxYEK1D1ZSidmw==",
- "cpu": [
- "arm"
- ],
- "dev": true,
- "libc": [
- "glibc"
- ],
- "license": "LGPL-3.0-or-later",
- "optional": true,
- "os": [
- "linux"
- ],
- "funding": {
- "url": "https://opencollective.com/libvips"
- }
- },
- "node_modules/@img/sharp-libvips-linux-arm64": {
- "version": "1.3.4",
- "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linux-arm64/-/sharp-libvips-linux-arm64-1.3.4.tgz",
- "integrity": "sha512-Y3dgX/6lE2QhQb+Gxy0WZxfg9MEm/JBjamZpS2IklP7xIQoKN4hzAm7KcMVGtaVDt3neE9OKBC7vAfonA/Lr1A==",
- "cpu": [
- "arm64"
- ],
- "dev": true,
- "libc": [
- "glibc"
- ],
- "license": "LGPL-3.0-or-later",
- "optional": true,
- "os": [
- "linux"
- ],
- "funding": {
- "url": "https://opencollective.com/libvips"
- }
- },
- "node_modules/@img/sharp-libvips-linux-ppc64": {
- "version": "1.3.4",
- "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linux-ppc64/-/sharp-libvips-linux-ppc64-1.3.4.tgz",
- "integrity": "sha512-Le6boB8Tai0Nis+gIxIpKx68UDVVIqdR8Tin5Yf1z2LJJQLDJvCDRqRu+jC2qCoD+eIomonmOwB4smBRxfVpYQ==",
- "cpu": [
- "ppc64"
- ],
- "dev": true,
- "libc": [
- "glibc"
- ],
- "license": "LGPL-3.0-or-later",
- "optional": true,
- "os": [
- "linux"
- ],
- "funding": {
- "url": "https://opencollective.com/libvips"
- }
- },
- "node_modules/@img/sharp-libvips-linux-riscv64": {
- "version": "1.3.4",
- "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linux-riscv64/-/sharp-libvips-linux-riscv64-1.3.4.tgz",
- "integrity": "sha512-aHkkIEHPRdQEegJN20MLmGtxYD9R2wQr3Cwpddnu5+YKMt6Uzax7S9h5gpZTo8wyrGuZSlfQ63OevL5mTyOC7Q==",
- "cpu": [
- "riscv64"
- ],
- "dev": true,
- "libc": [
- "glibc"
- ],
- "license": "LGPL-3.0-or-later",
- "optional": true,
- "os": [
- "linux"
- ],
- "funding": {
- "url": "https://opencollective.com/libvips"
- }
- },
- "node_modules/@img/sharp-libvips-linux-s390x": {
- "version": "1.3.4",
- "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linux-s390x/-/sharp-libvips-linux-s390x-1.3.4.tgz",
- "integrity": "sha512-ra/mB6MikESDUO7Yg+Mi95bFBb9GsObURuhnOv3OqknjGe9sZrG8tCe9q0xSIGrtLgvgw0gKnFWcK4blSgQOuQ==",
- "cpu": [
- "s390x"
- ],
- "dev": true,
- "libc": [
- "glibc"
- ],
- "license": "LGPL-3.0-or-later",
- "optional": true,
- "os": [
- "linux"
- ],
- "funding": {
- "url": "https://opencollective.com/libvips"
- }
- },
- "node_modules/@img/sharp-libvips-linux-x64": {
- "version": "1.3.4",
- "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linux-x64/-/sharp-libvips-linux-x64-1.3.4.tgz",
- "integrity": "sha512-GJ//SSXbnwSDes02umB3nDJLFcQzw8a18V8fyhqr6tV515tOEMdImjjxj1AoafMRz56F3PHgftnj1QEKSU1zkw==",
- "cpu": [
- "x64"
- ],
- "dev": true,
- "libc": [
- "glibc"
- ],
- "license": "LGPL-3.0-or-later",
- "optional": true,
- "os": [
- "linux"
- ],
- "funding": {
- "url": "https://opencollective.com/libvips"
- }
- },
- "node_modules/@img/sharp-libvips-linuxmusl-arm64": {
- "version": "1.3.4",
- "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linuxmusl-arm64/-/sharp-libvips-linuxmusl-arm64-1.3.4.tgz",
- "integrity": "sha512-hvulFwtjUcagsis6BBxHwGFwWoNZjgYmULGVrZcyfNbjA8hKILbRxGg15/7w5HDyXHXUos/j6baAWqnCyQ2DWA==",
- "cpu": [
- "arm64"
- ],
- "dev": true,
- "libc": [
- "musl"
- ],
- "license": "LGPL-3.0-or-later",
- "optional": true,
- "os": [
- "linux"
- ],
- "funding": {
- "url": "https://opencollective.com/libvips"
- }
- },
- "node_modules/@img/sharp-libvips-linuxmusl-x64": {
- "version": "1.3.4",
- "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linuxmusl-x64/-/sharp-libvips-linuxmusl-x64-1.3.4.tgz",
- "integrity": "sha512-6zXKeE/p39I1AmA3cJG35eyBGNqNddLnUXjhwBnsGjFPWqf5VKkDBEqaEkPDoTEtkxwi2vv8Tcr2mDyP4So7Fg==",
- "cpu": [
- "x64"
- ],
- "dev": true,
- "libc": [
- "musl"
- ],
- "license": "LGPL-3.0-or-later",
- "optional": true,
- "os": [
- "linux"
- ],
- "funding": {
- "url": "https://opencollective.com/libvips"
- }
- },
- "node_modules/@img/sharp-linux-arm": {
- "version": "0.35.5",
- "resolved": "https://registry.npmjs.org/@img/sharp-linux-arm/-/sharp-linux-arm-0.35.5.tgz",
- "integrity": "sha512-LEaXK2WdXVK5ykcw0buWyPMsmLLL2vpHLD6yrNSW+JGEL3BZPA4tpKN6iaMc4AxTTAoaX/sU1rOL51lcIz48ZQ==",
- "cpu": [
- "arm"
- ],
- "dev": true,
- "libc": [
- "glibc"
- ],
- "license": "Apache-2.0",
- "optional": true,
- "os": [
- "linux"
- ],
- "engines": {
- "node": ">=20.9.0"
- },
- "funding": {
- "url": "https://opencollective.com/libvips"
- },
- "optionalDependencies": {
- "@img/sharp-libvips-linux-arm": "1.3.4"
- }
- },
- "node_modules/@img/sharp-linux-arm64": {
- "version": "0.35.5",
- "resolved": "https://registry.npmjs.org/@img/sharp-linux-arm64/-/sharp-linux-arm64-0.35.5.tgz",
- "integrity": "sha512-LYVx5JTsOM2CBzmxreh+nl64/3H6Xb09iSLknqH47z2T2DFFxDeFLP5y4dJwe6H7uGQlHPyEEtIqyo3DYsRwdQ==",
- "cpu": [
- "arm64"
- ],
- "dev": true,
- "libc": [
- "glibc"
- ],
- "license": "Apache-2.0",
- "optional": true,
- "os": [
- "linux"
- ],
- "engines": {
- "node": ">=20.9.0"
- },
- "funding": {
- "url": "https://opencollective.com/libvips"
- },
- "optionalDependencies": {
- "@img/sharp-libvips-linux-arm64": "1.3.4"
- }
- },
- "node_modules/@img/sharp-linux-ppc64": {
- "version": "0.35.5",
- "resolved": "https://registry.npmjs.org/@img/sharp-linux-ppc64/-/sharp-linux-ppc64-0.35.5.tgz",
- "integrity": "sha512-QVxAAq8evVRI9ia2vqgwrmWucn5Dfv+JdWzj75pD8omHLPSP7f8p20O8jxzjCcuCEQEOtYOZUmX1hkiZ0kdevA==",
- "cpu": [
- "ppc64"
- ],
- "dev": true,
- "libc": [
- "glibc"
- ],
- "license": "Apache-2.0",
- "optional": true,
- "os": [
- "linux"
- ],
- "engines": {
- "node": ">=20.9.0"
- },
- "funding": {
- "url": "https://opencollective.com/libvips"
- },
- "optionalDependencies": {
- "@img/sharp-libvips-linux-ppc64": "1.3.4"
- }
- },
- "node_modules/@img/sharp-linux-riscv64": {
- "version": "0.35.5",
- "resolved": "https://registry.npmjs.org/@img/sharp-linux-riscv64/-/sharp-linux-riscv64-0.35.5.tgz",
- "integrity": "sha512-LtdreXguaavKODPIfzJ4kffx7UNt1omwtK0rch4EBbbSTXPnxWmYSayXdLJw0fJzQ97kHt1gL/yh4tvU+nCyRQ==",
- "cpu": [
- "riscv64"
- ],
- "dev": true,
- "libc": [
- "glibc"
- ],
- "license": "Apache-2.0",
- "optional": true,
- "os": [
- "linux"
- ],
- "engines": {
- "node": ">=20.9.0"
- },
- "funding": {
- "url": "https://opencollective.com/libvips"
- },
- "optionalDependencies": {
- "@img/sharp-libvips-linux-riscv64": "1.3.4"
- }
- },
- "node_modules/@img/sharp-linux-s390x": {
- "version": "0.35.5",
- "resolved": "https://registry.npmjs.org/@img/sharp-linux-s390x/-/sharp-linux-s390x-0.35.5.tgz",
- "integrity": "sha512-UZasTOFiYzotTsGOCu42BfUzP6Tu6Do/947iRm1RsLKvlllxwGcn4RN27LibGWceix4Y+Pmw3jsnTcCQIgWjqA==",
- "cpu": [
- "s390x"
- ],
- "dev": true,
- "libc": [
- "glibc"
- ],
- "license": "Apache-2.0",
- "optional": true,
- "os": [
- "linux"
- ],
- "engines": {
- "node": ">=20.9.0"
- },
- "funding": {
- "url": "https://opencollective.com/libvips"
- },
- "optionalDependencies": {
- "@img/sharp-libvips-linux-s390x": "1.3.4"
- }
- },
- "node_modules/@img/sharp-linux-x64": {
- "version": "0.35.5",
- "resolved": "https://registry.npmjs.org/@img/sharp-linux-x64/-/sharp-linux-x64-0.35.5.tgz",
- "integrity": "sha512-SxFtLTeJInhAA9Q836kux2vZNeOBQEx658qvbboZScr0wIARym3IcGmW7KpVD5sbVg0Ojy+udFQdayYIZyoNog==",
- "cpu": [
- "x64"
- ],
- "dev": true,
- "libc": [
- "glibc"
- ],
- "license": "Apache-2.0",
- "optional": true,
- "os": [
- "linux"
- ],
- "engines": {
- "node": ">=20.9.0"
- },
- "funding": {
- "url": "https://opencollective.com/libvips"
- },
- "optionalDependencies": {
- "@img/sharp-libvips-linux-x64": "1.3.4"
- }
- },
- "node_modules/@img/sharp-linuxmusl-arm64": {
- "version": "0.35.5",
- "resolved": "https://registry.npmjs.org/@img/sharp-linuxmusl-arm64/-/sharp-linuxmusl-arm64-0.35.5.tgz",
- "integrity": "sha512-9HbMclmI1zlNkFRs3z9/eBtDjfD0sGlrX1z6b1qwmiFY5ElDLh4BC0LPBdVp7z1DXFiKlIcznf+ZlsuZzLxQqg==",
- "cpu": [
- "arm64"
- ],
- "dev": true,
- "libc": [
- "musl"
- ],
- "license": "Apache-2.0",
- "optional": true,
- "os": [
- "linux"
- ],
- "engines": {
- "node": ">=20.9.0"
- },
- "funding": {
- "url": "https://opencollective.com/libvips"
- },
- "optionalDependencies": {
- "@img/sharp-libvips-linuxmusl-arm64": "1.3.4"
- }
- },
- "node_modules/@img/sharp-linuxmusl-x64": {
- "version": "0.35.5",
- "resolved": "https://registry.npmjs.org/@img/sharp-linuxmusl-x64/-/sharp-linuxmusl-x64-0.35.5.tgz",
- "integrity": "sha512-4KOphqB035HrVdqLZfCgMzzERrQkkzOwRhl4OAkRO1YCldbaFjySXMaK534Mo0V+LndnlJk+sbUyLeU0ULyD1A==",
- "cpu": [
- "x64"
- ],
- "dev": true,
- "libc": [
- "musl"
- ],
- "license": "Apache-2.0",
- "optional": true,
- "os": [
- "linux"
- ],
- "engines": {
- "node": ">=20.9.0"
- },
- "funding": {
- "url": "https://opencollective.com/libvips"
- },
- "optionalDependencies": {
- "@img/sharp-libvips-linuxmusl-x64": "1.3.4"
- }
- },
- "node_modules/@img/sharp-wasm32": {
- "version": "0.35.5",
- "resolved": "https://registry.npmjs.org/@img/sharp-wasm32/-/sharp-wasm32-0.35.5.tgz",
- "integrity": "sha512-Ptsga1su4tQx+LLF1ECS9U6nz5kmrXKo6XVbtR48Ke3ZRxxgaWBu7IDtEe1quo8hiupwm6WFqxVlXaSf7IINGQ==",
- "dev": true,
- "license": "Apache-2.0 AND LGPL-3.0-or-later AND MIT",
- "optional": true,
- "dependencies": {
- "@emnapi/runtime": "^1.11.3"
- },
- "engines": {
- "node": ">=20.9.0"
- },
- "funding": {
- "url": "https://opencollective.com/libvips"
- }
- },
- "node_modules/@img/sharp-webcontainers-wasm32": {
- "version": "0.35.5",
- "resolved": "https://registry.npmjs.org/@img/sharp-webcontainers-wasm32/-/sharp-webcontainers-wasm32-0.35.5.tgz",
- "integrity": "sha512-hfhF/FmoQyTUkA0bIKFOtw536BQSeBMe6BF6QyWlrPxT754+TFLaZ7sKKTfvvM0yJgKgaYTwnFCIZ/GuDw5SUA==",
- "cpu": [
- "wasm32"
- ],
- "dev": true,
- "license": "Apache-2.0",
- "optional": true,
- "dependencies": {
- "@img/sharp-wasm32": "0.35.5"
- },
- "engines": {
- "node": ">=20.9.0"
- },
- "funding": {
- "url": "https://opencollective.com/libvips"
- }
- },
- "node_modules/@img/sharp-win32-arm64": {
- "version": "0.35.5",
- "resolved": "https://registry.npmjs.org/@img/sharp-win32-arm64/-/sharp-win32-arm64-0.35.5.tgz",
- "integrity": "sha512-X4t7g+7ZA5DKblCBEXGjUqqemj4vczING/5viFwAL8h4N3qYeyjwdCvRLHi4EdOUI+2Z7UFlp1VM+p/AuEtm6Q==",
- "cpu": [
- "arm64"
- ],
- "dev": true,
- "license": "Apache-2.0 AND LGPL-3.0-or-later",
- "optional": true,
- "os": [
- "win32"
- ],
- "engines": {
- "node": ">=20.9.0"
- },
- "funding": {
- "url": "https://opencollective.com/libvips"
- }
- },
- "node_modules/@img/sharp-win32-ia32": {
- "version": "0.35.5",
- "resolved": "https://registry.npmjs.org/@img/sharp-win32-ia32/-/sharp-win32-ia32-0.35.5.tgz",
- "integrity": "sha512-5Zm82LoBc43nhwNybZlG7Y1KO//Zhsn306fQl29ZOuStHLGTo3BWL83q3cznX0poxSAMuYL1On/BHBxkBeKr6A==",
- "cpu": [
- "ia32"
- ],
- "dev": true,
- "license": "Apache-2.0 AND LGPL-3.0-or-later",
- "optional": true,
- "os": [
- "win32"
- ],
- "engines": {
- "node": "^20.9.0"
- },
- "funding": {
- "url": "https://opencollective.com/libvips"
- }
- },
- "node_modules/@img/sharp-win32-x64": {
- "version": "0.35.5",
- "resolved": "https://registry.npmjs.org/@img/sharp-win32-x64/-/sharp-win32-x64-0.35.5.tgz",
- "integrity": "sha512-x76eH0vEiHlcMQu8Y8IenntaACtddpT6W0wmXtWrnKcnKI7ME5DdgqhAD6SEWOEl1v2zDvkZDhFA9KnURwpfqg==",
- "cpu": [
- "x64"
- ],
- "dev": true,
- "license": "Apache-2.0 AND LGPL-3.0-or-later",
- "optional": true,
- "os": [
- "win32"
- ],
- "engines": {
- "node": ">=20.9.0"
- },
- "funding": {
- "url": "https://opencollective.com/libvips"
- }
- },
- "node_modules/@jridgewell/resolve-uri": {
- "version": "3.1.2",
- "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz",
- "integrity": "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==",
- "dev": true,
- "license": "MIT",
- "engines": {
- "node": ">=6.0.0"
- }
- },
- "node_modules/@jridgewell/sourcemap-codec": {
- "version": "1.6.0",
- "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.6.0.tgz",
- "integrity": "sha512-T7jf+5zgsZHwNJ4lvQ7/aezbyk0nNX+zJVWpmHA7VYsEx7a7qr5Rg5IbtJFqkgze5Y2sruq1RUY8Q837Od7iFw==",
- "dev": true,
- "license": "MIT"
- },
- "node_modules/@jridgewell/trace-mapping": {
- "version": "0.3.9",
- "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz",
- "integrity": "sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "@jridgewell/resolve-uri": "^3.0.3",
- "@jridgewell/sourcemap-codec": "^1.4.10"
- }
- },
- "node_modules/@poppinss/colors": {
- "version": "4.1.6",
- "resolved": "https://registry.npmjs.org/@poppinss/colors/-/colors-4.1.6.tgz",
- "integrity": "sha512-H9xkIdFswbS8n1d6vmRd8+c10t2Qe+rZITbbDHHkQixH5+2x1FDGmi/0K+WgWiqQFKPSlIYB7jlH6Kpfn6Fleg==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "kleur": "^4.1.5"
- }
- },
- "node_modules/@poppinss/dumper": {
- "version": "0.6.5",
- "resolved": "https://registry.npmjs.org/@poppinss/dumper/-/dumper-0.6.5.tgz",
- "integrity": "sha512-NBdYIb90J7LfOI32dOewKI1r7wnkiH6m920puQ3qHUeZkxNkQiFnXVWoE6YtFSv6QOiPPf7ys6i+HWWecDz7sw==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "@poppinss/colors": "^4.1.5",
- "@sindresorhus/is": "^7.0.2",
- "supports-color": "^10.0.0"
- }
- },
- "node_modules/@poppinss/exception": {
- "version": "1.2.3",
- "resolved": "https://registry.npmjs.org/@poppinss/exception/-/exception-1.2.3.tgz",
- "integrity": "sha512-dCED+QRChTVatE9ibtoaxc+WkdzOSjYTKi/+uacHWIsfodVfpsueo3+DKpgU5Px8qXjgmXkSvhXvSCz3fnP9lw==",
- "dev": true,
- "license": "MIT"
- },
- "node_modules/@sindresorhus/is": {
- "version": "7.2.0",
- "resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-7.2.0.tgz",
- "integrity": "sha512-P1Cz1dWaFfR4IR+U13mqqiGsLFf1KbayybWwdd2vfctdV6hDpUkgCY0nKOLLTMSoRd/jJNjtbqzf13K8DCCXQw==",
- "dev": true,
- "license": "MIT",
- "engines": {
- "node": ">=18"
- },
- "funding": {
- "url": "https://github.com/sindresorhus/is?sponsor=1"
- }
- },
- "node_modules/@speed-highlight/core": {
- "version": "1.2.24",
- "resolved": "https://registry.npmjs.org/@speed-highlight/core/-/core-1.2.24.tgz",
- "integrity": "sha512-qeW2e1l78afw8VhRPfPQ1Gjj+KU5XFQ/OFV5ti6eTa9bruO7mJyZtA4vw0ofqmA3tKCkROE9xLk3VZoeRc98nw==",
- "dev": true,
- "license": "CC0-1.0"
- },
- "node_modules/blake3-wasm": {
- "version": "2.1.5",
- "resolved": "https://registry.npmjs.org/blake3-wasm/-/blake3-wasm-2.1.5.tgz",
- "integrity": "sha512-F1+K8EbfOZE49dtoPtmxUQrpXaBIl3ICvasLh+nJta0xkz+9kF/7uet9fLnwKqhDrmj6g+6K3Tw9yQPUg2ka5g==",
- "dev": true,
- "license": "MIT"
- },
- "node_modules/cookie": {
- "version": "1.1.1",
- "resolved": "https://registry.npmjs.org/cookie/-/cookie-1.1.1.tgz",
- "integrity": "sha512-ei8Aos7ja0weRpFzJnEA9UHJ/7XQmqglbRwnf2ATjcB9Wq874VKH9kfjjirM6UhU2/E5fFYadylyhFldcqSidQ==",
- "dev": true,
- "license": "MIT",
- "engines": {
- "node": ">=18"
- },
- "funding": {
- "type": "opencollective",
- "url": "https://opencollective.com/express"
- }
- },
- "node_modules/detect-libc": {
- "version": "2.1.2",
- "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.1.2.tgz",
- "integrity": "sha512-Btj2BOOO83o3WyH59e8MgXsxEQVcarkUOpEYrubB0urwnN10yQ364rsiByU11nZlqWYZm05i/of7io4mzihBtQ==",
- "dev": true,
- "license": "Apache-2.0",
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/error-stack-parser-es": {
- "version": "1.0.5",
- "resolved": "https://registry.npmjs.org/error-stack-parser-es/-/error-stack-parser-es-1.0.5.tgz",
- "integrity": "sha512-5qucVt2XcuGMcEGgWI7i+yZpmpByQ8J1lHhcL7PwqCwu9FPP3VUXzT4ltHe5i2z9dePwEHcDVOAfSnHsOlCXRA==",
- "dev": true,
- "license": "MIT",
- "funding": {
- "url": "https://github.com/sponsors/antfu"
- }
- },
- "node_modules/esbuild": {
- "version": "0.28.2",
- "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.28.2.tgz",
- "integrity": "sha512-HKVLS8dvII+xoKW9kmqxbRKrnWEXfJJr/FZhhJmiqIB0e053QNYFqOBouTMO/k5sID4MvCiUCvv8b9M4h32wIA==",
- "dev": true,
- "hasInstallScript": true,
- "license": "MIT",
- "bin": {
- "esbuild": "bin/esbuild"
- },
- "engines": {
- "node": ">=18"
- },
- "optionalDependencies": {
- "@esbuild/aix-ppc64": "0.28.2",
- "@esbuild/android-arm": "0.28.2",
- "@esbuild/android-arm64": "0.28.2",
- "@esbuild/android-x64": "0.28.2",
- "@esbuild/darwin-arm64": "0.28.2",
- "@esbuild/darwin-x64": "0.28.2",
- "@esbuild/freebsd-arm64": "0.28.2",
- "@esbuild/freebsd-x64": "0.28.2",
- "@esbuild/linux-arm": "0.28.2",
- "@esbuild/linux-arm64": "0.28.2",
- "@esbuild/linux-ia32": "0.28.2",
- "@esbuild/linux-loong64": "0.28.2",
- "@esbuild/linux-mips64el": "0.28.2",
- "@esbuild/linux-ppc64": "0.28.2",
- "@esbuild/linux-riscv64": "0.28.2",
- "@esbuild/linux-s390x": "0.28.2",
- "@esbuild/linux-x64": "0.28.2",
- "@esbuild/netbsd-arm64": "0.28.2",
- "@esbuild/netbsd-x64": "0.28.2",
- "@esbuild/openbsd-arm64": "0.28.2",
- "@esbuild/openbsd-x64": "0.28.2",
- "@esbuild/openharmony-arm64": "0.28.2",
- "@esbuild/sunos-x64": "0.28.2",
- "@esbuild/win32-arm64": "0.28.2",
- "@esbuild/win32-ia32": "0.28.2",
- "@esbuild/win32-x64": "0.28.2"
- }
- },
- "node_modules/fsevents": {
- "version": "2.3.3",
- "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz",
- "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==",
- "dev": true,
- "hasInstallScript": true,
- "license": "MIT",
- "optional": true,
- "os": [
- "darwin"
- ],
- "engines": {
- "node": "^8.16.0 || ^10.6.0 || >=11.0.0"
- }
- },
- "node_modules/kleur": {
- "version": "4.1.5",
- "resolved": "https://registry.npmjs.org/kleur/-/kleur-4.1.5.tgz",
- "integrity": "sha512-o+NO+8WrRiQEE4/7nwRJhN1HWpVmJm511pBHUxPLtp0BUISzlBplORYSmTclCnJvQq2tKu/sgl3xVpkc7ZWuQQ==",
- "dev": true,
- "license": "MIT",
- "engines": {
- "node": ">=6"
- }
- },
- "node_modules/miniflare": {
- "version": "5.20261023.3-beta",
- "resolved": "https://registry.npmjs.org/miniflare/-/miniflare-5.20261023.3-beta.tgz",
- "integrity": "sha512-thdXzlktu5GE1o/BlmMAPeJ0Cu6Tu5LpMbRlyfRrpVvMRrhd6p52TMqcITCZZLVzt1UO92VGBkLDhLOpryUAyQ==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "@cspotcode/source-map-support": "0.8.1",
- "sharp": "0.35.5",
- "undici": "7.30.1",
- "workerd": "1.20261023.1",
- "ws": "8.21.0",
- "youch": "4.1.0-beta.10"
- },
- "engines": {
- "node": ">=22.0.0"
- }
- },
- "node_modules/path-to-regexp": {
- "version": "6.3.0",
- "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-6.3.0.tgz",
- "integrity": "sha512-Yhpw4T9C6hPpgPeA28us07OJeqZ5EzQTkbfwuhsUg0c237RomFoETJgmp2sa3F/41gfLE6G5cqcYwznmeEeOlQ==",
- "dev": true,
- "license": "MIT"
- },
- "node_modules/pathe": {
- "version": "2.0.3",
- "resolved": "https://registry.npmjs.org/pathe/-/pathe-2.0.3.tgz",
- "integrity": "sha512-WUjGcAqP1gQacoQe+OBJsFA7Ld4DyXuUIjZ5cc75cLHvJ7dtNsTugphxIADwspS+AraAUePCKrSVtPLFj/F88w==",
- "dev": true,
- "license": "MIT"
- },
- "node_modules/semver": {
- "version": "7.8.5",
- "resolved": "https://registry.npmjs.org/semver/-/semver-7.8.5.tgz",
- "integrity": "sha512-Y7/KDsb8LjooZpwaqGyulO6DQlksgCncchHGk+sZIY4SBvUocMBEFH5Ur1fI4dV+Jvl0w6cjvucaIi40puRioA==",
- "dev": true,
- "license": "ISC",
- "bin": {
- "semver": "bin/semver.js"
- },
- "engines": {
- "node": ">=10"
- }
- },
- "node_modules/sharp": {
- "version": "0.35.5",
- "resolved": "https://registry.npmjs.org/sharp/-/sharp-0.35.5.tgz",
- "integrity": "sha512-Ywn4OnzGukp7CDMrp08RQ50YKmuwG47brZgIVPTvBaaAfQlRlygrRqSrxdCiL9M+LlzLBiJ68IR1QqvzHyjC7g==",
- "dev": true,
- "license": "Apache-2.0",
- "dependencies": {
- "@img/colour": "^1.1.0",
- "detect-libc": "^2.1.2",
- "semver": "^7.8.5"
- },
- "engines": {
- "node": ">=20.9.0"
- },
- "funding": {
- "url": "https://opencollective.com/libvips"
- },
- "optionalDependencies": {
- "@img/sharp-darwin-arm64": "0.35.5",
- "@img/sharp-darwin-x64": "0.35.5",
- "@img/sharp-freebsd-wasm32": "0.35.5",
- "@img/sharp-libvips-darwin-arm64": "1.3.4",
- "@img/sharp-libvips-darwin-x64": "1.3.4",
- "@img/sharp-libvips-linux-arm": "1.3.4",
- "@img/sharp-libvips-linux-arm64": "1.3.4",
- "@img/sharp-libvips-linux-ppc64": "1.3.4",
- "@img/sharp-libvips-linux-riscv64": "1.3.4",
- "@img/sharp-libvips-linux-s390x": "1.3.4",
- "@img/sharp-libvips-linux-x64": "1.3.4",
- "@img/sharp-libvips-linuxmusl-arm64": "1.3.4",
- "@img/sharp-libvips-linuxmusl-x64": "1.3.4",
- "@img/sharp-linux-arm": "0.35.5",
- "@img/sharp-linux-arm64": "0.35.5",
- "@img/sharp-linux-ppc64": "0.35.5",
- "@img/sharp-linux-riscv64": "0.35.5",
- "@img/sharp-linux-s390x": "0.35.5",
- "@img/sharp-linux-x64": "0.35.5",
- "@img/sharp-linuxmusl-arm64": "0.35.5",
- "@img/sharp-linuxmusl-x64": "0.35.5",
- "@img/sharp-webcontainers-wasm32": "0.35.5",
- "@img/sharp-win32-arm64": "0.35.5",
- "@img/sharp-win32-ia32": "0.35.5",
- "@img/sharp-win32-x64": "0.35.5"
- },
- "peerDependenciesMeta": {
- "@types/node": {
- "optional": true
- }
- }
- },
- "node_modules/supports-color": {
- "version": "10.2.2",
- "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-10.2.2.tgz",
- "integrity": "sha512-SS+jx45GF1QjgEXQx4NJZV9ImqmO2NPz5FNsIHrsDjh2YsHnawpan7SNQ1o8NuhrbHZy9AZhIoCUiCeaW/C80g==",
- "dev": true,
- "license": "MIT",
- "engines": {
- "node": ">=18"
- },
- "funding": {
- "url": "https://github.com/chalk/supports-color?sponsor=1"
- }
- },
- "node_modules/tslib": {
- "version": "2.9.1",
- "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.9.1.tgz",
- "integrity": "sha512-a4Ux9VKuIMHsOS7ENbEq6hK2ZGYIT27Rtl0E4eD9KqwxhKiQeMZE/9xb3IdYwWaSOyIBQLExhQgXDTYoiCxnWA==",
- "dev": true,
- "license": "0BSD",
- "optional": true
- },
- "node_modules/typescript": {
- "version": "5.9.3",
- "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.9.3.tgz",
- "integrity": "sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw==",
- "dev": true,
- "license": "Apache-2.0",
- "bin": {
- "tsc": "bin/tsc",
- "tsserver": "bin/tsserver"
- },
- "engines": {
- "node": ">=14.17"
- }
- },
- "node_modules/undici": {
- "version": "7.30.1",
- "resolved": "https://registry.npmjs.org/undici/-/undici-7.30.1.tgz",
- "integrity": "sha512-03KrMbjIFDWQR5RNPrSw3bd1r12JpyFQl9/yxjUbJtqkjmllqC5lFjZh6ujeuJCKr8EOQvRW872Oy/az+nLYxg==",
- "dev": true,
- "license": "MIT",
- "engines": {
- "node": ">=20.18.1"
- }
- },
- "node_modules/unenv": {
- "version": "2.0.0-rc.24",
- "resolved": "https://registry.npmjs.org/unenv/-/unenv-2.0.0-rc.24.tgz",
- "integrity": "sha512-i7qRCmY42zmCwnYlh9H2SvLEypEFGye5iRmEMKjcGi7zk9UquigRjFtTLz0TYqr0ZGLZhaMHl/foy1bZR+Cwlw==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "pathe": "^2.0.3"
- }
- },
- "node_modules/workerd": {
- "version": "1.20261023.1",
- "resolved": "https://registry.npmjs.org/workerd/-/workerd-1.20261023.1.tgz",
- "integrity": "sha512-NeofJFyaYNpqKpFRJW3ApuonaerPd6/JWlfTtLDYf2A6ygqrDEFnYgEXmc0hhOxqnJsSM+kXJN6VebPojzRrsg==",
- "dev": true,
- "hasInstallScript": true,
- "license": "Apache-2.0",
- "bin": {
- "workerd": "bin/workerd"
- },
- "engines": {
- "node": ">=16"
- },
- "optionalDependencies": {
- "@cloudflare/workerd-darwin-64": "1.20261023.1",
- "@cloudflare/workerd-darwin-arm64": "1.20261023.1",
- "@cloudflare/workerd-linux-64": "1.20261023.1",
- "@cloudflare/workerd-linux-arm64": "1.20261023.1",
- "@cloudflare/workerd-windows-64": "1.20261023.1"
- }
- },
- "node_modules/wrangler": {
- "version": "4.156.0",
- "resolved": "https://registry.npmjs.org/wrangler/-/wrangler-4.156.0.tgz",
- "integrity": "sha512-kVLAShuLiNgE3jcrmXcymDf/iPKDPrSxACe5ueugW/33HeNB9E9CkKYchudCeBwgmsnl4k+1zt4NO7vqb/fRuQ==",
- "dev": true,
- "license": "MIT OR Apache-2.0",
- "dependencies": {
- "@cloudflare/kv-asset-handler": "0.5.0",
- "@cloudflare/unenv-preset": "2.16.2",
- "blake3-wasm": "2.1.5",
- "esbuild": "0.28.2",
- "miniflare": "5.20261023.3-beta",
- "path-to-regexp": "6.3.0",
- "unenv": "2.0.0-rc.24",
- "workerd": "1.20261023.1"
- },
- "bin": {
- "cf-wrangler": "bin/cf-wrangler.js",
- "wrangler": "bin/wrangler.js",
- "wrangler2": "bin/wrangler.js"
- },
- "engines": {
- "node": ">=22.0.0"
- },
- "optionalDependencies": {
- "fsevents": "2.3.3"
- },
- "peerDependencies": {
- "@cloudflare/workers-types": "^5.20261023.1"
- },
- "peerDependenciesMeta": {
- "@cloudflare/workers-types": {
- "optional": true
- }
- }
- },
- "node_modules/ws": {
- "version": "8.21.0",
- "resolved": "https://registry.npmjs.org/ws/-/ws-8.21.0.tgz",
- "integrity": "sha512-Vsp28b7DRcimFQvrqu2Wek3z1iYxDCWqHYB8Qsnk/S4RfaCQzPGPyBNuVjJV3cd6UiKtUtp6sNM77gWvzcCH+g==",
- "dev": true,
- "license": "MIT",
- "engines": {
- "node": ">=10.0.0"
- },
- "peerDependencies": {
- "bufferutil": "^4.0.1",
- "utf-8-validate": ">=5.0.2"
- },
- "peerDependenciesMeta": {
- "bufferutil": {
- "optional": true
- },
- "utf-8-validate": {
- "optional": true
- }
- }
- },
- "node_modules/youch": {
- "version": "4.1.0-beta.10",
- "resolved": "https://registry.npmjs.org/youch/-/youch-4.1.0-beta.10.tgz",
- "integrity": "sha512-rLfVLB4FgQneDr0dv1oddCVZmKjcJ6yX6mS4pU82Mq/Dt9a3cLZQ62pDBL4AUO+uVrCvtWz3ZFUL2HFAFJ/BXQ==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "@poppinss/colors": "^4.1.5",
- "@poppinss/dumper": "^0.6.4",
- "@speed-highlight/core": "^1.2.7",
- "cookie": "^1.0.2",
- "youch-core": "^0.3.3"
- }
- },
- "node_modules/youch-core": {
- "version": "0.3.3",
- "resolved": "https://registry.npmjs.org/youch-core/-/youch-core-0.3.3.tgz",
- "integrity": "sha512-ho7XuGjLaJ2hWHoK8yFnsUGy2Y5uDpqSTq1FkHLK4/oqKtyUU1AFbOOxY4IpC9f0fTLjwYbslUz0Po5BpD1wrA==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "@poppinss/exception": "^1.2.2",
- "error-stack-parser-es": "^1.0.5"
- }
- }
- }
-}
diff --git a/jam-server/package.json b/jam-server/package.json
deleted file mode 100644
index f9db02e2..00000000
--- a/jam-server/package.json
+++ /dev/null
@@ -1,22 +0,0 @@
-{
- "name": "spotube-jam-server",
- "private": true,
- "description": "Group Jam room server for Spotube (Cloudflare Worker + Durable Objects)",
- "license": "AGPL-3.0-or-later",
- "type": "module",
- "scripts": {
- "dev": "wrangler dev",
- "deploy": "wrangler deploy",
- "types": "wrangler types",
- "typecheck": "wrangler types && tsc --noEmit",
- "test": "node test/smoke.mjs"
- },
- "devDependencies": {
- "typescript": "^5.9.3",
- "wrangler": "^4.156.0"
- },
- "allowScripts": {
- "esbuild@0.28.2": true,
- "workerd@1.20261023.1": true
- }
-}
diff --git a/jam-server/src/index.ts b/jam-server/src/index.ts
deleted file mode 100644
index c5af9e95..00000000
--- a/jam-server/src/index.ts
+++ /dev/null
@@ -1,59 +0,0 @@
-import { CLIENT_KEY, DEVICE_DIGEST, PROTOCOL_VERSION, ROOM_CODE, cleanName, deviceMark, participantId } from "./protocol";
-
-export { JamRoom } from "./room";
-
-const JSON_HEADERS = { "content-type": "application/json" };
-
-/**
- * Routes:
- * - `GET /v1/health` → `{ ok, v, now }` (used by the app's "Test connection")
- * - `GET /v1/rooms/{CODE}?key=&name=&mode=create|join[&dev=]` (WebSocket) → the room's Durable Object
- *
- * Durable Objects aren't reachable from the internet, only through this Worker, so the
- * room trusts the `id` and `name` this Worker hands it.
- */
-export default {
- async fetch(request, env): Promise {
- const url = new URL(request.url);
-
- if (url.pathname === "/v1/health") {
- return Response.json({ ok: true, v: PROTOCOL_VERSION, now: Date.now() });
- }
-
- const match = url.pathname.match(/^\/v1\/rooms\/([^/]+)$/);
- if (!match) return new Response("Not found", { status: 404 });
-
- if (request.headers.get("Upgrade")?.toLowerCase() !== "websocket") {
- return new Response("Expected a WebSocket upgrade", { status: 426 });
- }
-
- const code = match[1].toUpperCase();
- const key = url.searchParams.get("key") ?? "";
- const name = cleanName(url.searchParams.get("name") ?? "");
- const mode = url.searchParams.get("mode");
- const dev = url.searchParams.get("dev");
- if (
- !ROOM_CODE.test(code) ||
- !CLIENT_KEY.test(key) ||
- !name ||
- (mode !== "create" && mode !== "join") ||
- (dev !== null && !DEVICE_DIGEST.test(dev))
- ) {
- return new Response(JSON.stringify({ error: "bad_request" }), { status: 400, headers: JSON_HEADERS });
- }
-
- const ip = request.headers.get("CF-Connecting-IP") ?? "unknown";
- const { success } = await env.CONNECT_LIMITER.limit({ key: ip });
- if (!success) return new Response("Too many connections", { status: 429 });
-
- const forwarded = new URL(request.url);
- forwarded.search = new URLSearchParams({
- id: await participantId(code, key),
- name,
- mode,
- mark: (await deviceMark(code, dev, ip)) ?? "",
- }).toString();
- const room = env.JAM_ROOM.get(env.JAM_ROOM.idFromName(code));
- return room.fetch(new Request(forwarded, request));
- },
-} satisfies ExportedHandler;
diff --git a/jam-server/src/protocol.ts b/jam-server/src/protocol.ts
deleted file mode 100644
index b59ce813..00000000
--- a/jam-server/src/protocol.ts
+++ /dev/null
@@ -1,143 +0,0 @@
-/**
- * Wire protocol between Spotube and the jam room server (version 1).
- *
- * Every frame is a JSON object with a `t` discriminator. The server never looks
- * inside `body`: queue, anchor and command payloads are owned by the app and only
- * routed (and, for queue/anchor, retained) here.
- */
-
-export const PROTOCOL_VERSION = 1;
-
-/** Same alphabet as the app's `JamRoomCode` (no I, O, 0, 1). */
-export const ROOM_CODE = /^[ABCDEFGHJKLMNPQRSTUVWXYZ23456789]{6}$/;
-/**
- * A participant's secret, chosen by the client (at least 128 random bits). The server
- * never shares it: everyone else only sees the id derived from it ([participantId]),
- * so knowing someone's id doesn't let you reconnect as them.
- */
-export const CLIENT_KEY = /^[A-Za-z0-9_-]{22,64}$/;
-export const MAX_NAME_LENGTH = 40;
-export const MAX_PARTICIPANTS = 32;
-/** A long queue with cover URLs is the largest frame, a few hundred KB at most. */
-export const MAX_FRAME_BYTES = 512 * 1024;
-export const MAX_BANS = 256;
-/** Everyone who has been in the room, to tell a returning member from a new arrival. */
-export const MAX_MEMBERS = 512;
-
-/** Optional per-room device digest from the client (it never sends device details). */
-export const DEVICE_DIGEST = /^[A-Za-z0-9_-]{16,64}$/;
-
-/**
- * Per-socket token buckets. Every incoming message is billed, so a client that floods
- * is disconnected. Real clients stay far below: a few frames a minute, bursts of a
- * dozen when skipping quickly, and the host sends at most one queue a second.
- */
-export const FRAME_BUDGET = { burst: 40, perSecond: 6 };
-export const QUEUE_BUDGET = { burst: 5, perSecond: 1 };
-
-/**
- * A host that drops keeps the room for this long before someone else takes over (long
- * enough for a phone to switch networks). Guests keep playing in the meantime.
- */
-export const HOST_GRACE_MS = 30_000;
-/** An empty room keeps its queue for this long, so everyone can rejoin after a blip. */
-export const EMPTY_ROOM_TTL_MS = 10 * 60_000;
-
-/**
- * Keep-alive, sent as a bare text frame. The runtime answers it without waking the room,
- * so it costs nothing; clock pings (`ping` frames) are only sent when the clock syncs.
- */
-export const KEEPALIVE_PING = "ping";
-export const KEEPALIVE_PONG = "pong";
-
-export type JoinMode = "create" | "join";
-
-export type ClientFrame =
- | { t: "ping"; id: number; c: number }
- | { t: "queue"; body: unknown }
- | { t: "anchor"; body: unknown }
- | { t: "cmd"; body: unknown }
- | { t: "kick"; target: string; ban?: boolean };
-
-export interface Participant {
- id: string;
- name: string;
-}
-
-export type ServerFrame =
- | {
- t: "welcome";
- v: number;
- you: string;
- host: string | null;
- participants: Participant[];
- queue: unknown;
- anchor: unknown;
- }
- | { t: "pong"; id: number; c: number; s: number }
- | { t: "presence"; host: string | null; participants: Participant[] }
- | { t: "queue"; body: unknown }
- | { t: "anchor"; body: unknown }
- | { t: "cmd"; from: string; body: unknown }
- | { t: "error"; code: ErrorCode };
-
-export type ErrorCode =
- | "bad_request"
- | "room_taken"
- | "room_not_found"
- | "room_full"
- | "banned"
- | "kicked"
- | "replaced"
- | "frame_too_large"
- | "rate_limited";
-
-/** WebSocket close codes the app maps back to an [ErrorCode]. */
-export const CLOSE_CODES: Record = {
- bad_request: 4000,
- room_taken: 4001,
- room_not_found: 4004,
- room_full: 4005,
- banned: 4003,
- kicked: 4008,
- replaced: 4009,
- frame_too_large: 4013,
- rate_limited: 4029,
-};
-
-/** First 96 bits of SHA-256, base64url. */
-async function shortHash(text: string): Promise {
- const digest = await crypto.subtle.digest("SHA-256", new TextEncoder().encode(text));
- return btoa(String.fromCharCode(...new Uint8Array(digest).slice(0, 12)))
- .replace(/\+/g, "-")
- .replace(/\//g, "_");
-}
-
-/** The public id for [key] in room [code]: a different id per room, so ids can't link rooms. */
-export function participantId(code: string, key: string): Promise {
- return shortHash(`${code}:${key}`);
-}
-
-/**
- * What a ban remembers about a device besides its participant id: the client's device
- * digest combined with its network, hashed again here so the room only ever stores an
- * opaque value. Null without a digest.
- */
-export function deviceMark(code: string, digest: string | null, ip: string): Promise | null {
- return digest ? shortHash(`${code}:${digest}:${networkOf(ip)}`) : null;
-}
-
-/** An IPv4 address, or an IPv6 /64 (one home or phone gets a whole /64). */
-export function networkOf(ip: string): string {
- if (!ip.includes(":")) return ip;
- const [head, tail] = ip.split("::");
- const left = head ? head.split(":") : [];
- const right = tail ? tail.split(":") : [];
- const groups = tail === undefined ? left : [...left, ...Array(8 - left.length - right.length).fill("0"), ...right];
- return groups.slice(0, 4).map((g) => parseInt(g || "0", 16).toString(16)).join(":") + "::/64";
-}
-
-/** Names are shown to everyone: no control or formatting characters, no padding. */
-export function cleanName(raw: string): string {
- return raw.replace(/[\p{C}]/gu, "").replace(/\s+/gu, " ").trim().slice(0, MAX_NAME_LENGTH);
-}
diff --git a/jam-server/src/room.ts b/jam-server/src/room.ts
deleted file mode 100644
index 207fad2e..00000000
--- a/jam-server/src/room.ts
+++ /dev/null
@@ -1,383 +0,0 @@
-import { DurableObject } from "cloudflare:workers";
-import {
- CLOSE_CODES,
- KEEPALIVE_PING,
- KEEPALIVE_PONG,
- EMPTY_ROOM_TTL_MS,
- FRAME_BUDGET,
- HOST_GRACE_MS,
- MAX_BANS,
- MAX_MEMBERS,
- MAX_FRAME_BYTES,
- MAX_PARTICIPANTS,
- PROTOCOL_VERSION,
- QUEUE_BUDGET,
- type ClientFrame,
- type ErrorCode,
- type JoinMode,
- type Participant,
- type ServerFrame,
-} from "./protocol";
-
-interface Bucket {
- tokens: number;
- at: number;
-}
-
-/** Takes one token; false when [bucket] is empty. */
-function spend(bucket: Bucket, budget: { burst: number; perSecond: number }, now: number): boolean {
- bucket.tokens = Math.min(budget.burst, bucket.tokens + ((now - bucket.at) / 1000) * budget.perSecond);
- bucket.at = now;
- if (bucket.tokens < 1) return false;
- bucket.tokens -= 1;
- return true;
-}
-
-/** Kept on each socket so it survives hibernation. */
-interface Attachment {
- id: string;
- name: string;
- joined: number;
- /** See [deviceMark]; empty when the client sent no device digest. */
- mark: string;
-}
-
-const enum Key {
- Host = "host",
- Queue = "queue",
- Banned = "banned",
- BannedMarks = "bannedMarks",
- Members = "members",
- HostGoneAt = "hostGoneAt",
- EmptySince = "emptySince",
-}
-
-/**
- * One jam room, named by its six-letter code.
- *
- * The room is a relay with memory: it tracks who is connected and who hosts, keeps
- * the host's latest queue and playback anchor for late joiners, routes guest
- * commands to the host, and serves the clock everyone syncs playback against.
- * Sockets use the hibernation API, so an idle room costs nothing between messages.
- *
- * Cost: rooms are billed per incoming message and per storage write, so the steady
- * state is kept free of both. Keep-alives are answered by the runtime without waking
- * the room, and the anchor (sent on every playback change) lives in memory only: when
- * a hibernated room wakes for a join, the host answers the join's presence frame with
- * a fresh anchor anyway.
- */
-export class JamRoom extends DurableObject {
- private anchor: unknown = null;
- // In memory: a room that hibernated starts everyone with a full budget again, which
- // only matters to a client that floods, and that one wakes the room right away.
- private frameBudgets = new WeakMap();
- private queueBudgets = new WeakMap();
-
- constructor(ctx: DurableObjectState, env: Env) {
- super(ctx, env);
- ctx.setWebSocketAutoResponse(new WebSocketRequestResponsePair(KEEPALIVE_PING, KEEPALIVE_PONG));
- }
-
- async fetch(request: Request): Promise {
- const url = new URL(request.url);
- const id = url.searchParams.get("id")!;
- const name = url.searchParams.get("name")!;
- const mode = url.searchParams.get("mode") as JoinMode;
- const mark = url.searchParams.get("mark") ?? "";
-
- const { 0: client, 1: server } = new WebSocketPair();
- const previous = this.ctx.getWebSockets(id);
- this.ctx.acceptWebSocket(server, [id]);
- server.serializeAttachment({ id, name, joined: Date.now(), mark } satisfies Attachment);
-
- // A reconnect with the same id (network change, app restart) takes over the old socket.
- for (const ws of previous) this.reject(ws, "replaced");
-
- const refusal = await this.admit(id, mode, mark);
- if (refusal) {
- this.reject(server, refusal);
- } else {
- await this.ctx.storage.delete(Key.EmptySince);
- const [host, queue] = await Promise.all([
- this.ctx.storage.get(Key.Host),
- this.ctx.storage.get(Key.Queue),
- ]);
- this.send(server, {
- t: "welcome",
- v: PROTOCOL_VERSION,
- you: id,
- host: host ?? null,
- participants: this.participants(),
- queue: queue ?? null,
- anchor: this.anchor,
- });
- this.broadcast(await this.presence(), server);
- }
-
- return new Response(null, { status: 101, webSocket: client });
- }
-
- async webSocketMessage(ws: WebSocket, message: string | ArrayBuffer): Promise {
- const size = typeof message === "string" ? message.length : message.byteLength;
- if (size > MAX_FRAME_BYTES) return this.reject(ws, "frame_too_large");
- if (typeof message !== "string") return;
- if (!this.withinBudget(this.frameBudgets, ws, FRAME_BUDGET)) return this.reject(ws, "rate_limited");
-
- let frame: ClientFrame;
- try {
- frame = JSON.parse(message);
- } catch {
- return;
- }
- const sender = this.attachment(ws);
-
- switch (frame.t) {
- case "ping":
- this.send(ws, { t: "pong", id: frame.id, c: frame.c, s: Date.now() });
- return;
-
- case "queue":
- if (!(await this.isHost(sender.id))) return;
- if (!this.withinBudget(this.queueBudgets, ws, QUEUE_BUDGET)) return this.reject(ws, "rate_limited");
- await this.ctx.storage.put(Key.Queue, frame.body);
- this.broadcast({ t: "queue", body: frame.body }, ws);
- return;
-
- case "anchor":
- if (!(await this.isHost(sender.id))) return;
- this.anchor = frame.body;
- this.broadcast({ t: "anchor", body: frame.body }, ws);
- return;
-
- case "cmd": {
- const host = await this.ctx.storage.get(Key.Host);
- const out: ServerFrame = { t: "cmd", from: sender.id, body: frame.body };
- if (sender.id === host) {
- this.broadcast(out, ws);
- } else if (host) {
- for (const target of this.ctx.getWebSockets(host)) this.send(target, out);
- }
- return;
- }
-
- case "kick": {
- if (!(await this.isHost(sender.id)) || frame.target === sender.id) return;
- if (frame.ban) await this.ban(frame.target);
- for (const target of this.ctx.getWebSockets(frame.target)) {
- this.reject(target, frame.ban ? "banned" : "kicked");
- }
- return;
- }
- }
- }
-
- async webSocketClose(ws: WebSocket, code: number): Promise {
- try {
- ws.close(code === 1005 ? 1000 : code);
- } catch {
- // Already closed.
- }
- await this.onDeparture(ws);
- }
-
- async webSocketError(ws: WebSocket): Promise {
- await this.onDeparture(ws);
- }
-
- /** Fires after a host's grace period, or when an empty room expires. */
- async alarm(): Promise {
- const live = this.live();
- if (live.length === 0) {
- const emptySince = await this.ctx.storage.get(Key.EmptySince);
- if (emptySince === undefined) return;
- const expiresAt = emptySince + EMPTY_ROOM_TTL_MS;
- if (Date.now() >= expiresAt) {
- await this.ctx.storage.deleteAll();
- this.anchor = null;
- } else {
- await this.ctx.storage.setAlarm(expiresAt);
- }
- return;
- }
-
- const host = await this.ctx.storage.get(Key.Host);
- if (host && live.some((ws) => this.attachment(ws).id === host)) return;
- await this.promote();
- }
-
- // ---------- Membership ----------
-
- /**
- * Bans [id], and the device it's on: someone who comes back with a fresh identity from
- * the same device and network is refused too, unless they were already a member.
- */
- private async ban(id: string): Promise {
- const marks = this.ctx
- .getWebSockets(id)
- .map((ws) => this.attachment(ws).mark)
- .filter((mark) => mark);
- const [banned, bannedMarks] = await Promise.all([
- this.ctx.storage.get(Key.Banned),
- this.ctx.storage.get(Key.BannedMarks),
- ]);
- await this.ctx.storage.put({
- [Key.Banned]: [...new Set([...(banned ?? []), id])].slice(-MAX_BANS),
- [Key.BannedMarks]: [...new Set([...(bannedMarks ?? []), ...marks])].slice(-MAX_BANS),
- });
- }
-
- private async admit(id: string, mode: JoinMode, mark: string): Promise {
- const others = this.live().filter((ws) => this.attachment(ws).id !== id);
- // An empty room past its TTL whose cleanup alarm hasn't run yet is gone.
- const emptySince = await this.ctx.storage.get(Key.EmptySince);
- if (others.length === 0 && emptySince !== undefined && Date.now() - emptySince >= EMPTY_ROOM_TTL_MS) {
- await this.ctx.storage.deleteAll();
- this.anchor = null;
- }
-
- const [host, banned, queue] = await Promise.all([
- this.ctx.storage.get(Key.Host),
- this.ctx.storage.get(Key.Banned),
- this.ctx.storage.get(Key.Queue),
- ]);
- const exists = host !== undefined || queue !== undefined || others.length > 0;
-
- if (mode === "create") {
- // Only a fresh code, or the room's own host bringing it back. Anyone else
- // "creating" an existing room (even an empty one) would take it over.
- if (others.length > 0 || (exists && host !== id)) return "room_taken";
- if (!exists) await this.ctx.storage.put({ [Key.Host]: id, [Key.Members]: [id] });
- return null;
- }
-
- if (!exists) return "room_not_found";
- if (banned?.includes(id)) return "banned";
- const members = (await this.ctx.storage.get(Key.Members)) ?? [];
- const isMember = members.includes(id);
- // A member who was in the room before a ban (a friend on the same Wi-Fi with the
- // same phone, say) is never caught by another person's device ban.
- if (mark && !isMember && (await this.ctx.storage.get(Key.BannedMarks))?.includes(mark)) {
- return "banned";
- }
- if (others.length >= MAX_PARTICIPANTS) return "room_full";
- if (!isMember) await this.ctx.storage.put(Key.Members, [...members, id].slice(-MAX_MEMBERS));
-
- // Joining a room whose host is gone (and whose grace period is over) promotes someone.
- const hostLive = host === id || others.some((ws) => this.attachment(ws).id === host);
- if (!hostLive) {
- const goneAt = await this.ctx.storage.get(Key.HostGoneAt);
- if (goneAt === undefined || Date.now() - goneAt >= HOST_GRACE_MS) {
- await this.promote(id);
- }
- } else if (host === id) {
- await this.ctx.storage.delete(Key.HostGoneAt);
- }
- return null;
- }
-
- private async onDeparture(ws: WebSocket): Promise {
- const { id } = this.attachment(ws);
- const live = this.live().filter((other) => other !== ws);
- // Replaced by a newer socket of the same participant: nothing changed.
- if (live.some((other) => this.attachment(other).id === id)) return;
-
- if (live.length === 0) {
- await this.ctx.storage.put(Key.EmptySince, Date.now());
- await this.ctx.storage.setAlarm(Date.now() + EMPTY_ROOM_TTL_MS);
- return;
- }
-
- if (id === (await this.ctx.storage.get(Key.Host))) {
- await this.ctx.storage.put(Key.HostGoneAt, Date.now());
- await this.ctx.storage.setAlarm(Date.now() + HOST_GRACE_MS);
- }
- this.broadcast(await this.presence(), ws);
- }
-
- /** The longest-connected participant hosts next (or [fallback] in an empty room). */
- private async promote(fallback?: string): Promise {
- const next = this.participants()[0]?.id ?? fallback;
- if (!next) return;
- await this.ctx.storage.put(Key.Host, next);
- await this.ctx.storage.delete(Key.HostGoneAt);
- this.broadcast(await this.presence());
- }
-
- private async isHost(id: string): Promise {
- return (await this.ctx.storage.get(Key.Host)) === id;
- }
-
- private async presence(): Promise {
- return {
- t: "presence",
- host: (await this.ctx.storage.get(Key.Host)) ?? null,
- participants: this.participants(),
- };
- }
-
- // ---------- Sockets ----------
-
- private live(): WebSocket[] {
- return this.ctx.getWebSockets().filter((ws) => ws.readyState === WebSocket.OPEN);
- }
-
- /** Connected participants, longest-connected first, one entry per id. */
- private participants(): Participant[] {
- const byId = new Map();
- for (const ws of this.live()) {
- const a = this.attachment(ws);
- const existing = byId.get(a.id);
- if (!existing || a.joined < existing.joined) byId.set(a.id, a);
- }
- return [...byId.values()]
- .sort((a, b) => a.joined - b.joined || a.id.localeCompare(b.id))
- .map(({ id, name }) => ({ id, name }));
- }
-
- private withinBudget(
- buckets: WeakMap,
- ws: WebSocket,
- budget: { burst: number; perSecond: number },
- ): boolean {
- const now = Date.now();
- let bucket = buckets.get(ws);
- if (!bucket) {
- bucket = { tokens: budget.burst, at: now };
- buckets.set(ws, bucket);
- }
- return spend(bucket, budget, now);
- }
-
- private attachment(ws: WebSocket): Attachment {
- return ws.deserializeAttachment() as Attachment;
- }
-
- private send(ws: WebSocket, frame: ServerFrame): void {
- try {
- ws.send(JSON.stringify(frame));
- } catch {
- // The socket closed under us; its close handler cleans up.
- }
- }
-
- private broadcast(frame: ServerFrame, except?: WebSocket): void {
- const text = JSON.stringify(frame);
- for (const ws of this.live()) {
- if (ws === except) continue;
- try {
- ws.send(text);
- } catch {
- // See send().
- }
- }
- }
-
- private reject(ws: WebSocket, code: ErrorCode): void {
- this.send(ws, { t: "error", code });
- try {
- ws.close(CLOSE_CODES[code], code);
- } catch {
- // Already closed.
- }
- }
-}
diff --git a/jam-server/test/smoke.mjs b/jam-server/test/smoke.mjs
deleted file mode 100644
index d6736dc5..00000000
--- a/jam-server/test/smoke.mjs
+++ /dev/null
@@ -1,201 +0,0 @@
-// End-to-end smoke test against a running server: `npm run dev`, then `npm test`.
-// Point it elsewhere with JAM_URL=https://spotube-jam..workers.dev npm test
-import assert from "node:assert/strict";
-
-const BASE = process.env.JAM_URL ?? "http://127.0.0.1:8787";
-const WS_BASE = BASE.replace(/^http/, "ws");
-const ALPHABET = "ABCDEFGHJKLMNPQRSTUVWXYZ23456789";
-const code = () => Array.from({ length: 6 }, () => ALPHABET[Math.floor(Math.random() * ALPHABET.length)]).join("");
-const newKey = () => crypto.randomUUID().replaceAll("-", "");
-
-/** [id] is only a label for errors; the server assigns the real id (welcome.you). */
-function connect(room, id, mode, name = id, key = newKey(), dev = null) {
- const devParam = dev ? `&dev=${dev}` : "";
- const ws = new WebSocket(`${WS_BASE}/v1/rooms/${room}?key=${key}&name=${encodeURIComponent(name)}&mode=${mode}${devParam}`);
- const inbox = [];
- const waiters = [];
- ws.addEventListener("message", (e) => {
- const frame = e.data === "pong" ? { t: "keepalive" } : JSON.parse(e.data);
- const i = waiters.findIndex((w) => w.match(frame));
- if (i >= 0) waiters.splice(i, 1)[0].resolve(frame);
- else inbox.push(frame);
- });
- const closed = new Promise((resolve) => ws.addEventListener("close", (e) => resolve(e.code)));
- return {
- ws,
- key,
- closed,
- send: (frame) => ws.send(JSON.stringify(frame)),
- next(t, pred = () => true, timeoutMs = 5_000) {
- const match = (f) => f.t === t && pred(f);
- const i = inbox.findIndex(match);
- if (i >= 0) return Promise.resolve(inbox.splice(i, 1)[0]);
- return new Promise((resolve, reject) => {
- const timer = setTimeout(() => reject(new Error(`${id}: timed out waiting for ${t}`)), timeoutMs);
- waiters.push({ match, resolve: (f) => (clearTimeout(timer), resolve(f)) });
- });
- },
- };
-}
-
-const step = async (name, fn) => {
- await fn();
- console.log(`ok - ${name}`);
-};
-
-await step("health", async () => {
- const res = await (await fetch(`${BASE}/v1/health`)).json();
- assert.equal(res.ok, true);
- assert.equal(res.v, 1);
-});
-
-const room = code();
-const host = connect(room, "host", "create", "Host");
-let guest, hostId, guestId;
-
-await step("host creates the room", async () => {
- const welcome = await host.next("welcome");
- hostId = welcome.you;
- assert.match(hostId, /^[A-Za-z0-9_-]{16}$/);
- assert.equal(welcome.host, hostId);
- host.send({ t: "queue", body: { items: [1, 2, 3] } });
-});
-
-await step("guest joins and gets the retained queue", async () => {
- // The host's queue frame is processed before the guest's join is.
- host.send({ t: "ping", id: 1, c: 0 });
- await host.next("pong");
- guest = connect(room, "guest", "join", "Guest\u202e\u0000 1");
- const welcome = await guest.next("welcome");
- guestId = welcome.you;
- assert.equal(welcome.host, hostId);
- assert.deepEqual(welcome.queue, { items: [1, 2, 3] });
- const me = welcome.participants.find((p) => p.id === guestId);
- assert.equal(me.name, "Guest 1", "control and formatting characters are stripped");
- await host.next("presence", (f) => f.participants.length === 2);
-});
-
-await step("clock ping", async () => {
- guest.send({ t: "ping", id: 7, c: Date.now() });
- const pong = await guest.next("pong");
- assert.equal(pong.id, 7);
- assert.equal(typeof pong.s, "number");
-});
-
-await step("keep-alives are answered", async () => {
- guest.ws.send("ping");
- await guest.next("keepalive");
-});
-
-await step("anchor fans out to guests", async () => {
- host.send({ t: "anchor", body: { positionMs: 1234 } });
- const anchor = await guest.next("anchor");
- assert.equal(anchor.body.positionMs, 1234);
-});
-
-await step("guest anchors are ignored", async () => {
- guest.send({ t: "anchor", body: { positionMs: 1 } });
- guest.send({ t: "ping", id: 8, c: 0 });
- await guest.next("pong", (f) => f.id === 8);
- await assert.rejects(host.next("anchor", () => true, 500));
-});
-
-await step("guest commands reach the host", async () => {
- guest.send({ t: "cmd", body: { type: "skipNext" } });
- const cmd = await host.next("cmd");
- assert.equal(cmd.from, guestId);
-});
-
-await step("nobody can take over the host's identity", async () => {
- // The host's id is public; using it as a key yields a different id.
- const impostor = connect(room, "impostor", "join", "Host", hostId.padEnd(22, "x"));
- const welcome = await impostor.next("welcome");
- assert.notEqual(welcome.you, hostId);
- assert.equal(welcome.host, hostId);
- impostor.send({ t: "kick", target: guestId, ban: true });
- impostor.send({ t: "anchor", body: { positionMs: 666 } });
- impostor.send({ t: "ping", id: 9, c: 0 });
- await impostor.next("pong");
- await assert.rejects(guest.next("anchor", () => true, 500), "an impostor's anchor isn't relayed");
- impostor.ws.close();
- await host.next("presence", (f) => f.participants.length === 2);
-});
-
-await step("a taken code can't be created again", async () => {
- const intruder = connect(room, "intruder", "create");
- const error = await intruder.next("error");
- assert.equal(error.code, "room_taken");
- assert.equal(await intruder.closed, 4001);
-});
-
-await step("unknown rooms are not found", async () => {
- const lost = connect(code(), "lost", "join");
- assert.equal((await lost.next("error")).code, "room_not_found");
-});
-
-await step("ban closes the socket and blocks rejoining", async () => {
- host.send({ t: "kick", target: guestId, ban: true });
- assert.equal((await guest.next("error")).code, "banned");
- assert.equal(await guest.closed, 4003);
- const again = connect(room, "guest", "join", "Guest", guest.key);
- assert.equal((await again.next("error")).code, "banned");
-});
-
-await step("a ban covers the device, not just the identity", async () => {
- const party = code();
- const phone = newKey(); // The same device digest: same model, OS, locale…
- const owner = connect(party, "owner", "create", "Owner", newKey(), newKey());
- await owner.next("welcome");
- // A friend with an identical phone, already in the room before the ban.
- const friend = connect(party, "friend", "join", "Friend", newKey(), phone);
- const friendId = (await friend.next("welcome")).you;
- const troll = connect(party, "troll", "join", "Troll", newKey(), phone);
- const trollId = (await troll.next("welcome")).you;
-
- owner.send({ t: "kick", target: trollId, ban: true });
- assert.equal((await troll.next("error")).code, "banned");
-
- // Back with a fresh identity (reinstall) from the same device and network: refused.
- const again = connect(party, "troll-again", "join", "Troll", newKey(), phone);
- assert.equal((await again.next("error")).code, "banned");
- // The friend can still reconnect, and someone on another device can join.
- friend.ws.close();
- const friendBack = connect(party, "friend", "join", "Friend", friend.key, phone);
- assert.equal((await friendBack.next("welcome")).you, friendId);
- const stranger = connect(party, "stranger", "join", "Stranger", newKey(), newKey());
- await stranger.next("welcome");
- for (const c of [owner, friendBack, stranger]) c.ws.close();
-});
-
-await step("a client that floods is cut off", async () => {
- const flooder = connect(code(), "flooder", "create");
- await flooder.next("welcome");
- for (let i = 0; i < 100; i++) flooder.send({ t: "ping", id: i, c: 0 });
- assert.equal(await flooder.closed, 4029);
-});
-
-await step("host hands over after the grace period", async () => {
- const heir = connect(room, "heir", "join", "Heir");
- const heirId = (await heir.next("welcome")).you;
- host.ws.close();
- const presence = await heir.next("presence", (f) => f.host === heirId, 45_000);
- assert.deepEqual(presence.participants.map((p) => p.id), [heirId]);
- heir.ws.close();
-});
-
-await step("an empty room can't be taken over, but its host can bring it back", async () => {
- const other = code();
- const owner = connect(other, "owner", "create");
- await owner.next("welcome");
- owner.ws.close();
- await owner.closed;
- const squatter = connect(other, "squatter", "create");
- assert.equal((await squatter.next("error")).code, "room_taken");
- const back = connect(other, "owner", "create", "Owner", owner.key);
- const welcome = await back.next("welcome");
- assert.equal(welcome.host, welcome.you);
- back.ws.close();
-});
-
-console.log("all smoke tests passed");
-process.exit(0);
diff --git a/jam-server/tsconfig.json b/jam-server/tsconfig.json
deleted file mode 100644
index 894ca0ef..00000000
--- a/jam-server/tsconfig.json
+++ /dev/null
@@ -1,14 +0,0 @@
-{
- "compilerOptions": {
- "target": "es2022",
- "module": "es2022",
- "moduleResolution": "bundler",
- "lib": ["es2022"],
- "types": ["./worker-configuration.d.ts"],
- "strict": true,
- "noEmit": true,
- "isolatedModules": true,
- "skipLibCheck": true
- },
- "include": ["src"]
-}
diff --git a/jam-server/worker-configuration.d.ts b/jam-server/worker-configuration.d.ts
deleted file mode 100644
index 2d349cde..00000000
--- a/jam-server/worker-configuration.d.ts
+++ /dev/null
@@ -1,16269 +0,0 @@
-/* eslint-disable */
-// Generated by Wrangler by running `wrangler types` (hash: 28b567dee88147138835f9d78416e7d9)
-// Runtime types generated with workerd@1.20261023.1 2026-10-01
-interface __BaseEnv_Env {
- CONNECT_LIMITER: RateLimit;
- JAM_ROOM: DurableObjectNamespace;
-}
-declare namespace Cloudflare {
- interface GlobalProps {
- mainModule: typeof import("./src/index");
- durableNamespaces: "JamRoom";
- }
- interface Env extends __BaseEnv_Env {}
-}
-interface Env extends __BaseEnv_Env {}
-declare module "*.txt" {
- const value: string;
- export default value;
-}
-declare module "*.html" {
- const value: string;
- export default value;
-}
-declare module "*.sql" {
- const value: string;
- export default value;
-}
-declare module "*.bin" {
- const value: ArrayBuffer;
- export default value;
-}
-declare module "*.wasm" {
- const value: WebAssembly.Module;
- export default value;
-}
-declare module "*.wasm?module" {
- const value: WebAssembly.Module;
- export default value;
-}
-// Begin runtime types
-/*! *****************************************************************************
-Copyright (c) Cloudflare. All rights reserved.
-Copyright (c) Microsoft Corporation. All rights reserved.
-
-Licensed under the Apache License, Version 2.0 (the "License"); you may not use
-this file except in compliance with the License. You may obtain a copy of the
-License at http://www.apache.org/licenses/LICENSE-2.0
-THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
-WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
-MERCHANTABLITY OR NON-INFRINGEMENT.
-See the Apache Version 2.0 License for specific language governing permissions
-and limitations under the License.
-***************************************************************************** */
-/* eslint-disable */
-// noinspection JSUnusedGlobalSymbols
-declare var onmessage: never;
-/**
- * The **`DOMException`** interface represents an abnormal event (called an exception) that occurs as a result of calling a method or accessing a property of a web API. This is how error conditions are described in web APIs.
- *
- * [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMException)
- */
-declare class DOMException extends Error {
- constructor(message?: string, name?: string);
- /**
- * The **`message`** read-only property of the DOMException interface returns a string representing a message or description associated with the given error name.
- *
- * [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMException/message)
- */
- readonly message: string;
- /**
- * The **`name`** read-only property of the DOMException interface returns a string that contains one of the strings associated with an error name.
- *
- * [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMException/name)
- */
- readonly name: string;
- /**
- * The **`code`** read-only property of the DOMException interface returns one of the legacy error code constants, or 0 if none match.
- * @deprecated
- *
- * [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMException/code)
- */
- readonly code: number;
- static readonly INDEX_SIZE_ERR: number;
- static readonly DOMSTRING_SIZE_ERR: number;
- static readonly HIERARCHY_REQUEST_ERR: number;
- static readonly WRONG_DOCUMENT_ERR: number;
- static readonly INVALID_CHARACTER_ERR: number;
- static readonly NO_DATA_ALLOWED_ERR: number;
- static readonly NO_MODIFICATION_ALLOWED_ERR: number;
- static readonly NOT_FOUND_ERR: number;
- static readonly NOT_SUPPORTED_ERR: number;
- static readonly INUSE_ATTRIBUTE_ERR: number;
- static readonly INVALID_STATE_ERR: number;
- static readonly SYNTAX_ERR: number;
- static readonly INVALID_MODIFICATION_ERR: number;
- static readonly NAMESPACE_ERR: number;
- static readonly INVALID_ACCESS_ERR: number;
- static readonly VALIDATION_ERR: number;
- static readonly TYPE_MISMATCH_ERR: number;
- static readonly SECURITY_ERR: number;
- static readonly NETWORK_ERR: number;
- static readonly ABORT_ERR: number;
- static readonly URL_MISMATCH_ERR: number;
- static readonly QUOTA_EXCEEDED_ERR: number;
- static readonly TIMEOUT_ERR: number;
- static readonly INVALID_NODE_TYPE_ERR: number;
- static readonly DATA_CLONE_ERR: number;
- get stack(): any;
- set stack(value: any);
-}
-type WorkerGlobalScopeEventMap = {
- fetch: FetchEvent;
- scheduled: ScheduledEvent;
- queue: QueueEvent;
- unhandledrejection: PromiseRejectionEvent;
- rejectionhandled: PromiseRejectionEvent;
-};
-declare abstract class WorkerGlobalScope extends EventTarget {
- EventTarget: typeof EventTarget;
-}
-/* The **`console`** object provides access to the debugging console (e.g., the Web console in Firefox). *
- * The **`console`** object provides access to the debugging console (e.g., the Web console in Firefox).
- *
- * [MDN Reference](https://developer.mozilla.org/docs/Web/API/console)
- */
-interface Console {
- "assert"(condition?: boolean, ...data: any[]): void;
- /**
- * The **`console.clear()`** static method clears the console if possible.
- *
- * [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/clear_static)
- */
- clear(): void;
- /**
- * The **`console.count()`** static method logs the number of times that this particular call to count() has been called.
- *
- * [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/count_static)
- */
- count(label?: string): void;
- /**
- * The **`console.countReset()`** static method resets counter used with console.count().
- *
- * [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/countReset_static)
- */
- countReset(label?: string): void;
- /**
- * The **`console.debug()`** static method outputs a message to the console at the "debug" log level. The message is only displayed to the user if the console is configured to display debug output. In most cases, the log level is configured within the console UI. This log level might correspond to the Debug or Verbose log level.
- *
- * [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/debug_static)
- */
- debug(...data: any[]): void;
- /**
- * The **`console.dir()`** static method displays a list of the properties of the specified JavaScript object. In browser consoles, the output is presented as a hierarchical listing with disclosure triangles that let you see the contents of child objects.
- *
- * [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/dir_static)
- */
- dir(item?: any, options?: any): void;
- /**
- * The **`console.dirxml()`** static method displays an interactive tree of the descendant elements of the specified XML/HTML element. If it is not possible to display as an element the JavaScript Object view is shown instead. The output is presented as a hierarchical listing of expandable nodes that let you see the contents of child nodes.
- *
- * [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/dirxml_static)
- */
- dirxml(...data: any[]): void;
- /**
- * The **`console.error()`** static method outputs a message to the console at the "error" log level. The message is only displayed to the user if the console is configured to display error output. In most cases, the log level is configured within the console UI. The message may be formatted as an error, with red colors and call stack information.
- *
- * [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/error_static)
- */
- error(...data: any[]): void;
- /**
- * The **`console.group()`** static method creates a new inline group in the Web console log, causing any subsequent console messages to be indented by an additional level, until console.groupEnd() is called.
- *
- * [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/group_static)
- */
- group(...data: any[]): void;
- /**
- * The **`console.groupCollapsed()`** static method creates a new inline group in the console. Unlike console.group(), however, the new group is created collapsed. The user will need to use the disclosure button next to it to expand it, revealing the entries created in the group.
- *
- * [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/groupCollapsed_static)
- */
- groupCollapsed(...data: any[]): void;
- /**
- * The **`console.groupEnd()`** static method exits the current inline group in the console. See Using groups in the console in the console documentation for details and examples.
- *
- * [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/groupEnd_static)
- */
- groupEnd(): void;
- /**
- * The **`console.info()`** static method outputs a message to the console at the "info" log level. The message is only displayed to the user if the console is configured to display info output. In most cases, the log level is configured within the console UI. The message may receive special formatting, such as a small "i" icon next to it.
- *
- * [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/info_static)
- */
- info(...data: any[]): void;
- /**
- * The **`console.log()`** static method outputs a message to the console.
- *
- * [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/log_static)
- */
- log(...data: any[]): void;
- /**
- * The **`console.table()`** static method displays tabular data as a table.
- *
- * [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/table_static)
- */
- table(tabularData?: any, properties?: string[]): void;
- /**
- * The **`console.time()`** static method starts a timer you can use to track how long an operation takes. You give each timer a unique name, and may have up to 10,000 timers running on a given page. When you call console.timeEnd() with the same name, the browser will output the time, in milliseconds, that elapsed since the timer was started.
- *
- * [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/time_static)
- */
- time(label?: string): void;
- /**
- * The **`console.timeEnd()`** static method stops a timer that was previously started by calling console.time().
- *
- * [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/timeEnd_static)
- */
- timeEnd(label?: string): void;
- /**
- * The **`console.timeLog()`** static method logs the current value of a timer that was previously started by calling console.time().
- *
- * [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/timeLog_static)
- */
- timeLog(label?: string, ...data: any[]): void;
- /* The **`console.timeStamp()`** static method adds a single marker to the browser's Performance tool (Firefox bug 1387528, Chrome). This lets you correlate a point in your code with the other events recorded in the timeline, such as layout and paint events. */
- timeStamp(label?: string): void;
- /**
- * The **`console.trace()`** static method outputs a stack trace to the console.
- *
- * [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/trace_static)
- */
- trace(...data: any[]): void;
- /**
- * The **`console.warn()`** static method outputs a warning message to the console at the "warning" log level. The message is only displayed to the user if the console is configured to display warning output. In most cases, the log level is configured within the console UI. The message may receive special formatting, such as yellow colors and a warning icon.
- *
- * [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/warn_static)
- */
- warn(...data: any[]): void;
-}
-declare const console: Console;
-type BufferSource = ArrayBufferView | ArrayBuffer;
-type TypedArray = Int8Array | Uint8Array | Uint8ClampedArray | Int16Array | Uint16Array | Int32Array | Uint32Array | Float32Array | Float64Array | BigInt64Array | BigUint64Array;
-declare namespace WebAssembly {
- class CompileError extends Error {
- constructor(message?: string);
- }
- class RuntimeError extends Error {
- constructor(message?: string);
- }
- type ValueType = "anyfunc" | "externref" | "f32" | "f64" | "i32" | "i64" | "v128";
- interface GlobalDescriptor {
- value: ValueType;
- mutable?: boolean;
- }
- class Global {
- constructor(descriptor: GlobalDescriptor, value?: any);
- value: any;
- valueOf(): any;
- }
- type ImportValue = ExportValue | number;
- type ModuleImports = Record;
- type Imports = Record;
- type ExportValue = Function | Global | Memory | Table;
- type Exports = Record;
- class Instance {
- constructor(module: Module, imports?: Imports);
- readonly exports: Exports;
- }
- interface MemoryDescriptor {
- initial: number;
- maximum?: number;
- shared?: boolean;
- }
- class Memory {
- constructor(descriptor: MemoryDescriptor);
- readonly buffer: ArrayBuffer;
- grow(delta: number): number;
- }
- type ImportExportKind = "function" | "global" | "memory" | "table";
- interface ModuleExportDescriptor {
- kind: ImportExportKind;
- name: string;
- }
- interface ModuleImportDescriptor {
- kind: ImportExportKind;
- module: string;
- name: string;
- }
- abstract class Module {
- static customSections(module: Module, sectionName: string): ArrayBuffer[];
- static exports(module: Module): ModuleExportDescriptor[];
- static imports(module: Module): ModuleImportDescriptor[];
- }
- type TableKind = "anyfunc" | "externref";
- interface TableDescriptor {
- element: TableKind;
- initial: number;
- maximum?: number;
- }
- class Table {
- constructor(descriptor: TableDescriptor, value?: any);
- readonly length: number;
- get(index: number): any;
- grow(delta: number, value?: any): number;
- set(index: number, value?: any): void;
- }
- function instantiate(module: Module, imports?: Imports): Promise;
- function validate(bytes: BufferSource): boolean;
-}
-/**
- * The **`ServiceWorkerGlobalScope`** interface of the Service Worker API represents the global execution context of a service worker.
- * Available only in secure contexts.
- *
- * [MDN Reference](https://developer.mozilla.org/docs/Web/API/ServiceWorkerGlobalScope)
- */
-interface ServiceWorkerGlobalScope extends WorkerGlobalScope {
- DOMException: typeof DOMException;
- WorkerGlobalScope: typeof WorkerGlobalScope;
- btoa(data: string): string;
- atob(data: string): string;
- setTimeout(callback: (...args: any[]) => void, msDelay?: number): number;
- setTimeout(callback: (...args: Args) => void, msDelay?: number, ...args: Args): number;
- clearTimeout(timeoutId: number | null): void;
- setInterval(callback: (...args: any[]) => void, msDelay?: number): number;
- setInterval(callback: (...args: Args) => void, msDelay?: number, ...args: Args): number;
- clearInterval(timeoutId: number | null): void;
- queueMicrotask(task: Function): void;
- structuredClone(value: T, options?: StructuredSerializeOptions): T;
- reportError(error: any): void;
- fetch(input: RequestInfo | URL, init?: RequestInit): Promise;
- self: ServiceWorkerGlobalScope;
- crypto: Crypto;
- caches: CacheStorage;
- scheduler: Scheduler;
- performance: Performance;
- Cloudflare: Cloudflare;
- readonly origin: string;
- Event: typeof Event;
- ExtendableEvent: typeof ExtendableEvent;
- CustomEvent: typeof CustomEvent;
- PromiseRejectionEvent: typeof PromiseRejectionEvent;
- FetchEvent: typeof FetchEvent;
- TailEvent: typeof TailEvent;
- TraceEvent: typeof TailEvent;
- ScheduledEvent: typeof ScheduledEvent;
- MessageEvent: typeof MessageEvent;
- CloseEvent: typeof CloseEvent;
- ReadableStreamDefaultReader: typeof ReadableStreamDefaultReader;
- ReadableStreamBYOBReader: typeof ReadableStreamBYOBReader;
- ReadableStream: typeof ReadableStream;
- WritableStream: typeof WritableStream;
- WritableStreamDefaultWriter: typeof WritableStreamDefaultWriter;
- TransformStream: typeof TransformStream;
- ByteLengthQueuingStrategy: typeof ByteLengthQueuingStrategy;
- CountQueuingStrategy: typeof CountQueuingStrategy;
- ErrorEvent: typeof ErrorEvent;
- MessageChannel: typeof MessageChannel;
- MessagePort: typeof MessagePort;
- EventSource: typeof EventSource;
- ReadableStreamBYOBRequest: typeof ReadableStreamBYOBRequest;
- ReadableStreamDefaultController: typeof ReadableStreamDefaultController;
- ReadableByteStreamController: typeof ReadableByteStreamController;
- WritableStreamDefaultController: typeof WritableStreamDefaultController;
- TransformStreamDefaultController: typeof TransformStreamDefaultController;
- CompressionStream: typeof CompressionStream;
- DecompressionStream: typeof DecompressionStream;
- TextEncoderStream: typeof TextEncoderStream;
- TextDecoderStream: typeof TextDecoderStream;
- Headers: typeof Headers;
- Body: typeof Body;
- Request: typeof Request;
- Response: typeof Response;
- WebSocket: typeof WebSocket;
- WebSocketPair: typeof WebSocketPair;
- WebSocketRequestResponsePair: typeof WebSocketRequestResponsePair;
- AbortController: typeof AbortController;
- AbortSignal: typeof AbortSignal;
- TextDecoder: typeof TextDecoder;
- TextEncoder: typeof TextEncoder;
- navigator: Navigator;
- Navigator: typeof Navigator;
- URL: typeof URL;
- URLSearchParams: typeof URLSearchParams;
- URLPattern: typeof URLPattern;
- Blob: typeof Blob;
- File: typeof File;
- FormData: typeof FormData;
- Crypto: typeof Crypto;
- SubtleCrypto: typeof SubtleCrypto;
- CryptoKey: typeof CryptoKey;
- CacheStorage: typeof CacheStorage;
- Cache: typeof Cache;
- FixedLengthStream: typeof FixedLengthStream;
- IdentityTransformStream: typeof IdentityTransformStream;
- HTMLRewriter: typeof HTMLRewriter;
-}
-declare function addEventListener(type: Type, handler: EventListenerOrEventListenerObject, options?: EventTargetAddEventListenerOptions | boolean): void;
-declare function removeEventListener(type: Type, handler: EventListenerOrEventListenerObject, options?: EventTargetEventListenerOptions | boolean): void;
-/**
- * The **`dispatchEvent()`** method of the EventTarget sends an Event to the object, (synchronously) invoking the affected event listeners in the appropriate order. The normal event processing rules (including the capturing and optional bubbling phase) also apply to events dispatched manually with dispatchEvent().
- *
- * [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventTarget/dispatchEvent)
- */
-declare function dispatchEvent(event: WorkerGlobalScopeEventMap[keyof WorkerGlobalScopeEventMap]): boolean;
-/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/btoa) */
-declare function btoa(data: string): string;
-/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/atob) */
-declare function atob(data: string): string;
-/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/setTimeout) */
-declare function setTimeout(callback: (...args: any[]) => void, msDelay?: number): number;
-/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/setTimeout) */
-declare function setTimeout(callback: (...args: Args) => void, msDelay?: number, ...args: Args): number;
-/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/clearTimeout) */
-declare function clearTimeout(timeoutId: number | null): void;
-/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/setInterval) */
-declare function setInterval(callback: (...args: any[]) => void, msDelay?: number): number;
-/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/setInterval) */
-declare function setInterval(callback: (...args: Args) => void, msDelay?: number, ...args: Args): number;
-/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/clearInterval) */
-declare function clearInterval(timeoutId: number | null): void;
-/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/queueMicrotask) */
-declare function queueMicrotask(task: Function): void;
-/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/structuredClone) */
-declare function structuredClone(value: T, options?: StructuredSerializeOptions): T;
-/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/reportError) */
-declare function reportError(error: any): void;
-/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/fetch) */
-declare function fetch(input: RequestInfo | URL, init?: RequestInit): Promise;
-declare const self: ServiceWorkerGlobalScope;
-/**
-* The Web Crypto API provides a set of low-level functions for common cryptographic tasks.
-* The Workers runtime implements the full surface of this API, but with some differences in
-* the [supported algorithms](https://developers.cloudflare.com/workers/runtime-apis/web-crypto/#supported-algorithms)
-* compared to those implemented in most browsers.
-*
-* [Cloudflare Docs Reference](https://developers.cloudflare.com/workers/runtime-apis/web-crypto/)
-*/
-declare const crypto: Crypto;
-/**
-* The Cache API allows fine grained control of reading and writing from the Cloudflare global network cache.
-*
-* [Cloudflare Docs Reference](https://developers.cloudflare.com/workers/runtime-apis/cache/)
-*/
-declare const caches: CacheStorage;
-/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/scheduler) */
-declare const scheduler: Scheduler;
-/**
-* The Workers runtime supports a subset of the Performance API, used to measure timing and performance,
-* as well as timing of subrequests and other operations.
-*
-* [Cloudflare Docs Reference](https://developers.cloudflare.com/workers/runtime-apis/performance/)
-*/
-declare const performance: Performance;
-declare const Cloudflare: Cloudflare;
-declare const origin: string;
-declare const navigator: Navigator;
-interface TestController {
-}
-interface ExecutionContext {
- waitUntil(promise: Promise): void;
- passThroughOnException(): void;
- readonly exports: Cloudflare.Exports;
- readonly props: Props;
- cache?: CacheContext;
- readonly access?: CloudflareAccessContext;
- tracing: Tracing;
- abort(reason?: any): void;
-}
-type ExportedHandlerFetchHandler = (request: Request>, env: Env, ctx: ExecutionContext) => Response | Promise;
-type ExportedHandlerConnectHandler = (socket: Socket, env: Env, ctx: ExecutionContext) => void | Promise;
-type ExportedHandlerTailHandler = (events: TraceItem[], env: Env, ctx: ExecutionContext) => void | Promise;
-type ExportedHandlerTraceHandler = (traces: TraceItem[], env: Env, ctx: ExecutionContext) => void | Promise;
-type ExportedHandlerTailStreamHandler = (event: TailStream.TailEvent, env: Env, ctx: ExecutionContext) => TailStream.TailEventHandlerType | undefined | Promise;
-type ExportedHandlerScheduledHandler = (controller: ScheduledController, env: Env, ctx: ExecutionContext) => void | Promise;
-type ExportedHandlerQueueHandler = (batch: MessageBatch, env: Env, ctx: ExecutionContext) => void | Promise;
-type ExportedHandlerTestHandler = (controller: TestController, env: Env, ctx: ExecutionContext) => void | Promise;
-interface ExportedHandler {
- fetch?: ExportedHandlerFetchHandler;
- connect?: ExportedHandlerConnectHandler;
- tail?: ExportedHandlerTailHandler;
- trace?: ExportedHandlerTraceHandler;
- tailStream?: ExportedHandlerTailStreamHandler;
- scheduled?: ExportedHandlerScheduledHandler;
- test?: ExportedHandlerTestHandler;
- email?: EmailExportedHandler;
- queue?: ExportedHandlerQueueHandler;
-}
-interface StructuredSerializeOptions {
- transfer?: any[];
-}
-declare abstract class Navigator {
- sendBeacon(url: string, body?: BodyInit): boolean;
- readonly userAgent: string;
- readonly hardwareConcurrency: number;
- readonly platform: string;
- readonly language: string;
- readonly languages: string[];
-}
-interface AlarmInvocationInfo {
- readonly isRetry: boolean;
- readonly retryCount: number;
- readonly scheduledTime: number;
-}
-interface Cloudflare {
- readonly compatibilityFlags: Record;
-}
-interface CachePurgeError {
- code: number;
- message: string;
-}
-interface CachePurgeResult {
- success: boolean;
- errors: CachePurgeError[];
-}
-interface CachePurgeOptions {
- tags?: string[];
- pathPrefixes?: string[];
- purgeEverything?: boolean;
-}
-interface CacheContext {
- purge(options: CachePurgeOptions): Promise;
- invalidate(options: CachePurgeOptions): Promise;
-}
-interface CloudflareAccessContext {
- readonly aud: string;
- getIdentity(): Promise;
-}
-declare abstract class ColoLocalActorNamespace {
- get(actorId: string): Fetcher;
-}
-interface DurableObject {
- fetch(request: Request): Response | Promise;
- connect?(socket: Socket): void | Promise;
- alarm?(alarmInfo?: AlarmInvocationInfo): void | Promise;
- webSocketMessage?(ws: WebSocket, message: string | ArrayBuffer): void | Promise;
- webSocketClose?(ws: WebSocket, code: number, reason: string, wasClean: boolean): void | Promise;
- webSocketError?(ws: WebSocket, error: unknown): void | Promise;
-}
-type DurableObjectStub = Fetcher & {
- readonly id: DurableObjectId;
- readonly name?: string;
-};
-interface DurableObjectId {
- toString(): string;
- equals(other: DurableObjectId): boolean;
- readonly name?: string;
- readonly jurisdiction?: string;
-}
-declare abstract class DurableObjectNamespace {
- newUniqueId(options?: DurableObjectNamespaceNewUniqueIdOptions): DurableObjectId;
- idFromName(name: string): DurableObjectId;
- idFromString(id: string): DurableObjectId;
- get(id: DurableObjectId, options?: DurableObjectNamespaceGetDurableObjectOptions): DurableObjectStub;
- getByName(name: string, options?: DurableObjectNamespaceGetDurableObjectOptions): DurableObjectStub;
- jurisdiction(jurisdiction: DurableObjectJurisdiction): DurableObjectNamespace;
-}
-type DurableObjectJurisdiction = "eu" | "fedramp" | "fedramp-high" | "us";
-interface DurableObjectNamespaceNewUniqueIdOptions {
- jurisdiction?: DurableObjectJurisdiction;
-}
-type DurableObjectLocationHint = "wnam" | "enam" | "sam" | "weur" | "eeur" | "apac" | "apac-ne" | "apac-se" | "oc" | "afr" | "me";
-type DurableObjectRoutingMode = "primary-only";
-interface DurableObjectNamespaceGetDurableObjectOptions {
- locationHint?: DurableObjectLocationHint;
- routingMode?: DurableObjectRoutingMode;
-}
-interface DurableObjectClass<_T extends Rpc.DurableObjectBranded | undefined = undefined> {
-}
-interface DurableObjectState {
- waitUntil(promise: Promise): void;
- readonly exports: Cloudflare.Exports;
- readonly props: Props;
- readonly id: DurableObjectId;
- readonly storage: DurableObjectStorage;
- container?: Container;
- facets: DurableObjectFacets;
- blockConcurrencyWhile(callback: () => Promise): Promise;
- acceptWebSocket(ws: WebSocket, tags?: string[]): void;
- getWebSockets(tag?: string): WebSocket[];
- setWebSocketAutoResponse(maybeReqResp?: WebSocketRequestResponsePair): void;
- getWebSocketAutoResponse(): WebSocketRequestResponsePair | null;
- getWebSocketAutoResponseTimestamp(ws: WebSocket): Date | null;
- setHibernatableWebSocketEventTimeout(timeoutMs?: number): void;
- getHibernatableWebSocketEventTimeout(): number | null;
- getTags(ws: WebSocket): string[];
- abort(reason?: string, options?: DurableObjectAbortOptions): void;
-}
-interface DurableObjectTransaction {
- get(key: string, options?: DurableObjectGetOptions): Promise;
- get(keys: string[], options?: DurableObjectGetOptions): Promise