Compare commits
28 Commits
1.0.0-beta
...
1.0.0-beta
Author | SHA1 | Date | |
---|---|---|---|
11845cae42 | |||
d853fa55d3
|
|||
88834703ef
|
|||
9cbb7799e9 | |||
005b9bd69c
|
|||
21812157f8
|
|||
52a349c1b9
|
|||
6242c09e4b | |||
24d39d471e
|
|||
545bda9bee
|
|||
966625bac4
|
|||
cc50a0a089 | |||
27f625155e
|
|||
8b72326419
|
|||
d9c81ef3f2
|
|||
71b401dbee
|
|||
fda6166483
|
|||
df2548dba6
|
|||
ca29f047e9
|
|||
7a5d7f46b6
|
|||
0c9000a48c
|
|||
fb2e3c4f11 | |||
657a58f3a5
|
|||
f695f0162f
|
|||
4fef4e8045
|
|||
df8d186139
|
|||
f7727c3542
|
|||
7be72df267
|
20
Changelog.md
Normal file
20
Changelog.md
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
# Changelog
|
||||||
|
This file is used to list changes made to this software.
|
||||||
|
|
||||||
|
## V1.0.0 [`unreleased`]
|
||||||
|
_Current development version: **1.0.0-beta.3**_
|
||||||
|
### Features
|
||||||
|
- /info
|
||||||
|
- /logchannel
|
||||||
|
- /blocklist get
|
||||||
|
- /blocklist add
|
||||||
|
- /blocklist remove
|
||||||
|
- /preservesettings
|
||||||
|
- /showblocklist
|
||||||
|
- /showsettings
|
||||||
|
- Data will be deleted by default when the bot leaves the server
|
||||||
|
- Server admins can change the behaviour of the bot when it leaves the server to keep the data persistent
|
||||||
|
- Scans for blocked words in channel names and renames channels to "CENSORED" if found
|
||||||
|
- When settings are changed or channels are censored, notifications to a logchannel can be enabled
|
||||||
|
- CLI to change settings and get information during runtime by attaching to the apps docker container
|
||||||
|
- API for automated uptime checks to prevent the bot from going offline unnoticed
|
@ -10,4 +10,5 @@ ENV NODE_ENV=production
|
|||||||
COPY --from=builder node_modules ./node_modules
|
COPY --from=builder node_modules ./node_modules
|
||||||
COPY build/ .
|
COPY build/ .
|
||||||
VOLUME [ "/usr/src/app/data" ]
|
VOLUME [ "/usr/src/app/data" ]
|
||||||
|
EXPOSE 80
|
||||||
CMD ["node", "--enable-source-maps", "index.js"]
|
CMD ["node", "--enable-source-maps", "index.js"]
|
20
README.md
20
README.md
@ -2,12 +2,12 @@
|
|||||||
A Discord bot that checks Discord channel names for banned words and prevents renaming of them
|
A Discord bot that checks Discord channel names for banned words and prevents renaming of them
|
||||||
|
|
||||||
## Commands
|
## Commands
|
||||||
### /logchanel [channel?]
|
### /logchanel [channel?] `Permission: MANAGE_GUILD`
|
||||||
Sets the channel where the bot will log if a channel meets the banned word criteria. If channel is omitted, the log channel will be disabled.
|
Sets the channel where the bot will log if a channel meets the banned word criteria. If channel is omitted, the log channel will be disabled.
|
||||||
|
|
||||||
### /blocklist
|
### /blocklist `Permission: MANAGE_GUILD`
|
||||||
#### /blocklist get
|
#### /blocklist get
|
||||||
Gets the global and server specific banned word list and returns it
|
Returns the global and server specific banned word list and returns it (Same behaviour as /showblocklist)
|
||||||
|
|
||||||
#### /blocklist add [word]
|
#### /blocklist add [word]
|
||||||
Adds the word to the server specific blocklist
|
Adds the word to the server specific blocklist
|
||||||
@ -15,9 +15,21 @@ Adds the word to the server specific blocklist
|
|||||||
#### /blocklist remove [word]
|
#### /blocklist remove [word]
|
||||||
Removes the word from the server specific blocklist
|
Removes the word from the server specific blocklist
|
||||||
|
|
||||||
### /info
|
### /info `Permission: EVERYONE`
|
||||||
Returns general information about the bot and the servers stats
|
Returns general information about the bot and the servers stats
|
||||||
|
|
||||||
|
### /preservesettings `Permission: ADMINISTRATOR`
|
||||||
|
Changes the behaviour when the bot leaves the server.
|
||||||
|
Options are:
|
||||||
|
- Keep settings persistent even if the bot leaves
|
||||||
|
- Delete setting when the bot leaves the server [default]
|
||||||
|
|
||||||
|
### /showblocklist `Permission: MANAGE_CHANNELS`
|
||||||
|
Returns the global and server specific banned word list and returns it
|
||||||
|
|
||||||
|
### /showsettings `Permission: MANAGE_GUILD`
|
||||||
|
Returns the current settings for the server
|
||||||
|
|
||||||
## Environment variables
|
## Environment variables
|
||||||
| Name | Description | Required | Example |
|
| Name | Description | Required | Example |
|
||||||
| :--------------- | :------------------------------------------------------------------------------ | :------: | :------------------ |
|
| :--------------- | :------------------------------------------------------------------------------ | :------: | :------------------ |
|
||||||
|
@ -3,6 +3,8 @@ services:
|
|||||||
app:
|
app:
|
||||||
image: astrogd/white-leopard:dev
|
image: astrogd/white-leopard:dev
|
||||||
build: ./
|
build: ./
|
||||||
|
ports:
|
||||||
|
- 80:80
|
||||||
tty: true
|
tty: true
|
||||||
stdin_open: true
|
stdin_open: true
|
||||||
depends_on:
|
depends_on:
|
||||||
|
2
index.ts
2
index.ts
@ -4,10 +4,12 @@ import swapConsole from "./src/tools/consoleSwapper";
|
|||||||
config();
|
config();
|
||||||
swapConsole();
|
swapConsole();
|
||||||
|
|
||||||
|
import "./src/tools/startupTime";
|
||||||
import "./src/client/init";
|
import "./src/client/init";
|
||||||
import "./src/commands";
|
import "./src/commands";
|
||||||
import "./src/events";
|
import "./src/events";
|
||||||
import "./src/cli";
|
import "./src/cli";
|
||||||
|
import "./src/service";
|
||||||
import client from "./src/client";
|
import client from "./src/client";
|
||||||
|
|
||||||
function shutdown() {
|
function shutdown() {
|
||||||
|
651
package-lock.json
generated
651
package-lock.json
generated
@ -11,12 +11,14 @@
|
|||||||
"dependencies": {
|
"dependencies": {
|
||||||
"discord.js": "^14.6.0",
|
"discord.js": "^14.6.0",
|
||||||
"dotenv": "^16.0.3",
|
"dotenv": "^16.0.3",
|
||||||
|
"express": "^4.18.2",
|
||||||
"fs-extra": "^10.1.0",
|
"fs-extra": "^10.1.0",
|
||||||
"moment": "^2.29.4",
|
"moment": "^2.29.4",
|
||||||
"pg": "^8.8.0",
|
"pg": "^8.8.0",
|
||||||
"typeorm": "^0.3.10"
|
"typeorm": "^0.3.10"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
"@types/express": "^4.17.14",
|
||||||
"@types/fs-extra": "^9.0.13",
|
"@types/fs-extra": "^9.0.13",
|
||||||
"@types/node": "^18.11.9",
|
"@types/node": "^18.11.9",
|
||||||
"rimraf": "^3.0.2",
|
"rimraf": "^3.0.2",
|
||||||
@ -177,6 +179,48 @@
|
|||||||
"integrity": "sha512-yOlFc+7UtL/89t2ZhjPvvB/DeAr3r+Dq58IgzsFkOAvVC6NMJXmCGjbptdXdR9qsX7pKcTL+s87FtYREi2dEEQ==",
|
"integrity": "sha512-yOlFc+7UtL/89t2ZhjPvvB/DeAr3r+Dq58IgzsFkOAvVC6NMJXmCGjbptdXdR9qsX7pKcTL+s87FtYREi2dEEQ==",
|
||||||
"devOptional": true
|
"devOptional": true
|
||||||
},
|
},
|
||||||
|
"node_modules/@types/body-parser": {
|
||||||
|
"version": "1.19.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/@types/body-parser/-/body-parser-1.19.2.tgz",
|
||||||
|
"integrity": "sha512-ALYone6pm6QmwZoAgeyNksccT9Q4AWZQ6PvfwR37GT6r6FWUPguq6sUmNGSMV2Wr761oQoBxwGGa6DR5o1DC9g==",
|
||||||
|
"dev": true,
|
||||||
|
"dependencies": {
|
||||||
|
"@types/connect": "*",
|
||||||
|
"@types/node": "*"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@types/connect": {
|
||||||
|
"version": "3.4.35",
|
||||||
|
"resolved": "https://registry.npmjs.org/@types/connect/-/connect-3.4.35.tgz",
|
||||||
|
"integrity": "sha512-cdeYyv4KWoEgpBISTxWvqYsVy444DOqehiF3fM3ne10AmJ62RSyNkUnxMJXHQWRQQX2eR94m5y1IZyDwBjV9FQ==",
|
||||||
|
"dev": true,
|
||||||
|
"dependencies": {
|
||||||
|
"@types/node": "*"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@types/express": {
|
||||||
|
"version": "4.17.14",
|
||||||
|
"resolved": "https://registry.npmjs.org/@types/express/-/express-4.17.14.tgz",
|
||||||
|
"integrity": "sha512-TEbt+vaPFQ+xpxFLFssxUDXj5cWCxZJjIcB7Yg0k0GMHGtgtQgpvx/MUQUeAkNbA9AAGrwkAsoeItdTgS7FMyg==",
|
||||||
|
"dev": true,
|
||||||
|
"dependencies": {
|
||||||
|
"@types/body-parser": "*",
|
||||||
|
"@types/express-serve-static-core": "^4.17.18",
|
||||||
|
"@types/qs": "*",
|
||||||
|
"@types/serve-static": "*"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@types/express-serve-static-core": {
|
||||||
|
"version": "4.17.31",
|
||||||
|
"resolved": "https://registry.npmjs.org/@types/express-serve-static-core/-/express-serve-static-core-4.17.31.tgz",
|
||||||
|
"integrity": "sha512-DxMhY+NAsTwMMFHBTtJFNp5qiHKJ7TeqOo23zVEM9alT1Ml27Q3xcTH0xwxn7Q0BbMcVEJOs/7aQtUWupUQN3Q==",
|
||||||
|
"dev": true,
|
||||||
|
"dependencies": {
|
||||||
|
"@types/node": "*",
|
||||||
|
"@types/qs": "*",
|
||||||
|
"@types/range-parser": "*"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/@types/fs-extra": {
|
"node_modules/@types/fs-extra": {
|
||||||
"version": "9.0.13",
|
"version": "9.0.13",
|
||||||
"resolved": "https://registry.npmjs.org/@types/fs-extra/-/fs-extra-9.0.13.tgz",
|
"resolved": "https://registry.npmjs.org/@types/fs-extra/-/fs-extra-9.0.13.tgz",
|
||||||
@ -186,11 +230,39 @@
|
|||||||
"@types/node": "*"
|
"@types/node": "*"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/@types/mime": {
|
||||||
|
"version": "3.0.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/@types/mime/-/mime-3.0.1.tgz",
|
||||||
|
"integrity": "sha512-Y4XFY5VJAuw0FgAqPNd6NNoV44jbq9Bz2L7Rh/J6jLTiHBSBJa9fxqQIvkIld4GsoDOcCbvzOUAbLPsSKKg+uA==",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
"node_modules/@types/node": {
|
"node_modules/@types/node": {
|
||||||
"version": "18.11.9",
|
"version": "18.11.9",
|
||||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-18.11.9.tgz",
|
"resolved": "https://registry.npmjs.org/@types/node/-/node-18.11.9.tgz",
|
||||||
"integrity": "sha512-CRpX21/kGdzjOpFsZSkcrXMGIBWMGNIHXXBVFSH+ggkftxg+XYP20TESbh+zFvFj3EQOl5byk0HTRn1IL6hbqg=="
|
"integrity": "sha512-CRpX21/kGdzjOpFsZSkcrXMGIBWMGNIHXXBVFSH+ggkftxg+XYP20TESbh+zFvFj3EQOl5byk0HTRn1IL6hbqg=="
|
||||||
},
|
},
|
||||||
|
"node_modules/@types/qs": {
|
||||||
|
"version": "6.9.7",
|
||||||
|
"resolved": "https://registry.npmjs.org/@types/qs/-/qs-6.9.7.tgz",
|
||||||
|
"integrity": "sha512-FGa1F62FT09qcrueBA6qYTrJPVDzah9a+493+o2PCXsesWHIn27G98TsSMs3WPNbZIEj4+VJf6saSFpvD+3Zsw==",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
|
"node_modules/@types/range-parser": {
|
||||||
|
"version": "1.2.4",
|
||||||
|
"resolved": "https://registry.npmjs.org/@types/range-parser/-/range-parser-1.2.4.tgz",
|
||||||
|
"integrity": "sha512-EEhsLsD6UsDM1yFhAvy0Cjr6VwmpMWqFBCb9w07wVugF7w9nfajxLuVmngTIpgS6svCnm6Vaw+MZhoDCKnOfsw==",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
|
"node_modules/@types/serve-static": {
|
||||||
|
"version": "1.15.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/@types/serve-static/-/serve-static-1.15.0.tgz",
|
||||||
|
"integrity": "sha512-z5xyF6uh8CbjAu9760KDKsH2FcDxZ2tFCsA4HIMWE6IkiYMXfVoa+4f9KX+FN0ZLsaMw1WNG2ETLA6N+/YA+cg==",
|
||||||
|
"dev": true,
|
||||||
|
"dependencies": {
|
||||||
|
"@types/mime": "*",
|
||||||
|
"@types/node": "*"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/@types/ws": {
|
"node_modules/@types/ws": {
|
||||||
"version": "8.5.3",
|
"version": "8.5.3",
|
||||||
"resolved": "https://registry.npmjs.org/@types/ws/-/ws-8.5.3.tgz",
|
"resolved": "https://registry.npmjs.org/@types/ws/-/ws-8.5.3.tgz",
|
||||||
@ -199,6 +271,18 @@
|
|||||||
"@types/node": "*"
|
"@types/node": "*"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/accepts": {
|
||||||
|
"version": "1.3.8",
|
||||||
|
"resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.8.tgz",
|
||||||
|
"integrity": "sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw==",
|
||||||
|
"dependencies": {
|
||||||
|
"mime-types": "~2.1.34",
|
||||||
|
"negotiator": "0.6.3"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">= 0.6"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/acorn": {
|
"node_modules/acorn": {
|
||||||
"version": "8.8.1",
|
"version": "8.8.1",
|
||||||
"resolved": "https://registry.npmjs.org/acorn/-/acorn-8.8.1.tgz",
|
"resolved": "https://registry.npmjs.org/acorn/-/acorn-8.8.1.tgz",
|
||||||
@ -266,6 +350,11 @@
|
|||||||
"resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz",
|
"resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz",
|
||||||
"integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q=="
|
"integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q=="
|
||||||
},
|
},
|
||||||
|
"node_modules/array-flatten": {
|
||||||
|
"version": "1.1.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz",
|
||||||
|
"integrity": "sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg=="
|
||||||
|
},
|
||||||
"node_modules/balanced-match": {
|
"node_modules/balanced-match": {
|
||||||
"version": "1.0.2",
|
"version": "1.0.2",
|
||||||
"resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz",
|
"resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz",
|
||||||
@ -290,6 +379,42 @@
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
"node_modules/body-parser": {
|
||||||
|
"version": "1.20.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.1.tgz",
|
||||||
|
"integrity": "sha512-jWi7abTbYwajOytWCQc37VulmWiRae5RyTpaCyDcS5/lMdtwSz5lOpDE67srw/HYe35f1z3fDQw+3txg7gNtWw==",
|
||||||
|
"dependencies": {
|
||||||
|
"bytes": "3.1.2",
|
||||||
|
"content-type": "~1.0.4",
|
||||||
|
"debug": "2.6.9",
|
||||||
|
"depd": "2.0.0",
|
||||||
|
"destroy": "1.2.0",
|
||||||
|
"http-errors": "2.0.0",
|
||||||
|
"iconv-lite": "0.4.24",
|
||||||
|
"on-finished": "2.4.1",
|
||||||
|
"qs": "6.11.0",
|
||||||
|
"raw-body": "2.5.1",
|
||||||
|
"type-is": "~1.6.18",
|
||||||
|
"unpipe": "1.0.0"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">= 0.8",
|
||||||
|
"npm": "1.2.8000 || >= 1.4.16"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/body-parser/node_modules/debug": {
|
||||||
|
"version": "2.6.9",
|
||||||
|
"resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",
|
||||||
|
"integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==",
|
||||||
|
"dependencies": {
|
||||||
|
"ms": "2.0.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/body-parser/node_modules/ms": {
|
||||||
|
"version": "2.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
|
||||||
|
"integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A=="
|
||||||
|
},
|
||||||
"node_modules/brace-expansion": {
|
"node_modules/brace-expansion": {
|
||||||
"version": "1.1.11",
|
"version": "1.1.11",
|
||||||
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz",
|
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz",
|
||||||
@ -341,6 +466,26 @@
|
|||||||
"node": ">=10.16.0"
|
"node": ">=10.16.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/bytes": {
|
||||||
|
"version": "3.1.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz",
|
||||||
|
"integrity": "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==",
|
||||||
|
"engines": {
|
||||||
|
"node": ">= 0.8"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/call-bind": {
|
||||||
|
"version": "1.0.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz",
|
||||||
|
"integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==",
|
||||||
|
"dependencies": {
|
||||||
|
"function-bind": "^1.1.1",
|
||||||
|
"get-intrinsic": "^1.0.2"
|
||||||
|
},
|
||||||
|
"funding": {
|
||||||
|
"url": "https://github.com/sponsors/ljharb"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/chalk": {
|
"node_modules/chalk": {
|
||||||
"version": "4.1.2",
|
"version": "4.1.2",
|
||||||
"resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz",
|
"resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz",
|
||||||
@ -445,6 +590,38 @@
|
|||||||
"resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz",
|
"resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz",
|
||||||
"integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg=="
|
"integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg=="
|
||||||
},
|
},
|
||||||
|
"node_modules/content-disposition": {
|
||||||
|
"version": "0.5.4",
|
||||||
|
"resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.4.tgz",
|
||||||
|
"integrity": "sha512-FveZTNuGw04cxlAiWbzi6zTAL/lhehaWbTtgluJh4/E95DqMwTmha3KZN1aAWA8cFIhHzMZUvLevkw5Rqk+tSQ==",
|
||||||
|
"dependencies": {
|
||||||
|
"safe-buffer": "5.2.1"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">= 0.6"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/content-type": {
|
||||||
|
"version": "1.0.4",
|
||||||
|
"resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.4.tgz",
|
||||||
|
"integrity": "sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA==",
|
||||||
|
"engines": {
|
||||||
|
"node": ">= 0.6"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/cookie": {
|
||||||
|
"version": "0.5.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/cookie/-/cookie-0.5.0.tgz",
|
||||||
|
"integrity": "sha512-YZ3GUyn/o8gfKJlnlX7g7xq4gyO6OSuhGPKaaGssGB2qgDUS0gPgtTvoyZLTt9Ab6dC4hfc9dV5arkvc/OCmrw==",
|
||||||
|
"engines": {
|
||||||
|
"node": ">= 0.6"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/cookie-signature": {
|
||||||
|
"version": "1.0.6",
|
||||||
|
"resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz",
|
||||||
|
"integrity": "sha512-QADzlaHc8icV8I7vbaJXJwod9HWYp8uCqf1xa4OfNu1T7JVxQIrUgOWtHdNDtPiywmFbiS12VjotIXLrKM3orQ=="
|
||||||
|
},
|
||||||
"node_modules/create-require": {
|
"node_modules/create-require": {
|
||||||
"version": "1.1.1",
|
"version": "1.1.1",
|
||||||
"resolved": "https://registry.npmjs.org/create-require/-/create-require-1.1.1.tgz",
|
"resolved": "https://registry.npmjs.org/create-require/-/create-require-1.1.1.tgz",
|
||||||
@ -479,6 +656,23 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/depd": {
|
||||||
|
"version": "2.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz",
|
||||||
|
"integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==",
|
||||||
|
"engines": {
|
||||||
|
"node": ">= 0.8"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/destroy": {
|
||||||
|
"version": "1.2.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/destroy/-/destroy-1.2.0.tgz",
|
||||||
|
"integrity": "sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg==",
|
||||||
|
"engines": {
|
||||||
|
"node": ">= 0.8",
|
||||||
|
"npm": "1.2.8000 || >= 1.4.16"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/diff": {
|
"node_modules/diff": {
|
||||||
"version": "4.0.2",
|
"version": "4.0.2",
|
||||||
"resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz",
|
"resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz",
|
||||||
@ -523,11 +717,24 @@
|
|||||||
"node": ">=12"
|
"node": ">=12"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/ee-first": {
|
||||||
|
"version": "1.1.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz",
|
||||||
|
"integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow=="
|
||||||
|
},
|
||||||
"node_modules/emoji-regex": {
|
"node_modules/emoji-regex": {
|
||||||
"version": "8.0.0",
|
"version": "8.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz",
|
||||||
"integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A=="
|
"integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A=="
|
||||||
},
|
},
|
||||||
|
"node_modules/encodeurl": {
|
||||||
|
"version": "1.0.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz",
|
||||||
|
"integrity": "sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w==",
|
||||||
|
"engines": {
|
||||||
|
"node": ">= 0.8"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/escalade": {
|
"node_modules/escalade": {
|
||||||
"version": "3.1.1",
|
"version": "3.1.1",
|
||||||
"resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz",
|
"resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz",
|
||||||
@ -536,6 +743,73 @@
|
|||||||
"node": ">=6"
|
"node": ">=6"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/escape-html": {
|
||||||
|
"version": "1.0.3",
|
||||||
|
"resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz",
|
||||||
|
"integrity": "sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow=="
|
||||||
|
},
|
||||||
|
"node_modules/etag": {
|
||||||
|
"version": "1.8.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz",
|
||||||
|
"integrity": "sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg==",
|
||||||
|
"engines": {
|
||||||
|
"node": ">= 0.6"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/express": {
|
||||||
|
"version": "4.18.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/express/-/express-4.18.2.tgz",
|
||||||
|
"integrity": "sha512-5/PsL6iGPdfQ/lKM1UuielYgv3BUoJfz1aUwU9vHZ+J7gyvwdQXFEBIEIaxeGf0GIcreATNyBExtalisDbuMqQ==",
|
||||||
|
"dependencies": {
|
||||||
|
"accepts": "~1.3.8",
|
||||||
|
"array-flatten": "1.1.1",
|
||||||
|
"body-parser": "1.20.1",
|
||||||
|
"content-disposition": "0.5.4",
|
||||||
|
"content-type": "~1.0.4",
|
||||||
|
"cookie": "0.5.0",
|
||||||
|
"cookie-signature": "1.0.6",
|
||||||
|
"debug": "2.6.9",
|
||||||
|
"depd": "2.0.0",
|
||||||
|
"encodeurl": "~1.0.2",
|
||||||
|
"escape-html": "~1.0.3",
|
||||||
|
"etag": "~1.8.1",
|
||||||
|
"finalhandler": "1.2.0",
|
||||||
|
"fresh": "0.5.2",
|
||||||
|
"http-errors": "2.0.0",
|
||||||
|
"merge-descriptors": "1.0.1",
|
||||||
|
"methods": "~1.1.2",
|
||||||
|
"on-finished": "2.4.1",
|
||||||
|
"parseurl": "~1.3.3",
|
||||||
|
"path-to-regexp": "0.1.7",
|
||||||
|
"proxy-addr": "~2.0.7",
|
||||||
|
"qs": "6.11.0",
|
||||||
|
"range-parser": "~1.2.1",
|
||||||
|
"safe-buffer": "5.2.1",
|
||||||
|
"send": "0.18.0",
|
||||||
|
"serve-static": "1.15.0",
|
||||||
|
"setprototypeof": "1.2.0",
|
||||||
|
"statuses": "2.0.1",
|
||||||
|
"type-is": "~1.6.18",
|
||||||
|
"utils-merge": "1.0.1",
|
||||||
|
"vary": "~1.1.2"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">= 0.10.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/express/node_modules/debug": {
|
||||||
|
"version": "2.6.9",
|
||||||
|
"resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",
|
||||||
|
"integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==",
|
||||||
|
"dependencies": {
|
||||||
|
"ms": "2.0.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/express/node_modules/ms": {
|
||||||
|
"version": "2.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
|
||||||
|
"integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A=="
|
||||||
|
},
|
||||||
"node_modules/fast-deep-equal": {
|
"node_modules/fast-deep-equal": {
|
||||||
"version": "3.1.3",
|
"version": "3.1.3",
|
||||||
"resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz",
|
"resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz",
|
||||||
@ -557,6 +831,52 @@
|
|||||||
"url": "https://github.com/sindresorhus/file-type?sponsor=1"
|
"url": "https://github.com/sindresorhus/file-type?sponsor=1"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/finalhandler": {
|
||||||
|
"version": "1.2.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.2.0.tgz",
|
||||||
|
"integrity": "sha512-5uXcUVftlQMFnWC9qu/svkWv3GTd2PfUhK/3PLkYNAe7FbqJMt3515HaxE6eRL74GdsriiwujiawdaB1BpEISg==",
|
||||||
|
"dependencies": {
|
||||||
|
"debug": "2.6.9",
|
||||||
|
"encodeurl": "~1.0.2",
|
||||||
|
"escape-html": "~1.0.3",
|
||||||
|
"on-finished": "2.4.1",
|
||||||
|
"parseurl": "~1.3.3",
|
||||||
|
"statuses": "2.0.1",
|
||||||
|
"unpipe": "~1.0.0"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">= 0.8"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/finalhandler/node_modules/debug": {
|
||||||
|
"version": "2.6.9",
|
||||||
|
"resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",
|
||||||
|
"integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==",
|
||||||
|
"dependencies": {
|
||||||
|
"ms": "2.0.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/finalhandler/node_modules/ms": {
|
||||||
|
"version": "2.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
|
||||||
|
"integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A=="
|
||||||
|
},
|
||||||
|
"node_modules/forwarded": {
|
||||||
|
"version": "0.2.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.2.0.tgz",
|
||||||
|
"integrity": "sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow==",
|
||||||
|
"engines": {
|
||||||
|
"node": ">= 0.6"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/fresh": {
|
||||||
|
"version": "0.5.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz",
|
||||||
|
"integrity": "sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q==",
|
||||||
|
"engines": {
|
||||||
|
"node": ">= 0.6"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/fs-extra": {
|
"node_modules/fs-extra": {
|
||||||
"version": "10.1.0",
|
"version": "10.1.0",
|
||||||
"resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-10.1.0.tgz",
|
"resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-10.1.0.tgz",
|
||||||
@ -578,8 +898,7 @@
|
|||||||
"node_modules/function-bind": {
|
"node_modules/function-bind": {
|
||||||
"version": "1.1.1",
|
"version": "1.1.1",
|
||||||
"resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz",
|
"resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz",
|
||||||
"integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==",
|
"integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A=="
|
||||||
"dev": true
|
|
||||||
},
|
},
|
||||||
"node_modules/get-caller-file": {
|
"node_modules/get-caller-file": {
|
||||||
"version": "2.0.5",
|
"version": "2.0.5",
|
||||||
@ -589,6 +908,19 @@
|
|||||||
"node": "6.* || 8.* || >= 10.*"
|
"node": "6.* || 8.* || >= 10.*"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/get-intrinsic": {
|
||||||
|
"version": "1.1.3",
|
||||||
|
"resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.1.3.tgz",
|
||||||
|
"integrity": "sha512-QJVz1Tj7MS099PevUG5jvnt9tSkXN8K14dxQlikJuPt4uD9hHAHjLyLBiLR5zELelBdD9QNRAXZzsJx0WaDL9A==",
|
||||||
|
"dependencies": {
|
||||||
|
"function-bind": "^1.1.1",
|
||||||
|
"has": "^1.0.3",
|
||||||
|
"has-symbols": "^1.0.3"
|
||||||
|
},
|
||||||
|
"funding": {
|
||||||
|
"url": "https://github.com/sponsors/ljharb"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/glob": {
|
"node_modules/glob": {
|
||||||
"version": "7.2.3",
|
"version": "7.2.3",
|
||||||
"resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz",
|
"resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz",
|
||||||
@ -617,7 +949,6 @@
|
|||||||
"version": "1.0.3",
|
"version": "1.0.3",
|
||||||
"resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz",
|
"resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz",
|
||||||
"integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==",
|
"integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==",
|
||||||
"dev": true,
|
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"function-bind": "^1.1.1"
|
"function-bind": "^1.1.1"
|
||||||
},
|
},
|
||||||
@ -633,6 +964,17 @@
|
|||||||
"node": ">=8"
|
"node": ">=8"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/has-symbols": {
|
||||||
|
"version": "1.0.3",
|
||||||
|
"resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz",
|
||||||
|
"integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==",
|
||||||
|
"engines": {
|
||||||
|
"node": ">= 0.4"
|
||||||
|
},
|
||||||
|
"funding": {
|
||||||
|
"url": "https://github.com/sponsors/ljharb"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/highlight.js": {
|
"node_modules/highlight.js": {
|
||||||
"version": "10.7.3",
|
"version": "10.7.3",
|
||||||
"resolved": "https://registry.npmjs.org/highlight.js/-/highlight.js-10.7.3.tgz",
|
"resolved": "https://registry.npmjs.org/highlight.js/-/highlight.js-10.7.3.tgz",
|
||||||
@ -641,6 +983,32 @@
|
|||||||
"node": "*"
|
"node": "*"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/http-errors": {
|
||||||
|
"version": "2.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.0.tgz",
|
||||||
|
"integrity": "sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ==",
|
||||||
|
"dependencies": {
|
||||||
|
"depd": "2.0.0",
|
||||||
|
"inherits": "2.0.4",
|
||||||
|
"setprototypeof": "1.2.0",
|
||||||
|
"statuses": "2.0.1",
|
||||||
|
"toidentifier": "1.0.1"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">= 0.8"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/iconv-lite": {
|
||||||
|
"version": "0.4.24",
|
||||||
|
"resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz",
|
||||||
|
"integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==",
|
||||||
|
"dependencies": {
|
||||||
|
"safer-buffer": ">= 2.1.2 < 3"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">=0.10.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/ieee754": {
|
"node_modules/ieee754": {
|
||||||
"version": "1.2.1",
|
"version": "1.2.1",
|
||||||
"resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz",
|
"resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz",
|
||||||
@ -683,6 +1051,14 @@
|
|||||||
"node": ">= 0.10"
|
"node": ">= 0.10"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/ipaddr.js": {
|
||||||
|
"version": "1.9.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz",
|
||||||
|
"integrity": "sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==",
|
||||||
|
"engines": {
|
||||||
|
"node": ">= 0.10"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/is-core-module": {
|
"node_modules/is-core-module": {
|
||||||
"version": "2.11.0",
|
"version": "2.11.0",
|
||||||
"resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.11.0.tgz",
|
"resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.11.0.tgz",
|
||||||
@ -741,6 +1117,57 @@
|
|||||||
"integrity": "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==",
|
"integrity": "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==",
|
||||||
"devOptional": true
|
"devOptional": true
|
||||||
},
|
},
|
||||||
|
"node_modules/media-typer": {
|
||||||
|
"version": "0.3.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz",
|
||||||
|
"integrity": "sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ==",
|
||||||
|
"engines": {
|
||||||
|
"node": ">= 0.6"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/merge-descriptors": {
|
||||||
|
"version": "1.0.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz",
|
||||||
|
"integrity": "sha512-cCi6g3/Zr1iqQi6ySbseM1Xvooa98N0w31jzUYrXPX2xqObmFGHJ0tQ5u74H3mVh7wLouTseZyYIq39g8cNp1w=="
|
||||||
|
},
|
||||||
|
"node_modules/methods": {
|
||||||
|
"version": "1.1.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz",
|
||||||
|
"integrity": "sha512-iclAHeNqNm68zFtnZ0e+1L2yUIdvzNoauKU4WBA3VvH/vPFieF7qfRlwUZU+DA9P9bPXIS90ulxoUoCH23sV2w==",
|
||||||
|
"engines": {
|
||||||
|
"node": ">= 0.6"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/mime": {
|
||||||
|
"version": "1.6.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz",
|
||||||
|
"integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==",
|
||||||
|
"bin": {
|
||||||
|
"mime": "cli.js"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">=4"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/mime-db": {
|
||||||
|
"version": "1.52.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz",
|
||||||
|
"integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==",
|
||||||
|
"engines": {
|
||||||
|
"node": ">= 0.6"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/mime-types": {
|
||||||
|
"version": "2.1.35",
|
||||||
|
"resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz",
|
||||||
|
"integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==",
|
||||||
|
"dependencies": {
|
||||||
|
"mime-db": "1.52.0"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">= 0.6"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/minimatch": {
|
"node_modules/minimatch": {
|
||||||
"version": "3.1.2",
|
"version": "3.1.2",
|
||||||
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz",
|
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz",
|
||||||
@ -795,6 +1222,14 @@
|
|||||||
"thenify-all": "^1.0.0"
|
"thenify-all": "^1.0.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/negotiator": {
|
||||||
|
"version": "0.6.3",
|
||||||
|
"resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz",
|
||||||
|
"integrity": "sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==",
|
||||||
|
"engines": {
|
||||||
|
"node": ">= 0.6"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/object-assign": {
|
"node_modules/object-assign": {
|
||||||
"version": "4.1.1",
|
"version": "4.1.1",
|
||||||
"resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz",
|
"resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz",
|
||||||
@ -803,6 +1238,25 @@
|
|||||||
"node": ">=0.10.0"
|
"node": ">=0.10.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/object-inspect": {
|
||||||
|
"version": "1.12.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.12.2.tgz",
|
||||||
|
"integrity": "sha512-z+cPxW0QGUp0mcqcsgQyLVRDoXFQbXOwBaqyF7VIgI4TWNQsDHrBpUQslRmIfAoYWdYzs6UlKJtB2XJpTaNSpQ==",
|
||||||
|
"funding": {
|
||||||
|
"url": "https://github.com/sponsors/ljharb"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/on-finished": {
|
||||||
|
"version": "2.4.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.4.1.tgz",
|
||||||
|
"integrity": "sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==",
|
||||||
|
"dependencies": {
|
||||||
|
"ee-first": "1.1.1"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">= 0.8"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/once": {
|
"node_modules/once": {
|
||||||
"version": "1.4.0",
|
"version": "1.4.0",
|
||||||
"resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz",
|
"resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz",
|
||||||
@ -834,6 +1288,14 @@
|
|||||||
"resolved": "https://registry.npmjs.org/parse5/-/parse5-6.0.1.tgz",
|
"resolved": "https://registry.npmjs.org/parse5/-/parse5-6.0.1.tgz",
|
||||||
"integrity": "sha512-Ofn/CTFzRGTTxwpNEs9PP93gXShHcTq255nzRYSKe8AkVpZY7e1fpmTfOyoIvjP5HG7Z2ZM7VS9PPhQGW2pOpw=="
|
"integrity": "sha512-Ofn/CTFzRGTTxwpNEs9PP93gXShHcTq255nzRYSKe8AkVpZY7e1fpmTfOyoIvjP5HG7Z2ZM7VS9PPhQGW2pOpw=="
|
||||||
},
|
},
|
||||||
|
"node_modules/parseurl": {
|
||||||
|
"version": "1.3.3",
|
||||||
|
"resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz",
|
||||||
|
"integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==",
|
||||||
|
"engines": {
|
||||||
|
"node": ">= 0.8"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/path-is-absolute": {
|
"node_modules/path-is-absolute": {
|
||||||
"version": "1.0.1",
|
"version": "1.0.1",
|
||||||
"resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz",
|
"resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz",
|
||||||
@ -848,6 +1310,11 @@
|
|||||||
"integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==",
|
"integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
|
"node_modules/path-to-regexp": {
|
||||||
|
"version": "0.1.7",
|
||||||
|
"resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz",
|
||||||
|
"integrity": "sha512-5DFkuoqlv1uYQKxy8omFBeJPQcdoE07Kv2sferDCrAq1ohOU+MSDswDIbnx3YAM60qIOnYa53wBhXW0EbMonrQ=="
|
||||||
|
},
|
||||||
"node_modules/peek-readable": {
|
"node_modules/peek-readable": {
|
||||||
"version": "5.0.0",
|
"version": "5.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/peek-readable/-/peek-readable-5.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/peek-readable/-/peek-readable-5.0.0.tgz",
|
||||||
@ -969,6 +1436,54 @@
|
|||||||
"node": ">=0.10.0"
|
"node": ">=0.10.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/proxy-addr": {
|
||||||
|
"version": "2.0.7",
|
||||||
|
"resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.7.tgz",
|
||||||
|
"integrity": "sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg==",
|
||||||
|
"dependencies": {
|
||||||
|
"forwarded": "0.2.0",
|
||||||
|
"ipaddr.js": "1.9.1"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">= 0.10"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/qs": {
|
||||||
|
"version": "6.11.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/qs/-/qs-6.11.0.tgz",
|
||||||
|
"integrity": "sha512-MvjoMCJwEarSbUYk5O+nmoSzSutSsTwF85zcHPQ9OrlFoZOYIjaqBAJIqIXjptyD5vThxGq52Xu/MaJzRkIk4Q==",
|
||||||
|
"dependencies": {
|
||||||
|
"side-channel": "^1.0.4"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">=0.6"
|
||||||
|
},
|
||||||
|
"funding": {
|
||||||
|
"url": "https://github.com/sponsors/ljharb"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/range-parser": {
|
||||||
|
"version": "1.2.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz",
|
||||||
|
"integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==",
|
||||||
|
"engines": {
|
||||||
|
"node": ">= 0.6"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/raw-body": {
|
||||||
|
"version": "2.5.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.5.1.tgz",
|
||||||
|
"integrity": "sha512-qqJBtEyVgS0ZmPGdCFPWJ3FreoqvG4MVQln/kCgF7Olq95IbOp0/BWyMwbdtn4VTvkM8Y7khCQ2Xgk/tcrCXig==",
|
||||||
|
"dependencies": {
|
||||||
|
"bytes": "3.1.2",
|
||||||
|
"http-errors": "2.0.0",
|
||||||
|
"iconv-lite": "0.4.24",
|
||||||
|
"unpipe": "1.0.0"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">= 0.8"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/readable-stream": {
|
"node_modules/readable-stream": {
|
||||||
"version": "3.6.0",
|
"version": "3.6.0",
|
||||||
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz",
|
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz",
|
||||||
@ -1073,11 +1588,76 @@
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
"node_modules/safer-buffer": {
|
||||||
|
"version": "2.1.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz",
|
||||||
|
"integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg=="
|
||||||
|
},
|
||||||
"node_modules/sax": {
|
"node_modules/sax": {
|
||||||
"version": "1.2.4",
|
"version": "1.2.4",
|
||||||
"resolved": "https://registry.npmjs.org/sax/-/sax-1.2.4.tgz",
|
"resolved": "https://registry.npmjs.org/sax/-/sax-1.2.4.tgz",
|
||||||
"integrity": "sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw=="
|
"integrity": "sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw=="
|
||||||
},
|
},
|
||||||
|
"node_modules/send": {
|
||||||
|
"version": "0.18.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/send/-/send-0.18.0.tgz",
|
||||||
|
"integrity": "sha512-qqWzuOjSFOuqPjFe4NOsMLafToQQwBSOEpS+FwEt3A2V3vKubTquT3vmLTQpFgMXp8AlFWFuP1qKaJZOtPpVXg==",
|
||||||
|
"dependencies": {
|
||||||
|
"debug": "2.6.9",
|
||||||
|
"depd": "2.0.0",
|
||||||
|
"destroy": "1.2.0",
|
||||||
|
"encodeurl": "~1.0.2",
|
||||||
|
"escape-html": "~1.0.3",
|
||||||
|
"etag": "~1.8.1",
|
||||||
|
"fresh": "0.5.2",
|
||||||
|
"http-errors": "2.0.0",
|
||||||
|
"mime": "1.6.0",
|
||||||
|
"ms": "2.1.3",
|
||||||
|
"on-finished": "2.4.1",
|
||||||
|
"range-parser": "~1.2.1",
|
||||||
|
"statuses": "2.0.1"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">= 0.8.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/send/node_modules/debug": {
|
||||||
|
"version": "2.6.9",
|
||||||
|
"resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",
|
||||||
|
"integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==",
|
||||||
|
"dependencies": {
|
||||||
|
"ms": "2.0.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/send/node_modules/debug/node_modules/ms": {
|
||||||
|
"version": "2.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
|
||||||
|
"integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A=="
|
||||||
|
},
|
||||||
|
"node_modules/send/node_modules/ms": {
|
||||||
|
"version": "2.1.3",
|
||||||
|
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
|
||||||
|
"integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA=="
|
||||||
|
},
|
||||||
|
"node_modules/serve-static": {
|
||||||
|
"version": "1.15.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.15.0.tgz",
|
||||||
|
"integrity": "sha512-XGuRDNjXUijsUL0vl6nSD7cwURuzEgglbOaFuZM9g3kwDXOWVTck0jLzjPzGD+TazWbboZYu52/9/XPdUgne9g==",
|
||||||
|
"dependencies": {
|
||||||
|
"encodeurl": "~1.0.2",
|
||||||
|
"escape-html": "~1.0.3",
|
||||||
|
"parseurl": "~1.3.3",
|
||||||
|
"send": "0.18.0"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">= 0.8.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/setprototypeof": {
|
||||||
|
"version": "1.2.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz",
|
||||||
|
"integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw=="
|
||||||
|
},
|
||||||
"node_modules/sha.js": {
|
"node_modules/sha.js": {
|
||||||
"version": "2.4.11",
|
"version": "2.4.11",
|
||||||
"resolved": "https://registry.npmjs.org/sha.js/-/sha.js-2.4.11.tgz",
|
"resolved": "https://registry.npmjs.org/sha.js/-/sha.js-2.4.11.tgz",
|
||||||
@ -1123,6 +1703,19 @@
|
|||||||
"node": ">=6"
|
"node": ">=6"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/side-channel": {
|
||||||
|
"version": "1.0.4",
|
||||||
|
"resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.4.tgz",
|
||||||
|
"integrity": "sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==",
|
||||||
|
"dependencies": {
|
||||||
|
"call-bind": "^1.0.0",
|
||||||
|
"get-intrinsic": "^1.0.2",
|
||||||
|
"object-inspect": "^1.9.0"
|
||||||
|
},
|
||||||
|
"funding": {
|
||||||
|
"url": "https://github.com/sponsors/ljharb"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/split2": {
|
"node_modules/split2": {
|
||||||
"version": "4.1.0",
|
"version": "4.1.0",
|
||||||
"resolved": "https://registry.npmjs.org/split2/-/split2-4.1.0.tgz",
|
"resolved": "https://registry.npmjs.org/split2/-/split2-4.1.0.tgz",
|
||||||
@ -1131,6 +1724,14 @@
|
|||||||
"node": ">= 10.x"
|
"node": ">= 10.x"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/statuses": {
|
||||||
|
"version": "2.0.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz",
|
||||||
|
"integrity": "sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==",
|
||||||
|
"engines": {
|
||||||
|
"node": ">= 0.8"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/streamsearch": {
|
"node_modules/streamsearch": {
|
||||||
"version": "1.1.0",
|
"version": "1.1.0",
|
||||||
"resolved": "https://registry.npmjs.org/streamsearch/-/streamsearch-1.1.0.tgz",
|
"resolved": "https://registry.npmjs.org/streamsearch/-/streamsearch-1.1.0.tgz",
|
||||||
@ -1229,6 +1830,14 @@
|
|||||||
"node": ">=0.8"
|
"node": ">=0.8"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/toidentifier": {
|
||||||
|
"version": "1.0.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.1.tgz",
|
||||||
|
"integrity": "sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==",
|
||||||
|
"engines": {
|
||||||
|
"node": ">=0.6"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/token-types": {
|
"node_modules/token-types": {
|
||||||
"version": "5.0.1",
|
"version": "5.0.1",
|
||||||
"resolved": "https://registry.npmjs.org/token-types/-/token-types-5.0.1.tgz",
|
"resolved": "https://registry.npmjs.org/token-types/-/token-types-5.0.1.tgz",
|
||||||
@ -1298,6 +1907,18 @@
|
|||||||
"resolved": "https://registry.npmjs.org/tslib/-/tslib-2.4.1.tgz",
|
"resolved": "https://registry.npmjs.org/tslib/-/tslib-2.4.1.tgz",
|
||||||
"integrity": "sha512-tGyy4dAjRIEwI7BzsB0lynWgOpfqjUdq91XXAlIWD2OwKBH7oCl/GZG/HT4BOHrTlPMOASlMQ7veyTqpmRcrNA=="
|
"integrity": "sha512-tGyy4dAjRIEwI7BzsB0lynWgOpfqjUdq91XXAlIWD2OwKBH7oCl/GZG/HT4BOHrTlPMOASlMQ7veyTqpmRcrNA=="
|
||||||
},
|
},
|
||||||
|
"node_modules/type-is": {
|
||||||
|
"version": "1.6.18",
|
||||||
|
"resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz",
|
||||||
|
"integrity": "sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==",
|
||||||
|
"dependencies": {
|
||||||
|
"media-typer": "0.3.0",
|
||||||
|
"mime-types": "~2.1.24"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">= 0.6"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/typeorm": {
|
"node_modules/typeorm": {
|
||||||
"version": "0.3.10",
|
"version": "0.3.10",
|
||||||
"resolved": "https://registry.npmjs.org/typeorm/-/typeorm-0.3.10.tgz",
|
"resolved": "https://registry.npmjs.org/typeorm/-/typeorm-0.3.10.tgz",
|
||||||
@ -1437,11 +2058,27 @@
|
|||||||
"node": ">= 10.0.0"
|
"node": ">= 10.0.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/unpipe": {
|
||||||
|
"version": "1.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz",
|
||||||
|
"integrity": "sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==",
|
||||||
|
"engines": {
|
||||||
|
"node": ">= 0.8"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/util-deprecate": {
|
"node_modules/util-deprecate": {
|
||||||
"version": "1.0.2",
|
"version": "1.0.2",
|
||||||
"resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz",
|
"resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz",
|
||||||
"integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw=="
|
"integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw=="
|
||||||
},
|
},
|
||||||
|
"node_modules/utils-merge": {
|
||||||
|
"version": "1.0.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz",
|
||||||
|
"integrity": "sha512-pMZTvIkT1d+TFGvDOqodOclx0QWkkgi6Tdoa8gC8ffGAAqz9pzPTZWAybbsHHoED/ztMtkv/VoYTYyShUn81hA==",
|
||||||
|
"engines": {
|
||||||
|
"node": ">= 0.4.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/uuid": {
|
"node_modules/uuid": {
|
||||||
"version": "8.3.2",
|
"version": "8.3.2",
|
||||||
"resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz",
|
"resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz",
|
||||||
@ -1456,6 +2093,14 @@
|
|||||||
"integrity": "sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==",
|
"integrity": "sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==",
|
||||||
"devOptional": true
|
"devOptional": true
|
||||||
},
|
},
|
||||||
|
"node_modules/vary": {
|
||||||
|
"version": "1.1.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz",
|
||||||
|
"integrity": "sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==",
|
||||||
|
"engines": {
|
||||||
|
"node": ">= 0.8"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/wrap-ansi": {
|
"node_modules/wrap-ansi": {
|
||||||
"version": "7.0.0",
|
"version": "7.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz",
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "eu.astrogd.white-leopard",
|
"name": "eu.astrogd.white-leopard",
|
||||||
"version": "1.0.0-beta.1",
|
"version": "1.0.0-beta.3",
|
||||||
"description": "A Discord bot that checks channel names for blacklisted words and reverts the changes if necessary",
|
"description": "A Discord bot that checks channel names for blacklisted words and reverts the changes if necessary",
|
||||||
"main": "build/index.js",
|
"main": "build/index.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
@ -28,6 +28,7 @@
|
|||||||
},
|
},
|
||||||
"homepage": "https://github.com/r-Overwatch2/eu.astrogd.white-leopard#readme",
|
"homepage": "https://github.com/r-Overwatch2/eu.astrogd.white-leopard#readme",
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
"@types/express": "^4.17.14",
|
||||||
"@types/fs-extra": "^9.0.13",
|
"@types/fs-extra": "^9.0.13",
|
||||||
"@types/node": "^18.11.9",
|
"@types/node": "^18.11.9",
|
||||||
"rimraf": "^3.0.2",
|
"rimraf": "^3.0.2",
|
||||||
@ -38,6 +39,7 @@
|
|||||||
"dependencies": {
|
"dependencies": {
|
||||||
"discord.js": "^14.6.0",
|
"discord.js": "^14.6.0",
|
||||||
"dotenv": "^16.0.3",
|
"dotenv": "^16.0.3",
|
||||||
|
"express": "^4.18.2",
|
||||||
"fs-extra": "^10.1.0",
|
"fs-extra": "^10.1.0",
|
||||||
"moment": "^2.29.4",
|
"moment": "^2.29.4",
|
||||||
"pg": "^8.8.0",
|
"pg": "^8.8.0",
|
||||||
|
@ -22,6 +22,7 @@ export default async function execute(args: string[]) {
|
|||||||
|
|
||||||
console.log(`Guild ${args[1]}:
|
console.log(`Guild ${args[1]}:
|
||||||
- Premium: ${isPremium ? `ACTIVE for ${moment(settings.isPremiumUntil).fromNow(true)}` : "INACTIVE"}
|
- Premium: ${isPremium ? `ACTIVE for ${moment(settings.isPremiumUntil).fromNow(true)}` : "INACTIVE"}
|
||||||
|
- Preserve Settings: ${settings.preserveDataOnGuildLeave ? "ENABLED" : "DISABLED"}
|
||||||
- Logchannel: ${settings.notificationChannelID ? `ENABLED (${settings.notificationChannelID})` : "DISABLED"}
|
- Logchannel: ${settings.notificationChannelID ? `ENABLED (${settings.notificationChannelID})` : "DISABLED"}
|
||||||
- blocked Words: ${wordCount}`);
|
- blocked Words: ${wordCount}`);
|
||||||
break;
|
break;
|
||||||
@ -124,6 +125,21 @@ export default async function execute(args: string[]) {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
case "delete": {
|
||||||
|
if (!args[1]) return printHelp();
|
||||||
|
|
||||||
|
await database.getRepository(GuildSetting).delete({
|
||||||
|
id: args[1]
|
||||||
|
});
|
||||||
|
|
||||||
|
await database.getRepository(Badword).delete({
|
||||||
|
guildID: args[1]
|
||||||
|
});
|
||||||
|
|
||||||
|
console.log(`Deleted all data for guild ${args[1]}`);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
default: {
|
default: {
|
||||||
printHelp();
|
printHelp();
|
||||||
break;
|
break;
|
||||||
@ -137,7 +153,8 @@ function printHelp() {
|
|||||||
|
|
||||||
guild info [GUILDID]
|
guild info [GUILDID]
|
||||||
guild setPremium [GUILDID] [YYYY-MM-DD or NULL]
|
guild setPremium [GUILDID] [YYYY-MM-DD or NULL]
|
||||||
guild words [get|add|remove|clear]`);
|
guild words [get|add|remove|clear]
|
||||||
|
guild delete [GUILDID]`);
|
||||||
}
|
}
|
||||||
|
|
||||||
function printWordHelp() {
|
function printWordHelp() {
|
||||||
|
@ -3,13 +3,14 @@ import { stdin as input, stdout as output } from "node:process";
|
|||||||
import pack from "../../package.json";
|
import pack from "../../package.json";
|
||||||
import { Console } from "node:console";
|
import { Console } from "node:console";
|
||||||
import moment from "moment";
|
import moment from "moment";
|
||||||
|
import startupTime from "../tools/startupTime";
|
||||||
|
import client from "../client";
|
||||||
|
|
||||||
import guild from "./guild";
|
import guild from "./guild";
|
||||||
import global from "./global";
|
import global from "./global";
|
||||||
|
|
||||||
const console = new Console(process.stdout);
|
const console = new Console(process.stdout);
|
||||||
|
|
||||||
const startupTime = new Date();
|
|
||||||
const rl = readline.createInterface(input, output);
|
const rl = readline.createInterface(input, output);
|
||||||
|
|
||||||
rl.on("line", async (msg) => {
|
rl.on("line", async (msg) => {
|
||||||
@ -47,6 +48,11 @@ rl.on("line", async (msg) => {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
case "servercount": {
|
||||||
|
console.log(`This bot is on ${client.guilds.cache.size} guilds`);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
default: {
|
default: {
|
||||||
console.log(`Unknown command. Try "help" for help`);
|
console.log(`Unknown command. Try "help" for help`);
|
||||||
break;
|
break;
|
||||||
@ -64,5 +70,6 @@ uptime
|
|||||||
guild
|
guild
|
||||||
global
|
global
|
||||||
help
|
help
|
||||||
|
servercount
|
||||||
clear`);
|
clear`);
|
||||||
}
|
}
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
import { runCleanup } from "../service";
|
||||||
import client from "./index";
|
import client from "./index";
|
||||||
|
|
||||||
const token = process.env["TOKEN"];
|
const token = process.env["TOKEN"];
|
||||||
@ -7,4 +8,6 @@ client.login(token);
|
|||||||
|
|
||||||
client.on("ready", () => {
|
client.on("ready", () => {
|
||||||
console.log(`Connected to Discord API. Bot account is ${client.user?.tag} (${client.user?.id})`);
|
console.log(`Connected to Discord API. Bot account is ${client.user?.tag} (${client.user?.id})`);
|
||||||
|
|
||||||
|
runCleanup();
|
||||||
});
|
});
|
@ -5,6 +5,7 @@ import { getGuildSetting, isPremiumActive } from "../tools/data";
|
|||||||
import getDefaultEmbed, { getFailedEmbed, getSuccessEmbed } from "../tools/defaultEmbeds";
|
import getDefaultEmbed, { getFailedEmbed, getSuccessEmbed } from "../tools/defaultEmbeds";
|
||||||
import { getGuildChannel } from "../tools/discord";
|
import { getGuildChannel } from "../tools/discord";
|
||||||
import { Color, Emoji } from "../tools/design";
|
import { Color, Emoji } from "../tools/design";
|
||||||
|
import { execute as showBlocklistRunner } from "./showblocklist";
|
||||||
|
|
||||||
const builder = new SlashCommandBuilder();
|
const builder = new SlashCommandBuilder();
|
||||||
builder.setName("blocklist");
|
builder.setName("blocklist");
|
||||||
@ -51,24 +52,7 @@ async function execute(interaction: ChatInputCommandInteraction): Promise<void>
|
|||||||
|
|
||||||
switch (interaction.options.getSubcommand(true)) {
|
switch (interaction.options.getSubcommand(true)) {
|
||||||
case "get": {
|
case "get": {
|
||||||
const guildBadWords = await database.getRepository(Badword).find({
|
await showBlocklistRunner(interaction);
|
||||||
select: {
|
|
||||||
value: true
|
|
||||||
},
|
|
||||||
where: {
|
|
||||||
guildID: interaction.guildId
|
|
||||||
}
|
|
||||||
});
|
|
||||||
const globalBadWords = await database.getRepository(Badword).find({
|
|
||||||
where: {
|
|
||||||
guildID: IsNull()
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
interaction.reply({
|
|
||||||
content: `\`\`\`Global bad word list\`\`\`\n||${globalBadWords.map((word) => word.value).reduce((prev, next) => prev + ", " + next, "").slice(2)} ||\n\`\`\`Local server bad word list (${guildBadWords.length}/${isPremium ? 100 : 10})\`\`\`\n||${guildBadWords.map((word) => word.value).reduce((prev, next) => prev + ", " + next, "").slice(2)} ||`,
|
|
||||||
ephemeral: true
|
|
||||||
}).catch();
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,8 +1,19 @@
|
|||||||
import * as notification from "./notification";
|
import * as notification from "./logchannel";
|
||||||
import * as blocklist from "./blocklist";
|
import * as blocklist from "./blocklist";
|
||||||
import * as info from "./info";
|
import * as info from "./info";
|
||||||
|
import * as preserveSettings from "./preserveSettings";
|
||||||
|
import * as showBlocklist from "./showblocklist";
|
||||||
|
import * as showSettings from "./showSettings";
|
||||||
|
|
||||||
const array = [notification.builder.toJSON(), blocklist.builder.toJSON(), info.builder.toJSON()];
|
const commands = [];
|
||||||
|
commands.push(notification);
|
||||||
|
commands.push(blocklist);
|
||||||
|
commands.push(info);
|
||||||
|
commands.push(preserveSettings);
|
||||||
|
commands.push(showBlocklist);
|
||||||
|
commands.push(showSettings);
|
||||||
|
|
||||||
|
const array = commands.map((command) => command.builder.toJSON());
|
||||||
|
|
||||||
export {
|
export {
|
||||||
array
|
array
|
||||||
|
@ -1,7 +1,10 @@
|
|||||||
import { ChatInputCommandInteraction, Collection, Events, SlashCommandBuilder } from "discord.js";
|
import { ChatInputCommandInteraction, Collection, Events, SlashCommandBuilder } from "discord.js";
|
||||||
import * as notification from "./notification";
|
import * as notification from "./logchannel";
|
||||||
import * as blocklist from "./blocklist";
|
import * as blocklist from "./blocklist";
|
||||||
import * as info from "./info";
|
import * as info from "./info";
|
||||||
|
import * as preserveSettings from "./preserveSettings";
|
||||||
|
import * as showBlocklist from "./showblocklist";
|
||||||
|
import * as showSettings from "./showSettings";
|
||||||
import client from "../client";
|
import client from "../client";
|
||||||
import getDefaultEmbed from "../tools/defaultEmbeds";
|
import getDefaultEmbed from "../tools/defaultEmbeds";
|
||||||
|
|
||||||
@ -9,6 +12,9 @@ const commands = new Collection<string, { builder: SlashCommandBuilder, execute:
|
|||||||
commands.set(notification.builder.name, notification);
|
commands.set(notification.builder.name, notification);
|
||||||
commands.set(blocklist.builder.name, blocklist);
|
commands.set(blocklist.builder.name, blocklist);
|
||||||
commands.set(info.builder.name, info);
|
commands.set(info.builder.name, info);
|
||||||
|
commands.set(preserveSettings.builder.name, preserveSettings);
|
||||||
|
commands.set(showBlocklist.builder.name, showBlocklist);
|
||||||
|
commands.set(showSettings.builder.name, showSettings);
|
||||||
|
|
||||||
client.on(Events.InteractionCreate, async (interaction) => {
|
client.on(Events.InteractionCreate, async (interaction) => {
|
||||||
if (!interaction.isChatInputCommand()) return;
|
if (!interaction.isChatInputCommand()) return;
|
||||||
|
@ -3,12 +3,13 @@ import getDefaultEmbed, { getSuccessEmbed } from "../tools/defaultEmbeds";
|
|||||||
import { database, GuildSetting } from "../data";
|
import { database, GuildSetting } from "../data";
|
||||||
import { getGuildSetting } from "../tools/data";
|
import { getGuildSetting } from "../tools/data";
|
||||||
import { getGuildChannel } from "../tools/discord";
|
import { getGuildChannel } from "../tools/discord";
|
||||||
|
import { Emoji } from "../tools/design";
|
||||||
|
|
||||||
const builder = new SlashCommandBuilder();
|
const builder = new SlashCommandBuilder();
|
||||||
builder.setName("logchannel");
|
builder.setName("logchannel");
|
||||||
builder.setDescription("Configures the log channel");
|
builder.setDescription("Configures the log channel");
|
||||||
builder.setDMPermission(false);
|
builder.setDMPermission(false);
|
||||||
builder.setDefaultMemberPermissions(PermissionFlagsBits.ManageChannels);
|
builder.setDefaultMemberPermissions(PermissionFlagsBits.ManageGuild);
|
||||||
builder.addChannelOption((option) => {
|
builder.addChannelOption((option) => {
|
||||||
option.addChannelTypes(ChannelType.GuildText, ChannelType.GuildAnnouncement);
|
option.addChannelTypes(ChannelType.GuildText, ChannelType.GuildAnnouncement);
|
||||||
option.setName("channel");
|
option.setName("channel");
|
||||||
@ -57,7 +58,7 @@ const execute = async (interaction: ChatInputCommandInteraction) => {
|
|||||||
if (guildSetting.notificationChannelID) {
|
if (guildSetting.notificationChannelID) {
|
||||||
const oldLogChannel = await getGuildChannel(guildSetting.id, guildSetting.notificationChannelID);
|
const oldLogChannel = await getGuildChannel(guildSetting.id, guildSetting.notificationChannelID);
|
||||||
const embed = getDefaultEmbed();
|
const embed = getDefaultEmbed();
|
||||||
embed.setTitle("Settings changed");
|
embed.setTitle(`${Emoji.SETTINGS} Settings changed`);
|
||||||
embed.setDescription(`Log channel has been switched to <#${channel.id}>`);
|
embed.setDescription(`Log channel has been switched to <#${channel.id}>`);
|
||||||
embed.addFields({
|
embed.addFields({
|
||||||
name: "This action was performed by",
|
name: "This action was performed by",
|
||||||
@ -75,7 +76,7 @@ const execute = async (interaction: ChatInputCommandInteraction) => {
|
|||||||
await database.getRepository(GuildSetting).save(guildSetting);
|
await database.getRepository(GuildSetting).save(guildSetting);
|
||||||
|
|
||||||
const embed = getDefaultEmbed();
|
const embed = getDefaultEmbed();
|
||||||
embed.setTitle("Settings changed");
|
embed.setTitle(`${Emoji.SETTINGS} Settings changed`);
|
||||||
embed.setDescription("This channel has been set as the log channel");
|
embed.setDescription("This channel has been set as the log channel");
|
||||||
embed.addFields({
|
embed.addFields({
|
||||||
name: "This action was performed by",
|
name: "This action was performed by",
|
66
src/commands/preserveSettings.ts
Normal file
66
src/commands/preserveSettings.ts
Normal file
@ -0,0 +1,66 @@
|
|||||||
|
import { SlashCommandBuilder, ChatInputCommandInteraction, PermissionFlagsBits } from "discord.js";
|
||||||
|
import { database, GuildSetting } from "../data";
|
||||||
|
import { getGuildSetting } from "../tools/data";
|
||||||
|
import getDefaultEmbed, { getSuccessEmbed } from "../tools/defaultEmbeds";
|
||||||
|
import { Emoji } from "../tools/design";
|
||||||
|
import { getGuildChannel } from "../tools/discord";
|
||||||
|
|
||||||
|
const builder = new SlashCommandBuilder();
|
||||||
|
builder.setName("preservesettings");
|
||||||
|
builder.setDescription("Sets if the bot should save the server settings and blocklist if it leaves the server or delete it");
|
||||||
|
builder.addStringOption((option) => {
|
||||||
|
option.addChoices({
|
||||||
|
name: "Keep data when bot leaves the server",
|
||||||
|
value: "keep"
|
||||||
|
}, {
|
||||||
|
name: "Delete data when bot leaves the server",
|
||||||
|
value: "delete"
|
||||||
|
});
|
||||||
|
option.setName("behaviour");
|
||||||
|
option.setDescription("How the bot behaves when leaving the server");
|
||||||
|
option.setRequired(true);
|
||||||
|
return option;
|
||||||
|
});
|
||||||
|
builder.setDMPermission(false);
|
||||||
|
builder.setDefaultMemberPermissions(PermissionFlagsBits.Administrator);
|
||||||
|
|
||||||
|
async function execute(interaction: ChatInputCommandInteraction): Promise<void> {
|
||||||
|
if (!interaction.inGuild()) throw new Error("Command was executed outside guild context");
|
||||||
|
|
||||||
|
const settings = await getGuildSetting(interaction.guildId);
|
||||||
|
const option = interaction.options.getString("behaviour", true).toLowerCase();
|
||||||
|
|
||||||
|
if (option !== "keep" && option !== "delete") throw new TypeError(`option "behaviour" expected to be of type "keep" | "delete" but was "${option}"`);
|
||||||
|
|
||||||
|
settings.preserveDataOnGuildLeave = option === "keep";
|
||||||
|
|
||||||
|
await database.getRepository(GuildSetting).save(settings);
|
||||||
|
|
||||||
|
const embed = getSuccessEmbed();
|
||||||
|
embed.setDescription(`Preserve settings on server leave is now ${settings.preserveDataOnGuildLeave ? "ENABLED" : "DISABLED"}`);
|
||||||
|
|
||||||
|
interaction.reply({
|
||||||
|
embeds: [embed],
|
||||||
|
ephemeral: true
|
||||||
|
}).catch();
|
||||||
|
|
||||||
|
if (!settings.notificationChannelID) return;
|
||||||
|
const logChannel = await getGuildChannel(interaction.guildId, settings.notificationChannelID);
|
||||||
|
if (!logChannel || !logChannel.isTextBased()) return;
|
||||||
|
const logEmbed = getDefaultEmbed();
|
||||||
|
logEmbed.setTitle(`${Emoji.SETTINGS} Settings changed`);
|
||||||
|
logEmbed.setDescription(`Preserve settings on server leave is now ${settings.preserveDataOnGuildLeave ? "ENABLED" : "DISABLED"}`);
|
||||||
|
logEmbed.addFields({
|
||||||
|
name: "This action was performed by",
|
||||||
|
value: `${interaction.user.tag} (${interaction.user.id})`
|
||||||
|
});
|
||||||
|
|
||||||
|
logChannel.send({
|
||||||
|
embeds: [logEmbed]
|
||||||
|
}).catch();
|
||||||
|
}
|
||||||
|
|
||||||
|
export {
|
||||||
|
builder,
|
||||||
|
execute
|
||||||
|
}
|
61
src/commands/showSettings.ts
Normal file
61
src/commands/showSettings.ts
Normal file
@ -0,0 +1,61 @@
|
|||||||
|
import { ChatInputCommandInteraction, PermissionFlagsBits, SlashCommandBuilder } from "discord.js";
|
||||||
|
import { Badword, database } from "../data";
|
||||||
|
import { getGuildSetting, isPremiumActive } from "../tools/data";
|
||||||
|
import getDefaultEmbed from "../tools/defaultEmbeds";
|
||||||
|
import moment from "moment";
|
||||||
|
import { Color, Emoji } from "../tools/design";
|
||||||
|
import { getGuildChannel } from "../tools/discord";
|
||||||
|
|
||||||
|
const builder = new SlashCommandBuilder();
|
||||||
|
builder.setName("showsettings");
|
||||||
|
builder.setDescription("Show the current settings of this guild");
|
||||||
|
builder.setDMPermission(false);
|
||||||
|
builder.setDefaultMemberPermissions(PermissionFlagsBits.ManageGuild);
|
||||||
|
|
||||||
|
async function execute(interaction: ChatInputCommandInteraction): Promise<void> {
|
||||||
|
if (!interaction.inGuild()) throw new Error("Interaction was performed outside guild context");
|
||||||
|
|
||||||
|
const settings = await getGuildSetting(interaction.guildId);
|
||||||
|
const isPremium = await isPremiumActive(settings.isPremiumUntil);
|
||||||
|
const wordCount = await database.getRepository(Badword).count({
|
||||||
|
where: {
|
||||||
|
guildID: interaction.guildId
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
const logChannel = settings.notificationChannelID ? await getGuildChannel(interaction.guildId, settings.notificationChannelID) : null;
|
||||||
|
|
||||||
|
const embed = getDefaultEmbed();
|
||||||
|
embed.setTitle(`Settings from guild ${interaction.guild?.name || ""} (${interaction.guildId})`);
|
||||||
|
embed.setDescription(isPremium ? `${Emoji.PREMIUM} your subscription ends in ${moment(settings.isPremiumUntil).fromNow(true)}` : `Consider Premium status to get an increased blocklist`);
|
||||||
|
embed.setColor(isPremium ? Color.PREMIUM_ORANGE : Color.INFORMING_BLUE);
|
||||||
|
embed.addFields({
|
||||||
|
name: "Premium",
|
||||||
|
value: isPremium ? `${Emoji.PREMIUM} active` : `${Emoji.SWITCH_OFF} inactive`,
|
||||||
|
inline: true
|
||||||
|
}, {
|
||||||
|
name: "Logchannel",
|
||||||
|
value: logChannel && logChannel.isTextBased() ? `<#${logChannel.id}>` : "Not configured",
|
||||||
|
inline: true
|
||||||
|
}, {
|
||||||
|
name: "Words in Blocklist",
|
||||||
|
value: `${wordCount}/${isPremium ? "100" : "10"}`,
|
||||||
|
inline: true
|
||||||
|
}, {
|
||||||
|
name: `Preserve data on server leave is ${settings.preserveDataOnGuildLeave ? "active" : "inactive"}`,
|
||||||
|
value: settings.preserveDataOnGuildLeave ? "Your settings will be saved even if the bot gets kicked" : "Your settings will be deleted as soon as the bot leaves this server"
|
||||||
|
}, {
|
||||||
|
name: `${Emoji.WAVING} Found a bug? Want to request a feature? Say hello?`,
|
||||||
|
value: "Join the support server at https://go.astrogd.eu/discord"
|
||||||
|
});
|
||||||
|
|
||||||
|
interaction.reply({
|
||||||
|
embeds: [embed],
|
||||||
|
ephemeral: true
|
||||||
|
}).catch();
|
||||||
|
}
|
||||||
|
|
||||||
|
export {
|
||||||
|
builder,
|
||||||
|
execute
|
||||||
|
}
|
41
src/commands/showblocklist.ts
Normal file
41
src/commands/showblocklist.ts
Normal file
@ -0,0 +1,41 @@
|
|||||||
|
import { ChatInputCommandInteraction, PermissionFlagsBits, SlashCommandBuilder } from "discord.js";
|
||||||
|
import { IsNull } from "typeorm";
|
||||||
|
import { Badword, database } from "../data";
|
||||||
|
import { getGuildSetting, isPremiumActive } from "../tools/data";
|
||||||
|
|
||||||
|
const builder = new SlashCommandBuilder();
|
||||||
|
builder.setName("showblocklist");
|
||||||
|
builder.setDescription("Shows the blocklist of this server");
|
||||||
|
builder.setDMPermission(false);
|
||||||
|
builder.setDefaultMemberPermissions(PermissionFlagsBits.ManageChannels);
|
||||||
|
|
||||||
|
async function execute(interaction: ChatInputCommandInteraction): Promise<void> {
|
||||||
|
if (!interaction.inGuild()) throw new Error("Command was executed outside guild context");
|
||||||
|
|
||||||
|
const settings = await getGuildSetting(interaction.guildId);
|
||||||
|
const isPremium = isPremiumActive(settings.isPremiumUntil);
|
||||||
|
|
||||||
|
const guildBadWords = await database.getRepository(Badword).find({
|
||||||
|
select: {
|
||||||
|
value: true
|
||||||
|
},
|
||||||
|
where: {
|
||||||
|
guildID: interaction.guildId
|
||||||
|
}
|
||||||
|
});
|
||||||
|
const globalBadWords = await database.getRepository(Badword).find({
|
||||||
|
where: {
|
||||||
|
guildID: IsNull()
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
interaction.reply({
|
||||||
|
content: `\`\`\`Global bad word list\`\`\`\n||${globalBadWords.map((word) => word.value).reduce((prev, next) => prev + ", " + next, "").slice(2)} ||\n\`\`\`Local server bad word list (${guildBadWords.length}/${isPremium ? 100 : 10})\`\`\`\n||${guildBadWords.map((word) => word.value).reduce((prev, next) => prev + ", " + next, "").slice(2)} ||`,
|
||||||
|
ephemeral: true
|
||||||
|
}).catch();
|
||||||
|
}
|
||||||
|
|
||||||
|
export {
|
||||||
|
builder,
|
||||||
|
execute
|
||||||
|
}
|
19
src/data/migrations/1669392941776-data.ts
Normal file
19
src/data/migrations/1669392941776-data.ts
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
import { MigrationInterface, QueryRunner } from "typeorm";
|
||||||
|
|
||||||
|
export class data1669392941776 implements MigrationInterface {
|
||||||
|
name = 'data1669392941776'
|
||||||
|
|
||||||
|
public async up(queryRunner: QueryRunner): Promise<void> {
|
||||||
|
await queryRunner.query(`
|
||||||
|
ALTER TABLE "guild_setting"
|
||||||
|
ADD "preserveDataOnGuildLeave" boolean NOT NULL DEFAULT false
|
||||||
|
`);
|
||||||
|
}
|
||||||
|
|
||||||
|
public async down(queryRunner: QueryRunner): Promise<void> {
|
||||||
|
await queryRunner.query(`
|
||||||
|
ALTER TABLE "guild_setting" DROP COLUMN "preserveDataOnGuildLeave"
|
||||||
|
`);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -10,4 +10,7 @@ export class GuildSetting {
|
|||||||
|
|
||||||
@Column("timestamp", { nullable: true, default: null })
|
@Column("timestamp", { nullable: true, default: null })
|
||||||
isPremiumUntil!: Date | null;
|
isPremiumUntil!: Date | null;
|
||||||
|
|
||||||
|
@Column("boolean", { default: false })
|
||||||
|
preserveDataOnGuildLeave!: boolean
|
||||||
}
|
}
|
17
src/events/guildDelete.ts
Normal file
17
src/events/guildDelete.ts
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
import client from "../client";
|
||||||
|
import { Events } from "discord.js";
|
||||||
|
import { getGuildSetting } from "../tools/data";
|
||||||
|
import { Badword, database, GuildSetting } from "../data";
|
||||||
|
|
||||||
|
client.on(Events.GuildDelete, async (guild) => {
|
||||||
|
const settings = await getGuildSetting(guild.id);
|
||||||
|
if (settings.preserveDataOnGuildLeave) return;
|
||||||
|
|
||||||
|
await database.getRepository(GuildSetting).delete({
|
||||||
|
id: guild.id
|
||||||
|
});
|
||||||
|
|
||||||
|
await database.getRepository(Badword).delete({
|
||||||
|
guildID: guild.id
|
||||||
|
});
|
||||||
|
});
|
@ -1 +1,2 @@
|
|||||||
import "./channelUpdate";
|
import "./channelUpdate";
|
||||||
|
import "./guildDelete";
|
39
src/service/cleanup.ts
Normal file
39
src/service/cleanup.ts
Normal file
@ -0,0 +1,39 @@
|
|||||||
|
import { Badword, database, GuildSetting } from "../data";
|
||||||
|
import client from "../client";
|
||||||
|
import { DiscordAPIError } from "discord.js";
|
||||||
|
|
||||||
|
export default async function execute(): Promise<void> {
|
||||||
|
const guilds = await database.getRepository(GuildSetting).find({
|
||||||
|
where: {
|
||||||
|
preserveDataOnGuildLeave: false
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
for (const guild of guilds) {
|
||||||
|
try {
|
||||||
|
await client.guilds.fetch(guild.id);
|
||||||
|
} catch (error) {
|
||||||
|
if (!(error instanceof DiscordAPIError)) {
|
||||||
|
console.error(`service.cleanup failed: ${error}`);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
const id = guild.id;
|
||||||
|
|
||||||
|
// 5001 = Missing access
|
||||||
|
if (error.code.toString() !== "50001") {
|
||||||
|
console.warn(`Guild ${guild.id} is unavailable but not because of error 5001:\n${error}`);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
await database.getRepository(Badword).delete({
|
||||||
|
guildID: guild.id
|
||||||
|
});
|
||||||
|
|
||||||
|
await database.getRepository(GuildSetting).remove(guild);
|
||||||
|
console.log(`Removed data for guild ${id}`);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
console.log("Cleanup completed");
|
||||||
|
}
|
6
src/service/index.ts
Normal file
6
src/service/index.ts
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
import "./uptime";
|
||||||
|
import runCleanup from "./cleanup";
|
||||||
|
|
||||||
|
export {
|
||||||
|
runCleanup
|
||||||
|
}
|
19
src/service/uptime.ts
Normal file
19
src/service/uptime.ts
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
import express from "express";
|
||||||
|
import pack from "../../package.json";
|
||||||
|
import startupTime from "../tools/startupTime";
|
||||||
|
|
||||||
|
const app = express();
|
||||||
|
|
||||||
|
app.get("/", (_req, res) => {
|
||||||
|
res.status(200).json({
|
||||||
|
running: true,
|
||||||
|
version: pack.version,
|
||||||
|
runningSince: startupTime.toISOString()
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
app.all("*", (_req, res) => {
|
||||||
|
res.status(404).end();
|
||||||
|
});
|
||||||
|
|
||||||
|
app.listen(80);
|
@ -12,6 +12,7 @@ export async function getGuildSetting(guildID: string): Promise<GuildSetting> {
|
|||||||
guildSetting.id = guildID;
|
guildSetting.id = guildID;
|
||||||
guildSetting.isPremiumUntil = null;
|
guildSetting.isPremiumUntil = null;
|
||||||
guildSetting.notificationChannelID = null;
|
guildSetting.notificationChannelID = null;
|
||||||
|
guildSetting.preserveDataOnGuildLeave = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
return guildSetting;
|
return guildSetting;
|
||||||
|
@ -8,7 +8,7 @@ import { Color, Emoji } from "./design";
|
|||||||
export default function getDefaultEmbed(): EmbedBuilder {
|
export default function getDefaultEmbed(): EmbedBuilder {
|
||||||
const embed = new EmbedBuilder();
|
const embed = new EmbedBuilder();
|
||||||
embed.setFooter({
|
embed.setFooter({
|
||||||
text: `Channel filter V${pack.version} by AstroGD®`,
|
text: `Channel filter V${pack.version}`,
|
||||||
iconURL: client.user?.avatarURL() || undefined,
|
iconURL: client.user?.avatarURL() || undefined,
|
||||||
});
|
});
|
||||||
embed.setTimestamp(new Date());
|
embed.setTimestamp(new Date());
|
||||||
|
3
src/tools/startupTime.ts
Normal file
3
src/tools/startupTime.ts
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
const startupTime = new Date();
|
||||||
|
|
||||||
|
export default startupTime;
|
Reference in New Issue
Block a user