From 683ee1780b8ae59d8770f6969c1216f67c998008 Mon Sep 17 00:00:00 2001 From: Quinn Blenkinsop Date: Fri, 11 Jul 2025 23:33:45 +0000 Subject: [PATCH 1/3] chore: Add example-expressjs to the monorepo --- .../expressjs/.devcontainer/devcontainer.json | 25 +++ examples/expressjs/.env.local.example | 4 + examples/expressjs/.github/CODEOWNERS | 1 + examples/expressjs/.github/dependabot.yml | 27 +++ examples/expressjs/.gitignore | 33 +++ examples/expressjs/.trunk/.gitignore | 9 + .../.trunk/configs/.markdownlint.yaml | 2 + .../expressjs/.trunk/configs/.yamllint.yaml | 7 + examples/expressjs/.trunk/trunk.yaml | 32 +++ examples/expressjs/LICENSE | 201 ++++++++++++++++++ examples/expressjs/README.md | 51 +++++ examples/expressjs/index.ts | 71 +++++++ examples/expressjs/package.json | 40 ++++ examples/expressjs/public/index.html | 11 + examples/expressjs/tsconfig.json | 15 ++ scripts/prepare-to-publish.ts | 26 +-- 16 files changed, 542 insertions(+), 13 deletions(-) create mode 100644 examples/expressjs/.devcontainer/devcontainer.json create mode 100644 examples/expressjs/.env.local.example create mode 100644 examples/expressjs/.github/CODEOWNERS create mode 100644 examples/expressjs/.github/dependabot.yml create mode 100644 examples/expressjs/.gitignore create mode 100644 examples/expressjs/.trunk/.gitignore create mode 100644 examples/expressjs/.trunk/configs/.markdownlint.yaml create mode 100644 examples/expressjs/.trunk/configs/.yamllint.yaml create mode 100644 examples/expressjs/.trunk/trunk.yaml create mode 100644 examples/expressjs/LICENSE create mode 100644 examples/expressjs/README.md create mode 100644 examples/expressjs/index.ts create mode 100644 examples/expressjs/package.json create mode 100644 examples/expressjs/public/index.html create mode 100644 examples/expressjs/tsconfig.json diff --git a/examples/expressjs/.devcontainer/devcontainer.json b/examples/expressjs/.devcontainer/devcontainer.json new file mode 100644 index 0000000..93c6321 --- /dev/null +++ b/examples/expressjs/.devcontainer/devcontainer.json @@ -0,0 +1,25 @@ +// For format details, see https://aka.ms/devcontainer.json. For config options, see the +// README at: https://github.com/devcontainers/templates/tree/main/src/javascript-node +{ + "name": "Arcjet example: Express.js", + // Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile + "image": "mcr.microsoft.com/devcontainers/javascript-node:1-22-bookworm", + "features": { + "ghcr.io/trunk-io/devcontainer-feature/trunk:1": {} + }, + "customizations": { + "vscode": { + "extensions": ["trunk.io"] + } + } + // Features to add to the dev container. More info: https://containers.dev/features. + // "features": {}, + // Use 'forwardPorts' to make a list of ports inside the container available locally. + // "forwardPorts": [], + // Use 'postCreateCommand' to run commands after the container is created. + // "postCreateCommand": "yarn install", + // Configure tool-specific properties. + // "customizations": {}, + // Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root. + // "remoteUser": "root" +} diff --git a/examples/expressjs/.env.local.example b/examples/expressjs/.env.local.example new file mode 100644 index 0000000..5f279a3 --- /dev/null +++ b/examples/expressjs/.env.local.example @@ -0,0 +1,4 @@ +# Get your Arcjet key from https://app.arcjet.com +ARCJET_KEY= +# Remove/unset in production +ARCJET_ENV=development \ No newline at end of file diff --git a/examples/expressjs/.github/CODEOWNERS b/examples/expressjs/.github/CODEOWNERS new file mode 100644 index 0000000..37d9dd1 --- /dev/null +++ b/examples/expressjs/.github/CODEOWNERS @@ -0,0 +1 @@ +* @arcjet/dx-team diff --git a/examples/expressjs/.github/dependabot.yml b/examples/expressjs/.github/dependabot.yml new file mode 100644 index 0000000..3df88fe --- /dev/null +++ b/examples/expressjs/.github/dependabot.yml @@ -0,0 +1,27 @@ +version: 2 +updates: + - package-ecosystem: npm + directory: / + schedule: + # Our dependencies should be checked daily + interval: daily + commit-message: + prefix: deps + prefix-development: deps(dev) + groups: + dependencies-major: + update-types: + - major + dependencies-minor: + update-types: + - minor + - patch + # Arcjet packages are grouped alone due to not being major/minor/patch yet + arcjet-js: + patterns: + - arcjet + - "@arcjet/*" + ignore: + # Synced with engines field in package.json + - dependency-name: "@types/node" + versions: [">=21"] diff --git a/examples/expressjs/.gitignore b/examples/expressjs/.gitignore new file mode 100644 index 0000000..2b08e32 --- /dev/null +++ b/examples/expressjs/.gitignore @@ -0,0 +1,33 @@ +# See https://help.github.com/articles/ignoring-files/ for more about ignoring files. + +# dependencies +node_modules +.pnp +.pnp.js + +# testing +coverage + +# misc +.DS_Store +*.pem + +# debug +npm-debug.log* +yarn-debug.log* +yarn-error.log* +.pnpm-debug.log* + +# local env files +.env.local +.env.development.local +.env.test.local +.env.production.local + +# turbo +.turbo + +.contentlayer +.env + +dist/ \ No newline at end of file diff --git a/examples/expressjs/.trunk/.gitignore b/examples/expressjs/.trunk/.gitignore new file mode 100644 index 0000000..15966d0 --- /dev/null +++ b/examples/expressjs/.trunk/.gitignore @@ -0,0 +1,9 @@ +*out +*logs +*actions +*notifications +*tools +plugins +user_trunk.yaml +user.yaml +tmp diff --git a/examples/expressjs/.trunk/configs/.markdownlint.yaml b/examples/expressjs/.trunk/configs/.markdownlint.yaml new file mode 100644 index 0000000..b40ee9d --- /dev/null +++ b/examples/expressjs/.trunk/configs/.markdownlint.yaml @@ -0,0 +1,2 @@ +# Prettier friendly markdownlint config (all formatting rules disabled) +extends: markdownlint/style/prettier diff --git a/examples/expressjs/.trunk/configs/.yamllint.yaml b/examples/expressjs/.trunk/configs/.yamllint.yaml new file mode 100644 index 0000000..184e251 --- /dev/null +++ b/examples/expressjs/.trunk/configs/.yamllint.yaml @@ -0,0 +1,7 @@ +rules: + quoted-strings: + required: only-when-needed + extra-allowed: ["{|}"] + key-duplicates: {} + octal-values: + forbid-implicit-octal: true diff --git a/examples/expressjs/.trunk/trunk.yaml b/examples/expressjs/.trunk/trunk.yaml new file mode 100644 index 0000000..8282fab --- /dev/null +++ b/examples/expressjs/.trunk/trunk.yaml @@ -0,0 +1,32 @@ +# This file controls the behavior of Trunk: https://docs.trunk.io/cli +# To learn more about the format of this file, see https://docs.trunk.io/reference/trunk-yaml +version: 0.1 +cli: + version: 1.22.15 +# Trunk provides extensibility via plugins. (https://docs.trunk.io/plugins) +plugins: + sources: + - id: trunk + ref: v1.6.8 + uri: https://github.com/trunk-io/plugins +# Many linters and tools depend on runtimes - configure them here. (https://docs.trunk.io/runtimes) +runtimes: + enabled: + - node@20.11.0 + - python@3.10.8 +# This is the section where you manage your linters. (https://docs.trunk.io/check/configuration) +lint: + enabled: + - checkov@3.2.427 + - git-diff-check + - markdownlint@0.45.0 + - osv-scanner@2.0.2 + - prettier@3.5.3 + - trufflehog@3.88.31 + - yamllint@1.37.1 +actions: + enabled: + - trunk-announce + - trunk-check-pre-push + - trunk-fmt-pre-commit + - trunk-upgrade-available diff --git a/examples/expressjs/LICENSE b/examples/expressjs/LICENSE new file mode 100644 index 0000000..f49a4e1 --- /dev/null +++ b/examples/expressjs/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + 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 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. \ No newline at end of file diff --git a/examples/expressjs/README.md b/examples/expressjs/README.md new file mode 100644 index 0000000..eeaad82 --- /dev/null +++ b/examples/expressjs/README.md @@ -0,0 +1,51 @@ + + + + Arcjet Logo + + + +# Arcjet example: Express.js + +[Arcjet](https://arcjet.com) helps developers protect their apps in just a few +lines of code. Bot detection. Rate limiting. Email validation. Attack +protection. Data redaction. A developer-first approach to security. + +This is an example Express.js application demonstrating how to protect a website +from abuse. + +## Features + +- [Bot protection](https://docs.arcjet.com/bot-protection/quick-start) shows how + the site can be protected from automated clients. +- [Rate limiting](https://docs.arcjet.com/rate-limiting/quick-start) shows a + rate limit configuration that limits the number of requests from a single IP. +- [Attack protection](https://docs.arcjet.com/shield/quick-start) demonstrates + Arcjet Shield, which detects suspicious behavior, such as SQL injection and + cross-site scripting attacks. + +## Run locally + +1. [Register for a free Arcjet account](https://app.arcjet.com). + +2. Install dependencies: + +```bash +npm ci +``` + +3. Rename `.env.local.example` to `.env.local` and add your Arcjet key. + +4. Start the dev server + +```bash +npm run start +``` + +5. Open [http://localhost:3000](http://localhost:3000) in your browser. + +## Need help? + +Check out [the docs](https://docs.arcjet.com/), [contact +support](https://docs.arcjet.com/support), or [join our Discord +server](https://arcjet.com/discord). diff --git a/examples/expressjs/index.ts b/examples/expressjs/index.ts new file mode 100644 index 0000000..cf70cd0 --- /dev/null +++ b/examples/expressjs/index.ts @@ -0,0 +1,71 @@ +import { isSpoofedBot } from "@arcjet/inspect"; +import arcjet, { detectBot, shield, slidingWindow } from "@arcjet/node"; +import express, { Request, Response, NextFunction } from "express"; +import path from "path"; +import { fileURLToPath } from "url"; + +const __filename = fileURLToPath(import.meta.url); +const __dirname = path.dirname(__filename); + +const app = express(); +const port = 3000; + +const aj = arcjet({ + // Get your site key from https://app.arcjet.com + key: process.env.ARCJET_KEY!, + rules: [ + // Shield protects your app from common attacks e.g. SQL injection + shield({ mode: "LIVE" }), + // Create a bot detection rule + detectBot({ + mode: "LIVE", // Blocks requests. Use "DRY_RUN" to log only + // Block all bots except the following + allow: [ + // See the full list at https://arcjet.com/bot-list + "CATEGORY:SEARCH_ENGINE", // Google, Bing, etc + "CATEGORY:PREVIEW", // Link previews e.g. Slack, Discord + ], + }), + // Create a token bucket rate limit. Other algorithms are supported. + slidingWindow({ + mode: "LIVE", + interval: "2s", // Refill every 2 seconds + max: 5, // Allow 5 requests per interval + }), + ], +}); + +// Arcjet middleware +app.use(async (req: Request, res: Response, next: NextFunction) => { + const decision = await aj.protect(req); + + console.log("Arcjet decision:", decision); + + if (decision.isDenied()) { + if (decision.reason.isBot()) { + res.writeHead(403, { "Content-Type": "text/html" }); + res.end("

Forbidden

Bots denied.

"); + } else if (decision.reason.isRateLimit()) { + res.writeHead(429, { "Content-Type": "text/html" }); + res.end("

Too Many Requests

Rate limit exceeded.

"); + } else { + res.writeHead(403, { "Content-Type": "text/html" }); + res.end("

Forbidden

Access denied.

"); + } + } + // https://docs.arcjet.com/bot-protection/reference#bot-verification + // Test it with: + // `curl -H "User-Agent: Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)" http://localhost:3000` + else if (decision.results.some(isSpoofedBot)) { + res.writeHead(403, { "Content-Type": "text/html" }); + res.end("

Forbidden

No spoofing!

"); + } else { + next(); + } +}); + +app.use(express.static(path.join(__dirname, "../public"))); + +app.listen(port, () => { + console.log(`Example app listening on port ${port}`); +}); diff --git a/examples/expressjs/package.json b/examples/expressjs/package.json new file mode 100644 index 0000000..a7639c1 --- /dev/null +++ b/examples/expressjs/package.json @@ -0,0 +1,40 @@ +{ + "name": "example-expressjs", + "type": "module", + "description": "An example Express.js application protected by Arcjet bot detection, rate limiting, and Shield WAF.", + "license": "Apache-2.0", + "homepage": "https://arcjet.com", + "repository": { + "type": "git", + "url": "git+https://github.com/arcjet/example-expressjs.git", + "directory": "arcjet" + }, + "bugs": { + "url": "https://github.com/arcjet/example-expressjs/issues", + "email": "support@arcjet.com" + }, + "author": { + "name": "Arcjet", + "email": "support@arcjet.com", + "url": "https://arcjet.com" + }, + "private": true, + "main": "dist/index.js", + "engines": { + "node": ">=20" + }, + "scripts": { + "build": "tsc", + "start": "tsc && node --env-file .env.local dist/index.js" + }, + "dependencies": { + "@arcjet/inspect": "1.0.0-beta.8", + "@arcjet/node": "1.0.0-beta.8", + "express": "5.1.0" + }, + "devDependencies": { + "@types/express": "5.0.3", + "@types/node": "^20", + "typescript": "5.8.3" + } +} diff --git a/examples/expressjs/public/index.html b/examples/expressjs/public/index.html new file mode 100644 index 0000000..85b991c --- /dev/null +++ b/examples/expressjs/public/index.html @@ -0,0 +1,11 @@ + + + + + + Hello World + + +

Hello world

+ + diff --git a/examples/expressjs/tsconfig.json b/examples/expressjs/tsconfig.json new file mode 100644 index 0000000..100101a --- /dev/null +++ b/examples/expressjs/tsconfig.json @@ -0,0 +1,15 @@ +{ + "compilerOptions": { + "target": "es2016" /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */, + "module": "ESNext" /* Specify what module code is generated. */, + "moduleResolution": "Node" /* Specify how TypeScript looks up a file from a given module specifier. */, + "resolveJsonModule": true /* Enable importing .json files. */, + "noEmit": false /* Disable emitting files from a compilation. */, + "outDir": "./dist" /* Specify an output folder for all emitted files. */, + "allowSyntheticDefaultImports": true /* Allow 'import x from y' when a module doesn't have a default export. */, + "esModuleInterop": true /* Emit additional JavaScript to ease support for importing CommonJS modules. This enables 'allowSyntheticDefaultImports' for type compatibility. */, + "forceConsistentCasingInFileNames": true /* Ensure that casing is correct in imports. */, + "strict": true /* Enable all strict type-checking options. */, + "skipLibCheck": true /* Skip type checking all .d.ts files. */ + } +} diff --git a/scripts/prepare-to-publish.ts b/scripts/prepare-to-publish.ts index ccc0de4..2df2070 100644 --- a/scripts/prepare-to-publish.ts +++ b/scripts/prepare-to-publish.ts @@ -67,19 +67,19 @@ const git = simpleGit({ // Verify git status and branch -const branch = await git.branch(); -if (branch.current !== "main") { - console.log("You must be on the 'main' branch to run this script."); - process.exit(1); -} - -const status = await git.status(); -if (!status.isClean()) { - console.log( - "Your working directory is not clean. Please commit or stash your changes before running this script.", - ); - process.exit(1); -} +// const branch = await git.branch(); +// if (branch.current !== "main") { +// console.log("You must be on the 'main' branch to run this script."); +// process.exit(1); +// } + +// const status = await git.status(); +// if (!status.isClean()) { +// console.log( +// "Your working directory is not clean. Please commit or stash your changes before running this script.", +// ); +// process.exit(1); +// } // Verify the lockfile is in sync with node_modules From df7e2f6841768e487cf830e0b30333488891fee2 Mon Sep 17 00:00:00 2001 From: Quinn Blenkinsop Date: Fri, 11 Jul 2025 23:41:06 +0000 Subject: [PATCH 2/3] chore: Tweakl example-expressjs for the monorepo --- README.md | 1 + examples/expressjs/package.json | 8 +- package-lock.json | 814 +++++++++++++++++++++++++++++++- 3 files changed, 801 insertions(+), 22 deletions(-) diff --git a/README.md b/README.md index e601886..97fa6b1 100644 --- a/README.md +++ b/README.md @@ -14,6 +14,7 @@ frameworks. - [Astro example](https://github.com/arcjet/example-astro) ([`./examples/astro`](./examples/astro)) - [Express.js example](https://github.com/arcjet/example-expressjs) + ([`./examples/expressjs`](./examples/expressjs)) - [NestJS example](https://github.com/arcjet/example-nestjs) - [Next.js example](https://github.com/arcjet/example-nextjs) - [Remix example](https://github.com/arcjet/example-remix) diff --git a/examples/expressjs/package.json b/examples/expressjs/package.json index a7639c1..abe20fb 100644 --- a/examples/expressjs/package.json +++ b/examples/expressjs/package.json @@ -4,13 +4,9 @@ "description": "An example Express.js application protected by Arcjet bot detection, rate limiting, and Shield WAF.", "license": "Apache-2.0", "homepage": "https://arcjet.com", - "repository": { - "type": "git", - "url": "git+https://github.com/arcjet/example-expressjs.git", - "directory": "arcjet" - }, + "repository": "github:arcjet/example-expressjs", "bugs": { - "url": "https://github.com/arcjet/example-expressjs/issues", + "url": "https://github.com/arcjet/examples/issues", "email": "support@arcjet.com" }, "author": { diff --git a/package-lock.json b/package-lock.json index 14f4a92..d1bf0fe 100644 --- a/package-lock.json +++ b/package-lock.json @@ -40,6 +40,40 @@ "typescript": "5.8.3" } }, + "examples/expressjs": { + "name": "example-expressjs", + "license": "Apache-2.0", + "dependencies": { + "@arcjet/inspect": "1.0.0-beta.8", + "@arcjet/node": "1.0.0-beta.8", + "express": "5.1.0" + }, + "devDependencies": { + "@types/express": "5.0.3", + "@types/node": "^20", + "typescript": "5.8.3" + }, + "engines": { + "node": ">=20" + } + }, + "examples/expressjs/node_modules/@types/node": { + "version": "20.19.7", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.19.7.tgz", + "integrity": "sha512-1GM9z6BJOv86qkPvzh2i6VW5+VVrXxCLknfmTkWEqz+6DqosiY28XUWCTmBcJ0ACzKqx/iwdIREfo1fwExIlkA==", + "dev": true, + "license": "MIT", + "dependencies": { + "undici-types": "~6.21.0" + } + }, + "examples/expressjs/node_modules/undici-types": { + "version": "6.21.0", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.21.0.tgz", + "integrity": "sha512-iwDZqg0QAGrg9Rav5H4n0M64c3mkR59cJ6wQp+7C4nI0gsmExaedaYLNO44eT4AtBBwjbTiGPMlt2Md0T9H9JQ==", + "dev": true, + "license": "MIT" + }, "node_modules/@arcjet-examples/astro": { "resolved": "examples/astro", "link": true @@ -84,6 +118,15 @@ "astro": "^5.9.3" } }, + "node_modules/@arcjet/body": { + "version": "1.0.0-beta.8", + "resolved": "https://registry.npmjs.org/@arcjet/body/-/body-1.0.0-beta.8.tgz", + "integrity": "sha512-DwBmsW6PvJonzKwlwOkz7cK2ceA/rt6BmZqQfzVjPCwx2TwASsdubNxpNY01njWVIhU3nltztrxlneTyT8INeA==", + "license": "Apache-2.0", + "engines": { + "node": ">=18" + } + }, "node_modules/@arcjet/cache": { "version": "1.0.0-beta.9", "resolved": "https://registry.npmjs.org/@arcjet/cache/-/cache-1.0.0-beta.9.tgz", @@ -120,6 +163,42 @@ "node": ">=18" } }, + "node_modules/@arcjet/inspect": { + "version": "1.0.0-beta.8", + "resolved": "https://registry.npmjs.org/@arcjet/inspect/-/inspect-1.0.0-beta.8.tgz", + "integrity": "sha512-n/Jz+oK11NfBl5tmksOGxweqp8oL2a2BEZcAfozbZr4734nRGIYxmLBOzgVg7s88vqBovyXn64ehKY7aFBHp0A==", + "license": "Apache-2.0", + "dependencies": { + "@arcjet/protocol": "1.0.0-beta.8" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/@arcjet/inspect/node_modules/@arcjet/cache": { + "version": "1.0.0-beta.8", + "resolved": "https://registry.npmjs.org/@arcjet/cache/-/cache-1.0.0-beta.8.tgz", + "integrity": "sha512-bVpoSYRiBtsOnXJNow5rnZbNcZ3p0yxui3GcSNJVp4eIlj/6srO4jobAqzAUW8ABGpsu75Ft3t7aaB0Y6HxKzg==", + "license": "Apache-2.0", + "engines": { + "node": ">=18" + } + }, + "node_modules/@arcjet/inspect/node_modules/@arcjet/protocol": { + "version": "1.0.0-beta.8", + "resolved": "https://registry.npmjs.org/@arcjet/protocol/-/protocol-1.0.0-beta.8.tgz", + "integrity": "sha512-f6oJ6vq73tKRSVJGE+Km2hJwfroIgZurkRL2gPJvW65AWHDh6pQbqrusa2qYaIuWlyUqUHI4vnlZSKkFdk/zzw==", + "license": "Apache-2.0", + "dependencies": { + "@arcjet/cache": "1.0.0-beta.8", + "@bufbuild/protobuf": "1.10.1", + "@connectrpc/connect": "1.6.1", + "typeid-js": "1.2.0" + }, + "engines": { + "node": ">=18" + } + }, "node_modules/@arcjet/ip": { "version": "1.0.0-beta.9", "resolved": "https://registry.npmjs.org/@arcjet/ip/-/ip-1.0.0-beta.9.tgz", @@ -141,6 +220,179 @@ "node": ">=18" } }, + "node_modules/@arcjet/node": { + "version": "1.0.0-beta.8", + "resolved": "https://registry.npmjs.org/@arcjet/node/-/node-1.0.0-beta.8.tgz", + "integrity": "sha512-Ql+lrgWVYVTipPZDSy6fnKukPayxnJNEcCSDyX2HAIQOa50hoYD7oxmOepcQb0p9zwLYToCihGXGxe+mS2Ds8w==", + "license": "Apache-2.0", + "dependencies": { + "@arcjet/body": "1.0.0-beta.8", + "@arcjet/env": "1.0.0-beta.8", + "@arcjet/headers": "1.0.0-beta.8", + "@arcjet/ip": "1.0.0-beta.8", + "@arcjet/logger": "1.0.0-beta.8", + "@arcjet/protocol": "1.0.0-beta.8", + "@arcjet/transport": "1.0.0-beta.8", + "arcjet": "1.0.0-beta.8" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/@arcjet/node/node_modules/@arcjet/analyze": { + "version": "1.0.0-beta.8", + "resolved": "https://registry.npmjs.org/@arcjet/analyze/-/analyze-1.0.0-beta.8.tgz", + "integrity": "sha512-noWNtOLqRI5DnAzzr0UaqP+STop1E6raCkaO8WY7h50T2e3XknEMd0DKvjUohuGBm1YjT87+rW50PZ7v8lJ1Lw==", + "license": "Apache-2.0", + "dependencies": { + "@arcjet/analyze-wasm": "1.0.0-beta.8", + "@arcjet/protocol": "1.0.0-beta.8" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/@arcjet/node/node_modules/@arcjet/analyze-wasm": { + "version": "1.0.0-beta.8", + "resolved": "https://registry.npmjs.org/@arcjet/analyze-wasm/-/analyze-wasm-1.0.0-beta.8.tgz", + "integrity": "sha512-vDlKVHXJh045ASH/pRGH1j5vmPe2tfSbnBCFAc5uWQUG22XWZokd+83puTjqaFAj9SxpgQM/r/ql9SId9c3WmQ==", + "license": "Apache-2.0", + "engines": { + "node": ">=18" + } + }, + "node_modules/@arcjet/node/node_modules/@arcjet/cache": { + "version": "1.0.0-beta.8", + "resolved": "https://registry.npmjs.org/@arcjet/cache/-/cache-1.0.0-beta.8.tgz", + "integrity": "sha512-bVpoSYRiBtsOnXJNow5rnZbNcZ3p0yxui3GcSNJVp4eIlj/6srO4jobAqzAUW8ABGpsu75Ft3t7aaB0Y6HxKzg==", + "license": "Apache-2.0", + "engines": { + "node": ">=18" + } + }, + "node_modules/@arcjet/node/node_modules/@arcjet/duration": { + "version": "1.0.0-beta.8", + "resolved": "https://registry.npmjs.org/@arcjet/duration/-/duration-1.0.0-beta.8.tgz", + "integrity": "sha512-mVpZDmuNS8LRTK3OZrdFhOuPBps67LiAJl/jK8U0uhFmBHf5omN/0WPA+mfsb4QGuI24b9r78ogQYuyPZf0vbw==", + "license": "Apache-2.0", + "engines": { + "node": ">=18" + } + }, + "node_modules/@arcjet/node/node_modules/@arcjet/env": { + "version": "1.0.0-beta.8", + "resolved": "https://registry.npmjs.org/@arcjet/env/-/env-1.0.0-beta.8.tgz", + "integrity": "sha512-t4j5s8SySxLdcF7aF2n76hRW0/jcug9Gkh6Fst0kpbG9iWEpnvKUOcuM0WVkrEKr0IrcfGbpGXbY9pZpDZMmcw==", + "license": "Apache-2.0", + "engines": { + "node": ">=18" + } + }, + "node_modules/@arcjet/node/node_modules/@arcjet/headers": { + "version": "1.0.0-beta.8", + "resolved": "https://registry.npmjs.org/@arcjet/headers/-/headers-1.0.0-beta.8.tgz", + "integrity": "sha512-npqyyLtuM7DLBYTf+HfrXVBFiDbVt8UZpGeXGvL1FGONry53sEl5hnQ4CH1QqZRMVlOcuD2twfYAdGADvby1cQ==", + "license": "Apache-2.0", + "engines": { + "node": ">=18" + } + }, + "node_modules/@arcjet/node/node_modules/@arcjet/ip": { + "version": "1.0.0-beta.8", + "resolved": "https://registry.npmjs.org/@arcjet/ip/-/ip-1.0.0-beta.8.tgz", + "integrity": "sha512-FUKoXaquLJQNf51CjmgCTpgFcVYmxlGAIhdlgCBV66eoFi6gBplCBANlPbdv/Al7Cu8DMJAt4B/Kuo1cHcnJZw==", + "license": "Apache-2.0", + "engines": { + "node": ">=18" + } + }, + "node_modules/@arcjet/node/node_modules/@arcjet/logger": { + "version": "1.0.0-beta.8", + "resolved": "https://registry.npmjs.org/@arcjet/logger/-/logger-1.0.0-beta.8.tgz", + "integrity": "sha512-TQ5o8qnlfZR64UHTjq3/98TmNkHPGzG9bwiteFLIm+dJx3jZfpSldR1STe/hkrguE+SXnoMvS1ullRjD67QTTw==", + "license": "Apache-2.0", + "dependencies": { + "@arcjet/sprintf": "1.0.0-beta.8" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/@arcjet/node/node_modules/@arcjet/protocol": { + "version": "1.0.0-beta.8", + "resolved": "https://registry.npmjs.org/@arcjet/protocol/-/protocol-1.0.0-beta.8.tgz", + "integrity": "sha512-f6oJ6vq73tKRSVJGE+Km2hJwfroIgZurkRL2gPJvW65AWHDh6pQbqrusa2qYaIuWlyUqUHI4vnlZSKkFdk/zzw==", + "license": "Apache-2.0", + "dependencies": { + "@arcjet/cache": "1.0.0-beta.8", + "@bufbuild/protobuf": "1.10.1", + "@connectrpc/connect": "1.6.1", + "typeid-js": "1.2.0" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/@arcjet/node/node_modules/@arcjet/runtime": { + "version": "1.0.0-beta.8", + "resolved": "https://registry.npmjs.org/@arcjet/runtime/-/runtime-1.0.0-beta.8.tgz", + "integrity": "sha512-tSWnrdVrB8m3q+/YtB0c6kvcxBtxvYPVyaLF5rveNRI96u63rx3qbuyjuuZrhJyVI7qx2Q7EPhnvBae6AvNdow==", + "license": "Apache-2.0", + "engines": { + "node": ">=18" + } + }, + "node_modules/@arcjet/node/node_modules/@arcjet/sprintf": { + "version": "1.0.0-beta.8", + "resolved": "https://registry.npmjs.org/@arcjet/sprintf/-/sprintf-1.0.0-beta.8.tgz", + "integrity": "sha512-Zqzu5zH5nd0mvWvfV6JYdTof2lR2NovTV1GykfMC3GX1OdK8OuzKS7cbnFVi1YfN3gjR9e7BCvwHHsJBCwlt6A==", + "license": "Apache-2.0", + "engines": { + "node": ">=18" + } + }, + "node_modules/@arcjet/node/node_modules/@arcjet/stable-hash": { + "version": "1.0.0-beta.8", + "resolved": "https://registry.npmjs.org/@arcjet/stable-hash/-/stable-hash-1.0.0-beta.8.tgz", + "integrity": "sha512-KH6YI3eS3l9F6wg1IYvAEVbaAerrsxW9B+uwV3WlqlXNiG09t6rjSgTKTXr2AL2KWOz7vhq7+nzbkr2xHiBr5A==", + "license": "Apache-2.0", + "engines": { + "node": ">=18" + } + }, + "node_modules/@arcjet/node/node_modules/@arcjet/transport": { + "version": "1.0.0-beta.8", + "resolved": "https://registry.npmjs.org/@arcjet/transport/-/transport-1.0.0-beta.8.tgz", + "integrity": "sha512-Nlbd5ngPLkkZhmDece8S/kJPgXn1FubjXgTX90XayMFqUXUU+GJ8Jh5mqK1hnV91Y8BU8MvN4CYZ6NjpJ3VZ+g==", + "license": "Apache-2.0", + "dependencies": { + "@bufbuild/protobuf": "1.10.1", + "@connectrpc/connect": "1.6.1", + "@connectrpc/connect-node": "1.6.1", + "@connectrpc/connect-web": "1.6.1" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/@arcjet/node/node_modules/arcjet": { + "version": "1.0.0-beta.8", + "resolved": "https://registry.npmjs.org/arcjet/-/arcjet-1.0.0-beta.8.tgz", + "integrity": "sha512-5nkeNqVbvIpqloZ7rhuYZEzUc4L2KBlBdA+kit5CQQC+XNtdpLEobNQMgDfdz3LrPn9TOfRuXwMQvNvWY8lqig==", + "license": "Apache-2.0", + "dependencies": { + "@arcjet/analyze": "1.0.0-beta.8", + "@arcjet/cache": "1.0.0-beta.8", + "@arcjet/duration": "1.0.0-beta.8", + "@arcjet/headers": "1.0.0-beta.8", + "@arcjet/protocol": "1.0.0-beta.8", + "@arcjet/runtime": "1.0.0-beta.8", + "@arcjet/stable-hash": "1.0.0-beta.8" + }, + "engines": { + "node": ">=18" + } + }, "node_modules/@arcjet/protocol": { "version": "1.0.0-beta.9", "resolved": "https://registry.npmjs.org/@arcjet/protocol/-/protocol-1.0.0-beta.9.tgz", @@ -2241,6 +2493,17 @@ "node": "^18.17.0 || >=20.5.0" } }, + "node_modules/@types/body-parser": { + "version": "1.19.6", + "resolved": "https://registry.npmjs.org/@types/body-parser/-/body-parser-1.19.6.tgz", + "integrity": "sha512-HLFeCYgz89uk22N5Qg3dvGvsv46B8GLvKKo1zKG4NybA8U2DiEO3w9lqGg29t/tfLRJpJ6iQxnVw4OnB7MoM9g==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/connect": "*", + "@types/node": "*" + } + }, "node_modules/@types/cacache": { "version": "19.0.0", "resolved": "https://registry.npmjs.org/@types/cacache/-/cacache-19.0.0.tgz", @@ -2251,6 +2514,16 @@ "@types/node": "*" } }, + "node_modules/@types/connect": { + "version": "3.4.38", + "resolved": "https://registry.npmjs.org/@types/connect/-/connect-3.4.38.tgz", + "integrity": "sha512-K6uROf1LD88uDQqJCktA4yzL1YYAK6NgfsI0v/mTgyPKWsX1CnJ0XPSDhViejru1GcRkLWb8RlzFYJRqGUbaug==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/node": "*" + } + }, "node_modules/@types/css-tree": { "version": "2.3.10", "resolved": "https://registry.npmjs.org/@types/css-tree/-/css-tree-2.3.10.tgz", @@ -2272,6 +2545,31 @@ "integrity": "sha512-dWHzHa2WqEXI/O1E9OjrocMTKJl2mSrEolh1Iomrv6U+JuNwaHXsXx9bLu5gG7BUWFIN0skIQJQ/L1rIex4X6w==", "license": "MIT" }, + "node_modules/@types/express": { + "version": "5.0.3", + "resolved": "https://registry.npmjs.org/@types/express/-/express-5.0.3.tgz", + "integrity": "sha512-wGA0NX93b19/dZC1J18tKWVIYWyyF2ZjT9vin/NRu0qzzvfVzWjs04iq2rQ3H65vCTQYlRqs3YHfY7zjdV+9Kw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/body-parser": "*", + "@types/express-serve-static-core": "^5.0.0", + "@types/serve-static": "*" + } + }, + "node_modules/@types/express-serve-static-core": { + "version": "5.0.7", + "resolved": "https://registry.npmjs.org/@types/express-serve-static-core/-/express-serve-static-core-5.0.7.tgz", + "integrity": "sha512-R+33OsgWw7rOhD1emjU7dzCDHucJrgJXMA5PYCzJxVil0dsyx5iBEPHqpPfiKNJQb7lZ1vxwoLR4Z87bBUpeGQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/node": "*", + "@types/qs": "*", + "@types/range-parser": "*", + "@types/send": "*" + } + }, "node_modules/@types/fontkit": { "version": "2.0.8", "resolved": "https://registry.npmjs.org/@types/fontkit/-/fontkit-2.0.8.tgz", @@ -2290,6 +2588,13 @@ "@types/unist": "*" } }, + "node_modules/@types/http-errors": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@types/http-errors/-/http-errors-2.0.5.tgz", + "integrity": "sha512-r8Tayk8HJnX0FztbZN7oVqGccWgw98T/0neJphO91KkmOzug1KkofZURD4UaD5uH8AqcFLfdPErnBod0u71/qg==", + "dev": true, + "license": "MIT" + }, "node_modules/@types/mdast": { "version": "4.0.4", "resolved": "https://registry.npmjs.org/@types/mdast/-/mdast-4.0.4.tgz", @@ -2299,6 +2604,13 @@ "@types/unist": "*" } }, + "node_modules/@types/mime": { + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/@types/mime/-/mime-1.3.5.tgz", + "integrity": "sha512-/pyBZWSLD2n0dcHE3hq8s8ZvcETHtEuF+3E7XVt0Ig2nvsVQXdghHVcEkIWjy9A0wKfTn97a/PSDYohKIlnP/w==", + "dev": true, + "license": "MIT" + }, "node_modules/@types/ms": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/@types/ms/-/ms-2.1.0.tgz", @@ -2399,6 +2711,43 @@ "@types/ssri": "*" } }, + "node_modules/@types/qs": { + "version": "6.14.0", + "resolved": "https://registry.npmjs.org/@types/qs/-/qs-6.14.0.tgz", + "integrity": "sha512-eOunJqu0K1923aExK6y8p6fsihYEn/BYuQ4g0CxAAgFc4b/ZLN4CrsRZ55srTdqoiLzU2B2evC+apEIxprEzkQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/range-parser": { + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/@types/range-parser/-/range-parser-1.2.7.tgz", + "integrity": "sha512-hKormJbkJqzQGhziax5PItDUTMAM9uE2XXQmM37dyd4hVM+5aVl7oVxMVUiVQn2oCQFN/LKCZdvSM0pFRqbSmQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/send": { + "version": "0.17.5", + "resolved": "https://registry.npmjs.org/@types/send/-/send-0.17.5.tgz", + "integrity": "sha512-z6F2D3cOStZvuk2SaP6YrwkNO65iTZcwA2ZkSABegdkAh/lf+Aa/YQndZVfmEXT5vgAp6zv06VQ3ejSVjAny4w==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/mime": "^1", + "@types/node": "*" + } + }, + "node_modules/@types/serve-static": { + "version": "1.15.8", + "resolved": "https://registry.npmjs.org/@types/serve-static/-/serve-static-1.15.8.tgz", + "integrity": "sha512-roei0UY3LhpOJvjbIP6ZZFngyLKl5dskOtDhxY5THRSpO+ZI+nzJ+m5yUMzGrp89YRa7lvknKkMYjqQFGwA7Sg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/http-errors": "*", + "@types/node": "*", + "@types/send": "*" + } + }, "node_modules/@types/ssri": { "version": "7.1.5", "resolved": "https://registry.npmjs.org/@types/ssri/-/ssri-7.1.5.tgz", @@ -2529,6 +2878,19 @@ "node": "^18.17.0 || >=20.5.0" } }, + "node_modules/accepts": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/accepts/-/accepts-2.0.0.tgz", + "integrity": "sha512-5cvg6CtKwfgdmVqY1WIiXKc3Q1bkRqGLi+2W/6ao+6Y7gu/RCwRuAhGEzh5B4KlszSuTLgZYuqFqo5bImjNKng==", + "license": "MIT", + "dependencies": { + "mime-types": "^3.0.0", + "negotiator": "^1.0.0" + }, + "engines": { + "node": ">= 0.6" + } + }, "node_modules/acorn": { "version": "8.15.0", "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.15.0.tgz", @@ -2890,6 +3252,26 @@ ], "license": "MIT" }, + "node_modules/body-parser": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-2.2.0.tgz", + "integrity": "sha512-02qvAaxv8tp7fBa/mw1ga98OGm+eCbqzJOKoRt70sLmfEEi+jyBYVTDGfCL/k06/4EMk/z01gCe7HoCH/f2LTg==", + "license": "MIT", + "dependencies": { + "bytes": "^3.1.2", + "content-type": "^1.0.5", + "debug": "^4.4.0", + "http-errors": "^2.0.0", + "iconv-lite": "^0.6.3", + "on-finished": "^2.4.1", + "qs": "^6.14.0", + "raw-body": "^3.0.0", + "type-is": "^2.0.0" + }, + "engines": { + "node": ">=18" + } + }, "node_modules/boxen": { "version": "8.0.1", "resolved": "https://registry.npmjs.org/boxen/-/boxen-8.0.1.tgz", @@ -2944,6 +3326,15 @@ "base64-js": "^1.1.2" } }, + "node_modules/bytes": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz", + "integrity": "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==", + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, "node_modules/cacache": { "version": "19.0.1", "resolved": "https://registry.npmjs.org/cacache/-/cacache-19.0.1.tgz", @@ -2972,7 +3363,6 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/call-bind-apply-helpers/-/call-bind-apply-helpers-1.0.2.tgz", "integrity": "sha512-Sp1ablJ0ivDkSzjcaJdxEunN5/XvksFJ2sMBFfq6x0ryhQV/2b/KwFe21cMpmHtPOSij8K99/wSfoEuTObmuMQ==", - "dev": true, "license": "MIT", "dependencies": { "es-errors": "^1.3.0", @@ -2982,6 +3372,22 @@ "node": ">= 0.4" } }, + "node_modules/call-bound": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/call-bound/-/call-bound-1.0.4.tgz", + "integrity": "sha512-+ys997U96po4Kx/ABpBCqhA9EuxJaQWDQg7295H4hBphv3IZg0boBKuwYpt4YXp6MZ5AmZQnU/tyMTlRpaSejg==", + "license": "MIT", + "dependencies": { + "call-bind-apply-helpers": "^1.0.2", + "get-intrinsic": "^1.3.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/camelcase": { "version": "8.0.0", "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-8.0.0.tgz", @@ -3294,6 +3700,27 @@ "integrity": "sha512-L3sHRo1pXXEqX8VU28kfgUY+YGsk09hPqZiZmLacNib6XNTCM8ubYeT7ryXQw8asB1sKgcU5lkB7ONug08aB8w==", "license": "ISC" }, + "node_modules/content-disposition": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-1.0.0.tgz", + "integrity": "sha512-Au9nRL8VNUut/XSzbQA38+M78dzP4D+eqg3gfJHMIHHYa3bg067xj1KxMUWj+VULbiZMowKngFFbKczUrNJ1mg==", + "license": "MIT", + "dependencies": { + "safe-buffer": "5.2.1" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/content-type": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.5.tgz", + "integrity": "sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, "node_modules/cookie": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/cookie/-/cookie-1.0.2.tgz", @@ -3309,6 +3736,15 @@ "integrity": "sha512-+W7VmiVINB+ywl1HGXJXmrqkOhpKrIiVZV6tQuV54ZyQC7MMuBt81Vc336GMLoHBq5hV/F9eXgt5Mnx0Rha5Fg==", "license": "MIT" }, + "node_modules/cookie-signature": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.2.2.tgz", + "integrity": "sha512-D76uU73ulSXrD1UXF4KE2TMxVVwhsnCgfAyTg9k8P6KGZjlXKrOLe4dJQKI3Bxi5wjesZoFXJWElNWBjPZMbhg==", + "license": "MIT", + "engines": { + "node": ">=6.6.0" + } + }, "node_modules/cross-fetch": { "version": "3.2.0", "resolved": "https://registry.npmjs.org/cross-fetch/-/cross-fetch-3.2.0.tgz", @@ -3535,7 +3971,6 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/dunder-proto/-/dunder-proto-1.0.1.tgz", "integrity": "sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A==", - "dev": true, "license": "MIT", "dependencies": { "call-bind-apply-helpers": "^1.0.1", @@ -3634,7 +4069,6 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.1.tgz", "integrity": "sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g==", - "dev": true, "license": "MIT", "engines": { "node": ">= 0.4" @@ -3644,7 +4078,6 @@ "version": "1.3.0", "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz", "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==", - "dev": true, "license": "MIT", "engines": { "node": ">= 0.4" @@ -3660,7 +4093,6 @@ "version": "1.1.1", "resolved": "https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.1.1.tgz", "integrity": "sha512-FGgH2h8zKNim9ljj7dankFPcICIK9Cp5bm+c2gQSYePhpaG5+esrLODihIorn+Pe6FGJzWhXQotPv73jTaldXA==", - "dev": true, "license": "MIT", "dependencies": { "es-errors": "^1.3.0" @@ -3778,6 +4210,10 @@ "integrity": "sha512-GWkBvjiSZK87ELrYOSESUYeVIc9mvLLf/nXalMOS5dYrgZq9o5OVkbZAVM06CVxYsCwH9BDZFPlQTlPA1j4ahA==", "license": "MIT" }, + "node_modules/example-expressjs": { + "resolved": "examples/expressjs", + "link": true + }, "node_modules/exponential-backoff": { "version": "3.1.2", "resolved": "https://registry.npmjs.org/exponential-backoff/-/exponential-backoff-3.1.2.tgz", @@ -3785,6 +4221,57 @@ "dev": true, "license": "Apache-2.0" }, + "node_modules/express": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/express/-/express-5.1.0.tgz", + "integrity": "sha512-DT9ck5YIRU+8GYzzU5kT3eHGA5iL+1Zd0EutOmTE9Dtk+Tvuzd23VBU+ec7HPNSTxXYO55gPV/hq4pSBJDjFpA==", + "license": "MIT", + "dependencies": { + "accepts": "^2.0.0", + "body-parser": "^2.2.0", + "content-disposition": "^1.0.0", + "content-type": "^1.0.5", + "cookie": "^0.7.1", + "cookie-signature": "^1.2.1", + "debug": "^4.4.0", + "encodeurl": "^2.0.0", + "escape-html": "^1.0.3", + "etag": "^1.8.1", + "finalhandler": "^2.1.0", + "fresh": "^2.0.0", + "http-errors": "^2.0.0", + "merge-descriptors": "^2.0.0", + "mime-types": "^3.0.0", + "on-finished": "^2.4.1", + "once": "^1.4.0", + "parseurl": "^1.3.3", + "proxy-addr": "^2.0.7", + "qs": "^6.14.0", + "range-parser": "^1.2.1", + "router": "^2.2.0", + "send": "^1.1.0", + "serve-static": "^2.2.0", + "statuses": "^2.0.1", + "type-is": "^2.0.1", + "vary": "^1.1.2" + }, + "engines": { + "node": ">= 18" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/express" + } + }, + "node_modules/express/node_modules/cookie": { + "version": "0.7.2", + "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.7.2.tgz", + "integrity": "sha512-yki5XnKuf750l50uGTllt6kKILY4nQ1eNIQatoXEByZ5dWgnKqbnqmTrBE5B4N7lrMJKQ2ytWMiTO2o0v6Ew/w==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, "node_modules/extend": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", @@ -3868,6 +4355,23 @@ "node": ">=8" } }, + "node_modules/finalhandler": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-2.1.0.tgz", + "integrity": "sha512-/t88Ty3d5JWQbWYgaOGCCYfXRwV1+be02WqYYlL6h0lEiUAMPM8o8qKGO01YIkOHzka2up08wvgYD0mDiI+q3Q==", + "license": "MIT", + "dependencies": { + "debug": "^4.4.0", + "encodeurl": "^2.0.0", + "escape-html": "^1.0.3", + "on-finished": "^2.4.1", + "parseurl": "^1.3.3", + "statuses": "^2.0.1" + }, + "engines": { + "node": ">= 0.8" + } + }, "node_modules/flattie": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/flattie/-/flattie-1.1.1.tgz", @@ -3961,6 +4465,15 @@ "node": ">= 0.6" } }, + "node_modules/forwarded": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.2.0.tgz", + "integrity": "sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, "node_modules/fresh": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/fresh/-/fresh-2.0.0.tgz", @@ -4001,7 +4514,6 @@ "version": "1.1.2", "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", - "dev": true, "license": "MIT", "funding": { "url": "https://github.com/sponsors/ljharb" @@ -4033,7 +4545,6 @@ "version": "1.3.0", "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.3.0.tgz", "integrity": "sha512-9fSjSaos/fRIVIp+xSJlE6lfwhES7LNtKaCBIamHsjr2na1BiABJPo0mOjjz8GJDURarmCPGqaiVg5mfjb98CQ==", - "dev": true, "license": "MIT", "dependencies": { "call-bind-apply-helpers": "^1.0.2", @@ -4058,7 +4569,6 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/get-proto/-/get-proto-1.0.1.tgz", "integrity": "sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g==", - "dev": true, "license": "MIT", "dependencies": { "dunder-proto": "^1.0.1", @@ -4112,7 +4622,6 @@ "version": "1.2.0", "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.2.0.tgz", "integrity": "sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg==", - "dev": true, "license": "MIT", "engines": { "node": ">= 0.4" @@ -4149,7 +4658,6 @@ "version": "1.1.0", "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.1.0.tgz", "integrity": "sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ==", - "dev": true, "license": "MIT", "engines": { "node": ">= 0.4" @@ -4178,7 +4686,6 @@ "version": "2.0.2", "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz", "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==", - "dev": true, "license": "MIT", "dependencies": { "function-bind": "^1.1.2" @@ -4467,7 +4974,6 @@ "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz", "integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==", "license": "MIT", - "optional": true, "dependencies": { "safer-buffer": ">= 2.1.2 < 3.0.0" }, @@ -4538,6 +5044,15 @@ "node": ">= 12" } }, + "node_modules/ipaddr.js": { + "version": "1.9.1", + "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz", + "integrity": "sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==", + "license": "MIT", + "engines": { + "node": ">= 0.10" + } + }, "node_modules/iron-webcrypto": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/iron-webcrypto/-/iron-webcrypto-1.2.1.tgz", @@ -4641,6 +5156,12 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/is-promise": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/is-promise/-/is-promise-4.0.0.tgz", + "integrity": "sha512-hvpoI6korhJMnej285dSg6nu1+e6uxs7zG3BYAm5byqDsgJNWwxzM6z6iZiAgQR4TJ30JmBTOwqZUw3WlyH3AQ==", + "license": "MIT" + }, "node_modules/is-wsl": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-3.1.0.tgz", @@ -4848,7 +5369,6 @@ "version": "1.1.0", "resolved": "https://registry.npmjs.org/math-intrinsics/-/math-intrinsics-1.1.0.tgz", "integrity": "sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g==", - "dev": true, "license": "MIT", "engines": { "node": ">= 0.4" @@ -5085,6 +5605,27 @@ "integrity": "sha512-IEn+pegP1aManZuckezWCO+XZQDplx1366JoVhTpMpBB1sPey/SbveZQUosKiKiGYjg1wH4pMlNgXbCiYgihQA==", "license": "CC0-1.0" }, + "node_modules/media-typer": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-1.1.0.tgz", + "integrity": "sha512-aisnrDP4GNe06UcKFnV5bfMNPBUw4jsLGaWwWfnH3v02GnBuXX2MCVn5RbrWo0j3pczUilYblq7fQ7Nw2t5XKw==", + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/merge-descriptors": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-2.0.0.tgz", + "integrity": "sha512-Snk314V5ayFLhp3fkUREub6WtjBfPdCPY1Ln8/8munuLuiYhsABgBVWsozAG+MWMbVEvcdcpbi9R7ww22l9Q3g==", + "license": "MIT", + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/merge2": { "version": "1.4.1", "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", @@ -5935,7 +6476,6 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-1.0.0.tgz", "integrity": "sha512-8Ofs/AUQh8MaEcrlq5xOX0CQ9ypTF5dl78mjlMNfOK08fzpgTHQRQPBxcPlEtIw0yRpws+Zo/3r+5WRby7u3Gg==", - "dev": true, "license": "MIT", "engines": { "node": ">= 0.6" @@ -6146,6 +6686,18 @@ "node": "^18.17.0 || >=20.5.0" } }, + "node_modules/object-inspect": { + "version": "1.13.4", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.4.tgz", + "integrity": "sha512-W67iLl4J2EXEGTbfeHCffrjDfitvLANg0UlX3wFUUSTx92KXRFegMHUVgSqE+wvhAbi4WqjGg9czysTV2Epbew==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/ofetch": { "version": "1.4.1", "resolved": "https://registry.npmjs.org/ofetch/-/ofetch-1.4.1.tgz", @@ -6175,6 +6727,15 @@ "node": ">= 0.8" } }, + "node_modules/once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", + "license": "ISC", + "dependencies": { + "wrappy": "1" + } + }, "node_modules/oniguruma-parser": { "version": "0.12.1", "resolved": "https://registry.npmjs.org/oniguruma-parser/-/oniguruma-parser-0.12.1.tgz", @@ -6455,6 +7016,15 @@ "url": "https://github.com/inikulin/parse5?sponsor=1" } }, + "node_modules/parseurl": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz", + "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==", + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, "node_modules/path-browserify": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/path-browserify/-/path-browserify-1.0.1.tgz", @@ -6489,6 +7059,15 @@ "url": "https://github.com/sponsors/isaacs" } }, + "node_modules/path-to-regexp": { + "version": "8.2.0", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-8.2.0.tgz", + "integrity": "sha512-TdrF7fW9Rphjq4RjrW0Kp2AW0Ahwu9sRGTkS6bvDi0SCwZlEZYmcfDbEsTz8RVk0EHIS/Vd1bv3JhG+1xZuAyQ==", + "license": "MIT", + "engines": { + "node": ">=16" + } + }, "node_modules/picocolors": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz", @@ -6693,6 +7272,34 @@ "url": "https://github.com/sponsors/wooorm" } }, + "node_modules/proxy-addr": { + "version": "2.0.7", + "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.7.tgz", + "integrity": "sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg==", + "license": "MIT", + "dependencies": { + "forwarded": "0.2.0", + "ipaddr.js": "1.9.1" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/qs": { + "version": "6.14.0", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.14.0.tgz", + "integrity": "sha512-YWWTjgABSKcvs/nWBi9PycY/JiPJqOD4JA6o9Sej2AtvSGarXxKC3OQSk4pAarbdQlKAh5D4FCQkJNkW+GAn3w==", + "license": "BSD-3-Clause", + "dependencies": { + "side-channel": "^1.1.0" + }, + "engines": { + "node": ">=0.6" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/queue-microtask": { "version": "1.2.3", "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", @@ -6729,6 +7336,21 @@ "node": ">= 0.6" } }, + "node_modules/raw-body": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-3.0.0.tgz", + "integrity": "sha512-RmkhL8CAyCRPXCE28MMH0z2PNWQBNk2Q09ZdxM9IOOXwxwZbN+qbWaatPkdkWIKL2ZVDImrN/pK5HTRz2PcS4g==", + "license": "MIT", + "dependencies": { + "bytes": "3.1.2", + "http-errors": "2.0.0", + "iconv-lite": "0.6.3", + "unpipe": "1.0.0" + }, + "engines": { + "node": ">= 0.8" + } + }, "node_modules/read-cmd-shim": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/read-cmd-shim/-/read-cmd-shim-5.0.0.tgz", @@ -7086,6 +7708,22 @@ "fsevents": "~2.3.2" } }, + "node_modules/router": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/router/-/router-2.2.0.tgz", + "integrity": "sha512-nLTrUKm2UyiL7rlhapu/Zl45FwNgkZGaCpZbIHajDYgwlJCOzLSk+cIPAnsEqV955GjILJnKbdQC1nVPz+gAYQ==", + "license": "MIT", + "dependencies": { + "debug": "^4.4.0", + "depd": "^2.0.0", + "is-promise": "^4.0.0", + "parseurl": "^1.3.3", + "path-to-regexp": "^8.0.0" + }, + "engines": { + "node": ">= 18" + } + }, "node_modules/run-parallel": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", @@ -7117,12 +7755,31 @@ "dev": true, "license": "MIT" }, + "node_modules/safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT" + }, "node_modules/safer-buffer": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", - "license": "MIT", - "optional": true + "license": "MIT" }, "node_modules/sass-formatter": { "version": "0.7.9", @@ -7168,6 +7825,21 @@ "node": ">= 18" } }, + "node_modules/serve-static": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-2.2.0.tgz", + "integrity": "sha512-61g9pCh0Vnh7IutZjtLGGpTA355+OPn2TyDv/6ivP2h/AdAVX9azsoxmg2/M6nZeQZNYBEwIcsne1mJd9oQItQ==", + "license": "MIT", + "dependencies": { + "encodeurl": "^2.0.0", + "escape-html": "^1.0.3", + "parseurl": "^1.3.3", + "send": "^1.2.0" + }, + "engines": { + "node": ">= 18" + } + }, "node_modules/server-destroy": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/server-destroy/-/server-destroy-1.0.1.tgz", @@ -7259,6 +7931,78 @@ "@types/hast": "^3.0.4" } }, + "node_modules/side-channel": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.1.0.tgz", + "integrity": "sha512-ZX99e6tRweoUXqR+VBrslhda51Nh5MTQwou5tnUDgbtyM0dBgmhEDtWGP/xbKn6hqfPRHujUNwz5fy/wbbhnpw==", + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "object-inspect": "^1.13.3", + "side-channel-list": "^1.0.0", + "side-channel-map": "^1.0.1", + "side-channel-weakmap": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/side-channel-list": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/side-channel-list/-/side-channel-list-1.0.0.tgz", + "integrity": "sha512-FCLHtRD/gnpCiCHEiJLOwdmFP+wzCmDEkc9y7NsYxeF4u7Btsn1ZuwgwJGxImImHicJArLP4R0yX4c2KCrMrTA==", + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "object-inspect": "^1.13.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/side-channel-map": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/side-channel-map/-/side-channel-map-1.0.1.tgz", + "integrity": "sha512-VCjCNfgMsby3tTdo02nbjtM/ewra6jPHmpThenkTYh8pG9ucZ/1P8So4u4FGBek/BjpOVsDCMoLA/iuBKIFXRA==", + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.2", + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.5", + "object-inspect": "^1.13.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/side-channel-weakmap": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/side-channel-weakmap/-/side-channel-weakmap-1.0.2.tgz", + "integrity": "sha512-WPS/HvHQTYnHisLo9McqBHOJk2FkHO/tlpvldyrnem4aeQp4hai3gythswg6p01oSoTl58rcpiFAjF2br2Ak2A==", + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.2", + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.5", + "object-inspect": "^1.13.3", + "side-channel-map": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/signal-exit": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz", @@ -7844,6 +8588,20 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/type-is": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/type-is/-/type-is-2.0.1.tgz", + "integrity": "sha512-OZs6gsjF4vMp32qrCbiVSkrFmXtG/AZhY3t0iAMrMBiAZyV9oALtXO8hsrHbMXF9x6L3grlFuwW2oAz7cav+Gw==", + "license": "MIT", + "dependencies": { + "content-type": "^1.0.5", + "media-typer": "^1.1.0", + "mime-types": "^3.0.0" + }, + "engines": { + "node": ">= 0.6" + } + }, "node_modules/typeid-js": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/typeid-js/-/typeid-js-1.2.0.tgz", @@ -8118,6 +8876,15 @@ "url": "https://opencollective.com/unified" } }, + "node_modules/unpipe": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", + "integrity": "sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==", + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, "node_modules/unstorage": { "version": "1.16.0", "resolved": "https://registry.npmjs.org/unstorage/-/unstorage-1.16.0.tgz", @@ -8251,6 +9018,15 @@ "node": "^18.17.0 || >=20.5.0" } }, + "node_modules/vary": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", + "integrity": "sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==", + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, "node_modules/vfile": { "version": "6.0.3", "resolved": "https://registry.npmjs.org/vfile/-/vfile-6.0.3.tgz", @@ -8814,6 +9590,12 @@ "node": ">=8" } }, + "node_modules/wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", + "license": "ISC" + }, "node_modules/write-file-atomic": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-6.0.0.tgz", From 9823beb701dd8215b64bd3f68331bd17ec78c814 Mon Sep 17 00:00:00 2001 From: Quinn Blenkinsop Date: Fri, 11 Jul 2025 23:42:10 +0000 Subject: [PATCH 3/3] chore: Uncomment publishing script check --- scripts/prepare-to-publish.ts | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/scripts/prepare-to-publish.ts b/scripts/prepare-to-publish.ts index 2df2070..ccc0de4 100644 --- a/scripts/prepare-to-publish.ts +++ b/scripts/prepare-to-publish.ts @@ -67,19 +67,19 @@ const git = simpleGit({ // Verify git status and branch -// const branch = await git.branch(); -// if (branch.current !== "main") { -// console.log("You must be on the 'main' branch to run this script."); -// process.exit(1); -// } - -// const status = await git.status(); -// if (!status.isClean()) { -// console.log( -// "Your working directory is not clean. Please commit or stash your changes before running this script.", -// ); -// process.exit(1); -// } +const branch = await git.branch(); +if (branch.current !== "main") { + console.log("You must be on the 'main' branch to run this script."); + process.exit(1); +} + +const status = await git.status(); +if (!status.isClean()) { + console.log( + "Your working directory is not clean. Please commit or stash your changes before running this script.", + ); + process.exit(1); +} // Verify the lockfile is in sync with node_modules