Spaces:
Running
Running
GitHub Actions
commited on
Commit
·
df72131
0
Parent(s):
Initial commit
Browse filesThis view is limited to 50 files because it contains too many changes.
See raw diff
- .gitignore +7 -0
- Admin/Public/divideQs.html +21 -0
- Admin/Public/question.html +46 -0
- Admin/Public/room.html +21 -0
- Admin/Public/round.html +27 -0
- Admin/Routers/QsEnterRouter.js +39 -0
- Admin/Routers/RoomEnterRouter.js +75 -0
- Admin/Routers/RoundEnterRouter.js +44 -0
- Dockerfile +30 -0
- README.md +10 -0
- app.js +139 -0
- config/DatabaseConfig.js +17 -0
- config/MailConfig.js +0 -0
- config/WebSocket.js +13 -0
- controllers/ModelController.js +229 -0
- controllers/QuestionController.js +170 -0
- controllers/RoundFourController.js +262 -0
- controllers/RoundInitialController.js +232 -0
- controllers/RoundOneController.js +380 -0
- controllers/RoundThreeController.js +194 -0
- controllers/RoundTwoController.js +263 -0
- controllers/UserLoginController.js +80 -0
- controllers/UserRegistrationFunctions.js +312 -0
- controllers/VerificationController.js +209 -0
- controllers/logs.txt +0 -0
- helpers/LeaderBoardPreFetch.js +191 -0
- helpers/LeaderBoardSetup.js +35 -0
- helpers/SessionIdhelper.js +39 -0
- logs.txt +0 -0
- middlewares/ProtectRouter.js +36 -0
- middlewares/UserLoginMiddleware.js +33 -0
- middlewares/UserValidator.js +60 -0
- models/AuthenticationModel.js +30 -0
- models/Certificates.js +38 -0
- models/CollaborativeLeaderboardModel.js +66 -0
- models/CouponModel.js +15 -0
- models/LeaderboardModel.js +48 -0
- models/PreviousRoomModel.js +21 -0
- models/QuestionsModel.js +48 -0
- models/RoomModel.js +18 -0
- models/RoundsModel.js +35 -0
- models/TeamModel.js +40 -0
- models/UserModel.js +80 -0
- models/UserQuestionModel.js +55 -0
- package-lock.json +2404 -0
- package.json +31 -0
- routers/ModelRouter.js +61 -0
- routers/QuestionRouter.js +38 -0
- routers/RoundInitialRouter.js +29 -0
- routers/RoundsRouter.js +37 -0
.gitignore
ADDED
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/node_modules
|
2 |
+
node_modules
|
3 |
+
config.env
|
4 |
+
/config.env
|
5 |
+
/logs
|
6 |
+
/logs/*
|
7 |
+
config.env
|
Admin/Public/divideQs.html
ADDED
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<!DOCTYPE html>
|
2 |
+
<html>
|
3 |
+
|
4 |
+
<head>
|
5 |
+
<title>Round Form</title>
|
6 |
+
</head>
|
7 |
+
|
8 |
+
<body>
|
9 |
+
<h1>Room Form</h1>
|
10 |
+
<form action="/room/divide" method="POST">
|
11 |
+
<label for="Round">Divide questions for which Round:</label>
|
12 |
+
<input type="number" id="Round" name="Round" required><br><br>
|
13 |
+
|
14 |
+
<label for="Questions">How many Questions in each room of above entered room:</label>
|
15 |
+
<input type="number" id="Questions" name="Questions" required><br><br>
|
16 |
+
|
17 |
+
<input type="submit" value="Submit">
|
18 |
+
</form>
|
19 |
+
</body>
|
20 |
+
|
21 |
+
</html>
|
Admin/Public/question.html
ADDED
@@ -0,0 +1,46 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<!DOCTYPE html>
|
2 |
+
<html lang="en">
|
3 |
+
|
4 |
+
<head>
|
5 |
+
<title>Document</title>
|
6 |
+
</head>
|
7 |
+
|
8 |
+
<body>
|
9 |
+
|
10 |
+
|
11 |
+
<!-- Login container -->
|
12 |
+
<div class="container">
|
13 |
+
<form class="myform" action="/qsns/enter" method="POST">
|
14 |
+
<h1>Enter</h1>
|
15 |
+
<label for="QusetionNumber">QuestionNumber:</label>
|
16 |
+
<input type="number" name="QuestionNumber" id="QsNumber">
|
17 |
+
<br>
|
18 |
+
<label for="Question">Question:</label>
|
19 |
+
<input type="text" name="Question" id="Question">
|
20 |
+
<br>
|
21 |
+
<label for="Description">Description:</label>
|
22 |
+
<input type="text" name="Description" id="Description">
|
23 |
+
<br>
|
24 |
+
<label for="Answer">Answer:</label>
|
25 |
+
<input type="text" name="Answer" id="Answer">
|
26 |
+
<br>
|
27 |
+
<label for="Hint">Hint:</label>
|
28 |
+
<input type="text" name="Hint" id="Hint">
|
29 |
+
<br>
|
30 |
+
<label for="Round">For which Round:</label>
|
31 |
+
<input type="number" name="Round" id="Round">
|
32 |
+
<br>
|
33 |
+
<label for="Points">Points:</label>
|
34 |
+
<input type="number" name="Points" id="Points">
|
35 |
+
<br>
|
36 |
+
<button>Enter</button>
|
37 |
+
<br>
|
38 |
+
</form>
|
39 |
+
</div>
|
40 |
+
|
41 |
+
|
42 |
+
|
43 |
+
|
44 |
+
</body>
|
45 |
+
|
46 |
+
</html>
|
Admin/Public/room.html
ADDED
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<!DOCTYPE html>
|
2 |
+
<html>
|
3 |
+
|
4 |
+
<head>
|
5 |
+
<title>Round Form</title>
|
6 |
+
</head>
|
7 |
+
|
8 |
+
<body>
|
9 |
+
<h1>Room Form</h1>
|
10 |
+
<form action="/room/enter" method="POST">
|
11 |
+
<label for="MaxTeams">MaxTeams:</label>
|
12 |
+
<input type="number" id="MaxTeams" name="MaxTeams" required><br><br>
|
13 |
+
|
14 |
+
<label for="Round">Round:</label>
|
15 |
+
<input type="number" id="Round" name="Round" required><br><br>
|
16 |
+
|
17 |
+
<input type="submit" value="Submit">
|
18 |
+
</form>
|
19 |
+
</body>
|
20 |
+
|
21 |
+
</html>
|
Admin/Public/round.html
ADDED
@@ -0,0 +1,27 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<!DOCTYPE html>
|
2 |
+
<html>
|
3 |
+
|
4 |
+
<head>
|
5 |
+
<title>Round Form</title>
|
6 |
+
</head>
|
7 |
+
|
8 |
+
<body>
|
9 |
+
<h1>Round Form</h1>
|
10 |
+
<form action="/rounds/enter" method="POST">
|
11 |
+
<label for="round">Round:</label>
|
12 |
+
<input type="number" id="round" name="round" required><br><br>
|
13 |
+
|
14 |
+
<label for="questions">Questions:</label>
|
15 |
+
<input type="number" id="questions" name="questions" required><br><br>
|
16 |
+
|
17 |
+
<label for="startTime">Start Time:</label>
|
18 |
+
<input type="datetime-local" id="startTime" name="startTime" required><br><br>
|
19 |
+
|
20 |
+
<label for="endTime">End Time:</label>
|
21 |
+
<input type="datetime-local" id="endTime" name="endTime" required><br><br>
|
22 |
+
|
23 |
+
<input type="submit" value="Submit">
|
24 |
+
</form>
|
25 |
+
</body>
|
26 |
+
|
27 |
+
</html>
|
Admin/Routers/QsEnterRouter.js
ADDED
@@ -0,0 +1,39 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
const express = require('express');
|
2 |
+
const crypto = require('crypto');
|
3 |
+
const path = require('path');
|
4 |
+
const Question = require('../../models/QuestionsModel');
|
5 |
+
const QsEnterRouter = express.Router();
|
6 |
+
|
7 |
+
|
8 |
+
|
9 |
+
//JOIN or CREATE team button page
|
10 |
+
QsEnterRouter
|
11 |
+
.route('/enter')
|
12 |
+
// .get((req,res)=>{res.sendFile(path.join(__dirname,'../Public'),'question.html')})
|
13 |
+
.get((req,res)=>{res.sendFile(path.join(__dirname,'../Public',"question.html"))})
|
14 |
+
.post(async(req,res)=>{
|
15 |
+
try {
|
16 |
+
let data=req.body;
|
17 |
+
|
18 |
+
|
19 |
+
|
20 |
+
let question=await Question.create(data)
|
21 |
+
|
22 |
+
res.json({
|
23 |
+
question:question
|
24 |
+
});
|
25 |
+
} catch (error) {
|
26 |
+
res.status(500).json({
|
27 |
+
message:error.message
|
28 |
+
})
|
29 |
+
}
|
30 |
+
})
|
31 |
+
|
32 |
+
|
33 |
+
|
34 |
+
|
35 |
+
|
36 |
+
module.exports = QsEnterRouter;
|
37 |
+
|
38 |
+
|
39 |
+
|
Admin/Routers/RoomEnterRouter.js
ADDED
@@ -0,0 +1,75 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
const express = require('express');
|
2 |
+
const crypto = require('crypto');
|
3 |
+
const path = require('path');
|
4 |
+
const Question = require('../../models/QuestionsModel');
|
5 |
+
const Room = require('../../models/RoomModel');
|
6 |
+
const RoomRouter = express.Router();
|
7 |
+
|
8 |
+
|
9 |
+
|
10 |
+
//JOIN or CREATE team button page
|
11 |
+
RoomRouter
|
12 |
+
.route('/enter')
|
13 |
+
.get((req,res)=>{res.sendFile(path.join(__dirname,'../Public',"room.html"))})
|
14 |
+
.post(async (req,res)=>{
|
15 |
+
try {
|
16 |
+
let data=req.body;
|
17 |
+
let room=await Room.create(data)
|
18 |
+
|
19 |
+
res.json({
|
20 |
+
room:room
|
21 |
+
});
|
22 |
+
} catch (error) {
|
23 |
+
res.status(500).json({
|
24 |
+
message:error.message
|
25 |
+
})
|
26 |
+
}
|
27 |
+
})
|
28 |
+
|
29 |
+
|
30 |
+
|
31 |
+
|
32 |
+
RoomRouter
|
33 |
+
.route('/divide')
|
34 |
+
.get((req,res)=>{res.sendFile(path.join(__dirname,'../Public',"divideQs.html"))})
|
35 |
+
.post(async(req,res)=>{
|
36 |
+
try {
|
37 |
+
let round=req.body.Round;//current round
|
38 |
+
let qsns=req.body.Questions; //maxm questions in each room
|
39 |
+
|
40 |
+
//Round1 rooms
|
41 |
+
const rooms=await Room.find({Round:round})
|
42 |
+
|
43 |
+
for(let i in rooms){
|
44 |
+
|
45 |
+
//for first round lets say limit = 8 ( 5 + 3 extra)
|
46 |
+
const questions=await Question.find({Round:round,assigned:false}).limit(qsns)
|
47 |
+
for(let j in questions){
|
48 |
+
questions[j].assigned=true;
|
49 |
+
await questions[j].save();
|
50 |
+
rooms[i].Questions.push(questions[j]._id)
|
51 |
+
}
|
52 |
+
|
53 |
+
await rooms[i].save();
|
54 |
+
}
|
55 |
+
res.send("done")
|
56 |
+
}
|
57 |
+
catch (error) {
|
58 |
+
res.status(500).json({
|
59 |
+
message:error.message,
|
60 |
+
status:false
|
61 |
+
})
|
62 |
+
}
|
63 |
+
|
64 |
+
}
|
65 |
+
)
|
66 |
+
|
67 |
+
|
68 |
+
|
69 |
+
|
70 |
+
|
71 |
+
|
72 |
+
module.exports = RoomRouter;
|
73 |
+
|
74 |
+
|
75 |
+
|
Admin/Routers/RoundEnterRouter.js
ADDED
@@ -0,0 +1,44 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
const express = require('express');
|
2 |
+
const crypto = require('crypto');
|
3 |
+
const path = require('path');
|
4 |
+
const Round = require('../../models/RoundsModel');
|
5 |
+
const QsEnterRouter = express.Router();
|
6 |
+
|
7 |
+
|
8 |
+
|
9 |
+
//JOIN or CREATE team button page
|
10 |
+
QsEnterRouter
|
11 |
+
.route('/enter')
|
12 |
+
.get((req, res) => { res.sendFile(path.join(__dirname, '../Public', "round.html")) })
|
13 |
+
.post(async (req, res) => {
|
14 |
+
try {
|
15 |
+
let data = req.body;
|
16 |
+
const startTimeIST = new Date(req.body.startTime);
|
17 |
+
const endTimeIST = new Date(req.body.endTime);
|
18 |
+
const startTimeGMT = new Date(startTimeIST.getTime());
|
19 |
+
const endTimeGMT = new Date(endTimeIST.getTime());
|
20 |
+
let question = new Round({
|
21 |
+
EndTime: endTimeGMT,
|
22 |
+
StartTime: startTimeGMT,
|
23 |
+
Questions: data.questions,
|
24 |
+
Round: data.round,
|
25 |
+
});
|
26 |
+
await question.save();
|
27 |
+
res.json({
|
28 |
+
question: question
|
29 |
+
});
|
30 |
+
} catch (error) {
|
31 |
+
res.status(500).json({
|
32 |
+
message: error.message
|
33 |
+
})
|
34 |
+
}
|
35 |
+
})
|
36 |
+
|
37 |
+
|
38 |
+
|
39 |
+
|
40 |
+
|
41 |
+
module.exports = QsEnterRouter;
|
42 |
+
|
43 |
+
|
44 |
+
|
Dockerfile
ADDED
@@ -0,0 +1,30 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
FROM node:18-slim
|
2 |
+
|
3 |
+
|
4 |
+
# Switch to the node user
|
5 |
+
USER node
|
6 |
+
|
7 |
+
# Set environment variables for the user
|
8 |
+
ENV HOME=/home/node \
|
9 |
+
PATH=/home/node/.local/bin:$PATH
|
10 |
+
|
11 |
+
# Set the working directory
|
12 |
+
WORKDIR $HOME/app
|
13 |
+
|
14 |
+
# Copy the package.json and package-lock.json files to the working directory
|
15 |
+
COPY --chown=node:node package*.json ./
|
16 |
+
|
17 |
+
# Install Node.js dependencies
|
18 |
+
RUN npm install
|
19 |
+
|
20 |
+
# Copy the application code to the working directory
|
21 |
+
COPY --chown=node:node . .
|
22 |
+
|
23 |
+
# Ensure the ownership of the directory to the node user
|
24 |
+
RUN chown -R node:node .
|
25 |
+
|
26 |
+
# Expose the port the app runs on
|
27 |
+
EXPOSE 7860
|
28 |
+
|
29 |
+
# Command to run the Node.js server
|
30 |
+
CMD ["node", "app.js"]
|
README.md
ADDED
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
title: RAPTUS
|
3 |
+
emoji: 📚
|
4 |
+
colorFrom: green
|
5 |
+
colorTo: gray
|
6 |
+
sdk: docker
|
7 |
+
pinned: false
|
8 |
+
---
|
9 |
+
|
10 |
+
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|
app.js
ADDED
@@ -0,0 +1,139 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
const express = require("express");
|
2 |
+
const { WebSocketServer } = require("ws");
|
3 |
+
const cookieParser = require("cookie-parser");
|
4 |
+
const db = require("./config/DatabaseConfig.js");
|
5 |
+
const app = express();
|
6 |
+
const path = require("path");
|
7 |
+
const http = require("http");
|
8 |
+
var https = require("https");
|
9 |
+
const socketIO = require("socket.io");
|
10 |
+
const server = http.createServer(app);
|
11 |
+
const io = socketIO(server);
|
12 |
+
const { stat } = require("fs");
|
13 |
+
const cors = require("cors");
|
14 |
+
const fs = require("fs");
|
15 |
+
const util = require("util");
|
16 |
+
const WebSocket = require("ws");
|
17 |
+
const fetch_user = require("./helpers/SessionIdhelper.js");
|
18 |
+
const { userOnline } = require("./sockets/TeamConnectionStatus.js");
|
19 |
+
const notification = require("./sockets/Notification.js");
|
20 |
+
const round = require("./sockets/RoundStartEnd.js");
|
21 |
+
const {
|
22 |
+
scheduleRound1Start,
|
23 |
+
scheduleRound1End,
|
24 |
+
} = require("./timers/RoundOneTimer.js");
|
25 |
+
const {
|
26 |
+
scheduleRound2Start,
|
27 |
+
scheduleRound2End,
|
28 |
+
} = require("./timers/RoundTwoTimer.js");
|
29 |
+
const {
|
30 |
+
scheduleRound3Start,
|
31 |
+
scheduleRound3End,
|
32 |
+
} = require("./timers/RoundThreeTimer.js");
|
33 |
+
const {
|
34 |
+
scheduleRound4Start,
|
35 |
+
scheduleRound4End,
|
36 |
+
} = require("./timers/RoundFourTimer.js");
|
37 |
+
// const logFile = fs.createWriteStream(path.join(__dirname, '/logs/logs.txt'), { flags: 'a' });
|
38 |
+
// const originalConsoleLog = console.log;
|
39 |
+
// console.log = function (...args) {
|
40 |
+
// const timestamp = new Date().toISOString();
|
41 |
+
// const message = args.map(arg => util.format(arg)).join(' ');
|
42 |
+
// const logMessage = `${timestamp} - ${message}`;
|
43 |
+
// logFile.write(logMessage + '\n');
|
44 |
+
// process.stdout.write(logMessage + '\n');
|
45 |
+
// originalConsoleLog.apply(console, args);
|
46 |
+
// };
|
47 |
+
|
48 |
+
const corsOptions = {
|
49 |
+
origin: [
|
50 |
+
"http://localhost:3000",
|
51 |
+
"http://127.0.0.1:3000",
|
52 |
+
"http://192.168.1.6:3000",
|
53 |
+
|
54 |
+
// your origins here
|
55 |
+
],
|
56 |
+
credentials: true,
|
57 |
+
exposedHeaders: ["set-cookie"],
|
58 |
+
};
|
59 |
+
app.use(cookieParser());
|
60 |
+
app.use(cors(corsOptions));
|
61 |
+
app.use(express.urlencoded({ extended: true }));
|
62 |
+
app.use(express.json());
|
63 |
+
app.use(express.static(path.join(__dirname, "/logs")));
|
64 |
+
app.get("/", (req, res) => {
|
65 |
+
res.send("Server is Up and Running");
|
66 |
+
|
67 |
+
console.log("Somebody accessed the server broo");
|
68 |
+
});
|
69 |
+
app.use(express.static(path.join(__dirname, "/static")));
|
70 |
+
app.set("socketio", io);
|
71 |
+
io.sockets.setMaxListeners(500);
|
72 |
+
start_routes();
|
73 |
+
admin_routes();
|
74 |
+
start_timers();
|
75 |
+
server.listen(process.env.PORT, "0.0.0.0", () => {
|
76 |
+
console.log("Server running");
|
77 |
+
const currentDate = new Date();
|
78 |
+
console.log(currentDate);
|
79 |
+
});
|
80 |
+
|
81 |
+
function start_routes() {
|
82 |
+
app.use("/register", require("./routers/UserRegisterRouter.js"));
|
83 |
+
app.use("/login", require("./routers/UserLoginRouter.js"));
|
84 |
+
app.use("/question", require("./routers/QuestionRouter.js"));
|
85 |
+
app.use("/round", require("./routers/RoundsRouter.js"));
|
86 |
+
app.use("/model", require("./routers/ModelRouter.js"));
|
87 |
+
app.use("/verify", require("./routers/VerifyRouter.js"));
|
88 |
+
}
|
89 |
+
function admin_routes() {
|
90 |
+
app.use("/qsns", require("./Admin/Routers/QsEnterRouter.js"));
|
91 |
+
app.use("/rounds", require("./Admin/Routers/RoundEnterRouter.js"));
|
92 |
+
app.use("/room", require("./Admin/Routers/RoomEnterRouter.js"));
|
93 |
+
}
|
94 |
+
async function start_timers() {
|
95 |
+
const {
|
96 |
+
scheduleCollaborativeRound,
|
97 |
+
} = require("./timers/RoundThreeCollaborator.js");
|
98 |
+
const Round = require("./models/RoundsModel.js");
|
99 |
+
let Round1 = await Round.findOne({ Round: 1 });
|
100 |
+
let Round2 = await Round.findOne({ Round: 2 });
|
101 |
+
let Round3 = await Round.findOne({ Round: 3 });
|
102 |
+
let Round4 = await Round.findOne({ Round: 4 });
|
103 |
+
let Round1STime = Round1.StartTime;
|
104 |
+
let Round2STime = Round2.StartTime;
|
105 |
+
let Round3STime = Round3.StartTime;
|
106 |
+
let Round4STime = Round4.StartTime;
|
107 |
+
let Round1ETime = Round1.EndTime;
|
108 |
+
let Round2ETime = Round2.EndTime;
|
109 |
+
let Round3ETime = Round3.EndTime;
|
110 |
+
let Round4ETime = Round4.EndTime;
|
111 |
+
let date = new Date();
|
112 |
+
//scheduleCollaborativeRound(date)
|
113 |
+
scheduleRound1Start(Round1STime);
|
114 |
+
scheduleRound2Start(Round2STime);
|
115 |
+
scheduleRound3Start(Round3STime);
|
116 |
+
scheduleRound4Start(Round4STime);
|
117 |
+
scheduleRound1End(Round1ETime);
|
118 |
+
scheduleRound2End(Round2ETime);
|
119 |
+
scheduleRound3End(Round3ETime);
|
120 |
+
scheduleRound4End(Round4ETime);
|
121 |
+
}
|
122 |
+
|
123 |
+
app.use((req, res, next) => {
|
124 |
+
res.status(404).sendFile(path.join(__dirname, "static/html/404.html"));
|
125 |
+
});
|
126 |
+
notification.initialize(io);
|
127 |
+
round.initialize(io);
|
128 |
+
io.on("connection", async (socket) => {
|
129 |
+
const cookies = socket.request.headers.cookie;
|
130 |
+
let user = await fetch_user(cookies);
|
131 |
+
if (!user) {
|
132 |
+
return;
|
133 |
+
}
|
134 |
+
if (socket.rooms.length !== 2) socket.join(user.TeamID.toString());
|
135 |
+
io.to(user.TeamID.toString()).emit(
|
136 |
+
"notofication",
|
137 |
+
"user is online " + user.Name
|
138 |
+
);
|
139 |
+
});
|
config/DatabaseConfig.js
ADDED
@@ -0,0 +1,17 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
const mongoose = require("mongoose");
|
2 |
+
const dotenv = require("dotenv");
|
3 |
+
dotenv.config({ path: "./config.env" });
|
4 |
+
|
5 |
+
const DB = process.env.DATABASE.replace("<username>", process.env.USER).replace(
|
6 |
+
"<password>",
|
7 |
+
process.env.PASSWORD
|
8 |
+
);
|
9 |
+
|
10 |
+
mongoose
|
11 |
+
.connect(DB)
|
12 |
+
.then(function (i) {
|
13 |
+
console.log("Database is Connected");
|
14 |
+
})
|
15 |
+
.catch(function (err) {
|
16 |
+
console.log(err);
|
17 |
+
});
|
config/MailConfig.js
ADDED
The diff for this file is too large to render.
See raw diff
|
|
config/WebSocket.js
ADDED
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
const socketIO = require('socket.io');
|
2 |
+
|
3 |
+
// Emit an event to a specific client or all clients
|
4 |
+
function emitEventToClient(socketId, event, data) {
|
5 |
+
io.to(socketId).emit(event, data);
|
6 |
+
}
|
7 |
+
|
8 |
+
// Emit an event to all connected clients
|
9 |
+
function emitEventToAllClients(event, data) {
|
10 |
+
io.emit(event, data);
|
11 |
+
}
|
12 |
+
|
13 |
+
module.exports = { emitEventToClient, emitEventToAllClients };
|
controllers/ModelController.js
ADDED
@@ -0,0 +1,229 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
const asyncHandler = require("express-async-handler");
|
2 |
+
const Room = require("../models/RoomModel");
|
3 |
+
const Question = require("../models/QuestionsModel");
|
4 |
+
const User = require("../models/UserModel");
|
5 |
+
const Team = require("../models/TeamModel");
|
6 |
+
const Leaderboard = require("../models/LeaderboardModel");
|
7 |
+
const Round = require("../models/RoundsModel");
|
8 |
+
const { getRoomLeaderBoardR1R2, getRound3Leaderboard, getRound4Leaderboard } = require("../helpers/LeaderBoardPreFetch");
|
9 |
+
const CollaborativeLeaderboardModel = require("../models/CollaborativeLeaderboardModel");
|
10 |
+
const Certificates = require("../models/Certificates");
|
11 |
+
|
12 |
+
|
13 |
+
|
14 |
+
module.exports.profile=asyncHandler(async(req,res)=>{
|
15 |
+
try {
|
16 |
+
let board;
|
17 |
+
let rounds = await Round.find()
|
18 |
+
let date = new Date();
|
19 |
+
let round
|
20 |
+
for (let i in rounds) {
|
21 |
+
if (date >= rounds[i].StartTime && date <= rounds[i].EndTime) {
|
22 |
+
round = rounds[i];
|
23 |
+
break;
|
24 |
+
}
|
25 |
+
}
|
26 |
+
if(round)
|
27 |
+
{
|
28 |
+
if(round.Round===1||round.Round===2||round.Round===4)
|
29 |
+
board=await Leaderboard.findOne({TeamID:req.team._id,Round:round.Round});
|
30 |
+
else if(round.Round===3)
|
31 |
+
board = await CollaborativeLeaderboardModel.findOne({
|
32 |
+
$or: [{ TeamID1: req.team._id }, { TeamID2: req.team._id }]
|
33 |
+
});
|
34 |
+
}
|
35 |
+
res.json({
|
36 |
+
Round:round.Round,
|
37 |
+
TeamName:req.team.TeamName,
|
38 |
+
UserName:req.user.Name,
|
39 |
+
Points:board.Points,
|
40 |
+
QuestionsSolved:board.Questions.Solved.length,
|
41 |
+
TotalQuestions:(board.Questions.Solved.length)+(board.Questions.Unsolved.length),
|
42 |
+
RoundEnd:round.EndTime,
|
43 |
+
status:true
|
44 |
+
});
|
45 |
+
} catch (error) {
|
46 |
+
res.status(500).json({
|
47 |
+
message:error.message
|
48 |
+
})
|
49 |
+
}
|
50 |
+
})
|
51 |
+
|
52 |
+
|
53 |
+
|
54 |
+
|
55 |
+
|
56 |
+
module.exports.leaderboard=asyncHandler(async(req,res)=>{
|
57 |
+
try {
|
58 |
+
|
59 |
+
let rounds=await Round.find();
|
60 |
+
let currentRound=0;
|
61 |
+
let date=new Date();
|
62 |
+
for(let i in rounds){
|
63 |
+
if(date>=rounds[i].StartTime&&date<=rounds[i].EndTime){
|
64 |
+
currentRound=rounds[i].Round;
|
65 |
+
}
|
66 |
+
}
|
67 |
+
if(currentRound===0){
|
68 |
+
res.json({
|
69 |
+
message:"Round Not Started",
|
70 |
+
status:false
|
71 |
+
})
|
72 |
+
}
|
73 |
+
else if(currentRound===1||currentRound===2){
|
74 |
+
let leaderboard=await getRoomLeaderBoardR1R2(req.team,currentRound);
|
75 |
+
if(leaderboard){
|
76 |
+
|
77 |
+
res.json({
|
78 |
+
LB:leaderboard,
|
79 |
+
TeamName:req.team.TeamName,
|
80 |
+
status:true
|
81 |
+
});
|
82 |
+
}
|
83 |
+
else{
|
84 |
+
res.json({
|
85 |
+
status:false
|
86 |
+
})
|
87 |
+
}
|
88 |
+
}
|
89 |
+
else if(currentRound===3){
|
90 |
+
let leaderboard= await getRound3Leaderboard();
|
91 |
+
if(leaderboard){
|
92 |
+
|
93 |
+
res.json({
|
94 |
+
LB:leaderboard,
|
95 |
+
TeamName:req.team.TeamName,
|
96 |
+
status:true
|
97 |
+
});
|
98 |
+
}
|
99 |
+
else{
|
100 |
+
res.json({
|
101 |
+
status:false
|
102 |
+
})
|
103 |
+
}
|
104 |
+
}
|
105 |
+
else if(currentRound===4){
|
106 |
+
let leaderboard=await getRound4Leaderboard();
|
107 |
+
if(leaderboard){
|
108 |
+
|
109 |
+
res.json({
|
110 |
+
LB:leaderboard,
|
111 |
+
TeamName:req.team.TeamName,
|
112 |
+
status:true
|
113 |
+
});
|
114 |
+
}
|
115 |
+
else{
|
116 |
+
res.json({
|
117 |
+
status:false
|
118 |
+
})
|
119 |
+
}
|
120 |
+
}
|
121 |
+
else
|
122 |
+
{
|
123 |
+
res.json({
|
124 |
+
message:"Game Ended",
|
125 |
+
status:false
|
126 |
+
})
|
127 |
+
}
|
128 |
+
|
129 |
+
} catch (error) {
|
130 |
+
res.status(500).json({
|
131 |
+
message:error.message,
|
132 |
+
status:false
|
133 |
+
})
|
134 |
+
console.log(error);
|
135 |
+
}
|
136 |
+
})
|
137 |
+
|
138 |
+
|
139 |
+
|
140 |
+
|
141 |
+
|
142 |
+
|
143 |
+
module.exports.qsnsStatus=asyncHandler(async(req,res)=>{
|
144 |
+
try {
|
145 |
+
let board=await Leaderboard.findOne({TeamID:req.team._id});
|
146 |
+
if(board){
|
147 |
+
res.json({
|
148 |
+
Questions:board.Questions
|
149 |
+
})
|
150 |
+
}
|
151 |
+
} catch (error) {
|
152 |
+
res.status(500).json({
|
153 |
+
message:error.message
|
154 |
+
})
|
155 |
+
}
|
156 |
+
})
|
157 |
+
|
158 |
+
|
159 |
+
|
160 |
+
|
161 |
+
module.exports.newUsers=asyncHandler(async(req,res)=>{
|
162 |
+
try {
|
163 |
+
let users=await User.find();
|
164 |
+
for(let i in users){
|
165 |
+
let team=await Team.findOne({_id:users[i].TeamID});
|
166 |
+
console.log(i);
|
167 |
+
let newT={
|
168 |
+
Name:users[i].Name,
|
169 |
+
Email:users[i].Email,
|
170 |
+
PhoneNumber:users[i].PhoneNumber,
|
171 |
+
RollNumber:users[i].RollNumber,
|
172 |
+
Branch:users[i].Branch,
|
173 |
+
Year:users[i].Year,
|
174 |
+
DiscordID:users[i].DiscordID,
|
175 |
+
Role:users[i].Role,
|
176 |
+
}
|
177 |
+
if(team){
|
178 |
+
newT={...newT,TeamName:team.TeamName};
|
179 |
+
}
|
180 |
+
let newUser=await Certificates.create(newT);
|
181 |
+
}
|
182 |
+
res.json({
|
183 |
+
message:"Done"
|
184 |
+
})
|
185 |
+
} catch (error) {
|
186 |
+
res.status(500).json({
|
187 |
+
message:error.message
|
188 |
+
})
|
189 |
+
}
|
190 |
+
})
|
191 |
+
|
192 |
+
|
193 |
+
|
194 |
+
|
195 |
+
module.exports.rounds=asyncHandler(async(req,res)=>{
|
196 |
+
try {
|
197 |
+
let data = req.body;
|
198 |
+
if(data.Round!==0){
|
199 |
+
|
200 |
+
let round=await Round.findOne({Round:data.Round})
|
201 |
+
|
202 |
+
res.json({
|
203 |
+
StartTime:round.StartTime,
|
204 |
+
status:true
|
205 |
+
});
|
206 |
+
}
|
207 |
+
else{
|
208 |
+
res.json({
|
209 |
+
status:false
|
210 |
+
})
|
211 |
+
}
|
212 |
+
} catch (error) {
|
213 |
+
res.status(500).json({
|
214 |
+
message:error.message,
|
215 |
+
status:false
|
216 |
+
|
217 |
+
})
|
218 |
+
}
|
219 |
+
})
|
220 |
+
|
221 |
+
|
222 |
+
|
223 |
+
|
224 |
+
|
225 |
+
|
226 |
+
|
227 |
+
|
228 |
+
|
229 |
+
|
controllers/QuestionController.js
ADDED
@@ -0,0 +1,170 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
const asyncHandler = require("express-async-handler");
|
2 |
+
const Room = require("../models/RoomModel");
|
3 |
+
const Question = require("../models/QuestionsModel");
|
4 |
+
const User = require("../models/UserModel");
|
5 |
+
const Team = require("../models/TeamModel");
|
6 |
+
const { questionSolved, questionSolvedlvl3 } = require("../sockets/QuestionSolved");
|
7 |
+
const Leaderboard = require("../models/LeaderboardModel");
|
8 |
+
const Round = require("../models/RoundsModel");
|
9 |
+
const CollaborativeLeaderboardModel = require("../models/CollaborativeLeaderboardModel");
|
10 |
+
const { round4End, teamRoundOver } = require("../sockets/RoundStartEnd");
|
11 |
+
const { updateLeaderBoard } = require("../sockets/LeaderBoardUpdated");
|
12 |
+
const UserQuestionModel = require("../models/UserQuestionModel");
|
13 |
+
|
14 |
+
|
15 |
+
|
16 |
+
|
17 |
+
|
18 |
+
exports.validateAnswer = asyncHandler(async (req, res) => {
|
19 |
+
try {
|
20 |
+
//In data from frontend we will recieve qs no. and answer enterd by user
|
21 |
+
//data must contain QuestionNumber and Answer
|
22 |
+
let data = req.body;
|
23 |
+
let question = await Question.findOne({ QuestionNumber: data.QuestionNumber })
|
24 |
+
let round = await Round.findOne({ Round: question.Round });
|
25 |
+
let date = new Date();
|
26 |
+
if (!round.Enabled) {
|
27 |
+
res.send("Round is disabled");
|
28 |
+
return;
|
29 |
+
}
|
30 |
+
if (date >= round.StartTime && date <= round.EndTime) {
|
31 |
+
let board = await Leaderboard.findOne({ TeamID: req.team._id, Round: question.Round })
|
32 |
+
let mainBoard=await Leaderboard.findOne({TeamID:req.team._id,Round:0})
|
33 |
+
if (question.Round === 3) {
|
34 |
+
board = await CollaborativeLeaderboardModel.findOne({
|
35 |
+
$or: [{ TeamID1: req.team._id }, { TeamID2: req.team._id }]
|
36 |
+
});
|
37 |
+
}
|
38 |
+
|
39 |
+
|
40 |
+
if ((data.Answer).trim() === (question.Answer).trim()) {
|
41 |
+
let x = board.Questions.Unsolved.indexOf(question._id);
|
42 |
+
let y = board.Questions.Solved.indexOf(question._id);
|
43 |
+
if (x === -1 && y !== -1) {
|
44 |
+
res.json({
|
45 |
+
message: "Question already solved",
|
46 |
+
status: false
|
47 |
+
})
|
48 |
+
return;
|
49 |
+
}
|
50 |
+
else if (x === -1) {
|
51 |
+
res.json({
|
52 |
+
message: "Question not found",
|
53 |
+
status: false
|
54 |
+
})
|
55 |
+
return;
|
56 |
+
}
|
57 |
+
let ques2=await UserQuestionModel.findOne({TeamID:req.team._id,QuestionNumber:question.QuestionNumber,Round:question.Round})
|
58 |
+
board.Questions.Unsolved.splice(x, 1);
|
59 |
+
// console.log(board.Questions.Unsolved);
|
60 |
+
board.Questions.Solved.push(question._id);
|
61 |
+
board.Points += question.Points;
|
62 |
+
mainBoard.Points += question.Points;
|
63 |
+
await mainBoard.save();
|
64 |
+
if(question.Round === 3){
|
65 |
+
board.Team1Points += question.Points;
|
66 |
+
board.Team2Points += question.Points;
|
67 |
+
questionSolvedlvl3(req, req.user, ques2, board)
|
68 |
+
}
|
69 |
+
board.Time = Date.now();
|
70 |
+
await board.save();
|
71 |
+
if(question.Round !== 3)
|
72 |
+
updateLeaderBoard(req)
|
73 |
+
questionSolved(req, req.user, ques2);
|
74 |
+
if (board.Questions.Unsolved.length === 0 && question.Round === 4 && question.QuestionNumber===94) {
|
75 |
+
round.Enabled = false;
|
76 |
+
await round.save();
|
77 |
+
round4End();
|
78 |
+
}
|
79 |
+
else if(board.Questions.Unsolved.length === 0){
|
80 |
+
board.Enabled = false;
|
81 |
+
await board.save();
|
82 |
+
teamRoundOver(req.user,question.Round)
|
83 |
+
}
|
84 |
+
|
85 |
+
|
86 |
+
res.json({
|
87 |
+
message: "CORRECT ANSWER !",
|
88 |
+
status: true
|
89 |
+
})
|
90 |
+
|
91 |
+
}
|
92 |
+
|
93 |
+
else {
|
94 |
+
res.json({
|
95 |
+
message: "INCORRECT ANSWER !",
|
96 |
+
status: false
|
97 |
+
})
|
98 |
+
}
|
99 |
+
}
|
100 |
+
else {
|
101 |
+
res.json({
|
102 |
+
message: "Round has not started yet",
|
103 |
+
status: false
|
104 |
+
})
|
105 |
+
return;
|
106 |
+
|
107 |
+
}
|
108 |
+
}
|
109 |
+
catch (error) {
|
110 |
+
console.log(error);
|
111 |
+
res.status(500).json({
|
112 |
+
message: error.message,
|
113 |
+
status: false
|
114 |
+
})
|
115 |
+
}
|
116 |
+
})
|
117 |
+
|
118 |
+
|
119 |
+
|
120 |
+
|
121 |
+
|
122 |
+
|
123 |
+
|
124 |
+
|
125 |
+
|
126 |
+
|
127 |
+
|
128 |
+
|
129 |
+
|
130 |
+
|
131 |
+
exports.hintProvider = asyncHandler(async (req, res) => {
|
132 |
+
try {
|
133 |
+
//In data from frontend we will recieve hintAddress of that question
|
134 |
+
let data = req.body;
|
135 |
+
let round = data.Round;
|
136 |
+
let hintAddress = data.HintAddress;
|
137 |
+
|
138 |
+
let question = await UserQuestionModel.findOne({ TeamID: req.team._id, HintAddress: hintAddress, Round: round })
|
139 |
+
|
140 |
+
if (question !== null) {
|
141 |
+
res.json({
|
142 |
+
Hint: question.Hint,
|
143 |
+
status: true
|
144 |
+
})
|
145 |
+
}
|
146 |
+
else{
|
147 |
+
res.json({
|
148 |
+
Hint:hintAddress+":Some Error Occured Contact ccs for more help",
|
149 |
+
status:true
|
150 |
+
})
|
151 |
+
}
|
152 |
+
|
153 |
+
}
|
154 |
+
catch (error) {
|
155 |
+
res.status(500).json({
|
156 |
+
message: error.message,
|
157 |
+
status: false
|
158 |
+
})
|
159 |
+
}
|
160 |
+
})
|
161 |
+
|
162 |
+
|
163 |
+
|
164 |
+
|
165 |
+
|
166 |
+
|
167 |
+
|
168 |
+
|
169 |
+
|
170 |
+
|
controllers/RoundFourController.js
ADDED
@@ -0,0 +1,262 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
const asyncHandler = require("express-async-handler");
|
2 |
+
const Room = require("../models/RoomModel");
|
3 |
+
const Question = require("../models/QuestionsModel");
|
4 |
+
const Leaderboard = require("../models/LeaderboardModel");
|
5 |
+
const Round = require("../models/RoundsModel");
|
6 |
+
const { getRoomLeaderBoardR1R2, getRound3Leaderboard } = require("../helpers/LeaderBoardPreFetch");
|
7 |
+
const Team = require("../models/TeamModel");
|
8 |
+
const User = require("../models/UserModel");
|
9 |
+
const PreviousRoomModel = require("../models/PreviousRoomModel");
|
10 |
+
const CollaborativeLeaderboardModel = require("../models/CollaborativeLeaderboardModel");
|
11 |
+
const UserQuestionModel = require("../models/UserQuestionModel");
|
12 |
+
|
13 |
+
|
14 |
+
|
15 |
+
//Random array retunrer
|
16 |
+
const randomUniqueArray = (n, array) => {
|
17 |
+
var arr = [];
|
18 |
+
while (arr.length < n) {
|
19 |
+
var r = Math.floor(Math.random() * array.length) + 0;
|
20 |
+
if (arr.indexOf(array[r]) === -1) arr.push(array[r]);
|
21 |
+
}
|
22 |
+
return arr;
|
23 |
+
}
|
24 |
+
|
25 |
+
|
26 |
+
|
27 |
+
|
28 |
+
|
29 |
+
|
30 |
+
//MULTI BIG FUNCTION :: INITIAL ASSIGNMENT
|
31 |
+
module.exports.roundFourAssign = asyncHandler(async (req, res) => {
|
32 |
+
try {
|
33 |
+
let date = new Date();
|
34 |
+
let roundNumber = 4;
|
35 |
+
let round = await Round.findOne({ Round: roundNumber });
|
36 |
+
|
37 |
+
|
38 |
+
|
39 |
+
if (!round.Enabled) {
|
40 |
+
res.send("Round is disabled");
|
41 |
+
return;
|
42 |
+
}
|
43 |
+
if (date >= round.StartTime && date <= round.EndTime) {
|
44 |
+
//Router Should be open
|
45 |
+
let leaderboardR3 = await getRound3Leaderboard()
|
46 |
+
//here 1 represents round is 1
|
47 |
+
|
48 |
+
if (checkTeamIdInTop3(leaderboardR3, req.user.TeamID)) {
|
49 |
+
//if team is in top 5 teams of Round 1
|
50 |
+
//set leaderboard of team
|
51 |
+
let board = await Leaderboard.findOne({ TeamID: req.team._id, Round: roundNumber });
|
52 |
+
let board2 = await Leaderboard.findOne({ TeamID: req.team._id, Round: 2 });
|
53 |
+
let board3 = await CollaborativeLeaderboardModel.findOne({
|
54 |
+
$or: [{ TeamID1: req.team._id }, { TeamID2: req.team._id }]
|
55 |
+
});
|
56 |
+
if (board === null) {
|
57 |
+
board = new Leaderboard({
|
58 |
+
TeamID: req.team._id,
|
59 |
+
TeamName: req.team.TeamName,
|
60 |
+
Points: board3.Points+board2.Points,
|
61 |
+
Questions: {
|
62 |
+
Solved: [],
|
63 |
+
Unsolved: []
|
64 |
+
},
|
65 |
+
Round: 4
|
66 |
+
});
|
67 |
+
await board.save();
|
68 |
+
board= await Leaderboard.findOne({ TeamID: req.team._id, Round: roundNumber });
|
69 |
+
}
|
70 |
+
if (!board.Enabled) {
|
71 |
+
res.send("This round is no longer available");
|
72 |
+
return;
|
73 |
+
}
|
74 |
+
//ASSIGNING ROOMID
|
75 |
+
let room = await Room.findOne({ Round: roundNumber });
|
76 |
+
board=await Leaderboard.findOne({TeamID:req.team._id,Round:roundNumber});
|
77 |
+
if (board.RoomID === undefined) {
|
78 |
+
board.RoomID = room._id;
|
79 |
+
let team = await Team.findOne({ _id: req.team._id });
|
80 |
+
team.RoomID = room._id;
|
81 |
+
let user = await User.findOne({ _id: req.user._id });
|
82 |
+
user.RoomID = room._id;
|
83 |
+
let PreviousRoom = new PreviousRoomModel({
|
84 |
+
TeamID: req.team._id,
|
85 |
+
RoomID: room._id,
|
86 |
+
Round: roundNumber
|
87 |
+
});
|
88 |
+
await PreviousRoom.save();
|
89 |
+
await team.save();
|
90 |
+
await user.save();
|
91 |
+
}
|
92 |
+
|
93 |
+
|
94 |
+
//ASSIGNING QUESTIONS
|
95 |
+
//ASSIGNING QUESTIONS
|
96 |
+
|
97 |
+
|
98 |
+
if (board.Questions.Unsolved.length === 0) {
|
99 |
+
let room = await Room.findOne({ _id: board.RoomID })
|
100 |
+
let questions = room.Questions;
|
101 |
+
board.Questions.Unsolved = questions;
|
102 |
+
|
103 |
+
//ASSIGNING HINTADDRESS FROM 0 TO 12
|
104 |
+
arr = []
|
105 |
+
let countr = 1;
|
106 |
+
for (let i = 0; i < board.Questions.Unsolved.length; i++) {
|
107 |
+
var r = Math.floor(Math.random() * 5) + 1;
|
108 |
+
|
109 |
+
if (arr.indexOf(r) === -1) {
|
110 |
+
arr.push(r);
|
111 |
+
let question = await Question.findOne({ _id: board.Questions.Unsolved[i] });
|
112 |
+
let UserQuestion = await UserQuestionModel.findOne({ QuestionNumber: question.QuestionNumber, TeamID: req.team._id });
|
113 |
+
|
114 |
+
if (UserQuestion === null) {
|
115 |
+
|
116 |
+
UserQuestion = new UserQuestionModel({
|
117 |
+
TeamID: req.team._id,
|
118 |
+
QuestionID: question._id,
|
119 |
+
QuestionNumber: question.QuestionNumber,
|
120 |
+
Question: question.Question,
|
121 |
+
Description: question.Description,
|
122 |
+
Answer: question.Answer,
|
123 |
+
Hint: question.Hint,
|
124 |
+
HintAddress: r,
|
125 |
+
Round: question.Round,
|
126 |
+
Points: question.Points,
|
127 |
+
RoomID: question.RoomID,
|
128 |
+
num: countr
|
129 |
+
})
|
130 |
+
await UserQuestion.save();
|
131 |
+
}
|
132 |
+
|
133 |
+
|
134 |
+
}
|
135 |
+
else {
|
136 |
+
|
137 |
+
i--;
|
138 |
+
}
|
139 |
+
}
|
140 |
+
await board.save();
|
141 |
+
|
142 |
+
}
|
143 |
+
|
144 |
+
|
145 |
+
|
146 |
+
|
147 |
+
|
148 |
+
//SENDING QUESTIONS AS RESPONSE
|
149 |
+
|
150 |
+
let UnSqsnsID = board.Questions.Unsolved;
|
151 |
+
let SqsnsID = board.Questions.Solved;
|
152 |
+
let qsns = { Solved: [], Unsolved: [] }
|
153 |
+
|
154 |
+
//for unsolved
|
155 |
+
for (let i in UnSqsnsID) {
|
156 |
+
|
157 |
+
let question = await UserQuestionModel.findOne({ QuestionID: UnSqsnsID[i], TeamID: req.team._id })
|
158 |
+
if (question) {
|
159 |
+
let obj = {
|
160 |
+
QuestionNumber: question.QuestionNumber,
|
161 |
+
Question: question.Question,
|
162 |
+
Description: question.Description,
|
163 |
+
HintAddress: question.HintAddress,
|
164 |
+
Points: question.Points,
|
165 |
+
num: question.num
|
166 |
+
}
|
167 |
+
qsns.Unsolved.push(obj);
|
168 |
+
break;
|
169 |
+
}
|
170 |
+
|
171 |
+
}
|
172 |
+
|
173 |
+
//for solved
|
174 |
+
for (let i in SqsnsID) {
|
175 |
+
|
176 |
+
let question = await UserQuestionModel.findOne({ QuestionID: SqsnsID[i], TeamID: req.team._id })
|
177 |
+
if (question) {
|
178 |
+
let obj = {
|
179 |
+
QuestionNumber: question.QuestionNumber,
|
180 |
+
Question: question.Question,
|
181 |
+
Description: question.Description,
|
182 |
+
HintAddress: question.HintAddress,
|
183 |
+
Points: question.Points,
|
184 |
+
num: question.num
|
185 |
+
}
|
186 |
+
qsns.Solved.push(obj);
|
187 |
+
}
|
188 |
+
}
|
189 |
+
res.json({
|
190 |
+
Questions: qsns,
|
191 |
+
ServerTime: new Date(),
|
192 |
+
RoundEnd: round.EndTime,
|
193 |
+
status: true
|
194 |
+
})
|
195 |
+
}
|
196 |
+
else {
|
197 |
+
res.send("You are not qualified for this round");
|
198 |
+
}
|
199 |
+
|
200 |
+
}
|
201 |
+
else {
|
202 |
+
//router should be closed
|
203 |
+
res.send("Round is closed");
|
204 |
+
}
|
205 |
+
|
206 |
+
|
207 |
+
|
208 |
+
|
209 |
+
|
210 |
+
|
211 |
+
|
212 |
+
|
213 |
+
|
214 |
+
|
215 |
+
|
216 |
+
|
217 |
+
|
218 |
+
|
219 |
+
|
220 |
+
|
221 |
+
|
222 |
+
|
223 |
+
|
224 |
+
|
225 |
+
|
226 |
+
|
227 |
+
|
228 |
+
}
|
229 |
+
catch (error) {
|
230 |
+
console.log(error)
|
231 |
+
res.status(500).json({
|
232 |
+
message: error.message
|
233 |
+
})
|
234 |
+
}
|
235 |
+
})
|
236 |
+
|
237 |
+
|
238 |
+
function checkTeamIdInTop3(leaderboard, teamId) {
|
239 |
+
// Get the top 5 array elements
|
240 |
+
|
241 |
+
const top3 = leaderboard.slice(0, 3);
|
242 |
+
// Check if the teamId exists in the top 5
|
243 |
+
for (let i = 0; i < top3.length; i++) {
|
244 |
+
if (top3[i].TeamID1.toString() == teamId.toString()) {
|
245 |
+
return true;
|
246 |
+
}
|
247 |
+
else if (top3[i].TeamID2.toString() == teamId.toString()) {
|
248 |
+
return true;
|
249 |
+
}
|
250 |
+
}
|
251 |
+
|
252 |
+
return false;
|
253 |
+
}
|
254 |
+
|
255 |
+
async function all_member_room_assign(team, RoomID) {
|
256 |
+
let members = team.Members;
|
257 |
+
for (let i in members) {
|
258 |
+
let member = await User.findOne({ _id: members[i] });
|
259 |
+
member.RoomID = RoomID;
|
260 |
+
await member.save();
|
261 |
+
}
|
262 |
+
}
|
controllers/RoundInitialController.js
ADDED
@@ -0,0 +1,232 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
const asyncHandler = require("express-async-handler");
|
2 |
+
const Room = require("../models/RoomModel");
|
3 |
+
const Question = require("../models/QuestionsModel");
|
4 |
+
const User = require("../models/UserModel");
|
5 |
+
const Team = require("../models/TeamModel");
|
6 |
+
const { questionSolved } = require("../sockets/QuestionSolved");
|
7 |
+
const Leaderboard = require("../models/LeaderboardModel");
|
8 |
+
const Round = require("../models/RoundsModel");
|
9 |
+
const PreviousRoomModel = require("../models/PreviousRoomModel");
|
10 |
+
const UserQuestionModel = require("../models/UserQuestionModel");
|
11 |
+
|
12 |
+
|
13 |
+
|
14 |
+
|
15 |
+
|
16 |
+
//Static variable
|
17 |
+
let count = 0;
|
18 |
+
|
19 |
+
|
20 |
+
//Random array retunrer
|
21 |
+
const randomUniqueArray = (n, array) => {
|
22 |
+
var arr = [];
|
23 |
+
while (arr.length < n) {
|
24 |
+
var r = Math.floor(Math.random() * array.length) + 0;
|
25 |
+
if (arr.indexOf(array[r]) === -1) arr.push(array[r]);
|
26 |
+
}
|
27 |
+
return arr;
|
28 |
+
}
|
29 |
+
|
30 |
+
|
31 |
+
|
32 |
+
|
33 |
+
|
34 |
+
|
35 |
+
//MULTI BIG FUNCTION :: INITIAL ASSIGNMENT
|
36 |
+
module.exports.initialAssign = asyncHandler(async (req, res) => {
|
37 |
+
try {
|
38 |
+
let date = new Date();
|
39 |
+
let round2 = await Round.findOne({ Round: 1 });
|
40 |
+
if (!round2.Enabled) {
|
41 |
+
res.send("Round is disabled");
|
42 |
+
return;
|
43 |
+
}
|
44 |
+
if (date >= round2.StartTime && date <= round2.EndTime) {
|
45 |
+
//ASSIGNING ROUND
|
46 |
+
|
47 |
+
let board1 = await Leaderboard.findOne({ TeamID: req.team._id,Round: 0 })
|
48 |
+
let board=await Leaderboard.findOne({ TeamID: req.team._id,Round: 1 })
|
49 |
+
|
50 |
+
if (board === null) {
|
51 |
+
board = new Leaderboard({
|
52 |
+
TeamID: req.team._id,
|
53 |
+
TeamName: req.team.TeamName,
|
54 |
+
Points: board1.Points,
|
55 |
+
Round: 1,
|
56 |
+
Questions: {
|
57 |
+
Solved: [],
|
58 |
+
Unsolved: []
|
59 |
+
}
|
60 |
+
});
|
61 |
+
|
62 |
+
}
|
63 |
+
|
64 |
+
let round = 1;
|
65 |
+
|
66 |
+
|
67 |
+
if (!board.Enabled) {
|
68 |
+
res.send("This round is no longer available");
|
69 |
+
return;
|
70 |
+
}
|
71 |
+
//ASSIGNING ROOMID
|
72 |
+
// console.log(count)
|
73 |
+
|
74 |
+
let rooms = await Room.find({ Round: round });
|
75 |
+
if (board.RoomID === undefined) {
|
76 |
+
board.RoomID = rooms[count]._id;
|
77 |
+
req.team.RoomID = rooms[count]._id;
|
78 |
+
req.user.RoomID = rooms[count]._id;
|
79 |
+
let team = await Team.findOne({ _id: req.team._id });
|
80 |
+
team.RoomID = rooms[count]._id;
|
81 |
+
let PreviousRoom = new PreviousRoomModel({
|
82 |
+
TeamID: req.team._id,
|
83 |
+
RoomID: rooms[count]._id,
|
84 |
+
Round: round
|
85 |
+
});
|
86 |
+
await PreviousRoom.save();
|
87 |
+
await team.save();
|
88 |
+
await all_member_room_assign(req.team, rooms[count]._id);
|
89 |
+
|
90 |
+
count++;
|
91 |
+
}
|
92 |
+
if (count === rooms.length) {
|
93 |
+
count = 0;
|
94 |
+
}
|
95 |
+
|
96 |
+
|
97 |
+
//ASSIGNING QUESTIONS
|
98 |
+
|
99 |
+
let temp = await Round.findOne({ Round: round });
|
100 |
+
let roundQs = temp.Questions
|
101 |
+
|
102 |
+
if (board.Questions.Unsolved.length === 0) {
|
103 |
+
let room = await Room.findOne({ _id: board.RoomID })
|
104 |
+
let questions = room.Questions;
|
105 |
+
board.Questions.Unsolved = randomUniqueArray(roundQs, questions);
|
106 |
+
// console.log(board.Questions.Unsolved)
|
107 |
+
//ASSIGNING HINTADDRESS FROM 0 TO 12
|
108 |
+
arr = []
|
109 |
+
let countr = 1;
|
110 |
+
for (let i=0;i<board.Questions.Unsolved.length;i++) {
|
111 |
+
var r = Math.floor(Math.random() * 12) + 1;
|
112 |
+
|
113 |
+
if (arr.indexOf(r) === -1) {
|
114 |
+
arr.push(r);
|
115 |
+
let question = await Question.findOne({ _id: board.Questions.Unsolved[i] });
|
116 |
+
let UserQuestion=await UserQuestionModel.findOne({QuestionNumber:question.QuestionNumber,TeamID:req.team._id});
|
117 |
+
if(UserQuestion===null)
|
118 |
+
{
|
119 |
+
|
120 |
+
UserQuestion=new UserQuestionModel({
|
121 |
+
TeamID:req.team._id,
|
122 |
+
QuestionID:question._id,
|
123 |
+
QuestionNumber:question.QuestionNumber,
|
124 |
+
Question:question.Question,
|
125 |
+
Description:question.Description,
|
126 |
+
Answer:question.Answer,
|
127 |
+
Hint:question.Hint,
|
128 |
+
HintAddress:r,
|
129 |
+
Round:question.Round,
|
130 |
+
Points:question.Points,
|
131 |
+
RoomID:question.RoomID,
|
132 |
+
num:countr++
|
133 |
+
})
|
134 |
+
console.log(countr)
|
135 |
+
await UserQuestion.save();
|
136 |
+
}
|
137 |
+
|
138 |
+
|
139 |
+
}
|
140 |
+
else{
|
141 |
+
|
142 |
+
i--;
|
143 |
+
}
|
144 |
+
}
|
145 |
+
await board.save();
|
146 |
+
console.log("board saved")
|
147 |
+
|
148 |
+
}
|
149 |
+
|
150 |
+
|
151 |
+
|
152 |
+
|
153 |
+
|
154 |
+
|
155 |
+
|
156 |
+
|
157 |
+
|
158 |
+
//SENDING QUESTIONS AS RESPONSE
|
159 |
+
|
160 |
+
let UnSqsnsID = board.Questions.Unsolved;
|
161 |
+
let SqsnsID = board.Questions.Solved;
|
162 |
+
let qsns = { Solved: [], Unsolved: [] }
|
163 |
+
|
164 |
+
//for unsolved
|
165 |
+
for (let i in UnSqsnsID) {
|
166 |
+
|
167 |
+
let question = await UserQuestionModel.findOne({ QuestionID: UnSqsnsID[i],TeamID:req.team._id })
|
168 |
+
if (question) {
|
169 |
+
let obj = {
|
170 |
+
QuestionNumber: question.QuestionNumber,
|
171 |
+
Question: question.Question,
|
172 |
+
Description: question.Description,
|
173 |
+
HintAddress: question.HintAddress,
|
174 |
+
Points: question.Points,
|
175 |
+
num: question.num
|
176 |
+
}
|
177 |
+
qsns.Unsolved.push(obj);
|
178 |
+
}
|
179 |
+
}
|
180 |
+
|
181 |
+
//for solved
|
182 |
+
for (let i in SqsnsID) {
|
183 |
+
|
184 |
+
let question = await UserQuestionModel.findOne({ QuestionID: SqsnsID[i], TeamID: req.team._id })
|
185 |
+
if (question) {
|
186 |
+
let obj = {
|
187 |
+
QuestionNumber: question.QuestionNumber,
|
188 |
+
Question: question.Question,
|
189 |
+
Description: question.Description,
|
190 |
+
HintAddress: question.HintAddress,
|
191 |
+
Points: question.Points,
|
192 |
+
num: question.num
|
193 |
+
}
|
194 |
+
qsns.Solved.push(obj);
|
195 |
+
}
|
196 |
+
}
|
197 |
+
|
198 |
+
|
199 |
+
|
200 |
+
res.json({
|
201 |
+
Questions: qsns,
|
202 |
+
RoundEnd: round2.EndTime,
|
203 |
+
ServerTime: new Date(),
|
204 |
+
status: true
|
205 |
+
})
|
206 |
+
}
|
207 |
+
else {
|
208 |
+
res.send("Round is Closed")
|
209 |
+
}
|
210 |
+
|
211 |
+
}
|
212 |
+
catch (error) {
|
213 |
+
console.log(error)
|
214 |
+
res.status(500).json({
|
215 |
+
message: error.message
|
216 |
+
})
|
217 |
+
}
|
218 |
+
})
|
219 |
+
|
220 |
+
|
221 |
+
async function all_member_room_assign(team, RoomID) {
|
222 |
+
let members = team.Members;
|
223 |
+
for (let i in members) {
|
224 |
+
let member = await User.findOne({ _id: members[i] });
|
225 |
+
if(member)
|
226 |
+
{
|
227 |
+
member.RoomID = RoomID;
|
228 |
+
await member.save();
|
229 |
+
}
|
230 |
+
|
231 |
+
}
|
232 |
+
}
|
controllers/RoundOneController.js
ADDED
@@ -0,0 +1,380 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
const { v4: uuidv4 } = require('uuid');
|
2 |
+
const asyncHandeler = require("express-async-handler");
|
3 |
+
const { response } = require("express");
|
4 |
+
const login = require("../middlewares/UserLoginMiddleware");
|
5 |
+
const path = require('path');
|
6 |
+
const User = require('../models/UserModel');
|
7 |
+
const Team = require('../models/TeamModel');
|
8 |
+
const { getRoomLeaderBoardR1R2, getRound4Leaderboard } = require('../helpers/LeaderBoardPreFetch');
|
9 |
+
const { distributeQs } = require('./QuestionController');
|
10 |
+
const { getRoundLeaderboard } = require('../helpers/LeaderBoardPreFetch');
|
11 |
+
const Leaderboard = require("../models/LeaderboardModel");
|
12 |
+
const CollaborativeLeaderboardModel = require("../models/CollaborativeLeaderboardModel");
|
13 |
+
const UserQuestionModel = require("../models/UserQuestionModel");
|
14 |
+
const Room = require("../models/RoomModel");
|
15 |
+
|
16 |
+
exports.get = asyncHandeler(async (req, res) => {
|
17 |
+
// console.log(await getRoomLeaderBoardR1(req.user.Team));
|
18 |
+
res.send(await getRoomLeaderBoardR1(req.user.Team));
|
19 |
+
return;
|
20 |
+
});
|
21 |
+
|
22 |
+
|
23 |
+
|
24 |
+
|
25 |
+
|
26 |
+
|
27 |
+
|
28 |
+
|
29 |
+
|
30 |
+
|
31 |
+
|
32 |
+
exports.post = asyncHandeler(async (req, res) => {
|
33 |
+
//distribution of questions here
|
34 |
+
//let data=await insertLogsToMongo();
|
35 |
+
// await setQues()
|
36 |
+
//setAllTLeaderBoardFalse();
|
37 |
+
//start timer of setcollaborative timer
|
38 |
+
let date = new Date();
|
39 |
+
// await setQues();
|
40 |
+
// scheduleCollaborativeRound(date);
|
41 |
+
await setQues2();
|
42 |
+
|
43 |
+
res.json(await getRound4Leaderboard());
|
44 |
+
});
|
45 |
+
async function createLeaderboardDocuments() {
|
46 |
+
try {
|
47 |
+
// Retrieve all teams from the Team collection
|
48 |
+
const teams = await Team.find();
|
49 |
+
|
50 |
+
// Iterate over each team and create a leaderboard document
|
51 |
+
for (const team of teams) {
|
52 |
+
// Check if a leaderboard document already exists for the team
|
53 |
+
const existingLeaderboard = await Leaderboard.findOne({ TeamID: team._id });
|
54 |
+
|
55 |
+
if (!existingLeaderboard) {
|
56 |
+
// Create a new leaderboard document for the team
|
57 |
+
const leaderboard = new Leaderboard({
|
58 |
+
TeamID: team._id,
|
59 |
+
TeamName: team.TeamName,
|
60 |
+
Points: 0,
|
61 |
+
Time: new Date(),
|
62 |
+
RoomID: team.RoomID,
|
63 |
+
Round: 0,
|
64 |
+
Questions: { Solved: [], Unsolved: [] }
|
65 |
+
});
|
66 |
+
|
67 |
+
// Save the leaderboard document
|
68 |
+
await leaderboard.save();
|
69 |
+
console.log(`Created leaderboard document for team: ${team.TeamName}`);
|
70 |
+
}
|
71 |
+
}
|
72 |
+
|
73 |
+
console.log("Leaderboard documents created for all teams.");
|
74 |
+
} catch (error) {
|
75 |
+
console.error("Error creating leaderboard documents:", error);
|
76 |
+
}
|
77 |
+
}
|
78 |
+
async function checkTeamOK() {
|
79 |
+
try {
|
80 |
+
const teams = await Team.find();
|
81 |
+
let count = 0;
|
82 |
+
let teamcount = 0;
|
83 |
+
let response = [];
|
84 |
+
let team1 = [];
|
85 |
+
for (const team of teams) {
|
86 |
+
let flag = true;
|
87 |
+
for (i in team.Members) {
|
88 |
+
let user = await User.findOne({ _id: team.Members[i] });
|
89 |
+
if (!user) {
|
90 |
+
// console.log("Team " + team.TeamName + "has a member who is not a user")
|
91 |
+
count++;
|
92 |
+
response.push(team.Members[i]);
|
93 |
+
if (flag) {
|
94 |
+
let teamLeader = await User.findOne({ TeamID: team._id, Role: "Leader" });
|
95 |
+
if (teamLeader) {
|
96 |
+
console.log("Team Leader:" + teamLeader.Name);
|
97 |
+
}
|
98 |
+
|
99 |
+
team1.push(team.TeamName);
|
100 |
+
teamcount++;
|
101 |
+
flag = false;
|
102 |
+
}
|
103 |
+
}
|
104 |
+
}
|
105 |
+
}
|
106 |
+
console.log("Total teams with missing registrations:" + teamcount)
|
107 |
+
console.log("Total users with missing registrations:" + count);
|
108 |
+
return team1;
|
109 |
+
|
110 |
+
}
|
111 |
+
catch (err) {
|
112 |
+
console.log(err);
|
113 |
+
}
|
114 |
+
}
|
115 |
+
const fs = require("fs");
|
116 |
+
const QuestionsModel = require('../models/QuestionsModel');
|
117 |
+
const { scheduleCollaborativeRound } = require('../timers/RoundThreeCollaborator');
|
118 |
+
|
119 |
+
async function insertLogsToMongo() {
|
120 |
+
try {
|
121 |
+
const logData = fs.readFileSync("logs.txt", "utf8");
|
122 |
+
let insert = false;
|
123 |
+
const logEntries = logData.split("\n");
|
124 |
+
|
125 |
+
let finalData = [];
|
126 |
+
let tempObj = {};
|
127 |
+
|
128 |
+
for (const row of logEntries) {
|
129 |
+
// console.log(row);
|
130 |
+
if (row.includes("{")) {
|
131 |
+
|
132 |
+
insert = true;
|
133 |
+
} else if (row.includes("}")) {
|
134 |
+
insert = false;
|
135 |
+
finalData.push(tempObj);
|
136 |
+
tempObj = {};
|
137 |
+
}
|
138 |
+
|
139 |
+
const rowData = row.split(": ");
|
140 |
+
|
141 |
+
if (insert) {
|
142 |
+
if (
|
143 |
+
rowData[0].includes("Name") ||
|
144 |
+
rowData[0].includes("Email") ||
|
145 |
+
rowData[0].includes("RollNumber") ||
|
146 |
+
rowData[0].includes("PhoneNumber") ||
|
147 |
+
rowData[0].includes("TeamID") ||
|
148 |
+
rowData[0].includes("Branch") ||
|
149 |
+
rowData[0].includes("Year") ||
|
150 |
+
rowData[0].includes("DiscordID") ||
|
151 |
+
rowData[0].includes("Password") ||
|
152 |
+
rowData[0].includes("Role") ||
|
153 |
+
rowData[0].includes("Timestamp") ||
|
154 |
+
rowData[0].includes("_id")
|
155 |
+
) {
|
156 |
+
tempObj[rowData[0]] = rowData[1];
|
157 |
+
}
|
158 |
+
}
|
159 |
+
}
|
160 |
+
let response = [];
|
161 |
+
let users = await checkTeamOK();
|
162 |
+
users = extractIdsFromArray(users)
|
163 |
+
let data = await convertDataArray(cleanData(finalData));
|
164 |
+
|
165 |
+
for (let i in users) {
|
166 |
+
let team = users[i].toString();
|
167 |
+
// console.log(team);
|
168 |
+
let flag = false;
|
169 |
+
for (let j in data) {
|
170 |
+
if (data[j] !== undefined) {
|
171 |
+
//console.log(data[j].TeamID);
|
172 |
+
if (data[j]._id === team) {
|
173 |
+
// console.log("found"+data[j].TeamID);
|
174 |
+
response.push(data[j]);
|
175 |
+
flag = true;
|
176 |
+
|
177 |
+
}
|
178 |
+
}
|
179 |
+
|
180 |
+
}
|
181 |
+
if (!flag) {
|
182 |
+
console.log("Team not found:" + team);
|
183 |
+
}
|
184 |
+
}
|
185 |
+
console.log(response.length);
|
186 |
+
for (k in response) {
|
187 |
+
await registerUser(response[k]);
|
188 |
+
}
|
189 |
+
return response;
|
190 |
+
|
191 |
+
|
192 |
+
} catch (err) {
|
193 |
+
console.error("Error parsing data:", err);
|
194 |
+
}
|
195 |
+
}
|
196 |
+
function cleanData(dataArray) {
|
197 |
+
const cleanedData = [];
|
198 |
+
|
199 |
+
dataArray.forEach((item) => {
|
200 |
+
const cleanedItem = {};
|
201 |
+
for (const key in item) {
|
202 |
+
let value = item[key];
|
203 |
+
value = value.trim().replace(/^'new ObjectId\("(.*)"\)'$|^'(.*)',$/, '$1$2'); // Remove single quotes and optional trailing comma
|
204 |
+
cleanedItem[key.trim()] = value;
|
205 |
+
}
|
206 |
+
cleanedData.push(cleanedItem);
|
207 |
+
});
|
208 |
+
|
209 |
+
return cleanedData;
|
210 |
+
}
|
211 |
+
function convertDataArray(dataArray) {
|
212 |
+
const convertedArray = dataArray.map((item) => {
|
213 |
+
let response = {};
|
214 |
+
let goodObj = true;
|
215 |
+
if (item.Name) {
|
216 |
+
response.Name = item.Name.trim()
|
217 |
+
}
|
218 |
+
else
|
219 |
+
goodObj = false;
|
220 |
+
if (item.Email) { response.Email = item.Email.trim() }
|
221 |
+
else
|
222 |
+
goodObj = false;
|
223 |
+
|
224 |
+
if (item.RollNumber)
|
225 |
+
response.RollNumber = item.RollNumber.replace(',', '').trim()
|
226 |
+
else
|
227 |
+
goodObj = false;
|
228 |
+
if (item.PhoneNumber)
|
229 |
+
response.PhoneNumber = item.PhoneNumber.trim()
|
230 |
+
else
|
231 |
+
goodObj = false;
|
232 |
+
if (item.TeamID)
|
233 |
+
response.TeamID = item.TeamID.replace('new ObjectId("', '').replace('"),', '').trim()
|
234 |
+
else
|
235 |
+
goodObj = false;
|
236 |
+
if (item.Branch)
|
237 |
+
response.Branch = item.Branch.trim()
|
238 |
+
else
|
239 |
+
goodObj = false;
|
240 |
+
if (item.Year)
|
241 |
+
response.Year = item.Year.trim()
|
242 |
+
else
|
243 |
+
goodObj = false;
|
244 |
+
if (item.DiscordID)
|
245 |
+
response.DiscordID = item.DiscordID.trim()
|
246 |
+
else
|
247 |
+
goodObj = false;
|
248 |
+
if (item.Password)
|
249 |
+
response.Password = item.Password.trim()
|
250 |
+
else
|
251 |
+
goodObj = false;
|
252 |
+
if (item.Role)
|
253 |
+
response.Role = item.Role.trim()
|
254 |
+
else
|
255 |
+
goodObj = false;
|
256 |
+
if (item.Timestamp)
|
257 |
+
response.Timestamp = item.Timestamp.replace(',', '').trim()
|
258 |
+
else
|
259 |
+
goodObj = false;
|
260 |
+
if (item._id)
|
261 |
+
response._id = item._id.replace('new ObjectId("', '').replace('"),', '').trim()
|
262 |
+
else
|
263 |
+
goodObj = false;
|
264 |
+
if (goodObj)
|
265 |
+
return response;
|
266 |
+
|
267 |
+
});
|
268 |
+
for (i in convertedArray) {
|
269 |
+
if (convertedArray[i] === undefined) {
|
270 |
+
convertedArray.splice(i, 1);
|
271 |
+
}
|
272 |
+
}
|
273 |
+
return convertedArray;
|
274 |
+
}
|
275 |
+
function extractIdsFromArray(dataArray) {
|
276 |
+
const idArray = dataArray.map((item) => item.toString());
|
277 |
+
return idArray;
|
278 |
+
}
|
279 |
+
async function registerUser(user) {
|
280 |
+
let team = await Team.findOne({ _id: user.TeamID });
|
281 |
+
let usern = new User({
|
282 |
+
Name: user.Name,
|
283 |
+
Email: user.Email,
|
284 |
+
Password: team.Password,
|
285 |
+
RollNumber: user.RollNumber,
|
286 |
+
PhoneNumber: user.PhoneNumber,
|
287 |
+
Branch: user.Branch,
|
288 |
+
Year: user.Year,
|
289 |
+
DiscordID: user.DiscordID,
|
290 |
+
Role: "Member",
|
291 |
+
TeamID: team._id
|
292 |
+
});
|
293 |
+
try {
|
294 |
+
await usern.save();
|
295 |
+
usern = await User.findOne({ Email: user.Email });
|
296 |
+
let index = team.Members.indexOf(user._id);
|
297 |
+
team.Members.splice(index, 1);
|
298 |
+
team.Members.push(usern._id);
|
299 |
+
//remove old user id
|
300 |
+
|
301 |
+
await team.save();
|
302 |
+
console.log("User saved:" + usern.Name);
|
303 |
+
}
|
304 |
+
catch (err) {
|
305 |
+
console.log(err);
|
306 |
+
|
307 |
+
}
|
308 |
+
console.log(team);
|
309 |
+
}
|
310 |
+
async function setQues() {
|
311 |
+
try {
|
312 |
+
let ques = await QuestionsModel.find({ Round: 3 })
|
313 |
+
for (i in ques) {
|
314 |
+
let q = ques[i]
|
315 |
+
q.assigned = true;
|
316 |
+
console.log(q)
|
317 |
+
await q.save()
|
318 |
+
}
|
319 |
+
}
|
320 |
+
catch (err) {
|
321 |
+
console.log(err)
|
322 |
+
}
|
323 |
+
//set assigned false to all round 2 questions
|
324 |
+
|
325 |
+
}
|
326 |
+
|
327 |
+
async function setAllTLeaderBoardFalse() {
|
328 |
+
let leaderboard = await Leaderboard.find({ Round: 2 });
|
329 |
+
for (i in leaderboard) {
|
330 |
+
let board = leaderboard[i];
|
331 |
+
board.Enabled = false;
|
332 |
+
await board.save();
|
333 |
+
}
|
334 |
+
}
|
335 |
+
async function setQues2() {
|
336 |
+
let board = await Leaderboard.find({ Round: 4 });
|
337 |
+
|
338 |
+
for (let i in board) {
|
339 |
+
|
340 |
+
let questions=board[i].Questions.Unsolved;
|
341 |
+
let count=1;
|
342 |
+
for(let j in questions){
|
343 |
+
let q=questions[j];
|
344 |
+
let ques=await QuestionsModel.findOne({_id:q});
|
345 |
+
let t1q=new UserQuestionModel({
|
346 |
+
QuestionID:ques._id,
|
347 |
+
QuestionNumber:ques.QuestionNumber,
|
348 |
+
Question:ques.Question,
|
349 |
+
Description:ques.Description,
|
350 |
+
HintAddress:count,
|
351 |
+
Answer:ques.Answer,
|
352 |
+
Points:ques.Points,
|
353 |
+
Round:ques.Round,
|
354 |
+
TeamID:board[i].TeamID,
|
355 |
+
Hint:ques.Hint,
|
356 |
+
num:count
|
357 |
+
})
|
358 |
+
|
359 |
+
await t1q.save();
|
360 |
+
}
|
361 |
+
}
|
362 |
+
}
|
363 |
+
async function setTopUser()
|
364 |
+
{
|
365 |
+
let room=await Room.findOne({Round:3});
|
366 |
+
let TopTeam=new CollaborativeLeaderboardModel({
|
367 |
+
TeamID1:"5f9f1f1b1c9d440000b0b0a1",
|
368 |
+
TeamID2:"5f9f1f1b1c9d440000b0b0a2",
|
369 |
+
Questions:{
|
370 |
+
Solved:[],
|
371 |
+
Unsolved:[]
|
372 |
+
},
|
373 |
+
Points:241543903,
|
374 |
+
TeamName:"david",
|
375 |
+
Round:3,
|
376 |
+
RoomID:room._id
|
377 |
+
|
378 |
+
})
|
379 |
+
TopTeam.save();
|
380 |
+
}
|
controllers/RoundThreeController.js
ADDED
@@ -0,0 +1,194 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
const asyncHandler = require("express-async-handler");
|
2 |
+
const Room = require("../models/RoomModel");
|
3 |
+
const Question = require("../models/QuestionsModel");
|
4 |
+
const Leaderboard = require("../models/LeaderboardModel");
|
5 |
+
const collaborativeLeaderboard = require("../models/CollaborativeLeaderboardModel");
|
6 |
+
const Round = require("../models/RoundsModel");
|
7 |
+
const { getRoomLeaderBoardR1R2 } = require("../helpers/LeaderBoardPreFetch");
|
8 |
+
const Team = require("../models/TeamModel");
|
9 |
+
const User = require("../models/UserModel");
|
10 |
+
const UserQuestionModel = require("../models/UserQuestionModel");
|
11 |
+
|
12 |
+
|
13 |
+
|
14 |
+
|
15 |
+
//Random array retunrer
|
16 |
+
const randomUniqueArray = (n, array) => {
|
17 |
+
var arr = [];
|
18 |
+
while (arr.length < n) {
|
19 |
+
var r = Math.floor(Math.random() * array.length) + 0;
|
20 |
+
if (arr.indexOf(array[r]) === -1) arr.push(array[r]);
|
21 |
+
}
|
22 |
+
return arr;
|
23 |
+
}
|
24 |
+
|
25 |
+
|
26 |
+
|
27 |
+
|
28 |
+
|
29 |
+
|
30 |
+
//MULTI BIG FUNCTION :: INITIAL ASSIGNMENT
|
31 |
+
module.exports.roundThreeAssign = asyncHandler(async (req, res) => {
|
32 |
+
try {
|
33 |
+
let date = new Date();
|
34 |
+
let roundNumber = 3;
|
35 |
+
let round = await Round.findOne({ Round: 3 });
|
36 |
+
|
37 |
+
if (!round.Enabled) {
|
38 |
+
res.send("Round is disabled");
|
39 |
+
return;
|
40 |
+
}
|
41 |
+
if (date >= round.StartTime && date <= round.EndTime) {
|
42 |
+
|
43 |
+
let board = await collaborativeLeaderboard.findOne({
|
44 |
+
$or: [{ TeamID1: req.team._id }, { TeamID2: req.team._id }]
|
45 |
+
});
|
46 |
+
|
47 |
+
if (board === null) {
|
48 |
+
res.send("You are not selected for this round");
|
49 |
+
return;
|
50 |
+
}
|
51 |
+
if (!board.Enabled) {
|
52 |
+
res.send("This round is no longer available");
|
53 |
+
return;
|
54 |
+
}
|
55 |
+
|
56 |
+
//ASSIGNING QUESTIONS
|
57 |
+
|
58 |
+
let temp = await Round.findOne({ Round: roundNumber });
|
59 |
+
let roundQs = temp.Questions
|
60 |
+
|
61 |
+
if (board.Questions.Unsolved.length === 0) {
|
62 |
+
let room = await Room.findOne({ _id: board.RoomID })
|
63 |
+
let questions = room.Questions;
|
64 |
+
board.Questions.Unsolved = randomUniqueArray(roundQs, questions);
|
65 |
+
console.log(board.Questions.Unsolved)
|
66 |
+
//ASSIGNING HINTADDRESS FROM 0 TO 12
|
67 |
+
arr = []
|
68 |
+
let countr = 1;
|
69 |
+
for (let i = 0; i < board.Questions.Unsolved.length; i++) {
|
70 |
+
var r = Math.floor(Math.random() * 5) + 1;
|
71 |
+
|
72 |
+
if (arr.indexOf(r) === -1) {
|
73 |
+
arr.push(r);
|
74 |
+
let question = await Question.findOne({ _id: board.Questions.Unsolved[i] });
|
75 |
+
let UserQuestion = await UserQuestionModel.findOne({ QuestionNumber: question.QuestionNumber, TeamID: board.TeamID1 });
|
76 |
+
|
77 |
+
if (UserQuestion === null) {
|
78 |
+
|
79 |
+
UserQuestion = new UserQuestionModel({
|
80 |
+
TeamID: board.TeamID1,
|
81 |
+
QuestionID: question._id,
|
82 |
+
QuestionNumber: question.QuestionNumber,
|
83 |
+
Question: question.Question,
|
84 |
+
Description: question.Description,
|
85 |
+
Answer: question.Answer,
|
86 |
+
Hint: question.Hint,
|
87 |
+
HintAddress: r,
|
88 |
+
Round: question.Round,
|
89 |
+
Points: question.Points,
|
90 |
+
RoomID: question.RoomID,
|
91 |
+
num: countr++
|
92 |
+
})
|
93 |
+
|
94 |
+
await UserQuestion.save();
|
95 |
+
|
96 |
+
}
|
97 |
+
|
98 |
+
question = await Question.findOne({ _id: board.Questions.Unsolved[i] });
|
99 |
+
UserQuestion = await UserQuestionModel.findOne({ QuestionNumber: question.QuestionNumber, TeamID: board.TeamID2 });
|
100 |
+
|
101 |
+
if (UserQuestion === null) {
|
102 |
+
|
103 |
+
UserQuestion = new UserQuestionModel({
|
104 |
+
TeamID: board.TeamID1,
|
105 |
+
QuestionID: question._id,
|
106 |
+
QuestionNumber: question.QuestionNumber,
|
107 |
+
Question: question.Question,
|
108 |
+
Description: question.Description,
|
109 |
+
Answer: question.Answer,
|
110 |
+
Hint: question.Hint,
|
111 |
+
HintAddress: r,
|
112 |
+
Round: question.Round,
|
113 |
+
Points: question.Points,
|
114 |
+
RoomID: question.RoomID,
|
115 |
+
num: countr++
|
116 |
+
})
|
117 |
+
|
118 |
+
await UserQuestion.save();
|
119 |
+
|
120 |
+
}
|
121 |
+
|
122 |
+
}
|
123 |
+
else {
|
124 |
+
|
125 |
+
i--;
|
126 |
+
}
|
127 |
+
}
|
128 |
+
await board.save();
|
129 |
+
|
130 |
+
}
|
131 |
+
|
132 |
+
//SENDING QUESTIONS AS RESPONSE
|
133 |
+
|
134 |
+
let UnSqsnsID = board.Questions.Unsolved;
|
135 |
+
let SqsnsID = board.Questions.Solved;
|
136 |
+
let qsns = { Solved: [], Unsolved: [] }
|
137 |
+
|
138 |
+
//for unsolved
|
139 |
+
for (let i in UnSqsnsID) {
|
140 |
+
|
141 |
+
let question = await UserQuestionModel.findOne({ QuestionID: UnSqsnsID[i], TeamID: req.team._id })
|
142 |
+
if (question) {
|
143 |
+
let obj = {
|
144 |
+
QuestionNumber: question.QuestionNumber,
|
145 |
+
Question: question.Question,
|
146 |
+
Description: question.Description,
|
147 |
+
HintAddress: question.HintAddress,
|
148 |
+
Points: question.Points,
|
149 |
+
num: question.num
|
150 |
+
}
|
151 |
+
qsns.Unsolved.push(obj);
|
152 |
+
}
|
153 |
+
}
|
154 |
+
|
155 |
+
//for solved
|
156 |
+
for (let i in SqsnsID) {
|
157 |
+
|
158 |
+
let question = await UserQuestionModel.findOne({ QuestionID: SqsnsID[i], TeamID: req.team._id })
|
159 |
+
if (question) {
|
160 |
+
let obj = {
|
161 |
+
QuestionNumber: question.QuestionNumber,
|
162 |
+
Question: question.Question,
|
163 |
+
Description: question.Description,
|
164 |
+
HintAddress: question.HintAddress,
|
165 |
+
Points: question.Points,
|
166 |
+
num: question.num
|
167 |
+
}
|
168 |
+
qsns.Solved.push(obj);
|
169 |
+
}
|
170 |
+
}
|
171 |
+
res.json({
|
172 |
+
Questions: qsns,
|
173 |
+
ServerTime: new Date(),
|
174 |
+
RoundEnd: round.EndTime,
|
175 |
+
status: true
|
176 |
+
})
|
177 |
+
|
178 |
+
}
|
179 |
+
else {
|
180 |
+
//router should be closed
|
181 |
+
res.send("Round is closed");
|
182 |
+
}
|
183 |
+
|
184 |
+
|
185 |
+
}
|
186 |
+
catch (error) {
|
187 |
+
console.log(error)
|
188 |
+
res.status(500).json({
|
189 |
+
message: error.message
|
190 |
+
})
|
191 |
+
}
|
192 |
+
})
|
193 |
+
|
194 |
+
|
controllers/RoundTwoController.js
ADDED
@@ -0,0 +1,263 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
const asyncHandler = require("express-async-handler");
|
2 |
+
const Room = require("../models/RoomModel");
|
3 |
+
const Question = require("../models/QuestionsModel");
|
4 |
+
const Leaderboard = require("../models/LeaderboardModel");
|
5 |
+
const Round = require("../models/RoundsModel");
|
6 |
+
const { getRoomLeaderBoardR1R2 } = require("../helpers/LeaderBoardPreFetch");
|
7 |
+
const Team = require("../models/TeamModel");
|
8 |
+
const User = require("../models/UserModel");
|
9 |
+
const PreviousRoomModel = require("../models/PreviousRoomModel");
|
10 |
+
const UserQuestionModel = require("../models/UserQuestionModel");
|
11 |
+
|
12 |
+
|
13 |
+
//Static variable
|
14 |
+
let count = 0;
|
15 |
+
|
16 |
+
|
17 |
+
//Random array retunrer
|
18 |
+
const randomUniqueArray = (n, array) => {
|
19 |
+
var arr = [];
|
20 |
+
while (arr.length < n) {
|
21 |
+
var r = Math.floor(Math.random() * array.length) + 0;
|
22 |
+
if (arr.indexOf(array[r]) === -1) arr.push(array[r]);
|
23 |
+
}
|
24 |
+
return arr;
|
25 |
+
}
|
26 |
+
|
27 |
+
|
28 |
+
|
29 |
+
|
30 |
+
|
31 |
+
|
32 |
+
//MULTI BIG FUNCTION :: INITIAL ASSIGNMENT
|
33 |
+
module.exports.roundTwoAssign = asyncHandler(async (req, res) => {
|
34 |
+
try {
|
35 |
+
let date = new Date();
|
36 |
+
let roundNumber = 2;
|
37 |
+
let round = await Round.findOne({ Round: 2 });
|
38 |
+
if (!round.Enabled) {
|
39 |
+
res.send("Round is disabled");
|
40 |
+
return;
|
41 |
+
}
|
42 |
+
if (date >= round.StartTime && date <= round.EndTime) {
|
43 |
+
//Router Should be open
|
44 |
+
let leaderboardR1 = await getRoomLeaderBoardR1R2(req.team, 1)
|
45 |
+
//here 1 represents round is 1
|
46 |
+
// console.log(leaderboardR1)
|
47 |
+
if (checkTeamIdInTop5(leaderboardR1, req.team._id)) {
|
48 |
+
//if team is in top 5 teams of Round 1
|
49 |
+
//set leaderboard of team
|
50 |
+
let board = await Leaderboard.findOne({ TeamID: req.team._id, Round: roundNumber });
|
51 |
+
let board1 = await Leaderboard.findOne({ TeamID: req.team._id, Round: 1 });
|
52 |
+
if (board === null) {
|
53 |
+
board = new Leaderboard({
|
54 |
+
TeamID: req.team._id,
|
55 |
+
TeamName: req.team.TeamName,
|
56 |
+
Points: board1.Points,
|
57 |
+
Questions: {
|
58 |
+
Solved: [],
|
59 |
+
Unsolved: []
|
60 |
+
},
|
61 |
+
Round: 2
|
62 |
+
});
|
63 |
+
}
|
64 |
+
else if (!board.Enabled) {
|
65 |
+
res.send("This round is no longer available");
|
66 |
+
return;
|
67 |
+
}
|
68 |
+
//ASSIGNING ROOMID
|
69 |
+
let rooms = await Room.find({ Round: roundNumber });
|
70 |
+
|
71 |
+
if (board.RoomID === undefined) {
|
72 |
+
board.RoomID = rooms[count]._id;
|
73 |
+
let team = await Team.findOne({ _id: req.team._id });
|
74 |
+
team.RoomID = rooms[count]._id;
|
75 |
+
let PreviousRoom = new PreviousRoomModel({
|
76 |
+
TeamID: req.team._id,
|
77 |
+
RoomID: rooms[count]._id,
|
78 |
+
Round: roundNumber
|
79 |
+
});
|
80 |
+
await all_member_room_assign(req.team, rooms[count]._id);
|
81 |
+
await PreviousRoom.save();
|
82 |
+
await team.save();
|
83 |
+
count++;
|
84 |
+
}
|
85 |
+
if (count === rooms.length) {
|
86 |
+
count = 0;
|
87 |
+
}
|
88 |
+
|
89 |
+
//ASSIGNING QUESTIONS
|
90 |
+
//ASSIGNING QUESTIONS
|
91 |
+
|
92 |
+
let temp = await Round.findOne({ Round: roundNumber });
|
93 |
+
let roundQs = temp.Questions
|
94 |
+
|
95 |
+
if (board.Questions.Unsolved.length === 0) {
|
96 |
+
let room = await Room.findOne({ _id: board.RoomID })
|
97 |
+
let questions = room.Questions;
|
98 |
+
board.Questions.Unsolved = randomUniqueArray(roundQs, questions);
|
99 |
+
|
100 |
+
//ASSIGNING HINTADDRESS FROM 0 TO 12
|
101 |
+
arr = []
|
102 |
+
let countr = 1;
|
103 |
+
for (let i = 0; i < board.Questions.Unsolved.length; i++) {
|
104 |
+
var r = Math.floor(Math.random() * 8) + 1;
|
105 |
+
if (arr.indexOf(r) === -1) {
|
106 |
+
arr.push(r);
|
107 |
+
let question = await Question.findOne({ _id: board.Questions.Unsolved[i] });
|
108 |
+
let UserQuestion = await UserQuestionModel.findOne({ QuestionNumber: question.QuestionNumber, TeamID: req.team._id });
|
109 |
+
|
110 |
+
if (UserQuestion === null) {
|
111 |
+
|
112 |
+
UserQuestion = new UserQuestionModel({
|
113 |
+
TeamID: req.team._id,
|
114 |
+
QuestionID: question._id,
|
115 |
+
QuestionNumber: question.QuestionNumber,
|
116 |
+
Question: question.Question,
|
117 |
+
Description: question.Description,
|
118 |
+
Answer: question.Answer,
|
119 |
+
Hint: question.Hint,
|
120 |
+
HintAddress: r,
|
121 |
+
Round: question.Round,
|
122 |
+
Points: question.Points,
|
123 |
+
RoomID: question.RoomID,
|
124 |
+
num: countr++
|
125 |
+
})
|
126 |
+
// console.log(countr)
|
127 |
+
await UserQuestion.save();
|
128 |
+
}
|
129 |
+
|
130 |
+
|
131 |
+
}
|
132 |
+
else {
|
133 |
+
|
134 |
+
i--;
|
135 |
+
}
|
136 |
+
}
|
137 |
+
await board.save();
|
138 |
+
|
139 |
+
}
|
140 |
+
|
141 |
+
|
142 |
+
|
143 |
+
|
144 |
+
|
145 |
+
|
146 |
+
|
147 |
+
//SENDING QUESTIONS AS RESPONSE
|
148 |
+
|
149 |
+
let UnSqsnsID = board.Questions.Unsolved;
|
150 |
+
let SqsnsID = board.Questions.Solved;
|
151 |
+
let qsns = { Solved: [], Unsolved: [] }
|
152 |
+
|
153 |
+
//for unsolved
|
154 |
+
for (let i in UnSqsnsID) {
|
155 |
+
|
156 |
+
let question = await UserQuestionModel.findOne({ QuestionID: UnSqsnsID[i], TeamID: req.team._id })
|
157 |
+
if (question) {
|
158 |
+
let obj = {
|
159 |
+
QuestionNumber: question.QuestionNumber,
|
160 |
+
Question: question.Question,
|
161 |
+
Description: question.Description,
|
162 |
+
HintAddress: question.HintAddress,
|
163 |
+
Points: question.Points,
|
164 |
+
num: question.num
|
165 |
+
}
|
166 |
+
qsns.Unsolved.push(obj);
|
167 |
+
}
|
168 |
+
}
|
169 |
+
|
170 |
+
//for solved
|
171 |
+
for (let i in SqsnsID) {
|
172 |
+
|
173 |
+
let question = await UserQuestionModel.findOne({ QuestionID: SqsnsID[i], TeamID: req.team._id })
|
174 |
+
if (question) {
|
175 |
+
let obj = {
|
176 |
+
QuestionNumber: question.QuestionNumber,
|
177 |
+
Question: question.Question,
|
178 |
+
Description: question.Description,
|
179 |
+
HintAddress: question.HintAddress,
|
180 |
+
Points: question.Points,
|
181 |
+
num: question.num
|
182 |
+
}
|
183 |
+
qsns.Solved.push(obj);
|
184 |
+
}
|
185 |
+
}
|
186 |
+
res.json({
|
187 |
+
Questions: qsns,
|
188 |
+
ServerTime: new Date(),
|
189 |
+
RoundEnd: round.EndTime,
|
190 |
+
status: true
|
191 |
+
})
|
192 |
+
}
|
193 |
+
else {
|
194 |
+
res.send("You are not qualified for this round");
|
195 |
+
}
|
196 |
+
|
197 |
+
}
|
198 |
+
else {
|
199 |
+
//router should be closed
|
200 |
+
res.send("Round is closed");
|
201 |
+
}
|
202 |
+
|
203 |
+
|
204 |
+
|
205 |
+
|
206 |
+
|
207 |
+
|
208 |
+
|
209 |
+
|
210 |
+
|
211 |
+
|
212 |
+
|
213 |
+
|
214 |
+
|
215 |
+
|
216 |
+
|
217 |
+
|
218 |
+
|
219 |
+
|
220 |
+
|
221 |
+
|
222 |
+
|
223 |
+
|
224 |
+
|
225 |
+
}
|
226 |
+
catch (error) {
|
227 |
+
console.log(error)
|
228 |
+
res.status(500).json({
|
229 |
+
message: error.message
|
230 |
+
})
|
231 |
+
}
|
232 |
+
})
|
233 |
+
|
234 |
+
|
235 |
+
function checkTeamIdInTop5(leaderboard, teamId) {
|
236 |
+
// Get the top 5 array elements
|
237 |
+
// console.log(leaderboard);
|
238 |
+
const top5 = leaderboard.slice(0, 8);
|
239 |
+
// Check if the teamId exists in the top 5
|
240 |
+
for (let i = 0; i < top5.length; i++) {
|
241 |
+
if(top5[i].TeamID===undefined)
|
242 |
+
{
|
243 |
+
return false;
|
244 |
+
|
245 |
+
}
|
246 |
+
if (top5[i].TeamID.toString() == teamId.toString()) {
|
247 |
+
return true;
|
248 |
+
}
|
249 |
+
}
|
250 |
+
|
251 |
+
return false;
|
252 |
+
}
|
253 |
+
|
254 |
+
async function all_member_room_assign(team, RoomID) {
|
255 |
+
let members = team.Members;
|
256 |
+
for (let i in members) {
|
257 |
+
let member = await User.findOne({ _id: members[i] });
|
258 |
+
if (member) {
|
259 |
+
member.RoomID = RoomID;
|
260 |
+
await member.save();
|
261 |
+
}
|
262 |
+
}
|
263 |
+
}
|
controllers/UserLoginController.js
ADDED
@@ -0,0 +1,80 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
const user = require("../models/UserModel");
|
2 |
+
const account = require("../models/AuthenticationModel");
|
3 |
+
const md5 = require("md5");
|
4 |
+
const { v4: uuidv4 } = require('uuid');
|
5 |
+
const asyncHandeler = require("express-async-handler");
|
6 |
+
const { response } = require("express");
|
7 |
+
const TeamModel = require("../models/TeamModel");
|
8 |
+
const couponsModel = require("../models/CouponModel");
|
9 |
+
const LeaderboardModel = require("../models/LeaderboardModel");
|
10 |
+
const { connectTeamSocket } = require("../sockets/UserSockets");
|
11 |
+
const { updateLeaderBoard } = require("../sockets/LeaderBoardUpdated");
|
12 |
+
|
13 |
+
exports.login_get = asyncHandeler(async (req, res) => {
|
14 |
+
console.log("login user detected");
|
15 |
+
res.send("this is a handelled login route");
|
16 |
+
});
|
17 |
+
|
18 |
+
exports.login_post = asyncHandeler(async (req, res) => {
|
19 |
+
var login = require("../middlewares/UserLoginMiddleware");
|
20 |
+
//console.log(req.body)
|
21 |
+
var resp = await login.attempt(req.body.username, req.body.password);
|
22 |
+
if (resp != false) {
|
23 |
+
var session_id = uuidv4();
|
24 |
+
var acc = new account({
|
25 |
+
UserID: resp._id,
|
26 |
+
SessionID: session_id,
|
27 |
+
TeamId: resp.TeamID,
|
28 |
+
Status: 1
|
29 |
+
});
|
30 |
+
|
31 |
+
await account.findOneAndDelete({ UserID: resp._id });
|
32 |
+
await acc.save();
|
33 |
+
let users = await user.findOne({ _id: resp._id })
|
34 |
+
//console.log(req.body.code)
|
35 |
+
if(req.body.code)
|
36 |
+
{
|
37 |
+
// console.log(await couponsModel.exists({ Code: req.body.code }))
|
38 |
+
try {
|
39 |
+
if(await couponsModel.exists({Coupon:req.body.code}))
|
40 |
+
{
|
41 |
+
var teamLeaderboard=await LeaderboardModel.findOne({ TeamID: resp.TeamID,Round:0 });
|
42 |
+
if(teamLeaderboard.Points<=5)
|
43 |
+
{
|
44 |
+
teamLeaderboard.Points+=5;
|
45 |
+
await couponsModel.findOneAndDelete({Coupon:req.body.code});
|
46 |
+
await teamLeaderboard.save();
|
47 |
+
res.cookie('SessionID', session_id, {
|
48 |
+
sameSite: 'None',
|
49 |
+
httponly: true, secure: true,// This should be used when serving over HTTPS
|
50 |
+
});
|
51 |
+
updateLeaderBoard(req)
|
52 |
+
res.send("You have been awarded 5 points for using a code");
|
53 |
+
}
|
54 |
+
else
|
55 |
+
{
|
56 |
+
res.send("You have already exceeded the maximum points for using a code");
|
57 |
+
}
|
58 |
+
}
|
59 |
+
else{
|
60 |
+
res.send("Invalid Hidden Code");
|
61 |
+
}
|
62 |
+
} catch (error) {
|
63 |
+
res.send("Something went wrong")
|
64 |
+
console.log(error)
|
65 |
+
}
|
66 |
+
}
|
67 |
+
else
|
68 |
+
{
|
69 |
+
|
70 |
+
res.cookie('SessionID', session_id, {
|
71 |
+
sameSite: 'None',
|
72 |
+
httponly: true, secure: true,// This should be used when serving over HTTPS
|
73 |
+
});
|
74 |
+
res.send("Login Successful");
|
75 |
+
}
|
76 |
+
|
77 |
+
}
|
78 |
+
else
|
79 |
+
res.send("Invalid Credentials");
|
80 |
+
});
|
controllers/UserRegistrationFunctions.js
ADDED
@@ -0,0 +1,312 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
const express = require('express')
|
2 |
+
const crypto = require('crypto')
|
3 |
+
const mail = require('../config/MailConfig.js')
|
4 |
+
const Team = require('../models/TeamModel.js')
|
5 |
+
const User = require('../models/UserModel.js')
|
6 |
+
const LeaderBoard = require('../models/LeaderboardModel.js')
|
7 |
+
const Coupon = require('../models/CouponModel.js')
|
8 |
+
const validator = require('../middlewares/UserValidator.js')
|
9 |
+
const dotenv = require("dotenv");
|
10 |
+
dotenv.config({ path: "./config.env" });
|
11 |
+
var successTeam, successUser, successLeaderBoard;
|
12 |
+
|
13 |
+
|
14 |
+
|
15 |
+
|
16 |
+
|
17 |
+
|
18 |
+
module.exports.createTeam = async function createTeam(req, res) {
|
19 |
+
try {
|
20 |
+
let data = (req.body)
|
21 |
+
|
22 |
+
let TeamName = data.TeamName
|
23 |
+
let Code = crypto.randomBytes(4).toString("hex");
|
24 |
+
|
25 |
+
let teamobj = {
|
26 |
+
TeamName: TeamName.toLowerCase(),
|
27 |
+
Code: Code,
|
28 |
+
Password: data.Password
|
29 |
+
}
|
30 |
+
let team = await Team.create(teamobj);
|
31 |
+
successTeam = team;
|
32 |
+
console.log("Team Created")
|
33 |
+
let url =process.env.FRONTEND+ `/register/:${Code}`
|
34 |
+
|
35 |
+
|
36 |
+
let leader = {
|
37 |
+
Name: data.Name,
|
38 |
+
Email: data.Email.toLowerCase(),
|
39 |
+
Password: data.Password,
|
40 |
+
RollNumber: data.RollNumber,
|
41 |
+
PhoneNumber: data.PhoneNumber,
|
42 |
+
Branch: data.Branch,
|
43 |
+
Year: data.Year,
|
44 |
+
DiscordID: data.DiscordId,
|
45 |
+
Role: "Leader",
|
46 |
+
Password: data.Password,
|
47 |
+
TeamID: team._id
|
48 |
+
}
|
49 |
+
var err = await validator.validateUser(leader)
|
50 |
+
if (err) {
|
51 |
+
console.log("User Not Validated")
|
52 |
+
throw new Error(err)
|
53 |
+
}
|
54 |
+
else {
|
55 |
+
console.log("User Validated")
|
56 |
+
|
57 |
+
console.log(leader)
|
58 |
+
let user = await User.create(leader);
|
59 |
+
successUser = user;
|
60 |
+
let leaderboard = new LeaderBoard({
|
61 |
+
TeamID: team._id,
|
62 |
+
TeamName: TeamName.toLowerCase(),
|
63 |
+
Points: 0
|
64 |
+
})
|
65 |
+
await LeaderBoard.create(leaderboard);
|
66 |
+
successLeaderBoard = leaderboard;
|
67 |
+
var qresp = Team.findByIdAndUpdate(team._id, { $push: { Members: user._id } }).exec();
|
68 |
+
mail.sendMailLeader(data.Email,"Successfully Created team for Raptus!" ,TeamName, Code,data.Name);
|
69 |
+
res.json({
|
70 |
+
message: "Team Registered Successfully",
|
71 |
+
status: true,
|
72 |
+
Code: Code,
|
73 |
+
URL: url,
|
74 |
+
TeamName: TeamName,
|
75 |
+
Resp: qresp
|
76 |
+
});
|
77 |
+
}
|
78 |
+
|
79 |
+
} catch (error) {
|
80 |
+
if (successTeam)
|
81 |
+
Team.findByIdAndDelete(successTeam._id).exec();
|
82 |
+
if (successUser)
|
83 |
+
User.findByIdAndDelete(successUser._id).exec();
|
84 |
+
if (successLeaderBoard)
|
85 |
+
LeaderBoard.findByIdAndDelete(successLeaderBoard._id).exec();
|
86 |
+
if (error.code === 11000) {
|
87 |
+
var message = error;
|
88 |
+
if (error.keyValue.TeamName)
|
89 |
+
message = "Team Name already exists"
|
90 |
+
if (error.keyValue.Code)
|
91 |
+
message = "Team Code already exists"
|
92 |
+
if (error.keyValue.Email)
|
93 |
+
message = "Email already exists"
|
94 |
+
if (error.keyValue.RollNumber)
|
95 |
+
message = "Roll Number already exists"
|
96 |
+
if (error.keyValue.PhoneNumber)
|
97 |
+
message = "Phone Number already exists"
|
98 |
+
if (error.keyValue.DiscordID)
|
99 |
+
message = "Discord Id already exists"
|
100 |
+
|
101 |
+
res.json({
|
102 |
+
message: message
|
103 |
+
})
|
104 |
+
return
|
105 |
+
}
|
106 |
+
// console.log(error)
|
107 |
+
else
|
108 |
+
res.json({
|
109 |
+
status: false,
|
110 |
+
message: error.message
|
111 |
+
})
|
112 |
+
}
|
113 |
+
}
|
114 |
+
|
115 |
+
|
116 |
+
|
117 |
+
|
118 |
+
|
119 |
+
|
120 |
+
|
121 |
+
module.exports.verifyTeam = async function verifyTeam(req, res) {
|
122 |
+
try {
|
123 |
+
let data = req.body
|
124 |
+
let team = await Team.findOne({ Code: data.Code })
|
125 |
+
|
126 |
+
if (team) {
|
127 |
+
if (team.Members.length <= 3) {
|
128 |
+
res.json({
|
129 |
+
status: true,
|
130 |
+
url: process.env.FRONTEND+`/register/:${team.Code}`,
|
131 |
+
TeamName: team.TeamName,
|
132 |
+
Code: data.Code
|
133 |
+
})
|
134 |
+
}
|
135 |
+
else if (team.Members.length == 4) {
|
136 |
+
res.json({
|
137 |
+
status: false,
|
138 |
+
message: "Team is Full !!"
|
139 |
+
});
|
140 |
+
}
|
141 |
+
}
|
142 |
+
else {
|
143 |
+
res.json({
|
144 |
+
status: false,
|
145 |
+
message: "Invalid Team Code"
|
146 |
+
});
|
147 |
+
}
|
148 |
+
} catch (error) {
|
149 |
+
res.json({
|
150 |
+
status: false,
|
151 |
+
message: error.message
|
152 |
+
})
|
153 |
+
}
|
154 |
+
}
|
155 |
+
|
156 |
+
|
157 |
+
|
158 |
+
|
159 |
+
|
160 |
+
|
161 |
+
|
162 |
+
|
163 |
+
|
164 |
+
|
165 |
+
|
166 |
+
|
167 |
+
module.exports.info = async function info(req, res) {
|
168 |
+
try {
|
169 |
+
let data = req.body;
|
170 |
+
let team = await Team.findOne({ Code: data.code })
|
171 |
+
|
172 |
+
if (team) {
|
173 |
+
if (team.Members.length <= 3) {
|
174 |
+
res.json({
|
175 |
+
status: true,
|
176 |
+
url: process.env.FRONTEND+`/register/:${team.Code}`,
|
177 |
+
TeamName: team.TeamName,
|
178 |
+
Code: data.Code
|
179 |
+
})
|
180 |
+
}
|
181 |
+
else if (team.Members.length == 4) {
|
182 |
+
res.json({
|
183 |
+
status: false,
|
184 |
+
message: "Team is Full !!"
|
185 |
+
});
|
186 |
+
}
|
187 |
+
}
|
188 |
+
else {
|
189 |
+
res.json({
|
190 |
+
status: false,
|
191 |
+
message: "Invalid URL"
|
192 |
+
});
|
193 |
+
}
|
194 |
+
} catch (error) {
|
195 |
+
res.json({
|
196 |
+
status: false,
|
197 |
+
message: error.message
|
198 |
+
})
|
199 |
+
}
|
200 |
+
}
|
201 |
+
|
202 |
+
|
203 |
+
|
204 |
+
|
205 |
+
|
206 |
+
|
207 |
+
|
208 |
+
|
209 |
+
|
210 |
+
|
211 |
+
|
212 |
+
|
213 |
+
module.exports.joinTeam = async function joinTeam(req, res) {
|
214 |
+
try {
|
215 |
+
let data = (req.body)
|
216 |
+
let Code = req.params.id.substring(1);
|
217 |
+
let team = await Team.findOne({ Code: Code })
|
218 |
+
|
219 |
+
let member = {
|
220 |
+
Name: data.Name,
|
221 |
+
Email: data.Email,
|
222 |
+
Password: team.Password,
|
223 |
+
RollNumber: data.RollNumber,
|
224 |
+
PhoneNumber: data.PhoneNumber,
|
225 |
+
Branch: data.Branch,
|
226 |
+
Year: data.Year,
|
227 |
+
DiscordID: data.DiscordId,
|
228 |
+
Role: "Member",
|
229 |
+
Password: team.Password,
|
230 |
+
TeamID: team._id
|
231 |
+
}
|
232 |
+
var err = await validator.validateUser(member)
|
233 |
+
//console.log(err)
|
234 |
+
if (err) {
|
235 |
+
console.log("User Not Validated")
|
236 |
+
throw new Error(err)
|
237 |
+
}
|
238 |
+
else {
|
239 |
+
console.log("User Validated")
|
240 |
+
|
241 |
+
|
242 |
+
let user;
|
243 |
+
if (team.Members.length <= 3) {
|
244 |
+
user = await User.create(member);
|
245 |
+
successUser = user;
|
246 |
+
team.Members.push(user._id)
|
247 |
+
await team.save()
|
248 |
+
console.log(team)
|
249 |
+
console.log(user)
|
250 |
+
mail.sendMailMember(data.Email, "Successfully Joined team for Raptus!", team.TeamName, team.Code, data.Name);
|
251 |
+
}
|
252 |
+
else {
|
253 |
+
res.json({
|
254 |
+
status: false,
|
255 |
+
message: "Team is already full !!",
|
256 |
+
});
|
257 |
+
}
|
258 |
+
|
259 |
+
res.json({
|
260 |
+
status: true,
|
261 |
+
message: "Member registered successfully",
|
262 |
+
TeamName: team.TeamName,
|
263 |
+
});}
|
264 |
+
|
265 |
+
} catch (error) {
|
266 |
+
|
267 |
+
if (successUser)
|
268 |
+
User.findByIdAndDelete(successUser._id).exec();
|
269 |
+
|
270 |
+
if (error.code === 11000) {
|
271 |
+
var message = error;
|
272 |
+
if (error.keyValue.Email)
|
273 |
+
message = "Email already exists"
|
274 |
+
if (error.keyValue.RollNumber)
|
275 |
+
message = "Roll Number already exists"
|
276 |
+
if (error.keyValue.PhoneNumber)
|
277 |
+
message = "Phone Number already exists"
|
278 |
+
if (error.keyValue.DiscordID)
|
279 |
+
message = "Discord Id already exists"
|
280 |
+
|
281 |
+
res.json({
|
282 |
+
status: false,
|
283 |
+
message: message
|
284 |
+
})
|
285 |
+
return
|
286 |
+
}
|
287 |
+
// console.log(error)
|
288 |
+
else
|
289 |
+
res.json({
|
290 |
+
status: false,
|
291 |
+
message: error.message
|
292 |
+
})
|
293 |
+
}
|
294 |
+
}
|
295 |
+
|
296 |
+
|
297 |
+
|
298 |
+
module.exports.coupon = async function coupon(req, res) {
|
299 |
+
try {
|
300 |
+
let couponCode = crypto.randomBytes(6).toString("hex");
|
301 |
+
res.json({
|
302 |
+
status: true,
|
303 |
+
Coupon: couponCode
|
304 |
+
});
|
305 |
+
let couponCreated = await Coupon.create({ Coupon: couponCode })
|
306 |
+
} catch (error) {
|
307 |
+
res.status(500).json({
|
308 |
+
message: error.message
|
309 |
+
})
|
310 |
+
}
|
311 |
+
}
|
312 |
+
|
controllers/VerificationController.js
ADDED
@@ -0,0 +1,209 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
const asyncHandeler = require("express-async-handler");
|
2 |
+
const Leaderboard = require("../models/LeaderboardModel");
|
3 |
+
const Round = require("../models/RoundsModel");
|
4 |
+
const CollaborativeLeaderboardModel = require("../models/CollaborativeLeaderboardModel");
|
5 |
+
const {
|
6 |
+
getFinalLeaderboard,
|
7 |
+
getRound4Leaderboard,
|
8 |
+
getRound3Leaderboard,
|
9 |
+
getRoundLeaderboard,
|
10 |
+
} = require("../helpers/LeaderBoardPreFetch");
|
11 |
+
const RoomModel = require("../models/RoomModel");
|
12 |
+
const account = require("../models/AuthenticationModel");
|
13 |
+
const UserModel = require("../models/UserModel");
|
14 |
+
|
15 |
+
exports.getVerifyResponse = asyncHandeler(async (req, res) => {
|
16 |
+
try {
|
17 |
+
let rounds = await Round.find();
|
18 |
+
let currentRound = 0;
|
19 |
+
let nextRound = 0;
|
20 |
+
let date = new Date();
|
21 |
+
for (i in rounds) {
|
22 |
+
if (date <= rounds[i].EndTime && date >= rounds[i].StartTime) {
|
23 |
+
currentRound = rounds[i].Round;
|
24 |
+
break;
|
25 |
+
}
|
26 |
+
}
|
27 |
+
for (i in rounds) {
|
28 |
+
if (date <= rounds[i].StartTime) {
|
29 |
+
nextRound = rounds[i].Round;
|
30 |
+
break;
|
31 |
+
}
|
32 |
+
}
|
33 |
+
let response = {
|
34 |
+
nextRound: nextRound,
|
35 |
+
currentRound: currentRound,
|
36 |
+
team: req.team.TeamName,
|
37 |
+
time: date,
|
38 |
+
serverTime: new Date(),
|
39 |
+
status: true,
|
40 |
+
};
|
41 |
+
if (nextRound === 0) {
|
42 |
+
response.message = "Game has ended";
|
43 |
+
}
|
44 |
+
if (nextRound === 1) {
|
45 |
+
response.message = "Round 1 starts in";
|
46 |
+
response.time = rounds[0].StartTime;
|
47 |
+
} else if (nextRound === 2) {
|
48 |
+
response.message = "Round 2 starts in";
|
49 |
+
response.time = rounds[1].StartTime;
|
50 |
+
} else if (nextRound === 3) {
|
51 |
+
response.message = "Round 3 starts in";
|
52 |
+
response.time = rounds[2].StartTime;
|
53 |
+
} else if (nextRound === 4) {
|
54 |
+
response.message = "Round 4 starts in";
|
55 |
+
response.time = rounds[3].StartTime;
|
56 |
+
}
|
57 |
+
|
58 |
+
if (currentRound === 1) {
|
59 |
+
response.message = "Round 1 ends in";
|
60 |
+
response.time = rounds[0].EndTime;
|
61 |
+
} else if (currentRound === 2) {
|
62 |
+
response.message = "Round 2 ends in";
|
63 |
+
response.time = rounds[1].EndTime;
|
64 |
+
} else if (currentRound === 3) {
|
65 |
+
response.message = "Round 3 ends in";
|
66 |
+
response.time = rounds[2].EndTime;
|
67 |
+
} else if (currentRound === 4) {
|
68 |
+
response.message = "Round 4 ends in";
|
69 |
+
response.time = rounds[3].EndTime;
|
70 |
+
}
|
71 |
+
let board = await Leaderboard.findOne({ TeamID: req.team._id, Round: 0 });
|
72 |
+
response.points = board.Points;
|
73 |
+
res.json(response);
|
74 |
+
} catch (err) {
|
75 |
+
console.log(err);
|
76 |
+
res.status(500).json({
|
77 |
+
message: err.message,
|
78 |
+
});
|
79 |
+
}
|
80 |
+
});
|
81 |
+
exports.getMainLeaderboard = asyncHandeler(async (req, res) => {
|
82 |
+
let rounds = await Round.find();
|
83 |
+
let resp = {};
|
84 |
+
resp.group = 1;
|
85 |
+
resp.TeamName = req.team.TeamName;
|
86 |
+
let prevRound = 0;
|
87 |
+
let date = new Date();
|
88 |
+
for (let i in rounds) {
|
89 |
+
if (date > rounds[i].EndTime) {
|
90 |
+
prevRound = rounds[i].Round;
|
91 |
+
}
|
92 |
+
}
|
93 |
+
//console.log(prevRound);
|
94 |
+
if (prevRound === 0) {
|
95 |
+
resp.LB = [];
|
96 |
+
resp.LB.push(await getFinalLeaderboard());
|
97 |
+
|
98 |
+
if (resp.LB) resp.status = true;
|
99 |
+
else {
|
100 |
+
resp.status = false;
|
101 |
+
resp.message = "Leaderboard is not available";
|
102 |
+
}
|
103 |
+
}
|
104 |
+
if (prevRound === 2) {
|
105 |
+
resp.LB = await getRoundLeaderboard(2);
|
106 |
+
if (resp.LB) resp.status = true;
|
107 |
+
else {
|
108 |
+
resp.status = false;
|
109 |
+
resp.message = "Leaderboard is not available";
|
110 |
+
}
|
111 |
+
let rooms = await RoomModel.find({ Round: 2 });
|
112 |
+
|
113 |
+
resp.group =
|
114 |
+
rooms.findIndex((room) => {
|
115 |
+
room._id === req.team.RoomID;
|
116 |
+
}) + 1;
|
117 |
+
}
|
118 |
+
if (prevRound === 1) {
|
119 |
+
resp.LB = await getRoundLeaderboard(1);
|
120 |
+
if (resp.LB) resp.status = true;
|
121 |
+
else {
|
122 |
+
resp.status = false;
|
123 |
+
resp.message = "Leaderboard is not available";
|
124 |
+
}
|
125 |
+
let rooms = await RoomModel.find({ Round: 1 });
|
126 |
+
|
127 |
+
resp.group =
|
128 |
+
rooms.findIndex((room) => {
|
129 |
+
room._id === req.team.RoomID;
|
130 |
+
}) + 1;
|
131 |
+
}
|
132 |
+
if (prevRound === 4) {
|
133 |
+
resp.LB = [];
|
134 |
+
resp.LB.push(await getRound4Leaderboard());
|
135 |
+
if (resp.LB) resp.status = true;
|
136 |
+
else {
|
137 |
+
resp.status = false;
|
138 |
+
resp.message = "Leaderboard is not available";
|
139 |
+
}
|
140 |
+
}
|
141 |
+
if (prevRound === 3) {
|
142 |
+
resp.LB = [];
|
143 |
+
resp.LB.push(await getRound3Leaderboard());
|
144 |
+
if (resp.LB) resp.status = true;
|
145 |
+
else {
|
146 |
+
resp.status = false;
|
147 |
+
resp.message = "Leaderboard is not available";
|
148 |
+
}
|
149 |
+
}
|
150 |
+
res.json(resp);
|
151 |
+
});
|
152 |
+
module.exports.getstart = asyncHandeler(async (req, res) => {
|
153 |
+
let rounds = await Round.find();
|
154 |
+
let resp = {};
|
155 |
+
resp.status = false;
|
156 |
+
let date = new Date();
|
157 |
+
for (i in rounds) {
|
158 |
+
if (date <= rounds[i].EndTime && date >= rounds[i].StartTime) {
|
159 |
+
resp.Round = rounds[i].Round;
|
160 |
+
resp.StartTime = rounds[i].StartTime;
|
161 |
+
resp.EndTime = rounds[i].EndTime;
|
162 |
+
resp.status = true;
|
163 |
+
break;
|
164 |
+
} else if (date <= rounds[i].StartTime) {
|
165 |
+
resp.Round = rounds[i].Round;
|
166 |
+
resp.StartTime = rounds[i].StartTime;
|
167 |
+
resp.EndTime = rounds[i].EndTime;
|
168 |
+
resp.status = true;
|
169 |
+
break;
|
170 |
+
}
|
171 |
+
}
|
172 |
+
res.json(resp);
|
173 |
+
});
|
174 |
+
|
175 |
+
module.exports.getDelete = asyncHandeler(async (req, res) => {
|
176 |
+
await account.findOneAndDelete({ UserID: req.user._id });
|
177 |
+
res.clearCookie("SessionID");
|
178 |
+
let resp = {};
|
179 |
+
resp.status = true;
|
180 |
+
resp.message = "Cookie Deleted";
|
181 |
+
res.send(resp);
|
182 |
+
});
|
183 |
+
|
184 |
+
module.exports.getMembers = asyncHandeler(async (req, res) => {
|
185 |
+
try {
|
186 |
+
let members = req.team.Members;
|
187 |
+
let names = [];
|
188 |
+
for (i in members) {
|
189 |
+
let user = await UserModel.findOne({ _id: members[i] });
|
190 |
+
if (user) {
|
191 |
+
names.push({
|
192 |
+
Name: user.Name,
|
193 |
+
Discord: user.DiscordID,
|
194 |
+
Role: user.Role,
|
195 |
+
});
|
196 |
+
}
|
197 |
+
}
|
198 |
+
|
199 |
+
res.json({
|
200 |
+
members: names,
|
201 |
+
status: true,
|
202 |
+
});
|
203 |
+
} catch (error) {
|
204 |
+
res.status(500).json({
|
205 |
+
message: error.message,
|
206 |
+
status: false,
|
207 |
+
});
|
208 |
+
}
|
209 |
+
});
|
controllers/logs.txt
ADDED
The diff for this file is too large to render.
See raw diff
|
|
helpers/LeaderBoardPreFetch.js
ADDED
@@ -0,0 +1,191 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
const LeaderboardModel = require('../models/LeaderboardModel');
|
2 |
+
const RoomModel = require('../models/RoomModel');
|
3 |
+
const RoundsModel = require('../models/RoundsModel');
|
4 |
+
const PreviousRoomModel = require('../models/PreviousRoomModel');
|
5 |
+
const CollaborativeLeaderboardModel = require('../models/CollaborativeLeaderboardModel');
|
6 |
+
let getLeaderBoardR1 = [];
|
7 |
+
|
8 |
+
module.exports.getRoomLeaderBoardR1R2 = async function getRoomLeaderBoardR1R2(team,round) {
|
9 |
+
try {
|
10 |
+
let PreviousRoom = await PreviousRoomModel.findOne({ TeamID: team._id, Round: round});
|
11 |
+
console.log(PreviousRoom);
|
12 |
+
let roomLeaderBoard = await LeaderboardModel.find({ RoomID: PreviousRoom.RoomID, Round: round});
|
13 |
+
if (roomLeaderBoard.length === 0) {
|
14 |
+
return "No teams in the room";
|
15 |
+
} else {
|
16 |
+
getLeaderBoardR1 = roomLeaderBoard;
|
17 |
+
getLeaderBoardR1 = await Promise.all(getLeaderBoardR1.map(async (team) => {
|
18 |
+
return await unsetTeams(team,round);
|
19 |
+
}));
|
20 |
+
|
21 |
+
|
22 |
+
getLeaderBoardR1.sort((a, b) => {
|
23 |
+
if (a.Points === b.Points) {
|
24 |
+
return a.Time - b.Time;
|
25 |
+
} else {
|
26 |
+
return b.Points - a.Points;
|
27 |
+
}
|
28 |
+
});
|
29 |
+
|
30 |
+
return getLeaderBoardR1;
|
31 |
+
}
|
32 |
+
} catch (error) {
|
33 |
+
console.log(error);
|
34 |
+
return false;
|
35 |
+
}
|
36 |
+
};
|
37 |
+
module.exports.getRoundLeaderboard=async function getRoundLeaderboard(round)
|
38 |
+
{
|
39 |
+
try{
|
40 |
+
let leaderboard=[];
|
41 |
+
let rooms= await RoomModel.find({Round:round});
|
42 |
+
|
43 |
+
for(let i=0;i<rooms.length;i++)
|
44 |
+
{
|
45 |
+
let roomLeaderBoard = await LeaderboardModel.find({ RoomID: rooms[i]._id, Round: round});
|
46 |
+
|
47 |
+
if (roomLeaderBoard.length === 0) {
|
48 |
+
console.log("No teams in the room")
|
49 |
+
} else {
|
50 |
+
roomLeaderBoard.sort((a, b) => {
|
51 |
+
if (a.Points === b.Points) {
|
52 |
+
return a.Time - b.Time;
|
53 |
+
} else {
|
54 |
+
return b.Points - a.Points;
|
55 |
+
}
|
56 |
+
});
|
57 |
+
leaderboard.push(roomLeaderBoard);
|
58 |
+
leaderboard[i] = await Promise.all(leaderboard[i].map(async (team) => {
|
59 |
+
return await unsetTeams(team,round);
|
60 |
+
}));
|
61 |
+
}
|
62 |
+
}
|
63 |
+
return leaderboard;
|
64 |
+
}
|
65 |
+
catch(error){
|
66 |
+
console.log(error);
|
67 |
+
return false;
|
68 |
+
}
|
69 |
+
}
|
70 |
+
module.exports.getRound3Leaderboard=async function getRound3Leaderboard()
|
71 |
+
{
|
72 |
+
round=3;
|
73 |
+
try{
|
74 |
+
let leaderboard=[];
|
75 |
+
let roomLeaderBoard= await CollaborativeLeaderboardModel.find({Round:3});
|
76 |
+
roomLeaderBoard.sort((a, b) => {
|
77 |
+
if (a.Points === b.Points) {
|
78 |
+
return a.Time - b.Time;
|
79 |
+
} else {
|
80 |
+
return b.Points - a.Points;
|
81 |
+
}
|
82 |
+
});
|
83 |
+
leaderboard=roomLeaderBoard;
|
84 |
+
leaderboard = await Promise.all(leaderboard.map(async (team) => {
|
85 |
+
return await unsetTeams(team, round);
|
86 |
+
}));
|
87 |
+
return leaderboard;
|
88 |
+
}
|
89 |
+
catch(error){
|
90 |
+
console.log(error);
|
91 |
+
return false;
|
92 |
+
}
|
93 |
+
}
|
94 |
+
module.exports.getRound4Leaderboard=async function getRound4Leaderboard()
|
95 |
+
{
|
96 |
+
round=4;
|
97 |
+
try{
|
98 |
+
let leaderboard=[];
|
99 |
+
let roomLeaderBoard= await LeaderboardModel.find({Round:4});
|
100 |
+
roomLeaderBoard.sort((a, b) => {
|
101 |
+
if (a.Points === b.Points) {
|
102 |
+
return a.Time - b.Time;
|
103 |
+
} else {
|
104 |
+
return b.Points - a.Points;
|
105 |
+
}
|
106 |
+
});
|
107 |
+
leaderboard=roomLeaderBoard;
|
108 |
+
leaderboard = await Promise.all(leaderboard.map(async (team) => {
|
109 |
+
return await unsetTeams(team, round);
|
110 |
+
}));
|
111 |
+
return leaderboard;
|
112 |
+
}
|
113 |
+
catch(error){
|
114 |
+
console.log(error);
|
115 |
+
return false;
|
116 |
+
}
|
117 |
+
}
|
118 |
+
module.exports.getFinalLeaderboard=async function getFinalLeaderboard()
|
119 |
+
{
|
120 |
+
round = 0;
|
121 |
+
try {
|
122 |
+
let leaderboard = [];
|
123 |
+
let roomLeaderBoard = await LeaderboardModel.find({ Round: 0 });
|
124 |
+
roomLeaderBoard.sort((a, b) => {
|
125 |
+
if (a.Points === b.Points) {
|
126 |
+
return a.Time - b.Time;
|
127 |
+
} else {
|
128 |
+
return b.Points - a.Points;
|
129 |
+
}
|
130 |
+
});
|
131 |
+
leaderboard = roomLeaderBoard;
|
132 |
+
leaderboard = await Promise.all(leaderboard.map(async (team) => {
|
133 |
+
return await unsetTeams(team, round);
|
134 |
+
}));
|
135 |
+
return leaderboard;
|
136 |
+
}
|
137 |
+
catch (error) {
|
138 |
+
console.log(error);
|
139 |
+
return false;
|
140 |
+
}
|
141 |
+
}
|
142 |
+
|
143 |
+
async function unsetTeams(team,round) {
|
144 |
+
const unsetTeam = { ...team._doc };
|
145 |
+
unsetTeam._id = undefined;
|
146 |
+
unsetTeam.__v = undefined;
|
147 |
+
//unsetTeam.TeamID = undefined;
|
148 |
+
unsetTeam.RoomID = undefined;
|
149 |
+
unsetTeam.Round = undefined;
|
150 |
+
unsetTeam.Questions = undefined;
|
151 |
+
unsetTeam.Time = undefined;
|
152 |
+
if(round!==0)
|
153 |
+
unsetTeam.TotalTime = await calculateTime(team.Time, round);
|
154 |
+
else
|
155 |
+
unsetTeam.TotalTime = "00H 00M 00S";
|
156 |
+
return unsetTeam;
|
157 |
+
}
|
158 |
+
|
159 |
+
async function calculateTime(time, round) {
|
160 |
+
const Round = await RoundsModel.findOne({Round:round});
|
161 |
+
const RoundStartTime = new Date(Round.StartTime);
|
162 |
+
const TeamTime = new Date(time);
|
163 |
+
const TotalTime = TeamTime - RoundStartTime;
|
164 |
+
return convertSecondsToDHMS(Math.floor(TotalTime / 1000));
|
165 |
+
}
|
166 |
+
|
167 |
+
function convertSecondsToDHMS(seconds) {
|
168 |
+
const days = Math.floor(seconds / (24 * 60 * 60));
|
169 |
+
const hours = Math.floor((seconds % (24 * 60 * 60)) / (60 * 60));
|
170 |
+
const minutes = Math.floor((seconds % (60 * 60)) / 60);
|
171 |
+
const remainingSeconds = seconds % 60;
|
172 |
+
|
173 |
+
const formatNumber = (number) => {
|
174 |
+
return number.toString().padStart(2, '0');
|
175 |
+
};
|
176 |
+
|
177 |
+
let result = '';
|
178 |
+
if (days > 0) {
|
179 |
+
result += `${formatNumber(days)}D `;
|
180 |
+
}
|
181 |
+
if (hours > 0) {
|
182 |
+
result += `${formatNumber(hours)}H `;
|
183 |
+
}
|
184 |
+
else if(days!==0 && hours===0)
|
185 |
+
{
|
186 |
+
result += `${formatNumber(hours)}H `;
|
187 |
+
}
|
188 |
+
result += `${formatNumber(minutes)}M ${formatNumber(remainingSeconds)}S`;
|
189 |
+
|
190 |
+
return result.trim();
|
191 |
+
}
|
helpers/LeaderBoardSetup.js
ADDED
@@ -0,0 +1,35 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
const Team = require("../models/TeamModel");
|
2 |
+
const Leaderboard = require("../models/LeaderboardModel");
|
3 |
+
async function createLeaderboardDocuments() {
|
4 |
+
try {
|
5 |
+
// Retrieve all teams from the Team collection
|
6 |
+
const teams = await Team.find();
|
7 |
+
|
8 |
+
// Iterate over each team and create a leaderboard document
|
9 |
+
for (const team of teams) {
|
10 |
+
// Check if a leaderboard document already exists for the team
|
11 |
+
const existingLeaderboard = await Leaderboard.findOne({ TeamID: team._id });
|
12 |
+
|
13 |
+
if (!existingLeaderboard) {
|
14 |
+
// Create a new leaderboard document for the team
|
15 |
+
const leaderboard = new Leaderboard({
|
16 |
+
TeamID: team._id,
|
17 |
+
TeamName: team.TeamName,
|
18 |
+
Points: 0,
|
19 |
+
Time: new Date(),
|
20 |
+
RoomID: team.RoomID,
|
21 |
+
Round: 1,
|
22 |
+
Questions: { Solved: [], Unsolved: [] }
|
23 |
+
});
|
24 |
+
|
25 |
+
// Save the leaderboard document
|
26 |
+
await leaderboard.save();
|
27 |
+
console.log(`Created leaderboard document for team: ${team.TeamName}`);
|
28 |
+
}
|
29 |
+
}
|
30 |
+
|
31 |
+
console.log("Leaderboard documents created for all teams.");
|
32 |
+
} catch (error) {
|
33 |
+
console.error("Error creating leaderboard documents:", error);
|
34 |
+
}
|
35 |
+
}
|
helpers/SessionIdhelper.js
ADDED
@@ -0,0 +1,39 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
const user = require("../models/UserModel");
|
2 |
+
const account = require("../models/AuthenticationModel");
|
3 |
+
const team = require("../models/TeamModel");
|
4 |
+
const Leaderboard = require("../models/LeaderboardModel");
|
5 |
+
|
6 |
+
async function fetch_user(cookie) {
|
7 |
+
try {
|
8 |
+
let cookies = parseCookie(cookie)
|
9 |
+
if (!cookies) {
|
10 |
+
return;
|
11 |
+
}
|
12 |
+
var acc = await account.findOne({ SessionID: cookies.SessionID });
|
13 |
+
|
14 |
+
if (acc) {
|
15 |
+
var resuser = await user.findOne({ _id: acc.UserID });
|
16 |
+
return resuser;
|
17 |
+
}
|
18 |
+
}
|
19 |
+
catch (err) {
|
20 |
+
console.log(err);
|
21 |
+
}
|
22 |
+
}
|
23 |
+
|
24 |
+
|
25 |
+
function parseCookie(cookieString) {
|
26 |
+
const cookies = {};
|
27 |
+
if (cookieString) {
|
28 |
+
const cookieArr = cookieString.split(';');
|
29 |
+
cookieArr.forEach((cookie) => {
|
30 |
+
const [key, value] = cookie.split('=');
|
31 |
+
const cookieKey = key.trim();
|
32 |
+
const cookieValue = decodeURIComponent(value.trim());
|
33 |
+
cookies[cookieKey] = cookieValue;
|
34 |
+
});
|
35 |
+
}
|
36 |
+
return cookies;
|
37 |
+
}
|
38 |
+
|
39 |
+
module.exports = fetch_user;
|
logs.txt
ADDED
The diff for this file is too large to render.
See raw diff
|
|
middlewares/ProtectRouter.js
ADDED
@@ -0,0 +1,36 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
const user = require("../models/UserModel");
|
2 |
+
const account = require("../models/AuthenticationModel");
|
3 |
+
const md5 = require("md5");
|
4 |
+
const team = require("../models/TeamModel");
|
5 |
+
const Leaderboard = require("../models/LeaderboardModel");
|
6 |
+
|
7 |
+
async function protect(req, res, next) {
|
8 |
+
try {
|
9 |
+
var acc = await account.findOne({ SessionID: req.cookies.SessionID });
|
10 |
+
if (acc) {
|
11 |
+
var resuser = await user.findOne({ _id: acc.UserID });
|
12 |
+
console.log(resuser);
|
13 |
+
var resteam = await team.findOne({ _id: resuser.TeamID });
|
14 |
+
console.log(resuser.TeamID, "RTEAM");
|
15 |
+
var board = await Leaderboard.findOne({ TeamID: resteam._id });
|
16 |
+
req.user = resuser;
|
17 |
+
req.team = resteam;
|
18 |
+
req.board = board;
|
19 |
+
// connectUserSocket(user);
|
20 |
+
next();
|
21 |
+
} else {
|
22 |
+
res.json({
|
23 |
+
status: false,
|
24 |
+
message: "Session Expired",
|
25 |
+
});
|
26 |
+
}
|
27 |
+
} catch (err) {
|
28 |
+
res.json({
|
29 |
+
status: false,
|
30 |
+
message: err,
|
31 |
+
});
|
32 |
+
console.log(err);
|
33 |
+
}
|
34 |
+
}
|
35 |
+
|
36 |
+
module.exports = protect;
|
middlewares/UserLoginMiddleware.js
ADDED
@@ -0,0 +1,33 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
const user = require("../models/UserModel");
|
2 |
+
const account = require("../models/AuthenticationModel");
|
3 |
+
const md5 = require("md5");
|
4 |
+
|
5 |
+
|
6 |
+
|
7 |
+
exports.attempt = async (username, password) => {
|
8 |
+
if(!password||!username)
|
9 |
+
{
|
10 |
+
console.log("Username or Password was empty");
|
11 |
+
return false;
|
12 |
+
}
|
13 |
+
if (await user.exists({
|
14 |
+
$or: [{ Email: username, Password: password }
|
15 |
+
, { PhoneNumber: username, Password: password }]
|
16 |
+
})) {
|
17 |
+
var uid = await user.findOne({
|
18 |
+
$or: [{ Email: username, Password: password }
|
19 |
+
, { PhoneNumber: username, Password: password }]
|
20 |
+
});
|
21 |
+
|
22 |
+
if (uid)
|
23 |
+
return uid;
|
24 |
+
else
|
25 |
+
return false;
|
26 |
+
}
|
27 |
+
else {
|
28 |
+
console.log("User not in database");
|
29 |
+
return false
|
30 |
+
}
|
31 |
+
}
|
32 |
+
|
33 |
+
|
middlewares/UserValidator.js
ADDED
@@ -0,0 +1,60 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
exports.validateUser = async function validateUser(data) {
|
2 |
+
var errors=false ;
|
3 |
+
|
4 |
+
// Validate Name
|
5 |
+
if (!data.Name) {
|
6 |
+
errors= "Name is required.";
|
7 |
+
return errors;
|
8 |
+
}
|
9 |
+
|
10 |
+
// Validate Email
|
11 |
+
if (!data.Email || !validateEmail(data.Email)) {
|
12 |
+
errors = "Email is invalid.";
|
13 |
+
return errors;
|
14 |
+
}
|
15 |
+
|
16 |
+
// Validate Password
|
17 |
+
if (!data.Password) {
|
18 |
+
errors = "Password is required.";
|
19 |
+
return errors;
|
20 |
+
}
|
21 |
+
|
22 |
+
// Validate RollNumber
|
23 |
+
if (!data.RollNumber || !/^\d{9}$/.test(data.RollNumber)) {
|
24 |
+
errors= "Roll number should be a 9-digit number.";
|
25 |
+
return errors;
|
26 |
+
}
|
27 |
+
|
28 |
+
// Validate PhoneNumber
|
29 |
+
if (!data.PhoneNumber || !/^\d{10}$/.test(data.PhoneNumber)) {
|
30 |
+
errors = "Phone number should be a 10-digit number.";
|
31 |
+
return errors;
|
32 |
+
}
|
33 |
+
|
34 |
+
// Validate Branch
|
35 |
+
if (!data.Branch) {
|
36 |
+
errors = "Branch is required.";
|
37 |
+
return errors;
|
38 |
+
}
|
39 |
+
|
40 |
+
// Validate Year
|
41 |
+
if (!data.Year) {
|
42 |
+
errors = "Year is required.";
|
43 |
+
return errors;
|
44 |
+
}
|
45 |
+
|
46 |
+
// Validate DiscordID
|
47 |
+
if (!data.DiscordID) {
|
48 |
+
errors = "Discord ID is required.";
|
49 |
+
return errors;
|
50 |
+
}
|
51 |
+
|
52 |
+
|
53 |
+
|
54 |
+
}
|
55 |
+
|
56 |
+
// Helper function to validate email format
|
57 |
+
function validateEmail(email) {
|
58 |
+
const emailRegex = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;
|
59 |
+
return emailRegex.test(email);
|
60 |
+
}
|
models/AuthenticationModel.js
ADDED
@@ -0,0 +1,30 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
const { mongoose } = require("mongoose");
|
2 |
+
|
3 |
+
|
4 |
+
const Schema = mongoose.Schema;
|
5 |
+
const loginAccountSchema = new Schema({
|
6 |
+
timestamp: {
|
7 |
+
type: Date,
|
8 |
+
default: Date.now()
|
9 |
+
},
|
10 |
+
UserID: {
|
11 |
+
type: Schema.Types.ObjectId,
|
12 |
+
ref: "User"
|
13 |
+
},
|
14 |
+
TeamId: {
|
15 |
+
type: Schema.Types.ObjectId,
|
16 |
+
ref: "Team"
|
17 |
+
},
|
18 |
+
SessionID: {
|
19 |
+
type: String
|
20 |
+
},
|
21 |
+
Status: {
|
22 |
+
type: Number
|
23 |
+
},
|
24 |
+
});
|
25 |
+
|
26 |
+
loginAccountSchema.virtual("url").get(function () {
|
27 |
+
return `/sessions/${this._id}`;
|
28 |
+
});
|
29 |
+
|
30 |
+
module.exports = mongoose.model("Authentication", loginAccountSchema);
|
models/Certificates.js
ADDED
@@ -0,0 +1,38 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
const { ObjectId } = require("bson");
|
2 |
+
const { default: mongoose } = require("mongoose");
|
3 |
+
|
4 |
+
const Schema = mongoose.Schema;
|
5 |
+
const userSchema = new Schema({
|
6 |
+
Name: {
|
7 |
+
type: String,
|
8 |
+
},
|
9 |
+
Email: {
|
10 |
+
type: String,
|
11 |
+
},
|
12 |
+
RollNumber: {
|
13 |
+
type: Number,
|
14 |
+
},
|
15 |
+
PhoneNumber: {
|
16 |
+
type: String,
|
17 |
+
},
|
18 |
+
Branch: {
|
19 |
+
type: String,
|
20 |
+
},
|
21 |
+
Year: {
|
22 |
+
type: String,
|
23 |
+
},
|
24 |
+
DiscordID: {
|
25 |
+
type: String,
|
26 |
+
},
|
27 |
+
Role: {
|
28 |
+
type: String,
|
29 |
+
default: "Member",
|
30 |
+
},
|
31 |
+
TeamName: {
|
32 |
+
type: String,
|
33 |
+
},
|
34 |
+
});
|
35 |
+
|
36 |
+
|
37 |
+
|
38 |
+
module.exports = mongoose.model("Certificates", userSchema);
|
models/CollaborativeLeaderboardModel.js
ADDED
@@ -0,0 +1,66 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
const { ObjectId } = require("bson");
|
2 |
+
const { default: mongoose } = require("mongoose");
|
3 |
+
|
4 |
+
const Schema = mongoose.Schema;
|
5 |
+
const userSchema = new Schema({
|
6 |
+
TeamID1: {
|
7 |
+
type: Schema.Types.ObjectId,
|
8 |
+
ref: "Team",
|
9 |
+
unique: true
|
10 |
+
},
|
11 |
+
TeamID2: {
|
12 |
+
type: Schema.Types.ObjectId,
|
13 |
+
ref: "Team",
|
14 |
+
unique: true
|
15 |
+
},
|
16 |
+
TeamName: {
|
17 |
+
type: String,
|
18 |
+
required: true,
|
19 |
+
unique: true
|
20 |
+
},
|
21 |
+
Points: {
|
22 |
+
type: Number,
|
23 |
+
default: 0,
|
24 |
+
required: true
|
25 |
+
},
|
26 |
+
Points1:{
|
27 |
+
type: Number,
|
28 |
+
default: 0,
|
29 |
+
required: true
|
30 |
+
},
|
31 |
+
Points2:{
|
32 |
+
type: Number,
|
33 |
+
default: 0,
|
34 |
+
required: true
|
35 |
+
},
|
36 |
+
Time: {
|
37 |
+
type: Date,
|
38 |
+
default: Date.now()
|
39 |
+
},
|
40 |
+
RoomID: {
|
41 |
+
type: Schema.Types.ObjectId,
|
42 |
+
ref: "Room"
|
43 |
+
},
|
44 |
+
Round: {
|
45 |
+
type: Number,
|
46 |
+
default: 3
|
47 |
+
},
|
48 |
+
Questions: {
|
49 |
+
Solved: [{
|
50 |
+
type: Schema.Types.ObjectId,
|
51 |
+
ref: "Question"
|
52 |
+
}],
|
53 |
+
Unsolved: [{
|
54 |
+
type: Schema.Types.ObjectId,
|
55 |
+
ref: "Question"
|
56 |
+
}]
|
57 |
+
},
|
58 |
+
Enabled: {
|
59 |
+
type: Boolean,
|
60 |
+
default: true
|
61 |
+
}
|
62 |
+
|
63 |
+
});
|
64 |
+
|
65 |
+
|
66 |
+
module.exports = mongoose.model("CollaborativeLeaderboard", userSchema);
|
models/CouponModel.js
ADDED
@@ -0,0 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
const mongoose=require('mongoose');
|
2 |
+
|
3 |
+
|
4 |
+
const couponSchema = new mongoose.Schema({
|
5 |
+
Coupon:{
|
6 |
+
type:String
|
7 |
+
}
|
8 |
+
})
|
9 |
+
|
10 |
+
|
11 |
+
|
12 |
+
|
13 |
+
const Coupon = mongoose.model('Coupon', couponSchema);
|
14 |
+
|
15 |
+
module.exports= Coupon;
|
models/LeaderboardModel.js
ADDED
@@ -0,0 +1,48 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
const { ObjectId } = require("bson");
|
2 |
+
const { default: mongoose } = require("mongoose");
|
3 |
+
|
4 |
+
const Schema = mongoose.Schema;
|
5 |
+
const userSchema = new Schema({
|
6 |
+
TeamID: {
|
7 |
+
type: Schema.Types.ObjectId,
|
8 |
+
ref: "Team"
|
9 |
+
},
|
10 |
+
TeamName: {
|
11 |
+
type: String,
|
12 |
+
required: true
|
13 |
+
},
|
14 |
+
Points: {
|
15 |
+
type: Number,
|
16 |
+
default: 0,
|
17 |
+
required: true
|
18 |
+
},
|
19 |
+
Time: {
|
20 |
+
type: Date,
|
21 |
+
default: Date.now()
|
22 |
+
},
|
23 |
+
RoomID: {
|
24 |
+
type: Schema.Types.ObjectId,
|
25 |
+
ref: "Room"
|
26 |
+
},
|
27 |
+
Round: {
|
28 |
+
type: Number,
|
29 |
+
default: 0,
|
30 |
+
},
|
31 |
+
Questions: {
|
32 |
+
Solved: [{
|
33 |
+
type: Schema.Types.ObjectId,
|
34 |
+
ref: "Question"
|
35 |
+
}],
|
36 |
+
Unsolved: [{
|
37 |
+
type: Schema.Types.ObjectId,
|
38 |
+
ref: "Question"
|
39 |
+
}]
|
40 |
+
},
|
41 |
+
Enabled: {
|
42 |
+
type: Boolean,
|
43 |
+
default: true,
|
44 |
+
},
|
45 |
+
});
|
46 |
+
|
47 |
+
|
48 |
+
module.exports = mongoose.model("Leaderboard", userSchema);
|
models/PreviousRoomModel.js
ADDED
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
const { ObjectId } = require("bson");
|
2 |
+
const { default: mongoose } = require("mongoose");
|
3 |
+
|
4 |
+
const Schema = mongoose.Schema;
|
5 |
+
const userSchema = new Schema({
|
6 |
+
Round: {
|
7 |
+
type: Number,
|
8 |
+
},
|
9 |
+
RoomID: {
|
10 |
+
type: Schema.Types.ObjectId,
|
11 |
+
ref: "Room"
|
12 |
+
},
|
13 |
+
TeamID: {
|
14 |
+
type: Schema.Types.ObjectId,
|
15 |
+
ref: "Team"
|
16 |
+
},
|
17 |
+
});
|
18 |
+
|
19 |
+
|
20 |
+
|
21 |
+
module.exports = mongoose.model("PreviousRoom", userSchema);
|
models/QuestionsModel.js
ADDED
@@ -0,0 +1,48 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
const { ObjectId } = require("bson");
|
2 |
+
const { default: mongoose } = require("mongoose");
|
3 |
+
|
4 |
+
const Schema = mongoose.Schema;
|
5 |
+
const userSchema = new Schema({
|
6 |
+
QuestionNumber: {
|
7 |
+
type: Number,
|
8 |
+
default: 1,
|
9 |
+
unique: true,
|
10 |
+
autoIncrement: true
|
11 |
+
},
|
12 |
+
Question: {
|
13 |
+
type: String
|
14 |
+
},
|
15 |
+
Description: {
|
16 |
+
type: String,
|
17 |
+
},
|
18 |
+
Answer: {
|
19 |
+
type: String
|
20 |
+
},
|
21 |
+
Hint: {
|
22 |
+
type: String,
|
23 |
+
},
|
24 |
+
HintAddress: {
|
25 |
+
type: Number
|
26 |
+
},
|
27 |
+
num: {
|
28 |
+
type: Number,
|
29 |
+
},
|
30 |
+
Round: {
|
31 |
+
type: Number,
|
32 |
+
},
|
33 |
+
Points: {
|
34 |
+
type: Number,
|
35 |
+
},
|
36 |
+
RoomID: {
|
37 |
+
type: Number,
|
38 |
+
},
|
39 |
+
assigned:{
|
40 |
+
type: Boolean,
|
41 |
+
default:false,
|
42 |
+
}
|
43 |
+
|
44 |
+
});
|
45 |
+
|
46 |
+
|
47 |
+
|
48 |
+
module.exports = mongoose.model("Question", userSchema);
|
models/RoomModel.js
ADDED
@@ -0,0 +1,18 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
const { ObjectId } = require("bson");
|
2 |
+
const { default: mongoose } = require("mongoose");
|
3 |
+
|
4 |
+
const Schema = mongoose.Schema;
|
5 |
+
const userSchema = new Schema({
|
6 |
+
Round: {
|
7 |
+
type: Number,
|
8 |
+
},
|
9 |
+
Questions: [{
|
10 |
+
type: Schema.Types.ObjectId,
|
11 |
+
ref: "Question"
|
12 |
+
}]
|
13 |
+
|
14 |
+
});
|
15 |
+
|
16 |
+
|
17 |
+
|
18 |
+
module.exports = mongoose.model("Room", userSchema);
|
models/RoundsModel.js
ADDED
@@ -0,0 +1,35 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
const { ObjectId } = require("bson");
|
2 |
+
const { default: mongoose } = require("mongoose");
|
3 |
+
|
4 |
+
const Schema = mongoose.Schema;
|
5 |
+
const roundSchema = new Schema({
|
6 |
+
Timestamp: {
|
7 |
+
type: Date,
|
8 |
+
default: Date.now,
|
9 |
+
required: true,
|
10 |
+
},
|
11 |
+
Round: {
|
12 |
+
type: Number,
|
13 |
+
},
|
14 |
+
Questions: {
|
15 |
+
type:Number,
|
16 |
+
},
|
17 |
+
StartTime: {
|
18 |
+
type: Date,
|
19 |
+
required: true,
|
20 |
+
},
|
21 |
+
EndTime: {
|
22 |
+
type: Date,
|
23 |
+
required: true,
|
24 |
+
},
|
25 |
+
Enabled: {
|
26 |
+
type: Boolean,
|
27 |
+
default: true,
|
28 |
+
},
|
29 |
+
});
|
30 |
+
|
31 |
+
roundSchema.virtual("url").get(function () {
|
32 |
+
return `/round/${this._id}`;
|
33 |
+
});
|
34 |
+
|
35 |
+
module.exports = mongoose.model("Round", roundSchema);
|
models/TeamModel.js
ADDED
@@ -0,0 +1,40 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
const { ObjectId } = require("bson");
|
2 |
+
const { default: mongoose } = require("mongoose");
|
3 |
+
|
4 |
+
const Schema = mongoose.Schema;
|
5 |
+
const teamSchema = new Schema({
|
6 |
+
Timestamp: {
|
7 |
+
type: Date,
|
8 |
+
default: Date.now,
|
9 |
+
required: true,
|
10 |
+
},
|
11 |
+
TeamName: {
|
12 |
+
type: String,
|
13 |
+
unique: true,
|
14 |
+
required: [true, "Team name is required."],
|
15 |
+
|
16 |
+
},
|
17 |
+
Code: {
|
18 |
+
type: String,
|
19 |
+
unique: true,
|
20 |
+
required: [true, "Team code is required."],
|
21 |
+
},
|
22 |
+
Members: [{
|
23 |
+
type: Schema.Types.ObjectId,
|
24 |
+
ref: "User",
|
25 |
+
}],
|
26 |
+
RoomID: {
|
27 |
+
type: Schema.Types.ObjectId,
|
28 |
+
ref: "Room",
|
29 |
+
},
|
30 |
+
Password: {
|
31 |
+
type: String,
|
32 |
+
required: [true, "Password is required."],
|
33 |
+
},
|
34 |
+
});
|
35 |
+
|
36 |
+
teamSchema.virtual("url").get(function () {
|
37 |
+
return `/teams/${this._id}`;
|
38 |
+
});
|
39 |
+
|
40 |
+
module.exports = mongoose.model("Team", teamSchema);
|
models/UserModel.js
ADDED
@@ -0,0 +1,80 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
const { ObjectId } = require("bson");
|
2 |
+
const { default: mongoose } = require("mongoose");
|
3 |
+
|
4 |
+
const Schema = mongoose.Schema;
|
5 |
+
const userSchema = new Schema({
|
6 |
+
Timestamp: {
|
7 |
+
type: Date,
|
8 |
+
default: Date.now,
|
9 |
+
required: true,
|
10 |
+
},
|
11 |
+
Name: {
|
12 |
+
type: String,
|
13 |
+
required: [true, "Name is required."],
|
14 |
+
},
|
15 |
+
Email: {
|
16 |
+
type: String,
|
17 |
+
required: [true, "Email is required."],
|
18 |
+
unique: true,
|
19 |
+
match: [/^[^\s@]+@[^\s@]+\.[^\s@]+$/, "Please provide a valid email address."],
|
20 |
+
|
21 |
+
},
|
22 |
+
RollNumber: {
|
23 |
+
type: Number,
|
24 |
+
validate: {
|
25 |
+
validator: function (value) {
|
26 |
+
return /\d{9}/.test(value);
|
27 |
+
},
|
28 |
+
message: "Please provide a valid Roll Number.",
|
29 |
+
},
|
30 |
+
unique: true,
|
31 |
+
required: [true, "Roll number is required."],
|
32 |
+
},
|
33 |
+
PhoneNumber: {
|
34 |
+
type: String,
|
35 |
+
validate: {
|
36 |
+
validator: function (value) {
|
37 |
+
return /\d{10}/.test(value);
|
38 |
+
},
|
39 |
+
message: "Please provide a valid 10-digit phone number.",
|
40 |
+
},
|
41 |
+
required: [true, "Phone number is required."],
|
42 |
+
unique: true,
|
43 |
+
},
|
44 |
+
TeamID: {
|
45 |
+
type: Schema.Types.ObjectId,
|
46 |
+
ref: "Team",
|
47 |
+
},
|
48 |
+
Branch: {
|
49 |
+
type: String,
|
50 |
+
required: [true, "Branch is required"],
|
51 |
+
},
|
52 |
+
Year: {
|
53 |
+
type: String,
|
54 |
+
enum: ["First", "Second", "Third", "Fourth"],
|
55 |
+
required: [true, "Year is required"],
|
56 |
+
},
|
57 |
+
DiscordID: {
|
58 |
+
type: String,
|
59 |
+
required: [true, "Discord ID is required."],
|
60 |
+
unique: true
|
61 |
+
},
|
62 |
+
Password: {
|
63 |
+
type: String,
|
64 |
+
required: [true, "Password is required."],
|
65 |
+
},
|
66 |
+
Role: {
|
67 |
+
type: String,
|
68 |
+
default: "Member",
|
69 |
+
},
|
70 |
+
RoomID: {
|
71 |
+
type: Schema.Types.ObjectId,
|
72 |
+
ref: "Room",
|
73 |
+
},
|
74 |
+
});
|
75 |
+
|
76 |
+
userSchema.virtual("url").get(function () {
|
77 |
+
return `/users/${this._id}`;
|
78 |
+
});
|
79 |
+
|
80 |
+
module.exports = mongoose.model("User", userSchema);
|
models/UserQuestionModel.js
ADDED
@@ -0,0 +1,55 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
const { ObjectId } = require("bson");
|
2 |
+
const { default: mongoose } = require("mongoose");
|
3 |
+
|
4 |
+
const Schema = mongoose.Schema;
|
5 |
+
const userSchema = new Schema({
|
6 |
+
TeamID: {
|
7 |
+
type: ObjectId,
|
8 |
+
required: true,
|
9 |
+
ref: "Team"
|
10 |
+
},
|
11 |
+
QuestionID: {
|
12 |
+
type: ObjectId,
|
13 |
+
required: true,
|
14 |
+
ref: "Question"
|
15 |
+
},
|
16 |
+
QuestionNumber: {
|
17 |
+
type: Number,
|
18 |
+
},
|
19 |
+
Question: {
|
20 |
+
type: String
|
21 |
+
},
|
22 |
+
Description: {
|
23 |
+
type: String,
|
24 |
+
},
|
25 |
+
Answer: {
|
26 |
+
type: String
|
27 |
+
},
|
28 |
+
Hint: {
|
29 |
+
type: String,
|
30 |
+
},
|
31 |
+
HintAddress: {
|
32 |
+
type: Number
|
33 |
+
},
|
34 |
+
num: {
|
35 |
+
type: Number,
|
36 |
+
},
|
37 |
+
Round: {
|
38 |
+
type: Number,
|
39 |
+
},
|
40 |
+
Points: {
|
41 |
+
type: Number,
|
42 |
+
},
|
43 |
+
RoomID: {
|
44 |
+
type: Number,
|
45 |
+
},
|
46 |
+
assigned: {
|
47 |
+
type: Boolean,
|
48 |
+
default: false,
|
49 |
+
}
|
50 |
+
|
51 |
+
});
|
52 |
+
|
53 |
+
|
54 |
+
|
55 |
+
module.exports = mongoose.model("UserQuestion", userSchema);
|
package-lock.json
ADDED
@@ -0,0 +1,2404 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"name": "incursion-registration-form",
|
3 |
+
"version": "1.0.0",
|
4 |
+
"lockfileVersion": 3,
|
5 |
+
"requires": true,
|
6 |
+
"packages": {
|
7 |
+
"": {
|
8 |
+
"name": "incursion-registration-form",
|
9 |
+
"version": "1.0.0",
|
10 |
+
"license": "ISC",
|
11 |
+
"dependencies": {
|
12 |
+
"axios": "^1.4.0",
|
13 |
+
"cookie-parser": "^1.4.6",
|
14 |
+
"discord": "^0.8.2",
|
15 |
+
"discord.js": "^13.16.0",
|
16 |
+
"dotenv": "^16.3.1",
|
17 |
+
"express": "^4.18.2",
|
18 |
+
"express-async-handler": "^1.2.0",
|
19 |
+
"express-session": "^1.17.3",
|
20 |
+
"md5": "^2.3.0",
|
21 |
+
"mongoose": "^7.3.1",
|
22 |
+
"node-fetch": "^3.3.1",
|
23 |
+
"nodemailer": "^6.9.3",
|
24 |
+
"nodemon": "^2.0.22",
|
25 |
+
"socket.io": "^4.7.1",
|
26 |
+
"url-parser": "^0.0.1",
|
27 |
+
"uuid": "^9.0.0",
|
28 |
+
"ws": "^8.13.0"
|
29 |
+
}
|
30 |
+
},
|
31 |
+
"node_modules/@discordjs/builders": {
|
32 |
+
"version": "0.16.0",
|
33 |
+
"resolved": "https://registry.npmjs.org/@discordjs/builders/-/builders-0.16.0.tgz",
|
34 |
+
"integrity": "sha512-9/NCiZrLivgRub2/kBc0Vm5pMBE5AUdYbdXsLu/yg9ANgvnaJ0bZKTY8yYnLbsEc/LYUP79lEIdC73qEYhWq7A==",
|
35 |
+
"deprecated": "no longer supported",
|
36 |
+
"dependencies": {
|
37 |
+
"@sapphire/shapeshift": "^3.5.1",
|
38 |
+
"discord-api-types": "^0.36.2",
|
39 |
+
"fast-deep-equal": "^3.1.3",
|
40 |
+
"ts-mixer": "^6.0.1",
|
41 |
+
"tslib": "^2.4.0"
|
42 |
+
},
|
43 |
+
"engines": {
|
44 |
+
"node": ">=16.9.0"
|
45 |
+
}
|
46 |
+
},
|
47 |
+
"node_modules/@discordjs/builders/node_modules/discord-api-types": {
|
48 |
+
"version": "0.36.3",
|
49 |
+
"resolved": "https://registry.npmjs.org/discord-api-types/-/discord-api-types-0.36.3.tgz",
|
50 |
+
"integrity": "sha512-bz/NDyG0KBo/tY14vSkrwQ/n3HKPf87a0WFW/1M9+tXYK+vp5Z5EksawfCWo2zkAc6o7CClc0eff1Pjrqznlwg=="
|
51 |
+
},
|
52 |
+
"node_modules/@discordjs/collection": {
|
53 |
+
"version": "0.7.0",
|
54 |
+
"resolved": "https://registry.npmjs.org/@discordjs/collection/-/collection-0.7.0.tgz",
|
55 |
+
"integrity": "sha512-R5i8Wb8kIcBAFEPLLf7LVBQKBDYUL+ekb23sOgpkpyGT+V4P7V83wTxcsqmX+PbqHt4cEHn053uMWfRqh/Z/nA==",
|
56 |
+
"deprecated": "no longer supported",
|
57 |
+
"engines": {
|
58 |
+
"node": ">=16.9.0"
|
59 |
+
}
|
60 |
+
},
|
61 |
+
"node_modules/@isaacs/cliui": {
|
62 |
+
"version": "8.0.2",
|
63 |
+
"resolved": "https://registry.npmjs.org/@isaacs/cliui/-/cliui-8.0.2.tgz",
|
64 |
+
"integrity": "sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==",
|
65 |
+
"dependencies": {
|
66 |
+
"string-width": "^5.1.2",
|
67 |
+
"string-width-cjs": "npm:string-width@^4.2.0",
|
68 |
+
"strip-ansi": "^7.0.1",
|
69 |
+
"strip-ansi-cjs": "npm:strip-ansi@^6.0.1",
|
70 |
+
"wrap-ansi": "^8.1.0",
|
71 |
+
"wrap-ansi-cjs": "npm:wrap-ansi@^7.0.0"
|
72 |
+
},
|
73 |
+
"engines": {
|
74 |
+
"node": ">=12"
|
75 |
+
}
|
76 |
+
},
|
77 |
+
"node_modules/@pkgjs/parseargs": {
|
78 |
+
"version": "0.11.0",
|
79 |
+
"resolved": "https://registry.npmjs.org/@pkgjs/parseargs/-/parseargs-0.11.0.tgz",
|
80 |
+
"integrity": "sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==",
|
81 |
+
"optional": true,
|
82 |
+
"engines": {
|
83 |
+
"node": ">=14"
|
84 |
+
}
|
85 |
+
},
|
86 |
+
"node_modules/@sapphire/async-queue": {
|
87 |
+
"version": "1.5.0",
|
88 |
+
"resolved": "https://registry.npmjs.org/@sapphire/async-queue/-/async-queue-1.5.0.tgz",
|
89 |
+
"integrity": "sha512-JkLdIsP8fPAdh9ZZjrbHWR/+mZj0wvKS5ICibcLrRI1j84UmLMshx5n9QmL8b95d4onJ2xxiyugTgSAX7AalmA==",
|
90 |
+
"engines": {
|
91 |
+
"node": ">=v14.0.0",
|
92 |
+
"npm": ">=7.0.0"
|
93 |
+
}
|
94 |
+
},
|
95 |
+
"node_modules/@sapphire/shapeshift": {
|
96 |
+
"version": "3.9.2",
|
97 |
+
"resolved": "https://registry.npmjs.org/@sapphire/shapeshift/-/shapeshift-3.9.2.tgz",
|
98 |
+
"integrity": "sha512-YRbCXWy969oGIdqR/wha62eX8GNHsvyYi0Rfd4rNW6tSVVa8p0ELiMEuOH/k8rgtvRoM+EMV7Csqz77YdwiDpA==",
|
99 |
+
"dependencies": {
|
100 |
+
"fast-deep-equal": "^3.1.3",
|
101 |
+
"lodash": "^4.17.21"
|
102 |
+
},
|
103 |
+
"engines": {
|
104 |
+
"node": ">=v14.0.0",
|
105 |
+
"npm": ">=7.0.0"
|
106 |
+
}
|
107 |
+
},
|
108 |
+
"node_modules/@socket.io/component-emitter": {
|
109 |
+
"version": "3.1.0",
|
110 |
+
"resolved": "https://registry.npmjs.org/@socket.io/component-emitter/-/component-emitter-3.1.0.tgz",
|
111 |
+
"integrity": "sha512-+9jVqKhRSpsc591z5vX+X5Yyw+he/HCB4iQ/RYxw35CEPaY1gnsNE43nf9n9AaYjAQrTiI/mOwKUKdUs9vf7Xg=="
|
112 |
+
},
|
113 |
+
"node_modules/@types/cookie": {
|
114 |
+
"version": "0.4.1",
|
115 |
+
"resolved": "https://registry.npmjs.org/@types/cookie/-/cookie-0.4.1.tgz",
|
116 |
+
"integrity": "sha512-XW/Aa8APYr6jSVVA1y/DEIZX0/GMKLEVekNG727R8cs56ahETkRAy/3DR7+fJyh7oUgGwNQaRfXCun0+KbWY7Q=="
|
117 |
+
},
|
118 |
+
"node_modules/@types/cors": {
|
119 |
+
"version": "2.8.13",
|
120 |
+
"resolved": "https://registry.npmjs.org/@types/cors/-/cors-2.8.13.tgz",
|
121 |
+
"integrity": "sha512-RG8AStHlUiV5ysZQKq97copd2UmVYw3/pRMLefISZ3S1hK104Cwm7iLQ3fTKx+lsUH2CE8FlLaYeEA2LSeqYUA==",
|
122 |
+
"dependencies": {
|
123 |
+
"@types/node": "*"
|
124 |
+
}
|
125 |
+
},
|
126 |
+
"node_modules/@types/node": {
|
127 |
+
"version": "20.3.2",
|
128 |
+
"resolved": "https://registry.npmjs.org/@types/node/-/node-20.3.2.tgz",
|
129 |
+
"integrity": "sha512-vOBLVQeCQfIcF/2Y7eKFTqrMnizK5lRNQ7ykML/5RuwVXVWxYkgwS7xbt4B6fKCUPgbSL5FSsjHQpaGQP/dQmw=="
|
130 |
+
},
|
131 |
+
"node_modules/@types/node-fetch": {
|
132 |
+
"version": "2.6.4",
|
133 |
+
"resolved": "https://registry.npmjs.org/@types/node-fetch/-/node-fetch-2.6.4.tgz",
|
134 |
+
"integrity": "sha512-1ZX9fcN4Rvkvgv4E6PAY5WXUFWFcRWxZa3EW83UjycOB9ljJCedb2CupIP4RZMEwF/M3eTcCihbBRgwtGbg5Rg==",
|
135 |
+
"dependencies": {
|
136 |
+
"@types/node": "*",
|
137 |
+
"form-data": "^3.0.0"
|
138 |
+
}
|
139 |
+
},
|
140 |
+
"node_modules/@types/node-fetch/node_modules/form-data": {
|
141 |
+
"version": "3.0.1",
|
142 |
+
"resolved": "https://registry.npmjs.org/form-data/-/form-data-3.0.1.tgz",
|
143 |
+
"integrity": "sha512-RHkBKtLWUVwd7SqRIvCZMEvAMoGUp0XU+seQiZejj0COz3RI3hWP4sCv3gZWWLjJTd7rGwcsF5eKZGii0r/hbg==",
|
144 |
+
"dependencies": {
|
145 |
+
"asynckit": "^0.4.0",
|
146 |
+
"combined-stream": "^1.0.8",
|
147 |
+
"mime-types": "^2.1.12"
|
148 |
+
},
|
149 |
+
"engines": {
|
150 |
+
"node": ">= 6"
|
151 |
+
}
|
152 |
+
},
|
153 |
+
"node_modules/@types/webidl-conversions": {
|
154 |
+
"version": "7.0.0",
|
155 |
+
"resolved": "https://registry.npmjs.org/@types/webidl-conversions/-/webidl-conversions-7.0.0.tgz",
|
156 |
+
"integrity": "sha512-xTE1E+YF4aWPJJeUzaZI5DRntlkY3+BCVJi0axFptnjGmAoWxkyREIh/XMrfxVLejwQxMCfDXdICo0VLxThrog=="
|
157 |
+
},
|
158 |
+
"node_modules/@types/whatwg-url": {
|
159 |
+
"version": "8.2.2",
|
160 |
+
"resolved": "https://registry.npmjs.org/@types/whatwg-url/-/whatwg-url-8.2.2.tgz",
|
161 |
+
"integrity": "sha512-FtQu10RWgn3D9U4aazdwIE2yzphmTJREDqNdODHrbrZmmMqI0vMheC/6NE/J1Yveaj8H+ela+YwWTjq5PGmuhA==",
|
162 |
+
"dependencies": {
|
163 |
+
"@types/node": "*",
|
164 |
+
"@types/webidl-conversions": "*"
|
165 |
+
}
|
166 |
+
},
|
167 |
+
"node_modules/@types/ws": {
|
168 |
+
"version": "8.5.5",
|
169 |
+
"resolved": "https://registry.npmjs.org/@types/ws/-/ws-8.5.5.tgz",
|
170 |
+
"integrity": "sha512-lwhs8hktwxSjf9UaZ9tG5M03PGogvFaH8gUgLNbN9HKIg0dvv6q+gkSuJ8HN4/VbyxkuLzCjlN7GquQ0gUJfIg==",
|
171 |
+
"dependencies": {
|
172 |
+
"@types/node": "*"
|
173 |
+
}
|
174 |
+
},
|
175 |
+
"node_modules/abbrev": {
|
176 |
+
"version": "1.1.1",
|
177 |
+
"resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz",
|
178 |
+
"integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q=="
|
179 |
+
},
|
180 |
+
"node_modules/accepts": {
|
181 |
+
"version": "1.3.8",
|
182 |
+
"resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.8.tgz",
|
183 |
+
"integrity": "sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw==",
|
184 |
+
"dependencies": {
|
185 |
+
"mime-types": "~2.1.34",
|
186 |
+
"negotiator": "0.6.3"
|
187 |
+
},
|
188 |
+
"engines": {
|
189 |
+
"node": ">= 0.6"
|
190 |
+
}
|
191 |
+
},
|
192 |
+
"node_modules/ansi-regex": {
|
193 |
+
"version": "6.0.1",
|
194 |
+
"resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.0.1.tgz",
|
195 |
+
"integrity": "sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==",
|
196 |
+
"engines": {
|
197 |
+
"node": ">=12"
|
198 |
+
},
|
199 |
+
"funding": {
|
200 |
+
"url": "https://github.com/chalk/ansi-regex?sponsor=1"
|
201 |
+
}
|
202 |
+
},
|
203 |
+
"node_modules/ansi-styles": {
|
204 |
+
"version": "6.2.1",
|
205 |
+
"resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.1.tgz",
|
206 |
+
"integrity": "sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==",
|
207 |
+
"engines": {
|
208 |
+
"node": ">=12"
|
209 |
+
},
|
210 |
+
"funding": {
|
211 |
+
"url": "https://github.com/chalk/ansi-styles?sponsor=1"
|
212 |
+
}
|
213 |
+
},
|
214 |
+
"node_modules/anymatch": {
|
215 |
+
"version": "3.1.3",
|
216 |
+
"resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz",
|
217 |
+
"integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==",
|
218 |
+
"dependencies": {
|
219 |
+
"normalize-path": "^3.0.0",
|
220 |
+
"picomatch": "^2.0.4"
|
221 |
+
},
|
222 |
+
"engines": {
|
223 |
+
"node": ">= 8"
|
224 |
+
}
|
225 |
+
},
|
226 |
+
"node_modules/array-flatten": {
|
227 |
+
"version": "1.1.1",
|
228 |
+
"resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz",
|
229 |
+
"integrity": "sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg=="
|
230 |
+
},
|
231 |
+
"node_modules/asynckit": {
|
232 |
+
"version": "0.4.0",
|
233 |
+
"resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz",
|
234 |
+
"integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q=="
|
235 |
+
},
|
236 |
+
"node_modules/axios": {
|
237 |
+
"version": "1.4.0",
|
238 |
+
"resolved": "https://registry.npmjs.org/axios/-/axios-1.4.0.tgz",
|
239 |
+
"integrity": "sha512-S4XCWMEmzvo64T9GfvQDOXgYRDJ/wsSZc7Jvdgx5u1sd0JwsuPLqb3SYmusag+edF6ziyMensPVqLTSc1PiSEA==",
|
240 |
+
"dependencies": {
|
241 |
+
"follow-redirects": "^1.15.0",
|
242 |
+
"form-data": "^4.0.0",
|
243 |
+
"proxy-from-env": "^1.1.0"
|
244 |
+
}
|
245 |
+
},
|
246 |
+
"node_modules/balanced-match": {
|
247 |
+
"version": "1.0.2",
|
248 |
+
"resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz",
|
249 |
+
"integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw=="
|
250 |
+
},
|
251 |
+
"node_modules/base64id": {
|
252 |
+
"version": "2.0.0",
|
253 |
+
"resolved": "https://registry.npmjs.org/base64id/-/base64id-2.0.0.tgz",
|
254 |
+
"integrity": "sha512-lGe34o6EHj9y3Kts9R4ZYs/Gr+6N7MCaMlIFA3F1R2O5/m7K06AxfSeO5530PEERE6/WyEg3lsuyw4GHlPZHog==",
|
255 |
+
"engines": {
|
256 |
+
"node": "^4.5.0 || >= 5.9"
|
257 |
+
}
|
258 |
+
},
|
259 |
+
"node_modules/binary-extensions": {
|
260 |
+
"version": "2.2.0",
|
261 |
+
"resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz",
|
262 |
+
"integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==",
|
263 |
+
"engines": {
|
264 |
+
"node": ">=8"
|
265 |
+
}
|
266 |
+
},
|
267 |
+
"node_modules/body-parser": {
|
268 |
+
"version": "1.20.1",
|
269 |
+
"resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.1.tgz",
|
270 |
+
"integrity": "sha512-jWi7abTbYwajOytWCQc37VulmWiRae5RyTpaCyDcS5/lMdtwSz5lOpDE67srw/HYe35f1z3fDQw+3txg7gNtWw==",
|
271 |
+
"dependencies": {
|
272 |
+
"bytes": "3.1.2",
|
273 |
+
"content-type": "~1.0.4",
|
274 |
+
"debug": "2.6.9",
|
275 |
+
"depd": "2.0.0",
|
276 |
+
"destroy": "1.2.0",
|
277 |
+
"http-errors": "2.0.0",
|
278 |
+
"iconv-lite": "0.4.24",
|
279 |
+
"on-finished": "2.4.1",
|
280 |
+
"qs": "6.11.0",
|
281 |
+
"raw-body": "2.5.1",
|
282 |
+
"type-is": "~1.6.18",
|
283 |
+
"unpipe": "1.0.0"
|
284 |
+
},
|
285 |
+
"engines": {
|
286 |
+
"node": ">= 0.8",
|
287 |
+
"npm": "1.2.8000 || >= 1.4.16"
|
288 |
+
}
|
289 |
+
},
|
290 |
+
"node_modules/body-parser/node_modules/debug": {
|
291 |
+
"version": "2.6.9",
|
292 |
+
"resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",
|
293 |
+
"integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==",
|
294 |
+
"dependencies": {
|
295 |
+
"ms": "2.0.0"
|
296 |
+
}
|
297 |
+
},
|
298 |
+
"node_modules/body-parser/node_modules/ms": {
|
299 |
+
"version": "2.0.0",
|
300 |
+
"resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
|
301 |
+
"integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A=="
|
302 |
+
},
|
303 |
+
"node_modules/brace-expansion": {
|
304 |
+
"version": "1.1.11",
|
305 |
+
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz",
|
306 |
+
"integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==",
|
307 |
+
"dependencies": {
|
308 |
+
"balanced-match": "^1.0.0",
|
309 |
+
"concat-map": "0.0.1"
|
310 |
+
}
|
311 |
+
},
|
312 |
+
"node_modules/braces": {
|
313 |
+
"version": "3.0.2",
|
314 |
+
"resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz",
|
315 |
+
"integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==",
|
316 |
+
"dependencies": {
|
317 |
+
"fill-range": "^7.0.1"
|
318 |
+
},
|
319 |
+
"engines": {
|
320 |
+
"node": ">=8"
|
321 |
+
}
|
322 |
+
},
|
323 |
+
"node_modules/bson": {
|
324 |
+
"version": "5.3.0",
|
325 |
+
"resolved": "https://registry.npmjs.org/bson/-/bson-5.3.0.tgz",
|
326 |
+
"integrity": "sha512-ukmCZMneMlaC5ebPHXIkP8YJzNl5DC41N5MAIvKDqLggdao342t4McltoJBQfQya/nHBWAcSsYRqlXPoQkTJag==",
|
327 |
+
"engines": {
|
328 |
+
"node": ">=14.20.1"
|
329 |
+
}
|
330 |
+
},
|
331 |
+
"node_modules/bytes": {
|
332 |
+
"version": "3.1.2",
|
333 |
+
"resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz",
|
334 |
+
"integrity": "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==",
|
335 |
+
"engines": {
|
336 |
+
"node": ">= 0.8"
|
337 |
+
}
|
338 |
+
},
|
339 |
+
"node_modules/call-bind": {
|
340 |
+
"version": "1.0.2",
|
341 |
+
"resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz",
|
342 |
+
"integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==",
|
343 |
+
"dependencies": {
|
344 |
+
"function-bind": "^1.1.1",
|
345 |
+
"get-intrinsic": "^1.0.2"
|
346 |
+
},
|
347 |
+
"funding": {
|
348 |
+
"url": "https://github.com/sponsors/ljharb"
|
349 |
+
}
|
350 |
+
},
|
351 |
+
"node_modules/charenc": {
|
352 |
+
"version": "0.0.2",
|
353 |
+
"resolved": "https://registry.npmjs.org/charenc/-/charenc-0.0.2.tgz",
|
354 |
+
"integrity": "sha512-yrLQ/yVUFXkzg7EDQsPieE/53+0RlaWTs+wBrvW36cyilJ2SaDWfl4Yj7MtLTXleV9uEKefbAGUPv2/iWSooRA==",
|
355 |
+
"engines": {
|
356 |
+
"node": "*"
|
357 |
+
}
|
358 |
+
},
|
359 |
+
"node_modules/chokidar": {
|
360 |
+
"version": "3.5.3",
|
361 |
+
"resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz",
|
362 |
+
"integrity": "sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==",
|
363 |
+
"funding": [
|
364 |
+
{
|
365 |
+
"type": "individual",
|
366 |
+
"url": "https://paulmillr.com/funding/"
|
367 |
+
}
|
368 |
+
],
|
369 |
+
"dependencies": {
|
370 |
+
"anymatch": "~3.1.2",
|
371 |
+
"braces": "~3.0.2",
|
372 |
+
"glob-parent": "~5.1.2",
|
373 |
+
"is-binary-path": "~2.1.0",
|
374 |
+
"is-glob": "~4.0.1",
|
375 |
+
"normalize-path": "~3.0.0",
|
376 |
+
"readdirp": "~3.6.0"
|
377 |
+
},
|
378 |
+
"engines": {
|
379 |
+
"node": ">= 8.10.0"
|
380 |
+
},
|
381 |
+
"optionalDependencies": {
|
382 |
+
"fsevents": "~2.3.2"
|
383 |
+
}
|
384 |
+
},
|
385 |
+
"node_modules/color-convert": {
|
386 |
+
"version": "2.0.1",
|
387 |
+
"resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
|
388 |
+
"integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
|
389 |
+
"dependencies": {
|
390 |
+
"color-name": "~1.1.4"
|
391 |
+
},
|
392 |
+
"engines": {
|
393 |
+
"node": ">=7.0.0"
|
394 |
+
}
|
395 |
+
},
|
396 |
+
"node_modules/color-name": {
|
397 |
+
"version": "1.1.4",
|
398 |
+
"resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
|
399 |
+
"integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA=="
|
400 |
+
},
|
401 |
+
"node_modules/combined-stream": {
|
402 |
+
"version": "1.0.8",
|
403 |
+
"resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz",
|
404 |
+
"integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==",
|
405 |
+
"dependencies": {
|
406 |
+
"delayed-stream": "~1.0.0"
|
407 |
+
},
|
408 |
+
"engines": {
|
409 |
+
"node": ">= 0.8"
|
410 |
+
}
|
411 |
+
},
|
412 |
+
"node_modules/concat-map": {
|
413 |
+
"version": "0.0.1",
|
414 |
+
"resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz",
|
415 |
+
"integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg=="
|
416 |
+
},
|
417 |
+
"node_modules/content-disposition": {
|
418 |
+
"version": "0.5.4",
|
419 |
+
"resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.4.tgz",
|
420 |
+
"integrity": "sha512-FveZTNuGw04cxlAiWbzi6zTAL/lhehaWbTtgluJh4/E95DqMwTmha3KZN1aAWA8cFIhHzMZUvLevkw5Rqk+tSQ==",
|
421 |
+
"dependencies": {
|
422 |
+
"safe-buffer": "5.2.1"
|
423 |
+
},
|
424 |
+
"engines": {
|
425 |
+
"node": ">= 0.6"
|
426 |
+
}
|
427 |
+
},
|
428 |
+
"node_modules/content-type": {
|
429 |
+
"version": "1.0.5",
|
430 |
+
"resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.5.tgz",
|
431 |
+
"integrity": "sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA==",
|
432 |
+
"engines": {
|
433 |
+
"node": ">= 0.6"
|
434 |
+
}
|
435 |
+
},
|
436 |
+
"node_modules/cookie": {
|
437 |
+
"version": "0.5.0",
|
438 |
+
"resolved": "https://registry.npmjs.org/cookie/-/cookie-0.5.0.tgz",
|
439 |
+
"integrity": "sha512-YZ3GUyn/o8gfKJlnlX7g7xq4gyO6OSuhGPKaaGssGB2qgDUS0gPgtTvoyZLTt9Ab6dC4hfc9dV5arkvc/OCmrw==",
|
440 |
+
"engines": {
|
441 |
+
"node": ">= 0.6"
|
442 |
+
}
|
443 |
+
},
|
444 |
+
"node_modules/cookie-parser": {
|
445 |
+
"version": "1.4.6",
|
446 |
+
"resolved": "https://registry.npmjs.org/cookie-parser/-/cookie-parser-1.4.6.tgz",
|
447 |
+
"integrity": "sha512-z3IzaNjdwUC2olLIB5/ITd0/setiaFMLYiZJle7xg5Fe9KWAceil7xszYfHHBtDFYLSgJduS2Ty0P1uJdPDJeA==",
|
448 |
+
"dependencies": {
|
449 |
+
"cookie": "0.4.1",
|
450 |
+
"cookie-signature": "1.0.6"
|
451 |
+
},
|
452 |
+
"engines": {
|
453 |
+
"node": ">= 0.8.0"
|
454 |
+
}
|
455 |
+
},
|
456 |
+
"node_modules/cookie-parser/node_modules/cookie": {
|
457 |
+
"version": "0.4.1",
|
458 |
+
"resolved": "https://registry.npmjs.org/cookie/-/cookie-0.4.1.tgz",
|
459 |
+
"integrity": "sha512-ZwrFkGJxUR3EIoXtO+yVE69Eb7KlixbaeAWfBQB9vVsNn/o+Yw69gBWSSDK825hQNdN+wF8zELf3dFNl/kxkUA==",
|
460 |
+
"engines": {
|
461 |
+
"node": ">= 0.6"
|
462 |
+
}
|
463 |
+
},
|
464 |
+
"node_modules/cookie-signature": {
|
465 |
+
"version": "1.0.6",
|
466 |
+
"resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz",
|
467 |
+
"integrity": "sha512-QADzlaHc8icV8I7vbaJXJwod9HWYp8uCqf1xa4OfNu1T7JVxQIrUgOWtHdNDtPiywmFbiS12VjotIXLrKM3orQ=="
|
468 |
+
},
|
469 |
+
"node_modules/cors": {
|
470 |
+
"version": "2.8.5",
|
471 |
+
"resolved": "https://registry.npmjs.org/cors/-/cors-2.8.5.tgz",
|
472 |
+
"integrity": "sha512-KIHbLJqu73RGr/hnbrO9uBeixNGuvSQjul/jdFvS/KFSIH1hWVd1ng7zOHx+YrEfInLG7q4n6GHQ9cDtxv/P6g==",
|
473 |
+
"dependencies": {
|
474 |
+
"object-assign": "^4",
|
475 |
+
"vary": "^1"
|
476 |
+
},
|
477 |
+
"engines": {
|
478 |
+
"node": ">= 0.10"
|
479 |
+
}
|
480 |
+
},
|
481 |
+
"node_modules/cross-spawn": {
|
482 |
+
"version": "7.0.3",
|
483 |
+
"resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz",
|
484 |
+
"integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==",
|
485 |
+
"dependencies": {
|
486 |
+
"path-key": "^3.1.0",
|
487 |
+
"shebang-command": "^2.0.0",
|
488 |
+
"which": "^2.0.1"
|
489 |
+
},
|
490 |
+
"engines": {
|
491 |
+
"node": ">= 8"
|
492 |
+
}
|
493 |
+
},
|
494 |
+
"node_modules/crypt": {
|
495 |
+
"version": "0.0.2",
|
496 |
+
"resolved": "https://registry.npmjs.org/crypt/-/crypt-0.0.2.tgz",
|
497 |
+
"integrity": "sha512-mCxBlsHFYh9C+HVpiEacem8FEBnMXgU9gy4zmNC+SXAZNB/1idgp/aulFJ4FgCi7GPEVbfyng092GqL2k2rmow==",
|
498 |
+
"engines": {
|
499 |
+
"node": "*"
|
500 |
+
}
|
501 |
+
},
|
502 |
+
"node_modules/data-uri-to-buffer": {
|
503 |
+
"version": "4.0.1",
|
504 |
+
"resolved": "https://registry.npmjs.org/data-uri-to-buffer/-/data-uri-to-buffer-4.0.1.tgz",
|
505 |
+
"integrity": "sha512-0R9ikRb668HB7QDxT1vkpuUBtqc53YyAwMwGeUFKRojY/NWKvdZ+9UYtRfGmhqNbRkTSVpMbmyhXipFFv2cb/A==",
|
506 |
+
"engines": {
|
507 |
+
"node": ">= 12"
|
508 |
+
}
|
509 |
+
},
|
510 |
+
"node_modules/debug": {
|
511 |
+
"version": "3.2.7",
|
512 |
+
"resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz",
|
513 |
+
"integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==",
|
514 |
+
"dependencies": {
|
515 |
+
"ms": "^2.1.1"
|
516 |
+
}
|
517 |
+
},
|
518 |
+
"node_modules/delayed-stream": {
|
519 |
+
"version": "1.0.0",
|
520 |
+
"resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz",
|
521 |
+
"integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==",
|
522 |
+
"engines": {
|
523 |
+
"node": ">=0.4.0"
|
524 |
+
}
|
525 |
+
},
|
526 |
+
"node_modules/depd": {
|
527 |
+
"version": "2.0.0",
|
528 |
+
"resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz",
|
529 |
+
"integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==",
|
530 |
+
"engines": {
|
531 |
+
"node": ">= 0.8"
|
532 |
+
}
|
533 |
+
},
|
534 |
+
"node_modules/describe": {
|
535 |
+
"version": "1.2.0",
|
536 |
+
"resolved": "https://registry.npmjs.org/describe/-/describe-1.2.0.tgz",
|
537 |
+
"integrity": "sha512-GcSTMsJD6d39QuE1Zor671dlY5pDY9IIVLHAidXLrTx6BmMQOyCKEX1btTI781+zA3GQYRcUITi+YoUjFB06UA==",
|
538 |
+
"dependencies": {
|
539 |
+
"string-color": ">= 0.8.0"
|
540 |
+
}
|
541 |
+
},
|
542 |
+
"node_modules/destroy": {
|
543 |
+
"version": "1.2.0",
|
544 |
+
"resolved": "https://registry.npmjs.org/destroy/-/destroy-1.2.0.tgz",
|
545 |
+
"integrity": "sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg==",
|
546 |
+
"engines": {
|
547 |
+
"node": ">= 0.8",
|
548 |
+
"npm": "1.2.8000 || >= 1.4.16"
|
549 |
+
}
|
550 |
+
},
|
551 |
+
"node_modules/discord": {
|
552 |
+
"version": "0.8.2",
|
553 |
+
"resolved": "https://registry.npmjs.org/discord/-/discord-0.8.2.tgz",
|
554 |
+
"integrity": "sha512-n8uOSuwvh+JLS3nrU/Jjom7TYX3jpAueTQ4NSQLf+SMsBZAjdzll4+zwYxxHxH7hvngmT12P0zP08dfHGh1xmQ==",
|
555 |
+
"dependencies": {
|
556 |
+
"describe": ">=0.8.0",
|
557 |
+
"glob": ">3.0.1",
|
558 |
+
"mootools": ">=1.4.4",
|
559 |
+
"string-color": ">=0.8.0"
|
560 |
+
},
|
561 |
+
"engines": {
|
562 |
+
"node": "*"
|
563 |
+
}
|
564 |
+
},
|
565 |
+
"node_modules/discord-api-types": {
|
566 |
+
"version": "0.33.5",
|
567 |
+
"resolved": "https://registry.npmjs.org/discord-api-types/-/discord-api-types-0.33.5.tgz",
|
568 |
+
"integrity": "sha512-dvO5M52v7m7Dy96+XUnzXNsQ/0npsYpU6dL205kAtEDueswoz3aU3bh1UMoK4cQmcGtB1YRyLKqp+DXi05lzFg=="
|
569 |
+
},
|
570 |
+
"node_modules/discord.js": {
|
571 |
+
"version": "13.16.0",
|
572 |
+
"resolved": "https://registry.npmjs.org/discord.js/-/discord.js-13.16.0.tgz",
|
573 |
+
"integrity": "sha512-bOoCs1Ilojd/UshZVxmEcpxVmHcYOv2fPVZOVq3aFV8xrKLJfaF9mxlvGZ1D1z9aIqf2NkptDr+QndeNuQBTxQ==",
|
574 |
+
"dependencies": {
|
575 |
+
"@discordjs/builders": "^0.16.0",
|
576 |
+
"@discordjs/collection": "^0.7.0",
|
577 |
+
"@sapphire/async-queue": "^1.5.0",
|
578 |
+
"@types/node-fetch": "^2.6.3",
|
579 |
+
"@types/ws": "^8.5.4",
|
580 |
+
"discord-api-types": "^0.33.5",
|
581 |
+
"form-data": "^4.0.0",
|
582 |
+
"node-fetch": "^2.6.7",
|
583 |
+
"ws": "^8.13.0"
|
584 |
+
},
|
585 |
+
"engines": {
|
586 |
+
"node": ">=16.6.0",
|
587 |
+
"npm": ">=7.0.0"
|
588 |
+
}
|
589 |
+
},
|
590 |
+
"node_modules/discord.js/node_modules/node-fetch": {
|
591 |
+
"version": "2.6.12",
|
592 |
+
"resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.12.tgz",
|
593 |
+
"integrity": "sha512-C/fGU2E8ToujUivIO0H+tpQ6HWo4eEmchoPIoXtxCrVghxdKq+QOHqEZW7tuP3KlV3bC8FRMO5nMCC7Zm1VP6g==",
|
594 |
+
"dependencies": {
|
595 |
+
"whatwg-url": "^5.0.0"
|
596 |
+
},
|
597 |
+
"engines": {
|
598 |
+
"node": "4.x || >=6.0.0"
|
599 |
+
},
|
600 |
+
"peerDependencies": {
|
601 |
+
"encoding": "^0.1.0"
|
602 |
+
},
|
603 |
+
"peerDependenciesMeta": {
|
604 |
+
"encoding": {
|
605 |
+
"optional": true
|
606 |
+
}
|
607 |
+
}
|
608 |
+
},
|
609 |
+
"node_modules/discord.js/node_modules/tr46": {
|
610 |
+
"version": "0.0.3",
|
611 |
+
"resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz",
|
612 |
+
"integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw=="
|
613 |
+
},
|
614 |
+
"node_modules/discord.js/node_modules/webidl-conversions": {
|
615 |
+
"version": "3.0.1",
|
616 |
+
"resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz",
|
617 |
+
"integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ=="
|
618 |
+
},
|
619 |
+
"node_modules/discord.js/node_modules/whatwg-url": {
|
620 |
+
"version": "5.0.0",
|
621 |
+
"resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz",
|
622 |
+
"integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==",
|
623 |
+
"dependencies": {
|
624 |
+
"tr46": "~0.0.3",
|
625 |
+
"webidl-conversions": "^3.0.0"
|
626 |
+
}
|
627 |
+
},
|
628 |
+
"node_modules/dotenv": {
|
629 |
+
"version": "16.3.1",
|
630 |
+
"resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.3.1.tgz",
|
631 |
+
"integrity": "sha512-IPzF4w4/Rd94bA9imS68tZBaYyBWSCE47V1RGuMrB94iyTOIEwRmVL2x/4An+6mETpLrKJ5hQkB8W4kFAadeIQ==",
|
632 |
+
"engines": {
|
633 |
+
"node": ">=12"
|
634 |
+
},
|
635 |
+
"funding": {
|
636 |
+
"url": "https://github.com/motdotla/dotenv?sponsor=1"
|
637 |
+
}
|
638 |
+
},
|
639 |
+
"node_modules/eastasianwidth": {
|
640 |
+
"version": "0.2.0",
|
641 |
+
"resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz",
|
642 |
+
"integrity": "sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA=="
|
643 |
+
},
|
644 |
+
"node_modules/ee-first": {
|
645 |
+
"version": "1.1.1",
|
646 |
+
"resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz",
|
647 |
+
"integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow=="
|
648 |
+
},
|
649 |
+
"node_modules/emoji-regex": {
|
650 |
+
"version": "9.2.2",
|
651 |
+
"resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz",
|
652 |
+
"integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg=="
|
653 |
+
},
|
654 |
+
"node_modules/encodeurl": {
|
655 |
+
"version": "1.0.2",
|
656 |
+
"resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz",
|
657 |
+
"integrity": "sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w==",
|
658 |
+
"engines": {
|
659 |
+
"node": ">= 0.8"
|
660 |
+
}
|
661 |
+
},
|
662 |
+
"node_modules/engine.io": {
|
663 |
+
"version": "6.5.1",
|
664 |
+
"resolved": "https://registry.npmjs.org/engine.io/-/engine.io-6.5.1.tgz",
|
665 |
+
"integrity": "sha512-mGqhI+D7YxS9KJMppR6Iuo37Ed3abhU8NdfgSvJSDUafQutrN+sPTncJYTyM9+tkhSmWodKtVYGPPHyXJEwEQA==",
|
666 |
+
"dependencies": {
|
667 |
+
"@types/cookie": "^0.4.1",
|
668 |
+
"@types/cors": "^2.8.12",
|
669 |
+
"@types/node": ">=10.0.0",
|
670 |
+
"accepts": "~1.3.4",
|
671 |
+
"base64id": "2.0.0",
|
672 |
+
"cookie": "~0.4.1",
|
673 |
+
"cors": "~2.8.5",
|
674 |
+
"debug": "~4.3.1",
|
675 |
+
"engine.io-parser": "~5.1.0",
|
676 |
+
"ws": "~8.11.0"
|
677 |
+
},
|
678 |
+
"engines": {
|
679 |
+
"node": ">=10.0.0"
|
680 |
+
}
|
681 |
+
},
|
682 |
+
"node_modules/engine.io-parser": {
|
683 |
+
"version": "5.1.0",
|
684 |
+
"resolved": "https://registry.npmjs.org/engine.io-parser/-/engine.io-parser-5.1.0.tgz",
|
685 |
+
"integrity": "sha512-enySgNiK5tyZFynt3z7iqBR+Bto9EVVVvDFuTT0ioHCGbzirZVGDGiQjZzEp8hWl6hd5FSVytJGuScX1C1C35w==",
|
686 |
+
"engines": {
|
687 |
+
"node": ">=10.0.0"
|
688 |
+
}
|
689 |
+
},
|
690 |
+
"node_modules/engine.io/node_modules/cookie": {
|
691 |
+
"version": "0.4.2",
|
692 |
+
"resolved": "https://registry.npmjs.org/cookie/-/cookie-0.4.2.tgz",
|
693 |
+
"integrity": "sha512-aSWTXFzaKWkvHO1Ny/s+ePFpvKsPnjc551iI41v3ny/ow6tBG5Vd+FuqGNhh1LxOmVzOlGUriIlOaokOvhaStA==",
|
694 |
+
"engines": {
|
695 |
+
"node": ">= 0.6"
|
696 |
+
}
|
697 |
+
},
|
698 |
+
"node_modules/engine.io/node_modules/debug": {
|
699 |
+
"version": "4.3.4",
|
700 |
+
"resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz",
|
701 |
+
"integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==",
|
702 |
+
"dependencies": {
|
703 |
+
"ms": "2.1.2"
|
704 |
+
},
|
705 |
+
"engines": {
|
706 |
+
"node": ">=6.0"
|
707 |
+
},
|
708 |
+
"peerDependenciesMeta": {
|
709 |
+
"supports-color": {
|
710 |
+
"optional": true
|
711 |
+
}
|
712 |
+
}
|
713 |
+
},
|
714 |
+
"node_modules/engine.io/node_modules/ms": {
|
715 |
+
"version": "2.1.2",
|
716 |
+
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
|
717 |
+
"integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w=="
|
718 |
+
},
|
719 |
+
"node_modules/engine.io/node_modules/ws": {
|
720 |
+
"version": "8.11.0",
|
721 |
+
"resolved": "https://registry.npmjs.org/ws/-/ws-8.11.0.tgz",
|
722 |
+
"integrity": "sha512-HPG3wQd9sNQoT9xHyNCXoDUa+Xw/VevmY9FoHyQ+g+rrMn4j6FB4np7Z0OhdTgjx6MgQLK7jwSy1YecU1+4Asg==",
|
723 |
+
"engines": {
|
724 |
+
"node": ">=10.0.0"
|
725 |
+
},
|
726 |
+
"peerDependencies": {
|
727 |
+
"bufferutil": "^4.0.1",
|
728 |
+
"utf-8-validate": "^5.0.2"
|
729 |
+
},
|
730 |
+
"peerDependenciesMeta": {
|
731 |
+
"bufferutil": {
|
732 |
+
"optional": true
|
733 |
+
},
|
734 |
+
"utf-8-validate": {
|
735 |
+
"optional": true
|
736 |
+
}
|
737 |
+
}
|
738 |
+
},
|
739 |
+
"node_modules/escape-html": {
|
740 |
+
"version": "1.0.3",
|
741 |
+
"resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz",
|
742 |
+
"integrity": "sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow=="
|
743 |
+
},
|
744 |
+
"node_modules/etag": {
|
745 |
+
"version": "1.8.1",
|
746 |
+
"resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz",
|
747 |
+
"integrity": "sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg==",
|
748 |
+
"engines": {
|
749 |
+
"node": ">= 0.6"
|
750 |
+
}
|
751 |
+
},
|
752 |
+
"node_modules/express": {
|
753 |
+
"version": "4.18.2",
|
754 |
+
"resolved": "https://registry.npmjs.org/express/-/express-4.18.2.tgz",
|
755 |
+
"integrity": "sha512-5/PsL6iGPdfQ/lKM1UuielYgv3BUoJfz1aUwU9vHZ+J7gyvwdQXFEBIEIaxeGf0GIcreATNyBExtalisDbuMqQ==",
|
756 |
+
"dependencies": {
|
757 |
+
"accepts": "~1.3.8",
|
758 |
+
"array-flatten": "1.1.1",
|
759 |
+
"body-parser": "1.20.1",
|
760 |
+
"content-disposition": "0.5.4",
|
761 |
+
"content-type": "~1.0.4",
|
762 |
+
"cookie": "0.5.0",
|
763 |
+
"cookie-signature": "1.0.6",
|
764 |
+
"debug": "2.6.9",
|
765 |
+
"depd": "2.0.0",
|
766 |
+
"encodeurl": "~1.0.2",
|
767 |
+
"escape-html": "~1.0.3",
|
768 |
+
"etag": "~1.8.1",
|
769 |
+
"finalhandler": "1.2.0",
|
770 |
+
"fresh": "0.5.2",
|
771 |
+
"http-errors": "2.0.0",
|
772 |
+
"merge-descriptors": "1.0.1",
|
773 |
+
"methods": "~1.1.2",
|
774 |
+
"on-finished": "2.4.1",
|
775 |
+
"parseurl": "~1.3.3",
|
776 |
+
"path-to-regexp": "0.1.7",
|
777 |
+
"proxy-addr": "~2.0.7",
|
778 |
+
"qs": "6.11.0",
|
779 |
+
"range-parser": "~1.2.1",
|
780 |
+
"safe-buffer": "5.2.1",
|
781 |
+
"send": "0.18.0",
|
782 |
+
"serve-static": "1.15.0",
|
783 |
+
"setprototypeof": "1.2.0",
|
784 |
+
"statuses": "2.0.1",
|
785 |
+
"type-is": "~1.6.18",
|
786 |
+
"utils-merge": "1.0.1",
|
787 |
+
"vary": "~1.1.2"
|
788 |
+
},
|
789 |
+
"engines": {
|
790 |
+
"node": ">= 0.10.0"
|
791 |
+
}
|
792 |
+
},
|
793 |
+
"node_modules/express-async-handler": {
|
794 |
+
"version": "1.2.0",
|
795 |
+
"resolved": "https://registry.npmjs.org/express-async-handler/-/express-async-handler-1.2.0.tgz",
|
796 |
+
"integrity": "sha512-rCSVtPXRmQSW8rmik/AIb2P0op6l7r1fMW538yyvTMltCO4xQEWMmobfrIxN2V1/mVrgxB8Az3reYF6yUZw37w=="
|
797 |
+
},
|
798 |
+
"node_modules/express-session": {
|
799 |
+
"version": "1.17.3",
|
800 |
+
"resolved": "https://registry.npmjs.org/express-session/-/express-session-1.17.3.tgz",
|
801 |
+
"integrity": "sha512-4+otWXlShYlG1Ma+2Jnn+xgKUZTMJ5QD3YvfilX3AcocOAbIkVylSWEklzALe/+Pu4qV6TYBj5GwOBFfdKqLBw==",
|
802 |
+
"dependencies": {
|
803 |
+
"cookie": "0.4.2",
|
804 |
+
"cookie-signature": "1.0.6",
|
805 |
+
"debug": "2.6.9",
|
806 |
+
"depd": "~2.0.0",
|
807 |
+
"on-headers": "~1.0.2",
|
808 |
+
"parseurl": "~1.3.3",
|
809 |
+
"safe-buffer": "5.2.1",
|
810 |
+
"uid-safe": "~2.1.5"
|
811 |
+
},
|
812 |
+
"engines": {
|
813 |
+
"node": ">= 0.8.0"
|
814 |
+
}
|
815 |
+
},
|
816 |
+
"node_modules/express-session/node_modules/cookie": {
|
817 |
+
"version": "0.4.2",
|
818 |
+
"resolved": "https://registry.npmjs.org/cookie/-/cookie-0.4.2.tgz",
|
819 |
+
"integrity": "sha512-aSWTXFzaKWkvHO1Ny/s+ePFpvKsPnjc551iI41v3ny/ow6tBG5Vd+FuqGNhh1LxOmVzOlGUriIlOaokOvhaStA==",
|
820 |
+
"engines": {
|
821 |
+
"node": ">= 0.6"
|
822 |
+
}
|
823 |
+
},
|
824 |
+
"node_modules/express-session/node_modules/debug": {
|
825 |
+
"version": "2.6.9",
|
826 |
+
"resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",
|
827 |
+
"integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==",
|
828 |
+
"dependencies": {
|
829 |
+
"ms": "2.0.0"
|
830 |
+
}
|
831 |
+
},
|
832 |
+
"node_modules/express-session/node_modules/ms": {
|
833 |
+
"version": "2.0.0",
|
834 |
+
"resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
|
835 |
+
"integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A=="
|
836 |
+
},
|
837 |
+
"node_modules/express/node_modules/debug": {
|
838 |
+
"version": "2.6.9",
|
839 |
+
"resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",
|
840 |
+
"integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==",
|
841 |
+
"dependencies": {
|
842 |
+
"ms": "2.0.0"
|
843 |
+
}
|
844 |
+
},
|
845 |
+
"node_modules/express/node_modules/ms": {
|
846 |
+
"version": "2.0.0",
|
847 |
+
"resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
|
848 |
+
"integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A=="
|
849 |
+
},
|
850 |
+
"node_modules/fast-deep-equal": {
|
851 |
+
"version": "3.1.3",
|
852 |
+
"resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz",
|
853 |
+
"integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q=="
|
854 |
+
},
|
855 |
+
"node_modules/fetch-blob": {
|
856 |
+
"version": "3.2.0",
|
857 |
+
"resolved": "https://registry.npmjs.org/fetch-blob/-/fetch-blob-3.2.0.tgz",
|
858 |
+
"integrity": "sha512-7yAQpD2UMJzLi1Dqv7qFYnPbaPx7ZfFK6PiIxQ4PfkGPyNyl2Ugx+a/umUonmKqjhM4DnfbMvdX6otXq83soQQ==",
|
859 |
+
"funding": [
|
860 |
+
{
|
861 |
+
"type": "github",
|
862 |
+
"url": "https://github.com/sponsors/jimmywarting"
|
863 |
+
},
|
864 |
+
{
|
865 |
+
"type": "paypal",
|
866 |
+
"url": "https://paypal.me/jimmywarting"
|
867 |
+
}
|
868 |
+
],
|
869 |
+
"dependencies": {
|
870 |
+
"node-domexception": "^1.0.0",
|
871 |
+
"web-streams-polyfill": "^3.0.3"
|
872 |
+
},
|
873 |
+
"engines": {
|
874 |
+
"node": "^12.20 || >= 14.13"
|
875 |
+
}
|
876 |
+
},
|
877 |
+
"node_modules/fill-range": {
|
878 |
+
"version": "7.0.1",
|
879 |
+
"resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz",
|
880 |
+
"integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==",
|
881 |
+
"dependencies": {
|
882 |
+
"to-regex-range": "^5.0.1"
|
883 |
+
},
|
884 |
+
"engines": {
|
885 |
+
"node": ">=8"
|
886 |
+
}
|
887 |
+
},
|
888 |
+
"node_modules/finalhandler": {
|
889 |
+
"version": "1.2.0",
|
890 |
+
"resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.2.0.tgz",
|
891 |
+
"integrity": "sha512-5uXcUVftlQMFnWC9qu/svkWv3GTd2PfUhK/3PLkYNAe7FbqJMt3515HaxE6eRL74GdsriiwujiawdaB1BpEISg==",
|
892 |
+
"dependencies": {
|
893 |
+
"debug": "2.6.9",
|
894 |
+
"encodeurl": "~1.0.2",
|
895 |
+
"escape-html": "~1.0.3",
|
896 |
+
"on-finished": "2.4.1",
|
897 |
+
"parseurl": "~1.3.3",
|
898 |
+
"statuses": "2.0.1",
|
899 |
+
"unpipe": "~1.0.0"
|
900 |
+
},
|
901 |
+
"engines": {
|
902 |
+
"node": ">= 0.8"
|
903 |
+
}
|
904 |
+
},
|
905 |
+
"node_modules/finalhandler/node_modules/debug": {
|
906 |
+
"version": "2.6.9",
|
907 |
+
"resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",
|
908 |
+
"integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==",
|
909 |
+
"dependencies": {
|
910 |
+
"ms": "2.0.0"
|
911 |
+
}
|
912 |
+
},
|
913 |
+
"node_modules/finalhandler/node_modules/ms": {
|
914 |
+
"version": "2.0.0",
|
915 |
+
"resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
|
916 |
+
"integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A=="
|
917 |
+
},
|
918 |
+
"node_modules/follow-redirects": {
|
919 |
+
"version": "1.15.2",
|
920 |
+
"resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.2.tgz",
|
921 |
+
"integrity": "sha512-VQLG33o04KaQ8uYi2tVNbdrWp1QWxNNea+nmIB4EVM28v0hmP17z7aG1+wAkNzVq4KeXTq3221ye5qTJP91JwA==",
|
922 |
+
"funding": [
|
923 |
+
{
|
924 |
+
"type": "individual",
|
925 |
+
"url": "https://github.com/sponsors/RubenVerborgh"
|
926 |
+
}
|
927 |
+
],
|
928 |
+
"engines": {
|
929 |
+
"node": ">=4.0"
|
930 |
+
},
|
931 |
+
"peerDependenciesMeta": {
|
932 |
+
"debug": {
|
933 |
+
"optional": true
|
934 |
+
}
|
935 |
+
}
|
936 |
+
},
|
937 |
+
"node_modules/foreground-child": {
|
938 |
+
"version": "3.1.1",
|
939 |
+
"resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-3.1.1.tgz",
|
940 |
+
"integrity": "sha512-TMKDUnIte6bfb5nWv7V/caI169OHgvwjb7V4WkeUvbQQdjr5rWKqHFiKWb/fcOwB+CzBT+qbWjvj+DVwRskpIg==",
|
941 |
+
"dependencies": {
|
942 |
+
"cross-spawn": "^7.0.0",
|
943 |
+
"signal-exit": "^4.0.1"
|
944 |
+
},
|
945 |
+
"engines": {
|
946 |
+
"node": ">=14"
|
947 |
+
},
|
948 |
+
"funding": {
|
949 |
+
"url": "https://github.com/sponsors/isaacs"
|
950 |
+
}
|
951 |
+
},
|
952 |
+
"node_modules/form-data": {
|
953 |
+
"version": "4.0.0",
|
954 |
+
"resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz",
|
955 |
+
"integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==",
|
956 |
+
"dependencies": {
|
957 |
+
"asynckit": "^0.4.0",
|
958 |
+
"combined-stream": "^1.0.8",
|
959 |
+
"mime-types": "^2.1.12"
|
960 |
+
},
|
961 |
+
"engines": {
|
962 |
+
"node": ">= 6"
|
963 |
+
}
|
964 |
+
},
|
965 |
+
"node_modules/formdata-polyfill": {
|
966 |
+
"version": "4.0.10",
|
967 |
+
"resolved": "https://registry.npmjs.org/formdata-polyfill/-/formdata-polyfill-4.0.10.tgz",
|
968 |
+
"integrity": "sha512-buewHzMvYL29jdeQTVILecSaZKnt/RJWjoZCF5OW60Z67/GmSLBkOFM7qh1PI3zFNtJbaZL5eQu1vLfazOwj4g==",
|
969 |
+
"dependencies": {
|
970 |
+
"fetch-blob": "^3.1.2"
|
971 |
+
},
|
972 |
+
"engines": {
|
973 |
+
"node": ">=12.20.0"
|
974 |
+
}
|
975 |
+
},
|
976 |
+
"node_modules/forwarded": {
|
977 |
+
"version": "0.2.0",
|
978 |
+
"resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.2.0.tgz",
|
979 |
+
"integrity": "sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow==",
|
980 |
+
"engines": {
|
981 |
+
"node": ">= 0.6"
|
982 |
+
}
|
983 |
+
},
|
984 |
+
"node_modules/fresh": {
|
985 |
+
"version": "0.5.2",
|
986 |
+
"resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz",
|
987 |
+
"integrity": "sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q==",
|
988 |
+
"engines": {
|
989 |
+
"node": ">= 0.6"
|
990 |
+
}
|
991 |
+
},
|
992 |
+
"node_modules/fsevents": {
|
993 |
+
"version": "2.3.2",
|
994 |
+
"resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz",
|
995 |
+
"integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==",
|
996 |
+
"hasInstallScript": true,
|
997 |
+
"optional": true,
|
998 |
+
"os": [
|
999 |
+
"darwin"
|
1000 |
+
],
|
1001 |
+
"engines": {
|
1002 |
+
"node": "^8.16.0 || ^10.6.0 || >=11.0.0"
|
1003 |
+
}
|
1004 |
+
},
|
1005 |
+
"node_modules/function-bind": {
|
1006 |
+
"version": "1.1.1",
|
1007 |
+
"resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz",
|
1008 |
+
"integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A=="
|
1009 |
+
},
|
1010 |
+
"node_modules/get-intrinsic": {
|
1011 |
+
"version": "1.2.1",
|
1012 |
+
"resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.1.tgz",
|
1013 |
+
"integrity": "sha512-2DcsyfABl+gVHEfCOaTrWgyt+tb6MSEGmKq+kI5HwLbIYgjgmMcV8KQ41uaKz1xxUcn9tJtgFbQUEVcEbd0FYw==",
|
1014 |
+
"dependencies": {
|
1015 |
+
"function-bind": "^1.1.1",
|
1016 |
+
"has": "^1.0.3",
|
1017 |
+
"has-proto": "^1.0.1",
|
1018 |
+
"has-symbols": "^1.0.3"
|
1019 |
+
},
|
1020 |
+
"funding": {
|
1021 |
+
"url": "https://github.com/sponsors/ljharb"
|
1022 |
+
}
|
1023 |
+
},
|
1024 |
+
"node_modules/glob": {
|
1025 |
+
"version": "10.3.1",
|
1026 |
+
"resolved": "https://registry.npmjs.org/glob/-/glob-10.3.1.tgz",
|
1027 |
+
"integrity": "sha512-9BKYcEeIs7QwlCYs+Y3GBvqAMISufUS0i2ELd11zpZjxI5V9iyRj0HgzB5/cLf2NY4vcYBTYzJ7GIui7j/4DOw==",
|
1028 |
+
"dependencies": {
|
1029 |
+
"foreground-child": "^3.1.0",
|
1030 |
+
"jackspeak": "^2.0.3",
|
1031 |
+
"minimatch": "^9.0.1",
|
1032 |
+
"minipass": "^5.0.0 || ^6.0.2",
|
1033 |
+
"path-scurry": "^1.10.0"
|
1034 |
+
},
|
1035 |
+
"bin": {
|
1036 |
+
"glob": "dist/cjs/src/bin.js"
|
1037 |
+
},
|
1038 |
+
"engines": {
|
1039 |
+
"node": ">=16 || 14 >=14.17"
|
1040 |
+
},
|
1041 |
+
"funding": {
|
1042 |
+
"url": "https://github.com/sponsors/isaacs"
|
1043 |
+
}
|
1044 |
+
},
|
1045 |
+
"node_modules/glob-parent": {
|
1046 |
+
"version": "5.1.2",
|
1047 |
+
"resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz",
|
1048 |
+
"integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==",
|
1049 |
+
"dependencies": {
|
1050 |
+
"is-glob": "^4.0.1"
|
1051 |
+
},
|
1052 |
+
"engines": {
|
1053 |
+
"node": ">= 6"
|
1054 |
+
}
|
1055 |
+
},
|
1056 |
+
"node_modules/glob/node_modules/brace-expansion": {
|
1057 |
+
"version": "2.0.1",
|
1058 |
+
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz",
|
1059 |
+
"integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==",
|
1060 |
+
"dependencies": {
|
1061 |
+
"balanced-match": "^1.0.0"
|
1062 |
+
}
|
1063 |
+
},
|
1064 |
+
"node_modules/glob/node_modules/minimatch": {
|
1065 |
+
"version": "9.0.2",
|
1066 |
+
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.2.tgz",
|
1067 |
+
"integrity": "sha512-PZOT9g5v2ojiTL7r1xF6plNHLtOeTpSlDI007As2NlA2aYBMfVom17yqa6QzhmDP8QOhn7LjHTg7DFCVSSa6yg==",
|
1068 |
+
"dependencies": {
|
1069 |
+
"brace-expansion": "^2.0.1"
|
1070 |
+
},
|
1071 |
+
"engines": {
|
1072 |
+
"node": ">=16 || 14 >=14.17"
|
1073 |
+
},
|
1074 |
+
"funding": {
|
1075 |
+
"url": "https://github.com/sponsors/isaacs"
|
1076 |
+
}
|
1077 |
+
},
|
1078 |
+
"node_modules/has": {
|
1079 |
+
"version": "1.0.3",
|
1080 |
+
"resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz",
|
1081 |
+
"integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==",
|
1082 |
+
"dependencies": {
|
1083 |
+
"function-bind": "^1.1.1"
|
1084 |
+
},
|
1085 |
+
"engines": {
|
1086 |
+
"node": ">= 0.4.0"
|
1087 |
+
}
|
1088 |
+
},
|
1089 |
+
"node_modules/has-flag": {
|
1090 |
+
"version": "3.0.0",
|
1091 |
+
"resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz",
|
1092 |
+
"integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==",
|
1093 |
+
"engines": {
|
1094 |
+
"node": ">=4"
|
1095 |
+
}
|
1096 |
+
},
|
1097 |
+
"node_modules/has-proto": {
|
1098 |
+
"version": "1.0.1",
|
1099 |
+
"resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.0.1.tgz",
|
1100 |
+
"integrity": "sha512-7qE+iP+O+bgF9clE5+UoBFzE65mlBiVj3tKCrlNQ0Ogwm0BjpT/gK4SlLYDMybDh5I3TCTKnPPa0oMG7JDYrhg==",
|
1101 |
+
"engines": {
|
1102 |
+
"node": ">= 0.4"
|
1103 |
+
},
|
1104 |
+
"funding": {
|
1105 |
+
"url": "https://github.com/sponsors/ljharb"
|
1106 |
+
}
|
1107 |
+
},
|
1108 |
+
"node_modules/has-symbols": {
|
1109 |
+
"version": "1.0.3",
|
1110 |
+
"resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz",
|
1111 |
+
"integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==",
|
1112 |
+
"engines": {
|
1113 |
+
"node": ">= 0.4"
|
1114 |
+
},
|
1115 |
+
"funding": {
|
1116 |
+
"url": "https://github.com/sponsors/ljharb"
|
1117 |
+
}
|
1118 |
+
},
|
1119 |
+
"node_modules/http-errors": {
|
1120 |
+
"version": "2.0.0",
|
1121 |
+
"resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.0.tgz",
|
1122 |
+
"integrity": "sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ==",
|
1123 |
+
"dependencies": {
|
1124 |
+
"depd": "2.0.0",
|
1125 |
+
"inherits": "2.0.4",
|
1126 |
+
"setprototypeof": "1.2.0",
|
1127 |
+
"statuses": "2.0.1",
|
1128 |
+
"toidentifier": "1.0.1"
|
1129 |
+
},
|
1130 |
+
"engines": {
|
1131 |
+
"node": ">= 0.8"
|
1132 |
+
}
|
1133 |
+
},
|
1134 |
+
"node_modules/iconv-lite": {
|
1135 |
+
"version": "0.4.24",
|
1136 |
+
"resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz",
|
1137 |
+
"integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==",
|
1138 |
+
"dependencies": {
|
1139 |
+
"safer-buffer": ">= 2.1.2 < 3"
|
1140 |
+
},
|
1141 |
+
"engines": {
|
1142 |
+
"node": ">=0.10.0"
|
1143 |
+
}
|
1144 |
+
},
|
1145 |
+
"node_modules/ignore-by-default": {
|
1146 |
+
"version": "1.0.1",
|
1147 |
+
"resolved": "https://registry.npmjs.org/ignore-by-default/-/ignore-by-default-1.0.1.tgz",
|
1148 |
+
"integrity": "sha512-Ius2VYcGNk7T90CppJqcIkS5ooHUZyIQK+ClZfMfMNFEF9VSE73Fq+906u/CWu92x4gzZMWOwfFYckPObzdEbA=="
|
1149 |
+
},
|
1150 |
+
"node_modules/inherits": {
|
1151 |
+
"version": "2.0.4",
|
1152 |
+
"resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz",
|
1153 |
+
"integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ=="
|
1154 |
+
},
|
1155 |
+
"node_modules/ip": {
|
1156 |
+
"version": "2.0.0",
|
1157 |
+
"resolved": "https://registry.npmjs.org/ip/-/ip-2.0.0.tgz",
|
1158 |
+
"integrity": "sha512-WKa+XuLG1A1R0UWhl2+1XQSi+fZWMsYKffMZTTYsiZaUD8k2yDAj5atimTUD2TZkyCkNEeYE5NhFZmupOGtjYQ=="
|
1159 |
+
},
|
1160 |
+
"node_modules/ipaddr.js": {
|
1161 |
+
"version": "1.9.1",
|
1162 |
+
"resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz",
|
1163 |
+
"integrity": "sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==",
|
1164 |
+
"engines": {
|
1165 |
+
"node": ">= 0.10"
|
1166 |
+
}
|
1167 |
+
},
|
1168 |
+
"node_modules/is-binary-path": {
|
1169 |
+
"version": "2.1.0",
|
1170 |
+
"resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz",
|
1171 |
+
"integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==",
|
1172 |
+
"dependencies": {
|
1173 |
+
"binary-extensions": "^2.0.0"
|
1174 |
+
},
|
1175 |
+
"engines": {
|
1176 |
+
"node": ">=8"
|
1177 |
+
}
|
1178 |
+
},
|
1179 |
+
"node_modules/is-buffer": {
|
1180 |
+
"version": "1.1.6",
|
1181 |
+
"resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz",
|
1182 |
+
"integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w=="
|
1183 |
+
},
|
1184 |
+
"node_modules/is-extglob": {
|
1185 |
+
"version": "2.1.1",
|
1186 |
+
"resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz",
|
1187 |
+
"integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==",
|
1188 |
+
"engines": {
|
1189 |
+
"node": ">=0.10.0"
|
1190 |
+
}
|
1191 |
+
},
|
1192 |
+
"node_modules/is-fullwidth-code-point": {
|
1193 |
+
"version": "3.0.0",
|
1194 |
+
"resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz",
|
1195 |
+
"integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==",
|
1196 |
+
"engines": {
|
1197 |
+
"node": ">=8"
|
1198 |
+
}
|
1199 |
+
},
|
1200 |
+
"node_modules/is-glob": {
|
1201 |
+
"version": "4.0.3",
|
1202 |
+
"resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz",
|
1203 |
+
"integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==",
|
1204 |
+
"dependencies": {
|
1205 |
+
"is-extglob": "^2.1.1"
|
1206 |
+
},
|
1207 |
+
"engines": {
|
1208 |
+
"node": ">=0.10.0"
|
1209 |
+
}
|
1210 |
+
},
|
1211 |
+
"node_modules/is-number": {
|
1212 |
+
"version": "7.0.0",
|
1213 |
+
"resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz",
|
1214 |
+
"integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==",
|
1215 |
+
"engines": {
|
1216 |
+
"node": ">=0.12.0"
|
1217 |
+
}
|
1218 |
+
},
|
1219 |
+
"node_modules/isexe": {
|
1220 |
+
"version": "2.0.0",
|
1221 |
+
"resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz",
|
1222 |
+
"integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw=="
|
1223 |
+
},
|
1224 |
+
"node_modules/jackspeak": {
|
1225 |
+
"version": "2.2.1",
|
1226 |
+
"resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-2.2.1.tgz",
|
1227 |
+
"integrity": "sha512-MXbxovZ/Pm42f6cDIDkl3xpwv1AGwObKwfmjs2nQePiy85tP3fatofl3FC1aBsOtP/6fq5SbtgHwWcMsLP+bDw==",
|
1228 |
+
"dependencies": {
|
1229 |
+
"@isaacs/cliui": "^8.0.2"
|
1230 |
+
},
|
1231 |
+
"engines": {
|
1232 |
+
"node": ">=14"
|
1233 |
+
},
|
1234 |
+
"funding": {
|
1235 |
+
"url": "https://github.com/sponsors/isaacs"
|
1236 |
+
},
|
1237 |
+
"optionalDependencies": {
|
1238 |
+
"@pkgjs/parseargs": "^0.11.0"
|
1239 |
+
}
|
1240 |
+
},
|
1241 |
+
"node_modules/kareem": {
|
1242 |
+
"version": "2.5.1",
|
1243 |
+
"resolved": "https://registry.npmjs.org/kareem/-/kareem-2.5.1.tgz",
|
1244 |
+
"integrity": "sha512-7jFxRVm+jD+rkq3kY0iZDJfsO2/t4BBPeEb2qKn2lR/9KhuksYk5hxzfRYWMPV8P/x2d0kHD306YyWLzjjH+uA==",
|
1245 |
+
"engines": {
|
1246 |
+
"node": ">=12.0.0"
|
1247 |
+
}
|
1248 |
+
},
|
1249 |
+
"node_modules/lodash": {
|
1250 |
+
"version": "4.17.21",
|
1251 |
+
"resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz",
|
1252 |
+
"integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg=="
|
1253 |
+
},
|
1254 |
+
"node_modules/lru-cache": {
|
1255 |
+
"version": "10.0.0",
|
1256 |
+
"resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.0.0.tgz",
|
1257 |
+
"integrity": "sha512-svTf/fzsKHffP42sujkO/Rjs37BCIsQVRCeNYIm9WN8rgT7ffoUnRtZCqU+6BqcSBdv8gwJeTz8knJpgACeQMw==",
|
1258 |
+
"engines": {
|
1259 |
+
"node": "14 || >=16.14"
|
1260 |
+
}
|
1261 |
+
},
|
1262 |
+
"node_modules/md5": {
|
1263 |
+
"version": "2.3.0",
|
1264 |
+
"resolved": "https://registry.npmjs.org/md5/-/md5-2.3.0.tgz",
|
1265 |
+
"integrity": "sha512-T1GITYmFaKuO91vxyoQMFETst+O71VUPEU3ze5GNzDm0OWdP8v1ziTaAEPUr/3kLsY3Sftgz242A1SetQiDL7g==",
|
1266 |
+
"dependencies": {
|
1267 |
+
"charenc": "0.0.2",
|
1268 |
+
"crypt": "0.0.2",
|
1269 |
+
"is-buffer": "~1.1.6"
|
1270 |
+
}
|
1271 |
+
},
|
1272 |
+
"node_modules/media-typer": {
|
1273 |
+
"version": "0.3.0",
|
1274 |
+
"resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz",
|
1275 |
+
"integrity": "sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ==",
|
1276 |
+
"engines": {
|
1277 |
+
"node": ">= 0.6"
|
1278 |
+
}
|
1279 |
+
},
|
1280 |
+
"node_modules/memory-pager": {
|
1281 |
+
"version": "1.5.0",
|
1282 |
+
"resolved": "https://registry.npmjs.org/memory-pager/-/memory-pager-1.5.0.tgz",
|
1283 |
+
"integrity": "sha512-ZS4Bp4r/Zoeq6+NLJpP+0Zzm0pR8whtGPf1XExKLJBAczGMnSi3It14OiNCStjQjM6NU1okjQGSxgEZN8eBYKg==",
|
1284 |
+
"optional": true
|
1285 |
+
},
|
1286 |
+
"node_modules/merge-descriptors": {
|
1287 |
+
"version": "1.0.1",
|
1288 |
+
"resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz",
|
1289 |
+
"integrity": "sha512-cCi6g3/Zr1iqQi6ySbseM1Xvooa98N0w31jzUYrXPX2xqObmFGHJ0tQ5u74H3mVh7wLouTseZyYIq39g8cNp1w=="
|
1290 |
+
},
|
1291 |
+
"node_modules/methods": {
|
1292 |
+
"version": "1.1.2",
|
1293 |
+
"resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz",
|
1294 |
+
"integrity": "sha512-iclAHeNqNm68zFtnZ0e+1L2yUIdvzNoauKU4WBA3VvH/vPFieF7qfRlwUZU+DA9P9bPXIS90ulxoUoCH23sV2w==",
|
1295 |
+
"engines": {
|
1296 |
+
"node": ">= 0.6"
|
1297 |
+
}
|
1298 |
+
},
|
1299 |
+
"node_modules/mime": {
|
1300 |
+
"version": "1.6.0",
|
1301 |
+
"resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz",
|
1302 |
+
"integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==",
|
1303 |
+
"bin": {
|
1304 |
+
"mime": "cli.js"
|
1305 |
+
},
|
1306 |
+
"engines": {
|
1307 |
+
"node": ">=4"
|
1308 |
+
}
|
1309 |
+
},
|
1310 |
+
"node_modules/mime-db": {
|
1311 |
+
"version": "1.52.0",
|
1312 |
+
"resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz",
|
1313 |
+
"integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==",
|
1314 |
+
"engines": {
|
1315 |
+
"node": ">= 0.6"
|
1316 |
+
}
|
1317 |
+
},
|
1318 |
+
"node_modules/mime-types": {
|
1319 |
+
"version": "2.1.35",
|
1320 |
+
"resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz",
|
1321 |
+
"integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==",
|
1322 |
+
"dependencies": {
|
1323 |
+
"mime-db": "1.52.0"
|
1324 |
+
},
|
1325 |
+
"engines": {
|
1326 |
+
"node": ">= 0.6"
|
1327 |
+
}
|
1328 |
+
},
|
1329 |
+
"node_modules/minimatch": {
|
1330 |
+
"version": "3.1.2",
|
1331 |
+
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz",
|
1332 |
+
"integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==",
|
1333 |
+
"dependencies": {
|
1334 |
+
"brace-expansion": "^1.1.7"
|
1335 |
+
},
|
1336 |
+
"engines": {
|
1337 |
+
"node": "*"
|
1338 |
+
}
|
1339 |
+
},
|
1340 |
+
"node_modules/minipass": {
|
1341 |
+
"version": "6.0.2",
|
1342 |
+
"resolved": "https://registry.npmjs.org/minipass/-/minipass-6.0.2.tgz",
|
1343 |
+
"integrity": "sha512-MzWSV5nYVT7mVyWCwn2o7JH13w2TBRmmSqSRCKzTw+lmft9X4z+3wjvs06Tzijo5z4W/kahUCDpRXTF+ZrmF/w==",
|
1344 |
+
"engines": {
|
1345 |
+
"node": ">=16 || 14 >=14.17"
|
1346 |
+
}
|
1347 |
+
},
|
1348 |
+
"node_modules/mongodb": {
|
1349 |
+
"version": "5.6.0",
|
1350 |
+
"resolved": "https://registry.npmjs.org/mongodb/-/mongodb-5.6.0.tgz",
|
1351 |
+
"integrity": "sha512-z8qVs9NfobHJm6uzK56XBZF8XwM9H294iRnB7wNjF0SnY93si5HPziIJn+qqvUR5QOff/4L0gCD6SShdR/GtVQ==",
|
1352 |
+
"dependencies": {
|
1353 |
+
"bson": "^5.3.0",
|
1354 |
+
"mongodb-connection-string-url": "^2.6.0",
|
1355 |
+
"socks": "^2.7.1"
|
1356 |
+
},
|
1357 |
+
"engines": {
|
1358 |
+
"node": ">=14.20.1"
|
1359 |
+
},
|
1360 |
+
"optionalDependencies": {
|
1361 |
+
"saslprep": "^1.0.3"
|
1362 |
+
},
|
1363 |
+
"peerDependencies": {
|
1364 |
+
"@aws-sdk/credential-providers": "^3.201.0",
|
1365 |
+
"mongodb-client-encryption": ">=2.3.0 <3",
|
1366 |
+
"snappy": "^7.2.2"
|
1367 |
+
},
|
1368 |
+
"peerDependenciesMeta": {
|
1369 |
+
"@aws-sdk/credential-providers": {
|
1370 |
+
"optional": true
|
1371 |
+
},
|
1372 |
+
"mongodb-client-encryption": {
|
1373 |
+
"optional": true
|
1374 |
+
},
|
1375 |
+
"snappy": {
|
1376 |
+
"optional": true
|
1377 |
+
}
|
1378 |
+
}
|
1379 |
+
},
|
1380 |
+
"node_modules/mongodb-connection-string-url": {
|
1381 |
+
"version": "2.6.0",
|
1382 |
+
"resolved": "https://registry.npmjs.org/mongodb-connection-string-url/-/mongodb-connection-string-url-2.6.0.tgz",
|
1383 |
+
"integrity": "sha512-WvTZlI9ab0QYtTYnuMLgobULWhokRjtC7db9LtcVfJ+Hsnyr5eo6ZtNAt3Ly24XZScGMelOcGtm7lSn0332tPQ==",
|
1384 |
+
"dependencies": {
|
1385 |
+
"@types/whatwg-url": "^8.2.1",
|
1386 |
+
"whatwg-url": "^11.0.0"
|
1387 |
+
}
|
1388 |
+
},
|
1389 |
+
"node_modules/mongoose": {
|
1390 |
+
"version": "7.3.1",
|
1391 |
+
"resolved": "https://registry.npmjs.org/mongoose/-/mongoose-7.3.1.tgz",
|
1392 |
+
"integrity": "sha512-6289bmSIhvR8xMHsYe2/CuzN7wHK+2RHcK7idDdzniCPC5zix5JH0Hc4k3CmXlr/9zQ2250gUQiUWtvDB0vF1Q==",
|
1393 |
+
"dependencies": {
|
1394 |
+
"bson": "^5.3.0",
|
1395 |
+
"kareem": "2.5.1",
|
1396 |
+
"mongodb": "5.6.0",
|
1397 |
+
"mpath": "0.9.0",
|
1398 |
+
"mquery": "5.0.0",
|
1399 |
+
"ms": "2.1.3",
|
1400 |
+
"sift": "16.0.1"
|
1401 |
+
},
|
1402 |
+
"engines": {
|
1403 |
+
"node": ">=14.20.1"
|
1404 |
+
},
|
1405 |
+
"funding": {
|
1406 |
+
"type": "opencollective",
|
1407 |
+
"url": "https://opencollective.com/mongoose"
|
1408 |
+
}
|
1409 |
+
},
|
1410 |
+
"node_modules/mootools": {
|
1411 |
+
"version": "1.5.2",
|
1412 |
+
"resolved": "https://registry.npmjs.org/mootools/-/mootools-1.5.2.tgz",
|
1413 |
+
"integrity": "sha512-S1cOCsakr8GJ3P1j66pXGgQfLtcRpFLcBkRcq0xXQ15T6IYtFWIQhqqqH8RR7eAa7/vFmKz90IIrzTnfrCHPFw==",
|
1414 |
+
"engines": {
|
1415 |
+
"node": ">=0.4.0"
|
1416 |
+
}
|
1417 |
+
},
|
1418 |
+
"node_modules/mpath": {
|
1419 |
+
"version": "0.9.0",
|
1420 |
+
"resolved": "https://registry.npmjs.org/mpath/-/mpath-0.9.0.tgz",
|
1421 |
+
"integrity": "sha512-ikJRQTk8hw5DEoFVxHG1Gn9T/xcjtdnOKIU1JTmGjZZlg9LST2mBLmcX3/ICIbgJydT2GOc15RnNy5mHmzfSew==",
|
1422 |
+
"engines": {
|
1423 |
+
"node": ">=4.0.0"
|
1424 |
+
}
|
1425 |
+
},
|
1426 |
+
"node_modules/mquery": {
|
1427 |
+
"version": "5.0.0",
|
1428 |
+
"resolved": "https://registry.npmjs.org/mquery/-/mquery-5.0.0.tgz",
|
1429 |
+
"integrity": "sha512-iQMncpmEK8R8ncT8HJGsGc9Dsp8xcgYMVSbs5jgnm1lFHTZqMJTUWTDx1LBO8+mK3tPNZWFLBghQEIOULSTHZg==",
|
1430 |
+
"dependencies": {
|
1431 |
+
"debug": "4.x"
|
1432 |
+
},
|
1433 |
+
"engines": {
|
1434 |
+
"node": ">=14.0.0"
|
1435 |
+
}
|
1436 |
+
},
|
1437 |
+
"node_modules/mquery/node_modules/debug": {
|
1438 |
+
"version": "4.3.4",
|
1439 |
+
"resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz",
|
1440 |
+
"integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==",
|
1441 |
+
"dependencies": {
|
1442 |
+
"ms": "2.1.2"
|
1443 |
+
},
|
1444 |
+
"engines": {
|
1445 |
+
"node": ">=6.0"
|
1446 |
+
},
|
1447 |
+
"peerDependenciesMeta": {
|
1448 |
+
"supports-color": {
|
1449 |
+
"optional": true
|
1450 |
+
}
|
1451 |
+
}
|
1452 |
+
},
|
1453 |
+
"node_modules/mquery/node_modules/ms": {
|
1454 |
+
"version": "2.1.2",
|
1455 |
+
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
|
1456 |
+
"integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w=="
|
1457 |
+
},
|
1458 |
+
"node_modules/ms": {
|
1459 |
+
"version": "2.1.3",
|
1460 |
+
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
|
1461 |
+
"integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA=="
|
1462 |
+
},
|
1463 |
+
"node_modules/negotiator": {
|
1464 |
+
"version": "0.6.3",
|
1465 |
+
"resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz",
|
1466 |
+
"integrity": "sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==",
|
1467 |
+
"engines": {
|
1468 |
+
"node": ">= 0.6"
|
1469 |
+
}
|
1470 |
+
},
|
1471 |
+
"node_modules/node-domexception": {
|
1472 |
+
"version": "1.0.0",
|
1473 |
+
"resolved": "https://registry.npmjs.org/node-domexception/-/node-domexception-1.0.0.tgz",
|
1474 |
+
"integrity": "sha512-/jKZoMpw0F8GRwl4/eLROPA3cfcXtLApP0QzLmUT/HuPCZWyB7IY9ZrMeKw2O/nFIqPQB3PVM9aYm0F312AXDQ==",
|
1475 |
+
"funding": [
|
1476 |
+
{
|
1477 |
+
"type": "github",
|
1478 |
+
"url": "https://github.com/sponsors/jimmywarting"
|
1479 |
+
},
|
1480 |
+
{
|
1481 |
+
"type": "github",
|
1482 |
+
"url": "https://paypal.me/jimmywarting"
|
1483 |
+
}
|
1484 |
+
],
|
1485 |
+
"engines": {
|
1486 |
+
"node": ">=10.5.0"
|
1487 |
+
}
|
1488 |
+
},
|
1489 |
+
"node_modules/node-fetch": {
|
1490 |
+
"version": "3.3.1",
|
1491 |
+
"resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-3.3.1.tgz",
|
1492 |
+
"integrity": "sha512-cRVc/kyto/7E5shrWca1Wsea4y6tL9iYJE5FBCius3JQfb/4P4I295PfhgbJQBLTx6lATE4z+wK0rPM4VS2uow==",
|
1493 |
+
"dependencies": {
|
1494 |
+
"data-uri-to-buffer": "^4.0.0",
|
1495 |
+
"fetch-blob": "^3.1.4",
|
1496 |
+
"formdata-polyfill": "^4.0.10"
|
1497 |
+
},
|
1498 |
+
"engines": {
|
1499 |
+
"node": "^12.20.0 || ^14.13.1 || >=16.0.0"
|
1500 |
+
},
|
1501 |
+
"funding": {
|
1502 |
+
"type": "opencollective",
|
1503 |
+
"url": "https://opencollective.com/node-fetch"
|
1504 |
+
}
|
1505 |
+
},
|
1506 |
+
"node_modules/nodemailer": {
|
1507 |
+
"version": "6.9.3",
|
1508 |
+
"resolved": "https://registry.npmjs.org/nodemailer/-/nodemailer-6.9.3.tgz",
|
1509 |
+
"integrity": "sha512-fy9v3NgTzBngrMFkDsKEj0r02U7jm6XfC3b52eoNV+GCrGj+s8pt5OqhiJdWKuw51zCTdiNR/IUD1z33LIIGpg==",
|
1510 |
+
"engines": {
|
1511 |
+
"node": ">=6.0.0"
|
1512 |
+
}
|
1513 |
+
},
|
1514 |
+
"node_modules/nodemon": {
|
1515 |
+
"version": "2.0.22",
|
1516 |
+
"resolved": "https://registry.npmjs.org/nodemon/-/nodemon-2.0.22.tgz",
|
1517 |
+
"integrity": "sha512-B8YqaKMmyuCO7BowF1Z1/mkPqLk6cs/l63Ojtd6otKjMx47Dq1utxfRxcavH1I7VSaL8n5BUaoutadnsX3AAVQ==",
|
1518 |
+
"dependencies": {
|
1519 |
+
"chokidar": "^3.5.2",
|
1520 |
+
"debug": "^3.2.7",
|
1521 |
+
"ignore-by-default": "^1.0.1",
|
1522 |
+
"minimatch": "^3.1.2",
|
1523 |
+
"pstree.remy": "^1.1.8",
|
1524 |
+
"semver": "^5.7.1",
|
1525 |
+
"simple-update-notifier": "^1.0.7",
|
1526 |
+
"supports-color": "^5.5.0",
|
1527 |
+
"touch": "^3.1.0",
|
1528 |
+
"undefsafe": "^2.0.5"
|
1529 |
+
},
|
1530 |
+
"bin": {
|
1531 |
+
"nodemon": "bin/nodemon.js"
|
1532 |
+
},
|
1533 |
+
"engines": {
|
1534 |
+
"node": ">=8.10.0"
|
1535 |
+
},
|
1536 |
+
"funding": {
|
1537 |
+
"type": "opencollective",
|
1538 |
+
"url": "https://opencollective.com/nodemon"
|
1539 |
+
}
|
1540 |
+
},
|
1541 |
+
"node_modules/nopt": {
|
1542 |
+
"version": "1.0.10",
|
1543 |
+
"resolved": "https://registry.npmjs.org/nopt/-/nopt-1.0.10.tgz",
|
1544 |
+
"integrity": "sha512-NWmpvLSqUrgrAC9HCuxEvb+PSloHpqVu+FqcO4eeF2h5qYRhA7ev6KvelyQAKtegUbC6RypJnlEOhd8vloNKYg==",
|
1545 |
+
"dependencies": {
|
1546 |
+
"abbrev": "1"
|
1547 |
+
},
|
1548 |
+
"bin": {
|
1549 |
+
"nopt": "bin/nopt.js"
|
1550 |
+
},
|
1551 |
+
"engines": {
|
1552 |
+
"node": "*"
|
1553 |
+
}
|
1554 |
+
},
|
1555 |
+
"node_modules/normalize-path": {
|
1556 |
+
"version": "3.0.0",
|
1557 |
+
"resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz",
|
1558 |
+
"integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==",
|
1559 |
+
"engines": {
|
1560 |
+
"node": ">=0.10.0"
|
1561 |
+
}
|
1562 |
+
},
|
1563 |
+
"node_modules/object-assign": {
|
1564 |
+
"version": "4.1.1",
|
1565 |
+
"resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz",
|
1566 |
+
"integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==",
|
1567 |
+
"engines": {
|
1568 |
+
"node": ">=0.10.0"
|
1569 |
+
}
|
1570 |
+
},
|
1571 |
+
"node_modules/object-inspect": {
|
1572 |
+
"version": "1.12.3",
|
1573 |
+
"resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.12.3.tgz",
|
1574 |
+
"integrity": "sha512-geUvdk7c+eizMNUDkRpW1wJwgfOiOeHbxBR/hLXK1aT6zmVSO0jsQcs7fj6MGw89jC/cjGfLcNOrtMYtGqm81g==",
|
1575 |
+
"funding": {
|
1576 |
+
"url": "https://github.com/sponsors/ljharb"
|
1577 |
+
}
|
1578 |
+
},
|
1579 |
+
"node_modules/on-finished": {
|
1580 |
+
"version": "2.4.1",
|
1581 |
+
"resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.4.1.tgz",
|
1582 |
+
"integrity": "sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==",
|
1583 |
+
"dependencies": {
|
1584 |
+
"ee-first": "1.1.1"
|
1585 |
+
},
|
1586 |
+
"engines": {
|
1587 |
+
"node": ">= 0.8"
|
1588 |
+
}
|
1589 |
+
},
|
1590 |
+
"node_modules/on-headers": {
|
1591 |
+
"version": "1.0.2",
|
1592 |
+
"resolved": "https://registry.npmjs.org/on-headers/-/on-headers-1.0.2.tgz",
|
1593 |
+
"integrity": "sha512-pZAE+FJLoyITytdqK0U5s+FIpjN0JP3OzFi/u8Rx+EV5/W+JTWGXG8xFzevE7AjBfDqHv/8vL8qQsIhHnqRkrA==",
|
1594 |
+
"engines": {
|
1595 |
+
"node": ">= 0.8"
|
1596 |
+
}
|
1597 |
+
},
|
1598 |
+
"node_modules/parseurl": {
|
1599 |
+
"version": "1.3.3",
|
1600 |
+
"resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz",
|
1601 |
+
"integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==",
|
1602 |
+
"engines": {
|
1603 |
+
"node": ">= 0.8"
|
1604 |
+
}
|
1605 |
+
},
|
1606 |
+
"node_modules/path-key": {
|
1607 |
+
"version": "3.1.1",
|
1608 |
+
"resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz",
|
1609 |
+
"integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==",
|
1610 |
+
"engines": {
|
1611 |
+
"node": ">=8"
|
1612 |
+
}
|
1613 |
+
},
|
1614 |
+
"node_modules/path-scurry": {
|
1615 |
+
"version": "1.10.0",
|
1616 |
+
"resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-1.10.0.tgz",
|
1617 |
+
"integrity": "sha512-tZFEaRQbMLjwrsmidsGJ6wDMv0iazJWk6SfIKnY4Xru8auXgmJkOBa5DUbYFcFD2Rzk2+KDlIiF0GVXNCbgC7g==",
|
1618 |
+
"dependencies": {
|
1619 |
+
"lru-cache": "^9.1.1 || ^10.0.0",
|
1620 |
+
"minipass": "^5.0.0 || ^6.0.2"
|
1621 |
+
},
|
1622 |
+
"engines": {
|
1623 |
+
"node": ">=16 || 14 >=14.17"
|
1624 |
+
},
|
1625 |
+
"funding": {
|
1626 |
+
"url": "https://github.com/sponsors/isaacs"
|
1627 |
+
}
|
1628 |
+
},
|
1629 |
+
"node_modules/path-to-regexp": {
|
1630 |
+
"version": "0.1.7",
|
1631 |
+
"resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz",
|
1632 |
+
"integrity": "sha512-5DFkuoqlv1uYQKxy8omFBeJPQcdoE07Kv2sferDCrAq1ohOU+MSDswDIbnx3YAM60qIOnYa53wBhXW0EbMonrQ=="
|
1633 |
+
},
|
1634 |
+
"node_modules/picomatch": {
|
1635 |
+
"version": "2.3.1",
|
1636 |
+
"resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz",
|
1637 |
+
"integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==",
|
1638 |
+
"engines": {
|
1639 |
+
"node": ">=8.6"
|
1640 |
+
},
|
1641 |
+
"funding": {
|
1642 |
+
"url": "https://github.com/sponsors/jonschlinkert"
|
1643 |
+
}
|
1644 |
+
},
|
1645 |
+
"node_modules/proxy-addr": {
|
1646 |
+
"version": "2.0.7",
|
1647 |
+
"resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.7.tgz",
|
1648 |
+
"integrity": "sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg==",
|
1649 |
+
"dependencies": {
|
1650 |
+
"forwarded": "0.2.0",
|
1651 |
+
"ipaddr.js": "1.9.1"
|
1652 |
+
},
|
1653 |
+
"engines": {
|
1654 |
+
"node": ">= 0.10"
|
1655 |
+
}
|
1656 |
+
},
|
1657 |
+
"node_modules/proxy-from-env": {
|
1658 |
+
"version": "1.1.0",
|
1659 |
+
"resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz",
|
1660 |
+
"integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg=="
|
1661 |
+
},
|
1662 |
+
"node_modules/pstree.remy": {
|
1663 |
+
"version": "1.1.8",
|
1664 |
+
"resolved": "https://registry.npmjs.org/pstree.remy/-/pstree.remy-1.1.8.tgz",
|
1665 |
+
"integrity": "sha512-77DZwxQmxKnu3aR542U+X8FypNzbfJ+C5XQDk3uWjWxn6151aIMGthWYRXTqT1E5oJvg+ljaa2OJi+VfvCOQ8w=="
|
1666 |
+
},
|
1667 |
+
"node_modules/punycode": {
|
1668 |
+
"version": "2.3.0",
|
1669 |
+
"resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.0.tgz",
|
1670 |
+
"integrity": "sha512-rRV+zQD8tVFys26lAGR9WUuS4iUAngJScM+ZRSKtvl5tKeZ2t5bvdNFdNHBW9FWR4guGHlgmsZ1G7BSm2wTbuA==",
|
1671 |
+
"engines": {
|
1672 |
+
"node": ">=6"
|
1673 |
+
}
|
1674 |
+
},
|
1675 |
+
"node_modules/qs": {
|
1676 |
+
"version": "6.11.0",
|
1677 |
+
"resolved": "https://registry.npmjs.org/qs/-/qs-6.11.0.tgz",
|
1678 |
+
"integrity": "sha512-MvjoMCJwEarSbUYk5O+nmoSzSutSsTwF85zcHPQ9OrlFoZOYIjaqBAJIqIXjptyD5vThxGq52Xu/MaJzRkIk4Q==",
|
1679 |
+
"dependencies": {
|
1680 |
+
"side-channel": "^1.0.4"
|
1681 |
+
},
|
1682 |
+
"engines": {
|
1683 |
+
"node": ">=0.6"
|
1684 |
+
},
|
1685 |
+
"funding": {
|
1686 |
+
"url": "https://github.com/sponsors/ljharb"
|
1687 |
+
}
|
1688 |
+
},
|
1689 |
+
"node_modules/random-bytes": {
|
1690 |
+
"version": "1.0.0",
|
1691 |
+
"resolved": "https://registry.npmjs.org/random-bytes/-/random-bytes-1.0.0.tgz",
|
1692 |
+
"integrity": "sha512-iv7LhNVO047HzYR3InF6pUcUsPQiHTM1Qal51DcGSuZFBil1aBBWG5eHPNek7bvILMaYJ/8RU1e8w1AMdHmLQQ==",
|
1693 |
+
"engines": {
|
1694 |
+
"node": ">= 0.8"
|
1695 |
+
}
|
1696 |
+
},
|
1697 |
+
"node_modules/range-parser": {
|
1698 |
+
"version": "1.2.1",
|
1699 |
+
"resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz",
|
1700 |
+
"integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==",
|
1701 |
+
"engines": {
|
1702 |
+
"node": ">= 0.6"
|
1703 |
+
}
|
1704 |
+
},
|
1705 |
+
"node_modules/raw-body": {
|
1706 |
+
"version": "2.5.1",
|
1707 |
+
"resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.5.1.tgz",
|
1708 |
+
"integrity": "sha512-qqJBtEyVgS0ZmPGdCFPWJ3FreoqvG4MVQln/kCgF7Olq95IbOp0/BWyMwbdtn4VTvkM8Y7khCQ2Xgk/tcrCXig==",
|
1709 |
+
"dependencies": {
|
1710 |
+
"bytes": "3.1.2",
|
1711 |
+
"http-errors": "2.0.0",
|
1712 |
+
"iconv-lite": "0.4.24",
|
1713 |
+
"unpipe": "1.0.0"
|
1714 |
+
},
|
1715 |
+
"engines": {
|
1716 |
+
"node": ">= 0.8"
|
1717 |
+
}
|
1718 |
+
},
|
1719 |
+
"node_modules/readdirp": {
|
1720 |
+
"version": "3.6.0",
|
1721 |
+
"resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz",
|
1722 |
+
"integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==",
|
1723 |
+
"dependencies": {
|
1724 |
+
"picomatch": "^2.2.1"
|
1725 |
+
},
|
1726 |
+
"engines": {
|
1727 |
+
"node": ">=8.10.0"
|
1728 |
+
}
|
1729 |
+
},
|
1730 |
+
"node_modules/safe-buffer": {
|
1731 |
+
"version": "5.2.1",
|
1732 |
+
"resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz",
|
1733 |
+
"integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==",
|
1734 |
+
"funding": [
|
1735 |
+
{
|
1736 |
+
"type": "github",
|
1737 |
+
"url": "https://github.com/sponsors/feross"
|
1738 |
+
},
|
1739 |
+
{
|
1740 |
+
"type": "patreon",
|
1741 |
+
"url": "https://www.patreon.com/feross"
|
1742 |
+
},
|
1743 |
+
{
|
1744 |
+
"type": "consulting",
|
1745 |
+
"url": "https://feross.org/support"
|
1746 |
+
}
|
1747 |
+
]
|
1748 |
+
},
|
1749 |
+
"node_modules/safer-buffer": {
|
1750 |
+
"version": "2.1.2",
|
1751 |
+
"resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz",
|
1752 |
+
"integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg=="
|
1753 |
+
},
|
1754 |
+
"node_modules/saslprep": {
|
1755 |
+
"version": "1.0.3",
|
1756 |
+
"resolved": "https://registry.npmjs.org/saslprep/-/saslprep-1.0.3.tgz",
|
1757 |
+
"integrity": "sha512-/MY/PEMbk2SuY5sScONwhUDsV2p77Znkb/q3nSVstq/yQzYJOH/Azh29p9oJLsl3LnQwSvZDKagDGBsBwSooag==",
|
1758 |
+
"optional": true,
|
1759 |
+
"dependencies": {
|
1760 |
+
"sparse-bitfield": "^3.0.3"
|
1761 |
+
},
|
1762 |
+
"engines": {
|
1763 |
+
"node": ">=6"
|
1764 |
+
}
|
1765 |
+
},
|
1766 |
+
"node_modules/semver": {
|
1767 |
+
"version": "5.7.1",
|
1768 |
+
"resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz",
|
1769 |
+
"integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==",
|
1770 |
+
"bin": {
|
1771 |
+
"semver": "bin/semver"
|
1772 |
+
}
|
1773 |
+
},
|
1774 |
+
"node_modules/send": {
|
1775 |
+
"version": "0.18.0",
|
1776 |
+
"resolved": "https://registry.npmjs.org/send/-/send-0.18.0.tgz",
|
1777 |
+
"integrity": "sha512-qqWzuOjSFOuqPjFe4NOsMLafToQQwBSOEpS+FwEt3A2V3vKubTquT3vmLTQpFgMXp8AlFWFuP1qKaJZOtPpVXg==",
|
1778 |
+
"dependencies": {
|
1779 |
+
"debug": "2.6.9",
|
1780 |
+
"depd": "2.0.0",
|
1781 |
+
"destroy": "1.2.0",
|
1782 |
+
"encodeurl": "~1.0.2",
|
1783 |
+
"escape-html": "~1.0.3",
|
1784 |
+
"etag": "~1.8.1",
|
1785 |
+
"fresh": "0.5.2",
|
1786 |
+
"http-errors": "2.0.0",
|
1787 |
+
"mime": "1.6.0",
|
1788 |
+
"ms": "2.1.3",
|
1789 |
+
"on-finished": "2.4.1",
|
1790 |
+
"range-parser": "~1.2.1",
|
1791 |
+
"statuses": "2.0.1"
|
1792 |
+
},
|
1793 |
+
"engines": {
|
1794 |
+
"node": ">= 0.8.0"
|
1795 |
+
}
|
1796 |
+
},
|
1797 |
+
"node_modules/send/node_modules/debug": {
|
1798 |
+
"version": "2.6.9",
|
1799 |
+
"resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",
|
1800 |
+
"integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==",
|
1801 |
+
"dependencies": {
|
1802 |
+
"ms": "2.0.0"
|
1803 |
+
}
|
1804 |
+
},
|
1805 |
+
"node_modules/send/node_modules/debug/node_modules/ms": {
|
1806 |
+
"version": "2.0.0",
|
1807 |
+
"resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
|
1808 |
+
"integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A=="
|
1809 |
+
},
|
1810 |
+
"node_modules/serve-static": {
|
1811 |
+
"version": "1.15.0",
|
1812 |
+
"resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.15.0.tgz",
|
1813 |
+
"integrity": "sha512-XGuRDNjXUijsUL0vl6nSD7cwURuzEgglbOaFuZM9g3kwDXOWVTck0jLzjPzGD+TazWbboZYu52/9/XPdUgne9g==",
|
1814 |
+
"dependencies": {
|
1815 |
+
"encodeurl": "~1.0.2",
|
1816 |
+
"escape-html": "~1.0.3",
|
1817 |
+
"parseurl": "~1.3.3",
|
1818 |
+
"send": "0.18.0"
|
1819 |
+
},
|
1820 |
+
"engines": {
|
1821 |
+
"node": ">= 0.8.0"
|
1822 |
+
}
|
1823 |
+
},
|
1824 |
+
"node_modules/setprototypeof": {
|
1825 |
+
"version": "1.2.0",
|
1826 |
+
"resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz",
|
1827 |
+
"integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw=="
|
1828 |
+
},
|
1829 |
+
"node_modules/shebang-command": {
|
1830 |
+
"version": "2.0.0",
|
1831 |
+
"resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz",
|
1832 |
+
"integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==",
|
1833 |
+
"dependencies": {
|
1834 |
+
"shebang-regex": "^3.0.0"
|
1835 |
+
},
|
1836 |
+
"engines": {
|
1837 |
+
"node": ">=8"
|
1838 |
+
}
|
1839 |
+
},
|
1840 |
+
"node_modules/shebang-regex": {
|
1841 |
+
"version": "3.0.0",
|
1842 |
+
"resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz",
|
1843 |
+
"integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==",
|
1844 |
+
"engines": {
|
1845 |
+
"node": ">=8"
|
1846 |
+
}
|
1847 |
+
},
|
1848 |
+
"node_modules/side-channel": {
|
1849 |
+
"version": "1.0.4",
|
1850 |
+
"resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.4.tgz",
|
1851 |
+
"integrity": "sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==",
|
1852 |
+
"dependencies": {
|
1853 |
+
"call-bind": "^1.0.0",
|
1854 |
+
"get-intrinsic": "^1.0.2",
|
1855 |
+
"object-inspect": "^1.9.0"
|
1856 |
+
},
|
1857 |
+
"funding": {
|
1858 |
+
"url": "https://github.com/sponsors/ljharb"
|
1859 |
+
}
|
1860 |
+
},
|
1861 |
+
"node_modules/sift": {
|
1862 |
+
"version": "16.0.1",
|
1863 |
+
"resolved": "https://registry.npmjs.org/sift/-/sift-16.0.1.tgz",
|
1864 |
+
"integrity": "sha512-Wv6BjQ5zbhW7VFefWusVP33T/EM0vYikCaQ2qR8yULbsilAT8/wQaXvuQ3ptGLpoKx+lihJE3y2UTgKDyyNHZQ=="
|
1865 |
+
},
|
1866 |
+
"node_modules/signal-exit": {
|
1867 |
+
"version": "4.0.2",
|
1868 |
+
"resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.0.2.tgz",
|
1869 |
+
"integrity": "sha512-MY2/qGx4enyjprQnFaZsHib3Yadh3IXyV2C321GY0pjGfVBu4un0uDJkwgdxqO+Rdx8JMT8IfJIRwbYVz3Ob3Q==",
|
1870 |
+
"engines": {
|
1871 |
+
"node": ">=14"
|
1872 |
+
},
|
1873 |
+
"funding": {
|
1874 |
+
"url": "https://github.com/sponsors/isaacs"
|
1875 |
+
}
|
1876 |
+
},
|
1877 |
+
"node_modules/simple-update-notifier": {
|
1878 |
+
"version": "1.1.0",
|
1879 |
+
"resolved": "https://registry.npmjs.org/simple-update-notifier/-/simple-update-notifier-1.1.0.tgz",
|
1880 |
+
"integrity": "sha512-VpsrsJSUcJEseSbMHkrsrAVSdvVS5I96Qo1QAQ4FxQ9wXFcB+pjj7FB7/us9+GcgfW4ziHtYMc1J0PLczb55mg==",
|
1881 |
+
"dependencies": {
|
1882 |
+
"semver": "~7.0.0"
|
1883 |
+
},
|
1884 |
+
"engines": {
|
1885 |
+
"node": ">=8.10.0"
|
1886 |
+
}
|
1887 |
+
},
|
1888 |
+
"node_modules/simple-update-notifier/node_modules/semver": {
|
1889 |
+
"version": "7.0.0",
|
1890 |
+
"resolved": "https://registry.npmjs.org/semver/-/semver-7.0.0.tgz",
|
1891 |
+
"integrity": "sha512-+GB6zVA9LWh6zovYQLALHwv5rb2PHGlJi3lfiqIHxR0uuwCgefcOJc59v9fv1w8GbStwxuuqqAjI9NMAOOgq1A==",
|
1892 |
+
"bin": {
|
1893 |
+
"semver": "bin/semver.js"
|
1894 |
+
}
|
1895 |
+
},
|
1896 |
+
"node_modules/smart-buffer": {
|
1897 |
+
"version": "4.2.0",
|
1898 |
+
"resolved": "https://registry.npmjs.org/smart-buffer/-/smart-buffer-4.2.0.tgz",
|
1899 |
+
"integrity": "sha512-94hK0Hh8rPqQl2xXc3HsaBoOXKV20MToPkcXvwbISWLEs+64sBq5kFgn2kJDHb1Pry9yrP0dxrCI9RRci7RXKg==",
|
1900 |
+
"engines": {
|
1901 |
+
"node": ">= 6.0.0",
|
1902 |
+
"npm": ">= 3.0.0"
|
1903 |
+
}
|
1904 |
+
},
|
1905 |
+
"node_modules/socket.io": {
|
1906 |
+
"version": "4.7.1",
|
1907 |
+
"resolved": "https://registry.npmjs.org/socket.io/-/socket.io-4.7.1.tgz",
|
1908 |
+
"integrity": "sha512-W+utHys2w//dhFjy7iQQu9sGd3eokCjGbl2r59tyLqNiJJBdIebn3GAKEXBr3osqHTObJi2die/25bCx2zsaaw==",
|
1909 |
+
"dependencies": {
|
1910 |
+
"accepts": "~1.3.4",
|
1911 |
+
"base64id": "~2.0.0",
|
1912 |
+
"cors": "~2.8.5",
|
1913 |
+
"debug": "~4.3.2",
|
1914 |
+
"engine.io": "~6.5.0",
|
1915 |
+
"socket.io-adapter": "~2.5.2",
|
1916 |
+
"socket.io-parser": "~4.2.4"
|
1917 |
+
},
|
1918 |
+
"engines": {
|
1919 |
+
"node": ">=10.0.0"
|
1920 |
+
}
|
1921 |
+
},
|
1922 |
+
"node_modules/socket.io-adapter": {
|
1923 |
+
"version": "2.5.2",
|
1924 |
+
"resolved": "https://registry.npmjs.org/socket.io-adapter/-/socket.io-adapter-2.5.2.tgz",
|
1925 |
+
"integrity": "sha512-87C3LO/NOMc+eMcpcxUBebGjkpMDkNBS9tf7KJqcDsmL936EChtVva71Dw2q4tQcuVC+hAUy4an2NO/sYXmwRA==",
|
1926 |
+
"dependencies": {
|
1927 |
+
"ws": "~8.11.0"
|
1928 |
+
}
|
1929 |
+
},
|
1930 |
+
"node_modules/socket.io-adapter/node_modules/ws": {
|
1931 |
+
"version": "8.11.0",
|
1932 |
+
"resolved": "https://registry.npmjs.org/ws/-/ws-8.11.0.tgz",
|
1933 |
+
"integrity": "sha512-HPG3wQd9sNQoT9xHyNCXoDUa+Xw/VevmY9FoHyQ+g+rrMn4j6FB4np7Z0OhdTgjx6MgQLK7jwSy1YecU1+4Asg==",
|
1934 |
+
"engines": {
|
1935 |
+
"node": ">=10.0.0"
|
1936 |
+
},
|
1937 |
+
"peerDependencies": {
|
1938 |
+
"bufferutil": "^4.0.1",
|
1939 |
+
"utf-8-validate": "^5.0.2"
|
1940 |
+
},
|
1941 |
+
"peerDependenciesMeta": {
|
1942 |
+
"bufferutil": {
|
1943 |
+
"optional": true
|
1944 |
+
},
|
1945 |
+
"utf-8-validate": {
|
1946 |
+
"optional": true
|
1947 |
+
}
|
1948 |
+
}
|
1949 |
+
},
|
1950 |
+
"node_modules/socket.io-parser": {
|
1951 |
+
"version": "4.2.4",
|
1952 |
+
"resolved": "https://registry.npmjs.org/socket.io-parser/-/socket.io-parser-4.2.4.tgz",
|
1953 |
+
"integrity": "sha512-/GbIKmo8ioc+NIWIhwdecY0ge+qVBSMdgxGygevmdHj24bsfgtCmcUUcQ5ZzcylGFHsN3k4HB4Cgkl96KVnuew==",
|
1954 |
+
"dependencies": {
|
1955 |
+
"@socket.io/component-emitter": "~3.1.0",
|
1956 |
+
"debug": "~4.3.1"
|
1957 |
+
},
|
1958 |
+
"engines": {
|
1959 |
+
"node": ">=10.0.0"
|
1960 |
+
}
|
1961 |
+
},
|
1962 |
+
"node_modules/socket.io-parser/node_modules/debug": {
|
1963 |
+
"version": "4.3.4",
|
1964 |
+
"resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz",
|
1965 |
+
"integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==",
|
1966 |
+
"dependencies": {
|
1967 |
+
"ms": "2.1.2"
|
1968 |
+
},
|
1969 |
+
"engines": {
|
1970 |
+
"node": ">=6.0"
|
1971 |
+
},
|
1972 |
+
"peerDependenciesMeta": {
|
1973 |
+
"supports-color": {
|
1974 |
+
"optional": true
|
1975 |
+
}
|
1976 |
+
}
|
1977 |
+
},
|
1978 |
+
"node_modules/socket.io-parser/node_modules/ms": {
|
1979 |
+
"version": "2.1.2",
|
1980 |
+
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
|
1981 |
+
"integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w=="
|
1982 |
+
},
|
1983 |
+
"node_modules/socket.io/node_modules/debug": {
|
1984 |
+
"version": "4.3.4",
|
1985 |
+
"resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz",
|
1986 |
+
"integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==",
|
1987 |
+
"dependencies": {
|
1988 |
+
"ms": "2.1.2"
|
1989 |
+
},
|
1990 |
+
"engines": {
|
1991 |
+
"node": ">=6.0"
|
1992 |
+
},
|
1993 |
+
"peerDependenciesMeta": {
|
1994 |
+
"supports-color": {
|
1995 |
+
"optional": true
|
1996 |
+
}
|
1997 |
+
}
|
1998 |
+
},
|
1999 |
+
"node_modules/socket.io/node_modules/ms": {
|
2000 |
+
"version": "2.1.2",
|
2001 |
+
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
|
2002 |
+
"integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w=="
|
2003 |
+
},
|
2004 |
+
"node_modules/socks": {
|
2005 |
+
"version": "2.7.1",
|
2006 |
+
"resolved": "https://registry.npmjs.org/socks/-/socks-2.7.1.tgz",
|
2007 |
+
"integrity": "sha512-7maUZy1N7uo6+WVEX6psASxtNlKaNVMlGQKkG/63nEDdLOWNbiUMoLK7X4uYoLhQstau72mLgfEWcXcwsaHbYQ==",
|
2008 |
+
"dependencies": {
|
2009 |
+
"ip": "^2.0.0",
|
2010 |
+
"smart-buffer": "^4.2.0"
|
2011 |
+
},
|
2012 |
+
"engines": {
|
2013 |
+
"node": ">= 10.13.0",
|
2014 |
+
"npm": ">= 3.0.0"
|
2015 |
+
}
|
2016 |
+
},
|
2017 |
+
"node_modules/sparse-bitfield": {
|
2018 |
+
"version": "3.0.3",
|
2019 |
+
"resolved": "https://registry.npmjs.org/sparse-bitfield/-/sparse-bitfield-3.0.3.tgz",
|
2020 |
+
"integrity": "sha512-kvzhi7vqKTfkh0PZU+2D2PIllw2ymqJKujUcyPMd9Y75Nv4nPbGJZXNhxsgdQab2BmlDct1YnfQCguEvHr7VsQ==",
|
2021 |
+
"optional": true,
|
2022 |
+
"dependencies": {
|
2023 |
+
"memory-pager": "^1.0.2"
|
2024 |
+
}
|
2025 |
+
},
|
2026 |
+
"node_modules/statuses": {
|
2027 |
+
"version": "2.0.1",
|
2028 |
+
"resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz",
|
2029 |
+
"integrity": "sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==",
|
2030 |
+
"engines": {
|
2031 |
+
"node": ">= 0.8"
|
2032 |
+
}
|
2033 |
+
},
|
2034 |
+
"node_modules/string-color": {
|
2035 |
+
"version": "0.8.0",
|
2036 |
+
"resolved": "https://registry.npmjs.org/string-color/-/string-color-0.8.0.tgz",
|
2037 |
+
"integrity": "sha512-h1LLin9OfvTdEqmt1F+iUOnRuVloVy2kcaJ1LdJa1+DZxXrtKTfsq643HEG8i3uGOgrsiyaxAfiDudZN+FHcvg==",
|
2038 |
+
"engines": {
|
2039 |
+
"node": "*"
|
2040 |
+
}
|
2041 |
+
},
|
2042 |
+
"node_modules/string-width": {
|
2043 |
+
"version": "5.1.2",
|
2044 |
+
"resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz",
|
2045 |
+
"integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==",
|
2046 |
+
"dependencies": {
|
2047 |
+
"eastasianwidth": "^0.2.0",
|
2048 |
+
"emoji-regex": "^9.2.2",
|
2049 |
+
"strip-ansi": "^7.0.1"
|
2050 |
+
},
|
2051 |
+
"engines": {
|
2052 |
+
"node": ">=12"
|
2053 |
+
},
|
2054 |
+
"funding": {
|
2055 |
+
"url": "https://github.com/sponsors/sindresorhus"
|
2056 |
+
}
|
2057 |
+
},
|
2058 |
+
"node_modules/string-width-cjs": {
|
2059 |
+
"name": "string-width",
|
2060 |
+
"version": "4.2.3",
|
2061 |
+
"resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz",
|
2062 |
+
"integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==",
|
2063 |
+
"dependencies": {
|
2064 |
+
"emoji-regex": "^8.0.0",
|
2065 |
+
"is-fullwidth-code-point": "^3.0.0",
|
2066 |
+
"strip-ansi": "^6.0.1"
|
2067 |
+
},
|
2068 |
+
"engines": {
|
2069 |
+
"node": ">=8"
|
2070 |
+
}
|
2071 |
+
},
|
2072 |
+
"node_modules/string-width-cjs/node_modules/ansi-regex": {
|
2073 |
+
"version": "5.0.1",
|
2074 |
+
"resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz",
|
2075 |
+
"integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==",
|
2076 |
+
"engines": {
|
2077 |
+
"node": ">=8"
|
2078 |
+
}
|
2079 |
+
},
|
2080 |
+
"node_modules/string-width-cjs/node_modules/emoji-regex": {
|
2081 |
+
"version": "8.0.0",
|
2082 |
+
"resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz",
|
2083 |
+
"integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A=="
|
2084 |
+
},
|
2085 |
+
"node_modules/string-width-cjs/node_modules/strip-ansi": {
|
2086 |
+
"version": "6.0.1",
|
2087 |
+
"resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz",
|
2088 |
+
"integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==",
|
2089 |
+
"dependencies": {
|
2090 |
+
"ansi-regex": "^5.0.1"
|
2091 |
+
},
|
2092 |
+
"engines": {
|
2093 |
+
"node": ">=8"
|
2094 |
+
}
|
2095 |
+
},
|
2096 |
+
"node_modules/strip-ansi": {
|
2097 |
+
"version": "7.1.0",
|
2098 |
+
"resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz",
|
2099 |
+
"integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==",
|
2100 |
+
"dependencies": {
|
2101 |
+
"ansi-regex": "^6.0.1"
|
2102 |
+
},
|
2103 |
+
"engines": {
|
2104 |
+
"node": ">=12"
|
2105 |
+
},
|
2106 |
+
"funding": {
|
2107 |
+
"url": "https://github.com/chalk/strip-ansi?sponsor=1"
|
2108 |
+
}
|
2109 |
+
},
|
2110 |
+
"node_modules/strip-ansi-cjs": {
|
2111 |
+
"name": "strip-ansi",
|
2112 |
+
"version": "6.0.1",
|
2113 |
+
"resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz",
|
2114 |
+
"integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==",
|
2115 |
+
"dependencies": {
|
2116 |
+
"ansi-regex": "^5.0.1"
|
2117 |
+
},
|
2118 |
+
"engines": {
|
2119 |
+
"node": ">=8"
|
2120 |
+
}
|
2121 |
+
},
|
2122 |
+
"node_modules/strip-ansi-cjs/node_modules/ansi-regex": {
|
2123 |
+
"version": "5.0.1",
|
2124 |
+
"resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz",
|
2125 |
+
"integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==",
|
2126 |
+
"engines": {
|
2127 |
+
"node": ">=8"
|
2128 |
+
}
|
2129 |
+
},
|
2130 |
+
"node_modules/supports-color": {
|
2131 |
+
"version": "5.5.0",
|
2132 |
+
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz",
|
2133 |
+
"integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==",
|
2134 |
+
"dependencies": {
|
2135 |
+
"has-flag": "^3.0.0"
|
2136 |
+
},
|
2137 |
+
"engines": {
|
2138 |
+
"node": ">=4"
|
2139 |
+
}
|
2140 |
+
},
|
2141 |
+
"node_modules/to-regex-range": {
|
2142 |
+
"version": "5.0.1",
|
2143 |
+
"resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz",
|
2144 |
+
"integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==",
|
2145 |
+
"dependencies": {
|
2146 |
+
"is-number": "^7.0.0"
|
2147 |
+
},
|
2148 |
+
"engines": {
|
2149 |
+
"node": ">=8.0"
|
2150 |
+
}
|
2151 |
+
},
|
2152 |
+
"node_modules/toidentifier": {
|
2153 |
+
"version": "1.0.1",
|
2154 |
+
"resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.1.tgz",
|
2155 |
+
"integrity": "sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==",
|
2156 |
+
"engines": {
|
2157 |
+
"node": ">=0.6"
|
2158 |
+
}
|
2159 |
+
},
|
2160 |
+
"node_modules/touch": {
|
2161 |
+
"version": "3.1.0",
|
2162 |
+
"resolved": "https://registry.npmjs.org/touch/-/touch-3.1.0.tgz",
|
2163 |
+
"integrity": "sha512-WBx8Uy5TLtOSRtIq+M03/sKDrXCLHxwDcquSP2c43Le03/9serjQBIztjRz6FkJez9D/hleyAXTBGLwwZUw9lA==",
|
2164 |
+
"dependencies": {
|
2165 |
+
"nopt": "~1.0.10"
|
2166 |
+
},
|
2167 |
+
"bin": {
|
2168 |
+
"nodetouch": "bin/nodetouch.js"
|
2169 |
+
}
|
2170 |
+
},
|
2171 |
+
"node_modules/tr46": {
|
2172 |
+
"version": "3.0.0",
|
2173 |
+
"resolved": "https://registry.npmjs.org/tr46/-/tr46-3.0.0.tgz",
|
2174 |
+
"integrity": "sha512-l7FvfAHlcmulp8kr+flpQZmVwtu7nfRV7NZujtN0OqES8EL4O4e0qqzL0DC5gAvx/ZC/9lk6rhcUwYvkBnBnYA==",
|
2175 |
+
"dependencies": {
|
2176 |
+
"punycode": "^2.1.1"
|
2177 |
+
},
|
2178 |
+
"engines": {
|
2179 |
+
"node": ">=12"
|
2180 |
+
}
|
2181 |
+
},
|
2182 |
+
"node_modules/ts-mixer": {
|
2183 |
+
"version": "6.0.3",
|
2184 |
+
"resolved": "https://registry.npmjs.org/ts-mixer/-/ts-mixer-6.0.3.tgz",
|
2185 |
+
"integrity": "sha512-k43M7uCG1AkTyxgnmI5MPwKoUvS/bRvLvUb7+Pgpdlmok8AoqmUaZxUUw8zKM5B1lqZrt41GjYgnvAi0fppqgQ=="
|
2186 |
+
},
|
2187 |
+
"node_modules/tslib": {
|
2188 |
+
"version": "2.6.0",
|
2189 |
+
"resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.0.tgz",
|
2190 |
+
"integrity": "sha512-7At1WUettjcSRHXCyYtTselblcHl9PJFFVKiCAy/bY97+BPZXSQ2wbq0P9s8tK2G7dFQfNnlJnPAiArVBVBsfA=="
|
2191 |
+
},
|
2192 |
+
"node_modules/type-is": {
|
2193 |
+
"version": "1.6.18",
|
2194 |
+
"resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz",
|
2195 |
+
"integrity": "sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==",
|
2196 |
+
"dependencies": {
|
2197 |
+
"media-typer": "0.3.0",
|
2198 |
+
"mime-types": "~2.1.24"
|
2199 |
+
},
|
2200 |
+
"engines": {
|
2201 |
+
"node": ">= 0.6"
|
2202 |
+
}
|
2203 |
+
},
|
2204 |
+
"node_modules/uid-safe": {
|
2205 |
+
"version": "2.1.5",
|
2206 |
+
"resolved": "https://registry.npmjs.org/uid-safe/-/uid-safe-2.1.5.tgz",
|
2207 |
+
"integrity": "sha512-KPHm4VL5dDXKz01UuEd88Df+KzynaohSL9fBh096KWAxSKZQDI2uBrVqtvRM4rwrIrRRKsdLNML/lnaaVSRioA==",
|
2208 |
+
"dependencies": {
|
2209 |
+
"random-bytes": "~1.0.0"
|
2210 |
+
},
|
2211 |
+
"engines": {
|
2212 |
+
"node": ">= 0.8"
|
2213 |
+
}
|
2214 |
+
},
|
2215 |
+
"node_modules/undefsafe": {
|
2216 |
+
"version": "2.0.5",
|
2217 |
+
"resolved": "https://registry.npmjs.org/undefsafe/-/undefsafe-2.0.5.tgz",
|
2218 |
+
"integrity": "sha512-WxONCrssBM8TSPRqN5EmsjVrsv4A8X12J4ArBiiayv3DyyG3ZlIg6yysuuSYdZsVz3TKcTg2fd//Ujd4CHV1iA=="
|
2219 |
+
},
|
2220 |
+
"node_modules/unpipe": {
|
2221 |
+
"version": "1.0.0",
|
2222 |
+
"resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz",
|
2223 |
+
"integrity": "sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==",
|
2224 |
+
"engines": {
|
2225 |
+
"node": ">= 0.8"
|
2226 |
+
}
|
2227 |
+
},
|
2228 |
+
"node_modules/url-parser": {
|
2229 |
+
"version": "0.0.1",
|
2230 |
+
"resolved": "https://registry.npmjs.org/url-parser/-/url-parser-0.0.1.tgz",
|
2231 |
+
"integrity": "sha512-4dFvZlpQBdvsj3fKtgomsGpZNE95krAsZJg/t2dbH/ljDeimjinjyJJoveJsecq9h88fl5/hXGZnVjiZn/pXSQ=="
|
2232 |
+
},
|
2233 |
+
"node_modules/utils-merge": {
|
2234 |
+
"version": "1.0.1",
|
2235 |
+
"resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz",
|
2236 |
+
"integrity": "sha512-pMZTvIkT1d+TFGvDOqodOclx0QWkkgi6Tdoa8gC8ffGAAqz9pzPTZWAybbsHHoED/ztMtkv/VoYTYyShUn81hA==",
|
2237 |
+
"engines": {
|
2238 |
+
"node": ">= 0.4.0"
|
2239 |
+
}
|
2240 |
+
},
|
2241 |
+
"node_modules/uuid": {
|
2242 |
+
"version": "9.0.0",
|
2243 |
+
"resolved": "https://registry.npmjs.org/uuid/-/uuid-9.0.0.tgz",
|
2244 |
+
"integrity": "sha512-MXcSTerfPa4uqyzStbRoTgt5XIe3x5+42+q1sDuy3R5MDk66URdLMOZe5aPX/SQd+kuYAh0FdP/pO28IkQyTeg==",
|
2245 |
+
"bin": {
|
2246 |
+
"uuid": "dist/bin/uuid"
|
2247 |
+
}
|
2248 |
+
},
|
2249 |
+
"node_modules/vary": {
|
2250 |
+
"version": "1.1.2",
|
2251 |
+
"resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz",
|
2252 |
+
"integrity": "sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==",
|
2253 |
+
"engines": {
|
2254 |
+
"node": ">= 0.8"
|
2255 |
+
}
|
2256 |
+
},
|
2257 |
+
"node_modules/web-streams-polyfill": {
|
2258 |
+
"version": "3.2.1",
|
2259 |
+
"resolved": "https://registry.npmjs.org/web-streams-polyfill/-/web-streams-polyfill-3.2.1.tgz",
|
2260 |
+
"integrity": "sha512-e0MO3wdXWKrLbL0DgGnUV7WHVuw9OUvL4hjgnPkIeEvESk74gAITi5G606JtZPp39cd8HA9VQzCIvA49LpPN5Q==",
|
2261 |
+
"engines": {
|
2262 |
+
"node": ">= 8"
|
2263 |
+
}
|
2264 |
+
},
|
2265 |
+
"node_modules/webidl-conversions": {
|
2266 |
+
"version": "7.0.0",
|
2267 |
+
"resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-7.0.0.tgz",
|
2268 |
+
"integrity": "sha512-VwddBukDzu71offAQR975unBIGqfKZpM+8ZX6ySk8nYhVoo5CYaZyzt3YBvYtRtO+aoGlqxPg/B87NGVZ/fu6g==",
|
2269 |
+
"engines": {
|
2270 |
+
"node": ">=12"
|
2271 |
+
}
|
2272 |
+
},
|
2273 |
+
"node_modules/whatwg-url": {
|
2274 |
+
"version": "11.0.0",
|
2275 |
+
"resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-11.0.0.tgz",
|
2276 |
+
"integrity": "sha512-RKT8HExMpoYx4igMiVMY83lN6UeITKJlBQ+vR/8ZJ8OCdSiN3RwCq+9gH0+Xzj0+5IrM6i4j/6LuvzbZIQgEcQ==",
|
2277 |
+
"dependencies": {
|
2278 |
+
"tr46": "^3.0.0",
|
2279 |
+
"webidl-conversions": "^7.0.0"
|
2280 |
+
},
|
2281 |
+
"engines": {
|
2282 |
+
"node": ">=12"
|
2283 |
+
}
|
2284 |
+
},
|
2285 |
+
"node_modules/which": {
|
2286 |
+
"version": "2.0.2",
|
2287 |
+
"resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz",
|
2288 |
+
"integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==",
|
2289 |
+
"dependencies": {
|
2290 |
+
"isexe": "^2.0.0"
|
2291 |
+
},
|
2292 |
+
"bin": {
|
2293 |
+
"node-which": "bin/node-which"
|
2294 |
+
},
|
2295 |
+
"engines": {
|
2296 |
+
"node": ">= 8"
|
2297 |
+
}
|
2298 |
+
},
|
2299 |
+
"node_modules/wrap-ansi": {
|
2300 |
+
"version": "8.1.0",
|
2301 |
+
"resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-8.1.0.tgz",
|
2302 |
+
"integrity": "sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==",
|
2303 |
+
"dependencies": {
|
2304 |
+
"ansi-styles": "^6.1.0",
|
2305 |
+
"string-width": "^5.0.1",
|
2306 |
+
"strip-ansi": "^7.0.1"
|
2307 |
+
},
|
2308 |
+
"engines": {
|
2309 |
+
"node": ">=12"
|
2310 |
+
},
|
2311 |
+
"funding": {
|
2312 |
+
"url": "https://github.com/chalk/wrap-ansi?sponsor=1"
|
2313 |
+
}
|
2314 |
+
},
|
2315 |
+
"node_modules/wrap-ansi-cjs": {
|
2316 |
+
"name": "wrap-ansi",
|
2317 |
+
"version": "7.0.0",
|
2318 |
+
"resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz",
|
2319 |
+
"integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==",
|
2320 |
+
"dependencies": {
|
2321 |
+
"ansi-styles": "^4.0.0",
|
2322 |
+
"string-width": "^4.1.0",
|
2323 |
+
"strip-ansi": "^6.0.0"
|
2324 |
+
},
|
2325 |
+
"engines": {
|
2326 |
+
"node": ">=10"
|
2327 |
+
},
|
2328 |
+
"funding": {
|
2329 |
+
"url": "https://github.com/chalk/wrap-ansi?sponsor=1"
|
2330 |
+
}
|
2331 |
+
},
|
2332 |
+
"node_modules/wrap-ansi-cjs/node_modules/ansi-regex": {
|
2333 |
+
"version": "5.0.1",
|
2334 |
+
"resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz",
|
2335 |
+
"integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==",
|
2336 |
+
"engines": {
|
2337 |
+
"node": ">=8"
|
2338 |
+
}
|
2339 |
+
},
|
2340 |
+
"node_modules/wrap-ansi-cjs/node_modules/ansi-styles": {
|
2341 |
+
"version": "4.3.0",
|
2342 |
+
"resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
|
2343 |
+
"integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
|
2344 |
+
"dependencies": {
|
2345 |
+
"color-convert": "^2.0.1"
|
2346 |
+
},
|
2347 |
+
"engines": {
|
2348 |
+
"node": ">=8"
|
2349 |
+
},
|
2350 |
+
"funding": {
|
2351 |
+
"url": "https://github.com/chalk/ansi-styles?sponsor=1"
|
2352 |
+
}
|
2353 |
+
},
|
2354 |
+
"node_modules/wrap-ansi-cjs/node_modules/emoji-regex": {
|
2355 |
+
"version": "8.0.0",
|
2356 |
+
"resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz",
|
2357 |
+
"integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A=="
|
2358 |
+
},
|
2359 |
+
"node_modules/wrap-ansi-cjs/node_modules/string-width": {
|
2360 |
+
"version": "4.2.3",
|
2361 |
+
"resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz",
|
2362 |
+
"integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==",
|
2363 |
+
"dependencies": {
|
2364 |
+
"emoji-regex": "^8.0.0",
|
2365 |
+
"is-fullwidth-code-point": "^3.0.0",
|
2366 |
+
"strip-ansi": "^6.0.1"
|
2367 |
+
},
|
2368 |
+
"engines": {
|
2369 |
+
"node": ">=8"
|
2370 |
+
}
|
2371 |
+
},
|
2372 |
+
"node_modules/wrap-ansi-cjs/node_modules/strip-ansi": {
|
2373 |
+
"version": "6.0.1",
|
2374 |
+
"resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz",
|
2375 |
+
"integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==",
|
2376 |
+
"dependencies": {
|
2377 |
+
"ansi-regex": "^5.0.1"
|
2378 |
+
},
|
2379 |
+
"engines": {
|
2380 |
+
"node": ">=8"
|
2381 |
+
}
|
2382 |
+
},
|
2383 |
+
"node_modules/ws": {
|
2384 |
+
"version": "8.13.0",
|
2385 |
+
"resolved": "https://registry.npmjs.org/ws/-/ws-8.13.0.tgz",
|
2386 |
+
"integrity": "sha512-x9vcZYTrFPC7aSIbj7sRCYo7L/Xb8Iy+pW0ng0wt2vCJv7M9HOMy0UoN3rr+IFC7hb7vXoqS+P9ktyLLLhO+LA==",
|
2387 |
+
"engines": {
|
2388 |
+
"node": ">=10.0.0"
|
2389 |
+
},
|
2390 |
+
"peerDependencies": {
|
2391 |
+
"bufferutil": "^4.0.1",
|
2392 |
+
"utf-8-validate": ">=5.0.2"
|
2393 |
+
},
|
2394 |
+
"peerDependenciesMeta": {
|
2395 |
+
"bufferutil": {
|
2396 |
+
"optional": true
|
2397 |
+
},
|
2398 |
+
"utf-8-validate": {
|
2399 |
+
"optional": true
|
2400 |
+
}
|
2401 |
+
}
|
2402 |
+
}
|
2403 |
+
}
|
2404 |
+
}
|
package.json
ADDED
@@ -0,0 +1,31 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"name": "incursion-registration-form",
|
3 |
+
"version": "1.0.0",
|
4 |
+
"description": "Registration for new users",
|
5 |
+
"main": "app.js",
|
6 |
+
"scripts": {
|
7 |
+
"start": "nodemon app.js",
|
8 |
+
"test": "echo \"Error: no test specified\" && exit 1"
|
9 |
+
},
|
10 |
+
"author": "Pariansh Mahajan, Akarsh Srivastava , Saransh Gupta , Pancham Agarwal",
|
11 |
+
"license": "ISC",
|
12 |
+
"dependencies": {
|
13 |
+
"axios": "^1.4.0",
|
14 |
+
"cookie-parser": "^1.4.6",
|
15 |
+
"discord": "^0.8.2",
|
16 |
+
"discord.js": "^13.16.0",
|
17 |
+
"dotenv": "^16.3.1",
|
18 |
+
"express": "^4.18.2",
|
19 |
+
"express-async-handler": "^1.2.0",
|
20 |
+
"express-session": "^1.17.3",
|
21 |
+
"md5": "^2.3.0",
|
22 |
+
"mongoose": "^7.3.1",
|
23 |
+
"node-fetch": "^3.3.1",
|
24 |
+
"nodemailer": "^6.9.3",
|
25 |
+
"nodemon": "^2.0.22",
|
26 |
+
"socket.io": "^4.7.1",
|
27 |
+
"url-parser": "^0.0.1",
|
28 |
+
"uuid": "^9.0.0",
|
29 |
+
"ws": "^8.13.0"
|
30 |
+
}
|
31 |
+
}
|
routers/ModelRouter.js
ADDED
@@ -0,0 +1,61 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
const express = require('express');
|
2 |
+
const crypto = require('crypto');
|
3 |
+
const path = require('path');
|
4 |
+
|
5 |
+
|
6 |
+
const ModelRouter = express.Router();
|
7 |
+
var cookies = require("cookie-parser");
|
8 |
+
const protect = require('../middlewares/ProtectRouter');
|
9 |
+
const { profile,leaderboard, qsnsStatus, rounds,newUsers } = require('../controllers/ModelController');
|
10 |
+
ModelRouter.use(cookies());
|
11 |
+
|
12 |
+
|
13 |
+
|
14 |
+
|
15 |
+
ModelRouter
|
16 |
+
.route('/profile')
|
17 |
+
.get(protect,profile)
|
18 |
+
|
19 |
+
|
20 |
+
|
21 |
+
ModelRouter
|
22 |
+
.route('/popup/LB')
|
23 |
+
.get(protect,leaderboard)
|
24 |
+
|
25 |
+
|
26 |
+
|
27 |
+
ModelRouter
|
28 |
+
.route('/Question')
|
29 |
+
.get(protect,qsnsStatus)
|
30 |
+
|
31 |
+
|
32 |
+
ModelRouter
|
33 |
+
.route('/round')
|
34 |
+
.post(protect,rounds)
|
35 |
+
|
36 |
+
|
37 |
+
|
38 |
+
|
39 |
+
|
40 |
+
ModelRouter
|
41 |
+
.route('/newUsers')
|
42 |
+
.get(newUsers)
|
43 |
+
|
44 |
+
|
45 |
+
|
46 |
+
|
47 |
+
|
48 |
+
|
49 |
+
|
50 |
+
|
51 |
+
|
52 |
+
|
53 |
+
|
54 |
+
|
55 |
+
|
56 |
+
|
57 |
+
|
58 |
+
module.exports = ModelRouter;
|
59 |
+
|
60 |
+
|
61 |
+
|
routers/QuestionRouter.js
ADDED
@@ -0,0 +1,38 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
const express = require('express');
|
2 |
+
const crypto = require('crypto');
|
3 |
+
const path = require('path');
|
4 |
+
|
5 |
+
|
6 |
+
const QuestionRouter = express.Router();
|
7 |
+
var cookies = require("cookie-parser");
|
8 |
+
const {validateAnswer, hintProvider } = require('../controllers/QuestionController');
|
9 |
+
const protect = require('../middlewares/ProtectRouter');
|
10 |
+
QuestionRouter.use(cookies());
|
11 |
+
|
12 |
+
|
13 |
+
|
14 |
+
|
15 |
+
QuestionRouter
|
16 |
+
.route('/answer')
|
17 |
+
.post(protect,validateAnswer)
|
18 |
+
|
19 |
+
|
20 |
+
|
21 |
+
QuestionRouter
|
22 |
+
.route('/hint')
|
23 |
+
.post(protect,hintProvider)
|
24 |
+
|
25 |
+
|
26 |
+
|
27 |
+
|
28 |
+
|
29 |
+
|
30 |
+
|
31 |
+
|
32 |
+
|
33 |
+
|
34 |
+
|
35 |
+
module.exports = QuestionRouter;
|
36 |
+
|
37 |
+
|
38 |
+
|
routers/RoundInitialRouter.js
ADDED
@@ -0,0 +1,29 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
const express = require('express');
|
2 |
+
const crypto = require('crypto');
|
3 |
+
const path = require('path');
|
4 |
+
|
5 |
+
|
6 |
+
const RIRouter = express.Router();
|
7 |
+
var cookies = require("cookie-parser");
|
8 |
+
const protect = require('../middlewares/ProtectRouter');
|
9 |
+
const { initialAssign } = require('../controllers/RoundInitialController');
|
10 |
+
const { post } = require('../controllers/RoundOneController');
|
11 |
+
RIRouter.use(cookies());
|
12 |
+
|
13 |
+
|
14 |
+
|
15 |
+
|
16 |
+
|
17 |
+
RIRouter
|
18 |
+
.route('/')
|
19 |
+
.get(post)
|
20 |
+
|
21 |
+
|
22 |
+
|
23 |
+
|
24 |
+
|
25 |
+
|
26 |
+
module.exports = RIRouter;
|
27 |
+
|
28 |
+
|
29 |
+
|
routers/RoundsRouter.js
ADDED
@@ -0,0 +1,37 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
const express = require('express');
|
2 |
+
const router = express.Router();
|
3 |
+
var bodyParser = require('body-parser')
|
4 |
+
router.use(bodyParser.json()); // to support JSON-encoded bodies
|
5 |
+
router.use(bodyParser.urlencoded({ // to support URL-encoded bodies
|
6 |
+
extended: true
|
7 |
+
}));
|
8 |
+
var cookies = require("cookie-parser");
|
9 |
+
router.use(cookies());
|
10 |
+
|
11 |
+
const round1 = require("../controllers/RoundOneController");
|
12 |
+
const round2 = require("../controllers/RoundTwoController");
|
13 |
+
const protect = require('../middlewares/ProtectRouter');
|
14 |
+
const { initialAssign } = require('../controllers/RoundInitialController');
|
15 |
+
const { roundThreeAssign } = require('../controllers/RoundThreeController');
|
16 |
+
const { roundFourAssign } = require('../controllers/RoundFourController');
|
17 |
+
const { getResponse } = require('../controllers/VerificationController');
|
18 |
+
|
19 |
+
|
20 |
+
router
|
21 |
+
.route("/first")
|
22 |
+
.get(round1.post)
|
23 |
+
.post(protect, round1.post)
|
24 |
+
router
|
25 |
+
.route("/second")
|
26 |
+
.get(protect, round2.roundTwoAssign)
|
27 |
+
//.post(protect, round2.post);
|
28 |
+
router
|
29 |
+
.route("/third")
|
30 |
+
.get(protect, roundThreeAssign)
|
31 |
+
router
|
32 |
+
.route("/fourth")
|
33 |
+
.get(protect, roundFourAssign)
|
34 |
+
module.exports = router;
|
35 |
+
|
36 |
+
|
37 |
+
|