-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat!: simplify fastify maps plugin and add support for styled map packages #896
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me, let's merge once tests are passing.
I do agree with the original intention of keeping the plugin outside of MapeoManager, for the sake of separation of concerns, however in practice that would mean more of a tangle to expose getMapStyleJsonUrl()
to the client. We're going to swap this out anyway for MapManager in the future, so I think it's more practical to take the easy route (e.g. code in this PR) for now, and deal with separation of concerns once we have the map manager.
|
Status | Count |
---|---|
74 | |
9 |
Click to toggle table visibility
Name | Status | Previous | Current |
---|---|---|---|
@comapeo/fallback-smp |
- | 1.0.0 | |
@fastify/static |
7.0.3 | 7.0.4 | |
@mapbox/jsonlint-lines-primitives |
- | 2.0.2 | |
@mapbox/sphericalmercator |
- | 1.2.0 | |
@mapbox/unitbezier |
- | 0.0.1 | |
@maplibre/maplibre-gl-style-spec |
- | 20.3.1 | |
@placemarkio/check-geojson |
- | 0.1.12 | |
@turf/bbox |
- | 7.1.0 | |
@turf/helpers |
- | 7.1.0 | |
@turf/meta |
- | 7.1.0 | |
@types/geojson |
- | 7946.0.14 | |
ansi-diff |
- | 1.2.0 | |
ansi-split |
- | 1.0.1 | |
archiver-utils |
- | 5.0.2 | |
archiver |
- | 7.0.1 | |
arr-union |
- | 3.1.0 | |
assign-symbols |
- | 1.0.0 | |
async |
- | 3.2.6 | |
buffer-peek-stream |
- | 1.1.0 | |
bundle-name |
- | 4.1.0 | |
bytewise-core |
- | 1.2.3 | |
bytewise |
- | 1.1.0 | |
cli-spinners |
- | 2.9.2 | |
compress-commons |
- | 6.0.2 | |
core-util-is |
- | 1.0.3 | |
crc-32 |
- | 1.2.2 | |
crc32-stream |
- | 6.0.0 | |
default-browser-id |
- | 5.0.0 | |
default-browser |
- | 5.2.1 | |
defaults |
- | 1.0.4 | |
define-lazy-prop |
- | 3.0.0 | |
extend-shallow |
- | 2.0.1 | |
fastify |
4.26.2 | 4.28.1 | |
filter-obj |
- | 6.1.0 | |
get-east-asian-width |
- | 1.2.0 | |
get-value |
- | 2.0.6 | |
into-stream |
- | 8.0.1 | |
is-docker |
- | 3.0.0 | |
is-extendable |
- | 0.1.1 | |
is-inside-container |
- | 1.0.0 | |
is-interactive |
- | 2.0.0 | |
is-plain-object |
- | 2.0.4 | |
is-unicode-supported |
- | 2.1.0 | |
is-wsl |
- | 3.1.0 | |
isobject |
- | 3.0.1 | |
json-stringify-pretty-compact |
- | 4.0.0 | |
ky |
- | 1.7.2 | |
lazystream |
- | 1.0.1 | |
log-symbols |
- | 7.0.0 | |
mimic-function |
- | 5.0.1 | |
minimist |
1.2.7 | 1.2.8 | |
normalize-path |
- | 3.0.0 | |
open |
- | 10.1.0 | |
ora |
- | 8.1.0 | |
package-json-from-dist |
- | 1.0.1 | |
parse-ms |
- | 4.0.0 | |
pino-abstract-transport |
1.1.0 | 1.2.0 | |
pino-std-serializers |
6.2.2 | 7.0.0 | |
pino |
8.20.0 | 9.4.0 | |
pretty-bytes |
- | 6.1.1 | |
pretty-ms |
- | 9.1.0 | |
process-nextick-args |
- | 2.0.1 | |
quickselect |
- | 2.0.0 | |
readdir-glob |
- | 1.1.3 | |
run-applescript |
- | 7.0.0 | |
rw |
- | 1.3.3 | |
safe-stable-stringify |
2.4.3 | 2.5.0 | |
set-value |
- | 2.0.1 | |
sonic-boom |
3.8.1 | 4.1.0 | |
sort-asc |
- | 0.2.0 | |
sort-desc |
- | 0.2.0 | |
sort-object |
- | 3.0.3 | |
split-string |
- | 3.1.0 | |
stdin-discarder |
- | 0.2.2 | |
styled-map-package |
- | 1.1.0 | |
thread-stream |
2.4.1 | 3.1.0 | |
tinyqueue |
- | 3.0.0 | |
typewise-core |
- | 1.2.0 | |
typewise |
- | 1.0.3 | |
union-value |
- | 1.0.1 | |
wcwidth |
- | 1.0.1 | |
yoctocolors |
- | 2.1.1 | |
zip-stream |
- | 6.0.1 |
|
Status | Count |
---|---|
74 | |
9 |
Click to toggle table visibility
Name | Status | Previous | Current |
---|---|---|---|
@comapeo/fallback-smp |
- | 1.0.0 | |
@fastify/static |
7.0.3 | 7.0.4 | |
@mapbox/jsonlint-lines-primitives |
- | 2.0.2 | |
@mapbox/sphericalmercator |
- | 1.2.0 | |
@mapbox/unitbezier |
- | 0.0.1 | |
@maplibre/maplibre-gl-style-spec |
- | 20.3.1 | |
@placemarkio/check-geojson |
- | 0.1.12 | |
@turf/bbox |
- | 7.1.0 | |
@turf/helpers |
- | 7.1.0 | |
@turf/meta |
- | 7.1.0 | |
@types/geojson |
- | 7946.0.14 | |
ansi-diff |
- | 1.2.0 | |
ansi-split |
- | 1.0.1 | |
archiver-utils |
- | 5.0.2 | |
archiver |
- | 7.0.1 | |
arr-union |
- | 3.1.0 | |
assign-symbols |
- | 1.0.0 | |
async |
- | 3.2.6 | |
buffer-peek-stream |
- | 1.1.0 | |
bundle-name |
- | 4.1.0 | |
bytewise-core |
- | 1.2.3 | |
bytewise |
- | 1.1.0 | |
cli-spinners |
- | 2.9.2 | |
compress-commons |
- | 6.0.2 | |
core-util-is |
- | 1.0.3 | |
crc-32 |
- | 1.2.2 | |
crc32-stream |
- | 6.0.0 | |
default-browser-id |
- | 5.0.0 | |
default-browser |
- | 5.2.1 | |
defaults |
- | 1.0.4 | |
define-lazy-prop |
- | 3.0.0 | |
extend-shallow |
- | 2.0.1 | |
fastify |
4.26.2 | 4.28.1 | |
filter-obj |
- | 6.1.0 | |
get-east-asian-width |
- | 1.2.0 | |
get-value |
- | 2.0.6 | |
into-stream |
- | 8.0.1 | |
is-docker |
- | 3.0.0 | |
is-extendable |
- | 0.1.1 | |
is-inside-container |
- | 1.0.0 | |
is-interactive |
- | 2.0.0 | |
is-plain-object |
- | 2.0.4 | |
is-unicode-supported |
- | 2.1.0 | |
is-wsl |
- | 3.1.0 | |
isobject |
- | 3.0.1 | |
json-stringify-pretty-compact |
- | 4.0.0 | |
ky |
- | 1.7.2 | |
lazystream |
- | 1.0.1 | |
log-symbols |
- | 7.0.0 | |
mimic-function |
- | 5.0.1 | |
minimist |
1.2.7 | 1.2.8 | |
normalize-path |
- | 3.0.0 | |
open |
- | 10.1.0 | |
ora |
- | 8.1.0 | |
package-json-from-dist |
- | 1.0.1 | |
parse-ms |
- | 4.0.0 | |
pino-abstract-transport |
1.1.0 | 1.2.0 | |
pino-std-serializers |
6.2.2 | 7.0.0 | |
pino |
8.20.0 | 9.4.0 | |
pretty-bytes |
- | 6.1.1 | |
pretty-ms |
- | 9.1.0 | |
process-nextick-args |
- | 2.0.1 | |
quickselect |
- | 2.0.0 | |
readdir-glob |
- | 1.1.3 | |
run-applescript |
- | 7.0.0 | |
rw |
- | 1.3.3 | |
safe-stable-stringify |
2.4.3 | 2.5.0 | |
set-value |
- | 2.0.1 | |
sonic-boom |
3.8.1 | 4.1.0 | |
sort-asc |
- | 0.2.0 | |
sort-desc |
- | 0.2.0 | |
sort-object |
- | 3.0.3 | |
split-string |
- | 3.1.0 | |
stdin-discarder |
- | 0.2.2 | |
styled-map-package |
- | 1.1.0 | |
thread-stream |
2.4.1 | 3.1.0 | |
tinyqueue |
- | 3.0.0 | |
typewise-core |
- | 1.2.0 | |
typewise |
- | 1.0.3 | |
union-value |
- | 1.0.1 | |
wcwidth |
- | 1.0.1 | |
yoctocolors |
- | 2.1.1 | |
zip-stream |
- | 6.0.1 |
abcd13e
to
fa6b4a2
Compare
|
Status | Count |
---|---|
74 | |
9 |
Click to toggle table visibility
Name | Status | Previous | Current |
---|---|---|---|
@comapeo/fallback-smp |
- | 1.0.0 | |
@fastify/static |
7.0.3 | 7.0.4 | |
@mapbox/jsonlint-lines-primitives |
- | 2.0.2 | |
@mapbox/sphericalmercator |
- | 1.2.0 | |
@mapbox/unitbezier |
- | 0.0.1 | |
@maplibre/maplibre-gl-style-spec |
- | 20.3.1 | |
@placemarkio/check-geojson |
- | 0.1.12 | |
@turf/bbox |
- | 7.1.0 | |
@turf/helpers |
- | 7.1.0 | |
@turf/meta |
- | 7.1.0 | |
@types/geojson |
- | 7946.0.14 | |
ansi-diff |
- | 1.2.0 | |
ansi-split |
- | 1.0.1 | |
archiver-utils |
- | 5.0.2 | |
archiver |
- | 7.0.1 | |
arr-union |
- | 3.1.0 | |
assign-symbols |
- | 1.0.0 | |
async |
- | 3.2.6 | |
buffer-peek-stream |
- | 1.1.0 | |
bundle-name |
- | 4.1.0 | |
bytewise-core |
- | 1.2.3 | |
bytewise |
- | 1.1.0 | |
cli-spinners |
- | 2.9.2 | |
compress-commons |
- | 6.0.2 | |
core-util-is |
- | 1.0.3 | |
crc-32 |
- | 1.2.2 | |
crc32-stream |
- | 6.0.0 | |
default-browser-id |
- | 5.0.0 | |
default-browser |
- | 5.2.1 | |
defaults |
- | 1.0.4 | |
define-lazy-prop |
- | 3.0.0 | |
extend-shallow |
- | 2.0.1 | |
fastify |
4.26.2 | 4.28.1 | |
filter-obj |
- | 6.1.0 | |
get-east-asian-width |
- | 1.2.0 | |
get-value |
- | 2.0.6 | |
into-stream |
- | 8.0.1 | |
is-docker |
- | 3.0.0 | |
is-extendable |
- | 0.1.1 | |
is-inside-container |
- | 1.0.0 | |
is-interactive |
- | 2.0.0 | |
is-plain-object |
- | 2.0.4 | |
is-unicode-supported |
- | 2.1.0 | |
is-wsl |
- | 3.1.0 | |
isobject |
- | 3.0.1 | |
json-stringify-pretty-compact |
- | 4.0.0 | |
ky |
- | 1.7.2 | |
lazystream |
- | 1.0.1 | |
log-symbols |
- | 7.0.0 | |
mimic-function |
- | 5.0.1 | |
minimist |
1.2.7 | 1.2.8 | |
normalize-path |
- | 3.0.0 | |
open |
- | 10.1.0 | |
ora |
- | 8.1.0 | |
package-json-from-dist |
- | 1.0.1 | |
parse-ms |
- | 4.0.0 | |
pino-abstract-transport |
1.1.0 | 1.2.0 | |
pino-std-serializers |
6.2.2 | 7.0.0 | |
pino |
8.20.0 | 9.4.0 | |
pretty-bytes |
- | 6.1.1 | |
pretty-ms |
- | 9.1.0 | |
process-nextick-args |
- | 2.0.1 | |
quickselect |
- | 2.0.0 | |
readdir-glob |
- | 1.1.3 | |
run-applescript |
- | 7.0.0 | |
rw |
- | 1.3.3 | |
safe-stable-stringify |
2.4.3 | 2.5.0 | |
set-value |
- | 2.0.1 | |
sonic-boom |
3.8.1 | 4.1.0 | |
sort-asc |
- | 0.2.0 | |
sort-desc |
- | 0.2.0 | |
sort-object |
- | 3.0.3 | |
split-string |
- | 3.1.0 | |
stdin-discarder |
- | 0.2.2 | |
styled-map-package |
- | 1.1.0 | |
thread-stream |
2.4.1 | 3.1.0 | |
tinyqueue |
- | 3.0.0 | |
typewise-core |
- | 1.2.0 | |
typewise |
- | 1.0.3 | |
union-value |
- | 1.0.1 | |
wcwidth |
- | 1.0.1 | |
yoctocolors |
- | 2.1.1 | |
zip-stream |
- | 6.0.1 |
|
Status | Count |
---|---|
74 | |
9 | |
1 |
Click to toggle table visibility
Name | Status | Previous | Current |
---|---|---|---|
@comapeo/fallback-smp |
- | 1.0.0 | |
@electron/asar |
3.2.9 | - | |
@fastify/static |
7.0.3 | 7.0.4 | |
@mapbox/jsonlint-lines-primitives |
- | 2.0.2 | |
@mapbox/sphericalmercator |
- | 1.2.0 | |
@mapbox/unitbezier |
- | 0.0.1 | |
@maplibre/maplibre-gl-style-spec |
- | 20.3.1 | |
@placemarkio/check-geojson |
- | 0.1.12 | |
@turf/bbox |
- | 7.1.0 | |
@turf/helpers |
- | 7.1.0 | |
@turf/meta |
- | 7.1.0 | |
@types/geojson |
- | 7946.0.14 | |
ansi-diff |
- | 1.2.0 | |
ansi-split |
- | 1.0.1 | |
archiver-utils |
- | 5.0.2 | |
archiver |
- | 7.0.1 | |
arr-union |
- | 3.1.0 | |
assign-symbols |
- | 1.0.0 | |
async |
- | 3.2.6 | |
buffer-peek-stream |
- | 1.1.0 | |
bundle-name |
- | 4.1.0 | |
bytewise-core |
- | 1.2.3 | |
bytewise |
- | 1.1.0 | |
cli-spinners |
- | 2.9.2 | |
compress-commons |
- | 6.0.2 | |
core-util-is |
- | 1.0.3 | |
crc-32 |
- | 1.2.2 | |
crc32-stream |
- | 6.0.0 | |
default-browser-id |
- | 5.0.0 | |
default-browser |
- | 5.2.1 | |
defaults |
- | 1.0.4 | |
define-lazy-prop |
- | 3.0.0 | |
extend-shallow |
- | 2.0.1 | |
fastify |
4.26.2 | 4.28.1 | |
filter-obj |
- | 6.1.0 | |
get-east-asian-width |
- | 1.2.0 | |
get-value |
- | 2.0.6 | |
into-stream |
- | 8.0.1 | |
is-docker |
- | 3.0.0 | |
is-extendable |
- | 0.1.1 | |
is-inside-container |
- | 1.0.0 | |
is-interactive |
- | 2.0.0 | |
is-plain-object |
- | 2.0.4 | |
is-unicode-supported |
- | 2.1.0 | |
is-wsl |
- | 3.1.0 | |
isobject |
- | 3.0.1 | |
json-stringify-pretty-compact |
- | 4.0.0 | |
ky |
- | 1.7.2 | |
lazystream |
- | 1.0.1 | |
log-symbols |
- | 7.0.0 | |
mimic-function |
- | 5.0.1 | |
minimist |
1.2.7 | 1.2.8 | |
normalize-path |
- | 3.0.0 | |
open |
- | 10.1.0 | |
ora |
- | 8.1.0 | |
package-json-from-dist |
- | 1.0.1 | |
parse-ms |
- | 4.0.0 | |
pino-abstract-transport |
1.1.0 | 1.2.0 | |
pino-std-serializers |
6.2.2 | 7.0.0 | |
pino |
8.20.0 | 9.4.0 | |
pretty-bytes |
- | 6.1.1 | |
pretty-ms |
- | 9.1.0 | |
process-nextick-args |
- | 2.0.1 | |
quickselect |
- | 2.0.0 | |
readdir-glob |
- | 1.1.3 | |
run-applescript |
- | 7.0.0 | |
rw |
- | 1.3.3 | |
safe-stable-stringify |
2.4.3 | 2.5.0 | |
set-value |
- | 2.0.1 | |
sonic-boom |
3.8.1 | 4.1.0 | |
sort-asc |
- | 0.2.0 | |
sort-desc |
- | 0.2.0 | |
sort-object |
- | 3.0.3 | |
split-string |
- | 3.1.0 | |
stdin-discarder |
- | 0.2.2 | |
styled-map-package |
- | 1.1.0 | |
thread-stream |
2.4.1 | 3.1.0 | |
tinyqueue |
- | 3.0.0 | |
typewise-core |
- | 1.2.0 | |
typewise |
- | 1.0.3 | |
union-value |
- | 1.0.1 | |
wcwidth |
- | 1.0.1 | |
yoctocolors |
- | 2.1.1 | |
zip-stream |
- | 6.0.1 |
Towards #827
Paired on much of this with @gmaclennan
Leaving as a draft because tests will fail, as the changes rely on publishing a new version of
styled-map-package
.Important notes:
StaticMapPlugin
in favor of using the StyledMapPackage plugin to handle serving a local custom mapOfflineFallbackMapPlugin
in favor of using the StyledMapPackage plugin to handle serving the SMP provided by@comapeo/fallback-smp
MapeoMapsPlugin
due to the removal of the the other plugins.MapeoManager
constructor, all of which are optional:customMapPath
: file path to a local SMP file used for the local custom mapfallbackMapPath
: file path to a local SMP file used for the offline fallback mapdefaultOnlineStyleUrl
: url to online-hosted StyleJSON