tileblaster 1.0.14 → 1.1.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/builtins/check.js CHANGED
@@ -123,7 +123,7 @@ module.exports = function({ req, res, opts, data }, next, skip){
123
123
  if (opts.extensions.length > 0 && !opts.extensions.includes(data.req.params.e) && !opts.extensions.includes(data.req.params.f)) return abort(new Error("illegal extension."));
124
124
 
125
125
  // check density
126
- if (opts.density && !opts.density.includes(data.req.params.d) && !opts.density.includes(data.req.params.f)) return abort(new Error("illegal density marker."));
126
+ if (opts.density && !opts.density.includes(data.req.params.d) && !opts.density.includes(data.req.params.r||null)) return abort(new Error("illegal density marker."));
127
127
 
128
128
  // all passed
129
129
  next();
package/builtins/parse.js CHANGED
@@ -27,6 +27,8 @@ module.exports = function({ req, res, opts, data }, next){
27
27
  return languages.indexOf(lang) === i;
28
28
  });
29
29
 
30
+ // FIXME chack number of steps in case of index
31
+
30
32
  // get params from steps
31
33
  data.req.params = {
32
34
  m: data.map,
@@ -45,7 +45,7 @@ module.exports = function({ req, res, opts, data }, next){
45
45
  // set subdomain if configured
46
46
  if (opts.subdomains) params.s = opts.subdomains[ Date.now() % opts.subdomains.length ];
47
47
 
48
- const tileurl = strtpl(opts.url, params);
48
+ const tileurl = (typeof opts.url === "function") ? opts.url(params) : strtpl(opts.url, params);
49
49
 
50
50
  // FIXME check fails cache
51
51
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tileblaster",
3
- "version": "1.0.14",
3
+ "version": "1.1.1",
4
4
  "description": "a quick and versatile map tile caching proxy",
5
5
  "main": "tileblaster.js",
6
6
  "bin": {
@@ -26,8 +26,8 @@
26
26
  "klaw": "^4.1.0",
27
27
  "minimist": "^1.2.8",
28
28
  "node-watch": "^0.7.4",
29
- "phn": "^0.0.3",
30
- "quu": "^0.4.3"
29
+ "phn": "^0.1.1",
30
+ "quu": "^0.5.0"
31
31
  },
32
32
  "optionalDependencies": {
33
33
  "fzstd": "^0.1.1",
@@ -36,7 +36,7 @@
36
36
  "node-liblzma": "^1.1.9",
37
37
  "optipng-js": "^0.1.2",
38
38
  "pmtiles": "^2.11.0",
39
- "sharp": "^0.33.4",
39
+ "sharp": "^0.34.1",
40
40
  "versatiles": "^0.3.1",
41
41
  "vtt": "^0.0.3"
42
42
  },