Initial commit

This commit is contained in:
Patrick Marsceill
2017-03-09 13:16:08 -05:00
commit b7b0d0d7bf
4147 changed files with 401224 additions and 0 deletions

3
node_modules/stream-combiner/.npmignore generated vendored Normal file
View File

@@ -0,0 +1,3 @@
node_modules
node_modules/*
npm_debug.log

4
node_modules/stream-combiner/.travis.yml generated vendored Normal file
View File

@@ -0,0 +1,4 @@
language: node_js
node_js:
- 0.6
- 0.8

22
node_modules/stream-combiner/LICENSE generated vendored Normal file
View File

@@ -0,0 +1,22 @@
Copyright (c) 2012 'Dominic Tarr'
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.

55
node_modules/stream-combiner/README.md generated vendored Normal file
View File

@@ -0,0 +1,55 @@
# stream-combiner
[![npm version](https://img.shields.io/npm/v/stream-combiner.svg)](https://npmjs.org/package/stream-combiner)
[![Travis CI](https://travis-ci.org/dominictarr/stream-combiner.svg)](https://travis-ci.org/dominictarr/stream-combiner)
## Combine (stream1,...,streamN)
Turn a pipeline into a single stream. `Combine` returns a stream that writes to the first stream
and reads from the last stream.
Listening for 'error' will recieve errors from all streams inside the pipe.
```js
var Combine = require('stream-combiner')
var es = require('event-stream')
Combine( // connect streams together with `pipe`
process.openStdin(), // open stdin
es.split(), // split stream to break on newlines
es.map(function (data, callback) { // turn this async function into a stream
var repr = util.inspect(JSON.parse(data)) // render it nicely
callback(null, repr)
}),
process.stdout // pipe it to stdout !
)
```
Can also be called with an array:
```js
var combinedStream = Combine([
stream1,
stream2,
]);
```
Or to combine gulp plugins:
```js
function coffeePipe() {
return Combine(
coffeescript(),
coffeelint.reporter('fail').on('error', function(){
gutil.beep()
gulp.run('lint')
})
}
//usage:
gulp.src().pipe(coffeePipe());
```
## License
MIT

45
node_modules/stream-combiner/index.js generated vendored Normal file
View File

@@ -0,0 +1,45 @@
var duplexer = require('duplexer')
var through = require('through')
module.exports = function () {
var streams
if(arguments.length == 1 && Array.isArray(arguments[0])) {
streams = arguments[0]
} else {
streams = [].slice.call(arguments)
}
if(streams.length == 0)
return through()
else if(streams.length == 1)
return streams[0]
var first = streams[0]
, last = streams[streams.length - 1]
, thepipe = duplexer(first, last)
//pipe all the streams together
function recurse (streams) {
if(streams.length < 2)
return
streams[0].pipe(streams[1])
recurse(streams.slice(1))
}
recurse(streams)
function onerror () {
var args = [].slice.call(arguments)
args.unshift('error')
thepipe.emit.apply(thepipe, args)
}
//es.duplex already reemits the error from the first and last stream.
//add a listener for the inner streams in the pipeline.
for(var i = 1; i < streams.length - 1; i ++)
streams[i].on('error', onerror)
return thepipe
}

78
node_modules/stream-combiner/package.json generated vendored Normal file
View File

@@ -0,0 +1,78 @@
{
"_args": [
[
"stream-combiner@^0.2.1",
"/Users/pmarsceill/_projects/just-the-docs/node_modules/jsonfilter"
]
],
"_from": "stream-combiner@>=0.2.1 <0.3.0",
"_id": "stream-combiner@0.2.2",
"_inCache": true,
"_installable": true,
"_location": "/stream-combiner",
"_nodeVersion": "0.12.4",
"_npmUser": {
"email": "dominic.tarr@gmail.com",
"name": "dominictarr"
},
"_npmVersion": "2.11.0",
"_phantomChildren": {},
"_requested": {
"name": "stream-combiner",
"raw": "stream-combiner@^0.2.1",
"rawSpec": "^0.2.1",
"scope": null,
"spec": ">=0.2.1 <0.3.0",
"type": "range"
},
"_requiredBy": [
"/jsonfilter"
],
"_resolved": "https://registry.npmjs.org/stream-combiner/-/stream-combiner-0.2.2.tgz",
"_shasum": "aec8cbac177b56b6f4fa479ced8c1912cee52858",
"_shrinkwrap": null,
"_spec": "stream-combiner@^0.2.1",
"_where": "/Users/pmarsceill/_projects/just-the-docs/node_modules/jsonfilter",
"author": {
"email": "dominic.tarr@gmail.com",
"name": "'Dominic Tarr'",
"url": "http://dominictarr.com"
},
"bugs": {
"url": "https://github.com/dominictarr/stream-combiner/issues"
},
"dependencies": {
"duplexer": "~0.1.1",
"through": "~2.3.4"
},
"description": "[![npm version](https://img.shields.io/npm/v/stream-combiner.svg)](https://npmjs.org/package/stream-combiner) [![Travis CI](https://travis-ci.org/dominictarr/stream-combiner.svg)](https://travis-ci.org/dominictarr/stream-combiner)",
"devDependencies": {
"event-stream": "~3.0.7",
"tape": "~2.3.0"
},
"directories": {},
"dist": {
"shasum": "aec8cbac177b56b6f4fa479ced8c1912cee52858",
"tarball": "https://registry.npmjs.org/stream-combiner/-/stream-combiner-0.2.2.tgz"
},
"gitHead": "5a8ab6f1843d08d89801eecd91ff10be65b667a0",
"homepage": "https://github.com/dominictarr/stream-combiner",
"license": "MIT",
"maintainers": [
{
"name": "dominictarr",
"email": "dominic.tarr@gmail.com"
}
],
"name": "stream-combiner",
"optionalDependencies": {},
"readme": "ERROR: No README data found!",
"repository": {
"type": "git",
"url": "git://github.com/dominictarr/stream-combiner.git"
},
"scripts": {
"test": "set -e; for t in test/*.js; do node $t; done"
},
"version": "0.2.2"
}

65
node_modules/stream-combiner/test/index.js generated vendored Normal file
View File

@@ -0,0 +1,65 @@
var es = require('event-stream')
var combine = require('..')
var test = require('tape')
test('do not duplicate errors', function (test) {
var errors = 0;
var pipe = combine(
es.through(function(data) {
return this.emit('data', data);
}),
es.through(function(data) {
return this.emit('error', new Error(data));
})
)
pipe.on('error', function(err) {
errors++
test.ok(errors, 'expected error count')
process.nextTick(function () {
return test.end();
})
})
return pipe.write('meh');
})
test('3 pipe do not duplicate errors', function (test) {
var errors = 0;
var pipe = combine(
es.through(function(data) {
return this.emit('data', data);
}),
es.through(function(data) {
return this.emit('error', new Error(data));
}),
es.through()
)
pipe.on('error', function(err) {
errors++
test.ok(errors, 'expected error count')
process.nextTick(function () {
return test.end();
})
})
return pipe.write('meh');
})
test('0 argument through stream', function (test) {
test.plan(3)
var pipe = combine()
, expected = [ 'beep', 'boop', 'robots' ]
pipe.pipe(es.through(function(data) {
test.equal(data, expected.shift())
}))
pipe.write('beep')
pipe.write('boop')
pipe.end('robots')
})