pax_global_header00006660000000000000000000000064145521317610014517gustar00rootroot0000000000000052 comment=c93f7854517f6b81f3cfdec16264b1f7883f7493 flatiron-union-51f28e7/000077500000000000000000000000001455213176100150265ustar00rootroot00000000000000flatiron-union-51f28e7/.gitattributes000066400000000000000000000000311455213176100177130ustar00rootroot00000000000000package-lock.json binary flatiron-union-51f28e7/.github/000077500000000000000000000000001455213176100163665ustar00rootroot00000000000000flatiron-union-51f28e7/.github/workflows/000077500000000000000000000000001455213176100204235ustar00rootroot00000000000000flatiron-union-51f28e7/.github/workflows/ci.yaml000066400000000000000000000007351455213176100217070ustar00rootroot00000000000000name: ci on: push: branches: - main jobs: build: runs-on: ubuntu-latest strategy: matrix: node-version: ['0.8.x', '12.x', '14.x', '16.x'] # Including Node.js 0.8.x steps: - uses: actions/checkout@v4 - name: Use Node.js ${{ matrix.node-version }} uses: actions/setup-node@v3 with: node-version: ${{ matrix.node-version }} - run: npm ci - run: npm run build - run: npm run test flatiron-union-51f28e7/.gitignore000066400000000000000000000001441455213176100170150ustar00rootroot00000000000000node_modules npm-debug.log test/fixtures/*-test.txt examples/*.txt examples/simple/*.txt .DS_Store flatiron-union-51f28e7/CHANGELOG.md000066400000000000000000000001511455213176100166340ustar00rootroot00000000000000 0.3.4 / 2012-07-24 ================== * Added SPDY support * Added http redirect utility function flatiron-union-51f28e7/LICENSE000066400000000000000000000020671455213176100160400ustar00rootroot00000000000000Copyright (c) 2010 Charlie Robbins & the Contributors. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. flatiron-union-51f28e7/README.md000066400000000000000000000173241455213176100163140ustar00rootroot00000000000000 # Synopsis A hybrid streaming middleware kernel backwards compatible with connect. # Motivation The advantage to streaming middlewares is that they do not require buffering the entire stream in order to execute their function. # Status [![Build Status](https://secure.travis-ci.org/flatiron/union.png)](http://travis-ci.org/flatiron/union) # Installation There are a few ways to use `union`. Install the library using npm. You can add it to your `package.json` file as a dependancy ```bash $ [sudo] npm install union ``` ## Usage Union's request handling is [connect](https://github.com/senchalabs/connect)-compatible, meaning that all existing connect middlewares should work out-of-the-box with union. **(Union 0.3.x is compatible with connect >= 2.1.0)** In addition, the response object passed to middlewares listens for a "next" event, which is equivalent to calling `next()`. Flatiron middlewares are written in this manner, meaning they are not reverse-compatible with connect. ### A simple case ``` js var fs = require('fs'), union = require('../lib'), director = require('director'); var router = new director.http.Router(); var server = union.createServer({ before: [ function (req, res) { var found = router.dispatch(req, res); if (!found) { res.emit('next'); } } ] }); router.get(/foo/, function () { this.res.writeHead(200, { 'Content-Type': 'text/plain' }) this.res.end('hello world\n'); }); router.post(/foo/, { stream: true }, function () { var req = this.req, res = this.res, writeStream; writeStream = fs.createWriteStream(Date.now() + '-foo.txt'); req.pipe(writeStream); writeStream.on('close', function () { res.writeHead(200, { 'Content-Type': 'text/plain' }); res.end('wrote to a stream!'); }); }); server.listen(9090); console.log('union with director running on 9090'); ``` To demonstrate the code, we use [director](https://github.com/flatiron/director). A light-weight, Client AND Server side URL-Router for Node.js and Single Page Apps! ### A case with connect Code based on connect ```js var connect = require('connect') , http = require('http'); var app = connect() .use(connect.favicon()) .use(connect.logger('dev')) .use(connect.static('public')) .use(connect.directory('public')) .use(connect.cookieParser('my secret here')) .use(connect.session()) .use(function (req, res) { res.end('Hello from Connect!\n'); }); http.createServer(app).listen(3000); ``` Code based on union ```js var connect = require('connect') , union = require('union'); var server = union.createServer({ buffer: false, before: [ connect.favicon(), connect.logger('dev'), connect.static('public'), connect.directory('public'), connect.cookieParser('my secret here'), connect.session(), function (req, res) { res.end('Hello from Connect!\n'); }, ] }).listen(3000); ``` ### SPDY enabled server example # API ## union Static Members ### createServer(options) The `options` object is required. Options include: Specification ``` function createServer(options) @param options {Object} An object literal that represents the configuration for the server. @option before {Array} The `before` value is an array of middlewares, which are used to route and serve incoming requests. For instance, in the example, `favicon` is a middleware which handles requests for `/favicon.ico`. @option after {Array} The `after` value is an array of functions that return stream filters, which are applied after the request handlers in `options.before`. Stream filters inherit from `union.ResponseStream`, which implements the Node.js core streams api with a bunch of other goodies. @option limit {Object} (optional) A value, passed to internal instantiations of `union.BufferedStream`. @option https {Object} (optional) A value that specifies the certificate and key necessary to create an instance of `https.Server`. @option spdy {Object} (optional) A value that specifies the certificate and key necessary to create an instance of `spdy.Server`. @option headers {Object} (optional) An object representing a set of headers to set in every outgoing response ``` Example ```js var server = union.createServer({ before: [ favicon('./favicon.png'), function (req, res) { var found = router.dispatch(req, res); if (!found) { res.emit('next'); } } ] }); ``` An example of the `https` or `spdy` option. ``` js { cert: 'path/to/cert.pem', key: 'path/to/key.pem', ca: 'path/to/ca.pem' } ``` An example of the `headers` option. ``` js { 'x-powered-by': 'your-sweet-application v10.9.8' } ``` ## Error Handling Error handler is similiar to middlware but takes an extra argument for error at the beginning. ```js var handle = function (err, req, res) { res.statusCode = err.status; res.end(req.headers); }; var server = union.createServer({ onError: handle, before: [ favicon('./favicon.png'), function (req, res) { var found = router.dispatch(req, res); if (!found) { res.emit('next'); } } ] }); ``` ## BufferedStream Constructor This constructor inherits from `Stream` and can buffer data up to `limit` bytes. It also implements `pause` and `resume` methods. Specification ``` function BufferedStream(limit) @param limit {Number} the limit for which the stream can be buffered ``` Example ```js var bs = union.BufferedStream(n); ``` ## HttpStream Constructor This constructor inherits from `union.BufferedStream` and returns a stream with these extra properties: Specification ``` function HttpStream() ``` Example ```js var hs = union.HttpStream(); ``` ## HttpStream Instance Members ### url The url from the request. Example ```js httpStream.url = ''; ``` ### headers The HTTP headers associated with the stream. Example ```js httpStream.headers = ''; ``` ### method The HTTP method ("GET", "POST", etc). Example ```js httpStream.method = 'POST'; ``` ### query The querystring associated with the stream (if applicable). Example ```js httpStream.query = ''; ``` ## ResponseStream Constructor This constructor inherits from `union.HttpStream`, and is additionally writeable. Union supplies this constructor as a basic response stream middleware from which to inherit. Specification ``` function ResponseStream() ``` Example ```js var rs = union.ResponseStream(); ``` # Tests All tests are written with [vows][0] and should be run with [npm][1]: ``` bash $ npm test ``` # Licence (The MIT License) Copyright (c) 2010-2012 Charlie Robbins & the Contributors Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. [0]: http://vowsjs.org [1]: http://npmjs.org flatiron-union-51f28e7/examples/000077500000000000000000000000001455213176100166445ustar00rootroot00000000000000flatiron-union-51f28e7/examples/after/000077500000000000000000000000001455213176100177455ustar00rootroot00000000000000flatiron-union-51f28e7/examples/after/index.js000066400000000000000000000010461455213176100214130ustar00rootroot00000000000000var fs = require('fs'), path = require('path'), union = require('../../lib'); var server = union.createServer({ before: [ function (req,res) { if (req.url === "/foo") { res.text(201, "foo"); } } ], after: [ function LoggerStream() { var stream = new union.ResponseStream(); stream.once("pipe", function (req) { console.log({res: this.res.statusCode, method: this.req.method}); }); return stream; } ] }); server.listen(9080); console.log('union running on 9080'); flatiron-union-51f28e7/examples/simple/000077500000000000000000000000001455213176100201355ustar00rootroot00000000000000flatiron-union-51f28e7/examples/simple/favicon.png000066400000000000000000000010411455213176100222640ustar00rootroot00000000000000PNG  IHDRatEXtSoftwareAdobe ImageReadyqe<IDATxēkaǿGސB: AR 8tK^%[p13uRAI\ Q -.҂T.bhK<9>}$4!W*e[ak01 bP.8&~7j8%v8[qo 5{8LJL&9w1G@:F6zPyvQՠ*Rvg*Z+n7! v#0 \.躎zE;JQZ-}9~?$Iz2`<l>2wu:jv^O06MF#h&t4[cvzM,Jb d 2d,_qO|#~kZF$Y(LǫU_R*8iɪ "e493298061761236c96b02ea6aa8a2ad" * * @param {String} str * @param {String} encoding * @return {String} * @api public */ exports.md5 = function (str, encoding) { return crypto .createHash('md5') .update(str) .digest(encoding || 'hex'); }; /** * By default serves the connect favicon, or the favicon * located by the given `path`. * * Options: * * - `maxAge` cache-control max-age directive, defaulting to 1 day * * Examples: * * connect.createServer( * connect.favicon() * ); * * connect.createServer( * connect.favicon(__dirname + '/public/favicon.ico') * ); * * @param {String} path * @param {Object} options * @return {Function} * @api public */ module.exports = function favicon(path, options) { var options = options || {} , path = path || __dirname + '/../public/favicon.ico' , maxAge = options.maxAge || 86400000; return function favicon(req, res, next) { if ('/favicon.ico' == req.url) { if (icon) { res.writeHead(200, icon.headers); res.end(icon.body); } else { fs.readFile(path, function (err, buf) { if (err) return next(err); icon = { headers: { 'Content-Type': 'image/x-icon' , 'Content-Length': buf.length , 'ETag': '"' + exports.md5(buf) + '"' , 'Cache-Control': 'public, max-age=' + (maxAge / 1000) }, body: buf }; res.writeHead(200, icon.headers); res.end(icon.body); }); } } else { next(); } }; };flatiron-union-51f28e7/examples/simple/middleware/gzip-decode.js000066400000000000000000000013251455213176100250030ustar00rootroot00000000000000var spawn = require('child_process').spawn, util = require('util'), RequestStream = require('../../lib').RequestStream; var GzipDecode = module.exports = function GzipDecoder(options) { RequestStream.call(this, options); this.on('pipe', this.decode); } util.inherits(GzipDecode, RequestStream); GzipDecode.prototype.decode = function (source) { this.decoder = spawn('gunzip'); this.decoder.stdout.on('data', this._onGunzipData.bind(this)); this.decoder.stdout.on('end', this._onGunzipEnd.bind(this)); source.pipe(this.decoder); } GzipDecoderStack.prototype._onGunzipData = function (chunk) { this.emit('data', chunk); } GzipDecoderStack.prototype._onGunzipEnd = function () { this.emit('end'); }flatiron-union-51f28e7/examples/simple/middleware/gzip-encode.js000066400000000000000000000021541455213176100250160ustar00rootroot00000000000000var spawn = require('child_process').spawn, util = require('util'), ResponseStream = require('../../lib').ResponseStream; /** * Accepts a writable stream, i.e. fs.WriteStream, and returns a StreamStack * whose 'write()' calls are transparently sent to a 'gzip' process before * being written to the target stream. */ var GzipEncode = module.exports = function GzipEncode(options) { ResponseStream.call(this, options); if (compression) { process.assert(compression >= 1 && compression <= 9); this.compression = compression; } this.on('pipe', this.encode); } util.inherits(GzipEncode, ResponseStream); GzipEncode.prototype.encode = function (source) { this.source = source; }; GzipEncode.prototype.pipe = function (dest) { if (!this.source) { throw new Error('GzipEncode is only pipeable once it has been piped to'); } this.encoder = spawn('gzip', ['-'+this.compression]); this.encoder.stdout.pipe(dest); this.encoder.stdin.pipe(this.source); }; inherits(GzipEncoderStack, StreamStack); exports.GzipEncoderStack = GzipEncoderStack; GzipEncoderStack.prototype.compression = 6;flatiron-union-51f28e7/examples/simple/simple.js000066400000000000000000000025531455213176100217710ustar00rootroot00000000000000var fs = require('fs'), path = require('path'), union = require('../../lib'), director = require('director'), favicon = require('./middleware/favicon'); var router = new director.http.Router(); var server = union.createServer({ before: [ favicon(path.join(__dirname, 'favicon.png')), function (req, res) { var found = router.dispatch(req, res); if (!found) { res.emit('next'); } } ] }); router.get('/foo', function () { this.res.writeHead(200, { 'Content-Type': 'text/plain' }); this.res.end('hello world\n'); }); router.post('/foo', { stream: true }, function () { var req = this.req, res = this.res, writeStream; writeStream = fs.createWriteStream(__dirname + '/' + Date.now() + '-foo.txt'); req.pipe(writeStream); writeStream.on('close', function () { res.writeHead(200, { 'Content-Type': 'text/plain' }); res.end('wrote to a stream!'); }); }); router.get('/redirect', function () { this.res.redirect('http://www.google.com'); }); router.get('/custom_redirect', function () { this.res.redirect('/foo', 301); }); router.get('/async', function () { var self = this; process.nextTick(function () { self.req.on('end', function () { self.res.end(); }) self.req.buffer = false; }); }); server.listen(9090); console.log('union with director running on 9090'); flatiron-union-51f28e7/examples/simple/spdy.js000066400000000000000000000012661455213176100214570ustar00rootroot00000000000000// In order to run this example you need to // generate local ssl certificate var union = require('../../lib'), director = require('director'); var router = new director.http.Router(); var server = union.createServer({ before: [ function (req, res) { var found = router.dispatch(req, res); if (!found) { res.emit('next'); } } ], spdy :{ key: './certs/privatekey.pem', cert: './certs/certificate.pem' } }); router.get(/foo/, function () { this.res.writeHead(200, { 'Content-Type': 'text/plain' }) this.res.end('hello world\n'); }); server.listen(9090, function () { console.log('union with director running on 9090 with SPDY'); });flatiron-union-51f28e7/examples/socketio/000077500000000000000000000000001455213176100204645ustar00rootroot00000000000000flatiron-union-51f28e7/examples/socketio/README000066400000000000000000000005341455213176100213460ustar00rootroot00000000000000This folder contains an example of how to use Union with Socket.io. First, you'll want to install both Union and Socket.io. Run this command in the folder you placed these two files: npm install union socket.io You can run the server like so: node server.js Now open up your web browser to http://localhost and see the results in the console! flatiron-union-51f28e7/examples/socketio/index.html000066400000000000000000000003471455213176100224650ustar00rootroot00000000000000 flatiron-union-51f28e7/examples/socketio/server.js000066400000000000000000000011131455213176100223240ustar00rootroot00000000000000var fs = require('fs'), union = require('union'); var server = union.createServer({ before: [ function (req, res) { fs.readFile(__dirname + '/index.html', function (err, data) { if (err) { res.writeHead(500); return res.end('Error loading index.html'); } res.writeHead(200); res.end(data); }); } ] }); server.listen(9090); var io = require('socket.io').listen(server); io.sockets.on('connection', function (socket) { socket.emit('news', {hello: 'world'}); socket.on('my other event', function (data) { console.log(data); }); });flatiron-union-51f28e7/lib/000077500000000000000000000000001455213176100155745ustar00rootroot00000000000000flatiron-union-51f28e7/lib/buffered-stream.js000066400000000000000000000056141455213176100212130ustar00rootroot00000000000000/* * buffered-stream.js: A simple(r) Stream which is partially buffered into memory. * * (C) 2010, Mikeal Rogers * * Adapted for Flatiron * (C) 2011, Charlie Robbins & the Contributors * MIT LICENSE * */ var events = require('events'), fs = require('fs'), stream = require('stream'), util = require('util'); // // ### function BufferedStream (limit) // #### @limit {number} **Optional** Size of the buffer to limit // Constructor function for the BufferedStream object responsible for // maintaining a stream interface which can also persist to memory // temporarily. // var BufferedStream = module.exports = function (limit) { events.EventEmitter.call(this); if (typeof limit === 'undefined') { limit = Infinity; } this.limit = limit; this.size = 0; this.chunks = []; this.writable = true; this.readable = true; this._buffer = true; }; util.inherits(BufferedStream, stream.Stream); Object.defineProperty(BufferedStream.prototype, 'buffer', { get: function () { return this._buffer; }, set: function (value) { if (!value && this.chunks) { var self = this; this.chunks.forEach(function (c) { self.emit('data', c) }); if (this.ended) this.emit('end'); this.size = 0; delete this.chunks; } this._buffer = value; } }); BufferedStream.prototype.pipe = function () { var self = this, dest; if (self.resume) { self.resume(); } dest = stream.Stream.prototype.pipe.apply(self, arguments); // // just incase you are piping to two streams, do not emit data twice. // note: you can pipe twice, but you need to pipe both streams in the same tick. // (this is normal for streams) // if (this.piped) { return dest; } process.nextTick(function () { if (self.chunks) { self.chunks.forEach(function (c) { self.emit('data', c) }); self.size = 0; delete self.chunks; } if (!self.readable) { if (self.ended) { self.emit('end'); } else if (self.closed) { self.emit('close'); } } }); this.piped = true; return dest; }; BufferedStream.prototype.write = function (chunk) { if (!this.chunks || this.piped) { this.emit('data', chunk); return; } this.chunks.push(chunk); this.size += chunk.length; if (this.limit < this.size) { this.pause(); } }; BufferedStream.prototype.end = function () { this.readable = false; this.ended = true; this.emit('end'); }; BufferedStream.prototype.destroy = function () { this.readable = false; this.writable = false; delete this.chunks; }; BufferedStream.prototype.close = function () { this.readable = false; this.closed = true; }; if (!stream.Stream.prototype.pause) { BufferedStream.prototype.pause = function () { this.emit('pause'); }; } if (!stream.Stream.prototype.resume) { BufferedStream.prototype.resume = function () { this.emit('resume'); }; } flatiron-union-51f28e7/lib/core.js000066400000000000000000000054771455213176100170770ustar00rootroot00000000000000/* * core.js: Core functionality for the Flatiron HTTP (with SPDY support) plugin. * * (C) 2011, Charlie Robbins & the Contributors * MIT LICENSE * */ var http = require('http'), https = require('https'), fs = require('fs'), stream = require('stream'), HttpStream = require('./http-stream'), RoutingStream = require('./routing-stream'); var core = exports; core.createServer = function (options) { var isArray = Array.isArray(options.after), credentials; if (!options) { throw new Error('options is required to create a server'); } function requestHandler(req, res) { var routingStream = new RoutingStream({ before: options.before, buffer: options.buffer, // // Remark: without new after is a huge memory leak that // pipes to every single open connection // after: isArray && options.after.map(function (After) { return new After; }), request: req, response: res, limit: options.limit, headers: options.headers }); routingStream.on('error', function (err) { var fn = options.onError || core.errorHandler; fn(err, routingStream, routingStream.target, function () { routingStream.target.emit('next'); }); }); req.pipe(routingStream); } // // both https and spdy requires same params // if (options.https || options.spdy) { if (options.https && options.spdy) { throw new Error('You shouldn\'t be using https and spdy simultaneously.'); } var serverOptions, credentials, key = !options.spdy ? 'https' : 'spdy'; serverOptions = options[key]; if (!serverOptions.key || !serverOptions.cert) { throw new Error('Both options.' + key + '.`key` and options.' + key + '.`cert` are required.'); } credentials = { key: fs.readFileSync(serverOptions.key), cert: fs.readFileSync(serverOptions.cert) }; if (serverOptions.ca) { serverOptions.ca = !Array.isArray(serverOptions.ca) ? [serverOptions.ca] : serverOptions.ca credentials.ca = serverOptions.ca.map(function (ca) { return fs.readFileSync(ca); }); } if (options.spdy) { // spdy is optional so we require module here rather than on top var spdy = require('spdy'); return spdy.createServer(credentials, requestHandler); } return https.createServer(credentials, requestHandler); } return http.createServer(requestHandler); }; core.errorHandler = function error(err, req, res) { if (err) { (this.res || res).writeHead(err.status || 500, err.headers || { "Content-Type": "text/plain" }); (this.res || res).end(err.message + "\n"); return; } (this.res || res).writeHead(404, {"Content-Type": "text/plain"}); (this.res || res).end("Not Found\n"); }; flatiron-union-51f28e7/lib/http-stream.js000066400000000000000000000024251455213176100204050ustar00rootroot00000000000000/* * http-stream.js: Idomatic buffered stream which pipes additional HTTP information. * * (C) 2011, Charlie Robbins & the Contributors * MIT LICENSE * */ var url = require('url'), util = require('util'), qs = require('qs'), BufferedStream = require('./buffered-stream'); var HttpStream = module.exports = function (options) { options = options || {}; BufferedStream.call(this, options.limit); if (options.buffer === false) { this.buffer = false; } this.on('pipe', this.pipeState); }; util.inherits(HttpStream, BufferedStream); // // ### function pipeState (source) // #### @source {ServerRequest|HttpStream} Source stream piping to this instance // Pipes additional HTTP metadata from the `source` HTTP stream (either concrete or // abstract) to this instance. e.g. url, headers, query, etc. // // Remark: Is there anything else we wish to pipe? // HttpStream.prototype.pipeState = function (source) { this.headers = source.headers; this.trailers = source.trailers; this.method = source.method; if (source.url) { this.url = this.originalUrl = source.url; } if (source.query) { this.query = source.query; } else if (source.url) { this.query = ~source.url.indexOf('?') ? qs.parse(url.parse(source.url).query) : {}; } }; flatiron-union-51f28e7/lib/index.js000066400000000000000000000011421455213176100172370ustar00rootroot00000000000000/* * index.js: Top-level plugin exposing HTTP features in flatiron * * (C) 2011, Charlie Robbins & the Contributors * MIT LICENSE * */ var union = exports; // // Expose version information // exports.version = require('../package.json').version; // // Expose core union components // union.BufferedStream = require('./buffered-stream'); union.HttpStream = require('./http-stream'); union.ResponseStream = require('./response-stream'); union.RoutingStream = require('./routing-stream'); union.createServer = require('./core').createServer; union.errorHandler = require('./core').errorHandler; flatiron-union-51f28e7/lib/request-stream.js000066400000000000000000000031161455213176100211140ustar00rootroot00000000000000/* * http-stream.js: Idomatic buffered stream which pipes additional HTTP information. * * (C) 2011, Charlie Robbins & the Contributors * MIT LICENSE * */ var url = require('url'), util = require('util'), qs = require('qs'), HttpStream = require('./http-stream'); var RequestStream = module.exports = function (options) { options = options || {}; HttpStream.call(this, options); this.on('pipe', this.pipeRequest); this.request = options.request; }; util.inherits(RequestStream, HttpStream); // // ### function pipeRequest (source) // #### @source {ServerRequest|HttpStream} Source stream piping to this instance // Pipes additional HTTP request metadata from the `source` HTTP stream (either concrete or // abstract) to this instance. e.g. url, headers, query, etc. // // Remark: Is there anything else we wish to pipe? // RequestStream.prototype.pipeRequest = function (source) { this.url = this.originalUrl = source.url; this.method = source.method; this.httpVersion = source.httpVersion; this.httpVersionMajor = source.httpVersionMajor; this.httpVersionMinor = source.httpVersionMinor; this.setEncoding = source.setEncoding; this.connection = source.connection; this.socket = source.socket; if (source.query) { this.query = source.query; } else { this.query = ~source.url.indexOf('?') ? qs.parse(url.parse(source.url).query) : {}; } }; // http.serverRequest methods ['setEncoding'].forEach(function (method) { RequestStream.prototype[method] = function () { return this.request[method].apply(this.request, arguments); }; }); flatiron-union-51f28e7/lib/response-stream.js000066400000000000000000000112641455213176100212650ustar00rootroot00000000000000/* * response-stream.js: A Stream focused on writing any relevant information to * a raw http.ServerResponse object. * * (C) 2011, Charlie Robbins & the Contributors * MIT LICENSE * */ var util = require('util'), HttpStream = require('./http-stream'); var STATUS_CODES = require('http').STATUS_CODES; // // ### function ResponseStream (options) // // var ResponseStream = module.exports = function (options) { var self = this, key; options = options || {}; HttpStream.call(this, options); this.writeable = true; this.response = options.response; if (options.headers) { for (key in options.headers) { this.response.setHeader(key, options.headers[key]); } } // // Proxy `statusCode` changes to the actual `response.statusCode`. // Object.defineProperty(this, 'statusCode', { get: function () { return self.response.statusCode; }, set: function (value) { self.response.statusCode = value; }, enumerable: true, configurable: true }); if (this.response) { try { this._headers = this.response.getHeaders() || {}; } catch (err) { this._headers = this.response._headers = this.response._headers || {}; // Patch to node core this.response._headerNames = this.response._headerNames || {}; } // // Proxy to emit "header" event // this._renderHeaders = this.response._renderHeaders; this.response._renderHeaders = function () { if (!self._emittedHeader) { self._emittedHeader = true; self.headerSent = true; self._header = true; self.emit('header'); } return self._renderHeaders.call(self.response); }; } }; util.inherits(ResponseStream, HttpStream); ResponseStream.prototype.writeHead = function (statusCode, statusMessage, headers) { if (typeof statusMessage === 'string') { this.response.statusMessage = statusMessage; } else { this.response.statusMessage = this.response.statusMessage || STATUS_CODES[statusCode] || 'unknown'; headers = statusMessage; } this.response.statusCode = statusCode; if (headers) { var keys = Object.keys(headers); for (var i = 0; i < keys.length; i++) { var k = keys[i]; if (k) this.response.setHeader(k, headers[k]); } } }; // // Create pass-thru for the necessary // `http.ServerResponse` methods. // ['setHeader', 'getHeader', 'removeHeader', '_implicitHeader', 'addTrailers'].forEach(function (method) { ResponseStream.prototype[method] = function () { return this.response[method].apply(this.response, arguments); }; }); ResponseStream.prototype.json = function (obj) { if (!this.response.writable) { return; } if (typeof obj === 'number') { this.response.statusCode = obj; obj = arguments[1]; } this.modified = true; if (!this.response._header && this.response.getHeader('content-type') !== 'application/json') { this.response.setHeader('content-type', 'application/json'); } this.end(obj ? JSON.stringify(obj) : ''); }; ResponseStream.prototype.html = function (str) { if (!this.response.writable) { return; } if (typeof str === 'number') { this.response.statusCode = str; str = arguments[1]; } this.modified = true; if (!this.response._header && this.response.getHeader('content-type') !== 'text/html') { this.response.setHeader('content-type', 'text/html'); } this.end(str ? str: ''); }; ResponseStream.prototype.text = function (str) { if (!this.response.writable) { return; } if (typeof str === 'number') { this.response.statusCode = str; str = arguments[1]; } this.modified = true; if (!this.response._header && this.response.getHeader('content-type') !== 'text/plain') { this.response.setHeader('content-type', 'text/plain'); } this.end(str ? str: ''); }; ResponseStream.prototype.end = function (data) { if (data && this.writable) { this.emit('data', data); } this.modified = true; this.emit('end'); }; ResponseStream.prototype.pipe = function () { var self = this, dest; self.dest = dest = HttpStream.prototype.pipe.apply(self, arguments); dest.on('drain', function() { self.emit('drain') }) return dest; }; ResponseStream.prototype.write = function (data) { this.modified = true; if (this.writable) { return this.dest.write(data); } }; ResponseStream.prototype.redirect = function (path, status) { var url = ''; if (~path.indexOf('://')) { url = path; } else { url += this.req.connection.encrypted ? 'https://' : 'http://'; url += this.req.headers.host; url += (path[0] === '/') ? path : '/' + path; } this.res.writeHead(status || 302, { 'Location': url }); this.end(); }; flatiron-union-51f28e7/lib/routing-stream.js000066400000000000000000000061131455213176100211130ustar00rootroot00000000000000/* * routing-stream.js: A Stream focused on connecting an arbitrary RequestStream and * ResponseStream through a given Router. * * (C) 2011, Charlie Robbins & the Contributors * MIT LICENSE * */ var util = require('util'), union = require('./index'), RequestStream = require('./request-stream'), ResponseStream = require('./response-stream'); // // ### function RoutingStream (options) // // var RoutingStream = module.exports = function (options) { options = options || {}; RequestStream.call(this, options); this.before = options.before || []; this.after = options.after || []; this.response = options.response || options.res; this.headers = options.headers || { 'x-powered-by': 'union ' + union.version }; this.target = new ResponseStream({ response: this.response, headers: this.headers }); this.once('pipe', this.route); }; util.inherits(RoutingStream, RequestStream); // // Called when this instance is piped to **by another stream** // RoutingStream.prototype.route = function (req) { // // When a `RoutingStream` is piped to: // // 1. Setup the pipe-chain between the `after` middleware, the abstract response // and the concrete response. // 2. Attempt to dispatch to the `before` middleware, which represent things such as // favicon, static files, application routing. // 3. If no match is found then pipe to the 404Stream // var self = this, after, error, i; // // Don't allow `this.target` to be writable on HEAD requests // this.target.writable = req.method !== 'HEAD'; // // 1. Setup the pipe-chain between the `after` middleware, the abstract response // and the concrete response. // after = [this.target].concat(this.after, this.response); for (i = 0; i < after.length - 1; i++) { // // attach req and res to all streams // after[i].req = req; after[i + 1].req = req; after[i].res = this.response; after[i + 1].res = this.response; after[i].pipe(after[i + 1]); // // prevent multiple responses and memory leaks // after[i].on('error', this.onError); } // // Helper function for dispatching to the 404 stream. // function notFound() { error = new Error('Not found'); error.status = 404; self.onError(error); } // // 2. Attempt to dispatch to the `before` middleware, which represent things such as // favicon, static files, application routing. // (function dispatch(i) { if (self.target.modified) { return; } else if (++i === self.before.length) { // // 3. If no match is found then pipe to the 404Stream // return notFound(); } self.target.once('next', dispatch.bind(null, i)); if (self.before[i].length === 3) { self.before[i](self, self.target, function (err) { if (err) { self.onError(err); } else { self.target.emit('next'); } }); } else { self.before[i](self, self.target); } })(-1); }; RoutingStream.prototype.onError = function (err) { this.emit('error', err); }; flatiron-union-51f28e7/package-lock.json000066400000000000000000001042161455213176100202460ustar00rootroot00000000000000{ "name": "union", "version": "0.5.0", "lockfileVersion": 1, "requires": true, "dependencies": { "accepts": { "version": "1.0.7", "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.0.7.tgz", "integrity": "sha512-iq8ew2zitUlNcUca0wye3fYwQ6sSPItDo38oC0R+XA5KTzeXRN+GF7NjOXs3dVItj4J+gQVdpq4/qbnMb1hMHw==", "dev": true, "requires": { "mime-types": "~1.0.0", "negotiator": "0.4.7" } }, "any-promise": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/any-promise/-/any-promise-1.3.0.tgz", "integrity": "sha512-7UvmKalWRt1wgjL1RrGxoSJW/0QZFIegpeGvZG9kjp8vrRu55XTHbwnqq2GpXm9uLbcuhxm3IqX9OB4MZR1b2A==", "dev": true }, "asn1": { "version": "0.1.11", "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.1.11.tgz", "integrity": "sha512-Fh9zh3G2mZ8qM/kwsiKwL2U2FmXxVsboP4x1mXjnhKHv3SmzaBZoYvxEQJz/YS2gnCgd8xlAVWcZnQyC9qZBsA==", "dev": true, "optional": true }, "assert-plus": { "version": "0.1.5", "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-0.1.5.tgz", "integrity": "sha512-brU24g7ryhRwGCI2y+1dGQmQXiZF7TtIj583S96y0jjdajIe6wn8BuXyELYhvD22dtIxDQVFk04YTJwwdwOYJw==", "dev": true, "optional": true }, "async": { "version": "0.9.2", "resolved": "http://registry.npmjs.org/async/-/async-0.9.2.tgz", "integrity": "sha1-rqdNXmHB+JlhO/ZL2mbUx48v0X0=", "dev": true, "optional": true }, "aws-sign2": { "version": "0.5.0", "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.5.0.tgz", "integrity": "sha512-oqUX0DM5j7aPWPCnpWebiyNIj2wiNI87ZxnOMoGv0aE4TGlBy2N+5iWc6dQ/NOKZaBD2W6PVz8jtOGkWzSC5EA==", "dev": true, "optional": true }, "base64-url": { "version": "1.3.3", "resolved": "https://registry.npmjs.org/base64-url/-/base64-url-1.3.3.tgz", "integrity": "sha512-UiVPRwO/m133KIQrOEIqO07D8jaYjFIx7/lYRWTRVR23tDSn00Ves6A+Bk0eLmhyz6IJGSFlNCKUuUBO2ssytA==", "dev": true }, "basic-auth-connect": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/basic-auth-connect/-/basic-auth-connect-1.0.0.tgz", "integrity": "sha512-kiV+/DTgVro4aZifY/hwRwALBISViL5NP4aReaR2EVJEObpbUBHIkdJh/YpcoEiYt7nBodZ6U2ajZeZvSxUCCg==", "dev": true }, "batch": { "version": "0.5.1", "resolved": "https://registry.npmjs.org/batch/-/batch-0.5.1.tgz", "integrity": "sha512-OXRjc65VJvFtb7JD5HszSI1WWwsI6YnJS7Qmlx1CaDQrZ5urNIeRjtTyBe1YapNXyoWzrcc4yqg4rNe8YMyong==", "dev": true }, "body-parser": { "version": "1.4.3", "resolved": "http://registry.npmjs.org/body-parser/-/body-parser-1.4.3.tgz", "integrity": "sha1-RyeVLP9K8Hc+76SyJsL0Ei9eI00=", "dev": true, "requires": { "bytes": "1.0.0", "depd": "0.3.0", "iconv-lite": "0.4.3", "media-typer": "0.2.0", "qs": "0.6.6", "raw-body": "1.2.2", "type-is": "1.3.1" }, "dependencies": { "qs": { "version": "0.6.6", "resolved": "http://registry.npmjs.org/qs/-/qs-0.6.6.tgz", "integrity": "sha1-bgFQmP9RlouKPIGQAdXyyJvEsQc=", "dev": true }, "type-is": { "version": "1.3.1", "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.3.1.tgz", "integrity": "sha1-pnibWlITgomt4e+PbZ8odP/XC2s=", "dev": true, "requires": { "media-typer": "0.2.0", "mime-types": "1.0.0" } } } }, "boom": { "version": "0.4.2", "resolved": "http://registry.npmjs.org/boom/-/boom-0.4.2.tgz", "integrity": "sha1-emNune1O/O+xnO9JR6PGffrukRs=", "dev": true, "optional": true, "requires": { "hoek": "0.9.x" } }, "buffer-crc32": { "version": "0.2.3", "resolved": "https://registry.npmjs.org/buffer-crc32/-/buffer-crc32-0.2.3.tgz", "integrity": "sha512-HLvoSqq1z8fJEcT1lUlJZ4OJaXJZ1wsWm0+fBxkz9Bdf/WphA4Da7FtGUguNNyEXL4WB0hNMTaWmdFRFPy8YOQ==", "dev": true }, "bytes": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/bytes/-/bytes-1.0.0.tgz", "integrity": "sha512-/x68VkHLeTl3/Ll8IvxdwzhrT+IyKc52e/oyHhA2RwqPqswSnjVbSddfPRwAsJtbilMAPSRWwAlpxdYsSWOTKQ==", "dev": true }, "combined-stream": { "version": "0.0.7", "resolved": "http://registry.npmjs.org/combined-stream/-/combined-stream-0.0.7.tgz", "integrity": "sha1-ATfmV7qlp1QcV6w3rF/AfXO03B8=", "dev": true, "optional": true, "requires": { "delayed-stream": "0.0.5" } }, "compressible": { "version": "1.1.1", "resolved": "http://registry.npmjs.org/compressible/-/compressible-1.1.1.tgz", "integrity": "sha1-I7ceqQ6mxqZiiXAakYGCwk0HKe8=", "dev": true }, "compression": { "version": "1.0.11", "resolved": "https://registry.npmjs.org/compression/-/compression-1.0.11.tgz", "integrity": "sha512-Xf+wCNAQYsPrvIkWRwGLkkrA2/Kd1TU8VotZZpvkz0+7+5bmxAsYdUahJI3oisroNydtb8NnGy4RMiaeq/GlSg==", "dev": true, "requires": { "accepts": "~1.0.7", "bytes": "1.0.0", "compressible": "~1.1.1", "debug": "1.0.4", "on-headers": "~1.0.0", "vary": "~1.0.0" }, "dependencies": { "debug": { "version": "1.0.4", "resolved": "http://registry.npmjs.org/debug/-/debug-1.0.4.tgz", "integrity": "sha1-W5wla9VLbsAigxdvqKDt5tFUy/g=", "dev": true, "requires": { "ms": "0.6.2" } }, "on-headers": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/on-headers/-/on-headers-1.0.1.tgz", "integrity": "sha1-ko9dD0cNSTQmUepnlLCFfBAGk/c=", "dev": true } } }, "connect": { "version": "2.22.0", "resolved": "https://registry.npmjs.org/connect/-/connect-2.22.0.tgz", "integrity": "sha512-6+pTp+bP+zy0XDR7uToY6xJoJNc3Tr7AUgFLWOFPY3IIrWQYQbNe5+mHmvdpaQ3A/JOJR9JXBzV+Nqtg1fVs2w==", "dev": true, "requires": { "basic-auth-connect": "1.0.0", "body-parser": "1.4.3", "bytes": "1.0.0", "compression": "~1.0.8", "connect-timeout": "1.1.1", "cookie": "0.1.2", "cookie-parser": "1.3.2", "cookie-signature": "1.0.4", "csurf": "~1.3.0", "debug": "1.0.2", "depd": "0.3.0", "errorhandler": "1.1.1", "express-session": "~1.6.1", "finalhandler": "0.0.2", "fresh": "0.2.2", "media-typer": "0.2.0", "method-override": "2.0.2", "morgan": "1.1.1", "multiparty": "3.3.0", "on-headers": "0.0.0", "parseurl": "1.0.1", "pause": "0.0.1", "qs": "0.6.6", "response-time": "2.0.0", "serve-favicon": "2.0.1", "serve-index": "~1.1.3", "serve-static": "~1.3.0", "type-is": "~1.3.2", "vhost": "2.0.0" }, "dependencies": { "qs": { "version": "0.6.6", "resolved": "http://registry.npmjs.org/qs/-/qs-0.6.6.tgz", "integrity": "sha1-bgFQmP9RlouKPIGQAdXyyJvEsQc=", "dev": true } } }, "connect-timeout": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/connect-timeout/-/connect-timeout-1.1.1.tgz", "integrity": "sha512-HS5OPZHc0cAJkzE1jgGjwL95rzF+Znk10Pq0vpUEm4ieDV+4HiAu4U/I71G5Epqs3b3YDeHkxBwE7lZtDRpNPQ==", "dev": true, "requires": { "debug": "1.0.2", "on-headers": "0.0.0" } }, "cookie": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.1.2.tgz", "integrity": "sha512-+mHmWbhevLwkiBf7QcbZXHr0v4ZQQ/OgHk3fsQHrsMMiGzuvAmU/YMUR+ZfrO/BLAGIWFfx2Z7Oyso0tZR/wiA==", "dev": true }, "cookie-parser": { "version": "1.3.2", "resolved": "https://registry.npmjs.org/cookie-parser/-/cookie-parser-1.3.2.tgz", "integrity": "sha512-tz5e2EKahF0l7kgKrFkJkphtY374VIG9qCaPWEJX1dzg6f3O/OFUkgpMoy4Tw/kBK0Fb9WUQpvXBe2RbV+aqXw==", "dev": true, "requires": { "cookie": "0.1.2", "cookie-signature": "1.0.4" } }, "cookie-signature": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.4.tgz", "integrity": "sha512-k+lrG38ZC/S7zN6l1/HcF6xF4jMwkIUjnr5afDU7tzFxIfDmKzdqJdXo8HNYaXOuBJ3tPKxSiwCOTA0b3qQfaA==", "dev": true }, "core-util-is": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=", "dev": true }, "cryptiles": { "version": "0.2.2", "resolved": "http://registry.npmjs.org/cryptiles/-/cryptiles-0.2.2.tgz", "integrity": "sha1-7ZH/HxetE9N0gohZT4pIoNJvMlw=", "dev": true, "optional": true, "requires": { "boom": "0.4.x" } }, "csrf-tokens": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/csrf-tokens/-/csrf-tokens-2.0.0.tgz", "integrity": "sha512-IzcrVVxQJvHoeNSSA9zc9LqIBUPM3OdRUzJ/4ooSbROhvJOSAi6qve2J6XEhmltcECmf/UiR/pgzkHXY5x1mGA==", "dev": true, "requires": { "base64-url": "1", "rndm": "1", "scmp": "~0.0.3", "uid-safe": "1" } }, "csurf": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/csurf/-/csurf-1.3.0.tgz", "integrity": "sha512-zpQRae9zzSLm5BySqRbZjA+PcfQsLB1OedTrsJPp7lZil0SEOfiBlmjRQ0JsqiKUmryat95EO3w5SBQNXSua7Q==", "dev": true, "requires": { "cookie": "0.1.2", "cookie-signature": "1.0.4", "csrf-tokens": "~2.0.0" } }, "ctype": { "version": "0.5.3", "resolved": "http://registry.npmjs.org/ctype/-/ctype-0.5.3.tgz", "integrity": "sha1-gsGMJGH3QRTvFsE1IkrQuRRMoS8=", "dev": true, "optional": true }, "debug": { "version": "1.0.2", "resolved": "http://registry.npmjs.org/debug/-/debug-1.0.2.tgz", "integrity": "sha1-OElZHBDM5khHbDx8Li40FttZY8Q=", "dev": true, "requires": { "ms": "0.6.2" } }, "delayed-stream": { "version": "0.0.5", "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-0.0.5.tgz", "integrity": "sha512-v+7uBd1pqe5YtgPacIIbZ8HuHeLFVNe4mUEyFDXL6KiqzEykjbw+5mXZXpGFgNVasdL4jWKgaKIXrEHiynN1LA==", "dev": true, "optional": true }, "depd": { "version": "0.3.0", "resolved": "http://registry.npmjs.org/depd/-/depd-0.3.0.tgz", "integrity": "sha1-Ecm8KOQlMl+9iziUC+/2n6UyaIM=", "dev": true }, "diff": { "version": "1.0.8", "resolved": "https://registry.npmjs.org/diff/-/diff-1.0.8.tgz", "integrity": "sha512-1zEb73vemXFpUmfh3fsta4YHz3lwebxXvaWmPbFv9apujQBWDnkrPDLXLQs1gZo4RCWMDsT89r0Pf/z8/02TGA==", "dev": true }, "director": { "version": "1.2.8", "resolved": "https://registry.npmjs.org/director/-/director-1.2.8.tgz", "integrity": "sha512-7v1NS2Fsv0kv+FbI2xqDHvm2UWSL7J4glCGk29m7/+pPi9r/Vq6o9OXQc3JprWMdZMYnBvohRBzxJGRIXjsQDg==", "dev": true }, "ecstatic": { "version": "0.5.8", "resolved": "http://registry.npmjs.org/ecstatic/-/ecstatic-0.5.8.tgz", "integrity": "sha1-gZFjw9Hoxz1ONuJoYm/qaN18OY0=", "dev": true, "requires": { "he": "^0.5.0", "mime": "^1.2.11", "minimist": "^1.1.0" } }, "ee-first": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.0.3.tgz", "integrity": "sha512-1q/3kz+ZwmrrWpJcCCrBZ3JnBzB1BMA5EVW9nxnIP1LxDZ16Cqs9VdolqLWlExet1vU+bar3WSkAa4/YrA9bIw==", "dev": true }, "errorhandler": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/errorhandler/-/errorhandler-1.1.1.tgz", "integrity": "sha512-nqVAii3wDkiowAVKDmcuwKOQ/5vsg9GfCcJxSMHgy8yiZUA3mMDpBcHnCVolDYgQ7wsC2yZQVOavR5fGHhFMkg==", "dev": true, "requires": { "accepts": "~1.0.4", "escape-html": "1.0.1" } }, "escape-html": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.1.tgz", "integrity": "sha512-z6kAnok8fqVTra7Yu77dZF2Y6ETJlxH58wN38wNyuNQLm8xXdKnfNrlSmfXsTePWP03rRVUKHubtUwanwUi7+g==", "dev": true }, "express-session": { "version": "1.6.5", "resolved": "http://registry.npmjs.org/express-session/-/express-session-1.6.5.tgz", "integrity": "sha1-xMp3QAJf5FYfiAQRV5MQcfkelXs=", "dev": true, "requires": { "buffer-crc32": "0.2.3", "cookie": "0.1.2", "cookie-signature": "1.0.4", "debug": "1.0.3", "depd": "0.3.0", "on-headers": "0.0.0", "uid-safe": "1.0.1", "utils-merge": "1.0.0" }, "dependencies": { "debug": { "version": "1.0.3", "resolved": "http://registry.npmjs.org/debug/-/debug-1.0.3.tgz", "integrity": "sha1-/IxrLWACgEtAgcAgjg9kYLofo+Q=", "dev": true, "requires": { "ms": "0.6.2" } }, "uid-safe": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/uid-safe/-/uid-safe-1.0.1.tgz", "integrity": "sha1-W9FIRgouhPVPGT/SA1LIw9feasg=", "dev": true, "requires": { "base64-url": "1", "mz": "1" } } } }, "eyes": { "version": "0.1.8", "resolved": "https://registry.npmjs.org/eyes/-/eyes-0.1.8.tgz", "integrity": "sha512-GipyPsXO1anza0AOZdy69Im7hGFCNB7Y/NGjDlZGJ3GJJLtwNSb2vrzYrTYJRrRloVx7pl+bhUaTB8yiccPvFQ==", "dev": true }, "finalhandler": { "version": "0.0.2", "resolved": "http://registry.npmjs.org/finalhandler/-/finalhandler-0.0.2.tgz", "integrity": "sha1-BgPYde6H1WeiZmkoFcyK1E/M7to=", "dev": true, "requires": { "debug": "1.0.2", "escape-html": "1.0.1" } }, "finished": { "version": "1.2.2", "resolved": "https://registry.npmjs.org/finished/-/finished-1.2.2.tgz", "integrity": "sha512-HPJ8x7Gn1pmTS1zWyMoXmQ1yxHkYHRoFsBI66ONq4PS9iWBJy1iHYXOSqMWNp3ksMXfrBpenkSwBhl9WG4zr4Q==", "dev": true, "requires": { "ee-first": "1.0.3" } }, "forever-agent": { "version": "0.5.2", "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.5.2.tgz", "integrity": "sha512-PDG5Ef0Dob/JsZUxUltJOhm/Y9mlteAE+46y3M9RBz/Rd3QVENJ75aGRhN56yekTUboaBIkd8KVWX2NjF6+91A==", "dev": true }, "form-data": { "version": "0.1.4", "resolved": "http://registry.npmjs.org/form-data/-/form-data-0.1.4.tgz", "integrity": "sha1-kavXiKupcCsaq/qLwBAxoqyeOxI=", "dev": true, "optional": true, "requires": { "async": "~0.9.0", "combined-stream": "~0.0.4", "mime": "~1.2.11" } }, "fresh": { "version": "0.2.2", "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.2.2.tgz", "integrity": "sha512-ZGGi8GROK//ijm2gB33sUuN9TjN1tC/dvG4Bt4j6IWrVGpMmudUBCxx+Ir7qePsdREfkpQC4FL8W0jeSOsgv1w==", "dev": true }, "glob": { "version": "4.0.6", "resolved": "https://registry.npmjs.org/glob/-/glob-4.0.6.tgz", "integrity": "sha512-D0H1thJnOVgI0zRV3H/Vmb9HWmDgGTTR7PeT8Lk0ri2kMmfK3oKQBolfqJuRpBVpTx5Q5PKGl9hdQEQNTXJI7Q==", "dev": true, "requires": { "graceful-fs": "^3.0.2", "inherits": "2", "minimatch": "^1.0.0", "once": "^1.3.0" }, "dependencies": { "graceful-fs": { "version": "4.2.11", "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", "dev": true } } }, "hawk": { "version": "1.0.0", "resolved": "http://registry.npmjs.org/hawk/-/hawk-1.0.0.tgz", "integrity": "sha1-uQuxaYByhUEdp//LjdJZhQLTtS0=", "dev": true, "optional": true, "requires": { "boom": "0.4.x", "cryptiles": "0.2.x", "hoek": "0.9.x", "sntp": "0.2.x" } }, "he": { "version": "0.5.0", "resolved": "http://registry.npmjs.org/he/-/he-0.5.0.tgz", "integrity": "sha1-LAX/rvkLaOhg8/0rVO9YCYknfuI=", "dev": true }, "hoek": { "version": "0.9.1", "resolved": "http://registry.npmjs.org/hoek/-/hoek-0.9.1.tgz", "integrity": "sha1-PTIkYrrfB3Fup+uFuviAec3c5QU=", "dev": true, "optional": true }, "http-signature": { "version": "0.10.1", "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-0.10.1.tgz", "integrity": "sha512-coK8uR5rq2IMj+Hen+sKPA5ldgbCc1/spPdKCL1Fw6h+D0s/2LzMcRK0Cqufs1h0ryx/niwBHGFu8HC3hwU+lA==", "dev": true, "optional": true, "requires": { "asn1": "0.1.11", "assert-plus": "^0.1.5", "ctype": "0.5.3" } }, "iconv-lite": { "version": "0.4.3", "resolved": "http://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.3.tgz", "integrity": "sha1-nniHeTt2nMaV6yLSVGpP0tebeh4=", "dev": true }, "inherits": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", "integrity": "sha512-x00IRNXNy63jwGkJmzPigoySHbaqpNuzKbBOmzK+g2OdZpQ9w+sxCN+VSB3ja7IAge2OP2qpfxTjeNcyjmW1uw==", "dev": true }, "isarray": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", "integrity": "sha512-D2S+3GLxWH+uhrNEcoh/fnmYeP8E8/zHl644d/jdA0g2uyXvy3sb0qxotE+ne0LtccHknQzWwZEzhak7oJ0COQ==", "dev": true }, "json-stringify-safe": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", "integrity": "sha512-ZClg6AaYvamvYEE82d3Iyd3vSSIjQ+odgjaTzRuO3s7toCdFKczob2i0zCh7JE8kWn17yvAWhUVxvqGwUalsRA==", "dev": true }, "lru-cache": { "version": "2.7.3", "resolved": "http://registry.npmjs.org/lru-cache/-/lru-cache-2.7.3.tgz", "integrity": "sha1-bUUk6LlV+V1PW1iFHOId1y+06VI=", "dev": true }, "media-typer": { "version": "0.2.0", "resolved": "http://registry.npmjs.org/media-typer/-/media-typer-0.2.0.tgz", "integrity": "sha1-2KBlITrf6qLnYyGitt2jb/YzWYQ=", "dev": true }, "method-override": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/method-override/-/method-override-2.0.2.tgz", "integrity": "sha512-VdXhehVbkQcJD4MJisBqFjCGLlCQ5bhVkJqT9VpSgXyCccskmEYn/MA52pnDlqqffmkFazjGbFEwZFKwOIAKXg==", "dev": true, "requires": { "methods": "1.0.1", "parseurl": "1.0.1", "vary": "0.1.0" }, "dependencies": { "vary": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/vary/-/vary-0.1.0.tgz", "integrity": "sha512-tyyeG46NQdwyVP/RsWLSrT78ouwEuvwk9gK8vQK4jdXmqoXtTXW+vsCfNcnqRhigF8olV34QVZarmAi6wBV2Mw==", "dev": true } } }, "methods": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/methods/-/methods-1.0.1.tgz", "integrity": "sha512-2403MfnVypWSNIEpmQ26/ObZ5kSUx37E8NHRvriw0+I8Sne7k0HGuLGCk0OrCqURh4UIygD0cSsYq+Ll+kzNqA==", "dev": true }, "mime": { "version": "1.2.11", "resolved": "http://registry.npmjs.org/mime/-/mime-1.2.11.tgz", "integrity": "sha1-WCA+7Ybjpe8XrtK32evUfwpg3RA=", "dev": true }, "mime-types": { "version": "1.0.0", "resolved": "http://registry.npmjs.org/mime-types/-/mime-types-1.0.0.tgz", "integrity": "sha1-antKavLn2S+Xr+A/BHx4AejwAdI=", "dev": true }, "minimatch": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-1.0.0.tgz", "integrity": "sha512-Ejh5Odk/uFXAj5nf/NSXk0UamqcGAfOdHI7nY0zvCHyn4f3nKLFoUTp+lYxDxSih/40uW8lpwDplOWHdWkQXWA==", "dev": true, "requires": { "lru-cache": "2", "sigmund": "~1.0.0" } }, "minimist": { "version": "1.2.0", "resolved": "http://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", "dev": true }, "morgan": { "version": "1.1.1", "resolved": "http://registry.npmjs.org/morgan/-/morgan-1.1.1.tgz", "integrity": "sha1-zeRdLoB+vMQ5dFhG6oA5LmkJgUY=", "dev": true, "requires": { "bytes": "1.0.0" } }, "ms": { "version": "0.6.2", "resolved": "http://registry.npmjs.org/ms/-/ms-0.6.2.tgz", "integrity": "sha1-2JwhJMb9wTU9Zai3e/GqxLGTcIw=", "dev": true }, "multiparty": { "version": "3.3.0", "resolved": "https://registry.npmjs.org/multiparty/-/multiparty-3.3.0.tgz", "integrity": "sha512-ekz7rAuNYDcYPC9QaqOgdnLvELbreIEHwwSjPzsrntUmXJi+dqsk9fvai266/PZ9/xb2zteoSJZe7rESg7VhyA==", "dev": true, "requires": { "readable-stream": "~1.1.9", "stream-counter": "~0.2.0" } }, "mz": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/mz/-/mz-1.3.0.tgz", "integrity": "sha512-x+R7YSsEySSpV5uEB+C47JTmxv+YKKNsW3W+hjvq8NbLn8ntLgYXGrR5RjQ3Fs0e7Chw8Rp/1e5eo0n5LP76cw==", "dev": true, "requires": { "native-or-bluebird": "1", "thenify": "3", "thenify-all": "1" } }, "native-or-bluebird": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/native-or-bluebird/-/native-or-bluebird-1.1.2.tgz", "integrity": "sha512-Bgn5FHNkd+lPTjIzq1NVU/VZTvPKFvhdIDEyYjxrKNrScSXbVvNVzOKwoleysun0/HoN7R+TXmK9mCtEs84osA==", "dev": true }, "negotiator": { "version": "0.4.7", "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.4.7.tgz", "integrity": "sha512-ujxWwyRfZ6udAgHGECQC3JDO9e6UAsuItfUMcqA0Xf2OLNQTveFVFx+fHGIJ5p0MJaJrZyGQqPwzuN0NxJzEKA==", "dev": true }, "node-uuid": { "version": "1.4.8", "resolved": "https://registry.npmjs.org/node-uuid/-/node-uuid-1.4.8.tgz", "integrity": "sha512-TkCET/3rr9mUuRp+CpO7qfgT++aAxfDRaalQhwPFzI9BY/2rCDn6OfpZOVggi1AXfTPpfkTrg5f5WQx5G1uLxA==", "dev": true }, "oauth-sign": { "version": "0.3.0", "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.3.0.tgz", "integrity": "sha512-Tr31Sh5FnK9YKm7xTUPyDMsNOvMqkVDND0zvK/Wgj7/H9q8mpye0qG2nVzrnsvLhcsX5DtqXD0la0ks6rkPCGQ==", "dev": true, "optional": true }, "on-headers": { "version": "0.0.0", "resolved": "https://registry.npmjs.org/on-headers/-/on-headers-0.0.0.tgz", "integrity": "sha512-sd6W+EIQTNDbMndkGZqf1q6x3PlMxAIoufoNhcfpvzrXhtN+IWVyM2sjdsZ3p+TVddtTG5u0lujTglZ+R1VGvQ==", "dev": true }, "once": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", "dev": true, "requires": { "wrappy": "1" } }, "parseurl": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.0.1.tgz", "integrity": "sha512-6W9+0+9Ihayqwjgp4OaLLqZ3KDtqPY2PtUPz8YNiy4PamjJv+7x6J9GO93O9rUZOLgaanTPxsKTasxqKkO1iSw==", "dev": true }, "pause": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/pause/-/pause-0.0.1.tgz", "integrity": "sha512-KG8UEiEVkR3wGEb4m5yZkVCzigAD+cVEJck2CzYZO37ZGJfctvVptVO192MwrtPhzONn6go8ylnOdMhKqi4nfg==", "dev": true }, "punycode": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", "dev": true, "optional": true }, "qs": { "version": "6.6.0", "resolved": "https://registry.npmjs.org/qs/-/qs-6.6.0.tgz", "integrity": "sha512-KIJqT9jQJDQx5h5uAVPimw6yVg2SekOKu959OCtktD3FjzbpvaPr8i4zzg07DOMz+igA4W/aNM7OV8H37pFYfA==" }, "range-parser": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.0.3.tgz", "integrity": "sha512-nDsRrtIxVUO5opg/A8T2S3ebULVIfuh8ECbh4w3N4mWxIiT3QILDJDUQayPqm2e8Q8NUa0RSUkGCfe33AfjR3Q==", "dev": true }, "raw-body": { "version": "1.2.2", "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-1.2.2.tgz", "integrity": "sha512-52kUCLQKKfbzsJtWdlQmrWwhR8WPc8zsCmIDMEygfiEgT3E/AApymJo8eza+zgaLnDxbNRq+U/UXR79s4uX1qw==", "dev": true, "requires": { "bytes": "1", "iconv-lite": "0.4.3" } }, "readable-stream": { "version": "1.1.14", "resolved": "http://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz", "integrity": "sha1-fPTFTvZI44EwhMY23SB54WbAgdk=", "dev": true, "requires": { "core-util-is": "~1.0.0", "inherits": "~2.0.1", "isarray": "0.0.1", "string_decoder": "~0.10.x" } }, "request": { "version": "2.29.0", "resolved": "http://registry.npmjs.org/request/-/request-2.29.0.tgz", "integrity": "sha1-DUuN5w0mqZEag0Svmg6O2rgf8cM=", "dev": true, "requires": { "aws-sign2": "~0.5.0", "forever-agent": "~0.5.0", "form-data": "~0.1.0", "hawk": "~1.0.0", "http-signature": "~0.10.0", "json-stringify-safe": "~5.0.0", "mime": "~1.2.9", "node-uuid": "~1.4.0", "oauth-sign": "~0.3.0", "qs": "~0.6.0", "tough-cookie": "~0.9.15", "tunnel-agent": "~0.3.0" }, "dependencies": { "qs": { "version": "0.6.6", "resolved": "http://registry.npmjs.org/qs/-/qs-0.6.6.tgz", "integrity": "sha1-bgFQmP9RlouKPIGQAdXyyJvEsQc=", "dev": true } } }, "response-time": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/response-time/-/response-time-2.0.0.tgz", "integrity": "sha512-1PeD/WjcPWgv4c1Lpfh+whxgOxauMckWZMWBJNVBXg4Sz/MR1bvtA2V0KOr4gYObkp1GW2NyyiNsJkNMtTOt3w==", "dev": true, "requires": { "on-headers": "0.0.0" } }, "rndm": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/rndm/-/rndm-1.2.0.tgz", "integrity": "sha512-fJhQQI5tLrQvYIYFpOnFinzv9dwmR7hRnUz1XqP3OJ1jIweTNOd6aTO4jwQSgcBSFUB+/KHJxuGneime+FdzOw==", "dev": true }, "scmp": { "version": "0.0.3", "resolved": "https://registry.npmjs.org/scmp/-/scmp-0.0.3.tgz", "integrity": "sha512-ya4sPuUOfcrJnfC+OUqTFgFVBEMOXMS1Xopn0wwIhxKwD4eveTwJoIUN9u1QHJ47nL29/m545dV8KqI92MlHPw==", "dev": true }, "send": { "version": "0.6.0", "resolved": "https://registry.npmjs.org/send/-/send-0.6.0.tgz", "integrity": "sha512-A3EwHmDwcPcmLxIRNjr2YbXiYWq6M9JyUq4303pLKVFs4m5oeME0a9Cpcu9N22fED5XVepldjPYGo9eJifb7Yg==", "dev": true, "requires": { "debug": "1.0.3", "depd": "0.3.0", "escape-html": "1.0.1", "finished": "1.2.2", "fresh": "0.2.2", "mime": "1.2.11", "ms": "0.6.2", "range-parser": "~1.0.0" }, "dependencies": { "debug": { "version": "1.0.3", "resolved": "http://registry.npmjs.org/debug/-/debug-1.0.3.tgz", "integrity": "sha1-/IxrLWACgEtAgcAgjg9kYLofo+Q=", "dev": true, "requires": { "ms": "0.6.2" } } } }, "serve-favicon": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/serve-favicon/-/serve-favicon-2.0.1.tgz", "integrity": "sha512-ER7Nk+que+Og6kDJpADjLMkTkllBKWz9FPef5A+uELiYAODTjaMJMszKhzUzsNcvqXM5+mzAdpv/6FaxRlJUng==", "dev": true, "requires": { "fresh": "0.2.2" } }, "serve-index": { "version": "1.1.6", "resolved": "https://registry.npmjs.org/serve-index/-/serve-index-1.1.6.tgz", "integrity": "sha512-uWGuAekfhMHBaKk2ZoGZn9b5GLpdUH5lHMo2Dkkiakg6eHNQBH8CR/x2RVVwh7FPPzA7L8ppz8WyjXNYurVMsQ==", "dev": true, "requires": { "accepts": "~1.0.7", "batch": "0.5.1", "parseurl": "~1.3.0" }, "dependencies": { "parseurl": { "version": "1.3.2", "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.2.tgz", "integrity": "sha1-/CidTtiZMRlGDBViUyYs3I3mW/M=", "dev": true } } }, "serve-static": { "version": "1.3.2", "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.3.2.tgz", "integrity": "sha512-KwjCeYUx7IM1neg8/P0+O1DZsl76XcOSuV0ZxrI0r60vwGlcjMjKOYCK/OFLJy/a2CFuIyAa/x0PuQ0yuG+IgQ==", "dev": true, "requires": { "escape-html": "1.0.1", "parseurl": "~1.1.3", "send": "0.6.0" }, "dependencies": { "parseurl": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.1.3.tgz", "integrity": "sha512-7y9IL/9x2suvr1uIvoAc3yv3f28hZ55g2OM+ybEtnZqV6Ykeg36sy1PCsTN9rQUZYzb9lTKLzzmJM11jaXSloA==", "dev": true } } }, "sigmund": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/sigmund/-/sigmund-1.0.1.tgz", "integrity": "sha512-fCvEXfh6NWpm+YSuY2bpXb/VIihqWA6hLsgboC+0nl71Q7N7o2eaCW8mJa/NLvQhs6jpd3VZV4UiUQlV6+lc8g==", "dev": true }, "sntp": { "version": "0.2.4", "resolved": "http://registry.npmjs.org/sntp/-/sntp-0.2.4.tgz", "integrity": "sha1-+4hfGLDzqtGJ+CSGJTa87ux1CQA=", "dev": true, "optional": true, "requires": { "hoek": "0.9.x" } }, "stream-counter": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/stream-counter/-/stream-counter-0.2.0.tgz", "integrity": "sha512-GjA2zKc2iXUUKRcOxXQmhEx0Ev3XHJ6c8yWGqhQjWwhGrqNwSsvq9YlRLgoGtZ5Kx2Ln94IedaqJ5GUG6aBbxA==", "dev": true, "requires": { "readable-stream": "~1.1.8" } }, "string_decoder": { "version": "0.10.31", "resolved": "http://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=", "dev": true }, "thenify": { "version": "3.3.0", "resolved": "https://registry.npmjs.org/thenify/-/thenify-3.3.0.tgz", "integrity": "sha1-5p44obq+lpsBCCB5eLn2K4hgSDk=", "dev": true, "requires": { "any-promise": "^1.0.0" } }, "thenify-all": { "version": "1.6.0", "resolved": "https://registry.npmjs.org/thenify-all/-/thenify-all-1.6.0.tgz", "integrity": "sha512-RNxQH/qI8/t3thXJDwcstUO4zeqo64+Uy/+sNVRBx4Xn2OX+OZ9oP+iJnNFqplFra2ZUVeKCSa2oVWi3T4uVmA==", "dev": true, "requires": { "thenify": ">= 3.1.0 < 4" } }, "tough-cookie": { "version": "0.9.15", "resolved": "http://registry.npmjs.org/tough-cookie/-/tough-cookie-0.9.15.tgz", "integrity": "sha1-dWF6w0fjZZBSsDUBMYhYKWdzmfY=", "dev": true, "optional": true, "requires": { "punycode": ">=0.2.0" } }, "tunnel-agent": { "version": "0.3.0", "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.3.0.tgz", "integrity": "sha512-jlGqHGoKzyyjhwv/c9omAgohntThMcGtw8RV/RDLlkbbc08kni/akVxO62N8HaXMVbVsK1NCnpSK3N2xCt22ww==", "dev": true, "optional": true }, "type-is": { "version": "1.3.2", "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.3.2.tgz", "integrity": "sha512-sdIhnvhWEyIP2DKjj1o9tL31m8vFxDfLPD56KXz2absqY5AF2QYkJC7Wrw2fkzsZA9mv+PCtgyB7EqYOgR+r3Q==", "dev": true, "requires": { "media-typer": "0.2.0", "mime-types": "~1.0.1" }, "dependencies": { "mime-types": { "version": "1.0.2", "resolved": "http://registry.npmjs.org/mime-types/-/mime-types-1.0.2.tgz", "integrity": "sha1-mVrhOSq4r/y/yyZB3QVOlDwNXc4=", "dev": true } } }, "uid-safe": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/uid-safe/-/uid-safe-1.1.0.tgz", "integrity": "sha512-7+QtWs9zioL/iQX61G+4h3EPyr3H+tINIp0IAV4EL32vdf7qmFyuW0BgRqWl7p5oZOsEQrlL0bY7m5D8tp7b1w==", "dev": true, "requires": { "base64-url": "1.2.1", "native-or-bluebird": "~1.1.2" }, "dependencies": { "base64-url": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/base64-url/-/base64-url-1.2.1.tgz", "integrity": "sha512-V8E0l1jyyeSSS9R+J9oljx5eq2rqzClInuwaPcyuv0Mm3ViI/3/rcc4rCEO8i4eQ4I0O0FAGYDA2i5xWHHPhzg==", "dev": true } } }, "utils-merge": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.0.tgz", "integrity": "sha512-HwU9SLQEtyo+0uoKXd1nkLqigUWLB+QuNQR4OcmB73eWqksM5ovuqcycks2x043W8XVb75rG1HQ0h93TMXkzQQ==", "dev": true }, "vary": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/vary/-/vary-1.0.1.tgz", "integrity": "sha512-yNsH+tC0r8quK2tg/yqkXqqaYzeKTkSqQ+8T6xCoWgOi/bU/omMYz+6k+I91JJJDeltJzI7oridTOq6OYkY0Tw==", "dev": true }, "vhost": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/vhost/-/vhost-2.0.0.tgz", "integrity": "sha512-TSExWM12MVtvIuBLMPyBuWBQLbHnmDZ3zfsoZwcUmKxzPX8l/cHKl5vVfbo8/KZ56UBAc/tTYXbaDGVDaIcrWw==", "dev": true }, "vows": { "version": "0.8.0", "resolved": "https://registry.npmjs.org/vows/-/vows-0.8.0.tgz", "integrity": "sha512-qGOX3ZqSDRWYQ24MtRxUWDiEdinb6kPR9ZPr1HKkbxS/ffpWsVHZ/wm9N7DrNH1Bo0jfc/iThLZLuMH2AamXpw==", "dev": true, "requires": { "diff": "~1.0.8", "eyes": "~0.1.6", "glob": "~4.0.6" } }, "wrappy": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", "dev": true } } } flatiron-union-51f28e7/package.json000066400000000000000000000014061455213176100173150ustar00rootroot00000000000000{ "name": "union", "description": "A hybrid buffered / streaming middleware kernel backwards compatible with connect.", "version": "0.6.0", "author": "Charlie Robbins ", "maintainers": [ "dscape " ], "repository": { "type": "git", "url": "http://github.com/flatiron/union.git" }, "dependencies": { "qs": "^6.4.0" }, "devDependencies": { "ecstatic": "0.5.x", "director": "1.x.x", "request": "2.29.x", "vows": "0.8.0", "connect": "2.22.x" }, "scripts": { "preinstall": "npx npm-force-resolutions", "test": "vows test/*-test.js --spec -i" }, "resolutions": { "graceful-fs": "^4.2.11" }, "main": "./lib", "engines": { "node": ">= 0.8.0" } } flatiron-union-51f28e7/test/000077500000000000000000000000001455213176100160055ustar00rootroot00000000000000flatiron-union-51f28e7/test/after-test.js000066400000000000000000000017031455213176100204220ustar00rootroot00000000000000var assert = require('assert'), vows = require('vows'), request = require('request'), union = require('../'); function stream_callback(cb) { return function () { var stream = new union.ResponseStream(); stream.once("pipe", function (req) { return cb ? cb(null,req) : undefined; }); return stream; }; } vows.describe('union/after').addBatch({ 'When using `union`': { 'a union server with after middleware': { topic: function () { var self = this; union.createServer({ after: [ stream_callback(), stream_callback(self.callback) ] }).listen(9000, function () { request.get('http://localhost:9000'); }); }, 'should preserve the request until the last call': function (req) { assert.equal(req.req.httpVersion, '1.1'); assert.equal(req.req.url, '/'); assert.equal(req.req.method, 'GET'); } } } }).export(module);flatiron-union-51f28e7/test/body-parser-test.js000066400000000000000000000024641455213176100215550ustar00rootroot00000000000000/* * simple-test.js: Simple tests for basic streaming and non-streaming HTTP requests with union. * * (C) 2011, Charlie Robbins & the Contributors * MIT LICENSE * */ var assert = require('assert'), connect = require('connect'), request = require('request'), vows = require('vows'), union = require('../'); vows.describe('union/body-parser').addBatch({ "When using union with connect body parsing via urlencoded() or json()": { topic: function () { union.createServer({ buffer: false, before: [ connect.urlencoded(), connect.json(), function (req, res) { res.end(JSON.stringify(req.body, true, 2)); } ] }).listen(8082, this.callback); }, "a request to /": { topic: function () { request.post({ uri: 'http://localhost:8082/', headers: { 'content-type': 'application/json' }, body: JSON.stringify({ a: "foo", b: "bar" }) }, this.callback); }, "should respond with a body-decoded object": function (err, res, body) { assert.isNull(err); assert.equal(res.statusCode, 200); assert.deepEqual( JSON.parse(body), { a: 'foo', b: 'bar' } ); } } } }).export(module); flatiron-union-51f28e7/test/double-write-test.js000066400000000000000000000030421455213176100217210ustar00rootroot00000000000000/* * simple-test.js: Simple tests for basic streaming and non-streaming HTTP requests with union. * * (C) 2011, Charlie Robbins & the Contributors * MIT LICENSE * */ var assert = require('assert'), fs = require('fs'), path = require('path'), request = require('request'), vows = require('vows'), union = require('../lib/index'), macros = require('./helpers/macros'); var doubleWrite = false, server; server = union.createServer({ before: [ function (req, res) { res.json(200, { 'hello': 'world' }); res.emit('next'); }, function (req, res) { doubleWrite = true; res.json(200, { 'hello': 'world' }); res.emit('next'); } ] }); vows.describe('union/double-write').addBatch({ "When using union": { "an http server which attempts to write to the response twice": { topic: function () { server.listen(9091, this.callback); }, "a GET request to `/foo`": { topic: function () { request({ uri: 'http://localhost:9091/foo' }, this.callback); }, "it should respond with `{ 'hello': 'world' }`": function (err, res, body) { macros.assertValidResponse(err, res); assert.deepEqual(JSON.parse(body), { 'hello': 'world' }); }, "it should not write to the response twice": function () { assert.isFalse(doubleWrite); } } } } }).addBatch({ "When the tests are over": { "the server should close": function () { server.close(); } } }).export(module); flatiron-union-51f28e7/test/ecstatic-test.js000066400000000000000000000023421455213176100211200ustar00rootroot00000000000000/* * simple-test.js: Simple tests for basic streaming and non-streaming HTTP requests with union. * * (C) 2011, Charlie Robbins & the Contributors * MIT LICENSE * */ var assert = require('assert'), ecstatic = require('ecstatic')(__dirname + '/fixtures/static'), request = require('request'), vows = require('vows'), union = require('../'); vows.describe('union/ecstatic').addBatch({ "When using union with ecstatic": { topic: function () { union.createServer({ before: [ ecstatic ] }).listen(18082, this.callback); }, "a request to /some-file.txt": { topic: function () { request({ uri: 'http://localhost:18082/some-file.txt' }, this.callback); }, "should respond with `hello world`": function (err, res, body) { assert.isNull(err); assert.equal(body, 'hello world\n'); } }, "a request to /404.txt (which does not exist)": { topic: function () { request({ uri: 'http://localhost:18082/404.txt' }, this.callback); }, "should respond with 404 status code": function (err, res, body) { assert.isNull(err); assert.equal(res.statusCode, 404); } } } }).export(module); flatiron-union-51f28e7/test/fixtures/000077500000000000000000000000001455213176100176565ustar00rootroot00000000000000flatiron-union-51f28e7/test/fixtures/index.js000066400000000000000000000000001455213176100213110ustar00rootroot00000000000000flatiron-union-51f28e7/test/fixtures/static/000077500000000000000000000000001455213176100211455ustar00rootroot00000000000000flatiron-union-51f28e7/test/fixtures/static/some-file.txt000066400000000000000000000000141455213176100235610ustar00rootroot00000000000000hello world flatiron-union-51f28e7/test/header-test.js000066400000000000000000000022201455213176100205440ustar00rootroot00000000000000// var assert = require('assert'), // request = require('request'), // vows = require('vows'), // union = require('../'); // vows.describe('union/header').addBatch({ // 'When using `union`': { // 'with a server that responds with a header': { // topic: function () { // var callback = this.callback; // var server = union.createServer({ // before: [ // function (req, res) { // res.on('header', function () { // callback(null, res); // }); // res.writeHead(200, { 'content-type': 'text' }); // res.end(); // } // ] // }); // server.listen(9092, function () { // request('http://localhost:9092/'); // }); // }, // 'it should have proper `headerSent` set': function (err, res) { // assert.isNull(err); // assert.isTrue(res.headerSent); // }, // 'it should have proper `_emittedHeader` set': function (err, res) { // assert.isNull(err); // assert.isTrue(res._emittedHeader); // } // } // } // }).export(module); flatiron-union-51f28e7/test/helpers/000077500000000000000000000000001455213176100174475ustar00rootroot00000000000000flatiron-union-51f28e7/test/helpers/index.js000066400000000000000000000000001455213176100211020ustar00rootroot00000000000000flatiron-union-51f28e7/test/helpers/macros.js000066400000000000000000000004311455213176100212670ustar00rootroot00000000000000/* * macros.js: Simple test macros * * (C) 2011, Charlie Robbins & the Contributors * MIT LICENSE * */ var assert = require('assert'); var macros = exports; macros.assertValidResponse = function (err, res) { assert.isTrue(!err); assert.equal(res.statusCode, 200); }; flatiron-union-51f28e7/test/prop-test.js000066400000000000000000000026131455213176100203020ustar00rootroot00000000000000var assert = require('assert'), request = require('request'), vows = require('vows'), union = require('../'); vows.describe('union/properties').addBatch({ 'When using `union`': { 'with a server that responds to requests': { topic: function () { var callback = this.callback; var server = union.createServer({ before: [ function (req, res) { callback(null, req, res); res.writeHead(200, { 'content-type': 'text' }); res.end(); } ] }); server.listen(9092, function () { request('http://localhost:9092/'); }); }, 'the `req` should have a proper `httpVersion` set': function (err, req) { assert.isNull(err); assert.equal(req.httpVersion, '1.1'); }, 'the `req` should have a proper `httpVersionMajor` set': function (err, req) { assert.isNull(err); assert.equal(req.httpVersionMajor, 1); }, 'the `req` should have a proper `httpVersionMinor` set': function (err, req) { assert.isNull(err); assert.equal(req.httpVersionMinor, 1); }, 'the `req` should have proper `socket` reference set': function (err, req) { var net = require('net'); assert.isNull(err); assert.isTrue(req.socket instanceof net.Socket); } } } }).export(module); flatiron-union-51f28e7/test/simple-test.js000066400000000000000000000061541455213176100206170ustar00rootroot00000000000000/* * simple-test.js: Simple tests for basic streaming and non-streaming HTTP requests with union. * * (C) 2011, Charlie Robbins & the Contributors * MIT LICENSE * */ var assert = require('assert'), fs = require('fs'), path = require('path'), spawn = require('child_process').spawn, request = require('request'), vows = require('vows'), macros = require('./helpers/macros'); var examplesDir = path.join(__dirname, '..', 'examples', 'simple'), simpleScript = path.join(examplesDir, 'simple.js'), pkg = JSON.parse(fs.readFileSync(path.join(__dirname, '..', 'package.json'), 'utf8')), fooURI = 'http://localhost:9090/foo', server; vows.describe('union/simple').addBatch({ "When using union": { "a simple http server": { topic: function () { server = spawn(process.argv[0], [simpleScript]); server.stdout.on('data', this.callback.bind(this, null)); }, "a GET request to `/foo`": { topic: function () { request({ uri: fooURI }, this.callback); }, "it should respond with `hello world`": function (err, res, body) { macros.assertValidResponse(err, res); assert.equal(body, 'hello world\n'); }, "it should respond with 'x-powered-by': 'union '": function (err, res, body) { assert.isNull(err); assert.equal(res.headers['x-powered-by'], 'union ' + pkg.version); } }, "a POST request to `/foo`": { topic: function () { request.post({ uri: fooURI }, this.callback); }, "it should respond with `wrote to a stream!`": function (err, res, body) { macros.assertValidResponse(err, res); assert.equal(body, 'wrote to a stream!'); } }, "a GET request to `/redirect`": { topic: function () { request.get({ url: 'http://localhost:9090/redirect', followRedirect: false }, this.callback); }, "it should redirect to `http://www.google.com`": function (err, res, body) { assert.equal(res.statusCode, 302); assert.equal(res.headers.location, "http://www.google.com"); } }, "a GET request to `/custom_redirect`": { topic: function () { request.get({ url: 'http://localhost:9090/custom_redirect', followRedirect: false }, this.callback); }, "it should redirect to `/foo`": function (err, res, body) { assert.equal(res.statusCode, 301); assert.equal(res.headers.location, "http://localhost:9090/foo"); } }, "a GET request to `/async`": { topic: function () { request.get({ url: 'http://localhost:9090/async', timeout: 500 }, this.callback); }, "it should not timeout": function (err, res, body) { assert.ifError(err); assert.equal(res.statusCode, 200); } } } } }).addBatch({ "When the tests are over": { "the server should close": function () { server.kill(); } } }).export(module); flatiron-union-51f28e7/test/status-code-test.js000066400000000000000000000015241455213176100215550ustar00rootroot00000000000000var assert = require('assert'), request = require('request'), vows = require('vows'), union = require('../'); vows.describe('union/status-code').addBatch({ 'When using `union`': { 'with a server setting `res.statusCode`': { topic: function () { var server = union.createServer({ before: [ function (req, res) { res.statusCode = 404; res.end(); } ] }); server.listen(9091, this.callback); }, 'and sending a request': { topic: function () { request('http://localhost:9091/', this.callback); }, 'it should have proper `statusCode` set': function (err, res, body) { assert.isTrue(!err); assert.equal(res.statusCode, 404); } } } } }).export(module); flatiron-union-51f28e7/test/streaming-test.js000066400000000000000000000035201455213176100213110ustar00rootroot00000000000000var assert = require('assert'), fs = require('fs'), path = require('path'), request = require('request'), vows = require('vows'), union = require('../'); vows.describe('union/streaming').addBatch({ 'When using `union`': { 'a simple union server': { topic: function () { var self = this; union.createServer({ buffer: false, before: [ function (req, res, next) { var chunks = ''; req.on('data', function (chunk) { chunks += chunk; }); req.on('end', function () { self.callback(null, chunks); }); } ] }).listen(9000, function () { request.post('http://localhost:9000').write('hello world'); }); }, 'should receive complete POST data': function (chunks) { assert.equal(chunks, 'hello world'); } }, "a simple pipe to a file": { topic: function () { var self = this; union.createServer({ before: [ function (req, res, next) { var filename = path.join(__dirname, 'fixtures', 'pipe-write-test.txt'), writeStream = fs.createWriteStream(filename); req.pipe(writeStream); writeStream.on('close', function () { res.writeHead(200); fs.createReadStream(filename).pipe(res); }); } ] }).listen(9044, function () { request({ method: 'POST', uri: 'http://localhost:9044', body: 'hello world' }, self.callback); }); }, 'should receive complete POST data': function (err, res, body) { assert.equal(body, 'hello world'); } } } }).export(module); flatiron-union-51f28e7/union.png000066400000000000000000000251121455213176100166650ustar00rootroot00000000000000PNG  IHDRW otEXtSoftwareAdobe ImageReadyqe<"iTXtXML:com.adobe.xmp 3"&IDATxysWŏQeˉX 8) b `>(UU "!@l0$A֬׿s{ݜ}'U%}{`a~_0 a0 ja\ 0La&W0 jar5 0a&W0 a0 0a\ 0La0 ]K`??1;w.lٲ%loqsQ6=7- 8(/[ MmNc1Шb_W#r}U;kQ9zիCw\ bNMM{.+}6(/"u aA}u;C_P歹F 9 ={žlp  /1/%Ge 14343n(UۑqI^vD:U7E٧[Z6Bi;}UtWqҾ"?U_U쪔(38=߿? ⥵ cuȆW Nvo MwzqS䊈?PI'_J-Pg'ѱĒeCT+ -S2H~Vv2#9W]'5QzՎMe~3v$}ɻ%F#rs .g9G$o+N^1b`9f=ݗ|‘%u?>ṗsP&`1#W`r5VkQ@  ˬ8r,Ctҥl]+6"WH Mկ~ux ")c~/{ˢ8o}ï~84X_s)311/}i$Iꃔ!oo}9mo{[,&|O5mYZdVWvg2 vgnx_t=3FKug|;0_HY I=]HC4ˆ"\yT1FY5#Tiz n ~{0!6xG$<BH!e}$NQ677 qH9<7(׿5J[w-A믿>NeLj]?&Wh!xrן<}.#'ˋϋK%ۤ!`2$U&h< f CG^Wn(C{뢖J]ӟ4je>!hh|K+K4d7b\ @ Pˆjk@L^D蟹B/9΋y@|;ûAH:pgh='?jnD %9+bK)hx_=9+]cp ַ֣ 7f@hϔN /ʋ}EeHDrh>mZ˞]QE @"DAhh]| ‚T?OF[%/~rmBCa@?ui@.Z_™3g5CxҀI!2p 45Ghb 9!M$!eUbz@d˖> G"L*5瓁3Ҝ/]t\A?~E2ԧ>mL澺#>2bkt TMHJN2)i6Ӥ RV2hb)͉ k: n 1*k +dBHd'|>bGKׄ>o1F;a hpa0# D"h[hf8o;juhMhvlroFof:1#MP3"4,U$N\)֟zj>qpqM|jM\ɾFhiTz Ea@ٽ49k(nj}|Ժƛ¶cr5e(\ym{^KIDY*bĆɋ~ˑ4:HJ"ifiȎ6UT4F#-0W?Dz?xYkJ5 6M6 )KTk-!GC锸ʨp҈Ņl,`mDY/{9/\*-V~1r[t _A@ b$ AUP?7.Dܟ0[_iҼUJH~*mjCU~m!!SCJS.y\{Q#w# sa=\Lr0X2cYDvLageB7 EpDo~hAA`Tv[;uSlԃ-mH$lԅ/(qg†mWqw+օfd\_D?R$OF>OmxN"7R\"|^Dp5>$(!l]}mq"z 7,iܺCjcxx_ar5k-Oh [dӟtݗU/5d@0É'"hm!B+ТŰ{H }6_%>7vFS!#B@Ym @a?D!;#(w.HW)ETB}{3#/?A${WȘI?]+^K=L7薕nLM}#a4FPK<vvW_٥Cz@"4;7׊hu]weOA+䋶(ڢHhVL*(R̐3$K3[AzlBA J)hЇ+4D~O>H}eGæ맥c^l1Issa:xdM&Ȗ:4%?WBCh |Afs.C`@8E LhޣY0||!@D5X[o$(rP`]l ~YZlHT (eB+3{С:bj5UBvh)χk|GJT]+4X2hϘJI#ce5]_v]njmDM$0X_NDk?12g6 QAjfu  $'d® QA*0hr\" `쬴{A^ <PӐ_dLj-Q]G!9pddB#|j(&)KDH-}#!rU/DL(HJڽ D]׷dr5v"͆0u5΄tMEZ\js09:_C BRh䊥|JS,!1)I"lJP-:T[/NBnb2k y6+!-&㽀K}"F}R͓2ƨCZP>>>uuj&Wh#R,9͐Wa}אhAyim mqZHsod( E`5 IO̒Oxީp#ɰFŋAs5MF@LeT\,Jro=WJV_4Vr0Y#ӂ"d>P0@#"j$l%Y: M3f57"ٵE$٨ʲŅɐV2jmDe<[|rdZ| )@䎭%6;iPhz"4k6eH3oi,Nr[ˣhXU_M^rWL^ٺg$ML6IcV _b{ qJ$T\"A[/j  l[wEAP@>($\Yk)|ȮkP)\ c_z br/Zݩ&it! U|Cq;Q}JZb"L<2w/FxnSx @Er"ЦBn;>|L$/k+l+g &.]0" [j_ k!yq%]4 a?.SҴi%ܪ0`ݞK' w'W1&2+Y[-i 'R% ?T> (Pɭ%QV.2IC)S-U[@JR4(Dw|s矋!+V}~Ì0mGPlRdϷ3G[񉼚3KXElhH֑JC8_IS aUu~U!J"BT8)*Vi6z!hbdC.pЇ!+4; !$4MڣO(rܩ~ڊ73]ouѧːWe<2 3G{%ud̽ȹe)ɶU37̶mj&Xzej|y!(SrU>mlIn~<9"%؆tc=e@ !&8DvKDP"9'rP#EiY~Fݫ,җ#0I@>63yhZ:KGDm;^9YK94e^ή9ْȵo=FjkF8u?m:*w+s?pl&c.W^K.^c|G)Q$BBZ$]D*4!tWqݏ_BJ-mW 0K#Xiɧ4\ەVnۖ2c-Z>2l[!]\a_w3͙VlɚY5>mwUM1Eթ+5ȥ0c~Q{ E1)m^JPF/ZƤ!12mCzTTȀ)@[2e%VX:hq@Ui6XjFHЦHMoX t8 &&'|6  ky2L]ËZ Ll]qfZH$c/BݬfmmiR-]*-/ͶPaSW=jYjlYd4حѦZK p!# ΗL`r5ډz5z+Lτ.8yuzzꚗx9m#SBmvl5djUʻRPFvWQHpa"z !hò^6ڈyQ^e:3xfknA[B }]&5ui\v➊R_fgkϹY#IN^g9&&.\ :ffb})T11Yfr5kQY \]}Cɤ%MGI!&p3@Sw4ݠioY;id(+9ⱼ7%eH/ŅekG!1ˑT;>Le#Ea0^E|rOlȖgGɏT+3e5V`)ܭ3I)O9%SZ@\yfr˫ f)U+@ fUom)uY_)[kN|T'!cJY]sϝ{6{\=aF3UTJYbhË+$^fB:K^Z-LHf(# /<UnPDN)BrZw-c ÷6+^9+ $!}6[j)dpvLyk ??@#LSR]vb,BXɪ<mQ׀ Y-°Y X!lȪ Ȉd&8'XGWΧ8@֩^܇-G:Y[CLemv?wKL%)kGsJ|?5׬]Nŋu2h\x.}eU[A㤯[s T}j>K+b܅ljkx>#T?ďvﶘ\n&c pUf/Α[odPsĊRI셐O_n 9.6d"l!Wꑽ0\lЎE1AVR(6LՎHyKNN!'|AI;!K@& I_5% ss}zeG˹|/Q_YБD:፷\njT}v*a3 l_6{LC] 5:/ 4?/{P8r{vV/f#~}mxԟf$n߷olt t Ȫ$n?ׄ q#)CtQiY vɲOzʗ0H~_aa0 jar5 0La&W0 aaϵp(].\Lhp?'W!jrg@miJ*"4/dL\{S{p*'mC${*T⭟ik/4kIlvud:tt<&F͵m&6 j*[;*ZZϴɵ!xtݏ\:ޓ:gϴɵ3q y9{`.`{M{;CY:ǻXgMϴɵs mBnA 1?yM ^,=3'N֑Ǒ/~[L\P/b8X;6&k@kXkް&!MFPH>m3XݏPVjFF4-tº&LRVuԷ~[L\TrU/X(?ȕTp:+e:͇eˢh3~mNȇxcaItɲP }-iNq_ϴɵ'`>$ZOf,QC=r]C6hfh*Y~[L\X7rLVP;x^WY:ˣgikw:JJ%߫2]dHL\ 玗TOSb]UhQJ됟ikwP}Y+!g*@Y7:`ϴɵq6T9K[ V @ϴɵ+Q:ʳQk\F>ejf~}&LS]Zw7,zX y>6FS5)׊aiYmm7$:{6gj݀3]6-3Fk[$oK&Wat<&ZVYZ&Wa\ atrIj jn\,"YjF0\ 0La&W_شĘ0:`Z916RR=Ncr5P2Ԉo0 jƺqgj\ 2wp@Ijr5ha͵oCk+2՚55cطXv>%k'8[ky>>%kY~ZM*?%3o({(uB6LY5M@eG$ɒ[3<ꚴډc5ͅ%ʞT}gz$ L@eG^uXth_&W}7JG*>~D6NX=%hD=ir\ 1]fY^x60:GGfu8=6[\)#f{jhN6[;\Bmu,b#6v8x(NC2q QΙ>XQN<4*"WnPO)|k7FlJ>n]b]:V`"W:4Ϥ$NOɦcs4CȵW1zfCδ亹'X7\τΜx0!~D'L:p8'n$C}Mwd/:rDNRD"VY{\;iDhmk\NX{\E^x0'F֙uj\F;W@Mո sb|4V󼧣SqM5W0 cya\ 0La&W0 jar5 0a&W0 a0 0a\ 0La0 jar5 0La&W0 aar5 0a\ 0 a0 ja\ 0La&W0 jar5 0al^ނǡIENDB`