fix(deps): Bump pmtiles from 2.11.0 to 3.0.0 (#1161)
* fix(deps): Bump pmtiles from 2.11.0 to 3.0.0 Bumps [pmtiles](https://github.com/protomaps/pmtiles) from 2.11.0 to 3.0.0. - [Commits](https://github.com/protomaps/pmtiles/commits) --- updated-dependencies: - dependency-name: pmtiles dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> * fix: update for named imports --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Andrew Calcutt <acalcutt@techidiots.net>
This commit is contained in:
parent
e52dab78a6
commit
300925d432
3 changed files with 23 additions and 9 deletions
22
package-lock.json
generated
22
package-lock.json
generated
|
@ -30,7 +30,7 @@
|
||||||
"http-shutdown": "1.2.2",
|
"http-shutdown": "1.2.2",
|
||||||
"morgan": "1.10.0",
|
"morgan": "1.10.0",
|
||||||
"pbf": "3.2.1",
|
"pbf": "3.2.1",
|
||||||
"pmtiles": "2.11.0",
|
"pmtiles": "3.0.0",
|
||||||
"proj4": "2.10.0",
|
"proj4": "2.10.0",
|
||||||
"sanitize-filename": "1.6.3",
|
"sanitize-filename": "1.6.3",
|
||||||
"sharp": "0.33.2",
|
"sharp": "0.33.2",
|
||||||
|
@ -1416,12 +1416,25 @@
|
||||||
"node": ">= 6"
|
"node": ">= 6"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/@types/geojson": {
|
||||||
|
"version": "7946.0.14",
|
||||||
|
"resolved": "https://registry.npmjs.org/@types/geojson/-/geojson-7946.0.14.tgz",
|
||||||
|
"integrity": "sha512-WCfD5Ht3ZesJUsONdhvm84dmzWOiOzOAqOncN0++w0lBw1o8OuDNJF2McvvCef/yBqb/HYRahp1BYtODFQ8bRg=="
|
||||||
|
},
|
||||||
"node_modules/@types/json-schema": {
|
"node_modules/@types/json-schema": {
|
||||||
"version": "7.0.15",
|
"version": "7.0.15",
|
||||||
"resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.15.tgz",
|
"resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.15.tgz",
|
||||||
"integrity": "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==",
|
"integrity": "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
|
"node_modules/@types/leaflet": {
|
||||||
|
"version": "1.9.8",
|
||||||
|
"resolved": "https://registry.npmjs.org/@types/leaflet/-/leaflet-1.9.8.tgz",
|
||||||
|
"integrity": "sha512-EXdsL4EhoUtGm2GC2ZYtXn+Fzc6pluVgagvo2VC1RHWToLGlTRwVYoDpqS/7QXa01rmDyBjJk3Catpf60VMkwg==",
|
||||||
|
"dependencies": {
|
||||||
|
"@types/geojson": "*"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/@types/minimist": {
|
"node_modules/@types/minimist": {
|
||||||
"version": "1.2.2",
|
"version": "1.2.2",
|
||||||
"resolved": "https://registry.npmjs.org/@types/minimist/-/minimist-1.2.2.tgz",
|
"resolved": "https://registry.npmjs.org/@types/minimist/-/minimist-1.2.2.tgz",
|
||||||
|
@ -6694,10 +6707,11 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/pmtiles": {
|
"node_modules/pmtiles": {
|
||||||
"version": "2.11.0",
|
"version": "3.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/pmtiles/-/pmtiles-2.11.0.tgz",
|
"resolved": "https://registry.npmjs.org/pmtiles/-/pmtiles-3.0.0.tgz",
|
||||||
"integrity": "sha512-dU9SzzaqmCGpdEuTnIba6bDHT6j09ZJFIXxwGpvkiEnce3ZnBB1VKt6+EOmJGueriweaZLAMTUmKVElU2CBe0g==",
|
"integrity": "sha512-rVOKfapQklKtmXQvDeOS2Zjci1oDO0U5H8Vr/LDPVWKmuZr3cqbG2XVQMi6xmB8vdCj4cHER9M3GH8U18xUB+g==",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
"@types/leaflet": "^1.9.8",
|
||||||
"fflate": "^0.8.0"
|
"fflate": "^0.8.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
@ -39,7 +39,7 @@
|
||||||
"http-shutdown": "1.2.2",
|
"http-shutdown": "1.2.2",
|
||||||
"morgan": "1.10.0",
|
"morgan": "1.10.0",
|
||||||
"pbf": "3.2.1",
|
"pbf": "3.2.1",
|
||||||
"pmtiles": "2.11.0",
|
"pmtiles": "3.0.0",
|
||||||
"proj4": "2.10.0",
|
"proj4": "2.10.0",
|
||||||
"sanitize-filename": "1.6.3",
|
"sanitize-filename": "1.6.3",
|
||||||
"sharp": "0.33.2",
|
"sharp": "0.33.2",
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import fs from 'node:fs';
|
import fs from 'node:fs';
|
||||||
import PMTiles from 'pmtiles';
|
import { PMTiles, FetchSource } from 'pmtiles';
|
||||||
import { isValidHttpUrl } from './utils.js';
|
import { isValidHttpUrl } from './utils.js';
|
||||||
|
|
||||||
class PMTilesFileSource {
|
class PMTilesFileSource {
|
||||||
|
@ -45,12 +45,12 @@ export function openPMtiles(FilePath) {
|
||||||
let pmtiles = undefined;
|
let pmtiles = undefined;
|
||||||
|
|
||||||
if (isValidHttpUrl(FilePath)) {
|
if (isValidHttpUrl(FilePath)) {
|
||||||
const source = new PMTiles.FetchSource(FilePath);
|
const source = new FetchSource(FilePath);
|
||||||
pmtiles = new PMTiles.PMTiles(source);
|
pmtiles = new PMTiles(source);
|
||||||
} else {
|
} else {
|
||||||
const fd = fs.openSync(FilePath, 'r');
|
const fd = fs.openSync(FilePath, 'r');
|
||||||
const source = new PMTilesFileSource(fd);
|
const source = new PMTilesFileSource(fd);
|
||||||
pmtiles = new PMTiles.PMTiles(source);
|
pmtiles = new PMTiles(source);
|
||||||
}
|
}
|
||||||
return pmtiles;
|
return pmtiles;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue