forked from enviPath/enviPy
Current Dev State
This commit is contained in:
18
static/js/ketcher2/node_modules/zip-stream/CHANGELOG.md
generated
vendored
Normal file
18
static/js/ketcher2/node_modules/zip-stream/CHANGELOG.md
generated
vendored
Normal file
@ -0,0 +1,18 @@
|
||||
## Changelog
|
||||
|
||||
**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.
|
||||
|
||||
**1.1.0** — <small>_August 27, 2016_</small> — [Diff](https://github.com/archiverjs/node-zip-stream/compare/1.0.0...1.1.0)
|
||||
|
||||
- bump deps to ensure latest versions are used.
|
||||
|
||||
[Release Archive](https://github.com/archiverjs/node-zip-stream/releases)
|
||||
22
static/js/ketcher2/node_modules/zip-stream/LICENSE
generated
vendored
Normal file
22
static/js/ketcher2/node_modules/zip-stream/LICENSE
generated
vendored
Normal file
@ -0,0 +1,22 @@
|
||||
Copyright (c) 2014 Chris Talkington, contributors.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person
|
||||
obtaining a copy of this software and associated documentation
|
||||
files (the "Software"), to deal in the Software without
|
||||
restriction, including without limitation the rights to use,
|
||||
copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the
|
||||
Software is furnished to do so, subject to the following
|
||||
conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be
|
||||
included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
|
||||
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
|
||||
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||
OTHER DEALINGS IN THE SOFTWARE.
|
||||
45
static/js/ketcher2/node_modules/zip-stream/README.md
generated
vendored
Normal file
45
static/js/ketcher2/node_modules/zip-stream/README.md
generated
vendored
Normal file
@ -0,0 +1,45 @@
|
||||
# ZipStream v1.2.0 [](https://travis-ci.org/archiverjs/node-zip-stream) [](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.
|
||||
|
||||
It was originally created to be a successor to [zipstream](https://npmjs.org/package/zipstream).
|
||||
|
||||
Visit the [API documentation](http://archiverjs.com/zip-stream) for a list of all methods available.
|
||||
|
||||
### Install
|
||||
|
||||
```bash
|
||||
npm install zip-stream --save
|
||||
```
|
||||
|
||||
You can also use `npm install https://github.com/archiverjs/node-zip-stream/archive/master.tar.gz` to test upcoming versions.
|
||||
|
||||
### Usage
|
||||
|
||||
This module is meant to be wrapped internally by other modules and therefore lacks any queue management. This means you have to wait until the previous entry has been fully consumed to add another. Nested callbacks should be used to add multiple entries. There are modules like [async](https://npmjs.org/package/async) that ease the so called "callback hell".
|
||||
|
||||
If you want a module that handles entry queueing and much more, you should check out [archiver](https://npmjs.org/package/archiver) which uses this module internally.
|
||||
|
||||
```js
|
||||
var packer = require('zip-stream');
|
||||
var archive = new packer(); // OR new packer(options)
|
||||
|
||||
archive.on('error', function(err) {
|
||||
throw err;
|
||||
});
|
||||
|
||||
// pipe archive where you want it (ie fs, http, etc)
|
||||
// listen to the destination's end, close, or finish event
|
||||
|
||||
archive.entry('string contents', { name: 'string.txt' }, function(err, entry) {
|
||||
if (err) throw err;
|
||||
archive.entry(null, { name: 'directory/' }, function(err, entry) {
|
||||
if (err) throw err;
|
||||
archive.finish();
|
||||
});
|
||||
});
|
||||
```
|
||||
|
||||
## Credits
|
||||
|
||||
Concept inspired by Antoine van Wel's [zipstream](https://npmjs.org/package/zipstream) module, which is no longer being updated.
|
||||
180
static/js/ketcher2/node_modules/zip-stream/index.js
generated
vendored
Normal file
180
static/js/ketcher2/node_modules/zip-stream/index.js
generated
vendored
Normal file
@ -0,0 +1,180 @@
|
||||
/**
|
||||
* ZipStream
|
||||
*
|
||||
* @ignore
|
||||
* @license [MIT]{@link https://github.com/archiverjs/node-zip-stream/blob/master/LICENSE}
|
||||
* @copyright (c) 2014 Chris Talkington, contributors.
|
||||
*/
|
||||
var inherits = require('util').inherits;
|
||||
|
||||
var ZipArchiveOutputStream = require('compress-commons').ZipArchiveOutputStream;
|
||||
var ZipArchiveEntry = require('compress-commons').ZipArchiveEntry;
|
||||
|
||||
var util = require('archiver-utils');
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
* @extends external:ZipArchiveOutputStream
|
||||
* @param {Object} [options]
|
||||
* @param {String} [options.comment] Sets the zip archive comment.
|
||||
* @param {Boolean} [options.forceLocalTime=false] Forces the archive to contain local file times instead of UTC.
|
||||
* @param {Boolean} [options.forceZip64=false] Forces the archive to contain ZIP64 headers.
|
||||
* @param {Boolean} [options.store=false] Sets the compression method to STORE.
|
||||
* @param {Object} [options.zlib] Passed to [zlib]{@link https://nodejs.org/api/zlib.html#zlib_class_options}
|
||||
* to control compression.
|
||||
*/
|
||||
var ZipStream = module.exports = function(options) {
|
||||
if (!(this instanceof ZipStream)) {
|
||||
return new ZipStream(options);
|
||||
}
|
||||
|
||||
options = this.options = options || {};
|
||||
options.zlib = options.zlib || {};
|
||||
|
||||
ZipArchiveOutputStream.call(this, options);
|
||||
|
||||
if (typeof options.level === 'number' && options.level >= 0) {
|
||||
options.zlib.level = options.level;
|
||||
delete options.level;
|
||||
}
|
||||
|
||||
if (typeof options.zlib.level === 'number' && options.zlib.level === 0) {
|
||||
options.store = true;
|
||||
}
|
||||
|
||||
if (options.comment && options.comment.length > 0) {
|
||||
this.setComment(options.comment);
|
||||
}
|
||||
};
|
||||
|
||||
inherits(ZipStream, ZipArchiveOutputStream);
|
||||
|
||||
/**
|
||||
* Normalizes entry data with fallbacks for key properties.
|
||||
*
|
||||
* @private
|
||||
* @param {Object} data
|
||||
* @return {Object}
|
||||
*/
|
||||
ZipStream.prototype._normalizeFileData = function(data) {
|
||||
data = util.defaults(data, {
|
||||
type: 'file',
|
||||
name: null,
|
||||
linkname: null,
|
||||
date: null,
|
||||
mode: null,
|
||||
store: this.options.store,
|
||||
comment: ''
|
||||
});
|
||||
|
||||
var isDir = data.type === 'directory';
|
||||
var isSymlink = data.type === 'symlink';
|
||||
|
||||
if (data.name) {
|
||||
data.name = util.sanitizePath(data.name);
|
||||
|
||||
if (!isSymlink && data.name.slice(-1) === '/') {
|
||||
isDir = true;
|
||||
data.type = 'directory';
|
||||
} else if (isDir) {
|
||||
data.name += '/';
|
||||
}
|
||||
}
|
||||
|
||||
if (isDir || isSymlink) {
|
||||
data.store = true;
|
||||
}
|
||||
|
||||
data.date = util.dateify(data.date);
|
||||
|
||||
return data;
|
||||
};
|
||||
|
||||
/**
|
||||
* Appends an entry given an input source (text string, buffer, or stream).
|
||||
*
|
||||
* @param {(Buffer|Stream|String)} source The input source.
|
||||
* @param {Object} data
|
||||
* @param {String} data.name Sets the entry name including internal path.
|
||||
* @param {String} [data.comment] Sets the entry comment.
|
||||
* @param {(String|Date)} [data.date=NOW()] Sets the entry date.
|
||||
* @param {Number} [data.mode=D:0755/F:0644] Sets the entry permissions.
|
||||
* @param {Boolean} [data.store=options.store] Sets the compression method to STORE.
|
||||
* @param {String} [data.type=file] Sets the entry type. Defaults to `directory`
|
||||
* if name ends with trailing slash.
|
||||
* @param {Function} callback
|
||||
* @return this
|
||||
*/
|
||||
ZipStream.prototype.entry = function(source, data, callback) {
|
||||
if (typeof callback !== 'function') {
|
||||
callback = this._emitErrorCallback.bind(this);
|
||||
}
|
||||
|
||||
data = this._normalizeFileData(data);
|
||||
|
||||
if (data.type !== 'file' && data.type !== 'directory' && data.type !== 'symlink') {
|
||||
callback(new Error(data.type + ' entries not currently supported'));
|
||||
return;
|
||||
}
|
||||
|
||||
if (typeof data.name !== 'string' || data.name.length === 0) {
|
||||
callback(new Error('entry name must be a non-empty string value'));
|
||||
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);
|
||||
|
||||
if (data.store) {
|
||||
entry.setMethod(0);
|
||||
}
|
||||
|
||||
if (data.comment.length > 0) {
|
||||
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);
|
||||
};
|
||||
|
||||
/**
|
||||
* Finalizes the instance and prevents further appending to the archive
|
||||
* structure (queue will continue til drained).
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
ZipStream.prototype.finalize = function() {
|
||||
this.finish();
|
||||
};
|
||||
|
||||
/**
|
||||
* Returns the current number of bytes written to this stream.
|
||||
* @function ZipStream#getBytesWritten
|
||||
* @returns {Number}
|
||||
*/
|
||||
|
||||
/**
|
||||
* Compress Commons ZipArchiveOutputStream
|
||||
* @external ZipArchiveOutputStream
|
||||
* @see {@link https://github.com/archiverjs/node-compress-commons}
|
||||
*/
|
||||
78
static/js/ketcher2/node_modules/zip-stream/package.json
generated
vendored
Normal file
78
static/js/ketcher2/node_modules/zip-stream/package.json
generated
vendored
Normal file
@ -0,0 +1,78 @@
|
||||
{
|
||||
"_from": "zip-stream@^1.1.0",
|
||||
"_id": "zip-stream@1.2.0",
|
||||
"_inBundle": false,
|
||||
"_integrity": "sha1-qLxF9MG0lpnGuQGYuqyqzbzUugQ=",
|
||||
"_location": "/zip-stream",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"type": "range",
|
||||
"registry": true,
|
||||
"raw": "zip-stream@^1.1.0",
|
||||
"name": "zip-stream",
|
||||
"escapedName": "zip-stream",
|
||||
"rawSpec": "^1.1.0",
|
||||
"saveSpec": null,
|
||||
"fetchSpec": "^1.1.0"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/archiver"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/zip-stream/-/zip-stream-1.2.0.tgz",
|
||||
"_shasum": "a8bc45f4c1b49699c6b90198baacaacdbcd4ba04",
|
||||
"_spec": "zip-stream@^1.1.0",
|
||||
"_where": "/home/manfred/enviPath/ketcher2/ketcher/node_modules/archiver",
|
||||
"author": {
|
||||
"name": "Chris Talkington",
|
||||
"url": "http://christalkington.com/"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/archiverjs/node-zip-stream/issues"
|
||||
},
|
||||
"bundleDependencies": false,
|
||||
"dependencies": {
|
||||
"archiver-utils": "^1.3.0",
|
||||
"compress-commons": "^1.2.0",
|
||||
"lodash": "^4.8.0",
|
||||
"readable-stream": "^2.0.0"
|
||||
},
|
||||
"deprecated": false,
|
||||
"description": "a streaming zip archive generator.",
|
||||
"devDependencies": {
|
||||
"archiver-jsdoc-theme": "^1.0.0",
|
||||
"chai": "^4.0.0",
|
||||
"jsdoc": "~3.4.0",
|
||||
"minami": "^1.1.0",
|
||||
"mkdirp": "^0.5.0",
|
||||
"mocha": "^3.2.0",
|
||||
"rimraf": "^2.4.3"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 0.10.0"
|
||||
},
|
||||
"files": [
|
||||
"index.js"
|
||||
],
|
||||
"homepage": "https://github.com/archiverjs/node-zip-stream",
|
||||
"keywords": [
|
||||
"archive",
|
||||
"stream",
|
||||
"zip-stream",
|
||||
"zip"
|
||||
],
|
||||
"license": "MIT",
|
||||
"main": "index.js",
|
||||
"name": "zip-stream",
|
||||
"publishConfig": {
|
||||
"registry": "https://registry.npmjs.org/"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/archiverjs/node-zip-stream.git"
|
||||
},
|
||||
"scripts": {
|
||||
"jsdoc": "jsdoc -c jsdoc.json README.md",
|
||||
"test": "mocha --reporter dot"
|
||||
},
|
||||
"version": "1.2.0"
|
||||
}
|
||||
Reference in New Issue
Block a user