-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Create Bun.sh adapter #757
Conversation
😎 Merged successfully - details. |
New dependencies detected. Learn more about Socket for GitHub ↗︎
|
👍 Dependency issues cleared. Learn more about Socket for GitHub ↗︎ This PR previously contained dependency changes with security issues that have been resolved, removed, or ignored. Ignoring: Next stepsTake a deeper look at the dependencyTake a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support [AT] socket [DOT] dev. Remove the packageIf you happen to install a dependency that Socket reports as Known Malware you should immediately remove it and select a different dependency. For other alert types, you may may wish to investigate alternative packages or consider if there are other ways to mitigate the specific risk posed by the dependency. Mark a package as acceptable riskTo ignore an alert, reply with a comment starting with |
9ceea25
to
d399f04
Compare
@SocketSecurity ignore npm/@types/ws@8.5.10 |
55a071b
to
01db870
Compare
The bun examples fall into similar camp to our nodejs examples in that we'd need to run the servers to test them so I'm not going to add them to CI. |
Examples are done so I think this is good for a full review. |
Oh, and I chose |
I push a change to the README to run the server in hot reload mode because that makes it easier for the developer to make changes. I also added some log lines to the server to show the result so it's clearer what is happening. However, when I run the
|
Just realized that this needs readme and stuff |
Looks good to me 👍 I pushed a minor consistency/comment change to reflect the change of |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When you load this in a browser you get 2 requests which is what confused me in my earlier comment. I've added a note about this to the README.
5e706a6
to
db6f7eb
Compare
🤖 I have created a release *beep* *boop* --- <details><summary>@arcjet/bun: 1.0.0-alpha.13</summary> ## [1.0.0-alpha.13](https://github.com/arcjet/arcjet-js/compare/v1.0.0-alpha.12...@arcjet/bun-v1.0.0-alpha.13) (2024-05-20) ### 🚀 New Features * Create Bun.sh adapter ([#757](#757)) ([381dde5](381dde5)), closes [#475](#475) ### 📝 Documentation * **bun:** Update the request param on protect method ([#786](#786)) ([f51b8d9](f51b8d9)) ### Dependencies * The following workspace dependencies were updated * dependencies * @arcjet/ip bumped from 1.0.0-alpha.12 to 1.0.0-alpha.13 * arcjet bumped from 1.0.0-alpha.12 to 1.0.0-alpha.13 * devDependencies * @arcjet/eslint-config bumped from 1.0.0-alpha.12 to 1.0.0-alpha.13 * @arcjet/rollup-config bumped from 1.0.0-alpha.12 to 1.0.0-alpha.13 * @arcjet/tsconfig bumped from 1.0.0-alpha.12 to 1.0.0-alpha.13 </details> <details><summary>@arcjet/decorate: 1.0.0-alpha.13</summary> ## [1.0.0-alpha.13](https://github.com/arcjet/arcjet-js/compare/v1.0.0-alpha.12...@arcjet/decorate-v1.0.0-alpha.13) (2024-05-20) ### 📦 Dependencies * **dev:** Bump @rollup/wasm-node from 4.14.3 to 4.17.2 ([#708](#708)) ([6e548bf](6e548bf)) ### Dependencies * The following workspace dependencies were updated * dependencies * @arcjet/logger bumped from 1.0.0-alpha.12 to 1.0.0-alpha.13 * @arcjet/protocol bumped from 1.0.0-alpha.12 to 1.0.0-alpha.13 * devDependencies * @arcjet/eslint-config bumped from 1.0.0-alpha.12 to 1.0.0-alpha.13 * @arcjet/rollup-config bumped from 1.0.0-alpha.12 to 1.0.0-alpha.13 * @arcjet/tsconfig bumped from 1.0.0-alpha.12 to 1.0.0-alpha.13 </details> <details><summary>@arcjet/duration: 1.0.0-alpha.13</summary> ## [1.0.0-alpha.13](https://github.com/arcjet/arcjet-js/compare/v1.0.0-alpha.12...@arcjet/duration-v1.0.0-alpha.13) (2024-05-20) ### 📦 Dependencies * **dev:** Bump @rollup/wasm-node from 4.14.3 to 4.17.2 ([#708](#708)) ([6e548bf](6e548bf)) ### Dependencies * The following workspace dependencies were updated * devDependencies * @arcjet/eslint-config bumped from 1.0.0-alpha.12 to 1.0.0-alpha.13 * @arcjet/rollup-config bumped from 1.0.0-alpha.12 to 1.0.0-alpha.13 * @arcjet/tsconfig bumped from 1.0.0-alpha.12 to 1.0.0-alpha.13 </details> <details><summary>@arcjet/next: 1.0.0-alpha.13</summary> ## [1.0.0-alpha.13](https://github.com/arcjet/arcjet-js/compare/v1.0.0-alpha.12...@arcjet/next-v1.0.0-alpha.13) (2024-05-20) ### ⚠ BREAKING CHANGES * **eslint-config:** Update linting rules ([#774](#774)) ### 📦 Dependencies * **dev:** Bump @rollup/wasm-node from 4.14.3 to 4.17.2 ([#708](#708)) ([6e548bf](6e548bf)) ### 🧹 Miscellaneous Chores * **eslint-config:** Update linting rules ([#774](#774)) ([c223ba0](c223ba0)), closes [#337](#337) * **next:** Inline redirect interceptor to drop type import ([#785](#785)) ([e613372](e613372)) ### Dependencies * The following workspace dependencies were updated * dependencies * @arcjet/ip bumped from 1.0.0-alpha.12 to 1.0.0-alpha.13 * arcjet bumped from 1.0.0-alpha.12 to 1.0.0-alpha.13 * devDependencies * @arcjet/eslint-config bumped from 1.0.0-alpha.12 to 1.0.0-alpha.13 * @arcjet/rollup-config bumped from 1.0.0-alpha.12 to 1.0.0-alpha.13 * @arcjet/tsconfig bumped from 1.0.0-alpha.12 to 1.0.0-alpha.13 </details> <details><summary>@arcjet/node: 1.0.0-alpha.13</summary> ## [1.0.0-alpha.13](https://github.com/arcjet/arcjet-js/compare/v1.0.0-alpha.12...@arcjet/node-v1.0.0-alpha.13) (2024-05-20) ### 🚀 New Features * Filter cookie headers when normalizing with ArcjetHeaders ([#773](#773)) ([99b3e1f](99b3e1f)) ### 📦 Dependencies * **dev:** Bump @rollup/wasm-node from 4.14.3 to 4.17.2 ([#708](#708)) ([6e548bf](6e548bf)) ### Dependencies * The following workspace dependencies were updated * dependencies * @arcjet/ip bumped from 1.0.0-alpha.12 to 1.0.0-alpha.13 * arcjet bumped from 1.0.0-alpha.12 to 1.0.0-alpha.13 * devDependencies * @arcjet/eslint-config bumped from 1.0.0-alpha.12 to 1.0.0-alpha.13 * @arcjet/rollup-config bumped from 1.0.0-alpha.12 to 1.0.0-alpha.13 * @arcjet/tsconfig bumped from 1.0.0-alpha.12 to 1.0.0-alpha.13 </details> <details><summary>@arcjet/sveltekit: 1.0.0-alpha.13</summary> ## [1.0.0-alpha.13](https://github.com/arcjet/arcjet-js/compare/v1.0.0-alpha.12...@arcjet/sveltekit-v1.0.0-alpha.13) (2024-05-20) ### 🚀 New Features * Create SvelteKit adapter ([#775](#775)) ([002fdbb](002fdbb)), closes [#754](#754) ### Dependencies * The following workspace dependencies were updated * dependencies * @arcjet/ip bumped from 1.0.0-alpha.12 to 1.0.0-alpha.13 * arcjet bumped from 1.0.0-alpha.12 to 1.0.0-alpha.13 * devDependencies * @arcjet/eslint-config bumped from 1.0.0-alpha.12 to 1.0.0-alpha.13 * @arcjet/rollup-config bumped from 1.0.0-alpha.12 to 1.0.0-alpha.13 * @arcjet/tsconfig bumped from 1.0.0-alpha.12 to 1.0.0-alpha.13 </details> <details><summary>@arcjet/analyze: 1.0.0-alpha.13</summary> ## [1.0.0-alpha.13](https://github.com/arcjet/arcjet-js/compare/v1.0.0-alpha.12...@arcjet/analyze-v1.0.0-alpha.13) (2024-05-20) ### 🪲 Bug Fixes * **analyze:** Leverage string interpolation to import Wasm files on edge runtime ([#784](#784)) ([9b85908](9b85908)) ### 📦 Dependencies * **dev:** Bump @bytecodealliance/jco from 1.1.1 to 1.2.2 ([#707](#707)) ([39989b8](39989b8)) * **dev:** Bump @bytecodealliance/jco from 1.2.2 to 1.2.4 ([#725](#725)) ([7c43124](7c43124)) * **dev:** Bump @rollup/wasm-node from 4.14.3 to 4.17.2 ([#708](#708)) ([6e548bf](6e548bf)) ### Dependencies * The following workspace dependencies were updated * dependencies * @arcjet/logger bumped from 1.0.0-alpha.12 to 1.0.0-alpha.13 * devDependencies * @arcjet/eslint-config bumped from 1.0.0-alpha.12 to 1.0.0-alpha.13 * @arcjet/rollup-config bumped from 1.0.0-alpha.12 to 1.0.0-alpha.13 * @arcjet/tsconfig bumped from 1.0.0-alpha.12 to 1.0.0-alpha.13 </details> <details><summary>@arcjet/eslint-config: 1.0.0-alpha.13</summary> ## [1.0.0-alpha.13](https://github.com/arcjet/arcjet-js/compare/v1.0.0-alpha.12...@arcjet/eslint-config-v1.0.0-alpha.13) (2024-05-20) ### ⚠ BREAKING CHANGES * **eslint-config:** Update linting rules ([#774](#774)) ### 📦 Dependencies * Bump eslint-config-next from 14.2.2 to 14.2.3 ([#670](#670)) ([8d7ff7e](8d7ff7e)) * Bump eslint-config-turbo from 1.13.2 to 1.13.3 ([#686](#686)) ([1b9b68e](1b9b68e)) ### 🧹 Miscellaneous Chores * **eslint-config:** Update linting rules ([#774](#774)) ([c223ba0](c223ba0)), closes [#337](#337) </details> <details><summary>@arcjet/ip: 1.0.0-alpha.13</summary> ## [1.0.0-alpha.13](https://github.com/arcjet/arcjet-js/compare/v1.0.0-alpha.12...@arcjet/ip-v1.0.0-alpha.13) (2024-05-20) ### ⚠ BREAKING CHANGES * **eslint-config:** Update linting rules ([#774](#774)) ### 🚀 New Features * **ip:** Detect Fly-Client-IP header when available ([#751](#751)) ([73359f6](73359f6)) ### 📦 Dependencies * **dev:** Bump @rollup/wasm-node from 4.14.3 to 4.17.2 ([#708](#708)) ([6e548bf](6e548bf)) ### 🧹 Miscellaneous Chores * **eslint-config:** Update linting rules ([#774](#774)) ([c223ba0](c223ba0)), closes [#337](#337) ### Dependencies * The following workspace dependencies were updated * devDependencies * @arcjet/eslint-config bumped from 1.0.0-alpha.12 to 1.0.0-alpha.13 * @arcjet/rollup-config bumped from 1.0.0-alpha.12 to 1.0.0-alpha.13 * @arcjet/tsconfig bumped from 1.0.0-alpha.12 to 1.0.0-alpha.13 </details> <details><summary>@arcjet/logger: 1.0.0-alpha.13</summary> ## [1.0.0-alpha.13](https://github.com/arcjet/arcjet-js/compare/v1.0.0-alpha.12...@arcjet/logger-v1.0.0-alpha.13) (2024-05-20) ### ⚠ BREAKING CHANGES * **eslint-config:** Update linting rules ([#774](#774)) ### 📦 Dependencies * **dev:** Bump @rollup/wasm-node from 4.14.3 to 4.17.2 ([#708](#708)) ([6e548bf](6e548bf)) ### 🧹 Miscellaneous Chores * **eslint-config:** Update linting rules ([#774](#774)) ([c223ba0](c223ba0)), closes [#337](#337) ### Dependencies * The following workspace dependencies were updated * devDependencies * @arcjet/eslint-config bumped from 1.0.0-alpha.12 to 1.0.0-alpha.13 * @arcjet/rollup-config bumped from 1.0.0-alpha.12 to 1.0.0-alpha.13 * @arcjet/tsconfig bumped from 1.0.0-alpha.12 to 1.0.0-alpha.13 </details> <details><summary>@arcjet/protocol: 1.0.0-alpha.13</summary> ## [1.0.0-alpha.13](https://github.com/arcjet/arcjet-js/compare/v1.0.0-alpha.12...@arcjet/protocol-v1.0.0-alpha.13) (2024-05-20) ### ⚠ BREAKING CHANGES * **protocol:** Export only things we use from connect and buf ([#783](#783)) * **eslint-config:** Update linting rules ([#774](#774)) ### 🚀 New Features * Create Bun.sh adapter ([#757](#757)) ([381dde5](381dde5)), closes [#475](#475) * Create SvelteKit adapter ([#775](#775)) ([002fdbb](002fdbb)), closes [#754](#754) ### 🪲 Bug Fixes * **protocol:** Export only things we use from connect and buf ([#783](#783)) ([4596da5](4596da5)) ### 📦 Dependencies * Bump @bufbuild/protobuf from 1.8.0 to 1.9.0 ([#652](#652)) ([4cd2114](4cd2114)) * **dev:** Bump @rollup/wasm-node from 4.14.3 to 4.17.2 ([#708](#708)) ([6e548bf](6e548bf)) ### 🧹 Miscellaneous Chores * **eslint-config:** Update linting rules ([#774](#774)) ([c223ba0](c223ba0)), closes [#337](#337) ### Dependencies * The following workspace dependencies were updated * devDependencies * @arcjet/eslint-config bumped from 1.0.0-alpha.12 to 1.0.0-alpha.13 * @arcjet/rollup-config bumped from 1.0.0-alpha.12 to 1.0.0-alpha.13 * @arcjet/tsconfig bumped from 1.0.0-alpha.12 to 1.0.0-alpha.13 </details> <details><summary>@arcjet/rollup-config: 1.0.0-alpha.13</summary> ## [1.0.0-alpha.13](https://github.com/arcjet/arcjet-js/compare/v1.0.0-alpha.12...@arcjet/rollup-config-v1.0.0-alpha.13) (2024-05-20) ### 📦 Dependencies * **dev:** Bump @rollup/wasm-node from 4.14.3 to 4.17.2 ([#708](#708)) ([6e548bf](6e548bf)) ### Dependencies * The following workspace dependencies were updated * devDependencies * @arcjet/eslint-config bumped from 1.0.0-alpha.12 to 1.0.0-alpha.13 * @arcjet/tsconfig bumped from 1.0.0-alpha.12 to 1.0.0-alpha.13 </details> <details><summary>@arcjet/tsconfig: 1.0.0-alpha.13</summary> ## [1.0.0-alpha.13](https://github.com/arcjet/arcjet-js/compare/v1.0.0-alpha.12...@arcjet/tsconfig-v1.0.0-alpha.13) (2024-05-20) ### 🧹 Miscellaneous Chores * **@arcjet/tsconfig:** Synchronize arcjet-js versions </details> <details><summary>arcjet: 1.0.0-alpha.13</summary> ## [1.0.0-alpha.13](v1.0.0-alpha.12...arcjet-v1.0.0-alpha.13) (2024-05-20) ### ⚠ BREAKING CHANGES * **eslint-config:** Update linting rules ([#774](#774)) ### 🚀 New Features * Filter cookie headers when normalizing with ArcjetHeaders ([#773](#773)) ([99b3e1f](99b3e1f)) ### 📦 Dependencies * **dev:** Bump @rollup/wasm-node from 4.14.3 to 4.17.2 ([#708](#708)) ([6e548bf](6e548bf)) ### 🧹 Miscellaneous Chores * **eslint-config:** Update linting rules ([#774](#774)) ([c223ba0](c223ba0)), closes [#337](#337) ### Dependencies * The following workspace dependencies were updated * dependencies * @arcjet/analyze bumped from 1.0.0-alpha.12 to 1.0.0-alpha.13 * @arcjet/duration bumped from 1.0.0-alpha.12 to 1.0.0-alpha.13 * @arcjet/logger bumped from 1.0.0-alpha.12 to 1.0.0-alpha.13 * @arcjet/protocol bumped from 1.0.0-alpha.12 to 1.0.0-alpha.13 * devDependencies * @arcjet/eslint-config bumped from 1.0.0-alpha.12 to 1.0.0-alpha.13 * @arcjet/rollup-config bumped from 1.0.0-alpha.12 to 1.0.0-alpha.13 * @arcjet/tsconfig bumped from 1.0.0-alpha.12 to 1.0.0-alpha.13 </details> <details><summary>1.0.0-alpha.13</summary> ## [1.0.0-alpha.13](v1.0.0-alpha.12...v1.0.0-alpha.13) (2024-05-20) ### ⚠ BREAKING CHANGES * **protocol:** Export only things we use from connect and buf ([#783](#783)) * **eslint-config:** Update linting rules ([#774](#774)) ### 🚀 New Features * Create Bun.sh adapter ([#757](#757)) ([381dde5](381dde5)), closes [#475](#475) * Create SvelteKit adapter ([#775](#775)) ([002fdbb](002fdbb)), closes [#754](#754) * Filter cookie headers when normalizing with ArcjetHeaders ([#773](#773)) ([99b3e1f](99b3e1f)) * **ip:** Detect Fly-Client-IP header when available ([#751](#751)) ([73359f6](73359f6)) ### 🪲 Bug Fixes * **analyze:** Leverage string interpolation to import Wasm files on edge runtime ([#784](#784)) ([9b85908](9b85908)) * **protocol:** Export only things we use from connect and buf ([#783](#783)) ([4596da5](4596da5)) ### 📦 Dependencies * Bump @bufbuild/protobuf from 1.8.0 to 1.9.0 ([#652](#652)) ([4cd2114](4cd2114)) * Bump eslint-config-next from 14.2.2 to 14.2.3 ([#670](#670)) ([8d7ff7e](8d7ff7e)) * Bump eslint-config-turbo from 1.13.2 to 1.13.3 ([#686](#686)) ([1b9b68e](1b9b68e)) * **dev:** Bump @bytecodealliance/jco from 1.1.1 to 1.2.2 ([#707](#707)) ([39989b8](39989b8)) * **dev:** Bump @bytecodealliance/jco from 1.2.2 to 1.2.4 ([#725](#725)) ([7c43124](7c43124)) * **dev:** Bump @rollup/wasm-node from 4.14.3 to 4.17.2 ([#708](#708)) ([6e548bf](6e548bf)) * **example:** Bump @clerk/nextjs from 4.29.12 to 4.30.0 in /examples/nextjs-14-clerk-rl in the dependencies group ([#637](#637)) ([0fa5e3e](0fa5e3e)) * **example:** Bump @clerk/nextjs from 5.0.10 to 5.0.11 in /examples/nextjs-14-clerk-rl in the dependencies group ([#771](#771)) ([81d1078](81d1078)) * **example:** Bump @clerk/nextjs from 5.0.10 to 5.0.11 in /examples/nextjs-14-clerk-shield in the dependencies group ([#770](#770)) ([ae4c32e](ae4c32e)) * **example:** Bump @clerk/nextjs from 5.0.11 to 5.0.12 in /examples/nextjs-14-clerk-rl in the dependencies group ([#776](#776)) ([1454a35](1454a35)) * **example:** Bump @clerk/nextjs from 5.0.11 to 5.0.12 in /examples/nextjs-14-clerk-shield in the dependencies group ([#777](#777)) ([8b5c648](8b5c648)) * **example:** Bump @hono/node-server from 1.10.0 to 1.10.1 in /examples/nodejs-hono-rl in the dependencies group ([#640](#640)) ([5a8998f](5a8998f)) * **example:** Bump @sveltejs/kit from 2.5.8 to 2.5.9 in /examples/sveltekit in the dependencies group ([#790](#790)) ([9e14db1](9e14db1)) * **example:** Bump @types/react from 18.3.1 to 18.3.2 in /examples/nextjs-14-app-dir-rl in the dependencies group ([#741](#741)) ([625a165](625a165)) * **example:** Bump @types/react from 18.3.1 to 18.3.2 in /examples/nextjs-14-app-dir-validate-email in the dependencies group ([#746](#746)) ([a562bed](a562bed)) * **example:** Bump @types/react from 18.3.1 to 18.3.2 in /examples/nextjs-14-decorate in the dependencies group ([#739](#739)) ([b3da4e6](b3da4e6)) * **example:** Bump @types/react from 18.3.1 to 18.3.2 in /examples/nextjs-14-ip-details in the dependencies group ([#745](#745)) ([debbe35](debbe35)) * **example:** Bump @types/react from 18.3.1 to 18.3.2 in /examples/nextjs-14-nextauth-4 in the dependencies group ([#748](#748)) ([e521eb9](e521eb9)) * **example:** Bump @types/react from 18.3.1 to 18.3.2 in /examples/nextjs-14-pages-wrap in the dependencies group ([#742](#742)) ([9f8040a](9f8040a)) * **example:** Bump ai from 3.1.8 to 3.1.9 in /examples/nextjs-14-openai in the dependencies group ([#767](#767)) ([bd7cf85](bd7cf85)) * **example:** Bump ai from 3.1.9 to 3.1.12 in /examples/nextjs-14-openai in the dependencies group across 1 directory ([#779](#779)) ([225dbae](225dbae)) * **example:** Bump eslint-config-next from 14.2.2 to 14.2.3 in /examples/nextjs-example in the dependencies group ([#668](#668)) ([36bf48b](36bf48b)) * **example:** Bump hono from 4.2.5 to 4.2.7 in /examples/nodejs-hono-rl ([#654](#654)) ([330b317](330b317)) * **example:** Bump hono from 4.3.4 to 4.3.7 in /examples/nodejs-hono-rl in the dependencies group across 1 directory ([#762](#762)) ([8fb68f5](8fb68f5)) * **example:** Bump hono from 4.3.7 to 4.3.8 in /examples/nodejs-hono-rl in the dependencies group ([#789](#789)) ([94c5e01](94c5e01)) * **example:** Bump lucide-react from 0.370.0 to 0.371.0 in /examples/nextjs-14-authjs-5 in the dependencies group ([#638](#638)) ([3e79236](3e79236)) * **example:** Bump the dependencies group across 1 directory with 13 updates ([#760](#760)) ([18456d9](18456d9)) * **example:** Bump the dependencies group across 1 directory with 2 updates ([#732](#732)) ([0ff6abc](0ff6abc)) * **example:** Bump the dependencies group across 1 directory with 2 updates ([#736](#736)) ([608c9c4](608c9c4)) * **example:** Bump the dependencies group across 1 directory with 2 updates ([#737](#737)) ([41ddb45](41ddb45)) * **example:** Bump the dependencies group across 1 directory with 2 updates ([#763](#763)) ([c3d6b1d](c3d6b1d)) * **example:** Bump the dependencies group across 1 directory with 2 updates ([#764](#764)) ([ffc7739](ffc7739)) * **example:** Bump the dependencies group across 1 directory with 3 updates ([#761](#761)) ([eb6d64d](eb6d64d)) * **example:** Bump the dependencies group across 1 directory with 6 updates ([#689](#689)) ([f9ee74f](f9ee74f)) * **example:** Bump the dependencies group across 1 directory with 6 updates ([#692](#692)) ([d06033f](d06033f)) * **example:** Bump the dependencies group across 1 directory with 6 updates ([#698](#698)) ([3d14b66](3d14b66)) * **example:** Bump the dependencies group across 1 directory with 6 updates ([#699](#699)) ([a473eee](a473eee)) * **example:** Bump the dependencies group across 1 directory with 6 updates ([#702](#702)) ([1b7b3bb](1b7b3bb)) * **example:** Bump the dependencies group across 1 directory with 6 updates ([#703](#703)) ([6923c83](6923c83)) * **example:** Bump the dependencies group across 1 directory with 6 updates ([#768](#768)) ([f7fd624](f7fd624)) * **example:** Bump the dependencies group across 1 directory with 8 updates ([#735](#735)) ([0e08e60](0e08e60)) * **example:** Bump the dependencies group across 1 directory with 9 updates ([#740](#740)) ([74f4308](74f4308)) * **example:** Bump the dependencies group in /examples/nextjs-14-openai with 2 updates ([#636](#636)) ([5500faf](5500faf)) * **example:** Bump the dependencies group in /examples/nextjs-14-react-hook-form with 2 updates ([#639](#639)) ([1337efc](1337efc)) ### 📝 Documentation * **bun:** Update the request param on protect method ([#786](#786)) ([f51b8d9](f51b8d9)) * **examples:** Add NestJS example ([#688](#688)) ([f9cbc35](f9cbc35)) * **examples:** Updated to Clerk Core 2 (Clerk NextJS v5) ([#704](#704)) ([9049bad](9049bad)) ### 🧹 Miscellaneous Chores * **ci:** Ignore eslint 9 in SvelteKit example ([#766](#766)) ([6f8edac](6f8edac)) * **ci:** Version Bun and SvelteKit adapters ([#787](#787)) ([384e4a4](384e4a4)) * **eslint-config:** Update linting rules ([#774](#774)) ([c223ba0](c223ba0)), closes [#337](#337) * **example:** Add SvelteKit app ([#738](#738)) ([56f7dd3](56f7dd3)) * **example:** Remove Next 13 example ([#734](#734)) ([0cafdbe](0cafdbe)) * **next:** Inline redirect interceptor to drop type import ([#785](#785)) ([e613372](e613372)) </details> --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
This creates an Arcjet SDK adapter for bun.sh. This was much the same as the Node.js adapter, but I needed to introduce a new API to the adapter:
aj.handler()
. This API is used to wrap the request handler (calledfetch()
in Bun) to do some preprocessing on the request—in this case looking up the IP withserver.requestIP(request)
before storing it in a WeakMap.Users could use this without using the
aj.handler()
function, but they'd need to have a proper IP existing in the headers, such as theFly-Client-IP
on fly.io; however, those won't exist when running locally and theprotect()
call will error without usingaj.handler()
.TODO:
Closes #475