bundle passport packages with server

This commit is contained in:
HF 2022-08-16 16:32:59 +02:00
parent bdf9939aa2
commit befa32b0a6
6 changed files with 306 additions and 309 deletions

View File

@ -95,14 +95,6 @@ msgid ""
"one (Note: you can use those links just once)" "one (Note: you can use those links just once)"
msgstr "" msgstr ""
#: src/ssr/Win.jsx:31
msgid "PixelPlanet.Fun Window"
msgstr ""
#: src/ssr/Win.jsx:32
msgid "PixelPlanet.Fun Windows"
msgstr ""
#: src/ssr/Globe.jsx:33 #: src/ssr/Globe.jsx:33
msgid "PixelPlanet.Fun 3DGlobe" msgid "PixelPlanet.Fun 3DGlobe"
msgstr "" msgstr ""
@ -127,6 +119,14 @@ msgstr ""
msgid "Place color pixels on an map styled canvas with other players online" msgid "Place color pixels on an map styled canvas with other players online"
msgstr "" msgstr ""
#: src/ssr/Win.jsx:31
msgid "PixelPlanet.Fun Window"
msgstr ""
#: src/ssr/Win.jsx:32
msgid "PixelPlanet.Fun Windows"
msgstr ""
#: src/core/mail.js:71 #: src/core/mail.js:71
#, javascript-format #, javascript-format
msgid "" msgid ""
@ -244,49 +244,6 @@ msgstr ""
msgid "Submit" msgid "Submit"
msgstr "" msgstr ""
#: src/routes/api/captcha.js:20
msgid "No captcha text given"
msgstr ""
#: src/routes/api/captcha.js:25
msgid "No captcha id given"
msgstr ""
#: src/routes/api/auth/register.js:54
#: src/routes/api/captcha.js:44
msgid "You took too long, try again."
msgstr ""
#: src/routes/api/auth/register.js:57
#: src/routes/api/captcha.js:50
msgid "You failed your captcha"
msgstr ""
#: src/routes/api/auth/register.js:60
#: src/routes/api/captcha.js:56
msgid "Unknown Captcha Error"
msgstr ""
#: src/routes/api/captcha.js:63
msgid "Server error occured"
msgstr ""
#: src/routes/api/modtools.js:53
msgid "You are not logged in"
msgstr ""
#: src/routes/api/modtools.js:65
msgid "You are not allowed to access this page"
msgstr ""
#: src/routes/api/modtools.js:207
msgid "Just admins can do that"
msgstr ""
#: src/routes/api/baninfo.js:24
msgid "You are not banned"
msgstr ""
#: src/utils/validation.js:17 #: src/utils/validation.js:17
msgid "Email can't be empty." msgid "Email can't be empty."
msgstr "" msgstr ""
@ -335,6 +292,64 @@ msgstr ""
msgid "Password must be shorter than 60 characters." msgid "Password must be shorter than 60 characters."
msgstr "" msgstr ""
#: src/routes/api/captcha.js:20
msgid "No captcha text given"
msgstr ""
#: src/routes/api/captcha.js:25
msgid "No captcha id given"
msgstr ""
#: src/routes/api/auth/register.js:54
#: src/routes/api/captcha.js:44
msgid "You took too long, try again."
msgstr ""
#: src/routes/api/auth/register.js:57
#: src/routes/api/captcha.js:50
msgid "You failed your captcha"
msgstr ""
#: src/routes/api/auth/register.js:60
#: src/routes/api/captcha.js:56
msgid "Unknown Captcha Error"
msgstr ""
#: src/routes/api/captcha.js:63
msgid "Server error occured"
msgstr ""
#: src/routes/api/modtools.js:53
msgid "You are not logged in"
msgstr ""
#: src/routes/api/modtools.js:65
msgid "You are not allowed to access this page"
msgstr ""
#: src/routes/api/modtools.js:207
msgid "Just admins can do that"
msgstr ""
#: src/routes/api/baninfo.js:24
msgid "You are not banned"
msgstr ""
#: src/routes/api/auth/verify.js:22
#: src/routes/api/auth/verify.js:29
msgid "Mail verification"
msgstr ""
#: src/routes/api/auth/verify.js:23
msgid "You are now verified :)"
msgstr ""
#: src/routes/api/auth/verify.js:29
msgid ""
"Your mail verification code is invalid or already expired :(, please "
"request a new one."
msgstr ""
#: src/routes/api/auth/register.js:26 #: src/routes/api/auth/register.js:26
msgid "No Captcha given" msgid "No Captcha given"
msgstr "" msgstr ""
@ -355,21 +370,6 @@ msgstr ""
msgid "Failed to establish session after register :(" msgid "Failed to establish session after register :("
msgstr "" msgstr ""
#: src/routes/api/auth/verify.js:22
#: src/routes/api/auth/verify.js:29
msgid "Mail verification"
msgstr ""
#: src/routes/api/auth/verify.js:23
msgid "You are now verified :)"
msgstr ""
#: src/routes/api/auth/verify.js:29
msgid ""
"Your mail verification code is invalid or already expired :(, please "
"request a new one."
msgstr ""
#: src/routes/api/auth/logout.js:11 #: src/routes/api/auth/logout.js:11
msgid "You are not even logged in." msgid "You are not even logged in."
msgstr "" msgstr ""

View File

@ -253,6 +253,11 @@ msgstr ""
msgid "Pixels placed" msgid "Pixels placed"
msgstr "" msgstr ""
#: src/components/buttons/CanvasSwitchButton.jsx:22
#: src/components/windows/index.js:19
msgid "Canvas Selection"
msgstr ""
#: src/components/buttons/ChatButton.jsx:88 #: src/components/buttons/ChatButton.jsx:88
msgid "Close Chat" msgid "Close Chat"
msgstr "" msgstr ""
@ -269,19 +274,6 @@ msgstr ""
msgid "Open Menu" msgid "Open Menu"
msgstr "" msgstr ""
#: src/components/buttons/CanvasSwitchButton.jsx:22
#: src/components/windows/index.js:19
msgid "Canvas Selection"
msgstr ""
#: src/components/HistorySelect.jsx:144
msgid "Loading"
msgstr ""
#: src/components/HistorySelect.jsx:145
msgid "Select Date above"
msgstr ""
#: src/components/Admintools.jsx:101 #: src/components/Admintools.jsx:101
#: src/components/ModCanvastools.jsx:232 #: src/components/ModCanvastools.jsx:232
#: src/components/ModWatchtools.jsx:113 #: src/components/ModWatchtools.jsx:113
@ -311,22 +303,30 @@ msgstr ""
msgid "Resize" msgid "Resize"
msgstr "" msgstr ""
#: src/components/HistorySelect.jsx:144
msgid "Loading"
msgstr ""
#: src/components/HistorySelect.jsx:145
msgid "Select Date above"
msgstr ""
#: src/components/BanInfo.jsx:76 #: src/components/BanInfo.jsx:76
#: src/components/buttons/HelpButton.jsx:22 #: src/components/buttons/HelpButton.jsx:22
#: src/components/windows/index.js:13 #: src/components/windows/index.js:13
msgid "Help" msgid "Help"
msgstr "" msgstr ""
#: src/components/buttons/LogInButton.jsx:22
#: src/components/windows/index.js:15
msgid "User Area"
msgstr ""
#: src/components/buttons/SettingsButton.jsx:22 #: src/components/buttons/SettingsButton.jsx:22
#: src/components/windows/index.js:14 #: src/components/windows/index.js:14
msgid "Settings" msgid "Settings"
msgstr "" msgstr ""
#: src/components/buttons/LogInButton.jsx:22
#: src/components/windows/index.js:15
msgid "User Area"
msgstr ""
#: src/components/buttons/DownloadButton.jsx:36 #: src/components/buttons/DownloadButton.jsx:36
msgid "Make Screenshot" msgid "Make Screenshot"
msgstr "" msgstr ""
@ -477,124 +477,6 @@ msgstr ""
msgid "Enter Characters" msgid "Enter Characters"
msgstr "" msgstr ""
#: src/components/windows/Settings.jsx:86
msgid "Show Grid"
msgstr ""
#: src/components/windows/Settings.jsx:91
msgid "Turn on grid to highlight pixel borders."
msgstr ""
#: src/components/windows/Settings.jsx:94
msgid "Show Pixel Activity"
msgstr ""
#: src/components/windows/Settings.jsx:99
msgid "Show circles where pixels are placed."
msgstr ""
#: src/components/windows/Settings.jsx:102
msgid "Disable Game Sounds"
msgstr ""
#: src/components/windows/Settings.jsx:108
msgid "All sound effects will be disabled."
msgstr ""
#: src/components/windows/Settings.jsx:112
msgid ""
"Your Browser doesn't allow us to use AudioContext to play sounds. Do you "
"have some privacy feature blocking us?"
msgstr ""
#: src/components/windows/Settings.jsx:118
msgid "Enable chat notifications"
msgstr ""
#: src/components/windows/Settings.jsx:122
msgid "Play a sound when new chat messages arrive"
msgstr ""
#: src/components/windows/Settings.jsx:125
msgid "Auto Zoom In"
msgstr ""
#: src/components/windows/Settings.jsx:130
msgid ""
"Zoom in instead of placing a pixel when you tap the canvas and your zoom is "
"small."
msgstr ""
#: src/components/windows/Settings.jsx:133
msgid "Compact Palette"
msgstr ""
#: src/components/windows/Settings.jsx:138
msgid "Display Palette in a compact form that takes less screen space."
msgstr ""
#: src/components/windows/Settings.jsx:141
msgid "Potato Mode"
msgstr ""
#: src/components/windows/Settings.jsx:145
msgid "For when you are playing on a potato."
msgstr ""
#: src/components/Converter.jsx:376
#: src/components/windows/Settings.jsx:148
msgid "Light Grid"
msgstr ""
#: src/components/windows/Settings.jsx:152
msgid "Show Grid in white instead of black."
msgstr ""
#: src/components/windows/Settings.jsx:156
msgid "Historical View"
msgstr ""
#: src/components/windows/Settings.jsx:161
msgid "Check out past versions of the canvas."
msgstr ""
#: src/components/windows/Settings.jsx:166
msgid "Themes"
msgstr ""
#: src/components/windows/Settings.jsx:171
msgid "How pixelplanet should look like."
msgstr ""
#: src/components/windows/Settings.jsx:178
msgid "Select Language"
msgstr ""
#: src/components/windows/UserArea.jsx:31
#: src/components/windows/UserArea.jsx:50
msgid "Profile"
msgstr ""
#: src/components/windows/UserArea.jsx:53
msgid "Ranking"
msgstr ""
#: src/components/windows/UserArea.jsx:56
msgid "Converter"
msgstr ""
#: src/components/windows/UserArea.jsx:62
msgid "Modtools"
msgstr ""
#: src/components/windows/UserArea.jsx:63
msgid "Loading..."
msgstr ""
#: src/components/windows/UserArea.jsx:70
msgid "Consider joining us on Guilded:"
msgstr ""
#: src/components/windows/Help.jsx:42 #: src/components/windows/Help.jsx:42
msgid "Place color pixels on a large canvas with other players online!" msgid "Place color pixels on a large canvas with other players online!"
msgstr "" msgstr ""
@ -768,15 +650,97 @@ msgstr ""
msgid "Credit for the Palette of the Top10 canvas goes to ${ vinikLink }." msgid "Credit for the Palette of the Top10 canvas goes to ${ vinikLink }."
msgstr "" msgstr ""
#: src/components/windows/CanvasSelect.jsx:27 #: src/components/windows/Settings.jsx:86
msgid "" msgid "Show Grid"
"Select the canvas you want to use. Every canvas is unique and has "
"different palettes, cooldown and requirements. Archive of closed canvases "
"can be accessed here:"
msgstr "" msgstr ""
#: src/components/windows/CanvasSelect.jsx:35 #: src/components/windows/Settings.jsx:91
msgid "Archive" msgid "Turn on grid to highlight pixel borders."
msgstr ""
#: src/components/windows/Settings.jsx:94
msgid "Show Pixel Activity"
msgstr ""
#: src/components/windows/Settings.jsx:99
msgid "Show circles where pixels are placed."
msgstr ""
#: src/components/windows/Settings.jsx:102
msgid "Disable Game Sounds"
msgstr ""
#: src/components/windows/Settings.jsx:108
msgid "All sound effects will be disabled."
msgstr ""
#: src/components/windows/Settings.jsx:112
msgid ""
"Your Browser doesn't allow us to use AudioContext to play sounds. Do you "
"have some privacy feature blocking us?"
msgstr ""
#: src/components/windows/Settings.jsx:118
msgid "Enable chat notifications"
msgstr ""
#: src/components/windows/Settings.jsx:122
msgid "Play a sound when new chat messages arrive"
msgstr ""
#: src/components/windows/Settings.jsx:125
msgid "Auto Zoom In"
msgstr ""
#: src/components/windows/Settings.jsx:130
msgid ""
"Zoom in instead of placing a pixel when you tap the canvas and your zoom is "
"small."
msgstr ""
#: src/components/windows/Settings.jsx:133
msgid "Compact Palette"
msgstr ""
#: src/components/windows/Settings.jsx:138
msgid "Display Palette in a compact form that takes less screen space."
msgstr ""
#: src/components/windows/Settings.jsx:141
msgid "Potato Mode"
msgstr ""
#: src/components/windows/Settings.jsx:145
msgid "For when you are playing on a potato."
msgstr ""
#: src/components/Converter.jsx:376
#: src/components/windows/Settings.jsx:148
msgid "Light Grid"
msgstr ""
#: src/components/windows/Settings.jsx:152
msgid "Show Grid in white instead of black."
msgstr ""
#: src/components/windows/Settings.jsx:156
msgid "Historical View"
msgstr ""
#: src/components/windows/Settings.jsx:161
msgid "Check out past versions of the canvas."
msgstr ""
#: src/components/windows/Settings.jsx:166
msgid "Themes"
msgstr ""
#: src/components/windows/Settings.jsx:171
msgid "How pixelplanet should look like."
msgstr ""
#: src/components/windows/Settings.jsx:178
msgid "Select Language"
msgstr "" msgstr ""
#: src/components/windows/Register.jsx:85 #: src/components/windows/Register.jsx:85
@ -823,6 +787,42 @@ msgstr ""
msgid "Submit" msgid "Submit"
msgstr "" msgstr ""
#: src/components/windows/CanvasSelect.jsx:27
msgid ""
"Select the canvas you want to use. Every canvas is unique and has "
"different palettes, cooldown and requirements. Archive of closed canvases "
"can be accessed here:"
msgstr ""
#: src/components/windows/CanvasSelect.jsx:35
msgid "Archive"
msgstr ""
#: src/components/windows/UserArea.jsx:31
#: src/components/windows/UserArea.jsx:50
msgid "Profile"
msgstr ""
#: src/components/windows/UserArea.jsx:53
msgid "Ranking"
msgstr ""
#: src/components/windows/UserArea.jsx:56
msgid "Converter"
msgstr ""
#: src/components/windows/UserArea.jsx:62
msgid "Modtools"
msgstr ""
#: src/components/windows/UserArea.jsx:63
msgid "Loading..."
msgstr ""
#: src/components/windows/UserArea.jsx:70
msgid "Consider joining us on Guilded:"
msgstr ""
#: src/components/windows/Archive.jsx:16 #: src/components/windows/Archive.jsx:16
msgid "" msgid ""
"While we tend to not delete canvases, some canvases are started for fun or " "While we tend to not delete canvases, some canvases are started for fun or "
@ -928,6 +928,14 @@ msgstr ""
msgid "Password must be shorter than 60 characters." msgid "Password must be shorter than 60 characters."
msgstr "" msgstr ""
#: src/components/GetIID.jsx:44
msgid "Get IID"
msgstr ""
#: src/components/GetIID.jsx:53
msgid "Copy"
msgstr ""
#: src/components/ChangeMail.jsx:91 #: src/components/ChangeMail.jsx:91
#: src/components/ChangeName.jsx:68 #: src/components/ChangeName.jsx:68
#: src/components/ChangePassword.jsx:109 #: src/components/ChangePassword.jsx:109
@ -935,6 +943,51 @@ msgstr ""
msgid "Save" msgid "Save"
msgstr "" msgstr ""
#: src/components/CanvasItem.jsx:29
msgid "Online Users"
msgstr ""
#: src/components/CanvasItem.jsx:34
msgid "Cooldown"
msgstr ""
#: src/components/CanvasItem.jsx:40
msgid "Stacking till"
msgstr ""
#: src/components/CanvasItem.jsx:42
msgid "Ranked"
msgstr ""
#: src/components/CanvasItem.jsx:44
msgid "Yes"
msgstr ""
#: src/components/CanvasItem.jsx:44
msgid "No"
msgstr ""
#: src/components/CanvasItem.jsx:50
msgid "Requirements"
msgstr ""
#: src/components/CanvasItem.jsx:53
msgid "User Account"
msgstr ""
#: src/components/CanvasItem.jsx:55
#, javascript-format
msgid "and ${ canvas.req } Pixels set"
msgstr ""
#: src/components/CanvasItem.jsx:58
msgid "Top 10 Daily Ranking"
msgstr ""
#: src/components/CanvasItem.jsx:64
msgid "Dimensions"
msgstr ""
#: src/components/LogInArea.jsx:20 #: src/components/LogInArea.jsx:20
msgid "Login to access more features and stats." msgid "Login to access more features and stats."
msgstr "" msgstr ""
@ -1095,59 +1148,6 @@ msgstr ""
msgid "Download Template" msgid "Download Template"
msgstr "" msgstr ""
#: src/components/GetIID.jsx:44
msgid "Get IID"
msgstr ""
#: src/components/GetIID.jsx:53
msgid "Copy"
msgstr ""
#: src/components/CanvasItem.jsx:29
msgid "Online Users"
msgstr ""
#: src/components/CanvasItem.jsx:34
msgid "Cooldown"
msgstr ""
#: src/components/CanvasItem.jsx:40
msgid "Stacking till"
msgstr ""
#: src/components/CanvasItem.jsx:42
msgid "Ranked"
msgstr ""
#: src/components/CanvasItem.jsx:44
msgid "Yes"
msgstr ""
#: src/components/CanvasItem.jsx:44
msgid "No"
msgstr ""
#: src/components/CanvasItem.jsx:50
msgid "Requirements"
msgstr ""
#: src/components/CanvasItem.jsx:53
msgid "User Account"
msgstr ""
#: src/components/CanvasItem.jsx:55
#, javascript-format
msgid "and ${ canvas.req } Pixels set"
msgstr ""
#: src/components/CanvasItem.jsx:58
msgid "Top 10 Daily Ranking"
msgstr ""
#: src/components/CanvasItem.jsx:64
msgid "Dimensions"
msgstr ""
#: src/components/LogInForm.jsx:77 #: src/components/LogInForm.jsx:77
msgid "Name or Email" msgid "Name or Email"
msgstr "" msgstr ""
@ -1313,6 +1313,34 @@ msgstr ""
msgid "Stop Cleaner" msgid "Stop Cleaner"
msgstr "" msgstr ""
#: src/components/ModWatchtools.jsx:45
msgid "Interval is invalid"
msgstr ""
#: src/components/ModWatchtools.jsx:117
msgid "Check who placed in an area"
msgstr ""
#: src/components/ModWatchtools.jsx:118
msgid "Canvas"
msgstr ""
#: src/components/ModWatchtools.jsx:135
msgid "Interval"
msgstr ""
#: src/components/ModWatchtools.jsx:151
msgid "IID (optional)"
msgstr ""
#: src/components/ModWatchtools.jsx:233
msgid "Get Pixels"
msgstr ""
#: src/components/ModWatchtools.jsx:264
msgid "Get Users"
msgstr ""
#: src/components/Admintools.jsx:107 #: src/components/Admintools.jsx:107
msgid "IP Actions" msgid "IP Actions"
msgstr "" msgstr ""
@ -1345,34 +1373,6 @@ msgstr ""
msgid "User Name" msgid "User Name"
msgstr "" msgstr ""
#: src/components/ModWatchtools.jsx:45
msgid "Interval is invalid"
msgstr ""
#: src/components/ModWatchtools.jsx:117
msgid "Check who placed in an area"
msgstr ""
#: src/components/ModWatchtools.jsx:118
msgid "Canvas"
msgstr ""
#: src/components/ModWatchtools.jsx:135
msgid "Interval"
msgstr ""
#: src/components/ModWatchtools.jsx:151
msgid "IID (optional)"
msgstr ""
#: src/components/ModWatchtools.jsx:233
msgid "Get Pixels"
msgstr ""
#: src/components/ModWatchtools.jsx:264
msgid "Get Users"
msgstr ""
#: src/components/ModIIDtools.jsx:19 #: src/components/ModIIDtools.jsx:19
msgid "You must enter a duration" msgid "You must enter a duration"
msgstr "" msgstr ""
@ -1405,11 +1405,6 @@ msgctxt "keybinds"
msgid "X" msgid "X"
msgstr "" msgstr ""
#: src/components/windows/Settings.jsx:103
msgctxt "keybinds"
msgid "M"
msgstr ""
#: src/components/windows/Help.jsx:17 #: src/components/windows/Help.jsx:17
#: src/components/windows/Settings.jsx:158 #: src/components/windows/Settings.jsx:158
msgctxt "keybinds" msgctxt "keybinds"
@ -1459,4 +1454,9 @@ msgstr ""
#: src/components/windows/Help.jsx:32 #: src/components/windows/Help.jsx:32
msgctxt "keybinds" msgctxt "keybinds"
msgid "C" msgid "C"
msgstr ""
#: src/components/windows/Settings.jsx:103
msgctxt "keybinds"
msgid "M"
msgstr "" msgstr ""

View File

@ -29,8 +29,8 @@
"etag": "^1.8.1", "etag": "^1.8.1",
"express": "^4.17.2", "express": "^4.17.2",
"express-session": "^1.17.2", "express-session": "^1.17.2",
"js-file-download": "^0.4.12",
"image-q": "^4.0.0", "image-q": "^4.0.0",
"js-file-download": "^0.4.12",
"morgan": "^1.10.0", "morgan": "^1.10.0",
"multer": "^1.4.4", "multer": "^1.4.4",
"mysql2": "^2.3.3", "mysql2": "^2.3.3",

View File

@ -4,12 +4,12 @@
*/ */
import passport from 'passport'; import passport from 'passport';
import { Strategy as JsonStrategy } from 'passport-json'; import JsonStrategy from 'passport-json';
import { Strategy as DiscordStrategy } from 'passport-discord'; import GoogleStrategy from 'passport-google-oauth2';
import { Strategy as RedditStrategy } from 'passport-reddit'; import DiscordStrategy from 'passport-discord';
import { Strategy as FacebookStrategy } from 'passport-facebook'; import FacebookStrategy from 'passport-facebook';
import { Strategy as VkontakteStrategy } from 'passport-vkontakte'; import RedditStrategy from 'passport-reddit/lib/passport-reddit/strategy';
import { Strategy as GoogleStrategy } from 'passport-google-oauth2'; import VkontakteStrategy from 'passport-vkontakte/lib/strategy';
import { sanitizeName } from '../utils/validation'; import { sanitizeName } from '../utils/validation';

View File

@ -128,8 +128,8 @@ function buildWebpackClientConfig(
include: [ include: [
path.resolve('src'), path.resolve('src'),
...['image-q'].map((moduleName) => ( ...['image-q'].map((moduleName) => (
path.resolve('node_modules', moduleName), path.resolve('node_modules', moduleName)
)) )),
], ],
options: { options: {
plugins: babelPlugins, plugins: babelPlugins,

View File

@ -89,9 +89,6 @@ module.exports = ({
loader: 'babel-loader', loader: 'babel-loader',
include: [ include: [
path.resolve('src'), path.resolve('src'),
...['passport-reddit'].map((moduleName) => (
path.resolve('node_modules', moduleName),
))
], ],
options: { options: {
cacheDirectory: false, cacheDirectory: false,
@ -120,7 +117,7 @@ module.exports = ({
}, },
externalsPresets: { externalsPresets: {
// exclude native node modules (path, fs, etc.) // exclude built-in node modules (path, fs, etc.)
node: true, node: true,
}, },
@ -128,7 +125,7 @@ module.exports = ({
nodeExternals({ nodeExternals({
// passport-reddit is an ESM module // passport-reddit is an ESM module
// bundle it, then we don't have to import it // bundle it, then we don't have to import it
allowlist: [ 'passport-reddit' ], allowlist: [ /^passport-/ ],
}), }),
], ],