diff options
Diffstat (limited to 'deps/npm/node_modules/tar')
-rw-r--r-- | deps/npm/node_modules/tar/.travis.yml | 3 | ||||
-rw-r--r-- | deps/npm/node_modules/tar/examples/extracter.js | 22 | ||||
-rw-r--r-- | deps/npm/node_modules/tar/examples/packer.js | 20 | ||||
-rw-r--r-- | deps/npm/node_modules/tar/lib/extract.js | 8 | ||||
-rw-r--r-- | deps/npm/node_modules/tar/lib/parse.js | 2 | ||||
-rw-r--r-- | deps/npm/node_modules/tar/package.json | 33 | ||||
-rw-r--r-- | deps/npm/node_modules/tar/test/extract.js | 2 |
7 files changed, 53 insertions, 37 deletions
diff --git a/deps/npm/node_modules/tar/.travis.yml b/deps/npm/node_modules/tar/.travis.yml index 2d26206d58..fca8ef0194 100644 --- a/deps/npm/node_modules/tar/.travis.yml +++ b/deps/npm/node_modules/tar/.travis.yml @@ -1,3 +1,4 @@ language: node_js node_js: - - 0.6 + - 0.10 + - 0.11 diff --git a/deps/npm/node_modules/tar/examples/extracter.js b/deps/npm/node_modules/tar/examples/extracter.js index e150abf25d..f6253a72c5 100644 --- a/deps/npm/node_modules/tar/examples/extracter.js +++ b/deps/npm/node_modules/tar/examples/extracter.js @@ -1,11 +1,19 @@ var tar = require("../tar.js") , fs = require("fs") + +function onError(err) { + console.error('An error occurred:', err) +} + +function onEnd() { + console.log('Extracted!') +} + +var extractor = tar.Extract({path: __dirname + "/extract"}) + .on('error', onError) + .on('end', onEnd); + fs.createReadStream(__dirname + "/../test/fixtures/c.tar") - .pipe(tar.Extract({ path: __dirname + "/extract" })) - .on("error", function (er) { - console.error("error here") - }) - .on("end", function () { - console.error("done") - }) + .on('error', onError) + .pipe(extractor); diff --git a/deps/npm/node_modules/tar/examples/packer.js b/deps/npm/node_modules/tar/examples/packer.js index ebe38926e1..039969ce30 100644 --- a/deps/npm/node_modules/tar/examples/packer.js +++ b/deps/npm/node_modules/tar/examples/packer.js @@ -2,9 +2,23 @@ var tar = require("../tar.js") , fstream = require("fstream") , fs = require("fs") -var dir_destination = fs.createWriteStream('dir.tar') +var dirDest = fs.createWriteStream('dir.tar') + + +function onError(err) { + console.error('An error occurred:', err) +} + +function onEnd() { + console.log('Packed!') +} + +var packer = tar.Pack({ noProprietary: true }) + .on('error', onError) + .on('end', onEnd); // This must be a "directory" fstream.Reader({ path: __dirname, type: "Directory" }) - .pipe(tar.Pack({ noProprietary: true })) - .pipe(dir_destination)
\ No newline at end of file + .on('error', onError) + .pipe(packer) + .pipe(dirDest) diff --git a/deps/npm/node_modules/tar/lib/extract.js b/deps/npm/node_modules/tar/lib/extract.js index c34a81e21f..9fb1e6fb1b 100644 --- a/deps/npm/node_modules/tar/lib/extract.js +++ b/deps/npm/node_modules/tar/lib/extract.js @@ -57,6 +57,14 @@ function Extract (opts) { me.resume() }) + this._fst.on('error', function(err) { + me.emit('error', err) + }) + + this._fst.on('drain', function() { + me.emit('drain') + }) + // this._fst.on("end", function () { // console.error("\nEEEE Extract End", me._fst.path) // }) diff --git a/deps/npm/node_modules/tar/lib/parse.js b/deps/npm/node_modules/tar/lib/parse.js index 009a85f413..8517c481bc 100644 --- a/deps/npm/node_modules/tar/lib/parse.js +++ b/deps/npm/node_modules/tar/lib/parse.js @@ -146,7 +146,7 @@ Parse.prototype._startEntry = function (c) { e.header = header e.tar_file_offset = this.position e.tar_block = this.position / 512 - this.emit("error", e) + return this.emit("error", e) } switch (tar.types[header.type]) { diff --git a/deps/npm/node_modules/tar/package.json b/deps/npm/node_modules/tar/package.json index 207eaa1fdd..b4a1209921 100644 --- a/deps/npm/node_modules/tar/package.json +++ b/deps/npm/node_modules/tar/package.json @@ -6,7 +6,7 @@ }, "name": "tar", "description": "tar for node", - "version": "1.0.1", + "version": "1.0.3", "repository": { "type": "git", "url": "git://github.com/isaacs/node-tar.git" @@ -23,33 +23,18 @@ "devDependencies": { "graceful-fs": "^3.0.2", "rimraf": "1.x", - "tap": "0.x" + "tap": "0.x", + "mkdirp": "^0.5.0" }, "license": "BSD", - "gitHead": "476bf6f5882b9c33d1cbf66f175d0f25e3981044", + "readme": "# node-tar\n\nTar for Node.js.\n\n[![NPM](https://nodei.co/npm/tar.png)](https://nodei.co/npm/tar/)\n\n## API\n\nSee `examples/` for usage examples.\n\n### var tar = require('tar')\n\nReturns an object with `.Pack`, `.Extract` and `.Parse` methods.\n\n### tar.Pack([properties])\n\nReturns a through stream. Use\n[fstream](https://npmjs.org/package/fstream) to write files into the\npack stream and you will receive tar archive data from the pack\nstream.\n\nThis only works with directories, it does not work with individual files.\n\nThe optional `properties` object are used to set properties in the tar\n'Global Extended Header'.\n\n### tar.Extract([options])\n\nReturns a through stream. Write tar data to the stream and the files\nin the tarball will be extracted onto the filesystem.\n\n`options` can be:\n\n```js\n{\n path: '/path/to/extract/tar/into',\n strip: 0, // how many path segments to strip from the root when extracting\n}\n```\n\n`options` also get passed to the `fstream.Writer` instance that `tar`\nuses internally.\n\n### tar.Parse()\n\nReturns a writable stream. Write tar data to it and it will emit\n`entry` events for each entry parsed from the tarball. This is used by\n`tar.Extract`.\n", + "readmeFilename": "README.md", + "gitHead": "f4151128c585da236c6b1e278b762ecaedc20c15", "bugs": { "url": "https://github.com/isaacs/node-tar/issues" }, "homepage": "https://github.com/isaacs/node-tar", - "_id": "tar@1.0.1", - "_shasum": "6075b5a1f236defe0c7e3756d3d9b3ebdad0f19a", - "_from": "tar@1.0.1", - "_npmVersion": "1.4.23", - "_npmUser": { - "name": "isaacs", - "email": "i@izs.me" - }, - "maintainers": [ - { - "name": "isaacs", - "email": "i@izs.me" - } - ], - "dist": { - "shasum": "6075b5a1f236defe0c7e3756d3d9b3ebdad0f19a", - "tarball": "http://registry.npmjs.org/tar/-/tar-1.0.1.tgz" - }, - "directories": {}, - "_resolved": "https://registry.npmjs.org/tar/-/tar-1.0.1.tgz", - "readme": "ERROR: No README data found!" + "_id": "tar@1.0.3", + "_shasum": "15bcdab244fa4add44e4244a0176edb8aa9a2b44", + "_from": "tar@>=1.0.3 <1.1.0" } diff --git a/deps/npm/node_modules/tar/test/extract.js b/deps/npm/node_modules/tar/test/extract.js index a68144be98..eca4e7cc96 100644 --- a/deps/npm/node_modules/tar/test/extract.js +++ b/deps/npm/node_modules/tar/test/extract.js @@ -118,7 +118,7 @@ var tap = require("tap") linkpath: undefined, nlink: 2 }, { path: '/200LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL', - mode: '120755', + mode: '120777', type: 'SymbolicLink', depth: 1, size: 200, |