Skip to content

Commit b97a688

Browse files
authored
Merge pull request #510 from WatWowMap/develop
Sync Dev & Main
2 parents 33c63b2 + 132605b commit b97a688

File tree

22 files changed

+251
-62
lines changed

22 files changed

+251
-62
lines changed

.github/workflows/docker.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ jobs:
2727
github_token: ${{ secrets.GITHUB_TOKEN }}
2828
commit_message: Synced docker env vars with latest config
2929
Docker:
30+
if: ${{ always() }}
3031
needs: Sync
3132
runs-on: ubuntu-latest
3233
steps:

.github/workflows/lint.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: Lint
2-
on: [push, pull_request]
2+
on: [push]
33

44
jobs:
55
Lint:

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ server/src/strategies/*
3232
server/src/routes/api/v1/*
3333
!server/src/routes/api/v1/users.js
3434
!server/src/routes/api/v1/sessions.js
35+
!server/src/routes/api/v1/available.js
3536

3637
# custom model
3738
server/src/models/Custom.js

docker-compose.example.yml

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,17 @@ services:
2525
- ./server/src/configs/local.json:/home/node/server/src/configs/local.json
2626
- ./server/src/configs/geofence.json/:/home/node/server/src/configs/geofence.json
2727
- ./example.env:/home/node/.env
28-
security_opt:
29-
- no-new-privileges:true #https://nodramadevops.com/2019/06/running-docker-application-containers-more-securely/
28+
security_opt:
29+
- no-new-privileges:true #https://nodramadevops.com/2019/06/running-docker-application-containers-more-securely/
3030
ports:
3131
- "9090:8080"
32+
# nginx:
33+
# image: nginx
34+
# container_name: nginx
35+
# depends_on:
36+
# - reactmap
37+
# ports:
38+
# - "80:80"
39+
# - "443:443"
40+
# volumes:
41+
# - ./server/src/configs/nginx.conf:/etc/nginx/conf.d/default.conf

esbuild.config.mjs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,9 @@ const esbuild = {
124124
publicPath: '/',
125125
entryNames: isDevelopment ? undefined : '[name].[hash]',
126126
metafile: true,
127-
minify: isRelease || !isDevelopment,
127+
minify: env.parsed.NO_MINIFIED
128+
? false
129+
: isRelease || !isDevelopment,
128130
logLevel: isDevelopment ? 'info' : 'error',
129131
target: ['safari11.1', 'chrome64', 'firefox66', 'edge88'],
130132
watch: isDevelopment

example.env

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
GOOGLE_ANALYTICS_ID=
1+
GOOGLE_ANALYTICS_ID=""
22
TITLE="Map"
33
SENTRY_DSN=""
44
SENTRY_AUTH_TOKEN=""
@@ -7,3 +7,4 @@ SENTRY_PROJECT=""
77
SENTRY_TRACES_SAMPLE_RATE=0.1
88
SENTRY_DEBUG=
99
DEV_PORT=""
10+
NO_MINIFIED=""

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "reactmap",
3-
"version": "1.2.6",
3+
"version": "1.2.7",
44
"description": "React based frontend map.",
55
"main": "ReactMap.mjs",
66
"author": "TurtIeSocks <[email protected]>",
@@ -26,8 +26,8 @@
2626
"release": "node server/scripts/newRelease.js"
2727
},
2828
"engines": {
29-
"node": ">=16",
30-
"yarn": "1.22.x"
29+
"node": "^16",
30+
"yarn": "^1.22.x"
3131
},
3232
"devDependencies": {
3333
"@craftamap/esbuild-plugin-html": "^0.4.0",

public/base-locales/en.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,7 @@
164164
"event": "Event",
165165
"legendary": "Legendary",
166166
"mythical": "Mythical",
167+
"ultra_beast": "Ultra Beast",
167168
"alt_forms": "Alt Forms",
168169
"alola": "Alola",
169170
"galarian": "Galarian",

server/scripts/generateMasterfile.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ const getRarityLevel = (id, pkmn) => {
1919
}
2020
if (pkmn.legendary) pkmnRarity = 'legendary'
2121
if (pkmn.mythical) pkmnRarity = 'mythical'
22+
if (pkmn.ultraBeast) pkmnRarity = 'ultraBeast'
2223
return pkmnRarity
2324
}
2425

server/scripts/poracleToGeoJSON.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,10 @@ if (fs.existsSync(geofencesFile)) {
4848
const coord = inGeofence.path[j]
4949
inGeofence.path[j] = [coord[1], coord[0]]
5050
}
51+
const lastCoords = inGeofence.path.slice(-1)
52+
if (inGeofence.path[0][0] !== lastCoords[0][0] || inGeofence.path[0][1] !== lastCoords[0][1]) {
53+
inGeofence.path.push(inGeofence.path[0])
54+
}
5155
outGeofence.geometry.coordinates[0] = inGeofence.path
5256
outGeoJSON.features.push(outGeofence)
5357
}

0 commit comments

Comments
 (0)