Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
# Config files
server/src/configs/*
!server/src/configs/default.json
!server/src/configs/config.example.json
!server/src/configs/areas.example.json
!server/src/configs/local.example.json
.env

# Masterfile
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
## Simple Dockerfile to build ReactMap (main branch)
# - Inside the container, the content of this git repo lives in /home/node/
## You have to mount your configs into the container:
# - mount config.json to /home/node/server/src/configs/config.json
# - mount local.json to /home/node/server/src/configs/local.json
# - mount areas.json to /home/node/server/src/configs/areas.json
# - Also mount every other configuration file necessary into the according directory.

Expand Down
2 changes: 1 addition & 1 deletion docker-compose.example.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ services:
restart: unless-stopped
volumes:
- ./server/src/configs/areas.json:/home/node/server/src/configs/areas.json
- ./server/src/configs/config.json:/home/node/server/src/configs/config.json
- ./server/src/configs/local.json:/home/node/server/src/local/config.json
- ./example.env:/home/node/.env
ports:
- "9090:8080"
8 changes: 5 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "reactmap",
"version": "1.0.12",
"version": "1.0.13",
"description": "React based frontend map.",
"main": "index.js",
"author": "TurtIeSocks <58572875+TurtIeSocks@users.noreply.github.com>",
Expand All @@ -12,8 +12,9 @@
"dev": "nodemon server/src/index.js --watch server",
"build": "yarn create-locales && webpack --env prod",
"watch": "webpack --watch --env dev",
"generate": "node server/src/services/generateMasterfile.js",
"create-locales": "node server/src/services/createLocales.js",
"generate": "node server/scripts/generateMasterfile.js",
"create-locales": "node server/scripts/createLocales.js",
"config-migrate": "node server/scripts/configMigration.js",
"console": "node --experimental-repl-await ./server/src/console.js",
"migrate:make": "knex --knexfile server/knexfile.cjs migrate:make",
"migrate:latest": "knex --knexfile server/knexfile.cjs migrate:latest",
Expand Down Expand Up @@ -73,6 +74,7 @@
"apollo-server-express": "^3.5.0",
"bcrypt": "^5.0.1",
"compression": "^1.7.4",
"config": "^3.3.6",
"discord.js": "^12.5.3",
"express": "^4.17.1",
"express-mysql-session": "^2.1.6",
Expand Down
4 changes: 2 additions & 2 deletions public/base-locales/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@
"next_submission": "Nächster Vorschlag!",
"never": "nie",
"next_gym": "Nächste Arena",
"s2cells": "S2 Zellen",
"scan_cells": "S2 Zellen",
"devices": "Geräte",
"use_my_location": "Meinen Standort verwenden",
"submit_feedback_title": "Feedback/Fehlerbericht senden",
Expand Down Expand Up @@ -277,7 +277,7 @@
"pvp_subtitle": "Zeigt PVP-Rang/WP/Level-Informationen für jedes Pokemon",
"quests_subtitle": "Zeigt Quest Belohnung und Aufgabeninformationen an",
"raids_subtitle": "Zeigt alle Raid-Informationen, einschließlich des Raid-Bosses, der Eier, der Ablaufzeit und des Movesets",
"s2cells_subtitle": "Zeigt an, wann eine S2-Zelle zuletzt von einem Gerät gescannt wurde",
"scan_cells_subtitle": "Zeigt an, wann eine S2-Zelle zuletzt von einem Gerät gescannt wurde",
"scanAreas_subtitle": "Zeigt verfügbare Scanbereich Polygone",
"spawnpoints_subtitle": "Zeigt Spawnpunkte und deren geschätzte Despawnzeit an",
"stats_subtitle": "Zeigt Pokemon-Statistiken und Level an",
Expand Down
4 changes: 2 additions & 2 deletions public/base-locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@
"next_submission": "Next Submission!",
"never": "Never",
"next_gym": "Next Gym",
"s2cells": "S2 Cells",
"scan_cells": "Scan Cells",
"devices": "Devices",
"use_my_location": "Use My Location",
"submit_feedback_title": "Submit Feedback/Bug Report",
Expand Down Expand Up @@ -274,7 +274,7 @@
"pvp_subtitle": "Shows PVP rank/CP/Level info for each Pokémon",
"quests_subtitle": "Shows quest reward and task information",
"raids_subtitle": "Shows all raid info including the raid boss, eggs, expire time, and moveset",
"s2cells_subtitle": "Shows the last time a S2 cell was scanned by a device",
"scan_cells_subtitle": "Shows the last time a S2 cell was scanned by a device",
"scanAreas_subtitle": "Shows available scan areas polygons",
"spawnpoints_subtitle": "Shows spawnpoints and their estimated despawn time",
"stats_subtitle": "Shows Pokémon stats and levels",
Expand Down
4 changes: 2 additions & 2 deletions public/base-locales/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@
"next_submission": "Sumisión Siguiente!",
"never": "Nunca",
"next_gym": "Siguiente Gimnasio",
"s2cells": "S2cells",
"scan_cells": "S2cells",
"devices": "Aparato",
"use_my_location": "Usar Mi Puesto",
"submit_feedback_title": "Enviar omentarios o reportar errores",
Expand Down Expand Up @@ -270,7 +270,7 @@
"pvp_subtitle": "Muestra la información de PVP para cada Pokémon",
"quests_subtitle": "Muestra la información de las misiones",
"raids_subtitle": "Muestra la información de las Incursiones",
"s2cells_subtitle": "Muestra la última vez que una celda S2 fue escaneada por un dispositivo",
"scan_cells_subtitle": "Muestra la última vez que una celda S2 fue escaneada por un dispositivo",
"scanAreas_subtitle": "Muestra los polígonos de áreas de escaneo disponibles",
"spawnpoints_subtitle": "Muestra las ubicaciones de los spawns y las horas de expiración",
"stats_subtitle": "Muestra las estadísticas de los Pokémon",
Expand Down
4 changes: 2 additions & 2 deletions public/base-locales/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@
"next_submission": "Prochaine Soumission!",
"never": "Jamais",
"next_gym": "Prochaine Arène",
"s2cells": "S2cells",
"scan_cells": "S2cells",
"devices": "Appareils",
"use_my_location": "Utiliser Ma Position",
"submit_feedback_title": "Envoyer Commentaire/Rapport de bug",
Expand Down Expand Up @@ -276,7 +276,7 @@
"pvp_subtitle": "Affiche les infos PVP/PC/Niveau pour chaque Pokemon",
"quests_subtitle": "Affiche les récompenses de quêtes et tâches",
"raids_subtitle": "Affiche les info de raid y compris le Boss, Oeufs, heure d'expiration et attaques",
"s2cells_subtitle": "Affiche la denière fois ou la cellule S2 à été scannées",
"scan_cells_subtitle": "Affiche la denière fois ou la cellule S2 à été scannées",
"scanAreas_subtitle": "Affiche les zones de scan",
"spawnpoints_subtitle": "Affiche les points d'apparition et les heure d'expiration estimée",
"stats_subtitle": "Affiche les Stats et Niveaux des Pokemon",
Expand Down
4 changes: 2 additions & 2 deletions public/base-locales/nl.json
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@
"next_submission": "Volgende Inzending!",
"never": "Nooit",
"next_gym": "Volgende Gym",
"s2cells": "S2 Cells",
"scan_cells": "S2 Cells",
"devices": "Apparaten",
"use_my_location": "Gebruik Mijn Locatie",
"submit_feedback_title": "Feedback/Bug Rapport Indienen",
Expand Down Expand Up @@ -274,7 +274,7 @@
"pvp_subtitle": "Toont PVP rank/CP/Level informatie voor elke Pokémon",
"quests_subtitle": "Toont quest reward en task informatie",
"raids_subtitle": "Toont alle raid informatie inclusief de raid boss, eggs, vervaltijd, en moveset",
"s2cells_subtitle": "Toont de laatste tijd een S2 cell was bijgewerkt door een scanner.",
"scan_cells_subtitle": "Toont de laatste tijd een S2 cell was bijgewerkt door een scanner.",
"scanAreas_subtitle": "Toont beschikbare scan gebieden polygons",
"spawnpoints_subtitle": "Toont spawnpoints en hun geschatte despawntijd",
"stats_subtitle": "Toont Pokémon Statistieken en levels",
Expand Down
4 changes: 2 additions & 2 deletions public/base-locales/pl.json
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@
"next_submission": "Kolejne zgłoszenie!",
"never": "Nigdy",
"next_gym": "Kolejny gym",
"s2cells": "Komórki S2",
"scan_cells": "Komórki S2",
"devices": "Urządzenia",
"use_my_location": "Użyj bieżącej lokalizacji",
"submit_feedback_title": "Prześlij komentarz / Zgłoś błąd",
Expand Down Expand Up @@ -276,7 +276,7 @@
"pvp_subtitle": "Pokazuje rangę PVP/CP/informację o poziomie każdego Pokemona",
"quests_subtitle": "Pokazuje nagrodę oraz informację o zadaniu",
"raids_subtitle": "Pokazuje dane raidu, takie jak informacja o bossie, jajku, czasie zakończenia czy atakach bossa",
"s2cells_subtitle": "Pokazuje czas ostatniego skanowania komórki S2 przez urządzenie",
"scan_cells_subtitle": "Pokazuje czas ostatniego skanowania komórki S2 przez urządzenie",
"scanAreas_subtitle": "Pokazuje dostępne obszary skanowania",
"spawnpoints_subtitle": "Pokazuje spawnpointy oraz ich przybliżone czasy despawnu",
"stats_subtitle": "Pokazuje statystyki i poziomy Pokemona",
Expand Down
File renamed without changes
18 changes: 12 additions & 6 deletions server/knexfile.cjs
Original file line number Diff line number Diff line change
@@ -1,18 +1,24 @@
/* eslint-disable no-console */
const path = require('path')
const { database: { schemas, settings: { migrationTableName } } } = require('./src/services/config')

const migrationUrl = 'src/db/migrations'

const selectedDb = Object.keys(schemas).find(dbName => schemas[dbName].useFor.includes('user')) || Object.keys(schemas)[0]
const selectedDb = schemas.find(db => db.useFor.includes('user'))

if (!selectedDb) {
console.warn('No database selected for React Map Tables')
process.exit(9)
}

const connection = {
client: 'mysql2',
connection: {
host: schemas[selectedDb].host,
port: schemas[selectedDb].port,
user: schemas[selectedDb].username,
password: schemas[selectedDb].password,
database: schemas[selectedDb].database,
host: selectedDb.host,
port: selectedDb.port,
user: selectedDb.username,
password: selectedDb.password,
database: selectedDb.database,
},
migrations: {
tableName: migrationTableName,
Expand Down
Loading