diff --git a/backend/services/planting-service/.claude/settings.local.json b/backend/services/planting-service/.claude/settings.local.json new file mode 100644 index 00000000..b4139862 --- /dev/null +++ b/backend/services/planting-service/.claude/settings.local.json @@ -0,0 +1,18 @@ +{ + "permissions": { + "allow": [ + "Bash(dir:*)", + "Bash(tree:*)", + "Bash(npm install:*)", + "Bash(npx prisma generate:*)", + "Bash(npm run test:*)", + "Bash(npm run build:*)", + "Bash(npm run test:e2e:*)", + "Bash(npm run test:cov:*)", + "Bash(cat:*)", + "Bash(git add:*)" + ], + "deny": [], + "ask": [] + } +} diff --git a/backend/services/planting-service/.env.development b/backend/services/planting-service/.env.development new file mode 100644 index 00000000..cbae6ab9 --- /dev/null +++ b/backend/services/planting-service/.env.development @@ -0,0 +1,14 @@ +# Database +DATABASE_URL="postgresql://postgres:postgres@localhost:5432/rwadurian_planting?schema=public" + +# App +NODE_ENV=development +APP_PORT=3003 + +# JWT +JWT_SECRET="planting-service-dev-jwt-secret" + +# External Services +WALLET_SERVICE_URL=http://localhost:3002 +IDENTITY_SERVICE_URL=http://localhost:3001 +REFERRAL_SERVICE_URL=http://localhost:3004 diff --git a/backend/services/planting-service/.env.example b/backend/services/planting-service/.env.example new file mode 100644 index 00000000..84f772c8 --- /dev/null +++ b/backend/services/planting-service/.env.example @@ -0,0 +1,14 @@ +# Database +DATABASE_URL="postgresql://postgres:postgres@localhost:5432/rwadurian_planting?schema=public" + +# App +NODE_ENV=development +APP_PORT=3003 + +# JWT +JWT_SECRET="your-super-secret-jwt-key-change-in-production" + +# External Services +WALLET_SERVICE_URL=http://localhost:3002 +IDENTITY_SERVICE_URL=http://localhost:3001 +REFERRAL_SERVICE_URL=http://localhost:3004 diff --git a/backend/services/planting-service/.gitignore b/backend/services/planting-service/.gitignore new file mode 100644 index 00000000..ca724634 --- /dev/null +++ b/backend/services/planting-service/.gitignore @@ -0,0 +1,40 @@ +# Dependencies +node_modules/ + +# Build output +dist/ + +# Coverage +coverage/ + +# Environment files +.env +.env.local +.env.*.local + +# IDE +.idea/ +.vscode/ +*.swp +*.swo + +# OS +.DS_Store +Thumbs.db + +# Logs +logs/ +*.log +npm-debug.log* + +# Prisma +prisma/*.db +prisma/*.db-journal + +# Testing +.nyc_output/ + +# Temporary files +tmp/ +temp/ +*.tmp diff --git a/backend/services/planting-service/Dockerfile b/backend/services/planting-service/Dockerfile index e69de29b..6c6e1e8e 100644 --- a/backend/services/planting-service/Dockerfile +++ b/backend/services/planting-service/Dockerfile @@ -0,0 +1,48 @@ +# Build stage +FROM node:20-alpine AS builder + +WORKDIR /app + +# Copy package files +COPY package*.json ./ + +# Install dependencies +RUN npm ci + +# Copy prisma schema and generate client +COPY prisma ./prisma/ +RUN npx prisma generate + +# Copy source code +COPY . . + +# Build +RUN npm run build + +# Production stage +FROM node:20-alpine AS production + +WORKDIR /app + +# Copy package files +COPY package*.json ./ + +# Install production dependencies only +RUN npm ci --only=production + +# Copy prisma schema and generate client +COPY prisma ./prisma/ +RUN npx prisma generate + +# Copy built application +COPY --from=builder /app/dist ./dist + +# Expose port +EXPOSE 3003 + +# Health check +HEALTHCHECK --interval=30s --timeout=3s --start-period=5s --retries=3 \ + CMD wget --no-verbose --tries=1 --spider http://localhost:3003/api/v1/health || exit 1 + +# Start the application +CMD ["node", "dist/main"] diff --git a/backend/services/planting-service/Dockerfile.test b/backend/services/planting-service/Dockerfile.test new file mode 100644 index 00000000..f0d80555 --- /dev/null +++ b/backend/services/planting-service/Dockerfile.test @@ -0,0 +1,22 @@ +FROM node:20-alpine + +WORKDIR /app + +# Install dependencies +COPY package*.json ./ +RUN npm ci + +# Copy prisma schema +COPY prisma ./prisma/ + +# Generate Prisma client +RUN npx prisma generate + +# Copy source code +COPY . . + +# Build +RUN npm run build + +# Default command for tests +CMD ["npm", "run", "test"] diff --git a/backend/services/planting-service/Makefile b/backend/services/planting-service/Makefile new file mode 100644 index 00000000..40bf01b0 --- /dev/null +++ b/backend/services/planting-service/Makefile @@ -0,0 +1,178 @@ +.PHONY: install build start dev test test-unit test-integration test-e2e test-cov test-watch test-docker-all clean prisma-generate prisma-migrate prisma-studio lint format docker-build docker-up docker-down + +# ============================================================================= +# 环境变量 +# ============================================================================= +NODE_ENV ?= development +DATABASE_URL ?= postgresql://postgres:postgres@localhost:5432/rwadurian_planting_test?schema=public + +# ============================================================================= +# 安装和构建 +# ============================================================================= +install: + npm install + +build: + npm run build + +clean: + rm -rf dist node_modules coverage .nyc_output + +# ============================================================================= +# 开发 +# ============================================================================= +start: + npm run start + +dev: + npm run start:dev + +# ============================================================================= +# 数据库 +# ============================================================================= +prisma-generate: + npx prisma generate + +prisma-migrate: + npx prisma migrate dev + +prisma-migrate-prod: + npx prisma migrate deploy + +prisma-studio: + npx prisma studio + +prisma-reset: + npx prisma migrate reset --force + +# ============================================================================= +# 测试 +# ============================================================================= +test: test-unit + +test-unit: + @echo "==========================================" + @echo "Running Unit Tests..." + @echo "==========================================" + npm run test + +test-unit-verbose: + npm run test -- --verbose + +test-watch: + npm run test:watch + +test-cov: + @echo "==========================================" + @echo "Running Unit Tests with Coverage..." + @echo "==========================================" + npm run test:cov + +test-integration: + @echo "==========================================" + @echo "Running Integration Tests..." + @echo "==========================================" + npm run test -- --testPathPattern=integration --runInBand + +test-e2e: + @echo "==========================================" + @echo "Running E2E Tests..." + @echo "==========================================" + npm run test:e2e + +test-all: + @echo "==========================================" + @echo "Running All Tests..." + @echo "==========================================" + $(MAKE) test-unit + $(MAKE) test-integration + $(MAKE) test-e2e + @echo "==========================================" + @echo "All Tests Completed!" + @echo "==========================================" + +# ============================================================================= +# Docker 测试 +# ============================================================================= +docker-build: + docker build -t planting-service:test . + +docker-up: + docker-compose up -d + +docker-down: + docker-compose down -v + +docker-test-unit: + @echo "==========================================" + @echo "Running Unit Tests in Docker..." + @echo "==========================================" + docker-compose -f docker-compose.test.yml run --rm test npm run test + +docker-test-integration: + @echo "==========================================" + @echo "Running Integration Tests in Docker..." + @echo "==========================================" + docker-compose -f docker-compose.test.yml run --rm test npm run test -- --testPathPattern=integration --runInBand + +docker-test-e2e: + @echo "==========================================" + @echo "Running E2E Tests in Docker..." + @echo "==========================================" + docker-compose -f docker-compose.test.yml run --rm test npm run test:e2e + +test-docker-all: + @echo "==========================================" + @echo "Running All Tests in Docker..." + @echo "==========================================" + docker-compose -f docker-compose.test.yml up -d db + @sleep 5 + docker-compose -f docker-compose.test.yml run --rm test sh -c "npx prisma migrate deploy && npm run test && npm run test:e2e" + docker-compose -f docker-compose.test.yml down -v + @echo "==========================================" + @echo "All Docker Tests Completed!" + @echo "==========================================" + +# ============================================================================= +# 代码质量 +# ============================================================================= +lint: + npm run lint + +format: + npm run format + +# ============================================================================= +# 帮助 +# ============================================================================= +help: + @echo "Planting Service - Available Commands:" + @echo "" + @echo " Development:" + @echo " make install - Install dependencies" + @echo " make build - Build the project" + @echo " make dev - Start in development mode" + @echo " make start - Start in production mode" + @echo "" + @echo " Database:" + @echo " make prisma-generate - Generate Prisma client" + @echo " make prisma-migrate - Run database migrations" + @echo " make prisma-studio - Open Prisma Studio" + @echo " make prisma-reset - Reset database" + @echo "" + @echo " Testing:" + @echo " make test-unit - Run unit tests" + @echo " make test-integration - Run integration tests" + @echo " make test-e2e - Run end-to-end tests" + @echo " make test-cov - Run tests with coverage" + @echo " make test-all - Run all tests" + @echo " make test-docker-all - Run all tests in Docker" + @echo "" + @echo " Code Quality:" + @echo " make lint - Run linter" + @echo " make format - Format code" + @echo "" + @echo " Docker:" + @echo " make docker-build - Build Docker image" + @echo " make docker-up - Start Docker containers" + @echo " make docker-down - Stop Docker containers" diff --git a/backend/services/planting-service/docker-compose.test.yml b/backend/services/planting-service/docker-compose.test.yml new file mode 100644 index 00000000..d1a0b6a2 --- /dev/null +++ b/backend/services/planting-service/docker-compose.test.yml @@ -0,0 +1,40 @@ +version: '3.8' + +services: + db: + image: postgres:16-alpine + environment: + POSTGRES_USER: postgres + POSTGRES_PASSWORD: postgres + POSTGRES_DB: rwadurian_planting_test + ports: + - "5433:5432" + volumes: + - postgres_test_data:/var/lib/postgresql/data + healthcheck: + test: ["CMD-SHELL", "pg_isready -U postgres"] + interval: 5s + timeout: 5s + retries: 5 + + test: + build: + context: . + dockerfile: Dockerfile.test + depends_on: + db: + condition: service_healthy + environment: + NODE_ENV: test + DATABASE_URL: postgresql://postgres:postgres@db:5432/rwadurian_planting_test?schema=public + JWT_SECRET: test-jwt-secret + WALLET_SERVICE_URL: http://localhost:3002 + IDENTITY_SERVICE_URL: http://localhost:3001 + REFERRAL_SERVICE_URL: http://localhost:3004 + volumes: + - ./src:/app/src + - ./test:/app/test + - ./prisma:/app/prisma + +volumes: + postgres_test_data: diff --git a/backend/services/planting-service/docs/API.md b/backend/services/planting-service/docs/API.md new file mode 100644 index 00000000..1e4ebe35 --- /dev/null +++ b/backend/services/planting-service/docs/API.md @@ -0,0 +1,665 @@ +# Planting Service API 文档 + +## 目录 + +- [概述](#概述) +- [认证](#认证) +- [通用响应格式](#通用响应格式) +- [API 端点](#api-端点) + - [健康检查](#健康检查) + - [订单管理](#订单管理) + - [持仓查询](#持仓查询) +- [错误码](#错误码) +- [数据模型](#数据模型) + +--- + +## 概述 + +- **Base URL**: `http://localhost:3003/api/v1` +- **协议**: HTTP/HTTPS +- **数据格式**: JSON +- **字符编码**: UTF-8 + +### Swagger 文档 + +启动服务后访问: `http://localhost:3003/api/docs` + +--- + +## 认证 + +所有业务 API(除健康检查外)需要 JWT Bearer Token 认证。 + +### 请求头 + +```http +Authorization: Bearer +``` + +### Token 结构 + +```json +{ + "id": "1", + "username": "user@example.com", + "iat": 1699999999, + "exp": 1700003599 +} +``` + +--- + +## 通用响应格式 + +### 成功响应 + +```json +{ + "data": { ... }, + "timestamp": "2024-11-30T10:00:00.000Z" +} +``` + +### 错误响应 + +```json +{ + "statusCode": 400, + "message": "错误信息", + "error": "Bad Request", + "timestamp": "2024-11-30T10:00:00.000Z" +} +``` + +--- + +## API 端点 + +### 健康检查 + +#### GET /health + +检查服务健康状态。 + +**请求** +```http +GET /api/v1/health +``` + +**响应** +```json +{ + "status": "ok", + "timestamp": "2024-11-30T10:00:00.000Z", + "service": "planting-service" +} +``` + +#### GET /health/ready + +检查服务就绪状态。 + +**请求** +```http +GET /api/v1/health/ready +``` + +**响应** +```json +{ + "status": "ready", + "timestamp": "2024-11-30T10:00:00.000Z" +} +``` + +--- + +### 订单管理 + +#### POST /planting/orders + +创建认种订单。 + +**请求** +```http +POST /api/v1/planting/orders +Authorization: Bearer +Content-Type: application/json + +{ + "treeCount": 5 +} +``` + +**参数说明** + +| 参数 | 类型 | 必填 | 说明 | +|-----|------|-----|------| +| treeCount | number | 是 | 认种数量,1-1000 | + +**响应** +```json +{ + "orderNo": "PO202411300001", + "userId": "1", + "treeCount": 5, + "totalAmount": 10995, + "status": "CREATED", + "createdAt": "2024-11-30T10:00:00.000Z" +} +``` + +**错误码** + +| 状态码 | 说明 | +|-------|------| +| 400 | 参数错误(数量超限) | +| 400 | 超过个人最大认种数量限制(1000棵)| +| 400 | 余额不足 | +| 401 | 未授权 | + +--- + +#### GET /planting/orders + +查询用户订单列表。 + +**请求** +```http +GET /api/v1/planting/orders?page=1&pageSize=10 +Authorization: Bearer +``` + +**参数说明** + +| 参数 | 类型 | 必填 | 默认值 | 说明 | +|-----|------|-----|-------|------| +| page | number | 否 | 1 | 页码 | +| pageSize | number | 否 | 10 | 每页数量,最大100 | + +**响应** +```json +[ + { + "orderNo": "PO202411300001", + "treeCount": 5, + "totalAmount": 10995, + "status": "CREATED", + "selectedProvince": null, + "selectedCity": null, + "createdAt": "2024-11-30T10:00:00.000Z" + }, + { + "orderNo": "PO202411300002", + "treeCount": 3, + "totalAmount": 6597, + "status": "MINING_ENABLED", + "selectedProvince": "广东省", + "selectedCity": "广州市", + "createdAt": "2024-11-25T08:00:00.000Z" + } +] +``` + +--- + +#### GET /planting/orders/:orderNo + +查询订单详情。 + +**请求** +```http +GET /api/v1/planting/orders/PO202411300001 +Authorization: Bearer +``` + +**响应** +```json +{ + "orderNo": "PO202411300001", + "userId": "1", + "treeCount": 5, + "totalAmount": 10995, + "status": "FUND_ALLOCATED", + "selectedProvince": "广东省", + "selectedCity": "广州市", + "provinceCitySelectedAt": "2024-11-30T10:01:00.000Z", + "provinceCityConfirmedAt": "2024-11-30T10:01:05.000Z", + "paidAt": "2024-11-30T10:02:00.000Z", + "fundAllocatedAt": "2024-11-30T10:02:01.000Z", + "allocations": [ + { + "targetType": "POOL", + "amount": 9895.5 + }, + { + "targetType": "OPERATION", + "amount": 549.75 + } + ], + "createdAt": "2024-11-30T10:00:00.000Z" +} +``` + +--- + +#### POST /planting/orders/:orderNo/select-province-city + +选择省市(开始5秒倒计时)。 + +**请求** +```http +POST /api/v1/planting/orders/PO202411300001/select-province-city +Authorization: Bearer +Content-Type: application/json + +{ + "provinceCode": "440000", + "provinceName": "广东省", + "cityCode": "440100", + "cityName": "广州市" +} +``` + +**参数说明** + +| 参数 | 类型 | 必填 | 说明 | +|-----|------|-----|------| +| provinceCode | string | 是 | 省份代码 | +| provinceName | string | 是 | 省份名称 | +| cityCode | string | 是 | 城市代码 | +| cityName | string | 是 | 城市名称 | + +**响应** +```json +{ + "success": true, + "message": "省市选择成功,请在5秒后确认", + "expiresAt": "2024-11-30T10:01:05.000Z" +} +``` + +**错误码** + +| 状态码 | 说明 | +|-------|------| +| 400 | 订单状态不允许选择省市 | +| 404 | 订单不存在 | +| 403 | 无权操作此订单 | + +--- + +#### POST /planting/orders/:orderNo/confirm-province-city + +确认省市选择(需在选择5秒后调用)。 + +**请求** +```http +POST /api/v1/planting/orders/PO202411300001/confirm-province-city +Authorization: Bearer +``` + +**响应** +```json +{ + "success": true, + "message": "省市确认成功" +} +``` + +**错误码** + +| 状态码 | 说明 | +|-------|------| +| 400 | 还需等待5秒才能确认 | +| 400 | 订单状态不允许确认 | +| 404 | 订单不存在 | + +--- + +#### POST /planting/orders/:orderNo/pay + +支付订单。 + +**请求** +```http +POST /api/v1/planting/orders/PO202411300001/pay +Authorization: Bearer +``` + +**响应** +```json +{ + "orderNo": "PO202411300001", + "status": "POOL_SCHEDULED", + "paidAt": "2024-11-30T10:02:00.000Z", + "totalAmount": 10995, + "allocations": [ + { + "targetType": "POOL", + "amount": 9895.5, + "description": "资金池" + }, + { + "targetType": "OPERATION", + "amount": 549.75, + "description": "运营费用" + }, + { + "targetType": "PROVINCE_AUTH", + "amount": 65.97, + "description": "省代奖励" + }, + { + "targetType": "CITY_AUTH", + "amount": 32.985, + "description": "市代奖励" + }, + { + "targetType": "COMMUNITY", + "amount": 54.975, + "description": "社区长奖励" + }, + { + "targetType": "REFERRAL_L1", + "amount": 164.925, + "description": "一级推荐奖励" + }, + { + "targetType": "REFERRAL_L2", + "amount": 109.95, + "description": "二级推荐奖励" + }, + { + "targetType": "REFERRAL_L3", + "amount": 54.975, + "description": "三级推荐奖励" + }, + { + "targetType": "PLATFORM", + "amount": 32.985, + "description": "平台费用" + }, + { + "targetType": "RESERVE", + "amount": 32.985, + "description": "储备金" + } + ], + "batchInfo": { + "batchNo": "BATCH202411300001", + "scheduledInjectionTime": "2024-12-05T00:00:00.000Z" + } +} +``` + +**错误码** + +| 状态码 | 说明 | +|-------|------| +| 400 | 余额不足 | +| 400 | 订单状态不允许支付 | +| 400 | 请先确认省市选择 | +| 404 | 订单不存在 | + +--- + +#### POST /planting/orders/:orderNo/cancel + +取消订单(仅未支付订单可取消)。 + +**请求** +```http +POST /api/v1/planting/orders/PO202411300001/cancel +Authorization: Bearer +``` + +**响应** +```json +{ + "success": true, + "message": "订单取消成功" +} +``` + +**错误码** + +| 状态码 | 说明 | +|-------|------| +| 400 | 订单状态不允许取消(已支付) | +| 404 | 订单不存在 | +| 403 | 无权操作此订单 | + +--- + +### 持仓查询 + +#### GET /planting/position + +查询用户持仓信息。 + +**请求** +```http +GET /api/v1/planting/position +Authorization: Bearer +``` + +**响应** +```json +{ + "totalTreeCount": 15, + "effectiveTreeCount": 12, + "pendingTreeCount": 3, + "firstMiningStartAt": "2024-11-20T00:00:00.000Z", + "distributions": [ + { + "provinceCode": "440000", + "provinceName": "广东省", + "cityCode": "440100", + "cityName": "广州市", + "treeCount": 10 + }, + { + "provinceCode": "310000", + "provinceName": "上海市", + "cityCode": "310100", + "cityName": "上海市", + "treeCount": 5 + } + ] +} +``` + +**字段说明** + +| 字段 | 类型 | 说明 | +|-----|------|------| +| totalTreeCount | number | 总认种数量 | +| effectiveTreeCount | number | 有效数量(已开始挖矿)| +| pendingTreeCount | number | 待生效数量 | +| firstMiningStartAt | string | 首次挖矿开始时间 | +| distributions | array | 按省市分布 | + +--- + +## 错误码 + +### HTTP 状态码 + +| 状态码 | 说明 | +|-------|------| +| 200 | 成功 | +| 201 | 创建成功 | +| 400 | 请求参数错误 | +| 401 | 未授权 | +| 403 | 禁止访问 | +| 404 | 资源不存在 | +| 500 | 服务器内部错误 | + +### 业务错误码 + +| 错误信息 | 说明 | +|---------|------| +| 超过个人最大认种数量限制 | 单用户最多认种1000棵 | +| 余额不足 | USDT 余额不足以支付 | +| 订单不存在 | 订单号无效或已删除 | +| 无权操作此订单 | 订单不属于当前用户 | +| 订单状态不允许此操作 | 状态机校验失败 | +| 还需等待5秒才能确认 | 省市选择5秒机制 | + +--- + +## 数据模型 + +### PlantingOrder + +```typescript +interface PlantingOrder { + orderNo: string; // 订单号,格式:PO + 年月日 + 序号 + userId: string; // 用户ID + treeCount: number; // 认种数量 + totalAmount: number; // 总金额 (USDT) + status: PlantingOrderStatus; + selectedProvince?: string; // 选择的省份 + selectedCity?: string; // 选择的城市 + provinceCitySelectedAt?: Date; + provinceCityConfirmedAt?: Date; + paidAt?: Date; + fundAllocatedAt?: Date; + poolInjectionBatchId?: string; + poolInjectionScheduledTime?: Date; + poolInjectionActualTime?: Date; + poolInjectionTxHash?: string; + miningEnabledAt?: Date; + createdAt: Date; + updatedAt: Date; +} +``` + +### PlantingOrderStatus + +```typescript +enum PlantingOrderStatus { + CREATED = 'CREATED', + PROVINCE_CITY_SELECTED = 'PROVINCE_CITY_SELECTED', + PROVINCE_CITY_CONFIRMED = 'PROVINCE_CITY_CONFIRMED', + PAID = 'PAID', + FUND_ALLOCATED = 'FUND_ALLOCATED', + POOL_SCHEDULED = 'POOL_SCHEDULED', + POOL_INJECTED = 'POOL_INJECTED', + MINING_ENABLED = 'MINING_ENABLED', + CANCELLED = 'CANCELLED' +} +``` + +### FundAllocationTargetType + +```typescript +enum FundAllocationTargetType { + POOL = 'POOL', // 资金池 90% + OPERATION = 'OPERATION', // 运营 5% + PROVINCE_AUTH = 'PROVINCE_AUTH', // 省代 0.6% + CITY_AUTH = 'CITY_AUTH', // 市代 0.3% + COMMUNITY = 'COMMUNITY', // 社区长 0.5% + REFERRAL_L1 = 'REFERRAL_L1', // 一级推荐 1.5% + REFERRAL_L2 = 'REFERRAL_L2', // 二级推荐 1.0% + REFERRAL_L3 = 'REFERRAL_L3', // 三级推荐 0.5% + PLATFORM = 'PLATFORM', // 平台 0.3% + RESERVE = 'RESERVE' // 储备 0.3% +} +``` + +### PlantingPosition + +```typescript +interface PlantingPosition { + userId: string; + totalTreeCount: number; + effectiveTreeCount: number; + pendingTreeCount: number; + firstMiningStartAt?: Date; + distributions: PositionDistribution[]; +} + +interface PositionDistribution { + provinceCode: string; + provinceName: string; + cityCode: string; + cityName: string; + treeCount: number; +} +``` + +--- + +## 使用示例 + +### cURL 示例 + +```bash +# 1. 创建订单 +curl -X POST http://localhost:3003/api/v1/planting/orders \ + -H "Authorization: Bearer $TOKEN" \ + -H "Content-Type: application/json" \ + -d '{"treeCount": 5}' + +# 2. 选择省市 +curl -X POST http://localhost:3003/api/v1/planting/orders/PO202411300001/select-province-city \ + -H "Authorization: Bearer $TOKEN" \ + -H "Content-Type: application/json" \ + -d '{ + "provinceCode": "440000", + "provinceName": "广东省", + "cityCode": "440100", + "cityName": "广州市" + }' + +# 3. 等待5秒后确认省市 +sleep 5 +curl -X POST http://localhost:3003/api/v1/planting/orders/PO202411300001/confirm-province-city \ + -H "Authorization: Bearer $TOKEN" + +# 4. 支付订单 +curl -X POST http://localhost:3003/api/v1/planting/orders/PO202411300001/pay \ + -H "Authorization: Bearer $TOKEN" + +# 5. 查询持仓 +curl http://localhost:3003/api/v1/planting/position \ + -H "Authorization: Bearer $TOKEN" +``` + +### JavaScript/TypeScript 示例 + +```typescript +import axios from 'axios'; + +const api = axios.create({ + baseURL: 'http://localhost:3003/api/v1', + headers: { + 'Authorization': `Bearer ${token}`, + 'Content-Type': 'application/json' + } +}); + +// 创建订单 +const { data: order } = await api.post('/planting/orders', { treeCount: 5 }); + +// 选择省市 +await api.post(`/planting/orders/${order.orderNo}/select-province-city`, { + provinceCode: '440000', + provinceName: '广东省', + cityCode: '440100', + cityName: '广州市' +}); + +// 等待5秒 +await new Promise(resolve => setTimeout(resolve, 5000)); + +// 确认省市 +await api.post(`/planting/orders/${order.orderNo}/confirm-province-city`); + +// 支付 +const { data: payResult } = await api.post(`/planting/orders/${order.orderNo}/pay`); +console.log('支付成功,资金分配:', payResult.allocations); +``` diff --git a/backend/services/planting-service/docs/ARCHITECTURE.md b/backend/services/planting-service/docs/ARCHITECTURE.md new file mode 100644 index 00000000..e00e6dc5 --- /dev/null +++ b/backend/services/planting-service/docs/ARCHITECTURE.md @@ -0,0 +1,423 @@ +# Planting Service 架构文档 + +## 目录 + +- [概述](#概述) +- [架构模式](#架构模式) +- [分层架构](#分层架构) +- [领域模型](#领域模型) +- [数据流](#数据流) +- [技术栈](#技术栈) +- [目录结构](#目录结构) + +--- + +## 概述 + +Planting Service 是 RWA Durian Queen 平台的核心微服务之一,负责处理榴莲树认种业务的完整生命周期。该服务采用 **领域驱动设计 (DDD)** 结合 **六边形架构 (Hexagonal Architecture)** 进行设计和实现。 + +### 核心职责 + +1. **认种订单管理** - 创建、支付、取消订单 +2. **省市选择机制** - 5秒确认机制防止误操作 +3. **资金分配** - 10种目标的精确分配(总计2199 USDT/棵) +4. **持仓管理** - 用户认种持仓的统计与追踪 +5. **资金池注入** - 5天批次管理机制 + +--- + +## 架构模式 + +### 领域驱动设计 (DDD) + +``` +┌─────────────────────────────────────────────────────────────────┐ +│ Presentation Layer │ +│ (Controllers, DTOs) │ +├─────────────────────────────────────────────────────────────────┤ +│ Application Layer │ +│ (Application Services, Use Cases) │ +├─────────────────────────────────────────────────────────────────┤ +│ Domain Layer │ +│ (Aggregates, Entities, Value Objects, Domain Services) │ +├─────────────────────────────────────────────────────────────────┤ +│ Infrastructure Layer │ +│ (Repositories, External Services, Persistence) │ +└─────────────────────────────────────────────────────────────────┘ +``` + +### 六边形架构 (Ports & Adapters) + +``` + ┌─────────────────────────┐ + │ HTTP API │ + │ (Primary Adapter) │ + └───────────┬─────────────┘ + │ + ┌───────────▼─────────────┐ + │ │ + ┌───────────────┤ Application Core ├───────────────┐ + │ │ │ │ + │ │ ┌─────────────────┐ │ │ + │ │ │ Domain Model │ │ │ + │ │ │ │ │ │ + │ │ │ - Aggregates │ │ │ + │ │ │ - Services │ │ │ + │ │ │ - Events │ │ │ + │ │ └─────────────────┘ │ │ + │ │ │ │ + │ └─────────────────────────┘ │ + │ │ │ + ▼ ▼ ▼ +┌───────────┐ ┌───────────────┐ ┌───────────────┐ +│ PostgreSQL│ │ Wallet Service│ │Referral Service│ +│ (Prisma) │ │ (HTTP) │ │ (HTTP) │ +└───────────┘ └───────────────┘ └───────────────┘ + Secondary Secondary Secondary + Adapter Adapter Adapter +``` + +--- + +## 分层架构 + +### 1. API 层 (`src/api/`) + +**职责**: 处理 HTTP 请求/响应,输入验证,认证授权 + +``` +src/api/ +├── controllers/ # 控制器 +│ ├── health.controller.ts +│ ├── planting-order.controller.ts +│ └── planting-position.controller.ts +├── dto/ # 数据传输对象 +│ ├── request/ # 请求 DTO +│ └── response/ # 响应 DTO +├── guards/ # 守卫 +│ └── jwt-auth.guard.ts +└── api.module.ts +``` + +**设计原则**: +- 控制器仅负责 HTTP 协议处理 +- DTO 用于数据验证和转换 +- 不包含业务逻辑 + +### 2. Application 层 (`src/application/`) + +**职责**: 编排业务用例,协调领域对象,事务管理 + +``` +src/application/ +├── services/ +│ ├── planting-application.service.ts # 主应用服务 +│ └── pool-injection.service.ts # 资金池注入服务 +└── application.module.ts +``` + +**核心职责**: +- 用例编排 +- 跨聚合协调 +- 外部服务调用 +- 事务边界控制 + +### 3. Domain 层 (`src/domain/`) + +**职责**: 核心业务逻辑,业务规则验证 + +``` +src/domain/ +├── aggregates/ # 聚合根 +│ ├── planting-order.aggregate.ts +│ ├── planting-position.aggregate.ts +│ └── pool-injection-batch.aggregate.ts +├── value-objects/ # 值对象 +│ ├── tree-count.vo.ts +│ ├── province-city-selection.vo.ts +│ ├── fund-allocation.vo.ts +│ └── money.vo.ts +├── events/ # 领域事件 +│ ├── planting-order-created.event.ts +│ ├── province-city-confirmed.event.ts +│ └── funds-allocated.event.ts +├── services/ # 领域服务 +│ └── fund-allocation.service.ts +├── repositories/ # 仓储接口 +│ ├── planting-order.repository.interface.ts +│ ├── planting-position.repository.interface.ts +│ └── pool-injection-batch.repository.interface.ts +└── domain.module.ts +``` + +**设计原则**: +- 聚合是事务一致性边界 +- 值对象不可变 +- 领域事件用于跨聚合通信 +- 仓储接口定义在领域层 + +### 4. Infrastructure 层 (`src/infrastructure/`) + +**职责**: 技术实现,外部系统集成 + +``` +src/infrastructure/ +├── persistence/ +│ ├── prisma/ +│ │ └── prisma.service.ts +│ ├── mappers/ # 领域对象<->持久化对象映射 +│ │ ├── planting-order.mapper.ts +│ │ ├── planting-position.mapper.ts +│ │ └── pool-injection-batch.mapper.ts +│ └── repositories/ # 仓储实现 +│ ├── planting-order.repository.impl.ts +│ ├── planting-position.repository.impl.ts +│ └── pool-injection-batch.repository.impl.ts +├── external/ # 外部服务客户端 +│ ├── wallet-service.client.ts +│ └── referral-service.client.ts +└── infrastructure.module.ts +``` + +--- + +## 领域模型 + +### 聚合关系图 + +``` +┌─────────────────────────────────────────────────────────────────────┐ +│ PlantingOrder │ +│ (聚合根 - 认种订单) │ +│ │ +│ ┌──────────────────┐ ┌────────────────────┐ │ +│ │ TreeCount │ │ ProvinceCitySelection│ │ +│ │ (认种数量) │ │ (省市选择) │ │ +│ └──────────────────┘ └────────────────────┘ │ +│ │ +│ ┌──────────────────────────────────────────────────────────────┐ │ +│ │ FundAllocation[] │ │ +│ │ (资金分配列表) │ │ +│ │ │ │ +│ │ POOL(90%) | OPERATION(5%) | PROVINCE(0.6%) | CITY(0.3%) ... │ │ +│ └──────────────────────────────────────────────────────────────┘ │ +└─────────────────────────────────────────────────────────────────────┘ + │ + │ 1:N + ▼ +┌─────────────────────────────────────────────────────────────────────┐ +│ PlantingPosition │ +│ (聚合根 - 用户持仓) │ +│ │ +│ ┌──────────────────────────────────────────────────────────────┐ │ +│ │ PositionDistribution[] │ │ +│ │ (持仓分布 - 按省市统计) │ │ +│ └──────────────────────────────────────────────────────────────┘ │ +└─────────────────────────────────────────────────────────────────────┘ + +┌─────────────────────────────────────────────────────────────────────┐ +│ PoolInjectionBatch │ +│ (聚合根 - 资金池注入批次) │ +│ │ +│ - 5天为一个批次周期 │ +│ - 批量处理订单的资金池注入 │ +│ - 状态: OPEN -> SCHEDULED -> INJECTING -> COMPLETED │ +└─────────────────────────────────────────────────────────────────────┘ +``` + +### 订单状态流转 + +``` + ┌──────────┐ + │ CREATED │ ◄─── 创建订单 + └────┬─────┘ + │ selectProvinceCity() + ▼ + ┌──────────────────────┐ + │ PROVINCE_CITY_SELECTED│ ◄─── 选择省市(5秒等待) + └────┬─────────────────┘ + │ confirmProvinceCity() (5秒后) + ▼ + ┌──────────────────────┐ + │PROVINCE_CITY_CONFIRMED│ ◄─── 确认省市 + └────┬─────────────────┘ + │ pay() + ▼ + ┌──────────┐ + │ PAID │ ◄─── 支付完成 + └────┬─────┘ + │ allocateFunds() + ▼ + ┌────────────────┐ + │ FUND_ALLOCATED │ ◄─── 资金分配完成 + └────┬───────────┘ + │ scheduleToBatch() + ▼ + ┌────────────────┐ + │ POOL_SCHEDULED │ ◄─── 加入注入批次 + └────┬───────────┘ + │ markPoolInjected() + ▼ + ┌────────────────┐ + │ POOL_INJECTED │ ◄─── 资金池注入完成 + └────┬───────────┘ + │ enableMining() + ▼ + ┌────────────────┐ + │ MINING_ENABLED │ ◄─── 开始挖矿 + └────────────────┘ + + 任意状态(PAID之前)可转为: + ┌───────────┐ + │ CANCELLED │ ◄─── 取消订单 + └───────────┘ +``` + +### 资金分配模型 + +每棵树 **2199 USDT** 分配到 10 个目标: + +| 序号 | 目标类型 | 金额 (USDT) | 比例 | +|-----|---------|------------|------| +| 1 | POOL (资金池) | 1979.1 | 90% | +| 2 | OPERATION (运营) | 109.95 | 5% | +| 3 | PROVINCE_AUTH (省代) | 13.194 | 0.6% | +| 4 | CITY_AUTH (市代) | 6.597 | 0.3% | +| 5 | COMMUNITY (社区长) | 10.995 | 0.5% | +| 6 | REFERRAL_L1 (一级推荐) | 32.985 | 1.5% | +| 7 | REFERRAL_L2 (二级推荐) | 21.99 | 1.0% | +| 8 | REFERRAL_L3 (三级推荐) | 10.995 | 0.5% | +| 9 | PLATFORM (平台) | 6.597 | 0.3% | +| 10 | RESERVE (储备) | 6.597 | 0.3% | +| **总计** | | **2199** | **100%** | + +--- + +## 数据流 + +### 创建订单流程 + +``` +┌──────┐ ┌────────────┐ ┌─────────────────┐ ┌──────────────┐ +│Client│────▶│ Controller │────▶│ Application Svc │────▶│ Domain Layer │ +└──────┘ └────────────┘ └─────────────────┘ └──────────────┘ + │ │ │ │ + │ POST /orders│ │ │ + │ {treeCount} │ │ │ + │ │ │ │ + │ │ createOrder() │ │ + │ │────────────────────▶│ │ + │ │ │ │ + │ │ │ 检查限购数量 │ + │ │ │─────────────────────▶│ + │ │ │ │ + │ │ │ 检查余额 │ + │ │ │─────────────────────▶│ + │ │ │ (Wallet Service) │ + │ │ │ │ + │ │ │ 创建订单聚合 │ + │ │ │─────────────────────▶│ + │ │ │ │ + │ │ │ 保存订单 │ + │ │ │─────────────────────▶│ + │ │ │ (Repository) │ + │ │ │ │ + │◀─────────────│◀────────────────────│◀─────────────────────│ + │ OrderDTO │ │ │ +``` + +### 支付订单流程 + +``` +┌──────┐ ┌────────────┐ ┌─────────────────┐ ┌──────────────┐ +│Client│────▶│ Controller │────▶│ Application Svc │────▶│ Domain Layer │ +└──────┘ └────────────┘ └─────────────────┘ └──────────────┘ + │ │ │ │ + │ POST /pay │ │ │ + │ │ payOrder() │ │ + │ │────────────────────▶│ │ + │ │ │ │ + │ │ │ 1. 扣款 │ + │ │ │─────────────────────▶│ + │ │ │ (Wallet Service) │ + │ │ │ │ + │ │ │ 2. 获取推荐上下文 │ + │ │ │─────────────────────▶│ + │ │ │ (Referral Service) │ + │ │ │ │ + │ │ │ 3. 计算资金分配 │ + │ │ │─────────────────────▶│ + │ │ │ (FundAllocationSvc) │ + │ │ │ │ + │ │ │ 4. 执行资金分配 │ + │ │ │─────────────────────▶│ + │ │ │ (Wallet Service) │ + │ │ │ │ + │ │ │ 5. 更新用户持仓 │ + │ │ │─────────────────────▶│ + │ │ │ (Position Repo) │ + │ │ │ │ + │ │ │ 6. 加入注入批次 │ + │ │ │─────────────────────▶│ + │ │ │ (Batch Repo) │ + │ │ │ │ + │◀─────────────│◀────────────────────│◀─────────────────────│ + │ PayResult │ │ │ +``` + +--- + +## 技术栈 + +| 组件 | 技术选型 | 用途 | +|-----|---------|------| +| 框架 | NestJS 10.x | Web 框架 | +| 语言 | TypeScript 5.x | 开发语言 | +| 数据库 | PostgreSQL 16 | 主数据库 | +| ORM | Prisma 5.x | 数据访问 | +| 验证 | class-validator | 输入验证 | +| 文档 | Swagger/OpenAPI | API 文档 | +| 测试 | Jest + Supertest | 测试框架 | +| 容器 | Docker | 容器化部署 | + +--- + +## 目录结构 + +``` +planting-service/ +├── docs/ # 文档目录 +│ ├── ARCHITECTURE.md # 架构文档 +│ ├── API.md # API 文档 +│ ├── DEVELOPMENT.md # 开发指南 +│ ├── TESTING.md # 测试文档 +│ └── DEPLOYMENT.md # 部署文档 +├── prisma/ +│ ├── schema.prisma # 数据库模型 +│ └── migrations/ # 数据库迁移 +├── src/ +│ ├── api/ # API 层 +│ ├── application/ # 应用层 +│ ├── domain/ # 领域层 +│ ├── infrastructure/ # 基础设施层 +│ ├── config/ # 配置 +│ ├── shared/ # 共享模块 +│ ├── app.module.ts # 根模块 +│ └── main.ts # 入口文件 +├── test/ # E2E 测试 +├── docker-compose.yml # Docker 编排 +├── docker-compose.test.yml # 测试环境编排 +├── Dockerfile # 生产镜像 +├── Dockerfile.test # 测试镜像 +├── Makefile # 构建脚本 +└── package.json +``` + +--- + +## 参考资料 + +- [领域驱动设计 (Eric Evans)](https://www.domainlanguage.com/ddd/) +- [六边形架构 (Alistair Cockburn)](https://alistair.cockburn.us/hexagonal-architecture/) +- [NestJS 官方文档](https://docs.nestjs.com/) +- [Prisma 官方文档](https://www.prisma.io/docs/) diff --git a/backend/services/planting-service/docs/DEPLOYMENT.md b/backend/services/planting-service/docs/DEPLOYMENT.md new file mode 100644 index 00000000..30122e84 --- /dev/null +++ b/backend/services/planting-service/docs/DEPLOYMENT.md @@ -0,0 +1,760 @@ +# Planting Service 部署文档 + +## 目录 + +- [部署概述](#部署概述) +- [环境要求](#环境要求) +- [配置管理](#配置管理) +- [Docker 部署](#docker-部署) +- [Kubernetes 部署](#kubernetes-部署) +- [数据库迁移](#数据库迁移) +- [健康检查](#健康检查) +- [监控与日志](#监控与日志) +- [故障排查](#故障排查) +- [回滚策略](#回滚策略) + +--- + +## 部署概述 + +### 部署架构 + +``` + ┌─────────────────┐ + │ Load Balancer │ + │ (Nginx/ALB) │ + └────────┬────────┘ + │ + ┌───────────────────┼───────────────────┐ + │ │ │ + ▼ ▼ ▼ + ┌─────────────────┐ ┌─────────────────┐ ┌─────────────────┐ + │ Planting Service│ │ Planting Service│ │ Planting Service│ + │ Instance 1 │ │ Instance 2 │ │ Instance 3 │ + └────────┬────────┘ └────────┬────────┘ └────────┬────────┘ + │ │ │ + └───────────────────┼───────────────────┘ + │ + ┌────────▼────────┐ + │ PostgreSQL │ + │ (Primary/RDS) │ + └─────────────────┘ +``` + +### 部署方式 + +| 方式 | 适用场景 | 复杂度 | +|-----|---------|-------| +| Docker Compose | 开发/测试环境 | 低 | +| Docker Swarm | 小规模生产 | 中 | +| Kubernetes | 大规模生产 | 高 | +| Cloud Run/ECS | 托管云服务 | 中 | + +--- + +## 环境要求 + +### 生产环境最低配置 + +| 资源 | 最低配置 | 推荐配置 | +|-----|---------|---------| +| CPU | 2 核 | 4 核 | +| 内存 | 2 GB | 4 GB | +| 磁盘 | 20 GB SSD | 50 GB SSD | +| 网络 | 100 Mbps | 1 Gbps | + +### 数据库配置 + +| 环境 | 实例类型 | 存储 | +|-----|---------|------| +| 开发 | db.t3.micro | 20 GB | +| 测试 | db.t3.small | 50 GB | +| 生产 | db.r5.large | 200 GB | + +--- + +## 配置管理 + +### 环境变量 + +```bash +# 基础配置 +NODE_ENV=production +PORT=3003 + +# 数据库 +DATABASE_URL=postgresql://user:password@host:5432/dbname?schema=public + +# JWT 认证 +JWT_SECRET= + +# 外部服务 +WALLET_SERVICE_URL=http://wallet-service:3002 +IDENTITY_SERVICE_URL=http://identity-service:3001 +REFERRAL_SERVICE_URL=http://referral-service:3004 + +# 日志 +LOG_LEVEL=info + +# 性能 +MAX_CONNECTIONS=100 +QUERY_TIMEOUT=30000 +``` + +### 配置文件示例 + +**.env.production** + +```env +NODE_ENV=production +PORT=3003 +DATABASE_URL=postgresql://planting:${DB_PASSWORD}@db.prod.internal:5432/rwadurian_planting?schema=public&connection_limit=50 +JWT_SECRET=${JWT_SECRET} +WALLET_SERVICE_URL=http://wallet-service.prod.internal:3002 +IDENTITY_SERVICE_URL=http://identity-service.prod.internal:3001 +REFERRAL_SERVICE_URL=http://referral-service.prod.internal:3004 +LOG_LEVEL=info +``` + +### 敏感信息管理 + +使用密钥管理服务: + +```bash +# AWS Secrets Manager +aws secretsmanager get-secret-value --secret-id planting-service/prod + +# Kubernetes Secrets +kubectl create secret generic planting-secrets \ + --from-literal=DATABASE_URL='...' \ + --from-literal=JWT_SECRET='...' +``` + +--- + +## Docker 部署 + +### 生产 Dockerfile + +```dockerfile +# Build stage +FROM node:20-alpine AS builder + +WORKDIR /app + +# 复制依赖文件 +COPY package*.json ./ + +# 安装依赖 +RUN npm ci + +# 复制 Prisma schema 并生成客户端 +COPY prisma ./prisma/ +RUN npx prisma generate + +# 复制源代码 +COPY . . + +# 构建 +RUN npm run build + +# Production stage +FROM node:20-alpine AS production + +WORKDIR /app + +# 创建非 root 用户 +RUN addgroup -g 1001 -S nodejs && \ + adduser -S nestjs -u 1001 -G nodejs + +# 复制依赖文件 +COPY package*.json ./ + +# 仅安装生产依赖 +RUN npm ci --only=production + +# 复制 Prisma +COPY prisma ./prisma/ +RUN npx prisma generate + +# 复制构建产物 +COPY --from=builder /app/dist ./dist + +# 切换到非 root 用户 +USER nestjs + +# 暴露端口 +EXPOSE 3003 + +# 健康检查 +HEALTHCHECK --interval=30s --timeout=3s --start-period=5s --retries=3 \ + CMD wget --no-verbose --tries=1 --spider http://localhost:3003/api/v1/health || exit 1 + +# 启动命令 +CMD ["node", "dist/main"] +``` + +### Docker Compose 生产配置 + +```yaml +# docker-compose.prod.yml +version: '3.8' + +services: + planting-service: + build: + context: . + dockerfile: Dockerfile + target: production + image: planting-service:${VERSION:-latest} + container_name: planting-service + restart: unless-stopped + ports: + - "3003:3003" + environment: + - NODE_ENV=production + - DATABASE_URL=${DATABASE_URL} + - JWT_SECRET=${JWT_SECRET} + - WALLET_SERVICE_URL=${WALLET_SERVICE_URL} + - IDENTITY_SERVICE_URL=${IDENTITY_SERVICE_URL} + - REFERRAL_SERVICE_URL=${REFERRAL_SERVICE_URL} + healthcheck: + test: ["CMD", "wget", "--spider", "-q", "http://localhost:3003/api/v1/health"] + interval: 30s + timeout: 10s + retries: 3 + start_period: 40s + deploy: + resources: + limits: + cpus: '2' + memory: 2G + reservations: + cpus: '1' + memory: 1G + logging: + driver: json-file + options: + max-size: "10m" + max-file: "3" + networks: + - rwadurian-network + +networks: + rwadurian-network: + external: true +``` + +### 部署命令 + +```bash +# 构建镜像 +docker build -t planting-service:v1.0.0 . + +# 推送到仓库 +docker tag planting-service:v1.0.0 registry.example.com/planting-service:v1.0.0 +docker push registry.example.com/planting-service:v1.0.0 + +# 部署 +docker-compose -f docker-compose.prod.yml up -d + +# 查看日志 +docker-compose -f docker-compose.prod.yml logs -f planting-service + +# 重启 +docker-compose -f docker-compose.prod.yml restart planting-service + +# 停止 +docker-compose -f docker-compose.prod.yml down +``` + +--- + +## Kubernetes 部署 + +### Deployment + +```yaml +# k8s/deployment.yaml +apiVersion: apps/v1 +kind: Deployment +metadata: + name: planting-service + labels: + app: planting-service +spec: + replicas: 3 + selector: + matchLabels: + app: planting-service + template: + metadata: + labels: + app: planting-service + spec: + containers: + - name: planting-service + image: registry.example.com/planting-service:v1.0.0 + ports: + - containerPort: 3003 + env: + - name: NODE_ENV + value: production + - name: PORT + value: "3003" + - name: DATABASE_URL + valueFrom: + secretKeyRef: + name: planting-secrets + key: DATABASE_URL + - name: JWT_SECRET + valueFrom: + secretKeyRef: + name: planting-secrets + key: JWT_SECRET + resources: + requests: + cpu: "500m" + memory: "512Mi" + limits: + cpu: "2000m" + memory: "2Gi" + livenessProbe: + httpGet: + path: /api/v1/health + port: 3003 + initialDelaySeconds: 30 + periodSeconds: 10 + timeoutSeconds: 5 + failureThreshold: 3 + readinessProbe: + httpGet: + path: /api/v1/health/ready + port: 3003 + initialDelaySeconds: 5 + periodSeconds: 5 + timeoutSeconds: 3 + failureThreshold: 3 + imagePullSecrets: + - name: registry-credentials +``` + +### Service + +```yaml +# k8s/service.yaml +apiVersion: v1 +kind: Service +metadata: + name: planting-service +spec: + selector: + app: planting-service + ports: + - protocol: TCP + port: 3003 + targetPort: 3003 + type: ClusterIP +``` + +### Ingress + +```yaml +# k8s/ingress.yaml +apiVersion: networking.k8s.io/v1 +kind: Ingress +metadata: + name: planting-service-ingress + annotations: + kubernetes.io/ingress.class: nginx + cert-manager.io/cluster-issuer: letsencrypt-prod +spec: + tls: + - hosts: + - api.rwadurian.com + secretName: api-tls + rules: + - host: api.rwadurian.com + http: + paths: + - path: /api/v1/planting + pathType: Prefix + backend: + service: + name: planting-service + port: + number: 3003 +``` + +### HPA (Horizontal Pod Autoscaler) + +```yaml +# k8s/hpa.yaml +apiVersion: autoscaling/v2 +kind: HorizontalPodAutoscaler +metadata: + name: planting-service-hpa +spec: + scaleTargetRef: + apiVersion: apps/v1 + kind: Deployment + name: planting-service + minReplicas: 3 + maxReplicas: 10 + metrics: + - type: Resource + resource: + name: cpu + target: + type: Utilization + averageUtilization: 70 + - type: Resource + resource: + name: memory + target: + type: Utilization + averageUtilization: 80 +``` + +### 部署命令 + +```bash +# 创建 secrets +kubectl create secret generic planting-secrets \ + --from-literal=DATABASE_URL='postgresql://...' \ + --from-literal=JWT_SECRET='...' + +# 应用配置 +kubectl apply -f k8s/ + +# 查看状态 +kubectl get pods -l app=planting-service +kubectl get svc planting-service + +# 查看日志 +kubectl logs -f -l app=planting-service + +# 扩容 +kubectl scale deployment planting-service --replicas=5 + +# 回滚 +kubectl rollout undo deployment/planting-service +``` + +--- + +## 数据库迁移 + +### 迁移策略 + +``` +┌─────────────────────────────────────────────────────────────────┐ +│ 数据库迁移流程 │ +├─────────────────────────────────────────────────────────────────┤ +│ 1. 创建迁移脚本 (开发环境) │ +│ npx prisma migrate dev --name add_new_feature │ +│ │ +│ 2. 代码审查迁移脚本 │ +│ 检查 prisma/migrations/ 目录 │ +│ │ +│ 3. 测试环境验证 │ +│ npx prisma migrate deploy │ +│ │ +│ 4. 生产环境部署 │ +│ - 备份数据库 │ +│ - 运行迁移 (npx prisma migrate deploy) │ +│ - 部署新版本应用 │ +└─────────────────────────────────────────────────────────────────┘ +``` + +### 迁移命令 + +```bash +# 开发环境 - 创建迁移 +npx prisma migrate dev --name add_new_feature + +# 生产环境 - 应用迁移 +npx prisma migrate deploy + +# 查看迁移状态 +npx prisma migrate status + +# 重置数据库 (仅开发) +npx prisma migrate reset +``` + +### 迁移最佳实践 + +1. **向后兼容**: 新版本应用应兼容旧数据库 schema +2. **分步迁移**: 大型变更分多个小迁移执行 +3. **备份优先**: 生产迁移前必须备份 +4. **回滚脚本**: 准备对应的回滚 SQL + +--- + +## 健康检查 + +### 端点说明 + +| 端点 | 用途 | 检查内容 | +|-----|------|---------| +| `/api/v1/health` | 存活检查 | 服务是否运行 | +| `/api/v1/health/ready` | 就绪检查 | 服务是否可接收请求 | + +### 健康检查实现 + +```typescript +// src/api/controllers/health.controller.ts + +@Controller('health') +export class HealthController { + @Get() + check() { + return { + status: 'ok', + timestamp: new Date().toISOString(), + service: 'planting-service', + }; + } + + @Get('ready') + async ready() { + // 可添加数据库连接检查 + return { + status: 'ready', + timestamp: new Date().toISOString(), + }; + } +} +``` + +### 负载均衡器配置 + +**Nginx 配置** + +```nginx +upstream planting_service { + server planting-service-1:3003; + server planting-service-2:3003; + server planting-service-3:3003; +} + +server { + listen 80; + server_name api.rwadurian.com; + + location /api/v1/planting { + proxy_pass http://planting_service; + proxy_http_version 1.1; + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection 'upgrade'; + proxy_set_header Host $host; + proxy_cache_bypass $http_upgrade; + + # 健康检查 + proxy_connect_timeout 5s; + proxy_read_timeout 30s; + } + + location /health { + proxy_pass http://planting_service/api/v1/health; + proxy_connect_timeout 5s; + proxy_read_timeout 5s; + } +} +``` + +--- + +## 监控与日志 + +### 日志配置 + +```typescript +// src/main.ts +import { Logger } from '@nestjs/common'; + +async function bootstrap() { + const app = await NestFactory.create(AppModule, { + logger: process.env.NODE_ENV === 'production' + ? ['error', 'warn', 'log'] + : ['error', 'warn', 'log', 'debug', 'verbose'], + }); + // ... +} +``` + +### 日志格式 + +```json +{ + "timestamp": "2024-11-30T10:00:00.000Z", + "level": "info", + "context": "PlantingApplicationService", + "message": "Order created", + "metadata": { + "orderNo": "PO202411300001", + "userId": "1", + "treeCount": 5 + } +} +``` + +### Prometheus 指标 + +```yaml +# prometheus/scrape_configs +- job_name: 'planting-service' + static_configs: + - targets: ['planting-service:3003'] + metrics_path: '/metrics' +``` + +### Grafana 仪表板 + +关键指标: +- 请求速率 (requests/second) +- 响应时间 (p50, p95, p99) +- 错误率 +- 数据库连接池状态 +- 订单创建数 +- 支付成功率 + +--- + +## 故障排查 + +### 常见问题 + +#### 1. 服务无法启动 + +```bash +# 检查日志 +docker logs planting-service + +# 常见原因 +# - 数据库连接失败 +# - 环境变量缺失 +# - 端口冲突 +``` + +#### 2. 数据库连接失败 + +```bash +# 检查连接 +psql $DATABASE_URL -c "SELECT 1" + +# 检查 Prisma +npx prisma db pull +``` + +#### 3. 内存不足 + +```bash +# 检查内存使用 +docker stats planting-service + +# 调整 Node.js 内存限制 +NODE_OPTIONS="--max-old-space-size=4096" node dist/main +``` + +#### 4. 高延迟 + +```bash +# 检查数据库查询 +# 启用 Prisma 查询日志 + +# 检查外部服务响应 +curl -w "@curl-format.txt" http://wallet-service:3002/health +``` + +### 调试命令 + +```bash +# 进入容器 +docker exec -it planting-service sh + +# 检查网络 +docker exec planting-service ping db + +# 检查环境变量 +docker exec planting-service env | grep DATABASE + +# 实时日志 +docker logs -f --tail 100 planting-service +``` + +--- + +## 回滚策略 + +### Docker 回滚 + +```bash +# 停止当前版本 +docker-compose -f docker-compose.prod.yml down + +# 启动上一版本 +docker-compose -f docker-compose.prod.yml up -d --no-build +``` + +### Kubernetes 回滚 + +```bash +# 查看部署历史 +kubectl rollout history deployment/planting-service + +# 回滚到上一版本 +kubectl rollout undo deployment/planting-service + +# 回滚到指定版本 +kubectl rollout undo deployment/planting-service --to-revision=2 + +# 查看回滚状态 +kubectl rollout status deployment/planting-service +``` + +### 数据库回滚 + +```sql +-- 准备回滚脚本 +-- prisma/rollback/20241130_rollback.sql + +-- 示例:回滚列添加 +ALTER TABLE "PlantingOrder" DROP COLUMN IF EXISTS "newColumn"; +``` + +### 回滚检查清单 + +- [ ] 确认问题根因 +- [ ] 通知相关团队 +- [ ] 执行回滚操作 +- [ ] 验证服务恢复 +- [ ] 检查数据一致性 +- [ ] 更新事故报告 + +--- + +## 部署检查清单 + +### 部署前 + +- [ ] 代码审查通过 +- [ ] 所有测试通过 +- [ ] 数据库迁移已测试 +- [ ] 环境变量已配置 +- [ ] 备份已完成 + +### 部署中 + +- [ ] 监控仪表板就绪 +- [ ] 日志收集正常 +- [ ] 渐进式部署 (金丝雀/蓝绿) +- [ ] 健康检查通过 + +### 部署后 + +- [ ] 功能验证 +- [ ] 性能验证 +- [ ] 错误率监控 +- [ ] 用户反馈收集 diff --git a/backend/services/planting-service/docs/DEVELOPMENT.md b/backend/services/planting-service/docs/DEVELOPMENT.md new file mode 100644 index 00000000..fd84c124 --- /dev/null +++ b/backend/services/planting-service/docs/DEVELOPMENT.md @@ -0,0 +1,650 @@ +# Planting Service 开发指南 + +## 目录 + +- [环境要求](#环境要求) +- [项目设置](#项目设置) +- [开发流程](#开发流程) +- [代码规范](#代码规范) +- [领域开发指南](#领域开发指南) +- [常用命令](#常用命令) +- [调试技巧](#调试技巧) +- [常见问题](#常见问题) + +--- + +## 环境要求 + +### 必需工具 + +| 工具 | 版本 | 用途 | +|-----|------|------| +| Node.js | ≥ 20.x | 运行时 | +| npm | ≥ 10.x | 包管理 | +| PostgreSQL | ≥ 16.x | 数据库 | +| Docker | ≥ 24.x | 容器化 (可选) | +| Git | ≥ 2.x | 版本控制 | + +### 推荐 IDE + +- **VS Code** + 推荐插件: + - ESLint + - Prettier + - Prisma + - GitLens + - REST Client + +--- + +## 项目设置 + +### 1. 克隆项目 + +```bash +git clone +cd backend/services/planting-service +``` + +### 2. 安装依赖 + +```bash +npm install +# 或使用 make +make install +``` + +### 3. 环境配置 + +复制环境配置文件: + +```bash +cp .env.example .env +``` + +编辑 `.env` 文件: + +```env +# 数据库 +DATABASE_URL="postgresql://postgres:postgres@localhost:5432/rwadurian_planting?schema=public" + +# JWT +JWT_SECRET="your-secret-key" + +# 服务端口 +PORT=3003 + +# 外部服务 +WALLET_SERVICE_URL=http://localhost:3002 +IDENTITY_SERVICE_URL=http://localhost:3001 +REFERRAL_SERVICE_URL=http://localhost:3004 +``` + +### 4. 数据库设置 + +```bash +# 生成 Prisma Client +npx prisma generate + +# 运行数据库迁移 +npx prisma migrate dev + +# (可选) 打开 Prisma Studio +npx prisma studio +``` + +### 5. 启动开发服务器 + +```bash +npm run start:dev +# 或使用 make +make dev +``` + +服务将在 `http://localhost:3003` 启动。 + +--- + +## 开发流程 + +### Git 分支策略 + +``` +main # 生产分支 +├── develop # 开发分支 + ├── feature/* # 功能分支 + ├── bugfix/* # 修复分支 + └── hotfix/* # 紧急修复分支 +``` + +### 开发流程 + +1. **创建功能分支** + ```bash + git checkout develop + git pull origin develop + git checkout -b feature/new-feature + ``` + +2. **开发功能** + - 编写代码 + - 编写测试 + - 运行测试确保通过 + +3. **提交代码** + ```bash + git add . + git commit -m "feat: add new feature" + ``` + +4. **推送并创建 PR** + ```bash + git push origin feature/new-feature + # 在 GitHub 创建 Pull Request + ``` + +### 提交规范 + +使用 [Conventional Commits](https://www.conventionalcommits.org/): + +``` +(): + +[optional body] + +[optional footer] +``` + +**类型 (type)**: +- `feat`: 新功能 +- `fix`: Bug 修复 +- `docs`: 文档更新 +- `style`: 代码格式 +- `refactor`: 重构 +- `test`: 测试 +- `chore`: 构建/工具 + +**示例**: +```bash +feat(order): add province-city selection +fix(payment): fix balance check logic +docs(api): update API documentation +test(order): add integration tests +``` + +--- + +## 代码规范 + +### TypeScript 规范 + +```typescript +// 1. 使用明确的类型声明 +function createOrder(userId: bigint, treeCount: number): PlantingOrder { + // ... +} + +// 2. 使用 readonly 保护不可变数据 +class TreeCount { + constructor(private readonly _value: number) {} +} + +// 3. 使用接口定义契约 +interface IPlantingOrderRepository { + save(order: PlantingOrder): Promise; + findById(id: bigint): Promise; +} + +// 4. 使用枚举定义常量 +enum PlantingOrderStatus { + CREATED = 'CREATED', + PAID = 'PAID', +} +``` + +### 命名规范 + +| 类型 | 规范 | 示例 | +|-----|------|------| +| 类名 | PascalCase | `PlantingOrder` | +| 接口 | I + PascalCase | `IPlantingOrderRepository` | +| 方法 | camelCase | `createOrder` | +| 常量 | UPPER_SNAKE_CASE | `MAX_TREE_COUNT` | +| 文件 | kebab-case | `planting-order.aggregate.ts` | +| 目录 | kebab-case | `value-objects` | + +### 文件命名约定 + +``` +*.aggregate.ts # 聚合根 +*.entity.ts # 实体 +*.vo.ts # 值对象 +*.service.ts # 服务 +*.repository.*.ts # 仓储 +*.controller.ts # 控制器 +*.dto.ts # 数据传输对象 +*.spec.ts # 单元测试 +*.integration.spec.ts # 集成测试 +*.e2e-spec.ts # E2E 测试 +*.mapper.ts # 映射器 +*.guard.ts # 守卫 +*.filter.ts # 过滤器 +``` + +### ESLint + Prettier + +项目已配置 ESLint 和 Prettier: + +```bash +# 运行 lint +npm run lint + +# 格式化代码 +npm run format +``` + +--- + +## 领域开发指南 + +### 创建新的聚合根 + +```typescript +// src/domain/aggregates/new-aggregate.aggregate.ts + +export interface NewAggregateData { + id?: bigint; + name: string; + // ... 其他字段 +} + +export class NewAggregate { + private _id?: bigint; + private _name: string; + private _domainEvents: DomainEvent[] = []; + + private constructor(data: NewAggregateData) { + this._id = data.id; + this._name = data.name; + } + + // 工厂方法 - 创建新实例 + static create(name: string): NewAggregate { + const aggregate = new NewAggregate({ name }); + aggregate.addDomainEvent(new NewAggregateCreatedEvent(aggregate)); + return aggregate; + } + + // 工厂方法 - 从持久化重建 + static reconstitute(data: NewAggregateData): NewAggregate { + return new NewAggregate(data); + } + + // 业务方法 + doSomething(): void { + // 业务逻辑 + this.addDomainEvent(new SomethingHappenedEvent(this)); + } + + // Getters + get id(): bigint | undefined { return this._id; } + get name(): string { return this._name; } + + // 领域事件 + private addDomainEvent(event: DomainEvent): void { + this._domainEvents.push(event); + } + + getDomainEvents(): DomainEvent[] { + return [...this._domainEvents]; + } + + clearDomainEvents(): void { + this._domainEvents = []; + } +} +``` + +### 创建值对象 + +```typescript +// src/domain/value-objects/email.vo.ts + +export class Email { + private readonly _value: string; + + private constructor(value: string) { + this._value = value; + } + + static create(value: string): Email { + if (!this.isValid(value)) { + throw new Error('Invalid email format'); + } + return new Email(value); + } + + private static isValid(value: string): boolean { + const emailRegex = /^[^\s@]+@[^\s@]+\.[^\s@]+$/; + return emailRegex.test(value); + } + + get value(): string { + return this._value; + } + + equals(other: Email): boolean { + return this._value === other._value; + } + + toString(): string { + return this._value; + } +} +``` + +### 创建领域服务 + +```typescript +// src/domain/services/pricing.service.ts + +import { Injectable } from '@nestjs/common'; + +@Injectable() +export class PricingDomainService { + private readonly PRICE_PER_TREE = 2199; + + calculateTotalPrice(treeCount: number): number { + return treeCount * this.PRICE_PER_TREE; + } + + calculateDiscount(treeCount: number): number { + if (treeCount >= 100) return 0.05; + if (treeCount >= 50) return 0.03; + if (treeCount >= 10) return 0.01; + return 0; + } +} +``` + +### 创建仓储 + +**1. 定义接口 (领域层)** + +```typescript +// src/domain/repositories/new-aggregate.repository.interface.ts + +export const NEW_AGGREGATE_REPOSITORY = Symbol('INewAggregateRepository'); + +export interface INewAggregateRepository { + save(aggregate: NewAggregate): Promise; + findById(id: bigint): Promise; + findByName(name: string): Promise; +} +``` + +**2. 实现仓储 (基础设施层)** + +```typescript +// src/infrastructure/persistence/repositories/new-aggregate.repository.impl.ts + +import { Injectable } from '@nestjs/common'; +import { PrismaService } from '../prisma/prisma.service'; +import { INewAggregateRepository } from '../../../domain/repositories/new-aggregate.repository.interface'; + +@Injectable() +export class NewAggregateRepositoryImpl implements INewAggregateRepository { + constructor(private readonly prisma: PrismaService) {} + + async save(aggregate: NewAggregate): Promise { + const data = NewAggregateMapper.toPersistence(aggregate); + + if (aggregate.id) { + await this.prisma.newAggregate.update({ + where: { id: aggregate.id }, + data, + }); + } else { + const created = await this.prisma.newAggregate.create({ data }); + aggregate.setId(created.id); + } + } + + async findById(id: bigint): Promise { + const record = await this.prisma.newAggregate.findUnique({ + where: { id }, + }); + return record ? NewAggregateMapper.toDomain(record) : null; + } + + async findByName(name: string): Promise { + const records = await this.prisma.newAggregate.findMany({ + where: { name: { contains: name } }, + }); + return records.map(NewAggregateMapper.toDomain); + } +} +``` + +**3. 注册到模块** + +```typescript +// src/infrastructure/infrastructure.module.ts + +@Module({ + providers: [ + { + provide: NEW_AGGREGATE_REPOSITORY, + useClass: NewAggregateRepositoryImpl, + }, + ], + exports: [NEW_AGGREGATE_REPOSITORY], +}) +export class InfrastructureModule {} +``` + +--- + +## 常用命令 + +### Makefile 命令 + +```bash +# 开发 +make install # 安装依赖 +make dev # 启动开发服务器 +make build # 构建项目 + +# 数据库 +make prisma-generate # 生成 Prisma Client +make prisma-migrate # 运行迁移 +make prisma-studio # 打开 Prisma Studio +make prisma-reset # 重置数据库 + +# 测试 +make test-unit # 单元测试 +make test-integration # 集成测试 +make test-e2e # E2E 测试 +make test-cov # 测试覆盖率 +make test-all # 运行所有测试 + +# Docker +make docker-build # 构建 Docker 镜像 +make docker-up # 启动容器 +make docker-down # 停止容器 +make test-docker-all # Docker 中运行测试 + +# 代码质量 +make lint # 运行 ESLint +make format # 格式化代码 +``` + +### npm 命令 + +```bash +npm run start # 启动服务 +npm run start:dev # 开发模式 +npm run start:debug # 调试模式 +npm run build # 构建 +npm run test # 运行测试 +npm run test:watch # 监听模式测试 +npm run test:cov # 覆盖率测试 +npm run test:e2e # E2E 测试 +npm run lint # 代码检查 +npm run format # 代码格式化 +``` + +--- + +## 调试技巧 + +### VS Code 调试配置 + +创建 `.vscode/launch.json`: + +```json +{ + "version": "0.2.0", + "configurations": [ + { + "name": "Debug NestJS", + "type": "node", + "request": "launch", + "runtimeArgs": [ + "--inspect-brk", + "-r", + "tsconfig-paths/register", + "-r", + "ts-node/register" + ], + "args": ["${workspaceFolder}/src/main.ts"], + "cwd": "${workspaceFolder}", + "console": "integratedTerminal", + "protocol": "inspector" + }, + { + "name": "Debug Jest Tests", + "type": "node", + "request": "launch", + "runtimeArgs": [ + "--inspect-brk", + "${workspaceRoot}/node_modules/.bin/jest", + "--runInBand" + ], + "console": "integratedTerminal" + } + ] +} +``` + +### Prisma 查询日志 + +在 `.env` 中启用: + +```env +DATABASE_URL="postgresql://...?connection_limit=5" +``` + +在 `prisma.service.ts` 中配置: + +```typescript +super({ + log: ['query', 'info', 'warn', 'error'], +}); +``` + +### 请求日志 + +使用 NestJS Logger: + +```typescript +import { Logger } from '@nestjs/common'; + +@Injectable() +export class PlantingApplicationService { + private readonly logger = new Logger(PlantingApplicationService.name); + + async createOrder(userId: bigint, treeCount: number) { + this.logger.log(`Creating order for user ${userId}, trees: ${treeCount}`); + // ... + this.logger.debug('Order created successfully', { orderNo }); + } +} +``` + +--- + +## 常见问题 + +### Q: Prisma Client 未生成 + +```bash +# 解决方案 +npx prisma generate +``` + +### Q: 数据库连接失败 + +检查: +1. PostgreSQL 服务是否启动 +2. `.env` 中 DATABASE_URL 是否正确 +3. 数据库是否存在 + +```bash +# 创建数据库 +createdb rwadurian_planting +``` + +### Q: BigInt 序列化错误 + +在返回 JSON 时,BigInt 需要转换为字符串: + +```typescript +// 在响应 DTO 中 +class OrderResponse { + @Transform(({ value }) => value.toString()) + userId: string; +} +``` + +### Q: 测试时数据库冲突 + +使用独立的测试数据库: + +```env +# .env.test +DATABASE_URL="postgresql://postgres:postgres@localhost:5432/rwadurian_planting_test" +``` + +### Q: 循环依赖错误 + +使用 `forwardRef`: + +```typescript +@Module({ + imports: [forwardRef(() => OtherModule)], +}) +export class MyModule {} +``` + +### Q: 热重载不工作 + +检查 `nest-cli.json`: + +```json +{ + "compilerOptions": { + "deleteOutDir": true, + "webpack": true, + "watchAssets": true + } +} +``` + +--- + +## 参考资料 + +- [NestJS 官方文档](https://docs.nestjs.com/) +- [Prisma 官方文档](https://www.prisma.io/docs/) +- [TypeScript 手册](https://www.typescriptlang.org/docs/) +- [领域驱动设计精粹](https://www.domainlanguage.com/ddd/) diff --git a/backend/services/planting-service/docs/README.md b/backend/services/planting-service/docs/README.md new file mode 100644 index 00000000..e642459c --- /dev/null +++ b/backend/services/planting-service/docs/README.md @@ -0,0 +1,237 @@ +# Planting Service 文档中心 + +## 概述 + +Planting Service 是 RWA Durian Queen 平台的核心微服务,负责处理榴莲树认种业务的完整生命周期。 + +### 核心功能 + +- **认种订单管理** - 创建、支付、取消订单 +- **省市选择机制** - 5秒确认机制防止误操作 +- **资金分配** - 10种目标的精确分配(2199 USDT/棵) +- **持仓管理** - 用户认种持仓统计与追踪 +- **资金池注入** - 5天批次管理机制 + +### 技术栈 + +| 技术 | 版本 | 用途 | +|-----|------|------| +| NestJS | 10.x | Web 框架 | +| TypeScript | 5.x | 开发语言 | +| PostgreSQL | 16 | 数据库 | +| Prisma | 5.x | ORM | +| Jest | 29.x | 测试框架 | +| Docker | 24.x | 容器化 | + +--- + +## 文档索引 + +| 文档 | 描述 | 适用人员 | +|-----|------|---------| +| [ARCHITECTURE.md](./ARCHITECTURE.md) | 系统架构设计 | 架构师、技术负责人 | +| [API.md](./API.md) | API 接口文档 | 前端开发、测试 | +| [DEVELOPMENT.md](./DEVELOPMENT.md) | 开发指南 | 后端开发 | +| [TESTING.md](./TESTING.md) | 测试文档 | 开发、测试 | +| [DEPLOYMENT.md](./DEPLOYMENT.md) | 部署文档 | DevOps、运维 | + +--- + +## 快速开始 + +### 1. 环境准备 + +```bash +# 要求 +Node.js >= 20.x +PostgreSQL >= 16 +Docker >= 24.x (可选) +``` + +### 2. 安装依赖 + +```bash +npm install +``` + +### 3. 配置环境 + +```bash +cp .env.example .env +# 编辑 .env 文件配置数据库等 +``` + +### 4. 初始化数据库 + +```bash +npx prisma generate +npx prisma migrate dev +``` + +### 5. 启动服务 + +```bash +# 开发模式 +npm run start:dev + +# 生产模式 +npm run build +npm run start:prod +``` + +### 6. 访问服务 + +- 服务地址: http://localhost:3003 +- API 文档: http://localhost:3003/api/docs +- 健康检查: http://localhost:3003/api/v1/health + +--- + +## 常用命令 + +```bash +# 开发 +make dev # 启动开发服务器 +make build # 构建项目 + +# 测试 +make test-unit # 单元测试 +make test-integration # 集成测试 +make test-e2e # E2E 测试 +make test-cov # 覆盖率测试 +make test-all # 所有测试 + +# 数据库 +make prisma-generate # 生成 Prisma Client +make prisma-migrate # 运行迁移 +make prisma-studio # 打开 Prisma Studio + +# Docker +make docker-build # 构建镜像 +make docker-up # 启动容器 +make test-docker-all # Docker 测试 + +# 代码质量 +make lint # 代码检查 +make format # 代码格式化 +``` + +--- + +## 项目结构 + +``` +planting-service/ +├── docs/ # 文档目录 +│ ├── README.md # 文档索引 +│ ├── ARCHITECTURE.md # 架构文档 +│ ├── API.md # API 文档 +│ ├── DEVELOPMENT.md # 开发指南 +│ ├── TESTING.md # 测试文档 +│ └── DEPLOYMENT.md # 部署文档 +├── prisma/ # 数据库 +│ ├── schema.prisma # 模型定义 +│ └── migrations/ # 迁移文件 +├── src/ # 源代码 +│ ├── api/ # API 层 +│ ├── application/ # 应用层 +│ ├── domain/ # 领域层 +│ ├── infrastructure/ # 基础设施层 +│ └── main.ts # 入口 +├── test/ # E2E 测试 +├── docker-compose.yml # Docker 编排 +├── Dockerfile # 生产镜像 +└── Makefile # 构建脚本 +``` + +--- + +## 业务规则概览 + +### 定价 + +- 单价: **2199 USDT/棵** +- 单次限制: 1-1000 棵 +- 个人限制: 最多 1000 棵 + +### 资金分配 + +| 目标 | 比例 | 金额 (USDT) | +|-----|------|------------| +| 资金池 | 90% | 1979.1 | +| 运营 | 5% | 109.95 | +| 省代 | 0.6% | 13.194 | +| 市代 | 0.3% | 6.597 | +| 社区长 | 0.5% | 10.995 | +| 一级推荐 | 1.5% | 32.985 | +| 二级推荐 | 1.0% | 21.99 | +| 三级推荐 | 0.5% | 10.995 | +| 平台 | 0.3% | 6.597 | +| 储备 | 0.3% | 6.597 | + +### 订单状态流转 + +``` +CREATED → PROVINCE_CITY_SELECTED → PROVINCE_CITY_CONFIRMED + → PAID → FUND_ALLOCATED → POOL_SCHEDULED + → POOL_INJECTED → MINING_ENABLED + +任意状态(PAID前) → CANCELLED +``` + +--- + +## 测试报告 + +### 测试概览 + +| 类型 | 数量 | 状态 | +|-----|------|-----| +| 单元测试 | 45+ | ✅ 通过 | +| 集成测试 | 12+ | ✅ 通过 | +| E2E 测试 | 17+ | ✅ 通过 | + +### 覆盖率 + +| 模块 | 覆盖率 | +|-----|-------| +| 应用服务 | 89% | +| 领域服务 | 93% | +| 聚合根 | 69% | + +--- + +## 贡献指南 + +1. Fork 项目 +2. 创建功能分支 (`git checkout -b feature/AmazingFeature`) +3. 提交更改 (`git commit -m 'feat: Add some AmazingFeature'`) +4. 推送到分支 (`git push origin feature/AmazingFeature`) +5. 创建 Pull Request + +### 提交规范 + +使用 [Conventional Commits](https://www.conventionalcommits.org/): + +- `feat`: 新功能 +- `fix`: Bug 修复 +- `docs`: 文档更新 +- `test`: 测试 +- `refactor`: 重构 + +--- + +## 相关链接 + +- [NestJS 文档](https://docs.nestjs.com/) +- [Prisma 文档](https://www.prisma.io/docs/) +- [TypeScript 文档](https://www.typescriptlang.org/docs/) + +--- + +## 联系方式 + +如有问题或建议,请通过以下方式联系: + +- 项目 Issues +- 技术负责人邮箱 diff --git a/backend/services/planting-service/docs/TESTING.md b/backend/services/planting-service/docs/TESTING.md new file mode 100644 index 00000000..0fa87c32 --- /dev/null +++ b/backend/services/planting-service/docs/TESTING.md @@ -0,0 +1,896 @@ +# Planting Service 测试文档 + +## 目录 + +- [测试策略](#测试策略) +- [测试架构](#测试架构) +- [单元测试](#单元测试) +- [集成测试](#集成测试) +- [端到端测试](#端到端测试) +- [测试覆盖率](#测试覆盖率) +- [Docker 测试](#docker-测试) +- [CI/CD 集成](#cicd-集成) +- [最佳实践](#最佳实践) + +--- + +## 测试策略 + +### 测试金字塔 + +``` + ┌─────────┐ + │ E2E │ ◄── 少量,验证完整流程 + │ Tests │ + ─┴─────────┴─ + ┌─────────────┐ + │ Integration │ ◄── 中等数量,验证模块协作 + │ Tests │ + ─┴─────────────┴─ + ┌─────────────────┐ + │ Unit Tests │ ◄── 大量,验证业务逻辑 + │ │ + └─────────────────┘ +``` + +### 测试分布 + +| 测试类型 | 数量 | 覆盖范围 | 执行时间 | +|---------|------|---------|---------| +| 单元测试 | 45+ | 领域逻辑、值对象 | < 10s | +| 集成测试 | 12+ | 应用服务、用例 | < 30s | +| E2E 测试 | 17+ | API 端点、认证 | < 60s | + +--- + +## 测试架构 + +### 目录结构 + +``` +planting-service/ +├── src/ +│ ├── domain/ +│ │ ├── aggregates/ +│ │ │ ├── planting-order.aggregate.ts +│ │ │ └── planting-order.aggregate.spec.ts # 单元测试 +│ │ ├── services/ +│ │ │ ├── fund-allocation.service.ts +│ │ │ └── fund-allocation.service.spec.ts # 单元测试 +│ │ └── value-objects/ +│ │ ├── tree-count.vo.ts +│ │ └── tree-count.vo.spec.ts # 单元测试 +│ └── application/ +│ └── services/ +│ ├── planting-application.service.ts +│ └── planting-application.service.integration.spec.ts # 集成测试 +└── test/ + ├── app.e2e-spec.ts # E2E 测试 + └── jest-e2e.json # E2E 配置 +``` + +### 测试配置 + +**Jest 配置 (package.json)** + +```json +{ + "jest": { + "moduleFileExtensions": ["js", "json", "ts"], + "rootDir": "src", + "testRegex": ".*\\.spec\\.ts$", + "transform": { + "^.+\\.(t|j)s$": "ts-jest" + }, + "collectCoverageFrom": ["**/*.(t|j)s"], + "coverageDirectory": "../coverage", + "testEnvironment": "node", + "moduleNameMapper": { + "^@/(.*)$": "/$1" + } + } +} +``` + +**E2E 配置 (test/jest-e2e.json)** + +```json +{ + "moduleFileExtensions": ["js", "json", "ts"], + "rootDir": ".", + "testEnvironment": "node", + "testRegex": ".e2e-spec.ts$", + "transform": { + "^.+\\.(t|j)s$": "ts-jest" + }, + "moduleNameMapper": { + "^@/(.*)$": "/../src/$1" + } +} +``` + +--- + +## 单元测试 + +### 概述 + +单元测试专注于测试独立的业务逻辑单元,不依赖外部服务或数据库。 + +### 测试领域聚合 + +```typescript +// src/domain/aggregates/planting-order.aggregate.spec.ts + +import { PlantingOrder } from './planting-order.aggregate'; +import { PlantingOrderStatus } from '../value-objects/planting-order-status.enum'; + +describe('PlantingOrder', () => { + describe('create', () => { + it('应该创建有效的订单', () => { + const order = PlantingOrder.create(BigInt(1), 5); + + expect(order.userId).toBe(BigInt(1)); + expect(order.treeCount).toBe(5); + expect(order.totalAmount).toBe(5 * 2199); + expect(order.status).toBe(PlantingOrderStatus.CREATED); + }); + + it('应该生成唯一的订单号', () => { + const order1 = PlantingOrder.create(BigInt(1), 1); + const order2 = PlantingOrder.create(BigInt(1), 1); + + expect(order1.orderNo).not.toBe(order2.orderNo); + expect(order1.orderNo).toMatch(/^PO\d{14}$/); + }); + + it('应该产生领域事件', () => { + const order = PlantingOrder.create(BigInt(1), 5); + const events = order.getDomainEvents(); + + expect(events).toHaveLength(1); + expect(events[0].constructor.name).toBe('PlantingOrderCreatedEvent'); + }); + }); + + describe('selectProvinceCity', () => { + it('应该允许在CREATED状态下选择省市', () => { + const order = PlantingOrder.create(BigInt(1), 1); + + order.selectProvinceCity('440000', '广东省', '440100', '广州市'); + + expect(order.provinceCode).toBe('440000'); + expect(order.cityCode).toBe('440100'); + }); + + it('不应该允许在非CREATED状态下选择省市', () => { + const order = PlantingOrder.create(BigInt(1), 1); + order.cancel(); + + expect(() => { + order.selectProvinceCity('440000', '广东省', '440100', '广州市'); + }).toThrow(); + }); + }); + + describe('confirmProvinceCity', () => { + it('应该在5秒后允许确认', () => { + jest.useFakeTimers(); + const order = PlantingOrder.create(BigInt(1), 1); + order.selectProvinceCity('440000', '广东省', '440100', '广州市'); + + jest.advanceTimersByTime(5000); + + expect(() => order.confirmProvinceCity()).not.toThrow(); + expect(order.status).toBe(PlantingOrderStatus.PROVINCE_CITY_CONFIRMED); + + jest.useRealTimers(); + }); + + it('应该在5秒内拒绝确认', () => { + jest.useFakeTimers(); + const order = PlantingOrder.create(BigInt(1), 1); + order.selectProvinceCity('440000', '广东省', '440100', '广州市'); + + jest.advanceTimersByTime(3000); // 只过了3秒 + + expect(() => order.confirmProvinceCity()).toThrow('还需等待'); + + jest.useRealTimers(); + }); + }); +}); +``` + +### 测试值对象 + +```typescript +// src/domain/value-objects/tree-count.vo.spec.ts + +import { TreeCount } from './tree-count.vo'; + +describe('TreeCount', () => { + describe('create', () => { + it('应该创建有效的数量', () => { + const count = TreeCount.create(5); + expect(count.value).toBe(5); + }); + + it('应该拒绝0或负数', () => { + expect(() => TreeCount.create(0)).toThrow('认种数量必须大于0'); + expect(() => TreeCount.create(-1)).toThrow('认种数量必须大于0'); + }); + + it('应该拒绝超过最大限制', () => { + expect(() => TreeCount.create(1001)).toThrow('单次认种数量不能超过1000'); + }); + + it('应该拒绝小数', () => { + expect(() => TreeCount.create(1.5)).toThrow('认种数量必须为整数'); + }); + }); + + describe('checkLimit', () => { + it('应该正确检查限购', () => { + expect(TreeCount.checkLimit(900, 100)).toBe(true); // 刚好1000 + expect(TreeCount.checkLimit(901, 100)).toBe(false); // 超过1000 + }); + }); +}); +``` + +### 测试领域服务 + +```typescript +// src/domain/services/fund-allocation.service.spec.ts + +import { FundAllocationDomainService } from './fund-allocation.service'; + +describe('FundAllocationDomainService', () => { + let service: FundAllocationDomainService; + + beforeEach(() => { + service = new FundAllocationDomainService(); + }); + + describe('calculateAllocations', () => { + it('应该返回10种分配', () => { + const allocations = service.calculateAllocations(1, { + referralChain: [], + nearestProvinceAuth: null, + nearestCityAuth: null, + nearestCommunity: null, + }); + + expect(allocations).toHaveLength(10); + }); + + it('应该正确计算资金池分配', () => { + const allocations = service.calculateAllocations(1, { + referralChain: [], + nearestProvinceAuth: null, + nearestCityAuth: null, + nearestCommunity: null, + }); + + const poolAllocation = allocations.find(a => a.targetType === 'POOL'); + expect(poolAllocation?.amount).toBe(1979.1); // 2199 * 90% + }); + + it('应该正确计算总金额', () => { + const allocations = service.calculateAllocations(5, { + referralChain: [], + nearestProvinceAuth: null, + nearestCityAuth: null, + nearestCommunity: null, + }); + + const total = allocations.reduce((sum, a) => sum + a.amount, 0); + expect(total).toBeCloseTo(5 * 2199, 2); + }); + }); +}); +``` + +### 运行单元测试 + +```bash +# 运行所有单元测试 +npm run test +# 或 +make test-unit + +# 监听模式 +npm run test:watch + +# 运行特定文件 +npm run test -- planting-order.aggregate.spec.ts + +# 详细输出 +npm run test -- --verbose +``` + +--- + +## 集成测试 + +### 概述 + +集成测试验证多个组件协同工作,使用 Mock 替代外部依赖。 + +### 应用服务集成测试 + +```typescript +// src/application/services/planting-application.service.integration.spec.ts + +import { Test, TestingModule } from '@nestjs/testing'; +import { PlantingApplicationService } from './planting-application.service'; +import { FundAllocationDomainService } from '../../domain/services/fund-allocation.service'; +import { + IPlantingOrderRepository, + PLANTING_ORDER_REPOSITORY, +} from '../../domain/repositories/planting-order.repository.interface'; +import { WalletServiceClient } from '../../infrastructure/external/wallet-service.client'; +import { ReferralServiceClient } from '../../infrastructure/external/referral-service.client'; + +describe('PlantingApplicationService (Integration)', () => { + let service: PlantingApplicationService; + let orderRepository: jest.Mocked; + let walletService: jest.Mocked; + let referralService: jest.Mocked; + + beforeEach(async () => { + // 创建 Mocks + orderRepository = { + save: jest.fn(), + findById: jest.fn(), + findByOrderNo: jest.fn(), + findByUserId: jest.fn(), + countTreesByUserId: jest.fn(), + } as any; + + walletService = { + getBalance: jest.fn(), + deductForPlanting: jest.fn(), + allocateFunds: jest.fn(), + } as any; + + referralService = { + getReferralContext: jest.fn(), + } as any; + + const module: TestingModule = await Test.createTestingModule({ + providers: [ + PlantingApplicationService, + FundAllocationDomainService, + { provide: PLANTING_ORDER_REPOSITORY, useValue: orderRepository }, + { provide: WalletServiceClient, useValue: walletService }, + { provide: ReferralServiceClient, useValue: referralService }, + ], + }).compile(); + + service = module.get(PlantingApplicationService); + }); + + describe('createOrder', () => { + it('应该成功创建订单', async () => { + // Arrange + orderRepository.countTreesByUserId.mockResolvedValue(0); + walletService.getBalance.mockResolvedValue({ + userId: '1', + available: 100000, + locked: 0, + currency: 'USDT', + }); + orderRepository.save.mockResolvedValue(undefined); + + // Act + const result = await service.createOrder(BigInt(1), 5); + + // Assert + expect(result.treeCount).toBe(5); + expect(result.totalAmount).toBe(5 * 2199); + expect(orderRepository.save).toHaveBeenCalled(); + }); + + it('应该拒绝超过限购数量', async () => { + orderRepository.countTreesByUserId.mockResolvedValue(950); + + await expect(service.createOrder(BigInt(1), 100)) + .rejects.toThrow('超过个人最大认种数量限制'); + }); + + it('应该拒绝余额不足', async () => { + orderRepository.countTreesByUserId.mockResolvedValue(0); + walletService.getBalance.mockResolvedValue({ + userId: '1', + available: 100, // 余额不足 + locked: 0, + currency: 'USDT', + }); + + await expect(service.createOrder(BigInt(1), 5)) + .rejects.toThrow('余额不足'); + }); + }); + + describe('payOrder', () => { + it('应该成功支付订单并完成资金分配', async () => { + jest.useFakeTimers(); + + // 准备订单 + const order = PlantingOrder.create(BigInt(1), 1); + order.selectProvinceCity('440000', '广东省', '440100', '广州市'); + jest.advanceTimersByTime(5000); + order.confirmProvinceCity(); + + // 设置 mocks + orderRepository.findByOrderNo.mockResolvedValue(order); + walletService.deductForPlanting.mockResolvedValue(true); + referralService.getReferralContext.mockResolvedValue({ + referralChain: [], + nearestProvinceAuth: null, + nearestCityAuth: null, + nearestCommunity: null, + }); + walletService.allocateFunds.mockResolvedValue(true); + + // Act + const result = await service.payOrder(order.orderNo, BigInt(1)); + + // Assert + expect(result.allocations.length).toBe(10); + expect(walletService.deductForPlanting).toHaveBeenCalled(); + expect(walletService.allocateFunds).toHaveBeenCalled(); + + jest.useRealTimers(); + }); + }); +}); +``` + +### 运行集成测试 + +```bash +# 运行集成测试 +npm run test -- --testPathPattern=integration --runInBand +# 或 +make test-integration +``` + +--- + +## 端到端测试 + +### 概述 + +E2E 测试通过 HTTP 请求验证完整的 API 功能。 + +### E2E 测试实现 + +```typescript +// test/app.e2e-spec.ts + +import { Test, TestingModule } from '@nestjs/testing'; +import { INestApplication, ValidationPipe, ExecutionContext } from '@nestjs/common'; +import * as request from 'supertest'; +import { HealthController } from '../src/api/controllers/health.controller'; +import { PlantingOrderController } from '../src/api/controllers/planting-order.controller'; +import { PlantingApplicationService } from '../src/application/services/planting-application.service'; +import { JwtAuthGuard } from '../src/api/guards/jwt-auth.guard'; + +// Mock 服务 +const mockPlantingService = { + createOrder: jest.fn(), + selectProvinceCity: jest.fn(), + payOrder: jest.fn(), + getUserOrders: jest.fn(), + getUserPosition: jest.fn(), +}; + +describe('PlantingController (e2e) - Unauthorized', () => { + let app: INestApplication; + + beforeAll(async () => { + const moduleFixture: TestingModule = await Test.createTestingModule({ + controllers: [HealthController, PlantingOrderController], + providers: [ + { provide: PlantingApplicationService, useValue: mockPlantingService }, + ], + }) + .overrideGuard(JwtAuthGuard) + .useValue({ canActivate: () => false }) + .compile(); + + app = moduleFixture.createNestApplication(); + app.setGlobalPrefix('api/v1'); + app.useGlobalPipes(new ValidationPipe({ + whitelist: true, + forbidNonWhitelisted: true, + transform: true, + })); + await app.init(); + }); + + afterAll(async () => { + await app.close(); + }); + + describe('/health (GET)', () => { + it('应该返回健康状态', () => { + return request(app.getHttpServer()) + .get('/api/v1/health') + .expect(200) + .expect((res) => { + expect(res.body.status).toBe('ok'); + }); + }); + }); + + describe('/planting/orders (POST)', () => { + it('应该拒绝未认证的请求', () => { + return request(app.getHttpServer()) + .post('/api/v1/planting/orders') + .send({ treeCount: 1 }) + .expect(403); + }); + }); +}); + +describe('PlantingController (e2e) - Authorized', () => { + let app: INestApplication; + + beforeAll(async () => { + // 设置认证通过的 Guard + const mockAuthGuard = { + canActivate: (context: ExecutionContext) => { + const req = context.switchToHttp().getRequest(); + req.user = { id: '1', username: 'testuser' }; + return true; + }, + }; + + const moduleFixture: TestingModule = await Test.createTestingModule({ + controllers: [HealthController, PlantingOrderController], + providers: [ + { provide: PlantingApplicationService, useValue: mockPlantingService }, + ], + }) + .overrideGuard(JwtAuthGuard) + .useValue(mockAuthGuard) + .compile(); + + app = moduleFixture.createNestApplication(); + app.setGlobalPrefix('api/v1'); + app.useGlobalPipes(new ValidationPipe({ + whitelist: true, + forbidNonWhitelisted: true, + transform: true, + })); + await app.init(); + }); + + describe('/planting/orders (POST)', () => { + it('应该成功创建订单', async () => { + mockPlantingService.createOrder.mockResolvedValue({ + orderNo: 'PO202411300001', + treeCount: 5, + totalAmount: 10995, + status: 'CREATED', + }); + + const response = await request(app.getHttpServer()) + .post('/api/v1/planting/orders') + .send({ treeCount: 5 }) + .expect(201); + + expect(response.body.orderNo).toBe('PO202411300001'); + }); + + it('应该验证 treeCount 必须为正整数', async () => { + await request(app.getHttpServer()) + .post('/api/v1/planting/orders') + .send({ treeCount: 0 }) + .expect(400); + }); + }); +}); +``` + +### 运行 E2E 测试 + +```bash +# 运行 E2E 测试 +npm run test:e2e +# 或 +make test-e2e +``` + +--- + +## 测试覆盖率 + +### 生成覆盖率报告 + +```bash +npm run test:cov +# 或 +make test-cov +``` + +### 覆盖率指标 + +| 指标 | 目标 | 当前 | +|-----|------|-----| +| 语句覆盖率 | > 80% | 34% | +| 分支覆盖率 | > 70% | 17% | +| 函数覆盖率 | > 80% | 36% | +| 行覆盖率 | > 80% | 34% | + +### 核心模块覆盖率 + +| 模块 | 覆盖率 | 说明 | +|-----|-------|------| +| planting-application.service | 89% | 核心应用服务 | +| fund-allocation.service | 93% | 资金分配服务 | +| planting-order.aggregate | 69% | 订单聚合 | +| tree-count.vo | 100% | 数量值对象 | + +### 覆盖率报告位置 + +覆盖率报告生成在 `coverage/` 目录: + +``` +coverage/ +├── lcov-report/ +│ └── index.html # HTML 报告 +├── lcov.info # LCOV 格式 +└── clover.xml # Clover 格式 +``` + +--- + +## Docker 测试 + +### Docker 测试配置 + +**docker-compose.test.yml** + +```yaml +version: '3.8' + +services: + db: + image: postgres:16-alpine + environment: + POSTGRES_USER: postgres + POSTGRES_PASSWORD: postgres + POSTGRES_DB: rwadurian_planting_test + ports: + - "5433:5432" + healthcheck: + test: ["CMD-SHELL", "pg_isready -U postgres"] + interval: 5s + timeout: 5s + retries: 5 + + test: + build: + context: . + dockerfile: Dockerfile.test + depends_on: + db: + condition: service_healthy + environment: + NODE_ENV: test + DATABASE_URL: postgresql://postgres:postgres@db:5432/rwadurian_planting_test + JWT_SECRET: test-jwt-secret + volumes: + - ./src:/app/src + - ./test:/app/test + - ./prisma:/app/prisma +``` + +**Dockerfile.test** + +```dockerfile +FROM node:20-alpine + +WORKDIR /app + +COPY package*.json ./ +RUN npm ci + +COPY prisma ./prisma/ +RUN npx prisma generate + +COPY . . + +RUN npm run build + +CMD ["npm", "run", "test"] +``` + +### 运行 Docker 测试 + +```bash +# 运行所有 Docker 测试 +make test-docker-all + +# 分步运行 +docker-compose -f docker-compose.test.yml up -d db +docker-compose -f docker-compose.test.yml run --rm test npm run test +docker-compose -f docker-compose.test.yml down -v +``` + +--- + +## CI/CD 集成 + +### GitHub Actions 示例 + +```yaml +# .github/workflows/test.yml +name: Test + +on: + push: + branches: [main, develop] + pull_request: + branches: [main, develop] + +jobs: + test: + runs-on: ubuntu-latest + + services: + postgres: + image: postgres:16-alpine + env: + POSTGRES_USER: postgres + POSTGRES_PASSWORD: postgres + POSTGRES_DB: rwadurian_planting_test + ports: + - 5432:5432 + options: >- + --health-cmd pg_isready + --health-interval 10s + --health-timeout 5s + --health-retries 5 + + steps: + - uses: actions/checkout@v4 + + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: '20' + cache: 'npm' + + - name: Install dependencies + run: npm ci + + - name: Generate Prisma Client + run: npx prisma generate + + - name: Run migrations + run: npx prisma migrate deploy + env: + DATABASE_URL: postgresql://postgres:postgres@localhost:5432/rwadurian_planting_test + + - name: Run unit tests + run: npm run test + + - name: Run E2E tests + run: npm run test:e2e + env: + DATABASE_URL: postgresql://postgres:postgres@localhost:5432/rwadurian_planting_test + + - name: Upload coverage + uses: codecov/codecov-action@v3 + with: + file: ./coverage/lcov.info +``` + +--- + +## 最佳实践 + +### 1. 测试命名规范 + +```typescript +describe('被测试的单元', () => { + describe('方法名', () => { + it('应该 + 预期行为', () => { + // ... + }); + }); +}); +``` + +### 2. AAA 模式 + +```typescript +it('应该创建有效的订单', () => { + // Arrange - 准备 + const userId = BigInt(1); + const treeCount = 5; + + // Act - 执行 + const order = PlantingOrder.create(userId, treeCount); + + // Assert - 断言 + expect(order.treeCount).toBe(5); +}); +``` + +### 3. 避免测试实现细节 + +```typescript +// 不好 - 测试实现细节 +it('应该调用 repository.save', () => { + await service.createOrder(1, 5); + expect(repository.save).toHaveBeenCalledTimes(1); +}); + +// 好 - 测试行为 +it('应该返回创建的订单', () => { + const result = await service.createOrder(1, 5); + expect(result.orderNo).toBeDefined(); + expect(result.treeCount).toBe(5); +}); +``` + +### 4. 独立的测试数据 + +```typescript +// 每个测试使用独立数据 +beforeEach(() => { + jest.clearAllMocks(); +}); + +// 使用工厂函数创建测试数据 +function createTestOrder(overrides = {}) { + return PlantingOrder.create(BigInt(1), 1, { + ...defaultProps, + ...overrides, + }); +} +``` + +### 5. Mock 外部依赖 + +```typescript +// 只 mock 必要的外部依赖 +const walletService = { + getBalance: jest.fn().mockResolvedValue({ available: 100000 }), + deductForPlanting: jest.fn().mockResolvedValue(true), +}; +``` + +--- + +## 常用命令速查 + +```bash +# 单元测试 +make test-unit # 运行单元测试 +npm run test -- --watch # 监听模式 +npm run test -- --verbose # 详细输出 +npm run test -- file.spec # 运行特定文件 + +# 集成测试 +make test-integration # 运行集成测试 + +# E2E 测试 +make test-e2e # 运行 E2E 测试 + +# 覆盖率 +make test-cov # 生成覆盖率报告 + +# Docker 测试 +make test-docker-all # Docker 中运行所有测试 + +# 所有测试 +make test-all # 运行所有测试 +``` diff --git a/backend/services/planting-service/nest-cli.json b/backend/services/planting-service/nest-cli.json new file mode 100644 index 00000000..f9aa683b --- /dev/null +++ b/backend/services/planting-service/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/backend/services/planting-service/package-lock.json b/backend/services/planting-service/package-lock.json new file mode 100644 index 00000000..434d1486 --- /dev/null +++ b/backend/services/planting-service/package-lock.json @@ -0,0 +1,10114 @@ +{ + "name": "planting-service", + "version": "1.0.0", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "planting-service", + "version": "1.0.0", + "license": "UNLICENSED", + "dependencies": { + "@nestjs/axios": "^3.0.1", + "@nestjs/common": "^10.0.0", + "@nestjs/config": "^3.1.1", + "@nestjs/core": "^10.0.0", + "@nestjs/jwt": "^10.2.0", + "@nestjs/passport": "^10.0.3", + "@nestjs/platform-express": "^10.0.0", + "@nestjs/swagger": "^7.1.17", + "@prisma/client": "^5.7.0", + "class-transformer": "^0.5.1", + "class-validator": "^0.14.0", + "jsonwebtoken": "^9.0.0", + "passport": "^0.7.0", + "passport-jwt": "^4.0.1", + "reflect-metadata": "^0.1.13", + "rxjs": "^7.8.1", + "uuid": "^9.0.0" + }, + "devDependencies": { + "@nestjs/cli": "^10.0.0", + "@nestjs/schematics": "^10.0.0", + "@nestjs/testing": "^10.0.0", + "@types/express": "^4.17.17", + "@types/jest": "^29.5.2", + "@types/jsonwebtoken": "^9.0.0", + "@types/node": "^20.3.1", + "@types/passport-jwt": "^4.0.0", + "@types/supertest": "^2.0.12", + "@types/uuid": "^9.0.0", + "@typescript-eslint/eslint-plugin": "^6.0.0", + "@typescript-eslint/parser": "^6.0.0", + "eslint": "^8.42.0", + "eslint-config-prettier": "^9.0.0", + "eslint-plugin-prettier": "^5.0.0", + "jest": "^29.5.0", + "prettier": "^3.0.0", + "prisma": "^5.7.0", + "source-map-support": "^0.5.21", + "supertest": "^6.3.3", + "ts-jest": "^29.1.0", + "ts-loader": "^9.4.3", + "ts-node": "^10.9.1", + "tsconfig-paths": "^4.2.0", + "typescript": "^5.1.3" + } + }, + "node_modules/@angular-devkit/core": { + "version": "17.3.11", + "resolved": "https://registry.npmjs.org/@angular-devkit/core/-/core-17.3.11.tgz", + "integrity": "sha512-vTNDYNsLIWpYk2I969LMQFH29GTsLzxNk/0cLw5q56ARF0v5sIWfHYwGTS88jdDqIpuuettcSczbxeA7EuAmqQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "ajv": "8.12.0", + "ajv-formats": "2.1.1", + "jsonc-parser": "3.2.1", + "picomatch": "4.0.1", + "rxjs": "7.8.1", + "source-map": "0.7.4" + }, + "engines": { + "node": "^18.13.0 || >=20.9.0", + "npm": "^6.11.0 || ^7.5.6 || >=8.0.0", + "yarn": ">= 1.13.0" + }, + "peerDependencies": { + "chokidar": "^3.5.2" + }, + "peerDependenciesMeta": { + "chokidar": { + "optional": true + } + } + }, + "node_modules/@angular-devkit/core/node_modules/rxjs": { + "version": "7.8.1", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-7.8.1.tgz", + "integrity": "sha512-AA3TVj+0A2iuIoQkWEK/tqFjBq2j+6PO6Y0zJcvzLAFhEFIO3HL0vls9hWLncZbAAbK0mar7oZ4V079I/qPMxg==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "tslib": "^2.1.0" + } + }, + "node_modules/@angular-devkit/schematics": { + "version": "17.3.11", + "resolved": "https://registry.npmjs.org/@angular-devkit/schematics/-/schematics-17.3.11.tgz", + "integrity": "sha512-I5wviiIqiFwar9Pdk30Lujk8FczEEc18i22A5c6Z9lbmhPQdTroDnEQdsfXjy404wPe8H62s0I15o4pmMGfTYQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@angular-devkit/core": "17.3.11", + "jsonc-parser": "3.2.1", + "magic-string": "0.30.8", + "ora": "5.4.1", + "rxjs": "7.8.1" + }, + "engines": { + "node": "^18.13.0 || >=20.9.0", + "npm": "^6.11.0 || ^7.5.6 || >=8.0.0", + "yarn": ">= 1.13.0" + } + }, + "node_modules/@angular-devkit/schematics-cli": { + "version": "17.3.11", + "resolved": "https://registry.npmjs.org/@angular-devkit/schematics-cli/-/schematics-cli-17.3.11.tgz", + "integrity": "sha512-kcOMqp+PHAKkqRad7Zd7PbpqJ0LqLaNZdY1+k66lLWmkEBozgq8v4ASn/puPWf9Bo0HpCiK+EzLf0VHE8Z/y6Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "@angular-devkit/core": "17.3.11", + "@angular-devkit/schematics": "17.3.11", + "ansi-colors": "4.1.3", + "inquirer": "9.2.15", + "symbol-observable": "4.0.0", + "yargs-parser": "21.1.1" + }, + "bin": { + "schematics": "bin/schematics.js" + }, + "engines": { + "node": "^18.13.0 || >=20.9.0", + "npm": "^6.11.0 || ^7.5.6 || >=8.0.0", + "yarn": ">= 1.13.0" + } + }, + "node_modules/@angular-devkit/schematics-cli/node_modules/chalk": { + "version": "5.6.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.6.2.tgz", + "integrity": "sha512-7NzBL0rN6fMUW+f7A6Io4h40qQlG+xGmtMxfbnH/K7TAtt8JQWVQK+6g0UXKMeVJoyV5EkkNsErQ8pVD3bLHbA==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^12.17.0 || ^14.13 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/@angular-devkit/schematics-cli/node_modules/cli-width": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/cli-width/-/cli-width-4.1.0.tgz", + "integrity": "sha512-ouuZd4/dm2Sw5Gmqy6bGyNNNe1qt9RpmxveLSO7KcgsTnU7RXfsw+/bukWGo1abgBiMAic068rclZsO4IWmmxQ==", + "dev": true, + "license": "ISC", + "engines": { + "node": ">= 12" + } + }, + "node_modules/@angular-devkit/schematics-cli/node_modules/inquirer": { + "version": "9.2.15", + "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-9.2.15.tgz", + "integrity": "sha512-vI2w4zl/mDluHt9YEQ/543VTCwPKWiHzKtm9dM2V0NdFcqEexDAjUHzO1oA60HRNaVifGXXM1tRRNluLVHa0Kg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@ljharb/through": "^2.3.12", + "ansi-escapes": "^4.3.2", + "chalk": "^5.3.0", + "cli-cursor": "^3.1.0", + "cli-width": "^4.1.0", + "external-editor": "^3.1.0", + "figures": "^3.2.0", + "lodash": "^4.17.21", + "mute-stream": "1.0.0", + "ora": "^5.4.1", + "run-async": "^3.0.0", + "rxjs": "^7.8.1", + "string-width": "^4.2.3", + "strip-ansi": "^6.0.1", + "wrap-ansi": "^6.2.0" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/@angular-devkit/schematics-cli/node_modules/mute-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-1.0.0.tgz", + "integrity": "sha512-avsJQhyd+680gKXyG/sQc0nXaC6rBkPOfyHYcFb9+hdkqQkR9bdnkJ0AMZhke0oesPqIO+mFFJ+IdBc7mst4IA==", + "dev": true, + "license": "ISC", + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/@angular-devkit/schematics-cli/node_modules/run-async": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/run-async/-/run-async-3.0.0.tgz", + "integrity": "sha512-540WwVDOMxA6dN6We19EcT9sc3hkXPw5mzRNGM3FkdN/vtE9NFvj5lFAPNwUDmJjXidm3v7TC1cTE7t17Ulm1Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.12.0" + } + }, + "node_modules/@angular-devkit/schematics/node_modules/rxjs": { + "version": "7.8.1", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-7.8.1.tgz", + "integrity": "sha512-AA3TVj+0A2iuIoQkWEK/tqFjBq2j+6PO6Y0zJcvzLAFhEFIO3HL0vls9hWLncZbAAbK0mar7oZ4V079I/qPMxg==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "tslib": "^2.1.0" + } + }, + "node_modules/@babel/code-frame": { + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.27.1.tgz", + "integrity": "sha512-cjQ7ZlQ0Mv3b47hABuTevyTuYN4i+loJKGeV9flcCgIK37cCXRh+L1bd3iBHlynerhQ7BhCkn2BPbQUL+rGqFg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-validator-identifier": "^7.27.1", + "js-tokens": "^4.0.0", + "picocolors": "^1.1.1" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/compat-data": { + "version": "7.28.5", + "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.28.5.tgz", + "integrity": "sha512-6uFXyCayocRbqhZOB+6XcuZbkMNimwfVGFji8CTZnCzOHVGvDqzvitu1re2AU5LROliz7eQPhB8CpAMvnx9EjA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/core": { + "version": "7.28.5", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.28.5.tgz", + "integrity": "sha512-e7jT4DxYvIDLk1ZHmU/m/mB19rex9sv0c2ftBtjSBv+kVM/902eh0fINUzD7UwLLNR+jU585GxUJ8/EBfAM5fw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/code-frame": "^7.27.1", + "@babel/generator": "^7.28.5", + "@babel/helper-compilation-targets": "^7.27.2", + "@babel/helper-module-transforms": "^7.28.3", + "@babel/helpers": "^7.28.4", + "@babel/parser": "^7.28.5", + "@babel/template": "^7.27.2", + "@babel/traverse": "^7.28.5", + "@babel/types": "^7.28.5", + "@jridgewell/remapping": "^2.3.5", + "convert-source-map": "^2.0.0", + "debug": "^4.1.0", + "gensync": "^1.0.0-beta.2", + "json5": "^2.2.3", + "semver": "^6.3.1" + }, + "engines": { + "node": ">=6.9.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/babel" + } + }, + "node_modules/@babel/core/node_modules/semver": { + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", + "dev": true, + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + } + }, + "node_modules/@babel/generator": { + "version": "7.28.5", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.28.5.tgz", + "integrity": "sha512-3EwLFhZ38J4VyIP6WNtt2kUdW9dokXA9Cr4IVIFHuCpZ3H8/YFOl5JjZHisrn1fATPBmKKqXzDFvh9fUwHz6CQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/parser": "^7.28.5", + "@babel/types": "^7.28.5", + "@jridgewell/gen-mapping": "^0.3.12", + "@jridgewell/trace-mapping": "^0.3.28", + "jsesc": "^3.0.2" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-compilation-targets": { + "version": "7.27.2", + "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.27.2.tgz", + "integrity": "sha512-2+1thGUUWWjLTYTHZWK1n8Yga0ijBz1XAhUXcKy81rd5g6yh7hGqMp45v7cadSbEHc9G3OTv45SyneRN3ps4DQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/compat-data": "^7.27.2", + "@babel/helper-validator-option": "^7.27.1", + "browserslist": "^4.24.0", + "lru-cache": "^5.1.1", + "semver": "^6.3.1" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-compilation-targets/node_modules/semver": { + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", + "dev": true, + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + } + }, + "node_modules/@babel/helper-globals": { + "version": "7.28.0", + "resolved": "https://registry.npmjs.org/@babel/helper-globals/-/helper-globals-7.28.0.tgz", + "integrity": "sha512-+W6cISkXFa1jXsDEdYA8HeevQT/FULhxzR99pxphltZcVaugps53THCeiWA8SguxxpSp3gKPiuYfSWopkLQ4hw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-module-imports": { + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.27.1.tgz", + "integrity": "sha512-0gSFWUPNXNopqtIPQvlD5WgXYI5GY2kP2cCvoT8kczjbfcfuIljTbcWrulD1CIPIX2gt1wghbDy08yE1p+/r3w==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/traverse": "^7.27.1", + "@babel/types": "^7.27.1" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-module-transforms": { + "version": "7.28.3", + "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.28.3.tgz", + "integrity": "sha512-gytXUbs8k2sXS9PnQptz5o0QnpLL51SwASIORY6XaBKF88nsOT0Zw9szLqlSGQDP/4TljBAD5y98p2U1fqkdsw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-module-imports": "^7.27.1", + "@babel/helper-validator-identifier": "^7.27.1", + "@babel/traverse": "^7.28.3" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" + } + }, + "node_modules/@babel/helper-plugin-utils": { + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.27.1.tgz", + "integrity": "sha512-1gn1Up5YXka3YYAHGKpbideQ5Yjf1tDa9qYcgysz+cNCXukyLl6DjPXhD3VRwSb8c0J9tA4b2+rHEZtc6R0tlw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-string-parser": { + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.27.1.tgz", + "integrity": "sha512-qMlSxKbpRlAridDExk92nSobyDdpPijUq2DW6oDnUqd0iOGxmQjyqhMIihI9+zv4LPyZdRje2cavWPbCbWm3eA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-validator-identifier": { + "version": "7.28.5", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.28.5.tgz", + "integrity": "sha512-qSs4ifwzKJSV39ucNjsvc6WVHs6b7S03sOh2OcHF9UHfVPqWWALUsNUVzhSBiItjRZoLHx7nIarVjqKVusUZ1Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-validator-option": { + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.27.1.tgz", + "integrity": "sha512-YvjJow9FxbhFFKDSuFnVCe2WxXk1zWc22fFePVNEaWJEu8IrZVlda6N0uHwzZrUM1il7NC9Mlp4MaJYbYd9JSg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helpers": { + "version": "7.28.4", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.28.4.tgz", + "integrity": "sha512-HFN59MmQXGHVyYadKLVumYsA9dBFun/ldYxipEjzA4196jpLZd8UjEEBLkbEkvfYreDqJhZxYAWFPtrfhNpj4w==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/template": "^7.27.2", + "@babel/types": "^7.28.4" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/parser": { + "version": "7.28.5", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.28.5.tgz", + "integrity": "sha512-KKBU1VGYR7ORr3At5HAtUQ+TV3SzRCXmA/8OdDZiLDBIZxVyzXuztPjfLd3BV1PRAQGCMWWSHYhL0F8d5uHBDQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/types": "^7.28.5" + }, + "bin": { + "parser": "bin/babel-parser.js" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@babel/plugin-syntax-async-generators": { + "version": "7.8.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-async-generators/-/plugin-syntax-async-generators-7.8.4.tgz", + "integrity": "sha512-tycmZxkGfZaxhMRbXlPXuVFpdWlXpir2W4AMhSJgRKzk/eDlIXOhb2LHWoLpDF7TEHylV5zNhykX6KAgHJmTNw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-bigint": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-bigint/-/plugin-syntax-bigint-7.8.3.tgz", + "integrity": "sha512-wnTnFlG+YxQm3vDxpGE57Pj0srRU4sHE/mDkt1qv2YJJSeUAec2ma4WLUnUPeKjyrfntVwe/N6dCXpU+zL3Npg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-class-properties": { + "version": "7.12.13", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-class-properties/-/plugin-syntax-class-properties-7.12.13.tgz", + "integrity": "sha512-fm4idjKla0YahUNgFNLCB0qySdsoPiZP3iQE3rky0mBUtMZ23yDJ9SJdg6dXTSDnulOVqiF3Hgr9nbXvXTQZYA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.12.13" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-class-static-block": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-class-static-block/-/plugin-syntax-class-static-block-7.14.5.tgz", + "integrity": "sha512-b+YyPmr6ldyNnM6sqYeMWE+bgJcJpO6yS4QD7ymxgH34GBPNDM/THBh8iunyvKIZztiwLH4CJZ0RxTk9emgpjw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.14.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-import-attributes": { + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-import-attributes/-/plugin-syntax-import-attributes-7.27.1.tgz", + "integrity": "sha512-oFT0FrKHgF53f4vOsZGi2Hh3I35PfSmVs4IBFLFj4dnafP+hIWDLg3VyKmUHfLoLHlyxY4C7DGtmHuJgn+IGww==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.27.1" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-import-meta": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-import-meta/-/plugin-syntax-import-meta-7.10.4.tgz", + "integrity": "sha512-Yqfm+XDx0+Prh3VSeEQCPU81yC+JWZ2pDPFSS4ZdpfZhp4MkFMaDC1UqseovEKwSUpnIL7+vK+Clp7bfh0iD7g==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.10.4" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-json-strings": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-json-strings/-/plugin-syntax-json-strings-7.8.3.tgz", + "integrity": "sha512-lY6kdGpWHvjoe2vk4WrAapEuBR69EMxZl+RoGRhrFGNYVK8mOPAW8VfbT/ZgrFbXlDNiiaxQnAtgVCZ6jv30EA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-jsx": { + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.27.1.tgz", + "integrity": "sha512-y8YTNIeKoyhGd9O0Jiyzyyqk8gdjnumGTQPsz0xOZOQ2RmkVJeZ1vmmfIvFEKqucBG6axJGBZDE/7iI5suUI/w==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.27.1" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-logical-assignment-operators": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-logical-assignment-operators/-/plugin-syntax-logical-assignment-operators-7.10.4.tgz", + "integrity": "sha512-d8waShlpFDinQ5MtvGU9xDAOzKH47+FFoney2baFIoMr952hKOLp1HR7VszoZvOsV/4+RRszNY7D17ba0te0ig==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.10.4" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-nullish-coalescing-operator": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-nullish-coalescing-operator/-/plugin-syntax-nullish-coalescing-operator-7.8.3.tgz", + "integrity": "sha512-aSff4zPII1u2QD7y+F8oDsz19ew4IGEJg9SVW+bqwpwtfFleiQDMdzA/R+UlWDzfnHFCxxleFT0PMIrR36XLNQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-numeric-separator": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-numeric-separator/-/plugin-syntax-numeric-separator-7.10.4.tgz", + "integrity": "sha512-9H6YdfkcK/uOnY/K7/aA2xpzaAgkQn37yzWUMRK7OaPOqOpGS1+n0H5hxT9AUw9EsSjPW8SVyMJwYRtWs3X3ug==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.10.4" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-object-rest-spread": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-object-rest-spread/-/plugin-syntax-object-rest-spread-7.8.3.tgz", + "integrity": "sha512-XoqMijGZb9y3y2XskN+P1wUGiVwWZ5JmoDRwx5+3GmEplNyVM2s2Dg8ILFQm8rWM48orGy5YpI5Bl8U1y7ydlA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-optional-catch-binding": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-optional-catch-binding/-/plugin-syntax-optional-catch-binding-7.8.3.tgz", + "integrity": "sha512-6VPD0Pc1lpTqw0aKoeRTMiB+kWhAoT24PA+ksWSBrFtl5SIRVpZlwN3NNPQjehA2E/91FV3RjLWoVTglWcSV3Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-optional-chaining": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-optional-chaining/-/plugin-syntax-optional-chaining-7.8.3.tgz", + "integrity": "sha512-KoK9ErH1MBlCPxV0VANkXW2/dw4vlbGDrFgz8bmUsBGYkFRcbRwMh6cIJubdPrkxRwuGdtCk0v/wPTKbQgBjkg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-private-property-in-object": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-private-property-in-object/-/plugin-syntax-private-property-in-object-7.14.5.tgz", + "integrity": "sha512-0wVnp9dxJ72ZUJDV27ZfbSj6iHLoytYZmh3rFcxNnvsJF3ktkzLDZPy/mA17HGsaQT3/DQsWYX1f1QGWkCoVUg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.14.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-top-level-await": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-top-level-await/-/plugin-syntax-top-level-await-7.14.5.tgz", + "integrity": "sha512-hx++upLv5U1rgYfwe1xBQUhRmU41NEvpUvrp8jkrSCdvGSnM5/qdRMtylJ6PG5OFkBaHkbTAKTnd3/YyESRHFw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.14.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-typescript": { + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.27.1.tgz", + "integrity": "sha512-xfYCBMxveHrRMnAWl1ZlPXOZjzkN82THFvLhQhFXFt81Z5HnN+EtUkZhv/zcKpmT3fzmWZB0ywiBrbC3vogbwQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.27.1" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/template": { + "version": "7.27.2", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.27.2.tgz", + "integrity": "sha512-LPDZ85aEJyYSd18/DkjNh4/y1ntkE5KwUHWTiqgRxruuZL2F1yuHligVHLvcHY2vMHXttKFpJn6LwfI7cw7ODw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/code-frame": "^7.27.1", + "@babel/parser": "^7.27.2", + "@babel/types": "^7.27.1" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/traverse": { + "version": "7.28.5", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.28.5.tgz", + "integrity": "sha512-TCCj4t55U90khlYkVV/0TfkJkAkUg3jZFA3Neb7unZT8CPok7iiRfaX0F+WnqWqt7OxhOn0uBKXCw4lbL8W0aQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/code-frame": "^7.27.1", + "@babel/generator": "^7.28.5", + "@babel/helper-globals": "^7.28.0", + "@babel/parser": "^7.28.5", + "@babel/template": "^7.27.2", + "@babel/types": "^7.28.5", + "debug": "^4.3.1" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/types": { + "version": "7.28.5", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.28.5.tgz", + "integrity": "sha512-qQ5m48eI/MFLQ5PxQj4PFaprjyCTLI37ElWMmNs0K8Lk3dVeOdNpB3ks8jc7yM5CDmVC73eMVk/trk3fgmrUpA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-string-parser": "^7.27.1", + "@babel/helper-validator-identifier": "^7.28.5" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@bcoe/v8-coverage": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz", + "integrity": "sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==", + "dev": true, + "license": "MIT" + }, + "node_modules/@borewit/text-codec": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/@borewit/text-codec/-/text-codec-0.1.1.tgz", + "integrity": "sha512-5L/uBxmjaCIX5h8Z+uu+kA9BQLkc/Wl06UGR5ajNRxu+/XjonB5i8JpgFMrPj3LXTCPA0pv8yxUvbUi+QthGGA==", + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/Borewit" + } + }, + "node_modules/@colors/colors": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/@colors/colors/-/colors-1.5.0.tgz", + "integrity": "sha512-ooWCrlZP11i8GImSjTHYHLkvFDP48nS4+204nGb1RiX/WXYHmJA2III9/e2DWVabCESdW7hBAEzHRqUn9OUVvQ==", + "dev": true, + "license": "MIT", + "optional": true, + "engines": { + "node": ">=0.1.90" + } + }, + "node_modules/@cspotcode/source-map-support": { + "version": "0.8.1", + "resolved": "https://registry.npmjs.org/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz", + "integrity": "sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/trace-mapping": "0.3.9" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/@cspotcode/source-map-support/node_modules/@jridgewell/trace-mapping": { + "version": "0.3.9", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz", + "integrity": "sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/resolve-uri": "^3.0.3", + "@jridgewell/sourcemap-codec": "^1.4.10" + } + }, + "node_modules/@eslint-community/eslint-utils": { + "version": "4.9.0", + "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.9.0.tgz", + "integrity": "sha512-ayVFHdtZ+hsq1t2Dy24wCmGXGe4q9Gu3smhLYALJrr473ZH27MsnSL+LKUlimp4BWJqMDMLmPpx/Q9R3OAlL4g==", + "dev": true, + "license": "MIT", + "dependencies": { + "eslint-visitor-keys": "^3.4.3" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + }, + "peerDependencies": { + "eslint": "^6.0.0 || ^7.0.0 || >=8.0.0" + } + }, + "node_modules/@eslint-community/regexpp": { + "version": "4.12.2", + "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.12.2.tgz", + "integrity": "sha512-EriSTlt5OC9/7SXkRSCAhfSxxoSUgBm33OH+IkwbdpgoqsSsUg7y3uh+IICI/Qg4BBWr3U2i39RpmycbxMq4ew==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^12.0.0 || ^14.0.0 || >=16.0.0" + } + }, + "node_modules/@eslint/eslintrc": { + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.1.4.tgz", + "integrity": "sha512-269Z39MS6wVJtsoUl10L60WdkhJVdPG24Q4eZTH3nnF6lpvSShEK3wQjDX9JRWAUPvPh7COouPpU9IrqaZFvtQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "ajv": "^6.12.4", + "debug": "^4.3.2", + "espree": "^9.6.0", + "globals": "^13.19.0", + "ignore": "^5.2.0", + "import-fresh": "^3.2.1", + "js-yaml": "^4.1.0", + "minimatch": "^3.1.2", + "strip-json-comments": "^3.1.1" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/@eslint/eslintrc/node_modules/ajv": { + "version": "6.12.6", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "dev": true, + "license": "MIT", + "dependencies": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, + "node_modules/@eslint/eslintrc/node_modules/brace-expansion": { + "version": "1.1.12", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz", + "integrity": "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==", + "dev": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/@eslint/eslintrc/node_modules/json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", + "dev": true, + "license": "MIT" + }, + "node_modules/@eslint/eslintrc/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "license": "ISC", + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/@eslint/js": { + "version": "8.57.1", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.57.1.tgz", + "integrity": "sha512-d9zaMRSTIKDLhctzH12MtXvJKSSUhaHcjV+2Z+GK+EEY7XKpP5yR4x+N3TAcHTcu963nIr+TMcCb4DBCYX1z6Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + } + }, + "node_modules/@humanwhocodes/config-array": { + "version": "0.13.0", + "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.13.0.tgz", + "integrity": "sha512-DZLEEqFWQFiyK6h5YIeynKx7JlvCYWL0cImfSRXZ9l4Sg2efkFGTuFf6vzXjK1cq6IYkU+Eg/JizXw+TD2vRNw==", + "deprecated": "Use @eslint/config-array instead", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@humanwhocodes/object-schema": "^2.0.3", + "debug": "^4.3.1", + "minimatch": "^3.0.5" + }, + "engines": { + "node": ">=10.10.0" + } + }, + "node_modules/@humanwhocodes/config-array/node_modules/brace-expansion": { + "version": "1.1.12", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz", + "integrity": "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==", + "dev": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/@humanwhocodes/config-array/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "license": "ISC", + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/@humanwhocodes/module-importer": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz", + "integrity": "sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=12.22" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/nzakas" + } + }, + "node_modules/@humanwhocodes/object-schema": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-2.0.3.tgz", + "integrity": "sha512-93zYdMES/c1D69yZiKDBj0V24vqNzB/koF26KPaagAfd3P/4gUlh3Dys5ogAK+Exi9QyzlD8x/08Zt7wIKcDcA==", + "deprecated": "Use @eslint/object-schema instead", + "dev": true, + "license": "BSD-3-Clause" + }, + "node_modules/@isaacs/cliui": { + "version": "8.0.2", + "resolved": "https://registry.npmjs.org/@isaacs/cliui/-/cliui-8.0.2.tgz", + "integrity": "sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==", + "dev": true, + "license": "ISC", + "dependencies": { + "string-width": "^5.1.2", + "string-width-cjs": "npm:string-width@^4.2.0", + "strip-ansi": "^7.0.1", + "strip-ansi-cjs": "npm:strip-ansi@^6.0.1", + "wrap-ansi": "^8.1.0", + "wrap-ansi-cjs": "npm:wrap-ansi@^7.0.0" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/@isaacs/cliui/node_modules/ansi-regex": { + "version": "6.2.2", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.2.2.tgz", + "integrity": "sha512-Bq3SmSpyFHaWjPk8If9yc6svM8c56dB5BAtW4Qbw5jHTwwXXcTLoRMkpDJp6VL0XzlWaCHTXrkFURMYmD0sLqg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-regex?sponsor=1" + } + }, + "node_modules/@isaacs/cliui/node_modules/ansi-styles": { + "version": "6.2.3", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.3.tgz", + "integrity": "sha512-4Dj6M28JB+oAH8kFkTLUo+a2jwOFkuqb3yucU0CANcRRUbxS0cP0nZYCGjcc3BNXwRIsUVmDGgzawme7zvJHvg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/@isaacs/cliui/node_modules/emoji-regex": { + "version": "9.2.2", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz", + "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==", + "dev": true, + "license": "MIT" + }, + "node_modules/@isaacs/cliui/node_modules/string-width": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz", + "integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==", + "dev": true, + "license": "MIT", + "dependencies": { + "eastasianwidth": "^0.2.0", + "emoji-regex": "^9.2.2", + "strip-ansi": "^7.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/@isaacs/cliui/node_modules/strip-ansi": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.2.tgz", + "integrity": "sha512-gmBGslpoQJtgnMAvOVqGZpEz9dyoKTCzy2nfz/n8aIFhN/jCE/rCmcxabB6jOOHV+0WNnylOxaxBQPSvcWklhA==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-regex": "^6.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/strip-ansi?sponsor=1" + } + }, + "node_modules/@isaacs/cliui/node_modules/wrap-ansi": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-8.1.0.tgz", + "integrity": "sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^6.1.0", + "string-width": "^5.0.1", + "strip-ansi": "^7.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/@istanbuljs/load-nyc-config": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@istanbuljs/load-nyc-config/-/load-nyc-config-1.1.0.tgz", + "integrity": "sha512-VjeHSlIzpv/NyD3N0YuHfXOPDIixcA1q2ZV98wsMqcYlPmv2n3Yb2lYP9XMElnaFVXg5A7YLTeLu6V84uQDjmQ==", + "dev": true, + "license": "ISC", + "dependencies": { + "camelcase": "^5.3.1", + "find-up": "^4.1.0", + "get-package-type": "^0.1.0", + "js-yaml": "^3.13.1", + "resolve-from": "^5.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/@istanbuljs/load-nyc-config/node_modules/argparse": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", + "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", + "dev": true, + "license": "MIT", + "dependencies": { + "sprintf-js": "~1.0.2" + } + }, + "node_modules/@istanbuljs/load-nyc-config/node_modules/find-up": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", + "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", + "dev": true, + "license": "MIT", + "dependencies": { + "locate-path": "^5.0.0", + "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/@istanbuljs/load-nyc-config/node_modules/js-yaml": { + "version": "3.14.2", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.2.tgz", + "integrity": "sha512-PMSmkqxr106Xa156c2M265Z+FTrPl+oxd/rgOQy2tijQeK5TxQ43psO1ZCwhVOSdnn+RzkzlRz/eY4BgJBYVpg==", + "dev": true, + "license": "MIT", + "dependencies": { + "argparse": "^1.0.7", + "esprima": "^4.0.0" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, + "node_modules/@istanbuljs/load-nyc-config/node_modules/locate-path": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", + "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", + "dev": true, + "license": "MIT", + "dependencies": { + "p-locate": "^4.1.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/@istanbuljs/load-nyc-config/node_modules/p-limit": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", + "dev": true, + "license": "MIT", + "dependencies": { + "p-try": "^2.0.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/@istanbuljs/load-nyc-config/node_modules/p-locate": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", + "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", + "dev": true, + "license": "MIT", + "dependencies": { + "p-limit": "^2.2.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/@istanbuljs/load-nyc-config/node_modules/resolve-from": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", + "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/@istanbuljs/schema": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/@istanbuljs/schema/-/schema-0.1.3.tgz", + "integrity": "sha512-ZXRY4jNvVgSVQ8DL3LTcakaAtXwTVUxE81hslsyD2AtoXW/wVob10HkOJ1X/pAlcI7D+2YoZKg5do8G/w6RYgA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/@jest/console": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/console/-/console-29.7.0.tgz", + "integrity": "sha512-5Ni4CU7XHQi32IJ398EEP4RrB8eV09sXP2ROqD4bksHrnTree52PsxvX8tpL8LvTZ3pFzXyPbNQReSN41CAhOg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/types": "^29.6.3", + "@types/node": "*", + "chalk": "^4.0.0", + "jest-message-util": "^29.7.0", + "jest-util": "^29.7.0", + "slash": "^3.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jest/core": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/core/-/core-29.7.0.tgz", + "integrity": "sha512-n7aeXWKMnGtDA48y8TLWJPJmLmmZ642Ceo78cYWEpiD7FzDgmNDV/GCVRorPABdXLJZ/9wzzgZAlHjXjxDHGsg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/console": "^29.7.0", + "@jest/reporters": "^29.7.0", + "@jest/test-result": "^29.7.0", + "@jest/transform": "^29.7.0", + "@jest/types": "^29.6.3", + "@types/node": "*", + "ansi-escapes": "^4.2.1", + "chalk": "^4.0.0", + "ci-info": "^3.2.0", + "exit": "^0.1.2", + "graceful-fs": "^4.2.9", + "jest-changed-files": "^29.7.0", + "jest-config": "^29.7.0", + "jest-haste-map": "^29.7.0", + "jest-message-util": "^29.7.0", + "jest-regex-util": "^29.6.3", + "jest-resolve": "^29.7.0", + "jest-resolve-dependencies": "^29.7.0", + "jest-runner": "^29.7.0", + "jest-runtime": "^29.7.0", + "jest-snapshot": "^29.7.0", + "jest-util": "^29.7.0", + "jest-validate": "^29.7.0", + "jest-watcher": "^29.7.0", + "micromatch": "^4.0.4", + "pretty-format": "^29.7.0", + "slash": "^3.0.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + }, + "peerDependencies": { + "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0" + }, + "peerDependenciesMeta": { + "node-notifier": { + "optional": true + } + } + }, + "node_modules/@jest/environment": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/environment/-/environment-29.7.0.tgz", + "integrity": "sha512-aQIfHDq33ExsN4jP1NWGXhxgQ/wixs60gDiKO+XVMd8Mn0NWPWgc34ZQDTb2jKaUWQ7MuwoitXAsN2XVXNMpAw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/fake-timers": "^29.7.0", + "@jest/types": "^29.6.3", + "@types/node": "*", + "jest-mock": "^29.7.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jest/expect": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/expect/-/expect-29.7.0.tgz", + "integrity": "sha512-8uMeAMycttpva3P1lBHB8VciS9V0XAr3GymPpipdyQXbBcuhkLQOSe8E/p92RyAdToS6ZD1tFkX+CkhoECE0dQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "expect": "^29.7.0", + "jest-snapshot": "^29.7.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jest/expect-utils": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/expect-utils/-/expect-utils-29.7.0.tgz", + "integrity": "sha512-GlsNBWiFQFCVi9QVSx7f5AgMeLxe9YCCs5PuP2O2LdjDAA8Jh9eX7lA1Jq/xdXw3Wb3hyvlFNfZIfcRetSzYcA==", + "dev": true, + "license": "MIT", + "dependencies": { + "jest-get-type": "^29.6.3" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jest/fake-timers": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/fake-timers/-/fake-timers-29.7.0.tgz", + "integrity": "sha512-q4DH1Ha4TTFPdxLsqDXK1d3+ioSL7yL5oCMJZgDYm6i+6CygW5E5xVr/D1HdsGxjt1ZWSfUAs9OxSB/BNelWrQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/types": "^29.6.3", + "@sinonjs/fake-timers": "^10.0.2", + "@types/node": "*", + "jest-message-util": "^29.7.0", + "jest-mock": "^29.7.0", + "jest-util": "^29.7.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jest/globals": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/globals/-/globals-29.7.0.tgz", + "integrity": "sha512-mpiz3dutLbkW2MNFubUGUEVLkTGiqW6yLVTA+JbP6fI6J5iL9Y0Nlg8k95pcF8ctKwCS7WVxteBs29hhfAotzQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/environment": "^29.7.0", + "@jest/expect": "^29.7.0", + "@jest/types": "^29.6.3", + "jest-mock": "^29.7.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jest/reporters": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/reporters/-/reporters-29.7.0.tgz", + "integrity": "sha512-DApq0KJbJOEzAFYjHADNNxAE3KbhxQB1y5Kplb5Waqw6zVbuWatSnMjE5gs8FUgEPmNsnZA3NCWl9NG0ia04Pg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@bcoe/v8-coverage": "^0.2.3", + "@jest/console": "^29.7.0", + "@jest/test-result": "^29.7.0", + "@jest/transform": "^29.7.0", + "@jest/types": "^29.6.3", + "@jridgewell/trace-mapping": "^0.3.18", + "@types/node": "*", + "chalk": "^4.0.0", + "collect-v8-coverage": "^1.0.0", + "exit": "^0.1.2", + "glob": "^7.1.3", + "graceful-fs": "^4.2.9", + "istanbul-lib-coverage": "^3.0.0", + "istanbul-lib-instrument": "^6.0.0", + "istanbul-lib-report": "^3.0.0", + "istanbul-lib-source-maps": "^4.0.0", + "istanbul-reports": "^3.1.3", + "jest-message-util": "^29.7.0", + "jest-util": "^29.7.0", + "jest-worker": "^29.7.0", + "slash": "^3.0.0", + "string-length": "^4.0.1", + "strip-ansi": "^6.0.0", + "v8-to-istanbul": "^9.0.1" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + }, + "peerDependencies": { + "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0" + }, + "peerDependenciesMeta": { + "node-notifier": { + "optional": true + } + } + }, + "node_modules/@jest/reporters/node_modules/brace-expansion": { + "version": "1.1.12", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz", + "integrity": "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==", + "dev": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/@jest/reporters/node_modules/glob": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "deprecated": "Glob versions prior to v9 are no longer supported", + "dev": true, + "license": "ISC", + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/@jest/reporters/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "license": "ISC", + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/@jest/schemas": { + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-29.6.3.tgz", + "integrity": "sha512-mo5j5X+jIZmJQveBKeS/clAueipV7KgiX1vMgCxam1RNYiqE1w62n0/tJJnHtjW8ZHcQco5gY85jA3mi0L+nSA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@sinclair/typebox": "^0.27.8" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jest/source-map": { + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/@jest/source-map/-/source-map-29.6.3.tgz", + "integrity": "sha512-MHjT95QuipcPrpLM+8JMSzFx6eHp5Bm+4XeFDJlwsvVBjmKNiIAvasGK2fxz2WbGRlnvqehFbh07MMa7n3YJnw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/trace-mapping": "^0.3.18", + "callsites": "^3.0.0", + "graceful-fs": "^4.2.9" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jest/test-result": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/test-result/-/test-result-29.7.0.tgz", + "integrity": "sha512-Fdx+tv6x1zlkJPcWXmMDAG2HBnaR9XPSd5aDWQVsfrZmLVT3lU1cwyxLgRmXR9yrq4NBoEm9BMsfgFzTQAbJYA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/console": "^29.7.0", + "@jest/types": "^29.6.3", + "@types/istanbul-lib-coverage": "^2.0.0", + "collect-v8-coverage": "^1.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jest/test-sequencer": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/test-sequencer/-/test-sequencer-29.7.0.tgz", + "integrity": "sha512-GQwJ5WZVrKnOJuiYiAF52UNUJXgTZx1NHjFSEB0qEMmSZKAkdMoIzw/Cj6x6NF4AvV23AUqDpFzQkN/eYCYTxw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/test-result": "^29.7.0", + "graceful-fs": "^4.2.9", + "jest-haste-map": "^29.7.0", + "slash": "^3.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jest/transform": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/transform/-/transform-29.7.0.tgz", + "integrity": "sha512-ok/BTPFzFKVMwO5eOHRrvnBVHdRy9IrsrW1GpMaQ9MCnilNLXQKmAX8s1YXDFaai9xJpac2ySzV0YeRRECr2Vw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/core": "^7.11.6", + "@jest/types": "^29.6.3", + "@jridgewell/trace-mapping": "^0.3.18", + "babel-plugin-istanbul": "^6.1.1", + "chalk": "^4.0.0", + "convert-source-map": "^2.0.0", + "fast-json-stable-stringify": "^2.1.0", + "graceful-fs": "^4.2.9", + "jest-haste-map": "^29.7.0", + "jest-regex-util": "^29.6.3", + "jest-util": "^29.7.0", + "micromatch": "^4.0.4", + "pirates": "^4.0.4", + "slash": "^3.0.0", + "write-file-atomic": "^4.0.2" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jest/types": { + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-29.6.3.tgz", + "integrity": "sha512-u3UPsIilWKOM3F9CXtrG8LEJmNxwoCQC/XVj4IKYXvvpx7QIi/Kg1LI5uDmDpKlac62NUtX7eLjRh+jVZcLOzw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/schemas": "^29.6.3", + "@types/istanbul-lib-coverage": "^2.0.0", + "@types/istanbul-reports": "^3.0.0", + "@types/node": "*", + "@types/yargs": "^17.0.8", + "chalk": "^4.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jridgewell/gen-mapping": { + "version": "0.3.13", + "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.13.tgz", + "integrity": "sha512-2kkt/7niJ6MgEPxF0bYdQ6etZaA+fQvDcLKckhy1yIQOzaoKjBBjSj63/aLVjYE3qhRt5dvM+uUyfCg6UKCBbA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/sourcemap-codec": "^1.5.0", + "@jridgewell/trace-mapping": "^0.3.24" + } + }, + "node_modules/@jridgewell/remapping": { + "version": "2.3.5", + "resolved": "https://registry.npmjs.org/@jridgewell/remapping/-/remapping-2.3.5.tgz", + "integrity": "sha512-LI9u/+laYG4Ds1TDKSJW2YPrIlcVYOwi2fUC6xB43lueCjgxV4lffOCZCtYFiH6TNOX+tQKXx97T4IKHbhyHEQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/gen-mapping": "^0.3.5", + "@jridgewell/trace-mapping": "^0.3.24" + } + }, + "node_modules/@jridgewell/resolve-uri": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz", + "integrity": "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/source-map": { + "version": "0.3.11", + "resolved": "https://registry.npmjs.org/@jridgewell/source-map/-/source-map-0.3.11.tgz", + "integrity": "sha512-ZMp1V8ZFcPG5dIWnQLr3NSI1MiCU7UETdS/A0G8V/XWHvJv3ZsFqutJn1Y5RPmAPX6F3BiE397OqveU/9NCuIA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/gen-mapping": "^0.3.5", + "@jridgewell/trace-mapping": "^0.3.25" + } + }, + "node_modules/@jridgewell/sourcemap-codec": { + "version": "1.5.5", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.5.tgz", + "integrity": "sha512-cYQ9310grqxueWbl+WuIUIaiUaDcj7WOq5fVhEljNVgRfOUhY9fy2zTvfoqWsnebh8Sl70VScFbICvJnLKB0Og==", + "dev": true, + "license": "MIT" + }, + "node_modules/@jridgewell/trace-mapping": { + "version": "0.3.31", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.31.tgz", + "integrity": "sha512-zzNR+SdQSDJzc8joaeP8QQoCQr8NuYx2dIIytl1QeBEZHJ9uW6hebsrYgbz8hJwUQao3TWCMtmfV8Nu1twOLAw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/resolve-uri": "^3.1.0", + "@jridgewell/sourcemap-codec": "^1.4.14" + } + }, + "node_modules/@ljharb/through": { + "version": "2.3.14", + "resolved": "https://registry.npmjs.org/@ljharb/through/-/through-2.3.14.tgz", + "integrity": "sha512-ajBvlKpWucBB17FuQYUShqpqy8GRgYEpJW0vWJbUu1CV9lWyrDCapy0lScU8T8Z6qn49sSwJB3+M+evYIdGg+A==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.8" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/@lukeed/csprng": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@lukeed/csprng/-/csprng-1.1.0.tgz", + "integrity": "sha512-Z7C/xXCiGWsg0KuKsHTKJxbWhpI3Vs5GwLfOean7MGyVFGqdRgBbAjOCh6u4bbjPc/8MJ2pZmK/0DLdCbivLDA==", + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/@microsoft/tsdoc": { + "version": "0.15.1", + "resolved": "https://registry.npmjs.org/@microsoft/tsdoc/-/tsdoc-0.15.1.tgz", + "integrity": "sha512-4aErSrCR/On/e5G2hDP0wjooqDdauzEbIq8hIkIe5pXV0rtWJZvdCEKL0ykZxex+IxIwBp0eGeV48hQN07dXtw==", + "license": "MIT" + }, + "node_modules/@nestjs/axios": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/@nestjs/axios/-/axios-3.1.3.tgz", + "integrity": "sha512-RZ/63c1tMxGLqyG3iOCVt7A72oy4x1eM6QEhd4KzCYpaVWW0igq0WSREeRoEZhIxRcZfDfIIkvsOMiM7yfVGZQ==", + "license": "MIT", + "peerDependencies": { + "@nestjs/common": "^7.0.0 || ^8.0.0 || ^9.0.0 || ^10.0.0", + "axios": "^1.3.1", + "rxjs": "^6.0.0 || ^7.0.0" + } + }, + "node_modules/@nestjs/cli": { + "version": "10.4.9", + "resolved": "https://registry.npmjs.org/@nestjs/cli/-/cli-10.4.9.tgz", + "integrity": "sha512-s8qYd97bggqeK7Op3iD49X2MpFtW4LVNLAwXFkfbRxKME6IYT7X0muNTJ2+QfI8hpbNx9isWkrLWIp+g5FOhiA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@angular-devkit/core": "17.3.11", + "@angular-devkit/schematics": "17.3.11", + "@angular-devkit/schematics-cli": "17.3.11", + "@nestjs/schematics": "^10.0.1", + "chalk": "4.1.2", + "chokidar": "3.6.0", + "cli-table3": "0.6.5", + "commander": "4.1.1", + "fork-ts-checker-webpack-plugin": "9.0.2", + "glob": "10.4.5", + "inquirer": "8.2.6", + "node-emoji": "1.11.0", + "ora": "5.4.1", + "tree-kill": "1.2.2", + "tsconfig-paths": "4.2.0", + "tsconfig-paths-webpack-plugin": "4.2.0", + "typescript": "5.7.2", + "webpack": "5.97.1", + "webpack-node-externals": "3.0.0" + }, + "bin": { + "nest": "bin/nest.js" + }, + "engines": { + "node": ">= 16.14" + }, + "peerDependencies": { + "@swc/cli": "^0.1.62 || ^0.3.0 || ^0.4.0 || ^0.5.0", + "@swc/core": "^1.3.62" + }, + "peerDependenciesMeta": { + "@swc/cli": { + "optional": true + }, + "@swc/core": { + "optional": true + } + } + }, + "node_modules/@nestjs/cli/node_modules/eslint-scope": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz", + "integrity": "sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "esrecurse": "^4.3.0", + "estraverse": "^4.1.1" + }, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/@nestjs/cli/node_modules/estraverse": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz", + "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==", + "dev": true, + "license": "BSD-2-Clause", + "engines": { + "node": ">=4.0" + } + }, + "node_modules/@nestjs/cli/node_modules/typescript": { + "version": "5.7.2", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.7.2.tgz", + "integrity": "sha512-i5t66RHxDvVN40HfDd1PsEThGNnlMCMT3jMUuoh9/0TaqWevNontacunWyN02LA9/fIbEWlcHZcgTKb9QoaLfg==", + "dev": true, + "license": "Apache-2.0", + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=14.17" + } + }, + "node_modules/@nestjs/cli/node_modules/webpack": { + "version": "5.97.1", + "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.97.1.tgz", + "integrity": "sha512-EksG6gFY3L1eFMROS/7Wzgrii5mBAFe4rIr3r2BTfo7bcc+DWwFZ4OJ/miOuHJO/A85HwyI4eQ0F6IKXesO7Fg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/eslint-scope": "^3.7.7", + "@types/estree": "^1.0.6", + "@webassemblyjs/ast": "^1.14.1", + "@webassemblyjs/wasm-edit": "^1.14.1", + "@webassemblyjs/wasm-parser": "^1.14.1", + "acorn": "^8.14.0", + "browserslist": "^4.24.0", + "chrome-trace-event": "^1.0.2", + "enhanced-resolve": "^5.17.1", + "es-module-lexer": "^1.2.1", + "eslint-scope": "5.1.1", + "events": "^3.2.0", + "glob-to-regexp": "^0.4.1", + "graceful-fs": "^4.2.11", + "json-parse-even-better-errors": "^2.3.1", + "loader-runner": "^4.2.0", + "mime-types": "^2.1.27", + "neo-async": "^2.6.2", + "schema-utils": "^3.2.0", + "tapable": "^2.1.1", + "terser-webpack-plugin": "^5.3.10", + "watchpack": "^2.4.1", + "webpack-sources": "^3.2.3" + }, + "bin": { + "webpack": "bin/webpack.js" + }, + "engines": { + "node": ">=10.13.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" + }, + "peerDependenciesMeta": { + "webpack-cli": { + "optional": true + } + } + }, + "node_modules/@nestjs/common": { + "version": "10.4.20", + "resolved": "https://registry.npmjs.org/@nestjs/common/-/common-10.4.20.tgz", + "integrity": "sha512-hxJxZF7jcKGuUzM9EYbuES80Z/36piJbiqmPy86mk8qOn5gglFebBTvcx7PWVbRNSb4gngASYnefBj/Y2HAzpQ==", + "license": "MIT", + "peer": true, + "dependencies": { + "file-type": "20.4.1", + "iterare": "1.2.1", + "tslib": "2.8.1", + "uid": "2.0.2" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/nest" + }, + "peerDependencies": { + "class-transformer": "*", + "class-validator": "*", + "reflect-metadata": "^0.1.12 || ^0.2.0", + "rxjs": "^7.1.0" + }, + "peerDependenciesMeta": { + "class-transformer": { + "optional": true + }, + "class-validator": { + "optional": true + } + } + }, + "node_modules/@nestjs/config": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/@nestjs/config/-/config-3.3.0.tgz", + "integrity": "sha512-pdGTp8m9d0ZCrjTpjkUbZx6gyf2IKf+7zlkrPNMsJzYZ4bFRRTpXrnj+556/5uiI6AfL5mMrJc2u7dB6bvM+VA==", + "license": "MIT", + "dependencies": { + "dotenv": "16.4.5", + "dotenv-expand": "10.0.0", + "lodash": "4.17.21" + }, + "peerDependencies": { + "@nestjs/common": "^8.0.0 || ^9.0.0 || ^10.0.0", + "rxjs": "^7.1.0" + } + }, + "node_modules/@nestjs/core": { + "version": "10.4.20", + "resolved": "https://registry.npmjs.org/@nestjs/core/-/core-10.4.20.tgz", + "integrity": "sha512-kRdtyKA3+Tu70N3RQ4JgmO1E3LzAMs/eppj7SfjabC7TgqNWoS4RLhWl4BqmsNVmjj6D5jgfPVtHtgYkU3AfpQ==", + "hasInstallScript": true, + "license": "MIT", + "peer": true, + "dependencies": { + "@nuxtjs/opencollective": "0.3.2", + "fast-safe-stringify": "2.1.1", + "iterare": "1.2.1", + "path-to-regexp": "3.3.0", + "tslib": "2.8.1", + "uid": "2.0.2" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/nest" + }, + "peerDependencies": { + "@nestjs/common": "^10.0.0", + "@nestjs/microservices": "^10.0.0", + "@nestjs/platform-express": "^10.0.0", + "@nestjs/websockets": "^10.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 + } + } + }, + "node_modules/@nestjs/jwt": { + "version": "10.2.0", + "resolved": "https://registry.npmjs.org/@nestjs/jwt/-/jwt-10.2.0.tgz", + "integrity": "sha512-x8cG90SURkEiLOehNaN2aRlotxT0KZESUliOPKKnjWiyJOcWurkF3w345WOX0P4MgFzUjGoZ1Sy0aZnxeihT0g==", + "license": "MIT", + "dependencies": { + "@types/jsonwebtoken": "9.0.5", + "jsonwebtoken": "9.0.2" + }, + "peerDependencies": { + "@nestjs/common": "^8.0.0 || ^9.0.0 || ^10.0.0" + } + }, + "node_modules/@nestjs/jwt/node_modules/@types/jsonwebtoken": { + "version": "9.0.5", + "resolved": "https://registry.npmjs.org/@types/jsonwebtoken/-/jsonwebtoken-9.0.5.tgz", + "integrity": "sha512-VRLSGzik+Unrup6BsouBeHsf4d1hOEgYWTm/7Nmw1sXoN1+tRly/Gy/po3yeahnP4jfnQWWAhQAqcNfH7ngOkA==", + "license": "MIT", + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/@nestjs/mapped-types": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@nestjs/mapped-types/-/mapped-types-2.0.5.tgz", + "integrity": "sha512-bSJv4pd6EY99NX9CjBIyn4TVDoSit82DUZlL4I3bqNfy5Gt+gXTa86i3I/i0iIV9P4hntcGM5GyO+FhZAhxtyg==", + "license": "MIT", + "peerDependencies": { + "@nestjs/common": "^8.0.0 || ^9.0.0 || ^10.0.0", + "class-transformer": "^0.4.0 || ^0.5.0", + "class-validator": "^0.13.0 || ^0.14.0", + "reflect-metadata": "^0.1.12 || ^0.2.0" + }, + "peerDependenciesMeta": { + "class-transformer": { + "optional": true + }, + "class-validator": { + "optional": true + } + } + }, + "node_modules/@nestjs/passport": { + "version": "10.0.3", + "resolved": "https://registry.npmjs.org/@nestjs/passport/-/passport-10.0.3.tgz", + "integrity": "sha512-znJ9Y4S8ZDVY+j4doWAJ8EuuVO7SkQN3yOBmzxbGaXbvcSwFDAdGJ+OMCg52NdzIO4tQoN4pYKx8W6M0ArfFRQ==", + "license": "MIT", + "peerDependencies": { + "@nestjs/common": "^8.0.0 || ^9.0.0 || ^10.0.0", + "passport": "^0.4.0 || ^0.5.0 || ^0.6.0 || ^0.7.0" + } + }, + "node_modules/@nestjs/platform-express": { + "version": "10.4.20", + "resolved": "https://registry.npmjs.org/@nestjs/platform-express/-/platform-express-10.4.20.tgz", + "integrity": "sha512-rh97mX3rimyf4xLMLHuTOBKe6UD8LOJ14VlJ1F/PTd6C6ZK9Ak6EHuJvdaGcSFQhd3ZMBh3I6CuujKGW9pNdIg==", + "license": "MIT", + "peer": true, + "dependencies": { + "body-parser": "1.20.3", + "cors": "2.8.5", + "express": "4.21.2", + "multer": "2.0.2", + "tslib": "2.8.1" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/nest" + }, + "peerDependencies": { + "@nestjs/common": "^10.0.0", + "@nestjs/core": "^10.0.0" + } + }, + "node_modules/@nestjs/schematics": { + "version": "10.2.3", + "resolved": "https://registry.npmjs.org/@nestjs/schematics/-/schematics-10.2.3.tgz", + "integrity": "sha512-4e8gxaCk7DhBxVUly2PjYL4xC2ifDFexCqq1/u4TtivLGXotVk0wHdYuPYe1tHTHuR1lsOkRbfOCpkdTnigLVg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@angular-devkit/core": "17.3.11", + "@angular-devkit/schematics": "17.3.11", + "comment-json": "4.2.5", + "jsonc-parser": "3.3.1", + "pluralize": "8.0.0" + }, + "peerDependencies": { + "typescript": ">=4.8.2" + } + }, + "node_modules/@nestjs/schematics/node_modules/jsonc-parser": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/jsonc-parser/-/jsonc-parser-3.3.1.tgz", + "integrity": "sha512-HUgH65KyejrUFPvHFPbqOY0rsFip3Bo5wb4ngvdi1EpCYWUQDC5V+Y7mZws+DLkr4M//zQJoanu1SP+87Dv1oQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/@nestjs/swagger": { + "version": "7.4.2", + "resolved": "https://registry.npmjs.org/@nestjs/swagger/-/swagger-7.4.2.tgz", + "integrity": "sha512-Mu6TEn1M/owIvAx2B4DUQObQXqo2028R2s9rSZ/hJEgBK95+doTwS0DjmVA2wTeZTyVtXOoN7CsoM5pONBzvKQ==", + "license": "MIT", + "dependencies": { + "@microsoft/tsdoc": "^0.15.0", + "@nestjs/mapped-types": "2.0.5", + "js-yaml": "4.1.0", + "lodash": "4.17.21", + "path-to-regexp": "3.3.0", + "swagger-ui-dist": "5.17.14" + }, + "peerDependencies": { + "@fastify/static": "^6.0.0 || ^7.0.0", + "@nestjs/common": "^9.0.0 || ^10.0.0", + "@nestjs/core": "^9.0.0 || ^10.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 + } + } + }, + "node_modules/@nestjs/testing": { + "version": "10.4.20", + "resolved": "https://registry.npmjs.org/@nestjs/testing/-/testing-10.4.20.tgz", + "integrity": "sha512-nMkRDukDKskdPruM6EsgMq7yJua+CPZM6I6FrLP8yXw8BiVSPv9Nm0CtcGGwt3kgZF9hfxKjGqLjsvVBsv6Vfw==", + "dev": true, + "license": "MIT", + "dependencies": { + "tslib": "2.8.1" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/nest" + }, + "peerDependencies": { + "@nestjs/common": "^10.0.0", + "@nestjs/core": "^10.0.0", + "@nestjs/microservices": "^10.0.0", + "@nestjs/platform-express": "^10.0.0" + }, + "peerDependenciesMeta": { + "@nestjs/microservices": { + "optional": true + }, + "@nestjs/platform-express": { + "optional": true + } + } + }, + "node_modules/@noble/hashes": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.8.0.tgz", + "integrity": "sha512-jCs9ldd7NwzpgXDIf6P3+NrHh9/sD6CQdxHyjQI+h/6rDNo88ypBxxz45UDuZHz9r3tNz7N/VInSVoVdtXEI4A==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^14.21.3 || >=16" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/@nodelib/fs.scandir": { + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", + "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", + "dev": true, + "license": "MIT", + "dependencies": { + "@nodelib/fs.stat": "2.0.5", + "run-parallel": "^1.1.9" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@nodelib/fs.stat": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", + "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 8" + } + }, + "node_modules/@nodelib/fs.walk": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", + "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@nodelib/fs.scandir": "2.1.5", + "fastq": "^1.6.0" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@nuxtjs/opencollective": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/@nuxtjs/opencollective/-/opencollective-0.3.2.tgz", + "integrity": "sha512-um0xL3fO7Mf4fDxcqx9KryrB7zgRM5JSlvGN5AGkP6JLM5XEKyjeAiPbNxdXVXQ16isuAhYpvP88NgL2BGd6aA==", + "license": "MIT", + "dependencies": { + "chalk": "^4.1.0", + "consola": "^2.15.0", + "node-fetch": "^2.6.1" + }, + "bin": { + "opencollective": "bin/opencollective.js" + }, + "engines": { + "node": ">=8.0.0", + "npm": ">=5.0.0" + } + }, + "node_modules/@paralleldrive/cuid2": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/@paralleldrive/cuid2/-/cuid2-2.3.1.tgz", + "integrity": "sha512-XO7cAxhnTZl0Yggq6jOgjiOHhbgcO4NqFqwSmQpjK3b6TEE6Uj/jfSk6wzYyemh3+I0sHirKSetjQwn5cZktFw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@noble/hashes": "^1.1.5" + } + }, + "node_modules/@pkgjs/parseargs": { + "version": "0.11.0", + "resolved": "https://registry.npmjs.org/@pkgjs/parseargs/-/parseargs-0.11.0.tgz", + "integrity": "sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==", + "dev": true, + "license": "MIT", + "optional": true, + "engines": { + "node": ">=14" + } + }, + "node_modules/@pkgr/core": { + "version": "0.2.9", + "resolved": "https://registry.npmjs.org/@pkgr/core/-/core-0.2.9.tgz", + "integrity": "sha512-QNqXyfVS2wm9hweSYD2O7F0G06uurj9kZ96TRQE5Y9hU7+tgdZwIkbAKc5Ocy1HxEY2kuDQa6cQ1WRs/O5LFKA==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^12.20.0 || ^14.18.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/pkgr" + } + }, + "node_modules/@prisma/client": { + "version": "5.22.0", + "resolved": "https://registry.npmjs.org/@prisma/client/-/client-5.22.0.tgz", + "integrity": "sha512-M0SVXfyHnQREBKxCgyo7sffrKttwE6R8PMq330MIUF0pTwjUhLbW84pFDlf06B27XyCR++VtjugEnIHdr07SVA==", + "hasInstallScript": true, + "license": "Apache-2.0", + "engines": { + "node": ">=16.13" + }, + "peerDependencies": { + "prisma": "*" + }, + "peerDependenciesMeta": { + "prisma": { + "optional": true + } + } + }, + "node_modules/@prisma/debug": { + "version": "5.22.0", + "resolved": "https://registry.npmjs.org/@prisma/debug/-/debug-5.22.0.tgz", + "integrity": "sha512-AUt44v3YJeggO2ZU5BkXI7M4hu9BF2zzH2iF2V5pyXT/lRTyWiElZ7It+bRH1EshoMRxHgpYg4VB6rCM+mG5jQ==", + "devOptional": true, + "license": "Apache-2.0" + }, + "node_modules/@prisma/engines": { + "version": "5.22.0", + "resolved": "https://registry.npmjs.org/@prisma/engines/-/engines-5.22.0.tgz", + "integrity": "sha512-UNjfslWhAt06kVL3CjkuYpHAWSO6L4kDCVPegV6itt7nD1kSJavd3vhgAEhjglLJJKEdJ7oIqDJ+yHk6qO8gPA==", + "devOptional": true, + "hasInstallScript": true, + "license": "Apache-2.0", + "dependencies": { + "@prisma/debug": "5.22.0", + "@prisma/engines-version": "5.22.0-44.605197351a3c8bdd595af2d2a9bc3025bca48ea2", + "@prisma/fetch-engine": "5.22.0", + "@prisma/get-platform": "5.22.0" + } + }, + "node_modules/@prisma/engines-version": { + "version": "5.22.0-44.605197351a3c8bdd595af2d2a9bc3025bca48ea2", + "resolved": "https://registry.npmjs.org/@prisma/engines-version/-/engines-version-5.22.0-44.605197351a3c8bdd595af2d2a9bc3025bca48ea2.tgz", + "integrity": "sha512-2PTmxFR2yHW/eB3uqWtcgRcgAbG1rwG9ZriSvQw+nnb7c4uCr3RAcGMb6/zfE88SKlC1Nj2ziUvc96Z379mHgQ==", + "devOptional": true, + "license": "Apache-2.0" + }, + "node_modules/@prisma/fetch-engine": { + "version": "5.22.0", + "resolved": "https://registry.npmjs.org/@prisma/fetch-engine/-/fetch-engine-5.22.0.tgz", + "integrity": "sha512-bkrD/Mc2fSvkQBV5EpoFcZ87AvOgDxbG99488a5cexp5Ccny+UM6MAe/UFkUC0wLYD9+9befNOqGiIJhhq+HbA==", + "devOptional": true, + "license": "Apache-2.0", + "dependencies": { + "@prisma/debug": "5.22.0", + "@prisma/engines-version": "5.22.0-44.605197351a3c8bdd595af2d2a9bc3025bca48ea2", + "@prisma/get-platform": "5.22.0" + } + }, + "node_modules/@prisma/get-platform": { + "version": "5.22.0", + "resolved": "https://registry.npmjs.org/@prisma/get-platform/-/get-platform-5.22.0.tgz", + "integrity": "sha512-pHhpQdr1UPFpt+zFfnPazhulaZYCUqeIcPpJViYoq9R+D/yw4fjE+CtnsnKzPYm0ddUbeXUzjGVGIRVgPDCk4Q==", + "devOptional": true, + "license": "Apache-2.0", + "dependencies": { + "@prisma/debug": "5.22.0" + } + }, + "node_modules/@sinclair/typebox": { + "version": "0.27.8", + "resolved": "https://registry.npmjs.org/@sinclair/typebox/-/typebox-0.27.8.tgz", + "integrity": "sha512-+Fj43pSMwJs4KRrH/938Uf+uAELIgVBmQzg/q1YG10djyfA3TnrU8N8XzqCh/okZdszqBQTZf96idMfE5lnwTA==", + "dev": true, + "license": "MIT" + }, + "node_modules/@sinonjs/commons": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-3.0.1.tgz", + "integrity": "sha512-K3mCHKQ9sVh8o1C9cxkwxaOmXoAMlDxC1mYyHrjqOWEcBjYr76t96zL2zlj5dUGZ3HSw240X1qgH3Mjf1yJWpQ==", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "type-detect": "4.0.8" + } + }, + "node_modules/@sinonjs/fake-timers": { + "version": "10.3.0", + "resolved": "https://registry.npmjs.org/@sinonjs/fake-timers/-/fake-timers-10.3.0.tgz", + "integrity": "sha512-V4BG07kuYSUkTCSBHG8G8TNhM+F19jXFWnQtzj+we8DrkpSBCee9Z3Ms8yiGer/dlmhe35/Xdgyo3/0rQKg7YA==", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "@sinonjs/commons": "^3.0.0" + } + }, + "node_modules/@tokenizer/inflate": { + "version": "0.2.7", + "resolved": "https://registry.npmjs.org/@tokenizer/inflate/-/inflate-0.2.7.tgz", + "integrity": "sha512-MADQgmZT1eKjp06jpI2yozxaU9uVs4GzzgSL+uEq7bVcJ9V1ZXQkeGNql1fsSI0gMy1vhvNTNbUqrx+pZfJVmg==", + "license": "MIT", + "dependencies": { + "debug": "^4.4.0", + "fflate": "^0.8.2", + "token-types": "^6.0.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/Borewit" + } + }, + "node_modules/@tokenizer/token": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/@tokenizer/token/-/token-0.3.0.tgz", + "integrity": "sha512-OvjF+z51L3ov0OyAU0duzsYuvO01PH7x4t6DJx+guahgTnBHkhJdG7soQeTSFLWN3efnHyibZ4Z8l2EuWwJN3A==", + "license": "MIT" + }, + "node_modules/@tsconfig/node10": { + "version": "1.0.12", + "resolved": "https://registry.npmjs.org/@tsconfig/node10/-/node10-1.0.12.tgz", + "integrity": "sha512-UCYBaeFvM11aU2y3YPZ//O5Rhj+xKyzy7mvcIoAjASbigy8mHMryP5cK7dgjlz2hWxh1g5pLw084E0a/wlUSFQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/@tsconfig/node12": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/@tsconfig/node12/-/node12-1.0.11.tgz", + "integrity": "sha512-cqefuRsh12pWyGsIoBKJA9luFu3mRxCA+ORZvA4ktLSzIuCUtWVxGIuXigEwO5/ywWFMZ2QEGKWvkZG1zDMTag==", + "dev": true, + "license": "MIT" + }, + "node_modules/@tsconfig/node14": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/@tsconfig/node14/-/node14-1.0.3.tgz", + "integrity": "sha512-ysT8mhdixWK6Hw3i1V2AeRqZ5WfXg1G43mqoYlM2nc6388Fq5jcXyr5mRsqViLx/GJYdoL0bfXD8nmF+Zn/Iow==", + "dev": true, + "license": "MIT" + }, + "node_modules/@tsconfig/node16": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/@tsconfig/node16/-/node16-1.0.4.tgz", + "integrity": "sha512-vxhUy4J8lyeyinH7Azl1pdd43GJhZH/tP2weN8TntQblOY+A0XbT8DJk1/oCPuOOyg/Ja757rG0CgHcWC8OfMA==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/babel__core": { + "version": "7.20.5", + "resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.20.5.tgz", + "integrity": "sha512-qoQprZvz5wQFJwMDqeseRXWv3rqMvhgpbXFfVyWhbx9X47POIA6i/+dXefEmZKoAgOaTdaIgNSMqMIU61yRyzA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/parser": "^7.20.7", + "@babel/types": "^7.20.7", + "@types/babel__generator": "*", + "@types/babel__template": "*", + "@types/babel__traverse": "*" + } + }, + "node_modules/@types/babel__generator": { + "version": "7.27.0", + "resolved": "https://registry.npmjs.org/@types/babel__generator/-/babel__generator-7.27.0.tgz", + "integrity": "sha512-ufFd2Xi92OAVPYsy+P4n7/U7e68fex0+Ee8gSG9KX7eo084CWiQ4sdxktvdl0bOPupXtVJPY19zk6EwWqUQ8lg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/types": "^7.0.0" + } + }, + "node_modules/@types/babel__template": { + "version": "7.4.4", + "resolved": "https://registry.npmjs.org/@types/babel__template/-/babel__template-7.4.4.tgz", + "integrity": "sha512-h/NUaSyG5EyxBIp8YRxo4RMe2/qQgvyowRwVMzhYhBCONbW8PUsg4lkFMrhgZhUe5z3L3MiLDuvyJ/CaPa2A8A==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/parser": "^7.1.0", + "@babel/types": "^7.0.0" + } + }, + "node_modules/@types/babel__traverse": { + "version": "7.28.0", + "resolved": "https://registry.npmjs.org/@types/babel__traverse/-/babel__traverse-7.28.0.tgz", + "integrity": "sha512-8PvcXf70gTDZBgt9ptxJ8elBeBjcLOAcOtoO/mPJjtji1+CdGbHgm77om1GrsPxsiE+uXIpNSK64UYaIwQXd4Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/types": "^7.28.2" + } + }, + "node_modules/@types/body-parser": { + "version": "1.19.6", + "resolved": "https://registry.npmjs.org/@types/body-parser/-/body-parser-1.19.6.tgz", + "integrity": "sha512-HLFeCYgz89uk22N5Qg3dvGvsv46B8GLvKKo1zKG4NybA8U2DiEO3w9lqGg29t/tfLRJpJ6iQxnVw4OnB7MoM9g==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/connect": "*", + "@types/node": "*" + } + }, + "node_modules/@types/connect": { + "version": "3.4.38", + "resolved": "https://registry.npmjs.org/@types/connect/-/connect-3.4.38.tgz", + "integrity": "sha512-K6uROf1LD88uDQqJCktA4yzL1YYAK6NgfsI0v/mTgyPKWsX1CnJ0XPSDhViejru1GcRkLWb8RlzFYJRqGUbaug==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/@types/cookiejar": { + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/@types/cookiejar/-/cookiejar-2.1.5.tgz", + "integrity": "sha512-he+DHOWReW0nghN24E1WUqM0efK4kI9oTqDm6XmK8ZPe2djZ90BSNdGnIyCLzCPw7/pogPlGbzI2wHGGmi4O/Q==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/eslint": { + "version": "9.6.1", + "resolved": "https://registry.npmjs.org/@types/eslint/-/eslint-9.6.1.tgz", + "integrity": "sha512-FXx2pKgId/WyYo2jXw63kk7/+TY7u7AziEJxJAnSFzHlqTAS3Ync6SvgYAN/k4/PQpnnVuzoMuVnByKK2qp0ag==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "@types/estree": "*", + "@types/json-schema": "*" + } + }, + "node_modules/@types/eslint-scope": { + "version": "3.7.7", + "resolved": "https://registry.npmjs.org/@types/eslint-scope/-/eslint-scope-3.7.7.tgz", + "integrity": "sha512-MzMFlSLBqNF2gcHWO0G1vP/YQyfvrxZ0bF+u7mzUdZ1/xK4A4sru+nraZz5i3iEIk1l1uyicaDVTB4QbbEkAYg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/eslint": "*", + "@types/estree": "*" + } + }, + "node_modules/@types/estree": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.8.tgz", + "integrity": "sha512-dWHzHa2WqEXI/O1E9OjrocMTKJl2mSrEolh1Iomrv6U+JuNwaHXsXx9bLu5gG7BUWFIN0skIQJQ/L1rIex4X6w==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/express": { + "version": "4.17.25", + "resolved": "https://registry.npmjs.org/@types/express/-/express-4.17.25.tgz", + "integrity": "sha512-dVd04UKsfpINUnK0yBoYHDF3xu7xVH4BuDotC/xGuycx4CgbP48X/KF/586bcObxT0HENHXEU8Nqtu6NR+eKhw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/body-parser": "*", + "@types/express-serve-static-core": "^4.17.33", + "@types/qs": "*", + "@types/serve-static": "^1" + } + }, + "node_modules/@types/express-serve-static-core": { + "version": "4.19.7", + "resolved": "https://registry.npmjs.org/@types/express-serve-static-core/-/express-serve-static-core-4.19.7.tgz", + "integrity": "sha512-FvPtiIf1LfhzsaIXhv/PHan/2FeQBbtBDtfX2QfvPxdUelMDEckK08SM6nqo1MIZY3RUlfA+HV8+hFUSio78qg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/node": "*", + "@types/qs": "*", + "@types/range-parser": "*", + "@types/send": "*" + } + }, + "node_modules/@types/graceful-fs": { + "version": "4.1.9", + "resolved": "https://registry.npmjs.org/@types/graceful-fs/-/graceful-fs-4.1.9.tgz", + "integrity": "sha512-olP3sd1qOEe5dXTSaFvQG+02VdRXcdytWLAZsAq1PecU8uqQAhkrnbli7DagjtXKW/Bl7YJbUsa8MPcuc8LHEQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/@types/http-errors": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@types/http-errors/-/http-errors-2.0.5.tgz", + "integrity": "sha512-r8Tayk8HJnX0FztbZN7oVqGccWgw98T/0neJphO91KkmOzug1KkofZURD4UaD5uH8AqcFLfdPErnBod0u71/qg==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/istanbul-lib-coverage": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.6.tgz", + "integrity": "sha512-2QF/t/auWm0lsy8XtKVPG19v3sSOQlJe/YHZgfjb/KBBHOGSV+J2q/S671rcq9uTBrLAXmZpqJiaQbMT+zNU1w==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/istanbul-lib-report": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/@types/istanbul-lib-report/-/istanbul-lib-report-3.0.3.tgz", + "integrity": "sha512-NQn7AHQnk/RSLOxrBbGyJM/aVQ+pjj5HCgasFxc0K/KhoATfQ/47AyUl15I2yBUpihjmas+a+VJBOqecrFH+uA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/istanbul-lib-coverage": "*" + } + }, + "node_modules/@types/istanbul-reports": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/@types/istanbul-reports/-/istanbul-reports-3.0.4.tgz", + "integrity": "sha512-pk2B1NWalF9toCRu6gjBzR69syFjP4Od8WRAX+0mmf9lAjCRicLOWc+ZrxZHx/0XRjotgkF9t6iaMJ+aXcOdZQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/istanbul-lib-report": "*" + } + }, + "node_modules/@types/jest": { + "version": "29.5.14", + "resolved": "https://registry.npmjs.org/@types/jest/-/jest-29.5.14.tgz", + "integrity": "sha512-ZN+4sdnLUbo8EVvVc2ao0GFW6oVrQRPn4K2lglySj7APvSrgzxHiNNK99us4WDMi57xxA2yggblIAMNhXOotLQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "expect": "^29.0.0", + "pretty-format": "^29.0.0" + } + }, + "node_modules/@types/json-schema": { + "version": "7.0.15", + "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.15.tgz", + "integrity": "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/jsonwebtoken": { + "version": "9.0.10", + "resolved": "https://registry.npmjs.org/@types/jsonwebtoken/-/jsonwebtoken-9.0.10.tgz", + "integrity": "sha512-asx5hIG9Qmf/1oStypjanR7iKTv0gXQ1Ov/jfrX6kS/EO0OFni8orbmGCn0672NHR3kXHwpAwR+B368ZGN/2rA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/ms": "*", + "@types/node": "*" + } + }, + "node_modules/@types/methods": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/@types/methods/-/methods-1.1.4.tgz", + "integrity": "sha512-ymXWVrDiCxTBE3+RIrrP533E70eA+9qu7zdWoHuOmGujkYtzf4HQF96b8nwHLqhuf4ykX61IGRIB38CC6/sImQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/mime": { + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/@types/mime/-/mime-1.3.5.tgz", + "integrity": "sha512-/pyBZWSLD2n0dcHE3hq8s8ZvcETHtEuF+3E7XVt0Ig2nvsVQXdghHVcEkIWjy9A0wKfTn97a/PSDYohKIlnP/w==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/ms": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/@types/ms/-/ms-2.1.0.tgz", + "integrity": "sha512-GsCCIZDE/p3i96vtEqx+7dBUGXrc7zeSK3wwPHIaRThS+9OhWIXRqzs4d6k1SVU8g91DrNRWxWUGhp5KXQb2VA==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/node": { + "version": "20.19.25", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.19.25.tgz", + "integrity": "sha512-ZsJzA5thDQMSQO788d7IocwwQbI8B5OPzmqNvpf3NY/+MHDAS759Wo0gd2WQeXYt5AAAQjzcrTVC6SKCuYgoCQ==", + "license": "MIT", + "peer": true, + "dependencies": { + "undici-types": "~6.21.0" + } + }, + "node_modules/@types/passport": { + "version": "1.0.17", + "resolved": "https://registry.npmjs.org/@types/passport/-/passport-1.0.17.tgz", + "integrity": "sha512-aciLyx+wDwT2t2/kJGJR2AEeBz0nJU4WuRX04Wu9Dqc5lSUtwu0WERPHYsLhF9PtseiAMPBGNUOtFjxZ56prsg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/express": "*" + } + }, + "node_modules/@types/passport-jwt": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/@types/passport-jwt/-/passport-jwt-4.0.1.tgz", + "integrity": "sha512-Y0Ykz6nWP4jpxgEUYq8NoVZeCQPo1ZndJLfapI249g1jHChvRfZRO/LS3tqu26YgAS/laI1qx98sYGz0IalRXQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/jsonwebtoken": "*", + "@types/passport-strategy": "*" + } + }, + "node_modules/@types/passport-strategy": { + "version": "0.2.38", + "resolved": "https://registry.npmjs.org/@types/passport-strategy/-/passport-strategy-0.2.38.tgz", + "integrity": "sha512-GC6eMqqojOooq993Tmnmp7AUTbbQSgilyvpCYQjT+H6JfG/g6RGc7nXEniZlp0zyKJ0WUdOiZWLBZft9Yug1uA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/express": "*", + "@types/passport": "*" + } + }, + "node_modules/@types/qs": { + "version": "6.14.0", + "resolved": "https://registry.npmjs.org/@types/qs/-/qs-6.14.0.tgz", + "integrity": "sha512-eOunJqu0K1923aExK6y8p6fsihYEn/BYuQ4g0CxAAgFc4b/ZLN4CrsRZ55srTdqoiLzU2B2evC+apEIxprEzkQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/range-parser": { + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/@types/range-parser/-/range-parser-1.2.7.tgz", + "integrity": "sha512-hKormJbkJqzQGhziax5PItDUTMAM9uE2XXQmM37dyd4hVM+5aVl7oVxMVUiVQn2oCQFN/LKCZdvSM0pFRqbSmQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/semver": { + "version": "7.7.1", + "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.7.1.tgz", + "integrity": "sha512-FmgJfu+MOcQ370SD0ev7EI8TlCAfKYU+B4m5T3yXc1CiRN94g/SZPtsCkk506aUDtlMnFZvasDwHHUcZUEaYuA==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/send": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@types/send/-/send-1.2.1.tgz", + "integrity": "sha512-arsCikDvlU99zl1g69TcAB3mzZPpxgw0UQnaHeC1Nwb015xp8bknZv5rIfri9xTOcMuaVgvabfIRA7PSZVuZIQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/@types/serve-static": { + "version": "1.15.10", + "resolved": "https://registry.npmjs.org/@types/serve-static/-/serve-static-1.15.10.tgz", + "integrity": "sha512-tRs1dB+g8Itk72rlSI2ZrW6vZg0YrLI81iQSTkMmOqnqCaNr/8Ek4VwWcN5vZgCYWbg/JJSGBlUaYGAOP73qBw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/http-errors": "*", + "@types/node": "*", + "@types/send": "<1" + } + }, + "node_modules/@types/serve-static/node_modules/@types/send": { + "version": "0.17.6", + "resolved": "https://registry.npmjs.org/@types/send/-/send-0.17.6.tgz", + "integrity": "sha512-Uqt8rPBE8SY0RK8JB1EzVOIZ32uqy8HwdxCnoCOsYrvnswqmFZ/k+9Ikidlk/ImhsdvBsloHbAlewb2IEBV/Og==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/mime": "^1", + "@types/node": "*" + } + }, + "node_modules/@types/stack-utils": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/@types/stack-utils/-/stack-utils-2.0.3.tgz", + "integrity": "sha512-9aEbYZ3TbYMznPdcdr3SmIrLXwC/AKZXQeCf9Pgao5CKb8CyHuEX5jzWPTkvregvhRJHcpRO6BFoGW9ycaOkYw==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/superagent": { + "version": "8.1.9", + "resolved": "https://registry.npmjs.org/@types/superagent/-/superagent-8.1.9.tgz", + "integrity": "sha512-pTVjI73witn+9ILmoJdajHGW2jkSaOzhiFYF1Rd3EQ94kymLqB9PjD9ISg7WaALC7+dCHT0FGe9T2LktLq/3GQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/cookiejar": "^2.1.5", + "@types/methods": "^1.1.4", + "@types/node": "*", + "form-data": "^4.0.0" + } + }, + "node_modules/@types/supertest": { + "version": "2.0.16", + "resolved": "https://registry.npmjs.org/@types/supertest/-/supertest-2.0.16.tgz", + "integrity": "sha512-6c2ogktZ06tr2ENoZivgm7YnprnhYE4ZoXGMY+oA7IuAf17M8FWvujXZGmxLv8y0PTyts4x5A+erSwVUFA8XSg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/superagent": "*" + } + }, + "node_modules/@types/uuid": { + "version": "9.0.8", + "resolved": "https://registry.npmjs.org/@types/uuid/-/uuid-9.0.8.tgz", + "integrity": "sha512-jg+97EGIcY9AGHJJRaaPVgetKDsrTgbRjQ5Msgjh/DQKEFl0DtyRr/VCOyD1T2R1MNeWPK/u7JoGhlDZnKBAfA==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/validator": { + "version": "13.15.10", + "resolved": "https://registry.npmjs.org/@types/validator/-/validator-13.15.10.tgz", + "integrity": "sha512-T8L6i7wCuyoK8A/ZeLYt1+q0ty3Zb9+qbSSvrIVitzT3YjZqkTZ40IbRsPanlB4h1QB3JVL1SYCdR6ngtFYcuA==", + "license": "MIT" + }, + "node_modules/@types/yargs": { + "version": "17.0.35", + "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-17.0.35.tgz", + "integrity": "sha512-qUHkeCyQFxMXg79wQfTtfndEC+N9ZZg76HJftDJp+qH2tV7Gj4OJi7l+PiWwJ+pWtW8GwSmqsDj/oymhrTWXjg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/yargs-parser": "*" + } + }, + "node_modules/@types/yargs-parser": { + "version": "21.0.3", + "resolved": "https://registry.npmjs.org/@types/yargs-parser/-/yargs-parser-21.0.3.tgz", + "integrity": "sha512-I4q9QU9MQv4oEOz4tAHJtNz1cwuLxn2F3xcc2iV5WdqLPpUnj30aUuxt1mAxYTG+oe8CZMV/+6rU4S4gRDzqtQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/@typescript-eslint/eslint-plugin": { + "version": "6.21.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-6.21.0.tgz", + "integrity": "sha512-oy9+hTPCUFpngkEZUSzbf9MxI65wbKFoQYsgPdILTfbUldp5ovUuphZVe4i30emU9M/kP+T64Di0mxl7dSw3MA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@eslint-community/regexpp": "^4.5.1", + "@typescript-eslint/scope-manager": "6.21.0", + "@typescript-eslint/type-utils": "6.21.0", + "@typescript-eslint/utils": "6.21.0", + "@typescript-eslint/visitor-keys": "6.21.0", + "debug": "^4.3.4", + "graphemer": "^1.4.0", + "ignore": "^5.2.4", + "natural-compare": "^1.4.0", + "semver": "^7.5.4", + "ts-api-utils": "^1.0.1" + }, + "engines": { + "node": "^16.0.0 || >=18.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "@typescript-eslint/parser": "^6.0.0 || ^6.0.0-alpha", + "eslint": "^7.0.0 || ^8.0.0" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/@typescript-eslint/parser": { + "version": "6.21.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-6.21.0.tgz", + "integrity": "sha512-tbsV1jPne5CkFQCgPBcDOt30ItF7aJoZL997JSF7MhGQqOeT3svWRYxiqlfA5RUdlHN6Fi+EI9bxqbdyAUZjYQ==", + "dev": true, + "license": "BSD-2-Clause", + "peer": true, + "dependencies": { + "@typescript-eslint/scope-manager": "6.21.0", + "@typescript-eslint/types": "6.21.0", + "@typescript-eslint/typescript-estree": "6.21.0", + "@typescript-eslint/visitor-keys": "6.21.0", + "debug": "^4.3.4" + }, + "engines": { + "node": "^16.0.0 || >=18.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^7.0.0 || ^8.0.0" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/@typescript-eslint/scope-manager": { + "version": "6.21.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-6.21.0.tgz", + "integrity": "sha512-OwLUIWZJry80O99zvqXVEioyniJMa+d2GrqpUTqi5/v5D5rOrppJVBPa0yKCblcigC0/aYAzxxqQ1B+DS2RYsg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/types": "6.21.0", + "@typescript-eslint/visitor-keys": "6.21.0" + }, + "engines": { + "node": "^16.0.0 || >=18.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/type-utils": { + "version": "6.21.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-6.21.0.tgz", + "integrity": "sha512-rZQI7wHfao8qMX3Rd3xqeYSMCL3SoiSQLBATSiVKARdFGCYSRvmViieZjqc58jKgs8Y8i9YvVVhRbHSTA4VBag==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/typescript-estree": "6.21.0", + "@typescript-eslint/utils": "6.21.0", + "debug": "^4.3.4", + "ts-api-utils": "^1.0.1" + }, + "engines": { + "node": "^16.0.0 || >=18.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^7.0.0 || ^8.0.0" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/@typescript-eslint/types": { + "version": "6.21.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-6.21.0.tgz", + "integrity": "sha512-1kFmZ1rOm5epu9NZEZm1kckCDGj5UJEf7P1kliH4LKu/RkwpsfqqGmY2OOcUs18lSlQBKLDYBOGxRVtrMN5lpg==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^16.0.0 || >=18.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/typescript-estree": { + "version": "6.21.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-6.21.0.tgz", + "integrity": "sha512-6npJTkZcO+y2/kr+z0hc4HwNfrrP4kNYh57ek7yCNlrBjWQ1Y0OS7jiZTkgumrvkX5HkEKXFZkkdFNkaW2wmUQ==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "@typescript-eslint/types": "6.21.0", + "@typescript-eslint/visitor-keys": "6.21.0", + "debug": "^4.3.4", + "globby": "^11.1.0", + "is-glob": "^4.0.3", + "minimatch": "9.0.3", + "semver": "^7.5.4", + "ts-api-utils": "^1.0.1" + }, + "engines": { + "node": "^16.0.0 || >=18.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/@typescript-eslint/utils": { + "version": "6.21.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-6.21.0.tgz", + "integrity": "sha512-NfWVaC8HP9T8cbKQxHcsJBY5YE1O33+jpMwN45qzWWaPDZgLIbo12toGMWnmhvCpd3sIxkpDw3Wv1B3dYrbDQQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@eslint-community/eslint-utils": "^4.4.0", + "@types/json-schema": "^7.0.12", + "@types/semver": "^7.5.0", + "@typescript-eslint/scope-manager": "6.21.0", + "@typescript-eslint/types": "6.21.0", + "@typescript-eslint/typescript-estree": "6.21.0", + "semver": "^7.5.4" + }, + "engines": { + "node": "^16.0.0 || >=18.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^7.0.0 || ^8.0.0" + } + }, + "node_modules/@typescript-eslint/visitor-keys": { + "version": "6.21.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-6.21.0.tgz", + "integrity": "sha512-JJtkDduxLi9bivAB+cYOVMtbkqdPOhZ+ZI5LC47MIRrDV4Yn2o+ZnW10Nkmr28xRpSpdJ6Sm42Hjf2+REYXm0A==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/types": "6.21.0", + "eslint-visitor-keys": "^3.4.1" + }, + "engines": { + "node": "^16.0.0 || >=18.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@ungap/structured-clone": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/@ungap/structured-clone/-/structured-clone-1.3.0.tgz", + "integrity": "sha512-WmoN8qaIAo7WTYWbAZuG8PYEhn5fkz7dZrqTBZ7dtt//lL2Gwms1IcnQ5yHqjDfX8Ft5j4YzDM23f87zBfDe9g==", + "dev": true, + "license": "ISC" + }, + "node_modules/@webassemblyjs/ast": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.14.1.tgz", + "integrity": "sha512-nuBEDgQfm1ccRp/8bCQrx1frohyufl4JlbMMZ4P1wpeOfDhF6FQkxZJ1b/e+PLwr6X1Nhw6OLme5usuBWYBvuQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@webassemblyjs/helper-numbers": "1.13.2", + "@webassemblyjs/helper-wasm-bytecode": "1.13.2" + } + }, + "node_modules/@webassemblyjs/floating-point-hex-parser": { + "version": "1.13.2", + "resolved": "https://registry.npmjs.org/@webassemblyjs/floating-point-hex-parser/-/floating-point-hex-parser-1.13.2.tgz", + "integrity": "sha512-6oXyTOzbKxGH4steLbLNOu71Oj+C8Lg34n6CqRvqfS2O71BxY6ByfMDRhBytzknj9yGUPVJ1qIKhRlAwO1AovA==", + "dev": true, + "license": "MIT" + }, + "node_modules/@webassemblyjs/helper-api-error": { + "version": "1.13.2", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-api-error/-/helper-api-error-1.13.2.tgz", + "integrity": "sha512-U56GMYxy4ZQCbDZd6JuvvNV/WFildOjsaWD3Tzzvmw/mas3cXzRJPMjP83JqEsgSbyrmaGjBfDtV7KDXV9UzFQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/@webassemblyjs/helper-buffer": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-buffer/-/helper-buffer-1.14.1.tgz", + "integrity": "sha512-jyH7wtcHiKssDtFPRB+iQdxlDf96m0E39yb0k5uJVhFGleZFoNw1c4aeIcVUPPbXUVJ94wwnMOAqUHyzoEPVMA==", + "dev": true, + "license": "MIT" + }, + "node_modules/@webassemblyjs/helper-numbers": { + "version": "1.13.2", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-numbers/-/helper-numbers-1.13.2.tgz", + "integrity": "sha512-FE8aCmS5Q6eQYcV3gI35O4J789wlQA+7JrqTTpJqn5emA4U2hvwJmvFRC0HODS+3Ye6WioDklgd6scJ3+PLnEA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@webassemblyjs/floating-point-hex-parser": "1.13.2", + "@webassemblyjs/helper-api-error": "1.13.2", + "@xtuc/long": "4.2.2" + } + }, + "node_modules/@webassemblyjs/helper-wasm-bytecode": { + "version": "1.13.2", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-bytecode/-/helper-wasm-bytecode-1.13.2.tgz", + "integrity": "sha512-3QbLKy93F0EAIXLh0ogEVR6rOubA9AoZ+WRYhNbFyuB70j3dRdwH9g+qXhLAO0kiYGlg3TxDV+I4rQTr/YNXkA==", + "dev": true, + "license": "MIT" + }, + "node_modules/@webassemblyjs/helper-wasm-section": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.14.1.tgz", + "integrity": "sha512-ds5mXEqTJ6oxRoqjhWDU83OgzAYjwsCV8Lo/N+oRsNDmx/ZDpqalmrtgOMkHwxsG0iI//3BwWAErYRHtgn0dZw==", + "dev": true, + "license": "MIT", + "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" + } + }, + "node_modules/@webassemblyjs/ieee754": { + "version": "1.13.2", + "resolved": "https://registry.npmjs.org/@webassemblyjs/ieee754/-/ieee754-1.13.2.tgz", + "integrity": "sha512-4LtOzh58S/5lX4ITKxnAK2USuNEvpdVV9AlgGQb8rJDHaLeHciwG4zlGr0j/SNWlr7x3vO1lDEsuePvtcDNCkw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@xtuc/ieee754": "^1.2.0" + } + }, + "node_modules/@webassemblyjs/leb128": { + "version": "1.13.2", + "resolved": "https://registry.npmjs.org/@webassemblyjs/leb128/-/leb128-1.13.2.tgz", + "integrity": "sha512-Lde1oNoIdzVzdkNEAWZ1dZ5orIbff80YPdHx20mrHwHrVNNTjNr8E3xz9BdpcGqRQbAEa+fkrCb+fRFTl/6sQw==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@xtuc/long": "4.2.2" + } + }, + "node_modules/@webassemblyjs/utf8": { + "version": "1.13.2", + "resolved": "https://registry.npmjs.org/@webassemblyjs/utf8/-/utf8-1.13.2.tgz", + "integrity": "sha512-3NQWGjKTASY1xV5m7Hr0iPeXD9+RDobLll3T9d2AO+g3my8xy5peVyjSag4I50mR1bBSN/Ct12lo+R9tJk0NZQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/@webassemblyjs/wasm-edit": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-edit/-/wasm-edit-1.14.1.tgz", + "integrity": "sha512-RNJUIQH/J8iA/1NzlE4N7KtyZNHi3w7at7hDjvRNm5rcUXa00z1vRz3glZoULfJ5mpvYhLybmVcwcjGrC1pRrQ==", + "dev": true, + "license": "MIT", + "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" + } + }, + "node_modules/@webassemblyjs/wasm-gen": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-gen/-/wasm-gen-1.14.1.tgz", + "integrity": "sha512-AmomSIjP8ZbfGQhumkNvgC33AY7qtMCXnN6bL2u2Js4gVCg8fp735aEiMSBbDR7UQIj90n4wKAFUSEd0QN2Ukg==", + "dev": true, + "license": "MIT", + "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" + } + }, + "node_modules/@webassemblyjs/wasm-opt": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-opt/-/wasm-opt-1.14.1.tgz", + "integrity": "sha512-PTcKLUNvBqnY2U6E5bdOQcSM+oVP/PmrDY9NzowJjislEjwP/C4an2303MCVS2Mg9d3AJpIGdUFIQQWbPds0Sw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@webassemblyjs/ast": "1.14.1", + "@webassemblyjs/helper-buffer": "1.14.1", + "@webassemblyjs/wasm-gen": "1.14.1", + "@webassemblyjs/wasm-parser": "1.14.1" + } + }, + "node_modules/@webassemblyjs/wasm-parser": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-parser/-/wasm-parser-1.14.1.tgz", + "integrity": "sha512-JLBl+KZ0R5qB7mCnud/yyX08jWFw5MsoalJ1pQ4EdFlgj9VdXKGuENGsiCIjegI1W7p91rUlcB/LB5yRJKNTcQ==", + "dev": true, + "license": "MIT", + "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" + } + }, + "node_modules/@webassemblyjs/wast-printer": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wast-printer/-/wast-printer-1.14.1.tgz", + "integrity": "sha512-kPSSXE6De1XOR820C90RIo2ogvZG+c3KiHzqUoO/F34Y2shGzesfqv7o57xrxovZJH/MetF5UjroJ/R/3isoiw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@webassemblyjs/ast": "1.14.1", + "@xtuc/long": "4.2.2" + } + }, + "node_modules/@xtuc/ieee754": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@xtuc/ieee754/-/ieee754-1.2.0.tgz", + "integrity": "sha512-DX8nKgqcGwsc0eJSqYt5lwP4DH5FlHnmuWWBRy7X0NcaGR0ZtuyeESgMwTYVEtxmsNGY+qit4QYT/MIYTOTPeA==", + "dev": true, + "license": "BSD-3-Clause" + }, + "node_modules/@xtuc/long": { + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/@xtuc/long/-/long-4.2.2.tgz", + "integrity": "sha512-NuHqBY1PB/D8xU6s/thBgOAiAP7HOYDQ32+BFZILJ8ivkUkAHQnWfn6WhL79Owj1qmUnoN/YPhktdIoucipkAQ==", + "dev": true, + "license": "Apache-2.0" + }, + "node_modules/accepts": { + "version": "1.3.8", + "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.8.tgz", + "integrity": "sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw==", + "license": "MIT", + "dependencies": { + "mime-types": "~2.1.34", + "negotiator": "0.6.3" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/acorn": { + "version": "8.15.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.15.0.tgz", + "integrity": "sha512-NZyJarBfL7nWwIq+FDL6Zp/yHEhePMNnnJ0y3qfieCrmNvYct8uvtiV41UvlSe6apAfk0fY1FbWx+NwfmpvtTg==", + "dev": true, + "license": "MIT", + "peer": true, + "bin": { + "acorn": "bin/acorn" + }, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/acorn-import-phases": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/acorn-import-phases/-/acorn-import-phases-1.0.4.tgz", + "integrity": "sha512-wKmbr/DDiIXzEOiWrTTUcDm24kQ2vGfZQvM2fwg2vXqR5uW6aapr7ObPtj1th32b9u90/Pf4AItvdTh42fBmVQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10.13.0" + }, + "peerDependencies": { + "acorn": "^8.14.0" + } + }, + "node_modules/acorn-jsx": { + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", + "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==", + "dev": true, + "license": "MIT", + "peerDependencies": { + "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" + } + }, + "node_modules/acorn-walk": { + "version": "8.3.4", + "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.3.4.tgz", + "integrity": "sha512-ueEepnujpqee2o5aIYnvHU6C0A42MNdsIDeqy5BydrkuC5R1ZuUFnm27EeFJGoEHJQgn3uleRvmTXaJgfXbt4g==", + "dev": true, + "license": "MIT", + "dependencies": { + "acorn": "^8.11.0" + }, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/ajv": { + "version": "8.12.0", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.12.0.tgz", + "integrity": "sha512-sRu1kpcO9yLtYxBKvqfTeh9KzZEwO3STyX1HT+4CaDzC6HpTGYhIhPIzj9XuKU7KYDwnaeh5hcOwjy1QuJzBPA==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "fast-deep-equal": "^3.1.1", + "json-schema-traverse": "^1.0.0", + "require-from-string": "^2.0.2", + "uri-js": "^4.2.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, + "node_modules/ajv-formats": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ajv-formats/-/ajv-formats-2.1.1.tgz", + "integrity": "sha512-Wx0Kx52hxE7C18hkMEggYlEifqWZtYaRgouJor+WMdPnQyEK13vgEWyVNup7SoeeoLMsr4kf5h6dOW11I15MUA==", + "dev": true, + "license": "MIT", + "dependencies": { + "ajv": "^8.0.0" + }, + "peerDependencies": { + "ajv": "^8.0.0" + }, + "peerDependenciesMeta": { + "ajv": { + "optional": true + } + } + }, + "node_modules/ajv-keywords": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-5.1.0.tgz", + "integrity": "sha512-YCS/JNFAUyr5vAuhk1DWm1CBxRHW9LbJ2ozWeemrIqpbsqKjHVxYPyi5GC0rjZIT5JxJ3virVTS8wk4i/Z+krw==", + "dev": true, + "license": "MIT", + "dependencies": { + "fast-deep-equal": "^3.1.3" + }, + "peerDependencies": { + "ajv": "^8.8.2" + } + }, + "node_modules/ansi-colors": { + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.3.tgz", + "integrity": "sha512-/6w/C21Pm1A7aZitlI5Ni/2J6FFQN8i1Cvz3kHABAAbw93v/NlvKdVOqz7CCWz/3iv/JplRSEEZ83XION15ovw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/ansi-escapes": { + "version": "4.3.2", + "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.2.tgz", + "integrity": "sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "type-fest": "^0.21.3" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/ansi-escapes/node_modules/type-fest": { + "version": "0.21.3", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.21.3.tgz", + "integrity": "sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==", + "dev": true, + "license": "(MIT OR CC0-1.0)", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "license": "MIT", + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/anymatch": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz", + "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==", + "dev": true, + "license": "ISC", + "dependencies": { + "normalize-path": "^3.0.0", + "picomatch": "^2.0.4" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/anymatch/node_modules/picomatch": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/append-field": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/append-field/-/append-field-1.0.0.tgz", + "integrity": "sha512-klpgFSWLW1ZEs8svjfb7g4qWY0YS5imI82dTg+QahUvJ8YqAY0P10Uk8tTyh9ZGuYEZEMaeJYCF5BFuX552hsw==", + "license": "MIT" + }, + "node_modules/arg": { + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/arg/-/arg-4.1.3.tgz", + "integrity": "sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==", + "dev": true, + "license": "MIT" + }, + "node_modules/argparse": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", + "license": "Python-2.0" + }, + "node_modules/array-flatten": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", + "integrity": "sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg==", + "license": "MIT" + }, + "node_modules/array-timsort": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/array-timsort/-/array-timsort-1.0.3.tgz", + "integrity": "sha512-/+3GRL7dDAGEfM6TseQk/U+mi18TU2Ms9I3UlLdUMhz2hbvGNTKdj9xniwXfUqgYhHxRx0+8UnKkvlNwVU+cWQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/array-union": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz", + "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/asap": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/asap/-/asap-2.0.6.tgz", + "integrity": "sha512-BSHWgDSAiKs50o2Re8ppvp3seVHXSRM44cdSsT9FfNEUUZLOGWVCsiWaRPWM1Znn+mqZ1OfVZ3z3DWEzSp7hRA==", + "dev": true, + "license": "MIT" + }, + "node_modules/asynckit": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", + "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==", + "license": "MIT" + }, + "node_modules/axios": { + "version": "1.13.2", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.13.2.tgz", + "integrity": "sha512-VPk9ebNqPcy5lRGuSlKx752IlDatOjT9paPlm8A7yOuW2Fbvp4X3JznJtT4f0GzGLLiWE9W8onz51SqLYwzGaA==", + "license": "MIT", + "peer": true, + "dependencies": { + "follow-redirects": "^1.15.6", + "form-data": "^4.0.4", + "proxy-from-env": "^1.1.0" + } + }, + "node_modules/babel-jest": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/babel-jest/-/babel-jest-29.7.0.tgz", + "integrity": "sha512-BrvGY3xZSwEcCzKvKsCi2GgHqDqsYkOP4/by5xCgIwGXQxIEh+8ew3gmrE1y7XRR6LHZIj6yLYnUi/mm2KXKBg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/transform": "^29.7.0", + "@types/babel__core": "^7.1.14", + "babel-plugin-istanbul": "^6.1.1", + "babel-preset-jest": "^29.6.3", + "chalk": "^4.0.0", + "graceful-fs": "^4.2.9", + "slash": "^3.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + }, + "peerDependencies": { + "@babel/core": "^7.8.0" + } + }, + "node_modules/babel-plugin-istanbul": { + "version": "6.1.1", + "resolved": "https://registry.npmjs.org/babel-plugin-istanbul/-/babel-plugin-istanbul-6.1.1.tgz", + "integrity": "sha512-Y1IQok9821cC9onCx5otgFfRm7Lm+I+wwxOx738M/WLPZ9Q42m4IG5W0FNX8WLL2gYMZo3JkuXIH2DOpWM+qwA==", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "@babel/helper-plugin-utils": "^7.0.0", + "@istanbuljs/load-nyc-config": "^1.0.0", + "@istanbuljs/schema": "^0.1.2", + "istanbul-lib-instrument": "^5.0.4", + "test-exclude": "^6.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/babel-plugin-istanbul/node_modules/istanbul-lib-instrument": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-5.2.1.tgz", + "integrity": "sha512-pzqtp31nLv/XFOzXGuvhCb8qhjmTVo5vjVk19XE4CRlSWz0KoeJ3bw9XsA7nOp9YBf4qHjwBxkDzKcME/J29Yg==", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "@babel/core": "^7.12.3", + "@babel/parser": "^7.14.7", + "@istanbuljs/schema": "^0.1.2", + "istanbul-lib-coverage": "^3.2.0", + "semver": "^6.3.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/babel-plugin-istanbul/node_modules/semver": { + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", + "dev": true, + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + } + }, + "node_modules/babel-plugin-jest-hoist": { + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-29.6.3.tgz", + "integrity": "sha512-ESAc/RJvGTFEzRwOTT4+lNDk/GNHMkKbNzsvT0qKRfDyyYTskxB5rnU2njIDYVxXCBHHEI1c0YwHob3WaYujOg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/template": "^7.3.3", + "@babel/types": "^7.3.3", + "@types/babel__core": "^7.1.14", + "@types/babel__traverse": "^7.0.6" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/babel-preset-current-node-syntax": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/babel-preset-current-node-syntax/-/babel-preset-current-node-syntax-1.2.0.tgz", + "integrity": "sha512-E/VlAEzRrsLEb2+dv8yp3bo4scof3l9nR4lrld+Iy5NyVqgVYUJnDAmunkhPMisRI32Qc4iRiz425d8vM++2fg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/plugin-syntax-async-generators": "^7.8.4", + "@babel/plugin-syntax-bigint": "^7.8.3", + "@babel/plugin-syntax-class-properties": "^7.12.13", + "@babel/plugin-syntax-class-static-block": "^7.14.5", + "@babel/plugin-syntax-import-attributes": "^7.24.7", + "@babel/plugin-syntax-import-meta": "^7.10.4", + "@babel/plugin-syntax-json-strings": "^7.8.3", + "@babel/plugin-syntax-logical-assignment-operators": "^7.10.4", + "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.3", + "@babel/plugin-syntax-numeric-separator": "^7.10.4", + "@babel/plugin-syntax-object-rest-spread": "^7.8.3", + "@babel/plugin-syntax-optional-catch-binding": "^7.8.3", + "@babel/plugin-syntax-optional-chaining": "^7.8.3", + "@babel/plugin-syntax-private-property-in-object": "^7.14.5", + "@babel/plugin-syntax-top-level-await": "^7.14.5" + }, + "peerDependencies": { + "@babel/core": "^7.0.0 || ^8.0.0-0" + } + }, + "node_modules/babel-preset-jest": { + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/babel-preset-jest/-/babel-preset-jest-29.6.3.tgz", + "integrity": "sha512-0B3bhxR6snWXJZtR/RliHTDPRgn1sNHOR0yVtq/IiQFyuOVjFS+wuio/R4gSNkyYmKmJB4wGZv2NZanmKmTnNA==", + "dev": true, + "license": "MIT", + "dependencies": { + "babel-plugin-jest-hoist": "^29.6.3", + "babel-preset-current-node-syntax": "^1.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" + } + }, + "node_modules/balanced-match": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", + "dev": true, + "license": "MIT" + }, + "node_modules/base64-js": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", + "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT" + }, + "node_modules/baseline-browser-mapping": { + "version": "2.8.32", + "resolved": "https://registry.npmjs.org/baseline-browser-mapping/-/baseline-browser-mapping-2.8.32.tgz", + "integrity": "sha512-OPz5aBThlyLFgxyhdwf/s2+8ab3OvT7AdTNvKHBwpXomIYeXqpUUuT8LrdtxZSsWJ4R4CU1un4XGh5Ez3nlTpw==", + "dev": true, + "license": "Apache-2.0", + "bin": { + "baseline-browser-mapping": "dist/cli.js" + } + }, + "node_modules/binary-extensions": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.3.0.tgz", + "integrity": "sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/bl": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/bl/-/bl-4.1.0.tgz", + "integrity": "sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==", + "dev": true, + "license": "MIT", + "dependencies": { + "buffer": "^5.5.0", + "inherits": "^2.0.4", + "readable-stream": "^3.4.0" + } + }, + "node_modules/body-parser": { + "version": "1.20.3", + "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.3.tgz", + "integrity": "sha512-7rAxByjUMqQ3/bHJy7D6OGXvx/MMc4IqBn/X0fcM1QUcAItpZrBEYhWGem+tzXH90c+G01ypMcYJBO9Y30203g==", + "license": "MIT", + "dependencies": { + "bytes": "3.1.2", + "content-type": "~1.0.5", + "debug": "2.6.9", + "depd": "2.0.0", + "destroy": "1.2.0", + "http-errors": "2.0.0", + "iconv-lite": "0.4.24", + "on-finished": "2.4.1", + "qs": "6.13.0", + "raw-body": "2.5.2", + "type-is": "~1.6.18", + "unpipe": "1.0.0" + }, + "engines": { + "node": ">= 0.8", + "npm": "1.2.8000 || >= 1.4.16" + } + }, + "node_modules/body-parser/node_modules/debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "license": "MIT", + "dependencies": { + "ms": "2.0.0" + } + }, + "node_modules/body-parser/node_modules/ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", + "license": "MIT" + }, + "node_modules/brace-expansion": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.2.tgz", + "integrity": "sha512-Jt0vHyM+jmUBqojB7E1NIYadt0vI0Qxjxd2TErW94wDz+E2LAm5vKMXXwg6ZZBTHPuUlDgQHKXvjGBdfcF1ZDQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0" + } + }, + "node_modules/braces": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", + "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", + "dev": true, + "license": "MIT", + "dependencies": { + "fill-range": "^7.1.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/browserslist": { + "version": "4.28.0", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.28.0.tgz", + "integrity": "sha512-tbydkR/CxfMwelN0vwdP/pLkDwyAASZ+VfWm4EOwlB6SWhx1sYnWLqo8N5j0rAzPfzfRaxt0mM/4wPU/Su84RQ==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/browserslist" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "peer": true, + "dependencies": { + "baseline-browser-mapping": "^2.8.25", + "caniuse-lite": "^1.0.30001754", + "electron-to-chromium": "^1.5.249", + "node-releases": "^2.0.27", + "update-browserslist-db": "^1.1.4" + }, + "bin": { + "browserslist": "cli.js" + }, + "engines": { + "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7" + } + }, + "node_modules/bs-logger": { + "version": "0.2.6", + "resolved": "https://registry.npmjs.org/bs-logger/-/bs-logger-0.2.6.tgz", + "integrity": "sha512-pd8DCoxmbgc7hyPKOvxtqNcjYoOsABPQdcCUjGp3d42VR2CX1ORhk2A87oqqu5R1kk+76nsxZupkmyd+MVtCog==", + "dev": true, + "license": "MIT", + "dependencies": { + "fast-json-stable-stringify": "2.x" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/bser": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/bser/-/bser-2.1.1.tgz", + "integrity": "sha512-gQxTNE/GAfIIrmHLUE3oJyp5FO6HRBfhjnw4/wMmA63ZGDJnWBmgY/lyQBpnDUkGmAhbSe39tx2d/iTOAfglwQ==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "node-int64": "^0.4.0" + } + }, + "node_modules/buffer": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", + "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT", + "dependencies": { + "base64-js": "^1.3.1", + "ieee754": "^1.1.13" + } + }, + "node_modules/buffer-equal-constant-time": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/buffer-equal-constant-time/-/buffer-equal-constant-time-1.0.1.tgz", + "integrity": "sha512-zRpUiDwd/xk6ADqPMATG8vc9VPrkck7T07OIx0gnjmJAnHnTVXNQG3vfvWNuiZIkwu9KrKdA1iJKfsfTVxE6NA==", + "license": "BSD-3-Clause" + }, + "node_modules/buffer-from": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", + "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==", + "license": "MIT" + }, + "node_modules/busboy": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/busboy/-/busboy-1.6.0.tgz", + "integrity": "sha512-8SFQbg/0hQ9xy3UNTB0YEnsNBbWfhf7RtnzpL7TkBiTBRfrQ9Fxcnz7VJsleJpyp6rVLvXiuORqjlHi5q+PYuA==", + "dependencies": { + "streamsearch": "^1.1.0" + }, + "engines": { + "node": ">=10.16.0" + } + }, + "node_modules/bytes": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz", + "integrity": "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==", + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/call-bind": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.8.tgz", + "integrity": "sha512-oKlSFMcMwpUg2ednkhQ454wfWiU/ul3CkJe/PEHcTKuiX6RpbehUiFMXu13HalGZxfUwCQzZG747YXBn1im9ww==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind-apply-helpers": "^1.0.0", + "es-define-property": "^1.0.0", + "get-intrinsic": "^1.2.4", + "set-function-length": "^1.2.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/call-bind-apply-helpers": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/call-bind-apply-helpers/-/call-bind-apply-helpers-1.0.2.tgz", + "integrity": "sha512-Sp1ablJ0ivDkSzjcaJdxEunN5/XvksFJ2sMBFfq6x0ryhQV/2b/KwFe21cMpmHtPOSij8K99/wSfoEuTObmuMQ==", + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "function-bind": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/call-bound": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/call-bound/-/call-bound-1.0.4.tgz", + "integrity": "sha512-+ys997U96po4Kx/ABpBCqhA9EuxJaQWDQg7295H4hBphv3IZg0boBKuwYpt4YXp6MZ5AmZQnU/tyMTlRpaSejg==", + "license": "MIT", + "dependencies": { + "call-bind-apply-helpers": "^1.0.2", + "get-intrinsic": "^1.3.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/callsites": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", + "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/camelcase": { + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", + "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/caniuse-lite": { + "version": "1.0.30001757", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001757.tgz", + "integrity": "sha512-r0nnL/I28Zi/yjk1el6ilj27tKcdjLsNqAOZr0yVjWPrSQyHgKI2INaEWw21bAQSv2LXRt1XuCS/GomNpWOxsQ==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/caniuse-lite" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "CC-BY-4.0" + }, + "node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "license": "MIT", + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/char-regex": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/char-regex/-/char-regex-1.0.2.tgz", + "integrity": "sha512-kWWXztvZ5SBQV+eRgKFeh8q5sLuZY2+8WUIzlxWVTg+oGwY14qylx1KbKzHd8P6ZYkAg0xyIDU9JMHhyJMZ1jw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + } + }, + "node_modules/chardet": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/chardet/-/chardet-0.7.0.tgz", + "integrity": "sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA==", + "dev": true, + "license": "MIT" + }, + "node_modules/chokidar": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.6.0.tgz", + "integrity": "sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==", + "dev": true, + "license": "MIT", + "dependencies": { + "anymatch": "~3.1.2", + "braces": "~3.0.2", + "glob-parent": "~5.1.2", + "is-binary-path": "~2.1.0", + "is-glob": "~4.0.1", + "normalize-path": "~3.0.0", + "readdirp": "~3.6.0" + }, + "engines": { + "node": ">= 8.10.0" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + }, + "optionalDependencies": { + "fsevents": "~2.3.2" + } + }, + "node_modules/chrome-trace-event": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/chrome-trace-event/-/chrome-trace-event-1.0.4.tgz", + "integrity": "sha512-rNjApaLzuwaOTjCiT8lSDdGN1APCiqkChLMJxJPWLunPAt5fy8xgU9/jNOchV84wfIxrA0lRQB7oCT8jrn/wrQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.0" + } + }, + "node_modules/ci-info": { + "version": "3.9.0", + "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.9.0.tgz", + "integrity": "sha512-NIxF55hv4nSqQswkAeiOi1r83xy8JldOFDTWiug55KBu9Jnblncd2U6ViHmYgHf01TPZS77NJBhBMKdWj9HQMQ==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/sibiraj-s" + } + ], + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/cjs-module-lexer": { + "version": "1.4.3", + "resolved": "https://registry.npmjs.org/cjs-module-lexer/-/cjs-module-lexer-1.4.3.tgz", + "integrity": "sha512-9z8TZaGM1pfswYeXrUpzPrkx8UnWYdhJclsiYMm6x/w5+nN+8Tf/LnAgfLGQCm59qAOxU8WwHEq2vNwF6i4j+Q==", + "dev": true, + "license": "MIT" + }, + "node_modules/class-transformer": { + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/class-transformer/-/class-transformer-0.5.1.tgz", + "integrity": "sha512-SQa1Ws6hUbfC98vKGxZH3KFY0Y1lm5Zm0SY8XX9zbK7FJCyVEac3ATW0RIpwzW+oOfmHE5PMPufDG9hCfoEOMw==", + "license": "MIT", + "peer": true + }, + "node_modules/class-validator": { + "version": "0.14.3", + "resolved": "https://registry.npmjs.org/class-validator/-/class-validator-0.14.3.tgz", + "integrity": "sha512-rXXekcjofVN1LTOSw+u4u9WXVEUvNBVjORW154q/IdmYWy1nMbOU9aNtZB0t8m+FJQ9q91jlr2f9CwwUFdFMRA==", + "license": "MIT", + "peer": true, + "dependencies": { + "@types/validator": "^13.15.3", + "libphonenumber-js": "^1.11.1", + "validator": "^13.15.20" + } + }, + "node_modules/cli-cursor": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-3.1.0.tgz", + "integrity": "sha512-I/zHAwsKf9FqGoXM4WWRACob9+SNukZTd94DWF57E4toouRulbCxcUh6RKUEOQlYTHJnzkPMySvPNaaSLNfLZw==", + "dev": true, + "license": "MIT", + "dependencies": { + "restore-cursor": "^3.1.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/cli-spinners": { + "version": "2.9.2", + "resolved": "https://registry.npmjs.org/cli-spinners/-/cli-spinners-2.9.2.tgz", + "integrity": "sha512-ywqV+5MmyL4E7ybXgKys4DugZbX0FC6LnwrhjuykIjnK9k8OQacQ7axGKnjDXWNhns0xot3bZI5h55H8yo9cJg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/cli-table3": { + "version": "0.6.5", + "resolved": "https://registry.npmjs.org/cli-table3/-/cli-table3-0.6.5.tgz", + "integrity": "sha512-+W/5efTR7y5HRD7gACw9yQjqMVvEMLBHmboM/kPWam+H+Hmyrgjh6YncVKK122YZkXrLudzTuAukUw9FnMf7IQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "string-width": "^4.2.0" + }, + "engines": { + "node": "10.* || >= 12.*" + }, + "optionalDependencies": { + "@colors/colors": "1.5.0" + } + }, + "node_modules/cli-width": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/cli-width/-/cli-width-3.0.0.tgz", + "integrity": "sha512-FxqpkPPwu1HjuN93Omfm4h8uIanXofW0RxVEW3k5RKx+mJJYSthzNhp32Kzxxy3YAEZ/Dc/EWN1vZRY0+kOhbw==", + "dev": true, + "license": "ISC", + "engines": { + "node": ">= 10" + } + }, + "node_modules/cliui": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", + "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==", + "dev": true, + "license": "ISC", + "dependencies": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.1", + "wrap-ansi": "^7.0.0" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/cliui/node_modules/wrap-ansi": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/clone": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/clone/-/clone-1.0.4.tgz", + "integrity": "sha512-JQHZ2QMW6l3aH/j6xCqQThY/9OH4D/9ls34cgkUBiEeocRTU04tHfKPBsUK1PqZCUQM7GiA0IIXJSuXHI64Kbg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.8" + } + }, + "node_modules/co": { + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz", + "integrity": "sha512-QVb0dM5HvG+uaxitm8wONl7jltx8dqhfU33DcqtOZcLSVIKSDDLDi7+0LbAKiyI8hD9u42m2YxXSkMGWThaecQ==", + "dev": true, + "license": "MIT", + "engines": { + "iojs": ">= 1.0.0", + "node": ">= 0.12.0" + } + }, + "node_modules/collect-v8-coverage": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/collect-v8-coverage/-/collect-v8-coverage-1.0.3.tgz", + "integrity": "sha512-1L5aqIkwPfiodaMgQunkF1zRhNqifHBmtbbbxcr6yVxxBnliw4TDOW6NxpO8DJLgJ16OT+Y4ztZqP6p/FtXnAw==", + "dev": true, + "license": "MIT" + }, + "node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "license": "MIT", + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "license": "MIT" + }, + "node_modules/combined-stream": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", + "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", + "license": "MIT", + "dependencies": { + "delayed-stream": "~1.0.0" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/commander": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/commander/-/commander-4.1.1.tgz", + "integrity": "sha512-NOKm8xhkzAjzFx8B2v5OAHT+u5pRQc2UCa2Vq9jYL/31o2wi9mxBA7LIFs3sV5VSC49z6pEhfbMULvShKj26WA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 6" + } + }, + "node_modules/comment-json": { + "version": "4.2.5", + "resolved": "https://registry.npmjs.org/comment-json/-/comment-json-4.2.5.tgz", + "integrity": "sha512-bKw/r35jR3HGt5PEPm1ljsQQGyCrR8sFGNiN5L+ykDHdpO8Smxkrkla9Yi6NkQyUrb8V54PGhfMs6NrIwtxtdw==", + "dev": true, + "license": "MIT", + "dependencies": { + "array-timsort": "^1.0.3", + "core-util-is": "^1.0.3", + "esprima": "^4.0.1", + "has-own-prop": "^2.0.0", + "repeat-string": "^1.6.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/component-emitter": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.3.1.tgz", + "integrity": "sha512-T0+barUSQRTUQASh8bx02dl+DhF54GtIDY13Y3m9oWTklKbb3Wv974meRpeZ3lp1JpLVECWWNHC4vaG2XHXouQ==", + "dev": true, + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", + "dev": true, + "license": "MIT" + }, + "node_modules/concat-stream": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-2.0.0.tgz", + "integrity": "sha512-MWufYdFw53ccGjCA+Ol7XJYpAlW6/prSMzuPOTRnJGcGzuhLn4Scrz7qf6o8bROZ514ltazcIFJZevcfbo0x7A==", + "engines": [ + "node >= 6.0" + ], + "license": "MIT", + "dependencies": { + "buffer-from": "^1.0.0", + "inherits": "^2.0.3", + "readable-stream": "^3.0.2", + "typedarray": "^0.0.6" + } + }, + "node_modules/consola": { + "version": "2.15.3", + "resolved": "https://registry.npmjs.org/consola/-/consola-2.15.3.tgz", + "integrity": "sha512-9vAdYbHj6x2fLKC4+oPH0kFzY/orMZyG2Aj+kNylHxKGJ/Ed4dpNyAQYwJOdqO4zdM7XpVHmyejQDcQHrnuXbw==", + "license": "MIT" + }, + "node_modules/content-disposition": { + "version": "0.5.4", + "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.4.tgz", + "integrity": "sha512-FveZTNuGw04cxlAiWbzi6zTAL/lhehaWbTtgluJh4/E95DqMwTmha3KZN1aAWA8cFIhHzMZUvLevkw5Rqk+tSQ==", + "license": "MIT", + "dependencies": { + "safe-buffer": "5.2.1" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/content-type": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.5.tgz", + "integrity": "sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/convert-source-map": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-2.0.0.tgz", + "integrity": "sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==", + "dev": true, + "license": "MIT" + }, + "node_modules/cookie": { + "version": "0.7.1", + "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.7.1.tgz", + "integrity": "sha512-6DnInpx7SJ2AK3+CTUE/ZM0vWTUboZCegxhC2xiIydHR9jNuTAASBrfEpHhiGOZw/nX51bHt6YQl8jsGo4y/0w==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/cookie-signature": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz", + "integrity": "sha512-QADzlaHc8icV8I7vbaJXJwod9HWYp8uCqf1xa4OfNu1T7JVxQIrUgOWtHdNDtPiywmFbiS12VjotIXLrKM3orQ==", + "license": "MIT" + }, + "node_modules/cookiejar": { + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/cookiejar/-/cookiejar-2.1.4.tgz", + "integrity": "sha512-LDx6oHrK+PhzLKJU9j5S7/Y3jM/mUHvD/DeI1WQmJn652iPC5Y4TBzC9l+5OMOXlyTTA+SmVUPm0HQUwpD5Jqw==", + "dev": true, + "license": "MIT" + }, + "node_modules/core-util-is": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz", + "integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/cors": { + "version": "2.8.5", + "resolved": "https://registry.npmjs.org/cors/-/cors-2.8.5.tgz", + "integrity": "sha512-KIHbLJqu73RGr/hnbrO9uBeixNGuvSQjul/jdFvS/KFSIH1hWVd1ng7zOHx+YrEfInLG7q4n6GHQ9cDtxv/P6g==", + "license": "MIT", + "dependencies": { + "object-assign": "^4", + "vary": "^1" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/cosmiconfig": { + "version": "8.3.6", + "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-8.3.6.tgz", + "integrity": "sha512-kcZ6+W5QzcJ3P1Mt+83OUv/oHFqZHIx8DuxG6eZ5RGMERoLqp4BuGjhHLYGK+Kf5XVkQvqBSmAy/nGWN3qDgEA==", + "dev": true, + "license": "MIT", + "dependencies": { + "import-fresh": "^3.3.0", + "js-yaml": "^4.1.0", + "parse-json": "^5.2.0", + "path-type": "^4.0.0" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/d-fischer" + }, + "peerDependencies": { + "typescript": ">=4.9.5" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/create-jest": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/create-jest/-/create-jest-29.7.0.tgz", + "integrity": "sha512-Adz2bdH0Vq3F53KEMJOoftQFutWCukm6J24wbPWRO4k1kMY7gS7ds/uoJkNuV8wDCtWWnuwGcJwpWcih+zEW1Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/types": "^29.6.3", + "chalk": "^4.0.0", + "exit": "^0.1.2", + "graceful-fs": "^4.2.9", + "jest-config": "^29.7.0", + "jest-util": "^29.7.0", + "prompts": "^2.0.1" + }, + "bin": { + "create-jest": "bin/create-jest.js" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/create-require": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/create-require/-/create-require-1.1.1.tgz", + "integrity": "sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/cross-spawn": { + "version": "7.0.6", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz", + "integrity": "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==", + "dev": true, + "license": "MIT", + "dependencies": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/debug": { + "version": "4.4.3", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz", + "integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==", + "license": "MIT", + "dependencies": { + "ms": "^2.1.3" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/dedent": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/dedent/-/dedent-1.7.0.tgz", + "integrity": "sha512-HGFtf8yhuhGhqO07SV79tRp+br4MnbdjeVxotpn1QBl30pcLLCQjX5b2295ll0fv8RKDKsmWYrl05usHM9CewQ==", + "dev": true, + "license": "MIT", + "peerDependencies": { + "babel-plugin-macros": "^3.1.0" + }, + "peerDependenciesMeta": { + "babel-plugin-macros": { + "optional": true + } + } + }, + "node_modules/deep-is": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", + "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/deepmerge": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.3.1.tgz", + "integrity": "sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/defaults": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/defaults/-/defaults-1.0.4.tgz", + "integrity": "sha512-eFuaLoy/Rxalv2kr+lqMlUnrDWV+3j4pljOIJgLIhI058IQfWJ7vXhyEIHu+HtC738klGALYxOKDO0bQP3tg8A==", + "dev": true, + "license": "MIT", + "dependencies": { + "clone": "^1.0.2" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/define-data-property": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.4.tgz", + "integrity": "sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A==", + "dev": true, + "license": "MIT", + "dependencies": { + "es-define-property": "^1.0.0", + "es-errors": "^1.3.0", + "gopd": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/delayed-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", + "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==", + "license": "MIT", + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/depd": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz", + "integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==", + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/destroy": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.2.0.tgz", + "integrity": "sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg==", + "license": "MIT", + "engines": { + "node": ">= 0.8", + "npm": "1.2.8000 || >= 1.4.16" + } + }, + "node_modules/detect-newline": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/detect-newline/-/detect-newline-3.1.0.tgz", + "integrity": "sha512-TLz+x/vEXm/Y7P7wn1EJFNLxYpUD4TgMosxY6fAVJUnJMbupHBOncxyWUG9OpTaH9EBD7uFI5LfEgmMOc54DsA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/dezalgo": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/dezalgo/-/dezalgo-1.0.4.tgz", + "integrity": "sha512-rXSP0bf+5n0Qonsb+SVVfNfIsimO4HEtmnIpPHY8Q1UCzKlQrDMfdobr8nJOOsRgWCyMRqeSBQzmWUMq7zvVig==", + "dev": true, + "license": "ISC", + "dependencies": { + "asap": "^2.0.0", + "wrappy": "1" + } + }, + "node_modules/diff": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", + "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==", + "dev": true, + "license": "BSD-3-Clause", + "engines": { + "node": ">=0.3.1" + } + }, + "node_modules/diff-sequences": { + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/diff-sequences/-/diff-sequences-29.6.3.tgz", + "integrity": "sha512-EjePK1srD3P08o2j4f0ExnylqRs5B9tJjcp9t1krH2qRi8CCdsYfwe9JgSLurFBWwq4uOlipzfk5fHNvwFKr8Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/dir-glob": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz", + "integrity": "sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==", + "dev": true, + "license": "MIT", + "dependencies": { + "path-type": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/doctrine": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", + "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "esutils": "^2.0.2" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/dotenv": { + "version": "16.4.5", + "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.4.5.tgz", + "integrity": "sha512-ZmdL2rui+eB2YwhsWzjInR8LldtZHGDoQ1ugH85ppHKwpUHL7j7rN0Ti9NCnGiQbhaZ11FpR+7ao1dNsmduNUg==", + "license": "BSD-2-Clause", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://dotenvx.com" + } + }, + "node_modules/dotenv-expand": { + "version": "10.0.0", + "resolved": "https://registry.npmjs.org/dotenv-expand/-/dotenv-expand-10.0.0.tgz", + "integrity": "sha512-GopVGCpVS1UKH75VKHGuQFqS1Gusej0z4FyQkPdwjil2gNIv+LNsqBlboOzpJFZKVT95GkCyWJbBSdFEFUWI2A==", + "license": "BSD-2-Clause", + "engines": { + "node": ">=12" + } + }, + "node_modules/dunder-proto": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/dunder-proto/-/dunder-proto-1.0.1.tgz", + "integrity": "sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A==", + "license": "MIT", + "dependencies": { + "call-bind-apply-helpers": "^1.0.1", + "es-errors": "^1.3.0", + "gopd": "^1.2.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/eastasianwidth": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz", + "integrity": "sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==", + "dev": true, + "license": "MIT" + }, + "node_modules/ecdsa-sig-formatter": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/ecdsa-sig-formatter/-/ecdsa-sig-formatter-1.0.11.tgz", + "integrity": "sha512-nagl3RYrbNv6kQkeJIpt6NJZy8twLB/2vtz6yN9Z4vRKHN4/QZJIEbqohALSgwKdnksuY3k5Addp5lg8sVoVcQ==", + "license": "Apache-2.0", + "dependencies": { + "safe-buffer": "^5.0.1" + } + }, + "node_modules/ee-first": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", + "integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==", + "license": "MIT" + }, + "node_modules/electron-to-chromium": { + "version": "1.5.262", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.262.tgz", + "integrity": "sha512-NlAsMteRHek05jRUxUR0a5jpjYq9ykk6+kO0yRaMi5moe7u0fVIOeQ3Y30A8dIiWFBNUoQGi1ljb1i5VtS9WQQ==", + "dev": true, + "license": "ISC" + }, + "node_modules/emittery": { + "version": "0.13.1", + "resolved": "https://registry.npmjs.org/emittery/-/emittery-0.13.1.tgz", + "integrity": "sha512-DeWwawk6r5yR9jFgnDKYt4sLS0LmHJJi3ZOnb5/JdbYwj3nW+FxQnHIjhBKz8YLC7oRNPVM9NQ47I3CVx34eqQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sindresorhus/emittery?sponsor=1" + } + }, + "node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true, + "license": "MIT" + }, + "node_modules/encodeurl": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-2.0.0.tgz", + "integrity": "sha512-Q0n9HRi4m6JuGIV1eFlmvJB7ZEVxu93IrMyiMsGC0lrMJMWzRgx6WGquyfQgZVb31vhGgXnfmPNNXmxnOkRBrg==", + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/enhanced-resolve": { + "version": "5.18.3", + "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.18.3.tgz", + "integrity": "sha512-d4lC8xfavMeBjzGr2vECC3fsGXziXZQyJxD868h2M/mBI3PwAuODxAkLkq5HYuvrPYcUtiLzsTo8U3PgX3Ocww==", + "dev": true, + "license": "MIT", + "dependencies": { + "graceful-fs": "^4.2.4", + "tapable": "^2.2.0" + }, + "engines": { + "node": ">=10.13.0" + } + }, + "node_modules/error-ex": { + "version": "1.3.4", + "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.4.tgz", + "integrity": "sha512-sqQamAnR14VgCr1A618A3sGrygcpK+HEbenA/HiEAkkUwcZIIB/tgWqHFxWgOyDh4nB4JCRimh79dR5Ywc9MDQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-arrayish": "^0.2.1" + } + }, + "node_modules/es-define-property": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.1.tgz", + "integrity": "sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-errors": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz", + "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-module-lexer": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-1.7.0.tgz", + "integrity": "sha512-jEQoCwk8hyb2AZziIOLhDqpm5+2ww5uIE6lkO/6jcOCusfk6LhMHpXXfBLXTZ7Ydyt0j4VoUQv6uGNYbdW+kBA==", + "dev": true, + "license": "MIT" + }, + "node_modules/es-object-atoms": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.1.1.tgz", + "integrity": "sha512-FGgH2h8zKNim9ljj7dankFPcICIK9Cp5bm+c2gQSYePhpaG5+esrLODihIorn+Pe6FGJzWhXQotPv73jTaldXA==", + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-set-tostringtag": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/es-set-tostringtag/-/es-set-tostringtag-2.1.0.tgz", + "integrity": "sha512-j6vWzfrGVfyXxge+O0x5sh6cvxAog0a/4Rdd2K36zCMV5eJ+/+tOAngRO8cODMNWbVRdVlmGZQL2YS3yR8bIUA==", + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.6", + "has-tostringtag": "^1.0.2", + "hasown": "^2.0.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/escalade": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.2.0.tgz", + "integrity": "sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/escape-html": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", + "integrity": "sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow==", + "license": "MIT" + }, + "node_modules/escape-string-regexp": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", + "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/eslint": { + "version": "8.57.1", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.57.1.tgz", + "integrity": "sha512-ypowyDxpVSYpkXr9WPv2PAZCtNip1Mv5KTW0SCurXv/9iOpcrH9PaqUElksqEB6pChqHGDRCFTyrZlGhnLNGiA==", + "deprecated": "This version is no longer supported. Please see https://eslint.org/version-support for other options.", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "@eslint-community/eslint-utils": "^4.2.0", + "@eslint-community/regexpp": "^4.6.1", + "@eslint/eslintrc": "^2.1.4", + "@eslint/js": "8.57.1", + "@humanwhocodes/config-array": "^0.13.0", + "@humanwhocodes/module-importer": "^1.0.1", + "@nodelib/fs.walk": "^1.2.8", + "@ungap/structured-clone": "^1.2.0", + "ajv": "^6.12.4", + "chalk": "^4.0.0", + "cross-spawn": "^7.0.2", + "debug": "^4.3.2", + "doctrine": "^3.0.0", + "escape-string-regexp": "^4.0.0", + "eslint-scope": "^7.2.2", + "eslint-visitor-keys": "^3.4.3", + "espree": "^9.6.1", + "esquery": "^1.4.2", + "esutils": "^2.0.2", + "fast-deep-equal": "^3.1.3", + "file-entry-cache": "^6.0.1", + "find-up": "^5.0.0", + "glob-parent": "^6.0.2", + "globals": "^13.19.0", + "graphemer": "^1.4.0", + "ignore": "^5.2.0", + "imurmurhash": "^0.1.4", + "is-glob": "^4.0.0", + "is-path-inside": "^3.0.3", + "js-yaml": "^4.1.0", + "json-stable-stringify-without-jsonify": "^1.0.1", + "levn": "^0.4.1", + "lodash.merge": "^4.6.2", + "minimatch": "^3.1.2", + "natural-compare": "^1.4.0", + "optionator": "^0.9.3", + "strip-ansi": "^6.0.1", + "text-table": "^0.2.0" + }, + "bin": { + "eslint": "bin/eslint.js" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/eslint-config-prettier": { + "version": "9.1.2", + "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-9.1.2.tgz", + "integrity": "sha512-iI1f+D2ViGn+uvv5HuHVUamg8ll4tN+JRHGc6IJi4TP9Kl976C57fzPXgseXNs8v0iA8aSJpHsTWjDb9QJamGQ==", + "dev": true, + "license": "MIT", + "peer": true, + "bin": { + "eslint-config-prettier": "bin/cli.js" + }, + "peerDependencies": { + "eslint": ">=7.0.0" + } + }, + "node_modules/eslint-plugin-prettier": { + "version": "5.5.4", + "resolved": "https://registry.npmjs.org/eslint-plugin-prettier/-/eslint-plugin-prettier-5.5.4.tgz", + "integrity": "sha512-swNtI95SToIz05YINMA6Ox5R057IMAmWZ26GqPxusAp1TZzj+IdY9tXNWWD3vkF/wEqydCONcwjTFpxybBqZsg==", + "dev": true, + "license": "MIT", + "dependencies": { + "prettier-linter-helpers": "^1.0.0", + "synckit": "^0.11.7" + }, + "engines": { + "node": "^14.18.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint-plugin-prettier" + }, + "peerDependencies": { + "@types/eslint": ">=8.0.0", + "eslint": ">=8.0.0", + "eslint-config-prettier": ">= 7.0.0 <10.0.0 || >=10.1.0", + "prettier": ">=3.0.0" + }, + "peerDependenciesMeta": { + "@types/eslint": { + "optional": true + }, + "eslint-config-prettier": { + "optional": true + } + } + }, + "node_modules/eslint-scope": { + "version": "7.2.2", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.2.2.tgz", + "integrity": "sha512-dOt21O7lTMhDM+X9mB4GX+DZrZtCUJPL/wlcTqxyrx5IvO0IYtILdtrQGQp+8n5S0gwSVmOf9NQrjMOgfQZlIg==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "esrecurse": "^4.3.0", + "estraverse": "^5.2.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/eslint-visitor-keys": { + "version": "3.4.3", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz", + "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/eslint/node_modules/ajv": { + "version": "6.12.6", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "dev": true, + "license": "MIT", + "dependencies": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, + "node_modules/eslint/node_modules/brace-expansion": { + "version": "1.1.12", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz", + "integrity": "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==", + "dev": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/eslint/node_modules/glob-parent": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", + "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", + "dev": true, + "license": "ISC", + "dependencies": { + "is-glob": "^4.0.3" + }, + "engines": { + "node": ">=10.13.0" + } + }, + "node_modules/eslint/node_modules/json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", + "dev": true, + "license": "MIT" + }, + "node_modules/eslint/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "license": "ISC", + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/espree": { + "version": "9.6.1", + "resolved": "https://registry.npmjs.org/espree/-/espree-9.6.1.tgz", + "integrity": "sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "acorn": "^8.9.0", + "acorn-jsx": "^5.3.2", + "eslint-visitor-keys": "^3.4.1" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/esprima": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", + "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", + "dev": true, + "license": "BSD-2-Clause", + "bin": { + "esparse": "bin/esparse.js", + "esvalidate": "bin/esvalidate.js" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/esquery": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.6.0.tgz", + "integrity": "sha512-ca9pw9fomFcKPvFLXhBKUK90ZvGibiGOvRJNbjljY7s7uq/5YO4BOzcYtJqExdx99rF6aAcnRxHmcUHcz6sQsg==", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "estraverse": "^5.1.0" + }, + "engines": { + "node": ">=0.10" + } + }, + "node_modules/esrecurse": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", + "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "estraverse": "^5.2.0" + }, + "engines": { + "node": ">=4.0" + } + }, + "node_modules/estraverse": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", + "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", + "dev": true, + "license": "BSD-2-Clause", + "engines": { + "node": ">=4.0" + } + }, + "node_modules/esutils": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", + "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", + "dev": true, + "license": "BSD-2-Clause", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/etag": { + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz", + "integrity": "sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/events": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/events/-/events-3.3.0.tgz", + "integrity": "sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.8.x" + } + }, + "node_modules/execa": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/execa/-/execa-5.1.1.tgz", + "integrity": "sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==", + "dev": true, + "license": "MIT", + "dependencies": { + "cross-spawn": "^7.0.3", + "get-stream": "^6.0.0", + "human-signals": "^2.1.0", + "is-stream": "^2.0.0", + "merge-stream": "^2.0.0", + "npm-run-path": "^4.0.1", + "onetime": "^5.1.2", + "signal-exit": "^3.0.3", + "strip-final-newline": "^2.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sindresorhus/execa?sponsor=1" + } + }, + "node_modules/execa/node_modules/signal-exit": { + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", + "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", + "dev": true, + "license": "ISC" + }, + "node_modules/exit": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/exit/-/exit-0.1.2.tgz", + "integrity": "sha512-Zk/eNKV2zbjpKzrsQ+n1G6poVbErQxJ0LBOJXaKZ1EViLzH+hrLu9cdXI4zw9dBQJslwBEpbQ2P1oS7nDxs6jQ==", + "dev": true, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/expect": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/expect/-/expect-29.7.0.tgz", + "integrity": "sha512-2Zks0hf1VLFYI1kbh0I5jP3KHHyCHpkfyHBzsSXRFgl/Bg9mWYfMW8oD+PdMPlEwy5HNsR9JutYy6pMeOh61nw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/expect-utils": "^29.7.0", + "jest-get-type": "^29.6.3", + "jest-matcher-utils": "^29.7.0", + "jest-message-util": "^29.7.0", + "jest-util": "^29.7.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/express": { + "version": "4.21.2", + "resolved": "https://registry.npmjs.org/express/-/express-4.21.2.tgz", + "integrity": "sha512-28HqgMZAmih1Czt9ny7qr6ek2qddF4FclbMzwhCREB6OFfH+rXAnuNCwo1/wFvrtbgsQDb4kSbX9de9lFbrXnA==", + "license": "MIT", + "dependencies": { + "accepts": "~1.3.8", + "array-flatten": "1.1.1", + "body-parser": "1.20.3", + "content-disposition": "0.5.4", + "content-type": "~1.0.4", + "cookie": "0.7.1", + "cookie-signature": "1.0.6", + "debug": "2.6.9", + "depd": "2.0.0", + "encodeurl": "~2.0.0", + "escape-html": "~1.0.3", + "etag": "~1.8.1", + "finalhandler": "1.3.1", + "fresh": "0.5.2", + "http-errors": "2.0.0", + "merge-descriptors": "1.0.3", + "methods": "~1.1.2", + "on-finished": "2.4.1", + "parseurl": "~1.3.3", + "path-to-regexp": "0.1.12", + "proxy-addr": "~2.0.7", + "qs": "6.13.0", + "range-parser": "~1.2.1", + "safe-buffer": "5.2.1", + "send": "0.19.0", + "serve-static": "1.16.2", + "setprototypeof": "1.2.0", + "statuses": "2.0.1", + "type-is": "~1.6.18", + "utils-merge": "1.0.1", + "vary": "~1.1.2" + }, + "engines": { + "node": ">= 0.10.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/express" + } + }, + "node_modules/express/node_modules/debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "license": "MIT", + "dependencies": { + "ms": "2.0.0" + } + }, + "node_modules/express/node_modules/ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", + "license": "MIT" + }, + "node_modules/express/node_modules/path-to-regexp": { + "version": "0.1.12", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.12.tgz", + "integrity": "sha512-RA1GjUVMnvYFxuqovrEqZoxxW5NUZqbwKtYz/Tt7nXerk0LbLblQmrsgdeOxV5SFHf0UDggjS/bSeOZwt1pmEQ==", + "license": "MIT" + }, + "node_modules/external-editor": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/external-editor/-/external-editor-3.1.0.tgz", + "integrity": "sha512-hMQ4CX1p1izmuLYyZqLMO/qGNw10wSv9QDCPfzXfyFrOaCSSoRfqE1Kf1s5an66J5JZC62NewG+mK49jOCtQew==", + "dev": true, + "license": "MIT", + "dependencies": { + "chardet": "^0.7.0", + "iconv-lite": "^0.4.24", + "tmp": "^0.0.33" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/fast-deep-equal": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", + "dev": true, + "license": "MIT" + }, + "node_modules/fast-diff": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/fast-diff/-/fast-diff-1.3.0.tgz", + "integrity": "sha512-VxPP4NqbUjj6MaAOafWeUn2cXWLcCtljklUtZf0Ind4XQ+QPtmA0b18zZy0jIQx+ExRVCR/ZQpBmik5lXshNsw==", + "dev": true, + "license": "Apache-2.0" + }, + "node_modules/fast-glob": { + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.3.tgz", + "integrity": "sha512-7MptL8U0cqcFdzIzwOTHoilX9x5BrNqye7Z/LuC7kCMRio1EMSyqRK3BEAUD7sXRq4iT4AzTVuZdhgQ2TCvYLg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@nodelib/fs.stat": "^2.0.2", + "@nodelib/fs.walk": "^1.2.3", + "glob-parent": "^5.1.2", + "merge2": "^1.3.0", + "micromatch": "^4.0.8" + }, + "engines": { + "node": ">=8.6.0" + } + }, + "node_modules/fast-json-stable-stringify": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", + "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", + "dev": true, + "license": "MIT" + }, + "node_modules/fast-levenshtein": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", + "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==", + "dev": true, + "license": "MIT" + }, + "node_modules/fast-safe-stringify": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/fast-safe-stringify/-/fast-safe-stringify-2.1.1.tgz", + "integrity": "sha512-W+KJc2dmILlPplD/H4K9l9LcAHAfPtP6BY84uVLXQ6Evcz9Lcg33Y2z1IVblT6xdY54PXYVHEv+0Wpq8Io6zkA==", + "license": "MIT" + }, + "node_modules/fastq": { + "version": "1.19.1", + "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.19.1.tgz", + "integrity": "sha512-GwLTyxkCXjXbxqIhTsMI2Nui8huMPtnxg7krajPJAjnEG/iiOS7i+zCtWGZR9G0NBKbXKh6X9m9UIsYX/N6vvQ==", + "dev": true, + "license": "ISC", + "dependencies": { + "reusify": "^1.0.4" + } + }, + "node_modules/fb-watchman": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/fb-watchman/-/fb-watchman-2.0.2.tgz", + "integrity": "sha512-p5161BqbuCaSnB8jIbzQHOlpgsPmK5rJVDfDKO91Axs5NC1uu3HRQm6wt9cd9/+GtQQIO53JdGXXoyDpTAsgYA==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "bser": "2.1.1" + } + }, + "node_modules/fflate": { + "version": "0.8.2", + "resolved": "https://registry.npmjs.org/fflate/-/fflate-0.8.2.tgz", + "integrity": "sha512-cPJU47OaAoCbg0pBvzsgpTPhmhqI5eJjh/JIu8tPj5q+T7iLvW/JAYUqmE7KOB4R1ZyEhzBaIQpQpardBF5z8A==", + "license": "MIT" + }, + "node_modules/figures": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/figures/-/figures-3.2.0.tgz", + "integrity": "sha512-yaduQFRKLXYOGgEn6AZau90j3ggSOyiqXU0F9JZfeXYhNa+Jk4X+s45A2zg5jns87GAFa34BBm2kXw4XpNcbdg==", + "dev": true, + "license": "MIT", + "dependencies": { + "escape-string-regexp": "^1.0.5" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/figures/node_modules/escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/file-entry-cache": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz", + "integrity": "sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==", + "dev": true, + "license": "MIT", + "dependencies": { + "flat-cache": "^3.0.4" + }, + "engines": { + "node": "^10.12.0 || >=12.0.0" + } + }, + "node_modules/file-type": { + "version": "20.4.1", + "resolved": "https://registry.npmjs.org/file-type/-/file-type-20.4.1.tgz", + "integrity": "sha512-hw9gNZXUfZ02Jo0uafWLaFVPter5/k2rfcrjFJJHX/77xtSDOfJuEFb6oKlFV86FLP1SuyHMW1PSk0U9M5tKkQ==", + "license": "MIT", + "dependencies": { + "@tokenizer/inflate": "^0.2.6", + "strtok3": "^10.2.0", + "token-types": "^6.0.0", + "uint8array-extras": "^1.4.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sindresorhus/file-type?sponsor=1" + } + }, + "node_modules/fill-range": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", + "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", + "dev": true, + "license": "MIT", + "dependencies": { + "to-regex-range": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/finalhandler": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.3.1.tgz", + "integrity": "sha512-6BN9trH7bp3qvnrRyzsBz+g3lZxTNZTbVO2EV1CS0WIcDbawYVdYvGflME/9QP0h0pYlCDBCTjYa9nZzMDpyxQ==", + "license": "MIT", + "dependencies": { + "debug": "2.6.9", + "encodeurl": "~2.0.0", + "escape-html": "~1.0.3", + "on-finished": "2.4.1", + "parseurl": "~1.3.3", + "statuses": "2.0.1", + "unpipe": "~1.0.0" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/finalhandler/node_modules/debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "license": "MIT", + "dependencies": { + "ms": "2.0.0" + } + }, + "node_modules/finalhandler/node_modules/ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", + "license": "MIT" + }, + "node_modules/find-up": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", + "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", + "dev": true, + "license": "MIT", + "dependencies": { + "locate-path": "^6.0.0", + "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/flat-cache": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.2.0.tgz", + "integrity": "sha512-CYcENa+FtcUKLmhhqyctpclsq7QF38pKjZHsGNiSQF5r4FtoKDWabFDl3hzaEQMvT1LHEysw5twgLvpYYb4vbw==", + "dev": true, + "license": "MIT", + "dependencies": { + "flatted": "^3.2.9", + "keyv": "^4.5.3", + "rimraf": "^3.0.2" + }, + "engines": { + "node": "^10.12.0 || >=12.0.0" + } + }, + "node_modules/flatted": { + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.3.3.tgz", + "integrity": "sha512-GX+ysw4PBCz0PzosHDepZGANEuFCMLrnRTiEy9McGjmkCQYwRq4A/X786G/fjM/+OjsWSU1ZrY5qyARZmO/uwg==", + "dev": true, + "license": "ISC" + }, + "node_modules/follow-redirects": { + "version": "1.15.11", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.11.tgz", + "integrity": "sha512-deG2P0JfjrTxl50XGCDyfI97ZGVCxIpfKYmfyrQ54n5FO/0gfIES8C/Psl6kWVDolizcaaxZJnTS0QSMxvnsBQ==", + "funding": [ + { + "type": "individual", + "url": "https://github.com/sponsors/RubenVerborgh" + } + ], + "license": "MIT", + "engines": { + "node": ">=4.0" + }, + "peerDependenciesMeta": { + "debug": { + "optional": true + } + } + }, + "node_modules/foreground-child": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-3.3.1.tgz", + "integrity": "sha512-gIXjKqtFuWEgzFRJA9WCQeSJLZDjgJUOMCMzxtvFq/37KojM1BFGufqsCy0r4qSQmYLsZYMeyRqzIWOMup03sw==", + "dev": true, + "license": "ISC", + "dependencies": { + "cross-spawn": "^7.0.6", + "signal-exit": "^4.0.1" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/fork-ts-checker-webpack-plugin": { + "version": "9.0.2", + "resolved": "https://registry.npmjs.org/fork-ts-checker-webpack-plugin/-/fork-ts-checker-webpack-plugin-9.0.2.tgz", + "integrity": "sha512-Uochze2R8peoN1XqlSi/rGUkDQpRogtLFocP9+PGu68zk1BDAKXfdeCdyVZpgTk8V8WFVQXdEz426VKjXLO1Gg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/code-frame": "^7.16.7", + "chalk": "^4.1.2", + "chokidar": "^3.5.3", + "cosmiconfig": "^8.2.0", + "deepmerge": "^4.2.2", + "fs-extra": "^10.0.0", + "memfs": "^3.4.1", + "minimatch": "^3.0.4", + "node-abort-controller": "^3.0.1", + "schema-utils": "^3.1.1", + "semver": "^7.3.5", + "tapable": "^2.2.1" + }, + "engines": { + "node": ">=12.13.0", + "yarn": ">=1.0.0" + }, + "peerDependencies": { + "typescript": ">3.6.0", + "webpack": "^5.11.0" + } + }, + "node_modules/fork-ts-checker-webpack-plugin/node_modules/brace-expansion": { + "version": "1.1.12", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz", + "integrity": "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==", + "dev": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/fork-ts-checker-webpack-plugin/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "license": "ISC", + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/form-data": { + "version": "4.0.5", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.5.tgz", + "integrity": "sha512-8RipRLol37bNs2bhoV67fiTEvdTrbMUYcFTiy3+wuuOnUog2QBHCZWXDRijWQfAkhBj2Uf5UnVaiWwA5vdd82w==", + "license": "MIT", + "dependencies": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.8", + "es-set-tostringtag": "^2.1.0", + "hasown": "^2.0.2", + "mime-types": "^2.1.12" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/formidable": { + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/formidable/-/formidable-2.1.5.tgz", + "integrity": "sha512-Oz5Hwvwak/DCaXVVUtPn4oLMLLy1CdclLKO1LFgU7XzDpVMUU5UjlSLpGMocyQNNk8F6IJW9M/YdooSn2MRI+Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "@paralleldrive/cuid2": "^2.2.2", + "dezalgo": "^1.0.4", + "once": "^1.4.0", + "qs": "^6.11.0" + }, + "funding": { + "url": "https://ko-fi.com/tunnckoCore/commissions" + } + }, + "node_modules/forwarded": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.2.0.tgz", + "integrity": "sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/fresh": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz", + "integrity": "sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/fs-extra": { + "version": "10.1.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-10.1.0.tgz", + "integrity": "sha512-oRXApq54ETRj4eMiFzGnHWGy+zo5raudjuxN0b8H7s/RU2oW0Wvsx9O0ACRN/kRq9E8Vu/ReskGB5o3ji+FzHQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "graceful-fs": "^4.2.0", + "jsonfile": "^6.0.1", + "universalify": "^2.0.0" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/fs-monkey": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/fs-monkey/-/fs-monkey-1.1.0.tgz", + "integrity": "sha512-QMUezzXWII9EV5aTFXW1UBVUO77wYPpjqIF8/AviUCThNeSYZykpoTixUeaNNBwmCev0AMDWMAni+f8Hxb1IFw==", + "dev": true, + "license": "Unlicense" + }, + "node_modules/fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", + "dev": true, + "license": "ISC" + }, + "node_modules/fsevents": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", + "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", + "dev": true, + "hasInstallScript": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + } + }, + "node_modules/function-bind": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", + "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/gensync": { + "version": "1.0.0-beta.2", + "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz", + "integrity": "sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/get-caller-file": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", + "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", + "dev": true, + "license": "ISC", + "engines": { + "node": "6.* || 8.* || >= 10.*" + } + }, + "node_modules/get-intrinsic": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.3.0.tgz", + "integrity": "sha512-9fSjSaos/fRIVIp+xSJlE6lfwhES7LNtKaCBIamHsjr2na1BiABJPo0mOjjz8GJDURarmCPGqaiVg5mfjb98CQ==", + "license": "MIT", + "dependencies": { + "call-bind-apply-helpers": "^1.0.2", + "es-define-property": "^1.0.1", + "es-errors": "^1.3.0", + "es-object-atoms": "^1.1.1", + "function-bind": "^1.1.2", + "get-proto": "^1.0.1", + "gopd": "^1.2.0", + "has-symbols": "^1.1.0", + "hasown": "^2.0.2", + "math-intrinsics": "^1.1.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/get-package-type": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/get-package-type/-/get-package-type-0.1.0.tgz", + "integrity": "sha512-pjzuKtY64GYfWizNAJ0fr9VqttZkNiK2iS430LtIHzjBEr6bX8Am2zm4sW4Ro5wjWW5cAlRL1qAMTcXbjNAO2Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/get-proto": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/get-proto/-/get-proto-1.0.1.tgz", + "integrity": "sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g==", + "license": "MIT", + "dependencies": { + "dunder-proto": "^1.0.1", + "es-object-atoms": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/get-stream": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz", + "integrity": "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/glob": { + "version": "10.4.5", + "resolved": "https://registry.npmjs.org/glob/-/glob-10.4.5.tgz", + "integrity": "sha512-7Bv8RF0k6xjo7d4A/PxYLbUCfb6c+Vpd2/mB2yRDlew7Jb5hEXiCD9ibfO7wpk8i4sevK6DFny9h7EYbM3/sHg==", + "dev": true, + "license": "ISC", + "dependencies": { + "foreground-child": "^3.1.0", + "jackspeak": "^3.1.2", + "minimatch": "^9.0.4", + "minipass": "^7.1.2", + "package-json-from-dist": "^1.0.0", + "path-scurry": "^1.11.1" + }, + "bin": { + "glob": "dist/esm/bin.mjs" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "dev": true, + "license": "ISC", + "dependencies": { + "is-glob": "^4.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/glob-to-regexp": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/glob-to-regexp/-/glob-to-regexp-0.4.1.tgz", + "integrity": "sha512-lkX1HJXwyMcprw/5YUZc2s7DrpAiHB21/V+E1rHUrVNokkvB6bqMzT0VfV6/86ZNabt1k14YOIaT7nDvOX3Iiw==", + "dev": true, + "license": "BSD-2-Clause" + }, + "node_modules/glob/node_modules/minimatch": { + "version": "9.0.5", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", + "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", + "dev": true, + "license": "ISC", + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/globals": { + "version": "13.24.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.24.0.tgz", + "integrity": "sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "type-fest": "^0.20.2" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/globby": { + "version": "11.1.0", + "resolved": "https://registry.npmjs.org/globby/-/globby-11.1.0.tgz", + "integrity": "sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==", + "dev": true, + "license": "MIT", + "dependencies": { + "array-union": "^2.1.0", + "dir-glob": "^3.0.1", + "fast-glob": "^3.2.9", + "ignore": "^5.2.0", + "merge2": "^1.4.1", + "slash": "^3.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/gopd": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.2.0.tgz", + "integrity": "sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/graceful-fs": { + "version": "4.2.11", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", + "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", + "dev": true, + "license": "ISC" + }, + "node_modules/graphemer": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/graphemer/-/graphemer-1.4.0.tgz", + "integrity": "sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==", + "dev": true, + "license": "MIT" + }, + "node_modules/handlebars": { + "version": "4.7.8", + "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.7.8.tgz", + "integrity": "sha512-vafaFqs8MZkRrSX7sFVUdo3ap/eNiLnb4IakshzvP56X5Nr1iGKAIqdX6tMlm6HcNRIkr6AxO5jFEoJzzpT8aQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "minimist": "^1.2.5", + "neo-async": "^2.6.2", + "source-map": "^0.6.1", + "wordwrap": "^1.0.0" + }, + "bin": { + "handlebars": "bin/handlebars" + }, + "engines": { + "node": ">=0.4.7" + }, + "optionalDependencies": { + "uglify-js": "^3.1.4" + } + }, + "node_modules/handlebars/node_modules/source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true, + "license": "BSD-3-Clause", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/has-own-prop": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/has-own-prop/-/has-own-prop-2.0.0.tgz", + "integrity": "sha512-Pq0h+hvsVm6dDEa8x82GnLSYHOzNDt7f0ddFa3FqcQlgzEiptPqL+XrOJNavjOzSYiYWIrgeVYYgGlLmnxwilQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/has-property-descriptors": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.2.tgz", + "integrity": "sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg==", + "dev": true, + "license": "MIT", + "dependencies": { + "es-define-property": "^1.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-symbols": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.1.0.tgz", + "integrity": "sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-tostringtag": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.2.tgz", + "integrity": "sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==", + "license": "MIT", + "dependencies": { + "has-symbols": "^1.0.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/hasown": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz", + "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==", + "license": "MIT", + "dependencies": { + "function-bind": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/html-escaper": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/html-escaper/-/html-escaper-2.0.2.tgz", + "integrity": "sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg==", + "dev": true, + "license": "MIT" + }, + "node_modules/http-errors": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.0.tgz", + "integrity": "sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ==", + "license": "MIT", + "dependencies": { + "depd": "2.0.0", + "inherits": "2.0.4", + "setprototypeof": "1.2.0", + "statuses": "2.0.1", + "toidentifier": "1.0.1" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/human-signals": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-2.1.0.tgz", + "integrity": "sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=10.17.0" + } + }, + "node_modules/iconv-lite": { + "version": "0.4.24", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", + "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", + "license": "MIT", + "dependencies": { + "safer-buffer": ">= 2.1.2 < 3" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/ieee754": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", + "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "BSD-3-Clause" + }, + "node_modules/ignore": { + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.2.tgz", + "integrity": "sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 4" + } + }, + "node_modules/import-fresh": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.1.tgz", + "integrity": "sha512-TR3KfrTZTYLPB6jUjfx6MF9WcWrHL9su5TObK4ZkYgBdWKPOFoSoQIdEuTuR82pmtxH2spWG9h6etwfr1pLBqQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "parent-module": "^1.0.0", + "resolve-from": "^4.0.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/import-local": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/import-local/-/import-local-3.2.0.tgz", + "integrity": "sha512-2SPlun1JUPWoM6t3F0dw0FkCF/jWY8kttcY4f599GLTSjh2OCuuhdTkJQsEcZzBqbXZGKMK2OqW1oZsjtf/gQA==", + "dev": true, + "license": "MIT", + "dependencies": { + "pkg-dir": "^4.2.0", + "resolve-cwd": "^3.0.0" + }, + "bin": { + "import-local-fixture": "fixtures/cli.js" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/imurmurhash": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", + "integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.8.19" + } + }, + "node_modules/inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", + "deprecated": "This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.", + "dev": true, + "license": "ISC", + "dependencies": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "node_modules/inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", + "license": "ISC" + }, + "node_modules/inquirer": { + "version": "8.2.6", + "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-8.2.6.tgz", + "integrity": "sha512-M1WuAmb7pn9zdFRtQYk26ZBoY043Sse0wVDdk4Bppr+JOXyQYybdtvK+l9wUibhtjdjvtoiNy8tk+EgsYIUqKg==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-escapes": "^4.2.1", + "chalk": "^4.1.1", + "cli-cursor": "^3.1.0", + "cli-width": "^3.0.0", + "external-editor": "^3.0.3", + "figures": "^3.0.0", + "lodash": "^4.17.21", + "mute-stream": "0.0.8", + "ora": "^5.4.1", + "run-async": "^2.4.0", + "rxjs": "^7.5.5", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0", + "through": "^2.3.6", + "wrap-ansi": "^6.0.1" + }, + "engines": { + "node": ">=12.0.0" + } + }, + "node_modules/ipaddr.js": { + "version": "1.9.1", + "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz", + "integrity": "sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==", + "license": "MIT", + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/is-arrayish": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", + "integrity": "sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==", + "dev": true, + "license": "MIT" + }, + "node_modules/is-binary-path": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", + "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", + "dev": true, + "license": "MIT", + "dependencies": { + "binary-extensions": "^2.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/is-core-module": { + "version": "2.16.1", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.16.1.tgz", + "integrity": "sha512-UfoeMA6fIJ8wTYFEUjelnaGI67v6+N7qXJEvQuIGa99l4xsCruSYOVSQ0uPANn4dAzm8lkYPaKLrrijLq7x23w==", + "dev": true, + "license": "MIT", + "dependencies": { + "hasown": "^2.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/is-generator-fn": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-generator-fn/-/is-generator-fn-2.1.0.tgz", + "integrity": "sha512-cTIB4yPYL/Grw0EaSzASzg6bBy9gqCofvWN8okThAYIxKJZC+udlRAmGbM0XLeniEJSs8uEgHPGuHSe1XsOLSQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/is-glob": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-extglob": "^2.1.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-interactive": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-interactive/-/is-interactive-1.0.0.tgz", + "integrity": "sha512-2HvIEKRoqS62guEC+qBjpvRubdX910WCMuJTZ+I9yvqKU2/12eSL549HMwtabb4oupdj2sMP50k+XJfB/8JE6w==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.12.0" + } + }, + "node_modules/is-path-inside": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.3.tgz", + "integrity": "sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/is-stream": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz", + "integrity": "sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/is-unicode-supported": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz", + "integrity": "sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", + "dev": true, + "license": "ISC" + }, + "node_modules/istanbul-lib-coverage": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-3.2.2.tgz", + "integrity": "sha512-O8dpsF+r0WV/8MNRKfnmrtCWhuKjxrq2w+jpzBL5UZKTi2LeVWnWOmWRxFlesJONmc+wLAGvKQZEOanko0LFTg==", + "dev": true, + "license": "BSD-3-Clause", + "engines": { + "node": ">=8" + } + }, + "node_modules/istanbul-lib-instrument": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-6.0.3.tgz", + "integrity": "sha512-Vtgk7L/R2JHyyGW07spoFlB8/lpjiOLTjMdms6AFMraYt3BaJauod/NGrfnVG/y4Ix1JEuMRPDPEj2ua+zz1/Q==", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "@babel/core": "^7.23.9", + "@babel/parser": "^7.23.9", + "@istanbuljs/schema": "^0.1.3", + "istanbul-lib-coverage": "^3.2.0", + "semver": "^7.5.4" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/istanbul-lib-report": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/istanbul-lib-report/-/istanbul-lib-report-3.0.1.tgz", + "integrity": "sha512-GCfE1mtsHGOELCU8e/Z7YWzpmybrx/+dSTfLrvY8qRmaY6zXTKWn6WQIjaAFw069icm6GVMNkgu0NzI4iPZUNw==", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "istanbul-lib-coverage": "^3.0.0", + "make-dir": "^4.0.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/istanbul-lib-source-maps": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/istanbul-lib-source-maps/-/istanbul-lib-source-maps-4.0.1.tgz", + "integrity": "sha512-n3s8EwkdFIJCG3BPKBYvskgXGoy88ARzvegkitk60NxRdwltLOTaH7CUiMRXvwYorl0Q712iEjcWB+fK/MrWVw==", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "debug": "^4.1.1", + "istanbul-lib-coverage": "^3.0.0", + "source-map": "^0.6.1" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/istanbul-lib-source-maps/node_modules/source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true, + "license": "BSD-3-Clause", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/istanbul-reports": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-3.2.0.tgz", + "integrity": "sha512-HGYWWS/ehqTV3xN10i23tkPkpH46MLCIMFNCaaKNavAXTF1RkqxawEPtnjnGZ6XKSInBKkiOA5BKS+aZiY3AvA==", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "html-escaper": "^2.0.0", + "istanbul-lib-report": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/iterare": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/iterare/-/iterare-1.2.1.tgz", + "integrity": "sha512-RKYVTCjAnRthyJes037NX/IiqeidgN1xc3j1RjFfECFp28A1GVwK9nA+i0rJPaHqSZwygLzRnFlzUuHFoWWy+Q==", + "license": "ISC", + "engines": { + "node": ">=6" + } + }, + "node_modules/jackspeak": { + "version": "3.4.3", + "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-3.4.3.tgz", + "integrity": "sha512-OGlZQpz2yfahA/Rd1Y8Cd9SIEsqvXkLVoSw/cgwhnhFMDbsQFeZYoJJ7bIZBS9BcamUW96asq/npPWugM+RQBw==", + "dev": true, + "license": "BlueOak-1.0.0", + "dependencies": { + "@isaacs/cliui": "^8.0.2" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + }, + "optionalDependencies": { + "@pkgjs/parseargs": "^0.11.0" + } + }, + "node_modules/jest": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest/-/jest-29.7.0.tgz", + "integrity": "sha512-NIy3oAFp9shda19hy4HK0HRTWKtPJmGdnvywu01nOqNC2vZg+Z+fvJDxpMQA88eb2I9EcafcdjYgsDthnYTvGw==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "@jest/core": "^29.7.0", + "@jest/types": "^29.6.3", + "import-local": "^3.0.2", + "jest-cli": "^29.7.0" + }, + "bin": { + "jest": "bin/jest.js" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + }, + "peerDependencies": { + "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0" + }, + "peerDependenciesMeta": { + "node-notifier": { + "optional": true + } + } + }, + "node_modules/jest-changed-files": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-changed-files/-/jest-changed-files-29.7.0.tgz", + "integrity": "sha512-fEArFiwf1BpQ+4bXSprcDc3/x4HSzL4al2tozwVpDFpsxALjLYdyiIK4e5Vz66GQJIbXJ82+35PtysofptNX2w==", + "dev": true, + "license": "MIT", + "dependencies": { + "execa": "^5.0.0", + "jest-util": "^29.7.0", + "p-limit": "^3.1.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-circus": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-circus/-/jest-circus-29.7.0.tgz", + "integrity": "sha512-3E1nCMgipcTkCocFwM90XXQab9bS+GMsjdpmPrlelaxwD93Ad8iVEjX/vvHPdLPnFf+L40u+5+iutRdA1N9myw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/environment": "^29.7.0", + "@jest/expect": "^29.7.0", + "@jest/test-result": "^29.7.0", + "@jest/types": "^29.6.3", + "@types/node": "*", + "chalk": "^4.0.0", + "co": "^4.6.0", + "dedent": "^1.0.0", + "is-generator-fn": "^2.0.0", + "jest-each": "^29.7.0", + "jest-matcher-utils": "^29.7.0", + "jest-message-util": "^29.7.0", + "jest-runtime": "^29.7.0", + "jest-snapshot": "^29.7.0", + "jest-util": "^29.7.0", + "p-limit": "^3.1.0", + "pretty-format": "^29.7.0", + "pure-rand": "^6.0.0", + "slash": "^3.0.0", + "stack-utils": "^2.0.3" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-cli": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-cli/-/jest-cli-29.7.0.tgz", + "integrity": "sha512-OVVobw2IubN/GSYsxETi+gOe7Ka59EFMR/twOU3Jb2GnKKeMGJB5SGUUrEz3SFVmJASUdZUzy83sLNNQ2gZslg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/core": "^29.7.0", + "@jest/test-result": "^29.7.0", + "@jest/types": "^29.6.3", + "chalk": "^4.0.0", + "create-jest": "^29.7.0", + "exit": "^0.1.2", + "import-local": "^3.0.2", + "jest-config": "^29.7.0", + "jest-util": "^29.7.0", + "jest-validate": "^29.7.0", + "yargs": "^17.3.1" + }, + "bin": { + "jest": "bin/jest.js" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + }, + "peerDependencies": { + "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0" + }, + "peerDependenciesMeta": { + "node-notifier": { + "optional": true + } + } + }, + "node_modules/jest-config": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-config/-/jest-config-29.7.0.tgz", + "integrity": "sha512-uXbpfeQ7R6TZBqI3/TxCU4q4ttk3u0PJeC+E0zbfSoSjq6bJ7buBPxzQPL0ifrkY4DNu4JUdk0ImlBUYi840eQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/core": "^7.11.6", + "@jest/test-sequencer": "^29.7.0", + "@jest/types": "^29.6.3", + "babel-jest": "^29.7.0", + "chalk": "^4.0.0", + "ci-info": "^3.2.0", + "deepmerge": "^4.2.2", + "glob": "^7.1.3", + "graceful-fs": "^4.2.9", + "jest-circus": "^29.7.0", + "jest-environment-node": "^29.7.0", + "jest-get-type": "^29.6.3", + "jest-regex-util": "^29.6.3", + "jest-resolve": "^29.7.0", + "jest-runner": "^29.7.0", + "jest-util": "^29.7.0", + "jest-validate": "^29.7.0", + "micromatch": "^4.0.4", + "parse-json": "^5.2.0", + "pretty-format": "^29.7.0", + "slash": "^3.0.0", + "strip-json-comments": "^3.1.1" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + }, + "peerDependencies": { + "@types/node": "*", + "ts-node": ">=9.0.0" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + }, + "ts-node": { + "optional": true + } + } + }, + "node_modules/jest-config/node_modules/brace-expansion": { + "version": "1.1.12", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz", + "integrity": "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==", + "dev": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/jest-config/node_modules/glob": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "deprecated": "Glob versions prior to v9 are no longer supported", + "dev": true, + "license": "ISC", + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/jest-config/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "license": "ISC", + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/jest-diff": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-29.7.0.tgz", + "integrity": "sha512-LMIgiIrhigmPrs03JHpxUh2yISK3vLFPkAodPeo0+BuF7wA2FoQbkEg1u8gBYBThncu7e1oEDUfIXVuTqLRUjw==", + "dev": true, + "license": "MIT", + "dependencies": { + "chalk": "^4.0.0", + "diff-sequences": "^29.6.3", + "jest-get-type": "^29.6.3", + "pretty-format": "^29.7.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-docblock": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-docblock/-/jest-docblock-29.7.0.tgz", + "integrity": "sha512-q617Auw3A612guyaFgsbFeYpNP5t2aoUNLwBUbc/0kD1R4t9ixDbyFTHd1nok4epoVFpr7PmeWHrhvuV3XaJ4g==", + "dev": true, + "license": "MIT", + "dependencies": { + "detect-newline": "^3.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-each": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-each/-/jest-each-29.7.0.tgz", + "integrity": "sha512-gns+Er14+ZrEoC5fhOfYCY1LOHHr0TI+rQUHZS8Ttw2l7gl+80eHc/gFf2Ktkw0+SIACDTeWvpFcv3B04VembQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/types": "^29.6.3", + "chalk": "^4.0.0", + "jest-get-type": "^29.6.3", + "jest-util": "^29.7.0", + "pretty-format": "^29.7.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-environment-node": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-environment-node/-/jest-environment-node-29.7.0.tgz", + "integrity": "sha512-DOSwCRqXirTOyheM+4d5YZOrWcdu0LNZ87ewUoywbcb2XR4wKgqiG8vNeYwhjFMbEkfju7wx2GYH0P2gevGvFw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/environment": "^29.7.0", + "@jest/fake-timers": "^29.7.0", + "@jest/types": "^29.6.3", + "@types/node": "*", + "jest-mock": "^29.7.0", + "jest-util": "^29.7.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-get-type": { + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-29.6.3.tgz", + "integrity": "sha512-zrteXnqYxfQh7l5FHyL38jL39di8H8rHoecLH3JNxH3BwOrBsNeabdap5e0I23lD4HHI8W5VFBZqG4Eaq5LNcw==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-haste-map": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-haste-map/-/jest-haste-map-29.7.0.tgz", + "integrity": "sha512-fP8u2pyfqx0K1rGn1R9pyE0/KTn+G7PxktWidOBTqFPLYX0b9ksaMFkhK5vrS3DVun09pckLdlx90QthlW7AmA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/types": "^29.6.3", + "@types/graceful-fs": "^4.1.3", + "@types/node": "*", + "anymatch": "^3.0.3", + "fb-watchman": "^2.0.0", + "graceful-fs": "^4.2.9", + "jest-regex-util": "^29.6.3", + "jest-util": "^29.7.0", + "jest-worker": "^29.7.0", + "micromatch": "^4.0.4", + "walker": "^1.0.8" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + }, + "optionalDependencies": { + "fsevents": "^2.3.2" + } + }, + "node_modules/jest-leak-detector": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-leak-detector/-/jest-leak-detector-29.7.0.tgz", + "integrity": "sha512-kYA8IJcSYtST2BY9I+SMC32nDpBT3J2NvWJx8+JCuCdl/CR1I4EKUJROiP8XtCcxqgTTBGJNdbB1A8XRKbTetw==", + "dev": true, + "license": "MIT", + "dependencies": { + "jest-get-type": "^29.6.3", + "pretty-format": "^29.7.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-matcher-utils": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-29.7.0.tgz", + "integrity": "sha512-sBkD+Xi9DtcChsI3L3u0+N0opgPYnCRPtGcQYrgXmR+hmt/fYfWAL0xRXYU8eWOdfuLgBe0YCW3AFtnRLagq/g==", + "dev": true, + "license": "MIT", + "dependencies": { + "chalk": "^4.0.0", + "jest-diff": "^29.7.0", + "jest-get-type": "^29.6.3", + "pretty-format": "^29.7.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-message-util": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-29.7.0.tgz", + "integrity": "sha512-GBEV4GRADeP+qtB2+6u61stea8mGcOT4mCtrYISZwfu9/ISHFJ/5zOMXYbpBE9RsS5+Gb63DW4FgmnKJ79Kf6w==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/code-frame": "^7.12.13", + "@jest/types": "^29.6.3", + "@types/stack-utils": "^2.0.0", + "chalk": "^4.0.0", + "graceful-fs": "^4.2.9", + "micromatch": "^4.0.4", + "pretty-format": "^29.7.0", + "slash": "^3.0.0", + "stack-utils": "^2.0.3" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-mock": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-mock/-/jest-mock-29.7.0.tgz", + "integrity": "sha512-ITOMZn+UkYS4ZFh83xYAOzWStloNzJFO2s8DWrE4lhtGD+AorgnbkiKERe4wQVBydIGPx059g6riW5Btp6Llnw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/types": "^29.6.3", + "@types/node": "*", + "jest-util": "^29.7.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-pnp-resolver": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/jest-pnp-resolver/-/jest-pnp-resolver-1.2.3.tgz", + "integrity": "sha512-+3NpwQEnRoIBtx4fyhblQDPgJI0H1IEIkX7ShLUjPGA7TtUTvI1oiKi3SR4oBR0hQhQR80l4WAe5RrXBwWMA8w==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + }, + "peerDependencies": { + "jest-resolve": "*" + }, + "peerDependenciesMeta": { + "jest-resolve": { + "optional": true + } + } + }, + "node_modules/jest-regex-util": { + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/jest-regex-util/-/jest-regex-util-29.6.3.tgz", + "integrity": "sha512-KJJBsRCyyLNWCNBOvZyRDnAIfUiRJ8v+hOBQYGn8gDyF3UegwiP4gwRR3/SDa42g1YbVycTidUF3rKjyLFDWbg==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-resolve": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-resolve/-/jest-resolve-29.7.0.tgz", + "integrity": "sha512-IOVhZSrg+UvVAshDSDtHyFCCBUl/Q3AAJv8iZ6ZjnZ74xzvwuzLXid9IIIPgTnY62SJjfuupMKZsZQRsCvxEgA==", + "dev": true, + "license": "MIT", + "dependencies": { + "chalk": "^4.0.0", + "graceful-fs": "^4.2.9", + "jest-haste-map": "^29.7.0", + "jest-pnp-resolver": "^1.2.2", + "jest-util": "^29.7.0", + "jest-validate": "^29.7.0", + "resolve": "^1.20.0", + "resolve.exports": "^2.0.0", + "slash": "^3.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-resolve-dependencies": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-resolve-dependencies/-/jest-resolve-dependencies-29.7.0.tgz", + "integrity": "sha512-un0zD/6qxJ+S0et7WxeI3H5XSe9lTBBR7bOHCHXkKR6luG5mwDDlIzVQ0V5cZCuoTgEdcdwzTghYkTWfubi+nA==", + "dev": true, + "license": "MIT", + "dependencies": { + "jest-regex-util": "^29.6.3", + "jest-snapshot": "^29.7.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-runner": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-runner/-/jest-runner-29.7.0.tgz", + "integrity": "sha512-fsc4N6cPCAahybGBfTRcq5wFR6fpLznMg47sY5aDpsoejOcVYFb07AHuSnR0liMcPTgBsA3ZJL6kFOjPdoNipQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/console": "^29.7.0", + "@jest/environment": "^29.7.0", + "@jest/test-result": "^29.7.0", + "@jest/transform": "^29.7.0", + "@jest/types": "^29.6.3", + "@types/node": "*", + "chalk": "^4.0.0", + "emittery": "^0.13.1", + "graceful-fs": "^4.2.9", + "jest-docblock": "^29.7.0", + "jest-environment-node": "^29.7.0", + "jest-haste-map": "^29.7.0", + "jest-leak-detector": "^29.7.0", + "jest-message-util": "^29.7.0", + "jest-resolve": "^29.7.0", + "jest-runtime": "^29.7.0", + "jest-util": "^29.7.0", + "jest-watcher": "^29.7.0", + "jest-worker": "^29.7.0", + "p-limit": "^3.1.0", + "source-map-support": "0.5.13" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-runner/node_modules/source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true, + "license": "BSD-3-Clause", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/jest-runner/node_modules/source-map-support": { + "version": "0.5.13", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.13.tgz", + "integrity": "sha512-SHSKFHadjVA5oR4PPqhtAVdcBWwRYVd6g6cAXnIbRiIwc2EhPrTuKUBdSLvlEKyIP3GCf89fltvcZiP9MMFA1w==", + "dev": true, + "license": "MIT", + "dependencies": { + "buffer-from": "^1.0.0", + "source-map": "^0.6.0" + } + }, + "node_modules/jest-runtime": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-runtime/-/jest-runtime-29.7.0.tgz", + "integrity": "sha512-gUnLjgwdGqW7B4LvOIkbKs9WGbn+QLqRQQ9juC6HndeDiezIwhDP+mhMwHWCEcfQ5RUXa6OPnFF8BJh5xegwwQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/environment": "^29.7.0", + "@jest/fake-timers": "^29.7.0", + "@jest/globals": "^29.7.0", + "@jest/source-map": "^29.6.3", + "@jest/test-result": "^29.7.0", + "@jest/transform": "^29.7.0", + "@jest/types": "^29.6.3", + "@types/node": "*", + "chalk": "^4.0.0", + "cjs-module-lexer": "^1.0.0", + "collect-v8-coverage": "^1.0.0", + "glob": "^7.1.3", + "graceful-fs": "^4.2.9", + "jest-haste-map": "^29.7.0", + "jest-message-util": "^29.7.0", + "jest-mock": "^29.7.0", + "jest-regex-util": "^29.6.3", + "jest-resolve": "^29.7.0", + "jest-snapshot": "^29.7.0", + "jest-util": "^29.7.0", + "slash": "^3.0.0", + "strip-bom": "^4.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-runtime/node_modules/brace-expansion": { + "version": "1.1.12", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz", + "integrity": "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==", + "dev": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/jest-runtime/node_modules/glob": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "deprecated": "Glob versions prior to v9 are no longer supported", + "dev": true, + "license": "ISC", + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/jest-runtime/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "license": "ISC", + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/jest-snapshot": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-snapshot/-/jest-snapshot-29.7.0.tgz", + "integrity": "sha512-Rm0BMWtxBcioHr1/OX5YCP8Uov4riHvKPknOGs804Zg9JGZgmIBkbtlxJC/7Z4msKYVbIJtfU+tKb8xlYNfdkw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/core": "^7.11.6", + "@babel/generator": "^7.7.2", + "@babel/plugin-syntax-jsx": "^7.7.2", + "@babel/plugin-syntax-typescript": "^7.7.2", + "@babel/types": "^7.3.3", + "@jest/expect-utils": "^29.7.0", + "@jest/transform": "^29.7.0", + "@jest/types": "^29.6.3", + "babel-preset-current-node-syntax": "^1.0.0", + "chalk": "^4.0.0", + "expect": "^29.7.0", + "graceful-fs": "^4.2.9", + "jest-diff": "^29.7.0", + "jest-get-type": "^29.6.3", + "jest-matcher-utils": "^29.7.0", + "jest-message-util": "^29.7.0", + "jest-util": "^29.7.0", + "natural-compare": "^1.4.0", + "pretty-format": "^29.7.0", + "semver": "^7.5.3" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-util": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-29.7.0.tgz", + "integrity": "sha512-z6EbKajIpqGKU56y5KBUgy1dt1ihhQJgWzUlZHArA/+X2ad7Cb5iF+AK1EWVL/Bo7Rz9uurpqw6SiBCefUbCGA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/types": "^29.6.3", + "@types/node": "*", + "chalk": "^4.0.0", + "ci-info": "^3.2.0", + "graceful-fs": "^4.2.9", + "picomatch": "^2.2.3" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-util/node_modules/picomatch": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/jest-validate": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-validate/-/jest-validate-29.7.0.tgz", + "integrity": "sha512-ZB7wHqaRGVw/9hST/OuFUReG7M8vKeq0/J2egIGLdvjHCmYqGARhzXmtgi+gVeZ5uXFF219aOc3Ls2yLg27tkw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/types": "^29.6.3", + "camelcase": "^6.2.0", + "chalk": "^4.0.0", + "jest-get-type": "^29.6.3", + "leven": "^3.1.0", + "pretty-format": "^29.7.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-validate/node_modules/camelcase": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz", + "integrity": "sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/jest-watcher": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-watcher/-/jest-watcher-29.7.0.tgz", + "integrity": "sha512-49Fg7WXkU3Vl2h6LbLtMQ/HyB6rXSIX7SqvBLQmssRBGN9I0PNvPmAmCWSOY6SOvrjhI/F7/bGAv9RtnsPA03g==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/test-result": "^29.7.0", + "@jest/types": "^29.6.3", + "@types/node": "*", + "ansi-escapes": "^4.2.1", + "chalk": "^4.0.0", + "emittery": "^0.13.1", + "jest-util": "^29.7.0", + "string-length": "^4.0.1" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-worker": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-29.7.0.tgz", + "integrity": "sha512-eIz2msL/EzL9UFTFFx7jBTkeZfku0yUAyZZZmJ93H2TYEiroIx2PQjEXcwYtYl8zXCxb+PAmA2hLIt/6ZEkPHw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/node": "*", + "jest-util": "^29.7.0", + "merge-stream": "^2.0.0", + "supports-color": "^8.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-worker/node_modules/supports-color": { + "version": "8.1.1", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", + "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/supports-color?sponsor=1" + } + }, + "node_modules/js-tokens": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", + "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/js-yaml": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", + "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", + "license": "MIT", + "dependencies": { + "argparse": "^2.0.1" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, + "node_modules/jsesc": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-3.1.0.tgz", + "integrity": "sha512-/sM3dO2FOzXjKQhJuo0Q173wf2KOo8t4I8vHy6lF9poUp7bKT0/NHE8fPX23PwfhnykfqnC2xRxOnVw5XuGIaA==", + "dev": true, + "license": "MIT", + "bin": { + "jsesc": "bin/jsesc" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/json-buffer": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.1.tgz", + "integrity": "sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/json-parse-even-better-errors": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz", + "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==", + "dev": true, + "license": "MIT" + }, + "node_modules/json-schema-traverse": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", + "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==", + "dev": true, + "license": "MIT" + }, + "node_modules/json-stable-stringify-without-jsonify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", + "integrity": "sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==", + "dev": true, + "license": "MIT" + }, + "node_modules/json5": { + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz", + "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==", + "dev": true, + "license": "MIT", + "bin": { + "json5": "lib/cli.js" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/jsonc-parser": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/jsonc-parser/-/jsonc-parser-3.2.1.tgz", + "integrity": "sha512-AilxAyFOAcK5wA1+LeaySVBrHsGQvUFCDWXKpZjzaL0PqW+xfBOttn8GNtWKFWqneyMZj41MWF9Kl6iPWLwgOA==", + "dev": true, + "license": "MIT" + }, + "node_modules/jsonfile": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.2.0.tgz", + "integrity": "sha512-FGuPw30AdOIUTRMC2OMRtQV+jkVj2cfPqSeWXv1NEAJ1qZ5zb1X6z1mFhbfOB/iy3ssJCD+3KuZ8r8C3uVFlAg==", + "dev": true, + "license": "MIT", + "dependencies": { + "universalify": "^2.0.0" + }, + "optionalDependencies": { + "graceful-fs": "^4.1.6" + } + }, + "node_modules/jsonwebtoken": { + "version": "9.0.2", + "resolved": "https://registry.npmjs.org/jsonwebtoken/-/jsonwebtoken-9.0.2.tgz", + "integrity": "sha512-PRp66vJ865SSqOlgqS8hujT5U4AOgMfhrwYIuIhfKaoSCZcirrmASQr8CX7cUg+RMih+hgznrjp99o+W4pJLHQ==", + "license": "MIT", + "dependencies": { + "jws": "^3.2.2", + "lodash.includes": "^4.3.0", + "lodash.isboolean": "^3.0.3", + "lodash.isinteger": "^4.0.4", + "lodash.isnumber": "^3.0.3", + "lodash.isplainobject": "^4.0.6", + "lodash.isstring": "^4.0.1", + "lodash.once": "^4.0.0", + "ms": "^2.1.1", + "semver": "^7.5.4" + }, + "engines": { + "node": ">=12", + "npm": ">=6" + } + }, + "node_modules/jwa": { + "version": "1.4.2", + "resolved": "https://registry.npmjs.org/jwa/-/jwa-1.4.2.tgz", + "integrity": "sha512-eeH5JO+21J78qMvTIDdBXidBd6nG2kZjg5Ohz/1fpa28Z4CcsWUzJ1ZZyFq/3z3N17aZy+ZuBoHljASbL1WfOw==", + "license": "MIT", + "dependencies": { + "buffer-equal-constant-time": "^1.0.1", + "ecdsa-sig-formatter": "1.0.11", + "safe-buffer": "^5.0.1" + } + }, + "node_modules/jws": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/jws/-/jws-3.2.2.tgz", + "integrity": "sha512-YHlZCB6lMTllWDtSPHz/ZXTsi8S00usEV6v1tjq8tOUZzw7DpSDWVXjXDre6ed1w/pd495ODpHZYSdkRTsa0HA==", + "license": "MIT", + "dependencies": { + "jwa": "^1.4.1", + "safe-buffer": "^5.0.1" + } + }, + "node_modules/keyv": { + "version": "4.5.4", + "resolved": "https://registry.npmjs.org/keyv/-/keyv-4.5.4.tgz", + "integrity": "sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==", + "dev": true, + "license": "MIT", + "dependencies": { + "json-buffer": "3.0.1" + } + }, + "node_modules/kleur": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/kleur/-/kleur-3.0.3.tgz", + "integrity": "sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/leven": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/leven/-/leven-3.1.0.tgz", + "integrity": "sha512-qsda+H8jTaUaN/x5vzW2rzc+8Rw4TAQ/4KjB46IwK5VH+IlVeeeje/EoZRpiXvIqjFgK84QffqPztGI3VBLG1A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/levn": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", + "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "prelude-ls": "^1.2.1", + "type-check": "~0.4.0" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/libphonenumber-js": { + "version": "1.12.30", + "resolved": "https://registry.npmjs.org/libphonenumber-js/-/libphonenumber-js-1.12.30.tgz", + "integrity": "sha512-KxH7uIJFD6+cR6nhdh+wY6prFiH26A3W/W1gTMXnng2PXSwVfi5MhYkdq3Z2Y7vhBVa1/5VJgpNtI76UM2njGA==", + "license": "MIT" + }, + "node_modules/lines-and-columns": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.2.4.tgz", + "integrity": "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==", + "dev": true, + "license": "MIT" + }, + "node_modules/loader-runner": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/loader-runner/-/loader-runner-4.3.1.tgz", + "integrity": "sha512-IWqP2SCPhyVFTBtRcgMHdzlf9ul25NwaFx4wCEH/KjAXuuHY4yNjvPXsBokp8jCB936PyWRaPKUNh8NvylLp2Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.11.5" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" + } + }, + "node_modules/locate-path": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", + "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", + "dev": true, + "license": "MIT", + "dependencies": { + "p-locate": "^5.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/lodash": { + "version": "4.17.21", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", + "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", + "license": "MIT" + }, + "node_modules/lodash.includes": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/lodash.includes/-/lodash.includes-4.3.0.tgz", + "integrity": "sha512-W3Bx6mdkRTGtlJISOvVD/lbqjTlPPUDTMnlXZFnVwi9NKJ6tiAk6LVdlhZMm17VZisqhKcgzpO5Wz91PCt5b0w==", + "license": "MIT" + }, + "node_modules/lodash.isboolean": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/lodash.isboolean/-/lodash.isboolean-3.0.3.tgz", + "integrity": "sha512-Bz5mupy2SVbPHURB98VAcw+aHh4vRV5IPNhILUCsOzRmsTmSQ17jIuqopAentWoehktxGd9e/hbIXq980/1QJg==", + "license": "MIT" + }, + "node_modules/lodash.isinteger": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/lodash.isinteger/-/lodash.isinteger-4.0.4.tgz", + "integrity": "sha512-DBwtEWN2caHQ9/imiNeEA5ys1JoRtRfY3d7V9wkqtbycnAmTvRRmbHKDV4a0EYc678/dia0jrte4tjYwVBaZUA==", + "license": "MIT" + }, + "node_modules/lodash.isnumber": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/lodash.isnumber/-/lodash.isnumber-3.0.3.tgz", + "integrity": "sha512-QYqzpfwO3/CWf3XP+Z+tkQsfaLL/EnUlXWVkIk5FUPc4sBdTehEqZONuyRt2P67PXAk+NXmTBcc97zw9t1FQrw==", + "license": "MIT" + }, + "node_modules/lodash.isplainobject": { + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/lodash.isplainobject/-/lodash.isplainobject-4.0.6.tgz", + "integrity": "sha512-oSXzaWypCMHkPC3NvBEaPHf0KsA5mvPrOPgQWDsbg8n7orZ290M0BmC/jgRZ4vcJ6DTAhjrsSYgdsW/F+MFOBA==", + "license": "MIT" + }, + "node_modules/lodash.isstring": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/lodash.isstring/-/lodash.isstring-4.0.1.tgz", + "integrity": "sha512-0wJxfxH1wgO3GrbuP+dTTk7op+6L41QCXbGINEmD+ny/G/eCqGzxyCsh7159S+mgDDcoarnBw6PC1PS5+wUGgw==", + "license": "MIT" + }, + "node_modules/lodash.memoize": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/lodash.memoize/-/lodash.memoize-4.1.2.tgz", + "integrity": "sha512-t7j+NzmgnQzTAYXcsHYLgimltOV1MXHtlOWf6GjL9Kj8GK5FInw5JotxvbOs+IvV1/Dzo04/fCGfLVs7aXb4Ag==", + "dev": true, + "license": "MIT" + }, + "node_modules/lodash.merge": { + "version": "4.6.2", + "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", + "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/lodash.once": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/lodash.once/-/lodash.once-4.1.1.tgz", + "integrity": "sha512-Sb487aTOCr9drQVL8pIxOzVhafOjZN9UU54hiN8PU3uAiSV7lx1yYNpbNmex2PK6dSJoNTSJUUswT651yww3Mg==", + "license": "MIT" + }, + "node_modules/log-symbols": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-4.1.0.tgz", + "integrity": "sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg==", + "dev": true, + "license": "MIT", + "dependencies": { + "chalk": "^4.1.0", + "is-unicode-supported": "^0.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/lru-cache": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz", + "integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==", + "dev": true, + "license": "ISC", + "dependencies": { + "yallist": "^3.0.2" + } + }, + "node_modules/magic-string": { + "version": "0.30.8", + "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.8.tgz", + "integrity": "sha512-ISQTe55T2ao7XtlAStud6qwYPZjE4GK1S/BeVPus4jrq6JuOnQ00YKQC581RWhR122W7msZV263KzVeLoqidyQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/sourcemap-codec": "^1.4.15" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/make-dir": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-4.0.0.tgz", + "integrity": "sha512-hXdUTZYIVOt1Ex//jAQi+wTZZpUpwBj/0QsOzqegb3rGMMeJiSEu5xLHnYfBrRV4RH2+OCSOO95Is/7x1WJ4bw==", + "dev": true, + "license": "MIT", + "dependencies": { + "semver": "^7.5.3" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/make-error": { + "version": "1.3.6", + "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz", + "integrity": "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==", + "dev": true, + "license": "ISC" + }, + "node_modules/makeerror": { + "version": "1.0.12", + "resolved": "https://registry.npmjs.org/makeerror/-/makeerror-1.0.12.tgz", + "integrity": "sha512-JmqCvUhmt43madlpFzG4BQzG2Z3m6tvQDNKdClZnO3VbIudJYmxsT0FNJMeiB2+JTSlTQTSbU8QdesVmwJcmLg==", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "tmpl": "1.0.5" + } + }, + "node_modules/math-intrinsics": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/math-intrinsics/-/math-intrinsics-1.1.0.tgz", + "integrity": "sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/media-typer": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", + "integrity": "sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/memfs": { + "version": "3.5.3", + "resolved": "https://registry.npmjs.org/memfs/-/memfs-3.5.3.tgz", + "integrity": "sha512-UERzLsxzllchadvbPs5aolHh65ISpKpM+ccLbOJ8/vvpBKmAWf+la7dXFy7Mr0ySHbdHrFv5kGFCUHHe6GFEmw==", + "dev": true, + "license": "Unlicense", + "dependencies": { + "fs-monkey": "^1.0.4" + }, + "engines": { + "node": ">= 4.0.0" + } + }, + "node_modules/merge-descriptors": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.3.tgz", + "integrity": "sha512-gaNvAS7TZ897/rVaZ0nMtAyxNyi/pdbjbAwUpFQpN70GqnVfOiXpeUUMKRBmzXaSQ8DdTX4/0ms62r2K+hE6mQ==", + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/merge-stream": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", + "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==", + "dev": true, + "license": "MIT" + }, + "node_modules/merge2": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", + "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 8" + } + }, + "node_modules/methods": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", + "integrity": "sha512-iclAHeNqNm68zFtnZ0e+1L2yUIdvzNoauKU4WBA3VvH/vPFieF7qfRlwUZU+DA9P9bPXIS90ulxoUoCH23sV2w==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/micromatch": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz", + "integrity": "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==", + "dev": true, + "license": "MIT", + "dependencies": { + "braces": "^3.0.3", + "picomatch": "^2.3.1" + }, + "engines": { + "node": ">=8.6" + } + }, + "node_modules/micromatch/node_modules/picomatch": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/mime": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", + "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==", + "license": "MIT", + "bin": { + "mime": "cli.js" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/mime-db": { + "version": "1.52.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", + "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/mime-types": { + "version": "2.1.35", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", + "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", + "license": "MIT", + "dependencies": { + "mime-db": "1.52.0" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/mimic-fn": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", + "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/minimatch": { + "version": "9.0.3", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.3.tgz", + "integrity": "sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg==", + "dev": true, + "license": "ISC", + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/minimist": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz", + "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==", + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/minipass": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.1.2.tgz", + "integrity": "sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==", + "dev": true, + "license": "ISC", + "engines": { + "node": ">=16 || 14 >=14.17" + } + }, + "node_modules/mkdirp": { + "version": "0.5.6", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.6.tgz", + "integrity": "sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw==", + "license": "MIT", + "dependencies": { + "minimist": "^1.2.6" + }, + "bin": { + "mkdirp": "bin/cmd.js" + } + }, + "node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "license": "MIT" + }, + "node_modules/multer": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/multer/-/multer-2.0.2.tgz", + "integrity": "sha512-u7f2xaZ/UG8oLXHvtF/oWTRvT44p9ecwBBqTwgJVq0+4BW1g8OW01TyMEGWBHbyMOYVHXslaut7qEQ1meATXgw==", + "license": "MIT", + "dependencies": { + "append-field": "^1.0.0", + "busboy": "^1.6.0", + "concat-stream": "^2.0.0", + "mkdirp": "^0.5.6", + "object-assign": "^4.1.1", + "type-is": "^1.6.18", + "xtend": "^4.0.2" + }, + "engines": { + "node": ">= 10.16.0" + } + }, + "node_modules/mute-stream": { + "version": "0.0.8", + "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.8.tgz", + "integrity": "sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA==", + "dev": true, + "license": "ISC" + }, + "node_modules/natural-compare": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", + "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==", + "dev": true, + "license": "MIT" + }, + "node_modules/negotiator": { + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz", + "integrity": "sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/neo-async": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.2.tgz", + "integrity": "sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==", + "dev": true, + "license": "MIT" + }, + "node_modules/node-abort-controller": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/node-abort-controller/-/node-abort-controller-3.1.1.tgz", + "integrity": "sha512-AGK2yQKIjRuqnc6VkX2Xj5d+QW8xZ87pa1UK6yA6ouUyuxfHuMP6umE5QK7UmTeOAymo+Zx1Fxiuw9rVx8taHQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/node-emoji": { + "version": "1.11.0", + "resolved": "https://registry.npmjs.org/node-emoji/-/node-emoji-1.11.0.tgz", + "integrity": "sha512-wo2DpQkQp7Sjm2A0cq+sN7EHKO6Sl0ctXeBdFZrL9T9+UywORbufTcTZxom8YqpLQt/FqNMUkOpkZrJVYSKD3A==", + "dev": true, + "license": "MIT", + "dependencies": { + "lodash": "^4.17.21" + } + }, + "node_modules/node-fetch": { + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.7.0.tgz", + "integrity": "sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==", + "license": "MIT", + "dependencies": { + "whatwg-url": "^5.0.0" + }, + "engines": { + "node": "4.x || >=6.0.0" + }, + "peerDependencies": { + "encoding": "^0.1.0" + }, + "peerDependenciesMeta": { + "encoding": { + "optional": true + } + } + }, + "node_modules/node-int64": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/node-int64/-/node-int64-0.4.0.tgz", + "integrity": "sha512-O5lz91xSOeoXP6DulyHfllpq+Eg00MWitZIbtPfoSEvqIHdl5gfcY6hYzDWnj0qD5tz52PI08u9qUvSVeUBeHw==", + "dev": true, + "license": "MIT" + }, + "node_modules/node-releases": { + "version": "2.0.27", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.27.tgz", + "integrity": "sha512-nmh3lCkYZ3grZvqcCH+fjmQ7X+H0OeZgP40OierEaAptX4XofMh5kwNbWh7lBduUzCcV/8kZ+NDLCwm2iorIlA==", + "dev": true, + "license": "MIT" + }, + "node_modules/normalize-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", + "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/npm-run-path": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-4.0.1.tgz", + "integrity": "sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==", + "dev": true, + "license": "MIT", + "dependencies": { + "path-key": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/object-assign": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", + "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/object-inspect": { + "version": "1.13.4", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.4.tgz", + "integrity": "sha512-W67iLl4J2EXEGTbfeHCffrjDfitvLANg0UlX3wFUUSTx92KXRFegMHUVgSqE+wvhAbi4WqjGg9czysTV2Epbew==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/on-finished": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.4.1.tgz", + "integrity": "sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==", + "license": "MIT", + "dependencies": { + "ee-first": "1.1.1" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", + "dev": true, + "license": "ISC", + "dependencies": { + "wrappy": "1" + } + }, + "node_modules/onetime": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz", + "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==", + "dev": true, + "license": "MIT", + "dependencies": { + "mimic-fn": "^2.1.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/optionator": { + "version": "0.9.4", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.4.tgz", + "integrity": "sha512-6IpQ7mKUxRcZNLIObR0hz7lxsapSSIYNZJwXPGeF0mTVqGKFIXj1DQcMoT22S3ROcLyY/rz0PWaWZ9ayWmad9g==", + "dev": true, + "license": "MIT", + "dependencies": { + "deep-is": "^0.1.3", + "fast-levenshtein": "^2.0.6", + "levn": "^0.4.1", + "prelude-ls": "^1.2.1", + "type-check": "^0.4.0", + "word-wrap": "^1.2.5" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/ora": { + "version": "5.4.1", + "resolved": "https://registry.npmjs.org/ora/-/ora-5.4.1.tgz", + "integrity": "sha512-5b6Y85tPxZZ7QytO+BQzysW31HJku27cRIlkbAXaNx+BdcVi+LlRFmVXzeF6a7JCwJpyw5c4b+YSVImQIrBpuQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "bl": "^4.1.0", + "chalk": "^4.1.0", + "cli-cursor": "^3.1.0", + "cli-spinners": "^2.5.0", + "is-interactive": "^1.0.0", + "is-unicode-supported": "^0.1.0", + "log-symbols": "^4.1.0", + "strip-ansi": "^6.0.0", + "wcwidth": "^1.0.1" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/os-tmpdir": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", + "integrity": "sha512-D2FR03Vir7FIu45XBY20mTb+/ZSWB00sjU9jdQXt83gDrI4Ztz5Fs7/yy74g2N5SVQY4xY1qDr4rNddwYRVX0g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/p-limit": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", + "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "yocto-queue": "^0.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/p-locate": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", + "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", + "dev": true, + "license": "MIT", + "dependencies": { + "p-limit": "^3.0.2" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/p-try": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", + "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/package-json-from-dist": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/package-json-from-dist/-/package-json-from-dist-1.0.1.tgz", + "integrity": "sha512-UEZIS3/by4OC8vL3P2dTXRETpebLI2NiI5vIrjaD/5UtrkFX/tNbwjTSRAGC/+7CAo2pIcBaRgWmcBBHcsaCIw==", + "dev": true, + "license": "BlueOak-1.0.0" + }, + "node_modules/parent-module": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", + "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", + "dev": true, + "license": "MIT", + "dependencies": { + "callsites": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/parse-json": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.2.0.tgz", + "integrity": "sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/code-frame": "^7.0.0", + "error-ex": "^1.3.1", + "json-parse-even-better-errors": "^2.3.0", + "lines-and-columns": "^1.1.6" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/parseurl": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz", + "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==", + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/passport": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/passport/-/passport-0.7.0.tgz", + "integrity": "sha512-cPLl+qZpSc+ireUvt+IzqbED1cHHkDoVYMo30jbJIdOOjQ1MQYZBPiNvmi8UM6lJuOpTPXJGZQk0DtC4y61MYQ==", + "license": "MIT", + "peer": true, + "dependencies": { + "passport-strategy": "1.x.x", + "pause": "0.0.1", + "utils-merge": "^1.0.1" + }, + "engines": { + "node": ">= 0.4.0" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/jaredhanson" + } + }, + "node_modules/passport-jwt": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/passport-jwt/-/passport-jwt-4.0.1.tgz", + "integrity": "sha512-UCKMDYhNuGOBE9/9Ycuoyh7vP6jpeTp/+sfMJl7nLff/t6dps+iaeE0hhNkKN8/HZHcJ7lCdOyDxHdDoxoSvdQ==", + "license": "MIT", + "dependencies": { + "jsonwebtoken": "^9.0.0", + "passport-strategy": "^1.0.0" + } + }, + "node_modules/passport-strategy": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/passport-strategy/-/passport-strategy-1.0.0.tgz", + "integrity": "sha512-CB97UUvDKJde2V0KDWWB3lyf6PC3FaZP7YxZ2G8OAtn9p4HI9j9JLP9qjOGZFvyl8uwNT8qM+hGnz/n16NI7oA==", + "engines": { + "node": ">= 0.4.0" + } + }, + "node_modules/path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/path-key": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/path-parse": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", + "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", + "dev": true, + "license": "MIT" + }, + "node_modules/path-scurry": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-1.11.1.tgz", + "integrity": "sha512-Xa4Nw17FS9ApQFJ9umLiJS4orGjm7ZzwUrwamcGQuHSzDyth9boKDaycYdDcZDuqYATXw4HFXgaqWTctW/v1HA==", + "dev": true, + "license": "BlueOak-1.0.0", + "dependencies": { + "lru-cache": "^10.2.0", + "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0" + }, + "engines": { + "node": ">=16 || 14 >=14.18" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/path-scurry/node_modules/lru-cache": { + "version": "10.4.3", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.4.3.tgz", + "integrity": "sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==", + "dev": true, + "license": "ISC" + }, + "node_modules/path-to-regexp": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-3.3.0.tgz", + "integrity": "sha512-qyCH421YQPS2WFDxDjftfc1ZR5WKQzVzqsp4n9M2kQhVOo/ByahFoUNJfl58kOcEGfQ//7weFTDhm+ss8Ecxgw==", + "license": "MIT" + }, + "node_modules/path-type": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", + "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/pause": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/pause/-/pause-0.0.1.tgz", + "integrity": "sha512-KG8UEiEVkR3wGEb4m5yZkVCzigAD+cVEJck2CzYZO37ZGJfctvVptVO192MwrtPhzONn6go8ylnOdMhKqi4nfg==" + }, + "node_modules/picocolors": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz", + "integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==", + "dev": true, + "license": "ISC" + }, + "node_modules/picomatch": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.1.tgz", + "integrity": "sha512-xUXwsxNjwTQ8K3GnT4pCJm+xq3RUPQbmkYJTP5aFIfNIvbcc/4MUxgBaaRSZJ6yGJZiGSyYlM6MzwTsRk8SYCg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/pirates": { + "version": "4.0.7", + "resolved": "https://registry.npmjs.org/pirates/-/pirates-4.0.7.tgz", + "integrity": "sha512-TfySrs/5nm8fQJDcBDuUng3VOUKsd7S+zqvbOTiGXHfxX4wK31ard+hoNuvkicM/2YFzlpDgABOevKSsB4G/FA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 6" + } + }, + "node_modules/pkg-dir": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz", + "integrity": "sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "find-up": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/pkg-dir/node_modules/find-up": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", + "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", + "dev": true, + "license": "MIT", + "dependencies": { + "locate-path": "^5.0.0", + "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/pkg-dir/node_modules/locate-path": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", + "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", + "dev": true, + "license": "MIT", + "dependencies": { + "p-locate": "^4.1.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/pkg-dir/node_modules/p-limit": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", + "dev": true, + "license": "MIT", + "dependencies": { + "p-try": "^2.0.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/pkg-dir/node_modules/p-locate": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", + "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", + "dev": true, + "license": "MIT", + "dependencies": { + "p-limit": "^2.2.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/pluralize": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/pluralize/-/pluralize-8.0.0.tgz", + "integrity": "sha512-Nc3IT5yHzflTfbjgqWcCPpo7DaKy4FnpB0l/zCAW0Tc7jxAiuqSxHasntB3D7887LSrA93kDJ9IXovxJYxyLCA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/prelude-ls": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", + "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/prettier": { + "version": "3.7.3", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.7.3.tgz", + "integrity": "sha512-QgODejq9K3OzoBbuyobZlUhznP5SKwPqp+6Q6xw6o8gnhr4O85L2U915iM2IDcfF2NPXVaM9zlo9tdwipnYwzg==", + "dev": true, + "license": "MIT", + "peer": true, + "bin": { + "prettier": "bin/prettier.cjs" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/prettier/prettier?sponsor=1" + } + }, + "node_modules/prettier-linter-helpers": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/prettier-linter-helpers/-/prettier-linter-helpers-1.0.0.tgz", + "integrity": "sha512-GbK2cP9nraSSUF9N2XwUwqfzlAFlMNYYl+ShE/V+H8a9uNl/oUqB1w2EL54Jh0OlyRSd8RfWYJ3coVS4TROP2w==", + "dev": true, + "license": "MIT", + "dependencies": { + "fast-diff": "^1.1.2" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/pretty-format": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-29.7.0.tgz", + "integrity": "sha512-Pdlw/oPxN+aXdmM9R00JVC9WVFoCLTKJvDVLgmJ+qAffBMxsV85l/Lu7sNx4zSzPyoL2euImuEwHhOXdEgNFZQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/schemas": "^29.6.3", + "ansi-styles": "^5.0.0", + "react-is": "^18.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/pretty-format/node_modules/ansi-styles": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", + "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/prisma": { + "version": "5.22.0", + "resolved": "https://registry.npmjs.org/prisma/-/prisma-5.22.0.tgz", + "integrity": "sha512-vtpjW3XuYCSnMsNVBjLMNkTj6OZbudcPPTPYHqX0CJfpcdWciI1dM8uHETwmDxxiqEwCIE6WvXucWUetJgfu/A==", + "devOptional": true, + "hasInstallScript": true, + "license": "Apache-2.0", + "peer": true, + "dependencies": { + "@prisma/engines": "5.22.0" + }, + "bin": { + "prisma": "build/index.js" + }, + "engines": { + "node": ">=16.13" + }, + "optionalDependencies": { + "fsevents": "2.3.3" + } + }, + "node_modules/prompts": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/prompts/-/prompts-2.4.2.tgz", + "integrity": "sha512-NxNv/kLguCA7p3jE8oL2aEBsrJWgAakBpgmgK6lpPWV+WuOmY6r2/zbAVnP+T8bQlA0nzHXSJSJW0Hq7ylaD2Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "kleur": "^3.0.3", + "sisteransi": "^1.0.5" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/proxy-addr": { + "version": "2.0.7", + "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.7.tgz", + "integrity": "sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg==", + "license": "MIT", + "dependencies": { + "forwarded": "0.2.0", + "ipaddr.js": "1.9.1" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/proxy-from-env": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz", + "integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==", + "license": "MIT" + }, + "node_modules/punycode": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", + "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/pure-rand": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/pure-rand/-/pure-rand-6.1.0.tgz", + "integrity": "sha512-bVWawvoZoBYpp6yIoQtQXHZjmz35RSVHnUOTefl8Vcjr8snTPY1wnpSPMWekcFwbxI6gtmT7rSYPFvz71ldiOA==", + "dev": true, + "funding": [ + { + "type": "individual", + "url": "https://github.com/sponsors/dubzzz" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/fast-check" + } + ], + "license": "MIT" + }, + "node_modules/qs": { + "version": "6.13.0", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.13.0.tgz", + "integrity": "sha512-+38qI9SOr8tfZ4QmJNplMUxqjbe7LKvvZgWdExBOmd+egZTtjLB67Gu0HRX3u/XOq7UU2Nx6nsjvS16Z9uwfpg==", + "license": "BSD-3-Clause", + "dependencies": { + "side-channel": "^1.0.6" + }, + "engines": { + "node": ">=0.6" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/queue-microtask": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", + "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT" + }, + "node_modules/randombytes": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", + "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "safe-buffer": "^5.1.0" + } + }, + "node_modules/range-parser": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz", + "integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/raw-body": { + "version": "2.5.2", + "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.5.2.tgz", + "integrity": "sha512-8zGqypfENjCIqGhgXToC8aB2r7YrBX+AQAfIPs/Mlk+BtPTztOvTS01NRW/3Eh60J+a48lt8qsCzirQ6loCVfA==", + "license": "MIT", + "dependencies": { + "bytes": "3.1.2", + "http-errors": "2.0.0", + "iconv-lite": "0.4.24", + "unpipe": "1.0.0" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/react-is": { + "version": "18.3.1", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.3.1.tgz", + "integrity": "sha512-/LLMVyas0ljjAtoYiPqYiL8VWXzUUdThrmU5+n20DZv+a+ClRoevUzw5JxU+Ieh5/c87ytoTBV9G1FiKfNJdmg==", + "dev": true, + "license": "MIT" + }, + "node_modules/readable-stream": { + "version": "3.6.2", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", + "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", + "license": "MIT", + "dependencies": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/readdirp": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", + "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", + "dev": true, + "license": "MIT", + "dependencies": { + "picomatch": "^2.2.1" + }, + "engines": { + "node": ">=8.10.0" + } + }, + "node_modules/readdirp/node_modules/picomatch": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/reflect-metadata": { + "version": "0.1.14", + "resolved": "https://registry.npmjs.org/reflect-metadata/-/reflect-metadata-0.1.14.tgz", + "integrity": "sha512-ZhYeb6nRaXCfhnndflDK8qI6ZQ/YcWZCISRAWICW9XYqMUwjZM9Z0DveWX/ABN01oxSHwVxKQmxeYZSsm0jh5A==", + "license": "Apache-2.0", + "peer": true + }, + "node_modules/repeat-string": { + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/repeat-string/-/repeat-string-1.6.1.tgz", + "integrity": "sha512-PV0dzCYDNfRi1jCDbJzpW7jNNDRuCOG/jI5ctQcGKt/clZD+YcPS3yIlWuTJMmESC8aevCFmWJy5wjAFgNqN6w==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10" + } + }, + "node_modules/require-directory": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", + "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/require-from-string": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz", + "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/resolve": { + "version": "1.22.11", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.11.tgz", + "integrity": "sha512-RfqAvLnMl313r7c9oclB1HhUEAezcpLjz95wFH4LVuhk9JF/r22qmVP9AMmOU4vMX7Q8pN8jwNg/CSpdFnMjTQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-core-module": "^2.16.1", + "path-parse": "^1.0.7", + "supports-preserve-symlinks-flag": "^1.0.0" + }, + "bin": { + "resolve": "bin/resolve" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/resolve-cwd": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/resolve-cwd/-/resolve-cwd-3.0.0.tgz", + "integrity": "sha512-OrZaX2Mb+rJCpH/6CpSqt9xFVpN++x01XnN2ie9g6P5/3xelLAkXWVADpdz1IHD/KFfEXyE6V0U01OQ3UO2rEg==", + "dev": true, + "license": "MIT", + "dependencies": { + "resolve-from": "^5.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/resolve-cwd/node_modules/resolve-from": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", + "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/resolve-from": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", + "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/resolve.exports": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/resolve.exports/-/resolve.exports-2.0.3.tgz", + "integrity": "sha512-OcXjMsGdhL4XnbShKpAcSqPMzQoYkYyhbEaeSko47MjRP9NfEQMhZkXL1DoFlt9LWQn4YttrdnV6X2OiyzBi+A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + } + }, + "node_modules/restore-cursor": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-3.1.0.tgz", + "integrity": "sha512-l+sSefzHpj5qimhFSE5a8nufZYAM3sBSVMAPtYkmC+4EH2anSGaEMXSD0izRQbu9nfyQ9y5JrVmp7E8oZrUjvA==", + "dev": true, + "license": "MIT", + "dependencies": { + "onetime": "^5.1.0", + "signal-exit": "^3.0.2" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/restore-cursor/node_modules/signal-exit": { + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", + "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", + "dev": true, + "license": "ISC" + }, + "node_modules/reusify": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.1.0.tgz", + "integrity": "sha512-g6QUff04oZpHs0eG5p83rFLhHeV00ug/Yf9nZM6fLeUrPguBTkTQOdpAWWspMh55TZfVQDPaN3NQJfbVRAxdIw==", + "dev": true, + "license": "MIT", + "engines": { + "iojs": ">=1.0.0", + "node": ">=0.10.0" + } + }, + "node_modules/rimraf": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", + "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", + "deprecated": "Rimraf versions prior to v4 are no longer supported", + "dev": true, + "license": "ISC", + "dependencies": { + "glob": "^7.1.3" + }, + "bin": { + "rimraf": "bin.js" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/rimraf/node_modules/brace-expansion": { + "version": "1.1.12", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz", + "integrity": "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==", + "dev": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/rimraf/node_modules/glob": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "deprecated": "Glob versions prior to v9 are no longer supported", + "dev": true, + "license": "ISC", + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/rimraf/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "license": "ISC", + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/run-async": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/run-async/-/run-async-2.4.1.tgz", + "integrity": "sha512-tvVnVv01b8c1RrA6Ep7JkStj85Guv/YrMcwqYQnwjsAS2cTmmPGBBjAjpCW7RrSodNSoE2/qg9O4bceNvUuDgQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.12.0" + } + }, + "node_modules/run-parallel": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", + "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT", + "dependencies": { + "queue-microtask": "^1.2.2" + } + }, + "node_modules/rxjs": { + "version": "7.8.2", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-7.8.2.tgz", + "integrity": "sha512-dhKf903U/PQZY6boNNtAGdWbG85WAbjT/1xYoZIC7FAY0yWapOBQVsVrDl58W86//e1VpMNBtRV4MaXfdMySFA==", + "license": "Apache-2.0", + "peer": true, + "dependencies": { + "tslib": "^2.1.0" + } + }, + "node_modules/safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT" + }, + "node_modules/safer-buffer": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", + "license": "MIT" + }, + "node_modules/schema-utils": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.3.0.tgz", + "integrity": "sha512-pN/yOAvcC+5rQ5nERGuwrjLlYvLTbCibnZ1I7B1LaiAz9BRBlE9GMgE/eqV30P7aJQUf7Ddimy/RsbYO/GrVGg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/json-schema": "^7.0.8", + "ajv": "^6.12.5", + "ajv-keywords": "^3.5.2" + }, + "engines": { + "node": ">= 10.13.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" + } + }, + "node_modules/schema-utils/node_modules/ajv": { + "version": "6.12.6", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, + "node_modules/schema-utils/node_modules/ajv-keywords": { + "version": "3.5.2", + "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.5.2.tgz", + "integrity": "sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ==", + "dev": true, + "license": "MIT", + "peerDependencies": { + "ajv": "^6.9.1" + } + }, + "node_modules/schema-utils/node_modules/json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", + "dev": true, + "license": "MIT" + }, + "node_modules/semver": { + "version": "7.7.3", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.3.tgz", + "integrity": "sha512-SdsKMrI9TdgjdweUSR9MweHA4EJ8YxHn8DFaDisvhVlUOe4BF1tLD7GAj0lIqWVl+dPb/rExr0Btby5loQm20Q==", + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/send": { + "version": "0.19.0", + "resolved": "https://registry.npmjs.org/send/-/send-0.19.0.tgz", + "integrity": "sha512-dW41u5VfLXu8SJh5bwRmyYUbAoSB3c9uQh6L8h/KtsFREPWpbX1lrljJo186Jc4nmci/sGUZ9a0a0J2zgfq2hw==", + "license": "MIT", + "dependencies": { + "debug": "2.6.9", + "depd": "2.0.0", + "destroy": "1.2.0", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "etag": "~1.8.1", + "fresh": "0.5.2", + "http-errors": "2.0.0", + "mime": "1.6.0", + "ms": "2.1.3", + "on-finished": "2.4.1", + "range-parser": "~1.2.1", + "statuses": "2.0.1" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/send/node_modules/debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "license": "MIT", + "dependencies": { + "ms": "2.0.0" + } + }, + "node_modules/send/node_modules/debug/node_modules/ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", + "license": "MIT" + }, + "node_modules/send/node_modules/encodeurl": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", + "integrity": "sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w==", + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/serialize-javascript": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.2.tgz", + "integrity": "sha512-Saa1xPByTTq2gdeFZYLLo+RFE35NHZkAbqZeWNd3BpzppeVisAqpDjcp8dyf6uIvEqJRd46jemmyA4iFIeVk8g==", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "randombytes": "^2.1.0" + } + }, + "node_modules/serve-static": { + "version": "1.16.2", + "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.16.2.tgz", + "integrity": "sha512-VqpjJZKadQB/PEbEwvFdO43Ax5dFBZ2UECszz8bQ7pi7wt//PWe1P6MN7eCnjsatYtBT6EuiClbjSWP2WrIoTw==", + "license": "MIT", + "dependencies": { + "encodeurl": "~2.0.0", + "escape-html": "~1.0.3", + "parseurl": "~1.3.3", + "send": "0.19.0" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/set-function-length": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.2.2.tgz", + "integrity": "sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg==", + "dev": true, + "license": "MIT", + "dependencies": { + "define-data-property": "^1.1.4", + "es-errors": "^1.3.0", + "function-bind": "^1.1.2", + "get-intrinsic": "^1.2.4", + "gopd": "^1.0.1", + "has-property-descriptors": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/setprototypeof": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz", + "integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==", + "license": "ISC" + }, + "node_modules/shebang-command": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", + "dev": true, + "license": "MIT", + "dependencies": { + "shebang-regex": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/shebang-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/side-channel": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.1.0.tgz", + "integrity": "sha512-ZX99e6tRweoUXqR+VBrslhda51Nh5MTQwou5tnUDgbtyM0dBgmhEDtWGP/xbKn6hqfPRHujUNwz5fy/wbbhnpw==", + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "object-inspect": "^1.13.3", + "side-channel-list": "^1.0.0", + "side-channel-map": "^1.0.1", + "side-channel-weakmap": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/side-channel-list": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/side-channel-list/-/side-channel-list-1.0.0.tgz", + "integrity": "sha512-FCLHtRD/gnpCiCHEiJLOwdmFP+wzCmDEkc9y7NsYxeF4u7Btsn1ZuwgwJGxImImHicJArLP4R0yX4c2KCrMrTA==", + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "object-inspect": "^1.13.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/side-channel-map": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/side-channel-map/-/side-channel-map-1.0.1.tgz", + "integrity": "sha512-VCjCNfgMsby3tTdo02nbjtM/ewra6jPHmpThenkTYh8pG9ucZ/1P8So4u4FGBek/BjpOVsDCMoLA/iuBKIFXRA==", + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.2", + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.5", + "object-inspect": "^1.13.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/side-channel-weakmap": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/side-channel-weakmap/-/side-channel-weakmap-1.0.2.tgz", + "integrity": "sha512-WPS/HvHQTYnHisLo9McqBHOJk2FkHO/tlpvldyrnem4aeQp4hai3gythswg6p01oSoTl58rcpiFAjF2br2Ak2A==", + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.2", + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.5", + "object-inspect": "^1.13.3", + "side-channel-map": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/signal-exit": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz", + "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==", + "dev": true, + "license": "ISC", + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/sisteransi": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/sisteransi/-/sisteransi-1.0.5.tgz", + "integrity": "sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg==", + "dev": true, + "license": "MIT" + }, + "node_modules/slash": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", + "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/source-map": { + "version": "0.7.4", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.7.4.tgz", + "integrity": "sha512-l3BikUxvPOcn5E74dZiq5BGsTb5yEwhaTSzccU6t4sDOH8NWJCstKO5QT2CvtFoK6F0saL7p9xHAqHOlCPJygA==", + "dev": true, + "license": "BSD-3-Clause", + "engines": { + "node": ">= 8" + } + }, + "node_modules/source-map-support": { + "version": "0.5.21", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.21.tgz", + "integrity": "sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==", + "dev": true, + "license": "MIT", + "dependencies": { + "buffer-from": "^1.0.0", + "source-map": "^0.6.0" + } + }, + "node_modules/source-map-support/node_modules/source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true, + "license": "BSD-3-Clause", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/sprintf-js": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", + "integrity": "sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==", + "dev": true, + "license": "BSD-3-Clause" + }, + "node_modules/stack-utils": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/stack-utils/-/stack-utils-2.0.6.tgz", + "integrity": "sha512-XlkWvfIm6RmsWtNJx+uqtKLS8eqFbxUg0ZzLXqY0caEy9l7hruX8IpiDnjsLavoBgqCCR71TqWO8MaXYheJ3RQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "escape-string-regexp": "^2.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/stack-utils/node_modules/escape-string-regexp": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-2.0.0.tgz", + "integrity": "sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/statuses": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz", + "integrity": "sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==", + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/streamsearch": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/streamsearch/-/streamsearch-1.1.0.tgz", + "integrity": "sha512-Mcc5wHehp9aXz1ax6bZUyY5afg9u2rv5cqQI3mRrYkGC8rW2hM02jWuwjtL++LS5qinSyhj2QfLyNsuc+VsExg==", + "engines": { + "node": ">=10.0.0" + } + }, + "node_modules/string_decoder": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", + "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", + "license": "MIT", + "dependencies": { + "safe-buffer": "~5.2.0" + } + }, + "node_modules/string-length": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/string-length/-/string-length-4.0.2.tgz", + "integrity": "sha512-+l6rNN5fYHNhZZy41RXsYptCjA2Igmq4EG7kZAYFQI1E1VTXarr6ZPXBg6eq7Y6eK4FEhY6AJlyuFIb/v/S0VQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "char-regex": "^1.0.2", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dev": true, + "license": "MIT", + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/string-width-cjs": { + "name": "string-width", + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dev": true, + "license": "MIT", + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-ansi-cjs": { + "name": "strip-ansi", + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-bom": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-4.0.0.tgz", + "integrity": "sha512-3xurFv5tEgii33Zi8Jtp55wEIILR9eh34FAW00PZf+JnSsTmV/ioewSgQl97JHvgjoRGwPShsWm+IdrxB35d0w==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-final-newline": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-2.0.0.tgz", + "integrity": "sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/strip-json-comments": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", + "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/strtok3": { + "version": "10.3.4", + "resolved": "https://registry.npmjs.org/strtok3/-/strtok3-10.3.4.tgz", + "integrity": "sha512-KIy5nylvC5le1OdaaoCJ07L+8iQzJHGH6pWDuzS+d07Cu7n1MZ2x26P8ZKIWfbK02+XIL8Mp4RkWeqdUCrDMfg==", + "license": "MIT", + "dependencies": { + "@tokenizer/token": "^0.3.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/Borewit" + } + }, + "node_modules/superagent": { + "version": "8.1.2", + "resolved": "https://registry.npmjs.org/superagent/-/superagent-8.1.2.tgz", + "integrity": "sha512-6WTxW1EB6yCxV5VFOIPQruWGHqc3yI7hEmZK6h+pyk69Lk/Ut7rLUY6W/ONF2MjBuGjvmMiIpsrVJ2vjrHlslA==", + "deprecated": "Please upgrade to superagent v10.2.2+, see release notes at https://github.com/forwardemail/superagent/releases/tag/v10.2.2 - maintenance is supported by Forward Email @ https://forwardemail.net", + "dev": true, + "license": "MIT", + "dependencies": { + "component-emitter": "^1.3.0", + "cookiejar": "^2.1.4", + "debug": "^4.3.4", + "fast-safe-stringify": "^2.1.1", + "form-data": "^4.0.0", + "formidable": "^2.1.2", + "methods": "^1.1.2", + "mime": "2.6.0", + "qs": "^6.11.0", + "semver": "^7.3.8" + }, + "engines": { + "node": ">=6.4.0 <13 || >=14" + } + }, + "node_modules/superagent/node_modules/mime": { + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/mime/-/mime-2.6.0.tgz", + "integrity": "sha512-USPkMeET31rOMiarsBNIHZKLGgvKc/LrjofAnBlOttf5ajRvqiRA8QsenbcooctK6d6Ts6aqZXBA+XbkKthiQg==", + "dev": true, + "license": "MIT", + "bin": { + "mime": "cli.js" + }, + "engines": { + "node": ">=4.0.0" + } + }, + "node_modules/supertest": { + "version": "6.3.4", + "resolved": "https://registry.npmjs.org/supertest/-/supertest-6.3.4.tgz", + "integrity": "sha512-erY3HFDG0dPnhw4U+udPfrzXa4xhSG+n4rxfRuZWCUvjFWwKl+OxWf/7zk50s84/fAAs7vf5QAb9uRa0cCykxw==", + "deprecated": "Please upgrade to supertest v7.1.3+, see release notes at https://github.com/forwardemail/supertest/releases/tag/v7.1.3 - maintenance is supported by Forward Email @ https://forwardemail.net", + "dev": true, + "license": "MIT", + "dependencies": { + "methods": "^1.1.2", + "superagent": "^8.1.2" + }, + "engines": { + "node": ">=6.4.0" + } + }, + "node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "license": "MIT", + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/supports-preserve-symlinks-flag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", + "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/swagger-ui-dist": { + "version": "5.17.14", + "resolved": "https://registry.npmjs.org/swagger-ui-dist/-/swagger-ui-dist-5.17.14.tgz", + "integrity": "sha512-CVbSfaLpstV65OnSjbXfVd6Sta3q3F7Cj/yYuvHMp1P90LztOLs6PfUnKEVAeiIVQt9u2SaPwv0LiH/OyMjHRw==", + "license": "Apache-2.0" + }, + "node_modules/symbol-observable": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/symbol-observable/-/symbol-observable-4.0.0.tgz", + "integrity": "sha512-b19dMThMV4HVFynSAM1++gBHAbk2Tc/osgLIBZMKsyqh34jb2e8Os7T6ZW/Bt3pJFdBTd2JwAnAAEQV7rSNvcQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10" + } + }, + "node_modules/synckit": { + "version": "0.11.11", + "resolved": "https://registry.npmjs.org/synckit/-/synckit-0.11.11.tgz", + "integrity": "sha512-MeQTA1r0litLUf0Rp/iisCaL8761lKAZHaimlbGK4j0HysC4PLfqygQj9srcs0m2RdtDYnF8UuYyKpbjHYp7Jw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@pkgr/core": "^0.2.9" + }, + "engines": { + "node": "^14.18.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/synckit" + } + }, + "node_modules/tapable": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/tapable/-/tapable-2.3.0.tgz", + "integrity": "sha512-g9ljZiwki/LfxmQADO3dEY1CbpmXT5Hm2fJ+QaGKwSXUylMybePR7/67YW7jOrrvjEgL1Fmz5kzyAjWVWLlucg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" + } + }, + "node_modules/terser": { + "version": "5.44.1", + "resolved": "https://registry.npmjs.org/terser/-/terser-5.44.1.tgz", + "integrity": "sha512-t/R3R/n0MSwnnazuPpPNVO60LX0SKL45pyl9YlvxIdkH0Of7D5qM2EVe+yASRIlY5pZ73nclYJfNANGWPwFDZw==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "@jridgewell/source-map": "^0.3.3", + "acorn": "^8.15.0", + "commander": "^2.20.0", + "source-map-support": "~0.5.20" + }, + "bin": { + "terser": "bin/terser" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/terser-webpack-plugin": { + "version": "5.3.14", + "resolved": "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-5.3.14.tgz", + "integrity": "sha512-vkZjpUjb6OMS7dhV+tILUW6BhpDR7P2L/aQSAv+Uwk+m8KATX9EccViHTJR2qDtACKPIYndLGCyl3FMo+r2LMw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/trace-mapping": "^0.3.25", + "jest-worker": "^27.4.5", + "schema-utils": "^4.3.0", + "serialize-javascript": "^6.0.2", + "terser": "^5.31.1" + }, + "engines": { + "node": ">= 10.13.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" + }, + "peerDependencies": { + "webpack": "^5.1.0" + }, + "peerDependenciesMeta": { + "@swc/core": { + "optional": true + }, + "esbuild": { + "optional": true + }, + "uglify-js": { + "optional": true + } + } + }, + "node_modules/terser-webpack-plugin/node_modules/jest-worker": { + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-27.5.1.tgz", + "integrity": "sha512-7vuh85V5cdDofPyxn58nrPjBktZo0u9x1g8WtjQol+jZDaE+fhN+cIvTj11GndBnMnyfrUOG1sZQxCdjKh+DKg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/node": "*", + "merge-stream": "^2.0.0", + "supports-color": "^8.0.0" + }, + "engines": { + "node": ">= 10.13.0" + } + }, + "node_modules/terser-webpack-plugin/node_modules/schema-utils": { + "version": "4.3.3", + "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-4.3.3.tgz", + "integrity": "sha512-eflK8wEtyOE6+hsaRVPxvUKYCpRgzLqDTb8krvAsRIwOGlHoSgYLgBXoubGgLd2fT41/OUYdb48v4k4WWHQurA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/json-schema": "^7.0.9", + "ajv": "^8.9.0", + "ajv-formats": "^2.1.1", + "ajv-keywords": "^5.1.0" + }, + "engines": { + "node": ">= 10.13.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" + } + }, + "node_modules/terser-webpack-plugin/node_modules/supports-color": { + "version": "8.1.1", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", + "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/supports-color?sponsor=1" + } + }, + "node_modules/terser/node_modules/commander": { + "version": "2.20.3", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", + "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/test-exclude": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/test-exclude/-/test-exclude-6.0.0.tgz", + "integrity": "sha512-cAGWPIyOHU6zlmg88jwm7VRyXnMN7iV68OGAbYDk/Mh/xC/pzVPlQtY6ngoIH/5/tciuhGfvESU8GrHrcxD56w==", + "dev": true, + "license": "ISC", + "dependencies": { + "@istanbuljs/schema": "^0.1.2", + "glob": "^7.1.4", + "minimatch": "^3.0.4" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/test-exclude/node_modules/brace-expansion": { + "version": "1.1.12", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz", + "integrity": "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==", + "dev": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/test-exclude/node_modules/glob": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "deprecated": "Glob versions prior to v9 are no longer supported", + "dev": true, + "license": "ISC", + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/test-exclude/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "license": "ISC", + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/text-table": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", + "integrity": "sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==", + "dev": true, + "license": "MIT" + }, + "node_modules/through": { + "version": "2.3.8", + "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", + "integrity": "sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg==", + "dev": true, + "license": "MIT" + }, + "node_modules/tmp": { + "version": "0.0.33", + "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz", + "integrity": "sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==", + "dev": true, + "license": "MIT", + "dependencies": { + "os-tmpdir": "~1.0.2" + }, + "engines": { + "node": ">=0.6.0" + } + }, + "node_modules/tmpl": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/tmpl/-/tmpl-1.0.5.tgz", + "integrity": "sha512-3f0uOEAQwIqGuWW2MVzYg8fV/QNnc/IpuJNG837rLuczAaLVHslWHZQj4IGiEl5Hs3kkbhwL9Ab7Hrsmuj+Smw==", + "dev": true, + "license": "BSD-3-Clause" + }, + "node_modules/to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-number": "^7.0.0" + }, + "engines": { + "node": ">=8.0" + } + }, + "node_modules/toidentifier": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.1.tgz", + "integrity": "sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==", + "license": "MIT", + "engines": { + "node": ">=0.6" + } + }, + "node_modules/token-types": { + "version": "6.1.1", + "resolved": "https://registry.npmjs.org/token-types/-/token-types-6.1.1.tgz", + "integrity": "sha512-kh9LVIWH5CnL63Ipf0jhlBIy0UsrMj/NJDfpsy1SqOXlLKEVyXXYrnFxFT1yOOYVGBSApeVnjPw/sBz5BfEjAQ==", + "license": "MIT", + "dependencies": { + "@borewit/text-codec": "^0.1.0", + "@tokenizer/token": "^0.3.0", + "ieee754": "^1.2.1" + }, + "engines": { + "node": ">=14.16" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/Borewit" + } + }, + "node_modules/tr46": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", + "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==", + "license": "MIT" + }, + "node_modules/tree-kill": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/tree-kill/-/tree-kill-1.2.2.tgz", + "integrity": "sha512-L0Orpi8qGpRG//Nd+H90vFB+3iHnue1zSSGmNOOCh1GLJ7rUKVwV2HvijphGQS2UmhUZewS9VgvxYIdgr+fG1A==", + "dev": true, + "license": "MIT", + "bin": { + "tree-kill": "cli.js" + } + }, + "node_modules/ts-api-utils": { + "version": "1.4.3", + "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-1.4.3.tgz", + "integrity": "sha512-i3eMG77UTMD0hZhgRS562pv83RC6ukSAC2GMNWc+9dieh/+jDM5u5YG+NHX6VNDRHQcHwmsTHctP9LhbC3WxVw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=16" + }, + "peerDependencies": { + "typescript": ">=4.2.0" + } + }, + "node_modules/ts-jest": { + "version": "29.4.5", + "resolved": "https://registry.npmjs.org/ts-jest/-/ts-jest-29.4.5.tgz", + "integrity": "sha512-HO3GyiWn2qvTQA4kTgjDcXiMwYQt68a1Y8+JuLRVpdIzm+UOLSHgl/XqR4c6nzJkq5rOkjc02O2I7P7l/Yof0Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "bs-logger": "^0.2.6", + "fast-json-stable-stringify": "^2.1.0", + "handlebars": "^4.7.8", + "json5": "^2.2.3", + "lodash.memoize": "^4.1.2", + "make-error": "^1.3.6", + "semver": "^7.7.3", + "type-fest": "^4.41.0", + "yargs-parser": "^21.1.1" + }, + "bin": { + "ts-jest": "cli.js" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || ^18.0.0 || >=20.0.0" + }, + "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", + "jest": "^29.0.0 || ^30.0.0", + "jest-util": "^29.0.0 || ^30.0.0", + "typescript": ">=4.3 <6" + }, + "peerDependenciesMeta": { + "@babel/core": { + "optional": true + }, + "@jest/transform": { + "optional": true + }, + "@jest/types": { + "optional": true + }, + "babel-jest": { + "optional": true + }, + "esbuild": { + "optional": true + }, + "jest-util": { + "optional": true + } + } + }, + "node_modules/ts-jest/node_modules/type-fest": { + "version": "4.41.0", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-4.41.0.tgz", + "integrity": "sha512-TeTSQ6H5YHvpqVwBRcnLDCBnDOHWYu7IvGbHT6N8AOymcr9PJGjc1GTtiWZTYg0NCgYwvnYWEkVChQAr9bjfwA==", + "dev": true, + "license": "(MIT OR CC0-1.0)", + "engines": { + "node": ">=16" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/ts-loader": { + "version": "9.5.4", + "resolved": "https://registry.npmjs.org/ts-loader/-/ts-loader-9.5.4.tgz", + "integrity": "sha512-nCz0rEwunlTZiy6rXFByQU1kVVpCIgUpc/psFiKVrUwrizdnIbRFu8w7bxhUF0X613DYwT4XzrZHpVyMe758hQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "chalk": "^4.1.0", + "enhanced-resolve": "^5.0.0", + "micromatch": "^4.0.0", + "semver": "^7.3.4", + "source-map": "^0.7.4" + }, + "engines": { + "node": ">=12.0.0" + }, + "peerDependencies": { + "typescript": "*", + "webpack": "^5.0.0" + } + }, + "node_modules/ts-node": { + "version": "10.9.2", + "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.9.2.tgz", + "integrity": "sha512-f0FFpIdcHgn8zcPSbf1dRevwt047YMnaiJM3u2w2RewrB+fob/zePZcrOyQoLMMO7aBIddLcQIEK5dYjkLnGrQ==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "@cspotcode/source-map-support": "^0.8.0", + "@tsconfig/node10": "^1.0.7", + "@tsconfig/node12": "^1.0.7", + "@tsconfig/node14": "^1.0.0", + "@tsconfig/node16": "^1.0.2", + "acorn": "^8.4.1", + "acorn-walk": "^8.1.1", + "arg": "^4.1.0", + "create-require": "^1.1.0", + "diff": "^4.0.1", + "make-error": "^1.1.1", + "v8-compile-cache-lib": "^3.0.1", + "yn": "3.1.1" + }, + "bin": { + "ts-node": "dist/bin.js", + "ts-node-cwd": "dist/bin-cwd.js", + "ts-node-esm": "dist/bin-esm.js", + "ts-node-script": "dist/bin-script.js", + "ts-node-transpile-only": "dist/bin-transpile.js", + "ts-script": "dist/bin-script-deprecated.js" + }, + "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 + } + } + }, + "node_modules/tsconfig-paths": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-4.2.0.tgz", + "integrity": "sha512-NoZ4roiN7LnbKn9QqE1amc9DJfzvZXxF4xDavcOWt1BPkdx+m+0gJuPM+S0vCe7zTJMYUP0R8pO2XMr+Y8oLIg==", + "dev": true, + "license": "MIT", + "dependencies": { + "json5": "^2.2.2", + "minimist": "^1.2.6", + "strip-bom": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/tsconfig-paths-webpack-plugin": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/tsconfig-paths-webpack-plugin/-/tsconfig-paths-webpack-plugin-4.2.0.tgz", + "integrity": "sha512-zbem3rfRS8BgeNK50Zz5SIQgXzLafiHjOwUAvk/38/o1jHn/V5QAgVUcz884or7WYcPaH3N2CIfUc2u0ul7UcA==", + "dev": true, + "license": "MIT", + "dependencies": { + "chalk": "^4.1.0", + "enhanced-resolve": "^5.7.0", + "tapable": "^2.2.1", + "tsconfig-paths": "^4.1.2" + }, + "engines": { + "node": ">=10.13.0" + } + }, + "node_modules/tsconfig-paths/node_modules/strip-bom": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", + "integrity": "sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/tslib": { + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", + "license": "0BSD" + }, + "node_modules/type-check": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", + "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==", + "dev": true, + "license": "MIT", + "dependencies": { + "prelude-ls": "^1.2.1" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/type-detect": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz", + "integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/type-fest": { + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", + "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", + "dev": true, + "license": "(MIT OR CC0-1.0)", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/type-is": { + "version": "1.6.18", + "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz", + "integrity": "sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==", + "license": "MIT", + "dependencies": { + "media-typer": "0.3.0", + "mime-types": "~2.1.24" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/typedarray": { + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz", + "integrity": "sha512-/aCDEGatGvZ2BIk+HmLf4ifCJFwvKFNb9/JeZPMulfgFracn9QFcAf5GO8B/mweUjSoblS5In0cWhqpfs/5PQA==", + "license": "MIT" + }, + "node_modules/typescript": { + "version": "5.9.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.9.3.tgz", + "integrity": "sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw==", + "dev": true, + "license": "Apache-2.0", + "peer": true, + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=14.17" + } + }, + "node_modules/uglify-js": { + "version": "3.19.3", + "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.19.3.tgz", + "integrity": "sha512-v3Xu+yuwBXisp6QYTcH4UbH+xYJXqnq2m/LtQVWKWzYc1iehYnLixoQDN9FH6/j9/oybfd6W9Ghwkl8+UMKTKQ==", + "dev": true, + "license": "BSD-2-Clause", + "optional": true, + "bin": { + "uglifyjs": "bin/uglifyjs" + }, + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/uid": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/uid/-/uid-2.0.2.tgz", + "integrity": "sha512-u3xV3X7uzvi5b1MncmZo3i2Aw222Zk1keqLA1YkHldREkAhAqi65wuPfe7lHx8H/Wzy+8CE7S7uS3jekIM5s8g==", + "license": "MIT", + "dependencies": { + "@lukeed/csprng": "^1.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/uint8array-extras": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/uint8array-extras/-/uint8array-extras-1.5.0.tgz", + "integrity": "sha512-rvKSBiC5zqCCiDZ9kAOszZcDvdAHwwIKJG33Ykj43OKcWsnmcBRL09YTU4nOeHZ8Y2a7l1MgTd08SBe9A8Qj6A==", + "license": "MIT", + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/undici-types": { + "version": "6.21.0", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.21.0.tgz", + "integrity": "sha512-iwDZqg0QAGrg9Rav5H4n0M64c3mkR59cJ6wQp+7C4nI0gsmExaedaYLNO44eT4AtBBwjbTiGPMlt2Md0T9H9JQ==", + "license": "MIT" + }, + "node_modules/universalify": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.1.tgz", + "integrity": "sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 10.0.0" + } + }, + "node_modules/unpipe": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", + "integrity": "sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==", + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/update-browserslist-db": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.1.4.tgz", + "integrity": "sha512-q0SPT4xyU84saUX+tomz1WLkxUbuaJnR1xWt17M7fJtEJigJeWUNGUqrauFXsHnqev9y9JTRGwk13tFBuKby4A==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/browserslist" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "dependencies": { + "escalade": "^3.2.0", + "picocolors": "^1.1.1" + }, + "bin": { + "update-browserslist-db": "cli.js" + }, + "peerDependencies": { + "browserslist": ">= 4.21.0" + } + }, + "node_modules/uri-js": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", + "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "punycode": "^2.1.0" + } + }, + "node_modules/util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", + "license": "MIT" + }, + "node_modules/utils-merge": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz", + "integrity": "sha512-pMZTvIkT1d+TFGvDOqodOclx0QWkkgi6Tdoa8gC8ffGAAqz9pzPTZWAybbsHHoED/ztMtkv/VoYTYyShUn81hA==", + "license": "MIT", + "engines": { + "node": ">= 0.4.0" + } + }, + "node_modules/uuid": { + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-9.0.1.tgz", + "integrity": "sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA==", + "funding": [ + "https://github.com/sponsors/broofa", + "https://github.com/sponsors/ctavan" + ], + "license": "MIT", + "bin": { + "uuid": "dist/bin/uuid" + } + }, + "node_modules/v8-compile-cache-lib": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz", + "integrity": "sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==", + "dev": true, + "license": "MIT" + }, + "node_modules/v8-to-istanbul": { + "version": "9.3.0", + "resolved": "https://registry.npmjs.org/v8-to-istanbul/-/v8-to-istanbul-9.3.0.tgz", + "integrity": "sha512-kiGUalWN+rgBJ/1OHZsBtU4rXZOfj/7rKQxULKlIzwzQSvMJUUNgPwJEEh7gU6xEVxC0ahoOBvN2YI8GH6FNgA==", + "dev": true, + "license": "ISC", + "dependencies": { + "@jridgewell/trace-mapping": "^0.3.12", + "@types/istanbul-lib-coverage": "^2.0.1", + "convert-source-map": "^2.0.0" + }, + "engines": { + "node": ">=10.12.0" + } + }, + "node_modules/validator": { + "version": "13.15.23", + "resolved": "https://registry.npmjs.org/validator/-/validator-13.15.23.tgz", + "integrity": "sha512-4yoz1kEWqUjzi5zsPbAS/903QXSYp0UOtHsPpp7p9rHAw/W+dkInskAE386Fat3oKRROwO98d9ZB0G4cObgUyw==", + "license": "MIT", + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/vary": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", + "integrity": "sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==", + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/walker": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/walker/-/walker-1.0.8.tgz", + "integrity": "sha512-ts/8E8l5b7kY0vlWLewOkDXMmPdLcVV4GmOQLyxuSswIJsweeFZtAsMF7k1Nszz+TYBQrlYRmzOnr398y1JemQ==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "makeerror": "1.0.12" + } + }, + "node_modules/watchpack": { + "version": "2.4.4", + "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-2.4.4.tgz", + "integrity": "sha512-c5EGNOiyxxV5qmTtAB7rbiXxi1ooX1pQKMLX/MIabJjRA0SJBQOjKF+KSVfHkr9U1cADPon0mRiVe/riyaiDUA==", + "dev": true, + "license": "MIT", + "dependencies": { + "glob-to-regexp": "^0.4.1", + "graceful-fs": "^4.1.2" + }, + "engines": { + "node": ">=10.13.0" + } + }, + "node_modules/wcwidth": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/wcwidth/-/wcwidth-1.0.1.tgz", + "integrity": "sha512-XHPEwS0q6TaxcvG85+8EYkbiCux2XtWG2mkc47Ng2A77BQu9+DqIOJldST4HgPkuea7dvKSj5VgX3P1d4rW8Tg==", + "dev": true, + "license": "MIT", + "dependencies": { + "defaults": "^1.0.3" + } + }, + "node_modules/webidl-conversions": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", + "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==", + "license": "BSD-2-Clause" + }, + "node_modules/webpack": { + "version": "5.103.0", + "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.103.0.tgz", + "integrity": "sha512-HU1JOuV1OavsZ+mfigY0j8d1TgQgbZ6M+J75zDkpEAwYeXjWSqrGJtgnPblJjd/mAyTNQ7ygw0MiKOn6etz8yw==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "@types/eslint-scope": "^3.7.7", + "@types/estree": "^1.0.8", + "@types/json-schema": "^7.0.15", + "@webassemblyjs/ast": "^1.14.1", + "@webassemblyjs/wasm-edit": "^1.14.1", + "@webassemblyjs/wasm-parser": "^1.14.1", + "acorn": "^8.15.0", + "acorn-import-phases": "^1.0.3", + "browserslist": "^4.26.3", + "chrome-trace-event": "^1.0.2", + "enhanced-resolve": "^5.17.3", + "es-module-lexer": "^1.2.1", + "eslint-scope": "5.1.1", + "events": "^3.2.0", + "glob-to-regexp": "^0.4.1", + "graceful-fs": "^4.2.11", + "json-parse-even-better-errors": "^2.3.1", + "loader-runner": "^4.3.1", + "mime-types": "^2.1.27", + "neo-async": "^2.6.2", + "schema-utils": "^4.3.3", + "tapable": "^2.3.0", + "terser-webpack-plugin": "^5.3.11", + "watchpack": "^2.4.4", + "webpack-sources": "^3.3.3" + }, + "bin": { + "webpack": "bin/webpack.js" + }, + "engines": { + "node": ">=10.13.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" + }, + "peerDependenciesMeta": { + "webpack-cli": { + "optional": true + } + } + }, + "node_modules/webpack-node-externals": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/webpack-node-externals/-/webpack-node-externals-3.0.0.tgz", + "integrity": "sha512-LnL6Z3GGDPht/AigwRh2dvL9PQPFQ8skEpVrWZXLWBYmqcaojHNN0onvHzie6rq7EWKrrBfPYqNEzTJgiwEQDQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/webpack-sources": { + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/webpack-sources/-/webpack-sources-3.3.3.tgz", + "integrity": "sha512-yd1RBzSGanHkitROoPFd6qsrxt+oFhg/129YzheDGqeustzX0vTZJZsSsQjVQC4yzBQ56K55XU8gaNCtIzOnTg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10.13.0" + } + }, + "node_modules/webpack/node_modules/eslint-scope": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz", + "integrity": "sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "esrecurse": "^4.3.0", + "estraverse": "^4.1.1" + }, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/webpack/node_modules/estraverse": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz", + "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==", + "dev": true, + "license": "BSD-2-Clause", + "engines": { + "node": ">=4.0" + } + }, + "node_modules/webpack/node_modules/schema-utils": { + "version": "4.3.3", + "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-4.3.3.tgz", + "integrity": "sha512-eflK8wEtyOE6+hsaRVPxvUKYCpRgzLqDTb8krvAsRIwOGlHoSgYLgBXoubGgLd2fT41/OUYdb48v4k4WWHQurA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/json-schema": "^7.0.9", + "ajv": "^8.9.0", + "ajv-formats": "^2.1.1", + "ajv-keywords": "^5.1.0" + }, + "engines": { + "node": ">= 10.13.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" + } + }, + "node_modules/whatwg-url": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", + "integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==", + "license": "MIT", + "dependencies": { + "tr46": "~0.0.3", + "webidl-conversions": "^3.0.0" + } + }, + "node_modules/which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "dev": true, + "license": "ISC", + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "node-which": "bin/node-which" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/word-wrap": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.5.tgz", + "integrity": "sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/wordwrap": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz", + "integrity": "sha512-gvVzJFlPycKc5dZN4yPkP8w7Dc37BtP1yczEneOb4uq34pXZcvrtRTmWV8W+Ume+XCxKgbjM+nevkyFPMybd4Q==", + "dev": true, + "license": "MIT" + }, + "node_modules/wrap-ansi": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-6.2.0.tgz", + "integrity": "sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/wrap-ansi-cjs": { + "name": "wrap-ansi", + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", + "dev": true, + "license": "ISC" + }, + "node_modules/write-file-atomic": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-4.0.2.tgz", + "integrity": "sha512-7KxauUdBmSdWnmpaGFg+ppNjKF8uNLry8LyzjauQDOVONfFLNKrKvQOxZ/VuTIcS/gge/YNahf5RIIQWTSarlg==", + "dev": true, + "license": "ISC", + "dependencies": { + "imurmurhash": "^0.1.4", + "signal-exit": "^3.0.7" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + } + }, + "node_modules/write-file-atomic/node_modules/signal-exit": { + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", + "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", + "dev": true, + "license": "ISC" + }, + "node_modules/xtend": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz", + "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==", + "license": "MIT", + "engines": { + "node": ">=0.4" + } + }, + "node_modules/y18n": { + "version": "5.0.8", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", + "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", + "dev": true, + "license": "ISC", + "engines": { + "node": ">=10" + } + }, + "node_modules/yallist": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", + "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==", + "dev": true, + "license": "ISC" + }, + "node_modules/yargs": { + "version": "17.7.2", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz", + "integrity": "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==", + "dev": true, + "license": "MIT", + "dependencies": { + "cliui": "^8.0.1", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", + "require-directory": "^2.1.1", + "string-width": "^4.2.3", + "y18n": "^5.0.5", + "yargs-parser": "^21.1.1" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/yargs-parser": { + "version": "21.1.1", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", + "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==", + "dev": true, + "license": "ISC", + "engines": { + "node": ">=12" + } + }, + "node_modules/yn": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/yn/-/yn-3.1.1.tgz", + "integrity": "sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/yocto-queue": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", + "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + } + } +} diff --git a/backend/services/planting-service/package.json b/backend/services/planting-service/package.json index e69de29b..61ef63b1 100644 --- a/backend/services/planting-service/package.json +++ b/backend/services/planting-service/package.json @@ -0,0 +1,92 @@ +{ + "name": "planting-service", + "version": "1.0.0", + "description": "RWA Durian Queen Planting Service", + "author": "", + "private": true, + "license": "UNLICENSED", + "scripts": { + "build": "nest build", + "format": "prettier --write \"src/**/*.ts\" \"test/**/*.ts\"", + "start": "nest start", + "start:dev": "nest start --watch", + "start:debug": "nest start --debug --watch", + "start:prod": "node dist/main", + "lint": "eslint \"{src,apps,libs,test}/**/*.ts\" --fix", + "test": "jest", + "test:watch": "jest --watch", + "test:cov": "jest --coverage", + "test:debug": "node --inspect-brk -r tsconfig-paths/register -r ts-node/register node_modules/.bin/jest --runInBand", + "test:e2e": "jest --config ./test/jest-e2e.json", + "prisma:generate": "prisma generate", + "prisma:migrate": "prisma migrate dev", + "prisma:migrate:prod": "prisma migrate deploy", + "prisma:studio": "prisma studio" + }, + "dependencies": { + "@nestjs/common": "^10.0.0", + "@nestjs/config": "^3.1.1", + "@nestjs/core": "^10.0.0", + "@nestjs/platform-express": "^10.0.0", + "@nestjs/swagger": "^7.1.17", + "@nestjs/axios": "^3.0.1", + "@nestjs/jwt": "^10.2.0", + "@nestjs/passport": "^10.0.3", + "@prisma/client": "^5.7.0", + "class-transformer": "^0.5.1", + "class-validator": "^0.14.0", + "jsonwebtoken": "^9.0.0", + "passport": "^0.7.0", + "passport-jwt": "^4.0.1", + "reflect-metadata": "^0.1.13", + "rxjs": "^7.8.1", + "uuid": "^9.0.0" + }, + "devDependencies": { + "@nestjs/cli": "^10.0.0", + "@nestjs/schematics": "^10.0.0", + "@nestjs/testing": "^10.0.0", + "@types/express": "^4.17.17", + "@types/jest": "^29.5.2", + "@types/jsonwebtoken": "^9.0.0", + "@types/node": "^20.3.1", + "@types/passport-jwt": "^4.0.0", + "@types/supertest": "^2.0.12", + "@types/uuid": "^9.0.0", + "@typescript-eslint/eslint-plugin": "^6.0.0", + "@typescript-eslint/parser": "^6.0.0", + "eslint": "^8.42.0", + "eslint-config-prettier": "^9.0.0", + "eslint-plugin-prettier": "^5.0.0", + "jest": "^29.5.0", + "prettier": "^3.0.0", + "prisma": "^5.7.0", + "source-map-support": "^0.5.21", + "supertest": "^6.3.3", + "ts-jest": "^29.1.0", + "ts-loader": "^9.4.3", + "ts-node": "^10.9.1", + "tsconfig-paths": "^4.2.0", + "typescript": "^5.1.3" + }, + "jest": { + "moduleFileExtensions": [ + "js", + "json", + "ts" + ], + "rootDir": "src", + "testRegex": ".*\\.spec\\.ts$", + "transform": { + "^.+\\.(t|j)s$": "ts-jest" + }, + "collectCoverageFrom": [ + "**/*.(t|j)s" + ], + "coverageDirectory": "../coverage", + "testEnvironment": "node", + "moduleNameMapper": { + "^@/(.*)$": "/$1" + } + } +} diff --git a/backend/services/planting-service/prisma/schema.prisma b/backend/services/planting-service/prisma/schema.prisma new file mode 100644 index 00000000..1828eec3 --- /dev/null +++ b/backend/services/planting-service/prisma/schema.prisma @@ -0,0 +1,197 @@ +generator client { + provider = "prisma-client-js" +} + +datasource db { + provider = "postgresql" + url = env("DATABASE_URL") +} + +// ============================================ +// 认种订单表 (状态表) +// ============================================ +model PlantingOrder { + id BigInt @id @default(autoincrement()) @map("order_id") + orderNo String @unique @map("order_no") @db.VarChar(50) + userId BigInt @map("user_id") + + // 认种信息 + treeCount Int @map("tree_count") + totalAmount Decimal @map("total_amount") @db.Decimal(20, 8) + + // 省市选择 (不可修改) + selectedProvince String? @map("selected_province") @db.VarChar(10) + selectedCity String? @map("selected_city") @db.VarChar(10) + provinceCitySelectedAt DateTime? @map("province_city_selected_at") + provinceCityConfirmedAt DateTime? @map("province_city_confirmed_at") + + // 订单状态 + status String @default("CREATED") @map("status") @db.VarChar(30) + + // 底池信息 + poolInjectionBatchId BigInt? @map("pool_injection_batch_id") + poolInjectionScheduledTime DateTime? @map("pool_injection_scheduled_time") + poolInjectionActualTime DateTime? @map("pool_injection_actual_time") + poolInjectionTxHash String? @map("pool_injection_tx_hash") @db.VarChar(100) + + // 挖矿 + miningEnabledAt DateTime? @map("mining_enabled_at") + + // 时间戳 + createdAt DateTime @default(now()) @map("created_at") + paidAt DateTime? @map("paid_at") + fundAllocatedAt DateTime? @map("fund_allocated_at") + updatedAt DateTime @updatedAt @map("updated_at") + + // 关联 + fundAllocations FundAllocation[] + batch PoolInjectionBatch? @relation(fields: [poolInjectionBatchId], references: [id]) + + @@index([userId]) + @@index([orderNo]) + @@index([status]) + @@index([poolInjectionBatchId]) + @@index([selectedProvince, selectedCity]) + @@index([createdAt]) + @@index([paidAt]) + @@map("planting_orders") +} + +// ============================================ +// 资金分配明细表 (行为表, append-only) +// ============================================ +model FundAllocation { + id BigInt @id @default(autoincrement()) @map("allocation_id") + orderId BigInt @map("order_id") + + // 分配信息 + targetType String @map("target_type") @db.VarChar(50) + amount Decimal @map("amount") @db.Decimal(20, 8) + targetAccountId String? @map("target_account_id") @db.VarChar(100) + + // 元数据 + metadata Json? @map("metadata") + + createdAt DateTime @default(now()) @map("created_at") + + // 关联 + order PlantingOrder @relation(fields: [orderId], references: [id]) + + @@index([orderId]) + @@index([targetType, targetAccountId]) + @@index([createdAt]) + @@map("fund_allocations") +} + +// ============================================ +// 用户持仓表 (状态表) +// ============================================ +model PlantingPosition { + id BigInt @id @default(autoincrement()) @map("position_id") + userId BigInt @unique @map("user_id") + + // 持仓统计 + totalTreeCount Int @default(0) @map("total_tree_count") + effectiveTreeCount Int @default(0) @map("effective_tree_count") + pendingTreeCount Int @default(0) @map("pending_tree_count") + + // 挖矿状态 + firstMiningStartAt DateTime? @map("first_mining_start_at") + + createdAt DateTime @default(now()) @map("created_at") + updatedAt DateTime @updatedAt @map("updated_at") + + // 关联 + distributions PositionDistribution[] + + @@index([userId]) + @@index([totalTreeCount]) + @@map("planting_positions") +} + +// ============================================ +// 持仓省市分布表 +// ============================================ +model PositionDistribution { + id BigInt @id @default(autoincrement()) @map("distribution_id") + userId BigInt @map("user_id") + + // 省市信息 + provinceCode String? @map("province_code") @db.VarChar(10) + cityCode String? @map("city_code") @db.VarChar(10) + + // 数量 + treeCount Int @default(0) @map("tree_count") + + createdAt DateTime @default(now()) @map("created_at") + updatedAt DateTime @updatedAt @map("updated_at") + + // 关联 + position PlantingPosition @relation(fields: [userId], references: [userId]) + + @@unique([userId, provinceCode, cityCode]) + @@index([userId]) + @@index([provinceCode]) + @@index([cityCode]) + @@map("position_province_city_distribution") +} + +// ============================================ +// 底池注入批次表 (状态表) +// ============================================ +model PoolInjectionBatch { + id BigInt @id @default(autoincrement()) @map("batch_id") + batchNo String @unique @map("batch_no") @db.VarChar(50) + + // 批次时间窗口 (5天) + startDate DateTime @map("start_date") @db.Date + endDate DateTime @map("end_date") @db.Date + + // 统计信息 + orderCount Int @default(0) @map("order_count") + totalAmount Decimal @default(0) @map("total_amount") @db.Decimal(20, 8) + + // 注入状态 + status String @default("PENDING") @map("status") @db.VarChar(20) + scheduledInjectionTime DateTime? @map("scheduled_injection_time") + actualInjectionTime DateTime? @map("actual_injection_time") + injectionTxHash String? @map("injection_tx_hash") @db.VarChar(100) + + createdAt DateTime @default(now()) @map("created_at") + updatedAt DateTime @updatedAt @map("updated_at") + + // 关联 + orders PlantingOrder[] + + @@index([batchNo]) + @@index([startDate, endDate]) + @@index([status]) + @@index([scheduledInjectionTime]) + @@map("pool_injection_batches") +} + +// ============================================ +// 认种事件表 (行为表, append-only) +// ============================================ +model PlantingEvent { + id BigInt @id @default(autoincrement()) @map("event_id") + eventType String @map("event_type") @db.VarChar(50) + + // 聚合根信息 + aggregateId String @map("aggregate_id") @db.VarChar(100) + aggregateType String @map("aggregate_type") @db.VarChar(50) + + // 事件数据 + eventData Json @map("event_data") + + // 元数据 + userId BigInt? @map("user_id") + occurredAt DateTime @default(now()) @map("occurred_at") + version Int @default(1) @map("version") + + @@index([aggregateType, aggregateId]) + @@index([eventType]) + @@index([userId]) + @@index([occurredAt]) + @@map("planting_events") +} diff --git a/backend/services/planting-service/src/api/api.module.ts b/backend/services/planting-service/src/api/api.module.ts new file mode 100644 index 00000000..fa21a53b --- /dev/null +++ b/backend/services/planting-service/src/api/api.module.ts @@ -0,0 +1,17 @@ +import { Module } from '@nestjs/common'; +import { PlantingOrderController } from './controllers/planting-order.controller'; +import { PlantingPositionController } from './controllers/planting-position.controller'; +import { HealthController } from './controllers/health.controller'; +import { ApplicationModule } from '../application/application.module'; +import { JwtAuthGuard } from './guards/jwt-auth.guard'; + +@Module({ + imports: [ApplicationModule], + controllers: [ + PlantingOrderController, + PlantingPositionController, + HealthController, + ], + providers: [JwtAuthGuard], +}) +export class ApiModule {} diff --git a/backend/services/planting-service/src/api/controllers/health.controller.ts b/backend/services/planting-service/src/api/controllers/health.controller.ts new file mode 100644 index 00000000..5f6e1b4e --- /dev/null +++ b/backend/services/planting-service/src/api/controllers/health.controller.ts @@ -0,0 +1,27 @@ +import { Controller, Get } from '@nestjs/common'; +import { ApiTags, ApiOperation, ApiResponse } from '@nestjs/swagger'; + +@ApiTags('健康检查') +@Controller('health') +export class HealthController { + @Get() + @ApiOperation({ summary: '健康检查' }) + @ApiResponse({ status: 200, description: '服务正常' }) + check() { + return { + status: 'ok', + timestamp: new Date().toISOString(), + service: 'planting-service', + }; + } + + @Get('ready') + @ApiOperation({ summary: '就绪检查' }) + @ApiResponse({ status: 200, description: '服务就绪' }) + ready() { + return { + status: 'ready', + timestamp: new Date().toISOString(), + }; + } +} diff --git a/backend/services/planting-service/src/api/controllers/index.ts b/backend/services/planting-service/src/api/controllers/index.ts new file mode 100644 index 00000000..e6543dac --- /dev/null +++ b/backend/services/planting-service/src/api/controllers/index.ts @@ -0,0 +1,3 @@ +export * from './planting-order.controller'; +export * from './planting-position.controller'; +export * from './health.controller'; diff --git a/backend/services/planting-service/src/api/controllers/planting-order.controller.ts b/backend/services/planting-service/src/api/controllers/planting-order.controller.ts new file mode 100644 index 00000000..f68f86b8 --- /dev/null +++ b/backend/services/planting-service/src/api/controllers/planting-order.controller.ts @@ -0,0 +1,187 @@ +import { + Controller, + Post, + Get, + Body, + Param, + Query, + UseGuards, + Req, + HttpCode, + HttpStatus, + NotFoundException, +} from '@nestjs/common'; +import { + ApiTags, + ApiOperation, + ApiResponse, + ApiBearerAuth, + ApiParam, +} from '@nestjs/swagger'; +import { PlantingApplicationService } from '../../application/services/planting-application.service'; +import { CreatePlantingOrderDto } from '../dto/request/create-planting-order.dto'; +import { SelectProvinceCityDto } from '../dto/request/select-province-city.dto'; +import { PaginationDto } from '../dto/request/pagination.dto'; +import { + CreateOrderResponse, + SelectProvinceCityResponse, + ConfirmProvinceCityResponse, + PayOrderResponse, + PlantingOrderResponse, +} from '../dto/response/planting-order.response'; +import { JwtAuthGuard } from '../guards/jwt-auth.guard'; + +interface AuthenticatedRequest { + user: { id: string }; +} + +@ApiTags('认种订单') +@ApiBearerAuth() +@Controller('planting') +@UseGuards(JwtAuthGuard) +export class PlantingOrderController { + constructor( + private readonly plantingService: PlantingApplicationService, + ) {} + + @Post('orders') + @HttpCode(HttpStatus.CREATED) + @ApiOperation({ summary: '创建认种订单' }) + @ApiResponse({ + status: HttpStatus.CREATED, + description: '订单创建成功', + type: CreateOrderResponse, + }) + @ApiResponse({ status: HttpStatus.BAD_REQUEST, description: '参数错误' }) + @ApiResponse({ status: HttpStatus.UNAUTHORIZED, description: '未授权' }) + async createOrder( + @Req() req: AuthenticatedRequest, + @Body() dto: CreatePlantingOrderDto, + ): Promise { + const userId = BigInt(req.user.id); + return this.plantingService.createOrder(userId, dto.treeCount); + } + + @Post('orders/:orderNo/select-province-city') + @HttpCode(HttpStatus.OK) + @ApiOperation({ summary: '选择省市' }) + @ApiParam({ name: 'orderNo', description: '订单号' }) + @ApiResponse({ + status: HttpStatus.OK, + description: '省市选择成功', + type: SelectProvinceCityResponse, + }) + @ApiResponse({ status: HttpStatus.BAD_REQUEST, description: '参数错误' }) + @ApiResponse({ status: HttpStatus.NOT_FOUND, description: '订单不存在' }) + async selectProvinceCity( + @Req() req: AuthenticatedRequest, + @Param('orderNo') orderNo: string, + @Body() dto: SelectProvinceCityDto, + ): Promise { + const userId = BigInt(req.user.id); + return this.plantingService.selectProvinceCity( + orderNo, + userId, + dto.provinceCode, + dto.provinceName, + dto.cityCode, + dto.cityName, + ); + } + + @Post('orders/:orderNo/confirm-province-city') + @HttpCode(HttpStatus.OK) + @ApiOperation({ summary: '确认省市选择(5秒后调用)' }) + @ApiParam({ name: 'orderNo', description: '订单号' }) + @ApiResponse({ + status: HttpStatus.OK, + description: '省市确认成功', + type: ConfirmProvinceCityResponse, + }) + @ApiResponse({ status: HttpStatus.BAD_REQUEST, description: '还需等待5秒' }) + @ApiResponse({ status: HttpStatus.NOT_FOUND, description: '订单不存在' }) + async confirmProvinceCity( + @Req() req: AuthenticatedRequest, + @Param('orderNo') orderNo: string, + ): Promise { + const userId = BigInt(req.user.id); + return this.plantingService.confirmProvinceCity(orderNo, userId); + } + + @Post('orders/:orderNo/pay') + @HttpCode(HttpStatus.OK) + @ApiOperation({ summary: '支付认种订单' }) + @ApiParam({ name: 'orderNo', description: '订单号' }) + @ApiResponse({ + status: HttpStatus.OK, + description: '支付成功', + type: PayOrderResponse, + }) + @ApiResponse({ status: HttpStatus.BAD_REQUEST, description: '余额不足或状态错误' }) + @ApiResponse({ status: HttpStatus.NOT_FOUND, description: '订单不存在' }) + async payOrder( + @Req() req: AuthenticatedRequest, + @Param('orderNo') orderNo: string, + ): Promise { + const userId = BigInt(req.user.id); + return this.plantingService.payOrder(orderNo, userId); + } + + @Get('orders') + @ApiOperation({ summary: '查询我的订单列表' }) + @ApiResponse({ + status: HttpStatus.OK, + description: '订单列表', + type: [PlantingOrderResponse], + }) + async getUserOrders( + @Req() req: AuthenticatedRequest, + @Query() pagination: PaginationDto, + ): Promise { + const userId = BigInt(req.user.id); + return this.plantingService.getUserOrders( + userId, + pagination.page, + pagination.pageSize, + ); + } + + @Get('orders/:orderNo') + @ApiOperation({ summary: '查询订单详情' }) + @ApiParam({ name: 'orderNo', description: '订单号' }) + @ApiResponse({ + status: HttpStatus.OK, + description: '订单详情', + type: PlantingOrderResponse, + }) + @ApiResponse({ status: HttpStatus.NOT_FOUND, description: '订单不存在' }) + async getOrderDetail( + @Req() req: AuthenticatedRequest, + @Param('orderNo') orderNo: string, + ): Promise { + const userId = BigInt(req.user.id); + const order = await this.plantingService.getOrderDetail(orderNo, userId); + if (!order) { + throw new NotFoundException('订单不存在'); + } + return order; + } + + @Post('orders/:orderNo/cancel') + @HttpCode(HttpStatus.OK) + @ApiOperation({ summary: '取消订单' }) + @ApiParam({ name: 'orderNo', description: '订单号' }) + @ApiResponse({ + status: HttpStatus.OK, + description: '取消成功', + }) + @ApiResponse({ status: HttpStatus.BAD_REQUEST, description: '订单状态不允许取消' }) + @ApiResponse({ status: HttpStatus.NOT_FOUND, description: '订单不存在' }) + async cancelOrder( + @Req() req: AuthenticatedRequest, + @Param('orderNo') orderNo: string, + ): Promise<{ success: boolean }> { + const userId = BigInt(req.user.id); + return this.plantingService.cancelOrder(orderNo, userId); + } +} diff --git a/backend/services/planting-service/src/api/controllers/planting-position.controller.ts b/backend/services/planting-service/src/api/controllers/planting-position.controller.ts new file mode 100644 index 00000000..36e46efd --- /dev/null +++ b/backend/services/planting-service/src/api/controllers/planting-position.controller.ts @@ -0,0 +1,44 @@ +import { + Controller, + Get, + UseGuards, + Req, + HttpStatus, +} from '@nestjs/common'; +import { + ApiTags, + ApiOperation, + ApiResponse, + ApiBearerAuth, +} from '@nestjs/swagger'; +import { PlantingApplicationService } from '../../application/services/planting-application.service'; +import { PlantingPositionResponse } from '../dto/response/planting-position.response'; +import { JwtAuthGuard } from '../guards/jwt-auth.guard'; + +interface AuthenticatedRequest { + user: { id: string }; +} + +@ApiTags('认种持仓') +@ApiBearerAuth() +@Controller('planting') +@UseGuards(JwtAuthGuard) +export class PlantingPositionController { + constructor( + private readonly plantingService: PlantingApplicationService, + ) {} + + @Get('position') + @ApiOperation({ summary: '查询我的持仓' }) + @ApiResponse({ + status: HttpStatus.OK, + description: '持仓信息', + type: PlantingPositionResponse, + }) + async getUserPosition( + @Req() req: AuthenticatedRequest, + ): Promise { + const userId = BigInt(req.user.id); + return this.plantingService.getUserPosition(userId); + } +} diff --git a/backend/services/planting-service/src/api/dto/index.ts b/backend/services/planting-service/src/api/dto/index.ts new file mode 100644 index 00000000..a0517597 --- /dev/null +++ b/backend/services/planting-service/src/api/dto/index.ts @@ -0,0 +1,2 @@ +export * from './request'; +export * from './response'; diff --git a/backend/services/planting-service/src/api/dto/request/create-planting-order.dto.ts b/backend/services/planting-service/src/api/dto/request/create-planting-order.dto.ts new file mode 100644 index 00000000..56b1448f --- /dev/null +++ b/backend/services/planting-service/src/api/dto/request/create-planting-order.dto.ts @@ -0,0 +1,15 @@ +import { IsInt, Min, Max } from 'class-validator'; +import { ApiProperty } from '@nestjs/swagger'; + +export class CreatePlantingOrderDto { + @ApiProperty({ + description: '认种数量', + minimum: 1, + maximum: 100, + example: 1, + }) + @IsInt({ message: '认种数量必须是整数' }) + @Min(1, { message: '认种数量最少为1棵' }) + @Max(100, { message: '单次认种数量最多为100棵' }) + treeCount: number; +} diff --git a/backend/services/planting-service/src/api/dto/request/index.ts b/backend/services/planting-service/src/api/dto/request/index.ts new file mode 100644 index 00000000..3cdaa5bd --- /dev/null +++ b/backend/services/planting-service/src/api/dto/request/index.ts @@ -0,0 +1,3 @@ +export * from './create-planting-order.dto'; +export * from './select-province-city.dto'; +export * from './pagination.dto'; diff --git a/backend/services/planting-service/src/api/dto/request/pagination.dto.ts b/backend/services/planting-service/src/api/dto/request/pagination.dto.ts new file mode 100644 index 00000000..175f220e --- /dev/null +++ b/backend/services/planting-service/src/api/dto/request/pagination.dto.ts @@ -0,0 +1,29 @@ +import { IsOptional, IsInt, Min, Max } from 'class-validator'; +import { Type } from 'class-transformer'; +import { ApiPropertyOptional } from '@nestjs/swagger'; + +export class PaginationDto { + @ApiPropertyOptional({ + description: '页码', + minimum: 1, + default: 1, + }) + @IsOptional() + @Type(() => Number) + @IsInt() + @Min(1) + page?: number = 1; + + @ApiPropertyOptional({ + description: '每页数量', + minimum: 1, + maximum: 100, + default: 10, + }) + @IsOptional() + @Type(() => Number) + @IsInt() + @Min(1) + @Max(100) + pageSize?: number = 10; +} diff --git a/backend/services/planting-service/src/api/dto/request/select-province-city.dto.ts b/backend/services/planting-service/src/api/dto/request/select-province-city.dto.ts new file mode 100644 index 00000000..0e89e610 --- /dev/null +++ b/backend/services/planting-service/src/api/dto/request/select-province-city.dto.ts @@ -0,0 +1,40 @@ +import { IsString, IsNotEmpty, MaxLength } from 'class-validator'; +import { ApiProperty } from '@nestjs/swagger'; + +export class SelectProvinceCityDto { + @ApiProperty({ + description: '省份代码', + example: '440000', + }) + @IsString({ message: '省份代码必须是字符串' }) + @IsNotEmpty({ message: '省份代码不能为空' }) + @MaxLength(10, { message: '省份代码长度不能超过10' }) + provinceCode: string; + + @ApiProperty({ + description: '省份名称', + example: '广东省', + }) + @IsString({ message: '省份名称必须是字符串' }) + @IsNotEmpty({ message: '省份名称不能为空' }) + @MaxLength(50, { message: '省份名称长度不能超过50' }) + provinceName: string; + + @ApiProperty({ + description: '城市代码', + example: '440100', + }) + @IsString({ message: '城市代码必须是字符串' }) + @IsNotEmpty({ message: '城市代码不能为空' }) + @MaxLength(10, { message: '城市代码长度不能超过10' }) + cityCode: string; + + @ApiProperty({ + description: '城市名称', + example: '广州市', + }) + @IsString({ message: '城市名称必须是字符串' }) + @IsNotEmpty({ message: '城市名称不能为空' }) + @MaxLength(50, { message: '城市名称长度不能超过50' }) + cityName: string; +} diff --git a/backend/services/planting-service/src/api/dto/response/index.ts b/backend/services/planting-service/src/api/dto/response/index.ts new file mode 100644 index 00000000..52d13445 --- /dev/null +++ b/backend/services/planting-service/src/api/dto/response/index.ts @@ -0,0 +1,2 @@ +export * from './planting-order.response'; +export * from './planting-position.response'; diff --git a/backend/services/planting-service/src/api/dto/response/planting-order.response.ts b/backend/services/planting-service/src/api/dto/response/planting-order.response.ts new file mode 100644 index 00000000..2e86f4ba --- /dev/null +++ b/backend/services/planting-service/src/api/dto/response/planting-order.response.ts @@ -0,0 +1,80 @@ +import { ApiProperty, ApiPropertyOptional } from '@nestjs/swagger'; + +export class PlantingOrderResponse { + @ApiProperty({ description: '订单号' }) + orderNo: string; + + @ApiProperty({ description: '认种数量' }) + treeCount: number; + + @ApiProperty({ description: '订单总金额' }) + totalAmount: number; + + @ApiProperty({ description: '订单状态' }) + status: string; + + @ApiPropertyOptional({ description: '省份代码' }) + provinceCode?: string | null; + + @ApiPropertyOptional({ description: '城市代码' }) + cityCode?: string | null; + + @ApiProperty({ description: '是否已开启挖矿' }) + isMiningEnabled: boolean; + + @ApiProperty({ description: '创建时间' }) + createdAt: Date; +} + +export class CreateOrderResponse { + @ApiProperty({ description: '订单号' }) + orderNo: string; + + @ApiProperty({ description: '认种数量' }) + treeCount: number; + + @ApiProperty({ description: '订单总金额' }) + totalAmount: number; + + @ApiProperty({ description: '订单状态' }) + status: string; +} + +export class SelectProvinceCityResponse { + @ApiProperty({ description: '是否成功' }) + success: boolean; + + @ApiProperty({ description: '选择时间' }) + selectedAt: Date; +} + +export class ConfirmProvinceCityResponse { + @ApiProperty({ description: '是否成功' }) + success: boolean; +} + +export class PayOrderResponse { + @ApiProperty({ description: '订单号' }) + orderNo: string; + + @ApiProperty({ description: '订单状态' }) + status: string; + + @ApiProperty({ + description: '资金分配详情', + type: 'array', + items: { + type: 'object', + properties: { + targetType: { type: 'string' }, + amount: { type: 'number' }, + targetAccountId: { type: 'string', nullable: true }, + }, + }, + }) + allocations: Array<{ + targetType: string; + amount: number; + targetAccountId: string | null; + }>; +} diff --git a/backend/services/planting-service/src/api/dto/response/planting-position.response.ts b/backend/services/planting-service/src/api/dto/response/planting-position.response.ts new file mode 100644 index 00000000..aec4f5a9 --- /dev/null +++ b/backend/services/planting-service/src/api/dto/response/planting-position.response.ts @@ -0,0 +1,29 @@ +import { ApiProperty } from '@nestjs/swagger'; + +export class PositionDistributionResponse { + @ApiProperty({ description: '省份代码', nullable: true }) + provinceCode: string | null; + + @ApiProperty({ description: '城市代码', nullable: true }) + cityCode: string | null; + + @ApiProperty({ description: '认种数量' }) + treeCount: number; +} + +export class PlantingPositionResponse { + @ApiProperty({ description: '总认种数量' }) + totalTreeCount: number; + + @ApiProperty({ description: '有效认种数量(已开启挖矿)' }) + effectiveTreeCount: number; + + @ApiProperty({ description: '待生效认种数量' }) + pendingTreeCount: number; + + @ApiProperty({ + description: '省市分布', + type: [PositionDistributionResponse], + }) + distributions: PositionDistributionResponse[]; +} diff --git a/backend/services/planting-service/src/api/guards/index.ts b/backend/services/planting-service/src/api/guards/index.ts new file mode 100644 index 00000000..3525e2d2 --- /dev/null +++ b/backend/services/planting-service/src/api/guards/index.ts @@ -0,0 +1 @@ +export * from './jwt-auth.guard'; diff --git a/backend/services/planting-service/src/api/guards/jwt-auth.guard.ts b/backend/services/planting-service/src/api/guards/jwt-auth.guard.ts new file mode 100644 index 00000000..27ef6a12 --- /dev/null +++ b/backend/services/planting-service/src/api/guards/jwt-auth.guard.ts @@ -0,0 +1,50 @@ +import { + Injectable, + CanActivate, + ExecutionContext, + UnauthorizedException, +} from '@nestjs/common'; +import { ConfigService } from '@nestjs/config'; +import * as jwt from 'jsonwebtoken'; + +export interface JwtPayload { + sub: string; + userId: string; + iat: number; + exp: number; +} + +@Injectable() +export class JwtAuthGuard implements CanActivate { + constructor(private readonly configService: ConfigService) {} + + async canActivate(context: ExecutionContext): Promise { + const request = context.switchToHttp().getRequest(); + const token = this.extractTokenFromHeader(request); + + if (!token) { + throw new UnauthorizedException('Missing authentication token'); + } + + try { + const secret = this.configService.get('JWT_SECRET'); + if (!secret) { + throw new Error('JWT_SECRET not configured'); + } + + const payload = jwt.verify(token, secret) as JwtPayload; + request.user = { + id: payload.userId || payload.sub, + }; + + return true; + } catch (error) { + throw new UnauthorizedException('Invalid authentication token'); + } + } + + private extractTokenFromHeader(request: any): string | undefined { + const [type, token] = request.headers.authorization?.split(' ') ?? []; + return type === 'Bearer' ? token : undefined; + } +} diff --git a/backend/services/planting-service/src/api/index.ts b/backend/services/planting-service/src/api/index.ts new file mode 100644 index 00000000..f6c3029a --- /dev/null +++ b/backend/services/planting-service/src/api/index.ts @@ -0,0 +1,4 @@ +export * from './controllers'; +export * from './dto'; +export * from './guards'; +export * from './api.module'; diff --git a/backend/services/planting-service/src/app.module.ts b/backend/services/planting-service/src/app.module.ts new file mode 100644 index 00000000..e5683034 --- /dev/null +++ b/backend/services/planting-service/src/app.module.ts @@ -0,0 +1,30 @@ +import { Module } from '@nestjs/common'; +import { ConfigModule } from '@nestjs/config'; +import { APP_FILTER } from '@nestjs/core'; +import { InfrastructureModule } from './infrastructure/infrastructure.module'; +import { DomainModule } from './domain/domain.module'; +import { ApplicationModule } from './application/application.module'; +import { ApiModule } from './api/api.module'; +import { GlobalExceptionFilter } from './shared/filters/global-exception.filter'; +import configs from './config'; + +@Module({ + imports: [ + ConfigModule.forRoot({ + isGlobal: true, + envFilePath: ['.env.development', '.env'], + load: configs, + }), + InfrastructureModule, + DomainModule, + ApplicationModule, + ApiModule, + ], + providers: [ + { + provide: APP_FILTER, + useClass: GlobalExceptionFilter, + }, + ], +}) +export class AppModule {} diff --git a/backend/services/planting-service/src/application/application.module.ts b/backend/services/planting-service/src/application/application.module.ts new file mode 100644 index 00000000..c97ece02 --- /dev/null +++ b/backend/services/planting-service/src/application/application.module.ts @@ -0,0 +1,11 @@ +import { Module } from '@nestjs/common'; +import { PlantingApplicationService } from './services/planting-application.service'; +import { PoolInjectionService } from './services/pool-injection.service'; +import { DomainModule } from '../domain/domain.module'; + +@Module({ + imports: [DomainModule], + providers: [PlantingApplicationService, PoolInjectionService], + exports: [PlantingApplicationService, PoolInjectionService], +}) +export class ApplicationModule {} diff --git a/backend/services/planting-service/src/application/index.ts b/backend/services/planting-service/src/application/index.ts new file mode 100644 index 00000000..ae96c30b --- /dev/null +++ b/backend/services/planting-service/src/application/index.ts @@ -0,0 +1,2 @@ +export * from './services'; +export * from './application.module'; diff --git a/backend/services/planting-service/src/application/services/index.ts b/backend/services/planting-service/src/application/services/index.ts new file mode 100644 index 00000000..214becea --- /dev/null +++ b/backend/services/planting-service/src/application/services/index.ts @@ -0,0 +1,2 @@ +export * from './planting-application.service'; +export * from './pool-injection.service'; diff --git a/backend/services/planting-service/src/application/services/planting-application.service.integration.spec.ts b/backend/services/planting-service/src/application/services/planting-application.service.integration.spec.ts new file mode 100644 index 00000000..7e4e1fca --- /dev/null +++ b/backend/services/planting-service/src/application/services/planting-application.service.integration.spec.ts @@ -0,0 +1,303 @@ +import { Test, TestingModule } from '@nestjs/testing'; +import { PlantingApplicationService } from './planting-application.service'; +import { FundAllocationDomainService } from '../../domain/services/fund-allocation.service'; +import { + IPlantingOrderRepository, + PLANTING_ORDER_REPOSITORY, +} from '../../domain/repositories/planting-order.repository.interface'; +import { + IPlantingPositionRepository, + PLANTING_POSITION_REPOSITORY, +} from '../../domain/repositories/planting-position.repository.interface'; +import { + IPoolInjectionBatchRepository, + POOL_INJECTION_BATCH_REPOSITORY, +} from '../../domain/repositories/pool-injection-batch.repository.interface'; +import { WalletServiceClient } from '../../infrastructure/external/wallet-service.client'; +import { ReferralServiceClient } from '../../infrastructure/external/referral-service.client'; +import { PlantingOrder } from '../../domain/aggregates/planting-order.aggregate'; +import { PlantingPosition } from '../../domain/aggregates/planting-position.aggregate'; +import { PoolInjectionBatch } from '../../domain/aggregates/pool-injection-batch.aggregate'; +import { PlantingOrderStatus } from '../../domain/value-objects/planting-order-status.enum'; + +describe('PlantingApplicationService (Integration)', () => { + let service: PlantingApplicationService; + let orderRepository: jest.Mocked; + let positionRepository: jest.Mocked; + let batchRepository: jest.Mocked; + let walletService: jest.Mocked; + let referralService: jest.Mocked; + + beforeEach(async () => { + // Create mocks + orderRepository = { + save: jest.fn(), + findById: jest.fn(), + findByOrderNo: jest.fn(), + findByUserId: jest.fn(), + findByStatus: jest.fn(), + findPendingPoolScheduling: jest.fn(), + findByBatchId: jest.fn(), + findReadyForMining: jest.fn(), + countTreesByUserId: jest.fn(), + countByUserId: jest.fn(), + }; + + positionRepository = { + save: jest.fn(), + findById: jest.fn(), + findByUserId: jest.fn(), + getOrCreate: jest.fn(), + }; + + batchRepository = { + save: jest.fn(), + findById: jest.fn(), + findByBatchNo: jest.fn(), + findByStatus: jest.fn(), + findCurrentBatch: jest.fn(), + findOrCreateCurrentBatch: jest.fn(), + findScheduledBatchesReadyForInjection: jest.fn(), + }; + + walletService = { + getBalance: jest.fn(), + deductForPlanting: jest.fn(), + allocateFunds: jest.fn(), + injectToPool: jest.fn(), + } as any; + + referralService = { + getReferralContext: jest.fn(), + } as any; + + const module: TestingModule = await Test.createTestingModule({ + providers: [ + PlantingApplicationService, + FundAllocationDomainService, + { provide: PLANTING_ORDER_REPOSITORY, useValue: orderRepository }, + { provide: PLANTING_POSITION_REPOSITORY, useValue: positionRepository }, + { provide: POOL_INJECTION_BATCH_REPOSITORY, useValue: batchRepository }, + { provide: WalletServiceClient, useValue: walletService }, + { provide: ReferralServiceClient, useValue: referralService }, + ], + }).compile(); + + service = module.get(PlantingApplicationService); + }); + + describe('createOrder', () => { + it('应该成功创建订单', async () => { + const userId = BigInt(1); + const treeCount = 5; + + orderRepository.countTreesByUserId.mockResolvedValue(0); + walletService.getBalance.mockResolvedValue({ + userId: '1', + available: 100000, + locked: 0, + currency: 'USDT', + }); + orderRepository.save.mockResolvedValue(undefined); + + const result = await service.createOrder(userId, treeCount); + + expect(result.treeCount).toBe(5); + expect(result.totalAmount).toBe(5 * 2199); + expect(result.status).toBe(PlantingOrderStatus.CREATED); + expect(orderRepository.save).toHaveBeenCalled(); + }); + + it('应该拒绝超过限购数量', async () => { + const userId = BigInt(1); + const treeCount = 100; + + orderRepository.countTreesByUserId.mockResolvedValue(950); + + await expect(service.createOrder(userId, treeCount)).rejects.toThrow( + '超过个人最大认种数量限制', + ); + }); + + it('应该拒绝余额不足', async () => { + const userId = BigInt(1); + const treeCount = 5; + + orderRepository.countTreesByUserId.mockResolvedValue(0); + walletService.getBalance.mockResolvedValue({ + userId: '1', + available: 100, + locked: 0, + currency: 'USDT', + }); + + await expect(service.createOrder(userId, treeCount)).rejects.toThrow( + '余额不足', + ); + }); + }); + + describe('selectProvinceCity', () => { + it('应该成功选择省市', async () => { + const order = PlantingOrder.create(BigInt(1), 1); + orderRepository.findByOrderNo.mockResolvedValue(order); + orderRepository.save.mockResolvedValue(undefined); + + const result = await service.selectProvinceCity( + order.orderNo, + BigInt(1), + '440000', + '广东省', + '440100', + '广州市', + ); + + expect(result.success).toBe(true); + expect(orderRepository.save).toHaveBeenCalled(); + }); + + it('应该拒绝不存在的订单', async () => { + orderRepository.findByOrderNo.mockResolvedValue(null); + + await expect( + service.selectProvinceCity( + 'invalid', + BigInt(1), + '440000', + '广东省', + '440100', + '广州市', + ), + ).rejects.toThrow('订单不存在'); + }); + + it('应该拒绝无权操作的订单', async () => { + const order = PlantingOrder.create(BigInt(1), 1); + orderRepository.findByOrderNo.mockResolvedValue(order); + + await expect( + service.selectProvinceCity( + order.orderNo, + BigInt(999), + '440000', + '广东省', + '440100', + '广州市', + ), + ).rejects.toThrow('无权操作此订单'); + }); + }); + + describe('confirmProvinceCity', () => { + it('应该在5秒后成功确认省市', async () => { + jest.useFakeTimers(); + + const order = PlantingOrder.create(BigInt(1), 1); + order.selectProvinceCity('440000', '广东省', '440100', '广州市'); + + jest.advanceTimersByTime(5000); + + orderRepository.findByOrderNo.mockResolvedValue(order); + orderRepository.save.mockResolvedValue(undefined); + + const result = await service.confirmProvinceCity(order.orderNo, BigInt(1)); + + expect(result.success).toBe(true); + expect(orderRepository.save).toHaveBeenCalled(); + + jest.useRealTimers(); + }); + }); + + describe('payOrder', () => { + it('应该成功支付订单并完成资金分配', async () => { + jest.useFakeTimers(); + + const order = PlantingOrder.create(BigInt(1), 1); + order.selectProvinceCity('440000', '广东省', '440100', '广州市'); + jest.advanceTimersByTime(5000); + order.confirmProvinceCity(); + + const position = PlantingPosition.create(BigInt(1)); + const batch = PoolInjectionBatch.create(new Date()); + (batch as any)._id = BigInt(1); + + orderRepository.findByOrderNo.mockResolvedValue(order); + walletService.deductForPlanting.mockResolvedValue(true); + referralService.getReferralContext.mockResolvedValue({ + referralChain: [], + nearestProvinceAuth: null, + nearestCityAuth: null, + nearestCommunity: null, + }); + walletService.allocateFunds.mockResolvedValue(true); + positionRepository.getOrCreate.mockResolvedValue(position); + batchRepository.findOrCreateCurrentBatch.mockResolvedValue(batch); + orderRepository.save.mockResolvedValue(undefined); + positionRepository.save.mockResolvedValue(undefined); + batchRepository.save.mockResolvedValue(undefined); + + const result = await service.payOrder(order.orderNo, BigInt(1)); + + expect(result.status).toBe(PlantingOrderStatus.POOL_SCHEDULED); + expect(result.allocations.length).toBe(10); + expect(walletService.deductForPlanting).toHaveBeenCalled(); + expect(walletService.allocateFunds).toHaveBeenCalled(); + + jest.useRealTimers(); + }); + }); + + describe('getUserOrders', () => { + it('应该返回用户订单列表', async () => { + const order1 = PlantingOrder.create(BigInt(1), 1); + const order2 = PlantingOrder.create(BigInt(1), 2); + + orderRepository.findByUserId.mockResolvedValue([order1, order2]); + + const result = await service.getUserOrders(BigInt(1), 1, 10); + + expect(result.length).toBe(2); + expect(result[0].treeCount).toBe(1); + expect(result[1].treeCount).toBe(2); + }); + }); + + describe('getUserPosition', () => { + it('应该返回用户持仓信息', async () => { + const position = PlantingPosition.create(BigInt(1)); + position.addPlanting(5, '440000', '440100'); + + positionRepository.findByUserId.mockResolvedValue(position); + + const result = await service.getUserPosition(BigInt(1)); + + expect(result.totalTreeCount).toBe(5); + expect(result.pendingTreeCount).toBe(5); + expect(result.distributions.length).toBe(1); + }); + + it('应该返回空持仓当用户无记录', async () => { + positionRepository.findByUserId.mockResolvedValue(null); + + const result = await service.getUserPosition(BigInt(1)); + + expect(result.totalTreeCount).toBe(0); + expect(result.effectiveTreeCount).toBe(0); + expect(result.pendingTreeCount).toBe(0); + }); + }); + + describe('cancelOrder', () => { + it('应该成功取消未支付订单', async () => { + const order = PlantingOrder.create(BigInt(1), 1); + orderRepository.findByOrderNo.mockResolvedValue(order); + orderRepository.save.mockResolvedValue(undefined); + + const result = await service.cancelOrder(order.orderNo, BigInt(1)); + + expect(result.success).toBe(true); + expect(orderRepository.save).toHaveBeenCalled(); + }); + }); +}); diff --git a/backend/services/planting-service/src/application/services/planting-application.service.ts b/backend/services/planting-service/src/application/services/planting-application.service.ts new file mode 100644 index 00000000..0a993014 --- /dev/null +++ b/backend/services/planting-service/src/application/services/planting-application.service.ts @@ -0,0 +1,370 @@ +import { Injectable, Inject, Logger } from '@nestjs/common'; +import { PlantingOrder } from '../../domain/aggregates/planting-order.aggregate'; +import { + IPlantingOrderRepository, + PLANTING_ORDER_REPOSITORY, +} from '../../domain/repositories/planting-order.repository.interface'; +import { + IPlantingPositionRepository, + PLANTING_POSITION_REPOSITORY, +} from '../../domain/repositories/planting-position.repository.interface'; +import { + IPoolInjectionBatchRepository, + POOL_INJECTION_BATCH_REPOSITORY, +} from '../../domain/repositories/pool-injection-batch.repository.interface'; +import { FundAllocationDomainService } from '../../domain/services/fund-allocation.service'; +import { WalletServiceClient } from '../../infrastructure/external/wallet-service.client'; +import { ReferralServiceClient } from '../../infrastructure/external/referral-service.client'; +import { PRICE_PER_TREE } from '../../domain/value-objects/fund-allocation-target-type.enum'; + +// 个人最大认种数量限制 +const MAX_TREES_PER_USER = 1000; + +export interface CreateOrderResult { + orderNo: string; + treeCount: number; + totalAmount: number; + status: string; +} + +export interface OrderListItem { + orderNo: string; + treeCount: number; + totalAmount: number; + status: string; + provinceCode?: string | null; + cityCode?: string | null; + isMiningEnabled: boolean; + createdAt: Date; +} + +export interface UserPositionResult { + totalTreeCount: number; + effectiveTreeCount: number; + pendingTreeCount: number; + distributions: Array<{ + provinceCode: string | null; + cityCode: string | null; + treeCount: number; + }>; +} + +@Injectable() +export class PlantingApplicationService { + private readonly logger = new Logger(PlantingApplicationService.name); + + constructor( + @Inject(PLANTING_ORDER_REPOSITORY) + private readonly orderRepository: IPlantingOrderRepository, + @Inject(PLANTING_POSITION_REPOSITORY) + private readonly positionRepository: IPlantingPositionRepository, + @Inject(POOL_INJECTION_BATCH_REPOSITORY) + private readonly batchRepository: IPoolInjectionBatchRepository, + private readonly fundAllocationService: FundAllocationDomainService, + private readonly walletService: WalletServiceClient, + private readonly referralService: ReferralServiceClient, + ) {} + + /** + * 创建认种订单 + */ + async createOrder( + userId: bigint, + treeCount: number, + ): Promise { + this.logger.log(`Creating order for user ${userId}, treeCount: ${treeCount}`); + + // 风控检查 + await this.checkRiskControl(userId, treeCount); + + // 检查余额 + const balance = await this.walletService.getBalance(userId.toString()); + const requiredAmount = treeCount * PRICE_PER_TREE; + if (balance.available < requiredAmount) { + throw new Error( + `余额不足: 需要 ${requiredAmount} USDT, 当前可用 ${balance.available} USDT`, + ); + } + + // 创建订单 + const order = PlantingOrder.create(userId, treeCount); + await this.orderRepository.save(order); + + this.logger.log(`Order created: ${order.orderNo}`); + + return { + orderNo: order.orderNo, + treeCount: order.treeCount.value, + totalAmount: order.totalAmount, + status: order.status, + }; + } + + /** + * 选择省市 + */ + async selectProvinceCity( + orderNo: string, + userId: bigint, + provinceCode: string, + provinceName: string, + cityCode: string, + cityName: string, + ): Promise<{ success: boolean; selectedAt: Date }> { + const order = await this.orderRepository.findByOrderNo(orderNo); + if (!order) { + throw new Error('订单不存在'); + } + + if (order.userId !== userId) { + throw new Error('无权操作此订单'); + } + + order.selectProvinceCity(provinceCode, provinceName, cityCode, cityName); + await this.orderRepository.save(order); + + return { + success: true, + selectedAt: order.provinceCitySelection!.selectedAt, + }; + } + + /** + * 确认省市选择 (5秒后调用) + */ + async confirmProvinceCity( + orderNo: string, + userId: bigint, + ): Promise<{ success: boolean }> { + const order = await this.orderRepository.findByOrderNo(orderNo); + if (!order) { + throw new Error('订单不存在'); + } + + if (order.userId !== userId) { + throw new Error('无权操作此订单'); + } + + order.confirmProvinceCity(); + await this.orderRepository.save(order); + + return { success: true }; + } + + /** + * 支付认种订单 + */ + async payOrder( + orderNo: string, + userId: bigint, + ): Promise<{ + orderNo: string; + status: string; + allocations: Array<{ + targetType: string; + amount: number; + targetAccountId: string | null; + }>; + }> { + const order = await this.orderRepository.findByOrderNo(orderNo); + if (!order) { + throw new Error('订单不存在'); + } + + if (order.userId !== userId) { + throw new Error('无权操作此订单'); + } + + const selection = order.provinceCitySelection; + if (!selection) { + throw new Error('请先选择并确认省市'); + } + + // 调用钱包服务扣款 + await this.walletService.deductForPlanting({ + userId: userId.toString(), + amount: order.totalAmount, + orderId: order.orderNo, + }); + + // 标记已支付 + order.markAsPaid(); + + // 获取推荐链上下文 + const referralContext = await this.referralService.getReferralContext( + userId.toString(), + selection.provinceCode, + selection.cityCode, + ); + + // 计算资金分配 + const allocations = this.fundAllocationService.calculateAllocations( + order, + referralContext, + ); + + // 分配资金 + order.allocateFunds(allocations); + await this.orderRepository.save(order); + + // 调用钱包服务执行资金分配 + await this.walletService.allocateFunds({ + orderId: order.orderNo, + allocations: allocations.map((a) => a.toDTO()), + }); + + // 更新用户持仓 + const position = await this.positionRepository.getOrCreate(userId); + position.addPlanting( + order.treeCount.value, + selection.provinceCode, + selection.cityCode, + ); + await this.positionRepository.save(position); + + // 安排底池注入批次 + await this.schedulePoolInjection(order); + + this.logger.log(`Order paid: ${order.orderNo}`); + + return { + orderNo: order.orderNo, + status: order.status, + allocations: allocations.map((a) => a.toDTO()), + }; + } + + /** + * 查询用户订单列表 + */ + async getUserOrders( + userId: bigint, + page: number = 1, + pageSize: number = 10, + ): Promise { + const orders = await this.orderRepository.findByUserId( + userId, + page, + pageSize, + ); + + return orders.map((o) => ({ + orderNo: o.orderNo, + treeCount: o.treeCount.value, + totalAmount: o.totalAmount, + status: o.status, + provinceCode: o.provinceCitySelection?.provinceCode, + cityCode: o.provinceCitySelection?.cityCode, + isMiningEnabled: o.isMiningEnabled, + createdAt: o.createdAt, + })); + } + + /** + * 查询用户持仓 + */ + async getUserPosition(userId: bigint): Promise { + const position = await this.positionRepository.findByUserId(userId); + if (!position) { + return { + totalTreeCount: 0, + effectiveTreeCount: 0, + pendingTreeCount: 0, + distributions: [], + }; + } + + return { + totalTreeCount: position.totalTreeCount, + effectiveTreeCount: position.effectiveTreeCount, + pendingTreeCount: position.pendingTreeCount, + distributions: position.distributions.map((d) => ({ + provinceCode: d.provinceCode, + cityCode: d.cityCode, + treeCount: d.treeCount, + })), + }; + } + + /** + * 查询订单详情 + */ + async getOrderDetail( + orderNo: string, + userId: bigint, + ): Promise { + const order = await this.orderRepository.findByOrderNo(orderNo); + if (!order || order.userId !== userId) { + return null; + } + + return { + orderNo: order.orderNo, + treeCount: order.treeCount.value, + totalAmount: order.totalAmount, + status: order.status, + provinceCode: order.provinceCitySelection?.provinceCode, + cityCode: order.provinceCitySelection?.cityCode, + isMiningEnabled: order.isMiningEnabled, + createdAt: order.createdAt, + }; + } + + /** + * 取消订单 + */ + async cancelOrder( + orderNo: string, + userId: bigint, + ): Promise<{ success: boolean }> { + const order = await this.orderRepository.findByOrderNo(orderNo); + if (!order) { + throw new Error('订单不存在'); + } + + if (order.userId !== userId) { + throw new Error('无权操作此订单'); + } + + order.cancel(); + await this.orderRepository.save(order); + + return { success: true }; + } + + /** + * 风控检查 + */ + private async checkRiskControl( + userId: bigint, + treeCount: number, + ): Promise { + // 检查用户限购 + const existingCount = await this.orderRepository.countTreesByUserId(userId); + if (existingCount + treeCount > MAX_TREES_PER_USER) { + throw new Error( + `超过个人最大认种数量限制: 已认种 ${existingCount} 棵, 本次 ${treeCount} 棵, 上限 ${MAX_TREES_PER_USER} 棵`, + ); + } + } + + /** + * 安排底池注入批次 + */ + private async schedulePoolInjection(order: PlantingOrder): Promise { + const batch = await this.batchRepository.findOrCreateCurrentBatch(); + const poolAmount = this.fundAllocationService.getPoolInjectionAmount( + order.treeCount.value, + ); + + batch.addOrder(poolAmount); + await this.batchRepository.save(batch); + + // 计算注入时间(批次结束后) + const scheduledTime = new Date(batch.endDate); + scheduledTime.setHours(scheduledTime.getHours() + 1); + + order.schedulePoolInjection(batch.id!, scheduledTime); + await this.orderRepository.save(order); + } +} diff --git a/backend/services/planting-service/src/application/services/pool-injection.service.ts b/backend/services/planting-service/src/application/services/pool-injection.service.ts new file mode 100644 index 00000000..044812db --- /dev/null +++ b/backend/services/planting-service/src/application/services/pool-injection.service.ts @@ -0,0 +1,163 @@ +import { Injectable, Inject, Logger } from '@nestjs/common'; +import { + IPlantingOrderRepository, + PLANTING_ORDER_REPOSITORY, +} from '../../domain/repositories/planting-order.repository.interface'; +import { + IPlantingPositionRepository, + PLANTING_POSITION_REPOSITORY, +} from '../../domain/repositories/planting-position.repository.interface'; +import { + IPoolInjectionBatchRepository, + POOL_INJECTION_BATCH_REPOSITORY, +} from '../../domain/repositories/pool-injection-batch.repository.interface'; +import { WalletServiceClient } from '../../infrastructure/external/wallet-service.client'; +import { BatchStatus } from '../../domain/value-objects/batch-status.enum'; + +@Injectable() +export class PoolInjectionService { + private readonly logger = new Logger(PoolInjectionService.name); + + constructor( + @Inject(PLANTING_ORDER_REPOSITORY) + private readonly orderRepository: IPlantingOrderRepository, + @Inject(PLANTING_POSITION_REPOSITORY) + private readonly positionRepository: IPlantingPositionRepository, + @Inject(POOL_INJECTION_BATCH_REPOSITORY) + private readonly batchRepository: IPoolInjectionBatchRepository, + private readonly walletService: WalletServiceClient, + ) {} + + /** + * 处理到期的底池注入批次 + * 此方法应由定时任务调用 + */ + async processScheduledBatches(): Promise { + const batches = + await this.batchRepository.findScheduledBatchesReadyForInjection(); + + for (const batch of batches) { + try { + await this.processBatch(batch.id!); + } catch (error) { + this.logger.error( + `Failed to process batch ${batch.batchNo}`, + error, + ); + } + } + } + + /** + * 处理单个批次的底池注入 + */ + async processBatch(batchId: bigint): Promise { + const batch = await this.batchRepository.findById(batchId); + if (!batch) { + throw new Error('批次不存在'); + } + + if (batch.status !== BatchStatus.SCHEDULED) { + throw new Error('批次状态不正确'); + } + + this.logger.log(`Processing batch ${batch.batchNo}`); + + // 标记为注入中 + batch.startInjection(); + await this.batchRepository.save(batch); + + try { + // 调用钱包服务注入底池 + const result = await this.walletService.injectToPool( + batch.batchNo, + batch.totalAmount, + ); + + // 完成注入 + batch.completeInjection(result.txHash); + await this.batchRepository.save(batch); + + // 更新批次内所有订单状态 + const orders = await this.orderRepository.findByBatchId(batchId); + for (const order of orders) { + order.confirmPoolInjection(result.txHash); + await this.orderRepository.save(order); + + // 开启挖矿 + order.enableMining(); + await this.orderRepository.save(order); + + // 更新用户持仓为有效 + const position = await this.positionRepository.findByUserId( + order.userId, + ); + if (position) { + position.activateMining(order.treeCount.value); + await this.positionRepository.save(position); + } + } + + this.logger.log( + `Batch ${batch.batchNo} processed successfully, txHash: ${result.txHash}`, + ); + } catch (error) { + this.logger.error(`Failed to inject batch ${batch.batchNo}`, error); + throw error; + } + } + + /** + * 安排待处理批次的注入时间 + * 批次结束后自动安排 + */ + async schedulePendingBatches(): Promise { + const batches = await this.batchRepository.findByStatus(BatchStatus.PENDING); + + const now = new Date(); + for (const batch of batches) { + // 如果批次已过期,安排注入 + if (batch.endDate < now) { + const scheduledTime = new Date(); + scheduledTime.setMinutes(scheduledTime.getMinutes() + 5); + + batch.schedule(scheduledTime); + await this.batchRepository.save(batch); + + this.logger.log( + `Batch ${batch.batchNo} scheduled for injection at ${scheduledTime}`, + ); + } + } + } + + /** + * 获取批次状态 + */ + async getBatchStatus( + batchId: bigint, + ): Promise<{ + batchNo: string; + status: string; + orderCount: number; + totalAmount: number; + scheduledInjectionTime: Date | null; + actualInjectionTime: Date | null; + injectionTxHash: string | null; + } | null> { + const batch = await this.batchRepository.findById(batchId); + if (!batch) { + return null; + } + + return { + batchNo: batch.batchNo, + status: batch.status, + orderCount: batch.orderCount, + totalAmount: batch.totalAmount, + scheduledInjectionTime: batch.scheduledInjectionTime, + actualInjectionTime: batch.actualInjectionTime, + injectionTxHash: batch.injectionTxHash, + }; + } +} diff --git a/backend/services/planting-service/src/config/app.config.ts b/backend/services/planting-service/src/config/app.config.ts new file mode 100644 index 00000000..da5f7d2d --- /dev/null +++ b/backend/services/planting-service/src/config/app.config.ts @@ -0,0 +1,7 @@ +import { registerAs } from '@nestjs/config'; + +export default registerAs('app', () => ({ + nodeEnv: process.env.NODE_ENV || 'development', + port: parseInt(process.env.APP_PORT || '3003', 10), + serviceName: 'planting-service', +})); diff --git a/backend/services/planting-service/src/config/external.config.ts b/backend/services/planting-service/src/config/external.config.ts new file mode 100644 index 00000000..80219bcc --- /dev/null +++ b/backend/services/planting-service/src/config/external.config.ts @@ -0,0 +1,10 @@ +import { registerAs } from '@nestjs/config'; + +export default registerAs('external', () => ({ + walletServiceUrl: + process.env.WALLET_SERVICE_URL || 'http://localhost:3002', + identityServiceUrl: + process.env.IDENTITY_SERVICE_URL || 'http://localhost:3001', + referralServiceUrl: + process.env.REFERRAL_SERVICE_URL || 'http://localhost:3004', +})); diff --git a/backend/services/planting-service/src/config/index.ts b/backend/services/planting-service/src/config/index.ts new file mode 100644 index 00000000..9c7a1257 --- /dev/null +++ b/backend/services/planting-service/src/config/index.ts @@ -0,0 +1,5 @@ +import appConfig from './app.config'; +import jwtConfig from './jwt.config'; +import externalConfig from './external.config'; + +export default [appConfig, jwtConfig, externalConfig]; diff --git a/backend/services/planting-service/src/config/jwt.config.ts b/backend/services/planting-service/src/config/jwt.config.ts new file mode 100644 index 00000000..828f1043 --- /dev/null +++ b/backend/services/planting-service/src/config/jwt.config.ts @@ -0,0 +1,5 @@ +import { registerAs } from '@nestjs/config'; + +export default registerAs('jwt', () => ({ + secret: process.env.JWT_SECRET || 'default-secret-change-me', +})); diff --git a/backend/services/planting-service/src/domain/aggregates/index.ts b/backend/services/planting-service/src/domain/aggregates/index.ts new file mode 100644 index 00000000..5dc79b99 --- /dev/null +++ b/backend/services/planting-service/src/domain/aggregates/index.ts @@ -0,0 +1,3 @@ +export * from './planting-order.aggregate'; +export * from './planting-position.aggregate'; +export * from './pool-injection-batch.aggregate'; diff --git a/backend/services/planting-service/src/domain/aggregates/planting-order.aggregate.spec.ts b/backend/services/planting-service/src/domain/aggregates/planting-order.aggregate.spec.ts new file mode 100644 index 00000000..438e642b --- /dev/null +++ b/backend/services/planting-service/src/domain/aggregates/planting-order.aggregate.spec.ts @@ -0,0 +1,214 @@ +import { PlantingOrder } from './planting-order.aggregate'; +import { PlantingOrderStatus } from '../value-objects/planting-order-status.enum'; +import { FundAllocation } from '../value-objects/fund-allocation.vo'; +import { FundAllocationTargetType } from '../value-objects/fund-allocation-target-type.enum'; + +describe('PlantingOrder', () => { + describe('create', () => { + it('应该成功创建认种订单', () => { + const order = PlantingOrder.create(BigInt(1), 5); + + expect(order.orderNo).toMatch(/^PLT/); + expect(order.userId).toBe(BigInt(1)); + expect(order.treeCount.value).toBe(5); + expect(order.totalAmount).toBe(5 * 2199); + expect(order.status).toBe(PlantingOrderStatus.CREATED); + expect(order.domainEvents.length).toBe(1); + expect(order.domainEvents[0].type).toBe('PlantingOrderCreated'); + }); + + it('应该拒绝0棵树', () => { + expect(() => PlantingOrder.create(BigInt(1), 0)).toThrow( + '认种数量必须大于0', + ); + }); + + it('应该拒绝负数', () => { + expect(() => PlantingOrder.create(BigInt(1), -1)).toThrow( + '认种数量必须大于0', + ); + }); + }); + + describe('selectProvinceCity', () => { + it('应该成功选择省市', () => { + const order = PlantingOrder.create(BigInt(1), 1); + order.selectProvinceCity('440000', '广东省', '440100', '广州市'); + + expect(order.provinceCitySelection).not.toBeNull(); + expect(order.provinceCitySelection?.provinceCode).toBe('440000'); + expect(order.provinceCitySelection?.cityCode).toBe('440100'); + expect(order.provinceCitySelection?.isConfirmed).toBe(false); + }); + + it('应该允许在确认前修改省市', () => { + const order = PlantingOrder.create(BigInt(1), 1); + order.selectProvinceCity('440000', '广东省', '440100', '广州市'); + order.selectProvinceCity('110000', '北京市', '110100', '北京市'); + + expect(order.provinceCitySelection?.provinceCode).toBe('110000'); + }); + }); + + describe('confirmProvinceCity', () => { + it('应该在5秒后成功确认省市', () => { + jest.useFakeTimers(); + + const order = PlantingOrder.create(BigInt(1), 1); + order.selectProvinceCity('440000', '广东省', '440100', '广州市'); + + jest.advanceTimersByTime(5000); + + order.confirmProvinceCity(); + + expect(order.status).toBe(PlantingOrderStatus.PROVINCE_CITY_CONFIRMED); + expect(order.provinceCitySelection?.isConfirmed).toBe(true); + + jest.useRealTimers(); + }); + + it('应该在5秒前拒绝确认', () => { + const order = PlantingOrder.create(BigInt(1), 1); + order.selectProvinceCity('440000', '广东省', '440100', '广州市'); + + expect(() => order.confirmProvinceCity()).toThrow('请等待5秒确认时间'); + }); + + it('应该拒绝未选择省市的确认', () => { + const order = PlantingOrder.create(BigInt(1), 1); + + expect(() => order.confirmProvinceCity()).toThrow('请先选择省市'); + }); + }); + + describe('markAsPaid', () => { + it('应该在省市确认后成功标记为已支付', () => { + jest.useFakeTimers(); + + const order = PlantingOrder.create(BigInt(1), 1); + order.selectProvinceCity('440000', '广东省', '440100', '广州市'); + jest.advanceTimersByTime(5000); + order.confirmProvinceCity(); + + order.markAsPaid(); + + expect(order.status).toBe(PlantingOrderStatus.PAID); + expect(order.paidAt).not.toBeNull(); + + jest.useRealTimers(); + }); + + it('应该拒绝未确认省市的支付', () => { + const order = PlantingOrder.create(BigInt(1), 1); + + expect(() => order.markAsPaid()).toThrow('订单状态错误'); + }); + }); + + describe('allocateFunds', () => { + it('应该成功分配资金', () => { + jest.useFakeTimers(); + + const order = PlantingOrder.create(BigInt(1), 1); + order.selectProvinceCity('440000', '广东省', '440100', '广州市'); + jest.advanceTimersByTime(5000); + order.confirmProvinceCity(); + order.markAsPaid(); + + const allocations = [ + new FundAllocation(FundAllocationTargetType.COST_ACCOUNT, 400, 'ACC1'), + new FundAllocation( + FundAllocationTargetType.OPERATION_ACCOUNT, + 300, + 'ACC2', + ), + new FundAllocation( + FundAllocationTargetType.HEADQUARTERS_COMMUNITY, + 9, + 'ACC3', + ), + new FundAllocation( + FundAllocationTargetType.REFERRAL_RIGHTS, + 500, + 'ACC4', + ), + new FundAllocation( + FundAllocationTargetType.PROVINCE_AREA_RIGHTS, + 15, + 'ACC5', + ), + new FundAllocation( + FundAllocationTargetType.PROVINCE_TEAM_RIGHTS, + 20, + 'ACC6', + ), + new FundAllocation( + FundAllocationTargetType.CITY_AREA_RIGHTS, + 35, + 'ACC7', + ), + new FundAllocation( + FundAllocationTargetType.CITY_TEAM_RIGHTS, + 40, + 'ACC8', + ), + new FundAllocation( + FundAllocationTargetType.COMMUNITY_RIGHTS, + 80, + 'ACC9', + ), + new FundAllocation(FundAllocationTargetType.RWAD_POOL, 800, 'ACC10'), + ]; + + order.allocateFunds(allocations); + + expect(order.status).toBe(PlantingOrderStatus.FUND_ALLOCATED); + expect(order.fundAllocations.length).toBe(10); + + jest.useRealTimers(); + }); + + it('应该拒绝金额不匹配的分配', () => { + jest.useFakeTimers(); + + const order = PlantingOrder.create(BigInt(1), 1); + order.selectProvinceCity('440000', '广东省', '440100', '广州市'); + jest.advanceTimersByTime(5000); + order.confirmProvinceCity(); + order.markAsPaid(); + + const allocations = [ + new FundAllocation(FundAllocationTargetType.COST_ACCOUNT, 100, 'ACC1'), + ]; + + expect(() => order.allocateFunds(allocations)).toThrow( + '资金分配总额不匹配', + ); + + jest.useRealTimers(); + }); + }); + + describe('cancel', () => { + it('应该成功取消未支付的订单', () => { + const order = PlantingOrder.create(BigInt(1), 1); + order.cancel(); + + expect(order.status).toBe(PlantingOrderStatus.CANCELLED); + }); + + it('应该拒绝取消已支付的订单', () => { + jest.useFakeTimers(); + + const order = PlantingOrder.create(BigInt(1), 1); + order.selectProvinceCity('440000', '广东省', '440100', '广州市'); + jest.advanceTimersByTime(5000); + order.confirmProvinceCity(); + order.markAsPaid(); + + expect(() => order.cancel()).toThrow('只有未支付的订单才能取消'); + + jest.useRealTimers(); + }); + }); +}); diff --git a/backend/services/planting-service/src/domain/aggregates/planting-order.aggregate.ts b/backend/services/planting-service/src/domain/aggregates/planting-order.aggregate.ts new file mode 100644 index 00000000..b2b43771 --- /dev/null +++ b/backend/services/planting-service/src/domain/aggregates/planting-order.aggregate.ts @@ -0,0 +1,413 @@ +import { PlantingOrderStatus } from '../value-objects/planting-order-status.enum'; +import { ProvinceCitySelection } from '../value-objects/province-city-selection.vo'; +import { FundAllocation } from '../value-objects/fund-allocation.vo'; +import { TreeCount } from '../value-objects/tree-count.vo'; +import { PRICE_PER_TREE } from '../value-objects/fund-allocation-target-type.enum'; +import { DomainEvent } from '../events/domain-event.interface'; +import { PlantingOrderCreatedEvent } from '../events/planting-order-created.event'; +import { ProvinceCityConfirmedEvent } from '../events/province-city-confirmed.event'; +import { PlantingOrderPaidEvent } from '../events/planting-order-paid.event'; +import { FundsAllocatedEvent } from '../events/funds-allocated.event'; +import { PoolInjectedEvent } from '../events/pool-injected.event'; +import { MiningEnabledEvent } from '../events/mining-enabled.event'; + +export interface PlantingOrderData { + id?: bigint; + orderNo: string; + userId: bigint; + treeCount: number; + totalAmount: number; + status: PlantingOrderStatus; + selectedProvince?: string | null; + selectedCity?: string | null; + provinceCitySelectedAt?: Date | null; + provinceCityConfirmedAt?: Date | null; + poolInjectionBatchId?: bigint | null; + poolInjectionScheduledTime?: Date | null; + poolInjectionActualTime?: Date | null; + poolInjectionTxHash?: string | null; + miningEnabledAt?: Date | null; + createdAt?: Date; + paidAt?: Date | null; + fundAllocatedAt?: Date | null; +} + +export class PlantingOrder { + private _id: bigint | null; + private readonly _orderNo: string; + private readonly _userId: bigint; + private readonly _treeCount: TreeCount; + private readonly _totalAmount: number; + private _provinceCitySelection: ProvinceCitySelection | null; + private _status: PlantingOrderStatus; + private _fundAllocations: FundAllocation[]; + private _poolInjectionBatchId: bigint | null; + private _poolInjectionScheduledTime: Date | null; + private _poolInjectionActualTime: Date | null; + private _poolInjectionTxHash: string | null; + private _miningEnabledAt: Date | null; + private readonly _createdAt: Date; + private _paidAt: Date | null; + private _fundAllocatedAt: Date | null; + + // 领域事件 + private _domainEvents: DomainEvent[] = []; + + private constructor( + orderNo: string, + userId: bigint, + treeCount: TreeCount, + totalAmount: number, + createdAt?: Date, + ) { + this._id = null; + this._orderNo = orderNo; + this._userId = userId; + this._treeCount = treeCount; + this._totalAmount = totalAmount; + this._status = PlantingOrderStatus.CREATED; + this._provinceCitySelection = null; + this._fundAllocations = []; + this._poolInjectionBatchId = null; + this._poolInjectionScheduledTime = null; + this._poolInjectionActualTime = null; + this._poolInjectionTxHash = null; + this._miningEnabledAt = null; + this._createdAt = createdAt || new Date(); + this._paidAt = null; + this._fundAllocatedAt = null; + } + + // Getters + get id(): bigint | null { + return this._id; + } + get orderNo(): string { + return this._orderNo; + } + get userId(): bigint { + return this._userId; + } + get treeCount(): TreeCount { + return this._treeCount; + } + get totalAmount(): number { + return this._totalAmount; + } + get status(): PlantingOrderStatus { + return this._status; + } + get provinceCitySelection(): ProvinceCitySelection | null { + return this._provinceCitySelection; + } + get fundAllocations(): ReadonlyArray { + return this._fundAllocations; + } + get poolInjectionBatchId(): bigint | null { + return this._poolInjectionBatchId; + } + get poolInjectionScheduledTime(): Date | null { + return this._poolInjectionScheduledTime; + } + get poolInjectionActualTime(): Date | null { + return this._poolInjectionActualTime; + } + get poolInjectionTxHash(): string | null { + return this._poolInjectionTxHash; + } + get miningEnabledAt(): Date | null { + return this._miningEnabledAt; + } + get isMiningEnabled(): boolean { + return this._miningEnabledAt !== null; + } + get createdAt(): Date { + return this._createdAt; + } + get paidAt(): Date | null { + return this._paidAt; + } + get fundAllocatedAt(): Date | null { + return this._fundAllocatedAt; + } + get domainEvents(): ReadonlyArray { + return this._domainEvents; + } + + /** + * 工厂方法:创建认种订单 + */ + static create(userId: bigint, treeCount: number): PlantingOrder { + if (treeCount <= 0) { + throw new Error('认种数量必须大于0'); + } + + const orderNo = `PLT${Date.now()}${Math.random().toString(36).substring(2, 8).toUpperCase()}`; + const tree = TreeCount.create(treeCount); + const totalAmount = treeCount * PRICE_PER_TREE; + + const order = new PlantingOrder(orderNo, userId, tree, totalAmount); + + // 发布领域事件 + order._domainEvents.push( + new PlantingOrderCreatedEvent(orderNo, { + orderNo: order.orderNo, + userId: order.userId.toString(), + treeCount: order.treeCount.value, + totalAmount: order.totalAmount, + }), + ); + + return order; + } + + /** + * 选择省市 (5秒倒计时前) + */ + selectProvinceCity( + provinceCode: string, + provinceName: string, + cityCode: string, + cityName: string, + ): void { + this.ensureStatus(PlantingOrderStatus.CREATED); + + if (this._provinceCitySelection?.isConfirmed) { + throw new Error('省市已确认,不可修改'); + } + + this._provinceCitySelection = ProvinceCitySelection.create( + provinceCode, + provinceName, + cityCode, + cityName, + ); + } + + /** + * 确认省市选择 (5秒后) + */ + confirmProvinceCity(): void { + this.ensureStatus(PlantingOrderStatus.CREATED); + + if (!this._provinceCitySelection) { + throw new Error('请先选择省市'); + } + + if (!this._provinceCitySelection.canConfirm()) { + throw new Error('请等待5秒确认时间'); + } + + this._provinceCitySelection = this._provinceCitySelection.confirm(); + this._status = PlantingOrderStatus.PROVINCE_CITY_CONFIRMED; + + this._domainEvents.push( + new ProvinceCityConfirmedEvent(this.orderNo, { + orderNo: this.orderNo, + userId: this.userId.toString(), + provinceCode: this._provinceCitySelection.provinceCode, + provinceName: this._provinceCitySelection.provinceName, + cityCode: this._provinceCitySelection.cityCode, + cityName: this._provinceCitySelection.cityName, + }), + ); + } + + /** + * 标记为已支付 + */ + markAsPaid(): void { + this.ensureStatus(PlantingOrderStatus.PROVINCE_CITY_CONFIRMED); + + this._status = PlantingOrderStatus.PAID; + this._paidAt = new Date(); + + this._domainEvents.push( + new PlantingOrderPaidEvent(this.orderNo, { + orderNo: this.orderNo, + userId: this.userId.toString(), + treeCount: this.treeCount.value, + totalAmount: this.totalAmount, + provinceCode: this._provinceCitySelection!.provinceCode, + cityCode: this._provinceCitySelection!.cityCode, + }), + ); + } + + /** + * 分配资金 + */ + allocateFunds(allocations: FundAllocation[]): void { + this.ensureStatus(PlantingOrderStatus.PAID); + + // 验证分配总额 + const totalAllocated = allocations.reduce((sum, a) => sum + a.amount, 0); + if (Math.abs(totalAllocated - this.totalAmount) > 0.01) { + throw new Error( + `资金分配总额不匹配: 期望 ${this.totalAmount}, 实际 ${totalAllocated}`, + ); + } + + this._fundAllocations = allocations; + this._status = PlantingOrderStatus.FUND_ALLOCATED; + this._fundAllocatedAt = new Date(); + + this._domainEvents.push( + new FundsAllocatedEvent(this.orderNo, { + orderNo: this.orderNo, + allocations: allocations.map((a) => a.toDTO()), + }), + ); + } + + /** + * 安排底池注入 + */ + schedulePoolInjection(batchId: bigint, scheduledTime: Date): void { + this.ensureStatus(PlantingOrderStatus.FUND_ALLOCATED); + + this._poolInjectionBatchId = batchId; + this._poolInjectionScheduledTime = scheduledTime; + this._status = PlantingOrderStatus.POOL_SCHEDULED; + } + + /** + * 确认底池注入完成 + */ + confirmPoolInjection(txHash: string): void { + this.ensureStatus(PlantingOrderStatus.POOL_SCHEDULED); + + this._poolInjectionActualTime = new Date(); + this._poolInjectionTxHash = txHash; + this._status = PlantingOrderStatus.POOL_INJECTED; + + this._domainEvents.push( + new PoolInjectedEvent(this.orderNo, { + orderNo: this.orderNo, + userId: this.userId.toString(), + amount: this.treeCount.value * 800, // 800 USDT/棵 + txHash, + }), + ); + } + + /** + * 开启挖矿 + */ + enableMining(): void { + this.ensureStatus(PlantingOrderStatus.POOL_INJECTED); + + this._miningEnabledAt = new Date(); + this._status = PlantingOrderStatus.MINING_ENABLED; + + this._domainEvents.push( + new MiningEnabledEvent(this.orderNo, { + orderNo: this.orderNo, + userId: this.userId.toString(), + treeCount: this.treeCount.value, + }), + ); + } + + /** + * 取消订单 + */ + cancel(): void { + if ( + this._status !== PlantingOrderStatus.CREATED && + this._status !== PlantingOrderStatus.PROVINCE_CITY_CONFIRMED + ) { + throw new Error('只有未支付的订单才能取消'); + } + this._status = PlantingOrderStatus.CANCELLED; + } + + /** + * 清除领域事件 + */ + clearDomainEvents(): void { + this._domainEvents = []; + } + + private ensureStatus(...allowedStatuses: PlantingOrderStatus[]): void { + if (!allowedStatuses.includes(this._status)) { + throw new Error( + `订单状态错误: 当前 ${this._status}, 期望 ${allowedStatuses.join(' 或 ')}`, + ); + } + } + + /** + * 设置ID(用于持久化后回填) + */ + setId(id: bigint): void { + if (this._id !== null) { + throw new Error('ID已设置,不可修改'); + } + this._id = id; + } + + /** + * 用于从数据库重建 + */ + static reconstitute(data: PlantingOrderData): PlantingOrder { + const order = new PlantingOrder( + data.orderNo, + data.userId, + TreeCount.create(data.treeCount), + data.totalAmount, + data.createdAt, + ); + + if (data.id) { + order._id = data.id; + } + order._status = data.status; + order._paidAt = data.paidAt || null; + order._fundAllocatedAt = data.fundAllocatedAt || null; + order._poolInjectionBatchId = data.poolInjectionBatchId || null; + order._poolInjectionScheduledTime = data.poolInjectionScheduledTime || null; + order._poolInjectionActualTime = data.poolInjectionActualTime || null; + order._poolInjectionTxHash = data.poolInjectionTxHash || null; + order._miningEnabledAt = data.miningEnabledAt || null; + + if (data.selectedProvince && data.selectedCity) { + order._provinceCitySelection = ProvinceCitySelection.reconstitute( + data.selectedProvince, + '', + data.selectedCity, + '', + data.provinceCitySelectedAt || new Date(), + data.provinceCityConfirmedAt || null, + ); + } + + return order; + } + + /** + * 转换为可持久化的数据对象 + */ + toPersistence(): PlantingOrderData { + return { + id: this._id || undefined, + orderNo: this._orderNo, + userId: this._userId, + treeCount: this._treeCount.value, + totalAmount: this._totalAmount, + status: this._status, + selectedProvince: this._provinceCitySelection?.provinceCode || null, + selectedCity: this._provinceCitySelection?.cityCode || null, + provinceCitySelectedAt: this._provinceCitySelection?.selectedAt || null, + provinceCityConfirmedAt: this._provinceCitySelection?.confirmedAt || null, + poolInjectionBatchId: this._poolInjectionBatchId, + poolInjectionScheduledTime: this._poolInjectionScheduledTime, + poolInjectionActualTime: this._poolInjectionActualTime, + poolInjectionTxHash: this._poolInjectionTxHash, + miningEnabledAt: this._miningEnabledAt, + createdAt: this._createdAt, + paidAt: this._paidAt, + fundAllocatedAt: this._fundAllocatedAt, + }; + } +} diff --git a/backend/services/planting-service/src/domain/aggregates/planting-position.aggregate.ts b/backend/services/planting-service/src/domain/aggregates/planting-position.aggregate.ts new file mode 100644 index 00000000..aa8b8ed7 --- /dev/null +++ b/backend/services/planting-service/src/domain/aggregates/planting-position.aggregate.ts @@ -0,0 +1,235 @@ +export interface PositionDistributionData { + id?: bigint; + userId: bigint; + provinceCode: string | null; + cityCode: string | null; + treeCount: number; +} + +export interface PlantingPositionData { + id?: bigint; + userId: bigint; + totalTreeCount: number; + effectiveTreeCount: number; + pendingTreeCount: number; + firstMiningStartAt?: Date | null; + distributions?: PositionDistributionData[]; +} + +export class PositionDistribution { + private _id: bigint | null; + private readonly _userId: bigint; + private readonly _provinceCode: string | null; + private readonly _cityCode: string | null; + private _treeCount: number; + + constructor( + userId: bigint, + provinceCode: string | null, + cityCode: string | null, + treeCount: number = 0, + id?: bigint, + ) { + this._id = id || null; + this._userId = userId; + this._provinceCode = provinceCode; + this._cityCode = cityCode; + this._treeCount = treeCount; + } + + get id(): bigint | null { + return this._id; + } + get userId(): bigint { + return this._userId; + } + get provinceCode(): string | null { + return this._provinceCode; + } + get cityCode(): string | null { + return this._cityCode; + } + get treeCount(): number { + return this._treeCount; + } + + addTrees(count: number): void { + if (count <= 0) { + throw new Error('添加数量必须大于0'); + } + this._treeCount += count; + } + + setId(id: bigint): void { + this._id = id; + } + + matchesLocation(provinceCode: string | null, cityCode: string | null): boolean { + return this._provinceCode === provinceCode && this._cityCode === cityCode; + } +} + +export class PlantingPosition { + private _id: bigint | null; + private readonly _userId: bigint; + private _totalTreeCount: number; + private _effectiveTreeCount: number; + private _pendingTreeCount: number; + private _firstMiningStartAt: Date | null; + private _distributions: PositionDistribution[]; + + private constructor( + userId: bigint, + totalTreeCount: number = 0, + effectiveTreeCount: number = 0, + pendingTreeCount: number = 0, + ) { + this._id = null; + this._userId = userId; + this._totalTreeCount = totalTreeCount; + this._effectiveTreeCount = effectiveTreeCount; + this._pendingTreeCount = pendingTreeCount; + this._firstMiningStartAt = null; + this._distributions = []; + } + + // Getters + get id(): bigint | null { + return this._id; + } + get userId(): bigint { + return this._userId; + } + get totalTreeCount(): number { + return this._totalTreeCount; + } + get effectiveTreeCount(): number { + return this._effectiveTreeCount; + } + get pendingTreeCount(): number { + return this._pendingTreeCount; + } + get firstMiningStartAt(): Date | null { + return this._firstMiningStartAt; + } + get distributions(): ReadonlyArray { + return this._distributions; + } + + /** + * 工厂方法:创建新持仓 + */ + static create(userId: bigint): PlantingPosition { + return new PlantingPosition(userId); + } + + /** + * 添加认种 + */ + addPlanting( + treeCount: number, + provinceCode: string | null, + cityCode: string | null, + ): void { + if (treeCount <= 0) { + throw new Error('认种数量必须大于0'); + } + + // 更新总数和待生效数 + this._totalTreeCount += treeCount; + this._pendingTreeCount += treeCount; + + // 更新省市分布 + let distribution = this._distributions.find((d) => + d.matchesLocation(provinceCode, cityCode), + ); + + if (distribution) { + distribution.addTrees(treeCount); + } else { + distribution = new PositionDistribution( + this._userId, + provinceCode, + cityCode, + treeCount, + ); + this._distributions.push(distribution); + } + } + + /** + * 激活挖矿(底池注入后) + */ + activateMining(treeCount: number): void { + if (treeCount > this._pendingTreeCount) { + throw new Error('激活数量不能超过待生效数量'); + } + + this._pendingTreeCount -= treeCount; + this._effectiveTreeCount += treeCount; + + if (!this._firstMiningStartAt) { + this._firstMiningStartAt = new Date(); + } + } + + /** + * 设置ID + */ + setId(id: bigint): void { + this._id = id; + } + + /** + * 从数据库重建 + */ + static reconstitute(data: PlantingPositionData): PlantingPosition { + const position = new PlantingPosition( + data.userId, + data.totalTreeCount, + data.effectiveTreeCount, + data.pendingTreeCount, + ); + + if (data.id) { + position._id = data.id; + } + position._firstMiningStartAt = data.firstMiningStartAt || null; + + if (data.distributions) { + position._distributions = data.distributions.map( + (d) => + new PositionDistribution( + d.userId, + d.provinceCode, + d.cityCode, + d.treeCount, + d.id, + ), + ); + } + + return position; + } + + /** + * 转换为可持久化的数据对象 + */ + toPersistence(): PlantingPositionData { + return { + id: this._id || undefined, + userId: this._userId, + totalTreeCount: this._totalTreeCount, + effectiveTreeCount: this._effectiveTreeCount, + pendingTreeCount: this._pendingTreeCount, + firstMiningStartAt: this._firstMiningStartAt, + distributions: this._distributions.map((d) => ({ + id: d.id || undefined, + userId: d.userId, + provinceCode: d.provinceCode, + cityCode: d.cityCode, + treeCount: d.treeCount, + })), + }; + } +} diff --git a/backend/services/planting-service/src/domain/aggregates/pool-injection-batch.aggregate.ts b/backend/services/planting-service/src/domain/aggregates/pool-injection-batch.aggregate.ts new file mode 100644 index 00000000..68e59675 --- /dev/null +++ b/backend/services/planting-service/src/domain/aggregates/pool-injection-batch.aggregate.ts @@ -0,0 +1,194 @@ +import { BatchStatus } from '../value-objects/batch-status.enum'; + +export interface PoolInjectionBatchData { + id?: bigint; + batchNo: string; + startDate: Date; + endDate: Date; + orderCount: number; + totalAmount: number; + status: BatchStatus; + scheduledInjectionTime?: Date | null; + actualInjectionTime?: Date | null; + injectionTxHash?: string | null; +} + +export class PoolInjectionBatch { + private _id: bigint | null; + private readonly _batchNo: string; + private readonly _startDate: Date; + private readonly _endDate: Date; + private _orderCount: number; + private _totalAmount: number; + private _status: BatchStatus; + private _scheduledInjectionTime: Date | null; + private _actualInjectionTime: Date | null; + private _injectionTxHash: string | null; + + private constructor( + batchNo: string, + startDate: Date, + endDate: Date, + orderCount: number = 0, + totalAmount: number = 0, + ) { + this._id = null; + this._batchNo = batchNo; + this._startDate = startDate; + this._endDate = endDate; + this._orderCount = orderCount; + this._totalAmount = totalAmount; + this._status = BatchStatus.PENDING; + this._scheduledInjectionTime = null; + this._actualInjectionTime = null; + this._injectionTxHash = null; + } + + // Getters + get id(): bigint | null { + return this._id; + } + get batchNo(): string { + return this._batchNo; + } + get startDate(): Date { + return this._startDate; + } + get endDate(): Date { + return this._endDate; + } + get orderCount(): number { + return this._orderCount; + } + get totalAmount(): number { + return this._totalAmount; + } + get status(): BatchStatus { + return this._status; + } + get scheduledInjectionTime(): Date | null { + return this._scheduledInjectionTime; + } + get actualInjectionTime(): Date | null { + return this._actualInjectionTime; + } + get injectionTxHash(): string | null { + return this._injectionTxHash; + } + + /** + * 工厂方法:创建新批次 + * 批次时间窗口为5天 + */ + static create(startDate: Date): PoolInjectionBatch { + const endDate = new Date(startDate); + endDate.setDate(endDate.getDate() + 5); + + const batchNo = `BATCH${startDate.getFullYear()}${String(startDate.getMonth() + 1).padStart(2, '0')}${String(startDate.getDate()).padStart(2, '0')}`; + + return new PoolInjectionBatch(batchNo, startDate, endDate); + } + + /** + * 添加订单到批次 + */ + addOrder(poolAmount: number): void { + if (this._status !== BatchStatus.PENDING) { + throw new Error('只有待处理状态的批次才能添加订单'); + } + + this._orderCount += 1; + this._totalAmount += poolAmount; + } + + /** + * 安排注入时间 + */ + schedule(injectionTime: Date): void { + if (this._status !== BatchStatus.PENDING) { + throw new Error('只有待处理状态的批次才能安排注入'); + } + + this._scheduledInjectionTime = injectionTime; + this._status = BatchStatus.SCHEDULED; + } + + /** + * 开始注入 + */ + startInjection(): void { + if (this._status !== BatchStatus.SCHEDULED) { + throw new Error('只有已排期状态的批次才能开始注入'); + } + + this._status = BatchStatus.INJECTING; + } + + /** + * 完成注入 + */ + completeInjection(txHash: string): void { + if (this._status !== BatchStatus.INJECTING) { + throw new Error('只有注入中状态的批次才能完成注入'); + } + + this._actualInjectionTime = new Date(); + this._injectionTxHash = txHash; + this._status = BatchStatus.INJECTED; + } + + /** + * 检查日期是否在批次时间窗口内 + */ + isDateInWindow(date: Date): boolean { + return date >= this._startDate && date <= this._endDate; + } + + /** + * 设置ID + */ + setId(id: bigint): void { + this._id = id; + } + + /** + * 从数据库重建 + */ + static reconstitute(data: PoolInjectionBatchData): PoolInjectionBatch { + const batch = new PoolInjectionBatch( + data.batchNo, + data.startDate, + data.endDate, + data.orderCount, + data.totalAmount, + ); + + if (data.id) { + batch._id = data.id; + } + batch._status = data.status; + batch._scheduledInjectionTime = data.scheduledInjectionTime || null; + batch._actualInjectionTime = data.actualInjectionTime || null; + batch._injectionTxHash = data.injectionTxHash || null; + + return batch; + } + + /** + * 转换为可持久化的数据对象 + */ + toPersistence(): PoolInjectionBatchData { + return { + id: this._id || undefined, + batchNo: this._batchNo, + startDate: this._startDate, + endDate: this._endDate, + orderCount: this._orderCount, + totalAmount: this._totalAmount, + status: this._status, + scheduledInjectionTime: this._scheduledInjectionTime, + actualInjectionTime: this._actualInjectionTime, + injectionTxHash: this._injectionTxHash, + }; + } +} diff --git a/backend/services/planting-service/src/domain/domain.module.ts b/backend/services/planting-service/src/domain/domain.module.ts new file mode 100644 index 00000000..6cbfbf9a --- /dev/null +++ b/backend/services/planting-service/src/domain/domain.module.ts @@ -0,0 +1,8 @@ +import { Module } from '@nestjs/common'; +import { FundAllocationDomainService } from './services/fund-allocation.service'; + +@Module({ + providers: [FundAllocationDomainService], + exports: [FundAllocationDomainService], +}) +export class DomainModule {} diff --git a/backend/services/planting-service/src/domain/events/domain-event.interface.ts b/backend/services/planting-service/src/domain/events/domain-event.interface.ts new file mode 100644 index 00000000..dec33b42 --- /dev/null +++ b/backend/services/planting-service/src/domain/events/domain-event.interface.ts @@ -0,0 +1,7 @@ +export interface DomainEvent { + type: string; + aggregateId: string; + aggregateType: string; + occurredAt: Date; + data: Record; +} diff --git a/backend/services/planting-service/src/domain/events/funds-allocated.event.ts b/backend/services/planting-service/src/domain/events/funds-allocated.event.ts new file mode 100644 index 00000000..db0063a1 --- /dev/null +++ b/backend/services/planting-service/src/domain/events/funds-allocated.event.ts @@ -0,0 +1,18 @@ +import { DomainEvent } from './domain-event.interface'; +import { FundAllocationDTO } from '../value-objects/fund-allocation.vo'; + +export class FundsAllocatedEvent implements DomainEvent { + readonly type = 'FundsAllocated'; + readonly aggregateType = 'PlantingOrder'; + readonly occurredAt: Date; + + constructor( + public readonly aggregateId: string, + public readonly data: { + orderNo: string; + allocations: FundAllocationDTO[]; + }, + ) { + this.occurredAt = new Date(); + } +} diff --git a/backend/services/planting-service/src/domain/events/index.ts b/backend/services/planting-service/src/domain/events/index.ts new file mode 100644 index 00000000..6f3ba6c7 --- /dev/null +++ b/backend/services/planting-service/src/domain/events/index.ts @@ -0,0 +1,7 @@ +export * from './domain-event.interface'; +export * from './planting-order-created.event'; +export * from './province-city-confirmed.event'; +export * from './planting-order-paid.event'; +export * from './funds-allocated.event'; +export * from './pool-injected.event'; +export * from './mining-enabled.event'; diff --git a/backend/services/planting-service/src/domain/events/mining-enabled.event.ts b/backend/services/planting-service/src/domain/events/mining-enabled.event.ts new file mode 100644 index 00000000..eac4800d --- /dev/null +++ b/backend/services/planting-service/src/domain/events/mining-enabled.event.ts @@ -0,0 +1,18 @@ +import { DomainEvent } from './domain-event.interface'; + +export class MiningEnabledEvent implements DomainEvent { + readonly type = 'MiningEnabled'; + readonly aggregateType = 'PlantingOrder'; + readonly occurredAt: Date; + + constructor( + public readonly aggregateId: string, + public readonly data: { + orderNo: string; + userId: string; + treeCount: number; + }, + ) { + this.occurredAt = new Date(); + } +} diff --git a/backend/services/planting-service/src/domain/events/planting-order-created.event.ts b/backend/services/planting-service/src/domain/events/planting-order-created.event.ts new file mode 100644 index 00000000..70b10604 --- /dev/null +++ b/backend/services/planting-service/src/domain/events/planting-order-created.event.ts @@ -0,0 +1,19 @@ +import { DomainEvent } from './domain-event.interface'; + +export class PlantingOrderCreatedEvent implements DomainEvent { + readonly type = 'PlantingOrderCreated'; + readonly aggregateType = 'PlantingOrder'; + readonly occurredAt: Date; + + constructor( + public readonly aggregateId: string, + public readonly data: { + orderNo: string; + userId: string; + treeCount: number; + totalAmount: number; + }, + ) { + this.occurredAt = new Date(); + } +} diff --git a/backend/services/planting-service/src/domain/events/planting-order-paid.event.ts b/backend/services/planting-service/src/domain/events/planting-order-paid.event.ts new file mode 100644 index 00000000..169b785b --- /dev/null +++ b/backend/services/planting-service/src/domain/events/planting-order-paid.event.ts @@ -0,0 +1,21 @@ +import { DomainEvent } from './domain-event.interface'; + +export class PlantingOrderPaidEvent implements DomainEvent { + readonly type = 'PlantingOrderPaid'; + readonly aggregateType = 'PlantingOrder'; + readonly occurredAt: Date; + + constructor( + public readonly aggregateId: string, + public readonly data: { + orderNo: string; + userId: string; + treeCount: number; + totalAmount: number; + provinceCode: string; + cityCode: string; + }, + ) { + this.occurredAt = new Date(); + } +} diff --git a/backend/services/planting-service/src/domain/events/pool-injected.event.ts b/backend/services/planting-service/src/domain/events/pool-injected.event.ts new file mode 100644 index 00000000..3bcc75c4 --- /dev/null +++ b/backend/services/planting-service/src/domain/events/pool-injected.event.ts @@ -0,0 +1,19 @@ +import { DomainEvent } from './domain-event.interface'; + +export class PoolInjectedEvent implements DomainEvent { + readonly type = 'PoolInjected'; + readonly aggregateType = 'PlantingOrder'; + readonly occurredAt: Date; + + constructor( + public readonly aggregateId: string, + public readonly data: { + orderNo: string; + userId: string; + amount: number; + txHash: string; + }, + ) { + this.occurredAt = new Date(); + } +} diff --git a/backend/services/planting-service/src/domain/events/province-city-confirmed.event.ts b/backend/services/planting-service/src/domain/events/province-city-confirmed.event.ts new file mode 100644 index 00000000..da6ff212 --- /dev/null +++ b/backend/services/planting-service/src/domain/events/province-city-confirmed.event.ts @@ -0,0 +1,21 @@ +import { DomainEvent } from './domain-event.interface'; + +export class ProvinceCityConfirmedEvent implements DomainEvent { + readonly type = 'ProvinceCityConfirmed'; + readonly aggregateType = 'PlantingOrder'; + readonly occurredAt: Date; + + constructor( + public readonly aggregateId: string, + public readonly data: { + orderNo: string; + userId: string; + provinceCode: string; + provinceName: string; + cityCode: string; + cityName: string; + }, + ) { + this.occurredAt = new Date(); + } +} diff --git a/backend/services/planting-service/src/domain/index.ts b/backend/services/planting-service/src/domain/index.ts new file mode 100644 index 00000000..d0c553e5 --- /dev/null +++ b/backend/services/planting-service/src/domain/index.ts @@ -0,0 +1,6 @@ +export * from './aggregates'; +export * from './events'; +export * from './repositories'; +export * from './services'; +export * from './value-objects'; +export * from './domain.module'; diff --git a/backend/services/planting-service/src/domain/repositories/index.ts b/backend/services/planting-service/src/domain/repositories/index.ts new file mode 100644 index 00000000..e802906e --- /dev/null +++ b/backend/services/planting-service/src/domain/repositories/index.ts @@ -0,0 +1,3 @@ +export * from './planting-order.repository.interface'; +export * from './planting-position.repository.interface'; +export * from './pool-injection-batch.repository.interface'; diff --git a/backend/services/planting-service/src/domain/repositories/planting-order.repository.interface.ts b/backend/services/planting-service/src/domain/repositories/planting-order.repository.interface.ts new file mode 100644 index 00000000..971cd668 --- /dev/null +++ b/backend/services/planting-service/src/domain/repositories/planting-order.repository.interface.ts @@ -0,0 +1,24 @@ +import { PlantingOrder } from '../aggregates/planting-order.aggregate'; +import { PlantingOrderStatus } from '../value-objects/planting-order-status.enum'; + +export interface IPlantingOrderRepository { + save(order: PlantingOrder): Promise; + findById(orderId: bigint): Promise; + findByOrderNo(orderNo: string): Promise; + findByUserId( + userId: bigint, + page?: number, + pageSize?: number, + ): Promise; + findByStatus( + status: PlantingOrderStatus, + limit?: number, + ): Promise; + findPendingPoolScheduling(): Promise; + findByBatchId(batchId: bigint): Promise; + findReadyForMining(): Promise; + countTreesByUserId(userId: bigint): Promise; + countByUserId(userId: bigint): Promise; +} + +export const PLANTING_ORDER_REPOSITORY = Symbol('IPlantingOrderRepository'); diff --git a/backend/services/planting-service/src/domain/repositories/planting-position.repository.interface.ts b/backend/services/planting-service/src/domain/repositories/planting-position.repository.interface.ts new file mode 100644 index 00000000..55a16d8a --- /dev/null +++ b/backend/services/planting-service/src/domain/repositories/planting-position.repository.interface.ts @@ -0,0 +1,12 @@ +import { PlantingPosition } from '../aggregates/planting-position.aggregate'; + +export interface IPlantingPositionRepository { + save(position: PlantingPosition): Promise; + findById(positionId: bigint): Promise; + findByUserId(userId: bigint): Promise; + getOrCreate(userId: bigint): Promise; +} + +export const PLANTING_POSITION_REPOSITORY = Symbol( + 'IPlantingPositionRepository', +); diff --git a/backend/services/planting-service/src/domain/repositories/pool-injection-batch.repository.interface.ts b/backend/services/planting-service/src/domain/repositories/pool-injection-batch.repository.interface.ts new file mode 100644 index 00000000..938a02d2 --- /dev/null +++ b/backend/services/planting-service/src/domain/repositories/pool-injection-batch.repository.interface.ts @@ -0,0 +1,16 @@ +import { PoolInjectionBatch } from '../aggregates/pool-injection-batch.aggregate'; +import { BatchStatus } from '../value-objects/batch-status.enum'; + +export interface IPoolInjectionBatchRepository { + save(batch: PoolInjectionBatch): Promise; + findById(batchId: bigint): Promise; + findByBatchNo(batchNo: string): Promise; + findByStatus(status: BatchStatus): Promise; + findCurrentBatch(): Promise; + findOrCreateCurrentBatch(): Promise; + findScheduledBatchesReadyForInjection(): Promise; +} + +export const POOL_INJECTION_BATCH_REPOSITORY = Symbol( + 'IPoolInjectionBatchRepository', +); diff --git a/backend/services/planting-service/src/domain/services/fund-allocation.service.spec.ts b/backend/services/planting-service/src/domain/services/fund-allocation.service.spec.ts new file mode 100644 index 00000000..f52798e0 --- /dev/null +++ b/backend/services/planting-service/src/domain/services/fund-allocation.service.spec.ts @@ -0,0 +1,122 @@ +import { FundAllocationDomainService } from './fund-allocation.service'; +import { PlantingOrder } from '../aggregates/planting-order.aggregate'; +import { FundAllocationTargetType } from '../value-objects/fund-allocation-target-type.enum'; + +describe('FundAllocationDomainService', () => { + let service: FundAllocationDomainService; + + beforeEach(() => { + service = new FundAllocationDomainService(); + }); + + describe('calculateAllocations', () => { + it('应该正确计算1棵树的资金分配', () => { + jest.useFakeTimers(); + + const order = PlantingOrder.create(BigInt(1), 1); + order.selectProvinceCity('440000', '广东省', '440100', '广州市'); + jest.advanceTimersByTime(5000); + order.confirmProvinceCity(); + + const context = { + referralChain: ['ref1', 'ref2'], + nearestProvinceAuth: 'province_auth_1', + nearestCityAuth: 'city_auth_1', + nearestCommunity: 'community_1', + }; + + const allocations = service.calculateAllocations(order, context); + + expect(allocations.length).toBe(10); + + // 验证各项金额 + const costAlloc = allocations.find( + (a) => a.targetType === FundAllocationTargetType.COST_ACCOUNT, + ); + expect(costAlloc?.amount).toBe(400); + + const opAlloc = allocations.find( + (a) => a.targetType === FundAllocationTargetType.OPERATION_ACCOUNT, + ); + expect(opAlloc?.amount).toBe(300); + + const hqAlloc = allocations.find( + (a) => a.targetType === FundAllocationTargetType.HEADQUARTERS_COMMUNITY, + ); + expect(hqAlloc?.amount).toBe(9); + + const referralAlloc = allocations.find( + (a) => a.targetType === FundAllocationTargetType.REFERRAL_RIGHTS, + ); + expect(referralAlloc?.amount).toBe(500); + expect(referralAlloc?.targetAccountId).toBe('ref1'); + + const poolAlloc = allocations.find( + (a) => a.targetType === FundAllocationTargetType.RWAD_POOL, + ); + expect(poolAlloc?.amount).toBe(800); + + // 验证总额 + const total = allocations.reduce((sum, a) => sum + a.amount, 0); + expect(total).toBe(2199); + + jest.useRealTimers(); + }); + + it('应该正确计算5棵树的资金分配', () => { + jest.useFakeTimers(); + + const order = PlantingOrder.create(BigInt(1), 5); + order.selectProvinceCity('440000', '广东省', '440100', '广州市'); + jest.advanceTimersByTime(5000); + order.confirmProvinceCity(); + + const context = { + referralChain: [], + nearestProvinceAuth: null, + nearestCityAuth: null, + nearestCommunity: null, + }; + + const allocations = service.calculateAllocations(order, context); + + const total = allocations.reduce((sum, a) => sum + a.amount, 0); + expect(total).toBe(2199 * 5); + + jest.useRealTimers(); + }); + + it('应该在没有推荐人时使用总部社区', () => { + jest.useFakeTimers(); + + const order = PlantingOrder.create(BigInt(1), 1); + order.selectProvinceCity('440000', '广东省', '440100', '广州市'); + jest.advanceTimersByTime(5000); + order.confirmProvinceCity(); + + const context = { + referralChain: [], + nearestProvinceAuth: null, + nearestCityAuth: null, + nearestCommunity: null, + }; + + const allocations = service.calculateAllocations(order, context); + + const referralAlloc = allocations.find( + (a) => a.targetType === FundAllocationTargetType.REFERRAL_RIGHTS, + ); + expect(referralAlloc?.targetAccountId).toBe('SYSTEM_HEADQUARTERS_COMMUNITY'); + + jest.useRealTimers(); + }); + }); + + describe('getPoolInjectionAmount', () => { + it('应该返回正确的底池注入金额', () => { + expect(service.getPoolInjectionAmount(1)).toBe(800); + expect(service.getPoolInjectionAmount(5)).toBe(4000); + expect(service.getPoolInjectionAmount(10)).toBe(8000); + }); + }); +}); diff --git a/backend/services/planting-service/src/domain/services/fund-allocation.service.ts b/backend/services/planting-service/src/domain/services/fund-allocation.service.ts new file mode 100644 index 00000000..fec50961 --- /dev/null +++ b/backend/services/planting-service/src/domain/services/fund-allocation.service.ts @@ -0,0 +1,153 @@ +import { Injectable } from '@nestjs/common'; +import { FundAllocation } from '../value-objects/fund-allocation.vo'; +import { + FundAllocationTargetType, + FUND_ALLOCATION_AMOUNTS, +} from '../value-objects/fund-allocation-target-type.enum'; +import { PlantingOrder } from '../aggregates/planting-order.aggregate'; + +export interface ReferralContext { + referralChain: string[]; + nearestProvinceAuth: string | null; + nearestCityAuth: string | null; + nearestCommunity: string | null; +} + +@Injectable() +export class FundAllocationDomainService { + /** + * 计算认种订单的资金分配 + * 核心业务规则: 2199 USDT 的 10 个去向 + */ + calculateAllocations( + order: PlantingOrder, + context: ReferralContext, + ): FundAllocation[] { + const treeCount = order.treeCount.value; + const allocations: FundAllocation[] = []; + const selection = order.provinceCitySelection; + + if (!selection) { + throw new Error('订单未选择省市,无法计算资金分配'); + } + + // 1. 成本账户: 400 USDT/棵 + allocations.push( + new FundAllocation( + FundAllocationTargetType.COST_ACCOUNT, + FUND_ALLOCATION_AMOUNTS[FundAllocationTargetType.COST_ACCOUNT] * + treeCount, + 'SYSTEM_COST_ACCOUNT', + ), + ); + + // 2. 运营账户: 300 USDT/棵 + allocations.push( + new FundAllocation( + FundAllocationTargetType.OPERATION_ACCOUNT, + FUND_ALLOCATION_AMOUNTS[FundAllocationTargetType.OPERATION_ACCOUNT] * + treeCount, + 'SYSTEM_OPERATION_ACCOUNT', + ), + ); + + // 3. 总部社区: 9 USDT/棵 + allocations.push( + new FundAllocation( + FundAllocationTargetType.HEADQUARTERS_COMMUNITY, + FUND_ALLOCATION_AMOUNTS[ + FundAllocationTargetType.HEADQUARTERS_COMMUNITY + ] * treeCount, + 'SYSTEM_HEADQUARTERS_COMMUNITY', + ), + ); + + // 4. 分享权益: 500 USDT/棵 (分配给推荐链) + allocations.push( + new FundAllocation( + FundAllocationTargetType.REFERRAL_RIGHTS, + FUND_ALLOCATION_AMOUNTS[FundAllocationTargetType.REFERRAL_RIGHTS] * + treeCount, + context.referralChain.length > 0 + ? context.referralChain[0] + : 'SYSTEM_HEADQUARTERS_COMMUNITY', + { referralChain: context.referralChain }, + ), + ); + + // 5. 省区域权益: 15 USDT/棵 + allocations.push( + new FundAllocation( + FundAllocationTargetType.PROVINCE_AREA_RIGHTS, + FUND_ALLOCATION_AMOUNTS[FundAllocationTargetType.PROVINCE_AREA_RIGHTS] * + treeCount, + `SYSTEM_PROVINCE_${selection.provinceCode}`, + ), + ); + + // 6. 省团队权益: 20 USDT/棵 + allocations.push( + new FundAllocation( + FundAllocationTargetType.PROVINCE_TEAM_RIGHTS, + FUND_ALLOCATION_AMOUNTS[FundAllocationTargetType.PROVINCE_TEAM_RIGHTS] * + treeCount, + context.nearestProvinceAuth || 'SYSTEM_HEADQUARTERS_COMMUNITY', + ), + ); + + // 7. 市区域权益: 35 USDT/棵 + allocations.push( + new FundAllocation( + FundAllocationTargetType.CITY_AREA_RIGHTS, + FUND_ALLOCATION_AMOUNTS[FundAllocationTargetType.CITY_AREA_RIGHTS] * + treeCount, + `SYSTEM_CITY_${selection.cityCode}`, + ), + ); + + // 8. 市团队权益: 40 USDT/棵 + allocations.push( + new FundAllocation( + FundAllocationTargetType.CITY_TEAM_RIGHTS, + FUND_ALLOCATION_AMOUNTS[FundAllocationTargetType.CITY_TEAM_RIGHTS] * + treeCount, + context.nearestCityAuth || 'SYSTEM_HEADQUARTERS_COMMUNITY', + ), + ); + + // 9. 社区权益: 80 USDT/棵 + allocations.push( + new FundAllocation( + FundAllocationTargetType.COMMUNITY_RIGHTS, + FUND_ALLOCATION_AMOUNTS[FundAllocationTargetType.COMMUNITY_RIGHTS] * + treeCount, + context.nearestCommunity || 'SYSTEM_HEADQUARTERS_COMMUNITY', + ), + ); + + // 10. RWAD底池: 800 USDT/棵 + allocations.push( + new FundAllocation( + FundAllocationTargetType.RWAD_POOL, + FUND_ALLOCATION_AMOUNTS[FundAllocationTargetType.RWAD_POOL] * treeCount, + 'SYSTEM_RWAD_POOL', + ), + ); + + // 验证总额 + const total = allocations.reduce((sum, a) => sum + a.amount, 0); + const expected = 2199 * treeCount; + if (Math.abs(total - expected) > 0.01) { + throw new Error(`资金分配计算错误: 总额 ${total} != ${expected}`); + } + + return allocations; + } + + /** + * 获取底池注入金额 + */ + getPoolInjectionAmount(treeCount: number): number { + return FUND_ALLOCATION_AMOUNTS[FundAllocationTargetType.RWAD_POOL] * treeCount; + } +} diff --git a/backend/services/planting-service/src/domain/services/index.ts b/backend/services/planting-service/src/domain/services/index.ts new file mode 100644 index 00000000..f81dcf49 --- /dev/null +++ b/backend/services/planting-service/src/domain/services/index.ts @@ -0,0 +1 @@ +export * from './fund-allocation.service'; diff --git a/backend/services/planting-service/src/domain/value-objects/batch-status.enum.ts b/backend/services/planting-service/src/domain/value-objects/batch-status.enum.ts new file mode 100644 index 00000000..b7d927e5 --- /dev/null +++ b/backend/services/planting-service/src/domain/value-objects/batch-status.enum.ts @@ -0,0 +1,6 @@ +export enum BatchStatus { + PENDING = 'PENDING', // 待注入 (收集订单中) + SCHEDULED = 'SCHEDULED', // 已排期 + INJECTING = 'INJECTING', // 注入中 + INJECTED = 'INJECTED', // 已注入 +} diff --git a/backend/services/planting-service/src/domain/value-objects/fund-allocation-target-type.enum.ts b/backend/services/planting-service/src/domain/value-objects/fund-allocation-target-type.enum.ts new file mode 100644 index 00000000..38fe3de2 --- /dev/null +++ b/backend/services/planting-service/src/domain/value-objects/fund-allocation-target-type.enum.ts @@ -0,0 +1,36 @@ +export enum FundAllocationTargetType { + COST_ACCOUNT = 'COST_ACCOUNT', // 400 USDT - 成本账户 + OPERATION_ACCOUNT = 'OPERATION_ACCOUNT', // 300 USDT - 运营账户 + HEADQUARTERS_COMMUNITY = 'HEADQUARTERS_COMMUNITY', // 9 USDT - 总部社区 + REFERRAL_RIGHTS = 'REFERRAL_RIGHTS', // 500 USDT - 分享权益 + PROVINCE_AREA_RIGHTS = 'PROVINCE_AREA_RIGHTS', // 15 USDT - 省区域权益 + PROVINCE_TEAM_RIGHTS = 'PROVINCE_TEAM_RIGHTS', // 20 USDT - 省团队权益 + CITY_AREA_RIGHTS = 'CITY_AREA_RIGHTS', // 35 USDT - 市区域权益 + CITY_TEAM_RIGHTS = 'CITY_TEAM_RIGHTS', // 40 USDT - 市团队权益 + COMMUNITY_RIGHTS = 'COMMUNITY_RIGHTS', // 80 USDT - 社区权益 + RWAD_POOL = 'RWAD_POOL', // 800 USDT - RWAD底池 +} + +// 每棵树的资金分配规则 (总计 2199 USDT) +export const FUND_ALLOCATION_AMOUNTS: Record = + { + [FundAllocationTargetType.COST_ACCOUNT]: 400, + [FundAllocationTargetType.OPERATION_ACCOUNT]: 300, + [FundAllocationTargetType.HEADQUARTERS_COMMUNITY]: 9, + [FundAllocationTargetType.REFERRAL_RIGHTS]: 500, + [FundAllocationTargetType.PROVINCE_AREA_RIGHTS]: 15, + [FundAllocationTargetType.PROVINCE_TEAM_RIGHTS]: 20, + [FundAllocationTargetType.CITY_AREA_RIGHTS]: 35, + [FundAllocationTargetType.CITY_TEAM_RIGHTS]: 40, + [FundAllocationTargetType.COMMUNITY_RIGHTS]: 80, + [FundAllocationTargetType.RWAD_POOL]: 800, + }; + +// 每棵树价格 +export const PRICE_PER_TREE = 2199; + +// 验证总额 +const TOTAL = Object.values(FUND_ALLOCATION_AMOUNTS).reduce((a, b) => a + b, 0); +if (TOTAL !== PRICE_PER_TREE) { + throw new Error(`资金分配配置错误: 总额 ${TOTAL} != ${PRICE_PER_TREE}`); +} diff --git a/backend/services/planting-service/src/domain/value-objects/fund-allocation.vo.ts b/backend/services/planting-service/src/domain/value-objects/fund-allocation.vo.ts new file mode 100644 index 00000000..91dfba2c --- /dev/null +++ b/backend/services/planting-service/src/domain/value-objects/fund-allocation.vo.ts @@ -0,0 +1,38 @@ +import { FundAllocationTargetType } from './fund-allocation-target-type.enum'; + +export interface FundAllocationDTO { + targetType: FundAllocationTargetType; + amount: number; + targetAccountId: string | null; + metadata?: Record; +} + +export class FundAllocation { + constructor( + public readonly targetType: FundAllocationTargetType, + public readonly amount: number, + public readonly targetAccountId: string | null, + public readonly metadata?: Record, + ) { + if (amount < 0) { + throw new Error('分配金额不能为负数'); + } + } + + toDTO(): FundAllocationDTO { + return { + targetType: this.targetType, + amount: this.amount, + targetAccountId: this.targetAccountId, + metadata: this.metadata, + }; + } + + equals(other: FundAllocation): boolean { + return ( + this.targetType === other.targetType && + this.amount === other.amount && + this.targetAccountId === other.targetAccountId + ); + } +} diff --git a/backend/services/planting-service/src/domain/value-objects/index.ts b/backend/services/planting-service/src/domain/value-objects/index.ts new file mode 100644 index 00000000..a69711aa --- /dev/null +++ b/backend/services/planting-service/src/domain/value-objects/index.ts @@ -0,0 +1,7 @@ +export * from './planting-order-status.enum'; +export * from './fund-allocation-target-type.enum'; +export * from './batch-status.enum'; +export * from './tree-count.vo'; +export * from './province-city-selection.vo'; +export * from './fund-allocation.vo'; +export * from './money.vo'; diff --git a/backend/services/planting-service/src/domain/value-objects/money.vo.ts b/backend/services/planting-service/src/domain/value-objects/money.vo.ts new file mode 100644 index 00000000..ddf8e90f --- /dev/null +++ b/backend/services/planting-service/src/domain/value-objects/money.vo.ts @@ -0,0 +1,59 @@ +export class Money { + private constructor( + public readonly amount: number, + public readonly currency: string = 'USDT', + ) { + if (amount < 0) { + throw new Error('金额不能为负数'); + } + } + + static create(amount: number, currency: string = 'USDT'): Money { + return new Money(amount, currency); + } + + static zero(currency: string = 'USDT'): Money { + return new Money(0, currency); + } + + add(other: Money): Money { + this.ensureSameCurrency(other); + return new Money(this.amount + other.amount, this.currency); + } + + subtract(other: Money): Money { + this.ensureSameCurrency(other); + if (this.amount < other.amount) { + throw new Error('余额不足'); + } + return new Money(this.amount - other.amount, this.currency); + } + + multiply(factor: number): Money { + return new Money(this.amount * factor, this.currency); + } + + equals(other: Money): boolean { + return this.amount === other.amount && this.currency === other.currency; + } + + isGreaterThan(other: Money): boolean { + this.ensureSameCurrency(other); + return this.amount > other.amount; + } + + isLessThan(other: Money): boolean { + this.ensureSameCurrency(other); + return this.amount < other.amount; + } + + private ensureSameCurrency(other: Money): void { + if (this.currency !== other.currency) { + throw new Error(`货币类型不匹配: ${this.currency} vs ${other.currency}`); + } + } + + toString(): string { + return `${this.amount} ${this.currency}`; + } +} diff --git a/backend/services/planting-service/src/domain/value-objects/planting-order-status.enum.ts b/backend/services/planting-service/src/domain/value-objects/planting-order-status.enum.ts new file mode 100644 index 00000000..7546b384 --- /dev/null +++ b/backend/services/planting-service/src/domain/value-objects/planting-order-status.enum.ts @@ -0,0 +1,10 @@ +export enum PlantingOrderStatus { + CREATED = 'CREATED', // 已创建 + PROVINCE_CITY_CONFIRMED = 'PROVINCE_CITY_CONFIRMED', // 省市已确认 + PAID = 'PAID', // 已支付 + FUND_ALLOCATED = 'FUND_ALLOCATED', // 资金已分配 + POOL_SCHEDULED = 'POOL_SCHEDULED', // 底池已排期 + POOL_INJECTED = 'POOL_INJECTED', // 底池已注入 + MINING_ENABLED = 'MINING_ENABLED', // 挖矿已开启 + CANCELLED = 'CANCELLED', // 已取消 +} diff --git a/backend/services/planting-service/src/domain/value-objects/province-city-selection.vo.spec.ts b/backend/services/planting-service/src/domain/value-objects/province-city-selection.vo.spec.ts new file mode 100644 index 00000000..8b232fe8 --- /dev/null +++ b/backend/services/planting-service/src/domain/value-objects/province-city-selection.vo.spec.ts @@ -0,0 +1,100 @@ +import { ProvinceCitySelection } from './province-city-selection.vo'; + +describe('ProvinceCitySelection', () => { + describe('create', () => { + it('应该成功创建省市选择', () => { + const selection = ProvinceCitySelection.create( + '440000', + '广东省', + '440100', + '广州市', + ); + + expect(selection.provinceCode).toBe('440000'); + expect(selection.provinceName).toBe('广东省'); + expect(selection.cityCode).toBe('440100'); + expect(selection.cityName).toBe('广州市'); + expect(selection.isConfirmed).toBe(false); + }); + + it('应该拒绝空的省份代码', () => { + expect(() => + ProvinceCitySelection.create('', '广东省', '440100', '广州市'), + ).toThrow('省市代码不能为空'); + }); + + it('应该拒绝空的城市代码', () => { + expect(() => + ProvinceCitySelection.create('440000', '广东省', '', '广州市'), + ).toThrow('省市代码不能为空'); + }); + }); + + describe('confirm', () => { + it('应该成功确认省市选择', () => { + const selection = ProvinceCitySelection.create( + '440000', + '广东省', + '440100', + '广州市', + ); + + // 模拟等待5秒 + jest.useFakeTimers(); + jest.advanceTimersByTime(5000); + + const confirmed = selection.confirm(); + expect(confirmed.isConfirmed).toBe(true); + + jest.useRealTimers(); + }); + + it('应该拒绝重复确认', () => { + const selection = ProvinceCitySelection.create( + '440000', + '广东省', + '440100', + '广州市', + ); + + jest.useFakeTimers(); + jest.advanceTimersByTime(5000); + + const confirmed = selection.confirm(); + + expect(() => confirmed.confirm()).toThrow('省市已确认,不可重复确认'); + + jest.useRealTimers(); + }); + }); + + describe('canConfirm', () => { + it('应该在5秒前返回false', () => { + const selection = ProvinceCitySelection.create( + '440000', + '广东省', + '440100', + '广州市', + ); + + expect(selection.canConfirm()).toBe(false); + }); + + it('应该在5秒后返回true', () => { + jest.useFakeTimers(); + + const selection = ProvinceCitySelection.create( + '440000', + '广东省', + '440100', + '广州市', + ); + + jest.advanceTimersByTime(5000); + + expect(selection.canConfirm()).toBe(true); + + jest.useRealTimers(); + }); + }); +}); diff --git a/backend/services/planting-service/src/domain/value-objects/province-city-selection.vo.ts b/backend/services/planting-service/src/domain/value-objects/province-city-selection.vo.ts new file mode 100644 index 00000000..d29d88be --- /dev/null +++ b/backend/services/planting-service/src/domain/value-objects/province-city-selection.vo.ts @@ -0,0 +1,83 @@ +export class ProvinceCitySelection { + private constructor( + public readonly provinceCode: string, + public readonly provinceName: string, + public readonly cityCode: string, + public readonly cityName: string, + public readonly selectedAt: Date, + public readonly confirmedAt: Date | null, + ) {} + + get isConfirmed(): boolean { + return this.confirmedAt !== null; + } + + static create( + provinceCode: string, + provinceName: string, + cityCode: string, + cityName: string, + ): ProvinceCitySelection { + if (!provinceCode || !cityCode) { + throw new Error('省市代码不能为空'); + } + + return new ProvinceCitySelection( + provinceCode, + provinceName, + cityCode, + cityName, + new Date(), + null, + ); + } + + static reconstitute( + provinceCode: string, + provinceName: string, + cityCode: string, + cityName: string, + selectedAt: Date, + confirmedAt: Date | null, + ): ProvinceCitySelection { + return new ProvinceCitySelection( + provinceCode, + provinceName, + cityCode, + cityName, + selectedAt, + confirmedAt, + ); + } + + confirm(): ProvinceCitySelection { + if (this.isConfirmed) { + throw new Error('省市已确认,不可重复确认'); + } + + return new ProvinceCitySelection( + this.provinceCode, + this.provinceName, + this.cityCode, + this.cityName, + this.selectedAt, + new Date(), + ); + } + + /** + * 检查是否已过5秒确认时间 + */ + canConfirm(): boolean { + const elapsed = Date.now() - this.selectedAt.getTime(); + return elapsed >= 5000; // 5秒 + } + + /** + * 获取剩余等待时间(毫秒) + */ + getRemainingWaitTime(): number { + const elapsed = Date.now() - this.selectedAt.getTime(); + return Math.max(0, 5000 - elapsed); + } +} diff --git a/backend/services/planting-service/src/domain/value-objects/tree-count.vo.spec.ts b/backend/services/planting-service/src/domain/value-objects/tree-count.vo.spec.ts new file mode 100644 index 00000000..d1dc12f0 --- /dev/null +++ b/backend/services/planting-service/src/domain/value-objects/tree-count.vo.spec.ts @@ -0,0 +1,52 @@ +import { TreeCount } from './tree-count.vo'; + +describe('TreeCount', () => { + describe('create', () => { + it('应该成功创建有效的树数量', () => { + const treeCount = TreeCount.create(5); + expect(treeCount.value).toBe(5); + }); + + it('应该拒绝0', () => { + expect(() => TreeCount.create(0)).toThrow('认种数量必须是正整数'); + }); + + it('应该拒绝负数', () => { + expect(() => TreeCount.create(-1)).toThrow('认种数量必须是正整数'); + }); + + it('应该拒绝小数', () => { + expect(() => TreeCount.create(1.5)).toThrow('认种数量必须是正整数'); + }); + }); + + describe('multiply', () => { + it('应该正确计算乘法', () => { + const treeCount = TreeCount.create(5); + expect(treeCount.multiply(2199)).toBe(10995); + }); + }); + + describe('add', () => { + it('应该正确相加', () => { + const a = TreeCount.create(3); + const b = TreeCount.create(5); + const result = a.add(b); + expect(result.value).toBe(8); + }); + }); + + describe('equals', () => { + it('应该正确比较相等', () => { + const a = TreeCount.create(5); + const b = TreeCount.create(5); + expect(a.equals(b)).toBe(true); + }); + + it('应该正确比较不相等', () => { + const a = TreeCount.create(3); + const b = TreeCount.create(5); + expect(a.equals(b)).toBe(false); + }); + }); +}); diff --git a/backend/services/planting-service/src/domain/value-objects/tree-count.vo.ts b/backend/services/planting-service/src/domain/value-objects/tree-count.vo.ts new file mode 100644 index 00000000..d3440035 --- /dev/null +++ b/backend/services/planting-service/src/domain/value-objects/tree-count.vo.ts @@ -0,0 +1,23 @@ +export class TreeCount { + private constructor(public readonly value: number) { + if (value <= 0 || !Number.isInteger(value)) { + throw new Error('认种数量必须是正整数'); + } + } + + static create(value: number): TreeCount { + return new TreeCount(value); + } + + multiply(factor: number): number { + return this.value * factor; + } + + add(other: TreeCount): TreeCount { + return new TreeCount(this.value + other.value); + } + + equals(other: TreeCount): boolean { + return this.value === other.value; + } +} diff --git a/backend/services/planting-service/src/infrastructure/external/index.ts b/backend/services/planting-service/src/infrastructure/external/index.ts new file mode 100644 index 00000000..7a2dfdae --- /dev/null +++ b/backend/services/planting-service/src/infrastructure/external/index.ts @@ -0,0 +1,2 @@ +export * from './wallet-service.client'; +export * from './referral-service.client'; diff --git a/backend/services/planting-service/src/infrastructure/external/referral-service.client.ts b/backend/services/planting-service/src/infrastructure/external/referral-service.client.ts new file mode 100644 index 00000000..bd1cf6a0 --- /dev/null +++ b/backend/services/planting-service/src/infrastructure/external/referral-service.client.ts @@ -0,0 +1,73 @@ +import { Injectable, Logger } from '@nestjs/common'; +import { ConfigService } from '@nestjs/config'; +import { HttpService } from '@nestjs/axios'; +import { firstValueFrom } from 'rxjs'; +import { ReferralContext } from '../../domain/services/fund-allocation.service'; + +export interface ReferralInfo { + userId: string; + referralChain: string[]; + nearestProvinceAuth: string | null; + nearestCityAuth: string | null; + nearestCommunity: string | null; +} + +@Injectable() +export class ReferralServiceClient { + private readonly logger = new Logger(ReferralServiceClient.name); + private readonly baseUrl: string; + + constructor( + private readonly configService: ConfigService, + private readonly httpService: HttpService, + ) { + this.baseUrl = + this.configService.get('REFERRAL_SERVICE_URL') || + 'http://localhost:3004'; + } + + /** + * 获取用户的推荐链和权限上级信息 + */ + async getReferralContext( + userId: string, + provinceCode: string, + cityCode: string, + ): Promise { + try { + const response = await firstValueFrom( + this.httpService.get( + `${this.baseUrl}/api/v1/referrals/${userId}/context`, + { + params: { provinceCode, cityCode }, + }, + ), + ); + + return { + referralChain: response.data.referralChain, + nearestProvinceAuth: response.data.nearestProvinceAuth, + nearestCityAuth: response.data.nearestCityAuth, + nearestCommunity: response.data.nearestCommunity, + }; + } catch (error) { + this.logger.error( + `Failed to get referral context for user ${userId}`, + error, + ); + // 在开发环境返回默认空数据 + if (this.configService.get('NODE_ENV') === 'development') { + this.logger.warn( + 'Development mode: returning empty referral context', + ); + return { + referralChain: [], + nearestProvinceAuth: null, + nearestCityAuth: null, + nearestCommunity: null, + }; + } + throw error; + } + } +} diff --git a/backend/services/planting-service/src/infrastructure/external/wallet-service.client.ts b/backend/services/planting-service/src/infrastructure/external/wallet-service.client.ts new file mode 100644 index 00000000..a0f46cc0 --- /dev/null +++ b/backend/services/planting-service/src/infrastructure/external/wallet-service.client.ts @@ -0,0 +1,144 @@ +import { Injectable, Logger } from '@nestjs/common'; +import { ConfigService } from '@nestjs/config'; +import { HttpService } from '@nestjs/axios'; +import { firstValueFrom } from 'rxjs'; +import { FundAllocationDTO } from '../../domain/value-objects/fund-allocation.vo'; + +export interface DeductForPlantingRequest { + userId: string; + amount: number; + orderId: string; +} + +export interface AllocateFundsRequest { + orderId: string; + allocations: FundAllocationDTO[]; +} + +export interface WalletBalance { + userId: string; + available: number; + locked: number; + currency: string; +} + +@Injectable() +export class WalletServiceClient { + private readonly logger = new Logger(WalletServiceClient.name); + private readonly baseUrl: string; + + constructor( + private readonly configService: ConfigService, + private readonly httpService: HttpService, + ) { + this.baseUrl = + this.configService.get('WALLET_SERVICE_URL') || + 'http://localhost:3002'; + } + + /** + * 获取用户钱包余额 + */ + async getBalance(userId: string): Promise { + try { + const response = await firstValueFrom( + this.httpService.get( + `${this.baseUrl}/api/v1/wallets/${userId}/balance`, + ), + ); + return response.data; + } catch (error) { + this.logger.error(`Failed to get balance for user ${userId}`, error); + // 在开发环境返回模拟数据 + if (this.configService.get('NODE_ENV') === 'development') { + return { + userId, + available: 100000, + locked: 0, + currency: 'USDT', + }; + } + throw error; + } + } + + /** + * 认种扣款 + */ + async deductForPlanting(request: DeductForPlantingRequest): Promise { + try { + const response = await firstValueFrom( + this.httpService.post( + `${this.baseUrl}/api/v1/wallets/deduct-for-planting`, + request, + ), + ); + return response.data.success; + } catch (error) { + this.logger.error( + `Failed to deduct for planting: ${request.orderId}`, + error, + ); + // 在开发环境模拟成功 + if (this.configService.get('NODE_ENV') === 'development') { + this.logger.warn('Development mode: simulating successful deduction'); + return true; + } + throw error; + } + } + + /** + * 执行资金分配 + */ + async allocateFunds(request: AllocateFundsRequest): Promise { + try { + const response = await firstValueFrom( + this.httpService.post( + `${this.baseUrl}/api/v1/wallets/allocate-funds`, + request, + ), + ); + return response.data.success; + } catch (error) { + this.logger.error( + `Failed to allocate funds for order: ${request.orderId}`, + error, + ); + // 在开发环境模拟成功 + if (this.configService.get('NODE_ENV') === 'development') { + this.logger.warn('Development mode: simulating successful allocation'); + return true; + } + throw error; + } + } + + /** + * 注入底池 + */ + async injectToPool( + batchId: string, + amount: number, + ): Promise<{ txHash: string }> { + try { + const response = await firstValueFrom( + this.httpService.post<{ txHash: string }>( + `${this.baseUrl}/api/v1/pool/inject`, + { batchId, amount }, + ), + ); + return response.data; + } catch (error) { + this.logger.error(`Failed to inject to pool: batch ${batchId}`, error); + // 在开发环境返回模拟交易哈希 + if (this.configService.get('NODE_ENV') === 'development') { + this.logger.warn('Development mode: simulating pool injection'); + return { + txHash: `0x${Date.now().toString(16)}${Math.random().toString(16).substring(2)}`, + }; + } + throw error; + } + } +} diff --git a/backend/services/planting-service/src/infrastructure/index.ts b/backend/services/planting-service/src/infrastructure/index.ts new file mode 100644 index 00000000..dcd79128 --- /dev/null +++ b/backend/services/planting-service/src/infrastructure/index.ts @@ -0,0 +1,5 @@ +export * from './persistence/prisma/prisma.service'; +export * from './persistence/repositories'; +export * from './persistence/mappers'; +export * from './external'; +export * from './infrastructure.module'; diff --git a/backend/services/planting-service/src/infrastructure/infrastructure.module.ts b/backend/services/planting-service/src/infrastructure/infrastructure.module.ts new file mode 100644 index 00000000..2a64e568 --- /dev/null +++ b/backend/services/planting-service/src/infrastructure/infrastructure.module.ts @@ -0,0 +1,47 @@ +import { Module, Global } from '@nestjs/common'; +import { HttpModule } from '@nestjs/axios'; +import { PrismaService } from './persistence/prisma/prisma.service'; +import { PlantingOrderRepositoryImpl } from './persistence/repositories/planting-order.repository.impl'; +import { PlantingPositionRepositoryImpl } from './persistence/repositories/planting-position.repository.impl'; +import { PoolInjectionBatchRepositoryImpl } from './persistence/repositories/pool-injection-batch.repository.impl'; +import { WalletServiceClient } from './external/wallet-service.client'; +import { ReferralServiceClient } from './external/referral-service.client'; +import { PLANTING_ORDER_REPOSITORY } from '../domain/repositories/planting-order.repository.interface'; +import { PLANTING_POSITION_REPOSITORY } from '../domain/repositories/planting-position.repository.interface'; +import { POOL_INJECTION_BATCH_REPOSITORY } from '../domain/repositories/pool-injection-batch.repository.interface'; + +@Global() +@Module({ + imports: [ + HttpModule.register({ + timeout: 5000, + maxRedirects: 5, + }), + ], + providers: [ + PrismaService, + { + provide: PLANTING_ORDER_REPOSITORY, + useClass: PlantingOrderRepositoryImpl, + }, + { + provide: PLANTING_POSITION_REPOSITORY, + useClass: PlantingPositionRepositoryImpl, + }, + { + provide: POOL_INJECTION_BATCH_REPOSITORY, + useClass: PoolInjectionBatchRepositoryImpl, + }, + WalletServiceClient, + ReferralServiceClient, + ], + exports: [ + PrismaService, + PLANTING_ORDER_REPOSITORY, + PLANTING_POSITION_REPOSITORY, + POOL_INJECTION_BATCH_REPOSITORY, + WalletServiceClient, + ReferralServiceClient, + ], +}) +export class InfrastructureModule {} diff --git a/backend/services/planting-service/src/infrastructure/persistence/mappers/index.ts b/backend/services/planting-service/src/infrastructure/persistence/mappers/index.ts new file mode 100644 index 00000000..a933d3a0 --- /dev/null +++ b/backend/services/planting-service/src/infrastructure/persistence/mappers/index.ts @@ -0,0 +1,3 @@ +export * from './planting-order.mapper'; +export * from './planting-position.mapper'; +export * from './pool-injection-batch.mapper'; diff --git a/backend/services/planting-service/src/infrastructure/persistence/mappers/planting-order.mapper.ts b/backend/services/planting-service/src/infrastructure/persistence/mappers/planting-order.mapper.ts new file mode 100644 index 00000000..dabb4898 --- /dev/null +++ b/backend/services/planting-service/src/infrastructure/persistence/mappers/planting-order.mapper.ts @@ -0,0 +1,115 @@ +import { + PlantingOrder as PrismaPlantingOrder, + FundAllocation as PrismaFundAllocation, + Prisma, +} from '@prisma/client'; +import { + PlantingOrder, + PlantingOrderData, +} from '../../../domain/aggregates/planting-order.aggregate'; +import { PlantingOrderStatus } from '../../../domain/value-objects/planting-order-status.enum'; +import { FundAllocation } from '../../../domain/value-objects/fund-allocation.vo'; +import { FundAllocationTargetType } from '../../../domain/value-objects/fund-allocation-target-type.enum'; + +type PlantingOrderWithAllocations = PrismaPlantingOrder & { + fundAllocations?: PrismaFundAllocation[]; +}; + +export class PlantingOrderMapper { + static toDomain(prismaOrder: PlantingOrderWithAllocations): PlantingOrder { + const data: PlantingOrderData = { + id: prismaOrder.id, + orderNo: prismaOrder.orderNo, + userId: prismaOrder.userId, + treeCount: prismaOrder.treeCount, + totalAmount: Number(prismaOrder.totalAmount), + status: prismaOrder.status as PlantingOrderStatus, + selectedProvince: prismaOrder.selectedProvince, + selectedCity: prismaOrder.selectedCity, + provinceCitySelectedAt: prismaOrder.provinceCitySelectedAt, + provinceCityConfirmedAt: prismaOrder.provinceCityConfirmedAt, + poolInjectionBatchId: prismaOrder.poolInjectionBatchId, + poolInjectionScheduledTime: prismaOrder.poolInjectionScheduledTime, + poolInjectionActualTime: prismaOrder.poolInjectionActualTime, + poolInjectionTxHash: prismaOrder.poolInjectionTxHash, + miningEnabledAt: prismaOrder.miningEnabledAt, + createdAt: prismaOrder.createdAt, + paidAt: prismaOrder.paidAt, + fundAllocatedAt: prismaOrder.fundAllocatedAt, + }; + + return PlantingOrder.reconstitute(data); + } + + static toPersistence(order: PlantingOrder): { + orderData: { + id?: bigint; + orderNo: string; + userId: bigint; + treeCount: number; + totalAmount: Prisma.Decimal; + selectedProvince: string | null; + selectedCity: string | null; + provinceCitySelectedAt: Date | null; + provinceCityConfirmedAt: Date | null; + status: string; + poolInjectionBatchId: bigint | null; + poolInjectionScheduledTime: Date | null; + poolInjectionActualTime: Date | null; + poolInjectionTxHash: string | null; + miningEnabledAt: Date | null; + createdAt: Date; + paidAt: Date | null; + fundAllocatedAt: Date | null; + }; + allocations: { + orderId: bigint; + targetType: string; + amount: Prisma.Decimal; + targetAccountId: string | null; + metadata: Prisma.InputJsonValue | null; + }[]; + } { + const data = order.toPersistence(); + + const orderData = { + id: data.id, + orderNo: data.orderNo, + userId: data.userId, + treeCount: data.treeCount, + totalAmount: new Prisma.Decimal(data.totalAmount), + selectedProvince: data.selectedProvince || null, + selectedCity: data.selectedCity || null, + provinceCitySelectedAt: data.provinceCitySelectedAt || null, + provinceCityConfirmedAt: data.provinceCityConfirmedAt || null, + status: data.status, + poolInjectionBatchId: data.poolInjectionBatchId || null, + poolInjectionScheduledTime: data.poolInjectionScheduledTime || null, + poolInjectionActualTime: data.poolInjectionActualTime || null, + poolInjectionTxHash: data.poolInjectionTxHash || null, + miningEnabledAt: data.miningEnabledAt || null, + createdAt: data.createdAt || new Date(), + paidAt: data.paidAt || null, + fundAllocatedAt: data.fundAllocatedAt || null, + }; + + const allocations = order.fundAllocations.map((a) => ({ + orderId: data.id!, + targetType: a.targetType, + amount: new Prisma.Decimal(a.amount), + targetAccountId: a.targetAccountId, + metadata: (a.metadata as Prisma.InputJsonValue) || null, + })); + + return { orderData, allocations }; + } + + static mapFundAllocation(prisma: PrismaFundAllocation): FundAllocation { + return new FundAllocation( + prisma.targetType as FundAllocationTargetType, + Number(prisma.amount), + prisma.targetAccountId, + prisma.metadata as Record | undefined, + ); + } +} diff --git a/backend/services/planting-service/src/infrastructure/persistence/mappers/planting-position.mapper.ts b/backend/services/planting-service/src/infrastructure/persistence/mappers/planting-position.mapper.ts new file mode 100644 index 00000000..e08153ff --- /dev/null +++ b/backend/services/planting-service/src/infrastructure/persistence/mappers/planting-position.mapper.ts @@ -0,0 +1,67 @@ +import { + PlantingPosition as PrismaPlantingPosition, + PositionDistribution as PrismaPositionDistribution, +} from '@prisma/client'; +import { + PlantingPosition, + PlantingPositionData, +} from '../../../domain/aggregates/planting-position.aggregate'; + +type PlantingPositionWithDistributions = PrismaPlantingPosition & { + distributions?: PrismaPositionDistribution[]; +}; + +export class PlantingPositionMapper { + static toDomain( + prismaPosition: PlantingPositionWithDistributions, + ): PlantingPosition { + const data: PlantingPositionData = { + id: prismaPosition.id, + userId: prismaPosition.userId, + totalTreeCount: prismaPosition.totalTreeCount, + effectiveTreeCount: prismaPosition.effectiveTreeCount, + pendingTreeCount: prismaPosition.pendingTreeCount, + firstMiningStartAt: prismaPosition.firstMiningStartAt, + distributions: prismaPosition.distributions?.map((d) => ({ + id: d.id, + userId: d.userId, + provinceCode: d.provinceCode, + cityCode: d.cityCode, + treeCount: d.treeCount, + })), + }; + + return PlantingPosition.reconstitute(data); + } + + static toPersistence(position: PlantingPosition): { + positionData: Omit & { + id?: bigint; + }; + distributions: Omit< + PrismaPositionDistribution, + 'id' | 'createdAt' | 'updatedAt' + >[]; + } { + const data = position.toPersistence(); + + const positionData = { + id: data.id, + userId: data.userId, + totalTreeCount: data.totalTreeCount, + effectiveTreeCount: data.effectiveTreeCount, + pendingTreeCount: data.pendingTreeCount, + firstMiningStartAt: data.firstMiningStartAt || null, + }; + + const distributions = + data.distributions?.map((d) => ({ + userId: d.userId, + provinceCode: d.provinceCode, + cityCode: d.cityCode, + treeCount: d.treeCount, + })) || []; + + return { positionData, distributions }; + } +} diff --git a/backend/services/planting-service/src/infrastructure/persistence/mappers/pool-injection-batch.mapper.ts b/backend/services/planting-service/src/infrastructure/persistence/mappers/pool-injection-batch.mapper.ts new file mode 100644 index 00000000..344ad26f --- /dev/null +++ b/backend/services/planting-service/src/infrastructure/persistence/mappers/pool-injection-batch.mapper.ts @@ -0,0 +1,53 @@ +import { PoolInjectionBatch as PrismaPoolInjectionBatch, Prisma } from '@prisma/client'; +import { + PoolInjectionBatch, + PoolInjectionBatchData, +} from '../../../domain/aggregates/pool-injection-batch.aggregate'; +import { BatchStatus } from '../../../domain/value-objects/batch-status.enum'; + +export class PoolInjectionBatchMapper { + static toDomain(prismaBatch: PrismaPoolInjectionBatch): PoolInjectionBatch { + const data: PoolInjectionBatchData = { + id: prismaBatch.id, + batchNo: prismaBatch.batchNo, + startDate: prismaBatch.startDate, + endDate: prismaBatch.endDate, + orderCount: prismaBatch.orderCount, + totalAmount: Number(prismaBatch.totalAmount), + status: prismaBatch.status as BatchStatus, + scheduledInjectionTime: prismaBatch.scheduledInjectionTime, + actualInjectionTime: prismaBatch.actualInjectionTime, + injectionTxHash: prismaBatch.injectionTxHash, + }; + + return PoolInjectionBatch.reconstitute(data); + } + + static toPersistence(batch: PoolInjectionBatch): { + id?: bigint; + batchNo: string; + startDate: Date; + endDate: Date; + orderCount: number; + totalAmount: Prisma.Decimal; + status: string; + scheduledInjectionTime: Date | null; + actualInjectionTime: Date | null; + injectionTxHash: string | null; + } { + const data = batch.toPersistence(); + + return { + id: data.id, + batchNo: data.batchNo, + startDate: data.startDate, + endDate: data.endDate, + orderCount: data.orderCount, + totalAmount: new Prisma.Decimal(data.totalAmount), + status: data.status, + scheduledInjectionTime: data.scheduledInjectionTime || null, + actualInjectionTime: data.actualInjectionTime || null, + injectionTxHash: data.injectionTxHash || null, + }; + } +} diff --git a/backend/services/planting-service/src/infrastructure/persistence/prisma/prisma.service.ts b/backend/services/planting-service/src/infrastructure/persistence/prisma/prisma.service.ts new file mode 100644 index 00000000..26dd81c6 --- /dev/null +++ b/backend/services/planting-service/src/infrastructure/persistence/prisma/prisma.service.ts @@ -0,0 +1,43 @@ +import { Injectable, OnModuleInit, OnModuleDestroy } from '@nestjs/common'; +import { PrismaClient } from '@prisma/client'; + +@Injectable() +export class PrismaService + extends PrismaClient + implements OnModuleInit, OnModuleDestroy +{ + constructor() { + super({ + log: + process.env.NODE_ENV === 'development' + ? ['query', 'info', 'warn', 'error'] + : ['error'], + }); + } + + async onModuleInit() { + await this.$connect(); + } + + async onModuleDestroy() { + await this.$disconnect(); + } + + async cleanDatabase() { + if (process.env.NODE_ENV !== 'test') { + throw new Error('cleanDatabase can only be used in test environment'); + } + + const tablenames = await this.$queryRaw< + Array<{ tablename: string }> + >`SELECT tablename FROM pg_tables WHERE schemaname='public'`; + + for (const { tablename } of tablenames) { + if (tablename !== '_prisma_migrations') { + await this.$executeRawUnsafe( + `TRUNCATE TABLE "public"."${tablename}" CASCADE;`, + ); + } + } + } +} diff --git a/backend/services/planting-service/src/infrastructure/persistence/repositories/index.ts b/backend/services/planting-service/src/infrastructure/persistence/repositories/index.ts new file mode 100644 index 00000000..fbdf614b --- /dev/null +++ b/backend/services/planting-service/src/infrastructure/persistence/repositories/index.ts @@ -0,0 +1,3 @@ +export * from './planting-order.repository.impl'; +export * from './planting-position.repository.impl'; +export * from './pool-injection-batch.repository.impl'; diff --git a/backend/services/planting-service/src/infrastructure/persistence/repositories/planting-order.repository.impl.ts b/backend/services/planting-service/src/infrastructure/persistence/repositories/planting-order.repository.impl.ts new file mode 100644 index 00000000..03fc2492 --- /dev/null +++ b/backend/services/planting-service/src/infrastructure/persistence/repositories/planting-order.repository.impl.ts @@ -0,0 +1,192 @@ +import { Injectable } from '@nestjs/common'; +import { Prisma } from '@prisma/client'; +import { PrismaService } from '../prisma/prisma.service'; +import { IPlantingOrderRepository } from '../../../domain/repositories/planting-order.repository.interface'; +import { PlantingOrder } from '../../../domain/aggregates/planting-order.aggregate'; +import { PlantingOrderStatus } from '../../../domain/value-objects/planting-order-status.enum'; +import { PlantingOrderMapper } from '../mappers/planting-order.mapper'; + +@Injectable() +export class PlantingOrderRepositoryImpl implements IPlantingOrderRepository { + constructor(private readonly prisma: PrismaService) {} + + async save(order: PlantingOrder): Promise { + const { orderData, allocations } = + PlantingOrderMapper.toPersistence(order); + + if (order.id) { + // 更新 + await this.prisma.plantingOrder.update({ + where: { id: order.id }, + data: { + status: orderData.status, + selectedProvince: orderData.selectedProvince, + selectedCity: orderData.selectedCity, + provinceCitySelectedAt: orderData.provinceCitySelectedAt, + provinceCityConfirmedAt: orderData.provinceCityConfirmedAt, + poolInjectionBatchId: orderData.poolInjectionBatchId, + poolInjectionScheduledTime: orderData.poolInjectionScheduledTime, + poolInjectionActualTime: orderData.poolInjectionActualTime, + poolInjectionTxHash: orderData.poolInjectionTxHash, + miningEnabledAt: orderData.miningEnabledAt, + paidAt: orderData.paidAt, + fundAllocatedAt: orderData.fundAllocatedAt, + }, + }); + + // 如果有新的资金分配,插入 + if (allocations.length > 0) { + const existingAllocations = await this.prisma.fundAllocation.count({ + where: { orderId: order.id }, + }); + + if (existingAllocations === 0) { + await this.prisma.fundAllocation.createMany({ + data: allocations.map((a) => ({ + orderId: order.id!, + targetType: a.targetType, + amount: a.amount, + targetAccountId: a.targetAccountId, + metadata: a.metadata ?? Prisma.DbNull, + })), + }); + } + } + } else { + // 创建 + const created = await this.prisma.plantingOrder.create({ + data: { + orderNo: orderData.orderNo, + userId: orderData.userId, + treeCount: orderData.treeCount, + totalAmount: orderData.totalAmount, + status: orderData.status, + selectedProvince: orderData.selectedProvince, + selectedCity: orderData.selectedCity, + provinceCitySelectedAt: orderData.provinceCitySelectedAt, + provinceCityConfirmedAt: orderData.provinceCityConfirmedAt, + poolInjectionBatchId: orderData.poolInjectionBatchId, + poolInjectionScheduledTime: orderData.poolInjectionScheduledTime, + poolInjectionActualTime: orderData.poolInjectionActualTime, + poolInjectionTxHash: orderData.poolInjectionTxHash, + miningEnabledAt: orderData.miningEnabledAt, + paidAt: orderData.paidAt, + fundAllocatedAt: orderData.fundAllocatedAt, + }, + }); + + order.setId(created.id); + } + } + + async findById(orderId: bigint): Promise { + const order = await this.prisma.plantingOrder.findUnique({ + where: { id: orderId }, + include: { fundAllocations: true }, + }); + + return order ? PlantingOrderMapper.toDomain(order) : null; + } + + async findByOrderNo(orderNo: string): Promise { + const order = await this.prisma.plantingOrder.findUnique({ + where: { orderNo }, + include: { fundAllocations: true }, + }); + + return order ? PlantingOrderMapper.toDomain(order) : null; + } + + async findByUserId( + userId: bigint, + page: number = 1, + pageSize: number = 10, + ): Promise { + const orders = await this.prisma.plantingOrder.findMany({ + where: { userId }, + include: { fundAllocations: true }, + orderBy: { createdAt: 'desc' }, + skip: (page - 1) * pageSize, + take: pageSize, + }); + + return orders.map(PlantingOrderMapper.toDomain); + } + + async findByStatus( + status: PlantingOrderStatus, + limit: number = 100, + ): Promise { + const orders = await this.prisma.plantingOrder.findMany({ + where: { status }, + include: { fundAllocations: true }, + orderBy: { createdAt: 'asc' }, + take: limit, + }); + + return orders.map(PlantingOrderMapper.toDomain); + } + + async findPendingPoolScheduling(): Promise { + const orders = await this.prisma.plantingOrder.findMany({ + where: { + status: PlantingOrderStatus.FUND_ALLOCATED, + poolInjectionBatchId: null, + }, + include: { fundAllocations: true }, + orderBy: { createdAt: 'asc' }, + }); + + return orders.map(PlantingOrderMapper.toDomain); + } + + async findByBatchId(batchId: bigint): Promise { + const orders = await this.prisma.plantingOrder.findMany({ + where: { poolInjectionBatchId: batchId }, + include: { fundAllocations: true }, + orderBy: { createdAt: 'asc' }, + }); + + return orders.map(PlantingOrderMapper.toDomain); + } + + async findReadyForMining(): Promise { + const orders = await this.prisma.plantingOrder.findMany({ + where: { + status: PlantingOrderStatus.POOL_INJECTED, + miningEnabledAt: null, + }, + include: { fundAllocations: true }, + orderBy: { createdAt: 'asc' }, + }); + + return orders.map(PlantingOrderMapper.toDomain); + } + + async countTreesByUserId(userId: bigint): Promise { + const result = await this.prisma.plantingOrder.aggregate({ + where: { + userId, + status: { + notIn: [PlantingOrderStatus.CANCELLED], + }, + }, + _sum: { + treeCount: true, + }, + }); + + return result._sum.treeCount || 0; + } + + async countByUserId(userId: bigint): Promise { + return this.prisma.plantingOrder.count({ + where: { + userId, + status: { + notIn: [PlantingOrderStatus.CANCELLED], + }, + }, + }); + } +} diff --git a/backend/services/planting-service/src/infrastructure/persistence/repositories/planting-position.repository.impl.ts b/backend/services/planting-service/src/infrastructure/persistence/repositories/planting-position.repository.impl.ts new file mode 100644 index 00000000..cf30ee48 --- /dev/null +++ b/backend/services/planting-service/src/infrastructure/persistence/repositories/planting-position.repository.impl.ts @@ -0,0 +1,101 @@ +import { Injectable } from '@nestjs/common'; +import { PrismaService } from '../prisma/prisma.service'; +import { IPlantingPositionRepository } from '../../../domain/repositories/planting-position.repository.interface'; +import { PlantingPosition } from '../../../domain/aggregates/planting-position.aggregate'; +import { PlantingPositionMapper } from '../mappers/planting-position.mapper'; + +@Injectable() +export class PlantingPositionRepositoryImpl + implements IPlantingPositionRepository +{ + constructor(private readonly prisma: PrismaService) {} + + async save(position: PlantingPosition): Promise { + const { positionData, distributions } = + PlantingPositionMapper.toPersistence(position); + + if (position.id) { + // 更新持仓 + await this.prisma.plantingPosition.update({ + where: { id: position.id }, + data: { + totalTreeCount: positionData.totalTreeCount, + effectiveTreeCount: positionData.effectiveTreeCount, + pendingTreeCount: positionData.pendingTreeCount, + firstMiningStartAt: positionData.firstMiningStartAt, + }, + }); + + // 更新分布 + for (const dist of distributions) { + await this.prisma.positionDistribution.upsert({ + where: { + userId_provinceCode_cityCode: { + userId: dist.userId, + provinceCode: dist.provinceCode ?? '', + cityCode: dist.cityCode ?? '', + }, + }, + update: { + treeCount: dist.treeCount, + }, + create: { + userId: dist.userId, + provinceCode: dist.provinceCode, + cityCode: dist.cityCode, + treeCount: dist.treeCount, + }, + }); + } + } else { + // 创建 + const created = await this.prisma.plantingPosition.create({ + data: { + userId: positionData.userId, + totalTreeCount: positionData.totalTreeCount, + effectiveTreeCount: positionData.effectiveTreeCount, + pendingTreeCount: positionData.pendingTreeCount, + firstMiningStartAt: positionData.firstMiningStartAt, + }, + }); + + position.setId(created.id); + + // 创建分布 + if (distributions.length > 0) { + await this.prisma.positionDistribution.createMany({ + data: distributions, + }); + } + } + } + + async findById(positionId: bigint): Promise { + const position = await this.prisma.plantingPosition.findUnique({ + where: { id: positionId }, + include: { distributions: true }, + }); + + return position ? PlantingPositionMapper.toDomain(position) : null; + } + + async findByUserId(userId: bigint): Promise { + const position = await this.prisma.plantingPosition.findUnique({ + where: { userId }, + include: { distributions: true }, + }); + + return position ? PlantingPositionMapper.toDomain(position) : null; + } + + async getOrCreate(userId: bigint): Promise { + let position = await this.findByUserId(userId); + + if (!position) { + position = PlantingPosition.create(userId); + await this.save(position); + } + + return position; + } +} diff --git a/backend/services/planting-service/src/infrastructure/persistence/repositories/pool-injection-batch.repository.impl.ts b/backend/services/planting-service/src/infrastructure/persistence/repositories/pool-injection-batch.repository.impl.ts new file mode 100644 index 00000000..b5694b0c --- /dev/null +++ b/backend/services/planting-service/src/infrastructure/persistence/repositories/pool-injection-batch.repository.impl.ts @@ -0,0 +1,114 @@ +import { Injectable } from '@nestjs/common'; +import { PrismaService } from '../prisma/prisma.service'; +import { IPoolInjectionBatchRepository } from '../../../domain/repositories/pool-injection-batch.repository.interface'; +import { PoolInjectionBatch } from '../../../domain/aggregates/pool-injection-batch.aggregate'; +import { BatchStatus } from '../../../domain/value-objects/batch-status.enum'; +import { PoolInjectionBatchMapper } from '../mappers/pool-injection-batch.mapper'; + +@Injectable() +export class PoolInjectionBatchRepositoryImpl + implements IPoolInjectionBatchRepository +{ + constructor(private readonly prisma: PrismaService) {} + + async save(batch: PoolInjectionBatch): Promise { + const data = PoolInjectionBatchMapper.toPersistence(batch); + + if (batch.id) { + // 更新 + await this.prisma.poolInjectionBatch.update({ + where: { id: batch.id }, + data: { + orderCount: data.orderCount, + totalAmount: data.totalAmount, + status: data.status, + scheduledInjectionTime: data.scheduledInjectionTime, + actualInjectionTime: data.actualInjectionTime, + injectionTxHash: data.injectionTxHash, + }, + }); + } else { + // 创建 + const created = await this.prisma.poolInjectionBatch.create({ + data: { + batchNo: data.batchNo, + startDate: data.startDate, + endDate: data.endDate, + orderCount: data.orderCount, + totalAmount: data.totalAmount, + status: data.status, + scheduledInjectionTime: data.scheduledInjectionTime, + actualInjectionTime: data.actualInjectionTime, + injectionTxHash: data.injectionTxHash, + }, + }); + + batch.setId(created.id); + } + } + + async findById(batchId: bigint): Promise { + const batch = await this.prisma.poolInjectionBatch.findUnique({ + where: { id: batchId }, + }); + + return batch ? PoolInjectionBatchMapper.toDomain(batch) : null; + } + + async findByBatchNo(batchNo: string): Promise { + const batch = await this.prisma.poolInjectionBatch.findUnique({ + where: { batchNo }, + }); + + return batch ? PoolInjectionBatchMapper.toDomain(batch) : null; + } + + async findByStatus(status: BatchStatus): Promise { + const batches = await this.prisma.poolInjectionBatch.findMany({ + where: { status }, + orderBy: { startDate: 'asc' }, + }); + + return batches.map(PoolInjectionBatchMapper.toDomain); + } + + async findCurrentBatch(): Promise { + const now = new Date(); + const batch = await this.prisma.poolInjectionBatch.findFirst({ + where: { + status: BatchStatus.PENDING, + startDate: { lte: now }, + endDate: { gte: now }, + }, + orderBy: { startDate: 'desc' }, + }); + + return batch ? PoolInjectionBatchMapper.toDomain(batch) : null; + } + + async findOrCreateCurrentBatch(): Promise { + let batch = await this.findCurrentBatch(); + + if (!batch) { + const today = new Date(); + today.setHours(0, 0, 0, 0); + batch = PoolInjectionBatch.create(today); + await this.save(batch); + } + + return batch; + } + + async findScheduledBatchesReadyForInjection(): Promise { + const now = new Date(); + const batches = await this.prisma.poolInjectionBatch.findMany({ + where: { + status: BatchStatus.SCHEDULED, + scheduledInjectionTime: { lte: now }, + }, + orderBy: { scheduledInjectionTime: 'asc' }, + }); + + return batches.map(PoolInjectionBatchMapper.toDomain); + } +} diff --git a/backend/services/planting-service/src/main.ts b/backend/services/planting-service/src/main.ts new file mode 100644 index 00000000..9d2345ea --- /dev/null +++ b/backend/services/planting-service/src/main.ts @@ -0,0 +1,51 @@ +import { NestFactory } from '@nestjs/core'; +import { ValidationPipe, Logger } from '@nestjs/common'; +import { SwaggerModule, DocumentBuilder } from '@nestjs/swagger'; +import { AppModule } from './app.module'; + +async function bootstrap() { + const logger = new Logger('Bootstrap'); + const app = await NestFactory.create(AppModule); + + // 全局前缀 + app.setGlobalPrefix('api/v1'); + + // 全局验证管道 + app.useGlobalPipes( + new ValidationPipe({ + whitelist: true, + forbidNonWhitelisted: true, + transform: true, + transformOptions: { enableImplicitConversion: true }, + }), + ); + + // CORS 配置 + app.enableCors({ + origin: '*', + methods: 'GET,HEAD,PUT,PATCH,POST,DELETE', + credentials: true, + }); + + // Swagger API 文档 + const config = new DocumentBuilder() + .setTitle('Planting Service API') + .setDescription('RWA 榴莲女皇平台认种服务 API') + .setVersion('1.0.0') + .addBearerAuth() + .addTag('认种订单', '认种订单相关接口') + .addTag('认种持仓', '认种持仓相关接口') + .addTag('健康检查', '服务健康检查接口') + .build(); + + const document = SwaggerModule.createDocument(app, config); + SwaggerModule.setup('api/docs', app, document); + + const port = process.env.APP_PORT || 3003; + await app.listen(port); + + logger.log(`Planting Service is running on port ${port}`); + logger.log(`Swagger docs: http://localhost:${port}/api/docs`); +} + +bootstrap(); diff --git a/backend/services/planting-service/src/shared/filters/global-exception.filter.ts b/backend/services/planting-service/src/shared/filters/global-exception.filter.ts new file mode 100644 index 00000000..5a84ca95 --- /dev/null +++ b/backend/services/planting-service/src/shared/filters/global-exception.filter.ts @@ -0,0 +1,40 @@ +import { + ExceptionFilter, + Catch, + ArgumentsHost, + HttpException, + HttpStatus, + Logger, +} from '@nestjs/common'; +import { Response } from 'express'; + +@Catch() +export class GlobalExceptionFilter implements ExceptionFilter { + private readonly logger = new Logger(GlobalExceptionFilter.name); + + catch(exception: unknown, host: ArgumentsHost) { + const ctx = host.switchToHttp(); + const response = ctx.getResponse(); + + let status = HttpStatus.INTERNAL_SERVER_ERROR; + let message = '服务器内部错误'; + + if (exception instanceof HttpException) { + status = exception.getStatus(); + const exceptionResponse = exception.getResponse(); + message = + typeof exceptionResponse === 'string' + ? exceptionResponse + : (exceptionResponse as any).message || exception.message; + } else if (exception instanceof Error) { + message = exception.message; + this.logger.error(`Unhandled error: ${exception.message}`, exception.stack); + } + + response.status(status).json({ + statusCode: status, + message: Array.isArray(message) ? message : [message], + timestamp: new Date().toISOString(), + }); + } +} diff --git a/backend/services/planting-service/src/shared/filters/index.ts b/backend/services/planting-service/src/shared/filters/index.ts new file mode 100644 index 00000000..c3ec44dc --- /dev/null +++ b/backend/services/planting-service/src/shared/filters/index.ts @@ -0,0 +1 @@ +export * from './global-exception.filter'; diff --git a/backend/services/planting-service/src/shared/index.ts b/backend/services/planting-service/src/shared/index.ts new file mode 100644 index 00000000..56c36b7f --- /dev/null +++ b/backend/services/planting-service/src/shared/index.ts @@ -0,0 +1 @@ +export * from './filters'; diff --git a/backend/services/planting-service/test/app.e2e-spec.ts b/backend/services/planting-service/test/app.e2e-spec.ts new file mode 100644 index 00000000..66787c8a --- /dev/null +++ b/backend/services/planting-service/test/app.e2e-spec.ts @@ -0,0 +1,372 @@ +import { Test, TestingModule } from '@nestjs/testing'; +import { INestApplication, ValidationPipe, ExecutionContext } from '@nestjs/common'; +import * as request from 'supertest'; +import { HealthController } from '../src/api/controllers/health.controller'; +import { PlantingOrderController } from '../src/api/controllers/planting-order.controller'; +import { PlantingPositionController } from '../src/api/controllers/planting-position.controller'; +import { PlantingApplicationService } from '../src/application/services/planting-application.service'; +import { JwtAuthGuard } from '../src/api/guards/jwt-auth.guard'; +import { ConfigModule } from '@nestjs/config'; + +// Mock for PlantingApplicationService +const mockPlantingService = { + createOrder: jest.fn(), + selectProvinceCity: jest.fn(), + confirmProvinceCity: jest.fn(), + payOrder: jest.fn(), + getUserOrders: jest.fn(), + getOrderDetail: jest.fn(), + getUserPosition: jest.fn(), + cancelOrder: jest.fn(), +}; + +// Mock JwtAuthGuard that always rejects unauthorized requests +const mockJwtAuthGuardReject = { + canActivate: jest.fn().mockReturnValue(false), +}; + +describe('PlantingController (e2e) - Unauthorized', () => { + let app: INestApplication; + + beforeAll(async () => { + const moduleFixture: TestingModule = await Test.createTestingModule({ + imports: [ + ConfigModule.forRoot({ + isGlobal: true, + envFilePath: '.env.test', + }), + ], + controllers: [HealthController, PlantingOrderController, PlantingPositionController], + providers: [ + { + provide: PlantingApplicationService, + useValue: mockPlantingService, + }, + ], + }) + .overrideGuard(JwtAuthGuard) + .useValue(mockJwtAuthGuardReject) + .compile(); + + app = moduleFixture.createNestApplication(); + app.setGlobalPrefix('api/v1'); + app.useGlobalPipes( + new ValidationPipe({ + whitelist: true, + forbidNonWhitelisted: true, + transform: true, + }), + ); + await app.init(); + }); + + afterAll(async () => { + await app.close(); + }); + + describe('/health (GET)', () => { + it('应该返回健康状态', () => { + return request(app.getHttpServer()) + .get('/api/v1/health') + .expect(200) + .expect((res) => { + expect(res.body.status).toBe('ok'); + expect(res.body.service).toBe('planting-service'); + }); + }); + }); + + describe('/health/ready (GET)', () => { + it('应该返回就绪状态', () => { + return request(app.getHttpServer()) + .get('/api/v1/health/ready') + .expect(200) + .expect((res) => { + expect(res.body.status).toBe('ready'); + }); + }); + }); + + describe('/planting/orders (POST)', () => { + it('应该拒绝未认证的请求', () => { + return request(app.getHttpServer()) + .post('/api/v1/planting/orders') + .send({ treeCount: 1 }) + .expect(403); + }); + }); + + describe('/planting/orders (GET)', () => { + it('应该拒绝未认证的请求', () => { + return request(app.getHttpServer()) + .get('/api/v1/planting/orders') + .expect(403); + }); + }); + + describe('/planting/position (GET)', () => { + it('应该拒绝未认证的请求', () => { + return request(app.getHttpServer()) + .get('/api/v1/planting/position') + .expect(403); + }); + }); +}); + +describe('PlantingController (e2e) - Authorized', () => { + let app: INestApplication; + const mockUser = { id: '1', username: 'testuser' }; + + beforeAll(async () => { + // Reset mocks + jest.clearAllMocks(); + + const mockJwtAuthGuardAccept = { + canActivate: (context: ExecutionContext) => { + const req = context.switchToHttp().getRequest(); + req.user = mockUser; + return true; + }, + }; + + const moduleFixture: TestingModule = await Test.createTestingModule({ + imports: [ + ConfigModule.forRoot({ + isGlobal: true, + envFilePath: '.env.test', + }), + ], + controllers: [HealthController, PlantingOrderController, PlantingPositionController], + providers: [ + { + provide: PlantingApplicationService, + useValue: mockPlantingService, + }, + ], + }) + .overrideGuard(JwtAuthGuard) + .useValue(mockJwtAuthGuardAccept) + .compile(); + + app = moduleFixture.createNestApplication(); + app.setGlobalPrefix('api/v1'); + app.useGlobalPipes( + new ValidationPipe({ + whitelist: true, + forbidNonWhitelisted: true, + transform: true, + }), + ); + await app.init(); + }); + + afterAll(async () => { + await app.close(); + }); + + beforeEach(() => { + jest.clearAllMocks(); + }); + + describe('/planting/orders (POST)', () => { + it('应该成功创建订单', async () => { + const mockOrder = { + orderNo: 'PO202411300001', + userId: '1', + treeCount: 5, + totalAmount: 10995, + status: 'CREATED', + createdAt: new Date().toISOString(), + }; + + mockPlantingService.createOrder.mockResolvedValue(mockOrder); + + const response = await request(app.getHttpServer()) + .post('/api/v1/planting/orders') + .send({ treeCount: 5 }) + .expect(201); + + expect(response.body.orderNo).toBe('PO202411300001'); + expect(response.body.treeCount).toBe(5); + }); + + it('应该验证treeCount必须为正整数', async () => { + await request(app.getHttpServer()) + .post('/api/v1/planting/orders') + .send({ treeCount: 0 }) + .expect(400); + + await request(app.getHttpServer()) + .post('/api/v1/planting/orders') + .send({ treeCount: -1 }) + .expect(400); + }); + + it('应该验证treeCount不能超过最大限制', async () => { + await request(app.getHttpServer()) + .post('/api/v1/planting/orders') + .send({ treeCount: 1001 }) + .expect(400); + }); + }); + + describe('/planting/orders (GET)', () => { + it('应该返回用户订单列表', async () => { + const mockOrders = [ + { + orderNo: 'PO202411300001', + treeCount: 5, + totalAmount: 10995, + status: 'CREATED', + }, + { + orderNo: 'PO202411300002', + treeCount: 3, + totalAmount: 6597, + status: 'PAID', + }, + ]; + + mockPlantingService.getUserOrders.mockResolvedValue(mockOrders); + + const response = await request(app.getHttpServer()) + .get('/api/v1/planting/orders') + .query({ page: 1, pageSize: 10 }) + .expect(200); + + expect(response.body).toHaveLength(2); + }); + }); + + describe('/planting/orders/:orderNo (GET)', () => { + it('应该返回订单详情', async () => { + const mockOrder = { + orderNo: 'PO202411300001', + treeCount: 5, + totalAmount: 10995, + status: 'CREATED', + }; + + mockPlantingService.getOrderDetail.mockResolvedValue(mockOrder); + + const response = await request(app.getHttpServer()) + .get('/api/v1/planting/orders/PO202411300001') + .expect(200); + + expect(response.body.orderNo).toBe('PO202411300001'); + }); + + it('应该返回404当订单不存在', async () => { + mockPlantingService.getOrderDetail.mockResolvedValue(null); + + await request(app.getHttpServer()) + .get('/api/v1/planting/orders/NONEXISTENT') + .expect(404); + }); + }); + + describe('/planting/position (GET)', () => { + it('应该返回用户持仓信息', async () => { + const mockPosition = { + totalTreeCount: 10, + effectiveTreeCount: 8, + pendingTreeCount: 2, + distributions: [ + { provinceCode: '440000', cityCode: '440100', treeCount: 10 }, + ], + }; + + mockPlantingService.getUserPosition.mockResolvedValue(mockPosition); + + const response = await request(app.getHttpServer()) + .get('/api/v1/planting/position') + .expect(200); + + expect(response.body.totalTreeCount).toBe(10); + expect(response.body.distributions).toHaveLength(1); + }); + }); + + describe('/planting/orders/:orderNo/select-province-city (POST)', () => { + it('应该成功选择省市', async () => { + mockPlantingService.selectProvinceCity.mockResolvedValue({ + success: true, + message: '省市选择成功', + }); + + const response = await request(app.getHttpServer()) + .post('/api/v1/planting/orders/PO202411300001/select-province-city') + .send({ + provinceCode: '440000', + provinceName: '广东省', + cityCode: '440100', + cityName: '广州市', + }) + .expect(200); + + expect(response.body.success).toBe(true); + }); + + it('应该验证省市参数', async () => { + await request(app.getHttpServer()) + .post('/api/v1/planting/orders/PO202411300001/select-province-city') + .send({ + provinceCode: '', + provinceName: '广东省', + }) + .expect(400); + }); + }); + + describe('/planting/orders/:orderNo/confirm-province-city (POST)', () => { + it('应该成功确认省市', async () => { + mockPlantingService.confirmProvinceCity.mockResolvedValue({ + success: true, + message: '省市确认成功', + }); + + const response = await request(app.getHttpServer()) + .post('/api/v1/planting/orders/PO202411300001/confirm-province-city') + .expect(200); + + expect(response.body.success).toBe(true); + }); + }); + + describe('/planting/orders/:orderNo/pay (POST)', () => { + it('应该成功支付订单', async () => { + const mockPayResult = { + orderNo: 'PO202411300001', + status: 'POOL_SCHEDULED', + allocations: [ + { targetType: 'POOL', amount: 1979.1 }, + { targetType: 'OPERATION', amount: 109.95 }, + ], + }; + + mockPlantingService.payOrder.mockResolvedValue(mockPayResult); + + const response = await request(app.getHttpServer()) + .post('/api/v1/planting/orders/PO202411300001/pay') + .expect(200); + + expect(response.body.status).toBe('POOL_SCHEDULED'); + expect(response.body.allocations).toHaveLength(2); + }); + }); + + describe('/planting/orders/:orderNo/cancel (POST)', () => { + it('应该成功取消订单', async () => { + mockPlantingService.cancelOrder.mockResolvedValue({ + success: true, + message: '订单取消成功', + }); + + const response = await request(app.getHttpServer()) + .post('/api/v1/planting/orders/PO202411300001/cancel') + .expect(200); + + expect(response.body.success).toBe(true); + }); + }); +}); diff --git a/backend/services/planting-service/test/jest-e2e.json b/backend/services/planting-service/test/jest-e2e.json new file mode 100644 index 00000000..11e9b9a4 --- /dev/null +++ b/backend/services/planting-service/test/jest-e2e.json @@ -0,0 +1,12 @@ +{ + "moduleFileExtensions": ["js", "json", "ts"], + "rootDir": ".", + "testEnvironment": "node", + "testRegex": ".e2e-spec.ts$", + "transform": { + "^.+\\.(t|j)s$": "ts-jest" + }, + "moduleNameMapper": { + "^@/(.*)$": "/../src/$1" + } +} diff --git a/backend/services/planting-service/tsconfig.build.json b/backend/services/planting-service/tsconfig.build.json new file mode 100644 index 00000000..64f86c6b --- /dev/null +++ b/backend/services/planting-service/tsconfig.build.json @@ -0,0 +1,4 @@ +{ + "extends": "./tsconfig.json", + "exclude": ["node_modules", "test", "dist", "**/*spec.ts"] +} diff --git a/backend/services/planting-service/tsconfig.json b/backend/services/planting-service/tsconfig.json index e69de29b..bd3c3946 100644 --- a/backend/services/planting-service/tsconfig.json +++ b/backend/services/planting-service/tsconfig.json @@ -0,0 +1,24 @@ +{ + "compilerOptions": { + "module": "commonjs", + "declaration": true, + "removeComments": true, + "emitDecoratorMetadata": true, + "experimentalDecorators": true, + "allowSyntheticDefaultImports": true, + "target": "ES2021", + "sourceMap": true, + "outDir": "./dist", + "baseUrl": "./", + "incremental": true, + "skipLibCheck": true, + "strictNullChecks": true, + "noImplicitAny": true, + "strictBindCallApply": true, + "forceConsistentCasingInFileNames": true, + "noFallthroughCasesInSwitch": true, + "paths": { + "@/*": ["src/*"] + } + } +}