
Research
Malicious npm Packages Impersonate Flashbots SDKs, Targeting Ethereum Wallet Credentials
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
tilestrata-postgresql
Advanced tools
Tilestrata plugin for serving the result of a custom SQL query as a tile
A TileStrata plugin for serving the result of a custom SQL query as a tile when you need more control of the query than tilestrata-postgis-geojson-tiles or tilestrata-postgismvt.
sql
(function, required): method that returns a PostGIS query that will be executed. Be sure to protect against sql injection if doing dynamic filtering based on the request query string. The query can contain the following tokens:
{bbox}
(box2d): the tile bounding box{buffered_bbox}
(box2d): the buffered tile bounding box (uses config.buffer
){bbox_3857}
(box2d): the tile bounding box in Web Mercator Projection (EPSG:3857){buffered_bbox_3857}
(box2d): the buffered tile bounding box (uses config.buffer
) in Web Mercator Projection (EPSG:3857){z}
(int) : the tile zoom level{y}
(int) : the tile y coordinate{x}
(int) : the tile x coordinatepgConfig
(object, required): postgres connection options
{host}
(string){password}
(string){user}
(string){port}
(string){database}
(string)contentType
(string, required): result MIME type (eg. application/x-protobuf
)formatResults
(function, required): method that returns a string or buffer when given a list of rowsvar tilestrataPostgreSQL = require('tilestrata-postgresql');
var layer = server.layer('vector-tiles', {minZoom: 5, maxZoom: 14});
// .../vector-tiles/tile.pbf
layer
.route('tile.pbf')
.use(headers({
'Access-Control-Allow-Origin': '*'
}))
.use(tilestrataPostgreSQL({
contentType: 'application/x-protobuf',
sql: function(server, req) {
return "SELECT ST_AsMVT(q, 'layername') AS tile FROM ( SELECT id, name, ST_AsMVTGeom(ST_Transform(geometry, 3857), {bbox_3857}, 4096, 256, true) FROM tablename WHERE ST_Intersects(geom, {bbox}) ) q";
},
formatResults: function(rows) {
return rows[0] && rows[0].tile
},
pgConfig: {
username: 'postgres',
password: 'password',
host: 'localhost',
port: '5432',
database: 'postgres'
}
}));
FAQs
Tilestrata plugin for serving the result of a custom SQL query as a tile
The npm package tilestrata-postgresql receives a total of 0 weekly downloads. As such, tilestrata-postgresql popularity was classified as not popular.
We found that tilestrata-postgresql demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
Security News
Ruby maintainers from Bundler and rbenv teams are building rv to bring Python uv's speed and unified tooling approach to Ruby development.
Security News
Following last week’s supply chain attack, Nx published findings on the GitHub Actions exploit and moved npm publishing to Trusted Publishers.