Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade Express to v5 + code cleanup #1429

Open
wants to merge 101 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 99 commits
Commits
Show all changes
101 commits
Select commit Hold shift + click to select a range
8dd927e
first attempt to upgrade express to v5
acalcutt Dec 29, 2024
b72f662
try to fix https://github.com/maptiler/tileserver-gl/issues/1411
acalcutt Dec 29, 2024
c7377e8
cleanup server.js
acalcutt Dec 29, 2024
2e74bc7
cleanup serve_font.js
acalcutt Dec 29, 2024
61e81e0
cleanup sever_rendered.js
acalcutt Dec 29, 2024
a0fb368
cleanup server_data.js
acalcutt Dec 29, 2024
b638208
cleanup serve_style
acalcutt Dec 29, 2024
d635d3c
Update serve_style.js
acalcutt Dec 29, 2024
c72d6f5
Move UV_THREADPOOL_SIZE to main thred
acalcutt Dec 29, 2024
70d6986
cleanup utils.js
acalcutt Dec 29, 2024
e1460fb
Use common app.get for images and static images
acalcutt Dec 30, 2024
8dc3809
add allowedTileSizes and option
acalcutt Dec 30, 2024
ab20e81
cleanup error responses
acalcutt Dec 30, 2024
9f3a7ce
fix /style/id.json with next('route')
acalcutt Dec 30, 2024
1f0ee0d
improve sprite path
acalcutt Dec 30, 2024
d255cdc
add parseFloadts around zxy
acalcutt Dec 30, 2024
c4adfa8
simplify server_data
acalcutt Dec 30, 2024
3aaab82
move tile fetch and add fix verbose logging
acalcutt Dec 30, 2024
848f7c5
add Handling request to verbose logging
acalcutt Dec 30, 2024
5a883d9
first attempt to upgrade express to v5
acalcutt Dec 29, 2024
c9bc1ec
try to fix https://github.com/maptiler/tileserver-gl/issues/1411
acalcutt Dec 29, 2024
12b818b
cleanup server.js
acalcutt Dec 29, 2024
b6537b5
cleanup serve_font.js
acalcutt Dec 29, 2024
d521546
cleanup sever_rendered.js
acalcutt Dec 29, 2024
279421c
cleanup server_data.js
acalcutt Dec 29, 2024
8ea4b50
cleanup serve_style
acalcutt Dec 29, 2024
7cbafe8
Update serve_style.js
acalcutt Dec 29, 2024
08e1d34
Move UV_THREADPOOL_SIZE to main thred
acalcutt Dec 29, 2024
c0e14bd
cleanup utils.js
acalcutt Dec 29, 2024
40ecf4c
Use common app.get for images and static images
acalcutt Dec 30, 2024
d98cc33
add allowedTileSizes and option
acalcutt Dec 30, 2024
4c6f379
cleanup error responses
acalcutt Dec 30, 2024
592e74c
fix /style/id.json with next('route')
acalcutt Dec 30, 2024
32fd488
improve sprite path
acalcutt Dec 30, 2024
576f02e
add parseFloadts around zxy
acalcutt Dec 30, 2024
d6f7f5e
simplify server_data
acalcutt Dec 30, 2024
99afa33
move tile fetch and add fix verbose logging
acalcutt Dec 30, 2024
d5d938b
add Handling request to verbose logging
acalcutt Dec 30, 2024
6fddbae
merge elevation changes
acalcutt Jan 2, 2025
8186aa1
lint format
acalcutt Jan 2, 2025
7133587
Merge branch 'express-5-v2' into express-5
acalcutt Jan 2, 2025
0d72d57
add verbose logging, improve headers
acalcutt Jan 3, 2025
468779b
try to fix codeql
acalcutt Jan 3, 2025
8bdd14a
test
acalcutt Jan 3, 2025
3260611
all tests passing
acalcutt Jan 3, 2025
ff4ab84
cleanup unneeded changes
acalcutt Jan 3, 2025
d0aad8e
cleanup
acalcutt Jan 3, 2025
4c58ebb
try to fix codeql error
acalcutt Jan 3, 2025
6ab84eb
font fixes
acalcutt Jan 3, 2025
a805302
fix tile size issue
acalcutt Jan 3, 2025
5f85802
try to improve scale + codeql
acalcutt Jan 4, 2025
b825c9a
codeql for sprite logging
acalcutt Jan 4, 2025
e1cae33
codeql serve fonts
acalcutt Jan 4, 2025
e6750dc
codeql fixes
acalcutt Jan 4, 2025
8420ef1
fix failing test with multiple fonts
acalcutt Jan 4, 2025
faf01d7
Update serve_font.js
acalcutt Jan 4, 2025
3517060
codeql
acalcutt Jan 4, 2025
d4aaa62
codeql
acalcutt Jan 4, 2025
afa5952
codeql
acalcutt Jan 4, 2025
2be472b
Update utils.js
acalcutt Jan 4, 2025
f6b24a5
codeql
acalcutt Jan 4, 2025
f187d32
codeql
acalcutt Jan 4, 2025
4abc616
codeql
acalcutt Jan 4, 2025
bc85d7a
codeql
acalcutt Jan 4, 2025
4fe9bda
codeql sanitize
acalcutt Jan 4, 2025
7a81e47
Update serve_font.js
acalcutt Jan 4, 2025
0dcf296
Update serve_font.js
acalcutt Jan 4, 2025
2505249
remove useless assignment
acalcutt Jan 4, 2025
4e2e46a
move isGzipped
acalcutt Jan 4, 2025
7e67f40
add if-modified-since and cache-control
acalcutt Jan 4, 2025
23f50d0
use consistent cache control
acalcutt Jan 4, 2025
f888286
reformat
acalcutt Jan 4, 2025
c2f95ab
codeql
acalcutt Jan 5, 2025
3def0d2
codeql
acalcutt Jan 5, 2025
1c5ee75
codeql
acalcutt Jan 5, 2025
59f4dcc
codeql
acalcutt Jan 5, 2025
aa936ea
codeql
acalcutt Jan 5, 2025
1c3baef
codeql
acalcutt Jan 5, 2025
d85226f
codeql
acalcutt Jan 5, 2025
9a98b38
Update serve_font.js
acalcutt Jan 5, 2025
e79e011
Update serve_font.js
acalcutt Jan 5, 2025
dce7732
Update serve_font.js
acalcutt Jan 5, 2025
0f3629c
Update serve_style.js
acalcutt Jan 5, 2025
b1e1d72
Update serve_style.js
acalcutt Jan 5, 2025
e0574b1
Update serve_style.js
acalcutt Jan 5, 2025
96b35a3
Revert "Update serve_style.js"
acalcutt Jan 5, 2025
54bc82c
Revert "Update serve_style.js"
acalcutt Jan 5, 2025
3fedd5b
Revert "Update serve_style.js"
acalcutt Jan 5, 2025
1f69300
Add readFile function
acalcutt Jan 5, 2025
340e5db
use readFile, add path.normalize
acalcutt Jan 5, 2025
7dddbf7
Update serve_rendered.js
acalcutt Jan 5, 2025
62a3212
simplify input checking
acalcutt Jan 5, 2025
5de617d
Update utils.js
acalcutt Jan 5, 2025
e18874f
codeql
acalcutt Jan 5, 2025
aceb306
Revert "codeql"
acalcutt Jan 5, 2025
ecfcaeb
Revert "Update utils.js"
acalcutt Jan 5, 2025
097c0e1
Revert "simplify input checking"
acalcutt Jan 5, 2025
941e283
move allowed functions to utils.js
acalcutt Jan 5, 2025
36cbcf7
use xy[0],xy[1],
acalcutt Jan 10, 2025
8f28789
uprade canvas per https://github.com/maptiler/tileserver-gl/issues/1433
acalcutt Jan 10, 2025
5315123
Merge remote-tracking branch 'upstream/master' into express-5
acalcutt Jan 10, 2025
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
552 changes: 378 additions & 174 deletions package-lock.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
"color": "4.2.3",
"commander": "12.1.0",
"cors": "2.8.5",
"express": "4.19.2",
"express": "5.0.1",
"handlebars": "4.7.8",
"http-shutdown": "1.2.2",
"morgan": "1.10.0",
Expand Down
6 changes: 6 additions & 0 deletions src/main.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
#!/usr/bin/env node

'use strict';
import os from 'os';

const envSize = parseInt(process.env.UV_THREADPOOL_SIZE, 10);
process.env.UV_THREADPOOL_SIZE = Math.ceil(
Math.max(4, isNaN(envSize) ? os.cpus().length * 1.5 : envSize),
);

import fs from 'node:fs';
import fsp from 'node:fs/promises';
Expand Down
Loading
Loading