From be231ae3acfd88a6742b091b7e0a1eaa4a7746f9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dhiego=20Cassiano=20Foga=C3=A7a=20Barbosa?= Date: Sat, 9 Dec 2023 13:16:35 -0300 Subject: [PATCH] Update dependencies --- package-lock.json | 1001 ++++++-------------- package.json | 17 +- src/app/handler/AuthHandler.ts | 50 +- src/app/handler/GamesHandler.ts | 11 +- src/app/middleware/OauthScopeMiddleware.ts | 4 +- src/app/providers/GamesServiceProvider.ts | 5 +- src/app/providers/OpenIDServiceProvider.ts | 7 +- src/app/routes/index.ts | 5 +- src/config.ts | 76 ++ src/core/dao/UserDAO.ts | 6 +- src/core/lib/chess.ts | 4 +- src/cron.ts | 28 + src/pipeline.ts | 24 +- src/providers.ts | 13 +- src/server.ts | 9 +- src/ws.ts | 44 +- tsconfig.json | 2 +- 17 files changed, 519 insertions(+), 787 deletions(-) create mode 100644 src/config.ts create mode 100644 src/cron.ts diff --git a/package-lock.json b/package-lock.json index 719a471..b06fe90 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,7 +1,7 @@ { "name": "chess", "version": "1.0.0", - "lockfileVersion": 2, + "lockfileVersion": 3, "requires": true, "packages": { "": { @@ -9,22 +9,22 @@ "version": "1.0.0", "license": "Apache-2.0", "dependencies": { - "@prisma/client": "^4.9.0", + "@prisma/client": "^4.12.0", "dotenv": "^16.0.3", "midori": "github:modscleo4/midori", - "prisma": "^4.9.0", + "prisma": "^4.12.0", "stockfish-nnue.wasm": "^1.0.0-1946a675.smolnet", "stockfish.wasm": "^0.10.0", + "ts-patch": "^3.1.1", "ws": "^8.12.0" }, "devDependencies": { - "@types/node": "^18.11.18", + "@types/node": "^18.15.11", "@types/ws": "^8.5.4", - "nodemon": "^2.0.20", + "nodemon": "^2.0.22", "ts-node": "^10.9.1", - "tsconfig-paths": "^4.1.2", - "ttypescript": "^1.5.15", - "typescript": "^4.9.4", + "tsconfig-paths": "^4.2.0", + "typescript": "^5.0.3", "typescript-transform-paths": "^3.4.6" }, "engines": { @@ -49,18 +49,18 @@ } }, "node_modules/@jridgewell/resolve-uri": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.0.tgz", - "integrity": "sha512-F2msla3tad+Mfht5cJq7LSXcdudKTWCVYUgw6pLFOOHSTtZlj6SWNYAp+AhuqLmWdBO2X5hPrLcu8cVP8fy28w==", + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.1.tgz", + "integrity": "sha512-dSYZh7HhCDtCKm4QakX0xFpsRDqjjtZf/kjI/v3T3Nwt5r8/qz/M19F9ySyOqU94SXBmeG9ttTul+YnR4LOxFA==", "dev": true, "engines": { "node": ">=6.0.0" } }, "node_modules/@jridgewell/sourcemap-codec": { - "version": "1.4.14", - "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.14.tgz", - "integrity": "sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw==", + "version": "1.4.15", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz", + "integrity": "sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==", "dev": true }, "node_modules/@jridgewell/trace-mapping": { @@ -74,12 +74,12 @@ } }, "node_modules/@prisma/client": { - "version": "4.11.0", - "resolved": "https://registry.npmjs.org/@prisma/client/-/client-4.11.0.tgz", - "integrity": "sha512-0INHYkQIqgAjrt7NzhYpeDQi8x3Nvylc2uDngKyFDDj1tTRQ4uV1HnVmd1sQEraeVAN63SOK0dgCKQHlvjL0KA==", + "version": "4.16.2", + "resolved": "https://registry.npmjs.org/@prisma/client/-/client-4.16.2.tgz", + "integrity": "sha512-qCoEyxv1ZrQ4bKy39GnylE8Zq31IRmm8bNhNbZx7bF2cU5aiCCnSa93J2imF88MBjn7J9eUQneNxUQVJdl/rPQ==", "hasInstallScript": true, "dependencies": { - "@prisma/engines-version": "4.11.0-57.8fde8fef4033376662cad983758335009d522acb" + "@prisma/engines-version": "4.16.1-1.4bc8b6e1b66cb932731fb1bdbbc550d1e010de81" }, "engines": { "node": ">=14.17" @@ -94,15 +94,15 @@ } }, "node_modules/@prisma/engines": { - "version": "4.11.0", - "resolved": "https://registry.npmjs.org/@prisma/engines/-/engines-4.11.0.tgz", - "integrity": "sha512-0AEBi2HXGV02cf6ASsBPhfsVIbVSDC9nbQed4iiY5eHttW9ZtMxHThuKZE1pnESbr8HRdgmFSa/Kn4OSNYuibg==", + "version": "4.16.2", + "resolved": "https://registry.npmjs.org/@prisma/engines/-/engines-4.16.2.tgz", + "integrity": "sha512-vx1nxVvN4QeT/cepQce68deh/Turxy5Mr+4L4zClFuK1GlxN3+ivxfuv+ej/gvidWn1cE1uAhW7ALLNlYbRUAw==", "hasInstallScript": true }, "node_modules/@prisma/engines-version": { - "version": "4.11.0-57.8fde8fef4033376662cad983758335009d522acb", - "resolved": "https://registry.npmjs.org/@prisma/engines-version/-/engines-version-4.11.0-57.8fde8fef4033376662cad983758335009d522acb.tgz", - "integrity": "sha512-3Vd8Qq06d5xD8Ch5WauWcUUrsVPdMC6Ge8ILji8RFfyhUpqon6qSyGM0apvr1O8n8qH8cKkEFqRPsYjuz5r83g==" + "version": "4.16.1-1.4bc8b6e1b66cb932731fb1bdbbc550d1e010de81", + "resolved": "https://registry.npmjs.org/@prisma/engines-version/-/engines-version-4.16.1-1.4bc8b6e1b66cb932731fb1bdbbc550d1e010de81.tgz", + "integrity": "sha512-q617EUWfRIDTriWADZ4YiWRZXCa/WuhNgLTVd+HqWLffjMSPzyM5uOWoauX91wvQClSKZU4pzI4JJLQ9Kl62Qg==" }, "node_modules/@tsconfig/node10": { "version": "1.0.9", @@ -123,21 +123,24 @@ "dev": true }, "node_modules/@tsconfig/node16": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/@tsconfig/node16/-/node16-1.0.3.tgz", - "integrity": "sha512-yOlFc+7UtL/89t2ZhjPvvB/DeAr3r+Dq58IgzsFkOAvVC6NMJXmCGjbptdXdR9qsX7pKcTL+s87FtYREi2dEEQ==", + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/@tsconfig/node16/-/node16-1.0.4.tgz", + "integrity": "sha512-vxhUy4J8lyeyinH7Azl1pdd43GJhZH/tP2weN8TntQblOY+A0XbT8DJk1/oCPuOOyg/Ja757rG0CgHcWC8OfMA==", "dev": true }, "node_modules/@types/node": { - "version": "18.15.2", - "resolved": "https://registry.npmjs.org/@types/node/-/node-18.15.2.tgz", - "integrity": "sha512-sDPHm2wfx2QhrMDK0pOt2J4KLJMAcerqWNvnED0itPRJWvI+bK+uNHzcH1dFsBlf7G3u8tqXmRF3wkvL9yUwMw==", - "dev": true + "version": "18.19.3", + "resolved": "https://registry.npmjs.org/@types/node/-/node-18.19.3.tgz", + "integrity": "sha512-k5fggr14DwAytoA/t8rPrIz++lXK7/DqckthCmoZOKNsEbJkId4Z//BqgApXBUGrGddrigYa1oqheo/7YmW4rg==", + "dev": true, + "dependencies": { + "undici-types": "~5.26.4" + } }, "node_modules/@types/ws": { - "version": "8.5.4", - "resolved": "https://registry.npmjs.org/@types/ws/-/ws-8.5.4.tgz", - "integrity": "sha512-zdQDHKUgcX/zBc4GrwsE/7dVdAD8JR4EuiAXiiUhhfyIJXXb2+PrGshFyeXWQPMmmZ2XxgaqclgpIC7eTXc1mg==", + "version": "8.5.10", + "resolved": "https://registry.npmjs.org/@types/ws/-/ws-8.5.10.tgz", + "integrity": "sha512-vmQSUcfalpIq0R9q7uTo2lXs6eGIpt9wtnLdMv9LVpIjCA/+ufZRozlVoVelIYixx1ugCBKDhn89vnsEGOCx9A==", "dev": true, "dependencies": { "@types/node": "*" @@ -150,9 +153,9 @@ "dev": true }, "node_modules/acorn": { - "version": "8.8.2", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.8.2.tgz", - "integrity": "sha512-xjIYgE8HBrkpd/sJqOGNspf8uHG+NOHGOw6a/Urj8taM2EXfdNAH2oFcPeIFfsv3+kz/mJrS5VuMqbNLjCa2vw==", + "version": "8.11.2", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.11.2.tgz", + "integrity": "sha512-nc0Axzp/0FILLEVsm4fNwLCwMttvhEI263QtVPQcbpfZZ3ts0hLsZGOpE6czNlid7CJ9MlyH8reXkpsf3YUY4w==", "dev": true, "bin": { "acorn": "bin/acorn" @@ -162,14 +165,36 @@ } }, "node_modules/acorn-walk": { - "version": "8.2.0", - "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.2.0.tgz", - "integrity": "sha512-k+iyHEuPgSw6SbuDpGQM+06HQUa04DZ3o+F6CSzXMvvI5KMvnaEqXe+YVe555R9nn6GPt404fos4wcgpw12SDA==", + "version": "8.3.1", + "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.3.1.tgz", + "integrity": "sha512-TgUZgYvqZprrl7YldZNoa9OciCAyZR+Ejm9eXzKCmjsF5IKp/wgQ7Z/ZpjpGTIUPwrHQIcYeI8qDh4PsEwxMbw==", "dev": true, "engines": { "node": ">=0.4.0" } }, + "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==", + "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==", + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, "node_modules/anymatch": { "version": "3.1.3", "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz", @@ -227,9 +252,9 @@ } }, "node_modules/bufferutil": { - "version": "4.0.7", - "resolved": "https://registry.npmjs.org/bufferutil/-/bufferutil-4.0.7.tgz", - "integrity": "sha512-kukuqc39WOHtdxtw4UScxF/WVnMFVSQVKhtx3AjZJzhd0RGZZldcrfSEbVsWWe6KNH253574cq5F+wpv0G9pJw==", + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/bufferutil/-/bufferutil-4.0.8.tgz", + "integrity": "sha512-4T53u4PdgsXqKaIctwF8ifXlRTTmEPJ8iEPWFdGZvcf7sbwYo6FKFEX9eNNAnzFZ7EzJAQ3CJeOtCRA4rDp7Pw==", "hasInstallScript": true, "optional": true, "dependencies": { @@ -239,6 +264,40 @@ "node": ">=6.14.2" } }, + "node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "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/chalk/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==", + "engines": { + "node": ">=8" + } + }, + "node_modules/chalk/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==", + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/chokidar": { "version": "3.5.3", "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz", @@ -266,6 +325,22 @@ "fsevents": "~2.3.2" } }, + "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==", + "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==" + }, "node_modules/concat-map": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", @@ -297,11 +372,14 @@ } }, "node_modules/dotenv": { - "version": "16.0.3", - "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.0.3.tgz", - "integrity": "sha512-7GO6HghkA5fYG9TYnNxi14/7K9f5occMlp3zXAuSxn7CKCxt9xbNWG7yF8hTCSUchlfWSe3uLmlPfigevRItzQ==", + "version": "16.3.1", + "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.3.1.tgz", + "integrity": "sha512-IPzF4w4/Rd94bA9imS68tZBaYyBWSCE47V1RGuMrB94iyTOIEwRmVL2x/4An+6mETpLrKJ5hQkB8W4kFAadeIQ==", "engines": { "node": ">=12" + }, + "funding": { + "url": "https://github.com/motdotla/dotenv?sponsor=1" } }, "node_modules/fill-range": { @@ -317,9 +395,9 @@ } }, "node_modules/fsevents": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", - "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", + "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, "optional": true, @@ -331,10 +409,12 @@ } }, "node_modules/function-bind": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", - "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", - "dev": true + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", + "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } }, "node_modules/glob-parent": { "version": "5.1.2", @@ -348,16 +428,17 @@ "node": ">= 6" } }, - "node_modules/has": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", - "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", - "dev": true, + "node_modules/global-prefix": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/global-prefix/-/global-prefix-3.0.0.tgz", + "integrity": "sha512-awConJSVCHVGND6x3tmMaKcQvwXLhjdkmomy2W+Goaui8YPgYgXJZewhg3fWC+DlfqqQuWg8AwqjGTD2nAPVWg==", "dependencies": { - "function-bind": "^1.1.1" + "ini": "^1.3.5", + "kind-of": "^6.0.2", + "which": "^1.3.1" }, "engines": { - "node": ">= 0.4.0" + "node": ">=6" } }, "node_modules/has-flag": { @@ -369,12 +450,28 @@ "node": ">=4" } }, + "node_modules/hasown": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.0.tgz", + "integrity": "sha512-vUptKVTpIJhcczKBbgnS+RtcuYMB8+oNzPK2/Hp3hanz8JmpATdmmgLgSaadVREkDm+e2giHwY3ZRkyjSIDDFA==", + "dependencies": { + "function-bind": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } + }, "node_modules/ignore-by-default": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/ignore-by-default/-/ignore-by-default-1.0.1.tgz", "integrity": "sha512-Ius2VYcGNk7T90CppJqcIkS5ooHUZyIQK+ClZfMfMNFEF9VSE73Fq+906u/CWu92x4gzZMWOwfFYckPObzdEbA==", "dev": true }, + "node_modules/ini": { + "version": "1.3.8", + "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz", + "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==" + }, "node_modules/is-binary-path": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", @@ -388,12 +485,11 @@ } }, "node_modules/is-core-module": { - "version": "2.11.0", - "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.11.0.tgz", - "integrity": "sha512-RRjxlvLDkD1YJwDbroBHMb+cukurkDWNyHx7D3oNB5x9rb5ogcksMC5wHCadcXoo67gVr/+3GFySh3134zi6rw==", - "dev": true, + "version": "2.13.1", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.13.1.tgz", + "integrity": "sha512-hHrIjvZsftOsvKSn2TRYl63zvxsgE0K+0mYMoH6gD4omR5IWB2KynivBQczo3+wF1cCkjzvptnI9Q0sPU66ilw==", "dependencies": { - "has": "^1.0.3" + "hasown": "^2.0.0" }, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -429,6 +525,11 @@ "node": ">=0.12.0" } }, + "node_modules/isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==" + }, "node_modules/json5": { "version": "2.2.3", "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz", @@ -441,6 +542,25 @@ "node": ">=6" } }, + "node_modules/kind-of": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", + "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=10" + } + }, "node_modules/make-error": { "version": "1.3.6", "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz", @@ -449,7 +569,7 @@ }, "node_modules/midori": { "version": "1.0.0", - "resolved": "git+ssh://git@github.com/modscleo4/midori.git#85571b2832c432def8610542671aa78672cfd659", + "resolved": "git+ssh://git@github.com/modscleo4/midori.git#f9b5c59b491206dda9baa646b220031114c89057", "license": "Apache-2.0", "dependencies": { "mime-types": "^2.1.35" @@ -490,7 +610,6 @@ "version": "1.2.8", "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz", "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==", - "dev": true, "funding": { "url": "https://github.com/sponsors/ljharb" } @@ -502,9 +621,9 @@ "dev": true }, "node_modules/node-gyp-build": { - "version": "4.6.0", - "resolved": "https://registry.npmjs.org/node-gyp-build/-/node-gyp-build-4.6.0.tgz", - "integrity": "sha512-NTZVKn9IylLwUzaKjkas1e4u2DLNcV4rdYagA4PWdPwW87Bi7z+BznyKSRwS/761tV/lzCGXplWsiaMjLqP2zQ==", + "version": "4.7.1", + "resolved": "https://registry.npmjs.org/node-gyp-build/-/node-gyp-build-4.7.1.tgz", + "integrity": "sha512-wTSrZ+8lsRRa3I3H8Xr65dLWSgCvY2l4AOnaeKdPA9TB/WYMPaTcrzf3rXvFoVvjKNVnu0CcWSx54qq9GKRUYg==", "optional": true, "bin": { "node-gyp-build": "bin.js", @@ -513,9 +632,9 @@ } }, "node_modules/nodemon": { - "version": "2.0.21", - "resolved": "https://registry.npmjs.org/nodemon/-/nodemon-2.0.21.tgz", - "integrity": "sha512-djN/n2549DUtY33S7o1djRCd7dEm0kBnj9c7S9XVXqRUbuggN1MZH/Nqa+5RFQr63Fbefq37nFXAE9VU86yL1A==", + "version": "2.0.22", + "resolved": "https://registry.npmjs.org/nodemon/-/nodemon-2.0.22.tgz", + "integrity": "sha512-B8YqaKMmyuCO7BowF1Z1/mkPqLk6cs/l63Ojtd6otKjMx47Dq1utxfRxcavH1I7VSaL8n5BUaoutadnsX3AAVQ==", "dev": true, "dependencies": { "chokidar": "^3.5.2", @@ -567,8 +686,7 @@ "node_modules/path-parse": { "version": "1.0.7", "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", - "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", - "dev": true + "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==" }, "node_modules/picomatch": { "version": "2.3.1", @@ -583,12 +701,12 @@ } }, "node_modules/prisma": { - "version": "4.11.0", - "resolved": "https://registry.npmjs.org/prisma/-/prisma-4.11.0.tgz", - "integrity": "sha512-4zZmBXssPUEiX+GeL0MUq/Yyie4ltiKmGu7jCJFnYMamNrrulTBc+D+QwAQSJ01tyzeGHlD13kOnqPwRipnlNw==", + "version": "4.16.2", + "resolved": "https://registry.npmjs.org/prisma/-/prisma-4.16.2.tgz", + "integrity": "sha512-SYCsBvDf0/7XSJyf2cHTLjLeTLVXYfqp7pG5eEVafFLeT0u/hLFz/9W196nDRGUOo1JfPatAEb+uEnTQImQC1g==", "hasInstallScript": true, "dependencies": { - "@prisma/engines": "4.11.0" + "@prisma/engines": "4.16.2" }, "bin": { "prisma": "build/index.js", @@ -617,12 +735,11 @@ } }, "node_modules/resolve": { - "version": "1.22.1", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.1.tgz", - "integrity": "sha512-nBpuuYuY5jFsli/JIs1oldw6fOQCBioohqWZg/2hiaOybXOft4lonv85uDOKXdf8rhyK159cxU5cDcK/NKk8zw==", - "dev": true, + "version": "1.22.8", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.8.tgz", + "integrity": "sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw==", "dependencies": { - "is-core-module": "^2.9.0", + "is-core-module": "^2.13.0", "path-parse": "^1.0.7", "supports-preserve-symlinks-flag": "^1.0.0" }, @@ -634,9 +751,9 @@ } }, "node_modules/semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "version": "5.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", + "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", "dev": true, "bin": { "semver": "bin/semver" @@ -673,6 +790,17 @@ "resolved": "https://registry.npmjs.org/stockfish.wasm/-/stockfish.wasm-0.10.0.tgz", "integrity": "sha512-OTvOlz0ijCSmIb/YvOZ1Dn6vwZVS4Ge3N+RcV0d2b6LXUtCJ9UwmBHypRW3DZ+VXf8WNm7E3P+6jMTVvb3QaBg==" }, + "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==", + "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", @@ -698,7 +826,6 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", - "dev": true, "engines": { "node": ">= 0.4" }, @@ -731,9 +858,9 @@ } }, "node_modules/ts-node": { - "version": "10.9.1", - "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.9.1.tgz", - "integrity": "sha512-NtVysVPkxxrwFGUUxGYhfux8k78pQB3JqYBXlLRZgdGUqTO5wU/UyHop5p70iEbGhB7q5KmiZiU0Y3KlJrScEw==", + "version": "10.9.2", + "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.9.2.tgz", + "integrity": "sha512-f0FFpIdcHgn8zcPSbf1dRevwt047YMnaiJM3u2w2RewrB+fob/zePZcrOyQoLMMO7aBIddLcQIEK5dYjkLnGrQ==", "dev": true, "dependencies": { "@cspotcode/source-map-support": "^0.8.0", @@ -773,10 +900,41 @@ } } }, + "node_modules/ts-patch": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/ts-patch/-/ts-patch-3.1.1.tgz", + "integrity": "sha512-ReGYz9jQYC80PFafBx25TC0UI9cSgmUBtpT+WIy8IrhpLVzEHf430k03XQYOMldQMyZDBbzn5fBPELgtIl65cA==", + "dependencies": { + "chalk": "^4.1.2", + "global-prefix": "^3.0.0", + "minimist": "^1.2.8", + "resolve": "^1.22.2", + "semver": "^7.5.4", + "strip-ansi": "^6.0.1" + }, + "bin": { + "ts-patch": "bin/ts-patch.js", + "tspc": "bin/tspc.js" + } + }, + "node_modules/ts-patch/node_modules/semver": { + "version": "7.5.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", + "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", + "dependencies": { + "lru-cache": "^6.0.0" + }, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, "node_modules/tsconfig-paths": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-4.1.2.tgz", - "integrity": "sha512-uhxiMgnXQp1IR622dUXI+9Ehnws7i/y6xvpZB9IbUVOPy0muvdvgXeZOn88UcGPiT98Vp3rJPTa8bFoalZ3Qhw==", + "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, "dependencies": { "json5": "^2.2.2", @@ -787,34 +945,17 @@ "node": ">=6" } }, - "node_modules/ttypescript": { - "version": "1.5.15", - "resolved": "https://registry.npmjs.org/ttypescript/-/ttypescript-1.5.15.tgz", - "integrity": "sha512-48ykDNHzFnPMnv4hYX1P8Q84TvCZyL1QlFxeuxsuZ48X2+ameBgPenvmCkHJtoOSxpoWTWi8NcgNrRnVDOmfSg==", - "dev": true, - "dependencies": { - "resolve": ">=1.9.0" - }, - "bin": { - "ttsc": "bin/tsc", - "ttsserver": "bin/tsserver" - }, - "peerDependencies": { - "ts-node": ">=8.0.2", - "typescript": ">=3.2.2" - } - }, "node_modules/typescript": { - "version": "4.9.5", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.5.tgz", - "integrity": "sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g==", + "version": "5.3.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.3.3.tgz", + "integrity": "sha512-pXWcraxM0uxAS+tN0AG/BF2TyqmHO014Z070UsJ+pFvYuRSq8KH8DmWpnbXe0pEPDHXZV3FcAbJkijJ5oNEnWw==", "dev": true, "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" }, "engines": { - "node": ">=4.2.0" + "node": ">=14.17" } }, "node_modules/typescript-transform-paths": { @@ -835,6 +976,12 @@ "integrity": "sha512-WxONCrssBM8TSPRqN5EmsjVrsv4A8X12J4ArBiiayv3DyyG3ZlIg6yysuuSYdZsVz3TKcTg2fd//Ujd4CHV1iA==", "dev": true }, + "node_modules/undici-types": { + "version": "5.26.5", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz", + "integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==", + "dev": true + }, "node_modules/utf-8-validate": { "version": "5.0.10", "resolved": "https://registry.npmjs.org/utf-8-validate/-/utf-8-validate-5.0.10.tgz", @@ -854,10 +1001,21 @@ "integrity": "sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==", "dev": true }, + "node_modules/which": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", + "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "which": "bin/which" + } + }, "node_modules/ws": { - "version": "8.13.0", - "resolved": "https://registry.npmjs.org/ws/-/ws-8.13.0.tgz", - "integrity": "sha512-x9vcZYTrFPC7aSIbj7sRCYo7L/Xb8Iy+pW0ng0wt2vCJv7M9HOMy0UoN3rr+IFC7hb7vXoqS+P9ktyLLLhO+LA==", + "version": "8.14.2", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.14.2.tgz", + "integrity": "sha512-wEBG1ftX4jcglPxgFCMJmZ2PLtSbJ2Peg6TmpJFTbe9GZYOQCDPdMYu/Tm0/bGZkw8paZnJY45J4K2PZrLYq8g==", "engines": { "node": ">=10.0.0" }, @@ -874,6 +1032,11 @@ } } }, + "node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==" + }, "node_modules/yn": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/yn/-/yn-3.1.1.tgz", @@ -883,607 +1046,5 @@ "node": ">=6" } } - }, - "dependencies": { - "@cspotcode/source-map-support": { - "version": "0.8.1", - "resolved": "https://registry.npmjs.org/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz", - "integrity": "sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==", - "dev": true, - "requires": { - "@jridgewell/trace-mapping": "0.3.9" - } - }, - "@jridgewell/resolve-uri": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.0.tgz", - "integrity": "sha512-F2msla3tad+Mfht5cJq7LSXcdudKTWCVYUgw6pLFOOHSTtZlj6SWNYAp+AhuqLmWdBO2X5hPrLcu8cVP8fy28w==", - "dev": true - }, - "@jridgewell/sourcemap-codec": { - "version": "1.4.14", - "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.14.tgz", - "integrity": "sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw==", - "dev": true - }, - "@jridgewell/trace-mapping": { - "version": "0.3.9", - "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz", - "integrity": "sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==", - "dev": true, - "requires": { - "@jridgewell/resolve-uri": "^3.0.3", - "@jridgewell/sourcemap-codec": "^1.4.10" - } - }, - "@prisma/client": { - "version": "4.11.0", - "resolved": "https://registry.npmjs.org/@prisma/client/-/client-4.11.0.tgz", - "integrity": "sha512-0INHYkQIqgAjrt7NzhYpeDQi8x3Nvylc2uDngKyFDDj1tTRQ4uV1HnVmd1sQEraeVAN63SOK0dgCKQHlvjL0KA==", - "requires": { - "@prisma/engines-version": "4.11.0-57.8fde8fef4033376662cad983758335009d522acb" - } - }, - "@prisma/engines": { - "version": "4.11.0", - "resolved": "https://registry.npmjs.org/@prisma/engines/-/engines-4.11.0.tgz", - "integrity": "sha512-0AEBi2HXGV02cf6ASsBPhfsVIbVSDC9nbQed4iiY5eHttW9ZtMxHThuKZE1pnESbr8HRdgmFSa/Kn4OSNYuibg==" - }, - "@prisma/engines-version": { - "version": "4.11.0-57.8fde8fef4033376662cad983758335009d522acb", - "resolved": "https://registry.npmjs.org/@prisma/engines-version/-/engines-version-4.11.0-57.8fde8fef4033376662cad983758335009d522acb.tgz", - "integrity": "sha512-3Vd8Qq06d5xD8Ch5WauWcUUrsVPdMC6Ge8ILji8RFfyhUpqon6qSyGM0apvr1O8n8qH8cKkEFqRPsYjuz5r83g==" - }, - "@tsconfig/node10": { - "version": "1.0.9", - "resolved": "https://registry.npmjs.org/@tsconfig/node10/-/node10-1.0.9.tgz", - "integrity": "sha512-jNsYVVxU8v5g43Erja32laIDHXeoNvFEpX33OK4d6hljo3jDhCBDhx5dhCCTMWUojscpAagGiRkBKxpdl9fxqA==", - "dev": true - }, - "@tsconfig/node12": { - "version": "1.0.11", - "resolved": "https://registry.npmjs.org/@tsconfig/node12/-/node12-1.0.11.tgz", - "integrity": "sha512-cqefuRsh12pWyGsIoBKJA9luFu3mRxCA+ORZvA4ktLSzIuCUtWVxGIuXigEwO5/ywWFMZ2QEGKWvkZG1zDMTag==", - "dev": true - }, - "@tsconfig/node14": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/@tsconfig/node14/-/node14-1.0.3.tgz", - "integrity": "sha512-ysT8mhdixWK6Hw3i1V2AeRqZ5WfXg1G43mqoYlM2nc6388Fq5jcXyr5mRsqViLx/GJYdoL0bfXD8nmF+Zn/Iow==", - "dev": true - }, - "@tsconfig/node16": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/@tsconfig/node16/-/node16-1.0.3.tgz", - "integrity": "sha512-yOlFc+7UtL/89t2ZhjPvvB/DeAr3r+Dq58IgzsFkOAvVC6NMJXmCGjbptdXdR9qsX7pKcTL+s87FtYREi2dEEQ==", - "dev": true - }, - "@types/node": { - "version": "18.15.2", - "resolved": "https://registry.npmjs.org/@types/node/-/node-18.15.2.tgz", - "integrity": "sha512-sDPHm2wfx2QhrMDK0pOt2J4KLJMAcerqWNvnED0itPRJWvI+bK+uNHzcH1dFsBlf7G3u8tqXmRF3wkvL9yUwMw==", - "dev": true - }, - "@types/ws": { - "version": "8.5.4", - "resolved": "https://registry.npmjs.org/@types/ws/-/ws-8.5.4.tgz", - "integrity": "sha512-zdQDHKUgcX/zBc4GrwsE/7dVdAD8JR4EuiAXiiUhhfyIJXXb2+PrGshFyeXWQPMmmZ2XxgaqclgpIC7eTXc1mg==", - "dev": true, - "requires": { - "@types/node": "*" - } - }, - "abbrev": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz", - "integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==", - "dev": true - }, - "acorn": { - "version": "8.8.2", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.8.2.tgz", - "integrity": "sha512-xjIYgE8HBrkpd/sJqOGNspf8uHG+NOHGOw6a/Urj8taM2EXfdNAH2oFcPeIFfsv3+kz/mJrS5VuMqbNLjCa2vw==", - "dev": true - }, - "acorn-walk": { - "version": "8.2.0", - "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.2.0.tgz", - "integrity": "sha512-k+iyHEuPgSw6SbuDpGQM+06HQUa04DZ3o+F6CSzXMvvI5KMvnaEqXe+YVe555R9nn6GPt404fos4wcgpw12SDA==", - "dev": true - }, - "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, - "requires": { - "normalize-path": "^3.0.0", - "picomatch": "^2.0.4" - } - }, - "arg": { - "version": "4.1.3", - "resolved": "https://registry.npmjs.org/arg/-/arg-4.1.3.tgz", - "integrity": "sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==", - "dev": true - }, - "balanced-match": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", - "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", - "dev": true - }, - "binary-extensions": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", - "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==", - "dev": true - }, - "brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", - "dev": true, - "requires": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "braces": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", - "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", - "dev": true, - "requires": { - "fill-range": "^7.0.1" - } - }, - "bufferutil": { - "version": "4.0.7", - "resolved": "https://registry.npmjs.org/bufferutil/-/bufferutil-4.0.7.tgz", - "integrity": "sha512-kukuqc39WOHtdxtw4UScxF/WVnMFVSQVKhtx3AjZJzhd0RGZZldcrfSEbVsWWe6KNH253574cq5F+wpv0G9pJw==", - "optional": true, - "requires": { - "node-gyp-build": "^4.3.0" - } - }, - "chokidar": { - "version": "3.5.3", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz", - "integrity": "sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==", - "dev": true, - "requires": { - "anymatch": "~3.1.2", - "braces": "~3.0.2", - "fsevents": "~2.3.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" - } - }, - "concat-map": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", - "dev": true - }, - "create-require": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/create-require/-/create-require-1.1.1.tgz", - "integrity": "sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==", - "dev": true - }, - "debug": { - "version": "3.2.7", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", - "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", - "dev": true, - "requires": { - "ms": "^2.1.1" - } - }, - "diff": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", - "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==", - "dev": true - }, - "dotenv": { - "version": "16.0.3", - "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.0.3.tgz", - "integrity": "sha512-7GO6HghkA5fYG9TYnNxi14/7K9f5occMlp3zXAuSxn7CKCxt9xbNWG7yF8hTCSUchlfWSe3uLmlPfigevRItzQ==" - }, - "fill-range": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", - "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", - "dev": true, - "requires": { - "to-regex-range": "^5.0.1" - } - }, - "fsevents": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", - "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", - "dev": true, - "optional": true - }, - "function-bind": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", - "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", - "dev": true - }, - "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, - "requires": { - "is-glob": "^4.0.1" - } - }, - "has": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", - "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", - "dev": true, - "requires": { - "function-bind": "^1.1.1" - } - }, - "has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", - "dev": true - }, - "ignore-by-default": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/ignore-by-default/-/ignore-by-default-1.0.1.tgz", - "integrity": "sha512-Ius2VYcGNk7T90CppJqcIkS5ooHUZyIQK+ClZfMfMNFEF9VSE73Fq+906u/CWu92x4gzZMWOwfFYckPObzdEbA==", - "dev": true - }, - "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, - "requires": { - "binary-extensions": "^2.0.0" - } - }, - "is-core-module": { - "version": "2.11.0", - "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.11.0.tgz", - "integrity": "sha512-RRjxlvLDkD1YJwDbroBHMb+cukurkDWNyHx7D3oNB5x9rb5ogcksMC5wHCadcXoo67gVr/+3GFySh3134zi6rw==", - "dev": true, - "requires": { - "has": "^1.0.3" - } - }, - "is-extglob": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", - "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", - "dev": true - }, - "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, - "requires": { - "is-extglob": "^2.1.1" - } - }, - "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 - }, - "json5": { - "version": "2.2.3", - "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz", - "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==", - "dev": true - }, - "make-error": { - "version": "1.3.6", - "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz", - "integrity": "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==", - "dev": true - }, - "midori": { - "version": "git+ssh://git@github.com/modscleo4/midori.git#85571b2832c432def8610542671aa78672cfd659", - "from": "midori@github:modscleo4/midori", - "requires": { - "mime-types": "^2.1.35" - } - }, - "mime-db": { - "version": "1.52.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", - "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==" - }, - "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==", - "requires": { - "mime-db": "1.52.0" - } - }, - "minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", - "dev": true, - "requires": { - "brace-expansion": "^1.1.7" - } - }, - "minimist": { - "version": "1.2.8", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz", - "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==", - "dev": true - }, - "ms": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", - "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", - "dev": true - }, - "node-gyp-build": { - "version": "4.6.0", - "resolved": "https://registry.npmjs.org/node-gyp-build/-/node-gyp-build-4.6.0.tgz", - "integrity": "sha512-NTZVKn9IylLwUzaKjkas1e4u2DLNcV4rdYagA4PWdPwW87Bi7z+BznyKSRwS/761tV/lzCGXplWsiaMjLqP2zQ==", - "optional": true - }, - "nodemon": { - "version": "2.0.21", - "resolved": "https://registry.npmjs.org/nodemon/-/nodemon-2.0.21.tgz", - "integrity": "sha512-djN/n2549DUtY33S7o1djRCd7dEm0kBnj9c7S9XVXqRUbuggN1MZH/Nqa+5RFQr63Fbefq37nFXAE9VU86yL1A==", - "dev": true, - "requires": { - "chokidar": "^3.5.2", - "debug": "^3.2.7", - "ignore-by-default": "^1.0.1", - "minimatch": "^3.1.2", - "pstree.remy": "^1.1.8", - "semver": "^5.7.1", - "simple-update-notifier": "^1.0.7", - "supports-color": "^5.5.0", - "touch": "^3.1.0", - "undefsafe": "^2.0.5" - } - }, - "nopt": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/nopt/-/nopt-1.0.10.tgz", - "integrity": "sha512-NWmpvLSqUrgrAC9HCuxEvb+PSloHpqVu+FqcO4eeF2h5qYRhA7ev6KvelyQAKtegUbC6RypJnlEOhd8vloNKYg==", - "dev": true, - "requires": { - "abbrev": "1" - } - }, - "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 - }, - "path-parse": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", - "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", - "dev": true - }, - "picomatch": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", - "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", - "dev": true - }, - "prisma": { - "version": "4.11.0", - "resolved": "https://registry.npmjs.org/prisma/-/prisma-4.11.0.tgz", - "integrity": "sha512-4zZmBXssPUEiX+GeL0MUq/Yyie4ltiKmGu7jCJFnYMamNrrulTBc+D+QwAQSJ01tyzeGHlD13kOnqPwRipnlNw==", - "requires": { - "@prisma/engines": "4.11.0" - } - }, - "pstree.remy": { - "version": "1.1.8", - "resolved": "https://registry.npmjs.org/pstree.remy/-/pstree.remy-1.1.8.tgz", - "integrity": "sha512-77DZwxQmxKnu3aR542U+X8FypNzbfJ+C5XQDk3uWjWxn6151aIMGthWYRXTqT1E5oJvg+ljaa2OJi+VfvCOQ8w==", - "dev": true - }, - "readdirp": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", - "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", - "dev": true, - "requires": { - "picomatch": "^2.2.1" - } - }, - "resolve": { - "version": "1.22.1", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.1.tgz", - "integrity": "sha512-nBpuuYuY5jFsli/JIs1oldw6fOQCBioohqWZg/2hiaOybXOft4lonv85uDOKXdf8rhyK159cxU5cDcK/NKk8zw==", - "dev": true, - "requires": { - "is-core-module": "^2.9.0", - "path-parse": "^1.0.7", - "supports-preserve-symlinks-flag": "^1.0.0" - } - }, - "semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", - "dev": true - }, - "simple-update-notifier": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/simple-update-notifier/-/simple-update-notifier-1.1.0.tgz", - "integrity": "sha512-VpsrsJSUcJEseSbMHkrsrAVSdvVS5I96Qo1QAQ4FxQ9wXFcB+pjj7FB7/us9+GcgfW4ziHtYMc1J0PLczb55mg==", - "dev": true, - "requires": { - "semver": "~7.0.0" - }, - "dependencies": { - "semver": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.0.0.tgz", - "integrity": "sha512-+GB6zVA9LWh6zovYQLALHwv5rb2PHGlJi3lfiqIHxR0uuwCgefcOJc59v9fv1w8GbStwxuuqqAjI9NMAOOgq1A==", - "dev": true - } - } - }, - "stockfish-nnue.wasm": { - "version": "1.0.0-1946a675.smolnet", - "resolved": "https://registry.npmjs.org/stockfish-nnue.wasm/-/stockfish-nnue.wasm-1.0.0-1946a675.smolnet.tgz", - "integrity": "sha512-ofHHGb60dsMuz1SFurbkUBStMz6zmSLEculHUYdryX3782dys785hWgY9HJVgxMZQW+uhAARFcwPtPlyeW/nZg==" - }, - "stockfish.wasm": { - "version": "0.10.0", - "resolved": "https://registry.npmjs.org/stockfish.wasm/-/stockfish.wasm-0.10.0.tgz", - "integrity": "sha512-OTvOlz0ijCSmIb/YvOZ1Dn6vwZVS4Ge3N+RcV0d2b6LXUtCJ9UwmBHypRW3DZ+VXf8WNm7E3P+6jMTVvb3QaBg==" - }, - "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 - }, - "supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", - "dev": true, - "requires": { - "has-flag": "^3.0.0" - } - }, - "supports-preserve-symlinks-flag": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", - "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", - "dev": true - }, - "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, - "requires": { - "is-number": "^7.0.0" - } - }, - "touch": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/touch/-/touch-3.1.0.tgz", - "integrity": "sha512-WBx8Uy5TLtOSRtIq+M03/sKDrXCLHxwDcquSP2c43Le03/9serjQBIztjRz6FkJez9D/hleyAXTBGLwwZUw9lA==", - "dev": true, - "requires": { - "nopt": "~1.0.10" - } - }, - "ts-node": { - "version": "10.9.1", - "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.9.1.tgz", - "integrity": "sha512-NtVysVPkxxrwFGUUxGYhfux8k78pQB3JqYBXlLRZgdGUqTO5wU/UyHop5p70iEbGhB7q5KmiZiU0Y3KlJrScEw==", - "dev": true, - "requires": { - "@cspotcode/source-map-support": "^0.8.0", - "@tsconfig/node10": "^1.0.7", - "@tsconfig/node12": "^1.0.7", - "@tsconfig/node14": "^1.0.0", - "@tsconfig/node16": "^1.0.2", - "acorn": "^8.4.1", - "acorn-walk": "^8.1.1", - "arg": "^4.1.0", - "create-require": "^1.1.0", - "diff": "^4.0.1", - "make-error": "^1.1.1", - "v8-compile-cache-lib": "^3.0.1", - "yn": "3.1.1" - } - }, - "tsconfig-paths": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-4.1.2.tgz", - "integrity": "sha512-uhxiMgnXQp1IR622dUXI+9Ehnws7i/y6xvpZB9IbUVOPy0muvdvgXeZOn88UcGPiT98Vp3rJPTa8bFoalZ3Qhw==", - "dev": true, - "requires": { - "json5": "^2.2.2", - "minimist": "^1.2.6", - "strip-bom": "^3.0.0" - } - }, - "ttypescript": { - "version": "1.5.15", - "resolved": "https://registry.npmjs.org/ttypescript/-/ttypescript-1.5.15.tgz", - "integrity": "sha512-48ykDNHzFnPMnv4hYX1P8Q84TvCZyL1QlFxeuxsuZ48X2+ameBgPenvmCkHJtoOSxpoWTWi8NcgNrRnVDOmfSg==", - "dev": true, - "requires": { - "resolve": ">=1.9.0" - } - }, - "typescript": { - "version": "4.9.5", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.5.tgz", - "integrity": "sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g==", - "dev": true - }, - "typescript-transform-paths": { - "version": "3.4.6", - "resolved": "https://registry.npmjs.org/typescript-transform-paths/-/typescript-transform-paths-3.4.6.tgz", - "integrity": "sha512-qdgpCk9oRHkIBhznxaHAapCFapJt5e4FbFik7Y4qdqtp6VyC3smAIPoDEIkjZ2eiF7x5+QxUPYNwJAtw0thsTw==", - "dev": true, - "requires": { - "minimatch": "^3.0.4" - } - }, - "undefsafe": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/undefsafe/-/undefsafe-2.0.5.tgz", - "integrity": "sha512-WxONCrssBM8TSPRqN5EmsjVrsv4A8X12J4ArBiiayv3DyyG3ZlIg6yysuuSYdZsVz3TKcTg2fd//Ujd4CHV1iA==", - "dev": true - }, - "utf-8-validate": { - "version": "5.0.10", - "resolved": "https://registry.npmjs.org/utf-8-validate/-/utf-8-validate-5.0.10.tgz", - "integrity": "sha512-Z6czzLq4u8fPOyx7TU6X3dvUZVvoJmxSQ+IcrlmagKhilxlhZgxPK6C5Jqbkw1IDUmFTM+cz9QDnnLTwDz/2gQ==", - "optional": true, - "requires": { - "node-gyp-build": "^4.3.0" - } - }, - "v8-compile-cache-lib": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz", - "integrity": "sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==", - "dev": true - }, - "ws": { - "version": "8.13.0", - "resolved": "https://registry.npmjs.org/ws/-/ws-8.13.0.tgz", - "integrity": "sha512-x9vcZYTrFPC7aSIbj7sRCYo7L/Xb8Iy+pW0ng0wt2vCJv7M9HOMy0UoN3rr+IFC7hb7vXoqS+P9ktyLLLhO+LA==", - "requires": {} - }, - "yn": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/yn/-/yn-3.1.1.tgz", - "integrity": "sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==", - "dev": true - } } } diff --git a/package.json b/package.json index 272ba94..5bb2543 100644 --- a/package.json +++ b/package.json @@ -9,12 +9,11 @@ "main": "dist/server.js", "type": "module", "scripts": { - "build": "ttsc", + "build": "tspc", "clean": "tsc -b --clean", "dev": "nodemon --inspect src/server.ts", "start": "node .", "test": "ts-node-esm src/test/index.ts", - "cannon": "npx autocannon -c 500 -d 30 --renderStatusCodes --latency localhost:3000/bin", "generateKeys": "node ./bin/generateKeys.js" }, "keywords": [ @@ -33,22 +32,22 @@ }, "homepage": "modscleo4.dev.br/chess", "dependencies": { - "@prisma/client": "^4.9.0", + "@prisma/client": "^4.12.0", "dotenv": "^16.0.3", "midori": "github:modscleo4/midori", - "prisma": "^4.9.0", + "prisma": "^4.12.0", "stockfish-nnue.wasm": "^1.0.0-1946a675.smolnet", "stockfish.wasm": "^0.10.0", + "ts-patch": "^3.1.1", "ws": "^8.12.0" }, "devDependencies": { - "@types/node": "^18.11.18", + "@types/node": "^18.15.11", "@types/ws": "^8.5.4", - "nodemon": "^2.0.20", + "nodemon": "^2.0.22", "ts-node": "^10.9.1", - "tsconfig-paths": "^4.1.2", - "ttypescript": "^1.5.15", - "typescript": "^4.9.4", + "tsconfig-paths": "^4.2.0", + "typescript": "^5.0.3", "typescript-transform-paths": "^3.4.6" }, "engines": { diff --git a/src/app/handler/AuthHandler.ts b/src/app/handler/AuthHandler.ts index b18d3bc..16d7505 100644 --- a/src/app/handler/AuthHandler.ts +++ b/src/app/handler/AuthHandler.ts @@ -15,13 +15,15 @@ */ import { Application } from "midori/app"; -import { HTTPError } from "midori/errors"; -import { Hash } from "midori/hash"; -import { EStatusCode, Handler, Request, Response } from "midori/http"; +import { Auth } from "midori/auth"; +import { Handler, Request, Response } from "midori/http"; +import { JWT } from "midori/jwt"; +import { AuthServiceProvider, JWTServiceProvider } from "midori/providers"; +import { Payload } from "midori/util/jwt.js"; import { generateUUID } from "midori/util/uuid.js"; import UserDAO from "@core/dao/UserDAO.js"; -import { Auth } from "midori/auth"; + import { OpenIDServiceProvider } from "@app/providers/OpenIDServiceProvider.js"; import OpenIDService from "@app/services/OpenIDService.js"; @@ -44,11 +46,13 @@ export class Login extends Handler { export class Callback extends Handler { #openID: OpenIDService; + #jwt: JWT; constructor(app: Application) { super(app); this.#openID = app.services.get(OpenIDServiceProvider); + this.#jwt = app.services.get(JWTServiceProvider); } async handle(req: Request): Promise { @@ -89,8 +93,42 @@ export class Callback extends Handler { return Response.redirect('/'); } - const user = await identity_response.json(); + const OauthUser = await identity_response.json(); + + const user = await UserDAO.create({ + id: generateUUID(), + username: OauthUser.preferred_username, + password: null, + email: OauthUser.email, + }); + + const issuedAt = Date.now(); + const expires = 1000 * 60 * 60 * 1; // 1 hour + + const token = this.#jwt.sign( { + iss: "http://localhost:3000", + sub: user.id, + //exp: Math.ceil((issuedAt + expires) / 1000), + iat: Math.floor(issuedAt / 1000), + jti: generateUUID(), - return Response.send(Buffer.from(``)); + username: user.username, + }); + + return Response.send(Buffer.from(``)); + } +} + +export class User extends Handler { + #auth: Auth; + + constructor(app: Application) { + super(app); + + this.#auth = app.services.get(AuthServiceProvider); + } + + async handle(req: Request): Promise { + return Response.json(this.#auth.user(req)); } } diff --git a/src/app/handler/GamesHandler.ts b/src/app/handler/GamesHandler.ts index 32523bc..033dd18 100644 --- a/src/app/handler/GamesHandler.ts +++ b/src/app/handler/GamesHandler.ts @@ -13,9 +13,8 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -import { Application, Server } from "midori/app"; -import { HTTPError } from "midori/errors"; -import { EStatusCode, Handler, Request, Response } from "midori/http"; +import { Application } from "midori/app"; +import { Handler, Request, Response } from "midori/http"; import GamesServiceProvider from "@app/providers/GamesServiceProvider.js"; import GamesService from "@app/services/GamesService.js"; @@ -40,8 +39,10 @@ export class Played extends Handler { const gamesFormatted = []; for (const [gameId, game] of this.#games) { if ( - !(game.player1Name === username && game.player1Secret === secret - || game.player2Name === username && game.player2Secret === secret) + game.player1Name !== username + || game.player1Secret !== secret + || game.player2Name !== username + || game.player2Secret !== secret ) { continue; } diff --git a/src/app/middleware/OauthScopeMiddleware.ts b/src/app/middleware/OauthScopeMiddleware.ts index 00d6bce..cbcd55a 100644 --- a/src/app/middleware/OauthScopeMiddleware.ts +++ b/src/app/middleware/OauthScopeMiddleware.ts @@ -21,8 +21,8 @@ import { Constructor } from "midori/util/types.js"; export default function OauthScopeMiddlewareFactory(options: { scopes: string[]; }): Constructor { return class extends Middleware { async process(req: Request, next: (req: Request) => Promise): Promise { - if (req.container.get('jwt')) { - const userScopes = (req.container.get('jwt').scope ?? '').split(' '); + if (req.container.get('::jwt')) { + const userScopes = (req.container.get('::jwt').scope ?? '').split(' '); for (const scope of options.scopes) { if (!userScopes.includes(scope)) { throw new HTTPError(`Insufficient permissions: ${scope}`, EStatusCode.FORBIDDEN); diff --git a/src/app/providers/GamesServiceProvider.ts b/src/app/providers/GamesServiceProvider.ts index fd68fd4..264ba83 100644 --- a/src/app/providers/GamesServiceProvider.ts +++ b/src/app/providers/GamesServiceProvider.ts @@ -14,13 +14,14 @@ * limitations under the License. */ -import { ServiceProvider, Server } from 'midori/app'; +import { ServiceProvider, Application } from 'midori/app'; + import GamesService from '@app/services/GamesService.js'; export default class GamesServiceProvider extends ServiceProvider { static service: string = 'ChessGames'; - register(server: Server): GamesService { + register(app: Application): GamesService { return new GamesService(); } } diff --git a/src/app/providers/OpenIDServiceProvider.ts b/src/app/providers/OpenIDServiceProvider.ts index b4021e3..0969725 100644 --- a/src/app/providers/OpenIDServiceProvider.ts +++ b/src/app/providers/OpenIDServiceProvider.ts @@ -14,17 +14,18 @@ * limitations under the License. */ -import OpenIDService from "@app/services/OpenIDService.js"; -import { Server, ServiceProvider } from "midori/app"; +import { Application, ServiceProvider } from "midori/app"; import { Constructor } from "midori/util/types.js"; +import OpenIDService from "@app/services/OpenIDService.js"; + export abstract class OpenIDServiceProvider extends ServiceProvider { static service: string = 'OpenID'; } export default function (openIDService: OpenIDService): Constructor & { [K in keyof typeof OpenIDServiceProvider]: typeof OpenIDServiceProvider[K] } { return class extends OpenIDServiceProvider { - register(server: Server): OpenIDService { + register(app: Application): OpenIDService { return openIDService; } }; diff --git a/src/app/routes/index.ts b/src/app/routes/index.ts index dccf231..e78c38b 100644 --- a/src/app/routes/index.ts +++ b/src/app/routes/index.ts @@ -28,6 +28,9 @@ const Router = new RouterWrapper(); * Use the Router.get(), Router.post(), Router.put(), Router.patch(), Router.delete() methods to define your routes * Use the Router.group() method to group routes under a common prefix * Use the Router.route() method to define a route using a custom HTTP method + * + * Beware of trailing slashes! The Dispatcher Middleware will NOT remove nor add trailing slashes to the request path + * `GET /foo` and `GET /foo/` are different routes and will be dispatched to different handlers */ Router.get('/login', AuthHandler.Login).withName('auth.login'); @@ -35,7 +38,7 @@ Router.get('/auth/callback', AuthHandler.Callback).withName('auth.callback'); Router.group('/api', () => { Router.group('/games', () => { - Router.get('/', GamesHandler.List).withName('api.games.list'); + Router.get('', GamesHandler.List).withName('api.games.list'); Router.get('/played', GamesHandler.Played).withName('api.games.played'); }); }); diff --git a/src/config.ts b/src/config.ts new file mode 100644 index 0000000..798a79f --- /dev/null +++ b/src/config.ts @@ -0,0 +1,76 @@ +/** + * Copyright 2023 Dhiego Cassiano Fogaça Barbosa + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { Server } from "midori/app"; +import { + CORSConfigProviderFactory, + ErrorConfigProviderFactory, + JWTConfigProviderFactory, + RequestConfigProviderFactory, + ResponseConfigProviderFactory +} from "midori/providers"; + +/** + * Configuration Providers + * + * Define your configuration providers here. + * Use the server.configure() method to add configuration providers to the application. + * Use the app.config.get() method to recover the configuration in your handlers and/or middleware constructors. + */ + +export default function config(server: Server): void { + // Add configs here using `server.configure(ConfigProviderFactory(config))` + // Recover the config with app.config.get(ConfigProvider) in your handlers and middleware constructors + + server.configure(CORSConfigProviderFactory({ + origin: process.env.CORS_ORIGIN || '*', + methods: '*', + headers: '*', + maxAge: 86400, + openerPolicy: 'same-origin', + embedderPolicy: 'unsafe-none' + })); + + server.configure(ErrorConfigProviderFactory({ + exposeErrors: process.env.EXPOSE_ERRORS?.toUpperCase() === 'TRUE', + })); + + server.configure(JWTConfigProviderFactory({ + sign: { + alg: process.env.JWS_ALGORITHM || 'HS256', + secret: process.env.JWS_SECRET, + privateKeyFile: process.env.JWS_PRIVATE_KEY + }, + encrypt: { + alg: process.env.JWE_ALGORITHM || 'RSA-OAEP-256', + enc: process.env.JWE_ENCRYPTION || 'A256GCM', + secret: process.env.JWE_SECRET, + privateKeyFile: process.env.JWE_PRIVATE_KEY, + ephemeralPrivateKeyFile: process.env.JWE_EPHEMERAL_KEY, + }, + })); + + server.configure(RequestConfigProviderFactory({ + maxBodySize: 1024 * 1024, + })); + + server.configure(ResponseConfigProviderFactory({ + compression: { + enabled: false, + contentTypes: ['*/*'], + }, + })); +} diff --git a/src/core/dao/UserDAO.ts b/src/core/dao/UserDAO.ts index 3e60922..f294a20 100644 --- a/src/core/dao/UserDAO.ts +++ b/src/core/dao/UserDAO.ts @@ -32,14 +32,12 @@ export default class UserDAO { return await prisma.user.findFirst(args); } - static async save(id: string, { username }: { username: string; }): Promise { + static async save(id: string, data: PrismaDTO.UserUpdateInput): Promise { return await prisma.user.update({ where: { id }, - data: { - username, - } + data }); } diff --git a/src/core/lib/chess.ts b/src/core/lib/chess.ts index f2c358e..ff63bee 100644 --- a/src/core/lib/chess.ts +++ b/src/core/lib/chess.ts @@ -1,4 +1,4 @@ -import { replaceAt } from "./util.js"; +import { randomBetween, replaceAt } from "./util.js"; export type Piece = { char: PieceChar; @@ -299,7 +299,7 @@ export function insufficientMaterial(board: Board): boolean { return false; } -export function threefoldRepetition(fen: string): boolean { +export function threefoldRepetition(fen: string[]): boolean { if (fen.length >= 6) { const currMov = fen[fen.length - 1]; let dup = 1; diff --git a/src/cron.ts b/src/cron.ts new file mode 100644 index 0000000..a8da547 --- /dev/null +++ b/src/cron.ts @@ -0,0 +1,28 @@ +/** + * Copyright 2023 Dhiego Cassiano Fogaça Barbosa + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { Server } from "midori/app"; + +/** + * Cron Jobs + * + * Define your cron jobs here. + * Use the server.schedule() method to add cron jobs to the application. + */ + +export default function cron(server: Server): void { + +} diff --git a/src/pipeline.ts b/src/pipeline.ts index 55bf114..74b5b6e 100644 --- a/src/pipeline.ts +++ b/src/pipeline.ts @@ -16,9 +16,9 @@ import { Server } from "midori/app"; import { - CORSMiddlewareFactory, + CORSMiddleware, DispatchMiddleware, - ErrorMiddlewareFactory, + ErrorMiddleware, ErrorLoggerMiddleware, HTTPErrorMiddleware, ImplicitHeadMiddleware, @@ -28,10 +28,18 @@ import { ParseBodyMiddleware, PublicPathMiddlewareFactory, RequestLoggerMiddleware, + ResponseCompressionMiddleware, RouterMiddleware, - ResponseCompressionMiddlewareFactory, } from "midori/middlewares"; +/** + * Pipelining + * + * Define your pipeline here. + * Use the server.pipe() method to add middlewares to the pipeline. + * The order here matters, as the middlewares are chained in the same order they are added. + */ + export default function pipeline(server: Server): void { /** * Log every request using the Logger Service Provider @@ -40,12 +48,15 @@ export default function pipeline(server: Server): void { */ server.pipe(RequestLoggerMiddleware); + // Add CORS headers to every response + server.pipe(CORSMiddleware); + /** * Handle any uncaught Error during the request processing * * This middleware should be one of the first middlewares in the pipeline */ - server.pipe(ErrorMiddlewareFactory({ exposeErrors: process.env.EXPOSE_ERRORS?.toUpperCase() === 'TRUE' })); + server.pipe(ErrorMiddleware); /** * Log every error using the Logger Service Provider @@ -61,8 +72,7 @@ export default function pipeline(server: Server): void { // Add your own pre-processing middlewares here // - //server.pipe(ResponseCompressionMiddlewareFactory({ contentTypes: ['*/*'] })); - server.pipe(CORSMiddlewareFactory({ origin: '*', openerPolicy: 'same-origin', embedderPolicy: 'require-corp' })); + server.pipe(ResponseCompressionMiddleware); /** * Register the router middleware, which will handle all incoming requests @@ -104,6 +114,6 @@ export default function pipeline(server: Server): void { * When no route matches the request, PublicPathMiddleware will try to find a matching file in the public directory. * The public directory is relative to the project root. */ - !server.production && server.pipe(PublicPathMiddlewareFactory({ path: './public', cache: { maxAge: 604800 } })); + !server.production && server.pipe(PublicPathMiddlewareFactory({ path: './public' })); server.pipe(NotFoundMiddleware); } diff --git a/src/providers.ts b/src/providers.ts index 8e3494f..0871bd7 100644 --- a/src/providers.ts +++ b/src/providers.ts @@ -16,13 +16,12 @@ import { Server } from "midori/app"; import { Scrypt } from "midori/hash"; -import { JWT } from "midori/jwt"; import { ConsoleLogger, LogLevel } from "midori/log"; import { AuthServiceProvider, HashServiceProvider, HashServiceProviderFactory, - JWTServiceProviderFactory, + JWTServiceProvider, LoggerServiceProviderFactory, RouterServiceProviderFactory, UserServiceProviderFactory @@ -34,13 +33,21 @@ import OpenIDServiceProvider from "@app/providers/OpenIDServiceProvider.js"; import GamesServiceProvider from "@app/providers/GamesServiceProvider.js"; import OpenIDService from "@app/services/OpenIDService.js"; +/** + * Service Providers + * + * Define your service providers here. + * Use the server.install() method to install service providers to the application. + * Use the app.services.get() method to recover the service in your handlers and/or middleware constructors. + */ + export default function providers(server: Server): void { server.install(RouterServiceProviderFactory(router)); server.install(LoggerServiceProviderFactory(new ConsoleLogger({ colorsEnabled: true, minLevel: LogLevel.DEBUG }))); // Add providers here // Recover the provider with app.services.get(ServiceProvider) in your handlers and middleware constructors - server.install(JWTServiceProviderFactory(new JWT({ alg: process.env.JWS_ALGORITHM || 'HS256', secret: process.env.JWS_SECRET || 'secret', privateKeyFile: process.env.JWS_PRIVATE_KEY }, { alg: process.env.JWE_ALGORITHM || 'RSA-OAEP', enc: process.env.JWE_ENCRYPTION || 'A256GCM', secret: process.env.JWE_SECRET, privateKeyFile: process.env.JWE_PRIVATE_KEY || '' }))); + server.install(JWTServiceProvider); server.install(HashServiceProviderFactory(new Scrypt())); server.install(UserServiceProviderFactory(new PrismaUserService(server.services.get(HashServiceProvider)))); server.install(AuthServiceProvider); diff --git a/src/server.ts b/src/server.ts index 7309b9c..b4770a9 100644 --- a/src/server.ts +++ b/src/server.ts @@ -20,17 +20,24 @@ import { Server } from "midori/app"; import { prisma } from "@core/lib/Prisma.js"; +import config from './config.js'; +import cron from './cron.js'; import pipeline from './pipeline.js'; import providers from './providers.js'; import ws from './ws.js'; dotenv.config({ override: true }); -dotenv.config({ path: './.env.dev', override: true }); export const server = new Server({ production: process.env.NODE_ENV?.toUpperCase() === 'PRODUCTION' }); +if (!server.production) { + dotenv.config({ path: './.env.dev' }); +} + +config(server); providers(server); pipeline(server); +cron(server); ws(server); const port = parseInt(process.env.PORT || '3000'); diff --git a/src/ws.ts b/src/ws.ts index ef51742..041ca1f 100644 --- a/src/ws.ts +++ b/src/ws.ts @@ -15,24 +15,19 @@ */ import WebSocket, { WebSocketServer } from 'ws'; -import { randomBytes } from 'node:crypto'; import { Server } from 'midori/app'; -import { Logger } from 'midori/log'; -import { LoggerServiceProvider } from 'midori/providers'; +import { JWTServiceProvider, LoggerServiceProvider } from 'midori/providers'; import GamesServiceProvider from '@app/providers/GamesServiceProvider.js'; -import GamesService, { Game } from '@app/services/GamesService.js'; +import { Game } from '@app/services/GamesService.js'; import * as Chess from '@core/lib/chess.js'; +import { generateUUID } from 'midori/util/uuid.js'; type Socket = WebSocket & { gameID: string; }; -function randomString(n: number = 64): string { - return randomBytes(n).toString('hex'); -} - function regenerateArray(game: Game, fen: string = 'rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1') { game.lastMoved = null; game.board = Chess.generateArray(fen); @@ -60,11 +55,18 @@ function boardAt(game: Game, n: number) { } export default function ws(server: Server): void { - const logger: Logger = server.services.get(LoggerServiceProvider); - const games: GamesService = server.services.get(GamesServiceProvider); + const logger = server.services.get(LoggerServiceProvider); + const games = server.services.get(GamesServiceProvider); + const jwt = server.services.get(JWTServiceProvider); const ws = new WebSocketServer({ server }); - const commands: { [command: string]: (socket: Socket, data: any) => Promise } = { + function generateToken() { + const id = generateUUID(); + + return jwt.encrypt(Buffer.from(JSON.stringify({ sub: id })), 'JWT'); + } + + const commands: { [command: string]: (socket: Socket, data: any) => Promise; } = { async createGame(socket: Socket, data: { playerColor: string, timePlayer: number, timeInc: number, playerName: string; }) { data.timePlayer === -1 && (data.timePlayer = Infinity); @@ -86,7 +88,7 @@ export default function ws(server: Server): void { player1Timer: 0, player1TimerFn: null, player1Color: 'white', - player1Secret: (data.playerColor === 'white' && randomString()) || null, + player1Secret: (data.playerColor === 'white' && generateToken()) || null, player2: (data.playerColor === 'black' && socket) || null, player2Name: (data.playerColor === 'black' && data.playerName) || '', @@ -94,7 +96,7 @@ export default function ws(server: Server): void { player2Timer: 0, player2TimerFn: null, player2Color: 'black', - player2Secret: (data.playerColor === 'black' && randomString()) || null, + player2Secret: (data.playerColor === 'black' && generateToken()) || null, lastRequestUndo: null, lastRequestDraw: null, @@ -135,7 +137,7 @@ export default function ws(server: Server): void { socket.gameID = gameid; }, - async joinGame(socket: Socket, data: { gameid: string, playerName: string, secret: string }) { + async joinGame(socket: Socket, data: { gameid: string, playerName: string, secret: string; }) { const game = games.get(data.gameid); if (!game || game.result) { @@ -160,12 +162,12 @@ export default function ws(server: Server): void { game.player1 = socket; game.player1Name = data.playerName; game.player1Connected = true; - game.player1Secret = randomString(); + game.player1Secret = generateToken(); } else if (!game.player2Connected && (!game.player2Secret || game.player2Secret === data.secret)) { game.player2 = socket; game.player2Name = data.playerName; game.player2Connected = true; - game.player2Secret = randomString(); + game.player2Secret = generateToken(); } else { socket.send(JSON.stringify({ command: 'alreadyConnected', @@ -229,7 +231,7 @@ export default function ws(server: Server): void { } }, - async spectate(socket: Socket, data: { gameid: string }) { + async spectate(socket: Socket, data: { gameid: string; }) { const game = games.get(data.gameid); if (!game) { @@ -270,7 +272,7 @@ export default function ws(server: Server): void { } }, - async commitMovement(socket: Socket, data: { i: number, j: number, newI: number, newJ: number, promoteTo: 'Q' | 'R' | 'B' | 'N' }) { + async commitMovement(socket: Socket, data: { i: number, j: number, newI: number, newJ: number, promoteTo: 'Q' | 'R' | 'B' | 'N'; }) { const game = games.get(socket.gameID); if (!game) { return; @@ -304,7 +306,7 @@ export default function ws(server: Server): void { King && (( King).checked = check); - game.takenPieces.push( [...(game.takenPieces[game.takenPieces.length - 1] ?? []), takenPiece].filter(p => p !== null)); + game.takenPieces.push([...(game.takenPieces[game.takenPieces.length - 1] ?? []), takenPiece].filter(p => p !== null)); const fen = Chess.boardToFEN(game.board, false, piece, game.currPlayer === 'white' ? 'black' : 'white', data.newI, data.newJ, true, game.noCaptureOrPawnsQ, game.movements); @@ -544,7 +546,7 @@ export default function ws(server: Server): void { let reason = 'requested'; if (game.noCaptureOrPawnsQ === 100) { reason = '50-moves'; - } else if (Chess.threefoldRepetition(game.fen[game.fen.length - 1])) { + } else if (Chess.threefoldRepetition(game.fen)) { reason = 'threefold'; } @@ -626,7 +628,7 @@ export default function ws(server: Server): void { }, - async changeUsername(socket: Socket, data: { oldUsername: string, newUsername: string }) { + async changeUsername(socket: Socket, data: { oldUsername: string, newUsername: string; }) { const game = games.get(socket.gameID); if (!game) { return; diff --git a/tsconfig.json b/tsconfig.json index 43d2ffa..4774984 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,7 +1,7 @@ { "compilerOptions": { "moduleResolution": "NodeNext", - "module": "ESNext", + "module": "NodeNext", "target": "ESNext", "sourceMap": true, "outDir": "./dist",