chore: import upstream snapshot with attribution
This commit is contained in:
@@ -0,0 +1 @@
|
||||
export * from 'mongoose';
|
||||
@@ -0,0 +1,30 @@
|
||||
/**
|
||||
* 连接 MongoDB
|
||||
*/
|
||||
|
||||
import mongoose from 'mongoose';
|
||||
|
||||
import config from '@fiora/config/server';
|
||||
import logger from '@fiora/utils/logger';
|
||||
|
||||
mongoose.Promise = Promise;
|
||||
mongoose.set('useCreateIndex', true);
|
||||
|
||||
export default function initMongoDB() {
|
||||
return new Promise((resolve) => {
|
||||
mongoose.connect(
|
||||
config.database,
|
||||
{ useNewUrlParser: true, useUnifiedTopology: true },
|
||||
async (err) => {
|
||||
if (err) {
|
||||
logger.error('[mongoDB]', err.message);
|
||||
process.exit(0);
|
||||
} else {
|
||||
resolve(null);
|
||||
}
|
||||
},
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
export { mongoose };
|
||||
@@ -0,0 +1,33 @@
|
||||
import { Schema, model, Document } from 'mongoose';
|
||||
|
||||
const FriendSchema = new Schema({
|
||||
createTime: { type: Date, default: Date.now },
|
||||
|
||||
from: {
|
||||
type: Schema.Types.ObjectId,
|
||||
ref: 'User',
|
||||
index: true,
|
||||
},
|
||||
to: {
|
||||
type: Schema.Types.ObjectId,
|
||||
ref: 'User',
|
||||
},
|
||||
});
|
||||
|
||||
export interface FriendDocument extends Document {
|
||||
/** 源用户id */
|
||||
from: string;
|
||||
/** 目标用户id */
|
||||
to: string;
|
||||
/** 创建时间 */
|
||||
createTime: Date;
|
||||
}
|
||||
|
||||
/**
|
||||
* Friend Model
|
||||
* 好友信息
|
||||
* 好友关系是单向的
|
||||
*/
|
||||
const Friend = model<FriendDocument>('Friend', FriendSchema);
|
||||
|
||||
export default Friend;
|
||||
@@ -0,0 +1,58 @@
|
||||
import { Schema, model, Document } from 'mongoose';
|
||||
import { NAME_REGEXP } from '@fiora/utils/const';
|
||||
|
||||
const GroupSchema = new Schema({
|
||||
createTime: { type: Date, default: Date.now },
|
||||
|
||||
name: {
|
||||
type: String,
|
||||
trim: true,
|
||||
unique: true,
|
||||
match: NAME_REGEXP,
|
||||
index: true,
|
||||
},
|
||||
avatar: String,
|
||||
announcement: {
|
||||
type: String,
|
||||
default: '',
|
||||
},
|
||||
creator: {
|
||||
type: Schema.Types.ObjectId,
|
||||
ref: 'User',
|
||||
},
|
||||
isDefault: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
members: [
|
||||
{
|
||||
type: Schema.Types.ObjectId,
|
||||
ref: 'User',
|
||||
},
|
||||
],
|
||||
});
|
||||
|
||||
export interface GroupDocument extends Document {
|
||||
/** 群组名 */
|
||||
name: string;
|
||||
/** 头像 */
|
||||
avatar: string;
|
||||
/** 公告 */
|
||||
announcement: string;
|
||||
/** 创建者 */
|
||||
creator: string;
|
||||
/** 是否为默认群组 */
|
||||
isDefault: boolean;
|
||||
/** 成员 */
|
||||
members: string[];
|
||||
/** 创建时间 */
|
||||
createTime: Date;
|
||||
}
|
||||
|
||||
/**
|
||||
* Group Model
|
||||
* 群组信息
|
||||
*/
|
||||
const Group = model<GroupDocument>('Group', GroupSchema);
|
||||
|
||||
export default Group;
|
||||
@@ -0,0 +1,50 @@
|
||||
import { Schema, model, Document } from 'mongoose';
|
||||
|
||||
const HistoryScheme = new Schema({
|
||||
user: {
|
||||
type: String,
|
||||
required: true,
|
||||
},
|
||||
linkman: {
|
||||
type: String,
|
||||
required: true,
|
||||
},
|
||||
message: {
|
||||
type: String,
|
||||
required: true,
|
||||
},
|
||||
});
|
||||
|
||||
export interface HistoryDocument extends Document {
|
||||
/** user id */
|
||||
user: string;
|
||||
|
||||
/** linkman id */
|
||||
linkman: string;
|
||||
|
||||
/** last readed message id */
|
||||
message: string;
|
||||
}
|
||||
|
||||
const History = model<HistoryDocument>('History', HistoryScheme);
|
||||
|
||||
export default History;
|
||||
|
||||
export async function createOrUpdateHistory(
|
||||
userId: string,
|
||||
linkmanId: string,
|
||||
messageId: string,
|
||||
) {
|
||||
const history = await History.findOne({ user: userId, linkman: linkmanId });
|
||||
if (history) {
|
||||
history.message = messageId;
|
||||
await history.save();
|
||||
} else {
|
||||
await History.create({
|
||||
user: userId,
|
||||
linkman: linkmanId,
|
||||
message: messageId,
|
||||
});
|
||||
}
|
||||
return {};
|
||||
}
|
||||
@@ -0,0 +1,88 @@
|
||||
import { Schema, model, Document } from 'mongoose';
|
||||
import Group from './group';
|
||||
import User from './user';
|
||||
|
||||
const MessageSchema = new Schema({
|
||||
createTime: { type: Date, default: Date.now, index: true },
|
||||
|
||||
from: {
|
||||
type: Schema.Types.ObjectId,
|
||||
ref: 'User',
|
||||
},
|
||||
to: {
|
||||
type: String,
|
||||
index: true,
|
||||
},
|
||||
type: {
|
||||
type: String,
|
||||
enum: ['text', 'image', 'file', 'code', 'inviteV2', 'system'],
|
||||
default: 'text',
|
||||
},
|
||||
content: {
|
||||
type: String,
|
||||
default: '',
|
||||
},
|
||||
deleted: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
});
|
||||
|
||||
export interface MessageDocument extends Document {
|
||||
/** 发送人 */
|
||||
from: string;
|
||||
/** 接受者, 发送给群时为群_id, 发送给个人时为俩人的_id按大小序拼接后值 */
|
||||
to: string;
|
||||
/** 类型, text: 文本消息, image: 图片消息, code: 代码消息, invite: 邀请加群消息, system: 系统消息 */
|
||||
type: string;
|
||||
/** 内容, 某些消息类型会存成JSON */
|
||||
content: string;
|
||||
/** 创建时间 */
|
||||
createTime: Date;
|
||||
/** Has it been deleted */
|
||||
deleted: boolean;
|
||||
}
|
||||
|
||||
/**
|
||||
* Message Model
|
||||
* 聊天消息
|
||||
*/
|
||||
const Message = model<MessageDocument>('Message', MessageSchema);
|
||||
|
||||
export default Message;
|
||||
|
||||
interface SendMessageData {
|
||||
to: string;
|
||||
type: string;
|
||||
content: string;
|
||||
}
|
||||
|
||||
export async function handleInviteV2Message(message: SendMessageData) {
|
||||
if (message.type === 'inviteV2') {
|
||||
const inviteInfo = JSON.parse(message.content);
|
||||
if (inviteInfo.inviter && inviteInfo.group) {
|
||||
const [user, group] = await Promise.all([
|
||||
User.findOne({ _id: inviteInfo.inviter }),
|
||||
Group.findOne({ _id: inviteInfo.group }),
|
||||
]);
|
||||
if (user && group) {
|
||||
message.content = JSON.stringify({
|
||||
inviter: inviteInfo.inviter,
|
||||
inviterName: user?.username,
|
||||
group: inviteInfo.group,
|
||||
groupName: group.name,
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
export async function handleInviteV2Messages(messages: SendMessageData[]) {
|
||||
return Promise.all(
|
||||
messages.map(async (message) => {
|
||||
if (message.type === 'inviteV2') {
|
||||
await handleInviteV2Message(message);
|
||||
}
|
||||
}),
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
import { Schema, model, Document } from 'mongoose';
|
||||
|
||||
const NotificationSchema = new Schema({
|
||||
createTime: { type: Date, default: Date.now },
|
||||
|
||||
user: {
|
||||
type: Schema.Types.ObjectId,
|
||||
ref: 'User',
|
||||
},
|
||||
token: {
|
||||
type: String,
|
||||
unique: true,
|
||||
},
|
||||
});
|
||||
|
||||
export interface NotificationDocument extends Document {
|
||||
user: any;
|
||||
token: string;
|
||||
}
|
||||
|
||||
const Notification = model<NotificationDocument>(
|
||||
'Notification',
|
||||
NotificationSchema,
|
||||
);
|
||||
|
||||
export default Notification;
|
||||
@@ -0,0 +1,53 @@
|
||||
import { Schema, model, Document } from 'mongoose';
|
||||
|
||||
const SocketSchema = new Schema({
|
||||
createTime: { type: Date, default: Date.now },
|
||||
|
||||
id: {
|
||||
type: String,
|
||||
unique: true,
|
||||
index: true,
|
||||
},
|
||||
user: {
|
||||
type: Schema.Types.ObjectId,
|
||||
ref: 'User',
|
||||
},
|
||||
ip: String,
|
||||
os: {
|
||||
type: String,
|
||||
default: '',
|
||||
},
|
||||
browser: {
|
||||
type: String,
|
||||
default: '',
|
||||
},
|
||||
environment: {
|
||||
type: String,
|
||||
default: '',
|
||||
},
|
||||
});
|
||||
|
||||
export interface SocketDocument extends Document {
|
||||
/** socket连接id */
|
||||
id: string;
|
||||
/** 关联用户id */
|
||||
user: any;
|
||||
/** ip地址 */
|
||||
ip: string;
|
||||
/** 系统 */
|
||||
os: string;
|
||||
/** 浏览器 */
|
||||
browser: string;
|
||||
/** 详细环境信息 */
|
||||
environment: string;
|
||||
/** 创建时间 */
|
||||
createTime: Date;
|
||||
}
|
||||
|
||||
/**
|
||||
* Socket Model
|
||||
* 客户端socket连接信息
|
||||
*/
|
||||
const Socket = model<SocketDocument>('Socket', SocketSchema);
|
||||
|
||||
export default Socket;
|
||||
@@ -0,0 +1,59 @@
|
||||
import { Schema, model, Document } from 'mongoose';
|
||||
import { NAME_REGEXP } from '@fiora/utils/const';
|
||||
|
||||
const UserSchema = new Schema({
|
||||
createTime: { type: Date, default: Date.now },
|
||||
lastLoginTime: { type: Date, default: Date.now },
|
||||
|
||||
username: {
|
||||
type: String,
|
||||
trim: true,
|
||||
unique: true,
|
||||
match: NAME_REGEXP,
|
||||
index: true,
|
||||
},
|
||||
salt: String,
|
||||
password: String,
|
||||
avatar: String,
|
||||
tag: {
|
||||
type: String,
|
||||
default: '',
|
||||
trim: true,
|
||||
match: NAME_REGEXP,
|
||||
},
|
||||
expressions: [
|
||||
{
|
||||
type: String,
|
||||
},
|
||||
],
|
||||
lastLoginIp: String,
|
||||
});
|
||||
|
||||
export interface UserDocument extends Document {
|
||||
/** 用户名 */
|
||||
username: string;
|
||||
/** 密码加密盐 */
|
||||
salt: string;
|
||||
/** 加密的密码 */
|
||||
password: string;
|
||||
/** 头像 */
|
||||
avatar: string;
|
||||
/** 用户标签 */
|
||||
tag: string;
|
||||
/** 表情收藏 */
|
||||
expressions: string[];
|
||||
/** 创建时间 */
|
||||
createTime: Date;
|
||||
/** 最后登录时间 */
|
||||
lastLoginTime: Date;
|
||||
/** 最后登录IP */
|
||||
lastLoginIp: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* User Model
|
||||
* 用户信息
|
||||
*/
|
||||
const User = model<UserDocument>('User', UserSchema);
|
||||
|
||||
export default User;
|
||||
@@ -0,0 +1,16 @@
|
||||
{
|
||||
"name": "@fiora/database",
|
||||
"version": "1.0.0",
|
||||
"license": "MIT",
|
||||
"private": true,
|
||||
"dependencies": {
|
||||
"@fiora/config": "^1.0.0",
|
||||
"@fiora/utils": "^1.0.0",
|
||||
"mongoose": "^5.13.3",
|
||||
"redis": "^3.1.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/mongoose": "^5.11.97",
|
||||
"@types/redis": "^2.8.31"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,83 @@
|
||||
import redis from 'redis';
|
||||
import { promisify } from 'util';
|
||||
import config from '@fiora/config/server';
|
||||
import logger from '@fiora/utils/logger';
|
||||
|
||||
export default function initRedis() {
|
||||
const client = redis.createClient({
|
||||
...config.redis,
|
||||
});
|
||||
|
||||
client.on('error', (err) => {
|
||||
logger.error('[redis]', err.message);
|
||||
process.exit(0);
|
||||
});
|
||||
|
||||
return client;
|
||||
}
|
||||
|
||||
const client = initRedis();
|
||||
|
||||
export const get = promisify(client.get).bind(client);
|
||||
|
||||
export const expire = promisify(client.expire).bind(client);
|
||||
|
||||
export async function set(key: string, value: string, expireTime = Infinity) {
|
||||
await promisify(client.set).bind(client)(key, value);
|
||||
if (expireTime !== Infinity) {
|
||||
await expire(key, expireTime);
|
||||
}
|
||||
}
|
||||
|
||||
export const keys = promisify(client.keys).bind(client);
|
||||
|
||||
export async function has(key: string) {
|
||||
const v = await get(key);
|
||||
return v !== null;
|
||||
}
|
||||
|
||||
export function getNewUserKey(userId: string) {
|
||||
return `NewUser-${userId}`;
|
||||
}
|
||||
|
||||
export function getNewRegisteredUserIpKey(ip: string) {
|
||||
// The value of v1 is ip
|
||||
// The value of v2 is count number
|
||||
return `NewRegisteredUserIpV2-${ip}`;
|
||||
}
|
||||
|
||||
export function getSealIpKey(ip: string) {
|
||||
return `SealIp-${ip}`;
|
||||
}
|
||||
|
||||
export async function getAllSealIp() {
|
||||
const allSealIpKeys = await keys('SealIp-*');
|
||||
return allSealIpKeys.map((key) => key.replace('SealIp-', ''));
|
||||
}
|
||||
|
||||
export function getSealUserKey(user: string) {
|
||||
return `SealUser-${user}`;
|
||||
}
|
||||
|
||||
export async function getAllSealUser() {
|
||||
const allSealUserKeys = await keys('SealUser-*');
|
||||
return allSealUserKeys.map((key) => key.split('-')[1]);
|
||||
}
|
||||
|
||||
const Minute = 60;
|
||||
const Hour = Minute * 60;
|
||||
const Day = Hour * 24;
|
||||
|
||||
export const Redis = {
|
||||
get,
|
||||
set,
|
||||
has,
|
||||
expire,
|
||||
keys,
|
||||
Minute,
|
||||
Hour,
|
||||
Day,
|
||||
};
|
||||
|
||||
export const DisableSendMessageKey = 'DisableSendMessage';
|
||||
export const DisableNewUserSendMessageKey = 'DisableNewUserSendMessageKey';
|
||||
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"extends": "../../tsconfig",
|
||||
}
|
||||
@@ -0,0 +1,261 @@
|
||||
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
|
||||
# yarn lockfile v1
|
||||
|
||||
|
||||
"@types/bson@*":
|
||||
version "4.0.4"
|
||||
resolved "https://registry.yarnpkg.com/@types/bson/-/bson-4.0.4.tgz#79d2d26e81070044db2a1a8b2cc2f673c840e1e5"
|
||||
integrity sha512-awqorHvQS0DqxkHQ/FxcPX9E+H7Du51Qw/2F+5TBMSaE3G0hm+8D3eXJ6MAzFw75nE8V7xF0QvzUSdxIjJb/GA==
|
||||
dependencies:
|
||||
"@types/node" "*"
|
||||
|
||||
"@types/mongodb@^3.5.27":
|
||||
version "3.6.20"
|
||||
resolved "https://registry.yarnpkg.com/@types/mongodb/-/mongodb-3.6.20.tgz#b7c5c580644f6364002b649af1c06c3c0454e1d2"
|
||||
integrity sha512-WcdpPJCakFzcWWD9juKoZbRtQxKIMYF/JIAM4JrNHrMcnJL6/a2NWjXxW7fo9hxboxxkg+icff8d7+WIEvKgYQ==
|
||||
dependencies:
|
||||
"@types/bson" "*"
|
||||
"@types/node" "*"
|
||||
|
||||
"@types/mongoose@^5.11.97":
|
||||
version "5.11.97"
|
||||
resolved "https://registry.yarnpkg.com/@types/mongoose/-/mongoose-5.11.97.tgz#80b0357f3de6807eb597262f52e49c3e13ee14d8"
|
||||
integrity sha512-cqwOVYT3qXyLiGw7ueU2kX9noE8DPGRY6z8eUxudhXY8NZ7DMKYAxyZkLSevGfhCX3dO/AoX5/SO9lAzfjon0Q==
|
||||
dependencies:
|
||||
mongoose "*"
|
||||
|
||||
"@types/node@*":
|
||||
version "16.3.3"
|
||||
resolved "https://registry.yarnpkg.com/@types/node/-/node-16.3.3.tgz#0c30adff37bbbc7a50eb9b58fae2a504d0d88038"
|
||||
integrity sha512-8h7k1YgQKxKXWckzFCMfsIwn0Y61UK6tlD6y2lOb3hTOIMlK3t9/QwHOhc81TwU+RMf0As5fj7NPjroERCnejQ==
|
||||
|
||||
"@types/node@14.x || 15.x":
|
||||
version "15.14.2"
|
||||
resolved "https://registry.yarnpkg.com/@types/node/-/node-15.14.2.tgz#7af8ab20156586f076f4760bc1b3c5ddfffd1ff2"
|
||||
integrity sha512-dvMUE/m2LbXPwlvVuzCyslTEtQ2ZwuuFClDrOQ6mp2CenCg971719PTILZ4I6bTP27xfFFc+o7x2TkLuun/MPw==
|
||||
|
||||
"@types/redis@^2.8.31":
|
||||
version "2.8.31"
|
||||
resolved "https://registry.yarnpkg.com/@types/redis/-/redis-2.8.31.tgz#c11c1b269fec132ac2ec9eb891edf72fc549149e"
|
||||
integrity sha512-daWrrTDYaa5iSDFbgzZ9gOOzyp2AJmYK59OlG/2KGBgYWF3lfs8GDKm1c//tik5Uc93hDD36O+qLPvzDolChbA==
|
||||
dependencies:
|
||||
"@types/node" "*"
|
||||
|
||||
bl@^2.2.1:
|
||||
version "2.2.1"
|
||||
resolved "https://registry.yarnpkg.com/bl/-/bl-2.2.1.tgz#8c11a7b730655c5d56898cdc871224f40fd901d5"
|
||||
integrity sha512-6Pesp1w0DEX1N550i/uGV/TqucVL4AM/pgThFSN/Qq9si1/DF9aIHs1BxD8V/QU0HoeHO6cQRTAuYnLPKq1e4g==
|
||||
dependencies:
|
||||
readable-stream "^2.3.5"
|
||||
safe-buffer "^5.1.1"
|
||||
|
||||
bluebird@3.5.1:
|
||||
version "3.5.1"
|
||||
resolved "https://registry.yarnpkg.com/bluebird/-/bluebird-3.5.1.tgz#d9551f9de98f1fcda1e683d17ee91a0602ee2eb9"
|
||||
integrity sha512-MKiLiV+I1AA596t9w1sQJ8jkiSr5+ZKi0WKrYGUn6d1Fx+Ij4tIj+m2WMQSGczs5jZVxV339chE8iwk6F64wjA==
|
||||
|
||||
bson@^1.1.4:
|
||||
version "1.1.6"
|
||||
resolved "https://registry.yarnpkg.com/bson/-/bson-1.1.6.tgz#fb819be9a60cd677e0853aee4ca712a785d6618a"
|
||||
integrity sha512-EvVNVeGo4tHxwi8L6bPj3y3itEvStdwvvlojVxxbyYfoaxJ6keLgrTuKdyfEAszFK+H3olzBuafE0yoh0D1gdg==
|
||||
|
||||
core-util-is@~1.0.0:
|
||||
version "1.0.2"
|
||||
resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7"
|
||||
integrity sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=
|
||||
|
||||
debug@3.1.0:
|
||||
version "3.1.0"
|
||||
resolved "https://registry.yarnpkg.com/debug/-/debug-3.1.0.tgz#5bb5a0672628b64149566ba16819e61518c67261"
|
||||
integrity sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==
|
||||
dependencies:
|
||||
ms "2.0.0"
|
||||
|
||||
denque@^1.4.1, denque@^1.5.0:
|
||||
version "1.5.0"
|
||||
resolved "https://registry.yarnpkg.com/denque/-/denque-1.5.0.tgz#773de0686ff2d8ec2ff92914316a47b73b1c73de"
|
||||
integrity sha512-CYiCSgIF1p6EUByQPlGkKnP1M9g0ZV3qMIrqMqZqdwazygIA/YP2vrbcyl1h/WppKJTdl1F85cXIle+394iDAQ==
|
||||
|
||||
inherits@~2.0.3:
|
||||
version "2.0.4"
|
||||
resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c"
|
||||
integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==
|
||||
|
||||
isarray@~1.0.0:
|
||||
version "1.0.0"
|
||||
resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11"
|
||||
integrity sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=
|
||||
|
||||
kareem@2.3.2:
|
||||
version "2.3.2"
|
||||
resolved "https://registry.yarnpkg.com/kareem/-/kareem-2.3.2.tgz#78c4508894985b8d38a0dc15e1a8e11078f2ca93"
|
||||
integrity sha512-STHz9P7X2L4Kwn72fA4rGyqyXdmrMSdxqHx9IXon/FXluXieaFA6KJ2upcHAHxQPQ0LeM/OjLrhFxifHewOALQ==
|
||||
|
||||
memory-pager@^1.0.2:
|
||||
version "1.5.0"
|
||||
resolved "https://registry.yarnpkg.com/memory-pager/-/memory-pager-1.5.0.tgz#d8751655d22d384682741c972f2c3d6dfa3e66b5"
|
||||
integrity sha512-ZS4Bp4r/Zoeq6+NLJpP+0Zzm0pR8whtGPf1XExKLJBAczGMnSi3It14OiNCStjQjM6NU1okjQGSxgEZN8eBYKg==
|
||||
|
||||
mongodb@3.6.10:
|
||||
version "3.6.10"
|
||||
resolved "https://registry.yarnpkg.com/mongodb/-/mongodb-3.6.10.tgz#f10e990113c86b195c8af0599b9b3a90748b6ee4"
|
||||
integrity sha512-fvIBQBF7KwCJnDZUnFFy4WqEFP8ibdXeFANnylW19+vOwdjOAvqIzPdsNCEMT6VKTHnYu4K64AWRih0mkFms6Q==
|
||||
dependencies:
|
||||
bl "^2.2.1"
|
||||
bson "^1.1.4"
|
||||
denque "^1.4.1"
|
||||
optional-require "^1.0.3"
|
||||
safe-buffer "^5.1.2"
|
||||
optionalDependencies:
|
||||
saslprep "^1.0.0"
|
||||
|
||||
mongoose-legacy-pluralize@1.0.2:
|
||||
version "1.0.2"
|
||||
resolved "https://registry.yarnpkg.com/mongoose-legacy-pluralize/-/mongoose-legacy-pluralize-1.0.2.tgz#3ba9f91fa507b5186d399fb40854bff18fb563e4"
|
||||
integrity sha512-Yo/7qQU4/EyIS8YDFSeenIvXxZN+ld7YdV9LqFVQJzTLye8unujAWPZ4NWKfFA+RNjh+wvTWKY9Z3E5XM6ZZiQ==
|
||||
|
||||
mongoose@*, mongoose@^5.13.3:
|
||||
version "5.13.3"
|
||||
resolved "https://registry.yarnpkg.com/mongoose/-/mongoose-5.13.3.tgz#42cb40207bbcaca9c6fa94b0a8c0a38181c1965e"
|
||||
integrity sha512-q+zX6kqHAvwxf5speMWhq6qF4vdj+x6/kfD5RSKdZKNm52yGmaUygN+zgrtQjBZPFEzG0B3vF6GP0PoAGadE+w==
|
||||
dependencies:
|
||||
"@types/mongodb" "^3.5.27"
|
||||
"@types/node" "14.x || 15.x"
|
||||
bson "^1.1.4"
|
||||
kareem "2.3.2"
|
||||
mongodb "3.6.10"
|
||||
mongoose-legacy-pluralize "1.0.2"
|
||||
mpath "0.8.3"
|
||||
mquery "3.2.5"
|
||||
ms "2.1.2"
|
||||
regexp-clone "1.0.0"
|
||||
safe-buffer "5.2.1"
|
||||
sift "13.5.2"
|
||||
sliced "1.0.1"
|
||||
|
||||
mpath@0.8.3:
|
||||
version "0.8.3"
|
||||
resolved "https://registry.yarnpkg.com/mpath/-/mpath-0.8.3.tgz#828ac0d187f7f42674839d74921970979abbdd8f"
|
||||
integrity sha512-eb9rRvhDltXVNL6Fxd2zM9D4vKBxjVVQNLNijlj7uoXUy19zNDsIif5zR+pWmPCWNKwAtqyo4JveQm4nfD5+eA==
|
||||
|
||||
mquery@3.2.5:
|
||||
version "3.2.5"
|
||||
resolved "https://registry.yarnpkg.com/mquery/-/mquery-3.2.5.tgz#8f2305632e4bb197f68f60c0cffa21aaf4060c51"
|
||||
integrity sha512-VjOKHHgU84wij7IUoZzFRU07IAxd5kWJaDmyUzQlbjHjyoeK5TNeeo8ZsFDtTYnSgpW6n/nMNIHvE3u8Lbrf4A==
|
||||
dependencies:
|
||||
bluebird "3.5.1"
|
||||
debug "3.1.0"
|
||||
regexp-clone "^1.0.0"
|
||||
safe-buffer "5.1.2"
|
||||
sliced "1.0.1"
|
||||
|
||||
ms@2.0.0:
|
||||
version "2.0.0"
|
||||
resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8"
|
||||
integrity sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=
|
||||
|
||||
ms@2.1.2:
|
||||
version "2.1.2"
|
||||
resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009"
|
||||
integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==
|
||||
|
||||
optional-require@^1.0.3:
|
||||
version "1.0.3"
|
||||
resolved "https://registry.yarnpkg.com/optional-require/-/optional-require-1.0.3.tgz#275b8e9df1dc6a17ad155369c2422a440f89cb07"
|
||||
integrity sha512-RV2Zp2MY2aeYK5G+B/Sps8lW5NHAzE5QClbFP15j+PWmP+T9PxlJXBOOLoSAdgwFvS4t0aMR4vpedMkbHfh0nA==
|
||||
|
||||
process-nextick-args@~2.0.0:
|
||||
version "2.0.1"
|
||||
resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-2.0.1.tgz#7820d9b16120cc55ca9ae7792680ae7dba6d7fe2"
|
||||
integrity sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==
|
||||
|
||||
readable-stream@^2.3.5:
|
||||
version "2.3.7"
|
||||
resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.7.tgz#1eca1cf711aef814c04f62252a36a62f6cb23b57"
|
||||
integrity sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==
|
||||
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"
|
||||
|
||||
redis-commands@^1.7.0:
|
||||
version "1.7.0"
|
||||
resolved "https://registry.yarnpkg.com/redis-commands/-/redis-commands-1.7.0.tgz#15a6fea2d58281e27b1cd1acfb4b293e278c3a89"
|
||||
integrity sha512-nJWqw3bTFy21hX/CPKHth6sfhZbdiHP6bTawSgQBlKOVRG7EZkfHbbHwQJnrE4vsQf0CMNE+3gJ4Fmm16vdVlQ==
|
||||
|
||||
redis-errors@^1.0.0, redis-errors@^1.2.0:
|
||||
version "1.2.0"
|
||||
resolved "https://registry.yarnpkg.com/redis-errors/-/redis-errors-1.2.0.tgz#eb62d2adb15e4eaf4610c04afe1529384250abad"
|
||||
integrity sha1-62LSrbFeTq9GEMBK/hUpOEJQq60=
|
||||
|
||||
redis-parser@^3.0.0:
|
||||
version "3.0.0"
|
||||
resolved "https://registry.yarnpkg.com/redis-parser/-/redis-parser-3.0.0.tgz#b66d828cdcafe6b4b8a428a7def4c6bcac31c8b4"
|
||||
integrity sha1-tm2CjNyv5rS4pCin3vTGvKwxyLQ=
|
||||
dependencies:
|
||||
redis-errors "^1.0.0"
|
||||
|
||||
redis@^3.1.2:
|
||||
version "3.1.2"
|
||||
resolved "https://registry.yarnpkg.com/redis/-/redis-3.1.2.tgz#766851117e80653d23e0ed536254677ab647638c"
|
||||
integrity sha512-grn5KoZLr/qrRQVwoSkmzdbw6pwF+/rwODtrOr6vuBRiR/f3rjSTGupbF90Zpqm2oenix8Do6RV7pYEkGwlKkw==
|
||||
dependencies:
|
||||
denque "^1.5.0"
|
||||
redis-commands "^1.7.0"
|
||||
redis-errors "^1.2.0"
|
||||
redis-parser "^3.0.0"
|
||||
|
||||
regexp-clone@1.0.0, regexp-clone@^1.0.0:
|
||||
version "1.0.0"
|
||||
resolved "https://registry.yarnpkg.com/regexp-clone/-/regexp-clone-1.0.0.tgz#222db967623277056260b992626354a04ce9bf63"
|
||||
integrity sha512-TuAasHQNamyyJ2hb97IuBEif4qBHGjPHBS64sZwytpLEqtBQ1gPJTnOaQ6qmpET16cK14kkjbazl6+p0RRv0yw==
|
||||
|
||||
safe-buffer@5.1.2, safe-buffer@~5.1.0, safe-buffer@~5.1.1:
|
||||
version "5.1.2"
|
||||
resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d"
|
||||
integrity sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==
|
||||
|
||||
safe-buffer@5.2.1, safe-buffer@^5.1.1, safe-buffer@^5.1.2:
|
||||
version "5.2.1"
|
||||
resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.1.tgz#1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6"
|
||||
integrity sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==
|
||||
|
||||
saslprep@^1.0.0:
|
||||
version "1.0.3"
|
||||
resolved "https://registry.yarnpkg.com/saslprep/-/saslprep-1.0.3.tgz#4c02f946b56cf54297e347ba1093e7acac4cf226"
|
||||
integrity sha512-/MY/PEMbk2SuY5sScONwhUDsV2p77Znkb/q3nSVstq/yQzYJOH/Azh29p9oJLsl3LnQwSvZDKagDGBsBwSooag==
|
||||
dependencies:
|
||||
sparse-bitfield "^3.0.3"
|
||||
|
||||
sift@13.5.2:
|
||||
version "13.5.2"
|
||||
resolved "https://registry.yarnpkg.com/sift/-/sift-13.5.2.tgz#24a715e13c617b086166cd04917d204a591c9da6"
|
||||
integrity sha512-+gxdEOMA2J+AI+fVsCqeNn7Tgx3M9ZN9jdi95939l1IJ8cZsqS8sqpJyOkic2SJk+1+98Uwryt/gL6XDaV+UZA==
|
||||
|
||||
sliced@1.0.1:
|
||||
version "1.0.1"
|
||||
resolved "https://registry.yarnpkg.com/sliced/-/sliced-1.0.1.tgz#0b3a662b5d04c3177b1926bea82b03f837a2ef41"
|
||||
integrity sha1-CzpmK10Ewxd7GSa+qCsD+Dei70E=
|
||||
|
||||
sparse-bitfield@^3.0.3:
|
||||
version "3.0.3"
|
||||
resolved "https://registry.yarnpkg.com/sparse-bitfield/-/sparse-bitfield-3.0.3.tgz#ff4ae6e68656056ba4b3e792ab3334d38273ca11"
|
||||
integrity sha1-/0rm5oZWBWuks+eSqzM004JzyhE=
|
||||
dependencies:
|
||||
memory-pager "^1.0.2"
|
||||
|
||||
string_decoder@~1.1.1:
|
||||
version "1.1.1"
|
||||
resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.1.1.tgz#9cf1611ba62685d7030ae9e4ba34149c3af03fc8"
|
||||
integrity sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==
|
||||
dependencies:
|
||||
safe-buffer "~5.1.0"
|
||||
|
||||
util-deprecate@~1.0.1:
|
||||
version "1.0.2"
|
||||
resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf"
|
||||
integrity sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=
|
||||
Reference in New Issue
Block a user