From 02ee112de48118600689e84299d9cf33f08d6b97 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Th=C3=A9o=20LUDWIG?= Date: Sun, 11 Aug 2024 09:42:42 +0100 Subject: [PATCH] feat(api): create Lucid models and migrations for Wikipedia database dump + usage of PostgreSQL instead of MariaDB --- .gitignore | 10 +- TODO.md | 2 +- apps/api/package.json | 2 +- apps/api/src/app/exceptions/handler.ts | 8 +- .../api/src/app/middleware/auth_middleware.ts | 4 +- .../container_bindings_middleware.ts | 10 +- apps/api/src/app/models/page.ts | 30 + apps/api/src/app/models/user.ts | 4 +- apps/api/src/config/database.ts | 6 +- .../1723204419777_create_users_table.ts | 4 +- ...723204419779_create_access_tokens_table.ts | 4 +- .../1723313729067_create_pages_table.ts | 16 + ...23314216202_create_internal_links_table.ts | 29 + compose.dev.yaml | 25 +- compose.yaml | 25 +- data/.env.example | 3 - data/README.md | 31 +- data/compose.yaml | 39 -- data/execute-sql.sh | 8 + ...ase-wikipedia.js => generate-sql-files.js} | 78 ++- .../0000-internal-links.sh | 6 + data/sql-pages-inserts/0000-pages.sh | 6 + data/sql/0000-sql-init.sh | 3 + data/sql/0000-sql-init.sql | 2 + data/sql/0000-tables-create.sql | 28 - data/sql/0999-constraints.sql | 11 - data/sql/0999-sql-end.sh | 3 + data/sql/0999-sql-end.sql | 2 + package.json | 2 +- pnpm-lock.yaml | 530 ++++++------------ pnpm-workspace.yaml | 4 +- 31 files changed, 400 insertions(+), 535 deletions(-) create mode 100644 apps/api/src/app/models/page.ts create mode 100644 apps/api/src/database/migrations/1723313729067_create_pages_table.ts create mode 100644 apps/api/src/database/migrations/1723314216202_create_internal_links_table.ts delete mode 100644 data/.env.example delete mode 100644 data/compose.yaml create mode 100755 data/execute-sql.sh rename data/{database-wikipedia.js => generate-sql-files.js} (86%) create mode 100755 data/sql-internal-links-inserts/0000-internal-links.sh create mode 100755 data/sql-pages-inserts/0000-pages.sh create mode 100755 data/sql/0000-sql-init.sh create mode 100644 data/sql/0000-sql-init.sql delete mode 100644 data/sql/0000-tables-create.sql delete mode 100644 data/sql/0999-constraints.sql create mode 100755 data/sql/0999-sql-end.sh create mode 100644 data/sql/0999-sql-end.sql diff --git a/.gitignore b/.gitignore index 92e7d3e..4b5992e 100644 --- a/.gitignore +++ b/.gitignore @@ -21,11 +21,13 @@ build/ *.pem .turbo tmp/ -cache.json + +# data data/dump -data/sql/* -!data/sql/0000-tables-create.sql -!data/sql/0999-constraints.sql +data/sql-pages-inserts/* +!data/sql-pages-inserts/0000-pages.sh +data/sql-internal-links-inserts/* +!data/sql-internal-links-inserts/0000-internal-links.sh # debug npm-debug.log* diff --git a/TODO.md b/TODO.md index 8a7902b..23aff22 100644 --- a/TODO.md +++ b/TODO.md @@ -30,7 +30,7 @@ - [ ] Handle redirects - [ ] Implement REST API (`api`) with JSON responses ([AdonisJS](https://adonisjs.com/)) to get shortest paths between 2 pages - [x] Init AdonisJS project - - [ ] Create Lucid models and migrations for Wikipedia Database Dump: `pages` and `internal_links` tables + - [x] Create Lucid models and migrations for Wikipedia Database Dump: `pages` and `internal_links` tables - [ ] Implement `GET /wikipedia/pages?title=Node.js` to search a page by title (not necessarily with the title sanitized, search with input by user to check if page exists) - [ ] Implement `GET /wikipedia/pages/internal-links/paths?from=Node.js&to=Linux` to get all the possible paths between 2 pages with titles sanitized - [ ] Implement Wikipedia Game Solver (`website`) diff --git a/apps/api/package.json b/apps/api/package.json index de1e62f..6006d66 100644 --- a/apps/api/package.json +++ b/apps/api/package.json @@ -23,7 +23,7 @@ "@repo/wikipedia-game-solver": "workspace:*", "@vinejs/vine": "catalog:", "luxon": "catalog:", - "mysql2": "catalog:", + "pg": "catalog:", "reflect-metadata": "catalog:", "tsx": "catalog:", "pino-pretty": "catalog:" diff --git a/apps/api/src/app/exceptions/handler.ts b/apps/api/src/app/exceptions/handler.ts index 2d8c88a..5249ba7 100644 --- a/apps/api/src/app/exceptions/handler.ts +++ b/apps/api/src/app/exceptions/handler.ts @@ -13,9 +13,9 @@ export default class HttpExceptionHandler extends ExceptionHandler { */ public override async handle( error: unknown, - ctx: HttpContext, + context: HttpContext, ): Promise { - return await super.handle(error, ctx) + return await super.handle(error, context) } /** @@ -25,8 +25,8 @@ export default class HttpExceptionHandler extends ExceptionHandler { */ public override async report( error: unknown, - ctx: HttpContext, + context: HttpContext, ): Promise { - return await super.report(error, ctx) + return await super.report(error, context) } } diff --git a/apps/api/src/app/middleware/auth_middleware.ts b/apps/api/src/app/middleware/auth_middleware.ts index 0e89b19..367206e 100644 --- a/apps/api/src/app/middleware/auth_middleware.ts +++ b/apps/api/src/app/middleware/auth_middleware.ts @@ -13,13 +13,13 @@ export default class AuthMiddleware { redirectTo = "/login" public async handle( - ctx: HttpContext, + context: HttpContext, next: NextFn, options: { guards?: Array } = {}, ): Promise { - await ctx.auth.authenticateUsing(options.guards, { + await context.auth.authenticateUsing(options.guards, { loginRoute: this.redirectTo, }) return next() diff --git a/apps/api/src/app/middleware/container_bindings_middleware.ts b/apps/api/src/app/middleware/container_bindings_middleware.ts index a01b164..f584762 100644 --- a/apps/api/src/app/middleware/container_bindings_middleware.ts +++ b/apps/api/src/app/middleware/container_bindings_middleware.ts @@ -5,13 +5,13 @@ import type { NextFn } from "@adonisjs/core/types/http" /** * The container bindings middleware binds classes to their request specific value using the container resolver. * - * - We bind "HttpContext" class to the "ctx" object. - * - And bind "Logger" class to the "ctx.logger" object. + * - We bind "HttpContext" class to the "context" object. + * - And bind "Logger" class to the "context.logger" object. */ export default class ContainerBindingsMiddleware { - public async handle(ctx: HttpContext, next: NextFn): Promise { - ctx.containerResolver.bindValue(HttpContext, ctx) - ctx.containerResolver.bindValue(Logger, ctx.logger) + public async handle(context: HttpContext, next: NextFn): Promise { + context.containerResolver.bindValue(HttpContext, context) + context.containerResolver.bindValue(Logger, context.logger) return next() } diff --git a/apps/api/src/app/models/page.ts b/apps/api/src/app/models/page.ts new file mode 100644 index 0000000..8742380 --- /dev/null +++ b/apps/api/src/app/models/page.ts @@ -0,0 +1,30 @@ +import { BaseModel, column, manyToMany } from "@adonisjs/lucid/orm" +import type { ManyToMany } from "@adonisjs/lucid/types/relations" + +export default class Page extends BaseModel { + protected tableName = "pages" + + @column({ columnName: "id", serializeAs: "id", isPrimary: true }) + declare id: number + + @column({ + columnName: "title", + serializeAs: "title", + }) + declare title: string + + @manyToMany( + () => { + return Page + }, + { + pivotTable: "internal_links", + localKey: "id", + relatedKey: "id", + pivotForeignKey: "from_page_id", + pivotRelatedForeignKey: "to_page_id", + serializeAs: "internalLinks", + }, + ) + declare internalLinks: ManyToMany +} diff --git a/apps/api/src/app/models/user.ts b/apps/api/src/app/models/user.ts index 67c1bb6..ddb1490 100644 --- a/apps/api/src/app/models/user.ts +++ b/apps/api/src/app/models/user.ts @@ -25,7 +25,7 @@ export default class User extends compose(BaseModel, AuthFinder) { columnName: "full_name", serializeAs: "fullName", }) - declare fullName: string | null + declare fullName: string @column({ columnName: "email", @@ -49,7 +49,7 @@ export default class User extends compose(BaseModel, AuthFinder) { autoCreate: true, autoUpdate: true, }) - declare updatedAt: DateTime | null + declare updatedAt: DateTime static accessTokens = DbAccessTokensProvider.forModel(User) } diff --git a/apps/api/src/config/database.ts b/apps/api/src/config/database.ts index a539582..7b59fac 100644 --- a/apps/api/src/config/database.ts +++ b/apps/api/src/config/database.ts @@ -2,10 +2,10 @@ import env from "#start/env.js" import { defineConfig } from "@adonisjs/lucid" const databaseConfig = defineConfig({ - connection: "mysql", + connection: "postgres", connections: { - mysql: { - client: "mysql2", + postgres: { + client: "pg", connection: { host: env.get("DATABASE_HOST"), port: env.get("DATABASE_PORT"), diff --git a/apps/api/src/database/migrations/1723204419777_create_users_table.ts b/apps/api/src/database/migrations/1723204419777_create_users_table.ts index 8031e10..999e7a3 100644 --- a/apps/api/src/database/migrations/1723204419777_create_users_table.ts +++ b/apps/api/src/database/migrations/1723204419777_create_users_table.ts @@ -6,12 +6,12 @@ export default class CreateUsersTable extends BaseSchema { public override async up(): Promise { void this.schema.createTable(this.tableName, (table) => { table.increments("id").notNullable() - table.string("full_name").nullable() + table.string("full_name").notNullable() table.string("email", 254).notNullable().unique() table.string("password").notNullable() table.timestamp("created_at").notNullable() - table.timestamp("updated_at").nullable() + table.timestamp("updated_at").notNullable() }) } diff --git a/apps/api/src/database/migrations/1723204419779_create_access_tokens_table.ts b/apps/api/src/database/migrations/1723204419779_create_access_tokens_table.ts index 390d4b1..f286a9e 100644 --- a/apps/api/src/database/migrations/1723204419779_create_access_tokens_table.ts +++ b/apps/api/src/database/migrations/1723204419779_create_access_tokens_table.ts @@ -10,9 +10,9 @@ export default class CreateAccessTokensTable extends BaseSchema { .integer("tokenable_id") .notNullable() .unsigned() - .references("id") - .inTable("users") + .references("users.id") .onDelete("CASCADE") + .onUpdate("CASCADE") table.string("type").notNullable() table.string("name").nullable() diff --git a/apps/api/src/database/migrations/1723313729067_create_pages_table.ts b/apps/api/src/database/migrations/1723313729067_create_pages_table.ts new file mode 100644 index 0000000..802c427 --- /dev/null +++ b/apps/api/src/database/migrations/1723313729067_create_pages_table.ts @@ -0,0 +1,16 @@ +import { BaseSchema } from "@adonisjs/lucid/schema" + +export default class CreatePagesTable extends BaseSchema { + protected tableName = "pages" + + public override async up(): Promise { + void this.schema.createTable(this.tableName, (table) => { + table.increments("id").notNullable() + table.string("title", 255).notNullable().unique() + }) + } + + public override async down(): Promise { + void this.schema.dropTable(this.tableName) + } +} diff --git a/apps/api/src/database/migrations/1723314216202_create_internal_links_table.ts b/apps/api/src/database/migrations/1723314216202_create_internal_links_table.ts new file mode 100644 index 0000000..ee4bae3 --- /dev/null +++ b/apps/api/src/database/migrations/1723314216202_create_internal_links_table.ts @@ -0,0 +1,29 @@ +import { BaseSchema } from "@adonisjs/lucid/schema" + +export default class CreateInternalLinksTable extends BaseSchema { + protected tableName = "internal_links" + + public override async up(): Promise { + void this.schema.createTable(this.tableName, (table) => { + table.primary(["from_page_id", "to_page_id"]) + table + .integer("from_page_id") + .unsigned() + .notNullable() + .references("pages.id") + .onDelete("CASCADE") + .onUpdate("CASCADE") + table + .integer("to_page_id") + .unsigned() + .notNullable() + .references("pages.id") + .onDelete("CASCADE") + .onUpdate("CASCADE") + }) + } + + public override async down(): Promise { + void this.schema.dropTable(this.tableName) + } +} diff --git a/compose.dev.yaml b/compose.dev.yaml index af47137..2253b9a 100644 --- a/compose.dev.yaml +++ b/compose.dev.yaml @@ -1,27 +1,20 @@ services: wikipedia-solver-dev-database: container_name: "wikipedia-solver-dev-database" - image: "mariadb:10.6.17" + image: "postgres:16.3" restart: "unless-stopped" env_file: ".env" environment: - MARIADB_USER: ${DATABASE_USER} - MARIADB_PASSWORD: ${DATABASE_PASSWORD} - MARIADB_ROOT_PASSWORD: ${DATABASE_PASSWORD} - MARIADB_DATABASE: ${DATABASE_NAME} + POSTGRES_USER: ${DATABASE_USER} + POSTGRES_PASSWORD: ${DATABASE_PASSWORD} + POSTGRES_DB: ${DATABASE_NAME} command: | - --innodb_buffer_pool_size=4G - --key-buffer-size=4G - --innodb_log_buffer_size=256M - --innodb_log_file_size=1G - --innodb_write_io_threads=16 - --innodb_flush_log_at_trx_commit=0 - --max_allowed_packet=1G + --max_wal_size=4GB ports: - - "${DATABASE_PORT-3306}:${DATABASE_PORT-3306}" + - "${DATABASE_PORT-5432}:${DATABASE_PORT-5432}" volumes: - - "wikipedia-solver-dev-mariadb-data:/var/lib/mysql" - # - "./sql:/docker-entrypoint-initdb.d/" + - "wikipedia-solver-dev-postgres-data:/var/lib/postgresql/data" + - "./data:/data/" wikipedia-solver-dev-adminer: container_name: "wikipedia-solver-dev-adminer" @@ -38,4 +31,4 @@ services: - "./data/adminer/fonts/:/var/www/html/fonts" volumes: - wikipedia-solver-dev-mariadb-data: + wikipedia-solver-dev-postgres-data: diff --git a/compose.yaml b/compose.yaml index a38d4c6..c902720 100644 --- a/compose.yaml +++ b/compose.yaml @@ -27,27 +27,20 @@ services: wikipedia-solver-database: container_name: "wikipedia-solver-database" - image: "mariadb:10.6.17" + image: "postgres:16.3" restart: "unless-stopped" env_file: ".env" environment: - MARIADB_USER: ${DATABASE_USER} - MARIADB_PASSWORD: ${DATABASE_PASSWORD} - MARIADB_ROOT_PASSWORD: ${DATABASE_PASSWORD} - MARIADB_DATABASE: ${DATABASE_NAME} + POSTGRES_USER: ${DATABASE_USER} + POSTGRES_PASSWORD: ${DATABASE_PASSWORD} + POSTGRES_DB: ${DATABASE_NAME} command: | - --innodb_buffer_pool_size=4G - --key-buffer-size=4G - --innodb_log_buffer_size=256M - --innodb_log_file_size=1G - --innodb_write_io_threads=16 - --innodb_flush_log_at_trx_commit=0 - --max_allowed_packet=1G + --max_wal_size=4GB ports: - - "${DATABASE_PORT-3306}:${DATABASE_PORT-3306}" + - "${DATABASE_PORT-5432}:${DATABASE_PORT-5432}" volumes: - - "wikipedia-solver-mariadb-data:/var/lib/mysql" - # - "./sql:/docker-entrypoint-initdb.d/" + - "wikipedia-solver-postgres-data:/var/lib/postgresql/data" + - "./data:/data/" volumes: - wikipedia-solver-mariadb-data: + wikipedia-solver-postgres-data: diff --git a/data/.env.example b/data/.env.example deleted file mode 100644 index 83db903..0000000 --- a/data/.env.example +++ /dev/null @@ -1,3 +0,0 @@ -DATABASE_USER=wikipedia_user -DATABASE_PASSWORD=password -DATABASE_NAME=wikipedia diff --git a/data/README.md b/data/README.md index 48daf4f..cd10d4f 100644 --- a/data/README.md +++ b/data/README.md @@ -2,7 +2,11 @@ ```sh ./download-wikipedia-dump.sh -node --max-old-space-size=8096 database-wikipedia.js +node --max-old-space-size=8096 generate-sql-files.js + +# Inside the Database container +docker exec -it wikipedia-solver-dev-database sh +/data/execute-sql.sh ``` ## Utils @@ -11,13 +15,7 @@ Show the first 10 line of sql file: `head -n 10 ./dump/page.sql` Show the first 10 characters of sql file: `head -c 10 ./dump/page.sql` -To inspect volume size used by database: `docker system df -v | grep 'wikipedia-solver-mariadb-data'` - -To enter in the database container: `docker exec -it wikipedia-solver-database sh` - -Then: `mariadb --password="${DATABASE_PASSWORD}" --user="${DATABASE_USER}"` - -And `use wikipedia;`, for example: `SELECT * FROM pages LIMIT 10;` or to execute a SQL script: `source /docker-entrypoint-initdb.d/3-internal-links-inserts.sql;`. +To inspect volume size used by database: `docker system df -v` ## Remove a volume @@ -32,15 +30,22 @@ docker volume rm data_wikipedia-solver-mariadb-data docker-compose down --volumes ``` -## MySQL Related +## PostgreSQL Related - + -MySQL any way to import a huge (32 GB) sql dump faster?: +```sh +docker exec -it wikipedia-solver-dev-database sh -Import data.sql MySQL Docker Container: +psql --username="${DATABASE_USER}" --dbname="${DATABASE_NAME}" +``` - +```sql +-- Execute script with inserts +\i /data/sql-pages-inserts/0001-pages-inserts.sql + +/data/sql-internal-links-inserts/0001-internal-links.sh +``` ## Dumps Links diff --git a/data/compose.yaml b/data/compose.yaml deleted file mode 100644 index f77b2fb..0000000 --- a/data/compose.yaml +++ /dev/null @@ -1,39 +0,0 @@ -services: - wikipedia-solver-database: - container_name: "wikipedia-solver-database" - image: "mariadb:10.6.17" - restart: "unless-stopped" - env_file: ".env" - environment: - MARIADB_USER: ${DATABASE_USER} - MARIADB_PASSWORD: ${DATABASE_PASSWORD} - MARIADB_ROOT_PASSWORD: ${DATABASE_PASSWORD} - MARIADB_DATABASE: ${DATABASE_NAME} - command: | - --innodb_buffer_pool_size=4G - --key-buffer-size=4G - --innodb_log_buffer_size=256M - --innodb_log_file_size=1G - --innodb_write_io_threads=16 - --innodb_flush_log_at_trx_commit=0 - --max_allowed_packet=1G - volumes: - - "wikipedia-solver-mariadb-data:/var/lib/mysql" - - "./sql:/docker-entrypoint-initdb.d/" - - adminer: - container_name: "adminer" - image: "adminer:4.8.1" - restart: "unless-stopped" - ports: - - "8080:8080" - env_file: ".env" - environment: - ADMINER_DEFAULT_SERVER: "wikipedia-solver-database" - volumes: - - "./adminer/default-orange.css:/var/www/html/adminer.css" - - "./adminer/logo.png:/var/www/html/logo.png" - - "./adminer/fonts/:/var/www/html/fonts" - -volumes: - wikipedia-solver-mariadb-data: diff --git a/data/execute-sql.sh b/data/execute-sql.sh new file mode 100755 index 0000000..fc1557a --- /dev/null +++ b/data/execute-sql.sh @@ -0,0 +1,8 @@ +#!/usr/bin/env bash + +/data/sql/0000-sql-init.sh + +/data/sql-pages-inserts/0000-pages.sh +/data/sql-internal-links-inserts/0000-internal-links.sh + +/data/sql/0999-sql-end.sh diff --git a/data/database-wikipedia.js b/data/generate-sql-files.js similarity index 86% rename from data/database-wikipedia.js rename to data/generate-sql-files.js index 712bfd9..8c882d2 100644 --- a/data/database-wikipedia.js +++ b/data/generate-sql-files.js @@ -7,7 +7,6 @@ import { } from "./utils.js" const SQL_DUMP_PATH = path.join(process.cwd(), "dump") -const SQL_OUTPUT_PATH = path.join(process.cwd(), "sql") const SQL_FILENAME_NUMBER_PAD = 4 /** @@ -52,9 +51,42 @@ const cleanPagesSQL = async () => { let current = "" let lastPercent = 0 + let pagesFileCount = 1 + + const INSERT_INTO_START_OUTPUT = "INSERT INTO pages (id, title) VALUES " + + const BATCH_SIZE = 1_000_000 + + /** + * @type {string[]} + */ + let batch = [] + + const flushBatch = async () => { + if (batch.length > 0) { + const batchString = batch.join(",") + const fileName = `${zeroPad(pagesFileCount, SQL_FILENAME_NUMBER_PAD)}-pages-inserts.sql` + const sqlOutputPath = path.join( + process.cwd(), + "sql-pages-inserts", + fileName, + ) + await fs.promises.writeFile( + sqlOutputPath, + `${INSERT_INTO_START_OUTPUT}${batchString};`, + { + encoding: "utf-8", + }, + ) + console.log(`flushBatch - ${fileName}, batch.length: ${batch.length}`) + pagesFileCount += 1 + batch = [] + } + } + return await new Promise((resolve, reject) => { sqlInputFileStream - .on("data", (dataInput) => { + .on("data", async (dataInput) => { const bytesReadRatio = sqlInputFileStream.bytesRead / sqlInputStat.size const bytesReadPercent = bytesReadRatio * 100 @@ -98,13 +130,21 @@ const cleanPagesSQL = async () => { if (namespace === "0" && !isRedirect) { wikipediaPagesKeyId[id] = title + batch.push(`(${id},E${title})`) } } + + if (batch.length >= BATCH_SIZE) { + sqlInputFileStream.pause() + await flushBatch() + sqlInputFileStream.resume() + } }) .on("error", (error) => { return reject(error) }) - .on("close", () => { + .on("close", async () => { + await flushBatch() console.log("cleanPagesSQL - Bytes read (100%).") return resolve(wikipediaPagesKeyId) }) @@ -113,30 +153,6 @@ const cleanPagesSQL = async () => { const wikipediaPagesKeyId = await cleanPagesSQL() -const cleanPagesSQLWriteToFile = async () => { - console.log("cleanPagesSQLWriteToFile - Writing to file...") - const sqlOutputPath = path.join( - SQL_OUTPUT_PATH, - `${zeroPad(1, SQL_FILENAME_NUMBER_PAD)}-pages-inserts.sql`, - ) - const INSERT_INTO_START_OUTPUT = "INSERT INTO pages (id, title) VALUES " - - const wikipediaPagesString = Object.entries(wikipediaPagesKeyId) - .map(([id, title]) => { - return `(${id},${title})` - }) - .join(",") - - await fs.promises.writeFile( - sqlOutputPath, - `${INSERT_INTO_START_OUTPUT}${wikipediaPagesString};`, - { encoding: "utf-8" }, - ) - console.log("cleanPagesSQLWriteToFile - Done.") -} - -await cleanPagesSQLWriteToFile() - /** * Function to clean the `pagelinks.sql` file by: * - Removing all lines that don't start with `INSERT INTO...`. @@ -145,7 +161,7 @@ await cleanPagesSQLWriteToFile() * @returns {Promise} */ const cleanInternalLinksSQL = async () => { - let internalLinksFileCount = 2 + let internalLinksFileCount = 1 const INSERT_INTO_START_OUTPUT = "INSERT INTO internal_links (from_page_id, to_page_id) VALUES " @@ -174,7 +190,11 @@ const cleanInternalLinksSQL = async () => { if (batch.length > 0) { const batchString = batch.join(",") const fileName = `${zeroPad(internalLinksFileCount, SQL_FILENAME_NUMBER_PAD)}-internal-links-inserts.sql` - const sqlOutputPath = path.join(SQL_OUTPUT_PATH, fileName) + const sqlOutputPath = path.join( + process.cwd(), + "sql-internal-links-inserts", + fileName, + ) await fs.promises.writeFile( sqlOutputPath, `${INSERT_INTO_START_OUTPUT}${batchString};`, diff --git a/data/sql-internal-links-inserts/0000-internal-links.sh b/data/sql-internal-links-inserts/0000-internal-links.sh new file mode 100755 index 0000000..2eb35ec --- /dev/null +++ b/data/sql-internal-links-inserts/0000-internal-links.sh @@ -0,0 +1,6 @@ +#!/usr/bin/env bash + +for sqlInsert in /data/sql-internal-links-inserts/*.sql; do + echo "${sqlInsert}" + time psql --username="${DATABASE_USER}" --dbname="${DATABASE_NAME}" --file="${sqlInsert}" +done diff --git a/data/sql-pages-inserts/0000-pages.sh b/data/sql-pages-inserts/0000-pages.sh new file mode 100755 index 0000000..00f6655 --- /dev/null +++ b/data/sql-pages-inserts/0000-pages.sh @@ -0,0 +1,6 @@ +#!/usr/bin/env bash + +for sqlInsert in /data/sql-pages-inserts/*.sql; do + echo "${sqlInsert}" + time psql --username="${DATABASE_USER}" --dbname="${DATABASE_NAME}" --file="${sqlInsert}" +done diff --git a/data/sql/0000-sql-init.sh b/data/sql/0000-sql-init.sh new file mode 100755 index 0000000..5a5bfcb --- /dev/null +++ b/data/sql/0000-sql-init.sh @@ -0,0 +1,3 @@ +#!/usr/bin/env bash + +time psql --username="${DATABASE_USER}" --dbname="${DATABASE_NAME}" --file="/data/sql/0000-sql-init.sql" diff --git a/data/sql/0000-sql-init.sql b/data/sql/0000-sql-init.sql new file mode 100644 index 0000000..7cd63b2 --- /dev/null +++ b/data/sql/0000-sql-init.sql @@ -0,0 +1,2 @@ +ALTER TABLE pages DISABLE TRIGGER ALL; +ALTER TABLE internal_links DISABLE TRIGGER ALL; diff --git a/data/sql/0000-tables-create.sql b/data/sql/0000-tables-create.sql deleted file mode 100644 index 01245fa..0000000 --- a/data/sql/0000-tables-create.sql +++ /dev/null @@ -1,28 +0,0 @@ -CREATE TABLE `pages` ( - `id` INT(8) UNSIGNED NOT NULL AUTO_INCREMENT, - `title` VARBINARY(255) NOT NULL DEFAULT '', - -- `is_redirect` tinyint(1) unsigned NOT NULL DEFAULT 0, - - PRIMARY KEY (`id`), - UNIQUE KEY (`title`) -) ENGINE=MyISAM AUTO_INCREMENT=76684425 DEFAULT CHARSET=binary ROW_FORMAT=COMPRESSED; - --- VARBINARY usage instead of VARCHAR explanation: --- > War on varchar. Changed all occurrences of varchar(N) and varchar(N) binary to varbinary(N). varchars cause problems ("Invalid mix of collations" errors) on MySQL databases with certain configs, most notably the default MySQL config. - -CREATE TABLE `internal_links` ( - -- `id` INT(8) UNSIGNED NOT NULL AUTO_INCREMENT, - `from_page_id` INT(8) UNSIGNED NOT NULL, - `to_page_id` INT(8) UNSIGNED NOT NULL, - - -- PRIMARY KEY (`id`) - PRIMARY KEY (`from_page_id`, `to_page_id`), - FOREIGN KEY (`from_page_id`) REFERENCES `pages` (`id`) ON DELETE CASCADE, - FOREIGN KEY (`to_page_id`) REFERENCES `pages` (`id`) ON DELETE CASCADE -) ENGINE=MyISAM DEFAULT CHARSET=binary ROW_FORMAT=COMPRESSED; - -SET @@session.unique_checks = 0; -SET @@session.foreign_key_checks = 0; - -SET FOREIGN_KEY_CHECKS = 0; -SET UNIQUE_CHECKS = 0; diff --git a/data/sql/0999-constraints.sql b/data/sql/0999-constraints.sql deleted file mode 100644 index ce25e80..0000000 --- a/data/sql/0999-constraints.sql +++ /dev/null @@ -1,11 +0,0 @@ --- SET @@session.foreign_key_checks = 0; --- SET FOREIGN_KEY_CHECKS = 0; - --- ALTER TABLE `internal_links` ADD CONSTRAINT fk_from_page_id FOREIGN KEY (`from_page_id`) REFERENCES `pages` (`id`); --- ALTER TABLE `internal_links` ADD CONSTRAINT fk_to_page_id FOREIGN KEY (`to_page_id`) REFERENCES `pages` (`id`); - -SET @@session.unique_checks = 1; -SET @@session.foreign_key_checks = 1; - -SET FOREIGN_KEY_CHECKS = 1; -SET UNIQUE_CHECKS = 1; diff --git a/data/sql/0999-sql-end.sh b/data/sql/0999-sql-end.sh new file mode 100755 index 0000000..add98d6 --- /dev/null +++ b/data/sql/0999-sql-end.sh @@ -0,0 +1,3 @@ +#!/usr/bin/env bash + +time psql --username="${DATABASE_USER}" --dbname="${DATABASE_NAME}" --file="/data/sql/0999-sql-end.sql" diff --git a/data/sql/0999-sql-end.sql b/data/sql/0999-sql-end.sql new file mode 100644 index 0000000..51391c9 --- /dev/null +++ b/data/sql/0999-sql-end.sql @@ -0,0 +1,2 @@ +ALTER TABLE pages ENABLE TRIGGER ALL; +ALTER TABLE internal_links ENABLE TRIGGER ALL; diff --git a/package.json b/package.json index 9ececf8..74e5d41 100644 --- a/package.json +++ b/package.json @@ -26,7 +26,7 @@ "editorconfig-checker": "5.1.8", "playwright": "catalog:", "prettier": "3.3.3", - "prettier-plugin-tailwindcss": "0.6.5", + "prettier-plugin-tailwindcss": "0.6.6", "replace-in-files-cli": "3.0.0", "semantic-release": "23.1.1", "turbo": "2.0.12", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index dd75030..ec36480 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -85,8 +85,8 @@ catalogs: specifier: 3.4.2 version: 3.4.2 '@types/node': - specifier: 22.1.0 - version: 22.1.0 + specifier: 22.2.0 + version: 22.2.0 '@types/react': specifier: 18.3.3 version: 18.3.3 @@ -156,9 +156,6 @@ catalogs: luxon: specifier: 3.5.0 version: 3.5.0 - mysql2: - specifier: 3.11.0 - version: 3.11.0 next: specifier: 14.2.5 version: 14.2.5 @@ -171,6 +168,9 @@ catalogs: openapi-types: specifier: 12.1.3 version: 12.1.3 + pg: + specifier: 8.12.0 + version: 8.12.0 pino-pretty: specifier: 11.2.2 version: 11.2.2 @@ -243,8 +243,8 @@ importers: specifier: 3.3.3 version: 3.3.3 prettier-plugin-tailwindcss: - specifier: 0.6.5 - version: 0.6.5(prettier@3.3.3) + specifier: 0.6.6 + version: 0.6.6(prettier@3.3.3) replace-in-files-cli: specifier: 3.0.0 version: 3.0.0 @@ -262,7 +262,7 @@ importers: dependencies: '@adonisjs/auth': specifier: 'catalog:' - version: 9.2.3(@adonisjs/assembler@7.7.0(typescript@5.5.4))(@adonisjs/core@6.12.1(@adonisjs/assembler@7.7.0(typescript@5.5.4))(@vinejs/vine@2.1.0))(@adonisjs/lucid@21.2.0(@adonisjs/assembler@7.7.0(typescript@5.5.4))(@adonisjs/core@6.12.1(@adonisjs/assembler@7.7.0(typescript@5.5.4))(@vinejs/vine@2.1.0))(luxon@3.5.0)(mysql2@3.11.0))(@japa/api-client@2.0.3(@japa/assert@3.0.0(@japa/runner@3.1.4)(openapi-types@12.1.3))(@japa/runner@3.1.4))(@japa/plugin-adonisjs@3.0.1(@adonisjs/core@6.12.1(@adonisjs/assembler@7.7.0(typescript@5.5.4))(@vinejs/vine@2.1.0))(@japa/api-client@2.0.3(@japa/assert@3.0.0(@japa/runner@3.1.4)(openapi-types@12.1.3))(@japa/runner@3.1.4))(@japa/runner@3.1.4)(playwright@1.46.0)) + version: 9.2.3(@adonisjs/assembler@7.7.0(typescript@5.5.4))(@adonisjs/core@6.12.1(@adonisjs/assembler@7.7.0(typescript@5.5.4))(@vinejs/vine@2.1.0))(@adonisjs/lucid@21.2.0(@adonisjs/assembler@7.7.0(typescript@5.5.4))(@adonisjs/core@6.12.1(@adonisjs/assembler@7.7.0(typescript@5.5.4))(@vinejs/vine@2.1.0))(luxon@3.5.0)(pg@8.12.0))(@japa/api-client@2.0.3(@japa/assert@3.0.0(@japa/runner@3.1.4)(openapi-types@12.1.3))(@japa/runner@3.1.4))(@japa/plugin-adonisjs@3.0.1(@adonisjs/core@6.12.1(@adonisjs/assembler@7.7.0(typescript@5.5.4))(@vinejs/vine@2.1.0))(@japa/api-client@2.0.3(@japa/assert@3.0.0(@japa/runner@3.1.4)(openapi-types@12.1.3))(@japa/runner@3.1.4))(@japa/runner@3.1.4)(playwright@1.46.0)) '@adonisjs/core': specifier: 'catalog:' version: 6.12.1(@adonisjs/assembler@7.7.0(typescript@5.5.4))(@vinejs/vine@2.1.0) @@ -271,7 +271,7 @@ importers: version: 2.2.1(@adonisjs/core@6.12.1(@adonisjs/assembler@7.7.0(typescript@5.5.4))(@vinejs/vine@2.1.0)) '@adonisjs/lucid': specifier: 'catalog:' - version: 21.2.0(@adonisjs/assembler@7.7.0(typescript@5.5.4))(@adonisjs/core@6.12.1(@adonisjs/assembler@7.7.0(typescript@5.5.4))(@vinejs/vine@2.1.0))(luxon@3.5.0)(mysql2@3.11.0) + version: 21.2.0(@adonisjs/assembler@7.7.0(typescript@5.5.4))(@adonisjs/core@6.12.1(@adonisjs/assembler@7.7.0(typescript@5.5.4))(@vinejs/vine@2.1.0))(luxon@3.5.0)(pg@8.12.0) '@repo/utils': specifier: workspace:* version: link:../../packages/utils @@ -284,9 +284,9 @@ importers: luxon: specifier: 'catalog:' version: 3.5.0 - mysql2: + pg: specifier: 'catalog:' - version: 3.11.0 + version: 8.12.0 pino-pretty: specifier: 'catalog:' version: 11.2.2 @@ -326,7 +326,7 @@ importers: version: 3.4.2 '@types/node': specifier: 'catalog:' - version: 22.1.0 + version: 22.2.0 eslint: specifier: 'catalog:' version: 8.57.0 @@ -360,7 +360,7 @@ importers: version: 0.5.1 '@types/node': specifier: 'catalog:' - version: 22.1.0 + version: 22.2.0 eslint: specifier: 'catalog:' version: 8.57.0 @@ -415,7 +415,7 @@ importers: version: 8.2.8(storybook@8.2.8(@babel/preset-env@7.25.3(@babel/core@7.25.2))) '@storybook/addon-interactions': specifier: 'catalog:' - version: 8.2.8(@jest/globals@29.7.0)(jest@29.7.0(@types/node@22.1.0))(storybook@8.2.8(@babel/preset-env@7.25.3(@babel/core@7.25.2)))(vitest@2.0.5(@types/node@22.1.0)) + version: 8.2.8(@jest/globals@29.7.0)(jest@29.7.0(@types/node@22.2.0))(storybook@8.2.8(@babel/preset-env@7.25.3(@babel/core@7.25.2)))(vitest@2.0.5(@types/node@22.2.0)) '@storybook/addon-links': specifier: 'catalog:' version: 8.2.8(react@18.3.1)(storybook@8.2.8(@babel/preset-env@7.25.3(@babel/core@7.25.2))) @@ -430,19 +430,19 @@ importers: version: 8.2.8(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(storybook@8.2.8(@babel/preset-env@7.25.3(@babel/core@7.25.2))) '@storybook/nextjs': specifier: 'catalog:' - version: 8.2.8(@jest/globals@29.7.0)(@swc/core@1.7.10(@swc/helpers@0.5.5))(esbuild@0.21.5)(jest@29.7.0(@types/node@22.1.0))(next@14.2.5(@babel/core@7.25.2)(@playwright/test@1.46.0)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(storybook@8.2.8(@babel/preset-env@7.25.3(@babel/core@7.25.2)))(type-fest@4.24.0)(typescript@5.5.4)(vitest@2.0.5(@types/node@22.1.0))(webpack-hot-middleware@2.26.1)(webpack@5.93.0(@swc/core@1.7.10(@swc/helpers@0.5.5))(esbuild@0.21.5)) + version: 8.2.8(@jest/globals@29.7.0)(@swc/core@1.7.10(@swc/helpers@0.5.5))(esbuild@0.21.5)(jest@29.7.0(@types/node@22.2.0))(next@14.2.5(@babel/core@7.25.2)(@playwright/test@1.46.0)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(storybook@8.2.8(@babel/preset-env@7.25.3(@babel/core@7.25.2)))(type-fest@4.24.0)(typescript@5.5.4)(vitest@2.0.5(@types/node@22.2.0))(webpack-hot-middleware@2.26.1)(webpack@5.93.0(@swc/core@1.7.10(@swc/helpers@0.5.5))(esbuild@0.21.5)) '@storybook/react': specifier: 'catalog:' version: 8.2.8(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(storybook@8.2.8(@babel/preset-env@7.25.3(@babel/core@7.25.2)))(typescript@5.5.4) '@storybook/test': specifier: 'catalog:' - version: 8.2.8(@jest/globals@29.7.0)(jest@29.7.0(@types/node@22.1.0))(storybook@8.2.8(@babel/preset-env@7.25.3(@babel/core@7.25.2)))(vitest@2.0.5(@types/node@22.1.0)) + version: 8.2.8(@jest/globals@29.7.0)(jest@29.7.0(@types/node@22.2.0))(storybook@8.2.8(@babel/preset-env@7.25.3(@babel/core@7.25.2)))(vitest@2.0.5(@types/node@22.2.0)(@vitest/browser@2.0.5)(@vitest/ui@2.0.5)(terser@5.31.5)) '@storybook/test-runner': specifier: 'catalog:' - version: 0.19.1(@swc/helpers@0.5.5)(@types/node@22.1.0)(storybook@8.2.8(@babel/preset-env@7.25.3(@babel/core@7.25.2))) + version: 0.19.1(@swc/helpers@0.5.5)(@types/node@22.2.0)(storybook@8.2.8(@babel/preset-env@7.25.3(@babel/core@7.25.2))) '@types/node': specifier: 'catalog:' - version: 22.1.0 + version: 22.2.0 '@types/react': specifier: 'catalog:' version: 18.3.3 @@ -524,7 +524,7 @@ importers: version: 0.5.1 '@types/node': specifier: 'catalog:' - version: 22.1.0 + version: 22.2.0 '@types/react': specifier: 'catalog:' version: 18.3.3 @@ -782,10 +782,10 @@ importers: version: 0.5.1 '@types/node': specifier: 'catalog:' - version: 22.1.0 + version: 22.2.0 '@vitest/coverage-istanbul': specifier: 'catalog:' - version: 2.0.5(vitest@2.0.5(@types/node@22.1.0)(@vitest/browser@2.0.5)(@vitest/ui@2.0.5)(terser@5.31.5)) + version: 2.0.5(vitest@2.0.5(@types/node@22.2.0)(@vitest/browser@2.0.5)(@vitest/ui@2.0.5)(terser@5.31.5)) '@vitest/ui': specifier: 'catalog:' version: 2.0.5(vitest@2.0.5) @@ -797,7 +797,7 @@ importers: version: 5.5.4 vitest: specifier: 'catalog:' - version: 2.0.5(@types/node@22.1.0)(@vitest/browser@2.0.5)(@vitest/ui@2.0.5)(terser@5.31.5) + version: 2.0.5(@types/node@22.2.0)(@vitest/browser@2.0.5)(@vitest/ui@2.0.5)(terser@5.31.5) packages/wikipedia-game-solver: dependencies: @@ -3370,9 +3370,6 @@ packages: '@types/node@18.19.44': resolution: {integrity: sha512-ZsbGerYg72WMXUIE9fYxtvfzLEuq6q8mKERdWFnqTmOvudMxnz+CBNRoOwJ2kNpFOncrKjT1hZwxjlFgQ9qvQA==} - '@types/node@22.1.0': - resolution: {integrity: sha512-AOmuRF0R2/5j1knA3c6G3HOk523Ga+l+ZXltX8SF1+5oqcXijjfTd8fY3XRZqSihEu9XhtQnKYLmkFaoxgsJHw==} - '@types/node@22.2.0': resolution: {integrity: sha512-bm6EG6/pCpkxDf/0gDNDdtDILMOHgaQBVOJGdwsqClnxA3xL6jtMv76rLBc006RVMWbmaf0xbmom4Z/5o2nRkQ==} @@ -3943,10 +3940,6 @@ packages: resolution: {integrity: sha512-wvUjBtSGN7+7SjNpq/9M2Tg350UZD3q62IFZLbRAR1bSMlCo1ZaeW+BJ+D090e4hIIZLBcTDWe4Mh4jvUDajzQ==} engines: {node: '>= 0.4'} - aws-ssl-profiles@1.1.1: - resolution: {integrity: sha512-+H+kuK34PfMaI9PNU/NSjBKL5hh/KDM9J72kwYeYEm0A8B1AC4fuCy3qsjnA7lxklgyXsB68yn8Z2xoZEjgwCQ==} - engines: {node: '>= 6.0.0'} - axe-core@4.10.0: resolution: {integrity: sha512-Mr2ZakwQ7XUAjp7pAwQWRhhK8mQQ6JAaNWSjmjxil0R8BPioMtQsTLOolGYkji1rcL++3dCqZA3zWqpT+9Ew6g==} engines: {node: '>=4'} @@ -4757,10 +4750,6 @@ packages: resolution: {integrity: sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==} engines: {node: '>=0.4.0'} - denque@2.1.0: - resolution: {integrity: sha512-HVQE3AAb/pxF8fQAoiqpvg9i3evqug3hoiwakOyZAwJm+6vZehbkYXZ0l4JxS+I3QxM97v5aaRNhj8v5oBhekw==} - engines: {node: '>=0.10'} - depd@2.0.0: resolution: {integrity: sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==} engines: {node: '>= 0.8'} @@ -5514,9 +5503,6 @@ packages: functions-have-names@1.2.3: resolution: {integrity: sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ==} - generate-function@2.3.1: - resolution: {integrity: sha512-eeB5GfMNeevm/GRYq20ShmsaGcmI81kIX2K9XQx5miC8KdHaC6Jm0qQ8ZNeGOi7wYB8OsdxKs+Y2oVuTFuVwKQ==} - gensync@1.0.0-beta.2: resolution: {integrity: sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==} engines: {node: '>=6.9.0'} @@ -6063,9 +6049,6 @@ packages: resolution: {integrity: sha512-VRSzKkbMm5jMDoKLbltAkFQ5Qr7VDiTFGXxYFXXowVj387GeGNOCsOH6Msy00SGZ3Fp84b1Naa1psqgcCIEP5Q==} engines: {node: '>=0.10.0'} - is-property@1.0.2: - resolution: {integrity: sha512-Ks/IoX00TtClbGQr4TWXemAnktAQvYB7HzcCxDGqEZU6oCmb2INHuOoKxbtR+HFkmYWBKv/dOZtGRiAjDhj92g==} - is-regex@1.1.4: resolution: {integrity: sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg==} engines: {node: '>= 0.4'} @@ -6659,9 +6642,6 @@ packages: resolution: {integrity: sha512-9ie8ItPR6tjY5uYJh8K/Zrv/RMZ5VOlOWvtZdEHYSTFKZfIBPQa9tOAEeAWhd+AnIneLJ22w5fjOYtoutpWq5w==} engines: {node: '>=18'} - long@5.2.3: - resolution: {integrity: sha512-lcHwpNoggQTObv5apGNCTdJrO69eHOZMi4BNC+rTLER8iHAqGrUVeLh/irVIM7zTw2bOXA8T6uNPeujwOLg/2Q==} - loose-envify@1.4.0: resolution: {integrity: sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==} hasBin: true @@ -6681,14 +6661,6 @@ packages: lru-cache@5.1.1: resolution: {integrity: sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==} - lru-cache@7.18.3: - resolution: {integrity: sha512-jumlc0BIUrS3qJGgIkWZsyfAM7NCWiBcCDhnd+3NNM5KbBmLTgHVfWBcg6W+rLUsIpzpERPsvwUP7CckAQSOoA==} - engines: {node: '>=12'} - - lru-cache@8.0.5: - resolution: {integrity: sha512-MhWWlVnuab1RG5/zMRRcVGXZLCXrZTgfwMikgzCegsPnG62yDQo5JnqKkrK4jO5iKqDAZGItAqN5CtKBCBWRUA==} - engines: {node: '>=16.14'} - luxon@3.5.0: resolution: {integrity: sha512-rh+Zjr6DNfUYR3bPwJEnuwDdqMbxZW7LOQfUN4B54+Cl+0o5zaU9RJ6bcidfDtC1cWCZXQ+nvX8bf6bAji37QQ==} engines: {node: '>=12'} @@ -6933,17 +6905,9 @@ packages: resolution: {integrity: sha512-avsJQhyd+680gKXyG/sQc0nXaC6rBkPOfyHYcFb9+hdkqQkR9bdnkJ0AMZhke0oesPqIO+mFFJ+IdBc7mst4IA==} engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0} - mysql2@3.11.0: - resolution: {integrity: sha512-J9phbsXGvTOcRVPR95YedzVSxJecpW5A5+cQ57rhHIFXteTP10HCs+VBjS7DHIKfEaI1zQ5tlVrquCd64A6YvA==} - engines: {node: '>= 8.0'} - mz@2.7.0: resolution: {integrity: sha512-z81GNO7nnYMEhrGh9LeymoE4+Yr0Wn5McHIZMK5cfQCl+NDX08sCZgUc9/6MHni9IWuFLm1Z3HTCXu2z9fN62Q==} - named-placeholders@1.1.3: - resolution: {integrity: sha512-eLoBxg6wE/rZkJPhU/xRX1WTpkFEwDJEN96oxFrTsqBdbT5ec295Q+CoHrL9IT0DipqKhmGcaZmwOt8OON5x1w==} - engines: {node: '>=12.0.0'} - nanoid@3.3.7: resolution: {integrity: sha512-eSRppjcPIatRIMC1U6UngP8XFcz8MQWGQdt1MTBQ7NaAmvXDfvNxbvWV3x2y6CdEUciCSsDHDQZbhYaB8QEo2g==} engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1} @@ -7445,9 +7409,43 @@ packages: resolution: {integrity: sha512-E7mY2VmKqw9jYuXrSWGHFuPCW2SLQenzXLF3amGaY6lXXg4/b3gj5HVM7h8ZjCO/nZS9ICs0Cz285+32FvNd/A==} engines: {node: '>=14.16'} + pg-cloudflare@1.1.1: + resolution: {integrity: sha512-xWPagP/4B6BgFO+EKz3JONXv3YDgvkbVrGw2mTo3D6tVDQRh1e7cqVGvyR3BE+eQgAvx1XhW/iEASj4/jCWl3Q==} + pg-connection-string@2.6.2: resolution: {integrity: sha512-ch6OwaeaPYcova4kKZ15sbJ2hKb/VP48ZD2gE7i1J+L4MspCtBMAx8nMgz7bksc7IojCIIWuEhHibSMFH8m8oA==} + pg-connection-string@2.6.4: + resolution: {integrity: sha512-v+Z7W/0EO707aNMaAEfiGnGL9sxxumwLl2fJvCQtMn9Fxsg+lPpPkdcyBSv/KFgpGdYkMfn+EI1Or2EHjpgLCA==} + + pg-int8@1.0.1: + resolution: {integrity: sha512-WCtabS6t3c8SkpDBUlb1kjOs7l66xsGdKpIPZsg4wR+B3+u9UAum2odSsF9tnvxg80h4ZxLWMy4pRjOsFIqQpw==} + engines: {node: '>=4.0.0'} + + pg-pool@3.6.2: + resolution: {integrity: sha512-Htjbg8BlwXqSBQ9V8Vjtc+vzf/6fVUuak/3/XXKA9oxZprwW3IMDQTGHP+KDmVL7rtd+R1QjbnCFPuTHm3G4hg==} + peerDependencies: + pg: '>=8.0' + + pg-protocol@1.6.1: + resolution: {integrity: sha512-jPIlvgoD63hrEuihvIg+tJhoGjUsLPn6poJY9N5CnlPd91c2T18T/9zBtLxZSb1EhYxBRoZJtzScCaWlYLtktg==} + + pg-types@2.2.0: + resolution: {integrity: sha512-qTAAlrEsl8s4OiEQY69wDvcMIdQN6wdz5ojQiOy6YRMuynxenON0O5oCpJI6lshc6scgAY8qvJ2On/p+CXY0GA==} + engines: {node: '>=4'} + + pg@8.12.0: + resolution: {integrity: sha512-A+LHUSnwnxrnL/tZ+OLfqR1SxLN3c/pgDztZ47Rpbsd4jUytsTtwQo/TLPRzPJMp/1pbhYVhH9cuSZLAajNfjQ==} + engines: {node: '>= 8.0.0'} + peerDependencies: + pg-native: '>=3.0.1' + peerDependenciesMeta: + pg-native: + optional: true + + pgpass@1.0.5: + resolution: {integrity: sha512-FdW9r/jQZhSeohs1Z3sI1yxFQNFvMcnmfuj4WBMUTxOrAyLMaTcE1aAMBiTlbMNaXvBCQuVi0R7hd8udDSP7ug==} + picocolors@1.0.1: resolution: {integrity: sha512-anP1Z8qwhkbmu7MFP5iTt+wQKXgwzf7zTyGlcdzabySa9vd0Xt392U0rVmz9poOaBj0uHJKyyo9/upk0HrEQew==} @@ -7620,12 +7618,28 @@ packages: resolution: {integrity: sha512-TesUflQ0WKZqAvg52PWL6kHgLKP6xB6heTOdoYM0Wt2UHyxNa4K25EZZMgKns3BH1RLVbZCREPpLY0rhnNoHVQ==} engines: {node: ^10 || ^12 || >=14} + postgres-array@2.0.0: + resolution: {integrity: sha512-VpZrUqU5A69eQyW2c5CA1jtLecCsN2U/bD6VilrFDWq5+5UIEVO7nazS3TEcHf1zuPYO/sqGvUvW62g86RXZuA==} + engines: {node: '>=4'} + + postgres-bytea@1.0.0: + resolution: {integrity: sha512-xy3pmLuQqRBZBXDULy7KbaitYqLcmxigw14Q5sj8QBVLqEwXfeybIKVWiqAXTlcvdvb0+xkOtDbfQMOf4lST1w==} + engines: {node: '>=0.10.0'} + + postgres-date@1.0.7: + resolution: {integrity: sha512-suDmjLVQg78nMK2UZ454hAG+OAW+HQPZ6n++TNDUX+L0+uUlLywnoxJKDou51Zm+zTCjrCl0Nq6J9C5hP9vK/Q==} + engines: {node: '>=0.10.0'} + + postgres-interval@1.2.0: + resolution: {integrity: sha512-9ZhXKM/rw350N1ovuWHbGxnGh/SNJ4cnxHiM0rxE4VN41wsg8P8zWn9hv/buK00RP4WvlOyr/RBDiptyxVbkZQ==} + engines: {node: '>=0.10.0'} + prelude-ls@1.2.1: resolution: {integrity: sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==} engines: {node: '>= 0.8.0'} - prettier-plugin-tailwindcss@0.6.5: - resolution: {integrity: sha512-axfeOArc/RiGHjOIy9HytehlC0ZLeMaqY09mm8YCkMzznKiDkwFzOpBvtuhuv3xG5qB73+Mj7OCe2j/L1ryfuQ==} + prettier-plugin-tailwindcss@0.6.6: + resolution: {integrity: sha512-OPva5S7WAsPLEsOuOWXATi13QrCKACCiIonFgIR6V4lYv4QLp++UXVhZSzRbZxXGimkQtQT86CC6fQqTOybGng==} engines: {node: '>=14.21.3'} peerDependencies: '@ianvs/prettier-plugin-sort-imports': '*' @@ -7639,6 +7653,7 @@ packages: prettier-plugin-import-sort: '*' prettier-plugin-jsdoc: '*' prettier-plugin-marko: '*' + prettier-plugin-multiline-arrays: '*' prettier-plugin-organize-attributes: '*' prettier-plugin-organize-imports: '*' prettier-plugin-sort-imports: '*' @@ -7665,6 +7680,8 @@ packages: optional: true prettier-plugin-marko: optional: true + prettier-plugin-multiline-arrays: + optional: true prettier-plugin-organize-attributes: optional: true prettier-plugin-organize-imports: @@ -8177,9 +8194,6 @@ packages: resolution: {integrity: sha512-qqWzuOjSFOuqPjFe4NOsMLafToQQwBSOEpS+FwEt3A2V3vKubTquT3vmLTQpFgMXp8AlFWFuP1qKaJZOtPpVXg==} engines: {node: '>= 0.8.0'} - seq-queue@0.0.5: - resolution: {integrity: sha512-hr3Wtp/GZIc/6DAGPDcV4/9WoZhjrkXsi5B/07QgX8tsdc6ilr7BFM6PM6rbdAX1kFSDYeZGLipIZZKyQP0O5Q==} - serialize-error@11.0.3: resolution: {integrity: sha512-2G2y++21dhj2R7iHAdd0FIzjGwuKZld+7Pl/bTU6YIkrC2ZMbVUjm+luj6A6V34Rv9XfKJDKpTWu9W4Gse1D9g==} engines: {node: '>=14.16'} @@ -8352,10 +8366,6 @@ packages: sprintf-js@1.0.3: resolution: {integrity: sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==} - sqlstring@2.3.3: - resolution: {integrity: sha512-qC9iz2FlN7DQl3+wjwn3802RTyjCx7sDvfQEXchwa6CWOx07/WVfh91gBmQ9fahw8snwGEWU3xGzOt4tFyHLxg==} - engines: {node: '>= 0.6'} - stack-utils@2.0.6: resolution: {integrity: sha512-XlkWvfIm6RmsWtNJx+uqtKLS8eqFbxUg0ZzLXqY0caEy9l7hruX8IpiDnjsLavoBgqCCR71TqWO8MaXYheJ3RQ==} engines: {node: '>=10'} @@ -8917,8 +8927,8 @@ packages: ufo@1.5.4: resolution: {integrity: sha512-UsUk3byDzKd04EyoZ7U4DOlxQaD14JUKQl6/P7wiX4FNvUfm3XL246n9W5AmqwW5RSFJ27NAuM0iLscAOYUiGQ==} - uglify-js@3.19.1: - resolution: {integrity: sha512-y/2wiW+ceTYR2TSSptAhfnEtpLaQ4Ups5zrjB2d3kuVxHj16j/QJwPl5PvuGy9uARb39J0+iKxcRPvtpsx4A4A==} + uglify-js@3.19.2: + resolution: {integrity: sha512-S8KA6DDI47nQXJSi2ctQ629YzwOVs+bQML6DAtvy0wgNdpi+0ySpQK0g2pxBq2xfF2z3YCscu7NNA8nXT9PlIQ==} engines: {node: '>=0.8.0'} hasBin: true @@ -9407,13 +9417,13 @@ snapshots: transitivePeerDependencies: - babel-plugin-macros - '@adonisjs/auth@9.2.3(@adonisjs/assembler@7.7.0(typescript@5.5.4))(@adonisjs/core@6.12.1(@adonisjs/assembler@7.7.0(typescript@5.5.4))(@vinejs/vine@2.1.0))(@adonisjs/lucid@21.2.0(@adonisjs/assembler@7.7.0(typescript@5.5.4))(@adonisjs/core@6.12.1(@adonisjs/assembler@7.7.0(typescript@5.5.4))(@vinejs/vine@2.1.0))(luxon@3.5.0)(mysql2@3.11.0))(@japa/api-client@2.0.3(@japa/assert@3.0.0(@japa/runner@3.1.4)(openapi-types@12.1.3))(@japa/runner@3.1.4))(@japa/plugin-adonisjs@3.0.1(@adonisjs/core@6.12.1(@adonisjs/assembler@7.7.0(typescript@5.5.4))(@vinejs/vine@2.1.0))(@japa/api-client@2.0.3(@japa/assert@3.0.0(@japa/runner@3.1.4)(openapi-types@12.1.3))(@japa/runner@3.1.4))(@japa/runner@3.1.4)(playwright@1.46.0))': + '@adonisjs/auth@9.2.3(@adonisjs/assembler@7.7.0(typescript@5.5.4))(@adonisjs/core@6.12.1(@adonisjs/assembler@7.7.0(typescript@5.5.4))(@vinejs/vine@2.1.0))(@adonisjs/lucid@21.2.0(@adonisjs/assembler@7.7.0(typescript@5.5.4))(@adonisjs/core@6.12.1(@adonisjs/assembler@7.7.0(typescript@5.5.4))(@vinejs/vine@2.1.0))(luxon@3.5.0)(pg@8.12.0))(@japa/api-client@2.0.3(@japa/assert@3.0.0(@japa/runner@3.1.4)(openapi-types@12.1.3))(@japa/runner@3.1.4))(@japa/plugin-adonisjs@3.0.1(@adonisjs/core@6.12.1(@adonisjs/assembler@7.7.0(typescript@5.5.4))(@vinejs/vine@2.1.0))(@japa/api-client@2.0.3(@japa/assert@3.0.0(@japa/runner@3.1.4)(openapi-types@12.1.3))(@japa/runner@3.1.4))(@japa/runner@3.1.4)(playwright@1.46.0))': dependencies: '@adonisjs/core': 6.12.1(@adonisjs/assembler@7.7.0(typescript@5.5.4))(@vinejs/vine@2.1.0) '@adonisjs/presets': 2.6.1(@adonisjs/assembler@7.7.0(typescript@5.5.4))(@adonisjs/core@6.12.1(@adonisjs/assembler@7.7.0(typescript@5.5.4))(@vinejs/vine@2.1.0)) basic-auth: 2.0.1 optionalDependencies: - '@adonisjs/lucid': 21.2.0(@adonisjs/assembler@7.7.0(typescript@5.5.4))(@adonisjs/core@6.12.1(@adonisjs/assembler@7.7.0(typescript@5.5.4))(@vinejs/vine@2.1.0))(luxon@3.5.0)(mysql2@3.11.0) + '@adonisjs/lucid': 21.2.0(@adonisjs/assembler@7.7.0(typescript@5.5.4))(@adonisjs/core@6.12.1(@adonisjs/assembler@7.7.0(typescript@5.5.4))(@vinejs/vine@2.1.0))(luxon@3.5.0)(pg@8.12.0) '@japa/api-client': 2.0.3(@japa/assert@3.0.0(@japa/runner@3.1.4)(openapi-types@12.1.3))(@japa/runner@3.1.4) '@japa/plugin-adonisjs': 3.0.1(@adonisjs/core@6.12.1(@adonisjs/assembler@7.7.0(typescript@5.5.4))(@vinejs/vine@2.1.0))(@japa/api-client@2.0.3(@japa/assert@3.0.0(@japa/runner@3.1.4)(openapi-types@12.1.3))(@japa/runner@3.1.4))(@japa/runner@3.1.4)(playwright@1.46.0) transitivePeerDependencies: @@ -9541,7 +9551,7 @@ snapshots: abstract-logging: 2.0.1 pino: 8.21.0 - '@adonisjs/lucid@21.2.0(@adonisjs/assembler@7.7.0(typescript@5.5.4))(@adonisjs/core@6.12.1(@adonisjs/assembler@7.7.0(typescript@5.5.4))(@vinejs/vine@2.1.0))(luxon@3.5.0)(mysql2@3.11.0)': + '@adonisjs/lucid@21.2.0(@adonisjs/assembler@7.7.0(typescript@5.5.4))(@adonisjs/core@6.12.1(@adonisjs/assembler@7.7.0(typescript@5.5.4))(@vinejs/vine@2.1.0))(luxon@3.5.0)(pg@8.12.0)': dependencies: '@adonisjs/core': 6.12.1(@adonisjs/assembler@7.7.0(typescript@5.5.4))(@vinejs/vine@2.1.0) '@adonisjs/presets': 2.6.1(@adonisjs/assembler@7.7.0(typescript@5.5.4))(@adonisjs/core@6.12.1(@adonisjs/assembler@7.7.0(typescript@5.5.4))(@vinejs/vine@2.1.0)) @@ -9552,8 +9562,8 @@ snapshots: fast-deep-equal: 3.1.3 igniculus: 1.5.0 kleur: 4.1.5 - knex: 3.1.0(mysql2@3.11.0) - knex-dynamic-connection: 3.2.0(mysql2@3.11.0) + knex: 3.1.0(pg@8.12.0) + knex-dynamic-connection: 3.2.0(pg@8.12.0) pretty-hrtime: 1.0.3 qs: 6.13.0 slash: 5.1.0 @@ -10934,7 +10944,7 @@ snapshots: '@jest/console@29.7.0': dependencies: '@jest/types': 29.6.3 - '@types/node': 22.1.0 + '@types/node': 22.2.0 chalk: 4.1.2 jest-message-util: 29.7.0 jest-util: 29.7.0 @@ -10947,14 +10957,14 @@ snapshots: '@jest/test-result': 29.7.0 '@jest/transform': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 22.1.0 + '@types/node': 22.2.0 ansi-escapes: 4.3.2 chalk: 4.1.2 ci-info: 3.9.0 exit: 0.1.2 graceful-fs: 4.2.11 jest-changed-files: 29.7.0 - jest-config: 29.7.0(@types/node@22.1.0) + jest-config: 29.7.0(@types/node@22.2.0) jest-haste-map: 29.7.0 jest-message-util: 29.7.0 jest-regex-util: 29.6.3 @@ -10983,7 +10993,7 @@ snapshots: dependencies: '@jest/fake-timers': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 22.1.0 + '@types/node': 22.2.0 jest-mock: 29.7.0 '@jest/expect-utils@29.7.0': @@ -11001,7 +11011,7 @@ snapshots: dependencies: '@jest/types': 29.6.3 '@sinonjs/fake-timers': 10.3.0 - '@types/node': 22.1.0 + '@types/node': 22.2.0 jest-message-util: 29.7.0 jest-mock: 29.7.0 jest-util: 29.7.0 @@ -11023,7 +11033,7 @@ snapshots: '@jest/transform': 29.7.0 '@jest/types': 29.6.3 '@jridgewell/trace-mapping': 0.3.25 - '@types/node': 22.1.0 + '@types/node': 22.2.0 chalk: 4.1.2 collect-v8-coverage: 1.0.2 exit: 0.1.2 @@ -11100,7 +11110,7 @@ snapshots: '@jest/schemas': 29.6.3 '@types/istanbul-lib-coverage': 2.0.6 '@types/istanbul-reports': 3.0.4 - '@types/node': 22.1.0 + '@types/node': 22.2.0 '@types/yargs': 17.0.33 chalk: 4.1.2 @@ -11760,11 +11770,11 @@ snapshots: '@storybook/global': 5.0.0 storybook: 8.2.8(@babel/preset-env@7.25.3(@babel/core@7.25.2)) - '@storybook/addon-interactions@8.2.8(@jest/globals@29.7.0)(jest@29.7.0(@types/node@22.1.0))(storybook@8.2.8(@babel/preset-env@7.25.3(@babel/core@7.25.2)))(vitest@2.0.5(@types/node@22.1.0))': + '@storybook/addon-interactions@8.2.8(@jest/globals@29.7.0)(jest@29.7.0(@types/node@22.2.0))(storybook@8.2.8(@babel/preset-env@7.25.3(@babel/core@7.25.2)))(vitest@2.0.5(@types/node@22.2.0))': dependencies: '@storybook/global': 5.0.0 '@storybook/instrumenter': 8.2.8(storybook@8.2.8(@babel/preset-env@7.25.3(@babel/core@7.25.2))) - '@storybook/test': 8.2.8(@jest/globals@29.7.0)(jest@29.7.0(@types/node@22.1.0))(storybook@8.2.8(@babel/preset-env@7.25.3(@babel/core@7.25.2)))(vitest@2.0.5(@types/node@22.1.0)) + '@storybook/test': 8.2.8(@jest/globals@29.7.0)(jest@29.7.0(@types/node@22.2.0))(storybook@8.2.8(@babel/preset-env@7.25.3(@babel/core@7.25.2)))(vitest@2.0.5(@types/node@22.2.0)) polished: 4.3.1 storybook: 8.2.8(@babel/preset-env@7.25.3(@babel/core@7.25.2)) ts-dedent: 2.2.0 @@ -11969,7 +11979,7 @@ snapshots: dependencies: storybook: 8.2.8(@babel/preset-env@7.25.3(@babel/core@7.25.2)) - '@storybook/nextjs@8.2.8(@jest/globals@29.7.0)(@swc/core@1.7.10(@swc/helpers@0.5.5))(esbuild@0.21.5)(jest@29.7.0(@types/node@22.1.0))(next@14.2.5(@babel/core@7.25.2)(@playwright/test@1.46.0)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(storybook@8.2.8(@babel/preset-env@7.25.3(@babel/core@7.25.2)))(type-fest@4.24.0)(typescript@5.5.4)(vitest@2.0.5(@types/node@22.1.0))(webpack-hot-middleware@2.26.1)(webpack@5.93.0(@swc/core@1.7.10(@swc/helpers@0.5.5))(esbuild@0.21.5))': + '@storybook/nextjs@8.2.8(@jest/globals@29.7.0)(@swc/core@1.7.10(@swc/helpers@0.5.5))(esbuild@0.21.5)(jest@29.7.0(@types/node@22.2.0))(next@14.2.5(@babel/core@7.25.2)(@playwright/test@1.46.0)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(storybook@8.2.8(@babel/preset-env@7.25.3(@babel/core@7.25.2)))(type-fest@4.24.0)(typescript@5.5.4)(vitest@2.0.5(@types/node@22.2.0))(webpack-hot-middleware@2.26.1)(webpack@5.93.0(@swc/core@1.7.10(@swc/helpers@0.5.5))(esbuild@0.21.5))': dependencies: '@babel/core': 7.25.2 '@babel/plugin-syntax-bigint': 7.8.3(@babel/core@7.25.2) @@ -11988,7 +11998,7 @@ snapshots: '@storybook/builder-webpack5': 8.2.8(@swc/core@1.7.10(@swc/helpers@0.5.5))(esbuild@0.21.5)(storybook@8.2.8(@babel/preset-env@7.25.3(@babel/core@7.25.2)))(typescript@5.5.4) '@storybook/preset-react-webpack': 8.2.8(@swc/core@1.7.10(@swc/helpers@0.5.5))(esbuild@0.21.5)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(storybook@8.2.8(@babel/preset-env@7.25.3(@babel/core@7.25.2)))(typescript@5.5.4) '@storybook/react': 8.2.8(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(storybook@8.2.8(@babel/preset-env@7.25.3(@babel/core@7.25.2)))(typescript@5.5.4) - '@storybook/test': 8.2.8(@jest/globals@29.7.0)(jest@29.7.0(@types/node@22.1.0))(storybook@8.2.8(@babel/preset-env@7.25.3(@babel/core@7.25.2)))(vitest@2.0.5(@types/node@22.1.0)) + '@storybook/test': 8.2.8(@jest/globals@29.7.0)(jest@29.7.0(@types/node@22.2.0))(storybook@8.2.8(@babel/preset-env@7.25.3(@babel/core@7.25.2)))(vitest@2.0.5(@types/node@22.2.0)) '@types/node': 18.19.44 '@types/semver': 7.5.8 babel-loader: 9.1.3(@babel/core@7.25.2)(webpack@5.93.0(@swc/core@1.7.10(@swc/helpers@0.5.5))(esbuild@0.21.5)) @@ -12130,7 +12140,7 @@ snapshots: prettier: 3.3.3 storybook: 8.2.8(@babel/preset-env@7.25.3(@babel/core@7.25.2)) - '@storybook/test-runner@0.19.1(@swc/helpers@0.5.5)(@types/node@22.1.0)(storybook@8.2.8(@babel/preset-env@7.25.3(@babel/core@7.25.2)))': + '@storybook/test-runner@0.19.1(@swc/helpers@0.5.5)(@types/node@22.2.0)(storybook@8.2.8(@babel/preset-env@7.25.3(@babel/core@7.25.2)))': dependencies: '@babel/core': 7.25.2 '@babel/generator': 7.25.0 @@ -12144,14 +12154,14 @@ snapshots: '@swc/core': 1.7.10(@swc/helpers@0.5.5) '@swc/jest': 0.2.36(@swc/core@1.7.10(@swc/helpers@0.5.5)) expect-playwright: 0.8.0 - jest: 29.7.0(@types/node@22.1.0) + jest: 29.7.0(@types/node@22.2.0) jest-circus: 29.7.0 jest-environment-node: 29.7.0 jest-junit: 16.0.0 - jest-playwright-preset: 4.0.0(jest-circus@29.7.0)(jest-environment-node@29.7.0)(jest-runner@29.7.0)(jest@29.7.0(@types/node@22.1.0)) + jest-playwright-preset: 4.0.0(jest-circus@29.7.0)(jest-environment-node@29.7.0)(jest-runner@29.7.0)(jest@29.7.0(@types/node@22.2.0)) jest-runner: 29.7.0 jest-serializer-html: 7.1.0 - jest-watch-typeahead: 2.2.2(jest@29.7.0(@types/node@22.1.0)) + jest-watch-typeahead: 2.2.2(jest@29.7.0(@types/node@22.2.0)) nyc: 15.1.0 playwright: 1.46.0 transitivePeerDependencies: @@ -12164,12 +12174,12 @@ snapshots: - supports-color - ts-node - '@storybook/test@8.2.8(@jest/globals@29.7.0)(jest@29.7.0(@types/node@22.1.0))(storybook@8.2.8(@babel/preset-env@7.25.3(@babel/core@7.25.2)))(vitest@2.0.5(@types/node@22.1.0))': + '@storybook/test@8.2.8(@jest/globals@29.7.0)(jest@29.7.0(@types/node@22.2.0))(storybook@8.2.8(@babel/preset-env@7.25.3(@babel/core@7.25.2)))(vitest@2.0.5(@types/node@22.2.0)(@vitest/browser@2.0.5)(@vitest/ui@2.0.5)(terser@5.31.5))': dependencies: '@storybook/csf': 0.1.11 '@storybook/instrumenter': 8.2.8(storybook@8.2.8(@babel/preset-env@7.25.3(@babel/core@7.25.2))) '@testing-library/dom': 10.1.0 - '@testing-library/jest-dom': 6.4.5(@jest/globals@29.7.0)(jest@29.7.0(@types/node@22.1.0))(vitest@2.0.5(@types/node@22.1.0)) + '@testing-library/jest-dom': 6.4.5(@jest/globals@29.7.0)(jest@29.7.0(@types/node@22.2.0))(vitest@2.0.5(@types/node@22.2.0)(@vitest/browser@2.0.5)(@vitest/ui@2.0.5)(terser@5.31.5)) '@testing-library/user-event': 14.5.2(@testing-library/dom@10.1.0) '@vitest/expect': 1.6.0 '@vitest/spy': 1.6.0 @@ -12182,7 +12192,7 @@ snapshots: - jest - vitest - '@storybook/test@8.2.8(@jest/globals@29.7.0)(jest@29.7.0(@types/node@22.2.0))(storybook@8.2.8(@babel/preset-env@7.25.3(@babel/core@7.25.2)))(vitest@2.0.5(@types/node@22.2.0)(@vitest/browser@2.0.5)(@vitest/ui@2.0.5)(terser@5.31.5))': + '@storybook/test@8.2.8(@jest/globals@29.7.0)(jest@29.7.0(@types/node@22.2.0))(storybook@8.2.8(@babel/preset-env@7.25.3(@babel/core@7.25.2)))(vitest@2.0.5(@types/node@22.2.0))': dependencies: '@storybook/csf': 0.1.11 '@storybook/instrumenter': 8.2.8(storybook@8.2.8(@babel/preset-env@7.25.3(@babel/core@7.25.2))) @@ -12309,21 +12319,6 @@ snapshots: lz-string: 1.5.0 pretty-format: 27.5.1 - '@testing-library/jest-dom@6.4.5(@jest/globals@29.7.0)(jest@29.7.0(@types/node@22.1.0))(vitest@2.0.5(@types/node@22.1.0))': - dependencies: - '@adobe/css-tools': 4.4.0 - '@babel/runtime': 7.25.0 - aria-query: 5.3.0 - chalk: 3.0.0 - css.escape: 1.5.1 - dom-accessibility-api: 0.6.3 - lodash: 4.17.21 - redent: 3.0.0 - optionalDependencies: - '@jest/globals': 29.7.0 - jest: 29.7.0(@types/node@22.1.0) - vitest: 2.0.5(@types/node@22.1.0)(@vitest/browser@2.0.5)(@vitest/ui@2.0.5)(terser@5.31.5) - '@testing-library/jest-dom@6.4.5(@jest/globals@29.7.0)(jest@29.7.0(@types/node@22.2.0))(vitest@2.0.5(@types/node@22.2.0)(@vitest/browser@2.0.5)(@vitest/ui@2.0.5)(terser@5.31.5))': dependencies: '@adobe/css-tools': 4.4.0 @@ -12351,8 +12346,8 @@ snapshots: redent: 3.0.0 optionalDependencies: '@jest/globals': 29.7.0 - jest: 29.7.0 - vitest: 2.0.5(@types/node@22.1.0)(@vitest/browser@2.0.5)(@vitest/ui@2.0.5)(terser@5.31.5) + jest: 29.7.0(@types/node@22.2.0) + vitest: 2.0.5(@types/node@22.2.0)(@vitest/browser@2.0.5)(@vitest/ui@2.0.5)(terser@5.31.5) '@testing-library/react@16.0.0(@testing-library/dom@10.4.0)(@types/react-dom@18.3.0)(@types/react@18.3.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': dependencies: @@ -12409,7 +12404,7 @@ snapshots: '@types/body-parser@1.19.5': dependencies: '@types/connect': 3.4.38 - '@types/node': 22.1.0 + '@types/node': 22.2.0 '@types/bytes@3.1.4': {} @@ -12417,7 +12412,7 @@ snapshots: '@types/connect@3.4.38': dependencies: - '@types/node': 22.1.0 + '@types/node': 22.2.0 '@types/cookie@0.6.0': {} @@ -12425,7 +12420,7 @@ snapshots: '@types/cross-spawn@6.0.6': dependencies: - '@types/node': 22.1.0 + '@types/node': 22.2.0 '@types/doctrine@0.0.9': {} @@ -12449,7 +12444,7 @@ snapshots: '@types/express-serve-static-core@4.19.5': dependencies: - '@types/node': 22.1.0 + '@types/node': 22.2.0 '@types/qs': 6.9.15 '@types/range-parser': 1.2.7 '@types/send': 0.17.4 @@ -12463,7 +12458,7 @@ snapshots: '@types/graceful-fs@4.1.9': dependencies: - '@types/node': 22.1.0 + '@types/node': 22.2.0 '@types/hast@3.0.4': dependencies: @@ -12514,10 +12509,6 @@ snapshots: dependencies: undici-types: 5.26.5 - '@types/node@22.1.0': - dependencies: - undici-types: 6.13.0 - '@types/node@22.2.0': dependencies: undici-types: 6.13.0 @@ -12550,12 +12541,12 @@ snapshots: '@types/send@0.17.4': dependencies: '@types/mime': 1.3.5 - '@types/node': 22.1.0 + '@types/node': 22.2.0 '@types/serve-static@1.15.7': dependencies: '@types/http-errors': 2.0.4 - '@types/node': 22.1.0 + '@types/node': 22.2.0 '@types/send': 0.17.4 '@types/stack-utils@2.0.3': {} @@ -12566,7 +12557,7 @@ snapshots: dependencies: '@types/cookiejar': 2.1.5 '@types/methods': 1.1.4 - '@types/node': 22.1.0 + '@types/node': 22.2.0 form-data: 4.0.0 '@types/tough-cookie@4.0.5': {} @@ -12579,7 +12570,7 @@ snapshots: '@types/wait-on@5.3.4': dependencies: - '@types/node': 22.1.0 + '@types/node': 22.2.0 '@types/wrap-ansi@3.0.0': {} @@ -12787,22 +12778,6 @@ snapshots: - typescript - utf-8-validate - '@vitest/coverage-istanbul@2.0.5(vitest@2.0.5(@types/node@22.1.0)(@vitest/browser@2.0.5)(@vitest/ui@2.0.5)(terser@5.31.5))': - dependencies: - '@istanbuljs/schema': 0.1.3 - debug: 4.3.6 - istanbul-lib-coverage: 3.2.2 - istanbul-lib-instrument: 6.0.3 - istanbul-lib-report: 3.0.1 - istanbul-lib-source-maps: 5.0.6 - istanbul-reports: 3.1.7 - magicast: 0.3.4 - test-exclude: 7.0.1 - tinyrainbow: 1.2.0 - vitest: 2.0.5(@types/node@22.1.0)(@vitest/browser@2.0.5)(@vitest/ui@2.0.5)(terser@5.31.5) - transitivePeerDependencies: - - supports-color - '@vitest/coverage-istanbul@2.0.5(vitest@2.0.5(@types/node@22.2.0)(@vitest/browser@2.0.5)(@vitest/ui@2.0.5)(terser@5.31.5))': dependencies: '@istanbuljs/schema': 0.1.3 @@ -13261,8 +13236,6 @@ snapshots: dependencies: possible-typed-array-names: 1.0.0 - aws-ssl-profiles@1.1.1: {} - axe-core@4.10.0: {} axe-html-reporter@2.2.3(axe-core@4.10.0): @@ -13934,21 +13907,6 @@ snapshots: safe-buffer: 5.2.1 sha.js: 2.4.11 - create-jest@29.7.0(@types/node@22.1.0): - dependencies: - '@jest/types': 29.6.3 - chalk: 4.1.2 - exit: 0.1.2 - graceful-fs: 4.2.11 - jest-config: 29.7.0(@types/node@22.1.0) - jest-util: 29.7.0 - prompts: 2.4.2 - transitivePeerDependencies: - - '@types/node' - - babel-plugin-macros - - supports-color - - ts-node - create-jest@29.7.0(@types/node@22.2.0): dependencies: '@jest/types': 29.6.3 @@ -13963,7 +13921,6 @@ snapshots: - babel-plugin-macros - supports-color - ts-node - optional: true cross-spawn@7.0.3: dependencies: @@ -14142,8 +14099,6 @@ snapshots: delayed-stream@1.0.0: {} - denque@2.1.0: {} - depd@2.0.0: {} deprecation@2.3.1: {} @@ -15178,10 +15133,6 @@ snapshots: functions-have-names@1.2.3: {} - generate-function@2.3.1: - dependencies: - is-property: 1.0.2 - gensync@1.0.0-beta.2: {} get-caller-file@2.0.5: {} @@ -15350,7 +15301,7 @@ snapshots: source-map: 0.6.1 wordwrap: 1.0.0 optionalDependencies: - uglify-js: 3.19.1 + uglify-js: 3.19.2 has-bigints@1.0.2: {} @@ -15738,8 +15689,6 @@ snapshots: is-plain-object@5.0.0: {} - is-property@1.0.2: {} - is-regex@1.1.4: dependencies: call-bind: 1.0.7 @@ -15927,7 +15876,7 @@ snapshots: '@jest/expect': 29.7.0 '@jest/test-result': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 22.1.0 + '@types/node': 22.2.0 chalk: 4.1.2 co: 4.6.0 dedent: 1.5.3 @@ -15947,25 +15896,6 @@ snapshots: - babel-plugin-macros - supports-color - jest-cli@29.7.0(@types/node@22.1.0): - dependencies: - '@jest/core': 29.7.0 - '@jest/test-result': 29.7.0 - '@jest/types': 29.6.3 - chalk: 4.1.2 - create-jest: 29.7.0(@types/node@22.1.0) - exit: 0.1.2 - import-local: 3.2.0 - jest-config: 29.7.0(@types/node@22.1.0) - jest-util: 29.7.0 - jest-validate: 29.7.0 - yargs: 17.7.2 - transitivePeerDependencies: - - '@types/node' - - babel-plugin-macros - - supports-color - - ts-node - jest-cli@29.7.0(@types/node@22.2.0): dependencies: '@jest/core': 29.7.0 @@ -15984,37 +15914,6 @@ snapshots: - babel-plugin-macros - supports-color - ts-node - optional: true - - jest-config@29.7.0(@types/node@22.1.0): - dependencies: - '@babel/core': 7.25.2 - '@jest/test-sequencer': 29.7.0 - '@jest/types': 29.6.3 - babel-jest: 29.7.0(@babel/core@7.25.2) - chalk: 4.1.2 - ci-info: 3.9.0 - deepmerge: 4.3.1 - glob: 7.2.3 - graceful-fs: 4.2.11 - jest-circus: 29.7.0 - jest-environment-node: 29.7.0 - jest-get-type: 29.6.3 - jest-regex-util: 29.6.3 - jest-resolve: 29.7.0 - jest-runner: 29.7.0 - jest-util: 29.7.0 - jest-validate: 29.7.0 - micromatch: 4.0.7 - parse-json: 5.2.0 - pretty-format: 29.7.0 - slash: 3.0.0 - strip-json-comments: 3.1.1 - optionalDependencies: - '@types/node': 22.1.0 - transitivePeerDependencies: - - babel-plugin-macros - - supports-color jest-config@29.7.0(@types/node@22.2.0): dependencies: @@ -16045,7 +15944,6 @@ snapshots: transitivePeerDependencies: - babel-plugin-macros - supports-color - optional: true jest-diff@25.5.0: dependencies: @@ -16078,7 +15976,7 @@ snapshots: '@jest/environment': 29.7.0 '@jest/fake-timers': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 22.1.0 + '@types/node': 22.2.0 jest-mock: 29.7.0 jest-util: 29.7.0 @@ -16090,7 +15988,7 @@ snapshots: dependencies: '@jest/types': 29.6.3 '@types/graceful-fs': 4.1.9 - '@types/node': 22.1.0 + '@types/node': 22.2.0 anymatch: 3.1.3 fb-watchman: 2.0.2 graceful-fs: 4.2.11 @@ -16143,13 +16041,13 @@ snapshots: jest-mock@29.7.0: dependencies: '@jest/types': 29.6.3 - '@types/node': 22.1.0 + '@types/node': 22.2.0 jest-util: 29.7.0 - jest-playwright-preset@4.0.0(jest-circus@29.7.0)(jest-environment-node@29.7.0)(jest-runner@29.7.0)(jest@29.7.0(@types/node@22.1.0)): + jest-playwright-preset@4.0.0(jest-circus@29.7.0)(jest-environment-node@29.7.0)(jest-runner@29.7.0)(jest@29.7.0(@types/node@22.2.0)): dependencies: expect-playwright: 0.8.0 - jest: 29.7.0(@types/node@22.1.0) + jest: 29.7.0(@types/node@22.2.0) jest-circus: 29.7.0 jest-environment-node: 29.7.0 jest-process-manager: 0.4.0 @@ -16210,7 +16108,7 @@ snapshots: '@jest/test-result': 29.7.0 '@jest/transform': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 22.1.0 + '@types/node': 22.2.0 chalk: 4.1.2 emittery: 0.13.1 graceful-fs: 4.2.11 @@ -16238,7 +16136,7 @@ snapshots: '@jest/test-result': 29.7.0 '@jest/transform': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 22.1.0 + '@types/node': 22.2.0 chalk: 4.1.2 cjs-module-lexer: 1.3.1 collect-v8-coverage: 1.0.2 @@ -16288,7 +16186,7 @@ snapshots: jest-util@29.7.0: dependencies: '@jest/types': 29.6.3 - '@types/node': 22.1.0 + '@types/node': 22.2.0 chalk: 4.1.2 ci-info: 3.9.0 graceful-fs: 4.2.11 @@ -16303,11 +16201,11 @@ snapshots: leven: 3.1.0 pretty-format: 29.7.0 - jest-watch-typeahead@2.2.2(jest@29.7.0(@types/node@22.1.0)): + jest-watch-typeahead@2.2.2(jest@29.7.0(@types/node@22.2.0)): dependencies: ansi-escapes: 6.2.1 chalk: 5.3.0 - jest: 29.7.0(@types/node@22.1.0) + jest: 29.7.0(@types/node@22.2.0) jest-regex-util: 29.6.3 jest-watcher: 29.7.0 slash: 5.1.0 @@ -16318,7 +16216,7 @@ snapshots: dependencies: '@jest/test-result': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 22.1.0 + '@types/node': 22.2.0 ansi-escapes: 4.3.2 chalk: 4.1.2 emittery: 0.13.1 @@ -16327,42 +16225,17 @@ snapshots: jest-worker@27.5.1: dependencies: - '@types/node': 22.1.0 + '@types/node': 22.2.0 merge-stream: 2.0.0 supports-color: 8.1.1 jest-worker@29.7.0: dependencies: - '@types/node': 22.1.0 + '@types/node': 22.2.0 jest-util: 29.7.0 merge-stream: 2.0.0 supports-color: 8.1.1 - jest@29.7.0: - dependencies: - '@jest/core': 29.7.0 - '@jest/types': 29.6.3 - import-local: 3.2.0 - jest-cli: 29.7.0(@types/node@22.2.0) - transitivePeerDependencies: - - '@types/node' - - babel-plugin-macros - - supports-color - - ts-node - optional: true - - jest@29.7.0(@types/node@22.1.0): - dependencies: - '@jest/core': 29.7.0 - '@jest/types': 29.6.3 - import-local: 3.2.0 - jest-cli: 29.7.0(@types/node@22.1.0) - transitivePeerDependencies: - - '@types/node' - - babel-plugin-macros - - supports-color - - ts-node - jest@29.7.0(@types/node@22.2.0): dependencies: '@jest/core': 29.7.0 @@ -16374,7 +16247,6 @@ snapshots: - babel-plugin-macros - supports-color - ts-node - optional: true jiti@1.21.6: {} @@ -16503,10 +16375,10 @@ snapshots: klona@2.0.6: {} - knex-dynamic-connection@3.2.0(mysql2@3.11.0): + knex-dynamic-connection@3.2.0(pg@8.12.0): dependencies: debug: 4.3.6 - knex: 3.1.0(mysql2@3.11.0) + knex: 3.1.0(pg@8.12.0) transitivePeerDependencies: - better-sqlite3 - mysql @@ -16517,7 +16389,7 @@ snapshots: - supports-color - tedious - knex@3.1.0(mysql2@3.11.0): + knex@3.1.0(pg@8.12.0): dependencies: colorette: 2.0.19 commander: 10.0.1 @@ -16534,7 +16406,7 @@ snapshots: tarn: 3.0.2 tildify: 2.0.0 optionalDependencies: - mysql2: 3.11.0 + pg: 8.12.0 transitivePeerDependencies: - supports-color @@ -16641,8 +16513,6 @@ snapshots: strip-ansi: 7.1.0 wrap-ansi: 9.0.0 - long@5.2.3: {} - loose-envify@1.4.0: dependencies: js-tokens: 4.0.0 @@ -16665,10 +16535,6 @@ snapshots: dependencies: yallist: 3.1.1 - lru-cache@7.18.3: {} - - lru-cache@8.0.5: {} - luxon@3.5.0: {} lz-string@1.5.0: {} @@ -16884,28 +16750,12 @@ snapshots: mute-stream@1.0.0: {} - mysql2@3.11.0: - dependencies: - aws-ssl-profiles: 1.1.1 - denque: 2.1.0 - generate-function: 2.3.1 - iconv-lite: 0.6.3 - long: 5.2.3 - lru-cache: 8.0.5 - named-placeholders: 1.1.3 - seq-queue: 0.0.5 - sqlstring: 2.3.3 - mz@2.7.0: dependencies: any-promise: 1.3.0 object-assign: 4.1.1 thenify-all: 1.6.0 - named-placeholders@1.1.3: - dependencies: - lru-cache: 7.18.3 - nanoid@3.3.7: {} natural-compare@1.4.0: {} @@ -17379,8 +17229,43 @@ snapshots: peek-readable@5.1.4: {} + pg-cloudflare@1.1.1: + optional: true + pg-connection-string@2.6.2: {} + pg-connection-string@2.6.4: {} + + pg-int8@1.0.1: {} + + pg-pool@3.6.2(pg@8.12.0): + dependencies: + pg: 8.12.0 + + pg-protocol@1.6.1: {} + + pg-types@2.2.0: + dependencies: + pg-int8: 1.0.1 + postgres-array: 2.0.0 + postgres-bytea: 1.0.0 + postgres-date: 1.0.7 + postgres-interval: 1.2.0 + + pg@8.12.0: + dependencies: + pg-connection-string: 2.6.4 + pg-pool: 3.6.2(pg@8.12.0) + pg-protocol: 1.6.1 + pg-types: 2.2.0 + pgpass: 1.0.5 + optionalDependencies: + pg-cloudflare: 1.1.1 + + pgpass@1.0.5: + dependencies: + split2: 4.2.0 + picocolors@1.0.1: {} picomatch@2.3.1: {} @@ -17561,9 +17446,19 @@ snapshots: picocolors: 1.0.1 source-map-js: 1.2.0 + postgres-array@2.0.0: {} + + postgres-bytea@1.0.0: {} + + postgres-date@1.0.7: {} + + postgres-interval@1.2.0: + dependencies: + xtend: 4.0.2 + prelude-ls@1.2.1: {} - prettier-plugin-tailwindcss@0.6.5(prettier@3.3.3): + prettier-plugin-tailwindcss@0.6.6(prettier@3.3.3): dependencies: prettier: 3.3.3 @@ -18200,8 +18095,6 @@ snapshots: transitivePeerDependencies: - supports-color - seq-queue@0.0.5: {} - serialize-error@11.0.3: dependencies: type-fest: 2.19.0 @@ -18411,8 +18304,6 @@ snapshots: sprintf-js@1.0.3: {} - sqlstring@2.3.3: {} - stack-utils@2.0.6: dependencies: escape-string-regexp: 2.0.0 @@ -19046,7 +18937,7 @@ snapshots: ufo@1.5.4: {} - uglify-js@3.19.1: + uglify-js@3.19.2: optional: true uid-safe@2.1.5: @@ -19186,24 +19077,6 @@ snapshots: vary@1.1.2: {} - vite-node@2.0.5(@types/node@22.1.0)(terser@5.31.5): - dependencies: - cac: 6.7.14 - debug: 4.3.6 - pathe: 1.1.2 - tinyrainbow: 1.2.0 - vite: 5.4.0(@types/node@22.1.0)(terser@5.31.5) - transitivePeerDependencies: - - '@types/node' - - less - - lightningcss - - sass - - sass-embedded - - stylus - - sugarss - - supports-color - - terser - vite-node@2.0.5(@types/node@22.2.0)(terser@5.31.5): dependencies: cac: 6.7.14 @@ -19222,16 +19095,6 @@ snapshots: - supports-color - terser - vite@5.4.0(@types/node@22.1.0)(terser@5.31.5): - dependencies: - esbuild: 0.21.5 - postcss: 8.4.41 - rollup: 4.20.0 - optionalDependencies: - '@types/node': 22.1.0 - fsevents: 2.3.3 - terser: 5.31.5 - vite@5.4.0(@types/node@22.2.0)(terser@5.31.5): dependencies: esbuild: 0.21.5 @@ -19242,41 +19105,6 @@ snapshots: fsevents: 2.3.3 terser: 5.31.5 - vitest@2.0.5(@types/node@22.1.0)(@vitest/browser@2.0.5)(@vitest/ui@2.0.5)(terser@5.31.5): - dependencies: - '@ampproject/remapping': 2.3.0 - '@vitest/expect': 2.0.5 - '@vitest/pretty-format': 2.0.5 - '@vitest/runner': 2.0.5 - '@vitest/snapshot': 2.0.5 - '@vitest/spy': 2.0.5 - '@vitest/utils': 2.0.5 - chai: 5.1.1 - debug: 4.3.6 - execa: 8.0.1 - magic-string: 0.30.11 - pathe: 1.1.2 - std-env: 3.7.0 - tinybench: 2.9.0 - tinypool: 1.0.0 - tinyrainbow: 1.2.0 - vite: 5.4.0(@types/node@22.1.0)(terser@5.31.5) - vite-node: 2.0.5(@types/node@22.1.0)(terser@5.31.5) - why-is-node-running: 2.3.0 - optionalDependencies: - '@types/node': 22.1.0 - '@vitest/browser': 2.0.5(playwright@1.46.0)(typescript@5.5.4)(vitest@2.0.5) - '@vitest/ui': 2.0.5(vitest@2.0.5) - transitivePeerDependencies: - - less - - lightningcss - - sass - - sass-embedded - - stylus - - sugarss - - supports-color - - terser - vitest@2.0.5(@types/node@22.2.0)(@vitest/browser@2.0.5)(@vitest/ui@2.0.5)(terser@5.31.5): dependencies: '@ampproject/remapping': 2.3.0 diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml index 20f2c5a..7a24fcf 100644 --- a/pnpm-workspace.yaml +++ b/pnpm-workspace.yaml @@ -21,7 +21,7 @@ catalog: # TypeScript "typescript": "5.5.4" "@total-typescript/ts-reset": "0.5.1" - "@types/node": "22.1.0" + "@types/node": "22.2.0" "tsx": "4.17.0" # AdonisJS @@ -29,7 +29,7 @@ catalog: "@adonisjs/core": "6.12.1" "@adonisjs/cors": "2.2.1" "@adonisjs/lucid": "21.2.0" - "mysql2": "3.11.0" + "pg": "8.12.0" "@adonisjs/assembler": "7.7.0" "@vinejs/vine": "2.1.0" "luxon": "3.5.0"