Skip to content

Open source website builder and Webflow alternative. Webstudio is an advanced visual builder that connects to any headless CMS, supports all CSS properties, and can be hosted anywhere, including with us.

feat: Implement Rate Limiting (#2393)

Ivan Starkov357f35d7a55c
diff --git a/.gitignore b/.gitignore
index 73cf288c56..207c7c52f7 100644
--- a/.gitignore
+++ b/.gitignore
@@ -55,3 +55,4 @@ tsconfig.tsbuildinfo
# to save thunder https://marketplace.visualstudio.com/items?itemName=rangav.vscode-thunder-client files
.thunder
+.env*.local
diff --git a/apps/builder/.gitignore b/apps/builder/.gitignore
index 1c057d94aa..cf1810afee 100644
--- a/apps/builder/.gitignore
+++ b/apps/builder/.gitignore
@@ -1,5 +1,6 @@
.cache
.env
+.env.*
.vercel
.output
diff --git a/apps/builder/middleware.js b/apps/builder/middleware.js
new file mode 100644
index 0000000000..efb9c20845
--- /dev/null
+++ b/apps/builder/middleware.js
@@ -0,0 +1,458 @@
+/**
+ * To test middleware locally:
+ * ```shell
+ * # At project root:
+ * pnpx vercel link
+ * pnpx vercel dev
+ * ```
+ *
+ * OR
+ *
+ * ```shell
+ * # Link vercel project
+ * pnpm middleware:link
+ * # Initialize .env.preview
+ * pnpm middleware:env
+ * # Start middleware server
+ * pnpm middleware:dev
+ * ```
+ *
+ * OR
+ *
+ * ```shell
+ * pnpx vercel link
+ * pnpx vercel env pull --environment=preview ./.env.preview
+ * DOTENV_CONFIG_PATH=.env.preview pnpm tsx watch -r dotenv/config ./middleware.js
+ * ```
+ */
+import { Ratelimit } from "@upstash/ratelimit";
+import { ipAddress, next as passthroughRaw } from "@vercel/edge";
+import { createClient } from "@vercel/kv";
+import { Hono } from "hono";
+import { HTTPException } from "hono/http-exception";
+import { env as envHono, getRuntimeKey } from "hono/adapter";
+import { handle } from "hono/vercel";
+import memoize from "memoize-one";
+import { createCookieSessionStorage } from "@remix-run/cloudflare";
+
+/**
+ * ----------------------------------------------------------------
+ * ---------------------======<<<Types>>>======--------------------
+ * ----------------------------------------------------------------
+ */
+
+/**
+ * @typedef {object} Environment
+ * @property {string} KV_RATE_LIMIT_REST_API_TOKEN
+ * @property {string} KV_RATE_LIMIT_REST_API_URL
+ * @property {string} TRPC_SERVER_API_TOKEN
+ * @property {string} AUTH_SECRET
+ *
+ * @typedef {object} Variables
+ * @property {boolean} skipRateLimit
+ *
+ * @typedef {object} ContextEnv
+ * @property {Variables} Variables
+ */
+
+/**
+ * ------------------------------------------------------------------
+ * ---------------------======<<<Utilities>>>======------------------
+ * ------------------------------------------------------------------
+ */
+
+/**
+ * @param {import('hono').Context<ContextEnv>} req
+ * @returns {Promise<Response>}
+ */
+let passthrough = async (req) => passthroughRaw();
+
+/** @type {typeof envHono<Environment, import('hono').Context<ContextEnv>>} */
+const env = (ctx) => envHono(ctx);
+
+const getRateLimitMemoized = memoize(
+ /**
+ * @param {string} kvApiToken
+ * @param {string} kvUrl
+ */
+ (kvApiToken, kvUrl) => {
+ const rateLimiterCache = new Map();
+
+ const kv = createClient({
+ token: kvApiToken,
+ url: kvUrl,
+ });
+
+ const authorized = new Ratelimit({
+ redis: kv,
+ limiter: Ratelimit.slidingWindow(20, "5 s"),
+ ephemeralCache: rateLimiterCache,
+ prefix: "authorized",
+ });
+
+ const unAuthorized = new Ratelimit({
+ redis: kv,
+ limiter: Ratelimit.slidingWindow(10, "5 s"),
+ ephemeralCache: rateLimiterCache,
+ prefix: "unauthorized",
+ });
+
+ // No ephemeralCache for the AI endpoint
+ const ai = new Ratelimit({
+ redis: kv,
+ limiter: Ratelimit.slidingWindow(20, "5 m"),
+ prefix: "ai",
+ });
+
+ // For performance testing purposes
+ const perfTest = new Ratelimit({
+ redis: kv,
+ limiter: Ratelimit.slidingWindow(12000, "600 s"),
+ prefix: "test",
+ });
+
+ const perfTestEphemeral = new Ratelimit({
+ redis: kv,
+ limiter: Ratelimit.slidingWindow(12000, "600 s"),
+ ephemeralCache: rateLimiterCache,
+ prefix: "ephemeral",
+ });
+
+ return {
+ authorized,
+ unAuthorized,
+ ai,
+ perfTest,
+ perfTestEphemeral,
+ };
+ }
+);
+
+/** @param {import('hono').Context<ContextEnv>} ctx */
+const getRateLimits = (ctx) => {
+ const { KV_RATE_LIMIT_REST_API_TOKEN, KV_RATE_LIMIT_REST_API_URL } = env(ctx);
+ if (KV_RATE_LIMIT_REST_API_TOKEN === undefined) {
+ throw new HTTPException(500, {
+ message: "KV_RATE_LIMIT_REST_API_TOKEN env variable is undefined",
+ });
+ }
+
+ if (KV_RATE_LIMIT_REST_API_URL === undefined) {
+ throw new HTTPException(500, {
+ message: "KV_RATE_LIMIT_REST_API_URL env variable is undefined",
+ });
+ }
+
+ return getRateLimitMemoized(
+ KV_RATE_LIMIT_REST_API_TOKEN,
+ KV_RATE_LIMIT_REST_API_URL
+ );
+};
+
+/**
+ * @todo: must be shared with 'apps/builder/app/services/cookie.server.ts' after ESM switch
+ */
+const getSessionStorageMemozied = memoize(
+ /**
+ * @param {string} authSecret
+ */
+ (authSecret) =>
+ createCookieSessionStorage({
+ cookie: {
+ maxAge: 60 * 60 * 24 * 30,
+ name: "_session",
+ sameSite: "lax",
+ path: "/",
+ httpOnly: true,
+ secrets: authSecret ? [authSecret] : undefined,
+ secure: process.env.NODE_ENV === "production",
+ },
+ })
+);
+
+/** @param {import('hono').Context<ContextEnv>} ctx */
+const getSessionStorage = (ctx) => {
+ const { AUTH_SECRET } = env(ctx);
+
+ if (AUTH_SECRET === undefined) {
+ throw new HTTPException(500, {
+ message: "AUTH_SECRET env variable is undefined",
+ });
+ }
+
+ return getSessionStorageMemozied(AUTH_SECRET);
+};
+
+/**
+ * @param {import('hono').Context<ContextEnv>} ctx
+ */
+const getUserId = async (ctx) => {
+ const sessionStorage = getSessionStorage(ctx);
+ const { data } = await sessionStorage.getSession(ctx.req.header("Cookie"));
+ return data.user?.id;
+};
+
+/**
+ * @param {import('hono').Context<ContextEnv>} ctx
+ * @param {keyof ReturnType<typeof getRateLimits>} ratelimitName
+ * @param {string} key
+ */
+const checkRateLimit = async (ctx, ratelimitName, key) => {
+ const rateLimits = getRateLimits(ctx);
+ const ratelimit = rateLimits[ratelimitName];
+
+ const { success, pending, limit, reset, remaining } =
+ await ratelimit.limit(key);
+
+ if (getRuntimeKey() !== "node") {
+ try {
+ ctx.executionCtx.waitUntil(pending);
+ } catch {
+ /**/
+ }
+ }
+
+ if (success === false) {
+ // eslint-disable-next-line no-console
+ console.warn(
+ `ratelimit triggered: [${ratelimitName}] limit=${limit}, reset=${reset}, remaining=${remaining}, key=${key}`
+ );
+
+ throw new HTTPException(429, {
+ res: ctx.json(
+ {
+ errors: [
+ {
+ message: `ratelimit triggered: [${ratelimitName}] limit=${limit}, reset=${reset}, remaining=${remaining}, key=${key}`,
+ code: 429,
+ meta: {
+ limit,
+ reset,
+ remaining,
+ ratelimitName,
+ },
+ },
+ ],
+ },
+ 429
+ ),
+ });
+ }
+};
+
+/**
+ * ------------------------------------------------------------
+ * ---------------------======<<<App>>>======------------------
+ * ------------------------------------------------------------
+ */
+
+/** @type {Hono<ContextEnv>} */
+const app = new Hono();
+
+// Debug route, to show current values, MUST BE ABOVE middlewares
+app.get("/rate-limit/debug", async (ctx) => {
+ const rateLimits = getRateLimits(ctx);
+
+ const aiKey = `${
+ (await getUserId(ctx)) ?? ipAddress(ctx.req) ?? "127.0.0.1"
+ }`;
+
+ const userId = await getUserId(ctx);
+
+ const ip = ipAddress(ctx.req) ?? "127.0.0.1";
+
+ return ctx.json({
+ keys: {
+ aiKey,
+ userId,
+ ip,
+ },
+ unAuthorized: await rateLimits.unAuthorized.limit(ip),
+ authorized: await rateLimits.authorized.limit(userId),
+ ai: await rateLimits.ai.limit(aiKey),
+ });
+});
+
+// Debug route, to test the rate-limiting performance, MUST BE ABOVE middlewares
+app.get("/rate-limit/test", async (ctx) => {
+ const rateLimits = getRateLimits(ctx);
+
+ const aiKey = `${
+ (await getUserId(ctx)) ?? ipAddress(ctx.req) ?? "127.0.0.1"
+ }`;
+
+ return ctx.json({
+ perfTest: await rateLimits.perfTest.limit(aiKey),
+ });
+});
+
+// Debug route, to test the rate-limiting performance with ephemeral cache, MUST BE ABOVE middlewares
+app.get("/rate-limit/ephemeral-test", async (ctx) => {
+ const rateLimits = getRateLimits(ctx);
+
+ const aiKey = `${
+ (await getUserId(ctx)) ?? ipAddress(ctx.req) ?? "127.0.0.1"
+ }`;
+
+ return ctx.json({
+ perfTest: await rateLimits.perfTestEphemeral.limit(aiKey),
+ });
+});
+
+/**
+ * Check whether the request is for a static file; if so, bypass the rate-limiting mechanism.
+ */
+app.use("*", async (ctx, next) => {
+ const skipRateLimit = ctx.get("skipRateLimit");
+ if (skipRateLimit) {
+ return next();
+ }
+
+ const url = new URL(ctx.req.url);
+
+ ctx.set(
+ "skipRateLimit",
+ url.pathname.startsWith("/build/") || url.pathname.endsWith(".ico")
+ );
+ return next();
+});
+
+/**
+ * Check whether the request is a service call; if so, bypass the rate-limiting mechanism.
+ */
+app.use("*", async (ctx, next) => {
+ const skipRateLimit = ctx.get("skipRateLimit");
+ if (skipRateLimit) {
+ return next();
+ }
+
+ const { TRPC_SERVER_API_TOKEN } = env(ctx);
+
+ if (TRPC_SERVER_API_TOKEN === undefined) {
+ throw new HTTPException(500, {
+ message: "TRPC_SERVER_API_TOKEN env variable is undefined",
+ });
+ }
+
+ const isServiceCall =
+ TRPC_SERVER_API_TOKEN !== undefined &&
+ ctx.req.header("Authorization") === TRPC_SERVER_API_TOKEN;
+
+ ctx.set("skipRateLimit", isServiceCall);
+
+ return next();
+});
+
+/**
+ * Rate limiting AI endpoint, max priority
+ */
+app.use("/rest/ai/*", async (ctx, next) => {
+ const skipRateLimit = ctx.get("skipRateLimit");
+ if (skipRateLimit) {
+ return next();
+ }
+
+ const aiKey = `${
+ (await getUserId(ctx)) ?? ipAddress(ctx.req) ?? "127.0.0.1"
+ }`;
+
+ await checkRateLimit(ctx, "ai", aiKey);
+ ctx.set("skipRateLimit", true);
+
+ return next();
+});
+
+/**
+ * Rate limiting authorized/unauthorized users
+ */
+app.use("*", async (ctx, next) => {
+ const skipRateLimit = ctx.get("skipRateLimit");
+ if (skipRateLimit) {
+ return next();
+ }
+
+ const userId = await getUserId(ctx);
+
+ if (userId === undefined) {
+ await checkRateLimit(
+ ctx,
+ "unAuthorized",
+ ipAddress(ctx.req) ?? "127.0.0.1"
+ );
+ ctx.set("skipRateLimit", true);
+ return next();
+ }
+
+ await checkRateLimit(ctx, "authorized", userId);
+
+ ctx.set("skipRateLimit", true);
+
+ return next();
+});
+
+app.notFound(async (ctx) => {
+ return passthrough(ctx);
+});
+
+app.onError(async (err, ctx) => {
+ if (err instanceof HTTPException) {
+ return err.getResponse();
+ }
+
+ // eslint-disable-next-line no-console
+ console.error(err.stack ?? err);
+
+ return ctx.json({ cause: err.cause, message: err.message });
+});
+
+export default handle(app);
+
+/**
+ * --------------------------------------------------------------------
+ * ---------------------======<<<Development>>>======------------------
+ * --------------------------------------------------------------------
+ */
+
+if (process.env.NODE_ENV !== "production") {
+ if (getRuntimeKey() === "node") {
+ // To avoid vercel dev errors on build
+ const modulePath = "" + "@hono/node-server";
+ /** @type {Promise<import("@hono/node-server")>} */
+ const importedModule = import(modulePath);
+
+ importedModule.then(({ serve }) => {
+ serve({ ...app, port: 3002 }, (info) => {
+ // eslint-disable-next-line no-console
+ console.info(`Listening on http://localhost:${info.port}`);
+ });
+ });
+
+ passthrough = async (ctx) => {
+ const devUrl = new URL(ctx.req.url);
+ devUrl.port = "3000";
+
+ const raw = ctx.req.raw;
+
+ const req = new Request(devUrl, {
+ headers: raw.headers,
+ method: raw.method,
+ body: raw.body,
+ redirect: "manual",
+ // eslint-disable-next-line @typescript-eslint/ban-ts-comment
+ // @ts-ignore
+ duplex: "half",
+ });
+
+ const res = await fetch(req);
+
+ const responseHeaders = new Headers(res.headers);
+ responseHeaders.delete("content-encoding");
+
+ return new Response(res.body, {
+ status: res.status,
+ statusText: res.statusText,
+ headers: responseHeaders,
+ });
+ };
+ }
+}
diff --git a/apps/builder/package.json b/apps/builder/package.json
index cfea6697b7..e5f35f3f40 100644
--- a/apps/builder/package.json
+++ b/apps/builder/package.json
@@ -14,7 +14,10 @@
"checks": "pnpm typecheck && pnpm test",
"storybook:dev": "storybook dev -p 6006",
"storybook:build": "storybook build",
- "ci:migrate": "migrations migrate --force"
+ "ci:migrate": "migrations migrate --force",
+ "middleware:link": "pnpx vercel link",
+ "middleware:env": "pnpx vercel env pull --environment=preview ./.env.preview",
+ "middleware:dev": "DOTENV_CONFIG_PATH=.env.preview tsx watch -r dotenv/config ./middleware.js"
},
"dependencies": {
"@floating-ui/dom": "^1.5.1",
@@ -31,12 +34,16 @@
"@radix-ui/react-tooltip": "^1.0.6",
"@react-aria/interactions": "^3.17.0",
"@react-aria/utils": "^3.19.0",
+ "@remix-run/cloudflare": "^1.19.2",
"@remix-run/node": "^1.19.2",
"@remix-run/react": "^1.19.2",
"@remix-run/serve": "^1.19.2",
"@sentry/remix": "^7.47.0",
"@sentry/types": "7.47.0",
"@trpc/server": "^10.38.1",
+ "@upstash/ratelimit": "^0.4.4",
+ "@vercel/edge": "^1.1.0",
+ "@vercel/kv": "^0.2.3",
"@vercel/remix": "^1.19.2",
"@webstudio-is/ai": "workspace:*",
"@webstudio-is/asset-uploader": "workspace:*",
@@ -67,6 +74,7 @@
"debug": "^4.3.4",
"detect-font": "^0.1.5",
"downshift": "^6.1.7",
+ "hono": "^3.7.3",
"hyphenate-style-name": "^1.0.4",
"immer": "^10.0.2",
"immerhin": "^0.7.0",
@@ -75,6 +83,7 @@
"match-sorter": "^6.3.1",
"mdast-util-from-markdown": "^2.0.0",
"mdast-util-gfm": "^3.0.0",
+ "memoize-one": "^6.0.0",
"micromark-extension-gfm": "^3.0.0",
"nanoevents": "^8.0.0",
"nanoid": "^4.0.2",
@@ -105,6 +114,7 @@
"zod": "^3.21.4"
},
"devDependencies": {
+ "@hono/node-server": "^1.2.0",
"@jest/globals": "^29.6.4",
"@remix-run/dev": "^1.19.2",
"@storybook/react": "^7.4.0",
diff --git a/apps/builder/tsconfig.json b/apps/builder/tsconfig.json
index b91e6736a3..65ee226e1c 100644
--- a/apps/builder/tsconfig.json
+++ b/apps/builder/tsconfig.json
@@ -5,17 +5,20 @@
"remix.env.d.ts",
"**/*.ts",
"**/*.tsx",
- "../../@types/**/*.d.ts"
+ "../../@types/**/*.d.ts",
+ "./middleware.js"
],
+
"compilerOptions": {
"paths": {
"~/*": ["app/*"]
},
"baseUrl": ".",
- "rootDir": "./app",
"declaration": false,
"emitDeclarationOnly": false,
"declarationDir": null,
- "noEmit": true
+ "noEmit": true,
+ "allowJs": true,
+ "checkJs": true
}
}
diff --git a/package.json b/package.json
index d82076097c..272cea7d87 100644
--- a/package.json
+++ b/package.json
@@ -65,7 +65,8 @@
"@stitches/[email protected]": "patches/@[email protected]",
"@types/[email protected]": "patches/@[email protected]",
- "@radix-ui/[email protected]": "patches/@[email protected]"
+ "@radix-ui/[email protected]": "patches/@[email protected]",
+ "@cloudflare/[email protected]": "patches/@[email protected]"
}
}
}
diff --git a/packages/form-handlers-mailchannels-test/package.json b/packages/form-handlers-mailchannels-test/package.json
index 934e5999bf..cb03583efc 100644
--- a/packages/form-handlers-mailchannels-test/package.json
+++ b/packages/form-handlers-mailchannels-test/package.json
@@ -10,7 +10,7 @@
"@webstudio-is/form-handlers": "workspace:*"
},
"devDependencies": {
- "@cloudflare/workers-types": "^3.0.0",
+ "@cloudflare/workers-types": "^3.19.0",
"@webstudio-is/tsconfig": "workspace:*",
"typescript": "5.2.2",
"wrangler": "^2.18.0"
diff --git a/patches/@[email protected] b/patches/@[email protected]
new file mode 100644
index 0000000000..0220c60713
--- /dev/null
+++ b/patches/@[email protected]
@@ -0,0 +1,3 @@
+diff --git a/index.d.ts b/index.d.ts
+deleted file mode 100644
+index 6e641a80ab0fa6bcf2d3fee3a9bd2ffc67f115ea..0000000000000000000000000000000000000000
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index c6438c26cc..7fee14eb2e 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -1,6 +1,13 @@
lockfileVersion: '6.0'
+settings:
+ autoInstallPeers: true
+ excludeLinksFromLockfile: false
+
patchedDependencies:
+ '@cloudflare/[email protected]':
+ hash: trvrj7ncmikk3azmkslezmizny
+ path: patches/@[email protected]
'@radix-ui/[email protected]':
hash: vwkv6fgcyenwdrasskh5q6guyu
path: patches/@[email protected]
@@ -96,6 +103,9 @@ importers:
'@react-aria/utils':
specifier: ^3.19.0
version: 3.19.0([email protected])
+ '@remix-run/cloudflare':
+ specifier: ^1.19.2
+ version: 1.19.2(@cloudflare/[email protected])
'@remix-run/node':
specifier: ^1.19.2
version: 1.19.2
@@ -114,6 +124,15 @@ importers:
'@trpc/server':
specifier: ^10.38.1
version: 10.38.1
+ '@upstash/ratelimit':
+ specifier: ^0.4.4
+ version: 0.4.4
+ '@vercel/edge':
+ specifier: ^1.1.0
+ version: 1.1.0
+ '@vercel/kv':
+ specifier: ^0.2.3
+ version: 0.2.3
'@vercel/remix':
specifier: ^1.19.2
@@ -204,6 +223,9 @@ importers:
downshift:
specifier: ^6.1.7
version: 6.1.7([email protected])
+ hono:
+ specifier: ^3.7.3
+ version: 3.7.3
hyphenate-style-name:
specifier: ^1.0.4
version: 1.0.4
@@ -228,6 +250,9 @@ importers:
mdast-util-gfm:
specifier: ^3.0.0
version: 3.0.0
+ memoize-one:
+ specifier: ^6.0.0
+ version: 6.0.0
micromark-extension-gfm:
specifier: ^3.0.0
version: 3.0.0
@@ -313,6 +338,9 @@ importers:
specifier: ^3.21.4
version: 3.21.4
devDependencies:
+ '@hono/node-server':
+ specifier: ^1.2.0
+ version: 1.2.0
'@jest/globals':
specifier: ^29.6.4
version: 29.6.4
@@ -1234,8 +1262,8 @@ importers:
version: link:../form-handlers
devDependencies:
'@cloudflare/workers-types':
- specifier: ^3.0.0
- version: 3.19.0
+ specifier: ^3.19.0
+ version: 3.19.0(patch_hash=trvrj7ncmikk3azmkslezmizny)
'@webstudio-is/tsconfig':
specifier: workspace:*
version: link:../tsconfig
@@ -3252,15 +3280,21 @@ packages:
resolution: {integrity: sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==}
+ /@cloudflare/[email protected]:
+ resolution: {integrity: sha512-FNcunDuTmEfQTLRLtA6zz+buIXUHj1soPvSWzzQFBC+n2lsy+CGf/NIrR3SEPCmsVNQj70/Jx2lViCpq+09YpQ==}
+ dependencies:
+ mime: 2.6.0
+ dev: false
+
/@cloudflare/[email protected]:
resolution: {integrity: sha512-MVbXLbTcAotOPUj0pAMhVtJ+3/kFkwJqc5qNOleOZTv6QkZZABDMS21dSrSlVswEHwrpWC03e4fWytjqKvuE2A==}
dependencies:
mime: 3.0.0
dev: true
- /@cloudflare/[email protected]:
+ /@cloudflare/[email protected](patch_hash=trvrj7ncmikk3azmkslezmizny):
resolution: {integrity: sha512-0FRcsz7Ea3jT+gc5gKPIYciykm1bbAaTpygdzpCwGt0RL+V83zWnYN30NWDW4rIHj/FHtz+MIuBKS61C8l7AzQ==}
- dev: true
+ patched: true
resolution: {integrity: sha512-ooWCrlZP11i8GImSjTHYHLkvFDP48nS4+204nGb1RiX/WXYHmJA2III9/e2DWVabCESdW7hBAEzHRqUn9OUVvQ==}
@@ -4166,6 +4200,11 @@ packages:
resolution: {integrity: sha512-k2Ty1JcVojjJFwrg/ThKi2ujJ7XNLYaFGNB/bWT9wGR+oSMJHMa5w+CUq6p/pVrKeNNgA7pCqEcjSnHVoqJQFw==}
dev: true
+ resolution: {integrity: sha512-aHT8lDMLpd7ioXJ1/057+h+oE/k7rCOWmjklYDsE0jE4CoNB9XzG4f8dRHvw4s5HJFocaYDiGgYM/V0kYbQ0ww==}
+ engines: {node: '>=18.0.0'}
+ dev: true
+
/@humanwhocodes/[email protected]:
resolution: {integrity: sha512-KVVjQmNUepDVGXNuoRRdmmEjruj0KfiGSbS8LVc12LMsWDQzRXJ0qdhN8L8uUigKpfEHRhlaQFY0ib1tnUbNeQ==}
engines: {node: '>=10.10.0'}
@@ -6222,6 +6261,17 @@ packages:
react: 18.2.0
dev: false
+ /@remix-run/[email protected](@cloudflare/[email protected]):
+ resolution: {integrity: sha512-VPG2qAhzV2Mo4NQpCBWIXKoTx8LOdZ29xV6yG2z7bI043bvCXY1Aor5Lxn5tIvDSnlBAlhvT4NiQ37wfHdETxw==}
+ engines: {node: '>=14.0.0'}
+ peerDependencies:
+ '@cloudflare/workers-types': ^2.0.0 || ^3.0.0
+ dependencies:
+ '@cloudflare/kv-asset-handler': 0.1.3
+ '@cloudflare/workers-types': 3.19.0(patch_hash=trvrj7ncmikk3azmkslezmizny)
+ '@remix-run/server-runtime': 1.19.2
+ dev: false
+
/@remix-run/[email protected](@remix-run/[email protected]):
resolution: {integrity: sha512-wAY3AN0xPJB01wi9RqHG1mV3W0M915XgudcLtJlWDbVppY3kGr7gP0/1sAz5onyEX8Z/+1vvVVU9jn59G8PIcA==}
engines: {node: '>=14.0.0'}
@@ -8109,6 +8159,39 @@ packages:
'@unocss/core': 0.56.4
dev: false
+ /@upstash/[email protected]:
+ resolution: {integrity: sha512-cpPSR0XJAJs4Ddz9nq3tINlPS5aLfWVCqhhtHnXt4p7qr5+/Znlt1Es736poB/9rnl1hAHrOsOvVj46NEXcVqA==}
+ engines: {node: '>=16.0.0'}
+ dependencies:
+ '@upstash/redis': 1.22.1
+ transitivePeerDependencies:
+ - encoding
+ dev: false
+
+ /@upstash/[email protected]:
+ resolution: {integrity: sha512-y3q6cNDdcRQ2MRPRf5UNWBN36IwnZ4kAEkGoH3i6OqdWwz4qlBxNsw4/Rpqn9h93+Nx1cqg5IOq7O2e2zMJY1w==}
+ dependencies:
+ '@upstash/core-analytics': 0.0.6
+ transitivePeerDependencies:
+ - encoding
+ dev: false
+
+ /@upstash/[email protected]:
+ resolution: {integrity: sha512-sXoJDoEqqik0HbrNE7yRWckOySEFsoBxfRdCgOqkc0w6py19ZZG50SpGkDDEUXSnBqP8VgGYXhWAiBpqxrt5oA==}
+ dependencies:
+ isomorphic-fetch: 3.0.0
+ transitivePeerDependencies:
+ - encoding
+ dev: false
+
+ /@upstash/[email protected]:
+ resolution: {integrity: sha512-7ec2eCMkVxZzuHNb+hPKonX4b/Pu0BdDeSBsEy+jKIqiweXzCs5Dpu9642vJgf57YnEsfwgXnQMVEataarvyeQ==}
+ dependencies:
+ isomorphic-fetch: 3.0.0
+ transitivePeerDependencies:
+ - encoding
+ dev: false
+
/@vanilla-extract/[email protected]:
resolution: {integrity: sha512-LjnbQWGeMwaydmovx8jWUR8BxLtLiPyq0xz5C8G5OvFhsuJxvavLdrBHNNizvr1dq7/3qZGlPv0znsvU4P44YA==}
dependencies:
@@ -8164,6 +8247,19 @@ packages:
resolution: {integrity: sha512-17kVyLq3ePTKOkveHxXuIJZtGYs+cSoev7BlP+Lf4916qfDhk/HBjvlYDe8egrea7LNPHKwSZJK/bzZC+Q6AwQ==}
dev: true
+ /@vercel/[email protected]:
+ resolution: {integrity: sha512-84H2EavY5Kul9Ef1DnTH0XEG5vChqcXjyqoRLVPjjZjLWw47sMapzXXQH09pybcshR+8AKqULGvFqPTWuRh3Rw==}
+ dev: false
+
+ /@vercel/[email protected]:
+ resolution: {integrity: sha512-Wq1+EsRBQmvLlcqCZeYVg1MAARWrnETgLe3Sy3UCqG+zg7LThpkt0YHZe1NN3Aj4IRmCKQamotWrLDdEx+ZB3w==}
+ engines: {node: '>=14.6'}
+ dependencies:
+ '@upstash/redis': 1.22.0
+ transitivePeerDependencies:
+ - encoding
+ dev: false
+
resolution: {integrity: sha512-mO7+uLUWqg5soc9xP2lNd4f7/G27Q4QfUVmLbo512Fwq+q83Uw1UcYKRvoFzljrZfnYyUbBd5KRpH3jw7wA0TQ==}
engines: {node: '>=14'}
@@ -8831,6 +8927,7 @@ packages:
resolution: {integrity: sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ==}
+ requiresBuild: true
dependencies:
file-uri-to-path: 1.0.0
dev: true
@@ -10691,6 +10788,7 @@ packages:
resolution: {integrity: sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw==}
+ requiresBuild: true
dev: true
optional: true
@@ -11284,6 +11382,11 @@ packages:
react-is: 16.13.1
dev: false
+ resolution: {integrity: sha512-BQHdLPXb30hQ9k+04byeSi4QMHk20U1GUq0nT5kGUCGZtxeYhAS7mUJ1wgjn4SCvgiw1rcc6oBOAlwJQ7jQymA==}
+ engines: {node: '>=16.0.0'}
+ dev: false
+
resolution: {integrity: sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==}
@@ -11842,6 +11945,15 @@ packages:
resolution: {integrity: sha512-WhB9zCku7EGTj/HQQRz5aUQEUeoQZH2bWcltRErOpymJ4boYE6wL9Tbr23krRPSZ+C5zqNSrSw+Cc7sZZ4b7vg==}
engines: {node: '>=0.10.0'}
+ resolution: {integrity: sha512-qvUtwJ3j6qwsF3jLxkZ72qCgjMysPzDfeV240JHiGZsANBYd+EEuu35v7dfrJ9Up0Ak07D7GGSkGhCHTqg/5wA==}
+ dependencies:
+ node-fetch: 2.6.9
+ whatwg-fetch: 3.6.19
+ transitivePeerDependencies:
+ - encoding
+ dev: false
+
resolution: {integrity: sha512-PIeMbHqMt4DnUP3MA/Flc0HElYjMXArsw1qwJZcm9sqR8mq3l8NYizFMty0pWwE/tzIGH3EKK5+jes5mAr85yw==}
dev: false
@@ -13018,6 +13130,10 @@ packages:
resolution: {integrity: sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ==}
engines: {node: '>= 0.6'}
+ resolution: {integrity: sha512-rkpe71W0N0c0Xz6QD0eJETuWAJGnJ9afsl1srmwPrI+yBCkge5EycXXbYRyvL29zZVUWQCY7InPRCv3GDXuZNw==}
+ dev: false
+
resolution: {integrity: sha512-/EuHYwAPdLtXwAwSZkh/Gutery6pD2KYd44oQLhAvQp/50mpyduZh8Q7PYHXTCJ+wuXxt7oij2LXyIJOOYFPog==}
dependencies:
@@ -13858,6 +13974,7 @@ packages:
resolution: {integrity: sha512-ibPK3iA+vaY1eEjESkQkM0BbCqFOaZMiXRTtdB0u7b4djtY6JnsjvPdUHVMg6xQt3B8fpTTWHI9A+ADjM9frzg==}
+ requiresBuild: true
dev: true
optional: true
@@ -17052,6 +17169,10 @@ packages:
resolution: {integrity: sha512-kyDivFZ7ZM0BVOUteVbDFhlRt7Ah/CSPwJdi8hBpkK7QLumUqdLtVfm/PX/hkcnrvr0i77fO5+TjZ94Pe+C9iw==}
+ resolution: {integrity: sha512-d67JP4dHSbm2TrpFj8AbO8DnL1JXL5J9u0Kq2xW6d0TFDbCA3Muhdt8orXC22utleTVj7Prqt82baN6RBvnEgw==}
+ dev: false
+
resolution: {integrity: sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==}
dependencies: