From 67c3e0bbda2beeee7c26588be0683605443951bd Mon Sep 17 00:00:00 2001 From: q13x <84165981+WorldEditAxe@users.noreply.github.com> Date: Wed, 6 Mar 2024 15:25:02 -0800 Subject: [PATCH] Add EagProxyAAS password protection + direct connect --- package-lock.json | 1958 ++++-------------- src/plugins/EagProxyAAS/config.ts | 5 + src/plugins/EagProxyAAS/index.ts | 217 +- src/plugins/EagProxyAAS/service/endpoints.ts | 33 + src/plugins/EagProxyAAS/utils.ts | 430 +--- src/proxy/Player.ts | 130 +- src/proxy/Proxy.ts | 264 +-- src/proxy/Util.ts | 101 +- src/proxy/pluginLoader/PluginManager.ts | 269 +-- 9 files changed, 865 insertions(+), 2542 deletions(-) create mode 100644 src/plugins/EagProxyAAS/service/endpoints.ts diff --git a/package-lock.json b/package-lock.json index f0c9f6e..58efc8d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,7 +1,7 @@ { "name": "eaglerproxy", "version": "1.0.0", - "lockfileVersion": 2, + "lockfileVersion": 3, "requires": true, "packages": { "": { @@ -28,32 +28,30 @@ } }, "node_modules/@azure/msal-common": { - "version": "9.1.1", - "resolved": "https://registry.npmjs.org/@azure/msal-common/-/msal-common-9.1.1.tgz", - "integrity": "sha512-we9xR8lvu47fF0h+J8KyXoRy9+G/fPzm3QEa2TrdR3jaVS3LKAyE2qyMuUkNdbVkvzl8Zr9f7l+IUSP22HeqXw==", - "license": "MIT", + "version": "14.7.1", + "resolved": "https://registry.npmjs.org/@azure/msal-common/-/msal-common-14.7.1.tgz", + "integrity": "sha512-v96btzjM7KrAu4NSEdOkhQSTGOuNUIIsUdB8wlyB9cdgl5KqEKnTonHUZ8+khvZ6Ap542FCErbnTyDWl8lZ2rA==", "engines": { "node": ">=0.8.0" } }, "node_modules/@azure/msal-node": { - "version": "1.14.6", - "resolved": "https://registry.npmjs.org/@azure/msal-node/-/msal-node-1.14.6.tgz", - "integrity": "sha512-em/qqFL5tLMxMPl9vormAs13OgZpmQoJbiQ/GlWr+BA77eCLoL+Ehr5xRHowYo+LFe5b+p+PJVkRvT+mLvOkwA==", - "license": "MIT", + "version": "2.6.4", + "resolved": "https://registry.npmjs.org/@azure/msal-node/-/msal-node-2.6.4.tgz", + "integrity": "sha512-nNvEPx009/80UATCToF+29NZYocn01uKrB91xtFr7bSqkqO1PuQGXRyYwryWRztUrYZ1YsSbw9A+LmwOhpVvcg==", "dependencies": { - "@azure/msal-common": "^9.0.2", + "@azure/msal-common": "14.7.1", "jsonwebtoken": "^9.0.0", "uuid": "^8.3.0" }, "engines": { - "node": "10 || 12 || 14 || 16 || 18" + "node": ">=16" } }, "node_modules/@thi.ng/api": { - "version": "8.6.3", - "resolved": "https://registry.npmjs.org/@thi.ng/api/-/api-8.6.3.tgz", - "integrity": "sha512-zWaaVoR3GEVQbRNsp30dQP6Gb39guEmGKp5zbgWD3C5vmshZdp2huhiEQpCDARBGoVV3KiI/f03HdZ9YCCd7+A==", + "version": "8.9.27", + "resolved": "https://registry.npmjs.org/@thi.ng/api/-/api-8.9.27.tgz", + "integrity": "sha512-1aVTRA4G+MbYvHlLVk/xECCeBQbvtlT08zdZELGXHr55FqPA8M23Asv+ExtOBm7BX+BMpfOvOCFNK406hWcDKA==", "funding": [ { "type": "github", @@ -64,15 +62,14 @@ "url": "https://patreon.com/thing_umbrella" } ], - "license": "Apache-2.0", "engines": { - "node": ">=12.7" + "node": ">=18" } }, "node_modules/@thi.ng/arrays": { - "version": "2.5.1", - "resolved": "https://registry.npmjs.org/@thi.ng/arrays/-/arrays-2.5.1.tgz", - "integrity": "sha512-9jk/XXEPYLYtXWCsLZu3JW4pxaToOQo7Qj+g/PTkmy/9PXfLrzYyTgDMz6URSY/qbbdfPtnPMnldc1dRoiXr9w==", + "version": "2.8.5", + "resolved": "https://registry.npmjs.org/@thi.ng/arrays/-/arrays-2.8.5.tgz", + "integrity": "sha512-w9fMzqfnePtg9+SWRhVoKsA6czCUcYoiQdq0WlY2j0lpoq7cZZgivj1RHrn+UNsLyR16sod/uhABH6pjilM7Gg==", "funding": [ { "type": "github", @@ -83,23 +80,22 @@ "url": "https://patreon.com/thing_umbrella" } ], - "license": "Apache-2.0", "dependencies": { - "@thi.ng/api": "^8.6.3", - "@thi.ng/checks": "^3.3.7", - "@thi.ng/compare": "^2.1.22", - "@thi.ng/equiv": "^2.1.17", - "@thi.ng/errors": "^2.2.8", - "@thi.ng/random": "^3.3.21" + "@thi.ng/api": "^8.9.27", + "@thi.ng/checks": "^3.5.1", + "@thi.ng/compare": "^2.2.23", + "@thi.ng/equiv": "^2.1.50", + "@thi.ng/errors": "^2.4.19", + "@thi.ng/random": "^3.6.34" }, "engines": { - "node": ">=12.7" + "node": ">=18" } }, "node_modules/@thi.ng/binary": { - "version": "3.3.16", - "resolved": "https://registry.npmjs.org/@thi.ng/binary/-/binary-3.3.16.tgz", - "integrity": "sha512-btGsjcegkrnKtK3ygWOGDSuY2owXkQqLjxqfvqoc+gbxNFB6K+Dc/kjRcCf5HRKXwRVZqeLaxSQfYPbh+VGoLg==", + "version": "3.4.16", + "resolved": "https://registry.npmjs.org/@thi.ng/binary/-/binary-3.4.16.tgz", + "integrity": "sha512-PSCCc0QLd1hLNW3BJDNZnps7g9Biyc4i72dukdcIN3REDQeoBIspR0YbqiiISBJulQrXAledTuAL+iEgqqB3Zw==", "funding": [ { "type": "github", @@ -110,18 +106,17 @@ "url": "https://patreon.com/thing_umbrella" } ], - "license": "Apache-2.0", "dependencies": { - "@thi.ng/api": "^8.6.3" + "@thi.ng/api": "^8.9.27" }, "engines": { - "node": ">=12.7" + "node": ">=18" } }, "node_modules/@thi.ng/checks": { - "version": "3.3.7", - "resolved": "https://registry.npmjs.org/@thi.ng/checks/-/checks-3.3.7.tgz", - "integrity": "sha512-RX3Oz6icR4VKDyheTcZzDW8znY1xypD1m6FhOpOCwfiqnz+4Y/ycfRmmvFoWp5IzdUScjfBb6PAWQPAl1B1zaw==", + "version": "3.5.1", + "resolved": "https://registry.npmjs.org/@thi.ng/checks/-/checks-3.5.1.tgz", + "integrity": "sha512-iIi1iJezCKAURA7/1aWAYfTz6hqmaor1IoHITP/7SL79ehqDFOOdWhffeKKVj9NJGXTfDfINObXDOXvtcwQAbg==", "funding": [ { "type": "github", @@ -132,18 +127,17 @@ "url": "https://patreon.com/thing_umbrella" } ], - "license": "Apache-2.0", "dependencies": { - "tslib": "^2.4.1" + "tslib": "^2.6.2" }, "engines": { - "node": ">=12.7" + "node": ">=18" } }, "node_modules/@thi.ng/compare": { - "version": "2.1.22", - "resolved": "https://registry.npmjs.org/@thi.ng/compare/-/compare-2.1.22.tgz", - "integrity": "sha512-+ZF2tVNxIYZxV1qCDliJtlihJut1Sl7FOMZ+cZNWUfU+wIDa4YDZN8fmXxBM/1Pcx6g7Hrhl1KrBzY/0FQuZdA==", + "version": "2.2.23", + "resolved": "https://registry.npmjs.org/@thi.ng/compare/-/compare-2.2.23.tgz", + "integrity": "sha512-jbPrxygQ2ws4n0Qn+HtHak81NYn3NSjWxK2UK4eFQjH5NdGYRMwphE3VQxHDyj84xLlLbvCnu9FggatIqM3FNw==", "funding": [ { "type": "github", @@ -154,18 +148,17 @@ "url": "https://patreon.com/thing_umbrella" } ], - "license": "Apache-2.0", "dependencies": { - "@thi.ng/api": "^8.6.3" + "@thi.ng/api": "^8.9.27" }, "engines": { - "node": ">=12.7" + "node": ">=18" } }, "node_modules/@thi.ng/compose": { - "version": "2.1.24", - "resolved": "https://registry.npmjs.org/@thi.ng/compose/-/compose-2.1.24.tgz", - "integrity": "sha512-iwNwT6n4dhjG7Y/GuQud+VyQl2uNexy5ghIpn0YFom+aJ8EGTwxIyvrYeGVQe1eLACFWHr55RbWdHWZlfsKi+g==", + "version": "2.1.66", + "resolved": "https://registry.npmjs.org/@thi.ng/compose/-/compose-2.1.66.tgz", + "integrity": "sha512-ffWulzqjp4fvZKFqdAX/5tmur/yT3y80Ooyxcl1HKK0Ux8pBGZoclSXTIcWHBzl/tQFp2CJeyoqn1zRcMxmckg==", "funding": [ { "type": "github", @@ -176,19 +169,18 @@ "url": "https://patreon.com/thing_umbrella" } ], - "license": "Apache-2.0", "dependencies": { - "@thi.ng/api": "^8.6.3", - "@thi.ng/errors": "^2.2.8" + "@thi.ng/api": "^8.9.27", + "@thi.ng/errors": "^2.4.19" }, "engines": { - "node": ">=12.7" + "node": ">=18" } }, "node_modules/@thi.ng/equiv": { - "version": "2.1.17", - "resolved": "https://registry.npmjs.org/@thi.ng/equiv/-/equiv-2.1.17.tgz", - "integrity": "sha512-ePAwaWfF0ks4U4XoOWQU7g4l2+L4ax3w55KCTa8xgwmTwFjGNtXY/YbNG3o4/Zg9R+N+/TlXfCpMgH6IZ8kpSg==", + "version": "2.1.50", + "resolved": "https://registry.npmjs.org/@thi.ng/equiv/-/equiv-2.1.50.tgz", + "integrity": "sha512-4SBtfpR4Es2H/ZpTpXvpJeY8yfUvrgVarKrryJd0579hhbStXvotwcdK9kIfoZmXDLm+CkuVG+4Cev8jIJFRnw==", "funding": [ { "type": "github", @@ -199,15 +191,14 @@ "url": "https://patreon.com/thing_umbrella" } ], - "license": "Apache-2.0", "engines": { - "node": ">=12.7" + "node": ">=18" } }, "node_modules/@thi.ng/errors": { - "version": "2.2.8", - "resolved": "https://registry.npmjs.org/@thi.ng/errors/-/errors-2.2.8.tgz", - "integrity": "sha512-cJea03+HCnDNlcuz3+5noURGXMT9gPBYgIcXWR76mW0IJ92jfyQ04Yt6J12rO73Td4wNLi+EiRrQdfcjFsyhqw==", + "version": "2.4.19", + "resolved": "https://registry.npmjs.org/@thi.ng/errors/-/errors-2.4.19.tgz", + "integrity": "sha512-rHHlEBgbau2O2t8RIt0Zn7+L9xQSoD4BXq50NPtJGnirRlujORNASCs0En1j+ER+15PFxud2MfK9RIyMp3jNVA==", "funding": [ { "type": "github", @@ -218,15 +209,14 @@ "url": "https://patreon.com/thing_umbrella" } ], - "license": "Apache-2.0", "engines": { - "node": ">=12.7" + "node": ">=18" } }, "node_modules/@thi.ng/hex": { - "version": "2.3.4", - "resolved": "https://registry.npmjs.org/@thi.ng/hex/-/hex-2.3.4.tgz", - "integrity": "sha512-fcl/KpaxuFBqK58HBIHZtaGjgp+KF4QIdXIVjHaAerwJx/gBVLho93Pq+stwX/2RO297U4NF9LuIM/pjj26RiQ==", + "version": "2.3.38", + "resolved": "https://registry.npmjs.org/@thi.ng/hex/-/hex-2.3.38.tgz", + "integrity": "sha512-A3XFDNmnMOZZ4sNkUcXylKzrxiNjRnvuGtDa3x8YAiqhKWz8nR5XEqdae4XQThlcyIzMAvu7jQ6uQWi0VsttvA==", "funding": [ { "type": "github", @@ -237,15 +227,14 @@ "url": "https://patreon.com/thing_umbrella" } ], - "license": "Apache-2.0", "engines": { - "node": ">=12.7" + "node": ">=18" } }, "node_modules/@thi.ng/leb128": { - "version": "3.0.5", - "resolved": "https://registry.npmjs.org/@thi.ng/leb128/-/leb128-3.0.5.tgz", - "integrity": "sha512-B4NP+A1JlZFwUVhAzmVwhGXqnbMGpIBdQq5tiQqMDryWutsgK+CXodQ4Aq6/8N6EctGwhGtVXB4+v9iGHrwdPQ==", + "version": "3.0.75", + "resolved": "https://registry.npmjs.org/@thi.ng/leb128/-/leb128-3.0.75.tgz", + "integrity": "sha512-d54h4Pb3kfOpNWvVLYroYDR0zKBnwGb2B3DxzsEiMaATiXlW2jCtJHjMamcn3lyLDW1uNS/eD7xbKmQ6OWtUlA==", "funding": [ { "type": "github", @@ -256,20 +245,19 @@ "url": "https://patreon.com/thing_umbrella" } ], - "license": "Apache-2.0", "dependencies": { - "@thi.ng/checks": "^3.3.7", - "@thi.ng/errors": "^2.2.8", - "@thi.ng/transducers-binary": "^2.1.35" + "@thi.ng/checks": "^3.5.1", + "@thi.ng/errors": "^2.4.19", + "@thi.ng/transducers-binary": "^2.1.104" }, "engines": { - "node": ">=12.7" + "node": ">=18" } }, "node_modules/@thi.ng/math": { - "version": "5.4.0", - "resolved": "https://registry.npmjs.org/@thi.ng/math/-/math-5.4.0.tgz", - "integrity": "sha512-nBSLBbA/TUFI19ZHD8NYGJWncgr9E/94/oIO8mpEIdsUfkjnpbd8Y7Xnji2SmCzAX2PGIvZ9TetXdJvdcdl7qQ==", + "version": "5.10.4", + "resolved": "https://registry.npmjs.org/@thi.ng/math/-/math-5.10.4.tgz", + "integrity": "sha512-K8+lv4pZRrukKUzfExJHnjF0ssCD5QBjfjFGmg0laAeNZQcFJLJhJEIta0pJ+T473Ixy3vMQ83ZGAXamcw4CMQ==", "funding": [ { "type": "github", @@ -280,18 +268,38 @@ "url": "https://patreon.com/thing_umbrella" } ], - "license": "Apache-2.0", "dependencies": { - "@thi.ng/api": "^8.6.3" + "@thi.ng/api": "^8.9.27" }, "engines": { - "node": ">=12.7" + "node": ">=18" + } + }, + "node_modules/@thi.ng/memoize": { + "version": "3.1.62", + "resolved": "https://registry.npmjs.org/@thi.ng/memoize/-/memoize-3.1.62.tgz", + "integrity": "sha512-5UY/Lt++vGKUnjyGUMK42YRdJ5cF1xnABJjf7+AMfEhqGur56Dtm/zHvqkbbOTFdrLBeEywMf13ZJjZLFtXmiQ==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/postspectacular" + }, + { + "type": "patreon", + "url": "https://patreon.com/thing_umbrella" + } + ], + "dependencies": { + "@thi.ng/api": "^8.9.27" + }, + "engines": { + "node": ">=18" } }, "node_modules/@thi.ng/random": { - "version": "3.3.21", - "resolved": "https://registry.npmjs.org/@thi.ng/random/-/random-3.3.21.tgz", - "integrity": "sha512-dmdQlgTQtTPfpzEugtVM1o8KbjjmGq2V5W/V+BFh1SOnRfOcJQLyGtp2556490z1Qhm1QjKouZCd9aqyvMHHqA==", + "version": "3.6.34", + "resolved": "https://registry.npmjs.org/@thi.ng/random/-/random-3.6.34.tgz", + "integrity": "sha512-pIENnVaLeML5W7nMcIJCgmpQ7lZ7aSa5/va0ElJqbfyP33xQscmNRm4qa+wOIWy8kUy4goiRUJ6DAxQm34hjTA==", "funding": [ { "type": "github", @@ -302,21 +310,44 @@ "url": "https://patreon.com/thing_umbrella" } ], - "license": "Apache-2.0", "dependencies": { - "@thi.ng/api": "^8.6.3", - "@thi.ng/checks": "^3.3.7", - "@thi.ng/errors": "^2.2.8", - "@thi.ng/hex": "^2.3.4" + "@thi.ng/api": "^8.9.27", + "@thi.ng/checks": "^3.5.1", + "@thi.ng/errors": "^2.4.19", + "@thi.ng/hex": "^2.3.38" }, "engines": { - "node": ">=12.7" + "node": ">=18" + } + }, + "node_modules/@thi.ng/strings": { + "version": "3.7.20", + "resolved": "https://registry.npmjs.org/@thi.ng/strings/-/strings-3.7.20.tgz", + "integrity": "sha512-ehtqggtZ5O+IevjqOEXzB+5PJ3CbQ4bZ4JA/y0I7yA/ZQKaGxnU9k4e6RvIW+S9unzIZbloyUqcyhNyA6hok7w==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/postspectacular" + }, + { + "type": "patreon", + "url": "https://patreon.com/thing_umbrella" + } + ], + "dependencies": { + "@thi.ng/api": "^8.9.27", + "@thi.ng/errors": "^2.4.19", + "@thi.ng/hex": "^2.3.38", + "@thi.ng/memoize": "^3.1.62" + }, + "engines": { + "node": ">=18" } }, "node_modules/@thi.ng/transducers": { - "version": "8.3.30", - "resolved": "https://registry.npmjs.org/@thi.ng/transducers/-/transducers-8.3.30.tgz", - "integrity": "sha512-msKkvgnAmXBaoDWg/UVduh44qWt5DyPt7XSB8W36aGJqxhF7D9o+WSi7vc9y2nhbD2BkIQRj9VRg2h8jL1q5HQ==", + "version": "8.9.9", + "resolved": "https://registry.npmjs.org/@thi.ng/transducers/-/transducers-8.9.9.tgz", + "integrity": "sha512-Ujb22peyy3zD0rwyD5NywkB21wU53dl2m6ThRyY+woifg1+IXv5dluW1lpRJYYf2VNvpXwLnq9IAogA7zN8nJQ==", "funding": [ { "type": "github", @@ -327,25 +358,24 @@ "url": "https://patreon.com/thing_umbrella" } ], - "license": "Apache-2.0", "dependencies": { - "@thi.ng/api": "^8.6.3", - "@thi.ng/arrays": "^2.5.1", - "@thi.ng/checks": "^3.3.7", - "@thi.ng/compare": "^2.1.22", - "@thi.ng/compose": "^2.1.24", - "@thi.ng/errors": "^2.2.8", - "@thi.ng/math": "^5.4.0", - "@thi.ng/random": "^3.3.21" + "@thi.ng/api": "^8.9.27", + "@thi.ng/arrays": "^2.8.5", + "@thi.ng/checks": "^3.5.1", + "@thi.ng/compare": "^2.2.23", + "@thi.ng/compose": "^2.1.66", + "@thi.ng/errors": "^2.4.19", + "@thi.ng/math": "^5.10.4", + "@thi.ng/random": "^3.6.34" }, "engines": { - "node": ">=12.7" + "node": ">=18" } }, "node_modules/@thi.ng/transducers-binary": { - "version": "2.1.35", - "resolved": "https://registry.npmjs.org/@thi.ng/transducers-binary/-/transducers-binary-2.1.35.tgz", - "integrity": "sha512-FDCV4G+w/WuemeExHjqo5BT08GoTkzkCaKlDXxWnMJ2EtjzM8QFjHRFrqW8TLi8wZf/ovsL0p/tnL0KVL0MxKw==", + "version": "2.1.104", + "resolved": "https://registry.npmjs.org/@thi.ng/transducers-binary/-/transducers-binary-2.1.104.tgz", + "integrity": "sha512-MhZvxR1BcTzyq4653ocVJ1y7Zjh+V2dOi4P6IiWWoSY2TpAJGqY+zvOPZkz7BQ6wfYDM2D8flX3/LhL1GzOx1w==", "funding": [ { "type": "github", @@ -356,61 +386,53 @@ "url": "https://patreon.com/thing_umbrella" } ], - "license": "Apache-2.0", "dependencies": { - "@thi.ng/binary": "^3.3.16", - "@thi.ng/compose": "^2.1.24", - "@thi.ng/errors": "^2.2.8", - "@thi.ng/hex": "^2.3.4", - "@thi.ng/random": "^3.3.21", - "@thi.ng/transducers": "^8.3.30" + "@thi.ng/binary": "^3.4.16", + "@thi.ng/compose": "^2.1.66", + "@thi.ng/errors": "^2.4.19", + "@thi.ng/hex": "^2.3.38", + "@thi.ng/random": "^3.6.34", + "@thi.ng/strings": "^3.7.20", + "@thi.ng/transducers": "^8.9.9" }, "engines": { - "node": ">=12.7" + "node": ">=18" } }, "node_modules/@types/node": { - "version": "18.11.18", - "resolved": "https://registry.npmjs.org/@types/node/-/node-18.11.18.tgz", - "integrity": "sha512-DHQpWGjyQKSHj3ebjFI/wRKcqQcdR+MoFBygntYOZytCqNfkd2ZC4ARDJ2DQqhjH5p85Nnd3jhUJIXrszFX/JA==", - "license": "MIT" + "version": "18.19.22", + "resolved": "https://registry.npmjs.org/@types/node/-/node-18.19.22.tgz", + "integrity": "sha512-p3pDIfuMg/aXBmhkyanPshdfJuX5c5+bQjYLIikPLXAUycEogij/c50n/C+8XOA5L93cU4ZRXtn+dNQGi0IZqQ==", + "dependencies": { + "undici-types": "~5.26.4" + } }, "node_modules/@types/readable-stream": { - "version": "2.3.15", - "resolved": "https://registry.npmjs.org/@types/readable-stream/-/readable-stream-2.3.15.tgz", - "integrity": "sha512-oM5JSKQCcICF1wvGgmecmHldZ48OZamtMxcGGVICOJA8o8cahXC1zEVAif8iwoc5j8etxFaRFnf095+CDsuoFQ==", - "license": "MIT", + "version": "4.0.10", + "resolved": "https://registry.npmjs.org/@types/readable-stream/-/readable-stream-4.0.10.tgz", + "integrity": "sha512-AbUKBjcC8SHmImNi4yK2bbjogQlkFSg7shZCcicxPQapniOlajG8GCc39lvXzCWX4lLRRs7DM3VAeSlqmEVZUA==", "dependencies": { "@types/node": "*", "safe-buffer": "~5.1.1" } }, - "node_modules/@types/readable-stream/node_modules/safe-buffer": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", - "license": "MIT" - }, "node_modules/@types/semver": { - "version": "7.3.13", - "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.3.13.tgz", - "integrity": "sha512-21cFJr9z3g5dW8B0CVI9g2O9beqaThGQ6ZFBqHfwhzLDKUxaqTIy3vnfah/UPkfOiF2pLq+tGz+W8RyCskuslw==", - "license": "MIT" + "version": "7.5.8", + "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.5.8.tgz", + "integrity": "sha512-I8EUhyrgfLrcTkzV3TSsGyl1tSuPrEDzr0yd5m90UgNxQkyDXULk3b6MlQqTCpZpNtWe1K0hzclnZkTcLBe2UQ==" }, "node_modules/@types/sharp": { "version": "0.31.1", "resolved": "https://registry.npmjs.org/@types/sharp/-/sharp-0.31.1.tgz", "integrity": "sha512-5nWwamN9ZFHXaYEincMSuza8nNfOof8nmO+mcI+Agx1uMUk4/pQnNIcix+9rLPXzKrm1pS34+6WRDbDV0Jn7ag==", - "license": "MIT", "dependencies": { "@types/node": "*" } }, "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==", - "license": "MIT", + "version": "8.5.10", + "resolved": "https://registry.npmjs.org/@types/ws/-/ws-8.5.10.tgz", + "integrity": "sha512-vmQSUcfalpIq0R9q7uTo2lXs6eGIpt9wtnLdMv9LVpIjCA/+ufZRozlVoVelIYixx1ugCBKDhn89vnsEGOCx9A==", "dependencies": { "@types/node": "*" } @@ -418,14 +440,12 @@ "node_modules/@xboxreplay/errors": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/@xboxreplay/errors/-/errors-0.1.0.tgz", - "integrity": "sha512-Tgz1d/OIPDWPeyOvuL5+aai5VCcqObhPnlI3skQuf80GVF3k1I0lPCnGC+8Cm5PV9aLBT5m8qPcJoIUQ2U4y9g==", - "license": "MIT" + "integrity": "sha512-Tgz1d/OIPDWPeyOvuL5+aai5VCcqObhPnlI3skQuf80GVF3k1I0lPCnGC+8Cm5PV9aLBT5m8qPcJoIUQ2U4y9g==" }, "node_modules/@xboxreplay/xboxlive-auth": { "version": "3.3.3", "resolved": "https://registry.npmjs.org/@xboxreplay/xboxlive-auth/-/xboxlive-auth-3.3.3.tgz", "integrity": "sha512-j0AU8pW10LM8O68CTZ5QHnvOjSsnPICy0oQcP7zyM7eWkDQ/InkiQiirQKsPn1XRYDl4ccNu0WM582s3UKwcBg==", - "license": "MIT", "dependencies": { "@xboxreplay/errors": "^0.1.0", "axios": "^0.21.1" @@ -435,7 +455,6 @@ "version": "3.0.0", "resolved": "https://registry.npmjs.org/abort-controller/-/abort-controller-3.0.0.tgz", "integrity": "sha512-h8lQ8tacZYnR3vNQTgibj+tODHI5/+l06Au2Pcriv/Gmet0eaj4TwWH41sO9wnHDiQsEj19q0drzdWdeAHtweg==", - "license": "MIT", "dependencies": { "event-target-shim": "^5.0.0" }, @@ -446,14 +465,12 @@ "node_modules/aes-js": { "version": "3.1.2", "resolved": "https://registry.npmjs.org/aes-js/-/aes-js-3.1.2.tgz", - "integrity": "sha512-e5pEa2kBnBOgR4Y/p20pskXI74UEz7de8ZGVo58asOtvSVG5YAbJeELPZxOmt+Bnz3rX753YKhfIn4X4l1PPRQ==", - "license": "MIT" + "integrity": "sha512-e5pEa2kBnBOgR4Y/p20pskXI74UEz7de8ZGVo58asOtvSVG5YAbJeELPZxOmt+Bnz3rX753YKhfIn4X4l1PPRQ==" }, "node_modules/ajv": { "version": "6.12.6", "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", - "license": "MIT", "dependencies": { "fast-deep-equal": "^3.1.1", "fast-json-stable-stringify": "^2.0.0", @@ -468,14 +485,12 @@ "node_modules/asn1": { "version": "0.2.3", "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.3.tgz", - "integrity": "sha512-6i37w/+EhlWlGUJff3T/Q8u1RGmP5wgbiwYnOnbOqvtrPxT63/sYFyP9RcpxtxGymtfA075IvmOnL7ycNOWl3w==", - "license": "MIT" + "integrity": "sha512-6i37w/+EhlWlGUJff3T/Q8u1RGmP5wgbiwYnOnbOqvtrPxT63/sYFyP9RcpxtxGymtfA075IvmOnL7ycNOWl3w==" }, "node_modules/axios": { "version": "0.21.4", "resolved": "https://registry.npmjs.org/axios/-/axios-0.21.4.tgz", "integrity": "sha512-ut5vewkiu8jjGBdqpM44XxjuCjq9LAKeHVmoVfHVzy8eHgxxq8SbAVQNovDA8mVi05kP0Ea/n/UzcSHcTJQfNg==", - "license": "MIT", "dependencies": { "follow-redirects": "^1.14.0" } @@ -497,14 +512,12 @@ "type": "consulting", "url": "https://feross.org/support" } - ], - "license": "MIT" + ] }, "node_modules/bl": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/bl/-/bl-4.1.0.tgz", "integrity": "sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==", - "license": "MIT", "dependencies": { "buffer": "^5.5.0", "inherits": "^2.0.4", @@ -529,12 +542,24 @@ "url": "https://feross.org/support" } ], - "license": "MIT", "dependencies": { "base64-js": "^1.3.1", "ieee754": "^1.1.13" } }, + "node_modules/bl/node_modules/readable-stream": { + "version": "3.6.2", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", + "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", + "dependencies": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + }, + "engines": { + "node": ">= 6" + } + }, "node_modules/buffer": { "version": "6.0.3", "resolved": "https://registry.npmjs.org/buffer/-/buffer-6.0.3.tgz", @@ -553,7 +578,6 @@ "url": "https://feross.org/support" } ], - "license": "MIT", "dependencies": { "base64-js": "^1.3.1", "ieee754": "^1.2.1" @@ -563,7 +587,6 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/buffer-equal/-/buffer-equal-1.0.1.tgz", "integrity": "sha512-QoV3ptgEaQpvVwbXdSO39iqPQTCxSF7A5U99AxbHYqUdCizL/lH2Z0A2y6nbZucxMEOtNyZfG2s6gsVugGpKkg==", - "license": "MIT", "engines": { "node": ">=0.4" }, @@ -574,14 +597,12 @@ "node_modules/buffer-equal-constant-time": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/buffer-equal-constant-time/-/buffer-equal-constant-time-1.0.1.tgz", - "integrity": "sha512-zRpUiDwd/xk6ADqPMATG8vc9VPrkck7T07OIx0gnjmJAnHnTVXNQG3vfvWNuiZIkwu9KrKdA1iJKfsfTVxE6NA==", - "license": "BSD-3-Clause" + "integrity": "sha512-zRpUiDwd/xk6ADqPMATG8vc9VPrkck7T07OIx0gnjmJAnHnTVXNQG3vfvWNuiZIkwu9KrKdA1iJKfsfTVxE6NA==" }, "node_modules/chalk": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.2.0.tgz", - "integrity": "sha512-ree3Gqw/nazQAPuJJEy+avdl7QfZMcUvmHIKgEZkGL+xOBzRvup5Hxo6LHuMceSxOabuJLJm5Yp/92R9eMmMvA==", - "license": "MIT", + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.3.0.tgz", + "integrity": "sha512-dLitG79d+GV1Nb/VYcCDFivJeK1hiukt9QjRNVOsUtTy1rR1YJsmpGGTZ3qJos+uw7WmWF4wUwBd9jxjocFC2w==", "engines": { "node": "^12.17.0 || ^14.13 || >=16.0.0" }, @@ -592,14 +613,12 @@ "node_modules/chownr": { "version": "1.1.4", "resolved": "https://registry.npmjs.org/chownr/-/chownr-1.1.4.tgz", - "integrity": "sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg==", - "license": "ISC" + "integrity": "sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg==" }, "node_modules/color": { "version": "4.2.3", "resolved": "https://registry.npmjs.org/color/-/color-4.2.3.tgz", "integrity": "sha512-1rXeuUUiGGrykh+CeBdu5Ie7OJwinCgQY0bc7GCRxy5xVHy+moaqkpL/jqQq0MtQOeYcrqEz4abc5f0KtU7W4A==", - "license": "MIT", "dependencies": { "color-convert": "^2.0.1", "color-string": "^1.9.0" @@ -612,7 +631,6 @@ "version": "2.0.1", "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "license": "MIT", "dependencies": { "color-name": "~1.1.4" }, @@ -623,14 +641,12 @@ "node_modules/color-name": { "version": "1.1.4", "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "license": "MIT" + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" }, "node_modules/color-string": { "version": "1.9.1", "resolved": "https://registry.npmjs.org/color-string/-/color-string-1.9.1.tgz", "integrity": "sha512-shrVawQFojnZv6xM40anx4CkoDP+fZsw/ZerEMsW/pyzsRbElpsL/DBVW7q3ExxwusdNXI3lXpuhEZkzs8p5Eg==", - "license": "MIT", "dependencies": { "color-name": "^1.0.0", "simple-swizzle": "^0.2.2" @@ -645,7 +661,6 @@ "version": "4.0.1", "resolved": "https://registry.npmjs.org/data-uri-to-buffer/-/data-uri-to-buffer-4.0.1.tgz", "integrity": "sha512-0R9ikRb668HB7QDxT1vkpuUBtqc53YyAwMwGeUFKRojY/NWKvdZ+9UYtRfGmhqNbRkTSVpMbmyhXipFFv2cb/A==", - "license": "MIT", "engines": { "node": ">= 12" } @@ -654,7 +669,6 @@ "version": "4.3.4", "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", - "license": "MIT", "dependencies": { "ms": "2.1.2" }, @@ -671,7 +685,6 @@ "version": "6.0.0", "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-6.0.0.tgz", "integrity": "sha512-aW35yZM6Bb/4oJlZncMH2LCoZtJXTRxES17vE3hoRiowU2kWHaJKFkSBDnDR+cm9J+9QhXmREyIfv0pji9ejCQ==", - "license": "MIT", "dependencies": { "mimic-response": "^3.1.0" }, @@ -686,16 +699,14 @@ "version": "0.6.0", "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz", "integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==", - "license": "MIT", "engines": { "node": ">=4.0.0" } }, "node_modules/detect-libc": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.0.1.tgz", - "integrity": "sha512-463v3ZeIrcWtdgIg6vI6XUncguvr2TnGl4SzDXinkt9mSLpBJKXT3mW6xT3VQdDN11+WVs29pgvivTc4Lp8v+w==", - "license": "Apache-2.0", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.0.2.tgz", + "integrity": "sha512-UX6sGumvvqSaXgdKGUsgZWqcUyIXZ/vZTrlRT/iobiKhGL0zL4d3osHj3uqllWJK+i+sixDS/3COVEOFbupFyw==", "engines": { "node": ">=8" } @@ -706,19 +717,20 @@ "integrity": "sha512-c68LpLbO+7kP/b1Hr1qs8/BJ09F5khZGTxqxZuhzxpmwJKOgRFHJWIb9/KmqnqHhLdO55aOxFH/EGBvUQbL/RQ==" }, "node_modules/dotenv": { - "version": "16.0.3", - "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.0.3.tgz", - "integrity": "sha512-7GO6HghkA5fYG9TYnNxi14/7K9f5occMlp3zXAuSxn7CKCxt9xbNWG7yF8hTCSUchlfWSe3uLmlPfigevRItzQ==", - "license": "BSD-2-Clause", + "version": "16.4.5", + "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.4.5.tgz", + "integrity": "sha512-ZmdL2rui+eB2YwhsWzjInR8LldtZHGDoQ1ugH85ppHKwpUHL7j7rN0Ti9NCnGiQbhaZ11FpR+7ao1dNsmduNUg==", "engines": { "node": ">=12" + }, + "funding": { + "url": "https://dotenvx.com" } }, "node_modules/ecdsa-sig-formatter": { "version": "1.0.11", "resolved": "https://registry.npmjs.org/ecdsa-sig-formatter/-/ecdsa-sig-formatter-1.0.11.tgz", "integrity": "sha512-nagl3RYrbNv6kQkeJIpt6NJZy8twLB/2vtz6yN9Z4vRKHN4/QZJIEbqohALSgwKdnksuY3k5Addp5lg8sVoVcQ==", - "license": "Apache-2.0", "dependencies": { "safe-buffer": "^5.0.1" } @@ -727,7 +739,6 @@ "version": "1.4.4", "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz", "integrity": "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==", - "license": "MIT", "dependencies": { "once": "^1.4.0" } @@ -735,14 +746,12 @@ "node_modules/endian-toggle": { "version": "0.0.0", "resolved": "https://registry.npmjs.org/endian-toggle/-/endian-toggle-0.0.0.tgz", - "integrity": "sha512-ShfqhXeHRE4TmggSlHXG8CMGIcsOsqDw/GcoPcosToE59Rm9e4aXaMhEQf2kPBsBRrKem1bbOAv5gOKnkliMFQ==", - "license": "MIT" + "integrity": "sha512-ShfqhXeHRE4TmggSlHXG8CMGIcsOsqDw/GcoPcosToE59Rm9e4aXaMhEQf2kPBsBRrKem1bbOAv5gOKnkliMFQ==" }, "node_modules/event-target-shim": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/event-target-shim/-/event-target-shim-5.0.1.tgz", "integrity": "sha512-i/2XbnSz/uxRCU6+NdVJgKWDTM427+MqYbkQzD321DuCQJUqOuJKIA0IM2+W2xtYHdKOmZ4dR6fExsd4SXL+WQ==", - "license": "MIT", "engines": { "node": ">=6" } @@ -751,7 +760,6 @@ "version": "3.3.0", "resolved": "https://registry.npmjs.org/events/-/events-3.3.0.tgz", "integrity": "sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q==", - "license": "MIT", "engines": { "node": ">=0.8.x" } @@ -760,7 +768,6 @@ "version": "2.0.3", "resolved": "https://registry.npmjs.org/expand-template/-/expand-template-2.0.3.tgz", "integrity": "sha512-XYfuKMvj4O35f/pOXLObndIRvyQ+/+6AhODh+OKWj9S9498pHHn/IMszH+gt0fBCRWMNfk1ZSp5x3AifmnI2vg==", - "license": "(MIT OR WTFPL)", "engines": { "node": ">=6" } @@ -768,14 +775,12 @@ "node_modules/fast-deep-equal": { "version": "3.1.3", "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", - "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", - "license": "MIT" + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==" }, "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==", - "license": "MIT" + "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==" }, "node_modules/fetch-blob": { "version": "3.2.0", @@ -791,7 +796,6 @@ "url": "https://paypal.me/jimmywarting" } ], - "license": "MIT", "dependencies": { "node-domexception": "^1.0.0", "web-streams-polyfill": "^3.0.3" @@ -801,16 +805,15 @@ } }, "node_modules/follow-redirects": { - "version": "1.15.2", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.2.tgz", - "integrity": "sha512-VQLG33o04KaQ8uYi2tVNbdrWp1QWxNNea+nmIB4EVM28v0hmP17z7aG1+wAkNzVq4KeXTq3221ye5qTJP91JwA==", + "version": "1.15.5", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.5.tgz", + "integrity": "sha512-vSFWUON1B+yAw1VN4xMfxgn5fTUiaOzAJCKBwIIgT/+7CuGy9+r+5gITvP62j3RmaD5Ph65UaERdOSRGUzZtgw==", "funding": [ { "type": "individual", "url": "https://github.com/sponsors/RubenVerborgh" } ], - "license": "MIT", "engines": { "node": ">=4.0" }, @@ -824,7 +827,6 @@ "version": "4.0.10", "resolved": "https://registry.npmjs.org/formdata-polyfill/-/formdata-polyfill-4.0.10.tgz", "integrity": "sha512-buewHzMvYL29jdeQTVILecSaZKnt/RJWjoZCF5OW60Z67/GmSLBkOFM7qh1PI3zFNtJbaZL5eQu1vLfazOwj4g==", - "license": "MIT", "dependencies": { "fetch-blob": "^3.1.2" }, @@ -835,14 +837,12 @@ "node_modules/fs-constants": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/fs-constants/-/fs-constants-1.0.0.tgz", - "integrity": "sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow==", - "license": "MIT" + "integrity": "sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow==" }, "node_modules/github-from-package": { "version": "0.0.0", "resolved": "https://registry.npmjs.org/github-from-package/-/github-from-package-0.0.0.tgz", - "integrity": "sha512-SyHy3T1v2NUXn29OsWdxmK6RwHD+vkj3v8en8AOBZ1wBQ/hCAQ5bAQTD02kW4W9tUp/3Qh6J8r9EvntiyCmOOw==", - "license": "MIT" + "integrity": "sha512-SyHy3T1v2NUXn29OsWdxmK6RwHD+vkj3v8en8AOBZ1wBQ/hCAQ5bAQTD02kW4W9tUp/3Qh6J8r9EvntiyCmOOw==" }, "node_modules/ieee754": { "version": "1.2.1", @@ -861,26 +861,22 @@ "type": "consulting", "url": "https://feross.org/support" } - ], - "license": "BSD-3-Clause" + ] }, "node_modules/inherits": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", - "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", - "license": "ISC" + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" }, "node_modules/ini": { "version": "1.3.8", "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz", - "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==", - "license": "ISC" + "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==" }, "node_modules/ip-regex": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/ip-regex/-/ip-regex-5.0.0.tgz", "integrity": "sha512-fOCG6lhoKKakwv+C6KdsOnGvgXnmgfmp0myi3bcNwj3qfwPAxRKWEuFhvEFF7ceYIz6+1jRZ+yguLFAmUNPEfw==", - "license": "MIT", "engines": { "node": "^12.20.0 || ^14.13.1 || >=16.0.0" }, @@ -891,14 +887,12 @@ "node_modules/is-arrayish": { "version": "0.3.2", "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.3.2.tgz", - "integrity": "sha512-eVRqCvVlZbuw3GrM63ovNSNAeA1K16kaR/LRY/92w0zxQ5/1YzwblUX652i4Xs9RwAGjW9d9y6X88t8OaAJfWQ==", - "license": "MIT" + "integrity": "sha512-eVRqCvVlZbuw3GrM63ovNSNAeA1K16kaR/LRY/92w0zxQ5/1YzwblUX652i4Xs9RwAGjW9d9y6X88t8OaAJfWQ==" }, "node_modules/is-ip": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/is-ip/-/is-ip-4.0.0.tgz", "integrity": "sha512-4B4XA2HEIm/PY+OSpeMBXr8pGWBYbXuHgjMAqrwbLO3CPTCAd9ArEJzBUKGZtk9viY6+aSfadGnWyjY3ydYZkw==", - "license": "MIT", "dependencies": { "ip-regex": "^5.0.0" }, @@ -910,10 +904,9 @@ } }, "node_modules/jose": { - "version": "4.11.2", - "resolved": "https://registry.npmjs.org/jose/-/jose-4.11.2.tgz", - "integrity": "sha512-njj0VL2TsIxCtgzhO+9RRobBvws4oYyCM8TpvoUQwl/MbIM3NFJRR9+e6x0sS5xXaP1t6OCBkaBME98OV9zU5A==", - "license": "MIT", + "version": "4.15.4", + "resolved": "https://registry.npmjs.org/jose/-/jose-4.15.4.tgz", + "integrity": "sha512-W+oqK4H+r5sITxfxpSU+MMdr/YSWGvgZMQDIsNoBDGGy4i7GBPTtvFKibQzW06n3U3TqHjhvBJsirShsEJ6eeQ==", "funding": { "url": "https://github.com/sponsors/panva" } @@ -921,41 +914,33 @@ "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==", - "license": "MIT" + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==" }, "node_modules/jsonwebtoken": { - "version": "9.0.0", - "resolved": "https://registry.npmjs.org/jsonwebtoken/-/jsonwebtoken-9.0.0.tgz", - "integrity": "sha512-tuGfYXxkQGDPnLJ7SibiQgVgeDgfbPq2k2ICcbgqW8WxWLBAxKQM/ZCu/IT8SOSwmaYl4dpTFCW5xZv7YbbWUw==", - "license": "MIT", + "version": "9.0.2", + "resolved": "https://registry.npmjs.org/jsonwebtoken/-/jsonwebtoken-9.0.2.tgz", + "integrity": "sha512-PRp66vJ865SSqOlgqS8hujT5U4AOgMfhrwYIuIhfKaoSCZcirrmASQr8CX7cUg+RMih+hgznrjp99o+W4pJLHQ==", "dependencies": { "jws": "^3.2.2", - "lodash": "^4.17.21", + "lodash.includes": "^4.3.0", + "lodash.isboolean": "^3.0.3", + "lodash.isinteger": "^4.0.4", + "lodash.isnumber": "^3.0.3", + "lodash.isplainobject": "^4.0.6", + "lodash.isstring": "^4.0.1", + "lodash.once": "^4.0.0", "ms": "^2.1.1", - "semver": "^7.3.8" + "semver": "^7.5.4" }, "engines": { "node": ">=12", "npm": ">=6" } }, - "node_modules/jsonwebtoken/node_modules/lodash": { - "version": "4.17.21", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", - "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==" - }, - "node_modules/jsonwebtoken/node_modules/ms": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", - "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", - "license": "MIT" - }, "node_modules/jwa": { "version": "1.4.1", "resolved": "https://registry.npmjs.org/jwa/-/jwa-1.4.1.tgz", "integrity": "sha512-qiLX/xhEEFKUAJ6FiBMbes3w9ATzyk5W7Hvzpa/SLYdxNtng+gcurvrI7TbACjIXlsJyr05/S1oUhZrc63evQA==", - "license": "MIT", "dependencies": { "buffer-equal-constant-time": "1.0.1", "ecdsa-sig-formatter": "1.0.11", @@ -966,7 +951,6 @@ "version": "3.2.2", "resolved": "https://registry.npmjs.org/jws/-/jws-3.2.2.tgz", "integrity": "sha512-YHlZCB6lMTllWDtSPHz/ZXTsi8S00usEV6v1tjq8tOUZzw7DpSDWVXjXDre6ed1w/pd495ODpHZYSdkRTsa0HA==", - "license": "MIT", "dependencies": { "jwa": "^1.4.1", "safe-buffer": "^5.0.1" @@ -975,26 +959,57 @@ "node_modules/lodash.get": { "version": "4.4.2", "resolved": "https://registry.npmjs.org/lodash.get/-/lodash.get-4.4.2.tgz", - "integrity": "sha512-z+Uw/vLuy6gQe8cfaFWD7p0wVv8fJl3mbzXh33RS+0oW2wvUqiRXiQ69gLWSLpgB5/6sU+r6BlQR0MBILadqTQ==", - "license": "MIT" + "integrity": "sha512-z+Uw/vLuy6gQe8cfaFWD7p0wVv8fJl3mbzXh33RS+0oW2wvUqiRXiQ69gLWSLpgB5/6sU+r6BlQR0MBILadqTQ==" + }, + "node_modules/lodash.includes": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/lodash.includes/-/lodash.includes-4.3.0.tgz", + "integrity": "sha512-W3Bx6mdkRTGtlJISOvVD/lbqjTlPPUDTMnlXZFnVwi9NKJ6tiAk6LVdlhZMm17VZisqhKcgzpO5Wz91PCt5b0w==" + }, + "node_modules/lodash.isboolean": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/lodash.isboolean/-/lodash.isboolean-3.0.3.tgz", + "integrity": "sha512-Bz5mupy2SVbPHURB98VAcw+aHh4vRV5IPNhILUCsOzRmsTmSQ17jIuqopAentWoehktxGd9e/hbIXq980/1QJg==" + }, + "node_modules/lodash.isinteger": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/lodash.isinteger/-/lodash.isinteger-4.0.4.tgz", + "integrity": "sha512-DBwtEWN2caHQ9/imiNeEA5ys1JoRtRfY3d7V9wkqtbycnAmTvRRmbHKDV4a0EYc678/dia0jrte4tjYwVBaZUA==" + }, + "node_modules/lodash.isnumber": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/lodash.isnumber/-/lodash.isnumber-3.0.3.tgz", + "integrity": "sha512-QYqzpfwO3/CWf3XP+Z+tkQsfaLL/EnUlXWVkIk5FUPc4sBdTehEqZONuyRt2P67PXAk+NXmTBcc97zw9t1FQrw==" + }, + "node_modules/lodash.isplainobject": { + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/lodash.isplainobject/-/lodash.isplainobject-4.0.6.tgz", + "integrity": "sha512-oSXzaWypCMHkPC3NvBEaPHf0KsA5mvPrOPgQWDsbg8n7orZ290M0BmC/jgRZ4vcJ6DTAhjrsSYgdsW/F+MFOBA==" + }, + "node_modules/lodash.isstring": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/lodash.isstring/-/lodash.isstring-4.0.1.tgz", + "integrity": "sha512-0wJxfxH1wgO3GrbuP+dTTk7op+6L41QCXbGINEmD+ny/G/eCqGzxyCsh7159S+mgDDcoarnBw6PC1PS5+wUGgw==" }, "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==", - "license": "MIT" + "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==" + }, + "node_modules/lodash.once": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/lodash.once/-/lodash.once-4.1.1.tgz", + "integrity": "sha512-Sb487aTOCr9drQVL8pIxOzVhafOjZN9UU54hiN8PU3uAiSV7lx1yYNpbNmex2PK6dSJoNTSJUUswT651yww3Mg==" }, "node_modules/lodash.reduce": { "version": "4.6.0", "resolved": "https://registry.npmjs.org/lodash.reduce/-/lodash.reduce-4.6.0.tgz", - "integrity": "sha512-6raRe2vxCYBhpBu+B+TtNGUzah+hQjVdu3E17wfusjyrXBka2nBS8OH/gjVZ5PvHOhWmIZTYri09Z6n/QfnNMw==", - "license": "MIT" + "integrity": "sha512-6raRe2vxCYBhpBu+B+TtNGUzah+hQjVdu3E17wfusjyrXBka2nBS8OH/gjVZ5PvHOhWmIZTYri09Z6n/QfnNMw==" }, "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==", - "license": "ISC", "dependencies": { "yallist": "^4.0.0" }, @@ -1005,14 +1020,12 @@ "node_modules/macaddress": { "version": "0.5.3", "resolved": "https://registry.npmjs.org/macaddress/-/macaddress-0.5.3.tgz", - "integrity": "sha512-vGBKTA+jwM4KgjGZ+S/8/Mkj9rWzePyGY6jManXPGhiWu63RYwW8dKPyk5koP+8qNVhPhHgFa1y/MJ4wrjsNrg==", - "license": "MIT" + "integrity": "sha512-vGBKTA+jwM4KgjGZ+S/8/Mkj9rWzePyGY6jManXPGhiWu63RYwW8dKPyk5koP+8qNVhPhHgFa1y/MJ4wrjsNrg==" }, "node_modules/mimic-response": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-3.1.0.tgz", "integrity": "sha512-z0yWI+4FDrrweS8Zmt4Ej5HdJmky15+L2e6Wgn3+iK5fWzb6T3fhNFq2+MeTRb064c6Wr4N/wv0DzQTjNzHNGQ==", - "license": "MIT", "engines": { "node": ">=10" }, @@ -1021,36 +1034,34 @@ } }, "node_modules/minecraft-data": { - "version": "3.26.0", - "resolved": "https://registry.npmjs.org/minecraft-data/-/minecraft-data-3.26.0.tgz", - "integrity": "sha512-9DGMM4qI7DdOFTMbtr3Wa/W+XXq11//Lhz+O0YRce9LHyYUDw34tvJcETHR0PNuE7p84J7kV02VLAOV+B1094Q==", - "license": "MIT" + "version": "3.62.0", + "resolved": "https://registry.npmjs.org/minecraft-data/-/minecraft-data-3.62.0.tgz", + "integrity": "sha512-jJXZ/WgyX79tIHlqvfyqG+sJDUekHiA3e9NRUCMGUno4NDrZMcpRI065DnkrI720RHTMb8iadf0NmnBP4Rla5A==" }, "node_modules/minecraft-folder-path": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/minecraft-folder-path/-/minecraft-folder-path-1.2.0.tgz", - "integrity": "sha512-qaUSbKWoOsH9brn0JQuBhxNAzTDMwrOXorwuRxdJKKKDYvZhtml+6GVCUrY5HRiEsieBEjCUnhVpDuQiKsiFaw==", - "license": "MIT" + "integrity": "sha512-qaUSbKWoOsH9brn0JQuBhxNAzTDMwrOXorwuRxdJKKKDYvZhtml+6GVCUrY5HRiEsieBEjCUnhVpDuQiKsiFaw==" }, "node_modules/minecraft-protocol": { - "version": "1.40.3", - "resolved": "https://registry.npmjs.org/minecraft-protocol/-/minecraft-protocol-1.40.3.tgz", - "integrity": "sha512-+6WTrQcqBRXYST8Ha2V30XZ2zcooXA8fBNgKvIHVE/AkWs1kDjiwH1gdhPlK17JMLnV+yYSH4PACsk5VAOuqPA==", - "license": "BSD-3-Clause", + "version": "1.47.0", + "resolved": "https://registry.npmjs.org/minecraft-protocol/-/minecraft-protocol-1.47.0.tgz", + "integrity": "sha512-IHL8faXLLIWv1O+2v2NgyKlooilu/OiSL9orI8Kqed/rZvVOrFPzs2PwMAYjpQX9gxLPhiSU19KqZ8CjfNuqhg==", "dependencies": { - "@types/readable-stream": "^2.3.13", + "@types/readable-stream": "^4.0.0", "aes-js": "^3.1.2", "buffer-equal": "^1.0.0", "debug": "^4.3.2", "endian-toggle": "^0.0.0", "lodash.get": "^4.1.2", "lodash.merge": "^4.3.0", - "minecraft-data": "^3.21.0", + "minecraft-data": "^3.55.0", "minecraft-folder-path": "^1.2.0", "node-fetch": "^2.6.1", "node-rsa": "^0.4.2", "prismarine-auth": "^2.2.0", - "prismarine-nbt": "^2.0.0", + "prismarine-chat": "^1.10.0", + "prismarine-nbt": "^2.5.0", "prismarine-realms": "^1.2.0", "protodef": "^1.8.0", "readable-stream": "^4.1.0", @@ -1062,9 +1073,9 @@ } }, "node_modules/minecraft-protocol/node_modules/node-fetch": { - "version": "2.6.12", - "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.12.tgz", - "integrity": "sha512-C/fGU2E8ToujUivIO0H+tpQ6HWo4eEmchoPIoXtxCrVghxdKq+QOHqEZW7tuP3KlV3bC8FRMO5nMCC7Zm1VP6g==", + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.7.0.tgz", + "integrity": "sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==", "dependencies": { "whatwg-url": "^5.0.0" }, @@ -1080,26 +1091,10 @@ } } }, - "node_modules/minecraft-protocol/node_modules/readable-stream": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-4.3.0.tgz", - "integrity": "sha512-MuEnA0lbSi7JS8XM+WNJlWZkHAAdm7gETHdFK//Q/mChGyj2akEFtdLZh32jSdkWGbRwCW9pn6g3LWDdDeZnBQ==", - "license": "MIT", - "dependencies": { - "abort-controller": "^3.0.0", - "buffer": "^6.0.3", - "events": "^3.3.0", - "process": "^0.11.10" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - } - }, "node_modules/minimist": { - "version": "1.2.7", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.7.tgz", - "integrity": "sha512-bzfL1YUZsP41gmu/qjrEk0Q6i2ix/cVeAhbCbqH9u3zYutS1cLg00qhrD0M2MVdCcx4Sc0UpP2eBWo9rotpq6g==", - "license": "MIT", + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz", + "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==", "funding": { "url": "https://github.com/sponsors/ljharb" } @@ -1107,13 +1102,12 @@ "node_modules/mkdirp-classic": { "version": "0.5.3", "resolved": "https://registry.npmjs.org/mkdirp-classic/-/mkdirp-classic-0.5.3.tgz", - "integrity": "sha512-gKLcREMhtuZRwRAfqP3RFW+TK4JqApVBtOIftVgjuABpAtpxhPGaDcfvbhNvD0B8iD1oUr/txX35NjcaY6Ns/A==", - "license": "MIT" + "integrity": "sha512-gKLcREMhtuZRwRAfqP3RFW+TK4JqApVBtOIftVgjuABpAtpxhPGaDcfvbhNvD0B8iD1oUr/txX35NjcaY6Ns/A==" }, "node_modules/mojangson": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/mojangson/-/mojangson-2.0.2.tgz", - "integrity": "sha512-iGPRE1Ez+W+42Dt4Ao91c9VVs+FmuRUlAFDef76xRX3mbZrTNuezDtFI0PbfYqheg/B0fSiq0Q0V1emZNt37cw==", + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/mojangson/-/mojangson-2.0.4.tgz", + "integrity": "sha512-HYmhgDjr1gzF7trGgvcC/huIg2L8FsVbi/KacRe6r1AswbboGVZDS47SOZlomPuMWvZLas8m9vuHHucdZMwTmQ==", "dependencies": { "nearley": "^2.19.5" } @@ -1126,14 +1120,12 @@ "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==", - "license": "MIT" + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" }, "node_modules/napi-build-utils": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/napi-build-utils/-/napi-build-utils-1.0.2.tgz", - "integrity": "sha512-ONmRUqK7zj7DWX0D9ADe03wbwOBZxNAfF20PlGfCWQcD3+/MakShIHrMqx9YwPTfxDdF1zLeL+RGZiR9kGMLdg==", - "license": "MIT" + "integrity": "sha512-ONmRUqK7zj7DWX0D9ADe03wbwOBZxNAfF20PlGfCWQcD3+/MakShIHrMqx9YwPTfxDdF1zLeL+RGZiR9kGMLdg==" }, "node_modules/nearley": { "version": "2.20.1", @@ -1157,10 +1149,9 @@ } }, "node_modules/node-abi": { - "version": "3.31.0", - "resolved": "https://registry.npmjs.org/node-abi/-/node-abi-3.31.0.tgz", - "integrity": "sha512-eSKV6s+APenqVh8ubJyiu/YhZgxQpGP66ntzUb3lY1xB9ukSRaGnx0AIxI+IM+1+IVYC1oWobgG5L3Lt9ARykQ==", - "license": "MIT", + "version": "3.56.0", + "resolved": "https://registry.npmjs.org/node-abi/-/node-abi-3.56.0.tgz", + "integrity": "sha512-fZjdhDOeRcaS+rcpve7XuwHBmktS1nS1gzgghwKUQQ8nTy2FdSDr6ZT8k6YhvlJeHmmQMYiT/IH9hfco5zeW2Q==", "dependencies": { "semver": "^7.3.5" }, @@ -1171,8 +1162,7 @@ "node_modules/node-addon-api": { "version": "5.1.0", "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-5.1.0.tgz", - "integrity": "sha512-eh0GgfEkpnoWDq+VY8OyvYhFEzBk6jIYbRKdIlyTiAXIVJ8PyBaKb0rp7oDtoddbdoHWhq8wwr+XZ81F1rpNdA==", - "license": "MIT" + "integrity": "sha512-eh0GgfEkpnoWDq+VY8OyvYhFEzBk6jIYbRKdIlyTiAXIVJ8PyBaKb0rp7oDtoddbdoHWhq8wwr+XZ81F1rpNdA==" }, "node_modules/node-domexception": { "version": "1.0.0", @@ -1188,15 +1178,14 @@ "url": "https://paypal.me/jimmywarting" } ], - "license": "MIT", "engines": { "node": ">=10.5.0" } }, "node_modules/node-fetch": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-3.3.1.tgz", - "integrity": "sha512-cRVc/kyto/7E5shrWca1Wsea4y6tL9iYJE5FBCius3JQfb/4P4I295PfhgbJQBLTx6lATE4z+wK0rPM4VS2uow==", + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-3.3.2.tgz", + "integrity": "sha512-dRB78srN/l6gqWulah9SrxeYnxeddIG30+GOqK/9OlLVyLg3HPnr6SqOWTWOXKRwC2eGYCkZ59NNuSgvSrpgOA==", "dependencies": { "data-uri-to-buffer": "^4.0.0", "fetch-blob": "^3.1.4", @@ -1214,7 +1203,6 @@ "version": "0.4.2", "resolved": "https://registry.npmjs.org/node-rsa/-/node-rsa-0.4.2.tgz", "integrity": "sha512-Bvso6Zi9LY4otIZefYrscsUpo2mUpiAVIEmSZV2q41sP8tHZoert3Yu6zv4f/RXJqMNZQKCtnhDugIuCma23YA==", - "license": "MIT", "dependencies": { "asn1": "0.2.3" } @@ -1223,7 +1211,6 @@ "version": "1.4.0", "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", - "license": "ISC", "dependencies": { "wrappy": "1" } @@ -1232,7 +1219,6 @@ "version": "7.0.1", "resolved": "https://registry.npmjs.org/parse-domain/-/parse-domain-7.0.1.tgz", "integrity": "sha512-HsVmJkfoZB/Rb7Ai/QYVqZa95zkemNMerP70ZzIFpvvnvWbSSp+ZmUOQsdY1wxuFrB8cdA33E9fwwAT/OjWViA==", - "license": "MIT", "dependencies": { "is-ip": "^4.0.0", "node-fetch": "^3.2.0" @@ -1242,10 +1228,9 @@ } }, "node_modules/prebuild-install": { - "version": "7.1.1", - "resolved": "https://registry.npmjs.org/prebuild-install/-/prebuild-install-7.1.1.tgz", - "integrity": "sha512-jAXscXWMcCK8GgCoHOfIr0ODh5ai8mj63L2nWrjuAgXE6tDyYGnx4/8o/rCgU+B4JSyZBKbeZqzhtwtC3ovxjw==", - "license": "MIT", + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/prebuild-install/-/prebuild-install-7.1.2.tgz", + "integrity": "sha512-UnNke3IQb6sgarcZIDU3gbMeTp/9SSU1DAIkil7PrqG1vZlBtY5msYccSKSHDqa3hNg436IXK+SNImReuA1wEQ==", "dependencies": { "detect-libc": "^2.0.0", "expand-template": "^2.0.3", @@ -1268,12 +1253,11 @@ } }, "node_modules/prismarine-auth": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/prismarine-auth/-/prismarine-auth-2.2.0.tgz", - "integrity": "sha512-3XfR3bqrd7nrTVyEqMwuYRr+/Vy+hkfBplubSDuoRAcRCs90lDx7R4EG3fjMSoKY53RLTXjeFnsB6m1krhL/2A==", - "license": "MIT", + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/prismarine-auth/-/prismarine-auth-2.4.1.tgz", + "integrity": "sha512-DwDI3Ucxf/eThJJo5QVzlywFrJulL1fK1z6F8bybvddim8YgudRksQc3w4cE2m0hPPHfE1BRd5lh1NpedrixMQ==", "dependencies": { - "@azure/msal-node": "^1.1.0", + "@azure/msal-node": "^2.0.2", "@xboxreplay/xboxlive-auth": "^3.3.3", "debug": "^4.3.3", "jose": "^4.1.4", @@ -1283,9 +1267,9 @@ } }, "node_modules/prismarine-auth/node_modules/node-fetch": { - "version": "2.6.12", - "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.12.tgz", - "integrity": "sha512-C/fGU2E8ToujUivIO0H+tpQ6HWo4eEmchoPIoXtxCrVghxdKq+QOHqEZW7tuP3KlV3bC8FRMO5nMCC7Zm1VP6g==", + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.7.0.tgz", + "integrity": "sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==", "dependencies": { "whatwg-url": "^5.0.0" }, @@ -1311,11 +1295,11 @@ } }, "node_modules/prismarine-block": { - "version": "1.16.3", - "resolved": "https://registry.npmjs.org/prismarine-block/-/prismarine-block-1.16.3.tgz", - "integrity": "sha512-E9OazjIqnEgcXM6me6EIeQFMcNRWZzsaftWtetRSIKVoW+4UKWleb6lTNKh9kq7wNxciKavcYBmKL3sF7HfSaA==", + "version": "1.17.1", + "resolved": "https://registry.npmjs.org/prismarine-block/-/prismarine-block-1.17.1.tgz", + "integrity": "sha512-r1TIn/b5v77BX4a+qd+Yv+4/vZpsC/Jp5ElYxd6++2wpCnqiuxVG7BlS2Eo14vez1M2gt3qoNEl54Hr8qox/rQ==", "dependencies": { - "minecraft-data": "^3.0.0", + "minecraft-data": "^3.38.0", "prismarine-biome": "^1.1.0", "prismarine-chat": "^1.5.0", "prismarine-item": "^1.10.1", @@ -1324,20 +1308,19 @@ } }, "node_modules/prismarine-chat": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/prismarine-chat/-/prismarine-chat-1.8.0.tgz", - "integrity": "sha512-hEz47GESIEP0W1KSHrK7ZSy0PqbQW7khYWenv8d5wvyAYnBs1E4KXDBJSWqyGIYinKGN9aes8v3xpQhgURK/Fg==", + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/prismarine-chat/-/prismarine-chat-1.10.0.tgz", + "integrity": "sha512-f9ESzi2Kkf4GJadtgBl+SmvtAlmOXaso6Fxt4M/vUXDKgQNSk66APmIHnBkKWyjzG9X2VXsbDGeIIPf/d3guxA==", "dependencies": { "mojangson": "^2.0.1", - "prismarine-item": "^1.10.0", "prismarine-nbt": "^2.0.0", "prismarine-registry": "^1.4.0" } }, "node_modules/prismarine-chunk": { - "version": "1.33.0", - "resolved": "https://registry.npmjs.org/prismarine-chunk/-/prismarine-chunk-1.33.0.tgz", - "integrity": "sha512-oTkhyE8EWV5mMOaUyCACiUUtx1270Mo18Ryj+t5Y8dglT4QfVwBsYeph+O40kNL9TK5cTW1lFYg5vr2rWuFGnw==", + "version": "1.35.0", + "resolved": "https://registry.npmjs.org/prismarine-chunk/-/prismarine-chunk-1.35.0.tgz", + "integrity": "sha512-Q1lElMUle7wWxWdQjbZo3j2/dLNG325j90IcbbMmBTnHdQSWIjWFe792XOz3RVBlvrhRJEiZk38S6/eQTQ9esw==", "dependencies": { "prismarine-biome": "^1.2.0", "prismarine-block": "^1.14.1", @@ -1353,37 +1336,35 @@ } }, "node_modules/prismarine-item": { - "version": "1.12.1", - "resolved": "https://registry.npmjs.org/prismarine-item/-/prismarine-item-1.12.1.tgz", - "integrity": "sha512-Q+cV8WCM6gTO/K8gIpe4sTCVj0wdXy/IIctpQhgj4iRPoRY/rLCI88FAGsLNU1cabOFQDO3a0NIz+KLvhOvbQA==", + "version": "1.14.0", + "resolved": "https://registry.npmjs.org/prismarine-item/-/prismarine-item-1.14.0.tgz", + "integrity": "sha512-udQHYGJ05klFe8Kkc0TOmwoXj5Xl1ZPgHVoMbGUAFB9exN4TFxEa1A39vkSYhxP5Et9PNufQQvFBFVom0nXikA==", "dependencies": { "prismarine-nbt": "^2.0.0", "prismarine-registry": "^1.4.0" } }, "node_modules/prismarine-nbt": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/prismarine-nbt/-/prismarine-nbt-2.2.1.tgz", - "integrity": "sha512-Mb50c58CPnuZ+qvM31DBa08tf9UumlTq1LkvpMoUpKfCuN05GZHTqCUwER3lxTSHLL0GZKghIPbYR/JQkINijQ==", - "license": "MIT", + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/prismarine-nbt/-/prismarine-nbt-2.5.0.tgz", + "integrity": "sha512-F0/8UAa9SDDnAGrBYqZc4nG8h2zj5cE2eAJU5xlDR/IsQQ3moVxkOjE3h3nMv6SbvZrvAcgX7waA/nd9LLHYdA==", "dependencies": { "protodef": "^1.9.0" } }, "node_modules/prismarine-realms": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/prismarine-realms/-/prismarine-realms-1.3.0.tgz", - "integrity": "sha512-heAzbP2bI/dGjoHUWAe3pncg3jHwNLjN0nkZb98jbpJxgsogx/8Cqejd1Oc+EVnqnVwNyiyITfCoH3ECqYeikw==", - "license": "MIT", + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/prismarine-realms/-/prismarine-realms-1.3.2.tgz", + "integrity": "sha512-5apl9Ru8veTj5q2OozRc4GZOuSIcs3yY4UEtALiLKHstBe8bRw8vNlaz4Zla3jsQ8yP/ul1b1IJINTRbocuA6g==", "dependencies": { "debug": "^4.3.3", "node-fetch": "^2.6.1" } }, "node_modules/prismarine-realms/node_modules/node-fetch": { - "version": "2.6.12", - "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.12.tgz", - "integrity": "sha512-C/fGU2E8ToujUivIO0H+tpQ6HWo4eEmchoPIoXtxCrVghxdKq+QOHqEZW7tuP3KlV3bC8FRMO5nMCC7Zm1VP6g==", + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.7.0.tgz", + "integrity": "sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==", "dependencies": { "whatwg-url": "^5.0.0" }, @@ -1400,9 +1381,9 @@ } }, "node_modules/prismarine-registry": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/prismarine-registry/-/prismarine-registry-1.6.0.tgz", - "integrity": "sha512-oduDRuwa5rXT8CkPeMSlBsuBzxZF9oRsDpFK0oBStpIoNwSuTqqGGGgLlyL20OS2O9pmqYpOMlmG80CW4uuKJw==", + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/prismarine-registry/-/prismarine-registry-1.7.0.tgz", + "integrity": "sha512-yyva0FpWI078nNeMhx8ekVza5uUTYhEv+C+ADu3wUQXiG8qhXkvrf0uzsnhTgZL8BLdsi2axgCEiKw9qSKIuxQ==", "dependencies": { "minecraft-data": "^3.0.0", "prismarine-nbt": "^2.0.0" @@ -1412,7 +1393,6 @@ "version": "0.11.10", "resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz", "integrity": "sha512-cdGef/drWFoydD1JsMzuFf8100nZl+GT+yacc2bEced5f9Rjk4z+WtFUTBu9PhOi9j/jfmBPu0mMEY4wIdAF8A==", - "license": "MIT", "engines": { "node": ">= 0.6.0" } @@ -1421,7 +1401,6 @@ "version": "1.15.0", "resolved": "https://registry.npmjs.org/protodef/-/protodef-1.15.0.tgz", "integrity": "sha512-bZ2Omw8dT+DACjJHLrBWZlqN4MlT9g9oSpJDdkUAJOStUzgJp+Zn42FJfPUdwutUxjaxA0PftN0PDlNa2XbneA==", - "license": "MIT", "dependencies": { "lodash.get": "^4.4.2", "lodash.reduce": "^4.6.0", @@ -1436,7 +1415,6 @@ "version": "1.3.1", "resolved": "https://registry.npmjs.org/protodef-validator/-/protodef-validator-1.3.1.tgz", "integrity": "sha512-lZ5FWKZYR9xOjpMw1+EfZRfCjzNRQWPq+Dk+jki47Sikl2EeWEPnTfnJERwnU/EwFq6us+0zqHHzSsmLeYX+Lg==", - "license": "MIT", "dependencies": { "ajv": "^6.5.4" }, @@ -1444,21 +1422,32 @@ "protodef-validator": "cli.js" } }, + "node_modules/protodef/node_modules/readable-stream": { + "version": "3.6.2", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", + "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", + "dependencies": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + }, + "engines": { + "node": ">= 6" + } + }, "node_modules/pump": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==", - "license": "MIT", "dependencies": { "end-of-stream": "^1.1.0", "once": "^1.3.1" } }, "node_modules/punycode": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.0.tgz", - "integrity": "sha512-rRV+zQD8tVFys26lAGR9WUuS4iUAngJScM+ZRSKtvl5tKeZ2t5bvdNFdNHBW9FWR4guGHlgmsZ1G7BSm2wTbuA==", - "license": "MIT", + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", + "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==", "engines": { "node": ">=6" } @@ -1484,7 +1473,6 @@ "version": "1.2.8", "resolved": "https://registry.npmjs.org/rc/-/rc-1.2.8.tgz", "integrity": "sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==", - "license": "(BSD-2-Clause OR MIT OR Apache-2.0)", "dependencies": { "deep-extend": "^0.6.0", "ini": "~1.3.0", @@ -1496,17 +1484,18 @@ } }, "node_modules/readable-stream": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", - "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", - "license": "MIT", + "version": "4.5.2", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-4.5.2.tgz", + "integrity": "sha512-yjavECdqeZ3GLXNgRXgeQEdz9fvDDkNKyHnbHRFtOr7/LcfgBcmct7t/ET+HaCTqfh06OzoAxrkN/IfjJBVe+g==", "dependencies": { - "inherits": "^2.0.3", - "string_decoder": "^1.1.1", - "util-deprecate": "^1.0.1" + "abort-controller": "^3.0.0", + "buffer": "^6.0.3", + "events": "^3.3.0", + "process": "^0.11.10", + "string_decoder": "^1.3.0" }, "engines": { - "node": ">= 6" + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" } }, "node_modules/ret": { @@ -1518,29 +1507,14 @@ } }, "node_modules/safe-buffer": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", - "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "license": "MIT" + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" }, "node_modules/semver": { - "version": "7.5.3", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.3.tgz", - "integrity": "sha512-QBlUtyVk/5EeHbi7X0fw6liDZc7BBmEaSYn01fMU1OUYbf6GPsbTtd8WmnqbI20SeycoHSeiybkE/q1Q+qlThQ==", + "version": "7.6.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.0.tgz", + "integrity": "sha512-EnwXhrlwXMk9gKu5/flx5sv/an57AkRplG3hTK68W7FRDN+k+OWBj65M7719OkA82XLBxrcX0KSHj+X5COhOVg==", "dependencies": { "lru-cache": "^6.0.0" }, @@ -1556,7 +1530,6 @@ "resolved": "https://registry.npmjs.org/sharp/-/sharp-0.31.3.tgz", "integrity": "sha512-XcR4+FCLBFKw1bdB+GEhnUNXNXvnt0tDo4WsBsraKymuo/IAuPuCBVAL2wIkUw2r/dwFW5Q5+g66Kwl2dgDFVg==", "hasInstallScript": true, - "license": "Apache-2.0", "dependencies": { "color": "^4.2.3", "detect-libc": "^2.0.1", @@ -1591,8 +1564,7 @@ "type": "consulting", "url": "https://feross.org/support" } - ], - "license": "MIT" + ] }, "node_modules/simple-get": { "version": "4.0.1", @@ -1612,7 +1584,6 @@ "url": "https://feross.org/support" } ], - "license": "MIT", "dependencies": { "decompress-response": "^6.0.0", "once": "^1.3.1", @@ -1623,7 +1594,6 @@ "version": "0.2.2", "resolved": "https://registry.npmjs.org/simple-swizzle/-/simple-swizzle-0.2.2.tgz", "integrity": "sha512-JA//kQgZtbuY83m+xT+tXJkmJncGMTFT+C+g2h2R9uxkYIrE2yy9sgmcLhCnw57/WSD+Eh3J97FPEDFnbXnDUg==", - "license": "MIT", "dependencies": { "is-arrayish": "^0.3.1" } @@ -1632,7 +1602,6 @@ "version": "4.2.0", "resolved": "https://registry.npmjs.org/smart-buffer/-/smart-buffer-4.2.0.tgz", "integrity": "sha512-94hK0Hh8rPqQl2xXc3HsaBoOXKV20MToPkcXvwbISWLEs+64sBq5kFgn2kJDHb1Pry9yrP0dxrCI9RRci7RXKg==", - "license": "MIT", "engines": { "node": ">= 6.0.0", "npm": ">= 3.0.0" @@ -1642,16 +1611,33 @@ "version": "1.3.0", "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", - "license": "MIT", "dependencies": { "safe-buffer": "~5.2.0" } }, + "node_modules/string_decoder/node_modules/safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, "node_modules/strip-json-comments": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", "integrity": "sha512-4gB8na07fecVVkOI6Rs4e7T6NOTki5EmL7TUduTs6bu3EdnSycntVJ4re8kgZA+wx9IueI2Y11bfbgwtzuE0KQ==", - "license": "MIT", "engines": { "node": ">=0.10.0" } @@ -1660,7 +1646,6 @@ "version": "2.1.1", "resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-2.1.1.tgz", "integrity": "sha512-V0r2Y9scmbDRLCNex/+hYzvp/zyYjvFbHPNgVTKfQvVrb6guiE/fxP+XblDNR011utopbkex2nM4dHNV6GDsng==", - "license": "MIT", "dependencies": { "chownr": "^1.1.1", "mkdirp-classic": "^0.5.2", @@ -1672,7 +1657,6 @@ "version": "2.2.0", "resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-2.2.0.tgz", "integrity": "sha512-ujeqbceABgwMZxEJnk2HDY2DlnUZ+9oEcb1KzTVfYHio0UE6dG71n60d8D2I4qNvleWrrXpmjpt7vZeF1LnMZQ==", - "license": "MIT", "dependencies": { "bl": "^4.0.3", "end-of-stream": "^1.4.1", @@ -1684,22 +1668,33 @@ "node": ">=6" } }, + "node_modules/tar-stream/node_modules/readable-stream": { + "version": "3.6.2", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", + "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", + "dependencies": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + }, + "engines": { + "node": ">= 6" + } + }, "node_modules/tr46": { "version": "0.0.3", "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==" }, "node_modules/tslib": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.5.0.tgz", - "integrity": "sha512-336iVw3rtn2BUK7ORdIAHTyxHGRIHVReokCR3XjbckJMK7ms8FysBfhLR8IXnAgy7T0PTPNBWKiH514FOW/WSg==", - "license": "0BSD" + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" }, "node_modules/tunnel-agent": { "version": "0.6.0", "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", "integrity": "sha512-McnNiV1l8RYeY8tBgEpuodCC1mLUdbSN+CYBL7kJsJNInOP8UjDDEwdk6Mw60vdLLrr5NHKZhMAOSrR2NZuQ+w==", - "license": "Apache-2.0", "dependencies": { "safe-buffer": "^5.0.1" }, @@ -1712,11 +1707,15 @@ "resolved": "https://registry.npmjs.org/uint4/-/uint4-0.1.2.tgz", "integrity": "sha512-lhEx78gdTwFWG+mt6cWAZD/R6qrIj0TTBeH5xwyuDJyswLNlGe+KVlUPQ6+mx5Ld332pS0AMUTo9hIly7YsWxQ==" }, + "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==" + }, "node_modules/uri-js": { "version": "4.4.1", "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", - "license": "BSD-2-Clause", "dependencies": { "punycode": "^2.1.0" } @@ -1724,14 +1723,12 @@ "node_modules/util-deprecate": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", - "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", - "license": "MIT" + "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==" }, "node_modules/uuid": { "version": "8.3.2", "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==", - "license": "MIT", "bin": { "uuid": "dist/bin/uuid" } @@ -1740,22 +1737,19 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/uuid-1345/-/uuid-1345-1.0.2.tgz", "integrity": "sha512-bA5zYZui+3nwAc0s3VdGQGBfbVsJLVX7Np7ch2aqcEWFi5lsAEcmO3+lx3djM1npgpZI8KY2FITZ2uYTnYUYyw==", - "license": "MIT", "dependencies": { "macaddress": "^0.5.1" } }, "node_modules/vec3": { - "version": "0.1.7", - "resolved": "https://registry.npmjs.org/vec3/-/vec3-0.1.7.tgz", - "integrity": "sha512-EZSeXBL+L3go2wWwtQQse4fEcNGIQjT14qvi4LYVj1ifZt/J5XZ1QZqkDuOVVH07YwTEIFbsAv3pzwUpF7x9Wg==", - "license": "BSD" + "version": "0.1.10", + "resolved": "https://registry.npmjs.org/vec3/-/vec3-0.1.10.tgz", + "integrity": "sha512-Sr1U3mYtMqCOonGd3LAN9iqy0qF6C+Gjil92awyK/i2OwiUo9bm7PnLgFpafymun50mOjnDcg4ToTgRssrlTcw==" }, "node_modules/web-streams-polyfill": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/web-streams-polyfill/-/web-streams-polyfill-3.2.1.tgz", - "integrity": "sha512-e0MO3wdXWKrLbL0DgGnUV7WHVuw9OUvL4hjgnPkIeEvESk74gAITi5G606JtZPp39cd8HA9VQzCIvA49LpPN5Q==", - "license": "MIT", + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/web-streams-polyfill/-/web-streams-polyfill-3.3.3.tgz", + "integrity": "sha512-d2JWLCivmZYTSIoge9MsgFCZrt571BikcWGYkjC1khllbTeDlGqZ2D8vD8E/lJa8WGWbb7Plm8/XJYV7IJHZZw==", "engines": { "node": ">= 8" } @@ -1777,14 +1771,12 @@ "node_modules/wrappy": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", - "license": "ISC" + "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==" }, "node_modules/ws": { - "version": "8.12.0", - "resolved": "https://registry.npmjs.org/ws/-/ws-8.12.0.tgz", - "integrity": "sha512-kU62emKIdKVeEIOIKVegvqpXMSTAMLJozpHZaJNDYqBjzlSYXQGviYwN1osDLJ9av68qHd4a2oSjd7yD4pacig==", - "license": "MIT", + "version": "8.16.0", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.16.0.tgz", + "integrity": "sha512-HS0c//TP7Ina87TfiPUz1rQzMhHrl/SG2guqRcTOIUYD2q8uhUdNHZYJUaQ8aTGPzCh+c6oawMKW35nFl1dxyQ==", "engines": { "node": ">=10.0.0" }, @@ -1809,23 +1801,21 @@ "node_modules/yallist": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", - "license": "ISC" + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==" }, "node_modules/yggdrasil": { "version": "1.7.0", "resolved": "https://registry.npmjs.org/yggdrasil/-/yggdrasil-1.7.0.tgz", "integrity": "sha512-QBIo5fiNd7688G3FqXXYGr36uyrYzczlNuzpWFy2zL3+R+3KT2lF+wFxm51synfA3l3z6IBiGOc1/EVXWCYY1Q==", - "license": "MIT", "dependencies": { "node-fetch": "^2.6.1", "uuid": "^8.2.0" } }, "node_modules/yggdrasil/node_modules/node-fetch": { - "version": "2.6.12", - "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.12.tgz", - "integrity": "sha512-C/fGU2E8ToujUivIO0H+tpQ6HWo4eEmchoPIoXtxCrVghxdKq+QOHqEZW7tuP3KlV3bC8FRMO5nMCC7Zm1VP6g==", + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.7.0.tgz", + "integrity": "sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==", "dependencies": { "whatwg-url": "^5.0.0" }, @@ -1841,1135 +1831,5 @@ } } } - }, - "dependencies": { - "@azure/msal-common": { - "version": "9.1.1", - "resolved": "https://registry.npmjs.org/@azure/msal-common/-/msal-common-9.1.1.tgz", - "integrity": "sha512-we9xR8lvu47fF0h+J8KyXoRy9+G/fPzm3QEa2TrdR3jaVS3LKAyE2qyMuUkNdbVkvzl8Zr9f7l+IUSP22HeqXw==" - }, - "@azure/msal-node": { - "version": "1.14.6", - "resolved": "https://registry.npmjs.org/@azure/msal-node/-/msal-node-1.14.6.tgz", - "integrity": "sha512-em/qqFL5tLMxMPl9vormAs13OgZpmQoJbiQ/GlWr+BA77eCLoL+Ehr5xRHowYo+LFe5b+p+PJVkRvT+mLvOkwA==", - "requires": { - "@azure/msal-common": "^9.0.2", - "jsonwebtoken": "^9.0.0", - "uuid": "^8.3.0" - } - }, - "@thi.ng/api": { - "version": "8.6.3", - "resolved": "https://registry.npmjs.org/@thi.ng/api/-/api-8.6.3.tgz", - "integrity": "sha512-zWaaVoR3GEVQbRNsp30dQP6Gb39guEmGKp5zbgWD3C5vmshZdp2huhiEQpCDARBGoVV3KiI/f03HdZ9YCCd7+A==" - }, - "@thi.ng/arrays": { - "version": "2.5.1", - "resolved": "https://registry.npmjs.org/@thi.ng/arrays/-/arrays-2.5.1.tgz", - "integrity": "sha512-9jk/XXEPYLYtXWCsLZu3JW4pxaToOQo7Qj+g/PTkmy/9PXfLrzYyTgDMz6URSY/qbbdfPtnPMnldc1dRoiXr9w==", - "requires": { - "@thi.ng/api": "^8.6.3", - "@thi.ng/checks": "^3.3.7", - "@thi.ng/compare": "^2.1.22", - "@thi.ng/equiv": "^2.1.17", - "@thi.ng/errors": "^2.2.8", - "@thi.ng/random": "^3.3.21" - } - }, - "@thi.ng/binary": { - "version": "3.3.16", - "resolved": "https://registry.npmjs.org/@thi.ng/binary/-/binary-3.3.16.tgz", - "integrity": "sha512-btGsjcegkrnKtK3ygWOGDSuY2owXkQqLjxqfvqoc+gbxNFB6K+Dc/kjRcCf5HRKXwRVZqeLaxSQfYPbh+VGoLg==", - "requires": { - "@thi.ng/api": "^8.6.3" - } - }, - "@thi.ng/checks": { - "version": "3.3.7", - "resolved": "https://registry.npmjs.org/@thi.ng/checks/-/checks-3.3.7.tgz", - "integrity": "sha512-RX3Oz6icR4VKDyheTcZzDW8znY1xypD1m6FhOpOCwfiqnz+4Y/ycfRmmvFoWp5IzdUScjfBb6PAWQPAl1B1zaw==", - "requires": { - "tslib": "^2.4.1" - } - }, - "@thi.ng/compare": { - "version": "2.1.22", - "resolved": "https://registry.npmjs.org/@thi.ng/compare/-/compare-2.1.22.tgz", - "integrity": "sha512-+ZF2tVNxIYZxV1qCDliJtlihJut1Sl7FOMZ+cZNWUfU+wIDa4YDZN8fmXxBM/1Pcx6g7Hrhl1KrBzY/0FQuZdA==", - "requires": { - "@thi.ng/api": "^8.6.3" - } - }, - "@thi.ng/compose": { - "version": "2.1.24", - "resolved": "https://registry.npmjs.org/@thi.ng/compose/-/compose-2.1.24.tgz", - "integrity": "sha512-iwNwT6n4dhjG7Y/GuQud+VyQl2uNexy5ghIpn0YFom+aJ8EGTwxIyvrYeGVQe1eLACFWHr55RbWdHWZlfsKi+g==", - "requires": { - "@thi.ng/api": "^8.6.3", - "@thi.ng/errors": "^2.2.8" - } - }, - "@thi.ng/equiv": { - "version": "2.1.17", - "resolved": "https://registry.npmjs.org/@thi.ng/equiv/-/equiv-2.1.17.tgz", - "integrity": "sha512-ePAwaWfF0ks4U4XoOWQU7g4l2+L4ax3w55KCTa8xgwmTwFjGNtXY/YbNG3o4/Zg9R+N+/TlXfCpMgH6IZ8kpSg==" - }, - "@thi.ng/errors": { - "version": "2.2.8", - "resolved": "https://registry.npmjs.org/@thi.ng/errors/-/errors-2.2.8.tgz", - "integrity": "sha512-cJea03+HCnDNlcuz3+5noURGXMT9gPBYgIcXWR76mW0IJ92jfyQ04Yt6J12rO73Td4wNLi+EiRrQdfcjFsyhqw==" - }, - "@thi.ng/hex": { - "version": "2.3.4", - "resolved": "https://registry.npmjs.org/@thi.ng/hex/-/hex-2.3.4.tgz", - "integrity": "sha512-fcl/KpaxuFBqK58HBIHZtaGjgp+KF4QIdXIVjHaAerwJx/gBVLho93Pq+stwX/2RO297U4NF9LuIM/pjj26RiQ==" - }, - "@thi.ng/leb128": { - "version": "3.0.5", - "resolved": "https://registry.npmjs.org/@thi.ng/leb128/-/leb128-3.0.5.tgz", - "integrity": "sha512-B4NP+A1JlZFwUVhAzmVwhGXqnbMGpIBdQq5tiQqMDryWutsgK+CXodQ4Aq6/8N6EctGwhGtVXB4+v9iGHrwdPQ==", - "requires": { - "@thi.ng/checks": "^3.3.7", - "@thi.ng/errors": "^2.2.8", - "@thi.ng/transducers-binary": "^2.1.35" - } - }, - "@thi.ng/math": { - "version": "5.4.0", - "resolved": "https://registry.npmjs.org/@thi.ng/math/-/math-5.4.0.tgz", - "integrity": "sha512-nBSLBbA/TUFI19ZHD8NYGJWncgr9E/94/oIO8mpEIdsUfkjnpbd8Y7Xnji2SmCzAX2PGIvZ9TetXdJvdcdl7qQ==", - "requires": { - "@thi.ng/api": "^8.6.3" - } - }, - "@thi.ng/random": { - "version": "3.3.21", - "resolved": "https://registry.npmjs.org/@thi.ng/random/-/random-3.3.21.tgz", - "integrity": "sha512-dmdQlgTQtTPfpzEugtVM1o8KbjjmGq2V5W/V+BFh1SOnRfOcJQLyGtp2556490z1Qhm1QjKouZCd9aqyvMHHqA==", - "requires": { - "@thi.ng/api": "^8.6.3", - "@thi.ng/checks": "^3.3.7", - "@thi.ng/errors": "^2.2.8", - "@thi.ng/hex": "^2.3.4" - } - }, - "@thi.ng/transducers": { - "version": "8.3.30", - "resolved": "https://registry.npmjs.org/@thi.ng/transducers/-/transducers-8.3.30.tgz", - "integrity": "sha512-msKkvgnAmXBaoDWg/UVduh44qWt5DyPt7XSB8W36aGJqxhF7D9o+WSi7vc9y2nhbD2BkIQRj9VRg2h8jL1q5HQ==", - "requires": { - "@thi.ng/api": "^8.6.3", - "@thi.ng/arrays": "^2.5.1", - "@thi.ng/checks": "^3.3.7", - "@thi.ng/compare": "^2.1.22", - "@thi.ng/compose": "^2.1.24", - "@thi.ng/errors": "^2.2.8", - "@thi.ng/math": "^5.4.0", - "@thi.ng/random": "^3.3.21" - } - }, - "@thi.ng/transducers-binary": { - "version": "2.1.35", - "resolved": "https://registry.npmjs.org/@thi.ng/transducers-binary/-/transducers-binary-2.1.35.tgz", - "integrity": "sha512-FDCV4G+w/WuemeExHjqo5BT08GoTkzkCaKlDXxWnMJ2EtjzM8QFjHRFrqW8TLi8wZf/ovsL0p/tnL0KVL0MxKw==", - "requires": { - "@thi.ng/binary": "^3.3.16", - "@thi.ng/compose": "^2.1.24", - "@thi.ng/errors": "^2.2.8", - "@thi.ng/hex": "^2.3.4", - "@thi.ng/random": "^3.3.21", - "@thi.ng/transducers": "^8.3.30" - } - }, - "@types/node": { - "version": "18.11.18", - "resolved": "https://registry.npmjs.org/@types/node/-/node-18.11.18.tgz", - "integrity": "sha512-DHQpWGjyQKSHj3ebjFI/wRKcqQcdR+MoFBygntYOZytCqNfkd2ZC4ARDJ2DQqhjH5p85Nnd3jhUJIXrszFX/JA==" - }, - "@types/readable-stream": { - "version": "2.3.15", - "resolved": "https://registry.npmjs.org/@types/readable-stream/-/readable-stream-2.3.15.tgz", - "integrity": "sha512-oM5JSKQCcICF1wvGgmecmHldZ48OZamtMxcGGVICOJA8o8cahXC1zEVAif8iwoc5j8etxFaRFnf095+CDsuoFQ==", - "requires": { - "@types/node": "*", - "safe-buffer": "~5.1.1" - }, - "dependencies": { - "safe-buffer": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" - } - } - }, - "@types/semver": { - "version": "7.3.13", - "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.3.13.tgz", - "integrity": "sha512-21cFJr9z3g5dW8B0CVI9g2O9beqaThGQ6ZFBqHfwhzLDKUxaqTIy3vnfah/UPkfOiF2pLq+tGz+W8RyCskuslw==" - }, - "@types/sharp": { - "version": "0.31.1", - "resolved": "https://registry.npmjs.org/@types/sharp/-/sharp-0.31.1.tgz", - "integrity": "sha512-5nWwamN9ZFHXaYEincMSuza8nNfOof8nmO+mcI+Agx1uMUk4/pQnNIcix+9rLPXzKrm1pS34+6WRDbDV0Jn7ag==", - "requires": { - "@types/node": "*" - } - }, - "@types/ws": { - "version": "8.5.4", - "resolved": "https://registry.npmjs.org/@types/ws/-/ws-8.5.4.tgz", - "integrity": "sha512-zdQDHKUgcX/zBc4GrwsE/7dVdAD8JR4EuiAXiiUhhfyIJXXb2+PrGshFyeXWQPMmmZ2XxgaqclgpIC7eTXc1mg==", - "requires": { - "@types/node": "*" - } - }, - "@xboxreplay/errors": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/@xboxreplay/errors/-/errors-0.1.0.tgz", - "integrity": "sha512-Tgz1d/OIPDWPeyOvuL5+aai5VCcqObhPnlI3skQuf80GVF3k1I0lPCnGC+8Cm5PV9aLBT5m8qPcJoIUQ2U4y9g==" - }, - "@xboxreplay/xboxlive-auth": { - "version": "3.3.3", - "resolved": "https://registry.npmjs.org/@xboxreplay/xboxlive-auth/-/xboxlive-auth-3.3.3.tgz", - "integrity": "sha512-j0AU8pW10LM8O68CTZ5QHnvOjSsnPICy0oQcP7zyM7eWkDQ/InkiQiirQKsPn1XRYDl4ccNu0WM582s3UKwcBg==", - "requires": { - "@xboxreplay/errors": "^0.1.0", - "axios": "^0.21.1" - } - }, - "abort-controller": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/abort-controller/-/abort-controller-3.0.0.tgz", - "integrity": "sha512-h8lQ8tacZYnR3vNQTgibj+tODHI5/+l06Au2Pcriv/Gmet0eaj4TwWH41sO9wnHDiQsEj19q0drzdWdeAHtweg==", - "requires": { - "event-target-shim": "^5.0.0" - } - }, - "aes-js": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/aes-js/-/aes-js-3.1.2.tgz", - "integrity": "sha512-e5pEa2kBnBOgR4Y/p20pskXI74UEz7de8ZGVo58asOtvSVG5YAbJeELPZxOmt+Bnz3rX753YKhfIn4X4l1PPRQ==" - }, - "ajv": { - "version": "6.12.6", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", - "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", - "requires": { - "fast-deep-equal": "^3.1.1", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.4.1", - "uri-js": "^4.2.2" - } - }, - "asn1": { - "version": "0.2.3", - "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.3.tgz", - "integrity": "sha512-6i37w/+EhlWlGUJff3T/Q8u1RGmP5wgbiwYnOnbOqvtrPxT63/sYFyP9RcpxtxGymtfA075IvmOnL7ycNOWl3w==" - }, - "axios": { - "version": "0.21.4", - "resolved": "https://registry.npmjs.org/axios/-/axios-0.21.4.tgz", - "integrity": "sha512-ut5vewkiu8jjGBdqpM44XxjuCjq9LAKeHVmoVfHVzy8eHgxxq8SbAVQNovDA8mVi05kP0Ea/n/UzcSHcTJQfNg==", - "requires": { - "follow-redirects": "^1.14.0" - } - }, - "base64-js": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", - "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==" - }, - "bl": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/bl/-/bl-4.1.0.tgz", - "integrity": "sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==", - "requires": { - "buffer": "^5.5.0", - "inherits": "^2.0.4", - "readable-stream": "^3.4.0" - }, - "dependencies": { - "buffer": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", - "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", - "requires": { - "base64-js": "^1.3.1", - "ieee754": "^1.1.13" - } - } - } - }, - "buffer": { - "version": "6.0.3", - "resolved": "https://registry.npmjs.org/buffer/-/buffer-6.0.3.tgz", - "integrity": "sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA==", - "requires": { - "base64-js": "^1.3.1", - "ieee754": "^1.2.1" - } - }, - "buffer-equal": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/buffer-equal/-/buffer-equal-1.0.1.tgz", - "integrity": "sha512-QoV3ptgEaQpvVwbXdSO39iqPQTCxSF7A5U99AxbHYqUdCizL/lH2Z0A2y6nbZucxMEOtNyZfG2s6gsVugGpKkg==" - }, - "buffer-equal-constant-time": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/buffer-equal-constant-time/-/buffer-equal-constant-time-1.0.1.tgz", - "integrity": "sha512-zRpUiDwd/xk6ADqPMATG8vc9VPrkck7T07OIx0gnjmJAnHnTVXNQG3vfvWNuiZIkwu9KrKdA1iJKfsfTVxE6NA==" - }, - "chalk": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.2.0.tgz", - "integrity": "sha512-ree3Gqw/nazQAPuJJEy+avdl7QfZMcUvmHIKgEZkGL+xOBzRvup5Hxo6LHuMceSxOabuJLJm5Yp/92R9eMmMvA==" - }, - "chownr": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/chownr/-/chownr-1.1.4.tgz", - "integrity": "sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg==" - }, - "color": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/color/-/color-4.2.3.tgz", - "integrity": "sha512-1rXeuUUiGGrykh+CeBdu5Ie7OJwinCgQY0bc7GCRxy5xVHy+moaqkpL/jqQq0MtQOeYcrqEz4abc5f0KtU7W4A==", - "requires": { - "color-convert": "^2.0.1", - "color-string": "^1.9.0" - } - }, - "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==", - "requires": { - "color-name": "~1.1.4" - } - }, - "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==" - }, - "color-string": { - "version": "1.9.1", - "resolved": "https://registry.npmjs.org/color-string/-/color-string-1.9.1.tgz", - "integrity": "sha512-shrVawQFojnZv6xM40anx4CkoDP+fZsw/ZerEMsW/pyzsRbElpsL/DBVW7q3ExxwusdNXI3lXpuhEZkzs8p5Eg==", - "requires": { - "color-name": "^1.0.0", - "simple-swizzle": "^0.2.2" - } - }, - "commander": { - "version": "2.20.3", - "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", - "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==" - }, - "data-uri-to-buffer": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/data-uri-to-buffer/-/data-uri-to-buffer-4.0.1.tgz", - "integrity": "sha512-0R9ikRb668HB7QDxT1vkpuUBtqc53YyAwMwGeUFKRojY/NWKvdZ+9UYtRfGmhqNbRkTSVpMbmyhXipFFv2cb/A==" - }, - "debug": { - "version": "4.3.4", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", - "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", - "requires": { - "ms": "2.1.2" - } - }, - "decompress-response": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-6.0.0.tgz", - "integrity": "sha512-aW35yZM6Bb/4oJlZncMH2LCoZtJXTRxES17vE3hoRiowU2kWHaJKFkSBDnDR+cm9J+9QhXmREyIfv0pji9ejCQ==", - "requires": { - "mimic-response": "^3.1.0" - } - }, - "deep-extend": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz", - "integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==" - }, - "detect-libc": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.0.1.tgz", - "integrity": "sha512-463v3ZeIrcWtdgIg6vI6XUncguvr2TnGl4SzDXinkt9mSLpBJKXT3mW6xT3VQdDN11+WVs29pgvivTc4Lp8v+w==" - }, - "discontinuous-range": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/discontinuous-range/-/discontinuous-range-1.0.0.tgz", - "integrity": "sha512-c68LpLbO+7kP/b1Hr1qs8/BJ09F5khZGTxqxZuhzxpmwJKOgRFHJWIb9/KmqnqHhLdO55aOxFH/EGBvUQbL/RQ==" - }, - "dotenv": { - "version": "16.0.3", - "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.0.3.tgz", - "integrity": "sha512-7GO6HghkA5fYG9TYnNxi14/7K9f5occMlp3zXAuSxn7CKCxt9xbNWG7yF8hTCSUchlfWSe3uLmlPfigevRItzQ==" - }, - "ecdsa-sig-formatter": { - "version": "1.0.11", - "resolved": "https://registry.npmjs.org/ecdsa-sig-formatter/-/ecdsa-sig-formatter-1.0.11.tgz", - "integrity": "sha512-nagl3RYrbNv6kQkeJIpt6NJZy8twLB/2vtz6yN9Z4vRKHN4/QZJIEbqohALSgwKdnksuY3k5Addp5lg8sVoVcQ==", - "requires": { - "safe-buffer": "^5.0.1" - } - }, - "end-of-stream": { - "version": "1.4.4", - "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz", - "integrity": "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==", - "requires": { - "once": "^1.4.0" - } - }, - "endian-toggle": { - "version": "0.0.0", - "resolved": "https://registry.npmjs.org/endian-toggle/-/endian-toggle-0.0.0.tgz", - "integrity": "sha512-ShfqhXeHRE4TmggSlHXG8CMGIcsOsqDw/GcoPcosToE59Rm9e4aXaMhEQf2kPBsBRrKem1bbOAv5gOKnkliMFQ==" - }, - "event-target-shim": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/event-target-shim/-/event-target-shim-5.0.1.tgz", - "integrity": "sha512-i/2XbnSz/uxRCU6+NdVJgKWDTM427+MqYbkQzD321DuCQJUqOuJKIA0IM2+W2xtYHdKOmZ4dR6fExsd4SXL+WQ==" - }, - "events": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/events/-/events-3.3.0.tgz", - "integrity": "sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q==" - }, - "expand-template": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/expand-template/-/expand-template-2.0.3.tgz", - "integrity": "sha512-XYfuKMvj4O35f/pOXLObndIRvyQ+/+6AhODh+OKWj9S9498pHHn/IMszH+gt0fBCRWMNfk1ZSp5x3AifmnI2vg==" - }, - "fast-deep-equal": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", - "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==" - }, - "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==" - }, - "fetch-blob": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/fetch-blob/-/fetch-blob-3.2.0.tgz", - "integrity": "sha512-7yAQpD2UMJzLi1Dqv7qFYnPbaPx7ZfFK6PiIxQ4PfkGPyNyl2Ugx+a/umUonmKqjhM4DnfbMvdX6otXq83soQQ==", - "requires": { - "node-domexception": "^1.0.0", - "web-streams-polyfill": "^3.0.3" - } - }, - "follow-redirects": { - "version": "1.15.2", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.2.tgz", - "integrity": "sha512-VQLG33o04KaQ8uYi2tVNbdrWp1QWxNNea+nmIB4EVM28v0hmP17z7aG1+wAkNzVq4KeXTq3221ye5qTJP91JwA==" - }, - "formdata-polyfill": { - "version": "4.0.10", - "resolved": "https://registry.npmjs.org/formdata-polyfill/-/formdata-polyfill-4.0.10.tgz", - "integrity": "sha512-buewHzMvYL29jdeQTVILecSaZKnt/RJWjoZCF5OW60Z67/GmSLBkOFM7qh1PI3zFNtJbaZL5eQu1vLfazOwj4g==", - "requires": { - "fetch-blob": "^3.1.2" - } - }, - "fs-constants": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs-constants/-/fs-constants-1.0.0.tgz", - "integrity": "sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow==" - }, - "github-from-package": { - "version": "0.0.0", - "resolved": "https://registry.npmjs.org/github-from-package/-/github-from-package-0.0.0.tgz", - "integrity": "sha512-SyHy3T1v2NUXn29OsWdxmK6RwHD+vkj3v8en8AOBZ1wBQ/hCAQ5bAQTD02kW4W9tUp/3Qh6J8r9EvntiyCmOOw==" - }, - "ieee754": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", - "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==" - }, - "inherits": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", - "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" - }, - "ini": { - "version": "1.3.8", - "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz", - "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==" - }, - "ip-regex": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/ip-regex/-/ip-regex-5.0.0.tgz", - "integrity": "sha512-fOCG6lhoKKakwv+C6KdsOnGvgXnmgfmp0myi3bcNwj3qfwPAxRKWEuFhvEFF7ceYIz6+1jRZ+yguLFAmUNPEfw==" - }, - "is-arrayish": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.3.2.tgz", - "integrity": "sha512-eVRqCvVlZbuw3GrM63ovNSNAeA1K16kaR/LRY/92w0zxQ5/1YzwblUX652i4Xs9RwAGjW9d9y6X88t8OaAJfWQ==" - }, - "is-ip": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/is-ip/-/is-ip-4.0.0.tgz", - "integrity": "sha512-4B4XA2HEIm/PY+OSpeMBXr8pGWBYbXuHgjMAqrwbLO3CPTCAd9ArEJzBUKGZtk9viY6+aSfadGnWyjY3ydYZkw==", - "requires": { - "ip-regex": "^5.0.0" - } - }, - "jose": { - "version": "4.11.2", - "resolved": "https://registry.npmjs.org/jose/-/jose-4.11.2.tgz", - "integrity": "sha512-njj0VL2TsIxCtgzhO+9RRobBvws4oYyCM8TpvoUQwl/MbIM3NFJRR9+e6x0sS5xXaP1t6OCBkaBME98OV9zU5A==" - }, - "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==" - }, - "jsonwebtoken": { - "version": "9.0.0", - "resolved": "https://registry.npmjs.org/jsonwebtoken/-/jsonwebtoken-9.0.0.tgz", - "integrity": "sha512-tuGfYXxkQGDPnLJ7SibiQgVgeDgfbPq2k2ICcbgqW8WxWLBAxKQM/ZCu/IT8SOSwmaYl4dpTFCW5xZv7YbbWUw==", - "requires": { - "jws": "^3.2.2", - "lodash": "^4.17.21", - "ms": "^2.1.1", - "semver": "^7.3.8" - }, - "dependencies": { - "lodash": { - "version": "4.17.21", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", - "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==" - }, - "ms": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", - "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==" - } - } - }, - "jwa": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/jwa/-/jwa-1.4.1.tgz", - "integrity": "sha512-qiLX/xhEEFKUAJ6FiBMbes3w9ATzyk5W7Hvzpa/SLYdxNtng+gcurvrI7TbACjIXlsJyr05/S1oUhZrc63evQA==", - "requires": { - "buffer-equal-constant-time": "1.0.1", - "ecdsa-sig-formatter": "1.0.11", - "safe-buffer": "^5.0.1" - } - }, - "jws": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/jws/-/jws-3.2.2.tgz", - "integrity": "sha512-YHlZCB6lMTllWDtSPHz/ZXTsi8S00usEV6v1tjq8tOUZzw7DpSDWVXjXDre6ed1w/pd495ODpHZYSdkRTsa0HA==", - "requires": { - "jwa": "^1.4.1", - "safe-buffer": "^5.0.1" - } - }, - "lodash.get": { - "version": "4.4.2", - "resolved": "https://registry.npmjs.org/lodash.get/-/lodash.get-4.4.2.tgz", - "integrity": "sha512-z+Uw/vLuy6gQe8cfaFWD7p0wVv8fJl3mbzXh33RS+0oW2wvUqiRXiQ69gLWSLpgB5/6sU+r6BlQR0MBILadqTQ==" - }, - "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==" - }, - "lodash.reduce": { - "version": "4.6.0", - "resolved": "https://registry.npmjs.org/lodash.reduce/-/lodash.reduce-4.6.0.tgz", - "integrity": "sha512-6raRe2vxCYBhpBu+B+TtNGUzah+hQjVdu3E17wfusjyrXBka2nBS8OH/gjVZ5PvHOhWmIZTYri09Z6n/QfnNMw==" - }, - "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==", - "requires": { - "yallist": "^4.0.0" - } - }, - "macaddress": { - "version": "0.5.3", - "resolved": "https://registry.npmjs.org/macaddress/-/macaddress-0.5.3.tgz", - "integrity": "sha512-vGBKTA+jwM4KgjGZ+S/8/Mkj9rWzePyGY6jManXPGhiWu63RYwW8dKPyk5koP+8qNVhPhHgFa1y/MJ4wrjsNrg==" - }, - "mimic-response": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-3.1.0.tgz", - "integrity": "sha512-z0yWI+4FDrrweS8Zmt4Ej5HdJmky15+L2e6Wgn3+iK5fWzb6T3fhNFq2+MeTRb064c6Wr4N/wv0DzQTjNzHNGQ==" - }, - "minecraft-data": { - "version": "3.26.0", - "resolved": "https://registry.npmjs.org/minecraft-data/-/minecraft-data-3.26.0.tgz", - "integrity": "sha512-9DGMM4qI7DdOFTMbtr3Wa/W+XXq11//Lhz+O0YRce9LHyYUDw34tvJcETHR0PNuE7p84J7kV02VLAOV+B1094Q==" - }, - "minecraft-folder-path": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/minecraft-folder-path/-/minecraft-folder-path-1.2.0.tgz", - "integrity": "sha512-qaUSbKWoOsH9brn0JQuBhxNAzTDMwrOXorwuRxdJKKKDYvZhtml+6GVCUrY5HRiEsieBEjCUnhVpDuQiKsiFaw==" - }, - "minecraft-protocol": { - "version": "1.40.3", - "resolved": "https://registry.npmjs.org/minecraft-protocol/-/minecraft-protocol-1.40.3.tgz", - "integrity": "sha512-+6WTrQcqBRXYST8Ha2V30XZ2zcooXA8fBNgKvIHVE/AkWs1kDjiwH1gdhPlK17JMLnV+yYSH4PACsk5VAOuqPA==", - "requires": { - "@types/readable-stream": "^2.3.13", - "aes-js": "^3.1.2", - "buffer-equal": "^1.0.0", - "debug": "^4.3.2", - "endian-toggle": "^0.0.0", - "lodash.get": "^4.1.2", - "lodash.merge": "^4.3.0", - "minecraft-data": "^3.21.0", - "minecraft-folder-path": "^1.2.0", - "node-fetch": "^2.6.1", - "node-rsa": "^0.4.2", - "prismarine-auth": "^2.2.0", - "prismarine-nbt": "^2.0.0", - "prismarine-realms": "^1.2.0", - "protodef": "^1.8.0", - "readable-stream": "^4.1.0", - "uuid-1345": "^1.0.1", - "yggdrasil": "^1.4.0" - }, - "dependencies": { - "node-fetch": { - "version": "2.6.12", - "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.12.tgz", - "integrity": "sha512-C/fGU2E8ToujUivIO0H+tpQ6HWo4eEmchoPIoXtxCrVghxdKq+QOHqEZW7tuP3KlV3bC8FRMO5nMCC7Zm1VP6g==", - "requires": { - "whatwg-url": "^5.0.0" - } - }, - "readable-stream": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-4.3.0.tgz", - "integrity": "sha512-MuEnA0lbSi7JS8XM+WNJlWZkHAAdm7gETHdFK//Q/mChGyj2akEFtdLZh32jSdkWGbRwCW9pn6g3LWDdDeZnBQ==", - "requires": { - "abort-controller": "^3.0.0", - "buffer": "^6.0.3", - "events": "^3.3.0", - "process": "^0.11.10" - } - } - } - }, - "minimist": { - "version": "1.2.7", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.7.tgz", - "integrity": "sha512-bzfL1YUZsP41gmu/qjrEk0Q6i2ix/cVeAhbCbqH9u3zYutS1cLg00qhrD0M2MVdCcx4Sc0UpP2eBWo9rotpq6g==" - }, - "mkdirp-classic": { - "version": "0.5.3", - "resolved": "https://registry.npmjs.org/mkdirp-classic/-/mkdirp-classic-0.5.3.tgz", - "integrity": "sha512-gKLcREMhtuZRwRAfqP3RFW+TK4JqApVBtOIftVgjuABpAtpxhPGaDcfvbhNvD0B8iD1oUr/txX35NjcaY6Ns/A==" - }, - "mojangson": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/mojangson/-/mojangson-2.0.2.tgz", - "integrity": "sha512-iGPRE1Ez+W+42Dt4Ao91c9VVs+FmuRUlAFDef76xRX3mbZrTNuezDtFI0PbfYqheg/B0fSiq0Q0V1emZNt37cw==", - "requires": { - "nearley": "^2.19.5" - } - }, - "moo": { - "version": "0.5.2", - "resolved": "https://registry.npmjs.org/moo/-/moo-0.5.2.tgz", - "integrity": "sha512-iSAJLHYKnX41mKcJKjqvnAN9sf0LMDTXDEvFv+ffuRR9a1MIuXLjMNL6EsnDHSkKLTWNqQQ5uo61P4EbU4NU+Q==" - }, - "ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" - }, - "napi-build-utils": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/napi-build-utils/-/napi-build-utils-1.0.2.tgz", - "integrity": "sha512-ONmRUqK7zj7DWX0D9ADe03wbwOBZxNAfF20PlGfCWQcD3+/MakShIHrMqx9YwPTfxDdF1zLeL+RGZiR9kGMLdg==" - }, - "nearley": { - "version": "2.20.1", - "resolved": "https://registry.npmjs.org/nearley/-/nearley-2.20.1.tgz", - "integrity": "sha512-+Mc8UaAebFzgV+KpI5n7DasuuQCHA89dmwm7JXw3TV43ukfNQ9DnBH3Mdb2g/I4Fdxc26pwimBWvjIw0UAILSQ==", - "requires": { - "commander": "^2.19.0", - "moo": "^0.5.0", - "railroad-diagrams": "^1.0.0", - "randexp": "0.4.6" - } - }, - "node-abi": { - "version": "3.31.0", - "resolved": "https://registry.npmjs.org/node-abi/-/node-abi-3.31.0.tgz", - "integrity": "sha512-eSKV6s+APenqVh8ubJyiu/YhZgxQpGP66ntzUb3lY1xB9ukSRaGnx0AIxI+IM+1+IVYC1oWobgG5L3Lt9ARykQ==", - "requires": { - "semver": "^7.3.5" - } - }, - "node-addon-api": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-5.1.0.tgz", - "integrity": "sha512-eh0GgfEkpnoWDq+VY8OyvYhFEzBk6jIYbRKdIlyTiAXIVJ8PyBaKb0rp7oDtoddbdoHWhq8wwr+XZ81F1rpNdA==" - }, - "node-domexception": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/node-domexception/-/node-domexception-1.0.0.tgz", - "integrity": "sha512-/jKZoMpw0F8GRwl4/eLROPA3cfcXtLApP0QzLmUT/HuPCZWyB7IY9ZrMeKw2O/nFIqPQB3PVM9aYm0F312AXDQ==" - }, - "node-fetch": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-3.3.1.tgz", - "integrity": "sha512-cRVc/kyto/7E5shrWca1Wsea4y6tL9iYJE5FBCius3JQfb/4P4I295PfhgbJQBLTx6lATE4z+wK0rPM4VS2uow==", - "requires": { - "data-uri-to-buffer": "^4.0.0", - "fetch-blob": "^3.1.4", - "formdata-polyfill": "^4.0.10" - } - }, - "node-rsa": { - "version": "0.4.2", - "resolved": "https://registry.npmjs.org/node-rsa/-/node-rsa-0.4.2.tgz", - "integrity": "sha512-Bvso6Zi9LY4otIZefYrscsUpo2mUpiAVIEmSZV2q41sP8tHZoert3Yu6zv4f/RXJqMNZQKCtnhDugIuCma23YA==", - "requires": { - "asn1": "0.2.3" - } - }, - "once": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", - "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", - "requires": { - "wrappy": "1" - } - }, - "parse-domain": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/parse-domain/-/parse-domain-7.0.1.tgz", - "integrity": "sha512-HsVmJkfoZB/Rb7Ai/QYVqZa95zkemNMerP70ZzIFpvvnvWbSSp+ZmUOQsdY1wxuFrB8cdA33E9fwwAT/OjWViA==", - "requires": { - "is-ip": "^4.0.0", - "node-fetch": "^3.2.0" - } - }, - "prebuild-install": { - "version": "7.1.1", - "resolved": "https://registry.npmjs.org/prebuild-install/-/prebuild-install-7.1.1.tgz", - "integrity": "sha512-jAXscXWMcCK8GgCoHOfIr0ODh5ai8mj63L2nWrjuAgXE6tDyYGnx4/8o/rCgU+B4JSyZBKbeZqzhtwtC3ovxjw==", - "requires": { - "detect-libc": "^2.0.0", - "expand-template": "^2.0.3", - "github-from-package": "0.0.0", - "minimist": "^1.2.3", - "mkdirp-classic": "^0.5.3", - "napi-build-utils": "^1.0.1", - "node-abi": "^3.3.0", - "pump": "^3.0.0", - "rc": "^1.2.7", - "simple-get": "^4.0.0", - "tar-fs": "^2.0.0", - "tunnel-agent": "^0.6.0" - } - }, - "prismarine-auth": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/prismarine-auth/-/prismarine-auth-2.2.0.tgz", - "integrity": "sha512-3XfR3bqrd7nrTVyEqMwuYRr+/Vy+hkfBplubSDuoRAcRCs90lDx7R4EG3fjMSoKY53RLTXjeFnsB6m1krhL/2A==", - "requires": { - "@azure/msal-node": "^1.1.0", - "@xboxreplay/xboxlive-auth": "^3.3.3", - "debug": "^4.3.3", - "jose": "^4.1.4", - "node-fetch": "^2.6.1", - "smart-buffer": "^4.1.0", - "uuid-1345": "^1.0.2" - }, - "dependencies": { - "node-fetch": { - "version": "2.6.12", - "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.12.tgz", - "integrity": "sha512-C/fGU2E8ToujUivIO0H+tpQ6HWo4eEmchoPIoXtxCrVghxdKq+QOHqEZW7tuP3KlV3bC8FRMO5nMCC7Zm1VP6g==", - "requires": { - "whatwg-url": "^5.0.0" - } - } - } - }, - "prismarine-biome": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/prismarine-biome/-/prismarine-biome-1.3.0.tgz", - "integrity": "sha512-GY6nZxq93mTErT7jD7jt8YS1aPrOakbJHh39seYsJFXvueIOdHAmW16kYQVrTVMW5MlWLQVxV/EquRwOgr4MnQ==", - "requires": {} - }, - "prismarine-block": { - "version": "1.16.3", - "resolved": "https://registry.npmjs.org/prismarine-block/-/prismarine-block-1.16.3.tgz", - "integrity": "sha512-E9OazjIqnEgcXM6me6EIeQFMcNRWZzsaftWtetRSIKVoW+4UKWleb6lTNKh9kq7wNxciKavcYBmKL3sF7HfSaA==", - "requires": { - "minecraft-data": "^3.0.0", - "prismarine-biome": "^1.1.0", - "prismarine-chat": "^1.5.0", - "prismarine-item": "^1.10.1", - "prismarine-nbt": "^2.0.0", - "prismarine-registry": "^1.1.0" - } - }, - "prismarine-chat": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/prismarine-chat/-/prismarine-chat-1.8.0.tgz", - "integrity": "sha512-hEz47GESIEP0W1KSHrK7ZSy0PqbQW7khYWenv8d5wvyAYnBs1E4KXDBJSWqyGIYinKGN9aes8v3xpQhgURK/Fg==", - "requires": { - "mojangson": "^2.0.1", - "prismarine-item": "^1.10.0", - "prismarine-nbt": "^2.0.0", - "prismarine-registry": "^1.4.0" - } - }, - "prismarine-chunk": { - "version": "1.33.0", - "resolved": "https://registry.npmjs.org/prismarine-chunk/-/prismarine-chunk-1.33.0.tgz", - "integrity": "sha512-oTkhyE8EWV5mMOaUyCACiUUtx1270Mo18Ryj+t5Y8dglT4QfVwBsYeph+O40kNL9TK5cTW1lFYg5vr2rWuFGnw==", - "requires": { - "prismarine-biome": "^1.2.0", - "prismarine-block": "^1.14.1", - "prismarine-nbt": "^2.2.1", - "prismarine-registry": "^1.1.0", - "smart-buffer": "^4.1.0", - "uint4": "^0.1.2", - "vec3": "^0.1.3", - "xxhash-wasm": "^0.4.2" - } - }, - "prismarine-item": { - "version": "1.12.1", - "resolved": "https://registry.npmjs.org/prismarine-item/-/prismarine-item-1.12.1.tgz", - "integrity": "sha512-Q+cV8WCM6gTO/K8gIpe4sTCVj0wdXy/IIctpQhgj4iRPoRY/rLCI88FAGsLNU1cabOFQDO3a0NIz+KLvhOvbQA==", - "requires": { - "prismarine-nbt": "^2.0.0", - "prismarine-registry": "^1.4.0" - } - }, - "prismarine-nbt": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/prismarine-nbt/-/prismarine-nbt-2.2.1.tgz", - "integrity": "sha512-Mb50c58CPnuZ+qvM31DBa08tf9UumlTq1LkvpMoUpKfCuN05GZHTqCUwER3lxTSHLL0GZKghIPbYR/JQkINijQ==", - "requires": { - "protodef": "^1.9.0" - } - }, - "prismarine-realms": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/prismarine-realms/-/prismarine-realms-1.3.0.tgz", - "integrity": "sha512-heAzbP2bI/dGjoHUWAe3pncg3jHwNLjN0nkZb98jbpJxgsogx/8Cqejd1Oc+EVnqnVwNyiyITfCoH3ECqYeikw==", - "requires": { - "debug": "^4.3.3", - "node-fetch": "^2.6.1" - }, - "dependencies": { - "node-fetch": { - "version": "2.6.12", - "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.12.tgz", - "integrity": "sha512-C/fGU2E8ToujUivIO0H+tpQ6HWo4eEmchoPIoXtxCrVghxdKq+QOHqEZW7tuP3KlV3bC8FRMO5nMCC7Zm1VP6g==", - "requires": { - "whatwg-url": "^5.0.0" - } - } - } - }, - "prismarine-registry": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/prismarine-registry/-/prismarine-registry-1.6.0.tgz", - "integrity": "sha512-oduDRuwa5rXT8CkPeMSlBsuBzxZF9oRsDpFK0oBStpIoNwSuTqqGGGgLlyL20OS2O9pmqYpOMlmG80CW4uuKJw==", - "requires": { - "minecraft-data": "^3.0.0", - "prismarine-nbt": "^2.0.0" - } - }, - "process": { - "version": "0.11.10", - "resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz", - "integrity": "sha512-cdGef/drWFoydD1JsMzuFf8100nZl+GT+yacc2bEced5f9Rjk4z+WtFUTBu9PhOi9j/jfmBPu0mMEY4wIdAF8A==" - }, - "protodef": { - "version": "1.15.0", - "resolved": "https://registry.npmjs.org/protodef/-/protodef-1.15.0.tgz", - "integrity": "sha512-bZ2Omw8dT+DACjJHLrBWZlqN4MlT9g9oSpJDdkUAJOStUzgJp+Zn42FJfPUdwutUxjaxA0PftN0PDlNa2XbneA==", - "requires": { - "lodash.get": "^4.4.2", - "lodash.reduce": "^4.6.0", - "protodef-validator": "^1.3.0", - "readable-stream": "^3.0.3" - } - }, - "protodef-validator": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/protodef-validator/-/protodef-validator-1.3.1.tgz", - "integrity": "sha512-lZ5FWKZYR9xOjpMw1+EfZRfCjzNRQWPq+Dk+jki47Sikl2EeWEPnTfnJERwnU/EwFq6us+0zqHHzSsmLeYX+Lg==", - "requires": { - "ajv": "^6.5.4" - } - }, - "pump": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", - "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==", - "requires": { - "end-of-stream": "^1.1.0", - "once": "^1.3.1" - } - }, - "punycode": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.0.tgz", - "integrity": "sha512-rRV+zQD8tVFys26lAGR9WUuS4iUAngJScM+ZRSKtvl5tKeZ2t5bvdNFdNHBW9FWR4guGHlgmsZ1G7BSm2wTbuA==" - }, - "railroad-diagrams": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/railroad-diagrams/-/railroad-diagrams-1.0.0.tgz", - "integrity": "sha512-cz93DjNeLY0idrCNOH6PviZGRN9GJhsdm9hpn1YCS879fj4W+x5IFJhhkRZcwVgMmFF7R82UA/7Oh+R8lLZg6A==" - }, - "randexp": { - "version": "0.4.6", - "resolved": "https://registry.npmjs.org/randexp/-/randexp-0.4.6.tgz", - "integrity": "sha512-80WNmd9DA0tmZrw9qQa62GPPWfuXJknrmVmLcxvq4uZBdYqb1wYoKTmnlGUchvVWe0XiLupYkBoXVOxz3C8DYQ==", - "requires": { - "discontinuous-range": "1.0.0", - "ret": "~0.1.10" - } - }, - "rc": { - "version": "1.2.8", - "resolved": "https://registry.npmjs.org/rc/-/rc-1.2.8.tgz", - "integrity": "sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==", - "requires": { - "deep-extend": "^0.6.0", - "ini": "~1.3.0", - "minimist": "^1.2.0", - "strip-json-comments": "~2.0.1" - } - }, - "readable-stream": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", - "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", - "requires": { - "inherits": "^2.0.3", - "string_decoder": "^1.1.1", - "util-deprecate": "^1.0.1" - } - }, - "ret": { - "version": "0.1.15", - "resolved": "https://registry.npmjs.org/ret/-/ret-0.1.15.tgz", - "integrity": "sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg==" - }, - "safe-buffer": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", - "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==" - }, - "semver": { - "version": "7.5.3", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.3.tgz", - "integrity": "sha512-QBlUtyVk/5EeHbi7X0fw6liDZc7BBmEaSYn01fMU1OUYbf6GPsbTtd8WmnqbI20SeycoHSeiybkE/q1Q+qlThQ==", - "requires": { - "lru-cache": "^6.0.0" - } - }, - "sharp": { - "version": "0.31.3", - "resolved": "https://registry.npmjs.org/sharp/-/sharp-0.31.3.tgz", - "integrity": "sha512-XcR4+FCLBFKw1bdB+GEhnUNXNXvnt0tDo4WsBsraKymuo/IAuPuCBVAL2wIkUw2r/dwFW5Q5+g66Kwl2dgDFVg==", - "requires": { - "color": "^4.2.3", - "detect-libc": "^2.0.1", - "node-addon-api": "^5.0.0", - "prebuild-install": "^7.1.1", - "semver": "^7.3.8", - "simple-get": "^4.0.1", - "tar-fs": "^2.1.1", - "tunnel-agent": "^0.6.0" - } - }, - "simple-concat": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/simple-concat/-/simple-concat-1.0.1.tgz", - "integrity": "sha512-cSFtAPtRhljv69IK0hTVZQ+OfE9nePi/rtJmw5UjHeVyVroEqJXP1sFztKUy1qU+xvz3u/sfYJLa947b7nAN2Q==" - }, - "simple-get": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/simple-get/-/simple-get-4.0.1.tgz", - "integrity": "sha512-brv7p5WgH0jmQJr1ZDDfKDOSeWWg+OVypG99A/5vYGPqJ6pxiaHLy8nxtFjBA7oMa01ebA9gfh1uMCFqOuXxvA==", - "requires": { - "decompress-response": "^6.0.0", - "once": "^1.3.1", - "simple-concat": "^1.0.0" - } - }, - "simple-swizzle": { - "version": "0.2.2", - "resolved": "https://registry.npmjs.org/simple-swizzle/-/simple-swizzle-0.2.2.tgz", - "integrity": "sha512-JA//kQgZtbuY83m+xT+tXJkmJncGMTFT+C+g2h2R9uxkYIrE2yy9sgmcLhCnw57/WSD+Eh3J97FPEDFnbXnDUg==", - "requires": { - "is-arrayish": "^0.3.1" - } - }, - "smart-buffer": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/smart-buffer/-/smart-buffer-4.2.0.tgz", - "integrity": "sha512-94hK0Hh8rPqQl2xXc3HsaBoOXKV20MToPkcXvwbISWLEs+64sBq5kFgn2kJDHb1Pry9yrP0dxrCI9RRci7RXKg==" - }, - "string_decoder": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", - "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", - "requires": { - "safe-buffer": "~5.2.0" - } - }, - "strip-json-comments": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", - "integrity": "sha512-4gB8na07fecVVkOI6Rs4e7T6NOTki5EmL7TUduTs6bu3EdnSycntVJ4re8kgZA+wx9IueI2Y11bfbgwtzuE0KQ==" - }, - "tar-fs": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-2.1.1.tgz", - "integrity": "sha512-V0r2Y9scmbDRLCNex/+hYzvp/zyYjvFbHPNgVTKfQvVrb6guiE/fxP+XblDNR011utopbkex2nM4dHNV6GDsng==", - "requires": { - "chownr": "^1.1.1", - "mkdirp-classic": "^0.5.2", - "pump": "^3.0.0", - "tar-stream": "^2.1.4" - } - }, - "tar-stream": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-2.2.0.tgz", - "integrity": "sha512-ujeqbceABgwMZxEJnk2HDY2DlnUZ+9oEcb1KzTVfYHio0UE6dG71n60d8D2I4qNvleWrrXpmjpt7vZeF1LnMZQ==", - "requires": { - "bl": "^4.0.3", - "end-of-stream": "^1.4.1", - "fs-constants": "^1.0.0", - "inherits": "^2.0.3", - "readable-stream": "^3.1.1" - } - }, - "tr46": { - "version": "0.0.3", - "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", - "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==" - }, - "tslib": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.5.0.tgz", - "integrity": "sha512-336iVw3rtn2BUK7ORdIAHTyxHGRIHVReokCR3XjbckJMK7ms8FysBfhLR8IXnAgy7T0PTPNBWKiH514FOW/WSg==" - }, - "tunnel-agent": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", - "integrity": "sha512-McnNiV1l8RYeY8tBgEpuodCC1mLUdbSN+CYBL7kJsJNInOP8UjDDEwdk6Mw60vdLLrr5NHKZhMAOSrR2NZuQ+w==", - "requires": { - "safe-buffer": "^5.0.1" - } - }, - "uint4": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/uint4/-/uint4-0.1.2.tgz", - "integrity": "sha512-lhEx78gdTwFWG+mt6cWAZD/R6qrIj0TTBeH5xwyuDJyswLNlGe+KVlUPQ6+mx5Ld332pS0AMUTo9hIly7YsWxQ==" - }, - "uri-js": { - "version": "4.4.1", - "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", - "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", - "requires": { - "punycode": "^2.1.0" - } - }, - "util-deprecate": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", - "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==" - }, - "uuid": { - "version": "8.3.2", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", - "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==" - }, - "uuid-1345": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/uuid-1345/-/uuid-1345-1.0.2.tgz", - "integrity": "sha512-bA5zYZui+3nwAc0s3VdGQGBfbVsJLVX7Np7ch2aqcEWFi5lsAEcmO3+lx3djM1npgpZI8KY2FITZ2uYTnYUYyw==", - "requires": { - "macaddress": "^0.5.1" - } - }, - "vec3": { - "version": "0.1.7", - "resolved": "https://registry.npmjs.org/vec3/-/vec3-0.1.7.tgz", - "integrity": "sha512-EZSeXBL+L3go2wWwtQQse4fEcNGIQjT14qvi4LYVj1ifZt/J5XZ1QZqkDuOVVH07YwTEIFbsAv3pzwUpF7x9Wg==" - }, - "web-streams-polyfill": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/web-streams-polyfill/-/web-streams-polyfill-3.2.1.tgz", - "integrity": "sha512-e0MO3wdXWKrLbL0DgGnUV7WHVuw9OUvL4hjgnPkIeEvESk74gAITi5G606JtZPp39cd8HA9VQzCIvA49LpPN5Q==" - }, - "webidl-conversions": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", - "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==" - }, - "whatwg-url": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", - "integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==", - "requires": { - "tr46": "~0.0.3", - "webidl-conversions": "^3.0.0" - } - }, - "wrappy": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==" - }, - "ws": { - "version": "8.12.0", - "resolved": "https://registry.npmjs.org/ws/-/ws-8.12.0.tgz", - "integrity": "sha512-kU62emKIdKVeEIOIKVegvqpXMSTAMLJozpHZaJNDYqBjzlSYXQGviYwN1osDLJ9av68qHd4a2oSjd7yD4pacig==", - "requires": {} - }, - "xxhash-wasm": { - "version": "0.4.2", - "resolved": "https://registry.npmjs.org/xxhash-wasm/-/xxhash-wasm-0.4.2.tgz", - "integrity": "sha512-/eyHVRJQCirEkSZ1agRSCwriMhwlyUcFkXD5TPVSLP+IPzjsqMVzZwdoczLp1SoQU0R3dxz1RpIK+4YNQbCVOA==" - }, - "yallist": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==" - }, - "yggdrasil": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/yggdrasil/-/yggdrasil-1.7.0.tgz", - "integrity": "sha512-QBIo5fiNd7688G3FqXXYGr36uyrYzczlNuzpWFy2zL3+R+3KT2lF+wFxm51synfA3l3z6IBiGOc1/EVXWCYY1Q==", - "requires": { - "node-fetch": "^2.6.1", - "uuid": "^8.2.0" - }, - "dependencies": { - "node-fetch": { - "version": "2.6.12", - "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.12.tgz", - "integrity": "sha512-C/fGU2E8ToujUivIO0H+tpQ6HWo4eEmchoPIoXtxCrVghxdKq+QOHqEZW7tuP3KlV3bC8FRMO5nMCC7Zm1VP6g==", - "requires": { - "whatwg-url": "^5.0.0" - } - } - } - } } } diff --git a/src/plugins/EagProxyAAS/config.ts b/src/plugins/EagProxyAAS/config.ts index a85b385..d8312f7 100644 --- a/src/plugins/EagProxyAAS/config.ts +++ b/src/plugins/EagProxyAAS/config.ts @@ -2,4 +2,9 @@ export const config = { bindInternalServerPort: 25569, bindInternalServerIp: "127.0.0.1", allowCustomPorts: true, + disallowHypixel: false, + authentication: { + enabled: true, + password: "nope", + }, }; diff --git a/src/plugins/EagProxyAAS/index.ts b/src/plugins/EagProxyAAS/index.ts index c5cb107..bd4fa20 100644 --- a/src/plugins/EagProxyAAS/index.ts +++ b/src/plugins/EagProxyAAS/index.ts @@ -1,25 +1,15 @@ import { config } from "./config.js"; import { createServer } from "minecraft-protocol"; import { ClientState, ConnectionState, ServerGlobals } from "./types.js"; -import { handleConnect, hushConsole, setSG } from "./utils.js"; +import { handleConnect, hushConsole, sendChatComponent, setSG } from "./utils.js"; import path from "path"; import { readFileSync } from "fs"; +import { handleCommand } from "./commands.js"; +import { registerEndpoints } from "./service/endpoints.js"; const PluginManager = PLUGIN_MANAGER; const metadata = JSON.parse( - readFileSync( - process.platform == "win32" - ? path - .join( - path.dirname(new URL(import.meta.url).pathname), - "metadata.json" - ) - .slice(1) - : path.join( - path.dirname(new URL(import.meta.url).pathname), - "metadata.json" - ) - ).toString() + readFileSync(process.platform == "win32" ? path.join(path.dirname(new URL(import.meta.url).pathname), "metadata.json").slice(1) : path.join(path.dirname(new URL(import.meta.url).pathname), "metadata.json")).toString() ); const Logger = PluginManager.Logger; @@ -31,14 +21,11 @@ const Player = PluginManager.Player; const MineProtocol = PluginManager.MineProtocol; const EaglerSkins = PluginManager.EaglerSkins; const Util = PluginManager.Util; - hushConsole(); const logger = new Logger("EaglerProxyAAS"); logger.info(`Starting ${metadata.name} v${metadata.version}...`); -logger.info( - `(internal server port: ${config.bindInternalServerPort}, internal server IP: ${config.bindInternalServerPort})` -); +logger.info(`(internal server port: ${config.bindInternalServerPort}, internal server IP: ${config.bindInternalServerPort})`); logger.info("Starting internal server..."); let server = createServer({ @@ -55,28 +42,178 @@ let server = createServer({ setSG(sGlobals); server.on("login", (client) => { - logger.info( - `Client ${client.username} has connected to the authentication server.` - ); - client.on("end", () => { - sGlobals.players.delete(client.username); - logger.info( - `Client ${client.username} has disconnected from the authentication server.` - ); - }); - const cs: ClientState = { - state: ConnectionState.AUTH, - gameClient: client, - token: null, - lastStatusUpdate: null, - }; - sGlobals.players.set(client.username, cs); - handleConnect(cs); + const proxyPlayer = PluginManager.proxy.players.get(client.username); + if (proxyPlayer != null) { + const url = new URL(proxyPlayer.ws.httpRequest.url, `http${PluginManager.proxy.config.tls?.enabled ? "s" : ""}://${proxyPlayer.ws.httpRequest.headers.host}`); + if (url.pathname == "/connect-vanilla") { + const host = url.searchParams.get("ip"), + port = url.searchParams.get("port"), + type: "OFFLINE" | "ONLINE" = url.searchParams.get("authType") as any; + + if (isNaN(Number(port))) return proxyPlayer.disconnect(Enums.ChatColor.RED + "Bad port number"); + if ( + !/^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^(([a-zA-Z]|[a-zA-Z][a-zA-Z0-9\-]*[a-zA-Z0-9])\.)*([A-Za-z]|[A-Za-z][A-Za-z0-9\-]*[A-Za-z0-9])$|^\s*((([0-9A-Fa-f]{1,4}:){7}([0-9A-Fa-f]{1,4}|:))|(([0-9A-Fa-f]{1,4}:){6}(:[0-9A-Fa-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){5}(((:[0-9A-Fa-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){4}(((:[0-9A-Fa-f]{1,4}){1,3})|((:[0-9A-Fa-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){3}(((:[0-9A-Fa-f]{1,4}){1,4})|((:[0-9A-Fa-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){2}(((:[0-9A-Fa-f]{1,4}){1,5})|((:[0-9A-Fa-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){1}(((:[0-9A-Fa-f]{1,4}){1,6})|((:[0-9A-Fa-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9A-Fa-f]{1,4}){1,7})|((:[0-9A-Fa-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(%.+)?\s*$/.test( + host + ) + ) { + return proxyPlayer.disconnect(Enums.ChatColor.RED + "Bad host provided"); + } + + if (type == "ONLINE") { + const _profile = proxyPlayer.ws.httpRequest.headers["Minecraft-Profile"]; + if (!_profile) proxyPlayer.disconnect(Enums.ChatColor.RED + "Missing Minecraft-Profile header"); + let profile; + try { + profile = JSON.parse(_profile as string); + } catch (err) { + proxyPlayer.disconnect(Enums.ChatColor.RED + "Could not read Minecraft-Profile header"); + } + + logger.info(`Direct OFFLINE proxy forward connection from Eaglercraft player (${client.username}) received.`); + proxyPlayer.on("vanillaPacket", (packet, origin) => { + if (origin == "CLIENT" && packet.name == "chat" && (packet.params.message as string).toLowerCase().startsWith("/eag-") && !packet.cancel) { + packet.cancel = true; + handleCommand(proxyPlayer, packet.params.message as string); + } + }); + sendChatComponent(client, { + text: `Joining server under ${profile.selectedProfile.name}/your Minecraft account's username! Run `, + color: "aqua", + extra: [ + { + text: "/eag-help", + color: "gold", + hoverEvent: { + action: "show_text", + value: Enums.ChatColor.GOLD + "Click me to run this command!", + }, + clickEvent: { + action: "run_command", + value: "/eag-help", + }, + }, + { + text: " for a list of proxy commands.", + color: "aqua", + }, + ], + }); + (proxyPlayer as any)._onlineSession = { + auth: "mojang", + username: profile.selectedProfile.name, + session: { + accessToken: profile.accessToken, + clientToken: profile.selectedProfile.id, + selectedProfile: { + id: profile.selectedProfile.id, + name: profile.selectedProfile.name, + }, + }, + }; + proxyPlayer + .switchServers({ + host: host, + port: Number(port), + version: "1.8.8", + username: profile.selectedProfile.name, + auth: "mojang", + keepAlive: false, + session: { + accessToken: profile.accessToken, + clientToken: profile.selectedProfile.id, + selectedProfile: { + id: profile.selectedProfile.id, + name: profile.selectedProfile.name, + }, + }, + skipValidation: true, + hideErrors: true, + }) + .catch((err) => { + if (!client.ended) { + proxyPlayer.disconnect( + Enums.ChatColor.RED + + `Something went wrong whilst switching servers: ${err.message}${err.code == "ENOTFOUND" ? (host.includes(":") ? `\n${Enums.ChatColor.GRAY}Suggestion: Replace the : in your IP with a space.` : "\nIs that IP valid?") : ""}` + ); + } + }); + } else if (type == "OFFLINE") { + logger.info(`Direct ONLINE proxy forward connection from Eaglercraft player (${client.username}) received.`); + logger.info(`Player ${client.username} is attempting to connect to ${host}:${port} under their Eaglercraft username (${client.username}) using offline mode!`); + proxyPlayer.on("vanillaPacket", (packet, origin) => { + if (origin == "CLIENT" && packet.name == "chat" && (packet.params.message as string).toLowerCase().startsWith("/eag-") && !packet.cancel) { + packet.cancel = true; + handleCommand(proxyPlayer, packet.params.message as string); + } + }); + + sendChatComponent(client, { + text: `Joining server under ${client.username}/your Eaglercraft account's username! Run `, + color: "aqua", + extra: [ + { + text: "/eag-help", + color: "gold", + hoverEvent: { + action: "show_text", + value: Enums.ChatColor.GOLD + "Click me to run this command!", + }, + clickEvent: { + action: "run_command", + value: "/eag-help", + }, + }, + { + text: " for a list of proxy commands.", + color: "aqua", + }, + ], + }); + + proxyPlayer + .switchServers({ + host: host, + port: Number(port), + auth: "offline", + username: client.username, + version: "1.8.8", + keepAlive: false, + skipValidation: true, + hideErrors: true, + }) + .catch((err) => { + if (!client.ended) { + proxyPlayer.disconnect( + Enums.ChatColor.RED + + `Something went wrong whilst switching servers: ${err.message}${err.code == "ENOTFOUND" ? (host.includes(":") ? `\n${Enums.ChatColor.GRAY}Suggestion: Replace the : in your IP with a space.` : "\nIs that IP valid?") : ""}` + ); + } + }); + } else { + proxyPlayer.disconnect(Enums.ChatColor.RED + "Missing authentication type"); + } + } else { + logger.info(`Client ${client.username} has connected to the authentication server.`); + client.on("end", () => { + sGlobals.players.delete(client.username); + logger.info(`Client ${client.username} has disconnected from the authentication server.`); + }); + const cs: ClientState = { + state: ConnectionState.AUTH, + gameClient: client, + token: null, + lastStatusUpdate: null, + }; + sGlobals.players.set(client.username, cs); + handleConnect(cs); + } + } else { + logger.warn(`Proxy player object is null for ${client.username}?!`); + client.end("Indirect connection to internal authentication server detected!"); + } }); -logger.info( - "Redirecting backend server IP... (this is required for the plugin to function)" -); +logger.info("Redirecting backend server IP... (this is required for the plugin to function)"); CONFIG.adapter.server = { host: config.bindInternalServerIp, port: config.bindInternalServerPort, @@ -84,3 +221,7 @@ CONFIG.adapter.server = { CONFIG.adapter.motd = { l1: Enums.ChatColor.GOLD + "EaglerProxy as a Service", }; + +PLUGIN_MANAGER.addListener("proxyFinishLoading", () => { + registerEndpoints(); +}); diff --git a/src/plugins/EagProxyAAS/service/endpoints.ts b/src/plugins/EagProxyAAS/service/endpoints.ts new file mode 100644 index 0000000..f4675dc --- /dev/null +++ b/src/plugins/EagProxyAAS/service/endpoints.ts @@ -0,0 +1,33 @@ +import { config } from "../config.js"; + +export async function registerEndpoints() { + const proxy = PLUGIN_MANAGER.proxy; + proxy.on("httpConnection", (req, res, ctx) => { + if (req.url.startsWith("/eagpaas/metadata")) { + ctx.handled = true; + res.writeHead(200).end( + JSON.stringify({ + branding: "EagProxyAAS", + version: "1", + }) + ); + } else if (req.url.startsWith("/eagpaas/validate")) { + ctx.handled = true; + if (config.authentication.enabled) { + if (req.headers["authorization"] !== `Basic ${config.authentication.password}`) { + return res.writeHead(403).end( + JSON.stringify({ + success: false, + reason: "Access Denied", + }) + ); + } + } + res.writeHead(200).end( + JSON.stringify({ + success: true, + }) + ); + } + }); +} diff --git a/src/plugins/EagProxyAAS/utils.ts b/src/plugins/EagProxyAAS/utils.ts index 2e530c3..af0f119 100644 --- a/src/plugins/EagProxyAAS/utils.ts +++ b/src/plugins/EagProxyAAS/utils.ts @@ -37,21 +37,10 @@ export function setSG(svr: ServerGlobals) { export function disconectIdle() { SERVER.players.forEach((client) => { - if ( - client.state == ConnectionState.AUTH && - Date.now() - client.lastStatusUpdate > MAX_LIFETIME_AUTH - ) { - client.gameClient.end( - "Timed out waiting for user to login via Microsoft" - ); - } else if ( - client.state == ConnectionState.SUCCESS && - Date.now() - client.lastStatusUpdate > MAX_LIFETIME_CONNECTED - ) { - client.gameClient.end( - Enums.ChatColor.RED + - "Please enter the IP of the server you'd like to connect to in chat." - ); + if (client.state == ConnectionState.AUTH && Date.now() - client.lastStatusUpdate > MAX_LIFETIME_AUTH) { + client.gameClient.end("Timed out waiting for user to login via Microsoft"); + } else if (client.state == ConnectionState.SUCCESS && Date.now() - client.lastStatusUpdate > MAX_LIFETIME_CONNECTED) { + client.gameClient.end(Enums.ChatColor.RED + "Please enter the IP of the server you'd like to connect to in chat."); } }); } @@ -93,10 +82,7 @@ export function handleConnect(client: ClientState) { onConnect(client); } -export function awaitCommand( - client: Client, - filter: (msg: string) => boolean -): Promise { +export function awaitCommand(client: Client, filter: (msg: string) => boolean): Promise { return new Promise((res, rej) => { const onMsg = (packet) => { if (filter(packet.message)) { @@ -105,8 +91,7 @@ export function awaitCommand( res(packet.message); } }; - const onEnd = () => - rej("Client disconnected before promise could be resolved"); + const onEnd = () => rej("Client disconnected before promise could be resolved"); client.on("chat", onMsg); client.on("end", onEnd); }); @@ -119,12 +104,7 @@ export function sendMessage(client: Client, msg: string) { }); } -export function sendCustomMessage( - client: Client, - msg: string, - color: string, - ...components: { text: string; color: string }[] -) { +export function sendCustomMessage(client: Client, msg: string, color: string, ...components: { text: string; color: string }[]) { client.write("chat", { message: JSON.stringify( components.length > 0 @@ -198,12 +178,7 @@ export function sendMessageLogin(client: Client, url: string, token: string) { }); } -export function updateState( - client: Client, - newState: "CONNECTION_TYPE" | "AUTH_EASYMC" | "AUTH" | "SERVER", - uri?: string, - code?: string -) { +export function updateState(client: Client, newState: "CONNECTION_TYPE" | "AUTH_EASYMC" | "AUTH" | "SERVER", uri?: string, code?: string) { switch (newState) { case "CONNECTION_TYPE": client.write("playerlist_header", { @@ -226,10 +201,7 @@ export function updateState( }); break; case "AUTH": - if (code == null || uri == null) - throw new Error( - "Missing code/uri required for title message type AUTH" - ); + if (code == null || uri == null) throw new Error("Missing code/uri required for title message type AUTH"); client.write("playerlist_header", { header: JSON.stringify({ text: ` ${Enums.ChatColor.GOLD}EaglerProxy Authentication Server `, @@ -245,9 +217,7 @@ export function updateState( text: ` ${Enums.ChatColor.GOLD}EaglerProxy Authentication Server `, }), footer: JSON.stringify({ - text: `${Enums.ChatColor.RED}/join ${ - config.allowCustomPorts ? " [port]" : "" - }`, + text: `${Enums.ChatColor.RED}/join ${config.allowCustomPorts ? " [port]" : ""}`, }), }); break; @@ -271,10 +241,7 @@ export async function onConnect(client: ClientState) { client.state = ConnectionState.AUTH; client.lastStatusUpdate = Date.now(); - sendMessageWarning( - client.gameClient, - `WARNING: This proxy allows you to connect to any 1.8.9 server. Gameplay has shown no major issues, but please note that EaglercraftX may flag some anticheats while playing.` - ); + sendMessageWarning(client.gameClient, `WARNING: This proxy allows you to connect to any 1.8.9 server. Gameplay has shown no major issues, but please note that EaglercraftX may flag some anticheats while playing.`); await new Promise((res) => setTimeout(res, 2000)); sendMessageWarning( @@ -283,12 +250,20 @@ export async function onConnect(client: ClientState) { ); await new Promise((res) => setTimeout(res, 2000)); - sendMessageWarning( - client.gameClient, - `WARNING: It is highly suggested that you turn down settings, as gameplay tends to be very laggy and unplayable on low powered devices.` - ); + sendMessageWarning(client.gameClient, `WARNING: It is highly suggested that you turn down settings, as gameplay tends to be very laggy and unplayable on low powered devices.`); await new Promise((res) => setTimeout(res, 2000)); + if (config.authentication.enabled) { + sendCustomMessage(client.gameClient, "This instance is password-protected. Sign in with /password ", "gold"); + const password = await awaitCommand(client.gameClient, (msg) => msg.startsWith("/password ")); + if (password === `/password ${config.authentication.password}`) { + sendCustomMessage(client.gameClient, "Successfully signed into instance!", "green"); + } else { + client.gameClient.end(Enums.ChatColor.RED + "Bad password!"); + return; + } + } + sendCustomMessage(client.gameClient, "What would you like to do?", "gray"); sendChatComponent(client.gameClient, { text: "1) ", @@ -344,11 +319,7 @@ export async function onConnect(client: ClientState) { value: "$3", }, }); - sendCustomMessage( - client.gameClient, - "Select an option from the above (1 = online, 2 = offline, 3 = EasyMC), either by clicking or manually typing out the option's number on the list.", - "green" - ); + sendCustomMessage(client.gameClient, "Select an option from the above (1 = online, 2 = offline, 3 = EasyMC), either by clicking or manually typing out the option's number on the list.", "green"); updateState(client.gameClient, "CONNECTION_TYPE"); let chosenOption: ConnectType | null = null; @@ -356,11 +327,7 @@ export async function onConnect(client: ClientState) { const option = await awaitCommand(client.gameClient, (msg) => true); switch (option.replace(/\$/gim, "")) { default: - sendCustomMessage( - client.gameClient, - `I don't understand what you meant by "${option}", please reply with a valid option!`, - "red" - ); + sendCustomMessage(client.gameClient, `I don't understand what you meant by "${option}", please reply with a valid option!`, "red"); break; case "1": chosenOption = ConnectType.ONLINE; @@ -390,17 +357,8 @@ export async function onConnect(client: ClientState) { savedAuth; const authHandler = auth(), codeCallback = (code: ServerDeviceCodeResponse) => { - updateState( - client.gameClient, - "AUTH", - code.verification_uri, - code.user_code - ); - sendMessageLogin( - client.gameClient, - code.verification_uri, - code.user_code - ); + updateState(client.gameClient, "AUTH", code.verification_uri, code.user_code); + sendMessageLogin(client.gameClient, code.verification_uri, code.user_code); }; authHandler.once("error", (err) => { if (!client.gameClient.ended) client.gameClient.end(err.message); @@ -415,64 +373,30 @@ export async function onConnect(client: ClientState) { res(result); }) ); - sendMessage( - client.gameClient, - Enums.ChatColor.BRIGHT_GREEN + "Successfully logged into Minecraft!" - ); + sendMessage(client.gameClient, Enums.ChatColor.BRIGHT_GREEN + "Successfully logged into Minecraft!"); client.state = ConnectionState.SUCCESS; client.lastStatusUpdate = Date.now(); updateState(client.gameClient, "SERVER"); - sendMessage( - client.gameClient, - `Provide a server to join. ${Enums.ChatColor.GOLD}/join ${ - config.allowCustomPorts ? " [port]" : "" - }${Enums.ChatColor.RESET}.` - ); + sendMessage(client.gameClient, `Provide a server to join. ${Enums.ChatColor.GOLD}/join ${config.allowCustomPorts ? " [port]" : ""}${Enums.ChatColor.RESET}.`); let host: string, port: number; while (true) { - const msg = await awaitCommand(client.gameClient, (msg) => - msg.startsWith("/join") - ), + const msg = await awaitCommand(client.gameClient, (msg) => msg.startsWith("/join")), parsed = msg.split(/ /gi, 3); - if (parsed.length < 2) - sendMessage( - client.gameClient, - `Please provide a server to connect to. ${ - Enums.ChatColor.GOLD - }/join ${config.allowCustomPorts ? " [port]" : ""}${ - Enums.ChatColor.RESET - }.` - ); - else if (parsed.length > 2 && isNaN(parseInt(parsed[2]))) - sendMessage( - client.gameClient, - `A valid port number has to be passed! ${ - Enums.ChatColor.GOLD - }/join ${config.allowCustomPorts ? " [port]" : ""}${ - Enums.ChatColor.RESET - }.` - ); + if (parsed.length < 2) sendMessage(client.gameClient, `Please provide a server to connect to. ${Enums.ChatColor.GOLD}/join ${config.allowCustomPorts ? " [port]" : ""}${Enums.ChatColor.RESET}.`); + else if (parsed.length > 2 && isNaN(parseInt(parsed[2]))) sendMessage(client.gameClient, `A valid port number has to be passed! ${Enums.ChatColor.GOLD}/join ${config.allowCustomPorts ? " [port]" : ""}${Enums.ChatColor.RESET}.`); else { host = parsed[1]; if (parsed.length > 2) port = parseInt(parsed[2]); if (port != null && !config.allowCustomPorts) { - sendCustomMessage( - client.gameClient, - "You are not allowed to use custom server ports! /join " + - (config.allowCustomPorts ? " [port]" : ""), - "red" - ); + sendCustomMessage(client.gameClient, "You are not allowed to use custom server ports! /join " + (config.allowCustomPorts ? " [port]" : ""), "red"); host = null; port = null; } else { - if ( - host.match(/^(?:\*\.)?((?!hypixel\.net$)[^.]+\.)*hypixel\.net$/) - ) { + if (host.match(/^(?:\*\.)?((?!hypixel\.net$)[^.]+\.)*hypixel\.net$/) && config.disallowHypixel) { sendCustomMessage( client.gameClient, - "Disallowed server, refusing to connect! Hypixel has been known to falsely flag Eaglercraft clients, and thus we do not allow connecting to their server. /join " + - (config.allowCustomPorts ? " [port]" : ""), + "Disallowed server, refusing to connect! Hypixel has been known to falsely flag Eaglercraft clients, and thus we do not allow connecting to their server. /join " + (config.allowCustomPorts ? " [port]" : ""), "red" ); } else { @@ -505,21 +429,10 @@ export async function onConnect(client: ClientState) { }, ], }); - logger.info( - `Player ${client.gameClient.username} is attempting to connect to ${host}:${port} under their Minecraft account's username (${savedAuth.selectedProfile.name}) using online mode!` - ); - const player = PLUGIN_MANAGER.proxy.players.get( - client.gameClient.username - ); + logger.info(`Player ${client.gameClient.username} is attempting to connect to ${host}:${port} under their Minecraft account's username (${savedAuth.selectedProfile.name}) using online mode!`); + const player = PLUGIN_MANAGER.proxy.players.get(client.gameClient.username); player.on("vanillaPacket", (packet, origin) => { - if ( - origin == "CLIENT" && - packet.name == "chat" && - (packet.params.message as string) - .toLowerCase() - .startsWith("/eag-") && - !packet.cancel - ) { + if (origin == "CLIENT" && packet.name == "chat" && (packet.params.message as string).toLowerCase().startsWith("/eag-") && !packet.cancel) { packet.cancel = true; handleCommand(player, packet.params.message as string); } @@ -560,13 +473,7 @@ export async function onConnect(client: ClientState) { if (!client.gameClient.ended) { client.gameClient.end( Enums.ChatColor.RED + - `Something went wrong whilst switching servers: ${err.message}${ - err.code == "ENOTFOUND" - ? host.includes(":") - ? `\n${Enums.ChatColor.GRAY}Suggestion: Replace the : in your IP with a space.` - : "\nIs that IP valid?" - : "" - }` + `Something went wrong whilst switching servers: ${err.message}${err.code == "ENOTFOUND" ? (host.includes(":") ? `\n${Enums.ChatColor.GRAY}Suggestion: Replace the : in your IP with a space.` : "\nIs that IP valid?") : ""}` ); } } @@ -576,10 +483,7 @@ export async function onConnect(client: ClientState) { client.lastStatusUpdate = Date.now(); updateState(client.gameClient, "AUTH_EASYMC"); - sendMessageWarning( - client.gameClient, - `WARNING: You've chosen to use an account from EasyMC's account pool. Please note that accounts and shared, and may be banned from whatever server you are attempting to join.` - ); + sendMessageWarning(client.gameClient, `WARNING: You've chosen to use an account from EasyMC's account pool. Please note that accounts and shared, and may be banned from whatever server you are attempting to join.`); sendChatComponent(client.gameClient, { text: "Please generate an alt token at ", color: "white", @@ -621,9 +525,7 @@ export async function onConnect(client: ClientState) { let appendOptions: any; while (true) { - const tokenResponse = await awaitCommand(client.gameClient, (msg) => - msg.toLowerCase().startsWith("/login") - ), + const tokenResponse = await awaitCommand(client.gameClient, (msg) => msg.toLowerCase().startsWith("/login")), splitResponse = tokenResponse.split(/ /gim, 2).slice(1); if (splitResponse.length != 1) { sendChatComponent(client.gameClient, { @@ -660,9 +562,7 @@ export async function onConnect(client: ClientState) { color: "white", hoverEvent: { action: "show_text", - value: - Enums.ChatColor.GOLD + - "Click me to open in a new window!", + value: Enums.ChatColor.GOLD + "Click me to open in a new window!", }, clickEvent: { action: "open_url", @@ -692,18 +592,10 @@ export async function onConnect(client: ClientState) { ], }); } else { - sendCustomMessage( - client.gameClient, - "Validating alt token...", - "gray" - ); + sendCustomMessage(client.gameClient, "Validating alt token...", "gray"); try { appendOptions = await getTokenProfileEasyMc(token); - sendCustomMessage( - client.gameClient, - `Successfully validated your alt token and retrieved your session profile! You'll be joining to your preferred server as ${appendOptions.username}.`, - "green" - ); + sendCustomMessage(client.gameClient, `Successfully validated your alt token and retrieved your session profile! You'll be joining to your preferred server as ${appendOptions.username}.`, "green"); break; } catch (err) { sendChatComponent(client.gameClient, { @@ -736,45 +628,18 @@ export async function onConnect(client: ClientState) { client.state = ConnectionState.SUCCESS; client.lastStatusUpdate = Date.now(); updateState(client.gameClient, "SERVER"); - sendMessage( - client.gameClient, - `Provide a server to join. ${Enums.ChatColor.GOLD}/join ${ - config.allowCustomPorts ? " [port]" : "" - }${Enums.ChatColor.RESET}.` - ); + sendMessage(client.gameClient, `Provide a server to join. ${Enums.ChatColor.GOLD}/join ${config.allowCustomPorts ? " [port]" : ""}${Enums.ChatColor.RESET}.`); let host: string, port: number; while (true) { - const msg = await awaitCommand(client.gameClient, (msg) => - msg.startsWith("/join") - ), + const msg = await awaitCommand(client.gameClient, (msg) => msg.startsWith("/join")), parsed = msg.split(/ /gi, 3); - if (parsed.length < 2) - sendMessage( - client.gameClient, - `Please provide a server to connect to. ${ - Enums.ChatColor.GOLD - }/join ${config.allowCustomPorts ? " [port]" : ""}${ - Enums.ChatColor.RESET - }.` - ); - else if (parsed.length > 2 && isNaN(parseInt(parsed[2]))) - sendMessage( - client.gameClient, - `A valid port number has to be passed! ${ - Enums.ChatColor.GOLD - }/join ${config.allowCustomPorts ? " [port]" : ""}${ - Enums.ChatColor.RESET - }.` - ); + if (parsed.length < 2) sendMessage(client.gameClient, `Please provide a server to connect to. ${Enums.ChatColor.GOLD}/join ${config.allowCustomPorts ? " [port]" : ""}${Enums.ChatColor.RESET}.`); + else if (parsed.length > 2 && isNaN(parseInt(parsed[2]))) sendMessage(client.gameClient, `A valid port number has to be passed! ${Enums.ChatColor.GOLD}/join ${config.allowCustomPorts ? " [port]" : ""}${Enums.ChatColor.RESET}.`); else { host = parsed[1]; if (parsed.length > 2) port = parseInt(parsed[2]); if (port != null && !config.allowCustomPorts) { - sendCustomMessage( - client.gameClient, - "You are not allowed to use custom server ports! /join ", - "red" - ); + sendCustomMessage(client.gameClient, "You are not allowed to use custom server ports! /join ", "red"); host = null; port = null; } else { @@ -806,21 +671,10 @@ export async function onConnect(client: ClientState) { }, ], }); - logger.info( - `Player ${client.gameClient.username} is attempting to connect to ${host}:${port} under their EasyMC alt token's username (${appendOptions.username}) using EasyMC mode!` - ); - const player = PLUGIN_MANAGER.proxy.players.get( - client.gameClient.username - ); + logger.info(`Player ${client.gameClient.username} is attempting to connect to ${host}:${port} under their EasyMC alt token's username (${appendOptions.username}) using EasyMC mode!`); + const player = PLUGIN_MANAGER.proxy.players.get(client.gameClient.username); player.on("vanillaPacket", (packet, origin) => { - if ( - origin == "CLIENT" && - packet.name == "chat" && - (packet.params.message as string) - .toLowerCase() - .startsWith("/eag-") && - !packet.cancel - ) { + if (origin == "CLIENT" && packet.name == "chat" && (packet.params.message as string).toLowerCase().startsWith("/eag-") && !packet.cancel) { packet.cancel = true; handleCommand(player, packet.params.message as string); } @@ -843,13 +697,7 @@ export async function onConnect(client: ClientState) { if (!client.gameClient.ended) { client.gameClient.end( Enums.ChatColor.RED + - `Something went wrong whilst switching servers: ${err.message}${ - err.code == "ENOTFOUND" - ? host.includes(":") - ? `\n${Enums.ChatColor.GRAY}Suggestion: Replace the : in your IP with a space.` - : "\nIs that IP valid?" - : "" - }` + `Something went wrong whilst switching servers: ${err.message}${err.code == "ENOTFOUND" ? (host.includes(":") ? `\n${Enums.ChatColor.GRAY}Suggestion: Replace the : in your IP with a space.` : "\nIs that IP valid?") : ""}` ); } } @@ -857,45 +705,18 @@ export async function onConnect(client: ClientState) { client.state = ConnectionState.SUCCESS; client.lastStatusUpdate = Date.now(); updateState(client.gameClient, "SERVER"); - sendMessage( - client.gameClient, - `Provide a server to join. ${Enums.ChatColor.GOLD}/join ${ - config.allowCustomPorts ? " [port]" : "" - }${Enums.ChatColor.RESET}.` - ); + sendMessage(client.gameClient, `Provide a server to join. ${Enums.ChatColor.GOLD}/join ${config.allowCustomPorts ? " [port]" : ""}${Enums.ChatColor.RESET}.`); let host: string, port: number; while (true) { - const msg = await awaitCommand(client.gameClient, (msg) => - msg.startsWith("/join") - ), + const msg = await awaitCommand(client.gameClient, (msg) => msg.startsWith("/join")), parsed = msg.split(/ /gi, 3); - if (parsed.length < 2) - sendMessage( - client.gameClient, - `Please provide a server to connect to. ${ - Enums.ChatColor.GOLD - }/join ${config.allowCustomPorts ? " [port]" : ""}${ - Enums.ChatColor.RESET - }.` - ); - else if (parsed.length > 2 && isNaN(parseInt(parsed[2]))) - sendMessage( - client.gameClient, - `A valid port number has to be passed! ${ - Enums.ChatColor.GOLD - }/join ${config.allowCustomPorts ? " [port]" : ""}${ - Enums.ChatColor.RESET - }.` - ); + if (parsed.length < 2) sendMessage(client.gameClient, `Please provide a server to connect to. ${Enums.ChatColor.GOLD}/join ${config.allowCustomPorts ? " [port]" : ""}${Enums.ChatColor.RESET}.`); + else if (parsed.length > 2 && isNaN(parseInt(parsed[2]))) sendMessage(client.gameClient, `A valid port number has to be passed! ${Enums.ChatColor.GOLD}/join ${config.allowCustomPorts ? " [port]" : ""}${Enums.ChatColor.RESET}.`); else { host = parsed[1]; if (parsed.length > 2) port = parseInt(parsed[2]); if (port != null && !config.allowCustomPorts) { - sendCustomMessage( - client.gameClient, - "You are not allowed to use custom server ports! /join ", - "red" - ); + sendCustomMessage(client.gameClient, "You are not allowed to use custom server ports! /join ", "red"); host = null; port = null; } else { @@ -927,21 +748,10 @@ export async function onConnect(client: ClientState) { }, ], }); - logger.info( - `Player ${client.gameClient.username} is attempting to connect to ${host}:${port} under their Eaglercraft username (${client.gameClient.username}) using offline mode!` - ); - const player = PLUGIN_MANAGER.proxy.players.get( - client.gameClient.username - ); + logger.info(`Player ${client.gameClient.username} is attempting to connect to ${host}:${port} under their Eaglercraft username (${client.gameClient.username}) using offline mode!`); + const player = PLUGIN_MANAGER.proxy.players.get(client.gameClient.username); player.on("vanillaPacket", (packet, origin) => { - if ( - origin == "CLIENT" && - packet.name == "chat" && - (packet.params.message as string) - .toLowerCase() - .startsWith("/eag-") && - !packet.cancel - ) { + if (origin == "CLIENT" && packet.name == "chat" && (packet.params.message as string).toLowerCase().startsWith("/eag-") && !packet.cancel) { packet.cancel = true; handleCommand(player, packet.params.message as string); } @@ -961,122 +771,32 @@ export async function onConnect(client: ClientState) { if (!client.gameClient.ended) { client.gameClient.end( Enums.ChatColor.RED + - `Something went wrong whilst switching servers: ${err.message}${ - err.code == "ENOTFOUND" - ? host.includes(":") - ? `\n${Enums.ChatColor.GRAY}Suggestion: Replace the : in your IP with a space.` - : "\nIs that IP valid?" - : "" - }` + `Something went wrong whilst switching servers: ${err.message}${err.code == "ENOTFOUND" ? (host.includes(":") ? `\n${Enums.ChatColor.GRAY}Suggestion: Replace the : in your IP with a space.` : "\nIs that IP valid?") : ""}` ); } } } } catch (err) { if (!client.gameClient.ended) { - logger.error( - `Error whilst processing user ${client.gameClient.username}: ${ - err.stack || err - }` - ); - client.gameClient.end( - Enums.ChatColor.YELLOW + - "Something went wrong whilst processing your request. Please reconnect." - ); + logger.error(`Error whilst processing user ${client.gameClient.username}: ${err.stack || err}`); + client.gameClient.end(Enums.ChatColor.YELLOW + "Something went wrong whilst processing your request. Please reconnect."); } } } export function generateSpawnChunk(): Chunk.PCChunk { const chunk = new (Chunk.default(REGISTRY))(null) as Chunk.PCChunk; - chunk.initialize( - () => - new McBlock( - REGISTRY.blocksByName.air.id, - REGISTRY.biomesByName.the_end.id, - 0 - ) - ); - chunk.setBlock( - new Vec3(8, 64, 8), - new McBlock( - REGISTRY.blocksByName.sea_lantern.id, - REGISTRY.biomesByName.the_end.id, - 0 - ) - ); - chunk.setBlock( - new Vec3(8, 67, 8), - new McBlock( - REGISTRY.blocksByName.barrier.id, - REGISTRY.biomesByName.the_end.id, - 0 - ) - ); - chunk.setBlock( - new Vec3(7, 65, 8), - new McBlock( - REGISTRY.blocksByName.barrier.id, - REGISTRY.biomesByName.the_end.id, - 0 - ) - ); - chunk.setBlock( - new Vec3(7, 66, 8), - new McBlock( - REGISTRY.blocksByName.barrier.id, - REGISTRY.biomesByName.the_end.id, - 0 - ) - ); - chunk.setBlock( - new Vec3(9, 65, 8), - new McBlock( - REGISTRY.blocksByName.barrier.id, - REGISTRY.biomesByName.the_end.id, - 0 - ) - ); - chunk.setBlock( - new Vec3(9, 66, 8), - new McBlock( - REGISTRY.blocksByName.barrier.id, - REGISTRY.biomesByName.the_end.id, - 0 - ) - ); - chunk.setBlock( - new Vec3(8, 65, 7), - new McBlock( - REGISTRY.blocksByName.barrier.id, - REGISTRY.biomesByName.the_end.id, - 0 - ) - ); - chunk.setBlock( - new Vec3(8, 66, 7), - new McBlock( - REGISTRY.blocksByName.barrier.id, - REGISTRY.biomesByName.the_end.id, - 0 - ) - ); - chunk.setBlock( - new Vec3(8, 65, 9), - new McBlock( - REGISTRY.blocksByName.barrier.id, - REGISTRY.biomesByName.the_end.id, - 0 - ) - ); - chunk.setBlock( - new Vec3(8, 66, 9), - new McBlock( - REGISTRY.blocksByName.barrier.id, - REGISTRY.biomesByName.the_end.id, - 0 - ) - ); + chunk.initialize(() => new McBlock(REGISTRY.blocksByName.air.id, REGISTRY.biomesByName.the_end.id, 0)); + chunk.setBlock(new Vec3(8, 64, 8), new McBlock(REGISTRY.blocksByName.sea_lantern.id, REGISTRY.biomesByName.the_end.id, 0)); + chunk.setBlock(new Vec3(8, 67, 8), new McBlock(REGISTRY.blocksByName.barrier.id, REGISTRY.biomesByName.the_end.id, 0)); + chunk.setBlock(new Vec3(7, 65, 8), new McBlock(REGISTRY.blocksByName.barrier.id, REGISTRY.biomesByName.the_end.id, 0)); + chunk.setBlock(new Vec3(7, 66, 8), new McBlock(REGISTRY.blocksByName.barrier.id, REGISTRY.biomesByName.the_end.id, 0)); + chunk.setBlock(new Vec3(9, 65, 8), new McBlock(REGISTRY.blocksByName.barrier.id, REGISTRY.biomesByName.the_end.id, 0)); + chunk.setBlock(new Vec3(9, 66, 8), new McBlock(REGISTRY.blocksByName.barrier.id, REGISTRY.biomesByName.the_end.id, 0)); + chunk.setBlock(new Vec3(8, 65, 7), new McBlock(REGISTRY.blocksByName.barrier.id, REGISTRY.biomesByName.the_end.id, 0)); + chunk.setBlock(new Vec3(8, 66, 7), new McBlock(REGISTRY.blocksByName.barrier.id, REGISTRY.biomesByName.the_end.id, 0)); + chunk.setBlock(new Vec3(8, 65, 9), new McBlock(REGISTRY.blocksByName.barrier.id, REGISTRY.biomesByName.the_end.id, 0)); + chunk.setBlock(new Vec3(8, 66, 9), new McBlock(REGISTRY.blocksByName.barrier.id, REGISTRY.biomesByName.the_end.id, 0)); // chunk.setBlockLight(new Vec3(8, 65, 8), 15); chunk.setBlockLight(new Vec3(8, 66, 8), 15); return chunk; diff --git a/src/proxy/Player.ts b/src/proxy/Player.ts index cd8a4cd..4c427ad 100644 --- a/src/proxy/Player.ts +++ b/src/proxy/Player.ts @@ -1,10 +1,5 @@ import EventEmitter from "events"; -import pkg, { - Client, - ClientOptions, - createClient, - states, -} from "minecraft-protocol"; +import pkg, { Client, ClientOptions, createClient, states } from "minecraft-protocol"; import { WebSocket } from "ws"; import { Logger } from "../logger.js"; import { Chat } from "./Chat.js"; @@ -15,11 +10,12 @@ import { MineProtocol } from "./Protocol.js"; import { EaglerSkins } from "./skins/EaglerSkins.js"; import { Util } from "./Util.js"; import { BungeeUtil } from "./BungeeUtil.js"; +import { IncomingMessage } from "http"; const { createSerializer, createDeserializer } = pkg; export class Player extends EventEmitter { - public ws: WebSocket; + public ws: WebSocket & { httpRequest: IncomingMessage }; public username?: string; public skin?: EaglerSkins.EaglerSkin; public uuid?: string; @@ -37,14 +33,13 @@ export class Player extends EventEmitter { public clientDeserializer: any; private _kickMessage: string; - constructor(ws: WebSocket, playerName?: string, serverConnection?: Client) { + constructor(ws: WebSocket & { httpRequest: IncomingMessage }, playerName?: string, serverConnection?: Client) { super(); this._logger = new Logger(`PlayerHandler-${playerName}`); this.ws = ws; this.username = playerName; this.serverConnection = serverConnection; - if (this.username != null) - this.uuid = Util.generateUUIDFromPlayer(this.username); + if (this.username != null) this.uuid = Util.generateUUIDFromPlayer(this.username); this.serverSerializer = createSerializer({ state: states.PLAY, isServer: true, @@ -81,28 +76,15 @@ export class Player extends EventEmitter { if (msg instanceof Buffer == false) return; const decoder = PACKET_REGISTRY.get(msg[0]); if (decoder && decoder.sentAfterHandshake) { - if ( - !decoder && - this.state != Enums.ClientState.POST_HANDSHAKE && - msg.length >= 1 - ) { - this._logger.warn( - `Packet with ID 0x${Buffer.from([msg[0]]).toString( - "hex" - )} is missing a corresponding packet handler! Processing for this packet will be skipped.` - ); + if (!decoder && this.state != Enums.ClientState.POST_HANDSHAKE && msg.length >= 1) { + this._logger.warn(`Packet with ID 0x${Buffer.from([msg[0]]).toString("hex")} is missing a corresponding packet handler! Processing for this packet will be skipped.`); } else { let parsed: Packet, err: boolean; try { parsed = new decoder.class(); parsed.deserialize(msg); } catch (err) { - if (this.state != Enums.ClientState.POST_HANDSHAKE) - this._logger.warn( - `Packet ID 0x${Buffer.from([msg[0]]).toString( - "hex" - )} failed to parse! The packet will be skipped.` - ); + if (this.state != Enums.ClientState.POST_HANDSHAKE) this._logger.warn(`Packet ID 0x${Buffer.from([msg[0]]).toString("hex")} failed to parse! The packet will be skipped.`); err = true; } if (!err) { @@ -113,10 +95,7 @@ export class Player extends EventEmitter { } else { try { const parsed = this.serverDeserializer.parsePacketBuffer(msg)?.data, - translated = this.translator.translatePacketClient( - parsed.params, - parsed - ), + translated = this.translator.translatePacketClient(parsed.params, parsed), packetData = { name: translated[0], params: translated[1], @@ -132,12 +111,7 @@ export class Player extends EventEmitter { ); } } catch (err) { - this._logger.debug( - `Client ${this - .username!} sent an unrecognized packet that could not be parsed!\n${ - err.stack ?? err - }` - ); + this._logger.debug(`Client ${this.username!} sent an unrecognized packet that could not be parsed!\n${err.stack ?? err}`); } } }); @@ -147,21 +121,12 @@ export class Player extends EventEmitter { this.ws.send(packet.serialize()); } - public async read( - packetId?: Enums.PacketId, - filter?: (packet: Packet) => boolean - ): Promise { + public async read(packetId?: Enums.PacketId, filter?: (packet: Packet) => boolean): Promise { let res; await Util.awaitPacket(this.ws, (packet) => { if ((packetId != null && packetId == packet[0]) || packetId == null) { const decoder = PACKET_REGISTRY.get(packet[0]); - if ( - decoder != null && - decoder.packetId == packet[0] && - (this.state == Enums.ClientState.PRE_HANDSHAKE || - decoder.sentAfterHandshake) && - decoder.boundTo == Enums.PacketBounds.S - ) { + if (decoder != null && decoder.packetId == packet[0] && (this.state == Enums.ClientState.PRE_HANDSHAKE || decoder.sentAfterHandshake) && decoder.boundTo == Enums.PacketBounds.S) { let parsed: Packet, err = false; try { @@ -188,16 +153,7 @@ export class Player extends EventEmitter { public disconnect(message: Chat.Chat | string) { if (this.state == Enums.ClientState.POST_HANDSHAKE) { - this.ws.send( - Buffer.concat( - [ - [0x40], - MineProtocol.writeString( - typeof message == "string" ? message : JSON.stringify(message) - ), - ].map((arr) => (arr instanceof Uint8Array ? arr : Buffer.from(arr))) - ) - ); + this.ws.send(Buffer.concat([[0x40], MineProtocol.writeString(typeof message == "string" ? message : JSON.stringify(message))].map((arr) => (arr instanceof Uint8Array ? arr : Buffer.from(arr))))); this.ws.close(); } else { const packet = new SCDisconnectPacket(); @@ -208,10 +164,7 @@ export class Player extends EventEmitter { } public async connect(options: ClientOptions) { - if (this._alreadyConnected) - throw new Error( - `Invalid state: Player has already been connected to a server, and .connect() was just called. Please use switchServers() instead.` - ); + if (this._alreadyConnected) throw new Error(`Invalid state: Player has already been connected to a server, and .connect() was just called. Please use switchServers() instead.`); this._alreadyConnected = true; this.serverConnection = createClient( Object.assign( @@ -269,9 +222,7 @@ export class Player extends EventEmitter { ) ); - await this._bindListenersMineClient(this.serverConnection, true, () => - oldConnection.end() - ) + await this._bindListenersMineClient(this.serverConnection, true, () => oldConnection.end()) .then(() => { this.emit("switchServer", this.serverConnection, this); res(); @@ -283,11 +234,7 @@ export class Player extends EventEmitter { }); } - private async _bindListenersMineClient( - client: Client, - switchingServers?: boolean, - onSwitch?: Function - ) { + private async _bindListenersMineClient(client: Client, switchingServers?: boolean, onSwitch?: Function) { return new Promise((res, rej) => { let stream = false, uuid; @@ -300,17 +247,13 @@ export class Player extends EventEmitter { if (!stream) { rej(err); } else { - this.disconnect( - `${Enums.ChatColor.RED}Something went wrong: ${err.stack ?? err}` - ); + this.disconnect(`${Enums.ChatColor.RED}Something went wrong: ${err.stack ?? err}`); } }; setTimeout(() => { if (!stream && this.state != Enums.ClientState.DISCONNECTED) { client.end("Timed out waiting for server connection."); - this.disconnect( - Enums.ChatColor.RED + "Timed out waiting for server connection!" - ); + this.disconnect(Enums.ChatColor.RED + "Timed out waiting for server connection!"); throw new Error("Timed out waiting for server connection!"); } }, 30000); @@ -349,14 +292,8 @@ export class Player extends EventEmitter { if (!stream) { if (switchingServers) { if (meta.name == "login" && meta.state == states.PLAY && uuid) { - this.translator = new BungeeUtil.PacketUUIDTranslator( - client.uuid, - this.uuid - ); - const pckSeq = BungeeUtil.getRespawnSequence( - packet, - this.serverSerializer - ); + this.translator = new BungeeUtil.PacketUUIDTranslator(client.uuid, this.uuid); + const pckSeq = BungeeUtil.getRespawnSequence(packet, this.serverSerializer); this.ws.send( this.serverSerializer.createPacketBuffer({ name: "login", @@ -367,19 +304,12 @@ export class Player extends EventEmitter { stream = true; if (onSwitch) onSwitch(); res(null); - } else if ( - meta.name == "success" && - meta.state == states.LOGIN && - !uuid - ) { + } else if (meta.name == "success" && meta.state == states.LOGIN && !uuid) { uuid = packet.uuid; } } else { if (meta.name == "login" && meta.state == states.PLAY && uuid) { - this.translator = new BungeeUtil.PacketUUIDTranslator( - client.uuid, - this.uuid - ); + this.translator = new BungeeUtil.PacketUUIDTranslator(client.uuid, this.uuid); this.ws.send( this.serverSerializer.createPacketBuffer({ name: "login", @@ -389,19 +319,12 @@ export class Player extends EventEmitter { stream = true; if (onSwitch) onSwitch(); res(null); - } else if ( - meta.name == "success" && - meta.state == states.LOGIN && - !uuid - ) { + } else if (meta.name == "success" && meta.state == states.LOGIN && !uuid) { uuid = packet.uuid; } } } else { - const translated = this.translator!.translatePacketServer( - packet, - meta - ), + const translated = this.translator!.translatePacketServer(packet, meta), eventData = { name: translated[0], params: translated[1], @@ -444,8 +367,5 @@ export declare interface Player { on(event: U, listener: PlayerEvents[U]): this; once(event: U, listener: PlayerEvents[U]): this; - emit( - event: U, - ...args: Parameters - ): boolean; + emit(event: U, ...args: Parameters): boolean; } diff --git a/src/proxy/Proxy.ts b/src/proxy/Proxy.ts index e2b4623..a1941e7 100644 --- a/src/proxy/Proxy.ts +++ b/src/proxy/Proxy.ts @@ -13,12 +13,7 @@ import SCIdentifyPacket from "./packets/SCIdentifyPacket.js"; import { Motd } from "./Motd.js"; import { Player } from "./Player.js"; import { Enums } from "./Enums.js"; -import { - NETWORK_VERSION, - PROXY_BRANDING, - PROXY_VERSION, - VANILLA_PROTOCOL_VERSION, -} from "../meta.js"; +import { NETWORK_VERSION, PROXY_BRANDING, PROXY_VERSION, VANILLA_PROTOCOL_VERSION } from "../meta.js"; import { CSUsernamePacket } from "./packets/CSUsernamePacket.js"; import { SCSyncUuidPacket } from "./packets/SCSyncUuidPacket.js"; import { SCReadyPacket } from "./packets/SCReadyPacket.js"; @@ -61,42 +56,30 @@ export class Proxy extends EventEmitter { // hijack the initial handler logger to append [InitialHandler] to the beginning (this.initalHandlerLogger as any)._info = this.initalHandlerLogger.info; this.initalHandlerLogger.info = (msg: string) => { - (this.initalHandlerLogger as any)._info( - `${chalk.blue("[InitialHandler]")} ${msg}` - ); + (this.initalHandlerLogger as any)._info(`${chalk.blue("[InitialHandler]")} ${msg}`); }; (this.initalHandlerLogger as any)._warn = this.initalHandlerLogger.warn; this.initalHandlerLogger.warn = (msg: string) => { - (this.initalHandlerLogger as any)._warn( - `${chalk.blue("[InitialHandler]")} ${msg}` - ); + (this.initalHandlerLogger as any)._warn(`${chalk.blue("[InitialHandler]")} ${msg}`); }; (this.initalHandlerLogger as any)._error = this.initalHandlerLogger.error; this.initalHandlerLogger.error = (msg: string) => { - (this.initalHandlerLogger as any)._error( - `${chalk.blue("[InitialHandler]")} ${msg}` - ); + (this.initalHandlerLogger as any)._error(`${chalk.blue("[InitialHandler]")} ${msg}`); }; (this.initalHandlerLogger as any)._fatal = this.initalHandlerLogger.fatal; this.initalHandlerLogger.fatal = (msg: string) => { - (this.initalHandlerLogger as any)._fatal( - `${chalk.blue("[InitialHandler]")} ${msg}` - ); + (this.initalHandlerLogger as any)._fatal(`${chalk.blue("[InitialHandler]")} ${msg}`); }; (this.initalHandlerLogger as any)._debug = this.initalHandlerLogger.debug; this.initalHandlerLogger.debug = (msg: string) => { - (this.initalHandlerLogger as any)._debug( - `${chalk.blue("[InitialHandler]")} ${msg}` - ); + (this.initalHandlerLogger as any)._debug(`${chalk.blue("[InitialHandler]")} ${msg}`); }; this.config = config; this.pluginManager = pluginManager; instanceCount++; process.on("uncaughtException", (err) => { - this._logger.warn( - `An uncaught exception was caught! Error: ${err.stack}` - ); + this._logger.warn(`An uncaught exception was caught! Error: ${err.stack}`); }); process.on("unhandledRejection", (err) => { @@ -107,16 +90,10 @@ export class Proxy extends EventEmitter { public async init() { this._logger.info(`Starting ${PROXY_BRANDING} v${PROXY_VERSION}...`); global.PROXY = this; - if (this.loaded) - throw new Error( - "Can't initiate if proxy instance is already initialized or is being initialized!" - ); + if (this.loaded) throw new Error("Can't initiate if proxy instance is already initialized or is being initialized!"); this.loaded = true; this.packetRegistry = await loadPackets(); - this.skinServer = new EaglerSkins.SkinServer( - this, - this.config.skinUrlWhitelist - ); + this.skinServer = new EaglerSkins.SkinServer(this, this.config.skinUrlWhitelist); global.PACKET_REGISTRY = this.packetRegistry; if (this.config.motd == "FORWARD") { this._pollServer(this.config.server.host, this.config.server.port); @@ -136,22 +113,12 @@ export class Proxy extends EventEmitter { }, (req, res) => this._handleNonWSRequest(req, res, this.config) ) - .listen( - this.config.bindPort || 8080, - this.config.bindHost || "127.0.0.1" - ); + .listen(this.config.bindPort || 8080, this.config.bindHost || "127.0.0.1"); this.wsServer = new WebSocketServer({ noServer: true, }); } else { - this.httpServer = http - .createServer((req, res) => - this._handleNonWSRequest(req, res, this.config) - ) - .listen( - this.config.bindPort || 8080, - this.config.bindHost || "127.0.0.1" - ); + this.httpServer = http.createServer((req, res) => this._handleNonWSRequest(req, res, this.config)).listen(this.config.bindPort || 8080, this.config.bindHost || "127.0.0.1"); this.wsServer = new WebSocketServer({ noServer: true, }); @@ -166,73 +133,49 @@ export class Proxy extends EventEmitter { try { await this._handleWSConnectionReq(r, s, h); } catch (err) { - this._logger.error( - `Error was caught whilst trying to handle WebSocket upgrade! Error: ${ - err.stack ?? err - }` - ); + this._logger.error(`Error was caught whilst trying to handle WebSocket upgrade! Error: ${err.stack ?? err}`); } }); this.pluginManager.emit("proxyFinishLoading", this, this.pluginManager); - this._logger.info( - `Started WebSocket server and binded to ${this.config.bindHost} on port ${this.config.bindPort}.` - ); + this._logger.info(`Started WebSocket server and binded to ${this.config.bindHost} on port ${this.config.bindPort}.`); } - private _handleNonWSRequest( - req: http.IncomingMessage, - res: http.ServerResponse, - config: Config["adapter"] - ) { - res - .setHeader("Content-Type", "text/html") - .writeHead(426) - .end(UPGRADE_REQUIRED_RESPONSE); + private _handleNonWSRequest(req: http.IncomingMessage, res: http.ServerResponse, config: Config["adapter"]) { + const ctx: Util.Handlable = { handled: false }; + this.emit("httpConnection", req, res, ctx); + if (!ctx.handled) res.setHeader("Content-Type", "text/html").writeHead(426).end(UPGRADE_REQUIRED_RESPONSE); } readonly LOGIN_TIMEOUT = 30000; - private async _handleWSConnection(ws: WebSocket) { + private async _handleWSConnection(ws: WebSocket, req: http.IncomingMessage) { const firstPacket = await Util.awaitPacket(ws); let player: Player, handled: boolean; setTimeout(() => { if (!handled) { this.initalHandlerLogger.warn( `Disconnecting client ${ - player - ? player.username ?? - `[/${(ws as any)._socket.remoteAddress}:${ - (ws as any)._socket.remotePort - }` - : `[/${(ws as any)._socket.remoteAddress}:${ - (ws as any)._socket.remotePort - }` + player ? player.username ?? `[/${(ws as any)._socket.remoteAddress}:${(ws as any)._socket.remotePort}` : `[/${(ws as any)._socket.remoteAddress}:${(ws as any)._socket.remotePort}` } due to connection timing out.` ); - if (player) - player.disconnect( - `${Enums.ChatColor.YELLOW} Your connection timed out whilst processing handshake, please try again.` - ); + if (player) player.disconnect(`${Enums.ChatColor.YELLOW} Your connection timed out whilst processing handshake, please try again.`); else ws.close(); } }, this.LOGIN_TIMEOUT); try { + const ctx: Util.Handlable = { handled: false }; + await this.emit("wsConnection", ws, req, ctx); + if (ctx.handled) return; + if (firstPacket.toString() === "Accept: MOTD") { if (this.broadcastMotd) { if ((this.broadcastMotd as any)._static) { this.broadcastMotd.jsonMotd.data.online = this.players.size; // sample for players this.broadcastMotd.jsonMotd.data.players = []; - const playerSample = [...this.players.keys()] - .filter((sample) => !sample.startsWith("!phs_")) - .slice(0, 5); + const playerSample = [...this.players.keys()].filter((sample) => !sample.startsWith("!phs_")).slice(0, 5); this.broadcastMotd.jsonMotd.data.players = playerSample; - if (this.players.size - playerSample.length > 0) - this.broadcastMotd.jsonMotd.data.players.push( - `${Enums.ChatColor.GRAY}${Enums.ChatColor.ITALIC}(and ${ - this.players.size - playerSample.length - } more)` - ); + if (this.players.size - playerSample.length > 0) this.broadcastMotd.jsonMotd.data.players.push(`${Enums.ChatColor.GRAY}${Enums.ChatColor.ITALIC}(and ${this.players.size - playerSample.length} more)`); const bufferized = this.broadcastMotd.toBuffer(); ws.send(bufferized[0]); @@ -246,24 +189,15 @@ export class Proxy extends EventEmitter { handled = true; ws.close(); } else { - player = new Player(ws); + (ws as any).httpRequest = req; + player = new Player(ws as any); const loginPacket = new CSLoginPacket().deserialize(firstPacket); player.state = Enums.ClientState.PRE_HANDSHAKE; if (loginPacket.gameVersion != VANILLA_PROTOCOL_VERSION) { - player.disconnect( - `${Enums.ChatColor.RED}Please connect to this proxy on EaglercraftX 1.8.9.` - ); + player.disconnect(`${Enums.ChatColor.RED}Please connect to this proxy on EaglercraftX 1.8.9.`); return; } else if (loginPacket.networkVersion != NETWORK_VERSION) { - player.disconnect( - `${Enums.ChatColor.RED}Your EaglercraftX version is too ${ - loginPacket.networkVersion > NETWORK_VERSION ? "new" : "old" - }! Please ${ - loginPacket.networkVersion > NETWORK_VERSION - ? "downgrade" - : "update" - }.` - ); + player.disconnect(`${Enums.ChatColor.RED}Your EaglercraftX version is too ${loginPacket.networkVersion > NETWORK_VERSION ? "new" : "old"}! Please ${loginPacket.networkVersion > NETWORK_VERSION ? "downgrade" : "update"}.`); return; } try { @@ -275,35 +209,22 @@ export class Proxy extends EventEmitter { player.username = loginPacket.username; player.uuid = Util.generateUUIDFromPlayer(player.username); if (this.players.size > this.config.maxConcurrentClients) { - player.disconnect( - `${Enums.ChatColor.YELLOW}Proxy is full! Please try again later.` - ); + player.disconnect(`${Enums.ChatColor.YELLOW}Proxy is full! Please try again later.`); return; - } else if ( - this.players.get(player.username) != null || - this.players.get(`!phs.${player.uuid}`) != null - ) { - player.disconnect( - `${Enums.ChatColor.YELLOW}Someone under your username (${player.username}) is already connected to the proxy!` - ); + } else if (this.players.get(player.username) != null || this.players.get(`!phs.${player.uuid}`) != null) { + player.disconnect(`${Enums.ChatColor.YELLOW}Someone under your username (${player.username}) is already connected to the proxy!`); return; } this.players.set(`!phs.${player.uuid}`, player); this._logger.info( - `Player ${loginPacket.username} (${Util.generateUUIDFromPlayer( - loginPacket.username - )}) running ${loginPacket.brand}/${loginPacket.version} (net ver: ${ - loginPacket.networkVersion - }, game ver: ${loginPacket.gameVersion}) is attempting to connect!` + `Player ${loginPacket.username} (${Util.generateUUIDFromPlayer(loginPacket.username)}) running ${loginPacket.brand}/${loginPacket.version} (net ver: ${loginPacket.networkVersion}, game ver: ${ + loginPacket.gameVersion + }) is attempting to connect!` ); player.write(new SCIdentifyPacket()); - const usernamePacket: CSUsernamePacket = (await player.read( - Enums.PacketId.CSUsernamePacket - )) as any; + const usernamePacket: CSUsernamePacket = (await player.read(Enums.PacketId.CSUsernamePacket)) as any; if (usernamePacket.username !== player.username) { - player.disconnect( - `${Enums.ChatColor.YELLOW}Failed to complete handshake. Your game version may be too old or too new.` - ); + player.disconnect(`${Enums.ChatColor.YELLOW}Failed to complete handshake. Your game version may be too old or too new.`); return; } const syncUuid = new SCSyncUuidPacket(); @@ -311,12 +232,7 @@ export class Proxy extends EventEmitter { syncUuid.uuid = player.uuid; player.write(syncUuid); - const prom = await Promise.all([ - player.read(Enums.PacketId.CSReadyPacket), - (await player.read( - Enums.PacketId.CSSetSkinPacket - )) as CSSetSkinPacket, - ]), + const prom = await Promise.all([player.read(Enums.PacketId.CSReadyPacket), (await player.read(Enums.PacketId.CSSetSkinPacket)) as CSSetSkinPacket]), skin = prom[1], obj = new EaglerSkins.EaglerSkin(); obj.owner = player; @@ -331,45 +247,31 @@ export class Proxy extends EventEmitter { player.initListeners(); this._bindListenersToPlayer(player); player.state = Enums.ClientState.POST_HANDSHAKE; - this._logger.info( - `Handshake Success! Connecting player ${player.username} to server...` - ); + this._logger.info(`Handshake Success! Connecting player ${player.username} to server...`); handled = true; await player.connect({ host: this.config.server.host, port: this.config.server.port, username: player.username, }); - this._logger.info( - `Player ${player.username} successfully connected to server.` - ); + this._logger.info(`Player ${player.username} successfully connected to server.`); this.emit("playerConnect", player); } } catch (err) { - this.initalHandlerLogger.warn( - `Error occurred whilst handling handshake: ${err.stack ?? err}` - ); + this.initalHandlerLogger.warn(`Error occurred whilst handling handshake: ${err.stack ?? err}`); handled = true; ws.close(); - if (player && player.uuid && this.players.has(`!phs.${player.uuid}`)) - this.players.delete(`!phs.${player.uuid}`); - if (player && player.uuid && this.players.has(player.username)) - this.players.delete(player.username); + if (player && player.uuid && this.players.has(`!phs.${player.uuid}`)) this.players.delete(`!phs.${player.uuid}`); + if (player && player.uuid && this.players.has(player.username)) this.players.delete(player.username); } } private _bindListenersToPlayer(player: Player) { let sentDisconnectMsg = false; player.on("disconnect", () => { - if (this.players.has(player.username)) - this.players.delete(player.username); - this.initalHandlerLogger.info( - `DISCONNECT ${player.username} <=> DISCONNECTED` - ); - if (!sentDisconnectMsg) - this._logger.info( - `Player ${player.username} (${player.uuid}) disconnected from the proxy server.` - ); + if (this.players.has(player.username)) this.players.delete(player.username); + this.initalHandlerLogger.info(`DISCONNECT ${player.username} <=> DISCONNECTED`); + if (!sentDisconnectMsg) this._logger.info(`Player ${player.username} (${player.uuid}) disconnected from the proxy server.`); }); player.on("proxyPacket", async (packet) => { if (packet.packetId == Enums.PacketId.CSChannelMessagePacket) { @@ -379,23 +281,15 @@ export class Proxy extends EventEmitter { await this.skinServer.handleRequest(msg, player); } } catch (err) { - this._logger.error( - `Failed to process channel message packet! Error: ${ - err.stack || err - }` - ); + this._logger.error(`Failed to process channel message packet! Error: ${err.stack || err}`); } } }); player.on("switchServer", (client) => { - this.initalHandlerLogger.info( - `SWITCH_SERVER ${player.username} <=> ${client.socket.remoteAddress}:${client.socket.remotePort}` - ); + this.initalHandlerLogger.info(`SWITCH_SERVER ${player.username} <=> ${client.socket.remoteAddress}:${client.socket.remotePort}`); }); player.on("joinServer", (client) => { - this.initalHandlerLogger.info( - `SERVER_CONNECTED ${player.username} <=> ${client.socket.remoteAddress}:${client.socket.remotePort}` - ); + this.initalHandlerLogger.info(`SERVER_CONNECTED ${player.username} <=> ${client.socket.remoteAddress}:${client.socket.remotePort}`); }); } @@ -404,62 +298,33 @@ export class Proxy extends EventEmitter { private _pollServer(host: string, port: number, interval?: number) { (async () => { while (true) { - const motd = await Motd.MOTD.generateMOTDFromPing(host, port).catch( - (err) => { - this._logger.warn( - `Error polling ${host}:${port} for MOTD: ${err.stack ?? err}` - ); - } - ); + const motd = await Motd.MOTD.generateMOTDFromPing(host, port).catch((err) => { + this._logger.warn(`Error polling ${host}:${port} for MOTD: ${err.stack ?? err}`); + }); if (motd) this.broadcastMotd = motd; - await new Promise((res) => - setTimeout(res, interval ?? Proxy.POLL_INTERVAL) - ); + await new Promise((res) => setTimeout(res, interval ?? Proxy.POLL_INTERVAL)); } })(); } - private async _handleWSConnectionReq( - req: http.IncomingMessage, - socket: Duplex, - head: Buffer - ) { - const origin = - req.headers.origin == null || req.headers.origin == "null" - ? null - : req.headers.origin; + private async _handleWSConnectionReq(req: http.IncomingMessage, socket: Duplex, head: Buffer) { + const origin = req.headers.origin == null || req.headers.origin == "null" ? null : req.headers.origin; if (!this.config.origins.allowOfflineDownloads && origin == null) { socket.destroy(); return; } - if ( - this.config.origins.originBlacklist != null && - this.config.origins.originBlacklist.some((host) => - Util.areDomainsEqual(host, origin) - ) - ) { + if (this.config.origins.originBlacklist != null && this.config.origins.originBlacklist.some((host) => Util.areDomainsEqual(host, origin))) { socket.destroy(); return; } - if ( - this.config.origins.originWhitelist != null && - !this.config.origins.originWhitelist.some((host) => - Util.areDomainsEqual(host, origin) - ) - ) { + if (this.config.origins.originWhitelist != null && !this.config.origins.originWhitelist.some((host) => Util.areDomainsEqual(host, origin))) { socket.destroy(); return; } try { - await this.wsServer.handleUpgrade(req, socket, head, (ws) => - this._handleWSConnection(ws) - ); + await this.wsServer.handleUpgrade(req, socket, head, (ws) => this._handleWSConnection(ws, req)); } catch (err) { - this._logger.error( - `Error was caught whilst trying to handle WebSocket connection request! Error: ${ - err.stack ?? err - }` - ); + this._logger.error(`Error was caught whilst trying to handle WebSocket connection request! Error: ${err.stack ?? err}`); socket.destroy(); } } @@ -475,13 +340,12 @@ export class Proxy extends EventEmitter { interface ProxyEvents { playerConnect: (player: Player) => void; playerDisconnect: (player: Player) => void; + + httpConnection: (req: http.IncomingMessage, res: http.ServerResponse, ctx: Util.Handlable) => void; + wsConnection: (ws: WebSocket, req: http.IncomingMessage, ctx: Util.Handlable) => void; } export declare interface Proxy { on(event: U, listener: ProxyEvents[U]): this; - - emit( - event: U, - ...args: Parameters - ): boolean; + emit(event: U, ...args: Parameters): boolean; } diff --git a/src/proxy/Util.ts b/src/proxy/Util.ts index 236b15d..5e487b1 100644 --- a/src/proxy/Util.ts +++ b/src/proxy/Util.ts @@ -37,26 +37,18 @@ export namespace Util { export function uuidStringToBuffer(uuid: string): Buffer { if (!uuid) return Buffer.alloc(16); // Return empty buffer const hexStr = uuid.replace(/-/g, ""); - if (uuid.length != 36 || hexStr.length != 32) - throw new Error(`Invalid UUID string: ${uuid}`); + if (uuid.length != 36 || hexStr.length != 32) throw new Error(`Invalid UUID string: ${uuid}`); return Buffer.from(hexStr, "hex"); } export function uuidBufferToString(buffer: Buffer): string { - if (buffer.length != 16) - throw new Error(`Invalid buffer length for uuid: ${buffer.length}`); + if (buffer.length != 16) throw new Error(`Invalid buffer length for uuid: ${buffer.length}`); if (buffer.equals(Buffer.alloc(16))) return null; // If buffer is all zeros, return null const str = buffer.toString("hex"); - return `${str.slice(0, 8)}-${str.slice(8, 12)}-${str.slice( - 12, - 16 - )}-${str.slice(16, 20)}-${str.slice(20)}`; + return `${str.slice(0, 8)}-${str.slice(8, 12)}-${str.slice(12, 16)}-${str.slice(16, 20)}-${str.slice(20)}`; } - export function awaitPacket( - ws: WebSocket, - filter?: (msg: Buffer) => boolean - ): Promise { + export function awaitPacket(ws: WebSocket, filter?: (msg: Buffer) => boolean): Promise { return new Promise((res, rej) => { let resolved = false; const msgCb = (msg: any) => { @@ -64,17 +56,13 @@ export namespace Util { resolved = true; ws.removeListener("message", msgCb); ws.removeListener("close", discon); - ws.setMaxListeners( - ws.getMaxListeners() - 2 < 0 ? 5 : ws.getMaxListeners() - 2 - ); + ws.setMaxListeners(ws.getMaxListeners() - 2 < 0 ? 5 : ws.getMaxListeners() - 2); res(msg); } else if (filter == null) { resolved = true; ws.removeListener("message", msgCb); ws.removeListener("close", discon); - ws.setMaxListeners( - ws.getMaxListeners() - 2 < 0 ? 5 : ws.getMaxListeners() - 2 - ); + ws.setMaxListeners(ws.getMaxListeners() - 2 < 0 ? 5 : ws.getMaxListeners() - 2); res(msg); } }; @@ -82,9 +70,7 @@ export namespace Util { resolved = true; ws.removeListener("message", msgCb); ws.removeListener("close", discon); - ws.setMaxListeners( - ws.getMaxListeners() - 2 < 0 ? 5 : ws.getMaxListeners() - 2 - ); + ws.setMaxListeners(ws.getMaxListeners() - 2 < 0 ? 5 : ws.getMaxListeners() - 2); rej("Connection closed"); }; ws.setMaxListeners(ws.getMaxListeners() + 2); @@ -93,9 +79,7 @@ export namespace Util { setTimeout(() => { ws.removeListener("message", msgCb); ws.removeListener("close", discon); - ws.setMaxListeners( - ws.getMaxListeners() - 2 < 0 ? 5 : ws.getMaxListeners() - 2 - ); + ws.setMaxListeners(ws.getMaxListeners() - 2 < 0 ? 5 : ws.getMaxListeners() - 2); rej("Timed out"); }, 10000); }); @@ -104,57 +88,28 @@ export namespace Util { export function validateUsername(user: string): void | never { if (user.length > 20) throw new Error("Username is too long!"); if (user.length < 3) throw new Error("Username is too short!"); - if (!!user.match(USERNAME_REGEX)) - throw new Error( - "Invalid username. Username can only contain alphanumeric characters, and the underscore (_) character." - ); + if (!!user.match(USERNAME_REGEX)) throw new Error("Invalid username. Username can only contain alphanumeric characters, and the underscore (_) character."); } export function areDomainsEqual(d1: string, d2: string): boolean { - if (d1.endsWith("*.")) - d1 = d1.replace( - "*.", - "WILDCARD-LOL-EXTRA-LONG-SUBDOMAIN-TO-LOWER-CHANCES-OF-COLLISION." - ); + if (d1.endsWith("*.")) d1 = d1.replace("*.", "WILDCARD-LOL-EXTRA-LONG-SUBDOMAIN-TO-LOWER-CHANCES-OF-COLLISION."); const parseResult1 = parseDomain(d1), parseResult2 = parseDomain(d2); - if ( - parseResult1.type != ParseResultType.Invalid && - parseResult2.type != ParseResultType.Invalid - ) { - if ( - parseResult1.type == ParseResultType.Ip && - parseResult2.type == ParseResultType.Ip - ) { + if (parseResult1.type != ParseResultType.Invalid && parseResult2.type != ParseResultType.Invalid) { + if (parseResult1.type == ParseResultType.Ip && parseResult2.type == ParseResultType.Ip) { return parseResult1.hostname == parseResult2.hostname ? true : false; - } else if ( - parseResult1.type == ParseResultType.Listed && - parseResult2.type == ParseResultType.Listed - ) { - if ( - parseResult1.subDomains[0] == - "WILDCARD-LOL-EXTRA-LONG-SUBDOMAIN-TO-LOWER-CHANCES-OF-COLLISION" - ) { + } else if (parseResult1.type == ParseResultType.Listed && parseResult2.type == ParseResultType.Listed) { + if (parseResult1.subDomains[0] == "WILDCARD-LOL-EXTRA-LONG-SUBDOMAIN-TO-LOWER-CHANCES-OF-COLLISION") { // wildcard - const domainPlusTld1 = - parseResult1.domain + - ("." + parseResult1.topLevelDomains.join(".")); - const domainPlusTld2 = - parseResult2.domain + - ("." + parseResult2.topLevelDomains.join(".")); + const domainPlusTld1 = parseResult1.domain + ("." + parseResult1.topLevelDomains.join(".")); + const domainPlusTld2 = parseResult2.domain + ("." + parseResult2.topLevelDomains.join(".")); return domainPlusTld1 == domainPlusTld2 ? true : false; } else { // no wildcard return d1 == d2 ? true : false; } - } else if ( - parseResult1.type == ParseResultType.NotListed && - parseResult2.type == ParseResultType.NotListed - ) { - if ( - parseResult1.labels[0] == - "WILDCARD-LOL-EXTRA-LONG-SUBDOMAIN-TO-LOWER-CHANCES-OF-COLLISION" - ) { + } else if (parseResult1.type == ParseResultType.NotListed && parseResult2.type == ParseResultType.NotListed) { + if (parseResult1.labels[0] == "WILDCARD-LOL-EXTRA-LONG-SUBDOMAIN-TO-LOWER-CHANCES-OF-COLLISION") { // wildcard const domainPlusTld1 = parseResult1.labels.slice(2).join("."); const domainPlusTld2 = parseResult1.labels.slice(2).join("."); @@ -163,15 +118,8 @@ export namespace Util { // no wildcard return d1 == d2 ? true : false; } - } else if ( - parseResult1.type == ParseResultType.Reserved && - parseResult2.type == ParseResultType.Reserved - ) { - if ( - parseResult1.hostname == "" && - parseResult1.hostname === parseResult2.hostname - ) - return true; + } else if (parseResult1.type == ParseResultType.Reserved && parseResult2.type == ParseResultType.Reserved) { + if (parseResult1.hostname == "" && parseResult1.hostname === parseResult2.hostname) return true; else { // uncertain, fallback to exact hostname matching return d1 == d2 ? true : false; @@ -229,10 +177,7 @@ export namespace Util { flags: number; }; - export function generatePositionPacket( - currentPos: PlayerPosition, - newPos: PositionPacket - ): PositionPacket { + export function generatePositionPacket(currentPos: PlayerPosition, newPos: PositionPacket): PositionPacket { const DEFAULT_RELATIVITY = 0x01; // relative to X-axis const newPosPacket = { x: newPos.x - currentPos.x * 2, @@ -244,4 +189,8 @@ export namespace Util { }; return newPosPacket; } + + export type Handlable = { + handled: boolean; + }; } diff --git a/src/proxy/pluginLoader/PluginManager.ts b/src/proxy/pluginLoader/PluginManager.ts index 2ae88af..28162e8 100644 --- a/src/proxy/pluginLoader/PluginManager.ts +++ b/src/proxy/pluginLoader/PluginManager.ts @@ -19,10 +19,7 @@ import { EaglerSkins } from "../skins/EaglerSkins.js"; import { BungeeUtil } from "../BungeeUtil.js"; export class PluginManager extends EventEmitter { - public plugins: Map< - string, - { exports: any; metadata: PluginLoaderTypes.PluginMetadataPathed } - >; + public plugins: Map; public proxy: Proxy; public Logger: typeof Logger = Logger; @@ -59,179 +56,67 @@ export class PluginManager extends EventEmitter { } pluginsString = pluginsString.substring(0, pluginsString.length - 1); this._logger.info(`Found ${pluginMeta.size} plugin(s): ${pluginsString}`); - if(pluginMeta.size !== 0){ + if (pluginMeta.size !== 0) { this._logger.info(`Loading ${pluginMeta.size} plugin(s)...`); - const successLoadCount = await this._loadPlugins( - pluginMeta, - this._getLoadOrder(pluginMeta) - ); + const successLoadCount = await this._loadPlugins(pluginMeta, this._getLoadOrder(pluginMeta)); this._logger.info(`Successfully loaded ${successLoadCount} plugin(s).`); } this.emit("pluginsFinishLoading", this); } - private async _findPlugins( - dir: string - ): Promise> { + private async _findPlugins(dir: string): Promise> { const ret: Map = new Map(); - const lsRes = (await Promise.all( - (await fs.readdir(dir)) - .filter((ent) => !ent.endsWith(".disabled")) - .map(async (res) => [ - pathUtil.join(dir, res), - await fs.stat(pathUtil.join(dir, res)), - ]) - )) as [string, Stats][]; + const lsRes = (await Promise.all((await fs.readdir(dir)).filter((ent) => !ent.endsWith(".disabled")).map(async (res) => [pathUtil.join(dir, res), await fs.stat(pathUtil.join(dir, res))]))) as [string, Stats][]; for (const [path, details] of lsRes) { if (details.isFile()) { if (path.endsWith(".jar")) { this._logger.warn(`Non-EaglerProxy plugin found! (${path})`); - this._logger.warn( - `BungeeCord plugins are NOT supported! Only custom EaglerProxy plugins are allowed.` - ); + this._logger.warn(`BungeeCord plugins are NOT supported! Only custom EaglerProxy plugins are allowed.`); } else if (path.endsWith(".zip")) { this._logger.warn(`.zip file found in plugin directory! (${path})`); - this._logger.warn( - `A .zip file was found in the plugins directory! Perhaps you forgot to unzip it?` - ); - } else - this._logger.debug(`Skipping file found in plugin folder: ${path}`); + this._logger.warn(`A .zip file was found in the plugins directory! Perhaps you forgot to unzip it?`); + } else this._logger.debug(`Skipping file found in plugin folder: ${path}`); } else { - const metadataPath = pathUtil.resolve( - pathUtil.join(path, "metadata.json") - ); + const metadataPath = pathUtil.resolve(pathUtil.join(path, "metadata.json")); let metadata: PluginLoaderTypes.PluginMetadata; try { const file = await fs.readFile(metadataPath); metadata = JSON.parse(file.toString()); // do some type checking - if (typeof metadata.name != "string") - throw new TypeError( - ".name is either null or not of a string type!" - ); - if (typeof metadata.id != "string") - throw new TypeError( - ".id is either null or not of a string type!" - ); - if (/ /gm.test(metadata.id)) - throw new Error(`.id contains whitespace!`); - if (!semver.valid(metadata.version)) - throw new Error( - ".version is either null, not a string, or is not a valid SemVer!" - ); - if (typeof metadata.entry_point != "string") - throw new TypeError( - ".entry_point is either null or not a string!" - ); - if (!metadata.entry_point.endsWith(".js")) - throw new Error( - `.entry_point (${metadata.entry_point}) references a non-JavaScript file!` - ); - if ( - !(await Util.fsExists(pathUtil.resolve(path, metadata.entry_point))) - ) - throw new Error( - `.entry_point (${metadata.entry_point}) references a non-existent file!` - ); - if (metadata.requirements instanceof Array == false) - throw new TypeError( - ".requirements is either null or not an array!" - ); + if (typeof metadata.name != "string") throw new TypeError(".name is either null or not of a string type!"); + if (typeof metadata.id != "string") throw new TypeError(".id is either null or not of a string type!"); + if (/ /gm.test(metadata.id)) throw new Error(`.id contains whitespace!`); + if (!semver.valid(metadata.version)) throw new Error(".version is either null, not a string, or is not a valid SemVer!"); + if (typeof metadata.entry_point != "string") throw new TypeError(".entry_point is either null or not a string!"); + if (!metadata.entry_point.endsWith(".js")) throw new Error(`.entry_point (${metadata.entry_point}) references a non-JavaScript file!`); + if (!(await Util.fsExists(pathUtil.resolve(path, metadata.entry_point)))) throw new Error(`.entry_point (${metadata.entry_point}) references a non-existent file!`); + if (metadata.requirements instanceof Array == false) throw new TypeError(".requirements is either null or not an array!"); for (const requirement of metadata.requirements as PluginLoaderTypes.PluginMetadata["requirements"]) { - if (typeof requirement != "object" || requirement == null) - throw new TypeError( - `.requirements[${( - metadata.requirements as any - ).indexOf(requirement)}] is either null or not an object!` - ); - if (typeof requirement.id != "string") - throw new TypeError( - `.requirements[${( - metadata.requirements as any - ).indexOf(requirement)}].id is either null or not a string!` - ); - if (/ /gm.test(requirement.id)) - throw new TypeError( - `.requirements[${( - metadata.requirements as any - ).indexOf(requirement)}].id contains whitespace!` - ); - if ( - semver.validRange(requirement.version) == null && - requirement.version != "any" - ) - throw new TypeError( - `.requirements[${( - metadata.requirements as any - ).indexOf( - requirement - )}].version is either null or not a valid SemVer!` - ); + if (typeof requirement != "object" || requirement == null) throw new TypeError(`.requirements[${(metadata.requirements as any).indexOf(requirement)}] is either null or not an object!`); + if (typeof requirement.id != "string") throw new TypeError(`.requirements[${(metadata.requirements as any).indexOf(requirement)}].id is either null or not a string!`); + if (/ /gm.test(requirement.id)) throw new TypeError(`.requirements[${(metadata.requirements as any).indexOf(requirement)}].id contains whitespace!`); + if (semver.validRange(requirement.version) == null && requirement.version != "any") + throw new TypeError(`.requirements[${(metadata.requirements as any).indexOf(requirement)}].version is either null or not a valid SemVer!`); } - if (metadata.load_after instanceof Array == false) - throw new TypeError( - ".load_after is either null or not an array!" - ); + if (metadata.load_after instanceof Array == false) throw new TypeError(".load_after is either null or not an array!"); for (const loadReq of metadata.load_after as string[]) { - if (typeof loadReq != "string") - throw new TypeError( - `.load_after[${(metadata.load_after as any).indexOf( - loadReq - )}] is either null, or not a valid ID!` - ); - if (/ /gm.test(loadReq)) - throw new TypeError( - `.load_after[${(metadata.load_after as any).indexOf( - loadReq - )}] contains whitespace!` - ); + if (typeof loadReq != "string") throw new TypeError(`.load_after[${(metadata.load_after as any).indexOf(loadReq)}] is either null, or not a valid ID!`); + if (/ /gm.test(loadReq)) throw new TypeError(`.load_after[${(metadata.load_after as any).indexOf(loadReq)}] contains whitespace!`); } - if (metadata.incompatibilities instanceof Array == false) - throw new TypeError( - ".incompatibilities is either null or not an array!" - ); + if (metadata.incompatibilities instanceof Array == false) throw new TypeError(".incompatibilities is either null or not an array!"); for (const incompatibility of metadata.incompatibilities as PluginLoaderTypes.PluginMetadata["requirements"]) { - if (typeof incompatibility != "object" || incompatibility == null) - throw new TypeError( - `.incompatibilities[${( - metadata.load_after as any - ).indexOf(incompatibility)}] is either null or not an object!` - ); - if (typeof incompatibility.id != "string") - throw new TypeError( - `.incompatibilities[${( - metadata.load_after as any - ).indexOf(incompatibility)}].id is either null or not a string!` - ); - if (/ /gm.test(incompatibility.id)) - throw new TypeError( - `.incompatibilities[${( - metadata.load_after as any - ).indexOf(incompatibility)}].id contains whitespace!` - ); - if (semver.validRange(incompatibility.version) == null) - throw new TypeError( - `.incompatibilities[${( - metadata.load_after as any - ).indexOf( - incompatibility - )}].version is either null or not a valid SemVer!` - ); + if (typeof incompatibility != "object" || incompatibility == null) throw new TypeError(`.incompatibilities[${(metadata.load_after as any).indexOf(incompatibility)}] is either null or not an object!`); + if (typeof incompatibility.id != "string") throw new TypeError(`.incompatibilities[${(metadata.load_after as any).indexOf(incompatibility)}].id is either null or not a string!`); + if (/ /gm.test(incompatibility.id)) throw new TypeError(`.incompatibilities[${(metadata.load_after as any).indexOf(incompatibility)}].id contains whitespace!`); + if (semver.validRange(incompatibility.version) == null) throw new TypeError(`.incompatibilities[${(metadata.load_after as any).indexOf(incompatibility)}].version is either null or not a valid SemVer!`); } - if (ret.has(metadata.id)) - throw new Error( - `Duplicate plugin ID detected: ${metadata.id}. Are there duplicate plugins in the plugin folder?` - ); + if (ret.has(metadata.id)) throw new Error(`Duplicate plugin ID detected: ${metadata.id}. Are there duplicate plugins in the plugin folder?`); ret.set(metadata.id, { path: pathUtil.resolve(path), ...metadata, }); } catch (err) { - this._logger.warn( - `Failed to load plugin metadata file at ${metadataPath}: ${ - err.stack ?? err - }` - ); + this._logger.warn(`Failed to load plugin metadata file at ${metadataPath}: ${err.stack ?? err}`); this._logger.warn("This plugin will skip loading due to an error."); } } @@ -239,27 +124,16 @@ export class PluginManager extends EventEmitter { return ret; } - private async _validatePluginList( - plugins: Map - ) { + private async _validatePluginList(plugins: Map) { for (const [id, plugin] of plugins) { for (const req of plugin.requirements) { - if ( - !plugins.has(req.id) && - req.id != "eaglerproxy" && - !req.id.startsWith("module:") - ) { - this._logger.fatal( - `Error whilst loading plugins: Plugin ${plugin.name}@${plugin.version} requires plugin ${req.id}@${req.version}, but it is not found!` - ); + if (!plugins.has(req.id) && req.id != "eaglerproxy" && !req.id.startsWith("module:")) { + this._logger.fatal(`Error whilst loading plugins: Plugin ${plugin.name}@${plugin.version} requires plugin ${req.id}@${req.version}, but it is not found!`); this._logger.fatal("Loading has halted due to missing dependencies."); process.exit(1); } if (req.id == "eaglerproxy") { - if ( - !semver.satisfies(PROXY_VERSION, req.version) && - req.version != "any" - ) { + if (!semver.satisfies(PROXY_VERSION, req.version) && req.version != "any") { this._logger.fatal( `Error whilst loading plugins: Plugin ${plugin.name}@${plugin.version} requires a proxy version that satisfies the SemVer requirement ${req.version}, but the proxy version is ${PROXY_VERSION} and does not satisfy the SemVer requirement!` ); @@ -272,32 +146,19 @@ export class PluginManager extends EventEmitter { await import(moduleName); } catch (err) { if (err.code == "ERR_MODULE_NOT_FOUND") { + this._logger.fatal(`Plugin ${plugin.name}@${plugin.version} requires NPM module ${moduleName}${req.version == "any" ? "" : `@${req.version}`} to be installed, but it is not found!`); this._logger.fatal( - `Plugin ${plugin.name}@${ - plugin.version - } requires NPM module ${moduleName}${ - req.version == "any" ? "" : `@${req.version}` - } to be installed, but it is not found!` - ); - this._logger.fatal( - `Please install this missing package by running "npm install ${moduleName}${ - req.version == "any" ? "" : `@${req.version}` - }". If you're using yarn, run "yarn add ${moduleName}${ + `Please install this missing package by running "npm install ${moduleName}${req.version == "any" ? "" : `@${req.version}`}". If you're using yarn, run "yarn add ${moduleName}${ req.version == "any" ? "" : `@${req.version}` }" instead.` ); - this._logger.fatal( - "Loading has halted due to dependency issues." - ); + this._logger.fatal("Loading has halted due to dependency issues."); process.exit(1); } } } else { let dep = plugins.get(req.id); - if ( - !semver.satisfies(dep.version, req.version) && - req.version != "any" - ) { + if (!semver.satisfies(dep.version, req.version) && req.version != "any") { this._logger.fatal( `Error whilst loading plugins: Plugin ${plugin.name}@${plugin.version} requires a version of plugin ${dep.name} that satisfies the SemVer requirement ${req.version}, but the plugin ${dep.name}'s version is ${dep.version} and does not satisfy the SemVer requirement!` ); @@ -313,19 +174,13 @@ export class PluginManager extends EventEmitter { this._logger.fatal( `Error whilst loading plugins: Plugin incompatibility found! Plugin ${plugin.name}@${plugin.version} is incompatible with ${plugin_incomp.name}@${plugin_incomp.version} as it satisfies the SemVer requirement of ${incomp.version}!` ); - this._logger.fatal( - "Loading has halted due to plugin incompatibility issues." - ); + this._logger.fatal("Loading has halted due to plugin incompatibility issues."); process.exit(1); } } else if (incomp.id == "eaglerproxy") { if (semver.satisfies(PROXY_VERSION, incomp.version)) { - this._logger.fatal( - `Error whilst loading plugins: Plugin ${plugin.name}@${plugin.version} is incompatible with proxy version ${PROXY_VERSION} as it satisfies the SemVer requirement of ${incomp.version}!` - ); - this._logger.fatal( - "Loading has halted due to plugin incompatibility issues." - ); + this._logger.fatal(`Error whilst loading plugins: Plugin ${plugin.name}@${plugin.version} is incompatible with proxy version ${PROXY_VERSION} as it satisfies the SemVer requirement of ${incomp.version}!`); + this._logger.fatal("Loading has halted due to plugin incompatibility issues."); process.exit(1); } } @@ -333,9 +188,7 @@ export class PluginManager extends EventEmitter { } } - private _getLoadOrder( - plugins: Map - ): PluginLoaderTypes.PluginLoadOrder { + private _getLoadOrder(plugins: Map): PluginLoaderTypes.PluginLoadOrder { let order = [], lastPlugin: any; plugins.forEach((v) => order.push(v.id)); @@ -362,21 +215,12 @@ export class PluginManager extends EventEmitter { return order; } - private async _loadPlugins( - plugins: Map, - order: PluginLoaderTypes.PluginLoadOrder - ): Promise { + private async _loadPlugins(plugins: Map, order: PluginLoaderTypes.PluginLoadOrder): Promise { let successCount = 0; for (const id of order) { let pluginMeta = plugins.get(id); try { - const imp = await import( - process.platform == "win32" - ? pathToFileURL( - pathUtil.join(pluginMeta.path, pluginMeta.entry_point) - ).toString() - : pathUtil.join(pluginMeta.path, pluginMeta.entry_point) - ); + const imp = await import(process.platform == "win32" ? pathToFileURL(pathUtil.join(pluginMeta.path, pluginMeta.entry_point)).toString() : pathUtil.join(pluginMeta.path, pluginMeta.entry_point)); this.plugins.set(pluginMeta.id, { exports: imp, metadata: pluginMeta, @@ -384,11 +228,7 @@ export class PluginManager extends EventEmitter { successCount++; this.emit("pluginLoad", pluginMeta.id, imp); } catch (err) { - this._logger.warn( - `Failed to load plugin entry point for plugin (${ - pluginMeta.name - }) at ${pluginMeta.path}: ${err.stack ?? err}` - ); + this._logger.warn(`Failed to load plugin entry point for plugin (${pluginMeta.name}) at ${pluginMeta.path}: ${err.stack ?? err}`); this._logger.warn("This plugin will skip loading due to an error."); } return successCount; @@ -403,18 +243,9 @@ interface PluginManagerEvents { } export declare interface PluginManager { - on( - event: U, - listener: PluginManagerEvents[U] - ): this; + on(event: U, listener: PluginManagerEvents[U]): this; - emit( - event: U, - ...args: Parameters - ): boolean; + emit(event: U, ...args: Parameters): boolean; - once( - event: U, - listener: PluginManagerEvents[U] - ): this; + once(event: U, listener: PluginManagerEvents[U]): this; }