From d9839ce0decb26dea94c15940d1d27df7ee9910f Mon Sep 17 00:00:00 2001 From: naporitan Date: Tue, 6 Aug 2024 12:41:02 +0900 Subject: [PATCH] update exapmle & update readme (#52) --- .changeset/loud-dragons-call.md | 5 + README.md | 82 +++++--- example/apps/web/package.json | 2 +- example/apps/workers/package.json | 10 +- example/apps/workers/src/index.ts | 5 +- example/apps/workers/src/types.ts | 14 +- example/pnpm-lock.yaml | 312 ++++++++++++++---------------- 7 files changed, 221 insertions(+), 209 deletions(-) create mode 100644 .changeset/loud-dragons-call.md diff --git a/.changeset/loud-dragons-call.md b/.changeset/loud-dragons-call.md new file mode 100644 index 0000000..7587f54 --- /dev/null +++ b/.changeset/loud-dragons-call.md @@ -0,0 +1,5 @@ +--- +"y-durableobjects": patch +--- + +change readme hono env description diff --git a/README.md b/README.md index 3abfec0..b9dbdf8 100644 --- a/README.md +++ b/README.md @@ -54,24 +54,6 @@ tag = "v1" new_classes = ["YDurableObjects"] ``` -## Extending Hono with Bindings - -To integrate `y-durableobjects` with Hono, extend the `Env` interface to include the `Bindings` type for better type safety and IntelliSense support in your editor. - -```typescript -export type Bindings = { - Y_DURABLE_OBJECTS: DurableObjectNamespace; -}; - -declare module "hono" { - interface Env { - Bindings: Bindings; - } -} -``` - -This allows you to use `Y_DURABLE_OBJECTS` directly in your Hono application with full type support. - ## Usage ### With Hono shorthand @@ -80,11 +62,19 @@ This allows you to use `Y_DURABLE_OBJECTS` directly in your Hono application wit import { Hono } from "hono"; import { YDurableObjects, yRoute } from "y-durableobjects"; -const app = new Hono(); +type Bindings = { + Y_DURABLE_OBJECTS: DurableObjectNamespace>; +}; + +type Env = { + Bindings: Bindings; +}; + +const app = new Hono(); const route = app.route( "/editor", - yRoute((env) => env.Y_DURABLE_OBJECTS), + yRoute((env) => env.Y_DURABLE_OBJECTS), ); export default route; @@ -101,7 +91,15 @@ import { Hono } from "hono"; import { YDurableObjects, type YDurableObjectsAppType } from "y-durableobjects"; import { upgrade } from "y-durableobjects/helpers/upgrade"; -const app = new Hono(); +type Bindings = { + Y_DURABLE_OBJECTS: DurableObjectNamespace>; +}; + +type Env = { + Bindings: Bindings; +}; + +const app = new Hono(); app.get("/editor/:id", upgrade(), async (c) => { const id = c.env.Y_DURABLE_OBJECTS.idFromName(c.req.param("id")); const stub = c.env.Y_DURABLE_OBJECTS.get(id); @@ -143,7 +141,15 @@ import { Hono } from "hono"; import { YDurableObjects } from "y-durableobjects"; import { fromUint8Array } from "js-base64"; -const app = new Hono(); +type Bindings = { + Y_DURABLE_OBJECTS: DurableObjectNamespace>; +}; + +type Env = { + Bindings: Bindings; +}; + +const app = new Hono(); app.get("/rooms/:id/state", async (c) => { const roomId = c.req.param("id"); @@ -170,7 +176,15 @@ Example usage in Hono: import { Hono } from "hono"; import { YDurableObjects } from "y-durableobjects"; -const app = new Hono(); +type Bindings = { + Y_DURABLE_OBJECTS: DurableObjectNamespace>; +}; + +type Env = { + Bindings: Bindings; +}; + +const app = new Hono(); app.post("/rooms/:id/update", async (c) => { const roomId = c.req.param("id"); @@ -224,10 +238,18 @@ export class CustomDurableObject extends YDurableObjects { import { Hono } from "hono"; import { YDurableObjects, yRoute } from "y-durableobjects"; -const app = new Hono(); +type Bindings = { + Y_DURABLE_OBJECTS: DurableObjectNamespace>; +}; + +type Env = { + Bindings: Bindings; +}; + +const app = new Hono(); const route = app.route( "/editor", - yRoute((env) => env.Y_DURABLE_OBJECTS), + yRoute((env) => env.Y_DURABLE_OBJECTS), ); export default route; @@ -242,7 +264,15 @@ import { Hono } from "hono"; import { YDurableObjects, YDurableObjectsAppType } from "y-durableobjects"; import { upgrade } from "y-durableobjects/helpers/upgrade"; -const app = new Hono(); +type Bindings = { + Y_DURABLE_OBJECTS: DurableObjectNamespace>; +}; + +type Env = { + Bindings: Bindings; +}; + +const app = new Hono(); app.get("/editor/:id", upgrade(), async (c) => { const id = c.env.Y_DURABLE_OBJECTS.idFromName(c.req.param("id")); const stub = c.env.Y_DURABLE_OBJECTS.get(id); diff --git a/example/apps/web/package.json b/example/apps/web/package.json index 1be7d02..41ebfa7 100644 --- a/example/apps/web/package.json +++ b/example/apps/web/package.json @@ -21,7 +21,7 @@ "@lexical/react": "^0.13.1", "@lexical/rich-text": "^0.13.1", "@lexical/table": "^0.13.1", - "hono": "^4.4.10", + "hono": "^4.5.3", "lexical": "^0.13.1", "react": "^18.2.0", "react-dom": "^18.2.0", diff --git a/example/apps/workers/package.json b/example/apps/workers/package.json index 698103b..98284ef 100644 --- a/example/apps/workers/package.json +++ b/example/apps/workers/package.json @@ -13,12 +13,12 @@ }, "devDependencies": { "@biomejs/biome": "^1.4.1", - "@cloudflare/workers-types": "^4.20231218.0", - "typescript": "^5.2.2", - "wrangler": "^3.51.2" + "@cloudflare/workers-types": "^4.20240729.0", + "typescript": "^5.5.4", + "wrangler": "^3.68.0" }, "dependencies": { - "hono": "^4.4.10", - "y-durableobjects": "^0.4.0" + "hono": "^4.5.3", + "y-durableobjects": "^1.0.0" } } diff --git a/example/apps/workers/src/index.ts b/example/apps/workers/src/index.ts index a79bc27..21965bc 100644 --- a/example/apps/workers/src/index.ts +++ b/example/apps/workers/src/index.ts @@ -1,13 +1,14 @@ import { Hono } from "hono"; import { cors } from "hono/cors"; import { YDurableObjects, yRoute } from "y-durableobjects"; +import { Env } from "./types"; -const app = new Hono(); +const app = new Hono(); app.use("*", cors()); const route = app.route( "/editor", - yRoute((env) => env.Y_DURABLE_OBJECTS), + yRoute((env) => env.Y_DURABLE_OBJECTS), ); export default route; diff --git a/example/apps/workers/src/types.ts b/example/apps/workers/src/types.ts index f97abb2..30533e8 100644 --- a/example/apps/workers/src/types.ts +++ b/example/apps/workers/src/types.ts @@ -1,9 +1,9 @@ -export type Bindings = { - Y_DURABLE_OBJECTS: DurableObjectNamespace; +import type { YDurableObjects } from "y-durableobjects"; + +type Bindings = { + Y_DURABLE_OBJECTS: DurableObjectNamespace>; }; -declare module "hono" { - interface Env { - Bindings: Bindings; - } -} +export type Env = { + Bindings: Bindings; +}; diff --git a/example/pnpm-lock.yaml b/example/pnpm-lock.yaml index 0d4ccec..b46d38b 100644 --- a/example/pnpm-lock.yaml +++ b/example/pnpm-lock.yaml @@ -42,8 +42,8 @@ importers: specifier: ^0.13.1 version: 0.13.1(lexical@0.13.1) hono: - specifier: ^4.4.10 - version: 4.4.10 + specifier: ^4.5.3 + version: 4.5.3 lexical: specifier: ^0.13.1 version: 0.13.1 @@ -88,24 +88,24 @@ importers: apps/workers: dependencies: hono: - specifier: ^4.4.10 - version: 4.4.10 + specifier: ^4.5.3 + version: 4.5.3 y-durableobjects: - specifier: ^0.4.0 - version: 0.4.0(hono@4.4.10) + specifier: ^1.0.0 + version: 1.0.0(@cloudflare/workers-types@4.20240729.0)(hono@4.5.3) devDependencies: '@biomejs/biome': specifier: ^1.4.1 version: 1.6.4 '@cloudflare/workers-types': - specifier: ^4.20231218.0 - version: 4.20240405.0 + specifier: ^4.20240729.0 + version: 4.20240729.0 typescript: - specifier: ^5.2.2 - version: 5.4.4 + specifier: ^5.5.4 + version: 5.5.4 wrangler: - specifier: ^3.51.2 - version: 3.51.2(@cloudflare/workers-types@4.20240405.0) + specifier: ^3.68.0 + version: 3.68.0(@cloudflare/workers-types@4.20240729.0) packages: @@ -169,41 +169,42 @@ packages: cpu: [x64] os: [win32] - '@cloudflare/kv-asset-handler@0.3.1': - resolution: {integrity: sha512-lKN2XCfKCmpKb86a1tl4GIwsJYDy9TGuwjhDELLmpKygQhw8X2xR4dusgpC5Tg7q1pB96Eb0rBo81kxSILQMwA==} + '@cloudflare/kv-asset-handler@0.3.4': + resolution: {integrity: sha512-YLPHc8yASwjNkmcDMQMY35yiWjoKAKnhUbPRszBRS0YgH+IXtsMp61j+yTcnCE3oO2DgP0U3iejLC8FTtKDC8Q==} + engines: {node: '>=16.13'} - '@cloudflare/workerd-darwin-64@1.20240405.0': - resolution: {integrity: sha512-ut8kwpHmlz9dNSjoov6v1b6jS50J46Mj9QcMA0t1Hne36InaQk/qqPSd12fN5p2GesZ9OOBJvBdDsTblVdyJ1w==} + '@cloudflare/workerd-darwin-64@1.20240725.0': + resolution: {integrity: sha512-KpE7eycdZ9ON+tKBuTyqZh8SdFWHGrh2Ru9LcbpeFwb7O9gDQv9ceSdoV/T598qlT0a0yVKM62R6xa5ec0UOWA==} engines: {node: '>=16'} cpu: [x64] os: [darwin] - '@cloudflare/workerd-darwin-arm64@1.20240405.0': - resolution: {integrity: sha512-x3A3Ym+J2DH1uYnw0aedeKOTnUebEo312+Aladv7bFri97pjRJcqVbYhMtOHLkHjwYn7bpKSY2eL5iM+0XT29A==} + '@cloudflare/workerd-darwin-arm64@1.20240725.0': + resolution: {integrity: sha512-/UQlI04FdXLpPlDzzsWGz8TuKrMZKLowTo+8PkxgEiWIaBhE4DIDM5bwj3jM4Bs8yOLiL2ovQNpld5CnAKqA8g==} engines: {node: '>=16'} cpu: [arm64] os: [darwin] - '@cloudflare/workerd-linux-64@1.20240405.0': - resolution: {integrity: sha512-3tYpfjtxEQ0R30Pna7OF3Bz0CTx30hc0QNtH61KnkvXtaeYMkWutSKQKXIuVlPa/7v1MHp+8ViBXMflmS7HquA==} + '@cloudflare/workerd-linux-64@1.20240725.0': + resolution: {integrity: sha512-Z5t12qYLvHz0b3ZRBBm2HQ93RiHrAnjFfdhtjMcgJypAGkiWpOCEn2xar/WqDhMfqnk0sa8aYiYAbMAlP1WN6w==} engines: {node: '>=16'} cpu: [x64] os: [linux] - '@cloudflare/workerd-linux-arm64@1.20240405.0': - resolution: {integrity: sha512-NpKZlvmdgcX/m4tP5zM91AfJpZrue2/GRA+Sl3szxAivu2uE5jDVf5SS9dzqzCVfPrdhylqH7yeL4U/cafFNOg==} + '@cloudflare/workerd-linux-arm64@1.20240725.0': + resolution: {integrity: sha512-j9gYXLOwOyNehLMzP7KxQ+Y6/nxcL9i6LTDJC6RChoaxLRbm0Y/9Otu+hfyzeNeRpt31ip6vqXZ1QQk6ygzI8A==} engines: {node: '>=16'} cpu: [arm64] os: [linux] - '@cloudflare/workerd-windows-64@1.20240405.0': - resolution: {integrity: sha512-REBeJMxvUCjwuEVzSSIBtzAyM69QjToab8qBst0S9vdih+9DObym4dw8CevdBQhDbFrHiyL9E6pAZpLPNHVgCw==} + '@cloudflare/workerd-windows-64@1.20240725.0': + resolution: {integrity: sha512-fkrJLWNN6rrPjZ0eKJx328NVMo4BsainKxAfqaPMEd6uRwjOM8uN8V4sSLsXXP8GQMAx6hAG2hU86givS4GItg==} engines: {node: '>=16'} cpu: [x64] os: [win32] - '@cloudflare/workers-types@4.20240405.0': - resolution: {integrity: sha512-sEVOhyOgXUwfLkgHqbLZa/sfkSYrh7/zLmI6EZNibPaVPvAnAcItbNNl3SAlLyLKuwf8m4wAIAgu9meKWCvXjg==} + '@cloudflare/workers-types@4.20240729.0': + resolution: {integrity: sha512-wfe44YQkv5T9aBr/z95P706r2/Ydg32weJYyBOhvge7FqtdY6mM7l39rybNiJrbJoyN16dd0xxyQMf23aJNC6Q==} '@cspotcode/source-map-support@0.8.1': resolution: {integrity: sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==} @@ -765,9 +766,6 @@ packages: '@types/estree@1.0.5': resolution: {integrity: sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw==} - '@types/json-schema@7.0.15': - resolution: {integrity: sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==} - '@types/node-forge@1.3.11': resolution: {integrity: sha512-FQx220y22OKNTqaByeBGqHWYz4cl94tpcxeFdvBo3wjG6XPBuZ0BNgNZRV5J5TFmmcsJ4IzsLkmGRiQbnYsBEQ==} @@ -815,9 +813,6 @@ packages: async-limiter@1.0.1: resolution: {integrity: sha512-csOlWGAcRFJaI6m+F2WKdnMKr4HhdhFVBk0H/QbJFMCr+uO2kwohwXQPxw/9OCxp05r5ghVBFSyioixx3gfkNQ==} - balanced-match@1.0.2: - resolution: {integrity: sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==} - base64-js@1.5.1: resolution: {integrity: sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==} @@ -828,9 +823,6 @@ packages: blake3-wasm@2.1.5: resolution: {integrity: sha512-F1+K8EbfOZE49dtoPtmxUQrpXaBIl3ICvasLh+nJta0xkz+9kF/7uet9fLnwKqhDrmj6g+6K3Tw9yQPUg2ka5g==} - brace-expansion@2.0.1: - resolution: {integrity: sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==} - braces@3.0.2: resolution: {integrity: sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==} engines: {node: '>=8'} @@ -845,9 +837,9 @@ packages: resolution: {integrity: sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==} engines: {node: '>= 8.10.0'} - commander@12.0.0: - resolution: {integrity: sha512-MwVNWlYjDTtOjX5PiD7o5pK0UrFU/OYgcJfjjK4RaHZETNtjJqrZa9Y9ds88+A+f+d5lv+561eZ+yCKoS3gbAA==} - engines: {node: '>=18'} + consola@3.2.3: + resolution: {integrity: sha512-I5qxpzLv+sJhTVEoLYNcTW+bThDCPsit0vLNKShZx6rLtpilNpmmeTPaeqJb9ZE9dV3DGaeby6Vuhrw38WjeyQ==} + engines: {node: ^14.18.0 || >=16.10.0} cookie@0.5.0: resolution: {integrity: sha512-YZ3GUyn/o8gfKJlnlX7g7xq4gyO6OSuhGPKaaGssGB2qgDUS0gPgtTvoyZLTt9Ab6dC4hfc9dV5arkvc/OCmrw==} @@ -859,6 +851,9 @@ packages: data-uri-to-buffer@2.0.2: resolution: {integrity: sha512-ND9qDTLc6diwj+Xe5cdAgVTbLVdXbtxTJRXRhli8Mowuaan+0EJOtdqJ0QCHNSSPyoXGx9HX2/VMnKeC34AChA==} + date-fns@3.6.0: + resolution: {integrity: sha512-fRHTG8g/Gif+kSh50gaGEdToemgfj74aRX3swtiouboip5JDLAyDE9F11nHMIcvOaXeOC6D7SpNhi7uFyB7Uww==} + debug@4.3.4: resolution: {integrity: sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==} engines: {node: '>=6.0'} @@ -872,6 +867,9 @@ packages: resolution: {integrity: sha512-a59VOT+oDy7vtAbLRCZwWgxu2BaCfd5Hk7wxJd48ei7I+nsg8Orlb9CLG0PMZienk9BSUKgeAqkO2+Lw+1+Ukw==} engines: {node: '>=6'} + defu@6.1.4: + resolution: {integrity: sha512-mEQCMmwJu317oSz8CwdIOdwf3xMif1ttiM8LTufzc3g6kR+9Pe236twL8j3IYT1F7GfRgGcW6MWxzZjLIkuHIg==} + encoding-down@6.3.0: resolution: {integrity: sha512-QKrV0iKR6MZVJV08QY0wp1e7vF6QbhnbQhb07bwpEyuz4uZiZgPlEGdkCROuFkUwdxlFaiPIhjyarH1ee/3vhw==} engines: {node: '>=6'} @@ -905,9 +903,6 @@ packages: resolution: {integrity: sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==} engines: {node: '>=8'} - fs.realpath@1.0.0: - resolution: {integrity: sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==} - fsevents@2.3.3: resolution: {integrity: sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==} engines: {node: ^8.16.0 || ^10.6.0 || >=11.0.0} @@ -926,16 +921,12 @@ packages: glob-to-regexp@0.4.1: resolution: {integrity: sha512-lkX1HJXwyMcprw/5YUZc2s7DrpAiHB21/V+E1rHUrVNokkvB6bqMzT0VfV6/86ZNabt1k14YOIaT7nDvOX3Iiw==} - glob@8.1.0: - resolution: {integrity: sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ==} - engines: {node: '>=12'} - hasown@2.0.2: resolution: {integrity: sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==} engines: {node: '>= 0.4'} - hono@4.4.10: - resolution: {integrity: sha512-z6918u9rXRU5CCisMHd2uUVoQXcNyUrUMmYY7VH10v4HJG7+hqgMK/G8YNTd13C6s4rBfzF09iz8VpOip9qG3A==} + hono@4.5.3: + resolution: {integrity: sha512-r26WwwbKD3BAYdfB294knNnegNda7VfV1tVn66D9Kvl9WQTdrR+5eKdoeaQNHQcC3Gr0KBikzAtjd6VsRGVSaw==} engines: {node: '>=16.0.0'} ieee754@1.2.1: @@ -944,9 +935,6 @@ packages: immediate@3.3.0: resolution: {integrity: sha512-HR7EVodfFUdQCTIeySw+WDRFJlPcLOJbXfwwZ7Oom6tjsvZ3bOkCDJHehQC3nxJrv7+f9XecwazynjU8e4Vw3Q==} - inflight@1.0.6: - resolution: {integrity: sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==} - inherits@2.0.4: resolution: {integrity: sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==} @@ -972,17 +960,9 @@ packages: isomorphic.js@0.2.5: resolution: {integrity: sha512-PIeMbHqMt4DnUP3MA/Flc0HElYjMXArsw1qwJZcm9sqR8mq3l8NYizFMty0pWwE/tzIGH3EKK5+jes5mAr85yw==} - js-base64@3.7.7: - resolution: {integrity: sha512-7rCnleh0z2CkXhH67J8K1Ytz0b2Y+yxTPL+/KOJoa20hfnVQ/3/T6W/KflYI4bRHRagNeXeU2bkNGI3v1oS/lw==} - js-tokens@4.0.0: resolution: {integrity: sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==} - json5@2.2.3: - resolution: {integrity: sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==} - engines: {node: '>=6'} - hasBin: true - level-codec@9.0.2: resolution: {integrity: sha512-UyIwNb1lJBChJnGfjmO0OR+ezh2iVu1Kas3nvBS/BzGnx79dv6g7unpKIDNPMhfdTEGoc7mC8uAu51XEtX+FHQ==} engines: {node: '>=6'} @@ -1030,6 +1010,11 @@ packages: engines: {node: '>=16'} hasBin: true + lib0@0.2.96: + resolution: {integrity: sha512-xeV9M34+D4HD1sd6xAarnWYgU7pKau64bvmPySibX85G+hx/KonzISpO409K6OS9IVLORWfQZkKBRZV5sQegFQ==} + engines: {node: '>=16'} + hasBin: true + lodash.debounce@4.0.8: resolution: {integrity: sha512-FT1yDzDYEoYWhnSGnpE/4Kj1fLZkDFyqRb7fNt6FdYOSxlUWAtp42Eh6Wb0rGIv/m9Bgo7x4GhQbm5Ys4SG5ow==} @@ -1048,15 +1033,11 @@ packages: engines: {node: '>=10.0.0'} hasBin: true - miniflare@3.20240405.2: - resolution: {integrity: sha512-n/V5m9GVMN37U5gWdrNXKx2d1icLXtcIKcxWtLslH4RTaebZJdSRmp12UHyuQsKlaSpTkNqyzLVtCEgt2bhRSA==} + miniflare@3.20240725.0: + resolution: {integrity: sha512-n9NTLI8J9Xt0Cls6dRpqoIPkVFnxD9gMnU/qDkDX9diKfN16HyxpAdA5mto/hKuRpjW19TxnTMcxBo90vZXemw==} engines: {node: '>=16.13'} hasBin: true - minimatch@5.1.6: - resolution: {integrity: sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==} - engines: {node: '>=10'} - ms@2.1.2: resolution: {integrity: sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==} @@ -1072,6 +1053,9 @@ packages: napi-macros@2.0.0: resolution: {integrity: sha512-A0xLykHtARfueITVDernsAWdtIMbOJgKgcluwENp3AlsKN/PloyO10HtmoqnFAQAcxPkgZN7wdfPfEd0zNGxbg==} + node-fetch-native@1.6.4: + resolution: {integrity: sha512-IhOigYzAKHd244OC0JIMIUrjzctirCmPkaIfhDeGcEETWof5zKYUW7e7MYvChGWh/4CJeXEgsRyGzuF334rOOQ==} + node-forge@1.3.1: resolution: {integrity: sha512-dPEtOeMvF9VMcYV/1Wb8CPoVAXtp6MKMlcbAt4ddqmGqUJ6fQZFXkNZNkNlfevtNkGtaSoXf/vNNNSvgrdXwtA==} engines: {node: '>= 6.13.0'} @@ -1084,15 +1068,15 @@ packages: resolution: {integrity: sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==} engines: {node: '>=0.10.0'} - once@1.4.0: - resolution: {integrity: sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==} - path-parse@1.0.7: resolution: {integrity: sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==} path-to-regexp@6.2.2: resolution: {integrity: sha512-GQX3SSMokngb36+whdpRXE+3f9V8UzyAorlYvOGx87ufGHehNTn5lCxrKtLyZ4Yl/wEKnNnr98ZzOwwDZV5ogw==} + pathe@1.1.2: + resolution: {integrity: sha512-whLdWMYL2TwI08hn8/ZqAbrVemu0LNaNNJZX73O6qaIdCTfXutsLhMkjdENX0qhsQ9uIimo4/aQOmXkoon2nDQ==} + picocolors@1.0.0: resolution: {integrity: sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==} @@ -1166,10 +1150,6 @@ packages: safe-buffer@5.2.1: resolution: {integrity: sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==} - safe-stable-stringify@2.4.3: - resolution: {integrity: sha512-e2bDA2WJT0wxseVd4lsDP4+3ONX6HpMXQa1ZhFQ7SU+GjvORCmShbCMltrtIDfkYhVHrOcPtj+KhmDBdPdZD1g==} - engines: {node: '>=10'} - scheduler@0.23.0: resolution: {integrity: sha512-CtuThmgHNg7zIZWAXi3AsyIzA3n4xx7aNyjwC2VJldO2LMVDhFK+63xGqq6CsJH4rTAt6/M+N4GhZiDYPx9eUw==} @@ -1207,11 +1187,6 @@ packages: resolution: {integrity: sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==} engines: {node: '>=8.0'} - ts-json-schema-generator@1.5.1: - resolution: {integrity: sha512-apX5qG2+NA66j7b4AJm8q/DpdTeOsjfh7A3LpKsUiil0FepkNwtN28zYgjrsiiya2/OPhsr/PSjX5FUYg79rCg==} - engines: {node: '>=10.0.0'} - hasBin: true - tslib@2.6.2: resolution: {integrity: sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==} @@ -1254,6 +1229,14 @@ packages: engines: {node: '>=14.17'} hasBin: true + typescript@5.5.4: + resolution: {integrity: sha512-Mtq29sKDAEYP7aljRgtPOpTvOfbwRWlS6dPRzwjdE+C0R4brX/GUyhHSecbHMFLNBLcJIPt9nl9yG5TZ1weH+Q==} + engines: {node: '>=14.17'} + hasBin: true + + ufo@1.5.4: + resolution: {integrity: sha512-UsUk3byDzKd04EyoZ7U4DOlxQaD14JUKQl6/P7wiX4FNvUfm3XL246n9W5AmqwW5RSFJ27NAuM0iLscAOYUiGQ==} + undici-types@5.26.5: resolution: {integrity: sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==} @@ -1261,6 +1244,9 @@ packages: resolution: {integrity: sha512-72RFADWFqKmUb2hmmvNODKL3p9hcB6Gt2DOQMis1SEBaV6a4MH8soBvzg+95CYhCKPFedut2JY9bMfrDl9D23g==} engines: {node: '>=14.0'} + unenv-nightly@1.10.0-1717606461.a117952: + resolution: {integrity: sha512-u3TfBX02WzbHTpaEfWEKwDijDSFAHcgXkayUZ+MVDrjhLFvgAJzFGTSTmwlEhwWi2exyRQey23ah9wELMM6etg==} + util-deprecate@1.0.2: resolution: {integrity: sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==} @@ -1292,24 +1278,21 @@ packages: terser: optional: true - workerd@1.20240405.0: - resolution: {integrity: sha512-AWrOSBh4Ll7sBWHuh0aywm8hDkKqsZmcwnDB0PVGszWZM5mndNBI5iJ/8haXVpdoyqkJQEVdhET9JDi4yU8tRg==} + workerd@1.20240725.0: + resolution: {integrity: sha512-VZwgejRcHsQ9FEPtc7v25ebINLAR+stL3q1hC1xByE+quskdoWpTXHkZwZ3IdSgvm9vPVbCbJw9p5mGnDByW2A==} engines: {node: '>=16'} hasBin: true - wrangler@3.51.2: - resolution: {integrity: sha512-8TRUwzPHj6+uPDzY0hBJ9/YwniEF9pqMGe5qbqLP/XsHTCWxIFib5go374zyCkmuVh23AwV7NuTA6gUtSqZ8pQ==} + wrangler@3.68.0: + resolution: {integrity: sha512-gsIeglkh5nOn1mHJs0bf1pOq/DvIt+umjO/5a867IYYXaN4j/ar5cRR1+F5ue3S7uEjYCLIZZjs8ESiPTSEt+Q==} engines: {node: '>=16.17.0'} hasBin: true peerDependencies: - '@cloudflare/workers-types': ^4.20240405.0 + '@cloudflare/workers-types': ^4.20240725.0 peerDependenciesMeta: '@cloudflare/workers-types': optional: true - wrappy@1.0.2: - resolution: {integrity: sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==} - ws@6.2.2: resolution: {integrity: sha512-zmhltoSR8u1cnDsD43TX59mzoMZsLKqUweyYBAIvTngR3shc0W6aOZylZmq/7hqyVxPdi+5Ud2QInblgyE72fw==} peerDependencies: @@ -1321,8 +1304,8 @@ packages: utf-8-validate: optional: true - ws@8.16.0: - resolution: {integrity: sha512-HS0c//TP7Ina87TfiPUz1rQzMhHrl/SG2guqRcTOIUYD2q8uhUdNHZYJUaQ8aTGPzCh+c6oawMKW35nFl1dxyQ==} + ws@8.18.0: + resolution: {integrity: sha512-8VbfWfHLbbwu3+N6OKsOMpBdT4kXPDDB9cJk2bJ6mh9ucxdlnNvH1e+roYkKmN9Nxw2yjz7VzeO9oOz2zJ04Pw==} engines: {node: '>=10.0.0'} peerDependencies: bufferutil: ^4.0.1 @@ -1340,9 +1323,10 @@ packages: xxhash-wasm@1.0.2: resolution: {integrity: sha512-ibF0Or+FivM9lNrg+HGJfVX8WJqgo+kCLDc4vx6xMeTce7Aj+DLttKbxxRR/gNLSAelRc1omAPlJ77N/Jem07A==} - y-durableobjects@0.4.0: - resolution: {integrity: sha512-7DnatXdH3SufzcgSXoI2oEP6nU+roF9iuGkrvooBM/jE9DCQNJszhXgHDqYexsLlu9x3byo0bcabBgAuo8RG5Q==} + y-durableobjects@1.0.0: + resolution: {integrity: sha512-ne4szYOpdQZJRStVFsUeAyJWCXxa3o0bI/6W4745QXKlJTrTyH7k8lewhdJomHjpWD4o+RlW4yl08QJAiZ9u/w==} peerDependencies: + '@cloudflare/workers-types': '>=4.20240405.0' hono: '>=4.3' y-leveldb@0.1.2: @@ -1367,6 +1351,10 @@ packages: resolution: {integrity: sha512-D+7KcUr0j+vBCUSKXXEWfA+bG4UQBviAwP3gYBhkstkgwy5+8diOPMx0iqLIOxNo/HxaREUimZRxqHGAHCL2BQ==} engines: {node: '>=16.0.0', npm: '>=8.0.0'} + yjs@13.6.18: + resolution: {integrity: sha512-GBTjO4QCmv2HFKFkYIJl7U77hIB1o22vSCSQD1Ge8ZxWbIbn8AltI4gyXbtL+g5/GJep67HCMq3Y5AmNwDSyEg==} + engines: {node: '>=16.0.0', npm: '>=8.0.0'} + youch@3.3.3: resolution: {integrity: sha512-qSFXUk3UZBLfggAW3dJKg0BMblG5biqSF8M34E06o5CSsZtH92u9Hqmj2RzGiHDi64fhe83+4tENFP2DB6t6ZA==} @@ -1416,26 +1404,26 @@ snapshots: '@biomejs/cli-win32-x64@1.6.4': optional: true - '@cloudflare/kv-asset-handler@0.3.1': + '@cloudflare/kv-asset-handler@0.3.4': dependencies: mime: 3.0.0 - '@cloudflare/workerd-darwin-64@1.20240405.0': + '@cloudflare/workerd-darwin-64@1.20240725.0': optional: true - '@cloudflare/workerd-darwin-arm64@1.20240405.0': + '@cloudflare/workerd-darwin-arm64@1.20240725.0': optional: true - '@cloudflare/workerd-linux-64@1.20240405.0': + '@cloudflare/workerd-linux-64@1.20240725.0': optional: true - '@cloudflare/workerd-linux-arm64@1.20240405.0': + '@cloudflare/workerd-linux-arm64@1.20240725.0': optional: true - '@cloudflare/workerd-windows-64@1.20240405.0': + '@cloudflare/workerd-windows-64@1.20240725.0': optional: true - '@cloudflare/workers-types@4.20240405.0': {} + '@cloudflare/workers-types@4.20240729.0': {} '@cspotcode/source-map-support@0.8.1': dependencies: @@ -1832,8 +1820,6 @@ snapshots: '@types/estree@1.0.5': {} - '@types/json-schema@7.0.15': {} - '@types/node-forge@1.3.11': dependencies: '@types/node': 20.12.6 @@ -1894,8 +1880,6 @@ snapshots: async-limiter@1.0.1: optional: true - balanced-match@1.0.2: {} - base64-js@1.5.1: optional: true @@ -1903,10 +1887,6 @@ snapshots: blake3-wasm@2.1.5: {} - brace-expansion@2.0.1: - dependencies: - balanced-match: 1.0.2 - braces@3.0.2: dependencies: fill-range: 7.0.1 @@ -1936,7 +1916,7 @@ snapshots: optionalDependencies: fsevents: 2.3.3 - commander@12.0.0: {} + consola@3.2.3: {} cookie@0.5.0: {} @@ -1944,6 +1924,8 @@ snapshots: data-uri-to-buffer@2.0.2: {} + date-fns@3.6.0: {} + debug@4.3.4: dependencies: ms: 2.1.2 @@ -1954,6 +1936,8 @@ snapshots: inherits: 2.0.4 optional: true + defu@6.1.4: {} + encoding-down@6.3.0: dependencies: abstract-leveldown: 6.3.0 @@ -2028,8 +2012,6 @@ snapshots: dependencies: to-regex-range: 5.0.1 - fs.realpath@1.0.0: {} - fsevents@2.3.3: optional: true @@ -2046,19 +2028,11 @@ snapshots: glob-to-regexp@0.4.1: {} - glob@8.1.0: - dependencies: - fs.realpath: 1.0.0 - inflight: 1.0.6 - inherits: 2.0.4 - minimatch: 5.1.6 - once: 1.4.0 - hasown@2.0.2: dependencies: function-bind: 1.1.2 - hono@4.4.10: {} + hono@4.5.3: {} ieee754@1.2.1: optional: true @@ -2066,12 +2040,8 @@ snapshots: immediate@3.3.0: optional: true - inflight@1.0.6: - dependencies: - once: 1.4.0 - wrappy: 1.0.2 - - inherits@2.0.4: {} + inherits@2.0.4: + optional: true is-binary-path@2.1.0: dependencies: @@ -2091,12 +2061,8 @@ snapshots: isomorphic.js@0.2.5: {} - js-base64@3.7.7: {} - js-tokens@4.0.0: {} - json5@2.2.3: {} - level-codec@9.0.2: dependencies: buffer: 5.7.1 @@ -2165,6 +2131,10 @@ snapshots: dependencies: isomorphic.js: 0.2.5 + lib0@0.2.96: + dependencies: + isomorphic.js: 0.2.5 + lodash.debounce@4.0.8: {} loose-envify@1.4.0: @@ -2180,7 +2150,7 @@ snapshots: mime@3.0.0: {} - miniflare@3.20240405.2: + miniflare@3.20240725.0: dependencies: '@cspotcode/source-map-support': 0.8.1 acorn: 8.11.3 @@ -2190,8 +2160,8 @@ snapshots: glob-to-regexp: 0.4.1 stoppable: 1.1.0 undici: 5.28.4 - workerd: 1.20240405.0 - ws: 8.16.0 + workerd: 1.20240725.0 + ws: 8.18.0 youch: 3.3.3 zod: 3.22.4 transitivePeerDependencies: @@ -2199,10 +2169,6 @@ snapshots: - supports-color - utf-8-validate - minimatch@5.1.6: - dependencies: - brace-expansion: 2.0.1 - ms@2.1.2: {} mustache@4.2.0: {} @@ -2212,6 +2178,8 @@ snapshots: napi-macros@2.0.0: optional: true + node-fetch-native@1.6.4: {} + node-forge@1.3.1: {} node-gyp-build@4.1.1: @@ -2219,14 +2187,12 @@ snapshots: normalize-path@3.0.0: {} - once@1.4.0: - dependencies: - wrappy: 1.0.2 - path-parse@1.0.7: {} path-to-regexp@6.2.2: {} + pathe@1.1.2: {} + picocolors@1.0.0: {} picomatch@2.3.1: {} @@ -2318,8 +2284,6 @@ snapshots: safe-buffer@5.2.1: optional: true - safe-stable-stringify@2.4.3: {} - scheduler@0.23.0: dependencies: loose-envify: 1.4.0 @@ -2353,16 +2317,6 @@ snapshots: dependencies: is-number: 7.0.0 - ts-json-schema-generator@1.5.1: - dependencies: - '@types/json-schema': 7.0.15 - commander: 12.0.0 - glob: 8.1.0 - json5: 2.2.3 - normalize-path: 3.0.0 - safe-stable-stringify: 2.4.3 - typescript: 5.4.4 - tslib@2.6.2: {} turbo-darwin-64@1.13.2: @@ -2394,12 +2348,25 @@ snapshots: typescript@5.4.4: {} + typescript@5.5.4: {} + + ufo@1.5.4: {} + undici-types@5.26.5: {} undici@5.28.4: dependencies: '@fastify/busboy': 2.1.1 + unenv-nightly@1.10.0-1717606461.a117952: + dependencies: + consola: 3.2.3 + defu: 6.1.4 + mime: 3.0.0 + node-fetch-native: 1.6.4 + pathe: 1.1.2 + ufo: 1.5.4 + util-deprecate@1.0.2: optional: true @@ -2412,60 +2379,60 @@ snapshots: '@types/node': 20.12.6 fsevents: 2.3.3 - workerd@1.20240405.0: + workerd@1.20240725.0: optionalDependencies: - '@cloudflare/workerd-darwin-64': 1.20240405.0 - '@cloudflare/workerd-darwin-arm64': 1.20240405.0 - '@cloudflare/workerd-linux-64': 1.20240405.0 - '@cloudflare/workerd-linux-arm64': 1.20240405.0 - '@cloudflare/workerd-windows-64': 1.20240405.0 + '@cloudflare/workerd-darwin-64': 1.20240725.0 + '@cloudflare/workerd-darwin-arm64': 1.20240725.0 + '@cloudflare/workerd-linux-64': 1.20240725.0 + '@cloudflare/workerd-linux-arm64': 1.20240725.0 + '@cloudflare/workerd-windows-64': 1.20240725.0 - wrangler@3.51.2(@cloudflare/workers-types@4.20240405.0): + wrangler@3.68.0(@cloudflare/workers-types@4.20240729.0): dependencies: - '@cloudflare/kv-asset-handler': 0.3.1 + '@cloudflare/kv-asset-handler': 0.3.4 '@esbuild-plugins/node-globals-polyfill': 0.2.3(esbuild@0.17.19) '@esbuild-plugins/node-modules-polyfill': 0.2.2(esbuild@0.17.19) blake3-wasm: 2.1.5 chokidar: 3.6.0 + date-fns: 3.6.0 esbuild: 0.17.19 - miniflare: 3.20240405.2 + miniflare: 3.20240725.0 nanoid: 3.3.7 path-to-regexp: 6.2.2 resolve: 1.22.8 resolve.exports: 2.0.2 selfsigned: 2.4.1 source-map: 0.6.1 - ts-json-schema-generator: 1.5.1 + unenv: unenv-nightly@1.10.0-1717606461.a117952 + workerd: 1.20240725.0 xxhash-wasm: 1.0.2 optionalDependencies: - '@cloudflare/workers-types': 4.20240405.0 + '@cloudflare/workers-types': 4.20240729.0 fsevents: 2.3.3 transitivePeerDependencies: - bufferutil - supports-color - utf-8-validate - wrappy@1.0.2: {} - ws@6.2.2: dependencies: async-limiter: 1.0.1 optional: true - ws@8.16.0: {} + ws@8.18.0: {} xtend@4.0.2: optional: true xxhash-wasm@1.0.2: {} - y-durableobjects@0.4.0(hono@4.4.10): + y-durableobjects@1.0.0(@cloudflare/workers-types@4.20240729.0)(hono@4.5.3): dependencies: - hono: 4.4.10 - js-base64: 3.7.7 - lib0: 0.2.93 - y-protocols: 1.0.6(yjs@13.6.14) - yjs: 13.6.14 + '@cloudflare/workers-types': 4.20240729.0 + hono: 4.5.3 + lib0: 0.2.96 + y-protocols: 1.0.6(yjs@13.6.18) + yjs: 13.6.18 y-leveldb@0.1.2(yjs@13.6.14): dependencies: @@ -2479,6 +2446,11 @@ snapshots: lib0: 0.2.93 yjs: 13.6.14 + y-protocols@1.0.6(yjs@13.6.18): + dependencies: + lib0: 0.2.93 + yjs: 13.6.18 + y-websocket@1.5.4(yjs@13.6.14): dependencies: lib0: 0.2.93 @@ -2496,6 +2468,10 @@ snapshots: dependencies: lib0: 0.2.93 + yjs@13.6.18: + dependencies: + lib0: 0.2.96 + youch@3.3.3: dependencies: cookie: 0.5.0