Skip to content

Open-source status page, incident response and uptime monitoring

Move to fly (#365)

Thibault Le Ouayf90674af67a2
diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml
index 072b1624a..a253db2b8 100644
--- a/.github/workflows/test.yml
+++ b/.github/workflows/test.yml
@@ -33,7 +33,7 @@ jobs:
- name: ⎔ Setup node
uses: actions/setup-node@v3
with:
- node-version: 18
+ node-version: 20
cache: "pnpm"
- name: 🔥 Install bun
@@ -54,4 +54,3 @@ jobs:
- name: 🧪 Tests
run: pnpm test
- working-directory: ./packages/api
diff --git a/apps/server/.env.test b/apps/server/.env.test
new file mode 100644
index 000000000..986d7dd60
--- /dev/null
+++ b/apps/server/.env.test
@@ -0,0 +1,11 @@
+DATABASE_URL=http://127.0.0.1:8080
+DATABASE_AUTH_TOKEN=
+NODE_ENV=test
+UNKEY_TOKEN=test
+TINY_BIRD_API_KEY=test
+UPSTASH_REDIS_REST_URL=test
+UPSTASH_REDIS_REST_TOKEN=test
+QSTASH_CURRENT_SIGNING_KEY=test
+QSTASH_NEXT_SIGNING_KEY=test
+FLY_REGION=ams
+RESEND_API_KEY=test
diff --git a/apps/server/fly.toml b/apps/server/fly.toml
index 3cdd772e9..fcf359ba0 100644
--- a/apps/server/fly.toml
+++ b/apps/server/fly.toml
@@ -6,6 +6,7 @@
app = "openstatus-api"
primary_region = "ams"
+
[build]
dockerfile = "./Dockerfile"
diff --git a/apps/server/package.json b/apps/server/package.json
index f79af9ad5..48a1dae2d 100644
--- a/apps/server/package.json
+++ b/apps/server/package.json
@@ -6,19 +6,25 @@
"main": "src/index.ts",
"scripts": {
"dev": "bun run --hot src/index.ts",
- "start": "NODE_ENV=production bun run src/index.ts"
+ "start": "NODE_ENV=production bun run src/index.ts",
+ "test": "vitest run"
},
"dependencies": {
"@hono/zod-openapi": "0.7.1",
"@openstatus/db": "workspace:*",
+ "@openstatus/notification-emails": "workspace:*",
"@openstatus/plans": "workspace:*",
"@openstatus/tinybird": "workspace:*",
"@openstatus/upstash": "workspace:*",
+ "@t3-oss/env-core": "0.7.0",
"@unkey/api": "0.10.0",
- "hono": "3.7.3",
+ "hono": "3.7.6",
+ "nanoid": "5.0.1",
"zod": "3.22.2"
},
"devDependencies": {
- "@openstatus/tsconfig": "workspace:*"
+ "@openstatus/tsconfig": "workspace:*",
+ "vitest": "0.34.6",
+ "dotenv": "16.3.1"
}
}
diff --git a/apps/server/src/checker/alerting.test.ts b/apps/server/src/checker/alerting.test.ts
new file mode 100644
index 000000000..3b9826487
--- /dev/null
+++ b/apps/server/src/checker/alerting.test.ts
@@ -0,0 +1,12 @@
+import { expect, it, vi } from "vitest";
+
+import { triggerAlerting } from "./alerting";
+import * as utils from "./utils";
+
+it("should send email notification", async () => {
+ vi.mock("utils");
+ const mockedFn = vi.fn();
+ utils.providerToFunction["email"] = mockedFn;
+ await triggerAlerting({ monitorId: "1" });
+ expect(mockedFn).toHaveBeenCalledTimes(1);
+});
diff --git a/apps/server/src/checker/alerting.ts b/apps/server/src/checker/alerting.ts
new file mode 100644
index 000000000..5315bf710
--- /dev/null
+++ b/apps/server/src/checker/alerting.ts
@@ -0,0 +1,55 @@
+import type { z } from "zod";
+
+import { db, eq, schema } from "@openstatus/db";
+import { selectNotificationSchema } from "@openstatus/db/src/schema";
+
+import { monitor } from "./checker";
+import type { Payload } from "./schema";
+import { providerToFunction } from "./utils";
+
+export async function catchTooManyRetry(payload: Payload) {
+ await monitor({ monitorInfo: payload, latency: -1, statusCode: 500 });
+ if (payload?.status !== "error") {
+ await triggerAlerting({ monitorId: payload.monitorId });
+ await updateMonitorStatus({
+ monitorId: payload.monitorId,
+ status: "error",
+ });
+ }
+}
+
+export const triggerAlerting = async ({ monitorId }: { monitorId: string }) => {
+ const notifications = await db
+ .select()
+ .from(schema.notificationsToMonitors)
+ .innerJoin(
+ schema.notification,
+ eq(schema.notification.id, schema.notificationsToMonitors.notificationId),
+ )
+ .innerJoin(
+ schema.monitor,
+ eq(schema.monitor.id, schema.notificationsToMonitors.monitorId),
+ )
+ .where(eq(schema.monitor.id, Number(monitorId)))
+ .all();
+ for (const notif of notifications) {
+ await providerToFunction[notif.notification.provider]({
+ monitor: notif.monitor,
+ notification: selectNotificationSchema.parse(notif.notification),
+ });
+ }
+};
+
+export const updateMonitorStatus = async ({
+ monitorId,
+ status,
+}: {
+ monitorId: string;
+ status: z.infer<typeof schema.statusSchema>;
+}) => {
+ await db
+ .update(schema.monitor)
+ .set({ status })
+ .where(eq(schema.monitor.id, Number(monitorId)))
+ .run();
+};
diff --git a/apps/server/src/checker/checker.test.ts b/apps/server/src/checker/checker.test.ts
new file mode 100644
index 000000000..d4f92e0d6
--- /dev/null
+++ b/apps/server/src/checker/checker.test.ts
@@ -0,0 +1,70 @@
+import { expect, it, vi } from "vitest";
+
+// REMINDER: keep it here for the mock
+import type { Tinybird } from "@openstatus/tinybird";
+import {
+ publishPingResponse,
+ tbIngestPingResponse,
+} from "@openstatus/tinybird";
+
+import * as alerts from "./alerting";
+import { checker } from "./checker";
+
+vi.mock("@openstatus/tinybird", async () => {
+ const actual = await vi.importActual("@openstatus/tinybird");
+ return {
+ // @ts-ignore
+ ...actual,
+ publishPingResponse: vi.fn(),
+ };
+});
+
+it("should call updateMonitorStatus when we can fetch", async () => {
+ const spyOn = vi.spyOn(alerts, "updateMonitorStatus").mockReturnThis();
+ await checker({
+ workspaceId: "1",
+ monitorId: "1",
+ url: "https://www.google.com",
+ cronTimestamp: 1,
+ status: "error",
+ pageIds: [],
+ method: "GET",
+ });
+ expect(spyOn).toHaveBeenCalledTimes(1);
+});
+
+it("should call updateMonitorStatus when status error", async () => {
+ const spyOn = vi.spyOn(alerts, "updateMonitorStatus").mockReturnThis();
+ try {
+ await checker({
+ workspaceId: "1",
+ monitorId: "1",
+ url: "https://xxxxxxx.fake",
+ cronTimestamp: 1,
+ status: "active",
+ pageIds: [],
+ method: "GET",
+ });
+ } catch (e) {
+ expect(e).toBeInstanceOf(Error);
+ }
+ expect(spyOn).toHaveBeenCalledTimes(0);
+});
+
+it("What should we do when redirect ", async () => {
+ const spyOn = vi.spyOn(alerts, "updateMonitorStatus").mockReturnThis();
+ try {
+ await checker({
+ workspaceId: "1",
+ monitorId: "1",
+ url: "https://www.openstatus.dev/toto",
+ cronTimestamp: 1,
+ status: "active",
+ pageIds: [],
+ method: "GET",
+ });
+ } catch (e) {
+ expect(e).toBeInstanceOf(Error);
+ }
+ expect(spyOn).toHaveBeenCalledTimes(0);
+});
diff --git a/apps/server/src/checker/checker.ts b/apps/server/src/checker/checker.ts
new file mode 100644
index 000000000..76d2b783b
--- /dev/null
+++ b/apps/server/src/checker/checker.ts
@@ -0,0 +1,81 @@
+import { nanoid } from "nanoid";
+
+import { publishPingResponse } from "@openstatus/tinybird";
+
+import { env } from "../env";
+import { updateMonitorStatus } from "./alerting";
+import type { Payload } from "./schema";
+
+const region = env.FLY_REGION;
+
+export const monitor = async ({
+ monitorInfo,
+ latency,
+ statusCode,
+}: {
+ monitorInfo: Payload;
+ latency: number;
+ statusCode: number;
+}) => {
+ const { monitorId, cronTimestamp, url, workspaceId } = monitorInfo;
+
+ await publishPingResponse({
+ id: nanoid(), // TBD: we don't need it
+ timestamp: Date.now(),
+ statusCode,
+ latency,
+ region,
+ url,
+ monitorId,
+ cronTimestamp,
+ workspaceId,
+ });
+};
+
+export const checker = async (data: Payload) => {
+ const startTime = Date.now();
+ const res = await ping(data);
+ const endTime = Date.now();
+ const latency = endTime - startTime;
+ await monitor({ monitorInfo: data, latency, statusCode: res.status });
+ if (res.ok && !res.redirected) {
+ if (data?.status === "error") {
+ await updateMonitorStatus({
+ monitorId: data.monitorId,
+ status: "active",
+ });
+ }
+
+ if (!res.ok || (res.ok && !res.redirected)) {
+ if (data?.status === "active") {
+ await updateMonitorStatus({
+ monitorId: data.monitorId,
+ status: "error",
+ });
+ }
+ }
+ }
+};
+
+export const ping = async (
+ data: Pick<Payload, "headers" | "body" | "method" | "url">,
+) => {
+ const headers =
+ data?.headers?.reduce((o, v) => {
+ if (v.key.trim() === "") return o; // removes empty keys from the header
+ return { ...o, [v.key]: v.value };
+ }, {}) || {};
+
+ const res = await fetch(data?.url, {
+ method: data?.method,
+ cache: "no-store",
+ headers: {
+ "OpenStatus-Ping": "true",
+ ...headers,
+ },
+ // Avoid having "TypeError: Request with a GET or HEAD method cannot have a body." error
+ ...(data.method !== "GET" && { body: data?.body }),
+ });
+
+ return res;
+};
diff --git a/apps/server/src/checker/index.ts b/apps/server/src/checker/index.ts
new file mode 100644
index 000000000..f32817d7a
--- /dev/null
+++ b/apps/server/src/checker/index.ts
@@ -0,0 +1,23 @@
+import { Hono } from "hono";
+
+import { checker } from "./checker";
+import { middleware } from "./middleware";
+import type { Payload } from "./schema";
+
+export type Variables = {
+ payload: Payload;
+};
+
+export const checkerRoute = new Hono<{ Variables: Variables }>();
+
+checkerRoute.use("/*", middleware);
+
+// TODO: only use checkerRoute.post("/checker", checker);
+checkerRoute.post("/checker", async (c) => {
+ const payload = c.get("payload");
+ try {
+ checker(payload);
+ } catch (e) {
+ console.error(e);
+ }
+});
diff --git a/apps/server/src/checker/middleware.ts b/apps/server/src/checker/middleware.ts
new file mode 100644
index 000000000..16064d1d8
--- /dev/null
+++ b/apps/server/src/checker/middleware.ts
@@ -0,0 +1,46 @@
+import { Receiver } from "@upstash/qstash";
+import type { Context, Next } from "hono";
+
+import { env } from "../env";
+import { catchTooManyRetry } from "./alerting";
+import type { Variables } from "./index";
+import { payloadSchema } from "./schema";
+
+const r = new Receiver({
+ currentSigningKey: env.QSTASH_CURRENT_SIGNING_KEY,
+ nextSigningKey: env.QSTASH_NEXT_SIGNING_KEY,
+});
+
+export async function middleware(
+ c: Context<{ Variables: Variables }, "/*", {}>,
+ next: Next,
+) {
+ const json = await c.req.json();
+
+ const isValid = r.verify({
+ signature: c.req.header("Upstash-Signature") || "",
+ body: JSON.stringify(json),
+ });
+
+ if (!isValid) {
+ return c.text("Unauthorized", 401);
+ }
+
+ const result = payloadSchema.safeParse(json);
+
+ if (!result.success) {
+ console.error(result.error);
+ return c.text("Unprocessable Entity", 422);
+ }
+
+ /**
+ * Alert user after third retry, on forth try
+ */
+ if (c.req.header("Upstash-Retried") === "3") {
+ catchTooManyRetry(result.data);
+ return c.text("", 200); // needs to be 200, otherwise qstash will retry
+ }
+
+ c.set("payload", result.data);
+ await next();
+}
diff --git a/apps/server/src/checker/schema.ts b/apps/server/src/checker/schema.ts
new file mode 100644
index 000000000..d5875ca61
--- /dev/null
+++ b/apps/server/src/checker/schema.ts
@@ -0,0 +1,17 @@
+import { z } from "zod";
+
+import { METHODS, status } from "@openstatus/db/src/schema";
+
+export const payloadSchema = z.object({
+ workspaceId: z.string(),
+ monitorId: z.string(),
+ method: z.enum(METHODS),
+ body: z.string().optional(),
+ headers: z.array(z.object({ key: z.string(), value: z.string() })).optional(),
+ url: z.string(),
+ cronTimestamp: z.number(),
+ pageIds: z.array(z.string()),
+ status: z.enum(status),
+});
+
+export type Payload = z.infer<typeof payloadSchema>;
diff --git a/apps/server/src/checker/utils.ts b/apps/server/src/checker/utils.ts
new file mode 100644
index 000000000..4b073c146
--- /dev/null
+++ b/apps/server/src/checker/utils.ts
@@ -0,0 +1,40 @@
+import type { z } from "zod";
+
+import type {
+ basicMonitorSchema,
+ providerName,
+ selectNotificationSchema,
+} from "@openstatus/db/src/schema";
+import { send as sendEmail } from "@openstatus/notification-emails";
+
+type ProviderName = (typeof providerName)[number];
+
+type sendNotificationType = ({
+ monitor,
+ notification,
+}: {
+ monitor: z.infer<typeof basicMonitorSchema>;
+ notification: z.infer<typeof selectNotificationSchema>;
+}) => Promise<void>;
+
+export const providerToFunction = {
+ email: sendEmail,
+ slack: async ({
+ monitor,
+ notification,
+ }: {
+ monitor: any;
+ notification: any;
+ }) => {
+ /* TODO: implement */
+ },
+ discord: async ({
+ monitor,
+ notification,
+ }: {
+ monitor: any;
+ notification: any;
+ }) => {
+ /* TODO: implement */
+ },
+} satisfies Record<ProviderName, sendNotificationType>;
diff --git a/apps/server/src/env.ts b/apps/server/src/env.ts
new file mode 100644
index 000000000..dc3c5cb16
--- /dev/null
+++ b/apps/server/src/env.ts
@@ -0,0 +1,36 @@
+import { createEnv } from "@t3-oss/env-core";
+import { z } from "zod";
+
+export const env = createEnv({
+ server: {
+ UNKEY_API_ID: z.string().min(1),
+ UNKEY_TOKEN: z.string().min(1),
+ TINY_BIRD_API_KEY: z.string().min(1),
+ UPSTASH_REDIS_REST_URL: z.string().min(1),
+ UPSTASH_REDIS_REST_TOKEN: z.string().min(1),
+ QSTASH_CURRENT_SIGNING_KEY: z.string().min(1),
+ QSTASH_NEXT_SIGNING_KEY: z.string().min(1),
+ FLY_REGION: z.string(),
+ },
+
+ /**
+ * What object holds the environment variables at runtime. This is usually
+ * `process.env` or `import.meta.env`.
+ */
+ runtimeEnv: process.env,
+
+ /**
+ * By default, this library will feed the environment variables directly to
+ * the Zod validator.
+ *
+ * This means that if you have an empty string for a value that is supposed
+ * to be a number (e.g. `PORT=` in a ".env" file), Zod will incorrectly flag
+ * it as a type mismatch violation. Additionally, if you have an empty string
+ * for a value that is supposed to be a string with a default value (e.g.
+ * `DOMAIN=` in an ".env" file), the default value will never be applied.
+ *
+ * In order to solve these issues, we recommend that all new projects
+ * explicitly specify this option as true.
+ */
+ skipValidation: true,
+});
diff --git a/apps/server/src/index.ts b/apps/server/src/index.ts
index f55fc94b7..a666946fa 100644
--- a/apps/server/src/index.ts
+++ b/apps/server/src/index.ts
@@ -1,5 +1,6 @@
import { Hono } from "hono";
+import { env } from "./env";
import { publicRoute } from "./public";
import { api } from "./v1";
import { VercelIngest } from "./vercel";
@@ -19,7 +20,7 @@ app.route("/public", publicRoute);
/**
* Ping Pong
*/
-app.get("/ping", (c) => c.text("pong"));
+app.get("/ping", (c) => c.json({ ping: "pong", region: env.FLY_REGION }));
/**
* API Routes v1
diff --git a/apps/server/src/public/status.ts b/apps/server/src/public/status.ts
index 814b86fbd..11bef7e0d 100644
--- a/apps/server/src/public/status.ts
+++ b/apps/server/src/public/status.ts
@@ -5,9 +5,11 @@ import { monitor, monitorsToPages, page } from "@openstatus/db/src/schema";
import { getMonitorList, Tinybird } from "@openstatus/tinybird";
import { Redis } from "@openstatus/upstash";
+import { env } from "../env";
+
// TODO: include ratelimiting
-const tb = new Tinybird({ token: process.env.TINY_BIRD_API_KEY || "" });
+const tb = new Tinybird({ token: env.TINY_BIRD_API_KEY });
const redis = Redis.fromEnv();
enum Status {
diff --git a/apps/server/src/v1/monitor.test.ts b/apps/server/src/v1/monitor.test.ts
new file mode 100644
index 000000000..fd4a88a5c
--- /dev/null
+++ b/apps/server/src/v1/monitor.test.ts
@@ -0,0 +1,61 @@
+import { expect, it } from "vitest";
+
+import { api } from ".";
+
+it("GET one monitor", async () => {
+ const res = await api.request("/monitor/1", {
+ headers: {
+ "x-openstatus-key": "1",
+ },
+ });
+ expect(res.status).toBe(200);
+
+ expect(await res.json()).toEqual({
+ id: 1,
+ periodicity: "1m",
+ url: "https://www.openstatus.dev",
+ regions: "ams",
+ name: "OpenStatus",
+ description: "OpenStatus website",
+ method: "POST",
+ body: '{"hello":"world"}',
+ headers: [{ key: "key", value: "value" }],
+ active: true,
+ });
+});
+
+it("GET all monitor", async () => {
+ const res = await api.request("/monitor", {
+ headers: {
+ "x-openstatus-key": "1",
+ },
+ });
+ expect(res.status).toBe(200);
+
+ expect(await res.json()).toEqual([
+ {
+ id: 1,
+ periodicity: "1m",
+ url: "https://www.openstatus.dev",
+ regions: "ams",
+ name: "OpenStatus",
+ description: "OpenStatus website",
+ method: "POST",
+ body: '{"hello":"world"}',
+ headers: [{ key: "key", value: "value" }],
+ active: true,
+ },
+ {
+ active: false,
+ body: "",
+ description: "",
+ headers: [],
+ id: 2,
+ method: "GET",
+ name: "",
+ periodicity: "10m",
+ regions: "gru",
+ url: "https://www.google.com",
+ },
+ ]);
+});
diff --git a/apps/server/src/v1/monitor.ts b/apps/server/src/v1/monitor.ts
index b31528602..30b6bd52d 100644
--- a/apps/server/src/v1/monitor.ts
+++ b/apps/server/src/v1/monitor.ts
@@ -2,7 +2,7 @@ import { createRoute, OpenAPIHono, z } from "@hono/zod-openapi";
import { db, eq, sql } from "@openstatus/db";
import {
- availableRegions,
+ flyRegions,
METHODS,
monitor,
periodicity,
@@ -27,9 +27,9 @@ const ParamsSchema = z.object({
export const periodicityEnum = z.enum(periodicity);
export const regionEnum = z
- .enum(availableRegions)
+ .enum(flyRegions)
.or(z.literal(""))
- .transform((val) => (val === "" ? "auto" : val));
+ .transform((val) => (val === "" ? "" : val));
const MonitorSchema = z
.object({
@@ -46,7 +46,7 @@ const MonitorSchema = z
description: "The url to monitor",
}),
regions: regionEnum.openapi({
- example: "arn1",
+ example: "ams",
description: "The regions to use",
}),
name: z
@@ -108,12 +108,10 @@ const monitorInput = z
example: "https://www.documenso.co",
description: "The url to monitor",
}),
- regions: regionEnum
- .openapi({
- example: "arn1",
- description: "The regions to use",
- })
- .default("auto"),
+ regions: regionEnum.openapi({
+ example: "ams",
+ description: "The regions to use",
+ }),
name: z.string().openapi({
example: "Documenso",
description: "The name of the monitor",
@@ -166,7 +164,15 @@ const getAllRoute = createRoute({
},
description: "Get the monitor",
},
- 400: {
+ 404: {
+ content: {
+ "application/json": {
+ schema: ErrorSchema,
+ },
+ },
+ description: "Not found",
+ },
+ 401: {
content: {
"application/json": {
schema: ErrorSchema,
@@ -208,7 +214,15 @@ const getRoute = createRoute({
},
description: "Get the monitor",
},
- 400: {
+ 401: {
+ content: {
+ "application/json": {
+ schema: ErrorSchema,
+ },
+ },
+ description: "Returns an error",
+ },
+ 404: {
content: {
"application/json": {
schema: ErrorSchema,
@@ -272,6 +286,14 @@ const postRoute = createRoute({
},
description: "Returns an error",
},
+ 403: {
+ content: {
+ "application/json": {
+ schema: ErrorSchema,
+ },
+ },
+ description: "Returns an error",
+ },
},
});
diff --git a/apps/server/src/vercel.ts b/apps/server/src/vercel.ts
index 9e99fe658..92e9ab1a9 100644
--- a/apps/server/src/vercel.ts
+++ b/apps/server/src/vercel.ts
@@ -2,9 +2,10 @@ import type { Context, Env } from "hono";
import { Tinybird } from "@openstatus/tinybird";
+import { env } from "./env";
import { logDrainSchema, logDrainSchemaArray } from "./schema/vercel";
-const tb = new Tinybird({ token: process.env.TINY_BIRD_API_KEY || "" }); // should we use t3-env?
+const tb = new Tinybird({ token: env.TINY_BIRD_API_KEY }); // should we use t3-env?
export function publishVercelLogDrain() {
return tb.buildIngestEndpoint({
diff --git a/apps/server/vitest.config.ts b/apps/server/vitest.config.ts
new file mode 100644
index 000000000..cf98b3bde
--- /dev/null
+++ b/apps/server/vitest.config.ts
@@ -0,0 +1,11 @@
+import { defineConfig } from "vitest/config";
+
+export default defineConfig({
+ test: {
+ // setupFiles: ["dotenv/config"], //this line,
+ globals: true,
+ },
+ define: {
+ "process.env.FLY_REGION": `"ams"`,
+ },
+});
diff --git a/apps/web/package.json b/apps/web/package.json
index fbd01ba4d..09b196df1 100644
--- a/apps/web/package.json
+++ b/apps/web/package.json
@@ -27,7 +27,7 @@
"@sentry/integrations": "7.73.0",
"@sentry/nextjs": "7.73.0",
"@stripe/stripe-js": "2.1.6",
- "@t3-oss/env-nextjs": "0.6.1",
+ "@t3-oss/env-nextjs": "0.7.0",
"@tailwindcss/typography": "0.5.10",
"@tanstack/react-table": "8.10.3",
"@tremor/react": "3.8.2",
diff --git a/apps/web/src/app/api/checker/cron/_cron.ts b/apps/web/src/app/api/checker/cron/_cron.ts
index 8beca971d..7b880d08e 100644
--- a/apps/web/src/app/api/checker/cron/_cron.ts
+++ b/apps/web/src/app/api/checker/cron/_cron.ts
@@ -5,8 +5,7 @@ import type { z } from "zod";
import { createTRPCContext } from "@openstatus/api";
import { edgeRouter } from "@openstatus/api/src/edge";
-import { selectMonitorSchema } from "@openstatus/db/src/schema";
-import { availableRegions } from "@openstatus/tinybird";
+import { flyRegions, selectMonitorSchema } from "@openstatus/db/src/schema";
import { env } from "@/env";
import type { payloadSchema } from "../schema";
@@ -64,14 +63,16 @@ export const cron = async ({
// TODO: fetch + try - catch + retry once
const result = c.publishJSON({
- url: `${DEFAULT_URL}/api/checker/regions/auto`,
+ url: `https://api.openstatus.dev/checker`,
body: payload,
delay: Math.random() * 90,
+ headers: {
+ "fly-prefer-region": "ams",
+ },
});
allResult.push(result);
} else {
- const allMonitorsRegions = row.regions;
- for (const region of allMonitorsRegions) {
+ for (const region of flyRegions) {
const payload: z.infer<typeof payloadSchema> = {
workspaceId: String(row.workspaceId),
monitorId: String(row.id),
@@ -85,8 +86,11 @@ export const cron = async ({
};
const result = c.publishJSON({
- url: `${DEFAULT_URL}/api/checker/regions/${region}`,
+ url: `https://api.openstatus.dev/checker`,
body: payload,
+ headers: {
+ "fly-prefer-region": region,
+ },
});
allResult.push(result);
}
@@ -95,11 +99,11 @@ export const cron = async ({
// our first legacy monitor
if (periodicity === "10m") {
// Right now we are just checking the ping endpoint
- for (const region of availableRegions) {
+ for (const region of flyRegions) {
const payload: z.infer<typeof payloadSchema> = {
workspaceId: "openstatus",
monitorId: "openstatusPing",
- url: `${DEFAULT_URL}/api/ping`,
+ url: `https://api.openstatus.dev/ping`,
cronTimestamp: timestamp,
method: "GET",
pageIds: ["openstatus"],
@@ -108,8 +112,11 @@ export const cron = async ({
// TODO: fetch + try - catch + retry once
const result = c.publishJSON({
- url: `${DEFAULT_URL}/api/checker/regions/${region}`,
+ url: `https://api.openstatus.dev/checker`,
body: payload,
+ headers: {
+ "fly-prefer-region": region,
+ },
delay: Math.random() * 90,
});
allResult.push(result);
diff --git a/apps/web/src/app/api/checker/regions/_checker.ts b/apps/web/src/app/api/checker/regions/_checker.ts
index e854e0372..4decbd6d0 100644
--- a/apps/web/src/app/api/checker/regions/_checker.ts
+++ b/apps/web/src/app/api/checker/regions/_checker.ts
@@ -30,7 +30,7 @@ const monitor = async (
) => {
const { monitorId, cronTimestamp, url, workspaceId } = payload;
- await publishPingResponse(tb)({
+ await publishPingResponse({
id: nanoid(), // TBD: we don't need it
timestamp: Date.now(),
statusCode,
diff --git a/apps/web/src/app/app/(dashboard)/[workspaceSlug]/monitors/[id]/data/page.tsx b/apps/web/src/app/app/(dashboard)/[workspaceSlug]/monitors/[id]/data/page.tsx
index bbad04089..66d21c647 100644
--- a/apps/web/src/app/app/(dashboard)/[workspaceSlug]/monitors/[id]/data/page.tsx
+++ b/apps/web/src/app/app/(dashboard)/[workspaceSlug]/monitors/[id]/data/page.tsx
@@ -3,8 +3,6 @@ import { notFound } from "next/navigation";
import { endOfDay, startOfDay } from "date-fns";
import * as z from "zod";
-import { availableRegions } from "@openstatus/tinybird";
-
import { Header } from "@/components/dashboard/header";
import { columns } from "@/components/data-table/columns";
import { DataTable } from "@/components/data-table/data-table";
@@ -21,7 +19,6 @@ export const revalidate = 0;
*/
const searchParamsSchema = z.object({
statusCode: z.coerce.number().optional(),
- region: z.enum(availableRegions).optional(),
cronTimestamp: z.coerce.number().optional(),
fromDate: z.coerce
.number()
diff --git a/apps/web/src/components/forms/montitor-form.tsx b/apps/web/src/components/forms/montitor-form.tsx
index e46930162..0a60d6f96 100644
--- a/apps/web/src/components/forms/montitor-form.tsx
+++ b/apps/web/src/components/forms/montitor-form.tsx
@@ -57,7 +57,7 @@ import {
import { LoadingAnimation } from "@/components/loading-animation";
import { FailedPingAlertConfirmation } from "@/components/modals/failed-ping-alert-confirmation";
-import { regionsDict } from "@/data/regions-dictionary";
+import { flyRegionsDict } from "@/data/regions-dictionary";
import { useToastAction } from "@/hooks/use-toast-action";
import useUpdateSearchParams from "@/hooks/use-update-search-params";
import { cn } from "@/lib/utils";
@@ -481,9 +481,9 @@ export function MonitorForm({
{/* This is a hotfix */}
{field.value?.length === 1 &&
field.value[0].length > 0
- ? regionsDict[
+ ? flyRegionsDict[
field
- .value[0] as keyof typeof regionsDict
+ .value[0] as keyof typeof flyRegionsDict
].location
: "Select region"}
<ChevronsUpDown className="ml-2 h-4 w-4 shrink-0 opacity-50" />
@@ -495,10 +495,10 @@ export function MonitorForm({
<CommandInput placeholder="Select a region..." />
<CommandEmpty>No regions found.</CommandEmpty>
<CommandGroup className="max-h-[150px] overflow-y-scroll">
- {Object.keys(regionsDict).map((region) => {
+ {Object.keys(flyRegionsDict).map((region) => {
const { code, location } =
- regionsDict[
- region as keyof typeof regionsDict
+ flyRegionsDict[
+ region as keyof typeof flyRegionsDict
];
const isSelected =
field.value?.includes(code);
diff --git a/apps/web/src/data/regions-dictionary.ts b/apps/web/src/data/regions-dictionary.ts
index ccc17eff8..d4190fc4c 100644
--- a/apps/web/src/data/regions-dictionary.ts
+++ b/apps/web/src/data/regions-dictionary.ts
@@ -2,7 +2,7 @@
* AWS data center informations from 18 regions, supported by vercel.
* https://vercel.com/docs/concepts/edge-network/regions#region-list
*/
-export const regionsDict = {
+export const vercelRegionsDict = {
/**
* A random location will be chosen
*/
@@ -102,3 +102,39 @@ export const regionsDict = {
location: "Sydney, Australia",
},
} as const;
+
+export const flyRegionsDict = {
+ ams: {
+ code: "ams",
+ name: "ap-southeast-2",
+ location: "Amsterdam, Netherlands",
+ },
+ iad: {
+ code: "iad",
+ name: "us-east-1",
+ location: "Ashburn, Virginia, USA",
+ },
+ jnb: {
+ code: "jnb",
+ name: "",
+ location: "Johannesburg, South Africa",
+ },
+ hkg: {
+ code: "hkg",
+ name: "",
+ location: "Hong Kong, Hong Kong",
+ },
+ gru: {
+ code: "gru",
+ name: "",
+ location: "Sao Paulo, Brazil",
+ },
+
+ syd: {
+ code: "syd",
+ name: "ap-southeast-2",
+ location: "Sydney, Australia",
+ },
+} as const;
+
+export const regionsDict = { ...vercelRegionsDict, ...flyRegionsDict } as const;
diff --git a/bun.lockb b/bun.lockb
index a651e6aef..7fb5e6b4d 100755
Binary files a/bun.lockb and b/bun.lockb differ
diff --git a/package.json b/package.json
index 2f892ad04..deec3952a 100644
--- a/package.json
+++ b/package.json
@@ -7,7 +7,8 @@
"lint:strict": "eslint --max-warnings=0 apps/**/*.{ts,tsx}",
"format": "prettier --write \"**/*.{ts,tsx,md}\"",
"format:check": "prettier -c \"**/*.{ts,tsx,md}\"",
- "tsc": "tsc"
+ "tsc": "tsc",
+ "test": "turbo run test"
},
"devDependencies": {
"@ianvs/prettier-plugin-sort-imports": "4.1.0",
diff --git a/packages/analytics/package.json b/packages/analytics/package.json
index 637a5d4be..88c5484cc 100644
--- a/packages/analytics/package.json
+++ b/packages/analytics/package.json
@@ -5,7 +5,7 @@
"main": "src/index.ts",
"dependencies": {
"@jitsu/js": "1.3.0",
- "@t3-oss/env-core": "0.6.1",
+ "@t3-oss/env-core": "0.7.0",
"zod": "3.22.2"
},
"devDependencies": {
diff --git a/packages/api/package.json b/packages/api/package.json
index f176608b2..6069a4767 100644
--- a/packages/api/package.json
+++ b/packages/api/package.json
@@ -4,7 +4,7 @@
"description": "",
"main": "index.ts",
"scripts": {
- "test": "vitest"
+ "test": "vitest run"
},
"dependencies": {
"@clerk/nextjs": "4.25.1",
@@ -12,7 +12,7 @@
"@openstatus/db": "workspace:*",
"@openstatus/emails": "workspace:*",
"@openstatus/plans": "workspace:*",
- "@t3-oss/env-core": "0.6.1",
+ "@t3-oss/env-core": "0.7.0",
"@trpc/client": "10.38.5",
"@trpc/server": "10.38.5",
"random-word-slugs": "0.1.7",
diff --git a/packages/db/package.json b/packages/db/package.json
index 1bc92eca5..0f7c33b9b 100644
--- a/packages/db/package.json
+++ b/packages/db/package.json
@@ -12,7 +12,7 @@
},
"dependencies": {
"@libsql/client": "0.3.4",
- "@t3-oss/env-core": "0.6.1",
+ "@t3-oss/env-core": "0.7.0",
"dotenv": "16.3.1",
"drizzle-orm": "0.28.6",
"drizzle-zod": "0.5.1",
diff --git a/packages/db/src/schema/monitor.ts b/packages/db/src/schema/monitor.ts
index e76d970b4..518c44c45 100644
--- a/packages/db/src/schema/monitor.ts
+++ b/packages/db/src/schema/monitor.ts
@@ -13,8 +13,7 @@ import { notificationsToMonitors } from "./notification";
import { page } from "./page";
import { workspace } from "./workspace";
-export const availableRegions = [
- "auto", // randomly choose region
+export const vercelRegions = [
"arn1",
"bom1",
"cdg1",
@@ -35,11 +34,13 @@ export const availableRegions = [
"syd1",
] as const;
+export const flyRegions = ["ams", "iad", "hkg", "jnb", "syd", "gru"] as const;
+
export const periodicity = ["1m", "5m", "10m", "30m", "1h", "other"] as const;
export const METHODS = ["GET", "POST"] as const;
export const status = ["active", "error"] as const;
export const statusSchema = z.enum(status);
-export const RegionEnum = z.enum(availableRegions);
+export const RegionEnum = z.enum([...flyRegions, ...vercelRegions, "auto"]);
export const monitor = sqliteTable("monitor", {
id: integer("id").primaryKey(),
diff --git a/packages/db/src/seed.mts b/packages/db/src/seed.mts
index 030b5af38..8addb7101 100644
--- a/packages/db/src/seed.mts
+++ b/packages/db/src/seed.mts
@@ -7,6 +7,8 @@ import { env } from "../env.mjs";
import {
monitor,
monitorsToPages,
+ notification,
+ notificationsToMonitors,
page,
user,
usersToWorkspaces,
@@ -43,7 +45,7 @@ async function main() {
description: "OpenStatus website",
method: "POST",
periodicity: "1m",
- regions: "fra1",
+ regions: "ams",
headers: '[{"key":"key", "value":"value"}]',
body: '{"hello":"world"}',
},
@@ -54,7 +56,7 @@ async function main() {
periodicity: "10m",
url: "https://www.google.com",
method: "GET",
- regions: "fra1",
+ regions: "gru",
},
])
.run();
@@ -90,6 +92,20 @@ async function main() {
.run();
await db.insert(monitorsToPages).values({ monitorId: 1, pageId: 1 }).run();
+ await db
+ .insert(notification)
+ .values({
+ id: 1,
+ provider: "email",
+ name: "sample test notification",
+ data: '{"email":"[email protected]"}',
+ workspaceId: 1,
+ })
+ .run();
+ await db
+ .insert(notificationsToMonitors)
+ .values({ monitorId: 1, notificationId: 1 })
+ .run();
process.exit(0);
}
diff --git a/packages/emails/package.json b/packages/emails/package.json
index 49b8c5bdd..ab2355927 100644
--- a/packages/emails/package.json
+++ b/packages/emails/package.json
@@ -15,7 +15,7 @@
"@react-email/head": "0.0.5",
"@react-email/html": "0.0.4",
"@react-email/tailwind": "0.0.9",
- "@t3-oss/env-core": "0.6.1",
+ "@t3-oss/env-core": "0.7.0",
"react-email": "1.9.5",
"resend": "1.1.0",
"zod": "3.22.2"
diff --git a/packages/integrations/vercel/package.json b/packages/integrations/vercel/package.json
index ebc63d172..f471d9e7f 100644
--- a/packages/integrations/vercel/package.json
+++ b/packages/integrations/vercel/package.json
@@ -5,7 +5,7 @@
"description": "Log drains Vercel integration.",
"dependencies": {
"@openstatus/tinybird": "workspace:*",
- "@t3-oss/env-core": "0.6.1",
+ "@t3-oss/env-core": "0.7.0",
"react": "18.2.0",
"react-dom": "18.2.0",
"zod": "^3.22.2"
diff --git a/packages/notifications/email/env.ts b/packages/notifications/email/env.ts
index 1af0229b2..692277c12 100644
--- a/packages/notifications/email/env.ts
+++ b/packages/notifications/email/env.ts
@@ -8,4 +8,5 @@ export const env = createEnv({
runtimeEnv: {
RESEND_API_KEY: process.env.RESEND_API_KEY,
},
+ skipValidation: process.env.NODE_ENV === "test",
});
diff --git a/packages/notifications/email/package.json b/packages/notifications/email/package.json
index 0924fb8e2..075f1211b 100644
--- a/packages/notifications/email/package.json
+++ b/packages/notifications/email/package.json
@@ -9,7 +9,7 @@
"@openstatus/tinybird": "workspace:*",
"@react-email/components": "0.0.7",
"@react-email/render": "0.0.7",
- "@t3-oss/env-core": "0.6.1",
+ "@t3-oss/env-core": "0.7.0",
"resend": "1.1.0",
"zod": "3.22.2"
},
diff --git a/packages/notifications/email/src/index.ts b/packages/notifications/email/src/index.ts
index f9761dd69..06a3a1b51 100644
--- a/packages/notifications/email/src/index.ts
+++ b/packages/notifications/email/src/index.ts
@@ -15,7 +15,7 @@ export const send = async ({
monitor: z.infer<typeof basicMonitorSchema>;
notification: z.infer<typeof selectNotificationSchema>;
}) => {
- const config = EmailConfigurationSchema.parse(notification.data);
+ const config = EmailConfigurationSchema.parse(JSON.parse(notification.data));
const { email } = config;
const res = await fetch("https://api.resend.com/emails", {
diff --git a/packages/plans/package.json b/packages/plans/package.json
index 49735cd4c..600d187bc 100644
--- a/packages/plans/package.json
+++ b/packages/plans/package.json
@@ -3,9 +3,7 @@
"version": "1.0.0",
"description": "",
"main": "index.ts",
- "scripts": {
- "test": "echo \"Error: no test specified\" && exit 1"
- },
+ "scripts": {},
"dependencies": {
"@openstatus/db": "workspace:*",
"zod": "3.22.2"
diff --git a/packages/react/package.json b/packages/react/package.json
index 5165c7815..1999a6f91 100644
--- a/packages/react/package.json
+++ b/packages/react/package.json
@@ -9,6 +9,7 @@
],
"license": "MIT",
"scripts": {
+ "dev":"tsup && pnpm run build:tailwind",
"build:tailwind": "tailwindcss -i ./src/styles.css -o ./dist/styles.css --minify",
"build": "tsup && pnpm run build:tailwind"
},
diff --git a/packages/tinybird/src/client.ts b/packages/tinybird/src/client.ts
index 5ae1d2c46..b9d3d8aad 100644
--- a/packages/tinybird/src/client.ts
+++ b/packages/tinybird/src/client.ts
@@ -1,4 +1,4 @@
-import type { Tinybird } from "@chronark/zod-bird";
+import { Tinybird } from "@chronark/zod-bird";
import {
tbBuildHomeStats,
@@ -11,14 +11,12 @@ import {
} from "./validation";
// REMINDER:
-// const tb = new Tinybird({ token: process.env.TINYBIRD_TOKEN! });
+const tb = new Tinybird({ token: process.env.TINY_BIRD_API_KEY! });
-export function publishPingResponse(tb: Tinybird) {
- return tb.buildIngestEndpoint({
- datasource: "ping_response__v4",
- event: tbIngestPingResponse,
- });
-}
+export const publishPingResponse = tb.buildIngestEndpoint({
+ datasource: "ping_response__v4",
+ event: tbIngestPingResponse,
+});
export function getResponseList(tb: Tinybird) {
return tb.buildPipe({
diff --git a/packages/tinybird/src/validation.ts b/packages/tinybird/src/validation.ts
index 32a9598cd..8f182172d 100644
--- a/packages/tinybird/src/validation.ts
+++ b/packages/tinybird/src/validation.ts
@@ -1,9 +1,6 @@
import * as z from "zod";
-/**
- * All available Vercel (AWS) regions
- */
-export const availableRegions = [
+export const vercelRegions = [
"arn1",
"bom1",
"cdg1",
@@ -24,6 +21,10 @@ export const availableRegions = [
"syd1",
] as const;
+export const flyRegions = ["ams", "iad", "hkg", "jnb", "syd", "gru"] as const;
+
+export const availableRegions = [...vercelRegions, ...flyRegions] as const;
+
/**
* Values for the datasource ping_response__v4
*/
@@ -33,7 +34,7 @@ export const tbIngestPingResponse = z.object({
monitorId: z.string(),
timestamp: z.number().int(),
statusCode: z.number().int(),
- latency: z.number().int(), // in ms
+ latency: z.number(), // in ms
cronTimestamp: z.number().int().optional().nullable().default(Date.now()),
url: z.string().url(),
region: z.string().min(4).max(4), // REMINDER: won't work on fy
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index 909896535..411106771 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -80,10 +80,13 @@ importers:
dependencies:
'@hono/zod-openapi':
specifier: 0.7.1
'@openstatus/db':
specifier: workspace:*
version: link:../../packages/db
+ '@openstatus/notification-emails':
+ specifier: workspace:*
+ version: link:../../packages/notifications/email
'@openstatus/plans':
specifier: workspace:*
version: link:../../packages/plans
@@ -93,12 +96,18 @@ importers:
'@openstatus/upstash':
specifier: workspace:*
version: link:../../packages/upstash
+ '@t3-oss/env-core':
+ specifier: 0.7.0
'@unkey/api':
specifier: 0.10.0
version: 0.10.0
hono:
- specifier: 3.7.3
- version: 3.7.3
+ specifier: 3.7.6
+ version: 3.7.6
+ nanoid:
+ specifier: 5.0.1
+ version: 5.0.1
zod:
specifier: 3.22.2
version: 3.22.2
@@ -106,6 +115,12 @@ importers:
'@openstatus/tsconfig':
specifier: workspace:*
version: link:../../packages/tsconfig
+ dotenv:
+ specifier: 16.3.1
+ version: 16.3.1
+ vitest:
+ specifier: 0.34.6
+ version: 0.34.6
apps/web:
dependencies:
@@ -161,8 +176,8 @@ importers:
specifier: 2.1.6
version: 2.1.6
'@t3-oss/env-nextjs':
- specifier: 0.6.1
+ specifier: 0.7.0
'@tailwindcss/typography':
specifier: 0.5.10
version: 0.5.10([email protected])
@@ -339,8 +354,8 @@ importers:
specifier: 1.3.0
version: 1.3.0(@types/[email protected])
'@t3-oss/env-core':
- specifier: 0.6.1
+ specifier: 0.7.0
zod:
specifier: 3.22.2
version: 3.22.2
@@ -373,8 +388,8 @@ importers:
specifier: workspace:*
version: link:../plans
'@t3-oss/env-core':
- specifier: 0.6.1
+ specifier: 0.7.0
'@trpc/client':
specifier: 10.38.5
version: 10.38.5(@trpc/[email protected])
@@ -447,8 +462,8 @@ importers:
specifier: 0.3.4
'@t3-oss/env-core':
- specifier: 0.6.1
+ specifier: 0.7.0
dotenv:
specifier: 16.3.1
version: 16.3.1
@@ -502,8 +517,8 @@ importers:
specifier: 0.0.9
version: 0.0.9
'@t3-oss/env-core':
- specifier: 0.6.1
+ specifier: 0.7.0
react-email:
specifier: 1.9.5
version: 1.9.5
@@ -536,8 +551,8 @@ importers:
specifier: workspace:*
version: link:../../tinybird
'@t3-oss/env-core':
- specifier: 0.6.1
+ specifier: 0.7.0
react:
specifier: 18.2.0
version: 18.2.0
@@ -585,8 +600,8 @@ importers:
specifier: 0.0.7
version: 0.0.7
'@t3-oss/env-core':
- specifier: 0.6.1
+ specifier: 0.7.0
resend:
specifier: 1.1.0
version: 1.1.0
@@ -2126,7 +2141,7 @@ packages:
tailwindcss: 3.3.2
dev: false
resolution: {integrity: sha512-zs6AURALRF0A1gkuY5iKmRBT7d0JsLC3xVPDjBdRbJqNV3XQv4i2kprZTRAcI9AjjGApTsZbLZv1pZRCB2viwQ==}
engines: {node: '>=16.0.0'}
peerDependencies:
@@ -2134,18 +2149,18 @@ packages:
zod: 3.*
dependencies:
'@asteasolutions/zod-to-openapi': 5.5.0([email protected])
- '@hono/zod-validator': 0.1.9([email protected])([email protected])
- hono: 3.7.3
+ '@hono/zod-validator': 0.1.9([email protected])([email protected])
+ hono: 3.7.6
zod: 3.22.2
dev: false
resolution: {integrity: sha512-qEG5xagKzyif283ldCKzp+aF9Aebclg0sfrgyRQQNAizmXpicZ3UGduST/Jp+a9bjt3mI+VyEXMftb4rogLxQA==}
peerDependencies:
hono: 3.*
zod: ^3.19.1
dependencies:
- hono: 3.7.3
+ hono: 3.7.6
zod: 3.22.2
dev: false
@@ -5065,23 +5080,29 @@ packages:
dependencies:
tslib: 2.6.2
- resolution: {integrity: sha512-KQD7qEDJtkWIWWmTVjNvk0wnHpkvAQ6CRbUxbWMFNG/fiosBQDQvtRpBNu6USxBscJCoC4z6y7P9MN52/mLOzw==}
+ resolution: {integrity: sha512-cgunN82CqgQOOyuMOK/bGtujX5/ooXQTwGMJVWI6mCowq6WE5EgRLOqF/DRcrElI0gSFGA9i9GrxzCnk73HZLQ==}
peerDependencies:
typescript: '>=4.7.2'
zod: ^3.0.0
+ peerDependenciesMeta:
+ typescript:
+ optional: true
dependencies:
typescript: 5.2.2
zod: 3.22.2
dev: false
- resolution: {integrity: sha512-z1dIC++Vxj9kmzX5nSPfcrCSkszy3dTEPC4Ssx7Ap5AqR3c2Qa7S0xf8axn6coy7D/vCXDAAnHYnCMDhtcY3SQ==}
+ resolution: {integrity: sha512-rjQIt6P3tac2eRx4BNQLNaJ+AIb2P8wXw4uFvYbEekqMGShikkUALnX3hUn1twYiGVGHXRm6UbU+LqtjIktuGg==}
peerDependencies:
typescript: '>=4.7.2'
zod: ^3.0.0
+ peerDependenciesMeta:
+ typescript:
+ optional: true
dependencies:
- '@t3-oss/env-core': 0.6.1([email protected])([email protected])
+ '@t3-oss/env-core': 0.7.0([email protected])([email protected])
typescript: 5.2.2
zod: 3.22.2
dev: false
@@ -7582,7 +7603,6 @@ packages:
resolution: {integrity: sha512-IPzF4w4/Rd94bA9imS68tZBaYyBWSCE47V1RGuMrB94iyTOIEwRmVL2x/4An+6mETpLrKJ5hQkB8W4kFAadeIQ==}
engines: {node: '>=12'}
- dev: false
resolution: {integrity: sha512-pYxfDYpued//QpnLIm4Avk7rsNtAtQkUES2cwAYSvD/wd2pKD71gN2Ebj3e7klzXwjocvE8c5vx/1fxwpqmSxA==}
@@ -9261,8 +9281,8 @@ packages:
react-is: 16.13.1
dev: false
- resolution: {integrity: sha512-BQHdLPXb30hQ9k+04byeSi4QMHk20U1GUq0nT5kGUCGZtxeYhAS7mUJ1wgjn4SCvgiw1rcc6oBOAlwJQ7jQymA==}
+ resolution: {integrity: sha512-nuLNH9+nV6ojXK6b9I0RGZgdMuLTOXeQPs6xsIw/G5iyT8j8m7Nnx8pTxQprmSmCaEYIPv91rCcq45PQNfW68A==}
engines: {node: '>=16.0.0'}
dev: false
diff --git a/turbo.json b/turbo.json
index 77dcb9eef..5848a37c6 100644
--- a/turbo.json
+++ b/turbo.json
@@ -23,8 +23,10 @@
},
"lint": {},
"dev": {
- "cache": false,
- "persistent": true
+ "cache": false
+ },
+ "test": {
+ "cache": false
}
}
}