kosmtik-fetch-remote
Advanced tools
Comparing version 0.0.4 to 0.1.0
var fs = require('fs'), | ||
path = require('path'), | ||
unzip = require('unzip'); | ||
unzip = require('unzipper'); | ||
@@ -15,5 +15,4 @@ var log = function () { | ||
FetchRemote.prototype.patchMML = function (e) { | ||
if (!e.project.mml || !e.project.mml.Layer) return; | ||
if (!e.project.mml || !e.project.mml.Layer) return e.continue(); | ||
var processed = 0, layer, | ||
length = e.project.mml.Layer.length, | ||
force = this.config.parsed_opts['force-fetch-remote'], | ||
@@ -37,3 +36,2 @@ self = this, | ||
var uri = layer.Datasource.file, | ||
ext = path.extname(uri), | ||
basename = path.basename(uri), | ||
@@ -58,3 +56,3 @@ destDir = path.join(e.project.dataDir, layer.id), | ||
if (entry.type === 'Directory') return entry.autodrain(); | ||
if (layer.Datasource.type === "shape") fileName = layer.id + path.extname(fileName); | ||
if (layer.Datasource.type === 'shape') fileName = layer.id + path.extname(fileName); | ||
entry.pipe(fs.createWriteStream(path.join(destDir, fileName))); | ||
@@ -61,0 +59,0 @@ }).on('close', decr); |
{ | ||
"name": "kosmtik-fetch-remote", | ||
"version": "0.0.4", | ||
"version": "0.1.0", | ||
"description": "Kosmtik plugin to fetch remote layer data", | ||
@@ -21,5 +21,5 @@ "main": "index.js", | ||
"dependencies": { | ||
"unzip": "^0.1.11" | ||
"unzipper": "^0.10.10" | ||
}, | ||
"kosmtik": "~0.0.6" | ||
} |
@@ -5,1 +5,11 @@ # kosmtik-fetch-remote | ||
them automagically. | ||
## Install | ||
While in your Kosmtik root, run: | ||
`node index.js plugins --install kosmtik-fetch-remote` | ||
## Issues and feature requests | ||
Please report any issue or feature request on the [main kosmtik repository](https://github.com/kosmtik/kosmtik/issues). |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
4038
15
3
81
+ Addedunzipper@^0.10.10
+ Addedbig-integer@1.6.52(transitive)
+ Addedbluebird@3.4.7(transitive)
+ Addedbuffer-indexof-polyfill@1.0.2(transitive)
+ Addedduplexer2@0.1.4(transitive)
+ Addedfstream@1.0.12(transitive)
+ Addedgraceful-fs@4.2.11(transitive)
+ Addedisarray@1.0.0(transitive)
+ Addedlistenercount@1.0.1(transitive)
+ Addedprocess-nextick-args@2.0.1(transitive)
+ Addedreadable-stream@2.3.8(transitive)
+ Addedsafe-buffer@5.1.2(transitive)
+ Addedstring_decoder@1.1.1(transitive)
+ Addedunzipper@0.10.14(transitive)
+ Addedutil-deprecate@1.0.2(transitive)
- Removedunzip@^0.1.11
- Removedfstream@0.1.31(transitive)
- Removedgraceful-fs@3.0.12(transitive)
- Removedisarray@0.0.1(transitive)
- Removedmatch-stream@0.0.2(transitive)
- Removednatives@1.1.6(transitive)
- Removedover@0.0.5(transitive)
- Removedpullstream@0.4.1(transitive)
- Removedreadable-stream@1.0.34(transitive)
- Removedslice-stream@1.0.0(transitive)
- Removedstring_decoder@0.10.31(transitive)
- Removedunzip@0.1.11(transitive)