From 363723fc84f7b8477592e0105aeb331ec9a017af Mon Sep 17 00:00:00 2001 From: Florian Dold Date: Mon, 14 Aug 2017 05:01:11 +0200 Subject: node_modules --- node_modules/zip-stream/CHANGELOG.md | 8 +++++++- node_modules/zip-stream/README.md | 2 +- node_modules/zip-stream/index.js | 25 ++++++++++++++++++++++--- node_modules/zip-stream/package.json | 6 +++--- 4 files changed, 33 insertions(+), 8 deletions(-) (limited to 'node_modules/zip-stream') 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** — _January 12, 2016_ — [Diff](https://github.com/archiverjs/node-zip-stream/compare/1.1.0...1.1.1) +**1.2.0** — June 16, 2017 — [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** — _January 17, 2017_ — [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", -- cgit v1.2.3