diff --git a/apps/api-master/drizzle.config.ts b/apps/api-master/drizzle.config.ts new file mode 100644 index 0000000..2878afc --- /dev/null +++ b/apps/api-master/drizzle.config.ts @@ -0,0 +1,10 @@ +import { defineConfig } from "drizzle-kit"; + +export default defineConfig({ + dbCredentials: { + url: "postgresql://metrics:metrics@localhost:5432/metrics", + }, + dialect: "postgresql", + schema: "./src/db.ts", + out: "./drizzle", +}); diff --git a/apps/api-master/drizzle/0000_flippant_marrow.sql b/apps/api-master/drizzle/0000_flippant_marrow.sql new file mode 100644 index 0000000..4c3414a --- /dev/null +++ b/apps/api-master/drizzle/0000_flippant_marrow.sql @@ -0,0 +1,9 @@ +CREATE TABLE IF NOT EXISTS "online_users_ip_data" ( + "uuid" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL, + "ip" varchar(45) NOT NULL, + "country" varchar(2) NOT NULL, + "latitude" numeric(10, 8) NOT NULL, + "longitude" numeric(11, 8) NOT NULL, + "name" varchar(255), + "timestamp" timestamp DEFAULT now() +); diff --git a/apps/api-master/drizzle/0001_white_lifeguard.sql b/apps/api-master/drizzle/0001_white_lifeguard.sql new file mode 100644 index 0000000..a1fd328 --- /dev/null +++ b/apps/api-master/drizzle/0001_white_lifeguard.sql @@ -0,0 +1,2 @@ +CREATE INDEX IF NOT EXISTS "idx_online_users_uuid" ON "online_users_ip_data" USING btree ("uuid");--> statement-breakpoint +CREATE INDEX IF NOT EXISTS "idx_online_users_timestamp" ON "online_users_ip_data" USING btree ("timestamp"); \ No newline at end of file diff --git a/apps/api-master/drizzle/0002_new_darkhawk.sql b/apps/api-master/drizzle/0002_new_darkhawk.sql new file mode 100644 index 0000000..7f6099e --- /dev/null +++ b/apps/api-master/drizzle/0002_new_darkhawk.sql @@ -0,0 +1 @@ +ALTER TABLE "online_users_ip_data" ALTER COLUMN "timestamp" SET DATA TYPE timestamp with time zone; \ No newline at end of file diff --git a/apps/api-master/drizzle/0003_narrow_mastermind.sql b/apps/api-master/drizzle/0003_narrow_mastermind.sql new file mode 100644 index 0000000..77213a7 --- /dev/null +++ b/apps/api-master/drizzle/0003_narrow_mastermind.sql @@ -0,0 +1,2 @@ +ALTER TABLE "online_users_ip_data" ADD COLUMN "presences" jsonb DEFAULT '[]' NOT NULL;--> statement-breakpoint +ALTER TABLE "online_users_ip_data" DROP COLUMN IF EXISTS "name"; \ No newline at end of file diff --git a/apps/api-master/drizzle/0004_tiresome_puff_adder.sql b/apps/api-master/drizzle/0004_tiresome_puff_adder.sql new file mode 100644 index 0000000..218ddf0 --- /dev/null +++ b/apps/api-master/drizzle/0004_tiresome_puff_adder.sql @@ -0,0 +1 @@ +ALTER TABLE "online_users_ip_data" ADD COLUMN "sessions" integer DEFAULT 0 NOT NULL; \ No newline at end of file diff --git a/apps/api-master/drizzle/meta/0000_snapshot.json b/apps/api-master/drizzle/meta/0000_snapshot.json new file mode 100644 index 0000000..de712b8 --- /dev/null +++ b/apps/api-master/drizzle/meta/0000_snapshot.json @@ -0,0 +1,70 @@ +{ + "id": "e29a6708-01f1-455a-b345-63dac1e124dc", + "prevId": "00000000-0000-0000-0000-000000000000", + "version": "7", + "dialect": "postgresql", + "tables": { + "public.online_users_ip_data": { + "name": "online_users_ip_data", + "schema": "", + "columns": { + "uuid": { + "name": "uuid", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "ip": { + "name": "ip", + "type": "varchar(45)", + "primaryKey": false, + "notNull": true + }, + "country": { + "name": "country", + "type": "varchar(2)", + "primaryKey": false, + "notNull": true + }, + "latitude": { + "name": "latitude", + "type": "numeric(10, 8)", + "primaryKey": false, + "notNull": true + }, + "longitude": { + "name": "longitude", + "type": "numeric(11, 8)", + "primaryKey": false, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar(255)", + "primaryKey": false, + "notNull": false + }, + "timestamp": { + "name": "timestamp", + "type": "timestamp", + "primaryKey": false, + "notNull": false, + "default": "now()" + } + }, + "indexes": {}, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} + } + }, + "enums": {}, + "schemas": {}, + "sequences": {}, + "_meta": { + "columns": {}, + "schemas": {}, + "tables": {} + } +} \ No newline at end of file diff --git a/apps/api-master/drizzle/meta/0001_snapshot.json b/apps/api-master/drizzle/meta/0001_snapshot.json new file mode 100644 index 0000000..5c2d7da --- /dev/null +++ b/apps/api-master/drizzle/meta/0001_snapshot.json @@ -0,0 +1,101 @@ +{ + "id": "4aa32a8e-f573-43b9-976a-2d078a0df0ea", + "prevId": "e29a6708-01f1-455a-b345-63dac1e124dc", + "version": "7", + "dialect": "postgresql", + "tables": { + "public.online_users_ip_data": { + "name": "online_users_ip_data", + "schema": "", + "columns": { + "uuid": { + "name": "uuid", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "ip": { + "name": "ip", + "type": "varchar(45)", + "primaryKey": false, + "notNull": true + }, + "country": { + "name": "country", + "type": "varchar(2)", + "primaryKey": false, + "notNull": true + }, + "latitude": { + "name": "latitude", + "type": "numeric(10, 8)", + "primaryKey": false, + "notNull": true + }, + "longitude": { + "name": "longitude", + "type": "numeric(11, 8)", + "primaryKey": false, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar(255)", + "primaryKey": false, + "notNull": false + }, + "timestamp": { + "name": "timestamp", + "type": "timestamp", + "primaryKey": false, + "notNull": false, + "default": "now()" + } + }, + "indexes": { + "idx_online_users_uuid": { + "name": "idx_online_users_uuid", + "columns": [ + { + "expression": "uuid", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "idx_online_users_timestamp": { + "name": "idx_online_users_timestamp", + "columns": [ + { + "expression": "timestamp", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} + } + }, + "enums": {}, + "schemas": {}, + "sequences": {}, + "_meta": { + "columns": {}, + "schemas": {}, + "tables": {} + } +} \ No newline at end of file diff --git a/apps/api-master/drizzle/meta/0002_snapshot.json b/apps/api-master/drizzle/meta/0002_snapshot.json new file mode 100644 index 0000000..a4d0a92 --- /dev/null +++ b/apps/api-master/drizzle/meta/0002_snapshot.json @@ -0,0 +1,101 @@ +{ + "id": "c1b8dbed-b232-4d66-9e74-b9af333095bc", + "prevId": "4aa32a8e-f573-43b9-976a-2d078a0df0ea", + "version": "7", + "dialect": "postgresql", + "tables": { + "public.online_users_ip_data": { + "name": "online_users_ip_data", + "schema": "", + "columns": { + "uuid": { + "name": "uuid", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "ip": { + "name": "ip", + "type": "varchar(45)", + "primaryKey": false, + "notNull": true + }, + "country": { + "name": "country", + "type": "varchar(2)", + "primaryKey": false, + "notNull": true + }, + "latitude": { + "name": "latitude", + "type": "numeric(10, 8)", + "primaryKey": false, + "notNull": true + }, + "longitude": { + "name": "longitude", + "type": "numeric(11, 8)", + "primaryKey": false, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar(255)", + "primaryKey": false, + "notNull": false + }, + "timestamp": { + "name": "timestamp", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": false, + "default": "now()" + } + }, + "indexes": { + "idx_online_users_uuid": { + "name": "idx_online_users_uuid", + "columns": [ + { + "expression": "uuid", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "idx_online_users_timestamp": { + "name": "idx_online_users_timestamp", + "columns": [ + { + "expression": "timestamp", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} + } + }, + "enums": {}, + "schemas": {}, + "sequences": {}, + "_meta": { + "columns": {}, + "schemas": {}, + "tables": {} + } +} \ No newline at end of file diff --git a/apps/api-master/drizzle/meta/0003_snapshot.json b/apps/api-master/drizzle/meta/0003_snapshot.json new file mode 100644 index 0000000..4011cbd --- /dev/null +++ b/apps/api-master/drizzle/meta/0003_snapshot.json @@ -0,0 +1,102 @@ +{ + "id": "e409a4d0-f698-484a-b412-38966a7b3a19", + "prevId": "c1b8dbed-b232-4d66-9e74-b9af333095bc", + "version": "7", + "dialect": "postgresql", + "tables": { + "public.online_users_ip_data": { + "name": "online_users_ip_data", + "schema": "", + "columns": { + "uuid": { + "name": "uuid", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "ip": { + "name": "ip", + "type": "varchar(45)", + "primaryKey": false, + "notNull": true + }, + "country": { + "name": "country", + "type": "varchar(2)", + "primaryKey": false, + "notNull": true + }, + "latitude": { + "name": "latitude", + "type": "numeric(10, 8)", + "primaryKey": false, + "notNull": true + }, + "longitude": { + "name": "longitude", + "type": "numeric(11, 8)", + "primaryKey": false, + "notNull": true + }, + "presences": { + "name": "presences", + "type": "jsonb", + "primaryKey": false, + "notNull": true, + "default": "'[]'" + }, + "timestamp": { + "name": "timestamp", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": false, + "default": "now()" + } + }, + "indexes": { + "idx_online_users_uuid": { + "name": "idx_online_users_uuid", + "columns": [ + { + "expression": "uuid", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "idx_online_users_timestamp": { + "name": "idx_online_users_timestamp", + "columns": [ + { + "expression": "timestamp", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} + } + }, + "enums": {}, + "schemas": {}, + "sequences": {}, + "_meta": { + "columns": {}, + "schemas": {}, + "tables": {} + } +} \ No newline at end of file diff --git a/apps/api-master/drizzle/meta/0004_snapshot.json b/apps/api-master/drizzle/meta/0004_snapshot.json new file mode 100644 index 0000000..2d995dc --- /dev/null +++ b/apps/api-master/drizzle/meta/0004_snapshot.json @@ -0,0 +1,109 @@ +{ + "id": "179435b5-dc15-4a42-9539-c3f336699d63", + "prevId": "e409a4d0-f698-484a-b412-38966a7b3a19", + "version": "7", + "dialect": "postgresql", + "tables": { + "public.online_users_ip_data": { + "name": "online_users_ip_data", + "schema": "", + "columns": { + "uuid": { + "name": "uuid", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "ip": { + "name": "ip", + "type": "varchar(45)", + "primaryKey": false, + "notNull": true + }, + "country": { + "name": "country", + "type": "varchar(2)", + "primaryKey": false, + "notNull": true + }, + "latitude": { + "name": "latitude", + "type": "numeric(10, 8)", + "primaryKey": false, + "notNull": true + }, + "longitude": { + "name": "longitude", + "type": "numeric(11, 8)", + "primaryKey": false, + "notNull": true + }, + "sessions": { + "name": "sessions", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "presences": { + "name": "presences", + "type": "jsonb", + "primaryKey": false, + "notNull": true, + "default": "'[]'" + }, + "timestamp": { + "name": "timestamp", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": false, + "default": "now()" + } + }, + "indexes": { + "idx_online_users_uuid": { + "name": "idx_online_users_uuid", + "columns": [ + { + "expression": "uuid", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "idx_online_users_timestamp": { + "name": "idx_online_users_timestamp", + "columns": [ + { + "expression": "timestamp", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} + } + }, + "enums": {}, + "schemas": {}, + "sequences": {}, + "_meta": { + "columns": {}, + "schemas": {}, + "tables": {} + } +} \ No newline at end of file diff --git a/apps/api-master/drizzle/meta/_journal.json b/apps/api-master/drizzle/meta/_journal.json new file mode 100644 index 0000000..4aecead --- /dev/null +++ b/apps/api-master/drizzle/meta/_journal.json @@ -0,0 +1,41 @@ +{ + "version": "7", + "dialect": "postgresql", + "entries": [ + { + "idx": 0, + "version": "7", + "when": 1726516195146, + "tag": "0000_flippant_marrow", + "breakpoints": true + }, + { + "idx": 1, + "version": "7", + "when": 1726516348344, + "tag": "0001_white_lifeguard", + "breakpoints": true + }, + { + "idx": 2, + "version": "7", + "when": 1726516660134, + "tag": "0002_new_darkhawk", + "breakpoints": true + }, + { + "idx": 3, + "version": "7", + "when": 1726517073510, + "tag": "0003_narrow_mastermind", + "breakpoints": true + }, + { + "idx": 4, + "version": "7", + "when": 1726517405363, + "tag": "0004_tiresome_puff_adder", + "breakpoints": true + } + ] +} \ No newline at end of file diff --git a/apps/api-master/environment.d.ts b/apps/api-master/environment.d.ts index bc62d23..99434f0 100644 --- a/apps/api-master/environment.d.ts +++ b/apps/api-master/environment.d.ts @@ -8,3 +8,9 @@ declare module "ip-location-api" { export function updateDb(options: { fields?: string[]; dataDir?: string; tmpDataDir?: string }): Promise; export function reload(options: { fields?: string[]; dataDir?: string; tmpDataDir?: string }): Promise; } + +declare namespace NodeJS { + export interface ProcessEnv { + METRICS_DATABASE_URL?: string; + } +} diff --git a/apps/api-master/package.json b/apps/api-master/package.json index 32427f2..5305578 100644 --- a/apps/api-master/package.json +++ b/apps/api-master/package.json @@ -11,7 +11,11 @@ ], "scripts": { "start": "node --enable-source-maps .", - "dev": "node --watch --env-file .env --enable-source-maps ." + "dev": "node --watch --env-file .env --enable-source-maps .", + "db:generate": "drizzle-kit generate", + "db:migrate": "drizzle-kit migrate", + "db:update": "pnpm db:generate && pnpm db:migrate", + "db:studio": "drizzle-kit studio" }, "dependencies": { "@envelop/sentry": "^9.0.0", @@ -21,12 +25,15 @@ "@sentry/node": "^8.17.0", "cron": "^3.1.7", "debug": "^4.3.6", + "drizzle-orm": "^0.33.0", "ioredis": "^5.3.2", "ip-location-api": "^1.0.0", "ky": "^1.7.2", - "p-limit": "^6.1.0" + "p-limit": "^6.1.0", + "postgres": "^3.4.4" }, "devDependencies": { - "@types/debug": "^4.1.12" + "@types/debug": "^4.1.12", + "drizzle-kit": "^0.24.2" } } diff --git a/apps/api-master/src/db.ts b/apps/api-master/src/db.ts new file mode 100644 index 0000000..1526a40 --- /dev/null +++ b/apps/api-master/src/db.ts @@ -0,0 +1,27 @@ +import process from "node:process"; +import { decimal, index, integer, jsonb, pgTable, timestamp, uuid, varchar } from "drizzle-orm/pg-core"; +import { drizzle } from "drizzle-orm/postgres-js"; +import postgres from "postgres"; + +// Define the schema +export const onlineUsersIpData = pgTable("online_users_ip_data", { + uuid: uuid("uuid").primaryKey().defaultRandom(), + ip: varchar("ip", { length: 45 }).notNull(), + country: varchar("country", { length: 2 }).notNull(), + latitude: decimal("latitude", { precision: 10, scale: 8 }).notNull(), + longitude: decimal("longitude", { precision: 11, scale: 8 }).notNull(), + sessions: integer("sessions").notNull().default(0), + presences: jsonb("presences").notNull().default("[]").$type(), + timestamp: timestamp("timestamp", { withTimezone: true }).defaultNow(), +}, table => ({ + idxOnlineUsersUuid: index("idx_online_users_uuid").on(table.uuid), + idxOnlineUsersTimestamp: index("idx_online_users_timestamp").on(table.timestamp), +})); + +if (!process.env.METRICS_DATABASE_URL) { + throw new Error("METRICS_DATABASE_URL is not set"); +} + +export const sql = postgres(process.env.METRICS_DATABASE_URL); + +export const db = drizzle(sql); diff --git a/apps/api-master/src/functions/cleanupOldUserData.ts b/apps/api-master/src/functions/cleanupOldUserData.ts new file mode 100644 index 0000000..9f7a046 --- /dev/null +++ b/apps/api-master/src/functions/cleanupOldUserData.ts @@ -0,0 +1,8 @@ +import { lt, sql } from "drizzle-orm"; +import { db, onlineUsersIpData } from "../db.js"; + +export async function cleanupOldUserData(retentionDays: number) { + const interval = `'${retentionDays} days'`; + await db.delete(onlineUsersIpData) + .where(lt(onlineUsersIpData.timestamp, sql`now() - interval ${sql.raw(interval)}`)); +} diff --git a/apps/api-master/src/functions/insertIpData.ts b/apps/api-master/src/functions/insertIpData.ts new file mode 100644 index 0000000..a79ad7f --- /dev/null +++ b/apps/api-master/src/functions/insertIpData.ts @@ -0,0 +1,39 @@ +import type { InferInsertModel } from "drizzle-orm"; +import { db, onlineUsersIpData } from "../db.js"; +import { lookupIp } from "./lookupIp.js"; + +const batchSize = 10000; + +export async function insertIpData( + data: Map, +) { + const timestamp = new Date(); + const list = Array.from(data.entries()); + //* Split into batches of batchSize + for (let i = 0; i < list.length; i += batchSize) { + const batch = list.slice(i, i + batchSize); + const mapped = await Promise.all(batch.map(async ([ip, { presences, sessions }]) => { + const parsed = await lookupIp(ip); + if (parsed) { + return { + ip, + country: parsed.country, + latitude: parsed.latitude.toString(), + longitude: parsed.longitude.toString(), + presences, + sessions, + timestamp, + } satisfies InferInsertModel; + } + })); + + const toInsert = mapped.filter(Boolean) as InferInsertModel[]; + + if (toInsert.length > 0) { + await db.insert(onlineUsersIpData).values(toInsert); + } + } +} diff --git a/apps/api-master/src/functions/updateActivePresenceGauge.ts b/apps/api-master/src/functions/updateActivePresenceGauge.ts index 8dde664..60a41f6 100644 --- a/apps/api-master/src/functions/updateActivePresenceGauge.ts +++ b/apps/api-master/src/functions/updateActivePresenceGauge.ts @@ -1,6 +1,6 @@ import { redis } from "../index.js"; -import { activeIpsGauge, activePresenceGauge } from "../tracing.js"; -import { lookupIp } from "./lookupIp.js"; +import { activePresenceGauge } from "../tracing.js"; +import { insertIpData } from "./insertIpData.js"; //* Function to update the gauge with per-service counts export async function updateActivePresenceGauge() { @@ -38,7 +38,6 @@ export async function updateActivePresenceGauge() { // Clear previous data activePresenceGauge.clear(); - activeIpsGauge.clear(); // Set new data for (const [serviceVersion, count] of serviceCounts.entries()) { @@ -49,16 +48,5 @@ export async function updateActivePresenceGauge() { }); } - await Promise.all(Array.from(ips).map(async ([ip, { presences, sessions }]) => { - const parsed = await lookupIp(ip); - if (parsed) { - activeIpsGauge.set(ip, sessions, { - country: parsed.country, - ip, - latitude: parsed.latitude, - longitude: parsed.longitude, - presence_names: presences, - }); - } - })); + insertIpData(ips); } diff --git a/apps/api-master/src/index.ts b/apps/api-master/src/index.ts index 18ab48d..3541cfa 100644 --- a/apps/api-master/src/index.ts +++ b/apps/api-master/src/index.ts @@ -7,13 +7,12 @@ import { setSessionCounter } from "./functions/setSessionCounter.js"; import "./tracing.js"; import { updateActivePresenceGauge } from "./functions/updateActivePresenceGauge.js"; import { reloadIpLocationApi } from "./functions/lookupIp.js"; +import { cleanupOldUserData } from "./functions/cleanupOldUserData.js"; export const redis = createRedis(); export const mainLog = debug("api-master"); -reloadIpLocationApi(); - debug("Starting cron jobs"); void new CronJob( @@ -54,4 +53,20 @@ void new CronJob( }, undefined, true, + undefined, + undefined, + true, +); + +void new CronJob( + // Every day at 1am + "0 1 * * *", + () => { + cleanupOldUserData(14); // Keep 14 days of data + }, + undefined, + true, + undefined, + undefined, + true, ); diff --git a/apps/api-master/src/tracing.ts b/apps/api-master/src/tracing.ts index da5897d..0bb143c 100644 --- a/apps/api-master/src/tracing.ts +++ b/apps/api-master/src/tracing.ts @@ -21,11 +21,6 @@ export const activePresenceGauge = new ClearableGaugeMetric( "Per presence name+version, active number of users", ); -export const activeIpsGauge = new ClearableGaugeMetric( - "active_ips", - "Per ip, list of presences and the number of sessions", -); - updatePrometheusMetrics(prometheusExporter); prometheusExporter.startServer(); diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index d1e8fd3..c36d1dc 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -79,6 +79,9 @@ importers: debug: specifier: ^4.3.6 version: 4.3.7 + drizzle-orm: + specifier: ^0.33.0 + version: 0.33.0(@opentelemetry/api@1.9.0)(@types/pg@8.6.1)(postgres@3.4.4) ioredis: specifier: ^5.3.2 version: 5.4.1 @@ -91,10 +94,16 @@ importers: p-limit: specifier: ^6.1.0 version: 6.1.0 + postgres: + specifier: ^3.4.4 + version: 3.4.4 devDependencies: '@types/debug': specifier: ^4.1.12 version: 4.1.12 + drizzle-kit: + specifier: ^0.24.2 + version: 0.24.2 apps/api-worker: dependencies: @@ -1057,6 +1066,9 @@ packages: '@dprint/toml@0.6.2': resolution: {integrity: sha512-Mk5unEANsL/L+WHYU3NpDXt1ARU5bNU5k5OZELxaJodDycKG6RoRnSlZXpW6+7UN2PSnETAFVUdKrh937ZwtHA==} + '@drizzle-team/brocli@0.10.1': + resolution: {integrity: sha512-AHy0vjc+n/4w/8Mif+w86qpppHuF3AyXbcWW+R/W7GNA3F5/p2nuhlkCJaTXSLZheB4l1rtHzOfr9A7NwoR/Zg==} + '@envelop/core@5.0.1': resolution: {integrity: sha512-wxA8EyE1fPnlbP0nC/SFI7uU8wSNf4YjxZhAPu0P63QbgIvqHtHsH4L3/u+rsTruzhk3OvNRgQyLsMfaR9uzAQ==} engines: {node: '>=18.0.0'} @@ -1081,6 +1093,12 @@ packages: resolution: {integrity: sha512-G6QUWIcC+KvSwXNsJyDTHvqUdNoAVJPPgkc3+Uk4WBKqZvoXhlvazOgm9aL0HwihJLQf0l+tOE2UFzXBqCqgDw==} engines: {node: '>=16'} + '@esbuild-kit/core-utils@3.3.2': + resolution: {integrity: sha512-sPRAnw9CdSsRmEtnsl2WXWdyquogVpB3yZ3dgwJfe8zrOzTsV7cJvmwrKVa+0ma5BoiGJ+BoqkMvawbayKUsqQ==} + + '@esbuild-kit/esm-loader@2.6.5': + resolution: {integrity: sha512-FxEMIkJKnodyA1OaCUoEvbYRkoZlLZ4d/eXFu9Fh8CbBBgP5EmZxrfTRyN0qpXZ4vOvqnE5YdRdcrmUUXuU+dA==} + '@esbuild/aix-ppc64@0.19.12': resolution: {integrity: sha512-bmoCYyWdEL3wDQIVbcyzRyeKLgk2WtWLTWz1ZIAZF/EGbNOwSA6ew3PftJ1PqMiOOGu0OyFMzG53L0zqIpPeNA==} engines: {node: '>=12'} @@ -1105,6 +1123,12 @@ packages: cpu: [ppc64] os: [aix] + '@esbuild/android-arm64@0.18.20': + resolution: {integrity: sha512-Nz4rJcchGDtENV0eMKUNa6L12zz2zBDXuhj/Vjh18zGqB44Bi7MBMSXjgunJgjRhCmKOjnPuZp4Mb6OKqtMHLQ==} + engines: {node: '>=12'} + cpu: [arm64] + os: [android] + '@esbuild/android-arm64@0.19.12': resolution: {integrity: sha512-P0UVNGIienjZv3f5zq0DP3Nt2IE/3plFzuaS96vihvD0Hd6H/q4WXUGpCxD/E8YrSXfNyRPbpTq+T8ZQioSuPA==} engines: {node: '>=12'} @@ -1129,6 +1153,12 @@ packages: cpu: [arm64] os: [android] + '@esbuild/android-arm@0.18.20': + resolution: {integrity: sha512-fyi7TDI/ijKKNZTUJAQqiG5T7YjJXgnzkURqmGj13C6dCqckZBLdl4h7bkhHt/t0WP+zO9/zwroDvANaOqO5Sw==} + engines: {node: '>=12'} + cpu: [arm] + os: [android] + '@esbuild/android-arm@0.19.12': resolution: {integrity: sha512-qg/Lj1mu3CdQlDEEiWrlC4eaPZ1KztwGJ9B6J+/6G+/4ewxJg7gqj8eVYWvao1bXrqGiW2rsBZFSX3q2lcW05w==} engines: {node: '>=12'} @@ -1153,6 +1183,12 @@ packages: cpu: [arm] os: [android] + '@esbuild/android-x64@0.18.20': + resolution: {integrity: sha512-8GDdlePJA8D6zlZYJV/jnrRAi6rOiNaCC/JclcXpB+KIuvfBN4owLtgzY2bsxnx666XjJx2kDPUmnTtR8qKQUg==} + engines: {node: '>=12'} + cpu: [x64] + os: [android] + '@esbuild/android-x64@0.19.12': resolution: {integrity: sha512-3k7ZoUW6Q6YqhdhIaq/WZ7HwBpnFBlW905Fa4s4qWJyiNOgT1dOqDiVAQFwBH7gBRZr17gLrlFCRzF6jFh7Kew==} engines: {node: '>=12'} @@ -1177,6 +1213,12 @@ packages: cpu: [x64] os: [android] + '@esbuild/darwin-arm64@0.18.20': + resolution: {integrity: sha512-bxRHW5kHU38zS2lPTPOyuyTm+S+eobPUnTNkdJEfAddYgEcll4xkT8DB9d2008DtTbl7uJag2HuE5NZAZgnNEA==} + engines: {node: '>=12'} + cpu: [arm64] + os: [darwin] + '@esbuild/darwin-arm64@0.19.12': resolution: {integrity: sha512-B6IeSgZgtEzGC42jsI+YYu9Z3HKRxp8ZT3cqhvliEHovq8HSX2YX8lNocDn79gCKJXOSaEot9MVYky7AKjCs8g==} engines: {node: '>=12'} @@ -1201,6 +1243,12 @@ packages: cpu: [arm64] os: [darwin] + '@esbuild/darwin-x64@0.18.20': + resolution: {integrity: sha512-pc5gxlMDxzm513qPGbCbDukOdsGtKhfxD1zJKXjCCcU7ju50O7MeAZ8c4krSJcOIJGFR+qx21yMMVYwiQvyTyQ==} + engines: {node: '>=12'} + cpu: [x64] + os: [darwin] + '@esbuild/darwin-x64@0.19.12': resolution: {integrity: sha512-hKoVkKzFiToTgn+41qGhsUJXFlIjxI/jSYeZf3ugemDYZldIXIxhvwN6erJGlX4t5h417iFuheZ7l+YVn05N3A==} engines: {node: '>=12'} @@ -1225,6 +1273,12 @@ packages: cpu: [x64] os: [darwin] + '@esbuild/freebsd-arm64@0.18.20': + resolution: {integrity: sha512-yqDQHy4QHevpMAaxhhIwYPMv1NECwOvIpGCZkECn8w2WFHXjEwrBn3CeNIYsibZ/iZEUemj++M26W3cNR5h+Tw==} + engines: {node: '>=12'} + cpu: [arm64] + os: [freebsd] + '@esbuild/freebsd-arm64@0.19.12': resolution: {integrity: sha512-4aRvFIXmwAcDBw9AueDQ2YnGmz5L6obe5kmPT8Vd+/+x/JMVKCgdcRwH6APrbpNXsPz+K653Qg8HB/oXvXVukA==} engines: {node: '>=12'} @@ -1249,6 +1303,12 @@ packages: cpu: [arm64] os: [freebsd] + '@esbuild/freebsd-x64@0.18.20': + resolution: {integrity: sha512-tgWRPPuQsd3RmBZwarGVHZQvtzfEBOreNuxEMKFcd5DaDn2PbBxfwLcj4+aenoh7ctXcbXmOQIn8HI6mCSw5MQ==} + engines: {node: '>=12'} + cpu: [x64] + os: [freebsd] + '@esbuild/freebsd-x64@0.19.12': resolution: {integrity: sha512-EYoXZ4d8xtBoVN7CEwWY2IN4ho76xjYXqSXMNccFSx2lgqOG/1TBPW0yPx1bJZk94qu3tX0fycJeeQsKovA8gg==} engines: {node: '>=12'} @@ -1273,6 +1333,12 @@ packages: cpu: [x64] os: [freebsd] + '@esbuild/linux-arm64@0.18.20': + resolution: {integrity: sha512-2YbscF+UL7SQAVIpnWvYwM+3LskyDmPhe31pE7/aoTMFKKzIc9lLbyGUpmmb8a8AixOL61sQ/mFh3jEjHYFvdA==} + engines: {node: '>=12'} + cpu: [arm64] + os: [linux] + '@esbuild/linux-arm64@0.19.12': resolution: {integrity: sha512-EoTjyYyLuVPfdPLsGVVVC8a0p1BFFvtpQDB/YLEhaXyf/5bczaGeN15QkR+O4S5LeJ92Tqotve7i1jn35qwvdA==} engines: {node: '>=12'} @@ -1297,6 +1363,12 @@ packages: cpu: [arm64] os: [linux] + '@esbuild/linux-arm@0.18.20': + resolution: {integrity: sha512-/5bHkMWnq1EgKr1V+Ybz3s1hWXok7mDFUMQ4cG10AfW3wL02PSZi5kFpYKrptDsgb2WAJIvRcDm+qIvXf/apvg==} + engines: {node: '>=12'} + cpu: [arm] + os: [linux] + '@esbuild/linux-arm@0.19.12': resolution: {integrity: sha512-J5jPms//KhSNv+LO1S1TX1UWp1ucM6N6XuL6ITdKWElCu8wXP72l9MM0zDTzzeikVyqFE6U8YAV9/tFyj0ti+w==} engines: {node: '>=12'} @@ -1321,6 +1393,12 @@ packages: cpu: [arm] os: [linux] + '@esbuild/linux-ia32@0.18.20': + resolution: {integrity: sha512-P4etWwq6IsReT0E1KHU40bOnzMHoH73aXp96Fs8TIT6z9Hu8G6+0SHSw9i2isWrD2nbx2qo5yUqACgdfVGx7TA==} + engines: {node: '>=12'} + cpu: [ia32] + os: [linux] + '@esbuild/linux-ia32@0.19.12': resolution: {integrity: sha512-Thsa42rrP1+UIGaWz47uydHSBOgTUnwBwNq59khgIwktK6x60Hivfbux9iNR0eHCHzOLjLMLfUMLCypBkZXMHA==} engines: {node: '>=12'} @@ -1345,6 +1423,12 @@ packages: cpu: [ia32] os: [linux] + '@esbuild/linux-loong64@0.18.20': + resolution: {integrity: sha512-nXW8nqBTrOpDLPgPY9uV+/1DjxoQ7DoB2N8eocyq8I9XuqJ7BiAMDMf9n1xZM9TgW0J8zrquIb/A7s3BJv7rjg==} + engines: {node: '>=12'} + cpu: [loong64] + os: [linux] + '@esbuild/linux-loong64@0.19.12': resolution: {integrity: sha512-LiXdXA0s3IqRRjm6rV6XaWATScKAXjI4R4LoDlvO7+yQqFdlr1Bax62sRwkVvRIrwXxvtYEHHI4dm50jAXkuAA==} engines: {node: '>=12'} @@ -1369,6 +1453,12 @@ packages: cpu: [loong64] os: [linux] + '@esbuild/linux-mips64el@0.18.20': + resolution: {integrity: sha512-d5NeaXZcHp8PzYy5VnXV3VSd2D328Zb+9dEq5HE6bw6+N86JVPExrA6O68OPwobntbNJ0pzCpUFZTo3w0GyetQ==} + engines: {node: '>=12'} + cpu: [mips64el] + os: [linux] + '@esbuild/linux-mips64el@0.19.12': resolution: {integrity: sha512-fEnAuj5VGTanfJ07ff0gOA6IPsvrVHLVb6Lyd1g2/ed67oU1eFzL0r9WL7ZzscD+/N6i3dWumGE1Un4f7Amf+w==} engines: {node: '>=12'} @@ -1393,6 +1483,12 @@ packages: cpu: [mips64el] os: [linux] + '@esbuild/linux-ppc64@0.18.20': + resolution: {integrity: sha512-WHPyeScRNcmANnLQkq6AfyXRFr5D6N2sKgkFo2FqguP44Nw2eyDlbTdZwd9GYk98DZG9QItIiTlFLHJHjxP3FA==} + engines: {node: '>=12'} + cpu: [ppc64] + os: [linux] + '@esbuild/linux-ppc64@0.19.12': resolution: {integrity: sha512-nYJA2/QPimDQOh1rKWedNOe3Gfc8PabU7HT3iXWtNUbRzXS9+vgB0Fjaqr//XNbd82mCxHzik2qotuI89cfixg==} engines: {node: '>=12'} @@ -1417,6 +1513,12 @@ packages: cpu: [ppc64] os: [linux] + '@esbuild/linux-riscv64@0.18.20': + resolution: {integrity: sha512-WSxo6h5ecI5XH34KC7w5veNnKkju3zBRLEQNY7mv5mtBmrP/MjNBCAlsM2u5hDBlS3NGcTQpoBvRzqBcRtpq1A==} + engines: {node: '>=12'} + cpu: [riscv64] + os: [linux] + '@esbuild/linux-riscv64@0.19.12': resolution: {integrity: sha512-2MueBrlPQCw5dVJJpQdUYgeqIzDQgw3QtiAHUC4RBz9FXPrskyyU3VI1hw7C0BSKB9OduwSJ79FTCqtGMWqJHg==} engines: {node: '>=12'} @@ -1441,6 +1543,12 @@ packages: cpu: [riscv64] os: [linux] + '@esbuild/linux-s390x@0.18.20': + resolution: {integrity: sha512-+8231GMs3mAEth6Ja1iK0a1sQ3ohfcpzpRLH8uuc5/KVDFneH6jtAJLFGafpzpMRO6DzJ6AvXKze9LfFMrIHVQ==} + engines: {node: '>=12'} + cpu: [s390x] + os: [linux] + '@esbuild/linux-s390x@0.19.12': resolution: {integrity: sha512-+Pil1Nv3Umes4m3AZKqA2anfhJiVmNCYkPchwFJNEJN5QxmTs1uzyy4TvmDrCRNT2ApwSari7ZIgrPeUx4UZDg==} engines: {node: '>=12'} @@ -1465,6 +1573,12 @@ packages: cpu: [s390x] os: [linux] + '@esbuild/linux-x64@0.18.20': + resolution: {integrity: sha512-UYqiqemphJcNsFEskc73jQ7B9jgwjWrSayxawS6UVFZGWrAAtkzjxSqnoclCXxWtfwLdzU+vTpcNYhpn43uP1w==} + engines: {node: '>=12'} + cpu: [x64] + os: [linux] + '@esbuild/linux-x64@0.19.12': resolution: {integrity: sha512-B71g1QpxfwBvNrfyJdVDexenDIt1CiDN1TIXLbhOw0KhJzE78KIFGX6OJ9MrtC0oOqMWf+0xop4qEU8JrJTwCg==} engines: {node: '>=12'} @@ -1489,6 +1603,12 @@ packages: cpu: [x64] os: [linux] + '@esbuild/netbsd-x64@0.18.20': + resolution: {integrity: sha512-iO1c++VP6xUBUmltHZoMtCUdPlnPGdBom6IrO4gyKPFFVBKioIImVooR5I83nTew5UOYrk3gIJhbZh8X44y06A==} + engines: {node: '>=12'} + cpu: [x64] + os: [netbsd] + '@esbuild/netbsd-x64@0.19.12': resolution: {integrity: sha512-3ltjQ7n1owJgFbuC61Oj++XhtzmymoCihNFgT84UAmJnxJfm4sYCiSLTXZtE00VWYpPMYc+ZQmB6xbSdVh0JWA==} engines: {node: '>=12'} @@ -1519,6 +1639,12 @@ packages: cpu: [arm64] os: [openbsd] + '@esbuild/openbsd-x64@0.18.20': + resolution: {integrity: sha512-e5e4YSsuQfX4cxcygw/UCPIEP6wbIL+se3sxPdCiMbFLBWu0eiZOJ7WoD+ptCLrmjZBK1Wk7I6D/I3NglUGOxg==} + engines: {node: '>=12'} + cpu: [x64] + os: [openbsd] + '@esbuild/openbsd-x64@0.19.12': resolution: {integrity: sha512-RbrfTB9SWsr0kWmb9srfF+L933uMDdu9BIzdA7os2t0TXhCRjrQyCeOt6wVxr79CKD4c+p+YhCj31HBkYcXebw==} engines: {node: '>=12'} @@ -1543,6 +1669,12 @@ packages: cpu: [x64] os: [openbsd] + '@esbuild/sunos-x64@0.18.20': + resolution: {integrity: sha512-kDbFRFp0YpTQVVrqUd5FTYmWo45zGaXe0X8E1G/LKFC0v8x0vWrhOWSLITcCn63lmZIxfOMXtCfti/RxN/0wnQ==} + engines: {node: '>=12'} + cpu: [x64] + os: [sunos] + '@esbuild/sunos-x64@0.19.12': resolution: {integrity: sha512-HKjJwRrW8uWtCQnQOz9qcU3mUZhTUQvi56Q8DPTLLB+DawoiQdjsYq+j+D3s9I8VFtDr+F9CjgXKKC4ss89IeA==} engines: {node: '>=12'} @@ -1567,6 +1699,12 @@ packages: cpu: [x64] os: [sunos] + '@esbuild/win32-arm64@0.18.20': + resolution: {integrity: sha512-ddYFR6ItYgoaq4v4JmQQaAI5s7npztfV4Ag6NrhiaW0RrnOXqBkgwZLofVTlq1daVTQNhtI5oieTvkRPfZrePg==} + engines: {node: '>=12'} + cpu: [arm64] + os: [win32] + '@esbuild/win32-arm64@0.19.12': resolution: {integrity: sha512-URgtR1dJnmGvX864pn1B2YUYNzjmXkuJOIqG2HdU62MVS4EHpU2946OZoTMnRUHklGtJdJZ33QfzdjGACXhn1A==} engines: {node: '>=12'} @@ -1591,6 +1729,12 @@ packages: cpu: [arm64] os: [win32] + '@esbuild/win32-ia32@0.18.20': + resolution: {integrity: sha512-Wv7QBi3ID/rROT08SABTS7eV4hX26sVduqDOTe1MvGMjNd3EjOz4b7zeexIR62GTIEKrfJXKL9LFxTYgkyeu7g==} + engines: {node: '>=12'} + cpu: [ia32] + os: [win32] + '@esbuild/win32-ia32@0.19.12': resolution: {integrity: sha512-+ZOE6pUkMOJfmxmBZElNOx72NKpIa/HFOMGzu8fqzQJ5kgf6aTGrcJaFsNiVMH4JKpMipyK+7k0n2UXN7a8YKQ==} engines: {node: '>=12'} @@ -1615,6 +1759,12 @@ packages: cpu: [ia32] os: [win32] + '@esbuild/win32-x64@0.18.20': + resolution: {integrity: sha512-kTdfRcSiDfQca/y9QIkng02avJ+NCaQvrMejlsB3RRv5sE9rRoeBPISaZpKxHELzRxZyLvNts1P27W3wV+8geQ==} + engines: {node: '>=12'} + cpu: [x64] + os: [win32] + '@esbuild/win32-x64@0.19.12': resolution: {integrity: sha512-T1QyPSDCyMXaO3pzBkF96E8xMkiRYbUEZADd29SyPGabqxMViNoii+NcK7eWJAEoU6RZyEm5lVSIjTmcdoB9HA==} engines: {node: '>=12'} @@ -2973,6 +3123,7 @@ packages: '@rollup/rollup-linux-arm64-gnu@4.21.2': resolution: {integrity: sha512-69CF19Kp3TdMopyteO/LJbWufOzqqXzkrv4L2sP8kfMaAQ6iwky7NoXTp7bD6/irKgknDKM0P9E/1l5XxVQAhw==} + cpu: [arm64] os: [linux] '@rollup/rollup-linux-arm64-musl@4.18.1': @@ -4884,6 +5035,99 @@ packages: resolution: {integrity: sha512-ZmdL2rui+eB2YwhsWzjInR8LldtZHGDoQ1ugH85ppHKwpUHL7j7rN0Ti9NCnGiQbhaZ11FpR+7ao1dNsmduNUg==} engines: {node: '>=12'} + drizzle-kit@0.24.2: + resolution: {integrity: sha512-nXOaTSFiuIaTMhS8WJC2d4EBeIcN9OSt2A2cyFbQYBAZbi7lRsVGJNqDpEwPqYfJz38yxbY/UtbvBBahBfnExQ==} + hasBin: true + + drizzle-orm@0.33.0: + resolution: {integrity: sha512-SHy72R2Rdkz0LEq0PSG/IdvnT3nGiWuRk+2tXZQ90GVq/XQhpCzu/EFT3V2rox+w8MlkBQxifF8pCStNYnERfA==} + peerDependencies: + '@aws-sdk/client-rds-data': '>=3' + '@cloudflare/workers-types': '>=3' + '@electric-sql/pglite': '>=0.1.1' + '@libsql/client': '*' + '@neondatabase/serverless': '>=0.1' + '@op-engineering/op-sqlite': '>=2' + '@opentelemetry/api': ^1.4.1 + '@planetscale/database': '>=1' + '@prisma/client': '*' + '@tidbcloud/serverless': '*' + '@types/better-sqlite3': '*' + '@types/pg': '*' + '@types/react': '>=18' + '@types/sql.js': '*' + '@vercel/postgres': '>=0.8.0' + '@xata.io/client': '*' + better-sqlite3: '>=7' + bun-types: '*' + expo-sqlite: '>=13.2.0' + knex: '*' + kysely: '*' + mysql2: '>=2' + pg: '>=8' + postgres: '>=3' + prisma: '*' + react: '>=18' + sql.js: '>=1' + sqlite3: '>=5' + peerDependenciesMeta: + '@aws-sdk/client-rds-data': + optional: true + '@cloudflare/workers-types': + optional: true + '@electric-sql/pglite': + optional: true + '@libsql/client': + optional: true + '@neondatabase/serverless': + optional: true + '@op-engineering/op-sqlite': + optional: true + '@opentelemetry/api': + optional: true + '@planetscale/database': + optional: true + '@prisma/client': + optional: true + '@tidbcloud/serverless': + optional: true + '@types/better-sqlite3': + optional: true + '@types/pg': + optional: true + '@types/react': + optional: true + '@types/sql.js': + optional: true + '@vercel/postgres': + optional: true + '@xata.io/client': + optional: true + better-sqlite3: + optional: true + bun-types: + optional: true + expo-sqlite: + optional: true + knex: + optional: true + kysely: + optional: true + mysql2: + optional: true + pg: + optional: true + postgres: + optional: true + prisma: + optional: true + react: + optional: true + sql.js: + optional: true + sqlite3: + optional: true + dset@3.1.3: resolution: {integrity: sha512-20TuZZHCEZ2O71q9/+8BwKwZ0QtD9D8ObhrihJPr+vLLYlSuAU3/zL4cSlgbfeoGHTjCSJBa7NGcrF9/Bx/WJQ==} engines: {node: '>=4'} @@ -4946,6 +5190,16 @@ packages: es-module-lexer@1.5.4: resolution: {integrity: sha512-MVNK56NiMrOwitFB7cqDwq0CQutbw+0BvLshJSse0MUNU+y1FC3bUS/AQg7oUng+/wKrrki7JfmwtVHkVfPLlw==} + esbuild-register@3.6.0: + resolution: {integrity: sha512-H2/S7Pm8a9CL1uhp9OvjwrBh5Pvx0H8qVOxNu8Wed9Y7qv56MPtq+GGM8RJpq6glYJn9Wspr8uw7l55uyinNeg==} + peerDependencies: + esbuild: '>=0.12 <1' + + esbuild@0.18.20: + resolution: {integrity: sha512-ceqxoedUrcayh7Y7ZX6NdbbDzGROiyVBgC4PriJThBKSVPWnnFHZAkfI1lJT8QFkOwH4qOS2SJkS4wvpGl8BpA==} + engines: {node: '>=12'} + hasBin: true + esbuild@0.19.12: resolution: {integrity: sha512-aARqgq8roFBj054KvQr5f1sFu0D65G+miZRCuJyJ0G13Zwx7vRar5Zhn2tkQNzIXcBrNVsv/8stehpj+GAjgbg==} engines: {node: '>=12'} @@ -7360,6 +7614,10 @@ packages: resolution: {integrity: sha512-9ZhXKM/rw350N1ovuWHbGxnGh/SNJ4cnxHiM0rxE4VN41wsg8P8zWn9hv/buK00RP4WvlOyr/RBDiptyxVbkZQ==} engines: {node: '>=0.10.0'} + postgres@3.4.4: + resolution: {integrity: sha512-IbyN+9KslkqcXa8AO9fxpk97PA4pzewvpi2B3Dwy9u4zpV32QicaEdgmF3eSQUzdRk7ttDHQejNgAEr4XoeH4A==} + engines: {node: '>=12'} + preact@10.23.2: resolution: {integrity: sha512-kKYfePf9rzKnxOAKDpsWhg/ysrHPqT+yQ7UW4JjdnqjFIeNUnNcEJvhuA8fDenxAGWzUqtd51DfVg7xp/8T9NA==} @@ -9935,6 +10193,8 @@ snapshots: '@dprint/toml@0.6.2': {} + '@drizzle-team/brocli@0.10.1': {} + '@envelop/core@5.0.1': dependencies: '@envelop/types': 5.0.0 @@ -9962,6 +10222,16 @@ snapshots: esquery: 1.6.0 jsdoc-type-pratt-parser: 4.1.0 + '@esbuild-kit/core-utils@3.3.2': + dependencies: + esbuild: 0.18.20 + source-map-support: 0.5.21 + + '@esbuild-kit/esm-loader@2.6.5': + dependencies: + '@esbuild-kit/core-utils': 3.3.2 + get-tsconfig: 4.8.0 + '@esbuild/aix-ppc64@0.19.12': optional: true @@ -9974,6 +10244,9 @@ snapshots: '@esbuild/aix-ppc64@0.23.1': optional: true + '@esbuild/android-arm64@0.18.20': + optional: true + '@esbuild/android-arm64@0.19.12': optional: true @@ -9986,6 +10259,9 @@ snapshots: '@esbuild/android-arm64@0.23.1': optional: true + '@esbuild/android-arm@0.18.20': + optional: true + '@esbuild/android-arm@0.19.12': optional: true @@ -9998,6 +10274,9 @@ snapshots: '@esbuild/android-arm@0.23.1': optional: true + '@esbuild/android-x64@0.18.20': + optional: true + '@esbuild/android-x64@0.19.12': optional: true @@ -10010,6 +10289,9 @@ snapshots: '@esbuild/android-x64@0.23.1': optional: true + '@esbuild/darwin-arm64@0.18.20': + optional: true + '@esbuild/darwin-arm64@0.19.12': optional: true @@ -10022,6 +10304,9 @@ snapshots: '@esbuild/darwin-arm64@0.23.1': optional: true + '@esbuild/darwin-x64@0.18.20': + optional: true + '@esbuild/darwin-x64@0.19.12': optional: true @@ -10034,6 +10319,9 @@ snapshots: '@esbuild/darwin-x64@0.23.1': optional: true + '@esbuild/freebsd-arm64@0.18.20': + optional: true + '@esbuild/freebsd-arm64@0.19.12': optional: true @@ -10046,6 +10334,9 @@ snapshots: '@esbuild/freebsd-arm64@0.23.1': optional: true + '@esbuild/freebsd-x64@0.18.20': + optional: true + '@esbuild/freebsd-x64@0.19.12': optional: true @@ -10058,6 +10349,9 @@ snapshots: '@esbuild/freebsd-x64@0.23.1': optional: true + '@esbuild/linux-arm64@0.18.20': + optional: true + '@esbuild/linux-arm64@0.19.12': optional: true @@ -10070,6 +10364,9 @@ snapshots: '@esbuild/linux-arm64@0.23.1': optional: true + '@esbuild/linux-arm@0.18.20': + optional: true + '@esbuild/linux-arm@0.19.12': optional: true @@ -10082,6 +10379,9 @@ snapshots: '@esbuild/linux-arm@0.23.1': optional: true + '@esbuild/linux-ia32@0.18.20': + optional: true + '@esbuild/linux-ia32@0.19.12': optional: true @@ -10094,6 +10394,9 @@ snapshots: '@esbuild/linux-ia32@0.23.1': optional: true + '@esbuild/linux-loong64@0.18.20': + optional: true + '@esbuild/linux-loong64@0.19.12': optional: true @@ -10106,6 +10409,9 @@ snapshots: '@esbuild/linux-loong64@0.23.1': optional: true + '@esbuild/linux-mips64el@0.18.20': + optional: true + '@esbuild/linux-mips64el@0.19.12': optional: true @@ -10118,6 +10424,9 @@ snapshots: '@esbuild/linux-mips64el@0.23.1': optional: true + '@esbuild/linux-ppc64@0.18.20': + optional: true + '@esbuild/linux-ppc64@0.19.12': optional: true @@ -10130,6 +10439,9 @@ snapshots: '@esbuild/linux-ppc64@0.23.1': optional: true + '@esbuild/linux-riscv64@0.18.20': + optional: true + '@esbuild/linux-riscv64@0.19.12': optional: true @@ -10142,6 +10454,9 @@ snapshots: '@esbuild/linux-riscv64@0.23.1': optional: true + '@esbuild/linux-s390x@0.18.20': + optional: true + '@esbuild/linux-s390x@0.19.12': optional: true @@ -10154,6 +10469,9 @@ snapshots: '@esbuild/linux-s390x@0.23.1': optional: true + '@esbuild/linux-x64@0.18.20': + optional: true + '@esbuild/linux-x64@0.19.12': optional: true @@ -10166,6 +10484,9 @@ snapshots: '@esbuild/linux-x64@0.23.1': optional: true + '@esbuild/netbsd-x64@0.18.20': + optional: true + '@esbuild/netbsd-x64@0.19.12': optional: true @@ -10181,6 +10502,9 @@ snapshots: '@esbuild/openbsd-arm64@0.23.1': optional: true + '@esbuild/openbsd-x64@0.18.20': + optional: true + '@esbuild/openbsd-x64@0.19.12': optional: true @@ -10193,6 +10517,9 @@ snapshots: '@esbuild/openbsd-x64@0.23.1': optional: true + '@esbuild/sunos-x64@0.18.20': + optional: true + '@esbuild/sunos-x64@0.19.12': optional: true @@ -10205,6 +10532,9 @@ snapshots: '@esbuild/sunos-x64@0.23.1': optional: true + '@esbuild/win32-arm64@0.18.20': + optional: true + '@esbuild/win32-arm64@0.19.12': optional: true @@ -10217,6 +10547,9 @@ snapshots: '@esbuild/win32-arm64@0.23.1': optional: true + '@esbuild/win32-ia32@0.18.20': + optional: true + '@esbuild/win32-ia32@0.19.12': optional: true @@ -10229,6 +10562,9 @@ snapshots: '@esbuild/win32-ia32@0.23.1': optional: true + '@esbuild/win32-x64@0.18.20': + optional: true + '@esbuild/win32-x64@0.19.12': optional: true @@ -13618,7 +13954,7 @@ snapshots: pathe: 1.1.2 sirv: 2.0.4 tinyrainbow: 1.2.0 - vitest: 2.0.5(@types/node@22.5.4)(@vitest/ui@2.0.5)(happy-dom@15.0.0)(sass@1.78.0)(terser@5.32.0) + vitest: 2.0.5(@types/node@20.16.5)(@vitest/ui@2.0.5)(happy-dom@15.7.4)(sass@1.78.0)(terser@5.32.0) '@vitest/utils@2.0.5': dependencies: @@ -15136,6 +15472,21 @@ snapshots: dotenv@16.4.5: {} + drizzle-kit@0.24.2: + dependencies: + '@drizzle-team/brocli': 0.10.1 + '@esbuild-kit/esm-loader': 2.6.5 + esbuild: 0.19.12 + esbuild-register: 3.6.0(esbuild@0.19.12) + transitivePeerDependencies: + - supports-color + + drizzle-orm@0.33.0(@opentelemetry/api@1.9.0)(@types/pg@8.6.1)(postgres@3.4.4): + optionalDependencies: + '@opentelemetry/api': 1.9.0 + '@types/pg': 8.6.1 + postgres: 3.4.4 + dset@3.1.3: {} duplexer@0.1.2: {} @@ -15189,6 +15540,38 @@ snapshots: es-module-lexer@1.5.4: {} + esbuild-register@3.6.0(esbuild@0.19.12): + dependencies: + debug: 4.3.7 + esbuild: 0.19.12 + transitivePeerDependencies: + - supports-color + + esbuild@0.18.20: + optionalDependencies: + '@esbuild/android-arm': 0.18.20 + '@esbuild/android-arm64': 0.18.20 + '@esbuild/android-x64': 0.18.20 + '@esbuild/darwin-arm64': 0.18.20 + '@esbuild/darwin-x64': 0.18.20 + '@esbuild/freebsd-arm64': 0.18.20 + '@esbuild/freebsd-x64': 0.18.20 + '@esbuild/linux-arm': 0.18.20 + '@esbuild/linux-arm64': 0.18.20 + '@esbuild/linux-ia32': 0.18.20 + '@esbuild/linux-loong64': 0.18.20 + '@esbuild/linux-mips64el': 0.18.20 + '@esbuild/linux-ppc64': 0.18.20 + '@esbuild/linux-riscv64': 0.18.20 + '@esbuild/linux-s390x': 0.18.20 + '@esbuild/linux-x64': 0.18.20 + '@esbuild/netbsd-x64': 0.18.20 + '@esbuild/openbsd-x64': 0.18.20 + '@esbuild/sunos-x64': 0.18.20 + '@esbuild/win32-arm64': 0.18.20 + '@esbuild/win32-ia32': 0.18.20 + '@esbuild/win32-x64': 0.18.20 + esbuild@0.19.12: optionalDependencies: '@esbuild/aix-ppc64': 0.19.12 @@ -18466,6 +18849,8 @@ snapshots: dependencies: xtend: 4.0.2 + postgres@3.4.4: {} + preact@10.23.2: {} prebuild-install@7.1.2: diff --git a/tsconfig.base.json b/tsconfig.base.json index 4860f56..18ac1ac 100644 --- a/tsconfig.base.json +++ b/tsconfig.base.json @@ -29,5 +29,5 @@ "isolatedModules": true, "skipLibCheck": true }, - "exclude": ["**/*/node_modules", "**/*/dist"] + "exclude": ["**/*/node_modules", "**/*/dist", "**/drizzle.config.ts"] }