@basemaps/lambda-tiler 6.16.1 → 6.20.0
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/CHANGELOG.md +49 -0
- package/LICENSE +2 -2
- package/build/__test__/tile.style.json.test.d.ts +2 -0
- package/build/__test__/tile.style.json.test.d.ts.map +1 -0
- package/build/__test__/tile.style.json.test.js +33 -0
- package/build/__test__/xyz.test.js +35 -34
- package/build/cli/dump.js +2 -2
- package/build/index.d.ts.map +1 -1
- package/build/index.js +10 -0
- package/build/routes/esri/rest.d.ts +10 -0
- package/build/routes/esri/rest.d.ts.map +1 -0
- package/build/routes/esri/rest.js +87 -0
- package/build/routes/imagery.d.ts +10 -0
- package/build/routes/imagery.d.ts.map +1 -0
- package/build/routes/imagery.js +50 -0
- package/build/routes/response.d.ts +4 -0
- package/build/routes/response.d.ts.map +1 -0
- package/build/routes/response.js +3 -0
- package/build/routes/tile.d.ts +0 -20
- package/build/routes/tile.d.ts.map +1 -1
- package/build/routes/tile.js +11 -164
- package/build/routes/tile.json.d.ts +10 -0
- package/build/routes/tile.json.d.ts.map +1 -0
- package/build/routes/tile.json.js +31 -0
- package/build/routes/tile.style.json.d.ts +10 -0
- package/build/routes/tile.style.json.d.ts.map +1 -0
- package/build/routes/tile.style.json.js +74 -0
- package/build/routes/tile.wmts.d.ts +9 -0
- package/build/routes/tile.wmts.d.ts.map +1 -0
- package/build/routes/tile.wmts.js +57 -0
- package/build/routes/tile.xyz.d.ts +13 -0
- package/build/routes/tile.xyz.d.ts.map +1 -0
- package/build/routes/tile.xyz.js +28 -0
- package/build/tile.set.raster.d.ts +2 -0
- package/build/tile.set.raster.d.ts.map +1 -1
- package/build/tile.set.raster.js +3 -1
- package/build/tile.set.vector.js +1 -1
- package/dist/index.js +10580 -9573
- package/dist/node_modules/color/README.md +7 -7
- package/dist/node_modules/color/index.js +173 -158
- package/dist/node_modules/color/package.json +18 -16
- package/dist/node_modules/color-convert/conversions.js +281 -310
- package/dist/node_modules/color-convert/index.js +27 -24
- package/dist/node_modules/color-convert/package.json +16 -14
- package/dist/node_modules/color-convert/route.js +22 -22
- package/dist/node_modules/color-name/package.json +17 -14
- package/dist/node_modules/color-string/index.js +2 -2
- package/dist/node_modules/color-string/package.json +10 -10
- package/dist/node_modules/decompress-response/index.d.ts +14 -21
- package/dist/node_modules/decompress-response/index.js +34 -16
- package/dist/node_modules/decompress-response/license +1 -1
- package/dist/node_modules/decompress-response/package.json +23 -17
- package/dist/node_modules/decompress-response/readme.md +2 -6
- package/dist/node_modules/detect-libc/package.json +0 -1
- package/dist/node_modules/mimic-response/index.d.ts +2 -2
- package/dist/node_modules/mimic-response/index.js +41 -2
- package/dist/node_modules/mimic-response/package.json +17 -17
- package/dist/node_modules/mimic-response/readme.md +22 -1
- package/dist/node_modules/node-abi/.circleci/config.yml +63 -0
- package/dist/node_modules/node-abi/.releaserc.json +9 -0
- package/dist/node_modules/node-abi/abi_registry.json +39 -4
- package/dist/node_modules/node-abi/index.js +5 -2
- package/dist/node_modules/node-abi/package.json +17 -16
- package/dist/node_modules/node-abi/test/index.js +7 -15
- package/dist/node_modules/node-addon-api/README.md +2 -2
- package/dist/node_modules/node-addon-api/except.gypi +20 -11
- package/dist/node_modules/node-addon-api/napi-inl.h +734 -196
- package/dist/node_modules/node-addon-api/napi.h +420 -164
- package/dist/node_modules/node-addon-api/noexcept.gypi +21 -11
- package/dist/node_modules/node-addon-api/package.json +43 -14
- package/dist/node_modules/node-addon-api/tools/clang-format.js +18 -17
- package/dist/node_modules/node-addon-api/tools/eslint-format.js +71 -0
- package/dist/node_modules/prebuild-install/CHANGELOG.md +24 -7
- package/dist/node_modules/prebuild-install/README.md +24 -4
- package/dist/node_modules/prebuild-install/asset.js +10 -10
- package/dist/node_modules/prebuild-install/bin.js +13 -13
- package/dist/node_modules/prebuild-install/download.js +22 -22
- package/dist/node_modules/prebuild-install/log.js +4 -4
- package/dist/node_modules/prebuild-install/node_modules/detect-libc/LICENSE +201 -0
- package/dist/node_modules/prebuild-install/node_modules/detect-libc/README.md +160 -0
- package/dist/node_modules/prebuild-install/node_modules/detect-libc/index.d.ts +11 -0
- package/dist/node_modules/prebuild-install/node_modules/detect-libc/lib/detect-libc.js +178 -0
- package/dist/node_modules/prebuild-install/node_modules/detect-libc/lib/process.js +16 -0
- package/dist/node_modules/prebuild-install/node_modules/detect-libc/package.json +71 -0
- package/dist/node_modules/prebuild-install/package.json +18 -19
- package/dist/node_modules/prebuild-install/proxy.js +10 -10
- package/dist/node_modules/prebuild-install/rc.js +12 -12
- package/dist/node_modules/prebuild-install/util.js +14 -14
- package/dist/node_modules/semver/package.json +1 -0
- package/dist/node_modules/sharp/README.md +2 -2
- package/dist/node_modules/sharp/binding.gyp +12 -9
- package/dist/node_modules/sharp/build/Release/sharp-linux-x64.node +0 -0
- package/dist/node_modules/sharp/install/dll-copy.js +6 -6
- package/dist/node_modules/sharp/install/libvips.js +4 -8
- package/dist/node_modules/sharp/lib/channel.js +11 -7
- package/dist/node_modules/sharp/lib/colour.js +42 -1
- package/dist/node_modules/sharp/lib/constructor.js +18 -31
- package/dist/node_modules/sharp/lib/input.js +45 -3
- package/dist/node_modules/sharp/lib/is.js +19 -5
- package/dist/node_modules/sharp/lib/libvips.js +4 -19
- package/dist/node_modules/sharp/lib/operation.js +28 -5
- package/dist/node_modules/sharp/lib/output.js +147 -16
- package/dist/node_modules/sharp/lib/sharp.js +31 -0
- package/dist/node_modules/sharp/lib/utility.js +3 -2
- package/dist/node_modules/sharp/package.json +32 -23
- package/dist/node_modules/sharp/src/common.cc +67 -11
- package/dist/node_modules/sharp/src/common.h +25 -5
- package/dist/node_modules/sharp/src/libvips/cplusplus/VConnection.cpp +0 -26
- package/dist/node_modules/sharp/src/libvips/cplusplus/VImage.cpp +54 -16
- package/dist/node_modules/sharp/src/libvips/cplusplus/VInterpolate.cpp +0 -13
- package/dist/node_modules/sharp/src/libvips/cplusplus/vips-operators.cpp +185 -1
- package/dist/node_modules/sharp/src/metadata.cc +14 -0
- package/dist/node_modules/sharp/src/metadata.h +1 -0
- package/dist/node_modules/sharp/src/operations.cc +29 -3
- package/dist/node_modules/sharp/src/operations.h +13 -2
- package/dist/node_modules/sharp/src/pipeline.cc +103 -35
- package/dist/node_modules/sharp/src/pipeline.h +23 -3
- package/dist/node_modules/sharp/src/utilities.cc +1 -1
- package/dist/node_modules/sharp/vendor/{8.10.6 → 8.11.3/linux-x64}/THIRD-PARTY-NOTICES.md +2 -3
- package/dist/node_modules/sharp/vendor/{8.10.6 → 8.11.3/linux-x64}/lib/libvips-cpp.so.42 +0 -0
- package/dist/node_modules/sharp/vendor/{8.10.6 → 8.11.3/linux-x64}/platform.json +0 -0
- package/dist/node_modules/sharp/vendor/8.11.3/linux-x64/versions.json +30 -0
- package/dist/node_modules/simple-get/.github/dependabot.yml +15 -0
- package/dist/node_modules/simple-get/.github/workflows/ci.yml +23 -0
- package/dist/node_modules/simple-get/README.md +17 -3
- package/dist/node_modules/simple-get/index.js +9 -0
- package/dist/node_modules/simple-get/package.json +27 -13
- package/dist/package-lock.json +54 -54
- package/dist/package.json +11 -11
- package/package.json +12 -12
- package/src/__test__/tile.style.json.test.ts +40 -0
- package/src/__test__/xyz.test.ts +43 -41
- package/src/cli/dump.ts +2 -2
- package/src/index.ts +10 -0
- package/src/routes/esri/rest.ts +90 -0
- package/src/routes/imagery.ts +52 -0
- package/src/routes/response.ts +4 -0
- package/src/routes/tile.json.ts +44 -0
- package/src/routes/tile.style.json.ts +77 -0
- package/src/routes/tile.ts +11 -186
- package/src/routes/tile.wmts.ts +59 -0
- package/src/routes/tile.xyz.ts +30 -0
- package/src/tile.set.raster.ts +4 -1
- package/src/tile.set.vector.ts +1 -1
- package/tsconfig.tsbuildinfo +1 -1
- package/dist/node_modules/color-name/.eslintrc.json +0 -43
- package/dist/node_modules/color-name/test.js +0 -7
- package/dist/node_modules/node-abi/.travis.yml +0 -17
- package/dist/node_modules/node-abi/node_modules/semver/CHANGELOG.md +0 -39
- package/dist/node_modules/node-abi/node_modules/semver/LICENSE +0 -15
- package/dist/node_modules/node-abi/node_modules/semver/README.md +0 -412
- package/dist/node_modules/node-abi/node_modules/semver/bin/semver +0 -160
- package/dist/node_modules/node-abi/node_modules/semver/package.json +0 -60
- package/dist/node_modules/node-abi/node_modules/semver/range.bnf +0 -16
- package/dist/node_modules/node-abi/node_modules/semver/semver.js +0 -1483
- package/dist/node_modules/node-addon-api/CHANGELOG.md +0 -722
- package/dist/node_modules/sharp/build/Release/sharp.node +0 -0
- package/dist/node_modules/sharp/vendor/8.10.6/versions.json +0 -31
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/*! simple-get. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */
|
|
1
2
|
module.exports = simpleGet
|
|
2
3
|
|
|
3
4
|
const concat = require('simple-concat')
|
|
@@ -43,6 +44,7 @@ function simpleGet (opts, cb) {
|
|
|
43
44
|
if (opts.json) opts.headers.accept = 'application/json'
|
|
44
45
|
if (opts.method) opts.method = opts.method.toUpperCase()
|
|
45
46
|
|
|
47
|
+
const originalHost = opts.hostname // hostname before potential redirect
|
|
46
48
|
const protocol = opts.protocol === 'https:' ? https : http // Support http/https urls
|
|
47
49
|
const req = protocol.request(opts, res => {
|
|
48
50
|
if (opts.followRedirects !== false && res.statusCode >= 300 && res.statusCode < 400 && res.headers.location) {
|
|
@@ -50,6 +52,13 @@ function simpleGet (opts, cb) {
|
|
|
50
52
|
delete opts.headers.host // Discard `host` header on redirect (see #32)
|
|
51
53
|
res.resume() // Discard response
|
|
52
54
|
|
|
55
|
+
const redirectHost = url.parse(opts.url).hostname // eslint-disable-line node/no-deprecated-api
|
|
56
|
+
// If redirected host is different than original host, drop headers to prevent cookie leak (#73)
|
|
57
|
+
if (redirectHost !== null && redirectHost !== originalHost) {
|
|
58
|
+
delete opts.headers.cookie
|
|
59
|
+
delete opts.headers.authorization
|
|
60
|
+
}
|
|
61
|
+
|
|
53
62
|
if (opts.method === 'POST' && [301, 302].includes(res.statusCode)) {
|
|
54
63
|
opts.method = 'GET' // On 301/302 redirect, change POST to GET (see #35)
|
|
55
64
|
delete opts.headers['content-length']; delete opts.headers['content-type']
|
|
@@ -1,32 +1,32 @@
|
|
|
1
1
|
{
|
|
2
|
-
"_from": "simple-get@^
|
|
3
|
-
"_id": "simple-get@
|
|
2
|
+
"_from": "simple-get@^4.0.0",
|
|
3
|
+
"_id": "simple-get@4.0.1",
|
|
4
4
|
"_inBundle": false,
|
|
5
|
-
"_integrity": "sha512-
|
|
5
|
+
"_integrity": "sha512-brv7p5WgH0jmQJr1ZDDfKDOSeWWg+OVypG99A/5vYGPqJ6pxiaHLy8nxtFjBA7oMa01ebA9gfh1uMCFqOuXxvA==",
|
|
6
6
|
"_location": "/simple-get",
|
|
7
7
|
"_phantomChildren": {},
|
|
8
8
|
"_requested": {
|
|
9
9
|
"type": "range",
|
|
10
10
|
"registry": true,
|
|
11
|
-
"raw": "simple-get@^
|
|
11
|
+
"raw": "simple-get@^4.0.0",
|
|
12
12
|
"name": "simple-get",
|
|
13
13
|
"escapedName": "simple-get",
|
|
14
|
-
"rawSpec": "^
|
|
14
|
+
"rawSpec": "^4.0.0",
|
|
15
15
|
"saveSpec": null,
|
|
16
|
-
"fetchSpec": "^
|
|
16
|
+
"fetchSpec": "^4.0.0"
|
|
17
17
|
},
|
|
18
18
|
"_requiredBy": [
|
|
19
19
|
"/prebuild-install",
|
|
20
20
|
"/sharp"
|
|
21
21
|
],
|
|
22
|
-
"_resolved": "https://registry.npmjs.org/simple-get/-/simple-get-
|
|
23
|
-
"_shasum": "
|
|
24
|
-
"_spec": "simple-get@^
|
|
22
|
+
"_resolved": "https://registry.npmjs.org/simple-get/-/simple-get-4.0.1.tgz",
|
|
23
|
+
"_shasum": "4a39db549287c979d352112fa03fd99fd6bc3543",
|
|
24
|
+
"_spec": "simple-get@^4.0.0",
|
|
25
25
|
"_where": "/home/runner/work/basemaps/basemaps/packages/lambda-tiler/dist/node_modules/sharp",
|
|
26
26
|
"author": {
|
|
27
27
|
"name": "Feross Aboukhadijeh",
|
|
28
28
|
"email": "feross@feross.org",
|
|
29
|
-
"url": "
|
|
29
|
+
"url": "https://feross.org"
|
|
30
30
|
},
|
|
31
31
|
"browser": {
|
|
32
32
|
"decompress-response": false
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
},
|
|
37
37
|
"bundleDependencies": false,
|
|
38
38
|
"dependencies": {
|
|
39
|
-
"decompress-response": "^
|
|
39
|
+
"decompress-response": "^6.0.0",
|
|
40
40
|
"once": "^1.3.1",
|
|
41
41
|
"simple-concat": "^1.0.0"
|
|
42
42
|
},
|
|
@@ -46,8 +46,22 @@
|
|
|
46
46
|
"self-signed-https": "^1.0.5",
|
|
47
47
|
"standard": "*",
|
|
48
48
|
"string-to-stream": "^3.0.0",
|
|
49
|
-
"tape": "^
|
|
49
|
+
"tape": "^5.0.0"
|
|
50
50
|
},
|
|
51
|
+
"funding": [
|
|
52
|
+
{
|
|
53
|
+
"type": "github",
|
|
54
|
+
"url": "https://github.com/sponsors/feross"
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
"type": "patreon",
|
|
58
|
+
"url": "https://www.patreon.com/feross"
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
"type": "consulting",
|
|
62
|
+
"url": "https://feross.org/support"
|
|
63
|
+
}
|
|
64
|
+
],
|
|
51
65
|
"homepage": "https://github.com/feross/simple-get",
|
|
52
66
|
"keywords": [
|
|
53
67
|
"request",
|
|
@@ -75,5 +89,5 @@
|
|
|
75
89
|
"scripts": {
|
|
76
90
|
"test": "standard && tape test/*.js"
|
|
77
91
|
},
|
|
78
|
-
"version": "
|
|
92
|
+
"version": "4.0.1"
|
|
79
93
|
}
|
package/dist/package-lock.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@basemaps/lambda-tiler",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.20.0",
|
|
4
4
|
"lockfileVersion": 1,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"dependencies": {
|
|
@@ -70,31 +70,31 @@
|
|
|
70
70
|
"integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c="
|
|
71
71
|
},
|
|
72
72
|
"color": {
|
|
73
|
-
"version": "
|
|
74
|
-
"resolved": "https://registry.npmjs.org/color/-/color-
|
|
75
|
-
"integrity": "sha512-
|
|
73
|
+
"version": "4.2.0",
|
|
74
|
+
"resolved": "https://registry.npmjs.org/color/-/color-4.2.0.tgz",
|
|
75
|
+
"integrity": "sha512-hHTcrbvEnGjC7WBMk6ibQWFVDgEFTVmjrz2Q5HlU6ltwxv0JJN2Z8I7uRbWeQLF04dikxs8zgyZkazRJvSMtyQ==",
|
|
76
76
|
"requires": {
|
|
77
|
-
"color-convert": "^
|
|
78
|
-
"color-string": "^1.
|
|
77
|
+
"color-convert": "^2.0.1",
|
|
78
|
+
"color-string": "^1.9.0"
|
|
79
79
|
}
|
|
80
80
|
},
|
|
81
81
|
"color-convert": {
|
|
82
|
-
"version": "
|
|
83
|
-
"resolved": "https://registry.npmjs.org/color-convert/-/color-convert-
|
|
84
|
-
"integrity": "sha512-
|
|
82
|
+
"version": "2.0.1",
|
|
83
|
+
"resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
|
|
84
|
+
"integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
|
|
85
85
|
"requires": {
|
|
86
|
-
"color-name": "1.1.
|
|
86
|
+
"color-name": "~1.1.4"
|
|
87
87
|
}
|
|
88
88
|
},
|
|
89
89
|
"color-name": {
|
|
90
|
-
"version": "1.1.
|
|
91
|
-
"resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.
|
|
92
|
-
"integrity": "
|
|
90
|
+
"version": "1.1.4",
|
|
91
|
+
"resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
|
|
92
|
+
"integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA=="
|
|
93
93
|
},
|
|
94
94
|
"color-string": {
|
|
95
|
-
"version": "1.
|
|
96
|
-
"resolved": "https://registry.npmjs.org/color-string/-/color-string-1.
|
|
97
|
-
"integrity": "sha512-
|
|
95
|
+
"version": "1.9.0",
|
|
96
|
+
"resolved": "https://registry.npmjs.org/color-string/-/color-string-1.9.0.tgz",
|
|
97
|
+
"integrity": "sha512-9Mrz2AQLefkH1UvASKj6v6hj/7eWgjnT/cVsR8CumieLoT+g900exWeNogqtweI8dxloXN9BDQTYro1oWu/5CQ==",
|
|
98
98
|
"requires": {
|
|
99
99
|
"color-name": "^1.0.0",
|
|
100
100
|
"simple-swizzle": "^0.2.2"
|
|
@@ -111,11 +111,11 @@
|
|
|
111
111
|
"integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ=="
|
|
112
112
|
},
|
|
113
113
|
"decompress-response": {
|
|
114
|
-
"version": "
|
|
115
|
-
"resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-
|
|
116
|
-
"integrity": "sha512-
|
|
114
|
+
"version": "6.0.0",
|
|
115
|
+
"resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-6.0.0.tgz",
|
|
116
|
+
"integrity": "sha512-aW35yZM6Bb/4oJlZncMH2LCoZtJXTRxES17vE3hoRiowU2kWHaJKFkSBDnDR+cm9J+9QhXmREyIfv0pji9ejCQ==",
|
|
117
117
|
"requires": {
|
|
118
|
-
"mimic-response": "^
|
|
118
|
+
"mimic-response": "^3.1.0"
|
|
119
119
|
}
|
|
120
120
|
},
|
|
121
121
|
"deep-extend": {
|
|
@@ -218,9 +218,9 @@
|
|
|
218
218
|
}
|
|
219
219
|
},
|
|
220
220
|
"mimic-response": {
|
|
221
|
-
"version": "
|
|
222
|
-
"resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-
|
|
223
|
-
"integrity": "sha512-
|
|
221
|
+
"version": "3.1.0",
|
|
222
|
+
"resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-3.1.0.tgz",
|
|
223
|
+
"integrity": "sha512-z0yWI+4FDrrweS8Zmt4Ej5HdJmky15+L2e6Wgn3+iK5fWzb6T3fhNFq2+MeTRb064c6Wr4N/wv0DzQTjNzHNGQ=="
|
|
224
224
|
},
|
|
225
225
|
"minimist": {
|
|
226
226
|
"version": "1.2.5",
|
|
@@ -238,24 +238,17 @@
|
|
|
238
238
|
"integrity": "sha512-ONmRUqK7zj7DWX0D9ADe03wbwOBZxNAfF20PlGfCWQcD3+/MakShIHrMqx9YwPTfxDdF1zLeL+RGZiR9kGMLdg=="
|
|
239
239
|
},
|
|
240
240
|
"node-abi": {
|
|
241
|
-
"version": "
|
|
242
|
-
"resolved": "https://registry.npmjs.org/node-abi/-/node-abi-
|
|
243
|
-
"integrity": "sha512
|
|
241
|
+
"version": "3.7.0",
|
|
242
|
+
"resolved": "https://registry.npmjs.org/node-abi/-/node-abi-3.7.0.tgz",
|
|
243
|
+
"integrity": "sha512-3J+U4CvxVNEk9+lGdJkmYbN8cIN0HMTDT9R0ezX7pmp7aD6BaKsfAHwVn3IvVg6pYIRUuQ+gHW1eawrvywnSQQ==",
|
|
244
244
|
"requires": {
|
|
245
|
-
"semver": "^
|
|
246
|
-
},
|
|
247
|
-
"dependencies": {
|
|
248
|
-
"semver": {
|
|
249
|
-
"version": "5.7.1",
|
|
250
|
-
"resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz",
|
|
251
|
-
"integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ=="
|
|
252
|
-
}
|
|
245
|
+
"semver": "^7.3.5"
|
|
253
246
|
}
|
|
254
247
|
},
|
|
255
248
|
"node-addon-api": {
|
|
256
|
-
"version": "3.
|
|
257
|
-
"resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-3.
|
|
258
|
-
"integrity": "sha512-
|
|
249
|
+
"version": "4.3.0",
|
|
250
|
+
"resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-4.3.0.tgz",
|
|
251
|
+
"integrity": "sha512-73sE9+3UaLYYFmDsFZnqCInzPyh3MqIwZO9cw58yIqAZhONrrabrYyYe3TuIqtIiOuTXVhsGau8hcrhhwSsDIQ=="
|
|
259
252
|
},
|
|
260
253
|
"npmlog": {
|
|
261
254
|
"version": "4.1.2",
|
|
@@ -287,23 +280,30 @@
|
|
|
287
280
|
}
|
|
288
281
|
},
|
|
289
282
|
"prebuild-install": {
|
|
290
|
-
"version": "
|
|
291
|
-
"resolved": "https://registry.npmjs.org/prebuild-install/-/prebuild-install-
|
|
292
|
-
"integrity": "sha512-
|
|
283
|
+
"version": "7.0.1",
|
|
284
|
+
"resolved": "https://registry.npmjs.org/prebuild-install/-/prebuild-install-7.0.1.tgz",
|
|
285
|
+
"integrity": "sha512-QBSab31WqkyxpnMWQxubYAHR5S9B2+r81ucocew34Fkl98FhvKIF50jIJnNOBmAZfyNV7vE5T6gd3hTVWgY6tg==",
|
|
293
286
|
"requires": {
|
|
294
|
-
"detect-libc": "^
|
|
287
|
+
"detect-libc": "^2.0.0",
|
|
295
288
|
"expand-template": "^2.0.3",
|
|
296
289
|
"github-from-package": "0.0.0",
|
|
297
290
|
"minimist": "^1.2.3",
|
|
298
291
|
"mkdirp-classic": "^0.5.3",
|
|
299
292
|
"napi-build-utils": "^1.0.1",
|
|
300
|
-
"node-abi": "^
|
|
293
|
+
"node-abi": "^3.3.0",
|
|
301
294
|
"npmlog": "^4.0.1",
|
|
302
295
|
"pump": "^3.0.0",
|
|
303
296
|
"rc": "^1.2.7",
|
|
304
|
-
"simple-get": "^
|
|
297
|
+
"simple-get": "^4.0.0",
|
|
305
298
|
"tar-fs": "^2.0.0",
|
|
306
299
|
"tunnel-agent": "^0.6.0"
|
|
300
|
+
},
|
|
301
|
+
"dependencies": {
|
|
302
|
+
"detect-libc": {
|
|
303
|
+
"version": "2.0.0",
|
|
304
|
+
"resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.0.0.tgz",
|
|
305
|
+
"integrity": "sha512-S55LzUl8HUav8l9E2PBTlC5PAJrHK7tkM+XXFGD+fbsbkTzhCpG6K05LxJcUOEWzMa4v6ptcMZ9s3fOdJDu0Zw=="
|
|
306
|
+
}
|
|
307
307
|
}
|
|
308
308
|
},
|
|
309
309
|
"process-nextick-args": {
|
|
@@ -364,16 +364,16 @@
|
|
|
364
364
|
"integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc="
|
|
365
365
|
},
|
|
366
366
|
"sharp": {
|
|
367
|
-
"version": "0.
|
|
368
|
-
"resolved": "https://registry.npmjs.org/sharp/-/sharp-0.
|
|
369
|
-
"integrity": "sha512-
|
|
367
|
+
"version": "0.29.3",
|
|
368
|
+
"resolved": "https://registry.npmjs.org/sharp/-/sharp-0.29.3.tgz",
|
|
369
|
+
"integrity": "sha512-fKWUuOw77E4nhpyzCCJR1ayrttHoFHBT2U/kR/qEMRhvPEcluG4BKj324+SCO1e84+knXHwhJ1HHJGnUt4ElGA==",
|
|
370
370
|
"requires": {
|
|
371
|
-
"color": "^
|
|
371
|
+
"color": "^4.0.1",
|
|
372
372
|
"detect-libc": "^1.0.3",
|
|
373
|
-
"node-addon-api": "^
|
|
374
|
-
"prebuild-install": "^
|
|
373
|
+
"node-addon-api": "^4.2.0",
|
|
374
|
+
"prebuild-install": "^7.0.0",
|
|
375
375
|
"semver": "^7.3.5",
|
|
376
|
-
"simple-get": "^
|
|
376
|
+
"simple-get": "^4.0.0",
|
|
377
377
|
"tar-fs": "^2.1.1",
|
|
378
378
|
"tunnel-agent": "^0.6.0"
|
|
379
379
|
}
|
|
@@ -389,11 +389,11 @@
|
|
|
389
389
|
"integrity": "sha512-cSFtAPtRhljv69IK0hTVZQ+OfE9nePi/rtJmw5UjHeVyVroEqJXP1sFztKUy1qU+xvz3u/sfYJLa947b7nAN2Q=="
|
|
390
390
|
},
|
|
391
391
|
"simple-get": {
|
|
392
|
-
"version": "
|
|
393
|
-
"resolved": "https://registry.npmjs.org/simple-get/-/simple-get-
|
|
394
|
-
"integrity": "sha512-
|
|
392
|
+
"version": "4.0.1",
|
|
393
|
+
"resolved": "https://registry.npmjs.org/simple-get/-/simple-get-4.0.1.tgz",
|
|
394
|
+
"integrity": "sha512-brv7p5WgH0jmQJr1ZDDfKDOSeWWg+OVypG99A/5vYGPqJ6pxiaHLy8nxtFjBA7oMa01ebA9gfh1uMCFqOuXxvA==",
|
|
395
395
|
"requires": {
|
|
396
|
-
"decompress-response": "^
|
|
396
|
+
"decompress-response": "^6.0.0",
|
|
397
397
|
"once": "^1.3.1",
|
|
398
398
|
"simple-concat": "^1.0.0"
|
|
399
399
|
}
|
package/dist/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@basemaps/lambda-tiler",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.20.0",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "https://github.com/linz/basemaps.git",
|
|
@@ -21,21 +21,21 @@
|
|
|
21
21
|
"types": "./build/index.d.ts",
|
|
22
22
|
"license": "MIT",
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"@basemaps/config": "^6.
|
|
24
|
+
"@basemaps/config": "^6.18.0",
|
|
25
25
|
"@basemaps/geo": "^6.10.0",
|
|
26
26
|
"@basemaps/lambda": "^6.7.0",
|
|
27
|
-
"@basemaps/shared": "^6.
|
|
28
|
-
"@basemaps/tiler": "^6.
|
|
29
|
-
"@basemaps/tiler-sharp": "^6.
|
|
30
|
-
"@chunkd/fs": "^
|
|
31
|
-
"@cogeotiff/core": "^6.
|
|
32
|
-
"@cotar/core": "^5.
|
|
27
|
+
"@basemaps/shared": "^6.20.0",
|
|
28
|
+
"@basemaps/tiler": "^6.20.0",
|
|
29
|
+
"@basemaps/tiler-sharp": "^6.20.0",
|
|
30
|
+
"@chunkd/fs": "^8.0.3",
|
|
31
|
+
"@cogeotiff/core": "^6.1.1",
|
|
32
|
+
"@cotar/core": "^5.1.1",
|
|
33
33
|
"@linzjs/geojson": "^6.10.0",
|
|
34
34
|
"@linzjs/lambda": "^2.0.0",
|
|
35
35
|
"p-limit": "^4.0.0",
|
|
36
36
|
"path-to-regexp": "^6.1.0",
|
|
37
37
|
"pixelmatch": "^5.1.0",
|
|
38
|
-
"sharp": "^0.
|
|
38
|
+
"sharp": "^0.29.3"
|
|
39
39
|
},
|
|
40
40
|
"bundle": {
|
|
41
41
|
"entry": "src/index.ts",
|
|
@@ -51,12 +51,12 @@
|
|
|
51
51
|
"bundle": "./bundle.sh"
|
|
52
52
|
},
|
|
53
53
|
"devDependencies": {
|
|
54
|
-
"@basemaps/attribution": "^6.
|
|
54
|
+
"@basemaps/attribution": "^6.17.0",
|
|
55
55
|
"@types/aws-lambda": "^8.10.75",
|
|
56
56
|
"@types/express": "^4.17.11",
|
|
57
57
|
"@types/node": "^14.11.2",
|
|
58
58
|
"@types/pixelmatch": "^5.0.0",
|
|
59
|
-
"@types/sharp": "^0.
|
|
59
|
+
"@types/sharp": "^0.29.3",
|
|
60
60
|
"express": "^4.17.1",
|
|
61
61
|
"pretty-json-log": "^1.0.0"
|
|
62
62
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@basemaps/lambda-tiler",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.20.0",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "https://github.com/linz/basemaps.git",
|
|
@@ -22,21 +22,21 @@
|
|
|
22
22
|
"types": "./build/index.d.ts",
|
|
23
23
|
"license": "MIT",
|
|
24
24
|
"dependencies": {
|
|
25
|
-
"@basemaps/config": "^6.
|
|
25
|
+
"@basemaps/config": "^6.18.0",
|
|
26
26
|
"@basemaps/geo": "^6.10.0",
|
|
27
27
|
"@basemaps/lambda": "^6.7.0",
|
|
28
|
-
"@basemaps/shared": "^6.
|
|
29
|
-
"@basemaps/tiler": "^6.
|
|
30
|
-
"@basemaps/tiler-sharp": "^6.
|
|
31
|
-
"@chunkd/fs": "^
|
|
32
|
-
"@cogeotiff/core": "^6.
|
|
33
|
-
"@cotar/core": "^5.
|
|
28
|
+
"@basemaps/shared": "^6.20.0",
|
|
29
|
+
"@basemaps/tiler": "^6.20.0",
|
|
30
|
+
"@basemaps/tiler-sharp": "^6.20.0",
|
|
31
|
+
"@chunkd/fs": "^8.0.3",
|
|
32
|
+
"@cogeotiff/core": "^6.1.1",
|
|
33
|
+
"@cotar/core": "^5.1.1",
|
|
34
34
|
"@linzjs/geojson": "^6.10.0",
|
|
35
35
|
"@linzjs/lambda": "^2.0.0",
|
|
36
36
|
"p-limit": "^4.0.0",
|
|
37
37
|
"path-to-regexp": "^6.1.0",
|
|
38
38
|
"pixelmatch": "^5.1.0",
|
|
39
|
-
"sharp": "^0.
|
|
39
|
+
"sharp": "^0.29.3"
|
|
40
40
|
},
|
|
41
41
|
"bundle": {
|
|
42
42
|
"entry": "src/index.ts",
|
|
@@ -52,14 +52,14 @@
|
|
|
52
52
|
"bundle": "./bundle.sh"
|
|
53
53
|
},
|
|
54
54
|
"devDependencies": {
|
|
55
|
-
"@basemaps/attribution": "^6.
|
|
55
|
+
"@basemaps/attribution": "^6.17.0",
|
|
56
56
|
"@types/aws-lambda": "^8.10.75",
|
|
57
57
|
"@types/express": "^4.17.11",
|
|
58
58
|
"@types/node": "^14.11.2",
|
|
59
59
|
"@types/pixelmatch": "^5.0.0",
|
|
60
|
-
"@types/sharp": "^0.
|
|
60
|
+
"@types/sharp": "^0.29.3",
|
|
61
61
|
"express": "^4.17.1",
|
|
62
62
|
"pretty-json-log": "^1.0.0"
|
|
63
63
|
},
|
|
64
|
-
"gitHead": "
|
|
64
|
+
"gitHead": "ca2a4b302477accd62e80f994d7ef12873808fe5"
|
|
65
65
|
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { Env } from '@basemaps/shared';
|
|
2
|
+
import o from 'ospec';
|
|
3
|
+
import { convertRelativeUrl } from '../routes/tile.style.json.js';
|
|
4
|
+
|
|
5
|
+
o.spec('TileStyleJson', () => {
|
|
6
|
+
const host = 'https://tiles.test';
|
|
7
|
+
let originalHost: string | undefined;
|
|
8
|
+
o.beforeEach(() => {
|
|
9
|
+
originalHost = process.env[Env.PublicUrlBase];
|
|
10
|
+
process.env[Env.PublicUrlBase] = host;
|
|
11
|
+
});
|
|
12
|
+
|
|
13
|
+
o.afterEach(() => {
|
|
14
|
+
process.env[Env.PublicUrlBase] = originalHost;
|
|
15
|
+
});
|
|
16
|
+
|
|
17
|
+
o('should not convert empty urls', () => {
|
|
18
|
+
o(convertRelativeUrl()).equals('');
|
|
19
|
+
o(convertRelativeUrl('')).equals('');
|
|
20
|
+
o(convertRelativeUrl(undefined)).equals('');
|
|
21
|
+
});
|
|
22
|
+
|
|
23
|
+
o('should only convert relative urls', () => {
|
|
24
|
+
o(convertRelativeUrl('/foo')).equals('https://tiles.test/foo');
|
|
25
|
+
o(convertRelativeUrl('/bar/baz/')).equals('https://tiles.test/bar/baz/');
|
|
26
|
+
});
|
|
27
|
+
|
|
28
|
+
o('should only convert with api keys', () => {
|
|
29
|
+
o(convertRelativeUrl('/foo', 'abc')).equals('https://tiles.test/foo?api=abc');
|
|
30
|
+
o(convertRelativeUrl('/bar/baz/', 'abc')).equals('https://tiles.test/bar/baz/?api=abc');
|
|
31
|
+
});
|
|
32
|
+
|
|
33
|
+
o('should convert with other query params', () => {
|
|
34
|
+
o(convertRelativeUrl('/foo?bar=baz', 'abc')).equals('https://tiles.test/foo?bar=baz&api=abc');
|
|
35
|
+
});
|
|
36
|
+
|
|
37
|
+
o('should not convert full urls', () => {
|
|
38
|
+
o(convertRelativeUrl('https://foo.com/foo?bar=baz', 'abc')).equals('https://foo.com/foo?bar=baz');
|
|
39
|
+
});
|
|
40
|
+
});
|