mirror of
https://github.com/Hessenuk/DiscordTickets.git
synced 2024-11-05 04:13:08 +02:00
Improve plugins, make settings server separate
This commit is contained in:
parent
b4135169e7
commit
d5463a9bc3
@ -32,21 +32,16 @@
|
||||
"boxen": "^5.0.0",
|
||||
"discord.js": "^12.5.1",
|
||||
"dotenv": "^8.2.0",
|
||||
"fastify": "^3.12.0",
|
||||
"fastify-secure-session": "^2.3.1",
|
||||
"fastify-static": "^4.0.1",
|
||||
"form-data": "^4.0.0",
|
||||
"fs-extra": "^9.1.0",
|
||||
"leeks.js": "^0.0.9",
|
||||
"leekslazylogger-fastify": "^0.1.0",
|
||||
"node-fetch": "^2.6.1",
|
||||
"semver": "^7.3.4",
|
||||
"sequelize": "^6.5.0",
|
||||
"socket.io": "^3.1.2",
|
||||
"terminal-link": "^2.1.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"eslint": "^7.20.0",
|
||||
"eslint": "^7.21.0",
|
||||
"jsdoc": "^3.6.6",
|
||||
"mariadb": "^2.5.2",
|
||||
"mysql2": "^2.2.5",
|
||||
|
569
pnpm-lock.yaml
569
pnpm-lock.yaml
@ -3,20 +3,15 @@ dependencies:
|
||||
boxen: 5.0.0
|
||||
discord.js: 12.5.1
|
||||
dotenv: 8.2.0
|
||||
fastify: 3.12.0
|
||||
fastify-secure-session: 2.3.1
|
||||
fastify-static: 4.0.1
|
||||
form-data: 4.0.0
|
||||
fs-extra: 9.1.0
|
||||
leeks.js: 0.0.9
|
||||
leekslazylogger-fastify: 0.1.0
|
||||
node-fetch: 2.6.1
|
||||
semver: 7.3.4
|
||||
sequelize: 6.5.0_fb66e8c649bde1be622cc06164c9e22d
|
||||
socket.io: 3.1.2
|
||||
terminal-link: 2.1.1
|
||||
devDependencies:
|
||||
eslint: 7.20.0
|
||||
eslint: 7.21.0
|
||||
jsdoc: 3.6.6
|
||||
mariadb: 2.5.2
|
||||
mysql2: 2.2.5
|
||||
@ -75,7 +70,7 @@ packages:
|
||||
integrity: sha512-2twuzsXHdKMzEFI2+Sr82o6yS4ppNGZceYwil8PFo+rJxOZIoBm9e0//YC+dKilV/3F+6K/HuW8LdskDrJEQWA==
|
||||
/@babel/code-frame/7.12.11:
|
||||
dependencies:
|
||||
'@babel/highlight': 7.12.13
|
||||
'@babel/highlight': 7.13.8
|
||||
dev: true
|
||||
resolution:
|
||||
integrity: sha512-Zt1yodBx1UcyiePMSkWnU4hPqhwq7hGi2nFL1LeA3EUl+q2LQx16MISgJ0+z7dnmgvP9QtIleuETGOiOH1RcIw==
|
||||
@ -83,14 +78,14 @@ packages:
|
||||
dev: true
|
||||
resolution:
|
||||
integrity: sha512-np/lG3uARFybkoHokJUmf1QfEvRVCPbmQeUQpKow5cQ3xWrV9i3rUHodKDJPQfTVX61qKi+UdYk8kik84n7XOw==
|
||||
/@babel/highlight/7.12.13:
|
||||
/@babel/highlight/7.13.8:
|
||||
dependencies:
|
||||
'@babel/helper-validator-identifier': 7.12.11
|
||||
chalk: 2.4.2
|
||||
js-tokens: 4.0.0
|
||||
dev: true
|
||||
resolution:
|
||||
integrity: sha512-kocDQvIbgMKlWxXe9fof3TQ+gkIPOUSEYhJjqUjvKMez3krV7vbzYCDq39Oj11UAVK7JqPVGQPlgE85dPNlQww==
|
||||
integrity: sha512-4vrIhfJyfNf+lCtXC2ck1rKSzDwciqF7IWFhXXrSOUC2O5DrVp+w4c6ed4AllTxhTkUP5x2tYj41VaxdVMMRDw==
|
||||
/@babel/parser/7.13.4:
|
||||
dev: true
|
||||
engines:
|
||||
@ -124,7 +119,7 @@ packages:
|
||||
dev: false
|
||||
resolution:
|
||||
integrity: sha512-RXm2+aRBAa2cqp/UEPtlO1AkEJlv5/bANvuPNKA4MSp/UNRKgsJ2tRQt7YintINtgp1ZmaJMH8pxcaLUzwfKUw==
|
||||
/@eslint/eslintrc/0.3.0:
|
||||
/@eslint/eslintrc/0.4.0:
|
||||
dependencies:
|
||||
ajv: 6.12.6
|
||||
debug: 4.3.1
|
||||
@ -133,27 +128,13 @@ packages:
|
||||
ignore: 4.0.6
|
||||
import-fresh: 3.3.0
|
||||
js-yaml: 3.14.1
|
||||
lodash: 4.17.20
|
||||
minimatch: 3.0.4
|
||||
strip-json-comments: 3.1.1
|
||||
dev: true
|
||||
engines:
|
||||
node: ^10.12.0 || >=12.0.0
|
||||
resolution:
|
||||
integrity: sha512-1JTKgrOKAHVivSvOYw+sJOunkBjUOvjqWk1DPja7ZFhIS2mX/4EgTT8M7eTK9jrKhL/FvXXEbQwIs3pg1xp3dg==
|
||||
/@fastify/forwarded/1.0.0:
|
||||
dev: false
|
||||
engines:
|
||||
node: '>= 10'
|
||||
resolution:
|
||||
integrity: sha512-VoO+6WD0aRz8bwgJZ8pkkxjq7o/782cQ1j945HWg0obZMgIadYW3Pew0+an+k1QL7IPZHM3db5WF6OP6x4ymMA==
|
||||
/@fastify/proxy-addr/3.0.0:
|
||||
dependencies:
|
||||
'@fastify/forwarded': 1.0.0
|
||||
ipaddr.js: 2.0.0
|
||||
dev: false
|
||||
resolution:
|
||||
integrity: sha512-ty7wnUd/GeSqKTC2Jozsl5xGbnxUnEFC0On2/zPv/8ixywipQmVZwuWvNGnBoitJ2wixwVqofwXNua8j6Y62lQ==
|
||||
integrity: sha512-2ZPCc+uNbjV5ERJr+aKSPRwZgKd2z11x0EgLvb1PURmUrn9QNRXFqje0Ldq454PfAVyaJYyrDvvIKSFP4NnBog==
|
||||
/@js-joda/core/3.2.0:
|
||||
dev: true
|
||||
resolution:
|
||||
@ -172,18 +153,6 @@ packages:
|
||||
node: '>=6'
|
||||
resolution:
|
||||
integrity: sha512-XIB2XbzHTN6ieIjfIMV9hlVcfPU26s2vafYWQcZHWXHOxiaRZYEDKEwdl129Zyg50+foYV2jCgtrqSA6qNuNSA==
|
||||
/@types/component-emitter/1.2.10:
|
||||
dev: false
|
||||
resolution:
|
||||
integrity: sha512-bsjleuRKWmGqajMerkzox19aGbscQX5rmmvvXl3wlIp5gMG1HgkiwPxsN5p070fBDKTNSPgojVbuY1+HWMbFhg==
|
||||
/@types/cookie/0.4.0:
|
||||
dev: false
|
||||
resolution:
|
||||
integrity: sha512-y7mImlc/rNkvCRmg8gC3/lj87S7pTUIJ6QGjwHR9WQJcFs+ZMTOaoPrkdFA/YdbuqVEmEbb5RdhVxMkAcgOnpg==
|
||||
/@types/cors/2.8.10:
|
||||
dev: false
|
||||
resolution:
|
||||
integrity: sha512-C7srjHiVG3Ey1nR6d511dtDkCEjxuN9W1HWAEjGq8kpcwmNM6JJkpC0xvabM7BXTG2wDq8Eu33iH9aQKa7IvLQ==
|
||||
/@types/geojson/7946.0.7:
|
||||
dev: true
|
||||
resolution:
|
||||
@ -198,10 +167,6 @@ packages:
|
||||
/@types/node/14.14.28:
|
||||
resolution:
|
||||
integrity: sha512-lg55ArB+ZiHHbBBttLpzD07akz0QPrZgUODNakeC09i62dnrywr9mFErHuaPlB6I7z+sEbK+IYmplahvplCj2g==
|
||||
/@types/node/14.14.31:
|
||||
dev: false
|
||||
resolution:
|
||||
integrity: sha512-vFHy/ezP5qI0rFgJ7aQnjDXwAMrG0KqqIH7tQG5PPv3BWBayOPIQNBjVc/P6hhdZfMx51REc6tfDNXHUio893g==
|
||||
/@types/node/8.10.66:
|
||||
dev: true
|
||||
resolution:
|
||||
@ -222,19 +187,6 @@ packages:
|
||||
node: '>=6.5'
|
||||
resolution:
|
||||
integrity: sha512-h8lQ8tacZYnR3vNQTgibj+tODHI5/+l06Au2Pcriv/Gmet0eaj4TwWH41sO9wnHDiQsEj19q0drzdWdeAHtweg==
|
||||
/abstract-logging/2.0.1:
|
||||
dev: false
|
||||
resolution:
|
||||
integrity: sha512-2BjRTZxTPvheOvGbBslFSYOUkr+SjPtOnrLP33f+VIWLzezQpZcqVg7ja3L4dBXmzzgwT+a029jRx5PCi3JuiA==
|
||||
/accepts/1.3.7:
|
||||
dependencies:
|
||||
mime-types: 2.1.29
|
||||
negotiator: 0.6.2
|
||||
dev: false
|
||||
engines:
|
||||
node: '>= 0.6'
|
||||
resolution:
|
||||
integrity: sha512-Il80Qs2WjYlJIBNzNkK6KYqlVMTbZLXgHx2oT0pU/fjRHyEp+PEfEPY0R3WCwAGVOtauxh1hOxNgIf5bv7dQpA==
|
||||
/acorn-jsx/5.3.1_acorn@7.4.1:
|
||||
dependencies:
|
||||
acorn: 7.4.1
|
||||
@ -290,7 +242,7 @@ packages:
|
||||
uri-js: 4.4.1
|
||||
resolution:
|
||||
integrity: sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==
|
||||
/ajv/7.1.0:
|
||||
/ajv/7.1.1:
|
||||
dependencies:
|
||||
fast-deep-equal: 3.1.3
|
||||
json-schema-traverse: 1.0.0
|
||||
@ -298,7 +250,7 @@ packages:
|
||||
uri-js: 4.4.1
|
||||
dev: true
|
||||
resolution:
|
||||
integrity: sha512-svS9uILze/cXbH0z2myCK2Brqprx/+JJYK5pHicT/GQiBfzzhUVAIT6MwqJg8y4xV/zoGsUeuPuwtoiKSGE15g==
|
||||
integrity: sha512-ga/aqDYnUy/o7vbsRTFhhTsNeXiYb5JWDIcRIeZfwRNCefwjNTVYCGdGSUrEmiu3yDK3vFvNbgJxvrQW4JXrYQ==
|
||||
/ansi-align/3.0.0:
|
||||
dependencies:
|
||||
string-width: 3.1.0
|
||||
@ -368,10 +320,6 @@ packages:
|
||||
optional: true
|
||||
resolution:
|
||||
integrity: sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw==
|
||||
/archy/1.0.0:
|
||||
dev: false
|
||||
resolution:
|
||||
integrity: sha1-+cjBN1fMHde8N5rHeyxipcKGjEA=
|
||||
/are-we-there-yet/1.1.5:
|
||||
dependencies:
|
||||
delegates: 1.0.0
|
||||
@ -421,21 +369,6 @@ packages:
|
||||
node: '>= 4.0.0'
|
||||
resolution:
|
||||
integrity: sha512-+q/t7Ekv1EDY2l6Gda6LLiX14rU9TV20Wa3ofeQmwPFZbOMo9DXrLbOjFaaclkXKWidIaopwAObQDqwWtGUjqg==
|
||||
/atomic-sleep/1.0.0:
|
||||
dev: false
|
||||
engines:
|
||||
node: '>=8.0.0'
|
||||
resolution:
|
||||
integrity: sha512-kNOjDqAh7px0XWNI+4QbzoiR/nTkHAWNud2uvnJquD1/x5a7EQZMJT0AczqK0Qn67oY/TTQ1LbUKajZpp3I9tQ==
|
||||
/avvio/7.2.1:
|
||||
dependencies:
|
||||
archy: 1.0.0
|
||||
debug: 4.3.1
|
||||
fastq: 1.11.0
|
||||
queue-microtask: 1.2.2
|
||||
dev: false
|
||||
resolution:
|
||||
integrity: sha512-b+gox68dqD6c3S3t+bZBKN6rYbVWdwpN12sHQLFTiacDT2rcq7fm07Ww+IKt/AvAkyCIe1f5ArP1bC/vAlx97A==
|
||||
/aws-sign2/0.7.0:
|
||||
resolution:
|
||||
integrity: sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg=
|
||||
@ -451,22 +384,10 @@ packages:
|
||||
/balanced-match/1.0.0:
|
||||
resolution:
|
||||
integrity: sha1-ibTRmasr7kneFk6gK4nORi1xt2c=
|
||||
/base64-arraybuffer/0.1.4:
|
||||
dev: false
|
||||
engines:
|
||||
node: '>= 0.6.0'
|
||||
resolution:
|
||||
integrity: sha1-mBjHngWbE1X5fgQooBfIOOkLqBI=
|
||||
/base64-js/1.5.1:
|
||||
dev: true
|
||||
resolution:
|
||||
integrity: sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==
|
||||
/base64id/2.0.0:
|
||||
dev: false
|
||||
engines:
|
||||
node: ^4.5.0 || >= 5.9
|
||||
resolution:
|
||||
integrity: sha512-lGe34o6EHj9y3Kts9R4ZYs/Gr+6N7MCaMlIFA3F1R2O5/m7K06AxfSeO5530PEERE6/WyEg3lsuyw4GHlPZHog==
|
||||
/bcrypt-pbkdf/1.0.2:
|
||||
dependencies:
|
||||
tweetnacl: 0.14.5
|
||||
@ -700,10 +621,6 @@ packages:
|
||||
node: '>= 0.8'
|
||||
resolution:
|
||||
integrity: sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==
|
||||
/component-emitter/1.3.0:
|
||||
dev: false
|
||||
resolution:
|
||||
integrity: sha512-Rd3se6QB+sO1TwqZjscQrurpEPIfO0/yYnSin6Q/rD3mOutHvUrCAhJub3r90uNb+SESBuE0QYoB90YdfatsRg==
|
||||
/concat-map/0.0.1:
|
||||
resolution:
|
||||
integrity: sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=
|
||||
@ -725,38 +642,9 @@ packages:
|
||||
optional: true
|
||||
resolution:
|
||||
integrity: sha1-PXz0Rk22RG6mRL9LOVB/mFEAjo4=
|
||||
/content-disposition/0.5.3:
|
||||
dependencies:
|
||||
safe-buffer: 5.1.2
|
||||
dev: false
|
||||
engines:
|
||||
node: '>= 0.6'
|
||||
resolution:
|
||||
integrity: sha512-ExO0774ikEObIAEV9kDo50o+79VCUdEB6n6lzKgGwupcVeRlhrj3qGAfwq8G6uBJjkqLrhT0qEYFcWng8z1z0g==
|
||||
/cookie-signature/1.1.0:
|
||||
dev: false
|
||||
engines:
|
||||
node: '>=6.6.0'
|
||||
resolution:
|
||||
integrity: sha512-Alvs19Vgq07eunykd3Xy2jF0/qSNv2u7KDbAek9H5liV1UMijbqFs5cycZvv5dVsvseT/U4H8/7/w8Koh35C4A==
|
||||
/cookie/0.4.1:
|
||||
dev: false
|
||||
engines:
|
||||
node: '>= 0.6'
|
||||
resolution:
|
||||
integrity: sha512-ZwrFkGJxUR3EIoXtO+yVE69Eb7KlixbaeAWfBQB9vVsNn/o+Yw69gBWSSDK825hQNdN+wF8zELf3dFNl/kxkUA==
|
||||
/core-util-is/1.0.2:
|
||||
resolution:
|
||||
integrity: sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=
|
||||
/cors/2.8.5:
|
||||
dependencies:
|
||||
object-assign: 4.1.1
|
||||
vary: 1.1.2
|
||||
dev: false
|
||||
engines:
|
||||
node: '>= 0.10'
|
||||
resolution:
|
||||
integrity: sha512-KIHbLJqu73RGr/hnbrO9uBeixNGuvSQjul/jdFvS/KFSIH1hWVd1ng7zOHx+YrEfInLG7q4n6GHQ9cDtxv/P6g==
|
||||
/cross-spawn/7.0.3:
|
||||
dependencies:
|
||||
path-key: 3.1.1
|
||||
@ -789,6 +677,7 @@ packages:
|
||||
/debug/2.6.9:
|
||||
dependencies:
|
||||
ms: 2.0.0
|
||||
dev: true
|
||||
resolution:
|
||||
integrity: sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==
|
||||
/debug/3.2.7:
|
||||
@ -825,12 +714,6 @@ packages:
|
||||
dev: true
|
||||
resolution:
|
||||
integrity: sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ=
|
||||
/deepmerge/4.2.2:
|
||||
dev: false
|
||||
engines:
|
||||
node: '>=0.10.0'
|
||||
resolution:
|
||||
integrity: sha512-FJ3UgI4gIl+PHZm53knsuSFpE+nESMr7M4v9QcgB7S63Kj/6WqMiFQJpBBYz1Pt+66bZpP3Q7Lye0Oo9MPKEdg==
|
||||
/defer-to-connect/1.1.3:
|
||||
dev: true
|
||||
resolution:
|
||||
@ -851,22 +734,12 @@ packages:
|
||||
node: '>=0.10'
|
||||
resolution:
|
||||
integrity: sha512-CYiCSgIF1p6EUByQPlGkKnP1M9g0ZV3qMIrqMqZqdwazygIA/YP2vrbcyl1h/WppKJTdl1F85cXIle+394iDAQ==
|
||||
/depd/1.1.2:
|
||||
dev: false
|
||||
engines:
|
||||
node: '>= 0.6'
|
||||
resolution:
|
||||
integrity: sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak=
|
||||
/depd/2.0.0:
|
||||
dev: true
|
||||
engines:
|
||||
node: '>= 0.8'
|
||||
resolution:
|
||||
integrity: sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==
|
||||
/destroy/1.0.4:
|
||||
dev: false
|
||||
resolution:
|
||||
integrity: sha1-l4hXRCxEdJ5CBmE+N5RiBYJqvYA=
|
||||
/detect-libc/1.0.3:
|
||||
dev: false
|
||||
engines:
|
||||
@ -942,40 +815,12 @@ packages:
|
||||
/emoji-regex/8.0.0:
|
||||
resolution:
|
||||
integrity: sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==
|
||||
/encodeurl/1.0.2:
|
||||
dev: false
|
||||
engines:
|
||||
node: '>= 0.8'
|
||||
resolution:
|
||||
integrity: sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k=
|
||||
/end-of-stream/1.4.4:
|
||||
dependencies:
|
||||
once: 1.4.0
|
||||
dev: true
|
||||
resolution:
|
||||
integrity: sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==
|
||||
/engine.io-parser/4.0.2:
|
||||
dependencies:
|
||||
base64-arraybuffer: 0.1.4
|
||||
dev: false
|
||||
engines:
|
||||
node: '>=8.0.0'
|
||||
resolution:
|
||||
integrity: sha512-sHfEQv6nmtJrq6TKuIz5kyEKH/qSdK56H/A+7DnAuUPWosnIZAS2NHNcPLmyjtY3cGS/MqJdZbUjW97JU72iYg==
|
||||
/engine.io/4.1.1:
|
||||
dependencies:
|
||||
accepts: 1.3.7
|
||||
base64id: 2.0.0
|
||||
cookie: 0.4.1
|
||||
cors: 2.8.5
|
||||
debug: 4.3.1
|
||||
engine.io-parser: 4.0.2
|
||||
ws: 7.4.3
|
||||
dev: false
|
||||
engines:
|
||||
node: '>=10.0.0'
|
||||
resolution:
|
||||
integrity: sha512-t2E9wLlssQjGw0nluF6aYyfX8LwYU8Jj0xct+pAhfWfv/YrBn6TSNtEYsgxHIfaMqfrLx07czcMg9bMN6di+3w==
|
||||
/enquirer/2.3.6:
|
||||
dependencies:
|
||||
ansi-colors: 4.1.1
|
||||
@ -994,10 +839,6 @@ packages:
|
||||
node: '>=8'
|
||||
resolution:
|
||||
integrity: sha512-8/uIhbG12Csjy2JEW7D9pHbreaVaS/OpN3ycnyvElTdwM5n6GY6W6e2IPemfvGZeUMqZ9A/3GqIZMgKnBhAw/Q==
|
||||
/escape-html/1.0.3:
|
||||
dev: false
|
||||
resolution:
|
||||
integrity: sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg=
|
||||
/escape-string-regexp/1.0.5:
|
||||
dev: true
|
||||
engines:
|
||||
@ -1039,10 +880,10 @@ packages:
|
||||
node: '>=10'
|
||||
resolution:
|
||||
integrity: sha512-QudtT6av5WXels9WjIM7qz1XD1cWGvX4gGXvp/zBn9nXG02D0utdU3Em2m/QjTnrsk6bBjmCygl3rmj118msQQ==
|
||||
/eslint/7.20.0:
|
||||
/eslint/7.21.0:
|
||||
dependencies:
|
||||
'@babel/code-frame': 7.12.11
|
||||
'@eslint/eslintrc': 0.3.0
|
||||
'@eslint/eslintrc': 0.4.0
|
||||
ajv: 6.12.6
|
||||
chalk: 4.1.0
|
||||
cross-spawn: 7.0.3
|
||||
@ -1055,7 +896,7 @@ packages:
|
||||
espree: 7.3.1
|
||||
esquery: 1.4.0
|
||||
esutils: 2.0.3
|
||||
file-entry-cache: 6.0.0
|
||||
file-entry-cache: 6.0.1
|
||||
functional-red-black-tree: 1.0.1
|
||||
glob-parent: 5.1.1
|
||||
globals: 12.4.0
|
||||
@ -1066,7 +907,7 @@ packages:
|
||||
js-yaml: 3.14.1
|
||||
json-stable-stringify-without-jsonify: 1.0.1
|
||||
levn: 0.4.1
|
||||
lodash: 4.17.20
|
||||
lodash: 4.17.21
|
||||
minimatch: 3.0.4
|
||||
natural-compare: 1.4.0
|
||||
optionator: 0.9.1
|
||||
@ -1083,7 +924,7 @@ packages:
|
||||
node: ^10.12.0 || >=12.0.0
|
||||
hasBin: true
|
||||
resolution:
|
||||
integrity: sha512-qGi0CTcOGP2OtCQBgWZlQjcTuP0XkIpYFj25XtRTQSHC+umNnp7UMshr2G8SLsRFYDdAPFeHOsiteadmMH02Yw==
|
||||
integrity: sha512-W2aJbXpMNofUp0ztQaF40fveSsJBjlSCSWpy//gzfTvwC+USs/nceBrKmlJOiM8r1bLwP2EuYkCqArn/6QTIgg==
|
||||
/espree/7.3.1:
|
||||
dependencies:
|
||||
acorn: 7.4.1
|
||||
@ -1135,12 +976,6 @@ packages:
|
||||
node: '>=0.10.0'
|
||||
resolution:
|
||||
integrity: sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==
|
||||
/etag/1.8.1:
|
||||
dev: false
|
||||
engines:
|
||||
node: '>= 0.6'
|
||||
resolution:
|
||||
integrity: sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc=
|
||||
/event-target-shim/5.0.1:
|
||||
engines:
|
||||
node: '>=6'
|
||||
@ -1154,116 +989,28 @@ packages:
|
||||
'0': node >=0.6.0
|
||||
resolution:
|
||||
integrity: sha1-lpGEQOMEGnpBT4xS48V06zw+HgU=
|
||||
/fast-decode-uri-component/1.0.1:
|
||||
dev: false
|
||||
resolution:
|
||||
integrity: sha512-WKgKWg5eUxvRZGwW8FvfbaH7AXSh2cL+3j5fMGzUMCxWBJ3dV3a7Wz8y2f/uQ0e3B6WmodD3oS54jTQ9HVTIIg==
|
||||
/fast-deep-equal/3.1.3:
|
||||
resolution:
|
||||
integrity: sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==
|
||||
/fast-json-stable-stringify/2.1.0:
|
||||
resolution:
|
||||
integrity: sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==
|
||||
/fast-json-stringify/2.4.2:
|
||||
dependencies:
|
||||
ajv: 6.12.6
|
||||
deepmerge: 4.2.2
|
||||
string-similarity: 4.0.4
|
||||
dev: false
|
||||
engines:
|
||||
node: '>= 10.0.0'
|
||||
resolution:
|
||||
integrity: sha512-hXNC8Hj5ZYf0PRt67JyLwrw72XOIUSOj8IYXk8w8kotBox02L08Dvz6c8IMpCUXof1H+dLlBz1aszGqP9xmrBw==
|
||||
/fast-levenshtein/2.0.6:
|
||||
dev: true
|
||||
resolution:
|
||||
integrity: sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=
|
||||
/fast-redact/3.0.0:
|
||||
dev: false
|
||||
engines:
|
||||
node: '>=6'
|
||||
resolution:
|
||||
integrity: sha512-a/S/Hp6aoIjx7EmugtzLqXmcNsyFszqbt6qQ99BdG61QjBZF6shNis0BYR6TsZOQ1twYc0FN2Xdhwwbv6+KD0w==
|
||||
/fast-safe-stringify/2.0.7:
|
||||
dev: false
|
||||
resolution:
|
||||
integrity: sha512-Utm6CdzT+6xsDk2m8S6uL8VHxNwI6Jub+e9NYTcAms28T84pTa25GJQV9j0CY0N1rM8hK4x6grpF2BQf+2qwVA==
|
||||
/fastify-cookie/5.1.0:
|
||||
dependencies:
|
||||
cookie: 0.4.1
|
||||
cookie-signature: 1.1.0
|
||||
fastify-plugin: 3.0.0
|
||||
dev: false
|
||||
resolution:
|
||||
integrity: sha512-AN5C/p7YVSgnW1D9fcUL10yRIN+9lcOtyps3h4/5ZsxwrHVgdNH5T77CbnIrzfAx6qz7K/8NYQCTE8cxZIJcJg==
|
||||
/fastify-error/0.3.0:
|
||||
dev: false
|
||||
resolution:
|
||||
integrity: sha512-Jm2LMTB5rsJqlS1+cmgqqM9tTs0UrlgYR7TvDT3ZgXsUI5ib1NjQlqZHf+tDK5tVPdFGwyq02wAoJtyYIRSiFA==
|
||||
/fastify-plugin/3.0.0:
|
||||
dev: false
|
||||
resolution:
|
||||
integrity: sha512-ZdCvKEEd92DNLps5n0v231Bha8bkz1DjnPP/aEz37rz/q42Z5JVLmgnqR4DYuNn3NXAO3IDCPyRvgvxtJ4Ym4w==
|
||||
/fastify-secure-session/2.3.1:
|
||||
dependencies:
|
||||
fastify-cookie: 5.1.0
|
||||
fastify-plugin: 3.0.0
|
||||
sodium-native: 3.2.1
|
||||
dev: false
|
||||
hasBin: true
|
||||
resolution:
|
||||
integrity: sha512-6XsatyRSiX0UQB0MOPlU/PC9yn3seImefS1yv8C0bAyjAJ876839eHKPrclwNKBVX+9SUX+LdJGJTBi8DSU63g==
|
||||
/fastify-static/4.0.1:
|
||||
dependencies:
|
||||
content-disposition: 0.5.3
|
||||
fastify-plugin: 3.0.0
|
||||
glob: 7.1.6
|
||||
readable-stream: 3.6.0
|
||||
send: 0.17.1
|
||||
dev: false
|
||||
resolution:
|
||||
integrity: sha512-Mjt0My8Gf/nzJqIDai9rz3HsxH4RAJeMGMIPmf40lGMFKAv4SbRiKJ2cmteXoKHrFGPeGxwMq0gXfixwueV8wA==
|
||||
/fastify-warning/0.2.0:
|
||||
dev: false
|
||||
resolution:
|
||||
integrity: sha512-s1EQguBw/9qtc1p/WTY4eq9WMRIACkj+HTcOIK1in4MV5aFaQC9ZCIt0dJ7pr5bIf4lPpHvAtP2ywpTNgs7hqw==
|
||||
/fastify/3.12.0:
|
||||
dependencies:
|
||||
'@fastify/proxy-addr': 3.0.0
|
||||
abstract-logging: 2.0.1
|
||||
ajv: 6.12.6
|
||||
avvio: 7.2.1
|
||||
fast-json-stringify: 2.4.2
|
||||
fastify-error: 0.3.0
|
||||
fastify-warning: 0.2.0
|
||||
find-my-way: 3.0.5
|
||||
flatstr: 1.0.12
|
||||
light-my-request: 4.4.1
|
||||
pino: 6.11.1
|
||||
readable-stream: 3.6.0
|
||||
rfdc: 1.2.0
|
||||
secure-json-parse: 2.3.1
|
||||
semver: 7.3.4
|
||||
tiny-lru: 7.0.6
|
||||
dev: false
|
||||
engines:
|
||||
node: '>=10.16.0'
|
||||
resolution:
|
||||
integrity: sha512-xSVzP88dkwBRl/vSm8AnMB3ICOd5p0M/ea9fJWOx0WnC8x4r1WfOUUEHeyxcwlfWoiDDtsHe7DwyeSPrfmfzqQ==
|
||||
/fastq/1.11.0:
|
||||
dependencies:
|
||||
reusify: 1.0.4
|
||||
dev: false
|
||||
resolution:
|
||||
integrity: sha512-7Eczs8gIPDrVzT+EksYBcupqMyxSHXXrHOLRRxU2/DicV8789MRBRR8+Hc2uWzUupOs4YS4JzBmBxjjCVBxD/g==
|
||||
/file-entry-cache/6.0.0:
|
||||
/file-entry-cache/6.0.1:
|
||||
dependencies:
|
||||
flat-cache: 3.0.4
|
||||
dev: true
|
||||
engines:
|
||||
node: ^10.12.0 || >=12.0.0
|
||||
resolution:
|
||||
integrity: sha512-fqoO76jZ3ZnYrXLDRxBR1YvOvc0k844kcOg40bgsPrE25LAb/PDqTY+ho64Xh2c8ZXgIKldchCFHczG2UVRcWA==
|
||||
integrity: sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==
|
||||
/fill-range/7.0.1:
|
||||
dependencies:
|
||||
to-regex-range: 5.0.1
|
||||
@ -1272,16 +1019,6 @@ packages:
|
||||
node: '>=8'
|
||||
resolution:
|
||||
integrity: sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==
|
||||
/find-my-way/3.0.5:
|
||||
dependencies:
|
||||
fast-decode-uri-component: 1.0.1
|
||||
safe-regex2: 2.0.0
|
||||
semver-store: 0.3.0
|
||||
dev: false
|
||||
engines:
|
||||
node: '>=10'
|
||||
resolution:
|
||||
integrity: sha512-FweGg0cv1sBX8z7WhvBX5B5AECW4Zdh/NiB38Oa0qwSNIyPgRBCl/YjxuZn/rz38E/MMBHeVKJ22i7W3c626Gg==
|
||||
/flat-cache/3.0.4:
|
||||
dependencies:
|
||||
flatted: 3.1.1
|
||||
@ -1291,10 +1028,6 @@ packages:
|
||||
node: ^10.12.0 || >=12.0.0
|
||||
resolution:
|
||||
integrity: sha512-dm9s5Pw7Jc0GvMYbshN6zchCA9RgQlzzEZX3vylR9IqFfS8XciblUXOKfW6SiuJ0e13eDYZoZV5wdrev7P3Nwg==
|
||||
/flatstr/1.0.12:
|
||||
dev: false
|
||||
resolution:
|
||||
integrity: sha512-4zPxDyhCyiN2wIAtSLI6gc82/EjqZc1onI4Mz/l0pWrAlsSfYH/2ZIcU+e3oA2wDwbzIWNKwa23F8rh6+DRWkw==
|
||||
/flatted/3.1.1:
|
||||
dev: true
|
||||
resolution:
|
||||
@ -1342,22 +1075,6 @@ packages:
|
||||
node: '>= 6'
|
||||
resolution:
|
||||
integrity: sha512-RHkBKtLWUVwd7SqRIvCZMEvAMoGUp0XU+seQiZejj0COz3RI3hWP4sCv3gZWWLjJTd7rGwcsF5eKZGii0r/hbg==
|
||||
/form-data/4.0.0:
|
||||
dependencies:
|
||||
asynckit: 0.4.0
|
||||
combined-stream: 1.0.8
|
||||
mime-types: 2.1.29
|
||||
dev: false
|
||||
engines:
|
||||
node: '>= 6'
|
||||
resolution:
|
||||
integrity: sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==
|
||||
/fresh/0.5.2:
|
||||
dev: false
|
||||
engines:
|
||||
node: '>= 0.6'
|
||||
resolution:
|
||||
integrity: sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac=
|
||||
/fs-extra/9.1.0:
|
||||
dependencies:
|
||||
at-least-node: 1.0.0
|
||||
@ -1540,18 +1257,6 @@ packages:
|
||||
dev: true
|
||||
resolution:
|
||||
integrity: sha512-carPklcUh7ROWRK7Cv27RPtdhYhUsela/ue5/jKzjegVvXDqM2ILE9Q2BGn9JZJh1g87cp56su/FgQSzcWS8cQ==
|
||||
/http-errors/1.7.3:
|
||||
dependencies:
|
||||
depd: 1.1.2
|
||||
inherits: 2.0.4
|
||||
setprototypeof: 1.1.1
|
||||
statuses: 1.5.0
|
||||
toidentifier: 1.0.0
|
||||
dev: false
|
||||
engines:
|
||||
node: '>= 0.6'
|
||||
resolution:
|
||||
integrity: sha512-ZTTX0MWrsQ2ZAhA1cejAwDLycFsd7I7nVtnkT3Ol0aqodaKW+0CTZDQ1uBv5whptCnc8e8HeRRJxRs0kmm/Qfw==
|
||||
/http-signature/1.2.0:
|
||||
dependencies:
|
||||
assert-plus: 1.0.0
|
||||
@ -1649,12 +1354,6 @@ packages:
|
||||
node: '>=4'
|
||||
resolution:
|
||||
integrity: sha1-+ni/XS5pE8kRzp+BnuUUa7bYROk=
|
||||
/ipaddr.js/2.0.0:
|
||||
dev: false
|
||||
engines:
|
||||
node: '>= 10'
|
||||
resolution:
|
||||
integrity: sha512-S54H9mIj0rbxRIyrDMEuuER86LdlgUg9FSeZ8duQb6CUG2iRrA36MYVQBSprTF/ZeAwvyQ5mDGuNvIPM0BIl3w==
|
||||
/is-binary-path/2.1.0:
|
||||
dependencies:
|
||||
binary-extensions: 2.2.0
|
||||
@ -1912,16 +1611,6 @@ packages:
|
||||
node: '>= 0.8.0'
|
||||
resolution:
|
||||
integrity: sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==
|
||||
/light-my-request/4.4.1:
|
||||
dependencies:
|
||||
ajv: 6.12.6
|
||||
cookie: 0.4.1
|
||||
fastify-warning: 0.2.0
|
||||
readable-stream: 3.6.0
|
||||
set-cookie-parser: 2.4.7
|
||||
dev: false
|
||||
resolution:
|
||||
integrity: sha512-FDNRF2mYjthIRWE7O8d/X7AzDx4otQHl4/QXbu3Q/FRwBFcgb+ZoDaUd5HwN53uQXLAiw76osN+Va0NEaOW6rQ==
|
||||
/linkify-it/2.2.0:
|
||||
dependencies:
|
||||
uc.micro: 1.0.6
|
||||
@ -2022,12 +1711,6 @@ packages:
|
||||
node: '>= 0.6'
|
||||
resolution:
|
||||
integrity: sha512-CkqLUxUk15hofLoLyljJSrukZi8mAtgd+yE5uO4tqRZsdsAJKv0O+rFMhVDRJgozy+yG6md5KwuXhD4ocIoP+w==
|
||||
/mime-db/1.46.0:
|
||||
dev: false
|
||||
engines:
|
||||
node: '>= 0.6'
|
||||
resolution:
|
||||
integrity: sha512-svXaP8UQRZ5K7or+ZmfNhg2xX3yKDMUzqadsSqi4NCH/KomcH75MAMYAGVlvXn4+b/xOPhS3I2uHKRUzvjY7BQ==
|
||||
/mime-types/2.1.28:
|
||||
dependencies:
|
||||
mime-db: 1.45.0
|
||||
@ -2035,21 +1718,6 @@ packages:
|
||||
node: '>= 0.6'
|
||||
resolution:
|
||||
integrity: sha512-0TO2yJ5YHYr7M2zzT7gDU1tbwHxEUWBCLt0lscSNpcdAfFyJOVEpRYNS7EXVcTLNj/25QO8gulHC5JtTzSE2UQ==
|
||||
/mime-types/2.1.29:
|
||||
dependencies:
|
||||
mime-db: 1.46.0
|
||||
dev: false
|
||||
engines:
|
||||
node: '>= 0.6'
|
||||
resolution:
|
||||
integrity: sha512-Y/jMt/S5sR9OaqteJtslsFZKWOIIqMACsJSiHghlCAyhf7jfVYjKBmLiX8OgpWeW+fjJ2b+Az69aPFPkUOY6xQ==
|
||||
/mime/1.6.0:
|
||||
dev: false
|
||||
engines:
|
||||
node: '>=4'
|
||||
hasBin: true
|
||||
resolution:
|
||||
integrity: sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==
|
||||
/mimic-response/1.0.1:
|
||||
dev: true
|
||||
engines:
|
||||
@ -2103,12 +1771,9 @@ packages:
|
||||
resolution:
|
||||
integrity: sha512-kHmoybcPV8Sqy59DwNDY3Jefr64lK/by/da0ViFcuA4DH0vQg5Q6Ze5VimxkfQNSC+Mls/Kx53s7TjP1RhFEDQ==
|
||||
/ms/2.0.0:
|
||||
dev: true
|
||||
resolution:
|
||||
integrity: sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=
|
||||
/ms/2.1.1:
|
||||
dev: false
|
||||
resolution:
|
||||
integrity: sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==
|
||||
/ms/2.1.2:
|
||||
resolution:
|
||||
integrity: sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==
|
||||
@ -2158,12 +1823,6 @@ packages:
|
||||
optional: true
|
||||
resolution:
|
||||
integrity: sha512-KKYdza4heMsEfSWD7VPUIz3zX2XDwOyX2d+geb4vrERZMT5RMU6ujjaD+I5Yr54uZxQ2w6XRTAhHBbSCyovZBg==
|
||||
/negotiator/0.6.2:
|
||||
dev: false
|
||||
engines:
|
||||
node: '>= 0.6'
|
||||
resolution:
|
||||
integrity: sha512-hZXc7K2e+PgeI1eDBe/10Ard4ekbfrrqG8Ep+8Jmf4JID2bNg7NvCPOZN+kfF574pFQI7mum2AUqDidoKqcTOw==
|
||||
/node-abort-controller/1.1.0:
|
||||
dev: true
|
||||
resolution:
|
||||
@ -2178,11 +1837,6 @@ packages:
|
||||
node: 4.x || >=6.0.0
|
||||
resolution:
|
||||
integrity: sha512-V4aYg89jEoVRxRb2fJdAg8FHvI7cEyYdVAh94HH0UIK8oJxUfkjlDQN9RbMx+bEjP7+ggMiFRprSti032Oipxw==
|
||||
/node-gyp-build/4.2.3:
|
||||
dev: false
|
||||
hasBin: true
|
||||
resolution:
|
||||
integrity: sha512-MN6ZpzmfNCRM+3t57PTJHgHyw/h4OWnZ6mR8P5j/uZtqQr46RRuDE/P+g3n0YR/AiYXeWixZZzaip77gdICfRg==
|
||||
/node-gyp/3.8.0:
|
||||
dependencies:
|
||||
fstream: 1.0.12
|
||||
@ -2322,6 +1976,7 @@ packages:
|
||||
dev: false
|
||||
engines:
|
||||
node: '>=0.10.0'
|
||||
optional: true
|
||||
resolution:
|
||||
integrity: sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=
|
||||
/on-finished/2.3.0:
|
||||
@ -2488,22 +2143,6 @@ packages:
|
||||
node: '>=8.6'
|
||||
resolution:
|
||||
integrity: sha512-q0M/9eZHzmr0AulXyPwNfZjtwZ/RBZlbN3K3CErVrk50T2ASYI7Bye0EvekFY3IP1Nt2DHu0re+V2ZHIpMkuWg==
|
||||
/pino-std-serializers/3.2.0:
|
||||
dev: false
|
||||
resolution:
|
||||
integrity: sha512-EqX4pwDPrt3MuOAAUBMU0Tk5kR/YcCM5fNPEzgCO2zJ5HfX0vbiH9HbJglnyeQsN96Kznae6MWD47pZB5avTrg==
|
||||
/pino/6.11.1:
|
||||
dependencies:
|
||||
fast-redact: 3.0.0
|
||||
fast-safe-stringify: 2.0.7
|
||||
flatstr: 1.0.12
|
||||
pino-std-serializers: 3.2.0
|
||||
quick-format-unescaped: 4.0.1
|
||||
sonic-boom: 1.3.2
|
||||
dev: false
|
||||
hasBin: true
|
||||
resolution:
|
||||
integrity: sha512-PoDR/4jCyaP1k2zhuQ4N0NuhaMtei+C9mUHBRRJQujexl/bq3JkeL2OC23ada6Np3zeUMHbO4TGzY2D/rwZX3w==
|
||||
/please-upgrade-node/3.2.0:
|
||||
dependencies:
|
||||
semver-compare: 1.0.0
|
||||
@ -2613,20 +2252,6 @@ packages:
|
||||
node: '>=0.6'
|
||||
resolution:
|
||||
integrity: sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA==
|
||||
/queue-microtask/1.2.2:
|
||||
dev: false
|
||||
resolution:
|
||||
integrity: sha512-dB15eXv3p2jDlbOiNLyMabYg1/sXvppd8DP2J3EOCQ0AkuSXCW2tP7mnVouVLJKgUMY6yP0kcQDVpLCN13h4Xg==
|
||||
/quick-format-unescaped/4.0.1:
|
||||
dev: false
|
||||
resolution:
|
||||
integrity: sha512-RyYpQ6Q5/drsJyOhrWHYMWTedvjTIat+FTwv0K4yoUxzvekw2aRHMQJLlnvt8UantkZg2++bEzD9EdxXqkWf4A==
|
||||
/range-parser/1.2.1:
|
||||
dev: false
|
||||
engines:
|
||||
node: '>= 0.6'
|
||||
resolution:
|
||||
integrity: sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==
|
||||
/rc/1.2.8:
|
||||
dependencies:
|
||||
deep-extend: 0.6.0
|
||||
@ -2654,6 +2279,7 @@ packages:
|
||||
inherits: 2.0.4
|
||||
string_decoder: 1.3.0
|
||||
util-deprecate: 1.0.2
|
||||
dev: true
|
||||
engines:
|
||||
node: '>= 6'
|
||||
resolution:
|
||||
@ -2739,29 +2365,12 @@ packages:
|
||||
dev: true
|
||||
resolution:
|
||||
integrity: sha1-kYcg7ztjHFZCvgaPFa3lpG9Loec=
|
||||
/ret/0.2.2:
|
||||
dev: false
|
||||
engines:
|
||||
node: '>=4'
|
||||
resolution:
|
||||
integrity: sha512-M0b3YWQs7R3Z917WRQy1HHA7Ba7D8hvZg6UE5mLykJxQVE2ju0IXbGlaHPPlkY+WN7wFP+wUMXmBFA0aV6vYGQ==
|
||||
/retry-as-promised/3.2.0:
|
||||
dependencies:
|
||||
any-promise: 1.3.0
|
||||
dev: false
|
||||
resolution:
|
||||
integrity: sha512-CybGs60B7oYU/qSQ6kuaFmRd9sTZ6oXSc0toqePvV74Ac6/IFZSI1ReFQmtCN+uvW1Mtqdwpvt/LGOiCBAY2Mg==
|
||||
/reusify/1.0.4:
|
||||
dev: false
|
||||
engines:
|
||||
iojs: '>=1.0.0'
|
||||
node: '>=0.10.0'
|
||||
resolution:
|
||||
integrity: sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==
|
||||
/rfdc/1.2.0:
|
||||
dev: false
|
||||
resolution:
|
||||
integrity: sha512-ijLyszTMmUrXvjSooucVQwimGUk84eRcmCuLV8Xghe3UO85mjUtRAHRyoMM6XtyqbECaXuBWx18La3523sXINA==
|
||||
/rimraf/2.7.1:
|
||||
dependencies:
|
||||
glob: 7.1.6
|
||||
@ -2779,27 +2388,18 @@ packages:
|
||||
integrity: sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==
|
||||
/safe-buffer/5.1.2:
|
||||
dev: false
|
||||
optional: true
|
||||
resolution:
|
||||
integrity: sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==
|
||||
/safe-buffer/5.2.1:
|
||||
resolution:
|
||||
integrity: sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==
|
||||
/safe-regex2/2.0.0:
|
||||
dependencies:
|
||||
ret: 0.2.2
|
||||
dev: false
|
||||
resolution:
|
||||
integrity: sha512-PaUSFsUaNNuKwkBijoAPHAK6/eM6VirvyPWlZ7BAQy4D+hCvh4B6lIG+nPdhbFfIbP+gTGBcrdsOaUs0F+ZBOQ==
|
||||
/safer-buffer/2.1.2:
|
||||
resolution:
|
||||
integrity: sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==
|
||||
/sax/1.2.4:
|
||||
resolution:
|
||||
integrity: sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==
|
||||
/secure-json-parse/2.3.1:
|
||||
dev: false
|
||||
resolution:
|
||||
integrity: sha512-5uGhQLHSC9tVa7RGPkSwxbZVsJCZvIODOadAimCXkU1aCa1fWdszj2DktcutK8A7dD58PoRdxTYiy0jFl6qjnw==
|
||||
/semver-compare/1.0.0:
|
||||
dev: true
|
||||
resolution:
|
||||
@ -2812,10 +2412,6 @@ packages:
|
||||
node: '>=8'
|
||||
resolution:
|
||||
integrity: sha512-GX0Ix/CJcHyB8c4ykpHGIAvLyOwOobtM/8d+TQkAd81/bEjgPHrfba41Vpesr7jX/t8Uh+R3EX9eAS5be+jQYg==
|
||||
/semver-store/0.3.0:
|
||||
dev: false
|
||||
resolution:
|
||||
integrity: sha512-TcZvGMMy9vodEFSse30lWinkj+JgOBvPn8wRItpQRSayhc+4ssDs335uklkfvQQJgL/WvmHLVj4Ycv2s7QCQMg==
|
||||
/semver/5.3.0:
|
||||
dev: false
|
||||
hasBin: true
|
||||
@ -2839,26 +2435,6 @@ packages:
|
||||
hasBin: true
|
||||
resolution:
|
||||
integrity: sha512-tCfb2WLjqFAtXn4KEdxIhalnRtoKFN7nAwj0B3ZXCbQloV2tq5eDbcTmT68JJD3nRJq24/XgxtQKFIpQdtvmVw==
|
||||
/send/0.17.1:
|
||||
dependencies:
|
||||
debug: 2.6.9
|
||||
depd: 1.1.2
|
||||
destroy: 1.0.4
|
||||
encodeurl: 1.0.2
|
||||
escape-html: 1.0.3
|
||||
etag: 1.8.1
|
||||
fresh: 0.5.2
|
||||
http-errors: 1.7.3
|
||||
mime: 1.6.0
|
||||
ms: 2.1.1
|
||||
on-finished: 2.3.0
|
||||
range-parser: 1.2.1
|
||||
statuses: 1.5.0
|
||||
dev: false
|
||||
engines:
|
||||
node: '>= 0.8.0'
|
||||
resolution:
|
||||
integrity: sha512-BsVKsiGcQMFwT8UxypobUKyv7irCNRHk1T0G680vk88yf6LBByGcZJOTJCrTP2xVN6yI+XjPJcNuE3V4fT9sAg==
|
||||
/seq-queue/0.0.5:
|
||||
dev: true
|
||||
resolution:
|
||||
@ -2920,18 +2496,10 @@ packages:
|
||||
optional: true
|
||||
resolution:
|
||||
integrity: sha1-BF+XgtARrppoA93TgrJDkrPYkPc=
|
||||
/set-cookie-parser/2.4.7:
|
||||
dev: false
|
||||
resolution:
|
||||
integrity: sha512-VaSdYN1DlYuKOzBKqhYJnwaPeirZdNNUNmYdnp9/6Umr9s8amidctYitrX2Gk8wCqiBuiG5mpOYCiVhG5o4iMQ==
|
||||
/setimmediate/1.0.5:
|
||||
dev: false
|
||||
resolution:
|
||||
integrity: sha1-KQy7Iy4waULX1+qbg3Mqt4VvgoU=
|
||||
/setprototypeof/1.1.1:
|
||||
dev: false
|
||||
resolution:
|
||||
integrity: sha512-JvdAWfbXeIGaZ9cILp38HntZSFSo3mWg6xGcJJsd+d4aRMOqauag1C63dJfDw7OaMYwEbHMOxEZ1lqVRYP2OAw==
|
||||
/shebang-command/2.0.0:
|
||||
dependencies:
|
||||
shebang-regex: 3.0.0
|
||||
@ -2959,51 +2527,6 @@ packages:
|
||||
node: '>=10'
|
||||
resolution:
|
||||
integrity: sha512-qMCMfhY040cVHT43K9BFygqYbUPFZKHOg7K73mtTWJRb8pyP3fzf4Ixd5SzdEJQ6MRUg/WBnOLxghZtKKurENQ==
|
||||
/socket.io-adapter/2.1.0:
|
||||
dev: false
|
||||
resolution:
|
||||
integrity: sha512-+vDov/aTsLjViYTwS9fPy5pEtTkrbEKsw2M+oVSoFGw6OD1IpvlV1VPhUzNbofCQ8oyMbdYJqDtGdmHQK6TdPg==
|
||||
/socket.io-parser/4.0.4:
|
||||
dependencies:
|
||||
'@types/component-emitter': 1.2.10
|
||||
component-emitter: 1.3.0
|
||||
debug: 4.3.1
|
||||
dev: false
|
||||
engines:
|
||||
node: '>=10.0.0'
|
||||
resolution:
|
||||
integrity: sha512-t+b0SS+IxG7Rxzda2EVvyBZbvFPBCjJoyHuE0P//7OAsN23GItzDRdWa6ALxZI/8R5ygK7jAR6t028/z+7295g==
|
||||
/socket.io/3.1.2:
|
||||
dependencies:
|
||||
'@types/cookie': 0.4.0
|
||||
'@types/cors': 2.8.10
|
||||
'@types/node': 14.14.31
|
||||
accepts: 1.3.7
|
||||
base64id: 2.0.0
|
||||
debug: 4.3.1
|
||||
engine.io: 4.1.1
|
||||
socket.io-adapter: 2.1.0
|
||||
socket.io-parser: 4.0.4
|
||||
dev: false
|
||||
engines:
|
||||
node: '>=10.0.0'
|
||||
resolution:
|
||||
integrity: sha512-JubKZnTQ4Z8G4IZWtaAZSiRP3I/inpy8c/Bsx2jrwGrTbKeVU5xd6qkKMHpChYeM3dWZSO0QACiGK+obhBNwYw==
|
||||
/sodium-native/3.2.1:
|
||||
dependencies:
|
||||
ini: 1.3.8
|
||||
node-gyp-build: 4.2.3
|
||||
dev: false
|
||||
requiresBuild: true
|
||||
resolution:
|
||||
integrity: sha512-EgDZ/Z7PxL2kCasKk7wnRkV8W9kvwuIlHuHXAxkQm3FF0MgVsjyLBXGjSRGhjE6u7rhSpk3KaMfFM23bfMysIQ==
|
||||
/sonic-boom/1.3.2:
|
||||
dependencies:
|
||||
atomic-sleep: 1.0.0
|
||||
flatstr: 1.0.12
|
||||
dev: false
|
||||
resolution:
|
||||
integrity: sha512-/B4tAuK2+hIlR94GhhWU1mJHWk5lt0CEuBvG0kvk1qIAzQc4iB1TieMio8DCZxY+Y7tsuzOxSUDOGmaUm3vXMg==
|
||||
/split2/3.2.2:
|
||||
dependencies:
|
||||
readable-stream: 3.6.0
|
||||
@ -3054,16 +2577,6 @@ packages:
|
||||
hasBin: true
|
||||
resolution:
|
||||
integrity: sha512-HXXqVUq7+pcKeLqqZj6mHFUMvXtOJt1uoUx09pFW6011inTMxqI8BA8PM95myrIyyKwdnzjdFjLiE6KBPVtJIg==
|
||||
/statuses/1.5.0:
|
||||
dev: false
|
||||
engines:
|
||||
node: '>= 0.6'
|
||||
resolution:
|
||||
integrity: sha1-Fhx9rBd2Wf2YEfQ3cfqZOBR4Yow=
|
||||
/string-similarity/4.0.4:
|
||||
dev: false
|
||||
resolution:
|
||||
integrity: sha512-/q/8Q4Bl4ZKAPjj8WerIBJWALKkaPRfrvhfF8k/B23i4nzrlRj2/go1m90In7nG/3XDSbOo0+pu6RvCTM9RGMQ==
|
||||
/string-width/1.0.2:
|
||||
dependencies:
|
||||
code-point-at: 1.1.0
|
||||
@ -3093,6 +2606,16 @@ packages:
|
||||
node: '>=8'
|
||||
resolution:
|
||||
integrity: sha512-zUz5JD+tgqtuDjMhwIg5uFVV3dtqZ9yQJlZVfq4I01/K5Paj5UHj7VyrQOJvzawSVlKpObApbfD0Ed6yJc+1eg==
|
||||
/string-width/4.2.2:
|
||||
dependencies:
|
||||
emoji-regex: 8.0.0
|
||||
is-fullwidth-code-point: 3.0.0
|
||||
strip-ansi: 6.0.0
|
||||
dev: true
|
||||
engines:
|
||||
node: '>=8'
|
||||
resolution:
|
||||
integrity: sha512-XBJbT3N4JhVumXE0eoLU9DCjcaF92KLNqTmFCnG1pf8duUxFGwtP6AD6nkjw9a3IdiRtL3E2w3JDiE/xi3vOeA==
|
||||
/string_decoder/1.1.1:
|
||||
dependencies:
|
||||
safe-buffer: 5.1.2
|
||||
@ -3103,6 +2626,7 @@ packages:
|
||||
/string_decoder/1.3.0:
|
||||
dependencies:
|
||||
safe-buffer: 5.2.1
|
||||
dev: true
|
||||
resolution:
|
||||
integrity: sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==
|
||||
/strip-ansi/3.0.1:
|
||||
@ -3165,10 +2689,10 @@ packages:
|
||||
integrity: sha512-zoE5/e+dnEijk6ASB6/qrK+oYdm2do1hjoLWrqUC/8WEIW1gbxFcKuBof7sW8ArN6e+AYvsE8HBGiVRWL/F5CA==
|
||||
/table/6.0.7:
|
||||
dependencies:
|
||||
ajv: 7.1.0
|
||||
lodash: 4.17.20
|
||||
ajv: 7.1.1
|
||||
lodash: 4.17.21
|
||||
slice-ansi: 4.0.0
|
||||
string-width: 4.2.0
|
||||
string-width: 4.2.2
|
||||
dev: true
|
||||
engines:
|
||||
node: '>=10.0.0'
|
||||
@ -3240,12 +2764,6 @@ packages:
|
||||
dev: true
|
||||
resolution:
|
||||
integrity: sha1-f17oI66AUgfACvLfSoTsP8+lcLQ=
|
||||
/tiny-lru/7.0.6:
|
||||
dev: false
|
||||
engines:
|
||||
node: '>=6'
|
||||
resolution:
|
||||
integrity: sha512-zNYO0Kvgn5rXzWpL0y3RS09sMK67eGaQj9805jlK9G6pSadfriTczzLHFXa/xcW4mIRfmlB9HyQ/+SgL0V1uow==
|
||||
/to-readable-stream/1.0.0:
|
||||
dev: true
|
||||
engines:
|
||||
@ -3260,12 +2778,6 @@ packages:
|
||||
node: '>=8.0'
|
||||
resolution:
|
||||
integrity: sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==
|
||||
/toidentifier/1.0.0:
|
||||
dev: false
|
||||
engines:
|
||||
node: '>=0.6'
|
||||
resolution:
|
||||
integrity: sha512-yaOH/Pk/VEhBWWTlhI+qXxDFXlejDGcQipMlyxda9nthulaxLZUNcUqFxokp0vcYnvteJln5FNQDRrxj3YcbVw==
|
||||
/toposort-class/1.0.1:
|
||||
dev: false
|
||||
resolution:
|
||||
@ -3440,12 +2952,6 @@ packages:
|
||||
node: '>= 0.10'
|
||||
resolution:
|
||||
integrity: sha512-X/p3UZerAIsbBfN/IwahhYaBbY68EN/UQBWHtsbXGT5bfrH/p4NQzUCG1kF/rtKaNpnJ7jAu6NGTdSNtyNIXMw==
|
||||
/vary/1.1.2:
|
||||
dev: false
|
||||
engines:
|
||||
node: '>= 0.8'
|
||||
resolution:
|
||||
integrity: sha1-IpnwLG3tMNSllhsLn3RSShj2NPw=
|
||||
/verror/1.10.0:
|
||||
dependencies:
|
||||
assert-plus: 1.0.0
|
||||
@ -3594,11 +3100,7 @@ specifiers:
|
||||
boxen: ^5.0.0
|
||||
discord.js: ^12.5.1
|
||||
dotenv: ^8.2.0
|
||||
eslint: ^7.20.0
|
||||
fastify: ^3.12.0
|
||||
fastify-secure-session: ^2.3.1
|
||||
fastify-static: ^4.0.1
|
||||
form-data: ^4.0.0
|
||||
eslint: ^7.21.0
|
||||
fs-extra: ^9.1.0
|
||||
jsdoc: ^3.6.6
|
||||
leeks.js: ^0.0.9
|
||||
@ -3611,7 +3113,6 @@ specifiers:
|
||||
pg-hstore: ^2.3.3
|
||||
semver: ^7.3.4
|
||||
sequelize: ^6.5.0
|
||||
socket.io: ^3.1.2
|
||||
sqlite3: ^5.0.2
|
||||
tedious: ^11.0.3
|
||||
terminal-link: ^2.1.1
|
||||
|
@ -1,8 +1,6 @@
|
||||
const { MessageEmbed } = require('discord.js');
|
||||
const {
|
||||
Command,
|
||||
OptionTypes
|
||||
} = require('../modules/commands');
|
||||
const { OptionTypes } = require('../modules/commands/helpers');
|
||||
const Command = require('../modules/commands/command');
|
||||
|
||||
module.exports = class NewCommand extends Command {
|
||||
constructor(client) {
|
||||
|
@ -64,10 +64,9 @@ const log = require('./logger');
|
||||
|
||||
const { selectPresence } = require('./utils/discord');
|
||||
const I18n = require('@eartharoid/i18n');
|
||||
const { CommandManager } = require('./modules/commands');
|
||||
const CommandManager = require('./modules/commands/manager');
|
||||
const PluginManager = require('./modules/plugins/manager');
|
||||
const TicketManager = require('./modules/tickets');
|
||||
const { PluginManager } = require('./modules/plugins');
|
||||
const SettingsServer = require('./server');
|
||||
|
||||
require('./modules/structures')(); // load extended structures before creating the client
|
||||
|
||||
@ -122,9 +121,6 @@ class Bot extends Client {
|
||||
this.plugins = new PluginManager(this);
|
||||
this.plugins.load(); // load plugins
|
||||
|
||||
/** SettingsServer internal plugin instance */
|
||||
this.server = new SettingsServer(this);
|
||||
|
||||
this.log.info('Connecting to Discord API...');
|
||||
|
||||
this.login();
|
||||
|
@ -5,7 +5,6 @@ const fs = require('fs');
|
||||
const { join } = require('path');
|
||||
const { path } = require('../../utils/fs');
|
||||
const { createMessage, flags } = require('../../utils/discord');
|
||||
const Plugin = require('../plugins/plugin');
|
||||
|
||||
/**
|
||||
* A command
|
||||
|
@ -1,6 +1,4 @@
|
||||
module.exports = {
|
||||
CommandManager: require('./manager'),
|
||||
Command: require('./command'),
|
||||
OptionTypes: {
|
||||
SUB_COMMAND: 1,
|
||||
SUB_COMMAND_GROUP: 2,
|
||||
@ -15,5 +13,5 @@ module.exports = {
|
||||
Pong: 1,
|
||||
ChannelMessageWithSource: 4,
|
||||
DeferredChannelMessageWithSource: 5,
|
||||
},
|
||||
}
|
||||
};
|
@ -182,7 +182,7 @@ module.exports = class CommandManager {
|
||||
// if (typeof res === 'object' || typeof res === 'string')
|
||||
// cmd.sendResponse(interaction, res, res.secret);
|
||||
} catch (e) {
|
||||
this.client.log.warn(`[COMMANDS] An error occurred whilst executed the ${cmd} command`);
|
||||
this.client.log.warn(`(COMMANDS) An error occurred whilst executed the ${cmd_name} command`);
|
||||
this.client.log.error(e);
|
||||
}
|
||||
|
||||
|
@ -1,4 +0,0 @@
|
||||
module.exports = {
|
||||
PluginManager: require('./manager'),
|
||||
Plugin: require('./plugin')
|
||||
};
|
@ -3,10 +3,6 @@ const { Collection, Client } = require('discord.js');
|
||||
// eslint-disable-next-line no-unused-vars
|
||||
const Plugin = require('./plugin');
|
||||
|
||||
const fs = require('fs');
|
||||
const { join } = require('path');
|
||||
const { path } = require('../../utils/fs');
|
||||
|
||||
/**
|
||||
* Manages the loading of plugins
|
||||
*/
|
||||
@ -24,17 +20,22 @@ module.exports = class PluginManager {
|
||||
|
||||
/** Array of official plugins to be used to check if a plugin is official */
|
||||
this.official = [
|
||||
'dsctickets.settings-server',
|
||||
'dsctickets.portal'
|
||||
];
|
||||
}
|
||||
|
||||
handleError(id) {
|
||||
if (!this.official.includes(id))
|
||||
this.client.log.notice(`"${id}" is NOT an official plugin, please do not ask for help with it in the Discord Tickets support server, seek help from the plugin author instead.`);
|
||||
}
|
||||
|
||||
/**
|
||||
* Register and load a plugin
|
||||
* @param {Boolean} npm Installed by NPM?
|
||||
* @param {Plugin} Main The Plugin class
|
||||
* @param {Object} pkg Contents of package.json
|
||||
* @param {Plugin} plugin - the Plugin class
|
||||
* @param {Object} pkg - contents of package.json
|
||||
*/
|
||||
register(npm, Main, pkg) {
|
||||
register(plugin, pkg) {
|
||||
let {
|
||||
name: id,
|
||||
version,
|
||||
@ -43,7 +44,7 @@ module.exports = class PluginManager {
|
||||
} = pkg;
|
||||
|
||||
if (this.plugins.has(id)) {
|
||||
this.client.log.warn(`[PLUGINS] A plugin with the ID "${id}" is already loaded, skipping`);
|
||||
this.client.log.warn(`(PLUGINS) A plugin with the ID "${id}" is already loaded, skipping`);
|
||||
return;
|
||||
}
|
||||
|
||||
@ -51,10 +52,6 @@ module.exports = class PluginManager {
|
||||
author = author.name || 'unknown';
|
||||
}
|
||||
|
||||
let loading = npm ? 'Loading' : 'Sideloading';
|
||||
|
||||
this.client.log.plugins(`${loading} "${id}" v${version} by ${author}`);
|
||||
|
||||
let about = {
|
||||
id,
|
||||
version,
|
||||
@ -63,16 +60,13 @@ module.exports = class PluginManager {
|
||||
};
|
||||
|
||||
try {
|
||||
let plugin = new Main(this.client, about);
|
||||
plugin = new (plugin(Plugin))(this.client, about);
|
||||
this.plugins.set(id, plugin);
|
||||
plugin.preload();
|
||||
|
||||
this.client.log.plugins(`Loading "${plugin.name}" v${version} by ${author}`);
|
||||
plugin.preload();
|
||||
} catch (e) {
|
||||
if (npm) {
|
||||
this.client.log.warn(`An error occurred whilst loading "${id}"`);
|
||||
} else {
|
||||
this.client.log.warn(`An error occurred whilst sideloading "${id}"; have you manually installed its dependencies?`);
|
||||
}
|
||||
this.handleError(id);
|
||||
this.client.log.warn(`An error occurred whilst loading the "${id}" plugin`);
|
||||
this.client.log.error(e);
|
||||
process.exit();
|
||||
}
|
||||
@ -80,27 +74,18 @@ module.exports = class PluginManager {
|
||||
|
||||
/** Automatically register and load plugins */
|
||||
load() {
|
||||
// normal plugins (NPM)
|
||||
this.client.config.plugins.forEach(plugin => {
|
||||
try {
|
||||
let main = require(plugin);
|
||||
let pkg = require(`${plugin}/package.json`);
|
||||
this.register(true, main, pkg);
|
||||
this.register(main, pkg);
|
||||
} catch (e) {
|
||||
this.handleError(plugin);
|
||||
this.client.log.warn(`An error occurred whilst loading ${plugin}; have you installed it?`);
|
||||
this.client.log.error(e);
|
||||
process.exit();
|
||||
}
|
||||
});
|
||||
|
||||
// sideload plugins for development
|
||||
const dirs = fs.readdirSync(path('./user/plugins'));
|
||||
dirs.forEach(dir => {
|
||||
if (!fs.existsSync(path(`./user/plugins/${dir}/package.json`))) return;
|
||||
let pkg = require(`../../../user/plugins/${dir}/package.json`);
|
||||
let main = require(join(`../../../user/plugins/${dir}/`, pkg.main));
|
||||
this.register(false, main, pkg);
|
||||
});
|
||||
}
|
||||
|
||||
};
|
@ -1,6 +1,10 @@
|
||||
/* eslint-disable no-unused-vars */
|
||||
const { Client } = require('discord.js');
|
||||
|
||||
const Command = require('../commands/command');
|
||||
const {
|
||||
OptionTypes,
|
||||
ResponseTypes
|
||||
} = require('../commands/helpers');
|
||||
const fs = require('fs');
|
||||
const { join } = require('path');
|
||||
const { path } = require('../../utils/fs');
|
||||
@ -24,8 +28,8 @@ module.exports = class Plugin {
|
||||
/** The PluginManager */
|
||||
this.manager = this.client.plugins;
|
||||
|
||||
// Object.assign(this, this.manager.plugins.get(id));
|
||||
// make JSDoc happy
|
||||
/** An official plugin? */
|
||||
this.official = this.manager.official.includes(this.id);
|
||||
|
||||
let {
|
||||
id,
|
||||
@ -81,6 +85,12 @@ module.exports = class Plugin {
|
||||
name: clean,
|
||||
path: path(`./user/plugins/${clean}`)
|
||||
};
|
||||
|
||||
this.helpers = {
|
||||
Command,
|
||||
OptionTypes,
|
||||
ResponseTypes
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1,79 +0,0 @@
|
||||
const { Plugin } = require('../modules/plugins');
|
||||
const fastify = require('fastify');
|
||||
const session = require('fastify-secure-session');
|
||||
const { randomBytes } = require('crypto');
|
||||
const fs = require('fs');
|
||||
const { path } = require('../utils/fs');
|
||||
|
||||
module.exports = class SettingsServer extends Plugin {
|
||||
constructor(client) {
|
||||
super(client, {
|
||||
id: 'internal.settings'
|
||||
}, {
|
||||
name: 'Settings server',
|
||||
commands: []
|
||||
});
|
||||
|
||||
this.fastify = fastify();
|
||||
|
||||
this.client.plugins.plugins.set(this.id, this);
|
||||
this.preload();
|
||||
}
|
||||
|
||||
async preload() {
|
||||
this.fastify.register(this.client.log.fastify(), {
|
||||
level: 'http',
|
||||
format: '&lSETTINGS:&r {status-colour}{status}&r {method} &7{route} {time-colour}({time})'
|
||||
});
|
||||
|
||||
this.fastify.register(session, {
|
||||
secret: randomBytes(48).toString('hex'),
|
||||
salt: randomBytes(8).toString('hex'),
|
||||
cookie: {
|
||||
path: '/',
|
||||
httpOnly: true ,
|
||||
},
|
||||
});
|
||||
|
||||
this.fastify.register(require('fastify-static'), {
|
||||
root: path('./src/server/public'),
|
||||
// prefix: '/public/',
|
||||
});
|
||||
|
||||
let host = process.env.HTTP_HOST;
|
||||
if (!host.endsWith('/')) host = host + '/';
|
||||
this.redirect_uri = encodeURI(`${host}auth/callback`);
|
||||
}
|
||||
|
||||
async load() {
|
||||
const routes = fs.readdirSync(path('./src/server/routes'))
|
||||
.filter(file => file.endsWith('.js'));
|
||||
for (const r of routes) {
|
||||
const {
|
||||
method,
|
||||
route,
|
||||
execute
|
||||
} = require(`./routes/${r}`);
|
||||
this.fastify[method](route, (...args) => execute(this, ...args));
|
||||
}
|
||||
|
||||
this.fastify.listen(process.env.HTTP_PORT || 8080, (err, host) => {
|
||||
if (err) throw err;
|
||||
this.client.log.info(`Settings server listening at ${host}`);
|
||||
});
|
||||
|
||||
this.io = require('socket.io')(process.env.HTTP_PORT || 8080);
|
||||
|
||||
this.io.on('connection', socket => {
|
||||
const events = fs.readdirSync(path('./src/server/socket'))
|
||||
.filter(file => file.endsWith('.js'));
|
||||
for (const e of events) {
|
||||
const {
|
||||
event,
|
||||
execute
|
||||
} = require(`./socket/${e}`);
|
||||
socket.on(event, (...args) => execute(this, ...args));
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
@ -1,12 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>DiscordTickets / Settings</title>
|
||||
</head>
|
||||
<body>
|
||||
<script src='https://cdnjs.cloudflare.com/ajax/libs/socket.io/3.1.1/socket.io.min.js'></script>
|
||||
<script>
|
||||
const socket = io('./');
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
@ -1,47 +0,0 @@
|
||||
const fetch = require('node-fetch');
|
||||
const FormData = require('form-data');
|
||||
|
||||
module.exports = {
|
||||
method: 'get',
|
||||
route: '/auth/callback',
|
||||
execute: async (plugin, req, res) => {
|
||||
|
||||
if (!req.query.code) {
|
||||
res.status(400);
|
||||
return 'Bad Request: no code';
|
||||
}
|
||||
|
||||
if (req.query.state !== 'apollo') {
|
||||
res.status(400);
|
||||
return 'Bad Request: state mismatch';
|
||||
}
|
||||
|
||||
const data = new FormData();
|
||||
data.append('client_id', plugin.client.user.id);
|
||||
data.append('client_secret', process.env.DISCORD_SECRET);
|
||||
data.append('grant_type', 'authorization_code');
|
||||
data.append('redirect_uri', plugin.redirect_uri);
|
||||
data.append('scope', 'identify guild');
|
||||
data.append('code', req.query.code);
|
||||
|
||||
let {
|
||||
access_token,
|
||||
expires_in,
|
||||
refresh_token
|
||||
} = await (await fetch('https://discordapp.com/api/oauth2/token', {
|
||||
method: 'POST',
|
||||
body: data,
|
||||
})).json();
|
||||
|
||||
expires_in = expires_in * 1000;
|
||||
let expires_at = Date.now() + expires_in;
|
||||
|
||||
req.session.set('access_token', access_token);
|
||||
req.session.set('expires_in', expires_in);
|
||||
req.session.set('expires_at', expires_at);
|
||||
req.session.set('refresh_token', refresh_token);
|
||||
|
||||
res.redirect(307, '/settings');
|
||||
|
||||
}
|
||||
};
|
@ -1,16 +0,0 @@
|
||||
module.exports = {
|
||||
method: 'get',
|
||||
route: '/auth/login',
|
||||
execute: async (plugin, req, res) => {
|
||||
|
||||
let url = new URL('https://discord.com/api/oauth2/authorize');
|
||||
url.searchParams.append('client_id', plugin.client.user.id);
|
||||
url.searchParams.append('redirect_uri', plugin.redirect_uri);
|
||||
url.searchParams.append('response_type', 'code');
|
||||
url.searchParams.append('scope', 'identify guilds');
|
||||
url.searchParams.append('state', 'apollo');
|
||||
|
||||
res.redirect(307, url);
|
||||
|
||||
}
|
||||
};
|
@ -1,10 +0,0 @@
|
||||
module.exports = {
|
||||
method: 'get',
|
||||
route: '/auth/logout',
|
||||
execute: async (plugin, req, res) => {
|
||||
|
||||
req.session.delete();
|
||||
res.send('Logged out successfully');
|
||||
|
||||
}
|
||||
};
|
@ -1,9 +0,0 @@
|
||||
module.exports = {
|
||||
method: 'get',
|
||||
route: '/',
|
||||
execute: async (plugin, req, res) => {
|
||||
|
||||
res.redirect(307, '/auth/login');
|
||||
|
||||
}
|
||||
};
|
@ -1,23 +0,0 @@
|
||||
const fetch = require('node-fetch');
|
||||
|
||||
module.exports = {
|
||||
method: 'get',
|
||||
route: '/settings',
|
||||
execute: async (plugin, req, res) => {
|
||||
|
||||
let expires_at = req.session.get('expires_at');
|
||||
if (!expires_at) res.redirect(307, '/auth/login');
|
||||
let expired = expires_at < Date.now();
|
||||
if (expired) res.redirect(307, '/auth/login');
|
||||
|
||||
let data = await (await fetch('https://discordapp.com/api/users/@me', {
|
||||
headers: {
|
||||
'Authorization': `Bearer ${req.session.get('access_token')}`
|
||||
}
|
||||
})).json();
|
||||
|
||||
console.log(data);
|
||||
|
||||
return `Hello, ${data.username}`;
|
||||
}
|
||||
};
|
@ -1,6 +0,0 @@
|
||||
module.exports = {
|
||||
event: 'connect',
|
||||
execute: (plugin, data) => {
|
||||
plugin.client.log.ws('Client connected to settings socket');
|
||||
}
|
||||
};
|
@ -37,6 +37,7 @@ module.exports = {
|
||||
},
|
||||
max_listeners: 10,
|
||||
plugins: [
|
||||
'dsctickets.settings-server',
|
||||
],
|
||||
presence: {
|
||||
presences: [
|
||||
|
Loading…
Reference in New Issue
Block a user