tileblaster 1.0.8 → 1.0.10

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.
@@ -84,7 +84,7 @@ if (worker.isMainThread) {
84
84
  });
85
85
 
86
86
  // check if there are jobs
87
- if (jobs.length === 0) return debug.warn("Nothing to optimize for '%s': -%db", data.tile.path.magenta), next();
87
+ if (jobs.length === 0) return debug.warn("Nothing to optimize for '%s': -%db", (data.tile.path||"").magenta), next();
88
88
 
89
89
  // execute
90
90
  Promise.allSettled(jobs).then(function(){
package/lib/retrieve.js CHANGED
@@ -1,4 +1,4 @@
1
- const phin = require("phin");
1
+ const phn = require("phn");
2
2
 
3
3
  // prepare agents with keepalive enabled
4
4
  const agents = {
@@ -6,10 +6,10 @@ const agents = {
6
6
  https: new require("node:https").Agent({ keepAlive: true }),
7
7
  };
8
8
 
9
- // agentify phin
10
- const retrieve = module.exports = async function retrieve(opts, fn) {
9
+ // agentify phn
10
+ const retrieve = module.exports = async function retrieve(opts) {
11
11
  if (typeof opts === "string") opts = { url: opts }; // ensure opts is object
12
12
  if (!opts.hasOwnProperty("core")) opts.core = {}; // ensure core is present
13
13
  if (!opts.core.hasOwnProperty("agent")) opts.core.agent = agents[opts.url.slice(0,opts.url.indexOf(":"))]; // set agent by protocol
14
- return phin(opts, fn);
14
+ return phn(opts);
15
15
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tileblaster",
3
- "version": "1.0.8",
3
+ "version": "1.0.10",
4
4
  "description": "a quick and versatile map tile caching proxy",
5
5
  "main": "tileblaster.js",
6
6
  "bin": {
@@ -26,7 +26,7 @@
26
26
  "klaw": "^4.1.0",
27
27
  "minimist": "^1.2.8",
28
28
  "node-watch": "^0.7.4",
29
- "phin": "^3.7.0",
29
+ "phn": "^0.0.1",
30
30
  "quu": "^0.4.3"
31
31
  },
32
32
  "optionalDependencies": {
@@ -35,8 +35,8 @@
35
35
  "mbg": "^0.0.2",
36
36
  "node-liblzma": "^1.1.9",
37
37
  "optipng-js": "^0.1.2",
38
- "pmtiles": "^2.10.0",
39
- "sharp": "^0.32.4",
38
+ "pmtiles": "^2.11.0",
39
+ "sharp": "^0.33.2",
40
40
  "versatiles": "^0.3.1",
41
41
  "vtt": "^0.0.3"
42
42
  },