dump-tile 1.0.0 → 1.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/Readme.md CHANGED
@@ -1,6 +1,6 @@
1
1
  [![NPM version][npm-image]][npm-url]
2
- [![Build Status][travis-image]][travis-url]
3
- [![Dependency Status][gemnasium-image]][gemnasium-url]
2
+ [![Build Status][build-image]][build-url]
3
+ [![Dependency Status][deps-image]][deps-url]
4
4
 
5
5
  # dump-tile
6
6
 
@@ -26,11 +26,11 @@ cat tile.pbf | dump-tile > tile.json
26
26
 
27
27
  MIT © [Damian Krzeminski](https://furkot.com)
28
28
 
29
- [npm-image]: https://img.shields.io/npm/v/dump-tile.svg
29
+ [npm-image]: https://img.shields.io/npm/v/dump-tile
30
30
  [npm-url]: https://npmjs.org/package/dump-tile
31
31
 
32
- [travis-url]: https://travis-ci.org/pirxpilot/dump-tile
33
- [travis-image]: https://img.shields.io/travis/pirxpilot/dump-tile.svg
32
+ [build-url]: https://github.com/pirxpilot/dump-tile/actions/workflows/check.yaml
33
+ [build-image]: https://img.shields.io/github/actions/workflow/status/pirxpilot/dump-tile/check.yaml?branch=main
34
34
 
35
- [gemnasium-image]: https://img.shields.io/gemnasium/pirxpilot/dump-tile.svg
36
- [gemnasium-url]: https://gemnasium.com/pirxpilot/dump-tile
35
+ [deps-image]: https://img.shields.io/librariesio/release/npm/dump-tile
36
+ [deps-url]: https://libraries.io/npm/dump-tile
package/index.js CHANGED
@@ -1,11 +1,14 @@
1
1
  #!/usr/bin/env node
2
2
 
3
- const concat = require('concat-stream');
3
+ const { buffer } = require('node:stream/consumers');
4
4
  const Pbf = require('pbf');
5
5
  const { VectorTile } = require('@mapbox/vector-tile');
6
6
 
7
+ module.exports = dump;
8
+
7
9
  function dump(input, output) {
8
- input.pipe(concat(buffer => dumpBuffer(buffer, output)));
10
+ return buffer(input)
11
+ .then(buffer => dumpBuffer(buffer, output));
9
12
  }
10
13
 
11
14
  function dumpBuffer(buffer, output) {
@@ -38,7 +41,7 @@ function dumpFeature(vf) {
38
41
 
39
42
  function dumpGeometry(vg) {
40
43
  function convertRing(ring) {
41
- return ring.reduce(function(r, { x, y }) {
44
+ return ring.reduce(function (r, { x, y }) {
42
45
  r.push(x, y);
43
46
  return r;
44
47
  }, []);
@@ -49,4 +52,3 @@ function dumpGeometry(vg) {
49
52
  if (!module.parent) {
50
53
  dump(process.stdin, process.stdout);
51
54
  }
52
-
package/package.json CHANGED
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "dump-tile",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "description": "Dumps MVT tiles encoded in .pbf to JSON",
5
5
  "author": {
6
6
  "name": "Damian Krzeminski",
7
7
  "email": "pirxpilot@furkot.com",
8
8
  "url": "https://furkot.com"
9
9
  },
10
- "repository": "pirxpilot/dump-tile",
10
+ "repository": "github:pirxpilot/dump-tile",
11
11
  "bin": "./index.js",
12
12
  "license": "MIT",
13
13
  "keywords": [
@@ -18,13 +18,10 @@
18
18
  ],
19
19
  "dependencies": {
20
20
  "@mapbox/vector-tile": "^1.3.1",
21
- "concat-stream": "^1.6.1",
22
21
  "pbf": "^3.1.0"
23
22
  },
24
23
  "devDependencies": {
25
- "jshint": "^2.9.5",
26
- "mocha": "^5.0.4",
27
- "should": "^13.2.1"
24
+ "@pirxpilot/jshint": "~3"
28
25
  },
29
26
  "scripts": {
30
27
  "test": "make check"
@@ -32,4 +29,4 @@
32
29
  "files": [
33
30
  "index.js"
34
31
  ]
35
- }
32
+ }
package/History.md DELETED
@@ -1,5 +0,0 @@
1
-
2
- 1.0.0 / 2018-03-17
3
- ==================
4
-
5
- * implement basic tile dump