Update npm to 1.1.0-alpha-2

This commit is contained in:
isaacs 2011-11-22 16:56:59 -08:00
parent 0ba78d5f36
commit 3ab15cde25
138 changed files with 1633 additions and 6822 deletions

View File

@ -49,3 +49,6 @@
[submodule "node_modules/mkdirp"]
path = node_modules/mkdirp
url = git://github.com/isaacs/node-mkdirp.git
[submodule "node_modules/fast-list"]
path = node_modules/fast-list
url = git://github.com/isaacs/fast-list.git

View File

@ -155,16 +155,16 @@ Use appropriate log levels. The default log() function logs at the
## Case, naming, etc.
Use lowerCamelCase for multiword identifiers when they refer to objects,
Use `lowerCamelCase` for multiword identifiers when they refer to objects,
functions, methods, members, or anything not specified in this section.
Use UpperCamelCase for class names (things that you'd pass to "new").
Use `UpperCamelCase` for class names (things that you'd pass to "new").
Use all-lower-hyphen-css-case for multiword filenames and config keys.
Use `all-lower-hyphen-css-case` for multiword filenames and config keys.
Use named functions. They make stack traces easier to follow.
Use CAPS_SNAKE_CASE for constants, things that should never change
Use `CAPS_SNAKE_CASE` for constants, things that should never change
and are rarely used.
Use a single uppercase letter for function names where the function

View File

@ -20,7 +20,7 @@ var output = require("./utils/output.js")
completion.completion = function (opts, cb) {
if (opts.w > 3) return cb()
var fs = require("fs")
var fs = require("graceful-fs")
, path = require("path")
, bashExists = null
, zshExists = null

View File

@ -76,16 +76,10 @@ function packFiles (targetTarball, parent, files, pkg, cb) {
, path: parent
, filter: function () {
return -1 !== files.indexOf(this.path)
// || (this.type === "Directory" &&
// this.basename !== ".git")
}
})
.on("error", log.er(cb, "error reading "+parent))
.on("entry", function E (entry) {
entry.on("entry", E)
})
.pipe(tar.Pack({}))
.pipe(tar.Pack())
.on("error", log.er(cb, "tar creation error "+targetTarball))
.pipe(zlib.Gzip())
.on("error", log.er(cb, "gzip error "+targetTarball))
@ -155,8 +149,9 @@ function gunzTarPerm (tarball, tmp, dMode, fMode, uid, gid, cb) {
log.silly([dMode.toString(8), fMode.toString(8)], "gunzTarPerm modes")
fs.createReadStream(tarball)
.on("error", log.er(cb, "error reading "+tarball))
.pipe(zlib.Unzip())
.on("error", log.er(cb, "unzip error"))
.on("error", log.er(cb, "unzip error "+tarball))
.pipe(tar.Extract({ type: "Directory", path: tmp }))
.on("error", log.er(cb, "Failed unpacking "+tarball))
.on("close", afterUntar)
@ -165,6 +160,7 @@ function gunzTarPerm (tarball, tmp, dMode, fMode, uid, gid, cb) {
// XXX Do all this in an Extract filter.
//
function afterUntar (er) {
log.silly(er, "afterUntar")
// if we're not doing ownership management,
// then we're done now.
if (er) return log.er(cb, "Failed unpacking "+tarball)(er)

23
deps/npm/node_modules/abbrev/LICENSE generated vendored Normal file
View File

@ -0,0 +1,23 @@
Copyright 2009, 2010, 2011 Isaac Z. Schlueter.
All rights reserved.
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.

View File

@ -5,4 +5,7 @@
, "main" : "./lib/abbrev.js"
, "scripts" : { "test" : "node lib/abbrev.js" }
, "repository" : "http://github.com/isaacs/abbrev-js"
, "license" :
{ "type" : "MIT"
, "url" : "https://github.com/isaacs/abbrev-js/raw/master/LICENSE" }
}

View File

@ -1,68 +0,0 @@
var BlockStream = require("../block-stream.js")
var blockSizes = [16, 25, 1024]
, writeSizes = [4, 8, 15, 16, 17, 64, 100]
, writeCounts = [1, 10, 100]
, tap = require("tap")
writeCounts.forEach(function (writeCount) {
blockSizes.forEach(function (blockSize) {
writeSizes.forEach(function (writeSize) {
tap.test("writeSize=" + writeSize +
" blockSize="+blockSize +
" writeCount="+writeCount, function (t) {
var f = new BlockStream(blockSize, {nopad: true })
var actualChunks = 0
var actualBytes = 0
var timeouts = 0
f.on("data", function (c) {
timeouts ++
actualChunks ++
actualBytes += c.length
// make sure that no data gets corrupted, and basic sanity
var before = c.toString()
// simulate a slow write operation
setTimeout(function () {
timeouts --
var after = c.toString()
t.equal(after, before, "should not change data")
// now corrupt it, to find leaks.
for (var i = 0; i < c.length; i ++) {
c[i] = "x".charCodeAt(0)
}
}, 100)
})
f.on("end", function () {
// round up to the nearest block size
var expectChunks = Math.ceil(writeSize * writeCount * 2 / blockSize)
var expectBytes = writeSize * writeCount * 2
t.equal(actualBytes, expectBytes,
"bytes=" + expectBytes + " writeSize=" + writeSize)
t.equal(actualChunks, expectChunks,
"chunks=" + expectChunks + " writeSize=" + writeSize)
// wait for all the timeout checks to finish, then end the test
setTimeout(function WAIT () {
if (timeouts > 0) return setTimeout(WAIT)
t.end()
}, 100)
})
for (var i = 0; i < writeCount; i ++) {
var a = new Buffer(writeSize);
for (var j = 0; j < writeSize; j ++) a[j] = "a".charCodeAt(0)
var b = new Buffer(writeSize);
for (var j = 0; j < writeSize; j ++) b[j] = "b".charCodeAt(0)
f.write(a)
f.write(b)
}
f.end()
})
}) }) })

View File

@ -1,70 +0,0 @@
var BlockStream = require("dropper")
var blockSizes = [16, 25, 1024]
, writeSizes = [4, 8, 15, 16, 17, 64, 100]
, writeCounts = [1, 10, 100]
, tap = require("tap")
writeCounts.forEach(function (writeCount) {
blockSizes.forEach(function (blockSize) {
writeSizes.forEach(function (writeSize) {
tap.test("writeSize=" + writeSize +
" blockSize="+blockSize +
" writeCount="+writeCount, function (t) {
var f = new BlockStream(blockSize, {nopad: true })
var actualChunks = 0
var actualBytes = 0
var timeouts = 0
f.on("data", function (c) {
timeouts ++
actualChunks ++
actualBytes += c.length
// make sure that no data gets corrupted, and basic sanity
var before = c.toString()
// simulate a slow write operation
f.pause()
setTimeout(function () {
timeouts --
var after = c.toString()
t.equal(after, before, "should not change data")
// now corrupt it, to find leaks.
for (var i = 0; i < c.length; i ++) {
c[i] = "x".charCodeAt(0)
}
f.resume()
}, 100)
})
f.on("end", function () {
// round up to the nearest block size
var expectChunks = Math.ceil(writeSize * writeCount * 2 / blockSize)
var expectBytes = writeSize * writeCount * 2
t.equal(actualBytes, expectBytes,
"bytes=" + expectBytes + " writeSize=" + writeSize)
t.equal(actualChunks, expectChunks,
"chunks=" + expectChunks + " writeSize=" + writeSize)
// wait for all the timeout checks to finish, then end the test
setTimeout(function WAIT () {
if (timeouts > 0) return setTimeout(WAIT)
t.end()
}, 100)
})
for (var i = 0; i < writeCount; i ++) {
var a = new Buffer(writeSize);
for (var j = 0; j < writeSize; j ++) a[j] = "a".charCodeAt(0)
var b = new Buffer(writeSize);
for (var j = 0; j < writeSize; j ++) b[j] = "b".charCodeAt(0)
f.write(a)
f.write(b)
}
f.end()
})
}) }) })

View File

@ -1,68 +0,0 @@
var BlockStream = require("dropper")
var blockSizes = [16, 25, 1024]
, writeSizes = [4, 8, 15, 16, 17, 64, 100]
, writeCounts = [1, 10, 100]
, tap = require("tap")
writeCounts.forEach(function (writeCount) {
blockSizes.forEach(function (blockSize) {
writeSizes.forEach(function (writeSize) {
tap.test("writeSize=" + writeSize +
" blockSize="+blockSize +
" writeCount="+writeCount, function (t) {
var f = new BlockStream(blockSize, {nopad: true })
var actualChunks = 0
var actualBytes = 0
var timeouts = 0
f.on("data", function (c) {
timeouts ++
actualChunks ++
actualBytes += c.length
// make sure that no data gets corrupted, and basic sanity
var before = c.toString()
// simulate a slow write operation
setTimeout(function () {
timeouts --
var after = c.toString()
t.equal(after, before, "should not change data")
// now corrupt it, to find leaks.
for (var i = 0; i < c.length; i ++) {
c[i] = "x".charCodeAt(0)
}
}, 100)
})
f.on("end", function () {
// round up to the nearest block size
var expectChunks = Math.ceil(writeSize * writeCount * 2 / blockSize)
var expectBytes = writeSize * writeCount * 2
t.equal(actualBytes, expectBytes,
"bytes=" + expectBytes + " writeSize=" + writeSize)
t.equal(actualChunks, expectChunks,
"chunks=" + expectChunks + " writeSize=" + writeSize)
// wait for all the timeout checks to finish, then end the test
setTimeout(function WAIT () {
if (timeouts > 0) return setTimeout(WAIT)
t.end()
}, 100)
})
for (var i = 0; i < writeCount; i ++) {
var a = new Buffer(writeSize);
for (var j = 0; j < writeSize; j ++) a[j] = "a".charCodeAt(0)
var b = new Buffer(writeSize);
for (var j = 0; j < writeSize; j ++) b[j] = "b".charCodeAt(0)
f.write(a)
f.write(b)
}
f.end()
})
}) }) })

View File

@ -1,27 +0,0 @@
var tap = require("tap")
, BlockStream = require("../block-stream.js")
tap.test("basic test", function (t) {
var b = new BlockStream(16)
var fs = require("fs")
var fstr = fs.createReadStream(__filename, {encoding: "utf8"})
fstr.pipe(b)
var stat
t.doesNotThrow(function () {
stat = fs.statSync(__filename)
}, "stat should not throw")
var totalBytes = 0
b.on("data", function (c) {
t.equal(c.length, 16, "chunks should be 16 bytes long")
t.type(c, Buffer, "chunks should be buffer objects")
totalBytes += c.length
})
b.on("end", function () {
var expectedBytes = stat.size + (16 - stat.size % 16)
t.equal(totalBytes, expectedBytes, "Should be multiple of 16")
t.end()
})
})

View File

@ -1,68 +0,0 @@
var BlockStream = require("../block-stream.js")
var blockSizes = [16, 25, 1024]
, writeSizes = [4, 8, 15, 16, 17, 64, 100]
, writeCounts = [1, 10, 100]
, tap = require("tap")
writeCounts.forEach(function (writeCount) {
blockSizes.forEach(function (blockSize) {
writeSizes.forEach(function (writeSize) {
tap.test("writeSize=" + writeSize +
" blockSize="+blockSize +
" writeCount="+writeCount, function (t) {
var f = new BlockStream(blockSize, {nopad: true })
var actualChunks = 0
var actualBytes = 0
var timeouts = 0
f.on("data", function (c) {
timeouts ++
actualChunks ++
actualBytes += c.length
// make sure that no data gets corrupted, and basic sanity
var before = c.toString()
// simulate a slow write operation
setTimeout(function () {
timeouts --
var after = c.toString()
t.equal(after, before, "should not change data")
// now corrupt it, to find leaks.
for (var i = 0; i < c.length; i ++) {
c[i] = "x".charCodeAt(0)
}
}, 100)
})
f.on("end", function () {
// round up to the nearest block size
var expectChunks = Math.ceil(writeSize * writeCount * 2 / blockSize)
var expectBytes = writeSize * writeCount * 2
t.equal(actualBytes, expectBytes,
"bytes=" + expectBytes + " writeSize=" + writeSize)
t.equal(actualChunks, expectChunks,
"chunks=" + expectChunks + " writeSize=" + writeSize)
// wait for all the timeout checks to finish, then end the test
setTimeout(function WAIT () {
if (timeouts > 0) return setTimeout(WAIT)
t.end()
}, 100)
})
for (var i = 0; i < writeCount; i ++) {
var a = new Buffer(writeSize);
for (var j = 0; j < writeSize; j ++) a[j] = "a".charCodeAt(0)
var b = new Buffer(writeSize);
for (var j = 0; j < writeSize; j ++) b[j] = "b".charCodeAt(0)
f.write(a)
f.write(b)
}
f.end()
})
}) }) })

View File

@ -1,57 +0,0 @@
var BlockStream = require("../")
var tap = require("tap")
tap.test("don't pad, small writes", function (t) {
var f = new BlockStream(16, { nopad: true })
t.plan(1)
f.on("data", function (c) {
t.equal(c.toString(), "abc", "should get 'abc'")
})
f.on("end", function () { t.end() })
f.write(new Buffer("a"))
f.write(new Buffer("b"))
f.write(new Buffer("c"))
f.end()
})
tap.test("don't pad, exact write", function (t) {
var f = new BlockStream(16, { nopad: true })
t.plan(1)
var first = true
f.on("data", function (c) {
if (first) {
first = false
t.equal(c.toString(), "abcdefghijklmnop", "first chunk")
} else {
t.fail("should only get one")
}
})
f.on("end", function () { t.end() })
f.end(new Buffer("abcdefghijklmnop"))
})
tap.test("don't pad, big write", function (t) {
var f = new BlockStream(16, { nopad: true })
t.plan(2)
var first = true
f.on("data", function (c) {
if (first) {
first = false
t.equal(c.toString(), "abcdefghijklmnop", "first chunk")
} else {
t.equal(c.toString(), "q")
}
})
f.on("end", function () { t.end() })
f.end(new Buffer("abcdefghijklmnopq"))
})

View File

@ -1,73 +0,0 @@
var BlockStream = require("../block-stream.js")
var blockSizes = [16]
, writeSizes = [15, 16, 17]
, writeCounts = [1, 10, 100]
, tap = require("tap")
writeCounts.forEach(function (writeCount) {
blockSizes.forEach(function (blockSize) {
writeSizes.forEach(function (writeSize) {
tap.test("writeSize=" + writeSize +
" blockSize="+blockSize +
" writeCount="+writeCount, function (t) {
var f = new BlockStream(blockSize)
var actualChunks = 0
var actualBytes = 0
var timeouts = 0
var paused = false
f.on("data", function (c) {
timeouts ++
t.notOk(paused, "should not be paused when emitting data")
actualChunks ++
actualBytes += c.length
// make sure that no data gets corrupted, and basic sanity
var before = c.toString()
// simulate a slow write operation
paused = true
f.pause()
process.nextTick(function () {
var after = c.toString()
t.equal(after, before, "should not change data")
// now corrupt it, to find leaks.
for (var i = 0; i < c.length; i ++) {
c[i] = "x".charCodeAt(0)
}
paused = false
f.resume()
timeouts --
})
})
f.on("end", function () {
// round up to the nearest block size
var expectChunks = Math.ceil(writeSize * writeCount * 2 / blockSize)
var expectBytes = expectChunks * blockSize
t.equal(actualBytes, expectBytes,
"bytes=" + expectBytes + " writeSize=" + writeSize)
t.equal(actualChunks, expectChunks,
"chunks=" + expectChunks + " writeSize=" + writeSize)
// wait for all the timeout checks to finish, then end the test
setTimeout(function WAIT () {
if (timeouts > 0) return setTimeout(WAIT)
t.end()
}, 200)
})
for (var i = 0; i < writeCount; i ++) {
var a = new Buffer(writeSize);
for (var j = 0; j < writeSize; j ++) a[j] = "a".charCodeAt(0)
var b = new Buffer(writeSize);
for (var j = 0; j < writeSize; j ++) b[j] = "b".charCodeAt(0)
f.write(a)
f.write(b)
}
f.end()
})
}) }) })

View File

@ -1,68 +0,0 @@
var BlockStream = require("../block-stream.js")
var blockSizes = [16, 25, 1024]
, writeSizes = [4, 8, 15, 16, 17, 64, 100]
, writeCounts = [1, 10, 100]
, tap = require("tap")
writeCounts.forEach(function (writeCount) {
blockSizes.forEach(function (blockSize) {
writeSizes.forEach(function (writeSize) {
tap.test("writeSize=" + writeSize +
" blockSize="+blockSize +
" writeCount="+writeCount, function (t) {
var f = new BlockStream(blockSize)
var actualChunks = 0
var actualBytes = 0
var timeouts = 0
f.on("data", function (c) {
timeouts ++
actualChunks ++
actualBytes += c.length
// make sure that no data gets corrupted, and basic sanity
var before = c.toString()
// simulate a slow write operation
setTimeout(function () {
timeouts --
var after = c.toString()
t.equal(after, before, "should not change data")
// now corrupt it, to find leaks.
for (var i = 0; i < c.length; i ++) {
c[i] = "x".charCodeAt(0)
}
}, 100)
})
f.on("end", function () {
// round up to the nearest block size
var expectChunks = Math.ceil(writeSize * writeCount * 2 / blockSize)
var expectBytes = expectChunks * blockSize
t.equal(actualBytes, expectBytes,
"bytes=" + expectBytes + " writeSize=" + writeSize)
t.equal(actualChunks, expectChunks,
"chunks=" + expectChunks + " writeSize=" + writeSize)
// wait for all the timeout checks to finish, then end the test
setTimeout(function WAIT () {
if (timeouts > 0) return setTimeout(WAIT)
t.end()
}, 100)
})
for (var i = 0; i < writeCount; i ++) {
var a = new Buffer(writeSize);
for (var j = 0; j < writeSize; j ++) a[j] = "a".charCodeAt(0)
var b = new Buffer(writeSize);
for (var j = 0; j < writeSize; j ++) b[j] = "b".charCodeAt(0)
f.write(a)
f.write(b)
}
f.end()
})
}) }) })

111
deps/npm/node_modules/fast-list/README.md generated vendored Normal file
View File

@ -0,0 +1,111 @@
# The Problem
You've got some thing where you need to push a bunch of stuff into a
queue and then shift it out. Or, maybe it's a stack, and you're just
pushing and popping it.
Arrays work for this, but are a bit costly performance-wise.
# The Solution
A linked-list implementation that takes advantage of what v8 is good at:
creating objects with a known shape.
This is faster for this use case. How much faster? About 50%.
$ node bench.js
benchmarking /Users/isaacs/dev-src/js/fast-list/bench.js
Please be patient.
{ node: '0.6.2-pre',
v8: '3.6.6.8',
ares: '1.7.5-DEV',
uv: '0.1',
openssl: '0.9.8l' }
Scores: (bigger is better)
new FastList()
Raw:
> 22556.39097744361
> 23054.755043227666
> 22770.398481973436
> 23414.634146341465
> 23099.133782483157
Average (mean) 22979.062486293868
[]
Raw:
> 12195.121951219513
> 12184.508268059182
> 12173.91304347826
> 12216.404886561955
> 12184.508268059182
Average (mean) 12190.891283475617
new Array()
Raw:
> 12131.715771230503
> 12184.508268059182
> 12216.404886561955
> 12195.121951219513
> 11940.298507462687
Average (mean) 12133.609876906768
Winner: new FastList()
Compared with next highest ([]), it's:
46.95% faster
1.88 times as fast
0.28 order(s) of magnitude faster
Compared with the slowest (new Array()), it's:
47.2% faster
1.89 times as fast
0.28 order(s) of magnitude faster
This lacks a lot of features that arrays have:
1. You can't specify the size at the outset.
2. It's not indexable.
3. There's no join, concat, etc.
If any of this matters for your use case, you're probably better off
using an Array object.
## Installing
```
npm install fast-list
```
## API
```javascript
var FastList = require("fast-list")
var list = new FastList()
list.push("foo")
list.unshift("bar")
list.push("baz")
console.log(list.length) // 2
console.log(list.pop()) // baz
console.log(list.shift()) // bar
console.log(list.shift()) // foo
```
### Methods
* `push`: Just like Array.push, but only can take a single entry
* `pop`: Just like Array.pop
* `shift`: Just like Array.shift
* `unshift`: Just like Array.unshift, but only can take a single entry
* `drop`: Drop all entries
* `item(n)`: Retrieve the nth item in the list. This involves a walk
every time. It's very slow. If you find yourself using this,
consider using a normal Array instead.
* `slice(start, end)`: Retrieve an array of the items at this position.
This involves a walk every time. It's very slow. If you find
yourself using this, consider using a normal Array instead.
### Members
* `length`: The number of things in the list. Note that, unlike
Array.length, this is not a getter/setter, but rather a counter that
is internally managed. Setting it can only cause harm.

55
deps/npm/node_modules/fast-list/bench.js generated vendored Normal file
View File

@ -0,0 +1,55 @@
var bench = require("bench")
var l = 1000
, FastList = require("./fast-list.js")
exports.countPerLap = l * 2
exports.compare =
{ "[]": function () {
var list = []
for (var j = 0; j < l; j ++) {
if (j % 2) list.push(j)
else list.unshift(j)
}
for (var j = 0; j < l; j ++) {
if (j % 2) list.shift(j)
else list.pop(j)
}
}
, "new Array()": function () {
var list = new Array()
for (var j = 0; j < l; j ++) {
if (j % 2) list.push(j)
else list.unshift(j)
}
for (var j = 0; j < l; j ++) {
if (j % 2) list.shift(j)
else list.pop(j)
}
}
// , "FastList()": function () {
// var list = FastList()
// for (var j = 0; j < l; j ++) {
// if (j % 2) list.push(j)
// else list.unshift(j)
// }
// for (var j = 0; j < l; j ++) {
// if (j % 2) list.shift(j)
// else list.pop(j)
// }
// }
, "new FastList()": function () {
var list = new FastList()
for (var j = 0; j < l; j ++) {
if (j % 2) list.push(j)
else list.unshift(j)
}
for (var j = 0; j < l; j ++) {
if (j % 2) list.shift(j)
else list.pop(j)
}
}
}
bench.runMain()

90
deps/npm/node_modules/fast-list/fast-list.js generated vendored Normal file
View File

@ -0,0 +1,90 @@
;(function() { // closure for web browsers
function Item (data, prev, next) {
this.next = next
if (next) next.prev = this
this.prev = prev
if (prev) prev.next = this
this.data = data
}
function FastList () {
if (!(this instanceof FastList)) return new FastList
this._head = null
this._tail = null
this.length = 0
}
FastList.prototype =
{ push: function (data) {
this._tail = new Item(data, this._tail, null)
if (!this._head) this._head = this._tail
this.length ++
}
, pop: function () {
if (this.length === 0) return undefined
var t = this._tail
this._tail = t.prev
if (t.prev) {
t.prev = this._tail.next = null
}
this.length --
if (this.length === 1) this._head = this._tail
else if (this.length === 0) this._head = this._tail = null
return t.data
}
, unshift: function (data) {
this._head = new Item(data, null, this._head)
if (!this._tail) this._tail = this._head
this.length ++
}
, shift: function () {
if (this.length === 0) return undefined
var h = this._head
this._head = h.next
if (h.next) {
h.next = this._head.prev = null
}
this.length --
if (this.length === 1) this._tail = this._head
else if (this.length === 0) this._head = this._tail = null
return h.data
}
, item: function (n) {
if (n < 0) n = this.length + n
var h = this._head
while (n-- > 0 && h) h = h.next
return h ? h.data : undefined
}
, slice: function (n, m) {
if (!n) n = 0
if (!m) m = this.length
if (m < 0) m = this.length + m
if (n < 0) n = this.length + n
if (m <= n) {
throw new Error("invalid offset: "+n+","+m)
}
var len = m - n
, ret = new Array(len)
, i = 0
, h = this._head
while (n-- > 0 && h) h = h.next
while (i < len && h) {
ret[i++] = h.data
h = h.next
}
return ret
}
, drop: function () {
FastList.call(this)
}
}
if ("undefined" !== typeof(exports)) module.exports = FastList
else if ("function" === typeof(define) && define.amd) {
define("FastList", function() { return FastList })
} else (function () { return this })().FastList = FastList
})()

20
deps/npm/node_modules/fast-list/package.json generated vendored Normal file
View File

@ -0,0 +1,20 @@
{
"author": "Isaac Z. Schlueter <i@izs.me> (http://blog.izs.me/)",
"name": "fast-list",
"description": "A fast linked list (good for queues, stacks, etc.)",
"version": "1.0.1",
"repository": {
"type": "git",
"url": "git://github.com/isaacs/fast-list.git"
},
"main": "fast-list.js",
"dependencies": {},
"devDependencies": {
"bench": "~0.3.2",
"tap": "~0.1.0"
},
"scripts": {
"test": "node test.js",
"bench": "node bench.js"
}
}

View File

@ -1,113 +0,0 @@
var fstream = require("../fstream.js")
var path = require("path")
var r = fstream.Reader({ path: path.dirname(__dirname)
, filter: function () {
return !this.basename.match(/^\./) &&
!this.basename.match(/^node_modules$/)
!this.basename.match(/^deep-copy$/)
}
})
var w = fstream.Writer({ path: path.resolve(__dirname, "deep-copy")
, type: "Directory"
})
var indent = ""
var escape = {}
r.on("entry", appears)
//r.on("ready", function () {
// appears(r)
//})
function appears (entry) {
console.error(indent + "a %s appears!", entry.type, entry.basename)
if (foggy) {
console.error("FOGGY!")
var p = entry
do {
console.error(p.depth, p.path, p._paused)
} while (p = p.parent)
throw new Error("\033[mshould not have entries while foggy")
}
indent += "\t"
entry.on("data", missile(entry))
entry.on("end", runaway(entry))
entry.on("entry", appears)
}
var foggy
function missile (entry) {
if (entry.type === "Directory") {
var ended = false
entry.once("end", function () { ended = true })
return function (c) {
// throw in some pathological pause()/resume() behavior
// just for extra fun.
process.nextTick(function () {
if (!foggy && !ended) { // && Math.random() < 0.3) {
console.error(indent +"%s casts a spell", entry.basename)
console.error("\na slowing fog comes over the battlefield...\n\033[32m")
entry.pause()
entry.once("resume", liftFog)
foggy = setTimeout(liftFog, 10)
function liftFog (who) {
if (!foggy) return
if (who) {
console.error("%s breaks the spell!", who && who.path)
} else {
console.error("the spell expires!")
}
console.error("\033[mthe fog lifts!\n")
clearTimeout(foggy)
foggy = null
if (entry._paused) entry.resume()
}
}
})
}
}
return function (c) {
var e = Math.random() < 0.5
console.error(indent + "%s %s for %d damage!",
entry.basename,
e ? "is struck" : "fires a chunk",
c.length)
}
}
function runaway (entry) { return function () {
var e = Math.random() < 0.5
console.error(indent + "%s %s",
entry.basename,
e ? "turns to flee" : "is vanquished!")
indent = indent.slice(0, -1)
}}
w.on("entry", attacks)
//w.on("ready", function () { attacks(w) })
function attacks (entry) {
console.error(indent + "%s %s!", entry.basename,
entry.type === "Directory" ? "calls for backup" : "attacks")
entry.on("entry", attacks)
}
ended = false
r.on("end", function () {
if (foggy) clearTimeout(foggy)
console.error("\033[mIT'S OVER!!")
console.error("A WINNAR IS YOU!")
ended = true
})
process.on("exit", function () {
console.error("ended? "+ended)
})
r.pipe(w)

View File

@ -1,29 +0,0 @@
var fstream = require("../fstream.js")
var path = require("path")
var r = fstream.Reader({ path: path.dirname(__dirname)
, filter: function () {
return !this.basename.match(/^\./)
}
})
console.error(r instanceof fstream.Reader)
console.error(r instanceof require("stream").Stream)
console.error(r instanceof require("events").EventEmitter)
console.error(r.on)
r.on("stat", function () {
console.error("a %s !!!\t", r.type, r.path)
})
r.on("entries", function (entries) {
console.error("\t" + entries.join("\n\t"))
})
r.on("entry", function (entry) {
console.error("a %s !!!\t", entry.type, entry.path)
})
r.on("end", function () {
console.error("IT'S OVER!!")
})

View File

@ -1,9 +0,0 @@
var fstream = require("../fstream.js")
fstream
.Writer({ path: "path/to/symlink"
, linkpath: "./file"
, isSymbolicLink: true
, mode: "0755" // octal strings supported
})
.end()

View File

@ -246,17 +246,7 @@ Writer.prototype._finish = function () {
? "utimes" : "lutimes"
if (utimes === "lutimes" && !fs[utimes]) {
if (!fs.futimes) fs.ltimes = function (a, b, c, cb) { return cb() }
else fs.lutimes = function (path, atime, mtime, cb) {
var c = require("constants")
fs.open(path, c.O_SYMLINK, function (er, fd) {
if (er) return cb(er)
fs.futimes(fd, atime, mtime, function (er) {
if (er) return cb(er)
fs.close(fd, cb)
})
})
}
utimes = "utimes"
}
var curA = current.atime

View File

@ -2,19 +2,19 @@
"author": "Isaac Z. Schlueter <i@izs.me> (http://blog.izs.me/)",
"name": "fstream",
"description": "Advanced file system stream things",
"version": "0.0.1",
"version": "0.1.1",
"repository": {
"type": "git",
"url": "git://github.com/isaacs/fstream.git"
},
"main": "fstream.js",
"engines": {
"node": "0.5 || 0.6"
"node": "0.5 || 0.6 || 0.7"
},
"dependencies": {
"rimraf": "~1.0.8",
"mkdirp": "~0.1.0",
"graceful-fs": "~1.0.1",
"graceful-fs": "1.1",
"inherits": "~1.0.0"
},
"devDependencies": {}

View File

@ -1,39 +1,189 @@
// wrapper around the non-sync fs functions to gracefully handle
// having too many file descriptors open. Note that this is
// *only* possible because async patterns let one interject timeouts
// and other cleverness anywhere in the process without disrupting
// anything else.
// this keeps a queue of opened file descriptors, and will make
// fs operations wait until some have closed before trying to open more.
var fs = require("fs")
, timeout = 0
, FastList = require("fast-list")
, queue = new FastList()
, curOpen = 0
, constants = require("constants")
Object.keys(fs)
.forEach(function (i) {
exports[i] = (typeof fs[i] !== "function") ? fs[i]
: (i.match(/^[A-Z]|^create|Sync$/)) ? function () {
return fs[i].apply(fs, arguments)
}
: graceful(fs[i])
})
exports = module.exports = fs
if (process.platform === "win32"
&& !process.binding("fs").lstat) {
exports.lstat = exports.stat
exports.lstatSync = exports.statSync
fs.MAX_OPEN = 256
fs._open = fs.open
fs._openSync = fs.openSync
fs._close = fs.close
fs._closeSync = fs.closeSync
// lstat on windows, missing from early 0.5 versions
if (process.platform === "win32" && !process.binding("fs").lstat) {
fs.lstat = fs.stat
fs.lstatSync = fs.statSync
}
function graceful (fn) { return function GRACEFUL () {
var args = Array.prototype.slice.call(arguments)
, cb_ = args.pop()
args.push(cb)
function cb (er) {
if (er && er.message.match(/^EMFILE, Too many open files/)) {
setTimeout(function () {
GRACEFUL.apply(fs, args)
}, timeout ++)
return
}
timeout = 0
cb_.apply(null, arguments)
// lutimes
var constants = require("constants")
if (!fs.lutimes) fs.lutimes = function (path, at, mt, cb) {
fs.open(path, constants.O_SYMLINK, function (er, fd) {
cb = cb || noop
if (er) return cb(er)
fs.futimes(fd, at, mt, function (er) {
if (er) {
fs.close(fd, function () {})
return cb(er)
}
fs.close(fd, cb)
})
})
}
if (!fs.lutimesSync) fs.lutimesSync = function (path, at, mt) {
var fd = fs.openSync(path, constants.O_SYMLINK)
fs.futimesSync(fd, at, mt)
fs.closeSync(fd)
}
// prevent EMFILE errors
function OpenReq (path, flags, mode, cb) {
this.path = path
this.flags = flags
this.mode = mode
this.cb = cb
}
function noop () {}
fs.open = function (path, flags, mode, cb) {
if (typeof mode === "function") cb = mode, mode = null
if (typeof cb !== "function") cb = noop
if (curOpen >= fs.MAX_OPEN) {
queue.push(new OpenReq(path, flags, mode, cb))
setTimeout(flush)
return
}
fn.apply(fs, args)
}}
open(path, flags, mode, cb)
}
function open (path, flags, mode, cb) {
cb = cb || noop
curOpen ++
fs._open(path, flags, mode, function (er, fd) {
if (er) {
onclose()
}
cb(er, fd)
})
}
fs.openSync = function (path, flags, mode) {
curOpen ++
return fs._openSync(path, flags, mode)
}
function onclose () {
curOpen --
flush()
}
function flush () {
while (curOpen < fs.MAX_OPEN) {
var req = queue.shift()
if (!req) break
open(req.path, req.flags, req.mode, req.cb)
}
if (queue.length === 0) return
}
fs.close = function (fd, cb) {
cb = cb || noop
fs._close(fd, function (er) {
onclose()
cb(er)
})
}
fs.closeSync = function (fd) {
onclose()
return fs._closeSync(fd)
}
// lchmod, broken prior to 0.6.2
// back-port the fix here.
if (constants.hasOwnProperty('O_SYMLINK') &&
process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)) {
fs.lchmod = function(path, mode, callback) {
callback = callback || noop;
fs.open(path, constants.O_WRONLY | constants.O_SYMLINK, function(err, fd) {
if (err) {
callback(err);
return;
}
// prefer to return the chmod error, if one occurs,
// but still try to close, and report closing errors if they occur.
fs.fchmod(fd, mode, function(err) {
fs.close(fd, function(err2) {
callback(err || err2);
});
});
});
};
fs.lchmodSync = function(path, mode) {
var fd = fs.openSync(path, constants.O_WRONLY | constants.O_SYMLINK);
// prefer to return the chmod error, if one occurs,
// but still try to close, and report closing errors if they occur.
var err, err2;
try {
var ret = fs.fchmodSync(fd, mode);
} catch (er) {
err = er;
}
try {
fs.closeSync(fd);
} catch (er) {
err2 = er;
}
if (err || err2) throw (err || err2);
return ret;
};
}
// lutimes, not yet implemented in node
if (constants.hasOwnProperty('O_SYMLINK') && !fs.lutimes) {
fs.lutimes = function (path, atime, mtime, cb) {
cb = cb || noop
fs.open(path, constants.O_SYMLINK | constants.O_WRONLY, function (er, fd) {
if (er) return cb(er)
fs.futimes(fd, atime, mtime, function (er) {
fs.close(fd, function (er2) {
cb(er || er2)
})
})
})
}
fs.lutimesSync = function(path, atime, mtime) {
var fd = fs.openSync(path, constants.O_WRONLY | constants.O_SYMLINK)
// prefer to return the chmod error, if one occurs,
// but still try to close, and report closing errors if they occur.
var err, err2
try {
var ret = fs.futimesSync(fd, atime, mtime)
} catch (er) {
err = er
}
try {
fs.closeSync(fd)
} catch (er) {
err2 = er
}
if (err || err2) throw (err || err2)
return ret
}
}

View File

@ -1,8 +1,8 @@
{
"author": "Isaac Z. Schlueter <i@izs.me> (http://blog.izs.me)",
"name": "graceful-fs",
"description": "fs with incremental backoff on EMFILE",
"version": "1.0.1",
"description": "fs monkey-patching to avoid EMFILE and other problems",
"version": "1.1.0",
"repository": {
"type": "git",
"url": "git://github.com/isaacs/node-graceful-fs.git"
@ -11,6 +11,8 @@
"engines": {
"node": "0.4 || 0.5 || 0.6"
},
"dependencies": {},
"dependencies": {
"fast-list": "1"
},
"devDependencies": {}
}

View File

@ -1,18 +0,0 @@
o = p
a with spaces = b c
; wrap in quotes to JSON-decode and preserve spaces
" xa n p " = "\"\r\nyoyoyo\r\r\n"
; a section
[a]
av = a val
e = { o: p, a: { av: a val, b: { c: { e: "this value" } } } }
j = "{ o: "p", a: { av: "a val", b: { c: { e: "this value" } } } }"
; nested child without middle parent
; should create otherwise-empty a.b
[a.b.c]
e = 1
j = 2

View File

@ -1,40 +0,0 @@
var i = require("../")
, tap = require("tap")
, test = tap.test
, fs = require("fs")
, path = require("path")
, fixture = path.resolve(__dirname, "./fixtures/foo.ini")
, data = fs.readFileSync(fixture, "utf8")
, d
, expectE = 'o = p\n'
+ 'a with spaces = b c\n'
+ '" xa n p " = "\\"\\r\\nyoyoyo\\r\\r\\n"\n'
+ '[a]\n'
+ 'av = a val\n'
+ 'e = { o: p, a: '
+ '{ av: a val, b: { c: { e: "this value" '
+ '} } } }\nj = "\\"{ o: \\"p\\", a: { av:'
+ ' \\"a val\\", b: { c: { e: \\"this value'
+ '\\" } } } }\\""\n[a.b.c]\ne = 1\nj = 2\n'
, expectD =
{ o: 'p',
'a with spaces': 'b c',
" xa n p ":'"\r\nyoyoyo\r\r\n',
a:
{ av: 'a val',
e: '{ o: p, a: { av: a val, b: { c: { e: "this value" } } } }',
j: '"{ o: "p", a: { av: "a val", b: { c: { e: "this value" } } } }"',
b: { c: { e: '1', j: '2' } } }
}
test("decode from file", function (t) {
d = i.decode(data)
t.deepEqual(d, expectD)
t.end()
})
test("encode from data", function (t) {
e = i.encode(expectD)
t.deepEqual(e, expectE)
t.end()
})

View File

@ -1,141 +0,0 @@
// http://www.bashcookbook.com/bashinfo/source/bash-1.14.7/tests/glob-test
var tap = require("tap")
, mm = require("../")
, files = [ "a", "b", "c", "d", "abc"
, "abd", "abe", "bb", "bcd"
, "ca", "cb", "dd", "de"
, "bdir/", "bdir/cfile"]
, next = files.concat([ "a-b", "aXb"
, ".x", ".y" ])
tap.test("basic tests", function (t) {
// [ pattern, [matches], MM opts, files, TAP opts]
; [ "http://www.bashcookbook.com/bashinfo" +
"/source/bash-1.14.7/tests/glob-test"
, ["a*", ["a", "abc", "abd", "abe"]]
, ["X*", ["X*"]]
// allow null glob expansion
, ["X*", [], { null: true }]
// isaacs: Slightly different than bash/sh/ksh
// \\* is not un-escaped to literal "*" in a failed match,
// but it does make it get treated as a literal star
, ["\\*", ["\\*"]]
, ["\\**", ["\\**"]]
, ["b*/", ["bdir/"]]
, ["c*", ["c", "ca", "cb"]]
, ["**", files]
, ["\\.\\./*/", ["\\.\\./*/"]]
, ["s/\\..*//", ["s/\\..*//"]]
// legendary larry crashes bashes
, ["/^root:/{s/^[^:]*:[^:]*:\([^:]*\).*$/\\1/"
, ["/^root:/{s/^[^:]*:[^:]*:\([^:]*\).*$/\\1/"]]
, ["/^root:/{s/^[^:]*:[^:]*:\([^:]*\).*$/\1/"
, ["/^root:/{s/^[^:]*:[^:]*:\([^:]*\).*$/\1/"]]
// character classes
, ["[a-c]b*", ["abc", "abd", "abe", "bb", "cb"]]
, ["[a-y]*[^c]", ["abd", "abe", "bb", "bcd",
"bdir/", "ca", "cb", "dd", "de"]]
, ["a*[^c]", ["abd", "abe"]]
, function () { files.push("a-b", "aXb") }
, ["a[X-]b", ["a-b", "aXb"]]
, function () { files.push(".x", ".y") }
, ["[^a-c]*", ["d", "dd", "de"]]
, function () { files.push("a*b/", "a*b/ooo") }
, ["a\\*b/*", ["a*b/ooo"]]
, ["a\\*?/*", ["a*b/ooo"]]
, ["*\\\\!*", [], {null: true}, ["echo !7"]]
, ["*\\!*", ["echo !7"], null, ["echo !7"]]
, ["*.\\*", ["r.*"], null, ["r.*"]]
, ["a[b]c", ["abc"]]
, ["a[\\b]c", ["abc"]]
, ["a?c", ["abc"]]
, ["a\\*c", [], {null: true}, ["abc"]]
, ["", [""], { null: true }, [""]]
, "http://www.opensource.apple.com/source/bash/bash-23/" +
"bash/tests/glob-test"
, function () { files.push("man/", "man/man1/", "man/man1/bash.1") }
, ["*/man*/bash.*", ["man/man1/bash.1"]]
, ["man/man1/bash.1", ["man/man1/bash.1"]]
, ["a***c", ["abc"], null, ["abc"]]
, ["a*****?c", ["abc"], null, ["abc"]]
, ["?*****??", ["abc"], null, ["abc"]]
, ["*****??", ["abc"], null, ["abc"]]
, ["?*****?c", ["abc"], null, ["abc"]]
, ["?***?****c", ["abc"], null, ["abc"]]
, ["?***?****?", ["abc"], null, ["abc"]]
, ["?***?****", ["abc"], null, ["abc"]]
, ["*******c", ["abc"], null, ["abc"]]
, ["*******?", ["abc"], null, ["abc"]]
, ["a*cd**?**??k", ["abcdecdhjk"], null, ["abcdecdhjk"]]
, ["a**?**cd**?**??k", ["abcdecdhjk"], null, ["abcdecdhjk"]]
, ["a**?**cd**?**??k***", ["abcdecdhjk"], null, ["abcdecdhjk"]]
, ["a**?**cd**?**??***k", ["abcdecdhjk"], null, ["abcdecdhjk"]]
, ["a**?**cd**?**??***k**", ["abcdecdhjk"], null, ["abcdecdhjk"]]
, ["a****c**?**??*****", ["abcdecdhjk"], null, ["abcdecdhjk"]]
, ["[-abc]", ["-"], null, ["-"]]
, ["[abc-]", ["-"], null, ["-"]]
, ["\\", ["\\"], null, ["\\"]]
, ["[\\\\]", ["\\"], null, ["\\"]]
, ["[[]", ["["], null, ["["]]
, ["[", ["["], null, ["["]]
, ["[*", ["[abc"], null, ["[abc"]]
, "a right bracket shall lose its special meaning and " +
"represent itself in a bracket expression if it occurs " +
"first in the list. -- POSIX.2 2.8.3.2"
, ["[]]", ["]"], null, ["]"]]
, ["[]-]", ["]"], null, ["]"]]
, ["[a-\z]", ["p"], null, ["p"]]
, ["[/\\\\]*", ["/tmp"], null, ["/tmp"]]
, ["??**********?****?", [], { null: true }, ["abc"]]
, ["??**********?****c", [], { null: true }, ["abc"]]
, ["?************c****?****", [], { null: true }, ["abc"]]
, ["*c*?**", [], { null: true }, ["abc"]]
, ["a*****c*?**", [], { null: true }, ["abc"]]
, ["a********???*******", [], { null: true }, ["abc"]]
, ["[]", [], { null: true }, ["a"]]
, ["[abc", [], { null: true }, ["["]]
, "nocase tests"
, ["XYZ", ["xYz"], { nocase: true, null: true }
, ["xYz", "ABC", "IjK"]]
, ["ab*", ["ABC"], { nocase: true, null: true }
, ["xYz", "ABC", "IjK"]]
, ["[ia]?[ck]", ["ABC", "IjK"], { nocase: true, null: true }
, ["xYz", "ABC", "IjK"]]
].forEach(function (c) {
if (typeof c === "function") return c()
if (typeof c === "string") return t.comment(c)
var pattern = c[0]
, expect = c[1].sort(alpha)
, options = c[2] || {}
, f = c[3] || files
, tapOpts = c[4] || {}
// options.debug = true
var r = mm.makeRe(pattern, options)
tapOpts.re = String(r) || JSON.stringify(r)
tapOpts.files = JSON.stringify(f)
tapOpts.pattern = pattern
var actual = mm.match(f, pattern, options)
t.equivalent( actual, expect
, JSON.stringify(pattern) + " " + JSON.stringify(expect)
, c[4] )
})
t.end()
})
function alpha (a, b) {
return a > b ? 1 : -1
}

View File

@ -1,6 +0,0 @@
var mkdirp = require('mkdirp');
mkdirp('/tmp/foo/bar/baz', 0755, function (err) {
if (err) console.error(err)
else console.log('pow!')
});

View File

@ -1,39 +0,0 @@
var mkdirp = require('../').mkdirp;
var path = require('path');
var fs = require('fs');
var test = require('tap').test;
var ps = [ '', 'tmp' ];
for (var i = 0; i < 25; i++) {
var dir = Math.floor(Math.random() * Math.pow(16,4)).toString(16);
ps.push(dir);
}
var file = ps.join('/');
test('chmod-pre', function (t) {
var mode = 0744
mkdirp(file, mode, function (er) {
t.ifError(er, 'should not error');
fs.stat(file, function (er, stat) {
t.ifError(er, 'should exist');
t.ok(stat && stat.isDirectory(), 'should be directory');
t.equal(stat && stat.mode & 0777, mode, 'should be 0744');
t.end();
});
});
});
test('chmod', function (t) {
var mode = 0755
mkdirp(file, mode, function (er) {
t.ifError(er, 'should not error');
fs.stat(file, function (er, stat) {
t.ifError(er, 'should exist');
t.ok(stat && stat.isDirectory(), 'should be directory');
t.equal(stat && stat.mode & 0777, mode, 'should be 0755');
t.end();
});
});
});

View File

@ -1,37 +0,0 @@
var mkdirp = require('../').mkdirp;
var path = require('path');
var fs = require('fs');
var test = require('tap').test;
var ps = [ '', 'tmp' ];
for (var i = 0; i < 25; i++) {
var dir = Math.floor(Math.random() * Math.pow(16,4)).toString(16);
ps.push(dir);
}
var file = ps.join('/');
// a file in the way
var itw = ps.slice(0, 3).join('/');
test('clobber-pre', function (t) {
console.error("about to write to "+itw)
fs.writeFileSync(itw, 'I AM IN THE WAY, THE TRUTH, AND THE LIGHT.');
fs.stat(itw, function (er, stat) {
t.ifError(er)
t.ok(stat && stat.isFile(), 'should be file')
t.end()
})
})
test('clobber', function (t) {
t.plan(2);
mkdirp(file, 0755, function (err) {
t.ok(err);
t.equal(err.code, 'ENOTDIR');
t.end();
});
});

View File

@ -1,28 +0,0 @@
var mkdirp = require('../');
var path = require('path');
var fs = require('fs');
var test = require('tap').test;
test('woo', function (t) {
t.plan(2);
var x = Math.floor(Math.random() * Math.pow(16,4)).toString(16);
var y = Math.floor(Math.random() * Math.pow(16,4)).toString(16);
var z = Math.floor(Math.random() * Math.pow(16,4)).toString(16);
var file = '/tmp/' + [x,y,z].join('/');
mkdirp(file, 0755, function (err) {
if (err) t.fail(err);
else path.exists(file, function (ex) {
if (!ex) t.fail('file not created')
else fs.stat(file, function (err, stat) {
if (err) t.fail(err)
else {
t.equal(stat.mode & 0777, 0755);
t.ok(stat.isDirectory(), 'target not a directory');
t.end();
}
})
})
});
});

View File

@ -1,41 +0,0 @@
var mkdirp = require('../').mkdirp;
var path = require('path');
var fs = require('fs');
var test = require('tap').test;
test('race', function (t) {
t.plan(4);
var ps = [ '', 'tmp' ];
for (var i = 0; i < 25; i++) {
var dir = Math.floor(Math.random() * Math.pow(16,4)).toString(16);
ps.push(dir);
}
var file = ps.join('/');
var res = 2;
mk(file, function () {
if (--res === 0) t.end();
});
mk(file, function () {
if (--res === 0) t.end();
});
function mk (file, cb) {
mkdirp(file, 0755, function (err) {
if (err) t.fail(err);
else path.exists(file, function (ex) {
if (!ex) t.fail('file not created')
else fs.stat(file, function (err, stat) {
if (err) t.fail(err)
else {
t.equal(stat.mode & 0777, 0755);
t.ok(stat.isDirectory(), 'target not a directory');
if (cb) cb();
}
})
})
});
}
});

View File

@ -1,32 +0,0 @@
var mkdirp = require('../');
var path = require('path');
var fs = require('fs');
var test = require('tap').test;
test('rel', function (t) {
t.plan(2);
var x = Math.floor(Math.random() * Math.pow(16,4)).toString(16);
var y = Math.floor(Math.random() * Math.pow(16,4)).toString(16);
var z = Math.floor(Math.random() * Math.pow(16,4)).toString(16);
var cwd = process.cwd();
process.chdir('/tmp');
var file = [x,y,z].join('/');
mkdirp(file, 0755, function (err) {
if (err) t.fail(err);
else path.exists(file, function (ex) {
if (!ex) t.fail('file not created')
else fs.stat(file, function (err, stat) {
if (err) t.fail(err)
else {
process.chdir(cwd);
t.equal(stat.mode & 0777, 0755);
t.ok(stat.isDirectory(), 'target not a directory');
t.end();
}
})
})
});
});

2
deps/npm/node_modules/node-uuid/.gitignore generated vendored Normal file
View File

@ -0,0 +1,2 @@
node_modules
.DS_Store

View File

@ -1,100 +1,195 @@
# node-uuid
Simple, fast generation of RFC4122[RFC4122(v4)](http://www.ietf.org/rfc/rfc4122.txt) UUIDS. It runs in node.js and all major browsers.
Simple, fast generation of [RFC4122](http://www.ietf.org/rfc/rfc4122.txt) UUIDS.
## Installation
Features:
npm install node-uuid
* Generate RFC4122 version 1 or version 4 UUIDs
* Runs in node.js and all browsers.
* Cryptographically strong random # generation on supporting platforms
* 1.1K minified and gzip'ed
### In browser
## Getting Started
<script src="uuid.js"></script>
Install it in your browser:
### In node.js
```html
<script src="uuid.js"></script>
```
var uuid = require('node-uuid');
Or in node.js:
## Usage
```
npm install node-uuid
```
### Generate a String UUID
```javascript
var uuid = require('node-uuid');
```
var id = uuid(); // -> '92329D39-6F5C-4520-ABFC-AAB64544E172'
Then create some ids ...
### Generate a Binary UUID
```javascript
// Generate a v1 (time-based) id
uuid.v1(); // -> '6c84fb90-12c4-11e1-840d-7b25c5ee775a'
// Simple form - allocates a Buffer/Array for you
var buf = uuid('binary');
// node.js -> <Buffer 08 50 05 c8 9c b2 4c 07 ac 07 d1 4f b9 f5 04 51>
// browser -> [8, 80, 5, 200, 156, 178, 76, 7, 172, 7, 209, 79, 185, 245, 4, 81]
// Generate a v4 (random) id
uuid.v4(); // -> '110ec58a-a0f2-4ac4-8393-c866d813b8d1'
```
// Provide your own Buffer or Array
var buf = new Array(16);
uuid('binary', buf); // -> [8, 80, 5, 200, 156, 178, 76, 7, 172, 7, 209, 79, 185, 245, 4, 81]
var buf = new Buffer(16);
uuid('binary', buf); // -> <Buffer 08 50 05 c8 9c b2 4c 07 ac 07 d1 4f b9 f5 04 51>
## API
// Provide your own Buffer/Array, plus specify offset
// (e.g. here we fill an array with 3 uuids)
var buf = new Buffer(16 \* 3);
uuid('binary', id, 0);
uuid('binary', id, 16);
uuid('binary', id, 32);
### uuid.v1([`options` [, `buffer` [, `offset`]]])
Generate and return a RFC4122 v1 (timestamp-based) UUID.
* `options` - (Object) Optional uuid state to apply. Properties may include:
* `node` - (Array) Node id as Array of 6 bytes (per 4.1.6). Default: Randomnly generated ID. See note 2.
* `clockseq` - (Number between 0 - 0x3fff) RFC clock sequence. Default: An internally maintained clockseq is used.
* `msecs` - (Number | Date) Time in milliseconds since unix Epoch. Default: The current time is used. See note 3.
* `nsecs` - (Number between 0-9999) additional time, in 100-nanosecond. Ignored if `msecs` is unspecified. Default: internal uuid counter is used, as per 4.2.1.2.
* `buffer` - (Array | Buffer) Array or buffer where UUID bytes are to be written.
* `offset` - (Number) Starting index in `buffer` at which to begin writing.
Returns `buffer`, if specified, otherwise the string form of the UUID
Notes:
1. The randomly generated node id is only guaranteed to stay constant for the lifetime of the current JS runtime. (Future versions of this module may use persistent storage mechanisms to extend this guarantee.)
1. Specifying the `msecs` option bypasses the internal logic for ensuring id uniqueness. In this case you may want to also provide `clockseq` and `nsecs` options as well.
Example: Generate string UUID with fully-specified options
```javascript
uuid.v1({
node: [0x01, 0x23, 0x45, 0x67, 0x89, 0xab],
clockseq: 0x1234,
msecs: new Date('2011-11-01').getTime(),
nsecs: 5678
}); // -> "710b962e-041c-11e1-9234-0123456789ab"
```
Example: In-place generation of two binary IDs
```javascript
// In browsers: 'new Array(32)'
var buffer = new Buffer(32).fill(0); // -> <Buffer 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00>
uuid.v1(null, buffer, 0); // -> <Buffer 02 a2 ce 90 14 32 11 e1 85 58 0b 48 8e 4f c1 15 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00>
uuid.v1(null, buffer, 16); // -> <Buffer 02 a2 ce 90 14 32 11 e1 85 58 0b 48 8e 4f c1 15 02 a3 1c b0 14 32 11 e1 85 58 0b 48 8e 4f c1 15>
// Optionally use uuid.unparse() to get stringify the ids
uuid.unparse(buffer); // -> '02a2ce90-1432-11e1-8558-0b488e4fc115'
uuid.unparse(buffer, 16) // -> '02a31cb0-1432-11e1-8558-0b488e4fc115'
```
### uuid.v4([`options` [, `buffer` [, `offset`]]])
Generate and return a RFC4122 v4 UUID.
* `options` - (Object) Optional uuid state to apply. Properties may include:
* `random` - (Number[16]) Array of 16 numbers (0-255) to use in place of randomly generated values
* `buffer` - (Array | Buffer) Array or buffer where UUID bytes are to be written.
* `offset` - (Number) Starting index in `buffer` at which to begin writing.
Returns `buffer`, if specified, otherwise the string form of the UUID
Example: Generate string UUID with fully-specified options
```javascript
uuid.v4({
random: [
0x10, 0x91, 0x56, 0xbe, 0xc4, 0xfb, 0xc1, 0xea,
0x71, 0xb4, 0xef, 0xe1, 0x67, 0x1c, 0x58, 0x36
]
});
// -> "109156be-c4fb-41ea-b1b4-efe1671c5836"
```
Example: Generate two IDs in a single buffer
```javascript
var buffer = new Array(32); // (or 'new Buffer' in node.js)
uuid.v4(null, buffer, 0);
uuid.v4(null, buffer, 16);
```
### uuid.parse(id[, buffer[, offset]])
### uuid.unparse(buffer[, offset])
Parse and unparse UUIDs
* `id` - (String) UUID(-like) string
* `buffer` - (Array | Buffer) Array or buffer where UUID bytes are to be written. Default: A new Array or Buffer is used
* `offset` - (Number) Starting index in `buffer` at which to begin writing. Default: 0
Example parsing and unparsing a UUID string
```javascript
var bytes = uuid.parse('797ff043-11eb-11e1-80d6-510998755d10'); // -> <Buffer 79 7f f0 43 11 eb 11 e1 80 d6 51 09 98 75 5d 10>
var string = uuid.unparse(bytes); // -> '797ff043-11eb-11e1-80d6-510998755d10'
```
### uuid.noConflict()
(Browsers only) Set `uuid` property back to it's previous value.
Returns the node-uuid object.
Example:
```javascript
var myUuid = uuid.noConflict();
myUuid.v1(); // -> '6c84fb90-12c4-11e1-840d-7b25c5ee775a'
```
## Deprecated APIs
Support for the following v1.2 APIs is available in v1.3, but is deprecated and will be removed in the next major version.
### uuid([format [, buffer [, offset]]])
uuid() has become uuid.v4(), and the `format` argument is now implicit in the `buffer` argument. (i.e. if you specify a buffer, the format is assumed to be binary).
### uuid.BufferClass
The class of container created when generating binary uuid data if no buffer argument is specified. This is expected to go away, with no replacement API.
## Testing
test/test.js generates performance data (similar to test/benchmark.js). It also verifies the syntax of 100K string UUIDs, and logs the distribution of hex digits found therein. For example:
In node.js
- - - Performance Data - - -
uuid(): 1052631 uuids/second
uuid('binary'): 680272 uuids/second
uuid('binary', buffer): 2702702 uuids/second
```
> cd test
> node uuid.js
```
- - - Distribution of Hex Digits (% deviation from ideal) - - -
0 |================================| 187705 (0.11%)
1 |================================| 187880 (0.2%)
2 |================================| 186875 (-0.33%)
3 |================================| 186847 (-0.35%)
4 |==================================================| 287433 (-0.02%)
5 |================================| 187910 (0.22%)
6 |================================| 188172 (0.36%)
7 |================================| 187350 (-0.08%)
8 |====================================| 211994 (-0.24%)
9 |====================================| 212664 (0.08%)
A |=====================================| 213185 (0.32%)
B |=====================================| 212877 (0.18%)
C |================================| 187445 (-0.03%)
D |================================| 186737 (-0.41%)
E |================================| 187155 (-0.18%)
F |================================| 187771 (0.14%)
In Browser
Note that the increased values for 4 and 8-B are expected as part of the RFC4122 syntax (and are accounted for in the deviation calculation). BTW, if someone wants to do the calculation to determine what a statistically significant deviation would be, I'll gladly add that to the test.
```
open test/test.html
```
### In browser
### Benchmarking
Open test/test.html
Requires node.js
### In node.js
```
npm install uuid uuid-js
node test/benchmark.js
```
> node test/test.js
For a more complete discussion of node-uuid performance, please see the `benchmark/README.md` file, and the [benchmark wiki](https://github.com/broofa/node-uuid/wiki/Benchmark)
node.js users can also run the node-uuid .vs. uuid.js benchmark:
For browser performance [checkout the JSPerf tests](http://jsperf.com/node-uuid-performance).
> node test/benchmark.js
### Release notes
## Performance
v1.3: Includes
### In node.js
node-uuid is designed to be fast. That said, the target platform is node.js, where it is screaming fast. Here's what I get on my 2.66GHz Macbook Pro for the test/benchmark.js script:
nodeuuid(): 1126126 uuids/second
nodeuuid('binary'): 782472 uuids/second
nodeuuid('binary', buffer): 2688172 uuids/second
uuidjs(): 620347 uuids/second
uuidjs('binary'): 1275510 uuids/second
The uuidjs() entries are for Nikhil Marathe's [uuidjs module](https://bitbucket.org/nikhilm/uuidjs), and are provided for comparison. uuidjs is a wrapper around the native libuuid library.
### In browser
node-uuid performance varies dramatically across browsers. For comprehensive test results, please [checkout the JSPerf tests](http://jsperf.com/node-uuid-performance).
* Support for version 1 ids, thanks to [@ctavan](https://github.com/ctavan)!
* Support for node.js crypto API
* De-emphasizing performance in favor of a) cryptographic quality PRNGs where available and b) more manageable code

53
deps/npm/node_modules/node-uuid/benchmark/README.md generated vendored Normal file
View File

@ -0,0 +1,53 @@
# node-uuid Benchmarks
### Results
To see the results of our benchmarks visit https://github.com/broofa/node-uuid/wiki/Benchmark
### Run them yourself
node-uuid comes with some benchmarks to measure performance of generating UUIDs. These can be run using node.js. node-uuid is being benchmarked against some other uuid modules, that are available through npm namely `uuid` and `uuid-js`.
To prepare and run the benchmark issue;
```
npm install uuid uuid-js
node benchmark/benchmark.js
```
You'll see an output like this one:
```
# v4
nodeuuid.v4(): 854700 uuids/second
nodeuuid.v4('binary'): 788643 uuids/second
nodeuuid.v4('binary', buffer): 1336898 uuids/second
uuid(): 479386 uuids/second
uuid('binary'): 582072 uuids/second
uuidjs.create(4): 312304 uuids/second
# v1
nodeuuid.v1(): 938086 uuids/second
nodeuuid.v1('binary'): 683060 uuids/second
nodeuuid.v1('binary', buffer): 1644736 uuids/second
uuidjs.create(1): 190621 uuids/second
```
* The `uuid()` entries are for Nikhil Marathe's [uuid module](https://bitbucket.org/nikhilm/uuidjs) which is a wrapper around the native libuuid library.
* The `uuidjs()` entries are for Patrick Negri's [uuid-js module](https://github.com/pnegri/uuid-js) which is a pure javascript implementation based on [UUID.js](https://github.com/LiosK/UUID.js) by LiosK.
If you want to get more reliable results you can run the benchmark multiple times and write the output into a log file:
```
for i in {0..9}; do node benchmark/benchmark.js >> benchmark/bench_0.4.12.log; done;
```
If you're interested in how performance varies between different node versions, you can issue the above command multiple times.
You can then use the shell script `bench.sh` provided in this directory to calculate the averages over all benchmark runs and draw a nice plot:
```
(cd benchmark/ && ./bench.sh)
```
This assumes you have [gnuplot](http://www.gnuplot.info/) and [ImageMagick](http://www.imagemagick.org/) installed. You'll find a nice `bench.png` graph in the `benchmark/` directory then.

175
deps/npm/node_modules/node-uuid/benchmark/bench.gnu generated vendored Normal file
View File

@ -0,0 +1,175 @@
#!/opt/local/bin/gnuplot -persist
#
#
# G N U P L O T
# Version 4.4 patchlevel 3
# last modified March 2011
# System: Darwin 10.8.0
#
# Copyright (C) 1986-1993, 1998, 2004, 2007-2010
# Thomas Williams, Colin Kelley and many others
#
# gnuplot home: http://www.gnuplot.info
# faq, bugs, etc: type "help seeking-assistance"
# immediate help: type "help"
# plot window: hit 'h'
set terminal postscript eps noenhanced defaultplex \
leveldefault color colortext \
solid linewidth 1.2 butt noclip \
palfuncparam 2000,0.003 \
"Helvetica" 14
set output 'bench.eps'
unset clip points
set clip one
unset clip two
set bar 1.000000 front
set border 31 front linetype -1 linewidth 1.000
set xdata
set ydata
set zdata
set x2data
set y2data
set timefmt x "%d/%m/%y,%H:%M"
set timefmt y "%d/%m/%y,%H:%M"
set timefmt z "%d/%m/%y,%H:%M"
set timefmt x2 "%d/%m/%y,%H:%M"
set timefmt y2 "%d/%m/%y,%H:%M"
set timefmt cb "%d/%m/%y,%H:%M"
set boxwidth
set style fill empty border
set style rectangle back fc lt -3 fillstyle solid 1.00 border lt -1
set style circle radius graph 0.02, first 0, 0
set dummy x,y
set format x "% g"
set format y "% g"
set format x2 "% g"
set format y2 "% g"
set format z "% g"
set format cb "% g"
set angles radians
unset grid
set key title ""
set key outside left top horizontal Right noreverse enhanced autotitles columnhead nobox
set key noinvert samplen 4 spacing 1 width 0 height 0
set key maxcolumns 2 maxrows 0
unset label
unset arrow
set style increment default
unset style line
set style line 1 linetype 1 linewidth 2.000 pointtype 1 pointsize default pointinterval 0
unset style arrow
set style histogram clustered gap 2 title offset character 0, 0, 0
unset logscale
set offsets graph 0.05, 0.15, 0, 0
set pointsize 1.5
set pointintervalbox 1
set encoding default
unset polar
unset parametric
unset decimalsign
set view 60, 30, 1, 1
set samples 100, 100
set isosamples 10, 10
set surface
unset contour
set clabel '%8.3g'
set mapping cartesian
set datafile separator whitespace
unset hidden3d
set cntrparam order 4
set cntrparam linear
set cntrparam levels auto 5
set cntrparam points 5
set size ratio 0 1,1
set origin 0,0
set style data points
set style function lines
set xzeroaxis linetype -2 linewidth 1.000
set yzeroaxis linetype -2 linewidth 1.000
set zzeroaxis linetype -2 linewidth 1.000
set x2zeroaxis linetype -2 linewidth 1.000
set y2zeroaxis linetype -2 linewidth 1.000
set ticslevel 0.5
set mxtics default
set mytics default
set mztics default
set mx2tics default
set my2tics default
set mcbtics default
set xtics border in scale 1,0.5 mirror norotate offset character 0, 0, 0
set xtics norangelimit
set xtics ()
set ytics border in scale 1,0.5 mirror norotate offset character 0, 0, 0
set ytics autofreq norangelimit
set ztics border in scale 1,0.5 nomirror norotate offset character 0, 0, 0
set ztics autofreq norangelimit
set nox2tics
set noy2tics
set cbtics border in scale 1,0.5 mirror norotate offset character 0, 0, 0
set cbtics autofreq norangelimit
set title ""
set title offset character 0, 0, 0 font "" norotate
set timestamp bottom
set timestamp ""
set timestamp offset character 0, 0, 0 font "" norotate
set rrange [ * : * ] noreverse nowriteback # (currently [8.98847e+307:-8.98847e+307] )
set autoscale rfixmin
set autoscale rfixmax
set trange [ * : * ] noreverse nowriteback # (currently [-5.00000:5.00000] )
set autoscale tfixmin
set autoscale tfixmax
set urange [ * : * ] noreverse nowriteback # (currently [-10.0000:10.0000] )
set autoscale ufixmin
set autoscale ufixmax
set vrange [ * : * ] noreverse nowriteback # (currently [-10.0000:10.0000] )
set autoscale vfixmin
set autoscale vfixmax
set xlabel ""
set xlabel offset character 0, 0, 0 font "" textcolor lt -1 norotate
set x2label ""
set x2label offset character 0, 0, 0 font "" textcolor lt -1 norotate
set xrange [ * : * ] noreverse nowriteback # (currently [-0.150000:3.15000] )
set autoscale xfixmin
set autoscale xfixmax
set x2range [ * : * ] noreverse nowriteback # (currently [0.00000:3.00000] )
set autoscale x2fixmin
set autoscale x2fixmax
set ylabel ""
set ylabel offset character 0, 0, 0 font "" textcolor lt -1 rotate by -270
set y2label ""
set y2label offset character 0, 0, 0 font "" textcolor lt -1 rotate by -270
set yrange [ 0.00000 : 1.90000e+06 ] noreverse nowriteback # (currently [:] )
set autoscale yfixmin
set autoscale yfixmax
set y2range [ * : * ] noreverse nowriteback # (currently [0.00000:1.90000e+06] )
set autoscale y2fixmin
set autoscale y2fixmax
set zlabel ""
set zlabel offset character 0, 0, 0 font "" textcolor lt -1 norotate
set zrange [ * : * ] noreverse nowriteback # (currently [-10.0000:10.0000] )
set autoscale zfixmin
set autoscale zfixmax
set cblabel ""
set cblabel offset character 0, 0, 0 font "" textcolor lt -1 rotate by -270
set cbrange [ * : * ] noreverse nowriteback # (currently [8.98847e+307:-8.98847e+307] )
set autoscale cbfixmin
set autoscale cbfixmax
set zero 1e-08
set lmargin -1
set bmargin -1
set rmargin -1
set tmargin -1
set locale "de_DE.UTF-8"
set pm3d explicit at s
set pm3d scansautomatic
set pm3d interpolate 1,1 flush begin noftriangles nohidden3d corners2color mean
set palette positive nops_allcF maxcolors 0 gamma 1.5 color model RGB
set palette rgbformulae 7, 5, 15
set colorbox default
set colorbox vertical origin screen 0.9, 0.2, 0 size screen 0.05, 0.6, 0 front bdefault
set loadpath
set fontpath
set fit noerrorvariables
GNUTERM = "aqua"
plot 'bench_results.txt' using 2:xticlabel(1) w lp lw 2, '' using 3:xticlabel(1) w lp lw 2, '' using 4:xticlabel(1) w lp lw 2, '' using 5:xticlabel(1) w lp lw 2, '' using 6:xticlabel(1) w lp lw 2, '' using 7:xticlabel(1) w lp lw 2, '' using 8:xticlabel(1) w lp lw 2, '' using 9:xticlabel(1) w lp lw 2
# EOF

34
deps/npm/node_modules/node-uuid/benchmark/bench.sh generated vendored Executable file
View File

@ -0,0 +1,34 @@
#!/bin/bash
# for a given node version run:
# for i in {0..9}; do node benchmark.js >> bench_0.6.2.log; done;
PATTERNS=('nodeuuid.v1()' "nodeuuid.v1('binary'," 'nodeuuid.v4()' "nodeuuid.v4('binary'," "uuid()" "uuid('binary')" 'uuidjs.create(1)' 'uuidjs.create(4)')
FILES=(node_uuid_v1_string node_uuid_v1_buf node_uuid_v4_string node_uuid_v4_buf libuuid_v4_string libuuid_v4_binary uuidjs_v1_string uuidjs_v4_string)
INDICES=(2 3 2 3 2 2 2 2)
VERSIONS=$( ls bench_*.log | sed -e 's/^bench_\([0-9\.]*\)\.log/\1/' | tr "\\n" " " )
TMPJOIN="tmp_join"
OUTPUT="bench_results.txt"
for I in ${!FILES[*]}; do
F=${FILES[$I]}
P=${PATTERNS[$I]}
INDEX=${INDICES[$I]}
echo "version $F" > $F
for V in $VERSIONS; do
(VAL=$( grep "$P" bench_$V.log | LC_ALL=en_US awk '{ sum += $'$INDEX' } END { print sum/NR }' ); echo $V $VAL) >> $F
done
if [ $I == 0 ]; then
cat $F > $TMPJOIN
else
join $TMPJOIN $F > $OUTPUT
cp $OUTPUT $TMPJOIN
fi
rm $F
done
rm $TMPJOIN
gnuplot bench.gnu
convert -density 200 -resize 800x560 -flatten bench.eps bench.png
rm bench.eps

52
deps/npm/node_modules/node-uuid/benchmark/benchmark.js generated vendored Normal file
View File

@ -0,0 +1,52 @@
var nodeuuid = require('../uuid'),
uuid = require('uuid').generate,
uuidjs = require('uuid-js'),
N = 5e5;
function rate(msg, t) {
console.log(msg + ': ' +
(N / (Date.now() - t) * 1e3 | 0) +
' uuids/second');
}
console.log('# v4');
// node-uuid - string form
for (var i = 0, t = Date.now(); i < N; i++) nodeuuid.v4();
rate('nodeuuid.v4()', t);
for (var i = 0, t = Date.now(); i < N; i++) nodeuuid.v4('binary');
rate('nodeuuid.v4(\'binary\')', t);
var buffer = new nodeuuid.BufferClass(16);
for (var i = 0, t = Date.now(); i < N; i++) nodeuuid.v4('binary', buffer);
rate('nodeuuid.v4(\'binary\', buffer)', t);
// libuuid - string form
for (var i = 0, t = Date.now(); i < N; i++) uuid();
rate('uuid()', t);
for (var i = 0, t = Date.now(); i < N; i++) uuid('binary');
rate('uuid(\'binary\')', t);
// uuid-js - string form
for (var i = 0, t = Date.now(); i < N; i++) uuidjs.create(4);
rate('uuidjs.create(4)', t);
console.log('');
console.log('# v1');
// node-uuid - v1 string form
for (var i = 0, t = Date.now(); i < N; i++) nodeuuid.v1();
rate('nodeuuid.v1()', t);
for (var i = 0, t = Date.now(); i < N; i++) nodeuuid.v1('binary');
rate('nodeuuid.v1(\'binary\')', t);
var buffer = new nodeuuid.BufferClass(16);
for (var i = 0, t = Date.now(); i < N; i++) nodeuuid.v1('binary', buffer);
rate('nodeuuid.v1(\'binary\', buffer)', t);
// uuid-js - v1 string form
for (var i = 0, t = Date.now(); i < N; i++) uuidjs.create(1);
rate('uuidjs.create(1)', t);

View File

@ -1,12 +1,14 @@
{
"name" : "node-uuid",
"description" : "Simple, fast generation of RFC4122(v4) UUIDs.",
"description" : "Rigorous implementation of RFC4122 (v1 and v4) UUIDs.",
"url" : "http://github.com/broofa/node-uuid",
"keywords" : ["uuid", "guid", "rfc4122"],
"author" : "Robert Kieffer <robert@broofa.com>",
"contributors" : [],
"contributors" : [
{"name": "Christoph Tavan <dev@tavan.de>", "github": "https://github.com/ctavan"}
],
"dependencies" : [],
"lib" : ".",
"main" : "./uuid.js",
"version" : "1.2.0"
"version" : "1.3.0"
}

View File

@ -1,27 +0,0 @@
var nodeuuid = require('../uuid'),
uuidjs = require('uuid').generate,
N = 5e5;
function rate(msg, t) {
console.log(msg + ': ' +
(N / (Date.now() - t) * 1e3 | 0) +
' uuids/second');
}
// node-uuid - string form
for (var i = 0, t = Date.now(); i < N; i++) nodeuuid();
rate('nodeuuid()', t);
for (var i = 0, t = Date.now(); i < N; i++) nodeuuid('binary');
rate('nodeuuid(\'binary\')', t);
var buffer = new nodeuuid.BufferClass(16);
for (var i = 0, t = Date.now(); i < N; i++) nodeuuid('binary', buffer);
rate('nodeuuid(\'binary\', buffer)', t);
// node-uuid - string form
for (var i = 0, t = Date.now(); i < N; i++) uuidjs();
rate('uuidjs()', t);
for (var i = 0, t = Date.now(); i < N; i++) uuidjs('binary');
rate('uuidjs(\'binary\')', t);

View File

@ -1,14 +0,0 @@
<html>
<head>
<style>
div {
font-family: monospace;
font-size: 8pt;
}
</style>
<script src="../uuid.js"></script>
</head>
<body>
<script src="./test.js"></script>
</body>
</html>

View File

@ -1,83 +0,0 @@
if (typeof(uuid) == 'undefined') {
uuid = require('../uuid');
}
var UUID_FORMAT = /[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89a-fAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}/;
var N = 1e5;
function log(msg) {
if (typeof(document) != 'undefined') {
document.write('<div>' + msg + '</div>');
}
if (typeof(console) != 'undefined') {
console.log(msg);
}
}
function rate(msg, t) {
log(msg + ': ' + (N / (Date.now() - t) * 1e3 | 0) + ' uuids/second');
}
// Perf tests
log('- - - Performance Data - - -');
for (var i = 0, t = Date.now(); i < N; i++) uuid();
rate('uuid()', t);
for (var i = 0, t = Date.now(); i < N; i++) uuid('binary');
rate('uuid(\'binary\')', t);
var buf = new uuid.BufferClass(16);
for (var i = 0, t = Date.now(); i < N; i++) uuid('binary', buf);
rate('uuid(\'binary\', buffer)', t);
var counts = {}, max = 0;
var b = new uuid.BufferClass(16);
for (var i = 0; i < N; i++) {
id = uuid();
if (!UUID_FORMAT.test(id)) {
throw Error(id + ' is not a valid UUID string');
}
if (id != uuid.unparse(uuid.parse(id))) {
throw Error(id + ' does not parse/unparse');
}
// Count digits for our randomness check
var digits = id.replace(/-/g, '').split('');
for (var j = digits.length-1; j >= 0; j--) {
var c = digits[j];
max = Math.max(max, counts[c] = (counts[c] || 0) + 1);
}
}
// Get %'age an actual value differs from the ideal value
function divergence(actual, ideal) {
return Math.round(100*100*(actual - ideal)/ideal)/100;
}
log('<br />- - - Distribution of Hex Digits (% deviation from ideal) - - -');
// Check randomness
for (var i = 0; i < 16; i++) {
var c = i.toString(16);
var bar = '', n = counts[c], p = Math.round(n/max*100|0);
// 1-3,5-8, and D-F: 1:16 odds over 30 digits
var ideal = N*30/16;
if (i == 4) {
// 4: 1:1 odds on 1 digit, plus 1:16 odds on 30 digits
ideal = N*(1 + 30/16);
} else if (i >= 8 && i <= 11) {
// 8-B: 1:4 odds on 1 digit, plus 1:16 odds on 30 digits
ideal = N*(1/4 + 30/16);
} else {
// Otherwise: 1:16 odds on 30 digits
ideal = N*30/16;
}
var d = divergence(n, ideal);
// Draw bar using UTF squares (just for grins)
var s = n/max*50 | 0;
while (s--) bar += '=';
log(c + ' |' + bar + '| ' + counts[c] + ' (' + d + '%)');
}

View File

@ -1,72 +1,243 @@
/*
* Generate RFC4122 (v1 and v4) UUIDs
*
* Documentation at https://github.com/broofa/node-uuid
*/
(function() {
/*
* Generate a RFC4122(v4) UUID
*
* Documentation at https://github.com/broofa/node-uuid
*/
var _global = this;
// Use node.js Buffer class if available, otherwise use the Array class
var BufferClass = typeof(Buffer) == 'function' ? Buffer : Array;
// Random number generator (feature-detected below)
var _rng;
// Buffer used for generating string uuids
var _buf = new BufferClass(16);
// node.js 'crypto' API
// http://nodejs.org/docs/v0.6.2/api/crypto.html#randomBytes
try {
_rng = require('crypto').randomBytes;
} catch (e) {}
// Cache number <-> hex string for octet values
var toString = [];
var toNumber = {};
for (var i = 0; i < 256; i++) {
toString[i] = (i + 0x100).toString(16).substr(1);
toNumber[toString[i]] = i;
// WHATWG crypto api, available in Chrome
// http://wiki.whatwg.org/wiki/Crypto
if (!_rng && _global.crypto && crypto.getRandomValues) {
var _rnds = new Uint32Array(4), _rndBytes = new Array(16);
var _rng = function() {
// Get 32-bit rnds
crypto.getRandomValues(_rnds);
// Unpack into byte array
for (var c = 0 ; c < 16; c++) {
_rndBytes[c] = _rnds[c >> 2] >>> ((c & 0x03) * 8) & 0xff;
}
return _rndBytes;
};
}
function parse(s) {
var buf = new BufferClass(16);
var i = 0, ton = toNumber;
s.toLowerCase().replace(/[0-9a-f][0-9a-f]/g, function(octet) {
buf[i++] = toNumber[octet];
// Math.random - least desirable option since it does not guarantee
// cryptographic quality.
if (!_rng) {
var _rndBytes = new Array(16);
_rng = function() {
var r, b = _rndBytes, i = 0;
for (var i = 0, r; i < 16; i++) {
if ((i & 0x03) == 0) r = Math.random() * 0x100000000;
b[i] = r >>> ((i & 0x03) << 3) & 0xff;
}
return b;
};
}
// Buffer class to use
var BufferClass = typeof(Buffer) == 'function' ? Buffer : Array;
// Maps for number <-> hex string conversion
var _byteToHex = [];
var _hexToByte = {};
for (var i = 0; i < 256; i++) {
_byteToHex[i] = (i + 0x100).toString(16).substr(1);
_hexToByte[_byteToHex[i]] = i;
}
/** See docs at https://github.com/broofa/node-uuid */
function parse(s, buf, offset) {
var i = (buf && offset) || 0, ii = 0;
buf = buf || [];
s.toLowerCase().replace(/[0-9a-f]{2}/g, function(byte) {
if (ii < 16) { // Don't overflow!
buf[i + ii++] = _hexToByte[byte];
}
});
// Zero out remaining bytes if string was short
while (ii < 16) {
buf[i + ii] = 0;
}
return buf;
}
function unparse(buf) {
var tos = toString, b = buf;
return tos[b[0]] + tos[b[1]] + tos[b[2]] + tos[b[3]] + '-' +
tos[b[4]] + tos[b[5]] + '-' +
tos[b[6]] + tos[b[7]] + '-' +
tos[b[8]] + tos[b[9]] + '-' +
tos[b[10]] + tos[b[11]] + tos[b[12]] +
tos[b[13]] + tos[b[14]] + tos[b[15]];
/** See docs at https://github.com/broofa/node-uuid */
function unparse(buf, offset) {
var i = offset || 0, bth = _byteToHex;
return bth[buf[i++]] + bth[buf[i++]] +
bth[buf[i++]] + bth[buf[i++]] + '-' +
bth[buf[i++]] + bth[buf[i++]] + '-' +
bth[buf[i++]] + bth[buf[i++]] + '-' +
bth[buf[i++]] + bth[buf[i++]] + '-' +
bth[buf[i++]] + bth[buf[i++]] +
bth[buf[i++]] + bth[buf[i++]] +
bth[buf[i++]] + bth[buf[i++]];
}
var b32 = 0x100000000, ff = 0xff;
function uuid(fmt, buf, offset) {
var b = fmt != 'binary' ? _buf : (buf ? buf : new BufferClass(16));
// Pre allocate array for constructing uuids
var _buffer = new BufferClass(16);
//
// v1 UUID support
//
// Inspired by https://github.com/LiosK/UUID.js
// and http://docs.python.org/library/uuid.html
//
// Per 4.1.4 - Offset (in msecs) from JS time to UUID (gregorian) time
var EPOCH_OFFSET = 12219292800000;
// random #'s we need to init node and clockseq
var _seedBytes = _rng(10);
// Per 4.5, create and 48-bit node id, (47 random bits + multicast bit = 1)
var _nodeId = [
_seedBytes[0] | 0x01,
_seedBytes[1], _seedBytes[2], _seedBytes[3], _seedBytes[4], _seedBytes[5]
];
// Per 4.2.2, randomize (14 bit) clockseq
var _clockSeq = (_seedBytes[6] << 8 | _seedBytes[7]) & 0x3fff;
// Previous uuid creation time
var _last = 0;
// Count of UUIDs created during current time tick
var _count = 0;
/** See docs at https://github.com/broofa/node-uuid */
function v1(options, buf, offset) {
var i = buf && offset || 0;
var b = buf || _buffer;
var r = Math.random()*b32;
b[i++] = r & ff;
b[i++] = r>>>8 & ff;
b[i++] = r>>>16 & ff;
b[i++] = r>>>24 & ff;
r = Math.random()*b32;
b[i++] = r & ff;
b[i++] = r>>>8 & ff;
b[i++] = r>>>16 & 0x0f | 0x40; // See RFC4122 sect. 4.1.3
b[i++] = r>>>24 & ff;
r = Math.random()*b32;
b[i++] = r & 0x3f | 0x80; // See RFC4122 sect. 4.4
b[i++] = r>>>8 & ff;
b[i++] = r>>>16 & ff;
b[i++] = r>>>24 & ff;
r = Math.random()*b32;
b[i++] = r & ff;
b[i++] = r>>>8 & ff;
b[i++] = r>>>16 & ff;
b[i++] = r>>>24 & ff;
options = options || {};
return fmt === undefined ? unparse(b) : b;
};
// JS Numbers aren't capable of representing time in the RFC-specified
// 100-nanosecond units. To deal with this, we represent time as the usual
// JS milliseconds, plus an additional 100-nanosecond unit offset.
var msecs = 0; // JS time (msecs since Unix epoch)
var nsecs = 0; // additional 100-nanosecond units to add to msecs
if (options.msecs != null) {
// Explicit time specified. Not that this turns off the internal logic
// around uuid count and clock sequence used insure uniqueness
msecs = (+options.msecs) + EPOCH_OFFSET;
nsecs = options.nsecs || 0;
} else {
// No time options - Follow the RFC logic (4.2.1.2) for maintaining
// clock seq and uuid count to help insure UUID uniqueness.
msecs = new Date().getTime() + EPOCH_OFFSET;
if (msecs < _last) {
// Clock regression - Per 4.2.1.2, increment clock seq
_clockSeq++;
_count = 0;
} else {
// Per 4.2.1.2, use a count of uuid's generated during the current
// clock cycle to simulate higher resolution clock
_count = (msecs == _last) ? _count + 1 : 0;
}
_last = msecs;
// Per 4.2.1.2 If generator creates more than one id per uuid 100-ns
// interval, throw an error
// (Requires generating > 10M uuids/sec. While unlikely, it's not
// entirely inconceivable given the benchmark results we're getting)
if (_count >= 10000) {
throw new Error('uuid.v1(): Can\'t create more than 10M uuids/sec');
}
nsecs = _count;
}
// Per 4.1.4, timestamp composition
// time_low
var tl = ((msecs & 0xfffffff) * 10000 + nsecs) % 0x100000000;
b[i++] = tl >>> 24 & 0xff;
b[i++] = tl >>> 16 & 0xff;
b[i++] = tl >>> 8 & 0xff;
b[i++] = tl & 0xff;
// time_mid
var tmh = (msecs / 0x100000000 * 10000) & 0xfffffff;
b[i++] = tmh >>> 8 & 0xff;
b[i++] = tmh & 0xff;
// time_high_and_version
b[i++] = tmh >>> 24 & 0xf | 0x10; // include version
b[i++] = tmh >>> 16 & 0xff;
// Clock sequence
var cs = options.clockseq != null ? options.clockseq : _clockSeq;
// clock_seq_hi_and_reserved (Per 4.2.2 - include variant)
b[i++] = cs >>> 8 | 0x80;
// clock_seq_low
b[i++] = cs & 0xff;
// node
var node = options.node || _nodeId;
for (var n = 0; n < 6; n++) {
b[i + n] = node[n];
}
return buf ? buf : unparse(b);
}
//
// v4 UUID support
//
/** See docs at https://github.com/broofa/node-uuid */
function v4(options, buf, offset) {
// Deprecated - 'format' argument, as supported in v1.2
var i = buf && offset || 0;
if (typeof(options) == 'string') {
buf = options == 'binary' ? new BufferClass(16) : null;
options = null;
}
var rnds = options && options.random || _rng(16);
// Per 4.4, set bits for version and clock_seq_hi_and_reserved
rnds[6] = (rnds[6] & 0x0f) | 0x40;
rnds[8] = (rnds[8] & 0x3f) | 0x80;
// Copy bytes to buffer, if provided
if (buf) {
for (var ii = 0; ii < 16; ii++) {
buf[i + ii] = rnds[ii];
}
}
return buf || unparse(rnds);
}
//
// Export API
//
var uuid = v4;
uuid.v1 = v1;
uuid.v4 = v4;
uuid.parse = parse;
uuid.unparse = unparse;
uuid.BufferClass = BufferClass;
@ -74,7 +245,11 @@
if (typeof(module) != 'undefined') {
module.exports = uuid;
} else {
// In browser? Set as top-level function
this.uuid = uuid;
var _previousRoot = _global.uuid;
uuid.noConflict = function() {
_global.uuid = _previousRoot;
return uuid;
}
_global.uuid = uuid;
}
})();
}());

View File

@ -121,7 +121,9 @@ interpreted as a number.
You can also mix types and values, or multiple types, in a list. For
instance `{ blah: [Number, null] }` would allow a value to be set to
either a Number or null.
either a Number or null. When types are ordered, this implies a
preference, and the first type that can be used to properly interpret
the value will be used.
To define a new type, add it to `nopt.typeDefs`. Each item in that
hash is an object with a `type` member and a `validate` method. The

View File

@ -1,30 +0,0 @@
#!/usr/bin/env node
//process.env.DEBUG_NOPT = 1
// my-program.js
var nopt = require("../lib/nopt")
, Stream = require("stream").Stream
, path = require("path")
, knownOpts = { "foo" : [String, null]
, "bar" : [Stream, Number]
, "baz" : path
, "bloo" : [ "big", "medium", "small" ]
, "flag" : Boolean
, "pick" : Boolean
}
, shortHands = { "foofoo" : ["--foo", "Mr. Foo"]
, "b7" : ["--bar", "7"]
, "m" : ["--bloo", "medium"]
, "p" : ["--pick"]
, "f" : ["--flag", "true"]
, "g" : ["--flag"]
, "s" : "--flag"
}
// everything is optional.
// knownOpts and shorthands default to {}
// arg list defaults to process.argv
// slice defaults to 2
, parsed = nopt(knownOpts, shortHands, process.argv, 2)
console.log("parsed =\n"+ require("util").inspect(parsed))

View File

@ -93,6 +93,54 @@ http.createServer(function (req, resp) {
You can still use intermediate proxies, the requests will still follow HTTP forwards, etc.
## OAuth Signing
```javascript
// Twitter OAuth
var qs = require('querystring')
, oauth =
{ callback: 'http://mysite.com/callback/'
, consumer_key: CONSUMER_KEY
, consumer_secret: CONSUMER_SECRET
}
, url = 'https://api.twitter.com/oauth/request_token'
;
request.post({url:url, oauth:oauth}, function (e, r, body) {
// Assume by some stretch of magic you aquired the verifier
var access_token = qs.parse(body)
, oauth =
{ consumer_key: CONSUMER_KEY
, consumer_secret: CONSUMER_SECRET
, token: access_token.oauth_token
, verifier: VERIFIER
, token_secret: access_token.oauth_token_secret
}
, url = 'https://api.twitter.com/oauth/access_token'
;
request.post({url:url, oauth:oauth}, function (e, r, body) {
var perm_token = qs.parse(body)
, oauth =
{ consumer_key: CONSUMER_KEY
, consumer_secret: CONSUMER_SECRET
, token: perm_token.oauth_token
, token_secret: perm_token.oauth_token_secret
}
, url = 'https://api.twitter.com/1/users/show.json?'
, params =
{ screen_name: perm_token.screen_name
, user_id: perm_token.user_id
}
;
url += qs.stringify(params)
request.get({url:url, oauth:oauth, json:true}, function (e, r, user) {
console.log(user)
})
})
})
```
### request(options, callback)
The first argument can be either a url or an options object. The only required option is uri, all others are optional.
@ -111,7 +159,9 @@ The first argument can be either a url or an options object. The only required o
* `pool.maxSockets` - Integer containing the maximum amount of sockets in the pool.
* `timeout` - Integer containing the number of milliseconds to wait for a request to respond before aborting the request
* `proxy` - An HTTP proxy to be used. Support proxy Auth with Basic Auth the same way it's supported with the `url` parameter by embedding the auth info in the uri.
* `oauth` - Options for OAuth HMAC-SHA1 signing, see documentation above.
* `strictSSL` - Set to `true` to require that SSL certificates be valid. Note: to use your own certificate authority, you need to specify an agent that was created with that ca as an option.
* `jar` - Set to `false` if you don't want cookies to be remembered for future use or define your custom cookie jar (see examples section)
The callback argument gets 3 arguments. The first is an error when applicable (usually from the http.Client option not the http.ClientRequest object). The second in an http.ClientResponse object. The third is the response body buffer.
@ -163,6 +213,20 @@ Alias to normal request method for uniformity.
```javascript
request.get(url)
```
### request.cookie
Function that creates a new cookie.
```javascript
request.cookie('cookie_string_here')
```
### request.jar
Function that creates a new cookie jar.
```javascript
request.jar()
```
## Examples:
@ -191,3 +255,31 @@ request.get(url)
}
)
```
Cookies are enabled by default (so they can be used in subsequent requests). To disable cookies set jar to false (either in defaults or in the options sent).
```javascript
var request = request.defaults({jar: false})
request('http://www.google.com', function () {
request('http://images.google.com')
})
```
If you to use a custom cookie jar (instead of letting request use its own global cookie jar) you do so by setting the jar default or by specifying it as an option:
```javascript
var j = request.jar()
var request = request.defaults({jar:j})
request('http://www.google.com', function () {
request('http://images.google.com')
})
```
OR
```javascript
var j = request.jar()
var cookie = request.cookie('your_cookie_here')
j.add(cookie)
request({url: 'http://www.google.com', jar: j}, function () {
request('http://images.google.com')
})
```

122
deps/npm/node_modules/request/main.js generated vendored
View File

@ -20,6 +20,11 @@ var http = require('http')
, stream = require('stream')
, qs = require('querystring')
, mimetypes = require('./mimetypes')
, oauth = require('./oauth')
, uuid = require('./uuid')
, Cookie = require('./vendor/cookie')
, CookieJar = require('./vendor/cookie/jar')
, cookieJar = new CookieJar
;
try {
@ -135,6 +140,19 @@ Request.prototype.request = function () {
setHost = true
}
if (self.jar === false) {
// disable cookies
var cookies = false;
self._disableCookies = true;
} else if (self.jar) {
// fetch cookie from the user defined cookie jar
var cookies = self.jar.get({ url: self.uri.href })
} else {
// fetch cookie from the global cookie jar
var cookies = cookieJar.get({ url: self.uri.href })
}
if (cookies) {self.headers.Cookie = cookies}
if (!self.uri.pathname) {self.uri.pathname = '/'}
if (!self.uri.port) {
if (self.uri.protocol == 'http:') {self.uri.port = 80}
@ -162,6 +180,52 @@ Request.prototype.request = function () {
if (self.onResponse) self.on('error', function (e) {self.onResponse(e)})
if (self.callback) self.on('error', function (e) {self.callback(e)})
if (self.form) {
self.headers['content-type'] = 'application/x-www-form-urlencoded; charset=utf-8'
self.body = qs.stringify(self.form).toString('utf8')
}
if (self.oauth) {
var form
if (self.headers['content-type'] &&
self.headers['content-type'].slice(0, 'application/x-www-form-urlencoded'.length) ===
'application/x-www-form-urlencoded'
) {
form = qs.parse(self.body)
}
if (self.uri.query) {
form = qs.parse(self.uri.query)
}
if (!form) form = {}
var oa = {}
for (i in form) oa[i] = form[i]
for (i in self.oauth) oa['oauth_'+i] = self.oauth[i]
if (!oa.oauth_version) oa.oauth_version = '1.0'
if (!oa.oauth_timestamp) oa.oauth_timestamp = Math.floor( (new Date()).getTime() / 1000 ).toString()
if (!oa.oauth_nonce) oa.oauth_nonce = uuid().replace(/-/g, '')
oa.oauth_signature_method = 'HMAC-SHA1'
var consumer_secret = oa.oauth_consumer_secret
delete oa.oauth_consumer_secret
var token_secret = oa.oauth_token_secret
delete oa.oauth_token_secret
var baseurl = self.uri.protocol + '//' + self.uri.host + self.uri.pathname
var signature = oauth.hmacsign(self.method, baseurl, oa, consumer_secret, token_secret)
// oa.oauth_signature = signature
for (i in form) {
if ( i.slice(0, 'oauth_') in self.oauth) {
// skip
} else {
delete oa['oauth_'+i]
}
}
self.headers.authorization =
'OAuth '+Object.keys(oa).sort().map(function (i) {return i+'="'+encodeURIComponent(oa[i])+'"'}).join(',')
self.headers.authorization += ',oauth_signature="'+encodeURIComponent(signature)+'"'
}
if (self.uri.auth && !self.headers.authorization) {
self.headers.authorization = "Basic " + toBase64(self.uri.auth.split(':').map(function(item){ return qs.unescape(item)}).join(':'))
@ -189,7 +253,7 @@ Request.prototype.request = function () {
}
} else if (self.multipart) {
self.body = ''
self.body = [];
self.headers['content-type'] = 'multipart/related;boundary="frontier"'
if (!self.multipart.forEach) throw new Error('Argument error, options.multipart.')
@ -197,21 +261,34 @@ Request.prototype.request = function () {
var body = part.body
if(!body) throw Error('Body attribute missing in multipart.')
delete part.body
self.body += '--frontier\r\n'
var preamble = '--frontier\r\n'
Object.keys(part).forEach(function(key){
self.body += key + ': ' + part[key] + '\r\n'
preamble += key + ': ' + part[key] + '\r\n'
})
self.body += '\r\n' + body + '\r\n'
preamble += '\r\n';
self.body.push(new Buffer(preamble));
self.body.push(new Buffer(body));
self.body.push(new Buffer('\r\n'));
})
self.body += '--frontier--'
self.body.push(new Buffer('--frontier--'));
}
if (self.body) {
var length = 0;
if (!Buffer.isBuffer(self.body)) {
self.body = new Buffer(self.body)
if (Array.isArray(self.body)) {
for (var i = 0; i < self.body.length; i++) {
length += self.body[i].length;
}
} else {
self.body = new Buffer(self.body)
length = self.body.length;
}
} else {
length = self.body.length;
}
if (self.body.length) {
self.headers['content-length'] = self.body.length
if (length) {
self.headers['content-length'] = length;
} else {
throw new Error('Argument error, options.body.')
}
@ -358,6 +435,18 @@ Request.prototype.request = function () {
response.body = JSON.parse(response.body)
} catch (e) {}
}
if (response.statusCode == 200 && response.headers['set-cookie'] && (!self._disableCookies)) {
response.headers['set-cookie'].forEach(function(cookie) {
if (self.jar) {
// custom defined jar
self.jar.add(new Cookie(cookie));
} else {
// add to the global cookie jar if user don't define his own
cookieJar.add(new Cookie(cookie));
}
});
}
self.callback(null, response, response.body)
})
}
@ -402,7 +491,13 @@ Request.prototype.request = function () {
process.nextTick(function () {
if (self.body) {
self.write(self.body)
if (Array.isArray(self.body)) {
self.body.forEach(function(part) {
self.write(part);
});
} else {
self.write(self.body)
}
self.end()
} else if (self.requestBodyStream) {
console.warn("options.requestBodyStream is deprecated, please pass the request object to stream.pipe.")
@ -477,6 +572,8 @@ request.defaults = function (options) {
de.put = def(request.put)
de.head = def(request.head)
de.del = def(request.del)
de.cookie = def(request.cookie)
de.jar = def(request.jar)
return de
}
@ -504,3 +601,10 @@ request.del = function (options, callback) {
options.method = 'DELETE'
return request(options, callback)
}
request.jar = function () {
return new CookieJar
}
request.cookie = function (str) {
if (typeof str !== 'string') throw new Error("The cookie function only accepts STRING as param")
return new Cookie(str)
}

23
deps/npm/node_modules/request/oauth.js generated vendored Normal file
View File

@ -0,0 +1,23 @@
var crypto = require('crypto')
, qs = require('querystring')
;
function sha1 (key, body) {
return crypto.createHmac('sha1', key).update(body).digest('base64')
}
function hmacsign (httpMethod, base_uri, params, consumer_secret, token_secret, body) {
// adapted from https://dev.twitter.com/docs/auth/oauth
var base =
httpMethod + "&" +
encodeURIComponent( base_uri ) + "&" +
Object.keys(params).sort().map(function (i) {
// big WTF here with the escape + encoding but it's what twitter wants
return encodeURIComponent(qs.escape(i)) + "%3D" + encodeURIComponent(qs.escape(params[i]))
}).join("%26")
var key = consumer_secret + '&'
if (token_secret) key += token_secret
return sha1(key, base)
}
exports.hmacsign = hmacsign

View File

@ -1,7 +1,7 @@
{ "name" : "request"
, "description" : "Simplified HTTP request client."
, "tags" : ["http", "simple", "util", "utility"]
, "version" : "2.1.1"
, "version" : "2.2.0"
, "author" : "Mikeal Rogers <mikeal.rogers@gmail.com>"
, "repository" :
{ "type" : "git"

Binary file not shown.

Before

Width:  |  Height:  |  Size: 38 KiB

View File

@ -1,6 +0,0 @@
FAILS=0
for i in tests/test-*.js; do
echo $i
node $i || let FAILS++
done
exit $FAILS

View File

@ -1,57 +0,0 @@
var http = require('http')
, events = require('events')
, stream = require('stream')
, assert = require('assert')
;
exports.createServer = function (port) {
port = port || 6767
var s = http.createServer(function (req, resp) {
s.emit(req.url, req, resp);
})
s.port = port
s.url = 'http://localhost:'+port
return s;
}
exports.createPostStream = function (text) {
var postStream = new stream.Stream();
postStream.writeable = true;
postStream.readable = true;
setTimeout(function () {postStream.emit('data', new Buffer(text)); postStream.emit('end')}, 0);
return postStream;
}
exports.createPostValidator = function (text) {
var l = function (req, resp) {
var r = '';
req.on('data', function (chunk) {r += chunk})
req.on('end', function () {
if (r !== text) console.log(r, text);
assert.equal(r, text)
resp.writeHead(200, {'content-type':'text/plain'})
resp.write('OK')
resp.end()
})
}
return l;
}
exports.createGetResponse = function (text, contentType) {
var l = function (req, resp) {
contentType = contentType || 'text/plain'
resp.writeHead(200, {'content-type':contentType})
resp.write(text)
resp.end()
}
return l;
}
exports.createChunkResponse = function (chunks, contentType) {
var l = function (req, resp) {
contentType = contentType || 'text/plain'
resp.writeHead(200, {'content-type':contentType})
chunks.forEach(function (chunk) {
resp.write(chunk)
})
resp.end()
}
return l;
}

View File

@ -1,90 +0,0 @@
var server = require('./server')
, events = require('events')
, stream = require('stream')
, assert = require('assert')
, request = require('../main.js')
;
var s = server.createServer();
var tests =
{ testGet :
{ resp : server.createGetResponse("TESTING!")
, expectBody: "TESTING!"
}
, testGetChunkBreak :
{ resp : server.createChunkResponse(
[ new Buffer([239])
, new Buffer([163])
, new Buffer([191])
, new Buffer([206])
, new Buffer([169])
, new Buffer([226])
, new Buffer([152])
, new Buffer([131])
])
, expectBody: "Ω☃"
}
, testGetJSON :
{ resp : server.createGetResponse('{"test":true}', 'application/json')
, json : true
, expectBody: {"test":true}
}
, testPutString :
{ resp : server.createPostValidator("PUTTINGDATA")
, method : "PUT"
, body : "PUTTINGDATA"
}
, testPutBuffer :
{ resp : server.createPostValidator("PUTTINGDATA")
, method : "PUT"
, body : new Buffer("PUTTINGDATA")
}
, testPutJSON :
{ resp : server.createPostValidator(JSON.stringify({foo: 'bar'}))
, method: "PUT"
, json: {foo: 'bar'}
}
, testPutMultipart :
{ resp: server.createPostValidator(
'--frontier\r\n' +
'content-type: text/html\r\n' +
'\r\n' +
'<html><body>Oh hi.</body></html>' +
'\r\n--frontier\r\n\r\n' +
'Oh hi.' +
'\r\n--frontier--'
)
, method: "PUT"
, multipart:
[ {'content-type': 'text/html', 'body': '<html><body>Oh hi.</body></html>'}
, {'body': 'Oh hi.'}
]
}
}
s.listen(s.port, function () {
var counter = 0
for (i in tests) {
(function () {
var test = tests[i]
s.on('/'+i, test.resp)
test.uri = s.url + '/' + i
request(test, function (err, resp, body) {
if (err) throw err
if (test.expectBody) {
assert.deepEqual(test.expectBody, body)
}
counter = counter - 1;
if (counter === 0) {
console.log(Object.keys(tests).length+" tests passed.")
s.close()
}
})
counter++
})()
}
})

View File

@ -1,30 +0,0 @@
var server = require('./server')
, events = require('events')
, assert = require('assert')
, request = require('../main.js')
;
var local = 'http://localhost:8888/asdf'
try {
request({uri:local, body:{}})
assert.fail("Should have throw")
} catch(e) {
assert.equal(e.message, 'Argument error, options.body.')
}
try {
request({uri:local, multipart: 'foo'})
assert.fail("Should have throw")
} catch(e) {
assert.equal(e.message, 'Argument error, options.multipart.')
}
try {
request({uri:local, multipart: [{}]})
assert.fail("Should have throw")
} catch(e) {
assert.equal(e.message, 'Body attribute missing in multipart.')
}
console.log("All tests passed.")

View File

@ -1,167 +0,0 @@
var server = require('./server')
, events = require('events')
, stream = require('stream')
, assert = require('assert')
, fs = require('fs')
, request = require('../main.js')
, path = require('path')
, util = require('util')
;
var s = server.createServer(3453);
function ValidationStream(str) {
this.str = str
this.buf = ''
this.on('data', function (data) {
this.buf += data
})
this.on('end', function () {
assert.equal(this.str, this.buf)
})
this.writable = true
}
util.inherits(ValidationStream, stream.Stream)
ValidationStream.prototype.write = function (chunk) {
this.emit('data', chunk)
}
ValidationStream.prototype.end = function (chunk) {
if (chunk) emit('data', chunk)
this.emit('end')
}
s.listen(s.port, function () {
counter = 0;
var check = function () {
counter = counter - 1
if (counter === 0) {
console.log('All tests passed.')
setTimeout(function () {
process.exit();
}, 500)
}
}
// Test pipeing to a request object
s.once('/push', server.createPostValidator("mydata"));
var mydata = new stream.Stream();
mydata.readable = true
counter++
var r1 = request.put({url:'http://localhost:3453/push'}, function () {
check();
})
mydata.pipe(r1)
mydata.emit('data', 'mydata');
mydata.emit('end');
// Test pipeing from a request object.
s.once('/pull', server.createGetResponse("mypulldata"));
var mypulldata = new stream.Stream();
mypulldata.writable = true
counter++
request({url:'http://localhost:3453/pull'}).pipe(mypulldata)
var d = '';
mypulldata.write = function (chunk) {
d += chunk;
}
mypulldata.end = function () {
assert.equal(d, 'mypulldata');
check();
};
s.on('/cat', function (req, resp) {
if (req.method === "GET") {
resp.writeHead(200, {'content-type':'text/plain-test', 'content-length':4});
resp.end('asdf')
} else if (req.method === "PUT") {
assert.equal(req.headers['content-type'], 'text/plain-test');
assert.equal(req.headers['content-length'], 4)
var validate = '';
req.on('data', function (chunk) {validate += chunk})
req.on('end', function () {
resp.writeHead(201);
resp.end();
assert.equal(validate, 'asdf');
check();
})
}
})
s.on('/pushjs', function (req, resp) {
if (req.method === "PUT") {
assert.equal(req.headers['content-type'], 'text/javascript');
check();
}
})
s.on('/catresp', function (req, resp) {
request.get('http://localhost:3453/cat').pipe(resp)
})
s.on('/doodle', function (req, resp) {
if (req.headers['x-oneline-proxy']) {
resp.setHeader('x-oneline-proxy', 'yup')
}
resp.writeHead('200', {'content-type':'image/png'})
fs.createReadStream(path.join(__dirname, 'googledoodle.png')).pipe(resp)
})
s.on('/onelineproxy', function (req, resp) {
var x = request('http://localhost:3453/doodle')
req.pipe(x)
x.pipe(resp)
})
counter++
fs.createReadStream(__filename).pipe(request.put('http://localhost:3453/pushjs'))
counter++
request.get('http://localhost:3453/cat').pipe(request.put('http://localhost:3453/cat'))
counter++
request.get('http://localhost:3453/catresp', function (e, resp, body) {
assert.equal(resp.headers['content-type'], 'text/plain-test');
assert.equal(resp.headers['content-length'], 4)
check();
})
var doodleWrite = fs.createWriteStream(path.join(__dirname, 'test.png'))
counter++
request.get('http://localhost:3453/doodle').pipe(doodleWrite)
doodleWrite.on('close', function () {
assert.deepEqual(fs.readFileSync(path.join(__dirname, 'googledoodle.png')), fs.readFileSync(path.join(__dirname, 'test.png')))
check()
})
process.on('exit', function () {
fs.unlinkSync(path.join(__dirname, 'test.png'))
})
counter++
request.get({uri:'http://localhost:3453/onelineproxy', headers:{'x-oneline-proxy':'nope'}}, function (err, resp, body) {
assert.equal(resp.headers['x-oneline-proxy'], 'yup')
check()
})
s.on('/afterresponse', function (req, resp) {
resp.write('d')
resp.end()
})
counter++
var afterresp = request.post('http://localhost:3453/afterresponse').on('response', function () {
var v = new ValidationStream('d')
afterresp.pipe(v)
v.on('end', check)
})
})

View File

@ -1,87 +0,0 @@
var server = require('./server')
, events = require('events')
, stream = require('stream')
, assert = require('assert')
, request = require('../main.js')
;
var s = server.createServer();
var expectedBody = "waited";
var remainingTests = 5;
s.listen(s.port, function () {
// Request that waits for 200ms
s.on('/timeout', function (req, resp) {
setTimeout(function(){
resp.writeHead(200, {'content-type':'text/plain'})
resp.write(expectedBody)
resp.end()
}, 200);
});
// Scenario that should timeout
var shouldTimeout = {
url: s.url + "/timeout",
timeout:100
}
request(shouldTimeout, function (err, resp, body) {
assert.equal(err.code, "ETIMEDOUT");
checkDone();
})
// Scenario that shouldn't timeout
var shouldntTimeout = {
url: s.url + "/timeout",
timeout:300
}
request(shouldntTimeout, function (err, resp, body) {
assert.equal(err, null);
assert.equal(expectedBody, body)
checkDone();
})
// Scenario with no timeout set, so shouldn't timeout
var noTimeout = {
url: s.url + "/timeout"
}
request(noTimeout, function (err, resp, body) {
assert.equal(err);
assert.equal(expectedBody, body)
checkDone();
})
// Scenario with a negative timeout value, should be treated a zero or the minimum delay
var negativeTimeout = {
url: s.url + "/timeout",
timeout:-1000
}
request(negativeTimeout, function (err, resp, body) {
assert.equal(err.code, "ETIMEDOUT");
checkDone();
})
// Scenario with a float timeout value, should be rounded by setTimeout anyway
var floatTimeout = {
url: s.url + "/timeout",
timeout: 100.76
}
request(floatTimeout, function (err, resp, body) {
assert.equal(err.code, "ETIMEDOUT");
checkDone();
})
function checkDone() {
if(--remainingTests == 0) {
s.close();
console.log("All tests passed.");
}
}
})

19
deps/npm/node_modules/request/uuid.js generated vendored Normal file
View File

@ -0,0 +1,19 @@
module.exports = function () {
var s = [], itoh = '0123456789ABCDEF';
// Make array of random hex digits. The UUID only has 32 digits in it, but we
// allocate an extra items to make room for the '-'s we'll be inserting.
for (var i = 0; i <36; i++) s[i] = Math.floor(Math.random()*0x10);
// Conform to RFC-4122, section 4.4
s[14] = 4; // Set 4 high bits of time_high field to version
s[19] = (s[19] & 0x3) | 0x8; // Specify 2 high bits of clock sequence
// Convert to hex chars
for (var i = 0; i <36; i++) s[i] = itoh[s[i]];
// Insert '-'s
s[8] = s[13] = s[18] = s[23] = '-';
return s.join('');
}

57
deps/npm/node_modules/request/vendor/cookie/index.js generated vendored Normal file
View File

@ -0,0 +1,57 @@
/*!
* Tobi - Cookie
* Copyright(c) 2010 LearnBoost <dev@learnboost.com>
* MIT Licensed
*/
/**
* Module dependencies.
*/
var url = require('url');
/**
* Initialize a new `Cookie` with the given cookie `str` and `req`.
*
* @param {String} str
* @param {IncomingRequest} req
* @api private
*/
var Cookie = exports = module.exports = function Cookie(str, req) {
this.str = str;
// First key is the name
this.name = str.substr(0, str.indexOf('='));
// Map the key/val pairs
str.split(/ *; */).reduce(function(obj, pair){
pair = pair.split(/ *= */);
obj[pair[0]] = pair[1] || true;
return obj;
}, this);
// Assign value
this.value = this[this.name];
// Expires
this.expires = this.expires
? new Date(this.expires)
: Infinity;
// Default or trim path
this.path = this.path
? this.path.trim()
: url.parse(req.url).pathname;
};
/**
* Return the original cookie string.
*
* @return {String}
* @api public
*/
Cookie.prototype.toString = function(){
return this.str;
};

72
deps/npm/node_modules/request/vendor/cookie/jar.js generated vendored Normal file
View File

@ -0,0 +1,72 @@
/*!
* Tobi - CookieJar
* Copyright(c) 2010 LearnBoost <dev@learnboost.com>
* MIT Licensed
*/
/**
* Module dependencies.
*/
var url = require('url');
/**
* Initialize a new `CookieJar`.
*
* @api private
*/
var CookieJar = exports = module.exports = function CookieJar() {
this.cookies = [];
};
/**
* Add the given `cookie` to the jar.
*
* @param {Cookie} cookie
* @api private
*/
CookieJar.prototype.add = function(cookie){
this.cookies = this.cookies.filter(function(c){
// Avoid duplication (same path, same name)
return !(c.name == cookie.name && c.path == cookie.path);
});
this.cookies.push(cookie);
};
/**
* Get cookies for the given `req`.
*
* @param {IncomingRequest} req
* @return {Array}
* @api private
*/
CookieJar.prototype.get = function(req){
var path = url.parse(req.url).pathname
, now = new Date
, specificity = {};
return this.cookies.filter(function(cookie){
if (0 == path.indexOf(cookie.path) && now < cookie.expires
&& cookie.path.length > (specificity[cookie.name] || 0))
return specificity[cookie.name] = cookie.path.length;
});
};
/**
* Return Cookie string for the given `req`.
*
* @param {IncomingRequest} req
* @return {String}
* @api private
*/
CookieJar.prototype.cookieString = function(req){
var cookies = this.get(req);
if (cookies.length) {
return cookies.map(function(cookie){
return cookie.name + '=' + cookie.value;
}).join('; ');
}
};

View File

@ -1,10 +0,0 @@
#!/bin/bash
set -e
for i in test-*.js; do
echo -n $i ...
bash setup.sh
node $i
! [ -d target ]
echo "pass"
done
rm -rf target

View File

@ -1,47 +0,0 @@
#!/bin/bash
set -e
files=10
folders=2
depth=4
target="$PWD/target"
rm -rf target
fill () {
local depth=$1
local files=$2
local folders=$3
local target=$4
if ! [ -d $target ]; then
mkdir -p $target
fi
local f
f=$files
while [ $f -gt 0 ]; do
touch "$target/f-$depth-$f"
let f--
done
let depth--
if [ $depth -le 0 ]; then
return 0
fi
f=$folders
while [ $f -gt 0 ]; do
mkdir "$target/folder-$depth-$f"
fill $depth $files $folders "$target/d-$depth-$f"
let f--
done
}
fill $depth $files $folders $target
# sanity assert
[ -d $target ]

View File

@ -1,5 +0,0 @@
var rimraf = require("../rimraf")
, path = require("path")
rimraf(path.join(__dirname, "target"), function (er) {
if (er) throw er
})

View File

@ -1,15 +0,0 @@
var rimraf
, path = require("path")
try {
rimraf = require("../fiber")
} catch (er) {
console.error("skipping fiber test")
}
if (rimraf) {
Fiber(function () {
rimraf(path.join(__dirname, "target")).wait()
}).run()
}

View File

@ -1,3 +0,0 @@
var rimraf = require("../rimraf")
, path = require("path")
rimraf.sync(path.join(__dirname, "target"))

397
deps/npm/node_modules/semver/test.js generated vendored
View File

@ -1,397 +0,0 @@
var tap = require("tap")
, test = tap.test
, semver = require("./semver.js")
, eq = semver.eq
, gt = semver.gt
, lt = semver.lt
, neq = semver.neq
, cmp = semver.cmp
, gte = semver.gte
, lte = semver.lte
, satisfies = semver.satisfies
, validRange = semver.validRange
, inc = semver.inc
, replaceStars = semver.replaceStars
, toComparators = semver.toComparators
tap.plan(8)
test("\ncomparison tests", function (t) {
; [ ["0.0.0", "0.0.0foo"]
, ["0.0.1", "0.0.0"]
, ["1.0.0", "0.9.9"]
, ["0.10.0", "0.9.0"]
, ["0.99.0", "0.10.0"]
, ["2.0.0", "1.2.3"]
, ["v0.0.0", "0.0.0foo"]
, ["v0.0.1", "0.0.0"]
, ["v1.0.0", "0.9.9"]
, ["v0.10.0", "0.9.0"]
, ["v0.99.0", "0.10.0"]
, ["v2.0.0", "1.2.3"]
, ["0.0.0", "v0.0.0foo"]
, ["0.0.1", "v0.0.0"]
, ["1.0.0", "v0.9.9"]
, ["0.10.0", "v0.9.0"]
, ["0.99.0", "v0.10.0"]
, ["2.0.0", "v1.2.3"]
, ["1.2.3", "1.2.3-asdf"]
, ["1.2.3-4", "1.2.3"]
, ["1.2.3-4-foo", "1.2.3"]
, ["1.2.3-5", "1.2.3-5-foo"]
, ["1.2.3-5", "1.2.3-4"]
, ["1.2.3-5-foo", "1.2.3-5-Foo"]
].forEach(function (v) {
var v0 = v[0]
, v1 = v[1]
t.ok(gt(v0, v1), "gt('"+v0+"', '"+v1+"')")
t.ok(lt(v1, v0), "lt('"+v1+"', '"+v0+"')")
t.ok(!gt(v1, v0), "!gt('"+v1+"', '"+v0+"')")
t.ok(!lt(v0, v1), "!lt('"+v0+"', '"+v1+"')")
t.ok(eq(v0, v0), "eq('"+v0+"', '"+v0+"')")
t.ok(eq(v1, v1), "eq('"+v1+"', '"+v1+"')")
t.ok(neq(v0, v1), "neq('"+v0+"', '"+v1+"')")
t.ok(cmp(v1, "==", v1), "cmp('"+v1+"' == '"+v1+"')")
t.ok(cmp(v0, ">=", v1), "cmp('"+v0+"' >= '"+v1+"')")
t.ok(cmp(v1, "<=", v0), "cmp('"+v1+"' <= '"+v0+"')")
t.ok(cmp(v0, "!=", v1), "cmp('"+v0+"' != '"+v1+"')")
})
t.end()
})
test("\nequality tests", function (t) {
; [ ["1.2.3", "v1.2.3"]
, ["1.2.3", "=1.2.3"]
, ["1.2.3", "v 1.2.3"]
, ["1.2.3", "= 1.2.3"]
, ["1.2.3", " v1.2.3"]
, ["1.2.3", " =1.2.3"]
, ["1.2.3", " v 1.2.3"]
, ["1.2.3", " = 1.2.3"]
, ["1.2.3-0", "v1.2.3-0"]
, ["1.2.3-0", "=1.2.3-0"]
, ["1.2.3-0", "v 1.2.3-0"]
, ["1.2.3-0", "= 1.2.3-0"]
, ["1.2.3-0", " v1.2.3-0"]
, ["1.2.3-0", " =1.2.3-0"]
, ["1.2.3-0", " v 1.2.3-0"]
, ["1.2.3-0", " = 1.2.3-0"]
, ["1.2.3-01", "v1.2.3-1"]
, ["1.2.3-01", "=1.2.3-1"]
, ["1.2.3-01", "v 1.2.3-1"]
, ["1.2.3-01", "= 1.2.3-1"]
, ["1.2.3-01", " v1.2.3-1"]
, ["1.2.3-01", " =1.2.3-1"]
, ["1.2.3-01", " v 1.2.3-1"]
, ["1.2.3-01", " = 1.2.3-1"]
, ["1.2.3beta", "v1.2.3beta"]
, ["1.2.3beta", "=1.2.3beta"]
, ["1.2.3beta", "v 1.2.3beta"]
, ["1.2.3beta", "= 1.2.3beta"]
, ["1.2.3beta", " v1.2.3beta"]
, ["1.2.3beta", " =1.2.3beta"]
, ["1.2.3beta", " v 1.2.3beta"]
, ["1.2.3beta", " = 1.2.3beta"]
].forEach(function (v) {
var v0 = v[0]
, v1 = v[1]
t.ok(eq(v0, v1), "eq('"+v0+"', '"+v1+"')")
t.ok(!neq(v0, v1), "!neq('"+v0+"', '"+v1+"')")
t.ok(cmp(v0, "==", v1), "cmp("+v0+"=="+v1+")")
t.ok(!cmp(v0, "!=", v1), "!cmp("+v0+"!="+v1+")")
t.ok(!cmp(v0, "===", v1), "!cmp("+v0+"==="+v1+")")
t.ok(cmp(v0, "!==", v1), "cmp("+v0+"!=="+v1+")")
t.ok(!gt(v0, v1), "!gt('"+v0+"', '"+v1+"')")
t.ok(gte(v0, v1), "gte('"+v0+"', '"+v1+"')")
t.ok(!lt(v0, v1), "!lt('"+v0+"', '"+v1+"')")
t.ok(lte(v0, v1), "lte('"+v0+"', '"+v1+"')")
})
t.end()
})
test("\nrange tests", function (t) {
; [ ["1.0.0 - 2.0.0", "1.2.3"]
, ["1.0.0", "1.0.0"]
, [">=*", "0.2.4"]
, ["", "1.0.0"]
, ["*", "1.2.3"]
, ["*", "v1.2.3-foo"]
, [">=1.0.0", "1.0.0"]
, [">=1.0.0", "1.0.1"]
, [">=1.0.0", "1.1.0"]
, [">1.0.0", "1.0.1"]
, [">1.0.0", "1.1.0"]
, ["<=2.0.0", "2.0.0"]
, ["<=2.0.0", "1.9999.9999"]
, ["<=2.0.0", "0.2.9"]
, ["<2.0.0", "1.9999.9999"]
, ["<2.0.0", "0.2.9"]
, [">= 1.0.0", "1.0.0"]
, [">= 1.0.0", "1.0.1"]
, [">= 1.0.0", "1.1.0"]
, ["> 1.0.0", "1.0.1"]
, ["> 1.0.0", "1.1.0"]
, ["<= 2.0.0", "2.0.0"]
, ["<= 2.0.0", "1.9999.9999"]
, ["<= 2.0.0", "0.2.9"]
, ["< 2.0.0", "1.9999.9999"]
, ["<\t2.0.0", "0.2.9"]
, [">=0.1.97", "v0.1.97"]
, [">=0.1.97", "0.1.97"]
, ["0.1.20 || 1.2.4", "1.2.4"]
, [">=0.2.3 || <0.0.1", "0.0.0"]
, [">=0.2.3 || <0.0.1", "0.2.3"]
, [">=0.2.3 || <0.0.1", "0.2.4"]
, ["||", "1.3.4"]
, ["2.x.x", "2.1.3"]
, ["1.2.x", "1.2.3"]
, ["1.2.x || 2.x", "2.1.3"]
, ["1.2.x || 2.x", "1.2.3"]
, ["x", "1.2.3"]
, ["2.*.*", "2.1.3"]
, ["1.2.*", "1.2.3"]
, ["1.2.* || 2.*", "2.1.3"]
, ["1.2.* || 2.*", "1.2.3"]
, ["*", "1.2.3"]
, ["2", "2.1.2"]
, ["2.3", "2.3.1"]
, ["~2.4", "2.4.0"] // >=2.4.0 <2.5.0
, ["~2.4", "2.4.5"]
, ["~>3.2.1", "3.2.2"] // >=3.2.1 <3.3.0
, ["~1", "1.2.3"] // >=1.0.0 <2.0.0
, ["~>1", "1.2.3"]
, ["~> 1", "1.2.3"]
, ["~1.0", "1.0.2"] // >=1.0.0 <1.1.0
, ["~ 1.0", "1.0.2"]
, [">=1", "1.0.0"]
, [">= 1", "1.0.0"]
, ["<1.2", "1.1.1"]
, ["< 1.2", "1.1.1"]
, ["1", "1.0.0beta"]
, ["~v0.5.4-pre", "0.5.5"]
, ["~v0.5.4-pre", "0.5.4"]
].forEach(function (v) {
t.ok(satisfies(v[1], v[0]), v[0]+" satisfied by "+v[1])
})
t.end()
})
test("\nnegative range tests", function (t) {
; [ ["1.0.0 - 2.0.0", "2.2.3"]
, ["1.0.0", "1.0.1"]
, [">=1.0.0", "0.0.0"]
, [">=1.0.0", "0.0.1"]
, [">=1.0.0", "0.1.0"]
, [">1.0.0", "0.0.1"]
, [">1.0.0", "0.1.0"]
, ["<=2.0.0", "3.0.0"]
, ["<=2.0.0", "2.9999.9999"]
, ["<=2.0.0", "2.2.9"]
, ["<2.0.0", "2.9999.9999"]
, ["<2.0.0", "2.2.9"]
, [">=0.1.97", "v0.1.93"]
, [">=0.1.97", "0.1.93"]
, ["0.1.20 || 1.2.4", "1.2.3"]
, [">=0.2.3 || <0.0.1", "0.0.3"]
, [">=0.2.3 || <0.0.1", "0.2.2"]
, ["2.x.x", "1.1.3"]
, ["2.x.x", "3.1.3"]
, ["1.2.x", "1.3.3"]
, ["1.2.x || 2.x", "3.1.3"]
, ["1.2.x || 2.x", "1.1.3"]
, ["2.*.*", "1.1.3"]
, ["2.*.*", "3.1.3"]
, ["1.2.*", "1.3.3"]
, ["1.2.* || 2.*", "3.1.3"]
, ["1.2.* || 2.*", "1.1.3"]
, ["2", "1.1.2"]
, ["2.3", "2.4.1"]
, ["~2.4", "2.5.0"] // >=2.4.0 <2.5.0
, ["~2.4", "2.3.9"]
, ["~>3.2.1", "3.3.2"] // >=3.2.1 <3.3.0
, ["~>3.2.1", "3.2.0"] // >=3.2.1 <3.3.0
, ["~1", "0.2.3"] // >=1.0.0 <2.0.0
, ["~>1", "2.2.3"]
, ["~1.0", "1.1.0"] // >=1.0.0 <1.1.0
, ["<1", "1.0.0"]
, [">=1.2", "1.1.1"]
, ["1", "2.0.0beta"]
, ["~v0.5.4-beta", "0.5.4-alpha"]
, ["<1", "1.0.0beta"]
, ["< 1", "1.0.0beta"]
].forEach(function (v) {
t.ok(!satisfies(v[1], v[0]), v[0]+" not satisfied by "+v[1])
})
t.end()
})
test("\nincrement versions test", function (t) {
; [ [ "1.2.3", "major", "2.0.0" ]
, [ "1.2.3", "minor", "1.3.0" ]
, [ "1.2.3", "patch", "1.2.4" ]
, [ "1.2.3", "build", "1.2.3-1" ]
, [ "1.2.3-4", "build", "1.2.3-5" ]
, [ "1.2.3tag", "major", "2.0.0" ]
, [ "1.2.3-tag", "major", "2.0.0" ]
, [ "1.2.3tag", "build", "1.2.3-1" ]
, [ "1.2.3-tag", "build", "1.2.3-1" ]
, [ "1.2.3-4-tag", "build", "1.2.3-5" ]
, [ "1.2.3-4tag", "build", "1.2.3-5" ]
, [ "1.2.3", "fake", null ]
, [ "fake", "major", null ]
].forEach(function (v) {
t.equal(inc(v[0], v[1]), v[2], "inc("+v[0]+", "+v[1]+") === "+v[2])
})
t.end()
})
test("\nreplace stars test", function (t) {
; [ [ "", "" ]
, [ "*", "" ]
, [ "> *", "" ]
, [ "<*", "" ]
, [ " >= *", "" ]
, [ "* || 1.2.3", " || 1.2.3" ]
].forEach(function (v) {
t.equal(replaceStars(v[0]), v[1], "replaceStars("+v[0]+") === "+v[1])
})
t.end()
})
test("\nvalid range test", function (t) {
; [ ["1.0.0 - 2.0.0", ">=1.0.0 <=2.0.0"]
, ["1.0.0", "1.0.0"]
, [">=*", ""]
, ["", ""]
, ["*", ""]
, ["*", ""]
, [">=1.0.0", ">=1.0.0"]
, [">1.0.0", ">1.0.0"]
, ["<=2.0.0", "<=2.0.0"]
, ["1", ">=1.0.0- <2.0.0-"]
, ["<=2.0.0", "<=2.0.0"]
, ["<=2.0.0", "<=2.0.0"]
, ["<2.0.0", "<2.0.0"]
, ["<2.0.0", "<2.0.0"]
, [">= 1.0.0", ">=1.0.0"]
, [">= 1.0.0", ">=1.0.0"]
, [">= 1.0.0", ">=1.0.0"]
, ["> 1.0.0", ">1.0.0"]
, ["> 1.0.0", ">1.0.0"]
, ["<= 2.0.0", "<=2.0.0"]
, ["<= 2.0.0", "<=2.0.0"]
, ["<= 2.0.0", "<=2.0.0"]
, ["< 2.0.0", "<2.0.0"]
, ["< 2.0.0", "<2.0.0"]
, [">=0.1.97", ">=0.1.97"]
, [">=0.1.97", ">=0.1.97"]
, ["0.1.20 || 1.2.4", "0.1.20||1.2.4"]
, [">=0.2.3 || <0.0.1", ">=0.2.3||<0.0.1"]
, [">=0.2.3 || <0.0.1", ">=0.2.3||<0.0.1"]
, [">=0.2.3 || <0.0.1", ">=0.2.3||<0.0.1"]
, ["||", "||"]
, ["2.x.x", ">=2.0.0- <3.0.0-"]
, ["1.2.x", ">=1.2.0- <1.3.0-"]
, ["1.2.x || 2.x", ">=1.2.0- <1.3.0-||>=2.0.0- <3.0.0-"]
, ["1.2.x || 2.x", ">=1.2.0- <1.3.0-||>=2.0.0- <3.0.0-"]
, ["x", ""]
, ["2.*.*", null]
, ["1.2.*", null]
, ["1.2.* || 2.*", null]
, ["1.2.* || 2.*", null]
, ["*", ""]
, ["2", ">=2.0.0- <3.0.0-"]
, ["2.3", ">=2.3.0- <2.4.0-"]
, ["~2.4", ">=2.4.0- <2.5.0-"]
, ["~2.4", ">=2.4.0- <2.5.0-"]
, ["~>3.2.1", ">=3.2.1- <3.3.0-"]
, ["~1", ">=1.0.0- <2.0.0-"]
, ["~>1", ">=1.0.0- <2.0.0-"]
, ["~> 1", ">=1.0.0- <2.0.0-"]
, ["~1.0", ">=1.0.0- <1.1.0-"]
, ["~ 1.0", ">=1.0.0- <1.1.0-"]
, ["<1", "<1.0.0-"]
, ["< 1", "<1.0.0-"]
, [">=1", ">=1.0.0-"]
, [">= 1", ">=1.0.0-"]
, ["<1.2", "<1.2.0-"]
, ["< 1.2", "<1.2.0-"]
, ["1", ">=1.0.0- <2.0.0-"]
].forEach(function (v) {
t.equal(validRange(v[0]), v[1], "validRange("+v[0]+") === "+v[1])
})
t.end()
})
test("\ncomparators test", function (t) {
; [ ["1.0.0 - 2.0.0", [[">=1.0.0", "<=2.0.0"]] ]
, ["1.0.0", [["1.0.0"]] ]
, [">=*", [[">=0.0.0-"]] ]
, ["", [[""]]]
, ["*", [[""]] ]
, ["*", [[""]] ]
, [">=1.0.0", [[">=1.0.0"]] ]
, [">=1.0.0", [[">=1.0.0"]] ]
, [">=1.0.0", [[">=1.0.0"]] ]
, [">1.0.0", [[">1.0.0"]] ]
, [">1.0.0", [[">1.0.0"]] ]
, ["<=2.0.0", [["<=2.0.0"]] ]
, ["1", [[">=1.0.0-", "<2.0.0-"]] ]
, ["<=2.0.0", [["<=2.0.0"]] ]
, ["<=2.0.0", [["<=2.0.0"]] ]
, ["<2.0.0", [["<2.0.0"]] ]
, ["<2.0.0", [["<2.0.0"]] ]
, [">= 1.0.0", [[">=1.0.0"]] ]
, [">= 1.0.0", [[">=1.0.0"]] ]
, [">= 1.0.0", [[">=1.0.0"]] ]
, ["> 1.0.0", [[">1.0.0"]] ]
, ["> 1.0.0", [[">1.0.0"]] ]
, ["<= 2.0.0", [["<=2.0.0"]] ]
, ["<= 2.0.0", [["<=2.0.0"]] ]
, ["<= 2.0.0", [["<=2.0.0"]] ]
, ["< 2.0.0", [["<2.0.0"]] ]
, ["<\t2.0.0", [["<2.0.0"]] ]
, [">=0.1.97", [[">=0.1.97"]] ]
, [">=0.1.97", [[">=0.1.97"]] ]
, ["0.1.20 || 1.2.4", [["0.1.20"], ["1.2.4"]] ]
, [">=0.2.3 || <0.0.1", [[">=0.2.3"], ["<0.0.1"]] ]
, [">=0.2.3 || <0.0.1", [[">=0.2.3"], ["<0.0.1"]] ]
, [">=0.2.3 || <0.0.1", [[">=0.2.3"], ["<0.0.1"]] ]
, ["||", [[""], [""]] ]
, ["2.x.x", [[">=2.0.0-", "<3.0.0-"]] ]
, ["1.2.x", [[">=1.2.0-", "<1.3.0-"]] ]
, ["1.2.x || 2.x", [[">=1.2.0-", "<1.3.0-"], [">=2.0.0-", "<3.0.0-"]] ]
, ["1.2.x || 2.x", [[">=1.2.0-", "<1.3.0-"], [">=2.0.0-", "<3.0.0-"]] ]
, ["x", [[""]] ]
, ["2.*.*", [[">=2.0.0-", "<3.0.0-"]] ]
, ["1.2.*", [[">=1.2.0-", "<1.3.0-"]] ]
, ["1.2.* || 2.*", [[">=1.2.0-", "<1.3.0-"], [">=2.0.0-", "<3.0.0-"]] ]
, ["1.2.* || 2.*", [[">=1.2.0-", "<1.3.0-"], [">=2.0.0-", "<3.0.0-"]] ]
, ["*", [[""]] ]
, ["2", [[">=2.0.0-", "<3.0.0-"]] ]
, ["2.3", [[">=2.3.0-", "<2.4.0-"]] ]
, ["~2.4", [[">=2.4.0-", "<2.5.0-"]] ]
, ["~2.4", [[">=2.4.0-", "<2.5.0-"]] ]
, ["~>3.2.1", [[">=3.2.1-", "<3.3.0-"]] ]
, ["~1", [[">=1.0.0-", "<2.0.0-"]] ]
, ["~>1", [[">=1.0.0-", "<2.0.0-"]] ]
, ["~> 1", [[">=1.0.0-", "<2.0.0-"]] ]
, ["~1.0", [[">=1.0.0-", "<1.1.0-"]] ]
, ["~ 1.0", [[">=1.0.0-", "<1.1.0-"]] ]
, ["<1", [["<1.0.0-"]] ]
, ["< 1", [["<1.0.0-"]] ]
, [">=1", [[">=1.0.0-"]] ]
, [">= 1", [[">=1.0.0-"]] ]
, ["<1.2", [["<1.2.0-"]] ]
, ["< 1.2", [["<1.2.0-"]] ]
, ["1", [[">=1.0.0-", "<2.0.0-"]] ]
].forEach(function (v) {
t.equivalent(toComparators(v[0]), v[1], "toComparators("+v[0]+") === "+JSON.stringify(v[1]))
})
t.end()
})

View File

@ -1,11 +0,0 @@
var tar = require("../tar.js")
, fs = require("fs")
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")
})

View File

@ -1,36 +0,0 @@
var tar = require("../tar.js")
, fs = require("fs")
fs.createReadStream(__dirname + "/../test/fixtures/c.tar")
.pipe(tar.Reader())
.on("extendedHeader", function (e) {
console.error("extended pax header", e.props)
e.on("end", function () {
console.error("extended pax fields:", e.fields)
})
})
.on("ignoredEntry", function (e) {
console.error("ignoredEntry?!?", e.props)
})
.on("longLinkpath", function (e) {
console.error("longLinkpath entry", e.props)
e.on("end", function () {
console.error("value=%j", e.body.toString())
})
})
.on("longPath", function (e) {
console.error("longPath entry", e.props)
e.on("end", function () {
console.error("value=%j", e.body.toString())
})
})
.on("entry", function (e) {
console.error("entry", e.props)
e.on("data", function (c) {
console.error(" >>>" + c.toString().replace(/\n/g, "\\n"))
})
e.on("end", function () {
console.error(" <<<EOF")
})
})

View File

@ -114,6 +114,9 @@ EntryWriter.prototype._header = function () {
.on("data", function (c) {
me.emit("data", c)
})
.on("error", function (er) {
me.emit("error", er)
})
.end()
}

View File

@ -148,6 +148,8 @@ function encodeField (k, v) {
var s = new Buffer(" " + k + "=" + v + "\n")
, digits = Math.floor(Math.log(s.length) / Math.log(10)) + 1
// console.error("1 s=%j digits=%j s.length=%d", s.toString(), digits, s.length)
// if adding that many digits will make it go over that length,
// then add one to it. For example, if the string is:
// " foo=bar\n"
@ -156,10 +158,22 @@ function encodeField (k, v) {
// "10 foo=bar\n"
// but, since that's actually 11 characters, since 10 adds another
// character to the length, and the length includes the number
// itself. In that case, just bump it up by 1.
if (s.length > Math.pow(10, digits) - digits) digits ++
// itself. In that case, just bump it up again.
if (s.length + digits >= Math.pow(10, digits)) digits += 1
// console.error("2 s=%j digits=%j s.length=%d", s.toString(), digits, s.length)
var len = digits + s.length
// console.error("3 s=%j digits=%j s.length=%d len=%d", s.toString(), digits, s.length, len)
var lenBuf = new Buffer("" + len)
if (lenBuf.length + s.length !== len) {
throw new Error("Bad length calculation\n"+
"len="+len+"\n"+
"lenBuf="+JSON.stringify(lenBuf.toString())+"\n"+
"lenBuf.length="+lenBuf.length+"\n"+
"digits="+digits+"\n"+
"s="+JSON.stringify(s.toString())+"\n"+
"s.length="+s.length)
}
return [new Buffer("" + len), s]
return [lenBuf, s]
}

View File

@ -1 +0,0 @@
tar for node

View File

@ -1,24 +0,0 @@
// request a tar file, and then write it
require("http").request({...}, function (resp) {
resp.pipe(tar.createParser(function (file) {
if (file.isDirectory()) {
this.pause()
return fs.mkdir(file.name, function (er) {
if (er) return this.emit("error", er)
this.resume()
})
} else if (file.isSymbolicLink()) {
this.pause()
return fs.symlink(file.link, file.name, function (er) {
if (er) return this.emit("error", er)
this.resume()
})
} else if (file.isFile()) {
file.pipe(fs.createWriteStream(file.name))
}
}))
// or maybe just have it do all that internally?
resp.pipe(tar.createParser(function (file) {
this.create("/extract/target/path", file)
}))
})

View File

@ -1,387 +0,0 @@
module.exports = Generator
Generator.create = create
var tar = require("./tar")
, Stream = require("stream").Stream
, Parser = require("./parser")
, fs = require("fs")
function create (opts) {
return new Generator(opts)
}
function Generator (opts) {
this.readable = true
this.currentFile = null
this._paused = false
this._ended = false
this._queue = []
this.options = { cwd: process.cwd() }
Object.keys(opts).forEach(function (o) {
this.options[o] = opts[o]
}, this)
if (this.options.cwd.slice(-1) !== "/") {
this.options.cwd += "/"
}
Stream.apply(this)
}
Generator.prototype = Object.create(Stream.prototype)
Generator.prototype.pause = function () {
if (this.currentFile) this.currentFile.pause()
this.paused = true
this.emit("pause")
}
Generator.prototype.resume = function () {
this.paused = false
if (this.currentFile) this.currentFile.resume()
this.emit("resume")
this._processQueue()
}
Generator.prototype.end = function () {
this._ended = true
this._processQueue()
}
Generator.prototype.append = function (f, st) {
if (this._ended) return this.emit("error", new Error(
"Cannot append after ending"))
// if it's a string, then treat it as a filename.
// if it's a number, then treat it as a fd
// if it's a Stats, then treat it as a stat object
// if it's a Stream, then stream it in.
var s = toFileStream(f, st)
if (!s) return this.emit("error", new TypeError(
"Invalid argument: "+f))
// make sure it's in the folder being added.
if (s.name.indexOf(this.options.cwd) !== 0) {
this.emit("error", new Error(
"Invalid argument: "+s.name+"\nOutside of "+this.options.cwd))
}
s.name = s.name.substr(this.options.cwd.length)
s.pause()
this._queue.push(s)
if (!s._needStat) return this._processQueue()
var self = this
fs.lstat(s.name, function (er, st) {
if (er) return self.emit("error", new Error(
"invalid file "+s.name+"\n"+er.message))
s.mode = st.mode & 0777
s.uid = st.uid
s.gid = st.gid
s.size = st.size
s.mtime = +st.mtime / 1000
s.type = st.isFile() ? "0"
: st.isSymbolicLink() ? "2"
: st.isCharacterDevice() ? "3"
: st.isBlockDevice() ? "4"
: st.isDirectory() ? "5"
: st.isFIFO() ? "6"
: null
// TODO: handle all the types in
// http://cdrecord.berlios.de/private/man/star/star.4.html
// for now, skip over unknown ones.
if (s.type === null) {
console.error("Unknown file type: " + s.name)
// kick out of the queue
var i = self._queue.indexOf(s)
if (i !== -1) self._queue.splice(i, 1)
self._processQueue()
return
}
if (s.type === "2") return fs.readlink(s.name, function (er, n) {
if (er) return self.emit("error", new Error(
"error reading link value "+s.name+"\n"+er.message))
s.linkname = n
s._needStat = false
self._processQueue()
})
s._needStat = false
self._processQueue()
})
return false
}
function toFileStream (thing) {
if (typeof thing === "string") {
return toFileStream(fs.createReadStream(thing))
}
if (thing && typeof thing === "object") {
if (thing instanceof (Parser.File)) return thing
if (thing instanceof Stream) {
if (thing.hasOwnProperty("name") &&
thing.hasOwnProperty("mode") &&
thing.hasOwnProperty("uid") &&
thing.hasOwnProperty("gid") &&
thing.hasOwnProperty("size") &&
thing.hasOwnProperty("mtime") &&
thing.hasOwnProperty("type")) return thing
if (thing instanceof (fs.ReadStream)) {
thing.name = thing.path
}
if (thing.name) {
thing._needStat = true
return thing
}
}
}
return null
}
Generator.prototype._processQueue = function processQueue () {
console.error("processQueue", this._queue[0])
if (this._paused) return false
if (this.currentFile ||
this._queue.length && this._queue[0]._needStat) {
// either already processing one, or waiting on something.
return
}
var f = this.currentFile = this._queue.shift()
if (!f) {
if (this._ended) {
// close it off with 2 blocks of nulls.
this.emit("data", new Buffer(new Array(512 * 2)))
this.emit("end")
this.emit("close")
}
return true
}
if (f.type === Parser.File.types.Directory &&
f.name.slice(-1) !== "/") {
f.name += "/"
}
// write out a Pax header if the file isn't kosher.
if (this._needPax(f)) this._emitPax(f)
// write out the header
f.ustar = true
this._emitHeader(f)
var fpos = 0
, self = this
console.error("about to read body data", f)
f.on("data", function (c) {
self.emit("data", c)
self.fpos += c.length
})
f.on("error", function (er) { self.emit("error", er) })
f.on("end", function $END () {
// pad with \0 out to an even multiple of 512 bytes.
// this ensures that every file starts on a block.
var b = new Buffer(fpos % 512 || 512)
for (var i = 0, l = b.length; i < l; i ++) b[i] = 0
//console.log(b.length, b)
self.emit("data", b)
self.currentFile = null
self._processQueue()
})
f.resume()
}
Generator.prototype._needPax = function (f) {
// meh. why not?
return true
return oddTextField(f.name, "NAME") ||
oddTextField(f.link, "LINK") ||
oddTextField(f.gname, "GNAME") ||
oddTextField(f.uname, "UNAME") ||
oddTextField(f.prefix, "PREFIX")
}
// check if a text field is too long or non-ascii
function oddTextField (val, field) {
var nl = Buffer.byteLength(val)
, len = tar.fieldSize[field]
if (nl > len || nl !== val.length) return true
}
// emit a Pax header of "key = val" for any file with
// odd or too-long field values.
Generator.prototype._emitPax = function (f) {
// since these tend to be relatively small, just go ahead
// and emit it all in-band. That saves having to keep
// track of the pax state in the generator, and we can
// go right back to emitting the file in the same tick.
var dir = f.name.replace(/[^\/]+\/?$/, "")
, base = f.name.substr(dir.length)
var pax = { name: dir + "PaxHeader/" +base
, mode: 0644
, uid: f.uid
, gid: f.gid
, mtime: +f.mtime
// don't know size yet.
, size: -1
, type: "x" // extended header
, ustar: true
, ustarVersion: "00"
, user: f.user || f.uname || ""
, group: f.group || f.gname || ""
, dev: { major: f.dev && f.dev.major || 0
, minor: f.dev && f.dev.minor || 0 }
, prefix: f.prefix
, linkname: "" }
// generate the Pax body
var kv = { path: (f.prefix ? f.prefix + "/" : "") + f.name
, atime: f.atime
, mtime: f.mtime
, ctime: f.ctime
, charset: "UTF-8"
, gid: f.gid
, uid: f.uid
, uname: f.user || f.uname || ""
, gname: f.group || f.gname || ""
, linkpath: f.linkpath || ""
, size: f.size
}
// "%d %s=%s\n", <length>, <keyword>, <value>
// length includes the length of the length number,
// the key=val, and the \n.
var body = new Buffer(Object.keys(kv).map(function (key) {
if (!kv[key]) return ["", ""]
var s = new Buffer(" " + key + "=" + kv[key]+"\n")
, digits = Math.floor(Math.log(s.length) / Math.log(10)) + 1
// if adding that many digits will make it go over that length,
// then add one to it
if (s.length > Math.pow(10, digits) - digits) digits ++
return [s.length + digits, s]
}).reduce(function (l, r) {
return l + r[0] + r[1]
}, ""))
pax.size = body.length
this._emitHeader(pax)
this.emit("data", body)
// now the trailing buffer to make it an even number of 512 blocks
var b = new Buffer(512 + (body.length % 512 || 512))
for (var i = 0, l = b.length; i < l; i ++) b[i] = 0
this.emit("data", b)
}
Generator.prototype._emitHeader = function (f) {
var header = new Buffer(new Array(512))
, fields = tar.fields
, offs = tar.fieldOffs
, sz = tar.fieldSize
addField(header, "NAME", f.name)
addField(header, "MODE", f.mode)
addField(header, "UID", f.uid)
addField(header, "GID", f.gid)
addField(header, "SIZE", f.size)
addField(header, "MTIME", +f.mtime)
// checksum is generated based on it being spaces
// then it's written as: "######\0 "
// where ### is a zero-lead 6-digit octal number
addField(header, "CKSUM", " ")
addField(header, "TYPE", f.type)
addField(header, "LINKNAME", f.linkname || "")
if (f.ustar) {
console.error(">>> ustar!!")
addField(header, "USTAR", tar.ustar)
addField(header, "USTARVER", 0)
addField(header, "UNAME", f.user || "")
addField(header, "GNAME", f.group || "")
if (f.dev) {
addField(header, "DEVMAJ", f.dev.major || 0)
addField(header, "DEVMIN", f.dev.minor || 0)
}
addField(header, "PREFIX", f.prefix)
} else {
console.error(">>> no ustar!")
}
// now the header is written except for checksum.
var ck = 0
for (var i = 0; i < 512; i ++) ck += header[i]
addField(header, "CKSUM", nF(ck, 7))
header[ offs[fields.CKSUM] + 7 ] = 0
this.emit("data", header)
}
function addField (buf, field, val) {
var f = tar.fields[field]
console.error("Adding field", field, val)
val = typeof val === "number"
? nF(val, tar.fieldSize[f])
: new Buffer(val || "")
val.copy(buf, tar.fieldOffs[f])
}
function toBase256 (num, len) {
console.error("toBase256", num, len)
var positive = num > 0
, buf = new Buffer(len)
if (!positive) {
// rare and slow
var b = num.toString(2).substr(1)
, padTo = (len - 1) * 8
b = new Array(padTo - b.length + 1).join("0") + b
// take the 2's complement
var ht = b.match(/^([01]*)(10*)?$/)
, head = ht[1]
, tail = ht[2]
head = head.split("1").join("2")
.split("0").join("1")
.split("2").join("0")
b = head + tail
buf[0] = 0xFF
for (var i = 1; i < len; i ++) {
buf[i] = parseInt(buf.substr(i * 8, 8), 2)
}
return buf
}
buf[0] = 0x80
for (var i = 1, l = len, p = l - 1; i < l; i ++, p --) {
buf[p] = num % 256
num = Math.floor(num / 256)
}
return buf
}
function nF (num, size) {
var ns = num.toString(8)
if (num < 0 || ns.length >= size) {
// make a base 256 buffer
// then return it
return toBase256(num, size)
}
var buf = new Buffer(size)
ns = new Array(size - ns.length - 1).join("0") + ns + " "
buf[size - 1] = 0
buf.asciiWrite(ns)
return buf
}

View File

@ -1,344 +0,0 @@
module.exports = Parser
Parser.create = create
Parser.File = File
var tar = require("./tar")
, Stream = require("stream").Stream
, fs = require("fs")
function create (cb) {
return new Parser(cb)
}
var s = 0
, HEADER = s ++
, BODY = s ++
, PAD = s ++
function Parser (cb) {
this.fields = tar.fields
this.fieldSize = tar.fieldSize
this.state = HEADER
this.position = 0
this.currentFile = null
this._header = []
this._headerPosition = 0
this._bodyPosition = 0
this.writable = true
Stream.apply(this)
if (cb) this.on("file", cb)
}
Parser.prototype = Object.create(Stream.prototype)
Parser.prototype.write = function (chunk) {
switch (this.state) {
case HEADER:
// buffer up to 512 bytes in memory, and then
// parse it, emit a "file" event, and stream the rest
this._header.push(chunk)
this._headerPosition += chunk.length
if (this._headerPosition >= tar.headerSize) {
return this._parseHeader()
}
return true
case BODY:
// stream it through until the end of the file is reached,
// and then step over any \0 byte padding.
var cl = chunk.length
, bp = this._bodyPosition
, np = cl + bp
, s = this.currentFile.size
if (np < s) {
this._bodyPosition = np
return this.currentFile.write(chunk)
}
var c = chunk.slice(0, (s - bp))
this.currentFile.write(c)
this._closeFile()
return this.write(chunk.slice(s - bp))
case PAD:
for (var i = 0, l = chunk.length; i < l; i ++) {
if (chunk[i] !== 0) {
this.state = HEADER
return this.write(chunk.slice(i))
}
}
}
return true
}
Parser.prototype.end = function (chunk) {
if (chunk) this.write(chunk)
if (this.currentFile) this._closeFile()
this.emit("end")
this.emit("close")
}
// at this point, we have at least 512 bytes of header chunks
Parser.prototype._parseHeader = function () {
var hp = this._headerPosition
, last = this._header.pop()
, rem
if (hp < 512) return this.emit("error", new Error(
"Trying to parse header before finished"))
if (hp > 512) {
var ll = last.length
, llIntend = 512 - hp + ll
rem = last.slice(llIntend)
last = last.slice(0, llIntend)
}
this._header.push(last)
var fields = tar.fields
, pos = 0
, field = 0
, fieldEnds = tar.fieldEnds
, fieldSize = tar.fieldSize
, set = {}
, fpos = 0
Object.keys(fieldSize).forEach(function (f) {
set[ fields[f] ] = new Buffer(fieldSize[f])
})
this._header.forEach(function (chunk) {
for (var i = 0, l = chunk.length; i < l; i ++, pos ++, fpos ++) {
if (pos >= fieldEnds[field]) {
field ++
fpos = 0
}
// header is null-padded, so when the fields run out,
// just finish.
if (null === fields[field]) return
set[fields[field]][fpos] = chunk[i]
}
})
this._header.length = 0
// type definitions here:
// http://cdrecord.berlios.de/private/man/star/star.4.html
var type = set.TYPE.toString()
, file = this.currentFile = new File(set)
if (type === "\0" ||
type >= "0" && type <= "7") {
this._addExtended(file)
this.emit("file", file)
} else if (type === "g") {
this._global = this._global || {}
readPax(this, file, this._global)
} else if (type === "h" || type === "x" || type === "X") {
this._extended = this._extended || {}
readPax(this, file, this._extended)
} else if (type === "K") {
this._readLongField(file, "linkname")
} else if (type === "L") {
this._readLongField(file, "name")
}
this.state = BODY
if (rem) return this.write(rem)
return true
}
function readPax (self, file, obj) {
var buf = ""
file.on("data", function (c) {
buf += c
var lines = buf.split(/\r?\n/)
buf = lines.pop()
lines.forEach(function (line) {
line = line.match(/^[0-9]+ ([^=]+)=(.*)/)
if (!line) return
obj[line[1]] = line[2]
})
})
}
Parser.prototype._readLongField = function (f, field) {
var self = this
this._longFields[field] = ""
f.on("data", function (c) {
self._longFields[field] += c
})
}
Parser.prototype._addExtended = function (file) {
var g = this._global || {}
, e = this._extended || {}
file.extended = {}
;[g, e].forEach(function (h) {
Object.keys(h).forEach(function (k) {
file.extended[k] = h[k]
// handle known fields
switch (k) {
case "path": file.name = h[k]; break
case "ctime": file.ctime = new Date(1000 * h[k]); break
case "mtime": file.mtime = new Date(1000 * h[k]); break
case "gid": file.gid = parseInt(h[k], 10); break
case "uid": file.uid = parseInt(h[k], 10); break
case "charset": file.charset = h[k]; break
case "gname": file.group = h[k]; break
case "uname": file.user = h[k]; break
case "linkpath": file.linkname = h[k]; break
case "size": file.size = parseInt(h[k], 10); break
case "SCHILY.devmajor": file.dev.major = parseInt(h[k], 10); break
case "SCHILY.devminor": file.dev.minor = parseInt(h[k], 10); break
}
})
})
var lf = this._longFields || {}
Object.keys(lf).forEach(function (f) {
file[f] = lf[f]
})
this._extended = {}
this._longFields = {}
}
Parser.prototype._closeFile = function () {
if (!this.currentFile) return this.emit("error", new Error(
"Trying to close without current file"))
this._headerPosition = this._bodyPosition = 0
this.currentFile.end()
this.currentFile = null
this.state = PAD
}
// file stuff
function strF (f) {
return f.toString("ascii").split("\0").shift() || ""
}
function parse256 (buf) {
// first byte MUST be either 80 or FF
// 80 for positive, FF for 2's comp
var positive
if (buf[0] === 0x80) positive = true
else if (buf[0] === 0xFF) positive = false
else return 0
if (!positive) {
// this is rare enough that the string slowness
// is not a big deal. You need *very* old files
// to ever hit this path.
var s = ""
for (var i = 1, l = buf.length; i < l; i ++) {
var byte = buf[i].toString(2)
if (byte.length < 8) {
byte = new Array(byte.length - 8 + 1).join("1") + byte
}
s += byte
}
var ht = s.match(/^([01]*)(10*)$/)
, head = ht[1]
, tail = ht[2]
head = head.split("1").join("2")
.split("0").join("1")
.split("2").join("0")
return -1 * parseInt(head + tail, 2)
}
var sum = 0
for (var i = 1, l = buf.length, p = l - 1; i < l; i ++, p--) {
sum += buf[i] * Math.pow(256, p)
}
return sum
}
function nF (f) {
if (f[0] & 128 === 128) {
return parse256(f)
}
return parseInt(f.toString("ascii").replace(/\0+/g, "").trim(), 8) || 0
}
function bufferMatch (a, b) {
if (a.length != b.length) return false
for (var i = 0, l = a.length; i < l; i ++) {
if (a[i] !== b[i]) return false
}
return true
}
function File (fields) {
this._raw = fields
this.name = strF(fields.NAME)
this.mode = nF(fields.MODE)
this.uid = nF(fields.UID)
this.gid = nF(fields.GID)
this.size = nF(fields.SIZE)
this.mtime = new Date(nF(fields.MTIME) * 1000)
this.cksum = nF(fields.CKSUM)
this.type = strF(fields.TYPE)
this.linkname = strF(fields.LINKNAME)
this.ustar = bufferMatch(fields.USTAR, tar.ustar)
if (this.ustar) {
this.ustarVersion = nF(fields.USTARVER)
this.user = strF(fields.UNAME)
this.group = strF(fields.GNAME)
this.dev = { major: nF(fields.DEVMAJ)
, minor: nF(fields.DEVMIN) }
this.prefix = strF(fields.PREFIX)
if (this.prefix) {
this.name = this.prefix + "/" + this.name
}
}
this.writable = true
this.readable = true
Stream.apply(this)
}
File.prototype = Object.create(Stream.prototype)
File.types = { File: "0"
, HardLink: "1"
, SymbolicLink: "2"
, CharacterDevice: "3"
, BlockDevice: "4"
, Directory: "5"
, FIFO: "6"
, ContiguousFile: "7" }
Object.keys(File.types).forEach(function (t) {
File.prototype["is"+t] = function () {
return File.types[t] === this.type
}
File.types[ File.types[t] ] = File.types[t]
})
// contiguous files are treated as regular files for most purposes.
File.prototype.isFile = function () {
return this.type === "0" && this.name.slice(-1) !== "/"
|| this.type === "7"
}
File.prototype.isDirectory = function () {
return this.type === "5"
|| this.type === "0" && this.name.slice(-1) === "/"
}
File.prototype.write = function (c) {
this.emit("data", c)
return true
}
File.prototype.end = function (c) {
if (c) this.write(c)
this.emit("end")
this.emit("close")
}
File.prototype.pause = function () { this.emit("pause") }
File.prototype.resume = function () { this.emit("resume") }

74
deps/npm/node_modules/tar/old/tar.js generated vendored
View File

@ -1,74 +0,0 @@
// field names that every tar file must have.
// header is padded to 512 bytes.
var f = 0
, fields = {}
, NAME = fields.NAME = f++
, MODE = fields.MODE = f++
, UID = fields.UID = f++
, GID = fields.GID = f++
, SIZE = fields.SIZE = f++
, MTIME = fields.MTIME = f++
, CKSUM = fields.CKSUM = f++
, TYPE = fields.TYPE = f++
, LINKNAME = fields.LINKNAME = f++
, headerSize = 512
, fieldSize = []
fieldSize[NAME] = 100
fieldSize[MODE] = 8
fieldSize[UID] = 8
fieldSize[GID] = 8
fieldSize[SIZE] = 12
fieldSize[MTIME] = 12
fieldSize[CKSUM] = 8
fieldSize[TYPE] = 1
fieldSize[LINKNAME] = 100
// "ustar\0" may introduce another bunch of headers.
// these are optional, and will be nulled out if not present.
var ustar = new Buffer(6)
ustar.asciiWrite("ustar\0")
var USTAR = fields.USTAR = f++
, USTARVER = fields.USTARVER = f++
, UNAME = fields.UNAME = f++
, GNAME = fields.GNAME = f++
, DEVMAJ = fields.DEVMAJ = f++
, DEVMIN = fields.DEVMIN = f++
, PREFIX = fields.PREFIX = f++
// terminate fields.
fields[f] = null
fieldSize[USTAR] = 6
fieldSize[USTARVER] = 2
fieldSize[UNAME] = 32
fieldSize[GNAME] = 32
fieldSize[DEVMAJ] = 8
fieldSize[DEVMIN] = 8
fieldSize[PREFIX] = 155
var fieldEnds = {}
, fieldOffs = {}
, fe = 0
for (var i = 0; i < f; i ++) {
fieldOffs[i] = fe
fieldEnds[i] = (fe += fieldSize[i])
}
// build a translation table of field names.
Object.keys(fields).forEach(function (f) {
fields[fields[f]] = f
})
exports.ustar = ustar
exports.fields = fields
exports.fieldSize = fieldSize
exports.fieldOffs = fieldOffs
exports.fieldEnds = fieldEnds
exports.headerSize = headerSize
var Parser = exports.Parser = require("./parser")
exports.createParser = Parser.create
var Generator = exports.Generator = require("./generator")
exports.createGenerator = Generator.create

View File

@ -1,13 +0,0 @@
// pipe this file to tar vt
var Generator = require("../generator")
, fs = require("fs")
, path = require("path")
, ohm = fs.createReadStream(path.resolve(__dirname, "tar-files/Ω.txt"))
, foo = path.resolve(__dirname, "tar-files/foo.js")
, gen = Generator.create({cwd: __dirname})
gen.pipe(process.stdout)
gen.append(ohm)
//gen.append(foo)
gen.end()

Binary file not shown.

Binary file not shown.

View File

@ -1,28 +0,0 @@
var p = require("../tar").createParser()
, fs = require("fs")
, tar = require("../tar")
p.on("file", function (file) {
console.error("file start", file.name, file.size, file.extended)
console.error(file)
Object.keys(file._raw).forEach(function (f) {
console.log(f, file._raw[f].toString().replace(/\0+$/, ""))
})
file.on("data", function (c) {
console.error("data", c.toString().replace(/\0+$/, ""))
})
file.on("end", function () {
console.error("end", file.name)
})
})
var s = fs.createReadStream(__dirname + "/test-generator.tar")
s.on("data", function (c) {
console.error("stream data", c.toString())
})
s.on("end", function () { console.error("stream end") })
s.on("close", function () { console.error("stream close") })
p.on("end", function () { console.error("parser end") })
s.pipe(p)

Binary file not shown.

Binary file not shown.

View File

@ -2,7 +2,7 @@
"author": "Isaac Z. Schlueter <i@izs.me> (http://blog.izs.me/)",
"name": "tar",
"description": "tar for node",
"version": "0.1.0",
"version": "0.1.3",
"repository": {
"type": "git",
"url": "git://github.com/isaacs/node-tar.git"
@ -17,7 +17,7 @@
"dependencies": {
"inherits": "1.x",
"block-stream": "*",
"fstream": "~0.1"
"fstream": "0.1"
},
"devDependencies": {
"tap": "0.x",

View File

@ -1,406 +0,0 @@
var tap = require("tap")
, tar = require("../tar.js")
, fs = require("fs")
, path = require("path")
, file = path.resolve(__dirname, "fixtures/c.tar")
, target = path.resolve(__dirname, "tmp/extract-test")
, index = 0
, fstream = require("fstream")
, ee = 0
, expectEntries =
[ { path: 'c.txt',
mode: '644',
type: '0',
depth: undefined,
size: 513,
linkpath: '',
nlink: undefined,
dev: undefined,
ino: undefined },
{ path: 'cc.txt',
mode: '644',
type: '0',
depth: undefined,
size: 513,
linkpath: '',
nlink: undefined,
dev: undefined,
ino: undefined },
{ path: 'r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/r/-/p/a/t/h/cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc',
mode: '644',
type: '0',
depth: undefined,
size: 100,
linkpath: '',
nlink: undefined,
dev: undefined,
ino: undefined },
{ path: 'Ω.txt',
mode: '644',
type: '0',
depth: undefined,
size: 2,
linkpath: '',
nlink: undefined,
dev: undefined,
ino: undefined },
{ path: 'Ω.txt',
mode: '644',
type: '0',
depth: undefined,
size: 2,
linkpath: '',
nlink: 1,
dev: 234881026,
ino: 51693379 },
{ path: '200ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc',
mode: '644',
type: '0',
depth: undefined,
size: 200,
linkpath: '',
nlink: 1,
dev: 234881026,
ino: 51681874 },
{ path: '200ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc',
mode: '644',
type: '0',
depth: undefined,
size: 201,
linkpath: '',
nlink: undefined,
dev: undefined,
ino: undefined },
{ path: '200LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL',
mode: '777',
type: '2',
depth: undefined,
size: 0,
linkpath: '200ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc',
nlink: undefined,
dev: undefined,
ino: undefined },
{ path: '200-hard',
mode: '644',
type: '0',
depth: undefined,
size: 200,
linkpath: '',
nlink: 2,
dev: 234881026,
ino: 51681874 },
{ path: '200ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc',
mode: '644',
type: '1',
depth: undefined,
size: 0,
linkpath: path.resolve(target, '200-hard'),
nlink: 2,
dev: 234881026,
ino: 51681874 } ]
, ef = 0
, expectFiles =
[ { path: '',
mode: '40755',
type: 'Directory',
depth: 0,
size: 306,
linkpath: undefined,
nlink: 9 },
{ path: '/200-hard',
mode: '100644',
type: 'File',
depth: 1,
size: 200,
linkpath: undefined,
nlink: 2 },
{ path: '/200ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc',
mode: '100644',
type: 'Link',
depth: 1,
size: 200,
linkpath: '/Users/isaacs/dev-src/js/node-tar/test/tmp/extract-test/200-hard',
nlink: 2 },
{ path: '/200LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL',
mode: '120777',
type: 'SymbolicLink',
depth: 1,
size: 200,
linkpath: '200ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc',
nlink: 1 },
{ path: '/c.txt',
mode: '100644',
type: 'File',
depth: 1,
size: 513,
linkpath: undefined,
nlink: 1 },
{ path: '/cc.txt',
mode: '100644',
type: 'File',
depth: 1,
size: 513,
linkpath: undefined,
nlink: 1 },
{ path: '/r',
mode: '40755',
type: 'Directory',
depth: 1,
size: 102,
linkpath: undefined,
nlink: 3 },
{ path: '/r/e',
mode: '40755',
type: 'Directory',
depth: 2,
size: 102,
linkpath: undefined,
nlink: 3 },
{ path: '/r/e/a',
mode: '40755',
type: 'Directory',
depth: 3,
size: 102,
linkpath: undefined,
nlink: 3 },
{ path: '/r/e/a/l',
mode: '40755',
type: 'Directory',
depth: 4,
size: 102,
linkpath: undefined,
nlink: 3 },
{ path: '/r/e/a/l/l',
mode: '40755',
type: 'Directory',
depth: 5,
size: 102,
linkpath: undefined,
nlink: 3 },
{ path: '/r/e/a/l/l/y',
mode: '40755',
type: 'Directory',
depth: 6,
size: 102,
linkpath: undefined,
nlink: 3 },
{ path: '/r/e/a/l/l/y/-',
mode: '40755',
type: 'Directory',
depth: 7,
size: 102,
linkpath: undefined,
nlink: 3 },
{ path: '/r/e/a/l/l/y/-/d',
mode: '40755',
type: 'Directory',
depth: 8,
size: 102,
linkpath: undefined,
nlink: 3 },
{ path: '/r/e/a/l/l/y/-/d/e',
mode: '40755',
type: 'Directory',
depth: 9,
size: 102,
linkpath: undefined,
nlink: 3 },
{ path: '/r/e/a/l/l/y/-/d/e/e',
mode: '40755',
type: 'Directory',
depth: 10,
size: 102,
linkpath: undefined,
nlink: 3 },
{ path: '/r/e/a/l/l/y/-/d/e/e/p',
mode: '40755',
type: 'Directory',
depth: 11,
size: 102,
linkpath: undefined,
nlink: 3 },
{ path: '/r/e/a/l/l/y/-/d/e/e/p/-',
mode: '40755',
type: 'Directory',
depth: 12,
size: 102,
linkpath: undefined,
nlink: 3 },
{ path: '/r/e/a/l/l/y/-/d/e/e/p/-/f',
mode: '40755',
type: 'Directory',
depth: 13,
size: 102,
linkpath: undefined,
nlink: 3 },
{ path: '/r/e/a/l/l/y/-/d/e/e/p/-/f/o',
mode: '40755',
type: 'Directory',
depth: 14,
size: 102,
linkpath: undefined,
nlink: 3 },
{ path: '/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l',
mode: '40755',
type: 'Directory',
depth: 15,
size: 102,
linkpath: undefined,
nlink: 3 },
{ path: '/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d',
mode: '40755',
type: 'Directory',
depth: 16,
size: 102,
linkpath: undefined,
nlink: 3 },
{ path: '/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e',
mode: '40755',
type: 'Directory',
depth: 17,
size: 102,
linkpath: undefined,
nlink: 3 },
{ path: '/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/r',
mode: '40755',
type: 'Directory',
depth: 18,
size: 102,
linkpath: undefined,
nlink: 3 },
{ path: '/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/r/-',
mode: '40755',
type: 'Directory',
depth: 19,
size: 102,
linkpath: undefined,
nlink: 3 },
{ path: '/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/r/-/p',
mode: '40755',
type: 'Directory',
depth: 20,
size: 102,
linkpath: undefined,
nlink: 3 },
{ path: '/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/r/-/p/a',
mode: '40755',
type: 'Directory',
depth: 21,
size: 102,
linkpath: undefined,
nlink: 3 },
{ path: '/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/r/-/p/a/t',
mode: '40755',
type: 'Directory',
depth: 22,
size: 102,
linkpath: undefined,
nlink: 3 },
{ path: '/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/r/-/p/a/t/h',
mode: '40755',
type: 'Directory',
depth: 23,
size: 102,
linkpath: undefined,
nlink: 3 },
{ path: '/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/r/-/p/a/t/h/cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc',
mode: '100644',
type: 'File',
depth: 24,
size: 100,
linkpath: undefined,
nlink: 1 },
{ path: '/Ω.txt',
mode: '100644',
type: 'File',
depth: 1,
size: 2,
linkpath: undefined,
nlink: 1 } ]
// The extract class basically just pipes the input
// to a Reader, and then to a fstream.DirWriter
// So, this is as much a test of fstream.Reader and fstream.Writer
// as it is of tar.Extract, but it sort of makes sense.
tap.test("extract test", function (t) {
var extract = tar.Extract(target)
var inp = fs.createReadStream(file)
// give it a weird buffer size to try to break in odd places
inp.bufferSize = 1234
inp.pipe(extract)
extract.on("end", function () {
t.equal(ee, expectEntries.length, "should see "+ee+" entries")
// should get no more entries after end
extract.removeAllListeners("entry")
extract.on("entry", function (e) {
t.fail("Should not get entries after end!")
})
next()
})
extract.on("entry", function (entry) {
var found =
{ path: entry.path
, mode: entry.props.mode.toString(8)
, type: entry.props.type
, depth: entry.props.depth
, size: entry.props.size
, linkpath: entry.props.linkpath
, nlink: entry.props.nlink
, dev: entry.props.dev
, ino: entry.props.ino
}
var wanted = expectEntries[ee ++]
t.equivalent(found, wanted, "tar entry " + ee + " " + wanted.path)
})
function next () {
var r = fstream.Reader({ path: target
, type: "Directory"
// this is just to encourage consistency
, sort: "alpha" })
r.on("ready", function () {
foundEntry(r)
})
r.on("end", finish)
function foundEntry (entry) {
var p = entry.path.substr(target.length)
var found =
{ path: p
, mode: entry.props.mode.toString(8)
, type: entry.props.type
, depth: entry.props.depth
, size: entry.props.size
, linkpath: entry.props.linkpath
, nlink: entry.props.nlink
}
var wanted = expectFiles[ef ++]
t.equivalent(found, wanted, "unpacked file " + ef + " " + wanted.path)
entry.on("entry", foundEntry)
}
function finish () {
t.equal(ef, expectFiles.length, "should have "+ef+" items")
t.end()
}
}
})

Binary file not shown.

View File

@ -1,50 +0,0 @@
# longpath header
2e2f2e2f404c6f6e674c696e6b00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000030303030303030003030303030303000303030303030300030303030303030303331310030303030303030303030300030313135363000204c000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 ././@LongLink.......................................................................................0000000.0000000.0000000.00000000311.00000000000.011560..L...................................................................................................
007573746172202000726f6f7400000000000000000000000000000000000000000000000000000000726f6f7400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 .ustar...root............................root...................................................................................................................................................................................................................
# longpath data
32303063636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363630000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 200ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc........................................................
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 ................................................................................................................................................................................................................................................................
# longpath file - note truncated path
32303063636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363303030303634340030303031373530003030303137353000303030303030303033313100313136353233353435373600303333343036002030000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 200ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc0000644.0001750.0001750.00000000311.11652354576.033406..0...................................................................................................
00757374617220200069736161637300000000000000000000000000000000000000000000000000006973616163730000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 .ustar...isaacs..........................isaacs.................................................................................................................................................................................................................
# longpath file contents
32303063636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363630a00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 200ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc........................................................
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 ................................................................................................................................................................................................................................................................
# tar eof
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 ................................................................................................................................................................................................................................................................
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 ................................................................................................................................................................................................................................................................
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 ................................................................................................................................................................................................................................................................
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 ................................................................................................................................................................................................................................................................
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 ................................................................................................................................................................................................................................................................
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 ................................................................................................................................................................................................................................................................
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 ................................................................................................................................................................................................................................................................
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 ................................................................................................................................................................................................................................................................
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 ................................................................................................................................................................................................................................................................
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 ................................................................................................................................................................................................................................................................
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 ................................................................................................................................................................................................................................................................
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 ................................................................................................................................................................................................................................................................
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 ................................................................................................................................................................................................................................................................
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 ................................................................................................................................................................................................................................................................
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 ................................................................................................................................................................................................................................................................
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 ................................................................................................................................................................................................................................................................
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 ................................................................................................................................................................................................................................................................
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 ................................................................................................................................................................................................................................................................
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 ................................................................................................................................................................................................................................................................
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 ................................................................................................................................................................................................................................................................
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 ................................................................................................................................................................................................................................................................
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 ................................................................................................................................................................................................................................................................
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 ................................................................................................................................................................................................................................................................
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 ................................................................................................................................................................................................................................................................
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 ................................................................................................................................................................................................................................................................
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 ................................................................................................................................................................................................................................................................
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 ................................................................................................................................................................................................................................................................
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 ................................................................................................................................................................................................................................................................
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 ................................................................................................................................................................................................................................................................
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 ................................................................................................................................................................................................................................................................
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 ................................................................................................................................................................................................................................................................
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 ................................................................................................................................................................................................................................................................

View File

@ -1 +0,0 @@
200ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc

Binary file not shown.

Binary file not shown.

View File

@ -1,14 +0,0 @@
-- header --
612e7478740000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000303030363434200030353737363120003030303032342000303030303030303034303120313136353133363033333320303132343531002030000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 a.txt...............................................................................................000644..057761..000024..00000000401.11651360333.012451..0...................................................................................................
00757374617200303069736161637300000000000000000000000000000000000000000000000000007374616666000000000000000000000000000000000000000000000000000000303030303030200030303030303020000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 .ustar.00isaacs..........................staff...........................000000..000000.........................................................................................................................................................................
-- file contents --
61616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
61000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 a...............................................................................................................................................................................................................................................................
-- tar eof --
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 ................................................................................................................................................................................................................................................................
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 ................................................................................................................................................................................................................................................................
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 ................................................................................................................................................................................................................................................................
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 ................................................................................................................................................................................................................................................................

Binary file not shown.

View File

@ -1 +0,0 @@
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa

View File

@ -1,14 +0,0 @@
-- normal header --
622e7478740000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000303030363434200030353737363120003030303032342000303030303030303130303020313136353133363036373720303132343631002030000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 b.txt...............................................................................................000644..057761..000024..00000001000.11651360677.012461..0...................................................................................................
00757374617200303069736161637300000000000000000000000000000000000000000000000000007374616666000000000000000000000000000000000000000000000000000000303030303030200030303030303020000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 .ustar.00isaacs..........................staff...........................000000..000000.........................................................................................................................................................................
-- file contents - exactly 512 bytes, no null padding --
62626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262 bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
62626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262 bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
-- tar eof blocks --
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 ................................................................................................................................................................................................................................................................
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 ................................................................................................................................................................................................................................................................
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 ................................................................................................................................................................................................................................................................
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 ................................................................................................................................................................................................................................................................

Binary file not shown.

View File

@ -1 +0,0 @@
bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb

View File

@ -1,74 +0,0 @@
-- c.txt header
632e7478740000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000303030363434200030353737363120003030303032342000303030303030303130303120313136353136353730343220303132343536002030000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 c.txt...............................................................................................000644..057761..000024..00000001001.11651657042.012456..0...................................................................................................
00757374617200303069736161637300000000000000000000000000000000000000000000000000007374616666000000000000000000000000000000000000000000000000000000303030303030200030303030303020000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 .ustar.00isaacs..........................staff...........................000000..000000.........................................................................................................................................................................
-- c.txt data
63636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363 cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
63636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363 cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
0a000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 ................................................................................................................................................................................................................................................................
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 ................................................................................................................................................................................................................................................................
-- cc.txt header
63632e74787400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000303030363434200030353737363120003030303032342000303030303030303130303120313136353136353730343620303132363235002030000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 cc.txt..............................................................................................000644..057761..000024..00000001001.11651657046.012625..0...................................................................................................
00757374617200303069736161637300000000000000000000000000000000000000000000000000007374616666000000000000000000000000000000000000000000000000000000303030303030200030303030303020000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 .ustar.00isaacs..........................staff...........................000000..000000.........................................................................................................................................................................
-- cc.txt data
63636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363 cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
63636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363 cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
0a000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 ................................................................................................................................................................................................................................................................
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 ................................................................................................................................................................................................................................................................
-- r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/r/-/p/a/t/h/ccc.... header
63636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363303030363434200030353737363120003030303032342000303030303030303031343420313136353231353135333320303433333134002030000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc000644..057761..000024..00000000144.11652151533.043314..0...................................................................................................
0075737461720030306973616163730000000000000000000000000000000000000000000000000000737461666600000000000000000000000000000000000000000000000000000030303030303020003030303030302000722f652f612f6c2f6c2f792f2d2f642f652f652f702f2d2f662f6f2f6c2f642f652f722f2d2f702f612f742f680000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 .ustar.00isaacs..........................staff...........................000000..000000..r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/r/-/p/a/t/h..........................................................................................................................
-- r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/r/-/p/a/t/h/ccc.... contents
63636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc............................................................................................................................................................
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 ................................................................................................................................................................................................................................................................
-- omega header, no pax
cea92e74787400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000303030363434200030353737363120003030303032342000303030303030303030303220313136353233313530363520303133303737002030000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 Ω.txt..............................................................................................000644..057761..000024..00000000002.11652315065.013077..0...................................................................................................
00757374617200303069736161637300000000000000000000000000000000000000000000000000007374616666000000000000000000000000000000000000000000000000000000303030303030200030303030303020000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 .ustar.00isaacs..........................staff...........................000000..000000.........................................................................................................................................................................
-- omega contents
cea90000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 Ω..............................................................................................................................................................................................................................................................
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 ................................................................................................................................................................................................................................................................
-- paxheader for omega
5061784865616465722fcea92e747874000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000303030363434200030353737363120003030303032342000303030303030303031373020313136353233313530363520303135303536002078000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 PaxHeader/Ω.txt....................................................................................000644..057761..000024..00000000170.11652315065.015056..x...................................................................................................
00757374617200303069736161637300000000000000000000000000000000000000000000000000007374616666000000000000000000000000000000000000000000000000000000303030303030200030303030303020000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 .ustar.00isaacs..........................staff...........................000000..000000.........................................................................................................................................................................
-- paxheader content
313520706174683dcea92e7478740a3230206374696d653d313331393733373930390a3230206174696d653d313331393733393036310a323420534348494c592e6465763d3233343838313032360a323320534348494c592e696e6f3d35313639333337390a313820534348494c592e6e6c696e6b3d310a00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 15.path=Ω.txt.20.ctime=1319737909.20.atime=1319739061.24.SCHILY.dev=234881026.23.SCHILY.ino=51693379.18.SCHILY.nlink=1.........................................................................................................................................
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 ................................................................................................................................................................................................................................................................
-- header for omega
cea92e74787400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000303030363434200030353737363120003030303032342000303030303030303030303220313136353233313530363520303133303737002030000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 Ω.txt..............................................................................................000644..057761..000024..00000000002.11652315065.013077..0...................................................................................................
00757374617200303069736161637300000000000000000000000000000000000000000000000000007374616666000000000000000000000000000000000000000000000000000000303030303030200030303030303020000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 .ustar.00isaacs..........................staff...........................000000..000000.........................................................................................................................................................................
-- omega data
cea90000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 Ω..............................................................................................................................................................................................................................................................
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 ................................................................................................................................................................................................................................................................
-- paxheader for 200char filename
5061784865616465722f323030636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363630000303030363434200030353737363120003030303032342000303030303030303035343120313136353231353133323420303334323330002078000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 PaxHeader/200ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc..000644..057761..000024..00000000541.11652151324.034230..x...................................................................................................
00757374617200303069736161637300000000000000000000000000000000000000000000000000007374616666000000000000000000000000000000000000000000000000000000303030303030200030303030303020000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 .ustar.00isaacs..........................staff...........................000000..000000.........................................................................................................................................................................
-- paxheader content
32313020706174683d32303063636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363630a3230206374696d653d313331393638363836380a3230206174696d653d313331393734313235340a3338204c4942 210.path=200ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc.20.ctime=1319686868.20.atime=1319741254.38.LIB
415243484956452e6372656174696f6e74696d653d313331393638363835320a323420534348494c592e6465763d3233343838313032360a323320534348494c592e696e6f3d35313638313837340a313820534348494c592e6e6c696e6b3d310a000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 ARCHIVE.creationtime=1319686852.24.SCHILY.dev=234881026.23.SCHILY.ino=51681874.18.SCHILY.nlink=1................................................................................................................................................................
-- header for 200char filename (note truncated path)
32303063636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636300303030363434200030353737363120003030303032342000303030303030303033313020313136353231353133323420303334333532002030000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 200cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc.000644..057761..000024..00000000310.11652151324.034352..0...................................................................................................
00757374617200303069736161637300000000000000000000000000000000000000000000000000007374616666000000000000000000000000000000000000000000000000000000303030303030200030303030303020000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 .ustar.00isaacs..........................staff...........................000000..000000.........................................................................................................................................................................
-- 200char data
32303063636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363630000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 200ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc........................................................
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 ................................................................................................................................................................................................................................................................
-- tar eof
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 ................................................................................................................................................................................................................................................................
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 ................................................................................................................................................................................................................................................................
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 ................................................................................................................................................................................................................................................................
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 ................................................................................................................................................................................................................................................................

Binary file not shown.

View File

@ -1 +0,0 @@
cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc

View File

@ -1 +0,0 @@
cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc

Some files were not shown because too many files have changed in this diff Show More