Promise code never worked: listFonts did not wait for fs.stat() to resolve().
This was not evident because late results were still used.
A recent PR made it worse: late results are now ignored.
This manifested for styles with missing fonts, no fallback could be used.
Signed-off-by: Martin d'Allens <martin.dallens@liberty-rider.com>
* chore: make sure error exit codes of tests are returned
Signed-off-by: Martin d'Allens <martin.dallens@liberty-rider.com>
* chore: replace the last 'var' with 'const'
Signed-off-by: Martin d'Allens <martin.dallens@liberty-rider.com>
* chore: extract duplicated font listing
Signed-off-by: Martin d'Allens <martin.dallens@liberty-rider.com>
* chore: extract rendering functions to a new file
Signed-off-by: Martin d'Allens <martin.dallens@liberty-rider.com>
* chore: move nested respondImage() function to top level
Signed-off-by: Martin d'Allens <martin.dallens@liberty-rider.com>
* chore: simplify respondImage() args
Signed-off-by: Martin d'Allens <martin.dallens@liberty-rider.com>
* chore: fix typo in rendeAttribution
Signed-off-by: Martin d'Allens <martin.dallens@liberty-rider.com>
---------
Signed-off-by: Martin d'Allens <martin.dallens@liberty-rider.com>
Adds pmtiles support to TileServer-GL
Signed-off-by: Andrew Calcutt <acalcutt@techidiots.net>
Signed-off-by: Michael Nutt <michael@nuttnet.net>
Co-authored-by: Michael Nutt <michael@nuttnet.net>
* Handle SIGTERM
Resolve#781
* Add `Caught signal ...` messages
Container log when sending a `SIGHUP` signal and then a `SIGTERM` signal using
`docker kill --signal ...` :
```
Starting tileserver-gl v4.4.8
[INFO] Automatically creating config file for zurich_switzerland.mbtiles
[INFO] Only a basic preview style will be used.
[INFO] See documentation to learn how to create config.json file.
Run with --verbose to see the config file here.
Starting server
Listening at http://[::]:8080/
Startup complete
Caught signal SIGHUP, refreshing
Stopping server and reloading config
Starting server
Listening at http://[::]:8080/
Startup complete
Caught signal SIGTERM, stopping gracefully
```
Note that the numeric signal values, as used in the shell version, were
replaced by signal names, as used in nodeJS.
* run 'npm run lint:js:fix'
---------
Co-authored-by: acalcutt <acalcutt@techidiots.net>
* switch to esm module
* Update package.json
* change to maplibre package
* fix tests
* eslint
* remove extra package updates
* Delete package-lock.json
* change 'fs' to 'node:fs'
* put back node 10.
without the package updates this still works
* remove trailing commas
* remove unassociated fix / formatting
* remove unassociated fix
* remove eslint from this PR
* remove unassociated fix
* lint
* Merge remote-tracking branch 'upstream/master' into esm_update
* fix mlgl
* update maplibre-native to new version with arm64
* update minor version
* var -> let / const
* [].forEach -> for (... of ...)
* '...' + var -> template strings `...${var}`
* function -> arrow functions `=>`
* use === and !== instead of == and !=