tileserver-gl-light 4.2.0 โ 4.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/dependabot.yml +19 -0
- package/.github/workflows/codeql.yml +35 -0
- package/.github/workflows/ct.yml +57 -0
- package/.github/workflows/release.yml +112 -0
- package/docs/usage.rst +6 -0
- package/package.json +3 -3
- package/src/serve_data.js +4 -1
- package/src/serve_font.js +1 -1
- package/src/serve_rendered.js +4 -1
- package/.travis.yml +0 -21
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
version: 2
|
|
2
|
+
updates:
|
|
3
|
+
- package-ecosystem: npm
|
|
4
|
+
versioning-strategy: increase
|
|
5
|
+
directory: '/'
|
|
6
|
+
schedule:
|
|
7
|
+
interval: daily
|
|
8
|
+
commit-message:
|
|
9
|
+
prefix: fix
|
|
10
|
+
prefix-development: chore
|
|
11
|
+
include: scope
|
|
12
|
+
- package-ecosystem: github-actions
|
|
13
|
+
directory: '/'
|
|
14
|
+
schedule:
|
|
15
|
+
interval: weekly
|
|
16
|
+
commit-message:
|
|
17
|
+
prefix: fix
|
|
18
|
+
prefix-development: chore
|
|
19
|
+
include: scope
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
on:
|
|
2
|
+
push:
|
|
3
|
+
branches:
|
|
4
|
+
- master
|
|
5
|
+
pull_request:
|
|
6
|
+
branches:
|
|
7
|
+
- master
|
|
8
|
+
schedule:
|
|
9
|
+
- cron: '45 23 * * 2'
|
|
10
|
+
jobs:
|
|
11
|
+
analyze:
|
|
12
|
+
name: Analyze
|
|
13
|
+
runs-on: ubuntu-latest
|
|
14
|
+
permissions:
|
|
15
|
+
actions: read
|
|
16
|
+
contents: read
|
|
17
|
+
security-events: write
|
|
18
|
+
strategy:
|
|
19
|
+
fail-fast: false
|
|
20
|
+
matrix:
|
|
21
|
+
language: [javascript]
|
|
22
|
+
steps:
|
|
23
|
+
- name: Checkout
|
|
24
|
+
uses: actions/checkout@v3
|
|
25
|
+
- name: Initialize CodeQL
|
|
26
|
+
uses: github/codeql-action/init@v2
|
|
27
|
+
with:
|
|
28
|
+
languages: ${{ matrix.language }}
|
|
29
|
+
queries: +security-and-quality
|
|
30
|
+
- name: Autobuild
|
|
31
|
+
uses: github/codeql-action/autobuild@v2
|
|
32
|
+
- name: Perform CodeQL Analysis
|
|
33
|
+
uses: github/codeql-action/analyze@v2
|
|
34
|
+
with:
|
|
35
|
+
category: '/language:${{ matrix.language }}'
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
name: 'Continuous Testing'
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches:
|
|
6
|
+
- master
|
|
7
|
+
pull_request:
|
|
8
|
+
branches:
|
|
9
|
+
- master
|
|
10
|
+
|
|
11
|
+
permissions:
|
|
12
|
+
checks: write
|
|
13
|
+
contents: read
|
|
14
|
+
|
|
15
|
+
jobs:
|
|
16
|
+
ct:
|
|
17
|
+
runs-on: ubuntu-20.04
|
|
18
|
+
steps:
|
|
19
|
+
- name: Check out repository โจ (non-dependabot)
|
|
20
|
+
if: ${{ github.actor != 'dependabot[bot]' }}
|
|
21
|
+
uses: actions/checkout@v3
|
|
22
|
+
|
|
23
|
+
- name: Check out repository ๐ (dependabot)
|
|
24
|
+
if: ${{ github.actor == 'dependabot[bot]' }}
|
|
25
|
+
uses: actions/checkout@v3
|
|
26
|
+
with:
|
|
27
|
+
ref: ${{ github.event.pull_request.head.sha }}
|
|
28
|
+
|
|
29
|
+
- name: Update apt-get ๐
|
|
30
|
+
run: sudo apt-get update -qq
|
|
31
|
+
|
|
32
|
+
- name: Install dependencies (Ubuntu) ๐
|
|
33
|
+
run: >-
|
|
34
|
+
sudo apt-get install -qq libcairo2-dev libjpeg8-dev libpango1.0-dev
|
|
35
|
+
libgif-dev build-essential g++ xvfb libgles2-mesa-dev libgbm-dev
|
|
36
|
+
libxxf86vm-dev
|
|
37
|
+
|
|
38
|
+
- name: Setup node env ๐ฆ
|
|
39
|
+
uses: actions/setup-node@v3
|
|
40
|
+
with:
|
|
41
|
+
node-version-file: 'package.json'
|
|
42
|
+
check-latest: true
|
|
43
|
+
cache: 'npm'
|
|
44
|
+
|
|
45
|
+
- name: Install dependencies ๐
|
|
46
|
+
run: npm ci --prefer-offline --no-audit --omit=optional
|
|
47
|
+
|
|
48
|
+
- name: Pull test data ๐ฆ
|
|
49
|
+
run: >-
|
|
50
|
+
wget -O test_data.zip
|
|
51
|
+
https://github.com/maptiler/tileserver-gl/releases/download/v1.3.0/test_data.zip
|
|
52
|
+
|
|
53
|
+
- name: Prepare test data ๐ฆ
|
|
54
|
+
run: unzip -q test_data.zip -d test_data
|
|
55
|
+
|
|
56
|
+
- name: Run tests ๐งช
|
|
57
|
+
run: xvfb-run --server-args="-screen 0 1024x768x24" npm test
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
name: "Build, Test, Release"
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
workflow_dispatch:
|
|
5
|
+
inputs:
|
|
6
|
+
docker_user:
|
|
7
|
+
description: 'Docker Username'
|
|
8
|
+
required: true
|
|
9
|
+
docker_token:
|
|
10
|
+
description: 'Docker Token'
|
|
11
|
+
required: true
|
|
12
|
+
npm_token:
|
|
13
|
+
description: 'NPM Token'
|
|
14
|
+
required: true
|
|
15
|
+
|
|
16
|
+
jobs:
|
|
17
|
+
release:
|
|
18
|
+
name: "Build, Test, Publish"
|
|
19
|
+
runs-on: ubuntu-20.04
|
|
20
|
+
steps:
|
|
21
|
+
- name: Check out repository โจ
|
|
22
|
+
uses: actions/checkout@v3
|
|
23
|
+
|
|
24
|
+
- name: Update apt-get ๐
|
|
25
|
+
run: sudo apt-get update -qq
|
|
26
|
+
|
|
27
|
+
- name: Install dependencies (Ubuntu) ๐
|
|
28
|
+
run: >-
|
|
29
|
+
sudo apt-get install -qq libcairo2-dev libjpeg8-dev libpango1.0-dev
|
|
30
|
+
libgif-dev build-essential g++ xvfb libgles2-mesa-dev libgbm-dev
|
|
31
|
+
libxxf86vm-dev
|
|
32
|
+
|
|
33
|
+
- name: Setup node env ๐ฆ
|
|
34
|
+
uses: actions/setup-node@v3
|
|
35
|
+
with:
|
|
36
|
+
node-version-file: 'package.json'
|
|
37
|
+
check-latest: true
|
|
38
|
+
cache: 'npm'
|
|
39
|
+
|
|
40
|
+
- name: Install dependencies ๐
|
|
41
|
+
run: npm ci --prefer-offline --no-audit --omit=optional
|
|
42
|
+
|
|
43
|
+
- name: Pull test data ๐ฆ
|
|
44
|
+
run: >-
|
|
45
|
+
wget -O test_data.zip
|
|
46
|
+
https://github.com/maptiler/tileserver-gl/releases/download/v1.3.0/test_data.zip
|
|
47
|
+
|
|
48
|
+
- name: Prepare test data ๐ฆ
|
|
49
|
+
run: unzip -q test_data.zip -d test_data
|
|
50
|
+
|
|
51
|
+
- name: Run tests ๐งช
|
|
52
|
+
run: xvfb-run --server-args="-screen 0 1024x768x24" npm test
|
|
53
|
+
|
|
54
|
+
- name: Remove Test Data
|
|
55
|
+
run: rm -R test_data*
|
|
56
|
+
|
|
57
|
+
- name: Publish to Full Version NPM
|
|
58
|
+
run: |
|
|
59
|
+
npm config set //registry.npmjs.org/:_authToken ${NPM_TOKEN}
|
|
60
|
+
npm publish --access public
|
|
61
|
+
env:
|
|
62
|
+
NPM_TOKEN: ${{ github.event.inputs.npm_token }}
|
|
63
|
+
|
|
64
|
+
- name: Get version
|
|
65
|
+
run: |
|
|
66
|
+
echo "PACKAGE_VERSION=$(grep '"version"' package.json | cut -d '"' -f 4 | head -n 1)" >> $GITHUB_ENV
|
|
67
|
+
|
|
68
|
+
- name: Set up QEMU
|
|
69
|
+
uses: docker/setup-qemu-action@v2
|
|
70
|
+
with:
|
|
71
|
+
platforms: 'arm64'
|
|
72
|
+
|
|
73
|
+
- name: Set up Docker Buildx
|
|
74
|
+
uses: docker/setup-buildx-action@v2
|
|
75
|
+
|
|
76
|
+
- name: Login to DockerHub
|
|
77
|
+
uses: docker/login-action@v2
|
|
78
|
+
with:
|
|
79
|
+
username: ${{ github.event.inputs.docker_user }}
|
|
80
|
+
password: ${{ github.event.inputs.docker_token }}
|
|
81
|
+
|
|
82
|
+
- name: Build and publish Full Version to Docker Hub
|
|
83
|
+
uses: docker/build-push-action@v3
|
|
84
|
+
with:
|
|
85
|
+
context: .
|
|
86
|
+
push: true
|
|
87
|
+
tags: maptiler/tileserver-gl:latest, maptiler/tileserver-gl:${{ env.PACKAGE_VERSION }}
|
|
88
|
+
platforms: linux/arm64,linux/amd64
|
|
89
|
+
|
|
90
|
+
- name: Create Tileserver Light Directory
|
|
91
|
+
run: node publish.js --no-publish
|
|
92
|
+
|
|
93
|
+
- name: Install node dependencies
|
|
94
|
+
run: npm install
|
|
95
|
+
working-directory: ./light
|
|
96
|
+
|
|
97
|
+
- name: Publish to Light Version NPM
|
|
98
|
+
working-directory: ./light
|
|
99
|
+
run: |
|
|
100
|
+
npm config set //registry.npmjs.org/:_authToken ${NPM_TOKEN}
|
|
101
|
+
npm publish --access public
|
|
102
|
+
env:
|
|
103
|
+
NPM_TOKEN: ${{ github.event.inputs.npm_token }}
|
|
104
|
+
|
|
105
|
+
- name: Build and publish Light Version to Docker Hub
|
|
106
|
+
uses: docker/build-push-action@v3
|
|
107
|
+
with:
|
|
108
|
+
context: ./light
|
|
109
|
+
file: ./light/Dockerfile
|
|
110
|
+
push: true
|
|
111
|
+
tags: maptiler/tileserver-gl-light:latest, maptiler/tileserver-gl-light:${{ env.PACKAGE_VERSION }}
|
|
112
|
+
platforms: linux/arm64,linux/amd64
|
package/docs/usage.rst
CHANGED
|
@@ -36,3 +36,9 @@ It is possible to reload the configuration file without restarting the whole pro
|
|
|
36
36
|
|
|
37
37
|
- The `docker kill -s HUP tileserver-gl` command can be used when running the tileserver-gl docker container.
|
|
38
38
|
- The `docker-compose kill -s HUP tileserver-gl-service-name` can be used when tileserver-gl is run as a docker-compose service.
|
|
39
|
+
|
|
40
|
+
Docker and `--port`
|
|
41
|
+
======
|
|
42
|
+
|
|
43
|
+
When running tileserver-gl in a Docker container, using the `--port` option would make the container incorrectly seem unhealthy.
|
|
44
|
+
Instead, it is advised to use Docker's port mapping and map the default port 8080 to the desired external port.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "tileserver-gl-light",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.3.1",
|
|
4
4
|
"description": "Map tile server for JSON GL styles - serving vector tiles",
|
|
5
5
|
"main": "src/main.js",
|
|
6
6
|
"bin": "src/main.js",
|
|
@@ -26,9 +26,9 @@
|
|
|
26
26
|
"chokidar": "3.5.3",
|
|
27
27
|
"clone": "2.1.2",
|
|
28
28
|
"color": "4.2.3",
|
|
29
|
-
"commander": "9.4.
|
|
29
|
+
"commander": "9.4.1",
|
|
30
30
|
"cors": "2.8.5",
|
|
31
|
-
"express": "4.18.
|
|
31
|
+
"express": "4.18.2",
|
|
32
32
|
"handlebars": "4.7.7",
|
|
33
33
|
"http-shutdown": "1.2.2",
|
|
34
34
|
"morgan": "1.10.0",
|
package/src/serve_data.js
CHANGED
|
@@ -54,7 +54,10 @@ export const serve_data = {
|
|
|
54
54
|
if (/does not exist/.test(err.message)) {
|
|
55
55
|
return res.status(204).send();
|
|
56
56
|
} else {
|
|
57
|
-
return res
|
|
57
|
+
return res
|
|
58
|
+
.status(500)
|
|
59
|
+
.header('Content-Type', 'text/plain')
|
|
60
|
+
.send(err.message);
|
|
58
61
|
}
|
|
59
62
|
} else {
|
|
60
63
|
if (data == null) {
|
package/src/serve_font.js
CHANGED
|
@@ -54,7 +54,7 @@ export const serve_font = (options, allowedFonts) => {
|
|
|
54
54
|
res.header('Last-Modified', lastModified);
|
|
55
55
|
return res.send(concated);
|
|
56
56
|
},
|
|
57
|
-
(err) => res.status(400).send(err),
|
|
57
|
+
(err) => res.status(400).header('Content-Type', 'text/plain').send(err),
|
|
58
58
|
);
|
|
59
59
|
});
|
|
60
60
|
|
package/src/serve_rendered.js
CHANGED
|
@@ -661,7 +661,10 @@ export const serve_rendered = {
|
|
|
661
661
|
pool.release(renderer);
|
|
662
662
|
if (err) {
|
|
663
663
|
console.error(err);
|
|
664
|
-
return res
|
|
664
|
+
return res
|
|
665
|
+
.status(500)
|
|
666
|
+
.header('Content-Type', 'text/plain')
|
|
667
|
+
.send(err);
|
|
665
668
|
}
|
|
666
669
|
|
|
667
670
|
// Fix semi-transparent outlines on raw, premultiplied input
|
package/.travis.yml
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
language: node_js
|
|
2
|
-
node_js:
|
|
3
|
-
- "10"
|
|
4
|
-
env:
|
|
5
|
-
- CXX=g++-4.8
|
|
6
|
-
addons:
|
|
7
|
-
apt:
|
|
8
|
-
sources:
|
|
9
|
-
- ubuntu-toolchain-r-test
|
|
10
|
-
packages:
|
|
11
|
-
- g++-4.8
|
|
12
|
-
before_install:
|
|
13
|
-
- sudo apt-get update -qq
|
|
14
|
-
- sudo apt-get install -qq libcairo2-dev libjpeg8-dev libpango1.0-dev libgif-dev build-essential g++
|
|
15
|
-
- sudo apt-get install -qq xvfb libgles2-mesa-dev libgbm-dev libxxf86vm-dev
|
|
16
|
-
install:
|
|
17
|
-
- npm install
|
|
18
|
-
- wget -O test_data.zip https://github.com/maptiler/tileserver-gl/releases/download/v1.3.0/test_data.zip
|
|
19
|
-
- unzip -q test_data.zip -d test_data
|
|
20
|
-
script:
|
|
21
|
-
- xvfb-run --server-args="-screen 0 1024x768x24" npm test
|