This commit is contained in:
JandereDev 2022-07-19 19:46:34 +02:00
commit 3c45dd110c
Signed by: Lea
GPG key ID: 5D5E18ACB990F57A
18 changed files with 1558 additions and 17 deletions

View file

@ -90,7 +90,7 @@ export default {
try { try {
let user = await parseUserOrId(userStr); let user = await parseUserOrId(userStr);
if (!user) { if (!user) {
embeds.push(embed(`I can't resolve \`${sanitizeMessageContent(userStr).trim()}\` to a user.`, null, '#ff785d')); embeds.push(embed(`I can't resolve \`${sanitizeMessageContent(userStr).trim()}\` to a user.`, null, EmbedColor.SoftError));
continue; continue;
} }

View file

@ -59,7 +59,7 @@ export default {
try { try {
let user = await parseUserOrId(userStr); let user = await parseUserOrId(userStr);
if (!user) { if (!user) {
embeds.push(embed(`I can't resolve \`${sanitizeMessageContent(userStr).trim()}\` to a user.`, null, '#ff785d')); embeds.push(embed(`I can't resolve \`${sanitizeMessageContent(userStr).trim()}\` to a user.`, null, EmbedColor.SoftError));
continue; continue;
} }

View file

@ -58,7 +58,7 @@ export default {
reason = reason ? `${userInput} ${reason}` : userInput; reason = reason ? `${userInput} ${reason}` : userInput;
} }
else { else {
embeds.push(embed(`I can't resolve \`${sanitizeMessageContent(userStr).trim()}\` to a user.`, null, '#ff785d')); embeds.push(embed(`I can't resolve \`${sanitizeMessageContent(userStr).trim()}\` to a user.`, null, EmbedColor.SoftError));
} }
continue; continue;
} }

View file

@ -1,4 +1,5 @@
import Monk, { IMonkManager } from 'monk'; import Monk, { ICollection, IMonkManager } from 'monk';
import { dbs } from '..';
import logger from './logger'; import logger from './logger';
export default (): IMonkManager => { export default (): IMonkManager => {
@ -27,3 +28,32 @@ function getDBUrl() {
return dburl; return dburl;
} }
async function databaseMigrations() {
async function setIndexes(collection: ICollection, toIndex: string[]) {
try {
const indexes = await collection.indexes();
for (const index of toIndex) {
if (!Object.values(indexes).find(v => v[0][0] == index)) {
logger.info(`Creating index ${index} on ${collection.name}`);
await collection.createIndex(index);
}
}
} catch(e) {
logger.warn(`Failed to run migrations for ${collection.name}: ${e}`);
}
}
await setIndexes(dbs.BRIDGE_CONFIG, [ 'discord', 'revolt' ]);
await setIndexes(dbs.BRIDGE_REQUESTS, [ 'id', 'revolt' ]);
await setIndexes(dbs.BRIDGED_MESSAGES, [ 'discord.messageId', 'revolt.messageId', 'revolt.nonce' ]);
await setIndexes(dbs.INFRACTIONS, [ 'createdBy', 'user', 'server' ]);
await setIndexes(dbs.PENDING_LOGINS, [ 'code', 'user' ]);
await setIndexes(dbs.SERVERS, [ 'id' ]);
await setIndexes(dbs.SESSIONS, [ 'user', 'token' ]);
await setIndexes(dbs.TEMPBANS, [ 'id', 'until' ]);
await setIndexes(dbs.USERS, [ 'id' ]);
await setIndexes(dbs.VOTEKICKS, [ 'id', 'server', 'target' ]);
}
export { databaseMigrations }

View file

@ -0,0 +1,9 @@
import path from 'path';
import { client } from '../..';
import logger from '../logger';
if (process.env['AUTOMOD_LOAD_SPAM_DETECTION']) {
logger.info('Importing spam detection');
import(path.join(process.cwd(), '..', 'private', 'automod-spam-detection', 'dist', 'index.js'))
.then(mod => mod.raidDetection(client as any, logger, client.db, process.env.REDIS_URL));
}

View file

@ -191,7 +191,7 @@ async function sendLogMessage(config: LogConfig, content: LogMessage) {
const embed = new MessageEmbed(); const embed = new MessageEmbed();
if (c.title) embed.setTitle(content.title); if (c.title) embed.setTitle(content.title);
if (c.description) embed.setDescription(c.description); if (c.description) embed.setDescription(c.description);
if (c.color) embed.setColor(c.color as ColorResolvable); if (c.color?.match(/^#[0-9a-fA-F]+$/)) embed.setColor(c.color as ColorResolvable);
if (c.fields?.length) { if (c.fields?.length) {
for (const field of c.fields) { for (const field of c.fields) {
embed.addField(field.title, field.content.trim() || "\u200b", field.inline); embed.addField(field.title, field.content.trim() || "\u200b", field.inline);
@ -313,10 +313,10 @@ function sanitizeMessageContent(msg: string): string {
} }
enum EmbedColor { enum EmbedColor {
Error = "#ff450c", Error = "var(--error)",
SoftError = "#ff785d", SoftError = "var(--warning)",
Warning = "#ffda55", Warning = "var(--warning)",
Success = "#23ff91", Success = "var(--success)",
} }
function embed(content: string, title?: string|null, color?: string|EmbedColor): SendableEmbed { function embed(content: string, title?: string|null, color?: string|EmbedColor): SendableEmbed {

View file

@ -3,7 +3,7 @@ config();
import logger from './bot/logger'; import logger from './bot/logger';
import AutomodClient, { login } from './struct/AutomodClient'; import AutomodClient, { login } from './struct/AutomodClient';
import MongoDB from './bot/db'; import MongoDB, { databaseMigrations } from './bot/db';
import DbUser from 'automod/dist/types/DbUser'; import DbUser from 'automod/dist/types/DbUser';
import ServerConfig from 'automod/dist/types/ServerConfig'; import ServerConfig from 'automod/dist/types/ServerConfig';
import Infraction from 'automod/dist/types/antispam/Infraction'; import Infraction from 'automod/dist/types/antispam/Infraction';
@ -56,6 +56,9 @@ logger.info(`\
await db.get('servers').findOne({}); await db.get('servers').findOne({});
logger.done('DB ready!'); logger.done('DB ready!');
logger.info('Running database migrations...');
await databaseMigrations();
// Load modules // Load modules
import('./bot/modules/command_handler'); import('./bot/modules/command_handler');
import('./bot/modules/mod_logs'); import('./bot/modules/mod_logs');
@ -65,4 +68,5 @@ logger.info(`\
import('./bot/modules/metrics'); import('./bot/modules/metrics');
import('./bot/modules/bot_status'); import('./bot/modules/bot_status');
import('./bot/modules/fetch_all'); import('./bot/modules/fetch_all');
import('./bot/modules/raid_detection');
})(); })();

View file

@ -196,6 +196,11 @@ client.on('messageCreate', async message => {
masquerade: { masquerade: {
name: message.author.username, name: message.author.username,
avatar: message.author.displayAvatarURL({ size: 128 }), avatar: message.author.displayAvatarURL({ size: 128 }),
colour: channel.server?.havePermission('ManageRole')
? message.member?.displayColor // Discord.js returns black or 0 instead of undefined when no role color is set
? message.member?.displayHexColor
: 'var(--foreground)'
: undefined,
}, },
embeds: message.embeds.length embeds: message.embeds.length
? message.embeds.map(e => new GenericEmbed(e).toRevolt()) ? message.embeds.map(e => new GenericEmbed(e).toRevolt())

View file

@ -19,7 +19,7 @@ export default class GenericEmbed {
if (embed.title) this.title = embed.title; if (embed.title) this.title = embed.title;
if (embed.description) this.description = embed.description; if (embed.description) this.description = embed.description;
if (embed.icon_url?.match(/^http(s)?\:\/\//)) this.icon = embed.icon_url; if (embed.icon_url?.match(/^http(s)?\:\/\//)) this.icon = embed.icon_url;
if (embed.colour) this.color = (embed.colour as any); if (embed.colour?.match(/^#[0-9a-fA-F]+$/)) this.color = (embed.colour as any);
if (embed.url) this.url = embed.url; if (embed.url) this.url = embed.url;
} }
} }

7
lib/.gitignore vendored Normal file
View file

@ -0,0 +1,7 @@
.pnp.*
.yarn/*
!.yarn/patches
!.yarn/plugins
!.yarn/releases
!.yarn/sdks
!.yarn/versions

Binary file not shown.

786
lib/.yarn/releases/yarn-3.2.1.cjs vendored Executable file

File diff suppressed because one or more lines are too long

View file

@ -1 +1,3 @@
nodeLinker: node-modules nodeLinker: node-modules
yarnPath: .yarn/releases/yarn-3.2.1.cjs

View file

@ -3,13 +3,18 @@
"version": "1.0.0", "version": "1.0.0",
"description": "Shared code for AutoMod", "description": "Shared code for AutoMod",
"scripts": { "scripts": {
"build": "rm -rf dist && tsc" "build": "rm -rf dist && tsc",
"dev": "rm -rf dist && tsc-watch"
}, },
"keywords": [], "keywords": [],
"author": "", "author": "",
"license": "ISC", "license": "ISC",
"devDependencies": { "devDependencies": {
"@types/node": "^18.0.4", "@types/node": "^18.0.4",
"monk": "^7.3.4",
"redis": "^4.2.0",
"tsc-watch": "^5.0.3",
"typescript": "^4.7.4" "typescript": "^4.7.4"
} },
"packageManager": "yarn@3.2.1"
} }

112
lib/src/misc/database.ts Normal file
View file

@ -0,0 +1,112 @@
/**
* Mongodb wrapper that uses redis for caching. I found out I don't
* actually need this but I already wrote it so I'm keeping it here
*
* I also don't know how well it works
*/
import { FindOneResult, ICollection, IObjectID } from 'monk';
import { createClient } from 'redis';
// createClient() returns a wacky ass type and this is the only way I can think of to get it
const _redisClient = createClient();
type RedisClient = typeof _redisClient;
class CachedDb<T> {
db: ICollection<T>;
redis: RedisClient;
ttl: number = 300;
redisPrefix: string;
mongoIndexKey: string;
debug: boolean = false;
constructor(db: ICollection<T>, redis: RedisClient, indexKey: string) {
this.db = db;
this.redis = redis;
this.redisPrefix = db.name;
this.mongoIndexKey = indexKey;
}
/**
* Gets a database entry and returns it
* @param key
*/
get(key: string): Promise<({ _id: string | IObjectID } & T) | T | undefined> {
return new Promise(async (resolve, reject) => {
try {
const res = await this.redis.GET(`${this.redisPrefix}:${key}`);
if (res) {
if (this.debug) console.debug('Db: Answering from cache');
resolve(JSON.parse(res));
return;
}
else if (this.debug) console.debug('Db: Fetching from database');
const mongoRes = await this.db.findOne({ [this.mongoIndexKey]: key } as any);
resolve(mongoRes ?? undefined);
try {
await this.redis.SET(`${this.redisPrefix}:${key}`, JSON.stringify(mongoRes));
await this.redis.EXPIRE(`${this.redisPrefix}:${key}`, this.ttl);
} catch(e) {
console.warn('Failed to cache to redis:', e);
}
} catch(e) { reject(e) }
});
}
/**
* Inserts or updates a database entry and caches it. Overwrites existing keys
* @param value
*/
set(value: T): Promise<{ ok: number; n: number; nModified: number; }> {
return new Promise(async (resolve, reject) => {
const key = (value as any)[this.mongoIndexKey];
try {
const res = await this.db.update(
{ [this.mongoIndexKey]: key } as any,
value,
{ upsert: true, replace: true, single: true }
);
resolve(res);
if (!res.ok) return console.debug('Db: Not caching;', res);
} catch(e) { reject(e) }
try {
if (this.debug) console.debug('Db: Caching updated document');
await this.redis.SET(`${this.redisPrefix}:${key}`, JSON.stringify(value));
await this.redis.EXPIRE(`${this.redisPrefix}:${key}`, this.ttl);
} catch(e) {
console.warn('Failed to cache to redis:', e);
}
});
}
/**
* Inserts or updates a database entry without overwriting other keys
* @param value
* @returns The updated/created document
*/
update(key: string, value: Partial<T>): Promise<FindOneResult<T>> {
return new Promise(async (resolve, reject) => {
try {
const res = await this.db.findOneAndUpdate(
{ [this.mongoIndexKey]: key } as any,
{ $set: value },
{ upsert: true, returnOriginal: true } // monk is a steaming pile of garbage, i need to set the deprecated returnOriginal
); // because the fuckwarts who wrote it made it default to `false`
resolve(res);
if (!res) return;
try {
await this.redis.SET(`${this.redisPrefix}:${key}`, JSON.stringify(res));
await this.redis.EXPIRE(`${this.redisPrefix}:${key}`, this.ttl);
} catch(e) {
console.warn('Failed to cache to redis:', e);
}
} catch(e) { reject(e) }
});
}
}
export { CachedDb }

View file

@ -6,6 +6,7 @@ class ServerConfig {
prefix?: string; prefix?: string;
spaceAfterPrefix?: boolean; spaceAfterPrefix?: boolean;
automodSettings?: AutomodSettings; automodSettings?: AutomodSettings;
antispamEnabled?: boolean; // Used by private spam detection module
botManagers?: string[]; botManagers?: string[];
moderators?: string[]; moderators?: string[];
votekick?: { votekick?: {

View file

@ -5,10 +5,92 @@ __metadata:
version: 6 version: 6
cacheKey: 8 cacheKey: 8
"@types/node@npm:^18.0.4": "@redis/bloom@npm:1.0.2":
version: 18.0.4 version: 1.0.2
resolution: "@types/node@npm:18.0.4" resolution: "@redis/bloom@npm:1.0.2"
checksum: 981284fd57941f233f0e77038087c122f56e3c2b4fc4e090dfc7f0a93abfc526d5ccdd59eb3ef551d713245cf3943e37c7b957f12ba699209341a447c39fab59 peerDependencies:
"@redis/client": ^1.0.0
checksum: 4872e7e5e4ff03d63349ca88d3164d487f62805651ada91924de2592995993401c98a01cb93bff8d71e9a2e54985b2485b6cb0e084a7e8b1283e2ebb8bc4b833
languageName: node
linkType: hard
"@redis/client@npm:1.2.0":
version: 1.2.0
resolution: "@redis/client@npm:1.2.0"
dependencies:
cluster-key-slot: 1.1.0
generic-pool: 3.8.2
yallist: 4.0.0
checksum: 098a550a6728d9d3babb432a1c32f1678cbda5ad7fa3d59316fc334be42ef05d778fc4cf2e3d873a34817447870a5fc0486e62793698a279404b3b086ba7422e
languageName: node
linkType: hard
"@redis/graph@npm:1.0.1":
version: 1.0.1
resolution: "@redis/graph@npm:1.0.1"
peerDependencies:
"@redis/client": ^1.0.0
checksum: 72e485efa416bdff10420f6e13c9cb4e1e5c70752e5172717adf62fc1d4d9ba12e708229fd87876f3a93270ff74c4bcd4d916987438dc36a94f7f12c9785fa44
languageName: node
linkType: hard
"@redis/json@npm:1.0.3":
version: 1.0.3
resolution: "@redis/json@npm:1.0.3"
peerDependencies:
"@redis/client": ^1.0.0
checksum: 26a7003c2fbacfa5998671e3a301cb2285432bf90f237adedcf76c0be0d379528e6710d469a8ea93c04bbd22951f9c2f41d460dbd79e85856f199248c4a250d5
languageName: node
linkType: hard
"@redis/search@npm:1.0.6":
version: 1.0.6
resolution: "@redis/search@npm:1.0.6"
peerDependencies:
"@redis/client": ^1.0.0
checksum: 5c776143520b11ae2e49a05e7fe3df514a01460f2be90759b15e4f097bf4a985784c48c2184ac2c275ced3ec5a0c77b208a4d46a50161d1ad6025e3ab2990aa7
languageName: node
linkType: hard
"@redis/time-series@npm:1.0.3":
version: 1.0.3
resolution: "@redis/time-series@npm:1.0.3"
peerDependencies:
"@redis/client": ^1.0.0
checksum: 4d11518185dd15f31c5b4a433902e53a3ebc24614a0221080ab12abf4f6fc60b3db00a71a83de7b4b10f11077de611dc1c273274573646d63481d40ca246f82d
languageName: node
linkType: hard
"@types/bson@npm:*":
version: 4.2.0
resolution: "@types/bson@npm:4.2.0"
dependencies:
bson: "*"
checksum: 55abf60c57b7f05655c210b386392636a299a7df18b89cec2cde0aa87374d97dd4ac9632226b0f6fe135d16ad4296ae5ddc782f6e9132d38c53dd26a6df8e704
languageName: node
linkType: hard
"@types/mongodb@npm:^3.5.25":
version: 3.6.20
resolution: "@types/mongodb@npm:3.6.20"
dependencies:
"@types/bson": "*"
"@types/node": "*"
checksum: e5397ada2ed728997f7c3f5424e8c28f682a635488be967c9c18a5de27b1641cf28bb42bc12026ac6d475c457a880e27097e13c8120350ba13219f4ccc030656
languageName: node
linkType: hard
"@types/node@npm:*, @types/node@npm:^18.0.4":
version: 18.0.5
resolution: "@types/node@npm:18.0.5"
checksum: cc9c67d0074252f798d226dd95a22e0e8851cf7fc623ef4a603d9ad2c2b46650f930147062ea33719008b1de67f08f499ad693307d02f8396e6f1fead8144329
languageName: node
linkType: hard
"ansi-regex@npm:^5.0.1":
version: 5.0.1
resolution: "ansi-regex@npm:5.0.1"
checksum: 2aa4bb54caf2d622f1afdad09441695af2a83aa3fe8b8afa581d205e57ed4261c183c4d3877cee25794443fde5876417d859c108078ab788d6af7e4fe52eb66b
languageName: node languageName: node
linkType: hard linkType: hard
@ -17,10 +99,483 @@ __metadata:
resolution: "automod@workspace:." resolution: "automod@workspace:."
dependencies: dependencies:
"@types/node": ^18.0.4 "@types/node": ^18.0.4
monk: ^7.3.4
redis: ^4.2.0
tsc-watch: ^5.0.3
typescript: ^4.7.4 typescript: ^4.7.4
languageName: unknown languageName: unknown
linkType: soft linkType: soft
"base64-js@npm:^1.3.1":
version: 1.5.1
resolution: "base64-js@npm:1.5.1"
checksum: 669632eb3745404c2f822a18fc3a0122d2f9a7a13f7fb8b5823ee19d1d2ff9ee5b52c53367176ea4ad093c332fd5ab4bd0ebae5a8e27917a4105a4cfc86b1005
languageName: node
linkType: hard
"bl@npm:^2.2.1":
version: 2.2.1
resolution: "bl@npm:2.2.1"
dependencies:
readable-stream: ^2.3.5
safe-buffer: ^5.1.1
checksum: 4f5d9b258919646a8d02f1731379e53b6f6309e34596ae02afbc3aeb183910bd2d0b70681f889b7c620ca48f65dc1cd0992ee1266c90d6d7c3be60688d141233
languageName: node
linkType: hard
"bson@npm:*":
version: 4.6.5
resolution: "bson@npm:4.6.5"
dependencies:
buffer: ^5.6.0
checksum: b9d4856241e76f6bacf6825b5280f993a867b74fa47bb62b3a20d835d9f02979e1a10a6c38536ac86cb485dc96aabdacb0c6922fca7a784603a781a00e23c336
languageName: node
linkType: hard
"bson@npm:^1.1.4":
version: 1.1.6
resolution: "bson@npm:1.1.6"
checksum: 75762c9b7e0b3156cb0f38c7eb9ffcade53f0b04ac87dece9cba38f6dc570d9af91251de6a8988b294063cfaa21894c60ac9e85c34176accb3674acb092d66a7
languageName: node
linkType: hard
"buffer@npm:^5.6.0":
version: 5.7.1
resolution: "buffer@npm:5.7.1"
dependencies:
base64-js: ^1.3.1
ieee754: ^1.1.13
checksum: e2cf8429e1c4c7b8cbd30834ac09bd61da46ce35f5c22a78e6c2f04497d6d25541b16881e30a019c6fd3154150650ccee27a308eff3e26229d788bbdeb08ab84
languageName: node
linkType: hard
"cluster-key-slot@npm:1.1.0":
version: 1.1.0
resolution: "cluster-key-slot@npm:1.1.0"
checksum: fc953c75209b1ef9088081bab4e40a0b2586491c974ab93460569c014515ca5a2e31c043f185285e177007162fc353d07836d98f570c171dbe055775430e495b
languageName: node
linkType: hard
"core-util-is@npm:~1.0.0":
version: 1.0.3
resolution: "core-util-is@npm:1.0.3"
checksum: 9de8597363a8e9b9952491ebe18167e3b36e7707569eed0ebf14f8bba773611376466ae34575bca8cfe3c767890c859c74056084738f09d4e4a6f902b2ad7d99
languageName: node
linkType: hard
"cross-spawn@npm:^7.0.3":
version: 7.0.3
resolution: "cross-spawn@npm:7.0.3"
dependencies:
path-key: ^3.1.0
shebang-command: ^2.0.0
which: ^2.0.1
checksum: 671cc7c7288c3a8406f3c69a3ae2fc85555c04169e9d611def9a675635472614f1c0ed0ef80955d5b6d4e724f6ced67f0ad1bb006c2ea643488fcfef994d7f52
languageName: node
linkType: hard
"debug@npm:*":
version: 4.3.4
resolution: "debug@npm:4.3.4"
dependencies:
ms: 2.1.2
peerDependenciesMeta:
supports-color:
optional: true
checksum: 3dbad3f94ea64f34431a9cbf0bafb61853eda57bff2880036153438f50fb5a84f27683ba0d8e5426bf41a8c6ff03879488120cf5b3a761e77953169c0600a708
languageName: node
linkType: hard
"denque@npm:^1.4.1":
version: 1.5.1
resolution: "denque@npm:1.5.1"
checksum: 4375ad19d5cea99f90effa82a8cecdaa10f4eb261fbcd7e47cd753ff2737f037aac8f7f4e031cc77f3966314c491c86a0d3b20c128aeee57f791b4662c45108e
languageName: node
linkType: hard
"duplexer@npm:~0.1.1":
version: 0.1.2
resolution: "duplexer@npm:0.1.2"
checksum: 62ba61a830c56801db28ff6305c7d289b6dc9f859054e8c982abd8ee0b0a14d2e9a8e7d086ffee12e868d43e2bbe8a964be55ddbd8c8957714c87373c7a4f9b0
languageName: node
linkType: hard
"event-stream@npm:=3.3.4":
version: 3.3.4
resolution: "event-stream@npm:3.3.4"
dependencies:
duplexer: ~0.1.1
from: ~0
map-stream: ~0.1.0
pause-stream: 0.0.11
split: 0.3
stream-combiner: ~0.0.4
through: ~2.3.1
checksum: 80b467820b6daf824d9fb4345d2daf115a056e5c104463f2e98534e92d196a27f2df5ea2aa085624db26f4c45698905499e881d13bc7c01f7a13eac85be72a22
languageName: node
linkType: hard
"from@npm:~0":
version: 0.1.7
resolution: "from@npm:0.1.7"
checksum: b85125b7890489656eb2e4f208f7654a93ec26e3aefaf3bbbcc0d496fc1941e4405834fcc9fe7333192aa2187905510ace70417bbf9ac6f6f4784a731d986939
languageName: node
linkType: hard
"generic-pool@npm:3.8.2":
version: 3.8.2
resolution: "generic-pool@npm:3.8.2"
checksum: f549077d90265e5e4d32a2410205b357ec61cf73d17861f1013637984390e09fe7bf537129a2c6ed30ae57662a57c8d54194f80046408d3349836330f422dbde
languageName: node
linkType: hard
"ieee754@npm:^1.1.13":
version: 1.2.1
resolution: "ieee754@npm:1.2.1"
checksum: 5144c0c9815e54ada181d80a0b810221a253562422e7c6c3a60b1901154184f49326ec239d618c416c1c5945a2e197107aee8d986a3dd836b53dffefd99b5e7e
languageName: node
linkType: hard
"inherits@npm:~2.0.3":
version: 2.0.4
resolution: "inherits@npm:2.0.4"
checksum: 4a48a733847879d6cf6691860a6b1e3f0f4754176e4d71494c41f3475553768b10f84b5ce1d40fbd0e34e6bfbb864ee35858ad4dd2cf31e02fc4a154b724d7f1
languageName: node
linkType: hard
"isarray@npm:~1.0.0":
version: 1.0.0
resolution: "isarray@npm:1.0.0"
checksum: f032df8e02dce8ec565cf2eb605ea939bdccea528dbcf565cdf92bfa2da9110461159d86a537388ef1acef8815a330642d7885b29010e8f7eac967c9993b65ab
languageName: node
linkType: hard
"isexe@npm:^2.0.0":
version: 2.0.0
resolution: "isexe@npm:2.0.0"
checksum: 26bf6c5480dda5161c820c5b5c751ae1e766c587b1f951ea3fcfc973bafb7831ae5b54a31a69bd670220e42e99ec154475025a468eae58ea262f813fdc8d1c62
languageName: node
linkType: hard
"map-stream@npm:~0.1.0":
version: 0.1.0
resolution: "map-stream@npm:0.1.0"
checksum: 38abbe4eb883888031e6b2fc0630bc583c99396be16b8ace5794b937b682a8a081f03e8b15bfd4914d1bc88318f0e9ac73ba3512ae65955cd449f63256ddb31d
languageName: node
linkType: hard
"memory-pager@npm:^1.0.2":
version: 1.5.0
resolution: "memory-pager@npm:1.5.0"
checksum: d1a2e684583ef55c61cd3a49101da645b11ad57014dfc565e0b43baa9004b743f7e4ab81493d8fff2ab24e9950987cc3209c94bcc4fc8d7e30a475489a1f15e9
languageName: node
linkType: hard
"mongodb@npm:^3.2.3":
version: 3.7.3
resolution: "mongodb@npm:3.7.3"
dependencies:
bl: ^2.2.1
bson: ^1.1.4
denque: ^1.4.1
optional-require: ^1.1.8
safe-buffer: ^5.1.2
saslprep: ^1.0.0
dependenciesMeta:
saslprep:
optional: true
peerDependenciesMeta:
aws4:
optional: true
bson-ext:
optional: true
kerberos:
optional: true
mongodb-client-encryption:
optional: true
mongodb-extjson:
optional: true
snappy:
optional: true
checksum: ef7690fe6ee7d1752f121b14e59b3fabfddc60ff0536babce6c945703ad0010de9e6fa7de4c91b99275c256876a72a06899ce27893aba0838c2b542088bd1044
languageName: node
linkType: hard
"monk-middleware-cast-ids@npm:^0.2.1":
version: 0.2.1
resolution: "monk-middleware-cast-ids@npm:0.2.1"
checksum: fb5d60eb65d9465cfc9debea1e4fa99d3373b0c20a8e20847414c3fb7e7163888e9253d1d8f8b9bd8ad182739f04a21a945193122d09df65b44fa0e2829e4226
languageName: node
linkType: hard
"monk-middleware-fields@npm:^0.2.0":
version: 0.2.0
resolution: "monk-middleware-fields@npm:0.2.0"
checksum: acc670026526296dc59b811d8a3ae54a04b153ba78e419828340eb3b3607bb1e84d0fe6128a851e3d663699c0df7ca1f9fd2e81686a2fa8ecd239db60091b452
languageName: node
linkType: hard
"monk-middleware-handle-callback@npm:^0.2.0":
version: 0.2.2
resolution: "monk-middleware-handle-callback@npm:0.2.2"
checksum: 3c921ead69171e84af9f16c97894cf8ad6828b3cd0ee9990167cc6bfdda947dcbd9241123bfec74addc7755baaf689248a4c9b738289dcfa5eff69e6baa9b252
languageName: node
linkType: hard
"monk-middleware-options@npm:^0.2.1":
version: 0.2.1
resolution: "monk-middleware-options@npm:0.2.1"
checksum: 6ecb2b55913cc514ddf79d40e356915d4a1beadf82151b32ce46ba5652f2a97d7d77f28901951002be6ee7bcb14e80d577ae3a66fd7da7a2ef3b20252bf2b504
languageName: node
linkType: hard
"monk-middleware-query@npm:^0.2.0":
version: 0.2.0
resolution: "monk-middleware-query@npm:0.2.0"
checksum: 7950b535ca397938b73c651b6b755ec18204886760a665fc386ea78dd24ca2d04ca64cb9567759d84b844bd0b5108c7306eafb860955959309cbc9d2bf66f073
languageName: node
linkType: hard
"monk-middleware-wait-for-connection@npm:^0.2.0":
version: 0.2.0
resolution: "monk-middleware-wait-for-connection@npm:0.2.0"
checksum: 1c3f23ddb3568fc01cabb777df550f7ef6eaf6f4701e4a2f6354c01c86f391225af96d9a8f3f1a7f542487e8a3f6ec18b44ec8d55102b3e1ee166d9c6751752a
languageName: node
linkType: hard
"monk@npm:^7.3.4":
version: 7.3.4
resolution: "monk@npm:7.3.4"
dependencies:
"@types/mongodb": ^3.5.25
debug: "*"
mongodb: ^3.2.3
monk-middleware-cast-ids: ^0.2.1
monk-middleware-fields: ^0.2.0
monk-middleware-handle-callback: ^0.2.0
monk-middleware-options: ^0.2.1
monk-middleware-query: ^0.2.0
monk-middleware-wait-for-connection: ^0.2.0
object-assign: ^4.1.1
checksum: 6eb230e9dd6c25e0a1374f903f0caeb4067eef2df6d8b3672785eb9bff2041ab509b067f29756c0946ff2276912b251d1c84bded3d204f56b082e632c469de77
languageName: node
linkType: hard
"ms@npm:2.1.2":
version: 2.1.2
resolution: "ms@npm:2.1.2"
checksum: 673cdb2c3133eb050c745908d8ce632ed2c02d85640e2edb3ace856a2266a813b30c613569bf3354fdf4ea7d1a1494add3bfa95e2713baa27d0c2c71fc44f58f
languageName: node
linkType: hard
"node-cleanup@npm:^2.1.2":
version: 2.1.2
resolution: "node-cleanup@npm:2.1.2"
checksum: 584cdc3e42560a998b4579f91ed8f936b27011628f3102e5a1093205f0691cdf8d899287d1f2e4d2071ea4ab1d615810bad6dbe2b988ef173a1cbaa76d8165b3
languageName: node
linkType: hard
"object-assign@npm:^4.1.1":
version: 4.1.1
resolution: "object-assign@npm:4.1.1"
checksum: fcc6e4ea8c7fe48abfbb552578b1c53e0d194086e2e6bbbf59e0a536381a292f39943c6e9628af05b5528aa5e3318bb30d6b2e53cadaf5b8fe9e12c4b69af23f
languageName: node
linkType: hard
"optional-require@npm:^1.1.8":
version: 1.1.8
resolution: "optional-require@npm:1.1.8"
dependencies:
require-at: ^1.0.6
checksum: 437db76f713052925185ae80837b593877f75101154e8937f50d33b0b07bd500c214efc9016748642109b6e3e1197eb0513a2963eb06bcf3890f88a2724b1c87
languageName: node
linkType: hard
"path-key@npm:^3.1.0":
version: 3.1.1
resolution: "path-key@npm:3.1.1"
checksum: 55cd7a9dd4b343412a8386a743f9c746ef196e57c823d90ca3ab917f90ab9f13dd0ded27252ba49dbdfcab2b091d998bc446f6220cd3cea65db407502a740020
languageName: node
linkType: hard
"pause-stream@npm:0.0.11":
version: 0.0.11
resolution: "pause-stream@npm:0.0.11"
dependencies:
through: ~2.3
checksum: 3c4a14052a638b92e0c96eb00c0d7977df7f79ea28395250c525d197f1fc02d34ce1165d5362e2e6ebbb251524b94a76f3f0d4abc39ab8b016d97449fe15583c
languageName: node
linkType: hard
"process-nextick-args@npm:~2.0.0":
version: 2.0.1
resolution: "process-nextick-args@npm:2.0.1"
checksum: 1d38588e520dab7cea67cbbe2efdd86a10cc7a074c09657635e34f035277b59fbb57d09d8638346bf7090f8e8ebc070c96fa5fd183b777fff4f5edff5e9466cf
languageName: node
linkType: hard
"ps-tree@npm:^1.2.0":
version: 1.2.0
resolution: "ps-tree@npm:1.2.0"
dependencies:
event-stream: =3.3.4
bin:
ps-tree: ./bin/ps-tree.js
checksum: e635dd00f53d30d31696cf5f95b3a8dbdf9b1aeb36d4391578ce8e8cd22949b7c5536c73b0dc18c78615ea3ddd4be96101166be59ca2e3e3cb1e2f79ba3c7f98
languageName: node
linkType: hard
"readable-stream@npm:^2.3.5":
version: 2.3.7
resolution: "readable-stream@npm:2.3.7"
dependencies:
core-util-is: ~1.0.0
inherits: ~2.0.3
isarray: ~1.0.0
process-nextick-args: ~2.0.0
safe-buffer: ~5.1.1
string_decoder: ~1.1.1
util-deprecate: ~1.0.1
checksum: e4920cf7549a60f8aaf694d483a0e61b2a878b969d224f89b3bc788b8d920075132c4b55a7494ee944c7b6a9a0eada28a7f6220d80b0312ece70bbf08eeca755
languageName: node
linkType: hard
"redis@npm:^4.2.0":
version: 4.2.0
resolution: "redis@npm:4.2.0"
dependencies:
"@redis/bloom": 1.0.2
"@redis/client": 1.2.0
"@redis/graph": 1.0.1
"@redis/json": 1.0.3
"@redis/search": 1.0.6
"@redis/time-series": 1.0.3
checksum: 6c35b56c6b685e82973c5698c5736c07ccbc59f3bc18d8de61e45ead2df4b8fc82062e5618452f4d3f8c23f02ff8c0b847c8d6a681f909c403a0fb96adcc2b98
languageName: node
linkType: hard
"require-at@npm:^1.0.6":
version: 1.0.6
resolution: "require-at@npm:1.0.6"
checksum: 7753a6ebad99855ef015d5533a787c65e883c94c23371368eebf6f1c7e2a078811013b204823152cbab206a00e825e8e5ca09416fd835a489fa30bf064fbe6d9
languageName: node
linkType: hard
"safe-buffer@npm:^5.1.1, safe-buffer@npm:^5.1.2":
version: 5.2.1
resolution: "safe-buffer@npm:5.2.1"
checksum: b99c4b41fdd67a6aaf280fcd05e9ffb0813654894223afb78a31f14a19ad220bba8aba1cb14eddce1fcfb037155fe6de4e861784eb434f7d11ed58d1e70dd491
languageName: node
linkType: hard
"safe-buffer@npm:~5.1.0, safe-buffer@npm:~5.1.1":
version: 5.1.2
resolution: "safe-buffer@npm:5.1.2"
checksum: f2f1f7943ca44a594893a852894055cf619c1fbcb611237fc39e461ae751187e7baf4dc391a72125e0ac4fb2d8c5c0b3c71529622e6a58f46b960211e704903c
languageName: node
linkType: hard
"saslprep@npm:^1.0.0":
version: 1.0.3
resolution: "saslprep@npm:1.0.3"
dependencies:
sparse-bitfield: ^3.0.3
checksum: 4fdc0b70fb5e523f977de405e12cca111f1f10dd68a0cfae0ca52c1a7919a94d1556598ba2d35f447655c3b32879846c77f9274c90806f6673248ae3cea6ee43
languageName: node
linkType: hard
"shebang-command@npm:^2.0.0":
version: 2.0.0
resolution: "shebang-command@npm:2.0.0"
dependencies:
shebang-regex: ^3.0.0
checksum: 6b52fe87271c12968f6a054e60f6bde5f0f3d2db483a1e5c3e12d657c488a15474121a1d55cd958f6df026a54374ec38a4a963988c213b7570e1d51575cea7fa
languageName: node
linkType: hard
"shebang-regex@npm:^3.0.0":
version: 3.0.0
resolution: "shebang-regex@npm:3.0.0"
checksum: 1a2bcae50de99034fcd92ad4212d8e01eedf52c7ec7830eedcf886622804fe36884278f2be8be0ea5fde3fd1c23911643a4e0f726c8685b61871c8908af01222
languageName: node
linkType: hard
"sparse-bitfield@npm:^3.0.3":
version: 3.0.3
resolution: "sparse-bitfield@npm:3.0.3"
dependencies:
memory-pager: ^1.0.2
checksum: 174da88dbbcc783d5dbd26921931cc83830280b8055fb05333786ebe6fc015b9601b24972b3d55920dd2d9f5fb120576fbfa2469b08e5222c9cadf3f05210aab
languageName: node
linkType: hard
"split@npm:0.3":
version: 0.3.3
resolution: "split@npm:0.3.3"
dependencies:
through: 2
checksum: 2e076634c9637cfdc54ab4387b6a243b8c33b360874a25adf6f327a5647f07cb3bf1c755d515248eb3afee4e382278d01f62c62d87263c118f28065b86f74f02
languageName: node
linkType: hard
"stream-combiner@npm:~0.0.4":
version: 0.0.4
resolution: "stream-combiner@npm:0.0.4"
dependencies:
duplexer: ~0.1.1
checksum: 844b622cfe8b9de45a6007404f613b60aaf85200ab9862299066204242f89a7c8033b1c356c998aa6cfc630f6cd9eba119ec1c6dc1f93e245982be4a847aee7d
languageName: node
linkType: hard
"string-argv@npm:^0.1.1":
version: 0.1.2
resolution: "string-argv@npm:0.1.2"
checksum: 6877bd72af145f6e6eafa932818014a57b2f39225c924562b7fccb50f1fcee73717bbcd5e528fd4d86cec32835c14749c32a9d35f06e0bf96637d1e73158203f
languageName: node
linkType: hard
"string_decoder@npm:~1.1.1":
version: 1.1.1
resolution: "string_decoder@npm:1.1.1"
dependencies:
safe-buffer: ~5.1.0
checksum: 9ab7e56f9d60a28f2be697419917c50cac19f3e8e6c28ef26ed5f4852289fe0de5d6997d29becf59028556f2c62983790c1d9ba1e2a3cc401768ca12d5183a5b
languageName: node
linkType: hard
"strip-ansi@npm:^6.0.0":
version: 6.0.1
resolution: "strip-ansi@npm:6.0.1"
dependencies:
ansi-regex: ^5.0.1
checksum: f3cd25890aef3ba6e1a74e20896c21a46f482e93df4a06567cebf2b57edabb15133f1f94e57434e0a958d61186087b1008e89c94875d019910a213181a14fc8c
languageName: node
linkType: hard
"through@npm:2, through@npm:~2.3, through@npm:~2.3.1":
version: 2.3.8
resolution: "through@npm:2.3.8"
checksum: a38c3e059853c494af95d50c072b83f8b676a9ba2818dcc5b108ef252230735c54e0185437618596c790bbba8fcdaef5b290405981ffa09dce67b1f1bf190cbd
languageName: node
linkType: hard
"tsc-watch@npm:^5.0.3":
version: 5.0.3
resolution: "tsc-watch@npm:5.0.3"
dependencies:
cross-spawn: ^7.0.3
node-cleanup: ^2.1.2
ps-tree: ^1.2.0
string-argv: ^0.1.1
strip-ansi: ^6.0.0
peerDependencies:
typescript: "*"
bin:
tsc-watch: index.js
checksum: abd63295dd5fda098a45d27912031e6c35a95f1aa20d7a86d6ad1469580400069e6476f2ffd4b88e37886d016443e60b1ae2dbcaf756e324efc67d0fa713fb15
languageName: node
linkType: hard
"typescript@npm:^4.7.4": "typescript@npm:^4.7.4":
version: 4.7.4 version: 4.7.4
resolution: "typescript@npm:4.7.4" resolution: "typescript@npm:4.7.4"
@ -40,3 +595,28 @@ __metadata:
checksum: 9096d8f6c16cb80ef3bf96fcbbd055bf1c4a43bd14f3b7be45a9fbe7ada46ec977f604d5feed3263b4f2aa7d4c7477ce5f9cd87de0d6feedec69a983f3a4f93e checksum: 9096d8f6c16cb80ef3bf96fcbbd055bf1c4a43bd14f3b7be45a9fbe7ada46ec977f604d5feed3263b4f2aa7d4c7477ce5f9cd87de0d6feedec69a983f3a4f93e
languageName: node languageName: node
linkType: hard linkType: hard
"util-deprecate@npm:~1.0.1":
version: 1.0.2
resolution: "util-deprecate@npm:1.0.2"
checksum: 474acf1146cb2701fe3b074892217553dfcf9a031280919ba1b8d651a068c9b15d863b7303cb15bd00a862b498e6cf4ad7b4a08fb134edd5a6f7641681cb54a2
languageName: node
linkType: hard
"which@npm:^2.0.1":
version: 2.0.2
resolution: "which@npm:2.0.2"
dependencies:
isexe: ^2.0.0
bin:
node-which: ./bin/node-which
checksum: 1a5c563d3c1b52d5f893c8b61afe11abc3bab4afac492e8da5bde69d550de701cf9806235f20a47b5c8fa8a1d6a9135841de2596535e998027a54589000e66d1
languageName: node
linkType: hard
"yallist@npm:4.0.0":
version: 4.0.0
resolution: "yallist@npm:4.0.0"
checksum: 343617202af32df2a15a3be36a5a8c0c8545208f3d3dfbc6bb7c3e3b7e8c6f8e7485432e4f3b88da3031a6e20afa7c711eded32ddfb122896ac5d914e75848d5
languageName: node
linkType: hard