mirror of
https://github.com/AlecM33/Werewolf.git
synced 2026-01-02 01:03:24 +01:00
Compare commits
12 Commits
v1.3.7
...
dependabot
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f5b48de54a | ||
|
|
26f2fc5165 | ||
|
|
5bfe11e5a1 | ||
|
|
83dd5eb815 | ||
|
|
054234b38d | ||
|
|
12568d31ea | ||
|
|
b749fa0801 | ||
|
|
2ef27c8248 | ||
|
|
75189d109a | ||
|
|
2a4fa2861f | ||
|
|
4b4b005d8a | ||
|
|
ad20a291ec |
2
.github/workflows/node.js.yml
vendored
2
.github/workflows/node.js.yml
vendored
@@ -22,7 +22,7 @@ jobs:
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Use Node.js ${{ matrix.node-version }}
|
||||
uses: actions/setup-node@v2
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: ${{ matrix.node-version }}
|
||||
cache: 'npm'
|
||||
|
||||
8
client/src/images/delete-2.svg
Normal file
8
client/src/images/delete-2.svg
Normal file
@@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="utf-8"?><!-- Uploaded to: SVG Repo, www.svgrepo.com, Generator: SVG Repo Mixer Tools -->
|
||||
<svg width="800px" height="800px" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M10 12V17" stroke="#e73333" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
<path d="M14 12V17" stroke="#e73333" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
<path d="M4 7H20" stroke="#e73333" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
<path d="M6 10V18C6 19.6569 7.34315 21 9 21H15C16.6569 21 18 19.6569 18 18V10" stroke="#e73333" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
<path d="M9 5C9 3.89543 9.89543 3 11 3H13C14.1046 3 15 3.89543 15 5V7H9V5Z" stroke="#e73333" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 855 B |
BIN
client/src/images/framed-phone-screenshot-2_resized.webp
Normal file
BIN
client/src/images/framed-phone-screenshot-2_resized.webp
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 6.7 KiB |
BIN
client/src/images/framed-phone-screenshot_resized.webp
Normal file
BIN
client/src/images/framed-phone-screenshot_resized.webp
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 7.4 KiB |
@@ -10,17 +10,17 @@ export const HTMLFragments = {
|
||||
<canvas id="canvas"></canvas>
|
||||
<div id='game-parameters'>
|
||||
<div>
|
||||
<img alt='clock' src='/images/clock.svg'/>
|
||||
<img alt='clock' width="20" height="20" src='/images/clock.svg'/>
|
||||
<div id='timer-parameters'></div>
|
||||
</div>
|
||||
<div>
|
||||
<img alt='person' src='/images/person.svg'/>
|
||||
<img alt='person' width="22" height="20" src='/images/person.svg'/>
|
||||
<div id='game-player-count'></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<button id='role-info-button' class='app-button'>Roles in This Game <img alt='Info icon' src='/images/info.svg'/></button>
|
||||
<button id='role-info-button' class='app-button'>Roles in This Game <img alt='Info icon' width="25" height="25" src='/images/info.svg'/></button>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
@@ -84,7 +84,7 @@ export const HTMLFragments = {
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<button id='role-info-button' class='app-button'>Roles in This Game <img alt='Info icon' src='/images/info.svg'/></button>
|
||||
<button id='role-info-button' class='app-button'>Roles in This Game <img alt='Info icon' width="25" height="25" src='/images/info.svg'/></button>
|
||||
</div>
|
||||
</div>
|
||||
<div id='game-role' tabindex="0">
|
||||
@@ -127,7 +127,7 @@ export const HTMLFragments = {
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<button id='role-info-button' class='app-button'>Roles in This Game <img alt='Info icon' src='/images/info.svg'/></button>
|
||||
<button id='role-info-button' class='app-button'>Roles in This Game <img alt='Info icon' width="25" height="25" src='/images/info.svg'/></button>
|
||||
</div>
|
||||
</div>
|
||||
<div id='game-people-container'>
|
||||
@@ -187,7 +187,7 @@ export const HTMLFragments = {
|
||||
Transfer Mod Powers <img alt='transfer icon' src='/images/shuffle.svg'/>
|
||||
</button>
|
||||
<div>
|
||||
<button id='role-info-button' class='app-button'>Roles in This Game <img alt='Info icon' src='/images/info.svg'/></button>
|
||||
<button id='role-info-button' class='app-button'>Roles in This Game <img alt='Info icon' width="25" height="25" src='/images/info.svg'/></button>
|
||||
</div>
|
||||
</div>
|
||||
<div id="game-players-container">
|
||||
@@ -229,7 +229,7 @@ export const HTMLFragments = {
|
||||
<div id='play-pause'> </div>
|
||||
</div>
|
||||
<div>
|
||||
<button id='role-info-button' class='app-button'>Roles in This Game <img alt='Info icon' src='/images/info.svg'/></button>
|
||||
<button id='role-info-button' class='app-button'>Roles in This Game <img alt='Info icon' width="25" height="25" src='/images/info.svg'/></button>
|
||||
</div>
|
||||
</div>
|
||||
<div id='game-role' tabindex="0">
|
||||
@@ -309,7 +309,7 @@ export const HTMLFragments = {
|
||||
`<div id='end-of-game-header'>
|
||||
<h2>🏁 The moderator has ended the game. Roles are revealed.</h2>
|
||||
<div id="end-of-game-buttons">
|
||||
<button id='role-info-button' class='app-button'>Roles in This Game <img alt='Info icon' src='/images/info.svg'/></button>
|
||||
<button id='role-info-button' class='app-button'>Roles in This Game <img alt='Info icon' width="25" height="25" src='/images/info.svg'/></button>
|
||||
</div>
|
||||
</div>
|
||||
<div id='game-people-container'>
|
||||
@@ -369,7 +369,7 @@ export const HTMLFragments = {
|
||||
<img tabindex="0" class="role-include" src="../images/add.svg" title="add one" alt="add one"/>
|
||||
<img tabindex="0" class="role-info" src="../images/info.svg" title="info" alt="info"/>
|
||||
<img tabindex="0" class="role-edit" src="../images/pencil.svg" title="edit" alt="edit"/>
|
||||
<img tabindex="0" class="role-remove" src="../images/delete.svg" title="remove" alt="remove"/>
|
||||
<img tabindex="0" class="role-remove" src="../images/delete-2.svg" title="remove" alt="remove"/>
|
||||
</div>`,
|
||||
DECK_SELECT_ROLE_DEFAULT:
|
||||
`<div class="role-name"></div>
|
||||
|
||||
@@ -500,7 +500,7 @@ function showButtons (back, forward, forwardHandler, backHandler, builtGame = nu
|
||||
document.querySelector('#create-game')?.remove();
|
||||
if (back) {
|
||||
const backButton = document.createElement('button');
|
||||
backButton.innerHTML = '<img alt="back" src="../../images/caret-back.svg"/>';
|
||||
backButton.innerHTML = '<img alt="back" width="40" height="40" src="../../images/caret-back.svg"/>';
|
||||
backButton.addEventListener('click', backHandler);
|
||||
backButton.setAttribute('id', 'step-back-button');
|
||||
backButton.classList.add('app-button');
|
||||
@@ -509,7 +509,7 @@ function showButtons (back, forward, forwardHandler, backHandler, builtGame = nu
|
||||
|
||||
if (forward && builtGame === null) {
|
||||
const fwdButton = document.createElement('button');
|
||||
fwdButton.innerHTML = '<img alt="next" src="../../images/caret-forward.svg"/>';
|
||||
fwdButton.innerHTML = '<img alt="next" width="40" height="40" src="../../images/caret-forward.svg"/>';
|
||||
fwdButton.addEventListener('click', forwardHandler);
|
||||
fwdButton.setAttribute('id', 'step-forward-button');
|
||||
fwdButton.classList.add('app-button');
|
||||
|
||||
@@ -46,9 +46,7 @@ function attemptToJoinGame (event) {
|
||||
} else {
|
||||
res.json().then(json => {
|
||||
window.location = window.location.protocol + '//' + window.location.host +
|
||||
'/join/' + encodeURIComponent(json.accessCode) +
|
||||
'?playerCount=' + encodeURIComponent(json.playerCount) +
|
||||
'&timer=' + encodeURIComponent(getTimeString(json.timerParams));
|
||||
'/join/' + encodeURIComponent(json.accessCode);
|
||||
});
|
||||
}
|
||||
}).catch(() => {
|
||||
@@ -62,29 +60,6 @@ function attemptToJoinGame (event) {
|
||||
}
|
||||
}
|
||||
|
||||
function getTimeString (timerParams) {
|
||||
let timeString = '';
|
||||
if (timerParams) {
|
||||
const hours = timerParams.hours;
|
||||
const minutes = timerParams.minutes;
|
||||
if (hours) {
|
||||
timeString += hours > 1
|
||||
? hours + ' hours '
|
||||
: hours + ' hour ';
|
||||
}
|
||||
if (minutes) {
|
||||
timeString += minutes > 1
|
||||
? minutes + ' minutes '
|
||||
: minutes + ' minute ';
|
||||
}
|
||||
|
||||
return timeString;
|
||||
} else {
|
||||
timeString = 'untimed';
|
||||
return timeString;
|
||||
}
|
||||
}
|
||||
|
||||
if (typeof module !== 'undefined' && typeof module.exports !== 'undefined') {
|
||||
module.exports = home;
|
||||
} else {
|
||||
|
||||
@@ -299,7 +299,6 @@ button {
|
||||
}
|
||||
|
||||
#game-parameters img {
|
||||
height: 20px;
|
||||
margin-right: 10px;
|
||||
}
|
||||
|
||||
|
||||
@@ -454,9 +454,9 @@ input[type="number"] {
|
||||
}
|
||||
|
||||
#role-select {
|
||||
margin: 0.5em 1em 1.5em 0;
|
||||
margin: 0.5em 0;
|
||||
overflow-y: auto;
|
||||
height: 20em;
|
||||
height: 22em;
|
||||
}
|
||||
|
||||
.default-role, .custom-role, .added-role {
|
||||
@@ -492,8 +492,8 @@ input[type="number"] {
|
||||
}
|
||||
|
||||
#role-select img, #deck-status-container img {
|
||||
height: 20px;
|
||||
margin: 0 8px;
|
||||
height: 25px;
|
||||
margin: 0 10px;
|
||||
cursor: pointer;
|
||||
padding: 5px;
|
||||
border-radius: 5px;
|
||||
@@ -505,7 +505,7 @@ input[type="number"] {
|
||||
}
|
||||
|
||||
#role-select img:nth-child(4) {
|
||||
height: 18px;
|
||||
height: 25px;
|
||||
}
|
||||
|
||||
#role-select img:hover, #deck-status-container img:hover {
|
||||
@@ -683,7 +683,7 @@ input[type="number"] {
|
||||
|
||||
@media(max-width: 550px) {
|
||||
#custom-roles-container, #deck-status-container {
|
||||
min-width: 85%;
|
||||
min-width: 90%;
|
||||
}
|
||||
h1 {
|
||||
font-size: 32px;
|
||||
|
||||
@@ -182,7 +182,7 @@
|
||||
}
|
||||
|
||||
#timer-parameters {
|
||||
width: 65px;
|
||||
width: fit-content;
|
||||
}
|
||||
|
||||
#role-edit-container-background, #timer-edit-container-background {
|
||||
@@ -268,6 +268,7 @@ h1 {
|
||||
border-radius: 5px;
|
||||
padding: 7px;
|
||||
margin: 0.5em;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
#end-of-game-header button {
|
||||
|
||||
@@ -21,7 +21,7 @@ button#home-create-button {
|
||||
}
|
||||
|
||||
.framed-phone-screenshot-container {
|
||||
margin: 0 0 20px 0;
|
||||
margin: 0 0 0 0;
|
||||
border: 1px solid #464552;
|
||||
}
|
||||
|
||||
@@ -95,7 +95,7 @@ a button {
|
||||
|
||||
#join-button:hover {
|
||||
background-color: #326243;
|
||||
border: 2px solid #1c8a36;
|
||||
border: 3px solid #1c8a36;
|
||||
}
|
||||
|
||||
#join-form div:nth-child(1) {
|
||||
@@ -194,5 +194,6 @@ label[for="room-code"], label[for="player-name"] {
|
||||
|
||||
#about-container h2 {
|
||||
font-size: 18px;
|
||||
margin: 0 15px 20px 15px;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -36,9 +36,9 @@ export const hiddenMenus =
|
||||
<div tabindex="-1" id="custom-role-info-modal" class="modal">
|
||||
<h3 id="custom-role-info-modal-name"></h3>
|
||||
<div id="custom-role-info-modal-image-placeholder"></div>
|
||||
<label for="custom-role-info-modal-alignment">alignment:</label>
|
||||
<label>alignment:</label>
|
||||
<div id="custom-role-info-modal-alignment"></div>
|
||||
<label for="custom-role-info-modal-alignment">description:</label>
|
||||
<label>description:</label>
|
||||
<div id="custom-role-info-modal-description"></div>
|
||||
<div class="modal-button-container single-button">
|
||||
<button id="close-custom-role-info-modal-button" class="cancel app-button">Close</button>
|
||||
|
||||
@@ -11,11 +11,9 @@
|
||||
<meta property="og:url" content="https://play-werewolf.app">
|
||||
<meta property="og:description" content="An app to create and run games of Werewolf (Mafia) with your friends. No sign-up, installation, or payment required.">
|
||||
<meta property="og:image" content="image.png">
|
||||
|
||||
<link rel="icon" href="/favicon.ico">
|
||||
<link rel="icon" href="/favicon.svg" type="image/svg+xml">
|
||||
<link rel="apple-touch-icon" href="/apple-touch-icon.png">
|
||||
|
||||
<link rel="stylesheet" href="./styles/GLOBAL.css">
|
||||
<link rel="stylesheet" href="./styles/home.css">
|
||||
<link rel="stylesheet" href="/styles/hamburgers.css">
|
||||
@@ -47,16 +45,16 @@
|
||||
</div>
|
||||
<div id="about-container">
|
||||
<div>
|
||||
<div class="framed-phone-screenshot-container">
|
||||
<img id="framed-phone-screenshot" alt="framed phone screenshot" src="../images/framed-phone-screenshot.webp"/>
|
||||
</div>
|
||||
<h2>Join a game and have a role dealt to your device.</h2>
|
||||
<div class="framed-phone-screenshot-container">
|
||||
<img id="framed-phone-screenshot" alt="framed phone screenshot" src="../images/framed-phone-screenshot_resized.webp"/>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<div class="framed-phone-screenshot-container">
|
||||
<img id="framed-phone-screenshot-2" alt="framed phone screenshot" src="../images/framed-phone-screenshot-2.webp"/>
|
||||
</div>
|
||||
<h2>Create your own game with default or custom roles.</h2>
|
||||
<div class="framed-phone-screenshot-container">
|
||||
<img id="framed-phone-screenshot-2" alt="framed phone screenshot" src="../images/framed-phone-screenshot-2_resized.webp"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script src="/dist/home-bundle.js.gz"></script>
|
||||
|
||||
@@ -14,8 +14,6 @@
|
||||
<link rel="icon" href="/favicon.svg" type="image/svg+xml">
|
||||
<link rel="apple-touch-icon" href="/apple-touch-icon.png">
|
||||
<link rel="stylesheet" href="/styles/GLOBAL.css">
|
||||
<link rel="stylesheet" href="/styles/create.css">
|
||||
<link rel="stylesheet" href="/styles/modal.css">
|
||||
<link rel="stylesheet" href="/styles/hamburgers.css">
|
||||
</head>
|
||||
<body>
|
||||
@@ -39,10 +37,8 @@
|
||||
</ul>
|
||||
</div>
|
||||
<h1 class="how-to-use-header" id="purpose-of-the-app">Purpose</h1>
|
||||
<div class="how-to-use-section">This app helps a group play Werewolf when meeting virtually, or when you don't have
|
||||
Werewolf cards with you. In general, the app can be very efficient for setting up games of any size and configuration.
|
||||
Once everyone has joined the room, cards can be quickly dealt and re-dealt, and important information such as
|
||||
role descriptions, time remaining, and the status of players is conveniently centralized. It's flexible, free,
|
||||
<div class="how-to-use-section">This app helps a group play Werewolf when meeting virtually, or when it's simply difficult to
|
||||
play with physical cards. Set up games with any number of roles and deal them to everyone's device. It's flexible, free,
|
||||
and doesn't require installing an app or creating an account. If you use this app, I'd love to hear about it. I
|
||||
am always looking for ways to improve this tool.
|
||||
</div>
|
||||
@@ -52,27 +48,23 @@
|
||||
<br>
|
||||
<h3>- Step One: Choosing a method of moderation</h3>
|
||||
<br>
|
||||
You have two options for moderation during the game. If the moderator isn't playing, you can choose the <span class="emphasized">Dedicated
|
||||
Moderator</span> option. Dedicated Moderators are not dealt into the game. Once they start the game, they will know
|
||||
everyone's role. During the game, they can kill players, reveal players' roles, transfer their
|
||||
moderator powers, play/pause the timer (if there is one), end the game (revealing everyone's role), or return the game to the lobby.
|
||||
Choose either the <span class="emphasized">Dedicated
|
||||
Moderator</span> option or the <span class="emphasized">Temporary Moderator</span> option. Dedicated moderators
|
||||
are not dealt into the game, while temporary moderators are. Both will have moderator powers, but temporary moderators
|
||||
will not know anyone's role. When they first remove someone from the game, their moderator powers will be transferred to that person,
|
||||
who will become a dedicated moderator.
|
||||
<br><br>
|
||||
Similarly, you can also choose the <span class="emphasized">Temporary Moderator</span> option. You are dealt a role,
|
||||
and you have the same powers as the Dedicated Moderator, except game knowledge - you know the same
|
||||
information that a regular player does. When you remove the first player from the game (which can be yourself),
|
||||
they will automatically become the dedicated moderator.
|
||||
<br><br>
|
||||
<span class="emphasized">Dedicated Moderators</span> can transfer their moderator powers to a player that is out,
|
||||
or to a spectator. That way, if the current Dedicated Moderator has to leave, or simply does not want to moderate
|
||||
Dedicated moderators can transfer their moderator powers to any player that has been eliminated,
|
||||
or to a spectator. That way, if the current moderator has to leave, or simply does not want to moderate
|
||||
anymore, they can easily delegate.
|
||||
<br><br>
|
||||
<h3>- Step Two: Build your deck</h3>
|
||||
<br>
|
||||
There is a role box on this page that includes a list of <span class="emphasized">Default Roles</span> and a list
|
||||
There is a <span class="emphasized">Role Box</span> on this page that includes a list of <span class="emphasized">Default Roles</span> and a list
|
||||
of <span class="emphasized">Custom Roles</span>, which can be displayed by selecting the appropriate button within the box.
|
||||
If you want to add a certain role to the game, click the <span class="emphasized">green plus</span> and one copy
|
||||
of it will be added to the <span class="emphasized">Deck</span> which is the other box displaying a player count.
|
||||
Likewise, if you want to remove one copy of a given role, click the <span class="emphasized">red minus</span> on the role
|
||||
If you want to add a certain role to the game, click the green plus, and one copy
|
||||
of it will be added to the <span class="emphasized">Deck Box</span>, which displays the added roles and the corresponding player count.
|
||||
Likewise, if you want to remove one copy of a given role, click the red minus on the role
|
||||
in the Deck Box.
|
||||
<br><br>
|
||||
Here I add 3 villagers to the game, and then remove them:
|
||||
@@ -97,13 +89,13 @@
|
||||
<h3>- In the Lobby</h3>
|
||||
<br>
|
||||
In the Lobby, moderators can manage the people in the room and the cards in the game. By clicking
|
||||
the <span class="emphasized">three vertical dots (AKA the "kebab menu")</span> next to a given player (<span class="emphasized">point A</span>
|
||||
the three vertical dots (AKA the "kebab menu") next to a given player (<span class="emphasized">point A</span>
|
||||
in the screenshot below), you have the option to kick that player. You can do the same with a spectator by first
|
||||
viewing the spectator list (<span class="emphasized">point C</span>) and clicking their kebab menus. By clicking the
|
||||
"Edit Roles" button (<span class="emphasized">point B</span>), you can change which roles are in the game and the
|
||||
quantities of those roles. This button will bring up the same module you encountered when you first created the room.
|
||||
Saving any changes to the roles may affect the player count. If you wish to <span class="emphasized">start the game (point B)</span>, the number
|
||||
of Players in the Lobby must equal the number of cards in the game.
|
||||
Saving any changes to the roles may affect the player count. If you wish to start the game <span class="emphasized">(point B)</span>, the number
|
||||
of players in the lobby must equal the number of cards in the game.
|
||||
<br><br>
|
||||
<img alt="moderator view in the lobby" class='tutorial-image-small-portrait' src="../images/tutorial/dedicated-mod-lobby-mobile.webp"/>
|
||||
<br><br>
|
||||
@@ -115,15 +107,15 @@
|
||||
but not the "Reveal" option. Or, if you happen to have a role that reveals but is not immediately removed from the game,
|
||||
you can use the "Reveal" option but not the "Kill" option. You of course don't have to utilize either of these options.
|
||||
If you just want to use the app to deal cards, you are free to do that. The moderator also has permission to
|
||||
play and pause the Timer (<span class="emphasized">Point B</span>), and can end the game (revealing everyone's role)
|
||||
or return the game to the Lobby (<span class="emphasized">Point C</span>), where it can be started anew with different settings.
|
||||
play and pause the timer (<span class="emphasized">Point B</span>), and can end the game (revealing everyone's role)
|
||||
or return the game to the lobby (<span class="emphasized">Point C</span>), where it can be started again with different settings.
|
||||
<br><br>
|
||||
<img alt="moderator view during the game" class='tutorial-image-small-portrait' src="../images/tutorial/dedicated-mod-in-progress-mobile.webp"/>
|
||||
<br><br>
|
||||
Similarly, the <span class="emphasized">Temporary Moderator view</span> looks like the below image. They have
|
||||
Similarly, the <span class="emphasized">Temporary Moderator</span> view looks like the below image. They have
|
||||
much the same abilities as a dedicated moderator, except they don't know role or alignment information and cannot
|
||||
transfer their powers. Their powers will be transferred automatically to the first person they remove from the game
|
||||
(which can be themselves).
|
||||
(which can be themselves!).
|
||||
<br><br>
|
||||
<img alt="temporary moderator view during the game" class='tutorial-image-small-portrait' src="../images/tutorial/temp-mod-in-progress-mobile.webp"/>
|
||||
<br><br>
|
||||
@@ -138,7 +130,7 @@
|
||||
<h1 class="how-to-use-header" id="being-a-player">Being a Player</h1>
|
||||
<div class="how-to-use-section">
|
||||
This is an example of what a <span class="emphasized">Player</span> is seeing, including the running timer,
|
||||
their role card, and the player list. You can also edit your name for the Room by clicking the pencil next to it.
|
||||
their role card, and the player list. You can also edit your name for the room by clicking the pencil next to it.
|
||||
Below, we flip our role card up and down by double-clicking it, and then we bring up the prompt to edit our name:
|
||||
<br><br>
|
||||
<img alt='player-view' class='tutorial-image-small-portrait' src="../images/tutorial/player-view.gif"/>
|
||||
@@ -146,8 +138,8 @@
|
||||
Players can view the timer, but only the current moderator can play and pause it. Your role card starts flipped over
|
||||
- this is useful if you are in-person and don't want someone else accidentally seeing your role as
|
||||
it is dealt. You can view your role at any time by double-clicking/double-tapping it. Requiring a double-click guards against the possibility
|
||||
of accidentally flipping your role when tapping other things. Within the Player List, you can see who is alive or
|
||||
dead and who has had their role revealed. There is also a <span class="emphasized">role info button</span> that,
|
||||
of accidentally flipping your role when tapping other things. Within the player list, you can see who is alive or
|
||||
dead and who has had their role revealed. There is also a role info button that,
|
||||
when pressed, displays all the different roles in the current game, including their descriptions and alignment (Good/Evil).
|
||||
<br><br>
|
||||
</div>
|
||||
|
||||
388
package-lock.json
generated
388
package-lock.json
generated
@@ -10,10 +10,10 @@
|
||||
"license": "ISC",
|
||||
"dependencies": {
|
||||
"babel-loader": "^8.2.3",
|
||||
"body-parser": "^1.20.3",
|
||||
"body-parser": "^1.20.4",
|
||||
"compression-webpack-plugin": "^10.0.0",
|
||||
"cors": "^2.8.5",
|
||||
"express": "^4.21.1",
|
||||
"express": "^4.22.1",
|
||||
"express-force-https": "^1.0.0",
|
||||
"express-rate-limit": "^6.0.1",
|
||||
"open": "^7.0.3",
|
||||
@@ -47,7 +47,7 @@
|
||||
"webpack-remove-debug": "^0.1.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 14.0.0"
|
||||
"node": ">= 20.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@ampproject/remapping": {
|
||||
@@ -98,6 +98,7 @@
|
||||
"version": "7.18.13",
|
||||
"resolved": "https://registry.npmjs.org/@babel/core/-/core-7.18.13.tgz",
|
||||
"integrity": "sha512-ZisbOvRRusFktksHSG6pjj1CSvkPkcZq/KHD45LAkVP/oiHJkNBZWfpvlLmX8OtHDG8IuzsFlVRWo08w7Qxn0A==",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"@ampproject/remapping": "^2.1.0",
|
||||
"@babel/code-frame": "^7.18.6",
|
||||
@@ -1885,6 +1886,7 @@
|
||||
"version": "1.4.2",
|
||||
"resolved": "https://registry.npmjs.org/@redis/client/-/client-1.4.2.tgz",
|
||||
"integrity": "sha512-oUdEjE0I7JS5AyaAjkD3aOXn9NhO7XKyPyXEyrgFDu++VrVBHUPnV6dgEya9TcMuj5nIJRuCzCm8ZP+c9zCHPw==",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"cluster-key-slot": "1.1.1",
|
||||
"generic-pool": "3.9.0",
|
||||
@@ -2179,6 +2181,7 @@
|
||||
"version": "8.14.0",
|
||||
"resolved": "https://registry.npmjs.org/acorn/-/acorn-8.14.0.tgz",
|
||||
"integrity": "sha512-cl669nCJTZBsL97OF4kUQm5g5hC2uihk0NxY3WENAC0TYdILVkAyHymAntgxGkl7K+t0cXIrH5siy5S4XkFycA==",
|
||||
"peer": true,
|
||||
"bin": {
|
||||
"acorn": "bin/acorn"
|
||||
},
|
||||
@@ -2199,6 +2202,7 @@
|
||||
"version": "6.12.6",
|
||||
"resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz",
|
||||
"integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"fast-deep-equal": "^3.1.1",
|
||||
"fast-json-stable-stringify": "^2.0.0",
|
||||
@@ -2490,28 +2494,49 @@
|
||||
}
|
||||
},
|
||||
"node_modules/body-parser": {
|
||||
"version": "1.20.3",
|
||||
"resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.3.tgz",
|
||||
"integrity": "sha512-7rAxByjUMqQ3/bHJy7D6OGXvx/MMc4IqBn/X0fcM1QUcAItpZrBEYhWGem+tzXH90c+G01ypMcYJBO9Y30203g==",
|
||||
"version": "1.20.4",
|
||||
"resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.4.tgz",
|
||||
"integrity": "sha512-ZTgYYLMOXY9qKU/57FAo8F+HA2dGX7bqGc71txDRC1rS4frdFI5R7NhluHxH6M0YItAP0sHB4uqAOcYKxO6uGA==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"bytes": "3.1.2",
|
||||
"bytes": "~3.1.2",
|
||||
"content-type": "~1.0.5",
|
||||
"debug": "2.6.9",
|
||||
"depd": "2.0.0",
|
||||
"destroy": "1.2.0",
|
||||
"http-errors": "2.0.0",
|
||||
"iconv-lite": "0.4.24",
|
||||
"on-finished": "2.4.1",
|
||||
"qs": "6.13.0",
|
||||
"raw-body": "2.5.2",
|
||||
"destroy": "~1.2.0",
|
||||
"http-errors": "~2.0.1",
|
||||
"iconv-lite": "~0.4.24",
|
||||
"on-finished": "~2.4.1",
|
||||
"qs": "~6.14.0",
|
||||
"raw-body": "~2.5.3",
|
||||
"type-is": "~1.6.18",
|
||||
"unpipe": "1.0.0"
|
||||
"unpipe": "~1.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 0.8",
|
||||
"npm": "1.2.8000 || >= 1.4.16"
|
||||
}
|
||||
},
|
||||
"node_modules/body-parser/node_modules/http-errors": {
|
||||
"version": "2.0.1",
|
||||
"resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.1.tgz",
|
||||
"integrity": "sha512-4FbRdAX+bSdmo4AUFuS0WNiPz8NgFt+r8ThgNWmlrjQjt1Q7ZR9+zTlce2859x4KSXrwIsaeTqDoKQmtP8pLmQ==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"depd": "~2.0.0",
|
||||
"inherits": "~2.0.4",
|
||||
"setprototypeof": "~1.2.0",
|
||||
"statuses": "~2.0.2",
|
||||
"toidentifier": "~1.0.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 0.8"
|
||||
},
|
||||
"funding": {
|
||||
"type": "opencollective",
|
||||
"url": "https://opencollective.com/express"
|
||||
}
|
||||
},
|
||||
"node_modules/body-parser/node_modules/on-finished": {
|
||||
"version": "2.4.1",
|
||||
"resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.4.1.tgz",
|
||||
@@ -2523,6 +2548,15 @@
|
||||
"node": ">= 0.8"
|
||||
}
|
||||
},
|
||||
"node_modules/body-parser/node_modules/statuses": {
|
||||
"version": "2.0.2",
|
||||
"resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.2.tgz",
|
||||
"integrity": "sha512-DvEy55V3DB7uknRo+4iOGT5fP1slR8wQohVdknigZPMpMstaKJQWhwiYBACJE3Ul2pTnATihhBYnRhZQHGBiRw==",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">= 0.8"
|
||||
}
|
||||
},
|
||||
"node_modules/brace-expansion": {
|
||||
"version": "1.1.11",
|
||||
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz",
|
||||
@@ -2563,6 +2597,7 @@
|
||||
"url": "https://github.com/sponsors/ai"
|
||||
}
|
||||
],
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"caniuse-lite": "^1.0.30001669",
|
||||
"electron-to-chromium": "^1.5.41",
|
||||
@@ -2585,6 +2620,7 @@
|
||||
"version": "3.1.2",
|
||||
"resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz",
|
||||
"integrity": "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">= 0.8"
|
||||
}
|
||||
@@ -2593,6 +2629,7 @@
|
||||
"version": "1.0.7",
|
||||
"resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.7.tgz",
|
||||
"integrity": "sha512-GHTSNSYICQ7scH7sZ+M2rFopRoLh8t2bLSW6BbgrtLsahOIB5iyAVJf9GjWK3cYTDaMj4XdBpM1cA6pIS0Kv2w==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"es-define-property": "^1.0.0",
|
||||
"es-errors": "^1.3.0",
|
||||
@@ -2607,6 +2644,35 @@
|
||||
"url": "https://github.com/sponsors/ljharb"
|
||||
}
|
||||
},
|
||||
"node_modules/call-bind-apply-helpers": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/call-bind-apply-helpers/-/call-bind-apply-helpers-1.0.2.tgz",
|
||||
"integrity": "sha512-Sp1ablJ0ivDkSzjcaJdxEunN5/XvksFJ2sMBFfq6x0ryhQV/2b/KwFe21cMpmHtPOSij8K99/wSfoEuTObmuMQ==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"es-errors": "^1.3.0",
|
||||
"function-bind": "^1.1.2"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 0.4"
|
||||
}
|
||||
},
|
||||
"node_modules/call-bound": {
|
||||
"version": "1.0.4",
|
||||
"resolved": "https://registry.npmjs.org/call-bound/-/call-bound-1.0.4.tgz",
|
||||
"integrity": "sha512-+ys997U96po4Kx/ABpBCqhA9EuxJaQWDQg7295H4hBphv3IZg0boBKuwYpt4YXp6MZ5AmZQnU/tyMTlRpaSejg==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"call-bind-apply-helpers": "^1.0.2",
|
||||
"get-intrinsic": "^1.3.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 0.4"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/ljharb"
|
||||
}
|
||||
},
|
||||
"node_modules/callsites": {
|
||||
"version": "3.1.0",
|
||||
"resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz",
|
||||
@@ -2777,6 +2843,7 @@
|
||||
"version": "8.12.0",
|
||||
"resolved": "https://registry.npmjs.org/ajv/-/ajv-8.12.0.tgz",
|
||||
"integrity": "sha512-sRu1kpcO9yLtYxBKvqfTeh9KzZEwO3STyX1HT+4CaDzC6HpTGYhIhPIzj9XuKU7KYDwnaeh5hcOwjy1QuJzBPA==",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"fast-deep-equal": "^3.1.1",
|
||||
"json-schema-traverse": "^1.0.0",
|
||||
@@ -2991,6 +3058,7 @@
|
||||
"version": "1.1.4",
|
||||
"resolved": "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.4.tgz",
|
||||
"integrity": "sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"es-define-property": "^1.0.0",
|
||||
"es-errors": "^1.3.0",
|
||||
@@ -3066,6 +3134,20 @@
|
||||
"void-elements": "^2.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/dunder-proto": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/dunder-proto/-/dunder-proto-1.0.1.tgz",
|
||||
"integrity": "sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"call-bind-apply-helpers": "^1.0.1",
|
||||
"es-errors": "^1.3.0",
|
||||
"gopd": "^1.2.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 0.4"
|
||||
}
|
||||
},
|
||||
"node_modules/ee-first": {
|
||||
"version": "1.1.1",
|
||||
"resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz",
|
||||
@@ -3285,12 +3367,10 @@
|
||||
}
|
||||
},
|
||||
"node_modules/es-define-property": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.0.tgz",
|
||||
"integrity": "sha512-jxayLKShrEqqzJ0eumQbVhTYQM27CfT1T35+gCgDFoL82JLsXqTJ76zv6A0YLOgEnLUMvLzsDsGIrl8NFpT2gQ==",
|
||||
"dependencies": {
|
||||
"get-intrinsic": "^1.2.4"
|
||||
},
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.1.tgz",
|
||||
"integrity": "sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g==",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">= 0.4"
|
||||
}
|
||||
@@ -3308,6 +3388,18 @@
|
||||
"resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-1.5.4.tgz",
|
||||
"integrity": "sha512-MVNK56NiMrOwitFB7cqDwq0CQutbw+0BvLshJSse0MUNU+y1FC3bUS/AQg7oUng+/wKrrki7JfmwtVHkVfPLlw=="
|
||||
},
|
||||
"node_modules/es-object-atoms": {
|
||||
"version": "1.1.1",
|
||||
"resolved": "https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.1.1.tgz",
|
||||
"integrity": "sha512-FGgH2h8zKNim9ljj7dankFPcICIK9Cp5bm+c2gQSYePhpaG5+esrLODihIorn+Pe6FGJzWhXQotPv73jTaldXA==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"es-errors": "^1.3.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 0.4"
|
||||
}
|
||||
},
|
||||
"node_modules/es-shim-unscopables": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/es-shim-unscopables/-/es-shim-unscopables-1.0.0.tgz",
|
||||
@@ -3360,6 +3452,7 @@
|
||||
"resolved": "https://registry.npmjs.org/eslint/-/eslint-7.32.0.tgz",
|
||||
"integrity": "sha512-VHZ8gX+EDfz+97jGcgyGCyRia/dPOd6Xh9yPv8Bl1+SoaIwD+a/vlrOmGRUyOYu7MwUhc7CxqeaDZU13S4+EpA==",
|
||||
"dev": true,
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"@babel/code-frame": "7.12.11",
|
||||
"@eslint/eslintrc": "^0.4.3",
|
||||
@@ -3519,6 +3612,7 @@
|
||||
"resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.26.0.tgz",
|
||||
"integrity": "sha512-hYfi3FXaM8WPLf4S1cikh/r4IxnO6zrhZbEGz2b660EJRbuxgpDS5gkCuYgGWg2xxh2rBuIr4Pvhve/7c31koA==",
|
||||
"dev": true,
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"array-includes": "^3.1.4",
|
||||
"array.prototype.flat": "^1.2.5",
|
||||
@@ -3558,6 +3652,7 @@
|
||||
"resolved": "https://registry.npmjs.org/eslint-plugin-node/-/eslint-plugin-node-11.1.0.tgz",
|
||||
"integrity": "sha512-oUwtPJ1W0SKD0Tr+wqu92c5xuCeQqB3hSCHasn/ZgjFdA9iDGNkNf2Zi9ztY7X+hNuMib23LNGRm6+uN+KLE3g==",
|
||||
"dev": true,
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"eslint-plugin-es": "^3.0.0",
|
||||
"eslint-utils": "^2.0.0",
|
||||
@@ -3578,6 +3673,7 @@
|
||||
"resolved": "https://registry.npmjs.org/eslint-plugin-promise/-/eslint-plugin-promise-5.2.0.tgz",
|
||||
"integrity": "sha512-SftLb1pUG01QYq2A/hGAWfDRXqYD82zE7j7TopDOyNdU+7SvvoXREls/+PRTY17vUXzXnZA/zfnyKgRH6x4JJw==",
|
||||
"dev": true,
|
||||
"peer": true,
|
||||
"engines": {
|
||||
"node": "^10.12.0 || >=12.0.0"
|
||||
},
|
||||
@@ -3934,44 +4030,50 @@
|
||||
}
|
||||
},
|
||||
"node_modules/express": {
|
||||
"version": "4.21.1",
|
||||
"resolved": "https://registry.npmjs.org/express/-/express-4.21.1.tgz",
|
||||
"integrity": "sha512-YSFlK1Ee0/GC8QaO91tHcDxJiE/X4FbpAyQWkxAvG6AXCuR65YzK8ua6D9hvi/TzUfZMpc+BwuM1IPw8fmQBiQ==",
|
||||
"version": "4.22.1",
|
||||
"resolved": "https://registry.npmjs.org/express/-/express-4.22.1.tgz",
|
||||
"integrity": "sha512-F2X8g9P1X7uCPZMA3MVf9wcTqlyNp7IhH5qPCI0izhaOIYXaW9L535tGA3qmjRzpH+bZczqq7hVKxTR4NWnu+g==",
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"accepts": "~1.3.8",
|
||||
"array-flatten": "1.1.1",
|
||||
"body-parser": "1.20.3",
|
||||
"content-disposition": "0.5.4",
|
||||
"body-parser": "~1.20.3",
|
||||
"content-disposition": "~0.5.4",
|
||||
"content-type": "~1.0.4",
|
||||
"cookie": "0.7.1",
|
||||
"cookie-signature": "1.0.6",
|
||||
"cookie": "~0.7.1",
|
||||
"cookie-signature": "~1.0.6",
|
||||
"debug": "2.6.9",
|
||||
"depd": "2.0.0",
|
||||
"encodeurl": "~2.0.0",
|
||||
"escape-html": "~1.0.3",
|
||||
"etag": "~1.8.1",
|
||||
"finalhandler": "1.3.1",
|
||||
"fresh": "0.5.2",
|
||||
"http-errors": "2.0.0",
|
||||
"finalhandler": "~1.3.1",
|
||||
"fresh": "~0.5.2",
|
||||
"http-errors": "~2.0.0",
|
||||
"merge-descriptors": "1.0.3",
|
||||
"methods": "~1.1.2",
|
||||
"on-finished": "2.4.1",
|
||||
"on-finished": "~2.4.1",
|
||||
"parseurl": "~1.3.3",
|
||||
"path-to-regexp": "0.1.10",
|
||||
"path-to-regexp": "~0.1.12",
|
||||
"proxy-addr": "~2.0.7",
|
||||
"qs": "6.13.0",
|
||||
"qs": "~6.14.0",
|
||||
"range-parser": "~1.2.1",
|
||||
"safe-buffer": "5.2.1",
|
||||
"send": "0.19.0",
|
||||
"serve-static": "1.16.2",
|
||||
"send": "~0.19.0",
|
||||
"serve-static": "~1.16.2",
|
||||
"setprototypeof": "1.2.0",
|
||||
"statuses": "2.0.1",
|
||||
"statuses": "~2.0.1",
|
||||
"type-is": "~1.6.18",
|
||||
"utils-merge": "1.0.1",
|
||||
"vary": "~1.1.2"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 0.10.0"
|
||||
},
|
||||
"funding": {
|
||||
"type": "opencollective",
|
||||
"url": "https://opencollective.com/express"
|
||||
}
|
||||
},
|
||||
"node_modules/express-force-https": {
|
||||
@@ -4337,15 +4439,21 @@
|
||||
}
|
||||
},
|
||||
"node_modules/get-intrinsic": {
|
||||
"version": "1.2.4",
|
||||
"resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.4.tgz",
|
||||
"integrity": "sha512-5uYhsJH8VJBTv7oslg4BznJYhDoRI6waYCxMmCdnTrcCrHA/fCFKoTFz2JKKE0HdDFUF7/oQuhzumXJK7paBRQ==",
|
||||
"version": "1.3.0",
|
||||
"resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.3.0.tgz",
|
||||
"integrity": "sha512-9fSjSaos/fRIVIp+xSJlE6lfwhES7LNtKaCBIamHsjr2na1BiABJPo0mOjjz8GJDURarmCPGqaiVg5mfjb98CQ==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"call-bind-apply-helpers": "^1.0.2",
|
||||
"es-define-property": "^1.0.1",
|
||||
"es-errors": "^1.3.0",
|
||||
"es-object-atoms": "^1.1.1",
|
||||
"function-bind": "^1.1.2",
|
||||
"has-proto": "^1.0.1",
|
||||
"has-symbols": "^1.0.3",
|
||||
"hasown": "^2.0.0"
|
||||
"get-proto": "^1.0.1",
|
||||
"gopd": "^1.2.0",
|
||||
"has-symbols": "^1.1.0",
|
||||
"hasown": "^2.0.2",
|
||||
"math-intrinsics": "^1.1.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 0.4"
|
||||
@@ -4354,6 +4462,19 @@
|
||||
"url": "https://github.com/sponsors/ljharb"
|
||||
}
|
||||
},
|
||||
"node_modules/get-proto": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/get-proto/-/get-proto-1.0.1.tgz",
|
||||
"integrity": "sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"dunder-proto": "^1.0.1",
|
||||
"es-object-atoms": "^1.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 0.4"
|
||||
}
|
||||
},
|
||||
"node_modules/get-stream": {
|
||||
"version": "6.0.1",
|
||||
"resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz",
|
||||
@@ -4428,11 +4549,12 @@
|
||||
}
|
||||
},
|
||||
"node_modules/gopd": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/gopd/-/gopd-1.0.1.tgz",
|
||||
"integrity": "sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==",
|
||||
"dependencies": {
|
||||
"get-intrinsic": "^1.1.3"
|
||||
"version": "1.2.0",
|
||||
"resolved": "https://registry.npmjs.org/gopd/-/gopd-1.2.0.tgz",
|
||||
"integrity": "sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg==",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">= 0.4"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/ljharb"
|
||||
@@ -4476,6 +4598,7 @@
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.2.tgz",
|
||||
"integrity": "sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"es-define-property": "^1.0.0"
|
||||
},
|
||||
@@ -4483,21 +4606,11 @@
|
||||
"url": "https://github.com/sponsors/ljharb"
|
||||
}
|
||||
},
|
||||
"node_modules/has-proto": {
|
||||
"version": "1.0.3",
|
||||
"resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.0.3.tgz",
|
||||
"integrity": "sha512-SJ1amZAJUiZS+PhsVLf5tGydlaVB8EdFpaSO4gmiUKUOxk8qzn5AIy4ZeJUmh22znIdk/uMAUT2pl3FxzVUH+Q==",
|
||||
"engines": {
|
||||
"node": ">= 0.4"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/ljharb"
|
||||
}
|
||||
},
|
||||
"node_modules/has-symbols": {
|
||||
"version": "1.0.3",
|
||||
"resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz",
|
||||
"integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==",
|
||||
"version": "1.1.0",
|
||||
"resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.1.0.tgz",
|
||||
"integrity": "sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ==",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">= 0.4"
|
||||
},
|
||||
@@ -4581,6 +4694,7 @@
|
||||
"version": "0.4.24",
|
||||
"resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz",
|
||||
"integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"safer-buffer": ">= 2.1.2 < 3"
|
||||
},
|
||||
@@ -5119,7 +5233,8 @@
|
||||
"version": "4.0.1",
|
||||
"resolved": "https://registry.npmjs.org/jasmine-core/-/jasmine-core-4.0.1.tgz",
|
||||
"integrity": "sha512-w+JDABxQCkxbGGxg+a2hUVZyqUS2JKngvIyLGu/xiw2ZwgsoSB0iiecLQsQORSeaKQ6iGrCyWG86RfNDuoA7Lg==",
|
||||
"dev": true
|
||||
"dev": true,
|
||||
"peer": true
|
||||
},
|
||||
"node_modules/jasmine/node_modules/jasmine-core": {
|
||||
"version": "3.10.1",
|
||||
@@ -5486,6 +5601,15 @@
|
||||
"url": "https://github.com/sponsors/sindresorhus"
|
||||
}
|
||||
},
|
||||
"node_modules/math-intrinsics": {
|
||||
"version": "1.1.0",
|
||||
"resolved": "https://registry.npmjs.org/math-intrinsics/-/math-intrinsics-1.1.0.tgz",
|
||||
"integrity": "sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g==",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">= 0.4"
|
||||
}
|
||||
},
|
||||
"node_modules/media-typer": {
|
||||
"version": "0.3.0",
|
||||
"resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz",
|
||||
@@ -5643,9 +5767,10 @@
|
||||
}
|
||||
},
|
||||
"node_modules/object-inspect": {
|
||||
"version": "1.13.2",
|
||||
"resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.2.tgz",
|
||||
"integrity": "sha512-IRZSRuzJiynemAXPYtPe5BoI/RESNYR7TYm50MC5Mqbd3Jmw5y790sErYw3V6SryFJD64b74qQQs9wn5Bg/k3g==",
|
||||
"version": "1.13.4",
|
||||
"resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.4.tgz",
|
||||
"integrity": "sha512-W67iLl4J2EXEGTbfeHCffrjDfitvLANg0UlX3wFUUSTx92KXRFegMHUVgSqE+wvhAbi4WqjGg9czysTV2Epbew==",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">= 0.4"
|
||||
},
|
||||
@@ -5857,9 +5982,10 @@
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/path-to-regexp": {
|
||||
"version": "0.1.10",
|
||||
"resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.10.tgz",
|
||||
"integrity": "sha512-7lf7qcQidTku0Gu3YDPc8DJ1q7OOucfa/BSsIwjuh56VU7katFvuM8hULfkwB3Fns/rsVF7PwPKVw1sl5KQS9w=="
|
||||
"version": "0.1.12",
|
||||
"resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.12.tgz",
|
||||
"integrity": "sha512-RA1GjUVMnvYFxuqovrEqZoxxW5NUZqbwKtYz/Tt7nXerk0LbLblQmrsgdeOxV5SFHf0UDggjS/bSeOZwt1pmEQ==",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/picocolors": {
|
||||
"version": "1.1.1",
|
||||
@@ -5943,11 +6069,12 @@
|
||||
}
|
||||
},
|
||||
"node_modules/qs": {
|
||||
"version": "6.13.0",
|
||||
"resolved": "https://registry.npmjs.org/qs/-/qs-6.13.0.tgz",
|
||||
"integrity": "sha512-+38qI9SOr8tfZ4QmJNplMUxqjbe7LKvvZgWdExBOmd+egZTtjLB67Gu0HRX3u/XOq7UU2Nx6nsjvS16Z9uwfpg==",
|
||||
"version": "6.14.1",
|
||||
"resolved": "https://registry.npmjs.org/qs/-/qs-6.14.1.tgz",
|
||||
"integrity": "sha512-4EK3+xJl8Ts67nLYNwqw/dsFVnCf+qR7RgXSK9jEEm9unao3njwMDdmsdvoKBKHzxd7tCYz5e5M+SnMjdtXGQQ==",
|
||||
"license": "BSD-3-Clause",
|
||||
"dependencies": {
|
||||
"side-channel": "^1.0.6"
|
||||
"side-channel": "^1.1.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=0.6"
|
||||
@@ -5978,19 +6105,49 @@
|
||||
"integrity": "sha512-8DVFOe89rreyut/vzwBI7vgXJynyYoYnH5XogtAKs0F/neAbCTTglXxSJ7fZeZamcFXZDvMidCBvps4KM+1srw=="
|
||||
},
|
||||
"node_modules/raw-body": {
|
||||
"version": "2.5.2",
|
||||
"resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.5.2.tgz",
|
||||
"integrity": "sha512-8zGqypfENjCIqGhgXToC8aB2r7YrBX+AQAfIPs/Mlk+BtPTztOvTS01NRW/3Eh60J+a48lt8qsCzirQ6loCVfA==",
|
||||
"version": "2.5.3",
|
||||
"resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.5.3.tgz",
|
||||
"integrity": "sha512-s4VSOf6yN0rvbRZGxs8Om5CWj6seneMwK3oDb4lWDH0UPhWcxwOWw5+qk24bxq87szX1ydrwylIOp2uG1ojUpA==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"bytes": "3.1.2",
|
||||
"http-errors": "2.0.0",
|
||||
"iconv-lite": "0.4.24",
|
||||
"unpipe": "1.0.0"
|
||||
"bytes": "~3.1.2",
|
||||
"http-errors": "~2.0.1",
|
||||
"iconv-lite": "~0.4.24",
|
||||
"unpipe": "~1.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 0.8"
|
||||
}
|
||||
},
|
||||
"node_modules/raw-body/node_modules/http-errors": {
|
||||
"version": "2.0.1",
|
||||
"resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.1.tgz",
|
||||
"integrity": "sha512-4FbRdAX+bSdmo4AUFuS0WNiPz8NgFt+r8ThgNWmlrjQjt1Q7ZR9+zTlce2859x4KSXrwIsaeTqDoKQmtP8pLmQ==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"depd": "~2.0.0",
|
||||
"inherits": "~2.0.4",
|
||||
"setprototypeof": "~1.2.0",
|
||||
"statuses": "~2.0.2",
|
||||
"toidentifier": "~1.0.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 0.8"
|
||||
},
|
||||
"funding": {
|
||||
"type": "opencollective",
|
||||
"url": "https://opencollective.com/express"
|
||||
}
|
||||
},
|
||||
"node_modules/raw-body/node_modules/statuses": {
|
||||
"version": "2.0.2",
|
||||
"resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.2.tgz",
|
||||
"integrity": "sha512-DvEy55V3DB7uknRo+4iOGT5fP1slR8wQohVdknigZPMpMstaKJQWhwiYBACJE3Ul2pTnATihhBYnRhZQHGBiRw==",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">= 0.8"
|
||||
}
|
||||
},
|
||||
"node_modules/readable-stream": {
|
||||
"version": "2.3.7",
|
||||
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz",
|
||||
@@ -6252,7 +6409,8 @@
|
||||
"node_modules/safer-buffer": {
|
||||
"version": "2.1.2",
|
||||
"resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz",
|
||||
"integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg=="
|
||||
"integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/schema-utils": {
|
||||
"version": "2.7.1",
|
||||
@@ -6374,6 +6532,7 @@
|
||||
"version": "1.2.2",
|
||||
"resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.2.2.tgz",
|
||||
"integrity": "sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"define-data-property": "^1.1.4",
|
||||
"es-errors": "^1.3.0",
|
||||
@@ -6431,14 +6590,69 @@
|
||||
}
|
||||
},
|
||||
"node_modules/side-channel": {
|
||||
"version": "1.0.6",
|
||||
"resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.6.tgz",
|
||||
"integrity": "sha512-fDW/EZ6Q9RiO8eFG8Hj+7u/oW+XrPTIChwCOM2+th2A6OblDtYYIpve9m+KvI9Z4C9qSEXlaGR6bTEYHReuglA==",
|
||||
"version": "1.1.0",
|
||||
"resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.1.0.tgz",
|
||||
"integrity": "sha512-ZX99e6tRweoUXqR+VBrslhda51Nh5MTQwou5tnUDgbtyM0dBgmhEDtWGP/xbKn6hqfPRHujUNwz5fy/wbbhnpw==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"call-bind": "^1.0.7",
|
||||
"es-errors": "^1.3.0",
|
||||
"get-intrinsic": "^1.2.4",
|
||||
"object-inspect": "^1.13.1"
|
||||
"object-inspect": "^1.13.3",
|
||||
"side-channel-list": "^1.0.0",
|
||||
"side-channel-map": "^1.0.1",
|
||||
"side-channel-weakmap": "^1.0.2"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 0.4"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/ljharb"
|
||||
}
|
||||
},
|
||||
"node_modules/side-channel-list": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/side-channel-list/-/side-channel-list-1.0.0.tgz",
|
||||
"integrity": "sha512-FCLHtRD/gnpCiCHEiJLOwdmFP+wzCmDEkc9y7NsYxeF4u7Btsn1ZuwgwJGxImImHicJArLP4R0yX4c2KCrMrTA==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"es-errors": "^1.3.0",
|
||||
"object-inspect": "^1.13.3"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 0.4"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/ljharb"
|
||||
}
|
||||
},
|
||||
"node_modules/side-channel-map": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/side-channel-map/-/side-channel-map-1.0.1.tgz",
|
||||
"integrity": "sha512-VCjCNfgMsby3tTdo02nbjtM/ewra6jPHmpThenkTYh8pG9ucZ/1P8So4u4FGBek/BjpOVsDCMoLA/iuBKIFXRA==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"call-bound": "^1.0.2",
|
||||
"es-errors": "^1.3.0",
|
||||
"get-intrinsic": "^1.2.5",
|
||||
"object-inspect": "^1.13.3"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 0.4"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/ljharb"
|
||||
}
|
||||
},
|
||||
"node_modules/side-channel-weakmap": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/side-channel-weakmap/-/side-channel-weakmap-1.0.2.tgz",
|
||||
"integrity": "sha512-WPS/HvHQTYnHisLo9McqBHOJk2FkHO/tlpvldyrnem4aeQp4hai3gythswg6p01oSoTl58rcpiFAjF2br2Ak2A==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"call-bound": "^1.0.2",
|
||||
"es-errors": "^1.3.0",
|
||||
"get-intrinsic": "^1.2.5",
|
||||
"object-inspect": "^1.13.3",
|
||||
"side-channel-map": "^1.0.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 0.4"
|
||||
@@ -7229,6 +7443,7 @@
|
||||
"version": "5.96.1",
|
||||
"resolved": "https://registry.npmjs.org/webpack/-/webpack-5.96.1.tgz",
|
||||
"integrity": "sha512-l2LlBSvVZGhL4ZrPwyr8+37AunkcYj5qh8o6u2/2rzoPc8gxFJkLj1WxNgooi9pnoc06jh0BjuXnamM4qlujZA==",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"@types/eslint-scope": "^3.7.7",
|
||||
"@types/estree": "^1.0.6",
|
||||
@@ -7275,6 +7490,7 @@
|
||||
"resolved": "https://registry.npmjs.org/webpack-cli/-/webpack-cli-4.9.1.tgz",
|
||||
"integrity": "sha512-JYRFVuyFpzDxMDB+v/nanUdQYcZtqFPGzmlW4s+UkPMFhSpfRNmf1z4AwYcHJVdvEFAM7FFCQdNTpsBYhDLusQ==",
|
||||
"dev": true,
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"@discoveryjs/json-ext": "^0.5.0",
|
||||
"@webpack-cli/configtest": "^1.1.0",
|
||||
|
||||
@@ -27,10 +27,10 @@
|
||||
"license": "ISC",
|
||||
"dependencies": {
|
||||
"babel-loader": "^8.2.3",
|
||||
"body-parser": "^1.20.3",
|
||||
"body-parser": "^1.20.4",
|
||||
"compression-webpack-plugin": "^10.0.0",
|
||||
"cors": "^2.8.5",
|
||||
"express": "^4.21.1",
|
||||
"express": "^4.22.1",
|
||||
"express-force-https": "^1.0.0",
|
||||
"express-rate-limit": "^6.0.1",
|
||||
"open": "^7.0.3",
|
||||
|
||||
@@ -4,9 +4,21 @@ const debugMode = Array.from(process.argv.map((arg) => arg.trim().toLowerCase())
|
||||
const logger = require('../modules/Logger')(debugMode);
|
||||
const eventManager = (require('../modules/singletons/EventManager.js')).instance;
|
||||
const cors = require('cors');
|
||||
const { CORS_OPTIONS, CONTENT_TYPE_VALIDATOR } = require('../config/globals');
|
||||
const { CONTENT_TYPE_VALIDATOR } = require('../config/globals');
|
||||
|
||||
router.use(cors(CORS_OPTIONS));
|
||||
const ADMIN_CORS_OPTIONS = (process.env.NODE_ENV?.trim() === 'development'
|
||||
? {
|
||||
origin: '*',
|
||||
optionsSuccessStatus: 200
|
||||
}
|
||||
: {
|
||||
origin: 'http://localhost:3000',
|
||||
optionsSuccessStatus: 200
|
||||
});
|
||||
router.use(cors(ADMIN_CORS_OPTIONS));
|
||||
router.options('/games/state', cors(ADMIN_CORS_OPTIONS), (req, res) => {
|
||||
res.sendStatus(200);
|
||||
});
|
||||
|
||||
router.post('/sockets/broadcast', (req, res, next) => {
|
||||
CONTENT_TYPE_VALIDATOR(req, res, next);
|
||||
|
||||
@@ -83,9 +83,11 @@ router.patch('/:code/players', async function (req, res) {
|
||||
res.status(200).send({ cookie: data, environment: gameManager.environment });
|
||||
}).catch((data) => {
|
||||
console.error(data);
|
||||
res.set('content-type', 'text/plain');
|
||||
res.status(data.status || 500).send(data.reason);
|
||||
});
|
||||
} else {
|
||||
res.set('content-type', 'text/plain');
|
||||
res.status(404).send();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -95,7 +95,7 @@ const ServerBootstrapper = {
|
||||
res.setHeader(
|
||||
'Content-Security-Policy',
|
||||
"default-src 'self'; font-src 'self' https://fonts.gstatic.com/; img-src 'self' https://img.buymeacoffee.com;" +
|
||||
" script-src 'self' https://cdnjs.buymeacoffee.com; style-src 'self' https://cdnjs.buymeacoffee.com https://fonts.googleapis.com/ 'nonce-" + nonce + "'; frame-src 'self'"
|
||||
" script-src 'self'; style-src 'self' https://fonts.googleapis.com/ 'nonce-" + nonce + "'; frame-src 'self'"
|
||||
);
|
||||
next();
|
||||
});
|
||||
@@ -162,7 +162,7 @@ const ServerBootstrapper = {
|
||||
};
|
||||
|
||||
function isAuthorized (req) {
|
||||
if (process.env.NODE_ENV.trim() === 'development') {
|
||||
if (process.env.NODE_ENV.trim() === 'development' || req.method === 'OPTIONS') {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user