You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Routes for the Map-Sharer (although Map Receiver would use the DELETE route)
POST /mapShares { mapId: string }: create a map share, returns MapShare type. Data populated internally by the server (bounds, zoom, estimated size)
GET /mapShares/:shareId: get MapShare info for a shareId
GET /mapShares/:shareId/events: state change events, including bytesDownloaded for state: 'downloading' events.
GET /mapShares/:shareId/download: SMP file for share
DELETE /mapShares/:shareId: cancel / delete a map share
Routes for Map Receiver:
POST /downloads MapShare: start downloading a map share (or reject). Returns { downloadId: string }
GET /downloads/:downloadId: MapShare with current state.
GET /downloads/:downloadId/events: state change events, including bytesDownloaded
DELETE /downloads/:downloadId: cancel download
On Map-sharer side, frontend:
POST /mapShares to create the share
Call mapeoProject.members.sendMapShare(mapShare)
Listen on /mapShares/:shareId/events
To cancel DELETE /mapShares/:shareId
On Map-sharer side, Core backend:
project.members.sendMapShare(mapShare: MapShare) sends message as extension over project creator core
On Map-receiver side, frontend:
Listen on mapeoProject.on('map-share')
POST /downloads to start downloading or reject
listen on GET /downloads/:downloadId/events for progress
To cancel DELETE /downloads/:shareId
On Map-receiver side, backend:
Listen on project creator core for mapShare extension messages, then emit event map-share
The rest of the backend code will all be in the map server, e.g. in the map server on the receiver, POST /downloads will start a download from GET /mapShares/:mapShareId on the map-sharer, and stream events to any connections to GET /downloads/:downloadId/events
Next steps: Take a moment to review the security alert
above. Review the linked package source code to understand the potential
risk. Ensure the package is not malicious before proceeding. If you're
unsure how to proceed, reach out to your security team or ask the Socket
team for help at support@socket.dev.
Suggestion: Packages should not obfuscate their code. Consider not using packages with obfuscated code.
Mark the package as acceptable risk. To ignore this alert only
in this pull request, reply with the comment
@SocketSecurity ignore npm/safer-buffer@2.1.2. You can
also ignore all packages with @SocketSecurity ignore-all.
To ignore an alert for all future pull requests, use Socket's Dashboard to
change the triage state of this alert.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Routes for the Map-Sharer (although Map Receiver would use the DELETE route)
POST /mapShares { mapId: string }: create a map share, returnsMapSharetype. Data populated internally by the server (bounds, zoom, estimated size)GET /mapShares/:shareId: getMapShareinfo for a shareIdGET /mapShares/:shareId/events: state change events, includingbytesDownloadedforstate: 'downloading'events.GET /mapShares/:shareId/download: SMP file for shareDELETE /mapShares/:shareId: cancel / delete a map shareRoutes for Map Receiver:
POST /downloads MapShare: start downloading a map share (or reject). Returns{ downloadId: string }GET /downloads/:downloadId:MapSharewith current state.GET /downloads/:downloadId/events: state change events, includingbytesDownloadedDELETE /downloads/:downloadId: cancel downloadOn Map-sharer side, frontend:
POST /mapSharesto create the sharemapeoProject.members.sendMapShare(mapShare)/mapShares/:shareId/eventsDELETE /mapShares/:shareIdOn Map-sharer side, Core backend:
project.members.sendMapShare(mapShare: MapShare)sends message as extension over project creator coreOn Map-receiver side, frontend:
mapeoProject.on('map-share')POST /downloadsto start downloading or rejectGET /downloads/:downloadId/eventsfor progressDELETE /downloads/:shareIdOn Map-receiver side, backend:
map-shareThe rest of the backend code will all be in the map server, e.g. in the map server on the receiver,
POST /downloadswill start a download fromGET /mapShares/:mapShareIdon the map-sharer, and stream events to any connections toGET /downloads/:downloadId/events