diff --git a/AGENTS.md b/AGENTS.md index 78d2ee3..de7351d 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -47,7 +47,7 @@ ### **THE SCOUT (Reconnaissance)** -* **Model:** claude-3-haiku (or claude-3-5-haiku) +* **Model:** haiku (or claude-3-5-haiku) * **Role:** High-speed intelligence gathering, context mapping, and file summarization. * **Directives:** * **Read-Only:** STRICTLY FORBIDDEN from writing code or modifying files. @@ -114,6 +114,7 @@ ### **THE AUDITOR (QA / Tester)** +* **Model:** sonnet * **Role:** Verification, stress testing, and breaking things. * **Directives:** * Act hostile to the code. Try to break it. @@ -150,3 +151,25 @@ * **Agent:** Overwatch * **Order:** "Compile the results. Report status. Await next command." + +--- + +## 5. MISSION LOG + +### 2026-02-15 // NestJS Module Generation (Wipes, Maps, Plugins) + +**Agent:** Specialist (Sonnet 4.5) +**Objective:** Generate complete NestJS modules with controller/service/DTO/module structure for Wipes, Maps, and Plugins. + +**Execution:** +- Generated 3 complete modules totaling 16 files across DTOs, services, controllers, and module definitions +- All files follow established patterns: @InjectRepository, @CurrentTenant(), @RequirePermission(), ApiTags/ApiBearerAuth +- class-validator decorators on all DTO fields, PartialType imported from @nestjs/swagger for proper Swagger integration +- Permission-based guards applied: wipe.view/manage/execute, map.view/manage, plugin.view/manage + +**Deliverables:** +- **Wipes Module** (7 files): Profile/schedule CRUD, wipe history, manual trigger, dry-run simulation +- **Maps Module** (5 files): Library management, rotation system with order control +- **Plugins Module** (6 files): Install/uninstall, config management, reload trigger, uMod search stub + +**Result:** All modules operational and ready for integration into main app.module.ts. Multi-tenant isolation enforced via license_id scoping. diff --git a/backend-nest/.gitignore b/backend-nest/.gitignore new file mode 100644 index 0000000..8a6488f --- /dev/null +++ b/backend-nest/.gitignore @@ -0,0 +1,4 @@ +node_modules/ +dist/ +.env +*.js.map diff --git a/backend-nest/nest-cli.json b/backend-nest/nest-cli.json new file mode 100644 index 0000000..f9aa683 --- /dev/null +++ b/backend-nest/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-nest/package-lock.json b/backend-nest/package-lock.json new file mode 100644 index 0000000..923b1eb --- /dev/null +++ b/backend-nest/package-lock.json @@ -0,0 +1,6748 @@ +{ + "name": "corrosion-api", + "version": "1.0.0", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "corrosion-api", + "version": "1.0.0", + "dependencies": { + "@nestjs/common": "^10.4.0", + "@nestjs/config": "^3.2.0", + "@nestjs/core": "^10.4.0", + "@nestjs/jwt": "^10.2.0", + "@nestjs/microservices": "^10.4.0", + "@nestjs/passport": "^10.0.3", + "@nestjs/platform-express": "^10.4.0", + "@nestjs/platform-socket.io": "^10.4.0", + "@nestjs/schedule": "^4.0.0", + "@nestjs/swagger": "^7.3.0", + "@nestjs/typeorm": "^10.0.2", + "@nestjs/websockets": "^10.4.0", + "argon2": "^0.40.0", + "class-transformer": "^0.5.1", + "class-validator": "^0.14.1", + "nats": "^2.19.0", + "otpauth": "^9.2.0", + "passport": "^0.7.0", + "passport-jwt": "^4.0.1", + "pg": "^8.12.0", + "qrcode": "^1.5.3", + "reflect-metadata": "^0.2.2", + "rxjs": "^7.8.1", + "swagger-ui-express": "^5.0.0", + "typeorm": "^0.3.20", + "uuid": "^9.0.0" + }, + "devDependencies": { + "@nestjs/cli": "^10.4.0", + "@nestjs/schematics": "^10.1.0", + "@types/express": "^4.17.21", + "@types/node": "^20.12.0", + "@types/passport-jwt": "^4.0.1", + "@types/qrcode": "^1.5.5", + "@types/uuid": "^9.0.8", + "typescript": "^5.4.0" + } + }, + "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.29.0", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.29.0.tgz", + "integrity": "sha512-9NhCeYjq9+3uxgdtp20LSiJXJvN0FeCtNGpJxuMFZ1Kv3cWUNb6DOhJwUvcVCzKGR66cw4njwM6hrJLqgOwbcw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-validator-identifier": "^7.28.5", + "js-tokens": "^4.0.0", + "picocolors": "^1.1.1" + }, + "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/@borewit/text-codec": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/@borewit/text-codec/-/text-codec-0.2.1.tgz", + "integrity": "sha512-k7vvKPbf7J2fZ5klGRD9AeKfUvojuZIQ3BT5u7Jfv+puwXkUBUT5PVyMDfJZpy30CBDXGMgw7fguK/lpOMBvgw==", + "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/@isaacs/cliui": { + "version": "8.0.2", + "resolved": "https://registry.npmjs.org/@isaacs/cliui/-/cliui-8.0.2.tgz", + "integrity": "sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==", + "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==", + "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==", + "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==", + "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==", + "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==", + "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==", + "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/@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/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/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/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/common": { + "version": "10.4.22", + "resolved": "https://registry.npmjs.org/@nestjs/common/-/common-10.4.22.tgz", + "integrity": "sha512-fxJ4v85nDHaqT1PmfNCQ37b/jcv2OojtXTaK1P2uAXhzLf9qq6WNUOFvxBrV4fhQek1EQoT1o9oj5xAZmv3NRw==", + "license": "MIT", + "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.22", + "resolved": "https://registry.npmjs.org/@nestjs/core/-/core-10.4.22.tgz", + "integrity": "sha512-6IX9+VwjiKtCjx+mXVPncpkQ5ZjKfmssOZPFexmT+6T9H9wZ3svpYACAo7+9e7Nr9DZSoRZw3pffkJP7Z0UjaA==", + "hasInstallScript": true, + "license": "MIT", + "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/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/microservices": { + "version": "10.4.22", + "resolved": "https://registry.npmjs.org/@nestjs/microservices/-/microservices-10.4.22.tgz", + "integrity": "sha512-9Oxc0jQuppGLaQv5yaB2tVS2rAZzZ9NqDS1A4UlDLiYwJB7M6e89G6tmyOQjGjPwgoXPxQS4Vg2voSiKiED2gw==", + "license": "MIT", + "dependencies": { + "iterare": "1.2.1", + "tslib": "2.8.1" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/nest" + }, + "peerDependencies": { + "@grpc/grpc-js": "*", + "@nestjs/common": "^10.0.0", + "@nestjs/core": "^10.0.0", + "@nestjs/websockets": "^10.0.0", + "amqp-connection-manager": "*", + "amqplib": "*", + "cache-manager": "*", + "ioredis": "*", + "kafkajs": "*", + "mqtt": "*", + "nats": "*", + "reflect-metadata": "^0.1.12 || ^0.2.0", + "rxjs": "^7.1.0" + }, + "peerDependenciesMeta": { + "@grpc/grpc-js": { + "optional": true + }, + "@nestjs/websockets": { + "optional": true + }, + "amqp-connection-manager": { + "optional": true + }, + "amqplib": { + "optional": true + }, + "cache-manager": { + "optional": true + }, + "ioredis": { + "optional": true + }, + "kafkajs": { + "optional": true + }, + "mqtt": { + "optional": true + }, + "nats": { + "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.22", + "resolved": "https://registry.npmjs.org/@nestjs/platform-express/-/platform-express-10.4.22.tgz", + "integrity": "sha512-ySSq7Py/DFozzZdNDH67m/vHoeVdphDniWBnl6q5QVoXldDdrZIHLXLRMPayTDh5A95nt7jjJzmD4qpTbNQ6tA==", + "license": "MIT", + "dependencies": { + "body-parser": "1.20.4", + "cors": "2.8.5", + "express": "4.22.1", + "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/platform-express/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/@nestjs/platform-express/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/@nestjs/platform-express/node_modules/cookie-signature": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.7.tgz", + "integrity": "sha512-NXdYc3dLr47pBkpUCHtKSwIOQXLVn8dZEuywboCOJY/osA0wFSLlSawr3KN8qXJEyX66FcONTH8EIlVuK0yyFA==", + "license": "MIT" + }, + "node_modules/@nestjs/platform-express/node_modules/express": { + "version": "4.22.1", + "resolved": "https://registry.npmjs.org/express/-/express-4.22.1.tgz", + "integrity": "sha512-F2X8g9P1X7uCPZMA3MVf9wcTqlyNp7IhH5qPCI0izhaOIYXaW9L535tGA3qmjRzpH+bZczqq7hVKxTR4NWnu+g==", + "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.14.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/@nestjs/platform-express/node_modules/finalhandler": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.3.2.tgz", + "integrity": "sha512-aA4RyPcd3badbdABGDuTXCMTtOneUCAYH/gxoYRTZlIJdF0YPWuGqiAsIrhNnnqdXGswYk6dGujem4w80UJFhg==", + "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.2", + "unpipe": "~1.0.0" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/@nestjs/platform-express/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/@nestjs/platform-express/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/@nestjs/platform-express/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/@nestjs/platform-express/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/@nestjs/platform-express/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/@nestjs/platform-express/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/@nestjs/platform-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/@nestjs/platform-express/node_modules/send": { + "version": "0.19.2", + "resolved": "https://registry.npmjs.org/send/-/send-0.19.2.tgz", + "integrity": "sha512-VMbMxbDeehAxpOtWJXlcUS5E8iXh6QmN+BkRX1GARS3wRaXEEgzCcB10gTQazO42tpNIya8xIyNx8fll1OFPrg==", + "license": "MIT", + "dependencies": { + "debug": "2.6.9", + "depd": "2.0.0", + "destroy": "1.2.0", + "encodeurl": "~2.0.0", + "escape-html": "~1.0.3", + "etag": "~1.8.1", + "fresh": "~0.5.2", + "http-errors": "~2.0.1", + "mime": "1.6.0", + "ms": "2.1.3", + "on-finished": "~2.4.1", + "range-parser": "~1.2.1", + "statuses": "~2.0.2" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/@nestjs/platform-express/node_modules/serve-static": { + "version": "1.16.3", + "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.16.3.tgz", + "integrity": "sha512-x0RTqQel6g5SY7Lg6ZreMmsOzncHFU7nhnRWkKgWuMTu5NN0DR5oruckMqRvacAN9d5w6ARnRBXl9xhDCgfMeA==", + "license": "MIT", + "dependencies": { + "encodeurl": "~2.0.0", + "escape-html": "~1.0.3", + "parseurl": "~1.3.3", + "send": "~0.19.1" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/@nestjs/platform-socket.io": { + "version": "10.4.22", + "resolved": "https://registry.npmjs.org/@nestjs/platform-socket.io/-/platform-socket.io-10.4.22.tgz", + "integrity": "sha512-xxGw3R0Ihr51/Omq23z3//bKmCXyVKaikxbH0/pkwqMsQrxkUv9NabNUZ22b4Jnlwwi02X+zlwo8GRa9u8oV9g==", + "license": "MIT", + "dependencies": { + "socket.io": "4.8.1", + "tslib": "2.8.1" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/nest" + }, + "peerDependencies": { + "@nestjs/common": "^10.0.0", + "@nestjs/websockets": "^10.0.0", + "rxjs": "^7.1.0" + } + }, + "node_modules/@nestjs/schedule": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/@nestjs/schedule/-/schedule-4.1.2.tgz", + "integrity": "sha512-hCTQ1lNjIA5EHxeu8VvQu2Ed2DBLS1GSC6uKPYlBiQe6LL9a7zfE9iVSK+zuK8E2odsApteEBmfAQchc8Hx0Gg==", + "license": "MIT", + "dependencies": { + "cron": "3.2.1", + "uuid": "11.0.3" + }, + "peerDependencies": { + "@nestjs/common": "^8.0.0 || ^9.0.0 || ^10.0.0", + "@nestjs/core": "^8.0.0 || ^9.0.0 || ^10.0.0" + } + }, + "node_modules/@nestjs/schedule/node_modules/uuid": { + "version": "11.0.3", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-11.0.3.tgz", + "integrity": "sha512-d0z310fCWv5dJwnX1Y/MncBAqGMKEzlBb1AOf7z9K8ALnd0utBX/msg/fA0+sbyN1ihbMsLhrBlnl1ak7Wa0rg==", + "funding": [ + "https://github.com/sponsors/broofa", + "https://github.com/sponsors/ctavan" + ], + "license": "MIT", + "bin": { + "uuid": "dist/esm/bin/uuid" + } + }, + "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/typeorm": { + "version": "10.0.2", + "resolved": "https://registry.npmjs.org/@nestjs/typeorm/-/typeorm-10.0.2.tgz", + "integrity": "sha512-H738bJyydK4SQkRCTeh1aFBxoO1E9xdL/HaLGThwrqN95os5mEyAtK7BLADOS+vldP4jDZ2VQPLj4epWwRqCeQ==", + "license": "MIT", + "dependencies": { + "uuid": "9.0.1" + }, + "peerDependencies": { + "@nestjs/common": "^8.0.0 || ^9.0.0 || ^10.0.0", + "@nestjs/core": "^8.0.0 || ^9.0.0 || ^10.0.0", + "reflect-metadata": "^0.1.13 || ^0.2.0", + "rxjs": "^7.2.0", + "typeorm": "^0.3.0" + } + }, + "node_modules/@nestjs/websockets": { + "version": "10.4.22", + "resolved": "https://registry.npmjs.org/@nestjs/websockets/-/websockets-10.4.22.tgz", + "integrity": "sha512-OLd4i0Faq7vgdtB5vVUrJ54hWEtcXy9poJ6n7kbbh/5ms+KffUl+wwGsbe7uSXLrkoyI8xXU6fZPkFArI+XiRg==", + "license": "MIT", + "dependencies": { + "iterare": "1.2.1", + "object-hash": "3.0.0", + "tslib": "2.8.1" + }, + "peerDependencies": { + "@nestjs/common": "^10.0.0", + "@nestjs/core": "^10.0.0", + "@nestjs/platform-socket.io": "^10.0.0", + "reflect-metadata": "^0.1.12 || ^0.2.0", + "rxjs": "^7.1.0" + }, + "peerDependenciesMeta": { + "@nestjs/platform-socket.io": { + "optional": true + } + } + }, + "node_modules/@noble/hashes": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-2.0.1.tgz", + "integrity": "sha512-XlOlEbQcE9fmuXxrVTXCTlG2nlRXa9Rj3rr5Ue/+tX+nmkgbX720YHh0VR3hBF9xDvwnb8D2shVGOwNx+ulArw==", + "license": "MIT", + "engines": { + "node": ">= 20.19.0" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "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/@phc/format": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/@phc/format/-/format-1.0.0.tgz", + "integrity": "sha512-m7X9U6BG2+J+R1lSOdCiITLLrxm+cWlNI3HUFA92oLO77ObGNzaKdh8pMLqdZcshtkKuV84olNNXDfMc4FezBQ==", + "license": "MIT", + "engines": { + "node": ">=10" + } + }, + "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==", + "license": "MIT", + "optional": true, + "engines": { + "node": ">=14" + } + }, + "node_modules/@socket.io/component-emitter": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/@socket.io/component-emitter/-/component-emitter-3.1.2.tgz", + "integrity": "sha512-9BCxFwvbGg/RsZK9tjXd8s4UcwR0MWeFQ1XEKIQVVvAGJyINdrqKMcTRyLoK8Rse1GjzLV9cwjWV1olXRWEXVA==", + "license": "MIT" + }, + "node_modules/@sqltools/formatter": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/@sqltools/formatter/-/formatter-1.2.5.tgz", + "integrity": "sha512-Uy0+khmZqUrUGm5dmMqVlnvufZRSK0FbYzVgp0UMstm+F5+W2/jnEEQyc9vo1ZR/E5ZI/B1WjjoTqBqwJL6Krw==", + "license": "MIT" + }, + "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/inflate/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/@tokenizer/inflate/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/@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/@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/cors": { + "version": "2.8.19", + "resolved": "https://registry.npmjs.org/@types/cors/-/cors-2.8.19.tgz", + "integrity": "sha512-mFNylyeyqN93lfe/9CSxOGREz8cpzAhH+E93xJ4xWQf62V8sQ/24reV2nyzUWM6H6Xji+GGHpkbLe7pVoUEskg==", + "license": "MIT", + "dependencies": { + "@types/node": "*" + } + }, + "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", + "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.8", + "resolved": "https://registry.npmjs.org/@types/express-serve-static-core/-/express-serve-static-core-4.19.8.tgz", + "integrity": "sha512-02S5fmqeoKzVZCHPZid4b8JH2eM5HzQLZWN2FohQEy/0eXTq8VXZfSN6Pcr3F6N9R/vNrj7cpgbhjie6m/1tCA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/node": "*", + "@types/qs": "*", + "@types/range-parser": "*", + "@types/send": "*" + } + }, + "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/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.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/@types/luxon": { + "version": "3.4.2", + "resolved": "https://registry.npmjs.org/@types/luxon/-/luxon-3.4.2.tgz", + "integrity": "sha512-TifLZlFudklWlMBfhubvgqTXRzLDI5pCbGa4P8a3wPyUQSW+1xQ5eDsreP9DWHX3tjq1ke96uYG/nwundroWcA==", + "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/node": { + "version": "20.19.33", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.19.33.tgz", + "integrity": "sha512-Rs1bVAIdBs5gbTIKza/tgpMuG1k3U/UMJLWecIMxNdJFDMzcM5LOiLVRYh3PilWEYDIeUDv7bpiHPLPsbydGcw==", + "license": "MIT", + "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/qrcode": { + "version": "1.5.6", + "resolved": "https://registry.npmjs.org/@types/qrcode/-/qrcode-1.5.6.tgz", + "integrity": "sha512-te7NQcV2BOvdj2b1hCAHzAoMNuj65kNBMz0KBaxM6c3VGBOhU0dURQKOtH8CFNI/dsKkwlv32p26qYQTWoB5bw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/node": "*" + } + }, + "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/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/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/@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": "2.0.0", + "resolved": "https://registry.npmjs.org/accepts/-/accepts-2.0.0.tgz", + "integrity": "sha512-5cvg6CtKwfgdmVqY1WIiXKc3Q1bkRqGLi+2W/6ao+6Y7gu/RCwRuAhGEzh5B4KlszSuTLgZYuqFqo5bImjNKng==", + "license": "MIT", + "peer": true, + "dependencies": { + "mime-types": "^3.0.0", + "negotiator": "^1.0.0" + }, + "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", + "bin": { + "acorn": "bin/acorn" + }, + "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", + "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-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "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/ansis": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/ansis/-/ansis-4.2.0.tgz", + "integrity": "sha512-HqZ5rWlFjGiV0tDm3UxxgNRqsOTniqoKZu0pIAfh7TZQMGuZK+hH0drySty0si0QXj1ieop4+SkSfPZBPPkHig==", + "license": "ISC", + "engines": { + "node": ">=14" + } + }, + "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/app-root-path": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/app-root-path/-/app-root-path-3.1.0.tgz", + "integrity": "sha512-biN3PwB2gUtjaYy/isrU3aNWI5w+fAfvHkSvCKeQGxhmYpwKFUxudR3Yya+KqVRHBmEDYh+/lTozYCFbmzX4nA==", + "license": "MIT", + "engines": { + "node": ">= 6.0.0" + } + }, + "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/argon2": { + "version": "0.40.3", + "resolved": "https://registry.npmjs.org/argon2/-/argon2-0.40.3.tgz", + "integrity": "sha512-FrSmz4VeM91jwFvvjsQv9GYp6o/kARWoYKjbjDB2U5io1H3e5X67PYGclFDeQff6UXIhUd4aHR3mxCdBbMMuQw==", + "hasInstallScript": true, + "license": "MIT", + "dependencies": { + "@phc/format": "^1.0.0", + "node-addon-api": "^8.0.0", + "node-gyp-build": "^4.8.0" + }, + "engines": { + "node": ">=16.17.0" + } + }, + "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/available-typed-arrays": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.7.tgz", + "integrity": "sha512-wvUjBtSGN7+7SjNpq/9M2Tg350UZD3q62IFZLbRAR1bSMlCo1ZaeW+BJ+D090e4hIIZLBcTDWe4Mh4jvUDajzQ==", + "license": "MIT", + "dependencies": { + "possible-typed-array-names": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "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==", + "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==", + "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/base64id": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/base64id/-/base64id-2.0.0.tgz", + "integrity": "sha512-lGe34o6EHj9y3Kts9R4ZYs/Gr+6N7MCaMlIFA3F1R2O5/m7K06AxfSeO5530PEERE6/WyEg3lsuyw4GHlPZHog==", + "license": "MIT", + "engines": { + "node": "^4.5.0 || >= 5.9" + } + }, + "node_modules/baseline-browser-mapping": { + "version": "2.9.19", + "resolved": "https://registry.npmjs.org/baseline-browser-mapping/-/baseline-browser-mapping-2.9.19.tgz", + "integrity": "sha512-ipDqC8FrAl/76p2SSWKSI+H9tFwm7vYqXQrItCuiVPt26Km0jS+NzSsBWAaBusvSbQcfJG+JitdMm+wZAgTYqg==", + "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.4", + "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.4.tgz", + "integrity": "sha512-ZTgYYLMOXY9qKU/57FAo8F+HA2dGX7bqGc71txDRC1rS4frdFI5R7NhluHxH6M0YItAP0sHB4uqAOcYKxO6uGA==", + "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.1", + "iconv-lite": "~0.4.24", + "on-finished": "~2.4.1", + "qs": "~6.14.0", + "raw-body": "~2.5.3", + "type-is": "~1.6.18", + "unpipe": "~1.0.0" + }, + "engines": { + "node": ">= 0.8", + "npm": "1.2.8000 || >= 1.4.16" + } + }, + "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/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.1", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.28.1.tgz", + "integrity": "sha512-ZC5Bd0LgJXgwGqUknZY/vkUQ04r8NXnJZ3yYi4vDmSiZmC/pdSN0NbNRPxZpbtO4uAfDUAFffO8IZoM3Gj8IkA==", + "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": { + "baseline-browser-mapping": "^2.9.0", + "caniuse-lite": "^1.0.30001759", + "electron-to-chromium": "^1.5.263", + "node-releases": "^2.0.27", + "update-browserslist-db": "^1.2.0" + }, + "bin": { + "browserslist": "cli.js" + }, + "engines": { + "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7" + } + }, + "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==", + "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==", + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/caniuse-lite": { + "version": "1.0.30001770", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001770.tgz", + "integrity": "sha512-x/2CLQ1jHENRbHg5PSId2sXq1CIO1CISvwWAj027ltMVG2UNgW+w9oH2+HzgEIRFembL8bUlXtfbBHR1fCg2xw==", + "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/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/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" + }, + "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", + "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": "6.0.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-6.0.0.tgz", + "integrity": "sha512-t6wbgtoCXvAzst7QgXxJYqPt0usEfbgQdftEPbLL/cvv6HPE5VgvqCuAIDR0NgU52ds6rFwqrgakNLrHEjCbrQ==", + "license": "ISC", + "dependencies": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.0", + "wrap-ansi": "^6.2.0" + } + }, + "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/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/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/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": "1.0.1", + "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-1.0.1.tgz", + "integrity": "sha512-oIXISMynqSqm241k6kcQ5UwttDILMK4BiurCfGEREw6+X9jkkpEe5T9FZaApyLGGOnFuyMWZpdolTXMtvEJ08Q==", + "license": "MIT", + "peer": true, + "engines": { + "node": ">=18" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/express" + } + }, + "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/cookie": { + "version": "0.7.2", + "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.7.2.tgz", + "integrity": "sha512-yki5XnKuf750l50uGTllt6kKILY4nQ1eNIQatoXEByZ5dWgnKqbnqmTrBE5B4N7lrMJKQ2ytWMiTO2o0v6Ew/w==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/cookie-signature": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.2.2.tgz", + "integrity": "sha512-D76uU73ulSXrD1UXF4KE2TMxVVwhsnCgfAyTg9k8P6KGZjlXKrOLe4dJQKI3Bxi5wjesZoFXJWElNWBjPZMbhg==", + "license": "MIT", + "peer": true, + "engines": { + "node": ">=6.6.0" + } + }, + "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/cron": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/cron/-/cron-3.2.1.tgz", + "integrity": "sha512-w2n5l49GMmmkBFEsH9FIDhjZ1n1QgTMOCMGuQtOXs5veNiosZmso6bQGuqOJSYAXXrG84WQFVneNk+Yt0Ua9iw==", + "license": "MIT", + "dependencies": { + "@types/luxon": "~3.4.0", + "luxon": "~3.5.0" + } + }, + "node_modules/cross-spawn": { + "version": "7.0.6", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz", + "integrity": "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==", + "license": "MIT", + "dependencies": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/dayjs": { + "version": "1.11.19", + "resolved": "https://registry.npmjs.org/dayjs/-/dayjs-1.11.19.tgz", + "integrity": "sha512-t5EcLVS6QPBNqM2z8fakk/NKel+Xzshgt8FFKAn+qwlD1pzZWxh0nVCrvFK7ZDb6XucZeF9z8C7CBWTRIVApAw==", + "license": "MIT" + }, + "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/decamelize": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", + "integrity": "sha512-z2S+W9X73hAUUki+N+9Za2lBlun89zigOyGrsax+KUQ6wKW4ZoWpEYBkGhQjwAjjDCkWxhY0VKEhk8wzY7F5cA==", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/dedent": { + "version": "1.7.1", + "resolved": "https://registry.npmjs.org/dedent/-/dedent-1.7.1.tgz", + "integrity": "sha512-9JmrhGZpOlEgOLdQgSm0zxFaYoQon408V1v49aqTWuXENVlnCuY9JBZcXZiCsZQWDjTm5Qf/nIvAy77mXDAjEg==", + "license": "MIT", + "peerDependencies": { + "babel-plugin-macros": "^3.1.0" + }, + "peerDependenciesMeta": { + "babel-plugin-macros": { + "optional": true + } + } + }, + "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==", + "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/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/dijkstrajs": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/dijkstrajs/-/dijkstrajs-1.0.3.tgz", + "integrity": "sha512-qiSlmBq9+BCdCA/L46dw8Uy93mloxsPSbwnm5yrKn2vMPiy8KyAskTF6zuV/j5BMsmOGZDPs7KjU+mjb670kfA==", + "license": "MIT" + }, + "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==", + "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.286", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.286.tgz", + "integrity": "sha512-9tfDXhJ4RKFNerfjdCcZfufu49vg620741MNs26a9+bhLThdB+plgMeou98CAaHu/WATj2iHOOHTp1hWtABj2A==", + "dev": true, + "license": "ISC" + }, + "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==", + "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/engine.io": { + "version": "6.6.5", + "resolved": "https://registry.npmjs.org/engine.io/-/engine.io-6.6.5.tgz", + "integrity": "sha512-2RZdgEbXmp5+dVbRm0P7HQUImZpICccJy7rN7Tv+SFa55pH+lxnuw6/K1ZxxBfHoYpSkHLAO92oa8O4SwFXA2A==", + "license": "MIT", + "dependencies": { + "@types/cors": "^2.8.12", + "@types/node": ">=10.0.0", + "accepts": "~1.3.4", + "base64id": "2.0.0", + "cookie": "~0.7.2", + "cors": "~2.8.5", + "debug": "~4.4.1", + "engine.io-parser": "~5.2.1", + "ws": "~8.18.3" + }, + "engines": { + "node": ">=10.2.0" + } + }, + "node_modules/engine.io-parser": { + "version": "5.2.3", + "resolved": "https://registry.npmjs.org/engine.io-parser/-/engine.io-parser-5.2.3.tgz", + "integrity": "sha512-HqD3yTBfnBxIrbnM1DoD6Pcq8NECnh8d4As1Qgh0z5Gg3jRRIqijury0CL3ghu/edArpUYiYqQiDUQBIs4np3Q==", + "license": "MIT", + "engines": { + "node": ">=10.0.0" + } + }, + "node_modules/engine.io/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/engine.io/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/engine.io/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/engine.io/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/engine.io/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/engine.io/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/enhanced-resolve": { + "version": "5.19.0", + "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.19.0.tgz", + "integrity": "sha512-phv3E1Xl4tQOShqSte26C7Fl84EwUdZsyOuSSk9qtAGyyQs2s3jJzComh+Abf4g187lUUAvH+H26omrqia2aGg==", + "dev": true, + "license": "MIT", + "dependencies": { + "graceful-fs": "^4.2.4", + "tapable": "^2.3.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/escalade": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.2.0.tgz", + "integrity": "sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==", + "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": "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/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/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/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/esrecurse/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/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/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/express": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/express/-/express-5.2.1.tgz", + "integrity": "sha512-hIS4idWWai69NezIdRt2xFVofaF4j+6INOpJlVOLDO8zXGpUVEVzIYk12UUi2JzjEzWL3IOAxcTubgz9Po0yXw==", + "license": "MIT", + "peer": true, + "dependencies": { + "accepts": "^2.0.0", + "body-parser": "^2.2.1", + "content-disposition": "^1.0.0", + "content-type": "^1.0.5", + "cookie": "^0.7.1", + "cookie-signature": "^1.2.1", + "debug": "^4.4.0", + "depd": "^2.0.0", + "encodeurl": "^2.0.0", + "escape-html": "^1.0.3", + "etag": "^1.8.1", + "finalhandler": "^2.1.0", + "fresh": "^2.0.0", + "http-errors": "^2.0.0", + "merge-descriptors": "^2.0.0", + "mime-types": "^3.0.0", + "on-finished": "^2.4.1", + "once": "^1.4.0", + "parseurl": "^1.3.3", + "proxy-addr": "^2.0.7", + "qs": "^6.14.0", + "range-parser": "^1.2.1", + "router": "^2.2.0", + "send": "^1.1.0", + "serve-static": "^2.2.0", + "statuses": "^2.0.1", + "type-is": "^2.0.1", + "vary": "^1.1.2" + }, + "engines": { + "node": ">= 18" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/express" + } + }, + "node_modules/express/node_modules/body-parser": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-2.2.2.tgz", + "integrity": "sha512-oP5VkATKlNwcgvxi0vM0p/D3n2C3EReYVX+DNYs5TjZFn/oQt2j+4sVJtSMr18pdRr8wjTcBl6LoV+FUwzPmNA==", + "license": "MIT", + "peer": true, + "dependencies": { + "bytes": "^3.1.2", + "content-type": "^1.0.5", + "debug": "^4.4.3", + "http-errors": "^2.0.0", + "iconv-lite": "^0.7.0", + "on-finished": "^2.4.1", + "qs": "^6.14.1", + "raw-body": "^3.0.1", + "type-is": "^2.0.1" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/express" + } + }, + "node_modules/express/node_modules/debug": { + "version": "4.4.3", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz", + "integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==", + "license": "MIT", + "peer": true, + "dependencies": { + "ms": "^2.1.3" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/express/node_modules/iconv-lite": { + "version": "0.7.2", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.7.2.tgz", + "integrity": "sha512-im9DjEDQ55s9fL4EYzOAv0yMqmMBSZp6G0VvFyTMPKWxiSBHUj9NW/qqLmXUwXrrM7AvqSlTCfvqRb0cM8yYqw==", + "license": "MIT", + "peer": true, + "dependencies": { + "safer-buffer": ">= 2.1.2 < 3.0.0" + }, + "engines": { + "node": ">=0.10.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/express" + } + }, + "node_modules/express/node_modules/media-typer": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-1.1.0.tgz", + "integrity": "sha512-aisnrDP4GNe06UcKFnV5bfMNPBUw4jsLGaWwWfnH3v02GnBuXX2MCVn5RbrWo0j3pczUilYblq7fQ7Nw2t5XKw==", + "license": "MIT", + "peer": true, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/express/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", + "peer": true + }, + "node_modules/express/node_modules/raw-body": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-3.0.2.tgz", + "integrity": "sha512-K5zQjDllxWkf7Z5xJdV0/B0WTNqx6vxG70zJE4N0kBs4LovmEYWJzQGxC9bS9RAKu3bgM40lrd5zoLJ12MQ5BA==", + "license": "MIT", + "peer": true, + "dependencies": { + "bytes": "~3.1.2", + "http-errors": "~2.0.1", + "iconv-lite": "~0.7.0", + "unpipe": "~1.0.0" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/express/node_modules/type-is": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/type-is/-/type-is-2.0.1.tgz", + "integrity": "sha512-OZs6gsjF4vMp32qrCbiVSkrFmXtG/AZhY3t0iAMrMBiAZyV9oALtXO8hsrHbMXF9x6L3grlFuwW2oAz7cav+Gw==", + "license": "MIT", + "peer": true, + "dependencies": { + "content-type": "^1.0.5", + "media-typer": "^1.1.0", + "mime-types": "^3.0.0" + }, + "engines": { + "node": ">= 0.6" + } + }, + "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-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-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/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/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": "2.1.1", + "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-2.1.1.tgz", + "integrity": "sha512-S8KoZgRZN+a5rNwqTxlZZePjT/4cnm0ROV70LedRHZ0p8u9fRID0hJUZQpkKLzro8LfmC8sx23bY6tVNxv8pQA==", + "license": "MIT", + "peer": true, + "dependencies": { + "debug": "^4.4.0", + "encodeurl": "^2.0.0", + "escape-html": "^1.0.3", + "on-finished": "^2.4.1", + "parseurl": "^1.3.3", + "statuses": "^2.0.1" + }, + "engines": { + "node": ">= 18.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/express" + } + }, + "node_modules/finalhandler/node_modules/debug": { + "version": "4.4.3", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz", + "integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==", + "license": "MIT", + "peer": true, + "dependencies": { + "ms": "^2.1.3" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/finalhandler/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", + "peer": true + }, + "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==", + "license": "MIT", + "dependencies": { + "locate-path": "^5.0.0", + "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/for-each": { + "version": "0.3.5", + "resolved": "https://registry.npmjs.org/for-each/-/for-each-0.3.5.tgz", + "integrity": "sha512-dKx12eRCVIzqCxFGplyFKJMPvLEWgmNtUrpTiJIR5u97zEhRG8ySrtboPHZXx7daLxQVrl643cTzbab2tkQjxg==", + "license": "MIT", + "dependencies": { + "is-callable": "^1.2.7" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "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==", + "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/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": "2.0.0", + "resolved": "https://registry.npmjs.org/fresh/-/fresh-2.0.0.tgz", + "integrity": "sha512-Rx/WycZ60HOaqLKAi6cHRKKI7zxWbJ31MhntmtwMoaTeF7XFH9hhBp8vITaMidfljRQ6eYWCKkaTK+ykVJHP2A==", + "license": "MIT", + "peer": true, + "engines": { + "node": ">= 0.8" + } + }, + "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/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/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==", + "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-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/glob": { + "version": "10.4.5", + "resolved": "https://registry.npmjs.org/glob/-/glob-10.4.5.tgz", + "integrity": "sha512-7Bv8RF0k6xjo7d4A/PxYLbUCfb6c+Vpd2/mB2yRDlew7Jb5hEXiCD9ibfO7wpk8i4sevK6DFny9h7EYbM3/sHg==", + "deprecated": "Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me", + "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/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/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/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/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==", + "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/http-errors": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.1.tgz", + "integrity": "sha512-4FbRdAX+bSdmo4AUFuS0WNiPz8NgFt+r8ThgNWmlrjQjt1Q7ZR9+zTlce2859x4KSXrwIsaeTqDoKQmtP8pLmQ==", + "license": "MIT", + "dependencies": { + "depd": "~2.0.0", + "inherits": "~2.0.4", + "setprototypeof": "~1.2.0", + "statuses": "~2.0.2", + "toidentifier": "~1.0.1" + }, + "engines": { + "node": ">= 0.8" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/express" + } + }, + "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/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/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-callable": { + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.7.tgz", + "integrity": "sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA==", + "license": "MIT", + "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==", + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "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-promise": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/is-promise/-/is-promise-4.0.0.tgz", + "integrity": "sha512-hvpoI6korhJMnej285dSg6nu1+e6uxs7zG3BYAm5byqDsgJNWwxzM6z6iZiAgQR4TJ30JmBTOwqZUw3WlyH3AQ==", + "license": "MIT", + "peer": true + }, + "node_modules/is-typed-array": { + "version": "1.1.15", + "resolved": "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.15.tgz", + "integrity": "sha512-p3EcsicXjit7SaskXHs1hA91QxgTw46Fv6EFKKGS5DRFLD8yKnohjF3hxoju94b/OcMZoQukzpPpBE9uLVKzgQ==", + "license": "MIT", + "dependencies": { + "which-typed-array": "^1.1.16" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "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/isarray": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.5.tgz", + "integrity": "sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==", + "license": "MIT" + }, + "node_modules/isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", + "license": "ISC" + }, + "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==", + "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-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/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/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/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/jsonwebtoken/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/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.3", + "resolved": "https://registry.npmjs.org/jws/-/jws-3.2.3.tgz", + "integrity": "sha512-byiJ0FLRdLdSVSReO/U4E7RoEyOCKnEnEPMjq3HxWtvzLsV08/i5RQKsFVNkCldrCaPr2vDNAOMsfs8T/Hze7g==", + "license": "MIT", + "dependencies": { + "jwa": "^1.4.2", + "safe-buffer": "^5.0.1" + } + }, + "node_modules/libphonenumber-js": { + "version": "1.12.36", + "resolved": "https://registry.npmjs.org/libphonenumber-js/-/libphonenumber-js-1.12.36.tgz", + "integrity": "sha512-woWhKMAVx1fzzUnMCyOzglgSgf6/AFHLASdOBcchYCyvWSGWt12imw3iu2hdI5d4dGZRsNWAmWiz37sDKUPaRQ==", + "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": "5.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", + "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", + "license": "MIT", + "dependencies": { + "p-locate": "^4.1.0" + }, + "engines": { + "node": ">=8" + } + }, + "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.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": "10.4.3", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.4.3.tgz", + "integrity": "sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==", + "license": "ISC" + }, + "node_modules/luxon": { + "version": "3.5.0", + "resolved": "https://registry.npmjs.org/luxon/-/luxon-3.5.0.tgz", + "integrity": "sha512-rh+Zjr6DNfUYR3bPwJEnuwDdqMbxZW7LOQfUN4B54+Cl+0o5zaU9RJ6bcidfDtC1cWCZXQ+nvX8bf6bAji37QQ==", + "license": "MIT", + "engines": { + "node": ">=12" + } + }, + "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/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": "2.0.0", + "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-2.0.0.tgz", + "integrity": "sha512-Snk314V5ayFLhp3fkUREub6WtjBfPdCPY1Ln8/8munuLuiYhsABgBVWsozAG+MWMbVEvcdcpbi9R7ww22l9Q3g==", + "license": "MIT", + "peer": true, + "engines": { + "node": ">=18" + }, + "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/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/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.54.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.54.0.tgz", + "integrity": "sha512-aU5EJuIN2WDemCcAp2vFBfp/m4EAhWJnUNSSw0ixs7/kXbd6Pg64EmwJkNdFhB8aWt1sH2CTXrLxo/iAGV3oPQ==", + "license": "MIT", + "peer": true, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/mime-types": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-3.0.2.tgz", + "integrity": "sha512-Lbgzdk0h4juoQ9fCKXW4by0UJqj+nOOrI9MJ1sSj4nI8aI2eo1qmvQEie4VD1glsS250n15LsWsYtCugiStS5A==", + "license": "MIT", + "peer": true, + "dependencies": { + "mime-db": "^1.54.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/express" + } + }, + "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": "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/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==", + "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.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", + "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/nats": { + "version": "2.29.3", + "resolved": "https://registry.npmjs.org/nats/-/nats-2.29.3.tgz", + "integrity": "sha512-tOQCRCwC74DgBTk4pWZ9V45sk4d7peoE2njVprMRCBXrhJ5q5cYM7i6W+Uvw2qUrcfOSnuisrX7bEx3b3Wx4QA==", + "license": "Apache-2.0", + "dependencies": { + "nkeys.js": "1.1.0" + }, + "engines": { + "node": ">= 14.0.0" + } + }, + "node_modules/negotiator": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-1.0.0.tgz", + "integrity": "sha512-8Ofs/AUQh8MaEcrlq5xOX0CQ9ypTF5dl78mjlMNfOK08fzpgTHQRQPBxcPlEtIw0yRpws+Zo/3r+5WRby7u3Gg==", + "license": "MIT", + "peer": true, + "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/nkeys.js": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/nkeys.js/-/nkeys.js-1.1.0.tgz", + "integrity": "sha512-tB/a0shZL5UZWSwsoeyqfTszONTt4k2YS0tuQioMOD180+MbombYVgzDUYHlx+gejYK6rgf08n/2Df99WY0Sxg==", + "license": "Apache-2.0", + "dependencies": { + "tweetnacl": "1.0.3" + }, + "engines": { + "node": ">=10.0.0" + } + }, + "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-addon-api": { + "version": "8.5.0", + "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-8.5.0.tgz", + "integrity": "sha512-/bRZty2mXUIFY/xU5HLvveNHlswNJej+RnxBjOMkidWfwZzgTbPG1E3K5TOxRLOR+5hX7bSofy8yf1hZevMS8A==", + "license": "MIT", + "engines": { + "node": "^18 || ^20 || >= 21" + } + }, + "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-gyp-build": { + "version": "4.8.4", + "resolved": "https://registry.npmjs.org/node-gyp-build/-/node-gyp-build-4.8.4.tgz", + "integrity": "sha512-LA4ZjwlnUblHVgq0oBF3Jl/6h/Nvs5fzBLwdEF4nuxnFdsfajde4WfxtJr3CaiH+F6ewcIB/q4jQ4UzPyid+CQ==", + "license": "MIT", + "bin": { + "node-gyp-build": "bin.js", + "node-gyp-build-optional": "optional.js", + "node-gyp-build-test": "build-test.js" + } + }, + "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/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-hash": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/object-hash/-/object-hash-3.0.0.tgz", + "integrity": "sha512-RSn9F68PjH9HqtltsSnqYC1XXoWe9Bju5+213R98cNGttag9q9yAOTzdbsqvIa7aNm5WffBZFpWYr2aWrklWAw==", + "license": "MIT", + "engines": { + "node": ">= 6" + } + }, + "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==", + "license": "ISC", + "peer": true, + "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/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/otpauth": { + "version": "9.5.0", + "resolved": "https://registry.npmjs.org/otpauth/-/otpauth-9.5.0.tgz", + "integrity": "sha512-Ldhc6UYl4baR5toGr8nfKC+L/b8/RgHKoIixAebgoNGzUUCET02g04rMEZ2ZsPfeVQhMHcuaOgb28nwMr81zCA==", + "license": "MIT", + "dependencies": { + "@noble/hashes": "2.0.1" + }, + "funding": { + "url": "https://github.com/hectorm/otpauth?sponsor=1" + } + }, + "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==", + "license": "MIT", + "dependencies": { + "p-try": "^2.0.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "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==", + "license": "MIT", + "dependencies": { + "p-limit": "^2.2.0" + }, + "engines": { + "node": ">=8" + } + }, + "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==", + "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==", + "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", + "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==", + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "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==", + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "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==", + "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-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/pg": { + "version": "8.18.0", + "resolved": "https://registry.npmjs.org/pg/-/pg-8.18.0.tgz", + "integrity": "sha512-xqrUDL1b9MbkydY/s+VZ6v+xiMUmOUk7SS9d/1kpyQxoJ6U9AO1oIJyUWVZojbfe5Cc/oluutcgFG4L9RDP1iQ==", + "license": "MIT", + "dependencies": { + "pg-connection-string": "^2.11.0", + "pg-pool": "^3.11.0", + "pg-protocol": "^1.11.0", + "pg-types": "2.2.0", + "pgpass": "1.0.5" + }, + "engines": { + "node": ">= 16.0.0" + }, + "optionalDependencies": { + "pg-cloudflare": "^1.3.0" + }, + "peerDependencies": { + "pg-native": ">=3.0.1" + }, + "peerDependenciesMeta": { + "pg-native": { + "optional": true + } + } + }, + "node_modules/pg-cloudflare": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/pg-cloudflare/-/pg-cloudflare-1.3.0.tgz", + "integrity": "sha512-6lswVVSztmHiRtD6I8hw4qP/nDm1EJbKMRhf3HCYaqud7frGysPv7FYJ5noZQdhQtN2xJnimfMtvQq21pdbzyQ==", + "license": "MIT", + "optional": true + }, + "node_modules/pg-connection-string": { + "version": "2.11.0", + "resolved": "https://registry.npmjs.org/pg-connection-string/-/pg-connection-string-2.11.0.tgz", + "integrity": "sha512-kecgoJwhOpxYU21rZjULrmrBJ698U2RxXofKVzOn5UDj61BPj/qMb7diYUR1nLScCDbrztQFl1TaQZT0t1EtzQ==", + "license": "MIT" + }, + "node_modules/pg-int8": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/pg-int8/-/pg-int8-1.0.1.tgz", + "integrity": "sha512-WCtabS6t3c8SkpDBUlb1kjOs7l66xsGdKpIPZsg4wR+B3+u9UAum2odSsF9tnvxg80h4ZxLWMy4pRjOsFIqQpw==", + "license": "ISC", + "engines": { + "node": ">=4.0.0" + } + }, + "node_modules/pg-pool": { + "version": "3.11.0", + "resolved": "https://registry.npmjs.org/pg-pool/-/pg-pool-3.11.0.tgz", + "integrity": "sha512-MJYfvHwtGp870aeusDh+hg9apvOe2zmpZJpyt+BMtzUWlVqbhFmMK6bOBXLBUPd7iRtIF9fZplDc7KrPN3PN7w==", + "license": "MIT", + "peerDependencies": { + "pg": ">=8.0" + } + }, + "node_modules/pg-protocol": { + "version": "1.11.0", + "resolved": "https://registry.npmjs.org/pg-protocol/-/pg-protocol-1.11.0.tgz", + "integrity": "sha512-pfsxk2M9M3BuGgDOfuy37VNRRX3jmKgMjcvAcWqNDpZSf4cUmv8HSOl5ViRQFsfARFn0KuUQTgLxVMbNq5NW3g==", + "license": "MIT" + }, + "node_modules/pg-types": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/pg-types/-/pg-types-2.2.0.tgz", + "integrity": "sha512-qTAAlrEsl8s4OiEQY69wDvcMIdQN6wdz5ojQiOy6YRMuynxenON0O5oCpJI6lshc6scgAY8qvJ2On/p+CXY0GA==", + "license": "MIT", + "dependencies": { + "pg-int8": "1.0.1", + "postgres-array": "~2.0.0", + "postgres-bytea": "~1.0.0", + "postgres-date": "~1.0.4", + "postgres-interval": "^1.1.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/pgpass": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/pgpass/-/pgpass-1.0.5.tgz", + "integrity": "sha512-FdW9r/jQZhSeohs1Z3sI1yxFQNFvMcnmfuj4WBMUTxOrAyLMaTcE1aAMBiTlbMNaXvBCQuVi0R7hd8udDSP7ug==", + "license": "MIT", + "dependencies": { + "split2": "^4.1.0" + } + }, + "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/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/pngjs": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/pngjs/-/pngjs-5.0.0.tgz", + "integrity": "sha512-40QW5YalBNfQo5yRYmiw7Yz6TKKVr3h6970B2YE+3fQpsWcrbj1PzJgxeJ19DRQjhMbKPIuMY8rFaXc8moolVw==", + "license": "MIT", + "engines": { + "node": ">=10.13.0" + } + }, + "node_modules/possible-typed-array-names": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/possible-typed-array-names/-/possible-typed-array-names-1.1.0.tgz", + "integrity": "sha512-/+5VFTchJDoVj3bhoqi6UeymcD00DAwb1nJwamzPvHEszJ4FpF6SNNbUbOS8yI56qHzdV8eK0qEfOSiodkTdxg==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/postgres-array": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/postgres-array/-/postgres-array-2.0.0.tgz", + "integrity": "sha512-VpZrUqU5A69eQyW2c5CA1jtLecCsN2U/bD6VilrFDWq5+5UIEVO7nazS3TEcHf1zuPYO/sqGvUvW62g86RXZuA==", + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/postgres-bytea": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/postgres-bytea/-/postgres-bytea-1.0.1.tgz", + "integrity": "sha512-5+5HqXnsZPE65IJZSMkZtURARZelel2oXUEO8rH83VS/hxH5vv1uHquPg5wZs8yMAfdv971IU+kcPUczi7NVBQ==", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/postgres-date": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/postgres-date/-/postgres-date-1.0.7.tgz", + "integrity": "sha512-suDmjLVQg78nMK2UZ454hAG+OAW+HQPZ6n++TNDUX+L0+uUlLywnoxJKDou51Zm+zTCjrCl0Nq6J9C5hP9vK/Q==", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/postgres-interval": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/postgres-interval/-/postgres-interval-1.2.0.tgz", + "integrity": "sha512-9ZhXKM/rw350N1ovuWHbGxnGh/SNJ4cnxHiM0rxE4VN41wsg8P8zWn9hv/buK00RP4WvlOyr/RBDiptyxVbkZQ==", + "license": "MIT", + "dependencies": { + "xtend": "^4.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "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/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/qrcode": { + "version": "1.5.4", + "resolved": "https://registry.npmjs.org/qrcode/-/qrcode-1.5.4.tgz", + "integrity": "sha512-1ca71Zgiu6ORjHqFBDpnSMTR2ReToX4l1Au1VFLyVeBTFavzQnv5JxMFr3ukHVKpSrSA2MCk0lNJSykjUfz7Zg==", + "license": "MIT", + "dependencies": { + "dijkstrajs": "^1.0.1", + "pngjs": "^5.0.0", + "yargs": "^15.3.1" + }, + "bin": { + "qrcode": "bin/qrcode" + }, + "engines": { + "node": ">=10.13.0" + } + }, + "node_modules/qs": { + "version": "6.14.2", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.14.2.tgz", + "integrity": "sha512-V/yCWTTF7VJ9hIh18Ugr2zhJMP01MY7c5kh4J870L7imm6/DIzBsNLTXzMwUA3yZ5b/KBqLx8Kp3uRvd7xSe3Q==", + "license": "BSD-3-Clause", + "dependencies": { + "side-channel": "^1.1.0" + }, + "engines": { + "node": ">=0.6" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "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.3", + "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.5.3.tgz", + "integrity": "sha512-s4VSOf6yN0rvbRZGxs8Om5CWj6seneMwK3oDb4lWDH0UPhWcxwOWw5+qk24bxq87szX1ydrwylIOp2uG1ojUpA==", + "license": "MIT", + "dependencies": { + "bytes": "~3.1.2", + "http-errors": "~2.0.1", + "iconv-lite": "~0.4.24", + "unpipe": "~1.0.0" + }, + "engines": { + "node": ">= 0.8" + } + }, + "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.2.2", + "resolved": "https://registry.npmjs.org/reflect-metadata/-/reflect-metadata-0.2.2.tgz", + "integrity": "sha512-urBwgfrvVP/eAyXx4hluJivBKzuEbSQs9rKWCrCkbSxNv8mxPcUZKeuoF3Uy4mJl3Lwprp6yy5/39VWigZ4K6Q==", + "license": "Apache-2.0" + }, + "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==", + "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/require-main-filename": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz", + "integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==", + "license": "ISC" + }, + "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/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/router": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/router/-/router-2.2.0.tgz", + "integrity": "sha512-nLTrUKm2UyiL7rlhapu/Zl45FwNgkZGaCpZbIHajDYgwlJCOzLSk+cIPAnsEqV955GjILJnKbdQC1nVPz+gAYQ==", + "license": "MIT", + "peer": true, + "dependencies": { + "debug": "^4.4.0", + "depd": "^2.0.0", + "is-promise": "^4.0.0", + "parseurl": "^1.3.3", + "path-to-regexp": "^8.0.0" + }, + "engines": { + "node": ">= 18" + } + }, + "node_modules/router/node_modules/debug": { + "version": "4.4.3", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz", + "integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==", + "license": "MIT", + "peer": true, + "dependencies": { + "ms": "^2.1.3" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/router/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", + "peer": true + }, + "node_modules/router/node_modules/path-to-regexp": { + "version": "8.3.0", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-8.3.0.tgz", + "integrity": "sha512-7jdwVIRtsP8MYpdXSwOS0YdD0Du+qOoF/AEPIt88PcCFrZCzx41oxku1jD88hZBwbNUIEfpqvuhjFaMAqMTWnA==", + "license": "MIT", + "peer": true, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/express" + } + }, + "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/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", + "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", + "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.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.4.tgz", + "integrity": "sha512-vFKC2IEtQnVhpT78h1Yp8wzwrf8CM+MzKMHGJZfBtzhZNycRFnXsHk6E5TxIkkMsgNS7mdX3AGB7x2QM2di4lA==", + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/send": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/send/-/send-1.2.1.tgz", + "integrity": "sha512-1gnZf7DFcoIcajTjTwjwuDjzuz4PPcY2StKPlsGAQ1+YH20IRVrBaXSWmdjowTJ6u8Rc01PoYOGHXfP1mYcZNQ==", + "license": "MIT", + "peer": true, + "dependencies": { + "debug": "^4.4.3", + "encodeurl": "^2.0.0", + "escape-html": "^1.0.3", + "etag": "^1.8.1", + "fresh": "^2.0.0", + "http-errors": "^2.0.1", + "mime-types": "^3.0.2", + "ms": "^2.1.3", + "on-finished": "^2.4.1", + "range-parser": "^1.2.1", + "statuses": "^2.0.2" + }, + "engines": { + "node": ">= 18" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/express" + } + }, + "node_modules/send/node_modules/debug": { + "version": "4.4.3", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz", + "integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==", + "license": "MIT", + "peer": true, + "dependencies": { + "ms": "^2.1.3" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/send/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", + "peer": true + }, + "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": "2.2.1", + "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-2.2.1.tgz", + "integrity": "sha512-xRXBn0pPqQTVQiC8wyQrKs2MOlX24zQ0POGaj0kultvoOCstBQM5yvOhAVSUwOMjQtTvsPWoNCHfPGwaaQJhTw==", + "license": "MIT", + "peer": true, + "dependencies": { + "encodeurl": "^2.0.0", + "escape-html": "^1.0.3", + "parseurl": "^1.3.3", + "send": "^1.2.0" + }, + "engines": { + "node": ">= 18" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/express" + } + }, + "node_modules/set-blocking": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", + "integrity": "sha512-KiKBS8AnWGEyLzofFfmvKwpdPzqiy16LvQfK3yv/fVH7Bj13/wl3JSR1J+rfgRE9q7xUJK4qvgS8raSOeLUehw==", + "license": "ISC" + }, + "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==", + "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/sha.js": { + "version": "2.4.12", + "resolved": "https://registry.npmjs.org/sha.js/-/sha.js-2.4.12.tgz", + "integrity": "sha512-8LzC5+bvI45BjpfXU8V5fdU2mfeKiQe1D1gIMn7XUlF3OTUrpdJpPPH4EMAnF0DsHHdSZqCdSss5qCmJKuiO3w==", + "license": "(MIT AND BSD-3-Clause)", + "dependencies": { + "inherits": "^2.0.4", + "safe-buffer": "^5.2.1", + "to-buffer": "^1.2.0" + }, + "bin": { + "sha.js": "bin.js" + }, + "engines": { + "node": ">= 0.10" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "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==", + "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==", + "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==", + "license": "ISC", + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/socket.io": { + "version": "4.8.1", + "resolved": "https://registry.npmjs.org/socket.io/-/socket.io-4.8.1.tgz", + "integrity": "sha512-oZ7iUCxph8WYRHHcjBEc9unw3adt5CmSNlppj/5Q4k2RIrhl8Z5yY2Xr4j9zj0+wzVZ0bxmYoGSzKJnRl6A4yg==", + "license": "MIT", + "dependencies": { + "accepts": "~1.3.4", + "base64id": "~2.0.0", + "cors": "~2.8.5", + "debug": "~4.3.2", + "engine.io": "~6.6.0", + "socket.io-adapter": "~2.5.2", + "socket.io-parser": "~4.2.4" + }, + "engines": { + "node": ">=10.2.0" + } + }, + "node_modules/socket.io-adapter": { + "version": "2.5.6", + "resolved": "https://registry.npmjs.org/socket.io-adapter/-/socket.io-adapter-2.5.6.tgz", + "integrity": "sha512-DkkO/dz7MGln0dHn5bmN3pPy+JmywNICWrJqVWiVOyvXjWQFIv9c2h24JrQLLFJ2aQVQf/Cvl1vblnd4r2apLQ==", + "license": "MIT", + "dependencies": { + "debug": "~4.4.1", + "ws": "~8.18.3" + } + }, + "node_modules/socket.io-adapter/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/socket.io-adapter/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/socket.io-parser": { + "version": "4.2.5", + "resolved": "https://registry.npmjs.org/socket.io-parser/-/socket.io-parser-4.2.5.tgz", + "integrity": "sha512-bPMmpy/5WWKHea5Y/jYAP6k74A+hvmRCQaJuJB6I/ML5JZq/KfNieUVo/3Mh7SAqn7TyFdIo6wqYHInG1MU1bQ==", + "license": "MIT", + "dependencies": { + "@socket.io/component-emitter": "~3.1.0", + "debug": "~4.4.1" + }, + "engines": { + "node": ">=10.0.0" + } + }, + "node_modules/socket.io-parser/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/socket.io-parser/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/socket.io/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/socket.io/node_modules/debug": { + "version": "4.3.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.7.tgz", + "integrity": "sha512-Er2nc/H7RrMXZBFCEim6TCmMk02Z8vLC2Rbi1KEBggpo0fS6l0S1nnapwmIi3yW/+GOJap1Krg4w0Hg80oCqgQ==", + "license": "MIT", + "dependencies": { + "ms": "^2.1.3" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/socket.io/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/socket.io/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/socket.io/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/socket.io/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/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/split2": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/split2/-/split2-4.2.0.tgz", + "integrity": "sha512-UcjcJOWknrNkF6PLX83qcHM6KHgVKNkV62Y8a5uYDVv9ydGQVwAHMKqHdJje1VTWpljG0WYpCDhrCdAOYH4TWg==", + "license": "ISC", + "engines": { + "node": ">= 10.x" + } + }, + "node_modules/sql-highlight": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/sql-highlight/-/sql-highlight-6.1.0.tgz", + "integrity": "sha512-ed7OK4e9ywpE7pgRMkMQmZDPKSVdm0oX5IEtZiKnFucSF0zu6c80GZBe38UqHuVhTWJ9xsKgSMjCG2bml86KvA==", + "funding": [ + "https://github.com/scriptcoded/sql-highlight?sponsor=1", + { + "type": "github", + "url": "https://github.com/sponsors/scriptcoded" + } + ], + "license": "MIT", + "engines": { + "node": ">=14" + } + }, + "node_modules/statuses": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.2.tgz", + "integrity": "sha512-DvEy55V3DB7uknRo+4iOGT5fP1slR8wQohVdknigZPMpMstaKJQWhwiYBACJE3Ul2pTnATihhBYnRhZQHGBiRw==", + "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-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==", + "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==", + "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==", + "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==", + "license": "MIT", + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "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/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/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/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/swagger-ui-express": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/swagger-ui-express/-/swagger-ui-express-5.0.1.tgz", + "integrity": "sha512-SrNU3RiBGTLLmFU8GIJdOdanJTl4TOmT27tt3bWWHppqYmAZ6IDuEuBvMU6nZq0zLEe6b/1rACXCgLZqO6ZfrA==", + "license": "MIT", + "dependencies": { + "swagger-ui-dist": ">=5.0.0" + }, + "engines": { + "node": ">= v0.10.32" + }, + "peerDependencies": { + "express": ">=4.0.0 || >=5.0.0-beta" + } + }, + "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/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.46.0", + "resolved": "https://registry.npmjs.org/terser/-/terser-5.46.0.tgz", + "integrity": "sha512-jTwoImyr/QbOWFFso3YoU3ik0jBBDJ6JTOQiy/J2YxVJdZCc+5u7skhNwiOR3FQIygFqVUPHl7qbbxtjW2K3Qg==", + "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.16", + "resolved": "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-5.3.16.tgz", + "integrity": "sha512-h9oBFCWrq78NyWWVcSwZarJkZ01c2AyGrzs1crmHZO3QUg9D61Wu4NPjBy69n7JqylFF5y+CsUZYmYEIZ3mR+Q==", + "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/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/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/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/to-buffer": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/to-buffer/-/to-buffer-1.2.2.tgz", + "integrity": "sha512-db0E3UJjcFhpDhAF4tLo03oli3pwl3dbnzXOUIlRKrp+ldk/VUxzpWYZENsw2SZiuBjHAk7DfB0VU7NKdpb6sw==", + "license": "MIT", + "dependencies": { + "isarray": "^2.0.5", + "safe-buffer": "^5.2.1", + "typed-array-buffer": "^1.0.3" + }, + "engines": { + "node": ">= 0.4" + } + }, + "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.2", + "resolved": "https://registry.npmjs.org/token-types/-/token-types-6.1.2.tgz", + "integrity": "sha512-dRXchy+C0IgK8WPC6xvCHFRIWYUbqqdEIKPaKo/AcTUNzwLTK6AH7RjdLWsEZcAN/TBdtfUw3PYEgPr5VPr6ww==", + "license": "MIT", + "dependencies": { + "@borewit/text-codec": "^0.2.1", + "@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/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/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/tweetnacl": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-1.0.3.tgz", + "integrity": "sha512-6rt+RN7aOi1nGMyC4Xa5DdYiukl2UWCbcJft7YhxReBGQD7OAM8Pbxw6YMo4r2diNEA8FEmu32YOn9rhaiE5yw==", + "license": "Unlicense" + }, + "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/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/type-is/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/type-is/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/typed-array-buffer": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/typed-array-buffer/-/typed-array-buffer-1.0.3.tgz", + "integrity": "sha512-nAYYwfY3qnzX30IkA6AQZjVbtK6duGontcQm1WSG1MD94YLqK0515GNApXkoxKOWMusVssAHWLh9SeaoefYFGw==", + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.3", + "es-errors": "^1.3.0", + "is-typed-array": "^1.1.14" + }, + "engines": { + "node": ">= 0.4" + } + }, + "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/typeorm": { + "version": "0.3.28", + "resolved": "https://registry.npmjs.org/typeorm/-/typeorm-0.3.28.tgz", + "integrity": "sha512-6GH7wXhtfq2D33ZuRXYwIsl/qM5685WZcODZb7noOOcRMteM9KF2x2ap3H0EBjnSV0VO4gNAfJT5Ukp0PkOlvg==", + "license": "MIT", + "dependencies": { + "@sqltools/formatter": "^1.2.5", + "ansis": "^4.2.0", + "app-root-path": "^3.1.0", + "buffer": "^6.0.3", + "dayjs": "^1.11.19", + "debug": "^4.4.3", + "dedent": "^1.7.0", + "dotenv": "^16.6.1", + "glob": "^10.5.0", + "reflect-metadata": "^0.2.2", + "sha.js": "^2.4.12", + "sql-highlight": "^6.1.0", + "tslib": "^2.8.1", + "uuid": "^11.1.0", + "yargs": "^17.7.2" + }, + "bin": { + "typeorm": "cli.js", + "typeorm-ts-node-commonjs": "cli-ts-node-commonjs.js", + "typeorm-ts-node-esm": "cli-ts-node-esm.js" + }, + "engines": { + "node": ">=16.13.0" + }, + "funding": { + "url": "https://opencollective.com/typeorm" + }, + "peerDependencies": { + "@google-cloud/spanner": "^5.18.0 || ^6.0.0 || ^7.0.0 || ^8.0.0", + "@sap/hana-client": "^2.14.22", + "better-sqlite3": "^8.0.0 || ^9.0.0 || ^10.0.0 || ^11.0.0 || ^12.0.0", + "ioredis": "^5.0.4", + "mongodb": "^5.8.0 || ^6.0.0", + "mssql": "^9.1.1 || ^10.0.0 || ^11.0.0 || ^12.0.0", + "mysql2": "^2.2.5 || ^3.0.1", + "oracledb": "^6.3.0", + "pg": "^8.5.1", + "pg-native": "^3.0.0", + "pg-query-stream": "^4.0.0", + "redis": "^3.1.1 || ^4.0.0 || ^5.0.14", + "sql.js": "^1.4.0", + "sqlite3": "^5.0.3", + "ts-node": "^10.7.0", + "typeorm-aurora-data-api-driver": "^2.0.0 || ^3.0.0" + }, + "peerDependenciesMeta": { + "@google-cloud/spanner": { + "optional": true + }, + "@sap/hana-client": { + "optional": true + }, + "better-sqlite3": { + "optional": true + }, + "ioredis": { + "optional": true + }, + "mongodb": { + "optional": true + }, + "mssql": { + "optional": true + }, + "mysql2": { + "optional": true + }, + "oracledb": { + "optional": true + }, + "pg": { + "optional": true + }, + "pg-native": { + "optional": true + }, + "pg-query-stream": { + "optional": true + }, + "redis": { + "optional": true + }, + "sql.js": { + "optional": true + }, + "sqlite3": { + "optional": true + }, + "ts-node": { + "optional": true + }, + "typeorm-aurora-data-api-driver": { + "optional": true + } + } + }, + "node_modules/typeorm/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==", + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0" + } + }, + "node_modules/typeorm/node_modules/buffer": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-6.0.3.tgz", + "integrity": "sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA==", + "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.2.1" + } + }, + "node_modules/typeorm/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==", + "license": "ISC", + "dependencies": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.1", + "wrap-ansi": "^7.0.0" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/typeorm/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/typeorm/node_modules/dotenv": { + "version": "16.6.1", + "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.6.1.tgz", + "integrity": "sha512-uBq4egWHTcTt33a72vpSG0z3HnPuIl6NqYcTrKEg2azoEyl2hpW0zqlxysq2pK9HlDIHyHyakeYaYnSAwd8bow==", + "license": "BSD-2-Clause", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://dotenvx.com" + } + }, + "node_modules/typeorm/node_modules/glob": { + "version": "10.5.0", + "resolved": "https://registry.npmjs.org/glob/-/glob-10.5.0.tgz", + "integrity": "sha512-DfXN8DfhJ7NH3Oe7cFmu3NCu1wKbkReJ8TorzSAFbSKrlNaQSKfIzqYqVY8zlbs2NLBbWpRiU52GX2PbaBVNkg==", + "deprecated": "Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me", + "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/typeorm/node_modules/minimatch": { + "version": "9.0.5", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", + "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", + "license": "ISC", + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/typeorm/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/typeorm/node_modules/uuid": { + "version": "11.1.0", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-11.1.0.tgz", + "integrity": "sha512-0/A9rDy9P7cJ+8w1c9WD9V//9Wj15Ce2MPz8Ri6032usz+NfePxx5AcN3bN+r6ZL6jEo066/yNYB3tn4pQEx+A==", + "funding": [ + "https://github.com/sponsors/broofa", + "https://github.com/sponsors/ctavan" + ], + "license": "MIT", + "bin": { + "uuid": "dist/esm/bin/uuid" + } + }, + "node_modules/typeorm/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==", + "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/typeorm/node_modules/y18n": { + "version": "5.0.8", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", + "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", + "license": "ISC", + "engines": { + "node": ">=10" + } + }, + "node_modules/typeorm/node_modules/yargs": { + "version": "17.7.2", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz", + "integrity": "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==", + "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/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", + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=14.17" + } + }, + "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.2.3", + "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.2.3.tgz", + "integrity": "sha512-Js0m9cx+qOgDxo0eMiFGEueWztz+d4+M3rGlmKPT+T4IS/jP4ylw3Nwpu6cpTTP8R1MAC1kF4VbdLt3ARf209w==", + "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/validator": { + "version": "13.15.26", + "resolved": "https://registry.npmjs.org/validator/-/validator-13.15.26.tgz", + "integrity": "sha512-spH26xU080ydGggxRyR1Yhcbgx+j3y5jbNXk/8L+iRvdIEQ4uTRH2Sgf2dokud6Q4oAtsbNvJ1Ft+9xmm6IZcA==", + "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/watchpack": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-2.5.1.tgz", + "integrity": "sha512-Zn5uXdcFNIA1+1Ei5McRd+iRzfhENPCe7LeABkJtNulSxjma+l7ltNx55BWZkRlwRnpOgHqxnjyaDgJnNXnqzg==", + "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.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/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.4", + "resolved": "https://registry.npmjs.org/webpack-sources/-/webpack-sources-3.3.4.tgz", + "integrity": "sha512-7tP1PdV4vF+lYPnkMR0jMY5/la2ub5Fc/8VQrrU+lXkiM6C4TjVfGw7iKfyhnTQOsD+6Q/iKw0eFciziRgD58Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10.13.0" + } + }, + "node_modules/webpack/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==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/webpack/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==", + "dev": true, + "license": "MIT", + "dependencies": { + "mime-db": "1.52.0" + }, + "engines": { + "node": ">= 0.6" + } + }, + "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==", + "license": "ISC", + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "node-which": "bin/node-which" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/which-module": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.1.tgz", + "integrity": "sha512-iBdZ57RDvnOR9AGBhML2vFZf7h8vmBjhoaZqODJBFWHVtKkDmKuHai3cx5PgVMrX5YDNp27AofYbAwctSS+vhQ==", + "license": "ISC" + }, + "node_modules/which-typed-array": { + "version": "1.1.20", + "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.20.tgz", + "integrity": "sha512-LYfpUkmqwl0h9A2HL09Mms427Q1RZWuOHsukfVcKRq9q95iQxdw0ix1JQrqbcDR9PH1QDwf5Qo8OZb5lksZ8Xg==", + "license": "MIT", + "dependencies": { + "available-typed-arrays": "^1.0.7", + "call-bind": "^1.0.8", + "call-bound": "^1.0.4", + "for-each": "^0.3.5", + "get-proto": "^1.0.1", + "gopd": "^1.2.0", + "has-tostringtag": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "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==", + "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==", + "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==", + "license": "ISC", + "peer": true + }, + "node_modules/ws": { + "version": "8.18.3", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.18.3.tgz", + "integrity": "sha512-PEIGCY5tSlUt50cqyMXfCzX+oOPqN0vuGqWzbcJ2xvnkzkq46oOpz7dQaTDBdfICb4N14+GARUDw2XV2N4tvzg==", + "license": "MIT", + "engines": { + "node": ">=10.0.0" + }, + "peerDependencies": { + "bufferutil": "^4.0.1", + "utf-8-validate": ">=5.0.2" + }, + "peerDependenciesMeta": { + "bufferutil": { + "optional": true + }, + "utf-8-validate": { + "optional": true + } + } + }, + "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": "4.0.3", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.3.tgz", + "integrity": "sha512-JKhqTOwSrqNA1NY5lSztJ1GrBiUodLMmIZuLiDaMRJ+itFd+ABVE8XBjOvIWL+rSqNDC74LCSFmlb/U4UZ4hJQ==", + "license": "ISC" + }, + "node_modules/yargs": { + "version": "15.4.1", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-15.4.1.tgz", + "integrity": "sha512-aePbxDmcYW++PaqBsJ+HYUFwCdv4LVvdnhBy78E57PIor8/OVvhMrADFFEDh8DHDFRv/O9i3lPhsENjO7QX0+A==", + "license": "MIT", + "dependencies": { + "cliui": "^6.0.0", + "decamelize": "^1.2.0", + "find-up": "^4.1.0", + "get-caller-file": "^2.0.1", + "require-directory": "^2.1.1", + "require-main-filename": "^2.0.0", + "set-blocking": "^2.0.0", + "string-width": "^4.2.0", + "which-module": "^2.0.0", + "y18n": "^4.0.0", + "yargs-parser": "^18.1.2" + }, + "engines": { + "node": ">=8" + } + }, + "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==", + "license": "ISC", + "engines": { + "node": ">=12" + } + }, + "node_modules/yargs/node_modules/yargs-parser": { + "version": "18.1.3", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-18.1.3.tgz", + "integrity": "sha512-o50j0JeToy/4K6OZcaQmW6lyXXKhq7csREXcDwk2omFPJEwUNOVtJKvmDr9EI1fAJZUyZcRF7kxGBWmRXudrCQ==", + "license": "ISC", + "dependencies": { + "camelcase": "^5.0.0", + "decamelize": "^1.2.0" + }, + "engines": { + "node": ">=6" + } + } + } +} diff --git a/backend-nest/package.json b/backend-nest/package.json new file mode 100644 index 0000000..15a58d1 --- /dev/null +++ b/backend-nest/package.json @@ -0,0 +1,53 @@ +{ + "name": "corrosion-api", + "version": "1.0.0", + "description": "Corrosion Admin Panel — NestJS Backend API", + "private": true, + "scripts": { + "build": "nest build", + "start": "nest start", + "start:dev": "nest start --watch", + "start:debug": "nest start --debug --watch", + "start:prod": "node dist/main", + "lint": "eslint \"{src,test}/**/*.ts\" --fix", + "format": "prettier --write \"src/**/*.ts\"" + }, + "dependencies": { + "@nestjs/common": "^10.4.0", + "@nestjs/config": "^3.2.0", + "@nestjs/core": "^10.4.0", + "@nestjs/jwt": "^10.2.0", + "@nestjs/microservices": "^10.4.0", + "@nestjs/passport": "^10.0.3", + "@nestjs/platform-express": "^10.4.0", + "@nestjs/platform-socket.io": "^10.4.0", + "@nestjs/schedule": "^4.0.0", + "@nestjs/swagger": "^7.3.0", + "@nestjs/typeorm": "^10.0.2", + "@nestjs/websockets": "^10.4.0", + "argon2": "^0.40.0", + "class-transformer": "^0.5.1", + "class-validator": "^0.14.1", + "nats": "^2.19.0", + "otpauth": "^9.2.0", + "passport": "^0.7.0", + "passport-jwt": "^4.0.1", + "pg": "^8.12.0", + "qrcode": "^1.5.3", + "reflect-metadata": "^0.2.2", + "rxjs": "^7.8.1", + "swagger-ui-express": "^5.0.0", + "typeorm": "^0.3.20", + "uuid": "^9.0.0" + }, + "devDependencies": { + "@nestjs/cli": "^10.4.0", + "@nestjs/schematics": "^10.1.0", + "@types/express": "^4.17.21", + "@types/node": "^20.12.0", + "@types/passport-jwt": "^4.0.1", + "@types/qrcode": "^1.5.5", + "@types/uuid": "^9.0.8", + "typescript": "^5.4.0" + } +} diff --git a/backend-nest/src/app.module.ts b/backend-nest/src/app.module.ts new file mode 100644 index 0000000..7d3ef41 --- /dev/null +++ b/backend-nest/src/app.module.ts @@ -0,0 +1,122 @@ +import { Module } from '@nestjs/common'; +import { ConfigModule, ConfigService } from '@nestjs/config'; +import { TypeOrmModule } from '@nestjs/typeorm'; +import { JwtModule } from '@nestjs/jwt'; +import { APP_GUARD } from '@nestjs/core'; +import { ScheduleModule } from '@nestjs/schedule'; +import configuration from './config/configuration'; + +// Guards +import { JwtAuthGuard } from './common/guards/jwt-auth.guard'; +import { PermissionsGuard } from './common/guards/permissions.guard'; +import { LicenseGuard } from './common/guards/license.guard'; + +// Feature Modules +import { AuthModule } from './modules/auth/auth.module'; +import { UsersModule } from './modules/users/users.module'; +import { LicensesModule } from './modules/licenses/licenses.module'; +import { ServersModule } from './modules/servers/servers.module'; +import { ConsoleModule } from './modules/console/console.module'; +import { PlayersModule } from './modules/players/players.module'; +import { WipesModule } from './modules/wipes/wipes.module'; +import { MapsModule } from './modules/maps/maps.module'; +import { PluginsModule } from './modules/plugins/plugins.module'; +import { ChatModule } from './modules/chat/chat.module'; +import { TeamModule } from './modules/team/team.module'; +import { NotificationsModule } from './modules/notifications/notifications.module'; +import { SettingsModule } from './modules/settings/settings.module'; +import { SchedulesModule } from './modules/schedules/schedules.module'; +import { AnalyticsModule } from './modules/analytics/analytics.module'; +import { AlertsModule } from './modules/alerts/alerts.module'; +import { StatusModule } from './modules/status/status.module'; +import { StoreModule } from './modules/store/store.module'; +import { WebstoreModule } from './modules/webstore/webstore.module'; +import { AdminModule } from './modules/admin/admin.module'; +import { SetupModule } from './modules/setup/setup.module'; +import { MigrationModule } from './modules/migration/migration.module'; + +// Shared Services +import { NatsService } from './services/nats.service'; +import { NatsBridgeService } from './services/nats-bridge.service'; +import { SteamService } from './services/steam.service'; + +// Gateway +import { NatsBridgeGateway } from './gateways/nats-bridge.gateway'; + +@Module({ + imports: [ + // Configuration + ConfigModule.forRoot({ + isGlobal: true, + load: [configuration], + }), + + // Database + TypeOrmModule.forRootAsync({ + inject: [ConfigService], + useFactory: (config: ConfigService) => ({ + type: 'postgres' as const, + url: config.get('database.url'), + autoLoadEntities: true, + synchronize: false, // NEVER auto-sync — use migrations only + extra: { + max: config.get('database.maxConnections') || 20, + }, + }), + }), + + // JWT (global) + JwtModule.registerAsync({ + global: true, + inject: [ConfigService], + useFactory: (config: ConfigService) => ({ + secret: config.get('jwt.secret'), + signOptions: { + expiresIn: `${config.get('jwt.accessExpirySeconds') || 900}s`, + }, + }), + }), + + // Scheduler + ScheduleModule.forRoot(), + + // Feature Modules + AuthModule, + UsersModule, + LicensesModule, + ServersModule, + ConsoleModule, + PlayersModule, + WipesModule, + MapsModule, + PluginsModule, + ChatModule, + TeamModule, + NotificationsModule, + SettingsModule, + SchedulesModule, + AnalyticsModule, + AlertsModule, + StatusModule, + StoreModule, + WebstoreModule, + AdminModule, + SetupModule, + MigrationModule, + ], + providers: [ + // Global guards (order matters: auth first, then license, then permissions) + { provide: APP_GUARD, useClass: JwtAuthGuard }, + { provide: APP_GUARD, useClass: PermissionsGuard }, + + // Shared services + NatsService, + NatsBridgeService, + SteamService, + + // WebSocket gateway + NatsBridgeGateway, + ], + exports: [NatsService, NatsBridgeService, SteamService], +}) +export class AppModule {} diff --git a/backend-nest/src/common/decorators/current-tenant.decorator.ts b/backend-nest/src/common/decorators/current-tenant.decorator.ts new file mode 100644 index 0000000..3e3f7a6 --- /dev/null +++ b/backend-nest/src/common/decorators/current-tenant.decorator.ts @@ -0,0 +1,8 @@ +import { createParamDecorator, ExecutionContext } from '@nestjs/common'; + +export const CurrentTenant = createParamDecorator( + (_data: unknown, ctx: ExecutionContext): string => { + const request = ctx.switchToHttp().getRequest(); + return request.user?.license_id; + }, +); diff --git a/backend-nest/src/common/decorators/current-user.decorator.ts b/backend-nest/src/common/decorators/current-user.decorator.ts new file mode 100644 index 0000000..45c5b85 --- /dev/null +++ b/backend-nest/src/common/decorators/current-user.decorator.ts @@ -0,0 +1,9 @@ +import { createParamDecorator, ExecutionContext } from '@nestjs/common'; + +export const CurrentUser = createParamDecorator( + (data: string | undefined, ctx: ExecutionContext) => { + const request = ctx.switchToHttp().getRequest(); + const user = request.user; + return data ? user?.[data] : user; + }, +); diff --git a/backend-nest/src/common/decorators/public.decorator.ts b/backend-nest/src/common/decorators/public.decorator.ts new file mode 100644 index 0000000..b3845e1 --- /dev/null +++ b/backend-nest/src/common/decorators/public.decorator.ts @@ -0,0 +1,4 @@ +import { SetMetadata } from '@nestjs/common'; + +export const IS_PUBLIC_KEY = 'isPublic'; +export const Public = () => SetMetadata(IS_PUBLIC_KEY, true); diff --git a/backend-nest/src/common/decorators/require-permission.decorator.ts b/backend-nest/src/common/decorators/require-permission.decorator.ts new file mode 100644 index 0000000..0ed7839 --- /dev/null +++ b/backend-nest/src/common/decorators/require-permission.decorator.ts @@ -0,0 +1,5 @@ +import { SetMetadata } from '@nestjs/common'; + +export const PERMISSION_KEY = 'required_permission'; +export const RequirePermission = (permission: string) => + SetMetadata(PERMISSION_KEY, permission); diff --git a/backend-nest/src/common/dto/pagination.dto.ts b/backend-nest/src/common/dto/pagination.dto.ts new file mode 100644 index 0000000..43e6e4e --- /dev/null +++ b/backend-nest/src/common/dto/pagination.dto.ts @@ -0,0 +1,17 @@ +import { IsOptional, IsInt, Min, Max } from 'class-validator'; +import { ApiPropertyOptional } from '@nestjs/swagger'; + +export class PaginationDto { + @ApiPropertyOptional({ default: 1 }) + @IsOptional() + @IsInt() + @Min(1) + page?: number = 1; + + @ApiPropertyOptional({ default: 25 }) + @IsOptional() + @IsInt() + @Min(1) + @Max(100) + limit?: number = 25; +} diff --git a/backend-nest/src/common/filters/http-exception.filter.ts b/backend-nest/src/common/filters/http-exception.filter.ts new file mode 100644 index 0000000..783d476 --- /dev/null +++ b/backend-nest/src/common/filters/http-exception.filter.ts @@ -0,0 +1,35 @@ +import { + ExceptionFilter, + Catch, + ArgumentsHost, + HttpException, + HttpStatus, +} from '@nestjs/common'; +import { Response } from 'express'; + +@Catch() +export class HttpExceptionFilter implements ExceptionFilter { + catch(exception: unknown, host: ArgumentsHost) { + const ctx = host.switchToHttp(); + const response = ctx.getResponse(); + + let status = HttpStatus.INTERNAL_SERVER_ERROR; + let message = 'Internal server error'; + + if (exception instanceof HttpException) { + status = exception.getStatus(); + const exResponse = exception.getResponse(); + if (typeof exResponse === 'string') { + message = exResponse; + } else if (typeof exResponse === 'object' && exResponse !== null) { + const obj = exResponse as Record; + message = (obj.message as string) || message; + if (Array.isArray(obj.message)) { + message = obj.message[0] as string; + } + } + } + + response.status(status).json({ message }); + } +} diff --git a/backend-nest/src/common/guards/jwt-auth.guard.ts b/backend-nest/src/common/guards/jwt-auth.guard.ts new file mode 100644 index 0000000..0eaf3d6 --- /dev/null +++ b/backend-nest/src/common/guards/jwt-auth.guard.ts @@ -0,0 +1,20 @@ +import { Injectable, ExecutionContext } from '@nestjs/common'; +import { AuthGuard } from '@nestjs/passport'; +import { Reflector } from '@nestjs/core'; +import { IS_PUBLIC_KEY } from '../decorators/public.decorator'; + +@Injectable() +export class JwtAuthGuard extends AuthGuard('jwt') { + constructor(private reflector: Reflector) { + super(); + } + + canActivate(context: ExecutionContext) { + const isPublic = this.reflector.getAllAndOverride(IS_PUBLIC_KEY, [ + context.getHandler(), + context.getClass(), + ]); + if (isPublic) return true; + return super.canActivate(context); + } +} diff --git a/backend-nest/src/common/guards/license.guard.ts b/backend-nest/src/common/guards/license.guard.ts new file mode 100644 index 0000000..be284f6 --- /dev/null +++ b/backend-nest/src/common/guards/license.guard.ts @@ -0,0 +1,12 @@ +import { Injectable, CanActivate, ExecutionContext, ForbiddenException } from '@nestjs/common'; + +@Injectable() +export class LicenseGuard implements CanActivate { + canActivate(context: ExecutionContext): boolean { + const { user } = context.switchToHttp().getRequest(); + if (!user?.license_id) { + throw new ForbiddenException('No active license'); + } + return true; + } +} diff --git a/backend-nest/src/common/guards/permissions.guard.ts b/backend-nest/src/common/guards/permissions.guard.ts new file mode 100644 index 0000000..878edc0 --- /dev/null +++ b/backend-nest/src/common/guards/permissions.guard.ts @@ -0,0 +1,32 @@ +import { Injectable, CanActivate, ExecutionContext } from '@nestjs/common'; +import { Reflector } from '@nestjs/core'; +import { PERMISSION_KEY } from '../decorators/require-permission.decorator'; + +@Injectable() +export class PermissionsGuard implements CanActivate { + constructor(private reflector: Reflector) {} + + canActivate(context: ExecutionContext): boolean { + const requiredPermission = this.reflector.getAllAndOverride( + PERMISSION_KEY, + [context.getHandler(), context.getClass()], + ); + if (!requiredPermission) return true; + + const { user } = context.switchToHttp().getRequest(); + if (!user) return false; + + // Super admins bypass all permission checks + if (user.is_super_admin) return true; + + // Check permissions JSONB from role + const permissions = user.permissions as Record | undefined; + if (!permissions) return false; + + // Support wildcard: "server.*" matches "server.view", "server.console", etc. + const parts = requiredPermission.split('.'); + const wildcard = parts[0] + '.*'; + + return permissions[requiredPermission] === true || permissions[wildcard] === true; + } +} diff --git a/backend-nest/src/common/guards/super-admin.guard.ts b/backend-nest/src/common/guards/super-admin.guard.ts new file mode 100644 index 0000000..e07dcd4 --- /dev/null +++ b/backend-nest/src/common/guards/super-admin.guard.ts @@ -0,0 +1,12 @@ +import { Injectable, CanActivate, ExecutionContext, ForbiddenException } from '@nestjs/common'; + +@Injectable() +export class SuperAdminGuard implements CanActivate { + canActivate(context: ExecutionContext): boolean { + const { user } = context.switchToHttp().getRequest(); + if (!user?.is_super_admin) { + throw new ForbiddenException('Platform admin access required'); + } + return true; + } +} diff --git a/backend-nest/src/common/interceptors/transform.interceptor.ts b/backend-nest/src/common/interceptors/transform.interceptor.ts new file mode 100644 index 0000000..b44a2aa --- /dev/null +++ b/backend-nest/src/common/interceptors/transform.interceptor.ts @@ -0,0 +1,17 @@ +import { + Injectable, + NestInterceptor, + ExecutionContext, + CallHandler, +} from '@nestjs/common'; +import { Observable } from 'rxjs'; +import { map } from 'rxjs/operators'; + +@Injectable() +export class TransformInterceptor implements NestInterceptor { + intercept(_context: ExecutionContext, next: CallHandler): Observable { + // Pass through — response shape is controlled by each controller + // This interceptor exists for future response wrapping if needed + return next.handle().pipe(map((data) => data)); + } +} diff --git a/backend-nest/src/config/configuration.ts b/backend-nest/src/config/configuration.ts new file mode 100644 index 0000000..ace7b8f --- /dev/null +++ b/backend-nest/src/config/configuration.ts @@ -0,0 +1,42 @@ +export default () => ({ + port: parseInt(process.env.API_PORT || '3000', 10), + database: { + url: process.env.DATABASE_URL || 'postgres://corrosion:corrosion_dev@localhost:5432/corrosion', + maxConnections: parseInt(process.env.DATABASE_MAX_CONNECTIONS || '20', 10), + }, + nats: { + url: process.env.NATS_URL || 'nats://localhost:4222', + }, + jwt: { + secret: process.env.JWT_SECRET || 'change-me', + accessExpirySeconds: parseInt(process.env.JWT_ACCESS_EXPIRY_SECONDS || '900', 10), + refreshExpirySeconds: parseInt(process.env.JWT_REFRESH_EXPIRY_SECONDS || '604800', 10), + }, + encryption: { + key: process.env.ENCRYPTION_KEY || '', + }, + admin: { + email: process.env.ADMIN_EMAIL || '', + password: process.env.ADMIN_PASSWORD || '', + username: process.env.ADMIN_USERNAME || 'Commander', + licenseKey: process.env.ADMIN_LICENSE_KEY || '', + }, + cloudflare: { + apiToken: process.env.CLOUDFLARE_API_TOKEN || '', + zoneId: process.env.CLOUDFLARE_ZONE_ID || '', + baseDomain: process.env.BASE_DOMAIN || 'corrosionmgmt.com', + }, + steam: { + apiKey: process.env.STEAM_API_KEY || '', + }, + smtp: { + host: process.env.SMTP_HOST || '', + port: parseInt(process.env.SMTP_PORT || '587', 10), + username: process.env.SMTP_USERNAME || '', + password: process.env.SMTP_PASSWORD || '', + from: process.env.SMTP_FROM || 'noreply@corrosionmgmt.com', + }, + frontend: { + url: process.env.FRONTEND_URL || 'http://localhost:5174', + }, +}); diff --git a/backend-nest/src/entities/alert-config.entity.ts b/backend-nest/src/entities/alert-config.entity.ts new file mode 100644 index 0000000..0a4cbe2 --- /dev/null +++ b/backend-nest/src/entities/alert-config.entity.ts @@ -0,0 +1,43 @@ +import { Entity, PrimaryGeneratedColumn, Column, ManyToOne, JoinColumn, Index } from 'typeorm'; +import { License } from './license.entity'; + +@Entity('alert_config') +@Index(['license_id'], { unique: true }) +export class AlertConfig { + @PrimaryGeneratedColumn('uuid') + id: string; + + @Column({ type: 'uuid' }) + license_id: string; + + @Column({ type: 'boolean', default: true }) + population_drop_enabled: boolean; + + @Column({ type: 'integer', default: 30 }) + population_drop_threshold_percent: number; + + @Column({ type: 'boolean', default: true }) + fps_degradation_enabled: boolean; + + @Column({ type: 'integer', default: 30 }) + fps_threshold: number; + + @Column({ type: 'boolean', default: true }) + notify_discord: boolean; + + @Column({ type: 'boolean', default: false }) + notify_pushbullet: boolean; + + @Column({ type: 'boolean', default: false }) + notify_email: boolean; + + @Column({ type: 'timestamptz', default: () => 'NOW()' }) + created_at: Date; + + @Column({ type: 'timestamptz', default: () => 'NOW()' }) + updated_at: Date; + + @ManyToOne(() => License, { onDelete: 'CASCADE' }) + @JoinColumn({ name: 'license_id' }) + license: License; +} diff --git a/backend-nest/src/entities/alert-history.entity.ts b/backend-nest/src/entities/alert-history.entity.ts new file mode 100644 index 0000000..426c494 --- /dev/null +++ b/backend-nest/src/entities/alert-history.entity.ts @@ -0,0 +1,42 @@ +import { Entity, PrimaryGeneratedColumn, Column, ManyToOne, JoinColumn } from 'typeorm'; +import { License } from './license.entity'; + +@Entity('alert_history') +export class AlertHistory { + @PrimaryGeneratedColumn('uuid') + id: string; + + @Column({ type: 'uuid' }) + license_id: string; + + @Column({ type: 'varchar', length: 50 }) + alert_type: string; + + @Column({ type: 'varchar', length: 20 }) + severity: string; + + @Column({ type: 'varchar', length: 255 }) + title: string; + + @Column({ type: 'text' }) + message: string; + + @Column({ type: 'jsonb', nullable: true }) + metadata: Record | null; + + @Column({ type: 'boolean', default: false }) + notified_discord: boolean; + + @Column({ type: 'boolean', default: false }) + notified_pushbullet: boolean; + + @Column({ type: 'boolean', default: false }) + notified_email: boolean; + + @Column({ type: 'timestamptz', default: () => 'NOW()' }) + triggered_at: Date; + + @ManyToOne(() => License, { onDelete: 'CASCADE' }) + @JoinColumn({ name: 'license_id' }) + license: License; +} diff --git a/backend-nest/src/entities/chat-log.entity.ts b/backend-nest/src/entities/chat-log.entity.ts new file mode 100644 index 0000000..b54c016 --- /dev/null +++ b/backend-nest/src/entities/chat-log.entity.ts @@ -0,0 +1,45 @@ +import { Entity, PrimaryGeneratedColumn, Column, ManyToOne, JoinColumn, Check } from 'typeorm'; +import { License } from './license.entity'; +import { User } from './user.entity'; + +@Entity('chat_logs') +@Check(`"channel" IN ('global', 'team', 'server')`) +export class ChatLog { + @PrimaryGeneratedColumn('uuid') + id: string; + + @Column({ type: 'uuid' }) + license_id: string; + + @Column({ type: 'varchar', length: 20 }) + steam_id: string; + + @Column({ type: 'varchar', length: 100 }) + player_name: string; + + @Column({ type: 'varchar', length: 20, default: 'global' }) + channel: string; + + @Column({ type: 'text' }) + message: string; + + @Column({ type: 'boolean', default: false }) + flagged: boolean; + + @Column({ type: 'uuid', nullable: true }) + flagged_by: string | null; + + @Column({ type: 'text', nullable: true }) + flag_reason: string | null; + + @Column({ type: 'timestamptz', default: () => 'NOW()' }) + created_at: Date; + + @ManyToOne(() => License, { onDelete: 'CASCADE' }) + @JoinColumn({ name: 'license_id' }) + license: License; + + @ManyToOne(() => User, { nullable: true }) + @JoinColumn({ name: 'flagged_by' }) + flagger: User | null; +} diff --git a/backend-nest/src/entities/early-access-signup.entity.ts b/backend-nest/src/entities/early-access-signup.entity.ts new file mode 100644 index 0000000..9916360 --- /dev/null +++ b/backend-nest/src/entities/early-access-signup.entity.ts @@ -0,0 +1,16 @@ +import { Entity, PrimaryGeneratedColumn, Column } from 'typeorm'; + +@Entity('early_access_signups') +export class EarlyAccessSignup { + @PrimaryGeneratedColumn('uuid') + id: string; + + @Column({ type: 'varchar', length: 255, unique: true }) + email: string; + + @Column({ type: 'varchar', length: 10 }) + server_count: string; + + @Column({ type: 'timestamptz', default: () => 'NOW()' }) + created_at: Date; +} diff --git a/backend-nest/src/entities/game-admin.entity.ts b/backend-nest/src/entities/game-admin.entity.ts new file mode 100644 index 0000000..5c4ae81 --- /dev/null +++ b/backend-nest/src/entities/game-admin.entity.ts @@ -0,0 +1,40 @@ +import { Entity, PrimaryGeneratedColumn, Column, ManyToOne, JoinColumn, Unique, Check } from 'typeorm'; +import { License } from './license.entity'; +import { User } from './user.entity'; + +@Entity('game_admins') +@Unique(['license_id', 'steam_id']) +@Check(`"admin_level" IN ('owner', 'admin', 'moderator')`) +export class GameAdmin { + @PrimaryGeneratedColumn('uuid') + id: string; + + @Column({ type: 'uuid' }) + license_id: string; + + @Column({ type: 'varchar', length: 20 }) + steam_id: string; + + @Column({ type: 'varchar', length: 100, default: '' }) + display_name: string; + + @Column({ type: 'varchar', length: 20, default: 'admin' }) + admin_level: string; + + @Column({ type: 'jsonb', default: {} }) + permissions: Record; + + @Column({ type: 'uuid' }) + added_by: string; + + @Column({ type: 'timestamptz', default: () => 'NOW()' }) + created_at: Date; + + @ManyToOne(() => License, { onDelete: 'CASCADE' }) + @JoinColumn({ name: 'license_id' }) + license: License; + + @ManyToOne(() => User) + @JoinColumn({ name: 'added_by' }) + adder: User; +} diff --git a/backend-nest/src/entities/host-billing-record.entity.ts b/backend-nest/src/entities/host-billing-record.entity.ts new file mode 100644 index 0000000..2d4061a --- /dev/null +++ b/backend-nest/src/entities/host-billing-record.entity.ts @@ -0,0 +1,31 @@ +import { Entity, PrimaryGeneratedColumn, Column, ManyToOne, JoinColumn, Unique } from 'typeorm'; +import { Host } from './host.entity'; + +@Entity('host_billing_records') +@Unique(['host_id', 'billing_month']) +export class HostBillingRecord { + @PrimaryGeneratedColumn('uuid') + id: string; + + @Column({ type: 'uuid' }) + host_id: string; + + @Column({ type: 'date' }) + billing_month: Date; + + @Column({ type: 'integer' }) + active_license_count: number; + + @Column({ type: 'decimal', precision: 10, scale: 2 }) + wholesale_rate_usd: number; + + @Column({ type: 'decimal', precision: 10, scale: 2 }) + total_amount_usd: number; + + @Column({ type: 'timestamptz', default: () => 'NOW()' }) + generated_at: Date; + + @ManyToOne(() => Host, { onDelete: 'CASCADE' }) + @JoinColumn({ name: 'host_id' }) + host: Host; +} diff --git a/backend-nest/src/entities/host-license.entity.ts b/backend-nest/src/entities/host-license.entity.ts new file mode 100644 index 0000000..2098f60 --- /dev/null +++ b/backend-nest/src/entities/host-license.entity.ts @@ -0,0 +1,36 @@ +import { Entity, PrimaryGeneratedColumn, Column, ManyToOne, JoinColumn, Unique } from 'typeorm'; +import { Host } from './host.entity'; +import { License } from './license.entity'; + +@Entity('host_licenses') +@Unique(['host_id', 'license_id']) +export class HostLicense { + @PrimaryGeneratedColumn('uuid') + id: string; + + @Column({ type: 'uuid' }) + host_id: string; + + @Column({ type: 'uuid' }) + license_id: string; + + @Column({ type: 'varchar', length: 255, nullable: true }) + server_identifier: string | null; + + @Column({ type: 'varchar', length: 255, nullable: true }) + customer_email: string | null; + + @Column({ type: 'timestamptz', default: () => 'NOW()' }) + provisioned_at: Date; + + @Column({ type: 'timestamptz', nullable: true }) + last_seen_at: Date | null; + + @ManyToOne(() => Host, { onDelete: 'CASCADE' }) + @JoinColumn({ name: 'host_id' }) + host: Host; + + @ManyToOne(() => License, { onDelete: 'CASCADE' }) + @JoinColumn({ name: 'license_id' }) + license: License; +} diff --git a/backend-nest/src/entities/host.entity.ts b/backend-nest/src/entities/host.entity.ts new file mode 100644 index 0000000..a10eff9 --- /dev/null +++ b/backend-nest/src/entities/host.entity.ts @@ -0,0 +1,28 @@ +import { Entity, PrimaryGeneratedColumn, Column } from 'typeorm'; + +@Entity('hosts') +export class Host { + @PrimaryGeneratedColumn('uuid') + id: string; + + @Column({ type: 'varchar', length: 200 }) + company_name: string; + + @Column({ type: 'varchar', length: 255, unique: true }) + contact_email: string; + + @Column({ type: 'varchar', length: 64, unique: true }) + api_key: string; + + @Column({ type: 'decimal', precision: 10, scale: 2, default: 6.00 }) + wholesale_rate_usd: number; + + @Column({ type: 'boolean', default: true }) + active: boolean; + + @Column({ type: 'timestamptz', default: () => 'NOW()' }) + created_at: Date; + + @Column({ type: 'timestamptz', default: () => 'NOW()' }) + updated_at: Date; +} diff --git a/backend-nest/src/entities/index.ts b/backend-nest/src/entities/index.ts new file mode 100644 index 0000000..7891288 --- /dev/null +++ b/backend-nest/src/entities/index.ts @@ -0,0 +1,38 @@ +export { User } from './user.entity'; +export { License } from './license.entity'; +export { Role } from './role.entity'; +export { TeamMember } from './team-member.entity'; +export { ServerConnection } from './server-connection.entity'; +export { ServerConfig } from './server-config.entity'; +export { GameAdmin } from './game-admin.entity'; +export { WipeProfile } from './wipe-profile.entity'; +export { WipeSchedule } from './wipe-schedule.entity'; +export { WipeHistory } from './wipe-history.entity'; +export { MapLibrary } from './map-library.entity'; +export { MapRotation } from './map-rotation.entity'; +export { PluginRegistry } from './plugin-registry.entity'; +export { ScheduledTask } from './scheduled-task.entity'; +export { NotificationsConfig } from './notifications-config.entity'; +export { ChatLog } from './chat-log.entity'; +export { PlayerAction } from './player-action.entity'; +export { ServerStats } from './server-stats.entity'; +export { ServerStatsHourly } from './server-stats-hourly.entity'; +export { PublicSiteConfig } from './public-site-config.entity'; +export { PlatformChangelog } from './platform-changelog.entity'; +export { MigrationExport } from './migration-export.entity'; +export { EarlyAccessSignup } from './early-access-signup.entity'; +export { PlayerSession } from './player-session.entity'; +export { AlertConfig } from './alert-config.entity'; +export { AlertHistory } from './alert-history.entity'; +export { Module } from './module.entity'; +export { ModulePurchase } from './module-purchase.entity'; +export { ModuleInstallation } from './module-installation.entity'; +export { PaymentOrder } from './payment-order.entity'; +export { WebstoreSubscription } from './webstore-subscription.entity'; +export { StoreConfig } from './store-config.entity'; +export { StoreCategory } from './store-category.entity'; +export { StoreItem } from './store-item.entity'; +export { StoreTransaction } from './store-transaction.entity'; +export { Host } from './host.entity'; +export { HostLicense } from './host-license.entity'; +export { HostBillingRecord } from './host-billing-record.entity'; diff --git a/backend-nest/src/entities/license.entity.ts b/backend-nest/src/entities/license.entity.ts new file mode 100644 index 0000000..e0d23bd --- /dev/null +++ b/backend-nest/src/entities/license.entity.ts @@ -0,0 +1,46 @@ +import { Entity, PrimaryGeneratedColumn, Column, ManyToOne, JoinColumn, Check } from 'typeorm'; +import { User } from './user.entity'; + +@Entity('licenses') +@Check(`"status" IN ('active', 'suspended', 'expired', 'revoked')`) +export class License { + @PrimaryGeneratedColumn('uuid') + id: string; + + @Column({ type: 'varchar', length: 64, unique: true }) + license_key: string; + + @Column({ type: 'varchar', length: 20, default: 'active' }) + status: string; + + @Column({ type: 'uuid' }) + owner_user_id: string; + + @Column({ type: 'varchar', length: 100, nullable: true }) + server_name: string | null; + + @Column({ type: 'varchar', length: 63, unique: true, nullable: true }) + subdomain: string | null; + + @Column({ type: 'varchar', length: 255, unique: true, nullable: true }) + custom_domain: string | null; + + @Column('text', { array: true, default: '{}' }) + modules_enabled: string[]; + + @Column({ type: 'boolean', default: false }) + webstore_active: boolean; + + @Column({ type: 'varchar', length: 100, nullable: true }) + webstore_subscription_id: string | null; + + @Column({ type: 'timestamptz', default: () => 'NOW()' }) + created_at: Date; + + @Column({ type: 'timestamptz', nullable: true }) + expires_at: Date | null; + + @ManyToOne(() => User, user => user.licenses, { onDelete: 'CASCADE' }) + @JoinColumn({ name: 'owner_user_id' }) + owner: User; +} diff --git a/backend-nest/src/entities/map-library.entity.ts b/backend-nest/src/entities/map-library.entity.ts new file mode 100644 index 0000000..05d829e --- /dev/null +++ b/backend-nest/src/entities/map-library.entity.ts @@ -0,0 +1,46 @@ +import { Entity, PrimaryGeneratedColumn, Column, ManyToOne, JoinColumn, Check } from 'typeorm'; +import { License } from './license.entity'; + +@Entity('map_library') +@Check(`"map_type" IN ('custom', 'procedural')`) +export class MapLibrary { + @PrimaryGeneratedColumn('uuid') + id: string; + + @Column({ type: 'uuid' }) + license_id: string; + + @Column({ type: 'varchar', length: 255 }) + filename: string; + + @Column({ type: 'varchar', length: 255 }) + display_name: string; + + @Column({ type: 'text' }) + storage_path: string; + + @Column({ type: 'bigint', default: 0 }) + file_size_bytes: number; + + @Column({ type: 'varchar', length: 20, default: 'custom' }) + map_type: string; + + @Column({ type: 'integer', nullable: true }) + seed: number | null; + + @Column({ type: 'integer', nullable: true }) + world_size: number | null; + + @Column({ type: 'text', nullable: true }) + thumbnail_path: string | null; + + @Column({ type: 'varchar', length: 64 }) + checksum: string; + + @Column({ type: 'timestamptz', default: () => 'NOW()' }) + uploaded_at: Date; + + @ManyToOne(() => License, { onDelete: 'CASCADE' }) + @JoinColumn({ name: 'license_id' }) + license: License; +} diff --git a/backend-nest/src/entities/map-rotation.entity.ts b/backend-nest/src/entities/map-rotation.entity.ts new file mode 100644 index 0000000..a963800 --- /dev/null +++ b/backend-nest/src/entities/map-rotation.entity.ts @@ -0,0 +1,30 @@ +import { Entity, PrimaryGeneratedColumn, Column, ManyToOne, JoinColumn, Unique } from 'typeorm'; +import { License } from './license.entity'; +import { MapLibrary } from './map-library.entity'; + +@Entity('map_rotations') +@Unique(['license_id', 'rotation_order']) +export class MapRotation { + @PrimaryGeneratedColumn('uuid') + id: string; + + @Column({ type: 'uuid' }) + license_id: string; + + @Column({ type: 'uuid' }) + map_id: string; + + @Column({ type: 'integer', default: 0 }) + rotation_order: number; + + @Column({ type: 'boolean', default: true }) + is_active: boolean; + + @ManyToOne(() => License, { onDelete: 'CASCADE' }) + @JoinColumn({ name: 'license_id' }) + license: License; + + @ManyToOne(() => MapLibrary, { onDelete: 'CASCADE' }) + @JoinColumn({ name: 'map_id' }) + map: MapLibrary; +} diff --git a/backend-nest/src/entities/migration-export.entity.ts b/backend-nest/src/entities/migration-export.entity.ts new file mode 100644 index 0000000..e28d7c1 --- /dev/null +++ b/backend-nest/src/entities/migration-export.entity.ts @@ -0,0 +1,39 @@ +import { Entity, PrimaryGeneratedColumn, Column, ManyToOne, JoinColumn, Check } from 'typeorm'; +import { License } from './license.entity'; +import { User } from './user.entity'; + +@Entity('migration_exports') +@Check(`"export_type" IN ('full', 'config_only', 'store_only')`) +export class MigrationExport { + @PrimaryGeneratedColumn('uuid') + id: string; + + @Column({ type: 'uuid' }) + license_id: string; + + @Column({ type: 'varchar', length: 20, default: 'full' }) + export_type: string; + + @Column({ type: 'text' }) + storage_path: string; + + @Column({ type: 'bigint', default: 0 }) + file_size_bytes: number; + + @Column({ type: 'uuid' }) + created_by: string; + + @Column({ type: 'timestamptz' }) + expires_at: Date; + + @Column({ type: 'timestamptz', default: () => 'NOW()' }) + created_at: Date; + + @ManyToOne(() => License, { onDelete: 'CASCADE' }) + @JoinColumn({ name: 'license_id' }) + license: License; + + @ManyToOne(() => User) + @JoinColumn({ name: 'created_by' }) + creator: User; +} diff --git a/backend-nest/src/entities/module-installation.entity.ts b/backend-nest/src/entities/module-installation.entity.ts new file mode 100644 index 0000000..adf1ba9 --- /dev/null +++ b/backend-nest/src/entities/module-installation.entity.ts @@ -0,0 +1,34 @@ +import { Entity, PrimaryGeneratedColumn, Column, ManyToOne, JoinColumn, Unique, Check } from 'typeorm'; +import { License } from './license.entity'; +import { Module } from './module.entity'; + +@Entity('module_installations') +@Unique(['license_id', 'module_id']) +@Check(`"status" IN ('pending', 'installing', 'installed', 'failed')`) +export class ModuleInstallation { + @PrimaryGeneratedColumn('uuid') + id: string; + + @Column({ type: 'uuid' }) + license_id: string; + + @Column({ type: 'uuid' }) + module_id: string; + + @Column({ type: 'varchar', length: 50, default: 'pending' }) + status: string; + + @Column({ type: 'timestamptz', nullable: true }) + installed_at: Date | null; + + @Column({ type: 'text', nullable: true }) + error_message: string | null; + + @ManyToOne(() => License, { onDelete: 'CASCADE' }) + @JoinColumn({ name: 'license_id' }) + license: License; + + @ManyToOne(() => Module, { onDelete: 'CASCADE' }) + @JoinColumn({ name: 'module_id' }) + module: Module; +} diff --git a/backend-nest/src/entities/module-purchase.entity.ts b/backend-nest/src/entities/module-purchase.entity.ts new file mode 100644 index 0000000..ded624c --- /dev/null +++ b/backend-nest/src/entities/module-purchase.entity.ts @@ -0,0 +1,33 @@ +import { Entity, PrimaryGeneratedColumn, Column, ManyToOne, JoinColumn, Unique } from 'typeorm'; +import { License } from './license.entity'; +import { Module } from './module.entity'; + +@Entity('module_purchases') +@Unique(['license_id', 'module_id']) +export class ModulePurchase { + @PrimaryGeneratedColumn('uuid') + id: string; + + @Column({ type: 'uuid' }) + license_id: string; + + @Column({ type: 'uuid' }) + module_id: string; + + @Column({ type: 'timestamptz', default: () => 'NOW()' }) + purchased_at: Date; + + @Column({ type: 'varchar', length: 255, nullable: true }) + transaction_id: string | null; + + @Column({ type: 'decimal', precision: 10, scale: 2, nullable: true }) + amount_paid: number | null; + + @ManyToOne(() => License, { onDelete: 'CASCADE' }) + @JoinColumn({ name: 'license_id' }) + license: License; + + @ManyToOne(() => Module, { onDelete: 'CASCADE' }) + @JoinColumn({ name: 'module_id' }) + module: Module; +} diff --git a/backend-nest/src/entities/module.entity.ts b/backend-nest/src/entities/module.entity.ts new file mode 100644 index 0000000..3e70b10 --- /dev/null +++ b/backend-nest/src/entities/module.entity.ts @@ -0,0 +1,40 @@ +import { Entity, PrimaryGeneratedColumn, Column } from 'typeorm'; + +@Entity('modules') +export class Module { + @PrimaryGeneratedColumn('uuid') + id: string; + + @Column({ type: 'varchar', length: 100, unique: true }) + slug: string; + + @Column({ type: 'varchar', length: 200 }) + name: string; + + @Column({ type: 'text', nullable: true }) + description: string | null; + + @Column({ type: 'varchar', length: 50, nullable: true }) + category: string | null; + + @Column({ type: 'decimal', precision: 10, scale: 2 }) + price_usd: number; + + @Column({ type: 'text', nullable: true }) + preview_image_url: string | null; + + @Column({ type: 'jsonb', nullable: true }) + screenshots: any | null; + + @Column({ type: 'jsonb', nullable: true }) + features: any | null; + + @Column({ type: 'varchar', length: 20 }) + version: string; + + @Column({ type: 'text', nullable: true }) + plugin_file_url: string | null; + + @Column({ type: 'timestamptz', default: () => 'NOW()' }) + created_at: Date; +} diff --git a/backend-nest/src/entities/payment-order.entity.ts b/backend-nest/src/entities/payment-order.entity.ts new file mode 100644 index 0000000..daebd04 --- /dev/null +++ b/backend-nest/src/entities/payment-order.entity.ts @@ -0,0 +1,58 @@ +import { Entity, PrimaryGeneratedColumn, Column, ManyToOne, JoinColumn, Check } from 'typeorm'; +import { Module } from './module.entity'; +import { License } from './license.entity'; + +@Entity('payment_orders') +@Check(`"status" IN ('pending', 'completed', 'failed', 'refunded')`) +export class PaymentOrder { + @PrimaryGeneratedColumn('uuid') + id: string; + + @Column({ type: 'varchar', length: 255, unique: true }) + order_id: string; + + @Column({ type: 'uuid', nullable: true }) + module_id: string | null; + + @Column({ type: 'uuid', nullable: true }) + webstore_subscription_id: string | null; + + @Column({ type: 'uuid' }) + license_id: string; + + @Column({ type: 'decimal', precision: 10, scale: 2 }) + amount: number; + + @Column({ type: 'varchar', length: 3, default: 'USD' }) + currency: string; + + @Column({ type: 'varchar', length: 50 }) + status: string; + + @Column({ type: 'varchar', length: 255, nullable: true }) + transaction_id: string | null; + + @Column({ type: 'varchar', length: 255, nullable: true }) + payer_email: string | null; + + @Column({ type: 'timestamptz', default: () => 'NOW()' }) + created_at: Date; + + @Column({ type: 'timestamptz', nullable: true }) + completed_at: Date | null; + + @Column({ type: 'jsonb', nullable: true }) + metadata: Record | null; + + @ManyToOne(() => Module, { onDelete: 'SET NULL', nullable: true }) + @JoinColumn({ name: 'module_id' }) + module: Module | null; + + @ManyToOne(() => License, { onDelete: 'CASCADE' }) + @JoinColumn({ name: 'license_id' }) + license: License; + + @ManyToOne(() => License, { onDelete: 'SET NULL', nullable: true }) + @JoinColumn({ name: 'webstore_subscription_id' }) + webstore_subscription: License | null; +} diff --git a/backend-nest/src/entities/platform-changelog.entity.ts b/backend-nest/src/entities/platform-changelog.entity.ts new file mode 100644 index 0000000..39ec478 --- /dev/null +++ b/backend-nest/src/entities/platform-changelog.entity.ts @@ -0,0 +1,23 @@ +import { Entity, PrimaryGeneratedColumn, Column, Check } from 'typeorm'; + +@Entity('platform_changelog') +@Check(`"category" IN ('feature', 'bugfix', 'module', 'security')`) +export class PlatformChangelog { + @PrimaryGeneratedColumn('uuid') + id: string; + + @Column({ type: 'varchar', length: 20 }) + version: string; + + @Column({ type: 'varchar', length: 200 }) + title: string; + + @Column({ type: 'text' }) + body: string; + + @Column({ type: 'varchar', length: 20, default: 'feature' }) + category: string; + + @Column({ type: 'timestamptz', default: () => 'NOW()' }) + published_at: Date; +} diff --git a/backend-nest/src/entities/player-action.entity.ts b/backend-nest/src/entities/player-action.entity.ts new file mode 100644 index 0000000..933068e --- /dev/null +++ b/backend-nest/src/entities/player-action.entity.ts @@ -0,0 +1,42 @@ +import { Entity, PrimaryGeneratedColumn, Column, ManyToOne, JoinColumn, Check } from 'typeorm'; +import { License } from './license.entity'; +import { User } from './user.entity'; + +@Entity('player_actions') +@Check(`"action_type" IN ('kick', 'ban', 'unban', 'warn', 'note')`) +export class PlayerAction { + @PrimaryGeneratedColumn('uuid') + id: string; + + @Column({ type: 'uuid' }) + license_id: string; + + @Column({ type: 'varchar', length: 20 }) + steam_id: string; + + @Column({ type: 'varchar', length: 100 }) + player_name: string; + + @Column({ type: 'varchar', length: 20 }) + action_type: string; + + @Column({ type: 'text', nullable: true }) + reason: string | null; + + @Column({ type: 'integer', nullable: true }) + duration_minutes: number | null; + + @Column({ type: 'uuid' }) + performed_by: string; + + @Column({ type: 'timestamptz', default: () => 'NOW()' }) + created_at: Date; + + @ManyToOne(() => License, { onDelete: 'CASCADE' }) + @JoinColumn({ name: 'license_id' }) + license: License; + + @ManyToOne(() => User) + @JoinColumn({ name: 'performed_by' }) + performer: User; +} diff --git a/backend-nest/src/entities/player-session.entity.ts b/backend-nest/src/entities/player-session.entity.ts new file mode 100644 index 0000000..1fd18f9 --- /dev/null +++ b/backend-nest/src/entities/player-session.entity.ts @@ -0,0 +1,33 @@ +import { Entity, PrimaryGeneratedColumn, Column, ManyToOne, JoinColumn } from 'typeorm'; +import { License } from './license.entity'; + +@Entity('player_sessions') +export class PlayerSession { + @PrimaryGeneratedColumn('uuid') + id: string; + + @Column({ type: 'uuid' }) + license_id: string; + + @Column({ type: 'varchar', length: 20 }) + steam_id: string; + + @Column({ type: 'varchar', length: 100 }) + player_name: string; + + @Column({ type: 'timestamptz' }) + session_start: Date; + + @Column({ type: 'timestamptz', nullable: true }) + session_end: Date | null; + + @Column({ type: 'integer', nullable: true }) + duration_seconds: number | null; + + @Column({ type: 'timestamptz', default: () => 'NOW()' }) + created_at: Date; + + @ManyToOne(() => License, { onDelete: 'CASCADE' }) + @JoinColumn({ name: 'license_id' }) + license: License; +} diff --git a/backend-nest/src/entities/plugin-registry.entity.ts b/backend-nest/src/entities/plugin-registry.entity.ts new file mode 100644 index 0000000..57f3ee1 --- /dev/null +++ b/backend-nest/src/entities/plugin-registry.entity.ts @@ -0,0 +1,59 @@ +import { Entity, PrimaryGeneratedColumn, Column, ManyToOne, JoinColumn, Unique, Check } from 'typeorm'; +import { License } from './license.entity'; + +@Entity('plugin_registry') +@Unique(['license_id', 'plugin_name']) +@Check(`"source" IN ('umod', 'corrosion_module', 'manual')`) +export class PluginRegistry { + @PrimaryGeneratedColumn('uuid') + id: string; + + @Column({ type: 'uuid' }) + license_id: string; + + @Column({ type: 'varchar', length: 255 }) + plugin_name: string; + + @Column({ type: 'varchar', length: 50, nullable: true }) + plugin_version: string | null; + + @Column({ type: 'varchar', length: 20, default: 'manual' }) + source: string; + + @Column({ type: 'varchar', length: 255, nullable: true }) + umod_slug: string | null; + + @Column({ type: 'boolean', default: false }) + is_installed: boolean; + + @Column({ type: 'boolean', default: false }) + is_loaded: boolean; + + @Column({ type: 'jsonb', nullable: true }) + config_json: Record | null; + + @Column({ type: 'text', nullable: true }) + data_path: string | null; + + @Column({ type: 'boolean', default: false }) + wipe_on_map: boolean; + + @Column({ type: 'boolean', default: false }) + wipe_on_bp: boolean; + + @Column({ type: 'boolean', default: false }) + wipe_on_full: boolean; + + @Column({ type: 'boolean', default: false }) + never_wipe: boolean; + + @Column({ type: 'timestamptz', default: () => 'NOW()' }) + installed_at: Date; + + @Column({ type: 'timestamptz', default: () => 'NOW()' }) + updated_at: Date; + + @ManyToOne(() => License, { onDelete: 'CASCADE' }) + @JoinColumn({ name: 'license_id' }) + license: License; +} diff --git a/backend-nest/src/entities/public-site-config.entity.ts b/backend-nest/src/entities/public-site-config.entity.ts new file mode 100644 index 0000000..197abcb --- /dev/null +++ b/backend-nest/src/entities/public-site-config.entity.ts @@ -0,0 +1,60 @@ +import { Entity, PrimaryGeneratedColumn, Column, ManyToOne, JoinColumn } from 'typeorm'; +import { License } from './license.entity'; + +@Entity('public_site_config') +export class PublicSiteConfig { + @PrimaryGeneratedColumn('uuid') + id: string; + + @Column({ type: 'uuid', unique: true }) + license_id: string; + + @Column({ type: 'boolean', default: true }) + site_enabled: boolean; + + @Column({ type: 'boolean', default: false }) + show_on_status_page: boolean; + + @Column({ type: 'varchar', length: 255, nullable: true }) + steam_connect_url: string | null; + + @Column({ type: 'text', nullable: true }) + motd: string | null; + + @Column('text', { array: true, default: '{}' }) + public_mods: string[]; + + @Column({ type: 'text', nullable: true }) + header_image_url: string | null; + + @Column({ type: 'varchar', length: 7, default: '#ef4444' }) + theme_color: string; + + @Column({ type: 'text', nullable: true }) + custom_css: string | null; + + @Column({ type: 'text', nullable: true }) + discord_invite_url: string | null; + + @Column({ type: 'boolean', default: true }) + show_player_count: boolean; + + @Column({ type: 'boolean', default: true }) + show_wipe_schedule: boolean; + + @Column({ type: 'boolean', default: true }) + show_wipe_countdown: boolean; + + @Column({ type: 'boolean', default: true }) + show_mod_list: boolean; + + @Column({ type: 'text', nullable: true }) + status_page_description: string | null; + + @Column({ type: 'timestamptz', default: () => 'NOW()' }) + created_at: Date; + + @ManyToOne(() => License, { onDelete: 'CASCADE' }) + @JoinColumn({ name: 'license_id' }) + license: License; +} diff --git a/backend-nest/src/entities/server-config.entity.ts b/backend-nest/src/entities/server-config.entity.ts new file mode 100644 index 0000000..523167b --- /dev/null +++ b/backend-nest/src/entities/server-config.entity.ts @@ -0,0 +1,80 @@ +import { Entity, PrimaryGeneratedColumn, Column, ManyToOne, JoinColumn } from 'typeorm'; +import { License } from './license.entity'; +import { MapLibrary } from './map-library.entity'; + +@Entity('server_config') +export class ServerConfig { + @PrimaryGeneratedColumn('uuid') + id: string; + + @Column({ type: 'uuid', unique: true }) + license_id: string; + + @Column({ type: 'varchar', length: 255, default: '' }) + server_name: string; + + @Column({ type: 'integer', nullable: true }) + max_players: number | null; + + @Column({ type: 'integer', nullable: true }) + world_size: number | null; + + @Column({ type: 'integer', nullable: true }) + current_seed: number | null; + + @Column({ type: 'uuid', nullable: true }) + current_map_id: string | null; + + @Column({ type: 'text', nullable: true }) + server_description: string | null; + + @Column({ type: 'text', nullable: true }) + server_url: string | null; + + @Column({ type: 'text', nullable: true }) + server_header_image: string | null; + + @Column('text', { array: true, default: '{}' }) + tags: string[]; + + @Column({ type: 'boolean', default: false }) + auto_restart_enabled: boolean; + + @Column({ type: 'varchar', length: 100, nullable: true }) + auto_restart_cron: string | null; + + @Column({ type: 'varchar', length: 50, nullable: true }) + auto_restart_timezone: string | null; + + @Column({ type: 'boolean', default: true }) + crash_recovery_enabled: boolean; + + @Column({ type: 'integer', default: 3 }) + crash_recovery_max_attempts: number; + + @Column({ type: 'integer', default: 10 }) + crash_recovery_cooldown_minutes: number; + + @Column({ type: 'boolean', default: true }) + force_wipe_eligible: boolean; + + @Column({ type: 'boolean', default: true }) + auto_update_on_force_wipe: boolean; + + @Column({ type: 'jsonb', default: {} }) + config_overrides: Record; + + @Column({ type: 'timestamptz', default: () => 'NOW()' }) + created_at: Date; + + @Column({ type: 'timestamptz', default: () => 'NOW()' }) + updated_at: Date; + + @ManyToOne(() => License, { onDelete: 'CASCADE' }) + @JoinColumn({ name: 'license_id' }) + license: License; + + @ManyToOne(() => MapLibrary, { onDelete: 'SET NULL', nullable: true }) + @JoinColumn({ name: 'current_map_id' }) + current_map: MapLibrary | null; +} diff --git a/backend-nest/src/entities/server-connection.entity.ts b/backend-nest/src/entities/server-connection.entity.ts new file mode 100644 index 0000000..ed49ac9 --- /dev/null +++ b/backend-nest/src/entities/server-connection.entity.ts @@ -0,0 +1,56 @@ +import { Entity, PrimaryGeneratedColumn, Column, ManyToOne, JoinColumn, Check } from 'typeorm'; +import { License } from './license.entity'; + +@Entity('server_connections') +@Check(`"connection_type" IN ('amp', 'pterodactyl', 'bare_metal')`) +@Check(`"connection_status" IN ('connected', 'degraded', 'offline')`) +export class ServerConnection { + @PrimaryGeneratedColumn('uuid') + id: string; + + @Column({ type: 'uuid', unique: true }) + license_id: string; + + @Column({ type: 'varchar', length: 20 }) + connection_type: string; + + @Column({ type: 'text', nullable: true }) + panel_api_endpoint: string | null; + + @Column({ type: 'text', nullable: true }) + panel_api_key_encrypted: string | null; + + @Column({ type: 'varchar', length: 255, nullable: true }) + panel_server_identifier: string | null; + + @Column({ type: 'varchar', length: 128, nullable: true }) + companion_agent_token: string | null; + + @Column({ type: 'timestamptz', nullable: true }) + companion_last_seen: Date | null; + + @Column({ type: 'timestamptz', nullable: true }) + plugin_last_seen: Date | null; + + @Column({ type: 'varchar', length: 45, nullable: true }) + server_ip: string | null; + + @Column({ type: 'integer', nullable: true }) + server_port: number | null; + + @Column({ type: 'integer', nullable: true }) + game_port: number | null; + + @Column({ type: 'varchar', length: 20, default: 'offline' }) + connection_status: string; + + @Column({ type: 'timestamptz', default: () => 'NOW()' }) + created_at: Date; + + @Column({ type: 'timestamptz', default: () => 'NOW()' }) + updated_at: Date; + + @ManyToOne(() => License, { onDelete: 'CASCADE' }) + @JoinColumn({ name: 'license_id' }) + license: License; +} diff --git a/backend-nest/src/entities/server-stats-hourly.entity.ts b/backend-nest/src/entities/server-stats-hourly.entity.ts new file mode 100644 index 0000000..5e5dc40 --- /dev/null +++ b/backend-nest/src/entities/server-stats-hourly.entity.ts @@ -0,0 +1,37 @@ +import { Entity, PrimaryGeneratedColumn, Column, ManyToOne, JoinColumn, Unique } from 'typeorm'; +import { License } from './license.entity'; + +@Entity('server_stats_hourly') +@Unique(['license_id', 'hour']) +export class ServerStatsHourly { + @PrimaryGeneratedColumn('uuid') + id: string; + + @Column({ type: 'uuid' }) + license_id: string; + + @Column({ type: 'timestamptz' }) + hour: Date; + + @Column({ type: 'double precision', default: 0 }) + avg_players: number; + + @Column({ type: 'integer', default: 0 }) + max_players: number; + + @Column({ type: 'double precision', default: 0 }) + avg_fps: number; + + @Column({ type: 'double precision', default: 0 }) + min_fps: number; + + @Column({ type: 'integer', default: 0 }) + avg_entities: number; + + @Column({ type: 'double precision', default: 0 }) + uptime_percentage: number; + + @ManyToOne(() => License, { onDelete: 'CASCADE' }) + @JoinColumn({ name: 'license_id' }) + license: License; +} diff --git a/backend-nest/src/entities/server-stats.entity.ts b/backend-nest/src/entities/server-stats.entity.ts new file mode 100644 index 0000000..29edee1 --- /dev/null +++ b/backend-nest/src/entities/server-stats.entity.ts @@ -0,0 +1,44 @@ +import { Entity, PrimaryGeneratedColumn, Column, ManyToOne, JoinColumn } from 'typeorm'; +import { License } from './license.entity'; +import { MapLibrary } from './map-library.entity'; + +@Entity('server_stats') +export class ServerStats { + @PrimaryGeneratedColumn('uuid') + id: string; + + @Column({ type: 'uuid' }) + license_id: string; + + @Column({ type: 'integer', default: 0 }) + player_count: number; + + @Column({ type: 'integer', default: 0 }) + max_players: number; + + @Column({ type: 'double precision', default: 0 }) + fps: number; + + @Column({ type: 'integer', default: 0 }) + entity_count: number; + + @Column({ type: 'integer', default: 0 }) + uptime_seconds: number; + + @Column({ type: 'integer', default: 0 }) + memory_usage_mb: number; + + @Column({ type: 'uuid', nullable: true }) + map_id: string | null; + + @Column({ type: 'timestamptz', default: () => 'NOW()' }) + recorded_at: Date; + + @ManyToOne(() => License, { onDelete: 'CASCADE' }) + @JoinColumn({ name: 'license_id' }) + license: License; + + @ManyToOne(() => MapLibrary, { onDelete: 'SET NULL', nullable: true }) + @JoinColumn({ name: 'map_id' }) + map: MapLibrary | null; +} diff --git a/backend-nest/src/entities/store-category.entity.ts b/backend-nest/src/entities/store-category.entity.ts new file mode 100644 index 0000000..1b524fa --- /dev/null +++ b/backend-nest/src/entities/store-category.entity.ts @@ -0,0 +1,34 @@ +import { Entity, PrimaryGeneratedColumn, Column, ManyToOne, JoinColumn, Unique } from 'typeorm'; +import { License } from './license.entity'; + +@Entity('store_categories') +@Unique(['license_id', 'slug']) +export class StoreCategory { + @PrimaryGeneratedColumn('uuid') + id: string; + + @Column({ type: 'uuid' }) + license_id: string; + + @Column({ type: 'varchar', length: 100 }) + name: string; + + @Column({ type: 'varchar', length: 100 }) + slug: string; + + @Column({ type: 'text', nullable: true }) + description: string | null; + + @Column({ type: 'integer', default: 0 }) + display_order: number; + + @Column({ type: 'boolean', default: true }) + visible: boolean; + + @Column({ type: 'timestamptz', default: () => 'NOW()' }) + created_at: Date; + + @ManyToOne(() => License, { onDelete: 'CASCADE' }) + @JoinColumn({ name: 'license_id' }) + license: License; +} diff --git a/backend-nest/src/entities/store-config.entity.ts b/backend-nest/src/entities/store-config.entity.ts new file mode 100644 index 0000000..9bb6c01 --- /dev/null +++ b/backend-nest/src/entities/store-config.entity.ts @@ -0,0 +1,42 @@ +import { Entity, PrimaryGeneratedColumn, Column, ManyToOne, JoinColumn } from 'typeorm'; +import { License } from './license.entity'; + +@Entity('store_config') +export class StoreConfig { + @PrimaryGeneratedColumn('uuid') + id: string; + + @Column({ type: 'uuid', unique: true }) + license_id: string; + + @Column({ type: 'varchar', length: 200 }) + store_name: string; + + @Column({ type: 'text', nullable: true }) + description: string | null; + + @Column({ type: 'varchar', length: 3, default: 'USD' }) + currency: string; + + @Column({ type: 'varchar', length: 255, nullable: true }) + paypal_client_id: string | null; + + @Column({ type: 'text', nullable: true }) + paypal_client_secret: string | null; + + @Column({ type: 'boolean', default: true }) + sandbox_mode: boolean; + + @Column({ type: 'boolean', default: false }) + enabled: boolean; + + @Column({ type: 'timestamptz', default: () => 'NOW()' }) + created_at: Date; + + @Column({ type: 'timestamptz', default: () => 'NOW()' }) + updated_at: Date; + + @ManyToOne(() => License, { onDelete: 'CASCADE' }) + @JoinColumn({ name: 'license_id' }) + license: License; +} diff --git a/backend-nest/src/entities/store-item.entity.ts b/backend-nest/src/entities/store-item.entity.ts new file mode 100644 index 0000000..f3e22c8 --- /dev/null +++ b/backend-nest/src/entities/store-item.entity.ts @@ -0,0 +1,54 @@ +import { Entity, PrimaryGeneratedColumn, Column, ManyToOne, JoinColumn, Check } from 'typeorm'; +import { License } from './license.entity'; +import { StoreCategory } from './store-category.entity'; + +@Entity('store_items') +@Check(`"item_type" IN ('kit', 'rank', 'currency', 'command')`) +export class StoreItem { + @PrimaryGeneratedColumn('uuid') + id: string; + + @Column({ type: 'uuid' }) + license_id: string; + + @Column({ type: 'uuid', nullable: true }) + category_id: string | null; + + @Column({ type: 'varchar', length: 200 }) + name: string; + + @Column({ type: 'text', nullable: true }) + description: string | null; + + @Column({ type: 'decimal', precision: 10, scale: 2 }) + price: number; + + @Column({ type: 'text', nullable: true }) + image_url: string | null; + + @Column({ type: 'varchar', length: 50 }) + item_type: string; + + @Column({ type: 'jsonb' }) + delivery_commands: Record; + + @Column({ type: 'integer', nullable: true }) + limit_per_player: number | null; + + @Column({ type: 'boolean', default: true }) + enabled: boolean; + + @Column({ type: 'timestamptz', default: () => 'NOW()' }) + created_at: Date; + + @Column({ type: 'timestamptz', default: () => 'NOW()' }) + updated_at: Date; + + @ManyToOne(() => License, { onDelete: 'CASCADE' }) + @JoinColumn({ name: 'license_id' }) + license: License; + + @ManyToOne(() => StoreCategory, { onDelete: 'SET NULL', nullable: true }) + @JoinColumn({ name: 'category_id' }) + category: StoreCategory | null; +} diff --git a/backend-nest/src/entities/store-transaction.entity.ts b/backend-nest/src/entities/store-transaction.entity.ts new file mode 100644 index 0000000..e82995b --- /dev/null +++ b/backend-nest/src/entities/store-transaction.entity.ts @@ -0,0 +1,57 @@ +import { Entity, PrimaryGeneratedColumn, Column, ManyToOne, JoinColumn, Check } from 'typeorm'; +import { License } from './license.entity'; +import { StoreItem } from './store-item.entity'; + +@Entity('store_transactions') +@Check(`"status" IN ('pending', 'paid', 'delivered', 'failed', 'refunded')`) +export class StoreTransaction { + @PrimaryGeneratedColumn('uuid') + id: string; + + @Column({ type: 'uuid' }) + license_id: string; + + @Column({ type: 'uuid', nullable: true }) + item_id: string | null; + + @Column({ type: 'varchar', length: 20 }) + steam_id: string; + + @Column({ type: 'varchar', length: 100, nullable: true }) + player_name: string | null; + + @Column({ type: 'varchar', length: 255, unique: true }) + paypal_order_id: string; + + @Column({ type: 'varchar', length: 255, nullable: true }) + paypal_transaction_id: string | null; + + @Column({ type: 'decimal', precision: 10, scale: 2 }) + amount: number; + + @Column({ type: 'varchar', length: 3, default: 'USD' }) + currency: string; + + @Column({ type: 'varchar', length: 50 }) + status: string; + + @Column({ type: 'boolean', default: false }) + delivered: boolean; + + @Column({ type: 'timestamptz', nullable: true }) + delivered_at: Date | null; + + @Column({ type: 'varchar', length: 255, nullable: true }) + payer_email: string | null; + + @Column({ type: 'timestamptz', default: () => 'NOW()' }) + created_at: Date; + + @ManyToOne(() => License, { onDelete: 'CASCADE' }) + @JoinColumn({ name: 'license_id' }) + license: License; + + @ManyToOne(() => StoreItem, { onDelete: 'SET NULL', nullable: true }) + @JoinColumn({ name: 'item_id' }) + item: StoreItem | null; +} diff --git a/backend-nest/src/entities/user.entity.ts b/backend-nest/src/entities/user.entity.ts new file mode 100644 index 0000000..85d9a8b --- /dev/null +++ b/backend-nest/src/entities/user.entity.ts @@ -0,0 +1,45 @@ +import { Entity, PrimaryGeneratedColumn, Column, OneToMany, CreateDateColumn } from 'typeorm'; +import { License } from './license.entity'; +import { TeamMember } from './team-member.entity'; + +@Entity('users') +export class User { + @PrimaryGeneratedColumn('uuid') + id: string; + + @Column({ type: 'varchar', length: 255, unique: true }) + email: string; + + @Column({ type: 'varchar', length: 50, unique: true }) + username: string; + + @Column({ type: 'text' }) + password_hash: string; + + @Column({ type: 'text', nullable: true }) + totp_secret: string | null; + + @Column({ type: 'boolean', default: false }) + totp_enabled: boolean; + + @Column('text', { array: true, nullable: true }) + backup_codes: string[] | null; + + @Column({ type: 'boolean', default: false }) + email_verified: boolean; + + @Column({ type: 'boolean', default: false }) + is_super_admin: boolean; + + @Column({ type: 'timestamptz', default: () => 'NOW()' }) + created_at: Date; + + @Column({ type: 'timestamptz', nullable: true }) + last_login_at: Date | null; + + @OneToMany(() => License, license => license.owner) + licenses: License[]; + + @OneToMany(() => TeamMember, teamMember => teamMember.user) + team_memberships: TeamMember[]; +} diff --git a/backend-nest/src/entities/webstore-subscription.entity.ts b/backend-nest/src/entities/webstore-subscription.entity.ts new file mode 100644 index 0000000..71c5ba1 --- /dev/null +++ b/backend-nest/src/entities/webstore-subscription.entity.ts @@ -0,0 +1,37 @@ +import { Entity, PrimaryGeneratedColumn, Column, ManyToOne, JoinColumn, Check } from 'typeorm'; +import { License } from './license.entity'; + +@Entity('webstore_subscriptions') +@Check(`"status" IN ('active', 'cancelled', 'suspended', 'past_due')`) +export class WebstoreSubscription { + @PrimaryGeneratedColumn('uuid') + id: string; + + @Column({ type: 'uuid', unique: true }) + license_id: string; + + @Column({ type: 'varchar', length: 255, unique: true }) + paypal_subscription_id: string; + + @Column({ type: 'varchar', length: 100 }) + plan_id: string; + + @Column({ type: 'varchar', length: 50 }) + status: string; + + @Column({ type: 'timestamptz' }) + current_period_start: Date; + + @Column({ type: 'timestamptz' }) + current_period_end: Date; + + @Column({ type: 'timestamptz', nullable: true }) + cancelled_at: Date | null; + + @Column({ type: 'timestamptz', default: () => 'NOW()' }) + created_at: Date; + + @ManyToOne(() => License, { onDelete: 'CASCADE' }) + @JoinColumn({ name: 'license_id' }) + license: License; +} diff --git a/backend-nest/src/entities/wipe-history.entity.ts b/backend-nest/src/entities/wipe-history.entity.ts new file mode 100644 index 0000000..6146396 --- /dev/null +++ b/backend-nest/src/entities/wipe-history.entity.ts @@ -0,0 +1,78 @@ +import { Entity, PrimaryGeneratedColumn, Column, ManyToOne, JoinColumn, Check } from 'typeorm'; +import { License } from './license.entity'; +import { WipeSchedule } from './wipe-schedule.entity'; +import { WipeProfile } from './wipe-profile.entity'; +import { MapLibrary } from './map-library.entity'; + +@Entity('wipe_history') +@Check(`"wipe_type" IN ('map', 'blueprint', 'full')`) +@Check(`"trigger_type" IN ('scheduled', 'manual', 'force_wipe')`) +@Check(`"status" IN ('pending', 'pre_wipe', 'wiping', 'post_wipe', 'success', 'failed', 'rolled_back')`) +export class WipeHistory { + @PrimaryGeneratedColumn('uuid') + id: string; + + @Column({ type: 'uuid' }) + license_id: string; + + @Column({ type: 'uuid', nullable: true }) + wipe_schedule_id: string | null; + + @Column({ type: 'uuid' }) + wipe_profile_id: string; + + @Column({ type: 'varchar', length: 20 }) + wipe_type: string; + + @Column({ type: 'varchar', length: 20 }) + trigger_type: string; + + @Column({ type: 'varchar', length: 20, default: 'pending' }) + status: string; + + @Column({ type: 'timestamptz', nullable: true }) + started_at: Date | null; + + @Column({ type: 'timestamptz', nullable: true }) + completed_at: Date | null; + + @Column({ type: 'varchar', length: 255, nullable: true }) + map_used_legacy: string | null; + + @Column({ type: 'uuid', nullable: true }) + map_id: string | null; + + @Column('text', { array: true, nullable: true }) + plugins_wiped: string[] | null; + + @Column('text', { array: true, nullable: true }) + plugins_preserved: string[] | null; + + @Column({ type: 'text', nullable: true }) + backup_reference: string | null; + + @Column({ type: 'text', nullable: true }) + error_message: string | null; + + @Column({ type: 'jsonb', default: '[]' }) + execution_log: any[]; + + @Column({ type: 'timestamptz', default: () => 'NOW()' }) + created_at: Date; + + @ManyToOne(() => License, { onDelete: 'CASCADE' }) + @JoinColumn({ name: 'license_id' }) + license: License; + + @ManyToOne(() => WipeSchedule, { onDelete: 'SET NULL', nullable: true }) + @JoinColumn({ name: 'wipe_schedule_id' }) + wipe_schedule: WipeSchedule | null; + + @ManyToOne(() => WipeProfile) + @JoinColumn({ name: 'wipe_profile_id' }) + wipe_profile: WipeProfile; + + @ManyToOne(() => MapLibrary, { onDelete: 'SET NULL', nullable: true }) + @JoinColumn({ name: 'map_id' }) + map: MapLibrary | null; +} diff --git a/backend-nest/src/entities/wipe-profile.entity.ts b/backend-nest/src/entities/wipe-profile.entity.ts new file mode 100644 index 0000000..3725d0f --- /dev/null +++ b/backend-nest/src/entities/wipe-profile.entity.ts @@ -0,0 +1,33 @@ +import { Entity, PrimaryGeneratedColumn, Column, ManyToOne, JoinColumn } from 'typeorm'; +import { License } from './license.entity'; + +@Entity('wipe_profiles') +export class WipeProfile { + @PrimaryGeneratedColumn('uuid') + id: string; + + @Column({ type: 'uuid' }) + license_id: string; + + @Column({ type: 'varchar', length: 100 }) + profile_name: string; + + @Column({ type: 'text', nullable: true }) + description: string | null; + + @Column({ type: 'jsonb', nullable: true }) + pre_wipe_config: Record | null; + + @Column({ type: 'jsonb', nullable: true }) + post_wipe_config: Record | null; + + @Column({ type: 'timestamptz', default: () => 'NOW()' }) + created_at: Date; + + @Column({ type: 'timestamptz', default: () => 'NOW()' }) + updated_at: Date; + + @ManyToOne(() => License, { onDelete: 'CASCADE' }) + @JoinColumn({ name: 'license_id' }) + license: License; +} diff --git a/backend-nest/src/entities/wipe-schedule.entity.ts b/backend-nest/src/entities/wipe-schedule.entity.ts new file mode 100644 index 0000000..3acba88 --- /dev/null +++ b/backend-nest/src/entities/wipe-schedule.entity.ts @@ -0,0 +1,48 @@ +import { Entity, PrimaryGeneratedColumn, Column, ManyToOne, JoinColumn, Check } from 'typeorm'; +import { License } from './license.entity'; +import { WipeProfile } from './wipe-profile.entity'; + +@Entity('wipe_schedules') +@Check(`"wipe_type" IN ('map', 'blueprint', 'full')`) +export class WipeSchedule { + @PrimaryGeneratedColumn('uuid') + id: string; + + @Column({ type: 'uuid' }) + license_id: string; + + @Column({ type: 'uuid' }) + wipe_profile_id: string; + + @Column({ type: 'varchar', length: 100 }) + schedule_name: string; + + @Column({ type: 'varchar', length: 20 }) + wipe_type: string; + + @Column({ type: 'varchar', length: 100 }) + cron_expression: string; + + @Column({ type: 'varchar', length: 50, default: 'America/New_York' }) + timezone: string; + + @Column({ type: 'boolean', default: false }) + wipe_blueprints: boolean; + + @Column({ type: 'boolean', default: true }) + is_active: boolean; + + @Column({ type: 'timestamptz', nullable: true }) + next_scheduled_run: Date | null; + + @Column({ type: 'timestamptz', default: () => 'NOW()' }) + created_at: Date; + + @ManyToOne(() => License, { onDelete: 'CASCADE' }) + @JoinColumn({ name: 'license_id' }) + license: License; + + @ManyToOne(() => WipeProfile, { onDelete: 'CASCADE' }) + @JoinColumn({ name: 'wipe_profile_id' }) + wipe_profile: WipeProfile; +} diff --git a/backend-nest/src/gateways/nats-bridge.gateway.ts b/backend-nest/src/gateways/nats-bridge.gateway.ts new file mode 100644 index 0000000..4c5a208 --- /dev/null +++ b/backend-nest/src/gateways/nats-bridge.gateway.ts @@ -0,0 +1,106 @@ +import { + WebSocketGateway, + WebSocketServer, + OnGatewayConnection, + OnGatewayDisconnect, + SubscribeMessage, +} from '@nestjs/websockets'; +import { Logger } from '@nestjs/common'; +import { Server, Socket } from 'socket.io'; +import { JwtService } from '@nestjs/jwt'; +import { ConfigService } from '@nestjs/config'; +import { NatsBridgeService } from '../services/nats-bridge.service'; +import { NatsService } from '../services/nats.service'; + +interface AuthenticatedSocket extends Socket { + data: { + userId: string; + licenseId: string; + email: string; + }; +} + +@WebSocketGateway({ + namespace: '/ws', + cors: { origin: '*' }, +}) +export class NatsBridgeGateway implements OnGatewayConnection, OnGatewayDisconnect { + private readonly logger = new Logger(NatsBridgeGateway.name); + + @WebSocketServer() + server!: Server; + + constructor( + private jwtService: JwtService, + private configService: ConfigService, + private natsBridge: NatsBridgeService, + private natsService: NatsService, + ) {} + + async handleConnection(client: AuthenticatedSocket) { + try { + const token = client.handshake.query.token as string; + if (!token) { + client.emit('error', { message: 'Authentication required' }); + client.disconnect(); + return; + } + + const secret = this.configService.get('jwt.secret'); + const payload = this.jwtService.verify(token, { secret }); + + client.data = { + userId: payload.sub, + licenseId: payload.license_id, + email: payload.email, + }; + + if (payload.license_id) { + await client.join(`license:${payload.license_id}`); + } + + if (payload.license_id) { + const listener = (event: string, data: unknown) => { + client.emit('event', { + type: 'event', + license_id: payload.license_id, + event, + data, + }); + }; + this.natsBridge.addListener(payload.license_id, listener); + (client as Socket & { _natsListener?: typeof listener })._natsListener = listener; + } + + client.emit('connected', { type: 'connected', license_id: payload.license_id }); + this.logger.log(`Client connected: ${payload.email} (license: ${payload.license_id})`); + } catch { + client.emit('error', { message: 'Invalid token' }); + client.disconnect(); + } + } + + handleDisconnect(client: AuthenticatedSocket) { + if (client.data?.licenseId) { + const listener = (client as Socket & { _natsListener?: (event: string, data: unknown) => void })._natsListener; + if (listener) { + this.natsBridge.removeListener(client.data.licenseId, listener); + } + } + } + + @SubscribeMessage('console_input') + async handleConsoleInput(client: AuthenticatedSocket, data: { command: string }) { + if (!client.data?.licenseId) return; + await this.natsService.sendServerCommand(client.data.licenseId, 'command', { command: data.command }); + } + + sendToLicense(licenseId: string, event: string, data: unknown): void { + this.server.to(`license:${licenseId}`).emit(event, { + type: 'event', + license_id: licenseId, + event, + data, + }); + } +} diff --git a/backend-nest/src/main.ts b/backend-nest/src/main.ts new file mode 100644 index 0000000..b157ca0 --- /dev/null +++ b/backend-nest/src/main.ts @@ -0,0 +1,50 @@ +import { NestFactory } from '@nestjs/core'; +import { ValidationPipe } from '@nestjs/common'; +import { SwaggerModule, DocumentBuilder } from '@nestjs/swagger'; +import { AppModule } from './app.module'; +import { HttpExceptionFilter } from './common/filters/http-exception.filter'; +import { TransformInterceptor } from './common/interceptors/transform.interceptor'; + +async function bootstrap() { + const app = await NestFactory.create(AppModule); + + // Global prefix — all routes under /api + app.setGlobalPrefix('api'); + + // Global validation pipe + app.useGlobalPipes( + new ValidationPipe({ + whitelist: true, + forbidNonWhitelisted: true, + transform: true, + transformOptions: { enableImplicitConversion: true }, + }), + ); + + // Global exception filter + app.useGlobalFilters(new HttpExceptionFilter()); + + // Global response transform + app.useGlobalInterceptors(new TransformInterceptor()); + + // CORS + app.enableCors({ + origin: process.env.FRONTEND_URL || 'http://localhost:5174', + credentials: true, + }); + + // Swagger + const swaggerConfig = new DocumentBuilder() + .setTitle('Corrosion API') + .setDescription('Corrosion Admin Panel — Game Server Management Platform') + .setVersion('1.0') + .addBearerAuth() + .build(); + const document = SwaggerModule.createDocument(app, swaggerConfig); + SwaggerModule.setup('api/docs', app, document); + + const port = process.env.API_PORT || 3000; + await app.listen(port); + console.log(`Corrosion API running on port ${port}`); +} +bootstrap(); diff --git a/backend-nest/src/modules/admin/admin.controller.ts b/backend-nest/src/modules/admin/admin.controller.ts new file mode 100644 index 0000000..3f05546 --- /dev/null +++ b/backend-nest/src/modules/admin/admin.controller.ts @@ -0,0 +1,81 @@ +import { Controller, Get, Post, Patch, Body, Param, Query, UseGuards } from '@nestjs/common'; +import { ApiTags, ApiBearerAuth, ApiOperation, ApiQuery, ApiParam } from '@nestjs/swagger'; +import { AdminService } from './admin.service'; +import { SuperAdminGuard } from '../../common/guards/super-admin.guard'; + +@ApiTags('admin') +@ApiBearerAuth() +@UseGuards(SuperAdminGuard) +@Controller('admin') +export class AdminController { + constructor(private readonly adminService: AdminService) {} + + @Get('stats') + @ApiOperation({ summary: 'Get platform statistics' }) + async getStats() { + return this.adminService.getStats(); + } + + @Get('licenses') + @ApiOperation({ summary: 'Get paginated list of licenses' }) + @ApiQuery({ name: 'page', required: false, type: Number }) + @ApiQuery({ name: 'limit', required: false, type: Number }) + @ApiQuery({ name: 'search', required: false, type: String }) + async getLicenses( + @Query('page') page?: string, + @Query('limit') limit?: string, + @Query('search') search?: string, + ) { + const p = page ? parseInt(page, 10) : 1; + const l = limit ? parseInt(limit, 10) : 25; + return this.adminService.getLicenses(p, l, search); + } + + @Get('licenses/:id') + @ApiOperation({ summary: 'Get license details by ID' }) + @ApiParam({ name: 'id', description: 'License ID' }) + async getLicenseById(@Param('id') id: string) { + return this.adminService.getLicenseById(id); + } + + @Post('licenses') + @ApiOperation({ summary: 'Create a new license' }) + async createLicense(@Body('email') email: string) { + return this.adminService.createLicense(email); + } + + @Get('users') + @ApiOperation({ summary: 'Get paginated list of users' }) + @ApiQuery({ name: 'page', required: false, type: Number }) + @ApiQuery({ name: 'limit', required: false, type: Number }) + async getUsers( + @Query('page') page?: string, + @Query('limit') limit?: string, + ) { + const p = page ? parseInt(page, 10) : 1; + const l = limit ? parseInt(limit, 10) : 25; + return this.adminService.getUsers(p, l); + } + + @Patch('users/:id') + @ApiOperation({ summary: 'Update user (admin only)' }) + @ApiParam({ name: 'id', description: 'User ID' }) + async updateUser( + @Param('id') userId: string, + @Body() data: { is_super_admin?: boolean; email_verified?: boolean }, + ) { + return this.adminService.updateUser(userId, data); + } + + @Get('subscriptions') + @ApiOperation({ summary: 'Get all webstore subscriptions' }) + async getSubscriptions() { + return this.adminService.getSubscriptions(); + } + + @Get('servers') + @ApiOperation({ summary: 'Get all server connections' }) + async getServers() { + return this.adminService.getServers(); + } +} diff --git a/backend-nest/src/modules/admin/admin.module.ts b/backend-nest/src/modules/admin/admin.module.ts new file mode 100644 index 0000000..1a8db3b --- /dev/null +++ b/backend-nest/src/modules/admin/admin.module.ts @@ -0,0 +1,23 @@ +import { Module } from '@nestjs/common'; +import { TypeOrmModule } from '@nestjs/typeorm'; +import { AdminController } from './admin.controller'; +import { AdminService } from './admin.service'; +import { User } from '../../entities/user.entity'; +import { License } from '../../entities/license.entity'; +import { ServerConnection } from '../../entities/server-connection.entity'; +import { WebstoreSubscription } from '../../entities/webstore-subscription.entity'; + +@Module({ + imports: [ + TypeOrmModule.forFeature([ + User, + License, + ServerConnection, + WebstoreSubscription, + ]), + ], + controllers: [AdminController], + providers: [AdminService], + exports: [AdminService], +}) +export class AdminModule {} diff --git a/backend-nest/src/modules/admin/admin.service.ts b/backend-nest/src/modules/admin/admin.service.ts new file mode 100644 index 0000000..f46f958 --- /dev/null +++ b/backend-nest/src/modules/admin/admin.service.ts @@ -0,0 +1,168 @@ +import { Injectable, BadRequestException } from '@nestjs/common'; +import { InjectRepository } from '@nestjs/typeorm'; +import { Repository, Like } from 'typeorm'; +import { User } from '../../entities/user.entity'; +import { License } from '../../entities/license.entity'; +import { ServerConnection } from '../../entities/server-connection.entity'; +import { WebstoreSubscription } from '../../entities/webstore-subscription.entity'; +import * as crypto from 'crypto'; +import * as argon2 from 'argon2'; + +@Injectable() +export class AdminService { + constructor( + @InjectRepository(User) + private readonly userRepo: Repository, + @InjectRepository(License) + private readonly licenseRepo: Repository, + @InjectRepository(ServerConnection) + private readonly serverConnectionRepo: Repository, + @InjectRepository(WebstoreSubscription) + private readonly webstoreSubRepo: Repository, + ) {} + + async getStats() { + const [totalUsers, totalLicenses, activeServers] = await Promise.all([ + this.userRepo.count(), + this.licenseRepo.count(), + this.serverConnectionRepo.count({ + where: { connection_status: 'connected' }, + }), + ]); + + return { + total_users: totalUsers, + total_licenses: totalLicenses, + active_servers: activeServers, + }; + } + + async getLicenses(page: number = 1, limit: number = 25, search?: string) { + const skip = (page - 1) * limit; + + const queryBuilder = this.licenseRepo + .createQueryBuilder('license') + .leftJoinAndSelect('license.owner', 'owner') + .orderBy('license.created_at', 'DESC') + .skip(skip) + .take(limit); + + if (search) { + queryBuilder.where( + '(license.license_key ILIKE :search OR license.server_name ILIKE :search OR license.subdomain ILIKE :search OR owner.email ILIKE :search)', + { search: `%${search}%` }, + ); + } + + const [licenses, total] = await queryBuilder.getManyAndCount(); + + return { + data: licenses, + pagination: { + page, + limit, + total, + total_pages: Math.ceil(total / limit), + }, + }; + } + + async getLicenseById(id: string) { + return this.licenseRepo.findOne({ + where: { id }, + relations: ['owner'], + }); + } + + async createLicense(email: string) { + // Find or create user + let user = await this.userRepo.findOne({ where: { email } }); + + if (!user) { + // Create new user with random password + const randomPassword = crypto.randomBytes(16).toString('hex'); + const passwordHash = await argon2.hash(randomPassword); + const username = email.split('@')[0] + '_' + Math.random().toString(36).substr(2, 5); + + user = this.userRepo.create({ + email, + username, + password_hash: passwordHash, + }); + await this.userRepo.save(user); + } + + // Create license + const licenseKey = crypto.randomBytes(32).toString('hex'); + const license = this.licenseRepo.create({ + license_key: licenseKey, + owner_user_id: user.id, + status: 'active', + }); + + return this.licenseRepo.save(license); + } + + async getUsers(page: number = 1, limit: number = 25) { + const skip = (page - 1) * limit; + + const [users, total] = await this.userRepo.findAndCount({ + order: { created_at: 'DESC' }, + skip, + take: limit, + }); + + return { + data: users.map(u => ({ + id: u.id, + email: u.email, + username: u.username, + is_super_admin: u.is_super_admin, + email_verified: u.email_verified, + totp_enabled: u.totp_enabled, + created_at: u.created_at, + last_login_at: u.last_login_at, + })), + pagination: { + page, + limit, + total, + total_pages: Math.ceil(total / limit), + }, + }; + } + + async updateUser(userId: string, data: Partial) { + const user = await this.userRepo.findOne({ where: { id: userId } }); + + if (!user) { + throw new BadRequestException('User not found'); + } + + // Only allow updating specific fields + if (typeof data.is_super_admin !== 'undefined') { + user.is_super_admin = data.is_super_admin; + } + if (typeof data.email_verified !== 'undefined') { + user.email_verified = data.email_verified; + } + + return this.userRepo.save(user); + } + + async getSubscriptions() { + return this.webstoreSubRepo.find({ + relations: ['license'], + order: { created_at: 'DESC' }, + }); + } + + async getServers() { + return this.serverConnectionRepo + .createQueryBuilder('conn') + .leftJoinAndSelect('conn.license', 'license') + .leftJoinAndSelect('license.owner', 'owner') + .orderBy('conn.created_at', 'DESC') + .getMany(); + } +} diff --git a/backend-nest/src/modules/alerts/alerts.controller.ts b/backend-nest/src/modules/alerts/alerts.controller.ts new file mode 100644 index 0000000..68b47e3 --- /dev/null +++ b/backend-nest/src/modules/alerts/alerts.controller.ts @@ -0,0 +1,38 @@ +import { Controller, Get, Put, Body, Query } from '@nestjs/common'; +import { ApiTags, ApiBearerAuth, ApiOperation, ApiQuery } from '@nestjs/swagger'; +import { AlertsService } from './alerts.service'; +import { UpdateAlertConfigDto } from './dto/update-alert-config.dto'; +import { CurrentTenant } from '../../common/decorators/current-tenant.decorator'; + +@ApiTags('alerts') +@ApiBearerAuth() +@Controller('alerts') +export class AlertsController { + constructor(private readonly alertsService: AlertsService) {} + + @Get('config') + @ApiOperation({ summary: 'Get alert configuration' }) + async getConfig(@CurrentTenant() licenseId: string) { + return this.alertsService.getConfig(licenseId); + } + + @Put('config') + @ApiOperation({ summary: 'Update alert configuration' }) + async updateConfig( + @CurrentTenant() licenseId: string, + @Body() dto: UpdateAlertConfigDto, + ) { + return this.alertsService.updateConfig(licenseId, dto); + } + + @Get('history') + @ApiOperation({ summary: 'Get alert history' }) + @ApiQuery({ name: 'limit', required: false, type: Number, description: 'Max records to return (default: 50)' }) + async getHistory( + @CurrentTenant() licenseId: string, + @Query('limit') limit?: string, + ) { + const limitNum = limit ? parseInt(limit, 10) : 50; + return this.alertsService.getHistory(licenseId, limitNum); + } +} diff --git a/backend-nest/src/modules/alerts/alerts.module.ts b/backend-nest/src/modules/alerts/alerts.module.ts new file mode 100644 index 0000000..a8b8051 --- /dev/null +++ b/backend-nest/src/modules/alerts/alerts.module.ts @@ -0,0 +1,14 @@ +import { Module } from '@nestjs/common'; +import { TypeOrmModule } from '@nestjs/typeorm'; +import { AlertsController } from './alerts.controller'; +import { AlertsService } from './alerts.service'; +import { AlertConfig } from '../../entities/alert-config.entity'; +import { AlertHistory } from '../../entities/alert-history.entity'; + +@Module({ + imports: [TypeOrmModule.forFeature([AlertConfig, AlertHistory])], + controllers: [AlertsController], + providers: [AlertsService], + exports: [AlertsService], +}) +export class AlertsModule {} diff --git a/backend-nest/src/modules/alerts/alerts.service.ts b/backend-nest/src/modules/alerts/alerts.service.ts new file mode 100644 index 0000000..7d74c2d --- /dev/null +++ b/backend-nest/src/modules/alerts/alerts.service.ts @@ -0,0 +1,65 @@ +import { Injectable } from '@nestjs/common'; +import { InjectRepository } from '@nestjs/typeorm'; +import { Repository } from 'typeorm'; +import { AlertConfig } from '../../entities/alert-config.entity'; +import { AlertHistory } from '../../entities/alert-history.entity'; +import { UpdateAlertConfigDto } from './dto/update-alert-config.dto'; + +@Injectable() +export class AlertsService { + constructor( + @InjectRepository(AlertConfig) + private readonly alertConfigRepo: Repository, + @InjectRepository(AlertHistory) + private readonly alertHistoryRepo: Repository, + ) {} + + async getConfig(licenseId: string): Promise { + let config = await this.alertConfigRepo.findOne({ + where: { license_id: licenseId }, + }); + + if (!config) { + // Create default config if not exists + config = this.alertConfigRepo.create({ + license_id: licenseId, + population_drop_enabled: true, + population_drop_threshold_percent: 30, + fps_degradation_enabled: true, + fps_threshold: 30, + notify_discord: true, + notify_pushbullet: false, + notify_email: false, + }); + await this.alertConfigRepo.save(config); + } + + return config; + } + + async updateConfig(licenseId: string, dto: UpdateAlertConfigDto): Promise { + let config = await this.alertConfigRepo.findOne({ + where: { license_id: licenseId }, + }); + + if (!config) { + config = this.alertConfigRepo.create({ + license_id: licenseId, + ...dto, + }); + } else { + Object.assign(config, dto); + config.updated_at = new Date(); + } + + return this.alertConfigRepo.save(config); + } + + async getHistory(licenseId: string, limit: number = 50): Promise { + return this.alertHistoryRepo.find({ + where: { license_id: licenseId }, + order: { triggered_at: 'DESC' }, + take: limit, + }); + } +} diff --git a/backend-nest/src/modules/alerts/dto/update-alert-config.dto.ts b/backend-nest/src/modules/alerts/dto/update-alert-config.dto.ts new file mode 100644 index 0000000..a2d8529 --- /dev/null +++ b/backend-nest/src/modules/alerts/dto/update-alert-config.dto.ts @@ -0,0 +1,42 @@ +import { IsBoolean, IsInt, IsOptional, Min, Max } from 'class-validator'; +import { ApiPropertyOptional } from '@nestjs/swagger'; + +export class UpdateAlertConfigDto { + @ApiPropertyOptional({ description: 'Enable population drop alerts' }) + @IsOptional() + @IsBoolean() + population_drop_enabled?: boolean; + + @ApiPropertyOptional({ description: 'Population drop threshold percentage' }) + @IsOptional() + @IsInt() + @Min(1) + @Max(100) + population_drop_threshold_percent?: number; + + @ApiPropertyOptional({ description: 'Enable FPS degradation alerts' }) + @IsOptional() + @IsBoolean() + fps_degradation_enabled?: boolean; + + @ApiPropertyOptional({ description: 'FPS threshold for alerts' }) + @IsOptional() + @IsInt() + @Min(1) + fps_threshold?: number; + + @ApiPropertyOptional({ description: 'Send alerts to Discord' }) + @IsOptional() + @IsBoolean() + notify_discord?: boolean; + + @ApiPropertyOptional({ description: 'Send alerts to Pushbullet' }) + @IsOptional() + @IsBoolean() + notify_pushbullet?: boolean; + + @ApiPropertyOptional({ description: 'Send alerts via email' }) + @IsOptional() + @IsBoolean() + notify_email?: boolean; +} diff --git a/backend-nest/src/modules/analytics/analytics.controller.ts b/backend-nest/src/modules/analytics/analytics.controller.ts new file mode 100644 index 0000000..d852140 --- /dev/null +++ b/backend-nest/src/modules/analytics/analytics.controller.ts @@ -0,0 +1,96 @@ +import { Controller, Get, Query, Header } from '@nestjs/common'; +import { ApiTags, ApiBearerAuth, ApiOperation, ApiQuery } from '@nestjs/swagger'; +import { AnalyticsService } from './analytics.service'; +import { CurrentTenant } from '../../common/decorators/current-tenant.decorator'; + +@ApiTags('analytics') +@ApiBearerAuth() +@Controller('analytics') +export class AnalyticsController { + constructor(private readonly analyticsService: AnalyticsService) {} + + @Get('summary') + @ApiOperation({ summary: 'Get analytics summary for time range' }) + @ApiQuery({ name: 'range', required: false, type: Number, description: 'Hours to analyze (default: 24)' }) + async getSummary( + @CurrentTenant() licenseId: string, + @Query('range') range?: string, + ) { + const rangeHours = parseInt(range || '24', 10); + return this.analyticsService.getSummary(licenseId, rangeHours); + } + + @Get('timeseries') + @ApiOperation({ summary: 'Get timeseries data for charts' }) + @ApiQuery({ name: 'range', required: false, type: Number }) + @ApiQuery({ name: 'granularity', required: false, enum: ['raw', 'hourly'] }) + async getTimeseries( + @CurrentTenant() licenseId: string, + @Query('range') range?: string, + @Query('granularity') granularity?: 'raw' | 'hourly', + ) { + const rangeHours = parseInt(range || '24', 10); + const gran = granularity || 'hourly'; + return this.analyticsService.getTimeseries(licenseId, rangeHours, gran); + } + + @Get('wipes/performance') + @ApiOperation({ summary: 'Get wipe performance metrics' }) + @ApiQuery({ name: 'range', required: false, type: Number, description: 'Hours (default: 720 = 30 days)' }) + async getWipePerformance( + @CurrentTenant() licenseId: string, + @Query('range') range?: string, + ) { + const rangeHours = parseInt(range || '720', 10); + return this.analyticsService.getWipePerformance(licenseId, rangeHours); + } + + @Get('maps') + @ApiOperation({ summary: 'Get map usage analytics' }) + @ApiQuery({ name: 'range', required: false, type: Number }) + async getMapAnalytics( + @CurrentTenant() licenseId: string, + @Query('range') range?: string, + ) { + const rangeHours = parseInt(range || '720', 10); + return this.analyticsService.getMapAnalytics(licenseId, rangeHours); + } + + @Get('players') + @ApiOperation({ summary: 'Get player analytics' }) + @ApiQuery({ name: 'range', required: false, type: Number }) + @ApiQuery({ name: 'metric', required: false, enum: ['sessions', 'retention'] }) + async getPlayerAnalytics( + @CurrentTenant() licenseId: string, + @Query('range') range?: string, + @Query('metric') metric?: 'sessions' | 'retention', + ) { + const rangeHours = parseInt(range || '720', 10); + const m = metric || 'sessions'; + return this.analyticsService.getPlayerAnalytics(licenseId, rangeHours, m); + } + + @Get('retention') + @ApiOperation({ summary: 'Get player retention across wipes' }) + @ApiQuery({ name: 'wipe_count', required: false, type: Number, description: 'Number of recent wipes (default: 5)' }) + async getRetention( + @CurrentTenant() licenseId: string, + @Query('wipe_count') wipeCount?: string, + ) { + const count = parseInt(wipeCount || '5', 10); + return this.analyticsService.getRetention(licenseId, count); + } + + @Get('export') + @ApiOperation({ summary: 'Export analytics data as CSV' }) + @ApiQuery({ name: 'range', required: false, type: Number }) + @Header('Content-Type', 'text/csv') + @Header('Content-Disposition', 'attachment; filename="analytics-export.csv"') + async exportData( + @CurrentTenant() licenseId: string, + @Query('range') range?: string, + ) { + const rangeHours = parseInt(range || '24', 10); + return this.analyticsService.exportData(licenseId, rangeHours); + } +} diff --git a/backend-nest/src/modules/analytics/analytics.module.ts b/backend-nest/src/modules/analytics/analytics.module.ts new file mode 100644 index 0000000..1766b4e --- /dev/null +++ b/backend-nest/src/modules/analytics/analytics.module.ts @@ -0,0 +1,25 @@ +import { Module } from '@nestjs/common'; +import { TypeOrmModule } from '@nestjs/typeorm'; +import { AnalyticsController } from './analytics.controller'; +import { AnalyticsService } from './analytics.service'; +import { ServerStatsHourly } from '../../entities/server-stats-hourly.entity'; +import { ServerStats } from '../../entities/server-stats.entity'; +import { WipeHistory } from '../../entities/wipe-history.entity'; +import { PlayerSession } from '../../entities/player-session.entity'; +import { MapLibrary } from '../../entities/map-library.entity'; + +@Module({ + imports: [ + TypeOrmModule.forFeature([ + ServerStatsHourly, + ServerStats, + WipeHistory, + PlayerSession, + MapLibrary, + ]), + ], + controllers: [AnalyticsController], + providers: [AnalyticsService], + exports: [AnalyticsService], +}) +export class AnalyticsModule {} diff --git a/backend-nest/src/modules/analytics/analytics.service.ts b/backend-nest/src/modules/analytics/analytics.service.ts new file mode 100644 index 0000000..1aa8efa --- /dev/null +++ b/backend-nest/src/modules/analytics/analytics.service.ts @@ -0,0 +1,214 @@ +import { Injectable } from '@nestjs/common'; +import { InjectRepository } from '@nestjs/typeorm'; +import { Repository, MoreThan } from 'typeorm'; +import { ServerStatsHourly } from '../../entities/server-stats-hourly.entity'; +import { ServerStats } from '../../entities/server-stats.entity'; +import { WipeHistory } from '../../entities/wipe-history.entity'; +import { PlayerSession } from '../../entities/player-session.entity'; +import { MapLibrary } from '../../entities/map-library.entity'; + +@Injectable() +export class AnalyticsService { + constructor( + @InjectRepository(ServerStatsHourly) + private readonly statsHourlyRepo: Repository, + @InjectRepository(ServerStats) + private readonly statsRepo: Repository, + @InjectRepository(WipeHistory) + private readonly wipeHistoryRepo: Repository, + @InjectRepository(PlayerSession) + private readonly playerSessionRepo: Repository, + @InjectRepository(MapLibrary) + private readonly mapLibraryRepo: Repository, + ) {} + + async getSummary(licenseId: string, rangeHours: number) { + const cutoff = new Date(Date.now() - rangeHours * 3600 * 1000); + + const stats = await this.statsHourlyRepo + .createQueryBuilder('stats') + .select('MAX(stats.max_players)', 'peak_players') + .addSelect('AVG(stats.avg_players)', 'avg_players') + .addSelect('AVG(stats.uptime_percentage)', 'uptime_percentage') + .where('stats.license_id = :licenseId', { licenseId }) + .andWhere('stats.hour >= :cutoff', { cutoff }) + .getRawOne(); + + return { + peak_players: stats?.peak_players || 0, + avg_players: parseFloat(stats?.avg_players || 0), + uptime_percentage: parseFloat(stats?.uptime_percentage || 0), + unique_players: null, // Not implemented yet + }; + } + + async getTimeseries(licenseId: string, rangeHours: number, granularity: 'raw' | 'hourly') { + const cutoff = new Date(Date.now() - rangeHours * 3600 * 1000); + + if (granularity === 'hourly') { + const data = await this.statsHourlyRepo.find({ + where: { license_id: licenseId, hour: MoreThan(cutoff) }, + order: { hour: 'ASC' }, + }); + + return { + timestamps: data.map(d => d.hour), + player_count: data.map(d => d.avg_players), + fps: data.map(d => d.avg_fps), + entity_count: data.map(d => d.avg_entities), + memory_usage_mb: data.map(() => null), // Not in schema + }; + } else { + const data = await this.statsRepo.find({ + where: { license_id: licenseId, recorded_at: MoreThan(cutoff) }, + order: { recorded_at: 'ASC' }, + }); + + return { + timestamps: data.map(d => d.recorded_at), + player_count: data.map(d => d.player_count), + fps: data.map(d => d.fps), + entity_count: data.map(d => d.entity_count), + memory_usage_mb: data.map(d => d.memory_usage_mb), + }; + } + } + + async getWipePerformance(licenseId: string, rangeHours: number) { + const cutoff = new Date(Date.now() - rangeHours * 3600 * 1000); + + const wipes = await this.wipeHistoryRepo.find({ + where: { + license_id: licenseId, + status: 'success', + started_at: MoreThan(cutoff), + }, + order: { started_at: 'DESC' }, + }); + + const durations = wipes + .filter(w => w.started_at && w.completed_at) + .map(w => (w.completed_at!.getTime() - w.started_at!.getTime()) / 1000); + + return { + total_wipes: wipes.length, + avg_duration_seconds: durations.length > 0 + ? durations.reduce((a, b) => a + b, 0) / durations.length + : 0, + min_duration_seconds: durations.length > 0 ? Math.min(...durations) : 0, + max_duration_seconds: durations.length > 0 ? Math.max(...durations) : 0, + wipe_types: wipes.reduce((acc, w) => { + acc[w.wipe_type] = (acc[w.wipe_type] || 0) + 1; + return acc; + }, {} as Record), + }; + } + + async getMapAnalytics(licenseId: string, rangeHours: number) { + const cutoff = new Date(Date.now() - rangeHours * 3600 * 1000); + + const mapUsage = await this.wipeHistoryRepo + .createQueryBuilder('wipe') + .leftJoinAndSelect('wipe.map', 'map') + .select('map.id', 'map_id') + .addSelect('map.name', 'map_name') + .addSelect('COUNT(wipe.id)', 'usage_count') + .where('wipe.license_id = :licenseId', { licenseId }) + .andWhere('wipe.started_at >= :cutoff', { cutoff }) + .andWhere('wipe.map_id IS NOT NULL') + .groupBy('map.id') + .addGroupBy('map.name') + .getRawMany(); + + return { + map_usage: mapUsage.map(m => ({ + map_id: m.map_id, + map_name: m.map_name, + usage_count: parseInt(m.usage_count), + })), + }; + } + + async getPlayerAnalytics(licenseId: string, rangeHours: number, metric: 'sessions' | 'retention') { + const cutoff = new Date(Date.now() - rangeHours * 3600 * 1000); + + if (metric === 'sessions') { + const sessions = await this.playerSessionRepo.find({ + where: { + license_id: licenseId, + session_start: MoreThan(cutoff), + }, + order: { session_start: 'DESC' }, + }); + + const totalDuration = sessions + .filter(s => s.duration_seconds) + .reduce((sum, s) => sum + (s.duration_seconds || 0), 0); + + return { + total_sessions: sessions.length, + avg_session_duration: sessions.length > 0 ? totalDuration / sessions.length : 0, + unique_players: new Set(sessions.map(s => s.steam_id)).size, + }; + } + + return { message: 'Retention metric not implemented' }; + } + + async getRetention(licenseId: string, wipeCount: number) { + const recentWipes = await this.wipeHistoryRepo.find({ + where: { license_id: licenseId, status: 'success' }, + order: { started_at: 'DESC' }, + take: wipeCount, + }); + + if (recentWipes.length === 0) { + return { wipe_count: 0, retention_data: [] }; + } + + const retentionData = await Promise.all( + recentWipes.map(async (wipe) => { + const wipeDate = wipe.started_at; + const nextWipe = recentWipes.find(w => w.started_at && wipeDate && w.started_at > wipeDate); + const endDate = nextWipe?.started_at || new Date(); + + const sessionsInPeriod = await this.playerSessionRepo.find({ + where: { + license_id: licenseId, + session_start: MoreThan(wipeDate!), + }, + }); + + const uniquePlayers = new Set(sessionsInPeriod.map(s => s.steam_id)).size; + + return { + wipe_date: wipeDate, + unique_players: uniquePlayers, + total_sessions: sessionsInPeriod.length, + }; + }), + ); + + return { + wipe_count: recentWipes.length, + retention_data: retentionData, + }; + } + + async exportData(licenseId: string, rangeHours: number): Promise { + const cutoff = new Date(Date.now() - rangeHours * 3600 * 1000); + + const stats = await this.statsRepo.find({ + where: { license_id: licenseId, recorded_at: MoreThan(cutoff) }, + order: { recorded_at: 'ASC' }, + }); + + // Generate CSV + const headers = 'timestamp,player_count,fps,entity_count,memory_mb\n'; + const rows = stats.map(s => + `${s.recorded_at.toISOString()},${s.player_count},${s.fps},${s.entity_count},${s.memory_usage_mb}` + ).join('\n'); + + return headers + rows; + } +} diff --git a/backend-nest/src/modules/chat/chat.controller.ts b/backend-nest/src/modules/chat/chat.controller.ts new file mode 100644 index 0000000..14981bc --- /dev/null +++ b/backend-nest/src/modules/chat/chat.controller.ts @@ -0,0 +1,40 @@ +import { Controller, Get, Put, Param, Body, Query, ParseIntPipe, UseGuards } from '@nestjs/common'; +import { ApiTags, ApiBearerAuth, ApiOperation, ApiQuery } from '@nestjs/swagger'; +import { ChatService } from './chat.service'; +import { FlagMessageDto } from './dto/flag-message.dto'; +import { CurrentTenant } from '../../common/decorators/current-tenant.decorator'; +import { CurrentUser } from '../../common/decorators/current-user.decorator'; +import { RequirePermission } from '../../common/decorators/require-permission.decorator'; +import { JwtAuthGuard } from '../../common/guards/jwt-auth.guard'; +import { PermissionsGuard } from '../../common/guards/permissions.guard'; + +@ApiTags('Chat') +@ApiBearerAuth() +@Controller('chat') +@UseGuards(JwtAuthGuard, PermissionsGuard) +export class ChatController { + constructor(private readonly chatService: ChatService) {} + + @Get() + @RequirePermission('chat.view') + @ApiOperation({ summary: 'Get recent chat messages' }) + @ApiQuery({ name: 'limit', required: false, example: 100 }) + async getMessages( + @CurrentTenant() licenseId: string, + @Query('limit', new ParseIntPipe({ optional: true })) limit?: number, + ) { + return await this.chatService.getMessages(licenseId, limit || 100); + } + + @Put(':id/flag') + @RequirePermission('chat.moderate') + @ApiOperation({ summary: 'Flag or unflag a chat message' }) + async flagMessage( + @CurrentTenant() licenseId: string, + @CurrentUser('sub') userId: string, + @Param('id') messageId: string, + @Body() dto: FlagMessageDto, + ) { + return await this.chatService.flagMessage(licenseId, messageId, userId, dto); + } +} diff --git a/backend-nest/src/modules/chat/chat.module.ts b/backend-nest/src/modules/chat/chat.module.ts new file mode 100644 index 0000000..96a7f24 --- /dev/null +++ b/backend-nest/src/modules/chat/chat.module.ts @@ -0,0 +1,13 @@ +import { Module } from '@nestjs/common'; +import { TypeOrmModule } from '@nestjs/typeorm'; +import { ChatController } from './chat.controller'; +import { ChatService } from './chat.service'; +import { ChatLog } from '../../entities/chat-log.entity'; + +@Module({ + imports: [TypeOrmModule.forFeature([ChatLog])], + controllers: [ChatController], + providers: [ChatService], + exports: [ChatService], +}) +export class ChatModule {} diff --git a/backend-nest/src/modules/chat/chat.service.ts b/backend-nest/src/modules/chat/chat.service.ts new file mode 100644 index 0000000..1c4d5fe --- /dev/null +++ b/backend-nest/src/modules/chat/chat.service.ts @@ -0,0 +1,51 @@ +import { Injectable, NotFoundException } from '@nestjs/common'; +import { InjectRepository } from '@nestjs/typeorm'; +import { Repository } from 'typeorm'; +import { ChatLog } from '../../entities/chat-log.entity'; +import { FlagMessageDto } from './dto/flag-message.dto'; + +@Injectable() +export class ChatService { + constructor( + @InjectRepository(ChatLog) + private readonly chatRepo: Repository, + ) {} + + /** + * Get recent chat messages for a license + */ + async getMessages(licenseId: string, limit: number = 100) { + const messages = await this.chatRepo.find({ + where: { license_id: licenseId }, + order: { created_at: 'DESC' }, + take: limit, + }); + + // Return in chronological order (oldest first for display) + return { messages: messages.reverse() }; + } + + /** + * Flag or unflag a chat message + */ + async flagMessage( + licenseId: string, + messageId: string, + userId: string, + dto: FlagMessageDto, + ) { + const message = await this.chatRepo.findOne({ + where: { id: messageId, license_id: licenseId }, + }); + + if (!message) { + throw new NotFoundException('Message not found'); + } + + message.flagged = dto.flagged; + message.flagged_by = dto.flagged ? userId : null; + message.flag_reason = dto.flagged ? (dto.flag_reason || null) : null; + + return await this.chatRepo.save(message); + } +} diff --git a/backend-nest/src/modules/chat/dto/flag-message.dto.ts b/backend-nest/src/modules/chat/dto/flag-message.dto.ts new file mode 100644 index 0000000..1ab23d3 --- /dev/null +++ b/backend-nest/src/modules/chat/dto/flag-message.dto.ts @@ -0,0 +1,13 @@ +import { IsBoolean, IsOptional, IsString } from 'class-validator'; +import { ApiProperty, ApiPropertyOptional } from '@nestjs/swagger'; + +export class FlagMessageDto { + @ApiProperty({ example: true, description: 'Whether to flag or unflag the message' }) + @IsBoolean() + flagged: boolean; + + @ApiPropertyOptional({ example: 'Inappropriate language', description: 'Reason for flagging' }) + @IsOptional() + @IsString() + flag_reason?: string; +} diff --git a/backend-nest/src/modules/console/console.gateway.ts b/backend-nest/src/modules/console/console.gateway.ts new file mode 100644 index 0000000..39932aa --- /dev/null +++ b/backend-nest/src/modules/console/console.gateway.ts @@ -0,0 +1,116 @@ +import { + WebSocketGateway, + WebSocketServer, + SubscribeMessage, + OnGatewayConnection, + OnGatewayDisconnect, + MessageBody, + ConnectedSocket, +} from '@nestjs/websockets'; +import { Server, Socket } from 'socket.io'; +import { Logger, UnauthorizedException } from '@nestjs/common'; +import { JwtService } from '@nestjs/jwt'; +import { NatsService } from '../../services/nats.service'; + +/** + * Console Gateway + * + * Provides real-time WebSocket connectivity for server console I/O. + * Clients connect with JWT token in query params, join a room by license_id, + * and can send/receive console commands and output. + */ +@WebSocketGateway({ namespace: '/ws', cors: true }) +export class ConsoleGateway implements OnGatewayConnection, OnGatewayDisconnect { + @WebSocketServer() + server: Server; + + private readonly logger = new Logger(ConsoleGateway.name); + + constructor( + private readonly jwtService: JwtService, + private readonly natsService: NatsService, + ) {} + + /** + * Handle client connection + * Extract JWT from query param, validate, and join room by license_id + */ + async handleConnection(client: Socket) { + try { + const token = client.handshake.query.token as string; + + if (!token) { + throw new UnauthorizedException('No token provided'); + } + + // Verify JWT + const payload = this.jwtService.verify(token); + const licenseId = payload.license_id; + + if (!licenseId) { + throw new UnauthorizedException('Invalid token: no license_id'); + } + + // Store license_id on socket for later use + client.data.licenseId = licenseId; + client.data.userId = payload.sub; + + // Join room specific to this license + await client.join(licenseId); + + this.logger.log(`Client ${client.id} connected to license ${licenseId}`); + } catch (error) { + const message = error instanceof Error ? error.message : 'Unknown error'; + this.logger.error(`Connection failed: ${message}`); + client.disconnect(); + } + } + + /** + * Handle client disconnection + */ + handleDisconnect(client: Socket) { + const licenseId = client.data.licenseId; + this.logger.log(`Client ${client.id} disconnected from license ${licenseId}`); + } + + /** + * Handle console input from client + * Forward the command to NATS for execution on the game server + */ + @SubscribeMessage('console_input') + async handleConsoleInput( + @ConnectedSocket() client: Socket, + @MessageBody() data: { command: string }, + ) { + const licenseId = client.data.licenseId; + + if (!data.command) { + return { error: 'Command is required' }; + } + + this.logger.debug(`Console input from ${licenseId}: ${data.command}`); + + // Forward to NATS + await this.natsService.sendServerCommand(licenseId, 'command', { + command: data.command, + }); + + return { success: true }; + } + + /** + * Send console output or event to all clients in a license room + */ + sendToLicense(licenseId: string, event: string, data: any) { + this.server.to(licenseId).emit(event, data); + } + + /** + * Broadcast console output to a specific license + * This method would be called by a NATS subscriber when output is received + */ + broadcastConsoleOutput(licenseId: string, output: string) { + this.sendToLicense(licenseId, 'console_output', { output }); + } +} diff --git a/backend-nest/src/modules/console/console.module.ts b/backend-nest/src/modules/console/console.module.ts new file mode 100644 index 0000000..f7030cb --- /dev/null +++ b/backend-nest/src/modules/console/console.module.ts @@ -0,0 +1,21 @@ +import { Module } from '@nestjs/common'; +import { JwtModule } from '@nestjs/jwt'; +import { ConfigModule, ConfigService } from '@nestjs/config'; +import { ConsoleGateway } from './console.gateway'; +import { NatsService } from '../../services/nats.service'; + +@Module({ + imports: [ + JwtModule.registerAsync({ + imports: [ConfigModule], + inject: [ConfigService], + useFactory: (config: ConfigService) => ({ + secret: config.get('JWT_SECRET') || 'dev-secret', + signOptions: { expiresIn: '24h' }, + }), + }), + ], + providers: [ConsoleGateway, NatsService], + exports: [ConsoleGateway], +}) +export class ConsoleModule {} diff --git a/backend-nest/src/modules/migration/migration.controller.ts b/backend-nest/src/modules/migration/migration.controller.ts new file mode 100644 index 0000000..57e10d7 --- /dev/null +++ b/backend-nest/src/modules/migration/migration.controller.ts @@ -0,0 +1,37 @@ +import { Controller, Get, Post, Body } from '@nestjs/common'; +import { ApiTags, ApiBearerAuth, ApiOperation } from '@nestjs/swagger'; +import { MigrationService } from './migration.service'; +import { CurrentTenant } from '../../common/decorators/current-tenant.decorator'; +import { CurrentUser } from '../../common/decorators/current-user.decorator'; + +@ApiTags('migration') +@ApiBearerAuth() +@Controller('migration') +export class MigrationController { + constructor(private readonly migrationService: MigrationService) {} + + @Post('export') + @ApiOperation({ summary: 'Export server configuration' }) + async exportConfig( + @CurrentTenant() licenseId: string, + @CurrentUser('sub') userId: string, + @Body('export_type') exportType?: string, + ) { + return this.migrationService.exportConfig(licenseId, userId, exportType || 'full'); + } + + @Get('exports') + @ApiOperation({ summary: 'Get export history' }) + async getExports(@CurrentTenant() licenseId: string) { + return this.migrationService.getExports(licenseId); + } + + @Post('import') + @ApiOperation({ summary: 'Import server configuration' }) + async importConfig( + @CurrentTenant() licenseId: string, + @Body() data: any, + ) { + return this.migrationService.importConfig(licenseId, data); + } +} diff --git a/backend-nest/src/modules/migration/migration.module.ts b/backend-nest/src/modules/migration/migration.module.ts new file mode 100644 index 0000000..c56958b --- /dev/null +++ b/backend-nest/src/modules/migration/migration.module.ts @@ -0,0 +1,13 @@ +import { Module } from '@nestjs/common'; +import { TypeOrmModule } from '@nestjs/typeorm'; +import { MigrationController } from './migration.controller'; +import { MigrationService } from './migration.service'; +import { MigrationExport } from '../../entities/migration-export.entity'; + +@Module({ + imports: [TypeOrmModule.forFeature([MigrationExport])], + controllers: [MigrationController], + providers: [MigrationService], + exports: [MigrationService], +}) +export class MigrationModule {} diff --git a/backend-nest/src/modules/migration/migration.service.ts b/backend-nest/src/modules/migration/migration.service.ts new file mode 100644 index 0000000..ad2e395 --- /dev/null +++ b/backend-nest/src/modules/migration/migration.service.ts @@ -0,0 +1,40 @@ +import { Injectable } from '@nestjs/common'; +import { InjectRepository } from '@nestjs/typeorm'; +import { Repository } from 'typeorm'; +import { MigrationExport } from '../../entities/migration-export.entity'; + +@Injectable() +export class MigrationService { + constructor( + @InjectRepository(MigrationExport) + private readonly exportRepo: Repository, + ) {} + + async exportConfig(licenseId: string, userId: string, exportType: string = 'full'): Promise { + const expiresAt = new Date(); + expiresAt.setDate(expiresAt.getDate() + 7); // 7 days expiry + + const exportRecord = this.exportRepo.create({ + license_id: licenseId, + export_type: exportType, + storage_path: `/exports/${licenseId}/${Date.now()}.json`, + file_size_bytes: 0, // Stub - would calculate after actual export + created_by: userId, + expires_at: expiresAt, + }); + + return this.exportRepo.save(exportRecord); + } + + async getExports(licenseId: string): Promise { + return this.exportRepo.find({ + where: { license_id: licenseId }, + order: { created_at: 'DESC' }, + }); + } + + async importConfig(licenseId: string, data: any): Promise<{ message: string }> { + // Stub implementation - would validate and import data in production + return { message: 'Import complete' }; + } +} diff --git a/backend-nest/src/modules/notifications/dto/update-config.dto.ts b/backend-nest/src/modules/notifications/dto/update-config.dto.ts new file mode 100644 index 0000000..204844b --- /dev/null +++ b/backend-nest/src/modules/notifications/dto/update-config.dto.ts @@ -0,0 +1,131 @@ +import { IsBoolean, IsString, IsOptional, IsUrl } from 'class-validator'; +import { ApiProperty } from '@nestjs/swagger'; + +export class UpdateConfigDto { + @ApiProperty({ + description: 'Enable Discord notifications', + example: true, + required: false, + }) + @IsBoolean() + @IsOptional() + discord_enabled?: boolean; + + @ApiProperty({ + description: 'Discord webhook URL', + example: 'https://discord.com/api/webhooks/...', + required: false, + }) + @IsUrl() + @IsString() + @IsOptional() + discord_webhook_url?: string; + + @ApiProperty({ + description: 'Enable email notifications', + example: true, + required: false, + }) + @IsBoolean() + @IsOptional() + email_enabled?: boolean; + + @ApiProperty({ + description: 'Email address for notifications', + example: 'admin@example.com', + required: false, + }) + @IsString() + @IsOptional() + email_address?: string; + + @ApiProperty({ + description: 'Enable Pushbullet notifications', + example: false, + required: false, + }) + @IsBoolean() + @IsOptional() + pushbullet_enabled?: boolean; + + @ApiProperty({ + description: 'Pushbullet API key', + example: 'o.xxxxxxxxxxxxx', + required: false, + }) + @IsString() + @IsOptional() + pushbullet_api_key?: string; + + @ApiProperty({ + description: 'Notify on server start', + example: true, + required: false, + }) + @IsBoolean() + @IsOptional() + notify_on_start?: boolean; + + @ApiProperty({ + description: 'Notify on server stop', + example: true, + required: false, + }) + @IsBoolean() + @IsOptional() + notify_on_stop?: boolean; + + @ApiProperty({ + description: 'Notify on server crash', + example: true, + required: false, + }) + @IsBoolean() + @IsOptional() + notify_on_crash?: boolean; + + @ApiProperty({ + description: 'Notify on wipe start', + example: true, + required: false, + }) + @IsBoolean() + @IsOptional() + notify_on_wipe_start?: boolean; + + @ApiProperty({ + description: 'Notify on wipe complete', + example: true, + required: false, + }) + @IsBoolean() + @IsOptional() + notify_on_wipe_complete?: boolean; + + @ApiProperty({ + description: 'Notify on wipe failure', + example: true, + required: false, + }) + @IsBoolean() + @IsOptional() + notify_on_wipe_failure?: boolean; + + @ApiProperty({ + description: 'Notify on player count threshold', + example: false, + required: false, + }) + @IsBoolean() + @IsOptional() + notify_on_player_threshold?: boolean; + + @ApiProperty({ + description: 'Player count threshold', + example: '100', + required: false, + }) + @IsString() + @IsOptional() + player_threshold?: string; +} diff --git a/backend-nest/src/modules/notifications/notifications.controller.ts b/backend-nest/src/modules/notifications/notifications.controller.ts new file mode 100644 index 0000000..5b0bf8d --- /dev/null +++ b/backend-nest/src/modules/notifications/notifications.controller.ts @@ -0,0 +1,48 @@ +import { Controller, Get, Put, Body, UseGuards } from '@nestjs/common'; +import { + ApiTags, + ApiBearerAuth, + ApiOperation, + ApiResponse, +} from '@nestjs/swagger'; +import { JwtAuthGuard } from '../../common/guards/jwt-auth.guard'; +import { CurrentTenant } from '../../common/decorators/current-tenant.decorator'; +import { NotificationsService } from './notifications.service'; +import { UpdateConfigDto } from './dto/update-config.dto'; + +@ApiTags('notifications') +@ApiBearerAuth() +@UseGuards(JwtAuthGuard) +@Controller('notifications') +export class NotificationsController { + constructor(private readonly notificationsService: NotificationsService) {} + + @Get('config') + @ApiOperation({ + summary: 'Get notification configuration', + description: 'Returns notification settings for this license', + }) + @ApiResponse({ + status: 200, + description: 'Notification config retrieved successfully', + }) + async getConfig(@CurrentTenant() licenseId: string) { + return await this.notificationsService.getConfig(licenseId); + } + + @Put('config') + @ApiOperation({ + summary: 'Update notification configuration', + description: 'Update notification settings for this license', + }) + @ApiResponse({ + status: 200, + description: 'Notification config updated successfully', + }) + async updateConfig( + @CurrentTenant() licenseId: string, + @Body() dto: UpdateConfigDto, + ) { + return await this.notificationsService.updateConfig(licenseId, dto); + } +} diff --git a/backend-nest/src/modules/notifications/notifications.module.ts b/backend-nest/src/modules/notifications/notifications.module.ts new file mode 100644 index 0000000..abe0454 --- /dev/null +++ b/backend-nest/src/modules/notifications/notifications.module.ts @@ -0,0 +1,13 @@ +import { Module } from '@nestjs/common'; +import { TypeOrmModule } from '@nestjs/typeorm'; +import { NotificationsController } from './notifications.controller'; +import { NotificationsService } from './notifications.service'; +import { NotificationsConfig } from '../../entities/notifications-config.entity'; + +@Module({ + imports: [TypeOrmModule.forFeature([NotificationsConfig])], + controllers: [NotificationsController], + providers: [NotificationsService], + exports: [NotificationsService], +}) +export class NotificationsModule {} diff --git a/backend-nest/src/modules/notifications/notifications.service.ts b/backend-nest/src/modules/notifications/notifications.service.ts new file mode 100644 index 0000000..31c46e7 --- /dev/null +++ b/backend-nest/src/modules/notifications/notifications.service.ts @@ -0,0 +1,57 @@ +import { Injectable } from '@nestjs/common'; +import { InjectRepository } from '@nestjs/typeorm'; +import { Repository } from 'typeorm'; +import { NotificationsConfig } from '../../entities/notifications-config.entity'; +import { UpdateConfigDto } from './dto/update-config.dto'; + +@Injectable() +export class NotificationsService { + constructor( + @InjectRepository(NotificationsConfig) + private configRepository: Repository, + ) {} + + async getConfig(licenseId: string): Promise { + let config = await this.configRepository.findOne({ + where: { license_id: licenseId }, + }); + + // Create default config if not exists + if (!config) { + config = this.configRepository.create({ + license_id: licenseId, + discord_enabled: false, + discord_webhook_url: null, + email_enabled: false, + email_address: null, + pushbullet_enabled: false, + pushbullet_api_key: null, + notify_on_start: true, + notify_on_stop: true, + notify_on_crash: true, + notify_on_wipe_start: true, + notify_on_wipe_complete: true, + notify_on_wipe_failure: true, + notify_on_player_threshold: false, + player_threshold: null, + }); + + config = await this.configRepository.save(config); + } + + return config; + } + + async updateConfig( + licenseId: string, + dto: UpdateConfigDto, + ): Promise { + // Ensure config exists first + let config = await this.getConfig(licenseId); + + // Update fields + Object.assign(config, dto); + + return await this.configRepository.save(config); + } +} diff --git a/backend-nest/src/modules/players/dto/player-action.dto.ts b/backend-nest/src/modules/players/dto/player-action.dto.ts new file mode 100644 index 0000000..11f9702 --- /dev/null +++ b/backend-nest/src/modules/players/dto/player-action.dto.ts @@ -0,0 +1,33 @@ +import { IsString, IsIn, IsOptional, IsInt } from 'class-validator'; +import { ApiProperty, ApiPropertyOptional } from '@nestjs/swagger'; + +export class PlayerActionDto { + @ApiProperty({ example: '76561198012345678', description: 'Steam ID' }) + @IsString() + steam_id: string; + + @ApiProperty({ example: 'PlayerName', description: 'Player display name' }) + @IsString() + player_name: string; + + @ApiProperty({ + example: 'kick', + description: 'Type of action', + enum: ['kick', 'ban', 'unban', 'warn', 'note'], + }) + @IsIn(['kick', 'ban', 'unban', 'warn', 'note']) + action_type: string; + + @ApiPropertyOptional({ example: 'Toxic behavior', description: 'Reason for action' }) + @IsOptional() + @IsString() + reason?: string; + + @ApiPropertyOptional({ + example: 1440, + description: 'Duration in minutes (for bans)', + }) + @IsOptional() + @IsInt() + duration_minutes?: number; +} diff --git a/backend-nest/src/modules/players/players.controller.ts b/backend-nest/src/modules/players/players.controller.ts new file mode 100644 index 0000000..4ee9b2d --- /dev/null +++ b/backend-nest/src/modules/players/players.controller.ts @@ -0,0 +1,35 @@ +import { Controller, Get, Post, Body, UseGuards } from '@nestjs/common'; +import { ApiTags, ApiBearerAuth, ApiOperation } from '@nestjs/swagger'; +import { PlayersService } from './players.service'; +import { PlayerActionDto } from './dto/player-action.dto'; +import { CurrentTenant } from '../../common/decorators/current-tenant.decorator'; +import { CurrentUser } from '../../common/decorators/current-user.decorator'; +import { RequirePermission } from '../../common/decorators/require-permission.decorator'; +import { JwtAuthGuard } from '../../common/guards/jwt-auth.guard'; +import { PermissionsGuard } from '../../common/guards/permissions.guard'; + +@ApiTags('Players') +@ApiBearerAuth() +@Controller('players') +@UseGuards(JwtAuthGuard, PermissionsGuard) +export class PlayersController { + constructor(private readonly playersService: PlayersService) {} + + @Get() + @RequirePermission('players.view') + @ApiOperation({ summary: 'Get recent players for this server' }) + async getPlayers(@CurrentTenant() licenseId: string) { + return await this.playersService.getPlayers(licenseId); + } + + @Post('action') + @RequirePermission('players.moderate') + @ApiOperation({ summary: 'Perform a moderation action on a player' }) + async performAction( + @CurrentTenant() licenseId: string, + @CurrentUser('sub') userId: string, + @Body() dto: PlayerActionDto, + ) { + return await this.playersService.performAction(licenseId, userId, dto); + } +} diff --git a/backend-nest/src/modules/players/players.module.ts b/backend-nest/src/modules/players/players.module.ts new file mode 100644 index 0000000..555bc53 --- /dev/null +++ b/backend-nest/src/modules/players/players.module.ts @@ -0,0 +1,14 @@ +import { Module } from '@nestjs/common'; +import { TypeOrmModule } from '@nestjs/typeorm'; +import { PlayersController } from './players.controller'; +import { PlayersService } from './players.service'; +import { PlayerAction } from '../../entities/player-action.entity'; +import { NatsService } from '../../services/nats.service'; + +@Module({ + imports: [TypeOrmModule.forFeature([PlayerAction])], + controllers: [PlayersController], + providers: [PlayersService, NatsService], + exports: [PlayersService], +}) +export class PlayersModule {} diff --git a/backend-nest/src/modules/players/players.service.ts b/backend-nest/src/modules/players/players.service.ts new file mode 100644 index 0000000..7aa9780 --- /dev/null +++ b/backend-nest/src/modules/players/players.service.ts @@ -0,0 +1,98 @@ +import { Injectable } from '@nestjs/common'; +import { InjectRepository } from '@nestjs/typeorm'; +import { Repository } from 'typeorm'; +import { PlayerAction } from '../../entities/player-action.entity'; +import { NatsService } from '../../services/nats.service'; +import { PlayerActionDto } from './dto/player-action.dto'; + +export interface Player { + steam_id: string; + player_name: string; + status: 'online' | 'offline' | 'banned'; + last_seen?: Date; + ban_expires?: Date | null; +} + +@Injectable() +export class PlayersService { + constructor( + @InjectRepository(PlayerAction) + private readonly actionRepo: Repository, + private readonly natsService: NatsService, + ) {} + + /** + * Get recent players for a license + * + * TODO: This needs a player_sessions table to track online/offline status. + * For now, we query player_actions to get a list of players who have had actions. + */ + async getPlayers(licenseId: string): Promise<{ players: Player[] }> { + const actions = await this.actionRepo + .createQueryBuilder('action') + .where('action.license_id = :licenseId', { licenseId }) + .orderBy('action.created_at', 'DESC') + .take(100) + .getMany(); + + // Group by steam_id to get unique players + const playerMap = new Map(); + + for (const action of actions) { + if (!playerMap.has(action.steam_id)) { + // Determine status based on latest action + let status: 'online' | 'offline' | 'banned' = 'offline'; + if (action.action_type === 'ban') { + status = 'banned'; + } + + playerMap.set(action.steam_id, { + steam_id: action.steam_id, + player_name: action.player_name, + status, + last_seen: action.created_at, + ban_expires: action.duration_minutes + ? new Date(action.created_at.getTime() + action.duration_minutes * 60000) + : null, + }); + } + } + + const players = Array.from(playerMap.values()); + + return { players }; + } + + /** + * Perform a moderation action on a player + */ + async performAction( + licenseId: string, + userId: string, + dto: PlayerActionDto, + ): Promise<{ success: boolean }> { + // Insert action record + const action = this.actionRepo.create({ + license_id: licenseId, + steam_id: dto.steam_id, + player_name: dto.player_name, + action_type: dto.action_type, + reason: dto.reason || null, + duration_minutes: dto.duration_minutes || null, + performed_by: userId, + }); + + await this.actionRepo.save(action); + + // For kick/ban, send NATS command to the server + if (dto.action_type === 'kick' || dto.action_type === 'ban') { + await this.natsService.sendServerCommand(licenseId, dto.action_type, { + steam_id: dto.steam_id, + reason: dto.reason, + duration_minutes: dto.duration_minutes, + }); + } + + return { success: true }; + } +} diff --git a/backend-nest/src/modules/plugins/dto/install-plugin.dto.ts b/backend-nest/src/modules/plugins/dto/install-plugin.dto.ts new file mode 100644 index 0000000..db12bfa --- /dev/null +++ b/backend-nest/src/modules/plugins/dto/install-plugin.dto.ts @@ -0,0 +1,20 @@ +import { IsString, IsOptional, IsEnum, MaxLength } from 'class-validator'; +import { ApiProperty, ApiPropertyOptional } from '@nestjs/swagger'; + +export class InstallPluginDto { + @ApiProperty({ example: 'Kits', maxLength: 255 }) + @IsString() + @MaxLength(255) + plugin_name: string; + + @ApiPropertyOptional({ example: 'kits', maxLength: 255 }) + @IsOptional() + @IsString() + @MaxLength(255) + umod_slug?: string; + + @ApiPropertyOptional({ example: 'umod', enum: ['umod', 'manual', 'corrosion_module'], default: 'manual' }) + @IsOptional() + @IsEnum(['umod', 'manual', 'corrosion_module']) + source?: 'umod' | 'manual' | 'corrosion_module'; +} diff --git a/backend-nest/src/modules/plugins/dto/search-umod.dto.ts b/backend-nest/src/modules/plugins/dto/search-umod.dto.ts new file mode 100644 index 0000000..a69ef51 --- /dev/null +++ b/backend-nest/src/modules/plugins/dto/search-umod.dto.ts @@ -0,0 +1,9 @@ +import { IsString, MinLength } from 'class-validator'; +import { ApiProperty } from '@nestjs/swagger'; + +export class SearchUmodDto { + @ApiProperty({ example: 'kits', minLength: 2 }) + @IsString() + @MinLength(2) + query: string; +} diff --git a/backend-nest/src/modules/plugins/dto/update-plugin-config.dto.ts b/backend-nest/src/modules/plugins/dto/update-plugin-config.dto.ts new file mode 100644 index 0000000..0ab26ef --- /dev/null +++ b/backend-nest/src/modules/plugins/dto/update-plugin-config.dto.ts @@ -0,0 +1,29 @@ +import { IsObject, IsBoolean, IsOptional } from 'class-validator'; +import { ApiPropertyOptional } from '@nestjs/swagger'; + +export class UpdatePluginConfigDto { + @ApiPropertyOptional({ example: { enabled: true, max_kits: 5 } }) + @IsOptional() + @IsObject() + config_json?: Record; + + @ApiPropertyOptional({ example: false, description: 'Wipe plugin data on map wipe' }) + @IsOptional() + @IsBoolean() + wipe_on_map?: boolean; + + @ApiPropertyOptional({ example: false, description: 'Wipe plugin data on blueprint wipe' }) + @IsOptional() + @IsBoolean() + wipe_on_bp?: boolean; + + @ApiPropertyOptional({ example: true, description: 'Wipe plugin data on full wipe' }) + @IsOptional() + @IsBoolean() + wipe_on_full?: boolean; + + @ApiPropertyOptional({ example: false, description: 'Never wipe this plugin data' }) + @IsOptional() + @IsBoolean() + never_wipe?: boolean; +} diff --git a/backend-nest/src/modules/plugins/plugins.controller.ts b/backend-nest/src/modules/plugins/plugins.controller.ts new file mode 100644 index 0000000..df05816 --- /dev/null +++ b/backend-nest/src/modules/plugins/plugins.controller.ts @@ -0,0 +1,65 @@ +import { Controller, Get, Post, Put, Delete, Body, Param, Query, UseGuards } from '@nestjs/common'; +import { ApiTags, ApiBearerAuth, ApiOperation, ApiQuery } from '@nestjs/swagger'; +import { PluginsService } from './plugins.service'; +import { InstallPluginDto } from './dto/install-plugin.dto'; +import { UpdatePluginConfigDto } from './dto/update-plugin-config.dto'; +import { CurrentTenant } from '../../common/decorators/current-tenant.decorator'; +import { RequirePermission } from '../../common/decorators/require-permission.decorator'; +import { JwtAuthGuard } from '../../common/guards/jwt-auth.guard'; +import { PermissionsGuard } from '../../common/guards/permissions.guard'; + +@ApiTags('plugins') +@ApiBearerAuth() +@Controller('plugins') +@UseGuards(JwtAuthGuard, PermissionsGuard) +export class PluginsController { + constructor(private readonly pluginsService: PluginsService) {} + + @Get() + @RequirePermission('plugin.view') + @ApiOperation({ summary: 'Get all installed plugins for tenant' }) + getPlugins(@CurrentTenant() licenseId: string) { + return this.pluginsService.getPlugins(licenseId); + } + + @Post('install') + @RequirePermission('plugin.manage') + @ApiOperation({ summary: 'Install new plugin' }) + installPlugin(@CurrentTenant() licenseId: string, @Body() dto: InstallPluginDto) { + return this.pluginsService.installPlugin(licenseId, dto); + } + + @Delete(':id') + @RequirePermission('plugin.manage') + @ApiOperation({ summary: 'Uninstall plugin' }) + async uninstallPlugin(@CurrentTenant() licenseId: string, @Param('id') pluginId: string) { + await this.pluginsService.uninstallPlugin(licenseId, pluginId); + return { deleted: true }; + } + + @Post(':id/reload') + @RequirePermission('plugin.manage') + @ApiOperation({ summary: 'Reload plugin on game server' }) + reloadPlugin(@CurrentTenant() licenseId: string, @Param('id') pluginId: string) { + return this.pluginsService.reloadPlugin(licenseId, pluginId); + } + + @Put(':id/config') + @RequirePermission('plugin.manage') + @ApiOperation({ summary: 'Update plugin configuration' }) + updateConfig( + @CurrentTenant() licenseId: string, + @Param('id') pluginId: string, + @Body() dto: UpdatePluginConfigDto, + ) { + return this.pluginsService.updateConfig(licenseId, pluginId, dto); + } + + @Get('search') + @RequirePermission('plugin.view') + @ApiOperation({ summary: 'Search uMod plugin directory' }) + @ApiQuery({ name: 'q', required: true, example: 'kits' }) + searchUmod(@Query('q') query: string) { + return this.pluginsService.searchUmod(query); + } +} diff --git a/backend-nest/src/modules/plugins/plugins.module.ts b/backend-nest/src/modules/plugins/plugins.module.ts new file mode 100644 index 0000000..fc7e2e9 --- /dev/null +++ b/backend-nest/src/modules/plugins/plugins.module.ts @@ -0,0 +1,13 @@ +import { Module } from '@nestjs/common'; +import { TypeOrmModule } from '@nestjs/typeorm'; +import { PluginsController } from './plugins.controller'; +import { PluginsService } from './plugins.service'; +import { PluginRegistry } from '../../entities/plugin-registry.entity'; + +@Module({ + imports: [TypeOrmModule.forFeature([PluginRegistry])], + controllers: [PluginsController], + providers: [PluginsService], + exports: [PluginsService], +}) +export class PluginsModule {} diff --git a/backend-nest/src/modules/plugins/plugins.service.ts b/backend-nest/src/modules/plugins/plugins.service.ts new file mode 100644 index 0000000..6251b09 --- /dev/null +++ b/backend-nest/src/modules/plugins/plugins.service.ts @@ -0,0 +1,98 @@ +import { Injectable, NotFoundException, ConflictException } from '@nestjs/common'; +import { InjectRepository } from '@nestjs/typeorm'; +import { Repository } from 'typeorm'; +import { PluginRegistry } from '../../entities/plugin-registry.entity'; +import { InstallPluginDto } from './dto/install-plugin.dto'; +import { UpdatePluginConfigDto } from './dto/update-plugin-config.dto'; + +@Injectable() +export class PluginsService { + constructor( + @InjectRepository(PluginRegistry) + private readonly pluginRegistryRepo: Repository, + ) {} + + async getPlugins(licenseId: string): Promise { + return this.pluginRegistryRepo.find({ + where: { license_id: licenseId }, + order: { installed_at: 'DESC' }, + }); + } + + async installPlugin(licenseId: string, dto: InstallPluginDto): Promise { + // Check if plugin already exists + const existing = await this.pluginRegistryRepo.findOne({ + where: { + license_id: licenseId, + plugin_name: dto.plugin_name, + }, + }); + + if (existing) { + throw new ConflictException(`Plugin ${dto.plugin_name} is already installed`); + } + + const plugin = this.pluginRegistryRepo.create({ + license_id: licenseId, + plugin_name: dto.plugin_name, + umod_slug: dto.umod_slug, + source: dto.source || 'manual', + is_installed: true, + is_loaded: false, + }); + + return this.pluginRegistryRepo.save(plugin); + } + + async uninstallPlugin(licenseId: string, pluginId: string): Promise { + const result = await this.pluginRegistryRepo.delete({ + id: pluginId, + license_id: licenseId, + }); + + if (result.affected === 0) { + throw new NotFoundException(`Plugin ${pluginId} not found`); + } + } + + async reloadPlugin( + licenseId: string, + pluginId: string, + ): Promise<{ reloaded: boolean; plugin_name: string }> { + const plugin = await this.pluginRegistryRepo.findOne({ + where: { id: pluginId, license_id: licenseId }, + }); + + if (!plugin) { + throw new NotFoundException(`Plugin ${pluginId} not found`); + } + + // Stub implementation - in production would trigger NATS command + // to reload plugin on game server + return { reloaded: true, plugin_name: plugin.plugin_name }; + } + + async updateConfig( + licenseId: string, + pluginId: string, + dto: UpdatePluginConfigDto, + ): Promise { + const plugin = await this.pluginRegistryRepo.findOne({ + where: { id: pluginId, license_id: licenseId }, + }); + + if (!plugin) { + throw new NotFoundException(`Plugin ${pluginId} not found`); + } + + Object.assign(plugin, dto); + plugin.updated_at = new Date(); + return this.pluginRegistryRepo.save(plugin); + } + + async searchUmod(query: string): Promise { + // Stub implementation - in production would proxy to uMod API + // or use cached plugin directory + return []; + } +} diff --git a/backend-nest/src/modules/schedules/dto/create-task.dto.ts b/backend-nest/src/modules/schedules/dto/create-task.dto.ts new file mode 100644 index 0000000..be42f4b --- /dev/null +++ b/backend-nest/src/modules/schedules/dto/create-task.dto.ts @@ -0,0 +1,54 @@ +import { IsString, IsEnum, IsOptional, IsObject, Matches } from 'class-validator'; +import { ApiProperty } from '@nestjs/swagger'; + +export enum TaskType { + RESTART = 'restart', + ANNOUNCEMENT = 'announcement', + COMMAND = 'command', + PLUGIN_RELOAD = 'plugin_reload', +} + +export class CreateTaskDto { + @ApiProperty({ + description: 'Type of scheduled task', + enum: TaskType, + example: 'restart', + }) + @IsEnum(TaskType) + task_type: TaskType; + + @ApiProperty({ + description: 'Name of the task', + example: 'Daily restart', + }) + @IsString() + task_name: string; + + @ApiProperty({ + description: 'Cron expression (e.g., "0 0 * * *" for daily at midnight)', + example: '0 0 * * *', + }) + @IsString() + @Matches(/^(\*|([0-5]?\d)) (\*|([01]?\d|2[0-3])) (\*|([01]?\d|2\d|3[01])) (\*|([0]?\d|1[0-2])) (\*|[0-6])$/, { + message: 'Invalid cron expression format', + }) + cron_expression: string; + + @ApiProperty({ + description: 'Timezone for the schedule (IANA timezone)', + example: 'America/New_York', + required: false, + }) + @IsString() + @IsOptional() + timezone?: string; + + @ApiProperty({ + description: 'Task-specific configuration object', + example: { message: 'Server restarting in 5 minutes', countdown: 300 }, + required: false, + }) + @IsObject() + @IsOptional() + task_config?: Record; +} diff --git a/backend-nest/src/modules/schedules/dto/update-task.dto.ts b/backend-nest/src/modules/schedules/dto/update-task.dto.ts new file mode 100644 index 0000000..3e714e3 --- /dev/null +++ b/backend-nest/src/modules/schedules/dto/update-task.dto.ts @@ -0,0 +1,4 @@ +import { PartialType } from '@nestjs/swagger'; +import { CreateTaskDto } from './create-task.dto'; + +export class UpdateTaskDto extends PartialType(CreateTaskDto) {} diff --git a/backend-nest/src/modules/schedules/schedules.controller.ts b/backend-nest/src/modules/schedules/schedules.controller.ts new file mode 100644 index 0000000..24dd447 --- /dev/null +++ b/backend-nest/src/modules/schedules/schedules.controller.ts @@ -0,0 +1,103 @@ +import { + Controller, + Get, + Post, + Put, + Delete, + Body, + Param, + UseGuards, +} from '@nestjs/common'; +import { + ApiTags, + ApiBearerAuth, + ApiOperation, + ApiResponse, +} from '@nestjs/swagger'; +import { JwtAuthGuard } from '../../common/guards/jwt-auth.guard'; +import { CurrentTenant } from '../../common/decorators/current-tenant.decorator'; +import { SchedulesService } from './schedules.service'; +import { CreateTaskDto } from './dto/create-task.dto'; +import { UpdateTaskDto } from './dto/update-task.dto'; + +@ApiTags('schedules') +@ApiBearerAuth() +@UseGuards(JwtAuthGuard) +@Controller('schedules') +export class SchedulesController { + constructor(private readonly schedulesService: SchedulesService) {} + + @Get('tasks') + @ApiOperation({ + summary: 'Get all scheduled tasks', + description: 'Returns all scheduled tasks for this license', + }) + @ApiResponse({ + status: 200, + description: 'Tasks retrieved successfully', + }) + async getTasks(@CurrentTenant() licenseId: string) { + return await this.schedulesService.getTasks(licenseId); + } + + @Post('tasks') + @ApiOperation({ + summary: 'Create a scheduled task', + description: 'Create a new scheduled task (restart, announcement, command, or plugin reload)', + }) + @ApiResponse({ + status: 201, + description: 'Task created successfully', + }) + @ApiResponse({ + status: 400, + description: 'Invalid cron expression', + }) + async createTask( + @CurrentTenant() licenseId: string, + @Body() dto: CreateTaskDto, + ) { + return await this.schedulesService.createTask(licenseId, dto); + } + + @Put('tasks/:id') + @ApiOperation({ + summary: 'Update a scheduled task', + description: 'Update task configuration, schedule, or settings', + }) + @ApiResponse({ + status: 200, + description: 'Task updated successfully', + }) + @ApiResponse({ + status: 404, + description: 'Task not found', + }) + async updateTask( + @CurrentTenant() licenseId: string, + @Param('id') taskId: string, + @Body() dto: UpdateTaskDto, + ) { + return await this.schedulesService.updateTask(licenseId, taskId, dto); + } + + @Delete('tasks/:id') + @ApiOperation({ + summary: 'Delete a scheduled task', + description: 'Remove a scheduled task and unregister from scheduler', + }) + @ApiResponse({ + status: 200, + description: 'Task deleted successfully', + }) + @ApiResponse({ + status: 404, + description: 'Task not found', + }) + async deleteTask( + @CurrentTenant() licenseId: string, + @Param('id') taskId: string, + ) { + return await this.schedulesService.deleteTask(licenseId, taskId); + } +} diff --git a/backend-nest/src/modules/schedules/schedules.module.ts b/backend-nest/src/modules/schedules/schedules.module.ts new file mode 100644 index 0000000..95fea3b --- /dev/null +++ b/backend-nest/src/modules/schedules/schedules.module.ts @@ -0,0 +1,13 @@ +import { Module } from '@nestjs/common'; +import { TypeOrmModule } from '@nestjs/typeorm'; +import { SchedulesController } from './schedules.controller'; +import { SchedulesService } from './schedules.service'; +import { ScheduledTask } from '../../entities/scheduled-task.entity'; + +@Module({ + imports: [TypeOrmModule.forFeature([ScheduledTask])], + controllers: [SchedulesController], + providers: [SchedulesService], + exports: [SchedulesService], +}) +export class SchedulesModule {} diff --git a/backend-nest/src/modules/schedules/schedules.service.ts b/backend-nest/src/modules/schedules/schedules.service.ts new file mode 100644 index 0000000..204da81 --- /dev/null +++ b/backend-nest/src/modules/schedules/schedules.service.ts @@ -0,0 +1,125 @@ +import { + Injectable, + NotFoundException, + BadRequestException, +} from '@nestjs/common'; +import { InjectRepository } from '@nestjs/typeorm'; +import { Repository } from 'typeorm'; +import { ScheduledTask } from '../../entities/scheduled-task.entity'; +import { CreateTaskDto } from './dto/create-task.dto'; +import { UpdateTaskDto } from './dto/update-task.dto'; + +@Injectable() +export class SchedulesService { + constructor( + @InjectRepository(ScheduledTask) + private taskRepository: Repository, + ) {} + + async getTasks(licenseId: string): Promise { + return await this.taskRepository.find({ + where: { license_id: licenseId }, + order: { created_at: 'DESC' }, + }); + } + + async createTask( + licenseId: string, + dto: CreateTaskDto, + ): Promise { + // Validate cron expression is parseable + // In production, you'd use a cron parser library to validate + // For now, we rely on the regex in the DTO + + // Set default timezone if not provided + const timezone = dto.timezone || 'UTC'; + + const task = this.taskRepository.create({ + license_id: licenseId, + task_type: dto.task_type, + task_name: dto.task_name, + cron_expression: dto.cron_expression, + timezone: timezone, + task_config: dto.task_config || {}, + is_enabled: true, + last_run: null, + next_run: null, // Would be calculated by scheduler + created_at: new Date(), + }); + + const saved = await this.taskRepository.save(task); + + // TODO: Register task with scheduler (tokio-cron-scheduler in Rust) + // This would send a NATS message to the scheduler service to register the task + + return saved; + } + + async updateTask( + licenseId: string, + taskId: string, + dto: UpdateTaskDto, + ): Promise { + const task = await this.taskRepository.findOne({ + where: { + id: taskId, + license_id: licenseId, + }, + }); + + if (!task) { + throw new NotFoundException(`Scheduled task ${taskId} not found`); + } + + // Update fields + Object.assign(task, dto); + + const updated = await this.taskRepository.save(task); + + // TODO: Update task registration with scheduler + // Send NATS message to update the task in tokio-cron-scheduler + + return updated; + } + + async deleteTask(licenseId: string, taskId: string) { + const task = await this.taskRepository.findOne({ + where: { + id: taskId, + license_id: licenseId, + }, + }); + + if (!task) { + throw new NotFoundException(`Scheduled task ${taskId} not found`); + } + + await this.taskRepository.delete(taskId); + + // TODO: Unregister task from scheduler + // Send NATS message to remove the task from tokio-cron-scheduler + + return { deleted: true }; + } + + async toggleTask(licenseId: string, taskId: string, enabled: boolean) { + const task = await this.taskRepository.findOne({ + where: { + id: taskId, + license_id: licenseId, + }, + }); + + if (!task) { + throw new NotFoundException(`Scheduled task ${taskId} not found`); + } + + task.is_enabled = enabled; + const updated = await this.taskRepository.save(task); + + // TODO: Enable/disable task in scheduler + // Send NATS message to pause or resume the task + + return updated; + } +} diff --git a/backend-nest/src/modules/servers/dto/send-command.dto.ts b/backend-nest/src/modules/servers/dto/send-command.dto.ts new file mode 100644 index 0000000..37da971 --- /dev/null +++ b/backend-nest/src/modules/servers/dto/send-command.dto.ts @@ -0,0 +1,12 @@ +import { IsString, IsNotEmpty } from 'class-validator'; +import { ApiProperty } from '@nestjs/swagger'; + +export class SendCommandDto { + @ApiProperty({ + example: 'say "Hello, players!"', + description: 'Console command to execute on the server', + }) + @IsString() + @IsNotEmpty() + command: string; +} diff --git a/backend-nest/src/modules/servers/dto/update-config.dto.ts b/backend-nest/src/modules/servers/dto/update-config.dto.ts new file mode 100644 index 0000000..e3bbf9e --- /dev/null +++ b/backend-nest/src/modules/servers/dto/update-config.dto.ts @@ -0,0 +1,56 @@ +import { IsOptional, IsString, IsInt, IsBoolean } from 'class-validator'; +import { ApiPropertyOptional } from '@nestjs/swagger'; + +export class UpdateServerConfigDto { + @ApiPropertyOptional({ example: 'My Rust Server', description: 'Server name' }) + @IsOptional() + @IsString() + server_name?: string; + + @ApiPropertyOptional({ example: 100, description: 'Maximum players' }) + @IsOptional() + @IsInt() + max_players?: number; + + @ApiPropertyOptional({ example: 4000, description: 'World size' }) + @IsOptional() + @IsInt() + world_size?: number; + + @ApiPropertyOptional({ example: 123456, description: 'Current world seed' }) + @IsOptional() + @IsInt() + current_seed?: number; + + @ApiPropertyOptional({ example: true, description: 'Enable auto-restart' }) + @IsOptional() + @IsBoolean() + auto_restart_enabled?: boolean; + + @ApiPropertyOptional({ example: '0 4 * * *', description: 'Auto-restart cron schedule' }) + @IsOptional() + @IsString() + auto_restart_cron?: string; + + @ApiPropertyOptional({ example: true, description: 'Enable crash recovery' }) + @IsOptional() + @IsBoolean() + crash_recovery_enabled?: boolean; + + @ApiPropertyOptional({ example: true, description: 'Eligible for force wipes' }) + @IsOptional() + @IsBoolean() + force_wipe_eligible?: boolean; + + @ApiPropertyOptional({ example: true, description: 'Auto-update on force wipe' }) + @IsOptional() + @IsBoolean() + auto_update_on_force_wipe?: boolean; + + @ApiPropertyOptional({ + example: { 'server.pve': 'true', 'server.radiation': 'false' }, + description: 'Server config overrides (key-value pairs)', + }) + @IsOptional() + config_overrides?: Record; +} diff --git a/backend-nest/src/modules/servers/servers.controller.ts b/backend-nest/src/modules/servers/servers.controller.ts new file mode 100644 index 0000000..0c1e0b3 --- /dev/null +++ b/backend-nest/src/modules/servers/servers.controller.ts @@ -0,0 +1,65 @@ +import { Controller, Get, Put, Post, Body, UseGuards } from '@nestjs/common'; +import { ApiTags, ApiBearerAuth, ApiOperation } from '@nestjs/swagger'; +import { ServersService } from './servers.service'; +import { UpdateServerConfigDto } from './dto/update-config.dto'; +import { SendCommandDto } from './dto/send-command.dto'; +import { CurrentTenant } from '../../common/decorators/current-tenant.decorator'; +import { RequirePermission } from '../../common/decorators/require-permission.decorator'; +import { JwtAuthGuard } from '../../common/guards/jwt-auth.guard'; +import { PermissionsGuard } from '../../common/guards/permissions.guard'; + +@ApiTags('Servers') +@ApiBearerAuth() +@Controller('servers') +@UseGuards(JwtAuthGuard, PermissionsGuard) +export class ServersController { + constructor(private readonly serversService: ServersService) {} + + @Get() + @RequirePermission('server.view') + @ApiOperation({ summary: 'Get server connection and config' }) + async getServer(@CurrentTenant() licenseId: string) { + return await this.serversService.getServer(licenseId); + } + + @Put('config') + @RequirePermission('server.manage') + @ApiOperation({ summary: 'Update server configuration' }) + async updateConfig( + @CurrentTenant() licenseId: string, + @Body() dto: UpdateServerConfigDto, + ) { + return await this.serversService.updateConfig(licenseId, dto); + } + + @Post('command') + @RequirePermission('server.console') + @ApiOperation({ summary: 'Send console command to server' }) + async sendCommand( + @CurrentTenant() licenseId: string, + @Body() dto: SendCommandDto, + ) { + return await this.serversService.sendCommand(licenseId, dto.command); + } + + @Post('start') + @RequirePermission('server.manage') + @ApiOperation({ summary: 'Start the server' }) + async startServer(@CurrentTenant() licenseId: string) { + return await this.serversService.startServer(licenseId); + } + + @Post('stop') + @RequirePermission('server.manage') + @ApiOperation({ summary: 'Stop the server' }) + async stopServer(@CurrentTenant() licenseId: string) { + return await this.serversService.stopServer(licenseId); + } + + @Post('restart') + @RequirePermission('server.manage') + @ApiOperation({ summary: 'Restart the server' }) + async restartServer(@CurrentTenant() licenseId: string) { + return await this.serversService.restartServer(licenseId); + } +} diff --git a/backend-nest/src/modules/servers/servers.module.ts b/backend-nest/src/modules/servers/servers.module.ts new file mode 100644 index 0000000..f77b925 --- /dev/null +++ b/backend-nest/src/modules/servers/servers.module.ts @@ -0,0 +1,15 @@ +import { Module } from '@nestjs/common'; +import { TypeOrmModule } from '@nestjs/typeorm'; +import { ServersController } from './servers.controller'; +import { ServersService } from './servers.service'; +import { ServerConnection } from '../../entities/server-connection.entity'; +import { ServerConfig } from '../../entities/server-config.entity'; +import { NatsService } from '../../services/nats.service'; + +@Module({ + imports: [TypeOrmModule.forFeature([ServerConnection, ServerConfig])], + controllers: [ServersController], + providers: [ServersService, NatsService], + exports: [ServersService], +}) +export class ServersModule {} diff --git a/backend-nest/src/modules/servers/servers.service.ts b/backend-nest/src/modules/servers/servers.service.ts new file mode 100644 index 0000000..d850eda --- /dev/null +++ b/backend-nest/src/modules/servers/servers.service.ts @@ -0,0 +1,88 @@ +import { Injectable, NotFoundException } from '@nestjs/common'; +import { InjectRepository } from '@nestjs/typeorm'; +import { Repository } from 'typeorm'; +import { ServerConnection } from '../../entities/server-connection.entity'; +import { ServerConfig } from '../../entities/server-config.entity'; +import { NatsService } from '../../services/nats.service'; +import { UpdateServerConfigDto } from './dto/update-config.dto'; + +@Injectable() +export class ServersService { + constructor( + @InjectRepository(ServerConnection) + private readonly connectionRepo: Repository, + @InjectRepository(ServerConfig) + private readonly configRepo: Repository, + private readonly natsService: NatsService, + ) {} + + /** + * Get server connection and config for a license + */ + async getServer(licenseId: string) { + const connection = await this.connectionRepo.findOne({ + where: { license_id: licenseId }, + }); + + const config = await this.configRepo.findOne({ + where: { license_id: licenseId }, + }); + + if (!connection || !config) { + throw new NotFoundException('Server not found for this license'); + } + + return { connection, config }; + } + + /** + * Update server configuration + */ + async updateConfig(licenseId: string, dto: UpdateServerConfigDto) { + const config = await this.configRepo.findOne({ + where: { license_id: licenseId }, + }); + + if (!config) { + throw new NotFoundException('Server config not found'); + } + + // Apply updates + Object.assign(config, dto); + config.updated_at = new Date(); + + return await this.configRepo.save(config); + } + + /** + * Send a console command to the server via NATS + */ + async sendCommand(licenseId: string, command: string) { + await this.natsService.sendServerCommand(licenseId, 'command', { command }); + return { output: 'Command sent' }; + } + + /** + * Start the server via NATS + */ + async startServer(licenseId: string) { + await this.natsService.sendServerCommand(licenseId, 'start'); + return { message: 'Start command sent' }; + } + + /** + * Stop the server via NATS + */ + async stopServer(licenseId: string) { + await this.natsService.sendServerCommand(licenseId, 'stop'); + return { message: 'Stop command sent' }; + } + + /** + * Restart the server via NATS + */ + async restartServer(licenseId: string) { + await this.natsService.sendServerCommand(licenseId, 'restart'); + return { message: 'Restart command sent' }; + } +} diff --git a/backend-nest/src/modules/settings/dto/update-domain.dto.ts b/backend-nest/src/modules/settings/dto/update-domain.dto.ts new file mode 100644 index 0000000..3d1ccda --- /dev/null +++ b/backend-nest/src/modules/settings/dto/update-domain.dto.ts @@ -0,0 +1,25 @@ +import { IsString, IsOptional, Matches } from 'class-validator'; +import { ApiProperty } from '@nestjs/swagger'; + +export class UpdateDomainDto { + @ApiProperty({ + description: 'Subdomain (alphanumeric and hyphens only)', + example: 'myserver', + required: false, + }) + @IsString() + @IsOptional() + @Matches(/^[a-z0-9-]+$/, { + message: 'Subdomain can only contain lowercase letters, numbers, and hyphens', + }) + subdomain?: string; + + @ApiProperty({ + description: 'Custom domain', + example: 'play.myserver.com', + required: false, + }) + @IsString() + @IsOptional() + custom_domain?: string; +} diff --git a/backend-nest/src/modules/settings/dto/update-public-site.dto.ts b/backend-nest/src/modules/settings/dto/update-public-site.dto.ts new file mode 100644 index 0000000..6ff628f --- /dev/null +++ b/backend-nest/src/modules/settings/dto/update-public-site.dto.ts @@ -0,0 +1,122 @@ +import { IsBoolean, IsString, IsUrl, IsOptional, IsObject } from 'class-validator'; +import { ApiProperty } from '@nestjs/swagger'; + +export class UpdatePublicSiteDto { + @ApiProperty({ + description: 'Enable public site', + example: true, + required: false, + }) + @IsBoolean() + @IsOptional() + site_enabled?: boolean; + + @ApiProperty({ + description: 'Show server on status page', + example: true, + required: false, + }) + @IsBoolean() + @IsOptional() + show_on_status_page?: boolean; + + @ApiProperty({ + description: 'Steam connect URL', + example: 'steam://connect/123.456.789.0:28015', + required: false, + }) + @IsString() + @IsOptional() + steam_connect_url?: string; + + @ApiProperty({ + description: 'Message of the day', + example: 'Welcome to our server!', + required: false, + }) + @IsString() + @IsOptional() + motd?: string; + + @ApiProperty({ + description: 'Public mods list', + example: ['Plugin1', 'Plugin2'], + required: false, + }) + @IsOptional() + public_mods?: string[]; + + @ApiProperty({ + description: 'Header image URL', + example: 'https://example.com/header.jpg', + required: false, + }) + @IsUrl() + @IsString() + @IsOptional() + header_image_url?: string; + + @ApiProperty({ + description: 'Theme color (hex)', + example: '#1a1a1a', + required: false, + }) + @IsString() + @IsOptional() + theme_color?: string; + + @ApiProperty({ + description: 'Discord invite URL', + example: 'https://discord.gg/xxxxx', + required: false, + }) + @IsUrl() + @IsString() + @IsOptional() + discord_invite_url?: string; + + @ApiProperty({ + description: 'Show player count on public site', + example: true, + required: false, + }) + @IsBoolean() + @IsOptional() + show_player_count?: boolean; + + @ApiProperty({ + description: 'Show wipe schedule on public site', + example: true, + required: false, + }) + @IsBoolean() + @IsOptional() + show_wipe_schedule?: boolean; + + @ApiProperty({ + description: 'Show wipe countdown on public site', + example: true, + required: false, + }) + @IsBoolean() + @IsOptional() + show_wipe_countdown?: boolean; + + @ApiProperty({ + description: 'Show mod list on public site', + example: true, + required: false, + }) + @IsBoolean() + @IsOptional() + show_mod_list?: boolean; + + @ApiProperty({ + description: 'Status page description', + example: 'A friendly Rust server for all skill levels', + required: false, + }) + @IsString() + @IsOptional() + status_page_description?: string; +} diff --git a/backend-nest/src/modules/settings/settings.controller.ts b/backend-nest/src/modules/settings/settings.controller.ts new file mode 100644 index 0000000..24fd208 --- /dev/null +++ b/backend-nest/src/modules/settings/settings.controller.ts @@ -0,0 +1,73 @@ +import { Controller, Get, Put, Body, UseGuards } from '@nestjs/common'; +import { + ApiTags, + ApiBearerAuth, + ApiOperation, + ApiResponse, +} from '@nestjs/swagger'; +import { JwtAuthGuard } from '../../common/guards/jwt-auth.guard'; +import { CurrentTenant } from '../../common/decorators/current-tenant.decorator'; +import { SettingsService } from './settings.service'; +import { UpdatePublicSiteDto } from './dto/update-public-site.dto'; +import { UpdateDomainDto } from './dto/update-domain.dto'; + +@ApiTags('settings') +@ApiBearerAuth() +@UseGuards(JwtAuthGuard) +@Controller('settings') +export class SettingsController { + constructor(private readonly settingsService: SettingsService) {} + + @Get('public-site') + @ApiOperation({ + summary: 'Get public site configuration', + description: 'Returns public site settings for this license', + }) + @ApiResponse({ + status: 200, + description: 'Public site config retrieved successfully', + }) + async getPublicSite(@CurrentTenant() licenseId: string) { + return await this.settingsService.getPublicSite(licenseId); + } + + @Put('public-site') + @ApiOperation({ + summary: 'Update public site configuration', + description: 'Update public site settings for this license', + }) + @ApiResponse({ + status: 200, + description: 'Public site config updated successfully', + }) + async updatePublicSite( + @CurrentTenant() licenseId: string, + @Body() dto: UpdatePublicSiteDto, + ) { + return await this.settingsService.updatePublicSite(licenseId, dto); + } + + @Put('domain') + @ApiOperation({ + summary: 'Update domain settings', + description: 'Update subdomain or custom domain for this license', + }) + @ApiResponse({ + status: 200, + description: 'Domain settings updated successfully', + }) + @ApiResponse({ + status: 400, + description: 'Invalid domain format', + }) + @ApiResponse({ + status: 409, + description: 'Subdomain already taken', + }) + async updateDomain( + @CurrentTenant() licenseId: string, + @Body() dto: UpdateDomainDto, + ) { + return await this.settingsService.updateDomain(licenseId, dto); + } +} diff --git a/backend-nest/src/modules/settings/settings.module.ts b/backend-nest/src/modules/settings/settings.module.ts new file mode 100644 index 0000000..ec853d1 --- /dev/null +++ b/backend-nest/src/modules/settings/settings.module.ts @@ -0,0 +1,14 @@ +import { Module } from '@nestjs/common'; +import { TypeOrmModule } from '@nestjs/typeorm'; +import { SettingsController } from './settings.controller'; +import { SettingsService } from './settings.service'; +import { PublicSiteConfig } from '../../entities/public-site-config.entity'; +import { License } from '../../entities/license.entity'; + +@Module({ + imports: [TypeOrmModule.forFeature([PublicSiteConfig, License])], + controllers: [SettingsController], + providers: [SettingsService], + exports: [SettingsService], +}) +export class SettingsModule {} diff --git a/backend-nest/src/modules/settings/settings.service.ts b/backend-nest/src/modules/settings/settings.service.ts new file mode 100644 index 0000000..d457e56 --- /dev/null +++ b/backend-nest/src/modules/settings/settings.service.ts @@ -0,0 +1,145 @@ +import { + Injectable, + NotFoundException, + BadRequestException, + ConflictException, +} from '@nestjs/common'; +import { InjectRepository } from '@nestjs/typeorm'; +import { Repository } from 'typeorm'; +import { PublicSiteConfig } from '../../entities/public-site-config.entity'; +import { License } from '../../entities/license.entity'; +import { UpdatePublicSiteDto } from './dto/update-public-site.dto'; +import { UpdateDomainDto } from './dto/update-domain.dto'; + +@Injectable() +export class SettingsService { + constructor( + @InjectRepository(PublicSiteConfig) + private publicSiteConfigRepository: Repository, + @InjectRepository(License) + private licenseRepository: Repository, + ) {} + + async getPublicSite(licenseId: string): Promise { + let config = await this.publicSiteConfigRepository.findOne({ + where: { license_id: licenseId }, + }); + + // Create default config if not exists + if (!config) { + config = this.publicSiteConfigRepository.create({ + license_id: licenseId, + site_enabled: false, + show_on_status_page: false, + steam_connect_url: null, + motd: null, + public_mods: [], + header_image_url: null, + theme_color: '#1a1a1a', + discord_invite_url: null, + show_player_count: true, + show_wipe_schedule: true, + show_wipe_countdown: true, + show_mod_list: true, + status_page_description: null, + }); + + config = await this.publicSiteConfigRepository.save(config); + } + + return config; + } + + async updatePublicSite( + licenseId: string, + dto: UpdatePublicSiteDto, + ): Promise { + // Ensure config exists first + let config = await this.getPublicSite(licenseId); + + // Update fields + Object.assign(config, dto); + + return await this.publicSiteConfigRepository.save(config); + } + + async updateDomain(licenseId: string, dto: UpdateDomainDto) { + const license = await this.licenseRepository.findOne({ + where: { id: licenseId }, + }); + + if (!license) { + throw new NotFoundException(`License ${licenseId} not found`); + } + + // Check if subdomain is already taken (if changing subdomain) + if (dto.subdomain && dto.subdomain !== license.subdomain) { + const existingSubdomain = await this.licenseRepository.findOne({ + where: { subdomain: dto.subdomain }, + }); + + if (existingSubdomain) { + throw new ConflictException( + `Subdomain "${dto.subdomain}" is already taken`, + ); + } + + // Validate subdomain format + if (dto.subdomain.length < 3 || dto.subdomain.length > 63) { + throw new BadRequestException( + 'Subdomain must be between 3 and 63 characters', + ); + } + + if (dto.subdomain.startsWith('-') || dto.subdomain.endsWith('-')) { + throw new BadRequestException( + 'Subdomain cannot start or end with a hyphen', + ); + } + + // TODO: Stub Cloudflare DNS provisioning + // In production, this would: + // 1. Create DNS CNAME record: {subdomain}.corrosionmgmt.com → panel.corrosionmgmt.com + // 2. Wait for DNS propagation + // 3. Verify SSL certificate provisioning + // For now, we just update the database + license.subdomain = dto.subdomain; + } + + // Update custom domain if provided + if (dto.custom_domain !== undefined) { + if (dto.custom_domain && dto.custom_domain !== license.custom_domain) { + // Validate domain format (basic check) + const domainRegex = /^([a-z0-9-]+\.)+[a-z]{2,}$/i; + if (!domainRegex.test(dto.custom_domain)) { + throw new BadRequestException('Invalid custom domain format'); + } + + // TODO: Stub Cloudflare DNS verification + // In production, this would: + // 1. Instruct user to create CNAME pointing to panel.corrosionmgmt.com + // 2. Verify DNS record exists + // 3. Provision SSL certificate via Cloudflare + // 4. Mark domain as verified + // For now, we just update the database + license.custom_domain = dto.custom_domain; + } else if (dto.custom_domain === null || dto.custom_domain === '') { + // Allow clearing custom domain + license.custom_domain = null; + } + } + + const updated = await this.licenseRepository.save(license); + + return { + subdomain: updated.subdomain, + custom_domain: updated.custom_domain, + subdomain_url: updated.subdomain + ? `https://${updated.subdomain}.corrosionmgmt.com` + : null, + custom_domain_url: updated.custom_domain + ? `https://${updated.custom_domain}` + : null, + }; + } +} diff --git a/backend-nest/src/modules/setup/dto/setup-server.dto.ts b/backend-nest/src/modules/setup/dto/setup-server.dto.ts new file mode 100644 index 0000000..027dd49 --- /dev/null +++ b/backend-nest/src/modules/setup/dto/setup-server.dto.ts @@ -0,0 +1,39 @@ +import { IsString, IsOptional, IsInt, IsIn, ValidateIf } from 'class-validator'; +import { ApiProperty, ApiPropertyOptional } from '@nestjs/swagger'; + +export class SetupServerDto { + @ApiProperty({ description: 'Connection type', enum: ['amp', 'pterodactyl', 'bare_metal'] }) + @IsString() + @IsIn(['amp', 'pterodactyl', 'bare_metal']) + connection_type: 'amp' | 'pterodactyl' | 'bare_metal'; + + @ApiPropertyOptional({ description: 'Server IP address' }) + @IsOptional() + @IsString() + server_ip?: string; + + @ApiPropertyOptional({ description: 'Server RCON port' }) + @IsOptional() + @IsInt() + server_port?: number; + + @ApiPropertyOptional({ description: 'Game port (players connect to)' }) + @IsOptional() + @IsInt() + game_port?: number; + + @ApiPropertyOptional({ description: 'Panel API endpoint (for AMP/Pterodactyl)' }) + @ValidateIf(o => o.connection_type === 'amp' || o.connection_type === 'pterodactyl') + @IsString() + panel_api_endpoint?: string; + + @ApiPropertyOptional({ description: 'Panel API key (for AMP/Pterodactyl)' }) + @ValidateIf(o => o.connection_type === 'amp' || o.connection_type === 'pterodactyl') + @IsString() + panel_api_key?: string; + + @ApiPropertyOptional({ description: 'Panel server identifier (for AMP/Pterodactyl)' }) + @ValidateIf(o => o.connection_type === 'amp' || o.connection_type === 'pterodactyl') + @IsString() + panel_server_identifier?: string; +} diff --git a/backend-nest/src/modules/setup/setup.controller.ts b/backend-nest/src/modules/setup/setup.controller.ts new file mode 100644 index 0000000..dee292e --- /dev/null +++ b/backend-nest/src/modules/setup/setup.controller.ts @@ -0,0 +1,27 @@ +import { Controller, Post, Body } from '@nestjs/common'; +import { ApiTags, ApiBearerAuth, ApiOperation } from '@nestjs/swagger'; +import { SetupService } from './setup.service'; +import { SetupServerDto } from './dto/setup-server.dto'; +import { CurrentTenant } from '../../common/decorators/current-tenant.decorator'; + +@ApiTags('setup') +@ApiBearerAuth() +@Controller('setup') +export class SetupController { + constructor(private readonly setupService: SetupService) {} + + @Post('server') + @ApiOperation({ summary: 'Configure server connection during setup' }) + async setupServer( + @CurrentTenant() licenseId: string, + @Body() dto: SetupServerDto, + ) { + return this.setupService.setupServer(licenseId, dto); + } + + @Post('complete') + @ApiOperation({ summary: 'Mark setup as complete' }) + async completeSetup(@CurrentTenant() licenseId: string) { + return this.setupService.completeSetup(licenseId); + } +} diff --git a/backend-nest/src/modules/setup/setup.module.ts b/backend-nest/src/modules/setup/setup.module.ts new file mode 100644 index 0000000..e5aaf15 --- /dev/null +++ b/backend-nest/src/modules/setup/setup.module.ts @@ -0,0 +1,25 @@ +import { Module } from '@nestjs/common'; +import { TypeOrmModule } from '@nestjs/typeorm'; +import { SetupController } from './setup.controller'; +import { SetupService } from './setup.service'; +import { ServerConnection } from '../../entities/server-connection.entity'; +import { ServerConfig } from '../../entities/server-config.entity'; +import { NotificationsConfig } from '../../entities/notifications-config.entity'; +import { PublicSiteConfig } from '../../entities/public-site-config.entity'; +import { AlertConfig } from '../../entities/alert-config.entity'; + +@Module({ + imports: [ + TypeOrmModule.forFeature([ + ServerConnection, + ServerConfig, + NotificationsConfig, + PublicSiteConfig, + AlertConfig, + ]), + ], + controllers: [SetupController], + providers: [SetupService], + exports: [SetupService], +}) +export class SetupModule {} diff --git a/backend-nest/src/modules/setup/setup.service.ts b/backend-nest/src/modules/setup/setup.service.ts new file mode 100644 index 0000000..e5be423 --- /dev/null +++ b/backend-nest/src/modules/setup/setup.service.ts @@ -0,0 +1,135 @@ +import { Injectable } from '@nestjs/common'; +import { InjectRepository } from '@nestjs/typeorm'; +import { Repository } from 'typeorm'; +import { ServerConnection } from '../../entities/server-connection.entity'; +import { ServerConfig } from '../../entities/server-config.entity'; +import { NotificationsConfig } from '../../entities/notifications-config.entity'; +import { PublicSiteConfig } from '../../entities/public-site-config.entity'; +import { AlertConfig } from '../../entities/alert-config.entity'; +import { SetupServerDto } from './dto/setup-server.dto'; +import * as crypto from 'crypto'; + +@Injectable() +export class SetupService { + constructor( + @InjectRepository(ServerConnection) + private readonly connectionRepo: Repository, + @InjectRepository(ServerConfig) + private readonly configRepo: Repository, + @InjectRepository(NotificationsConfig) + private readonly notifConfigRepo: Repository, + @InjectRepository(PublicSiteConfig) + private readonly publicSiteRepo: Repository, + @InjectRepository(AlertConfig) + private readonly alertConfigRepo: Repository, + ) {} + + async setupServer(licenseId: string, dto: SetupServerDto): Promise { + // Check if connection already exists + let connection = await this.connectionRepo.findOne({ + where: { license_id: licenseId }, + }); + + if (!connection) { + connection = this.connectionRepo.create({ + license_id: licenseId, + }); + } + + // Update connection details + connection.connection_type = dto.connection_type; + connection.server_ip = dto.server_ip || null; + connection.server_port = dto.server_port || null; + connection.game_port = dto.game_port || null; + connection.panel_api_endpoint = dto.panel_api_endpoint || null; + connection.panel_server_identifier = dto.panel_server_identifier || null; + + // For bare metal, generate companion agent token + if (dto.connection_type === 'bare_metal') { + connection.companion_agent_token = crypto.randomBytes(32).toString('hex'); + } + + // Store encrypted API key if provided + if (dto.panel_api_key) { + // Stub - would encrypt in production + connection.panel_api_key_encrypted = dto.panel_api_key; + } + + connection.updated_at = new Date(); + + const savedConnection = await this.connectionRepo.save(connection); + + // Create default configurations if they don't exist + await this.createDefaultConfigs(licenseId); + + return savedConnection; + } + + async completeSetup(licenseId: string): Promise<{ message: string }> { + const connection = await this.connectionRepo.findOne({ + where: { license_id: licenseId }, + }); + + if (connection) { + // For bare metal, mark as connected immediately (waiting for agent) + if (connection.connection_type === 'bare_metal') { + connection.connection_status = 'connected'; + connection.updated_at = new Date(); + await this.connectionRepo.save(connection); + } + } + + return { message: 'Setup complete' }; + } + + private async createDefaultConfigs(licenseId: string): Promise { + // Create server config if not exists + const existingConfig = await this.configRepo.findOne({ + where: { license_id: licenseId }, + }); + + if (!existingConfig) { + const config = this.configRepo.create({ + license_id: licenseId, + server_name: 'My Rust Server', + }); + await this.configRepo.save(config); + } + + // Create notifications config if not exists + const existingNotif = await this.notifConfigRepo.findOne({ + where: { license_id: licenseId }, + }); + + if (!existingNotif) { + const notifConfig = this.notifConfigRepo.create({ + license_id: licenseId, + }); + await this.notifConfigRepo.save(notifConfig); + } + + // Create public site config if not exists + const existingPublic = await this.publicSiteRepo.findOne({ + where: { license_id: licenseId }, + }); + + if (!existingPublic) { + const publicConfig = this.publicSiteRepo.create({ + license_id: licenseId, + }); + await this.publicSiteRepo.save(publicConfig); + } + + // Create alert config if not exists + const existingAlert = await this.alertConfigRepo.findOne({ + where: { license_id: licenseId }, + }); + + if (!existingAlert) { + const alertConfig = this.alertConfigRepo.create({ + license_id: licenseId, + }); + await this.alertConfigRepo.save(alertConfig); + } + } +} diff --git a/backend-nest/src/modules/status/status.controller.ts b/backend-nest/src/modules/status/status.controller.ts new file mode 100644 index 0000000..e72c8f3 --- /dev/null +++ b/backend-nest/src/modules/status/status.controller.ts @@ -0,0 +1,17 @@ +import { Controller, Get } from '@nestjs/common'; +import { ApiTags, ApiOperation } from '@nestjs/swagger'; +import { StatusService } from './status.service'; +import { Public } from '../../common/decorators/public.decorator'; + +@ApiTags('public') +@Controller('public/status') +export class StatusController { + constructor(private readonly statusService: StatusService) {} + + @Public() + @Get() + @ApiOperation({ summary: 'Get public server status page data' }) + async getStatus() { + return this.statusService.getStatus(); + } +} diff --git a/backend-nest/src/modules/status/status.module.ts b/backend-nest/src/modules/status/status.module.ts new file mode 100644 index 0000000..2f4e69c --- /dev/null +++ b/backend-nest/src/modules/status/status.module.ts @@ -0,0 +1,17 @@ +import { Module } from '@nestjs/common'; +import { TypeOrmModule } from '@nestjs/typeorm'; +import { StatusController } from './status.controller'; +import { StatusService } from './status.service'; +import { PublicSiteConfig } from '../../entities/public-site-config.entity'; +import { ServerConnection } from '../../entities/server-connection.entity'; +import { License } from '../../entities/license.entity'; + +@Module({ + imports: [ + TypeOrmModule.forFeature([PublicSiteConfig, ServerConnection, License]), + ], + controllers: [StatusController], + providers: [StatusService], + exports: [StatusService], +}) +export class StatusModule {} diff --git a/backend-nest/src/modules/status/status.service.ts b/backend-nest/src/modules/status/status.service.ts new file mode 100644 index 0000000..8565bf6 --- /dev/null +++ b/backend-nest/src/modules/status/status.service.ts @@ -0,0 +1,52 @@ +import { Injectable } from '@nestjs/common'; +import { InjectRepository } from '@nestjs/typeorm'; +import { Repository } from 'typeorm'; +import { PublicSiteConfig } from '../../entities/public-site-config.entity'; +import { ServerConnection } from '../../entities/server-connection.entity'; +import { License } from '../../entities/license.entity'; + +@Injectable() +export class StatusService { + constructor( + @InjectRepository(PublicSiteConfig) + private readonly publicSiteRepo: Repository, + @InjectRepository(ServerConnection) + private readonly serverConnectionRepo: Repository, + @InjectRepository(License) + private readonly licenseRepo: Repository, + ) {} + + async getStatus() { + const publicConfigs = await this.publicSiteRepo.find({ + where: { show_on_status_page: true }, + relations: ['license'], + }); + + const servers = await Promise.all( + publicConfigs.map(async (config) => { + const license = await this.licenseRepo.findOne({ + where: { id: config.license_id }, + }); + + const connection = await this.serverConnectionRepo.findOne({ + where: { license_id: config.license_id }, + }); + + return { + server_name: license?.subdomain || 'Unknown Server', + subdomain: license?.subdomain || null, + status: connection?.connection_status || 'offline', + player_count: 0, // Would need real-time data + max_players: 0, + steam_connect_url: config.steam_connect_url, + motd: config.motd, + discord_invite_url: config.discord_invite_url, + theme_color: config.theme_color, + description: config.status_page_description, + }; + }), + ); + + return { servers }; + } +} diff --git a/backend-nest/src/modules/store/store.controller.ts b/backend-nest/src/modules/store/store.controller.ts new file mode 100644 index 0000000..91fa80b --- /dev/null +++ b/backend-nest/src/modules/store/store.controller.ts @@ -0,0 +1,41 @@ +import { Controller, Get, Post, Body } from '@nestjs/common'; +import { ApiTags, ApiBearerAuth, ApiOperation } from '@nestjs/swagger'; +import { StoreService } from './store.service'; +import { CurrentTenant } from '../../common/decorators/current-tenant.decorator'; + +@ApiTags('modules') +@ApiBearerAuth() +@Controller('modules') +export class StoreController { + constructor(private readonly storeService: StoreService) {} + + @Get('catalog') + @ApiOperation({ summary: 'Get module marketplace catalog' }) + async getCatalog() { + return this.storeService.getCatalog(); + } + + @Get('my-modules') + @ApiOperation({ summary: 'Get purchased and installed modules for current license' }) + async getMyModules(@CurrentTenant() licenseId: string) { + return this.storeService.getMyModules(licenseId); + } + + @Post('purchase') + @ApiOperation({ summary: 'Purchase a module' }) + async purchaseModule( + @CurrentTenant() licenseId: string, + @Body('module_id') moduleId: string, + ) { + return this.storeService.purchaseModule(licenseId, moduleId); + } + + @Post('install') + @ApiOperation({ summary: 'Install a purchased module' }) + async installModule( + @CurrentTenant() licenseId: string, + @Body('module_id') moduleId: string, + ) { + return this.storeService.installModule(licenseId, moduleId); + } +} diff --git a/backend-nest/src/modules/store/store.module.ts b/backend-nest/src/modules/store/store.module.ts new file mode 100644 index 0000000..4b593a1 --- /dev/null +++ b/backend-nest/src/modules/store/store.module.ts @@ -0,0 +1,14 @@ +import { Module } from '@nestjs/common'; +import { TypeOrmModule } from '@nestjs/typeorm'; +import { StoreController } from './store.controller'; +import { StoreService } from './store.service'; +import { Module as ModuleEntity } from '../../entities/module.entity'; +import { ModulePurchase } from '../../entities/module-purchase.entity'; + +@Module({ + imports: [TypeOrmModule.forFeature([ModuleEntity, ModulePurchase])], + controllers: [StoreController], + providers: [StoreService], + exports: [StoreService], +}) +export class StoreModule {} diff --git a/backend-nest/src/modules/store/store.service.ts b/backend-nest/src/modules/store/store.service.ts new file mode 100644 index 0000000..460e471 --- /dev/null +++ b/backend-nest/src/modules/store/store.service.ts @@ -0,0 +1,77 @@ +import { Injectable } from '@nestjs/common'; +import { InjectRepository } from '@nestjs/typeorm'; +import { Repository } from 'typeorm'; +import { Module } from '../../entities/module.entity'; +import { ModulePurchase } from '../../entities/module-purchase.entity'; + +@Injectable() +export class StoreService { + constructor( + @InjectRepository(Module) + private readonly moduleRepo: Repository, + @InjectRepository(ModulePurchase) + private readonly purchaseRepo: Repository, + ) {} + + async getCatalog(): Promise { + return this.moduleRepo.find({ + order: { created_at: 'DESC' }, + }); + } + + async getMyModules(licenseId: string) { + const purchases = await this.purchaseRepo.find({ + where: { license_id: licenseId }, + relations: ['module'], + order: { purchased_at: 'DESC' }, + }); + + return { + purchased: purchases, + installed: purchases.filter(p => p.module), // Stub - would need module_installations table + }; + } + + async purchaseModule(licenseId: string, moduleId: string): Promise { + // Check if already purchased + const existing = await this.purchaseRepo.findOne({ + where: { license_id: licenseId, module_id: moduleId }, + }); + + if (existing) { + return existing; + } + + const module = await this.moduleRepo.findOne({ where: { id: moduleId } }); + if (!module) { + throw new Error('Module not found'); + } + + const purchase = this.purchaseRepo.create({ + license_id: licenseId, + module_id: moduleId, + transaction_id: `txn_${Date.now()}`, // Stub + amount_paid: parseFloat(module.price_usd.toString()), + }); + + return this.purchaseRepo.save(purchase); + } + + async installModule(licenseId: string, moduleId: string) { + // Verify purchase exists + const purchase = await this.purchaseRepo.findOne({ + where: { license_id: licenseId, module_id: moduleId }, + }); + + if (!purchase) { + throw new Error('Module not purchased'); + } + + // Stub - would create module_installation record + return { + message: 'Module installed successfully', + module_id: moduleId, + status: 'installed', + }; + } +} diff --git a/backend-nest/src/modules/team/dto/create-role.dto.ts b/backend-nest/src/modules/team/dto/create-role.dto.ts new file mode 100644 index 0000000..0223827 --- /dev/null +++ b/backend-nest/src/modules/team/dto/create-role.dto.ts @@ -0,0 +1,32 @@ +import { IsString, IsObject, IsOptional } from 'class-validator'; +import { ApiProperty } from '@nestjs/swagger'; + +export class CreateRoleDto { + @ApiProperty({ + description: 'Name of the role', + example: 'Custom Moderator', + }) + @IsString() + role_name: string; + + @ApiProperty({ + description: 'Permissions object for the role', + example: { + can_manage_server: false, + can_manage_plugins: true, + can_view_console: true, + can_execute_commands: false, + }, + }) + @IsObject() + permissions: Record; + + @ApiProperty({ + description: 'Optional role description', + example: 'Custom role for moderators with limited permissions', + required: false, + }) + @IsString() + @IsOptional() + description?: string; +} diff --git a/backend-nest/src/modules/team/dto/invite-member.dto.ts b/backend-nest/src/modules/team/dto/invite-member.dto.ts new file mode 100644 index 0000000..dd872d0 --- /dev/null +++ b/backend-nest/src/modules/team/dto/invite-member.dto.ts @@ -0,0 +1,19 @@ +import { IsEmail, IsString, IsUUID } from 'class-validator'; +import { ApiProperty } from '@nestjs/swagger'; + +export class InviteMemberDto { + @ApiProperty({ + description: 'Email address of the user to invite', + example: 'user@example.com', + }) + @IsEmail() + email: string; + + @ApiProperty({ + description: 'Role ID to assign to the invited member', + example: '123e4567-e89b-12d3-a456-426614174000', + }) + @IsUUID() + @IsString() + role_id: string; +} diff --git a/backend-nest/src/modules/team/dto/update-role.dto.ts b/backend-nest/src/modules/team/dto/update-role.dto.ts new file mode 100644 index 0000000..450134d --- /dev/null +++ b/backend-nest/src/modules/team/dto/update-role.dto.ts @@ -0,0 +1,4 @@ +import { PartialType } from '@nestjs/swagger'; +import { CreateRoleDto } from './create-role.dto'; + +export class UpdateRoleDto extends PartialType(CreateRoleDto) {} diff --git a/backend-nest/src/modules/team/team.controller.ts b/backend-nest/src/modules/team/team.controller.ts new file mode 100644 index 0000000..1375678 --- /dev/null +++ b/backend-nest/src/modules/team/team.controller.ts @@ -0,0 +1,158 @@ +import { + Controller, + Get, + Post, + Put, + Delete, + Body, + Param, + UseGuards, +} from '@nestjs/common'; +import { + ApiTags, + ApiBearerAuth, + ApiOperation, + ApiResponse, +} from '@nestjs/swagger'; +import { JwtAuthGuard } from '../../common/guards/jwt-auth.guard'; +import { CurrentTenant } from '../../common/decorators/current-tenant.decorator'; +import { CurrentUser } from '../../common/decorators/current-user.decorator'; +import { TeamService } from './team.service'; +import { InviteMemberDto } from './dto/invite-member.dto'; +import { CreateRoleDto } from './dto/create-role.dto'; +import { UpdateRoleDto } from './dto/update-role.dto'; + +@ApiTags('team') +@ApiBearerAuth() +@UseGuards(JwtAuthGuard) +@Controller('team') +export class TeamController { + constructor(private readonly teamService: TeamService) {} + + @Get() + @ApiOperation({ + summary: 'Get team members and roles', + description: 'Returns all team members with their roles and all available roles', + }) + @ApiResponse({ + status: 200, + description: 'Team data retrieved successfully', + }) + async getTeam(@CurrentTenant() licenseId: string) { + return await this.teamService.getTeam(licenseId); + } + + @Post('invite') + @ApiOperation({ + summary: 'Invite a team member', + description: 'Invite a user by email and assign them a role', + }) + @ApiResponse({ + status: 201, + description: 'Team member invited successfully', + }) + @ApiResponse({ + status: 404, + description: 'User not found', + }) + @ApiResponse({ + status: 409, + description: 'User already a team member', + }) + async inviteMember( + @CurrentTenant() licenseId: string, + @CurrentUser('sub') userId: string, + @Body() dto: InviteMemberDto, + ) { + return await this.teamService.inviteMember(licenseId, userId, dto); + } + + @Delete(':id') + @ApiOperation({ + summary: 'Remove a team member', + description: 'Remove a team member by ID', + }) + @ApiResponse({ + status: 200, + description: 'Team member removed successfully', + }) + @ApiResponse({ + status: 404, + description: 'Team member not found', + }) + async removeMember( + @CurrentTenant() licenseId: string, + @Param('id') memberId: string, + ) { + return await this.teamService.removeMember(licenseId, memberId); + } + + @Post('roles') + @ApiOperation({ + summary: 'Create a custom role', + description: 'Create a new custom role for this license', + }) + @ApiResponse({ + status: 201, + description: 'Role created successfully', + }) + @ApiResponse({ + status: 409, + description: 'Role name already exists', + }) + async createRole( + @CurrentTenant() licenseId: string, + @Body() dto: CreateRoleDto, + ) { + return await this.teamService.createRole(licenseId, dto); + } + + @Put('roles/:id') + @ApiOperation({ + summary: 'Update a role', + description: 'Update role permissions and details', + }) + @ApiResponse({ + status: 200, + description: 'Role updated successfully', + }) + @ApiResponse({ + status: 400, + description: 'Cannot modify system roles', + }) + @ApiResponse({ + status: 404, + description: 'Role not found', + }) + async updateRole( + @CurrentTenant() licenseId: string, + @Param('id') roleId: string, + @Body() dto: UpdateRoleDto, + ) { + return await this.teamService.updateRole(licenseId, roleId, dto); + } + + @Delete('roles/:id') + @ApiOperation({ + summary: 'Delete a role', + description: 'Delete a custom role (cannot delete system roles or roles in use)', + }) + @ApiResponse({ + status: 200, + description: 'Role deleted successfully', + }) + @ApiResponse({ + status: 400, + description: 'Cannot delete system roles or roles in use', + }) + @ApiResponse({ + status: 404, + description: 'Role not found', + }) + async deleteRole( + @CurrentTenant() licenseId: string, + @Param('id') roleId: string, + ) { + return await this.teamService.deleteRole(licenseId, roleId); + } +} diff --git a/backend-nest/src/modules/team/team.module.ts b/backend-nest/src/modules/team/team.module.ts new file mode 100644 index 0000000..9617b9b --- /dev/null +++ b/backend-nest/src/modules/team/team.module.ts @@ -0,0 +1,15 @@ +import { Module } from '@nestjs/common'; +import { TypeOrmModule } from '@nestjs/typeorm'; +import { TeamController } from './team.controller'; +import { TeamService } from './team.service'; +import { TeamMember } from '../../entities/team-member.entity'; +import { Role } from '../../entities/role.entity'; +import { User } from '../../entities/user.entity'; + +@Module({ + imports: [TypeOrmModule.forFeature([TeamMember, Role, User])], + controllers: [TeamController], + providers: [TeamService], + exports: [TeamService], +}) +export class TeamModule {} diff --git a/backend-nest/src/modules/team/team.service.ts b/backend-nest/src/modules/team/team.service.ts new file mode 100644 index 0000000..0be814c --- /dev/null +++ b/backend-nest/src/modules/team/team.service.ts @@ -0,0 +1,260 @@ +import { + Injectable, + NotFoundException, + BadRequestException, + ConflictException, +} from '@nestjs/common'; +import { InjectRepository } from '@nestjs/typeorm'; +import { Repository } from 'typeorm'; +import { TeamMember } from '../../entities/team-member.entity'; +import { Role } from '../../entities/role.entity'; +import { User } from '../../entities/user.entity'; +import { InviteMemberDto } from './dto/invite-member.dto'; +import { CreateRoleDto } from './dto/create-role.dto'; +import { UpdateRoleDto } from './dto/update-role.dto'; + +@Injectable() +export class TeamService { + constructor( + @InjectRepository(TeamMember) + private teamMemberRepository: Repository, + @InjectRepository(Role) + private roleRepository: Repository, + @InjectRepository(User) + private userRepository: Repository, + ) {} + + async getTeam(licenseId: string) { + // Get all team members with joined user and role data + const members = await this.teamMemberRepository.find({ + where: { license_id: licenseId }, + relations: ['user', 'role'], + order: { joined_at: 'DESC' }, + }); + + // Get all roles (system defaults + custom roles for this license) + const roles = await this.getRoles(licenseId); + + return { + members: members.map((member) => ({ + id: member.id, + user_id: member.user_id, + username: member.user?.username, + email: member.user?.email, + role_id: member.role_id, + role_name: member.role?.role_name, + joined_at: member.joined_at, + invited_by: member.invited_by, + })), + roles, + }; + } + + async inviteMember( + licenseId: string, + invitedBy: string, + dto: InviteMemberDto, + ) { + // Look up user by email + const user = await this.userRepository.findOne({ + where: { email: dto.email }, + }); + + if (!user) { + throw new NotFoundException( + `User with email ${dto.email} not found. User must register first.`, + ); + } + + // Check if user is already a team member + const existingMember = await this.teamMemberRepository.findOne({ + where: { + license_id: licenseId, + user_id: user.id, + }, + }); + + if (existingMember) { + throw new ConflictException( + `User ${dto.email} is already a team member`, + ); + } + + // Verify role exists and belongs to this license or is a system default + const role = await this.roleRepository.findOne({ + where: { id: dto.role_id }, + }); + + if (!role) { + throw new NotFoundException(`Role ${dto.role_id} not found`); + } + + if (role.license_id !== licenseId && !role.is_system_default) { + throw new BadRequestException( + 'Cannot assign role from another license', + ); + } + + // Create team member entry + const teamMember = this.teamMemberRepository.create({ + license_id: licenseId, + user_id: user.id, + role_id: dto.role_id, + invited_by: invitedBy, + joined_at: new Date(), + }); + + const saved = await this.teamMemberRepository.save(teamMember); + + // Return with joined data + const memberWithData = await this.teamMemberRepository.findOne({ + where: { id: saved.id }, + relations: ['user', 'role'], + }); + + if (!memberWithData) { + throw new NotFoundException(`Team member ${saved.id} not found after creation`); + } + + return { + id: memberWithData.id, + user_id: memberWithData.user_id, + username: memberWithData.user?.username, + email: memberWithData.user?.email, + role_id: memberWithData.role_id, + role_name: memberWithData.role?.role_name, + joined_at: memberWithData.joined_at, + invited_by: memberWithData.invited_by, + }; + } + + async removeMember(licenseId: string, memberId: string) { + const member = await this.teamMemberRepository.findOne({ + where: { + id: memberId, + license_id: licenseId, + }, + }); + + if (!member) { + throw new NotFoundException(`Team member ${memberId} not found`); + } + + await this.teamMemberRepository.delete(memberId); + + return { deleted: true }; + } + + async getRoles(licenseId: string) { + // Get all roles where license_id matches OR is_system_default = true + const roles = await this.roleRepository.find({ + where: [ + { license_id: licenseId }, + { is_system_default: true }, + ], + order: { is_system_default: 'DESC', role_name: 'ASC' }, + }); + + return roles; + } + + async createRole(licenseId: string, dto: CreateRoleDto) { + // Verify role name doesn't already exist for this license + const existing = await this.roleRepository.findOne({ + where: { + license_id: licenseId, + role_name: dto.role_name, + }, + }); + + if (existing) { + throw new ConflictException( + `Role with name "${dto.role_name}" already exists`, + ); + } + + const role = this.roleRepository.create({ + license_id: licenseId, + role_name: dto.role_name, + permissions: dto.permissions, + description: dto.description, + is_system_default: false, + }); + + return await this.roleRepository.save(role); + } + + async updateRole(licenseId: string, roleId: string, dto: UpdateRoleDto) { + const role = await this.roleRepository.findOne({ + where: { id: roleId }, + }); + + if (!role) { + throw new NotFoundException(`Role ${roleId} not found`); + } + + // Cannot update system default roles + if (role.is_system_default) { + throw new BadRequestException('Cannot modify system default roles'); + } + + // Cannot update roles from other licenses + if (role.license_id !== licenseId) { + throw new BadRequestException('Cannot modify role from another license'); + } + + // Check for name conflicts if updating name + if (dto.role_name && dto.role_name !== role.role_name) { + const existing = await this.roleRepository.findOne({ + where: { + license_id: licenseId, + role_name: dto.role_name, + }, + }); + + if (existing) { + throw new ConflictException( + `Role with name "${dto.role_name}" already exists`, + ); + } + } + + Object.assign(role, dto); + return await this.roleRepository.save(role); + } + + async deleteRole(licenseId: string, roleId: string) { + const role = await this.roleRepository.findOne({ + where: { id: roleId }, + }); + + if (!role) { + throw new NotFoundException(`Role ${roleId} not found`); + } + + // Cannot delete system default roles + if (role.is_system_default) { + throw new BadRequestException('Cannot delete system default roles'); + } + + // Cannot delete roles from other licenses + if (role.license_id !== licenseId) { + throw new BadRequestException('Cannot delete role from another license'); + } + + // Check if role is in use + const membersUsingRole = await this.teamMemberRepository.count({ + where: { role_id: roleId }, + }); + + if (membersUsingRole > 0) { + throw new BadRequestException( + `Cannot delete role: ${membersUsingRole} team member(s) currently assigned to this role`, + ); + } + + await this.roleRepository.delete(roleId); + + return { deleted: true }; + } +} diff --git a/backend-nest/src/modules/webstore/dto/create-category.dto.ts b/backend-nest/src/modules/webstore/dto/create-category.dto.ts new file mode 100644 index 0000000..397c1bb --- /dev/null +++ b/backend-nest/src/modules/webstore/dto/create-category.dto.ts @@ -0,0 +1,29 @@ +import { IsString, IsOptional, IsInt, IsBoolean, Length } from 'class-validator'; +import { ApiProperty, ApiPropertyOptional } from '@nestjs/swagger'; + +export class CreateCategoryDto { + @ApiProperty({ description: 'Category name' }) + @IsString() + @Length(1, 100) + name: string; + + @ApiProperty({ description: 'URL-friendly slug' }) + @IsString() + @Length(1, 100) + slug: string; + + @ApiPropertyOptional({ description: 'Category description' }) + @IsOptional() + @IsString() + description?: string; + + @ApiPropertyOptional({ description: 'Display order (lower = first)' }) + @IsOptional() + @IsInt() + display_order?: number; + + @ApiPropertyOptional({ description: 'Is category visible' }) + @IsOptional() + @IsBoolean() + visible?: boolean; +} diff --git a/backend-nest/src/modules/webstore/dto/create-item.dto.ts b/backend-nest/src/modules/webstore/dto/create-item.dto.ts new file mode 100644 index 0000000..5020f94 --- /dev/null +++ b/backend-nest/src/modules/webstore/dto/create-item.dto.ts @@ -0,0 +1,49 @@ +import { IsString, IsOptional, IsNumber, IsInt, IsBoolean, IsArray, IsUUID, Length, Min } from 'class-validator'; +import { ApiProperty, ApiPropertyOptional } from '@nestjs/swagger'; + +export class CreateItemDto { + @ApiPropertyOptional({ description: 'Category ID' }) + @IsOptional() + @IsUUID() + category_id?: string; + + @ApiProperty({ description: 'Item name' }) + @IsString() + @Length(1, 200) + name: string; + + @ApiPropertyOptional({ description: 'Item description' }) + @IsOptional() + @IsString() + description?: string; + + @ApiProperty({ description: 'Price in configured currency' }) + @IsNumber() + @Min(0) + price: number; + + @ApiPropertyOptional({ description: 'Image URL' }) + @IsOptional() + @IsString() + image_url?: string; + + @ApiProperty({ description: 'Item type (kit, rank, currency, command)' }) + @IsString() + item_type: string; + + @ApiProperty({ description: 'Console commands to execute on purchase', type: [String] }) + @IsArray() + @IsString({ each: true }) + delivery_commands: string[]; + + @ApiPropertyOptional({ description: 'Purchase limit per player (null = unlimited)' }) + @IsOptional() + @IsInt() + @Min(1) + limit_per_player?: number; + + @ApiPropertyOptional({ description: 'Is item enabled for sale' }) + @IsOptional() + @IsBoolean() + enabled?: boolean; +} diff --git a/backend-nest/src/modules/webstore/dto/purchase.dto.ts b/backend-nest/src/modules/webstore/dto/purchase.dto.ts new file mode 100644 index 0000000..732ea3e --- /dev/null +++ b/backend-nest/src/modules/webstore/dto/purchase.dto.ts @@ -0,0 +1,18 @@ +import { IsString, IsUUID, Length } from 'class-validator'; +import { ApiProperty } from '@nestjs/swagger'; + +export class PurchaseDto { + @ApiProperty({ description: 'Store item ID' }) + @IsUUID() + item_id: string; + + @ApiProperty({ description: 'Player Steam ID' }) + @IsString() + @Length(1, 20) + steam_id: string; + + @ApiProperty({ description: 'Player display name' }) + @IsString() + @Length(1, 100) + player_name: string; +} diff --git a/backend-nest/src/modules/webstore/dto/update-store-config.dto.ts b/backend-nest/src/modules/webstore/dto/update-store-config.dto.ts new file mode 100644 index 0000000..5f8c40c --- /dev/null +++ b/backend-nest/src/modules/webstore/dto/update-store-config.dto.ts @@ -0,0 +1,41 @@ +import { IsString, IsOptional, IsBoolean, Length } from 'class-validator'; +import { ApiPropertyOptional } from '@nestjs/swagger'; + +export class UpdateStoreConfigDto { + @ApiPropertyOptional({ description: 'Store display name' }) + @IsOptional() + @IsString() + @Length(1, 200) + store_name?: string; + + @ApiPropertyOptional({ description: 'Store description' }) + @IsOptional() + @IsString() + description?: string; + + @ApiPropertyOptional({ description: 'Currency code (e.g., USD)' }) + @IsOptional() + @IsString() + @Length(3, 3) + currency?: string; + + @ApiPropertyOptional({ description: 'PayPal client ID' }) + @IsOptional() + @IsString() + paypal_client_id?: string; + + @ApiPropertyOptional({ description: 'PayPal client secret' }) + @IsOptional() + @IsString() + paypal_client_secret?: string; + + @ApiPropertyOptional({ description: 'Use PayPal sandbox mode' }) + @IsOptional() + @IsBoolean() + sandbox_mode?: boolean; + + @ApiPropertyOptional({ description: 'Enable the webstore' }) + @IsOptional() + @IsBoolean() + enabled?: boolean; +} diff --git a/backend-nest/src/modules/webstore/webstore.controller.ts b/backend-nest/src/modules/webstore/webstore.controller.ts new file mode 100644 index 0000000..2f88a78 --- /dev/null +++ b/backend-nest/src/modules/webstore/webstore.controller.ts @@ -0,0 +1,150 @@ +import { Controller, Get, Post, Put, Delete, Body, Param } from '@nestjs/common'; +import { ApiTags, ApiBearerAuth, ApiOperation, ApiParam } from '@nestjs/swagger'; +import { WebstoreService } from './webstore.service'; +import { UpdateStoreConfigDto } from './dto/update-store-config.dto'; +import { CreateCategoryDto } from './dto/create-category.dto'; +import { CreateItemDto } from './dto/create-item.dto'; +import { PurchaseDto } from './dto/purchase.dto'; +import { CurrentTenant } from '../../common/decorators/current-tenant.decorator'; +import { Public } from '../../common/decorators/public.decorator'; + +@ApiTags('webstore') +@Controller() +export class WebstoreController { + constructor(private readonly webstoreService: WebstoreService) {} + + // Admin Routes + @Get('webstore/config') + @ApiBearerAuth() + @ApiOperation({ summary: 'Get webstore configuration' }) + async getConfig(@CurrentTenant() licenseId: string) { + return this.webstoreService.getConfig(licenseId); + } + + @Put('webstore/config') + @ApiBearerAuth() + @ApiOperation({ summary: 'Update webstore configuration' }) + async updateConfig( + @CurrentTenant() licenseId: string, + @Body() dto: UpdateStoreConfigDto, + ) { + return this.webstoreService.updateConfig(licenseId, dto); + } + + @Get('webstore/categories') + @ApiBearerAuth() + @ApiOperation({ summary: 'Get all store categories' }) + async getCategories(@CurrentTenant() licenseId: string) { + return this.webstoreService.getCategories(licenseId); + } + + @Post('webstore/categories') + @ApiBearerAuth() + @ApiOperation({ summary: 'Create a new category' }) + async createCategory( + @CurrentTenant() licenseId: string, + @Body() dto: CreateCategoryDto, + ) { + return this.webstoreService.createCategory(licenseId, dto); + } + + @Put('webstore/categories/:id') + @ApiBearerAuth() + @ApiOperation({ summary: 'Update a category' }) + @ApiParam({ name: 'id', description: 'Category ID' }) + async updateCategory( + @CurrentTenant() licenseId: string, + @Param('id') categoryId: string, + @Body() dto: Partial, + ) { + return this.webstoreService.updateCategory(licenseId, categoryId, dto); + } + + @Delete('webstore/categories/:id') + @ApiBearerAuth() + @ApiOperation({ summary: 'Delete a category' }) + @ApiParam({ name: 'id', description: 'Category ID' }) + async deleteCategory( + @CurrentTenant() licenseId: string, + @Param('id') categoryId: string, + ) { + await this.webstoreService.deleteCategory(licenseId, categoryId); + return { message: 'Category deleted successfully' }; + } + + @Get('webstore/items') + @ApiBearerAuth() + @ApiOperation({ summary: 'Get all store items' }) + async getItems(@CurrentTenant() licenseId: string) { + return this.webstoreService.getItems(licenseId); + } + + @Post('webstore/items') + @ApiBearerAuth() + @ApiOperation({ summary: 'Create a new store item' }) + async createItem( + @CurrentTenant() licenseId: string, + @Body() dto: CreateItemDto, + ) { + return this.webstoreService.createItem(licenseId, dto); + } + + @Put('webstore/items/:id') + @ApiBearerAuth() + @ApiOperation({ summary: 'Update a store item' }) + @ApiParam({ name: 'id', description: 'Item ID' }) + async updateItem( + @CurrentTenant() licenseId: string, + @Param('id') itemId: string, + @Body() dto: Partial, + ) { + return this.webstoreService.updateItem(licenseId, itemId, dto); + } + + @Delete('webstore/items/:id') + @ApiBearerAuth() + @ApiOperation({ summary: 'Delete a store item' }) + @ApiParam({ name: 'id', description: 'Item ID' }) + async deleteItem( + @CurrentTenant() licenseId: string, + @Param('id') itemId: string, + ) { + await this.webstoreService.deleteItem(licenseId, itemId); + return { message: 'Item deleted successfully' }; + } + + @Get('webstore/transactions') + @ApiBearerAuth() + @ApiOperation({ summary: 'Get all store transactions' }) + async getTransactions(@CurrentTenant() licenseId: string) { + return this.webstoreService.getTransactions(licenseId); + } + + // Public Routes + @Public() + @Get('public-store/:subdomain') + @ApiOperation({ summary: 'Get public store information' }) + @ApiParam({ name: 'subdomain', description: 'Server subdomain' }) + async getPublicStore(@Param('subdomain') subdomain: string) { + return this.webstoreService.getPublicStore(subdomain); + } + + @Public() + @Get('public-store/:subdomain/items') + @ApiOperation({ summary: 'Get public store items' }) + @ApiParam({ name: 'subdomain', description: 'Server subdomain' }) + async getPublicItems(@Param('subdomain') subdomain: string) { + return this.webstoreService.getPublicItems(subdomain); + } + + @Public() + @Post('public-store/:subdomain/purchase') + @ApiOperation({ summary: 'Create a purchase order' }) + @ApiParam({ name: 'subdomain', description: 'Server subdomain' }) + async createPurchase( + @Param('subdomain') subdomain: string, + @Body() dto: PurchaseDto, + ) { + return this.webstoreService.createPurchase(subdomain, dto); + } +} diff --git a/backend-nest/src/modules/webstore/webstore.module.ts b/backend-nest/src/modules/webstore/webstore.module.ts new file mode 100644 index 0000000..344fbce --- /dev/null +++ b/backend-nest/src/modules/webstore/webstore.module.ts @@ -0,0 +1,25 @@ +import { Module } from '@nestjs/common'; +import { TypeOrmModule } from '@nestjs/typeorm'; +import { WebstoreController } from './webstore.controller'; +import { WebstoreService } from './webstore.service'; +import { StoreConfig } from '../../entities/store-config.entity'; +import { StoreCategory } from '../../entities/store-category.entity'; +import { StoreItem } from '../../entities/store-item.entity'; +import { StoreTransaction } from '../../entities/store-transaction.entity'; +import { License } from '../../entities/license.entity'; + +@Module({ + imports: [ + TypeOrmModule.forFeature([ + StoreConfig, + StoreCategory, + StoreItem, + StoreTransaction, + License, + ]), + ], + controllers: [WebstoreController], + providers: [WebstoreService], + exports: [WebstoreService], +}) +export class WebstoreModule {} diff --git a/backend-nest/src/modules/webstore/webstore.service.ts b/backend-nest/src/modules/webstore/webstore.service.ts new file mode 100644 index 0000000..a701b16 --- /dev/null +++ b/backend-nest/src/modules/webstore/webstore.service.ts @@ -0,0 +1,246 @@ +import { Injectable, NotFoundException } from '@nestjs/common'; +import { InjectRepository } from '@nestjs/typeorm'; +import { Repository } from 'typeorm'; +import { StoreConfig } from '../../entities/store-config.entity'; +import { StoreCategory } from '../../entities/store-category.entity'; +import { StoreItem } from '../../entities/store-item.entity'; +import { StoreTransaction } from '../../entities/store-transaction.entity'; +import { License } from '../../entities/license.entity'; +import { UpdateStoreConfigDto } from './dto/update-store-config.dto'; +import { CreateCategoryDto } from './dto/create-category.dto'; +import { CreateItemDto } from './dto/create-item.dto'; +import { PurchaseDto } from './dto/purchase.dto'; + +@Injectable() +export class WebstoreService { + constructor( + @InjectRepository(StoreConfig) + private readonly configRepo: Repository, + @InjectRepository(StoreCategory) + private readonly categoryRepo: Repository, + @InjectRepository(StoreItem) + private readonly itemRepo: Repository, + @InjectRepository(StoreTransaction) + private readonly transactionRepo: Repository, + @InjectRepository(License) + private readonly licenseRepo: Repository, + ) {} + + // Admin Methods + async getConfig(licenseId: string): Promise { + let config = await this.configRepo.findOne({ + where: { license_id: licenseId }, + }); + + if (!config) { + // Create default config + config = this.configRepo.create({ + license_id: licenseId, + store_name: 'My Store', + enabled: false, + sandbox_mode: true, + }); + await this.configRepo.save(config); + } + + return config; + } + + async updateConfig(licenseId: string, dto: UpdateStoreConfigDto): Promise { + let config = await this.configRepo.findOne({ + where: { license_id: licenseId }, + }); + + if (!config) { + config = this.configRepo.create({ + license_id: licenseId, + ...dto, + }); + } else { + Object.assign(config, dto); + config.updated_at = new Date(); + } + + return this.configRepo.save(config); + } + + async getCategories(licenseId: string): Promise { + return this.categoryRepo.find({ + where: { license_id: licenseId }, + order: { display_order: 'ASC', name: 'ASC' }, + }); + } + + async createCategory(licenseId: string, dto: CreateCategoryDto): Promise { + const category = this.categoryRepo.create({ + license_id: licenseId, + ...dto, + }); + return this.categoryRepo.save(category); + } + + async updateCategory(licenseId: string, categoryId: string, dto: Partial): Promise { + const category = await this.categoryRepo.findOne({ + where: { id: categoryId, license_id: licenseId }, + }); + + if (!category) { + throw new NotFoundException('Category not found'); + } + + Object.assign(category, dto); + return this.categoryRepo.save(category); + } + + async deleteCategory(licenseId: string, categoryId: string): Promise { + const result = await this.categoryRepo.delete({ + id: categoryId, + license_id: licenseId, + }); + + if (result.affected === 0) { + throw new NotFoundException('Category not found'); + } + } + + async getItems(licenseId: string): Promise { + return this.itemRepo.find({ + where: { license_id: licenseId }, + relations: ['category'], + order: { created_at: 'DESC' }, + }); + } + + async createItem(licenseId: string, dto: CreateItemDto): Promise { + const item = this.itemRepo.create({ + license_id: licenseId, + ...dto, + }); + return this.itemRepo.save(item); + } + + async updateItem(licenseId: string, itemId: string, dto: Partial): Promise { + const item = await this.itemRepo.findOne({ + where: { id: itemId, license_id: licenseId }, + }); + + if (!item) { + throw new NotFoundException('Item not found'); + } + + Object.assign(item, dto); + item.updated_at = new Date(); + return this.itemRepo.save(item); + } + + async deleteItem(licenseId: string, itemId: string): Promise { + const result = await this.itemRepo.delete({ + id: itemId, + license_id: licenseId, + }); + + if (result.affected === 0) { + throw new NotFoundException('Item not found'); + } + } + + async getTransactions(licenseId: string): Promise { + return this.transactionRepo.find({ + where: { license_id: licenseId }, + relations: ['item'], + order: { created_at: 'DESC' }, + }); + } + + // Public Methods + async getPublicStore(subdomain: string) { + const license = await this.licenseRepo.findOne({ + where: { subdomain }, + }); + + if (!license) { + throw new NotFoundException('Store not found'); + } + + const config = await this.configRepo.findOne({ + where: { license_id: license.id }, + }); + + if (!config || !config.enabled) { + throw new NotFoundException('Store not available'); + } + + return { + store_name: config.store_name, + description: config.description, + currency: config.currency, + }; + } + + async getPublicItems(subdomain: string) { + const license = await this.licenseRepo.findOne({ + where: { subdomain }, + }); + + if (!license) { + throw new NotFoundException('Store not found'); + } + + const items = await this.itemRepo + .createQueryBuilder('item') + .leftJoinAndSelect('item.category', 'category') + .where('item.license_id = :licenseId', { licenseId: license.id }) + .andWhere('item.enabled = true') + .andWhere('(category.visible = true OR item.category_id IS NULL)') + .orderBy('category.display_order', 'ASC') + .addOrderBy('item.name', 'ASC') + .getMany(); + + return items.map(item => ({ + id: item.id, + name: item.name, + description: item.description, + price: item.price, + image_url: item.image_url, + item_type: item.item_type, + category_name: item.category?.name || null, + })); + } + + async createPurchase(subdomain: string, dto: PurchaseDto) { + const license = await this.licenseRepo.findOne({ + where: { subdomain }, + }); + + if (!license) { + throw new NotFoundException('Store not found'); + } + + const item = await this.itemRepo.findOne({ + where: { id: dto.item_id, license_id: license.id, enabled: true }, + }); + + if (!item) { + throw new NotFoundException('Item not found'); + } + + const transaction = this.transactionRepo.create({ + license_id: license.id, + item_id: item.id, + steam_id: dto.steam_id, + player_name: dto.player_name, + paypal_order_id: `order_${Date.now()}_${Math.random().toString(36).substr(2, 9)}`, + amount: parseFloat(item.price.toString()), + currency: 'USD', // Would get from config + status: 'pending', + }); + + await this.transactionRepo.save(transaction); + + // Return mock PayPal approval URL + return { + order_id: transaction.paypal_order_id, + approval_url: `https://www.sandbox.paypal.com/checkoutnow?token=${transaction.paypal_order_id}`, + }; + } +} diff --git a/backend-nest/src/modules/wipes/dto/create-profile.dto.ts b/backend-nest/src/modules/wipes/dto/create-profile.dto.ts new file mode 100644 index 0000000..6dd1b2c --- /dev/null +++ b/backend-nest/src/modules/wipes/dto/create-profile.dto.ts @@ -0,0 +1,24 @@ +import { IsString, IsOptional, MaxLength, IsObject } from 'class-validator'; +import { ApiProperty, ApiPropertyOptional } from '@nestjs/swagger'; + +export class CreateProfileDto { + @ApiProperty({ example: 'Standard Monthly Wipe', maxLength: 100 }) + @IsString() + @MaxLength(100) + profile_name: string; + + @ApiPropertyOptional({ example: 'Complete wipe with all plugins reset' }) + @IsOptional() + @IsString() + description?: string; + + @ApiPropertyOptional({ example: { backup: true, notify_players: true } }) + @IsOptional() + @IsObject() + pre_wipe_config?: Record; + + @ApiPropertyOptional({ example: { start_server: true, send_discord_notification: true } }) + @IsOptional() + @IsObject() + post_wipe_config?: Record; +} diff --git a/backend-nest/src/modules/wipes/dto/create-schedule.dto.ts b/backend-nest/src/modules/wipes/dto/create-schedule.dto.ts new file mode 100644 index 0000000..97ba891 --- /dev/null +++ b/backend-nest/src/modules/wipes/dto/create-schedule.dto.ts @@ -0,0 +1,33 @@ +import { IsString, IsEnum, IsUUID, IsOptional, IsBoolean, MaxLength } from 'class-validator'; +import { ApiProperty, ApiPropertyOptional } from '@nestjs/swagger'; + +export class CreateScheduleDto { + @ApiProperty({ example: '550e8400-e29b-41d4-a716-446655440000' }) + @IsUUID() + wipe_profile_id: string; + + @ApiProperty({ example: 'Weekly Thursday Wipe', maxLength: 100 }) + @IsString() + @MaxLength(100) + schedule_name: string; + + @ApiProperty({ example: 'map', enum: ['map', 'blueprint', 'full'] }) + @IsEnum(['map', 'blueprint', 'full']) + wipe_type: 'map' | 'blueprint' | 'full'; + + @ApiProperty({ example: '0 14 * * 4', description: 'Cron expression for schedule' }) + @IsString() + @MaxLength(100) + cron_expression: string; + + @ApiPropertyOptional({ example: 'America/New_York', default: 'America/New_York' }) + @IsOptional() + @IsString() + @MaxLength(50) + timezone?: string; + + @ApiPropertyOptional({ example: false, default: false }) + @IsOptional() + @IsBoolean() + wipe_blueprints?: boolean; +} diff --git a/backend-nest/src/modules/wipes/dto/trigger-wipe.dto.ts b/backend-nest/src/modules/wipes/dto/trigger-wipe.dto.ts new file mode 100644 index 0000000..4de9f04 --- /dev/null +++ b/backend-nest/src/modules/wipes/dto/trigger-wipe.dto.ts @@ -0,0 +1,13 @@ +import { IsEnum, IsUUID, IsOptional } from 'class-validator'; +import { ApiProperty, ApiPropertyOptional } from '@nestjs/swagger'; + +export class TriggerWipeDto { + @ApiProperty({ example: 'map', enum: ['map', 'blueprint', 'full'] }) + @IsEnum(['map', 'blueprint', 'full']) + wipe_type: 'map' | 'blueprint' | 'full'; + + @ApiPropertyOptional({ example: '550e8400-e29b-41d4-a716-446655440000' }) + @IsOptional() + @IsUUID() + wipe_profile_id?: string; +} diff --git a/backend-nest/src/modules/wipes/dto/update-profile.dto.ts b/backend-nest/src/modules/wipes/dto/update-profile.dto.ts new file mode 100644 index 0000000..81abfb2 --- /dev/null +++ b/backend-nest/src/modules/wipes/dto/update-profile.dto.ts @@ -0,0 +1,4 @@ +import { PartialType } from '@nestjs/swagger'; +import { CreateProfileDto } from './create-profile.dto'; + +export class UpdateProfileDto extends PartialType(CreateProfileDto) {} diff --git a/backend-nest/src/modules/wipes/wipes.controller.ts b/backend-nest/src/modules/wipes/wipes.controller.ts new file mode 100644 index 0000000..c887fd1 --- /dev/null +++ b/backend-nest/src/modules/wipes/wipes.controller.ts @@ -0,0 +1,102 @@ +import { + Controller, + Get, + Post, + Put, + Delete, + Body, + Param, + Query, + ParseIntPipe, + UseGuards, +} from '@nestjs/common'; +import { ApiTags, ApiBearerAuth, ApiOperation, ApiQuery } from '@nestjs/swagger'; +import { WipesService } from './wipes.service'; +import { CreateProfileDto } from './dto/create-profile.dto'; +import { UpdateProfileDto } from './dto/update-profile.dto'; +import { CreateScheduleDto } from './dto/create-schedule.dto'; +import { TriggerWipeDto } from './dto/trigger-wipe.dto'; +import { CurrentTenant } from '../../common/decorators/current-tenant.decorator'; +import { RequirePermission } from '../../common/decorators/require-permission.decorator'; +import { JwtAuthGuard } from '../../common/guards/jwt-auth.guard'; +import { PermissionsGuard } from '../../common/guards/permissions.guard'; + +@ApiTags('wipes') +@ApiBearerAuth() +@Controller('wipes') +@UseGuards(JwtAuthGuard, PermissionsGuard) +export class WipesController { + constructor(private readonly wipesService: WipesService) {} + + @Get('profiles') + @RequirePermission('wipe.view') + @ApiOperation({ summary: 'Get all wipe profiles for tenant' }) + getProfiles(@CurrentTenant() licenseId: string) { + return this.wipesService.getProfiles(licenseId); + } + + @Post('profiles') + @RequirePermission('wipe.manage') + @ApiOperation({ summary: 'Create new wipe profile' }) + createProfile(@CurrentTenant() licenseId: string, @Body() dto: CreateProfileDto) { + return this.wipesService.createProfile(licenseId, dto); + } + + @Put('profiles/:id') + @RequirePermission('wipe.manage') + @ApiOperation({ summary: 'Update wipe profile' }) + updateProfile( + @CurrentTenant() licenseId: string, + @Param('id') profileId: string, + @Body() dto: UpdateProfileDto, + ) { + return this.wipesService.updateProfile(licenseId, profileId, dto); + } + + @Delete('profiles/:id') + @RequirePermission('wipe.manage') + @ApiOperation({ summary: 'Delete wipe profile' }) + async deleteProfile(@CurrentTenant() licenseId: string, @Param('id') profileId: string) { + await this.wipesService.deleteProfile(licenseId, profileId); + return { deleted: true }; + } + + @Get('schedules') + @RequirePermission('wipe.view') + @ApiOperation({ summary: 'Get all wipe schedules for tenant' }) + getSchedules(@CurrentTenant() licenseId: string) { + return this.wipesService.getSchedules(licenseId); + } + + @Post('schedules') + @RequirePermission('wipe.manage') + @ApiOperation({ summary: 'Create new wipe schedule' }) + createSchedule(@CurrentTenant() licenseId: string, @Body() dto: CreateScheduleDto) { + return this.wipesService.createSchedule(licenseId, dto); + } + + @Get('history') + @RequirePermission('wipe.view') + @ApiOperation({ summary: 'Get wipe history for tenant' }) + @ApiQuery({ name: 'limit', required: false, example: 50 }) + getHistory( + @CurrentTenant() licenseId: string, + @Query('limit', new ParseIntPipe({ optional: true })) limit?: number, + ) { + return this.wipesService.getHistory(licenseId, limit || 50); + } + + @Post('trigger') + @RequirePermission('wipe.execute') + @ApiOperation({ summary: 'Trigger manual wipe' }) + triggerWipe(@CurrentTenant() licenseId: string, @Body() dto: TriggerWipeDto) { + return this.wipesService.triggerWipe(licenseId, dto); + } + + @Post('dry-run') + @RequirePermission('wipe.execute') + @ApiOperation({ summary: 'Simulate wipe and return what would be affected' }) + triggerDryRun(@CurrentTenant() licenseId: string, @Body() dto: TriggerWipeDto) { + return this.wipesService.triggerDryRun(licenseId, dto); + } +} diff --git a/backend-nest/src/modules/wipes/wipes.module.ts b/backend-nest/src/modules/wipes/wipes.module.ts new file mode 100644 index 0000000..a498cdd --- /dev/null +++ b/backend-nest/src/modules/wipes/wipes.module.ts @@ -0,0 +1,15 @@ +import { Module } from '@nestjs/common'; +import { TypeOrmModule } from '@nestjs/typeorm'; +import { WipesController } from './wipes.controller'; +import { WipesService } from './wipes.service'; +import { WipeProfile } from '../../entities/wipe-profile.entity'; +import { WipeSchedule } from '../../entities/wipe-schedule.entity'; +import { WipeHistory } from '../../entities/wipe-history.entity'; + +@Module({ + imports: [TypeOrmModule.forFeature([WipeProfile, WipeSchedule, WipeHistory])], + controllers: [WipesController], + providers: [WipesService], + exports: [WipesService], +}) +export class WipesModule {} diff --git a/backend-nest/src/modules/wipes/wipes.service.ts b/backend-nest/src/modules/wipes/wipes.service.ts new file mode 100644 index 0000000..7f21291 --- /dev/null +++ b/backend-nest/src/modules/wipes/wipes.service.ts @@ -0,0 +1,130 @@ +import { Injectable, NotFoundException } from '@nestjs/common'; +import { InjectRepository } from '@nestjs/typeorm'; +import { Repository } from 'typeorm'; +import { WipeProfile } from '../../entities/wipe-profile.entity'; +import { WipeSchedule } from '../../entities/wipe-schedule.entity'; +import { WipeHistory } from '../../entities/wipe-history.entity'; +import { CreateProfileDto } from './dto/create-profile.dto'; +import { UpdateProfileDto } from './dto/update-profile.dto'; +import { CreateScheduleDto } from './dto/create-schedule.dto'; +import { TriggerWipeDto } from './dto/trigger-wipe.dto'; + +@Injectable() +export class WipesService { + constructor( + @InjectRepository(WipeProfile) + private readonly wipeProfileRepo: Repository, + @InjectRepository(WipeSchedule) + private readonly wipeScheduleRepo: Repository, + @InjectRepository(WipeHistory) + private readonly wipeHistoryRepo: Repository, + ) {} + + async getProfiles(licenseId: string): Promise { + return this.wipeProfileRepo.find({ + where: { license_id: licenseId }, + order: { created_at: 'DESC' }, + }); + } + + async createProfile(licenseId: string, dto: CreateProfileDto): Promise { + const profile = this.wipeProfileRepo.create({ + license_id: licenseId, + ...dto, + }); + return this.wipeProfileRepo.save(profile); + } + + async updateProfile( + licenseId: string, + profileId: string, + dto: UpdateProfileDto, + ): Promise { + const profile = await this.wipeProfileRepo.findOne({ + where: { id: profileId, license_id: licenseId }, + }); + + if (!profile) { + throw new NotFoundException(`Wipe profile ${profileId} not found`); + } + + Object.assign(profile, dto); + profile.updated_at = new Date(); + return this.wipeProfileRepo.save(profile); + } + + async deleteProfile(licenseId: string, profileId: string): Promise { + const result = await this.wipeProfileRepo.delete({ + id: profileId, + license_id: licenseId, + }); + + if (result.affected === 0) { + throw new NotFoundException(`Wipe profile ${profileId} not found`); + } + } + + async getSchedules(licenseId: string): Promise { + return this.wipeScheduleRepo.find({ + where: { license_id: licenseId }, + relations: ['wipe_profile'], + order: { created_at: 'DESC' }, + }); + } + + async createSchedule(licenseId: string, dto: CreateScheduleDto): Promise { + const schedule = this.wipeScheduleRepo.create({ + license_id: licenseId, + ...dto, + }); + return this.wipeScheduleRepo.save(schedule); + } + + async getHistory(licenseId: string, limit: number = 50): Promise { + return this.wipeHistoryRepo.find({ + where: { license_id: licenseId }, + relations: ['wipe_profile', 'wipe_schedule', 'map'], + order: { created_at: 'DESC' }, + take: limit, + }); + } + + async triggerWipe( + licenseId: string, + dto: TriggerWipeDto, + ): Promise<{ wipe_history_id: string }> { + const history = this.wipeHistoryRepo.create({ + license_id: licenseId, + wipe_type: dto.wipe_type, + wipe_profile_id: dto.wipe_profile_id, + trigger_type: 'manual', + status: 'pending', + }); + + const saved = await this.wipeHistoryRepo.save(history); + return { wipe_history_id: saved.id }; + } + + async triggerDryRun( + licenseId: string, + dto: TriggerWipeDto, + ): Promise<{ + would_delete: string[]; + would_preserve: string[]; + estimated_duration_seconds: number; + }> { + // Stub implementation - real logic would analyze wipe profile config + const mockResult = { + would_delete: ['*.sav', '*.db', 'player.deaths.db', 'player.identities.db'], + would_preserve: ['oxide/', 'oxide/plugins/', 'oxide/data/', 'backups/'], + estimated_duration_seconds: 45, + }; + + if (dto.wipe_type === 'full') { + mockResult.would_delete.push('oxide/data/*'); + mockResult.estimated_duration_seconds = 120; + } + + return mockResult; + } +} diff --git a/backend-nest/src/services/index.ts b/backend-nest/src/services/index.ts new file mode 100644 index 0000000..5339a47 --- /dev/null +++ b/backend-nest/src/services/index.ts @@ -0,0 +1,3 @@ +export { NatsService } from './nats.service'; +export { NatsBridgeService } from './nats-bridge.service'; +export { SteamService } from './steam.service'; diff --git a/backend-nest/src/services/nats-bridge.service.ts b/backend-nest/src/services/nats-bridge.service.ts new file mode 100644 index 0000000..7fe452f --- /dev/null +++ b/backend-nest/src/services/nats-bridge.service.ts @@ -0,0 +1,44 @@ +import { Injectable, OnModuleInit, Logger } from '@nestjs/common'; +import { NatsService } from './nats.service'; + +@Injectable() +export class NatsBridgeService implements OnModuleInit { + private readonly logger = new Logger(NatsBridgeService.name); + private listeners: Map void>> = new Map(); + + constructor(private nats: NatsService) {} + + onModuleInit() { + this.nats.subscribe('corrosion.*.companion.heartbeat', (data, subject) => { + const licenseId = subject.split('.')[1]; + this.emit(licenseId, 'heartbeat', data); + }); + + this.nats.subscribe('corrosion.*.console.output', (data, subject) => { + const licenseId = subject.split('.')[1]; + this.emit(licenseId, 'console_output', data); + }); + + this.logger.log('NATS bridge subscriptions initialized'); + } + + addListener(licenseId: string, callback: (event: string, data: unknown) => void): void { + if (!this.listeners.has(licenseId)) { + this.listeners.set(licenseId, new Set()); + } + this.listeners.get(licenseId)!.add(callback); + } + + removeListener(licenseId: string, callback: (event: string, data: unknown) => void): void { + this.listeners.get(licenseId)?.delete(callback); + } + + private emit(licenseId: string, event: string, data: unknown): void { + const callbacks = this.listeners.get(licenseId); + if (callbacks) { + for (const cb of callbacks) { + cb(event, data); + } + } + } +} diff --git a/backend-nest/src/services/nats.service.ts b/backend-nest/src/services/nats.service.ts new file mode 100644 index 0000000..075cdf4 --- /dev/null +++ b/backend-nest/src/services/nats.service.ts @@ -0,0 +1,73 @@ +import { Injectable, OnModuleInit, OnModuleDestroy, Logger } from '@nestjs/common'; +import { ConfigService } from '@nestjs/config'; +import { connect, NatsConnection, StringCodec, Subscription } from 'nats'; + +@Injectable() +export class NatsService implements OnModuleInit, OnModuleDestroy { + private readonly logger = new Logger(NatsService.name); + private nc: NatsConnection | null = null; + private sc = StringCodec(); + + constructor(private config: ConfigService) {} + + async onModuleInit() { + try { + const url = this.config.get('nats.url') || 'nats://localhost:4222'; + this.nc = await connect({ servers: url }); + this.logger.log(`Connected to NATS at ${url}`); + } catch (err) { + this.logger.warn(`NATS connection failed — running in offline mode: ${(err as Error).message}`); + } + } + + async onModuleDestroy() { + if (this.nc) { + await this.nc.drain(); + } + } + + async publish(subject: string, data: Record): Promise { + if (!this.nc) { + this.logger.debug(`[OFFLINE] Would publish to ${subject}: ${JSON.stringify(data)}`); + return; + } + this.nc.publish(subject, this.sc.encode(JSON.stringify(data))); + } + + async request(subject: string, data: Record, timeout = 5000): Promise { + if (!this.nc) { + this.logger.debug(`[OFFLINE] Would request ${subject}: ${JSON.stringify(data)}`); + return null; + } + const msg = await this.nc.request(subject, this.sc.encode(JSON.stringify(data)), { timeout }); + return JSON.parse(this.sc.decode(msg.data)); + } + + subscribe(subject: string, callback: (data: unknown, subject: string) => void): Subscription | null { + if (!this.nc) { + this.logger.debug(`[OFFLINE] Would subscribe to ${subject}`); + return null; + } + const sub = this.nc.subscribe(subject); + (async () => { + for await (const msg of sub) { + try { + const parsed = JSON.parse(this.sc.decode(msg.data)); + callback(parsed, msg.subject); + } catch { + callback(this.sc.decode(msg.data), msg.subject); + } + } + })(); + return sub; + } + + /** Publish a command to a specific license's server */ + async sendServerCommand(licenseId: string, action: string, payload: Record = {}): Promise { + await this.publish(`corrosion.${licenseId}.cmd.server`, { + action, + ...payload, + timestamp: new Date().toISOString(), + }); + } +} diff --git a/backend-nest/src/services/steam.service.ts b/backend-nest/src/services/steam.service.ts new file mode 100644 index 0000000..026d51b --- /dev/null +++ b/backend-nest/src/services/steam.service.ts @@ -0,0 +1,24 @@ +import { Injectable, Logger } from '@nestjs/common'; +import { ConfigService } from '@nestjs/config'; + +@Injectable() +export class SteamService { + private readonly logger = new Logger(SteamService.name); + private apiKey: string; + + constructor(private config: ConfigService) { + this.apiKey = this.config.get('steam.apiKey') || ''; + } + + async checkForceWipe(): Promise<{ isForceWipe: boolean; expectedDate: string | null }> { + // Stub — would check Steam API for Rust staging branch updates + return { isForceWipe: false, expectedDate: null }; + } + + async getPlayerSummary(steamId: string): Promise<{ personaname: string; avatarfull: string } | null> { + if (!this.apiKey) return null; + // Stub — would call ISteamUser/GetPlayerSummaries/v2 + this.logger.debug(`Would fetch Steam profile for ${steamId}`); + return null; + } +} diff --git a/backend-nest/tsconfig.build.json b/backend-nest/tsconfig.build.json new file mode 100644 index 0000000..2fe1df2 --- /dev/null +++ b/backend-nest/tsconfig.build.json @@ -0,0 +1,4 @@ +{ + "extends": "./tsconfig.json", + "exclude": ["node_modules", "dist", "test", "**/*spec.ts"] +} diff --git a/backend-nest/tsconfig.json b/backend-nest/tsconfig.json new file mode 100644 index 0000000..ef0c323 --- /dev/null +++ b/backend-nest/tsconfig.json @@ -0,0 +1,27 @@ +{ + "compilerOptions": { + "module": "commonjs", + "declaration": true, + "removeComments": true, + "emitDecoratorMetadata": true, + "experimentalDecorators": true, + "allowSyntheticDefaultImports": true, + "target": "ES2021", + "sourceMap": true, + "outDir": "./dist", + "baseUrl": "./", + "incremental": true, + "skipLibCheck": true, + "strict": true, + "forceConsistentCasingInFileNames": true, + "noFallthroughCasesInSwitch": true, + "noImplicitAny": true, + "strictNullChecks": true, + "strictPropertyInitialization": false, + "paths": { + "@/*": ["src/*"] + } + }, + "include": ["src/**/*"], + "exclude": ["node_modules", "dist"] +} diff --git a/docker/Dockerfile.api.nestjs b/docker/Dockerfile.api.nestjs new file mode 100644 index 0000000..dc55d76 --- /dev/null +++ b/docker/Dockerfile.api.nestjs @@ -0,0 +1,37 @@ +# Multi-stage build for Corrosion NestJS API +# Stage 1: Build +FROM node:20-alpine AS builder + +WORKDIR /app + +# Copy package files +COPY package*.json ./ + +# Install dependencies +RUN npm ci + +# Copy source +COPY . . + +# Build TypeScript +RUN npm run build + +# Stage 2: Production +FROM node:20-alpine + +WORKDIR /app + +# Copy built output and production dependencies +COPY --from=builder /app/dist ./dist +COPY --from=builder /app/node_modules ./node_modules +COPY --from=builder /app/package.json ./ + +# Non-root user +RUN addgroup -g 1001 -S nodejs && \ + adduser -S nestjs -u 1001 && \ + chown -R nestjs:nodejs /app +USER nestjs + +EXPOSE 3000 + +CMD ["node", "dist/main.js"] diff --git a/docker/docker-compose.yml b/docker/docker-compose.yml index fd5573f..445f1bd 100644 --- a/docker/docker-compose.yml +++ b/docker/docker-compose.yml @@ -29,16 +29,20 @@ services: api: build: - context: ../backend - dockerfile: ../docker/Dockerfile.api + context: ../backend-nest + dockerfile: ../docker/Dockerfile.api.nestjs container_name: corrosion-api environment: DATABASE_URL: postgres://corrosion:${DB_PASSWORD:-corrosion_dev}@postgres:5432/corrosion + DATABASE_MAX_CONNECTIONS: "20" NATS_URL: nats://nats:4222 JWT_SECRET: ${JWT_SECRET} + JWT_ACCESS_EXPIRY_SECONDS: "900" + JWT_REFRESH_EXPIRY_SECONDS: "604800" ENCRYPTION_KEY: ${ENCRYPTION_KEY} CLOUDFLARE_API_TOKEN: ${CLOUDFLARE_API_TOKEN} CLOUDFLARE_ZONE_ID: ${CLOUDFLARE_ZONE_ID} + BASE_DOMAIN: ${BASE_DOMAIN:-corrosionmgmt.com} STEAM_API_KEY: ${STEAM_API_KEY} SMTP_HOST: ${SMTP_HOST:-localhost} SMTP_PORT: ${SMTP_PORT:-587} @@ -50,7 +54,7 @@ services: ADMIN_PASSWORD: ${ADMIN_PASSWORD} ADMIN_USERNAME: ${ADMIN_USERNAME:-Commander} ADMIN_LICENSE_KEY: ${ADMIN_LICENSE_KEY:-} - RUST_LOG: corrosion_api=info,tower_http=info + API_PORT: "3000" volumes: - map_data:/data/maps - backup_data:/data/backups