diff --git a/.dockerignore b/.dockerignore index bc16e556..20720d48 100644 --- a/.dockerignore +++ b/.dockerignore @@ -16,5 +16,6 @@ backups .venv __pycache__ node_modules +.pnpm-store evidence .DS_Store diff --git a/.env.example b/.env.example index 119384b5..3780f73d 100644 --- a/.env.example +++ b/.env.example @@ -18,8 +18,13 @@ S3_ACCESS_KEY_ID_FILE=/run/secrets/s3_access_key_id S3_SECRET_ACCESS_KEY_FILE=/run/secrets/s3_secret_access_key MAX_UPLOAD_BYTES=10485760 MAX_IMAGE_PIXELS=40000000 -BROKER_URL_FILE=/run/secrets/broker_url -WORKER_CONCURRENCY=2 +# Kafka partition count is applied when creating a new topic. +ATTACHMENT_TOPIC_PARTITIONS=1 +ATTACHMENT_QUEUE_CAPACITY=64 +WORKER_CONCURRENCY=1 +WORKER_PREFETCH_BYTES=1048576 JOB_MAX_ATTEMPTS=5 JOB_TIMEOUT_SECONDS=60 -STAGING_RETENTION_SECONDS=86400 +WORKER_MEMORY_LIMIT=768m +ORPHAN_GRACE_SECONDS=600 +RECONCILE_INTERVAL_SECONDS=60 diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 00000000..481b0c1b --- /dev/null +++ b/.gitattributes @@ -0,0 +1,3 @@ +infra/*.sh text eol=lf +scripts/*.sh text eol=lf +scripts/*.cmd text eol=crlf diff --git a/.gitignore b/.gitignore index b5a71896..23f893a8 100644 --- a/.gitignore +++ b/.gitignore @@ -18,6 +18,7 @@ backups/ __pycache__/ *.py[cod] node_modules/ +.pnpm-store/ dist/ build/ target/ diff --git a/.oxlintrc.json b/.oxlintrc.json new file mode 100644 index 00000000..fd932650 --- /dev/null +++ b/.oxlintrc.json @@ -0,0 +1,11 @@ +{ + "$schema": "./node_modules/oxlint/configuration_schema.json", + "ignorePatterns": ["src/generated/**"], + "rules": { + "typescript/no-explicit-any": "off", + "typescript/no-floating-promises": "error" + }, + "env": { + "node": true + } +} diff --git a/.prettierrc b/.prettierrc new file mode 100644 index 00000000..a20502b7 --- /dev/null +++ b/.prettierrc @@ -0,0 +1,4 @@ +{ + "singleQuote": true, + "trailingComma": "all" +} diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 00000000..c2a502c7 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,64 @@ +FROM node:24.20.0-bookworm-slim AS base + +WORKDIR /app +RUN apt-get update \ + && apt-get install -y --no-install-recommends openssl \ + && rm -rf /var/lib/apt/lists/* +RUN npm install --global pnpm@10.14.0 + +FROM base AS dependencies + +COPY package.json pnpm-lock.yaml ./ +RUN pnpm install --frozen-lockfile + +FROM dependencies AS migrate + +COPY prisma ./prisma +COPY prisma.config.ts ./ +CMD ["pnpm", "db:deploy"] + +FROM migrate AS build + +COPY nest-cli.json tsconfig.json tsconfig.build.json ./ +COPY src ./src +RUN pnpm build + +FROM base AS production-dependencies + +COPY package.json pnpm-lock.yaml ./ +RUN pnpm install --prod --frozen-lockfile + +FROM production-dependencies AS storage-init + +COPY infra/rustfs ./infra/rustfs +CMD ["node", "infra/rustfs/bootstrap.mjs"] + +FROM node:24.20.0-bookworm-slim AS runtime + +RUN apt-get update \ + && apt-get install -y --no-install-recommends curl \ + && rm -rf /var/lib/apt/lists/* + +ENV NODE_ENV=production \ + APP_HOST=0.0.0.0 \ + APP_PORT=8080 + +WORKDIR /app + +RUN groupadd --system --gid 10001 app \ + && useradd --system --uid 10001 --gid app --home-dir /app --shell /usr/sbin/nologin app + +RUN mkdir -p /app/data && chown 10001:10001 /app/data + +COPY --from=production-dependencies --chown=10001:10001 /app/node_modules ./node_modules +COPY --from=build --chown=10001:10001 /app/dist ./dist +COPY --from=build --chown=10001:10001 /app/package.json ./package.json +COPY --chown=10001:10001 contracts ./contracts + +USER 10001:10001 +EXPOSE 8080 + +HEALTHCHECK --interval=30s --timeout=3s --start-period=15s --retries=3 \ + CMD curl --fail --silent --show-error --max-time 2 --output /dev/null "http://127.0.0.1:${APP_PORT:-8080}/health/ready" + +CMD ["node", "dist/main.js"] diff --git a/compose.yaml b/compose.yaml new file mode 100644 index 00000000..7a5baa52 --- /dev/null +++ b/compose.yaml @@ -0,0 +1,270 @@ +services: + api: + build: + context: . + target: runtime + restart: unless-stopped + init: true + deploy: + replicas: 2 + command: ['sh', '-c', 'INSTANCE_ID=$$(hostname) exec node dist/main.js'] + environment: + NODE_ENV: production + UPLOAD_MEMORY_PROFILE: ${UPLOAD_MEMORY_PROFILE:-0} + APP_ENV: ${APP_ENV:-lab} + APP_HOST: 0.0.0.0 + APP_PORT: 8080 + DATABASE_URL: postgresql://${POSTGRES_USER:-app}:${POSTGRES_PASSWORD:-local_dev_password}@postgres:5432/${POSTGRES_DB:-chat} + DB_POOL_MAX: ${DB_POOL_MAX:-15} + CACHE_URL: redis://redis:6379/0 + CACHE_PREFIX: ${CACHE_PREFIX:-messenger:cache:v1} + SESSION_TTL_SECONDS: ${SESSION_TTL_SECONDS:-3600} + IDEMPOTENCY_TTL_SECONDS: ${IDEMPOTENCY_TTL_SECONDS:-86400} + S3_ENDPOINT: http://s3:9000 + S3_REGION: us-east-1 + S3_BUCKET: messenger-attachments + S3_PUBLIC_ENDPOINT: ${S3_PUBLIC_ENDPOINT:-http://127.0.0.1:${S3_PUBLIC_PORT:-9000}} + DIRECT_UPLOAD_TTL_SECONDS: ${DIRECT_UPLOAD_TTL_SECONDS:-60} + S3_ACCESS_KEY_ID: ${S3_API_ACCESS_KEY_ID:-LABAPI} + S3_SECRET_ACCESS_KEY: ${S3_API_SECRET_ACCESS_KEY:-local_api_storage_password} + MAX_UPLOAD_BYTES: ${MAX_UPLOAD_BYTES:-10485760} + MAX_IMAGE_PIXELS: ${MAX_IMAGE_PIXELS:-40000000} + UPLOAD_BODY_TIMEOUT_MS: ${UPLOAD_BODY_TIMEOUT_MS:-15000} + KAFKA_BROKERS: kafka:9092 + ATTACHMENT_QUEUE_CAPACITY: ${ATTACHMENT_QUEUE_CAPACITY:-64} + depends_on: + migrate: + condition: service_completed_successfully + postgres: + condition: service_healthy + redis: + condition: service_healthy + s3-init: + condition: service_completed_successfully + kafka-init: + condition: service_completed_successfully + healthcheck: + test: + - CMD + - curl + - --fail + - --silent + - --show-error + - --max-time + - '2' + - --output + - /dev/null + - http://127.0.0.1:8080/health/ready + interval: 10s + timeout: 3s + start_period: 20s + retries: 5 + stop_grace_period: 30s + + worker: + build: + context: . + target: runtime + command: ['node', 'dist/attachment-worker.main.js'] + restart: unless-stopped + init: true + mem_limit: ${WORKER_MEMORY_LIMIT:-768m} + memswap_limit: ${WORKER_MEMORY_LIMIT:-768m} + tmpfs: + - /tmp:size=32m,mode=1777 + environment: + NODE_ENV: production + DATABASE_URL: postgresql://${POSTGRES_USER:-app}:${POSTGRES_PASSWORD:-local_dev_password}@postgres:5432/${POSTGRES_DB:-chat} + DB_POOL_MAX: 2 + KAFKA_BROKERS: kafka:9092 + JOB_MAX_ATTEMPTS: ${JOB_MAX_ATTEMPTS:-5} + WORKER_CONCURRENCY: ${WORKER_CONCURRENCY:-1} + WORKER_PREFETCH_BYTES: ${WORKER_PREFETCH_BYTES:-1048576} + ATTACHMENT_QUEUE_CAPACITY: ${ATTACHMENT_QUEUE_CAPACITY:-64} + JOB_TIMEOUT_SECONDS: ${JOB_TIMEOUT_SECONDS:-60} + MAX_UPLOAD_BYTES: ${MAX_UPLOAD_BYTES:-10485760} + MAX_IMAGE_PIXELS: ${MAX_IMAGE_PIXELS:-40000000} + S3_ENDPOINT: http://s3:9000 + S3_REGION: us-east-1 + S3_BUCKET: messenger-attachments + S3_ACCESS_KEY_ID: ${S3_API_ACCESS_KEY_ID:-LABAPI} + S3_SECRET_ACCESS_KEY: ${S3_API_SECRET_ACCESS_KEY:-local_api_storage_password} + depends_on: + migrate: + condition: service_completed_successfully + kafka-init: + condition: service_completed_successfully + s3-init: + condition: service_completed_successfully + healthcheck: + disable: true + stop_grace_period: 120s + + kafka: + image: apache/kafka:3.9.2 + restart: unless-stopped + environment: + CLUSTER_ID: MkU3OEVBNTcwNTJENDM2Qk + KAFKA_NODE_ID: 1 + KAFKA_PROCESS_ROLES: broker,controller + KAFKA_LISTENERS: PLAINTEXT://:9092,CONTROLLER://:9093 + KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://kafka:9092 + KAFKA_CONTROLLER_QUORUM_VOTERS: 1@127.0.0.1:9093 + KAFKA_CONTROLLER_LISTENER_NAMES: CONTROLLER + KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: CONTROLLER:PLAINTEXT,PLAINTEXT:PLAINTEXT + KAFKA_INTER_BROKER_LISTENER_NAME: PLAINTEXT + KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1 + KAFKA_OFFSETS_TOPIC_NUM_PARTITIONS: 1 + KAFKA_GROUP_INITIAL_REBALANCE_DELAY_MS: 0 + KAFKA_AUTO_CREATE_TOPICS_ENABLE: 'false' + KAFKA_LOG_DIRS: /var/lib/kafka/data + KAFKA_HEAP_OPTS: '-Xms128m -Xmx512m' + volumes: + - kafka_data:/var/lib/kafka/data + healthcheck: + test: ['CMD', 'bash', '-c', 'true createHash('sha256').update(value).digest('hex'); +const hmac = (key, value) => createHmac('sha256', key).update(value).digest(); +const encode = (value) => + encodeURIComponent(value).replace( + /[!'()*]/g, + (character) => `%${character.charCodeAt(0).toString(16).toUpperCase()}`, + ); + +/** Sign RustFS native JSON admin requests; credentials and response bodies are never logged. */ +export function signAdminRequest({ + endpoint, + credentials, + region = 'us-east-1', + method, + operation, + query = {}, + body, + now = new Date(), +}) { + const url = new URL(`/rustfs/admin/v3/${operation}`, endpoint); + const canonicalQuery = Object.entries(query) + .map(([key, value]) => [encode(key), encode(String(value))]) + .sort(([a], [b]) => (a < b ? -1 : a > b ? 1 : 0)) + .map(([key, value]) => `${key}=${value}`) + .join('&'); + url.search = canonicalQuery; + const payload = body === undefined ? '' : JSON.stringify(body); + const date = now.toISOString().replace(/[:-]|\.\d{3}/g, ''); + const headers = { + 'content-type': 'application/json', + host: url.host, + 'x-amz-content-sha256': hash(payload), + 'x-amz-date': date, + }; + const names = Object.keys(headers).sort(); + const canonicalHeaders = names + .map((name) => `${name}:${headers[name]}\n`) + .join(''); + const canonical = [ + method, + url.pathname, + canonicalQuery, + canonicalHeaders, + names.join(';'), + hash(payload), + ].join('\n'); + const scope = `${date.slice(0, 8)}/${region}/s3/aws4_request`; + const stringToSign = ['AWS4-HMAC-SHA256', date, scope, hash(canonical)].join( + '\n', + ); + const signingKey = hmac( + hmac( + hmac( + hmac(`AWS4${credentials.secretAccessKey}`, date.slice(0, 8)), + region, + ), + 's3', + ), + 'aws4_request', + ); + const signature = createHmac('sha256', signingKey) + .update(stringToSign) + .digest('hex'); + headers.authorization = `AWS4-HMAC-SHA256 Credential=${credentials.accessKeyId}/${scope}, SignedHeaders=${names.join(';')}, Signature=${signature}`; + return { + url, + method, + headers, + body: body === undefined ? undefined : payload, + }; +} + +export async function adminRequest(config, method, operation, query, body) { + const request = signAdminRequest({ + ...config, + method, + operation, + query, + body, + }); + const response = await fetch(request.url, { + ...request, + signal: AbortSignal.timeout(30000), + }); + const text = await response.text(); + if (!response.ok) { + const code = + text.match(/([A-Za-z0-9_]+)<\/Code>/)?.[1] ?? 'AdminRequestFailed'; + const error = new Error( + `RustFS admin ${operation}: HTTP ${response.status} ${code}`, + ); + error.status = response.status; + throw error; + } + return text ? JSON.parse(text) : null; +} diff --git a/infra/rustfs/bootstrap.mjs b/infra/rustfs/bootstrap.mjs new file mode 100644 index 00000000..258c4ae0 --- /dev/null +++ b/infra/rustfs/bootstrap.mjs @@ -0,0 +1,62 @@ +import { + S3Client, + CreateBucketCommand, + HeadBucketCommand, +} from '@aws-sdk/client-s3'; +import { adminRequest } from './admin.mjs'; +import { bootstrapSettings, storagePolicies } from './policies.mjs'; + +const settings = bootstrapSettings(); +const client = new S3Client({ + endpoint: settings.endpoint, + region: settings.region, + forcePathStyle: true, + maxAttempts: 1, + credentials: settings.credentials, +}); +const Bucket = settings.bucket; +try { + try { + await client.send(new HeadBucketCommand({ Bucket }), { + abortSignal: AbortSignal.timeout(30000), + }); + } catch (error) { + if (error.$metadata?.httpStatusCode !== 404) throw error; + try { + await client.send(new CreateBucketCommand({ Bucket }), { + abortSignal: AbortSignal.timeout(30000), + }); + } catch (error) { + if (error.name !== 'BucketAlreadyOwnedByYou') throw error; + } + } + const policies = storagePolicies(Bucket); + for (const role of ['api', 'reconciler']) { + const identity = settings[role]; + const policyName = `${Bucket}-${role}`; + await adminRequest( + settings, + 'PUT', + 'add-canned-policy', + { name: policyName }, + policies[role], + ); + await adminRequest( + settings, + 'PUT', + 'add-user', + { accessKey: identity.accessKeyId }, + { secretKey: identity.secretAccessKey, status: 'enabled' }, + ); + // Replace the direct binding instead of accumulating old policies across bootstraps. + await adminRequest(settings, 'PUT', 'set-user-or-group-policy', { + policyName, + userOrGroup: identity.accessKeyId, + isGroup: false, + }); + console.log(`Restricted S3 identity provisioned: ${role}`); + } + console.log('Private attachments bucket and restricted identities are ready'); +} finally { + client.destroy(); +} diff --git a/infra/rustfs/policies.mjs b/infra/rustfs/policies.mjs new file mode 100644 index 00000000..17440b7b --- /dev/null +++ b/infra/rustfs/policies.mjs @@ -0,0 +1,87 @@ +export function storagePolicies(bucket) { + const bucketArn = `arn:aws:s3:::${bucket}`; + const objectsArn = `${bucketArn}/originals/*`; + const base = [ + { + Effect: 'Allow', + Action: ['s3:GetBucketLocation'], + Resource: [bucketArn], + }, + ]; + return { + api: { + Version: '2012-10-17', + Statement: [ + ...base, + { + Effect: 'Allow', + Action: ['s3:GetObject', 's3:PutObject', 's3:DeleteObject'], + Resource: [objectsArn, `${bucketArn}/staging/*`, `${bucketArn}/variants/*`], + }, + ], + }, + reconciler: { + Version: '2012-10-17', + Statement: [ + ...base, + { + Effect: 'Allow', + Action: ['s3:ListBucket'], + Resource: [bucketArn], + Condition: { + StringLike: { 's3:prefix': ['originals/*', 'staging/*'] }, + }, + }, + { + Effect: 'Allow', + Action: ['s3:GetObject', 's3:DeleteObject'], + Resource: [objectsArn, `${bucketArn}/staging/*`], + }, + ], + }, + }; +} + +export function bootstrapSettings(env = process.env) { + const settings = { + endpoint: env.S3_ENDPOINT ?? 'http://s3:9000', + region: env.S3_REGION ?? 'us-east-1', + bucket: env.S3_BUCKET ?? 'messenger-attachments', + credentials: { + accessKeyId: env.S3_ACCESS_KEY_ID, + secretAccessKey: env.S3_SECRET_ACCESS_KEY, + }, + api: { + accessKeyId: env.S3_API_ACCESS_KEY_ID ?? 'LABAPI', + secretAccessKey: + env.S3_API_SECRET_ACCESS_KEY ?? 'local_api_storage_password', + }, + reconciler: { + accessKeyId: env.S3_RECONCILER_ACCESS_KEY_ID ?? 'LABRECONCILER', + secretAccessKey: + env.S3_RECONCILER_SECRET_ACCESS_KEY ?? + 'local_reconciler_storage_password', + }, + }; + const identities = [settings.credentials, settings.api, settings.reconciler]; + for (const identity of identities) { + if ( + !identity.accessKeyId || + !identity.secretAccessKey || + identity.secretAccessKey.length < 8 + ) { + throw new Error( + 'All S3 identities require an access key and a secret of at least 8 characters', + ); + } + } + if ( + new Set(identities.map((identity) => identity.accessKeyId)).size !== 3 || + new Set(identities.map((identity) => identity.secretAccessKey)).size !== 3 + ) { + throw new Error( + 'Root, API and reconciler identities must have distinct access and secret keys', + ); + } + return settings; +} diff --git a/infra/start-nginx.sh b/infra/start-nginx.sh new file mode 100644 index 00000000..d846ac67 --- /dev/null +++ b/infra/start-nginx.sh @@ -0,0 +1,71 @@ +#!/bin/sh +set -eu + +upstreams=/etc/nginx/ready-upstreams.conf +printf 'server 127.0.0.1:9 down;\n' > "$upstreams" + +check_ready() { + state=/tmp/nginx-readiness.state + probes=/tmp/nginx-readiness-probes + mkdir -p "$probes" + : > "$state" + sleep 2 + while :; do + next="${upstreams}.next" + previous="${upstreams}.previous" + : > "${state}.next" + printf 'server 127.0.0.1:9 down;\n' > "$next" + + addresses=$(getent ahostsv4 api | awk '{print $1}' | sort -u) + for address in $addresses; do + ( + if wget -q -T 1 -t 1 -O /dev/null "http://${address}:8080/health/ready"; then + printf '1\n' + else + printf '0\n' + fi > "$probes/$address" + ) & + done + wait + + for address in $addresses; do + record=$(awk -v address="$address" '$1 == address {print $2, $3, $4}' "$state") + set -- ${record:-0 0 0} + ready=$1 + successes=$2 + failures=$3 + if [ "$(cat "$probes/$address")" = 1 ]; then + failures=0 + if [ "$successes" -lt 2 ]; then successes=$((successes + 1)); fi + if [ "$successes" -ge 2 ]; then ready=1; fi + else + successes=0 + if [ "$failures" -lt 2 ]; then failures=$((failures + 1)); fi + if [ "$failures" -ge 2 ]; then ready=0; fi + fi + printf '%s %s %s %s\n' "$address" "$ready" "$successes" "$failures" >> "${state}.next" + if [ "$ready" -eq 1 ]; then + printf 'server %s:8080 max_fails=2 fail_timeout=2s;\n' "$address" >> "$next" + fi + done + mv "${state}.next" "$state" + + if cmp -s "$next" "$upstreams"; then + rm -f "$next" + else + cp "$upstreams" "$previous" + mv "$next" "$upstreams" + if nginx -t -q && nginx -s reload; then + rm -f "$previous" + else + mv "$previous" "$upstreams" + printf 'Could not reload Nginx readiness upstreams\n' >&2 + fi + fi + + sleep 2 + done +} + +check_ready & +exec nginx -g 'daemon off;' diff --git a/jest.config.ts b/jest.config.ts new file mode 100644 index 00000000..82bea3de --- /dev/null +++ b/jest.config.ts @@ -0,0 +1,31 @@ +import type { Config } from 'jest'; +import { pathsToModuleNameMapper } from 'ts-jest'; +import ts from 'typescript'; + +const { config: tsconfig } = ts.readConfigFile( + './tsconfig.json', + ts.sys.readFile, +); +const paths = tsconfig?.compilerOptions?.paths ?? {}; + +const config: Config = { + moduleFileExtensions: ['js', 'json', 'ts'], + rootDir: '.', + testRegex: '.*\\.spec\\.ts$', + transform: { + '^.+\\.(t|j)s$': 'ts-jest', + }, + moduleNameMapper: { + ...pathsToModuleNameMapper(paths, { prefix: '/' }), + '^(\\.{1,2}/.*)\\.js$': '$1', + }, + collectCoverageFrom: [ + 'src/**/*.(t|j)s', + 'libs/**/*.(t|j)s', + 'apps/**/*.(t|j)s', + ], + coverageDirectory: './coverage', + testEnvironment: 'node', +}; + +export default config; diff --git a/nest-cli.json b/nest-cli.json new file mode 100644 index 00000000..f9aa683b --- /dev/null +++ b/nest-cli.json @@ -0,0 +1,8 @@ +{ + "$schema": "https://json.schemastore.org/nest-cli", + "collection": "@nestjs/schematics", + "sourceRoot": "src", + "compilerOptions": { + "deleteOutDir": true + } +} diff --git a/package.json b/package.json new file mode 100644 index 00000000..bfc74152 --- /dev/null +++ b/package.json @@ -0,0 +1,74 @@ +{ + "name": "mtusi2026lab4", + "version": "0.0.1", + "description": "", + "author": "", + "private": true, + "license": "UNLICENSED", + "scripts": { + "db:generate": "prisma generate", + "db:validate": "prisma validate", + "db:migrate": "prisma migrate dev", + "db:deploy": "prisma migrate deploy", + "prebuild": "pnpm db:generate", + "prestart:dev": "pnpm db:generate", + "prestart": "pnpm db:generate", + "pretest": "pnpm db:generate", + "build": "nest build", + "format": "prettier --write \"src/**/*.ts\"", + "start": "nest start", + "start:dev": "nest start --watch", + "start:debug": "nest start --debug --watch", + "start:prod": "node dist/main", + "lint": "oxlint --type-aware src/", + "test": "node --experimental-vm-modules ./node_modules/jest/bin/jest.js", + "test:watch": "node --experimental-vm-modules ./node_modules/jest/bin/jest.js --watch", + "test:cov": "node --experimental-vm-modules ./node_modules/jest/bin/jest.js --coverage", + "test:debug": "node --inspect-brk --experimental-vm-modules -r tsconfig-paths/register -r ts-node/register node_modules/.bin/jest --runInBand" + }, + "dependencies": { + "@aws-sdk/client-s3": "^3.1164.0", + "@aws-sdk/s3-request-presigner": "^3.1165.0", + "@fastify/static": "^10.1.4", + "@nestjs/common": "^12.0.1", + "@nestjs/core": "^12.0.1", + "@nestjs/platform-fastify": "12.0.1", + "@nestjs/swagger": "^12.0.1", + "@prisma/adapter-pg": "^7.10.0", + "@prisma/client": "^7.10.0", + "@scalar/nestjs-api-reference": "^1.2.19", + "dotenv": "^18.0.7", + "fastify": "5.12.1", + "ioredis": "^6.0.0", + "kafkajs": "2.2.4", + "nestjs-pino": "^5.2.0", + "pg": "^8.23.1", + "pino-http": "^11.0.0", + "reflect-metadata": "^0.2.2", + "rxjs": "^7.8.1", + "sharp": "^0.35.5" + }, + "devDependencies": { + "@nestjs/cli": "^12.0.0", + "@nestjs/mau": "^0.2.6", + "@nestjs/schematics": "^12.0.0", + "@nestjs/testing": "^12.0.1", + "@types/jest": "^30.0.0", + "@types/node": "^24.0.0", + "@types/pg": "^8.23.1", + "@types/supertest": "^7.0.0", + "jest": "^30.0.0", + "oxlint": "^1.58.0", + "oxlint-tsgolint": "^7.0.2001", + "pino-pretty": "^13.1.3", + "prettier": "^3.4.2", + "prisma": "7.10.0", + "source-map-support": "^0.5.21", + "supertest": "^7.0.0", + "ts-jest": "^29.4.0", + "ts-loader": "^9.5.2", + "ts-node": "^10.9.2", + "tsconfig-paths": "^4.2.0", + "typescript": "^6.0.2" + } +} diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml new file mode 100644 index 00000000..e3aad770 --- /dev/null +++ b/pnpm-lock.yaml @@ -0,0 +1,8376 @@ +lockfileVersion: '9.0' + +settings: + autoInstallPeers: true + excludeLinksFromLockfile: false + +importers: + + .: + dependencies: + '@aws-sdk/client-s3': + specifier: ^3.1164.0 + version: 3.1164.0 + '@aws-sdk/s3-request-presigner': + specifier: ^3.1165.0 + version: 3.1165.0 + '@fastify/static': + specifier: ^10.1.4 + version: 10.1.4 + '@nestjs/common': + specifier: ^12.0.1 + version: 12.0.4(reflect-metadata@0.2.2)(rxjs@7.8.2) + '@nestjs/core': + specifier: ^12.0.1 + version: 12.0.4(@nestjs/common@12.0.4(reflect-metadata@0.2.2)(rxjs@7.8.2))(@nestjs/platform-express@12.0.4)(reflect-metadata@0.2.2)(rxjs@7.8.2) + '@nestjs/platform-fastify': + specifier: 12.0.1 + version: 12.0.1(@fastify/static@10.1.4)(@nestjs/common@12.0.4(reflect-metadata@0.2.2)(rxjs@7.8.2))(@nestjs/core@12.0.4) + '@nestjs/swagger': + specifier: ^12.0.1 + version: 12.0.1(@fastify/static@10.1.4)(@nestjs/common@12.0.4(reflect-metadata@0.2.2)(rxjs@7.8.2))(@nestjs/core@12.0.4)(reflect-metadata@0.2.2) + '@prisma/adapter-pg': + specifier: ^7.10.0 + version: 7.10.0 + '@prisma/client': + specifier: ^7.10.0 + version: 7.10.0(prisma@7.10.0(@types/react@19.3.0)(react-dom@19.3.0(react@19.3.0))(react@19.3.0)(typescript@6.0.3))(typescript@6.0.3) + '@scalar/nestjs-api-reference': + specifier: ^1.2.19 + version: 1.2.19 + dotenv: + specifier: ^18.0.7 + version: 18.0.7 + fastify: + specifier: 5.12.1 + version: 5.12.1 + ioredis: + specifier: ^6.0.0 + version: 6.0.0 + kafkajs: + specifier: 2.2.4 + version: 2.2.4 + nestjs-pino: + specifier: ^5.2.0 + version: 5.2.0(@nestjs/common@12.0.4(reflect-metadata@0.2.2)(rxjs@7.8.2))(@nestjs/core@12.0.4)(pino-http@11.0.0)(pino@10.3.1)(rxjs@7.8.2) + pg: + specifier: ^8.23.1 + version: 8.23.1 + pino-http: + specifier: ^11.0.0 + version: 11.0.0 + reflect-metadata: + specifier: ^0.2.2 + version: 0.2.2 + rxjs: + specifier: ^7.8.1 + version: 7.8.2 + sharp: + specifier: ^0.35.5 + version: 0.35.5(@types/node@24.13.6) + devDependencies: + '@nestjs/cli': + specifier: ^12.0.0 + version: 12.0.3(@types/node@24.13.6)(prettier@3.9.8)(ts-loader@9.6.2(typescript@6.0.3)(webpack@5.111.1(sharp@0.35.5(@types/node@24.13.6))))(webpack@5.111.1(sharp@0.35.5(@types/node@24.13.6))) + '@nestjs/mau': + specifier: ^0.2.6 + version: 0.2.8 + '@nestjs/schematics': + specifier: ^12.0.0 + version: 12.0.4(chokidar@5.0.0)(prettier@3.9.8)(typescript@6.0.3) + '@nestjs/testing': + specifier: ^12.0.1 + version: 12.0.4(@nestjs/common@12.0.4(reflect-metadata@0.2.2)(rxjs@7.8.2))(@nestjs/core@12.0.4)(@nestjs/platform-express@12.0.4) + '@types/jest': + specifier: ^30.0.0 + version: 30.0.0 + '@types/node': + specifier: ^24.0.0 + version: 24.13.6 + '@types/pg': + specifier: ^8.23.1 + version: 8.23.1 + '@types/supertest': + specifier: ^7.0.0 + version: 7.2.1 + jest: + specifier: ^30.0.0 + version: 30.5.2(@types/node@24.13.6)(ts-node@10.9.2(@types/node@24.13.6)(typescript@6.0.3)) + oxlint: + specifier: ^1.58.0 + version: 1.83.0(oxlint-tsgolint@7.0.2002) + oxlint-tsgolint: + specifier: ^7.0.2001 + version: 7.0.2002 + pino-pretty: + specifier: ^13.1.3 + version: 13.1.3 + prettier: + specifier: ^3.4.2 + version: 3.9.8 + prisma: + specifier: 7.10.0 + version: 7.10.0(@types/react@19.3.0)(react-dom@19.3.0(react@19.3.0))(react@19.3.0)(typescript@6.0.3) + source-map-support: + specifier: ^0.5.21 + version: 0.5.21 + supertest: + specifier: ^7.0.0 + version: 7.2.2 + ts-jest: + specifier: ^29.4.0 + version: 29.4.12(@babel/core@7.29.7)(@jest/transform@30.5.2)(@jest/types@30.5.1)(babel-jest@30.5.2(@babel/core@7.29.7))(jest-util@30.5.1)(jest@30.5.2(@types/node@24.13.6)(ts-node@10.9.2(@types/node@24.13.6)(typescript@6.0.3)))(typescript@6.0.3) + ts-loader: + specifier: ^9.5.2 + version: 9.6.2(typescript@6.0.3)(webpack@5.111.1(sharp@0.35.5(@types/node@24.13.6))) + ts-node: + specifier: ^10.9.2 + version: 10.9.2(@types/node@24.13.6)(typescript@6.0.3) + tsconfig-paths: + specifier: ^4.2.0 + version: 4.2.0 + typescript: + specifier: ^6.0.2 + version: 6.0.3 + +packages: + + '@angular-devkit/core@22.1.8': + resolution: {integrity: sha512-34lsgg2FwMVBX7nR/ZqzRUcdvdYPvSB8XAEr2GudXAyZwLI9ehzfQlagAWR/gEb8p4uCFZW0r7uU0toxydq4Rw==} + engines: {node: ^22.22.3 || ^24.15.0 || >=26.0.0, npm: ^6.11.0 || ^7.5.6 || >=8.0.0, yarn: '>= 1.13.0'} + peerDependencies: + chokidar: ^5.0.0 + peerDependenciesMeta: + chokidar: + optional: true + + '@angular-devkit/schematics-cli@22.1.8': + resolution: {integrity: sha512-SsGG8ompVzprmYE9sHi2L7DYZ+i1sD+YDfun6Rg2vkTCusejtD4SSGVxwuR6++dT22ZpN16OqUTmii/0bhE4xA==} + engines: {node: ^22.22.3 || ^24.15.0 || >=26.0.0, npm: ^6.11.0 || ^7.5.6 || >=8.0.0, yarn: '>= 1.13.0'} + hasBin: true + + '@angular-devkit/schematics@22.1.8': + resolution: {integrity: sha512-Pv3cPa/44kvEwYcqwx4Ns5dhIDmcFNSHhbpheqiEG1Z/u4e2t4zHKDtE3eHZB+8o+IcC7xJj+d+AqGR44RoZDA==} + engines: {node: ^22.22.3 || ^24.15.0 || >=26.0.0, npm: ^6.11.0 || ^7.5.6 || >=8.0.0, yarn: '>= 1.13.0'} + + '@aws-sdk/checksums@3.1002.3': + resolution: {integrity: sha512-lBwLpni4uWNIH0UxgP8hR3XiGSunn9C7DrhzQzte/uc4chFpghMpf4GkiBrvvygs3NTp1VI5QdD9ZbRA0hM0OQ==} + engines: {node: '>=20.0.0'} + + '@aws-sdk/client-s3@3.1164.0': + resolution: {integrity: sha512-RCzGDlPFT0vH+rTIW+ukSsdeTC4RuFPDDvTracNW40CES6twgv7OXBXR1oVkhO3u7qY4UECbjF/kJmTSNx7eWQ==} + engines: {node: '>=20.0.0'} + + '@aws-sdk/core@3.980.1': + resolution: {integrity: sha512-W7jDWUPucezIUjFZpr8MudQQtz/m6yPMyAFrOyyQcHjuF4UrZdcCdP8eV1js06U9sH3dxp0AbhN+s9uHwQyXzQ==} + engines: {node: '>=20.0.0'} + + '@aws-sdk/core@3.980.2': + resolution: {integrity: sha512-Q0hqjfLf1zvwB6aY6fi8pYrtgxHs8sqymhXH/iWBZM/wkokjT869Ws4F12nCD2KX3hiAvKku2cZplxM0cydX8A==} + engines: {node: '>=20.0.0'} + + '@aws-sdk/credential-provider-env@3.972.82': + resolution: {integrity: sha512-sAfysgoFWKg/CJvufYM7lhvMUfJpTsuwjCLzp843Vtw8NlQh2PW9/+upUFrsoQK46pJcv3u1a+st7qJ4jfSODw==} + engines: {node: '>=20.0.0'} + + '@aws-sdk/credential-provider-http@3.972.84': + resolution: {integrity: sha512-6xFe7tGPZedfak01TLUxuExU2Xhqw0VtoVvcS/+1OLjPB8If5vulTpCaR0TKTA/J6sAhTOjZHb6+4R1e1KRMKg==} + engines: {node: '>=20.0.0'} + + '@aws-sdk/credential-provider-ini@3.973.27': + resolution: {integrity: sha512-geyao3+s46HIo8C0vyLz7cQ1qaOM1H6wrP/nNWTr5SoR4r97qlWrubi+a7Sg128KmvRZIFbwXTvkbKawBeysqg==} + engines: {node: '>=20.0.0'} + + '@aws-sdk/credential-provider-login@3.972.89': + resolution: {integrity: sha512-5kcIZkMMs6eYvU6psqZkmeWsS3EGES53S6xUJFCC6eoJak3BQCCaF8yLU1bN6LTAOr2a9RWw+m1XBGen7Jcq+Q==} + engines: {node: '>=20.0.0'} + + '@aws-sdk/credential-provider-node@3.972.94': + resolution: {integrity: sha512-qZzjRq45j0S0rI4XjHKGL63gGSFGPDYRe18Crp7l4Zk3Yr6PG4PjIixZEtsGIliOjtZ/h+ATExgjE54JQJeZMQ==} + engines: {node: '>=20.0.0'} + + '@aws-sdk/credential-provider-process@3.972.82': + resolution: {integrity: sha512-VsFOXU7gYDWqYwRis7Rif3CrE+c7xMNxp0L3XqGPuvF6JO2K93FYjhLlEphW5uEMpHEXkOOutZ5USGErgfKaog==} + engines: {node: '>=20.0.0'} + + '@aws-sdk/credential-provider-sso@3.973.26': + resolution: {integrity: sha512-IIrqv0iFNwO8Cd5EigbwILsnsvmprCAw5/BPfRvP/EiLQtBfv3PI9KpyUj2+qsJhYcpmKad+ugaS0+izle8OqQ==} + engines: {node: '>=20.0.0'} + + '@aws-sdk/credential-provider-web-identity@3.972.88': + resolution: {integrity: sha512-RmeE04naP7gWzux9l1vqNQPzuo2OkH0Ca9WDtX5Zf4NERoBLeWZNU2g1ka7aJ4Fc9fqBxBLtGL89vYEfFP1LHw==} + engines: {node: '>=20.0.0'} + + '@aws-sdk/middleware-sdk-s3@3.972.87': + resolution: {integrity: sha512-LO1E63hw8wFLOTWgS2xpMQGGAI5DUbA9OcZC9x4ADDwYwU3oqMl3jumxQq/m/5g4Pri2SN8tLaumHtynA5gU9A==} + engines: {node: '>=20.0.0'} + + '@aws-sdk/nested-clients@3.998.1': + resolution: {integrity: sha512-KPw5W6LN3waUskfDCRXRcyBEHAev5PVlMOjMq74OIivFYbgPvq39QeFege7IOFPncO425/AQK0qxdfaoeGejYQ==} + engines: {node: '>=20.0.0'} + + '@aws-sdk/s3-request-presigner@3.1165.0': + resolution: {integrity: sha512-UxiU48TtdqtpwouOYBCfkZ0T5XEggwnrSvzSAkFt57TmnW2Z5NJsmenjDopKl0jub742g90U1Ih6si8IogAv5Q==} + engines: {node: '>=20.0.0'} + + '@aws-sdk/signature-v4-multi-region@3.996.51': + resolution: {integrity: sha512-+aHvUugVBuMPXxgkPfWnTMyGdE/yWS8GHi5+qQ37HowS0YqzrbuaDLznj+Dtmtu5jgCdqz36gXmujOToUhNNWw==} + engines: {node: '>=20.0.0'} + + '@aws-sdk/signature-v4-multi-region@3.996.52': + resolution: {integrity: sha512-6W6SjGc8OXUhMzNxU1X922ghD+PP1XvzmCk5Scui0jaYsLezycMYR1RaLp5xTIOUrhTXyb4DnAbPr3fBgmdnzg==} + engines: {node: '>=20.0.0'} + + '@aws-sdk/token-providers@3.1164.0': + resolution: {integrity: sha512-9LPRWfev5QZH1EnNn9O/Y++iCRpfxrJs4EIsJuOAKYZ0DY/kZ3aOx0qWzmN1OUOd8JlUk6Mjy1tJ8b7ul5tuVw==} + engines: {node: '>=20.0.0'} + + '@aws-sdk/types@3.975.0': + resolution: {integrity: sha512-WQlhs6juByzWOzj5fwxOx0mPJaEqMcG/sDpl3Id61B3XhKE63xY+0QWcnG+sWR/sCfprmreyUo1lM7IKZmHMzw==} + engines: {node: '>=20.0.0'} + + '@aws-sdk/types@3.975.1': + resolution: {integrity: sha512-7rGxUkCB2QPoQOeJmonmAICTN2zrH+fpmi1p4Iwu72lnxNaMhOgqcbpyddifnM1DBb19TWQ1u6z/XjkaFNEDWw==} + engines: {node: '>=20.0.0'} + + '@aws-sdk/xml-builder@3.972.42': + resolution: {integrity: sha512-smX8/gNP8Kjq+CWTBMZQLQ912vOQjiWExzwzvMO+eujPB5RY8IbtF0AGdUUXHKN7KoDWK9dIcuW0WG269kiP6w==} + engines: {node: '>=20.0.0'} + + '@aws-sdk/xml-builder@3.972.43': + resolution: {integrity: sha512-rG8QVx4DOrJWptsogu1Aq+CDsnPKaBrAlJpKLxrJrIDXAq1ElnW0yQjjBnlWSXll0cDakCG6UDvaqwz0A9d9Og==} + engines: {node: '>=20.0.0'} + + '@aws/lambda-invoke-store@0.3.0': + resolution: {integrity: sha512-sl4Bm6yiMNYrZKkqqDFWN0UfnWhlS8ivKxrYl+6t0gCLrqr8y3B2IqZZbFRkfaVVp7C/baApyh71P+LeE1A2sQ==} + engines: {node: '>=18.0.0'} + + '@babel/code-frame@7.29.7': + resolution: {integrity: sha512-Aup7aUOfpbAUg2ROOJN6Iw5f9DMBlzu0mIkm/malLQFN/YQgO48wCj0Kxa3sEHJvPVFg7siR+qRInwXd2qhQKw==} + engines: {node: '>=6.9.0'} + + '@babel/compat-data@7.29.7': + resolution: {integrity: sha512-locTkQyKvwIEgBzVrn8693ebc97F2U8ZHjbXwDXJ5Fn2TCpNwTlKcaKLkdHop5c/icOFE7qt7Q9JC5hnKNa6Gg==} + engines: {node: '>=6.9.0'} + + '@babel/core@7.29.7': + resolution: {integrity: sha512-RgHBCvtjbOK2gXSNBNIkNoEc9qoVEtau3hj8gEqKQuL3HZAibKarWFEI3Lfm6EYKkLalOh8eSrj9b+ch9H/VBA==} + engines: {node: '>=6.9.0'} + + '@babel/generator@7.29.8': + resolution: {integrity: sha512-gZbepsdh3WDtgZKWL+vTPh71LSBrm/Y4/QDZBVCcYfmeTEEuoOYwlSy+G1StfJg+/Zy550u/3TATbm7qDbbMtg==} + engines: {node: '>=6.9.0'} + + '@babel/helper-compilation-targets@7.29.7': + resolution: {integrity: sha512-wem6WaBj4NaVYVdNhLPPVacES6ZJ+KBBfSkTMD3YZxbP3rm3Di85tJU5ljaUNhaOynt+Aj0xruhYuzQBt8n71g==} + engines: {node: '>=6.9.0'} + + '@babel/helper-globals@7.29.7': + resolution: {integrity: sha512-3nQVUAtvkKH9zahfWgw96Jc/uFOmjACE1kQz82E2lqWmHBgjzbNlsC22nuQTfahmWeQtTq5nQ/4Nnd2A1wj4zA==} + engines: {node: '>=6.9.0'} + + '@babel/helper-module-imports@7.29.7': + resolution: {integrity: sha512-ejHwrQQYcm9xnTivShn2IDOlIzInN34AXskvq9QicvCtEzq1Vzclu/tKF8Jq1Cg8JG2GL6/EmjgsCT7lXepE3g==} + engines: {node: '>=6.9.0'} + + '@babel/helper-module-transforms@7.29.7': + resolution: {integrity: sha512-UPUVSyXbOh627KiCIGQSgwWzGeBKLkaJ9PJEdrngIwMSzxLR4jS4+f1f1jb7VzBbg8nFLaYotvVPFCTqdrmTAg==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0 + + '@babel/helper-plugin-utils@7.29.7': + resolution: {integrity: sha512-G7sHYigPY17oO5SYWnfD/0MTBwVR781S/JI643e/JhUYgVgWE/61SoW3NH9KWUKyKq5LVh3npif99Wkt6j86Jw==} + engines: {node: '>=6.9.0'} + + '@babel/helper-string-parser@7.29.7': + resolution: {integrity: sha512-Pb5ijPrZ89GDH8223L4UP8i6QApWxs04RbPQJTeWDV0/keR2E36MeKnyr6LYmUUvqRRI+Iv87SuF1W6ErINzYw==} + engines: {node: '>=6.9.0'} + + '@babel/helper-validator-identifier@7.29.7': + resolution: {integrity: sha512-qehxGkRj55h/ff8EMaJ+cYhyaKlHIxqYDn682wQD7RNp9UujOQsHog2uS0r2vzr4pW+sXf90NeeayjcNaX3fFg==} + engines: {node: '>=6.9.0'} + + '@babel/helper-validator-option@7.29.7': + resolution: {integrity: sha512-N9ZErrD+yW5geCDtBqnOoxmR8+tNKiGuxKlDpuJxfsqpa2dFcexaziGAE/qoHLiDDreVNMupxGmSoNlyvsA3gw==} + engines: {node: '>=6.9.0'} + + '@babel/helpers@7.29.7': + resolution: {integrity: sha512-1k2lAGRMfHTcwuNYcCNUmaUffmQv8KWMfh2iJUUeRlwlwH4FdNG7mfPI10NPfLHJFThE4Tyr4mv7kTNZOiPuBg==} + engines: {node: '>=6.9.0'} + + '@babel/parser@7.29.9': + resolution: {integrity: sha512-CjXrNHTnvqBVqHgdBysY3vk2T8tpJHb5/RMeHJBTyVa9xgugCB0CJTx/3oO8RV2QRQP391RWpB7D6hLjm8V9uA==} + engines: {node: '>=6.0.0'} + hasBin: true + + '@babel/plugin-syntax-async-generators@7.8.4': + resolution: {integrity: sha512-tycmZxkGfZaxhMRbXlPXuVFpdWlXpir2W4AMhSJgRKzk/eDlIXOhb2LHWoLpDF7TEHylV5zNhykX6KAgHJmTNw==} + peerDependencies: + '@babel/core': ^7.0.0-0 + + '@babel/plugin-syntax-bigint@7.8.3': + resolution: {integrity: sha512-wnTnFlG+YxQm3vDxpGE57Pj0srRU4sHE/mDkt1qv2YJJSeUAec2ma4WLUnUPeKjyrfntVwe/N6dCXpU+zL3Npg==} + peerDependencies: + '@babel/core': ^7.0.0-0 + + '@babel/plugin-syntax-class-properties@7.12.13': + resolution: {integrity: sha512-fm4idjKla0YahUNgFNLCB0qySdsoPiZP3iQE3rky0mBUtMZ23yDJ9SJdg6dXTSDnulOVqiF3Hgr9nbXvXTQZYA==} + peerDependencies: + '@babel/core': ^7.0.0-0 + + '@babel/plugin-syntax-class-static-block@7.14.5': + resolution: {integrity: sha512-b+YyPmr6ldyNnM6sqYeMWE+bgJcJpO6yS4QD7ymxgH34GBPNDM/THBh8iunyvKIZztiwLH4CJZ0RxTk9emgpjw==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0-0 + + '@babel/plugin-syntax-import-attributes@7.29.7': + resolution: {integrity: sha512-zGYcYfq/WmZ4V+kBIXQon9dSSc8ircGZqw9ZaNhhGj9nZkeBu1jHLBDQqYYi5WA9uawvA2sIMbry2nCFhf5Djg==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0-0 + + '@babel/plugin-syntax-import-meta@7.10.4': + resolution: {integrity: sha512-Yqfm+XDx0+Prh3VSeEQCPU81yC+JWZ2pDPFSS4ZdpfZhp4MkFMaDC1UqseovEKwSUpnIL7+vK+Clp7bfh0iD7g==} + peerDependencies: + '@babel/core': ^7.0.0-0 + + '@babel/plugin-syntax-json-strings@7.8.3': + resolution: {integrity: sha512-lY6kdGpWHvjoe2vk4WrAapEuBR69EMxZl+RoGRhrFGNYVK8mOPAW8VfbT/ZgrFbXlDNiiaxQnAtgVCZ6jv30EA==} + peerDependencies: + '@babel/core': ^7.0.0-0 + + '@babel/plugin-syntax-jsx@7.29.7': + resolution: {integrity: sha512-TSu8+mHCoEaaCDEZ0I3+6mvTBYR4PCxQwf2z9/r5Tbztv6NaLR3B9thGTTxX2WGuGHJqRiAbKPeGTJ5XWXVg6A==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0-0 + + '@babel/plugin-syntax-logical-assignment-operators@7.10.4': + resolution: {integrity: sha512-d8waShlpFDinQ5MtvGU9xDAOzKH47+FFoney2baFIoMr952hKOLp1HR7VszoZvOsV/4+RRszNY7D17ba0te0ig==} + peerDependencies: + '@babel/core': ^7.0.0-0 + + '@babel/plugin-syntax-nullish-coalescing-operator@7.8.3': + resolution: {integrity: sha512-aSff4zPII1u2QD7y+F8oDsz19ew4IGEJg9SVW+bqwpwtfFleiQDMdzA/R+UlWDzfnHFCxxleFT0PMIrR36XLNQ==} + peerDependencies: + '@babel/core': ^7.0.0-0 + + '@babel/plugin-syntax-numeric-separator@7.10.4': + resolution: {integrity: sha512-9H6YdfkcK/uOnY/K7/aA2xpzaAgkQn37yzWUMRK7OaPOqOpGS1+n0H5hxT9AUw9EsSjPW8SVyMJwYRtWs3X3ug==} + peerDependencies: + '@babel/core': ^7.0.0-0 + + '@babel/plugin-syntax-object-rest-spread@7.8.3': + resolution: {integrity: sha512-XoqMijGZb9y3y2XskN+P1wUGiVwWZ5JmoDRwx5+3GmEplNyVM2s2Dg8ILFQm8rWM48orGy5YpI5Bl8U1y7ydlA==} + peerDependencies: + '@babel/core': ^7.0.0-0 + + '@babel/plugin-syntax-optional-catch-binding@7.8.3': + resolution: {integrity: sha512-6VPD0Pc1lpTqw0aKoeRTMiB+kWhAoT24PA+ksWSBrFtl5SIRVpZlwN3NNPQjehA2E/91FV3RjLWoVTglWcSV3Q==} + peerDependencies: + '@babel/core': ^7.0.0-0 + + '@babel/plugin-syntax-optional-chaining@7.8.3': + resolution: {integrity: sha512-KoK9ErH1MBlCPxV0VANkXW2/dw4vlbGDrFgz8bmUsBGYkFRcbRwMh6cIJubdPrkxRwuGdtCk0v/wPTKbQgBjkg==} + peerDependencies: + '@babel/core': ^7.0.0-0 + + '@babel/plugin-syntax-private-property-in-object@7.14.5': + resolution: {integrity: sha512-0wVnp9dxJ72ZUJDV27ZfbSj6iHLoytYZmh3rFcxNnvsJF3ktkzLDZPy/mA17HGsaQT3/DQsWYX1f1QGWkCoVUg==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0-0 + + '@babel/plugin-syntax-top-level-await@7.14.5': + resolution: {integrity: sha512-hx++upLv5U1rgYfwe1xBQUhRmU41NEvpUvrp8jkrSCdvGSnM5/qdRMtylJ6PG5OFkBaHkbTAKTnd3/YyESRHFw==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0-0 + + '@babel/plugin-syntax-typescript@7.29.7': + resolution: {integrity: sha512-ngr+82Sh0xMz25TPCZi+nC2iTzjfCdWS2ONXTp/PtSCHCgaCNBpdMqgvJ2ccdLlClVZ7sisIgB914j/JFe+RZA==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0-0 + + '@babel/template@7.29.7': + resolution: {integrity: sha512-puq+Gf35oI24FeN11LkoUQFqv9uwNeWpxXZi/Ji3rRIoKAzKnxRaZ+Gkj0vKS9ZCiTESfng1N9LyOyXvo+m+Gg==} + engines: {node: '>=6.9.0'} + + '@babel/traverse@7.29.8': + resolution: {integrity: sha512-I5z7H3bf/41ktsNVLtpN0wAa336HkqIHQ5BuPLEhTkt1jVSyZpeNKIzTgEWmlxjdg81R0IgUCcaE+Ok3NvrfZg==} + engines: {node: '>=6.9.0'} + + '@babel/types@7.29.8': + resolution: {integrity: sha512-Vj1jF3cPfxg7OAfoI7QnVKLoILlm2JF9pnVHrX8qx7AHMiYWT+NDAA7jChlNgRS4WTLc/fD1lXLmPixluj+3Gg==} + engines: {node: '>=6.9.0'} + + '@bcoe/v8-coverage@0.2.3': + resolution: {integrity: sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==} + + '@borewit/text-codec@0.2.2': + resolution: {integrity: sha512-DDaRehssg1aNrH4+2hnj1B7vnUGEjU6OIlyRdkMd0aUdIUvKXrJfXsy8LVtXAy7DRvYVluWbMspsRhz2lcW0mQ==} + + '@colors/colors@1.5.0': + resolution: {integrity: sha512-ooWCrlZP11i8GImSjTHYHLkvFDP48nS4+204nGb1RiX/WXYHmJA2III9/e2DWVabCESdW7hBAEzHRqUn9OUVvQ==} + engines: {node: '>=0.1.90'} + + '@cspotcode/source-map-support@0.8.1': + resolution: {integrity: sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==} + engines: {node: '>=12'} + + '@electric-sql/pglite-socket@0.1.3': + resolution: {integrity: sha512-LAciWM0M1dCL8hlsxu2venbVZcdxema0BtDfpWYVqr+Y468UADw0pFWidhKw1M8sfJ8rdLT71tjMmnirf/IZRQ==} + hasBin: true + peerDependencies: + '@electric-sql/pglite': 0.4.3 + + '@electric-sql/pglite-tools@0.3.3': + resolution: {integrity: sha512-AlzLJTRJ8+UFgK8CmxIpyIpJ0+YaFw02IiOSdYrqxwPXdSyeIShz8aa9Tq+tYFXdPwcaMp/Fc80mQZ1dkOQ/wg==} + peerDependencies: + '@electric-sql/pglite': 0.4.3 + + '@electric-sql/pglite@0.4.3': + resolution: {integrity: sha512-ichuWTgtd4mOM1G4SpyGJa5trT03lWbMypDV0fUXUCXg5hiHqVAz/bZyV68NqmkLB7WcYmj1RMJVSp8HV/v/ZQ==} + + '@emnapi/core@1.10.0': + resolution: {integrity: sha512-yq6OkJ4p82CAfPl0u9mQebQHKPJkY7WrIuk205cTYnYe+k2Z8YBh11FrbRG/H6ihirqcacOgl2BIO8oyMQLeXw==} + + '@emnapi/runtime@1.10.0': + resolution: {integrity: sha512-ewvYlk86xUoGI0zQRNq/mC+16R1QeDlKQy21Ki3oSYXNgLb45GV1P6A0M+/s6nyCuNDqe5VpaY84BzXGwVbwFA==} + + '@emnapi/runtime@1.11.3': + resolution: {integrity: sha512-Xz4Tpyki7XyrpbUK1jR1AhdAdaXyhhY4lZ3neLodmhpuWfy2PAQN5B46sAiU4liOXGLkHypn/qU+jvfWSCYYLA==} + + '@emnapi/wasi-threads@1.2.1': + resolution: {integrity: sha512-uTII7OYF+/Mes/MrcIOYp5yOtSMLBWSIoLPpcgwipoiKbli6k322tcoFsxoIIxPDqW01SQGAgko4EzZi2BNv2w==} + + '@fastify/accept-negotiator@2.1.0': + resolution: {integrity: sha512-F3EVbzWt+xcnVaOHmWyIlpuFtbxOln7HDZQsh09MtMmMm/CipMayNt8hnIL8VQi54u2ZociDbf+iluGYkf7B1A==} + + '@fastify/ajv-compiler@4.0.6': + resolution: {integrity: sha512-NtuzM0SfaMJbGlnjr9LWQUN5LzgSrbB8tf/wRZNas+4E1O/Nmzl53e7ruT61HDZyRCJGC6FxIogmNZO1c5ETBA==} + + '@fastify/cors@11.3.0': + resolution: {integrity: sha512-ggQGua+xHv1MvePbPr0v//xLYEsCXbWspquXCJS9Ot5YoRXq8J8ZWzHnxDBVnbtXosvistXo6LtNzOJswf64Fw==} + + '@fastify/error@4.2.0': + resolution: {integrity: sha512-RSo3sVDXfHskiBZKBPRgnQTtIqpi/7zhJOEmAxCiBcM7d0uwdGdxLlsCaLzGs8v8NnxIRlfG0N51p5yFaOentQ==} + + '@fastify/fast-json-stringify-compiler@5.1.0': + resolution: {integrity: sha512-PxcYtKLbQ8Z+yApiqjK8FwxIwvEj38k2OiLc17u8dkJSlmfi2wHHPaSnaoqBPQqtvF8YVsDgDpP2snDCfFrpfw==} + + '@fastify/formbody@9.0.0': + resolution: {integrity: sha512-T/af26CSrUARBCvsEmv+DJLPfZlrRKESzqironxP1j7qzuLyKcoZtj6MuTGShuKx1THXugoie2oFbUJxXfGFzA==} + + '@fastify/forwarded@3.0.2': + resolution: {integrity: sha512-NE8HgKLgYejV9lDpqkEFaDKMLYelJBVfHekhB0UKvX0ghagXRJqg68feg8er1NPXxG4N9i6vPxzt8E+3wHfcmA==} + + '@fastify/merge-json-schemas@0.2.1': + resolution: {integrity: sha512-OA3KGBCy6KtIvLf8DINC5880o5iBlDX4SxzLQS8HorJAbqluzLRn80UXU0bxZn7UOFhFgpRJDasfwn9nG4FG4A==} + + '@fastify/proxy-addr@5.1.1': + resolution: {integrity: sha512-zv07Y9GEuDsJPegZoDFd4SDWaZOW8N2pa0GSrYmKpId/tjt1Hgo3BjZBVjdVpfVrHaA+Qv5jawtS2O50J5xM9g==} + + '@fastify/send@4.1.1': + resolution: {integrity: sha512-BYo+EiaKwlxH+WetGk6hAs1d39iP0y1gqB8lGF/qwkJ9ZZ/cBY1vx5NvExb9Sc3yRMFjD5X4Eyh4e4+TzRkzdw==} + + '@fastify/static@10.1.4': + resolution: {integrity: sha512-YWYmXV0c3t/3DDyV32kRXJTgTY16FOkqtQ4mmBjbkWeukGR5n+Sr+7ppknNpS7hiRPrLU9zcySZZ1nLJVHTZkg==} + + '@img/colour@1.1.0': + resolution: {integrity: sha512-Td76q7j57o/tLVdgS746cYARfSyxk8iEfRxewL9h4OMzYhbW4TAcppl0mT4eyqXddh6L/jwoM75mo7ixa/pCeQ==} + engines: {node: '>=18'} + + '@img/sharp-darwin-arm64@0.35.5': + resolution: {integrity: sha512-QRUlFQ0WxvdWyqqG/WtI3iupfD5rBzmCHXSdPsY91sAtVtTo7Q4cb6zOccZ3gqEqkr0f1As1ehLqmEpDsRf+lg==} + engines: {node: '>=20.9.0'} + cpu: [arm64] + os: [darwin] + + '@img/sharp-darwin-x64@0.35.5': + resolution: {integrity: sha512-+BR255RhDlpygUpOc/Jdt1nT6DQ3XG/ERo5wbcdOf5Q320dKtPCKPLR1LJs9VGXRaMa8l1uUa0tkCNOXiAxZUw==} + engines: {node: '>=20.9.0'} + cpu: [x64] + os: [darwin] + + '@img/sharp-freebsd-wasm32@0.35.5': + resolution: {integrity: sha512-Y/z91nEZ4uIBX5X3nfTovjU9lHNKFYbL2lpHCLVNmXQK03VIZvXBBt0KxbPGp2SdGSF+2mQU4e+hQaWOt86iAw==} + engines: {node: '>=20.9.0'} + os: [freebsd] + + '@img/sharp-libvips-darwin-arm64@1.3.4': + resolution: {integrity: sha512-5R89nBYiRdUlSWJxPhO+GVtaXzXSxKnRu/xqMn3KTA3L9EB9Oy/P+Nn2f2vlhPuUdy/Zusb2DarbyTpGCfEDuw==} + cpu: [arm64] + os: [darwin] + + '@img/sharp-libvips-darwin-x64@1.3.4': + resolution: {integrity: sha512-iR2OKH80yi0U+dUplyh3/xdpFvps6YkCwsXenIJxqxR1v9o+xtKTGbS9H7cps+2Vxjc8B1j96p75NmTGjIhtpQ==} + cpu: [x64] + os: [darwin] + + '@img/sharp-libvips-linux-arm64@1.3.4': + resolution: {integrity: sha512-Y3dgX/6lE2QhQb+Gxy0WZxfg9MEm/JBjamZpS2IklP7xIQoKN4hzAm7KcMVGtaVDt3neE9OKBC7vAfonA/Lr1A==} + cpu: [arm64] + os: [linux] + + '@img/sharp-libvips-linux-arm@1.3.4': + resolution: {integrity: sha512-LmRtTsOHuvM2+wlO2Db37dx5MiZhB0FvSunciw48YjdOkZz9KAiRbm8ujeMOA1INqmei5NapFxYEK1D1ZSidmw==} + cpu: [arm] + os: [linux] + + '@img/sharp-libvips-linux-ppc64@1.3.4': + resolution: {integrity: sha512-Le6boB8Tai0Nis+gIxIpKx68UDVVIqdR8Tin5Yf1z2LJJQLDJvCDRqRu+jC2qCoD+eIomonmOwB4smBRxfVpYQ==} + cpu: [ppc64] + os: [linux] + + '@img/sharp-libvips-linux-riscv64@1.3.4': + resolution: {integrity: sha512-aHkkIEHPRdQEegJN20MLmGtxYD9R2wQr3Cwpddnu5+YKMt6Uzax7S9h5gpZTo8wyrGuZSlfQ63OevL5mTyOC7Q==} + cpu: [riscv64] + os: [linux] + + '@img/sharp-libvips-linux-s390x@1.3.4': + resolution: {integrity: sha512-ra/mB6MikESDUO7Yg+Mi95bFBb9GsObURuhnOv3OqknjGe9sZrG8tCe9q0xSIGrtLgvgw0gKnFWcK4blSgQOuQ==} + cpu: [s390x] + os: [linux] + + '@img/sharp-libvips-linux-x64@1.3.4': + resolution: {integrity: sha512-GJ//SSXbnwSDes02umB3nDJLFcQzw8a18V8fyhqr6tV515tOEMdImjjxj1AoafMRz56F3PHgftnj1QEKSU1zkw==} + cpu: [x64] + os: [linux] + + '@img/sharp-libvips-linuxmusl-arm64@1.3.4': + resolution: {integrity: sha512-hvulFwtjUcagsis6BBxHwGFwWoNZjgYmULGVrZcyfNbjA8hKILbRxGg15/7w5HDyXHXUos/j6baAWqnCyQ2DWA==} + cpu: [arm64] + os: [linux] + + '@img/sharp-libvips-linuxmusl-x64@1.3.4': + resolution: {integrity: sha512-6zXKeE/p39I1AmA3cJG35eyBGNqNddLnUXjhwBnsGjFPWqf5VKkDBEqaEkPDoTEtkxwi2vv8Tcr2mDyP4So7Fg==} + cpu: [x64] + os: [linux] + + '@img/sharp-linux-arm64@0.35.5': + resolution: {integrity: sha512-LYVx5JTsOM2CBzmxreh+nl64/3H6Xb09iSLknqH47z2T2DFFxDeFLP5y4dJwe6H7uGQlHPyEEtIqyo3DYsRwdQ==} + engines: {node: '>=20.9.0'} + cpu: [arm64] + os: [linux] + + '@img/sharp-linux-arm@0.35.5': + resolution: {integrity: sha512-LEaXK2WdXVK5ykcw0buWyPMsmLLL2vpHLD6yrNSW+JGEL3BZPA4tpKN6iaMc4AxTTAoaX/sU1rOL51lcIz48ZQ==} + engines: {node: '>=20.9.0'} + cpu: [arm] + os: [linux] + + '@img/sharp-linux-ppc64@0.35.5': + resolution: {integrity: sha512-QVxAAq8evVRI9ia2vqgwrmWucn5Dfv+JdWzj75pD8omHLPSP7f8p20O8jxzjCcuCEQEOtYOZUmX1hkiZ0kdevA==} + engines: {node: '>=20.9.0'} + cpu: [ppc64] + os: [linux] + + '@img/sharp-linux-riscv64@0.35.5': + resolution: {integrity: sha512-LtdreXguaavKODPIfzJ4kffx7UNt1omwtK0rch4EBbbSTXPnxWmYSayXdLJw0fJzQ97kHt1gL/yh4tvU+nCyRQ==} + engines: {node: '>=20.9.0'} + cpu: [riscv64] + os: [linux] + + '@img/sharp-linux-s390x@0.35.5': + resolution: {integrity: sha512-UZasTOFiYzotTsGOCu42BfUzP6Tu6Do/947iRm1RsLKvlllxwGcn4RN27LibGWceix4Y+Pmw3jsnTcCQIgWjqA==} + engines: {node: '>=20.9.0'} + cpu: [s390x] + os: [linux] + + '@img/sharp-linux-x64@0.35.5': + resolution: {integrity: sha512-SxFtLTeJInhAA9Q836kux2vZNeOBQEx658qvbboZScr0wIARym3IcGmW7KpVD5sbVg0Ojy+udFQdayYIZyoNog==} + engines: {node: '>=20.9.0'} + cpu: [x64] + os: [linux] + + '@img/sharp-linuxmusl-arm64@0.35.5': + resolution: {integrity: sha512-9HbMclmI1zlNkFRs3z9/eBtDjfD0sGlrX1z6b1qwmiFY5ElDLh4BC0LPBdVp7z1DXFiKlIcznf+ZlsuZzLxQqg==} + engines: {node: '>=20.9.0'} + cpu: [arm64] + os: [linux] + + '@img/sharp-linuxmusl-x64@0.35.5': + resolution: {integrity: sha512-4KOphqB035HrVdqLZfCgMzzERrQkkzOwRhl4OAkRO1YCldbaFjySXMaK534Mo0V+LndnlJk+sbUyLeU0ULyD1A==} + engines: {node: '>=20.9.0'} + cpu: [x64] + os: [linux] + + '@img/sharp-wasm32@0.35.5': + resolution: {integrity: sha512-Ptsga1su4tQx+LLF1ECS9U6nz5kmrXKo6XVbtR48Ke3ZRxxgaWBu7IDtEe1quo8hiupwm6WFqxVlXaSf7IINGQ==} + engines: {node: '>=20.9.0'} + + '@img/sharp-webcontainers-wasm32@0.35.5': + resolution: {integrity: sha512-hfhF/FmoQyTUkA0bIKFOtw536BQSeBMe6BF6QyWlrPxT754+TFLaZ7sKKTfvvM0yJgKgaYTwnFCIZ/GuDw5SUA==} + engines: {node: '>=20.9.0'} + cpu: [wasm32] + + '@img/sharp-win32-arm64@0.35.5': + resolution: {integrity: sha512-X4t7g+7ZA5DKblCBEXGjUqqemj4vczING/5viFwAL8h4N3qYeyjwdCvRLHi4EdOUI+2Z7UFlp1VM+p/AuEtm6Q==} + engines: {node: '>=20.9.0'} + cpu: [arm64] + os: [win32] + + '@img/sharp-win32-ia32@0.35.5': + resolution: {integrity: sha512-5Zm82LoBc43nhwNybZlG7Y1KO//Zhsn306fQl29ZOuStHLGTo3BWL83q3cznX0poxSAMuYL1On/BHBxkBeKr6A==} + engines: {node: ^20.9.0} + cpu: [ia32] + os: [win32] + + '@img/sharp-win32-x64@0.35.5': + resolution: {integrity: sha512-x76eH0vEiHlcMQu8Y8IenntaACtddpT6W0wmXtWrnKcnKI7ME5DdgqhAD6SEWOEl1v2zDvkZDhFA9KnURwpfqg==} + engines: {node: '>=20.9.0'} + cpu: [x64] + os: [win32] + + '@inquirer/ansi@2.0.8': + resolution: {integrity: sha512-WpQM+Ti6Z40EFwwt+uL2p4UabT+W179zHp6HhLVOzfbwnVn05IPO/eXIZXGNqcT1jbQ15SujNLzQ39k4QPPxBQ==} + engines: {node: '>=23.5.0 || ^22.13.0 || ^20.17.0'} + + '@inquirer/checkbox@5.2.5': + resolution: {integrity: sha512-bRt8J8m+Fot9CXv+zNQGXUq2ET0MggR1fPz7v6edN6MFYmsbfGnMmkmWZJEegMKqrAC8ej/o1sqisHZXZJMAfQ==} + engines: {node: '>=23.5.0 || ^22.13.0 || ^20.17.0'} + peerDependencies: + '@types/node': '>=18' + peerDependenciesMeta: + '@types/node': + optional: true + + '@inquirer/confirm@6.3.2': + resolution: {integrity: sha512-Xvr/0HggjddPtGppuqVmxhTw+Hr8PvsZ/k0HmOEaAqQEt80OITNkFWnsdNmyT0/eM4Ab+iJLx2R8rctlEyfSVg==} + engines: {node: '>=23.5.0 || ^22.13.0 || ^20.17.0'} + peerDependencies: + '@types/node': '>=18' + peerDependenciesMeta: + '@types/node': + optional: true + + '@inquirer/core@12.0.3': + resolution: {integrity: sha512-wsSy0sznmXwkty+2PzZwx00Cazc/E0r0B7mAzdGROz2Ct+DFZXaK7WDjGZvgjRldxH5ZhFVfF2lgkYrqgOw2KA==} + engines: {node: '>=23.5.0 || ^22.13.0 || ^20.17.0'} + peerDependencies: + '@types/node': '>=18' + peerDependenciesMeta: + '@types/node': + optional: true + + '@inquirer/editor@5.3.3': + resolution: {integrity: sha512-YsKkS2q63IiLtaDK/9nqzdComN97SDQrmKiyNggN+ceP4ty+Z6VwyTz3FpjeUWeW1Efss2xHFKCC9sx7hnrsxg==} + engines: {node: '>=23.5.0 || ^22.13.0 || ^20.17.0'} + peerDependencies: + '@types/node': '>=18' + peerDependenciesMeta: + '@types/node': + optional: true + + '@inquirer/expand@5.1.5': + resolution: {integrity: sha512-uHuXLmXW+TtIfT/9vSBotypAkqn1n34Ul+CLGPos/xANyO4Ff5xZzkYhbKR4NEcfVK4a9mHQOpwVZzluSHFRGw==} + engines: {node: '>=23.5.0 || ^22.13.0 || ^20.17.0'} + peerDependencies: + '@types/node': '>=18' + peerDependenciesMeta: + '@types/node': + optional: true + + '@inquirer/external-editor@3.0.5': + resolution: {integrity: sha512-f3QQJRIX5ZEneBHNUIuPjmbdzHnmRFJA8r2dkcb8q+OM5Uv5KtnuAttQumnrjcBVBM3mcTX1CkmtAkU58VRZxg==} + engines: {node: '>=23.5.0 || ^22.13.0 || ^20.17.0'} + peerDependencies: + '@types/node': '>=18' + peerDependenciesMeta: + '@types/node': + optional: true + + '@inquirer/figures@2.0.9': + resolution: {integrity: sha512-EAWgUTGQ/Umgga51dE3B2PUHbufuXarDfg86uVgoSgNHNNQnyFKcOrQLWVqYMghuSyHh8+2HUH0Js9cTC1WAdg==} + engines: {node: '>=23.5.0 || ^22.13.0 || ^20.17.0'} + + '@inquirer/input@5.1.6': + resolution: {integrity: sha512-HtcJhB2QFVXbLuJ5S3syhNbTUVxYvwqV4VRBDkQceBloC9bmTViUoRFP5PbSaDZb3HzfPmpuU/gG4ybVBz4FHA==} + engines: {node: '>=23.5.0 || ^22.13.0 || ^20.17.0'} + peerDependencies: + '@types/node': '>=18' + peerDependenciesMeta: + '@types/node': + optional: true + + '@inquirer/number@4.2.3': + resolution: {integrity: sha512-6Yuwh1NGSbu1Lo4N1EWjXs1jKRntLg/ZCwhmeorEHde90v1XxAozdbd4Iu30eOQLW+6h1hp2O9ujNfLSbTPJnA==} + engines: {node: '>=23.5.0 || ^22.13.0 || ^20.17.0'} + peerDependencies: + '@types/node': '>=18' + peerDependenciesMeta: + '@types/node': + optional: true + + '@inquirer/password@5.2.2': + resolution: {integrity: sha512-W9zYdyzogK+6110mqwaSJWCBu2yA5Q/OfnGSjjZB1bNpHlmUozXxTl0+QOZBNeVd6Qo81/qT75gW05gLAtITxw==} + engines: {node: '>=23.5.0 || ^22.13.0 || ^20.17.0'} + peerDependencies: + '@types/node': '>=18' + peerDependenciesMeta: + '@types/node': + optional: true + + '@inquirer/prompts@8.5.2': + resolution: {integrity: sha512-IYR/3C/paEVVQYQvdDlFZVjRCJVYHHON0XXMH91KO9GSxs0TdKYWlUdvfQl2EfAHDxUaN3IBffkE/BDTh5nJ6g==} + engines: {node: '>=23.5.0 || ^22.13.0 || ^20.17.0'} + peerDependencies: + '@types/node': '>=18' + peerDependenciesMeta: + '@types/node': + optional: true + + '@inquirer/prompts@8.7.2': + resolution: {integrity: sha512-QoRB4wFIjgH5iOhSjoIKMkTvSHDuV+O3OITlIqAYO0oK5x364GJILXiMBvlPiE+klg7Xx9tq5XVqQHcGUDYYPA==} + engines: {node: '>=23.5.0 || ^22.13.0 || ^20.17.0'} + peerDependencies: + '@types/node': '>=18' + peerDependenciesMeta: + '@types/node': + optional: true + + '@inquirer/rawlist@5.3.5': + resolution: {integrity: sha512-1oHky1ONfCOwNrnkQGDE1oaSij/3fI6HFMSf2H/WsGO2lEyDX9My82iggITSy9ddSZ8yk8j9v41OI0fVoSIoaA==} + engines: {node: '>=23.5.0 || ^22.13.0 || ^20.17.0'} + peerDependencies: + '@types/node': '>=18' + peerDependenciesMeta: + '@types/node': + optional: true + + '@inquirer/search@4.3.3': + resolution: {integrity: sha512-fyuIU1Nbpvwlikjg3gXwJFDI11+EFjqQ7P+iByfmivIKQ1vmaykNrD/vy5unHuUqUpsOsnvJ25//tPF7E/RBRA==} + engines: {node: '>=23.5.0 || ^22.13.0 || ^20.17.0'} + peerDependencies: + '@types/node': '>=18' + peerDependenciesMeta: + '@types/node': + optional: true + + '@inquirer/select@5.2.5': + resolution: {integrity: sha512-9kc15hr8r/kI+3DO/xLog5nOzTz1jqsHXa6JBFzmQKhkoJ8Slda1I1L/uD8ZSZ9tF1yp79wwXe7mclvX1rqR2Q==} + engines: {node: '>=23.5.0 || ^22.13.0 || ^20.17.0'} + peerDependencies: + '@types/node': '>=18' + peerDependenciesMeta: + '@types/node': + optional: true + + '@inquirer/type@4.1.1': + resolution: {integrity: sha512-yJoHYrMnxIsJZCY+0Vb66Dy3he3kL3e2wOBKhoSwWWAzZAY82emlxwgprCtp6yRixvNRNq9ztfRWQYPNr3Go7A==} + engines: {node: '>=23.5.0 || ^22.13.0 || ^20.17.0'} + peerDependencies: + '@types/node': '>=18' + peerDependenciesMeta: + '@types/node': + optional: true + + '@ioredis/commands@2.0.0': + resolution: {integrity: sha512-vrx0AE/T0h7cRZwfo1M39Cr+ZhZrkf0V8mQN75wucKCxCLD9l/VX6no3gFvrLqD1IlG/1LtzWovqEw3t0Vr9zg==} + + '@isaacs/cliui@8.0.2': + resolution: {integrity: sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==} + engines: {node: '>=12'} + + '@istanbuljs/load-nyc-config@1.1.0': + resolution: {integrity: sha512-VjeHSlIzpv/NyD3N0YuHfXOPDIixcA1q2ZV98wsMqcYlPmv2n3Yb2lYP9XMElnaFVXg5A7YLTeLu6V84uQDjmQ==} + engines: {node: '>=8'} + + '@istanbuljs/schema@0.1.6': + resolution: {integrity: sha512-+Sg6GCR/wy1oSmQDFq4LQDAhm3ETKnorxN+y5nbLULOR3P0c14f2Wurzj3/xqPXtasLFfHd5iRFQ7AJt4KH2cw==} + engines: {node: '>=8'} + + '@jest/console@30.5.2': + resolution: {integrity: sha512-e8sQC4pCMHPBrPX7Hk8TJr+DM5dkUnImSTNag8SEWFAFAF6xIz4AJvCKapnrdHnZxep4bxw4PhG+ZbimYBMyKw==} + engines: {node: ^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0} + + '@jest/core@30.5.2': + resolution: {integrity: sha512-/jqvFWoJF7LV1a6AUpYMbMm+2yIYsHJfR474H0SCzr9k8tnO/jl9wRg6zSG6lxgf6EozNlCG4amFzWsbZSvvZA==} + engines: {node: ^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0} + peerDependencies: + node-notifier: ^8.0.1 || ^9.0.0 || ^10.0.0 + peerDependenciesMeta: + node-notifier: + optional: true + + '@jest/diff-sequences@30.5.0': + resolution: {integrity: sha512-OsqBjHXCn8cadasoAZBP6nWYvMsRhpMzGXTpxJ5aO04NlbdhIz+FVe3q49l0AwVhsz/cEmIpBes6gAFl1/dWQg==} + engines: {node: ^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0} + + '@jest/environment@30.5.2': + resolution: {integrity: sha512-nwFPOUMbmsjNNRCpnJpB9HbSZu4C07wDDds++5j+j1MezzPLxMPDdbdUVjr2o4RULDOValnDd70taPFI1EtxAg==} + engines: {node: ^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0} + + '@jest/expect-utils@30.5.2': + resolution: {integrity: sha512-d/HOLSrJUlBIl6n3LzOa7cjW3xdePm5H5gQw2lixZ/0h157l9sw3mLblzFqnPcTbhDzhRQdBOX3A3KcG73nm5Q==} + engines: {node: ^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0} + + '@jest/expect@30.5.2': + resolution: {integrity: sha512-2E+1Pg6jJxbRjLNLpciC71iri/3qsKJL222/aXJEFwC0VdUSvfS+JZQQLEVjUYYc8t8pQu2MGE3cF2+bNTYRsg==} + engines: {node: ^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0} + + '@jest/fake-timers@30.5.2': + resolution: {integrity: sha512-GKk0h0tKT5SpDPxDhPg3r9mm5s8/YCBzVNMOGdRiQXwUiMsjU10mVPlMaQstH6/cu50vOb8N9oQUMETHuwwxKw==} + engines: {node: ^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0} + + '@jest/get-type@30.5.0': + resolution: {integrity: sha512-9/2VUPitAjmBzbvDvqrxmvB7BzWsBW0WmkkojX1ODuxX1NLGxx9gfaZpHB0z8DtJ9uhGNmZG/VXBhf8uO0OV8Q==} + engines: {node: ^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0} + + '@jest/globals@30.5.2': + resolution: {integrity: sha512-62zfS+dL+M5aTNHXCNLyqD+j4oqxTIzDYrZbpqMP8Yn+gvlAGyzC6BSPNb1ZmFOakV1RtFYX/O3FCQXSWmQdgg==} + engines: {node: ^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0} + + '@jest/pattern@30.5.0': + resolution: {integrity: sha512-HdNQYSdRTEBNrginaqzQtTjG0HRMfrra/z6Ok7uL3S87vSlarIVohEsJsSj5edu3MiHoHjAkvPROz5ZjoKai+w==} + engines: {node: ^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0} + + '@jest/reporters@30.5.2': + resolution: {integrity: sha512-ev6E9iG73twQcfAfoTnviuYkr3yOrYbzAtMFCimv2fxHXPIp9PBt2u1wNMt0aYWgl8FPwIcS8oqRJg6alnht4Q==} + engines: {node: ^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0} + peerDependencies: + node-notifier: ^8.0.1 || ^9.0.0 || ^10.0.0 + peerDependenciesMeta: + node-notifier: + optional: true + + '@jest/schemas@30.5.0': + resolution: {integrity: sha512-/hunigyNpc4RCjC0VaW3f5RCUZVM2+WQ65qP7z083Gmvac7or2LI50XVNOtE4YPgBpV0yxYiAgorAPGniCoJmg==} + engines: {node: ^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0} + + '@jest/snapshot-utils@30.5.1': + resolution: {integrity: sha512-V3wnxNtiVmw5PPVg433Cn3VdXnsOeu/ofLw3KC04Bn2y1wIlU5kozXQn48rhrgj/02LrCVtntTEF1yBha0XSUw==} + engines: {node: ^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0} + + '@jest/source-map@30.5.2': + resolution: {integrity: sha512-c5CehvkbfHX6yyNg7bMn2ylqlp9AHXuZ/3hPH/Lh5bxD/vefd/lV9HBjMqXef9yQNqkdwyZvkLSVSwB38hy8Qw==} + engines: {node: ^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0} + + '@jest/test-result@30.5.2': + resolution: {integrity: sha512-eO6YU5rsLfs60ne694e0IAmRgeBnoA8mu0nlxXDbl/1j5km0o2vO9/VbbUIKIH+WRKKEI+ELgwraRGn2Lhep8g==} + engines: {node: ^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0} + + '@jest/test-sequencer@30.5.2': + resolution: {integrity: sha512-bmij8jZyYAC47ExT2GeP7PcrlwSNS+Bp3KeRuBH88gpcxqDv6fljN8PemS4J/lLZ79xb6mpaennQTTq0zUAVVg==} + engines: {node: ^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0} + + '@jest/transform@30.5.2': + resolution: {integrity: sha512-LBGwmaE886C41jDZ65eqR1YbXM7642MK3ZhTowZd5+xDlrDLuf4ePuDdDmVSvcr8NTVJ3MqxLkMbUCzuigUaoQ==} + engines: {node: ^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0} + + '@jest/types@30.5.1': + resolution: {integrity: sha512-LvVYn83nnXPl+Rg98nvcFgjx6nRMTArhSn6RAX/w3ELn54S8A42TYZvsCMdGUqTM8S0wyXbtlQdU6Hi6dykj9g==} + engines: {node: ^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0} + + '@jridgewell/gen-mapping@0.3.13': + resolution: {integrity: sha512-2kkt/7niJ6MgEPxF0bYdQ6etZaA+fQvDcLKckhy1yIQOzaoKjBBjSj63/aLVjYE3qhRt5dvM+uUyfCg6UKCBbA==} + + '@jridgewell/remapping@2.3.5': + resolution: {integrity: sha512-LI9u/+laYG4Ds1TDKSJW2YPrIlcVYOwi2fUC6xB43lueCjgxV4lffOCZCtYFiH6TNOX+tQKXx97T4IKHbhyHEQ==} + + '@jridgewell/resolve-uri@3.1.2': + resolution: {integrity: sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==} + engines: {node: '>=6.0.0'} + + '@jridgewell/source-map@0.3.11': + resolution: {integrity: sha512-ZMp1V8ZFcPG5dIWnQLr3NSI1MiCU7UETdS/A0G8V/XWHvJv3ZsFqutJn1Y5RPmAPX6F3BiE397OqveU/9NCuIA==} + + '@jridgewell/sourcemap-codec@1.6.0': + resolution: {integrity: sha512-T7jf+5zgsZHwNJ4lvQ7/aezbyk0nNX+zJVWpmHA7VYsEx7a7qr5Rg5IbtJFqkgze5Y2sruq1RUY8Q837Od7iFw==} + + '@jridgewell/trace-mapping@0.3.31': + resolution: {integrity: sha512-zzNR+SdQSDJzc8joaeP8QQoCQr8NuYx2dIIytl1QeBEZHJ9uW6hebsrYgbz8hJwUQao3TWCMtmfV8Nu1twOLAw==} + + '@jridgewell/trace-mapping@0.3.9': + resolution: {integrity: sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==} + + '@lukeed/csprng@1.1.0': + resolution: {integrity: sha512-Z7C/xXCiGWsg0KuKsHTKJxbWhpI3Vs5GwLfOean7MGyVFGqdRgBbAjOCh6u4bbjPc/8MJ2pZmK/0DLdCbivLDA==} + engines: {node: '>=8'} + + '@lukeed/ms@2.0.2': + resolution: {integrity: sha512-9I2Zn6+NJLfaGoz9jN3lpwDgAYvfGeNYdbAIjJOqzs4Tpc+VU3Jqq4IofSUBKajiDS8k9fZIg18/z13mpk1bsA==} + engines: {node: '>=8'} + + '@microsoft/tsdoc@0.16.0': + resolution: {integrity: sha512-xgAyonlVVS+q7Vc7qLW0UrJU7rSFcETRWsqdXZtjzRU8dF+6CkozTK4V4y1LwOX7j8r/vHphjDeMeGI4tNGeGA==} + + '@napi-rs/wasm-runtime@1.2.4': + resolution: {integrity: sha512-AJxoUD2/15ESHbvpcyjU274nsAPLuOtPHCk0vKJM5pj//Fg/B1FXNWjPnXTT9PymCYYiHo4zPj0ZomXBKhoy7g==} + engines: {node: ^20.19.0 || ^22.13.0 || >=23.5.0} + peerDependencies: + '@emnapi/core': ^1.7.1 || ^2.0.0-alpha.4 + '@emnapi/runtime': ^1.7.1 || ^2.0.0-alpha.4 + + '@nestjs/cli@12.0.3': + resolution: {integrity: sha512-HofsPoiWsx6gZ7/IivaZJrgsq/3CTCb4FkCQzFu/Q3J2V+4xC7GYnit/HNB66EfuY8j3gWJCzasMKmF5VugmOA==} + engines: {node: '>= 20.11'} + hasBin: true + peerDependencies: + '@rspack/core': ^1.7.7 || ^2.1.10 + '@swc/cli': ^0.8.0 + '@swc/core': ^1.15.18 + fork-ts-checker-webpack-plugin: ^9.1.0 + ts-loader: ^9.5.4 + tsconfig-paths-webpack-plugin: ^4.2.0 + webpack: ^5.105.4 + webpack-node-externals: ^3.0.0 + peerDependenciesMeta: + '@rspack/core': + optional: true + '@swc/cli': + optional: true + '@swc/core': + optional: true + fork-ts-checker-webpack-plugin: + optional: true + ts-loader: + optional: true + tsconfig-paths-webpack-plugin: + optional: true + webpack: + optional: true + webpack-node-externals: + optional: true + + '@nestjs/common@12.0.4': + resolution: {integrity: sha512-maEf5KhcQMCXQW9/SsLDDoFO0l73sbwBmiaCRrkqrFHyNG9ekN8CoYbzcvlboNKgiydWx8pogoFnuOEl8+7+tw==} + peerDependencies: + class-transformer: '>=0.4.1' + class-validator: '>=0.13.2' + reflect-metadata: ^0.1.12 || ^0.2.0 + rxjs: ^7.1.0 + peerDependenciesMeta: + class-transformer: + optional: true + class-validator: + optional: true + + '@nestjs/core@12.0.4': + resolution: {integrity: sha512-3jd8RaYxYAs8OxjHdTOgxmS9vUm3I9JFnRrgBxdQAVbHjyRx/QYiGnuVCmuUBm4AOHPMij/I74xfg8En3Erm7A==} + engines: {node: '>= 20'} + peerDependencies: + '@nestjs/common': ^12.0.0 + '@nestjs/microservices': ^12.0.0 + '@nestjs/platform-express': ^12.0.0 + '@nestjs/websockets': ^12.0.0 + reflect-metadata: ^0.1.12 || ^0.2.0 + rxjs: ^7.1.0 + peerDependenciesMeta: + '@nestjs/microservices': + optional: true + '@nestjs/platform-express': + optional: true + '@nestjs/websockets': + optional: true + + '@nestjs/mapped-types@12.0.0': + resolution: {integrity: sha512-aX7lxZcqXldtnSr0bgT2ZPQvpTpIwBMW1GMX29o4s3q02vmq6JoTYuPW0GwYXa8BiFMRX7WbGZVDA703pNqOMQ==} + engines: {node: '>=20.19.0'} + peerDependencies: + '@nestjs/common': ^10.0.0 || ^11.0.0 || ^12.0.0 + class-transformer: ^0.4.0 || ^0.5.0 + class-validator: ^0.13.0 || ^0.14.0 || ^0.15.0 + reflect-metadata: ^0.1.12 || ^0.2.0 + peerDependenciesMeta: + class-transformer: + optional: true + class-validator: + optional: true + + '@nestjs/mau@0.2.8': + resolution: {integrity: sha512-nIb0i3c/KhKEbxZfYMEKv9Mcvk5miBdZcexnvkgnAUhoMO2BUjOGT+Khf2cZzu7B51Y7v01NG2JVl/HdQEUQ6w==} + engines: {node: '>= 20.0.0'} + hasBin: true + + '@nestjs/platform-express@12.0.4': + resolution: {integrity: sha512-oL6zHjeMeqwKoAlY1Y+bpCfFy6Yat6wfWnmcTgp7IE3A6TAftu6Vgu/eRi9VY5bErw4dMcYGtzvxvKP1QXr8JA==} + peerDependencies: + '@nestjs/common': ^12.0.0 + '@nestjs/core': ^12.0.0 + + '@nestjs/platform-fastify@12.0.1': + resolution: {integrity: sha512-LqR0kOahuZAei3wJK+SJfHc9o9H/OSdA7gMSMaW+Kfjy6GtpTNPdfpHeq3w2PuiPgUGk2QIX/dqUAYntJ5arSw==} + peerDependencies: + '@fastify/static': ^10.1.2 + '@fastify/view': ^10.0.0 || ^11.0.0 || ^12.0.0 + '@nestjs/common': ^12.0.0 + '@nestjs/core': ^12.0.0 + peerDependenciesMeta: + '@fastify/static': + optional: true + '@fastify/view': + optional: true + + '@nestjs/schematics@12.0.4': + resolution: {integrity: sha512-iUQkaQKoKmcUgu0TZQwDnlHXs8RgeIf3Tzay6s8lfANtmu/3SQZFzg7eXbB/I2iN4I/nnngQb2Pnr3mqQRW7kw==} + engines: {node: ^22.22.3 || ^24.15.0 || >=26.0.0} + peerDependencies: + prettier: ^3.0.0 + typescript: '>=6.0.0' + peerDependenciesMeta: + prettier: + optional: true + + '@nestjs/swagger@12.0.1': + resolution: {integrity: sha512-fQ0WyutSSHedO9HzSkOFKFaRygYNGBno5EggcZljs+KL8tHzPPTO5oyJpaf3BoOKFGGsN/0B13EbIpH2pkPx8g==} + engines: {node: ^20.19.0 || >=22.12.0} + peerDependencies: + '@fastify/static': ^8.0.0 || ^9.0.0 || ^10.0.0 + '@nestjs/common': ^12.0.0 + '@nestjs/core': ^12.0.0 + class-transformer: '*' + class-validator: '*' + reflect-metadata: ^0.1.12 || ^0.2.0 + peerDependenciesMeta: + '@fastify/static': + optional: true + class-transformer: + optional: true + class-validator: + optional: true + + '@nestjs/testing@12.0.4': + resolution: {integrity: sha512-cL1vfg0VyEd1cHEge6gcppLsptYiCYRxjseuvelIX++ddgzeg9hIQQdg0sT7CJrBIJxI1dt6+7PW6NHbl3laYQ==} + peerDependencies: + '@nestjs/common': ^12.0.0 + '@nestjs/core': ^12.0.0 + '@nestjs/microservices': ^12.0.0 + '@nestjs/platform-express': ^12.0.0 + peerDependenciesMeta: + '@nestjs/microservices': + optional: true + '@nestjs/platform-express': + optional: true + + '@noble/hashes@1.8.0': + resolution: {integrity: sha512-jCs9ldd7NwzpgXDIf6P3+NrHh9/sD6CQdxHyjQI+h/6rDNo88ypBxxz45UDuZHz9r3tNz7N/VInSVoVdtXEI4A==} + engines: {node: ^14.21.3 || >=16} + + '@oxlint-tsgolint/darwin-arm64@7.0.2002': + resolution: {integrity: sha512-E3yYb/tI+5M3SqGgKwrwUD0nmjA2FMGD1xFbma46qi8Y7+nPTlGY6bZk/hqxijc9Vda/tdtUxQ2d5zGIEX9qlg==} + cpu: [arm64] + os: [darwin] + + '@oxlint-tsgolint/darwin-x64@7.0.2002': + resolution: {integrity: sha512-qEaMySdvzs8faaJwMO4dFtPFCa+degFCz+HbkFQ0REcIJqJ16KmC0smt30FAI9TeEHCoAtz6sU/6acJvi4uaxg==} + cpu: [x64] + os: [darwin] + + '@oxlint-tsgolint/linux-arm64@7.0.2002': + resolution: {integrity: sha512-bqPObCNIR6tDQSc0Xn9Nu7EfWRXFB+qFzADRl/q6YA8zT9YUg3pGUbmicV2hV91uLpiot74so9ocGjx35SaX6w==} + cpu: [arm64] + os: [linux] + + '@oxlint-tsgolint/linux-x64@7.0.2002': + resolution: {integrity: sha512-E5CcRALAYdiQMbdYjEqlLOiYuEdt21RtXiyxIoD8bfypdfkpWppacijKOR4i0DtLXFRVwCGQggZBWk5bOIpU1A==} + cpu: [x64] + os: [linux] + + '@oxlint-tsgolint/win32-arm64@7.0.2002': + resolution: {integrity: sha512-L+ul0ZFDiz/ZmTwCQ1J/qS7S6s45ktiaFqb+ZIzx+1sSdtdRxm8/H0+p4VDQYrCKBFzKNb6VjUlm48bNEe3BUg==} + cpu: [arm64] + os: [win32] + + '@oxlint-tsgolint/win32-x64@7.0.2002': + resolution: {integrity: sha512-zkZeJfo4UmYiCzj77u85eCDpdxOiQiSAsV6j9Pvj5e7Vu5+MvwLtK1xmVutE77tJmUJ3eBOSXHR6WgY4AwHHGQ==} + cpu: [x64] + os: [win32] + + '@oxlint/binding-android-arm-eabi@1.83.0': + resolution: {integrity: sha512-0yGY24EwsLk5YDe6F+VkmZyRHSwJDALa3nIrPpq7FXmp2lV2d0TzvBCGeZk+wgiULRGr5blhyr4QMp5KCXJUqA==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm] + os: [android] + + '@oxlint/binding-android-arm64@1.83.0': + resolution: {integrity: sha512-hHfJ0vc17A4iUjH5p9BsTUPYbYRNxGpvD2lbu1aBRk54bzNIx9o5TtYF39QPZcV95DagZd+4DEAw2RH3G2ZsMg==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm64] + os: [android] + + '@oxlint/binding-darwin-arm64@1.83.0': + resolution: {integrity: sha512-hsOjYjszLb/3zym/TkzUMPAoQlTJcuzSyEPOAyA+skXJIX9M0o+4JfOtqopX/Vf4hSLrJ98j0nvFo23gzk8auQ==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm64] + os: [darwin] + + '@oxlint/binding-darwin-x64@1.83.0': + resolution: {integrity: sha512-mjh5oH2EA+wl5yRJYT9K9G61O2zFlpuv+yf2JwZOi0+dq2FnTUtm1h8i+5Ik0fXPWIu/k84I1psZR9aQsLAnyA==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [x64] + os: [darwin] + + '@oxlint/binding-freebsd-x64@1.83.0': + resolution: {integrity: sha512-fNHr64/YaO8YssuoDVC8+F4Uk5enR86q5uxfHkQrjAPs1dbAILOrD2uaud+J7MO8Fx774g44ERLD0IGIvZE48w==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [x64] + os: [freebsd] + + '@oxlint/binding-linux-arm-gnueabihf@1.83.0': + resolution: {integrity: sha512-Qpwy3zzAwMj+8/lyYItHmkSMwbkprFNWTK7jPYDOxSyxEhaSLOWYUTCMkjF334J8/WD0nznCCsoBbIH6hpsuIw==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm] + os: [linux] + + '@oxlint/binding-linux-arm-musleabihf@1.83.0': + resolution: {integrity: sha512-s+BirYLFq7JL2k9sP0XI3ZXJ9dYvJ8sX3jLCLoag7tt+zrSHpZxP0jqznfL+Gdgwu7ay0dYgGYJXrQvq3iWloA==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm] + os: [linux] + + '@oxlint/binding-linux-arm64-gnu@1.83.0': + resolution: {integrity: sha512-7lihXt3vKr+GIyapNbHrnFHm/biiW30le6Zv/DExbAFPF6YwCQXVFlONPFehxs0CpGO4CBfYPM9rdDT+XMoIlg==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm64] + os: [linux] + + '@oxlint/binding-linux-arm64-musl@1.83.0': + resolution: {integrity: sha512-q63JalLYVkZiZvls1z3PPUnpmQluOMXp0khqQMznCeAPLGydfNY8JhvuA4WlK57JfrvikU8wB5lPVveqpIXvew==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm64] + os: [linux] + + '@oxlint/binding-linux-ppc64-gnu@1.83.0': + resolution: {integrity: sha512-krQmDF+dRbxvdqVPV88ZuOoPPu8X5BuqDA8Hd+qcS4YMRQCb+nexA57DazgGsc/rGdKBe3QmV0mnv0bdpW/p5g==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [ppc64] + os: [linux] + + '@oxlint/binding-linux-riscv64-gnu@1.83.0': + resolution: {integrity: sha512-MmOl8Y6txEAXZU1RG8Rr264jQ6D7VPmqFsU/45x/FeWsGe32hklTqGrLE6UxHzp5Rjt0wP+20tY8YXKgSFB3mw==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [riscv64] + os: [linux] + + '@oxlint/binding-linux-riscv64-musl@1.83.0': + resolution: {integrity: sha512-u1rMymh0W3JZkq370kzQsYPULGWqhE09pZRqnZvUSoYaI9pVO5yVX+iYIslmWuEgwuzH9YAaOsScJiobWCHoOw==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [riscv64] + os: [linux] + + '@oxlint/binding-linux-s390x-gnu@1.83.0': + resolution: {integrity: sha512-y0zK3HNwGysu7rqtE+BQG/d0bx5gh/KwlOtghN8oWeK1KcWzeaLqtZrbm8owqdma1lFyrce/hTO5ismuNu+INQ==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [s390x] + os: [linux] + + '@oxlint/binding-linux-x64-gnu@1.83.0': + resolution: {integrity: sha512-rS5gM0NgD7ngmuJmbIehsidtrOwKkLFwCQbKEeb9KuyQrrWNq5Zkn0uV6AYdXOMJ0grrWEiLwBuvMxt8w5vsNw==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [x64] + os: [linux] + + '@oxlint/binding-linux-x64-musl@1.83.0': + resolution: {integrity: sha512-W2IH4EtpcPaWcvNGCA95YoDg4vxqE/ZiPCi3arrxEEpsK7+JQN9WYwrlYFx9pcdP6KPXqRqkv3zdQPHcx7b6YQ==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [x64] + os: [linux] + + '@oxlint/binding-openharmony-arm64@1.83.0': + resolution: {integrity: sha512-6LyKkUyoajssTPLlZmDbZIbu4IZ5B4bGuRUnBgCGpEvHP3FQMaYITncHA/unPUo7q+Z+pIu2HhdkQ+8d1SG7iA==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm64] + os: [openharmony] + + '@oxlint/binding-win32-arm64-msvc@1.83.0': + resolution: {integrity: sha512-Uz/fObEtF0jmNJQJ8CGRBKfefYstS0/wjD3s6IGzP8nUwsJykHQJBiN3npHwKiGRGn/vvBEgNr4B3cCzmmatvg==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm64] + os: [win32] + + '@oxlint/binding-win32-ia32-msvc@1.83.0': + resolution: {integrity: sha512-u7XcvPW6Bk58tY5iWs2ESb0vJjoE/kuSpHxopbwp/p3ZtWVQXZ6wor5w3ssVTHOqd/v8b+QdhSFWQ4grEUNWpA==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [ia32] + os: [win32] + + '@oxlint/binding-win32-x64-msvc@1.83.0': + resolution: {integrity: sha512-LZRubd7ph13QmAg4fFecTYVZkiYbROR2Htaxh/ufWRkDhPOm2wrwaEYR89e0YpPFD3dqBrPoxS7myBw5hmYA7Q==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [x64] + os: [win32] + + '@paralleldrive/cuid2@2.3.1': + resolution: {integrity: sha512-XO7cAxhnTZl0Yggq6jOgjiOHhbgcO4NqFqwSmQpjK3b6TEE6Uj/jfSk6wzYyemh3+I0sHirKSetjQwn5cZktFw==} + + '@parcel/watcher-android-arm64@2.6.0': + resolution: {integrity: sha512-trgpLSCKRC/huFjXX/Smh+0sWe4+YtKfktIToiMl59ghz7z+qkH6kMvNnUbLyRs9N11t8l4svSCs1+5B3rOAhA==} + engines: {node: '>= 10.0.0'} + cpu: [arm64] + os: [android] + + '@parcel/watcher-darwin-arm64@2.6.0': + resolution: {integrity: sha512-Y3QV0gl7Q1zbfueunkWIERICbEojQFCgpyG7YqOGNFLsckXyI1xu9mAIUpKY9QBYzBtSkN8dBPwd3yiAO9ovMw==} + engines: {node: '>= 10.0.0'} + cpu: [arm64] + os: [darwin] + + '@parcel/watcher-darwin-x64@2.6.0': + resolution: {integrity: sha512-Ohv6OpzhUfKYD7Beb8kDvG0jbIxORCYY1JRdZnaBtnjjkJxgD7ZVL0nw2sCYd0yTMKTvz3nnTnOF3cDifK+kvw==} + engines: {node: '>= 10.0.0'} + cpu: [x64] + os: [darwin] + + '@parcel/watcher-freebsd-x64@2.6.0': + resolution: {integrity: sha512-5HmXvDgs8VK+74jF9y9/2FE3/OnlcKmc56tjmSrEuZjpSZOGL+fvAu+HKJBdPs9uwoP2hE6TlSUpXZ/C5jUFmQ==} + engines: {node: '>= 10.0.0'} + cpu: [x64] + os: [freebsd] + + '@parcel/watcher-linux-arm-glibc@2.6.0': + resolution: {integrity: sha512-Ps/hui3A+vMbjdqlqAowK2ZL8+BO8dBjxeWXj6npTBs3jx4wWmbPpaLuqwrQrSqIVMCnpWo238bJ1U37GhQOYg==} + engines: {node: '>= 10.0.0'} + cpu: [arm] + os: [linux] + + '@parcel/watcher-linux-arm-musl@2.6.0': + resolution: {integrity: sha512-9c6AUHgHoG+IY88MRIHupztQiQnrbqHYQjkM2btA+Bf/wQnQMuiD0Wfk1EVv3TlNT3x41uU71rn6E4xh/+zvkw==} + engines: {node: '>= 10.0.0'} + cpu: [arm] + os: [linux] + + '@parcel/watcher-linux-arm64-glibc@2.6.0': + resolution: {integrity: sha512-yHRqS2owEXe6Hic9z6Mh1ECsCd+ODVOGvZDyciqRd21+v+o+DnXMOrw50DSpIG2sb8GPEaPPmfeCAWKPJdq46g==} + engines: {node: '>= 10.0.0'} + cpu: [arm64] + os: [linux] + + '@parcel/watcher-linux-arm64-musl@2.6.0': + resolution: {integrity: sha512-WhB2e/V7rqdHHWZusBSPuy5Ei8S6lSz6FE5TKKQz5h3a0O+C+mhY7vxU9b/stqvMb8beLnPY82ZrFTLKs+SrKA==} + engines: {node: '>= 10.0.0'} + cpu: [arm64] + os: [linux] + + '@parcel/watcher-linux-x64-glibc@2.6.0': + resolution: {integrity: sha512-ulGE6x6Oz6iAwg75T8YQSoguBWasniIbX+QWpaYPcCnDOpdWX3k+4xbEYPZVLxOuoJI+svJJPD3sEj8G7lrQ3A==} + engines: {node: '>= 10.0.0'} + cpu: [x64] + os: [linux] + + '@parcel/watcher-linux-x64-musl@2.6.0': + resolution: {integrity: sha512-tkBYKt7YQrjIJWYDnto2YgO8MRkjlMTSNoRHzsXinBqbLdeOM3L32wPZJvIZxqaLMfSlS/4sUjH/6STVP/XDLw==} + engines: {node: '>= 10.0.0'} + cpu: [x64] + os: [linux] + + '@parcel/watcher-win32-arm64@2.6.0': + resolution: {integrity: sha512-gIZAP23jaHjGWasY/TY6yL7NHFClf0Ga7FN+iINvk+KN94rhm94lYZhFsbYFNcA04/onvGD9kKmiJLJB2HbNwQ==} + engines: {node: '>= 10.0.0'} + cpu: [arm64] + os: [win32] + + '@parcel/watcher-win32-x64@2.6.0': + resolution: {integrity: sha512-cA+/pXV2YkfxlIcXOQ5fSWqAzzPyD78/x5qbK/I0vUkrlYHA8TIz+MXjAbGouguKVSI4bOmkTSJ1/poVSsgt+A==} + engines: {node: '>= 10.0.0'} + cpu: [x64] + os: [win32] + + '@parcel/watcher@2.6.0': + resolution: {integrity: sha512-7FNeNl8NCE7aINx7WXiKQrPYZWC/hvrTsmk6zmxbI7LTXE7hVek/n8AfVgpe2y82zl3w0HvCHN0bVKMBoJcC0w==} + engines: {node: '>= 10.0.0'} + + '@pinojs/redact@0.4.0': + resolution: {integrity: sha512-k2ENnmBugE/rzQfEcdWHcCY+/FM3VLzH9cYEsbdsoqrvzAKRhUZeRNhAZvB8OitQJ1TBed3yqWtdjzS6wJKBwg==} + + '@pkgjs/parseargs@0.11.0': + resolution: {integrity: sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==} + engines: {node: '>=14'} + + '@pkgr/core@0.3.6': + resolution: {integrity: sha512-SEeaJLb3qBNF/OaXnaR1NmmBbFYk1zC0ZH/52fATcRPLFg/p791YrcyFFy44Bo9sLaGuSuLp5Q6axbb/O+v/RA==} + engines: {node: ^14.18.0 || >=16.0.0} + + '@prisma/adapter-pg@7.10.0': + resolution: {integrity: sha512-N7nwSor0HO1Kz6xBv0TPAjAPysKK0fac6p4fVN3ensLOuzc/83Fgmln5k92eK/cvzqdkSR/2kkAqlbcdwVrwpw==} + + '@prisma/client-runtime-utils@7.10.0': + resolution: {integrity: sha512-cnCy7lUV8/CctgKVEmqAbSLAmwqJdE/qAlqTBk/0NDk59zEb2cZ0M0M0E4vVPnqbSEYudRroQDvOWfUZH6RIfw==} + + '@prisma/client@7.10.0': + resolution: {integrity: sha512-Ubw/QS9JGIBSBUsyxAUQuK/Jcu0Tsva7le7QbLd91Kix9yJvYDdj5QkwgEbbZniH80dd+sziQcALPc+HnvQC8Q==} + engines: {node: ^20.19 || ^22.12 || >=24.0} + peerDependencies: + prisma: '*' + typescript: '>=5.4.0' + peerDependenciesMeta: + prisma: + optional: true + typescript: + optional: true + + '@prisma/config@7.10.0': + resolution: {integrity: sha512-Rcg828gIRE3HOQ3pOATFjV5d/P0U9OIobxhd/IMxlfWjA4vru0eGwb0AIwFw0rmcLMVShohZYWPixVxkBHsxUA==} + + '@prisma/debug@7.10.0': + resolution: {integrity: sha512-caygJKtltmRIgdJ3jRpkOr7yM4DW6zxo5uOmojKWFb3asnxWoRkQOwZmXBgD8FZp4htrX+nMpcWqDwzlQ1+Y4g==} + + '@prisma/debug@7.2.0': + resolution: {integrity: sha512-YSGTiSlBAVJPzX4ONZmMotL+ozJwQjRmZweQNIq/ER0tQJKJynNkRB3kyvt37eOfsbMCXk3gnLF6J9OJ4QWftw==} + + '@prisma/dev@0.24.17': + resolution: {integrity: sha512-UvdZzmpFwknnfreh6Jije84ekkYGPYEJhXG1tFzCsCfQyzJifrOo38eZc0qajzvaC6OLUOrN9ML5XfCnEZL9DA==} + + '@prisma/driver-adapter-utils@7.10.0': + resolution: {integrity: sha512-u8zkcRLlaryO652T4qavBg0HmzNW5tSKdsCn6hc1PhWAp/J6k0vrxLuUs+b9o+HcjsK7Dfa01o4OFSn0frauJA==} + + '@prisma/engines-version@7.10.0-4.0edf323efd1d98336f3f0a68684b56f689b900d3': + resolution: {integrity: sha512-8OJ6RuZTZ06eFUOtBwxVmv8XMmOW6HWN5F+uxUbZkGxR0Bfab1dfAdXaHPmR5mb59E+fmUo8IOzXlbLY1SClbw==} + + '@prisma/engines@7.10.0': + resolution: {integrity: sha512-KNumN6NHFwybvfdYzTee9pqwx5PvknpWAaHn6L5NsbrKdl+SQrsVZs9opKs6U6SAsvB26HDt3WybRjOhgoWOYQ==} + + '@prisma/fetch-engine@7.10.0': + resolution: {integrity: sha512-Zqyu8DY14t6W/xwmAxUYWCXtHrvQnSvT644EAZSsdM8NSmCS74vJJbBKdVsK3ucFpnUWkEpbO1a0CxJXrg130g==} + + '@prisma/get-platform@7.10.0': + resolution: {integrity: sha512-0bra1LFYi8xNw0yqV62bHJNQk4BKleOngZiqPWIQc7a3+9q6rqsnqJ15BuepP8943PFMvtmgnP52juZsyYkA6w==} + + '@prisma/get-platform@7.2.0': + resolution: {integrity: sha512-k1V0l0Td1732EHpAfi2eySTezyllok9dXb6UQanajkJQzPUGi3vO2z7jdkz67SypFTdmbnyGYxvEvYZdZsMAVA==} + + '@prisma/query-plan-executor@7.2.0': + resolution: {integrity: sha512-EOZmNzcV8uJ0mae3DhTsiHgoNCuu1J9mULQpGCh62zN3PxPTd+qI9tJvk5jOst8WHKQNwJWR3b39t0XvfBB0WQ==} + + '@prisma/streams-local@0.1.11': + resolution: {integrity: sha512-0TcebL559MByKqTJ+SsrFIEg228iw8UCVRFckzgfRSiJqczhs+MuAgWOF9lnOIV/IVqvu+KMnFTH0eDeTQMpUg==} + engines: {bun: '>=1.2.0', node: '>=22.0.0'} + + '@prisma/studio-core@0.33.0': + resolution: {integrity: sha512-V2fX/nKEymNTrHXwfP26PGjoLStO35Ogu+ex7CFJbLrMYEcZxxZpiSNOs7px23Hk5mzLWvM5RsqG6Ka+rha+wg==} + engines: {node: ^20.19 || ^22.12 || >=24.0, pnpm: '8'} + peerDependencies: + '@types/react': ^18.0.0 || ^19.0.0 + react: ^18.0.0 || ^19.0.0 + react-dom: ^18.0.0 || ^19.0.0 + + '@radix-ui/primitive@1.1.3': + resolution: {integrity: sha512-JTF99U/6XIjCBo0wqkU5sK10glYe27MRRsfwoiq5zzOEZLHU3A3KCMa5X/azekYRCJ0HlwI0crAXS/5dEHTzDg==} + + '@radix-ui/react-compose-refs@1.1.2': + resolution: {integrity: sha512-z4eqJvfiNnFMHIIvXP3CY57y2WJs5g2v3X0zm9mEJkrkNv4rDxu+sg9Jh8EkXyeqBkB7SOcboo9dMVqhyrACIg==} + peerDependencies: + '@types/react': '*' + react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + peerDependenciesMeta: + '@types/react': + optional: true + + '@radix-ui/react-primitive@2.1.3': + resolution: {integrity: sha512-m9gTwRkhy2lvCPe6QJp4d3G1TYEUHn/FzJUtq9MjH46an1wJU+GdoGC5VLof8RX8Ft/DlpshApkhswDLZzHIcQ==} + peerDependencies: + '@types/react': '*' + '@types/react-dom': '*' + react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + react-dom: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + peerDependenciesMeta: + '@types/react': + optional: true + '@types/react-dom': + optional: true + + '@radix-ui/react-slot@1.2.3': + resolution: {integrity: sha512-aeNmHnBxbi2St0au6VBVC7JXFlhLlOnvIIlePNniyUNAClzmtAUEY8/pBiK3iHjufOlwA+c20/8jngo7xcrg8A==} + peerDependencies: + '@types/react': '*' + react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + peerDependenciesMeta: + '@types/react': + optional: true + + '@radix-ui/react-toggle@1.1.10': + resolution: {integrity: sha512-lS1odchhFTeZv3xwHH31YPObmJn8gOg7Lq12inrr0+BH/l3Tsq32VfjqH1oh80ARM3mlkfMic15n0kg4sD1poQ==} + peerDependencies: + '@types/react': '*' + '@types/react-dom': '*' + react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + react-dom: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + peerDependenciesMeta: + '@types/react': + optional: true + '@types/react-dom': + optional: true + + '@radix-ui/react-use-controllable-state@1.2.2': + resolution: {integrity: sha512-BjasUjixPFdS+NKkypcyyN5Pmg83Olst0+c6vGov0diwTEo6mgdqVR6hxcEgFuh4QrAs7Rc+9KuGJ9TVCj0Zzg==} + peerDependencies: + '@types/react': '*' + react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + peerDependenciesMeta: + '@types/react': + optional: true + + '@radix-ui/react-use-effect-event@0.0.2': + resolution: {integrity: sha512-Qp8WbZOBe+blgpuUT+lw2xheLP8q0oatc9UpmiemEICxGvFLYmHm9QowVZGHtJlGbS6A6yJ3iViad/2cVjnOiA==} + peerDependencies: + '@types/react': '*' + react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + peerDependenciesMeta: + '@types/react': + optional: true + + '@radix-ui/react-use-layout-effect@1.1.1': + resolution: {integrity: sha512-RbJRS4UWQFkzHTTwVymMTUv8EqYhOp8dOOviLj2ugtTiXRaRQS7GLGxZTLL1jWhMeoSCf5zmcZkqTl9IiYfXcQ==} + peerDependencies: + '@types/react': '*' + react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + peerDependenciesMeta: + '@types/react': + optional: true + + '@scalar/client-side-rendering@0.4.1': + resolution: {integrity: sha512-4Ha2ihIPFwmhheSU6U9DlpjgRQ2YOqq2JSmc4ubT2ERApaA/HzuZ1IMyLXDvRICI+KbDducfGw5th9O+TQf+6A==} + engines: {node: '>=22'} + + '@scalar/helpers@0.12.0': + resolution: {integrity: sha512-rcX0rFLiWWc0VBr/E+HkatubL0I0ZzxASQkd3032NWEMAEfNd2TiJ9kH46HwbSAOOl696ghxymWegjpjjvxwzA==} + engines: {node: '>=22'} + + '@scalar/nestjs-api-reference@1.2.19': + resolution: {integrity: sha512-DYaZv+JQrLxG5B439+sHY0UbYwqwLip5bHYGnJhfO1SXKcjWCbNxwOV0yIxp8VGR+96g+pc2LPww7/b8ma0oEQ==} + engines: {node: '>=22'} + + '@scalar/schemas@0.10.0': + resolution: {integrity: sha512-jFqfd+oqqlTfs87V+QkIrR9DiRv+/h1x3GzSGbGe1qrM6togeXwvVG4aurn+LZ+Ej9of54/6FmoI8DPuLOKx7A==} + engines: {node: '>=22'} + + '@scalar/types@0.20.0': + resolution: {integrity: sha512-+05slk/Q6MRMqEQt6eM77Jt9DnDPAvfcc/6r7mbrXhIqJSp3oAPrixpAnp1knBSlFaxgixcK/GMKw9QDfD+Zgg==} + engines: {node: '>=22'} + + '@scalar/validation@0.6.3': + resolution: {integrity: sha512-j3s9XPv8Wo1EG5/naBi4XGF0uXYQ2A3QZNI0NKWgCMxRHVrDJGlZEYymcHDHY7fquRm73P8U3c8xqJqB5yad6w==} + engines: {node: '>=20'} + + '@scarf/scarf@1.4.0': + resolution: {integrity: sha512-xxeapPiUXdZAE3che6f3xogoJPeZgig6omHEy1rIY5WVsB3H2BHNnZH+gHG6x91SCWyQCzWGsuL2Hh3ClO5/qQ==} + + '@sinclair/typebox@0.34.52': + resolution: {integrity: sha512-XiMQh7qqVlxZzcVD+kkGMNGMzcTrDMLWI7S4x7z1MkCkbDPrekpZXEUK0eZqZFMuHQg2a2DZOcDIh9o5v3Gonw==} + + '@sindresorhus/is@4.6.0': + resolution: {integrity: sha512-t09vSN3MdfsyCHoFcTRCH/iUtG7OJ0CsjzB8cjAmKc/va/kIgeDI/TxsigdncE/4be734m0cvIYwNaV4i2XqAw==} + engines: {node: '>=10'} + + '@sinonjs/commons@3.0.1': + resolution: {integrity: sha512-K3mCHKQ9sVh8o1C9cxkwxaOmXoAMlDxC1mYyHrjqOWEcBjYr76t96zL2zlj5dUGZ3HSw240X1qgH3Mjf1yJWpQ==} + + '@sinonjs/fake-timers@15.4.0': + resolution: {integrity: sha512-DsG+8/LscQIQg68J6Ef3dv10u6nVyetYn923s3/sus5eaGfTo1of5WMZSLf0UJc9KDuKPilPH0UDJCjvNbDNCA==} + + '@smithy/core@3.39.0': + resolution: {integrity: sha512-JJ/46AWQ4ipS1N2eZmUj7yzIhH8NhQIfAE+dce7NSB6dmFh+7hvD4pbofcoT4I0Xzfy/LNhZx3V2QhwYyAiqdg==} + engines: {node: '>=18.0.0'} + + '@smithy/credential-provider-imds@4.5.2': + resolution: {integrity: sha512-A9uSdn72ozbRUSit0eib0TW7nXuNPlaeM0zcGkJ+nE6tFcSDbnmtwoxbTCFBukVQcszDAyvsd7+rTduPTXpygg==} + engines: {node: '>=18.0.0'} + + '@smithy/fetch-http-handler@5.8.1': + resolution: {integrity: sha512-h8BdMUrUBhMhMaeK7QqAdINRZezCGuYOCpcOZZ1ewxbHST9rdTd09xwNpvLTYfzDRehxQiReK4SKbdYZxBA+ew==} + engines: {node: '>=18.0.0'} + + '@smithy/node-http-handler@4.14.2': + resolution: {integrity: sha512-i1uORV1v3qBqP43ayRKzIdm1q5x14tf8N4Dd06/QUX1Szm6VxHMrTsu20X5E63UFsaNZCRjI4SXG0jDmqYa+3w==} + engines: {node: '>=18.0.0'} + + '@smithy/signature-v4@5.7.5': + resolution: {integrity: sha512-WPjdr5oWOk1LArpI4pavu+fSo+/evi0Re1olxGvqwuZopd4gYR1UGCi+Soyn/IjmafqbWs+ZC+3AKxJS3ZpwUg==} + engines: {node: '>=18.0.0'} + + '@smithy/types@4.20.0': + resolution: {integrity: sha512-lCA6QG22dPk9ecHbv91jDQZsmtPUjdS1aE2Il6NNPqe7DrYc0dZQi6DhcESk2KYXH2sp5xbAcGdYMZDFnuzA2A==} + engines: {node: '>=18.0.0'} + + '@standard-schema/spec@1.1.0': + resolution: {integrity: sha512-l2aFy5jALhniG5HgqrD6jXLi/rUWrKvqN/qJx6yoJsgKhblVd+iqqU4RCXavm/jPityDo5TCvKMnpjKnOriy0w==} + + '@tokenizer/inflate@0.4.1': + resolution: {integrity: sha512-2mAv+8pkG6GIZiF1kNg1jAjh27IDxEPKwdGul3snfztFerfPGI1LjDezZp3i7BElXompqEtPmoPx6c2wgtWsOA==} + engines: {node: '>=18'} + + '@tokenizer/token@0.3.0': + resolution: {integrity: sha512-OvjF+z51L3ov0OyAU0duzsYuvO01PH7x4t6DJx+guahgTnBHkhJdG7soQeTSFLWN3efnHyibZ4Z8l2EuWwJN3A==} + + '@tsconfig/node10@1.0.13': + resolution: {integrity: sha512-gcLdvR9HO1ZJBypsOGqaP6TFEzb6vIta0KSTLt9NAQ6pXQO3cRgSVyCN6pzYqI9DlJgY71XKO0dpDhCf08b3pg==} + + '@tsconfig/node12@1.0.11': + resolution: {integrity: sha512-cqefuRsh12pWyGsIoBKJA9luFu3mRxCA+ORZvA4ktLSzIuCUtWVxGIuXigEwO5/ywWFMZ2QEGKWvkZG1zDMTag==} + + '@tsconfig/node14@1.0.3': + resolution: {integrity: sha512-ysT8mhdixWK6Hw3i1V2AeRqZ5WfXg1G43mqoYlM2nc6388Fq5jcXyr5mRsqViLx/GJYdoL0bfXD8nmF+Zn/Iow==} + + '@tsconfig/node16@1.0.4': + resolution: {integrity: sha512-vxhUy4J8lyeyinH7Azl1pdd43GJhZH/tP2weN8TntQblOY+A0XbT8DJk1/oCPuOOyg/Ja757rG0CgHcWC8OfMA==} + + '@tybys/wasm-util@0.10.4': + resolution: {integrity: sha512-W3c4gRigFS0T/Ma4qIYF3GDAc5AQdHb1yL5znJT1Zv1YaD9Kitx656wBjvr19qbiosmZT8lWDM5BEMynUqX65A==} + + '@types/babel__core@7.20.5': + resolution: {integrity: sha512-qoQprZvz5wQFJwMDqeseRXWv3rqMvhgpbXFfVyWhbx9X47POIA6i/+dXefEmZKoAgOaTdaIgNSMqMIU61yRyzA==} + + '@types/babel__generator@7.27.0': + resolution: {integrity: sha512-ufFd2Xi92OAVPYsy+P4n7/U7e68fex0+Ee8gSG9KX7eo084CWiQ4sdxktvdl0bOPupXtVJPY19zk6EwWqUQ8lg==} + + '@types/babel__template@7.4.4': + resolution: {integrity: sha512-h/NUaSyG5EyxBIp8YRxo4RMe2/qQgvyowRwVMzhYhBCONbW8PUsg4lkFMrhgZhUe5z3L3MiLDuvyJ/CaPa2A8A==} + + '@types/babel__traverse@7.28.0': + resolution: {integrity: sha512-8PvcXf70gTDZBgt9ptxJ8elBeBjcLOAcOtoO/mPJjtji1+CdGbHgm77om1GrsPxsiE+uXIpNSK64UYaIwQXd4Q==} + + '@types/cookiejar@2.1.5': + resolution: {integrity: sha512-he+DHOWReW0nghN24E1WUqM0efK4kI9oTqDm6XmK8ZPe2djZ90BSNdGnIyCLzCPw7/pogPlGbzI2wHGGmi4O/Q==} + + '@types/d3-array@3.0.3': + resolution: {integrity: sha512-Reoy+pKnvsksN0lQUlcH6dOGjRZ/3WRwXR//m+/8lt1BXeI4xyaUZoqULNjyXXRuh0Mj4LNpkCvhUpQlY3X5xQ==} + + '@types/d3-color@3.1.0': + resolution: {integrity: sha512-HKuicPHJuvPgCD+np6Se9MQvS6OCbJmOjGvylzMJRlDwUXjKTTXs6Pwgk79O09Vj/ho3u1ofXnhFOaEWWPrlwA==} + + '@types/d3-delaunay@6.0.1': + resolution: {integrity: sha512-tLxQ2sfT0p6sxdG75c6f/ekqxjyYR0+LwPrsO1mbC9YDBzPJhs2HbJJRrn8Ez1DBoHRo2yx7YEATI+8V1nGMnQ==} + + '@types/d3-format@3.0.1': + resolution: {integrity: sha512-5KY70ifCCzorkLuIkDe0Z9YTf9RR2CjBX1iaJG+rgM/cPP+sO+q9YdQ9WdhQcgPj1EQiJ2/0+yUkkziTG6Lubg==} + + '@types/d3-geo@3.1.0': + resolution: {integrity: sha512-856sckF0oP/diXtS4jNsiQw/UuK5fQG8l/a9VVLeSouf1/PPbBE1i1W852zVwKwYCBkFJJB7nCFTbk6UMEXBOQ==} + + '@types/d3-interpolate@3.0.1': + resolution: {integrity: sha512-jx5leotSeac3jr0RePOH1KdR9rISG91QIE4Q2PYTu4OymLTZfA3SrnURSLzKH48HmXVUru50b8nje4E79oQSQw==} + + '@types/d3-path@3.1.1': + resolution: {integrity: sha512-VMZBYyQvbGmWyWVea0EHs/BwLgxc+MKi1zLDCONksozI4YJMcTt8ZEuIR4Sb1MMTE8MMW49v0IwI5+b7RmfWlg==} + + '@types/d3-scale@4.0.2': + resolution: {integrity: sha512-Yk4htunhPAwN0XGlIwArRomOjdoBFXC3+kCxK2Ubg7I9shQlVSJy/pG/Ht5ASN+gdMIalpk8TJ5xV74jFsetLA==} + + '@types/d3-shape@3.1.7': + resolution: {integrity: sha512-VLvUQ33C+3J+8p+Daf+nYSOsjB4GXp19/S/aGo60m9h1v6XaxjiT82lKVWJCfzhtuZ3yD7i/TPeC/fuKLLOSmg==} + + '@types/d3-time-format@2.1.0': + resolution: {integrity: sha512-/myT3I7EwlukNOX2xVdMzb8FRgNzRMpsZddwst9Ld/VFe6LyJyRp0s32l/V9XoUzk+Gqu56F/oGk6507+8BxrA==} + + '@types/d3-time@3.0.0': + resolution: {integrity: sha512-sZLCdHvBUcNby1cB6Fd3ZBrABbjz3v1Vm90nysCQ6Vt7vd6e/h9Lt7SiJUoEX0l4Dzc7P5llKyhqSi1ycSf1Hg==} + + '@types/estree@1.0.9': + resolution: {integrity: sha512-GhdPgy1el4/ImP05X05Uw4cw2/M93BCUmnEvWZNStlCzEKME4Fkk+YpoA5OiHNQmoS7Cafb8Xa3Pya8m1Qrzeg==} + + '@types/geojson@7946.0.16': + resolution: {integrity: sha512-6C8nqWur3j98U6+lXDfTUWIfgvZU+EumvpHKcYjujKH7woYyLj2sUmff0tRhrqM7BohUw7Pz3ZB1jj2gW9Fvmg==} + + '@types/istanbul-lib-coverage@2.0.6': + resolution: {integrity: sha512-2QF/t/auWm0lsy8XtKVPG19v3sSOQlJe/YHZgfjb/KBBHOGSV+J2q/S671rcq9uTBrLAXmZpqJiaQbMT+zNU1w==} + + '@types/istanbul-lib-report@3.0.3': + resolution: {integrity: sha512-NQn7AHQnk/RSLOxrBbGyJM/aVQ+pjj5HCgasFxc0K/KhoATfQ/47AyUl15I2yBUpihjmas+a+VJBOqecrFH+uA==} + + '@types/istanbul-reports@3.0.4': + resolution: {integrity: sha512-pk2B1NWalF9toCRu6gjBzR69syFjP4Od8WRAX+0mmf9lAjCRicLOWc+ZrxZHx/0XRjotgkF9t6iaMJ+aXcOdZQ==} + + '@types/jest@30.0.0': + resolution: {integrity: sha512-XTYugzhuwqWjws0CVz8QpM36+T+Dz5mTEBKhNs/esGLnCIlGdRy+Dq78NRjd7ls7r8BC8ZRMOrKlkO1hU0JOwA==} + + '@types/json-schema@7.0.15': + resolution: {integrity: sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==} + + '@types/lodash@4.17.26': + resolution: {integrity: sha512-48NWfiY6oNcKOh47Z4h+sIvwcQR91h6KPhaYKgeMIrkT2jV82Gy90SErj60vW8jQbeMSOSbhIv3bZ7JoqPPVhA==} + + '@types/methods@1.1.4': + resolution: {integrity: sha512-ymXWVrDiCxTBE3+RIrrP533E70eA+9qu7zdWoHuOmGujkYtzf4HQF96b8nwHLqhuf4ykX61IGRIB38CC6/sImQ==} + + '@types/node@24.13.6': + resolution: {integrity: sha512-SGrw/h3KPFshy3OE6ZL53LMBG5vGQQ8/gIpiqz/kRZhPJ7HgwCEs8LBuNtWLa8dvGZVpSF7+Bf+c11HUrCb/yg==} + + '@types/pg@8.23.1': + resolution: {integrity: sha512-fKVHpikPdg4GKks3JuLEhvwSyvwzF23hnabPy6DD8ljVbC7+6J5dQzdv4arV6jqq57djnMgs1HKBxX4P8aBI3A==} + + '@types/react@19.3.0': + resolution: {integrity: sha512-N0rFCuH9YoxG9/m61l9MfpJKfmLOVU0em7ipIz6TRgSSkvReLB9vL85GB+yr8Bs5leqpvg96JSwF4ZS1s4viQg==} + + '@types/stack-utils@2.0.3': + resolution: {integrity: sha512-9aEbYZ3TbYMznPdcdr3SmIrLXwC/AKZXQeCf9Pgao5CKb8CyHuEX5jzWPTkvregvhRJHcpRO6BFoGW9ycaOkYw==} + + '@types/superagent@8.1.11': + resolution: {integrity: sha512-KA7srSW/HENDtOw9DOqaFLgWuMqN9WgjEw62lh9dpvRaZDkhdOkazASd7X7i2eMUYLHa1U37ZttnePsH5zTDHw==} + + '@types/supertest@7.2.1': + resolution: {integrity: sha512-4CbBvoYVLHL7+yhbYrZET0vsvuyXTC05aRe7dNQkwMzm56auceoy6Yu3K50uZmwfHna1os3CMSgM/3QVkUtPTw==} + + '@types/yargs-parser@21.0.3': + resolution: {integrity: sha512-I4q9QU9MQv4oEOz4tAHJtNz1cwuLxn2F3xcc2iV5WdqLPpUnj30aUuxt1mAxYTG+oe8CZMV/+6rU4S4gRDzqtQ==} + + '@types/yargs@17.0.35': + resolution: {integrity: sha512-qUHkeCyQFxMXg79wQfTtfndEC+N9ZZg76HJftDJp+qH2tV7Gj4OJi7l+PiWwJ+pWtW8GwSmqsDj/oymhrTWXjg==} + + '@ungap/structured-clone@1.4.0': + resolution: {integrity: sha512-1mEZtMKPM09vDmQt5y7YvmN2+DFTP7Tg0EWXdic8/C6VRnpb33e4ghisCIE3WZjsE2N8mf+QV1Zqh7ZFYLWInQ==} + + '@unrs/resolver-binding-android-arm-eabi@1.12.2': + resolution: {integrity: sha512-g5T90pqg1bo/7mytQx6F4iBNC0Wsh9cu+z9veDbFjc7HjpesJFWD7QMS0NGStXM075+7dJPPVvBbpZlnrdpi/w==} + cpu: [arm] + os: [android] + + '@unrs/resolver-binding-android-arm64@1.12.2': + resolution: {integrity: sha512-YGCRZv/9GLhwmz6mYDeTsm/92BAyR28l6c2ReweVW5pWgfsitWLY8upvfRlGdoyD8HjeTHSYJWyZGD4KJA/nFQ==} + cpu: [arm64] + os: [android] + + '@unrs/resolver-binding-darwin-arm64@1.12.2': + resolution: {integrity: sha512-u9DiNT1auQMO20A9SyTuG3wUgQWB9Z7KjAg0uFuCDR1FsAY8A0CG2S6JpHS1xwm/w1G08bjXZDcyOCjv1WAm2w==} + cpu: [arm64] + os: [darwin] + + '@unrs/resolver-binding-darwin-x64@1.12.2': + resolution: {integrity: sha512-f7rPLi/T1HVKZu/u6t87lroib16n8vrSzcyxI7lg4BGO9UF26KhQL44sd9eOUgrTYhvRXtWOIZT5PejdPyJfUA==} + cpu: [x64] + os: [darwin] + + '@unrs/resolver-binding-freebsd-x64@1.12.2': + resolution: {integrity: sha512-BpcOjWCJub6nRZUS2zA20pmLvjtqAtGejETaIyRLiZiQf++cbrjltLA5NN/xaXfqeOBOSlMFbemIl5/S5tljmg==} + cpu: [x64] + os: [freebsd] + + '@unrs/resolver-binding-linux-arm-gnueabihf@1.12.2': + resolution: {integrity: sha512-vZTDvdSISZjJx66OzJqtsOhzifbqRjbmI1Mnu49fQDwog5GtDI4QidRiEAYbZCRj9C8YZEW+3ZjqsyS9GR4k2A==} + cpu: [arm] + os: [linux] + + '@unrs/resolver-binding-linux-arm-musleabihf@1.12.2': + resolution: {integrity: sha512-BiPI+IrIlwcW4nLLMM21+B1dFPzd55yAVgVGrdgDjNef+ch03GdxrcyaIz8X9SsQirh/kCQ7mviyWlMxdh2D7g==} + cpu: [arm] + os: [linux] + + '@unrs/resolver-binding-linux-arm64-gnu@1.12.2': + resolution: {integrity: sha512-zJc0H99FEPoFfSrNpa91HYfxzfAJCr502oxNK1cfdC9hlaFI43RT+JFCann9JUgZmLzzntChHyn13Sgn9ljHNg==} + cpu: [arm64] + os: [linux] + + '@unrs/resolver-binding-linux-arm64-musl@1.12.2': + resolution: {integrity: sha512-KQ3Lki6l+Pz1k/eBipN41ES+YUK30beLGb9YqcB1O542cyLCNE6GaxrfcY3T6EezmGGk84wb5XyO9loTM9tkcA==} + cpu: [arm64] + os: [linux] + + '@unrs/resolver-binding-linux-loong64-gnu@1.12.2': + resolution: {integrity: sha512-3SJGEh1DborhG6pyxvhPzCT4bbSIVihsvgJc13P1bHG7KLdNDaF9T3gsTwFc7Jw/5Y5/iWOjkEx7Zy0NvCGX3Q==} + cpu: [loong64] + os: [linux] + + '@unrs/resolver-binding-linux-loong64-musl@1.12.2': + resolution: {integrity: sha512-jiuG/Obbel7uw1PwHNFfrkiKhLAF6mnyZ6aWlOAVN9WqKm8v0OFGnciJIHu8+CMvXLQ8AD51LPzAoUfT21D5Ew==} + cpu: [loong64] + os: [linux] + + '@unrs/resolver-binding-linux-ppc64-gnu@1.12.2': + resolution: {integrity: sha512-q7xRvVpmcfeL+LlZg8Pbbo6QaTZwDU5BaGZbwfhkEsXJn3Was8xYfE0RBH266xZt0rM6B7i8xAYIvjthuUIWHg==} + cpu: [ppc64] + os: [linux] + + '@unrs/resolver-binding-linux-riscv64-gnu@1.12.2': + resolution: {integrity: sha512-0CVdx6lcnT3Q9inOH8tsMIOJ6ImndllMjqJHg8RLVdB7Vq4SfkEXl9mCSsVNuNA4MCYycRicCUxPCabVHJRr6A==} + cpu: [riscv64] + os: [linux] + + '@unrs/resolver-binding-linux-riscv64-musl@1.12.2': + resolution: {integrity: sha512-iOwlRo9vnp6R6ohHQS11n0NnfdXx/omhkocmIfaPRpQhKZ+3BDMkkdRVh53qjkFkpPddf+FETA28NwGN7l5l+w==} + cpu: [riscv64] + os: [linux] + + '@unrs/resolver-binding-linux-s390x-gnu@1.12.2': + resolution: {integrity: sha512-HYJtLfXq94q8iZNFT1lknx258wlkkWhZeUXJRqzKBBUJ00CvZ+N33zgbCqimLjsyw5Va6uUxhVa12mI+kaveEw==} + cpu: [s390x] + os: [linux] + + '@unrs/resolver-binding-linux-x64-gnu@1.12.2': + resolution: {integrity: sha512-mPsUhunKKDih5O96Y6enDQyHc1SqBPlY1E/SfMWDM3EdJ95Z9CArPeCVwCCqbP45ljvivdEk8Fxn+SIb1rDAJQ==} + cpu: [x64] + os: [linux] + + '@unrs/resolver-binding-linux-x64-musl@1.12.2': + resolution: {integrity: sha512-azrt6+5ydLd8Vt210AAFis/lZevSfPw93EJRIJG+xPu4WCJ8K0kppCTpMyLPcKT7H15M4Jnt2tMp5bOvCkRC6A==} + cpu: [x64] + os: [linux] + + '@unrs/resolver-binding-openharmony-arm64@1.12.2': + resolution: {integrity: sha512-YZ9hP4O0X9PQb8eO980qmLNGH4zT3I9+SZTdt0Pr0YyuGQhYKoOZkV02VzrzyOZJ5xIJ3UFIenKkUkGg8GjgWQ==} + cpu: [arm64] + os: [openharmony] + + '@unrs/resolver-binding-wasm32-wasi@1.12.2': + resolution: {integrity: sha512-tYFDIkMxSflfEc/h92ZWNsZlHSwgimbNHSO3PL2JWQHfCuC2q316jMyYU9TIWZsFK2bQwyK5VAdYgn8ygPj69A==} + engines: {node: '>=14.0.0'} + cpu: [wasm32] + + '@unrs/resolver-binding-win32-arm64-msvc@1.12.2': + resolution: {integrity: sha512-qzNyg3xL0VPQmCaUh+N5jSitce6k+uCBfMDesWRnlULOZaqUkaJ0ybdT+UqlAWJoQjuqfIU/0Ptx9bteN4D82g==} + cpu: [arm64] + os: [win32] + + '@unrs/resolver-binding-win32-ia32-msvc@1.12.2': + resolution: {integrity: sha512-WD9sY00OfpHVGfsnHZoA8jVT+esS/Bg8z8jzxp5BnDCjjwsuKsPQrzswwpFy4J1AUJbXPRfkpcX0mXrzeXW79g==} + cpu: [ia32] + os: [win32] + + '@unrs/resolver-binding-win32-x64-msvc@1.12.2': + resolution: {integrity: sha512-nAB74NfSNKknqQ1RrYj6uz8FcXEomu/MATJZxh/x+BArzN2U3JbOYC0APYzUIGhVY3m5hRxA8VPNdPBoG8txlA==} + cpu: [x64] + os: [win32] + + '@visx/curve@4.0.1-alpha.0': + resolution: {integrity: sha512-jRu61Uz274pV1zyioXmboyrLutYbnKsgjj4njSGCnhdXj5GkZvZbg+ThDb6oOzoAnJOBRLz4rzPlWvNJOzuVMg==} + + '@visx/event@4.0.1-alpha.0': + resolution: {integrity: sha512-EQqCMSv/s8NbFjo+hz3FKsvvYfP+2QslsFJ/24/O5l/W+7UC6J6aAvO0ujVwrTwdYbuQ+vhxKi1xdPdKR/qj1g==} + + '@visx/grid@4.0.1-alpha.0': + resolution: {integrity: sha512-rycutGmTHO+znNdPumheWMglm7YfpffvRwUkVy5zy4WoORIuKTMkDxwnOzHG2xMxU3EE/YCd37xFV5AxA30yeg==} + peerDependencies: + react: ^16.14.0 || ^17.0.0-0 || ^18.0.0-0 || ^19.0.0-0 + + '@visx/group@4.0.1-alpha.0': + resolution: {integrity: sha512-V19l7iQ7jccBv8kao/EByuI6o4xtxzzLV9nqVI1hRvmdzTVsuLpqlwzYCZUXJaTVvUWf8s4D2SQFjGkj/Nw+0w==} + peerDependencies: + react: ^16.14.0 || ^17.0.0-0 || ^18.0.0-0 || ^19.0.0-0 + + '@visx/point@4.0.1-alpha.0': + resolution: {integrity: sha512-ijTfr/Nx09f03vIj9nyTr3z4Xth4Y75427UaogJh6dnIRLMEFHQOwNu791sbfiNj0a+ZXuaE32h0vKrFe4/8Qg==} + + '@visx/responsive@4.0.1-alpha.0': + resolution: {integrity: sha512-o+1zGywQZY0+yOx3Iw87wc4bbPJRr/HnIukTwfOz4UVyj9pB1OQNVHB7OORO1+LBHJceWpB31co/ZV9KHncKrA==} + peerDependencies: + react: ^16.14.0 || ^17.0.0-0 || ^18.0.0-0 || ^19.0.0-0 + + '@visx/scale@4.0.1-alpha.0': + resolution: {integrity: sha512-nzjeE87vFSAXGWFiiNfBpNLAf0Q8Qmf6syvKLjqNi4kGZkdhbUll3E/59YsgWXmjM8+llPLWzGsP+JPvo5eq1A==} + + '@visx/shape@4.0.1-alpha.0': + resolution: {integrity: sha512-62QeiVNmPlterQGwhkEDcbq7M0MqY0lBsK5QKXtM9ZoPZWkuGV3aykA3+Xu20B2FAvyJq4LqJzBc7Sxr+EAdbA==} + peerDependencies: + react: ^16.14.0 || ^17.0.0-0 || ^18.0.0-0 || ^19.0.0-0 + + '@visx/vendor@4.0.0-alpha.0': + resolution: {integrity: sha512-6I+MuqXBcv9jnlcVowHoHKSdk9gXTWkHLKyqBwRWg7LY6A3Ei8SHfubpqGV5rBUSppxMq2RszPJUS6w+H0YgmQ==} + + '@webassemblyjs/ast@1.14.1': + resolution: {integrity: sha512-nuBEDgQfm1ccRp/8bCQrx1frohyufl4JlbMMZ4P1wpeOfDhF6FQkxZJ1b/e+PLwr6X1Nhw6OLme5usuBWYBvuQ==} + + '@webassemblyjs/floating-point-hex-parser@1.13.2': + resolution: {integrity: sha512-6oXyTOzbKxGH4steLbLNOu71Oj+C8Lg34n6CqRvqfS2O71BxY6ByfMDRhBytzknj9yGUPVJ1qIKhRlAwO1AovA==} + + '@webassemblyjs/helper-api-error@1.13.2': + resolution: {integrity: sha512-U56GMYxy4ZQCbDZd6JuvvNV/WFildOjsaWD3Tzzvmw/mas3cXzRJPMjP83JqEsgSbyrmaGjBfDtV7KDXV9UzFQ==} + + '@webassemblyjs/helper-buffer@1.14.1': + resolution: {integrity: sha512-jyH7wtcHiKssDtFPRB+iQdxlDf96m0E39yb0k5uJVhFGleZFoNw1c4aeIcVUPPbXUVJ94wwnMOAqUHyzoEPVMA==} + + '@webassemblyjs/helper-numbers@1.13.2': + resolution: {integrity: sha512-FE8aCmS5Q6eQYcV3gI35O4J789wlQA+7JrqTTpJqn5emA4U2hvwJmvFRC0HODS+3Ye6WioDklgd6scJ3+PLnEA==} + + '@webassemblyjs/helper-wasm-bytecode@1.13.2': + resolution: {integrity: sha512-3QbLKy93F0EAIXLh0ogEVR6rOubA9AoZ+WRYhNbFyuB70j3dRdwH9g+qXhLAO0kiYGlg3TxDV+I4rQTr/YNXkA==} + + '@webassemblyjs/helper-wasm-section@1.14.1': + resolution: {integrity: sha512-ds5mXEqTJ6oxRoqjhWDU83OgzAYjwsCV8Lo/N+oRsNDmx/ZDpqalmrtgOMkHwxsG0iI//3BwWAErYRHtgn0dZw==} + + '@webassemblyjs/ieee754@1.13.2': + resolution: {integrity: sha512-4LtOzh58S/5lX4ITKxnAK2USuNEvpdVV9AlgGQb8rJDHaLeHciwG4zlGr0j/SNWlr7x3vO1lDEsuePvtcDNCkw==} + + '@webassemblyjs/leb128@1.13.2': + resolution: {integrity: sha512-Lde1oNoIdzVzdkNEAWZ1dZ5orIbff80YPdHx20mrHwHrVNNTjNr8E3xz9BdpcGqRQbAEa+fkrCb+fRFTl/6sQw==} + + '@webassemblyjs/utf8@1.13.2': + resolution: {integrity: sha512-3NQWGjKTASY1xV5m7Hr0iPeXD9+RDobLll3T9d2AO+g3my8xy5peVyjSag4I50mR1bBSN/Ct12lo+R9tJk0NZQ==} + + '@webassemblyjs/wasm-edit@1.14.1': + resolution: {integrity: sha512-RNJUIQH/J8iA/1NzlE4N7KtyZNHi3w7at7hDjvRNm5rcUXa00z1vRz3glZoULfJ5mpvYhLybmVcwcjGrC1pRrQ==} + + '@webassemblyjs/wasm-gen@1.14.1': + resolution: {integrity: sha512-AmomSIjP8ZbfGQhumkNvgC33AY7qtMCXnN6bL2u2Js4gVCg8fp735aEiMSBbDR7UQIj90n4wKAFUSEd0QN2Ukg==} + + '@webassemblyjs/wasm-opt@1.14.1': + resolution: {integrity: sha512-PTcKLUNvBqnY2U6E5bdOQcSM+oVP/PmrDY9NzowJjislEjwP/C4an2303MCVS2Mg9d3AJpIGdUFIQQWbPds0Sw==} + + '@webassemblyjs/wasm-parser@1.14.1': + resolution: {integrity: sha512-JLBl+KZ0R5qB7mCnud/yyX08jWFw5MsoalJ1pQ4EdFlgj9VdXKGuENGsiCIjegI1W7p91rUlcB/LB5yRJKNTcQ==} + + '@webassemblyjs/wast-printer@1.14.1': + resolution: {integrity: sha512-kPSSXE6De1XOR820C90RIo2ogvZG+c3KiHzqUoO/F34Y2shGzesfqv7o57xrxovZJH/MetF5UjroJ/R/3isoiw==} + + '@xtuc/ieee754@1.2.0': + resolution: {integrity: sha512-DX8nKgqcGwsc0eJSqYt5lwP4DH5FlHnmuWWBRy7X0NcaGR0ZtuyeESgMwTYVEtxmsNGY+qit4QYT/MIYTOTPeA==} + + '@xtuc/long@4.2.2': + resolution: {integrity: sha512-NuHqBY1PB/D8xU6s/thBgOAiAP7HOYDQ32+BFZILJ8ivkUkAHQnWfn6WhL79Owj1qmUnoN/YPhktdIoucipkAQ==} + + abstract-logging@2.0.1: + resolution: {integrity: sha512-2BjRTZxTPvheOvGbBslFSYOUkr+SjPtOnrLP33f+VIWLzezQpZcqVg7ja3L4dBXmzzgwT+a029jRx5PCi3JuiA==} + + accepts@2.0.0: + resolution: {integrity: sha512-5cvg6CtKwfgdmVqY1WIiXKc3Q1bkRqGLi+2W/6ao+6Y7gu/RCwRuAhGEzh5B4KlszSuTLgZYuqFqo5bImjNKng==} + engines: {node: '>= 0.6'} + + acorn-walk@8.3.5: + resolution: {integrity: sha512-HEHNfbars9v4pgpW6SO1KSPkfoS0xVOM/9UzkJltjlsHZmJasxg8aXkuZa7SMf8vKGIBhpUsPluQSqhJFCqebw==} + engines: {node: '>=0.4.0'} + + acorn@8.18.0: + resolution: {integrity: sha512-lGq+9yr1/GuAWaVYIHRjvvySG5/4VfKIvC8EWxStPdcDh/Ka7FG3twP6v4d5BkravUilhIAsG4Qj83t02LWUPQ==} + engines: {node: '>=0.4.0'} + hasBin: true + + ajv-formats@3.0.1: + resolution: {integrity: sha512-8iUql50EUR+uUcdRQ3HDqa6EVyo3docL8g5WJ3FNcWmu62IbkGUue/pEyLBW8VGKKucTPgqeks4fIU1DA4yowQ==} + peerDependencies: + ajv: ^8.0.0 + peerDependenciesMeta: + ajv: + optional: true + + ajv-keywords@5.1.0: + resolution: {integrity: sha512-YCS/JNFAUyr5vAuhk1DWm1CBxRHW9LbJ2ozWeemrIqpbsqKjHVxYPyi5GC0rjZIT5JxJ3virVTS8wk4i/Z+krw==} + peerDependencies: + ajv: ^8.8.2 + + ajv@8.20.0: + resolution: {integrity: sha512-Thbli+OlOj+iMPYFBVBfJ3OmCAnaSyNn4M1vz9T6Gka5Jt9ba/HIR56joy65tY6kx/FCF5VXNB819Y7/GUrBGA==} + + ansi-escapes@4.3.2: + resolution: {integrity: sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ==} + engines: {node: '>=8'} + + ansi-regex@5.0.1: + resolution: {integrity: sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==} + engines: {node: '>=8'} + + ansi-regex@6.3.0: + resolution: {integrity: sha512-WpDfL7NO6j7tH88IDBNVdUJxDh9nmCteAVW9dsep846XdwF4naCBK+/tGLX3KJgcpgMRXCFlTM2hKGoK9FsdrQ==} + engines: {node: '>=12'} + + ansi-styles@4.3.0: + resolution: {integrity: sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==} + engines: {node: '>=8'} + + ansi-styles@5.2.0: + resolution: {integrity: sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==} + engines: {node: '>=10'} + + ansi-styles@6.2.3: + resolution: {integrity: sha512-4Dj6M28JB+oAH8kFkTLUo+a2jwOFkuqb3yucU0CANcRRUbxS0cP0nZYCGjcc3BNXwRIsUVmDGgzawme7zvJHvg==} + engines: {node: '>=12'} + + ansis@4.4.0: + resolution: {integrity: sha512-9k3v7xcHwgdO/DruxGIg4HtjvlAZlcnsX/mzqUb1t3NkYnl9kK2UJ+Gq0io+vQf7iT//BD/HB/NBkUR1LWxoeA==} + engines: {node: '>=14'} + + anymatch@3.1.3: + resolution: {integrity: sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==} + engines: {node: '>= 8'} + + append-field@1.0.0: + resolution: {integrity: sha512-klpgFSWLW1ZEs8svjfb7g4qWY0YS5imI82dTg+QahUvJ8YqAY0P10Uk8tTyh9ZGuYEZEMaeJYCF5BFuX552hsw==} + + arg@4.1.3: + resolution: {integrity: sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==} + + argparse@1.0.10: + resolution: {integrity: sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==} + + argparse@2.0.1: + resolution: {integrity: sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==} + + array-timsort@1.0.3: + resolution: {integrity: sha512-/+3GRL7dDAGEfM6TseQk/U+mi18TU2Ms9I3UlLdUMhz2hbvGNTKdj9xniwXfUqgYhHxRx0+8UnKkvlNwVU+cWQ==} + + asap@2.0.6: + resolution: {integrity: sha512-BSHWgDSAiKs50o2Re8ppvp3seVHXSRM44cdSsT9FfNEUUZLOGWVCsiWaRPWM1Znn+mqZ1OfVZ3z3DWEzSp7hRA==} + + asynckit@0.4.0: + resolution: {integrity: sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==} + + atomic-sleep@1.0.0: + resolution: {integrity: sha512-kNOjDqAh7px0XWNI+4QbzoiR/nTkHAWNud2uvnJquD1/x5a7EQZMJT0AczqK0Qn67oY/TTQ1LbUKajZpp3I9tQ==} + engines: {node: '>=8.0.0'} + + avvio@9.3.0: + resolution: {integrity: sha512-g2tQ7LE7oOSqDfwEm3M+ZCMTJc7KiZCdJ4UwyZJb5ckTKyYu50OYmvv0mCFXPuYXoM4zkSt8zM9XQ9KCvxA74A==} + + aws-ssl-profiles@1.1.2: + resolution: {integrity: sha512-NZKeq9AfyQvEeNlN0zSYAaWrmBffJh3IELMZfRpJVWgrpEbtEpnjvzqBPf+mxoI287JohRDoa+/nsfqqiZmF6g==} + engines: {node: '>= 6.0.0'} + + babel-jest@30.5.2: + resolution: {integrity: sha512-ES8WeJ2fNWPEDunyAtUfJ12nHyaWUloCHdkfK2oW5uSoQSUmjNKdWiGaXJITJwvFEWoD/evHEg/QoCXAvLaQqQ==} + engines: {node: ^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0} + peerDependencies: + '@babel/core': ^7.11.0 || ^8.0.0-0 + + babel-plugin-istanbul@8.0.0: + resolution: {integrity: sha512-18wCskrN3DgbuBmp1gr7LBGT8xdz5xhQQqFvFhVxbkl8VBCrMKQ2YtqBWtUal1Zrc1HTuX0011+Brjw78TCFkg==} + engines: {node: '>=18'} + + babel-plugin-jest-hoist@30.5.0: + resolution: {integrity: sha512-gtGo1B+u14jrZQv6TdSWIWkTqclboo7Qn+dFAGUOIuXLFuJKAdg3U5MIWzZnW4vfUb4dX9skmAMiby86e/SF4A==} + engines: {node: ^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0} + + babel-preset-current-node-syntax@1.2.0: + resolution: {integrity: sha512-E/VlAEzRrsLEb2+dv8yp3bo4scof3l9nR4lrld+Iy5NyVqgVYUJnDAmunkhPMisRI32Qc4iRiz425d8vM++2fg==} + peerDependencies: + '@babel/core': ^7.0.0 || ^8.0.0-0 + + babel-preset-jest@30.5.0: + resolution: {integrity: sha512-ZGPn5ClP4lBDpuOK8W1yQIOy359HmbnZv3suucAlIe+SEE9yDsxV4S2PjSbH2Vc97U+WmzYD7vw3kr8NsQ/i6w==} + engines: {node: ^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0} + peerDependencies: + '@babel/core': ^7.11.0 || ^8.0.0-beta.1 || ^8.0.0 + + balanced-match@1.0.2: + resolution: {integrity: sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==} + + balanced-match@4.0.4: + resolution: {integrity: sha512-BLrgEcRTwX2o6gGxGOCNyMvGSp35YofuYzw9h1IMTRmKqttAZZVU67bdb9Pr2vUHA8+j3i2tJfjO6C6+4myGTA==} + engines: {node: 18 || 20 || >=22} + + base64-js@1.5.1: + resolution: {integrity: sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==} + + baseline-browser-mapping@2.11.25: + resolution: {integrity: sha512-gMmEShwwq7FJqMwvfRwvCl00v4kN+KOfJqXn+f4nrufak5gNHJOksd/60Dvjuz7sI8Y5WiSFBa8FEYr+zoyqCw==} + engines: {node: '>=6.0.0'} + hasBin: true + + better-result@2.10.0: + resolution: {integrity: sha512-oQhh0y1qo2/ZKdAAEvHZAqKKiHOFU5k/bW96fE2ScgQOVkJRiHwB+nOS1SgFsYqRlxMDWvefXi9Q3px7QvgNDw==} + + bl@4.1.0: + resolution: {integrity: sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==} + + body-parser@2.3.0: + resolution: {integrity: sha512-2cGmJupaNgg+QUwVLAucDuWuoMZ6EX9iHDRswZ5lsNYEmwPaRknMPCLZz07yTzVq/83p4o/wzbDZbBrTvGGTIw==} + engines: {node: '>=18'} + + bowser@2.15.0: + resolution: {integrity: sha512-xic6KSZglg/I4ymp45fdM4GWfYpBK79Fxd/TOvJktlaPgQqqDxvmGwOPZl2V0dyeS3Lj5c180bLhXF43iyAjZQ==} + + brace-expansion@2.1.7: + resolution: {integrity: sha512-uZbew1NqdmPDTMJ8ah1y+b+9QEJrfkXFk3RcTQw3X0jW/xRUvFKsg1CfQdSYGdTbXZWExtU3J3ccxtnfw1Fi0g==} + + brace-expansion@5.0.12: + resolution: {integrity: sha512-YovQ3rzhaLMIrDjNDMkNS01tea93qhEhG5xy8f6+R0l+dw3Ki+5sCoIoI942iuLZTHWogWktgwVDhU09iNEimQ==} + engines: {node: 20 || >=22} + + browserslist@4.29.0: + resolution: {integrity: sha512-3GSvyjvDI4Dur1Meg2BekJquu5uF+9R9a1+5M1Mde192eZoXbeXjzgOsgqPS2V8D5wrrip0gR5Hf/GhWQ9ZzaA==} + engines: {node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7} + hasBin: true + + bs-logger@0.2.6: + resolution: {integrity: sha512-pd8DCoxmbgc7hyPKOvxtqNcjYoOsABPQdcCUjGp3d42VR2CX1ORhk2A87oqqu5R1kk+76nsxZupkmyd+MVtCog==} + engines: {node: '>= 6'} + + bser@2.1.1: + resolution: {integrity: sha512-gQxTNE/GAfIIrmHLUE3oJyp5FO6HRBfhjnw4/wMmA63ZGDJnWBmgY/lyQBpnDUkGmAhbSe39tx2d/iTOAfglwQ==} + + buffer-from@1.1.2: + resolution: {integrity: sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==} + + buffer@5.7.1: + resolution: {integrity: sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==} + + busboy@1.6.0: + resolution: {integrity: sha512-8SFQbg/0hQ9xy3UNTB0YEnsNBbWfhf7RtnzpL7TkBiTBRfrQ9Fxcnz7VJsleJpyp6rVLvXiuORqjlHi5q+PYuA==} + engines: {node: '>=10.16.0'} + + bytes@3.1.2: + resolution: {integrity: sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==} + engines: {node: '>= 0.8'} + + c12@3.3.4: + resolution: {integrity: sha512-cM0ApFQSBXuourJejzwv/AuPRvAxordTyParRVcHjjtXirtkzM0uK2L9TTn9s0cXZbG7E55jCivRQzoxYmRAlA==} + peerDependencies: + magicast: '*' + peerDependenciesMeta: + magicast: + optional: true + + call-bind-apply-helpers@1.0.2: + resolution: {integrity: sha512-Sp1ablJ0ivDkSzjcaJdxEunN5/XvksFJ2sMBFfq6x0ryhQV/2b/KwFe21cMpmHtPOSij8K99/wSfoEuTObmuMQ==} + engines: {node: '>= 0.4'} + + call-bound@1.0.4: + resolution: {integrity: sha512-+ys997U96po4Kx/ABpBCqhA9EuxJaQWDQg7295H4hBphv3IZg0boBKuwYpt4YXp6MZ5AmZQnU/tyMTlRpaSejg==} + engines: {node: '>= 0.4'} + + callsites@3.1.0: + resolution: {integrity: sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==} + engines: {node: '>=6'} + + camelcase@5.3.1: + resolution: {integrity: sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==} + engines: {node: '>=6'} + + camelcase@6.3.0: + resolution: {integrity: sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==} + engines: {node: '>=10'} + + caniuse-lite@1.0.30001810: + resolution: {integrity: sha512-TITQPUkaz+aVk5GL6NhOdwk1aEaNTSDPsGFWrTuhKGtjTF70jL/Oht2W4c6rXUe5fu7Ie19VIahAXHIIiWWNeg==} + + chalk@4.1.2: + resolution: {integrity: sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==} + engines: {node: '>=10'} + + chalk@5.6.2: + resolution: {integrity: sha512-7NzBL0rN6fMUW+f7A6Io4h40qQlG+xGmtMxfbnH/K7TAtt8JQWVQK+6g0UXKMeVJoyV5EkkNsErQ8pVD3bLHbA==} + engines: {node: ^12.17.0 || ^14.13 || >=16.0.0} + + char-regex@1.0.2: + resolution: {integrity: sha512-kWWXztvZ5SBQV+eRgKFeh8q5sLuZY2+8WUIzlxWVTg+oGwY14qylx1KbKzHd8P6ZYkAg0xyIDU9JMHhyJMZ1jw==} + engines: {node: '>=10'} + + chardet@0.7.0: + resolution: {integrity: sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA==} + + chardet@2.2.0: + resolution: {integrity: sha512-rddelWYNPRrXq6PtNEN2S3f6t9ILzvqaN5pVgi4kqt9jHQaXIial9PznB5iSPVlQSLNaaH22ItWz3EJtQ10+OA==} + + chokidar@5.0.0: + resolution: {integrity: sha512-TQMmc3w+5AxjpL8iIiwebF73dRDF4fBIieAqGn9RGCWaEVwQ6Fb2cGe31Yns0RRIzii5goJ1Y7xbMwo1TxMplw==} + engines: {node: '>= 20.19.0'} + + chrome-trace-event@1.0.4: + resolution: {integrity: sha512-rNjApaLzuwaOTjCiT8lSDdGN1APCiqkChLMJxJPWLunPAt5fy8xgU9/jNOchV84wfIxrA0lRQB7oCT8jrn/wrQ==} + engines: {node: '>=6.0'} + + ci-info@4.4.0: + resolution: {integrity: sha512-77PSwercCZU2Fc4sX94eF8k8Pxte6JAwL4/ICZLFjJLqegs7kCuAsqqj/70NQF6TvDpgFjkubQB2FW2ZZddvQg==} + engines: {node: '>=8'} + + cjs-module-lexer@2.2.1: + resolution: {integrity: sha512-Ca8swihM+/4yKecYHY52kgJd300hi2lADU/a1RxNTRe+RJ9jvqQlESpbz9DnG9mowez8qwXHB8qYdIUw9e+F5Q==} + + classnames@2.5.1: + resolution: {integrity: sha512-saHYOzhIQs6wy2sVxTM6bUDsQO4F50V9RQ22qBpEdCW+I+/Wmke2HOl6lS6dTpdxVhb88/I6+Hs+438c3lfUow==} + + cli-cursor@3.1.0: + resolution: {integrity: sha512-I/zHAwsKf9FqGoXM4WWRACob9+SNukZTd94DWF57E4toouRulbCxcUh6RKUEOQlYTHJnzkPMySvPNaaSLNfLZw==} + engines: {node: '>=8'} + + cli-cursor@5.0.0: + resolution: {integrity: sha512-aCj4O5wKyszjMmDT4tZj93kxyydN/K5zPWSCe6/0AV/AA1pqe5ZBIw0a2ZfPQV7lL5/yb5HsUreJ6UFAF1tEQw==} + engines: {node: '>=18'} + + cli-progress@3.12.0: + resolution: {integrity: sha512-tRkV3HJ1ASwm19THiiLIXLO7Im7wlTuKnvkYaTkyoAPefqjNg7W7DHKUlGRxy9vxDvbyCYQkQozvptuMkGCg8A==} + engines: {node: '>=4'} + + cli-spinners@2.9.2: + resolution: {integrity: sha512-ywqV+5MmyL4E7ybXgKys4DugZbX0FC6LnwrhjuykIjnK9k8OQacQ7axGKnjDXWNhns0xot3bZI5h55H8yo9cJg==} + engines: {node: '>=6'} + + cli-spinners@3.4.0: + resolution: {integrity: sha512-bXfOC4QcT1tKXGorxL3wbJm6XJPDqEnij2gQ2m7ESQuE+/z9YFIWnl/5RpTiKWbMq3EVKR4fRLJGn6DVfu0mpw==} + engines: {node: '>=18.20'} + + cli-table3@0.6.5: + resolution: {integrity: sha512-+W/5efTR7y5HRD7gACw9yQjqMVvEMLBHmboM/kPWam+H+Hmyrgjh6YncVKK122YZkXrLudzTuAukUw9FnMf7IQ==} + engines: {node: 10.* || >= 12.*} + + cli-width@3.0.0: + resolution: {integrity: sha512-FxqpkPPwu1HjuN93Omfm4h8uIanXofW0RxVEW3k5RKx+mJJYSthzNhp32Kzxxy3YAEZ/Dc/EWN1vZRY0+kOhbw==} + engines: {node: '>= 10'} + + cli-width@4.1.0: + resolution: {integrity: sha512-ouuZd4/dm2Sw5Gmqy6bGyNNNe1qt9RpmxveLSO7KcgsTnU7RXfsw+/bukWGo1abgBiMAic068rclZsO4IWmmxQ==} + engines: {node: '>= 12'} + + cliui@8.0.1: + resolution: {integrity: sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==} + engines: {node: '>=12'} + + clone@1.0.4: + resolution: {integrity: sha512-JQHZ2QMW6l3aH/j6xCqQThY/9OH4D/9ls34cgkUBiEeocRTU04tHfKPBsUK1PqZCUQM7GiA0IIXJSuXHI64Kbg==} + engines: {node: '>=0.8'} + + cluster-key-slot@1.1.1: + resolution: {integrity: sha512-rwHwUfXL40Chm1r08yrhU3qpUvdVlgkKNeyeGPOxnW8/SyVDvgRaed/Uz54AqWNaTCAThlj6QAs3TZcKI0xDEw==} + engines: {node: '>=0.10.0'} + + co@4.6.0: + resolution: {integrity: sha512-QVb0dM5HvG+uaxitm8wONl7jltx8dqhfU33DcqtOZcLSVIKSDDLDi7+0LbAKiyI8hD9u42m2YxXSkMGWThaecQ==} + engines: {iojs: '>= 1.0.0', node: '>= 0.12.0'} + + collect-v8-coverage@1.0.3: + resolution: {integrity: sha512-1L5aqIkwPfiodaMgQunkF1zRhNqifHBmtbbbxcr6yVxxBnliw4TDOW6NxpO8DJLgJ16OT+Y4ztZqP6p/FtXnAw==} + + color-convert@2.0.1: + resolution: {integrity: sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==} + engines: {node: '>=7.0.0'} + + color-name@1.1.4: + resolution: {integrity: sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==} + + colorette@2.0.20: + resolution: {integrity: sha512-IfEDxwoWIjkeXL1eXcDiow4UbKjhLdq6/EuSVR9GMN7KVH3r9gQ83e73hsz1Nd1T3ijd5xv1wcWRYO+D6kCI2w==} + + combined-stream@1.0.8: + resolution: {integrity: sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==} + engines: {node: '>= 0.8'} + + commander@15.0.0: + resolution: {integrity: sha512-z67u4ZhzCL/Tydu1lJARtEZYWbWaN7oYLHbsuzocr6y4N6WZAagG3RQ4FW61V1/0+jImpj293XfrcYnd1qxtPg==} + engines: {node: '>=22.12.0'} + + commander@2.20.3: + resolution: {integrity: sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==} + + commander@4.1.1: + resolution: {integrity: sha512-NOKm8xhkzAjzFx8B2v5OAHT+u5pRQc2UCa2Vq9jYL/31o2wi9mxBA7LIFs3sV5VSC49z6pEhfbMULvShKj26WA==} + engines: {node: '>= 6'} + + comment-json@5.0.0: + resolution: {integrity: sha512-uiqLcOiVDJtBP8WGkZHEP+FZIhTzP1dxvn59EfoYUi9gqupjrBWVQkO2atDrbnKPwLeotFYDsuNb26uBMqB+hw==} + engines: {node: '>= 6'} + + component-emitter@1.3.1: + resolution: {integrity: sha512-T0+barUSQRTUQASh8bx02dl+DhF54GtIDY13Y3m9oWTklKbb3Wv974meRpeZ3lp1JpLVECWWNHC4vaG2XHXouQ==} + + confbox@0.2.4: + resolution: {integrity: sha512-ysOGlgTFbN2/Y6Cg3Iye8YKulHw+R2fNXHrgSmXISQdMnomY6eNDprVdW9R5xBguEqI954+S6709UyiO7B+6OQ==} + + confbox@0.3.1: + resolution: {integrity: sha512-cKUSoKa8YxFZZSmraVi7onONx3amu77ngK3kGpsYHDH7drPwCRkQE1RYMPlLRrMtnciRj274XNRxcHxnKmDSnA==} + + content-disposition@1.1.0: + resolution: {integrity: sha512-5jRCH9Z/+DRP7rkvY83B+yGIGX96OYdJmzngqnw2SBSxqCFPd0w2km3s5iawpGX8krnwSGmF0FW5Nhr0Hfai3g==} + engines: {node: '>=18'} + + content-disposition@3.0.0: + resolution: {integrity: sha512-ZH/0Xs9rMIFWCOmGdmS9eHBTF62qqQYNz4nVjQhkdIO/a0fCP4UIM3mRz/wiqL0L14YgAz/1xio4OaSY4+ON/A==} + engines: {node: '>=22'} + + content-type@1.0.5: + resolution: {integrity: sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA==} + engines: {node: '>= 0.6'} + + content-type@2.1.0: + resolution: {integrity: sha512-mj7UPXE0jaqaOsukNZRUEfEi2AcL7C/vwmwcHV0O97eO1E1pxBZuyjlZrx5seTaNBg1U6+o35wpa35Qfcc+7ag==} + engines: {node: '>=18'} + + convert-source-map@2.0.0: + resolution: {integrity: sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==} + + cookie-signature@1.2.2: + resolution: {integrity: sha512-D76uU73ulSXrD1UXF4KE2TMxVVwhsnCgfAyTg9k8P6KGZjlXKrOLe4dJQKI3Bxi5wjesZoFXJWElNWBjPZMbhg==} + engines: {node: '>=6.6.0'} + + cookie@0.7.2: + resolution: {integrity: sha512-yki5XnKuf750l50uGTllt6kKILY4nQ1eNIQatoXEByZ5dWgnKqbnqmTrBE5B4N7lrMJKQ2ytWMiTO2o0v6Ew/w==} + engines: {node: '>= 0.6'} + + cookie@1.1.1: + resolution: {integrity: sha512-ei8Aos7ja0weRpFzJnEA9UHJ/7XQmqglbRwnf2ATjcB9Wq874VKH9kfjjirM6UhU2/E5fFYadylyhFldcqSidQ==} + engines: {node: '>=18'} + + cookiejar@2.1.4: + resolution: {integrity: sha512-LDx6oHrK+PhzLKJU9j5S7/Y3jM/mUHvD/DeI1WQmJn652iPC5Y4TBzC9l+5OMOXlyTTA+SmVUPm0HQUwpD5Jqw==} + + cors@2.8.6: + resolution: {integrity: sha512-tJtZBBHA6vjIAaF6EnIaq6laBBP9aq/Y3ouVJjEfoHbRBcHBAHYcMh/w8LDrk2PvIMMq8gmopa5D4V8RmbrxGw==} + engines: {node: '>= 0.10'} + + create-require@1.1.1: + resolution: {integrity: sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==} + + cross-spawn@7.0.6: + resolution: {integrity: sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==} + engines: {node: '>= 8'} + + csstype@3.2.3: + resolution: {integrity: sha512-z1HGKcYy2xA8AGQfwrn0PAy+PB7X/GSj3UVJW9qKyn43xWa+gl5nXmU4qqLMRzWVLFC8KusUX8T/0kCiOYpAIQ==} + + d3-array@3.2.1: + resolution: {integrity: sha512-gUY/qeHq/yNqqoCKNq4vtpFLdoCdvyNpWoC/KNjhGbhDuQpAM9sIQQKkXSNpXa9h5KySs/gzm7R88WkUutgwWQ==} + engines: {node: '>=12'} + + d3-array@3.2.4: + resolution: {integrity: sha512-tdQAmyA18i4J7wprpYq8ClcxZy3SC31QMeByyCFyRt7BVHdREQZ5lpzoe5mFEYZUWe+oq8HBvk9JjpibyEV4Jg==} + engines: {node: '>=12'} + + d3-color@3.1.0: + resolution: {integrity: sha512-zg/chbXyeBtMQ1LbD/WSoW2DpC3I0mpmPdW+ynRTj/x2DAWYrIY7qeZIHidozwV24m4iavr15lNwIwLxRmOxhA==} + engines: {node: '>=12'} + + d3-delaunay@6.0.2: + resolution: {integrity: sha512-IMLNldruDQScrcfT+MWnazhHbDJhcRJyOEBAJfwQnHle1RPh6WDuLvxNArUju2VSMSUuKlY5BGHRJ2cYyoFLQQ==} + engines: {node: '>=12'} + + d3-format@3.1.0: + resolution: {integrity: sha512-YyUI6AEuY/Wpt8KWLgZHsIU86atmikuoOmCfommt0LYHiQSPjvX2AcFc38PX0CBpr2RCyZhjex+NS/LPOv6YqA==} + engines: {node: '>=12'} + + d3-geo@3.1.0: + resolution: {integrity: sha512-JEo5HxXDdDYXCaWdwLRt79y7giK8SbhZJbFWXqbRTolCHFI5jRqteLzCsq51NKbUoX0PjBVSohxrx+NoOUujYA==} + engines: {node: '>=12'} + + d3-interpolate@3.0.1: + resolution: {integrity: sha512-3bYs1rOD33uo8aqJfKP3JWPAibgw8Zm2+L9vBKEHJ2Rg+viTR7o5Mmv5mZcieN+FRYaAOWX5SJATX6k1PWz72g==} + engines: {node: '>=12'} + + d3-path@3.1.0: + resolution: {integrity: sha512-p3KP5HCf/bvjBSSKuXid6Zqijx7wIfNW+J/maPs+iwR35at5JCbLUT0LzF1cnjbCHWhqzQTIN2Jpe8pRebIEFQ==} + engines: {node: '>=12'} + + d3-scale@4.0.2: + resolution: {integrity: sha512-GZW464g1SH7ag3Y7hXjf8RoUuAFIqklOAq3MRl4OaWabTFJY9PN/E1YklhXLh+OQ3fM9yS2nOkCoS+WLZ6kvxQ==} + engines: {node: '>=12'} + + d3-shape@3.2.0: + resolution: {integrity: sha512-SaLBuwGm3MOViRq2ABk3eLoxwZELpH6zhl3FbAoJ7Vm1gofKx6El1Ib5z23NUEhF9AsGl7y+dzLe5Cw2AArGTA==} + engines: {node: '>=12'} + + d3-time-format@4.1.0: + resolution: {integrity: sha512-dJxPBlzC7NugB2PDLwo9Q8JiTR3M3e4/XANkreKSUxF8vvXKqm1Yfq4Q5dl8budlunRVlUUaDUgFt7eA8D6NLg==} + engines: {node: '>=12'} + + d3-time@3.1.0: + resolution: {integrity: sha512-VqKjzBLejbSMT4IgbmVgDjpkYrNWUYJnbCGo874u7MMKIWsILRX+OpX/gTk8MqjpT1A/c6HY2dCA77ZN0lkQ2Q==} + engines: {node: '>=12'} + + dateformat@4.6.3: + resolution: {integrity: sha512-2P0p0pFGzHS5EMnhdxQi7aJN+iMheud0UhG4dlE1DLAlvL8JHjJJTX/CSm4JXwV0Ka5nGk3zC5mcb5bUQUxxMA==} + + debug@4.4.3: + resolution: {integrity: sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==} + engines: {node: '>=6.0'} + peerDependencies: + supports-color: '*' + peerDependenciesMeta: + supports-color: + optional: true + + dedent@1.7.2: + resolution: {integrity: sha512-WzMx3mW98SN+zn3hgemf4OzdmyNhhhKz5Ay0pUfQiMQ3e1g+xmTJWp/pKdwKVXhdSkAEGIIzqeuWrL3mV/AXbA==} + peerDependencies: + babel-plugin-macros: ^3.1.0 + peerDependenciesMeta: + babel-plugin-macros: + optional: true + + deepmerge-ts@7.1.5: + resolution: {integrity: sha512-HOJkrhaYsweh+W+e74Yn7YStZOilkoPb6fycpwNLKzSPtruFs48nYis0zy5yJz1+ktUhHxoRDJ27RQAWLIJVJw==} + engines: {node: '>=16.0.0'} + + deepmerge@4.3.1: + resolution: {integrity: sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A==} + engines: {node: '>=0.10.0'} + + defaults@1.0.4: + resolution: {integrity: sha512-eFuaLoy/Rxalv2kr+lqMlUnrDWV+3j4pljOIJgLIhI058IQfWJ7vXhyEIHu+HtC738klGALYxOKDO0bQP3tg8A==} + + defu@6.1.7: + resolution: {integrity: sha512-7z22QmUWiQ/2d0KkdYmANbRUVABpZ9SNYyH5vx6PZ+nE5bcC0l7uFvEfHlyld/HcGBFTL536ClDt3DEcSlEJAQ==} + + delaunator@5.1.0: + resolution: {integrity: sha512-AGrQ4QSgssa1NGmWmLPqN5NY2KajF5MqxetNEO+o0n3ZwZZeTmt7bBnvzHWrmkZFxGgr4HdyFgelzgi06otLuQ==} + + delayed-stream@1.0.0: + 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'} + + dequal@2.0.3: + resolution: {integrity: sha512-0je+qPKHEMohvfRTCEo3CrPG6cAzAYgmzKyxRiYSSDkS6eGJdyVJm7WaYA5ECaAD9wLB2T4EEeymA5aFVcYXCA==} + engines: {node: '>=6'} + + destr@2.0.5: + resolution: {integrity: sha512-ugFTXCtDZunbzasqBxrK93Ik/DRYsO6S/fedkWEMKqt04xZ4csmnmwGDBAb07QWNaGMAmnTIemsYZCksjATwsA==} + + detect-libc@2.1.2: + resolution: {integrity: sha512-Btj2BOOO83o3WyH59e8MgXsxEQVcarkUOpEYrubB0urwnN10yQ364rsiByU11nZlqWYZm05i/of7io4mzihBtQ==} + engines: {node: '>=8'} + + detect-newline@3.1.0: + resolution: {integrity: sha512-TLz+x/vEXm/Y7P7wn1EJFNLxYpUD4TgMosxY6fAVJUnJMbupHBOncxyWUG9OpTaH9EBD7uFI5LfEgmMOc54DsA==} + engines: {node: '>=8'} + + dezalgo@1.0.4: + resolution: {integrity: sha512-rXSP0bf+5n0Qonsb+SVVfNfIsimO4HEtmnIpPHY8Q1UCzKlQrDMfdobr8nJOOsRgWCyMRqeSBQzmWUMq7zvVig==} + + diff@4.0.4: + resolution: {integrity: sha512-X07nttJQkwkfKfvTPG/KSnE2OMdcUCao6+eXF3wmnIQRn2aPAHH3VxDbDOdegkd6JbPsXqShpvEOHfAT+nCNwQ==} + engines: {node: '>=0.3.1'} + + dotenv@17.4.2: + resolution: {integrity: sha512-nI4U3TottKAcAD9LLud4Cb7b2QztQMUEfHbvhTH09bqXTxnSie8WnjPALV/WMCrJZ6UV/qHJ6L03OqO3LcdYZw==} + engines: {node: '>=12'} + + dotenv@18.0.7: + resolution: {integrity: sha512-QEvMEF8ca3GNZJJnAbOgxpj5ULhBvnMcURp+XKrtvqFNPgjBvYoswQ0Jl2cO7JzCjxZjJhr9ZuIEhlrRxMft/Q==} + engines: {node: '>=12'} + hasBin: true + + dunder-proto@1.0.1: + resolution: {integrity: sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A==} + engines: {node: '>= 0.4'} + + eastasianwidth@0.2.0: + resolution: {integrity: sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==} + + ee-first@1.1.1: + resolution: {integrity: sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==} + + effect@3.20.0: + resolution: {integrity: sha512-qMLfDJscrNG8p/aw+IkT9W7fgj50Z4wG5bLBy0Txsxz8iUHjDIkOgO3SV0WZfnQbNG2VJYb0b+rDLMrhM4+Krw==} + + electron-to-chromium@1.5.433: + resolution: {integrity: sha512-5lCAbyZBjtmUt/RAGHRqrL2q0oEFRThDAsZHHDn9XHa89Qw7gMYOeSicBTy+AHfvo0r6vwsZvqNJTQIQy1BLzA==} + + elkjs@0.11.1: + resolution: {integrity: sha512-zxxR9k+rx5ktMwT/FwyLdPCrq7xN6e4VGGHH8hA01vVYKjTFik7nHOxBnAYtrgYUB1RpAiLvA1/U2YraWxyKKg==} + + emittery@0.13.1: + resolution: {integrity: sha512-DeWwawk6r5yR9jFgnDKYt4sLS0LmHJJi3ZOnb5/JdbYwj3nW+FxQnHIjhBKz8YLC7oRNPVM9NQ47I3CVx34eqQ==} + engines: {node: '>=12'} + + emoji-regex@8.0.0: + resolution: {integrity: sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==} + + emoji-regex@9.2.2: + resolution: {integrity: sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==} + + emojilib@2.4.0: + resolution: {integrity: sha512-5U0rVMU5Y2n2+ykNLQqMoqklN9ICBT/KsvC1Gz6vqHbz2AXXGkG+Pm5rMWk/8Vjrr/mY9985Hi8DYzn1F09Nyw==} + + empathic@2.0.0: + resolution: {integrity: sha512-i6UzDscO/XfAcNYD75CfICkmfLedpyPDdozrLMmQc5ORaQcdMoc21OnlEylMIqI7U8eniKrPMxxtj8k0vhmJhA==} + engines: {node: '>=14'} + + encodeurl@2.0.0: + resolution: {integrity: sha512-Q0n9HRi4m6JuGIV1eFlmvJB7ZEVxu93IrMyiMsGC0lrMJMWzRgx6WGquyfQgZVb31vhGgXnfmPNNXmxnOkRBrg==} + engines: {node: '>= 0.8'} + + end-of-stream@1.4.5: + resolution: {integrity: sha512-ooEGc6HP26xXq/N+GCGOT0JKCLDGrq2bQUZrQ7gyrJiZANJ/8YDTxTpQBXGMn+WbIQXNVpyWymm7KYVICQnyOg==} + + enhanced-resolve@5.25.1: + resolution: {integrity: sha512-nGXts5znJzmWPu+mIE9izCOzdg63oJca2mDzGWWTth7sr4aCToKcoyFVBQwN75Ij5Pf6p510EwkTqViTRzDV+w==} + engines: {node: '>=10.13.0'} + + env-paths@3.0.0: + resolution: {integrity: sha512-dtJUTepzMW3Lm/NPxRf3wP4642UWhjL2sQxc+ym2YMj1m/H2zDNQOlezafzkHwn6sMstjHTwG6iQQsctDW/b1A==} + engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} + + error-ex@1.3.4: + resolution: {integrity: sha512-sqQamAnR14VgCr1A618A3sGrygcpK+HEbenA/HiEAkkUwcZIIB/tgWqHFxWgOyDh4nB4JCRimh79dR5Ywc9MDQ==} + + es-define-property@1.0.1: + resolution: {integrity: sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g==} + engines: {node: '>= 0.4'} + + es-errors@1.3.0: + resolution: {integrity: sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==} + engines: {node: '>= 0.4'} + + es-module-lexer@2.3.2: + resolution: {integrity: sha512-poHGpORABojJJucnV9KbOavETW8lBVnphkW77ER5/BQ5Fz7oXSoCNek7IH3vR5nRjdsEz926ibFYX8KtLQmdyw==} + + es-object-atoms@1.1.2: + resolution: {integrity: sha512-HWcBoN6NileqtSydK2FqHbS/LoDd2pqrnQHLyJzBj4kOp/ky2MWMN694xOfkK8/SnUsW2DH7EfyVlydKCsm1Zw==} + engines: {node: '>= 0.4'} + + es-set-tostringtag@2.1.0: + resolution: {integrity: sha512-j6vWzfrGVfyXxge+O0x5sh6cvxAog0a/4Rdd2K36zCMV5eJ+/+tOAngRO8cODMNWbVRdVlmGZQL2YS3yR8bIUA==} + engines: {node: '>= 0.4'} + + es-toolkit@1.51.0: + resolution: {integrity: sha512-zC2lQGkM7QX+Gm6iM3+WIdZJzthsEd14LvRNJneSO2hzyz/zNBENR8+YXWo1cKxgPBtV6ksPYHELbcwBRzmdCw==} + + escalade@3.2.0: + resolution: {integrity: sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==} + engines: {node: '>=6'} + + escape-html@1.0.3: + resolution: {integrity: sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow==} + + escape-string-regexp@1.0.5: + resolution: {integrity: sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==} + engines: {node: '>=0.8.0'} + + escape-string-regexp@2.0.0: + resolution: {integrity: sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w==} + engines: {node: '>=8'} + + esprima@4.0.1: + resolution: {integrity: sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==} + engines: {node: '>=4'} + hasBin: true + + etag@1.8.1: + resolution: {integrity: sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg==} + engines: {node: '>= 0.6'} + + events@3.3.0: + resolution: {integrity: sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q==} + engines: {node: '>=0.8.x'} + + execa@5.1.1: + resolution: {integrity: sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==} + engines: {node: '>=10'} + + exit-x@0.2.2: + resolution: {integrity: sha512-+I6B/IkJc1o/2tiURyz/ivu/O0nKNEArIUB5O7zBrlDVJr22SCLH3xTeEry428LvFhRzIA1g8izguxJ/gbNcVQ==} + engines: {node: '>= 0.8.0'} + + expect@30.5.2: + resolution: {integrity: sha512-0LNuMvs8/5mRYhnCR4k+lGV7fqPMs6Bnksda4S3zsCUmdxBpAn4zU4NNzXdq1pMKe/H4W5t/zVIDSJ/H3e0vDA==} + engines: {node: ^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0} + + express@5.2.1: + resolution: {integrity: sha512-hIS4idWWai69NezIdRt2xFVofaF4j+6INOpJlVOLDO8zXGpUVEVzIYk12UUi2JzjEzWL3IOAxcTubgz9Po0yXw==} + engines: {node: '>= 18'} + + exsolve@1.1.3: + resolution: {integrity: sha512-kuzL9zherLQoqDeQaS55AiiIg1kb4KYXaSusTtgZTPlvKP2gGCI82LNmBNh5RjDVUXIcmgx+/Mx7vPwRzBbhJA==} + + external-editor@3.1.0: + resolution: {integrity: sha512-hMQ4CX1p1izmuLYyZqLMO/qGNw10wSv9QDCPfzXfyFrOaCSSoRfqE1Kf1s5an66J5JZC62NewG+mK49jOCtQew==} + engines: {node: '>=4'} + + fast-check@3.23.2: + resolution: {integrity: sha512-h5+1OzzfCC3Ef7VbtKdcv7zsstUQwUDlYpUTvjeUsJAssPgLn7QzbboPtL5ro04Mq0rPOsMzl7q5hIbRs2wD1A==} + engines: {node: '>=8.0.0'} + + fast-copy@4.1.1: + resolution: {integrity: sha512-A4QTJmuiztpGtr6AMeJts9R4hbj2ZBUwtOaKrG6rw2y7t6+IaJKjz5M3XDs8BUznxDH43FVc6A0y/gWlMl4UtA==} + + fast-decode-uri-component@1.0.1: + resolution: {integrity: sha512-WKgKWg5eUxvRZGwW8FvfbaH7AXSh2cL+3j5fMGzUMCxWBJ3dV3a7Wz8y2f/uQ0e3B6WmodD3oS54jTQ9HVTIIg==} + + fast-deep-equal@3.1.3: + resolution: {integrity: sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==} + + fast-json-stable-stringify@2.1.0: + resolution: {integrity: sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==} + + fast-json-stringify@7.0.1: + resolution: {integrity: sha512-eRSayARSbbwlBjpP4vnTTIRD5QPcIrmihPxDeN1DtKnHPg66UuJLx+8hlK1kaFdjvzyQ/dzALoi4vwAQ+T+iZA==} + + fast-querystring@1.1.2: + resolution: {integrity: sha512-g6KuKWmFXc0fID8WWH0jit4g0AGBoJhCkJMb1RmbsSEUNvQ+ZC8D6CUZ+GtF8nMzSPXnhiePyyqqipzNNEnHjg==} + + fast-safe-stringify@2.1.1: + resolution: {integrity: sha512-W+KJc2dmILlPplD/H4K9l9LcAHAfPtP6BY84uVLXQ6Evcz9Lcg33Y2z1IVblT6xdY54PXYVHEv+0Wpq8Io6zkA==} + + fast-string-truncated-width@3.0.3: + resolution: {integrity: sha512-0jjjIEL6+0jag3l2XWWizO64/aZVtpiGE3t0Zgqxv0DPuxiMjvB3M24fCyhZUO4KomJQPj3LTSUnDP3GpdwC0g==} + + fast-string-width@3.0.2: + resolution: {integrity: sha512-gX8LrtNEI5hq8DVUfRQMbr5lpaS4nMIWV+7XEbXk2b8kiQIizgnlr12B4dA3ZEx3308ze0O4Q1R+cHts8kyUJg==} + + fast-uri@3.1.8: + resolution: {integrity: sha512-GZMtZUTNRpOVIECoXwLNZS5xUGE+mVNbTB8h/7Rwh2TFWcBQiPzTgyZi05BF9UMZKkLJv8XBRJTlU7zg8+ZfMg==} + + fast-uri@4.2.1: + resolution: {integrity: sha512-TmHQgewjHtMq1E5QKA0tOE0yeYGQs25KZC/ziJpubRtWI15W92e6vPFydWOeZBVROSHBYw/QhD9d5OefdD6LDg==} + + fast-wrap-ansi@0.2.2: + resolution: {integrity: sha512-7F2Fl+TjRSenLqlU3UjSH0iyqopqoZIu7eZVpEirP2g1GtWa2G/ecEmBdgz31+Mxr+ELclgg6sokpSFIQiZ02Q==} + + fastify-plugin@6.0.0: + resolution: {integrity: sha512-fZOty7z3O7vOliF6d8bHE3wiEh1KcNnKEQensSgTk9C1DvN6nRLS++XVd86v33Hw/8u9Un8A1zDrQ8ujcQDHEg==} + + fastify@5.12.1: + resolution: {integrity: sha512-FWi+tQvwxR/PeRX7Z2mhfEF5ozJ3jn9asiiclzKXNSzJRHAYcU924aIOKAdHFJ+YIKieh3cqr1IwCOvTr41B3Q==} + + fastq@1.20.3: + resolution: {integrity: sha512-XKv5nnLs6nLF71NgiKJLIZFLkPyIEuOselLG7ujZnGrRfQK8HpvY+WqKhAJUAdLomwVHErVS4LfxFlPq0/FTAw==} + + fb-watchman@2.0.2: + resolution: {integrity: sha512-p5161BqbuCaSnB8jIbzQHOlpgsPmK5rJVDfDKO91Axs5NC1uu3HRQm6wt9cd9/+GtQQIO53JdGXXoyDpTAsgYA==} + + fdir@6.5.0: + resolution: {integrity: sha512-tIbYtZbucOs0BRGqPJkshJUYdL+SDH7dVM8gjy+ERp3WAUjLEFJE+02kanyHtwjWOnwrKYBiwAmM0p4kLJAnXg==} + engines: {node: '>=12.0.0'} + peerDependencies: + picomatch: ^3 || ^4 + peerDependenciesMeta: + picomatch: + optional: true + + figures@3.2.0: + resolution: {integrity: sha512-yaduQFRKLXYOGgEn6AZau90j3ggSOyiqXU0F9JZfeXYhNa+Jk4X+s45A2zg5jns87GAFa34BBm2kXw4XpNcbdg==} + engines: {node: '>=8'} + + file-type@22.1.1: + resolution: {integrity: sha512-sEB0oStmeLGtpmSAD88RDNuLsvhv4iC3u0lE25CUvfCULvj49xoQ3l3K525Vn+ZzsZ6DOLajQCV6RmhwwhqiJg==} + engines: {node: '>=22'} + + finalhandler@2.1.1: + resolution: {integrity: sha512-S8KoZgRZN+a5rNwqTxlZZePjT/4cnm0ROV70LedRHZ0p8u9fRID0hJUZQpkKLzro8LfmC8sx23bY6tVNxv8pQA==} + engines: {node: '>= 18.0.0'} + + find-my-way@9.7.0: + resolution: {integrity: sha512-f2JHn75x2JlwUwLenZypgczR7YWMb/uO9BvUXtus+JMgkbIkLADd38cI4EiV+OQqrGo1Zlq6V8wnqMJ8e62wUQ==} + engines: {node: '>=20'} + + find-my-way@9.9.0: + resolution: {integrity: sha512-sJsgZ1sQH2UDuowPuMKg8az7Qc8F0jnj+SKkFWU/+T0xcFlgV5skgXOGUqmQzOdmW6ALA7AhJINWx3qFBkbLHA==} + engines: {node: '>=20'} + + find-up@4.1.0: + resolution: {integrity: sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==} + engines: {node: '>=8'} + + foreground-child@3.3.1: + resolution: {integrity: sha512-gIXjKqtFuWEgzFRJA9WCQeSJLZDjgJUOMCMzxtvFq/37KojM1BFGufqsCy0r4qSQmYLsZYMeyRqzIWOMup03sw==} + engines: {node: '>=14'} + + form-data@4.0.6: + resolution: {integrity: sha512-vKatAh4SlVfgbv+YtmhiRjhEMJsYpsG1Y2rMQtR+SVSbytsSD1YGzDIcrAJmdFec88u/+VoGmxnl+80gL1tRCQ==} + engines: {node: '>= 6'} + + formidable@3.5.4: + resolution: {integrity: sha512-YikH+7CUTOtP44ZTnUhR7Ic2UASBPOqmaRkRKxRbywPTe5VxF7RRCck4af9wutiZ/QKM5nME9Bie2fFaPz5Gug==} + engines: {node: '>=14.0.0'} + + forwarded@0.2.0: + resolution: {integrity: sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow==} + engines: {node: '>= 0.6'} + + fresh@2.0.0: + resolution: {integrity: sha512-Rx/WycZ60HOaqLKAi6cHRKKI7zxWbJ31MhntmtwMoaTeF7XFH9hhBp8vITaMidfljRQ6eYWCKkaTK+ykVJHP2A==} + engines: {node: '>= 0.8'} + + function-bind@1.1.2: + resolution: {integrity: sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==} + + 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'} + + get-caller-file@2.0.5: + resolution: {integrity: sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==} + engines: {node: 6.* || 8.* || >= 10.*} + + get-east-asian-width@1.7.0: + resolution: {integrity: sha512-XjH1AECxf0giL2V1aU8vKyRR2ppRUb5c0EvT7zuJTokQ74bNo52zOtghqdWIqrhUD79fo3x0WfKZdOqxF6LG1Q==} + engines: {node: '>=18'} + + get-intrinsic@1.3.0: + resolution: {integrity: sha512-9fSjSaos/fRIVIp+xSJlE6lfwhES7LNtKaCBIamHsjr2na1BiABJPo0mOjjz8GJDURarmCPGqaiVg5mfjb98CQ==} + engines: {node: '>= 0.4'} + + get-package-type@0.1.0: + resolution: {integrity: sha512-pjzuKtY64GYfWizNAJ0fr9VqttZkNiK2iS430LtIHzjBEr6bX8Am2zm4sW4Ro5wjWW5cAlRL1qAMTcXbjNAO2Q==} + engines: {node: '>=8.0.0'} + + get-port-please@3.2.0: + resolution: {integrity: sha512-I9QVvBw5U/hw3RmWpYKRumUeaDgxTPd401x364rLmWBJcOQ753eov1eTgzDqRG9bqFIfDc7gfzcQEWrUri3o1A==} + + get-proto@1.0.1: + resolution: {integrity: sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g==} + engines: {node: '>= 0.4'} + + get-stream@6.0.1: + resolution: {integrity: sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==} + engines: {node: '>=10'} + + giget@3.3.1: + resolution: {integrity: sha512-r+mvuDjrjMpsdw46Kmeydb8bdHm7wOKw8wNBtTndkjbPjgAp5oUJUxRE76wZFknxIPokfWvep2qSXK37aXE6zg==} + hasBin: true + + glob@10.5.0: + resolution: {integrity: sha512-DfXN8DfhJ7NH3Oe7cFmu3NCu1wKbkReJ8TorzSAFbSKrlNaQSKfIzqYqVY8zlbs2NLBbWpRiU52GX2PbaBVNkg==} + deprecated: Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me + hasBin: true + + glob@13.0.6: + resolution: {integrity: sha512-Wjlyrolmm8uDpm/ogGyXZXb1Z+Ca2B8NbJwqBVg0axK9GbBeoS7yGV6vjXnYdGm6X53iehEuxxbyiKp8QmN4Vw==} + engines: {node: 18 || 20 || >=22} + + gopd@1.2.0: + resolution: {integrity: sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg==} + engines: {node: '>= 0.4'} + + graceful-fs@4.2.11: + resolution: {integrity: sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==} + + grammex@3.1.13: + resolution: {integrity: sha512-LnPnhOBLEJEVKS8WFDVaA397L9Kq55Q9oSITJiVLHVdhAclfUkWzQv74KhvZHKL2Q09Pb1XdsrOsZ4LfTFFTEg==} + + graphmatch@1.1.1: + resolution: {integrity: sha512-5ykVn/EXM1hF0XCaWh05VbYvEiOL2lY1kBxZtaYsyvjp7cmWOU1XsAdfQBwClraEofXDT197lFbXOEVMHpvQOg==} + + handlebars@4.7.9: + resolution: {integrity: sha512-4E71E0rpOaQuJR2A3xDZ+GM1HyWYv1clR58tC8emQNeQe3RH7MAzSbat+V0wG78LQBo6m6bzSG/L4pBuCsgnUQ==} + engines: {node: '>=0.4.7'} + hasBin: true + + has-flag@4.0.0: + resolution: {integrity: sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==} + engines: {node: '>=8'} + + has-symbols@1.1.0: + resolution: {integrity: sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ==} + engines: {node: '>= 0.4'} + + has-tostringtag@1.0.2: + resolution: {integrity: sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==} + engines: {node: '>= 0.4'} + + hasown@2.0.4: + resolution: {integrity: sha512-T2UbfbBEF32wiepXIsMlTW9+dDYC6wMh/t/vYA4tuOMKqWz/n3vr1NFSxQiyP+zk2mXsoMA/i/7qV6LKut1t1A==} + engines: {node: '>= 0.4'} + + help-me@5.0.0: + resolution: {integrity: sha512-7xgomUX6ADmcYzFik0HzAxh/73YlKR9bmFzf51CZwR+b6YtzU2m0u49hQCqV6SvlqIqsaxovfwdvbnsw3b/zpg==} + + html-escaper@2.0.2: + resolution: {integrity: sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg==} + + http-errors@2.0.1: + resolution: {integrity: sha512-4FbRdAX+bSdmo4AUFuS0WNiPz8NgFt+r8ThgNWmlrjQjt1Q7ZR9+zTlce2859x4KSXrwIsaeTqDoKQmtP8pLmQ==} + engines: {node: '>= 0.8'} + + human-signals@2.1.0: + resolution: {integrity: sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==} + engines: {node: '>=10.17.0'} + + iconv-lite@0.4.24: + resolution: {integrity: sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==} + engines: {node: '>=0.10.0'} + + iconv-lite@0.7.3: + resolution: {integrity: sha512-IKXpvIzjnC9XTAUbVBcMfGS0EPaIXtW6v+zr+RRp+hqULEpo0owZax6wyRwPOJbWbzjYspQwusTsfVr0ifh4uQ==} + engines: {node: '>=0.10.0'} + + ieee754@1.2.1: + resolution: {integrity: sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==} + + import-local@3.2.0: + resolution: {integrity: sha512-2SPlun1JUPWoM6t3F0dw0FkCF/jWY8kttcY4f599GLTSjh2OCuuhdTkJQsEcZzBqbXZGKMK2OqW1oZsjtf/gQA==} + engines: {node: '>=8'} + hasBin: true + + imurmurhash@0.1.4: + resolution: {integrity: sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==} + engines: {node: '>=0.8.19'} + + inherits@2.0.4: + resolution: {integrity: sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==} + + inquirer@8.2.6: + resolution: {integrity: sha512-M1WuAmb7pn9zdFRtQYk26ZBoY043Sse0wVDdk4Bppr+JOXyQYybdtvK+l9wUibhtjdjvtoiNy8tk+EgsYIUqKg==} + engines: {node: '>=12.0.0'} + + internmap@2.0.3: + resolution: {integrity: sha512-5Hh7Y1wQbvY5ooGgPbDaL5iYLAPzMTUrjMulskHLH6wnv/A+1q5rgEaiuqEjB+oxGXIVZs1FF+R/KPN3ZSQYYg==} + engines: {node: '>=12'} + + ioredis@6.0.0: + resolution: {integrity: sha512-f+Dtubxfpf6KYFq7WVXJoOLn0bk4TJrMrN9SzeE+jrWrCWj7XX3fA6vkryafhADX+GMymRxgDJDOI33COkJc0w==} + engines: {node: '>=20.0.0'} + + ipaddr.js@1.9.1: + resolution: {integrity: sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==} + engines: {node: '>= 0.10'} + + ipaddr.js@2.5.0: + resolution: {integrity: sha512-aq+t5NAc+cS6rZQQVWC2x98CPqGtKKTMDd4Gaodv0wShnItdKg/51djkGJ1hqH+Oy0ivDftCbSLCQob8zso01w==} + engines: {node: '>= 10'} + + is-arrayish@0.2.1: + resolution: {integrity: sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==} + + is-extglob@2.1.1: + resolution: {integrity: sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==} + engines: {node: '>=0.10.0'} + + is-fullwidth-code-point@3.0.0: + resolution: {integrity: sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==} + engines: {node: '>=8'} + + is-generator-fn@2.1.0: + resolution: {integrity: sha512-cTIB4yPYL/Grw0EaSzASzg6bBy9gqCofvWN8okThAYIxKJZC+udlRAmGbM0XLeniEJSs8uEgHPGuHSe1XsOLSQ==} + engines: {node: '>=6'} + + is-glob@4.0.3: + resolution: {integrity: sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==} + engines: {node: '>=0.10.0'} + + is-interactive@1.0.0: + resolution: {integrity: sha512-2HvIEKRoqS62guEC+qBjpvRubdX910WCMuJTZ+I9yvqKU2/12eSL549HMwtabb4oupdj2sMP50k+XJfB/8JE6w==} + engines: {node: '>=8'} + + is-interactive@2.0.0: + resolution: {integrity: sha512-qP1vozQRI+BMOPcjFzrjXuQvdak2pHNUMZoeG2eRbiSqyvbEf/wQtEOTOX1guk6E3t36RkaqiSt8A/6YElNxLQ==} + engines: {node: '>=12'} + + is-promise@4.0.0: + resolution: {integrity: sha512-hvpoI6korhJMnej285dSg6nu1+e6uxs7zG3BYAm5byqDsgJNWwxzM6z6iZiAgQR4TJ30JmBTOwqZUw3WlyH3AQ==} + + is-property@1.0.2: + resolution: {integrity: sha512-Ks/IoX00TtClbGQr4TWXemAnktAQvYB7HzcCxDGqEZU6oCmb2INHuOoKxbtR+HFkmYWBKv/dOZtGRiAjDhj92g==} + + is-stream@2.0.1: + resolution: {integrity: sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==} + engines: {node: '>=8'} + + is-unicode-supported@0.1.0: + resolution: {integrity: sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==} + engines: {node: '>=10'} + + is-unicode-supported@2.1.0: + resolution: {integrity: sha512-mE00Gnza5EEB3Ds0HfMyllZzbBrmLOX3vfWoj9A9PEnTfratQ/BcaJOuMhnkhjXvb2+FkY3VuHqtAGpTPmglFQ==} + engines: {node: '>=18'} + + isexe@2.0.0: + resolution: {integrity: sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==} + + istanbul-lib-coverage@3.2.2: + resolution: {integrity: sha512-O8dpsF+r0WV/8MNRKfnmrtCWhuKjxrq2w+jpzBL5UZKTi2LeVWnWOmWRxFlesJONmc+wLAGvKQZEOanko0LFTg==} + engines: {node: '>=8'} + + istanbul-lib-instrument@6.0.3: + resolution: {integrity: sha512-Vtgk7L/R2JHyyGW07spoFlB8/lpjiOLTjMdms6AFMraYt3BaJauod/NGrfnVG/y4Ix1JEuMRPDPEj2ua+zz1/Q==} + engines: {node: '>=10'} + + istanbul-lib-report@3.0.1: + resolution: {integrity: sha512-GCfE1mtsHGOELCU8e/Z7YWzpmybrx/+dSTfLrvY8qRmaY6zXTKWn6WQIjaAFw069icm6GVMNkgu0NzI4iPZUNw==} + engines: {node: '>=10'} + + istanbul-lib-source-maps@5.0.6: + resolution: {integrity: sha512-yg2d+Em4KizZC5niWhQaIomgf5WlL4vOOjZ5xGCmF8SnPE/mDWWXgvRExdcpCgh9lLRRa1/fSYp2ymmbJ1pI+A==} + engines: {node: '>=10'} + + istanbul-reports@3.2.0: + resolution: {integrity: sha512-HGYWWS/ehqTV3xN10i23tkPkpH46MLCIMFNCaaKNavAXTF1RkqxawEPtnjnGZ6XKSInBKkiOA5BKS+aZiY3AvA==} + engines: {node: '>=8'} + + iterare@1.2.1: + resolution: {integrity: sha512-RKYVTCjAnRthyJes037NX/IiqeidgN1xc3j1RjFfECFp28A1GVwK9nA+i0rJPaHqSZwygLzRnFlzUuHFoWWy+Q==} + engines: {node: '>=6'} + + jackspeak@3.4.3: + resolution: {integrity: sha512-OGlZQpz2yfahA/Rd1Y8Cd9SIEsqvXkLVoSw/cgwhnhFMDbsQFeZYoJJ7bIZBS9BcamUW96asq/npPWugM+RQBw==} + + jest-changed-files@30.5.1: + resolution: {integrity: sha512-0+bvMM/ENhDI29Z8q1r4HxiDIi4G5tnBmSw4esfPQoj9q8Nik7KIyuxHkTVnnniJQf05SxpGaKDQ+4h28ynGPg==} + engines: {node: ^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0} + + jest-circus@30.5.2: + resolution: {integrity: sha512-vffFgjs5JSJ9q4ds1vNW3klKYPJfYfIY61LT/zaZgvTeASJOWZUt8LBfHgIcV4rwxlPBLl/ePBGccHEclS4PlQ==} + engines: {node: ^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0} + + jest-cli@30.5.2: + resolution: {integrity: sha512-YYYxUUVjFgPvgEleKNKMaYGIFgR3l3832Cl0kRL/oCiDZ03v7wImUtquHl2OOBCCNgprjZgBN5bczS/JklPBDg==} + engines: {node: ^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0} + hasBin: true + peerDependencies: + node-notifier: ^8.0.1 || ^9.0.0 || ^10.0.0 + peerDependenciesMeta: + node-notifier: + optional: true + + jest-config@30.5.2: + resolution: {integrity: sha512-U6221OZekabePvGcGPf4raIBKMvYQWFHvhobDJRojOYaFMj2HaGytAdknjDhYc6JTz2fdHW9+6k0wWUDaNeOFQ==} + engines: {node: ^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0} + peerDependencies: + '@types/node': '*' + esbuild-register: '>=3.4.0' + ts-node: '>=9.0.0' + peerDependenciesMeta: + '@types/node': + optional: true + esbuild-register: + optional: true + ts-node: + optional: true + + jest-diff@30.5.2: + resolution: {integrity: sha512-rBtHnI6BWTiWj3lM7fOLVfChx7R9B0u9VV3PRHawKs79x6ZjW1QoSrKenaigNGWlvhtoi2BqvDbABDie+Os3xQ==} + engines: {node: ^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0} + + jest-docblock@30.5.0: + resolution: {integrity: sha512-NwDqcxtoZi33RhuW+zJS/RVA3rmheQ8BnwpYZuc/Eruaz6seQb7+aoCeDZu/3X7W2XmD8DbSo9Pn72DbKsBFYw==} + engines: {node: ^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0} + + jest-each@30.5.2: + resolution: {integrity: sha512-GRrW+7fmmgmkvyfEBqc1QFdWnF1Ex5yG6Y6AWL4TTxnkWlKIT98dsKh3P3UuWm6v4XsQwVE6DEzXIPMzWJ3ZbA==} + engines: {node: ^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0} + + jest-environment-node@30.5.2: + resolution: {integrity: sha512-Ciz4KgTGIbojxSKpuFImgWJj5EyqfE8xMq9NxWmOXnQywHHS03H9Mv+vaCB29J5pr3JBrY27WbRV18rBdjh8Dg==} + engines: {node: ^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0} + + jest-haste-map@30.5.1: + resolution: {integrity: sha512-VIFgt67jW480YDxKfEv9IYQKrFpYt7bOCMn3VsnjK7AK9qo7p6acpnA1DHwsVOULE3dTaYew/6JaTD/d0VDHoQ==} + engines: {node: ^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0} + + jest-leak-detector@30.5.1: + resolution: {integrity: sha512-gt4GT2aWgEoCNTcBe4rqS74xTIUJxi+UD9SNSu9aOk5LmTEd6fS5KSTmAKAfitCCktQHNN+upUuL6EkBfFbMDQ==} + engines: {node: ^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0} + + jest-matcher-utils@30.5.2: + resolution: {integrity: sha512-lFkB365PTIHOhPzwrb9T6gvlDnPpOZ7/c3ewOKKB7bzztqjVrtlyRL2MkyfJXpyY2u2SKw001JKrTx14fBUFcQ==} + engines: {node: ^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0} + + jest-message-util@30.5.1: + resolution: {integrity: sha512-UdQlLdd9wL/Ys7xRErckqwD6wPlSZYueosSWuHc1r2ztGLwlgPvtSJq2+BPEgaEY13WLvfFbmhTj8pba0Sd1jg==} + engines: {node: ^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0} + + jest-mock@30.5.2: + resolution: {integrity: sha512-KTHb37Fhj8xY8qPFvTFaFJHcdsumQp+ExsUlgoX232Agmc706gagBs53+CYvulV7MVQo9AgXOUxsqzzVBoJlrA==} + engines: {node: ^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0} + + jest-regex-util@30.5.0: + resolution: {integrity: sha512-Mg0WK7A6xRHLSA1udJ8y9f3lM0uUhFTBnLKzwPmqB9AylvpleJ6BLemR8K9dK27DY+cesDryoA7yLZCAHsPG1A==} + engines: {node: ^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0} + + jest-resolve-dependencies@30.5.2: + resolution: {integrity: sha512-GMI0DP5enX9Z2qW2zFy1bOkrCfWAOPRJQ7qHt0pdfrxBPsgWxglMPrRSK2TX/wRWYxcPRSLFg3Z88qPOzHx7FQ==} + engines: {node: ^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0} + + jest-resolve@30.5.1: + resolution: {integrity: sha512-wprhLejRtwN6h8ZgaqC0eYjGJ1uMdGPT/+b3eFncbG4NWuuP9QL+vWwRinu9waw7hkOLcpMJGVJAMgBwsPssMQ==} + engines: {node: ^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0} + + jest-runner@30.5.2: + resolution: {integrity: sha512-/B6px7hiiNhVSRwuv9AGn0nawYvwsHeQZ3ItTd5Gp2diFd0EOKaWVeWqcbw3L88vx1GfpCKjQkxWItZCTl11Rw==} + engines: {node: ^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0} + + jest-runtime@30.5.2: + resolution: {integrity: sha512-0paUAHBlheai10A3XSy9Xh+YBG0IROy+/qzcDPzQ/nbbXrznQzeWy5qniICWK6d3W3scaRQCVAbXdcK0ibBq4w==} + engines: {node: ^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0} + + jest-snapshot@30.5.2: + resolution: {integrity: sha512-jKIdes25AnAH73dOCi2qE6J6vHJ6L2vyBS11M89kT50DVJcLTf2AOjvcc+2vVaN8lUbY5v2R83aqXo3Ro9fqYA==} + engines: {node: ^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0} + + jest-util@30.5.1: + resolution: {integrity: sha512-yKuxmNy2rSbTXw+3SIPanJo+nV4/BS1p26v44IYBFMsswSQySfMMcPHErnOncda7i9HEz0q605rIhSTBVgrZTg==} + engines: {node: ^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0} + + jest-validate@30.5.1: + resolution: {integrity: sha512-i/buJ56wTpxihE93hQYNMfdOThS87+HGvLZzZJmU4xggPcdTYQq051iwALLCHp3q+SkCGH+EFejQZz5EbBSkkg==} + engines: {node: ^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0} + + jest-watcher@30.5.2: + resolution: {integrity: sha512-rqRgg4R11GA9m1UsEZwQeixHsgZReCn6TOHAHtIH33yXrIvoX0OGPA20Yzzjkz7X40fZvcRSxEpQppYPcWzmcQ==} + engines: {node: ^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0} + + jest-worker@27.5.1: + resolution: {integrity: sha512-7vuh85V5cdDofPyxn58nrPjBktZo0u9x1g8WtjQol+jZDaE+fhN+cIvTj11GndBnMnyfrUOG1sZQxCdjKh+DKg==} + engines: {node: '>= 10.13.0'} + + jest-worker@30.5.1: + resolution: {integrity: sha512-Cbxh5v7AoLuFRmFJSM4/aHdQ68rjXvUWr716EE0Dh3I7T+T/3FgFKhOERGXHcU2Meftq9+9zxPM3TSNyI9D+HA==} + engines: {node: ^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0} + + jest@30.5.2: + resolution: {integrity: sha512-3gnpdBIza8ijCl3iMV9ChE3hSt1+46865qqod863gQtJr1DixOkAU5DoGbi3u+XlRcw++BhZQMu/y4xBdHBvSQ==} + engines: {node: ^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0} + hasBin: true + peerDependencies: + node-notifier: ^8.0.1 || ^9.0.0 || ^10.0.0 + peerDependenciesMeta: + node-notifier: + optional: true + + jiti@2.7.0: + resolution: {integrity: sha512-AC/7JofJvZGrrneWNaEnJeOLUx+JlGt7tNa0wZiRPT4MY1wmfKjt2+6O2p2uz2+skll8OZZmJMNqeke7kKbNgQ==} + hasBin: true + + joycon@3.1.1: + resolution: {integrity: sha512-34wB/Y7MW7bzjKRjUKTa46I2Z7eV62Rkhva+KkopW7Qvv/OSWBqvkSY7vusOPrNuZcUG3tApvdVgNB8POj3SPw==} + engines: {node: '>=10'} + + js-tokens@4.0.0: + resolution: {integrity: sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==} + + js-yaml@3.15.2: + resolution: {integrity: sha512-6EuL879VkRA+1Cz578mKMiKvjPNEuk6+r1JaFzoSWejZmtf7xWbIyw1e3KkxlkzTIt9Taw6JBhEppG7utc1P+w==} + hasBin: true + + js-yaml@5.4.1: + resolution: {integrity: sha512-28R/k+NAjeuf7+CKlTxWZVExJGwVVLwY06DgEnOMz2gEpfNkDcD7QvyiVPT0xy0XXhU8vHsd4Ot42OOPdJG7dQ==} + hasBin: true + + jsesc@3.1.0: + resolution: {integrity: sha512-/sM3dO2FOzXjKQhJuo0Q173wf2KOo8t4I8vHy6lF9poUp7bKT0/NHE8fPX23PwfhnykfqnC2xRxOnVw5XuGIaA==} + engines: {node: '>=6'} + hasBin: true + + json-parse-even-better-errors@2.3.1: + resolution: {integrity: sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==} + + json-schema-ref-resolver@3.0.0: + resolution: {integrity: sha512-hOrZIVL5jyYFjzk7+y7n5JDzGlU8rfWDuYyHwGa2WA8/pcmMHezp2xsVwxrebD/Q9t8Nc5DboieySDpCp4WG4A==} + + json-schema-traverse@1.0.0: + resolution: {integrity: sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==} + + json5@2.2.3: + resolution: {integrity: sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==} + engines: {node: '>=6'} + hasBin: true + + jsonc-parser@3.3.1: + resolution: {integrity: sha512-HUgH65KyejrUFPvHFPbqOY0rsFip3Bo5wb4ngvdi1EpCYWUQDC5V+Y7mZws+DLkr4M//zQJoanu1SP+87Dv1oQ==} + + kafkajs@2.2.4: + resolution: {integrity: sha512-j/YeapB1vfPT2iOIUn/vxdyKEuhuY2PxMBvf5JWux6iSaukAccrMtXEY/Lb7OvavDhOWME589bpLrEdnVHjfjA==} + engines: {node: '>=14.0.0'} + + leven@3.1.0: + resolution: {integrity: sha512-qsda+H8jTaUaN/x5vzW2rzc+8Rw4TAQ/4KjB46IwK5VH+IlVeeeje/EoZRpiXvIqjFgK84QffqPztGI3VBLG1A==} + engines: {node: '>=6'} + + light-my-request@6.6.0: + resolution: {integrity: sha512-CHYbu8RtboSIoVsHZ6Ye4cj4Aw/yg2oAFimlF7mNvfDV192LR7nDiKtSIfCuLT7KokPSTn/9kfVLm5OGN0A28A==} + + lines-and-columns@1.2.4: + resolution: {integrity: sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==} + + load-esm@1.0.3: + resolution: {integrity: sha512-v5xlu8eHD1+6r8EHTg6hfmO97LN8ugKtiXcy5e6oN72iD2r6u0RPfLl6fxM+7Wnh2ZRq15o0russMst44WauPA==} + engines: {node: '>=13.2.0'} + + locate-path@5.0.0: + resolution: {integrity: sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==} + engines: {node: '>=8'} + + lodash.memoize@4.1.2: + resolution: {integrity: sha512-t7j+NzmgnQzTAYXcsHYLgimltOV1MXHtlOWf6GjL9Kj8GK5FInw5JotxvbOs+IvV1/Dzo04/fCGfLVs7aXb4Ag==} + + lodash@4.18.1: + resolution: {integrity: sha512-dMInicTPVE8d1e5otfwmmjlxkZoUpiVLwyeTdUsi/Caj/gfzzblBcCE5sRHV/AsjuCmxWrte2TNGSYuCeCq+0Q==} + + log-symbols@4.1.0: + resolution: {integrity: sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg==} + engines: {node: '>=10'} + + log-symbols@7.0.1: + resolution: {integrity: sha512-ja1E3yCr9i/0hmBVaM0bfwDjnGy8I/s6PP4DFp+yP+a+mrHO4Rm7DtmnqROTUkHIkqffC84YY7AeqX6oFk0WFg==} + engines: {node: '>=18'} + + long@5.3.2: + resolution: {integrity: sha512-mNAgZ1GmyNhD7AuqnTG3/VQ26o760+ZYBPKjPvugO8+nLbYfX6TVpJPseBvopbdY+qpZ/lKUnmEc1LeZYS3QAA==} + + lru-cache@10.4.3: + resolution: {integrity: sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==} + + lru-cache@11.5.3: + resolution: {integrity: sha512-U4N8FgzmWxc8k1VH8Kr6lQg18U7Fjvby6wXHVRX/ZZ7IwWbRMgrRbP0Wrb5q5NVinryp4SQampHKdvtecItxUg==} + engines: {node: 20 || >=22} + + lru-cache@5.1.1: + resolution: {integrity: sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==} + + lru.min@1.1.5: + resolution: {integrity: sha512-5J9ysMYUpYIg9RF2vJpy9SinEmSviFSe0GyPpCQ4L5QSkLAgeLXlTAOu2ZwWUU5m+0SBl6gUU1R1ZQB3aKypfA==} + engines: {bun: '>=1.0.0', deno: '>=1.30.0', node: '>=8.0.0'} + + magic-string@1.0.0: + resolution: {integrity: sha512-CGvjzMN08iv6w1mm4/x3Gh1hLb4VnyRUA15FFpl6CsCIGGoe36k7kY5KNz9QDbSBN5I/fWHM6ZlIkUTa5xdUEA==} + + make-dir@4.0.0: + resolution: {integrity: sha512-hXdUTZYIVOt1Ex//jAQi+wTZZpUpwBj/0QsOzqegb3rGMMeJiSEu5xLHnYfBrRV4RH2+OCSOO95Is/7x1WJ4bw==} + engines: {node: '>=10'} + + make-error@1.3.6: + resolution: {integrity: sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==} + + math-intrinsics@1.1.0: + resolution: {integrity: sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g==} + engines: {node: '>= 0.4'} + + media-typer@0.3.0: + resolution: {integrity: sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ==} + engines: {node: '>= 0.6'} + + media-typer@1.1.1: + resolution: {integrity: sha512-yz3xRaG20c6/BOzvYoDaGtPmGscs7YivItZEEqe6GbwNfHuxu9YNmvnEkMzKldAGY4/80pRcQRZSEnhquk9XuQ==} + engines: {node: '>= 0.8'} + + merge-descriptors@2.0.0: + resolution: {integrity: sha512-Snk314V5ayFLhp3fkUREub6WtjBfPdCPY1Ln8/8munuLuiYhsABgBVWsozAG+MWMbVEvcdcpbi9R7ww22l9Q3g==} + engines: {node: '>=18'} + + merge-stream@2.0.0: + resolution: {integrity: sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==} + + methods@1.1.2: + resolution: {integrity: sha512-iclAHeNqNm68zFtnZ0e+1L2yUIdvzNoauKU4WBA3VvH/vPFieF7qfRlwUZU+DA9P9bPXIS90ulxoUoCH23sV2w==} + engines: {node: '>= 0.6'} + + mime-db@1.52.0: + resolution: {integrity: sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==} + engines: {node: '>= 0.6'} + + mime-db@1.54.0: + resolution: {integrity: sha512-aU5EJuIN2WDemCcAp2vFBfp/m4EAhWJnUNSSw0ixs7/kXbd6Pg64EmwJkNdFhB8aWt1sH2CTXrLxo/iAGV3oPQ==} + engines: {node: '>= 0.6'} + + mime-types@2.1.35: + resolution: {integrity: sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==} + engines: {node: '>= 0.6'} + + mime-types@3.0.2: + resolution: {integrity: sha512-Lbgzdk0h4juoQ9fCKXW4by0UJqj+nOOrI9MJ1sSj4nI8aI2eo1qmvQEie4VD1glsS250n15LsWsYtCugiStS5A==} + engines: {node: '>=18'} + + mime@2.6.0: + resolution: {integrity: sha512-USPkMeET31rOMiarsBNIHZKLGgvKc/LrjofAnBlOttf5ajRvqiRA8QsenbcooctK6d6Ts6aqZXBA+XbkKthiQg==} + engines: {node: '>=4.0.0'} + hasBin: true + + mime@3.0.0: + resolution: {integrity: sha512-jSCU7/VB1loIWBZe14aEYHU/+1UMEHoaO7qxCOVJOw9GgH72VAWppxNcjU+x9a2k3GSIBXNKxXQFqRvvZ7vr3A==} + engines: {node: '>=10.0.0'} + hasBin: true + + mimic-fn@2.1.0: + resolution: {integrity: sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==} + engines: {node: '>=6'} + + mimic-function@5.0.1: + resolution: {integrity: sha512-VP79XUPxV2CigYP3jWwAUFSku2aKqBH7uTAapFWCBqutsbmDo96KY5o8uh6U+/YSIn5OxJnXp73beVkpqMIGhA==} + engines: {node: '>=18'} + + minimatch@10.2.6: + resolution: {integrity: sha512-vpLQEs+VLCr1nU0BXS07maYoFwlDAH0gngQuuttxIwutDFEMHq2blX+8vpgxDdK3J1PwjCJiep77OitTZ4Ll1A==} + engines: {node: 18 || 20 || >=22} + + minimatch@9.0.9: + resolution: {integrity: sha512-OBwBN9AL4dqmETlpS2zasx+vTeWclWzkblfZk7KTA5j3jeOONz/tRCnZomUyvNg83wL5Zv9Ss6HMJXAgL8R2Yg==} + engines: {node: '>=16 || 14 >=14.17'} + + minimist@1.2.8: + resolution: {integrity: sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==} + + minimizer-webpack-plugin@5.11.0: + resolution: {integrity: sha512-2JVy2DY+iBtfRyrQB5cRM7lfurnJIi6jFTgLip/7FxDu0WxswrIRzr4fBySQ0X7HqM7BcwE28zm+HfQ5V6y4Cg==} + engines: {node: '>= 10.13.0'} + peerDependencies: + '@minify-html/node': '*' + '@napi-rs/image': '*' + '@swc/core': '*' + '@swc/css': '*' + '@swc/html': '*' + clean-css: '*' + cssnano: '*' + csso: '*' + esbuild: '*' + html-minifier-terser: '*' + imagemin: '*' + lightningcss: '*' + postcss: '*' + sharp: '*' + svgo: '*' + uglify-js: '*' + webpack: ^5.1.0 + peerDependenciesMeta: + '@minify-html/node': + optional: true + '@napi-rs/image': + optional: true + '@swc/core': + optional: true + '@swc/css': + optional: true + '@swc/html': + optional: true + clean-css: + optional: true + cssnano: + optional: true + csso: + optional: true + esbuild: + optional: true + html-minifier-terser: + optional: true + imagemin: + optional: true + lightningcss: + optional: true + postcss: + optional: true + sharp: + optional: true + svgo: + optional: true + uglify-js: + optional: true + + minipass@7.1.3: + resolution: {integrity: sha512-tEBHqDnIoM/1rXME1zgka9g6Q2lcoCkxHLuc7ODJ5BxbP5d4c2Z5cGgtXAku59200Cx7diuHTOYfSBD8n6mm8A==} + engines: {node: '>=16 || 14 >=14.17'} + + ms@2.1.3: + resolution: {integrity: sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==} + + multer@2.4.0: + resolution: {integrity: sha512-7dqa0ZcFfzbefdTuIkzOSMvZWC0J7FLqBOjJUZvDCXShIURWKxAyTT1wHhnE5q19c7jOJf43IYYKjBmZVZmvhg==} + engines: {node: '>= 10.16.0'} + + mute-stream@0.0.8: + resolution: {integrity: sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA==} + + mute-stream@3.0.0: + resolution: {integrity: sha512-dkEJPVvun4FryqBmZ5KhDo0K9iDXAwn08tMLDinNdRBNPcYEDiWYysLcc6k3mjTMlbP9KyylvRpd4wFtwrT9rw==} + engines: {node: ^20.17.0 || >=22.9.0} + + mysql2@3.15.3: + resolution: {integrity: sha512-FBrGau0IXmuqg4haEZRBfHNWB5mUARw6hNwPDXXGg0XzVJ50mr/9hb267lvpVMnhZ1FON3qNd4Xfcez1rbFwSg==} + engines: {node: '>= 8.0'} + + named-placeholders@1.1.6: + resolution: {integrity: sha512-Tz09sEL2EEuv5fFowm419c1+a/jSMiBjI9gHxVLrVdbUkkNUUfjsVYs9pVZu5oCon/kmRh9TfLEObFtkVxmY0w==} + engines: {node: '>=8.0.0'} + + nanoid@5.1.16: + resolution: {integrity: sha512-kVrnsrJqMR8+oLJnGEmSWw9BivK5mt7H3FZatVRjrc5wGqFYuBxX1yG7+A7Gi5AefkX6t/oCkizcQgpu0cY1dQ==} + engines: {node: ^18 || >=20} + hasBin: true + + napi-postinstall@0.3.4: + resolution: {integrity: sha512-PHI5f1O0EP5xJ9gQmFGMS6IZcrVvTjpXjz7Na41gTE7eE2hK11lg04CECCYEEjdc17EV4DO+fkGEtt7TpTaTiQ==} + engines: {node: ^12.20.0 || ^14.18.0 || >=16.0.0} + hasBin: true + + natural-compare@1.4.0: + resolution: {integrity: sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==} + + negotiator@1.1.0: + resolution: {integrity: sha512-NMPBRMJgiQHjbd8phG3Vebdx4kZ1H121rbl5IkMqeOsahptB9BKo/d7oJ3zTXqTgagn2bWlNSXkh0QUGM31RYg==} + engines: {node: '>=18'} + + neo-async@2.6.2: + resolution: {integrity: sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==} + + nestjs-pino@5.2.0: + resolution: {integrity: sha512-w7zIidjqzhvB7TSDBttC//NxKBAz2rr2d6pNctsglWqb/VqNbDj/Hko2VsgHMYmLpIoZ5pka5gASbGc60V8Qvw==} + engines: {node: '>=22.12.0'} + peerDependencies: + '@nestjs/common': ^11.0.8 || ^12.0.2 + '@nestjs/core': ^11.0.8 || ^12.0.2 + pino: ^10.0.0 + pino-http: ^11.0.0 + rxjs: ^7.1.0 + + node-addon-api@7.1.1: + resolution: {integrity: sha512-5m3bsyrjFWE1xf7nz7YXdN4udnVtXK6/Yfgn5qnahL6bCkf2yKt4k3nuTKAtT4r3IG8JNR2ncsIMdZuAzJjHQQ==} + + node-emoji@2.1.3: + resolution: {integrity: sha512-E2WEOVsgs7O16zsURJ/eH8BqhF029wGpEOnv7Urwdo2wmQanOACwJQh0devF9D9RhoZru0+9JXIS0dBXIAz+lA==} + engines: {node: '>=18'} + + node-emoji@2.2.0: + resolution: {integrity: sha512-Z3lTE9pLaJF47NyMhd4ww1yFTAP8YhYI8SleJiHzM46Fgpm5cnNzSl9XfzFNqbaz+VlJrIj3fXQ4DeN1Rjm6cw==} + engines: {node: '>=18'} + + node-int64@0.4.0: + resolution: {integrity: sha512-O5lz91xSOeoXP6DulyHfllpq+Eg00MWitZIbtPfoSEvqIHdl5gfcY6hYzDWnj0qD5tz52PI08u9qUvSVeUBeHw==} + + node-releases@2.0.56: + resolution: {integrity: sha512-x0InOIyzgdk+eyaWaRJFH5snEtiImgBgblZ2CyPrLmqqcuMQkEvcDPHbzqbD8eDsSeJbVOjn+crzyzHaM4D+/A==} + engines: {node: '>=18'} + + normalize-path@3.0.0: + resolution: {integrity: sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==} + engines: {node: '>=0.10.0'} + + npm-run-path@4.0.1: + resolution: {integrity: sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==} + engines: {node: '>=8'} + + object-assign@4.1.1: + resolution: {integrity: sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==} + engines: {node: '>=0.10.0'} + + object-inspect@1.13.4: + resolution: {integrity: sha512-W67iLl4J2EXEGTbfeHCffrjDfitvLANg0UlX3wFUUSTx92KXRFegMHUVgSqE+wvhAbi4WqjGg9czysTV2Epbew==} + engines: {node: '>= 0.4'} + + ohash@2.0.12: + resolution: {integrity: sha512-65S/5gk9YSsaRjcyf7Nfa6h/d3E8/1gslpXfI4W7Dxn/oap8IKRuNT5VXkLQ1YFKIEg4apRY4Pj6aiwFzrDdmw==} + + on-exit-leak-free@2.1.2: + resolution: {integrity: sha512-0eJJY6hXLGf1udHwfNftBqH+g73EU4B504nZeKpz1sYRKafAghwxEJunB2O7rDZkL4PGfsMVnTXZ2EjibbqcsA==} + engines: {node: '>=14.0.0'} + + on-finished@2.4.1: + resolution: {integrity: sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==} + engines: {node: '>= 0.8'} + + once@1.4.0: + resolution: {integrity: sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==} + + onetime@5.1.2: + resolution: {integrity: sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==} + engines: {node: '>=6'} + + onetime@7.0.0: + resolution: {integrity: sha512-VXJjc87FScF88uafS3JllDgvAm+c/Slfz06lorj2uAY34rlUu0Nt+v8wreiImcrgAjjIHp1rXpTDlLOGw29WwQ==} + engines: {node: '>=18'} + + ora@5.4.1: + resolution: {integrity: sha512-5b6Y85tPxZZ7QytO+BQzysW31HJku27cRIlkbAXaNx+BdcVi+LlRFmVXzeF6a7JCwJpyw5c4b+YSVImQIrBpuQ==} + engines: {node: '>=10'} + + ora@9.4.1: + resolution: {integrity: sha512-6VlU9MLXbjVQD04AZCMX28hVtA5bUoadvUqO76MUCVA0ilwJbMiHsITRPfyVm6p/BC0Av/BXMujx39WCe1LEqw==} + engines: {node: '>=20'} + + os-tmpdir@1.0.2: + resolution: {integrity: sha512-D2FR03Vir7FIu45XBY20mTb+/ZSWB00sjU9jdQXt83gDrI4Ztz5Fs7/yy74g2N5SVQY4xY1qDr4rNddwYRVX0g==} + engines: {node: '>=0.10.0'} + + oxlint-tsgolint@7.0.2002: + resolution: {integrity: sha512-rQAj2RAQM57nCwTd3PhtnAkREGW2StqI47tzudNlJF8WwGommM7rVpeP4O1O8/ZiuDZ9f2GnTESzLHGTluwkvQ==} + hasBin: true + + oxlint@1.83.0: + resolution: {integrity: sha512-cyDzSzaw3uzP0TeCeq3lLRPPoaUxkbB4ZOXj+kn+5r+BX9V+4bNVGk9lxer+WrgcpebH4JxLlJ3KQjveVztOLQ==} + engines: {node: ^20.19.0 || >=22.12.0} + hasBin: true + peerDependencies: + oxlint-tsgolint: '>=7.0.2001' + vite-plus: '*' + peerDependenciesMeta: + oxlint-tsgolint: + optional: true + vite-plus: + optional: true + + p-limit@2.3.0: + resolution: {integrity: sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==} + engines: {node: '>=6'} + + p-limit@3.1.0: + resolution: {integrity: sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==} + engines: {node: '>=10'} + + p-locate@4.1.0: + resolution: {integrity: sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==} + engines: {node: '>=8'} + + p-try@2.2.0: + resolution: {integrity: sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==} + engines: {node: '>=6'} + + package-json-from-dist@1.0.1: + resolution: {integrity: sha512-UEZIS3/by4OC8vL3P2dTXRETpebLI2NiI5vIrjaD/5UtrkFX/tNbwjTSRAGC/+7CAo2pIcBaRgWmcBBHcsaCIw==} + + parse-json@5.2.0: + resolution: {integrity: sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==} + engines: {node: '>=8'} + + parseurl@1.3.3: + resolution: {integrity: sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==} + engines: {node: '>= 0.8'} + + path-exists@4.0.0: + resolution: {integrity: sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==} + engines: {node: '>=8'} + + path-key@3.1.1: + resolution: {integrity: sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==} + engines: {node: '>=8'} + + path-scurry@1.11.1: + resolution: {integrity: sha512-Xa4Nw17FS9ApQFJ9umLiJS4orGjm7ZzwUrwamcGQuHSzDyth9boKDaycYdDcZDuqYATXw4HFXgaqWTctW/v1HA==} + engines: {node: '>=16 || 14 >=14.18'} + + path-scurry@2.0.2: + resolution: {integrity: sha512-3O/iVVsJAPsOnpwWIeD+d6z/7PmqApyQePUtCndjatj/9I5LylHvt5qluFaBT3I5h3r1ejfR056c+FCv+NnNXg==} + engines: {node: 18 || 20 || >=22} + + path-to-regexp@8.4.2: + resolution: {integrity: sha512-qRcuIdP69NPm4qbACK+aDogI5CBDMi1jKe0ry5rSQJz8JVLsC7jV8XpiJjGRLLol3N+R5ihGYcrPLTno6pAdBA==} + + pathe@2.0.3: + resolution: {integrity: sha512-WUjGcAqP1gQacoQe+OBJsFA7Ld4DyXuUIjZ5cc75cLHvJ7dtNsTugphxIADwspS+AraAUePCKrSVtPLFj/F88w==} + + perfect-debounce@2.1.0: + resolution: {integrity: sha512-LjgdTytVFXeUgtHZr9WYViYSM/g8MkcTPYDlPa3cDqMirHjKiSZPYd6DoL7pK8AJQr+uWkQvCjHNdiMqsrJs+g==} + + pg-cloudflare@1.4.1: + resolution: {integrity: sha512-6PQbsFWZcp9EmJEwy5cGQ2La+AMWpP46lgbb8X+U/XsHIUweYDNCpeuKck5RxL2MdVFi7krbbEi5nX4Zh7JhrQ==} + + pg-connection-string@2.14.1: + resolution: {integrity: sha512-qR3kGNPBLpCNtz0evbKA0Y/MRFXwSSdT+pTJvYp/bXTcReZbvX1kzF0IyTc1QnxqF7AZbOeBhNL8R5mYQZV/MA==} + + pg-int8@1.0.1: + resolution: {integrity: sha512-WCtabS6t3c8SkpDBUlb1kjOs7l66xsGdKpIPZsg4wR+B3+u9UAum2odSsF9tnvxg80h4ZxLWMy4pRjOsFIqQpw==} + engines: {node: '>=4.0.0'} + + pg-pool@3.14.0: + resolution: {integrity: sha512-gKtPkFdQPU3DksooVLi9LsjZxrsBUZIpa+7aVx+LV5pNh0KzP4Zleud2po+ConrxbuXGBJ6Hfer6hdgpIBpBaw==} + peerDependencies: + pg: '>=8.0' + + pg-protocol@1.16.1: + resolution: {integrity: sha512-p9VOFMiHB/ZbJATetbg+99PxssTVSQRnyuPSQ67mN1+1KBOjZaZ83ZQzltnxPhJwSsC3nwVjJ10DVJlerbFzLg==} + + pg-types@2.2.0: + resolution: {integrity: sha512-qTAAlrEsl8s4OiEQY69wDvcMIdQN6wdz5ojQiOy6YRMuynxenON0O5oCpJI6lshc6scgAY8qvJ2On/p+CXY0GA==} + engines: {node: '>=4'} + + pg@8.23.1: + resolution: {integrity: sha512-aL96AHANtWjPLDOLqnhx+ngp9+UK7ETEU8VJrDCGvsSSi/mGLcWYsS6Herg7lmaBJe4uwrfqsa7gTEFaSizDoQ==} + engines: {node: '>= 16.0.0'} + peerDependencies: + pg-native: '>=3.0.1' + peerDependenciesMeta: + pg-native: + optional: true + + pgpass@1.0.5: + resolution: {integrity: sha512-FdW9r/jQZhSeohs1Z3sI1yxFQNFvMcnmfuj4WBMUTxOrAyLMaTcE1aAMBiTlbMNaXvBCQuVi0R7hd8udDSP7ug==} + + picocolors@1.1.1: + resolution: {integrity: sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==} + + picomatch@2.3.2: + resolution: {integrity: sha512-V7+vQEJ06Z+c5tSye8S+nHUfI51xoXIXjHQ99cQtKUkQqqO1kO/KCJUfZXuB47h/YBlDhah2H3hdUGXn8ie0oA==} + engines: {node: '>=8.6'} + + picomatch@4.0.5: + resolution: {integrity: sha512-RvwwcruNjI1ncT5xRakeyS9Lf8lcItv34KD+aif+VH9kduAyfYBipGh12274xtenIPZ119/R9BdTBa8gAwSh0A==} + engines: {node: '>=12'} + + picomatch@4.0.7: + resolution: {integrity: sha512-qcJu88Q2IWqJsDD529JKMdwGm/dvInW4HvQnRwiH9JtihJvzGOscDtHE3x1pBKeUOTysQ8kVmLnJ2kJu7yhcGA==} + engines: {node: '>=12'} + + pino-abstract-transport@3.0.0: + resolution: {integrity: sha512-wlfUczU+n7Hy/Ha5j9a/gZNy7We5+cXp8YL+X+PG8S0KXxw7n/JXA3c46Y0zQznIJ83URJiwy7Lh56WLokNuxg==} + + pino-http@11.0.0: + resolution: {integrity: sha512-wqg5XIAGRRIWtTk8qPGxkbrfiwEWz1lgedVLvhLALudKXvg1/L2lTFgTGPJ4Z2e3qcRmxoFxDuSdMdMGNM6I1g==} + + pino-pretty@13.1.3: + resolution: {integrity: sha512-ttXRkkOz6WWC95KeY9+xxWL6AtImwbyMHrL1mSwqwW9u+vLp/WIElvHvCSDg0xO/Dzrggz1zv3rN5ovTRVowKg==} + hasBin: true + + pino-std-serializers@7.1.0: + resolution: {integrity: sha512-BndPH67/JxGExRgiX1dX0w1FvZck5Wa4aal9198SrRhZjH3GxKQUKIBnYJTdj2HDN3UQAS06HlfcSbQj2OHmaw==} + + pino@10.3.1: + resolution: {integrity: sha512-r34yH/GlQpKZbU1BvFFqOjhISRo1MNx1tWYsYvmj6KIRHSPMT2+yHOEb1SG6NMvRoHRF0a07kCOox/9yakl1vg==} + hasBin: true + + pirates@4.0.7: + resolution: {integrity: sha512-TfySrs/5nm8fQJDcBDuUng3VOUKsd7S+zqvbOTiGXHfxX4wK31ard+hoNuvkicM/2YFzlpDgABOevKSsB4G/FA==} + engines: {node: '>= 6'} + + pkg-dir@4.2.0: + resolution: {integrity: sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==} + engines: {node: '>=8'} + + pkg-types@2.3.3: + resolution: {integrity: sha512-j/lCFdcppV0JxWpCEITdbDltBxPP6cHT+yNJ6Go2OgoSA9518X847X9z0p6LtA4Nc16+eQzCZjRrWanTGvHJ5w==} + + pluralize@8.0.0: + resolution: {integrity: sha512-Nc3IT5yHzflTfbjgqWcCPpo7DaKy4FnpB0l/zCAW0Tc7jxAiuqSxHasntB3D7887LSrA93kDJ9IXovxJYxyLCA==} + engines: {node: '>=4'} + + postgres-array@2.0.0: + resolution: {integrity: sha512-VpZrUqU5A69eQyW2c5CA1jtLecCsN2U/bD6VilrFDWq5+5UIEVO7nazS3TEcHf1zuPYO/sqGvUvW62g86RXZuA==} + engines: {node: '>=4'} + + postgres-array@3.0.4: + resolution: {integrity: sha512-nAUSGfSDGOaOAEGwqsRY27GPOea7CNipJPOA7lPbdEpx5Kg3qzdP0AaWC5MlhTWV9s4hFX39nomVZ+C4tnGOJQ==} + engines: {node: '>=12'} + + postgres-bytea@1.0.1: + resolution: {integrity: sha512-5+5HqXnsZPE65IJZSMkZtURARZelel2oXUEO8rH83VS/hxH5vv1uHquPg5wZs8yMAfdv971IU+kcPUczi7NVBQ==} + 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'} + + postgres@3.4.7: + resolution: {integrity: sha512-Jtc2612XINuBjIl/QTWsV5UvE8UHuNblcO3vVADSrKsrc6RqGX6lOW1cEo3CM2v0XG4Nat8nI+YM7/f26VxXLw==} + engines: {node: '>=12'} + + prettier@3.9.8: + resolution: {integrity: sha512-WRFq3Wn3WId7LLROfMLdH7xaFr2jR62wU8nLO6rQUOLOxNZUviyJQs1M0iIhLexSFy+L+w0ch66wtoO2jRjG0A==} + engines: {node: '>=14'} + hasBin: true + + pretty-format@30.5.1: + resolution: {integrity: sha512-byhRAPguVKMQIj4kjJwJ5lAskVhfuiSdiYl/aLTWpgkGEmic2jYhJh1yE9ih8Ox44Xg9ccCT11/S6QrzSJuNrg==} + engines: {node: ^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0} + + prisma@7.10.0: + resolution: {integrity: sha512-o0ornyJOWgygVAzGCpr8PdXV8EJLHyVGDDUr/voBQt8Azzw8cYTByzzPGcA/m4tCkPcnJA8raEOv2CslsKhPEw==} + engines: {node: ^20.19 || ^22.12 || >=24.0} + hasBin: true + peerDependencies: + better-sqlite3: '>=9.0.0' + typescript: '>=5.4.0' + peerDependenciesMeta: + better-sqlite3: + optional: true + typescript: + optional: true + + process-warning@4.0.1: + resolution: {integrity: sha512-3c2LzQ3rY9d0hc1emcsHhfT9Jwz0cChib/QN89oME2R451w5fy3f0afAhERFZAwrbDU43wk12d0ORBpDVME50Q==} + + process-warning@5.1.0: + resolution: {integrity: sha512-jQSaVHsPgtyw60e1rQ/A+/ArPEj/S8pS/vFnyGa/gYFXrKk/6RuDkoqVDQ5NI5MmS01698ltlAk0NoDBNLujRw==} + + proper-lockfile@4.1.2: + resolution: {integrity: sha512-TjNPblN4BwAWMXU8s9AEz4JmQxnD1NNL7bNOY/AKUzyamc379FWASUhc/K1pL2noVb+XmZKLL68cjzLsiOAMaA==} + + proxy-addr@2.0.8: + resolution: {integrity: sha512-5nnx0yGyVUcY6t9RnWcARWtwT9F1D8O9rt08htPvnd49W1IgZtmLkhu9WfMzQj1cFxjHIO6connUNVW5k7AVyQ==} + engines: {node: '>= 0.10'} + + pump@3.0.4: + resolution: {integrity: sha512-VS7sjc6KR7e1ukRFhQSY5LM2uBWAUPiOPa/A3mkKmiMwSmRFUITt0xuj+/lesgnCv+dPIEYlkzrcyXgquIHMcA==} + + pure-rand@6.1.0: + resolution: {integrity: sha512-bVWawvoZoBYpp6yIoQtQXHZjmz35RSVHnUOTefl8Vcjr8snTPY1wnpSPMWekcFwbxI6gtmT7rSYPFvz71ldiOA==} + + pure-rand@7.0.1: + resolution: {integrity: sha512-oTUZM/NAZS8p7ANR3SHh30kXB+zK2r2BPcEn/awJIbOvq82WoMN4p62AWWp3Hhw50G0xMsw1mhIBLqHw64EcNQ==} + + qs@6.16.0: + resolution: {integrity: sha512-h6fhOIaRrID2CbEY2fqs+7t+UXZo+MLAnU5gRIq85uFtdiUPCdsApMlHhXogKVM4HM2DVbIjGNTTYH2OcmP1vA==} + engines: {node: '>=0.6'} + + quick-format-unescaped@4.0.4: + resolution: {integrity: sha512-tYC1Q1hgyRuHgloV/YXs2w15unPVh8qfu/qCTfhTYamaw7fyhumKa2yGpdSo87vY32rIclj+4fWYQXUMs9EHvg==} + + range-parser@1.3.0: + resolution: {integrity: sha512-hek2mFQpPuI4E1BBKrSto+BU3e3x4xuarsbiwr3+lf7p44juvFMV0XFWQAP3xUyqXA4RrXLIoaSUGbSt056ZMw==} + engines: {node: '>= 0.6'} + + raw-body@3.0.2: + resolution: {integrity: sha512-K5zQjDllxWkf7Z5xJdV0/B0WTNqx6vxG70zJE4N0kBs4LovmEYWJzQGxC9bS9RAKu3bgM40lrd5zoLJ12MQ5BA==} + engines: {node: '>= 0.10'} + + rc9@3.1.0: + resolution: {integrity: sha512-ufjkNVzbRHKcCOmTahZkmVsyc3W+MSk3jY03m+a7tGHkIsdVMG9l10/3HvFbWkkKzY5VFp3pkRsIo/UYgmFL7Q==} + + react-dom@19.3.0: + resolution: {integrity: sha512-JDk8dgif51OjFoDE70+OT9ICyYr+69HlmihNwp1+Nsfbna3t5sIiCa9ZJktDmQ4/1b/rn26hIAR2uYXDMr5r0Q==} + peerDependencies: + react: ^19.3.0 + + react-is@18.3.1: + resolution: {integrity: sha512-/LLMVyas0ljjAtoYiPqYiL8VWXzUUdThrmU5+n20DZv+a+ClRoevUzw5JxU+Ieh5/c87ytoTBV9G1FiKfNJdmg==} + + react-is@19.3.0: + resolution: {integrity: sha512-UpMYezM4v5/18F28aC66AEsjXIgE02kyEMH6yLdgLXu/UTfa1Ntwck/nNLrbqJsEXW7gPb0coNO9FQse9WTovA==} + + react@19.3.0: + resolution: {integrity: sha512-E8LUcbtBWt20bbl2YoHfx4ZDBdxVTfOKtCZn9cDSJ4l6/nuoApcpIBcj47t2wZoVX8g2ZHuMHbiShgCR1T5Sog==} + engines: {node: '>=0.10.0'} + + readable-stream@3.6.2: + resolution: {integrity: sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==} + engines: {node: '>= 6'} + + readdirp@5.1.1: + resolution: {integrity: sha512-Kko+Y5XQ6fM+Ce3dq3m9YGxnacYZYl9cA1wZjaF3Vbry2L3i1qVg8+CAgNPsXRArPMUMCaOR7oa9Nqntc43JKA==} + engines: {node: '>= 20.19.0'} + + real-require@0.2.0: + resolution: {integrity: sha512-57frrGM/OCTLqLOAh0mhVA9VBMHd+9U7Zb2THMGdBUoZVOtGbJzjxsYGDJ3A9AYYCP4hn6y1TVbaOfzWtm5GFg==} + engines: {node: '>= 12.13.0'} + + real-require@1.0.0: + resolution: {integrity: sha512-P4nbQYQfePJxRSmY+v/KINxVucm4NF3p3s7pJveMTtom52FR4YGltUQLB8idDXwDDWW+eYrWDFbuzUnjoWHF7g==} + + redis-errors@1.2.0: + resolution: {integrity: sha512-1qny3OExCf0UvUV/5wpYKf2YwPcOqXzkwKKSmKHiE6ZMQs5heeE/c8eXK+PNllPvmjgAbfnsbpkGZWy8cBpn9w==} + engines: {node: '>=4'} + + reflect-metadata@0.2.2: + resolution: {integrity: sha512-urBwgfrvVP/eAyXx4hluJivBKzuEbSQs9rKWCrCkbSxNv8mxPcUZKeuoF3Uy4mJl3Lwprp6yy5/39VWigZ4K6Q==} + + remeda@2.33.4: + resolution: {integrity: sha512-ygHswjlc/opg2VrtiYvUOPLjxjtdKvjGz1/plDhkG66hjNjFr1xmfrs2ClNFo/E6TyUFiwYNh53bKV26oBoMGQ==} + + require-directory@2.1.1: + resolution: {integrity: sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==} + engines: {node: '>=0.10.0'} + + require-from-string@2.0.2: + resolution: {integrity: sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==} + engines: {node: '>=0.10.0'} + + resolve-cwd@3.0.0: + resolution: {integrity: sha512-OrZaX2Mb+rJCpH/6CpSqt9xFVpN++x01XnN2ie9g6P5/3xelLAkXWVADpdz1IHD/KFfEXyE6V0U01OQ3UO2rEg==} + engines: {node: '>=8'} + + resolve-from@5.0.0: + resolution: {integrity: sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==} + engines: {node: '>=8'} + + restore-cursor@3.1.0: + resolution: {integrity: sha512-l+sSefzHpj5qimhFSE5a8nufZYAM3sBSVMAPtYkmC+4EH2anSGaEMXSD0izRQbu9nfyQ9y5JrVmp7E8oZrUjvA==} + engines: {node: '>=8'} + + restore-cursor@5.1.0: + resolution: {integrity: sha512-oMA2dcrw6u0YfxJQXm342bFKX/E4sG9rbTzO9ptUcR/e8A33cHuvStiYOwH7fszkZlZ1z/ta9AAoPk2F4qIOHA==} + engines: {node: '>=18'} + + ret@0.5.0: + resolution: {integrity: sha512-I1XxrZSQ+oErkRR4jYbAyEEu2I0avBvvMM5JN+6EBprOGRCs63ENqZ3vjavq8fBw2+62G5LF5XelKwuJpcvcxw==} + engines: {node: '>=10'} + + retry@0.12.0: + resolution: {integrity: sha512-9LkiTwjUh6rT555DtE9rTX+BKByPfrMzEAtnlEtdEwr3Nkffwiihqe2bWADg+OQRjt9gl6ICdmB/ZFDCGAtSow==} + engines: {node: '>= 4'} + + reusify@1.1.0: + resolution: {integrity: sha512-g6QUff04oZpHs0eG5p83rFLhHeV00ug/Yf9nZM6fLeUrPguBTkTQOdpAWWspMh55TZfVQDPaN3NQJfbVRAxdIw==} + engines: {iojs: '>=1.0.0', node: '>=0.10.0'} + + rfdc@1.4.1: + resolution: {integrity: sha512-q1b3N5QkRUWUl7iyylaaj3kOpIT0N2i9MqIEQXP73GVsN9cw3fdx8X63cEmWhJGi2PPCF23Ijp7ktmd39rawIA==} + + robust-predicates@3.0.3: + resolution: {integrity: sha512-NS3levdsRIUOmiJ8FZWCP7LG3QpJyrs/TE0Zpf1yvZu8cAJJ6QMW92H1c7kWpdIHo8RvmLxN/o2JXTKHp74lUA==} + + router@2.2.0: + resolution: {integrity: sha512-nLTrUKm2UyiL7rlhapu/Zl45FwNgkZGaCpZbIHajDYgwlJCOzLSk+cIPAnsEqV955GjILJnKbdQC1nVPz+gAYQ==} + engines: {node: '>= 18'} + + run-async@2.4.1: + resolution: {integrity: sha512-tvVnVv01b8c1RrA6Ep7JkStj85Guv/YrMcwqYQnwjsAS2cTmmPGBBjAjpCW7RrSodNSoE2/qg9O4bceNvUuDgQ==} + engines: {node: '>=0.12.0'} + + rxjs@7.8.2: + resolution: {integrity: sha512-dhKf903U/PQZY6boNNtAGdWbG85WAbjT/1xYoZIC7FAY0yWapOBQVsVrDl58W86//e1VpMNBtRV4MaXfdMySFA==} + + safe-buffer@5.2.1: + resolution: {integrity: sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==} + + safe-regex2@5.1.1: + resolution: {integrity: sha512-mOSBvHGDZMuIEZMdOz/aCEYDCv0E7nfcNsIhUF+/P+xC7Hyf3FkvymqgPbg9D1EdSGu+uKbJgy09K/RKKc7kJA==} + hasBin: true + + safe-stable-stringify@2.5.0: + resolution: {integrity: sha512-b3rppTKm9T+PsVCBEOUR46GWI7fdOs00VKZ1+9c1EWDaDMvjQc6tUwuFyIprgGgTcWoVHSKrU8H31ZHA2e0RHA==} + engines: {node: '>=10'} + + safer-buffer@2.1.2: + resolution: {integrity: sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==} + + scheduler@0.28.0: + resolution: {integrity: sha512-juorfCmIkIw8tT+p5BXSm6PJjQF/ycEYmKyzURCIt/RaZIhL+PulbQ9Yu2z1HdOJDdqDTlxA1+xKBmHXJsczAw==} + + schema-utils@4.5.0: + resolution: {integrity: sha512-zJlMCZ0cAR5p/Y4oVpRoqioDMJcGxaXRrQ/4rP4WyR84vc5z/DolXdbvXeDpTwbtocDFr2rhPqHPErDCUtz2kA==} + engines: {node: '>= 10.13.0'} + + secure-json-parse@4.1.0: + resolution: {integrity: sha512-l4KnYfEyqYJxDwlNVyRfO2E4NTHfMKAWdUuA8J0yve2Dz/E/PdBepY03RvyJpssIpRFwJoCD55wA+mEDs6ByWA==} + + semver@6.3.1: + resolution: {integrity: sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==} + hasBin: true + + semver@7.8.5: + resolution: {integrity: sha512-Y7/KDsb8LjooZpwaqGyulO6DQlksgCncchHGk+sZIY4SBvUocMBEFH5Ur1fI4dV+Jvl0w6cjvucaIi40puRioA==} + engines: {node: '>=10'} + hasBin: true + + send@1.2.1: + resolution: {integrity: sha512-1gnZf7DFcoIcajTjTwjwuDjzuz4PPcY2StKPlsGAQ1+YH20IRVrBaXSWmdjowTJ6u8Rc01PoYOGHXfP1mYcZNQ==} + engines: {node: '>= 18'} + + seq-queue@0.0.5: + resolution: {integrity: sha512-hr3Wtp/GZIc/6DAGPDcV4/9WoZhjrkXsi5B/07QgX8tsdc6ilr7BFM6PM6rbdAX1kFSDYeZGLipIZZKyQP0O5Q==} + + serve-static@2.2.1: + resolution: {integrity: sha512-xRXBn0pPqQTVQiC8wyQrKs2MOlX24zQ0POGaj0kultvoOCstBQM5yvOhAVSUwOMjQtTvsPWoNCHfPGwaaQJhTw==} + engines: {node: '>= 18'} + + set-cookie-parser@2.7.2: + resolution: {integrity: sha512-oeM1lpU/UvhTxw+g3cIfxXHyJRc/uidd3yK1P242gzHds0udQBYzs3y8j4gCCW+ZJ7ad0yctld8RYO+bdurlvw==} + + setprototypeof@1.2.0: + resolution: {integrity: sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==} + + sharp@0.35.5: + resolution: {integrity: sha512-Ywn4OnzGukp7CDMrp08RQ50YKmuwG47brZgIVPTvBaaAfQlRlygrRqSrxdCiL9M+LlzLBiJ68IR1QqvzHyjC7g==} + engines: {node: '>=20.9.0'} + peerDependencies: + '@types/node': '*' + peerDependenciesMeta: + '@types/node': + optional: true + + shebang-command@2.0.0: + resolution: {integrity: sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==} + engines: {node: '>=8'} + + shebang-regex@3.0.0: + resolution: {integrity: sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==} + engines: {node: '>=8'} + + side-channel-list@1.0.1: + resolution: {integrity: sha512-mjn/0bi/oUURjc5Xl7IaWi/OJJJumuoJFQJfDDyO46+hBWsfaVM65TBHq2eoZBhzl9EchxOijpkbRC8SVBQU0w==} + engines: {node: '>= 0.4'} + + side-channel-map@1.0.1: + resolution: {integrity: sha512-VCjCNfgMsby3tTdo02nbjtM/ewra6jPHmpThenkTYh8pG9ucZ/1P8So4u4FGBek/BjpOVsDCMoLA/iuBKIFXRA==} + engines: {node: '>= 0.4'} + + side-channel-weakmap@1.0.2: + resolution: {integrity: sha512-WPS/HvHQTYnHisLo9McqBHOJk2FkHO/tlpvldyrnem4aeQp4hai3gythswg6p01oSoTl58rcpiFAjF2br2Ak2A==} + engines: {node: '>= 0.4'} + + side-channel@1.1.1: + resolution: {integrity: sha512-6x6dK6zJdpTzF4sQeNYxwtvBzf6Eg4GtlesS94HOvTudUeyK2WXAaIfmDgsyslYrRBeFIlsi54AYsFGUuhmvrQ==} + engines: {node: '>= 0.4'} + + signal-exit@3.0.7: + resolution: {integrity: sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==} + + signal-exit@4.1.0: + resolution: {integrity: sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==} + engines: {node: '>=14'} + + skin-tone@2.0.0: + resolution: {integrity: sha512-kUMbT1oBJCpgrnKoSr0o6wPtvRWT9W9UKvGLwfJYO2WuahZRHOpEyL1ckyMGgMWh0UdpmaoFqKKD29WTomNEGA==} + engines: {node: '>=8'} + + slash@3.0.0: + resolution: {integrity: sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==} + engines: {node: '>=8'} + + sonic-boom@4.2.1: + resolution: {integrity: sha512-w6AxtubXa2wTXAUsZMMWERrsIRAdrK0Sc+FUytWvYAhBJLyuI4llrMIC1DtlNSdI99EI86KZum2MMq3EAZlF9Q==} + + source-map-support@0.5.21: + resolution: {integrity: sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==} + + source-map@0.6.1: + resolution: {integrity: sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==} + engines: {node: '>=0.10.0'} + + source-map@0.7.6: + resolution: {integrity: sha512-i5uvt8C3ikiWeNZSVZNWcfZPItFQOsYTUAOkcUPGd8DqDy1uOUikjt5dG+uRlwyvR108Fb9DOd4GvXfT0N2/uQ==} + engines: {node: '>= 12'} + + split2@4.2.0: + resolution: {integrity: sha512-UcjcJOWknrNkF6PLX83qcHM6KHgVKNkV62Y8a5uYDVv9ydGQVwAHMKqHdJje1VTWpljG0WYpCDhrCdAOYH4TWg==} + engines: {node: '>= 10.x'} + + 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'} + + standard-as-callback@2.1.0: + resolution: {integrity: sha512-qoRRSyROncaz1z0mvYqIE4lCd9p2R90i6GxW3uZv5ucSu8tU7B5HXUP1gG8pVZsYNVaXjk8ClXHPttLyxAL48A==} + + statuses@2.0.2: + resolution: {integrity: sha512-DvEy55V3DB7uknRo+4iOGT5fP1slR8wQohVdknigZPMpMstaKJQWhwiYBACJE3Ul2pTnATihhBYnRhZQHGBiRw==} + engines: {node: '>= 0.8'} + + std-env@3.10.0: + resolution: {integrity: sha512-5GS12FdOZNliM5mAOxFRg7Ir0pWz8MdpYm6AY6VPkGpbA7ZzmbzNcBJQ0GPvvyWgcY7QAhCgf9Uy89I03faLkg==} + + stdin-discarder@0.3.2: + resolution: {integrity: sha512-eCPu1qRxPVkl5605OTWF8Wz40b4Mf45NY5LQmVPQ599knfs5QhASUm9GbJ5BDMDOXgrnh0wyEdvzmL//YMlw0A==} + engines: {node: '>=18'} + + streamsearch@1.1.0: + resolution: {integrity: sha512-Mcc5wHehp9aXz1ax6bZUyY5afg9u2rv5cqQI3mRrYkGC8rW2hM02jWuwjtL++LS5qinSyhj2QfLyNsuc+VsExg==} + engines: {node: '>=10.0.0'} + + string-length@4.0.2: + resolution: {integrity: sha512-+l6rNN5fYHNhZZy41RXsYptCjA2Igmq4EG7kZAYFQI1E1VTXarr6ZPXBg6eq7Y6eK4FEhY6AJlyuFIb/v/S0VQ==} + engines: {node: '>=10'} + + string-width@4.2.3: + resolution: {integrity: sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==} + engines: {node: '>=8'} + + string-width@5.1.2: + resolution: {integrity: sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==} + engines: {node: '>=12'} + + string-width@8.2.2: + resolution: {integrity: sha512-GaPUh5gfdrYzqeVNZvUfT23vYYxXzKYidUcnMtJg/3rxRV63EFZy3k6xfKlmfeJD0176lnUV/Usr3XcwSvFzpg==} + engines: {node: '>=20'} + + string_decoder@1.3.0: + resolution: {integrity: sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==} + + strip-ansi@6.0.1: + resolution: {integrity: sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==} + engines: {node: '>=8'} + + strip-ansi@7.2.0: + resolution: {integrity: sha512-yDPMNjp4WyfYBkHnjIRLfca1i6KMyGCtsVgoKe/z1+6vukgaENdgGBZt+ZmKPc4gavvEZ5OgHfHdrazhgNyG7w==} + engines: {node: '>=12'} + + strip-bom@3.0.0: + resolution: {integrity: sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA==} + engines: {node: '>=4'} + + strip-bom@4.0.0: + resolution: {integrity: sha512-3xurFv5tEgii33Zi8Jtp55wEIILR9eh34FAW00PZf+JnSsTmV/ioewSgQl97JHvgjoRGwPShsWm+IdrxB35d0w==} + engines: {node: '>=8'} + + strip-final-newline@2.0.0: + resolution: {integrity: sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==} + engines: {node: '>=6'} + + strip-json-comments@3.1.1: + resolution: {integrity: sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==} + engines: {node: '>=8'} + + strip-json-comments@5.0.3: + resolution: {integrity: sha512-1tB5mhVo7U+ETBKNf92xT4hrQa3pm0MZ0PQvuDnWgAAGHDsfp4lPSpiS6psrSiet87wyGPh9ft6wmhOMQ0hDiw==} + engines: {node: '>=14.16'} + + strtok3@10.3.5: + resolution: {integrity: sha512-ki4hZQfh5rX0QDLLkOCj+h+CVNkqmp/CMf8v8kZpkNVK6jGQooMytqzLZYUVYIZcFZ6yDB70EfD8POcFXiF5oA==} + engines: {node: '>=18'} + + superagent@10.3.0: + resolution: {integrity: sha512-B+4Ik7ROgVKrQsXTV0Jwp2u+PXYLSlqtDAhYnkkD+zn3yg8s/zjA2MeGayPoY/KICrbitwneDHrjSotxKL+0XQ==} + engines: {node: '>=14.18.0'} + + supertest@7.2.2: + resolution: {integrity: sha512-oK8WG9diS3DlhdUkcFn4tkNIiIbBx9lI2ClF8K+b2/m8Eyv47LSawxUzZQSNKUrVb2KsqeTDCcjAAVPYaSLVTA==} + engines: {node: '>=14.18.0'} + + supports-color@7.2.0: + resolution: {integrity: sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==} + engines: {node: '>=8'} + + supports-color@8.1.1: + resolution: {integrity: sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==} + engines: {node: '>=10'} + + swagger-ui-dist@5.32.14: + resolution: {integrity: sha512-nOA2pSQhcmODMUQZpJHYKNuwniDUqcOWGNaSCOoZv12FdOSJ9JxV95HtyRGNMqEBj6h6lCNTy20TgZDYTSuUIg==} + + synckit@0.11.13: + resolution: {integrity: sha512-eNRKgb3z66Yp3D2CixVujOUvXLFUTij/zVnV8KRyvFdQwpz7I5DS8UfRkTeLzb64u+dkzDSdelE24izu+zSSUg==} + engines: {node: ^14.18.0 || >=16.0.0} + + tagged-tag@1.0.0: + resolution: {integrity: sha512-yEFYrVhod+hdNyx7g5Bnkkb0G6si8HJurOoOEgC8B/O0uXLHlaey/65KRv6cuWBNhBgHKAROVpc7QyYqE5gFng==} + engines: {node: '>=20'} + + tapable@2.3.3: + resolution: {integrity: sha512-uxc/zpqFg6x7C8vOE7lh6Lbda8eEL9zmVm/PLeTPBRhh1xCgdWaQ+J1CUieGpIfm2HdtsUpRv+HshiasBMcc6A==} + engines: {node: '>=6'} + + terser@5.51.2: + resolution: {integrity: sha512-bWnjSNscmuI+GJze6ZupnHP8G/cTcsJF+bXCeQknk2SHQsgbNJnLrqiH9jZ2W4STPVXH2mDKKRX3iwPhc9Cn/Q==} + engines: {node: '>=10'} + hasBin: true + + test-exclude@7.0.2: + resolution: {integrity: sha512-u9E6A+ZDYdp7a4WnarkXPZOx8Ilz46+kby6p1yZ8zsGTz9gYa6FIS7lj2oezzNKmtdyyJNNmmXDppga5GB7kSw==} + engines: {node: '>=18'} + + thread-stream@4.2.0: + resolution: {integrity: sha512-e2zZ96wSChazBsbENf/Pcm/4swHt2cEKQ92rhUjkL9GCKiTDJIaTBenjE/m9DXi0QBmTMDkFDdOomUy20A1tDQ==} + engines: {node: '>=20'} + + through@2.3.8: + resolution: {integrity: sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg==} + + tmp@0.0.33: + resolution: {integrity: sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==} + engines: {node: '>=0.6.0'} + + toad-cache@3.7.4: + resolution: {integrity: sha512-m1TdR/rvT7kgGJZhspNtXdsdYk0fddFpJJFlG5s+UkPFo6lkLoZ3YLOaovPYjq1R75NP5JfeTlSHaOsE09peCg==} + engines: {node: '>=20'} + + toidentifier@1.0.1: + resolution: {integrity: sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==} + engines: {node: '>=0.6'} + + token-types@6.1.2: + resolution: {integrity: sha512-dRXchy+C0IgK8WPC6xvCHFRIWYUbqqdEIKPaKo/AcTUNzwLTK6AH7RjdLWsEZcAN/TBdtfUw3PYEgPr5VPr6ww==} + engines: {node: '>=14.16'} + + ts-jest@29.4.12: + resolution: {integrity: sha512-Ov6ClY53Fflh6BGAnY2DlTq1hYDrTycz2PVTXBWFW2CU+9zrEqAp9fWdGXl42EXO5RLSFAcAZ2JFKbP+zBTFfw==} + engines: {node: ^14.15.0 || ^16.10.0 || ^18.0.0 || >=20.0.0} + hasBin: true + peerDependencies: + '@babel/core': '>=7.0.0-beta.0 <8' + '@jest/transform': ^29.0.0 || ^30.0.0 + '@jest/types': ^29.0.0 || ^30.0.0 + babel-jest: ^29.0.0 || ^30.0.0 + esbuild: '*' + jest: ^29.0.0 || ^30.0.0 + jest-util: ^29.0.0 || ^30.0.0 + typescript: '>=4.3 <7' + peerDependenciesMeta: + '@babel/core': + optional: true + '@jest/transform': + optional: true + '@jest/types': + optional: true + babel-jest: + optional: true + esbuild: + optional: true + jest-util: + optional: true + + ts-loader@9.6.2: + resolution: {integrity: sha512-R4iuczmtgxvtuI556s+hTZ6/7Ee03VCAk/l/M8LY1OAsUgB7YydsCxkgq9D9pKRaD7GJqUi2u8fp9zZP/ufjKA==} + engines: {node: '>=12.0.0'} + peerDependencies: + loader-utils: '*' + typescript: '*' + webpack: ^4.0.0 || ^5.0.0 + peerDependenciesMeta: + loader-utils: + optional: true + + ts-node@10.9.2: + resolution: {integrity: sha512-f0FFpIdcHgn8zcPSbf1dRevwt047YMnaiJM3u2w2RewrB+fob/zePZcrOyQoLMMO7aBIddLcQIEK5dYjkLnGrQ==} + hasBin: true + peerDependencies: + '@swc/core': '>=1.2.50' + '@swc/wasm': '>=1.2.50' + '@types/node': '*' + typescript: '>=2.7' + peerDependenciesMeta: + '@swc/core': + optional: true + '@swc/wasm': + optional: true + + tsconfig-paths@4.2.0: + resolution: {integrity: sha512-NoZ4roiN7LnbKn9QqE1amc9DJfzvZXxF4xDavcOWt1BPkdx+m+0gJuPM+S0vCe7zTJMYUP0R8pO2XMr+Y8oLIg==} + engines: {node: '>=6'} + + tslib@2.8.1: + resolution: {integrity: sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==} + + type-detect@4.0.8: + resolution: {integrity: sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==} + engines: {node: '>=4'} + + type-fest@0.21.3: + resolution: {integrity: sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==} + engines: {node: '>=10'} + + type-fest@4.41.0: + resolution: {integrity: sha512-TeTSQ6H5YHvpqVwBRcnLDCBnDOHWYu7IvGbHT6N8AOymcr9PJGjc1GTtiWZTYg0NCgYwvnYWEkVChQAr9bjfwA==} + engines: {node: '>=16'} + + type-fest@5.10.0: + resolution: {integrity: sha512-NoSdpq/WEiAg5sjmBkmV/hfxv6HJH4NqPNrqjtSO5CwRmpsDfaf4begxW34KdJykH/l1yHtwBWQkCRdoXO8mPA==} + engines: {node: '>=20'} + + type-is@1.6.18: + resolution: {integrity: sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==} + engines: {node: '>= 0.6'} + + type-is@2.1.0: + resolution: {integrity: sha512-faYHw0anBbc/kWF3zFTEnxSFOAGUX9GFbOBthvDdLsIlEoWOFOtS0zgCiQYwIskL9iGXZL3kAXD8OoZ4GmMATA==} + engines: {node: '>= 18'} + + typescript@6.0.3: + resolution: {integrity: sha512-y2TvuxSZPDyQakkFRPZHKFm+KKVqIisdg9/CZwm9ftvKXLP8NRWj38/ODjNbr43SsoXqNuAisEf1GdCxqWcdBw==} + engines: {node: '>=14.17'} + hasBin: true + + uglify-js@3.19.3: + resolution: {integrity: sha512-v3Xu+yuwBXisp6QYTcH4UbH+xYJXqnq2m/LtQVWKWzYc1iehYnLixoQDN9FH6/j9/oybfd6W9Ghwkl8+UMKTKQ==} + engines: {node: '>=0.8.0'} + hasBin: true + + uid@2.0.2: + resolution: {integrity: sha512-u3xV3X7uzvi5b1MncmZo3i2Aw222Zk1keqLA1YkHldREkAhAqi65wuPfe7lHx8H/Wzy+8CE7S7uS3jekIM5s8g==} + engines: {node: '>=8'} + + uint8array-extras@1.5.0: + resolution: {integrity: sha512-rvKSBiC5zqCCiDZ9kAOszZcDvdAHwwIKJG33Ykj43OKcWsnmcBRL09YTU4nOeHZ8Y2a7l1MgTd08SBe9A8Qj6A==} + engines: {node: '>=18'} + + undici-types@7.18.2: + resolution: {integrity: sha512-AsuCzffGHJybSaRrmr5eHr81mwJU3kjw6M+uprWvCXiNeN9SOGwQ3Jn8jb8m3Z6izVgknn1R0FTCEAP2QrLY/w==} + + undici@6.20.1: + resolution: {integrity: sha512-AjQF1QsmqfJys+LXfGTNum+qw4S88CojRInG/6t31W/1fk6G59s92bnAvGz5Cmur+kQv2SURXEvvudLmbrE8QA==} + engines: {node: '>=18.17'} + + unicode-emoji-modifier-base@1.0.0: + resolution: {integrity: sha512-yLSH4py7oFH3oG/9K+XWrz1pSi3dfUrWEnInbxMfArOfc1+33BlGPQtLsOYwvdMy11AwUBetYuaRxSPqgkq+8g==} + engines: {node: '>=4'} + + unpipe@1.0.0: + resolution: {integrity: sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==} + engines: {node: '>= 0.8'} + + unrs-resolver@1.12.2: + resolution: {integrity: sha512-dmlRxBJJayXjqTwC+JtF1HhJmgf3ftQ3YejFcZrf4+KKtJv0qDsK1pjqaaVjG7wJ5NJ6UVP1OqRMQ71Z4C3rxQ==} + + update-browserslist-db@1.3.3: + resolution: {integrity: sha512-pJ2sYawQS0R/WI928Gj5GlPhTGzbMelq0+4INtSYNDV9ErKJcX6xjGWkoG/VnB3dpUm00zALaqkrUD77pO5TDQ==} + hasBin: true + peerDependencies: + browserslist: '>= 4.21.0' + + util-deprecate@1.0.2: + resolution: {integrity: sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==} + + v8-compile-cache-lib@3.0.1: + resolution: {integrity: sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==} + + v8-to-istanbul@9.3.0: + resolution: {integrity: sha512-kiGUalWN+rgBJ/1OHZsBtU4rXZOfj/7rKQxULKlIzwzQSvMJUUNgPwJEEh7gU6xEVxC0ahoOBvN2YI8GH6FNgA==} + engines: {node: '>=10.12.0'} + + valibot@1.4.2: + resolution: {integrity: sha512-gjdCvJ6d3RyHAneqxMYMW9QMCwYMb3jpOO0IyHZV1bnRHFBHrX3VkIILt5XYR0WhwHiH7Mty8ovuPZ/O3gamrg==} + peerDependencies: + typescript: '>=5' + peerDependenciesMeta: + typescript: + optional: true + + vary@1.1.2: + resolution: {integrity: sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==} + engines: {node: '>= 0.8'} + + watchpack@2.5.2: + resolution: {integrity: sha512-6i/00NBjP4yGPs+caKSyRfpTF/8Torsu0MOW3mMzIbhgISFder8i7xbqgHlLMwJrdiN8ndBV3UA1/AfzPSr+jg==} + engines: {node: '>=10.13.0'} + + wcwidth@1.0.1: + resolution: {integrity: sha512-XHPEwS0q6TaxcvG85+8EYkbiCux2XtWG2mkc47Ng2A77BQu9+DqIOJldST4HgPkuea7dvKSj5VgX3P1d4rW8Tg==} + + webpack-sources@3.5.1: + resolution: {integrity: sha512-jyuiGJdtvY434z5bUZrjz67v76/ePNvFZTp9Mdz29IlH4+GPsgyGjiv0fKI+M7BdkU6ADjulUcKAd3tUK3WlEw==} + engines: {node: '>=10.13.0'} + + webpack@5.111.1: + resolution: {integrity: sha512-cNypaz0RP+S4cvQVi1M/3bRUkvNP0xZpL0TjFx+c6jg64VbxD+2weWDgY9UnjRI6dhZgtaj8DU76GGFcJ79xPQ==} + engines: {node: '>=10.13.0'} + hasBin: true + peerDependencies: + webpack-cli: '*' + peerDependenciesMeta: + webpack-cli: + optional: true + + which@2.0.2: + resolution: {integrity: sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==} + engines: {node: '>= 8'} + hasBin: true + + wordwrap@1.0.0: + resolution: {integrity: sha512-gvVzJFlPycKc5dZN4yPkP8w7Dc37BtP1yczEneOb4uq34pXZcvrtRTmWV8W+Ume+XCxKgbjM+nevkyFPMybd4Q==} + + wrap-ansi@6.2.0: + resolution: {integrity: sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==} + engines: {node: '>=8'} + + wrap-ansi@7.0.0: + resolution: {integrity: sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==} + engines: {node: '>=10'} + + wrap-ansi@8.1.0: + resolution: {integrity: sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==} + engines: {node: '>=12'} + + wrappy@1.0.2: + resolution: {integrity: sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==} + + write-file-atomic@5.0.1: + resolution: {integrity: sha512-+QU2zd6OTD8XWIJCbffaiQeH9U73qIqafo1x6V1snCWYGJf6cVE0cDR4D8xRzcEnfI21IFrUPzPGtcPf8AC+Rw==} + engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0} + + xtend@4.0.2: + resolution: {integrity: sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==} + engines: {node: '>=0.4'} + + y18n@5.0.8: + resolution: {integrity: sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==} + engines: {node: '>=10'} + + yallist@3.1.1: + resolution: {integrity: sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==} + + yargs-parser@21.1.1: + resolution: {integrity: sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==} + engines: {node: '>=12'} + + yargs@17.7.3: + resolution: {integrity: sha512-GZtjxm/J/4TSxuL3FNYjCmLktBTnIw/rVmKSIyKeYAZpmJB2ig9VauCC5xsa82GNKVKDAqpOn3KVzNt0zmrU0g==} + engines: {node: '>=12'} + + yn@3.1.1: + resolution: {integrity: sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==} + engines: {node: '>=6'} + + yocto-queue@0.1.0: + resolution: {integrity: sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==} + engines: {node: '>=10'} + + yoctocolors@2.2.0: + resolution: {integrity: sha512-xYqdZFUK/VYazNl/oCDYN+3WloWQwMfZxBoiNt6qNyk+xfOdi598muWE42rNZFp1kNOiqW936q5RhUdnpqElSg==} + engines: {node: '>=18'} + + zeptomatch@2.1.0: + resolution: {integrity: sha512-KiGErG2J0G82LSpniV0CtIzjlJ10E04j02VOudJsPyPwNZgGnRKQy7I1R7GMyg/QswnE4l7ohSGrQbQbjXPPDA==} + + zod@4.6.5: + resolution: {integrity: sha512-v5l/aFXZQeai4awLbOpSoHecE9UiMrnfx75tEXLjNonXVARxQ5mOeipTjROUchszUNCqnE+hqAMujRsRHsut2Q==} + +snapshots: + + '@angular-devkit/core@22.1.8(chokidar@5.0.0)': + dependencies: + ajv: 8.20.0 + ajv-formats: 3.0.1(ajv@8.20.0) + jsonc-parser: 3.3.1 + picomatch: 4.0.5 + rxjs: 7.8.2 + source-map: 0.7.6 + optionalDependencies: + chokidar: 5.0.0 + + '@angular-devkit/schematics-cli@22.1.8(@types/node@24.13.6)(chokidar@5.0.0)': + dependencies: + '@angular-devkit/core': 22.1.8(chokidar@5.0.0) + '@angular-devkit/schematics': 22.1.8(chokidar@5.0.0) + '@inquirer/prompts': 8.5.2(@types/node@24.13.6) + transitivePeerDependencies: + - '@types/node' + - chokidar + + '@angular-devkit/schematics@22.1.8(chokidar@5.0.0)': + dependencies: + '@angular-devkit/core': 22.1.8(chokidar@5.0.0) + jsonc-parser: 3.3.1 + magic-string: 1.0.0 + ora: 9.4.1 + rxjs: 7.8.2 + transitivePeerDependencies: + - chokidar + + '@aws-sdk/checksums@3.1002.3': + dependencies: + '@aws-sdk/core': 3.980.1 + '@aws-sdk/types': 3.975.0 + '@smithy/core': 3.39.0 + '@smithy/types': 4.20.0 + tslib: 2.8.1 + + '@aws-sdk/client-s3@3.1164.0': + dependencies: + '@aws-sdk/checksums': 3.1002.3 + '@aws-sdk/core': 3.980.1 + '@aws-sdk/credential-provider-node': 3.972.94 + '@aws-sdk/middleware-sdk-s3': 3.972.87 + '@aws-sdk/signature-v4-multi-region': 3.996.51 + '@aws-sdk/types': 3.975.0 + '@smithy/core': 3.39.0 + '@smithy/fetch-http-handler': 5.8.1 + '@smithy/node-http-handler': 4.14.2 + '@smithy/types': 4.20.0 + tslib: 2.8.1 + + '@aws-sdk/core@3.980.1': + dependencies: + '@aws-sdk/types': 3.975.0 + '@aws-sdk/xml-builder': 3.972.42 + '@aws/lambda-invoke-store': 0.3.0 + '@smithy/core': 3.39.0 + '@smithy/signature-v4': 5.7.5 + '@smithy/types': 4.20.0 + bowser: 2.15.0 + tslib: 2.8.1 + + '@aws-sdk/core@3.980.2': + dependencies: + '@aws-sdk/types': 3.975.1 + '@aws-sdk/xml-builder': 3.972.43 + '@aws/lambda-invoke-store': 0.3.0 + '@smithy/core': 3.39.0 + '@smithy/signature-v4': 5.7.5 + '@smithy/types': 4.20.0 + bowser: 2.15.0 + tslib: 2.8.1 + + '@aws-sdk/credential-provider-env@3.972.82': + dependencies: + '@aws-sdk/core': 3.980.1 + '@aws-sdk/types': 3.975.0 + '@smithy/core': 3.39.0 + '@smithy/types': 4.20.0 + tslib: 2.8.1 + + '@aws-sdk/credential-provider-http@3.972.84': + dependencies: + '@aws-sdk/core': 3.980.1 + '@aws-sdk/types': 3.975.0 + '@smithy/core': 3.39.0 + '@smithy/fetch-http-handler': 5.8.1 + '@smithy/node-http-handler': 4.14.2 + '@smithy/types': 4.20.0 + tslib: 2.8.1 + + '@aws-sdk/credential-provider-ini@3.973.27': + dependencies: + '@aws-sdk/core': 3.980.1 + '@aws-sdk/credential-provider-env': 3.972.82 + '@aws-sdk/credential-provider-http': 3.972.84 + '@aws-sdk/credential-provider-login': 3.972.89 + '@aws-sdk/credential-provider-process': 3.972.82 + '@aws-sdk/credential-provider-sso': 3.973.26 + '@aws-sdk/credential-provider-web-identity': 3.972.88 + '@aws-sdk/nested-clients': 3.998.1 + '@aws-sdk/types': 3.975.0 + '@smithy/core': 3.39.0 + '@smithy/credential-provider-imds': 4.5.2 + '@smithy/types': 4.20.0 + tslib: 2.8.1 + + '@aws-sdk/credential-provider-login@3.972.89': + dependencies: + '@aws-sdk/core': 3.980.1 + '@aws-sdk/nested-clients': 3.998.1 + '@aws-sdk/types': 3.975.0 + '@smithy/core': 3.39.0 + '@smithy/types': 4.20.0 + tslib: 2.8.1 + + '@aws-sdk/credential-provider-node@3.972.94': + dependencies: + '@aws-sdk/credential-provider-env': 3.972.82 + '@aws-sdk/credential-provider-http': 3.972.84 + '@aws-sdk/credential-provider-ini': 3.973.27 + '@aws-sdk/credential-provider-process': 3.972.82 + '@aws-sdk/credential-provider-sso': 3.973.26 + '@aws-sdk/credential-provider-web-identity': 3.972.88 + '@aws-sdk/types': 3.975.0 + '@smithy/core': 3.39.0 + '@smithy/credential-provider-imds': 4.5.2 + '@smithy/types': 4.20.0 + tslib: 2.8.1 + + '@aws-sdk/credential-provider-process@3.972.82': + dependencies: + '@aws-sdk/core': 3.980.1 + '@aws-sdk/types': 3.975.0 + '@smithy/core': 3.39.0 + '@smithy/types': 4.20.0 + tslib: 2.8.1 + + '@aws-sdk/credential-provider-sso@3.973.26': + dependencies: + '@aws-sdk/core': 3.980.1 + '@aws-sdk/nested-clients': 3.998.1 + '@aws-sdk/token-providers': 3.1164.0 + '@aws-sdk/types': 3.975.0 + '@smithy/core': 3.39.0 + '@smithy/types': 4.20.0 + tslib: 2.8.1 + + '@aws-sdk/credential-provider-web-identity@3.972.88': + dependencies: + '@aws-sdk/core': 3.980.1 + '@aws-sdk/nested-clients': 3.998.1 + '@aws-sdk/types': 3.975.0 + '@smithy/core': 3.39.0 + '@smithy/types': 4.20.0 + tslib: 2.8.1 + + '@aws-sdk/middleware-sdk-s3@3.972.87': + dependencies: + '@aws-sdk/core': 3.980.1 + '@aws-sdk/signature-v4-multi-region': 3.996.51 + '@aws-sdk/types': 3.975.0 + '@smithy/core': 3.39.0 + '@smithy/types': 4.20.0 + tslib: 2.8.1 + + '@aws-sdk/nested-clients@3.998.1': + dependencies: + '@aws-sdk/core': 3.980.1 + '@aws-sdk/signature-v4-multi-region': 3.996.51 + '@aws-sdk/types': 3.975.0 + '@smithy/core': 3.39.0 + '@smithy/fetch-http-handler': 5.8.1 + '@smithy/node-http-handler': 4.14.2 + '@smithy/types': 4.20.0 + tslib: 2.8.1 + + '@aws-sdk/s3-request-presigner@3.1165.0': + dependencies: + '@aws-sdk/core': 3.980.2 + '@aws-sdk/signature-v4-multi-region': 3.996.52 + '@aws-sdk/types': 3.975.1 + '@smithy/core': 3.39.0 + '@smithy/types': 4.20.0 + tslib: 2.8.1 + + '@aws-sdk/signature-v4-multi-region@3.996.51': + dependencies: + '@aws-sdk/types': 3.975.0 + '@smithy/signature-v4': 5.7.5 + '@smithy/types': 4.20.0 + tslib: 2.8.1 + + '@aws-sdk/signature-v4-multi-region@3.996.52': + dependencies: + '@aws-sdk/types': 3.975.1 + '@smithy/signature-v4': 5.7.5 + '@smithy/types': 4.20.0 + tslib: 2.8.1 + + '@aws-sdk/token-providers@3.1164.0': + dependencies: + '@aws-sdk/core': 3.980.1 + '@aws-sdk/nested-clients': 3.998.1 + '@aws-sdk/types': 3.975.0 + '@smithy/core': 3.39.0 + '@smithy/types': 4.20.0 + tslib: 2.8.1 + + '@aws-sdk/types@3.975.0': + dependencies: + '@smithy/types': 4.20.0 + tslib: 2.8.1 + + '@aws-sdk/types@3.975.1': + dependencies: + '@smithy/types': 4.20.0 + tslib: 2.8.1 + + '@aws-sdk/xml-builder@3.972.42': + dependencies: + '@smithy/types': 4.20.0 + tslib: 2.8.1 + + '@aws-sdk/xml-builder@3.972.43': + dependencies: + '@smithy/types': 4.20.0 + tslib: 2.8.1 + + '@aws/lambda-invoke-store@0.3.0': {} + + '@babel/code-frame@7.29.7': + dependencies: + '@babel/helper-validator-identifier': 7.29.7 + js-tokens: 4.0.0 + picocolors: 1.1.1 + + '@babel/compat-data@7.29.7': {} + + '@babel/core@7.29.7': + dependencies: + '@babel/code-frame': 7.29.7 + '@babel/generator': 7.29.8 + '@babel/helper-compilation-targets': 7.29.7 + '@babel/helper-module-transforms': 7.29.7(@babel/core@7.29.7) + '@babel/helpers': 7.29.7 + '@babel/parser': 7.29.9 + '@babel/template': 7.29.7 + '@babel/traverse': 7.29.8 + '@babel/types': 7.29.8 + '@jridgewell/remapping': 2.3.5 + convert-source-map: 2.0.0 + debug: 4.4.3 + gensync: 1.0.0-beta.2 + json5: 2.2.3 + semver: 6.3.1 + transitivePeerDependencies: + - supports-color + + '@babel/generator@7.29.8': + dependencies: + '@babel/parser': 7.29.9 + '@babel/types': 7.29.8 + '@jridgewell/gen-mapping': 0.3.13 + '@jridgewell/trace-mapping': 0.3.31 + jsesc: 3.1.0 + + '@babel/helper-compilation-targets@7.29.7': + dependencies: + '@babel/compat-data': 7.29.7 + '@babel/helper-validator-option': 7.29.7 + browserslist: 4.29.0 + lru-cache: 5.1.1 + semver: 6.3.1 + + '@babel/helper-globals@7.29.7': {} + + '@babel/helper-module-imports@7.29.7': + dependencies: + '@babel/traverse': 7.29.8 + '@babel/types': 7.29.8 + transitivePeerDependencies: + - supports-color + + '@babel/helper-module-transforms@7.29.7(@babel/core@7.29.7)': + dependencies: + '@babel/core': 7.29.7 + '@babel/helper-module-imports': 7.29.7 + '@babel/helper-validator-identifier': 7.29.7 + '@babel/traverse': 7.29.8 + transitivePeerDependencies: + - supports-color + + '@babel/helper-plugin-utils@7.29.7': {} + + '@babel/helper-string-parser@7.29.7': {} + + '@babel/helper-validator-identifier@7.29.7': {} + + '@babel/helper-validator-option@7.29.7': {} + + '@babel/helpers@7.29.7': + dependencies: + '@babel/template': 7.29.7 + '@babel/types': 7.29.8 + + '@babel/parser@7.29.9': + dependencies: + '@babel/types': 7.29.8 + + '@babel/plugin-syntax-async-generators@7.8.4(@babel/core@7.29.7)': + dependencies: + '@babel/core': 7.29.7 + '@babel/helper-plugin-utils': 7.29.7 + + '@babel/plugin-syntax-bigint@7.8.3(@babel/core@7.29.7)': + dependencies: + '@babel/core': 7.29.7 + '@babel/helper-plugin-utils': 7.29.7 + + '@babel/plugin-syntax-class-properties@7.12.13(@babel/core@7.29.7)': + dependencies: + '@babel/core': 7.29.7 + '@babel/helper-plugin-utils': 7.29.7 + + '@babel/plugin-syntax-class-static-block@7.14.5(@babel/core@7.29.7)': + dependencies: + '@babel/core': 7.29.7 + '@babel/helper-plugin-utils': 7.29.7 + + '@babel/plugin-syntax-import-attributes@7.29.7(@babel/core@7.29.7)': + dependencies: + '@babel/core': 7.29.7 + '@babel/helper-plugin-utils': 7.29.7 + + '@babel/plugin-syntax-import-meta@7.10.4(@babel/core@7.29.7)': + dependencies: + '@babel/core': 7.29.7 + '@babel/helper-plugin-utils': 7.29.7 + + '@babel/plugin-syntax-json-strings@7.8.3(@babel/core@7.29.7)': + dependencies: + '@babel/core': 7.29.7 + '@babel/helper-plugin-utils': 7.29.7 + + '@babel/plugin-syntax-jsx@7.29.7(@babel/core@7.29.7)': + dependencies: + '@babel/core': 7.29.7 + '@babel/helper-plugin-utils': 7.29.7 + + '@babel/plugin-syntax-logical-assignment-operators@7.10.4(@babel/core@7.29.7)': + dependencies: + '@babel/core': 7.29.7 + '@babel/helper-plugin-utils': 7.29.7 + + '@babel/plugin-syntax-nullish-coalescing-operator@7.8.3(@babel/core@7.29.7)': + dependencies: + '@babel/core': 7.29.7 + '@babel/helper-plugin-utils': 7.29.7 + + '@babel/plugin-syntax-numeric-separator@7.10.4(@babel/core@7.29.7)': + dependencies: + '@babel/core': 7.29.7 + '@babel/helper-plugin-utils': 7.29.7 + + '@babel/plugin-syntax-object-rest-spread@7.8.3(@babel/core@7.29.7)': + dependencies: + '@babel/core': 7.29.7 + '@babel/helper-plugin-utils': 7.29.7 + + '@babel/plugin-syntax-optional-catch-binding@7.8.3(@babel/core@7.29.7)': + dependencies: + '@babel/core': 7.29.7 + '@babel/helper-plugin-utils': 7.29.7 + + '@babel/plugin-syntax-optional-chaining@7.8.3(@babel/core@7.29.7)': + dependencies: + '@babel/core': 7.29.7 + '@babel/helper-plugin-utils': 7.29.7 + + '@babel/plugin-syntax-private-property-in-object@7.14.5(@babel/core@7.29.7)': + dependencies: + '@babel/core': 7.29.7 + '@babel/helper-plugin-utils': 7.29.7 + + '@babel/plugin-syntax-top-level-await@7.14.5(@babel/core@7.29.7)': + dependencies: + '@babel/core': 7.29.7 + '@babel/helper-plugin-utils': 7.29.7 + + '@babel/plugin-syntax-typescript@7.29.7(@babel/core@7.29.7)': + dependencies: + '@babel/core': 7.29.7 + '@babel/helper-plugin-utils': 7.29.7 + + '@babel/template@7.29.7': + dependencies: + '@babel/code-frame': 7.29.7 + '@babel/parser': 7.29.9 + '@babel/types': 7.29.8 + + '@babel/traverse@7.29.8': + dependencies: + '@babel/code-frame': 7.29.7 + '@babel/generator': 7.29.8 + '@babel/helper-globals': 7.29.7 + '@babel/parser': 7.29.9 + '@babel/template': 7.29.7 + '@babel/types': 7.29.8 + debug: 4.4.3 + transitivePeerDependencies: + - supports-color + + '@babel/types@7.29.8': + dependencies: + '@babel/helper-string-parser': 7.29.7 + '@babel/helper-validator-identifier': 7.29.7 + + '@bcoe/v8-coverage@0.2.3': {} + + '@borewit/text-codec@0.2.2': {} + + '@colors/colors@1.5.0': + optional: true + + '@cspotcode/source-map-support@0.8.1': + dependencies: + '@jridgewell/trace-mapping': 0.3.9 + + '@electric-sql/pglite-socket@0.1.3(@electric-sql/pglite@0.4.3)': + dependencies: + '@electric-sql/pglite': 0.4.3 + + '@electric-sql/pglite-tools@0.3.3(@electric-sql/pglite@0.4.3)': + dependencies: + '@electric-sql/pglite': 0.4.3 + + '@electric-sql/pglite@0.4.3': {} + + '@emnapi/core@1.10.0': + dependencies: + '@emnapi/wasi-threads': 1.2.1 + tslib: 2.8.1 + optional: true + + '@emnapi/runtime@1.10.0': + dependencies: + tslib: 2.8.1 + optional: true + + '@emnapi/runtime@1.11.3': + dependencies: + tslib: 2.8.1 + optional: true + + '@emnapi/wasi-threads@1.2.1': + dependencies: + tslib: 2.8.1 + optional: true + + '@fastify/accept-negotiator@2.1.0': {} + + '@fastify/ajv-compiler@4.0.6': + dependencies: + ajv: 8.20.0 + ajv-formats: 3.0.1(ajv@8.20.0) + fast-uri: 4.2.1 + + '@fastify/cors@11.3.0': + dependencies: + fastify-plugin: 6.0.0 + toad-cache: 3.7.4 + + '@fastify/error@4.2.0': {} + + '@fastify/fast-json-stringify-compiler@5.1.0': + dependencies: + fast-json-stringify: 7.0.1 + + '@fastify/formbody@9.0.0': + dependencies: + fast-querystring: 1.1.2 + fastify-plugin: 6.0.0 + + '@fastify/forwarded@3.0.2': {} + + '@fastify/merge-json-schemas@0.2.1': + dependencies: + dequal: 2.0.3 + + '@fastify/proxy-addr@5.1.1': + dependencies: + '@fastify/forwarded': 3.0.2 + ipaddr.js: 2.5.0 + + '@fastify/send@4.1.1': + dependencies: + '@lukeed/ms': 2.0.2 + escape-html: 1.0.3 + fast-decode-uri-component: 1.0.1 + http-errors: 2.0.1 + mime: 3.0.0 + + '@fastify/static@10.1.4': + dependencies: + '@fastify/accept-negotiator': 2.1.0 + '@fastify/error': 4.2.0 + '@fastify/send': 4.1.1 + content-disposition: 3.0.0 + fastify-plugin: 6.0.0 + fastq: 1.20.3 + glob: 13.0.6 + + '@img/colour@1.1.0': {} + + '@img/sharp-darwin-arm64@0.35.5': + optionalDependencies: + '@img/sharp-libvips-darwin-arm64': 1.3.4 + optional: true + + '@img/sharp-darwin-x64@0.35.5': + optionalDependencies: + '@img/sharp-libvips-darwin-x64': 1.3.4 + optional: true + + '@img/sharp-freebsd-wasm32@0.35.5': + dependencies: + '@img/sharp-wasm32': 0.35.5 + optional: true + + '@img/sharp-libvips-darwin-arm64@1.3.4': + optional: true + + '@img/sharp-libvips-darwin-x64@1.3.4': + optional: true + + '@img/sharp-libvips-linux-arm64@1.3.4': + optional: true + + '@img/sharp-libvips-linux-arm@1.3.4': + optional: true + + '@img/sharp-libvips-linux-ppc64@1.3.4': + optional: true + + '@img/sharp-libvips-linux-riscv64@1.3.4': + optional: true + + '@img/sharp-libvips-linux-s390x@1.3.4': + optional: true + + '@img/sharp-libvips-linux-x64@1.3.4': + optional: true + + '@img/sharp-libvips-linuxmusl-arm64@1.3.4': + optional: true + + '@img/sharp-libvips-linuxmusl-x64@1.3.4': + optional: true + + '@img/sharp-linux-arm64@0.35.5': + optionalDependencies: + '@img/sharp-libvips-linux-arm64': 1.3.4 + optional: true + + '@img/sharp-linux-arm@0.35.5': + optionalDependencies: + '@img/sharp-libvips-linux-arm': 1.3.4 + optional: true + + '@img/sharp-linux-ppc64@0.35.5': + optionalDependencies: + '@img/sharp-libvips-linux-ppc64': 1.3.4 + optional: true + + '@img/sharp-linux-riscv64@0.35.5': + optionalDependencies: + '@img/sharp-libvips-linux-riscv64': 1.3.4 + optional: true + + '@img/sharp-linux-s390x@0.35.5': + optionalDependencies: + '@img/sharp-libvips-linux-s390x': 1.3.4 + optional: true + + '@img/sharp-linux-x64@0.35.5': + optionalDependencies: + '@img/sharp-libvips-linux-x64': 1.3.4 + optional: true + + '@img/sharp-linuxmusl-arm64@0.35.5': + optionalDependencies: + '@img/sharp-libvips-linuxmusl-arm64': 1.3.4 + optional: true + + '@img/sharp-linuxmusl-x64@0.35.5': + optionalDependencies: + '@img/sharp-libvips-linuxmusl-x64': 1.3.4 + optional: true + + '@img/sharp-wasm32@0.35.5': + dependencies: + '@emnapi/runtime': 1.11.3 + optional: true + + '@img/sharp-webcontainers-wasm32@0.35.5': + dependencies: + '@img/sharp-wasm32': 0.35.5 + optional: true + + '@img/sharp-win32-arm64@0.35.5': + optional: true + + '@img/sharp-win32-ia32@0.35.5': + optional: true + + '@img/sharp-win32-x64@0.35.5': + optional: true + + '@inquirer/ansi@2.0.8': {} + + '@inquirer/checkbox@5.2.5(@types/node@24.13.6)': + dependencies: + '@inquirer/ansi': 2.0.8 + '@inquirer/core': 12.0.3(@types/node@24.13.6) + '@inquirer/figures': 2.0.9 + '@inquirer/type': 4.1.1(@types/node@24.13.6) + optionalDependencies: + '@types/node': 24.13.6 + + '@inquirer/confirm@6.3.2(@types/node@24.13.6)': + dependencies: + '@inquirer/core': 12.0.3(@types/node@24.13.6) + '@inquirer/type': 4.1.1(@types/node@24.13.6) + optionalDependencies: + '@types/node': 24.13.6 + + '@inquirer/core@12.0.3(@types/node@24.13.6)': + dependencies: + '@inquirer/ansi': 2.0.8 + '@inquirer/figures': 2.0.9 + '@inquirer/type': 4.1.1(@types/node@24.13.6) + cli-width: 4.1.0 + fast-wrap-ansi: 0.2.2 + mute-stream: 3.0.0 + signal-exit: 4.1.0 + optionalDependencies: + '@types/node': 24.13.6 + + '@inquirer/editor@5.3.3(@types/node@24.13.6)': + dependencies: + '@inquirer/core': 12.0.3(@types/node@24.13.6) + '@inquirer/external-editor': 3.0.5(@types/node@24.13.6) + '@inquirer/type': 4.1.1(@types/node@24.13.6) + optionalDependencies: + '@types/node': 24.13.6 + + '@inquirer/expand@5.1.5(@types/node@24.13.6)': + dependencies: + '@inquirer/core': 12.0.3(@types/node@24.13.6) + '@inquirer/type': 4.1.1(@types/node@24.13.6) + optionalDependencies: + '@types/node': 24.13.6 + + '@inquirer/external-editor@3.0.5(@types/node@24.13.6)': + dependencies: + chardet: 2.2.0 + iconv-lite: 0.7.3 + optionalDependencies: + '@types/node': 24.13.6 + + '@inquirer/figures@2.0.9': {} + + '@inquirer/input@5.1.6(@types/node@24.13.6)': + dependencies: + '@inquirer/core': 12.0.3(@types/node@24.13.6) + '@inquirer/type': 4.1.1(@types/node@24.13.6) + optionalDependencies: + '@types/node': 24.13.6 + + '@inquirer/number@4.2.3(@types/node@24.13.6)': + dependencies: + '@inquirer/core': 12.0.3(@types/node@24.13.6) + '@inquirer/type': 4.1.1(@types/node@24.13.6) + optionalDependencies: + '@types/node': 24.13.6 + + '@inquirer/password@5.2.2(@types/node@24.13.6)': + dependencies: + '@inquirer/ansi': 2.0.8 + '@inquirer/core': 12.0.3(@types/node@24.13.6) + '@inquirer/type': 4.1.1(@types/node@24.13.6) + optionalDependencies: + '@types/node': 24.13.6 + + '@inquirer/prompts@8.5.2(@types/node@24.13.6)': + dependencies: + '@inquirer/checkbox': 5.2.5(@types/node@24.13.6) + '@inquirer/confirm': 6.3.2(@types/node@24.13.6) + '@inquirer/editor': 5.3.3(@types/node@24.13.6) + '@inquirer/expand': 5.1.5(@types/node@24.13.6) + '@inquirer/input': 5.1.6(@types/node@24.13.6) + '@inquirer/number': 4.2.3(@types/node@24.13.6) + '@inquirer/password': 5.2.2(@types/node@24.13.6) + '@inquirer/rawlist': 5.3.5(@types/node@24.13.6) + '@inquirer/search': 4.3.3(@types/node@24.13.6) + '@inquirer/select': 5.2.5(@types/node@24.13.6) + optionalDependencies: + '@types/node': 24.13.6 + + '@inquirer/prompts@8.7.2(@types/node@24.13.6)': + dependencies: + '@inquirer/checkbox': 5.2.5(@types/node@24.13.6) + '@inquirer/confirm': 6.3.2(@types/node@24.13.6) + '@inquirer/editor': 5.3.3(@types/node@24.13.6) + '@inquirer/expand': 5.1.5(@types/node@24.13.6) + '@inquirer/input': 5.1.6(@types/node@24.13.6) + '@inquirer/number': 4.2.3(@types/node@24.13.6) + '@inquirer/password': 5.2.2(@types/node@24.13.6) + '@inquirer/rawlist': 5.3.5(@types/node@24.13.6) + '@inquirer/search': 4.3.3(@types/node@24.13.6) + '@inquirer/select': 5.2.5(@types/node@24.13.6) + optionalDependencies: + '@types/node': 24.13.6 + + '@inquirer/rawlist@5.3.5(@types/node@24.13.6)': + dependencies: + '@inquirer/core': 12.0.3(@types/node@24.13.6) + '@inquirer/type': 4.1.1(@types/node@24.13.6) + optionalDependencies: + '@types/node': 24.13.6 + + '@inquirer/search@4.3.3(@types/node@24.13.6)': + dependencies: + '@inquirer/core': 12.0.3(@types/node@24.13.6) + '@inquirer/figures': 2.0.9 + '@inquirer/type': 4.1.1(@types/node@24.13.6) + optionalDependencies: + '@types/node': 24.13.6 + + '@inquirer/select@5.2.5(@types/node@24.13.6)': + dependencies: + '@inquirer/ansi': 2.0.8 + '@inquirer/core': 12.0.3(@types/node@24.13.6) + '@inquirer/figures': 2.0.9 + '@inquirer/type': 4.1.1(@types/node@24.13.6) + optionalDependencies: + '@types/node': 24.13.6 + + '@inquirer/type@4.1.1(@types/node@24.13.6)': + optionalDependencies: + '@types/node': 24.13.6 + + '@ioredis/commands@2.0.0': {} + + '@isaacs/cliui@8.0.2': + dependencies: + string-width: 5.1.2 + string-width-cjs: string-width@4.2.3 + strip-ansi: 7.2.0 + strip-ansi-cjs: strip-ansi@6.0.1 + wrap-ansi: 8.1.0 + wrap-ansi-cjs: wrap-ansi@7.0.0 + + '@istanbuljs/load-nyc-config@1.1.0': + dependencies: + camelcase: 5.3.1 + find-up: 4.1.0 + get-package-type: 0.1.0 + js-yaml: 3.15.2 + resolve-from: 5.0.0 + + '@istanbuljs/schema@0.1.6': {} + + '@jest/console@30.5.2': + dependencies: + '@jest/types': 30.5.1 + '@types/node': 24.13.6 + chalk: 4.1.2 + jest-message-util: 30.5.1 + jest-util: 30.5.1 + slash: 3.0.0 + + '@jest/core@30.5.2(ts-node@10.9.2(@types/node@24.13.6)(typescript@6.0.3))': + dependencies: + '@jest/console': 30.5.2 + '@jest/pattern': 30.5.0 + '@jest/reporters': 30.5.2 + '@jest/test-result': 30.5.2 + '@jest/transform': 30.5.2 + '@jest/types': 30.5.1 + '@types/node': 24.13.6 + ansi-escapes: 4.3.2 + chalk: 4.1.2 + ci-info: 4.4.0 + exit-x: 0.2.2 + fast-json-stable-stringify: 2.1.0 + graceful-fs: 4.2.11 + jest-changed-files: 30.5.1 + jest-config: 30.5.2(@types/node@24.13.6)(ts-node@10.9.2(@types/node@24.13.6)(typescript@6.0.3)) + jest-haste-map: 30.5.1 + jest-message-util: 30.5.1 + jest-regex-util: 30.5.0 + jest-resolve: 30.5.1 + jest-resolve-dependencies: 30.5.2 + jest-runner: 30.5.2 + jest-runtime: 30.5.2 + jest-snapshot: 30.5.2 + jest-util: 30.5.1 + jest-validate: 30.5.1 + jest-watcher: 30.5.2 + pretty-format: 30.5.1 + slash: 3.0.0 + transitivePeerDependencies: + - babel-plugin-macros + - esbuild-register + - supports-color + - ts-node + + '@jest/diff-sequences@30.5.0': {} + + '@jest/environment@30.5.2': + dependencies: + '@jest/fake-timers': 30.5.2 + '@jest/types': 30.5.1 + '@types/node': 24.13.6 + jest-mock: 30.5.2 + + '@jest/expect-utils@30.5.2': + dependencies: + '@jest/get-type': 30.5.0 + + '@jest/expect@30.5.2': + dependencies: + expect: 30.5.2 + jest-snapshot: 30.5.2 + transitivePeerDependencies: + - supports-color + + '@jest/fake-timers@30.5.2': + dependencies: + '@jest/types': 30.5.1 + '@sinonjs/fake-timers': 15.4.0 + '@types/node': 24.13.6 + jest-message-util: 30.5.1 + jest-mock: 30.5.2 + jest-util: 30.5.1 + + '@jest/get-type@30.5.0': {} + + '@jest/globals@30.5.2': + dependencies: + '@jest/environment': 30.5.2 + '@jest/expect': 30.5.2 + '@jest/types': 30.5.1 + jest-mock: 30.5.2 + transitivePeerDependencies: + - supports-color + + '@jest/pattern@30.5.0': + dependencies: + '@types/node': 24.13.6 + jest-regex-util: 30.5.0 + + '@jest/reporters@30.5.2': + dependencies: + '@bcoe/v8-coverage': 0.2.3 + '@jest/console': 30.5.2 + '@jest/test-result': 30.5.2 + '@jest/transform': 30.5.2 + '@jest/types': 30.5.1 + '@jridgewell/trace-mapping': 0.3.31 + '@types/node': 24.13.6 + chalk: 4.1.2 + collect-v8-coverage: 1.0.3 + exit-x: 0.2.2 + glob: 13.0.6 + graceful-fs: 4.2.11 + 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.2.0 + jest-message-util: 30.5.1 + jest-util: 30.5.1 + jest-worker: 30.5.1 + slash: 3.0.0 + string-length: 4.0.2 + v8-to-istanbul: 9.3.0 + transitivePeerDependencies: + - supports-color + + '@jest/schemas@30.5.0': + dependencies: + '@sinclair/typebox': 0.34.52 + + '@jest/snapshot-utils@30.5.1': + dependencies: + '@jest/types': 30.5.1 + chalk: 4.1.2 + graceful-fs: 4.2.11 + natural-compare: 1.4.0 + + '@jest/source-map@30.5.2': + dependencies: + '@jridgewell/trace-mapping': 0.3.31 + callsites: 3.1.0 + convert-source-map: 2.0.0 + graceful-fs: 4.2.11 + + '@jest/test-result@30.5.2': + dependencies: + '@jest/console': 30.5.2 + '@jest/types': 30.5.1 + '@types/istanbul-lib-coverage': 2.0.6 + collect-v8-coverage: 1.0.3 + + '@jest/test-sequencer@30.5.2': + dependencies: + '@jest/test-result': 30.5.2 + graceful-fs: 4.2.11 + jest-haste-map: 30.5.1 + slash: 3.0.0 + + '@jest/transform@30.5.2': + dependencies: + '@babel/core': 7.29.7 + '@jest/types': 30.5.1 + '@jridgewell/trace-mapping': 0.3.31 + babel-plugin-istanbul: 8.0.0 + chalk: 4.1.2 + convert-source-map: 2.0.0 + fast-json-stable-stringify: 2.1.0 + graceful-fs: 4.2.11 + jest-haste-map: 30.5.1 + jest-regex-util: 30.5.0 + jest-util: 30.5.1 + pirates: 4.0.7 + slash: 3.0.0 + write-file-atomic: 5.0.1 + transitivePeerDependencies: + - supports-color + + '@jest/types@30.5.1': + dependencies: + '@jest/pattern': 30.5.0 + '@jest/schemas': 30.5.0 + '@types/istanbul-lib-coverage': 2.0.6 + '@types/istanbul-reports': 3.0.4 + '@types/node': 24.13.6 + '@types/yargs': 17.0.35 + chalk: 4.1.2 + + '@jridgewell/gen-mapping@0.3.13': + dependencies: + '@jridgewell/sourcemap-codec': 1.6.0 + '@jridgewell/trace-mapping': 0.3.31 + + '@jridgewell/remapping@2.3.5': + dependencies: + '@jridgewell/gen-mapping': 0.3.13 + '@jridgewell/trace-mapping': 0.3.31 + + '@jridgewell/resolve-uri@3.1.2': {} + + '@jridgewell/source-map@0.3.11': + dependencies: + '@jridgewell/gen-mapping': 0.3.13 + '@jridgewell/trace-mapping': 0.3.31 + + '@jridgewell/sourcemap-codec@1.6.0': {} + + '@jridgewell/trace-mapping@0.3.31': + dependencies: + '@jridgewell/resolve-uri': 3.1.2 + '@jridgewell/sourcemap-codec': 1.6.0 + + '@jridgewell/trace-mapping@0.3.9': + dependencies: + '@jridgewell/resolve-uri': 3.1.2 + '@jridgewell/sourcemap-codec': 1.6.0 + + '@lukeed/csprng@1.1.0': {} + + '@lukeed/ms@2.0.2': {} + + '@microsoft/tsdoc@0.16.0': {} + + '@napi-rs/wasm-runtime@1.2.4(@emnapi/core@1.10.0)(@emnapi/runtime@1.10.0)': + dependencies: + '@emnapi/core': 1.10.0 + '@emnapi/runtime': 1.10.0 + '@tybys/wasm-util': 0.10.4 + optional: true + + '@nestjs/cli@12.0.3(@types/node@24.13.6)(prettier@3.9.8)(ts-loader@9.6.2(typescript@6.0.3)(webpack@5.111.1(sharp@0.35.5(@types/node@24.13.6))))(webpack@5.111.1(sharp@0.35.5(@types/node@24.13.6)))': + dependencies: + '@angular-devkit/core': 22.1.8(chokidar@5.0.0) + '@angular-devkit/schematics': 22.1.8(chokidar@5.0.0) + '@angular-devkit/schematics-cli': 22.1.8(@types/node@24.13.6)(chokidar@5.0.0) + '@inquirer/prompts': 8.7.2(@types/node@24.13.6) + '@nestjs/schematics': 12.0.4(chokidar@5.0.0)(prettier@3.9.8)(typescript@6.0.3) + ansis: 4.4.0 + chokidar: 5.0.0 + cli-table3: 0.6.5 + commander: 15.0.0 + minimatch: 10.2.6 + node-emoji: 2.2.0 + ora: 9.4.1 + tsconfig-paths: 4.2.0 + typescript: 6.0.3 + optionalDependencies: + ts-loader: 9.6.2(typescript@6.0.3)(webpack@5.111.1(sharp@0.35.5(@types/node@24.13.6))) + webpack: 5.111.1(sharp@0.35.5(@types/node@24.13.6)) + transitivePeerDependencies: + - '@types/node' + - prettier + + '@nestjs/common@12.0.4(reflect-metadata@0.2.2)(rxjs@7.8.2)': + dependencies: + '@standard-schema/spec': 1.1.0 + file-type: 22.1.1 + iterare: 1.2.1 + load-esm: 1.0.3 + reflect-metadata: 0.2.2 + rxjs: 7.8.2 + tslib: 2.8.1 + uid: 2.0.2 + transitivePeerDependencies: + - supports-color + + '@nestjs/core@12.0.4(@nestjs/common@12.0.4(reflect-metadata@0.2.2)(rxjs@7.8.2))(@nestjs/platform-express@12.0.4)(reflect-metadata@0.2.2)(rxjs@7.8.2)': + dependencies: + '@nestjs/common': 12.0.4(reflect-metadata@0.2.2)(rxjs@7.8.2) + fast-safe-stringify: 2.1.1 + iterare: 1.2.1 + path-to-regexp: 8.4.2 + reflect-metadata: 0.2.2 + rxjs: 7.8.2 + tslib: 2.8.1 + uid: 2.0.2 + optionalDependencies: + '@nestjs/platform-express': 12.0.4(@nestjs/common@12.0.4(reflect-metadata@0.2.2)(rxjs@7.8.2))(@nestjs/core@12.0.4) + + '@nestjs/mapped-types@12.0.0(@nestjs/common@12.0.4(reflect-metadata@0.2.2)(rxjs@7.8.2))(reflect-metadata@0.2.2)': + dependencies: + '@nestjs/common': 12.0.4(reflect-metadata@0.2.2)(rxjs@7.8.2) + reflect-metadata: 0.2.2 + + '@nestjs/mau@0.2.8': + dependencies: + chalk: 4.1.2 + cli-progress: 3.12.0 + commander: 4.1.1 + inquirer: 8.2.6 + node-emoji: 2.1.3 + ora: 5.4.1 + undici: 6.20.1 + + '@nestjs/platform-express@12.0.4(@nestjs/common@12.0.4(reflect-metadata@0.2.2)(rxjs@7.8.2))(@nestjs/core@12.0.4)': + dependencies: + '@nestjs/common': 12.0.4(reflect-metadata@0.2.2)(rxjs@7.8.2) + '@nestjs/core': 12.0.4(@nestjs/common@12.0.4(reflect-metadata@0.2.2)(rxjs@7.8.2))(@nestjs/platform-express@12.0.4)(reflect-metadata@0.2.2)(rxjs@7.8.2) + cors: 2.8.6 + express: 5.2.1 + multer: 2.4.0 + path-to-regexp: 8.4.2 + tslib: 2.8.1 + transitivePeerDependencies: + - supports-color + optional: true + + '@nestjs/platform-fastify@12.0.1(@fastify/static@10.1.4)(@nestjs/common@12.0.4(reflect-metadata@0.2.2)(rxjs@7.8.2))(@nestjs/core@12.0.4)': + dependencies: + '@fastify/cors': 11.3.0 + '@fastify/formbody': 9.0.0 + '@nestjs/common': 12.0.4(reflect-metadata@0.2.2)(rxjs@7.8.2) + '@nestjs/core': 12.0.4(@nestjs/common@12.0.4(reflect-metadata@0.2.2)(rxjs@7.8.2))(@nestjs/platform-express@12.0.4)(reflect-metadata@0.2.2)(rxjs@7.8.2) + fast-querystring: 1.1.2 + fastify: 5.12.1 + fastify-plugin: 6.0.0 + find-my-way: 9.9.0 + light-my-request: 6.6.0 + path-to-regexp: 8.4.2 + reusify: 1.1.0 + tslib: 2.8.1 + optionalDependencies: + '@fastify/static': 10.1.4 + + '@nestjs/schematics@12.0.4(chokidar@5.0.0)(prettier@3.9.8)(typescript@6.0.3)': + dependencies: + '@angular-devkit/core': 22.1.8(chokidar@5.0.0) + '@angular-devkit/schematics': 22.1.8(chokidar@5.0.0) + comment-json: 5.0.0 + jsonc-parser: 3.3.1 + pluralize: 8.0.0 + typescript: 6.0.3 + optionalDependencies: + prettier: 3.9.8 + transitivePeerDependencies: + - chokidar + + '@nestjs/swagger@12.0.1(@fastify/static@10.1.4)(@nestjs/common@12.0.4(reflect-metadata@0.2.2)(rxjs@7.8.2))(@nestjs/core@12.0.4)(reflect-metadata@0.2.2)': + dependencies: + '@microsoft/tsdoc': 0.16.0 + '@nestjs/common': 12.0.4(reflect-metadata@0.2.2)(rxjs@7.8.2) + '@nestjs/core': 12.0.4(@nestjs/common@12.0.4(reflect-metadata@0.2.2)(rxjs@7.8.2))(@nestjs/platform-express@12.0.4)(reflect-metadata@0.2.2)(rxjs@7.8.2) + '@nestjs/mapped-types': 12.0.0(@nestjs/common@12.0.4(reflect-metadata@0.2.2)(rxjs@7.8.2))(reflect-metadata@0.2.2) + '@standard-schema/spec': 1.1.0 + es-toolkit: 1.51.0 + js-yaml: 5.4.1 + path-to-regexp: 8.4.2 + reflect-metadata: 0.2.2 + swagger-ui-dist: 5.32.14 + optionalDependencies: + '@fastify/static': 10.1.4 + + '@nestjs/testing@12.0.4(@nestjs/common@12.0.4(reflect-metadata@0.2.2)(rxjs@7.8.2))(@nestjs/core@12.0.4)(@nestjs/platform-express@12.0.4)': + dependencies: + '@nestjs/common': 12.0.4(reflect-metadata@0.2.2)(rxjs@7.8.2) + '@nestjs/core': 12.0.4(@nestjs/common@12.0.4(reflect-metadata@0.2.2)(rxjs@7.8.2))(@nestjs/platform-express@12.0.4)(reflect-metadata@0.2.2)(rxjs@7.8.2) + tslib: 2.8.1 + optionalDependencies: + '@nestjs/platform-express': 12.0.4(@nestjs/common@12.0.4(reflect-metadata@0.2.2)(rxjs@7.8.2))(@nestjs/core@12.0.4) + + '@noble/hashes@1.8.0': {} + + '@oxlint-tsgolint/darwin-arm64@7.0.2002': + optional: true + + '@oxlint-tsgolint/darwin-x64@7.0.2002': + optional: true + + '@oxlint-tsgolint/linux-arm64@7.0.2002': + optional: true + + '@oxlint-tsgolint/linux-x64@7.0.2002': + optional: true + + '@oxlint-tsgolint/win32-arm64@7.0.2002': + optional: true + + '@oxlint-tsgolint/win32-x64@7.0.2002': + optional: true + + '@oxlint/binding-android-arm-eabi@1.83.0': + optional: true + + '@oxlint/binding-android-arm64@1.83.0': + optional: true + + '@oxlint/binding-darwin-arm64@1.83.0': + optional: true + + '@oxlint/binding-darwin-x64@1.83.0': + optional: true + + '@oxlint/binding-freebsd-x64@1.83.0': + optional: true + + '@oxlint/binding-linux-arm-gnueabihf@1.83.0': + optional: true + + '@oxlint/binding-linux-arm-musleabihf@1.83.0': + optional: true + + '@oxlint/binding-linux-arm64-gnu@1.83.0': + optional: true + + '@oxlint/binding-linux-arm64-musl@1.83.0': + optional: true + + '@oxlint/binding-linux-ppc64-gnu@1.83.0': + optional: true + + '@oxlint/binding-linux-riscv64-gnu@1.83.0': + optional: true + + '@oxlint/binding-linux-riscv64-musl@1.83.0': + optional: true + + '@oxlint/binding-linux-s390x-gnu@1.83.0': + optional: true + + '@oxlint/binding-linux-x64-gnu@1.83.0': + optional: true + + '@oxlint/binding-linux-x64-musl@1.83.0': + optional: true + + '@oxlint/binding-openharmony-arm64@1.83.0': + optional: true + + '@oxlint/binding-win32-arm64-msvc@1.83.0': + optional: true + + '@oxlint/binding-win32-ia32-msvc@1.83.0': + optional: true + + '@oxlint/binding-win32-x64-msvc@1.83.0': + optional: true + + '@paralleldrive/cuid2@2.3.1': + dependencies: + '@noble/hashes': 1.8.0 + + '@parcel/watcher-android-arm64@2.6.0': + optional: true + + '@parcel/watcher-darwin-arm64@2.6.0': + optional: true + + '@parcel/watcher-darwin-x64@2.6.0': + optional: true + + '@parcel/watcher-freebsd-x64@2.6.0': + optional: true + + '@parcel/watcher-linux-arm-glibc@2.6.0': + optional: true + + '@parcel/watcher-linux-arm-musl@2.6.0': + optional: true + + '@parcel/watcher-linux-arm64-glibc@2.6.0': + optional: true + + '@parcel/watcher-linux-arm64-musl@2.6.0': + optional: true + + '@parcel/watcher-linux-x64-glibc@2.6.0': + optional: true + + '@parcel/watcher-linux-x64-musl@2.6.0': + optional: true + + '@parcel/watcher-win32-arm64@2.6.0': + optional: true + + '@parcel/watcher-win32-x64@2.6.0': + optional: true + + '@parcel/watcher@2.6.0': + dependencies: + detect-libc: 2.1.2 + is-glob: 4.0.3 + node-addon-api: 7.1.1 + picomatch: 4.0.7 + optionalDependencies: + '@parcel/watcher-android-arm64': 2.6.0 + '@parcel/watcher-darwin-arm64': 2.6.0 + '@parcel/watcher-darwin-x64': 2.6.0 + '@parcel/watcher-freebsd-x64': 2.6.0 + '@parcel/watcher-linux-arm-glibc': 2.6.0 + '@parcel/watcher-linux-arm-musl': 2.6.0 + '@parcel/watcher-linux-arm64-glibc': 2.6.0 + '@parcel/watcher-linux-arm64-musl': 2.6.0 + '@parcel/watcher-linux-x64-glibc': 2.6.0 + '@parcel/watcher-linux-x64-musl': 2.6.0 + '@parcel/watcher-win32-arm64': 2.6.0 + '@parcel/watcher-win32-x64': 2.6.0 + + '@pinojs/redact@0.4.0': {} + + '@pkgjs/parseargs@0.11.0': + optional: true + + '@pkgr/core@0.3.6': {} + + '@prisma/adapter-pg@7.10.0': + dependencies: + '@prisma/driver-adapter-utils': 7.10.0 + '@types/pg': 8.23.1 + pg: 8.23.1 + postgres-array: 3.0.4 + transitivePeerDependencies: + - pg-native + + '@prisma/client-runtime-utils@7.10.0': {} + + '@prisma/client@7.10.0(prisma@7.10.0(@types/react@19.3.0)(react-dom@19.3.0(react@19.3.0))(react@19.3.0)(typescript@6.0.3))(typescript@6.0.3)': + dependencies: + '@prisma/client-runtime-utils': 7.10.0 + optionalDependencies: + prisma: 7.10.0(@types/react@19.3.0)(react-dom@19.3.0(react@19.3.0))(react@19.3.0)(typescript@6.0.3) + typescript: 6.0.3 + + '@prisma/config@7.10.0': + dependencies: + c12: 3.3.4 + deepmerge-ts: 7.1.5 + effect: 3.20.0 + empathic: 2.0.0 + transitivePeerDependencies: + - magicast + + '@prisma/debug@7.10.0': {} + + '@prisma/debug@7.2.0': {} + + '@prisma/dev@0.24.17(typescript@6.0.3)': + dependencies: + '@electric-sql/pglite': 0.4.3 + '@electric-sql/pglite-socket': 0.1.3(@electric-sql/pglite@0.4.3) + '@electric-sql/pglite-tools': 0.3.3(@electric-sql/pglite@0.4.3) + '@prisma/get-platform': 7.2.0 + '@prisma/query-plan-executor': 7.2.0 + '@prisma/streams-local': 0.1.11 + find-my-way: 9.7.0 + foreground-child: 3.3.1 + get-port-please: 3.2.0 + pathe: 2.0.3 + proper-lockfile: 4.1.2 + remeda: 2.33.4 + std-env: 3.10.0 + valibot: 1.4.2(typescript@6.0.3) + zeptomatch: 2.1.0 + transitivePeerDependencies: + - typescript + + '@prisma/driver-adapter-utils@7.10.0': + dependencies: + '@prisma/debug': 7.10.0 + + '@prisma/engines-version@7.10.0-4.0edf323efd1d98336f3f0a68684b56f689b900d3': {} + + '@prisma/engines@7.10.0': + dependencies: + '@prisma/debug': 7.10.0 + '@prisma/engines-version': 7.10.0-4.0edf323efd1d98336f3f0a68684b56f689b900d3 + '@prisma/fetch-engine': 7.10.0 + '@prisma/get-platform': 7.10.0 + + '@prisma/fetch-engine@7.10.0': + dependencies: + '@prisma/debug': 7.10.0 + '@prisma/engines-version': 7.10.0-4.0edf323efd1d98336f3f0a68684b56f689b900d3 + '@prisma/get-platform': 7.10.0 + + '@prisma/get-platform@7.10.0': + dependencies: + '@prisma/debug': 7.10.0 + + '@prisma/get-platform@7.2.0': + dependencies: + '@prisma/debug': 7.2.0 + + '@prisma/query-plan-executor@7.2.0': {} + + '@prisma/streams-local@0.1.11': + dependencies: + ajv: 8.20.0 + better-result: 2.10.0 + env-paths: 3.0.0 + proper-lockfile: 4.1.2 + + '@prisma/studio-core@0.33.0(@types/react@19.3.0)(react-dom@19.3.0(react@19.3.0))(react@19.3.0)': + dependencies: + '@radix-ui/react-toggle': 1.1.10(@types/react@19.3.0)(react-dom@19.3.0(react@19.3.0))(react@19.3.0) + '@types/react': 19.3.0 + '@visx/curve': 4.0.1-alpha.0 + '@visx/event': 4.0.1-alpha.0 + '@visx/grid': 4.0.1-alpha.0(react@19.3.0) + '@visx/group': 4.0.1-alpha.0(react@19.3.0) + '@visx/responsive': 4.0.1-alpha.0(react@19.3.0) + '@visx/scale': 4.0.1-alpha.0 + '@visx/shape': 4.0.1-alpha.0(react@19.3.0) + d3-array: 3.2.4 + d3-shape: 3.2.0 + elkjs: 0.11.1 + react: 19.3.0 + react-dom: 19.3.0(react@19.3.0) + transitivePeerDependencies: + - '@types/react-dom' + + '@radix-ui/primitive@1.1.3': {} + + '@radix-ui/react-compose-refs@1.1.2(@types/react@19.3.0)(react@19.3.0)': + dependencies: + react: 19.3.0 + optionalDependencies: + '@types/react': 19.3.0 + + '@radix-ui/react-primitive@2.1.3(@types/react@19.3.0)(react-dom@19.3.0(react@19.3.0))(react@19.3.0)': + dependencies: + '@radix-ui/react-slot': 1.2.3(@types/react@19.3.0)(react@19.3.0) + react: 19.3.0 + react-dom: 19.3.0(react@19.3.0) + optionalDependencies: + '@types/react': 19.3.0 + + '@radix-ui/react-slot@1.2.3(@types/react@19.3.0)(react@19.3.0)': + dependencies: + '@radix-ui/react-compose-refs': 1.1.2(@types/react@19.3.0)(react@19.3.0) + react: 19.3.0 + optionalDependencies: + '@types/react': 19.3.0 + + '@radix-ui/react-toggle@1.1.10(@types/react@19.3.0)(react-dom@19.3.0(react@19.3.0))(react@19.3.0)': + dependencies: + '@radix-ui/primitive': 1.1.3 + '@radix-ui/react-primitive': 2.1.3(@types/react@19.3.0)(react-dom@19.3.0(react@19.3.0))(react@19.3.0) + '@radix-ui/react-use-controllable-state': 1.2.2(@types/react@19.3.0)(react@19.3.0) + react: 19.3.0 + react-dom: 19.3.0(react@19.3.0) + optionalDependencies: + '@types/react': 19.3.0 + + '@radix-ui/react-use-controllable-state@1.2.2(@types/react@19.3.0)(react@19.3.0)': + dependencies: + '@radix-ui/react-use-effect-event': 0.0.2(@types/react@19.3.0)(react@19.3.0) + '@radix-ui/react-use-layout-effect': 1.1.1(@types/react@19.3.0)(react@19.3.0) + react: 19.3.0 + optionalDependencies: + '@types/react': 19.3.0 + + '@radix-ui/react-use-effect-event@0.0.2(@types/react@19.3.0)(react@19.3.0)': + dependencies: + '@radix-ui/react-use-layout-effect': 1.1.1(@types/react@19.3.0)(react@19.3.0) + react: 19.3.0 + optionalDependencies: + '@types/react': 19.3.0 + + '@radix-ui/react-use-layout-effect@1.1.1(@types/react@19.3.0)(react@19.3.0)': + dependencies: + react: 19.3.0 + optionalDependencies: + '@types/react': 19.3.0 + + '@scalar/client-side-rendering@0.4.1': + dependencies: + '@scalar/schemas': 0.10.0 + '@scalar/types': 0.20.0 + '@scalar/validation': 0.6.3 + + '@scalar/helpers@0.12.0': {} + + '@scalar/nestjs-api-reference@1.2.19': + dependencies: + '@scalar/client-side-rendering': 0.4.1 + + '@scalar/schemas@0.10.0': + dependencies: + '@scalar/helpers': 0.12.0 + '@scalar/validation': 0.6.3 + + '@scalar/types@0.20.0': + dependencies: + '@scalar/helpers': 0.12.0 + nanoid: 5.1.16 + type-fest: 5.10.0 + zod: 4.6.5 + + '@scalar/validation@0.6.3': {} + + '@scarf/scarf@1.4.0': {} + + '@sinclair/typebox@0.34.52': {} + + '@sindresorhus/is@4.6.0': {} + + '@sinonjs/commons@3.0.1': + dependencies: + type-detect: 4.0.8 + + '@sinonjs/fake-timers@15.4.0': + dependencies: + '@sinonjs/commons': 3.0.1 + + '@smithy/core@3.39.0': + dependencies: + '@smithy/types': 4.20.0 + tslib: 2.8.1 + + '@smithy/credential-provider-imds@4.5.2': + dependencies: + '@smithy/core': 3.39.0 + '@smithy/types': 4.20.0 + tslib: 2.8.1 + + '@smithy/fetch-http-handler@5.8.1': + dependencies: + '@smithy/core': 3.39.0 + '@smithy/types': 4.20.0 + tslib: 2.8.1 + + '@smithy/node-http-handler@4.14.2': + dependencies: + '@smithy/core': 3.39.0 + '@smithy/types': 4.20.0 + tslib: 2.8.1 + + '@smithy/signature-v4@5.7.5': + dependencies: + '@smithy/core': 3.39.0 + '@smithy/types': 4.20.0 + tslib: 2.8.1 + + '@smithy/types@4.20.0': + dependencies: + tslib: 2.8.1 + + '@standard-schema/spec@1.1.0': {} + + '@tokenizer/inflate@0.4.1': + dependencies: + debug: 4.4.3 + token-types: 6.1.2 + transitivePeerDependencies: + - supports-color + + '@tokenizer/token@0.3.0': {} + + '@tsconfig/node10@1.0.13': {} + + '@tsconfig/node12@1.0.11': {} + + '@tsconfig/node14@1.0.3': {} + + '@tsconfig/node16@1.0.4': {} + + '@tybys/wasm-util@0.10.4': + dependencies: + tslib: 2.8.1 + optional: true + + '@types/babel__core@7.20.5': + dependencies: + '@babel/parser': 7.29.9 + '@babel/types': 7.29.8 + '@types/babel__generator': 7.27.0 + '@types/babel__template': 7.4.4 + '@types/babel__traverse': 7.28.0 + + '@types/babel__generator@7.27.0': + dependencies: + '@babel/types': 7.29.8 + + '@types/babel__template@7.4.4': + dependencies: + '@babel/parser': 7.29.9 + '@babel/types': 7.29.8 + + '@types/babel__traverse@7.28.0': + dependencies: + '@babel/types': 7.29.8 + + '@types/cookiejar@2.1.5': {} + + '@types/d3-array@3.0.3': {} + + '@types/d3-color@3.1.0': {} + + '@types/d3-delaunay@6.0.1': {} + + '@types/d3-format@3.0.1': {} + + '@types/d3-geo@3.1.0': + dependencies: + '@types/geojson': 7946.0.16 + + '@types/d3-interpolate@3.0.1': + dependencies: + '@types/d3-color': 3.1.0 + + '@types/d3-path@3.1.1': {} + + '@types/d3-scale@4.0.2': + dependencies: + '@types/d3-time': 3.0.0 + + '@types/d3-shape@3.1.7': + dependencies: + '@types/d3-path': 3.1.1 + + '@types/d3-time-format@2.1.0': {} + + '@types/d3-time@3.0.0': {} + + '@types/estree@1.0.9': {} + + '@types/geojson@7946.0.16': {} + + '@types/istanbul-lib-coverage@2.0.6': {} + + '@types/istanbul-lib-report@3.0.3': + dependencies: + '@types/istanbul-lib-coverage': 2.0.6 + + '@types/istanbul-reports@3.0.4': + dependencies: + '@types/istanbul-lib-report': 3.0.3 + + '@types/jest@30.0.0': + dependencies: + expect: 30.5.2 + pretty-format: 30.5.1 + + '@types/json-schema@7.0.15': {} + + '@types/lodash@4.17.26': {} + + '@types/methods@1.1.4': {} + + '@types/node@24.13.6': + dependencies: + undici-types: 7.18.2 + + '@types/pg@8.23.1': + dependencies: + '@types/node': 24.13.6 + pg-protocol: 1.16.1 + pg-types: 2.2.0 + + '@types/react@19.3.0': + dependencies: + csstype: 3.2.3 + + '@types/stack-utils@2.0.3': {} + + '@types/superagent@8.1.11': + dependencies: + '@types/cookiejar': 2.1.5 + '@types/methods': 1.1.4 + '@types/node': 24.13.6 + form-data: 4.0.6 + + '@types/supertest@7.2.1': + dependencies: + '@types/methods': 1.1.4 + '@types/superagent': 8.1.11 + + '@types/yargs-parser@21.0.3': {} + + '@types/yargs@17.0.35': + dependencies: + '@types/yargs-parser': 21.0.3 + + '@ungap/structured-clone@1.4.0': {} + + '@unrs/resolver-binding-android-arm-eabi@1.12.2': + optional: true + + '@unrs/resolver-binding-android-arm64@1.12.2': + optional: true + + '@unrs/resolver-binding-darwin-arm64@1.12.2': + optional: true + + '@unrs/resolver-binding-darwin-x64@1.12.2': + optional: true + + '@unrs/resolver-binding-freebsd-x64@1.12.2': + optional: true + + '@unrs/resolver-binding-linux-arm-gnueabihf@1.12.2': + optional: true + + '@unrs/resolver-binding-linux-arm-musleabihf@1.12.2': + optional: true + + '@unrs/resolver-binding-linux-arm64-gnu@1.12.2': + optional: true + + '@unrs/resolver-binding-linux-arm64-musl@1.12.2': + optional: true + + '@unrs/resolver-binding-linux-loong64-gnu@1.12.2': + optional: true + + '@unrs/resolver-binding-linux-loong64-musl@1.12.2': + optional: true + + '@unrs/resolver-binding-linux-ppc64-gnu@1.12.2': + optional: true + + '@unrs/resolver-binding-linux-riscv64-gnu@1.12.2': + optional: true + + '@unrs/resolver-binding-linux-riscv64-musl@1.12.2': + optional: true + + '@unrs/resolver-binding-linux-s390x-gnu@1.12.2': + optional: true + + '@unrs/resolver-binding-linux-x64-gnu@1.12.2': + optional: true + + '@unrs/resolver-binding-linux-x64-musl@1.12.2': + optional: true + + '@unrs/resolver-binding-openharmony-arm64@1.12.2': + optional: true + + '@unrs/resolver-binding-wasm32-wasi@1.12.2': + dependencies: + '@emnapi/core': 1.10.0 + '@emnapi/runtime': 1.10.0 + '@napi-rs/wasm-runtime': 1.2.4(@emnapi/core@1.10.0)(@emnapi/runtime@1.10.0) + optional: true + + '@unrs/resolver-binding-win32-arm64-msvc@1.12.2': + optional: true + + '@unrs/resolver-binding-win32-ia32-msvc@1.12.2': + optional: true + + '@unrs/resolver-binding-win32-x64-msvc@1.12.2': + optional: true + + '@visx/curve@4.0.1-alpha.0': + dependencies: + '@visx/vendor': 4.0.0-alpha.0 + + '@visx/event@4.0.1-alpha.0': + dependencies: + '@types/react': 19.3.0 + '@visx/point': 4.0.1-alpha.0 + + '@visx/grid@4.0.1-alpha.0(react@19.3.0)': + dependencies: + '@types/react': 19.3.0 + '@visx/curve': 4.0.1-alpha.0 + '@visx/group': 4.0.1-alpha.0(react@19.3.0) + '@visx/point': 4.0.1-alpha.0 + '@visx/scale': 4.0.1-alpha.0 + '@visx/shape': 4.0.1-alpha.0(react@19.3.0) + classnames: 2.5.1 + react: 19.3.0 + + '@visx/group@4.0.1-alpha.0(react@19.3.0)': + dependencies: + '@types/react': 19.3.0 + classnames: 2.5.1 + react: 19.3.0 + + '@visx/point@4.0.1-alpha.0': {} + + '@visx/responsive@4.0.1-alpha.0(react@19.3.0)': + dependencies: + '@types/lodash': 4.17.26 + '@types/react': 19.3.0 + lodash: 4.18.1 + react: 19.3.0 + + '@visx/scale@4.0.1-alpha.0': + dependencies: + '@visx/vendor': 4.0.0-alpha.0 + + '@visx/shape@4.0.1-alpha.0(react@19.3.0)': + dependencies: + '@types/lodash': 4.17.26 + '@types/react': 19.3.0 + '@visx/curve': 4.0.1-alpha.0 + '@visx/group': 4.0.1-alpha.0(react@19.3.0) + '@visx/scale': 4.0.1-alpha.0 + '@visx/vendor': 4.0.0-alpha.0 + classnames: 2.5.1 + lodash: 4.18.1 + react: 19.3.0 + + '@visx/vendor@4.0.0-alpha.0': + dependencies: + '@types/d3-array': 3.0.3 + '@types/d3-color': 3.1.0 + '@types/d3-delaunay': 6.0.1 + '@types/d3-format': 3.0.1 + '@types/d3-geo': 3.1.0 + '@types/d3-interpolate': 3.0.1 + '@types/d3-path': 3.1.1 + '@types/d3-scale': 4.0.2 + '@types/d3-shape': 3.1.7 + '@types/d3-time': 3.0.0 + '@types/d3-time-format': 2.1.0 + d3-array: 3.2.1 + d3-color: 3.1.0 + d3-delaunay: 6.0.2 + d3-format: 3.1.0 + d3-geo: 3.1.0 + d3-interpolate: 3.0.1 + d3-path: 3.1.0 + d3-scale: 4.0.2 + d3-shape: 3.2.0 + d3-time: 3.1.0 + d3-time-format: 4.1.0 + internmap: 2.0.3 + + '@webassemblyjs/ast@1.14.1': + dependencies: + '@webassemblyjs/helper-numbers': 1.13.2 + '@webassemblyjs/helper-wasm-bytecode': 1.13.2 + + '@webassemblyjs/floating-point-hex-parser@1.13.2': {} + + '@webassemblyjs/helper-api-error@1.13.2': {} + + '@webassemblyjs/helper-buffer@1.14.1': {} + + '@webassemblyjs/helper-numbers@1.13.2': + dependencies: + '@webassemblyjs/floating-point-hex-parser': 1.13.2 + '@webassemblyjs/helper-api-error': 1.13.2 + '@xtuc/long': 4.2.2 + + '@webassemblyjs/helper-wasm-bytecode@1.13.2': {} + + '@webassemblyjs/helper-wasm-section@1.14.1': + dependencies: + '@webassemblyjs/ast': 1.14.1 + '@webassemblyjs/helper-buffer': 1.14.1 + '@webassemblyjs/helper-wasm-bytecode': 1.13.2 + '@webassemblyjs/wasm-gen': 1.14.1 + + '@webassemblyjs/ieee754@1.13.2': + dependencies: + '@xtuc/ieee754': 1.2.0 + + '@webassemblyjs/leb128@1.13.2': + dependencies: + '@xtuc/long': 4.2.2 + + '@webassemblyjs/utf8@1.13.2': {} + + '@webassemblyjs/wasm-edit@1.14.1': + dependencies: + '@webassemblyjs/ast': 1.14.1 + '@webassemblyjs/helper-buffer': 1.14.1 + '@webassemblyjs/helper-wasm-bytecode': 1.13.2 + '@webassemblyjs/helper-wasm-section': 1.14.1 + '@webassemblyjs/wasm-gen': 1.14.1 + '@webassemblyjs/wasm-opt': 1.14.1 + '@webassemblyjs/wasm-parser': 1.14.1 + '@webassemblyjs/wast-printer': 1.14.1 + + '@webassemblyjs/wasm-gen@1.14.1': + dependencies: + '@webassemblyjs/ast': 1.14.1 + '@webassemblyjs/helper-wasm-bytecode': 1.13.2 + '@webassemblyjs/ieee754': 1.13.2 + '@webassemblyjs/leb128': 1.13.2 + '@webassemblyjs/utf8': 1.13.2 + + '@webassemblyjs/wasm-opt@1.14.1': + dependencies: + '@webassemblyjs/ast': 1.14.1 + '@webassemblyjs/helper-buffer': 1.14.1 + '@webassemblyjs/wasm-gen': 1.14.1 + '@webassemblyjs/wasm-parser': 1.14.1 + + '@webassemblyjs/wasm-parser@1.14.1': + dependencies: + '@webassemblyjs/ast': 1.14.1 + '@webassemblyjs/helper-api-error': 1.13.2 + '@webassemblyjs/helper-wasm-bytecode': 1.13.2 + '@webassemblyjs/ieee754': 1.13.2 + '@webassemblyjs/leb128': 1.13.2 + '@webassemblyjs/utf8': 1.13.2 + + '@webassemblyjs/wast-printer@1.14.1': + dependencies: + '@webassemblyjs/ast': 1.14.1 + '@xtuc/long': 4.2.2 + + '@xtuc/ieee754@1.2.0': {} + + '@xtuc/long@4.2.2': {} + + abstract-logging@2.0.1: {} + + accepts@2.0.0: + dependencies: + mime-types: 3.0.2 + negotiator: 1.1.0 + optional: true + + acorn-walk@8.3.5: + dependencies: + acorn: 8.18.0 + + acorn@8.18.0: {} + + ajv-formats@3.0.1(ajv@8.20.0): + optionalDependencies: + ajv: 8.20.0 + + ajv-keywords@5.1.0(ajv@8.20.0): + dependencies: + ajv: 8.20.0 + fast-deep-equal: 3.1.3 + + ajv@8.20.0: + dependencies: + fast-deep-equal: 3.1.3 + fast-uri: 3.1.8 + json-schema-traverse: 1.0.0 + require-from-string: 2.0.2 + + ansi-escapes@4.3.2: + dependencies: + type-fest: 0.21.3 + + ansi-regex@5.0.1: {} + + ansi-regex@6.3.0: {} + + ansi-styles@4.3.0: + dependencies: + color-convert: 2.0.1 + + ansi-styles@5.2.0: {} + + ansi-styles@6.2.3: {} + + ansis@4.4.0: {} + + anymatch@3.1.3: + dependencies: + normalize-path: 3.0.0 + picomatch: 2.3.2 + + append-field@1.0.0: + optional: true + + arg@4.1.3: {} + + argparse@1.0.10: + dependencies: + sprintf-js: 1.0.3 + + argparse@2.0.1: {} + + array-timsort@1.0.3: {} + + asap@2.0.6: {} + + asynckit@0.4.0: {} + + atomic-sleep@1.0.0: {} + + avvio@9.3.0: + dependencies: + '@fastify/error': 4.2.0 + fastq: 1.20.3 + + aws-ssl-profiles@1.1.2: {} + + babel-jest@30.5.2(@babel/core@7.29.7): + dependencies: + '@babel/core': 7.29.7 + '@jest/transform': 30.5.2 + '@types/babel__core': 7.20.5 + babel-plugin-istanbul: 8.0.0 + babel-preset-jest: 30.5.0(@babel/core@7.29.7) + chalk: 4.1.2 + graceful-fs: 4.2.11 + slash: 3.0.0 + transitivePeerDependencies: + - supports-color + + babel-plugin-istanbul@8.0.0: + dependencies: + '@babel/helper-plugin-utils': 7.29.7 + '@istanbuljs/load-nyc-config': 1.1.0 + '@istanbuljs/schema': 0.1.6 + istanbul-lib-instrument: 6.0.3 + test-exclude: 7.0.2 + transitivePeerDependencies: + - supports-color + + babel-plugin-jest-hoist@30.5.0: + dependencies: + '@types/babel__core': 7.20.5 + + babel-preset-current-node-syntax@1.2.0(@babel/core@7.29.7): + dependencies: + '@babel/core': 7.29.7 + '@babel/plugin-syntax-async-generators': 7.8.4(@babel/core@7.29.7) + '@babel/plugin-syntax-bigint': 7.8.3(@babel/core@7.29.7) + '@babel/plugin-syntax-class-properties': 7.12.13(@babel/core@7.29.7) + '@babel/plugin-syntax-class-static-block': 7.14.5(@babel/core@7.29.7) + '@babel/plugin-syntax-import-attributes': 7.29.7(@babel/core@7.29.7) + '@babel/plugin-syntax-import-meta': 7.10.4(@babel/core@7.29.7) + '@babel/plugin-syntax-json-strings': 7.8.3(@babel/core@7.29.7) + '@babel/plugin-syntax-logical-assignment-operators': 7.10.4(@babel/core@7.29.7) + '@babel/plugin-syntax-nullish-coalescing-operator': 7.8.3(@babel/core@7.29.7) + '@babel/plugin-syntax-numeric-separator': 7.10.4(@babel/core@7.29.7) + '@babel/plugin-syntax-object-rest-spread': 7.8.3(@babel/core@7.29.7) + '@babel/plugin-syntax-optional-catch-binding': 7.8.3(@babel/core@7.29.7) + '@babel/plugin-syntax-optional-chaining': 7.8.3(@babel/core@7.29.7) + '@babel/plugin-syntax-private-property-in-object': 7.14.5(@babel/core@7.29.7) + '@babel/plugin-syntax-top-level-await': 7.14.5(@babel/core@7.29.7) + + babel-preset-jest@30.5.0(@babel/core@7.29.7): + dependencies: + '@babel/core': 7.29.7 + babel-plugin-jest-hoist: 30.5.0 + babel-preset-current-node-syntax: 1.2.0(@babel/core@7.29.7) + + balanced-match@1.0.2: {} + + balanced-match@4.0.4: {} + + base64-js@1.5.1: {} + + baseline-browser-mapping@2.11.25: {} + + better-result@2.10.0: {} + + bl@4.1.0: + dependencies: + buffer: 5.7.1 + inherits: 2.0.4 + readable-stream: 3.6.2 + + body-parser@2.3.0: + dependencies: + bytes: 3.1.2 + content-type: 2.1.0 + debug: 4.4.3 + http-errors: 2.0.1 + iconv-lite: 0.7.3 + on-finished: 2.4.1 + qs: 6.16.0 + raw-body: 3.0.2 + type-is: 2.1.0 + transitivePeerDependencies: + - supports-color + optional: true + + bowser@2.15.0: {} + + brace-expansion@2.1.7: + dependencies: + balanced-match: 1.0.2 + + brace-expansion@5.0.12: + dependencies: + balanced-match: 4.0.4 + + browserslist@4.29.0: + dependencies: + baseline-browser-mapping: 2.11.25 + caniuse-lite: 1.0.30001810 + electron-to-chromium: 1.5.433 + node-releases: 2.0.56 + update-browserslist-db: 1.3.3(browserslist@4.29.0) + + bs-logger@0.2.6: + dependencies: + fast-json-stable-stringify: 2.1.0 + + bser@2.1.1: + dependencies: + node-int64: 0.4.0 + + buffer-from@1.1.2: {} + + buffer@5.7.1: + dependencies: + base64-js: 1.5.1 + ieee754: 1.2.1 + + busboy@1.6.0: + dependencies: + streamsearch: 1.1.0 + optional: true + + bytes@3.1.2: + optional: true + + c12@3.3.4: + dependencies: + chokidar: 5.0.0 + confbox: 0.2.4 + defu: 6.1.7 + dotenv: 17.4.2 + exsolve: 1.1.3 + giget: 3.3.1 + jiti: 2.7.0 + ohash: 2.0.12 + pathe: 2.0.3 + perfect-debounce: 2.1.0 + pkg-types: 2.3.3 + rc9: 3.1.0 + + call-bind-apply-helpers@1.0.2: + dependencies: + es-errors: 1.3.0 + function-bind: 1.1.2 + + call-bound@1.0.4: + dependencies: + call-bind-apply-helpers: 1.0.2 + get-intrinsic: 1.3.0 + + callsites@3.1.0: {} + + camelcase@5.3.1: {} + + camelcase@6.3.0: {} + + caniuse-lite@1.0.30001810: {} + + chalk@4.1.2: + dependencies: + ansi-styles: 4.3.0 + supports-color: 7.2.0 + + chalk@5.6.2: {} + + char-regex@1.0.2: {} + + chardet@0.7.0: {} + + chardet@2.2.0: {} + + chokidar@5.0.0: + dependencies: + readdirp: 5.1.1 + + chrome-trace-event@1.0.4: {} + + ci-info@4.4.0: {} + + cjs-module-lexer@2.2.1: {} + + classnames@2.5.1: {} + + cli-cursor@3.1.0: + dependencies: + restore-cursor: 3.1.0 + + cli-cursor@5.0.0: + dependencies: + restore-cursor: 5.1.0 + + cli-progress@3.12.0: + dependencies: + string-width: 4.2.3 + + cli-spinners@2.9.2: {} + + cli-spinners@3.4.0: {} + + cli-table3@0.6.5: + dependencies: + string-width: 4.2.3 + optionalDependencies: + '@colors/colors': 1.5.0 + + cli-width@3.0.0: {} + + cli-width@4.1.0: {} + + cliui@8.0.1: + dependencies: + string-width: 4.2.3 + strip-ansi: 6.0.1 + wrap-ansi: 7.0.0 + + clone@1.0.4: {} + + cluster-key-slot@1.1.1: {} + + co@4.6.0: {} + + collect-v8-coverage@1.0.3: {} + + color-convert@2.0.1: + dependencies: + color-name: 1.1.4 + + color-name@1.1.4: {} + + colorette@2.0.20: {} + + combined-stream@1.0.8: + dependencies: + delayed-stream: 1.0.0 + + commander@15.0.0: {} + + commander@2.20.3: {} + + commander@4.1.1: {} + + comment-json@5.0.0: + dependencies: + array-timsort: 1.0.3 + esprima: 4.0.1 + + component-emitter@1.3.1: {} + + confbox@0.2.4: {} + + confbox@0.3.1: {} + + content-disposition@1.1.0: + optional: true + + content-disposition@3.0.0: {} + + content-type@1.0.5: + optional: true + + content-type@2.1.0: + optional: true + + convert-source-map@2.0.0: {} + + cookie-signature@1.2.2: {} + + cookie@0.7.2: + optional: true + + cookie@1.1.1: {} + + cookiejar@2.1.4: {} + + cors@2.8.6: + dependencies: + object-assign: 4.1.1 + vary: 1.1.2 + optional: true + + create-require@1.1.1: {} + + cross-spawn@7.0.6: + dependencies: + path-key: 3.1.1 + shebang-command: 2.0.0 + which: 2.0.2 + + csstype@3.2.3: {} + + d3-array@3.2.1: + dependencies: + internmap: 2.0.3 + + d3-array@3.2.4: + dependencies: + internmap: 2.0.3 + + d3-color@3.1.0: {} + + d3-delaunay@6.0.2: + dependencies: + delaunator: 5.1.0 + + d3-format@3.1.0: {} + + d3-geo@3.1.0: + dependencies: + d3-array: 3.2.4 + + d3-interpolate@3.0.1: + dependencies: + d3-color: 3.1.0 + + d3-path@3.1.0: {} + + d3-scale@4.0.2: + dependencies: + d3-array: 3.2.4 + d3-format: 3.1.0 + d3-interpolate: 3.0.1 + d3-time: 3.1.0 + d3-time-format: 4.1.0 + + d3-shape@3.2.0: + dependencies: + d3-path: 3.1.0 + + d3-time-format@4.1.0: + dependencies: + d3-time: 3.1.0 + + d3-time@3.1.0: + dependencies: + d3-array: 3.2.4 + + dateformat@4.6.3: {} + + debug@4.4.3: + dependencies: + ms: 2.1.3 + + dedent@1.7.2: {} + + deepmerge-ts@7.1.5: {} + + deepmerge@4.3.1: {} + + defaults@1.0.4: + dependencies: + clone: 1.0.4 + + defu@6.1.7: {} + + delaunator@5.1.0: + dependencies: + robust-predicates: 3.0.3 + + delayed-stream@1.0.0: {} + + denque@2.1.0: {} + + depd@2.0.0: {} + + dequal@2.0.3: {} + + destr@2.0.5: {} + + detect-libc@2.1.2: {} + + detect-newline@3.1.0: {} + + dezalgo@1.0.4: + dependencies: + asap: 2.0.6 + wrappy: 1.0.2 + + diff@4.0.4: {} + + dotenv@17.4.2: {} + + dotenv@18.0.7: {} + + dunder-proto@1.0.1: + dependencies: + call-bind-apply-helpers: 1.0.2 + es-errors: 1.3.0 + gopd: 1.2.0 + + eastasianwidth@0.2.0: {} + + ee-first@1.1.1: + optional: true + + effect@3.20.0: + dependencies: + '@standard-schema/spec': 1.1.0 + fast-check: 3.23.2 + + electron-to-chromium@1.5.433: {} + + elkjs@0.11.1: {} + + emittery@0.13.1: {} + + emoji-regex@8.0.0: {} + + emoji-regex@9.2.2: {} + + emojilib@2.4.0: {} + + empathic@2.0.0: {} + + encodeurl@2.0.0: + optional: true + + end-of-stream@1.4.5: + dependencies: + once: 1.4.0 + + enhanced-resolve@5.25.1: + dependencies: + graceful-fs: 4.2.11 + tapable: 2.3.3 + + env-paths@3.0.0: {} + + error-ex@1.3.4: + dependencies: + is-arrayish: 0.2.1 + + es-define-property@1.0.1: {} + + es-errors@1.3.0: {} + + es-module-lexer@2.3.2: {} + + es-object-atoms@1.1.2: + dependencies: + es-errors: 1.3.0 + + es-set-tostringtag@2.1.0: + dependencies: + es-errors: 1.3.0 + get-intrinsic: 1.3.0 + has-tostringtag: 1.0.2 + hasown: 2.0.4 + + es-toolkit@1.51.0: {} + + escalade@3.2.0: {} + + escape-html@1.0.3: {} + + escape-string-regexp@1.0.5: {} + + escape-string-regexp@2.0.0: {} + + esprima@4.0.1: {} + + etag@1.8.1: + optional: true + + events@3.3.0: {} + + execa@5.1.1: + dependencies: + cross-spawn: 7.0.6 + get-stream: 6.0.1 + human-signals: 2.1.0 + is-stream: 2.0.1 + merge-stream: 2.0.0 + npm-run-path: 4.0.1 + onetime: 5.1.2 + signal-exit: 3.0.7 + strip-final-newline: 2.0.0 + + exit-x@0.2.2: {} + + expect@30.5.2: + dependencies: + '@jest/expect-utils': 30.5.2 + '@jest/get-type': 30.5.0 + jest-matcher-utils: 30.5.2 + jest-message-util: 30.5.1 + jest-mock: 30.5.2 + jest-util: 30.5.1 + + express@5.2.1: + dependencies: + accepts: 2.0.0 + body-parser: 2.3.0 + content-disposition: 1.1.0 + content-type: 1.0.5 + cookie: 0.7.2 + cookie-signature: 1.2.2 + debug: 4.4.3 + depd: 2.0.0 + encodeurl: 2.0.0 + escape-html: 1.0.3 + etag: 1.8.1 + finalhandler: 2.1.1 + fresh: 2.0.0 + http-errors: 2.0.1 + merge-descriptors: 2.0.0 + mime-types: 3.0.2 + on-finished: 2.4.1 + once: 1.4.0 + parseurl: 1.3.3 + proxy-addr: 2.0.8 + qs: 6.16.0 + range-parser: 1.3.0 + router: 2.2.0 + send: 1.2.1 + serve-static: 2.2.1 + statuses: 2.0.2 + type-is: 2.1.0 + vary: 1.1.2 + transitivePeerDependencies: + - supports-color + optional: true + + exsolve@1.1.3: {} + + external-editor@3.1.0: + dependencies: + chardet: 0.7.0 + iconv-lite: 0.4.24 + tmp: 0.0.33 + + fast-check@3.23.2: + dependencies: + pure-rand: 6.1.0 + + fast-copy@4.1.1: {} + + fast-decode-uri-component@1.0.1: {} + + fast-deep-equal@3.1.3: {} + + fast-json-stable-stringify@2.1.0: {} + + fast-json-stringify@7.0.1: + dependencies: + '@fastify/merge-json-schemas': 0.2.1 + ajv: 8.20.0 + ajv-formats: 3.0.1(ajv@8.20.0) + fast-uri: 4.2.1 + json-schema-ref-resolver: 3.0.0 + rfdc: 1.4.1 + + fast-querystring@1.1.2: + dependencies: + fast-decode-uri-component: 1.0.1 + + fast-safe-stringify@2.1.1: {} + + fast-string-truncated-width@3.0.3: {} + + fast-string-width@3.0.2: + dependencies: + fast-string-truncated-width: 3.0.3 + + fast-uri@3.1.8: {} + + fast-uri@4.2.1: {} + + fast-wrap-ansi@0.2.2: + dependencies: + fast-string-width: 3.0.2 + + fastify-plugin@6.0.0: {} + + fastify@5.12.1: + dependencies: + '@fastify/ajv-compiler': 4.0.6 + '@fastify/error': 4.2.0 + '@fastify/fast-json-stringify-compiler': 5.1.0 + '@fastify/proxy-addr': 5.1.1 + abstract-logging: 2.0.1 + avvio: 9.3.0 + fast-json-stringify: 7.0.1 + find-my-way: 9.9.0 + light-my-request: 6.6.0 + pino: 10.3.1 + process-warning: 5.1.0 + rfdc: 1.4.1 + secure-json-parse: 4.1.0 + semver: 7.8.5 + toad-cache: 3.7.4 + + fastq@1.20.3: + dependencies: + reusify: 1.1.0 + + fb-watchman@2.0.2: + dependencies: + bser: 2.1.1 + + fdir@6.5.0(picomatch@4.0.7): + optionalDependencies: + picomatch: 4.0.7 + + figures@3.2.0: + dependencies: + escape-string-regexp: 1.0.5 + + file-type@22.1.1: + dependencies: + '@tokenizer/inflate': 0.4.1 + strtok3: 10.3.5 + token-types: 6.1.2 + uint8array-extras: 1.5.0 + transitivePeerDependencies: + - supports-color + + finalhandler@2.1.1: + dependencies: + debug: 4.4.3 + encodeurl: 2.0.0 + escape-html: 1.0.3 + on-finished: 2.4.1 + parseurl: 1.3.3 + statuses: 2.0.2 + transitivePeerDependencies: + - supports-color + optional: true + + find-my-way@9.7.0: + dependencies: + fast-deep-equal: 3.1.3 + fast-querystring: 1.1.2 + safe-regex2: 5.1.1 + + find-my-way@9.9.0: + dependencies: + fast-deep-equal: 3.1.3 + fast-querystring: 1.1.2 + safe-regex2: 5.1.1 + + find-up@4.1.0: + dependencies: + locate-path: 5.0.0 + path-exists: 4.0.0 + + foreground-child@3.3.1: + dependencies: + cross-spawn: 7.0.6 + signal-exit: 4.1.0 + + form-data@4.0.6: + dependencies: + asynckit: 0.4.0 + combined-stream: 1.0.8 + es-set-tostringtag: 2.1.0 + hasown: 2.0.4 + mime-types: 2.1.35 + + formidable@3.5.4: + dependencies: + '@paralleldrive/cuid2': 2.3.1 + dezalgo: 1.0.4 + once: 1.4.0 + + forwarded@0.2.0: + optional: true + + fresh@2.0.0: + optional: true + + function-bind@1.1.2: {} + + generate-function@2.3.1: + dependencies: + is-property: 1.0.2 + + gensync@1.0.0-beta.2: {} + + get-caller-file@2.0.5: {} + + get-east-asian-width@1.7.0: {} + + get-intrinsic@1.3.0: + dependencies: + call-bind-apply-helpers: 1.0.2 + es-define-property: 1.0.1 + es-errors: 1.3.0 + es-object-atoms: 1.1.2 + function-bind: 1.1.2 + get-proto: 1.0.1 + gopd: 1.2.0 + has-symbols: 1.1.0 + hasown: 2.0.4 + math-intrinsics: 1.1.0 + + get-package-type@0.1.0: {} + + get-port-please@3.2.0: {} + + get-proto@1.0.1: + dependencies: + dunder-proto: 1.0.1 + es-object-atoms: 1.1.2 + + get-stream@6.0.1: {} + + giget@3.3.1: {} + + glob@10.5.0: + dependencies: + foreground-child: 3.3.1 + jackspeak: 3.4.3 + minimatch: 9.0.9 + minipass: 7.1.3 + package-json-from-dist: 1.0.1 + path-scurry: 1.11.1 + + glob@13.0.6: + dependencies: + minimatch: 10.2.6 + minipass: 7.1.3 + path-scurry: 2.0.2 + + gopd@1.2.0: {} + + graceful-fs@4.2.11: {} + + grammex@3.1.13: {} + + graphmatch@1.1.1: {} + + handlebars@4.7.9: + dependencies: + minimist: 1.2.8 + neo-async: 2.6.2 + source-map: 0.6.1 + wordwrap: 1.0.0 + optionalDependencies: + uglify-js: 3.19.3 + + has-flag@4.0.0: {} + + has-symbols@1.1.0: {} + + has-tostringtag@1.0.2: + dependencies: + has-symbols: 1.1.0 + + hasown@2.0.4: + dependencies: + function-bind: 1.1.2 + + help-me@5.0.0: {} + + html-escaper@2.0.2: {} + + http-errors@2.0.1: + dependencies: + depd: 2.0.0 + inherits: 2.0.4 + setprototypeof: 1.2.0 + statuses: 2.0.2 + toidentifier: 1.0.1 + + human-signals@2.1.0: {} + + iconv-lite@0.4.24: + dependencies: + safer-buffer: 2.1.2 + + iconv-lite@0.7.3: + dependencies: + safer-buffer: 2.1.2 + + ieee754@1.2.1: {} + + import-local@3.2.0: + dependencies: + pkg-dir: 4.2.0 + resolve-cwd: 3.0.0 + + imurmurhash@0.1.4: {} + + inherits@2.0.4: {} + + inquirer@8.2.6: + dependencies: + ansi-escapes: 4.3.2 + chalk: 4.1.2 + cli-cursor: 3.1.0 + cli-width: 3.0.0 + external-editor: 3.1.0 + figures: 3.2.0 + lodash: 4.18.1 + mute-stream: 0.0.8 + ora: 5.4.1 + run-async: 2.4.1 + rxjs: 7.8.2 + string-width: 4.2.3 + strip-ansi: 6.0.1 + through: 2.3.8 + wrap-ansi: 6.2.0 + + internmap@2.0.3: {} + + ioredis@6.0.0: + dependencies: + '@ioredis/commands': 2.0.0 + cluster-key-slot: 1.1.1 + debug: 4.4.3 + denque: 2.1.0 + redis-errors: 1.2.0 + standard-as-callback: 2.1.0 + transitivePeerDependencies: + - supports-color + + ipaddr.js@1.9.1: + optional: true + + ipaddr.js@2.5.0: {} + + is-arrayish@0.2.1: {} + + is-extglob@2.1.1: {} + + is-fullwidth-code-point@3.0.0: {} + + is-generator-fn@2.1.0: {} + + is-glob@4.0.3: + dependencies: + is-extglob: 2.1.1 + + is-interactive@1.0.0: {} + + is-interactive@2.0.0: {} + + is-promise@4.0.0: + optional: true + + is-property@1.0.2: {} + + is-stream@2.0.1: {} + + is-unicode-supported@0.1.0: {} + + is-unicode-supported@2.1.0: {} + + isexe@2.0.0: {} + + istanbul-lib-coverage@3.2.2: {} + + istanbul-lib-instrument@6.0.3: + dependencies: + '@babel/core': 7.29.7 + '@babel/parser': 7.29.9 + '@istanbuljs/schema': 0.1.6 + istanbul-lib-coverage: 3.2.2 + semver: 7.8.5 + transitivePeerDependencies: + - supports-color + + istanbul-lib-report@3.0.1: + dependencies: + istanbul-lib-coverage: 3.2.2 + make-dir: 4.0.0 + supports-color: 7.2.0 + + istanbul-lib-source-maps@5.0.6: + dependencies: + '@jridgewell/trace-mapping': 0.3.31 + debug: 4.4.3 + istanbul-lib-coverage: 3.2.2 + transitivePeerDependencies: + - supports-color + + istanbul-reports@3.2.0: + dependencies: + html-escaper: 2.0.2 + istanbul-lib-report: 3.0.1 + + iterare@1.2.1: {} + + jackspeak@3.4.3: + dependencies: + '@isaacs/cliui': 8.0.2 + optionalDependencies: + '@pkgjs/parseargs': 0.11.0 + + jest-changed-files@30.5.1: + dependencies: + execa: 5.1.1 + jest-util: 30.5.1 + p-limit: 3.1.0 + + jest-circus@30.5.2: + dependencies: + '@jest/environment': 30.5.2 + '@jest/expect': 30.5.2 + '@jest/test-result': 30.5.2 + '@jest/types': 30.5.1 + '@types/node': 24.13.6 + chalk: 4.1.2 + co: 4.6.0 + dedent: 1.7.2 + is-generator-fn: 2.1.0 + jest-each: 30.5.2 + jest-matcher-utils: 30.5.2 + jest-message-util: 30.5.1 + jest-runtime: 30.5.2 + jest-snapshot: 30.5.2 + jest-util: 30.5.1 + p-limit: 3.1.0 + pretty-format: 30.5.1 + pure-rand: 7.0.1 + slash: 3.0.0 + stack-utils: 2.0.6 + transitivePeerDependencies: + - babel-plugin-macros + - supports-color + + jest-cli@30.5.2(@types/node@24.13.6)(ts-node@10.9.2(@types/node@24.13.6)(typescript@6.0.3)): + dependencies: + '@jest/core': 30.5.2(ts-node@10.9.2(@types/node@24.13.6)(typescript@6.0.3)) + '@jest/test-result': 30.5.2 + '@jest/types': 30.5.1 + chalk: 4.1.2 + exit-x: 0.2.2 + import-local: 3.2.0 + jest-config: 30.5.2(@types/node@24.13.6)(ts-node@10.9.2(@types/node@24.13.6)(typescript@6.0.3)) + jest-util: 30.5.1 + jest-validate: 30.5.1 + yargs: 17.7.3 + transitivePeerDependencies: + - '@types/node' + - babel-plugin-macros + - esbuild-register + - supports-color + - ts-node + + jest-config@30.5.2(@types/node@24.13.6)(ts-node@10.9.2(@types/node@24.13.6)(typescript@6.0.3)): + dependencies: + '@babel/core': 7.29.7 + '@jest/get-type': 30.5.0 + '@jest/pattern': 30.5.0 + '@jest/test-sequencer': 30.5.2 + '@jest/types': 30.5.1 + babel-jest: 30.5.2(@babel/core@7.29.7) + chalk: 4.1.2 + ci-info: 4.4.0 + deepmerge: 4.3.1 + glob: 13.0.6 + graceful-fs: 4.2.11 + jest-circus: 30.5.2 + jest-docblock: 30.5.0 + jest-environment-node: 30.5.2 + jest-regex-util: 30.5.0 + jest-resolve: 30.5.1 + jest-runner: 30.5.2 + jest-util: 30.5.1 + jest-validate: 30.5.1 + parse-json: 5.2.0 + pretty-format: 30.5.1 + slash: 3.0.0 + strip-json-comments: 3.1.1 + optionalDependencies: + '@types/node': 24.13.6 + ts-node: 10.9.2(@types/node@24.13.6)(typescript@6.0.3) + transitivePeerDependencies: + - babel-plugin-macros + - supports-color + + jest-diff@30.5.2: + dependencies: + '@jest/diff-sequences': 30.5.0 + '@jest/get-type': 30.5.0 + chalk: 4.1.2 + pretty-format: 30.5.1 + + jest-docblock@30.5.0: + dependencies: + detect-newline: 3.1.0 + + jest-each@30.5.2: + dependencies: + '@jest/get-type': 30.5.0 + '@jest/types': 30.5.1 + chalk: 4.1.2 + jest-regex-util: 30.5.0 + jest-util: 30.5.1 + pretty-format: 30.5.1 + + jest-environment-node@30.5.2: + dependencies: + '@jest/environment': 30.5.2 + '@jest/fake-timers': 30.5.2 + '@jest/types': 30.5.1 + '@types/node': 24.13.6 + jest-mock: 30.5.2 + jest-util: 30.5.1 + jest-validate: 30.5.1 + + jest-haste-map@30.5.1: + dependencies: + '@jest/types': 30.5.1 + '@parcel/watcher': 2.6.0 + '@types/node': 24.13.6 + anymatch: 3.1.3 + fb-watchman: 2.0.2 + fdir: 6.5.0(picomatch@4.0.7) + graceful-fs: 4.2.11 + jest-regex-util: 30.5.0 + jest-util: 30.5.1 + jest-worker: 30.5.1 + picomatch: 4.0.7 + + jest-leak-detector@30.5.1: + dependencies: + '@jest/get-type': 30.5.0 + pretty-format: 30.5.1 + + jest-matcher-utils@30.5.2: + dependencies: + '@jest/get-type': 30.5.0 + chalk: 4.1.2 + jest-diff: 30.5.2 + pretty-format: 30.5.1 + + jest-message-util@30.5.1: + dependencies: + '@babel/code-frame': 7.29.7 + '@jest/types': 30.5.1 + '@types/stack-utils': 2.0.3 + chalk: 4.1.2 + graceful-fs: 4.2.11 + jest-util: 30.5.1 + picomatch: 4.0.7 + pretty-format: 30.5.1 + slash: 3.0.0 + stack-utils: 2.0.6 + + jest-mock@30.5.2: + dependencies: + '@jest/expect-utils': 30.5.2 + '@jest/types': 30.5.1 + '@types/node': 24.13.6 + jest-util: 30.5.1 + + jest-regex-util@30.5.0: {} + + jest-resolve-dependencies@30.5.2: + dependencies: + jest-regex-util: 30.5.0 + jest-snapshot: 30.5.2 + transitivePeerDependencies: + - supports-color + + jest-resolve@30.5.1: + dependencies: + chalk: 4.1.2 + graceful-fs: 4.2.11 + jest-haste-map: 30.5.1 + jest-util: 30.5.1 + jest-validate: 30.5.1 + slash: 3.0.0 + unrs-resolver: 1.12.2 + + jest-runner@30.5.2: + dependencies: + '@jest/console': 30.5.2 + '@jest/environment': 30.5.2 + '@jest/source-map': 30.5.2 + '@jest/test-result': 30.5.2 + '@jest/transform': 30.5.2 + '@jest/types': 30.5.1 + '@types/node': 24.13.6 + chalk: 4.1.2 + emittery: 0.13.1 + exit-x: 0.2.2 + graceful-fs: 4.2.11 + jest-docblock: 30.5.0 + jest-environment-node: 30.5.2 + jest-haste-map: 30.5.1 + jest-leak-detector: 30.5.1 + jest-message-util: 30.5.1 + jest-resolve: 30.5.1 + jest-runtime: 30.5.2 + jest-util: 30.5.1 + jest-watcher: 30.5.2 + jest-worker: 30.5.1 + p-limit: 3.1.0 + transitivePeerDependencies: + - supports-color + + jest-runtime@30.5.2: + dependencies: + '@jest/environment': 30.5.2 + '@jest/fake-timers': 30.5.2 + '@jest/globals': 30.5.2 + '@jest/source-map': 30.5.2 + '@jest/test-result': 30.5.2 + '@jest/transform': 30.5.2 + '@jest/types': 30.5.1 + '@types/node': 24.13.6 + chalk: 4.1.2 + cjs-module-lexer: 2.2.1 + collect-v8-coverage: 1.0.3 + es-module-lexer: 2.3.2 + glob: 13.0.6 + graceful-fs: 4.2.11 + jest-haste-map: 30.5.1 + jest-message-util: 30.5.1 + jest-mock: 30.5.2 + jest-regex-util: 30.5.0 + jest-resolve: 30.5.1 + jest-snapshot: 30.5.2 + jest-util: 30.5.1 + slash: 3.0.0 + strip-bom: 4.0.0 + transitivePeerDependencies: + - supports-color + + jest-snapshot@30.5.2: + dependencies: + '@babel/core': 7.29.7 + '@babel/generator': 7.29.8 + '@babel/plugin-syntax-jsx': 7.29.7(@babel/core@7.29.7) + '@babel/plugin-syntax-typescript': 7.29.7(@babel/core@7.29.7) + '@babel/types': 7.29.8 + '@jest/expect-utils': 30.5.2 + '@jest/get-type': 30.5.0 + '@jest/snapshot-utils': 30.5.1 + '@jest/transform': 30.5.2 + '@jest/types': 30.5.1 + babel-preset-current-node-syntax: 1.2.0(@babel/core@7.29.7) + chalk: 4.1.2 + expect: 30.5.2 + graceful-fs: 4.2.11 + jest-diff: 30.5.2 + jest-matcher-utils: 30.5.2 + jest-message-util: 30.5.1 + jest-util: 30.5.1 + pretty-format: 30.5.1 + semver: 7.8.5 + synckit: 0.11.13 + transitivePeerDependencies: + - supports-color + + jest-util@30.5.1: + dependencies: + '@jest/types': 30.5.1 + '@types/node': 24.13.6 + chalk: 4.1.2 + ci-info: 4.4.0 + graceful-fs: 4.2.11 + picomatch: 4.0.7 + + jest-validate@30.5.1: + dependencies: + '@jest/get-type': 30.5.0 + '@jest/types': 30.5.1 + camelcase: 6.3.0 + chalk: 4.1.2 + leven: 3.1.0 + pretty-format: 30.5.1 + + jest-watcher@30.5.2: + dependencies: + '@jest/test-result': 30.5.2 + '@jest/types': 30.5.1 + '@types/node': 24.13.6 + ansi-escapes: 4.3.2 + chalk: 4.1.2 + emittery: 0.13.1 + jest-util: 30.5.1 + string-length: 4.0.2 + + jest-worker@27.5.1: + dependencies: + '@types/node': 24.13.6 + merge-stream: 2.0.0 + supports-color: 8.1.1 + + jest-worker@30.5.1: + dependencies: + '@types/node': 24.13.6 + '@ungap/structured-clone': 1.4.0 + jest-util: 30.5.1 + merge-stream: 2.0.0 + supports-color: 8.1.1 + + jest@30.5.2(@types/node@24.13.6)(ts-node@10.9.2(@types/node@24.13.6)(typescript@6.0.3)): + dependencies: + '@jest/core': 30.5.2(ts-node@10.9.2(@types/node@24.13.6)(typescript@6.0.3)) + '@jest/types': 30.5.1 + import-local: 3.2.0 + jest-cli: 30.5.2(@types/node@24.13.6)(ts-node@10.9.2(@types/node@24.13.6)(typescript@6.0.3)) + transitivePeerDependencies: + - '@types/node' + - babel-plugin-macros + - esbuild-register + - supports-color + - ts-node + + jiti@2.7.0: {} + + joycon@3.1.1: {} + + js-tokens@4.0.0: {} + + js-yaml@3.15.2: + dependencies: + argparse: 1.0.10 + esprima: 4.0.1 + + js-yaml@5.4.1: + dependencies: + argparse: 2.0.1 + + jsesc@3.1.0: {} + + json-parse-even-better-errors@2.3.1: {} + + json-schema-ref-resolver@3.0.0: + dependencies: + dequal: 2.0.3 + + json-schema-traverse@1.0.0: {} + + json5@2.2.3: {} + + jsonc-parser@3.3.1: {} + + kafkajs@2.2.4: {} + + leven@3.1.0: {} + + light-my-request@6.6.0: + dependencies: + cookie: 1.1.1 + process-warning: 4.0.1 + set-cookie-parser: 2.7.2 + + lines-and-columns@1.2.4: {} + + load-esm@1.0.3: {} + + locate-path@5.0.0: + dependencies: + p-locate: 4.1.0 + + lodash.memoize@4.1.2: {} + + lodash@4.18.1: {} + + log-symbols@4.1.0: + dependencies: + chalk: 4.1.2 + is-unicode-supported: 0.1.0 + + log-symbols@7.0.1: + dependencies: + is-unicode-supported: 2.1.0 + yoctocolors: 2.2.0 + + long@5.3.2: {} + + lru-cache@10.4.3: {} + + lru-cache@11.5.3: {} + + lru-cache@5.1.1: + dependencies: + yallist: 3.1.1 + + lru.min@1.1.5: {} + + magic-string@1.0.0: + dependencies: + '@jridgewell/sourcemap-codec': 1.6.0 + + make-dir@4.0.0: + dependencies: + semver: 7.8.5 + + make-error@1.3.6: {} + + math-intrinsics@1.1.0: {} + + media-typer@0.3.0: + optional: true + + media-typer@1.1.1: + optional: true + + merge-descriptors@2.0.0: + optional: true + + merge-stream@2.0.0: {} + + methods@1.1.2: {} + + mime-db@1.52.0: {} + + mime-db@1.54.0: {} + + mime-types@2.1.35: + dependencies: + mime-db: 1.52.0 + + mime-types@3.0.2: + dependencies: + mime-db: 1.54.0 + optional: true + + mime@2.6.0: {} + + mime@3.0.0: {} + + mimic-fn@2.1.0: {} + + mimic-function@5.0.1: {} + + minimatch@10.2.6: + dependencies: + brace-expansion: 5.0.12 + + minimatch@9.0.9: + dependencies: + brace-expansion: 2.1.7 + + minimist@1.2.8: {} + + minimizer-webpack-plugin@5.11.0(sharp@0.35.5(@types/node@24.13.6))(webpack@5.111.1(sharp@0.35.5(@types/node@24.13.6))): + dependencies: + '@jridgewell/trace-mapping': 0.3.31 + jest-worker: 27.5.1 + schema-utils: 4.5.0 + terser: 5.51.2 + webpack: 5.111.1(sharp@0.35.5(@types/node@24.13.6)) + optionalDependencies: + sharp: 0.35.5(@types/node@24.13.6) + + minipass@7.1.3: {} + + ms@2.1.3: {} + + multer@2.4.0: + dependencies: + append-field: 1.0.0 + busboy: 1.6.0 + type-is: 1.6.18 + optional: true + + mute-stream@0.0.8: {} + + mute-stream@3.0.0: {} + + mysql2@3.15.3: + dependencies: + aws-ssl-profiles: 1.1.2 + denque: 2.1.0 + generate-function: 2.3.1 + iconv-lite: 0.7.3 + long: 5.3.2 + lru.min: 1.1.5 + named-placeholders: 1.1.6 + seq-queue: 0.0.5 + sqlstring: 2.3.3 + + named-placeholders@1.1.6: + dependencies: + lru.min: 1.1.5 + + nanoid@5.1.16: {} + + napi-postinstall@0.3.4: {} + + natural-compare@1.4.0: {} + + negotiator@1.1.0: + dependencies: + content-type: 2.1.0 + optional: true + + neo-async@2.6.2: {} + + nestjs-pino@5.2.0(@nestjs/common@12.0.4(reflect-metadata@0.2.2)(rxjs@7.8.2))(@nestjs/core@12.0.4)(pino-http@11.0.0)(pino@10.3.1)(rxjs@7.8.2): + dependencies: + '@nestjs/common': 12.0.4(reflect-metadata@0.2.2)(rxjs@7.8.2) + '@nestjs/core': 12.0.4(@nestjs/common@12.0.4(reflect-metadata@0.2.2)(rxjs@7.8.2))(@nestjs/platform-express@12.0.4)(reflect-metadata@0.2.2)(rxjs@7.8.2) + pino: 10.3.1 + pino-http: 11.0.0 + rxjs: 7.8.2 + + node-addon-api@7.1.1: {} + + node-emoji@2.1.3: + dependencies: + '@sindresorhus/is': 4.6.0 + char-regex: 1.0.2 + emojilib: 2.4.0 + skin-tone: 2.0.0 + + node-emoji@2.2.0: + dependencies: + '@sindresorhus/is': 4.6.0 + char-regex: 1.0.2 + emojilib: 2.4.0 + skin-tone: 2.0.0 + + node-int64@0.4.0: {} + + node-releases@2.0.56: {} + + normalize-path@3.0.0: {} + + npm-run-path@4.0.1: + dependencies: + path-key: 3.1.1 + + object-assign@4.1.1: + optional: true + + object-inspect@1.13.4: {} + + ohash@2.0.12: {} + + on-exit-leak-free@2.1.2: {} + + on-finished@2.4.1: + dependencies: + ee-first: 1.1.1 + optional: true + + once@1.4.0: + dependencies: + wrappy: 1.0.2 + + onetime@5.1.2: + dependencies: + mimic-fn: 2.1.0 + + onetime@7.0.0: + dependencies: + mimic-function: 5.0.1 + + ora@5.4.1: + dependencies: + bl: 4.1.0 + chalk: 4.1.2 + cli-cursor: 3.1.0 + cli-spinners: 2.9.2 + is-interactive: 1.0.0 + is-unicode-supported: 0.1.0 + log-symbols: 4.1.0 + strip-ansi: 6.0.1 + wcwidth: 1.0.1 + + ora@9.4.1: + dependencies: + chalk: 5.6.2 + cli-cursor: 5.0.0 + cli-spinners: 3.4.0 + is-interactive: 2.0.0 + is-unicode-supported: 2.1.0 + log-symbols: 7.0.1 + stdin-discarder: 0.3.2 + string-width: 8.2.2 + + os-tmpdir@1.0.2: {} + + oxlint-tsgolint@7.0.2002: + optionalDependencies: + '@oxlint-tsgolint/darwin-arm64': 7.0.2002 + '@oxlint-tsgolint/darwin-x64': 7.0.2002 + '@oxlint-tsgolint/linux-arm64': 7.0.2002 + '@oxlint-tsgolint/linux-x64': 7.0.2002 + '@oxlint-tsgolint/win32-arm64': 7.0.2002 + '@oxlint-tsgolint/win32-x64': 7.0.2002 + + oxlint@1.83.0(oxlint-tsgolint@7.0.2002): + optionalDependencies: + '@oxlint/binding-android-arm-eabi': 1.83.0 + '@oxlint/binding-android-arm64': 1.83.0 + '@oxlint/binding-darwin-arm64': 1.83.0 + '@oxlint/binding-darwin-x64': 1.83.0 + '@oxlint/binding-freebsd-x64': 1.83.0 + '@oxlint/binding-linux-arm-gnueabihf': 1.83.0 + '@oxlint/binding-linux-arm-musleabihf': 1.83.0 + '@oxlint/binding-linux-arm64-gnu': 1.83.0 + '@oxlint/binding-linux-arm64-musl': 1.83.0 + '@oxlint/binding-linux-ppc64-gnu': 1.83.0 + '@oxlint/binding-linux-riscv64-gnu': 1.83.0 + '@oxlint/binding-linux-riscv64-musl': 1.83.0 + '@oxlint/binding-linux-s390x-gnu': 1.83.0 + '@oxlint/binding-linux-x64-gnu': 1.83.0 + '@oxlint/binding-linux-x64-musl': 1.83.0 + '@oxlint/binding-openharmony-arm64': 1.83.0 + '@oxlint/binding-win32-arm64-msvc': 1.83.0 + '@oxlint/binding-win32-ia32-msvc': 1.83.0 + '@oxlint/binding-win32-x64-msvc': 1.83.0 + oxlint-tsgolint: 7.0.2002 + + p-limit@2.3.0: + dependencies: + p-try: 2.2.0 + + p-limit@3.1.0: + dependencies: + yocto-queue: 0.1.0 + + p-locate@4.1.0: + dependencies: + p-limit: 2.3.0 + + p-try@2.2.0: {} + + package-json-from-dist@1.0.1: {} + + parse-json@5.2.0: + dependencies: + '@babel/code-frame': 7.29.7 + error-ex: 1.3.4 + json-parse-even-better-errors: 2.3.1 + lines-and-columns: 1.2.4 + + parseurl@1.3.3: + optional: true + + path-exists@4.0.0: {} + + path-key@3.1.1: {} + + path-scurry@1.11.1: + dependencies: + lru-cache: 10.4.3 + minipass: 7.1.3 + + path-scurry@2.0.2: + dependencies: + lru-cache: 11.5.3 + minipass: 7.1.3 + + path-to-regexp@8.4.2: {} + + pathe@2.0.3: {} + + perfect-debounce@2.1.0: {} + + pg-cloudflare@1.4.1: + optional: true + + pg-connection-string@2.14.1: {} + + pg-int8@1.0.1: {} + + pg-pool@3.14.0(pg@8.23.1): + dependencies: + pg: 8.23.1 + + pg-protocol@1.16.1: {} + + pg-types@2.2.0: + dependencies: + pg-int8: 1.0.1 + postgres-array: 2.0.0 + postgres-bytea: 1.0.1 + postgres-date: 1.0.7 + postgres-interval: 1.2.0 + + pg@8.23.1: + dependencies: + pg-connection-string: 2.14.1 + pg-pool: 3.14.0(pg@8.23.1) + pg-protocol: 1.16.1 + pg-types: 2.2.0 + pgpass: 1.0.5 + optionalDependencies: + pg-cloudflare: 1.4.1 + + pgpass@1.0.5: + dependencies: + split2: 4.2.0 + + picocolors@1.1.1: {} + + picomatch@2.3.2: {} + + picomatch@4.0.5: {} + + picomatch@4.0.7: {} + + pino-abstract-transport@3.0.0: + dependencies: + split2: 4.2.0 + + pino-http@11.0.0: + dependencies: + get-caller-file: 2.0.5 + pino: 10.3.1 + pino-std-serializers: 7.1.0 + process-warning: 5.1.0 + + pino-pretty@13.1.3: + dependencies: + colorette: 2.0.20 + dateformat: 4.6.3 + fast-copy: 4.1.1 + fast-safe-stringify: 2.1.1 + help-me: 5.0.0 + joycon: 3.1.1 + minimist: 1.2.8 + on-exit-leak-free: 2.1.2 + pino-abstract-transport: 3.0.0 + pump: 3.0.4 + secure-json-parse: 4.1.0 + sonic-boom: 4.2.1 + strip-json-comments: 5.0.3 + + pino-std-serializers@7.1.0: {} + + pino@10.3.1: + dependencies: + '@pinojs/redact': 0.4.0 + atomic-sleep: 1.0.0 + on-exit-leak-free: 2.1.2 + pino-abstract-transport: 3.0.0 + pino-std-serializers: 7.1.0 + process-warning: 5.1.0 + quick-format-unescaped: 4.0.4 + real-require: 0.2.0 + safe-stable-stringify: 2.5.0 + sonic-boom: 4.2.1 + thread-stream: 4.2.0 + + pirates@4.0.7: {} + + pkg-dir@4.2.0: + dependencies: + find-up: 4.1.0 + + pkg-types@2.3.3: + dependencies: + confbox: 0.3.1 + exsolve: 1.1.3 + pathe: 2.0.3 + + pluralize@8.0.0: {} + + postgres-array@2.0.0: {} + + postgres-array@3.0.4: {} + + postgres-bytea@1.0.1: {} + + postgres-date@1.0.7: {} + + postgres-interval@1.2.0: + dependencies: + xtend: 4.0.2 + + postgres@3.4.7: {} + + prettier@3.9.8: {} + + pretty-format@30.5.1: + dependencies: + '@jest/react-is-18': react-is@18.3.1 + '@jest/react-is-19': react-is@19.3.0 + '@jest/schemas': 30.5.0 + ansi-styles: 5.2.0 + + prisma@7.10.0(@types/react@19.3.0)(react-dom@19.3.0(react@19.3.0))(react@19.3.0)(typescript@6.0.3): + dependencies: + '@prisma/config': 7.10.0 + '@prisma/dev': 0.24.17(typescript@6.0.3) + '@prisma/engines': 7.10.0 + '@prisma/studio-core': 0.33.0(@types/react@19.3.0)(react-dom@19.3.0(react@19.3.0))(react@19.3.0) + mysql2: 3.15.3 + postgres: 3.4.7 + optionalDependencies: + typescript: 6.0.3 + transitivePeerDependencies: + - '@types/react' + - '@types/react-dom' + - magicast + - react + - react-dom + + process-warning@4.0.1: {} + + process-warning@5.1.0: {} + + proper-lockfile@4.1.2: + dependencies: + graceful-fs: 4.2.11 + retry: 0.12.0 + signal-exit: 3.0.7 + + proxy-addr@2.0.8: + dependencies: + forwarded: 0.2.0 + ipaddr.js: 1.9.1 + optional: true + + pump@3.0.4: + dependencies: + end-of-stream: 1.4.5 + once: 1.4.0 + + pure-rand@6.1.0: {} + + pure-rand@7.0.1: {} + + qs@6.16.0: + dependencies: + es-define-property: 1.0.1 + side-channel: 1.1.1 + + quick-format-unescaped@4.0.4: {} + + range-parser@1.3.0: + optional: true + + raw-body@3.0.2: + dependencies: + bytes: 3.1.2 + http-errors: 2.0.1 + iconv-lite: 0.7.3 + unpipe: 1.0.0 + optional: true + + rc9@3.1.0: + dependencies: + defu: 6.1.7 + destr: 2.0.5 + + react-dom@19.3.0(react@19.3.0): + dependencies: + react: 19.3.0 + scheduler: 0.28.0 + + react-is@18.3.1: {} + + react-is@19.3.0: {} + + react@19.3.0: {} + + readable-stream@3.6.2: + dependencies: + inherits: 2.0.4 + string_decoder: 1.3.0 + util-deprecate: 1.0.2 + + readdirp@5.1.1: {} + + real-require@0.2.0: {} + + real-require@1.0.0: {} + + redis-errors@1.2.0: {} + + reflect-metadata@0.2.2: {} + + remeda@2.33.4: {} + + require-directory@2.1.1: {} + + require-from-string@2.0.2: {} + + resolve-cwd@3.0.0: + dependencies: + resolve-from: 5.0.0 + + resolve-from@5.0.0: {} + + restore-cursor@3.1.0: + dependencies: + onetime: 5.1.2 + signal-exit: 3.0.7 + + restore-cursor@5.1.0: + dependencies: + onetime: 7.0.0 + signal-exit: 4.1.0 + + ret@0.5.0: {} + + retry@0.12.0: {} + + reusify@1.1.0: {} + + rfdc@1.4.1: {} + + robust-predicates@3.0.3: {} + + router@2.2.0: + dependencies: + debug: 4.4.3 + depd: 2.0.0 + is-promise: 4.0.0 + parseurl: 1.3.3 + path-to-regexp: 8.4.2 + transitivePeerDependencies: + - supports-color + optional: true + + run-async@2.4.1: {} + + rxjs@7.8.2: + dependencies: + tslib: 2.8.1 + + safe-buffer@5.2.1: {} + + safe-regex2@5.1.1: + dependencies: + ret: 0.5.0 + + safe-stable-stringify@2.5.0: {} + + safer-buffer@2.1.2: {} + + scheduler@0.28.0: {} + + schema-utils@4.5.0: + dependencies: + '@types/json-schema': 7.0.15 + ajv: 8.20.0 + ajv-formats: 3.0.1(ajv@8.20.0) + ajv-keywords: 5.1.0(ajv@8.20.0) + + secure-json-parse@4.1.0: {} + + semver@6.3.1: {} + + semver@7.8.5: {} + + send@1.2.1: + dependencies: + debug: 4.4.3 + encodeurl: 2.0.0 + escape-html: 1.0.3 + etag: 1.8.1 + fresh: 2.0.0 + http-errors: 2.0.1 + mime-types: 3.0.2 + ms: 2.1.3 + on-finished: 2.4.1 + range-parser: 1.3.0 + statuses: 2.0.2 + transitivePeerDependencies: + - supports-color + optional: true + + seq-queue@0.0.5: {} + + serve-static@2.2.1: + dependencies: + encodeurl: 2.0.0 + escape-html: 1.0.3 + parseurl: 1.3.3 + send: 1.2.1 + transitivePeerDependencies: + - supports-color + optional: true + + set-cookie-parser@2.7.2: {} + + setprototypeof@1.2.0: {} + + sharp@0.35.5(@types/node@24.13.6): + dependencies: + '@img/colour': 1.1.0 + detect-libc: 2.1.2 + semver: 7.8.5 + optionalDependencies: + '@img/sharp-darwin-arm64': 0.35.5 + '@img/sharp-darwin-x64': 0.35.5 + '@img/sharp-freebsd-wasm32': 0.35.5 + '@img/sharp-libvips-darwin-arm64': 1.3.4 + '@img/sharp-libvips-darwin-x64': 1.3.4 + '@img/sharp-libvips-linux-arm': 1.3.4 + '@img/sharp-libvips-linux-arm64': 1.3.4 + '@img/sharp-libvips-linux-ppc64': 1.3.4 + '@img/sharp-libvips-linux-riscv64': 1.3.4 + '@img/sharp-libvips-linux-s390x': 1.3.4 + '@img/sharp-libvips-linux-x64': 1.3.4 + '@img/sharp-libvips-linuxmusl-arm64': 1.3.4 + '@img/sharp-libvips-linuxmusl-x64': 1.3.4 + '@img/sharp-linux-arm': 0.35.5 + '@img/sharp-linux-arm64': 0.35.5 + '@img/sharp-linux-ppc64': 0.35.5 + '@img/sharp-linux-riscv64': 0.35.5 + '@img/sharp-linux-s390x': 0.35.5 + '@img/sharp-linux-x64': 0.35.5 + '@img/sharp-linuxmusl-arm64': 0.35.5 + '@img/sharp-linuxmusl-x64': 0.35.5 + '@img/sharp-webcontainers-wasm32': 0.35.5 + '@img/sharp-win32-arm64': 0.35.5 + '@img/sharp-win32-ia32': 0.35.5 + '@img/sharp-win32-x64': 0.35.5 + '@types/node': 24.13.6 + + shebang-command@2.0.0: + dependencies: + shebang-regex: 3.0.0 + + shebang-regex@3.0.0: {} + + side-channel-list@1.0.1: + dependencies: + es-errors: 1.3.0 + object-inspect: 1.13.4 + + side-channel-map@1.0.1: + dependencies: + call-bound: 1.0.4 + es-errors: 1.3.0 + get-intrinsic: 1.3.0 + object-inspect: 1.13.4 + + side-channel-weakmap@1.0.2: + dependencies: + call-bound: 1.0.4 + es-errors: 1.3.0 + get-intrinsic: 1.3.0 + object-inspect: 1.13.4 + side-channel-map: 1.0.1 + + side-channel@1.1.1: + dependencies: + es-errors: 1.3.0 + object-inspect: 1.13.4 + side-channel-list: 1.0.1 + side-channel-map: 1.0.1 + side-channel-weakmap: 1.0.2 + + signal-exit@3.0.7: {} + + signal-exit@4.1.0: {} + + skin-tone@2.0.0: + dependencies: + unicode-emoji-modifier-base: 1.0.0 + + slash@3.0.0: {} + + sonic-boom@4.2.1: + dependencies: + atomic-sleep: 1.0.0 + + source-map-support@0.5.21: + dependencies: + buffer-from: 1.1.2 + source-map: 0.6.1 + + source-map@0.6.1: {} + + source-map@0.7.6: {} + + split2@4.2.0: {} + + sprintf-js@1.0.3: {} + + sqlstring@2.3.3: {} + + stack-utils@2.0.6: + dependencies: + escape-string-regexp: 2.0.0 + + standard-as-callback@2.1.0: {} + + statuses@2.0.2: {} + + std-env@3.10.0: {} + + stdin-discarder@0.3.2: {} + + streamsearch@1.1.0: + optional: true + + string-length@4.0.2: + dependencies: + char-regex: 1.0.2 + strip-ansi: 6.0.1 + + string-width@4.2.3: + dependencies: + emoji-regex: 8.0.0 + is-fullwidth-code-point: 3.0.0 + strip-ansi: 6.0.1 + + string-width@5.1.2: + dependencies: + eastasianwidth: 0.2.0 + emoji-regex: 9.2.2 + strip-ansi: 7.2.0 + + string-width@8.2.2: + dependencies: + get-east-asian-width: 1.7.0 + strip-ansi: 7.2.0 + + string_decoder@1.3.0: + dependencies: + safe-buffer: 5.2.1 + + strip-ansi@6.0.1: + dependencies: + ansi-regex: 5.0.1 + + strip-ansi@7.2.0: + dependencies: + ansi-regex: 6.3.0 + + strip-bom@3.0.0: {} + + strip-bom@4.0.0: {} + + strip-final-newline@2.0.0: {} + + strip-json-comments@3.1.1: {} + + strip-json-comments@5.0.3: {} + + strtok3@10.3.5: + dependencies: + '@tokenizer/token': 0.3.0 + + superagent@10.3.0: + dependencies: + component-emitter: 1.3.1 + cookiejar: 2.1.4 + debug: 4.4.3 + fast-safe-stringify: 2.1.1 + form-data: 4.0.6 + formidable: 3.5.4 + methods: 1.1.2 + mime: 2.6.0 + qs: 6.16.0 + transitivePeerDependencies: + - supports-color + + supertest@7.2.2: + dependencies: + cookie-signature: 1.2.2 + methods: 1.1.2 + superagent: 10.3.0 + transitivePeerDependencies: + - supports-color + + supports-color@7.2.0: + dependencies: + has-flag: 4.0.0 + + supports-color@8.1.1: + dependencies: + has-flag: 4.0.0 + + swagger-ui-dist@5.32.14: + dependencies: + '@scarf/scarf': 1.4.0 + + synckit@0.11.13: + dependencies: + '@pkgr/core': 0.3.6 + + tagged-tag@1.0.0: {} + + tapable@2.3.3: {} + + terser@5.51.2: + dependencies: + '@jridgewell/source-map': 0.3.11 + acorn: 8.18.0 + commander: 2.20.3 + source-map-support: 0.5.21 + + test-exclude@7.0.2: + dependencies: + '@istanbuljs/schema': 0.1.6 + glob: 10.5.0 + minimatch: 10.2.6 + + thread-stream@4.2.0: + dependencies: + real-require: 1.0.0 + + through@2.3.8: {} + + tmp@0.0.33: + dependencies: + os-tmpdir: 1.0.2 + + toad-cache@3.7.4: {} + + toidentifier@1.0.1: {} + + token-types@6.1.2: + dependencies: + '@borewit/text-codec': 0.2.2 + '@tokenizer/token': 0.3.0 + ieee754: 1.2.1 + + ts-jest@29.4.12(@babel/core@7.29.7)(@jest/transform@30.5.2)(@jest/types@30.5.1)(babel-jest@30.5.2(@babel/core@7.29.7))(jest-util@30.5.1)(jest@30.5.2(@types/node@24.13.6)(ts-node@10.9.2(@types/node@24.13.6)(typescript@6.0.3)))(typescript@6.0.3): + dependencies: + bs-logger: 0.2.6 + fast-json-stable-stringify: 2.1.0 + handlebars: 4.7.9 + jest: 30.5.2(@types/node@24.13.6)(ts-node@10.9.2(@types/node@24.13.6)(typescript@6.0.3)) + json5: 2.2.3 + lodash.memoize: 4.1.2 + make-error: 1.3.6 + semver: 7.8.5 + type-fest: 4.41.0 + typescript: 6.0.3 + yargs-parser: 21.1.1 + optionalDependencies: + '@babel/core': 7.29.7 + '@jest/transform': 30.5.2 + '@jest/types': 30.5.1 + babel-jest: 30.5.2(@babel/core@7.29.7) + jest-util: 30.5.1 + + ts-loader@9.6.2(typescript@6.0.3)(webpack@5.111.1(sharp@0.35.5(@types/node@24.13.6))): + dependencies: + chalk: 4.1.2 + picomatch: 4.0.7 + source-map: 0.7.6 + typescript: 6.0.3 + webpack: 5.111.1(sharp@0.35.5(@types/node@24.13.6)) + + ts-node@10.9.2(@types/node@24.13.6)(typescript@6.0.3): + dependencies: + '@cspotcode/source-map-support': 0.8.1 + '@tsconfig/node10': 1.0.13 + '@tsconfig/node12': 1.0.11 + '@tsconfig/node14': 1.0.3 + '@tsconfig/node16': 1.0.4 + '@types/node': 24.13.6 + acorn: 8.18.0 + acorn-walk: 8.3.5 + arg: 4.1.3 + create-require: 1.1.1 + diff: 4.0.4 + make-error: 1.3.6 + typescript: 6.0.3 + v8-compile-cache-lib: 3.0.1 + yn: 3.1.1 + + tsconfig-paths@4.2.0: + dependencies: + json5: 2.2.3 + minimist: 1.2.8 + strip-bom: 3.0.0 + + tslib@2.8.1: {} + + type-detect@4.0.8: {} + + type-fest@0.21.3: {} + + type-fest@4.41.0: {} + + type-fest@5.10.0: + dependencies: + tagged-tag: 1.0.0 + + type-is@1.6.18: + dependencies: + media-typer: 0.3.0 + mime-types: 2.1.35 + optional: true + + type-is@2.1.0: + dependencies: + content-type: 2.1.0 + media-typer: 1.1.1 + mime-types: 3.0.2 + optional: true + + typescript@6.0.3: {} + + uglify-js@3.19.3: + optional: true + + uid@2.0.2: + dependencies: + '@lukeed/csprng': 1.1.0 + + uint8array-extras@1.5.0: {} + + undici-types@7.18.2: {} + + undici@6.20.1: {} + + unicode-emoji-modifier-base@1.0.0: {} + + unpipe@1.0.0: + optional: true + + unrs-resolver@1.12.2: + dependencies: + napi-postinstall: 0.3.4 + optionalDependencies: + '@unrs/resolver-binding-android-arm-eabi': 1.12.2 + '@unrs/resolver-binding-android-arm64': 1.12.2 + '@unrs/resolver-binding-darwin-arm64': 1.12.2 + '@unrs/resolver-binding-darwin-x64': 1.12.2 + '@unrs/resolver-binding-freebsd-x64': 1.12.2 + '@unrs/resolver-binding-linux-arm-gnueabihf': 1.12.2 + '@unrs/resolver-binding-linux-arm-musleabihf': 1.12.2 + '@unrs/resolver-binding-linux-arm64-gnu': 1.12.2 + '@unrs/resolver-binding-linux-arm64-musl': 1.12.2 + '@unrs/resolver-binding-linux-loong64-gnu': 1.12.2 + '@unrs/resolver-binding-linux-loong64-musl': 1.12.2 + '@unrs/resolver-binding-linux-ppc64-gnu': 1.12.2 + '@unrs/resolver-binding-linux-riscv64-gnu': 1.12.2 + '@unrs/resolver-binding-linux-riscv64-musl': 1.12.2 + '@unrs/resolver-binding-linux-s390x-gnu': 1.12.2 + '@unrs/resolver-binding-linux-x64-gnu': 1.12.2 + '@unrs/resolver-binding-linux-x64-musl': 1.12.2 + '@unrs/resolver-binding-openharmony-arm64': 1.12.2 + '@unrs/resolver-binding-wasm32-wasi': 1.12.2 + '@unrs/resolver-binding-win32-arm64-msvc': 1.12.2 + '@unrs/resolver-binding-win32-ia32-msvc': 1.12.2 + '@unrs/resolver-binding-win32-x64-msvc': 1.12.2 + + update-browserslist-db@1.3.3(browserslist@4.29.0): + dependencies: + browserslist: 4.29.0 + escalade: 3.2.0 + picocolors: 1.1.1 + + util-deprecate@1.0.2: {} + + v8-compile-cache-lib@3.0.1: {} + + v8-to-istanbul@9.3.0: + dependencies: + '@jridgewell/trace-mapping': 0.3.31 + '@types/istanbul-lib-coverage': 2.0.6 + convert-source-map: 2.0.0 + + valibot@1.4.2(typescript@6.0.3): + optionalDependencies: + typescript: 6.0.3 + + vary@1.1.2: + optional: true + + watchpack@2.5.2: + dependencies: + graceful-fs: 4.2.11 + + wcwidth@1.0.1: + dependencies: + defaults: 1.0.4 + + webpack-sources@3.5.1: {} + + webpack@5.111.1(sharp@0.35.5(@types/node@24.13.6)): + dependencies: + '@types/estree': 1.0.9 + '@types/json-schema': 7.0.15 + '@webassemblyjs/ast': 1.14.1 + '@webassemblyjs/wasm-edit': 1.14.1 + '@webassemblyjs/wasm-parser': 1.14.1 + browserslist: 4.29.0 + chrome-trace-event: 1.0.4 + enhanced-resolve: 5.25.1 + es-module-lexer: 2.3.2 + events: 3.3.0 + graceful-fs: 4.2.11 + mime-db: 1.54.0 + minimizer-webpack-plugin: 5.11.0(sharp@0.35.5(@types/node@24.13.6))(webpack@5.111.1(sharp@0.35.5(@types/node@24.13.6))) + schema-utils: 4.5.0 + tapable: 2.3.3 + watchpack: 2.5.2 + webpack-sources: 3.5.1 + transitivePeerDependencies: + - '@minify-html/node' + - '@napi-rs/image' + - '@swc/core' + - '@swc/css' + - '@swc/html' + - clean-css + - cssnano + - csso + - esbuild + - html-minifier-terser + - imagemin + - lightningcss + - postcss + - sharp + - svgo + - uglify-js + + which@2.0.2: + dependencies: + isexe: 2.0.0 + + wordwrap@1.0.0: {} + + wrap-ansi@6.2.0: + dependencies: + ansi-styles: 4.3.0 + string-width: 4.2.3 + strip-ansi: 6.0.1 + + wrap-ansi@7.0.0: + dependencies: + ansi-styles: 4.3.0 + string-width: 4.2.3 + strip-ansi: 6.0.1 + + wrap-ansi@8.1.0: + dependencies: + ansi-styles: 6.2.3 + string-width: 5.1.2 + strip-ansi: 7.2.0 + + wrappy@1.0.2: {} + + write-file-atomic@5.0.1: + dependencies: + imurmurhash: 0.1.4 + signal-exit: 4.1.0 + + xtend@4.0.2: {} + + y18n@5.0.8: {} + + yallist@3.1.1: {} + + yargs-parser@21.1.1: {} + + yargs@17.7.3: + dependencies: + cliui: 8.0.1 + escalade: 3.2.0 + get-caller-file: 2.0.5 + require-directory: 2.1.1 + string-width: 4.2.3 + y18n: 5.0.8 + yargs-parser: 21.1.1 + + yn@3.1.1: {} + + yocto-queue@0.1.0: {} + + yoctocolors@2.2.0: {} + + zeptomatch@2.1.0: + dependencies: + grammex: 3.1.13 + graphmatch: 1.1.1 + + zod@4.6.5: {} diff --git a/prisma.config.ts b/prisma.config.ts new file mode 100644 index 00000000..74ba9ee2 --- /dev/null +++ b/prisma.config.ts @@ -0,0 +1,8 @@ +import 'dotenv/config'; +import { defineConfig } from 'prisma/config'; + +export default defineConfig({ + schema: 'prisma/schema.prisma', + migrations: { path: 'prisma/migrations' }, + datasource: { url: process.env.DATABASE_URL }, +}); diff --git a/prisma/migrations/20261011140000_initial/migration.sql b/prisma/migrations/20261011140000_initial/migration.sql new file mode 100644 index 00000000..8e449725 --- /dev/null +++ b/prisma/migrations/20261011140000_initial/migration.sql @@ -0,0 +1,56 @@ +CREATE SCHEMA IF NOT EXISTS "public"; + +CREATE TABLE "users" ( + "id" UUID NOT NULL, + "username" VARCHAR(32) NOT NULL, + "display_name" VARCHAR(100) NOT NULL, + "created_at" TIMESTAMPTZ(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, + + CONSTRAINT "users_pkey" PRIMARY KEY ("id") +); + +CREATE TABLE "chats" ( + "id" UUID NOT NULL, + "title" VARCHAR(100) NOT NULL, + "created_at" TIMESTAMPTZ(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, + + CONSTRAINT "chats_pkey" PRIMARY KEY ("id") +); + +CREATE TABLE "chat_members" ( + "chat_id" UUID NOT NULL, + "user_id" UUID NOT NULL, + "position" INTEGER NOT NULL, + + CONSTRAINT "chat_members_pkey" PRIMARY KEY ("chat_id","user_id") +); + +CREATE TABLE "messages" ( + "id" UUID NOT NULL, + "chat_id" UUID NOT NULL, + "sender_id" UUID NOT NULL, + "text" VARCHAR(4000) NOT NULL, + "created_at" TIMESTAMPTZ(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, + + CONSTRAINT "messages_pkey" PRIMARY KEY ("id") +); + +CREATE UNIQUE INDEX "users_username_key" ON "users"("username"); + +CREATE INDEX "chats_created_at_id_idx" ON "chats"("created_at", "id"); + +CREATE INDEX "chat_members_user_id_chat_id_idx" ON "chat_members"("user_id", "chat_id"); + +CREATE UNIQUE INDEX "chat_members_chat_id_position_key" ON "chat_members"("chat_id", "position"); + +CREATE INDEX "messages_chat_id_created_at_id_idx" ON "messages"("chat_id", "created_at", "id"); + +CREATE INDEX "messages_sender_id_idx" ON "messages"("sender_id"); + +ALTER TABLE "chat_members" ADD CONSTRAINT "chat_members_chat_id_fkey" FOREIGN KEY ("chat_id") REFERENCES "chats"("id") ON DELETE CASCADE ON UPDATE CASCADE; + +ALTER TABLE "chat_members" ADD CONSTRAINT "chat_members_user_id_fkey" FOREIGN KEY ("user_id") REFERENCES "users"("id") ON DELETE RESTRICT ON UPDATE CASCADE; + +ALTER TABLE "messages" ADD CONSTRAINT "messages_chat_id_fkey" FOREIGN KEY ("chat_id") REFERENCES "chats"("id") ON DELETE CASCADE ON UPDATE CASCADE; + +ALTER TABLE "messages" ADD CONSTRAINT "messages_sender_id_fkey" FOREIGN KEY ("sender_id") REFERENCES "users"("id") ON DELETE RESTRICT ON UPDATE CASCADE; diff --git a/prisma/migrations/20261011160000_auth/migration.sql b/prisma/migrations/20261011160000_auth/migration.sql new file mode 100644 index 00000000..9e0c4a5e --- /dev/null +++ b/prisma/migrations/20261011160000_auth/migration.sql @@ -0,0 +1,20 @@ +ALTER TABLE "users" ADD COLUMN "password_hash" TEXT; + +CREATE TABLE "sessions" ( + "id" UUID NOT NULL, + "user_id" UUID NOT NULL, + "token_hash" CHAR(64) NOT NULL, + "created_at" TIMESTAMPTZ(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, + "expires_at" TIMESTAMPTZ(3) NOT NULL, + "revoked_at" TIMESTAMPTZ(3), + + CONSTRAINT "sessions_pkey" PRIMARY KEY ("id") +); + +CREATE UNIQUE INDEX "sessions_token_hash_key" ON "sessions"("token_hash"); + +CREATE INDEX "sessions_user_id_idx" ON "sessions"("user_id"); + +CREATE INDEX "sessions_expires_at_idx" ON "sessions"("expires_at"); + +ALTER TABLE "sessions" ADD CONSTRAINT "sessions_user_id_fkey" FOREIGN KEY ("user_id") REFERENCES "users"("id") ON DELETE CASCADE ON UPDATE CASCADE; diff --git a/prisma/migrations/20261013093000_cache_epochs/migration.sql b/prisma/migrations/20261013093000_cache_epochs/migration.sql new file mode 100644 index 00000000..0e42114c --- /dev/null +++ b/prisma/migrations/20261013093000_cache_epochs/migration.sql @@ -0,0 +1,2 @@ +ALTER TABLE "users" ADD COLUMN "chats_epoch" BIGINT NOT NULL DEFAULT 0; +ALTER TABLE "chats" ADD COLUMN "messages_epoch" BIGINT NOT NULL DEFAULT 0; diff --git a/prisma/migrations/20261013150000_message_epoch_buckets/migration.sql b/prisma/migrations/20261013150000_message_epoch_buckets/migration.sql new file mode 100644 index 00000000..b1c17169 --- /dev/null +++ b/prisma/migrations/20261013150000_message_epoch_buckets/migration.sql @@ -0,0 +1,13 @@ +CREATE TABLE "chat_message_epochs" ( + "chat_id" UUID NOT NULL, + "bucket" SMALLINT NOT NULL, + "epoch" BIGINT NOT NULL DEFAULT 0, + CONSTRAINT "chat_message_epochs_pkey" PRIMARY KEY ("chat_id", "bucket"), + CONSTRAINT "chat_message_epochs_bucket_check" CHECK ("bucket" BETWEEN 0 AND 15), + CONSTRAINT "chat_message_epochs_chat_id_fkey" FOREIGN KEY ("chat_id") REFERENCES "chats"("id") ON DELETE CASCADE ON UPDATE CASCADE +); + +INSERT INTO "chat_message_epochs" ("chat_id", "bucket", "epoch") +SELECT "id", 0, "messages_epoch" FROM "chats"; + +ALTER TABLE "chats" DROP COLUMN "messages_epoch"; diff --git a/prisma/migrations/20261026120000_message_idempotency/migration.sql b/prisma/migrations/20261026120000_message_idempotency/migration.sql new file mode 100644 index 00000000..744af151 --- /dev/null +++ b/prisma/migrations/20261026120000_message_idempotency/migration.sql @@ -0,0 +1,15 @@ +CREATE TABLE "message_idempotency" ( + "user_id" UUID NOT NULL, + "chat_id" UUID NOT NULL, + "key" VARCHAR(128) NOT NULL, + "message_id" UUID, + "expires_at" TIMESTAMPTZ(3) NOT NULL, + CONSTRAINT "message_idempotency_pkey" PRIMARY KEY ("user_id", "chat_id", "key"), + CONSTRAINT "message_idempotency_user_id_fkey" FOREIGN KEY ("user_id") REFERENCES "users"("id") ON DELETE CASCADE ON UPDATE CASCADE, + CONSTRAINT "message_idempotency_chat_id_fkey" FOREIGN KEY ("chat_id") REFERENCES "chats"("id") ON DELETE CASCADE ON UPDATE CASCADE, + CONSTRAINT "message_idempotency_message_id_fkey" FOREIGN KEY ("message_id") REFERENCES "messages"("id") ON DELETE CASCADE ON UPDATE CASCADE +); + +CREATE INDEX "message_idempotency_expires_at_idx" ON "message_idempotency"("expires_at"); +CREATE INDEX "message_idempotency_chat_id_idx" ON "message_idempotency"("chat_id"); +CREATE INDEX "message_idempotency_message_id_idx" ON "message_idempotency"("message_id"); diff --git a/prisma/migrations/20261108000000_attachments/migration.sql b/prisma/migrations/20261108000000_attachments/migration.sql new file mode 100644 index 00000000..ebd64f17 --- /dev/null +++ b/prisma/migrations/20261108000000_attachments/migration.sql @@ -0,0 +1,20 @@ +ALTER TABLE "messages" ADD COLUMN "attachment_ids" UUID[] NOT NULL DEFAULT ARRAY[]::UUID[]; + +CREATE TABLE "attachments" ( + "id" UUID NOT NULL, + "chat_id" UUID NOT NULL, + "owner_id" UUID NOT NULL, + "object_key" TEXT NOT NULL, + "filename" VARCHAR(255) NOT NULL, + "content_type" VARCHAR(32) NOT NULL, + "size_bytes" INTEGER NOT NULL CHECK ("size_bytes" BETWEEN 1 AND 10485760), + "sha256" CHAR(64) NOT NULL, + "created_at" TIMESTAMPTZ(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, + "updated_at" TIMESTAMPTZ(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, + CONSTRAINT "attachments_pkey" PRIMARY KEY ("id"), + CONSTRAINT "attachments_chat_id_fkey" FOREIGN KEY ("chat_id") REFERENCES "chats"("id") ON DELETE RESTRICT ON UPDATE CASCADE, + CONSTRAINT "attachments_owner_id_fkey" FOREIGN KEY ("owner_id") REFERENCES "users"("id") ON DELETE RESTRICT ON UPDATE CASCADE +); +CREATE UNIQUE INDEX "attachments_object_key_key" ON "attachments"("object_key"); +CREATE INDEX "attachments_chat_id_idx" ON "attachments"("chat_id"); +CREATE INDEX "attachments_owner_id_idx" ON "attachments"("owner_id"); diff --git a/prisma/migrations/20261110000000_direct_uploads/migration.sql b/prisma/migrations/20261110000000_direct_uploads/migration.sql new file mode 100644 index 00000000..4b70d851 --- /dev/null +++ b/prisma/migrations/20261110000000_direct_uploads/migration.sql @@ -0,0 +1,20 @@ +CREATE TYPE "direct_upload_status" AS ENUM ('pending', 'completed', 'rejected', 'expired'); +CREATE TABLE "direct_uploads" ( + "id" UUID NOT NULL, + "chat_id" UUID NOT NULL, + "owner_id" UUID NOT NULL, + "filename" VARCHAR(255) NOT NULL, + "content_type" VARCHAR(32) NOT NULL, + "size_bytes" INTEGER NOT NULL, + "sha256" CHAR(64) NOT NULL, + "status" "direct_upload_status" NOT NULL DEFAULT 'pending', + "expires_at" TIMESTAMPTZ(3) NOT NULL, + "created_at" TIMESTAMPTZ(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, + CONSTRAINT "direct_uploads_pkey" PRIMARY KEY ("id"), + CONSTRAINT "direct_uploads_chat_id_fkey" FOREIGN KEY ("chat_id") REFERENCES "chats"("id") ON DELETE RESTRICT ON UPDATE CASCADE, + CONSTRAINT "direct_uploads_owner_id_fkey" FOREIGN KEY ("owner_id") REFERENCES "users"("id") ON DELETE RESTRICT ON UPDATE CASCADE, + CONSTRAINT "direct_uploads_size_check" CHECK ("size_bytes" BETWEEN 1 AND 10485760) +); +CREATE INDEX "direct_uploads_status_expires_at_idx" ON "direct_uploads"("status", "expires_at"); +CREATE INDEX "direct_uploads_chat_id_idx" ON "direct_uploads"("chat_id"); +CREATE INDEX "direct_uploads_owner_id_idx" ON "direct_uploads"("owner_id"); diff --git a/prisma/migrations/20261124000000_attachment_jobs/migration.sql b/prisma/migrations/20261124000000_attachment_jobs/migration.sql new file mode 100644 index 00000000..4220143b --- /dev/null +++ b/prisma/migrations/20261124000000_attachment_jobs/migration.sql @@ -0,0 +1,15 @@ +CREATE TYPE "attachment_status" AS ENUM ('queued', 'processing', 'ready', 'failed'); + +ALTER TABLE "attachments" + ADD COLUMN "status" "attachment_status" NOT NULL DEFAULT 'ready', + ADD COLUMN "error_code" TEXT, + ADD COLUMN "thumbnail_size" INTEGER, + ADD COLUMN "thumbnail_width" INTEGER, + ADD COLUMN "thumbnail_height" INTEGER, + ADD COLUMN "thumbnail_sha256" CHAR(64), + ADD COLUMN "published_at" TIMESTAMPTZ(3), + ADD COLUMN "lease_until" TIMESTAMPTZ(3), + ADD COLUMN "failures" INTEGER NOT NULL DEFAULT 0; + +CREATE INDEX "attachments_pending_publish_idx" ON "attachments" ("created_at", "id") + WHERE "published_at" IS NULL AND "status" = 'queued'; diff --git a/prisma/migrations/20261124010000_attachment_retries_and_replay/migration.sql b/prisma/migrations/20261124010000_attachment_retries_and_replay/migration.sql new file mode 100644 index 00000000..70ceda9f --- /dev/null +++ b/prisma/migrations/20261124010000_attachment_retries_and_replay/migration.sql @@ -0,0 +1,23 @@ +ALTER TABLE "attachments" + ADD COLUMN "next_attempt_at" TIMESTAMPTZ(3), + ADD COLUMN "failed_at" TIMESTAMPTZ(3), + ADD COLUMN "replay_until" TIMESTAMPTZ(3), + ADD COLUMN "generation" INTEGER NOT NULL DEFAULT 0; + +UPDATE "attachments" +SET "failed_at" = "updated_at", + "replay_until" = "updated_at" + INTERVAL '24 hours' +WHERE "status" = 'failed'; + +CREATE INDEX "attachments_status_failed_at_id_idx" ON "attachments" ("status", "failed_at", "id"); + +CREATE TABLE "attachment_replays" ( + "attachment_id" UUID NOT NULL REFERENCES "attachments" ("id") ON DELETE RESTRICT ON UPDATE CASCADE, + "request_id" UUID NOT NULL, + "operator" VARCHAR(128) NOT NULL, + "generation" INTEGER NOT NULL, + "error_code" TEXT, + "failures" INTEGER NOT NULL, + "created_at" TIMESTAMPTZ(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY ("attachment_id", "request_id") +); diff --git a/prisma/migrations/20261124020000_attachment_image_variants/migration.sql b/prisma/migrations/20261124020000_attachment_image_variants/migration.sql new file mode 100644 index 00000000..9d3cf023 --- /dev/null +++ b/prisma/migrations/20261124020000_attachment_image_variants/migration.sql @@ -0,0 +1,7 @@ +ALTER TABLE "attachments" + ADD COLUMN "crop_size" INTEGER, + ADD COLUMN "crop_sha256" CHAR(64), + ADD COLUMN "optimized_size" INTEGER, + ADD COLUMN "optimized_width" INTEGER, + ADD COLUMN "optimized_height" INTEGER, + ADD COLUMN "optimized_sha256" CHAR(64); diff --git a/prisma/migrations/20261124030000_attachment_transactional_outbox/migration.sql b/prisma/migrations/20261124030000_attachment_transactional_outbox/migration.sql new file mode 100644 index 00000000..30fbad60 --- /dev/null +++ b/prisma/migrations/20261124030000_attachment_transactional_outbox/migration.sql @@ -0,0 +1,35 @@ +BEGIN; + +CREATE TABLE "attachment_outbox" ( + "attachment_id" UUID NOT NULL REFERENCES "attachments" ("id") ON DELETE RESTRICT ON UPDATE CASCADE, + "generation" INTEGER NOT NULL, + "created_at" TIMESTAMPTZ(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY ("attachment_id", "generation") +); + +CREATE INDEX "attachment_outbox_created_at_attachment_id_generation_idx" + ON "attachment_outbox" ("created_at", "attachment_id", "generation"); + +-- Insertion and explicit replay both enqueue work in the surrounding transaction. +CREATE FUNCTION enqueue_attachment_outbox() RETURNS TRIGGER +LANGUAGE plpgsql AS $$ +BEGIN + IF NEW.status = 'queued' AND (TG_OP = 'INSERT' OR NEW.generation IS DISTINCT FROM OLD.generation) THEN + INSERT INTO attachment_outbox (attachment_id, generation) + VALUES (NEW.id, NEW.generation); + END IF; + RETURN NEW; +END; +$$; + +CREATE TRIGGER attachment_outbox_enqueue +AFTER INSERT OR UPDATE OF generation ON "attachments" +FOR EACH ROW EXECUTE FUNCTION enqueue_attachment_outbox(); + +INSERT INTO "attachment_outbox" ("attachment_id", "generation", "created_at") +SELECT "id", "generation", "created_at" FROM "attachments" +WHERE "status" = 'queued' AND "published_at" IS NULL; + +DROP INDEX "attachments_pending_publish_idx"; + +COMMIT; diff --git a/prisma/migrations/migration_lock.toml b/prisma/migrations/migration_lock.toml new file mode 100644 index 00000000..2fe25d87 --- /dev/null +++ b/prisma/migrations/migration_lock.toml @@ -0,0 +1 @@ +provider = "postgresql" diff --git a/prisma/schema.prisma b/prisma/schema.prisma new file mode 100644 index 00000000..8b188890 --- /dev/null +++ b/prisma/schema.prisma @@ -0,0 +1,215 @@ +generator client { + provider = "prisma-client" + output = "../src/generated/prisma" + moduleFormat = "cjs" +} + +datasource db { + provider = "postgresql" +} + +model User { + id String @id @default(uuid()) @db.Uuid + username String @unique @db.VarChar(32) + displayName String @map("display_name") @db.VarChar(100) + passwordHash String? @map("password_hash") + createdAt DateTime @default(now()) @map("created_at") @db.Timestamptz(3) + chatsEpoch BigInt @default(0) @map("chats_epoch") + memberships ChatMember[] + messages Message[] + sessions Session[] + idempotencyRecords MessageIdempotency[] + attachments Attachment[] + directUploads DirectUpload[] + + @@map("users") +} + +model Session { + id String @id @default(uuid()) @db.Uuid + userId String @map("user_id") @db.Uuid + tokenHash String @unique @map("token_hash") @db.Char(64) + createdAt DateTime @default(now()) @map("created_at") @db.Timestamptz(3) + expiresAt DateTime @map("expires_at") @db.Timestamptz(3) + revokedAt DateTime? @map("revoked_at") @db.Timestamptz(3) + user User @relation(fields: [userId], references: [id], onDelete: Cascade) + + @@index([userId]) + @@index([expiresAt]) + @@map("sessions") +} + +model Chat { + id String @id @default(uuid()) @db.Uuid + title String @db.VarChar(100) + createdAt DateTime @default(now()) @map("created_at") @db.Timestamptz(3) + messageEpochs ChatMessageEpoch[] + members ChatMember[] + messages Message[] + idempotencyRecords MessageIdempotency[] + attachments Attachment[] + directUploads DirectUpload[] + + @@index([createdAt, id]) + @@map("chats") +} + +model ChatMember { + chatId String @map("chat_id") @db.Uuid + userId String @map("user_id") @db.Uuid + position Int + chat Chat @relation(fields: [chatId], references: [id], onDelete: Cascade) + user User @relation(fields: [userId], references: [id], onDelete: Restrict) + + @@id([chatId, userId]) + @@unique([chatId, position]) + @@index([userId, chatId]) + @@map("chat_members") +} + +model ChatMessageEpoch { + chatId String @map("chat_id") @db.Uuid + bucket Int @db.SmallInt + epoch BigInt @default(0) + chat Chat @relation(fields: [chatId], references: [id], onDelete: Cascade) + + @@id([chatId, bucket]) + @@map("chat_message_epochs") +} + +model Message { + id String @id @default(uuid()) @db.Uuid + chatId String @map("chat_id") @db.Uuid + senderId String @map("sender_id") @db.Uuid + text String @db.VarChar(4000) + attachmentIds String[] @default([]) @map("attachment_ids") @db.Uuid + createdAt DateTime @default(now()) @map("created_at") @db.Timestamptz(3) + chat Chat @relation(fields: [chatId], references: [id], onDelete: Cascade) + sender User @relation(fields: [senderId], references: [id], onDelete: Restrict) + idempotencyRecords MessageIdempotency[] + + @@index([chatId, createdAt, id]) + @@index([senderId]) + @@map("messages") +} + +enum AttachmentStatus { + queued + processing + ready + failed + + @@map("attachment_status") +} + +model Attachment { + id String @id @default(uuid()) @db.Uuid + chatId String @map("chat_id") @db.Uuid + ownerId String @map("owner_id") @db.Uuid + objectKey String @unique @map("object_key") + filename String @db.VarChar(255) + contentType String @map("content_type") @db.VarChar(32) + sizeBytes Int @map("size_bytes") + sha256 String @db.Char(64) + status AttachmentStatus @default(ready) + errorCode String? @map("error_code") + thumbnailSize Int? @map("thumbnail_size") + thumbnailWidth Int? @map("thumbnail_width") + thumbnailHeight Int? @map("thumbnail_height") + thumbnailSha256 String? @map("thumbnail_sha256") @db.Char(64) + cropSize Int? @map("crop_size") + cropSha256 String? @map("crop_sha256") @db.Char(64) + optimizedSize Int? @map("optimized_size") + optimizedWidth Int? @map("optimized_width") + optimizedHeight Int? @map("optimized_height") + optimizedSha256 String? @map("optimized_sha256") @db.Char(64) + publishedAt DateTime? @map("published_at") @db.Timestamptz(3) + leaseUntil DateTime? @map("lease_until") @db.Timestamptz(3) + nextAttemptAt DateTime? @map("next_attempt_at") @db.Timestamptz(3) + failedAt DateTime? @map("failed_at") @db.Timestamptz(3) + replayUntil DateTime? @map("replay_until") @db.Timestamptz(3) + generation Int @default(0) + failures Int @default(0) + createdAt DateTime @default(now()) @map("created_at") @db.Timestamptz(3) + updatedAt DateTime @default(now()) @updatedAt @map("updated_at") @db.Timestamptz(3) + chat Chat @relation(fields: [chatId], references: [id], onDelete: Restrict) + owner User @relation(fields: [ownerId], references: [id], onDelete: Restrict) + replays AttachmentReplay[] + outbox AttachmentOutbox[] + + @@index([chatId]) + @@index([ownerId]) + @@index([status, failedAt, id]) + @@map("attachments") +} + +model AttachmentOutbox { + attachmentId String @map("attachment_id") @db.Uuid + generation Int + createdAt DateTime @default(now()) @map("created_at") @db.Timestamptz(3) + attachment Attachment @relation(fields: [attachmentId], references: [id], onDelete: Restrict) + + @@id([attachmentId, generation]) + @@index([createdAt, attachmentId, generation]) + @@map("attachment_outbox") +} + +model AttachmentReplay { + attachmentId String @map("attachment_id") @db.Uuid + requestId String @map("request_id") @db.Uuid + operator String @db.VarChar(128) + generation Int + errorCode String? @map("error_code") + failures Int + createdAt DateTime @default(now()) @map("created_at") @db.Timestamptz(3) + attachment Attachment @relation(fields: [attachmentId], references: [id], onDelete: Restrict) + + @@id([attachmentId, requestId]) + @@map("attachment_replays") +} + +enum DirectUploadStatus { + pending + completed + rejected + expired + + @@map("direct_upload_status") +} + +model DirectUpload { + id String @id @default(uuid()) @db.Uuid + chatId String @map("chat_id") @db.Uuid + ownerId String @map("owner_id") @db.Uuid + filename String @db.VarChar(255) + contentType String @map("content_type") @db.VarChar(32) + sizeBytes Int @map("size_bytes") + sha256 String @db.Char(64) + status DirectUploadStatus @default(pending) + expiresAt DateTime @map("expires_at") @db.Timestamptz(3) + createdAt DateTime @default(now()) @map("created_at") @db.Timestamptz(3) + chat Chat @relation(fields: [chatId], references: [id], onDelete: Restrict) + owner User @relation(fields: [ownerId], references: [id], onDelete: Restrict) + + @@index([status, expiresAt]) + @@index([chatId]) + @@index([ownerId]) + @@map("direct_uploads") +} + +model MessageIdempotency { + userId String @map("user_id") @db.Uuid + chatId String @map("chat_id") @db.Uuid + key String @db.VarChar(128) + messageId String? @map("message_id") @db.Uuid + expiresAt DateTime @map("expires_at") @db.Timestamptz(3) + user User @relation(fields: [userId], references: [id], onDelete: Cascade) + chat Chat @relation(fields: [chatId], references: [id], onDelete: Cascade) + message Message? @relation(fields: [messageId], references: [id], onDelete: Cascade) + + @@id([userId, chatId, key]) + @@index([chatId]) + @@index([messageId]) + @@index([expiresAt]) + @@map("message_idempotency") +} diff --git a/scripts/restart.cmd b/scripts/restart.cmd new file mode 100644 index 00000000..1bc9b618 --- /dev/null +++ b/scripts/restart.cmd @@ -0,0 +1,10 @@ +@echo off +setlocal +if defined GIT_BASH goto run +set "GIT_BASH=%ProgramFiles%\Git\bin\bash.exe" +if exist "%GIT_BASH%" goto run +echo Git Bash was not found. Set GIT_BASH to the full path to bash.exe. 1>&2 +exit /b 2 +:run +"%GIT_BASH%" "%~dp0restart.sh" +exit /b %ERRORLEVEL% diff --git a/scripts/restart.sh b/scripts/restart.sh new file mode 100755 index 00000000..e4950302 --- /dev/null +++ b/scripts/restart.sh @@ -0,0 +1,23 @@ +#!/bin/sh +set -eu + +project_dir=$(CDPATH= cd -- "$(dirname -- "$0")/.." && pwd) +cd "$project_dir" + +for service in api nginx reconciler worker postgres redis s3 kafka; do + if [ -z "$(docker compose ps --all --quiet "$service")" ]; then + printf '%s\n' "Missing container for $service; start the Compose stack first." >&2 + exit 1 + fi +done + +replicas=$(docker compose ps --all --quiet api | wc -l | tr -d ' ') +if [ "$replicas" -lt 1 ]; then + printf 'No API replicas found.\n' >&2 + exit 1 +fi + +docker compose stop nginx reconciler api worker postgres redis s3 kafka +docker compose up --detach --no-recreate --no-build --no-deps --wait --wait-timeout 60 postgres redis s3 kafka +docker compose up --detach --no-recreate --no-build --no-deps --scale "api=$replicas" --wait --wait-timeout 45 api +docker compose up --detach --no-recreate --no-build --no-deps --wait --wait-timeout 30 nginx reconciler worker diff --git a/scripts/stop-one.cmd b/scripts/stop-one.cmd new file mode 100644 index 00000000..6f4710b8 --- /dev/null +++ b/scripts/stop-one.cmd @@ -0,0 +1,33 @@ +@echo off +setlocal EnableDelayedExpansion +cd /d "%~dp0.." +if not defined TARGET_INSTANCE_ID ( + echo TARGET_INSTANCE_ID is required 1>&2 + exit /b 2 +) +set "containers=" +for /f "delims=" %%C in ('docker compose ps --all --quiet api') do ( + set "containers=!containers! %%C" + set "candidate=%%C" + rem This Compose uses Docker's default hostname: the first 12 container-ID characters. + if "!candidate:~0,12!"=="%TARGET_INSTANCE_ID%" ( + docker stop --time 0 %%C >nul + if errorlevel 1 exit /b 1 + exit /b 0 + ) +) +if not defined containers ( + echo No API containers found 1>&2 + exit /b 2 +) +rem Fallback for explicitly configured hostnames, still scoped to this project's API containers. +for /f "tokens=1,2 delims=:" %%H in ('docker inspect --format "{{.Config.Hostname}}:{{.Id}}" !containers!') do ( + if "%%H"=="%TARGET_INSTANCE_ID%" ( + rem Failure injection: stop immediately, leaving time for recovery within the 10-second test budget. + docker stop --time 0 %%I >nul + if errorlevel 1 exit /b 1 + exit /b 0 + ) +) +echo No API container matches X-Instance-Id 1>&2 +exit /b 2 diff --git a/scripts/stop-one.sh b/scripts/stop-one.sh new file mode 100755 index 00000000..5bc06305 --- /dev/null +++ b/scripts/stop-one.sh @@ -0,0 +1,24 @@ +#!/bin/sh +set -eu + +project_dir=$(CDPATH= cd -- "$(dirname -- "$0")/.." && pwd) +cd "$project_dir" + +target=${TARGET_INSTANCE_ID:?test provides target API instance ID} + +containers=$(docker compose ps --all --quiet api) +if [ -z "$containers" ]; then + printf 'No API containers found\n' >&2 + exit 2 +fi +for entry in $(docker inspect --format '{{.Config.Hostname}}:{{.Id}}' $containers); do + instance=${entry%%:*} + container=${entry#*:} + if [ "$instance" = "$target" ]; then + docker stop --time 8 "$container" >/dev/null + exit 0 + fi +done + +printf 'No API container matches X-Instance-Id\n' >&2 +exit 2 diff --git a/src/.gitignore b/src/.gitignore new file mode 100644 index 00000000..9e0adcc1 --- /dev/null +++ b/src/.gitignore @@ -0,0 +1 @@ +/generated/ diff --git a/src/Attachment/attachment-capacity.ts b/src/Attachment/attachment-capacity.ts new file mode 100644 index 00000000..cda01f61 --- /dev/null +++ b/src/Attachment/attachment-capacity.ts @@ -0,0 +1,20 @@ +import type { Prisma } from '../generated/prisma/client'; +import { ApiException } from '../common/exceptions/api.exception'; + +const capacity = Number(process.env.ATTACHMENT_QUEUE_CAPACITY ?? 64); +if (!Number.isSafeInteger(capacity) || capacity < 1 || capacity > 10000) + throw new Error('ATTACHMENT_QUEUE_CAPACITY must be between 1 and 10000'); + +export async function hasAttachmentCapacity(tx: Prisma.TransactionClient) { + // All producers share the lock. The subsequent statement sees the last admission's commit. + await tx.$queryRaw`SELECT 1 FROM pg_advisory_xact_lock(hashtextextended('attachment-admission', 0))`; + const active = await tx.attachment.count({ + where: { status: { in: ['queued', 'processing'] } }, + }); + return active < capacity; +} + +export async function assertAttachmentCapacity(tx: Prisma.TransactionClient) { + if (!(await hasAttachmentCapacity(tx))) + throw new ApiException(429, 'rate_limited', 'Очередь вложений заполнена'); +} diff --git a/src/Attachment/attachment-kafka.ts b/src/Attachment/attachment-kafka.ts new file mode 100644 index 00000000..4be3d376 --- /dev/null +++ b/src/Attachment/attachment-kafka.ts @@ -0,0 +1,58 @@ +import { Kafka } from 'kafkajs'; +import { uuidPattern } from '../common/validation'; + +export const ATTACHMENT_TOPIC = 'attachments.process.v1'; +export const ATTACHMENT_GROUP = 'attachment-worker-v1'; + +export function attachmentKafka(clientId: string) { + return new Kafka({ + clientId, + brokers: (process.env.KAFKA_BROKERS ?? 'kafka:9092') + .split(',') + .map((broker) => broker.trim()), + connectionTimeout: 3000, + requestTimeout: 5000, + retry: { retries: 1 }, + }); +} + +export function firstJob(id: string, createdAt: Date, generation: number) { + return { + schema_version: 1, + job_id: id, + type: 'attachment.process.v1', + attachment_id: id, + pipeline_version: 1, + generation, + attempt: 1, + created_at: createdAt.toISOString(), + } as const; +} + +export function parseAttachmentJob(value: Buffer | null, key: Buffer | null) { + if (!value || !key) return null; + try { + const job = JSON.parse(value.toString()) as Partial< + ReturnType + > | null; + const generation = job?.generation === undefined ? 0 : job.generation; + if ( + job?.schema_version === 1 && + job.type === 'attachment.process.v1' && + job.pipeline_version === 1 && + job.attempt === 1 && + Number.isSafeInteger(generation) && + generation >= 0 && + generation <= 2147483647 && + typeof job.attachment_id === 'string' && + uuidPattern.test(job.attachment_id) && + job.job_id === job.attachment_id && + key.toString() === job.attachment_id + ) { + return { id: job.attachment_id, generation }; + } + } catch { + return null; + } + return null; +} diff --git a/src/Attachment/attachment-keys.ts b/src/Attachment/attachment-keys.ts new file mode 100644 index 00000000..33bf92ff --- /dev/null +++ b/src/Attachment/attachment-keys.ts @@ -0,0 +1,27 @@ +type AttachmentIdentity = { chatId: string; id: string }; + +export const CROP_SIZE = 128; +export const variantFormats = { + thumbnail: { extension: 'jpg', contentType: 'image/jpeg' }, + crop: { extension: 'jpg', contentType: 'image/jpeg' }, + optimized: { extension: 'webp', contentType: 'image/webp' }, +} as const; + +export type AttachmentVariantName = keyof typeof variantFormats; + +export function isAttachmentVariant( + value: unknown, +): value is AttachmentVariantName { + return typeof value === 'string' && Object.hasOwn(variantFormats, value); +} + +export function stagingKeyFor({ chatId, id }: AttachmentIdentity) { + return `staging/${chatId}/${id}`; +} + +export function variantKeyFor( + { chatId, id }: AttachmentIdentity, + name: AttachmentVariantName, +) { + return `variants/${chatId}/${id}/v1/${name}.${variantFormats[name].extension}`; +} diff --git a/src/Attachment/attachment-publisher.spec.ts b/src/Attachment/attachment-publisher.spec.ts new file mode 100644 index 00000000..dd6f39bf --- /dev/null +++ b/src/Attachment/attachment-publisher.spec.ts @@ -0,0 +1,77 @@ +import { randomUUID } from 'node:crypto'; +import type { PrismaService } from '../prisma/prisma.service'; +import { ATTACHMENT_TOPIC, firstJob } from './attachment-kafka'; +import { publishAttachmentOutboxBatch } from './attachment-publisher'; + +function fixture() { + const attachmentId = randomUUID(); + const createdAt = new Date('2026-11-24T10:00:00Z'); + const generation = 2; + const tx = { + $queryRaw: jest + .fn() + .mockResolvedValue([{ attachmentId, createdAt, generation }]), + $executeRaw: jest.fn(), + }; + const db = { + $transaction: jest.fn( + async (callback: (value: typeof tx) => Promise) => callback(tx), + ), + }; + const producer = { send: jest.fn().mockResolvedValue([]) }; + return { + attachmentId, + createdAt, + generation, + tx, + producer, + publish: () => + publishAttachmentOutboxBatch(db as unknown as PrismaService, producer), + }; +} + +describe('attachment outbox publisher', () => { + it('acknowledges the selected generation only after Kafka confirms', async () => { + const f = fixture(); + let acknowledge!: (value: []) => void; + const confirmation = new Promise<[]>((resolve) => { + acknowledge = resolve; + }); + f.producer.send.mockReturnValueOnce(confirmation); + const publishing = f.publish(); + await Promise.resolve(); + expect(f.producer.send).toHaveBeenCalledWith({ + topic: ATTACHMENT_TOPIC, + acks: -1, + timeout: 5000, + messages: [ + { + key: f.attachmentId, + value: JSON.stringify( + firstJob(f.attachmentId, f.createdAt, f.generation), + ), + }, + ], + }); + expect(f.tx.$executeRaw).not.toHaveBeenCalled(); + acknowledge([]); + await expect(publishing).resolves.toBe(true); + expect(f.tx.$executeRaw).toHaveBeenCalledWith( + expect.objectContaining({ + values: [f.attachmentId, f.generation], + }), + ); + }); + + it('leaves the job pending after broker failure and republishes the same record', async () => { + const f = fixture(); + f.producer.send.mockRejectedValueOnce(new Error('broker unavailable')); + await expect(f.publish()).rejects.toThrow('broker unavailable'); + expect(f.tx.$executeRaw).not.toHaveBeenCalled(); + await expect(f.publish()).resolves.toBe(true); + expect(f.producer.send.mock.calls[1]).toEqual( + f.producer.send.mock.calls[0], + ); + expect(f.tx.$executeRaw).toHaveBeenCalledTimes(1); + }); +}); diff --git a/src/Attachment/attachment-publisher.ts b/src/Attachment/attachment-publisher.ts new file mode 100644 index 00000000..0f98607d --- /dev/null +++ b/src/Attachment/attachment-publisher.ts @@ -0,0 +1,107 @@ +import { + Injectable, + Logger, + type OnApplicationBootstrap, + type OnModuleDestroy, +} from '@nestjs/common'; +import { setTimeout as delay } from 'node:timers/promises'; +import type { Producer } from 'kafkajs'; +import { Prisma } from '../generated/prisma/client'; +import { PrismaService } from '../prisma/prisma.service'; +import { + ATTACHMENT_TOPIC, + attachmentKafka, + firstJob, +} from './attachment-kafka'; + +export function publishAttachmentOutboxBatch( + db: PrismaService, + producer: Pick, +) { + return db.$transaction( + async (tx) => { + const jobs = await tx.$queryRaw< + { attachmentId: string; createdAt: Date; generation: number }[] + >` + SELECT attachment_id AS "attachmentId", generation, created_at AS "createdAt" + FROM attachment_outbox + ORDER BY created_at, attachment_id, generation + LIMIT 20 FOR UPDATE SKIP LOCKED + `; + if (!jobs.length) return false; + + await producer.send({ + topic: ATTACHMENT_TOPIC, + acks: -1, + timeout: 5000, + messages: jobs.map(({ attachmentId, createdAt, generation }) => ({ + key: attachmentId, + value: JSON.stringify(firstJob(attachmentId, createdAt, generation)), + })), + }); + + const keys = jobs.map( + ({ attachmentId, generation }) => + Prisma.sql`(${attachmentId}::uuid, ${generation}::integer)`, + ); + await tx.$executeRaw(Prisma.sql` + WITH published AS ( + DELETE FROM attachment_outbox + WHERE (attachment_id, generation) IN (${Prisma.join(keys)}) + RETURNING attachment_id, generation + ) + UPDATE attachments AS a SET published_at = now() + FROM published AS p + WHERE a.id = p.attachment_id AND a.generation = p.generation + `); + return true; + }, + { timeout: 20000 }, + ); +} + +@Injectable() +export class AttachmentPublisher + implements OnApplicationBootstrap, OnModuleDestroy +{ + private readonly logger = new Logger(AttachmentPublisher.name); + private readonly producer = attachmentKafka('attachment-api').producer({ + allowAutoTopicCreation: false, + }); + private readonly stop = new AbortController(); + private loop?: Promise; + private connected = false; + + constructor(private readonly db: PrismaService) {} + + onApplicationBootstrap() { + this.loop = this.publishPending(); + } + + async onModuleDestroy() { + this.stop.abort(); + await this.loop; + await this.producer.disconnect(); + } + + private async publishPending() { + while (!this.stop.signal.aborted) { + try { + if (!this.connected) { + await this.producer.connect(); + this.connected = true; + } + if (await publishAttachmentOutboxBatch(this.db, this.producer)) + continue; + } catch { + if (!this.stop.signal.aborted) + this.logger.warn( + 'Kafka publication deferred; attachment jobs remain in PostgreSQL', + ); + } + await delay(1000, undefined, { signal: this.stop.signal }).catch( + () => {}, + ); + } + } +} diff --git a/src/Attachment/attachment-replay.cli.ts b/src/Attachment/attachment-replay.cli.ts new file mode 100644 index 00000000..b6cfc418 --- /dev/null +++ b/src/Attachment/attachment-replay.cli.ts @@ -0,0 +1,56 @@ +import 'reflect-metadata'; +import { PrismaService } from '../prisma/prisma.service'; +import { StorageService } from '../Storage/storage.service'; +import { uuidPattern } from '../common/validation'; +import { listFailedAttachments, replayAttachment } from './attachment-replay'; + +async function main(args: string[]) { + const [command, id, requestId, operator] = args; + const list = command === 'list' && args.length === 1; + const replay = + command === 'replay' && + args.length === 4 && + uuidPattern.test(id) && + uuidPattern.test(requestId) && + operator.trim().length > 0 && + Array.from(operator).length <= 128; + if (!list && !replay) { + console.error( + 'Usage: attachment-replay.cli.js list | replay ', + ); + process.exitCode = 2; + return; + } + const db = new PrismaService(); + const storage = replay ? new StorageService() : undefined; + try { + await db.$connect(); + if (storage) { + const result = await replayAttachment( + db, + storage, + id.toLowerCase(), + requestId.toLowerCase(), + operator.trim(), + ); + console.log(JSON.stringify(result)); + if (result.status !== 'queued' && result.status !== 'ready') + process.exitCode = 2; + } else { + console.log(JSON.stringify(await listFailedAttachments(db))); + } + } finally { + storage?.onModuleDestroy(); + await db.$disconnect(); + } +} + +void main(process.argv.slice(2)).catch((error: unknown) => { + console.error( + JSON.stringify({ + event: 'attachment_operator_command_failed', + errorType: error instanceof Error ? error.name : 'UnknownError', + }), + ); + process.exitCode = 1; +}); diff --git a/src/Attachment/attachment-replay.spec.ts b/src/Attachment/attachment-replay.spec.ts new file mode 100644 index 00000000..ba54e60a --- /dev/null +++ b/src/Attachment/attachment-replay.spec.ts @@ -0,0 +1,115 @@ +import { randomUUID } from 'node:crypto'; +import type { Attachment } from '../generated/prisma/client'; +import type { PrismaService } from '../prisma/prisma.service'; +import type { StorageService } from '../Storage/storage.service'; +import { firstJob, parseAttachmentJob } from './attachment-kafka'; +import { replayAttachment } from './attachment-replay'; + +function fixture() { + const id = randomUUID(); + const requestId = randomUUID(); + const attachment = { + id, + chatId: randomUUID(), + status: 'failed', + failures: 5, + generation: 0, + errorCode: 'retry_exhausted', + replayUntil: new Date(Date.now() + 60000), + } satisfies Partial; + const tx = { + $executeRaw: jest.fn(), + $queryRaw: jest.fn().mockResolvedValue([{ locked: true }]), + attachment: { + count: jest.fn().mockResolvedValue(0), + findUnique: jest.fn(async () => ({ ...attachment })), + update: jest.fn(({ data }: { data: Partial }) => + Object.assign(attachment, data), + ), + }, + attachmentReplay: { + findUnique: jest.fn(), + create: jest.fn(({ data }: { data: object }) => { + tx.attachmentReplay.findUnique.mockResolvedValue(data); + }), + }, + }; + const db = { + attachment: tx.attachment, + $transaction: jest.fn(async (fn: (value: typeof tx) => Promise) => + fn(tx), + ), + }; + const storage = { stat: jest.fn().mockResolvedValue({ key: 'staged' }) }; + const replay = (operator = 'operator') => + replayAttachment( + db as unknown as PrismaService, + storage as unknown as StorageService, + id, + requestId, + operator, + ); + return { id, requestId, attachment, tx, storage, replay }; +} + +describe('attachment replay', () => { + it('requeues once and returns the audited result even after another failure', async () => { + const f = fixture(); + const result = { status: 'queued', generation: 1 }; + await expect(f.replay()).resolves.toEqual(result); + expect(f.attachment).toMatchObject({ + ...result, + failures: 0, + publishedAt: null, + nextAttemptAt: null, + }); + expect(f.tx.attachmentReplay.create).toHaveBeenCalledWith({ + data: { + attachmentId: f.id, + requestId: f.requestId, + generation: 1, + operator: 'operator', + errorCode: 'retry_exhausted', + failures: 5, + }, + }); + Object.assign(f.attachment, { status: 'failed', failures: 5 }); + await expect(f.replay()).resolves.toEqual(result); + await expect(f.replay('other')).resolves.toEqual({ + status: 'request_conflict', + }); + expect(f.tx.attachment.update).toHaveBeenCalledTimes(1); + expect(f.storage.stat).toHaveBeenCalledTimes(1); + }); + + it('leaves the attachment unchanged if replay expired, staging is absent or it is already ready', async () => { + const f = fixture(); + f.attachment.replayUntil = new Date(0); + await expect(f.replay()).resolves.toEqual({ status: 'replay_expired' }); + expect(f.storage.stat).not.toHaveBeenCalled(); + f.attachment.replayUntil = new Date(Date.now() + 60000); + f.storage.stat.mockResolvedValue(null); + await expect(f.replay()).resolves.toEqual({ status: 'source_missing' }); + Object.assign(f.attachment, { status: 'ready' }); + await expect(f.replay()).resolves.toEqual({ + status: 'ready', + generation: 0, + }); + expect(f.tx.attachment.update).not.toHaveBeenCalled(); + }); + + it('reads generation zero for pre-migration Kafka messages', () => { + const id = randomUUID(); + const { generation, ...legacy } = firstJob(id, new Date(), 2); + const key = Buffer.from(id); + expect( + parseAttachmentJob(Buffer.from(JSON.stringify(legacy)), key), + ).toEqual({ id, generation: 0 }); + expect( + parseAttachmentJob( + Buffer.from(JSON.stringify({ ...legacy, generation })), + key, + ), + ).toEqual({ id, generation: 2 }); + }); +}); diff --git a/src/Attachment/attachment-replay.ts b/src/Attachment/attachment-replay.ts new file mode 100644 index 00000000..67247f9a --- /dev/null +++ b/src/Attachment/attachment-replay.ts @@ -0,0 +1,92 @@ +import type { PrismaService } from '../prisma/prisma.service'; +import type { StorageService } from '../Storage/storage.service'; +import { stagingKeyFor } from './attachment-keys'; +import { hasAttachmentCapacity } from './attachment-capacity'; +import { OBJECT_TRANSACTION, tryAttachmentObjectLock } from './object-lock'; + +export const FAILED_STAGING_RETENTION_MS = 24 * 60 * 60 * 1000; + +export function listFailedAttachments(db: PrismaService) { + return db.attachment.findMany({ + where: { status: 'failed' }, + orderBy: [{ failedAt: 'desc' }, { id: 'desc' }], + take: 100, + select: { + id: true, + generation: true, + failures: true, + errorCode: true, + failedAt: true, + replayUntil: true, + }, + }); +} + +export async function replayAttachment( + db: PrismaService, + storage: StorageService, + id: string, + requestId: string, + operator: string, +) { + const identity = await db.attachment.findUnique({ + where: { id }, + select: { id: true, chatId: true }, + }); + if (!identity) return { status: 'not_found' } as const; + const stagingKey = stagingKeyFor(identity); + return db.$transaction(async (tx) => { + // The reconciler takes this same lock before deleting the source. + if (!(await tryAttachmentObjectLock(tx, stagingKey))) + return { status: 'busy' } as const; + + const previous = await tx.attachmentReplay.findUnique({ + where: { attachmentId_requestId: { attachmentId: id, requestId } }, + }); + if (previous) { + if (previous.operator !== operator) + return { status: 'request_conflict' } as const; + return { status: 'queued', generation: previous.generation } as const; + } + + const attachment = await tx.attachment.findUnique({ where: { id } }); + if (!attachment) return { status: 'not_found' } as const; + if (attachment.status === 'ready') + return { status: 'ready', generation: attachment.generation } as const; + if (attachment.status !== 'failed') + return { status: 'not_failed' } as const; + if (!attachment.replayUntil || attachment.replayUntil <= new Date()) + return { status: 'replay_expired' } as const; + if (!(await storage.stat(stagingKey))) + return { status: 'source_missing' } as const; + if (!(await hasAttachmentCapacity(tx))) + return { status: 'busy' } as const; + + const generation = attachment.generation + 1; + await tx.attachment.update({ + where: { id, status: 'failed', generation: attachment.generation }, + data: { + generation, + status: 'queued', + failures: 0, + errorCode: null, + failedAt: null, + replayUntil: null, + nextAttemptAt: null, + leaseUntil: null, + publishedAt: null, + }, + }); + await tx.attachmentReplay.create({ + data: { + attachmentId: id, + requestId, + operator, + generation, + errorCode: attachment.errorCode, + failures: attachment.failures, + }, + }); + return { status: 'queued', generation } as const; + }, OBJECT_TRANSACTION); +} diff --git a/src/Attachment/attachment-worker.spec.ts b/src/Attachment/attachment-worker.spec.ts new file mode 100644 index 00000000..aebec9a5 --- /dev/null +++ b/src/Attachment/attachment-worker.spec.ts @@ -0,0 +1,292 @@ +import { createHash, randomUUID } from 'node:crypto'; +import { statSync } from 'node:fs'; +import { copyFile, readFile, writeFile } from 'node:fs/promises'; +import { join } from 'node:path'; +import sharp from 'sharp'; +import type { Attachment } from '../generated/prisma/client'; +import type { PrismaService } from '../prisma/prisma.service'; +import type { StorageService } from '../Storage/storage.service'; +import { ApiException } from '../common/exceptions/api.exception'; +import { + AttachmentAttemptTimeout, + AttachmentWorker, +} from './attachment-worker'; + +const sample = join(__dirname, '../../tests/fixtures/sample.png'); + +function fixture(input?: Buffer, timeoutMs?: number) { + const id = randomUUID(); + const chatId = randomUUID(); + const attachment: Partial = { + id, + chatId, + status: 'queued', + generation: 0, + failures: 0, + sizeBytes: input?.length ?? statSync(sample).size, + objectKey: `originals/${chatId}/${id}`, + }; + const db = { + attachment: { + findUnique: jest.fn().mockResolvedValue(attachment), + updateMany: jest.fn(async ({ data }: { data: Partial }) => { + Object.assign(attachment, data); + return { count: 1 }; + }), + }, + }; + const storage = { + inspectToFile: jest.fn( + async ( + _key: string, + target: string, + _expected?: unknown, + _signal?: AbortSignal, + ) => { + if (input) await writeFile(target, input); + else await copyFile(sample, target); + return '"etag"'; + }, + ), + publishCopy: jest.fn(), + put: jest.fn(), + }; + const worker = new AttachmentWorker( + db as unknown as PrismaService, + storage as unknown as StorageService, + timeoutMs, + ); + const process = (generation = 0, signal = new AbortController().signal) => + worker.process({ id, generation }, async () => {}, signal); + return { attachment, storage, process, id, chatId }; +} + +describe('attachment worker', () => { + it('publishes all variants and their metadata and ignores redelivery', async () => { + const f = fixture(); + await expect(f.process()).resolves.toBe(true); + const [ + [key, jpeg, type], + [cropKey, crop, cropType], + [optimizedKey, webp, optimizedType], + ] = f.storage.put.mock.calls; + expect(key).toBe(`variants/${f.chatId}/${f.id}/v1/thumbnail.jpg`); + expect(type).toBe('image/jpeg'); + expect(await sharp(jpeg).metadata()).toMatchObject({ + format: 'jpeg', + width: 256, + height: 160, + }); + expect(cropKey).toBe(`variants/${f.chatId}/${f.id}/v1/crop.jpg`); + expect(cropType).toBe('image/jpeg'); + expect(await sharp(crop).metadata()).toMatchObject({ + format: 'jpeg', + width: 128, + height: 128, + }); + expect(optimizedKey).toBe(`variants/${f.chatId}/${f.id}/v1/optimized.webp`); + expect(optimizedType).toBe('image/webp'); + expect(await sharp(webp).metadata()).toMatchObject({ + format: 'webp', + width: 320, + height: 200, + }); + expect(f.storage.publishCopy).toHaveBeenCalledWith( + `staging/${f.chatId}/${f.id}`, + f.attachment.objectKey, + '"etag"', + expect.any(AbortSignal), + ); + expect(f.attachment).toMatchObject({ + status: 'ready', + thumbnailWidth: 256, + thumbnailHeight: 160, + thumbnailSize: jpeg.length, + thumbnailSha256: createHash('sha256').update(jpeg).digest('hex'), + cropSize: crop.length, + cropSha256: createHash('sha256').update(crop).digest('hex'), + optimizedSize: webp.length, + optimizedWidth: 320, + optimizedHeight: 200, + optimizedSha256: createHash('sha256').update(webp).digest('hex'), + }); + expect(jpeg).not.toEqual(await readFile(sample)); + await expect(f.process()).resolves.toBe(true); + expect(f.storage.put).toHaveBeenCalledTimes(3); + }); + + it('centers the crop and applies EXIF orientation to the bounded WebP', async () => { + const input = await sharp({ + create: { width: 1600, height: 800, channels: 3, background: '#0000ff' }, + }) + .composite([ + { + input: { + create: { + width: 800, + height: 800, + channels: 3, + background: '#00ff00', + }, + }, + left: 400, + top: 0, + }, + ]) + .withMetadata({ orientation: 6 }) + .jpeg() + .toBuffer(); + expect((await sharp(input).metadata()).orientation).toBe(6); + const f = fixture(input); + await expect(f.process()).resolves.toBe(true); + const crop = f.storage.put.mock.calls[1][1]; + const webp = f.storage.put.mock.calls[2][1]; + const { channels } = await sharp(crop).stats(); + expect(channels[1].mean).toBeGreaterThan(240); + expect(channels[2].mean).toBeLessThan(15); + const metadata = await sharp(webp).metadata(); + expect(metadata).toMatchObject({ + format: 'webp', + width: 640, + height: 1280, + }); + expect(metadata.exif).toBeUndefined(); + }); + + it('keeps the attachment queued if the final variant write fails', async () => { + const f = fixture(); + const stop = new AbortController(); + f.storage.put.mockImplementation((key) => { + if (key.endsWith('/optimized.webp')) { + stop.abort(); + throw new Error('temporary storage error'); + } + }); + await expect(f.process(0, stop.signal)).resolves.toBe(false); + expect(f.attachment).toMatchObject({ status: 'queued', failures: 1 }); + expect(f.attachment.optimizedSha256).toBeUndefined(); + expect(f.storage.publishCopy).not.toHaveBeenCalled(); + }); + + it('commits failed metadata for invalid staged data without publishing effects', async () => { + const f = fixture(); + f.storage.inspectToFile.mockRejectedValue( + new ApiException(400, 'invalid_request', 'Checksum mismatch'), + ); + await expect(f.process()).resolves.toBe(true); + expect(f.attachment).toMatchObject({ + status: 'failed', + errorCode: 'invalid_image', + nextAttemptAt: null, + failedAt: expect.any(Date), + replayUntil: expect.any(Date), + }); + expect(f.storage.publishCopy).not.toHaveBeenCalled(); + }); + + it('persists a jittered retry deadline and respects it on redelivery', async () => { + const f = fixture(); + f.attachment.failures = 2; + const stop = new AbortController(); + f.storage.inspectToFile.mockImplementationOnce(async () => { + stop.abort(); + throw new Error('temporary storage error'); + }); + const random = jest.spyOn(Math, 'random').mockReturnValue(0.5); + const before = Date.now(); + try { + await expect(f.process(0, stop.signal)).resolves.toBe(false); + } finally { + random.mockRestore(); + } + expect(f.attachment).toMatchObject({ + status: 'queued', + failures: 3, + errorCode: 'processing_error', + failedAt: null, + }); + const deadline = f.attachment.nextAttemptAt!.getTime(); + expect(deadline).toBeGreaterThanOrEqual(before + 2000); + expect(deadline).toBeLessThanOrEqual(Date.now() + 2000); + f.attachment.nextAttemptAt = new Date(Date.now() + 30000); + const redelivery = new AbortController(); + const pending = f.process(0, redelivery.signal); + redelivery.abort(); + await expect(pending).resolves.toBe(false); + expect(f.storage.inspectToFile).toHaveBeenCalledTimes(1); + }); + + it('ignores Kafka jobs from an earlier replay generation', async () => { + const f = fixture(); + f.attachment.generation = 1; + await expect(f.process()).resolves.toBe(true); + expect(f.storage.inspectToFile).not.toHaveBeenCalled(); + await expect(f.process(1)).resolves.toBe(true); + expect(f.storage.inspectToFile).toHaveBeenCalledTimes(1); + }); + + it('rejects oversized staged metadata before downloading from S3', async () => { + const f = fixture(); + f.attachment.sizeBytes = 10485761; + await expect(f.process()).resolves.toBe(true); + expect(f.attachment).toMatchObject({ + status: 'failed', + errorCode: 'invalid_image', + }); + expect(f.storage.inspectToFile).not.toHaveBeenCalled(); + }); + + it('aborts a stalled operation and records the timeout before requesting worker restart', async () => { + jest.useFakeTimers({ doNotFake: ['nextTick', 'setImmediate'] }); + try { + const f = fixture(undefined, 50); + let onRead!: (signal: AbortSignal) => void; + const reading = new Promise((resolve) => { + onRead = resolve; + }); + f.storage.inspectToFile.mockImplementation( + async (_key, _target, _expected, signal) => { + onRead(signal!); + return new Promise((resolve) => { + signal!.addEventListener('abort', () => resolve('"late-etag"'), { + once: true, + }); + }); + }, + ); + const finished = expect(f.process()).rejects.toBeInstanceOf( + AttachmentAttemptTimeout, + ); + const signal = await reading; + await jest.advanceTimersByTimeAsync(50); + await finished; + expect(signal.aborted).toBe(true); + expect(f.attachment).toMatchObject({ + status: 'queued', + failures: 1, + errorCode: 'processing_timeout', + }); + expect(f.attachment.nextAttemptAt).toBeInstanceOf(Date); + expect(f.storage.put).not.toHaveBeenCalled(); + expect(f.storage.publishCopy).not.toHaveBeenCalled(); + } finally { + jest.useRealTimers(); + } + }); + + it('counts a lost worker lease against the attempt budget', async () => { + const f = fixture(); + Object.assign(f.attachment, { + status: 'processing', + leaseUntil: new Date(0), + failures: 19, + }); + await expect(f.process()).resolves.toBe(true); + expect(f.attachment).toMatchObject({ + status: 'failed', + failures: 20, + errorCode: 'worker_interrupted', + }); + expect(f.storage.inspectToFile).not.toHaveBeenCalled(); + }); +}); diff --git a/src/Attachment/attachment-worker.ts b/src/Attachment/attachment-worker.ts new file mode 100644 index 00000000..f2b21e9f --- /dev/null +++ b/src/Attachment/attachment-worker.ts @@ -0,0 +1,356 @@ +import { createHash } from 'node:crypto'; +import { mkdtemp, rm } from 'node:fs/promises'; +import { tmpdir } from 'node:os'; +import { join } from 'node:path'; +import { setTimeout as delay } from 'node:timers/promises'; +import sharp from 'sharp'; +import type { Attachment } from '../generated/prisma/client'; +import { PrismaService } from '../prisma/prisma.service'; +import { StorageService } from '../Storage/storage.service'; +import { ApiException } from '../common/exceptions/api.exception'; +import { + CROP_SIZE, + stagingKeyFor, + variantFormats, + variantKeyFor, + type AttachmentVariantName, +} from './attachment-keys'; +import { MAX_IMAGE_PIXELS, MAX_UPLOAD_BYTES } from './attachment.service'; +import { FAILED_STAGING_RETENTION_MS } from './attachment-replay'; + +const HEARTBEAT_POLL_MS = 1000; +const RETRY_BASE_MS = 1000; +const RETRY_CAP_MS = 30000; +const LEASE_MS = 120000; +const MAX_JOB_TIMEOUT_MS = 100000; + +export class AttachmentAttemptTimeout extends Error {} + +function fitWithin( + { width, height }: { width: number; height: number }, + bound: number, +) { + const longSide = Math.max(width, height); + if (longSide <= bound) return { width, height }; + return { + width: Math.max(1, Math.floor((width * bound) / longSide)), + height: Math.max(1, Math.floor((height * bound) / longSide)), + }; +} + +export class AttachmentWorker { + private readonly maxAttempts = Number(process.env.JOB_MAX_ATTEMPTS ?? 5); + + constructor( + private readonly db: PrismaService, + private readonly storage: StorageService, + private readonly timeoutMs = Number(process.env.JOB_TIMEOUT_SECONDS ?? 60) * + 1000, + ) { + if ( + !Number.isSafeInteger(this.maxAttempts) || + this.maxAttempts < 1 || + this.maxAttempts > 20 + ) + throw new Error('JOB_MAX_ATTEMPTS must be between 1 and 20'); + if ( + !Number.isSafeInteger(this.timeoutMs) || + this.timeoutMs < 1 || + this.timeoutMs > MAX_JOB_TIMEOUT_MS + ) + throw new Error( + 'JOB_TIMEOUT_SECONDS must be greater than 0 and at most 100', + ); + } + + async process( + { id, generation }: { id: string; generation: number }, + heartbeat: () => Promise, + signal: AbortSignal, + ) { + while (!signal.aborted) { + const attachment = await this.db.attachment.findUnique({ where: { id } }); + if ( + !attachment || + attachment.generation !== generation || + attachment.status === 'ready' || + attachment.status === 'failed' + ) + return true; + + const now = new Date(); + const dueAt = + attachment.status === 'processing' + ? attachment.leaseUntil + : attachment.nextAttemptAt; + const waitMs = dueAt ? dueAt.getTime() - now.getTime() : 0; + if (waitMs > 0) { + await heartbeat(); + await delay(Math.min(waitMs, HEARTBEAT_POLL_MS), undefined, { + signal, + }).catch(() => {}); + continue; + } + if (attachment.status === 'processing') { + if (await this.recordFailure(attachment, 'worker_interrupted')) + return true; + await heartbeat(); + continue; + } + const leaseUntil = new Date(now.getTime() + LEASE_MS); + const claim = await this.db.attachment.updateMany({ + where: { + id, + generation, + status: 'queued', + failures: attachment.failures, + OR: [{ nextAttemptAt: null }, { nextAttemptAt: { lte: now } }], + }, + data: { status: 'processing', leaseUntil, nextAttemptAt: null }, + }); + if (claim.count) { + const completed = await this.runAttempt( + { ...attachment, leaseUntil }, + heartbeat, + ); + if (completed) return true; + } + await heartbeat(); + if (!claim.count) + await delay(HEARTBEAT_POLL_MS, undefined, { signal }).catch(() => {}); + } + return false; + } + + private async runAttempt( + attachment: Attachment, + heartbeat: () => Promise, + ) { + const deadline = new AbortController(); + const expiresAt = performance.now() + this.timeoutMs; + const timeoutError = new AttachmentAttemptTimeout( + 'Attachment attempt exceeded its deadline', + ); + let timer: NodeJS.Timeout | undefined; + const timeout = new Promise((_, reject) => { + timer = setTimeout(() => { + reject(timeoutError); + deadline.abort(timeoutError); + }, this.timeoutMs); + }); + let variants: Awaited>; + try { + const operation = this.publishObjects(attachment, deadline.signal).then( + async (published) => { + deadline.signal.throwIfAborted(); + await heartbeat(); + if (performance.now() >= expiresAt) { + deadline.abort(timeoutError); + throw timeoutError; + } + return published; + }, + ); + variants = await Promise.race([timeout, operation]).finally(() => + clearTimeout(timer), + ); + } catch (cause) { + const invalid = + cause instanceof ApiException && + [400, 413, 415].includes(cause.getStatus()); + const reason = deadline.signal.aborted + ? 'processing_timeout' + : invalid + ? 'invalid_image' + : 'processing_error'; + try { + return await this.recordFailure(attachment, reason); + } finally { + // A native encoder can still be running after the JavaScript deadline. + deadline.signal.throwIfAborted(); + } + } + // The lease fences stale attempts; repeat writes under the same keys contain the same bytes. + const result = await this.db.attachment.updateMany({ + where: this.claimedAttachment(attachment), + data: { + status: 'ready', + errorCode: null, + leaseUntil: null, + ...variants, + }, + }); + return result.count === 1; + } + + private claimedAttachment(attachment: Attachment) { + return { + id: attachment.id, + generation: attachment.generation, + status: 'processing' as const, + leaseUntil: attachment.leaseUntil, + }; + } + + private async recordFailure(attachment: Attachment, reason: string) { + const failures = attachment.failures + 1; + const terminal = reason === 'invalid_image' || failures >= this.maxAttempts; + const now = new Date(); + const delayLimit = Math.min( + RETRY_CAP_MS, + RETRY_BASE_MS * 2 ** (failures - 1), + ); + const nextAttemptAt = terminal + ? null + : new Date(now.getTime() + Math.floor(Math.random() * (delayLimit + 1))); + const errorCode = + terminal && reason === 'processing_error' ? 'retry_exhausted' : reason; + const result = await this.db.attachment.updateMany({ + where: this.claimedAttachment(attachment), + data: { + status: terminal ? 'failed' : 'queued', + failures, + errorCode, + nextAttemptAt, + failedAt: terminal ? now : null, + replayUntil: terminal + ? new Date(now.getTime() + FAILED_STAGING_RETENTION_MS) + : null, + leaseUntil: null, + }, + }); + if (result.count) + console.warn('Attachment processing attempt failed', { + attachmentId: attachment.id, + generation: attachment.generation, + attempt: failures, + errorCode, + nextAttemptAt, + }); + return result.count === 1 && terminal; + } + + private async publishObjects(attachment: Attachment, signal: AbortSignal) { + if ( + !Number.isSafeInteger(attachment.sizeBytes) || + attachment.sizeBytes <= 0 || + attachment.sizeBytes > MAX_UPLOAD_BYTES + ) + throw new ApiException( + 413, + 'payload_too_large', + 'Размер файла вне допустимого диапазона', + ); + const dir = await mkdtemp(join(tmpdir(), 'attachment-worker-')); + const file = join(dir, 'original'); + const staging = stagingKeyFor(attachment); + try { + signal.throwIfAborted(); + const etag = await this.storage.inspectToFile( + staging, + file, + attachment, + signal, + ); + signal.throwIfAborted(); + const image = sharp(file, { + limitInputPixels: MAX_IMAGE_PIXELS, + failOn: 'warning', + }); + const { autoOrient: oriented } = await image.metadata(); + const { width, height } = oriented; + const thumbnailDimensions = fitWithin(oriented, 256); + const optimizedDimensions = fitWithin(oriented, 1280); + const square = Math.min(width, height); + + const thumbnail = await this.storeVariant( + attachment, + 'thumbnail', + signal, + image + .clone() + .autoOrient() + .resize(thumbnailDimensions.width, thumbnailDimensions.height, { + fit: 'fill', + }) + .flatten({ background: '#ffffff' }) + .jpeg({ quality: 85 }), + ); + // Crop at input resolution so even a very wide image only scales a square. + const crop = await this.storeVariant( + attachment, + 'crop', + signal, + image + .clone() + .autoOrient() + .extract({ + left: Math.floor((width - square) / 2), + top: Math.floor((height - square) / 2), + width: square, + height: square, + }) + .resize(CROP_SIZE, CROP_SIZE) + .flatten({ background: '#ffffff' }) + .jpeg({ quality: 85 }), + ); + const optimized = await this.storeVariant( + attachment, + 'optimized', + signal, + image + .clone() + .autoOrient() + .resize(optimizedDimensions.width, optimizedDimensions.height, { + fit: 'fill', + }) + .webp({ quality: 80, effort: 4 }), + ); + signal.throwIfAborted(); + await this.storage.publishCopy( + staging, + attachment.objectKey, + etag, + signal, + ); + signal.throwIfAborted(); + return { + thumbnailSize: thumbnail.size, + thumbnailWidth: thumbnailDimensions.width, + thumbnailHeight: thumbnailDimensions.height, + thumbnailSha256: thumbnail.sha256, + cropSize: crop.size, + cropSha256: crop.sha256, + optimizedSize: optimized.size, + optimizedWidth: optimizedDimensions.width, + optimizedHeight: optimizedDimensions.height, + optimizedSha256: optimized.sha256, + }; + } finally { + await rm(dir, { recursive: true, force: true }).catch(() => { + console.warn('Attachment worker temporary file cleanup failed'); + }); + } + } + + private async storeVariant( + attachment: Attachment, + name: AttachmentVariantName, + signal: AbortSignal, + image: sharp.Sharp, + ) { + signal.throwIfAborted(); + const bytes = await image.timeout({ seconds: 15 }).toBuffer(); + signal.throwIfAborted(); + await this.storage.put( + variantKeyFor(attachment, name), + bytes, + variantFormats[name].contentType, + signal, + ); + return { + size: bytes.length, + sha256: createHash('sha256').update(bytes).digest('hex'), + }; + } +} diff --git a/src/Attachment/attachment.controller.ts b/src/Attachment/attachment.controller.ts new file mode 100644 index 00000000..8b011dcd --- /dev/null +++ b/src/Attachment/attachment.controller.ts @@ -0,0 +1,86 @@ +import { + Body, + Controller, + Get, + Headers, + HttpCode, + Param, + Post, + Query, + Req, + StreamableFile, + UseGuards, +} from '@nestjs/common'; +import { + ApiBearerAuth, + ApiBody, + ApiConsumes, + ApiOperation, + ApiQuery, + ApiTags, +} from '@nestjs/swagger'; +import { UserGuard, type AuthenticatedRequest } from '../User/user.guard'; +import { AttachmentService } from './attachment.service'; + +@ApiTags('attachments') +@ApiBearerAuth('bearerAuth') +@UseGuards(UserGuard) +@Controller('api/v1') +export class AttachmentController { + constructor(private readonly attachments: AttachmentService) {} + + @Post('chats/:chat_id/attachments') + @HttpCode(202) + @ApiOperation({ operationId: 'uploadAttachment' }) + @ApiConsumes('image/png', 'image/jpeg') + @ApiBody({ schema: { type: 'string', format: 'binary' } }) + @ApiQuery({ name: 'filename', required: true, type: String }) + upload( + @Req() request: AuthenticatedRequest, + @Param('chat_id') chatId: string, + @Query('filename') filename: unknown, + @Headers('content-type') contentType: unknown, + @Body() body: unknown, + ) { + return this.attachments.upload( + chatId, + request.currentUser.id, + filename, + contentType, + body, + ); + } + + @Get('attachments/:attachment_id') + @ApiOperation({ operationId: 'getAttachment' }) + get( + @Req() request: AuthenticatedRequest, + @Param('attachment_id') id: string, + ) { + return this.attachments.get(id, request.currentUser.id); + } + + @Get('attachments/:attachment_id/content') + @ApiOperation({ operationId: 'downloadAttachment' }) + @ApiQuery({ + name: 'variant', + required: false, + enum: ['original', 'thumbnail', 'crop', 'optimized'], + }) + async content( + @Req() request: AuthenticatedRequest, + @Param('attachment_id') id: string, + @Query('variant') variant: unknown, + ) { + const { attachment, stream } = await this.attachments.content( + id, + request.currentUser.id, + variant, + ); + return new StreamableFile(stream, { + type: attachment.contentType, + length: attachment.sizeBytes, + disposition: `attachment; filename*=UTF-8''${encodeURIComponent(attachment.filename).replace(/['()*]/g, (c) => `%${c.charCodeAt(0).toString(16).toUpperCase()}`)}`, + }); + } +} diff --git a/src/Attachment/attachment.module.ts b/src/Attachment/attachment.module.ts new file mode 100644 index 00000000..1416b6da --- /dev/null +++ b/src/Attachment/attachment.module.ts @@ -0,0 +1,15 @@ +import { Module } from '@nestjs/common'; +import { UserModule } from '../User/user.module'; +import { StorageModule } from '../Storage/storage.module'; +import { AttachmentController } from './attachment.controller'; +import { AttachmentService } from './attachment.service'; +import { DirectUploadController } from './direct-upload.controller'; +import { DirectUploadService } from './direct-upload.service'; +import { AttachmentPublisher } from './attachment-publisher'; + +@Module({ + imports: [UserModule, StorageModule], + controllers: [AttachmentController, DirectUploadController], + providers: [AttachmentService, DirectUploadService, AttachmentPublisher], +}) +export class AttachmentModule {} diff --git a/src/Attachment/attachment.service.spec.ts b/src/Attachment/attachment.service.spec.ts new file mode 100644 index 00000000..02b3c92f --- /dev/null +++ b/src/Attachment/attachment.service.spec.ts @@ -0,0 +1,181 @@ +import { readFileSync } from 'node:fs'; +import { join } from 'node:path'; +import { Readable } from 'node:stream'; +import type { PrismaService } from '../prisma/prisma.service'; +import type { StorageService } from '../Storage/storage.service'; +import { AttachmentService } from './attachment.service'; + +const chatId = '11111111-1111-4111-8111-111111111111'; +const userId = '22222222-2222-4222-8222-222222222222'; +const attachmentId = '33333333-3333-4333-8333-333333333333'; +const png = readFileSync(join(__dirname, '../../tests/fixtures/sample.png')); + +function fixture() { + const stored = { + id: attachmentId, + chatId, + ownerId: userId, + objectKey: 'stored-key', + filename: 'test.png', + contentType: 'image/png', + sizeBytes: png.length, + sha256: 'checksum', + createdAt: new Date(), + updatedAt: new Date(), + }; + const tx = { + $executeRaw: jest.fn().mockResolvedValue(0), + $queryRaw: jest.fn().mockResolvedValue([{ locked: true }]), + attachment: { + count: jest.fn().mockResolvedValue(0), + create: jest.fn().mockResolvedValue(stored), + findUnique: jest.fn().mockResolvedValue(null), + }, + }; + const prisma = { + chatMember: { findUnique: jest.fn().mockResolvedValue({ chatId }) }, + attachment: { findFirst: jest.fn() }, + $transaction: jest.fn( + async (callback: (value: typeof tx) => Promise) => callback(tx), + ), + }; + const storage = { + get: jest.fn().mockResolvedValue(Readable.from(png)), + put: jest.fn().mockResolvedValue(undefined), + remove: jest.fn().mockResolvedValue(undefined), + }; + const service = new AttachmentService( + prisma as unknown as PrismaService, + storage as unknown as StorageService, + ); + return { + stored, + tx, + prisma, + storage, + service, + upload: () => service.upload(chatId, userId, 'test.png', 'image/png', png), + }; +} + +describe('upload compensation', () => { + it('rejects an upload at queue capacity and removes the unadmitted staging object', async () => { + const f = fixture(); + f.tx.attachment.count.mockResolvedValue(10000); + await expect(f.upload()).rejects.toMatchObject({ status: 429 }); + expect(f.tx.attachment.create).not.toHaveBeenCalled(); + expect(f.storage.remove).toHaveBeenCalledTimes(1); + }); + + it('compensates a PUT whose acknowledgement was lost before metadata creation', async () => { + const f = fixture(); + f.storage.put.mockRejectedValue(new Error('uncertain PUT')); + await expect(f.upload()).rejects.toThrow('uncertain PUT'); + expect(f.tx.attachment.create).not.toHaveBeenCalled(); + expect(f.storage.remove).toHaveBeenCalledTimes(1); + }); + + it('removes bytes after a confirmed metadata failure', async () => { + const f = fixture(); + f.tx.attachment.create.mockRejectedValue(new Error('metadata failure')); + await expect(f.upload()).rejects.toThrow('metadata failure'); + expect(f.storage.remove).toHaveBeenCalledTimes(1); + }); + + it('preserves a committed attachment if the transaction acknowledgement was lost', async () => { + const f = fixture(); + f.prisma.$transaction.mockImplementationOnce(async (callback) => { + await callback(f.tx); + throw new Error('lost commit acknowledgement'); + }); + f.tx.attachment.findUnique.mockResolvedValue(f.stored); + await expect(f.upload()).resolves.toMatchObject({ + id: f.stored.id, + status: 'queued', + }); + expect(f.storage.remove).not.toHaveBeenCalled(); + }); +}); + +describe('attachment variants', () => { + it('reports and serves the crop and optimized variants of a ready attachment', async () => { + const f = fixture(); + f.prisma.attachment.findFirst.mockResolvedValue({ + ...f.stored, + status: 'ready', + cropSize: 42, + cropSha256: 'crop-hash', + optimizedSize: 128, + optimizedWidth: 320, + optimizedHeight: 200, + optimizedSha256: 'webp-hash', + }); + const metadata = await f.service.get(attachmentId, userId); + expect(metadata.variants).toEqual([ + { + name: 'crop', + content_type: 'image/jpeg', + size_bytes: 42, + width: 128, + height: 128, + sha256: 'crop-hash', + }, + { + name: 'optimized', + content_type: 'image/webp', + size_bytes: 128, + width: 320, + height: 200, + sha256: 'webp-hash', + }, + ]); + await expect( + f.service.content(attachmentId, userId, 'crop'), + ).resolves.toMatchObject({ + attachment: { + filename: 'test.png.crop.jpg', + contentType: 'image/jpeg', + sizeBytes: 42, + }, + }); + await expect( + f.service.content(attachmentId, userId, 'optimized'), + ).resolves.toMatchObject({ + attachment: { + filename: 'test.png.optimized.webp', + contentType: 'image/webp', + sizeBytes: 128, + }, + }); + expect(f.storage.get.mock.calls).toEqual([ + [`variants/${chatId}/${attachmentId}/v1/crop.jpg`], + [`variants/${chatId}/${attachmentId}/v1/optimized.webp`], + ]); + }); + + it('distinguishes unavailable content from variants missing on older ready attachments', async () => { + const f = fixture(); + f.prisma.attachment.findFirst.mockResolvedValueOnce({ + ...f.stored, + status: 'processing', + }); + await expect( + f.service.content(attachmentId, userId, 'optimized'), + ).rejects.toMatchObject({ status: 409 }); + f.prisma.attachment.findFirst.mockResolvedValue({ + ...f.stored, + status: 'ready', + cropSize: null, + optimizedSize: null, + }); + await expect( + f.service.content(attachmentId, userId, 'optimized'), + ).rejects.toMatchObject({ status: 404 }); + await expect( + f.service.content(attachmentId, userId, undefined), + ).resolves.toMatchObject({ + attachment: { contentType: 'image/png' }, + }); + expect(f.storage.get.mock.calls).toEqual([[f.stored.objectKey]]); + }); +}); diff --git a/src/Attachment/attachment.service.ts b/src/Attachment/attachment.service.ts new file mode 100644 index 00000000..7bb12dd0 --- /dev/null +++ b/src/Attachment/attachment.service.ts @@ -0,0 +1,314 @@ +import { Injectable, Logger } from '@nestjs/common'; +import { createHash, randomUUID } from 'node:crypto'; +import sharp from 'sharp'; +import type { Attachment } from '../generated/prisma/client'; +import { PrismaService } from '../prisma/prisma.service'; +import { StorageService } from '../Storage/storage.service'; +import { ApiException } from '../common/exceptions/api.exception'; +import { invalidRequest, uuid } from '../common/validation'; +import { OBJECT_TRANSACTION, tryAttachmentObjectLock } from './object-lock'; +import { + CROP_SIZE, + isAttachmentVariant, + stagingKeyFor, + variantFormats, + variantKeyFor, +} from './attachment-keys'; +import { profileStage } from '../common/http/upload-memory-profile'; +import { assertAttachmentCapacity } from './attachment-capacity'; + +function limit(name: string, maximum: number): number { + const value = Number(process.env[name] ?? maximum); + if (!Number.isSafeInteger(value) || value < 1 || value > maximum) { + throw new Error(`${name} must be between 1 and ${maximum}`); + } + return value; +} + +export const MAX_UPLOAD_BYTES = limit('MAX_UPLOAD_BYTES', 10485760); +export const MAX_IMAGE_PIXELS = limit('MAX_IMAGE_PIXELS', 40000000); + +@Injectable() +export class AttachmentService { + private readonly logger = new Logger(AttachmentService.name); + + constructor( + private readonly prisma: PrismaService, + private readonly storage: StorageService, + ) {} + + async upload( + chatValue: unknown, + userId: string, + filename: unknown, + mime: unknown, + body: unknown, + ) { + profileStage('authorize_and_validate_fields'); + const chatId = uuid(chatValue, 'chat_id'); + await this.authorizeChat(chatId, userId); + const fields = this.validateFields(filename, mime); + if (!Buffer.isBuffer(body) || body.length === 0) + throw new ApiException( + 415, + 'unsupported_media_type', + 'Ожидается PNG или JPEG', + ); + if (body.length > MAX_UPLOAD_BYTES) + throw new ApiException(413, 'payload_too_large', 'Превышен лимит файла'); + const contentType = fields.contentType; + await this.validateImage(body, contentType); + const id = randomUUID(); + const objectKey = `originals/${chatId}/${id}`; + const stagingKey = stagingKeyFor({ id, chatId }); + try { + profileStage('db_lock'); + const stored = await this.prisma.$transaction(async (tx) => { + if (!(await tryAttachmentObjectLock(tx, stagingKey))) { + throw new ApiException(503, 'unavailable', 'Объект занят'); + } + profileStage('s3_put'); + await this.storage.put(stagingKey, body, contentType); + profileStage('sha256'); + const sha256 = createHash('sha256').update(body).digest('hex'); + await assertAttachmentCapacity(tx); + profileStage('db_insert_and_commit'); + return tx.attachment.create({ + data: { + id, + chatId, + ownerId: userId, + objectKey, + status: 'queued', + filename: fields.filename, + contentType, + sizeBytes: body.length, + sha256, + }, + }); + }, OBJECT_TRANSACTION); + profileStage('serialize_response'); + return this.serialize(stored, true); + } catch (error) { + // A database timeout can occur after commit. Never delete a referenced object. + try { + const committed = await this.prisma.$transaction(async (tx) => { + if (!(await tryAttachmentObjectLock(tx, stagingKey))) return null; + const record = await tx.attachment.findUnique({ + where: { objectKey }, + }); + if (record) return record; + await this.storage.remove(stagingKey); + return null; + }, OBJECT_TRANSACTION); + if (committed) return this.serialize(committed, true); + } catch { + this.logger.error( + { attachmentId: id }, + 'Upload requires reconciliation', + ); + } + throw error; + } + } + + async get(id: unknown, userId: string) { + return this.serialize(await this.authorizeAttachment(id, userId)); + } + + async content(id: unknown, userId: string, variant: unknown) { + const attachment = await this.authorizeAttachment(id, userId); + const name = variant === undefined ? 'original' : variant; + if (name !== 'original' && !isAttachmentVariant(name)) { + return invalidRequest('Некорректный variant'); + } + if (attachment.status !== 'ready') { + throw new ApiException( + 409, + 'conflict', + 'Вложение недоступно для скачивания', + ); + } + if (name === 'original') { + return { + attachment, + stream: await this.storage.get(attachment.objectKey), + }; + } + const metadata = this.variants(attachment).find( + (item) => item.name === name, + ); + if (!metadata) { + throw new ApiException(404, 'not_found', 'Вариант не найден'); + } + return { + attachment: { + filename: `${attachment.filename}.${name}.${variantFormats[name].extension}`, + contentType: metadata.content_type, + sizeBytes: metadata.size_bytes, + }, + stream: await this.storage.get(variantKeyFor(attachment, name)), + }; + } + + validateFields(filename: unknown, mime: unknown) { + if ( + typeof filename !== 'string' || + filename.trim().length === 0 || + Array.from(filename).length > 255 || + Array.from(filename).some((character) => { + const point = character.codePointAt(0)!; + return ( + character === '/' || + character === '\\' || + point < 32 || + (point >= 127 && point <= 159) + ); + }) + ) { + return invalidRequest('Некорректный filename'); + } + const contentType = + typeof mime === 'string' ? mime.split(';')[0].trim().toLowerCase() : ''; + if (contentType !== 'image/png' && contentType !== 'image/jpeg') { + throw new ApiException( + 415, + 'unsupported_media_type', + 'Ожидается PNG или JPEG', + ); + } + return { filename, contentType }; + } + + async authorizeChat(chatId: string, userId: string) { + const member = await this.prisma.chatMember.findUnique({ + where: { chatId_userId: { chatId, userId } }, + select: { chatId: true }, + }); + if (!member) throw new ApiException(404, 'not_found', 'Объект не найден'); + } + + private async authorizeAttachment(value: unknown, userId: string) { + const id = uuid(value, 'attachment_id'); + const attachment = await this.prisma.attachment.findFirst({ + where: { id, chat: { members: { some: { userId } } } }, + }); + if (!attachment) + throw new ApiException(404, 'not_found', 'Объект не найден'); + return attachment; + } + + async validateImage(body: Buffer | string, contentType: string) { + try { + profileStage('sharp_metadata'); + // metadata reads headers without decoding pixels; check dimensions before full validation. + const metadata = await sharp(body, { + limitInputPixels: false, + failOn: 'warning', + }).metadata(); + const actualType = + metadata.format === 'png' + ? 'image/png' + : metadata.format === 'jpeg' + ? 'image/jpeg' + : null; + if ( + actualType !== contentType || + !metadata.width || + !metadata.height || + (metadata.pages ?? 1) > 1 + ) { + throw new ApiException( + 415, + 'unsupported_media_type', + 'Некорректное изображение', + ); + } + if (metadata.width * metadata.height > MAX_IMAGE_PIXELS) { + throw new ApiException( + 413, + 'payload_too_large', + 'Превышен лимит пикселей', + ); + } + profileStage('sharp_decode_stats'); + await sharp(body, { + limitInputPixels: MAX_IMAGE_PIXELS, + failOn: 'warning', + }).stats(); + profileStage('image_validated'); + } catch (cause) { + if (cause instanceof ApiException) throw cause; + throw new ApiException( + 415, + 'unsupported_media_type', + 'Некорректное изображение', + { cause }, + ); + } + } + + serialize(value: Attachment, accepted = false) { + return { + id: value.id, + chat_id: value.chatId, + owner_id: value.ownerId, + filename: value.filename, + content_type: value.contentType, + size_bytes: value.sizeBytes, + sha256: value.sha256, + status: accepted ? 'queued' : value.status, + variants: + !accepted && value.status === 'ready' ? this.variants(value) : [], + error_code: + !accepted && value.status === 'failed' ? value.errorCode : null, + created_at: value.createdAt.toISOString(), + updated_at: (accepted ? value.createdAt : value.updatedAt).toISOString(), + }; + } + + private variants(value: Attachment) { + const candidates = [ + { + name: 'thumbnail', + size_bytes: value.thumbnailSize, + width: value.thumbnailWidth, + height: value.thumbnailHeight, + sha256: value.thumbnailSha256, + }, + { + name: 'crop', + size_bytes: value.cropSize, + width: CROP_SIZE, + height: CROP_SIZE, + sha256: value.cropSha256, + }, + { + name: 'optimized', + size_bytes: value.optimizedSize, + width: value.optimizedWidth, + height: value.optimizedHeight, + sha256: value.optimizedSha256, + }, + ] as const; + return candidates.flatMap(({ name, size_bytes, width, height, sha256 }) => { + if ( + typeof size_bytes !== 'number' || + typeof width !== 'number' || + typeof height !== 'number' || + typeof sha256 !== 'string' + ) + return []; + return [ + { + name, + content_type: variantFormats[name].contentType, + size_bytes, + width, + height, + sha256, + }, + ]; + }); + } +} diff --git a/src/Attachment/direct-upload.controller.ts b/src/Attachment/direct-upload.controller.ts new file mode 100644 index 00000000..913e64de --- /dev/null +++ b/src/Attachment/direct-upload.controller.ts @@ -0,0 +1,161 @@ +import { + Body, + Controller, + HttpCode, + Header, + Param, + Post, + Req, + UseGuards, +} from '@nestjs/common'; +import { + ApiBearerAuth, + ApiBody, + ApiOperation, + ApiParam, + ApiResponse, + ApiTags, +} from '@nestjs/swagger'; +import { UserGuard, type AuthenticatedRequest } from '../User/user.guard'; +import { DirectUploadService } from './direct-upload.service'; + +@ApiTags('direct uploads') +@ApiBearerAuth('bearerAuth') +@UseGuards(UserGuard) +@Controller('api/v1/chats/:chat_id/attachment-uploads') +@ApiParam({ name: 'chat_id', type: 'string', format: 'uuid', required: true }) +@ApiResponse({ + status: 401, + description: 'Требуется Bearer-сессия', + schema: { $ref: '#/components/schemas/Error' }, +}) +@ApiResponse({ + status: 404, + description: 'Чат/разрешение недоступно пользователю', + schema: { $ref: '#/components/schemas/Error' }, +}) +@ApiResponse({ + status: 503, + description: 'БД или хранилище временно недоступно', + schema: { $ref: '#/components/schemas/Error' }, +}) +export class DirectUploadController { + constructor(private readonly uploads: DirectUploadService) {} + + @Post() + @HttpCode(201) + @Header('Cache-Control', 'no-store') + @ApiOperation({ + operationId: 'initiateDirectUpload', + summary: 'Выдать короткоживущее разрешение PUT в staging', + }) + @ApiBody({ + schema: { + type: 'object', + additionalProperties: false, + required: ['filename', 'content_type', 'size_bytes', 'sha256'], + properties: { + filename: { type: 'string', minLength: 1, maxLength: 255 }, + content_type: { type: 'string', enum: ['image/png', 'image/jpeg'] }, + size_bytes: { type: 'integer', minimum: 1, maximum: 10485760 }, + sha256: { type: 'string', pattern: '^[a-f0-9]{64}$' }, + expires_in: { + type: 'integer', + minimum: 1, + maximum: 300, + description: + 'Не больше серверного DIRECT_UPLOAD_TTL_SECONDS (60 по умолчанию)', + }, + }, + }, + }) + @ApiResponse({ + status: 201, + description: 'PUT URL и обязательные заголовки; URL не логировать', + schema: { + type: 'object', + required: [ + 'upload_id', + 'expires_at', + 'method', + 'url', + 'headers', + 'complete_url', + ], + properties: { + upload_id: { type: 'string', format: 'uuid' }, + expires_at: { type: 'string', format: 'date-time' }, + method: { type: 'string', enum: ['PUT'] }, + url: { type: 'string', format: 'uri' }, + headers: { type: 'object', additionalProperties: { type: 'string' } }, + complete_url: { type: 'string' }, + }, + }, + }) + @ApiResponse({ status: 400, description: 'Некорректные поля разрешения' }) + @ApiResponse({ status: 413, description: 'Запрошен размер больше 10 MiB' }) + @ApiResponse({ status: 415, description: 'Разрешены только PNG и JPEG' }) + initiate( + @Req() request: AuthenticatedRequest, + @Param('chat_id') chatId: string, + @Body() body: unknown, + ) { + return this.uploads.initiate(chatId, request.currentUser.id, body); + } + + @Post(':upload_id/complete') + @HttpCode(202) + @ApiParam({ + name: 'upload_id', + type: 'string', + format: 'uuid', + required: true, + }) + @ApiBody({ + required: false, + schema: { type: 'object', additionalProperties: false, properties: {} }, + }) + @ApiOperation({ + operationId: 'completeDirectUpload', + summary: + 'Проверить байты и поставить вложение в очередь; идемпотентно для владельца', + }) + @ApiResponse({ + status: 202, + description: 'Подтверждение приёма Attachment; повтор возвращает то же вложение', + schema: { $ref: '#/components/schemas/Attachment' }, + }) + @ApiResponse({ + status: 400, + description: 'Размер/checksum не совпадает или некорректные параметры', + }) + @ApiResponse({ status: 404, description: 'Чужая или неизвестная загрузка' }) + @ApiResponse({ + status: 409, + description: + 'Истёкшее/отклонённое разрешение, нет файла или complete выполняется другой репликой', + }) + @ApiResponse({ status: 413, description: 'Превышен лимит bytes/pixels' }) + @ApiResponse({ + status: 415, + description: 'Повреждённое изображение или неверный MIME', + }) + @ApiResponse({ + status: 429, + description: 'Очередь вложений заполнена', + headers: { 'Retry-After': { schema: { type: 'integer', minimum: 1 } } }, + }) + complete( + @Req() request: AuthenticatedRequest, + @Param('chat_id') chatId: string, + @Param('upload_id') uploadId: string, + @Body() body: unknown, + ) { + return this.uploads.complete( + chatId, + uploadId, + request.currentUser.id, + body, + ); + } +} diff --git a/src/Attachment/direct-upload.service.spec.ts b/src/Attachment/direct-upload.service.spec.ts new file mode 100644 index 00000000..87d5d78e --- /dev/null +++ b/src/Attachment/direct-upload.service.spec.ts @@ -0,0 +1,151 @@ +import { randomUUID } from 'node:crypto'; +import type { PrismaService } from '../prisma/prisma.service'; +import type { StorageService } from '../Storage/storage.service'; +import type { AttachmentService } from './attachment.service'; +import { DirectUploadService } from './direct-upload.service'; +import { ApiException } from '../common/exceptions/api.exception'; + +function fixture() { + const upload = { + id: randomUUID(), + chatId: randomUUID(), + ownerId: randomUUID(), + filename: 'photo.png', + contentType: 'image/png', + sizeBytes: 200, + sha256: 'a'.repeat(64), + expiresAt: new Date(Date.now() + 60000), + status: 'pending', + }; + let saved: unknown = null; + const db = { + directUpload: { + create: jest.fn().mockResolvedValue(upload), + findFirst: jest.fn().mockResolvedValue(upload), + update: jest.fn(async ({ data }: { data: { status: string } }) => + Object.assign(upload, data), + ), + }, + attachment: { + count: jest.fn().mockResolvedValue(0), + findUnique: jest.fn(async () => saved), + create: jest.fn(async ({ data }: { data: Record }) => { + saved = { ...data, createdAt: new Date(), updatedAt: new Date() }; + return saved; + }), + }, + $executeRaw: jest.fn().mockResolvedValue(0), + $queryRaw: jest.fn().mockResolvedValue([{ locked: true }]), + $transaction: jest.fn(), + }; + db.$transaction.mockImplementation((fn: (tx: unknown) => unknown) => fn(db)); + const storage = { + presignPut: jest + .fn() + .mockResolvedValue({ url: 'http://example.test/upload', headers: {} }), + inspectToFile: jest.fn().mockResolvedValue('"etag"'), + publishCopy: jest.fn().mockResolvedValue(undefined), + remove: jest.fn().mockResolvedValue(undefined), + }; + const attachments = { + authorizeChat: jest.fn().mockResolvedValue(undefined), + validateFields: jest + .fn() + .mockReturnValue({ + filename: upload.filename, + contentType: upload.contentType, + }), + validateImage: jest.fn().mockResolvedValue(undefined), + serialize: jest.fn((value: unknown) => value), + }; + const service = new DirectUploadService( + db as unknown as PrismaService, + storage as unknown as StorageService, + attachments as unknown as AttachmentService, + ); + const complete = () => + service.complete(upload.chatId, upload.id, upload.ownerId, undefined); + return { upload, db, storage, attachments, service, complete }; +} + +describe('direct upload publication', () => { + it('uses immutable expected fields and a short server-bounded grant', async () => { + const f = fixture(); + await expect( + f.service.initiate(f.upload.chatId, f.upload.ownerId, { + filename: 'photo.png', + content_type: 'image/png', + size_bytes: 200, + sha256: 'a'.repeat(64), + expires_in: 1, + }), + ).resolves.toMatchObject({ upload_id: f.upload.id, method: 'PUT' }); + expect(f.storage.presignPut).toHaveBeenCalledWith( + `staging/${f.upload.chatId}/${f.upload.id}`, + 200, + 'image/png', + 'a'.repeat(64), + 1, + expect.any(Date), + ); + await expect( + f.service.initiate(f.upload.chatId, f.upload.ownerId, { + filename: 'photo.png', + content_type: 'image/png', + size_bytes: 10485761, + sha256: 'a'.repeat(64), + }), + ).rejects.toMatchObject({ status: 413 }); + }); + + it('queues the staged object once and reuses the same attachment on replay', async () => { + const f = fixture(); + const first = await f.complete(); + expect(await f.complete()).toEqual(first); + expect(f.storage.inspectToFile).toHaveBeenCalledTimes(1); + expect(first).toMatchObject({ id: f.upload.id, status: 'queued' }); + expect(f.storage.publishCopy).not.toHaveBeenCalled(); + expect(f.storage.remove).not.toHaveBeenCalled(); + expect(f.db.attachment.create).toHaveBeenCalledTimes(1); + expect(f.upload.status).toBe('completed'); + }); + + it('commits a rejected reservation when image validation fails, publishing no metadata', async () => { + const f = fixture(); + f.attachments.validateImage.mockRejectedValue( + new ApiException(415, 'unsupported_media_type', 'invalid image'), + ); + await expect(f.complete()).rejects.toMatchObject({ status: 415 }); + expect(f.upload.status).toBe('rejected'); + expect(f.db.attachment.create).not.toHaveBeenCalled(); + expect(f.storage.publishCopy).not.toHaveBeenCalled(); + await expect(f.complete()).rejects.toMatchObject({ status: 409 }); + }); + + it('expires pending reservations without downloading their objects', async () => { + const f = fixture(); + f.upload.expiresAt = new Date(Date.now() - 1000); + await expect(f.complete()).rejects.toMatchObject({ status: 409 }); + expect(f.upload.status).toBe('expired'); + expect(f.storage.inspectToFile).not.toHaveBeenCalled(); + }); + + it('does not reject an intent for an infrastructure failure or a missing upload', async () => { + const f = fixture(); + f.storage.inspectToFile.mockRejectedValue( + new ApiException(503, 'unavailable', 'storage unavailable'), + ); + await expect(f.complete()).rejects.toMatchObject({ status: 503 }); + expect(f.upload.status).toBe('pending'); + expect(f.db.attachment.create).not.toHaveBeenCalled(); + }); + + it('does not fetch an object for a foreign reservation or simultaneous completion', async () => { + const f = fixture(); + f.db.directUpload.findFirst.mockResolvedValueOnce(null); + await expect(f.complete()).rejects.toMatchObject({ status: 404 }); + f.db.$queryRaw.mockResolvedValueOnce([{ locked: false }]); + await expect(f.complete()).rejects.toMatchObject({ status: 409 }); + expect(f.storage.inspectToFile).not.toHaveBeenCalled(); + }); +}); diff --git a/src/Attachment/direct-upload.service.ts b/src/Attachment/direct-upload.service.ts new file mode 100644 index 00000000..cd37449f --- /dev/null +++ b/src/Attachment/direct-upload.service.ts @@ -0,0 +1,220 @@ +import { Injectable } from '@nestjs/common'; +import { mkdtemp, rm, rmdir } from 'node:fs/promises'; +import { join } from 'node:path'; +import { tmpdir } from 'node:os'; +import type { Attachment } from '../generated/prisma/client'; +import { PrismaService } from '../prisma/prisma.service'; +import { StorageService } from '../Storage/storage.service'; +import { ApiException } from '../common/exceptions/api.exception'; +import { invalidRequest, objectBody, uuid } from '../common/validation'; +import { AttachmentService, MAX_UPLOAD_BYTES } from './attachment.service'; +import { OBJECT_TRANSACTION, tryAttachmentObjectLock } from './object-lock'; +import { profileStage } from '../common/http/upload-memory-profile'; +import { stagingKeyFor } from './attachment-keys'; +import { assertAttachmentCapacity } from './attachment-capacity'; + +type Outcome = { attachment: Attachment } | { error: ApiException }; + +@Injectable() +export class DirectUploadService { + private readonly maxTtl = Number(process.env.DIRECT_UPLOAD_TTL_SECONDS ?? 60); + + constructor( + private readonly db: PrismaService, + private readonly storage: StorageService, + private readonly attachments: AttachmentService, + ) { + if ( + !Number.isSafeInteger(this.maxTtl) || + this.maxTtl < 1 || + this.maxTtl > 300 + ) { + throw new Error('DIRECT_UPLOAD_TTL_SECONDS must be between 1 and 300'); + } + } + + async initiate(chatValue: unknown, userId: string, value: unknown) { + const chatId = uuid(chatValue, 'chat_id'); + await this.attachments.authorizeChat(chatId, userId); + const body = objectBody(value, [ + 'filename', + 'content_type', + 'size_bytes', + 'sha256', + 'expires_in', + ]); + const fields = this.attachments.validateFields( + body.filename, + body.content_type, + ); + if ( + typeof body.size_bytes !== 'number' || + !Number.isSafeInteger(body.size_bytes) || + body.size_bytes < 1 + ) + invalidRequest('Некорректный size_bytes'); + if (body.size_bytes > MAX_UPLOAD_BYTES) + throw new ApiException(413, 'payload_too_large', 'Превышен лимит файла'); + if (typeof body.sha256 !== 'string' || !/^[a-f0-9]{64}$/.test(body.sha256)) + invalidRequest('Ожидается lowercase SHA-256'); + const ttl = body.expires_in === undefined ? this.maxTtl : body.expires_in; + if ( + typeof ttl !== 'number' || + !Number.isSafeInteger(ttl) || + ttl < 1 || + ttl > this.maxTtl + ) + invalidRequest('Некорректный expires_in'); + // SigV4 timestamps have second precision; report the same expiry to the client. + const now = new Date(Math.floor(Date.now() / 1000) * 1000); + const upload = await this.db.directUpload.create({ + data: { + chatId, + ownerId: userId, + filename: fields.filename, + contentType: fields.contentType, + sizeBytes: body.size_bytes, + sha256: body.sha256, + expiresAt: new Date(now.getTime() + ttl * 1000), + }, + }); + const signed = await this.storage.presignPut( + stagingKeyFor(upload), + upload.sizeBytes, + upload.contentType, + upload.sha256, + ttl, + now, + ); + return { + upload_id: upload.id, + expires_at: upload.expiresAt.toISOString(), + method: 'PUT' as const, + ...signed, + complete_url: `/api/v1/chats/${chatId}/attachment-uploads/${upload.id}/complete`, + }; + } + + async complete( + chatValue: unknown, + uploadValue: unknown, + userId: string, + body: unknown, + ) { + profileStage('authorize_and_lookup'); + const chatId = uuid(chatValue, 'chat_id'); + const id = uuid(uploadValue, 'upload_id'); + if (body !== undefined) objectBody(body, []); + await this.attachments.authorizeChat(chatId, userId); + const where = { id, chatId, ownerId: userId }; + if (!(await this.db.directUpload.findFirst({ where }))) + throw new ApiException(404, 'not_found', 'Объект не найден'); + const stagingKey = stagingKeyFor({ chatId, id }); + const originalKey = `originals/${chatId}/${id}`; + const directory = await mkdtemp(join(tmpdir(), 'pe-direct-')); + const file = join(directory, 'image'); + let outcome: Outcome; + try { + outcome = await this.db.$transaction(async (tx): Promise => { + if ( + !(await tryAttachmentObjectLock(tx, stagingKey)) || + !(await tryAttachmentObjectLock(tx, originalKey)) + ) { + throw new ApiException( + 409, + 'conflict', + 'Загрузка уже завершается; повторите complete', + ); + } + const upload = await tx.directUpload.findFirst({ where }); + if (!upload) + throw new ApiException(404, 'not_found', 'Объект не найден'); + const existing = await tx.attachment.findUnique({ where: { id } }); + if (upload.status === 'completed') { + if (!existing) + throw new ApiException( + 503, + 'unavailable', + 'Метаданные завершённой загрузки недоступны', + ); + return { attachment: existing }; + } + if (upload.status !== 'pending') + return { + error: new ApiException( + 409, + 'conflict', + 'Разрешение загрузки больше не действует', + ), + }; + if (upload.expiresAt <= new Date()) { + await tx.directUpload.update({ + where: { id }, + data: { status: 'expired' }, + }); + return { + error: new ApiException( + 409, + 'conflict', + 'Разрешение загрузки истекло', + ), + }; + } + if (existing) + throw new ApiException( + 503, + 'unavailable', + 'Конфликт идентификатора вложения', + ); + try { + profileStage('s3_get_headers'); + await this.storage.inspectToFile(stagingKey, file, upload); + await this.attachments.validateImage(file, upload.contentType); + } catch (error) { + if ( + !(error instanceof ApiException) || + ![400, 413, 415].includes(error.getStatus()) + ) + throw error; + // Commit rejection before reporting a permanent validation error. No attachment is published. + await tx.directUpload.update({ + where: { id }, + data: { status: 'rejected' }, + }); + return { error }; + } + // The signed PUT is create-only; the worker verifies the stored checksum again. + profileStage('db_insert_and_commit'); + await assertAttachmentCapacity(tx); + const attachment = await tx.attachment.create({ + data: { + id, + chatId, + ownerId: userId, + objectKey: originalKey, + status: 'queued', + filename: upload.filename, + contentType: upload.contentType, + sizeBytes: upload.sizeBytes, + sha256: upload.sha256, + }, + }); + await tx.directUpload.update({ + where: { id }, + data: { status: 'completed' }, + }); + return { attachment }; + }, OBJECT_TRANSACTION); + } finally { + profileStage('temp_file_cleanup'); + await rm(file, { force: true }); + await rmdir(directory); + } + if ('error' in outcome) throw outcome.error; + profileStage('serialize_response'); + return this.attachments.serialize( + outcome.attachment, + outcome.attachment.publishedAt !== null || outcome.attachment.status !== 'ready' || outcome.attachment.thumbnailSize !== null, + ); + } +} diff --git a/src/Attachment/object-lock.ts b/src/Attachment/object-lock.ts new file mode 100644 index 00000000..12272548 --- /dev/null +++ b/src/Attachment/object-lock.ts @@ -0,0 +1,16 @@ +import { Prisma } from '../generated/prisma/client'; + +export const OBJECT_TRANSACTION = { maxWait: 5000, timeout: 20000 }; + +/** All writers and cleaners use the same transaction-scoped lock for an immutable key. */ +export async function tryAttachmentObjectLock( + tx: Prisma.TransactionClient, + objectKey: string, +): Promise { + // A suspended/crashed writer must not keep an idle transaction open indefinitely. + await tx.$executeRaw`SET LOCAL idle_in_transaction_session_timeout = '15s'`; + const [result] = await tx.$queryRaw<{ locked: boolean }[]>(Prisma.sql` + SELECT pg_try_advisory_xact_lock(hashtextextended(${`attachment:${objectKey}`}, 0)) AS locked + `); + return result.locked; +} diff --git a/src/Attachment/reconcile-health.ts b/src/Attachment/reconcile-health.ts new file mode 100644 index 00000000..a776d852 --- /dev/null +++ b/src/Attachment/reconcile-health.ts @@ -0,0 +1,30 @@ +import { readFileSync, rmSync, writeFileSync } from 'node:fs'; +import { tmpdir } from 'node:os'; +import { join } from 'node:path'; + +const file = join(tmpdir(), 'mtusi2026lab4-reconciler-success'); + +export function clearReconcileHealth(): void { + rmSync(file, { force: true }); +} + +export function markReconcileHealth(): void { + writeFileSync(file, String(Date.now()), { mode: 0o600 }); +} + +if (require.main === module) { + try { + const age = Date.now() - Number(readFileSync(file, 'utf8')); + const interval = Number(process.env.RECONCILE_INTERVAL_SECONDS ?? 60); + process.exitCode = + Number.isFinite(age) && + age >= 0 && + Number.isFinite(interval) && + interval > 0 && + age <= (interval + 120) * 1000 + ? 0 + : 1; + } catch { + process.exitCode = 1; + } +} diff --git a/src/Attachment/reconcile-options.ts b/src/Attachment/reconcile-options.ts new file mode 100644 index 00000000..90d27d3b --- /dev/null +++ b/src/Attachment/reconcile-options.ts @@ -0,0 +1,83 @@ +import { uuidPattern } from '../common/validation'; + +export interface ReconcileOptions { + apply: boolean; + graceSeconds: number; + prefix: string; + signal?: AbortSignal; +} + +export function positiveSeconds(value: string, name: string): number { + if (!/^[1-9]\d*$/.test(value)) + throw new Error(`${name} must be a positive integer`); + const seconds = Number(value); + if (!Number.isSafeInteger(seconds) || seconds > 2147483) { + throw new Error(`${name} is too large`); + } + return seconds; +} + +export function managedObjectKey(key: string): boolean { + const parts = key.split('/'); + return ( + parts.length === 3 && + parts[0] === 'originals' && + uuidPattern.test(parts[1]) && + uuidPattern.test(parts[2]) + ); +} + +export function reconcileOptions(args: string[], env = process.env) { + let apply = false; + let dryRun = false; + let watch = false; + let prefix = 'originals/'; + for (let i = 0; i < args.length; i++) { + switch (args[i]) { + case '--apply': + apply = true; + break; + case '--dry-run': + dryRun = true; + break; + case '--watch': + watch = true; + break; + case '--prefix': { + prefix = args[++i] ?? ''; + const parts = prefix.split('/'); + if ( + prefix !== 'originals/' && + !( + parts.length === 3 && + parts[0] === 'originals' && + uuidPattern.test(parts[1]) && + parts[2] === '' + ) + ) { + throw new Error( + 'Prefix must be originals/ or originals//', + ); + } + break; + } + default: + throw new Error(`Unknown argument: ${args[i]}`); + } + } + if (apply && dryRun) + throw new Error('--apply and --dry-run are mutually exclusive'); + return { + apply, + watch, + prefix, + graceSeconds: positiveSeconds( + env.ORPHAN_GRACE_SECONDS ?? '600', + 'ORPHAN_GRACE_SECONDS', + ), + intervalSeconds: positiveSeconds( + env.RECONCILE_INTERVAL_SECONDS ?? '60', + 'RECONCILE_INTERVAL_SECONDS', + ), + }; +} diff --git a/src/Attachment/reconcile.cli.ts b/src/Attachment/reconcile.cli.ts new file mode 100644 index 00000000..cf29c324 --- /dev/null +++ b/src/Attachment/reconcile.cli.ts @@ -0,0 +1,67 @@ +import 'reflect-metadata'; +import { setTimeout as delay } from 'node:timers/promises'; +import { PrismaService } from '../prisma/prisma.service'; +import { StorageService } from '../Storage/storage.service'; +import { reconcileOptions } from './reconcile-options'; +import { ReconcileService } from './reconcile.service'; +import { clearReconcileHealth, markReconcileHealth } from './reconcile-health'; + +async function main() { + const options = reconcileOptions(process.argv.slice(2)); + if (options.watch) clearReconcileHealth(); + const controller = new AbortController(); + const stop = () => controller.abort(); + process.once('SIGTERM', stop); + process.once('SIGINT', stop); + const prisma = new PrismaService(); + let storage: StorageService | undefined; + const output = (event: object) => console.log(JSON.stringify(event)); + try { + storage = new StorageService(); + await prisma.onModuleInit(); + const service = new ReconcileService(prisma, storage, output); + do { + try { + const report = await service.run({ + ...options, + signal: controller.signal, + }); + if (options.watch) markReconcileHealth(); + output({ event: 'reconcile_summary', ...report }); + if (!options.watch && report.missingObjects > 0) process.exitCode = 2; + } catch (error) { + if (controller.signal.aborted) break; + if (options.watch) clearReconcileHealth(); + output({ + event: 'reconcile_failed', + errorType: error instanceof Error ? error.name : 'UnknownError', + }); + if (!options.watch) { + process.exitCode = 1; + break; + } + } + if (!options.watch || controller.signal.aborted) break; + await delay(options.intervalSeconds * 1000, undefined, { + signal: controller.signal, + }).catch((error: unknown) => { + if (!controller.signal.aborted) throw error; + }); + } while (!controller.signal.aborted); + } finally { + storage?.onModuleDestroy(); + await prisma.onModuleDestroy(); + process.removeListener('SIGTERM', stop); + process.removeListener('SIGINT', stop); + } +} + +void main().catch((error: unknown) => { + console.error( + JSON.stringify({ + event: 'reconcile_failed', + errorType: error instanceof Error ? error.name : 'UnknownError', + }), + ); + process.exitCode = 1; +}); diff --git a/src/Attachment/reconcile.service.spec.ts b/src/Attachment/reconcile.service.spec.ts new file mode 100644 index 00000000..78d041b6 --- /dev/null +++ b/src/Attachment/reconcile.service.spec.ts @@ -0,0 +1,200 @@ +import type { PrismaService } from '../prisma/prisma.service'; +import type { StorageService, StoredObject } from '../Storage/storage.service'; +import { ReconcileService } from './reconcile.service'; +import { reconcileOptions } from './reconcile-options'; + +const key = + 'originals/11111111-1111-4111-8111-111111111111/22222222-2222-4222-8222-222222222222'; +const now = new Date('2026-11-09T12:00:00Z'); +const old = new Date(now.getTime() - 601000); +const fresh = new Date(now.getTime() - 599000); + +function fixture(objects: StoredObject[] = [{ key, lastModified: old }]) { + const tx = { + $executeRaw: jest.fn().mockResolvedValue(0), + $queryRaw: jest.fn().mockResolvedValue([{ locked: true }]), + attachment: { findUnique: jest.fn().mockResolvedValue(null) }, + directUpload: { findUnique: jest.fn().mockResolvedValue(null) }, + }; + const prisma = { + $queryRaw: jest.fn().mockResolvedValue([{ '?column?': 1 }]), + $transaction: jest.fn( + async (callback: (value: typeof tx) => Promise) => callback(tx), + ), + attachment: { findMany: jest.fn().mockResolvedValue([]) }, + directUpload: { updateMany: jest.fn().mockResolvedValue({ count: 0 }) }, + }; + const storage = { + ready: jest.fn().mockResolvedValue(undefined), + objects: jest.fn(async function* (prefix: string) { + if (prefix === 'staging/') return; + yield* objects; + }), + stat: jest.fn().mockResolvedValue({ key, lastModified: old }), + remove: jest.fn().mockResolvedValue(undefined), + }; + const emit = jest.fn(); + const service = new ReconcileService( + prisma as unknown as PrismaService, + storage as unknown as StorageService, + emit, + ); + const run = (apply = true) => + service.run({ apply, graceSeconds: 600, prefix: 'originals/' }, now); + return { tx, prisma, storage, emit, run }; +} + +describe('attachment reconciliation', () => { + it('reports old orphans in dry-run without removing bytes', async () => { + const f = fixture(); + expect(await f.run(false)).toMatchObject({ + orphanCandidates: 1, + deletedObjects: 0, + }); + expect(f.storage.remove).not.toHaveBeenCalled(); + expect(f.emit).toHaveBeenCalledWith({ + event: 'orphan_candidate', + objectKey: key, + }); + }); + + it('deletes an old orphan and safely handles another pass after it is gone', async () => { + const f = fixture(); + expect(await f.run()).toMatchObject({ deletedObjects: 1 }); + f.storage.stat.mockResolvedValue(null); + expect(await f.run()).toMatchObject({ deletedObjects: 0 }); + expect(f.storage.remove).toHaveBeenCalledTimes(1); + }); + + it('keeps fresh objects, unknown keys and objects with no trusted timestamp', async () => { + const f = fixture([ + { key, lastModified: fresh }, + { key: 'originals/manual.txt', lastModified: old }, + { key }, + ]); + expect(await f.run()).toMatchObject({ + freshObjects: 2, + unknownObjects: 1, + deletedObjects: 0, + }); + expect(f.prisma.$transaction).not.toHaveBeenCalled(); + expect(f.storage.remove).not.toHaveBeenCalled(); + }); + + it('does not delete objects referenced by metadata', async () => { + const f = fixture(); + f.tx.attachment.findUnique.mockResolvedValue({ id: 'published' }); + expect(await f.run()).toMatchObject({ + referencedObjects: 1, + deletedObjects: 0, + }); + expect(f.storage.remove).not.toHaveBeenCalled(); + }); + + it('skips an object locked by an active uploader or another cleaner', async () => { + const f = fixture(); + f.tx.$queryRaw.mockResolvedValue([{ locked: false }]); + expect(await f.run()).toMatchObject({ + lockedObjects: 1, + deletedObjects: 0, + }); + expect(f.storage.remove).not.toHaveBeenCalled(); + }); + + it('rechecks current S3 age instead of trusting an old LIST result', async () => { + const f = fixture(); + f.storage.stat.mockResolvedValue({ key, lastModified: fresh }); + expect(await f.run()).toMatchObject({ freshObjects: 1, deletedObjects: 0 }); + expect(f.storage.remove).not.toHaveBeenCalled(); + }); + + it('rechecks metadata immediately before deletion', async () => { + const f = fixture(); + f.tx.attachment.findUnique + .mockResolvedValueOnce(null) + .mockResolvedValueOnce({ id: 'published' }); + expect(await f.run()).toMatchObject({ + referencedObjects: 1, + deletedObjects: 0, + }); + expect(f.storage.remove).not.toHaveBeenCalled(); + }); + + it('aborts before contacting S3 if the DB is unavailable', async () => { + const f = fixture(); + f.prisma.$queryRaw.mockRejectedValue(new Error('DB unavailable')); + await expect(f.run()).rejects.toThrow('DB unavailable'); + expect(f.storage.ready).not.toHaveBeenCalled(); + expect(f.storage.remove).not.toHaveBeenCalled(); + }); + + it('does not delete when the DB fails after the S3 age check', async () => { + const f = fixture(); + f.tx.attachment.findUnique + .mockResolvedValueOnce(null) + .mockRejectedValueOnce(new Error('DB unavailable')); + await expect(f.run()).rejects.toThrow('DB unavailable'); + expect(f.storage.remove).not.toHaveBeenCalled(); + }); + + it('does not treat S3 failure as a missing object or successful cleanup', async () => { + const f = fixture(); + f.storage.stat.mockRejectedValue(new Error('S3 unavailable')); + await expect(f.run()).rejects.toThrow('S3 unavailable'); + expect(f.storage.remove).not.toHaveBeenCalled(); + expect(f.emit).not.toHaveBeenCalled(); + }); + + it('reports missing bytes without deleting metadata', async () => { + const f = fixture([]); + f.prisma.attachment.findMany.mockResolvedValue([ + { id: 'published', objectKey: key }, + ]); + f.storage.stat.mockResolvedValue(null); + expect(await f.run()).toMatchObject({ + missingObjects: 1, + deletedObjects: 0, + }); + expect(f.emit).toHaveBeenCalledWith({ + event: 'missing_object', + objectKey: key, + attachmentId: 'published', + }); + expect(f.storage.remove).not.toHaveBeenCalled(); + }); +}); + +describe('reconciliation CLI options', () => { + it('defaults to dry-run with a ten-minute grace and one-minute interval', () => { + expect(reconcileOptions([], {})).toMatchObject({ + apply: false, + watch: false, + graceSeconds: 600, + intervalSeconds: 60, + }); + }); + + it('accepts explicit apply and a scope limited to one chat', () => { + expect( + reconcileOptions( + ['--apply', '--prefix', key.slice(0, key.lastIndexOf('/') + 1)], + { ORPHAN_GRACE_SECONDS: '1200' }, + ), + ).toMatchObject({ apply: true, graceSeconds: 1200 }); + }); + + it.each(['0', '-1', '1.5', 'NaN', '999999999999'])( + 'rejects invalid grace %s', + (value) => { + expect(() => + reconcileOptions([], { ORPHAN_GRACE_SECONDS: value }), + ).toThrow(); + }, + ); + + it('rejects unsafe prefixes and conflicting modes', () => { + expect(() => reconcileOptions(['--prefix', 'other/'], {})).toThrow(); + expect(() => reconcileOptions(['--apply', '--dry-run'], {})).toThrow(); + expect(() => reconcileOptions(['--unknown'], {})).toThrow(); + }); +}); diff --git a/src/Attachment/reconcile.service.ts b/src/Attachment/reconcile.service.ts new file mode 100644 index 00000000..6eb6cf04 --- /dev/null +++ b/src/Attachment/reconcile.service.ts @@ -0,0 +1,133 @@ +import { PrismaService } from '../prisma/prisma.service'; +import { StorageService } from '../Storage/storage.service'; +import { OBJECT_TRANSACTION, tryAttachmentObjectLock } from './object-lock'; +import { managedObjectKey, type ReconcileOptions } from './reconcile-options'; +import { cleanStaging } from './staging-cleanup'; + +export interface ReconcileEvent { + event: string; + objectKey?: string; + attachmentId?: string; +} + +export class ReconcileService { + constructor( + private readonly prisma: PrismaService, + private readonly storage: StorageService, + private readonly emit: (event: ReconcileEvent) => void = () => {}, + ) {} + + async run(options: ReconcileOptions, now = new Date()) { + const cutoff = now.getTime() - options.graceSeconds * 1000; + const report = { + mode: options.apply ? 'apply' : 'dry-run', + graceSeconds: options.graceSeconds, + prefix: options.prefix, + objectsScanned: 0, + freshObjects: 0, + referencedObjects: 0, + lockedObjects: 0, + unknownObjects: 0, + orphanCandidates: 0, + deletedObjects: 0, + missingObjects: 0, + }; + const oldEnough = (date?: Date) => + date !== undefined && + Number.isFinite(date.getTime()) && + date.getTime() <= cutoff; + // Check the DB before contacting S3. Any subsequent DB/S3 error aborts this pass. + await this.prisma.$queryRaw`SELECT 1`; + await this.storage.ready(); + for await (const object of this.storage.objects(options.prefix)) { + options.signal?.throwIfAborted(); + report.objectsScanned++; + if (!managedObjectKey(object.key)) { + report.unknownObjects++; + continue; + } + if (!oldEnough(object.lastModified)) { + report.freshObjects++; + continue; + } + const outcome = await this.prisma.$transaction(async (tx) => { + if (!(await tryAttachmentObjectLock(tx, object.key))) return 'locked'; + if ( + await tx.attachment.findUnique({ + where: { objectKey: object.key }, + select: { id: true }, + }) + ) { + return 'referenced'; + } + // LIST timestamps may be stale. HEAD checks the current object under the writer lock. + const current = await this.storage.stat(object.key); + if (!current) return 'gone'; + if (!oldEnough(current.lastModified)) return 'fresh'; + // Recheck immediately before DELETE, also detecting DB failure after HEAD. + if ( + await tx.attachment.findUnique({ + where: { objectKey: object.key }, + select: { id: true }, + }) + ) { + return 'referenced'; + } + options.signal?.throwIfAborted(); + if (options.apply) await this.storage.remove(object.key); + return options.apply ? 'deleted' : 'candidate'; + }, OBJECT_TRANSACTION); + if (outcome === 'locked') report.lockedObjects++; + if (outcome === 'referenced') report.referencedObjects++; + if (outcome === 'fresh') report.freshObjects++; + if (outcome === 'candidate' || outcome === 'deleted') { + report.orphanCandidates++; + if (outcome === 'deleted') report.deletedObjects++; + this.emit({ + event: outcome === 'deleted' ? 'orphan_deleted' : 'orphan_candidate', + objectKey: object.key, + }); + } + } + + // Reverse check: missing bytes are an integrity incident, never a reason to delete metadata. + let after: string | undefined; + while (true) { + options.signal?.throwIfAborted(); + const rows = await this.prisma.attachment.findMany({ + where: { + status: 'ready', + objectKey: { startsWith: options.prefix }, + ...(after ? { id: { gt: after } } : {}), + }, + select: { id: true, objectKey: true }, + orderBy: { id: 'asc' }, + take: 200, + }); + for (const row of rows) { + options.signal?.throwIfAborted(); + if (!(await this.storage.stat(row.objectKey))) { + report.missingObjects++; + this.emit({ + event: 'missing_object', + objectKey: row.objectKey, + attachmentId: row.id, + }); + } + } + if (rows.length < 200) break; + after = rows[rows.length - 1].id; + } + // Chat-scoped original-only diagnostics must not scan another chat's staging. + if (options.prefix === 'originals/') { + const staging = await cleanStaging( + this.prisma, + this.storage, + options, + now, + ); + return { ...report, ...staging }; + } + return report; + } +} diff --git a/src/Attachment/staging-cleanup.spec.ts b/src/Attachment/staging-cleanup.spec.ts new file mode 100644 index 00000000..ae49d4cb --- /dev/null +++ b/src/Attachment/staging-cleanup.spec.ts @@ -0,0 +1,110 @@ +import { randomUUID } from 'node:crypto'; +import type { PrismaService } from '../prisma/prisma.service'; +import type { StorageService } from '../Storage/storage.service'; +import { cleanStaging } from './staging-cleanup'; + +function fixture() { + const chat = randomUUID(); + const id = randomUUID(); + const key = `staging/${chat}/${id}`; + const now = new Date(); + const old = new Date(now.getTime() - 1200000); + const upload = { chatId: chat, expiresAt: old }; + const tx = { + $queryRaw: jest.fn().mockResolvedValue([{ locked: true }]), + $executeRaw: jest.fn().mockResolvedValue(0), + directUpload: { findUnique: jest.fn().mockResolvedValue(upload) }, + attachment: { findFirst: jest.fn().mockResolvedValue(null) }, + }; + const db = { + $queryRaw: jest.fn().mockResolvedValue([]), + $transaction: jest.fn(async (fn: (value: unknown) => unknown) => fn(tx)), + directUpload: { updateMany: jest.fn().mockResolvedValue({ count: 1 }) }, + }; + const storage = { + objects: jest.fn(async function* () { + yield { key, lastModified: old }; + }), + stat: jest.fn().mockResolvedValue({ key, lastModified: old }), + remove: jest.fn().mockResolvedValue(undefined), + }; + const options = { + apply: true, + graceSeconds: 600, + prefix: `originals/${chat}/`, + }; + const run = (apply = true) => + cleanStaging( + db as unknown as PrismaService, + storage as unknown as StorageService, + { ...options, apply }, + now, + ); + return { key, chat, now, upload, tx, db, storage, run }; +} + +describe('staging cleanup', () => { + it('keeps aged staging while an accepted job is queued or processing', async () => { + const f = fixture(); + f.tx.attachment.findFirst.mockResolvedValue({ id: 'active' }); + expect(await f.run()).toMatchObject({ stagingProtected: 1 }); + expect(f.storage.remove).not.toHaveBeenCalled(); + }); + it('checks the replay retention deadline before deleting failed staging', async () => { + const f = fixture(); + f.tx.attachment.findFirst.mockResolvedValue({ id: 'retained' }); + expect(await f.run()).toMatchObject({ stagingProtected: 1 }); + expect(f.tx.attachment.findFirst).toHaveBeenCalledWith({ + where: expect.objectContaining({ + OR: expect.arrayContaining([ + { status: 'failed', replayUntil: { gt: f.now } }, + ]), + }), + select: { id: true }, + }); + expect(f.storage.remove).not.toHaveBeenCalled(); + }); + it('deletes only aged objects after reservation expiry plus grace', async () => { + const f = fixture(); + expect(await f.run()).toMatchObject({ stagingDeleted: 1 }); + expect(f.storage.objects).toHaveBeenCalledWith(`staging/${f.chat}/`); + expect(f.storage.remove).toHaveBeenCalledWith(f.key); + expect(f.db.directUpload.updateMany).toHaveBeenCalledWith( + expect.objectContaining({ + where: expect.objectContaining({ chatId: f.chat }), + }), + ); + }); + it('protects an unexpired URL even if the object already looks old', async () => { + const f = fixture(); + f.upload.expiresAt = new Date(f.now.getTime() + 60000); + expect(await f.run()).toMatchObject({ + stagingDeleted: 0, + stagingProtected: 1, + }); + expect(f.storage.remove).not.toHaveBeenCalled(); + }); + it('protects an active complete and a freshly recreated staging object', async () => { + const f = fixture(); + f.tx.$queryRaw.mockResolvedValueOnce([{ locked: false }]); + expect(await f.run()).toMatchObject({ stagingProtected: 1 }); + f.storage.stat.mockResolvedValueOnce({ key: f.key, lastModified: f.now }); + expect(await f.run()).toMatchObject({ stagingProtected: 1 }); + expect(f.storage.remove).not.toHaveBeenCalled(); + }); + it('performs a dry run without deleting files or changing reservations', async () => { + const f = fixture(); + expect(await f.run(false)).toMatchObject({ + stagingCandidates: 1, + stagingDeleted: 0, + }); + expect(f.storage.remove).not.toHaveBeenCalled(); + expect(f.db.directUpload.updateMany).not.toHaveBeenCalled(); + }); + it('fails closed when PostgreSQL is unavailable', async () => { + const f = fixture(); + f.db.$queryRaw.mockRejectedValueOnce(new Error('database unavailable')); + await expect(f.run()).rejects.toThrow('database unavailable'); + expect(f.storage.objects).not.toHaveBeenCalled(); + }); +}); diff --git a/src/Attachment/staging-cleanup.ts b/src/Attachment/staging-cleanup.ts new file mode 100644 index 00000000..a2e78f93 --- /dev/null +++ b/src/Attachment/staging-cleanup.ts @@ -0,0 +1,89 @@ +import type { PrismaService } from '../prisma/prisma.service'; +import type { StorageService } from '../Storage/storage.service'; +import { uuidPattern } from '../common/validation'; +import type { ReconcileOptions } from './reconcile-options'; +import { OBJECT_TRANSACTION, tryAttachmentObjectLock } from './object-lock'; + +export async function cleanStaging( + db: PrismaService, + storage: StorageService, + options: ReconcileOptions, + now: Date, +) { + const cutoff = new Date(now.getTime() - options.graceSeconds * 1000); + const scope = + options.prefix === 'originals/' ? undefined : options.prefix.split('/')[1]; + if ( + options.prefix !== 'originals/' && + (!scope || + options.prefix !== `originals/${scope}/` || + !uuidPattern.test(scope)) + ) + throw new Error('Unsafe staging cleanup scope'); + const prefix = scope ? `staging/${scope}/` : 'staging/'; + const report = { + stagingScanned: 0, + stagingProtected: 0, + stagingCandidates: 0, + stagingDeleted: 0, + }; + // Fail closed before looking for objects. Never infer "no intent" from a DB outage. + await db.$queryRaw`SELECT 1`; + for await (const object of storage.objects(prefix)) { + options.signal?.throwIfAborted(); + report.stagingScanned++; + const parts = object.key.split('/'); + if ( + parts.length !== 3 || + parts[0] !== 'staging' || + !uuidPattern.test(parts[1]) || + !uuidPattern.test(parts[2]) || + !object.lastModified || + object.lastModified > cutoff + ) { + report.stagingProtected++; + continue; + } + const outcome = await db.$transaction(async (tx) => { + if (!(await tryAttachmentObjectLock(tx, object.key))) return false; + const protectedAttachment = await tx.attachment.findFirst({ + where: { + id: parts[2], + chatId: parts[1], + OR: [ + { status: { in: ['queued', 'processing'] } }, + { status: 'failed', replayUntil: { gt: now } }, + ], + }, + select: { id: true }, + }); + if (protectedAttachment) return false; + const upload = await tx.directUpload.findUnique({ + where: { id: parts[2] }, + }); + // Wait for BOTH signature expiry and grace. A late replay must not outlive its reservation. + if (upload && (upload.chatId !== parts[1] || upload.expiresAt > cutoff)) + return false; + const current = await storage.stat(object.key); + if (!current || !current.lastModified || current.lastModified > cutoff) + return false; + options.signal?.throwIfAborted(); + if (options.apply) await storage.remove(object.key); + return true; + }, OBJECT_TRANSACTION); + if (outcome) { + report.stagingCandidates++; + if (options.apply) report.stagingDeleted++; + } else report.stagingProtected++; + } + if (options.apply) + await db.directUpload.updateMany({ + where: { + status: 'pending', + expiresAt: { lte: cutoff }, + ...(scope ? { chatId: scope } : {}), + }, + data: { status: 'expired' }, + }); + return report; +} diff --git a/src/Auth/auth.controller.ts b/src/Auth/auth.controller.ts new file mode 100644 index 00000000..03123c06 --- /dev/null +++ b/src/Auth/auth.controller.ts @@ -0,0 +1,69 @@ +import { + Body, + Controller, + Delete, + HttpCode, + HttpStatus, + Post, + Req, + UseGuards, +} from '@nestjs/common'; +import { + ApiBasicAuth, + ApiBearerAuth, + ApiCreatedResponse, + ApiNoContentResponse, + ApiOperation, + ApiTags, + ApiUnauthorizedResponse, +} from '@nestjs/swagger'; +import { UserGuard, type AuthenticatedRequest } from '../User/user.guard'; +import { AuthService } from './auth.service'; +import { Session } from './auth.schema'; + +@ApiTags('auth') +@Controller('api/v1/auth/sessions') +export class AuthController { + constructor(private readonly auth: AuthService) {} + + @Post() + @HttpCode(HttpStatus.CREATED) + @ApiBasicAuth('basicAuth') + @ApiOperation({ + operationId: 'createSession', + summary: 'Вход', + }) + @ApiCreatedResponse({ type: Session }) + @ApiUnauthorizedResponse({ + headers: { + 'WWW-Authenticate': { + schema: { type: 'string' }, + example: 'Basic realm="messenger", charset="UTF-8"', + }, + }, + }) + create(@Req() request: AuthenticatedRequest, @Body() body: unknown) { + return this.auth.login(request.headers.authorization, body); + } + + @Delete('current') + @HttpCode(HttpStatus.NO_CONTENT) + @UseGuards(UserGuard) + @ApiBearerAuth('bearerAuth') + @ApiOperation({ + operationId: 'revokeSession', + summary: 'Отзыв текущей сессии', + }) + @ApiNoContentResponse() + @ApiUnauthorizedResponse({ + headers: { + 'WWW-Authenticate': { + schema: { type: 'string' }, + example: 'Bearer realm="messenger"', + }, + }, + }) + logout(@Req() request: AuthenticatedRequest) { + return this.auth.logout(request.currentSessionId); + } +} diff --git a/src/Auth/auth.exception.ts b/src/Auth/auth.exception.ts new file mode 100644 index 00000000..e7cc4561 --- /dev/null +++ b/src/Auth/auth.exception.ts @@ -0,0 +1,18 @@ +import { HttpStatus } from '@nestjs/common'; +import { ApiException } from '../common/exceptions/api.exception'; + +export class AuthException extends ApiException { + readonly challenge: string; + + constructor(scheme: 'Basic' | 'Bearer') { + super( + HttpStatus.UNAUTHORIZED, + 'unauthorized', + 'Требуется действительная аутентификация', + ); + this.challenge = + scheme === 'Basic' + ? 'Basic realm="messenger", charset="UTF-8"' + : 'Bearer realm="messenger"'; + } +} diff --git a/src/Auth/auth.schema.ts b/src/Auth/auth.schema.ts new file mode 100644 index 00000000..394f637f --- /dev/null +++ b/src/Auth/auth.schema.ts @@ -0,0 +1,15 @@ +import { ApiProperty } from '@nestjs/swagger'; +import { User } from '../User/user.schema'; + +export class Session { + token!: string; + + @ApiProperty({ enum: ['Bearer'] }) + token_type!: 'Bearer'; + + @ApiProperty({ format: 'date-time' }) + expires_at!: string; + + @ApiProperty({ type: User }) + user!: User; +} diff --git a/src/Auth/auth.service.ts b/src/Auth/auth.service.ts new file mode 100644 index 00000000..2c9ae88f --- /dev/null +++ b/src/Auth/auth.service.ts @@ -0,0 +1,182 @@ +import { Injectable } from '@nestjs/common'; +import { createHash, randomBytes } from 'node:crypto'; +import { TextDecoder } from 'node:util'; +import { PrismaService } from '../prisma/prisma.service'; +import { Prisma } from '../generated/prisma/client'; +import { UserService } from '../User/user.service'; +import type { User } from '../User/user.schema'; +import { invalidRequest, uuid, uuidPattern } from '../common/validation'; +import { ApiException } from '../common/exceptions/api.exception'; +import { AuthException } from './auth.exception'; +import { PasswordService, validPassword } from './password.service'; +import type { Session } from './auth.schema'; + +export interface ChatAccess { + chatId: string; + userId: string; + messagesEpoch: string; +} + +@Injectable() +export class AuthService { + private readonly ttlSeconds: number; + + constructor( + private readonly prisma: PrismaService, + private readonly users: UserService, + private readonly passwords: PasswordService, + ) { + this.ttlSeconds = Number(process.env.SESSION_TTL_SECONDS ?? 3600); + if ( + !Number.isSafeInteger(this.ttlSeconds) || + this.ttlSeconds <= 0 || + Number.isNaN(new Date(Date.now() + this.ttlSeconds * 1000).getTime()) + ) { + throw new Error( + 'SESSION_TTL_SECONDS must be a positive integer representing a valid expiry', + ); + } + } + + async login(authorization: unknown, body: unknown): Promise { + const { username, password } = this.basicCredentials(authorization); + const user = await this.prisma.user.findUnique({ where: { username } }); + const verified = await this.passwords.verify( + password, + user?.passwordHash ?? null, + ); + if (!user || !verified) throw new AuthException('Basic'); + if (body !== undefined) + return invalidRequest('Вход через Basic не принимает тело запроса'); + const token = randomBytes(32).toString('base64url'); + const session = await this.prisma.session.create({ + data: { + userId: user.id, + tokenHash: this.tokenHash(token), + expiresAt: new Date(Date.now() + this.ttlSeconds * 1000), + }, + }); + return { + token, + token_type: 'Bearer', + expires_at: session.expiresAt.toISOString(), + user: this.users.serialize(user), + }; + } + + async authenticate( + authorization: unknown, + chatId?: unknown, + ): Promise<{ + user: User; + sessionId: string; + chatsEpoch: string; + chatAccess?: ChatAccess; + }> { + const match = + typeof authorization === 'string' && + /^Bearer +([A-Za-z0-9_-]{43})$/i.exec(authorization); + if (!match) throw new AuthException('Bearer'); + const requestedChat = + typeof chatId === 'string' && uuidPattern.test(chatId) + ? chatId.toLowerCase() + : null; + const [session] = await this.prisma.$queryRaw< + { + id: string; + userId: string; + username: string; + displayName: string; + createdAt: Date; + chatsEpoch: bigint; + chatId: string | null; + messagesEpoch: bigint | null; + }[] + >(Prisma.sql` + SELECT s.id, s.user_id AS "userId", u.chats_epoch AS "chatsEpoch", + u.username, u.display_name AS "displayName", u.created_at AS "createdAt", + ${ + chatId === undefined + ? Prisma.sql`NULL::uuid AS "chatId", NULL::bigint AS "messagesEpoch"` + : Prisma.sql`c.id AS "chatId", COALESCE((SELECT SUM(e.epoch) FROM "public"."chat_message_epochs" AS e WHERE e.chat_id = c.id), 0)::bigint AS "messagesEpoch"` + } + FROM sessions AS s + JOIN users AS u ON u.id = s.user_id + ${ + chatId === undefined + ? Prisma.empty + : Prisma.sql` + LEFT JOIN chat_members AS cm + ON cm.user_id = s.user_id AND cm.chat_id = ${requestedChat}::uuid + LEFT JOIN chats AS c ON c.id = cm.chat_id + ` + } + WHERE s.token_hash = ${this.tokenHash(match[1])} + AND s.revoked_at IS NULL AND s.expires_at > ${new Date()} + LIMIT 1 + `); + if (!session) throw new AuthException('Bearer'); + if (chatId !== undefined) { + uuid(chatId, 'chat_id'); + if (session.chatId === null || session.messagesEpoch === null) + throw new ApiException(404, 'not_found', 'Объект не найден'); + } + return { + user: this.users.serialize({ ...session, id: session.userId }), + sessionId: session.id, + chatsEpoch: session.chatsEpoch.toString(), + chatAccess: + session.chatId !== null && session.messagesEpoch !== null + ? { + chatId: session.chatId, + userId: session.userId, + messagesEpoch: session.messagesEpoch.toString(), + } + : undefined, + }; + } + + async logout(sessionId: string): Promise { + const now = new Date(); + const result = await this.prisma.session.updateMany({ + where: { id: sessionId, revokedAt: null, expiresAt: { gt: now } }, + data: { revokedAt: now }, + }); + if (result.count !== 1) throw new AuthException('Bearer'); + } + + private tokenHash(token: string): string { + return createHash('sha256').update(token).digest('hex'); + } + + private basicCredentials(authorization: unknown): { + username: string; + password: string; + } { + const match = + typeof authorization === 'string' && + /^Basic +([A-Za-z0-9+/]+={0,2})$/i.exec(authorization); + if (!match) throw new AuthException('Basic'); + try { + const bytes = Buffer.from(match[1], 'base64'); + if ( + bytes.toString('base64').replace(/=+$/, '') !== + match[1].replace(/=+$/, '') + ) + throw new AuthException('Basic'); + const value = new TextDecoder('utf-8', { fatal: true }).decode(bytes); + const colon = value.indexOf(':'); + const username = value.slice(0, colon); + const password = value.slice(colon + 1); + if ( + colon < 0 || + !/^[a-z0-9_]{3,32}$/.test(username) || + !validPassword(password) + ) + throw new AuthException('Basic'); + return { username, password }; + } catch { + throw new AuthException('Basic'); + } + } +} diff --git a/src/Auth/password.service.ts b/src/Auth/password.service.ts new file mode 100644 index 00000000..b1428fd6 --- /dev/null +++ b/src/Auth/password.service.ts @@ -0,0 +1,72 @@ +import { Injectable } from '@nestjs/common'; +import { argon2, randomBytes, timingSafeEqual } from 'node:crypto'; +import { invalidRequest } from '../common/validation'; + +const argonParameters = { + memory: 19456, + passes: 2, + parallelism: 1, + tagLength: 32, +}; +const argonPrefix = '$argon2id$v=19$m=19456,t=2,p=1'; + +function decodeBase64(value: string, length: number) { + const decoded = Buffer.from(value, 'base64'); + return decoded.length === length && + decoded.toString('base64').replace(/=+$/, '') === value + ? decoded + : undefined; +} + +function argonHash(value: string | null) { + const parts = value?.split('$'); + if (parts?.length !== 6 || parts.slice(0, 4).join('$') !== argonPrefix) + return undefined; + const salt = decodeBase64(parts[4], 16); + const key = decodeBase64(parts[5], 32); + return salt && key ? { salt, key } : undefined; +} + +export function validPassword(value: unknown): value is string { + if (typeof value !== 'string' || value.trim().length === 0) return false; + const length = Array.from(value).length; + return length >= 12 && length <= 128; +} + +export function registrationPassword(value: unknown): string { + if (!validPassword(value)) + return invalidRequest('Пароль должен содержать 12–128 Unicode-символов'); + return value; +} + +@Injectable() +export class PasswordService { + async hash(password: string): Promise { + const salt = randomBytes(16); + const key = await this.deriveArgon(password, salt); + return `${argonPrefix}$${salt.toString('base64').replace(/=+$/, '')}$${key.toString('base64').replace(/=+$/, '')}`; + } + + async verify(password: string, storedHash: string | null): Promise { + const stored = argonHash(storedHash); + const key = await this.deriveArgon( + password, + stored?.salt ?? Buffer.alloc(16), + ); + const matches = timingSafeEqual(key, stored?.key ?? Buffer.alloc(32)); + return Boolean(stored && matches); + } + + private deriveArgon(password: string, salt: Buffer): Promise { + return new Promise((resolve, reject) => { + argon2( + 'argon2id', + { ...argonParameters, message: password, nonce: salt }, + (error, key) => { + if (error) reject(error); + else resolve(key); + }, + ); + }); + } +} diff --git a/src/Chat/chat.controller.ts b/src/Chat/chat.controller.ts new file mode 100644 index 00000000..17baa304 --- /dev/null +++ b/src/Chat/chat.controller.ts @@ -0,0 +1,132 @@ +import { + Body, + Controller, + Get, + Headers, + HttpCode, + HttpStatus, + Param, + Post, + Query, + Req, + UseGuards, +} from '@nestjs/common'; +import { + ApiBody, + ApiBearerAuth, + ApiCreatedResponse, + ApiHeader, + ApiOkResponse, + ApiOperation, + ApiQuery, + ApiTags, +} from '@nestjs/swagger'; +import { UserGuard, type AuthenticatedRequest } from '../User/user.guard'; +import { + CreateChatDto, + CreateMessageDto, + Chat, + Message, + ChatPage, + MessagePage, +} from './chat.schema'; +import { ChatService } from './chat.service'; + +@ApiTags('chats') +@ApiBearerAuth('bearerAuth') +@UseGuards(UserGuard) +@Controller('api/v1/chats') +export class ChatController { + constructor(private readonly chats: ChatService) {} + + @Post() + @HttpCode(HttpStatus.CREATED) + @ApiBody({ type: CreateChatDto }) + @ApiOperation({ operationId: 'createChat' }) + @ApiCreatedResponse({ type: Chat }) + create(@Req() request: AuthenticatedRequest, @Body() body: unknown) { + return this.chats.create(body, request.currentUser.id); + } + + @Get() + @ApiOperation({ operationId: 'listChats' }) + @ApiOkResponse({ type: ChatPage }) + @ApiQuery({ + name: 'limit', + required: false, + schema: { type: 'integer', minimum: 1, maximum: 100, default: 50 }, + }) + @ApiQuery({ name: 'cursor', required: false, type: String }) + list( + @Req() request: AuthenticatedRequest, + @Query('limit') limit: unknown, + @Query('cursor') cursor: unknown, + ) { + return this.chats.list( + request.currentUser.id, + limit, + cursor, + request.currentChatsEpoch, + ); + } + + @Get(':chat_id') + @ApiOperation({ operationId: 'getChat' }) + @ApiOkResponse({ type: Chat }) + get(@Req() request: AuthenticatedRequest, @Param('chat_id') chatId: string) { + return this.chats.get(chatId, request.currentUser.id); + } + + @Post(':chat_id/messages') + @HttpCode(HttpStatus.CREATED) + @ApiBody({ type: CreateMessageDto }) + @ApiHeader({ + name: 'Idempotency-Key', + required: true, + schema: { + type: 'string', + minLength: 1, + maxLength: 128, + pattern: '^[A-Za-z0-9._:-]+$', + }, + }) + @ApiOperation({ operationId: 'createMessage' }) + @ApiCreatedResponse({ type: Message }) + createMessage( + @Req() request: AuthenticatedRequest, + @Param('chat_id') chatId: string, + @Headers('idempotency-key') idempotencyKey: unknown, + @Body() body: unknown, + ) { + return this.chats.createMessage( + chatId, + body, + request.currentUser.id, + idempotencyKey, + ); + } + + @Get(':chat_id/messages') + @ApiOperation({ operationId: 'listMessages' }) + @ApiOkResponse({ type: MessagePage }) + @ApiQuery({ + name: 'limit', + required: false, + schema: { type: 'integer', minimum: 1, maximum: 100, default: 50 }, + }) + @ApiQuery({ name: 'cursor', required: false, type: String }) + listMessages( + @Req() request: AuthenticatedRequest, + @Param('chat_id') chatId: string, + @Query('limit') limit: unknown, + @Query('cursor') cursor: unknown, + ) { + return this.chats.listMessages( + chatId, + request.currentUser.id, + limit, + cursor, + request.currentChatAccess, + ); + } +} diff --git a/src/Chat/chat.module.ts b/src/Chat/chat.module.ts new file mode 100644 index 00000000..ff1053ba --- /dev/null +++ b/src/Chat/chat.module.ts @@ -0,0 +1,11 @@ +import { Module } from '@nestjs/common'; +import { UserModule } from '../User/user.module'; +import { ChatController } from './chat.controller'; +import { ChatService } from './chat.service'; + +@Module({ + imports: [UserModule], + controllers: [ChatController], + providers: [ChatService], +}) +export class ChatModule {} diff --git a/src/Chat/chat.schema.ts b/src/Chat/chat.schema.ts new file mode 100644 index 00000000..1b06d170 --- /dev/null +++ b/src/Chat/chat.schema.ts @@ -0,0 +1,68 @@ +import { ApiProperty, ApiPropertyOptional } from '@nestjs/swagger'; + +export class CreateChatDto { + @ApiProperty({ example: 'Проект по ВНП', maxLength: 100 }) + title!: string; + + @ApiProperty({ type: [String], format: 'uuid' }) + member_ids!: string[]; +} + +export class CreateMessageDto { + @ApiProperty({ example: 'Привет, Боб!', maxLength: 4000 }) + text!: string; + + @ApiPropertyOptional({ + type: [String], + format: 'uuid', + maxItems: 10, + uniqueItems: true, + default: [], + }) + attachment_ids?: string[]; +} + +export class Chat { + @ApiProperty({ format: 'uuid' }) + id!: string; + @ApiProperty({ maxLength: 100 }) + title!: string; + @ApiProperty({ type: [String], format: 'uuid' }) + member_ids!: string[]; + @ApiProperty({ format: 'date-time' }) + created_at!: string; +} + +export class Message { + @ApiProperty({ format: 'uuid' }) + id!: string; + @ApiProperty({ format: 'uuid' }) + chat_id!: string; + @ApiProperty({ format: 'uuid' }) + sender_id!: string; + @ApiProperty({ maxLength: 4000 }) + text!: string; + @ApiProperty({ type: [String], format: 'uuid', maxItems: 10 }) + attachment_ids!: string[]; + @ApiProperty({ format: 'date-time' }) + created_at!: string; +} + +export class ChatPage { + @ApiProperty({ type: [Chat] }) + items!: Chat[]; + @ApiProperty({ type: String, nullable: true }) + next_cursor!: string | null; +} + +export class MessagePage { + @ApiProperty({ type: [Message] }) + items!: Message[]; + @ApiProperty({ type: String, nullable: true }) + next_cursor!: string | null; +} + +export interface Page { + items: T[]; + next_cursor: string | null; +} diff --git a/src/Chat/chat.service.ts b/src/Chat/chat.service.ts new file mode 100644 index 00000000..e144e700 --- /dev/null +++ b/src/Chat/chat.service.ts @@ -0,0 +1,432 @@ +import { HttpStatus, Injectable } from '@nestjs/common'; +import { randomUUID } from 'node:crypto'; +import type { ChatAccess } from '../Auth/auth.service'; +import { + Prisma, + type Message as StoredMessage, +} from '../generated/prisma/client'; +import { PrismaService } from '../prisma/prisma.service'; +import { ApiException } from '../common/exceptions/api.exception'; +import { + invalidRequest, + objectBody, + pageLimit, + requiredText, + uuid, +} from '../common/validation'; +import type { Chat, Message, Page } from './chat.schema'; +import { CacheService, CACHE_TTL } from '../cache/cache.service'; + +interface Cursor { + scope: string; + created_at: string; + id: string; +} + +const chatInclude = { + members: { orderBy: { position: 'asc' as const } }, +} satisfies Prisma.ChatInclude; +type StoredChat = Prisma.ChatGetPayload<{ include: typeof chatInclude }>; + +@Injectable() +export class ChatService { + private readonly idempotencyTtlSeconds: number; + + constructor( + private readonly prisma: PrismaService, + private readonly cache: CacheService, + ) { + this.idempotencyTtlSeconds = Number( + process.env.IDEMPOTENCY_TTL_SECONDS ?? 86400, + ); + if ( + !Number.isSafeInteger(this.idempotencyTtlSeconds) || + this.idempotencyTtlSeconds < 86400 || + Number.isNaN( + new Date(Date.now() + this.idempotencyTtlSeconds * 1000).getTime(), + ) + ) { + throw new Error('IDEMPOTENCY_TTL_SECONDS must be at least 86400'); + } + } + + async create(value: unknown, userId: string): Promise { + const body = objectBody(value, ['title', 'member_ids']); + const title = requiredText(body.title, 'title', 100); + if ( + !Array.isArray(body.member_ids) || + body.member_ids.length < 1 || + body.member_ids.length > 100 + ) { + return invalidRequest('Некорректный member_ids'); + } + const memberIds = body.member_ids.map((id: unknown) => + uuid(id, 'member_ids'), + ); + if ( + new Set(memberIds).size !== memberIds.length || + !memberIds.includes(userId) + ) { + return invalidRequest( + 'Список участников содержит дубликат или не содержит вызывающего', + ); + } + try { + const chat = await this.prisma.$transaction(async (tx) => { + const count = await tx.user.count({ where: { id: { in: memberIds } } }); + if (count !== memberIds.length) + return invalidRequest('Неизвестный участник чата'); + const created = await tx.chat.create({ + data: { + title, + members: { + create: memberIds.map((userId, position) => ({ + userId, + position, + })), + }, + }, + include: chatInclude, + }); + await tx.$executeRaw(Prisma.sql` + WITH locked AS MATERIALIZED ( + SELECT id FROM users + WHERE id IN (${Prisma.join(memberIds.map((id) => Prisma.sql`${id}::uuid`))}) + ORDER BY id FOR UPDATE + ) + UPDATE users AS u SET chats_epoch = u.chats_epoch + 1 + FROM locked WHERE u.id = locked.id + `); + return created; + }); + return this.serializeChat(chat); + } catch (error) { + if ( + error instanceof Prisma.PrismaClientKnownRequestError && + error.code === 'P2003' + ) { + return invalidRequest('Неизвестный участник чата'); + } + throw error; + } + } + + async list( + userId: string, + limitValue: unknown, + cursorValue: unknown, + epoch: string, + ): Promise> { + const limit = pageLimit(limitValue); + const scope = `chats:${userId}`; + const cursor = this.decodeCursor(cursorValue, scope); + return this.cache.remember( + scope, + { limit, cursor }, + CACHE_TTL.page, + async () => { + const chats = await this.prisma.chat.findMany({ + where: { members: { some: { userId } }, ...this.after(cursor) }, + include: chatInclude, + orderBy: [{ createdAt: 'asc' }, { id: 'asc' }], + take: limit + 1, + }); + return this.page( + chats.map((chat) => this.serializeChat(chat)), + limit, + scope, + ); + }, + epoch, + ); + } + + async get(value: unknown, userId: string): Promise { + const { id } = await this.authorizeChat(value, userId); + return this.getMetadata(id); + } + + private async authorizeChat(value: unknown, userId: string) { + const id = uuid(value, 'chat_id'); + const [membership] = await this.prisma.$queryRaw< + { id: string; messagesEpoch: bigint }[] + >(Prisma.sql` + SELECT c.id, COALESCE((SELECT SUM(e.epoch) FROM "public"."chat_message_epochs" AS e WHERE e.chat_id = c.id), 0)::bigint AS "messagesEpoch" + FROM chat_members AS cm JOIN chats AS c ON c.id = cm.chat_id + WHERE cm.chat_id = ${id}::uuid AND cm.user_id = ${userId}::uuid + `); + if (!membership) { + throw new ApiException( + HttpStatus.NOT_FOUND, + 'not_found', + 'Объект не найден', + ); + } + return membership; + } + + private getMetadata(id: string): Promise { + return this.cache.remember( + `chat:${id}`, + 'metadata', + CACHE_TTL.entity, + async () => { + const chat = await this.prisma.chat.findUnique({ + where: { id }, + include: chatInclude, + }); + if (!chat) + throw new ApiException( + HttpStatus.NOT_FOUND, + 'not_found', + 'Объект не найден', + ); + return this.serializeChat(chat); + }, + ); + } + + async createMessage( + chatId: unknown, + value: unknown, + userId: string, + keyValue: unknown, + ): Promise { + const id = uuid(chatId, 'chat_id'); + if ( + typeof keyValue !== 'string' || + !/^[A-Za-z0-9._:-]{1,128}$/.test(keyValue) + ) { + return invalidRequest('Некорректный Idempotency-Key'); + } + const body = objectBody(value, ['text', 'attachment_ids']); + const ids = body.attachment_ids === undefined ? [] : body.attachment_ids; + if (!Array.isArray(ids) || ids.length > 10) + return invalidRequest('Некорректный attachment_ids'); + const attachmentIds = ids.map((value: unknown) => + uuid(value, 'attachment_ids'), + ); + if (new Set(attachmentIds).size !== attachmentIds.length) + return invalidRequest('Дубликат attachment_ids'); + if ( + typeof body.text !== 'string' || + Array.from(body.text).length > 4000 || + (body.text.trim().length === 0 && attachmentIds.length === 0) + ) { + return invalidRequest('Некорректный text'); + } + const text = body.text; + await this.authorizeChat(id, userId); + const sqlAttachmentIds = `{${attachmentIds.join(',')}}`; + return this.prisma.$transaction(async (tx) => { + await tx.$executeRaw(Prisma.sql` + DELETE FROM message_idempotency + WHERE user_id = ${userId}::uuid AND chat_id = ${id}::uuid + AND "key" = ${keyValue} AND expires_at <= NOW() + `); + const claimed = await tx.$queryRaw<{ key: string }[]>(Prisma.sql` + INSERT INTO message_idempotency (user_id, chat_id, "key", expires_at) + VALUES ( + ${userId}::uuid, ${id}::uuid, ${keyValue}, + NOW() + (${this.idempotencyTtlSeconds} * INTERVAL '1 second') + ) + ON CONFLICT (user_id, chat_id, "key") DO NOTHING + RETURNING "key" + `); + if (claimed.length === 0) { + const [existing] = await tx.$queryRaw(Prisma.sql` + SELECT m.id, m.chat_id AS "chatId", m.sender_id AS "senderId", + m.text, m.attachment_ids AS "attachmentIds", m.created_at AS "createdAt" + FROM message_idempotency AS i + JOIN messages AS m ON m.id = i.message_id + WHERE i.user_id = ${userId}::uuid AND i.chat_id = ${id}::uuid + AND i."key" = ${keyValue} + `); + if (!existing) throw new Error('Idempotency record has no message'); + if ( + existing.text !== text || + JSON.stringify(existing.attachmentIds) !== + JSON.stringify(attachmentIds) + ) { + throw new ApiException( + HttpStatus.CONFLICT, + 'conflict', + 'Idempotency-Key уже использован с другим сообщением', + ); + } + return this.serializeMessage(existing); + } + + if (attachmentIds.length) { + const statuses = await tx.$queryRaw<{ status: string }[]>(Prisma.sql` + SELECT status::text FROM attachments + WHERE chat_id = ${id}::uuid AND id = ANY(${sqlAttachmentIds}::uuid[]) + ORDER BY id FOR SHARE + `); + if (statuses.length !== attachmentIds.length) + throw new ApiException(404, 'not_found', 'Вложение не найдено'); + if (statuses.some(({ status }) => status === 'failed')) + throw new ApiException(409, 'conflict', 'Обработка вложения завершилась ошибкой'); + } + + const messageId = randomUUID(); + const bucket = parseInt(messageId.slice(0, 2), 16) % 16; + const [message] = await tx.$queryRaw(Prisma.sql` + WITH updated AS ( + INSERT INTO "public"."chat_message_epochs" AS e (chat_id, bucket, epoch) + SELECT cm.chat_id, ${bucket}::smallint, 1 FROM chat_members AS cm + WHERE cm.chat_id = ${id}::uuid AND cm.user_id = ${userId}::uuid + ON CONFLICT (chat_id, bucket) DO UPDATE SET epoch = e.epoch + 1 + RETURNING chat_id + ) + INSERT INTO messages (id, chat_id, sender_id, text, attachment_ids) + SELECT ${messageId}::uuid, updated.chat_id, ${userId}::uuid, ${text}, ${sqlAttachmentIds}::uuid[] FROM updated + RETURNING id, chat_id AS "chatId", sender_id AS "senderId", text, attachment_ids AS "attachmentIds", created_at AS "createdAt" + `); + if (!message) + throw new ApiException( + HttpStatus.NOT_FOUND, + 'not_found', + 'Объект не найден', + ); + await tx.$executeRaw(Prisma.sql` + UPDATE message_idempotency SET message_id = ${message.id}::uuid + WHERE user_id = ${userId}::uuid AND chat_id = ${id}::uuid + AND "key" = ${keyValue} + `); + return this.serializeMessage(message); + }); + } + + async listMessages( + chatId: unknown, + userId: string, + limitValue: unknown, + cursorValue: unknown, + access?: ChatAccess, + ): Promise> { + const id = uuid(chatId, 'chat_id'); + const chat = + access?.chatId === id && access.userId === userId + ? { id, messagesEpoch: access.messagesEpoch } + : await this.authorizeChat(id, userId); + const limit = pageLimit(limitValue); + const scope = `messages:${chat.id}`; + const cursor = this.decodeCursor(cursorValue, scope); + return this.cache.remember( + scope, + { limit, cursor }, + CACHE_TTL.page, + async () => { + const messages = cursor + ? await this.prisma.$queryRaw(Prisma.sql` + SELECT id, chat_id AS "chatId", sender_id AS "senderId", + text, attachment_ids AS "attachmentIds", created_at AS "createdAt" + FROM "public"."messages" + WHERE chat_id = ${chat.id}::uuid + AND (created_at, id) > + (${new Date(cursor.created_at)}::timestamptz, ${cursor.id}::uuid) + ORDER BY created_at ASC, id ASC + LIMIT ${limit + 1} + `) + : await this.prisma.message.findMany({ + where: { chatId: chat.id }, + orderBy: [{ createdAt: 'asc' }, { id: 'asc' }], + take: limit + 1, + }); + return this.page( + messages.map((message) => this.serializeMessage(message)), + limit, + scope, + ); + }, + chat.messagesEpoch.toString(), + ); + } + + private after(cursor: Cursor | null) { + if (!cursor) return {}; + const createdAt = new Date(cursor.created_at); + return { + OR: [ + { createdAt: { gt: createdAt } }, + { createdAt, id: { gt: cursor.id } }, + ], + }; + } + + private serializeChat(chat: StoredChat): Chat { + return { + id: chat.id, + title: chat.title, + member_ids: chat.members.map((member) => member.userId), + created_at: chat.createdAt.toISOString(), + }; + } + + private serializeMessage(message: StoredMessage): Message { + return { + id: message.id, + chat_id: message.chatId, + sender_id: message.senderId, + text: message.text, + attachment_ids: message.attachmentIds, + created_at: message.createdAt.toISOString(), + }; + } + + private page( + items: T[], + limit: number, + scope: string, + ): Page { + const result = items.slice(0, limit); + const last = result.at(-1); + return { + items: result, + next_cursor: + items.length > limit && last + ? Buffer.from( + JSON.stringify({ + scope, + created_at: last.created_at, + id: last.id, + }), + ).toString('base64url') + : null, + }; + } + + private decodeCursor(value: unknown, scope: string): Cursor | null { + if (value === undefined) return null; + if (typeof value !== 'string' || !/^[A-Za-z0-9_-]+$/.test(value)) + return invalidRequest('Некорректный cursor'); + try { + const cursor: unknown = JSON.parse( + Buffer.from(value, 'base64url').toString('utf8'), + ); + if ( + typeof cursor !== 'object' || + cursor === null || + Array.isArray(cursor) + ) + return invalidRequest('Некорректный cursor'); + const data = cursor as Record; + if ( + data.scope !== scope || + typeof data.created_at !== 'string' || + Number.isNaN(Date.parse(data.created_at)) || + typeof data.id !== 'string' + ) { + return invalidRequest('Некорректный cursor'); + } + return { + scope, + created_at: data.created_at, + id: uuid(data.id, 'cursor'), + }; + } catch { + return invalidRequest('Некорректный cursor'); + } + } +} diff --git a/src/Storage/storage.module.ts b/src/Storage/storage.module.ts new file mode 100644 index 00000000..58713ac7 --- /dev/null +++ b/src/Storage/storage.module.ts @@ -0,0 +1,5 @@ +import { Module } from '@nestjs/common'; +import { StorageService } from './storage.service'; + +@Module({ providers: [StorageService], exports: [StorageService] }) +export class StorageModule {} diff --git a/src/Storage/storage.service.spec.ts b/src/Storage/storage.service.spec.ts new file mode 100644 index 00000000..a4e7744e --- /dev/null +++ b/src/Storage/storage.service.spec.ts @@ -0,0 +1,136 @@ +import { S3Client } from '@aws-sdk/client-s3'; +import { createHash } from 'node:crypto'; +import { mkdtemp, readFile, rm, rmdir } from 'node:fs/promises'; +import { tmpdir } from 'node:os'; +import { join } from 'node:path'; +import { Readable } from 'node:stream'; +import { StorageService } from './storage.service'; + +describe('direct upload storage constraints', () => { + let storage: StorageService; + let directory: string; + let saved: Record; + const names = [ + 'S3_ACCESS_KEY_ID', + 'S3_SECRET_ACCESS_KEY', + 'S3_ACCESS_KEY_ID_FILE', + 'S3_SECRET_ACCESS_KEY_FILE', + 'S3_PUBLIC_ENDPOINT', + ]; + const data = Buffer.from('streamed fixture'); + const sha256 = createHash('sha256').update(data).digest('hex'); + beforeEach(async () => { + saved = Object.fromEntries(names.map((name) => [name, process.env[name]])); + for (const name of names) delete process.env[name]; + process.env.S3_ACCESS_KEY_ID = 'UNITONLY'; + process.env.S3_SECRET_ACCESS_KEY = 'unit-only-synthetic-secret'; + process.env.S3_PUBLIC_ENDPOINT = 'http://127.0.0.1:9000'; + storage = new StorageService(); + directory = await mkdtemp(join(tmpdir(), 'storage-unit-')); + }); + afterEach(async () => { + jest.restoreAllMocks(); + storage.onModuleDestroy(); + await rm(join(directory, 'image'), { force: true }); + await rmdir(directory); + for (const name of names) { + if (saved[name] === undefined) delete process.env[name]; + else process.env[name] = saved[name]; + } + }); + it('binds size, MIME, checksum and create-only semantics into the signature', async () => { + const grant = await storage.presignPut( + 'staging/test/object', + data.length, + 'image/png', + sha256, + 60, + new Date(), + ); + const url = new URL(grant.url); + const signed = url.searchParams.get('X-Amz-SignedHeaders')?.split(';'); + expect(signed).toEqual( + expect.arrayContaining([ + 'content-length', + 'content-type', + 'if-none-match', + 'x-amz-checksum-sha256', + ]), + ); + expect(grant.headers['If-None-Match']).toBe('*'); + expect(url.origin).toBe('http://127.0.0.1:9000'); + expect(url.searchParams.get('X-Amz-Expires')).toBe('60'); + }); + it('hashes a bounded stream to disk, returning its source ETag', async () => { + jest.spyOn(S3Client.prototype, 'send').mockResolvedValue({ + Body: Readable.from([data]), + ContentLength: data.length, + ContentType: 'image/png', + ETag: '"etag"', + } as never); + await expect( + storage.inspectToFile('staging/test/object', join(directory, 'image'), { + sizeBytes: data.length, + sha256, + contentType: 'image/png', + }), + ).resolves.toBe('"etag"'); + expect(await readFile(join(directory, 'image'))).toEqual(data); + }); + it('propagates an attempt deadline to the S3 request and response stream', async () => { + const deadline = new AbortController(); + const body = new Readable({ read: () => deadline.abort() }); + const send = jest.spyOn(S3Client.prototype, 'send').mockResolvedValue({ + Body: body, + ContentLength: data.length, + ContentType: 'image/png', + ETag: '"etag"', + } as never); + await expect( + storage.inspectToFile( + 'staging/test/object', + join(directory, 'image'), + { + sizeBytes: data.length, + sha256, + contentType: 'image/png', + }, + deadline.signal, + ), + ).rejects.toMatchObject({ status: 503 }); + expect(send).toHaveBeenCalledWith(expect.anything(), { + abortSignal: expect.objectContaining({ aborted: true }), + }); + expect(body.destroyed).toBe(true); + }); + it('rejects a real checksum mismatch and a stream larger than its declared length', async () => { + const send = jest.spyOn(S3Client.prototype, 'send'); + send.mockResolvedValueOnce({ + Body: Readable.from([data]), + ContentLength: data.length, + ContentType: 'image/png', + ETag: '"etag"', + } as never); + await expect( + storage.inspectToFile('staging/test/object', join(directory, 'image'), { + sizeBytes: data.length, + sha256: '0'.repeat(64), + contentType: 'image/png', + }), + ).rejects.toMatchObject({ status: 400 }); + await rm(join(directory, 'image')); + send.mockResolvedValueOnce({ + Body: Readable.from([data, data]), + ContentLength: data.length, + ContentType: 'image/png', + ETag: '"etag"', + } as never); + await expect( + storage.inspectToFile('staging/test/object', join(directory, 'image'), { + sizeBytes: data.length, + sha256, + contentType: 'image/png', + }), + ).rejects.toMatchObject({ status: 413 }); + }); +}); diff --git a/src/Storage/storage.service.ts b/src/Storage/storage.service.ts new file mode 100644 index 00000000..1cd08135 --- /dev/null +++ b/src/Storage/storage.service.ts @@ -0,0 +1,355 @@ +import { Injectable, type OnModuleDestroy } from '@nestjs/common'; +import { createWriteStream, readFileSync } from 'node:fs'; +import { createHash } from 'node:crypto'; +import { Readable, Transform } from 'node:stream'; +import { pipeline } from 'node:stream/promises'; +import { getSignedUrl } from '@aws-sdk/s3-request-presigner'; +import { + S3Client, + GetBucketLocationCommand, + PutObjectCommand, + GetObjectCommand, + DeleteObjectCommand, + HeadObjectCommand, + ListObjectsV2Command, + CopyObjectCommand, +} from '@aws-sdk/client-s3'; +import { ApiException } from '../common/exceptions/api.exception'; +import { profileStage } from '../common/http/upload-memory-profile'; + +export interface StoredObject { + key: string; + lastModified?: Date; +} + +function credential(name: string): string { + const file = process.env[`${name}_FILE`]; + const value = file ? readFileSync(file, 'utf8').trim() : process.env[name]; + if (!value) throw new Error(`${name} or ${name}_FILE is required`); + return value; +} + +@Injectable() +export class StorageService implements OnModuleDestroy { + private readonly bucket = process.env.S3_BUCKET ?? 'messenger-attachments'; + private readonly client: S3Client; + private readonly signer: S3Client; + + constructor() { + this.client = new S3Client({ + endpoint: process.env.S3_ENDPOINT ?? 'http://s3:9000', + region: process.env.S3_REGION ?? 'us-east-1', + forcePathStyle: true, + maxAttempts: 1, + credentials: { + accessKeyId: credential('S3_ACCESS_KEY_ID'), + secretAccessKey: credential('S3_SECRET_ACCESS_KEY'), + }, + requestHandler: { connectionTimeout: 2000, socketTimeout: 5000 }, + }); + const endpoint = new URL( + process.env.S3_PUBLIC_ENDPOINT ?? 'http://127.0.0.1:9000', + ); + if ( + !['http:', 'https:'].includes(endpoint.protocol) || + endpoint.username || + endpoint.password || + endpoint.search || + endpoint.hash || + endpoint.pathname !== '/' + ) { + throw new Error( + 'S3_PUBLIC_ENDPOINT must be an HTTP(S) origin without credentials or a path', + ); + } + this.signer = new S3Client({ + endpoint: endpoint.origin, + region: process.env.S3_REGION ?? 'us-east-1', + forcePathStyle: true, + requestChecksumCalculation: 'WHEN_REQUIRED', + credentials: { + accessKeyId: credential('S3_ACCESS_KEY_ID'), + secretAccessKey: credential('S3_SECRET_ACCESS_KEY'), + }, + }); + } + + async presignPut( + key: string, + size: number, + contentType: string, + sha256: string, + seconds: number, + now: Date, + ) { + const checksum = Buffer.from(sha256, 'hex').toString('base64'); + const url = await getSignedUrl( + this.signer, + new PutObjectCommand({ + Bucket: this.bucket, + Key: key, + ContentLength: size, + ContentType: contentType, + ChecksumSHA256: checksum, + IfNoneMatch: '*', + }), + { + expiresIn: seconds, + signingDate: now, + signableHeaders: new Set([ + 'content-length', + 'content-type', + 'if-none-match', + ]), + unhoistableHeaders: new Set(['x-amz-checksum-sha256']), + }, + ); + const signed = + new URL(url).searchParams.get('X-Amz-SignedHeaders')?.split(';') ?? []; + if ( + ![ + 'content-length', + 'content-type', + 'if-none-match', + 'x-amz-checksum-sha256', + ].every((name) => signed.includes(name)) + ) { + throw new Error('Presigner omitted a required upload constraint'); + } + return { + url, + headers: { + 'Content-Type': contentType, + 'Content-Length': String(size), + 'If-None-Match': '*', + 'x-amz-checksum-sha256': checksum, + }, + }; + } + + async inspectToFile( + key: string, + filename: string, + expected: { sizeBytes: number; contentType: string; sha256: string }, + signal?: AbortSignal, + ) { + return this.run(async () => { + let object; + try { + object = await this.client.send( + new GetObjectCommand({ Bucket: this.bucket, Key: key }), + { abortSignal: this.operationSignal(15000, signal) }, + ); + } catch (error) { + if ( + typeof error === 'object' && + error !== null && + '$metadata' in error && + (error.$metadata as { httpStatusCode?: number } | undefined) + ?.httpStatusCode === 404 + ) { + throw new ApiException(409, 'conflict', 'Файл ещё не загружен'); + } + throw error; + } + if (!(object.Body instanceof Readable)) + throw new Error('Missing S3 body'); + const body = object.Body; + try { + if (object.ContentLength !== expected.sizeBytes) + throw new ApiException( + (object.ContentLength ?? 0) > 10485760 ? 413 : 400, + (object.ContentLength ?? 0) > 10485760 + ? 'payload_too_large' + : 'invalid_request', + 'Размер файла не совпадает с разрешением', + ); + if (object.ContentType !== expected.contentType) + throw new ApiException( + 415, + 'unsupported_media_type', + 'Content-Type не совпадает с разрешением', + ); + if (!object.ETag) throw new Error('S3 did not provide an ETag'); + const hash = createHash('sha256'); + let received = 0; + const bounded = new Transform({ + transform(chunk: Buffer, _encoding, done) { + received += chunk.length; + if (received > expected.sizeBytes) { + done( + new ApiException( + 413, + 'payload_too_large', + 'Превышен разрешённый размер', + ), + ); + return; + } + hash.update(chunk); + done(null, chunk); + }, + }); + profileStage('s3_stream_sha256_to_file'); + await pipeline( + body, + bounded, + createWriteStream(filename, { flags: 'wx', mode: 0o600 }), + { signal: this.operationSignal(15000, signal) }, + ); + profileStage('sha256_finalize'); + if ( + received !== expected.sizeBytes || + hash.digest('hex') !== expected.sha256 + ) + throw new ApiException( + 400, + 'invalid_request', + 'Checksum или размер файла не совпадает', + ); + return object.ETag; + } finally { + body.destroy(); + } + }); + } + + async publishCopy( + source: string, + destination: string, + etag: string, + signal?: AbortSignal, + ): Promise { + await this.run(() => + this.client.send( + new CopyObjectCommand({ + Bucket: this.bucket, + Key: destination, + CopySource: `${this.bucket}/${source.split('/').map(encodeURIComponent).join('/')}`, + CopySourceIfMatch: etag, + MetadataDirective: 'COPY', + }), + { abortSignal: this.operationSignal(5000, signal) }, + ), + ); + } + + async ready(): Promise { + await this.run(() => + this.client.send(new GetBucketLocationCommand({ Bucket: this.bucket }), { + abortSignal: AbortSignal.timeout(5000), + }), + ); + } + + async put( + key: string, + bytes: Buffer, + contentType: string, + signal?: AbortSignal, + ): Promise { + await this.run(() => + this.client.send( + new PutObjectCommand({ + Bucket: this.bucket, + Key: key, + Body: bytes, + ContentLength: bytes.length, + ContentType: contentType, + }), + { abortSignal: this.operationSignal(5000, signal) }, + ), + ); + } + + async get(key: string): Promise { + return this.run(async () => { + const result = await this.client.send( + new GetObjectCommand({ Bucket: this.bucket, Key: key }), + { abortSignal: AbortSignal.timeout(5000) }, + ); + if (!(result.Body instanceof Readable)) + throw new Error('Missing S3 body'); + return result.Body; + }); + } + + async remove(key: string): Promise { + await this.run(() => + this.client.send( + new DeleteObjectCommand({ Bucket: this.bucket, Key: key }), + { abortSignal: AbortSignal.timeout(5000) }, + ), + ); + } + + async *objects(prefix: string): AsyncGenerator { + let token: string | undefined; + do { + const page = await this.run(() => + this.client.send( + new ListObjectsV2Command({ + Bucket: this.bucket, + Prefix: prefix, + MaxKeys: 200, + ContinuationToken: token, + }), + { abortSignal: AbortSignal.timeout(5000) }, + ), + ); + for (const object of page.Contents ?? []) { + if (object.Key) + yield { key: object.Key, lastModified: object.LastModified }; + } + if (!page.IsTruncated) break; + if (!page.NextContinuationToken || page.NextContinuationToken === token) { + throw new ApiException(503, 'unavailable', 'Некорректная страница S3'); + } + token = page.NextContinuationToken; + } while (token); + } + + async stat(key: string): Promise { + return this.run(async () => { + try { + const object = await this.client.send( + new HeadObjectCommand({ Bucket: this.bucket, Key: key }), + { abortSignal: AbortSignal.timeout(5000) }, + ); + return { key, lastModified: object.LastModified }; + } catch (error) { + if ( + typeof error === 'object' && + error !== null && + '$metadata' in error + ) { + const metadata = error.$metadata as + { httpStatusCode?: number } | undefined; + if (metadata?.httpStatusCode === 404) return null; + } + throw error; + } + }); + } + + onModuleDestroy(): void { + this.client.destroy(); + this.signer.destroy(); + } + + private operationSignal(timeoutMs: number, signal?: AbortSignal) { + const timeout = AbortSignal.timeout(timeoutMs); + return signal ? AbortSignal.any([timeout, signal]) : timeout; + } + + private async run(operation: () => Promise): Promise { + try { + return await operation(); + } catch (cause) { + if (cause instanceof ApiException) throw cause; + throw new ApiException(503, 'unavailable', 'Хранилище недоступно', { + cause, + }); + } + } +} diff --git a/src/User/user.controller.ts b/src/User/user.controller.ts new file mode 100644 index 00000000..1a34887f --- /dev/null +++ b/src/User/user.controller.ts @@ -0,0 +1,45 @@ +import { + Body, + Controller, + Get, + HttpCode, + HttpStatus, + Post, + Req, + UseGuards, +} from '@nestjs/common'; +import { + ApiBody, + ApiBearerAuth, + ApiCreatedResponse, + ApiOkResponse, + ApiOperation, + ApiTags, +} from '@nestjs/swagger'; +import { UserGuard, type AuthenticatedRequest } from './user.guard'; +import { CreateUserDto, User } from './user.schema'; +import { UserService } from './user.service'; + +@ApiTags('users') +@Controller('api/v1/users') +export class UserController { + constructor(private readonly users: UserService) {} + + @Post() + @HttpCode(HttpStatus.CREATED) + @ApiBody({ type: CreateUserDto }) + @ApiOperation({ operationId: 'registerUser' }) + @ApiCreatedResponse({ type: User }) + create(@Body() body: unknown) { + return this.users.create(body); + } + + @Get('me') + @UseGuards(UserGuard) + @ApiBearerAuth('bearerAuth') + @ApiOperation({ operationId: 'currentUser' }) + @ApiOkResponse({ type: User }) + me(@Req() request: AuthenticatedRequest) { + return request.currentUser; + } +} diff --git a/src/User/user.guard.ts b/src/User/user.guard.ts new file mode 100644 index 00000000..108fca4b --- /dev/null +++ b/src/User/user.guard.ts @@ -0,0 +1,34 @@ +import { CanActivate, ExecutionContext, Injectable } from '@nestjs/common'; +import type { FastifyRequest } from 'fastify'; +import { AuthService, type ChatAccess } from '../Auth/auth.service'; +import type { User } from './user.schema'; + +export type AuthenticatedRequest = FastifyRequest & { + currentUser: User; + currentSessionId: string; + currentChatsEpoch: string; + currentChatAccess?: ChatAccess; +}; + +@Injectable() +export class UserGuard implements CanActivate { + constructor(private readonly auth: AuthService) {} + + async canActivate(context: ExecutionContext): Promise { + const request = context.switchToHttp().getRequest(); + const chatId = + request.method === 'GET' && + request.routeOptions.url === '/api/v1/chats/:chat_id/messages' + ? (request.params as { chat_id: string }).chat_id + : undefined; + const session = await this.auth.authenticate( + request.headers.authorization, + chatId, + ); + request.currentUser = session.user; + request.currentSessionId = session.sessionId; + request.currentChatsEpoch = session.chatsEpoch; + request.currentChatAccess = session.chatAccess; + return true; + } +} diff --git a/src/User/user.module.ts b/src/User/user.module.ts new file mode 100644 index 00000000..f90c564f --- /dev/null +++ b/src/User/user.module.ts @@ -0,0 +1,14 @@ +import { Module } from '@nestjs/common'; +import { UserController } from './user.controller'; +import { UserGuard } from './user.guard'; +import { UserService } from './user.service'; +import { AuthController } from '../Auth/auth.controller'; +import { AuthService } from '../Auth/auth.service'; +import { PasswordService } from '../Auth/password.service'; + +@Module({ + controllers: [UserController, AuthController], + providers: [UserService, UserGuard, AuthService, PasswordService], + exports: [UserService, UserGuard, AuthService], +}) +export class UserModule {} diff --git a/src/User/user.schema.ts b/src/User/user.schema.ts new file mode 100644 index 00000000..7974ebba --- /dev/null +++ b/src/User/user.schema.ts @@ -0,0 +1,28 @@ +import { ApiProperty } from '@nestjs/swagger'; + +export class CreateUserDto { + @ApiProperty({ example: 'alice', pattern: '^[a-z0-9_]{3,32}$' }) + username!: string; + + @ApiProperty({ example: 'Алиса', maxLength: 100 }) + display_name!: string; + + @ApiProperty({ + writeOnly: true, + minLength: 12, + maxLength: 128, + example: 'Example-only-not-a-real-secret-123', + }) + password!: string; +} + +export class User { + @ApiProperty({ format: 'uuid' }) + id!: string; + @ApiProperty({ pattern: '^[a-z0-9_]{3,32}$' }) + username!: string; + @ApiProperty({ minLength: 1, maxLength: 100 }) + display_name!: string; + @ApiProperty({ format: 'date-time' }) + created_at!: string; +} diff --git a/src/User/user.service.ts b/src/User/user.service.ts new file mode 100644 index 00000000..bec2bb86 --- /dev/null +++ b/src/User/user.service.ts @@ -0,0 +1,77 @@ +import { HttpStatus, Injectable } from '@nestjs/common'; +import { Prisma, type User as StoredUser } from '../generated/prisma/client'; +import { PrismaService } from '../prisma/prisma.service'; +import { ApiException } from '../common/exceptions/api.exception'; +import { objectBody, requiredText } from '../common/validation'; +import { + PasswordService, + registrationPassword, +} from '../Auth/password.service'; +import type { User } from './user.schema'; +import { CacheService, CACHE_TTL } from '../cache/cache.service'; + +@Injectable() +export class UserService { + constructor( + private readonly prisma: PrismaService, + private readonly passwords: PasswordService, + private readonly cache: CacheService, + ) {} + + async create(value: unknown): Promise { + const body = objectBody(value, ['username', 'display_name', 'password']); + const username = body.username; + if (typeof username !== 'string' || !/^[a-z0-9_]{3,32}$/.test(username)) { + throw new ApiException( + HttpStatus.BAD_REQUEST, + 'invalid_request', + 'Некорректный username', + ); + } + const displayName = requiredText(body.display_name, 'display_name', 100); + const password = registrationPassword(body.password); + const passwordHash = await this.passwords.hash(password); + try { + return this.serialize( + await this.prisma.user.create({ + data: { username, displayName, passwordHash }, + }), + ); + } catch (error) { + if ( + error instanceof Prisma.PrismaClientKnownRequestError && + error.code === 'P2002' + ) { + throw new ApiException( + HttpStatus.CONFLICT, + 'conflict', + 'Username уже занят', + ); + } + throw error; + } + } + + async get(id: string): Promise { + return this.cache.remember( + `user:${id}`, + 'profile', + CACHE_TTL.entity, + async () => { + const user = await this.prisma.user.findUnique({ where: { id } }); + return user ? this.serialize(user) : undefined; + }, + ); + } + + serialize( + user: Pick, + ): User { + return { + id: user.id, + username: user.username, + display_name: user.displayName, + created_at: user.createdAt.toISOString(), + }; + } +} diff --git a/src/app.controller.spec.ts b/src/app.controller.spec.ts new file mode 100644 index 00000000..f3be1bd0 --- /dev/null +++ b/src/app.controller.spec.ts @@ -0,0 +1,43 @@ +import { Test, TestingModule } from '@nestjs/testing'; +import { AppController } from './app.controller'; +import { AppService } from './app.service'; +import { PrismaService } from './prisma/prisma.service'; +import { StorageService } from './Storage/storage.service'; + +describe('AppController', () => { + let appController: AppController; + const queryRaw = jest.fn(); + + beforeEach(async () => { + queryRaw.mockReset(); + const app: TestingModule = await Test.createTestingModule({ + controllers: [AppController], + providers: [ + AppService, + { provide: PrismaService, useValue: { $queryRaw: queryRaw } }, + { + provide: StorageService, + useValue: { ready: jest.fn().mockResolvedValue(undefined) }, + }, + ], + }).compile(); + + appController = app.get(AppController); + }); + + describe('root', () => { + it('should return "Hello World!"', () => { + expect(appController.getHello()).toBe('Hello World!'); + }); + }); + + it('reports ready when PostgreSQL is reachable', async () => { + queryRaw.mockResolvedValue([{ '?column?': 1 }]); + await expect(appController.ready()).resolves.toEqual({ status: 'ok' }); + }); + + it('returns 503 when PostgreSQL is unavailable', async () => { + queryRaw.mockRejectedValue(new Error('connection refused')); + await expect(appController.ready()).rejects.toMatchObject({ status: 503 }); + }); +}); diff --git a/src/app.controller.ts b/src/app.controller.ts new file mode 100644 index 00000000..ecbb684d --- /dev/null +++ b/src/app.controller.ts @@ -0,0 +1,55 @@ +import { Controller, Get, HttpStatus } from '@nestjs/common'; +import { HttpAdapterHost } from '@nestjs/core'; +import { AppService } from './app.service'; +import { PrismaService } from './prisma/prisma.service'; +import { ApiException } from './common/exceptions/api.exception'; +import { DrainingFastifyAdapter } from './common/http/fastify-adapter'; +import { StorageService } from './Storage/storage.service'; + +@Controller() +export class AppController { + constructor( + private readonly appService: AppService, + private readonly prisma: PrismaService, + private readonly adapterHost: HttpAdapterHost, + private readonly storage: StorageService, + ) {} + + @Get() + getHello(): string { + return this.appService.getHello(); + } + + @Get('health/live') + live() { + return { status: 'ok' }; + } + + @Get('health/ready') + async ready() { + this.assertNotDraining(); + try { + await this.prisma.$queryRaw`SELECT 1`; + } catch { + throw new ApiException( + HttpStatus.SERVICE_UNAVAILABLE, + 'unavailable', + 'База данных недоступна', + ); + } + await this.storage.ready(); + this.assertNotDraining(); + return { status: 'ok' }; + } + + private assertNotDraining(): void { + const adapter = this.adapterHost.httpAdapter; + if (adapter instanceof DrainingFastifyAdapter && adapter.isDraining) { + throw new ApiException( + HttpStatus.SERVICE_UNAVAILABLE, + 'unavailable', + 'API завершает работу', + ); + } + } +} diff --git a/src/app.module.ts b/src/app.module.ts new file mode 100644 index 00000000..9bdfd12e --- /dev/null +++ b/src/app.module.ts @@ -0,0 +1,62 @@ +import { Module } from '@nestjs/common'; +import { APP_FILTER } from '@nestjs/core'; +import { LoggerModule } from 'nestjs-pino'; +import { AppController } from './app.controller'; +import { AppService } from './app.service'; +import { AllExceptionsFilter } from './common/filters/all-exceptions.filter'; +import { UserModule } from './User/user.module'; +import { ChatModule } from './Chat/chat.module'; +import { PrismaModule } from './prisma/prisma.module'; +import { CacheModule } from './cache/cache.module'; +import { AttachmentModule } from './Attachment/attachment.module'; +import { StorageModule } from './Storage/storage.module'; + +@Module({ + imports: [ + PrismaModule, + CacheModule, + UserModule, + ChatModule, + AttachmentModule, + StorageModule, + LoggerModule.forRoot({ + pinoHttp: { + level: process.env.NODE_ENV === 'production' ? 'info' : 'debug', + + transport: + process.env.NODE_ENV !== 'production' + ? { + target: 'pino-pretty', + options: { + colorize: true, + singleLine: true, + translateTime: 'SYS:standard', + }, + } + : undefined, + + redact: { + paths: [ + 'req.headers.authorization', + 'req.headers.cookie', + 'res.headers.set-cookie', + ], + censor: '[REDACTED]', + }, + + autoLogging: { + ignore: (request) => request.url === '/health', + }, + }, + }), + ], + controllers: [AppController], + providers: [ + AppService, + { + provide: APP_FILTER, + useClass: AllExceptionsFilter, + }, + ], +}) +export class AppModule {} diff --git a/src/app.service.ts b/src/app.service.ts new file mode 100644 index 00000000..927d7cca --- /dev/null +++ b/src/app.service.ts @@ -0,0 +1,8 @@ +import { Injectable } from '@nestjs/common'; + +@Injectable() +export class AppService { + getHello(): string { + return 'Hello World!'; + } +} diff --git a/src/attachment-worker.main.ts b/src/attachment-worker.main.ts new file mode 100644 index 00000000..37dfe729 --- /dev/null +++ b/src/attachment-worker.main.ts @@ -0,0 +1,108 @@ +import { + ATTACHMENT_GROUP, + ATTACHMENT_TOPIC, + attachmentKafka, + parseAttachmentJob, +} from './Attachment/attachment-kafka'; +import sharp from 'sharp'; +import { + AttachmentAttemptTimeout, + AttachmentWorker, +} from './Attachment/attachment-worker'; +import { PrismaService } from './prisma/prisma.service'; +import { StorageService } from './Storage/storage.service'; + +function setting(name: string, defaultValue: number, min: number, max: number) { + const value = Number(process.env[name] ?? defaultValue); + if (!Number.isSafeInteger(value) || value < min || value > max) + throw new Error(`${name} must be between ${min} and ${max}`); + return value; +} + +async function main() { + sharp.cache(false); + sharp.concurrency(1); + const concurrency = setting('WORKER_CONCURRENCY', 1, 1, 4); + const maxBytesPerPartition = setting( + 'WORKER_PREFETCH_BYTES', + 1048576, + 1024, + 1048576, + ); + const stop = new AbortController(); + const db = new PrismaService(); + const worker = new AttachmentWorker(db, new StorageService()); + const consumer = attachmentKafka('attachment-worker').consumer({ + groupId: ATTACHMENT_GROUP, + allowAutoTopicCreation: false, + maxBytesPerPartition, + sessionTimeout: 150000, + retry: { retries: 8, maxRetryTime: 5000 }, + }); + consumer.on(consumer.events.CRASH, ({ payload }) => { + if (!stop.signal.aborted && !payload.restart) { + console.error('Attachment consumer stopped'); + process.exit(1); + } + }); + await db.$connect(); + await consumer.connect(); + await consumer.subscribe({ topic: ATTACHMENT_TOPIC, fromBeginning: true }); + const shutdown = async () => { + if (stop.signal.aborted) return; + stop.abort(); + try { + await consumer.disconnect(); + await db.$disconnect(); + } catch { + console.error('Attachment worker shutdown failed'); + process.exit(1); + } + }; + process.on('SIGTERM', () => { + void shutdown(); + }); + process.on('SIGINT', () => { + void shutdown(); + }); + await consumer.run({ + autoCommit: false, + partitionsConsumedConcurrently: concurrency, + eachMessage: async (payload) => { + const { topic, partition, message } = payload; + const job = parseAttachmentJob(message.value, message.key); + if (!job) + console.warn('Ignoring an invalid Kafka attachment job', { + partition, + offset: message.offset, + }); + if ( + !job || + (await worker + .process(job, () => payload.heartbeat(), stop.signal) + .catch((error: unknown) => { + if (error instanceof AttachmentAttemptTimeout) { + console.error( + 'Attachment processing deadline reached. Restarting worker.', + ); + process.exit(1); + } + throw error; + })) + ) { + await consumer.commitOffsets([ + { + topic, + partition, + offset: (BigInt(message.offset) + 1n).toString(), + }, + ]); + } + }, + }); +} + +void main().catch(() => { + console.error('Attachment worker startup failed'); + process.exit(1); +}); diff --git a/src/cache/cache.module.ts b/src/cache/cache.module.ts new file mode 100644 index 00000000..2d194dd8 --- /dev/null +++ b/src/cache/cache.module.ts @@ -0,0 +1,6 @@ +import { Global, Module } from '@nestjs/common'; +import { CacheService } from './cache.service'; + +@Global() +@Module({ providers: [CacheService], exports: [CacheService] }) +export class CacheModule {} diff --git a/src/cache/cache.service.ts b/src/cache/cache.service.ts new file mode 100644 index 00000000..816debf7 --- /dev/null +++ b/src/cache/cache.service.ts @@ -0,0 +1,149 @@ +import { + Injectable, + Logger, + type OnModuleDestroy, + type OnModuleInit, +} from '@nestjs/common'; +import { createHash, randomUUID } from 'node:crypto'; +import Redis from 'ioredis'; + +export const CACHE_TTL = { entity: 300, page: 30 } as const; +const generationTtl = 600; +const storeIfCurrent = ` +if redis.call('GET', KEYS[1]) == ARGV[1] then + return redis.call('SET', KEYS[2], ARGV[2], 'EX', ARGV[3]) +end +return false`; + +@Injectable() +export class CacheService implements OnModuleInit, OnModuleDestroy { + private readonly logger = new Logger(CacheService.name); + private readonly redis?: Redis; + private readonly prefix = process.env.CACHE_PREFIX ?? 'messenger:cache:v1'; + private warned = false; + + constructor() { + if (process.env.CACHE_URL) { + this.redis = new Redis(process.env.CACHE_URL, { + lazyConnect: true, + connectTimeout: 1000, + commandTimeout: 300, + maxRetriesPerRequest: 0, + enableOfflineQueue: false, + autoResendUnfulfilledCommands: false, + retryStrategy: () => 1000, + }); + this.redis.on('error', () => this.unavailable()); + this.redis.on('ready', () => { + this.warned = false; + }); + } + } + + async onModuleInit(): Promise { + try { + await this.redis?.connect(); + } catch { + this.unavailable(); + } + } + + onModuleDestroy(): void { + this.redis?.disconnect(); + } + + async remember( + namespace: string, + parameters: unknown, + ttl: number, + load: () => Promise, + epoch?: string, + ): Promise { + if (!this.redis || this.redis.status !== 'ready') return load(); + if (epoch !== undefined) { + const digest = createHash('sha256') + .update(JSON.stringify(parameters)) + .digest('hex'); + const key = `${this.prefix}:${namespace}:epoch:${epoch}:${digest}`; + try { + const value = await this.redis.get(key); + if (value !== null) return JSON.parse(value) as T; + } catch { + this.unavailable(); + } + const result = await load(); + const serialized = JSON.stringify(result); + if (serialized !== undefined && this.redis.status === 'ready') { + try { + await this.redis.set(key, serialized, 'EX', ttl); + } catch { + this.unavailable(); + } + } + return result; + } + const versionKey = `${this.prefix}:${namespace}:generation`; + let version: string | null = null; + let dataKey = ''; + try { + await this.redis.set(versionKey, randomUUID(), 'EX', generationTtl, 'NX'); + version = await this.redis.get(versionKey); + if (version) { + const digest = createHash('sha256') + .update(JSON.stringify(parameters)) + .digest('hex'); + dataKey = `${this.prefix}:${namespace}:${version}:${digest}`; + const value = await this.redis.get(dataKey); + if (value !== null) return JSON.parse(value) as T; + } + } catch { + this.unavailable(); + } + + const result = await load(); + const serialized = JSON.stringify(result); + if (version && serialized !== undefined && this.redis.status === 'ready') { + try { + await this.redis.eval( + storeIfCurrent, + 2, + versionKey, + dataKey, + version, + serialized, + ttl, + ); + } catch { + this.unavailable(); + } + } + return result; + } + + async invalidate(...namespaces: string[]): Promise { + if (!this.redis || this.redis.status !== 'ready' || namespaces.length === 0) + return; + try { + const transaction = this.redis.multi(); + for (const namespace of new Set(namespaces)) { + transaction.set( + `${this.prefix}:${namespace}:generation`, + randomUUID(), + 'EX', + generationTtl, + ); + } + const results = await transaction.exec(); + if (results?.some(([error]) => error !== null)) this.unavailable(); + } catch { + this.unavailable(); + } + } + + private unavailable(): void { + if (!this.warned) { + this.logger.warn('Redis cache unavailable'); + this.warned = true; + } + } +} diff --git a/src/common/api-document.spec.ts b/src/common/api-document.spec.ts new file mode 100644 index 00000000..d2cde2cf --- /dev/null +++ b/src/common/api-document.spec.ts @@ -0,0 +1,58 @@ +import { readFileSync } from 'node:fs'; +import { join } from 'node:path'; +import type { OpenAPIObject } from '@nestjs/swagger'; +import { completeApiDocument } from './api-document'; + +const contract = JSON.parse( + readFileSync(join(__dirname, '../../contracts/openapi.json'), 'utf8'), +) as OpenAPIObject; + +describe('published OpenAPI document', () => { + const generated: OpenAPIObject = { + openapi: '3.0.0', + info: { title: 'Messenger API', version: '1.4.0' }, + paths: { + '/': { get: { responses: { 200: { description: 'Root endpoint' } } } }, + }, + components: { schemas: {} }, + }; + for (const [path, item] of Object.entries(contract.paths)) { + generated.paths[path] = {}; + for (const method of ['get', 'post', 'delete'] as const) { + if (item[method]) generated.paths[path][method] = { responses: {} }; + } + } + const document = completeApiDocument(generated, contract); + + it('documents every contract operation, including all response headers and binary schemas', () => { + expect(document.openapi).toBe(contract.openapi); + for (const [path, item] of Object.entries(contract.paths)) { + for (const method of ['get', 'post', 'delete'] as const) { + if (!item[method]) continue; + expect(document.paths[path][method]).toEqual({ + ...item[method], + security: item[method].security ?? contract.security ?? [], + }); + } + } + expect(document.components?.schemas).toMatchObject( + contract.components!.schemas!, + ); + }); + + it('preserves extra endpoints and leaves the generated document unchanged', () => { + expect(document.paths['/']).toEqual(generated.paths['/']); + expect(generated.openapi).toBe('3.0.0'); + expect( + generated.paths['/api/v1/attachments/{attachment_id}'].get?.responses, + ).toEqual({}); + }); + + it('does not advertise contract endpoints missing from the application', () => { + const missing = structuredClone(generated); + delete missing.paths['/api/v1/attachments/{attachment_id}']; + expect(() => completeApiDocument(missing, contract)).toThrow( + 'Contract endpoint is not implemented', + ); + }); +}); diff --git a/src/common/api-document.ts b/src/common/api-document.ts new file mode 100644 index 00000000..efb34bbd --- /dev/null +++ b/src/common/api-document.ts @@ -0,0 +1,55 @@ +import type { OpenAPIObject } from '@nestjs/swagger'; + +/** Keep the published API documentation aligned with the lab's normative contract. */ +export function completeApiDocument( + generated: OpenAPIObject, + contract: OpenAPIObject, +): OpenAPIObject { + const paths = { ...generated.paths }; + const methods = [ + 'get', + 'put', + 'post', + 'delete', + 'options', + 'head', + 'patch', + 'trace', + ] as const; + for (const [path, item] of Object.entries(contract.paths)) { + paths[path] = { ...item }; + for (const method of methods) { + const operation = item[method]; + if (operation) { + if (!generated.paths[path]?.[method]) { + throw new Error( + `Contract endpoint is not implemented: ${method.toUpperCase()} ${path}`, + ); + } + paths[path][method] = { + ...generated.paths[path]?.[method], + ...operation, + security: operation.security ?? contract.security ?? [], + }; + } + } + } + return { + ...generated, + openapi: contract.openapi, + info: { ...generated.info, version: contract.info.version }, + paths, + components: { + ...generated.components, + ...contract.components, + schemas: { + ...generated.components?.schemas, + ...contract.components?.schemas, + }, + securitySchemes: { + ...generated.components?.securitySchemes, + ...contract.components?.securitySchemes, + }, + }, + }; +} diff --git a/src/common/exceptions/api.exception.ts b/src/common/exceptions/api.exception.ts new file mode 100644 index 00000000..067e5cee --- /dev/null +++ b/src/common/exceptions/api.exception.ts @@ -0,0 +1,16 @@ +import { + HttpException, + HttpExceptionOptions, + HttpStatus, +} from '@nestjs/common'; + +export class ApiException extends HttpException { + constructor( + status: HttpStatus, + code: string, + message: string, + options?: HttpExceptionOptions, + ) { + super({ code, message }, status, options); + } +} diff --git a/src/common/filters/all-exceptions.filter.ts b/src/common/filters/all-exceptions.filter.ts new file mode 100644 index 00000000..27ab1af1 --- /dev/null +++ b/src/common/filters/all-exceptions.filter.ts @@ -0,0 +1,184 @@ +import { + ArgumentsHost, + Catch, + ExceptionFilter, + HttpException, + HttpStatus, +} from '@nestjs/common'; +import type { FastifyReply, FastifyRequest } from 'fastify'; +import { Prisma } from '../../generated/prisma/client'; +import { ApiException } from '../exceptions/api.exception'; +import { AuthException } from '../../Auth/auth.exception'; + +interface ExceptionPayload { + code?: unknown; +} + +const defaultCodes: Partial> = { + [HttpStatus.BAD_REQUEST]: 'invalid_request', + [HttpStatus.UNAUTHORIZED]: 'unauthorized', + [HttpStatus.FORBIDDEN]: 'forbidden', + [HttpStatus.NOT_FOUND]: 'not_found', + [HttpStatus.CONFLICT]: 'conflict', + [HttpStatus.PAYLOAD_TOO_LARGE]: 'payload_too_large', + [HttpStatus.UNSUPPORTED_MEDIA_TYPE]: 'unsupported_media_type', + [HttpStatus.TOO_MANY_REQUESTS]: 'rate_limited', + [HttpStatus.SERVICE_UNAVAILABLE]: 'unavailable', +}; + +const defaultMessages: Partial> = { + [HttpStatus.BAD_REQUEST]: 'Некорректный запрос', + [HttpStatus.UNAUTHORIZED]: 'Требуется авторизация', + [HttpStatus.FORBIDDEN]: 'Доступ запрещён', + [HttpStatus.NOT_FOUND]: 'Ресурс не найден', + [HttpStatus.METHOD_NOT_ALLOWED]: 'Метод не поддерживается', + [HttpStatus.CONFLICT]: 'Конфликт данных', + [HttpStatus.PAYLOAD_TOO_LARGE]: 'Тело запроса слишком большое', + [HttpStatus.UNSUPPORTED_MEDIA_TYPE]: 'Неподдерживаемый формат данных', + [HttpStatus.TOO_MANY_REQUESTS]: 'Слишком много запросов', + [HttpStatus.INTERNAL_SERVER_ERROR]: 'Внутренняя ошибка сервера', + [HttpStatus.SERVICE_UNAVAILABLE]: 'Сервис временно недоступен', +}; + +const databaseUnavailableCodes = new Set([ + 'P1000', + 'P1001', + 'P1002', + 'P1008', + 'P1017', + 'P2024', + 'P2037', + 'ECONNREFUSED', + 'ECONNRESET', + 'ETIMEDOUT', + 'EPIPE', + 'ENOTFOUND', + 'EAI_AGAIN', + 'EACCES', + '08000', + '08001', + '08003', + '08004', + '08006', + '53300', + '57P01', + '57P02', + '57P03', + '57014', +]); +const driverTimeoutMessages = [ + 'Query read timeout', + 'timeout exceeded when trying to connect', + 'Connection terminated unexpectedly', + 'Connection terminated due to connection timeout', +]; + +function databaseUnavailable(exception: unknown): boolean { + if (exception instanceof Prisma.PrismaClientInitializationError) return true; + if (exception instanceof HttpException || !(exception instanceof Error)) + return false; + const error = exception as Error & { code?: unknown }; + if ( + typeof error.code === 'string' && + databaseUnavailableCodes.has(error.code) + ) + return true; + if (exception instanceof Prisma.PrismaClientKnownRequestError) { + const originalCode = exception.meta?.code; + if ( + typeof originalCode === 'string' && + databaseUnavailableCodes.has(originalCode) + ) + return true; + const adapter = exception.meta?.driverAdapterError; + if (adapter !== null && typeof adapter === 'object' && 'cause' in adapter) { + const cause = adapter.cause; + if (cause !== null && typeof cause === 'object') { + if ('kind' in cause && cause.kind === 'ConnectionClosed') return true; + if ( + 'originalCode' in cause && + typeof cause.originalCode === 'string' && + databaseUnavailableCodes.has(cause.originalCode) + ) + return true; + } + } + } + return driverTimeoutMessages.some((message) => + exception.message.includes(message), + ); +} + +@Catch() +export class AllExceptionsFilter implements ExceptionFilter { + catch(exception: unknown, host: ArgumentsHost): void { + if (databaseUnavailable(exception)) { + exception = new ApiException( + HttpStatus.SERVICE_UNAVAILABLE, + 'unavailable', + 'База данных недоступна', + ); + } + const context = host.switchToHttp(); + const request = context.getRequest(); + const response = context.getResponse(); + if (exception instanceof AuthException) { + void response.header('WWW-Authenticate', exception.challenge); + } + + const status = + exception instanceof HttpException + ? exception.getStatus() + : exception instanceof Error && + 'statusCode' in exception && + typeof exception.statusCode === 'number' && + [400, 413, 415].includes(exception.statusCode) + ? exception.statusCode + : HttpStatus.INTERNAL_SERVER_ERROR; + const payload = + exception instanceof HttpException ? exception.getResponse() : undefined; + if (status === HttpStatus.TOO_MANY_REQUESTS) + void response.header('Retry-After', '1'); + const { code, message } = this.extractError(status, payload); + const requestId = request.id; + + if (status >= HttpStatus.INTERNAL_SERVER_ERROR) { + request.log.error( + { err: exception, status, requestId }, + 'Request failed', + ); + } + + void response.status(status).send({ + error: { code, message, request_id: requestId }, + }); + } + + private extractError( + status: HttpStatus, + payload: string | object | undefined, + ): { code: string; message: string } { + if (status === HttpStatus.INTERNAL_SERVER_ERROR) { + return { + code: 'internal_error', + message: defaultMessages[status] ?? 'Ошибка сервера', + }; + } + + const body = ( + payload !== null && typeof payload === 'object' ? payload : {} + ) as ExceptionPayload; + + return { + code: + typeof body.code === 'string' + ? body.code + : (defaultCodes[status] ?? 'http_error'), + message: + defaultMessages[status] ?? + (status >= HttpStatus.INTERNAL_SERVER_ERROR + ? 'Ошибка сервера' + : 'Ошибка запроса'), + }; + } +} diff --git a/src/common/http/drain-rejected-body.spec.ts b/src/common/http/drain-rejected-body.spec.ts new file mode 100644 index 00000000..8c890582 --- /dev/null +++ b/src/common/http/drain-rejected-body.spec.ts @@ -0,0 +1,56 @@ +import type { IncomingMessage } from 'node:http'; +import { PassThrough } from 'node:stream'; +import { setImmediate as tick } from 'node:timers/promises'; +import { drainRejectedBody } from './drain-rejected-body'; + +describe('bounded discard of rejected upload bodies', () => { + it('waits for the complete body before releasing the error response', async () => { + const body = new PassThrough(); + const done = jest.fn(); + const result = new Promise((resolve) => + drainRejectedBody( + body as unknown as IncomingMessage, + 100, + 1000, + (consumed) => { + done(consumed); + resolve(consumed); + }, + ), + ); + body.write('first'); + await tick(); + expect(done).not.toHaveBeenCalled(); + body.end('last'); + expect(await result).toBe(true); + expect(body.readableEnded).toBe(true); + expect(done).toHaveBeenCalledTimes(1); + }); + + it('stops draining beyond its byte budget', async () => { + const body = new PassThrough(); + try { + const result = new Promise((resolve) => + drainRejectedBody(body as unknown as IncomingMessage, 4, 1000, resolve), + ); + body.write('12345'); + expect(await result).toBe(false); + expect(body.isPaused()).toBe(true); + } finally { + body.destroy(); + } + }); + + it('releases a stalled rejected request when its remaining deadline expires', async () => { + const body = new PassThrough(); + try { + const result = new Promise((resolve) => + drainRejectedBody(body as unknown as IncomingMessage, 100, 25, resolve), + ); + expect(await result).toBe(false); + expect(body.isPaused()).toBe(true); + } finally { + body.destroy(); + } + }); +}); diff --git a/src/common/http/drain-rejected-body.ts b/src/common/http/drain-rejected-body.ts new file mode 100644 index 00000000..a0bb4c52 --- /dev/null +++ b/src/common/http/drain-rejected-body.ts @@ -0,0 +1,44 @@ +import type { IncomingMessage } from 'node:http'; + +/** Discard a bounded remainder before sending an early 413 through a streaming proxy. */ +export function drainRejectedBody( + raw: IncomingMessage, + maxBytes: number, + timeoutMs: number, + done: (consumed: boolean) => void, +) { + let received = 0; + let finished = false; + const finish = (consumed: boolean) => { + if (finished) return; + finished = true; + clearTimeout(timer); + raw.removeListener('data', onData); + raw.removeListener('end', onEnd); + raw.removeListener('aborted', onAborted); + raw.removeListener('error', onAborted); + raw.removeListener('close', onClose); + done(consumed); + }; + const onData = (chunk: Buffer) => { + received += chunk.length; + if (received > maxBytes) { + raw.pause(); + finish(false); + } + }; + const onEnd = () => finish(true); + const onAborted = () => finish(false); + const onClose = () => finish(raw.readableEnded); + const timer = setTimeout(() => { + raw.pause(); + finish(false); + }, timeoutMs); + timer.unref(); + raw.on('data', onData); + raw.once('end', onEnd); + raw.once('aborted', onAborted); + raw.once('error', onAborted); + raw.once('close', onClose); + raw.resume(); +} diff --git a/src/common/http/fastify-adapter.spec.ts b/src/common/http/fastify-adapter.spec.ts new file mode 100644 index 00000000..90d0205c --- /dev/null +++ b/src/common/http/fastify-adapter.spec.ts @@ -0,0 +1,92 @@ +import { request } from 'node:http'; +import type { AddressInfo } from 'node:net'; +import { setTimeout as delay } from 'node:timers/promises'; +import { DrainingFastifyAdapter } from './fastify-adapter'; + +describe('upload body deadline over real HTTP', () => { + it('returns 408 for a client that keeps sending and never invokes the handler', async () => { + const adapter = new DrainingFastifyAdapter(0, 1000); + const server = adapter.getInstance(); + let calls = 0; + server.post('/api/v1/chats/:chat_id/attachments', () => { + calls++; + return {}; + }); + await server.listen({ host: '127.0.0.1', port: 0 }); + let timer: ReturnType | undefined; + let watchdog: ReturnType | undefined; + try { + const port = (server.server.address() as AddressInfo).port; + const result = await new Promise<{ + status?: number; + body: string; + id?: string; + }>((resolve, reject) => { + const client = request( + { + host: '127.0.0.1', + port, + method: 'POST', + path: '/api/v1/chats/test/attachments', + headers: { 'content-type': 'image/png', 'content-length': '10000' }, + }, + (response) => { + clearInterval(timer); + clearTimeout(watchdog); + let body = ''; + response.on('data', (part: Buffer) => { + body += part.toString(); + }); + response.on('end', () => { + client.destroy(); + resolve({ + status: response.statusCode, + body, + id: response.headers['x-request-id'] as string, + }); + }); + response.on('error', reject); + }, + ); + client.on('error', reject); + watchdog = setTimeout( + () => client.destroy(new Error('deadline did not fire')), + 7000, + ); + client.write('partial'); + timer = setInterval(() => client.write('x'), 100); + }); + expect(result.status).toBe(408); + expect(result.id).toBeTruthy(); + expect(JSON.parse(result.body)).toMatchObject({ + error: { code: 'invalid_request', request_id: result.id }, + }); + expect(calls).toBe(0); + } finally { + clearInterval(timer); + clearTimeout(watchdog); + await server.close(); + } + }, 15000); + + it('clears the reception deadline before a completed body is processed', async () => { + const adapter = new DrainingFastifyAdapter(0, 1000); + const server = adapter.getInstance(); + server.post('/api/v1/chats/:chat_id/attachments', async () => { + await delay(1200); + return { stored: true }; + }); + try { + const response = await server.inject({ + method: 'POST', + url: '/api/v1/chats/test/attachments', + headers: { 'content-type': 'image/png' }, + payload: Buffer.from('complete'), + }); + expect(response.statusCode).toBe(200); + expect(response.json()).toEqual({ stored: true }); + } finally { + await server.close(); + } + }); +}); diff --git a/src/common/http/fastify-adapter.ts b/src/common/http/fastify-adapter.ts new file mode 100644 index 00000000..5f763251 --- /dev/null +++ b/src/common/http/fastify-adapter.ts @@ -0,0 +1,175 @@ +import { randomUUID } from 'node:crypto'; +import { MAX_UPLOAD_BYTES } from '../../Attachment/attachment.service'; +import { profileUpload } from './upload-memory-profile'; +import { drainRejectedBody } from './drain-rejected-body'; +import { + FastifyAdapter, + NestFastifyApplication, +} from '@nestjs/platform-fastify'; + +const requestIdHeader = 'x-request-id'; +const instanceIdHeader = 'x-instance-id'; +const instanceId = process.env.INSTANCE_ID?.trim() || randomUUID(); + +// Two parallel readiness rounds: 2 * (1s request timeout + 2s interval), +// plus one second for the upstream reload. Keep below the public hook's 10s limit. +export const DRAIN_DELAY_MS = 7000; + +export class DrainingFastifyAdapter extends FastifyAdapter { + private draining = false; + private closing?: Promise; + private httpClosing?: Promise; + private readonly uploadDeadlines = new WeakMap(); + + constructor( + private readonly drainDelayMs: number, + uploadBodyTimeoutMs = Number(process.env.UPLOAD_BODY_TIMEOUT_MS ?? 15000), + ) { + super({ requestIdHeader, genReqId: () => randomUUID() }); + this.getInstance().addHook('onRequest', (request, reply, done) => { + const path = request.routeOptions.url; + const mode = + request.method !== 'POST' + ? undefined + : path === '/api/v1/chats/:chat_id/attachments' + ? 'proxy' + : path === + '/api/v1/chats/:chat_id/attachment-uploads/:upload_id/complete' + ? 'direct' + : path === '/api/v1/chats/:chat_id/attachment-uploads' + ? 'grant' + : undefined; + if (mode) profileUpload(mode, request.id, reply.raw, done); + else done(); + }); + if ( + !Number.isSafeInteger(uploadBodyTimeoutMs) || + uploadBodyTimeoutMs < 1000 || + uploadBodyTimeoutMs > 120000 + ) { + throw new Error('UPLOAD_BODY_TIMEOUT_MS must be between 1000 and 120000'); + } + this.getInstance().addHook('onRequest', (request, reply, done) => { + if ( + request.method !== 'POST' || + request.routeOptions.url !== '/api/v1/chats/:chat_id/attachments' + ) { + done(); + return; + } + // A total deadline, independent of whether the client keeps sending tiny chunks. + // Clear it when reception finishes; decoding and persistence have separate budgets. + const raw = request.raw; + this.uploadDeadlines.set(raw, Date.now() + uploadBodyTimeoutMs); + const cleanup = () => { + this.uploadDeadlines.delete(raw); + clearTimeout(timer); + raw.removeListener('end', cleanup); + raw.removeListener('close', cleanup); + reply.raw.removeListener('finish', cleanup); + }; + const timer = setTimeout(() => { + cleanup(); + if ( + raw.complete || + reply.sent || + raw.destroyed || + reply.statusCode === 413 + ) + return; + // Let HTTP close after flushing the response. Destroying the request here can + // reset the TCP connection before a still-writing client receives the 408. + void reply + .code(408) + .header('connection', 'close') + .header(requestIdHeader, request.id) + .header(instanceIdHeader, instanceId) + .send({ + error: { + code: 'invalid_request', + message: 'Истёк срок приёма изображения', + request_id: request.id, + }, + }); + }, uploadBodyTimeoutMs); + timer.unref(); + raw.once('end', cleanup); + raw.once('close', cleanup); + reply.raw.once('finish', cleanup); + done(); + }); + this.getInstance().addContentTypeParser( + ['image/png', 'image/jpeg', 'application/octet-stream'], + { parseAs: 'buffer', bodyLimit: MAX_UPLOAD_BYTES }, + (_request, body, done) => done(null, body), + ); + this.getInstance().addHook('onSend', (request, reply, payload, done) => { + // An already active request may finish after Fastify starts closing. + // Finish its response, then close its keep-alive socket as well. + if (this.httpClosing) void reply.header('connection', 'close'); + if ( + reply.statusCode === 413 && + request.routeOptions.url === '/api/v1/chats/:chat_id/attachments' && + !request.raw.readableEnded && + !request.raw.destroyed + ) { + const deadline = + this.uploadDeadlines.get(request.raw) ?? + Date.now() + uploadBodyTimeoutMs; + drainRejectedBody( + request.raw, + MAX_UPLOAD_BYTES + 1048576, + Math.max(1, deadline - Date.now()), + (consumed) => { + if (!consumed) void reply.header('connection', 'close'); + done(null, payload); + }, + ); + return; + } + done(null, payload); + }); + } + + get isDraining(): boolean { + return this.draining; + } + + override beforeClose(): Promise { + return (this.closing ??= this.drainAndClose()); + } + + override close(): Promise { + return (this.httpClosing ??= super.close()); + } + + private async drainAndClose(): Promise { + this.draining = true; + if (this.drainDelayMs > 0) { + await new Promise((resolve) => + setTimeout(resolve, this.drainDelayMs), + ); + } + // Nest awaits beforeClose before destroying Prisma/Redis providers. + // Fastify first stops new connections and finishes active HTTP requests. + await this.close(); + } +} + +export function createFastifyAdapter( + drainDelayMs = 0, + uploadBodyTimeoutMs?: number, +): DrainingFastifyAdapter { + return new DrainingFastifyAdapter(drainDelayMs, uploadBodyTimeoutMs); +} + +export function exposeRequestIdHeader(app: NestFastifyApplication): void { + app + .getHttpAdapter() + .getInstance() + .addHook('onRequest', (request, reply, done) => { + void reply.header(requestIdHeader, request.id); + void reply.header(instanceIdHeader, instanceId); + done(); + }); +} diff --git a/src/common/http/upload-memory-profile.ts b/src/common/http/upload-memory-profile.ts new file mode 100644 index 00000000..9b14ce12 --- /dev/null +++ b/src/common/http/upload-memory-profile.ts @@ -0,0 +1,116 @@ +import { AsyncLocalStorage } from 'node:async_hooks'; +import { hostname } from 'node:os'; +import { performance } from 'node:perf_hooks'; +import type { ServerResponse } from 'node:http'; +import sharp from 'sharp'; + +type Memory = ReturnType; +type Stage = { + name: string; + startedMs: number; + durationMs: number; + before: Memory; + after: Memory; + peak: Memory; + samples: number; + maxSampleGapMs: number; + sharpBefore: ReturnType; + sharpAfter: ReturnType; +}; +type Context = { + started: number; + stages: Stage[]; + current: Stage; + lastSample: number; + closed: boolean; +}; +const contexts = new AsyncLocalStorage(); + +function sample(context: Context) { + const now = performance.now(); + const memory = process.memoryUsage(); + const stage = context.current; + for (const key of Object.keys(memory) as (keyof Memory)[]) + stage.peak[key] = Math.max(stage.peak[key], memory[key]); + stage.after = memory; + stage.samples++; + stage.maxSampleGapMs = Math.max( + stage.maxSampleGapMs, + now - context.lastSample, + ); + context.lastSample = now; + stage.durationMs = now - context.started - stage.startedMs; + return memory; +} + +function stage(name: string, startedMs: number): Stage { + const memory = process.memoryUsage(); + const cache = sharp.cache(); + return { + name, + startedMs, + durationMs: 0, + before: memory, + after: memory, + peak: { ...memory }, + samples: 0, + maxSampleGapMs: 0, + sharpBefore: cache, + sharpAfter: cache, + }; +} + +/** Profiling is opt-in. Contains numeric metrics and a request ID, never URLs or payloads. */ +export function profileUpload( + mode: 'proxy' | 'direct' | 'grant', + requestId: string, + response: ServerResponse, + done: () => void, +) { + if (process.env.UPLOAD_MEMORY_PROFILE !== '1') return done(); + const now = performance.now(); + const context: Context = { + started: now, + stages: [], + current: stage('receive_and_authenticate', 0), + lastSample: now, + closed: false, + }; + const timer = setInterval(() => sample(context), 20); + timer.unref(); + const finish = () => { + if (context.closed) return; + context.closed = true; + clearInterval(timer); + sample(context); + context.current.sharpAfter = sharp.cache(); + context.stages.push(context.current); + console.log( + 'UPLOAD_MEMORY_PROFILE ' + + JSON.stringify({ + mode, + requestId, + instance: hostname(), + pid: process.pid, + status: response.statusCode, + finished: response.writableFinished, + intervalMs: 20, + durationMs: performance.now() - context.started, + stages: context.stages, + }), + ); + }; + response.once('finish', finish); + response.once('close', finish); + contexts.run(context, done); +} + +export function profileStage(name: string) { + const context = contexts.getStore(); + if (!context || context.closed || context.stages.length >= 64) return; + sample(context); + context.current.sharpAfter = sharp.cache(); + context.stages.push(context.current); + context.current = stage(name, performance.now() - context.started); + context.lastSample = performance.now(); +} diff --git a/src/common/validation.ts b/src/common/validation.ts new file mode 100644 index 00000000..cbbdf046 --- /dev/null +++ b/src/common/validation.ts @@ -0,0 +1,54 @@ +import { ApiException } from './exceptions/api.exception'; +import { HttpStatus } from '@nestjs/common'; + +export const uuidPattern = + /^[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i; + +export function invalidRequest(message: string): never { + throw new ApiException(HttpStatus.BAD_REQUEST, 'invalid_request', message); +} + +export function objectBody( + value: unknown, + keys: string[], +): Record { + if (typeof value !== 'object' || value === null || Array.isArray(value)) { + return invalidRequest('Ожидается JSON-объект'); + } + const body = value as Record; + if (Object.keys(body).some((key) => !keys.includes(key))) { + return invalidRequest('Неизвестное поле запроса'); + } + return body; +} + +export function requiredText( + value: unknown, + field: string, + max: number, +): string { + if (typeof value !== 'string' || value.trim().length === 0) { + return invalidRequest(`Некорректное поле ${field}`); + } + let codePoints = 0; + for (const _character of value) codePoints++; + if (codePoints > max) return invalidRequest(`Некорректное поле ${field}`); + return value; +} + +export function uuid(value: unknown, field: string): string { + if (typeof value !== 'string' || !uuidPattern.test(value)) { + return invalidRequest(`Некорректное поле ${field}`); + } + return value.toLowerCase(); +} + +export function pageLimit(value: unknown): number { + if (value === undefined) return 50; + if (typeof value !== 'string' || !/^[1-9]\d*$/.test(value)) { + return invalidRequest('Некорректный limit'); + } + const limit = Number(value); + if (limit > 100) return invalidRequest('Некорректный limit'); + return limit; +} diff --git a/src/main.ts b/src/main.ts new file mode 100644 index 00000000..6063b0ee --- /dev/null +++ b/src/main.ts @@ -0,0 +1,69 @@ +import { NestFactory } from '@nestjs/core'; +import { NestFastifyApplication } from '@nestjs/platform-fastify'; +import { + DocumentBuilder, + SwaggerModule, + type OpenAPIObject, +} from '@nestjs/swagger'; +import { readFileSync } from 'node:fs'; +import { join } from 'node:path'; +import { apiReference } from '@scalar/nestjs-api-reference'; +import { AppModule } from './app.module'; +import { Logger } from 'nestjs-pino'; +import { completeApiDocument } from './common/api-document'; +import { + createFastifyAdapter, + DRAIN_DELAY_MS, + exposeRequestIdHeader, +} from './common/http/fastify-adapter'; + +async function bootstrap() { + const app = await NestFactory.create( + AppModule, + createFastifyAdapter(DRAIN_DELAY_MS), + { + bufferLogs: true, + }, + ); + + exposeRequestIdHeader(app); + app.useLogger(app.get(Logger)); + app.enableShutdownHooks(); + + const swaggerConfig = new DocumentBuilder() + .setTitle('Messenger API') + .setDescription('Документация API') + .setVersion('1.4.0') + .addBasicAuth({ type: 'http', scheme: 'basic' }, 'basicAuth') + .addBearerAuth( + { type: 'http', scheme: 'bearer', bearerFormat: 'opaque' }, + 'bearerAuth', + ) + .build(); + + const contract = JSON.parse( + readFileSync(join(__dirname, '../contracts/openapi.json'), 'utf8'), + ) as OpenAPIObject; + const document = completeApiDocument( + SwaggerModule.createDocument(app, swaggerConfig), + contract, + ); + + SwaggerModule.setup('swagger', app, document); + + app.use( + '/docs', + apiReference({ + content: document, + theme: 'laserwave', + withFastify: true, + }), + ); + + await app.listen( + Number(process.env.APP_PORT ?? process.env.PORT ?? 8080), + process.env.APP_HOST ?? '0.0.0.0', + ); +} + +void bootstrap(); diff --git a/src/prisma/prisma.module.ts b/src/prisma/prisma.module.ts new file mode 100644 index 00000000..930cb0ff --- /dev/null +++ b/src/prisma/prisma.module.ts @@ -0,0 +1,6 @@ +import { Global, Module } from '@nestjs/common'; +import { PrismaService } from './prisma.service'; + +@Global() +@Module({ providers: [PrismaService], exports: [PrismaService] }) +export class PrismaModule {} diff --git a/src/prisma/prisma.service.ts b/src/prisma/prisma.service.ts new file mode 100644 index 00000000..8e326f30 --- /dev/null +++ b/src/prisma/prisma.service.ts @@ -0,0 +1,42 @@ +import 'dotenv/config'; +import { + Injectable, + type OnModuleDestroy, + type OnModuleInit, +} from '@nestjs/common'; +import { PrismaPg } from '@prisma/adapter-pg'; +import { PrismaClient } from '../generated/prisma/client'; + +@Injectable() +export class PrismaService + extends PrismaClient + implements OnModuleInit, OnModuleDestroy +{ + constructor() { + const connectionString = process.env.DATABASE_URL; + if (!connectionString) throw new Error('DATABASE_URL is required'); + const poolMax = Number(process.env.DB_POOL_MAX ?? 15); + if (!Number.isSafeInteger(poolMax) || poolMax < 1) { + throw new Error('DB_POOL_MAX must be a positive integer'); + } + super({ + adapter: new PrismaPg({ + connectionString, + max: poolMax, + connectionTimeoutMillis: 5000, + query_timeout: 5000, + idleTimeoutMillis: 30000, + options: '-c statement_timeout=5000', + }), + transactionOptions: { maxWait: 5000, timeout: 10000 }, + }); + } + + async onModuleInit(): Promise { + await this.$connect(); + } + + async onModuleDestroy(): Promise { + await this.$disconnect(); + } +} diff --git a/tsconfig.build.json b/tsconfig.build.json new file mode 100644 index 00000000..486f0256 --- /dev/null +++ b/tsconfig.build.json @@ -0,0 +1,9 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "rootDir": "./src", + "tsBuildInfoFile": "./dist/tsconfig.build.tsbuildinfo" + }, + "include": ["src"], + "exclude": ["node_modules", "test", "dist", "**/*spec.ts"] +} diff --git a/tsconfig.json b/tsconfig.json new file mode 100644 index 00000000..f15de1db --- /dev/null +++ b/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "module": "nodenext", + "moduleResolution": "nodenext", + "resolvePackageJsonExports": true, + "esModuleInterop": true, + "isolatedModules": true, + "declaration": true, + "removeComments": true, + "emitDecoratorMetadata": true, + "experimentalDecorators": true, + "allowSyntheticDefaultImports": true, + "target": "ES2023", + "types": ["node", "jest"], + "sourceMap": true, + "outDir": "./dist", + "rootDir": ".", + "incremental": true, + "skipLibCheck": true, + "strict": true, + "strictPropertyInitialization": false + } +}