윤준석

Merge branch 'feature/220524_nodejs_orm_model' into 'main'

Feature/220524 nodejs orm model

# nodejs 서버 유저 및 키워드 database connection 및 모델 생성 및 쿼리 함수

## database connection

1. Sequelize ORM 사용하여 db connection

## Model

1. User model 생성
2. Keyword model 생성
3. User-Keyword many to many 관계 생성

## Query

- addKeyword
  - 키워드 추가 함수 `INPUT: {keyword, userId}`
  - 유저 id 기반으로 키워드 추가 및 연결 테이블 레코드 생성

- deleteKeyword
  - 키워드 삭제 함수 `INPUT: {userId, keyword}`
  - 유저 id 기반으로 연결 테이블 레코드 삭제

- getKeywordsByUserId
  - 유저가 등록한 키워드 조회 함수 `INPUT: {userId}`
  - 유저 id 기반으로 연결된 모든 키워드 조회

- getUsersByKeyword
  - 키워드를 등록환 유저 조회 함수 `INPUT: {keyword}`
  - 키워드 기반으로 연결된 모든 유저 조회

- getAllUsers
  - 등록된 모든 유저 조회 함수 `INPUT: {NONE}`

- getAllKeywords
  - 등록된 모든 키워드 조회 함수 `INPUT: {NONE}`

See merge request !17
1 +let database = module.exports = {};
2 +
3 +const db = require("../models")
4 +const User = db.user
5 +const Keyword = db.keyword
6 +const UserKeyword = db.userKeyword
7 +
8 +
9 +database.addKeyword = async function(keyword, userId) {
10 +
11 + const u = await User.findOrCreate({
12 + where: {
13 + userId: userId
14 + }
15 + })
16 +
17 + const k = await Keyword.findOrCreate({
18 + where: {
19 + keyword: keyword
20 + }
21 + })
22 +
23 + await UserKeyword.findOrCreate({
24 + where: {
25 + userId: u[0].id,
26 + keywordId: k[0].id
27 + }
28 + })
29 +}
30 +
31 +database.deleteKeyword = async function(userId, keyword) {
32 +
33 + const u = await User.findOrCreate({
34 + where: {
35 + userId: userId
36 + }
37 + })
38 +
39 + const k = await Keyword.findOrCreate({
40 + where: {
41 + keyword: keyword
42 + }
43 + })
44 +
45 + await UserKeyword.destroy({
46 + where: {
47 + userId: u[0].id,
48 + keywordId: k[0].id
49 + }
50 + })
51 +}
52 +
53 +database.getKeywordsByUserId = async function(userId) {
54 +
55 + const keywords = await Keyword.findAll({
56 + attributes: ['keyword'],
57 + where: {
58 + '$user.userId$': userId
59 + },
60 + include: [{
61 + attributes: [],
62 + model: User,
63 + as: 'user'
64 + }],
65 + raw: true
66 + })
67 +
68 + let result = []
69 + for (let i = 0; i < keywords.length; i++) {
70 + result.push(keywords[i].keyword)
71 + }
72 +
73 + return result
74 +}
75 +
76 +database.getUsersByKeyword = async function(keyword) {
77 +
78 + const users = await User.findAll({
79 + attributes: ['userId'],
80 + where: {
81 + '$keyword.keyword$': keyword
82 + },
83 + include: [{
84 + attributes: [],
85 + model: Keyword,
86 + as: 'keyword'
87 + }],
88 + raw: true
89 + })
90 +
91 + let result = []
92 + for (let i = 0; i < users.length; i++) {
93 + result.push(users[i].userId)
94 + }
95 +
96 + return result
97 +}
98 +
99 +database.getAllUsers = async function() {
100 +
101 + const users = await User.findAll({
102 + raw: true
103 + })
104 +
105 + let result = []
106 + for (let i = 0; i < users.length; i++) {
107 + result.push(users[i].userId)
108 + }
109 +
110 + return result
111 +}
112 +
113 +database.getAllKeywords = async function() {
114 +
115 + const keywords = await Keyword.findAll({
116 + raw: true
117 + })
118 +
119 + let result = []
120 + for (let i = 0; i< keywords.length; i++) {
121 + result.push(keywords[i].keyword)
122 + }
123 +
124 + console.log(result)
125 + return result
126 +}
...\ No newline at end of file ...\ No newline at end of file
...@@ -3,13 +3,35 @@ const line = require("@line/bot-sdk"); ...@@ -3,13 +3,35 @@ const line = require("@line/bot-sdk");
3 const setFlexMessage = require("./apis/setFlexMessage"); 3 const setFlexMessage = require("./apis/setFlexMessage");
4 const fs = require("fs"); 4 const fs = require("fs");
5 5
6 +const { sequelize } = require('./models')
7 +const database = require("./apis/database");
8 +
9 +// Initialize DB connection
10 +sequelize.sync({ force: false })
11 + .then(() => {
12 + console.log('database connection complete');
13 + database.addKeyword("rtx3060", "junseok")
14 + database.getKeywordsByUserId("junseok")
15 + database.deleteKeyword("phobyjun", "rtx3080")
16 + database.getAllUsers()
17 + database.getUsersByKeyword("rtx3060")
18 + database.getAllKeywords()
19 + })
20 + .catch((err) => {
21 + console.log('database connection failed');
22 + });
23 +
24 +// Load .env configuration
6 require("dotenv").config(); 25 require("dotenv").config();
7 const config = { 26 const config = {
8 channelAccessToken: process.env.channelAccessToken, 27 channelAccessToken: process.env.channelAccessToken,
9 channelSecret: process.env.channelSecret, 28 channelSecret: process.env.channelSecret,
10 }; 29 };
11 30
31 +// Express app server initialization
12 const app = express(); 32 const app = express();
33 +
34 +// Create post request handler for chatbot
13 app.post("/webhook", line.middleware(config), (req, res) => { 35 app.post("/webhook", line.middleware(config), (req, res) => {
14 Promise.all(req.body.events.map(handleEvent)).then((result) => 36 Promise.all(req.body.events.map(handleEvent)).then((result) =>
15 res.json(result) 37 res.json(result)
......
1 +{
2 + "development": {
3 + "username": "root",
4 + "password": "mamuri",
5 + "database": "mamuri_db",
6 + "host": "127.0.0.1",
7 + "dialect": "mysql"
8 + },
9 + "test": {
10 + "username": "root",
11 + "password": null,
12 + "database": "database_test",
13 + "host": "127.0.0.1",
14 + "dialect": "mysql"
15 + },
16 + "production": {
17 + "username": "root",
18 + "password": null,
19 + "database": "database_production",
20 + "host": "127.0.0.1",
21 + "dialect": "mysql"
22 + }
23 +}
1 +'use strict';
2 +
3 +const fs = require('fs');
4 +const path = require('path');
5 +const Sequelize = require('sequelize');
6 +const basename = path.basename(__filename);
7 +const env = process.env.NODE_ENV || 'development';
8 +const config = require(__dirname + '/../config/config.json')[env];
9 +const db = {};
10 +
11 +let sequelize;
12 +if (config.use_env_variable) {
13 + sequelize = new Sequelize(process.env[config.use_env_variable], config);
14 +} else {
15 + sequelize = new Sequelize(config.database, config.username, config.password, config);
16 +}
17 +
18 +fs
19 + .readdirSync(__dirname)
20 + .filter(file => {
21 + return (file.indexOf('.') !== 0) && (file !== basename) && (file.slice(-3) === '.js');
22 + })
23 + .forEach(file => {
24 + const model = require(path.join(__dirname, file))(sequelize, Sequelize.DataTypes);
25 + db[model.name] = model;
26 + });
27 +
28 +Object.keys(db).forEach(modelName => {
29 + if (db[modelName].associate) {
30 + db[modelName].associate(db);
31 + }
32 +});
33 +
34 +db.sequelize = sequelize;
35 +db.Sequelize = Sequelize;
36 +
37 +db.user = require("./user")(sequelize, Sequelize);
38 +db.keyword = require("./keyword")(sequelize, Sequelize);
39 +db.userKeyword = sequelize.define('user_keywords');
40 +
41 +db.user.belongsToMany(db.keyword, {through: db.userKeyword, as: 'keyword'});
42 +db.keyword.belongsToMany(db.user, {through: db.userKeyword, as: 'user'});
43 +
44 +module.exports = db;
1 +module.exports = (sequelize, DataTypes) => {
2 +
3 + return sequelize.define("keyword", {
4 + id: {
5 + type: DataTypes.INTEGER,
6 + autoIncrement: true,
7 + primaryKey: true
8 + },
9 + keyword: {
10 + type: DataTypes.STRING,
11 + allowNull: false
12 + }
13 + })
14 +}
...\ No newline at end of file ...\ No newline at end of file
1 +module.exports = (sequelize, DataTypes) => {
2 +
3 + return sequelize.define("user", {
4 + id: {
5 + type: DataTypes.INTEGER,
6 + autoIncrement: true,
7 + primaryKey: true
8 + },
9 + userId: {
10 + type: DataTypes.STRING,
11 + allowNull: false
12 + }
13 + })
14 +}
...\ No newline at end of file ...\ No newline at end of file
...@@ -12,7 +12,9 @@ ...@@ -12,7 +12,9 @@
12 "@line/bot-sdk": "^7.5.0", 12 "@line/bot-sdk": "^7.5.0",
13 "dotenv": "^16.0.1", 13 "dotenv": "^16.0.1",
14 "express": "^4.18.1", 14 "express": "^4.18.1",
15 - "nodemon": "^2.0.16" 15 + "mysql2": "^2.3.3",
16 + "nodemon": "^2.0.16",
17 + "sequelize": "^6.20.0"
16 } 18 }
17 }, 19 },
18 "node_modules/@line/bot-sdk": { 20 "node_modules/@line/bot-sdk": {
...@@ -72,11 +74,29 @@ ...@@ -72,11 +74,29 @@
72 "@types/node": "*" 74 "@types/node": "*"
73 } 75 }
74 }, 76 },
77 + "node_modules/@types/debug": {
78 + "version": "4.1.7",
79 + "resolved": "https://registry.npmjs.org/@types/debug/-/debug-4.1.7.tgz",
80 + "integrity": "sha512-9AonUzyTjXXhEOa0DnqpzZi6VHlqKMswga9EXjpXnnqxwLtdvPPtlO8evrI5D9S6asFRCQ6v+wpiUKbw+vKqyg==",
81 + "dependencies": {
82 + "@types/ms": "*"
83 + }
84 + },
85 + "node_modules/@types/ms": {
86 + "version": "0.7.31",
87 + "resolved": "https://registry.npmjs.org/@types/ms/-/ms-0.7.31.tgz",
88 + "integrity": "sha512-iiUgKzV9AuaEkZqkOLDIvlQiL6ltuZd9tGcW3gwpnX8JbuiuhFlEGmmFXEXkN50Cvq7Os88IY2v0dkDqXYWVgA=="
89 + },
75 "node_modules/@types/node": { 90 "node_modules/@types/node": {
76 "version": "14.18.18", 91 "version": "14.18.18",
77 "resolved": "https://registry.npmjs.org/@types/node/-/node-14.18.18.tgz", 92 "resolved": "https://registry.npmjs.org/@types/node/-/node-14.18.18.tgz",
78 "integrity": "sha512-B9EoJFjhqcQ9OmQrNorItO+OwEOORNn3S31WuiHvZY/dm9ajkB7AKD/8toessEtHHNL+58jofbq7hMMY9v4yig==" 93 "integrity": "sha512-B9EoJFjhqcQ9OmQrNorItO+OwEOORNn3S31WuiHvZY/dm9ajkB7AKD/8toessEtHHNL+58jofbq7hMMY9v4yig=="
79 }, 94 },
95 + "node_modules/@types/validator": {
96 + "version": "13.7.2",
97 + "resolved": "https://registry.npmjs.org/@types/validator/-/validator-13.7.2.tgz",
98 + "integrity": "sha512-KFcchQ3h0OPQgFirBRPZr5F/sVjxZsOrQHedj3zi8AH3Zv/hOLx2OLR4hxR5HcfoU+33n69ZuOfzthKVdMoTiw=="
99 + },
80 "node_modules/abbrev": { 100 "node_modules/abbrev": {
81 "version": "1.1.1", 101 "version": "1.1.1",
82 "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz", 102 "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz",
...@@ -513,6 +533,14 @@ ...@@ -513,6 +533,14 @@
513 "node": ">=0.4.0" 533 "node": ">=0.4.0"
514 } 534 }
515 }, 535 },
536 + "node_modules/denque": {
537 + "version": "2.0.1",
538 + "resolved": "https://registry.npmjs.org/denque/-/denque-2.0.1.tgz",
539 + "integrity": "sha512-tfiWc6BQLXNLpNiR5iGd0Ocu3P3VpxfzFiqubLgMfhfOw9WyvgJBd46CClNn9k3qfbjvT//0cf7AlYRX/OslMQ==",
540 + "engines": {
541 + "node": ">=0.10"
542 + }
543 + },
516 "node_modules/depd": { 544 "node_modules/depd": {
517 "version": "2.0.0", 545 "version": "2.0.0",
518 "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz", 546 "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz",
...@@ -549,6 +577,11 @@ ...@@ -549,6 +577,11 @@
549 "node": ">=12" 577 "node": ">=12"
550 } 578 }
551 }, 579 },
580 + "node_modules/dottie": {
581 + "version": "2.0.2",
582 + "resolved": "https://registry.npmjs.org/dottie/-/dottie-2.0.2.tgz",
583 + "integrity": "sha512-fmrwR04lsniq/uSr8yikThDTrM7epXHBAAjH9TbeH3rEA8tdCO7mRzB9hdmdGyJCxF8KERo9CITcm3kGuoyMhg=="
584 + },
552 "node_modules/duplexer3": { 585 "node_modules/duplexer3": {
553 "version": "0.1.4", 586 "version": "0.1.4",
554 "resolved": "https://registry.npmjs.org/duplexer3/-/duplexer3-0.1.4.tgz", 587 "resolved": "https://registry.npmjs.org/duplexer3/-/duplexer3-0.1.4.tgz",
...@@ -753,6 +786,14 @@ ...@@ -753,6 +786,14 @@
753 "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", 786 "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz",
754 "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==" 787 "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A=="
755 }, 788 },
789 + "node_modules/generate-function": {
790 + "version": "2.3.1",
791 + "resolved": "https://registry.npmjs.org/generate-function/-/generate-function-2.3.1.tgz",
792 + "integrity": "sha512-eeB5GfMNeevm/GRYq20ShmsaGcmI81kIX2K9XQx5miC8KdHaC6Jm0qQ8ZNeGOi7wYB8OsdxKs+Y2oVuTFuVwKQ==",
793 + "dependencies": {
794 + "is-property": "^1.0.2"
795 + }
796 + },
756 "node_modules/get-intrinsic": { 797 "node_modules/get-intrinsic": {
757 "version": "1.1.1", 798 "version": "1.1.1",
758 "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.1.1.tgz", 799 "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.1.1.tgz",
...@@ -937,6 +978,14 @@ ...@@ -937,6 +978,14 @@
937 "node": ">=0.8.19" 978 "node": ">=0.8.19"
938 } 979 }
939 }, 980 },
981 + "node_modules/inflection": {
982 + "version": "1.13.2",
983 + "resolved": "https://registry.npmjs.org/inflection/-/inflection-1.13.2.tgz",
984 + "integrity": "sha512-cmZlljCRTBFouT8UzMzrGcVEvkv6D/wBdcdKG7J1QH5cXjtU75Dm+P27v9EKu/Y43UYyCJd1WC4zLebRrC8NBw==",
985 + "engines": [
986 + "node >= 0.4.0"
987 + ]
988 + },
940 "node_modules/inherits": { 989 "node_modules/inherits": {
941 "version": "2.0.4", 990 "version": "2.0.4",
942 "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", 991 "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz",
...@@ -1057,6 +1106,11 @@ ...@@ -1057,6 +1106,11 @@
1057 "node": ">=8" 1106 "node": ">=8"
1058 } 1107 }
1059 }, 1108 },
1109 + "node_modules/is-property": {
1110 + "version": "1.0.2",
1111 + "resolved": "https://registry.npmjs.org/is-property/-/is-property-1.0.2.tgz",
1112 + "integrity": "sha1-V/4cTkhHTt1lsJkR8msc1Ald2oQ="
1113 + },
1060 "node_modules/is-typedarray": { 1114 "node_modules/is-typedarray": {
1061 "version": "1.0.0", 1115 "version": "1.0.0",
1062 "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", 1116 "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz",
...@@ -1091,6 +1145,16 @@ ...@@ -1091,6 +1145,16 @@
1091 "node": ">=8" 1145 "node": ">=8"
1092 } 1146 }
1093 }, 1147 },
1148 + "node_modules/lodash": {
1149 + "version": "4.17.21",
1150 + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz",
1151 + "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg=="
1152 + },
1153 + "node_modules/long": {
1154 + "version": "4.0.0",
1155 + "resolved": "https://registry.npmjs.org/long/-/long-4.0.0.tgz",
1156 + "integrity": "sha512-XsP+KhQif4bjX1kbuSiySJFNAehNxgLb6hPRGJ9QsUr8ajHkuXGdrHmFUTUUXhDwVX2R5bY4JNZEwbUiMhV+MA=="
1157 + },
1094 "node_modules/lowercase-keys": { 1158 "node_modules/lowercase-keys": {
1095 "version": "1.0.1", 1159 "version": "1.0.1",
1096 "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-1.0.1.tgz", 1160 "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-1.0.1.tgz",
...@@ -1207,11 +1271,84 @@ ...@@ -1207,11 +1271,84 @@
1207 "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.6.tgz", 1271 "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.6.tgz",
1208 "integrity": "sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q==" 1272 "integrity": "sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q=="
1209 }, 1273 },
1274 + "node_modules/moment": {
1275 + "version": "2.29.3",
1276 + "resolved": "https://registry.npmjs.org/moment/-/moment-2.29.3.tgz",
1277 + "integrity": "sha512-c6YRvhEo//6T2Jz/vVtYzqBzwvPT95JBQ+smCytzf7c50oMZRsR/a4w88aD34I+/QVSfnoAnSBFPJHItlOMJVw==",
1278 + "engines": {
1279 + "node": "*"
1280 + }
1281 + },
1282 + "node_modules/moment-timezone": {
1283 + "version": "0.5.34",
1284 + "resolved": "https://registry.npmjs.org/moment-timezone/-/moment-timezone-0.5.34.tgz",
1285 + "integrity": "sha512-3zAEHh2hKUs3EXLESx/wsgw6IQdusOT8Bxm3D9UrHPQR7zlMmzwybC8zHEM1tQ4LJwP7fcxrWr8tuBg05fFCbg==",
1286 + "dependencies": {
1287 + "moment": ">= 2.9.0"
1288 + },
1289 + "engines": {
1290 + "node": "*"
1291 + }
1292 + },
1210 "node_modules/ms": { 1293 "node_modules/ms": {
1211 "version": "2.0.0", 1294 "version": "2.0.0",
1212 "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", 1295 "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
1213 "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" 1296 "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g="
1214 }, 1297 },
1298 + "node_modules/mysql2": {
1299 + "version": "2.3.3",
1300 + "resolved": "https://registry.npmjs.org/mysql2/-/mysql2-2.3.3.tgz",
1301 + "integrity": "sha512-wxJUev6LgMSgACDkb/InIFxDprRa6T95+VEoR+xPvtngtccNH2dGjEB/fVZ8yg1gWv1510c9CvXuJHi5zUm0ZA==",
1302 + "dependencies": {
1303 + "denque": "^2.0.1",
1304 + "generate-function": "^2.3.1",
1305 + "iconv-lite": "^0.6.3",
1306 + "long": "^4.0.0",
1307 + "lru-cache": "^6.0.0",
1308 + "named-placeholders": "^1.1.2",
1309 + "seq-queue": "^0.0.5",
1310 + "sqlstring": "^2.3.2"
1311 + },
1312 + "engines": {
1313 + "node": ">= 8.0"
1314 + }
1315 + },
1316 + "node_modules/mysql2/node_modules/iconv-lite": {
1317 + "version": "0.6.3",
1318 + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz",
1319 + "integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==",
1320 + "dependencies": {
1321 + "safer-buffer": ">= 2.1.2 < 3.0.0"
1322 + },
1323 + "engines": {
1324 + "node": ">=0.10.0"
1325 + }
1326 + },
1327 + "node_modules/named-placeholders": {
1328 + "version": "1.1.2",
1329 + "resolved": "https://registry.npmjs.org/named-placeholders/-/named-placeholders-1.1.2.tgz",
1330 + "integrity": "sha512-wiFWqxoLL3PGVReSZpjLVxyJ1bRqe+KKJVbr4hGs1KWfTZTQyezHFBbuKj9hsizHyGV2ne7EMjHdxEGAybD5SA==",
1331 + "dependencies": {
1332 + "lru-cache": "^4.1.3"
1333 + },
1334 + "engines": {
1335 + "node": ">=6.0.0"
1336 + }
1337 + },
1338 + "node_modules/named-placeholders/node_modules/lru-cache": {
1339 + "version": "4.1.5",
1340 + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.5.tgz",
1341 + "integrity": "sha512-sWZlbEP2OsHNkXrMl5GYk/jKk70MBng6UU4YI/qGDYbgf6YbP4EvmqISbXCoJiRKs+1bSpFHVgQxvJ17F2li5g==",
1342 + "dependencies": {
1343 + "pseudomap": "^1.0.2",
1344 + "yallist": "^2.1.2"
1345 + }
1346 + },
1347 + "node_modules/named-placeholders/node_modules/yallist": {
1348 + "version": "2.1.2",
1349 + "resolved": "https://registry.npmjs.org/yallist/-/yallist-2.1.2.tgz",
1350 + "integrity": "sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI="
1351 + },
1215 "node_modules/negotiator": { 1352 "node_modules/negotiator": {
1216 "version": "0.6.3", 1353 "version": "0.6.3",
1217 "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz", 1354 "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz",
...@@ -1373,6 +1510,11 @@ ...@@ -1373,6 +1510,11 @@
1373 "url": "https://github.com/sponsors/Borewit" 1510 "url": "https://github.com/sponsors/Borewit"
1374 } 1511 }
1375 }, 1512 },
1513 + "node_modules/pg-connection-string": {
1514 + "version": "2.5.0",
1515 + "resolved": "https://registry.npmjs.org/pg-connection-string/-/pg-connection-string-2.5.0.tgz",
1516 + "integrity": "sha512-r5o/V/ORTA6TmUnyWZR9nCj1klXCO2CEKNRlVuJptZe85QuhFayC7WeMic7ndayT5IRIR0S0xFxFi2ousartlQ=="
1517 + },
1376 "node_modules/picomatch": { 1518 "node_modules/picomatch": {
1377 "version": "2.3.1", 1519 "version": "2.3.1",
1378 "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", 1520 "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz",
...@@ -1404,6 +1546,11 @@ ...@@ -1404,6 +1546,11 @@
1404 "node": ">= 0.10" 1546 "node": ">= 0.10"
1405 } 1547 }
1406 }, 1548 },
1549 + "node_modules/pseudomap": {
1550 + "version": "1.0.2",
1551 + "resolved": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz",
1552 + "integrity": "sha1-8FKijacOYYkX7wqKw0wa5aaChrM="
1553 + },
1407 "node_modules/pstree.remy": { 1554 "node_modules/pstree.remy": {
1408 "version": "1.1.8", 1555 "version": "1.1.8",
1409 "resolved": "https://registry.npmjs.org/pstree.remy/-/pstree.remy-1.1.8.tgz", 1556 "resolved": "https://registry.npmjs.org/pstree.remy/-/pstree.remy-1.1.8.tgz",
...@@ -1530,6 +1677,11 @@ ...@@ -1530,6 +1677,11 @@
1530 "lowercase-keys": "^1.0.0" 1677 "lowercase-keys": "^1.0.0"
1531 } 1678 }
1532 }, 1679 },
1680 + "node_modules/retry-as-promised": {
1681 + "version": "5.0.0",
1682 + "resolved": "https://registry.npmjs.org/retry-as-promised/-/retry-as-promised-5.0.0.tgz",
1683 + "integrity": "sha512-6S+5LvtTl2ggBumk04hBo/4Uf6fRJUwIgunGZ7CYEBCeufGFW1Pu6ucUf/UskHeWOIsUcLOGLFXPig5tR5V1nA=="
1684 + },
1533 "node_modules/safe-buffer": { 1685 "node_modules/safe-buffer": {
1534 "version": "5.2.1", 1686 "version": "5.2.1",
1535 "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", 1687 "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz",
...@@ -1609,6 +1761,112 @@ ...@@ -1609,6 +1761,112 @@
1609 "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", 1761 "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
1610 "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==" 1762 "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA=="
1611 }, 1763 },
1764 + "node_modules/seq-queue": {
1765 + "version": "0.0.5",
1766 + "resolved": "https://registry.npmjs.org/seq-queue/-/seq-queue-0.0.5.tgz",
1767 + "integrity": "sha1-1WgS4cAXpuTnw+Ojeh2m143TyT4="
1768 + },
1769 + "node_modules/sequelize": {
1770 + "version": "6.20.0",
1771 + "resolved": "https://registry.npmjs.org/sequelize/-/sequelize-6.20.0.tgz",
1772 + "integrity": "sha512-45B+k4eKP0D+x1F08dSYnZjlKGvlxM/FCVTWQ6TLVaGCyRv/TmvTRSZ4bTNB5pMgQOMkJUlztg5zSvMmkzaWCA==",
1773 + "funding": [
1774 + {
1775 + "type": "opencollective",
1776 + "url": "https://opencollective.com/sequelize"
1777 + }
1778 + ],
1779 + "dependencies": {
1780 + "@types/debug": "^4.1.7",
1781 + "@types/validator": "^13.7.1",
1782 + "debug": "^4.3.3",
1783 + "dottie": "^2.0.2",
1784 + "inflection": "^1.13.2",
1785 + "lodash": "^4.17.21",
1786 + "moment": "^2.29.1",
1787 + "moment-timezone": "^0.5.34",
1788 + "pg-connection-string": "^2.5.0",
1789 + "retry-as-promised": "^5.0.0",
1790 + "semver": "^7.3.5",
1791 + "sequelize-pool": "^7.1.0",
1792 + "toposort-class": "^1.0.1",
1793 + "uuid": "^8.3.2",
1794 + "validator": "^13.7.0",
1795 + "wkx": "^0.5.0"
1796 + },
1797 + "engines": {
1798 + "node": ">=10.0.0"
1799 + },
1800 + "peerDependenciesMeta": {
1801 + "ibm_db": {
1802 + "optional": true
1803 + },
1804 + "mariadb": {
1805 + "optional": true
1806 + },
1807 + "mysql2": {
1808 + "optional": true
1809 + },
1810 + "pg": {
1811 + "optional": true
1812 + },
1813 + "pg-hstore": {
1814 + "optional": true
1815 + },
1816 + "snowflake-sdk": {
1817 + "optional": true
1818 + },
1819 + "sqlite3": {
1820 + "optional": true
1821 + },
1822 + "tedious": {
1823 + "optional": true
1824 + }
1825 + }
1826 + },
1827 + "node_modules/sequelize-pool": {
1828 + "version": "7.1.0",
1829 + "resolved": "https://registry.npmjs.org/sequelize-pool/-/sequelize-pool-7.1.0.tgz",
1830 + "integrity": "sha512-G9c0qlIWQSK29pR/5U2JF5dDQeqqHRragoyahj/Nx4KOOQ3CPPfzxnfqFPCSB7x5UgjOgnZ61nSxz+fjDpRlJg==",
1831 + "engines": {
1832 + "node": ">= 10.0.0"
1833 + }
1834 + },
1835 + "node_modules/sequelize/node_modules/debug": {
1836 + "version": "4.3.4",
1837 + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz",
1838 + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==",
1839 + "dependencies": {
1840 + "ms": "2.1.2"
1841 + },
1842 + "engines": {
1843 + "node": ">=6.0"
1844 + },
1845 + "peerDependenciesMeta": {
1846 + "supports-color": {
1847 + "optional": true
1848 + }
1849 + }
1850 + },
1851 + "node_modules/sequelize/node_modules/ms": {
1852 + "version": "2.1.2",
1853 + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
1854 + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w=="
1855 + },
1856 + "node_modules/sequelize/node_modules/semver": {
1857 + "version": "7.3.7",
1858 + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.7.tgz",
1859 + "integrity": "sha512-QlYTucUYOews+WeEujDoEGziz4K6c47V/Bd+LjSSYcA94p+DmINdf7ncaUinThfvZyu13lN9OY1XDxt8C0Tw0g==",
1860 + "dependencies": {
1861 + "lru-cache": "^6.0.0"
1862 + },
1863 + "bin": {
1864 + "semver": "bin/semver.js"
1865 + },
1866 + "engines": {
1867 + "node": ">=10"
1868 + }
1869 + },
1612 "node_modules/serve-static": { 1870 "node_modules/serve-static": {
1613 "version": "1.15.0", 1871 "version": "1.15.0",
1614 "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.15.0.tgz", 1872 "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.15.0.tgz",
...@@ -1646,6 +1904,14 @@ ...@@ -1646,6 +1904,14 @@
1646 "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", 1904 "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz",
1647 "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==" 1905 "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ=="
1648 }, 1906 },
1907 + "node_modules/sqlstring": {
1908 + "version": "2.3.3",
1909 + "resolved": "https://registry.npmjs.org/sqlstring/-/sqlstring-2.3.3.tgz",
1910 + "integrity": "sha512-qC9iz2FlN7DQl3+wjwn3802RTyjCx7sDvfQEXchwa6CWOx07/WVfh91gBmQ9fahw8snwGEWU3xGzOt4tFyHLxg==",
1911 + "engines": {
1912 + "node": ">= 0.6"
1913 + }
1914 + },
1649 "node_modules/statuses": { 1915 "node_modules/statuses": {
1650 "version": "2.0.1", 1916 "version": "2.0.1",
1651 "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz", 1917 "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz",
...@@ -1761,6 +2027,11 @@ ...@@ -1761,6 +2027,11 @@
1761 "resolved": "https://registry.npmjs.org/@tokenizer/token/-/token-0.1.1.tgz", 2027 "resolved": "https://registry.npmjs.org/@tokenizer/token/-/token-0.1.1.tgz",
1762 "integrity": "sha512-XO6INPbZCxdprl+9qa/AAbFFOMzzwqYxpjPgLICrMD6C2FCw6qfJOPcBk6JqqPLSaZ/Qx87qn4rpPmPMwaAK6w==" 2028 "integrity": "sha512-XO6INPbZCxdprl+9qa/AAbFFOMzzwqYxpjPgLICrMD6C2FCw6qfJOPcBk6JqqPLSaZ/Qx87qn4rpPmPMwaAK6w=="
1763 }, 2029 },
2030 + "node_modules/toposort-class": {
2031 + "version": "1.0.1",
2032 + "resolved": "https://registry.npmjs.org/toposort-class/-/toposort-class-1.0.1.tgz",
2033 + "integrity": "sha1-f/0feMi+KMO6Rc1OGj9e4ZO9mYg="
2034 + },
1764 "node_modules/touch": { 2035 "node_modules/touch": {
1765 "version": "3.1.0", 2036 "version": "3.1.0",
1766 "resolved": "https://registry.npmjs.org/touch/-/touch-3.1.0.tgz", 2037 "resolved": "https://registry.npmjs.org/touch/-/touch-3.1.0.tgz",
...@@ -1887,6 +2158,22 @@ ...@@ -1887,6 +2158,22 @@
1887 "node": ">= 0.4.0" 2158 "node": ">= 0.4.0"
1888 } 2159 }
1889 }, 2160 },
2161 + "node_modules/uuid": {
2162 + "version": "8.3.2",
2163 + "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz",
2164 + "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==",
2165 + "bin": {
2166 + "uuid": "dist/bin/uuid"
2167 + }
2168 + },
2169 + "node_modules/validator": {
2170 + "version": "13.7.0",
2171 + "resolved": "https://registry.npmjs.org/validator/-/validator-13.7.0.tgz",
2172 + "integrity": "sha512-nYXQLCBkpJ8X6ltALua9dRrZDHVYxjJ1wgskNt1lH9fzGjs3tgojGSCBjmEPwkWS1y29+DrizMTW19Pr9uB2nw==",
2173 + "engines": {
2174 + "node": ">= 0.10"
2175 + }
2176 + },
1890 "node_modules/vary": { 2177 "node_modules/vary": {
1891 "version": "1.1.2", 2178 "version": "1.1.2",
1892 "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", 2179 "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz",
...@@ -1906,6 +2193,14 @@ ...@@ -1906,6 +2193,14 @@
1906 "node": ">=8" 2193 "node": ">=8"
1907 } 2194 }
1908 }, 2195 },
2196 + "node_modules/wkx": {
2197 + "version": "0.5.0",
2198 + "resolved": "https://registry.npmjs.org/wkx/-/wkx-0.5.0.tgz",
2199 + "integrity": "sha512-Xng/d4Ichh8uN4l0FToV/258EjMGU9MGcA0HV2d9B/ZpZB3lqQm7nkOdZdm5GhKtLLhAE7PiVQwN4eN+2YJJUg==",
2200 + "dependencies": {
2201 + "@types/node": "*"
2202 + }
2203 + },
1909 "node_modules/wrap-ansi": { 2204 "node_modules/wrap-ansi": {
1910 "version": "7.0.0", 2205 "version": "7.0.0",
1911 "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", 2206 "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz",
...@@ -2001,11 +2296,29 @@ ...@@ -2001,11 +2296,29 @@
2001 "@types/node": "*" 2296 "@types/node": "*"
2002 } 2297 }
2003 }, 2298 },
2299 + "@types/debug": {
2300 + "version": "4.1.7",
2301 + "resolved": "https://registry.npmjs.org/@types/debug/-/debug-4.1.7.tgz",
2302 + "integrity": "sha512-9AonUzyTjXXhEOa0DnqpzZi6VHlqKMswga9EXjpXnnqxwLtdvPPtlO8evrI5D9S6asFRCQ6v+wpiUKbw+vKqyg==",
2303 + "requires": {
2304 + "@types/ms": "*"
2305 + }
2306 + },
2307 + "@types/ms": {
2308 + "version": "0.7.31",
2309 + "resolved": "https://registry.npmjs.org/@types/ms/-/ms-0.7.31.tgz",
2310 + "integrity": "sha512-iiUgKzV9AuaEkZqkOLDIvlQiL6ltuZd9tGcW3gwpnX8JbuiuhFlEGmmFXEXkN50Cvq7Os88IY2v0dkDqXYWVgA=="
2311 + },
2004 "@types/node": { 2312 "@types/node": {
2005 "version": "14.18.18", 2313 "version": "14.18.18",
2006 "resolved": "https://registry.npmjs.org/@types/node/-/node-14.18.18.tgz", 2314 "resolved": "https://registry.npmjs.org/@types/node/-/node-14.18.18.tgz",
2007 "integrity": "sha512-B9EoJFjhqcQ9OmQrNorItO+OwEOORNn3S31WuiHvZY/dm9ajkB7AKD/8toessEtHHNL+58jofbq7hMMY9v4yig==" 2315 "integrity": "sha512-B9EoJFjhqcQ9OmQrNorItO+OwEOORNn3S31WuiHvZY/dm9ajkB7AKD/8toessEtHHNL+58jofbq7hMMY9v4yig=="
2008 }, 2316 },
2317 + "@types/validator": {
2318 + "version": "13.7.2",
2319 + "resolved": "https://registry.npmjs.org/@types/validator/-/validator-13.7.2.tgz",
2320 + "integrity": "sha512-KFcchQ3h0OPQgFirBRPZr5F/sVjxZsOrQHedj3zi8AH3Zv/hOLx2OLR4hxR5HcfoU+33n69ZuOfzthKVdMoTiw=="
2321 + },
2009 "abbrev": { 2322 "abbrev": {
2010 "version": "1.1.1", 2323 "version": "1.1.1",
2011 "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz", 2324 "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz",
...@@ -2332,6 +2645,11 @@ ...@@ -2332,6 +2645,11 @@
2332 "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", 2645 "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz",
2333 "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=" 2646 "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk="
2334 }, 2647 },
2648 + "denque": {
2649 + "version": "2.0.1",
2650 + "resolved": "https://registry.npmjs.org/denque/-/denque-2.0.1.tgz",
2651 + "integrity": "sha512-tfiWc6BQLXNLpNiR5iGd0Ocu3P3VpxfzFiqubLgMfhfOw9WyvgJBd46CClNn9k3qfbjvT//0cf7AlYRX/OslMQ=="
2652 + },
2335 "depd": { 2653 "depd": {
2336 "version": "2.0.0", 2654 "version": "2.0.0",
2337 "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz", 2655 "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz",
...@@ -2355,6 +2673,11 @@ ...@@ -2355,6 +2673,11 @@
2355 "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.0.1.tgz", 2673 "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.0.1.tgz",
2356 "integrity": "sha512-1K6hR6wtk2FviQ4kEiSjFiH5rpzEVi8WW0x96aztHVMhEspNpc4DVOUTEHtEva5VThQ8IaBX1Pe4gSzpVVUsKQ==" 2674 "integrity": "sha512-1K6hR6wtk2FviQ4kEiSjFiH5rpzEVi8WW0x96aztHVMhEspNpc4DVOUTEHtEva5VThQ8IaBX1Pe4gSzpVVUsKQ=="
2357 }, 2675 },
2676 + "dottie": {
2677 + "version": "2.0.2",
2678 + "resolved": "https://registry.npmjs.org/dottie/-/dottie-2.0.2.tgz",
2679 + "integrity": "sha512-fmrwR04lsniq/uSr8yikThDTrM7epXHBAAjH9TbeH3rEA8tdCO7mRzB9hdmdGyJCxF8KERo9CITcm3kGuoyMhg=="
2680 + },
2358 "duplexer3": { 2681 "duplexer3": {
2359 "version": "0.1.4", 2682 "version": "0.1.4",
2360 "resolved": "https://registry.npmjs.org/duplexer3/-/duplexer3-0.1.4.tgz", 2683 "resolved": "https://registry.npmjs.org/duplexer3/-/duplexer3-0.1.4.tgz",
...@@ -2505,6 +2828,14 @@ ...@@ -2505,6 +2828,14 @@
2505 "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", 2828 "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz",
2506 "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==" 2829 "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A=="
2507 }, 2830 },
2831 + "generate-function": {
2832 + "version": "2.3.1",
2833 + "resolved": "https://registry.npmjs.org/generate-function/-/generate-function-2.3.1.tgz",
2834 + "integrity": "sha512-eeB5GfMNeevm/GRYq20ShmsaGcmI81kIX2K9XQx5miC8KdHaC6Jm0qQ8ZNeGOi7wYB8OsdxKs+Y2oVuTFuVwKQ==",
2835 + "requires": {
2836 + "is-property": "^1.0.2"
2837 + }
2838 + },
2508 "get-intrinsic": { 2839 "get-intrinsic": {
2509 "version": "1.1.1", 2840 "version": "1.1.1",
2510 "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.1.1.tgz", 2841 "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.1.1.tgz",
...@@ -2630,6 +2961,11 @@ ...@@ -2630,6 +2961,11 @@
2630 "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", 2961 "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz",
2631 "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=" 2962 "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o="
2632 }, 2963 },
2964 + "inflection": {
2965 + "version": "1.13.2",
2966 + "resolved": "https://registry.npmjs.org/inflection/-/inflection-1.13.2.tgz",
2967 + "integrity": "sha512-cmZlljCRTBFouT8UzMzrGcVEvkv6D/wBdcdKG7J1QH5cXjtU75Dm+P27v9EKu/Y43UYyCJd1WC4zLebRrC8NBw=="
2968 + },
2633 "inherits": { 2969 "inherits": {
2634 "version": "2.0.4", 2970 "version": "2.0.4",
2635 "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", 2971 "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz",
...@@ -2708,6 +3044,11 @@ ...@@ -2708,6 +3044,11 @@
2708 "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.3.tgz", 3044 "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.3.tgz",
2709 "integrity": "sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==" 3045 "integrity": "sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ=="
2710 }, 3046 },
3047 + "is-property": {
3048 + "version": "1.0.2",
3049 + "resolved": "https://registry.npmjs.org/is-property/-/is-property-1.0.2.tgz",
3050 + "integrity": "sha1-V/4cTkhHTt1lsJkR8msc1Ald2oQ="
3051 + },
2711 "is-typedarray": { 3052 "is-typedarray": {
2712 "version": "1.0.0", 3053 "version": "1.0.0",
2713 "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", 3054 "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz",
...@@ -2739,6 +3080,16 @@ ...@@ -2739,6 +3080,16 @@
2739 "package-json": "^6.3.0" 3080 "package-json": "^6.3.0"
2740 } 3081 }
2741 }, 3082 },
3083 + "lodash": {
3084 + "version": "4.17.21",
3085 + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz",
3086 + "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg=="
3087 + },
3088 + "long": {
3089 + "version": "4.0.0",
3090 + "resolved": "https://registry.npmjs.org/long/-/long-4.0.0.tgz",
3091 + "integrity": "sha512-XsP+KhQif4bjX1kbuSiySJFNAehNxgLb6hPRGJ9QsUr8ajHkuXGdrHmFUTUUXhDwVX2R5bY4JNZEwbUiMhV+MA=="
3092 + },
2742 "lowercase-keys": { 3093 "lowercase-keys": {
2743 "version": "1.0.1", 3094 "version": "1.0.1",
2744 "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-1.0.1.tgz", 3095 "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-1.0.1.tgz",
...@@ -2818,11 +3169,73 @@ ...@@ -2818,11 +3169,73 @@
2818 "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.6.tgz", 3169 "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.6.tgz",
2819 "integrity": "sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q==" 3170 "integrity": "sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q=="
2820 }, 3171 },
3172 + "moment": {
3173 + "version": "2.29.3",
3174 + "resolved": "https://registry.npmjs.org/moment/-/moment-2.29.3.tgz",
3175 + "integrity": "sha512-c6YRvhEo//6T2Jz/vVtYzqBzwvPT95JBQ+smCytzf7c50oMZRsR/a4w88aD34I+/QVSfnoAnSBFPJHItlOMJVw=="
3176 + },
3177 + "moment-timezone": {
3178 + "version": "0.5.34",
3179 + "resolved": "https://registry.npmjs.org/moment-timezone/-/moment-timezone-0.5.34.tgz",
3180 + "integrity": "sha512-3zAEHh2hKUs3EXLESx/wsgw6IQdusOT8Bxm3D9UrHPQR7zlMmzwybC8zHEM1tQ4LJwP7fcxrWr8tuBg05fFCbg==",
3181 + "requires": {
3182 + "moment": ">= 2.9.0"
3183 + }
3184 + },
2821 "ms": { 3185 "ms": {
2822 "version": "2.0.0", 3186 "version": "2.0.0",
2823 "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", 3187 "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
2824 "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" 3188 "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g="
2825 }, 3189 },
3190 + "mysql2": {
3191 + "version": "2.3.3",
3192 + "resolved": "https://registry.npmjs.org/mysql2/-/mysql2-2.3.3.tgz",
3193 + "integrity": "sha512-wxJUev6LgMSgACDkb/InIFxDprRa6T95+VEoR+xPvtngtccNH2dGjEB/fVZ8yg1gWv1510c9CvXuJHi5zUm0ZA==",
3194 + "requires": {
3195 + "denque": "^2.0.1",
3196 + "generate-function": "^2.3.1",
3197 + "iconv-lite": "^0.6.3",
3198 + "long": "^4.0.0",
3199 + "lru-cache": "^6.0.0",
3200 + "named-placeholders": "^1.1.2",
3201 + "seq-queue": "^0.0.5",
3202 + "sqlstring": "^2.3.2"
3203 + },
3204 + "dependencies": {
3205 + "iconv-lite": {
3206 + "version": "0.6.3",
3207 + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz",
3208 + "integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==",
3209 + "requires": {
3210 + "safer-buffer": ">= 2.1.2 < 3.0.0"
3211 + }
3212 + }
3213 + }
3214 + },
3215 + "named-placeholders": {
3216 + "version": "1.1.2",
3217 + "resolved": "https://registry.npmjs.org/named-placeholders/-/named-placeholders-1.1.2.tgz",
3218 + "integrity": "sha512-wiFWqxoLL3PGVReSZpjLVxyJ1bRqe+KKJVbr4hGs1KWfTZTQyezHFBbuKj9hsizHyGV2ne7EMjHdxEGAybD5SA==",
3219 + "requires": {
3220 + "lru-cache": "^4.1.3"
3221 + },
3222 + "dependencies": {
3223 + "lru-cache": {
3224 + "version": "4.1.5",
3225 + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.5.tgz",
3226 + "integrity": "sha512-sWZlbEP2OsHNkXrMl5GYk/jKk70MBng6UU4YI/qGDYbgf6YbP4EvmqISbXCoJiRKs+1bSpFHVgQxvJ17F2li5g==",
3227 + "requires": {
3228 + "pseudomap": "^1.0.2",
3229 + "yallist": "^2.1.2"
3230 + }
3231 + },
3232 + "yallist": {
3233 + "version": "2.1.2",
3234 + "resolved": "https://registry.npmjs.org/yallist/-/yallist-2.1.2.tgz",
3235 + "integrity": "sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI="
3236 + }
3237 + }
3238 + },
2826 "negotiator": { 3239 "negotiator": {
2827 "version": "0.6.3", 3240 "version": "0.6.3",
2828 "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz", 3241 "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz",
...@@ -2937,6 +3350,11 @@ ...@@ -2937,6 +3350,11 @@
2937 "resolved": "https://registry.npmjs.org/peek-readable/-/peek-readable-4.1.0.tgz", 3350 "resolved": "https://registry.npmjs.org/peek-readable/-/peek-readable-4.1.0.tgz",
2938 "integrity": "sha512-ZI3LnwUv5nOGbQzD9c2iDG6toheuXSZP5esSHBjopsXH4dg19soufvpUGA3uohi5anFtGb2lhAVdHzH6R/Evvg==" 3351 "integrity": "sha512-ZI3LnwUv5nOGbQzD9c2iDG6toheuXSZP5esSHBjopsXH4dg19soufvpUGA3uohi5anFtGb2lhAVdHzH6R/Evvg=="
2939 }, 3352 },
3353 + "pg-connection-string": {
3354 + "version": "2.5.0",
3355 + "resolved": "https://registry.npmjs.org/pg-connection-string/-/pg-connection-string-2.5.0.tgz",
3356 + "integrity": "sha512-r5o/V/ORTA6TmUnyWZR9nCj1klXCO2CEKNRlVuJptZe85QuhFayC7WeMic7ndayT5IRIR0S0xFxFi2ousartlQ=="
3357 + },
2940 "picomatch": { 3358 "picomatch": {
2941 "version": "2.3.1", 3359 "version": "2.3.1",
2942 "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", 3360 "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz",
...@@ -2956,6 +3374,11 @@ ...@@ -2956,6 +3374,11 @@
2956 "ipaddr.js": "1.9.1" 3374 "ipaddr.js": "1.9.1"
2957 } 3375 }
2958 }, 3376 },
3377 + "pseudomap": {
3378 + "version": "1.0.2",
3379 + "resolved": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz",
3380 + "integrity": "sha1-8FKijacOYYkX7wqKw0wa5aaChrM="
3381 + },
2959 "pstree.remy": { 3382 "pstree.remy": {
2960 "version": "1.1.8", 3383 "version": "1.1.8",
2961 "resolved": "https://registry.npmjs.org/pstree.remy/-/pstree.remy-1.1.8.tgz", 3384 "resolved": "https://registry.npmjs.org/pstree.remy/-/pstree.remy-1.1.8.tgz",
...@@ -3057,6 +3480,11 @@ ...@@ -3057,6 +3480,11 @@
3057 "lowercase-keys": "^1.0.0" 3480 "lowercase-keys": "^1.0.0"
3058 } 3481 }
3059 }, 3482 },
3483 + "retry-as-promised": {
3484 + "version": "5.0.0",
3485 + "resolved": "https://registry.npmjs.org/retry-as-promised/-/retry-as-promised-5.0.0.tgz",
3486 + "integrity": "sha512-6S+5LvtTl2ggBumk04hBo/4Uf6fRJUwIgunGZ7CYEBCeufGFW1Pu6ucUf/UskHeWOIsUcLOGLFXPig5tR5V1nA=="
3487 + },
3060 "safe-buffer": { 3488 "safe-buffer": {
3061 "version": "5.2.1", 3489 "version": "5.2.1",
3062 "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", 3490 "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz",
...@@ -3114,6 +3542,62 @@ ...@@ -3114,6 +3542,62 @@
3114 } 3542 }
3115 } 3543 }
3116 }, 3544 },
3545 + "seq-queue": {
3546 + "version": "0.0.5",
3547 + "resolved": "https://registry.npmjs.org/seq-queue/-/seq-queue-0.0.5.tgz",
3548 + "integrity": "sha1-1WgS4cAXpuTnw+Ojeh2m143TyT4="
3549 + },
3550 + "sequelize": {
3551 + "version": "6.20.0",
3552 + "resolved": "https://registry.npmjs.org/sequelize/-/sequelize-6.20.0.tgz",
3553 + "integrity": "sha512-45B+k4eKP0D+x1F08dSYnZjlKGvlxM/FCVTWQ6TLVaGCyRv/TmvTRSZ4bTNB5pMgQOMkJUlztg5zSvMmkzaWCA==",
3554 + "requires": {
3555 + "@types/debug": "^4.1.7",
3556 + "@types/validator": "^13.7.1",
3557 + "debug": "^4.3.3",
3558 + "dottie": "^2.0.2",
3559 + "inflection": "^1.13.2",
3560 + "lodash": "^4.17.21",
3561 + "moment": "^2.29.1",
3562 + "moment-timezone": "^0.5.34",
3563 + "pg-connection-string": "^2.5.0",
3564 + "retry-as-promised": "^5.0.0",
3565 + "semver": "^7.3.5",
3566 + "sequelize-pool": "^7.1.0",
3567 + "toposort-class": "^1.0.1",
3568 + "uuid": "^8.3.2",
3569 + "validator": "^13.7.0",
3570 + "wkx": "^0.5.0"
3571 + },
3572 + "dependencies": {
3573 + "debug": {
3574 + "version": "4.3.4",
3575 + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz",
3576 + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==",
3577 + "requires": {
3578 + "ms": "2.1.2"
3579 + }
3580 + },
3581 + "ms": {
3582 + "version": "2.1.2",
3583 + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
3584 + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w=="
3585 + },
3586 + "semver": {
3587 + "version": "7.3.7",
3588 + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.7.tgz",
3589 + "integrity": "sha512-QlYTucUYOews+WeEujDoEGziz4K6c47V/Bd+LjSSYcA94p+DmINdf7ncaUinThfvZyu13lN9OY1XDxt8C0Tw0g==",
3590 + "requires": {
3591 + "lru-cache": "^6.0.0"
3592 + }
3593 + }
3594 + }
3595 + },
3596 + "sequelize-pool": {
3597 + "version": "7.1.0",
3598 + "resolved": "https://registry.npmjs.org/sequelize-pool/-/sequelize-pool-7.1.0.tgz",
3599 + "integrity": "sha512-G9c0qlIWQSK29pR/5U2JF5dDQeqqHRragoyahj/Nx4KOOQ3CPPfzxnfqFPCSB7x5UgjOgnZ61nSxz+fjDpRlJg=="
3600 + },
3117 "serve-static": { 3601 "serve-static": {
3118 "version": "1.15.0", 3602 "version": "1.15.0",
3119 "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.15.0.tgz", 3603 "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.15.0.tgz",
...@@ -3145,6 +3629,11 @@ ...@@ -3145,6 +3629,11 @@
3145 "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", 3629 "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz",
3146 "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==" 3630 "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ=="
3147 }, 3631 },
3632 + "sqlstring": {
3633 + "version": "2.3.3",
3634 + "resolved": "https://registry.npmjs.org/sqlstring/-/sqlstring-2.3.3.tgz",
3635 + "integrity": "sha512-qC9iz2FlN7DQl3+wjwn3802RTyjCx7sDvfQEXchwa6CWOx07/WVfh91gBmQ9fahw8snwGEWU3xGzOt4tFyHLxg=="
3636 + },
3148 "statuses": { 3637 "statuses": {
3149 "version": "2.0.1", 3638 "version": "2.0.1",
3150 "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz", 3639 "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz",
...@@ -3224,6 +3713,11 @@ ...@@ -3224,6 +3713,11 @@
3224 } 3713 }
3225 } 3714 }
3226 }, 3715 },
3716 + "toposort-class": {
3717 + "version": "1.0.1",
3718 + "resolved": "https://registry.npmjs.org/toposort-class/-/toposort-class-1.0.1.tgz",
3719 + "integrity": "sha1-f/0feMi+KMO6Rc1OGj9e4ZO9mYg="
3720 + },
3227 "touch": { 3721 "touch": {
3228 "version": "3.1.0", 3722 "version": "3.1.0",
3229 "resolved": "https://registry.npmjs.org/touch/-/touch-3.1.0.tgz", 3723 "resolved": "https://registry.npmjs.org/touch/-/touch-3.1.0.tgz",
...@@ -3316,6 +3810,16 @@ ...@@ -3316,6 +3810,16 @@
3316 "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz", 3810 "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz",
3317 "integrity": "sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM=" 3811 "integrity": "sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM="
3318 }, 3812 },
3813 + "uuid": {
3814 + "version": "8.3.2",
3815 + "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz",
3816 + "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg=="
3817 + },
3818 + "validator": {
3819 + "version": "13.7.0",
3820 + "resolved": "https://registry.npmjs.org/validator/-/validator-13.7.0.tgz",
3821 + "integrity": "sha512-nYXQLCBkpJ8X6ltALua9dRrZDHVYxjJ1wgskNt1lH9fzGjs3tgojGSCBjmEPwkWS1y29+DrizMTW19Pr9uB2nw=="
3822 + },
3319 "vary": { 3823 "vary": {
3320 "version": "1.1.2", 3824 "version": "1.1.2",
3321 "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", 3825 "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz",
...@@ -3329,6 +3833,14 @@ ...@@ -3329,6 +3833,14 @@
3329 "string-width": "^4.0.0" 3833 "string-width": "^4.0.0"
3330 } 3834 }
3331 }, 3835 },
3836 + "wkx": {
3837 + "version": "0.5.0",
3838 + "resolved": "https://registry.npmjs.org/wkx/-/wkx-0.5.0.tgz",
3839 + "integrity": "sha512-Xng/d4Ichh8uN4l0FToV/258EjMGU9MGcA0HV2d9B/ZpZB3lqQm7nkOdZdm5GhKtLLhAE7PiVQwN4eN+2YJJUg==",
3840 + "requires": {
3841 + "@types/node": "*"
3842 + }
3843 + },
3332 "wrap-ansi": { 3844 "wrap-ansi": {
3333 "version": "7.0.0", 3845 "version": "7.0.0",
3334 "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", 3846 "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz",
......
...@@ -18,6 +18,8 @@ ...@@ -18,6 +18,8 @@
18 "@line/bot-sdk": "^7.5.0", 18 "@line/bot-sdk": "^7.5.0",
19 "dotenv": "^16.0.1", 19 "dotenv": "^16.0.1",
20 "express": "^4.18.1", 20 "express": "^4.18.1",
21 - "nodemon": "^2.0.16" 21 + "mysql2": "^2.3.3",
22 + "nodemon": "^2.0.16",
23 + "sequelize": "^6.20.0"
22 } 24 }
23 } 25 }
......