aboutsummaryrefslogtreecommitdiff
path: root/node_modules/zip-stream
diff options
context:
space:
mode:
authorFlorian Dold <florian.dold@gmail.com>2017-08-14 05:01:11 +0200
committerFlorian Dold <florian.dold@gmail.com>2017-08-14 05:02:09 +0200
commit363723fc84f7b8477592e0105aeb331ec9a017af (patch)
tree29f92724f34131bac64d6a318dd7e30612e631c7 /node_modules/zip-stream
parent5634e77ad96bfe1818f6b6ee70b7379652e5487f (diff)
downloadwallet-core-363723fc84f7b8477592e0105aeb331ec9a017af.tar.xz
node_modules
Diffstat (limited to 'node_modules/zip-stream')
-rw-r--r--node_modules/zip-stream/CHANGELOG.md8
-rw-r--r--node_modules/zip-stream/README.md2
-rw-r--r--node_modules/zip-stream/index.js25
-rw-r--r--node_modules/zip-stream/package.json6
4 files changed, 33 insertions, 8 deletions
diff --git a/node_modules/zip-stream/CHANGELOG.md b/node_modules/zip-stream/CHANGELOG.md
index 24f8d529f..2564f1b26 100644
--- a/node_modules/zip-stream/CHANGELOG.md
+++ b/node_modules/zip-stream/CHANGELOG.md
@@ -1,6 +1,12 @@
## Changelog
-**1.1.1** — <small>_January 12, 2016_</small> — [Diff](https://github.com/archiverjs/node-zip-stream/compare/1.1.0...1.1.1)
+**1.2.0** — <small> June 16, 2017 </small> — [Diff](https://github.com/archiverjs/node-zip-stream/compare/1.1.1...1.2.0)
+
+- groundwork for symlinks support.
+
+*NOTE: this will be the last release for node v0.10 and v0.12. node v4 will become the minimum and a version bump to 2.0.0 will take place.*
+
+**1.1.1** — <small>_January 17, 2017_</small> — [Diff](https://github.com/archiverjs/node-zip-stream/compare/1.1.0...1.1.1)
- actually use STORE method if level is 0 (GH #21)
- bump deps to ensure latest versions are used.
diff --git a/node_modules/zip-stream/README.md b/node_modules/zip-stream/README.md
index ffc846a1e..e43680b53 100644
--- a/node_modules/zip-stream/README.md
+++ b/node_modules/zip-stream/README.md
@@ -1,4 +1,4 @@
-# ZipStream v1.1.1 [![Build Status](https://travis-ci.org/archiverjs/node-zip-stream.svg?branch=master)](https://travis-ci.org/archiverjs/node-zip-stream) [![Build status](https://ci.appveyor.com/api/projects/status/2sraarbaadwbtti2/branch/master?svg=true)](https://ci.appveyor.com/project/ctalkington/node-zip-stream/branch/master)
+# ZipStream v1.2.0 [![Build Status](https://travis-ci.org/archiverjs/node-zip-stream.svg?branch=master)](https://travis-ci.org/archiverjs/node-zip-stream) [![Build status](https://ci.appveyor.com/api/projects/status/2sraarbaadwbtti2/branch/master?svg=true)](https://ci.appveyor.com/project/ctalkington/node-zip-stream/branch/master)
zip-stream is a streaming zip archive generator based on the `ZipArchiveOutputStream` prototype found in the [compress-commons](https://www.npmjs.org/package/compress-commons) project.
diff --git a/node_modules/zip-stream/index.js b/node_modules/zip-stream/index.js
index 0c3248bf8..acb5d0df2 100644
--- a/node_modules/zip-stream/index.js
+++ b/node_modules/zip-stream/index.js
@@ -60,6 +60,7 @@ ZipStream.prototype._normalizeFileData = function(data) {
data = util.defaults(data, {
type: 'file',
name: null,
+ linkname: null,
date: null,
mode: null,
store: this.options.store,
@@ -67,11 +68,12 @@ ZipStream.prototype._normalizeFileData = function(data) {
});
var isDir = data.type === 'directory';
+ var isSymlink = data.type === 'symlink';
if (data.name) {
data.name = util.sanitizePath(data.name);
- if (data.name.slice(-1) === '/') {
+ if (!isSymlink && data.name.slice(-1) === '/') {
isDir = true;
data.type = 'directory';
} else if (isDir) {
@@ -79,7 +81,7 @@ ZipStream.prototype._normalizeFileData = function(data) {
}
}
- if (isDir) {
+ if (isDir || isSymlink) {
data.store = true;
}
@@ -110,7 +112,7 @@ ZipStream.prototype.entry = function(source, data, callback) {
data = this._normalizeFileData(data);
- if (data.type !== 'file' && data.type !== 'directory') {
+ if (data.type !== 'file' && data.type !== 'directory' && data.type !== 'symlink') {
callback(new Error(data.type + ' entries not currently supported'));
return;
}
@@ -120,6 +122,11 @@ ZipStream.prototype.entry = function(source, data, callback) {
return;
}
+ if (data.type === 'symlink' && typeof data.linkname !== 'string') {
+ callback(new Error('entry linkname must be a non-empty string value when type equals symlink'));
+ return;
+ }
+
var entry = new ZipArchiveEntry(data.name);
entry.setTime(data.date);
@@ -131,10 +138,22 @@ ZipStream.prototype.entry = function(source, data, callback) {
entry.setComment(data.comment);
}
+ if (data.type === 'symlink' && typeof data.mode !== 'number') {
+ data.mode = 40960; // 0120000
+ }
+
if (typeof data.mode === 'number') {
+ if (data.type === 'symlink') {
+ data.mode |= 40960;
+ }
+
entry.setUnixMode(data.mode);
}
+ if (data.type === 'symlink' && typeof data.linkname === 'string') {
+ source = new Buffer(data.linkname);
+ }
+
return ZipArchiveOutputStream.prototype.entry.call(this, entry, source, callback);
};
diff --git a/node_modules/zip-stream/package.json b/node_modules/zip-stream/package.json
index 874dd0be5..59adadd49 100644
--- a/node_modules/zip-stream/package.json
+++ b/node_modules/zip-stream/package.json
@@ -1,6 +1,6 @@
{
"name": "zip-stream",
- "version": "1.1.1",
+ "version": "1.2.0",
"description": "a streaming zip archive generator.",
"homepage": "https://github.com/archiverjs/node-zip-stream",
"author": {
@@ -28,14 +28,14 @@
},
"dependencies": {
"archiver-utils": "^1.3.0",
- "compress-commons": "^1.1.0",
+ "compress-commons": "^1.2.0",
"lodash": "^4.8.0",
"readable-stream": "^2.0.0"
},
"devDependencies": {
"archiver-jsdoc-theme": "^1.0.0",
"jsdoc": "~3.4.0",
- "chai": "^3.4.0",
+ "chai": "^4.0.0",
"minami": "^1.1.0",
"mocha": "^3.2.0",
"rimraf": "^2.4.3",