mirror of
https://github.com/maptiler/tileserver-gl.git
synced 2024-10-26 05:48:41 +03:00
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
22
package-lock.json
generated
22
package-lock.json
generated
@ -30,7 +30,7 @@
|
||||
"http-shutdown": "1.2.2",
|
||||
"morgan": "1.10.0",
|
||||
"pbf": "3.2.1",
|
||||
"pmtiles": "2.11.0",
|
||||
"pmtiles": "3.0.0",
|
||||
"proj4": "2.10.0",
|
||||
"sanitize-filename": "1.6.3",
|
||||
"sharp": "0.33.2",
|
||||
@ -1416,12 +1416,25 @@
|
||||
"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": {
|
||||
"version": "7.0.15",
|
||||
"resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.15.tgz",
|
||||
"integrity": "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==",
|
||||
"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": {
|
||||
"version": "1.2.2",
|
||||
"resolved": "https://registry.npmjs.org/@types/minimist/-/minimist-1.2.2.tgz",
|
||||
@ -6694,10 +6707,11 @@
|
||||
}
|
||||
},
|
||||
"node_modules/pmtiles": {
|
||||
"version": "2.11.0",
|
||||
"resolved": "https://registry.npmjs.org/pmtiles/-/pmtiles-2.11.0.tgz",
|
||||
"integrity": "sha512-dU9SzzaqmCGpdEuTnIba6bDHT6j09ZJFIXxwGpvkiEnce3ZnBB1VKt6+EOmJGueriweaZLAMTUmKVElU2CBe0g==",
|
||||
"version": "3.0.0",
|
||||
"resolved": "https://registry.npmjs.org/pmtiles/-/pmtiles-3.0.0.tgz",
|
||||
"integrity": "sha512-rVOKfapQklKtmXQvDeOS2Zjci1oDO0U5H8Vr/LDPVWKmuZr3cqbG2XVQMi6xmB8vdCj4cHER9M3GH8U18xUB+g==",
|
||||
"dependencies": {
|
||||
"@types/leaflet": "^1.9.8",
|
||||
"fflate": "^0.8.0"
|
||||
}
|
||||
},
|
||||
|
@ -39,7 +39,7 @@
|
||||
"http-shutdown": "1.2.2",
|
||||
"morgan": "1.10.0",
|
||||
"pbf": "3.2.1",
|
||||
"pmtiles": "2.11.0",
|
||||
"pmtiles": "3.0.0",
|
||||
"proj4": "2.10.0",
|
||||
"sanitize-filename": "1.6.3",
|
||||
"sharp": "0.33.2",
|
||||
|
@ -1,5 +1,5 @@
|
||||
import fs from 'node:fs';
|
||||
import PMTiles from 'pmtiles';
|
||||
import { PMTiles, FetchSource } from 'pmtiles';
|
||||
import { isValidHttpUrl } from './utils.js';
|
||||
|
||||
class PMTilesFileSource {
|
||||
@ -45,12 +45,12 @@ export function openPMtiles(FilePath) {
|
||||
let pmtiles = undefined;
|
||||
|
||||
if (isValidHttpUrl(FilePath)) {
|
||||
const source = new PMTiles.FetchSource(FilePath);
|
||||
pmtiles = new PMTiles.PMTiles(source);
|
||||
const source = new FetchSource(FilePath);
|
||||
pmtiles = new PMTiles(source);
|
||||
} else {
|
||||
const fd = fs.openSync(FilePath, 'r');
|
||||
const source = new PMTilesFileSource(fd);
|
||||
pmtiles = new PMTiles.PMTiles(source);
|
||||
pmtiles = new PMTiles(source);
|
||||
}
|
||||
return pmtiles;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user