diff --git a/server/.eslintrc.js b/server/.eslintrc.js index 6eece3f..57e57d8 100644 --- a/server/.eslintrc.js +++ b/server/.eslintrc.js @@ -5,7 +5,7 @@ module.exports = { tsconfigRootDir : __dirname, sourceType: 'module', }, - plugins: ['@typescript-eslint/eslint-plugin'], + plugins: ['@typescript-eslint/eslint-plugin', 'sort-class-members'], extends: [ 'plugin:@typescript-eslint/recommended', 'plugin:prettier/recommended', @@ -23,11 +23,26 @@ module.exports = { '@typescript-eslint/no-explicit-any': 'off', '@typescript-eslint/no-floating-promises': 'error', '@typescript-eslint/no-misused-promises': 'error', - "prettier/prettier": [ - "error", + 'prettier/prettier': [ + 'error', { - "endOfLine": "auto" + 'endOfLine': 'auto' }, ], + 'sort-class-members/sort-class-members': [ + 2, + { + 'order': [ + '[static-properties]', + '[static-methods]', + '[properties]', + '[conventional-private-properties]', + 'constructor', + '[methods]', + '[conventional-private-methods]' + ], + 'accessorPairPositioning': 'getThenSet' + } + ] }, }; diff --git a/server/package-lock.json b/server/package-lock.json index d723173..44706ea 100644 --- a/server/package-lock.json +++ b/server/package-lock.json @@ -26,6 +26,7 @@ "@nestjs/websockets": "^10.2.4", "bcrypt": "^5.1.0", "censor-sensor": "^1.0.6", + "eslint-plugin-sort-class-members": "^1.18.0", "fast-json-patch": "^3.1.1", "fs-extra": "^11.1.1", "gameanalytics-node-sdk": "^1.1.4", @@ -856,7 +857,6 @@ "version": "4.4.0", "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz", "integrity": "sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA==", - "dev": true, "dependencies": { "eslint-visitor-keys": "^3.3.0" }, @@ -871,7 +871,6 @@ "version": "4.5.1", "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.5.1.tgz", "integrity": "sha512-Z5ba73P98O1KUYCCJTUeVpja9RcGoMdncZ6T49FCUl2lN38JtCJ+3WgIDBv0AuY4WChU5PmtJmOCTlN6FZTFKQ==", - "dev": true, "engines": { "node": "^12.0.0 || ^14.0.0 || >=16.0.0" } @@ -880,7 +879,6 @@ "version": "2.0.3", "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.0.3.tgz", "integrity": "sha512-+5gy6OQfk+xx3q0d6jGZZC3f3KzAkXc/IanVxd1is/VIIziRqqt3ongQz0FiTUXqTk0c7aDB3OaFuKnuSoJicQ==", - "dev": true, "dependencies": { "ajv": "^6.12.4", "debug": "^4.3.2", @@ -903,7 +901,6 @@ "version": "4.3.4", "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", - "dev": true, "dependencies": { "ms": "2.1.2" }, @@ -919,14 +916,12 @@ "node_modules/@eslint/eslintrc/node_modules/ms": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", - "dev": true + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" }, "node_modules/@eslint/js": { "version": "8.42.0", "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.42.0.tgz", "integrity": "sha512-6SWlXpWU5AvId8Ac7zjzmIOqMOba/JWY8XZ4A7q7Gn1Vlfg/SFFIlrtHXt9nPn4op9ZPAkl91Jao+QQv3r/ukw==", - "dev": true, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" } @@ -1017,7 +1012,6 @@ "version": "0.11.10", "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.10.tgz", "integrity": "sha512-KVVjQmNUepDVGXNuoRRdmmEjruj0KfiGSbS8LVc12LMsWDQzRXJ0qdhN8L8uUigKpfEHRhlaQFY0ib1tnUbNeQ==", - "dev": true, "dependencies": { "@humanwhocodes/object-schema": "^1.2.1", "debug": "^4.1.1", @@ -1031,7 +1025,6 @@ "version": "4.3.4", "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", - "dev": true, "dependencies": { "ms": "2.1.2" }, @@ -1047,14 +1040,12 @@ "node_modules/@humanwhocodes/config-array/node_modules/ms": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", - "dev": true + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" }, "node_modules/@humanwhocodes/module-importer": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz", "integrity": "sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==", - "dev": true, "engines": { "node": ">=12.22" }, @@ -1066,8 +1057,7 @@ "node_modules/@humanwhocodes/object-schema": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-1.2.1.tgz", - "integrity": "sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA==", - "dev": true + "integrity": "sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA==" }, "node_modules/@istanbuljs/load-nyc-config": { "version": "1.1.0", @@ -3714,7 +3704,6 @@ "version": "5.3.2", "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==", - "dev": true, "peerDependencies": { "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" } @@ -3774,7 +3763,6 @@ "version": "6.12.6", "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", - "dev": true, "dependencies": { "fast-deep-equal": "^3.1.1", "fast-json-stable-stringify": "^2.0.0", @@ -4680,7 +4668,6 @@ "version": "3.1.0", "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", - "dev": true, "engines": { "node": ">=6" } @@ -5132,7 +5119,6 @@ "version": "7.0.3", "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", - "dev": true, "dependencies": { "path-key": "^3.1.0", "shebang-command": "^2.0.0", @@ -5221,8 +5207,7 @@ "node_modules/deep-is": { "version": "0.1.4", "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", - "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==", - "dev": true + "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==" }, "node_modules/deepmerge": { "version": "4.3.1", @@ -5351,7 +5336,6 @@ "version": "3.0.0", "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", - "dev": true, "dependencies": { "esutils": "^2.0.2" }, @@ -5578,7 +5562,6 @@ "version": "8.42.0", "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.42.0.tgz", "integrity": "sha512-ulg9Ms6E1WPf67PHaEY4/6E2tEn5/f7FXGzr3t9cBMugOmf1INYvuUwwh1aXQN4MfJ6a5K2iNwP3w4AColvI9A==", - "dev": true, "dependencies": { "@eslint-community/eslint-utils": "^4.2.0", "@eslint-community/regexpp": "^4.4.0", @@ -5663,6 +5646,17 @@ } } }, + "node_modules/eslint-plugin-sort-class-members": { + "version": "1.18.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-sort-class-members/-/eslint-plugin-sort-class-members-1.18.0.tgz", + "integrity": "sha512-y4r5OC3LJNHJZCWfVwFnnRiNrQ/LRf7Pb1wD6/CP8Y4qmUvjtmkwrLvyY755p8SFTOOXVd33HgFuF3XxVW1xbg==", + "engines": { + "node": ">=4.0.0" + }, + "peerDependencies": { + "eslint": ">=0.8.0" + } + }, "node_modules/eslint-scope": { "version": "5.1.1", "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz", @@ -5680,7 +5674,6 @@ "version": "3.4.1", "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.1.tgz", "integrity": "sha512-pZnmmLwYzf+kWaM/Qgrvpen51upAktaaiI01nsJD/Yr3lMOdNtq0cxkrrg16w64VtisN6okbs7Q8AfGqj4c9fA==", - "dev": true, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" }, @@ -5692,7 +5685,6 @@ "version": "4.3.4", "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", - "dev": true, "dependencies": { "ms": "2.1.2" }, @@ -5709,7 +5701,6 @@ "version": "4.0.0", "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", - "dev": true, "engines": { "node": ">=10" }, @@ -5721,7 +5712,6 @@ "version": "7.2.0", "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.2.0.tgz", "integrity": "sha512-DYj5deGlHBfMt15J7rdtyKNq/Nqlv5KfU4iodrQ019XESsRnwXH9KAE0y3cwtUHDo2ob7CypAnCqefh6vioWRw==", - "dev": true, "dependencies": { "esrecurse": "^4.3.0", "estraverse": "^5.2.0" @@ -5737,7 +5727,6 @@ "version": "5.3.0", "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", - "dev": true, "engines": { "node": ">=4.0" } @@ -5746,7 +5735,6 @@ "version": "6.0.2", "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", - "dev": true, "dependencies": { "is-glob": "^4.0.3" }, @@ -5757,14 +5745,12 @@ "node_modules/eslint/node_modules/ms": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", - "dev": true + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" }, "node_modules/espree": { "version": "9.5.2", "resolved": "https://registry.npmjs.org/espree/-/espree-9.5.2.tgz", "integrity": "sha512-7OASN1Wma5fum5SrNhFMAMJxOUAbhyfQ8dQ//PJaJbNw0URTPWqIghHWt1MmAANKhHZIYOHruW4Kw4ruUWOdGw==", - "dev": true, "dependencies": { "acorn": "^8.8.0", "acorn-jsx": "^5.3.2", @@ -5793,7 +5779,6 @@ "version": "1.5.0", "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.5.0.tgz", "integrity": "sha512-YQLXUplAwJgCydQ78IMJywZCceoqk1oH01OERdSAJc/7U2AylwjhSCLDEtqwg811idIS/9fIU5GjG73IgjKMVg==", - "dev": true, "dependencies": { "estraverse": "^5.1.0" }, @@ -5805,7 +5790,6 @@ "version": "5.3.0", "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", - "dev": true, "engines": { "node": ">=4.0" } @@ -5814,7 +5798,6 @@ "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, "dependencies": { "estraverse": "^5.2.0" }, @@ -5826,7 +5809,6 @@ "version": "5.3.0", "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", - "dev": true, "engines": { "node": ">=4.0" } @@ -5844,7 +5826,6 @@ "version": "2.0.3", "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", - "dev": true, "engines": { "node": ">=0.10.0" } @@ -6115,8 +6096,7 @@ "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 + "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==" }, "node_modules/fast-json-stringify": { "version": "5.7.0", @@ -6154,8 +6134,7 @@ "node_modules/fast-levenshtein": { "version": "2.0.6", "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", - "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==", - "dev": true + "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==" }, "node_modules/fast-querystring": { "version": "1.1.2", @@ -6246,7 +6225,6 @@ "version": "6.0.1", "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz", "integrity": "sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==", - "dev": true, "dependencies": { "flat-cache": "^3.0.4" }, @@ -6360,7 +6338,6 @@ "version": "5.0.0", "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", - "dev": true, "dependencies": { "locate-path": "^6.0.0", "path-exists": "^4.0.0" @@ -6393,7 +6370,6 @@ "version": "3.0.4", "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.0.4.tgz", "integrity": "sha512-dm9s5Pw7Jc0GvMYbshN6zchCA9RgQlzzEZX3vylR9IqFfS8XciblUXOKfW6SiuJ0e13eDYZoZV5wdrev7P3Nwg==", - "dev": true, "dependencies": { "flatted": "^3.1.0", "rimraf": "^3.0.2" @@ -6405,8 +6381,7 @@ "node_modules/flatted": { "version": "3.2.7", "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.2.7.tgz", - "integrity": "sha512-5nqDSxl8nn5BSNxyR3n4I6eDmbolI6WT+QqR547RwxQapgjQBmtktdP+HTBb/a/zLsbzERTONyUB5pefh5TtjQ==", - "dev": true + "integrity": "sha512-5nqDSxl8nn5BSNxyR3n4I6eDmbolI6WT+QqR547RwxQapgjQBmtktdP+HTBb/a/zLsbzERTONyUB5pefh5TtjQ==" }, "node_modules/follow-redirects": { "version": "1.5.10", @@ -6733,7 +6708,6 @@ "version": "13.20.0", "resolved": "https://registry.npmjs.org/globals/-/globals-13.20.0.tgz", "integrity": "sha512-Qg5QtVkCy/kv3FUSlu4ukeZDVf9ee0iXLAUYX13gbR17bnejFTzr4iS9bY7kwCf1NztRNm1t91fjOiyx4CSwPQ==", - "dev": true, "dependencies": { "type-fest": "^0.20.2" }, @@ -6748,7 +6722,6 @@ "version": "0.20.2", "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", - "dev": true, "engines": { "node": ">=10" }, @@ -6816,8 +6789,7 @@ "node_modules/graphemer": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/graphemer/-/graphemer-1.4.0.tgz", - "integrity": "sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==", - "dev": true + "integrity": "sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==" }, "node_modules/has": { "version": "1.0.3", @@ -7074,7 +7046,6 @@ "version": "3.3.0", "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz", "integrity": "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==", - "dev": true, "dependencies": { "parent-module": "^1.0.0", "resolve-from": "^4.0.0" @@ -7114,7 +7085,6 @@ "version": "0.1.4", "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", "integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==", - "dev": true, "engines": { "node": ">=0.8.19" } @@ -7277,7 +7247,6 @@ "version": "3.0.3", "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.3.tgz", "integrity": "sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==", - "dev": true, "engines": { "node": ">=8" } @@ -7324,8 +7293,7 @@ "node_modules/isexe": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", - "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", - "dev": true + "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==" }, "node_modules/istanbul-lib-coverage": { "version": "3.2.0", @@ -8226,14 +8194,12 @@ "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 + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==" }, "node_modules/json-stable-stringify-without-jsonify": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", - "integrity": "sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==", - "dev": true + "integrity": "sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==" }, "node_modules/json-stringify-safe": { "version": "5.0.1", @@ -8345,7 +8311,6 @@ "version": "0.4.1", "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==", - "dev": true, "dependencies": { "prelude-ls": "^1.2.1", "type-check": "~0.4.0" @@ -8383,7 +8348,6 @@ "version": "6.0.0", "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", - "dev": true, "dependencies": { "p-locate": "^5.0.0" }, @@ -8408,8 +8372,7 @@ "node_modules/lodash.merge": { "version": "4.6.2", "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", - "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==", - "dev": true + "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==" }, "node_modules/log-symbols": { "version": "4.1.0", @@ -8797,8 +8760,7 @@ "node_modules/natural-compare": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", - "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==", - "dev": true + "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==" }, "node_modules/natural-compare-lite": { "version": "1.4.0", @@ -9057,7 +9019,6 @@ "version": "0.9.1", "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.1.tgz", "integrity": "sha512-74RlY5FCnhq4jRxVUPKDaRwrVNXMqsGsiW6AJw4XK8hmtm10wC0ypZBLw5IIp85NZMr91+qd1RvvENwg7jjRFw==", - "dev": true, "dependencies": { "deep-is": "^0.1.3", "fast-levenshtein": "^2.0.6", @@ -9156,7 +9117,6 @@ "version": "3.1.0", "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", - "dev": true, "dependencies": { "yocto-queue": "^0.1.0" }, @@ -9171,7 +9131,6 @@ "version": "5.0.0", "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", - "dev": true, "dependencies": { "p-limit": "^3.0.2" }, @@ -9200,7 +9159,6 @@ "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, "dependencies": { "callsites": "^3.0.0" }, @@ -9283,7 +9241,6 @@ "version": "4.0.0", "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", - "dev": true, "engines": { "node": ">=8" } @@ -9300,7 +9257,6 @@ "version": "3.1.1", "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", - "dev": true, "engines": { "node": ">=8" } @@ -9583,7 +9539,6 @@ "version": "1.2.1", "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", - "dev": true, "engines": { "node": ">= 0.8.0" } @@ -9982,7 +9937,6 @@ "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, "engines": { "node": ">=4" } @@ -10332,7 +10286,6 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", - "dev": true, "dependencies": { "shebang-regex": "^3.0.0" }, @@ -10344,7 +10297,6 @@ "version": "3.0.0", "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", - "dev": true, "engines": { "node": ">=8" } @@ -10731,7 +10683,6 @@ "version": "3.1.1", "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", - "dev": true, "engines": { "node": ">=8" }, @@ -11018,8 +10969,7 @@ "node_modules/text-table": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", - "integrity": "sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==", - "dev": true + "integrity": "sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==" }, "node_modules/tgrid": { "version": "0.8.7", @@ -11404,7 +11354,6 @@ "version": "0.4.0", "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==", - "dev": true, "dependencies": { "prelude-ls": "^1.2.1" }, @@ -11737,7 +11686,6 @@ "version": "2.0.2", "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", - "dev": true, "dependencies": { "isexe": "^2.0.0" }, @@ -11775,7 +11723,6 @@ "version": "1.2.5", "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.5.tgz", "integrity": "sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==", - "dev": true, "engines": { "node": ">=0.10.0" } @@ -11906,7 +11853,6 @@ "version": "0.1.0", "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", - "dev": true, "engines": { "node": ">=10" }, diff --git a/server/package.json b/server/package.json index 898c113..be4472b 100644 --- a/server/package.json +++ b/server/package.json @@ -40,6 +40,7 @@ "@nestjs/websockets": "^10.2.4", "bcrypt": "^5.1.0", "censor-sensor": "^1.0.6", + "eslint-plugin-sort-class-members": "^1.18.0", "fast-json-patch": "^3.1.1", "fs-extra": "^11.1.1", "gameanalytics-node-sdk": "^1.1.4", diff --git a/server/src/modules/achievements/achievements.schema.ts b/server/src/modules/achievements/achievements.schema.ts index 52156b6..87dbc8e 100644 --- a/server/src/modules/achievements/achievements.schema.ts +++ b/server/src/modules/achievements/achievements.schema.ts @@ -10,18 +10,15 @@ import { ObjectId } from '@mikro-orm/mongodb'; @Entity() export class Achievements implements IAchievements { - @PrimaryKey({ hidden: true }) - _id!: ObjectId; - @SerializedPrimaryKey({ hidden: true }) id!: string; - @Unique() @Property({ hidden: true }) userId: string; - @Property() achievements: Record; + @PrimaryKey({ hidden: true }) + _id!: ObjectId; constructor(userId: string) { this.userId = userId; diff --git a/server/src/modules/content/content.service.ts b/server/src/modules/content/content.service.ts index aa664c4..edc0822 100644 --- a/server/src/modules/content/content.service.ts +++ b/server/src/modules/content/content.service.ts @@ -24,10 +24,6 @@ censor.disableTier(2); @Injectable() export class ContentService { - public get censor(): CensorSensor { - return censor; - } - public content = { meta: {}, locations: {}, @@ -42,6 +38,12 @@ export class ContentService { npcs: {}, }; + constructor(private logger: Logger) {} + + public get censor(): CensorSensor { + return censor; + } + private get locations(): Record { return this.content.locations; } @@ -82,8 +84,6 @@ export class ContentService { return this.content.npcs; } - constructor(private logger: Logger) {} - public async reloadContent() { this.logger.log('Loading game content over HTTP...'); diff --git a/server/src/modules/crafting/crafting.schema.ts b/server/src/modules/crafting/crafting.schema.ts index 79766d8..60f227b 100644 --- a/server/src/modules/crafting/crafting.schema.ts +++ b/server/src/modules/crafting/crafting.schema.ts @@ -10,9 +10,6 @@ import { ObjectId } from '@mikro-orm/mongodb'; @Entity() export class Crafting implements ICrafting { - @PrimaryKey({ hidden: true }) - _id!: ObjectId; - @SerializedPrimaryKey({ hidden: true }) id!: string; @@ -25,7 +22,6 @@ export class Crafting implements ICrafting { @Property() armorerXp: number; - @Property() artisanLevel: number; @@ -44,6 +40,9 @@ export class Crafting implements ICrafting { @Property() currentlyCraftingDoneAt: number; + @PrimaryKey({ hidden: true }) + _id!: ObjectId; + constructor(userId: string) { this.userId = userId; diff --git a/server/src/modules/discoveries/discoveries.schema.ts b/server/src/modules/discoveries/discoveries.schema.ts index 028472c..89e4c14 100644 --- a/server/src/modules/discoveries/discoveries.schema.ts +++ b/server/src/modules/discoveries/discoveries.schema.ts @@ -10,9 +10,6 @@ import { ObjectId } from '@mikro-orm/mongodb'; @Entity() export class Discoveries implements IDiscoveries { - @PrimaryKey({ hidden: true }) - _id!: ObjectId; - @SerializedPrimaryKey({ hidden: true }) id!: string; @@ -59,6 +56,9 @@ export class Discoveries implements IDiscoveries { @Property() totalMonsterClaims: number; + @PrimaryKey({ hidden: true }) + _id!: ObjectId; + constructor(userId: string) { this.userId = userId; diff --git a/server/src/modules/fight/fight.schema.ts b/server/src/modules/fight/fight.schema.ts index 92a56d5..4fb3889 100644 --- a/server/src/modules/fight/fight.schema.ts +++ b/server/src/modules/fight/fight.schema.ts @@ -17,9 +17,6 @@ import { generateUUID } from '@utils/uuid'; @Entity() export class Fight implements IFight { - @PrimaryKey({ hidden: true }) - _id!: ObjectId; - @SerializedPrimaryKey() id!: string; @@ -54,6 +51,9 @@ export class Fight implements IFight { @Property() statusMessage: IFightStatusMessage[]; + @PrimaryKey({ hidden: true }) + _id!: ObjectId; + constructor( involvedPlayers: string[], turnOrder: string[], diff --git a/server/src/modules/inventory/inventory.schema.ts b/server/src/modules/inventory/inventory.schema.ts index f0e10a9..77e2992 100644 --- a/server/src/modules/inventory/inventory.schema.ts +++ b/server/src/modules/inventory/inventory.schema.ts @@ -10,24 +10,19 @@ import { ObjectId } from '@mikro-orm/mongodb'; @Entity() export class Inventory implements IInventory { - @PrimaryKey({ hidden: true }) - _id!: ObjectId; - @SerializedPrimaryKey({ hidden: true }) id!: string; - @Unique() @Property({ hidden: true }) userId: string; - @Property() equippedItems: Record; - @Property() otherJobEquipment: Record>; - @Property() resources: Record; + @PrimaryKey({ hidden: true }) + _id!: ObjectId; constructor(userId: string) { this.userId = userId; diff --git a/server/src/modules/inventory/inventoryitem.schema.ts b/server/src/modules/inventory/inventoryitem.schema.ts index 7156a42..91e7937 100644 --- a/server/src/modules/inventory/inventoryitem.schema.ts +++ b/server/src/modules/inventory/inventoryitem.schema.ts @@ -10,24 +10,19 @@ import { ObjectId } from '@mikro-orm/mongodb'; @Entity() export class InventoryItem implements IInventoryItem { - @PrimaryKey({ hidden: true }) - _id!: ObjectId; - @SerializedPrimaryKey({ hidden: true }) id!: string; - @Index() @Property({ hidden: true }) userId: string; - @Property() itemId: string; - @Property() instanceId: string; - @Property() isInUse: boolean; + @PrimaryKey({ hidden: true }) + _id!: ObjectId; constructor(userId: string, itemId: string, instanceId: string) { this.userId = userId; diff --git a/server/src/modules/lottery/dailylottery.schema.ts b/server/src/modules/lottery/dailylottery.schema.ts index 0b2688d..f4a5ec6 100644 --- a/server/src/modules/lottery/dailylottery.schema.ts +++ b/server/src/modules/lottery/dailylottery.schema.ts @@ -10,24 +10,19 @@ import { generateUUID } from '@utils/uuid'; @Entity() export class DailyRandomLottery { - @PrimaryKey({ hidden: true }) - _id!: ObjectId; - @SerializedPrimaryKey({ hidden: true }) id!: string; - @Property() internalId: string; - @Index() @Property() createdAt: Date; - @Property() winnerId: string; - @Property() claimed: boolean; + @PrimaryKey({ hidden: true }) + _id!: ObjectId; constructor(winnerId: string) { this.createdAt = new Date(); diff --git a/server/src/modules/market/marketitem.schema.ts b/server/src/modules/market/marketitem.schema.ts index 807a506..f84257b 100644 --- a/server/src/modules/market/marketitem.schema.ts +++ b/server/src/modules/market/marketitem.schema.ts @@ -11,9 +11,6 @@ import { generateUUID } from '@utils/uuid'; @Entity() export class MarketItem implements IMarketItem { - @PrimaryKey({ hidden: true }) - _id!: ObjectId; - @SerializedPrimaryKey({ hidden: true }) id!: string; @@ -49,6 +46,9 @@ export class MarketItem implements IMarketItem { @Property() meta: IMarketItemMeta; + @PrimaryKey({ hidden: true }) + _id!: ObjectId; + constructor( userId: string, itemId: string, diff --git a/server/src/modules/market/marketsale.schema.ts b/server/src/modules/market/marketsale.schema.ts index a118763..af823e4 100644 --- a/server/src/modules/market/marketsale.schema.ts +++ b/server/src/modules/market/marketsale.schema.ts @@ -11,9 +11,6 @@ import { generateUUID } from '@utils/uuid'; @Entity() export class MarketSale implements IMarketSale { - @PrimaryKey({ hidden: true }) - _id!: ObjectId; - @SerializedPrimaryKey({ hidden: true }) id!: string; @@ -49,6 +46,9 @@ export class MarketSale implements IMarketSale { @Index({ options: { expireAfterSeconds: 0 } }) expiresAt: Date; + @PrimaryKey({ hidden: true }) + _id!: ObjectId; + constructor( seller: string, buyer: string, diff --git a/server/src/modules/notification/notification.schema.ts b/server/src/modules/notification/notification.schema.ts index af92d32..53c02a9 100644 --- a/server/src/modules/notification/notification.schema.ts +++ b/server/src/modules/notification/notification.schema.ts @@ -11,9 +11,6 @@ import { generateUUID } from '@utils/uuid'; @Entity() export class Notification implements INotification { - @PrimaryKey({ hidden: true }) - _id!: ObjectId; - @SerializedPrimaryKey({ hidden: true }) id!: string; @@ -44,6 +41,9 @@ export class Notification implements INotification { @Property() actions?: INotificationAction[]; + @PrimaryKey({ hidden: true }) + _id!: ObjectId; + constructor( userId: string, text: string, diff --git a/server/src/modules/player/player.schema.ts b/server/src/modules/player/player.schema.ts index c6e5ddc..94b4c24 100644 --- a/server/src/modules/player/player.schema.ts +++ b/server/src/modules/player/player.schema.ts @@ -21,9 +21,6 @@ import { ObjectId } from '@mikro-orm/mongodb'; @Entity() export class Player implements IPlayer { - @PrimaryKey({ hidden: true }) - _id!: ObjectId; - @SerializedPrimaryKey({ hidden: true }) id!: string; @@ -73,6 +70,9 @@ export class Player implements IPlayer { @Property() cosmetics: IPlayerCosmetics; + @PrimaryKey({ hidden: true }) + _id!: ObjectId; + constructor(userId: string) { this.userId = userId; diff --git a/server/src/modules/stats/stats.schema.ts b/server/src/modules/stats/stats.schema.ts index 0745bc4..4ed9f7a 100644 --- a/server/src/modules/stats/stats.schema.ts +++ b/server/src/modules/stats/stats.schema.ts @@ -11,9 +11,6 @@ import { Discoveries } from '@modules/discoveries/discoveries.schema'; @Entity() export class Stats implements IStats { - @PrimaryKey({ hidden: true }) - _id!: ObjectId; - @SerializedPrimaryKey({ hidden: true }) id!: string; @@ -45,6 +42,9 @@ export class Stats implements IStats { @Property() stats: Partial>; + @PrimaryKey({ hidden: true }) + _id!: ObjectId; + constructor(userId: string) { this.userId = userId; diff --git a/server/src/modules/user/user.schema.ts b/server/src/modules/user/user.schema.ts index 46a81b3..f6b3c92 100644 --- a/server/src/modules/user/user.schema.ts +++ b/server/src/modules/user/user.schema.ts @@ -13,9 +13,6 @@ export type UserId = User['_id']; @Entity() export class User implements IUser { - @PrimaryKey() - _id!: ObjectId; - @SerializedPrimaryKey() id!: string; @@ -38,6 +35,9 @@ export class User implements IUser { @Property() email: string; + @PrimaryKey() + _id!: ObjectId; + constructor( username: string, discriminator: string, diff --git a/server/src/modules/wave/playerwave.schema.ts b/server/src/modules/wave/playerwave.schema.ts index 6b01166..1692b6b 100644 --- a/server/src/modules/wave/playerwave.schema.ts +++ b/server/src/modules/wave/playerwave.schema.ts @@ -9,23 +9,19 @@ import { ObjectId } from '@mikro-orm/mongodb'; @Entity() export class PlayerWave { - @PrimaryKey({ hidden: true }) - _id!: ObjectId; - @SerializedPrimaryKey({ hidden: true }) id!: string; - @Index() @Property() playerWaving: string; - @Index() @Property() playerWavingAt: string; - @Property() @Index({ options: { expireAfterSeconds: 0 } }) expiresAt: Date; + @PrimaryKey({ hidden: true }) + _id!: ObjectId; constructor( playerWaving: string,