diff --git a/.gitignore b/.gitignore
index 9303c347..6adcd013 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,2 +1,2 @@
-node_modules/
-npm-debug.log
\ No newline at end of file
+node_modules/*
+npm-debug.log
diff --git a/node_modules/.gitkeep b/node_modules/.gitkeep
deleted file mode 100644
index e69de29b..00000000
diff --git a/node_modules/aws-sdk/.eslintrc b/node_modules/aws-sdk/.eslintrc
deleted file mode 100644
index b069ba67..00000000
--- a/node_modules/aws-sdk/.eslintrc
+++ /dev/null
@@ -1,19 +0,0 @@
-{
- "env": {
- "browser": true,
- "node": true
- },
- "globals": {
- "Buffer": true,
- "escape": true
- },
- "rules": {
- "quotes": [2, "single"],
- "strict": 0,
- "curly": 0,
- "no-underscore-dangle": 0,
- "new-cap": 0,
- "dot-notation": 0,
- "no-require-in-service": 2
- }
-}
diff --git a/node_modules/aws-sdk/.npmignore b/node_modules/aws-sdk/.npmignore
deleted file mode 100644
index 4b6a7bca..00000000
--- a/node_modules/aws-sdk/.npmignore
+++ /dev/null
@@ -1,17 +0,0 @@
-.yard*
-.jshintrc
-.travis.yml
-apis/source
-configuration
-configuration.sample
-dist
-dist-tools
-doc
-doc-src
-Gemfile
-Gemfile.lock
-features
-Rakefile
-test
-tasks
-vendor
diff --git a/node_modules/aws-sdk/LICENSE.txt b/node_modules/aws-sdk/LICENSE.txt
deleted file mode 100644
index ab7da479..00000000
--- a/node_modules/aws-sdk/LICENSE.txt
+++ /dev/null
@@ -1,12 +0,0 @@
-Copyright 2012-2014 Amazon.com, Inc. or its affiliates. All Rights Reserved.
-
-Licensed under the Apache License, Version 2.0 (the "License"). You
-may not use this file except in compliance with the License. A copy of
-the License is located at
-
- http://aws.amazon.com/apache2.0/
-
-or in the "license" file accompanying this file. This file is
-distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF
-ANY KIND, either express or implied. See the License for the specific
-language governing permissions and limitations under the License.
diff --git a/node_modules/aws-sdk/README.md b/node_modules/aws-sdk/README.md
deleted file mode 100644
index 93172aef..00000000
--- a/node_modules/aws-sdk/README.md
+++ /dev/null
@@ -1,113 +0,0 @@
-# AWS SDK for JavaScript [](http://badge.fury.io/js/aws-sdk) [](https://travis-ci.org/aws/aws-sdk-js)
-
-The official AWS SDK for JavaScript, available for browsers and mobile devices,
-or Node.js backends
-
-Release notes can be found at http://aws.amazon.com/releasenotes/SDK/JavaScript
-
-## Installing
-
-### In the Browser
-
-To use the SDK in the browser, simply add the following script tag to your
-HTML pages:
-
-
-
-### In Node.js
-
-The preferred way to install the AWS SDK for Node.js is to use the
-[npm](http://npmjs.org) package manager for Node.js. Simply type the following
-into a terminal window:
-
-```sh
-npm install aws-sdk
-```
-
-## Usage and Getting Started
-
-You can find a getting started guide at:
-
-http://docs.aws.amazon.com/AWSJavaScriptSDK/guide/
-
-## Supported Services
-
-
Note:
-Although all services are supported in the browser version of the SDK,
-not all of the services are available in the default hosted build (using the
-script tag provided above). A list of services in the hosted build are provided
-in the "Working With Services"
-section of the browser SDK guide, including instructions on how to build a
-custom version of the SDK with extra services.
-
-
-The SDK currently supports the following services:
-
-
This work (and included software, documentation such as READMEs, or other
-related items) is being provided by the copyright holders under the following
-license.
-
License
-
-
-By obtaining, using and/or copying this work, you (the licensee)
-agree that you have read, understood, and will comply with the following
-terms and conditions.
-
-
Permission to copy, modify, and distribute this software and its
-documentation, with or without modification, for any purpose and without
-fee or royalty is hereby granted, provided that you include the following on
-ALL copies of the software and documentation or portions thereof, including
-modifications:
-
-
The full text of this NOTICE in a location viewable to users of the
- redistributed or derivative work.
Any pre-existing intellectual property disclaimers, notices, or terms
- and conditions. If none exist, the W3C Software Short
- Notice should be included (hypertext is preferred, text is permitted)
- within the body of any redistributed or derivative code.
Notice of any changes or modifications to the files, including the date
- changes were made. (We recommend you provide URIs to the location from
- which the code is derived.)
-
-
Disclaimers
-
-
THIS SOFTWARE AND DOCUMENTATION IS PROVIDED "AS IS," AND COPYRIGHT HOLDERS
-MAKE NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT
-LIMITED TO, WARRANTIES OF MERCHANTABILITY OR FITNESS FOR ANY PARTICULAR
-PURPOSE OR THAT THE USE OF THE SOFTWARE OR DOCUMENTATION WILL NOT INFRINGE
-ANY THIRD PARTY PATENTS, COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS.
-
-
COPYRIGHT HOLDERS WILL NOT BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL OR
-CONSEQUENTIAL DAMAGES ARISING OUT OF ANY USE OF THE SOFTWARE OR
-DOCUMENTATION.
-
-
The name and trademarks of copyright holders may NOT be used in
-advertising or publicity pertaining to the software without specific, written
-prior permission. Title to copyright in this software and any associated
-documentation will at all times remain with copyright holders.
-
-
Notes
-
-
This version: http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
-
-
This formulation of W3C's notice and license became active on December 31
-2002. This version removes the copyright ownership notice such that this
-license can be used with materials other than those owned by the W3C,
-reflects that ERCIM is now a host of the W3C, includes references to this
-specific dated version of the license, and removes the ambiguous grant of
-"use". Otherwise, this version is the same as the previous
-version and is written so as to preserve the Free
-Software Foundation's assessment of GPL compatibility and OSI's certification
-under the Open Source
-Definition.
-
-
-
-
-
-
-
-
-
-
diff --git a/node_modules/aws-sdk/node_modules/xml2js/node_modules/sax/README.md b/node_modules/aws-sdk/node_modules/xml2js/node_modules/sax/README.md
deleted file mode 100644
index c9652420..00000000
--- a/node_modules/aws-sdk/node_modules/xml2js/node_modules/sax/README.md
+++ /dev/null
@@ -1,216 +0,0 @@
-# sax js
-
-A sax-style parser for XML and HTML.
-
-Designed with [node](http://nodejs.org/) in mind, but should work fine in
-the browser or other CommonJS implementations.
-
-## What This Is
-
-* A very simple tool to parse through an XML string.
-* A stepping stone to a streaming HTML parser.
-* A handy way to deal with RSS and other mostly-ok-but-kinda-broken XML
- docs.
-
-## What This Is (probably) Not
-
-* An HTML Parser - That's a fine goal, but this isn't it. It's just
- XML.
-* A DOM Builder - You can use it to build an object model out of XML,
- but it doesn't do that out of the box.
-* XSLT - No DOM = no querying.
-* 100% Compliant with (some other SAX implementation) - Most SAX
- implementations are in Java and do a lot more than this does.
-* An XML Validator - It does a little validation when in strict mode, but
- not much.
-* A Schema-Aware XSD Thing - Schemas are an exercise in fetishistic
- masochism.
-* A DTD-aware Thing - Fetching DTDs is a much bigger job.
-
-## Regarding `Hello, world!').close();
-
- // stream usage
- // takes the same options as the parser
- var saxStream = require("sax").createStream(strict, options)
- saxStream.on("error", function (e) {
- // unhandled errors will throw, since this is a proper node
- // event emitter.
- console.error("error!", e)
- // clear the error
- this._parser.error = null
- this._parser.resume()
- })
- saxStream.on("opentag", function (node) {
- // same object as above
- })
- // pipe is supported, and it's readable/writable
- // same chunks coming in also go out.
- fs.createReadStream("file.xml")
- .pipe(saxStream)
- .pipe(fs.createWriteStream("file-copy.xml"))
-
-
-
-## Arguments
-
-Pass the following arguments to the parser function. All are optional.
-
-`strict` - Boolean. Whether or not to be a jerk. Default: `false`.
-
-`opt` - Object bag of settings regarding string formatting. All default to `false`.
-
-Settings supported:
-
-* `trim` - Boolean. Whether or not to trim text and comment nodes.
-* `normalize` - Boolean. If true, then turn any whitespace into a single
- space.
-* `lowercase` - Boolean. If true, then lowercase tag names and attribute names
- in loose mode, rather than uppercasing them.
-* `xmlns` - Boolean. If true, then namespaces are supported.
-* `position` - Boolean. If false, then don't track line/col/position.
-
-## Methods
-
-`write` - Write bytes onto the stream. You don't have to do this all at
-once. You can keep writing as much as you want.
-
-`close` - Close the stream. Once closed, no more data may be written until
-it is done processing the buffer, which is signaled by the `end` event.
-
-`resume` - To gracefully handle errors, assign a listener to the `error`
-event. Then, when the error is taken care of, you can call `resume` to
-continue parsing. Otherwise, the parser will not continue while in an error
-state.
-
-## Members
-
-At all times, the parser object will have the following members:
-
-`line`, `column`, `position` - Indications of the position in the XML
-document where the parser currently is looking.
-
-`startTagPosition` - Indicates the position where the current tag starts.
-
-`closed` - Boolean indicating whether or not the parser can be written to.
-If it's `true`, then wait for the `ready` event to write again.
-
-`strict` - Boolean indicating whether or not the parser is a jerk.
-
-`opt` - Any options passed into the constructor.
-
-`tag` - The current tag being dealt with.
-
-And a bunch of other stuff that you probably shouldn't touch.
-
-## Events
-
-All events emit with a single argument. To listen to an event, assign a
-function to `on`. Functions get executed in the this-context of
-the parser object. The list of supported events are also in the exported
-`EVENTS` array.
-
-When using the stream interface, assign handlers using the EventEmitter
-`on` function in the normal fashion.
-
-`error` - Indication that something bad happened. The error will be hanging
-out on `parser.error`, and must be deleted before parsing can continue. By
-listening to this event, you can keep an eye on that kind of stuff. Note:
-this happens *much* more in strict mode. Argument: instance of `Error`.
-
-`text` - Text node. Argument: string of text.
-
-`doctype` - The ``. Argument:
-object with `name` and `body` members. Attributes are not parsed, as
-processing instructions have implementation dependent semantics.
-
-`sgmldeclaration` - Random SGML declarations. Stuff like ``
-would trigger this kind of event. This is a weird thing to support, so it
-might go away at some point. SAX isn't intended to be used to parse SGML,
-after all.
-
-`opentag` - An opening tag. Argument: object with `name` and `attributes`.
-In non-strict mode, tag names are uppercased, unless the `lowercase`
-option is set. If the `xmlns` option is set, then it will contain
-namespace binding information on the `ns` member, and will have a
-`local`, `prefix`, and `uri` member.
-
-`closetag` - A closing tag. In loose mode, tags are auto-closed if their
-parent closes. In strict mode, well-formedness is enforced. Note that
-self-closing tags will have `closeTag` emitted immediately after `openTag`.
-Argument: tag name.
-
-`attribute` - An attribute node. Argument: object with `name` and `value`.
-In non-strict mode, attribute names are uppercased, unless the `lowercase`
-option is set. If the `xmlns` option is set, it will also contains namespace
-information.
-
-`comment` - A comment node. Argument: the string of the comment.
-
-`opencdata` - The opening tag of a ``) of a `` tags trigger a `"script"`
-event, and their contents are not checked for special xml characters.
-If you pass `noscript: true`, then this behavior is suppressed.
-
-## Reporting Problems
-
-It's best to write a failing test if you find an issue. I will always
-accept pull requests with failing tests if they demonstrate intended
-behavior, but it is very hard to figure out what issue you're describing
-without a test. Writing a test is also the best way for you yourself
-to figure out if you really understand the issue you think you have with
-sax-js.
diff --git a/node_modules/aws-sdk/node_modules/xml2js/node_modules/sax/component.json b/node_modules/aws-sdk/node_modules/xml2js/node_modules/sax/component.json
deleted file mode 100644
index 96b5d731..00000000
--- a/node_modules/aws-sdk/node_modules/xml2js/node_modules/sax/component.json
+++ /dev/null
@@ -1,12 +0,0 @@
-{
- "name": "sax",
- "description": "An evented streaming XML parser in JavaScript",
- "author": "Isaac Z. Schlueter (http://blog.izs.me/)",
- "version": "0.5.2",
- "main": "lib/sax.js",
- "license": "BSD",
- "scripts": [
- "lib/sax.js"
- ],
- "repository": "git://github.com/isaacs/sax-js.git"
-}
diff --git a/node_modules/aws-sdk/node_modules/xml2js/node_modules/sax/examples/big-not-pretty.xml b/node_modules/aws-sdk/node_modules/xml2js/node_modules/sax/examples/big-not-pretty.xml
deleted file mode 100644
index fb5265dd..00000000
--- a/node_modules/aws-sdk/node_modules/xml2js/node_modules/sax/examples/big-not-pretty.xml
+++ /dev/null
@@ -1,8002 +0,0 @@
-
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
- something blerm a bit down here
-
diff --git a/node_modules/aws-sdk/node_modules/xml2js/node_modules/sax/examples/example.js b/node_modules/aws-sdk/node_modules/xml2js/node_modules/sax/examples/example.js
deleted file mode 100644
index 7b0246e9..00000000
--- a/node_modules/aws-sdk/node_modules/xml2js/node_modules/sax/examples/example.js
+++ /dev/null
@@ -1,29 +0,0 @@
-
-var fs = require("fs"),
- util = require("util"),
- path = require("path"),
- xml = fs.readFileSync(path.join(__dirname, "test.xml"), "utf8"),
- sax = require("../lib/sax"),
- strict = sax.parser(true),
- loose = sax.parser(false, {trim:true}),
- inspector = function (ev) { return function (data) {
- console.error("%s %s %j", this.line+":"+this.column, ev, data);
- }};
-
-sax.EVENTS.forEach(function (ev) {
- loose["on"+ev] = inspector(ev);
-});
-loose.onend = function () {
- console.error("end");
- console.error(loose);
-};
-
-// do this in random bits at a time to verify that it works.
-(function () {
- if (xml) {
- var c = Math.ceil(Math.random() * 1000)
- loose.write(xml.substr(0,c));
- xml = xml.substr(c);
- process.nextTick(arguments.callee);
- } else loose.close();
-})();
diff --git a/node_modules/aws-sdk/node_modules/xml2js/node_modules/sax/examples/get-products.js b/node_modules/aws-sdk/node_modules/xml2js/node_modules/sax/examples/get-products.js
deleted file mode 100644
index 9e8d74aa..00000000
--- a/node_modules/aws-sdk/node_modules/xml2js/node_modules/sax/examples/get-products.js
+++ /dev/null
@@ -1,58 +0,0 @@
-// pull out /GeneralSearchResponse/categories/category/items/product tags
-// the rest we don't care about.
-
-var sax = require("../lib/sax.js")
-var fs = require("fs")
-var path = require("path")
-var xmlFile = path.resolve(__dirname, "shopping.xml")
-var util = require("util")
-var http = require("http")
-
-fs.readFile(xmlFile, function (er, d) {
- http.createServer(function (req, res) {
- if (er) throw er
- var xmlstr = d.toString("utf8")
-
- var parser = sax.parser(true)
- var products = []
- var product = null
- var currentTag = null
-
- parser.onclosetag = function (tagName) {
- if (tagName === "product") {
- products.push(product)
- currentTag = product = null
- return
- }
- if (currentTag && currentTag.parent) {
- var p = currentTag.parent
- delete currentTag.parent
- currentTag = p
- }
- }
-
- parser.onopentag = function (tag) {
- if (tag.name !== "product" && !product) return
- if (tag.name === "product") {
- product = tag
- }
- tag.parent = currentTag
- tag.children = []
- tag.parent && tag.parent.children.push(tag)
- currentTag = tag
- }
-
- parser.ontext = function (text) {
- if (currentTag) currentTag.children.push(text)
- }
-
- parser.onend = function () {
- var out = util.inspect(products, false, 3, true)
- res.writeHead(200, {"content-type":"application/json"})
- res.end("{\"ok\":true}")
- // res.end(JSON.stringify(products))
- }
-
- parser.write(xmlstr).end()
- }).listen(1337)
-})
diff --git a/node_modules/aws-sdk/node_modules/xml2js/node_modules/sax/examples/hello-world.js b/node_modules/aws-sdk/node_modules/xml2js/node_modules/sax/examples/hello-world.js
deleted file mode 100644
index cbfa5184..00000000
--- a/node_modules/aws-sdk/node_modules/xml2js/node_modules/sax/examples/hello-world.js
+++ /dev/null
@@ -1,4 +0,0 @@
-require("http").createServer(function (req, res) {
- res.writeHead(200, {"content-type":"application/json"})
- res.end(JSON.stringify({ok: true}))
-}).listen(1337)
diff --git a/node_modules/aws-sdk/node_modules/xml2js/node_modules/sax/examples/not-pretty.xml b/node_modules/aws-sdk/node_modules/xml2js/node_modules/sax/examples/not-pretty.xml
deleted file mode 100644
index 9592852d..00000000
--- a/node_modules/aws-sdk/node_modules/xml2js/node_modules/sax/examples/not-pretty.xml
+++ /dev/null
@@ -1,8 +0,0 @@
-
- something blerm a bit down here
diff --git a/node_modules/aws-sdk/node_modules/xml2js/node_modules/sax/examples/pretty-print.js b/node_modules/aws-sdk/node_modules/xml2js/node_modules/sax/examples/pretty-print.js
deleted file mode 100644
index cd6aca9e..00000000
--- a/node_modules/aws-sdk/node_modules/xml2js/node_modules/sax/examples/pretty-print.js
+++ /dev/null
@@ -1,74 +0,0 @@
-var sax = require("../lib/sax")
- , printer = sax.createStream(false, {lowercasetags:true, trim:true})
- , fs = require("fs")
-
-function entity (str) {
- return str.replace('"', '"')
-}
-
-printer.tabstop = 2
-printer.level = 0
-printer.indent = function () {
- print("\n")
- for (var i = this.level; i > 0; i --) {
- for (var j = this.tabstop; j > 0; j --) {
- print(" ")
- }
- }
-}
-printer.on("opentag", function (tag) {
- this.indent()
- this.level ++
- print("<"+tag.name)
- for (var i in tag.attributes) {
- print(" "+i+"=\""+entity(tag.attributes[i])+"\"")
- }
- print(">")
-})
-
-printer.on("text", ontext)
-printer.on("doctype", ontext)
-function ontext (text) {
- this.indent()
- print(text)
-}
-
-printer.on("closetag", function (tag) {
- this.level --
- this.indent()
- print(""+tag+">")
-})
-
-printer.on("cdata", function (data) {
- this.indent()
- print("")
-})
-
-printer.on("comment", function (comment) {
- this.indent()
- print("")
-})
-
-printer.on("error", function (error) {
- console.error(error)
- throw error
-})
-
-if (!process.argv[2]) {
- throw new Error("Please provide an xml file to prettify\n"+
- "TODO: read from stdin or take a file")
-}
-var xmlfile = require("path").join(process.cwd(), process.argv[2])
-var fstr = fs.createReadStream(xmlfile, { encoding: "utf8" })
-
-function print (c) {
- if (!process.stdout.write(c)) {
- fstr.pause()
- }
-}
-
-process.stdout.on("drain", function () {
- fstr.resume()
-})
-
-fstr.pipe(printer)
diff --git a/node_modules/aws-sdk/node_modules/xml2js/node_modules/sax/examples/shopping.xml b/node_modules/aws-sdk/node_modules/xml2js/node_modules/sax/examples/shopping.xml
deleted file mode 100644
index 223c6c66..00000000
--- a/node_modules/aws-sdk/node_modules/xml2js/node_modules/sax/examples/shopping.xml
+++ /dev/null
@@ -1,2 +0,0 @@
-
-sandbox3.1 r31.Kadu4DC.phase357782011.10.06 15:37:23 PSTp2.a121bc2aaf029435dce62011-10-21T18:38:45.982-04:00P0Y0M0DT0H0M0.169S1112You are currently using the SDC API sandbox environment! No clicks to merchant URLs from this response will be paid. Please change the host of your API requests to 'publisher.api.shopping.com' when you have finished development and testinghttp://statTest.dealtime.com/pixel/noscript?PV_EvnTyp=APPV&APPV_APITSP=10%2F21%2F11_06%3A38%3A45_PM&APPV_DSPRQSID=p2.a121bc2aaf029435dce6&APPV_IMGURL=http://img.shopping.com/sc/glb/sdc_logo_106x19.gif&APPV_LI_LNKINID=7000610&APPV_LI_SBMKYW=nikon&APPV_MTCTYP=1000&APPV_PRTID=2002&APPV_BrnID=14804http://www.shopping.com/digital-cameras/productsDigital CamerasDigital CamerasElectronicshttp://www.shopping.com/xCH-electronics-nikon~linkin_id-7000610?oq=nikonCameras and Photographyhttp://www.shopping.com/xCH-cameras_and_photography-nikon~linkin_id-7000610?oq=nikonDigital Camerashttp://www.shopping.com/digital-cameras/nikon/products?oq=nikon&linkin_id=7000610nikonnikonDigital Camerashttp://www.shopping.com/digital-cameras/nikon/products?oq=nikon&linkin_id=7000610Nikon D3100 Digital Camera14.2 Megapixel, SLR Camera, 3 in. LCD Screen, With High Definition Video, Weight: 1 lb.The Nikon D3100 digital SLR camera speaks to the growing ranks of enthusiastic D-SLR users and aspiring photographers by providing an easy-to-use and affordable entrance to the world of Nikon D-SLR’s. The 14.2-megapixel D3100 has powerful features, such as the enhanced Guide Mode that makes it easy to unleash creative potential and capture memories with still images and full HD video. Like having a personal photo tutor at your fingertips, this unique feature provides a simple graphical interface on the camera’s LCD that guides users by suggesting and/or adjusting camera settings to achieve the desired end result images. The D3100 is also the world’s first D-SLR to introduce full time auto focus (AF) in Live View and D-Movie mode to effortlessly achieve the critical focus needed when shooting Full HD 1080p video.http://di1.shopping.com/images/pi/93/bc/04/101677489-100x100-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=2&c=1&l=7000610&t=111021183845&r=1http://di1.shopping.com/images/pi/93/bc/04/101677489-200x200-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=2&c=1&l=7000610&t=111021183845&r=1http://di1.shopping.com/images/pi/93/bc/04/101677489-300x300-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=2&c=1&l=7000610&t=111021183845&r=1http://di1.shopping.com/images/pi/93/bc/04/101677489-400x400-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=2&c=1&l=7000610&t=111021183845&r=1http://di1.shopping.com/images/pi/93/bc/04/101677489-606x500-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=2&c=1&l=7000610&t=111021183845&r=194.56http://img.shopping.com/sc/pr/sdc_stars_sm_4.5.gifhttp://www.shopping.com/Nikon-D3100/reviews~linkin_id-7000610429.001360.00http://www.shopping.com/Nikon-D3100/prices~linkin_id-7000610http://www.shopping.com/Nikon-D3100/info~linkin_id-7000610Nikon D3100 Digital SLR Camera with 18-55mm NIKKOR VR LensThe Nikon D3100 Digital SLR Camera is an affordable compact and lightweight photographic power-house. It features the all-purpose 18-55mm VR lens a high-resolution 14.2 MP CMOS sensor along with a feature set that's comprehensive yet easy to navigate - the intuitive onboard learn-as-you grow guide mode allows the photographer to understand what the 3100 can do quickly and easily. Capture beautiful pictures and amazing Full HD 1080p movies with sound and full-time autofocus. Availabilty: In Stock!7185Nikonhttp://di102.shopping.com/images/di/2d/5a/57/36424d5a717a366662532d61554c7767615f67-100x100-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=1http://di102.shopping.com/images/di/2d/5a/57/36424d5a717a366662532d61554c7767615f67-200x200-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=1http://di102.shopping.com/images/di/2d/5a/57/36424d5a717a366662532d61554c7767615f67-300x300-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=1http://img.shopping.com/sc/ds/no_image_100X100.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=1http://di102.shopping.com/images/di/2d/5a/57/36424d5a717a366662532d61554c7767615f67-350x350-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=1in-stockFree Shipping with Any Purchase!529.000.00799.00http://statTest.dealtime.com/DealFrame/DealFrame.cmp?bm=647&BEFID=7185&aon=%5E1&MerchantID=475674&crawler_id=475674&dealId=-ZW6BMZqz6fbS-aULwga_g%3D%3D&url=http%3A%2F%2Fwww.fumfie.com%2Fproduct%2F343.5%2Fshopping-com%3F&linkin_id=7000610&Issdt=111021183845&searchID=p2.a121bc2aaf029435dce6&DealName=Nikon+D3100+Digital+SLR+Camera+with+18-55mm+NIKKOR+VR+Lens&dlprc=529.0&crn=&istrsmrc=1&isathrsl=0&AR=1&NG=20&NDP=200&PN=1&ST=7&DB=sdcprod&MT=phx-pkadudc2&FPT=DSP&NDS=&NMS=&MRS=&PD=101677489&brnId=14804&IsFtr=0&IsSmart=0&DMT=&op=&CM=&DlLng=1&RR=1&cid=&semid1=&semid2=&IsLps=0&CC=1&SL=1&FS=1&code=&acode=658&category=&HasLink=&frameId=&ND=&MN=&PT=&prjID=&GR=&lnkId=&VK=FumFiehttp://img.shopping.com/cctool/merch_logos/475674.gif866 666 91985604.27http://img.shopping.com/sc/mr/sdc_checks_45.gifhttp://www.shopping.com/xMR-store_fumfie~MRD-475674~S-1~linkin_id-7000610http://img.shopping.com/sc/glb/flag/US.gifUSF343C5Nikon Nikon D3100 14.2MP Digital SLR Camera with 18-55mm f/3.5-5.6 AF-S DX VR, CamerasNikon D3100 14.2MP Digital SLR Camera with 18-55mm f/3.5-5.6 AF-S DX VR7185Nikonhttp://di109.shopping.com/images/di/6d/64/31/65396c443876644f7534464851664a714b6e67-100x100-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=2http://di109.shopping.com/images/di/6d/64/31/65396c443876644f7534464851664a714b6e67-200x200-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=2http://di109.shopping.com/images/di/6d/64/31/65396c443876644f7534464851664a714b6e67-300x300-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=2http://img.shopping.com/sc/ds/no_image_100X100.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=2http://di109.shopping.com/images/di/6d/64/31/65396c443876644f7534464851664a714b6e67-385x352-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=2in-stock549.000.00549.00http://statTest.dealtime.com/DealFrame/DealFrame.cmp?bm=779&BEFID=7185&aon=%5E1&MerchantID=305814&crawler_id=305814&dealId=md1e9lD8vdOu4FHQfJqKng%3D%3D&url=http%3A%2F%2Fwww.electronics-expo.com%2Findex.php%3Fpage%3Ditem%26id%3DNIKD3100%26source%3DSideCar%26scpid%3D8%26scid%3Dscsho318727%26&linkin_id=7000610&Issdt=111021183845&searchID=p2.a121bc2aaf029435dce6&DealName=Nikon+Nikon+D3100+14.2MP+Digital+SLR+Camera+with+18-55mm+f%2F3.5-5.6+AF-S+DX+VR%2C+Cameras&dlprc=549.0&crn=&istrsmrc=1&isathrsl=0&AR=9&NG=20&NDP=200&PN=1&ST=7&DB=sdcprod&MT=phx-pkadudc2&FPT=DSP&NDS=&NMS=&MRS=&PD=101677489&brnId=14804&IsFtr=0&IsSmart=0&DMT=&op=&CM=&DlLng=1&RR=9&cid=&semid1=&semid2=&IsLps=0&CC=0&SL=0&FS=1&code=&acode=771&category=&HasLink=&frameId=&ND=&MN=&PT=&prjID=&GR=&lnkId=&VK=Electronics Expohttp://img.shopping.com/cctool/merch_logos/305814.gif1-888-707-EXPO3713.90http://img.shopping.com/sc/mr/sdc_checks_4.gifhttp://www.shopping.com/xMR-store_electronics_expo~MRD-305814~S-1~linkin_id-7000610http://img.shopping.com/sc/glb/flag/US.gifUSNIKD3100Nikon D3100 14.2-Megapixel Digital SLR Camera With 18-55mm Zoom-Nikkor Lens, BlackSplit-second shutter response captures shots other cameras may have missed Helps eliminate the frustration of shutter delay! 14.2-megapixels for enlargements worth framing and hanging. Takes breathtaking 1080p HD movies. ISO sensitivity from 100-1600 for bright or dimly lit settings. 3.0in. color LCD for beautiful, wide-angle framing and viewing. In-camera image editing lets you retouch with no PC. Automatic scene modes include Child, Sports, Night Portrait and more. Accepts SDHC memory cards. Nikon D3100 14.2-Megapixel Digital SLR Camera With 18-55mm Zoom-Nikkor Lens, Black is one of many Digital SLR Cameras available through Office Depot. Made by Nikon.7185Nikonhttp://di109.shopping.com/images/di/79/59/75/61586e4446744359377244556a6b5932616177-100x100-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=3http://di109.shopping.com/images/di/79/59/75/61586e4446744359377244556a6b5932616177-200x200-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=3http://img.shopping.com/sc/ds/no_image_100X100.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=3http://img.shopping.com/sc/ds/no_image_100X100.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=3http://di109.shopping.com/images/di/79/59/75/61586e4446744359377244556a6b5932616177-250x250-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=3in-stock549.990.00699.99http://statTest.dealtime.com/DealFrame/DealFrame.cmp?bm=698&BEFID=7185&aon=%5E1&MerchantID=467671&crawler_id=467671&dealId=yYuaXnDFtCY7rDUjkY2aaw%3D%3D&url=http%3A%2F%2Flink.mercent.com%2Fredirect.ashx%3Fmr%3AmerchantID%3DOfficeDepot%26mr%3AtrackingCode%3DCEC9669E-6ABC-E011-9F24-0019B9C043EB%26mr%3AtargetUrl%3Dhttp%3A%2F%2Fwww.officedepot.com%2Fa%2Fproducts%2F486292%2FNikon-D3100-142-Megapixel-Digital-SLR%2F%253fcm_mmc%253dMercent-_-Shopping-_-Cameras_and_Camcorders-_-486292&linkin_id=7000610&Issdt=111021183845&searchID=p2.a121bc2aaf029435dce6&DealName=Nikon+D3100+14.2-Megapixel+Digital+SLR+Camera+With+18-55mm+Zoom-Nikkor+Lens%2C+Black&dlprc=549.99&crn=&istrsmrc=1&isathrsl=0&AR=10&NG=20&NDP=200&PN=1&ST=7&DB=sdcprod&MT=phx-pkadudc2&FPT=DSP&NDS=&NMS=&MRS=&PD=101677489&brnId=14804&IsFtr=0&IsSmart=0&DMT=&op=&CM=&DlLng=1&RR=10&cid=&semid1=&semid2=&IsLps=0&CC=1&SL=1&FS=1&code=&acode=690&category=&HasLink=&frameId=&ND=&MN=&PT=&prjID=&GR=&lnkId=&VK=Office Depothttp://img.shopping.com/cctool/merch_logos/467671.gif1-800-GO-DEPOT1352.37http://img.shopping.com/sc/mr/sdc_checks_25.gifhttp://www.shopping.com/xMR-store_office_depot_4158555~MRD-467671~S-1~linkin_id-7000610http://img.shopping.com/sc/glb/flag/US.gifUS486292Nikon® D3100™ 14.2MP Digital SLR with 18-55mm LensThe Nikon D3100 DSLR will surprise you with its simplicity and impress you with superb results.7185Nikonhttp://di103.shopping.com/images/di/52/6c/35/36553743756954597348344d475a30326c7851-100x100-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=4http://di103.shopping.com/images/di/52/6c/35/36553743756954597348344d475a30326c7851-200x200-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=4http://img.shopping.com/sc/ds/no_image_100X100.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=4http://img.shopping.com/sc/ds/no_image_100X100.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=4http://di103.shopping.com/images/di/52/6c/35/36553743756954597348344d475a30326c7851-220x220-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=4in-stock549.996.05549.99http://statTest.dealtime.com/DealFrame/DealFrame.cmp?bm=504&BEFID=7185&aon=%5E1&MerchantID=332477&crawler_id=332477&dealId=Rl56U7CuiTYsH4MGZ02lxQ%3D%3D&url=http%3A%2F%2Ftracking.searchmarketing.com%2Fgsic.asp%3Faid%3D903483107%26&linkin_id=7000610&Issdt=111021183845&searchID=p2.a121bc2aaf029435dce6&DealName=Nikon%C2%AE+D3100%E2%84%A2+14.2MP+Digital+SLR+with+18-55mm+Lens&dlprc=549.99&crn=&istrsmrc=0&isathrsl=0&AR=11&NG=20&NDP=200&PN=1&ST=7&DB=sdcprod&MT=phx-pkadudc2&FPT=DSP&NDS=&NMS=&MRS=&PD=101677489&brnId=14804&IsFtr=0&IsSmart=0&DMT=&op=&CM=&DlLng=1&RR=11&cid=&semid1=&semid2=&IsLps=0&CC=0&SL=0&FS=0&code=&acode=496&category=&HasLink=&frameId=&ND=&MN=&PT=&prjID=&GR=&lnkId=&VK=RadioShackhttp://img.shopping.com/cctool/merch_logos/332477.gif242.25http://img.shopping.com/sc/mr/sdc_checks_25.gifhttp://www.shopping.com/xMR-store_radioshack_9689~MRD-332477~S-1~linkin_id-7000610http://img.shopping.com/sc/glb/flag/US.gifUS9614867Nikon D3100 SLR w/Nikon 18-55mm VR & 55-200mm VR Lenses14.2 Megapixels3" LCDLive ViewHD 1080p Video w/ Sound & Autofocus11-point Autofocus3 Frames per Second ShootingISO 100 to 3200 (Expand to 12800-Hi2)Self Cleaning SensorEXPEED 2, Image Processing EngineScene Recognition System7185Nikonhttp://di105.shopping.com/images/di/68/75/53/36785a4b444b614b4d544d5037316549364441-100x100-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=5http://di105.shopping.com/images/di/68/75/53/36785a4b444b614b4d544d5037316549364441-200x200-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=5http://di105.shopping.com/images/di/68/75/53/36785a4b444b614b4d544d5037316549364441-300x300-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=5http://img.shopping.com/sc/ds/no_image_100X100.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=5http://di105.shopping.com/images/di/68/75/53/36785a4b444b614b4d544d5037316549364441-345x345-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=5in-stock695.000.00695.00http://statTest.dealtime.com/DealFrame/DealFrame.cmp?bm=371&BEFID=7185&aon=%5E1&MerchantID=487342&crawler_id=487342&dealId=huS6xZKDKaKMTMP71eI6DA%3D%3D&url=http%3A%2F%2Fwww.rythercamera.com%2Fcatalog%2Fproduct_info.php%3Fcsv%3Dsh%26products_id%3D32983%26&linkin_id=7000610&Issdt=111021183845&searchID=p2.a121bc2aaf029435dce6&DealName=Nikon+D3100+SLR+w%2FNikon+18-55mm+VR+%26+55-200mm+VR+Lenses&dlprc=695.0&crn=&istrsmrc=0&isathrsl=0&AR=15&NG=20&NDP=200&PN=1&ST=7&DB=sdcprod&MT=phx-pkadudc2&FPT=DSP&NDS=&NMS=&MRS=&PD=101677489&brnId=14804&IsFtr=0&IsSmart=0&DMT=&op=&CM=&DlLng=1&RR=15&cid=&semid1=&semid2=&IsLps=0&CC=0&SL=0&FS=1&code=&acode=379&category=&HasLink=&frameId=&ND=&MN=&PT=&prjID=&GR=&lnkId=&VK=RytherCamera.comhttp://img.shopping.com/cctool/merch_logos/487342.gif1-877-644-75930http://img.shopping.com/sc/glb/flag/US.gifUS32983Nikon COOLPIX S203 Digital Camera10 Megapixel, Ultra-Compact Camera, 2.5 in. LCD Screen, 3x Optical Zoom, With Video Capability, Weight: 0.23 lb.With 10.34 mega pixel, electronic VR vibration reduction, 5-level brightness adjustment, 3x optical zoom, and TFT LCD, Nikon Coolpix s203 fulfills all the demands of any photographer. The digital camera has an inbuilt memory of 44MB and an external memory slot made for all kinds of SD (Secure Digital) cards.http://di1.shopping.com/images/pi/c4/ef/1b/95397883-100x100-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=2&c=1&l=7000610&t=111021183845&r=2http://di1.shopping.com/images/pi/c4/ef/1b/95397883-200x200-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=2&c=1&l=7000610&t=111021183845&r=2http://di1.shopping.com/images/pi/c4/ef/1b/95397883-300x300-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=2&c=1&l=7000610&t=111021183845&r=2http://di1.shopping.com/images/pi/c4/ef/1b/95397883-400x400-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=2&c=1&l=7000610&t=111021183845&r=2http://di1.shopping.com/images/pi/c4/ef/1b/95397883-500x499-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=2&c=1&l=7000610&t=111021183845&r=20139.00139.00http://www.shopping.com/Nikon-Coolpix-S203/prices~linkin_id-7000610http://www.shopping.com/Nikon-Coolpix-S203/info~linkin_id-7000610Nikon Coolpix S203 Digital Camera (Red)With 10.34 mega pixel, electronic VR vibration reduction, 5-level brightness adjustment, 3x optical zoom, and TFT LCD, Nikon Coolpix s203 fulfills all the demands of any photographer. The digital camera has an inbuilt memory of 44MB and an external memory slot made for all kinds of SD (Secure Digital) cards.7185Nikonhttp://di108.shopping.com/images/di/73/42/64/324a6e4945504d2d415f6c42414d31525a6751-100x100-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=1http://di108.shopping.com/images/di/73/42/64/324a6e4945504d2d415f6c42414d31525a6751-200x200-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=1http://di108.shopping.com/images/di/73/42/64/324a6e4945504d2d415f6c42414d31525a6751-300x300-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=1http://di108.shopping.com/images/di/73/42/64/324a6e4945504d2d415f6c42414d31525a6751-400x400-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=1http://di108.shopping.com/images/di/73/42/64/324a6e4945504d2d415f6c42414d31525a6751-500x500-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=1in-stockFantastic prices with ease & comfort of Amazon.com!139.009.50139.00http://statTest.dealtime.com/DealFrame/DealFrame.cmp?bm=566&BEFID=7185&aon=%5E1&MerchantID=301531&crawler_id=1903313&dealId=sBd2JnIEPM-A_lBAM1RZgQ%3D%3D&url=http%3A%2F%2Fwww.amazon.com%2Fdp%2FB002T964IM%2Fref%3Dasc_df_B002T964IM1751618%3Fsmid%3DA22UHVNXG98FAT%26tag%3Ddealtime-ce-mp01feed-20%26linkCode%3Dasn%26creative%3D395105%26creativeASIN%3DB002T964IM&linkin_id=7000610&Issdt=111021183845&searchID=p2.a121bc2aaf029435dce6&DealName=Nikon+Coolpix+S203+Digital+Camera+%28Red%29&dlprc=139.0&crn=&istrsmrc=0&isathrsl=0&AR=63&NG=20&NDP=200&PN=1&ST=7&DB=sdcprod&MT=phx-pkadudc2&FPT=DSP&NDS=&NMS=&MRS=&PD=95397883&brnId=14804&IsFtr=0&IsSmart=0&DMT=&op=&CM=&DlLng=1&RR=63&cid=&semid1=&semid2=&IsLps=0&CC=0&SL=0&FS=0&code=&acode=518&category=&HasLink=&frameId=&ND=&MN=&PT=&prjID=&GR=&lnkId=&VK=Amazon Marketplacehttp://img.shopping.com/cctool/merch_logos/301531.gif2132.73http://img.shopping.com/sc/mr/sdc_checks_25.gifhttp://www.shopping.com/xMR-store_amazon_marketplace_9689~MRD-301531~S-1~linkin_id-7000610http://img.shopping.com/sc/glb/flag/US.gifUSB002T964IMNikon S3100 Digital Camera14.5 Megapixel, Compact Camera, 2.7 in. LCD Screen, 5x Optical Zoom, With High Definition Video, Weight: 0.23 lb.This digital camera features a wide-angle optical Zoom-NIKKOR glass lens that allows you to capture anything from landscapes to portraits to action shots. The high-definition movie mode with one-touch recording makes it easy to capture video clips.http://di1.shopping.com/images/pi/66/2d/33/106834268-100x100-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=2&c=1&l=7000610&t=111021183845&r=3http://di1.shopping.com/images/pi/66/2d/33/106834268-200x200-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=2&c=1&l=7000610&t=111021183845&r=3http://di1.shopping.com/images/pi/66/2d/33/106834268-300x300-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=2&c=1&l=7000610&t=111021183845&r=3http://di1.shopping.com/images/pi/66/2d/33/106834268-400x400-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=2&c=1&l=7000610&t=111021183845&r=3http://di1.shopping.com/images/pi/66/2d/33/106834268-507x387-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=2&c=1&l=7000610&t=111021183845&r=312.00http://img.shopping.com/sc/pr/sdc_stars_sm_2.gifhttp://www.shopping.com/nikon-s3100/reviews~linkin_id-700061099.95134.95http://www.shopping.com/nikon-s3100/prices~linkin_id-7000610http://www.shopping.com/nikon-s3100/info~linkin_id-7000610CoolPix S3100 14 Megapixel Compact Digital Camera- RedNikon Coolpix S3100 - Digital camera - compact - 14.0 Mpix - optical zoom: 5 x - supported memory: SD, SDXC, SDHC - red7185Nikonhttp://di111.shopping.com/images/di/55/55/79/476f71563872302d78726b6e2d726e474e6267-100x100-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=1http://di111.shopping.com/images/di/55/55/79/476f71563872302d78726b6e2d726e474e6267-200x200-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=1http://di111.shopping.com/images/di/55/55/79/476f71563872302d78726b6e2d726e474e6267-300x300-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=1http://di111.shopping.com/images/di/55/55/79/476f71563872302d78726b6e2d726e474e6267-400x400-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=1in-stockGet 30 days FREE SHIPPING w/ ShipVantage119.956.95139.95http://statTest.dealtime.com/DealFrame/DealFrame.cmp?bm=578&BEFID=7185&aon=%5E1&MerchantID=485615&crawler_id=485615&dealId=UUyGoqV8r0-xrkn-rnGNbg%3D%3D&url=http%3A%2F%2Fsears.rdr.channelintelligence.com%2Fgo.asp%3FfVhzOGNRAAQIASNiE1NbQBJpFHJ3Yx0CTAICI2BbH1lEFmgKP3QvUVpEREdlfUAUHAQPLVpFTVdtJzxAHUNYW3AhQBM0QhFvEXAbYh8EAAVmDAJeU1oyGG0GcBdhGwUGCAVqYF9SO0xSN1sZdmA7dmMdBQAJB24qX1NbQxI6AjA2ME5dVFULPDsGPFcQTTdaLTA6SR0OFlQvPAwMDxYcYlxIVkcoLTcCDA%3D%3D%26nAID%3D13736960%26&linkin_id=7000610&Issdt=111021183845&searchID=p2.a121bc2aaf029435dce6&DealName=CoolPix+S3100+14+Megapixel+Compact+Digital+Camera-+Red&dlprc=119.95&crn=&istrsmrc=1&isathrsl=0&AR=28&NG=20&NDP=200&PN=1&ST=7&DB=sdcprod&MT=phx-pkadudc2&FPT=DSP&NDS=&NMS=&MRS=&PD=106834268&brnId=14804&IsFtr=0&IsSmart=0&DMT=&op=&CM=&DlLng=1&RR=28&cid=&semid1=&semid2=&IsLps=0&CC=0&SL=1&FS=0&code=&acode=583&category=&HasLink=&frameId=&ND=&MN=&PT=&prjID=&GR=&lnkId=&VK=Searshttp://img.shopping.com/cctool/merch_logos/485615.gif1-800-349-43588882.85http://img.shopping.com/sc/mr/sdc_checks_3.gifhttp://www.shopping.com/xMR-store_sears_4189479~MRD-485615~S-1~linkin_id-7000610http://img.shopping.com/sc/glb/flag/US.gifUS00337013000COOLPIX S3100 PinkNikon Coolpix S3100 - Digital camera - compact - 14.0 Mpix - optical zoom: 5 x - supported memory: SD, SDXC, SDHC - pink7185Nikonhttp://di111.shopping.com/images/di/58/38/37/4177586c573164586f4d586b34515144546f51-100x100-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=2http://di111.shopping.com/images/di/58/38/37/4177586c573164586f4d586b34515144546f51-200x200-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=2http://di111.shopping.com/images/di/58/38/37/4177586c573164586f4d586b34515144546f51-300x300-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=2http://di111.shopping.com/images/di/58/38/37/4177586c573164586f4d586b34515144546f51-400x400-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=2in-stockGet 30 days FREE SHIPPING w/ ShipVantage119.956.95139.95http://statTest.dealtime.com/DealFrame/DealFrame.cmp?bm=578&BEFID=7185&aon=%5E1&MerchantID=485615&crawler_id=485615&dealId=X87AwXlW1dXoMXk4QQDToQ%3D%3D&url=http%3A%2F%2Fsears.rdr.channelintelligence.com%2Fgo.asp%3FfVhzOGNRAAQIASNiE1NbQBJpFHJxYx0CTAICI2BbH1lEFmgKP3QvUVpEREdlfUAUHAQPLVpFTVdtJzxAHUNYW3AhQBM0QhFvEXAbYh8EAAVmb2JcUFxDEGsPc3QDEkFZVQ0WFhdRW0MWbgYWDlxzdGMdAVQWRi0xDAwPFhw9TSobb05eWVVYKzsLTFVVQi5RICs3SA8MU1s2MQQKD1wf%26nAID%3D13736960%26&linkin_id=7000610&Issdt=111021183845&searchID=p2.a121bc2aaf029435dce6&DealName=COOLPIX+S3100+Pink&dlprc=119.95&crn=&istrsmrc=1&isathrsl=0&AR=31&NG=20&NDP=200&PN=1&ST=7&DB=sdcprod&MT=phx-pkadudc2&FPT=DSP&NDS=&NMS=&MRS=&PD=106834268&brnId=14804&IsFtr=0&IsSmart=0&DMT=&op=&CM=&DlLng=1&RR=31&cid=&semid1=&semid2=&IsLps=0&CC=0&SL=1&FS=0&code=&acode=583&category=&HasLink=&frameId=&ND=&MN=&PT=&prjID=&GR=&lnkId=&VK=Searshttp://img.shopping.com/cctool/merch_logos/485615.gif1-800-349-43588882.85http://img.shopping.com/sc/mr/sdc_checks_3.gifhttp://www.shopping.com/xMR-store_sears_4189479~MRD-485615~S-1~linkin_id-7000610http://img.shopping.com/sc/glb/flag/US.gifUS00337015000Nikon Coolpix S3100 14.0 MP Digital Camera - SilverNikon Coolpix S3100 14.0 MP Digital Camera - Silver7185Nikonhttp://di109.shopping.com/images/di/6e/76/46/776e70664134726c413144626b736473613077-100x100-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=3http://di109.shopping.com/images/di/6e/76/46/776e70664134726c413144626b736473613077-200x200-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=3http://img.shopping.com/sc/ds/no_image_100X100.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=3http://img.shopping.com/sc/ds/no_image_100X100.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=3http://di109.shopping.com/images/di/6e/76/46/776e70664134726c413144626b736473613077-270x270-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=3in-stock109.970.00109.97http://statTest.dealtime.com/DealFrame/DealFrame.cmp?bm=803&BEFID=7185&aon=%5E&MerchantID=475774&crawler_id=475774&dealId=nvFwnpfA4rlA1Dbksdsa0w%3D%3D&url=http%3A%2F%2Fwww.thewiz.com%2Fcatalog%2Fproduct.jsp%3FmodelNo%3DS3100SILVER%26gdftrk%3DgdfV2677_a_7c996_a_7c4049_a_7c26262&linkin_id=7000610&Issdt=111021183845&searchID=p2.a121bc2aaf029435dce6&DealName=Nikon+Coolpix+S3100+14.0+MP+Digital+Camera+-+Silver&dlprc=109.97&crn=&istrsmrc=0&isathrsl=0&AR=33&NG=20&NDP=200&PN=1&ST=7&DB=sdcprod&MT=phx-pkadudc2&FPT=DSP&NDS=&NMS=&MRS=&PD=106834268&brnId=14804&IsFtr=0&IsSmart=0&DMT=&op=&CM=&DlLng=1&RR=33&cid=&semid1=&semid2=&IsLps=0&CC=0&SL=0&FS=1&code=&acode=797&category=&HasLink=&frameId=&ND=&MN=&PT=&prjID=&GR=&lnkId=&VK=TheWiz.comhttp://img.shopping.com/cctool/merch_logos/475774.gif877-542-69880http://img.shopping.com/sc/glb/flag/US.gifUS26262Nikon� COOLPIX� S3100 14MP Digital Camera (Silver)The Nikon COOLPIX S3100 is the easy way to share your life and stay connected.7185Nikonhttp://di102.shopping.com/images/di/35/47/74/614e324e6572794b7770732d5365326c2d3467-100x100-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=4http://di102.shopping.com/images/di/35/47/74/614e324e6572794b7770732d5365326c2d3467-200x200-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=4http://img.shopping.com/sc/ds/no_image_100X100.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=4http://img.shopping.com/sc/ds/no_image_100X100.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=4http://di102.shopping.com/images/di/35/47/74/614e324e6572794b7770732d5365326c2d3467-220x220-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=4in-stock119.996.05119.99http://statTest.dealtime.com/DealFrame/DealFrame.cmp?bm=504&BEFID=7185&aon=%5E1&MerchantID=332477&crawler_id=332477&dealId=5GtaN2NeryKwps-Se2l-4g%3D%3D&url=http%3A%2F%2Ftracking.searchmarketing.com%2Fgsic.asp%3Faid%3D848064082%26&linkin_id=7000610&Issdt=111021183845&searchID=p2.a121bc2aaf029435dce6&DealName=Nikon%C3%AF%C2%BF%C2%BD+COOLPIX%C3%AF%C2%BF%C2%BD+S3100+14MP+Digital+Camera+%28Silver%29&dlprc=119.99&crn=&istrsmrc=0&isathrsl=0&AR=37&NG=20&NDP=200&PN=1&ST=7&DB=sdcprod&MT=phx-pkadudc2&FPT=DSP&NDS=&NMS=&MRS=&PD=106834268&brnId=14804&IsFtr=0&IsSmart=0&DMT=&op=&CM=&DlLng=1&RR=37&cid=&semid1=&semid2=&IsLps=0&CC=0&SL=0&FS=0&code=&acode=509&category=&HasLink=&frameId=&ND=&MN=&PT=&prjID=&GR=&lnkId=&VK=RadioShackhttp://img.shopping.com/cctool/merch_logos/332477.gif242.25http://img.shopping.com/sc/mr/sdc_checks_25.gifhttp://www.shopping.com/xMR-store_radioshack_9689~MRD-332477~S-1~linkin_id-7000610http://img.shopping.com/sc/glb/flag/US.gifUS10101095COOLPIX S3100 YellowNikon Coolpix S3100 - Digital camera - compact - 14.0 Mpix - optical zoom: 5 x - supported memory: SD, SDXC, SDHC - yellow7185Nikonhttp://di107.shopping.com/images/di/61/34/33/6d305258756c5833387a436e516a5535396a77-100x100-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=5http://di107.shopping.com/images/di/61/34/33/6d305258756c5833387a436e516a5535396a77-200x200-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=5http://di107.shopping.com/images/di/61/34/33/6d305258756c5833387a436e516a5535396a77-300x300-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=5http://di107.shopping.com/images/di/61/34/33/6d305258756c5833387a436e516a5535396a77-400x400-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=5in-stockGet 30 days FREE SHIPPING w/ ShipVantage119.956.95139.95http://statTest.dealtime.com/DealFrame/DealFrame.cmp?bm=578&BEFID=7185&aon=%5E1&MerchantID=485615&crawler_id=485615&dealId=a43m0RXulX38zCnQjU59jw%3D%3D&url=http%3A%2F%2Fsears.rdr.channelintelligence.com%2Fgo.asp%3FfVhzOGNRAAQIASNiE1NbQBJpFHJwYx0CTAICI2BbH1lEFmgKP3QvUVpEREdlfUAUHAQPLVpFTVdtJzxAHUNYW3AhQBM0QhFvEXAbYh8EAAVmb2JcUFxDEGoPc3QDEkFZVQ0WFhdRW0MWbgYWDlxzdGMdAVQWRi0xDAwPFhw9TSobb05eWVVYKzsLTFVVQi5RICs3SA8MU1s2MQQKD1wf%26nAID%3D13736960%26&linkin_id=7000610&Issdt=111021183845&searchID=p2.a121bc2aaf029435dce6&DealName=COOLPIX+S3100+Yellow&dlprc=119.95&crn=&istrsmrc=1&isathrsl=0&AR=38&NG=20&NDP=200&PN=1&ST=7&DB=sdcprod&MT=phx-pkadudc2&FPT=DSP&NDS=&NMS=&MRS=&PD=106834268&brnId=14804&IsFtr=0&IsSmart=0&DMT=&op=&CM=&DlLng=1&RR=38&cid=&semid1=&semid2=&IsLps=0&CC=0&SL=1&FS=0&code=&acode=583&category=&HasLink=&frameId=&ND=&MN=&PT=&prjID=&GR=&lnkId=&VK=Searshttp://img.shopping.com/cctool/merch_logos/485615.gif1-800-349-43588882.85http://img.shopping.com/sc/mr/sdc_checks_3.gifhttp://www.shopping.com/xMR-store_sears_4189479~MRD-485615~S-1~linkin_id-7000610http://img.shopping.com/sc/glb/flag/US.gifUS00337014000Nikon D90 Digital Camera12.3 Megapixel, Point and Shoot Camera, 3 in. LCD Screen, With Video Capability, Weight: 1.36 lb.Untitled Document Nikon D90 SLR Digital Camera With 28-80mm 75-300mm Lens Kit The Nikon D90 SLR Digital Camera, with its 12.3-megapixel DX-format CMOS, 3" High resolution LCD display, Scene Recognition System, Picture Control, Active D-Lighting, and one-button Live View, provides photo enthusiasts with the image quality and performance they need to pursue their own vision while still being intuitive enough for use as an everyday camera.http://di1.shopping.com/images/pi/52/fb/d3/99671132-100x100-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=2&c=1&l=7000610&t=111021183845&r=4http://di1.shopping.com/images/pi/52/fb/d3/99671132-200x200-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=2&c=1&l=7000610&t=111021183845&r=4http://di1.shopping.com/images/pi/52/fb/d3/99671132-300x300-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=2&c=1&l=7000610&t=111021183845&r=4http://di1.shopping.com/images/pi/52/fb/d3/99671132-400x400-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=2&c=1&l=7000610&t=111021183845&r=4http://di1.shopping.com/images/pi/52/fb/d3/99671132-499x255-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=2&c=1&l=7000610&t=111021183845&r=475.00http://img.shopping.com/sc/pr/sdc_stars_sm_5.gifhttp://www.shopping.com/Nikon-D90-with-18-270mm-Lens/reviews~linkin_id-7000610689.002299.00http://www.shopping.com/Nikon-D90-with-18-270mm-Lens/prices~linkin_id-7000610http://www.shopping.com/Nikon-D90-with-18-270mm-Lens/info~linkin_id-7000610Nikon® D90 12.3MP Digital SLR Camera (Body Only)The Nikon D90 will make you rethink what a digital SLR camera can achieve.7185Nikonhttp://di106.shopping.com/images/di/47/55/35/4a4a6b70554178653548756a4237666b774141-100x100-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=1http://di106.shopping.com/images/di/47/55/35/4a4a6b70554178653548756a4237666b774141-200x200-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=1http://img.shopping.com/sc/ds/no_image_100X100.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=1http://img.shopping.com/sc/ds/no_image_100X100.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=1http://di106.shopping.com/images/di/47/55/35/4a4a6b70554178653548756a4237666b774141-220x220-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=1in-stock1015.996.051015.99http://statTest.dealtime.com/DealFrame/DealFrame.cmp?bm=504&BEFID=7185&aon=%5E1&MerchantID=332477&crawler_id=332477&dealId=GU5JJkpUAxe5HujB7fkwAA%3D%3D&url=http%3A%2F%2Ftracking.searchmarketing.com%2Fgsic.asp%3Faid%3D851830266%26&linkin_id=7000610&Issdt=111021183845&searchID=p2.a121bc2aaf029435dce6&DealName=Nikon%C2%AE+D90+12.3MP+Digital+SLR+Camera+%28Body+Only%29&dlprc=1015.99&crn=&istrsmrc=0&isathrsl=0&AR=14&NG=20&NDP=200&PN=1&ST=7&DB=sdcprod&MT=phx-pkadudc2&FPT=DSP&NDS=&NMS=&MRS=&PD=99671132&brnId=14804&IsFtr=0&IsSmart=0&DMT=&op=&CM=&DlLng=1&RR=14&cid=&semid1=&semid2=&IsLps=0&CC=0&SL=0&FS=0&code=&acode=496&category=&HasLink=&frameId=&ND=&MN=&PT=&prjID=&GR=&lnkId=&VK=RadioShackhttp://img.shopping.com/cctool/merch_logos/332477.gif242.25http://img.shopping.com/sc/mr/sdc_checks_25.gifhttp://www.shopping.com/xMR-store_radioshack_9689~MRD-332477~S-1~linkin_id-7000610http://img.shopping.com/sc/glb/flag/US.gifUS10148659Nikon D90 SLR Digital Camera (Camera Body)The Nikon D90 SLR Digital Camera with its 12.3-megapixel DX-format CCD 3" High resolution LCD display Scene Recognition System Picture Control Active D-Lighting and one-button Live View provides photo enthusiasts with the image quality and performance they need to pursue their own vision while still being intuitive enough for use as an everyday camera. In addition the D90 introduces the D-Movie mode allowing for the first time an interchangeable lens SLR camera that is capable of recording 720p HD movie clips. Availabilty: In Stock7185Nikonhttp://di109.shopping.com/images/di/58/68/55/527553432d73704262544944666f3471667a51-100x100-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=2http://di109.shopping.com/images/di/58/68/55/527553432d73704262544944666f3471667a51-200x200-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=2http://di109.shopping.com/images/di/58/68/55/527553432d73704262544944666f3471667a51-300x300-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=2http://img.shopping.com/sc/ds/no_image_100X100.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=2http://di109.shopping.com/images/di/58/68/55/527553432d73704262544944666f3471667a51-350x350-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=2in-stockFree Shipping with Any Purchase!689.000.00900.00http://statTest.dealtime.com/DealFrame/DealFrame.cmp?bm=647&BEFID=7185&aon=%5E1&MerchantID=475674&crawler_id=475674&dealId=XhURuSC-spBbTIDfo4qfzQ%3D%3D&url=http%3A%2F%2Fwww.fumfie.com%2Fproduct%2F169.5%2Fshopping-com%3F&linkin_id=7000610&Issdt=111021183845&searchID=p2.a121bc2aaf029435dce6&DealName=Nikon+D90+SLR+Digital+Camera+%28Camera+Body%29&dlprc=689.0&crn=&istrsmrc=1&isathrsl=0&AR=16&NG=20&NDP=200&PN=1&ST=7&DB=sdcprod&MT=phx-pkadudc2&FPT=DSP&NDS=&NMS=&MRS=&PD=99671132&brnId=14804&IsFtr=0&IsSmart=0&DMT=&op=&CM=&DlLng=1&RR=16&cid=&semid1=&semid2=&IsLps=0&CC=1&SL=1&FS=1&code=&acode=658&category=&HasLink=&frameId=&ND=&MN=&PT=&prjID=&GR=&lnkId=&VK=FumFiehttp://img.shopping.com/cctool/merch_logos/475674.gif866 666 91985604.27http://img.shopping.com/sc/mr/sdc_checks_45.gifhttp://www.shopping.com/xMR-store_fumfie~MRD-475674~S-1~linkin_id-7000610http://img.shopping.com/sc/glb/flag/US.gifUSF169C5Nikon D90 SLR w/Nikon 18-105mm VR & 55-200mm VR Lenses12.3 MegapixelDX Format CMOS Sensor3" VGA LCD DisplayLive ViewSelf Cleaning SensorD-Movie ModeHigh Sensitivity (ISO 3200)4.5 fps BurstIn-Camera Image Editing7185Nikonhttp://di101.shopping.com/images/di/6f/30/50/785f584c5744627278415952793372436d7951-100x100-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=3http://di101.shopping.com/images/di/6f/30/50/785f584c5744627278415952793372436d7951-200x200-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=3http://di101.shopping.com/images/di/6f/30/50/785f584c5744627278415952793372436d7951-300x300-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=3http://di101.shopping.com/images/di/6f/30/50/785f584c5744627278415952793372436d7951-400x400-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=3http://di101.shopping.com/images/di/6f/30/50/785f584c5744627278415952793372436d7951-500x500-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=3in-stock1189.000.001189.00http://statTest.dealtime.com/DealFrame/DealFrame.cmp?bm=371&BEFID=7185&aon=%5E1&MerchantID=487342&crawler_id=487342&dealId=o0Px_XLWDbrxAYRy3rCmyQ%3D%3D&url=http%3A%2F%2Fwww.rythercamera.com%2Fcatalog%2Fproduct_info.php%3Fcsv%3Dsh%26products_id%3D30619%26&linkin_id=7000610&Issdt=111021183845&searchID=p2.a121bc2aaf029435dce6&DealName=Nikon+D90+SLR+w%2FNikon+18-105mm+VR+%26+55-200mm+VR+Lenses&dlprc=1189.0&crn=&istrsmrc=0&isathrsl=0&AR=20&NG=20&NDP=200&PN=1&ST=7&DB=sdcprod&MT=phx-pkadudc2&FPT=DSP&NDS=&NMS=&MRS=&PD=99671132&brnId=14804&IsFtr=0&IsSmart=0&DMT=&op=&CM=&DlLng=1&RR=20&cid=&semid1=&semid2=&IsLps=0&CC=0&SL=0&FS=1&code=&acode=379&category=&HasLink=&frameId=&ND=&MN=&PT=&prjID=&GR=&lnkId=&VK=RytherCamera.comhttp://img.shopping.com/cctool/merch_logos/487342.gif1-877-644-75930http://img.shopping.com/sc/glb/flag/US.gifUS30619Nikon D90 12.3 Megapixel Digital SLR Camera (Body Only)Fusing 12.3 megapixel image quality and a cinematic 24fps D-Movie Mode, the Nikon D90 exceeds the demands of passionate photographers. Coupled with Nikon's EXPEED image processing technologies and NIKKOR optics, breathtaking image fidelity is assured. Combined with fast 0.15ms power-up and split-second 65ms shooting lag, dramatic action and decisive moments are captured easily. Effective 4-frequency, ultrasonic sensor cleaning frees image degrading dust particles from the sensor's optical low pass filter.7185Nikonhttp://di110.shopping.com/images/di/34/48/67/62574a534a3873736749663842304d58497741-100x100-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=4http://di110.shopping.com/images/di/34/48/67/62574a534a3873736749663842304d58497741-200x200-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=4http://di110.shopping.com/images/di/34/48/67/62574a534a3873736749663842304d58497741-300x300-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=4in-stockFREE FEDEX 2-3 DAY DELIVERY899.950.00899.95http://statTest.dealtime.com/DealFrame/DealFrame.cmp?bm=269&BEFID=7185&aon=%5E&MerchantID=9296&crawler_id=811558&dealId=4HgbWJSJ8ssgIf8B0MXIwA%3D%3D&url=http%3A%2F%2Fwww.pcnation.com%2Foptics-gallery%2Fdetails.asp%3Faffid%3D305%26item%3D2N145P&linkin_id=7000610&Issdt=111021183845&searchID=p2.a121bc2aaf029435dce6&DealName=Nikon+D90+12.3+Megapixel+Digital+SLR+Camera+%28Body+Only%29&dlprc=899.95&crn=&istrsmrc=1&isathrsl=0&AR=21&NG=20&NDP=200&PN=1&ST=7&DB=sdcprod&MT=phx-pkadudc2&FPT=DSP&NDS=&NMS=&MRS=&PD=99671132&brnId=14804&IsFtr=0&IsSmart=0&DMT=&op=&CM=&DlLng=1&RR=21&cid=&semid1=&semid2=&IsLps=0&CC=0&SL=0&FS=1&code=&acode=257&category=&HasLink=&frameId=&ND=&MN=&PT=&prjID=&GR=&lnkId=&VK=PCNationhttp://img.shopping.com/cctool/merch_logos/9296.gif800-470-707916224.43http://img.shopping.com/sc/mr/sdc_checks_45.gifhttp://www.shopping.com/xMR-store_pcnation_9689~MRD-9296~S-1~linkin_id-7000610http://img.shopping.com/sc/glb/flag/US.gifUS2N145PNikon D90 12.3MP Digital SLR Camera (Body Only)Fusing 12.3-megapixel image quality inherited from the award-winning D300 with groundbreaking features, the D90's breathtaking, low-noise image quality is further advanced with EXPEED image processing. Split-second shutter response and continuous shooting at up to 4.5 frames-per-second provide the power to capture fast action and precise moments perfectly, while Nikon's exclusive Scene Recognition System contributes to faster 11-area autofocus performance, finer white balance detection and more. The D90 delivers the control passionate photographers demand, utilizing comprehensive exposure functions and the intelligence of 3D Color Matrix Metering II. Stunning results come to life on a 3-inch 920,000-dot color LCD monitor, providing accurate image review, Live View composition and brilliant playback of the D90's cinematic-quality 24-fps HD D-Movie mode.7185Nikonhttp://di102.shopping.com/images/di/55/4e/44/6133754d445a584f6e76445f377354494c5967-100x100-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=5http://di102.shopping.com/images/di/55/4e/44/6133754d445a584f6e76445f377354494c5967-200x200-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=5http://di102.shopping.com/images/di/55/4e/44/6133754d445a584f6e76445f377354494c5967-300x300-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=5http://di102.shopping.com/images/di/55/4e/44/6133754d445a584f6e76445f377354494c5967-400x400-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=5http://di102.shopping.com/images/di/55/4e/44/6133754d445a584f6e76445f377354494c5967-500x500-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=5in-stockFantastic prices with ease & comfort of Amazon.com!780.000.00780.00http://statTest.dealtime.com/DealFrame/DealFrame.cmp?bm=566&BEFID=7185&aon=%5E1&MerchantID=301531&crawler_id=1903313&dealId=UNDa3uMDZXOnvD_7sTILYg%3D%3D&url=http%3A%2F%2Fwww.amazon.com%2Fdp%2FB001ET5U92%2Fref%3Dasc_df_B001ET5U921751618%3Fsmid%3DAHF4SYKP09WBH%26tag%3Ddealtime-ce-mp01feed-20%26linkCode%3Dasn%26creative%3D395105%26creativeASIN%3DB001ET5U92&linkin_id=7000610&Issdt=111021183845&searchID=p2.a121bc2aaf029435dce6&DealName=Nikon+D90+12.3MP+Digital+SLR+Camera+%28Body+Only%29&dlprc=780.0&crn=&istrsmrc=0&isathrsl=0&AR=29&NG=20&NDP=200&PN=1&ST=7&DB=sdcprod&MT=phx-pkadudc2&FPT=DSP&NDS=&NMS=&MRS=&PD=99671132&brnId=14804&IsFtr=0&IsSmart=0&DMT=&op=&CM=&DlLng=1&RR=29&cid=&semid1=&semid2=&IsLps=0&CC=0&SL=0&FS=1&code=&acode=520&category=&HasLink=&frameId=&ND=&MN=&PT=&prjID=&GR=&lnkId=&VK=Amazon Marketplacehttp://img.shopping.com/cctool/merch_logos/301531.gif2132.73http://img.shopping.com/sc/mr/sdc_checks_25.gifhttp://www.shopping.com/xMR-store_amazon_marketplace_9689~MRD-301531~S-1~linkin_id-7000610http://img.shopping.com/sc/glb/flag/US.gifUSB001ET5U92Nikon D90 Digital Camera with 18-105mm lens12.9 Megapixel, SLR Camera, 3 in. LCD Screen, 5.8x Optical Zoom, With Video Capability, Weight: 2.3 lb.Its 12.3 megapixel DX-format CMOS image sensor and EXPEED image processing system offer outstanding image quality across a wide ISO light sensitivity range. Live View mode lets you compose and shoot via the high-resolution 3-inch LCD monitor, and an advanced Scene Recognition System and autofocus performance help capture images with astounding accuracy. Movies can be shot in Motion JPEG format using the D-Movie function. The camera’s large image sensor ensures exceptional movie image quality and you can create dramatic effects by shooting with a wide range of interchangeable NIKKOR lenses, from wide-angle to macro to fisheye, or by adjusting the lens aperture and experimenting with depth-of-field. The D90 – designed to fuel your passion for photography.http://di1.shopping.com/images/pi/57/6a/4f/70621646-100x100-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=2&c=1&l=7000610&t=111021183845&r=5http://di1.shopping.com/images/pi/57/6a/4f/70621646-200x200-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=2&c=1&l=7000610&t=111021183845&r=5http://di1.shopping.com/images/pi/57/6a/4f/70621646-300x300-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=2&c=1&l=7000610&t=111021183845&r=5http://di1.shopping.com/images/pi/57/6a/4f/70621646-400x400-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=2&c=1&l=7000610&t=111021183845&r=5http://di1.shopping.com/images/pi/57/6a/4f/70621646-490x489-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=2&c=1&l=7000610&t=111021183845&r=5324.81http://img.shopping.com/sc/pr/sdc_stars_sm_5.gifhttp://www.shopping.com/Nikon-D90-with-18-105mm-lens/reviews~linkin_id-7000610849.951599.95http://www.shopping.com/Nikon-D90-with-18-105mm-lens/prices~linkin_id-7000610http://www.shopping.com/Nikon-D90-with-18-105mm-lens/info~linkin_id-7000610Nikon D90 18-105mm VR LensThe Nikon D90 SLR Digital Camera with its 12.3-megapixel DX-format CMOS 3" High resolution LCD display Scene Recognition System Picture Control Active D-Lighting and one-button Live View prov7185Nikonhttp://di111.shopping.com/images/di/33/6f/35/6531566768674a5066684c7654314a464b5441-100x100-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=1http://di111.shopping.com/images/di/33/6f/35/6531566768674a5066684c7654314a464b5441-200x200-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=1http://img.shopping.com/sc/ds/no_image_100X100.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=1http://img.shopping.com/sc/ds/no_image_100X100.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=1http://di111.shopping.com/images/di/33/6f/35/6531566768674a5066684c7654314a464b5441-260x260-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=1in-stock849.950.00849.95http://statTest.dealtime.com/DealFrame/DealFrame.cmp?bm=419&BEFID=7185&aon=%5E1&MerchantID=9390&crawler_id=1905054&dealId=3o5e1VghgJPfhLvT1JFKTA%3D%3D&url=http%3A%2F%2Fwww.ajrichard.com%2FNikon-D90-18-105mm-VR-Lens%2Fp-292%3Frefid%3DShopping%26&linkin_id=7000610&Issdt=111021183845&searchID=p2.a121bc2aaf029435dce6&DealName=Nikon+D90+18-105mm+VR+Lens&dlprc=849.95&crn=&istrsmrc=0&isathrsl=0&AR=2&NG=20&NDP=200&PN=1&ST=7&DB=sdcprod&MT=phx-pkadudc2&FPT=DSP&NDS=&NMS=&MRS=&PD=70621646&brnId=14804&IsFtr=0&IsSmart=0&DMT=&op=&CM=&DlLng=1&RR=2&cid=&semid1=&semid2=&IsLps=0&CC=0&SL=0&FS=1&code=&acode=425&category=&HasLink=&frameId=&ND=&MN=&PT=&prjID=&GR=&lnkId=&VK=AJRichardhttp://img.shopping.com/cctool/merch_logos/9390.gif1-888-871-125631244.48http://img.shopping.com/sc/mr/sdc_checks_45.gifhttp://www.shopping.com/xMR-store_ajrichard~MRD-9390~S-1~linkin_id-7000610http://img.shopping.com/sc/glb/flag/US.gifUS292Nikon D90 SLR w/Nikon 18-105mm VR Lens12.3 MegapixelDX Format CMOS Sensor3" VGA LCD DisplayLive ViewSelf Cleaning SensorD-Movie ModeHigh Sensitivity (ISO 3200)4.5 fps BurstIn-Camera Image Editing7185Nikonhttp://di108.shopping.com/images/di/5f/6c/59/576a5f6a62776673536b666377556344757777-100x100-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=2http://di108.shopping.com/images/di/5f/6c/59/576a5f6a62776673536b666377556344757777-200x200-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=2http://di108.shopping.com/images/di/5f/6c/59/576a5f6a62776673536b666377556344757777-300x300-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=2http://di108.shopping.com/images/di/5f/6c/59/576a5f6a62776673536b666377556344757777-400x400-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=2http://di108.shopping.com/images/di/5f/6c/59/576a5f6a62776673536b666377556344757777-500x500-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=2in-stock909.000.00909.00http://statTest.dealtime.com/DealFrame/DealFrame.cmp?bm=371&BEFID=7185&aon=%5E1&MerchantID=487342&crawler_id=487342&dealId=_lYWj_jbwfsSkfcwUcDuww%3D%3D&url=http%3A%2F%2Fwww.rythercamera.com%2Fcatalog%2Fproduct_info.php%3Fcsv%3Dsh%26products_id%3D30971%26&linkin_id=7000610&Issdt=111021183845&searchID=p2.a121bc2aaf029435dce6&DealName=Nikon+D90+SLR+w%2FNikon+18-105mm+VR+Lens&dlprc=909.0&crn=&istrsmrc=0&isathrsl=0&AR=3&NG=20&NDP=200&PN=1&ST=7&DB=sdcprod&MT=phx-pkadudc2&FPT=DSP&NDS=&NMS=&MRS=&PD=70621646&brnId=14804&IsFtr=0&IsSmart=0&DMT=&op=&CM=&DlLng=1&RR=3&cid=&semid1=&semid2=&IsLps=0&CC=0&SL=0&FS=1&code=&acode=379&category=&HasLink=&frameId=&ND=&MN=&PT=&prjID=&GR=&lnkId=&VK=RytherCamera.comhttp://img.shopping.com/cctool/merch_logos/487342.gif1-877-644-75930http://img.shopping.com/sc/glb/flag/US.gifUS3097125448/D90 12.3 Megapixel Digital Camera 18-105mm Zoom Lens w/ 3" Screen - BlackNikon D90 - Digital camera - SLR - 12.3 Mpix - Nikon AF-S DX 18-105mm lens - optical zoom: 5.8 x - supported memory: SD, SDHC7185Nikonhttp://di110.shopping.com/images/di/31/4b/43/636c4347755776747932584b5539736b616467-100x100-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=3http://di110.shopping.com/images/di/31/4b/43/636c4347755776747932584b5539736b616467-200x200-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=3http://di110.shopping.com/images/di/31/4b/43/636c4347755776747932584b5539736b616467-300x300-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=3http://di110.shopping.com/images/di/31/4b/43/636c4347755776747932584b5539736b616467-400x400-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=3in-stockGet 30 days FREE SHIPPING w/ ShipVantage1199.008.201199.00http://statTest.dealtime.com/DealFrame/DealFrame.cmp?bm=578&BEFID=7185&aon=%5E1&MerchantID=485615&crawler_id=485615&dealId=1KCclCGuWvty2XKU9skadg%3D%3D&url=http%3A%2F%2Fsears.rdr.channelintelligence.com%2Fgo.asp%3FfVhzOGNRAAQIASNiE1NbQBRtFXpzYx0CTAICI2BbH1lEFmgKP3QvUVpEREdlfUAUHAQPLVpFTVdtJzxAHUNYW3AhQBM0QhFvEXAbYh8EAAVmb2JcVlhCGGkPc3QDEkFZVQ0WFhdRW0MWbgYWDlxzdGMdAVQWRi0xDAwPFhw9TSobb05eWVVYKzsLTFVVQi5RICs3SA8MU1s2MQQKD1wf%26nAID%3D13736960%26&linkin_id=7000610&Issdt=111021183845&searchID=p2.a121bc2aaf029435dce6&DealName=25448%2FD90+12.3+Megapixel+Digital+Camera+18-105mm+Zoom+Lens+w%2F+3%22+Screen+-+Black&dlprc=1199.0&crn=&istrsmrc=1&isathrsl=0&AR=4&NG=20&NDP=200&PN=1&ST=7&DB=sdcprod&MT=phx-pkadudc2&FPT=DSP&NDS=&NMS=&MRS=&PD=70621646&brnId=14804&IsFtr=0&IsSmart=0&DMT=&op=&CM=&DlLng=1&RR=4&cid=&semid1=&semid2=&IsLps=0&CC=0&SL=0&FS=0&code=&acode=586&category=&HasLink=&frameId=&ND=&MN=&PT=&prjID=&GR=&lnkId=&VK=Searshttp://img.shopping.com/cctool/merch_logos/485615.gif1-800-349-43588882.85http://img.shopping.com/sc/mr/sdc_checks_3.gifhttp://www.shopping.com/xMR-store_sears_4189479~MRD-485615~S-1~linkin_id-7000610http://img.shopping.com/sc/glb/flag/US.gifUS00353197000Nikon® D90 12.3MP Digital SLR with 18-105mm LensThe Nikon D90 will make you rethink what a digital SLR camera can achieve.7185Nikonhttp://di101.shopping.com/images/di/33/2d/56/4f53665656354a6f37486c41346b4a74616e41-100x100-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=4http://di101.shopping.com/images/di/33/2d/56/4f53665656354a6f37486c41346b4a74616e41-200x200-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=4http://img.shopping.com/sc/ds/no_image_100X100.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=4http://img.shopping.com/sc/ds/no_image_100X100.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=4http://di101.shopping.com/images/di/33/2d/56/4f53665656354a6f37486c41346b4a74616e41-220x220-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=4in-stock1350.996.051350.99http://statTest.dealtime.com/DealFrame/DealFrame.cmp?bm=504&BEFID=7185&aon=%5E1&MerchantID=332477&crawler_id=332477&dealId=3-VOSfVV5Jo7HlA4kJtanA%3D%3D&url=http%3A%2F%2Ftracking.searchmarketing.com%2Fgsic.asp%3Faid%3D982673361%26&linkin_id=7000610&Issdt=111021183845&searchID=p2.a121bc2aaf029435dce6&DealName=Nikon%C2%AE+D90+12.3MP+Digital+SLR+with+18-105mm+Lens&dlprc=1350.99&crn=&istrsmrc=0&isathrsl=0&AR=5&NG=20&NDP=200&PN=1&ST=7&DB=sdcprod&MT=phx-pkadudc2&FPT=DSP&NDS=&NMS=&MRS=&PD=70621646&brnId=14804&IsFtr=0&IsSmart=0&DMT=&op=&CM=&DlLng=1&RR=5&cid=&semid1=&semid2=&IsLps=0&CC=0&SL=0&FS=0&code=&acode=496&category=&HasLink=&frameId=&ND=&MN=&PT=&prjID=&GR=&lnkId=&VK=RadioShackhttp://img.shopping.com/cctool/merch_logos/332477.gif242.25http://img.shopping.com/sc/mr/sdc_checks_25.gifhttp://www.shopping.com/xMR-store_radioshack_9689~MRD-332477~S-1~linkin_id-7000610http://img.shopping.com/sc/glb/flag/US.gifUS11148905Nikon D90 Kit 12.3-megapixel Digital SLR with 18-105mm VR LensPhotographers, take your passion further!Now is the time for new creativity, and to rethink what a digital SLR camera can achieve. It's time for the D90, a camera with everything you would expect from Nikon's next-generation D-SLRs, and some unexpected surprises, as well. The stunning image quality is inherited from the D300, Nikon's DX-format flagship. The D90 also has Nikon's unmatched ergonomics and high performance, and now takes high-quality movies with beautifully cinematic results. The world of photography has changed, and with the D90 in your hands, it's time to make your own rules.AF-S DX NIKKOR 18-105mm f/3.5-5.6G ED VR LensWide-ratio 5.8x zoom Compact, versatile and ideal for a broad range of shooting situations, ranging from interiors and landscapes to beautiful portraits� a perfect everyday zoom. Nikon VR (Vibration Reduction) image stabilization Vibration Reduction is engineered specifically for each VR NIKKOR lens and enables handheld shooting at up to 3 shutter speeds slower than would7185Nikonhttp://di110.shopping.com/images/di/6b/51/6e/4236725334416a4e3564783568325f36333167-100x100-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=5http://di110.shopping.com/images/di/6b/51/6e/4236725334416a4e3564783568325f36333167-200x200-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=5http://di110.shopping.com/images/di/6b/51/6e/4236725334416a4e3564783568325f36333167-300x300-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=5http://img.shopping.com/sc/ds/no_image_100X100.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=5http://di110.shopping.com/images/di/6b/51/6e/4236725334416a4e3564783568325f36333167-300x232-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=5in-stockShipping Included!1050.000.001199.00http://statTest.dealtime.com/DealFrame/DealFrame.cmp?bm=135&BEFID=7185&aon=%5E1&MerchantID=313162&crawler_id=313162&dealId=kQnB6rS4AjN5dx5h2_631g%3D%3D&url=http%3A%2F%2Fonecall.rdr.channelintelligence.com%2Fgo.asp%3FfVhzOGNRAAQIASNiE1pZSxNoWHFwLx8GTAICa2ZeH1sPXTZLNzRpAh1HR0BxPQEGCBJNMhFHUElsFCFCVkVTTHAcBggEHQ4aHXNpGERGH3RQODsbAgdechJtbBt8fx8JAwhtZFAzJj1oGgIWCxRlNyFOUV9UUGIxBgo0T0IyTSYqJ0RWHw4QPCIBAAQXRGMDICg6TllZVBhh%26nAID%3D13736960&linkin_id=7000610&Issdt=111021183845&searchID=p2.a121bc2aaf029435dce6&DealName=Nikon+D90+Kit+12.3-megapixel+Digital+SLR+with+18-105mm+VR+Lens&dlprc=1050.0&crn=&istrsmrc=1&isathrsl=0&AR=6&NG=20&NDP=200&PN=1&ST=7&DB=sdcprod&MT=phx-pkadudc2&FPT=DSP&NDS=&NMS=&MRS=&PD=70621646&brnId=14804&IsFtr=0&IsSmart=0&DMT=&op=&CM=&DlLng=1&RR=6&cid=&semid1=&semid2=&IsLps=0&CC=0&SL=1&FS=1&code=&acode=143&category=&HasLink=&frameId=&ND=&MN=&PT=&prjID=&GR=&lnkId=&VK=OneCallhttp://img.shopping.com/cctool/merch_logos/313162.gif1.800.398.07661804.44http://img.shopping.com/sc/mr/sdc_checks_45.gifhttp://www.shopping.com/xMR-store_onecall_9689~MRD-313162~S-1~linkin_id-7000610http://img.shopping.com/sc/glb/flag/US.gifUS92826Price rangehttp://www.shopping.com/digital-cameras/nikon/products?oq=nikon&linkin_id=7000610$24 - $4012http://www.shopping.com/digital-cameras/nikon/products?minPrice=24&maxPrice=4012&linkin_id=7000610$4012 - $7999http://www.shopping.com/digital-cameras/nikon/products?minPrice=4012&maxPrice=7999&linkin_id=7000610Brandhttp://www.shopping.com/digital-cameras/nikon/products~all-9688-brand~MS-1?oq=nikon&linkin_id=7000610Nikonhttp://www.shopping.com/digital-cameras/nikon+brand-nikon/products~linkin_id-7000610Cranehttp://www.shopping.com/digital-cameras/nikon+9688-brand-crane/products~linkin_id-7000610Ikelitehttp://www.shopping.com/digital-cameras/nikon+ikelite/products~linkin_id-7000610Bowerhttp://www.shopping.com/digital-cameras/nikon+bower/products~linkin_id-7000610FUJIFILMhttp://www.shopping.com/digital-cameras/nikon+brand-fuji/products~linkin_id-7000610Storehttp://www.shopping.com/digital-cameras/nikon/products~all-store~MS-1?oq=nikon&linkin_id=7000610Amazon Marketplacehttp://www.shopping.com/digital-cameras/nikon+store-amazon-marketplace-9689/products~linkin_id-7000610Amazonhttp://www.shopping.com/digital-cameras/nikon+store-amazon/products~linkin_id-7000610Adoramahttp://www.shopping.com/digital-cameras/nikon+store-adorama/products~linkin_id-7000610J&R Music and Computer Worldhttp://www.shopping.com/digital-cameras/nikon+store-j-r-music-and-computer-world/products~linkin_id-7000610RytherCamera.comhttp://www.shopping.com/digital-cameras/nikon+store-rythercamera-com/products~linkin_id-7000610Resolutionhttp://www.shopping.com/digital-cameras/nikon/products~all-21885-resolution~MS-1?oq=nikon&linkin_id=7000610Under 4 Megapixelhttp://www.shopping.com/digital-cameras/nikon+under-4-megapixel/products~linkin_id-7000610At least 5 Megapixelhttp://www.shopping.com/digital-cameras/nikon+5-megapixel-digital-cameras/products~linkin_id-7000610At least 6 Megapixelhttp://www.shopping.com/digital-cameras/nikon+6-megapixel-digital-cameras/products~linkin_id-7000610At least 7 Megapixelhttp://www.shopping.com/digital-cameras/nikon+7-megapixel-digital-cameras/products~linkin_id-7000610At least 8 Megapixelhttp://www.shopping.com/digital-cameras/nikon+8-megapixel-digital-cameras/products~linkin_id-7000610Featureshttp://www.shopping.com/digital-cameras/nikon/products~all-32804-features~MS-1?oq=nikon&linkin_id=7000610Shockproofhttp://www.shopping.com/digital-cameras/nikon+32804-features-shockproof/products~linkin_id-7000610Waterproofhttp://www.shopping.com/digital-cameras/nikon+32804-features-waterproof/products~linkin_id-7000610Freezeproofhttp://www.shopping.com/digital-cameras/nikon+32804-features-freezeproof/products~linkin_id-7000610Dust proofhttp://www.shopping.com/digital-cameras/nikon+32804-features-dust-proof/products~linkin_id-7000610Image Stabilizationhttp://www.shopping.com/digital-cameras/nikon+32804-features-image-stabilization/products~linkin_id-7000610hybriddigital camerag1sonycameracanonnikonkodak digital camerakodaksony cybershotkodak easyshare digital cameranikon coolpixolympuspink digital cameracanon powershot
\ No newline at end of file
diff --git a/node_modules/aws-sdk/node_modules/xml2js/node_modules/sax/examples/strict.dtd b/node_modules/aws-sdk/node_modules/xml2js/node_modules/sax/examples/strict.dtd
deleted file mode 100644
index b2745594..00000000
--- a/node_modules/aws-sdk/node_modules/xml2js/node_modules/sax/examples/strict.dtd
+++ /dev/null
@@ -1,870 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-%HTMLlat1;
-
-
-%HTMLsymbol;
-
-
-%HTMLspecial;
-
-
-
-
-
-
-
-
-
-
-
-
-
-]]>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-]]>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/node_modules/aws-sdk/node_modules/xml2js/node_modules/sax/examples/test.html b/node_modules/aws-sdk/node_modules/xml2js/node_modules/sax/examples/test.html
deleted file mode 100644
index 61f8f1ab..00000000
--- a/node_modules/aws-sdk/node_modules/xml2js/node_modules/sax/examples/test.html
+++ /dev/null
@@ -1,15 +0,0 @@
-
-
-
-
- testing the parser
-
-
-
-
hello
-
-
-
-
diff --git a/node_modules/aws-sdk/node_modules/xml2js/node_modules/sax/examples/test.xml b/node_modules/aws-sdk/node_modules/xml2js/node_modules/sax/examples/test.xml
deleted file mode 100644
index 801292d7..00000000
--- a/node_modules/aws-sdk/node_modules/xml2js/node_modules/sax/examples/test.xml
+++ /dev/null
@@ -1,1254 +0,0 @@
-
-
-]>
-
-
- Some Text
-
-
-
-
-
-
- are ok in here. ]]>
-
- Pre-Text & Inlined text Post-text.
-
-
-
- Some Text
-
-
-
-
-
-
- are ok in here. ]]>
-
- Pre-Text & Inlined text Post-text.
-
-
-
- Some Text
-
-
-
-
-
-
- are ok in here. ]]>
-
- Pre-Text & Inlined text Post-text.
-
-
-
- Some Text
-
-
-
-
-
-
- are ok in here. ]]>
-
- Pre-Text & Inlined text Post-text.
-
-
-
- Some Text
-
-
-
-
-
-
- are ok in here. ]]>
-
- Pre-Text & Inlined text Post-text.
-
-
-
- Some Text
-
-
-
-
-
-
- are ok in here. ]]>
-
- Pre-Text & Inlined text Post-text.
-
-
-
- Some Text
-
-
-
-
-
-
- are ok in here. ]]>
-
- Pre-Text & Inlined text Post-text.
-
-
-
- Some Text
-
-
-
-
-
-
- are ok in here. ]]>
-
- Pre-Text & Inlined text Post-text.
-
-
-
- Some Text
-
-
-
-
-
-
- are ok in here. ]]>
-
- Pre-Text & Inlined text Post-text.
-
-
-
- Some Text
-
-
-
-
-
-
- are ok in here. ]]>
-
- Pre-Text & Inlined text Post-text.
-
-
-
- Some Text
-
-
-
-
-
-
- are ok in here. ]]>
-
- Pre-Text & Inlined text Post-text.
-
-
-
- Some Text
-
-
-
-
-
-
- are ok in here. ]]>
-
- Pre-Text & Inlined text Post-text.
-
-
-
- Some Text
-
-
-
-
-
-
- are ok in here. ]]>
-
- Pre-Text & Inlined text Post-text.
-
-
-
- Some Text
-
-
-
-
-
-
- are ok in here. ]]>
-
- Pre-Text & Inlined text Post-text.
-
-
-
- Some Text
-
-
-
-
-
-
- are ok in here. ]]>
-
- Pre-Text & Inlined text Post-text.
-
-
-
- Some Text
-
-
-
-
-
-
- are ok in here. ]]>
-
- Pre-Text & Inlined text Post-text.
-
-
-
- Some Text
-
-
-
-
-
-
- are ok in here. ]]>
-
- Pre-Text & Inlined text Post-text.
-
-
-
- Some Text
-
-
-
-
-
-
- are ok in here. ]]>
-
- Pre-Text & Inlined text Post-text.
-
-
-
- Some Text
-
-
-
-
-
-
- are ok in here. ]]>
-
- Pre-Text & Inlined text Post-text.
-
-
-
- Some Text
-
-
-
-
-
-
- are ok in here. ]]>
-
- Pre-Text & Inlined text Post-text.
-
-
-
- Some Text
-
-
-
-
-
-
- are ok in here. ]]>
-
- Pre-Text & Inlined text Post-text.
-
-
-
- Some Text
-
-
-
-
-
-
- are ok in here. ]]>
-
- Pre-Text & Inlined text Post-text.
-
-
-
- Some Text
-
-
-
-
-
-
- are ok in here. ]]>
-
- Pre-Text & Inlined text Post-text.
-
-
-
- Some Text
-
-
-
-
-
-
- are ok in here. ]]>
-
- Pre-Text & Inlined text Post-text.
-
-
-
- Some Text
-
-
-
-
-
-
- are ok in here. ]]>
-
- Pre-Text & Inlined text Post-text.
-
-
-
- Some Text
-
-
-
-
-
-
- are ok in here. ]]>
-
- Pre-Text & Inlined text Post-text.
-
-
-
- Some Text
-
-
-
-
-
-
- are ok in here. ]]>
-
- Pre-Text & Inlined text Post-text.
-
-
-
- Some Text
-
-
-
-
-
-
- are ok in here. ]]>
-
- Pre-Text & Inlined text Post-text.
-
-
-
- Some Text
-
-
-
-
-
-
- are ok in here. ]]>
-
- Pre-Text & Inlined text Post-text.
-
-
-
- Some Text
-
-
-
-
-
-
- are ok in here. ]]>
-
- Pre-Text & Inlined text Post-text.
-
-
-
- Some Text
-
-
-
-
-
-
- are ok in here. ]]>
-
- Pre-Text & Inlined text Post-text.
-
-
-
- Some Text
-
-
-
-
-
-
- are ok in here. ]]>
-
- Pre-Text & Inlined text Post-text.
-
-
-
- Some Text
-
-
-
-
-
-
- are ok in here. ]]>
-
- Pre-Text & Inlined text Post-text.
-
-
-
- Some Text
-
-
-
-
-
-
- are ok in here. ]]>
-
- Pre-Text & Inlined text Post-text.
-
-
-
- Some Text
-
-
-
-
-
-
- are ok in here. ]]>
-
- Pre-Text & Inlined text Post-text.
-
-
-
- Some Text
-
-
-
-
-
-
- are ok in here. ]]>
-
- Pre-Text & Inlined text Post-text.
-
-
-
- Some Text
-
-
-
-
-
-
- are ok in here. ]]>
-
- Pre-Text & Inlined text Post-text.
-
-
-
- Some Text
-
-
-
-
-
-
- are ok in here. ]]>
-
- Pre-Text & Inlined text Post-text.
-
-
-
- Some Text
-
-
-
-
-
-
- are ok in here. ]]>
-
- Pre-Text & Inlined text Post-text.
-
-
-
- Some Text
-
-
-
-
-
-
- are ok in here. ]]>
-
- Pre-Text & Inlined text Post-text.
-
-
-
- Some Text
-
-
-
-
-
-
- are ok in here. ]]>
-
- Pre-Text & Inlined text Post-text.
-
-
-
- Some Text
-
-
-
-
-
-
- are ok in here. ]]>
-
- Pre-Text & Inlined text Post-text.
-
-
-
- Some Text
-
-
-
-
-
-
- are ok in here. ]]>
-
- Pre-Text & Inlined text Post-text.
-
-
-
- Some Text
-
-
-
-
-
-
- are ok in here. ]]>
-
- Pre-Text & Inlined text Post-text.
-
-
-
- Some Text
-
-
-
-
-
-
- are ok in here. ]]>
-
- Pre-Text & Inlined text Post-text.
-
-
-
- Some Text
-
-
-
-
-
-
- are ok in here. ]]>
-
- Pre-Text & Inlined text Post-text.
-
-
-
- Some Text
-
-
-
-
-
-
- are ok in here. ]]>
-
- Pre-Text & Inlined text Post-text.
-
-
-
- Some Text
-
-
-
-
-
-
- are ok in here. ]]>
-
- Pre-Text & Inlined text Post-text.
-
-
-
- Some Text
-
-
-
-
-
-
- are ok in here. ]]>
-
- Pre-Text & Inlined text Post-text.
-
-
-
- Some Text
-
-
-
-
-
-
- are ok in here. ]]>
-
- Pre-Text & Inlined text Post-text.
-
-
-
- Some Text
-
-
-
-
-
-
- are ok in here. ]]>
-
- Pre-Text & Inlined text Post-text.
-
-
-
- Some Text
-
-
-
-
-
-
- are ok in here. ]]>
-
- Pre-Text & Inlined text Post-text.
-
-
-
- Some Text
-
-
-
-
-
-
- are ok in here. ]]>
-
- Pre-Text & Inlined text Post-text.
-
-
-
- Some Text
-
-
-
-
-
-
- are ok in here. ]]>
-
- Pre-Text & Inlined text Post-text.
-
-
-
- Some Text
-
-
-
-
-
-
- are ok in here. ]]>
-
- Pre-Text & Inlined text Post-text.
-
-
-
- Some Text
-
-
-
-
-
-
- are ok in here. ]]>
-
- Pre-Text & Inlined text Post-text.
-
-
-
- Some Text
-
-
-
-
-
-
- are ok in here. ]]>
-
- Pre-Text & Inlined text Post-text.
-
-
-
- Some Text
-
-
-
-
-
-
- are ok in here. ]]>
-
- Pre-Text & Inlined text Post-text.
-
-
-
- Some Text
-
-
-
-
-
-
- are ok in here. ]]>
-
- Pre-Text & Inlined text Post-text.
-
-
-
- Some Text
-
-
-
-
-
-
- are ok in here. ]]>
-
- Pre-Text & Inlined text Post-text.
-
-
-
- Some Text
-
-
-
-
-
-
- are ok in here. ]]>
-
- Pre-Text & Inlined text Post-text.
-
-
-
- Some Text
-
-
-
-
-
-
- are ok in here. ]]>
-
- Pre-Text & Inlined text Post-text.
-
-
-
- Some Text
-
-
-
-
-
-
- are ok in here. ]]>
-
- Pre-Text & Inlined text Post-text.
-
-
-
- Some Text
-
-
-
-
-
-
- are ok in here. ]]>
-
- Pre-Text & Inlined text Post-text.
-
-
-
- Some Text
-
-
-
-
-
-
- are ok in here. ]]>
-
- Pre-Text & Inlined text Post-text.
-
-
-
- Some Text
-
-
-
-
-
-
- are ok in here. ]]>
-
- Pre-Text & Inlined text Post-text.
-
-
-
- Some Text
-
-
-
-
-
-
- are ok in here. ]]>
-
- Pre-Text & Inlined text Post-text.
-
-
-
- Some Text
-
-
-
-
-
-
- are ok in here. ]]>
-
- Pre-Text & Inlined text Post-text.
-
-
-
- Some Text
-
-
-
-
-
-
- are ok in here. ]]>
-
- Pre-Text & Inlined text Post-text.
-
-
-
- Some Text
-
-
-
-
-
-
- are ok in here. ]]>
-
- Pre-Text & Inlined text Post-text.
-
-
-
- Some Text
-
-
-
-
-
-
- are ok in here. ]]>
-
- Pre-Text & Inlined text Post-text.
-
-
-
- Some Text
-
-
-
-
-
-
- are ok in here. ]]>
-
- Pre-Text & Inlined text Post-text.
-
-
-
- Some Text
-
-
-
-
-
-
- are ok in here. ]]>
-
- Pre-Text & Inlined text Post-text.
-
-
-
- Some Text
-
-
-
-
-
-
- are ok in here. ]]>
-
- Pre-Text & Inlined text Post-text.
-
-
-
- Some Text
-
-
-
-
-
-
- are ok in here. ]]>
-
- Pre-Text & Inlined text Post-text.
-
-
-
- Some Text
-
-
-
-
-
-
- are ok in here. ]]>
-
- Pre-Text & Inlined text Post-text.
-
-
-
- Some Text
-
-
-
-
-
-
- are ok in here. ]]>
-
- Pre-Text & Inlined text Post-text.
-
-
-
- Some Text
-
-
-
-
-
-
- are ok in here. ]]>
-
- Pre-Text & Inlined text Post-text.
-
-
-
- Some Text
-
-
-
-
-
-
- are ok in here. ]]>
-
- Pre-Text & Inlined text Post-text.
-
-
-
- Some Text
-
-
-
-
-
-
- are ok in here. ]]>
-
- Pre-Text & Inlined text Post-text.
-
-
-
- Some Text
-
-
-
-
-
-
- are ok in here. ]]>
-
- Pre-Text & Inlined text Post-text.
-
-
-
- Some Text
-
-
-
-
-
-
- are ok in here. ]]>
-
- Pre-Text & Inlined text Post-text.
-
-
-
- Some Text
-
-
-
-
-
-
- are ok in here. ]]>
-
- Pre-Text & Inlined text Post-text.
-
-
-
- Some Text
-
-
-
-
-
-
- are ok in here. ]]>
-
- Pre-Text & Inlined text Post-text.
-
-
-
- Some Text
-
-
-
-
-
-
- are ok in here. ]]>
-
- Pre-Text & Inlined text Post-text.
-
-
-
- Some Text
-
-
-
-
-
-
- are ok in here. ]]>
-
- Pre-Text & Inlined text Post-text.
-
-
-
- Some Text
-
-
-
-
-
-
- are ok in here. ]]>
-
- Pre-Text & Inlined text Post-text.
-
-
-
- Some Text
-
-
-
-
-
-
- are ok in here. ]]>
-
- Pre-Text & Inlined text Post-text.
-
-
-
- Some Text
-
-
-
-
-
-
- are ok in here. ]]>
-
- Pre-Text & Inlined text Post-text.
-
-
-
- Some Text
-
-
-
-
-
-
- are ok in here. ]]>
-
- Pre-Text & Inlined text Post-text.
-
-
-
- Some Text
-
-
-
-
-
-
- are ok in here. ]]>
-
- Pre-Text & Inlined text Post-text.
-
-
-
- Some Text
-
-
-
-
-
-
- are ok in here. ]]>
-
- Pre-Text & Inlined text Post-text.
-
-
-
- Some Text
-
-
-
-
-
-
- are ok in here. ]]>
-
- Pre-Text & Inlined text Post-text.
-
-
-
- Some Text
-
-
-
-
-
-
- are ok in here. ]]>
-
- Pre-Text & Inlined text Post-text.
-
-
-
- Some Text
-
-
-
-
-
-
- are ok in here. ]]>
-
- Pre-Text & Inlined text Post-text.
-
-
-
- Some Text
-
-
-
-
-
-
- are ok in here. ]]>
-
- Pre-Text & Inlined text Post-text.
-
-
-
\ No newline at end of file
diff --git a/node_modules/aws-sdk/node_modules/xml2js/node_modules/sax/lib/sax.js b/node_modules/aws-sdk/node_modules/xml2js/node_modules/sax/lib/sax.js
deleted file mode 100644
index 996d39d7..00000000
--- a/node_modules/aws-sdk/node_modules/xml2js/node_modules/sax/lib/sax.js
+++ /dev/null
@@ -1,1410 +0,0 @@
-// wrapper for non-node envs
-;(function (sax) {
-
-sax.parser = function (strict, opt) { return new SAXParser(strict, opt) }
-sax.SAXParser = SAXParser
-sax.SAXStream = SAXStream
-sax.createStream = createStream
-
-// When we pass the MAX_BUFFER_LENGTH position, start checking for buffer overruns.
-// When we check, schedule the next check for MAX_BUFFER_LENGTH - (max(buffer lengths)),
-// since that's the earliest that a buffer overrun could occur. This way, checks are
-// as rare as required, but as often as necessary to ensure never crossing this bound.
-// Furthermore, buffers are only tested at most once per write(), so passing a very
-// large string into write() might have undesirable effects, but this is manageable by
-// the caller, so it is assumed to be safe. Thus, a call to write() may, in the extreme
-// edge case, result in creating at most one complete copy of the string passed in.
-// Set to Infinity to have unlimited buffers.
-sax.MAX_BUFFER_LENGTH = 64 * 1024
-
-var buffers = [
- "comment", "sgmlDecl", "textNode", "tagName", "doctype",
- "procInstName", "procInstBody", "entity", "attribName",
- "attribValue", "cdata", "script"
-]
-
-sax.EVENTS = // for discoverability.
- [ "text"
- , "processinginstruction"
- , "sgmldeclaration"
- , "doctype"
- , "comment"
- , "attribute"
- , "opentag"
- , "closetag"
- , "opencdata"
- , "cdata"
- , "closecdata"
- , "error"
- , "end"
- , "ready"
- , "script"
- , "opennamespace"
- , "closenamespace"
- ]
-
-function SAXParser (strict, opt) {
- if (!(this instanceof SAXParser)) return new SAXParser(strict, opt)
-
- var parser = this
- clearBuffers(parser)
- parser.q = parser.c = ""
- parser.bufferCheckPosition = sax.MAX_BUFFER_LENGTH
- parser.opt = opt || {}
- parser.opt.lowercase = parser.opt.lowercase || parser.opt.lowercasetags
- parser.looseCase = parser.opt.lowercase ? "toLowerCase" : "toUpperCase"
- parser.tags = []
- parser.closed = parser.closedRoot = parser.sawRoot = false
- parser.tag = parser.error = null
- parser.strict = !!strict
- parser.noscript = !!(strict || parser.opt.noscript)
- parser.state = S.BEGIN
- parser.ENTITIES = Object.create(sax.ENTITIES)
- parser.attribList = []
-
- // namespaces form a prototype chain.
- // it always points at the current tag,
- // which protos to its parent tag.
- if (parser.opt.xmlns) parser.ns = Object.create(rootNS)
-
- // mostly just for error reporting
- parser.trackPosition = parser.opt.position !== false
- if (parser.trackPosition) {
- parser.position = parser.line = parser.column = 0
- }
- emit(parser, "onready")
-}
-
-if (!Object.create) Object.create = function (o) {
- function f () { this.__proto__ = o }
- f.prototype = o
- return new f
-}
-
-if (!Object.getPrototypeOf) Object.getPrototypeOf = function (o) {
- return o.__proto__
-}
-
-if (!Object.keys) Object.keys = function (o) {
- var a = []
- for (var i in o) if (o.hasOwnProperty(i)) a.push(i)
- return a
-}
-
-function checkBufferLength (parser) {
- var maxAllowed = Math.max(sax.MAX_BUFFER_LENGTH, 10)
- , maxActual = 0
- for (var i = 0, l = buffers.length; i < l; i ++) {
- var len = parser[buffers[i]].length
- if (len > maxAllowed) {
- // Text/cdata nodes can get big, and since they're buffered,
- // we can get here under normal conditions.
- // Avoid issues by emitting the text node now,
- // so at least it won't get any bigger.
- switch (buffers[i]) {
- case "textNode":
- closeText(parser)
- break
-
- case "cdata":
- emitNode(parser, "oncdata", parser.cdata)
- parser.cdata = ""
- break
-
- case "script":
- emitNode(parser, "onscript", parser.script)
- parser.script = ""
- break
-
- default:
- error(parser, "Max buffer length exceeded: "+buffers[i])
- }
- }
- maxActual = Math.max(maxActual, len)
- }
- // schedule the next check for the earliest possible buffer overrun.
- parser.bufferCheckPosition = (sax.MAX_BUFFER_LENGTH - maxActual)
- + parser.position
-}
-
-function clearBuffers (parser) {
- for (var i = 0, l = buffers.length; i < l; i ++) {
- parser[buffers[i]] = ""
- }
-}
-
-function flushBuffers (parser) {
- closeText(parser)
- if (parser.cdata !== "") {
- emitNode(parser, "oncdata", parser.cdata)
- parser.cdata = ""
- }
- if (parser.script !== "") {
- emitNode(parser, "onscript", parser.script)
- parser.script = ""
- }
-}
-
-SAXParser.prototype =
- { end: function () { end(this) }
- , write: write
- , resume: function () { this.error = null; return this }
- , close: function () { return this.write(null) }
- , flush: function () { flushBuffers(this) }
- }
-
-try {
- var Stream = require("stream").Stream
-} catch (ex) {
- var Stream = function () {}
-}
-
-
-var streamWraps = sax.EVENTS.filter(function (ev) {
- return ev !== "error" && ev !== "end"
-})
-
-function createStream (strict, opt) {
- return new SAXStream(strict, opt)
-}
-
-function SAXStream (strict, opt) {
- if (!(this instanceof SAXStream)) return new SAXStream(strict, opt)
-
- Stream.apply(this)
-
- this._parser = new SAXParser(strict, opt)
- this.writable = true
- this.readable = true
-
-
- var me = this
-
- this._parser.onend = function () {
- me.emit("end")
- }
-
- this._parser.onerror = function (er) {
- me.emit("error", er)
-
- // if didn't throw, then means error was handled.
- // go ahead and clear error, so we can write again.
- me._parser.error = null
- }
-
- this._decoder = null;
-
- streamWraps.forEach(function (ev) {
- Object.defineProperty(me, "on" + ev, {
- get: function () { return me._parser["on" + ev] },
- set: function (h) {
- if (!h) {
- me.removeAllListeners(ev)
- return me._parser["on"+ev] = h
- }
- me.on(ev, h)
- },
- enumerable: true,
- configurable: false
- })
- })
-}
-
-SAXStream.prototype = Object.create(Stream.prototype,
- { constructor: { value: SAXStream } })
-
-SAXStream.prototype.write = function (data) {
- if (typeof Buffer === 'function' &&
- typeof Buffer.isBuffer === 'function' &&
- Buffer.isBuffer(data)) {
- if (!this._decoder) {
- var SD = require('string_decoder').StringDecoder
- this._decoder = new SD('utf8')
- }
- data = this._decoder.write(data);
- }
-
- this._parser.write(data.toString())
- this.emit("data", data)
- return true
-}
-
-SAXStream.prototype.end = function (chunk) {
- if (chunk && chunk.length) this.write(chunk)
- this._parser.end()
- return true
-}
-
-SAXStream.prototype.on = function (ev, handler) {
- var me = this
- if (!me._parser["on"+ev] && streamWraps.indexOf(ev) !== -1) {
- me._parser["on"+ev] = function () {
- var args = arguments.length === 1 ? [arguments[0]]
- : Array.apply(null, arguments)
- args.splice(0, 0, ev)
- me.emit.apply(me, args)
- }
- }
-
- return Stream.prototype.on.call(me, ev, handler)
-}
-
-
-
-// character classes and tokens
-var whitespace = "\r\n\t "
- // this really needs to be replaced with character classes.
- // XML allows all manner of ridiculous numbers and digits.
- , number = "0124356789"
- , letter = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"
- // (Letter | "_" | ":")
- , quote = "'\""
- , entity = number+letter+"#"
- , attribEnd = whitespace + ">"
- , CDATA = "[CDATA["
- , DOCTYPE = "DOCTYPE"
- , XML_NAMESPACE = "http://www.w3.org/XML/1998/namespace"
- , XMLNS_NAMESPACE = "http://www.w3.org/2000/xmlns/"
- , rootNS = { xml: XML_NAMESPACE, xmlns: XMLNS_NAMESPACE }
-
-// turn all the string character sets into character class objects.
-whitespace = charClass(whitespace)
-number = charClass(number)
-letter = charClass(letter)
-
-// http://www.w3.org/TR/REC-xml/#NT-NameStartChar
-// This implementation works on strings, a single character at a time
-// as such, it cannot ever support astral-plane characters (10000-EFFFF)
-// without a significant breaking change to either this parser, or the
-// JavaScript language. Implementation of an emoji-capable xml parser
-// is left as an exercise for the reader.
-var nameStart = /[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/
-
-var nameBody = /[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040\.\d-]/
-
-quote = charClass(quote)
-entity = charClass(entity)
-attribEnd = charClass(attribEnd)
-
-function charClass (str) {
- return str.split("").reduce(function (s, c) {
- s[c] = true
- return s
- }, {})
-}
-
-function isRegExp (c) {
- return Object.prototype.toString.call(c) === '[object RegExp]'
-}
-
-function is (charclass, c) {
- return isRegExp(charclass) ? !!c.match(charclass) : charclass[c]
-}
-
-function not (charclass, c) {
- return !is(charclass, c)
-}
-
-var S = 0
-sax.STATE =
-{ BEGIN : S++
-, TEXT : S++ // general stuff
-, TEXT_ENTITY : S++ // & and such.
-, OPEN_WAKA : S++ // <
-, SGML_DECL : S++ //
-, SCRIPT : S++ // "
- , expect :
- [ [ "opentag", { name: "xml", attributes: {}, isSelfClosing: false } ]
- , [ "opentag", { name: "script", attributes: {}, isSelfClosing: false } ]
- , [ "text", "hello world" ]
- , [ "closetag", "script" ]
- , [ "closetag", "xml" ]
- ]
- , strict : false
- , opt : { lowercasetags: true, noscript: true }
- }
- )
-
-require(__dirname).test
- ( { xml : ""
- , expect :
- [ [ "opentag", { name: "xml", attributes: {}, isSelfClosing: false } ]
- , [ "opentag", { name: "script", attributes: {}, isSelfClosing: false } ]
- , [ "opencdata", undefined ]
- , [ "cdata", "hello world" ]
- , [ "closecdata", undefined ]
- , [ "closetag", "script" ]
- , [ "closetag", "xml" ]
- ]
- , strict : false
- , opt : { lowercasetags: true, noscript: true }
- }
- )
-
diff --git a/node_modules/aws-sdk/node_modules/xml2js/node_modules/sax/test/issue-84.js b/node_modules/aws-sdk/node_modules/xml2js/node_modules/sax/test/issue-84.js
deleted file mode 100644
index 0e7ee699..00000000
--- a/node_modules/aws-sdk/node_modules/xml2js/node_modules/sax/test/issue-84.js
+++ /dev/null
@@ -1,13 +0,0 @@
-// https://github.com/isaacs/sax-js/issues/49
-require(__dirname).test
- ( { xml : "body"
- , expect :
- [ [ "processinginstruction", { name: "has", body: "unbalanced \"quotes" } ],
- [ "opentag", { name: "xml", attributes: {}, isSelfClosing: false } ]
- , [ "text", "body" ]
- , [ "closetag", "xml" ]
- ]
- , strict : false
- , opt : { lowercasetags: true, noscript: true }
- }
- )
diff --git a/node_modules/aws-sdk/node_modules/xml2js/node_modules/sax/test/parser-position.js b/node_modules/aws-sdk/node_modules/xml2js/node_modules/sax/test/parser-position.js
deleted file mode 100644
index e4a68b1e..00000000
--- a/node_modules/aws-sdk/node_modules/xml2js/node_modules/sax/test/parser-position.js
+++ /dev/null
@@ -1,28 +0,0 @@
-var sax = require("../lib/sax"),
- assert = require("assert")
-
-function testPosition(chunks, expectedEvents) {
- var parser = sax.parser();
- expectedEvents.forEach(function(expectation) {
- parser['on' + expectation[0]] = function() {
- for (var prop in expectation[1]) {
- assert.equal(parser[prop], expectation[1][prop]);
- }
- }
- });
- chunks.forEach(function(chunk) {
- parser.write(chunk);
- });
-};
-
-testPosition(['
'"],
- ["closetag", "SCRIPT"],
- ["closetag", "HEAD"],
- ["closetag", "HTML"]
- ]
-});
diff --git a/node_modules/aws-sdk/node_modules/xml2js/node_modules/sax/test/script.js b/node_modules/aws-sdk/node_modules/xml2js/node_modules/sax/test/script.js
deleted file mode 100644
index fbda1f6c..00000000
--- a/node_modules/aws-sdk/node_modules/xml2js/node_modules/sax/test/script.js
+++ /dev/null
@@ -1,12 +0,0 @@
-require(__dirname).test({
- xml : "",
- expect : [
- ["opentag", {"name": "HTML","attributes": {}, "isSelfClosing": false}],
- ["opentag", {"name": "HEAD","attributes": {}, "isSelfClosing": false}],
- ["opentag", {"name": "SCRIPT","attributes": {}, "isSelfClosing": false}],
- ["script", "if (1 < 0) { console.log('elo there'); }"],
- ["closetag", "SCRIPT"],
- ["closetag", "HEAD"],
- ["closetag", "HTML"]
- ]
-});
diff --git a/node_modules/aws-sdk/node_modules/xml2js/node_modules/sax/test/self-closing-child-strict.js b/node_modules/aws-sdk/node_modules/xml2js/node_modules/sax/test/self-closing-child-strict.js
deleted file mode 100644
index 3d6e9852..00000000
--- a/node_modules/aws-sdk/node_modules/xml2js/node_modules/sax/test/self-closing-child-strict.js
+++ /dev/null
@@ -1,44 +0,0 @@
-
-require(__dirname).test({
- xml :
- ""+
- "" +
- "" +
- "" +
- "" +
- "=(|)" +
- "" +
- "",
- expect : [
- ["opentag", {
- "name": "root",
- "attributes": {},
- "isSelfClosing": false
- }],
- ["opentag", {
- "name": "child",
- "attributes": {},
- "isSelfClosing": false
- }],
- ["opentag", {
- "name": "haha",
- "attributes": {},
- "isSelfClosing": true
- }],
- ["closetag", "haha"],
- ["closetag", "child"],
- ["opentag", {
- "name": "monkey",
- "attributes": {},
- "isSelfClosing": false
- }],
- ["text", "=(|)"],
- ["closetag", "monkey"],
- ["closetag", "root"],
- ["end"],
- ["ready"]
- ],
- strict : true,
- opt : {}
-});
-
diff --git a/node_modules/aws-sdk/node_modules/xml2js/node_modules/sax/test/self-closing-child.js b/node_modules/aws-sdk/node_modules/xml2js/node_modules/sax/test/self-closing-child.js
deleted file mode 100644
index f31c3664..00000000
--- a/node_modules/aws-sdk/node_modules/xml2js/node_modules/sax/test/self-closing-child.js
+++ /dev/null
@@ -1,44 +0,0 @@
-
-require(__dirname).test({
- xml :
- ""+
- "" +
- "" +
- "" +
- "" +
- "=(|)" +
- "" +
- "",
- expect : [
- ["opentag", {
- "name": "ROOT",
- "attributes": {},
- "isSelfClosing": false
- }],
- ["opentag", {
- "name": "CHILD",
- "attributes": {},
- "isSelfClosing": false
- }],
- ["opentag", {
- "name": "HAHA",
- "attributes": {},
- "isSelfClosing": true
- }],
- ["closetag", "HAHA"],
- ["closetag", "CHILD"],
- ["opentag", {
- "name": "MONKEY",
- "attributes": {},
- "isSelfClosing": false
- }],
- ["text", "=(|)"],
- ["closetag", "MONKEY"],
- ["closetag", "ROOT"],
- ["end"],
- ["ready"]
- ],
- strict : false,
- opt : {}
-});
-
diff --git a/node_modules/aws-sdk/node_modules/xml2js/node_modules/sax/test/self-closing-tag.js b/node_modules/aws-sdk/node_modules/xml2js/node_modules/sax/test/self-closing-tag.js
deleted file mode 100644
index d1d8b7c8..00000000
--- a/node_modules/aws-sdk/node_modules/xml2js/node_modules/sax/test/self-closing-tag.js
+++ /dev/null
@@ -1,25 +0,0 @@
-
-require(__dirname).test({
- xml :
- " "+
- " "+
- " "+
- " "+
- "=(|) "+
- ""+
- " ",
- expect : [
- ["opentag", {name:"ROOT", attributes:{}, isSelfClosing: false}],
- ["opentag", {name:"HAHA", attributes:{}, isSelfClosing: true}],
- ["closetag", "HAHA"],
- ["opentag", {name:"HAHA", attributes:{}, isSelfClosing: true}],
- ["closetag", "HAHA"],
- // ["opentag", {name:"HAHA", attributes:{}}],
- // ["closetag", "HAHA"],
- ["opentag", {name:"MONKEY", attributes:{}, isSelfClosing: false}],
- ["text", "=(|)"],
- ["closetag", "MONKEY"],
- ["closetag", "ROOT"]
- ],
- opt : { trim : true }
-});
\ No newline at end of file
diff --git a/node_modules/aws-sdk/node_modules/xml2js/node_modules/sax/test/stray-ending.js b/node_modules/aws-sdk/node_modules/xml2js/node_modules/sax/test/stray-ending.js
deleted file mode 100644
index bec467b2..00000000
--- a/node_modules/aws-sdk/node_modules/xml2js/node_modules/sax/test/stray-ending.js
+++ /dev/null
@@ -1,17 +0,0 @@
-// stray ending tags should just be ignored in non-strict mode.
-// https://github.com/isaacs/sax-js/issues/32
-require(__dirname).test
- ( { xml :
- ""
- , expect :
- [ [ "opentag", { name: "A", attributes: {}, isSelfClosing: false } ]
- , [ "opentag", { name: "B", attributes: {}, isSelfClosing: false } ]
- , [ "text", "" ]
- , [ "closetag", "B" ]
- , [ "closetag", "A" ]
- ]
- , strict : false
- , opt : {}
- }
- )
-
diff --git a/node_modules/aws-sdk/node_modules/xml2js/node_modules/sax/test/trailing-attribute-no-value.js b/node_modules/aws-sdk/node_modules/xml2js/node_modules/sax/test/trailing-attribute-no-value.js
deleted file mode 100644
index 222837f8..00000000
--- a/node_modules/aws-sdk/node_modules/xml2js/node_modules/sax/test/trailing-attribute-no-value.js
+++ /dev/null
@@ -1,10 +0,0 @@
-
-require(__dirname).test({
- xml :
- "",
- expect : [
- ["attribute", {name:"ATTRIB", value:"attrib"}],
- ["opentag", {name:"ROOT", attributes:{"ATTRIB":"attrib"}, isSelfClosing: false}]
- ],
- opt : { trim : true }
-});
diff --git a/node_modules/aws-sdk/node_modules/xml2js/node_modules/sax/test/trailing-non-whitespace.js b/node_modules/aws-sdk/node_modules/xml2js/node_modules/sax/test/trailing-non-whitespace.js
deleted file mode 100644
index 619578b1..00000000
--- a/node_modules/aws-sdk/node_modules/xml2js/node_modules/sax/test/trailing-non-whitespace.js
+++ /dev/null
@@ -1,18 +0,0 @@
-
-require(__dirname).test({
- xml : "Welcome, to monkey land",
- expect : [
- ["opentag", {
- "name": "SPAN",
- "attributes": {},
- isSelfClosing: false
- }],
- ["text", "Welcome,"],
- ["closetag", "SPAN"],
- ["text", " to monkey land"],
- ["end"],
- ["ready"]
- ],
- strict : false,
- opt : {}
-});
diff --git a/node_modules/aws-sdk/node_modules/xml2js/node_modules/sax/test/unclosed-root.js b/node_modules/aws-sdk/node_modules/xml2js/node_modules/sax/test/unclosed-root.js
deleted file mode 100644
index f4eeac61..00000000
--- a/node_modules/aws-sdk/node_modules/xml2js/node_modules/sax/test/unclosed-root.js
+++ /dev/null
@@ -1,11 +0,0 @@
-require(__dirname).test
- ( { xml : ""
-
- , expect :
- [ [ "opentag", { name: "root", attributes: {}, isSelfClosing: false } ]
- , [ "error", "Unclosed root tag\nLine: 0\nColumn: 6\nChar: " ]
- ]
- , strict : true
- , opt : {}
- }
- )
diff --git a/node_modules/aws-sdk/node_modules/xml2js/node_modules/sax/test/unquoted.js b/node_modules/aws-sdk/node_modules/xml2js/node_modules/sax/test/unquoted.js
deleted file mode 100644
index b3a9a812..00000000
--- a/node_modules/aws-sdk/node_modules/xml2js/node_modules/sax/test/unquoted.js
+++ /dev/null
@@ -1,18 +0,0 @@
-// unquoted attributes should be ok in non-strict mode
-// https://github.com/isaacs/sax-js/issues/31
-require(__dirname).test
- ( { xml :
- ""
- , expect :
- [ [ "attribute", { name: "CLASS", value: "test" } ]
- , [ "attribute", { name: "HELLO", value: "world" } ]
- , [ "opentag", { name: "SPAN",
- attributes: { CLASS: "test", HELLO: "world" },
- isSelfClosing: false } ]
- , [ "closetag", "SPAN" ]
- ]
- , strict : false
- , opt : {}
- }
- )
-
diff --git a/node_modules/aws-sdk/node_modules/xml2js/node_modules/sax/test/utf8-split.js b/node_modules/aws-sdk/node_modules/xml2js/node_modules/sax/test/utf8-split.js
deleted file mode 100644
index e22bc100..00000000
--- a/node_modules/aws-sdk/node_modules/xml2js/node_modules/sax/test/utf8-split.js
+++ /dev/null
@@ -1,32 +0,0 @@
-var assert = require('assert')
-var saxStream = require('../lib/sax').createStream()
-
-var b = new Buffer('误')
-
-saxStream.on('text', function(text) {
- assert.equal(text, b.toString())
-})
-
-saxStream.write(new Buffer(''))
-saxStream.write(b.slice(0, 1))
-saxStream.write(b.slice(1))
-saxStream.write(new Buffer(''))
-saxStream.write(b.slice(0, 2))
-saxStream.write(b.slice(2))
-saxStream.write(new Buffer(''))
-saxStream.write(b)
-saxStream.write(new Buffer(''))
-saxStream.write(Buffer.concat([new Buffer(''), b.slice(0, 1)]))
-saxStream.end(Buffer.concat([b.slice(1), new Buffer('')]))
-
-var saxStream2 = require('../lib/sax').createStream()
-
-saxStream2.on('text', function(text) {
- assert.equal(text, '�')
-});
-
-saxStream2.write(new Buffer(''));
-saxStream2.write(new Buffer([0xC0]));
-saxStream2.write(new Buffer(''));
-saxStream2.write(Buffer.concat([new Buffer(''), b.slice(0,1)]));
-saxStream2.end();
diff --git a/node_modules/aws-sdk/node_modules/xml2js/node_modules/sax/test/xmlns-as-tag-name.js b/node_modules/aws-sdk/node_modules/xml2js/node_modules/sax/test/xmlns-as-tag-name.js
deleted file mode 100644
index 99142ca6..00000000
--- a/node_modules/aws-sdk/node_modules/xml2js/node_modules/sax/test/xmlns-as-tag-name.js
+++ /dev/null
@@ -1,15 +0,0 @@
-
-require(__dirname).test
- ( { xml :
- ""
- , expect :
- [ [ "opentag", { name: "xmlns", uri: "", prefix: "", local: "xmlns",
- attributes: {}, ns: {},
- isSelfClosing: true}
- ],
- ["closetag", "xmlns"]
- ]
- , strict : true
- , opt : { xmlns: true }
- }
- );
diff --git a/node_modules/aws-sdk/node_modules/xml2js/node_modules/sax/test/xmlns-issue-41.js b/node_modules/aws-sdk/node_modules/xml2js/node_modules/sax/test/xmlns-issue-41.js
deleted file mode 100644
index 17ab45a0..00000000
--- a/node_modules/aws-sdk/node_modules/xml2js/node_modules/sax/test/xmlns-issue-41.js
+++ /dev/null
@@ -1,68 +0,0 @@
-var t = require(__dirname)
-
- , xmls = // should be the same both ways.
- [ ""
- , "" ]
-
- , ex1 =
- [ [ "opennamespace"
- , { prefix: "a"
- , uri: "http://ATTRIBUTE"
- }
- ]
- , [ "attribute"
- , { name: "xmlns:a"
- , value: "http://ATTRIBUTE"
- , prefix: "xmlns"
- , local: "a"
- , uri: "http://www.w3.org/2000/xmlns/"
- }
- ]
- , [ "attribute"
- , { name: "a:attr"
- , local: "attr"
- , prefix: "a"
- , uri: "http://ATTRIBUTE"
- , value: "value"
- }
- ]
- , [ "opentag"
- , { name: "parent"
- , uri: ""
- , prefix: ""
- , local: "parent"
- , attributes:
- { "a:attr":
- { name: "a:attr"
- , local: "attr"
- , prefix: "a"
- , uri: "http://ATTRIBUTE"
- , value: "value"
- }
- , "xmlns:a":
- { name: "xmlns:a"
- , local: "a"
- , prefix: "xmlns"
- , uri: "http://www.w3.org/2000/xmlns/"
- , value: "http://ATTRIBUTE"
- }
- }
- , ns: {"a": "http://ATTRIBUTE"}
- , isSelfClosing: true
- }
- ]
- , ["closetag", "parent"]
- , ["closenamespace", { prefix: "a", uri: "http://ATTRIBUTE" }]
- ]
-
- // swap the order of elements 2 and 1
- , ex2 = [ex1[0], ex1[2], ex1[1]].concat(ex1.slice(3))
- , expected = [ex1, ex2]
-
-xmls.forEach(function (x, i) {
- t.test({ xml: x
- , expect: expected[i]
- , strict: true
- , opt: { xmlns: true }
- })
-})
diff --git a/node_modules/aws-sdk/node_modules/xml2js/node_modules/sax/test/xmlns-rebinding.js b/node_modules/aws-sdk/node_modules/xml2js/node_modules/sax/test/xmlns-rebinding.js
deleted file mode 100644
index 07e04255..00000000
--- a/node_modules/aws-sdk/node_modules/xml2js/node_modules/sax/test/xmlns-rebinding.js
+++ /dev/null
@@ -1,63 +0,0 @@
-
-require(__dirname).test
- ( { xml :
- ""+
- ""+
- ""+
- ""+
- ""+
- ""
-
- , expect :
- [ [ "opennamespace", { prefix: "x", uri: "x1" } ]
- , [ "opennamespace", { prefix: "y", uri: "y1" } ]
- , [ "attribute", { name: "xmlns:x", value: "x1", uri: "http://www.w3.org/2000/xmlns/", prefix: "xmlns", local: "x" } ]
- , [ "attribute", { name: "xmlns:y", value: "y1", uri: "http://www.w3.org/2000/xmlns/", prefix: "xmlns", local: "y" } ]
- , [ "attribute", { name: "x:a", value: "x1", uri: "x1", prefix: "x", local: "a" } ]
- , [ "attribute", { name: "y:a", value: "y1", uri: "y1", prefix: "y", local: "a" } ]
- , [ "opentag", { name: "root", uri: "", prefix: "", local: "root",
- attributes: { "xmlns:x": { name: "xmlns:x", value: "x1", uri: "http://www.w3.org/2000/xmlns/", prefix: "xmlns", local: "x" }
- , "xmlns:y": { name: "xmlns:y", value: "y1", uri: "http://www.w3.org/2000/xmlns/", prefix: "xmlns", local: "y" }
- , "x:a": { name: "x:a", value: "x1", uri: "x1", prefix: "x", local: "a" }
- , "y:a": { name: "y:a", value: "y1", uri: "y1", prefix: "y", local: "a" } },
- ns: { x: 'x1', y: 'y1' },
- isSelfClosing: false } ]
-
- , [ "opennamespace", { prefix: "x", uri: "x2" } ]
- , [ "attribute", { name: "xmlns:x", value: "x2", uri: "http://www.w3.org/2000/xmlns/", prefix: "xmlns", local: "x" } ]
- , [ "opentag", { name: "rebind", uri: "", prefix: "", local: "rebind",
- attributes: { "xmlns:x": { name: "xmlns:x", value: "x2", uri: "http://www.w3.org/2000/xmlns/", prefix: "xmlns", local: "x" } },
- ns: { x: 'x2' },
- isSelfClosing: false } ]
-
- , [ "attribute", { name: "x:a", value: "x2", uri: "x2", prefix: "x", local: "a" } ]
- , [ "attribute", { name: "y:a", value: "y1", uri: "y1", prefix: "y", local: "a" } ]
- , [ "opentag", { name: "check", uri: "", prefix: "", local: "check",
- attributes: { "x:a": { name: "x:a", value: "x2", uri: "x2", prefix: "x", local: "a" }
- , "y:a": { name: "y:a", value: "y1", uri: "y1", prefix: "y", local: "a" } },
- ns: { x: 'x2' },
- isSelfClosing: true } ]
-
- , [ "closetag", "check" ]
-
- , [ "closetag", "rebind" ]
- , [ "closenamespace", { prefix: "x", uri: "x2" } ]
-
- , [ "attribute", { name: "x:a", value: "x1", uri: "x1", prefix: "x", local: "a" } ]
- , [ "attribute", { name: "y:a", value: "y1", uri: "y1", prefix: "y", local: "a" } ]
- , [ "opentag", { name: "check", uri: "", prefix: "", local: "check",
- attributes: { "x:a": { name: "x:a", value: "x1", uri: "x1", prefix: "x", local: "a" }
- , "y:a": { name: "y:a", value: "y1", uri: "y1", prefix: "y", local: "a" } },
- ns: { x: 'x1', y: 'y1' },
- isSelfClosing: true } ]
- , [ "closetag", "check" ]
-
- , [ "closetag", "root" ]
- , [ "closenamespace", { prefix: "x", uri: "x1" } ]
- , [ "closenamespace", { prefix: "y", uri: "y1" } ]
- ]
- , strict : true
- , opt : { xmlns: true }
- }
- )
-
diff --git a/node_modules/aws-sdk/node_modules/xml2js/node_modules/sax/test/xmlns-strict.js b/node_modules/aws-sdk/node_modules/xml2js/node_modules/sax/test/xmlns-strict.js
deleted file mode 100644
index b5e3e518..00000000
--- a/node_modules/aws-sdk/node_modules/xml2js/node_modules/sax/test/xmlns-strict.js
+++ /dev/null
@@ -1,74 +0,0 @@
-
-require(__dirname).test
- ( { xml :
- ""+
- ""+
- ""+
- ""+
- ""+
- ""+
- ""+
- ""+
- ""+
- ""
-
- , expect :
- [ [ "opentag", { name: "root", prefix: "", local: "root", uri: "",
- attributes: {}, ns: {}, isSelfClosing: false } ]
-
- , [ "attribute", { name: "attr", value: "normal", prefix: "", local: "attr", uri: "" } ]
- , [ "opentag", { name: "plain", prefix: "", local: "plain", uri: "",
- attributes: { "attr": { name: "attr", value: "normal", uri: "", prefix: "", local: "attr", uri: "" } },
- ns: {}, isSelfClosing: true } ]
- , [ "closetag", "plain" ]
-
- , [ "opennamespace", { prefix: "", uri: "uri:default" } ]
-
- , [ "attribute", { name: "xmlns", value: "uri:default", prefix: "xmlns", local: "", uri: "http://www.w3.org/2000/xmlns/" } ]
- , [ "opentag", { name: "ns1", prefix: "", local: "ns1", uri: "uri:default",
- attributes: { "xmlns": { name: "xmlns", value: "uri:default", prefix: "xmlns", local: "", uri: "http://www.w3.org/2000/xmlns/" } },
- ns: { "": "uri:default" }, isSelfClosing: false } ]
-
- , [ "attribute", { name: "attr", value: "normal", prefix: "", local: "attr", uri: "" } ]
- , [ "opentag", { name: "plain", prefix: "", local: "plain", uri: "uri:default", ns: { '': 'uri:default' },
- attributes: { "attr": { name: "attr", value: "normal", prefix: "", local: "attr", uri: "" } },
- isSelfClosing: true } ]
- , [ "closetag", "plain" ]
-
- , [ "closetag", "ns1" ]
-
- , [ "closenamespace", { prefix: "", uri: "uri:default" } ]
-
- , [ "opennamespace", { prefix: "a", uri: "uri:nsa" } ]
-
- , [ "attribute", { name: "xmlns:a", value: "uri:nsa", prefix: "xmlns", local: "a", uri: "http://www.w3.org/2000/xmlns/" } ]
-
- , [ "opentag", { name: "ns2", prefix: "", local: "ns2", uri: "",
- attributes: { "xmlns:a": { name: "xmlns:a", value: "uri:nsa", prefix: "xmlns", local: "a", uri: "http://www.w3.org/2000/xmlns/" } },
- ns: { a: "uri:nsa" }, isSelfClosing: false } ]
-
- , [ "attribute", { name: "attr", value: "normal", prefix: "", local: "attr", uri: "" } ]
- , [ "opentag", { name: "plain", prefix: "", local: "plain", uri: "",
- attributes: { "attr": { name: "attr", value: "normal", prefix: "", local: "attr", uri: "" } },
- ns: { a: 'uri:nsa' },
- isSelfClosing: true } ]
- , [ "closetag", "plain" ]
-
- , [ "attribute", { name: "a:attr", value: "namespaced", prefix: "a", local: "attr", uri: "uri:nsa" } ]
- , [ "opentag", { name: "a:ns", prefix: "a", local: "ns", uri: "uri:nsa",
- attributes: { "a:attr": { name: "a:attr", value: "namespaced", prefix: "a", local: "attr", uri: "uri:nsa" } },
- ns: { a: 'uri:nsa' },
- isSelfClosing: true } ]
- , [ "closetag", "a:ns" ]
-
- , [ "closetag", "ns2" ]
-
- , [ "closenamespace", { prefix: "a", uri: "uri:nsa" } ]
-
- , [ "closetag", "root" ]
- ]
- , strict : true
- , opt : { xmlns: true }
- }
- )
-
diff --git a/node_modules/aws-sdk/node_modules/xml2js/node_modules/sax/test/xmlns-unbound-element.js b/node_modules/aws-sdk/node_modules/xml2js/node_modules/sax/test/xmlns-unbound-element.js
deleted file mode 100644
index 9d031a2b..00000000
--- a/node_modules/aws-sdk/node_modules/xml2js/node_modules/sax/test/xmlns-unbound-element.js
+++ /dev/null
@@ -1,33 +0,0 @@
-require(__dirname).test(
- { strict : true
- , opt : { xmlns: true }
- , expect :
- [ [ "error", "Unbound namespace prefix: \"unbound:root\"\nLine: 0\nColumn: 15\nChar: >"]
- , [ "opentag", { name: "unbound:root", uri: "unbound", prefix: "unbound", local: "root"
- , attributes: {}, ns: {}, isSelfClosing: true } ]
- , [ "closetag", "unbound:root" ]
- ]
- }
-).write("");
-
-require(__dirname).test(
- { strict : true
- , opt : { xmlns: true }
- , expect :
- [ [ "opennamespace", { prefix: "unbound", uri: "someuri" } ]
- , [ "attribute", { name: 'xmlns:unbound', value: 'someuri'
- , prefix: 'xmlns', local: 'unbound'
- , uri: 'http://www.w3.org/2000/xmlns/' } ]
- , [ "opentag", { name: "unbound:root", uri: "someuri", prefix: "unbound", local: "root"
- , attributes: { 'xmlns:unbound': {
- name: 'xmlns:unbound'
- , value: 'someuri'
- , prefix: 'xmlns'
- , local: 'unbound'
- , uri: 'http://www.w3.org/2000/xmlns/' } }
- , ns: { "unbound": "someuri" }, isSelfClosing: true } ]
- , [ "closetag", "unbound:root" ]
- , [ "closenamespace", { prefix: 'unbound', uri: 'someuri' }]
- ]
- }
-).write("");
diff --git a/node_modules/aws-sdk/node_modules/xml2js/node_modules/sax/test/xmlns-unbound.js b/node_modules/aws-sdk/node_modules/xml2js/node_modules/sax/test/xmlns-unbound.js
deleted file mode 100644
index b740e261..00000000
--- a/node_modules/aws-sdk/node_modules/xml2js/node_modules/sax/test/xmlns-unbound.js
+++ /dev/null
@@ -1,15 +0,0 @@
-
-require(__dirname).test(
- { strict : true
- , opt : { xmlns: true }
- , expect :
- [ ["error", "Unbound namespace prefix: \"unbound\"\nLine: 0\nColumn: 28\nChar: >"]
-
- , [ "attribute", { name: "unbound:attr", value: "value", uri: "unbound", prefix: "unbound", local: "attr" } ]
- , [ "opentag", { name: "root", uri: "", prefix: "", local: "root",
- attributes: { "unbound:attr": { name: "unbound:attr", value: "value", uri: "unbound", prefix: "unbound", local: "attr" } },
- ns: {}, isSelfClosing: true } ]
- , [ "closetag", "root" ]
- ]
- }
-).write("")
diff --git a/node_modules/aws-sdk/node_modules/xml2js/node_modules/sax/test/xmlns-xml-default-ns.js b/node_modules/aws-sdk/node_modules/xml2js/node_modules/sax/test/xmlns-xml-default-ns.js
deleted file mode 100644
index b1984d25..00000000
--- a/node_modules/aws-sdk/node_modules/xml2js/node_modules/sax/test/xmlns-xml-default-ns.js
+++ /dev/null
@@ -1,31 +0,0 @@
-var xmlns_attr =
-{
- name: "xmlns", value: "http://foo", prefix: "xmlns",
- local: "", uri : "http://www.w3.org/2000/xmlns/"
-};
-
-var attr_attr =
-{
- name: "attr", value: "bar", prefix: "",
- local : "attr", uri : ""
-};
-
-
-require(__dirname).test
- ( { xml :
- ""
- , expect :
- [ [ "opennamespace", { prefix: "", uri: "http://foo" } ]
- , [ "attribute", xmlns_attr ]
- , [ "attribute", attr_attr ]
- , [ "opentag", { name: "elm", prefix: "", local: "elm", uri : "http://foo",
- ns : { "" : "http://foo" },
- attributes: { xmlns: xmlns_attr, attr: attr_attr },
- isSelfClosing: true } ]
- , [ "closetag", "elm" ]
- , [ "closenamespace", { prefix: "", uri: "http://foo"} ]
- ]
- , strict : true
- , opt : {xmlns: true}
- }
- )
diff --git a/node_modules/aws-sdk/node_modules/xml2js/node_modules/sax/test/xmlns-xml-default-prefix-attribute.js b/node_modules/aws-sdk/node_modules/xml2js/node_modules/sax/test/xmlns-xml-default-prefix-attribute.js
deleted file mode 100644
index e41f2187..00000000
--- a/node_modules/aws-sdk/node_modules/xml2js/node_modules/sax/test/xmlns-xml-default-prefix-attribute.js
+++ /dev/null
@@ -1,36 +0,0 @@
-require(__dirname).test(
- { xml : ""
- , expect :
- [ [ "attribute"
- , { name: "xml:lang"
- , local: "lang"
- , prefix: "xml"
- , uri: "http://www.w3.org/XML/1998/namespace"
- , value: "en"
- }
- ]
- , [ "opentag"
- , { name: "root"
- , uri: ""
- , prefix: ""
- , local: "root"
- , attributes:
- { "xml:lang":
- { name: "xml:lang"
- , local: "lang"
- , prefix: "xml"
- , uri: "http://www.w3.org/XML/1998/namespace"
- , value: "en"
- }
- }
- , ns: {}
- , isSelfClosing: true
- }
- ]
- , ["closetag", "root"]
- ]
- , strict : true
- , opt : { xmlns: true }
- }
-)
-
diff --git a/node_modules/aws-sdk/node_modules/xml2js/node_modules/sax/test/xmlns-xml-default-prefix.js b/node_modules/aws-sdk/node_modules/xml2js/node_modules/sax/test/xmlns-xml-default-prefix.js
deleted file mode 100644
index a85b4787..00000000
--- a/node_modules/aws-sdk/node_modules/xml2js/node_modules/sax/test/xmlns-xml-default-prefix.js
+++ /dev/null
@@ -1,21 +0,0 @@
-require(__dirname).test(
- { xml : ""
- , expect :
- [
- [ "opentag"
- , { name: "xml:root"
- , uri: "http://www.w3.org/XML/1998/namespace"
- , prefix: "xml"
- , local: "root"
- , attributes: {}
- , ns: {}
- , isSelfClosing: true
- }
- ]
- , ["closetag", "xml:root"]
- ]
- , strict : true
- , opt : { xmlns: true }
- }
-)
-
diff --git a/node_modules/aws-sdk/node_modules/xml2js/node_modules/sax/test/xmlns-xml-default-redefine.js b/node_modules/aws-sdk/node_modules/xml2js/node_modules/sax/test/xmlns-xml-default-redefine.js
deleted file mode 100644
index d35d5a0c..00000000
--- a/node_modules/aws-sdk/node_modules/xml2js/node_modules/sax/test/xmlns-xml-default-redefine.js
+++ /dev/null
@@ -1,41 +0,0 @@
-require(__dirname).test(
- { xml : ""
- , expect :
- [ ["error"
- , "xml: prefix must be bound to http://www.w3.org/XML/1998/namespace\n"
- + "Actual: ERROR\n"
- + "Line: 0\nColumn: 27\nChar: '"
- ]
- , [ "attribute"
- , { name: "xmlns:xml"
- , local: "xml"
- , prefix: "xmlns"
- , uri: "http://www.w3.org/2000/xmlns/"
- , value: "ERROR"
- }
- ]
- , [ "opentag"
- , { name: "xml:root"
- , uri: "http://www.w3.org/XML/1998/namespace"
- , prefix: "xml"
- , local: "root"
- , attributes:
- { "xmlns:xml":
- { name: "xmlns:xml"
- , local: "xml"
- , prefix: "xmlns"
- , uri: "http://www.w3.org/2000/xmlns/"
- , value: "ERROR"
- }
- }
- , ns: {}
- , isSelfClosing: true
- }
- ]
- , ["closetag", "xml:root"]
- ]
- , strict : true
- , opt : { xmlns: true }
- }
-)
-
diff --git a/node_modules/aws-sdk/node_modules/xml2js/package.json b/node_modules/aws-sdk/node_modules/xml2js/package.json
deleted file mode 100644
index 7ac7d5a1..00000000
--- a/node_modules/aws-sdk/node_modules/xml2js/package.json
+++ /dev/null
@@ -1,105 +0,0 @@
-{
- "name": "xml2js",
- "description": "Simple XML to JavaScript object converter.",
- "keywords": [
- "xml",
- "json"
- ],
- "homepage": "https://github.com/Leonidas-from-XIV/node-xml2js",
- "version": "0.2.4",
- "author": {
- "name": "Marek Kubica",
- "email": "marek@xivilization.net",
- "url": "http://xivilization.net"
- },
- "contributors": [
- {
- "name": "maqr",
- "email": "maqr.lollerskates@gmail.com",
- "url": "https://github.com/maqr"
- },
- {
- "name": "Ben Weaver",
- "url": "http://benweaver.com/"
- },
- {
- "name": "Jae Kwon",
- "url": "https://github.com/jaekwon"
- },
- {
- "name": "Jim Robert"
- },
- {
- "name": "Ștefan Rusu",
- "url": "http://www.saltwaterc.eu/"
- },
- {
- "name": "Carter Cole",
- "email": "carter.cole@cartercole.com",
- "url": "http://cartercole.com/"
- },
- {
- "name": "Kurt Raschke",
- "email": "kurt@kurtraschke.com",
- "url": "http://www.kurtraschke.com/"
- },
- {
- "name": "Contra",
- "email": "contra@australia.edu",
- "url": "https://github.com/Contra"
- },
- {
- "name": "Marcelo Diniz",
- "email": "marudiniz@gmail.com",
- "url": "https://github.com/mdiniz"
- },
- {
- "name": "Michael Hart",
- "url": "https://github.com/mhart"
- },
- {
- "name": "Zachary Scott",
- "email": "zachary@zacharyscott.net",
- "url": "http://zacharyscott.net/"
- },
- {
- "name": "Raoul Millais",
- "url": "https://github.com/raoulmillais"
- },
- {
- "name": "Salsita Software",
- "url": "http://www.salsitasoft.com/"
- },
- {
- "name": "Mike Schilling",
- "email": "mike@emotive.com",
- "url": "http://www.emotive.com/"
- }
- ],
- "main": "./lib/xml2js",
- "directories": {
- "lib": "./lib"
- },
- "scripts": {
- "test": "zap"
- },
- "repository": {
- "type": "git",
- "url": "https://github.com/Leonidas-from-XIV/node-xml2js.git"
- },
- "dependencies": {
- "sax": ">=0.4.2"
- },
- "devDependencies": {
- "coffee-script": ">=1.0.1",
- "zap": ">=0.2.5",
- "docco": ">=0.3.0"
- },
- "readme": "node-xml2js\n===========\n\nEver had the urge to parse XML? And wanted to access the data in some sane,\neasy way? Don't want to compile a C parser, for whatever reason? Then xml2js is\nwhat you're looking for!\n\nDescription\n===========\n\nSimple XML to JavaScript object converter. Uses\n[sax-js](https://github.com/isaacs/sax-js/).\n\nNote: If you're looking for a full DOM parser, you probably want\n[JSDom](https://github.com/tmpvar/jsdom).\n\nInstallation\n============\n\nSimplest way to install `xml2js` is to use [npm](http://npmjs.org), just `npm\ninstall xml2js` which will download xml2js and all dependencies.\n\nUsage\n=====\n\nNo extensive tutorials required because you are a smart developer! The task of\nparsing XML should be an easy one, so let's make it so! Here's some examples.\n\nShoot-and-forget usage\n----------------------\n\nYou want to parse XML as simple and easy as possible? It's dangerous to go\nalone, take this:\n\n```javascript\nvar parseString = require('xml2js').parseString;\nvar xml = \"Hello xml2js!\"\nparseString(xml, function (err, result) {\n console.dir(result);\n});\n```\n\nCan't get easier than this, right? This works starting with `xml2js` 0.2.3.\nWith CoffeeScript it looks like this:\n\n```coffeescript\nparseString = require('xml2js').parseString\nxml = \"Hello xml2js!\"\nparseString xml, (err, result) ->\n console.dir result\n```\n\nIf you need some special options, fear not, `xml2js` supports a number of\noptions (see below), you can specify these as second argument:\n\n```javascript\nparseString(xml, {trim: true}, function (err, result) {\n});\n```\n\nSimple as pie usage\n-------------------\n\nThat's right, if you have been using xml-simple or a home-grown\nwrapper, this is was added in 0.1.11 just for you:\n\n```javascript\nvar fs = require('fs'),\n xml2js = require('xml2js');\n\nvar parser = new xml2js.Parser();\nfs.readFile(__dirname + '/foo.xml', function(err, data) {\n parser.parseString(data, function (err, result) {\n console.dir(result);\n console.log('Done');\n });\n});\n```\n\nLook ma, no event listeners!\n\nYou can also use `xml2js` from\n[CoffeeScript](http://jashkenas.github.com/coffee-script/), further reducing\nthe clutter:\n\n```coffeescript\nfs = require 'fs',\nxml2js = require 'xml2js'\n\nparser = new xml2js.Parser()\nfs.readFile __dirname + '/foo.xml', (err, data) ->\n parser.parseString data, (err, result) ->\n console.dir result\n console.log 'Done.'\n```\n\n\"Traditional\" usage\n-------------------\n\nAlternatively you can still use the traditional `addListener` variant that was\nsupported since forever:\n\n```javascript\nvar fs = require('fs'),\n xml2js = require('xml2js');\n\nvar parser = new xml2js.Parser();\nparser.addListener('end', function(result) {\n console.dir(result);\n console.log('Done.');\n});\nfs.readFile(__dirname + '/foo.xml', function(err, data) {\n parser.parseString(data);\n});\n```\n\nIf you want to parse multiple files, you have multiple possibilites:\n\n * You can create one `xml2js.Parser` per file. That's the recommended one\n and is promised to always *just work*.\n * You can call `reset()` on your parser object.\n * You can hope everything goes well anyway. This behaviour is not\n guaranteed work always, if ever. Use option #1 if possible. Thanks!\n\nSo you wanna some JSON?\n-----------------------\n\nJust wrap the `result` object in a call to `JSON.stringify` like this\n`JSON.stringify(result)`. You get a string containing the JSON representation\nof the parsed object that you can feed to JSON-hungry consumers.\n\nDisplaying results\n------------------\n\nYou might wonder why, using `console.dir` or `console.log` the output at some\nlevel is only `[Object]`. Don't worry, this is not because xml2js got lazy.\nThat's because Node uses `util.inspect` to convert the object into strings and\nthat function stops after `depth=2` which is a bit low for most XML.\n\nTo display the whole deal, you can use `console.log(util.inspect(result, false,\nnull))`, which displays the whole result.\n\nSo much for that, but what if you use\n[eyes](https://github.com/cloudhead/eyes.js) for nice colored output and it\ntruncates the output with `…`? Don't fear, there's also a solution for that,\nyou just need to increase the `maxLength` limit by creating a custom inspector\n`var inspect = require('eyes').inspector({maxLength: false})` and then you can\neasily `inspect(result)`.\n\nOptions\n=======\n\nApart from the default settings, there is a number of options that can be\nspecified for the parser. Options are specified by ``new Parser({optionName:\nvalue})``. Possible options are:\n\n * `attrkey` (default: `$`): Prefix that is used to access the attributes.\n Version 0.1 default was `@`.\n * `charkey` (default: `_`): Prefix that is used to access the character\n content. Version 0.1 default was `#`.\n * `explicitCharkey` (default: `false`)\n * `trim` (default: `false`): Trim the whitespace at the beginning and end of\n text nodes.\n * `normalizeTags` (default: `false`): Normalize all tag names to lowercase.\n * `normalize` (default: `false`): Trim whitespaces inside text nodes.\n * `explicitRoot` (default: `true`): Set this if you want to get the root\n node in the resulting object.\n * `emptyTag` (default: `undefined`): what will the value of empty nodes be.\n Default is `{}`.\n * `explicitArray` (default: `true`): Always put child nodes in an array if\n true; otherwise an array is created only if there is more than one.\n * `ignoreAttrs` (default: `false`): Ignore all XML attributes and only create\n text nodes.\n * `mergeAttrs` (default: `false`): Merge attributes and child elements as\n properties of the parent, instead of keying attributes off a child\n attribute object. This option is ignored if `ignoreAttrs` is `false`.\n * `validator` (default `null`): You can specify a callable that validates\n the resulting structure somehow, however you want. See unit tests\n for an example.\n * `xmlns` (default `false`): Give each element a field usually called '$ns'\n (the first character is the same as attrkey) that contains its local name\n and namespace URI.\n\nUpdating to new version\n=======================\n\nVersion 0.2 changed the default parsing settings, but version 0.1.14 introduced\nthe default settings for version 0.2, so these settings can be tried before the\nmigration.\n\n```javascript\nvar xml2js = require('xml2js');\nvar parser = new xml2js.Parser(xml2js.defaults[\"0.2\"]);\n```\n\nTo get the 0.1 defaults in version 0.2 you can just use\n`xml2js.defaults[\"0.1\"]` in the same place. This provides you with enough time\nto migrate to the saner way of parsing in xml2js 0.2. We try to make the\nmigration as simple and gentle as possible, but some breakage cannot be\navoided.\n\nSo, what exactly did change and why? In 0.2 we changed some defaults to parse\nthe XML in a more universal and sane way. So we disabled `normalize` and `trim`\nso xml2js does not cut out any text content. You can reenable this at will of\ncourse. A more important change is that we return the root tag in the resulting\nJavaScript structure via the `explicitRoot` setting, so you need to access the\nfirst element. This is useful for anybody who wants to know what the root node\nis and preserves more information. The last major change was to enable\n`explicitArray`, so everytime it is possible that one might embed more than one\nsub-tag into a tag, xml2js >= 0.2 returns an array even if the array just\nincludes one element. This is useful when dealing with APIs that return\nvariable amounts of subtags.\n\nRunning tests, development\n==========================\n\n[](https://travis-ci.org/Leonidas-from-XIV/node-xml2js)\n\nThe development requirements are handled by npm, you just need to install them.\nWe also have a number of unit tests, they can be run using `npm test` directly\nfrom the project root. This runs zap to discover all the tests and execute\nthem.\n\nIf you like to contribute, keep in mind that xml2js is written in CoffeeScript,\nso don't develop on the JavaScript files that are checked into the repository\nfor convenience reasons. Also, please write some unit test to check your\nbehaviour and if it is some user-facing thing, add some documentation to this\nREADME, so people will know it exists. Thanks in advance!\n",
- "readmeFilename": "README.md",
- "bugs": {
- "url": "https://github.com/Leonidas-from-XIV/node-xml2js/issues"
- },
- "_id": "xml2js@0.2.4",
- "_from": "xml2js@0.2.4"
-}
diff --git a/node_modules/aws-sdk/node_modules/xml2js/src/xml2js.coffee b/node_modules/aws-sdk/node_modules/xml2js/src/xml2js.coffee
deleted file mode 100644
index 95899e27..00000000
--- a/node_modules/aws-sdk/node_modules/xml2js/src/xml2js.coffee
+++ /dev/null
@@ -1,198 +0,0 @@
-sax = require 'sax'
-events = require 'events'
-
-# Underscore has a nice function for this, but we try to go without dependencies
-isEmpty = (thing) ->
- return typeof thing is "object" && thing? && Object.keys(thing).length is 0
-
-exports.defaults =
- "0.1":
- explicitCharkey: false
- trim: true
- # normalize implicates trimming, just so you know
- normalize: true
- # normalize tag names to lower case
- normalizeTags: false
- # set default attribute object key
- attrkey: "@"
- # set default char object key
- charkey: "#"
- # always put child nodes in an array
- explicitArray: false
- # ignore all attributes regardless
- ignoreAttrs: false
- # merge attributes and child elements onto parent object. this may
- # cause collisions.
- mergeAttrs: false
- explicitRoot: false
- validator: null,
- xmlns : false
- "0.2":
- explicitCharkey: false
- trim: false
- normalize: false
- normalizeTags: false
- attrkey: "$"
- charkey: "_"
- explicitArray: true
- ignoreAttrs: false
- mergeAttrs: false
- explicitRoot: true
- validator: null,
- xmlns : false
-
-class exports.ValidationError extends Error
- constructor: (message) ->
- @message = message
-
-class exports.Parser extends events.EventEmitter
- constructor: (opts) ->
- # copy this versions default options
- @options = {}
- @options[key] = value for own key, value of exports.defaults["0.2"]
- # overwrite them with the specified options, if any
- @options[key] = value for own key, value of opts
- # define the key used for namespaces
- if @options.xmlns
- @options.xmlnskey = @options.attrkey + "ns"
-
- @reset()
-
- reset: =>
- # remove all previous listeners for events, to prevent event listener
- # accumulation
- @removeAllListeners()
- # make the SAX parser. tried trim and normalize, but they are not
- # very helpful
- @saxParser = sax.parser true, {
- trim: false,
- normalize: false,
- xmlns: @options.xmlns
- }
-
- # emit one error event if the sax parser fails. this is mostly a hack, but
- # the sax parser isn't state of the art either.
- err = false
- @saxParser.onerror = (error) =>
- if ! err
- err = true
- @emit "error", error
-
- # always use the '#' key, even if there are no subkeys
- # setting this property by and is deprecated, yet still supported.
- # better pass it as explicitCharkey option to the constructor
- @EXPLICIT_CHARKEY = @options.explicitCharkey
- @resultObject = null
- stack = []
- # aliases, so we don't have to type so much
- attrkey = @options.attrkey
- charkey = @options.charkey
-
- @saxParser.onopentag = (node) =>
- obj = {}
- obj[charkey] = ""
- unless @options.ignoreAttrs
- for own key of node.attributes
- if attrkey not of obj and not @options.mergeAttrs
- obj[attrkey] = {}
- if @options.mergeAttrs
- obj[key] = node.attributes[key]
- else
- obj[attrkey][key] = node.attributes[key]
-
- # need a place to store the node name
- obj["#name"] = if @options.normalizeTags then node.name.toLowerCase() else node.name
- if (@options.xmlns)
- obj[@options.xmlnskey] = {uri: node.uri, local: node.local}
- stack.push obj
-
- @saxParser.onclosetag = =>
- obj = stack.pop()
- nodeName = obj["#name"]
- delete obj["#name"]
-
- s = stack[stack.length - 1]
- # remove the '#' key altogether if it's blank
- if obj[charkey].match(/^\s*$/)
- delete obj[charkey]
- else
- obj[charkey] = obj[charkey].trim() if @options.trim
- obj[charkey] = obj[charkey].replace(/\s{2,}/g, " ").trim() if @options.normalize
- # also do away with '#' key altogether, if there's no subkeys
- # unless EXPLICIT_CHARKEY is set
- if Object.keys(obj).length == 1 and charkey of obj and not @EXPLICIT_CHARKEY
- obj = obj[charkey]
-
- if @options.emptyTag != undefined && isEmpty obj
- obj = @options.emptyTag
-
- if @options.validator?
- xpath = "/" + (node["#name"] for node in stack).concat(nodeName).join("/")
- obj = @options.validator(xpath, s and s[nodeName], obj)
-
- # check whether we closed all the open tags
- if stack.length > 0
- if not @options.explicitArray
- if nodeName not of s
- s[nodeName] = obj
- else if s[nodeName] instanceof Array
- s[nodeName].push obj
- else
- old = s[nodeName]
- s[nodeName] = [old]
- s[nodeName].push obj
- else
- if not (s[nodeName] instanceof Array)
- s[nodeName] = []
- s[nodeName].push obj
- else
- # if explicitRoot was specified, wrap stuff in the root tag name
- if @options.explicitRoot
- # avoid circular references
- old = obj
- obj = {}
- obj[nodeName] = old
-
- @resultObject = obj
- @emit "end", @resultObject
-
- @saxParser.ontext = @saxParser.oncdata = (text) =>
- s = stack[stack.length - 1]
- if s
- s[charkey] += text
-
- parseString: (str, cb) =>
- if cb? and typeof cb is "function"
- @on "end", (result) ->
- @reset()
- cb null, result
- @on "error", (err) ->
- @reset()
- cb err
-
- if str.toString().trim() is ''
- @emit "end", null
- return true
-
- try
- @saxParser.write str.toString()
- catch ex
- @emit("error", ex.message)
-
-exports.parseString = (str, a, b) ->
- # let's determine what we got as arguments
- if b?
- if typeof b == 'function'
- cb = b
- if typeof a == 'object'
- options = a
- else
- # well, b is not set, so a has to be a callback
- if typeof a == 'function'
- cb = a
- # and options should be empty - default
- options = {}
-
- # the rest is super-easy
- parser = new exports.Parser options
- parser.parseString str, cb
diff --git a/node_modules/aws-sdk/node_modules/xml2js/test/fixtures/sample.xml b/node_modules/aws-sdk/node_modules/xml2js/test/fixtures/sample.xml
deleted file mode 100644
index d47718f0..00000000
--- a/node_modules/aws-sdk/node_modules/xml2js/test/fixtures/sample.xml
+++ /dev/null
@@ -1,50 +0,0 @@
-
- Character data here!
-
-
-
- Line One
- Line Two
-
-
-
- This Foo(1) is
- Foo(2)
- character
- Foo(3)
- data!
- Foo(4)
-
- Qux.
- Quux.
-
-
- Baz.
- Foo.Bar.
-
-
-
- something
- something else
- something third
-
-
- 1
- 2
- 3
- 4
- 5
- 6
-
-
-
-
- Bar.
-
- 42
- 43
-
-
-
-
-
diff --git a/node_modules/aws-sdk/node_modules/xml2js/test/xml2js.test.coffee b/node_modules/aws-sdk/node_modules/xml2js/test/xml2js.test.coffee
deleted file mode 100644
index e6ca7799..00000000
--- a/node_modules/aws-sdk/node_modules/xml2js/test/xml2js.test.coffee
+++ /dev/null
@@ -1,233 +0,0 @@
-# use zap to run tests, it also detects CoffeeScript files
-xml2js = require '../lib/xml2js'
-fs = require 'fs'
-util = require 'util'
-assert = require 'assert'
-path = require 'path'
-
-fileName = path.join __dirname, '/fixtures/sample.xml'
-
-skeleton = (options, checks) ->
- (test) ->
- xmlString = options?.__xmlString
- delete options?.__xmlString
- x2js = new xml2js.Parser options
- x2js.addListener 'end', (r) ->
- checks r
- test.finish()
- if not xmlString
- fs.readFile fileName, (err, data) ->
- x2js.parseString data
- else
- x2js.parseString xmlString
-###
-The `validator` function validates the value at the XPath. It also transforms the value
-if necessary to conform to the schema or other validation information being used. If there
-is an existing value at this path it is supplied in `currentValue` (e.g. this is the second or
-later item in an array).
-If the validation fails it should throw a `ValidationError`.
-###
-validator = (xpath, currentValue, newValue) ->
- if xpath == '/sample/validatortest/numbertest'
- return Number(newValue)
- else if xpath in ['/sample/arraytest', '/sample/validatortest/emptyarray', '/sample/validatortest/oneitemarray']
- if not ('item' of newValue)
- return {'item': []}
- else if xpath in ['/sample/arraytest/item', '/sample/validatortest/emptyarray/item', '/sample/validatortest/oneitemarray/item']
- if not currentValue
- return newValue
- else if xpath == '/validationerror'
- throw new xml2js.ValidationError("Validation error!")
- return newValue
-
-# shortcut, because it is quite verbose
-equ = assert.equal
-
-module.exports =
- 'test parse with defaults': skeleton(undefined, (r) ->
- console.log 'Result object: ' + util.inspect r, false, 10
- equ r.sample.chartest[0].$.desc, 'Test for CHARs'
- equ r.sample.chartest[0]._, 'Character data here!'
- equ r.sample.cdatatest[0].$.desc, 'Test for CDATA'
- equ r.sample.cdatatest[0].$.misc, 'true'
- equ r.sample.cdatatest[0]._, 'CDATA here!'
- equ r.sample.nochartest[0].$.desc, 'No data'
- equ r.sample.nochartest[0].$.misc, 'false'
- equ r.sample.listtest[0].item[0]._, '\n This is\n \n character\n \n data!\n \n '
- equ r.sample.listtest[0].item[0].subitem[0], 'Foo(1)'
- equ r.sample.listtest[0].item[0].subitem[1], 'Foo(2)'
- equ r.sample.listtest[0].item[0].subitem[2], 'Foo(3)'
- equ r.sample.listtest[0].item[0].subitem[3], 'Foo(4)'
- equ r.sample.listtest[0].item[1], 'Qux.'
- equ r.sample.listtest[0].item[2], 'Quux.'
- # determine number of items in object
- equ Object.keys(r.sample.tagcasetest[0]).length, 3)
-
- 'test parse with explicitCharkey': skeleton(explicitCharkey: true, (r) ->
- console.log 'Result object: ' + util.inspect r, false, 10
- equ r.sample.chartest[0].$.desc, 'Test for CHARs'
- equ r.sample.chartest[0]._, 'Character data here!'
- equ r.sample.cdatatest[0].$.desc, 'Test for CDATA'
- equ r.sample.cdatatest[0].$.misc, 'true'
- equ r.sample.cdatatest[0]._, 'CDATA here!'
- equ r.sample.nochartest[0].$.desc, 'No data'
- equ r.sample.nochartest[0].$.misc, 'false'
- equ r.sample.listtest[0].item[0]._, '\n This is\n \n character\n \n data!\n \n '
- equ r.sample.listtest[0].item[0].subitem[0]._, 'Foo(1)'
- equ r.sample.listtest[0].item[0].subitem[1]._, 'Foo(2)'
- equ r.sample.listtest[0].item[0].subitem[2]._, 'Foo(3)'
- equ r.sample.listtest[0].item[0].subitem[3]._, 'Foo(4)'
- equ r.sample.listtest[0].item[1]._, 'Qux.'
- equ r.sample.listtest[0].item[2]._, 'Quux.')
-
- 'test parse with mergeAttrs': skeleton(mergeAttrs: true, (r) ->
- console.log 'Result object: ' + util.inspect r, false, 10
- equ r.sample.chartest[0].desc, 'Test for CHARs'
- equ r.sample.chartest[0]._, 'Character data here!'
- equ r.sample.cdatatest[0].desc, 'Test for CDATA'
- equ r.sample.cdatatest[0].misc, 'true'
- equ r.sample.cdatatest[0]._, 'CDATA here!'
- equ r.sample.nochartest[0].desc, 'No data'
- equ r.sample.nochartest[0].misc, 'false'
- equ r.sample.listtest[0].item[0].subitem[0], 'Foo(1)'
- equ r.sample.listtest[0].item[0].subitem[1], 'Foo(2)'
- equ r.sample.listtest[0].item[0].subitem[2], 'Foo(3)'
- equ r.sample.listtest[0].item[0].subitem[3], 'Foo(4)'
- equ r.sample.listtest[0].item[1], 'Qux.'
- equ r.sample.listtest[0].item[2], 'Quux.')
-
- 'test text trimming, normalize': skeleton(trim: true, normalize: true, (r) ->
- equ r.sample.whitespacetest[0]._, 'Line One Line Two')
-
- 'test text trimming, no normalizing': skeleton(trim: true, normalize: false, (r) ->
- equ r.sample.whitespacetest[0]._, 'Line One\n Line Two')
-
- 'test text no trimming, normalize': skeleton(trim: false, normalize: true, (r) ->
- equ r.sample.whitespacetest[0]._, 'Line One Line Two')
-
- 'test text no trimming, no normalize': skeleton(trim: false, normalize: false, (r) ->
- equ r.sample.whitespacetest[0]._, '\n Line One\n Line Two\n ')
-
- 'test enabled root node elimination': skeleton(__xmlString: '', explicitRoot: false, (r) ->
- console.log 'Result object: ' + util.inspect r, false, 10
- assert.deepEqual r, {})
-
- 'test disabled root node elimination': skeleton(__xmlString: '', explicitRoot: true, (r) ->
- assert.deepEqual r, {root: {}})
-
- 'test default empty tag result': skeleton(undefined, (r) ->
- assert.deepEqual r.sample.emptytest, [{}])
-
- 'test empty tag result specified null': skeleton(emptyTag: null, (r) ->
- equ r.sample.emptytest[0], null)
-
- 'test invalid empty XML file': skeleton(__xmlString: ' ', (r) ->
- equ r, null)
-
- 'test enabled normalizeTags': skeleton(normalizeTags: true, (r) ->
- console.log 'Result object: ' + util.inspect r, false, 10
- equ Object.keys(r.sample.tagcasetest).length, 1)
-
- 'test parse with custom char and attribute object keys': skeleton(attrkey: 'attrobj', charkey: 'charobj', (r) ->
- console.log 'Result object: ' + util.inspect r, false, 10
- equ r.sample.chartest[0].attrobj.desc, 'Test for CHARs'
- equ r.sample.chartest[0].charobj, 'Character data here!'
- equ r.sample.cdatatest[0].attrobj.desc, 'Test for CDATA'
- equ r.sample.cdatatest[0].attrobj.misc, 'true'
- equ r.sample.cdatatest[0].charobj, 'CDATA here!'
- equ r.sample.nochartest[0].attrobj.desc, 'No data'
- equ r.sample.nochartest[0].attrobj.misc, 'false')
-
- 'test child node without explicitArray': skeleton(explicitArray: false, (r) ->
- console.log 'Result object: ' + util.inspect r, false, 10
- equ r.sample.arraytest.item[0].subitem, 'Baz.'
- equ r.sample.arraytest.item[1].subitem[0], 'Foo.'
- equ r.sample.arraytest.item[1].subitem[1], 'Bar.')
-
- 'test child node with explicitArray': skeleton(explicitArray: true, (r) ->
- console.log 'Result object: ' + util.inspect r, false, 10
- equ r.sample.arraytest[0].item[0].subitem[0], 'Baz.'
- equ r.sample.arraytest[0].item[1].subitem[0], 'Foo.'
- equ r.sample.arraytest[0].item[1].subitem[1], 'Bar.')
-
- 'test ignore attributes': skeleton(ignoreAttrs: true, (r) ->
- console.log 'Result object: ' + util.inspect r, false, 10
- equ r.sample.chartest, 'Character data here!'
- equ r.sample.cdatatest, 'CDATA here!'
- assert.deepEqual r.sample.nochartest[0], {}
- equ r.sample.listtest[0].item[0]._, '\n This is\n \n character\n \n data!\n \n '
- equ r.sample.listtest[0].item[0].subitem[0], 'Foo(1)'
- equ r.sample.listtest[0].item[0].subitem[1], 'Foo(2)'
- equ r.sample.listtest[0].item[0].subitem[2], 'Foo(3)'
- equ r.sample.listtest[0].item[0].subitem[3], 'Foo(4)'
- equ r.sample.listtest[0].item[1], 'Qux.'
- equ r.sample.listtest[0].item[2], 'Quux.')
-
- 'test simple callback mode': (test) ->
- x2js = new xml2js.Parser()
- fs.readFile fileName, (err, data) ->
- equ err, null
- x2js.parseString data, (err, r) ->
- equ err, null
- # just a single test to check whether we parsed anything
- equ r.sample.chartest[0]._, 'Character data here!'
- test.finish()
-
- 'test double parse': (test) ->
- x2js = new xml2js.Parser()
- fs.readFile fileName, (err, data) ->
- equ err, null
- x2js.parseString data, (err, r) ->
- equ err, null
- # make sure we parsed anything
- equ r.sample.chartest[0]._, 'Character data here!'
- x2js.parseString data, (err, r) ->
- equ err, null
- equ r.sample.chartest[0]._, 'Character data here!'
- test.finish()
-
- 'test simple function without options': (test) ->
- fs.readFile fileName, (err, data) ->
- xml2js.parseString data, (err, r) ->
- equ err, null
- equ r.sample.chartest[0]._, 'Character data here!'
- test.finish()
-
- 'test simple function with options': (test) ->
- fs.readFile fileName, (err, data) ->
- # well, {} still counts as option, right?
- xml2js.parseString data, {}, (err, r) ->
- equ err, null
- equ r.sample.chartest[0]._, 'Character data here!'
- test.finish()
-
- 'test validator': skeleton(validator: validator, (r) ->
- console.log 'Result object: ' + util.inspect r, false, 10
- equ typeof r.sample.validatortest[0].stringtest[0], 'string'
- equ typeof r.sample.validatortest[0].numbertest[0], 'number'
- assert.ok r.sample.validatortest[0].emptyarray[0].item instanceof Array
- equ r.sample.validatortest[0].emptyarray[0].item.length, 0
- assert.ok r.sample.validatortest[0].oneitemarray[0].item instanceof Array
- equ r.sample.validatortest[0].oneitemarray[0].item.length, 1
- equ r.sample.validatortest[0].oneitemarray[0].item[0], 'Bar.'
- assert.ok r.sample.arraytest[0].item instanceof Array
- equ r.sample.arraytest[0].item.length, 2
- equ r.sample.arraytest[0].item[0].subitem[0], 'Baz.'
- equ r.sample.arraytest[0].item[1].subitem[0], 'Foo.'
- equ r.sample.arraytest[0].item[1].subitem[1], 'Bar.')
-
- 'test validation error': (test) ->
- x2js = new xml2js.Parser({validator: validator})
- x2js.parseString '', (err, r) ->
- equ err, 'Validation error!'
- test.finish()
-
- 'test xmlns': skeleton(xmlns: true, (r) ->
- console.log 'Result object: ' + util.inspect r, false, 10
- equ r.sample["pfx:top"][0].$ns.local, 'top'
- equ r.sample["pfx:top"][0].$ns.uri, 'http://foo.com'
- equ r.sample["pfx:top"][0].$["pfx:attr"].value, 'baz'
- equ r.sample["pfx:top"][0].$["pfx:attr"].local, 'attr'
- equ r.sample["pfx:top"][0].$["pfx:attr"].uri, 'http://foo.com'
- equ r.sample["pfx:top"][0].middle[0].$ns.local, 'middle'
- equ r.sample["pfx:top"][0].middle[0].$ns.uri, 'http://bar.com')
diff --git a/node_modules/aws-sdk/node_modules/xmlbuilder/.npmignore b/node_modules/aws-sdk/node_modules/xmlbuilder/.npmignore
deleted file mode 100644
index 29db5275..00000000
--- a/node_modules/aws-sdk/node_modules/xmlbuilder/.npmignore
+++ /dev/null
@@ -1,8 +0,0 @@
-.gitignore
-.travis.yml
-Makefile
-.git/
-src/
-test/
-node_modules/
-
diff --git a/node_modules/aws-sdk/node_modules/xmlbuilder/README.md b/node_modules/aws-sdk/node_modules/xmlbuilder/README.md
deleted file mode 100644
index 4025ea51..00000000
--- a/node_modules/aws-sdk/node_modules/xmlbuilder/README.md
+++ /dev/null
@@ -1,73 +0,0 @@
-# xmlbuilder-js
-
-An XMLBuilder for [node.js](http://nodejs.org/) similar to
-[java-xmlbuilder](http://code.google.com/p/java-xmlbuilder/).
-
-[](http://travis-ci.org/oozcitak/xmlbuilder-js)
-
-### Installation:
-
-``` sh
-npm install xmlbuilder
-```
-
-### Important:
-
-I had to break compatibility while adding multiple instances in 0.1.3.
-As a result, version from v0.1.3 are **not** compatible with previous versions.
-
-### Usage:
-
-``` js
-var builder = require('xmlbuilder');
-var xml = builder.create('root')
- .ele('xmlbuilder', {'for': 'node-js'})
- .ele('repo', {'type': 'git'}, 'git://github.com/oozcitak/xmlbuilder-js.git')
- .end({ pretty: true});
-
-console.log(xml);
-```
-
-will result in:
-
-``` xml
-
-
-
- git://github.com/oozcitak/xmlbuilder-js.git
-
-
-```
-
-If you need to do some processing:
-
-``` js
-var root = builder.create('squares');
-root.com('f(x) = x^2');
-for(var i = 1; i <= 5; i++)
-{
- var item = root.ele('data');
- item.att('x', i);
- item.att('y', i * i);
-}
-```
-
-This will result in:
-
-``` xml
-
-
-
-
-
-
-
-
-
-```
-
-See the [Usage](https://github.com/oozcitak/xmlbuilder-js/wiki/Usage) page in the wiki for more detailed instructions.
-
-### License:
-
-`xmlbuilder-js` is [MIT Licensed](http://opensource.org/licenses/mit-license.php).
diff --git a/node_modules/aws-sdk/node_modules/xmlbuilder/lib/XMLBuilder.js b/node_modules/aws-sdk/node_modules/xmlbuilder/lib/XMLBuilder.js
deleted file mode 100644
index 2850c8ad..00000000
--- a/node_modules/aws-sdk/node_modules/xmlbuilder/lib/XMLBuilder.js
+++ /dev/null
@@ -1,119 +0,0 @@
-// Generated by CoffeeScript 1.3.3
-(function() {
- var XMLBuilder, XMLFragment;
-
- XMLFragment = require('./XMLFragment');
-
- XMLBuilder = (function() {
-
- function XMLBuilder(name, xmldec, doctype) {
- var att, child, _ref;
- this.children = [];
- this.rootObject = null;
- if (this.is(name, 'Object')) {
- _ref = [name, xmldec], xmldec = _ref[0], doctype = _ref[1];
- name = null;
- }
- if (name != null) {
- name = '' + name || '';
- if (xmldec == null) {
- xmldec = {
- 'version': '1.0'
- };
- }
- }
- if ((xmldec != null) && !(xmldec.version != null)) {
- throw new Error("Version number is required");
- }
- if (xmldec != null) {
- xmldec.version = '' + xmldec.version || '';
- if (!xmldec.version.match(/1\.[0-9]+/)) {
- throw new Error("Invalid version number: " + xmldec.version);
- }
- att = {
- version: xmldec.version
- };
- if (xmldec.encoding != null) {
- xmldec.encoding = '' + xmldec.encoding || '';
- if (!xmldec.encoding.match(/[A-Za-z](?:[A-Za-z0-9._-]|-)*/)) {
- throw new Error("Invalid encoding: " + xmldec.encoding);
- }
- att.encoding = xmldec.encoding;
- }
- if (xmldec.standalone != null) {
- att.standalone = xmldec.standalone ? "yes" : "no";
- }
- child = new XMLFragment(this, '?xml', att);
- this.children.push(child);
- }
- if (doctype != null) {
- att = {};
- if (name != null) {
- att.name = name;
- }
- if (doctype.ext != null) {
- doctype.ext = '' + doctype.ext || '';
- att.ext = doctype.ext;
- }
- child = new XMLFragment(this, '!DOCTYPE', att);
- this.children.push(child);
- }
- if (name != null) {
- this.begin(name);
- }
- }
-
- XMLBuilder.prototype.begin = function(name, xmldec, doctype) {
- var doc, root;
- if (!(name != null)) {
- throw new Error("Root element needs a name");
- }
- if (this.rootObject) {
- this.children = [];
- this.rootObject = null;
- }
- if (xmldec != null) {
- doc = new XMLBuilder(name, xmldec, doctype);
- return doc.root();
- }
- name = '' + name || '';
- root = new XMLFragment(this, name, {});
- root.isRoot = true;
- root.documentObject = this;
- this.children.push(root);
- this.rootObject = root;
- return root;
- };
-
- XMLBuilder.prototype.root = function() {
- return this.rootObject;
- };
-
- XMLBuilder.prototype.end = function(options) {
- return toString(options);
- };
-
- XMLBuilder.prototype.toString = function(options) {
- var child, r, _i, _len, _ref;
- r = '';
- _ref = this.children;
- for (_i = 0, _len = _ref.length; _i < _len; _i++) {
- child = _ref[_i];
- r += child.toString(options);
- }
- return r;
- };
-
- XMLBuilder.prototype.is = function(obj, type) {
- var clas;
- clas = Object.prototype.toString.call(obj).slice(8, -1);
- return (obj != null) && clas === type;
- };
-
- return XMLBuilder;
-
- })();
-
- module.exports = XMLBuilder;
-
-}).call(this);
diff --git a/node_modules/aws-sdk/node_modules/xmlbuilder/lib/XMLFragment.js b/node_modules/aws-sdk/node_modules/xmlbuilder/lib/XMLFragment.js
deleted file mode 100644
index 7a0fff59..00000000
--- a/node_modules/aws-sdk/node_modules/xmlbuilder/lib/XMLFragment.js
+++ /dev/null
@@ -1,422 +0,0 @@
-// Generated by CoffeeScript 1.3.3
-(function() {
- var XMLFragment,
- __hasProp = {}.hasOwnProperty;
-
- XMLFragment = (function() {
-
- function XMLFragment(parent, name, attributes, text) {
- this.isRoot = false;
- this.documentObject = null;
- this.parent = parent;
- this.name = name;
- this.attributes = attributes;
- this.value = text;
- this.children = [];
- }
-
- XMLFragment.prototype.element = function(name, attributes, text) {
- var child, key, val, _ref, _ref1;
- if (!(name != null)) {
- throw new Error("Missing element name");
- }
- name = '' + name || '';
- this.assertLegalChar(name);
- if (attributes == null) {
- attributes = {};
- }
- if (this.is(attributes, 'String') && this.is(text, 'Object')) {
- _ref = [text, attributes], attributes = _ref[0], text = _ref[1];
- } else if (this.is(attributes, 'String')) {
- _ref1 = [{}, attributes], attributes = _ref1[0], text = _ref1[1];
- }
- for (key in attributes) {
- if (!__hasProp.call(attributes, key)) continue;
- val = attributes[key];
- val = '' + val || '';
- attributes[key] = this.escape(val);
- }
- child = new XMLFragment(this, name, attributes);
- if (text != null) {
- text = '' + text || '';
- text = this.escape(text);
- this.assertLegalChar(text);
- child.raw(text);
- }
- this.children.push(child);
- return child;
- };
-
- XMLFragment.prototype.insertBefore = function(name, attributes, text) {
- var child, i, key, val, _ref, _ref1;
- if (this.isRoot) {
- throw new Error("Cannot insert elements at root level");
- }
- if (!(name != null)) {
- throw new Error("Missing element name");
- }
- name = '' + name || '';
- this.assertLegalChar(name);
- if (attributes == null) {
- attributes = {};
- }
- if (this.is(attributes, 'String') && this.is(text, 'Object')) {
- _ref = [text, attributes], attributes = _ref[0], text = _ref[1];
- } else if (this.is(attributes, 'String')) {
- _ref1 = [{}, attributes], attributes = _ref1[0], text = _ref1[1];
- }
- for (key in attributes) {
- if (!__hasProp.call(attributes, key)) continue;
- val = attributes[key];
- val = '' + val || '';
- attributes[key] = this.escape(val);
- }
- child = new XMLFragment(this.parent, name, attributes);
- if (text != null) {
- text = '' + text || '';
- text = this.escape(text);
- this.assertLegalChar(text);
- child.raw(text);
- }
- i = this.parent.children.indexOf(this);
- this.parent.children.splice(i, 0, child);
- return child;
- };
-
- XMLFragment.prototype.insertAfter = function(name, attributes, text) {
- var child, i, key, val, _ref, _ref1;
- if (this.isRoot) {
- throw new Error("Cannot insert elements at root level");
- }
- if (!(name != null)) {
- throw new Error("Missing element name");
- }
- name = '' + name || '';
- this.assertLegalChar(name);
- if (attributes == null) {
- attributes = {};
- }
- if (this.is(attributes, 'String') && this.is(text, 'Object')) {
- _ref = [text, attributes], attributes = _ref[0], text = _ref[1];
- } else if (this.is(attributes, 'String')) {
- _ref1 = [{}, attributes], attributes = _ref1[0], text = _ref1[1];
- }
- for (key in attributes) {
- if (!__hasProp.call(attributes, key)) continue;
- val = attributes[key];
- val = '' + val || '';
- attributes[key] = this.escape(val);
- }
- child = new XMLFragment(this.parent, name, attributes);
- if (text != null) {
- text = '' + text || '';
- text = this.escape(text);
- this.assertLegalChar(text);
- child.raw(text);
- }
- i = this.parent.children.indexOf(this);
- this.parent.children.splice(i + 1, 0, child);
- return child;
- };
-
- XMLFragment.prototype.remove = function() {
- var i, _ref;
- if (this.isRoot) {
- throw new Error("Cannot remove the root element");
- }
- i = this.parent.children.indexOf(this);
- [].splice.apply(this.parent.children, [i, i - i + 1].concat(_ref = [])), _ref;
- return this.parent;
- };
-
- XMLFragment.prototype.text = function(value) {
- var child;
- if (!(value != null)) {
- throw new Error("Missing element text");
- }
- value = '' + value || '';
- value = this.escape(value);
- this.assertLegalChar(value);
- child = new XMLFragment(this, '', {}, value);
- this.children.push(child);
- return this;
- };
-
- XMLFragment.prototype.cdata = function(value) {
- var child;
- if (!(value != null)) {
- throw new Error("Missing CDATA text");
- }
- value = '' + value || '';
- this.assertLegalChar(value);
- if (value.match(/]]>/)) {
- throw new Error("Invalid CDATA text: " + value);
- }
- child = new XMLFragment(this, '', {}, '');
- this.children.push(child);
- return this;
- };
-
- XMLFragment.prototype.comment = function(value) {
- var child;
- if (!(value != null)) {
- throw new Error("Missing comment text");
- }
- value = '' + value || '';
- value = this.escape(value);
- this.assertLegalChar(value);
- if (value.match(/--/)) {
- throw new Error("Comment text cannot contain double-hypen: " + value);
- }
- child = new XMLFragment(this, '', {}, '');
- this.children.push(child);
- return this;
- };
-
- XMLFragment.prototype.raw = function(value) {
- var child;
- if (!(value != null)) {
- throw new Error("Missing raw text");
- }
- value = '' + value || '';
- child = new XMLFragment(this, '', {}, value);
- this.children.push(child);
- return this;
- };
-
- XMLFragment.prototype.up = function() {
- if (this.isRoot) {
- throw new Error("This node has no parent. Use doc() if you need to get the document object.");
- }
- return this.parent;
- };
-
- XMLFragment.prototype.root = function() {
- var child;
- if (this.isRoot) {
- return this;
- }
- child = this.parent;
- while (!child.isRoot) {
- child = child.parent;
- }
- return child;
- };
-
- XMLFragment.prototype.document = function() {
- return this.root().documentObject;
- };
-
- XMLFragment.prototype.end = function(options) {
- return this.document().toString(options);
- };
-
- XMLFragment.prototype.prev = function() {
- var i;
- if (this.isRoot) {
- throw new Error("Root node has no siblings");
- }
- i = this.parent.children.indexOf(this);
- if (i < 1) {
- throw new Error("Already at the first node");
- }
- return this.parent.children[i - 1];
- };
-
- XMLFragment.prototype.next = function() {
- var i;
- if (this.isRoot) {
- throw new Error("Root node has no siblings");
- }
- i = this.parent.children.indexOf(this);
- if (i === -1 || i === this.parent.children.length - 1) {
- throw new Error("Already at the last node");
- }
- return this.parent.children[i + 1];
- };
-
- XMLFragment.prototype.clone = function(deep) {
- var clonedSelf;
- clonedSelf = new XMLFragment(this.parent, this.name, this.attributes, this.value);
- if (deep) {
- this.children.forEach(function(child) {
- var clonedChild;
- clonedChild = child.clone(deep);
- clonedChild.parent = clonedSelf;
- return clonedSelf.children.push(clonedChild);
- });
- }
- return clonedSelf;
- };
-
- XMLFragment.prototype.importXMLBuilder = function(xmlbuilder) {
- var clonedRoot;
- clonedRoot = xmlbuilder.root().clone(true);
- clonedRoot.parent = this;
- this.children.push(clonedRoot);
- clonedRoot.isRoot = false;
- return this;
- };
-
- XMLFragment.prototype.attribute = function(name, value) {
- var _ref;
- if (!(name != null)) {
- throw new Error("Missing attribute name");
- }
- if (!(value != null)) {
- throw new Error("Missing attribute value");
- }
- name = '' + name || '';
- value = '' + value || '';
- if ((_ref = this.attributes) == null) {
- this.attributes = {};
- }
- this.attributes[name] = this.escape(value);
- return this;
- };
-
- XMLFragment.prototype.removeAttribute = function(name) {
- if (!(name != null)) {
- throw new Error("Missing attribute name");
- }
- name = '' + name || '';
- delete this.attributes[name];
- return this;
- };
-
- XMLFragment.prototype.toString = function(options, level) {
- var attName, attValue, child, indent, newline, pretty, r, space, _i, _len, _ref, _ref1;
- pretty = (options != null) && options.pretty || false;
- indent = (options != null) && options.indent || ' ';
- newline = (options != null) && options.newline || '\n';
- level || (level = 0);
- space = new Array(level + 1).join(indent);
- r = '';
- if (pretty) {
- r += space;
- }
- if (!(this.value != null)) {
- r += '<' + this.name;
- } else {
- r += '' + this.value;
- }
- _ref = this.attributes;
- for (attName in _ref) {
- attValue = _ref[attName];
- if (this.name === '!DOCTYPE') {
- r += ' ' + attValue;
- } else {
- r += ' ' + attName + '="' + attValue + '"';
- }
- }
- if (this.children.length === 0) {
- if (!(this.value != null)) {
- r += this.name === '?xml' ? '?>' : this.name === '!DOCTYPE' ? '>' : '/>';
- }
- if (pretty) {
- r += newline;
- }
- } else if (pretty && this.children.length === 1 && this.children[0].value) {
- r += '>';
- r += this.children[0].value;
- r += '' + this.name + '>';
- r += newline;
- } else {
- r += '>';
- if (pretty) {
- r += newline;
- }
- _ref1 = this.children;
- for (_i = 0, _len = _ref1.length; _i < _len; _i++) {
- child = _ref1[_i];
- r += child.toString(options, level + 1);
- }
- if (pretty) {
- r += space;
- }
- r += '' + this.name + '>';
- if (pretty) {
- r += newline;
- }
- }
- return r;
- };
-
- XMLFragment.prototype.escape = function(str) {
- return str.replace(/&/g, '&').replace(//g, '>').replace(/'/g, ''').replace(/"/g, '"');
- };
-
- XMLFragment.prototype.assertLegalChar = function(str) {
- var chars, chr;
- chars = /[\u0000-\u0008\u000B-\u000C\u000E-\u001F\uD800-\uDFFF\uFFFE-\uFFFF]/;
- chr = str.match(chars);
- if (chr) {
- throw new Error("Invalid character (" + chr + ") in string: " + str);
- }
- };
-
- XMLFragment.prototype.is = function(obj, type) {
- var clas;
- clas = Object.prototype.toString.call(obj).slice(8, -1);
- return (obj != null) && clas === type;
- };
-
- XMLFragment.prototype.ele = function(name, attributes, text) {
- return this.element(name, attributes, text);
- };
-
- XMLFragment.prototype.txt = function(value) {
- return this.text(value);
- };
-
- XMLFragment.prototype.dat = function(value) {
- return this.cdata(value);
- };
-
- XMLFragment.prototype.att = function(name, value) {
- return this.attribute(name, value);
- };
-
- XMLFragment.prototype.com = function(value) {
- return this.comment(value);
- };
-
- XMLFragment.prototype.doc = function() {
- return this.document();
- };
-
- XMLFragment.prototype.e = function(name, attributes, text) {
- return this.element(name, attributes, text);
- };
-
- XMLFragment.prototype.t = function(value) {
- return this.text(value);
- };
-
- XMLFragment.prototype.d = function(value) {
- return this.cdata(value);
- };
-
- XMLFragment.prototype.a = function(name, value) {
- return this.attribute(name, value);
- };
-
- XMLFragment.prototype.c = function(value) {
- return this.comment(value);
- };
-
- XMLFragment.prototype.r = function(value) {
- return this.raw(value);
- };
-
- XMLFragment.prototype.u = function() {
- return this.up();
- };
-
- return XMLFragment;
-
- })();
-
- module.exports = XMLFragment;
-
-}).call(this);
diff --git a/node_modules/aws-sdk/node_modules/xmlbuilder/lib/index.js b/node_modules/aws-sdk/node_modules/xmlbuilder/lib/index.js
deleted file mode 100644
index a930f5b0..00000000
--- a/node_modules/aws-sdk/node_modules/xmlbuilder/lib/index.js
+++ /dev/null
@@ -1,15 +0,0 @@
-// Generated by CoffeeScript 1.3.3
-(function() {
- var XMLBuilder;
-
- XMLBuilder = require('./XMLBuilder');
-
- module.exports.create = function(name, xmldec, doctype) {
- if (name != null) {
- return new XMLBuilder(name, xmldec, doctype).root();
- } else {
- return new XMLBuilder();
- }
- };
-
-}).call(this);
diff --git a/node_modules/aws-sdk/node_modules/xmlbuilder/package.json b/node_modules/aws-sdk/node_modules/xmlbuilder/package.json
deleted file mode 100644
index e901012f..00000000
--- a/node_modules/aws-sdk/node_modules/xmlbuilder/package.json
+++ /dev/null
@@ -1,41 +0,0 @@
-{
- "name": "xmlbuilder",
- "version": "0.4.2",
- "keywords": [
- "xml",
- "xmlbuilder"
- ],
- "homepage": "http://github.com/oozcitak/xmlbuilder-js",
- "description": "An XML builder for node.js",
- "author": {
- "name": "Ozgur Ozcitak",
- "email": "oozcitak@gmail.com"
- },
- "licenses": [
- {
- "type": "MIT",
- "url": "http://opensource.org/licenses/mit-license.php"
- }
- ],
- "repository": {
- "type": "git",
- "url": "git://github.com/oozcitak/xmlbuilder-js.git"
- },
- "bugs": {
- "url": "http://github.com/oozcitak/xmlbuilder-js/issues"
- },
- "main": "./lib/index",
- "engines": {
- "node": ">=0.2.0"
- },
- "devDependencies": {
- "coffee-script": "1.1.x"
- },
- "scripts": {
- "test": "make test"
- },
- "readme": "# xmlbuilder-js\n\nAn XMLBuilder for [node.js](http://nodejs.org/) similar to \n[java-xmlbuilder](http://code.google.com/p/java-xmlbuilder/).\n\n[](http://travis-ci.org/oozcitak/xmlbuilder-js)\n\n### Installation:\n\n``` sh\nnpm install xmlbuilder\n```\n\n### Important:\n\nI had to break compatibility while adding multiple instances in 0.1.3. \nAs a result, version from v0.1.3 are **not** compatible with previous versions.\n\n### Usage:\n\n``` js\nvar builder = require('xmlbuilder');\nvar xml = builder.create('root')\n .ele('xmlbuilder', {'for': 'node-js'})\n .ele('repo', {'type': 'git'}, 'git://github.com/oozcitak/xmlbuilder-js.git')\n .end({ pretty: true});\n \nconsole.log(xml);\n```\n\nwill result in:\n\n``` xml\n\n\n \n git://github.com/oozcitak/xmlbuilder-js.git\n \n\n```\n\nIf you need to do some processing:\n\n``` js\nvar root = builder.create('squares');\nroot.com('f(x) = x^2');\nfor(var i = 1; i <= 5; i++)\n{\n var item = root.ele('data');\n item.att('x', i);\n item.att('y', i * i);\n}\n```\n\nThis will result in:\n\n``` xml\n\n\n \n \n \n \n \n \n\n```\n\nSee the [Usage](https://github.com/oozcitak/xmlbuilder-js/wiki/Usage) page in the wiki for more detailed instructions.\n\n### License:\n\n`xmlbuilder-js` is [MIT Licensed](http://opensource.org/licenses/mit-license.php).\n",
- "readmeFilename": "README.md",
- "_id": "xmlbuilder@0.4.2",
- "_from": "xmlbuilder@0.4.2"
-}
diff --git a/node_modules/aws-sdk/package.json b/node_modules/aws-sdk/package.json
deleted file mode 100644
index 9f8bb4ad..00000000
--- a/node_modules/aws-sdk/package.json
+++ /dev/null
@@ -1,106 +0,0 @@
-{
- "name": "aws-sdk",
- "description": "AWS SDK for JavaScript",
- "version": "2.0.0-rc13",
- "author": {
- "name": "Amazon Web Services",
- "url": "http://aws.amazon.com/"
- },
- "homepage": "https://github.com/aws/aws-sdk-js",
- "contributors": [
- {
- "name": "Loren Segal",
- "email": "lsegal@amazon.com"
- },
- {
- "name": "Trevor Rowe",
- "email": "trevrowe@amazon.com"
- }
- ],
- "devDependencies": {
- "repl.history": "*",
- "jasmine-node": "*",
- "semver": "*",
- "coffee-script": "1.6.3",
- "eslint": "git://github.com/lsegal/eslint#add-filename-to-rules",
- "cucumber": "*",
- "coffeeify": "*"
- },
- "dependencies": {
- "aws-sdk-apis": "2.x",
- "xml2js": "0.2.4",
- "xmlbuilder": "0.4.2"
- },
- "main": "lib/aws.js",
- "directories": {
- "lib": "lib"
- },
- "engines": {
- "node": ">= 0.6.0"
- },
- "repository": {
- "type": "git",
- "url": "git://github.com/aws/aws-sdk-js"
- },
- "bugs": {
- "url": "http://github.com/aws/aws-sdk-js/issues"
- },
- "licenses": [
- {
- "type": "Apache 2.0",
- "url": "http://github.com/aws/aws-sdk-js/raw/master/LICENSE.txt"
- }
- ],
- "keywords": [
- "api",
- "amazon",
- "aws",
- "ec2",
- "simpledb",
- "s3",
- "sqs",
- "ses",
- "sns",
- "route53",
- "rds",
- "elasticache",
- "cloudfront",
- "fps",
- "cloudformation",
- "cloudwatch",
- "dynamodb",
- "iam",
- "swf",
- "autoscaling",
- "cloudsearch",
- "elb",
- "loadbalancing",
- "emr",
- "mapreduce",
- "importexport",
- "storagegateway",
- "workflow",
- "ebs",
- "vpc",
- "beanstalk",
- "glacier",
- "kinesis",
- "cloudtrail"
- ],
- "scripts": {
- "test": "npm -s run-script lint && npm -s run-script unit && npm -s run-script browsertest && ([ -f configuration ] && npm -s run-script integration || true)",
- "unit": "jasmine-node --noColor --coffee test",
- "browsertest": "rake browser:test",
- "integration": "cucumber.js",
- "lint": "eslint --rulesdir eslint-rules lib",
- "console": "./scripts/console"
- },
- "readme": "# AWS SDK for JavaScript [](http://badge.fury.io/js/aws-sdk) [](https://travis-ci.org/aws/aws-sdk-js)\n\nThe official AWS SDK for JavaScript, available for browsers and mobile devices,\nor Node.js backends\n\nRelease notes can be found at http://aws.amazon.com/releasenotes/SDK/JavaScript\n\n## Installing\n\n### In the Browser\n\nTo use the SDK in the browser, simply add the following script tag to your\nHTML pages:\n\n \n\n### In Node.js\n\nThe preferred way to install the AWS SDK for Node.js is to use the\n[npm](http://npmjs.org) package manager for Node.js. Simply type the following\ninto a terminal window:\n\n```sh\nnpm install aws-sdk\n```\n\n## Usage and Getting Started\n\nYou can find a getting started guide at:\n\nhttp://docs.aws.amazon.com/AWSJavaScriptSDK/guide/\n\n## Supported Services\n\n
Note:\nAlthough all services are supported in the browser version of the SDK,\nnot all of the services are available in the default hosted build (using the\nscript tag provided above). A list of services in the hosted build are provided\nin the \"Working With Services\"\nsection of the browser SDK guide, including instructions on how to build a\ncustom version of the SDK with extra services.\n
\n\nThe SDK currently supports the following services:\n\n
\n \n
Service Name
\n
Class Name
\n
API Version
\n \n \n
Amazon CloudFront
AWS.CloudFront
2012-05-05
\n
2013-11-11
\n
Amazon CloudSearch
AWS.CloudSearch
2011-02-01
\n
2013-01-01
\n
Amazon CloudWatch
AWS.CloudWatch
2010-08-01
\n
Amazon DynamoDB
AWS.DynamoDB
2011-12-05
\n
2012-08-10
\n
Amazon Elastic Compute Cloud
AWS.EC2
2014-02-01
\n
Amazon Elastic MapReduce
AWS.EMR
2009-03-31
\n
Amazon Elastic Transcoder
AWS.ElasticTranscoder
2012-09-25
\n
Amazon ElastiCache
AWS.ElastiCache
2013-06-15
\n
Amazon Glacier
AWS.Glacier
2012-06-01
\n
Amazon Kinesis
AWS.Kinesis
2013-12-02
\n
Amazon Redshift
AWS.Redshift
2012-12-01
\n
Amazon Relational Database Service
AWS.RDS
2013-01-10
\n
2013-02-12
\n
2013-09-09
\n
Amazon Route 53
AWS.Route53
2013-04-01
\n
Amazon Simple Email Service
AWS.SES
2010-12-01
\n
Amazon Simple Notification Service
AWS.SNS
2010-03-31
\n
Amazon Simple Queue Service
AWS.SQS
2012-11-05
\n
Amazon Simple Storage Service
AWS.S3
2006-03-01
\n
Amazon Simple Workflow Service
AWS.SimpleWorkflow
2012-01-25
\n
Amazon SimpleDB
AWS.SimpleDB
2009-04-15
\n
Auto Scaling
AWS.AutoScaling
2011-01-01
\n
AWS CloudFormation
AWS.CloudFormation
2010-05-15
\n
AWS CloudTrail
AWS.CloudTrail
2013-11-01
\n
AWS Data Pipeline
AWS.DataPipeline
2012-10-29
\n
AWS Direct Connect
AWS.DirectConnect
2012-10-25
\n
AWS Elastic Beanstalk
AWS.ElasticBeanstalk
2010-12-01
\n
AWS Identity and Access Management
AWS.IAM
2010-05-08
\n
AWS Import/Export
AWS.ImportExport
2010-06-01
\n
AWS OpsWorks
AWS.OpsWorks
2013-02-18
\n
AWS Security Token Service
AWS.STS
2011-06-15
\n
AWS Storage Gateway
AWS.StorageGateway
2012-06-30
\n
2013-06-30
\n
AWS Support
AWS.Support
2013-04-15
\n
Elastic Load Balancing
AWS.ELB
2012-06-01
\n \n
\n\n## License\n\nThis SDK is distributed under the\n[Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0).\n\n```no-highlight\nCopyright 2012-2014. Amazon Web Services, Inc. All Rights Reserved.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n```\n",
- "readmeFilename": "README.md",
- "_id": "aws-sdk@2.0.0-rc13",
- "dist": {
- "shasum": "12674f837831a8c500af12debe28305a1b418977"
- },
- "_from": "aws-sdk@~>2.0.0",
- "_resolved": "https://registry.npmjs.org/aws-sdk/-/aws-sdk-2.0.0-rc13.tgz"
-}
diff --git a/node_modules/aws-sdk/scripts/console b/node_modules/aws-sdk/scripts/console
deleted file mode 100644
index 261c8879..00000000
--- a/node_modules/aws-sdk/scripts/console
+++ /dev/null
@@ -1,65 +0,0 @@
-#!/usr/bin/env node
-
-var repl = require('repl').start('aws-sdk> '),
- replEval = repl.eval,
- replHistory = require('repl.history'),
- defaultOptions = {
- logger: process.stdout,
- region: process.env.AWS_REGION || 'us-east-1'
- };
-
-
-function customEval(cmd, context, filename, callback) {
- replEval(cmd, context, filename, function(err, value) {
- if (err) {
- callback(err, null);
- return;
- }
-
- if (value && value.constructor === AWS.Request) {
- if (!value.__hasBeenSent__) {
- value.__hasBeenSent__ = true;
- try {
- value.on('complete', function consoleDataExtraction(resp) {
- context.data = resp.data;
- context.error = resp.error;
- callback(resp.error, resp.data);
- });
- context.request = value;
- context.data = null;
- context.error = null;
- context.response = value.send();
- } catch (err2) {
- callback(err2, null);
- return;
- }
- }
- } else {
- callback(null, value);
- }
- });
-}
-
-var AWS = repl.context.AWS = require('../lib/aws');
-repl.eval = customEval;
-
-// context variables
-repl.context.data = null;
-repl.context.error = null;
-repl.context.request = null;
-repl.context.response = null;
-
-// setup REPL history
-replHistory(repl, process.env.HOME + '/.node_history');
-
-// load services as defined instances
-for (var key in AWS) {
- if (AWS[key].serviceIdentifier) {
- var svcClass = AWS[key];
- var svc = new svcClass(defaultOptions);
- svc.with = function(config) {
- return new this.constructor.__super__(AWS.util.merge(this.config, config));
- };
- repl.context[svcClass.serviceIdentifier] = svc;
- }
-}
diff --git a/node_modules/aws-sdk/scripts/coverage b/node_modules/aws-sdk/scripts/coverage
deleted file mode 100644
index 5fdf53e7..00000000
--- a/node_modules/aws-sdk/scripts/coverage
+++ /dev/null
@@ -1,126 +0,0 @@
-#!/usr/bin/env node
-
-var fs = require('fs');
-var path = require('path');
-
-var FFI = require('node-ffi');
-var libc = new FFI.Library(null, {'system': ['int32', ['string']]});
-var exec = libc.system;
-
-var jsRequire = require.extensions['.js'];
-require.extensions['.js'] = function(module, filename) {
- var baseFile = path.relative(path.join(__dirname, '..'), filename);
- if (baseFile.match(/^lib\//)) {
- filename = filename.replace(/\/lib\//, '/lib-cov/');
- }
- jsRequire(module, filename);
-}
-
-function printStats(file, covered, total) {
- var maxFileLength = 26;
- var pad = maxFileLength - file.length;
- for (var i = 0; i < pad; i++) file += ' ';
- console.log(file + ' ' +
- (parseFloat(covered) / parseFloat(total) * 100).toFixed(2) + '%' +
- ((covered != total) ? ' ' : ' ') +
- '(' + covered + '/' + total + ')');
-}
-
-function cleanup() {
- exec('rm -rf lib-cov');
-}
-
-process.on('uncaughtException', function(err) {
- cleanup();
- throw err;
-});
-
-process.on('exit', function() {
- var out = 'NO COVERAGE';
- if (typeof(_$jscoverage) !== 'undefined') {
- var stats = {}
- var entireCovered = 0;
- var entireTotal = 0;
- out = '';
- var cov = _$jscoverage;
- for (var file in cov) {
- stats[file] = {covered: 0, total: 0};
- var id = file.replace(/[\.\/]/, '_');
- var total = cov[file].length;
- var uncovered = 0;
- for (var idx in cov[file]) {
- if (cov[file][idx] === 0) uncovered++;
- }
- var covered = total - uncovered;
- stats[file].covered = covered;
- stats[file].total = total;
- entireCovered += covered;
- entireTotal += total;
-
- out += '
Transports which don't support cross-domain communication natively
- ('eventsource' to name one) use an iframe trick. A simple page is
- served from the SockJS server (using its foreign domain) and is
- placed in an invisible iframe. Code run from this iframe doesn't
- need to worry about cross-domain issues, as it's being run from
- domain local to the SockJS server. This iframe also does need to
- load SockJS javascript client library, and this option lets you specify
- its url (if you're unsure, point it to
-
- the latest minified SockJS client release, this is the default).
- You must explicitly specify this url on the server side for security
- reasons - we don't want the possibility of running any foreign
- javascript within the SockJS domain (aka cross site scripting attack).
- Also, sockjs javascript library is probably already cached by the
- browser - it makes sense to reuse the sockjs url you're using in
- normally.
-
-
prefix (string)
-
A url prefix for the server. All http requests which paths begins
- with selected prefix will be handled by SockJS. All other requests
- will be passed through, to previously registered handlers.
-
-
response_limit (integer)
-
Most streaming transports save responses on the client side and
- don't free memory used by delivered messages. Such transports need
- to be garbage-collected once in a while. `response_limit` sets
- a minimum number of bytes that can be send over a single http streaming
- request before it will be closed. After that client needs to open
- new request. Setting this value to one effectively disables
- streaming and will make streaming transports to behave like polling
- transports. The default value is 128K.
-
-
websocket (boolean)
-
Some load balancers don't support websockets. This option can be used
- to disable websockets support by the server. By default websockets are
- enabled.
-
-
jsessionid (boolean or function)
-
Some hosting providers enable sticky sessions only to requests that
- have JSESSIONID cookie set. This setting controls if the server should
- set this cookie to a dummy value. By default setting JSESSIONID cookie
- is disabled. More sophisticated behaviour can be achieved by supplying
- a function.
-
-
log (function(severity, message))
-
It's quite useful, especially for debugging, to see some messages
- printed by a SockJS-node library. This is done using this `log`
- function, which is by default set to `console.log`. If this
- behaviour annoys you for some reason, override `log` setting with a
- custom handler. The following `severities` are used: `debug`
- (miscellaneous logs), `info` (requests logs), `error` (serious
- errors, consider filing an issue).
-
-
heartbeat_delay (milliseconds)
-
In order to keep proxies and load balancers from closing long
- running http requests we need to pretend that the connection is
- active and send a heartbeat packet once in a while. This setting
- controls how often this is done. By default a heartbeat packet is
- sent every 25 seconds.
-
-
disconnect_delay (milliseconds)
-
The server sends a `close` event when a client receiving
- connection have not been seen for a while. This delay is configured
- by this setting. By default the `close` event will be emitted when a
- receiving connection wasn't seen for 5 seconds.
-
-
-
-### Server instance
-
-Once you have create `Server` instance you can hook it to the
-[http.Server instance](http://nodejs.org/docs/v0.5.8/api/http.html#http.createServer).
-
-```javascript
-var http_server = http.createServer();
-sockjs_server.installHandlers(http_server, options);
-http_server.listen(...);
-```
-
-Where `options` can overshadow options given when creating `Server`
-instance.
-
-`Server` instance is an
-[EventEmitter](http://nodejs.org/docs/v0.4.10/api/events.html#events.EventEmitter),
-and emits following event:
-
-
-
Event: connection (connection)
-
A new connection has been successfully opened.
-
-
-All http requests that don't go under the path selected by `prefix`
-will remain unanswered and will be passed to previously registered
-handlers. You must install your custom http handlers before calling
-`installHandlers`.
-
-### Connection instance
-
-A `Connection` instance supports
-[Node Stream API](http://nodejs.org/docs/v0.5.8/api/streams.html) and
-has following methods and properties:
-
-
-
Property: readable (boolean)
-
Is the stream readable?
-
-
Property: writable (boolean)
-
Is the stream writable?
-
-
Property: remoteAddress (string)
-
Last known IP address of the client.
-
-
Property: remotePort (number)
-
Last known port number of the client.
-
-
Property: address (object)
-
Hash with 'address' and 'port' fields.
-
-
Property: headers (object)
-
Hash containing various headers copied from last receiving request
- on that connection. Exposed headers include: `origin`, `referer`
- and `x-forwarded-for` (and friends). We explicitly do not grant
- access to `cookie` header, as using it may easily lead to security
- issues (for details read the section "Authorisation").
Prefix of the url on which the request was handled.
-
-
Property: protocol (string)
-
Protocol used by the connection. Keep in mind that some protocols
- are indistinguishable - for example "xhr-polling" and "xdr-polling".
-
-
Property: readyState (integer)
-
Current state of the connection:
- 0-connecting, 1-open, 2-closing, 3-closed.
-
-
write(message)
-
Sends a message over opened connection. A message must be a
- non-empty string. It's illegal to send a message after the connection was
- closed (either after 'close' or 'end' method or 'close' event).
-
-
close([code], [reason])
-
Asks the remote client to disconnect. 'code' and 'reason'
- parameters are optional and can be used to share the reason of
- disconnection.
-
-
end()
-
Asks the remote client to disconnect with default 'code' and
- 'reason' values.
-
-
-
-A `Connection` instance emits the following events:
-
-
-
Event: data (message)
-
A message arrived on the connection. Message is a unicode
- string.
-
-
Event: close ()
-
Connection was closed. This event is triggered exactly once for
- every connection.
-
-
-For example:
-
-```javascript
-sockjs_server.on('connection', function(conn) {
- console.log('connection' + conn);
- conn.on('close', function() {
- console.log('close ' + conn);
- });
- conn.on('data', function(message) {
- console.log('message ' + conn,
- message);
- });
-});
-```
-
-### Footnote
-
-A fully working echo server does need a bit more boilerplate (to
-handle requests unanswered by SockJS), see the
-[`echo` example](https://github.com/sockjs/sockjs-node/tree/master/examples/echo)
-for a complete code.
-
-### Examples
-
-If you want to see samples of running code, take a look at:
-
- * [./examples/echo](https://github.com/sockjs/sockjs-node/tree/master/examples/echo)
- directory, which contains a full example of a echo server.
- * [./examples/test_server](https://github.com/sockjs/sockjs-node/tree/master/examples/test_server) a standard SockJS test server.
-
-
-Connecting to SockJS-node without the client
---------------------------------------------
-
-Although the main point of SockJS it to enable browser-to-server
-connectivity, it is possible to connect to SockJS from an external
-application. Any SockJS server complying with 0.3 protocol does
-support a raw WebSocket url. The raw WebSocket url for the test server
-looks like:
-
- * ws://localhost:8081/echo/websocket
-
-You can connect any WebSocket RFC 6455 compliant WebSocket client to
-this url. This can be a command line client, external application,
-third party code or even a browser (though I don't know why you would
-want to do so).
-
-
-Deployment and load balancing
------------------------------
-
-There are two issues that need to be considered when planning a
-non-trivial SockJS-node deployment: WebSocket-compatible load balancer
-and sticky sessions (aka session affinity).
-
-### WebSocket compatible load balancer
-
-Often WebSockets don't play nicely with proxies and load balancers.
-Deploying a SockJS server behind Nginx or Apache could be painful.
-
-Fortunately recent versions of an excellent load balancer
-[HAProxy](http://haproxy.1wt.eu/) are able to proxy WebSocket
-connections. We propose to put HAProxy as a front line load balancer
-and use it to split SockJS traffic from normal HTTP data. Take a look
-at the sample
-[SockJS HAProxy configuration](https://github.com/sockjs/sockjs-node/blob/master/examples/haproxy.cfg).
-
-The config also shows how to use HAproxy balancing to split traffic
-between multiple Node.js servers. You can also do balancing using dns
-names.
-
-### Sticky sessions
-
-If you plan deploying more than one SockJS server, you must make sure
-that all HTTP requests for a single session will hit the same server.
-SockJS has two mechanisms that can be useful to achieve that:
-
- * Urls are prefixed with server and session id numbers, like:
- `/resource///transport`. This is
- useful for load balancers that support prefix-based affinity
- (HAProxy does).
- * `JSESSIONID` cookie is being set by SockJS-node. Many load
- balancers turn on sticky sessions if that cookie is set. This
- technique is derived from Java applications, where sticky sessions
- are often necessary. HAProxy does support this method, as well as
- some hosting providers, for example CloudFoundry. In order to
- enable this method on the client side, please supply a
- `cookie:true` option to SockJS constructor.
-
-
-Development and testing
------------------------
-
-If you want to work on SockJS-node source code, you need to clone the
-git repo and follow these steps. First you need to install
-dependencies:
-
- cd sockjs-node
- npm install
- npm install --dev
- ln -s .. node_modules/sockjs
-
-You're ready to compile CoffeeScript:
-
- make build
-
-If compilation succeeds you may want to test if your changes pass all
-the tests. Currently, there are two separate test suites. For both of
-them you need to start a SockJS-node test server (by default listening
-on port 8081):
-
- make test_server
-
-### SockJS-protocol Python tests
-
-To run it run something like:
-
- cd sockjs-protocol
- make test_deps
- ./venv/bin/python sockjs-protocol-0.3.py
-
-For details see
-[SockJS-protocol README](https://github.com/sockjs/sockjs-protocol#readme).
-
-### SockJS-client QUnit tests
-
-You need to start a second web server (by default listening on 8080)
-that is serving various static html and javascript files:
-
- cd sockjs-client
- make test
-
-At that point you should have two web servers running: sockjs-node on
-8081 and sockjs-client on 8080. When you open the browser on
-[http://localhost:8080/](http://localhost:8080/) you should be able
-run the QUnit tests against your sockjs-node server.
-
-For details see
-[SockJS-client README](https://github.com/sockjs/sockjs-client#readme).
-
-Additionally, if you're doing more serious development consider using
-`make serve`, which will automatically the server when you modify the
-source code.
-
-
-Various issues and design considerations
-----------------------------------------
-
-### Authorisation
-
-SockJS-node does not expose cookies to the application. This is done
-deliberately as using cookie-based authorisation with SockJS simply
-doesn't make sense and will lead to security issues.
-
-Cookies are a contract between a browser and an http server, and are
-identified by a domain name. If a browser has a cookie set for
-particular domain, it will pass it as a part of all http requests to
-the host. But to get various transports working, SockJS uses a middleman
-- an iframe hosted from target SockJS domain. That means the server
-will receive requests from the iframe, and not from the real
-domain. The domain of an iframe is the same as the SockJS domain. The
-problem is that any website can embed the iframe and communicate with
-it - and request establishing SockJS connection. Using cookies for
-authorisation in this scenario will result in granting full access to
-SockJS communication with your website from any website. This is a
-classic CSRF attack.
-
-Basically - cookies are not suited for SockJS model. If you want to
-authorise a session - provide a unique token on a page, send it as a
-first thing over SockJS connection and validate it on the server
-side. In essence, this is how cookies work.
-
-
-### Deploying SockJS on Heroku
-
-Long polling is known to cause problems on Heroku, but
-[workaround for SockJS is available](https://github.com/sockjs/sockjs-node/issues/57#issuecomment-5242187).
diff --git a/node_modules/coalesce/node_modules/sockjs/examples/echo/README.md b/node_modules/coalesce/node_modules/sockjs/examples/echo/README.md
deleted file mode 100644
index a59d4e50..00000000
--- a/node_modules/coalesce/node_modules/sockjs/examples/echo/README.md
+++ /dev/null
@@ -1,15 +0,0 @@
-SockJS-node Echo example
-========================
-
-To run this example, first install dependencies:
-
- npm install
-
-And run a server:
-
- node server.js
-
-
-That will spawn an http server at http://127.0.0.1:9999/ which will
-serve both html (served from the current directory) and also SockJS
-server (under the [/echo](http://127.0.0.1:9999/echo) path).
diff --git a/node_modules/coalesce/node_modules/sockjs/examples/echo/index.html b/node_modules/coalesce/node_modules/sockjs/examples/echo/index.html
deleted file mode 100644
index a3ce2b40..00000000
--- a/node_modules/coalesce/node_modules/sockjs/examples/echo/index.html
+++ /dev/null
@@ -1,71 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/node_modules/coalesce/node_modules/sockjs/node_modules/faye-websocket/lib/faye/eventsource.js b/node_modules/coalesce/node_modules/sockjs/node_modules/faye-websocket/lib/faye/eventsource.js
deleted file mode 100644
index 4b07533b..00000000
--- a/node_modules/coalesce/node_modules/sockjs/node_modules/faye-websocket/lib/faye/eventsource.js
+++ /dev/null
@@ -1,132 +0,0 @@
-var Stream = require('stream').Stream,
- util = require('util'),
- driver = require('websocket-driver'),
- Headers = require('websocket-driver/lib/websocket/driver/headers'),
- API = require('./websocket/api'),
- EventTarget = require('./websocket/api/event_target'),
- Event = require('./websocket/api/event');
-
-var EventSource = function(request, response, options) {
- this.writable = true;
- options = options || {};
-
- this._stream = response.socket;
- this._ping = options.ping || this.DEFAULT_PING;
- this._retry = options.retry || this.DEFAULT_RETRY;
-
- var scheme = driver.isSecureRequest(request) ? 'https:' : 'http:';
- this.url = scheme + '//' + request.headers.host + request.url;
- this.lastEventId = request.headers['last-event-id'] || '';
- this.readyState = API.CONNECTING;
-
- var headers = new Headers(),
- self = this;
-
- if (options.headers) {
- for (var key in options.headers) headers.set(key, options.headers[key]);
- }
-
- if (!this._stream || !this._stream.writable) return;
- process.nextTick(function() { self._open() });
-
- this._stream.setTimeout(0);
- this._stream.setNoDelay(true);
-
- var handshake = 'HTTP/1.1 200 OK\r\n' +
- 'Content-Type: text/event-stream\r\n' +
- 'Cache-Control: no-cache, no-store\r\n' +
- 'Connection: close\r\n' +
- headers.toString() +
- '\r\n' +
- 'retry: ' + Math.floor(this._retry * 1000) + '\r\n\r\n';
-
- this._write(handshake);
-
- this._stream.on('drain', function() { self.emit('drain') });
-
- if (this._ping)
- this._pingTimer = setInterval(function() { self.ping() }, this._ping * 1000);
-
- ['error', 'end'].forEach(function(event) {
- self._stream.on(event, function() { self.close() });
- });
-};
-util.inherits(EventSource, Stream);
-
-EventSource.isEventSource = function(request) {
- if (request.method !== 'GET') return false;
- var accept = (request.headers.accept || '').split(/\s*,\s*/);
- return accept.indexOf('text/event-stream') >= 0;
-};
-
-var instance = {
- DEFAULT_PING: 10,
- DEFAULT_RETRY: 5,
-
- _write: function(chunk) {
- if (!this.writable) return false;
- try {
- return this._stream.write(chunk, 'utf8');
- } catch (e) {
- return false;
- }
- },
-
- _open: function() {
- if (this.readyState !== API.CONNECTING) return;
-
- this.readyState = API.OPEN;
-
- var event = new Event('open');
- event.initEvent('open', false, false);
- this.dispatchEvent(event);
- },
-
- write: function(message) {
- return this.send(message);
- },
-
- end: function(message) {
- if (message !== undefined) this.write(message);
- this.close();
- },
-
- send: function(message, options) {
- if (this.readyState > API.OPEN) return false;
-
- message = String(message).replace(/(\r\n|\r|\n)/g, '$1data: ');
- options = options || {};
-
- var frame = '';
- if (options.event) frame += 'event: ' + options.event + '\r\n';
- if (options.id) frame += 'id: ' + options.id + '\r\n';
- frame += 'data: ' + message + '\r\n\r\n';
-
- return this._write(frame);
- },
-
- ping: function() {
- return this._write(':\r\n\r\n');
- },
-
- close: function() {
- if (this.readyState > API.OPEN) return false;
-
- this.readyState = API.CLOSED;
- this.writable = false;
- if (this._pingTimer) clearInterval(this._pingTimer);
- if (this._stream) this._stream.end();
-
- var event = new Event('close');
- event.initEvent('close', false, false);
- this.dispatchEvent(event);
-
- return true;
- }
-};
-
-for (var method in instance) EventSource.prototype[method] = instance[method];
-for (var key in EventTarget) EventSource.prototype[key] = EventTarget[key];
-
-module.exports = EventSource;
-
diff --git a/node_modules/coalesce/node_modules/sockjs/node_modules/faye-websocket/lib/faye/websocket.js b/node_modules/coalesce/node_modules/sockjs/node_modules/faye-websocket/lib/faye/websocket.js
deleted file mode 100644
index 42ed73ca..00000000
--- a/node_modules/coalesce/node_modules/sockjs/node_modules/faye-websocket/lib/faye/websocket.js
+++ /dev/null
@@ -1,46 +0,0 @@
-// API references:
-//
-// * http://dev.w3.org/html5/websockets/
-// * http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#interface-eventtarget
-// * http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#interface-event
-
-var util = require('util'),
- driver = require('websocket-driver'),
- API = require('./websocket/api');
-
-var WebSocket = function(request, socket, body, protocols, options) {
- this._stream = socket;
- this._driver = driver.http(request, {protocols: protocols});
-
- var self = this;
- if (!this._stream || !this._stream.writable) return;
-
- var catchup = function() { self._stream.removeListener('data', catchup) };
- this._stream.on('data', catchup);
-
- this._stream.setTimeout(0);
- this._stream.setNoDelay(true);
-
- this._driver.io.write(body);
- API.call(this, options);
-
- ['error', 'end'].forEach(function(event) {
- this._stream.on(event, function() { self._finalize('', 1006) });
- }, this);
-
- process.nextTick(function() {
- self._driver.start();
- });
-};
-util.inherits(WebSocket, API);
-
-WebSocket.isWebSocket = function(request) {
- return driver.isWebSocket(request);
-};
-
-WebSocket.WebSocket = WebSocket;
-WebSocket.Client = require('./websocket/client');
-WebSocket.EventSource = require('./eventsource');
-
-module.exports = WebSocket;
-
diff --git a/node_modules/coalesce/node_modules/sockjs/node_modules/faye-websocket/lib/faye/websocket/api.js b/node_modules/coalesce/node_modules/sockjs/node_modules/faye-websocket/lib/faye/websocket/api.js
deleted file mode 100644
index a51f9cf2..00000000
--- a/node_modules/coalesce/node_modules/sockjs/node_modules/faye-websocket/lib/faye/websocket/api.js
+++ /dev/null
@@ -1,132 +0,0 @@
-var Stream = require('stream').Stream,
- util = require('util'),
- EventTarget = require('./api/event_target'),
- Event = require('./api/event');
-
-var API = function(options) {
- options = options || {};
-
- this.readable = this.writable = true;
-
- var headers = options.headers;
- if (headers) {
- for (var name in headers) this._driver.setHeader(name, headers[name]);
- }
-
- this._ping = options.ping;
- this._pingId = 0;
- this.readyState = API.CONNECTING;
- this.bufferedAmount = 0;
- this.protocol = '';
- this.url = this._driver.url;
- this.version = this._driver.version;
-
- var self = this;
-
- this._driver.on('open', function(e) { self._open() });
- this._driver.on('message', function(e) { self._receiveMessage(e.data) });
- this._driver.on('close', function(e) { self._finalize(e.reason, e.code) });
-
- this._driver.on('error', function(error) {
- var event = new Event('error', {message: error.message});
- event.initEvent('error', false, false);
- self.dispatchEvent(event);
- });
- this.on('error', function() {});
-
- this._driver.messages.on('drain', function() {
- self.emit('drain');
- });
-
- if (this._ping)
- this._pingTimer = setInterval(function() {
- self._pingId += 1;
- self.ping(self._pingId.toString());
- }, this._ping * 1000);
-
- this._stream.pipe(this._driver.io);
- this._driver.io.pipe(this._stream);
-};
-util.inherits(API, Stream);
-
-API.CONNECTING = 0;
-API.OPEN = 1;
-API.CLOSING = 2;
-API.CLOSED = 3;
-
-var instance = {
- write: function(data) {
- return this.send(data);
- },
-
- end: function(data) {
- if (data !== undefined) this.send(data);
- this.close();
- },
-
- pause: function() {
- return this._driver.messages.pause();
- },
-
- resume: function() {
- return this._driver.messages.resume();
- },
-
- send: function(data) {
- if (this.readyState > API.OPEN) return false;
- if (!(data instanceof Buffer)) data = String(data);
- return this._driver.messages.write(data);
- },
-
- ping: function(message, callback) {
- if (this.readyState > API.OPEN) return false;
- return this._driver.ping(message, callback);
- },
-
- close: function() {
- if (this.readyState === API.OPEN) this.readyState = API.CLOSING;
- this._driver.close();
- },
-
- _open: function() {
- if (this.readyState !== API.CONNECTING) return;
-
- this.readyState = API.OPEN;
- this.protocol = this._driver.protocol || '';
-
- var event = new Event('open');
- event.initEvent('open', false, false);
- this.dispatchEvent(event);
- },
-
- _receiveMessage: function(data) {
- if (this.readyState > API.OPEN) return false;
-
- if (this.readable) this.emit('data', data);
-
- var event = new Event('message', {data: data});
- event.initEvent('message', false, false);
- this.dispatchEvent(event);
- },
-
- _finalize: function(reason, code) {
- if (this.readyState === API.CLOSED) return;
-
- if (this._pingTimer) clearInterval(this._pingTimer);
- if (this._stream) this._stream.end();
-
- if (this.readable) this.emit('end');
- this.readable = this.writable = false;
-
- this.readyState = API.CLOSED;
- var event = new Event('close', {code: code || 1000, reason: reason || ''});
- event.initEvent('close', false, false);
- this.dispatchEvent(event);
- }
-};
-
-for (var method in instance) API.prototype[method] = instance[method];
-for (var key in EventTarget) API.prototype[key] = EventTarget[key];
-
-module.exports = API;
-
diff --git a/node_modules/coalesce/node_modules/sockjs/node_modules/faye-websocket/lib/faye/websocket/api/event.js b/node_modules/coalesce/node_modules/sockjs/node_modules/faye-websocket/lib/faye/websocket/api/event.js
deleted file mode 100644
index 2f707d84..00000000
--- a/node_modules/coalesce/node_modules/sockjs/node_modules/faye-websocket/lib/faye/websocket/api/event.js
+++ /dev/null
@@ -1,21 +0,0 @@
-var Event = function(eventType, options) {
- this.type = eventType;
- for (var key in options)
- this[key] = options[key];
-};
-
-Event.prototype.initEvent = function(eventType, canBubble, cancelable) {
- this.type = eventType;
- this.bubbles = canBubble;
- this.cancelable = cancelable;
-};
-
-Event.prototype.stopPropagation = function() {};
-Event.prototype.preventDefault = function() {};
-
-Event.CAPTURING_PHASE = 1;
-Event.AT_TARGET = 2;
-Event.BUBBLING_PHASE = 3;
-
-module.exports = Event;
-
diff --git a/node_modules/coalesce/node_modules/sockjs/node_modules/faye-websocket/lib/faye/websocket/api/event_target.js b/node_modules/coalesce/node_modules/sockjs/node_modules/faye-websocket/lib/faye/websocket/api/event_target.js
deleted file mode 100644
index f0a56f85..00000000
--- a/node_modules/coalesce/node_modules/sockjs/node_modules/faye-websocket/lib/faye/websocket/api/event_target.js
+++ /dev/null
@@ -1,29 +0,0 @@
-var Event = require('./event');
-
-var EventTarget = {
- onopen: null,
- onmessage: null,
- onerror: null,
- onclose: null,
-
- addEventListener: function(eventType, listener, useCapture) {
- this.on(eventType, listener);
- },
-
- removeEventListener: function(eventType, listener, useCapture) {
- this.removeListener(eventType, listener);
- },
-
- dispatchEvent: function(event) {
- event.target = event.currentTarget = this;
- event.eventPhase = Event.AT_TARGET;
-
- if (this['on' + event.type])
- this['on' + event.type](event);
-
- this.emit(event.type, event);
- }
-};
-
-module.exports = EventTarget;
-
diff --git a/node_modules/coalesce/node_modules/sockjs/node_modules/faye-websocket/lib/faye/websocket/client.js b/node_modules/coalesce/node_modules/sockjs/node_modules/faye-websocket/lib/faye/websocket/client.js
deleted file mode 100644
index 15e237eb..00000000
--- a/node_modules/coalesce/node_modules/sockjs/node_modules/faye-websocket/lib/faye/websocket/client.js
+++ /dev/null
@@ -1,45 +0,0 @@
-var util = require('util'),
- net = require('net'),
- tls = require('tls'),
- driver = require('websocket-driver'),
- API = require('./api');
-
-var Client = function(url, protocols, options) {
- this.url = url;
- this._uri = require('url').parse(url);
- this._driver = driver.client(url, {protocols: protocols});
-
- ['open', 'error'].forEach(function(event) {
- this._driver.on(event, function() {
- self.headers = self._driver.headers;
- self.statusCode = self._driver.statusCode;
- });
- }, this);
-
- var secure = (this._uri.protocol === 'wss:'),
- onConnect = function() { self._driver.start() },
- tlsOptions = {},
- self = this;
-
- if (options && options.ca) tlsOptions.ca = options.ca;
-
- var connection = secure
- ? tls.connect(this._uri.port || 443, this._uri.hostname, tlsOptions, onConnect)
- : net.createConnection(this._uri.port || 80, this._uri.hostname);
-
- this._stream = connection;
- this._stream.setTimeout(0);
- this._stream.setNoDelay(true);
-
- if (!secure) this._stream.on('connect', onConnect);
-
- API.call(this, options);
-
- ['error', 'end'].forEach(function(event) {
- this._stream.on(event, function() { self._finalize('', 1006) });
- }, this);
-};
-util.inherits(Client, API);
-
-module.exports = Client;
-
diff --git a/node_modules/coalesce/node_modules/sockjs/node_modules/faye-websocket/node_modules/websocket-driver/CHANGELOG.md b/node_modules/coalesce/node_modules/sockjs/node_modules/faye-websocket/node_modules/websocket-driver/CHANGELOG.md
deleted file mode 100644
index 696cc437..00000000
--- a/node_modules/coalesce/node_modules/sockjs/node_modules/faye-websocket/node_modules/websocket-driver/CHANGELOG.md
+++ /dev/null
@@ -1,34 +0,0 @@
-### 0.3.2 / 2013-12-29
-
-* Expand `maxLength` to cover sequences of continuation frames and `draft-{75,76}`
-* Decrease default maximum frame buffer size to 64MB
-* Stop parsing when the protocol enters a failure mode, to save CPU cycles
-
-### 0.3.1 / 2013-12-03
-
-* Add a `maxLength` option to limit allowed frame size
-* Don't pre-allocate a message buffer until the whole frame has arrived
-* Fix compatibility with Node v0.11 `HTTPParser`
-
-### 0.3.0 / 2013-09-09
-
-* Support client URLs with Basic Auth credentials
-
-### 0.2.2 / 2013-07-05
-
-* No functional changes, just updates to package.json
-
-### 0.2.1 / 2013-05-17
-
-* Export the isSecureRequest() method since faye-websocket relies on it
-* Queue sent messages in the client's initial state
-
-### 0.2.0 / 2013-05-12
-
-* Add API for setting and reading headers
-* Add Driver.server() method for getting a driver for TCP servers
-
-### 0.1.0 / 2013-05-04
-
-* First stable release
-
diff --git a/node_modules/coalesce/node_modules/sockjs/node_modules/faye-websocket/node_modules/websocket-driver/README.md b/node_modules/coalesce/node_modules/sockjs/node_modules/faye-websocket/node_modules/websocket-driver/README.md
deleted file mode 100644
index c1aff532..00000000
--- a/node_modules/coalesce/node_modules/sockjs/node_modules/faye-websocket/node_modules/websocket-driver/README.md
+++ /dev/null
@@ -1,307 +0,0 @@
-# websocket-driver [](https://travis-ci.org/faye/websocket-driver-node)
-
-This module provides a complete implementation of the WebSocket protocols that
-can be hooked up to any I/O stream. It aims to simplify things by decoupling
-the protocol details from the I/O layer, such that users only need to implement
-code to stream data in and out of it without needing to know anything about how
-the protocol actually works. Think of it as a complete WebSocket system with
-pluggable I/O.
-
-Due to this design, you get a lot of things for free. In particular, if you
-hook this module up to some I/O object, it will do all of this for you:
-
-* Select the correct server-side driver to talk to the client
-* Generate and send both server- and client-side handshakes
-* Recognize when the handshake phase completes and the WS protocol begins
-* Negotiate subprotocol selection based on `Sec-WebSocket-Protocol`
-* Buffer sent messages until the handshake process is finished
-* Deal with proxies that defer delivery of the draft-76 handshake body
-* Notify you when the socket is open and closed and when messages arrive
-* Recombine fragmented messages
-* Dispatch text, binary, ping and close frames
-* Manage the socket-closing handshake process
-* Automatically reply to ping frames with a matching pong
-* Apply masking to messages sent by the client
-
-This library was originally extracted from the [Faye](http://faye.jcoglan.com)
-project but now aims to provide simple WebSocket support for any Node-based
-project.
-
-
-## Installation
-
-```
-$ npm install websocket-driver
-```
-
-
-## Usage
-
-This module provides protocol drivers that have the same interface on the
-server and on the client. A WebSocket driver is an object with two duplex
-streams attached; one for incoming/outgoing messages and one for managing the
-wire protocol over an I/O stream. The full API is described below.
-
-
-### Server-side with HTTP
-
-A Node webserver emits a special event for 'upgrade' requests, and this is
-where you should handle WebSockets. You first check whether the request is a
-WebSocket, and if so you can create a driver and attach the request's I/O
-stream to it.
-
-```js
-var http = require('http'),
- websocket = require('websocket-driver');
-
-var server = http.createServer();
-
-server.on('upgrade', function(request, socket, body) {
- if (!websocket.isWebSocket(request)) return;
-
- var driver = websocket.http(request);
-
- driver.io.write(body);
- socket.pipe(driver.io).pipe(socket);
-
- driver.messages.on('data', function(message) {
- console.log('Got a message', message);
- });
-
- driver.start();
-});
-```
-
-Note the line `driver.io.write(body)` - you must pass the `body` buffer to the
-socket driver in order to make certain versions of the protocol work.
-
-
-### Server-side with TCP
-
-You can also handle WebSocket connections in a bare TCP server, if you're not
-using an HTTP server and don't want to implement HTTP parsing yourself.
-
-The driver will emit a `connect` event when a request is received, and at this
-point you can detect whether it's a WebSocket and handle it as such. Here's an
-example using the Node `net` module:
-
-```js
-var net = require('net'),
- websocket = require('websocket-driver');
-
-var server = net.createServer(function(connection) {
- var driver = websocket.server();
-
- driver.on('connect', function() {
- if (websocket.isWebSocket(driver)) {
- driver.start();
- } else {
- // handle other HTTP requests
- }
- });
-
- driver.on('close', function() { connection.end() });
- connection.on('error', function() {});
-
- connection.pipe(driver.io).pipe(connection);
-
- driver.messages.pipe(driver.messages);
-});
-
-server.listen(4180);
-```
-
-In the `connect` event, the driver gains several properties to describe the
-request, similar to a Node request object, such as `method`, `url` and
-`headers`. However you should remember it's not a real request object; you
-cannot write data to it, it only tells you what request data we parsed from the
-input.
-
-If the request has a body, it will be in the `driver.body` buffer, but only as
-much of the body as has been piped into the driver when the `connect` event
-fires.
-
-
-### Client-side
-
-Similarly, to implement a WebSocket client you just need to make a driver by
-passing in a URL. After this you use the driver API as described below to
-process incoming data and send outgoing data.
-
-
-```js
-var net = require('net'),
- websocket = require('websocket-driver');
-
-var driver = websocket.client('ws://www.example.com/socket'),
- tcp = net.createConnection(80, 'www.example.com');
-
-tcp.pipe(driver.io).pipe(tcp);
-
-driver.messages.on('data', function(message) {
- console.log('Got a message', message);
-});
-
-tcp.on('connect', function() {
- driver.start();
-});
-```
-
-Client drivers have two additional properties for reading the HTTP data that
-was sent back by the server:
-
-* `driver.statusCode` - the integer value of the HTTP status code
-* `driver.headers` - an object containing the response headers
-
-
-### Driver API
-
-Drivers are created using one of the following methods:
-
-```js
-driver = websocket.http(request, options)
-driver = websocket.server(options)
-driver = websocket.client(url, options)
-```
-
-The `http` method returns a driver chosen using the headers from a Node HTTP
-request object. The `server` method returns a driver that will parse an HTTP
-request and then decide which driver to use for it using the `http` method. The
-`client` method always returns a driver for the RFC version of the protocol
-with masking enabled on outgoing frames.
-
-The `options` argument is optional, and is an object. It may contain the
-following fields:
-
-* `maxLength` - the maximum allowed size of incoming message frames, in bytes.
- The default value is `2^26 - 1`, or 1 byte short of 64 MiB.
-* `protocols` - an array of strings representing acceptable subprotocols for
- use over the socket. The driver will negotiate one of these to use via the
- `Sec-WebSocket-Protocol` header if supported by the other peer.
-
-A driver has two duplex streams attached to it:
-
-* `driver.io` - this stream should be attached to an I/O socket like a
- TCP stream. Pipe incoming TCP chunks to this stream for them to be parsed,
- and pipe this stream back into TCP to send outgoing frames.
-* `driver.messages` - this stream emits messages received over the
- WebSocket. Writing to it sends messages to the other peer by emitting frames
- via the `driver.io` stream.
-
-All drivers respond to the following API methods, but some of them are no-ops
-depending on whether the client supports the behaviour.
-
-Note that most of these methods are commands: if they produce data that should
-be sent over the socket, they will give this to you by emitting `data` events
-on the `driver.io` stream.
-
-#### `driver.on('open', function(event) {})`
-
-Sets the callback to execute when the socket becomes open.
-
-#### `driver.on('message', function(event) {})`
-
-Sets the callback to execute when a message is received. `event` will have a
-`data` attribute containing either a string in the case of a text message or a
-`Buffer` in the case of a binary message.
-
-You can also listen for messages using the `driver.messages.on('data')` event,
-which emits strings for text messages and buffers for binary messages.
-
-#### `driver.on('error', function(event) {})`
-
-Sets the callback to execute when a protocol error occurs due to the other peer
-sending an invalid byte sequence. `event` will have a `message` attribute
-describing the error.
-
-#### `driver.on('close', function(event) {})`
-
-Sets the callback to execute when the socket becomes closed. The `event` object
-has `code` and `reason` attributes.
-
-#### `driver.setHeader(name, value)`
-
-Sets a custom header to be sent as part of the handshake response, either from
-the server or from the client. Must be called before `start()`, since this is
-when the headers are serialized and sent.
-
-#### `driver.start()`
-
-Initiates the protocol by sending the handshake - either the response for a
-server-side driver or the request for a client-side one. This should be the
-first method you invoke. Returns `true` iff a handshake was sent.
-
-#### `driver.parse(string)`
-
-Takes a string and parses it, potentially resulting in message events being
-emitted (see `on('message')` above) or in data being sent to `driver.io`. You
-should send all data you receive via I/O to this method by piping a stream into
-`driver.io`.
-
-#### `driver.text(string)`
-
-Sends a text message over the socket. If the socket handshake is not yet
-complete, the message will be queued until it is. Returns `true` if the message
-was sent or queued, and `false` if the socket can no longer send messages.
-
-This method is equivalent to `driver.messages.write(string)`.
-
-#### `driver.binary(buffer)`
-
-Takes a `Buffer` and sends it as a binary message. Will queue and return `true`
-or `false` the same way as the `text` method. It will also return `false` if
-the driver does not support binary messages.
-
-This method is equivalent to `driver.messages.write(buffer)`.
-
-#### `driver.ping(string = '', function() {})`
-
-Sends a ping frame over the socket, queueing it if necessary. `string` and the
-callback are both optional. If a callback is given, it will be invoked when the
-socket receives a pong frame whose content matches `string`. Returns `false` if
-frames can no longer be sent, or if the driver does not support ping/pong.
-
-#### `driver.close()`
-
-Initiates the closing handshake if the socket is still open. For drivers with
-no closing handshake, this will result in the immediate execution of the
-`on('close')` driver. For drivers with a closing handshake, this sends a
-closing frame and `emit('close')` will execute when a response is received or a
-protocol error occurs.
-
-#### `driver.version`
-
-Returns the WebSocket version in use as a string. Will either be `hixie-75`,
-`hixie-76` or `hybi-$version`.
-
-#### `driver.protocol`
-
-Returns a string containing the selected subprotocol, if any was agreed upon
-using the `Sec-WebSocket-Protocol` mechanism. This value becomes available
-after `emit('open')` has fired.
-
-
-## License
-
-(The MIT License)
-
-Copyright (c) 2010-2013 James Coglan
-
-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.
-
diff --git a/node_modules/coalesce/node_modules/sockjs/node_modules/faye-websocket/node_modules/websocket-driver/examples/tcp_server.js b/node_modules/coalesce/node_modules/sockjs/node_modules/faye-websocket/node_modules/websocket-driver/examples/tcp_server.js
deleted file mode 100644
index 975a060c..00000000
--- a/node_modules/coalesce/node_modules/sockjs/node_modules/faye-websocket/node_modules/websocket-driver/examples/tcp_server.js
+++ /dev/null
@@ -1,21 +0,0 @@
-var net = require('net'),
- websocket = require('../lib/websocket/driver');
-
-var server = net.createServer(function(connection) {
- var driver = websocket.server();
-
- driver.on('connect', function() {
- if (websocket.isWebSocket(driver)) driver.start();
- });
-
- driver.on('close', function() { connection.end() });
- connection.on('error', function() {});
-
- connection.pipe(driver.io);
- driver.io.pipe(connection);
-
- driver.messages.pipe(driver.messages);
-});
-
-server.listen(process.argv[2]);
-
diff --git a/node_modules/coalesce/node_modules/sockjs/node_modules/faye-websocket/node_modules/websocket-driver/lib/websocket/driver.js b/node_modules/coalesce/node_modules/sockjs/node_modules/faye-websocket/node_modules/websocket-driver/lib/websocket/driver.js
deleted file mode 100644
index 64e447fb..00000000
--- a/node_modules/coalesce/node_modules/sockjs/node_modules/faye-websocket/node_modules/websocket-driver/lib/websocket/driver.js
+++ /dev/null
@@ -1,44 +0,0 @@
-// Protocol references:
-//
-// * http://tools.ietf.org/html/draft-hixie-thewebsocketprotocol-75
-// * http://tools.ietf.org/html/draft-hixie-thewebsocketprotocol-76
-// * http://tools.ietf.org/html/draft-ietf-hybi-thewebsocketprotocol-17
-
-var Client = require('./driver/client'),
- Server = require('./driver/server');
-
-var Driver = {
- client: function(url, options) {
- options = options || {};
- if (options.masking === undefined) options.masking = true;
- return new Client(url, options);
- },
-
- server: function(options) {
- options = options || {};
- if (options.requireMasking === undefined) options.requireMasking = true;
- return new Server(options);
- },
-
- http: function() {
- return Server.http.apply(Server, arguments);
- },
-
- isSecureRequest: function(request) {
- return Server.isSecureRequest(request);
- },
-
- isWebSocket: function(request) {
- if (request.method !== 'GET') return false;
-
- var connection = request.headers.connection || '',
- upgrade = request.headers.upgrade || '';
-
- return request.method === 'GET' &&
- connection.toLowerCase().split(/\s*,\s*/).indexOf('upgrade') >= 0 &&
- upgrade.toLowerCase() === 'websocket';
- }
-};
-
-module.exports = Driver;
-
diff --git a/node_modules/coalesce/node_modules/sockjs/node_modules/faye-websocket/node_modules/websocket-driver/lib/websocket/driver/base.js b/node_modules/coalesce/node_modules/sockjs/node_modules/faye-websocket/node_modules/websocket-driver/lib/websocket/driver/base.js
deleted file mode 100644
index b4bdff84..00000000
--- a/node_modules/coalesce/node_modules/sockjs/node_modules/faye-websocket/node_modules/websocket-driver/lib/websocket/driver/base.js
+++ /dev/null
@@ -1,126 +0,0 @@
-var Emitter = require('events').EventEmitter,
- util = require('util'),
- streams = require('../streams'),
- Headers = require('./headers');
-
-var Base = function(request, url, options) {
- Emitter.call(this);
-
- this._request = request;
- this._options = options || {};
- this._maxLength = this._options.maxLength || this.MAX_LENGTH;
- this.__headers = new Headers();
- this.__queue = [];
- this.readyState = 0;
- this.url = url;
-
- this.io = new streams.IO(this);
- this.messages = new streams.Messages(this);
- this._bindEventListeners();
-};
-util.inherits(Base, Emitter);
-
-var instance = {
- // This is 64MB, small enough for an average VPS to handle without
- // crashing from process out of memory
- MAX_LENGTH: 0x3ffffff,
-
- STATES: ['connecting', 'open', 'closing', 'closed'],
-
- _bindEventListeners: function() {
- var self = this;
-
- // Protocol errors are informational and do not have to be handled
- this.messages.on('error', function() {});
-
- this.on('message', function(event) {
- var messages = self.messages;
- if (messages.readable) messages.emit('data', event.data);
- });
-
- this.on('error', function(error) {
- var messages = self.messages;
- if (messages.readable) messages.emit('error', error);
- });
-
- this.on('close', function() {
- var messages = self.messages;
- if (!messages.readable) return;
- messages.readable = messages.writable = false;
- messages.emit('end');
- });
- },
-
- getState: function() {
- return this.STATES[this.readyState] || null;
- },
-
- setHeader: function(name, value) {
- if (this.readyState > 0) return false;
- this.__headers.set(name, value);
- return true;
- },
-
- start: function() {
- if (this.readyState !== 0) return false;
- this._write(this._handshakeResponse());
- if (this._stage !== -1) this._open();
- return true;
- },
-
- text: function(message) {
- return this.frame(message);
- },
-
- binary: function(message) {
- return false;
- },
-
- ping: function() {
- return false;
- },
-
- close: function(reason, code) {
- if (this.readyState !== 1) return false;
- this.readyState = 3;
- this.emit('close', new Base.CloseEvent(null, null));
- return true;
- },
-
- _open: function() {
- this.readyState = 1;
- this.__queue.forEach(function(args) { this.frame.apply(this, args) }, this);
- this.__queue = [];
- this.emit('open', new Base.OpenEvent());
- },
-
- _queue: function(message) {
- this.__queue.push(message);
- return true;
- },
-
- _write: function(chunk) {
- var io = this.io;
- if (io.readable) io.emit('data', chunk);
- }
-};
-
-for (var key in instance)
- Base.prototype[key] = instance[key];
-
-
-Base.ConnectEvent = function() {};
-
-Base.OpenEvent = function() {};
-
-Base.CloseEvent = function(code, reason) {
- this.code = code;
- this.reason = reason;
-};
-
-Base.MessageEvent = function(data) {
- this.data = data;
-};
-
-module.exports = Base;
-
diff --git a/node_modules/coalesce/node_modules/sockjs/node_modules/faye-websocket/node_modules/websocket-driver/lib/websocket/driver/client.js b/node_modules/coalesce/node_modules/sockjs/node_modules/faye-websocket/node_modules/websocket-driver/lib/websocket/driver/client.js
deleted file mode 100644
index 847159ad..00000000
--- a/node_modules/coalesce/node_modules/sockjs/node_modules/faye-websocket/node_modules/websocket-driver/lib/websocket/driver/client.js
+++ /dev/null
@@ -1,112 +0,0 @@
-var url = require('url'),
- util = require('util'),
- HttpParser = require('./http_parser'),
- Base = require('./base'),
- Hybi = require('./hybi');
-
-var Client = function(url, options) {
- this.version = 'hybi-13';
- Hybi.call(this, null, url, options);
-
- this.readyState = -1;
- this._key = Client.generateKey();
- this._accept = Hybi.generateAccept(this._key);
- this._http = new HttpParser('response');
-};
-util.inherits(Client, Hybi);
-
-Client.generateKey = function() {
- var buffer = new Buffer(16), i = buffer.length;
- while (i--) buffer[i] = Math.floor(Math.random() * 256);
- return buffer.toString('base64');
-};
-
-var instance = {
- start: function() {
- if (this.readyState !== -1) return false;
- this._write(this._handshakeRequest());
- this.readyState = 0;
- return true;
- },
-
- parse: function(data) {
- if (this.readyState > 0) return Hybi.prototype.parse.call(this, data);
-
- this._http.parse(data);
- if (!this._http.isComplete()) return;
-
- this._validateHandshake();
- this.parse(this._http.body);
- },
-
- _handshakeRequest: function() {
- var uri = url.parse(this.url);
-
- var headers = [ 'GET ' + (uri.pathname || '/') + (uri.search || '') + ' HTTP/1.1',
- 'Host: ' + uri.hostname + (uri.port ? ':' + uri.port : ''),
- 'Upgrade: websocket',
- 'Connection: Upgrade',
- 'Sec-WebSocket-Key: ' + this._key,
- 'Sec-WebSocket-Version: 13'
- ];
-
- if (this._protocols.length > 0)
- headers.push('Sec-WebSocket-Protocol: ' + this._protocols.join(', '));
-
- if (uri.auth)
- headers.push('Authorization: Basic ' + new Buffer(uri.auth, 'utf8').toString('base64'));
-
- return new Buffer(headers.concat(this.__headers.toString(), '').join('\r\n'), 'utf8');
- },
-
- _failHandshake: function(message) {
- message = 'Error during WebSocket handshake: ' + message;
- this.emit('error', new Error(message));
- this.readyState = 3;
- this.emit('close', new Base.CloseEvent(this.ERRORS.protocol_error, message));
- },
-
- _validateHandshake: function() {
- this.statusCode = this._http.statusCode;
- this.headers = this._http.headers;
-
- if (this._http.statusCode !== 101)
- return this._failHandshake('Unexpected response code: ' + this._http.statusCode);
-
- var headers = this._http.headers,
- upgrade = headers['upgrade'] || '',
- connection = headers['connection'] || '',
- accept = headers['sec-websocket-accept'] || '',
- protocol = headers['sec-websocket-protocol'] || '';
-
- if (upgrade === '')
- return this._failHandshake("'Upgrade' header is missing");
- if (upgrade.toLowerCase() !== 'websocket')
- return this._failHandshake("'Upgrade' header value is not 'WebSocket'");
-
- if (connection === '')
- return this._failHandshake("'Connection' header is missing");
- if (connection.toLowerCase() !== 'upgrade')
- return this._failHandshake("'Connection' header value is not 'Upgrade'");
-
- if (accept !== this._accept)
- return this._failHandshake('Sec-WebSocket-Accept mismatch');
-
- this.protocol = null;
-
- if (protocol !== '') {
- if (this._protocols.indexOf(protocol) < 0)
- return this._failHandshake('Sec-WebSocket-Protocol mismatch');
- else
- this.protocol = protocol;
- }
-
- this._open();
- }
-};
-
-for (var key in instance)
- Client.prototype[key] = instance[key];
-
-module.exports = Client;
-
diff --git a/node_modules/coalesce/node_modules/sockjs/node_modules/faye-websocket/node_modules/websocket-driver/lib/websocket/driver/draft75.js b/node_modules/coalesce/node_modules/sockjs/node_modules/faye-websocket/node_modules/websocket-driver/lib/websocket/driver/draft75.js
deleted file mode 100644
index e78fc495..00000000
--- a/node_modules/coalesce/node_modules/sockjs/node_modules/faye-websocket/node_modules/websocket-driver/lib/websocket/driver/draft75.js
+++ /dev/null
@@ -1,118 +0,0 @@
-var Base = require('./base'),
- util = require('util');
-
-var Draft75 = function(request, url, options) {
- Base.apply(this, arguments);
- this._stage = 0;
- this.version = 'hixie-75';
-};
-util.inherits(Draft75, Base);
-
-var instance = {
- close: function() {
- if (this.readyState === 3) return false;
- this.readyState = 3;
- this.emit('close', new Base.CloseEvent(null, null));
- return true;
- },
-
- parse: function(buffer) {
- if (this.readyState > 1) return;
-
- var data, message, value;
- for (var i = 0, n = buffer.length; i < n; i++) {
- data = buffer[i];
-
- switch (this._stage) {
- case -1:
- this._body.push(data);
- this._sendHandshakeBody();
- break;
-
- case 0:
- this._parseLeadingByte(data);
- break;
-
- case 1:
- value = (data & 0x7F);
- this._length = value + 128 * this._length;
-
- if (this._closing && this._length === 0) {
- return this.close();
- }
- else if ((0x80 & data) !== 0x80) {
- if (this._length === 0) {
- this._stage = 0;
- }
- else {
- this._skipped = 0;
- this._stage = 2;
- }
- }
- break;
-
- case 2:
- if (data === 0xFF) {
- message = new Buffer(this._buffer).toString('utf8', 0, this._buffer.length);
- this.emit('message', new Base.MessageEvent(message));
- this._stage = 0;
- }
- else {
- if (this._length) {
- this._skipped += 1;
- if (this._skipped === this._length)
- this._stage = 0;
- } else {
- this._buffer.push(data);
- if (this._buffer.length > this._maxLength) return this.close();
- }
- }
- break;
- }
- }
- },
-
- frame: function(data) {
- if (this.readyState === 0) return this._queue([data]);
- if (this.readyState > 1) return false;
-
- var buffer = new Buffer(data, 'utf8'),
- frame = new Buffer(buffer.length + 2);
-
- frame[0] = 0x00;
- frame[buffer.length + 1] = 0xFF;
- buffer.copy(frame, 1);
-
- this._write(frame);
- return true;
- },
-
- _handshakeResponse: function() {
- return new Buffer('HTTP/1.1 101 Web Socket Protocol Handshake\r\n' +
- 'Upgrade: WebSocket\r\n' +
- 'Connection: Upgrade\r\n' +
- 'WebSocket-Origin: ' + this._request.headers.origin + '\r\n' +
- 'WebSocket-Location: ' + this.url + '\r\n' +
- this.__headers.toString() +
- '\r\n',
- 'utf8');
- },
-
- _parseLeadingByte: function(data) {
- if ((0x80 & data) === 0x80) {
- this._length = 0;
- this._stage = 1;
- } else {
- delete this._length;
- delete this._skipped;
- this._buffer = [];
- this._stage = 2;
- }
- }
-};
-
-for (var key in instance)
- Draft75.prototype[key] = instance[key];
-
-module.exports = Draft75;
-
diff --git a/node_modules/coalesce/node_modules/sockjs/node_modules/faye-websocket/node_modules/websocket-driver/lib/websocket/driver/draft76.js b/node_modules/coalesce/node_modules/sockjs/node_modules/faye-websocket/node_modules/websocket-driver/lib/websocket/driver/draft76.js
deleted file mode 100644
index e0d673d8..00000000
--- a/node_modules/coalesce/node_modules/sockjs/node_modules/faye-websocket/node_modules/websocket-driver/lib/websocket/driver/draft76.js
+++ /dev/null
@@ -1,109 +0,0 @@
-var Base = require('./base'),
- Draft75 = require('./draft75'),
- crypto = require('crypto'),
- util = require('util');
-
-
-var numberFromKey = function(key) {
- return parseInt(key.match(/[0-9]/g).join(''), 10);
-};
-
-var spacesInKey = function(key) {
- return key.match(/ /g).length;
-};
-
-var bigEndian = function(number) {
- var string = '';
- [24, 16, 8, 0].forEach(function(offset) {
- string += String.fromCharCode(number >> offset & 0xFF);
- });
- return string;
-};
-
-
-var Draft76 = function(request, url, options) {
- Draft75.apply(this, arguments);
- this._stage = -1;
- this._body = [];
- this.version = 'hixie-76';
-};
-util.inherits(Draft76, Draft75);
-
-var instance = {
- BODY_SIZE: 8,
-
- start: function() {
- if (!Draft75.prototype.start.call(this)) return false;
- this._started = true;
- this._sendHandshakeBody();
- return true;
- },
-
- close: function() {
- if (this.readyState === 3) return false;
- this._write(new Buffer([0xFF, 0x00]));
- this.readyState = 3;
- this.emit('close', new Base.CloseEvent(null, null));
- return true;
- },
-
- _handshakeResponse: function() {
- return new Buffer('HTTP/1.1 101 Web Socket Protocol Handshake\r\n' +
- 'Upgrade: WebSocket\r\n' +
- 'Connection: Upgrade\r\n' +
- 'Sec-WebSocket-Origin: ' + this._request.headers.origin + '\r\n' +
- 'Sec-WebSocket-Location: ' + this.url + '\r\n' +
- this.__headers.toString() +
- '\r\n',
- 'binary');
- },
-
- _handshakeSignature: function() {
- if (this._body.length < this.BODY_SIZE) return null;
- var body = new Buffer(this._body.slice(0, this.BODY_SIZE));
-
- var headers = this._request.headers,
-
- key1 = headers['sec-websocket-key1'],
- value1 = numberFromKey(key1) / spacesInKey(key1),
-
- key2 = headers['sec-websocket-key2'],
- value2 = numberFromKey(key2) / spacesInKey(key2),
-
- md5 = crypto.createHash('md5');
-
- md5.update(bigEndian(value1));
- md5.update(bigEndian(value2));
- md5.update(body.toString('binary'));
-
- return new Buffer(md5.digest('binary'), 'binary');
- },
-
- _sendHandshakeBody: function() {
- if (!this._started) return;
- var signature = this._handshakeSignature();
- if (!signature) return;
-
- this._write(signature);
- this._stage = 0;
- this._open();
-
- if (this._body.length > this.BODY_SIZE)
- this.parse(this._body.slice(this.BODY_SIZE));
- },
-
- _parseLeadingByte: function(data) {
- if (data !== 0xFF)
- return Draft75.prototype._parseLeadingByte.call(this, data);
-
- this._closing = true;
- this._length = 0;
- this._stage = 1;
- }
-};
-
-for (var key in instance)
- Draft76.prototype[key] = instance[key];
-
-module.exports = Draft76;
-
diff --git a/node_modules/coalesce/node_modules/sockjs/node_modules/faye-websocket/node_modules/websocket-driver/lib/websocket/driver/headers.js b/node_modules/coalesce/node_modules/sockjs/node_modules/faye-websocket/node_modules/websocket-driver/lib/websocket/driver/headers.js
deleted file mode 100644
index b1b3c62e..00000000
--- a/node_modules/coalesce/node_modules/sockjs/node_modules/faye-websocket/node_modules/websocket-driver/lib/websocket/driver/headers.js
+++ /dev/null
@@ -1,30 +0,0 @@
-var Headers = function() {
- this._sent = {};
- this._lines = [];
-};
-
-Headers.prototype.ALLOWED_DUPLICATES = ['set-cookie', 'set-cookie2', 'warning', 'www-authenticate']
-
-Headers.prototype.set = function(name, value) {
- if (value === undefined) return;
-
- name = this._strip(name);
- value = this._strip(value);
-
- var key = name.toLowerCase();
- if (!this._sent.hasOwnProperty(key) || this.ALLOWED_DUPLICATES.indexOf(key) < 0) {
- this._sent[key] = true;
- this._lines.push(name + ': ' + value + '\r\n');
- }
-};
-
-Headers.prototype.toString = function() {
- return this._lines.join('');
-};
-
-Headers.prototype._strip = function(string) {
- return string.toString().replace(/^ */, '').replace(/ *$/, '');
-};
-
-module.exports = Headers;
-
diff --git a/node_modules/coalesce/node_modules/sockjs/node_modules/faye-websocket/node_modules/websocket-driver/lib/websocket/driver/http_parser.js b/node_modules/coalesce/node_modules/sockjs/node_modules/faye-websocket/node_modules/websocket-driver/lib/websocket/driver/http_parser.js
deleted file mode 100644
index fdf33d1d..00000000
--- a/node_modules/coalesce/node_modules/sockjs/node_modules/faye-websocket/node_modules/websocket-driver/lib/websocket/driver/http_parser.js
+++ /dev/null
@@ -1,81 +0,0 @@
-var HTTPParser = process.binding('http_parser').HTTPParser,
- version = HTTPParser.RESPONSE ? 6 : 4;
-
-var HttpParser = function(type) {
- if (type === 'request')
- this._parser = new HTTPParser(HTTPParser.REQUEST || 'request');
- else
- this._parser = new HTTPParser(HTTPParser.RESPONSE || 'response');
-
- this._type = type;
- this._complete = false;
- this.headers = {};
-
- var current = null,
- self = this;
-
- this._parser.onHeaderField = function(b, start, length) {
- current = b.toString('utf8', start, start + length).toLowerCase();
- };
-
- this._parser.onHeaderValue = function(b, start, length) {
- self.headers[current] = b.toString('utf8', start, start + length);
- };
-
- this._parser.onHeadersComplete = this._parser[HTTPParser.kOnHeadersComplete] = function(info) {
- self.method = (typeof info.method === 'number') ? HttpParser.METHODS[info.method] : info.method;
- self.statusCode = info.statusCode;
- self.url = info.url;
-
- var headers = info.headers;
- if (!headers) return;
-
- for (var i = 0, n = headers.length; i < n; i += 2)
- self.headers[headers[i].toLowerCase()] = headers[i+1];
- };
-
- this._parser.onMessageComplete = this._parser[HTTPParser.kOnMessageComplete] = function() {
- self._complete = true;
- };
-};
-
-HttpParser.METHODS = {
- 0: 'DELETE',
- 1: 'GET',
- 2: 'HEAD',
- 3: 'POST',
- 4: 'PUT',
- 5: 'CONNECT',
- 6: 'OPTIONS',
- 7: 'TRACE',
- 8: 'COPY',
- 9: 'LOCK',
- 10: 'MKCOL',
- 11: 'MOVE',
- 12: 'PROPFIND',
- 13: 'PROPPATCH',
- 14: 'SEARCH',
- 15: 'UNLOCK',
- 16: 'REPORT',
- 17: 'MKACTIVITY',
- 18: 'CHECKOUT',
- 19: 'MERGE',
- 24: 'PATCH'
-};
-
-HttpParser.prototype.isComplete = function() {
- return this._complete;
-};
-
-HttpParser.prototype.parse = function(data) {
- var offset = (version < 6) ? 1 : 0,
- consumed = this._parser.execute(data, 0, data.length) + offset;
-
- if (this._complete)
- this.body = (consumed < data.length)
- ? data.slice(consumed)
- : new Buffer(0);
-};
-
-module.exports = HttpParser;
-
diff --git a/node_modules/coalesce/node_modules/sockjs/node_modules/faye-websocket/node_modules/websocket-driver/lib/websocket/driver/hybi.js b/node_modules/coalesce/node_modules/sockjs/node_modules/faye-websocket/node_modules/websocket-driver/lib/websocket/driver/hybi.js
deleted file mode 100644
index 256e9c59..00000000
--- a/node_modules/coalesce/node_modules/sockjs/node_modules/faye-websocket/node_modules/websocket-driver/lib/websocket/driver/hybi.js
+++ /dev/null
@@ -1,429 +0,0 @@
-var crypto = require('crypto'),
- util = require('util'),
- Base = require('./base'),
- Reader = require('./hybi/stream_reader');
-
-var Hybi = function(request, url, options) {
- Base.apply(this, arguments);
- this._reset();
-
- this._reader = new Reader();
- this._stage = 0;
- this._masking = this._options.masking;
- this._protocols = this._options.protocols || [];
-
- if (typeof this._protocols === 'string')
- this._protocols = this._protocols.split(/\s*,\s*/);
-
- this._requireMasking = this._options.requireMasking;
- this._pingCallbacks = {};
-
- if (!this.version) {
- var version = this._request.headers['sec-websocket-version'];
- this.version = 'hybi-' + version;
- }
-};
-util.inherits(Hybi, Base);
-
-Hybi.mask = function(payload, mask, offset) {
- if (mask.length === 0) return payload;
- offset = offset || 0;
-
- for (var i = 0, n = payload.length - offset; i < n; i++) {
- payload[offset + i] = payload[offset + i] ^ mask[i % 4];
- }
- return payload;
-};
-
-Hybi.generateAccept = function(key) {
- var sha1 = crypto.createHash('sha1');
- sha1.update(key + Hybi.GUID);
- return sha1.digest('base64');
-};
-
-Hybi.GUID = '258EAFA5-E914-47DA-95CA-C5AB0DC85B11';
-
-var instance = {
- BYTE: 255,
- FIN: 128,
- MASK: 128,
- RSV1: 64,
- RSV2: 32,
- RSV3: 16,
- OPCODE: 15,
- LENGTH: 127,
-
- OPCODES: {
- continuation: 0,
- text: 1,
- binary: 2,
- close: 8,
- ping: 9,
- pong: 10
- },
-
- OPCODE_CODES: [0, 1, 2, 8, 9, 10],
- FRAGMENTED_OPCODES: [0, 1, 2],
- OPENING_OPCODES: [1, 2],
-
- TWO_POWERS: [0, 1, 2, 3, 4, 5, 6, 7].map(function(n) { return Math.pow(2, 8 * n) }),
-
- ERRORS: {
- normal_closure: 1000,
- going_away: 1001,
- protocol_error: 1002,
- unacceptable: 1003,
- encoding_error: 1007,
- policy_violation: 1008,
- too_large: 1009,
- extension_error: 1010,
- unexpected_condition: 1011
- },
-
- ERROR_CODES: [1000, 1001, 1002, 1003, 1007, 1008, 1009, 1010, 1011],
- MIN_RESERVED_ERROR: 3000,
- MAX_RESERVED_ERROR: 4999,
-
- // http://www.w3.org/International/questions/qa-forms-utf-8.en.php
- UTF8_MATCH: /^([\x00-\x7F]|[\xC2-\xDF][\x80-\xBF]|\xE0[\xA0-\xBF][\x80-\xBF]|[\xE1-\xEC\xEE\xEF][\x80-\xBF]{2}|\xED[\x80-\x9F][\x80-\xBF]|\xF0[\x90-\xBF][\x80-\xBF]{2}|[\xF1-\xF3][\x80-\xBF]{3}|\xF4[\x80-\x8F][\x80-\xBF]{2})*$/,
-
- parse: function(data) {
- this._reader.put(data);
- var buffer = true;
- while (buffer) {
- switch (this._stage) {
- case 0:
- buffer = this._reader.read(1);
- if (buffer) this._parseOpcode(buffer[0]);
- break;
-
- case 1:
- buffer = this._reader.read(1);
- if (buffer) this._parseLength(buffer[0]);
- break;
-
- case 2:
- buffer = this._reader.read(this._lengthSize);
- if (buffer) this._parseExtendedLength(buffer);
- break;
-
- case 3:
- buffer = this._reader.read(4);
- if (buffer) {
- this._mask = buffer;
- this._stage = 4;
- }
- break;
-
- case 4:
- buffer = this._reader.read(this._length);
- if (buffer) {
- this._payload = buffer;
- this._emitFrame();
- this._stage = 0;
- }
- break;
-
- default:
- buffer = null;
- }
- }
- },
-
- frame: function(data, type, code) {
- if (this.readyState <= 0) return this._queue([data, type, code]);
- if (this.readyState !== 1) return false;
-
- if (data instanceof Array) data = new Buffer(data);
-
- var isText = (typeof data === 'string'),
- opcode = this.OPCODES[type || (isText ? 'text' : 'binary')],
- buffer = isText ? new Buffer(data, 'utf8') : data,
- insert = code ? 2 : 0,
- length = buffer.length + insert,
- header = (length <= 125) ? 2 : (length <= 65535 ? 4 : 10),
- offset = header + (this._masking ? 4 : 0),
- masked = this._masking ? this.MASK : 0,
- frame = new Buffer(length + offset),
- BYTE = this.BYTE,
- mask, i;
-
- frame[0] = this.FIN | opcode;
-
- if (length <= 125) {
- frame[1] = masked | length;
- } else if (length <= 65535) {
- frame[1] = masked | 126;
- frame[2] = Math.floor(length / 256);
- frame[3] = length & BYTE;
- } else {
- frame[1] = masked | 127;
- frame[2] = Math.floor(length / Math.pow(2,56)) & BYTE;
- frame[3] = Math.floor(length / Math.pow(2,48)) & BYTE;
- frame[4] = Math.floor(length / Math.pow(2,40)) & BYTE;
- frame[5] = Math.floor(length / Math.pow(2,32)) & BYTE;
- frame[6] = Math.floor(length / Math.pow(2,24)) & BYTE;
- frame[7] = Math.floor(length / Math.pow(2,16)) & BYTE;
- frame[8] = Math.floor(length / Math.pow(2,8)) & BYTE;
- frame[9] = length & BYTE;
- }
-
- if (code) {
- frame[offset] = Math.floor(code / 256) & BYTE;
- frame[offset+1] = code & BYTE;
- }
- buffer.copy(frame, offset + insert);
-
- if (this._masking) {
- mask = [Math.floor(Math.random() * 256), Math.floor(Math.random() * 256),
- Math.floor(Math.random() * 256), Math.floor(Math.random() * 256)];
- new Buffer(mask).copy(frame, header);
- Hybi.mask(frame, mask, offset);
- }
-
- this._write(frame);
- return true;
- },
-
- text: function(message) {
- return this.frame(message, 'text');
- },
-
- binary: function(message) {
- return this.frame(message, 'binary');
- },
-
- ping: function(message, callback) {
- message = message || '';
- if (callback) this._pingCallbacks[message] = callback;
- return this.frame(message, 'ping');
- },
-
- close: function(reason, code) {
- reason = reason || '';
- code = code || this.ERRORS.normal_closure;
-
- if (this.readyState === 0) {
- this.readyState = 3;
- this.emit('close', new Base.CloseEvent(code, reason));
- return true;
- } else if (this.readyState === 1) {
- this.frame(reason, 'close', code);
- this.readyState = 2;
- return true;
- } else {
- return false;
- }
- },
-
- _handshakeResponse: function() {
- var secKey = this._request.headers['sec-websocket-key'];
- if (!secKey) return '';
-
- var accept = Hybi.generateAccept(secKey),
- protos = this._request.headers['sec-websocket-protocol'],
- supported = this._protocols,
- proto,
-
- headers = [
- 'HTTP/1.1 101 Switching Protocols',
- 'Upgrade: websocket',
- 'Connection: Upgrade',
- 'Sec-WebSocket-Accept: ' + accept
- ];
-
- if (protos !== undefined) {
- if (typeof protos === 'string') protos = protos.split(/\s*,\s*/);
- proto = protos.filter(function(p) { return supported.indexOf(p) >= 0 })[0];
- if (proto) {
- this.protocol = proto;
- headers.push('Sec-WebSocket-Protocol: ' + proto);
- }
- }
-
- return new Buffer(headers.concat(this.__headers.toString(), '').join('\r\n'), 'utf8');
- },
-
- _shutdown: function(code, reason) {
- this.frame(reason, 'close', code);
- this.readyState = 3;
- this._stage = 5;
- this.emit('close', new Base.CloseEvent(code, reason));
- },
-
- _fail: function(type, message) {
- this.emit('error', new Error(message));
- this._shutdown(this.ERRORS[type], message);
- },
-
- _parseOpcode: function(data) {
- var rsvs = [this.RSV1, this.RSV2, this.RSV3].map(function(rsv) {
- return (data & rsv) === rsv;
- });
-
- if (rsvs.filter(function(rsv) { return rsv }).length > 0)
- return this._fail('protocol_error',
- 'One or more reserved bits are on: reserved1 = ' + (rsvs[0] ? 1 : 0) +
- ', reserved2 = ' + (rsvs[1] ? 1 : 0) +
- ', reserved3 = ' + (rsvs[2] ? 1 : 0));
-
- this._final = (data & this.FIN) === this.FIN;
- this._opcode = (data & this.OPCODE);
- this._mask = [];
- this._payload = [];
-
- if (this.OPCODE_CODES.indexOf(this._opcode) < 0)
- return this._fail('protocol_error', 'Unrecognized frame opcode: ' + this._opcode);
-
- if (this.FRAGMENTED_OPCODES.indexOf(this._opcode) < 0 && !this._final)
- return this._fail('protocol_error', 'Received fragmented control frame: opcode = ' + this._opcode);
-
- if (this._mode && this.OPENING_OPCODES.indexOf(this._opcode) >= 0)
- return this._fail('protocol_error', 'Received new data frame but previous continuous frame is unfinished');
-
- this._stage = 1;
- },
-
- _parseLength: function(data) {
- this._masked = (data & this.MASK) === this.MASK;
- if (this._requireMasking && !this._masked)
- return this._fail('unacceptable', 'Received unmasked frame but masking is required');
-
- this._length = (data & this.LENGTH);
-
- if (this._length >= 0 && this._length <= 125) {
- if (!this._checkFrameLength()) return;
- this._stage = this._masked ? 3 : 4;
- } else {
- this._lengthSize = (this._length === 126 ? 2 : 8);
- this._stage = 2;
- }
- },
-
- _parseExtendedLength: function(buffer) {
- this._length = this._getInteger(buffer);
-
- if (this.FRAGMENTED_OPCODES.indexOf(this._opcode) < 0 && this._length > 125)
- return this._fail('protocol_error', 'Received control frame having too long payload: ' + this._length);
-
- if (!this._checkFrameLength()) return;
-
- this._stage = this._masked ? 3 : 4;
- },
-
- _checkFrameLength: function() {
- if (this.__blength + this._length > this._maxLength) {
- this._fail('too_large', 'WebSocket frame length too large');
- return false;
- } else {
- return true;
- }
- },
-
- _emitFrame: function() {
- var payload = Hybi.mask(this._payload, this._mask),
- opcode = this._opcode;
-
- if (opcode === this.OPCODES.continuation) {
- if (!this._mode) return this._fail('protocol_error', 'Received unexpected continuation frame');
- this._buffer(payload);
- if (this._final) {
- var message = this._concatBuffer();
- if (this._mode === 'text') message = this._encode(message);
- this._reset();
- if (message === null)
- this._fail('encoding_error', 'Could not decode a text frame as UTF-8');
- else
- this.emit('message', new Base.MessageEvent(message));
- }
- }
- else if (opcode === this.OPCODES.text) {
- if (this._final) {
- var message = this._encode(payload);
- if (message === null)
- this._fail('encoding_error', 'Could not decode a text frame as UTF-8');
- else
- this.emit('message', new Base.MessageEvent(message));
- } else {
- this._mode = 'text';
- this._buffer(payload);
- }
- }
- else if (opcode === this.OPCODES.binary) {
- if (this._final) {
- this.emit('message', new Base.MessageEvent(payload));
- } else {
- this._mode = 'binary';
- this._buffer(payload);
- }
- }
- else if (opcode === this.OPCODES.close) {
- var code = (payload.length >= 2) ? 256 * payload[0] + payload[1] : null,
- reason = (payload.length > 2) ? this._encode(payload.slice(2)) : null;
-
- if (!(payload.length === 0) &&
- !(code !== null && code >= this.MIN_RESERVED_ERROR && code <= this.MAX_RESERVED_ERROR) &&
- this.ERROR_CODES.indexOf(code) < 0)
- code = this.ERRORS.protocol_error;
-
- if (payload.length > 125 || (payload.length > 2 && !reason))
- code = this.ERRORS.protocol_error;
-
- this._shutdown(code, reason || '');
- }
- else if (opcode === this.OPCODES.ping) {
- this.frame(payload, 'pong');
- }
- else if (opcode === this.OPCODES.pong) {
- var callbacks = this._pingCallbacks,
- message = this._encode(payload),
- callback = callbacks[message];
-
- delete callbacks[message];
- if (callback) callback()
- }
- },
-
- _buffer: function(fragment) {
- this.__buffer.push(fragment);
- this.__blength += fragment.length;
- },
-
- _concatBuffer: function() {
- var buffer = new Buffer(this.__blength),
- offset = 0;
-
- for (var i = 0, n = this.__buffer.length; i < n; i++) {
- this.__buffer[i].copy(buffer, offset);
- offset += this.__buffer[i].length;
- }
- return buffer;
- },
-
- _reset: function() {
- this._mode = null;
- this.__buffer = [];
- this.__blength = 0;
- },
-
- _encode: function(buffer) {
- try {
- var string = buffer.toString('binary', 0, buffer.length);
- if (!this.UTF8_MATCH.test(string)) return null;
- } catch (e) {}
- return buffer.toString('utf8', 0, buffer.length);
- },
-
- _getInteger: function(bytes) {
- var number = 0;
- for (var i = 0, n = bytes.length; i < n; i++)
- number += bytes[i] * this.TWO_POWERS[n - 1 - i];
- return number;
- }
-};
-
-for (var key in instance)
- Hybi.prototype[key] = instance[key];
-
-module.exports = Hybi;
-
diff --git a/node_modules/coalesce/node_modules/sockjs/node_modules/faye-websocket/node_modules/websocket-driver/lib/websocket/driver/hybi/stream_reader.js b/node_modules/coalesce/node_modules/sockjs/node_modules/faye-websocket/node_modules/websocket-driver/lib/websocket/driver/hybi/stream_reader.js
deleted file mode 100644
index 21e6362c..00000000
--- a/node_modules/coalesce/node_modules/sockjs/node_modules/faye-websocket/node_modules/websocket-driver/lib/websocket/driver/hybi/stream_reader.js
+++ /dev/null
@@ -1,46 +0,0 @@
-var StreamReader = function() {
- this._queue = [];
- this._queueSize = 0;
- this._cursor = 0;
-};
-
-StreamReader.prototype.read = function(bytes) {
- return this._readBuffer(bytes);
-};
-
-StreamReader.prototype.put = function(buffer) {
- if (!buffer || buffer.length === 0) return;
- if (!buffer.copy) buffer = new Buffer(buffer);
- this._queue.push(buffer);
- this._queueSize += buffer.length;
-};
-
-StreamReader.prototype._readBuffer = function(length) {
- if (length > this._queueSize) return null;
-
- var buffer = new Buffer(length),
- queue = this._queue,
- remain = length,
- n = queue.length,
- i = 0,
- chunk, offset, size;
-
- if (remain === 0) return buffer;
-
- while (remain > 0 && i < n) {
- chunk = queue[i];
- offset = (i === 0) ? this._cursor : 0;
- size = Math.min(remain, chunk.length - offset);
- chunk.copy(buffer, length - remain, offset, offset + size);
- remain -= size;
- this._queueSize -= size;
- i += 1;
- }
-
- queue.splice(0, i-1);
- this._cursor = (i === 1 ? this._cursor : 0) + size;
-
- return buffer;
-};
-
-module.exports = StreamReader;
diff --git a/node_modules/coalesce/node_modules/sockjs/node_modules/faye-websocket/node_modules/websocket-driver/lib/websocket/driver/server.js b/node_modules/coalesce/node_modules/sockjs/node_modules/faye-websocket/node_modules/websocket-driver/lib/websocket/driver/server.js
deleted file mode 100644
index 5cade227..00000000
--- a/node_modules/coalesce/node_modules/sockjs/node_modules/faye-websocket/node_modules/websocket-driver/lib/websocket/driver/server.js
+++ /dev/null
@@ -1,104 +0,0 @@
-var util = require('util'),
- HttpParser = require('./http_parser'),
- Base = require('./base'),
- Draft75 = require('./draft75'),
- Draft76 = require('./draft76'),
- Hybi = require('./hybi');
-
-var Server = function(options) {
- Base.call(this, null, null, options);
- this._http = new HttpParser('request');
-};
-util.inherits(Server, Base);
-
-var instance = {
- EVENTS: ['open', 'message', 'error', 'close'],
-
- _bindEventListeners: function() {
- this.messages.on('error', function() {});
- this.on('error', function() {});
- },
-
- parse: function(data) {
- if (this._delegate) return this._delegate.parse(data);
-
- this._http.parse(data);
- if (!this._http.isComplete()) return;
-
- this.method = this._http.method;
- this.url = this._http.url;
- this.headers = this._http.headers;
- this.body = this._http.body;
-
- var self = this;
- this._delegate = Server.http(this, this._options);
- this._delegate.messages = this.messages;
- this._delegate.io = this.io;
-
- this._delegate.on('open', function() { self._open() });
- this.EVENTS.forEach(function(event) {
- this._delegate.on(event, function(e) { self.emit(event, e) });
- }, this);
-
- this.parse(this._http.body);
- this.emit('connect', new Base.ConnectEvent());
- },
-
- _open: function() {
- this.__queue.forEach(function(msg) {
- this._delegate[msg[0]].apply(this._delegate, msg[1]);
- }, this);
- this.__queue = [];
- }
-};
-
-['setHeader', 'start', 'state', 'frame', 'text', 'binary', 'ping', 'close'].forEach(function(method) {
- instance[method] = function() {
- if (this._delegate) {
- return this._delegate[method].apply(this._delegate, arguments);
- } else {
- this.__queue.push([method, arguments]);
- return true;
- }
- };
-});
-
-for (var key in instance)
- Server.prototype[key] = instance[key];
-
-Server.isSecureRequest = function(request) {
- if (request.connection && request.connection.authorized !== undefined) return true;
- if (request.socket && request.socket.secure) return true;
-
- var headers = request.headers;
- if (!headers) return false;
- if (headers['https'] === 'on') return true;
- if (headers['x-forwarded-ssl'] === 'on') return true;
- if (headers['x-forwarded-scheme'] === 'https') return true;
- if (headers['x-forwarded-proto'] === 'https') return true;
-
- return false;
-};
-
-Server.determineUrl = function(request) {
- var scheme = this.isSecureRequest(request) ? 'wss:' : 'ws:';
- return scheme + '//' + request.headers.host + request.url;
-};
-
-Server.http = function(request, options) {
- options = options || {};
- if (options.requireMasking === undefined) options.requireMasking = true;
-
- var headers = request.headers,
- url = this.determineUrl(request);
-
- if (headers['sec-websocket-version'])
- return new Hybi(request, url, options);
- else if (headers['sec-websocket-key1'])
- return new Draft76(request, url, options);
- else
- return new Draft75(request, url, options);
-};
-
-module.exports = Server;
-
diff --git a/node_modules/coalesce/node_modules/sockjs/node_modules/faye-websocket/node_modules/websocket-driver/lib/websocket/streams.js b/node_modules/coalesce/node_modules/sockjs/node_modules/faye-websocket/node_modules/websocket-driver/lib/websocket/streams.js
deleted file mode 100644
index ae186028..00000000
--- a/node_modules/coalesce/node_modules/sockjs/node_modules/faye-websocket/node_modules/websocket-driver/lib/websocket/streams.js
+++ /dev/null
@@ -1,144 +0,0 @@
-/**
-
-Streams in a WebSocket connection
----------------------------------
-
-We model a WebSocket as two duplex streams: one stream is for the wire protocol
-over an I/O socket, and the other is for incoming/outgoing messages.
-
-
- +----------+ +---------+ +----------+
- [1] write(chunk) -->| ~~~~~~~~ +----->| parse() +----->| ~~~~~~~~ +--> emit('data') [2]
- | | +----+----+ | |
- | | | | |
- | IO | | [5] | Messages |
- | | V | |
- | | +---------+ | |
- [4] emit('data') <--+ ~~~~~~~~ |<-----+ frame() |<-----+ ~~~~~~~~ |<-- write(chunk) [3]
- +----------+ +---------+ +----------+
-
-
-Message transfer in each direction is simple: IO receives a byte stream [1] and
-sends this stream for parsing. The parser will periodically emit a complete
-message text on the Messages stream [2]. Similarly, when messages are written
-to the Messages stream [3], they are framed using the WebSocket wire format and
-emitted via IO [4].
-
-There is a feedback loop via [5] since some input from [1] will be things like
-ping, pong and close frames. In these cases the protocol responds by emitting
-responses directly back to [4] rather than emitting messages via [2].
-
-For the purposes of flow control, we consider the sources of each Readable
-stream to be as follows:
-
-* [2] receives input from [1]
-* [4] receives input from [1] and [3]
-
-The classes below express the relationships described above without prescribing
-anything about how parse() and frame() work, other than assuming they emit
-'data' events to the IO and Messages streams. They will work with any protocol
-driver having these two methods.
-**/
-
-
-var Stream = require('stream').Stream,
- util = require('util');
-
-
-var IO = function(driver) {
- this.readable = this.writable = true;
- this._paused = false;
- this._driver = driver;
-};
-util.inherits(IO, Stream);
-
-// The IO pause() and resume() methods will be called when the socket we are
-// piping to gets backed up and drains. Since IO output [4] comes from IO input
-// [1] and Messages input [3], we need to tell both of those to return false
-// from write() when this stream is paused.
-
-IO.prototype.pause = function() {
- this._paused = true;
- this._driver.messages._paused = true;
-};
-
-IO.prototype.resume = function() {
- this._paused = false;
- this.emit('drain');
-
- var messages = this._driver.messages;
- messages._paused = false;
- messages.emit('drain');
-};
-
-// When we receive input from a socket, send it to the parser and tell the
-// source whether to back off.
-IO.prototype.write = function(chunk) {
- if (!this.writable) return false;
- this._driver.parse(chunk);
- return !this._paused;
-};
-
-// The IO end() method will be called when the socket piping into it emits
-// 'close' or 'end', i.e. the socket is closed. In this situation the Messages
-// stream will not emit any more data so we emit 'end'.
-IO.prototype.end = function(chunk) {
- if (!this.writable) return;
- if (chunk !== undefined) this.write(chunk);
- this.writable = false;
-
- var messages = this._driver.messages;
- if (messages.readable) {
- messages.readable = messages.writable = false;
- messages.emit('end');
- }
-};
-
-IO.prototype.destroy = function() {
- this.end();
-};
-
-
-var Messages = function(driver) {
- this.readable = this.writable = true;
- this._paused = false;
- this._driver = driver;
-};
-util.inherits(Messages, Stream);
-
-// The Messages pause() and resume() methods will be called when the app that's
-// processing the messages gets backed up and drains. If we're emitting
-// messages too fast we should tell the source to slow down. Message output [2]
-// comes from IO input [1].
-
-Messages.prototype.pause = function() {
- this._driver.io._paused = true;
-};
-
-Messages.prototype.resume = function() {
- this._driver.io._paused = false;
- this._driver.io.emit('drain');
-};
-
-// When we receive messages from the user, send them to the formatter and tell
-// the source whether to back off.
-Messages.prototype.write = function(message) {
- if (!this.writable) return false;
- this._driver.frame(message);
- return !this._paused;
-};
-
-// The Messages end() method will be called when a stream piping into it emits
-// 'end'. Many streams may be piped into the WebSocket and one of them ending
-// does not mean the whole socket is done, so just process the input and move
-// on leaving the socket open.
-Messages.prototype.end = function(message) {
- if (message !== undefined) this.write(message);
-};
-
-Messages.prototype.destroy = function() {};
-
-
-exports.IO = IO;
-exports.Messages = Messages;
-
diff --git a/node_modules/coalesce/node_modules/sockjs/node_modules/faye-websocket/node_modules/websocket-driver/package.json b/node_modules/coalesce/node_modules/sockjs/node_modules/faye-websocket/node_modules/websocket-driver/package.json
deleted file mode 100644
index 6bfbb150..00000000
--- a/node_modules/coalesce/node_modules/sockjs/node_modules/faye-websocket/node_modules/websocket-driver/package.json
+++ /dev/null
@@ -1,40 +0,0 @@
-{
- "name": "websocket-driver",
- "description": "WebSocket protocol handler with pluggable I/O",
- "homepage": "http://github.com/faye/websocket-driver-node",
- "author": {
- "name": "James Coglan",
- "email": "jcoglan@gmail.com",
- "url": "http://jcoglan.com/"
- },
- "keywords": [
- "websocket"
- ],
- "license": "MIT",
- "version": "0.3.2",
- "engines": {
- "node": ">=0.4.0"
- },
- "main": "./lib/websocket/driver",
- "devDependencies": {
- "jstest": ""
- },
- "scripts": {
- "test": "jstest spec/runner.js"
- },
- "repository": {
- "type": "git",
- "url": "git://github.com/faye/websocket-driver-node.git"
- },
- "bugs": {
- "url": "http://github.com/faye/websocket-driver-node/issues"
- },
- "readme": "# websocket-driver [](https://travis-ci.org/faye/websocket-driver-node)\n\nThis module provides a complete implementation of the WebSocket protocols that\ncan be hooked up to any I/O stream. It aims to simplify things by decoupling\nthe protocol details from the I/O layer, such that users only need to implement\ncode to stream data in and out of it without needing to know anything about how\nthe protocol actually works. Think of it as a complete WebSocket system with\npluggable I/O.\n\nDue to this design, you get a lot of things for free. In particular, if you\nhook this module up to some I/O object, it will do all of this for you:\n\n* Select the correct server-side driver to talk to the client\n* Generate and send both server- and client-side handshakes\n* Recognize when the handshake phase completes and the WS protocol begins\n* Negotiate subprotocol selection based on `Sec-WebSocket-Protocol`\n* Buffer sent messages until the handshake process is finished\n* Deal with proxies that defer delivery of the draft-76 handshake body\n* Notify you when the socket is open and closed and when messages arrive\n* Recombine fragmented messages\n* Dispatch text, binary, ping and close frames\n* Manage the socket-closing handshake process\n* Automatically reply to ping frames with a matching pong\n* Apply masking to messages sent by the client\n\nThis library was originally extracted from the [Faye](http://faye.jcoglan.com)\nproject but now aims to provide simple WebSocket support for any Node-based\nproject.\n\n\n## Installation\n\n```\n$ npm install websocket-driver\n```\n\n\n## Usage\n\nThis module provides protocol drivers that have the same interface on the\nserver and on the client. A WebSocket driver is an object with two duplex\nstreams attached; one for incoming/outgoing messages and one for managing the\nwire protocol over an I/O stream. The full API is described below.\n\n\n### Server-side with HTTP\n\nA Node webserver emits a special event for 'upgrade' requests, and this is\nwhere you should handle WebSockets. You first check whether the request is a\nWebSocket, and if so you can create a driver and attach the request's I/O\nstream to it.\n\n```js\nvar http = require('http'),\n websocket = require('websocket-driver');\n\nvar server = http.createServer();\n\nserver.on('upgrade', function(request, socket, body) {\n if (!websocket.isWebSocket(request)) return;\n\n var driver = websocket.http(request);\n\n driver.io.write(body);\n socket.pipe(driver.io).pipe(socket);\n\n driver.messages.on('data', function(message) {\n console.log('Got a message', message);\n });\n\n driver.start();\n});\n```\n\nNote the line `driver.io.write(body)` - you must pass the `body` buffer to the\nsocket driver in order to make certain versions of the protocol work.\n\n\n### Server-side with TCP\n\nYou can also handle WebSocket connections in a bare TCP server, if you're not\nusing an HTTP server and don't want to implement HTTP parsing yourself.\n\nThe driver will emit a `connect` event when a request is received, and at this\npoint you can detect whether it's a WebSocket and handle it as such. Here's an\nexample using the Node `net` module:\n\n```js\nvar net = require('net'),\n websocket = require('websocket-driver');\n\nvar server = net.createServer(function(connection) {\n var driver = websocket.server();\n\n driver.on('connect', function() {\n if (websocket.isWebSocket(driver)) {\n driver.start();\n } else {\n // handle other HTTP requests\n }\n });\n\n driver.on('close', function() { connection.end() });\n connection.on('error', function() {});\n\n connection.pipe(driver.io).pipe(connection);\n\n driver.messages.pipe(driver.messages);\n});\n\nserver.listen(4180);\n```\n\nIn the `connect` event, the driver gains several properties to describe the\nrequest, similar to a Node request object, such as `method`, `url` and\n`headers`. However you should remember it's not a real request object; you\ncannot write data to it, it only tells you what request data we parsed from the\ninput.\n\nIf the request has a body, it will be in the `driver.body` buffer, but only as\nmuch of the body as has been piped into the driver when the `connect` event\nfires.\n\n\n### Client-side\n\nSimilarly, to implement a WebSocket client you just need to make a driver by\npassing in a URL. After this you use the driver API as described below to\nprocess incoming data and send outgoing data.\n\n\n```js\nvar net = require('net'),\n websocket = require('websocket-driver');\n\nvar driver = websocket.client('ws://www.example.com/socket'),\n tcp = net.createConnection(80, 'www.example.com');\n\ntcp.pipe(driver.io).pipe(tcp);\n\ndriver.messages.on('data', function(message) {\n console.log('Got a message', message);\n});\n\ntcp.on('connect', function() {\n driver.start();\n});\n```\n\nClient drivers have two additional properties for reading the HTTP data that\nwas sent back by the server:\n\n* `driver.statusCode` - the integer value of the HTTP status code\n* `driver.headers` - an object containing the response headers\n\n\n### Driver API\n\nDrivers are created using one of the following methods:\n\n```js\ndriver = websocket.http(request, options)\ndriver = websocket.server(options)\ndriver = websocket.client(url, options)\n```\n\nThe `http` method returns a driver chosen using the headers from a Node HTTP\nrequest object. The `server` method returns a driver that will parse an HTTP\nrequest and then decide which driver to use for it using the `http` method. The\n`client` method always returns a driver for the RFC version of the protocol\nwith masking enabled on outgoing frames.\n\nThe `options` argument is optional, and is an object. It may contain the\nfollowing fields:\n\n* `maxLength` - the maximum allowed size of incoming message frames, in bytes.\n The default value is `2^26 - 1`, or 1 byte short of 64 MiB.\n* `protocols` - an array of strings representing acceptable subprotocols for\n use over the socket. The driver will negotiate one of these to use via the\n `Sec-WebSocket-Protocol` header if supported by the other peer.\n\nA driver has two duplex streams attached to it:\n\n* `driver.io` - this stream should be attached to an I/O socket like a\n TCP stream. Pipe incoming TCP chunks to this stream for them to be parsed,\n and pipe this stream back into TCP to send outgoing frames.\n* `driver.messages` - this stream emits messages received over the\n WebSocket. Writing to it sends messages to the other peer by emitting frames\n via the `driver.io` stream.\n\nAll drivers respond to the following API methods, but some of them are no-ops\ndepending on whether the client supports the behaviour.\n\nNote that most of these methods are commands: if they produce data that should\nbe sent over the socket, they will give this to you by emitting `data` events\non the `driver.io` stream.\n\n#### `driver.on('open', function(event) {})`\n\nSets the callback to execute when the socket becomes open.\n\n#### `driver.on('message', function(event) {})`\n\nSets the callback to execute when a message is received. `event` will have a\n`data` attribute containing either a string in the case of a text message or a\n`Buffer` in the case of a binary message.\n\nYou can also listen for messages using the `driver.messages.on('data')` event,\nwhich emits strings for text messages and buffers for binary messages.\n\n#### `driver.on('error', function(event) {})`\n\nSets the callback to execute when a protocol error occurs due to the other peer\nsending an invalid byte sequence. `event` will have a `message` attribute\ndescribing the error.\n\n#### `driver.on('close', function(event) {})`\n\nSets the callback to execute when the socket becomes closed. The `event` object\nhas `code` and `reason` attributes.\n\n#### `driver.setHeader(name, value)`\n\nSets a custom header to be sent as part of the handshake response, either from\nthe server or from the client. Must be called before `start()`, since this is\nwhen the headers are serialized and sent.\n\n#### `driver.start()`\n\nInitiates the protocol by sending the handshake - either the response for a\nserver-side driver or the request for a client-side one. This should be the\nfirst method you invoke. Returns `true` iff a handshake was sent.\n\n#### `driver.parse(string)`\n\nTakes a string and parses it, potentially resulting in message events being\nemitted (see `on('message')` above) or in data being sent to `driver.io`. You\nshould send all data you receive via I/O to this method by piping a stream into\n`driver.io`.\n\n#### `driver.text(string)`\n\nSends a text message over the socket. If the socket handshake is not yet\ncomplete, the message will be queued until it is. Returns `true` if the message\nwas sent or queued, and `false` if the socket can no longer send messages.\n\nThis method is equivalent to `driver.messages.write(string)`.\n\n#### `driver.binary(buffer)`\n\nTakes a `Buffer` and sends it as a binary message. Will queue and return `true`\nor `false` the same way as the `text` method. It will also return `false` if\nthe driver does not support binary messages.\n\nThis method is equivalent to `driver.messages.write(buffer)`.\n\n#### `driver.ping(string = '', function() {})`\n\nSends a ping frame over the socket, queueing it if necessary. `string` and the\ncallback are both optional. If a callback is given, it will be invoked when the\nsocket receives a pong frame whose content matches `string`. Returns `false` if\nframes can no longer be sent, or if the driver does not support ping/pong.\n\n#### `driver.close()`\n\nInitiates the closing handshake if the socket is still open. For drivers with\nno closing handshake, this will result in the immediate execution of the\n`on('close')` driver. For drivers with a closing handshake, this sends a\nclosing frame and `emit('close')` will execute when a response is received or a\nprotocol error occurs.\n\n#### `driver.version`\n\nReturns the WebSocket version in use as a string. Will either be `hixie-75`,\n`hixie-76` or `hybi-$version`.\n\n#### `driver.protocol`\n\nReturns a string containing the selected subprotocol, if any was agreed upon\nusing the `Sec-WebSocket-Protocol` mechanism. This value becomes available\nafter `emit('open')` has fired.\n\n\n## License\n\n(The MIT License)\n\nCopyright (c) 2010-2013 James Coglan\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of\nthis software and associated documentation files (the 'Software'), to deal in\nthe Software without restriction, including without limitation the rights to\nuse, copy, modify, merge, publish, distribute, sublicense, and/or sell copies\nof the Software, and to permit persons to whom the Software is furnished to do\nso, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n\n",
- "readmeFilename": "README.md",
- "_id": "websocket-driver@0.3.2",
- "dist": {
- "shasum": "f177ef6611390e2401ae47f35e8386dda987daca"
- },
- "_from": "websocket-driver@>=0.3.0",
- "_resolved": "https://registry.npmjs.org/websocket-driver/-/websocket-driver-0.3.2.tgz"
-}
diff --git a/node_modules/coalesce/node_modules/sockjs/node_modules/faye-websocket/package.json b/node_modules/coalesce/node_modules/sockjs/node_modules/faye-websocket/package.json
deleted file mode 100644
index 8ac64232..00000000
--- a/node_modules/coalesce/node_modules/sockjs/node_modules/faye-websocket/package.json
+++ /dev/null
@@ -1,45 +0,0 @@
-{
- "name": "faye-websocket",
- "description": "Standards-compliant WebSocket server and client",
- "homepage": "http://github.com/faye/faye-websocket-node",
- "author": {
- "name": "James Coglan",
- "email": "jcoglan@gmail.com",
- "url": "http://jcoglan.com/"
- },
- "keywords": [
- "websocket",
- "eventsource"
- ],
- "license": "MIT",
- "version": "0.7.0",
- "engines": {
- "node": ">=0.4.0"
- },
- "main": "./lib/faye/websocket",
- "dependencies": {
- "websocket-driver": ">=0.3.0"
- },
- "devDependencies": {
- "jstest": "",
- "pace": ""
- },
- "scripts": {
- "test": "jstest spec/runner.js"
- },
- "repository": {
- "type": "git",
- "url": "git://github.com/faye/faye-websocket-node.git"
- },
- "bugs": {
- "url": "http://github.com/faye/faye-websocket-node/issues"
- },
- "readme": "# faye-websocket\n\n* Travis CI build: [](http://travis-ci.org/faye/faye-websocket-node)\n* Autobahn tests: [server](http://faye.jcoglan.com/autobahn/servers/),\n [client](http://faye.jcoglan.com/autobahn/clients/)\n\nThis is a general-purpose WebSocket implementation extracted from the\n[Faye](http://faye.jcoglan.com) project. It provides classes for easily\nbuilding WebSocket servers and clients in Node. It does not provide a server\nitself, but rather makes it easy to handle WebSocket connections within an\nexisting [Node](http://nodejs.org/) application. It does not provide any\nabstraction other than the standard [WebSocket\nAPI](http://dev.w3.org/html5/websockets/).\n\nIt also provides an abstraction for handling\n[EventSource](http://dev.w3.org/html5/eventsource/) connections, which are\none-way connections that allow the server to push data to the client. They are\nbased on streaming HTTP responses and can be easier to access via proxies than\nWebSockets.\n\n\n## Installation\n\n```\n$ npm install faye-websocket\n```\n\n\n## Handling WebSocket connections in Node\n\nYou can handle WebSockets on the server side by listening for HTTP Upgrade\nrequests, and creating a new socket for the request. This socket object exposes\nthe usual WebSocket methods for receiving and sending messages. For example this\nis how you'd implement an echo server:\n\n```js\nvar WebSocket = require('faye-websocket'),\n http = require('http');\n\nvar server = http.createServer();\n\nserver.on('upgrade', function(request, socket, body) {\n if (WebSocket.isWebSocket(request)) {\n var ws = new WebSocket(request, socket, body);\n \n ws.on('message', function(event) {\n ws.send(event.data);\n });\n \n ws.on('close', function(event) {\n console.log('close', event.code, event.reason);\n ws = null;\n });\n }\n});\n\nserver.listen(8000);\n```\n\n`WebSocket` objects are also duplex streams, so you could replace the\n`ws.on('message', ...)` line with:\n\n```js\n ws.pipe(ws);\n```\n\nNote that under certain circumstances (notably a draft-76 client connecting\nthrough an HTTP proxy), the WebSocket handshake will not be complete after you\ncall `new WebSocket()` because the server will not have received the entire\nhandshake from the client yet. In this case, calls to `ws.send()` will buffer\nthe message in memory until the handshake is complete, at which point any\nbuffered messages will be sent to the client.\n\nIf you need to detect when the WebSocket handshake is complete, you can use the\n`onopen` event.\n\nIf the connection's protocol version supports it, you can call `ws.ping()` to\nsend a ping message and wait for the client's response. This method takes a\nmessage string, and an optional callback that fires when a matching pong\nmessage is received. It returns `true` iff a ping message was sent. If the\nclient does not support ping/pong, this method sends no data and returns\n`false`.\n\n```js\nws.ping('Mic check, one, two', function() {\n // fires when pong is received\n});\n```\n\n\n## Using the WebSocket client\n\nThe client supports both the plain-text `ws` protocol and the encrypted `wss`\nprotocol, and has exactly the same interface as a socket you would use in a web\nbrowser. On the wire it identifies itself as `hybi-13`.\n\n```js\nvar WebSocket = require('faye-websocket'),\n ws = new WebSocket.Client('ws://www.example.com/');\n\nws.on('open', function(event) {\n console.log('open');\n ws.send('Hello, world!');\n});\n\nws.on('message', function(event) {\n console.log('message', event.data);\n});\n\nws.on('close', function(event) {\n console.log('close', event.code, event.reason);\n ws = null;\n});\n```\n\nThe WebSocket client also lets you inspect the status and headers of the\nhandshake response via its `statusCode` and `headers` properties.\n\n\n## Subprotocol negotiation\n\nThe WebSocket protocol allows peers to select and identify the application\nprotocol to use over the connection. On the client side, you can set which\nprotocols the client accepts by passing a list of protocol names when you\nconstruct the socket:\n\n```js\nvar ws = new WebSocket.Client('ws://www.example.com/', ['irc', 'amqp']);\n```\n\nOn the server side, you can likewise pass in the list of protocols the server\nsupports after the other constructor arguments:\n\n```js\nvar ws = new WebSocket(request, socket, body, ['irc', 'amqp']);\n```\n\nIf the client and server agree on a protocol, both the client- and server-side\nsocket objects expose the selected protocol through the `ws.protocol` property.\n\n\n## Initialization options\n\nBoth the server- and client-side classes allow an options object to be passed\nin at initialization time, for example:\n\n```js\nvar ws = new WebSocket(request, socket, body, protocols, options);\nvar ws = new WebSocket.Client(url, protocols, options);\n```\n\n`protocols` is an array of subprotocols as described above, or `null`.\n`options` is an optional object containing any of these fields:\n\n* `headers` - an object containing key-value pairs representing HTTP headers to\n be sent during the handshake process\n* `ping` - an integer that sets how often the WebSocket should send ping\n frames, measured in seconds\n\n\n## WebSocket API\n\nBoth server- and client-side `WebSocket` objects support the following API.\n\n* `on('open', function(event) {})` fires when the socket connection is\n established. Event has no attributes.\n* `on('message', function(event) {})` fires when the socket receives a\n message. Event has one attribute, `data`, which is either a `String`\n (for text frames) or a `Buffer` (for binary frames).\n* `on('error', function(event) {})` fires when there is a protocol error\n due to bad data sent by the other peer. This event is purely informational,\n you do not need to implement error recover.\n* `on('close', function(event) {})` fires when either the client or the\n server closes the connection. Event has two optional attributes,\n `code` and `reason`, that expose the status code and message\n sent by the peer that closed the connection.\n* `send(message)` accepts either a `String` or a `Buffer` and sends a\n text or binary message over the connection to the other peer.\n* `ping(message = '', function() {})` sends a ping frame with an\n optional message and fires the callback when a matching pong is received.\n* `close(code, reason)` closes the connection, sending the given status\n code and reason text, both of which are optional.\n* `version` is a string containing the version of the `WebSocket`\n protocol the connection is using.\n* `protocol` is a string (which may be empty) identifying the\n subprotocol the socket is using.\n\n\n## Handling EventSource connections in Node\n\nEventSource connections provide a very similar interface, although because they\nonly allow the server to send data to the client, there is no `onmessage` API.\nEventSource allows the server to push text messages to the client, where each\nmessage has an optional event-type and ID.\n\n```js\nvar WebSocket = require('faye-websocket'),\n EventSource = WebSocket.EventSource,\n http = require('http');\n\nvar server = http.createServer();\n\nserver.on('request', function(request, response) {\n if (EventSource.isEventSource(request)) {\n var es = new EventSource(request, response);\n console.log('open', es.url, es.lastEventId);\n \n // Periodically send messages\n var loop = setInterval(function() { es.send('Hello') }, 1000);\n \n es.on('close', function() {\n clearInterval(loop);\n es = null;\n });\n \n } else {\n // Normal HTTP request\n response.writeHead(200, {'Content-Type': 'text/plain'});\n response.end('Hello');\n }\n});\n\nserver.listen(8000);\n```\n\nThe `send` method takes two optional parameters, `event` and `id`. The default\nevent-type is `'message'` with no ID. For example, to send a `notification`\nevent with ID `99`:\n\n```js\nes.send('Breaking News!', {event: 'notification', id: '99'});\n```\n\nThe `EventSource` object exposes the following properties:\n\n* `url` is a string containing the URL the client used to create the\n EventSource.\n* `lastEventId` is a string containing the last event ID received by the\n client. You can use this when the client reconnects after a dropped\n connection to determine which messages need resending.\n\nWhen you initialize an EventSource with ` new EventSource()`, you can pass\nconfiguration options after the `response` parameter. Available options are:\n\n* `headers` is an object containing custom headers to be set on the\n EventSource response.\n* `retry` is a number that tells the client how long (in seconds) it\n should wait after a dropped connection before attempting to reconnect.\n* `ping` is a number that tells the server how often (in seconds) to\n send 'ping' packets to the client to keep the connection open, to defeat\n timeouts set by proxies. The client will ignore these messages.\n\nFor example, this creates a connection that allows access from any origin, pings\nevery 15 seconds and is retryable every 10 seconds if the connection is broken:\n\n```js\nvar es = new EventSource(request, response, {\n headers: {'Access-Control-Allow-Origin': '*'},\n ping: 15,\n retry: 10\n});\n```\n\nYou can send a ping message at any time by calling `es.ping()`. Unlike\nWebSocket, the client does not send a response to this; it is merely to send\nsome data over the wire to keep the connection alive.\n\n\n## License\n\n(The MIT License)\n\nCopyright (c) 2010-2013 James Coglan\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of\nthis software and associated documentation files (the 'Software'), to deal in\nthe Software without restriction, including without limitation the rights to\nuse, copy, modify, merge, publish, distribute, sublicense, and/or sell copies\nof the Software, and to permit persons to whom the Software is furnished to do\nso, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n\n",
- "readmeFilename": "README.md",
- "_id": "faye-websocket@0.7.0",
- "dist": {
- "shasum": "c16c50ec0d483357a8eafd1ec6fcc313d027f5be"
- },
- "_from": "faye-websocket@0.7.0",
- "_resolved": "https://registry.npmjs.org/faye-websocket/-/faye-websocket-0.7.0.tgz"
-}
diff --git a/node_modules/coalesce/node_modules/sockjs/node_modules/node-uuid/.npmignore b/node_modules/coalesce/node_modules/sockjs/node_modules/node-uuid/.npmignore
deleted file mode 100644
index fd4f2b06..00000000
--- a/node_modules/coalesce/node_modules/sockjs/node_modules/node-uuid/.npmignore
+++ /dev/null
@@ -1,2 +0,0 @@
-node_modules
-.DS_Store
diff --git a/node_modules/coalesce/node_modules/sockjs/node_modules/node-uuid/LICENSE.md b/node_modules/coalesce/node_modules/sockjs/node_modules/node-uuid/LICENSE.md
deleted file mode 100644
index bcdddf9a..00000000
--- a/node_modules/coalesce/node_modules/sockjs/node_modules/node-uuid/LICENSE.md
+++ /dev/null
@@ -1,3 +0,0 @@
-Copyright (c) 2010 Robert Kieffer
-
-Dual licensed under the [MIT](http://en.wikipedia.org/wiki/MIT_License) and [GPL](http://en.wikipedia.org/wiki/GNU_General_Public_License) licenses.
diff --git a/node_modules/coalesce/node_modules/sockjs/node_modules/node-uuid/README.md b/node_modules/coalesce/node_modules/sockjs/node_modules/node-uuid/README.md
deleted file mode 100644
index a44d9a76..00000000
--- a/node_modules/coalesce/node_modules/sockjs/node_modules/node-uuid/README.md
+++ /dev/null
@@ -1,199 +0,0 @@
-# node-uuid
-
-Simple, fast generation of [RFC4122](http://www.ietf.org/rfc/rfc4122.txt) UUIDS.
-
-Features:
-
-* 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 (Want something smaller? Check this [crazy shit](https://gist.github.com/982883) out! )
-* [Annotated source code](http://broofa.github.com/node-uuid/docs/uuid.html)
-
-## Getting Started
-
-Install it in your browser:
-
-```html
-
-```
-
-Or in node.js:
-
-```
-npm install node-uuid
-```
-
-```javascript
-var uuid = require('node-uuid');
-```
-
-Then create some ids ...
-
-```javascript
-// Generate a v1 (time-based) id
-uuid.v1(); // -> '6c84fb90-12c4-11e1-840d-7b25c5ee775a'
-
-// Generate a v4 (random) id
-uuid.v4(); // -> '110ec58a-a0f2-4ac4-8393-c866d813b8d1'
-```
-
-## API
-
-### 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 1.
- * `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.
- * `nsecs` - (Number between 0-9999) additional time, in 100-nanosecond units. 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.)
-
-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
-// Generate two ids in an array
-var arr = new Array(32); // -> []
-uuid.v1(null, arr, 0); // -> [02 a2 ce 90 14 32 11 e1 85 58 0b 48 8e 4f c1 15]
-uuid.v1(null, arr, 16); // -> [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
- * `rng` - (Function) Random # generator to use. Set to one of the built-in generators - `uuid.mathRNG` (all platforms), `uuid.nodeRNG` (node.js only), `uuid.whatwgRNG` (WebKit only) - or a custom function that returns an array[16] of byte 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'); // ->
-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
-
-In node.js
-
-```
-> cd test
-> node uuid.js
-```
-
-In Browser
-
-```
-open test/test.html
-```
-
-### Benchmarking
-
-Requires node.js
-
-```
-npm install uuid uuid-js
-node test/benchmark.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)
-
-For browser performance [checkout the JSPerf tests](http://jsperf.com/node-uuid-performance).
-
-## Release notes
-
-v1.3.2:
-* Improve tests and handling of v1() options (Issue #24)
-* Expose RNG option to allow for perf testing with different generators
-
-v1.3:
-* 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
diff --git a/node_modules/coalesce/node_modules/sockjs/node_modules/node-uuid/benchmark/README.md b/node_modules/coalesce/node_modules/sockjs/node_modules/node-uuid/benchmark/README.md
deleted file mode 100644
index aaeb2ea0..00000000
--- a/node_modules/coalesce/node_modules/sockjs/node_modules/node-uuid/benchmark/README.md
+++ /dev/null
@@ -1,53 +0,0 @@
-# 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.
diff --git a/node_modules/coalesce/node_modules/sockjs/node_modules/node-uuid/benchmark/bench.gnu b/node_modules/coalesce/node_modules/sockjs/node_modules/node-uuid/benchmark/bench.gnu
deleted file mode 100644
index a342fbbe..00000000
--- a/node_modules/coalesce/node_modules/sockjs/node_modules/node-uuid/benchmark/bench.gnu
+++ /dev/null
@@ -1,174 +0,0 @@
-#!/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 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
diff --git a/node_modules/coalesce/node_modules/sockjs/node_modules/node-uuid/benchmark/bench.sh b/node_modules/coalesce/node_modules/sockjs/node_modules/node-uuid/benchmark/bench.sh
deleted file mode 100644
index d870a0cb..00000000
--- a/node_modules/coalesce/node_modules/sockjs/node_modules/node-uuid/benchmark/bench.sh
+++ /dev/null
@@ -1,34 +0,0 @@
-#!/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)' '140byte')
-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 140byte_es)
-INDICES=(2 3 2 3 2 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
diff --git a/node_modules/coalesce/node_modules/sockjs/node_modules/node-uuid/benchmark/benchmark-native.c b/node_modules/coalesce/node_modules/sockjs/node_modules/node-uuid/benchmark/benchmark-native.c
deleted file mode 100644
index dbfc75f6..00000000
--- a/node_modules/coalesce/node_modules/sockjs/node_modules/node-uuid/benchmark/benchmark-native.c
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
-Test performance of native C UUID generation
-
-To Compile: cc -luuid benchmark-native.c -o benchmark-native
-*/
-
-#include
-#include
-#include
-#include
-
-int main() {
- uuid_t myid;
- char buf[36+1];
- int i;
- struct timeval t;
- double start, finish;
-
- gettimeofday(&t, NULL);
- start = t.tv_sec + t.tv_usec/1e6;
-
- int n = 2e5;
- for (i = 0; i < n; i++) {
- uuid_generate(myid);
- uuid_unparse(myid, buf);
- }
-
- gettimeofday(&t, NULL);
- finish = t.tv_sec + t.tv_usec/1e6;
- double dur = finish - start;
-
- printf("%d uuids/sec", (int)(n/dur));
- return 0;
-}
diff --git a/node_modules/coalesce/node_modules/sockjs/node_modules/node-uuid/benchmark/benchmark.js b/node_modules/coalesce/node_modules/sockjs/node_modules/node-uuid/benchmark/benchmark.js
deleted file mode 100644
index 40e6efbe..00000000
--- a/node_modules/coalesce/node_modules/sockjs/node_modules/node-uuid/benchmark/benchmark.js
+++ /dev/null
@@ -1,84 +0,0 @@
-try {
- var nodeuuid = require('../uuid');
-} catch (e) {
- console.error('node-uuid require failed - skipping tests');
-}
-
-try {
- var uuid = require('uuid');
-} catch (e) {
- console.error('uuid require failed - skipping tests');
-}
-
-try {
- var uuidjs = require('uuid-js');
-} catch (e) {
- console.error('uuid-js require failed - skipping tests');
-}
-
-var N = 5e5;
-
-function rate(msg, t) {
- console.log(msg + ': ' +
- (N / (Date.now() - t) * 1e3 | 0) +
- ' uuids/second');
-}
-
-console.log('# v4');
-
-// node-uuid - string form
-if (nodeuuid) {
- for (var i = 0, t = Date.now(); i < N; i++) nodeuuid.v4();
- rate('nodeuuid.v4() - using node.js crypto RNG', t);
-
- for (var i = 0, t = Date.now(); i < N; i++) nodeuuid.v4({rng: nodeuuid.mathRNG});
- rate('nodeuuid.v4() - using Math.random() RNG', 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
-if (uuid) {
- 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
-if (uuidjs) {
- for (var i = 0, t = Date.now(); i < N; i++) uuidjs.create(4);
- rate('uuidjs.create(4)', t);
-}
-
-// 140byte.es
-for (var i = 0, t = Date.now(); i < N; i++) 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g,function(s,r){r=Math.random()*16|0;return (s=='x'?r:r&0x3|0x8).toString(16)});
-rate('140byte.es_v4', t);
-
-console.log('');
-console.log('# v1');
-
-// node-uuid - v1 string form
-if (nodeuuid) {
- 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
-if (uuidjs) {
- for (var i = 0, t = Date.now(); i < N; i++) uuidjs.create(1);
- rate('uuidjs.create(1)', t);
-}
diff --git a/node_modules/coalesce/node_modules/sockjs/node_modules/node-uuid/package.json b/node_modules/coalesce/node_modules/sockjs/node_modules/node-uuid/package.json
deleted file mode 100644
index bf72ee7c..00000000
--- a/node_modules/coalesce/node_modules/sockjs/node_modules/node-uuid/package.json
+++ /dev/null
@@ -1,40 +0,0 @@
-{
- "name": "node-uuid",
- "description": "Rigorous implementation of RFC4122 (v1 and v4) UUIDs.",
- "url": "http://github.com/broofa/node-uuid",
- "keywords": [
- "uuid",
- "guid",
- "rfc4122"
- ],
- "author": {
- "name": "Robert Kieffer",
- "email": "robert@broofa.com"
- },
- "contributors": [
- {
- "name": "Christoph Tavan",
- "email": "dev@tavan.de"
- }
- ],
- "lib": ".",
- "main": "./uuid.js",
- "repository": {
- "type": "git",
- "url": "https://github.com/broofa/node-uuid.git"
- },
- "version": "1.3.3",
- "readme": "# node-uuid\n\nSimple, fast generation of [RFC4122](http://www.ietf.org/rfc/rfc4122.txt) UUIDS.\n\nFeatures:\n\n* Generate RFC4122 version 1 or version 4 UUIDs\n* Runs in node.js and all browsers.\n* Cryptographically strong random # generation on supporting platforms\n* 1.1K minified and gzip'ed (Want something smaller? Check this [crazy shit](https://gist.github.com/982883) out! )\n* [Annotated source code](http://broofa.github.com/node-uuid/docs/uuid.html)\n\n## Getting Started\n\nInstall it in your browser:\n\n```html\n\n```\n\nOr in node.js:\n\n```\nnpm install node-uuid\n```\n\n```javascript\nvar uuid = require('node-uuid');\n```\n\nThen create some ids ...\n\n```javascript\n// Generate a v1 (time-based) id\nuuid.v1(); // -> '6c84fb90-12c4-11e1-840d-7b25c5ee775a'\n\n// Generate a v4 (random) id\nuuid.v4(); // -> '110ec58a-a0f2-4ac4-8393-c866d813b8d1'\n```\n\n## API\n\n### uuid.v1([`options` [, `buffer` [, `offset`]]])\n\nGenerate and return a RFC4122 v1 (timestamp-based) UUID.\n\n* `options` - (Object) Optional uuid state to apply. Properties may include:\n\n * `node` - (Array) Node id as Array of 6 bytes (per 4.1.6). Default: Randomnly generated ID. See note 1.\n * `clockseq` - (Number between 0 - 0x3fff) RFC clock sequence. Default: An internally maintained clockseq is used.\n * `msecs` - (Number | Date) Time in milliseconds since unix Epoch. Default: The current time is used.\n * `nsecs` - (Number between 0-9999) additional time, in 100-nanosecond units. Ignored if `msecs` is unspecified. Default: internal uuid counter is used, as per 4.2.1.2.\n\n* `buffer` - (Array | Buffer) Array or buffer where UUID bytes are to be written.\n* `offset` - (Number) Starting index in `buffer` at which to begin writing.\n\nReturns `buffer`, if specified, otherwise the string form of the UUID\n\nNotes:\n\n1. 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.)\n\nExample: Generate string UUID with fully-specified options\n\n```javascript\nuuid.v1({\n node: [0x01, 0x23, 0x45, 0x67, 0x89, 0xab],\n clockseq: 0x1234,\n msecs: new Date('2011-11-01').getTime(),\n nsecs: 5678\n}); // -> \"710b962e-041c-11e1-9234-0123456789ab\"\n```\n\nExample: In-place generation of two binary IDs\n\n```javascript\n// Generate two ids in an array\nvar arr = new Array(32); // -> []\nuuid.v1(null, arr, 0); // -> [02 a2 ce 90 14 32 11 e1 85 58 0b 48 8e 4f c1 15]\nuuid.v1(null, arr, 16); // -> [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]\n\n// Optionally use uuid.unparse() to get stringify the ids\nuuid.unparse(buffer); // -> '02a2ce90-1432-11e1-8558-0b488e4fc115'\nuuid.unparse(buffer, 16) // -> '02a31cb0-1432-11e1-8558-0b488e4fc115'\n```\n\n### uuid.v4([`options` [, `buffer` [, `offset`]]])\n\nGenerate and return a RFC4122 v4 UUID.\n\n* `options` - (Object) Optional uuid state to apply. Properties may include:\n\n * `random` - (Number[16]) Array of 16 numbers (0-255) to use in place of randomly generated values\n * `rng` - (Function) Random # generator to use. Set to one of the built-in generators - `uuid.mathRNG` (all platforms), `uuid.nodeRNG` (node.js only), `uuid.whatwgRNG` (WebKit only) - or a custom function that returns an array[16] of byte values.\n\n* `buffer` - (Array | Buffer) Array or buffer where UUID bytes are to be written.\n* `offset` - (Number) Starting index in `buffer` at which to begin writing.\n\nReturns `buffer`, if specified, otherwise the string form of the UUID\n\nExample: Generate string UUID with fully-specified options\n\n```javascript\nuuid.v4({\n random: [\n 0x10, 0x91, 0x56, 0xbe, 0xc4, 0xfb, 0xc1, 0xea,\n 0x71, 0xb4, 0xef, 0xe1, 0x67, 0x1c, 0x58, 0x36\n ]\n});\n// -> \"109156be-c4fb-41ea-b1b4-efe1671c5836\"\n```\n\nExample: Generate two IDs in a single buffer\n\n```javascript\nvar buffer = new Array(32); // (or 'new Buffer' in node.js)\nuuid.v4(null, buffer, 0);\nuuid.v4(null, buffer, 16);\n```\n\n### uuid.parse(id[, buffer[, offset]])\n### uuid.unparse(buffer[, offset])\n\nParse and unparse UUIDs\n\n * `id` - (String) UUID(-like) string\n * `buffer` - (Array | Buffer) Array or buffer where UUID bytes are to be written. Default: A new Array or Buffer is used\n * `offset` - (Number) Starting index in `buffer` at which to begin writing. Default: 0\n\nExample parsing and unparsing a UUID string\n\n```javascript\nvar bytes = uuid.parse('797ff043-11eb-11e1-80d6-510998755d10'); // -> \nvar string = uuid.unparse(bytes); // -> '797ff043-11eb-11e1-80d6-510998755d10'\n```\n\n### uuid.noConflict()\n\n(Browsers only) Set `uuid` property back to it's previous value.\n\nReturns the node-uuid object.\n\nExample:\n\n```javascript\nvar myUuid = uuid.noConflict();\nmyUuid.v1(); // -> '6c84fb90-12c4-11e1-840d-7b25c5ee775a'\n```\n\n## Deprecated APIs\n\nSupport for the following v1.2 APIs is available in v1.3, but is deprecated and will be removed in the next major version.\n\n### uuid([format [, buffer [, offset]]])\n\nuuid() 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).\n\n### uuid.BufferClass\n\nThe 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.\n\n## Testing\n\nIn node.js\n\n```\n> cd test\n> node uuid.js\n```\n\nIn Browser\n\n```\nopen test/test.html\n```\n\n### Benchmarking\n\nRequires node.js\n\n```\nnpm install uuid uuid-js\nnode test/benchmark.js\n```\n\nFor 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)\n\nFor browser performance [checkout the JSPerf tests](http://jsperf.com/node-uuid-performance).\n\n## Release notes\n\nv1.3.2:\n* Improve tests and handling of v1() options (Issue #24)\n* Expose RNG option to allow for perf testing with different generators\n\nv1.3:\n* Support for version 1 ids, thanks to [@ctavan](https://github.com/ctavan)!\n* Support for node.js crypto API\n* De-emphasizing performance in favor of a) cryptographic quality PRNGs where available and b) more manageable code\n",
- "readmeFilename": "README.md",
- "bugs": {
- "url": "https://github.com/broofa/node-uuid/issues"
- },
- "homepage": "https://github.com/broofa/node-uuid",
- "_id": "node-uuid@1.3.3",
- "dist": {
- "shasum": "d7a9a5131a4851c74f0836c74a37c1e1341a9fa7"
- },
- "_from": "node-uuid@1.3.3",
- "_resolved": "https://registry.npmjs.org/node-uuid/-/node-uuid-1.3.3.tgz",
- "scripts": {}
-}
diff --git a/node_modules/coalesce/node_modules/sockjs/node_modules/node-uuid/test/compare_v1.js b/node_modules/coalesce/node_modules/sockjs/node_modules/node-uuid/test/compare_v1.js
deleted file mode 100644
index 05af8221..00000000
--- a/node_modules/coalesce/node_modules/sockjs/node_modules/node-uuid/test/compare_v1.js
+++ /dev/null
@@ -1,63 +0,0 @@
-var assert = require('assert'),
- nodeuuid = require('../uuid'),
- uuidjs = require('uuid-js'),
- libuuid = require('uuid').generate,
- util = require('util'),
- exec = require('child_process').exec,
- os = require('os');
-
-// On Mac Os X / macports there's only the ossp-uuid package that provides uuid
-// On Linux there's uuid-runtime which provides uuidgen
-var uuidCmd = os.type() === 'Darwin' ? 'uuid -1' : 'uuidgen -t';
-
-function compare(ids) {
- console.log(ids);
- for (var i = 0; i < ids.length; i++) {
- var id = ids[i].split('-');
- id = [id[2], id[1], id[0]].join('');
- ids[i] = id;
- }
- var sorted = ([].concat(ids)).sort();
-
- if (sorted.toString() !== ids.toString()) {
- console.log('Warning: sorted !== ids');
- } else {
- console.log('everything in order!');
- }
-}
-
-// Test time order of v1 uuids
-var ids = [];
-while (ids.length < 10e3) ids.push(nodeuuid.v1());
-
-var max = 10;
-console.log('node-uuid:');
-ids = [];
-for (var i = 0; i < max; i++) ids.push(nodeuuid.v1());
-compare(ids);
-
-console.log('');
-console.log('uuidjs:');
-ids = [];
-for (var i = 0; i < max; i++) ids.push(uuidjs.create(1).toString());
-compare(ids);
-
-console.log('');
-console.log('libuuid:');
-ids = [];
-var count = 0;
-var last = function() {
- compare(ids);
-}
-var cb = function(err, stdout, stderr) {
- ids.push(stdout.substring(0, stdout.length-1));
- count++;
- if (count < max) {
- return next();
- }
- last();
-};
-var next = function() {
- exec(uuidCmd, cb);
-};
-next();
diff --git a/node_modules/coalesce/node_modules/sockjs/node_modules/node-uuid/test/test.html b/node_modules/coalesce/node_modules/sockjs/node_modules/node-uuid/test/test.html
deleted file mode 100644
index d80326ec..00000000
--- a/node_modules/coalesce/node_modules/sockjs/node_modules/node-uuid/test/test.html
+++ /dev/null
@@ -1,17 +0,0 @@
-
-
-
-
-
-
-
-
-
diff --git a/node_modules/coalesce/node_modules/sockjs/node_modules/node-uuid/test/test.js b/node_modules/coalesce/node_modules/sockjs/node_modules/node-uuid/test/test.js
deleted file mode 100644
index be23919a..00000000
--- a/node_modules/coalesce/node_modules/sockjs/node_modules/node-uuid/test/test.js
+++ /dev/null
@@ -1,240 +0,0 @@
-if (!this.uuid) {
- // node.js
- uuid = require('../uuid');
-}
-
-//
-// x-platform log/assert shims
-//
-
-function _log(msg, type) {
- type = type || 'log';
-
- if (typeof(document) != 'undefined') {
- document.write('
' + msg.replace(/\n/g, ' ') + '
');
- }
- if (typeof(console) != 'undefined') {
- var color = {
- log: '\033[39m',
- warn: '\033[33m',
- error: '\033[31m'
- }
- console[type](color[type] + msg + color.log);
- }
-}
-
-function log(msg) {_log(msg, 'log');}
-function warn(msg) {_log(msg, 'warn');}
-function error(msg) {_log(msg, 'error');}
-
-function assert(res, msg) {
- if (!res) {
- error('FAIL: ' + msg);
- } else {
- log('Pass: ' + msg);
- }
-}
-
-//
-// Unit tests
-//
-
-// Verify ordering of v1 ids created with explicit times
-var TIME = 1321644961388; // 2011-11-18 11:36:01.388-08:00
-
-function compare(name, ids) {
- ids = ids.map(function(id) {
- return id.split('-').reverse().join('-');
- }).sort();
- var sorted = ([].concat(ids)).sort();
-
- assert(sorted.toString() == ids.toString(), name + ' have expected order');
-}
-
-// Verify ordering of v1 ids created using default behavior
-compare('uuids with current time', [
- uuid.v1(),
- uuid.v1(),
- uuid.v1(),
- uuid.v1(),
- uuid.v1()
-]);
-
-// Verify ordering of v1 ids created with explicit times
-compare('uuids with time option', [
- uuid.v1({msecs: TIME - 10*3600*1000}),
- uuid.v1({msecs: TIME - 1}),
- uuid.v1({msecs: TIME}),
- uuid.v1({msecs: TIME + 1}),
- uuid.v1({msecs: TIME + 28*24*3600*1000}),
-]);
-
-assert(
- uuid.v1({msecs: TIME}) != uuid.v1({msecs: TIME}),
- 'IDs created at same msec are different'
-);
-
-// Verify throw if too many ids created
-var thrown = false;
-try {
- uuid.v1({msecs: TIME, nsecs: 10000});
-} catch (e) {
- thrown = true;
-}
-assert(thrown, 'Exception thrown when > 10K ids created in 1 ms');
-
-// Verify clock regression bumps clockseq
-var uidt = uuid.v1({msecs: TIME});
-var uidtb = uuid.v1({msecs: TIME - 1});
-assert(
- parseInt(uidtb.split('-')[3], 16) - parseInt(uidt.split('-')[3], 16) === 1,
- 'Clock regression by msec increments the clockseq'
-);
-
-// Verify clock regression bumps clockseq
-var uidtn = uuid.v1({msecs: TIME, nsecs: 10});
-var uidtnb = uuid.v1({msecs: TIME, nsecs: 9});
-assert(
- parseInt(uidtnb.split('-')[3], 16) - parseInt(uidtn.split('-')[3], 16) === 1,
- 'Clock regression by nsec increments the clockseq'
-);
-
-// Verify explicit options produce expected id
-var id = uuid.v1({
- msecs: 1321651533573,
- nsecs: 5432,
- clockseq: 0x385c,
- node: [ 0x61, 0xcd, 0x3c, 0xbb, 0x32, 0x10 ]
-});
-assert(id == 'd9428888-122b-11e1-b85c-61cd3cbb3210', 'Explicit options produce expected id');
-
-// Verify adjacent ids across a msec boundary are 1 time unit apart
-var u0 = uuid.v1({msecs: TIME, nsecs: 9999});
-var u1 = uuid.v1({msecs: TIME + 1, nsecs: 0});
-
-var before = u0.split('-')[0], after = u1.split('-')[0];
-var dt = parseInt(after, 16) - parseInt(before, 16);
-assert(dt === 1, 'Ids spanning 1ms boundary are 100ns apart');
-
-//
-// Test parse/unparse
-//
-
-id = '00112233445566778899aabbccddeeff';
-assert(uuid.unparse(uuid.parse(id.substr(0,10))) ==
- '00112233-4400-0000-0000-000000000000', 'Short parse');
-assert(uuid.unparse(uuid.parse('(this is the uuid -> ' + id + id)) ==
- '00112233-4455-6677-8899-aabbccddeeff', 'Dirty parse');
-
-//
-// Perf tests
-//
-
-var generators = {
- v1: uuid.v1,
- v4: uuid.v4
-};
-
-var UUID_FORMAT = {
- v1: /[0-9a-f]{8}-[0-9a-f]{4}-1[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}/i,
- v4: /[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}/i
-};
-
-var N = 1e4;
-
-// Get %'age an actual value differs from the ideal value
-function divergence(actual, ideal) {
- return Math.round(100*100*(actual - ideal)/ideal)/100;
-}
-
-function rate(msg, t) {
- log(msg + ': ' + (N / (Date.now() - t) * 1e3 | 0) + ' uuids\/second');
-}
-
-for (var version in generators) {
- var counts = {}, max = 0;
- var generator = generators[version];
- var format = UUID_FORMAT[version];
-
- log('\nSanity check ' + N + ' ' + version + ' uuids');
- for (var i = 0, ok = 0; i < N; i++) {
- id = generator();
- if (!format.test(id)) {
- throw Error(id + ' is not a valid UUID string');
- }
-
- if (id != uuid.unparse(uuid.parse(id))) {
- assert(fail, id + ' is not a valid id');
- }
-
- // Count digits for our randomness check
- if (version == 'v4') {
- 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);
- }
- }
- }
-
- // Check randomness for v4 UUIDs
- if (version == 'v4') {
- // Limit that we get worried about randomness. (Purely empirical choice, this!)
- var limit = 2*100*Math.sqrt(1/N);
-
- log('\nChecking v4 randomness. Distribution of Hex Digits (% deviation from ideal)');
-
- 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 += '=';
-
- assert(Math.abs(d) < limit, c + ' |' + bar + '| ' + counts[c] + ' (' + d + '% < ' + limit + '%)');
- }
- }
-}
-
-// Perf tests
-for (var version in generators) {
- log('\nPerformance testing ' + version + ' UUIDs');
- var generator = generators[version];
- var buf = new uuid.BufferClass(16);
-
- if (version == 'v4') {
- ['mathRNG', 'whatwgRNG', 'nodeRNG'].forEach(function(rng) {
- if (uuid[rng]) {
- var options = {rng: uuid[rng]};
- for (var i = 0, t = Date.now(); i < N; i++) generator(options);
- rate('uuid.' + version + '() with ' + rng, t);
- } else {
- log('uuid.' + version + '() with ' + rng + ': not defined');
- }
- });
- } else {
- for (var i = 0, t = Date.now(); i < N; i++) generator();
- rate('uuid.' + version + '()', t);
- }
-
- for (var i = 0, t = Date.now(); i < N; i++) generator('binary');
- rate('uuid.' + version + '(\'binary\')', t);
-
- for (var i = 0, t = Date.now(); i < N; i++) generator('binary', buf);
- rate('uuid.' + version + '(\'binary\', buffer)', t);
-}
diff --git a/node_modules/coalesce/node_modules/sockjs/node_modules/node-uuid/uuid.js b/node_modules/coalesce/node_modules/sockjs/node_modules/node-uuid/uuid.js
deleted file mode 100644
index 27f1d127..00000000
--- a/node_modules/coalesce/node_modules/sockjs/node_modules/node-uuid/uuid.js
+++ /dev/null
@@ -1,249 +0,0 @@
-// node-uuid/uuid.js
-//
-// Copyright (c) 2010 Robert Kieffer
-// Dual licensed under the MIT and GPL licenses.
-// Documentation and details at https://github.com/broofa/node-uuid
-(function() {
- var _global = this;
-
- // Unique ID creation requires a high quality random # generator, but
- // Math.random() does not guarantee "cryptographic quality". So we feature
- // detect for more robust APIs, normalizing each method to return 128-bits
- // (16 bytes) of random data.
- var mathRNG, nodeRNG, whatwgRNG;
-
- // Math.random()-based RNG. All platforms, very fast, unknown quality
- var _rndBytes = new Array(16);
- mathRNG = 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;
- }
-
- // WHATWG crypto-based RNG - http://wiki.whatwg.org/wiki/Crypto
- // WebKit only (currently), moderately fast, high quality
- if (_global.crypto && crypto.getRandomValues) {
- var _rnds = new Uint32Array(4);
- whatwgRNG = function() {
- crypto.getRandomValues(_rnds);
-
- for (var c = 0 ; c < 16; c++) {
- _rndBytes[c] = _rnds[c >> 2] >>> ((c & 0x03) * 8) & 0xff;
- }
- return _rndBytes;
- }
- }
-
- // Node.js crypto-based RNG - http://nodejs.org/docs/v0.6.2/api/crypto.html
- // Node.js only, moderately fast, high quality
- try {
- var _rb = require('crypto').randomBytes;
- nodeRNG = _rb && function() {
- return _rb(16);
- };
- } catch (e) {}
-
- // Select RNG with best quality
- var _rng = nodeRNG || whatwgRNG || mathRNG;
-
- // 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;
- }
-
- // **`parse()` - Parse a UUID into it's component bytes**
- 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;
- }
-
- // **`unparse()` - Convert UUID byte array (ala parse()) into a string**
- 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++]];
- }
-
- // **`v1()` - Generate time-based UUID**
- //
- // Inspired by https://github.com/LiosK/UUID.js
- // and http://docs.python.org/library/uuid.html
-
- // random #'s we need to init node and clockseq
- var _seedBytes = _rng();
-
- // 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 _lastMSecs = 0, _lastNSecs = 0;
-
- // See https://github.com/broofa/node-uuid for API details
- function v1(options, buf, offset) {
- var i = buf && offset || 0;
- var b = buf || [];
-
- options = options || {};
-
- var clockseq = options.clockseq != null ? options.clockseq : _clockseq;
-
- // UUID timestamps are 100 nano-second units since the Gregorian epoch,
- // (1582-10-15 00:00). JSNumbers aren't precise enough for this, so
- // time is handled internally as 'msecs' (integer milliseconds) and 'nsecs'
- // (100-nanoseconds offset from msecs) since unix epoch, 1970-01-01 00:00.
- var msecs = options.msecs != null ? options.msecs : new Date().getTime();
-
- // Per 4.2.1.2, use count of uuid's generated during the current clock
- // cycle to simulate higher resolution clock
- var nsecs = options.nsecs != null ? options.nsecs : _lastNSecs + 1;
-
- // Time since last uuid creation (in msecs)
- var dt = (msecs - _lastMSecs) + (nsecs - _lastNSecs)/10000;
-
- // Per 4.2.1.2, Bump clockseq on clock regression
- if (dt < 0 && options.clockseq == null) {
- clockseq = clockseq + 1 & 0x3fff;
- }
-
- // Reset nsecs if clock regresses (new clockseq) or we've moved onto a new
- // time interval
- if ((dt < 0 || msecs > _lastMSecs) && options.nsecs == null) {
- nsecs = 0;
- }
-
- // Per 4.2.1.2 Throw error if too many uuids are requested
- if (nsecs >= 10000) {
- throw new Error('uuid.v1(): Can\'t create more than 10M uuids/sec');
- }
-
- _lastMSecs = msecs;
- _lastNSecs = nsecs;
- _clockseq = clockseq;
-
- // Per 4.1.4 - Convert from unix epoch to Gregorian epoch
- msecs += 12219292800000;
-
- // `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_seq_hi_and_reserved` (Per 4.2.2 - include variant)
- b[i++] = clockseq >>> 8 | 0x80;
-
- // `clock_seq_low`
- b[i++] = clockseq & 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()` - Generate random UUID**
-
- // See https://github.com/broofa/node-uuid for API details
- 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;
- }
- options = options || {};
-
- var rnds = options.random || (options.rng || _rng)();
-
- // 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 public API
- var uuid = v4;
- uuid.v1 = v1;
- uuid.v4 = v4;
- uuid.parse = parse;
- uuid.unparse = unparse;
- uuid.BufferClass = BufferClass;
-
- // Export RNG options
- uuid.mathRNG = mathRNG;
- uuid.nodeRNG = nodeRNG;
- uuid.whatwgRNG = whatwgRNG;
-
- if (typeof(module) != 'undefined') {
- // Play nice with node.js
- module.exports = uuid;
- } else {
- // Play nice with browsers
- var _previousRoot = _global.uuid;
-
- // **`noConflict()` - (browser only) to reset global 'uuid' var**
- uuid.noConflict = function() {
- _global.uuid = _previousRoot;
- return uuid;
- }
- _global.uuid = uuid;
- }
-}());
diff --git a/node_modules/coalesce/node_modules/sockjs/package.json b/node_modules/coalesce/node_modules/sockjs/package.json
deleted file mode 100644
index edf63b23..00000000
--- a/node_modules/coalesce/node_modules/sockjs/package.json
+++ /dev/null
@@ -1,36 +0,0 @@
-{
- "name": "sockjs",
- "author": {
- "name": "Marek Majkowski"
- },
- "version": "0.3.8",
- "description": "SockJS-node is a server counterpart of SockJS-client a JavaScript library that provides a WebSocket-like object in the browser. SockJS gives you a coherent, cross-browser, Javascript API which creates a low latency, full duplex, cross-domain communication channel between the browser and the web server.",
- "keywords": [
- "websockets",
- "websocket"
- ],
- "homepage": "https://github.com/sockjs/sockjs-node",
- "repository": {
- "type": "git",
- "url": "https://github.com/sockjs/sockjs-node.git"
- },
- "dependencies": {
- "node-uuid": "1.3.3",
- "faye-websocket": "0.7.0"
- },
- "devDependencies": {
- "coffee-script": "1.2.x"
- },
- "main": "index",
- "readme": "SockJS family:\n\n * [SockJS-client](https://github.com/sockjs/sockjs-client) JavaScript client library\n * [SockJS-node](https://github.com/sockjs/sockjs-node) Node.js server\n * [SockJS-erlang](https://github.com/sockjs/sockjs-erlang) Erlang server\n * [SockJS-tornado](https://github.com/MrJoes/sockjs-tornado) Python/Tornado server\n * [vert.x](https://github.com/purplefox/vert.x) Java/vert.x server\n\nWork in progress:\n\n * [SockJS-ruby](https://github.com/nyarly/sockjs-ruby)\n * [SockJS-netty](https://github.com/cgbystrom/sockjs-netty)\n * [SockJS-gevent](https://github.com/sdiehl/sockjs-gevent) ([and a fork](https://github.com/njoyce/sockjs-gevent))\n * [pyramid-SockJS](https://github.com/fafhrd91/pyramid_sockjs)\n * [wildcloud-websockets](https://github.com/wildcloud/wildcloud-websockets)\n * [SockJS-cyclone](https://github.com/flaviogrossi/sockjs-cyclone)\n * [SockJS-twisted](https://github.com/Fugiman/sockjs-twisted/)\n * [wai-SockJS](https://github.com/Palmik/wai-sockjs)\n * [SockJS-perl](https://github.com/vti/sockjs-perl)\n * [SockJS-go](https://github.com/igm/sockjs-go/)\n\nWhat is SockJS?\n===============\n\nSockJS is a JavaScript library (for browsers) that provides a WebSocket-like\nobject. SockJS gives you a coherent, cross-browser, Javascript API\nwhich creates a low latency, full duplex, cross-domain communication\nchannel between the browser and the web server, with WebSockets or without.\nThis necessitates the use of a server, which this is one version of, for Node.js.\n\n\nSockJS-node server\n==================\n\nSockJS-node is a Node.js server side counterpart of\n[SockJS-client browser library](https://github.com/sockjs/sockjs-client)\nwritten in CoffeeScript.\n\nTo install `sockjs-node` run:\n\n npm install sockjs\n\nFor additional security (true random numbers) you might want to\ninstall `rbytes` package - SockJS will use it if available:\n\n npm install rbytes\n\n\nA simplified echo SockJS server could look more or less like:\n\n```javascript\nvar http = require('http');\nvar sockjs = require('sockjs');\n\nvar echo = sockjs.createServer();\necho.on('connection', function(conn) {\n conn.on('data', function(message) {\n conn.write(message);\n });\n conn.on('close', function() {});\n});\n\nvar server = http.createServer();\necho.installHandlers(server, {prefix:'/echo'});\nserver.listen(9999, '0.0.0.0');\n```\n\n(Take look at\n[examples](https://github.com/sockjs/sockjs-node/tree/master/examples/echo)\ndirectory for a complete version.)\n\nSubscribe to\n[SockJS mailing list](https://groups.google.com/forum/#!forum/sockjs) for\ndiscussions and support.\n\n\nLive QUnit tests and smoke tests\n--------------------------------\n\n[SockJS-client](https://github.com/sockjs/sockjs-client) comes with\nsome QUnit tests and a few smoke tests that are using SockJS-node. At\nthe moment they are deployed in few places, just click to see if\nSockJS is working in your browser:\n\n * http://sockjs.popcnt.org/ and https://sockjs.popcnt.org/ (hosted in Europe)\n * http://sockjs.cloudfoundry.com/ (CloudFoundry, websockets disabled, loadbalanced)\n * https://sockjs.cloudfoundry.com/ (CloudFoundry SSL, websockets disabled, loadbalanced)\n\n\nSockJS-node API\n---------------\n\nThe API design is based on the common Node API's like\n[Streams API](http://nodejs.org/docs/v0.5.8/api/streams.html) or\n[Http.Server API](http://nodejs.org/docs/v0.5.8/api/http.html#http.Server).\n\n### Server class\n\nSockJS module is generating a `Server` class, similar to\n[Node.js http.createServer](http://nodejs.org/docs/v0.5.8/api/http.html#http.createServer)\nmodule.\n\n```javascript\nvar sockjs_server = sockjs.createServer(options);\n```\n\nWhere `options` is a hash which can contain:\n\n
\n
sockjs_url (string, required)
\n
Transports which don't support cross-domain communication natively\n ('eventsource' to name one) use an iframe trick. A simple page is\n served from the SockJS server (using its foreign domain) and is\n placed in an invisible iframe. Code run from this iframe doesn't\n need to worry about cross-domain issues, as it's being run from\n domain local to the SockJS server. This iframe also does need to\n load SockJS javascript client library, and this option lets you specify\n its url (if you're unsure, point it to\n \n the latest minified SockJS client release, this is the default).\n You must explicitly specify this url on the server side for security\n reasons - we don't want the possibility of running any foreign\n javascript within the SockJS domain (aka cross site scripting attack).\n Also, sockjs javascript library is probably already cached by the\n browser - it makes sense to reuse the sockjs url you're using in\n normally.
\n\n
prefix (string)
\n
A url prefix for the server. All http requests which paths begins\n with selected prefix will be handled by SockJS. All other requests\n will be passed through, to previously registered handlers.
\n\n
response_limit (integer)
\n
Most streaming transports save responses on the client side and\n don't free memory used by delivered messages. Such transports need\n to be garbage-collected once in a while. `response_limit` sets\n a minimum number of bytes that can be send over a single http streaming\n request before it will be closed. After that client needs to open\n new request. Setting this value to one effectively disables\n streaming and will make streaming transports to behave like polling\n transports. The default value is 128K.
\n\n
websocket (boolean)
\n
Some load balancers don't support websockets. This option can be used\n to disable websockets support by the server. By default websockets are\n enabled.
\n\n
jsessionid (boolean or function)
\n
Some hosting providers enable sticky sessions only to requests that\n have JSESSIONID cookie set. This setting controls if the server should\n set this cookie to a dummy value. By default setting JSESSIONID cookie\n is disabled. More sophisticated behaviour can be achieved by supplying\n a function.
\n\n
log (function(severity, message))
\n
It's quite useful, especially for debugging, to see some messages\n printed by a SockJS-node library. This is done using this `log`\n function, which is by default set to `console.log`. If this\n behaviour annoys you for some reason, override `log` setting with a\n custom handler. The following `severities` are used: `debug`\n (miscellaneous logs), `info` (requests logs), `error` (serious\n errors, consider filing an issue).
\n\n
heartbeat_delay (milliseconds)
\n
In order to keep proxies and load balancers from closing long\n running http requests we need to pretend that the connection is\n active and send a heartbeat packet once in a while. This setting\n controls how often this is done. By default a heartbeat packet is\n sent every 25 seconds.
\n\n
disconnect_delay (milliseconds)
\n
The server sends a `close` event when a client receiving\n connection have not been seen for a while. This delay is configured\n by this setting. By default the `close` event will be emitted when a\n receiving connection wasn't seen for 5 seconds.
\n
\n\n\n### Server instance\n\nOnce you have create `Server` instance you can hook it to the\n[http.Server instance](http://nodejs.org/docs/v0.5.8/api/http.html#http.createServer).\n\n```javascript\nvar http_server = http.createServer();\nsockjs_server.installHandlers(http_server, options);\nhttp_server.listen(...);\n```\n\nWhere `options` can overshadow options given when creating `Server`\ninstance.\n\n`Server` instance is an\n[EventEmitter](http://nodejs.org/docs/v0.4.10/api/events.html#events.EventEmitter),\nand emits following event:\n\n
\n
Event: connection (connection)
\n
A new connection has been successfully opened.
\n
\n\nAll http requests that don't go under the path selected by `prefix`\nwill remain unanswered and will be passed to previously registered\nhandlers. You must install your custom http handlers before calling\n`installHandlers`.\n\n### Connection instance\n\nA `Connection` instance supports\n[Node Stream API](http://nodejs.org/docs/v0.5.8/api/streams.html) and\nhas following methods and properties:\n\n
\n
Property: readable (boolean)
\n
Is the stream readable?
\n\n
Property: writable (boolean)
\n
Is the stream writable?
\n\n
Property: remoteAddress (string)
\n
Last known IP address of the client.
\n\n
Property: remotePort (number)
\n
Last known port number of the client.
\n\n
Property: address (object)
\n
Hash with 'address' and 'port' fields.
\n\n
Property: headers (object)
\n
Hash containing various headers copied from last receiving request\n on that connection. Exposed headers include: `origin`, `referer`\n and `x-forwarded-for` (and friends). We explicitly do not grant\n access to `cookie` header, as using it may easily lead to security\n issues (for details read the section \"Authorisation\").
Prefix of the url on which the request was handled.
\n\n
Property: protocol (string)
\n
Protocol used by the connection. Keep in mind that some protocols\n are indistinguishable - for example \"xhr-polling\" and \"xdr-polling\".
\n\n
Property: readyState (integer)
\n
Current state of the connection:\n 0-connecting, 1-open, 2-closing, 3-closed.
\n\n
write(message)
\n
Sends a message over opened connection. A message must be a\n non-empty string. It's illegal to send a message after the connection was\n closed (either after 'close' or 'end' method or 'close' event).
\n\n
close([code], [reason])
\n
Asks the remote client to disconnect. 'code' and 'reason'\n parameters are optional and can be used to share the reason of\n disconnection.
\n\n
end()
\n
Asks the remote client to disconnect with default 'code' and\n 'reason' values.
\n\n
\n\nA `Connection` instance emits the following events:\n\n
\n
Event: data (message)
\n
A message arrived on the connection. Message is a unicode\n string.
\n\n
Event: close ()
\n
Connection was closed. This event is triggered exactly once for\n every connection.
\n
\n\nFor example:\n\n```javascript\nsockjs_server.on('connection', function(conn) {\n console.log('connection' + conn);\n conn.on('close', function() {\n console.log('close ' + conn);\n });\n conn.on('data', function(message) {\n console.log('message ' + conn,\n message);\n });\n});\n```\n\n### Footnote\n\nA fully working echo server does need a bit more boilerplate (to\nhandle requests unanswered by SockJS), see the\n[`echo` example](https://github.com/sockjs/sockjs-node/tree/master/examples/echo)\nfor a complete code.\n\n### Examples\n\nIf you want to see samples of running code, take a look at:\n\n * [./examples/echo](https://github.com/sockjs/sockjs-node/tree/master/examples/echo)\n directory, which contains a full example of a echo server.\n * [./examples/test_server](https://github.com/sockjs/sockjs-node/tree/master/examples/test_server) a standard SockJS test server.\n\n\nConnecting to SockJS-node without the client\n--------------------------------------------\n\nAlthough the main point of SockJS it to enable browser-to-server\nconnectivity, it is possible to connect to SockJS from an external\napplication. Any SockJS server complying with 0.3 protocol does\nsupport a raw WebSocket url. The raw WebSocket url for the test server\nlooks like:\n\n * ws://localhost:8081/echo/websocket\n\nYou can connect any WebSocket RFC 6455 compliant WebSocket client to\nthis url. This can be a command line client, external application,\nthird party code or even a browser (though I don't know why you would\nwant to do so).\n\n\nDeployment and load balancing\n-----------------------------\n\nThere are two issues that need to be considered when planning a\nnon-trivial SockJS-node deployment: WebSocket-compatible load balancer\nand sticky sessions (aka session affinity).\n\n### WebSocket compatible load balancer\n\nOften WebSockets don't play nicely with proxies and load balancers.\nDeploying a SockJS server behind Nginx or Apache could be painful.\n\nFortunately recent versions of an excellent load balancer\n[HAProxy](http://haproxy.1wt.eu/) are able to proxy WebSocket\nconnections. We propose to put HAProxy as a front line load balancer\nand use it to split SockJS traffic from normal HTTP data. Take a look\nat the sample\n[SockJS HAProxy configuration](https://github.com/sockjs/sockjs-node/blob/master/examples/haproxy.cfg).\n\nThe config also shows how to use HAproxy balancing to split traffic\nbetween multiple Node.js servers. You can also do balancing using dns\nnames.\n\n### Sticky sessions\n\nIf you plan deploying more than one SockJS server, you must make sure\nthat all HTTP requests for a single session will hit the same server.\nSockJS has two mechanisms that can be useful to achieve that:\n\n * Urls are prefixed with server and session id numbers, like:\n `/resource///transport`. This is\n useful for load balancers that support prefix-based affinity\n (HAProxy does).\n * `JSESSIONID` cookie is being set by SockJS-node. Many load\n balancers turn on sticky sessions if that cookie is set. This\n technique is derived from Java applications, where sticky sessions\n are often necessary. HAProxy does support this method, as well as\n some hosting providers, for example CloudFoundry. In order to\n enable this method on the client side, please supply a\n `cookie:true` option to SockJS constructor.\n\n\nDevelopment and testing\n-----------------------\n\nIf you want to work on SockJS-node source code, you need to clone the\ngit repo and follow these steps. First you need to install\ndependencies:\n\n cd sockjs-node\n npm install\n npm install --dev\n ln -s .. node_modules/sockjs\n\nYou're ready to compile CoffeeScript:\n\n make build\n\nIf compilation succeeds you may want to test if your changes pass all\nthe tests. Currently, there are two separate test suites. For both of\nthem you need to start a SockJS-node test server (by default listening\non port 8081):\n\n make test_server\n\n### SockJS-protocol Python tests\n\nTo run it run something like:\n\n cd sockjs-protocol\n make test_deps\n ./venv/bin/python sockjs-protocol-0.3.py\n\nFor details see\n[SockJS-protocol README](https://github.com/sockjs/sockjs-protocol#readme).\n\n### SockJS-client QUnit tests\n\nYou need to start a second web server (by default listening on 8080)\nthat is serving various static html and javascript files:\n\n cd sockjs-client\n make test\n\nAt that point you should have two web servers running: sockjs-node on\n8081 and sockjs-client on 8080. When you open the browser on\n[http://localhost:8080/](http://localhost:8080/) you should be able\nrun the QUnit tests against your sockjs-node server.\n\nFor details see\n[SockJS-client README](https://github.com/sockjs/sockjs-client#readme).\n\nAdditionally, if you're doing more serious development consider using\n`make serve`, which will automatically the server when you modify the\nsource code.\n\n\nVarious issues and design considerations\n----------------------------------------\n\n### Authorisation\n\nSockJS-node does not expose cookies to the application. This is done\ndeliberately as using cookie-based authorisation with SockJS simply\ndoesn't make sense and will lead to security issues.\n\nCookies are a contract between a browser and an http server, and are\nidentified by a domain name. If a browser has a cookie set for\nparticular domain, it will pass it as a part of all http requests to\nthe host. But to get various transports working, SockJS uses a middleman\n- an iframe hosted from target SockJS domain. That means the server\nwill receive requests from the iframe, and not from the real\ndomain. The domain of an iframe is the same as the SockJS domain. The\nproblem is that any website can embed the iframe and communicate with\nit - and request establishing SockJS connection. Using cookies for\nauthorisation in this scenario will result in granting full access to\nSockJS communication with your website from any website. This is a\nclassic CSRF attack.\n\nBasically - cookies are not suited for SockJS model. If you want to\nauthorise a session - provide a unique token on a page, send it as a\nfirst thing over SockJS connection and validate it on the server\nside. In essence, this is how cookies work.\n\n\n### Deploying SockJS on Heroku\n\nLong polling is known to cause problems on Heroku, but\n[workaround for SockJS is available](https://github.com/sockjs/sockjs-node/issues/57#issuecomment-5242187).\n",
- "readmeFilename": "README.md",
- "bugs": {
- "url": "https://github.com/sockjs/sockjs-node/issues"
- },
- "_id": "sockjs@0.3.8",
- "dist": {
- "shasum": "b512849ed629f7ec2372ded3061bb05735ee45e9"
- },
- "_from": "sockjs@~>0.3.1",
- "_resolved": "https://registry.npmjs.org/sockjs/-/sockjs-0.3.8.tgz"
-}
diff --git a/node_modules/coalesce/package.json b/node_modules/coalesce/package.json
deleted file mode 100644
index d64e5153..00000000
--- a/node_modules/coalesce/package.json
+++ /dev/null
@@ -1,29 +0,0 @@
-{
- "name": "coalesce",
- "version": "0.1.9-bv",
- "author": {
- "name": "Mark Nadal"
- },
- "description": "Awesome web platform for distributed projects.",
- "homepage": "http://github.com/amark/coalesce",
- "engines": [
- "node >= 0.6.6"
- ],
- "dependencies": {
- "theory": "~>0.2.6",
- "node-static": "0.7.1",
- "formidable": "1.0.11",
- "sockjs-client": "~>0.1.3",
- "sockjs": "~>0.3.1",
- "mime": "~>1.2.4"
- },
- "main": "coalesce",
- "readme": "Coalesce\r\n========\r\n\r\n_Fuses your code into an emergent superstructure._\r\n\r\n[](http://vimeo.com/85853754)\r\n\r\nAs simple as:\r\n```\r\nnpm install coalesce && node -e \"require('coalesce')({port:8888, sec: -2})\"\r\n```\r\n\r\nThat is it, now you can create infinite new projects, like this one:\r\n\r\n**hello.html**\r\n```\r\n\r\n\r\n\t\r\n\t\t\r\n\t\t\r\n\t\r\n\r\n```\r\n**hello.js**\r\n```\r\nmodule.exports = require('theory')\r\n('hello', function(a){\r\n\r\n a.com.send({ what: \"World\", where: {on: 'magic'} });\r\n\r\n return (document.hello.to.onkeyup = function(m){\r\n\t\r\n\t\tm && m.what? document.hello.to.value = m.what :\r\n\t\ta.com.send({what: document.hello.to.value, where: 'magic' });\r\n\t\t\r\n });\r\n\r\n});\r\n```\r\nSave these two files in a subfolder called 'play' in the same directory as the install. (Don't want to copy/paste? Just clone this repo and run `node init.js` in it instead of the npm command.)\r\n\r\nNow load in 2 windows, side by side, the inputs will synchronize when you type!\r\n\r\nCuriosity perked? Check out the two test apps in the playground by simply navigating to them in your browser. Or, read on. Here are some quick hints at why it is awesome (skip this to continue to code examples).\r\n\r\n##Summary of Thoughts##\r\n1. Your module is automatically available to be asynchronously required anywhere else, node or browser - allowing you to manage your dependencies in your JS and not the HTML.\r\n2. Your modules get magically deployed and initialized when a browser requests them, or if otherwise specified in a startup configuration.\r\n3. Your module can optionally receive the request and provide a response, even though it runs in a separate process, already distributed and in parallel. Same setup for multiple machines when connected.\r\n4. Your module's primary communication practically runs off of function calls, even if it is across systems or multiple systems. Module to module communication is easy, loosely coupled directly to their functions.\r\n5. Not opinionated, works whether your code only wants to be RESTful, or only a thick client with sockets, or entirely P2P being relayed through the server.\r\n\r\n###...continued code examples###\r\nBut then you are like, \"yo, where is my $?\" and I reply \"I ain't your sugar daddy, foo'.\" so you then:\r\n```\r\nmodule.exports = require('theory')\r\n('hello', function(a){\r\n\t\r\n\t// your initialization code here.\r\n\t\r\n\treturn { world: $('input').val() }; // the module you export. \r\n\r\n},['http://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js']);\r\n```\r\nYupe, that is right, you can declare and manage your dependencies all within your javascript!\r\n\r\nAll you need in your HTML is one script tag that requires your app from inside, as seen above:\r\n```\r\n\r\n```\r\nNow once your modularized code loads, it won't execute until all of your dependencies are loaded.\r\n\r\nThis finally makes it easy to manage any type of large project.\r\nIf one of your dependencies is also a module, which has dependencies within it, everything asynchronously cascades.\r\nThe Theory library makes sure any Inception style depth level of dependencies is all stacked up properly before your code runs.\r\n\r\nHey, afterall, Cobb's wife Mal lives in the Unconstructed Dream Space, and she is named after me*mAl*locate, which is a nightmare for your memory.\r\n(if you didn't laugh... ignore this ever happened)\r\n\r\nSo you are probably like, hey, that is what Theory does, but what is Coalesce? \r\n>Coalesce is the web that connects all of your modules, both Node and in the browser.\r\nBut it provides more than just a seamless TCP / HTTP / AJAX / Websocket communication layer for your apps, it also automatically distributes and deploys them.\r\n\r\nThis is kind of a throwback to PHP, but don't worry, in a good way.\r\nRestart Coalesce with `node -e \"require('coalesce')({port:8888})\"`, you run this once and it acts as the master web server.\r\nYou then create your app - let's overwrite hello.js, again, to this:\r\n```\r\nmodule.exports = require('theory')\r\n('hello', function(a){\r\n\t\r\n\tconsole.log(\"Running in both Node and on the page.\");\r\n\r\n});\r\n```\r\nWhen you fire up from your browser, your browser makes a request to load 'hello.js'.\r\nCoalesce then attempts to execute 'hello.js' as a separate Node process. \r\nIf it crashes, it assumes it is a client only script, like jQuery, and serves it as a static file and remembers to do so in future.\r\n(Note: The assumptions and static server behaviors can be modified or overwritten, as described in the API).\r\nHowever, if the code can run in Node it does, and in particular, if it is a Theory module, it automagically integrates.\r\n\r\nNow take this example, let's overwrite hello.js again:\r\n```\r\nmodule.exports = require('theory')\r\n('hello', function(a){\r\n\t\r\n\tconsole.log(\"Running in both Node and on the page.\");\r\n\t\r\n\tif( root.page ){\r\n\t\ta.com.send(\"Hello World, from the page!\");\r\n\t}\r\n\t\r\n\treturn (function(m){\r\n\t\t\r\n\t\tif( root.node ){\r\n\t\t\tconsole.log(m.what);\t\r\n\t\t}\r\n\t\t\r\n\t});\r\n\r\n});\r\n```\r\nNow when you refresh you should see your Node console print out the message that had been sent from the browser.\r\nThere are several things to learn from this.\r\n\r\n###Conclusion###\r\n1. Coalesce should have automatically roll reloaded (since hot reloading is dangerous) your server side hello.js for you without needing to restart Coalesce.\r\n2. Your module is exported and available on both client and server via `theory.hello` namespace, which is a function that takes the parameter `m` for 'message'.\r\n3. Your single file app should be running on both the server and the client, by using the globally available `root.node` and `root.page` we can determine the corresponding logic.\r\n4. Your module is initialized with a copy of Theory in the parameter, called `a` which is local to your module and provides an interface to your module's dependencies.\r\n5. It also holds the default utilities of Theory, such as the communication layer in `a.com` which is used to send a message to your server side 'hello' module.\r\n6. The returned function exported out in (3) receives this message, and then logs it out.\r\n\r\nNote, this is the same thing that happened earlier with the synchronizing inputs - except since that was client side only \r\n(the module crashed when it tried to access the `document` element, which is undefined in node) and security was disabled via `{sec: -2}`,\r\nthe message relayed through the server to all other windows where they were on 'magic' and displayed the message in the input.\r\n(Javascript's native `keyup` listener was bound to the exported module, which was responsible for then sending the input value).\r\n\r\nAt this point, you feel like you were following along, but now everything just exploded and you are probably confused.\r\n\r\nThe reason why, is because in just 20 LOC or less, you get access to a ton of power, which is exposed to you via raw primitives.\r\n\r\nRemember, elegant complexity is created from the emergence of simplicity. This is coalescence.\r\n\r\n## Messages ##\r\nBefore we talk about how to intercept HTTP requests and such, you must understand how the magic behaves.\r\nCoalesce hates opinionated frameworks, and is as unopinionated as possible. The one catch is how a message is structured.\r\nMessages are the glue that causes all your apps to work in unison, so they are vital to the core of everything.\r\nPardon the cross-disciplinary worlds, but Coalesce borrows the 'W's of journalism to describe information.\r\n\r\n**Who . What . When . Where . Why . How**\r\n\r\nThese little goodies are what produce the powerful flexibility of Coalesce, and therefore are required for the magic to happen.\r\nIf you cannot accept this one opinion, which enables you to be free from opinions everywhere else, then Coalesce is not for you.\r\n\r\n- **Who** An expandable object containing data relating to the recipient and the sender.\r\n\t- `{who: 'Mark'}` expands into `{who: { to: 'Mark' }}` which indicates the message is to be sent to Mark.\r\n\t- In Node, `m.who.tid` is the ID of the specific tab that sent the socket message.\r\n\t- In Node, `m.who.sid` is the session ID from the original HTTP request.\r\n\t- Server Examples:\r\n\t\t- `a.com.send({ what: \"This is sent back to the same tab which sent me this message.\", who: m.who.tid })`\r\n\t\t- `a.com.send({ what: \"I will be sent to every tab that is in this session.\", who: m.who.sid })`\r\n- **What** An expandable anything. This is the crux of the data you are actually sending, everything else is just metadata relating to the payload.\r\n\t- Client Examples:\r\n\t\t- `a.com.send(\"Hello world!\")` expands into and is accessible via `m.what`.\r\n\t\t- `a.com.send({ foo: 'bar' })` the value of 'bar' is accessible via `m.what.foo`.\r\n\t\t- `a.com.send({ foo: 'bar', who: 'Mark' })` expands into `{ who: {to: 'Mark'}, what: {foo: 'bar'} }`.\r\n\t\t- `a.com.send({ what: {foo: 'bar'}, who: {to: 'Mark'} })` is already expanded.\r\n- **When** Is a hyper precise millisecond timestamp of when the message was created.\r\n\t- It is 17 digits long, which is 4 digits longer than the normal `new Date().getTime()`.\r\n\t- It is not expandable.\r\n- **Where** Is an expandable object pertaining to pub/sub and where the message has been processed.\r\n\t- `{where: 'magic'}` expands into `{where: {at: 'magic'}}` which broadcasts the message to subscribers of the 'magic' channel.\r\n\t- `{where: {on: 'magic'}}` subscribes and broadcasts to the 'magic' channel.\r\n\t- `{where: {off: 'magic'}}` broadcasts and unsubscribes to the 'magic' channel.\r\n- **Why** Is not used, but can be optionally added if you want to provide an arbitrary comment about why the message was sent.\r\n- **How** Mandatory Metadata Object.\r\n\t- `m.how.way` holds the magical key which routes which way the object goes, by default is the name of the module.\r\n\t- Can overwrite the 'way' property to communicate with other modules, or directly to functions of a module using the dot notation.\r\n\t- Usage of the 'way' property, for now, will be described elsewhere.\r\n\t- You can attach any critical metadata, such as version numbers, etc.\r\n\r\nBecause communication between modules is so important, the Theory library provides many helper functions.\r\nDespite this, it is strongly recommended and encouraged you write your own helper functions ontop of the helper functions.\r\nNot to get too meta, but the Theory library also has helper functions to assist you in writing your own helper functions.\r\nIf this is not already an emphasis enough on how important this is,\r\nthen also note that the entire security of your app is controlled by what information you allow to flow through these APIs you create.\r\nBecause Coalesce is not opinionated, you have to enforce your own validation, sanitation, and app specific authorization.\r\n\r\nTherefore, writing your own abstraction ontop of the communication layer will substantially ease your own development and prevent vulnerabilities.\r\n\r\n## Intercepting HTTP ##\r\n\r\nNow we get to start to use Coalesce's API.\r\nThis means we're going to use the more robust and explicit form of declaring a module, rather than just the shorthand we have been using.\r\n```\r\nmodule.exports = require('theory')\r\n({name: 'hello'\r\n, author: 'Mark Nadal'\r\n, version: 5\r\n, dependencies: [\r\n 'fs'\r\n],state: { way: 'server' }\r\n, invincible: true\r\n, init: function(a){\r\n return {\r\n server: function(m){\r\n // HTTP Intercept:\r\n console.log(m);\r\n a.fs.writeFileSync(__dirname+'./lastReq.js', \"alert('The last request was at \"+Date()+\"')\");\r\n m.what.body = \"alert('Hello World!')\";\r\n a.com.reply(m);\r\n }\r\n }\r\n}});\r\n```\r\nNow refresh the page, we should get an ugly ol'alert message. What we are learning...\r\n\r\n1. Rather than parameters of name, initializing function, and optional dependencies - we can just have a single parameter that is similar to a package.json file.\r\n2. This also allows you to wrap it inside another self calling closure that returns an object, if you would like. This is the style seen in the examples, but not demonstrated here.\r\n3. The `state` property tells Coalesce where your module will intercept HTTP requests. In this case, we want to receive it in the 'server' function of our exported module.\r\n4. Because Coalesce will assume a script is client side only if it crashes, we activate the `invincible` tag to tell Coalesce to respawn this module server side if it does crash.\r\n5. As the console will show, we have access to the request `m.what.url`, `m.what.headers`, and `m.what.cookies`.\r\n6. In the same way the communication module is available via `a.com`, our dependencies are available, so we can easily use the filesystem module via `a.fs`. A dependency of `['./subdir/module-name']` is accessible via `a['module-name']`.\r\n7. We can modify the response, by setting a `m.what.body`, `m.what.type`, and so on.\r\n8. `a.com.reply` is a helper that accepts the message passed into the function, which you modify directly, and sends it back to whatever had sent it. It is used by Coalesce for HTTP replies, and by `a.com.ask` client side.\r\n9. You should never write code with alert messages, writing useless data directly to the filesystem on every request, and inline javascript code. Bleck, do as I say, not as I do.\r\n\r\nSo let's fiddle with the http function by overwriting it with this:\r\n```\r\n // HTTP Intercept:\r\n console.log(m);\r\n m.what.url.pathname = '/play/lastReq.js';\r\n m.what.type = 'js';\r\n a.com.reply(m);\r\n```\r\nRefresh and bam. It delivered the file we created previously by changing the route of the pathname.\r\n\r\nThis is interesting, though, because a lot of times we don't want our REST endpoint to be at some ugly path to filename, let alone then only be used to redirect to some other filename. We want the opposite, we want some pretty (extensionless) endpoint name which maps request(s) to our process. That way we could do things like `/hello` or `/hello/user/mark` or `/hello?name=mark`. Not all apps are like this, and therefore Coalesce should not force this, nor should it prevent it.\r\n\r\nIn order to configure this, we can't dynamically wait for our app to automatically be deployed - because the browser will never be requesting that file, but the pretty route instead! Therefore we must tell Coalesce to run our app at start up, so that way it will be ready and listening on that route. First, we need to update or create the initialization.\r\n\r\n**init.js**\r\n```\r\nrequire('coalesce')({\r\n\tport: 8888\r\n\t,run: ['./play/hello']\r\n});\r\n```\r\nSave or replace this to the install or repo folder, and restart Coalesce now with `node init.js`. Next update your hello.js to have a state proprety of `{ way: 'server', match: '/asdf', flow: -1 }`. Some quick points:\r\n\r\n1. Coalesce takes a single parameter which is an options object.\r\n2. You declare your routes in your app itself with the state property, not in the configuration - this makes things super flexible.\r\n3. Flow controls the priority or weight or ordering of your route. The static file server is at `0`, so negative numbers allow you to catch and respond to a request before the file on disk is sent - thus blocking or overwriting it, if you want, for security purposes. Positive numbers will only be received if the file doesn't already exist.\r\n4. Match is pretty much self descriptive, it is the path relative to the server that you want to listen on. You can also have dynamic routes, using basic string pattern matching symbols, that map into parameters.\r\n5. For anything more complex, do not use the `state.match`, instead send a regex as a string on `state.regex` and `state.flags` which Coalesce will evaluate.\r\n\r\nAlright, now let's update the http function of our hello.js file again:\r\n```\r\n // HTTP Intercept:\r\n console.log(m.what.url);\r\n\t\t\tm.what.body = \"Hello, \"+ (m.what.url.query.name || 'World') +\"!\";\r\n a.com.reply(m);\r\n```\r\nAwesome sauce, hit up and look what it says! Now try playing around with it yourself. That's all for now on this topic, folks.\r\n\r\n## Intercepting Sockets ##\r\nThis is done by default, upon `a.com.send` and mapped directly to your main module function. You can also communicate to other modules, via `a.com('yourOtherModule').send`, which will always pass through the server side module first. Once received, you then decide if you want to `a.com.reply` back to the client, or `m.where` client side you want to `a.com.send` it out to. Server to browser communication can only be emitted from and to the same module, unless you enable the `relay` property in the security options on your Coalesce initialization - but warning, this is a security vulnerability. This relay option was necessary for the examples to work.\r\n\r\nDespite this flexibility of intricacy, it is going to be highly recommended that you use Redis' pubsub anyways inside of your module, because it gives you an extra layer of control over the flow points of your app. Consider this comparison, by default Coalesce provides:\r\n\r\n1. Client emit --> 2. Server receive, sanitize, validate, process. Emit --> to another module 3. process, then Server emit --> 4. Client(s) receive.\r\n\r\nAdding in Redis, you can get this kind of fine grain precision:\r\n\r\n1. Client emit --> 2. Server receive, sanitize, validate, process in the context of the sender. Publish to recipients --> 3. Server receives, processes in the context of recipient, then Server emits --> each 4. Client receives.\r\n\r\nIf you think about this it pretty much gives you complete control over every possible aspect of any type of app logic, yet it is all within a fairly elegant flow structure. Although you are left with the added complexity of having to manage and handle Redis subscriptions for the clients in the server and making sure everything is atomic, especially in the context of your app being possibly run in parallel processes. Coalesce will not do this for you, because it treads on too many opinions, however helper modules for this may be released in the future to ease managing this for you - then you just include the corresponding module which matches whatever particular assumption you need for that specific app.\r\n\r\n## API ##\r\n\r\n### Config Options ###\r\n\r\n- `host` the hostname you want for the server. *`'localhost'`*\r\n- `port` the port which you want the server to listen on. *`80`*\r\n- `dir` the root directory for the server. *(defaults to the directory of file requiring coalesce)*\r\n- `sec` the security options object.\r\n - `relay` allows messages to pass through the server to other clients automatically if there is no matching module to route to. *`false`*\r\n - `incognito` no session cookie tracking, equivalent to a browser's incognito mode, except for the server. *`false`*\r\n - `key` same as https.createServer's key option, such as the contents of a key.pem file. *`''`*\r\n - `cert` same as https.createServer's cert option, such as the contents of a cert.pem file. *`''`*\r\n - rather than declaring `sec` as an object, you can set its value to one of the following **shorthands**:\r\n - `-2` == `{relay: true, incognito: true}`\r\n- `run` an array of paths you want to run when the server spins up. *`[]`*\r\n- `hook` some special hooks for debugging purposes that will get embedded into Coalesce such as:\r\n\t- `pre` a function which gets called at the beginning of every request. Good for any global request monitoring, like `console.log`ing the `req.url` for logging purposes. *`function(req,res){ }`*\r\n\t- `aft` a function which gets called after the request is handled. *`function(req,res){ }`*\r\n\t- `err` a function which gets called in case the static server encounters an error. *`function(req,res){ }`*\r\n- `com` the SockJS config options object, see SockJS's docs.\r\n\r\n**miscellaneous:**\r\n\r\n- `no_global_theory_src` prevents auto linking and caching Theory for global server side reference as well as client side HTML reference. *`false`*\r\n- `impatient` the millisecond timeout of how long a request should wait for a module to auto deploy itself and intercept the request before Coalesce hands it to the static server. *`3000`*\r\n\r\nExample:\r\n```\r\nvar Coalesce = require('coalesce')\r\n\t,opt = {};\r\n\r\nopt.port = 8888;\r\nopt.sec = { relay: true };\r\nopt.hook = { pre: function(req,res){\r\n\tconsole.log(req.url);\r\n}}\r\nopt.impatient = 5*1000;\r\nopt.com = {\r\n\tlog: function(level, m){\r\n\t\tif(level === 'error') \r\n\t\t\tconsole.log(m);\r\n\t}\r\n}\r\n\r\nCoalesce(opt);\r\n\r\nconsole.log(\"Coalesce @ \"+ opt.port);\r\n```\r\n\r\n### Module Options ###\r\n\r\n- `state` the state object, for intercepting HTTP requests, as detailed in the examples. *`{}`*\r\n - `m.what.headers` are the default headers from the request.\r\n - `m.what.method` whether 'post' or 'get' etc., always lower case.\r\n - `m.what.url` is an object concerning the URL.\r\n - `m.what.cookies` is the cookie object from the request. To set your own cookie, just add a property, like `m.what.cookies.name = 'value'`. Or if you want to add options, do `m.what.cookies.name = {value: 'value', httpOnly: true, 'Max-Age': 99999}` instead.\r\n - `m.what.form` if a form happened to be submitted, this is it.\r\n - `m.what.files` if files were uploaded, this is where you deal with them.\r\n - `m.what.body` assign anything to this, and it will become the body of the response.\r\n - `m.what.type` allows you to set the Content-Type.\r\n - `m.what.encoding` to set the Content-Encoding.\r\n - `m.what.cache` use `0` for forcing no cache, or manually provide a cache control value.\r\n - `m.what.status` in case you need to set an explicit status code.\r\n - `m.what.redirect` to redirect to another URL.\r\n- `invincible` a boolean as to whether you want this module to respawn server side, in case it crashes. *`false`*\r\n\r\nExample:\r\n>scroll up to see the example in the HTTP intercept section.\r\n\r\n### Messages ###\r\n>scroll up to see Messages section.\r\n\r\n## Random Ramblings... ##\r\nThis is just tossing up a quick getting started guide, but it obviously is pretty vague.\r\nSo I'll just explain as much as I can really quickly in a garbled mess.\r\nProgramming is just 9 primitives - booleans, numbers, strings, texts, arrays, objects combined with loops, functions, and if statements.\r\nGiven these constructs, you then have and do 3 basic things - data, manipulation, and communication.\r\nThe Theory library provides a solid foundation for this, an abstraction layer for modular Javascript regardless of server, client, or IE6.\r\nCoalesce creates the communication layer between all these modules, whether server to server, client to client, or server to client and vice versa,\r\nfor all protocols - TCP, HTTP, Websocket, or AJAX, all with proper dependency, routing, and event pub/sub.\r\nThis means when you write beautiful modules for your app, Coalesce automatically becomes a distributed scalable system because your files are physically separated.\r\n\r\n## Future ##\r\nObviously this is still under development, and my todo list is huge. Immediately, there needs to be configuration options for adding message queues (Redis, ZeroMQ, etc.), swapping websocket libraries (SockJS, Socket.IO, ws, etc.), and cookie storage, and so on - these are all things that should \"plug-in\" to replace the sensible defaults. Tests are critical to add. Further out, it is intended to be cross-machine, not just cross-processes, the setup and config for that should be easy-peasy. Perhaps not within the scope of Coalesce core, but to facilitate with cross-machine fusing, it would make sense if scaling features existed to detect disk/cpu/ram overload and then auto-spawn new machines that then linked up. Lots of devops there!\r\n\r\nHere is to the future, help me create it! In the meanwhile, please experiment and play with it, and join me!\r\n\r\n*Note:* If you run into any problems or if anything is confusing or not easy please let me know. I'll help you and then make sure to clarify and update things. Thanks!\r\n\r\nCrafted with love by Mark Nadal, whom is not responsible for any liabilities from the use of this code.\r\n",
- "readmeFilename": "README.md",
- "_id": "coalesce@0.1.9-bv",
- "dist": {
- "shasum": "2375bc62667c27f21b2ba8588e5acecfca6f687a"
- },
- "_from": "coalesce@0.1.9-bv",
- "_resolved": "https://registry.npmjs.org/coalesce/-/coalesce-0.1.9-bv.tgz"
-}
diff --git a/node_modules/coalesce/test/initA.js b/node_modules/coalesce/test/initA.js
deleted file mode 100644
index a163afc1..00000000
--- a/node_modules/coalesce/test/initA.js
+++ /dev/null
@@ -1,11 +0,0 @@
-var web = require('../coalesce')
-, opt = {port: 8080, sec: -2};
-
-opt.run = ['./serverA'];
-opt.node = {
- src: "http://localhost:8080/com"
- ,key: "I am a secret key that establishes trustworthiness as a root system machine"
-}
-
-web(opt);
-console.log("initA @ "+ opt.port);
\ No newline at end of file
diff --git a/node_modules/coalesce/test/initB.js b/node_modules/coalesce/test/initB.js
deleted file mode 100644
index fb39fa8f..00000000
--- a/node_modules/coalesce/test/initB.js
+++ /dev/null
@@ -1,11 +0,0 @@
-var web = require('../coalesce')
-, opt = {port: 8081, sec: -2};
-
-opt.run = ['./serverB'];
-opt.node = {
- src: ["http://localhost:8080/com"] // have to include /com or not? Let's say yes for now. Is this its ID?
- ,key: "I am a secret key that establishes trustworthiness as a root system machine"
-}
-
-web(opt);
-console.log("initB @ "+ opt.port);
\ No newline at end of file
diff --git a/node_modules/coalesce/test/serverA.js b/node_modules/coalesce/test/serverA.js
deleted file mode 100644
index e041ac3b..00000000
--- a/node_modules/coalesce/test/serverA.js
+++ /dev/null
@@ -1,22 +0,0 @@
-module.exports=require('theory')
-({name: 'echo'
-, state: {way:'state', flow:-1}
-, invincible: true
-, init: function(a){
- var echo = {};
- console.log("serverA online");
- echo.state = function(m){
- console.log('serverA state ->', m);
- m.what.body = 'serverA';
- a.com.reply(m);
- };
- echo.stream = function(m){
- console.log('serverA stream ->', m);
- if(!m || !m.what){ return }
- if(!m.what.spam){ m.what.spam = 0 }
- m.what.spam += 1;
- if(3 < m.what.spam){ return }
- a.com.reply(m);
- }
- return echo.stream;
-}});
\ No newline at end of file
diff --git a/node_modules/coalesce/test/serverB.js b/node_modules/coalesce/test/serverB.js
deleted file mode 100644
index c4e45489..00000000
--- a/node_modules/coalesce/test/serverB.js
+++ /dev/null
@@ -1,26 +0,0 @@
-module.exports=require('theory')
-({name: 'echo'
-, state: {way:'state', flow:-1}
-, invincible: true
-, init: function(a){
- var echo = {};
- console.log("serverB online");
- echo.state = function(m){
- console.log('serverB state ->', m);
- m.what.body = 'serverA';
- a.com.reply(m);
- };
- echo.stream = function(m){
- console.log('serverB stream ->', m);
- if(!m || !m.what){ return }
- if(!m.what.spam){ m.what.spam = 0 }
- m.what.spam += 1;
- if(3 < m.what.spam){ return }
- a.com.reply(m);
- }
- a.time.wait(function(){
- console.log("serverB send message");
- a.com.send({here:'we go!'});
- },1000);
- return echo.stream;
-}});
\ No newline at end of file
diff --git a/node_modules/fakeredis/.npmignore b/node_modules/fakeredis/.npmignore
deleted file mode 100644
index 805473f9..00000000
--- a/node_modules/fakeredis/.npmignore
+++ /dev/null
@@ -1,2 +0,0 @@
-node*
-npm*
diff --git a/node_modules/fakeredis/.travis.yml b/node_modules/fakeredis/.travis.yml
deleted file mode 100644
index 6918be72..00000000
--- a/node_modules/fakeredis/.travis.yml
+++ /dev/null
@@ -1,7 +0,0 @@
-language: node_js
-
-node_js:
- - "0.6"
- - "0.8"
- - "0.10"
- - "0.11"
diff --git a/node_modules/fakeredis/README.md b/node_modules/fakeredis/README.md
deleted file mode 100644
index bc44fc9c..00000000
--- a/node_modules/fakeredis/README.md
+++ /dev/null
@@ -1,407 +0,0 @@
-
-
-# fakeredis - a fake redis for node.js
-
-
-This module provides easy-to-use simulated instances of Redis
-to which you appear to be connected via the
-[redis](https://github.com/mranney/node_redis) client by [Matt Ranney](https://github.com/mranney).
-**It helps with writing tests** in two ways:
-your tests won't require an actual redis instance
-and you'll be able to safely run as many tests in parallel as you want.
-
-[](https://npmjs.org/package/fakeredis)
-[](http://travis-ci.org/hdachev/fakeredis)
-
-
-## Usage
-
-Install:
-
- npm install fakeredis
-
-You can use fakeredis as you would use node_redis,
-just changing the module name from `redis` to `fakeredis`:
-
-```javascript
-var client = require("fakeredis").createClient(port, host);
-```
-
-Both parameters are optional,
-and only serve to determine if you want to reuse a an existing fakeredis instance or not.
-You can also just name your backends arbitrarily:
-
-```javascript
-
-// Create a connection to a fresh fakeredis instance:
-var client = fakeredis.createClient("social stuff");
-
-// Connect to the same backend via another simulated connection:
-var concurrentClient = fakeredis.createClient("social stuff");
-```
-
-By omitting both parameters,
-you simply create a new blank slate fakeredis instance:
-
-```javascript
-var client = require("fakeredis").createClient();
-```
-
-
-In other words,
-every time you create a client specifying the same port and/or name
-you reuse the same simulated backend.
-This makes most sense when you need a concurrent client setup for some test,
-say because you need to publish / subscribe,
-or because you want to test something that's based on `MULTI`/`EXEC`
-and uses optimistic locking with `WATCH`/`UNWATCH`.
-
-In any case, fakeredis is great for testing
-because you can run as many tests in parallel as you wish,
-and that's also why you'll generally be naming your clients
-in a way that ensures tests don't collide.
-
-
-
-## Intended differences from a true Redis
-
-One key difference is that the output of some commands,
-such as `SMEMBERS`, `HKEYS`, `HVALS`,
-comes out sorted lexicographically to provide for simpler testing.
-This means that some tests that make use of undocumented Redis behaviours
-such as the chronological order of retrieval for members in a set
-may fail when attempted with fakeredis.
-To solve this,
-whenever there is no documented sort order for a given Redis command's multi-bulk reply,
-sort the output before asserting equality to ensure your tests run everywhere.
-
-Another major difference is that commands that accept modifier parameters, such as
-`SORT key [BY pattern] [LIMIT offset count] [GET pattern [GET pattern ...]] [ASC|DESC] [ALPHA] [STORE destination]`
-currently only accept these parameters in the order that is stated in the documentation.
-For example,
-in Redis it appears to be perfectly legitimate to have `SORT myset ALPHA LIMIT 0 5`,
-but in fakeredis this will currently return a syntax error.
-
-I'm totally open to discussion on both points.
-
-
-### Implemented subset:
-
-All string, list, hash, set and sorted set commands,
-most keyspace commands, and some connection and server commands.
-Pubsub, transactions with optimistic locking are also fully implemented.
-
-List of **available** commands:
-
-Keyspace:
-
- DBSIZE
- EXISTS
- EXPIRE
- EXPIREAT
- FLUSHDB
- KEYS
- PERSIST
- DEL
- RANDOMKEY
- RENAME
- RENAMENX
- SORT
- TTL
- TYPE
-
-Strings:
-
- APPEND
- DECR
- DECRBY
- GET
- GETBIT
- GETRANGE
- GETSET
- INCR
- INCRBY
- MGET
- MSET
- MSETNX
- SET
- SETBIT
- SETEX
- SETNX
- SETRANGE
-
-Hashes:
-
- HDEL
- HEXISTS
- HGET
- HGETALL
- HINCRBY
- HKEYS
- HLEN
- HMGET
- HMSET
- HSET
- HSETNX
- HVALS
-
-Lists:
-
- BLPOP
- BRPOP
- BRPOPLPUSH
- LINDEX
- LINSERT
- LLEN
- LPOP
- LPUSH
- LPUSHX
- LRANGE
- LREM
- LSET
- LTRIM
- RPOP
- RPOPLPUSH
- RPUSH
- RPUSHX
-
-Sets:
-
- SADD
- SCARD
- SDIFF
- SDIFFSTORE
- SINTER
- SINTERSTORE
- SISMEMBER
- SMEMBERS
- SMOVE
- SPOP
- SRANDMEMBER
- SREM
- STRLEN
- SUNION
- SUNIONSTORE
-
-Sorted Sets:
-
- ZADD
- ZCARD
- ZCOUNT
- ZINCRBY
- ZINTERSTORE
- ZRANGE
- ZRANGEBYSCORE
- ZRANK
- ZREM
- ZREMRANGEBYRANK
- ZREMRANGEBYSCORE
- ZREVRANGE
- ZREVRANGEBYSCORE
- ZREVRANK
- ZSCORE
- ZUNIONSTORE
-
-Pub/Sub:
-
- PSUBSCRIBE
- PUBLISH
- PUNSUBSCRIBE
- SUBSCRIBE
- UNSUBSCRIBE
-
-Transactions:
-
- DISCARD
- EXEC
- MULTI
- UNWATCH
- WATCH
-
-Connection and Server:
-
- ECHO
- PING
- QUIT
- SELECT
-
-These do nothing but return `OK`:
-
- AUTH
- BGREWRITEAOF
- BGSAVE
- SAVE
-
-
-### What's missing:
-
-Most notably, `MONITOR` is still missing.
-
-Also note that **none of the node_redis client constructor options are available**,
-which means no `detect_buffers` and `return_buffers`.
-Command arguments are always stringified at the fake connection level,
-and replies are always returned as `null`, `String`, `Number` or `Array`.
-
-Finally,
-none of the `ready`, `connect`, `error`, `end`, `drain` and `idle`
-client events are currently implemented.
-
-List of **missing** commands (will throw upon attempt to use):
-
-Connection and Server:
-
- CONFIG GET
- CONFIG SET
- CONFIG RESETSTAT
- DEBUG OBJECT
- DEBUG SEGFAULT
- FLUSHALL
- INFO
- LASTSAVE
- MONITOR
- MOVE
- OBJECT
- SHUTDOWN
- SLAVEOF
- SYNC
-
-
-
-## Helpers
-
-To facilitate development and testing,
-fakeredis provides some additional methods on the client object.
-
-
-### Prettyprinting:
-
-```javascript
-fakeredisClient.pretty();
-fakeredisClient.pretty("p*tte?n");
-fakeredisClient.pretty(options);
-```
-
-`.pretty()` will prettyprint to stdout the entire keyspace
-or a subset of keys specificed with a redis pattern
-of the same kind that's used for `KEYS` and `PSUBSCRIBE`.
-Keep in mind .pretty() is async,
-because it works as a normal client command
-and hence needs to respect the command order,
-fake pipelining and latency and all,
-so that you can do stuff like:
-
-```javascript
-var client = require("fakeredis").createClient();
-
-client.SADD('hello', 'world', 'Jenny', 'Sam');
-client.LPUSH('mylist', 'hey', 'ho', 'letsgo');
-client.pretty({label: "my stuff", pattern: "*"});
-```
-
-Which would print *(in color!)*
-
- my stuff:
-
- set hello
- -1 Jenny, Sam, world
-
- list mylist
- -1 letsgo, ho, hey
-
-
-### Keyspace dumps:
-
-```javascript
-fakeredisClient.getKeypsace(callback);
-fakeredisClient.getKeypsace("p*tte?n", callback);
-fakeredisClient.getKeyspace(options, callback);
-```
-
-Will `callback(err, data)` with an array
-that enumerates the whole keyspace,
-or the requested subset, in the following manner:
-
-```javascript
-[ key1, ttl1, type1, value1
-, key2, ttl2, type2, value2
-, ... ]
-```
-
-The keyspace is sorted lexicographically by key,
-string values are strings,
-list values are the output of `LRANGE 0 -1`,
-hashes come out as the output of `HGETALL` for hashes
-(no syntactic sugar though, so an Array of `[field, value, field, value, ...]`),
-`SMEMBERS` output is used for sets,
-and `ZRANGE 0 -1 WITHSCORES` for sorted sets,
-each of which is sorted lexicographically in a way that makes sense,
-so that the final result is simple enough to assert deep equality against.
-
-In any case, you'll probably need to reformat these keyspace dumps
-to a format that makes more sense for your testing needs.
-There are a couple of transforms that are included out of the box:
-
-```javascript
-fakeredisClient.getKeypsace({pattern: "myz*", map: true}, callback);
-```
-
-If you only care about the key and value of each entry,
-you can set the **map** option to a truthy value,
-you will instead receive the keyspace dump as a key-value map of the kind:
-
-```javascript
-{ key1: value1, key2: value2, ... }
-```
-
-This means you're skipping ttl and key type info though. You can also do:
-
-```javascript
-fakeredisClient.getKeypsace({pattern: "myz*", group: true}, callback);
-```
-
-Which will return an `Array` of `Array`s,
-one for each keyspace entry, so that you end up with:
-
-```javascript
-[ [ key1, ttl1, type1, value1 ]
-, [ key2, ttl2, type2, value2 ]
-, ... ]
-```
-
-The benefit of this option is that you can sort the outer array as you like more easily.
-
-
-
-## Similar projects
-
-You might also want to check out these similar implementations in
-[python](https://github.com/jamesls/fakeredis) and
-[ruby](https://github.com/guilleiguaran/fakeredis).
-
-
-
-## MIT License
-
-Copyright (c) 2012 Hristo Dachev
-
-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.
-
diff --git a/node_modules/fakeredis/lib/backend.js b/node_modules/fakeredis/lib/backend.js
deleted file mode 100644
index 9a755112..00000000
--- a/node_modules/fakeredis/lib/backend.js
+++ /dev/null
@@ -1,2023 +0,0 @@
-"use strict";
-
-
- //// Error replies.
-
-var ERROR = function ( message )
-{
- this.getError = function () { return message; };
- this.toString = function () { return ">"; };
-};
-
-var BAD_TYPE = new ERROR ( 'Operation against a key holding the wrong kind of value' );
-var BAD_KEY = new ERROR ( 'no such key' );
-var BAD_INT = new ERROR ( 'value is not an integer or out of range' );
-var BAD_FLOAT = new ERROR ( 'value is not a valid float' );
-var BAD_ARGS = new ERROR ( 'wrong number of arguments' );
-var BAD_SYNTAX = new ERROR ( 'syntax error' );
-var BAD_INDEX = new ERROR ( 'index out of range' );
-var BAD_SORT = new ERROR ( 'One or more scores can\'t be converted into double' );
-
-var BAD_BIT1 = new ERROR ( 'bit offset is not an integer or out of range' );
-var BAD_BIT2 = new ERROR ( 'bit is not an integer or out of range' );
-var BAD_SETEX = new ERROR ( 'invalid expire time in SETEX' );
-var BAD_ZUIS = new ERROR ( 'at least 1 input key is needed for ZUNIONSTORE/ZINTERSTORE' );
-
-
-
- //// Status replies.
-
-var STATUS = function ( message )
-{
- this.getStatus = function () { return message; };
- this.toString = function () { return ">"; };
-};
-
-var OK = new STATUS ( 'OK' );
-var PONG = new STATUS ( 'PONG' );
-var NONE = new STATUS ( 'none' );
-
-
-
- //// Redis types.
-
-var VALID_TYPE = function () {};
-var TYPE = function ( type, makePrimitive )
-{
- var Constr = function ( value )
- {
- if ( !( this instanceof VALID_TYPE ) )
- return new Constr ( value );
- if ( !value )
- value = makePrimitive ();
-
- this.value = value;
- };
-
- Constr.getStatus = function () { return type; };
- Constr.prototype = new VALID_TYPE;
- Constr.prototype.toString = function () { return ">"; };
- Constr.prototype.TYPE = Constr;
- return Constr;
-};
-
-var EMPTY_STR = { toString : function () { return ""; }, length : 0, copy : function () {} };
-var STRING = TYPE ( "string", function () { return EMPTY_STR; } );
-var LIST = TYPE ( "list", function () { return []; } );
-var HASH = TYPE ( "hash", function () { return {}; } );
-var SET = TYPE ( "set", function () { return {}; } );
-var ZSET = TYPE ( "zset", function () { return {}; } );
-
-
-
- //// Utils.
-
-var arr = function ( obj )
-{
- var i, n = obj.length, out = [];
- for ( i = 0; i < n; i ++ )
- out [ i ] = obj [ i ];
-
- return out;
-};
-
-var range = function ( min, max )
-{
- var xlo, xhi;
-
- if (( xlo = min.substr ( 0, 1 ) === '(' ))
- min = str2float ( min.substr ( 1 ) );
- else
- min = str2float ( min );
-
- if ( min instanceof ERROR )
- return min;
-
- if (( xhi = max.substr ( 0, 1 ) === '(' ))
- max = str2float ( max.substr ( 1 ) );
- else
- max = str2float ( max );
-
- if ( max instanceof ERROR )
- return max;
-
- return function ( num )
- {
- return !( ( xlo && num <= min ) || ( num < min ) || ( xhi && num >= max ) || ( num > max ) );
- };
-};
-
-var slice = function ( arr, start, stop, asCount )
-{
- start = str2int ( start );
- stop = str2int ( stop );
- if ( start instanceof ERROR ) return start;
- if ( stop instanceof ERROR ) return stop;
-
- if ( arr.slice )
- {
- var n = arr.length;
- if ( asCount )
- {
- if ( start < 0 )
- {
- start = 0; // Redis is inconsistent about this, ZRANGEBYSCORE will return an empty multibulk on negative offset
- stop = 0; // whilst SORT will return as if the offset was 0. Best to lint these away with client-side errors.
- }
- else if ( stop < 0 ) stop = n;
- else stop += start;
- }
- else
- {
- if ( start < 0 ) start = n + start;
- if ( stop < 0 ) stop = n + stop;
- stop ++;
- }
-
- if ( start >= stop )
- return [];
- else
- return arr.slice ( start < 0 ? 0 : start, stop > n ? n : stop );
- }
-
- else
- return arr;
-};
-
-var str2float = function ( string )
-{
- var value = Number ( string );
- if ( typeof string !== 'string' ) throw new Error ( "WOOT! str2float: '" + string + "' not a string." );
- if ( string === '+inf' ) value = Number.POSITIVE_INFINITY;
- else if ( string === '-inf' ) value = Number.NEGATIVE_INFINITY;
- else if ( !string || ( !value && value !== 0 ) ) return BAD_FLOAT;
- return value;
-};
-
-var str2int = function ( string )
-{
- var value = str2float ( string );
- if ( value instanceof ERROR || value % 1 !== 0 ) return BAD_INT;
- return value;
-};
-
-var pattern = function ( string )
-{
- string = string.replace ( /[+{($^|.\\]/g, '\\' + '$0' );
- string = string.replace ( /(^|[^\\])([*?])/g, '$1.$2' );
- string = '^' + string + '$';
-
- var pattern = new RegExp ( string );
- return pattern.test.bind ( pattern );
-};
-
-
-
- //// Keyspace and pubsub.
-
-exports.Backend = function ()
-{
- var state,
- dbs = {},
- delrev = {},
- rev = 0,
-
- subs = [],
- call = [],
- tick = false;
-
-
- // Select.
- // Selected keyspace is NOT relevant to pubsub.
- this.selectDB = function (id) {
- if (typeof id !== "number" || id % 1 !== 0)
- throw new Error("Invalid database id: " + id);
-
- // Select or instantiate.
- var db = dbs[id] || (dbs[id] = {});
- state = db;
- };
-
- // Connections start in database 0.
- this.selectDB(0);
-
-
- //// Typed getKey.
-
- this.getKey = function ( type, key, make )
- {
- var entry = state [ key ];
-
- if ( type && !type.getStatus )
- throw new Error ( "WOOT! type param for getKey is not a valid type." );
- if ( key === undefined )
- throw new Error ( "WOOT! key param for getKey is undefined." );
-
- if ( !entry || entry.expire < Date.now () )
- {
- delete state [ key ];
- delrev [ key ] = ++ rev;
- entry = null;
- }
- else if ( !( entry.value instanceof VALID_TYPE ) )
- throw new Error ( "WOOT! keyspace entry value is not a valid type." );
-
- if ( type )
- {
- if ( entry && !( entry.value instanceof type ) )
- return BAD_TYPE;
- if ( !entry && make )
- return new type;
- }
-
- return ( entry && entry.value ) || null;
- };
-
- this.setKey = function ( key, value )
- {
- if ( value )
- {
- if ( !( value instanceof VALID_TYPE ) )
- throw new Error ( "WOOT! Value doesn't have a valid type." );
-
- rev ++;
- state [ key ] = { value : value };
- state [ key ].rev = rev;
- delete delrev [ key ];
-
- this.pub ( this.UPDATE, key );
-
- return 1;
- }
-
- else if ( state [ key ] )
- {
- rev ++;
- delrev [ key ] = rev;
- delete state [ key ];
-
- return 1;
- }
-
- return 0;
- };
-
- this.upsetKey = function ( key, value )
- {
- if ( !value )
- throw new Error ( "WOOT! Update key with a falsy value." );
- if ( !( value instanceof VALID_TYPE ) )
- throw new Error ( "WOOT! Value doesn't have a valid type." );
-
- if ( state [ key ] && state [ key ].expire >= Date.now () )
- {
- if ( state [ key ].value !== value )
- throw new Error ( "WOOT! Chaning value containers during upsetKey." );
-
- rev ++;
- state [ key ].value = value;
- state [ key ].rev = rev;
-
- this.pub ( this.UPDATE, key );
- }
-
- else
- this.setKey ( key, value );
- };
-
- this.getExpire = function ( key )
- {
- var entry = state [ key ];
-
- if ( !entry || entry.expire < Date.now () )
- {
- delete state [ key ];
- return null;
- }
-
- return entry.expire;
- };
-
- this.setExpire = function ( key, expire )
- {
- var entry = state [ key ];
-
- if ( !entry || entry.expire < Date.now () )
- {
- delete state [ key ];
- return 0;
- }
-
- else if ( expire )
- {
- entry.expire = expire;
- return 1;
- }
-
- else if ( entry.expire )
- {
- delete entry.expire;
- return 1;
- }
-
- return 0;
- };
-
- this.getKeys = function ()
- {
- var keys = [],
- key;
-
- for ( key in state )
- if ( this.getKey ( null, key ) )
- keys.push ( key );
-
- return keys;
- };
-
- this.renameKey = function ( keyA, keyB )
- {
- if ( !this.getKey ( null, keyA ) )
- return false;
-
- rev ++;
- state [ keyB ] = state [ keyA ];
- state [ keyB ].rev = rev ++;
- delete state [ keyA ];
-
- this.pub ( this.UPDATE, keyB );
-
- return true;
- };
-
-
- //// Keyspace change event.
-
- this.UPDATE = new STATUS ( "Key value updated." );
-
-
- //// For implementing watch and stuff.
-
- this.getRevision = function ( key )
- {
- this.getKey ( null, key );
- return ( state [ key ] && state [ key ].rev ) || delrev [ key ] || 0;
- };
-
-
- //// Publish / subscribe backend.
-
- this.pub = function ( channel, message )
- {
- if ( !channel && channel !== '' ) throw new Error ( "WOOT! Publishing to a falsy, non-string channel : [" + channel + '] ' + message );
- if ( !message && message !== '' ) throw new Error ( "WOOT! Publishing a falsy, non-string message : [" + channel + '] ' + message );
-
- var i, n = subs.length, sub, x = 0;
- for ( i = 0; i < n; i ++ )
- {
- sub = subs [ i ];
-
- if ( sub.channel === channel || ( sub.pattern !== null && sub.channel ( channel ) ) )
- {
- if ( sub.pattern !== null )
- call.push ( sub.client.pushMessage.bind ( sub.client, 'pmessage', sub.pattern, channel, message ) );
- else
- call.push ( sub.client.pushMessage.bind ( sub.client, 'message', channel, message ) );
-
- x ++;
- if ( !tick )
- {
- tick = true;
- process.nextTick ( function ()
- {
- var c, func;
- tick = false;
- c = call.splice ( 0, call.length );
- while (( func = c.shift () )) func ();
- });
- }
- }
- }
-
- return x;
- };
-
- //// p - true/false
- //// channel - string
- //// client { push ( pattern, channel, message ) }
-
- this.sub = function ( p, channel, client )
- {
- if ( !channel && channel !== '' ) throw new Error ( "WOOT! Subscribing to a falsy, non-string channel : [" + channel + ']' );
- if ( !client || !client.pushMessage ) throw new Error ( "WOOT! Subscribing an invalid client : " + client );
- if ( typeof channel === 'function' ) throw new Error ( "WOOT! Subscribing to a function : " + channel );
-
- var i, n = subs.length, sub, found = false;
- for ( i = 0; i < n; i ++ )
- {
- sub = subs [ i ];
- if ( sub.client === client && ( ( p && sub.pattern === channel ) || ( !p && sub.channel === channel ) ) )
- {
- found = true;
- break;
- }
- }
-
- var x = this.numSubs ( client );
-
- if ( !found )
- {
- x ++;
-
- subs.push ({ pattern : p ? channel : null, channel : p ? pattern ( channel ) : channel, client : client });
- process.nextTick ( client.pushMessage.bind ( client, p ? 'psubscribe' : 'subscribe', channel, x ) );
- }
-
- return x;
- };
-
- this.unsub = function ( p, channel, client )
- {
- if ( !channel && channel !== '' && channel !== null ) throw new Error ( "WOOT! Unsubscribing from a falsy, non-string, non-null channel : [" + channel + ']' );
- if ( !client || !client.pushMessage ) throw new Error ( "WOOT! Unsubscribing an invalid client : " + client );
-
- var x = this.numSubs ( client );
-
- var i, n = subs.length, sub;
- for ( i = 0; i < n; i ++ )
- {
- sub = subs [ i ];
- if ( sub.client !== client )
- continue;
-
- if ( ( p && sub.pattern !== null && ( channel === null || sub.pattern === channel ) ) || ( !p && sub.pattern === null && ( channel === null || sub.channel === channel ) ) )
- {
- x --;
- subs.splice ( i, 1 );
- process.nextTick ( client.pushMessage.bind ( client, p ? 'punsubscribe' : 'unsubscribe', p ? sub.pattern : sub.channel, x ) );
- i --; n --;
- }
- }
-
- return x;
- };
-
- this.numSubs = function ( client )
- {
- var i, n = subs.length, x = 0;
- for ( i = 0; i < n; i ++ )
- if ( subs [ i ].client === client )
- x ++;
-
- return x;
- }
-
-};
-
-
-
- //// Redis commands.
-
-exports.Backend.prototype =
-{
-
-
- //// Keys.
-
- DEL : function ()
- {
- var i, n = arguments.length, x = 0;
- if ( !n ) return BAD_ARGS;
- for ( i = 0; i < n; i ++ )
- if ( this.setKey ( arguments [ i ], null ) ) x ++;
-
- return x;
- },
-
- EXISTS : function ( key )
- {
- return this.getKey ( null, key ) ? 1 : 0;
- },
-
- PEXPIREAT : function ( key, time )
- {
- time = str2int ( time );
- if ( time instanceof ERROR ) return time;
- return this.setExpire ( key, time );
- },
-
- EXPIREAT : function ( key, time )
- {
- time = str2int ( time );
- if ( time instanceof ERROR ) return time;
- return this.setExpire ( key, time * 1000 );
- },
-
- PEXPIRE : function ( key, time )
- {
- time = str2int ( time );
- if ( time instanceof ERROR ) return time;
- return this.setExpire ( key, time + Date.now () );
- },
-
- EXPIRE : function ( key, time )
- {
- time = str2int ( time );
- if ( time instanceof ERROR ) return time;
- return this.setExpire ( key, time * 1000 + Date.now () );
- },
-
- PERSIST : function ( key )
- {
- return this.PEXPIREAT ( key, "0" );
- },
-
- PTTL : function ( key )
- {
- var ttl = this.getExpire ( key );
- if ( ttl ) return ttl - Date.now ();
- else return -1;
- },
-
- RANDOMKEY : function ( key )
- {
- var keys = this.getKeys (), n = keys && keys.length;
- if ( n ) return keys [ Math.floor ( Math.random () * n ) ];
- else return null;
- },
-
- RENAME : function ( key, newkey )
- {
- return this.renameKey ( key, newkey ) ? OK : BAD_KEY;
- },
-
- RENAMENX : function ( key, newkey )
- {
- if ( !this.EXISTS ( key ) ) return BAD_KEY;
- if ( this.EXISTS ( newkey ) ) return 0;
- if ( !this.renameKey ( key, newkey ) ) throw new Error ( "WOOT! Couldn't rename." );
- return 1;
- },
-
- TTL : function ( key )
- {
- var ttl = this.getExpire ( key );
- if ( ttl ) return Math.ceil ( ( ttl - Date.now () ) / 1000 );
- else return -1;
- },
-
- TYPE : function ( key )
- {
- var K = this.getKey ( null, key );
- return K ? K.TYPE : NONE;
- },
-
- KEYS : function ( pat )
- {
- var keys = this.getKeys ().filter ( pattern ( pat ) );
- keys.sort ();
- return keys;
- },
-
-
-
- //// String setters.
-
- SET : function ( key, value )
- {
- var buf = new Buffer ( Buffer.byteLength ( value ) );
- buf.write ( value );
-
- this.setKey ( key, new STRING ( buf ) );
- return OK;
- },
-
- sIncrBy : function ( parse, key, incr )
- {
- var K = this.getKey ( STRING, key, true );
- if ( K instanceof ERROR ) return K;
-
- incr = parse ( incr );
- if ( incr instanceof ERROR ) return incr;
- var value = parse ( K.value.toString () || "0" );
- if ( value instanceof ERROR ) return value;
-
- value = ( value + incr ).toString ();
- var buf = new Buffer ( Buffer.byteLength ( value ) );
- buf.write ( value );
-
- K.value = value;
- this.upsetKey ( key, K );
- return value;
- },
-
- sFit : function ( key, length )
- {
- var K = this.getKey ( STRING, key, true );
- if ( K instanceof ERROR ) return ERROR;
-
- if ( K.value.length < length )
- {
- var buf = new Buffer ( length );
- buf.fill ( 0 );
-
- K.value.copy ( buf );
- K.value = buf;
- }
-
- return K;
- },
-
- SETBIT : function ( key, offset, state )
- {
- var offset = str2int ( offset );
- if ( !( offset > -1 ) ) return BAD_BIT1;
- var state = str2int ( state );
- if ( !( state === 0 || state === 1 ) ) return BAD_BIT2;
-
- var x = Math.floor ( offset / 8 );
- var K = this.sFit ( key, x + 1 );
- if ( K instanceof ERROR ) return K;
-
- var mask = 1 << ( 7 - ( offset % 8 ) );
- var current = K.value [ x ];
- var old = current & mask ? 1 : 0;
-
- if ( state && !old )
- K.value [ x ] = current | mask;
- else if ( !state && old )
- K.value [ x ] = current & ~mask;
-
- this.upsetKey ( key, K );
- return old;
- },
-
- SETRANGE : function ( key, offset, value )
- {
- var offset = str2int ( offset );
- if ( !( offset > -1 ) ) return BAD_BIT1;
-
- var K = this.sFit ( key, offset + Buffer.byteLength ( value ) );
- K.value.write ( value, offset );
-
- this.upsetKey ( key, K );
- return this.STRLEN ( key );
- },
-
- //// String getters.
-
- GET : function ( key )
- {
- var K = this.getKey ( STRING, key );
- if ( K instanceof ERROR ) return K;
- return K ? K.value.toString () : null;
- },
-
- STRLEN : function ( key )
- {
- var K = this.getKey ( STRING, key );
- if ( K instanceof ERROR ) return ERROR;
- return K ? K.value.length : 0;
- },
-
- GETBIT : function ( key, offset )
- {
- var K = this.getKey ( STRING, key );
- if ( K instanceof ERROR ) return ERROR;
-
- var offset = str2int ( offset );
- if ( !( offset > -1 ) ) return BAD_BIT1;
- var x = Math.floor ( offset / 8 );
- if ( !K || K.length < x + 1 ) return 0;
-
- var mask = 1 << ( 7 - ( offset % 8 ) );
- return ( K.value [ x ] & mask ) ? 1 : 0;
- },
-
- GETRANGE : function ( key, start, stop )
- {
- var K = this.getKey ( STRING, key );
- if ( K instanceof ERROR ) return ERROR;
- if ( !K ) return "";
-
- var out = slice ( K.value, start, stop );
- if ( out instanceof ERROR ) return out;
- return out.toString ();
- },
-
- //// String ops.
-
- APPEND : function ( key, value )
- {
- var strlen = this.STRLEN ( key );
- if ( strlen instanceof ERROR ) return strlen;
- return this.SETRANGE ( key, strlen.toString (), value );
- },
-
- DECR : function ( key )
- {
- return this.DECRBY ( key, "1" );
- },
-
- DECRBY : function ( key, decr )
- {
- var value = str2int ( decr );
- if ( value instanceof ERROR ) return value;
- return this.INCRBY ( key, ( - value ).toString () );
- },
-
- GETSET : function ( key, value )
- {
- var old = this.GET ( key );
- if ( old instanceof ERROR ) return old;
- this.SET ( key, value );
- return old;
- },
-
- INCR : function ( key )
- {
- return this.INCRBY ( key, "1" );
- },
-
- INCRBY : function ( key, incr )
- {
- return this.sIncrBy ( str2int, key, incr );
- },
-
- INCRBYFLOAT : function ( key, incr )
- {
- return this.sIncrBy ( str2float, key, incr );
- },
-
- MGET : function ()
- {
- var out = [], i, n = arguments.length;
- if ( !n ) return BAD_ARGS;
-
- for ( i = 0; i < n; i ++ )
- {
- var value = this.GET ( arguments [ i ] );
- out [ i ] = value instanceof ERROR ? null : value;
- }
-
- return out;
- },
-
- MSET : function ()
- {
- var key, value, i, n = arguments.length;
- if ( !n || n % 2 ) return BAD_ARGS;
-
- for ( i = 0; i < n; i += 2 )
- {
- key = arguments [ i ];
- value = arguments [ i + 1 ];
- this.SET ( key, value );
- }
-
- return OK;
- },
-
- MSETNX : function ()
- {
- var i, n = arguments.length;
- for ( i = 0; i < n; i += 2 )
- if ( this.EXISTS ( arguments [ i ] ) ) return 0;
-
- this.MSET.apply ( this, arguments );
- return 1;
- },
-
- PSETEX : function ( key, timediff, value )
- {
- if ( !( str2int ( timediff ) > 0 ) )
- return BAD_SETEX;
-
- this.SET ( key, value );
- this.PEXPIRE ( key, timediff );
- return OK;
- },
-
- SETEX : function ( key, timediff, value )
- {
- if ( !( str2int ( timediff ) > 0 ) )
- return BAD_SETEX;
-
- this.SET ( key, value );
- this.EXPIRE ( key, timediff );
- return OK;
- },
-
- SETNX : function ( key, value )
- {
- if ( this.EXISTS ( key ) ) return 0;
- this.SET ( key, value );
- return 1;
- },
-
-
-
- //// Lists, non-blocking.
-
- lStore : function ( key, values )
- {
- //// Only used in SORT.
-
- if ( values.length )
- return this.setKey ( key, new LIST ( values ) );
- else
- return this.setKey ( key, null );
- },
-
- LINDEX : function ( key, index )
- {
- var K = this.getKey ( LIST, key );
- if ( K instanceof ERROR ) return K;
-
- index = str2int ( index );
- if ( index instanceof ERROR )
- return index;
-
- return ( K && K.value [ index < 0 ? K.value.length + index : index ] ) || null;
- },
-
- upsetList : function ( key, K )
- {
- if ( K.value.length ) this.upsetKey ( key, K );
- else this.setKey ( key, null );
- },
-
- LINSERT : function ( key, relpos, pivot, value )
- {
- var K = this.getKey ( LIST, key ), x;
- if ( K instanceof ERROR ) return K;
-
- relpos = relpos.toUpperCase ();
- if ( relpos !== 'BEFORE' && relpos !== 'AFTER' ) return BAD_SYNTAX;
- if ( !K ) return 0;
- if ( ( x = K.value.indexOf ( pivot ) ) < 0 ) return 0;
-
- K.value.splice ( relpos === 'AFTER' ? x + 1 : x, 0, value );
- this.upsetList ( key, K );
- return 1;
- },
-
- LLEN : function ( key )
- {
- var K = this.getKey ( LIST, key );
- if ( K instanceof ERROR ) return K;
-
- return ( K && K.value && K.value.length ) || 0;
- },
-
- lPopMany : function ( left, keys )
- {
- var K = [], value, i, n = keys.length;
- if ( !n ) return BAD_ARGS;
- for ( i = 0; i < n; i ++ )
- {
- K [ i ] = this.getKey ( LIST, keys [ i ] );
- if ( K [ i ] instanceof ERROR ) return K [ i ];
- }
- for ( i = 0; i < n; i ++ )
- if ( K [ i ] && K [ i ].value && K [ i ].value.length )
- {
- value = left ? K [ i ].value.shift () : K [ i ].value.pop ();
- this.upsetList ( keys [ i ], K [ i ] );
- return [ keys [ i ], value ];
- }
-
- return null;
- },
-
- lPop : function ( left, key )
- {
- var out = this.lPopMany ( left, [ key ] );
- return out && out.length ? out [ 1 ] : out;
- },
-
- LPOP : function ( key )
- {
- return this.lPop ( true, key );
- },
-
- RPOP : function ( key )
- {
- return this.lPop ( false, key );
- },
-
- lPush : function ( left, make, args )
- {
- var i, n = args.length, key = args [ 0 ];
- var K = this.getKey ( LIST, key, make );
- if ( K instanceof ERROR ) return K;
- if ( n < 2 ) return BAD_ARGS;
- if ( !K ) return 0;
-
- if ( left ) for ( i = 1; i < n; i ++ )
- K.value.unshift ( args [ i ] );
- else
- K.value.push.apply ( K.value, args.slice ( 1 ) );
-
- this.upsetList ( key, K );
- return K.value.length;
- },
-
- LPUSH : function ()
- {
- return this.lPush ( true, true, arr ( arguments ) );
- },
-
- LPUSHX : function ()
- {
- return this.lPush ( true, false, arr ( arguments ) );
- },
-
- RPUSH : function ()
- {
- return this.lPush ( false, true, arr ( arguments ) );
- },
-
- RPUSHX : function ()
- {
- return this.lPush ( false, false, arr ( arguments ) );
- },
-
- RPOPLPUSH : function ( source, destination )
- {
- var dest = this.getKey ( LIST, destination );
- if ( dest && dest instanceof ERROR ) return dest;
- var value = this.RPOP ( source );
- if ( value === null || value instanceof ERROR ) return value;
-
- var len = this.LPUSH ( destination, value );
- if ( !len || len instanceof ERROR ) throw new Error ( "WOOT! LPUSH failed in RPOPLPUSH." );
-
- return value;
- },
-
- LRANGE : function ( key, start, stop )
- {
- var K = this.getKey ( LIST, key );
- if ( K instanceof ERROR ) return K;
- if ( !K ) return [];
-
- return slice ( K.value, start, stop );
- },
-
- LREM : function ( key, count, value )
- {
- var K = this.getKey ( LIST, key );
- if ( K instanceof ERROR ) return K;
- var count = str2int ( count );
- if ( count instanceof ERROR ) return count;
- if( !K ) return 0;
-
- var i, n = K.value.length, x = 0;
- if ( count < 0 )
- {
- count *= -1;
- for ( i = n - 1; i >= 0; i -- )
- if ( K.value [ i ] === value && (!count || x < count) )
- {
- K.value.splice ( i, 1 );
- x ++;
- }
- }
- else for ( i = 0; i < n; i ++ )
- if ( K.value [ i ] === value && (!count || x < count) )
- {
- K.value.splice ( i, 1 );
- i --; n --; x ++;
- }
-
- if ( x > 0 ) this.upsetList ( key, K );
- return x;
- },
-
- LSET : function ( key, index, value )
- {
- var K = this.getKey ( LIST, key );
- if ( !K ) return BAD_KEY;
- if ( K instanceof ERROR ) return K;
- var index = str2int ( index );
- if ( index instanceof ERROR ) return index;
- if ( index < 0 || index > K.value.length ) return BAD_INDEX;
-
- K.value [ index ] = value;
- this.upsetList ( key, K );
- return OK;
- },
-
- LTRIM : function ( key, start, stop )
- {
- var range = this.LRANGE ( key, start, stop );
- if ( !range.join )
- return range;
-
- var K = this.getKey ( LIST, key );
- if ( K )
- {
- K.value = range;
- this.upsetList ( key, K );
- }
-
- return OK;
- },
-
- //// Blocking list commands.
- //// The blocking part happens at the connection level,
- //// where in case the response is null the connection subscribes to the keyspace change event for the key and waits to retry.
-
- //// So this only validates the parameter.
-
- bArgs : function ( args )
- {
- args = arr ( args );
- var timeout = str2int ( args.pop () || "FAIL" );
- if ( timeout instanceof ERROR ) return timeout;
- if ( timeout < 0 ) return BAD_INT;
- return args;
- },
-
- BLPOP : function ()
- {
- var a = this.bArgs ( arguments );
- if ( a instanceof ERROR ) return a;
- return this.lPopMany ( true, a );
- },
-
- BRPOP : function ()
- {
- var a = this.bArgs ( arguments );
- if ( a instanceof ERROR ) return a;
- return this.lPopMany ( false, a );
- },
-
- BRPOPLPUSH : function ()
- {
- var a = this.bArgs ( arguments );
- if ( a instanceof ERROR ) return a;
- return this.RPOPLPUSH.apply ( this, a );
- },
-
-
-
- //// Hashes.
-
- structPut : function ( type, validate, revArgs, args )
- {
- var key = args [ 0 ], i, n = args.length, x = 0;
-
- if ( n < 3 || ( ( n - 1 ) % 2 ) ) return BAD_ARGS;
- var K = this.getKey ( type, key, true );
- if ( K instanceof ERROR ) return K;
-
- for ( i = 1; i < n; i += 2 )
- {
- var member = args [ revArgs ? i + 1 : i ],
- value = validate ( args [ revArgs ? i : i + 1 ] );
- if ( value instanceof ERROR ) return value;
- if ( !( member in K.value ) ) x ++;
- K.value [ member ] = value;
- }
-
- if ( x ) this.upsetKey ( key, K );
- return x;
- },
-
- structDel : function ( type, args )
- {
- var key = args [ 0 ],
- i, n = args.length,
- x;
-
- if ( n < 2 ) return BAD_ARGS;
- var K = this.getKey ( type, key );
- if ( K instanceof ERROR ) return K;
- if ( !K ) return 0;
-
- x = 0;
- for ( i = 1; i < n; i ++ )
- {
- if ( args [ i ] in K.value ) x ++;
- delete K.value [ args [ i ] ];
- }
-
- //// Remove the set if empty, upset otherwise.
-
- var member;
- for ( member in K.value )
- {
- if ( x ) this.upsetKey ( key, K );
- return x;
- }
-
- this.setKey ( key, null );
- return x;
- },
-
- structGet : function ( type, key, member )
- {
- var K = this.getKey ( type, key );
- if ( K instanceof ERROR ) return K;
- if ( !K || !( member in K.value ) ) return null;
- return K.value [ member ];
- },
-
- HDEL : function ()
- {
- return this.structDel ( HASH, arguments );
- },
-
- HEXISTS : function ( key, field )
- {
- var fields = this.HKEYS ( key );
- if ( fields.indexOf ) return fields.indexOf ( field ) >= 0 ? 1 : 0;
- return fields;
- },
-
- HGET : function ( key, field )
- {
- return this.structGet ( HASH, key, field );
- },
-
- HGETALL : function ( key )
- {
- var fields = this.HKEYS ( key );
- var i, n = fields.length, out = [];
- for ( i = 0; i < n; i ++ )
- out.push ( fields [ i ], this.HGET ( key, fields [ i ] ) );
-
- return out;
- },
-
- hIncrBy : function ( parse, key, field, incr )
- {
- var K = this.getKey ( HASH, key, true );
- if ( K instanceof ERROR ) return K;
-
- incr = parse ( incr );
- if ( incr instanceof ERROR ) return incr;
- var value = parse ( K.value [ field ] || "0" );
- if ( value instanceof ERROR ) return value;
-
- K.value [ field ] = ( value + incr ).toString ();
- this.upsetKey ( key, K );
- return K.value [ field ];
- },
-
- HINCRBY : function ( key, field, incr )
- {
- return this.hIncrBy ( str2int, key, field, incr );
- },
-
- HINCRBYFLOAT : function ( key, field, incr )
- {
- return this.hIncrBy ( str2float, key, field, incr );
- },
-
- HKEYS : function ( key )
- {
- var K = this.getKey ( HASH, key );
- if ( K instanceof ERROR ) return K;
-
- var fields = [], field;
- if ( K ) for ( field in K.value )
- fields.push ( field );
-
- fields.sort ();
- return fields;
- },
-
- HLEN : function ( key )
- {
- var fields = this.HKEYS ( key );
- if ( fields.indexOf ) return fields.length;
- return fields;
- },
-
- HMGET : function ()
- {
- var K = this.getKey ( HASH, arguments [ 0 ] );
- if ( K instanceof ERROR ) return K;
-
- var i, n = arguments.length, values = [];
- if ( n < 2 ) return BAD_ARGS;
- for ( i = 1; i < n; i ++ )
- values.push ( K && arguments [ i ] in K.value ? K.value [ arguments [ i ] ] : null );
-
- return values;
- },
-
- HMSET : function ()
- {
- var x = this.structPut ( HASH, String, false, arguments );
- return x instanceof ERROR ? x : OK;
- },
-
- HSET : function ( key, field, value )
- {
- return this.structPut ( HASH, String, false, arguments );
- },
-
- HSETNX : function ( key, field, value )
- {
- var exists = this.HEXISTS ( key, field );
- if ( exists instanceof ERROR ) return exists;
- if ( exists ) return 0;
- return this.HSET ( key, field, value );
- },
-
- HVALS : function ( key )
- {
- var out = this.HKEYS ( key ), self = this;
- if ( out instanceof ERROR ) return out;
-
- if ( out.map )
- out = out.map ( function ( field )
- {
- return self.HGET ( key, field );
- });
-
- out.sort ();
- return out;
- },
-
-
-
- //// Sets.
-
- SADD : function ()
- {
- var key = arguments [ 0 ],
- i, n = arguments.length,
- x = 0;
-
- if ( n < 2 ) return BAD_ARGS;
- var K = this.getKey ( SET, key, true );
- if ( K instanceof ERROR ) return K;
-
- for ( i = 1; i < n; i ++ )
- if ( !K.value [ arguments [ i ] ] )
- {
- K.value [ arguments [ i ] ] = true;
- x ++;
- }
-
- if ( x ) this.upsetKey ( key, K );
- return x;
- },
-
- SCARD : function ( key )
- {
- var members = this.SMEMBERS ( key );
- return members.join ? members.length : members;
- },
-
- SISMEMBER : function ( key, member )
- {
- var members = this.SMEMBERS ( key );
- return members.indexOf ? members.indexOf ( member ) >= 0 ? 1 : 0 : members;
- },
-
- SMEMBERS : function ( key )
- {
- return this.SUNION ( key );
- },
-
- SPOP : function ( key )
- {
- var member = this.SRANDMEMBER ( key );
- if ( typeof member === 'string' )
- this.SREM ( key, member );
-
- return member;
- },
-
- SRANDMEMBER : function ( key )
- {
- var members = this.SMEMBERS ( key ),
- n = members.length, member;
- if ( !n )
- return n === 0 ? null : members;
-
- member = members [ Math.floor ( Math.random () * n ) ];
- return member;
- },
-
- SREM : function ()
- {
- return this.structDel ( SET, arguments );
- },
-
- //// Set multikey ops.
- //// Set members come out sorted lexicographically to facilitate testing.
-
- SMOVE : function ( source, destination, member )
- {
- var removed = this.SREM ( source, member );
- if ( removed === 1 )
- return this.SADD ( destination, member );
- else
- return removed;
- },
-
- SUNION : function ()
- {
- var i, n = arguments.length, out = [];
- if ( !n ) return BAD_ARGS;
-
- for ( i = 0; i < n; i ++ )
- {
- var K = this.getKey ( SET, arguments [ i ] );
- if ( K instanceof ERROR ) return K;
-
- var member;
- if ( K ) for ( member in K.value )
- if ( out.indexOf ( member ) < 0 )
- out.push ( member );
- }
-
- out.sort ();
- return out;
- },
-
- sCombine : function ( diff, args )
- {
- var i, n = args.length;
- if ( !n )
- return BAD_ARGS;
-
- var out = this.SUNION ( args [ 0 ] );
- if ( out instanceof ERROR ) return out;
- for ( i = 1; i < n; i ++ )
- {
- var K = this.getKey ( SET, args [ i ] );
- if ( K instanceof ERROR ) return K;
-
- var j, m = out.length;
- if ( K ) for ( j = 0; j < m; j ++ )
- if ( ( diff && K.value [ out [ j ] ] ) || ( !diff && !K.value [ out [ j ] ] ) )
- {
- out.splice ( j, 1 );
- j --;
- m --;
- }
- }
-
- out.sort ();
- return out;
- },
-
- SDIFF : function ()
- {
- return this.sCombine ( true, arr ( arguments ) );
- },
-
- SINTER : function ()
- {
- return this.sCombine ( false, arr ( arguments ) );
- },
-
- sStore : function ( key, members )
- {
- var K, i, n = members.length;
- if ( n ) K = new SET ({});
- for ( i = 0; i < n; i ++ )
- K.value [ members [ i ] ] = true;
-
- return this.setKey ( key, K || null );
- },
-
- sStoreOp : function ( op, args )
- {
- if ( !args.length )
- return BAD_ARGS;
-
- var key = args.shift (),
- members = op.apply ( this, args );
-
- if ( members.join )
- {
- this.sStore ( key, members );
- return members.length;
- }
-
- return members;
- },
-
- SDIFFSTORE : function ()
- {
- return this.sStoreOp ( this.SDIFF, arr ( arguments ) );
- },
-
- SINTERSTORE : function ()
- {
- return this.sStoreOp ( this.SINTER, arr ( arguments ) );
- },
-
- SUNIONSTORE : function ()
- {
- return this.sStoreOp ( this.SUNION, arr ( arguments ) );
- },
-
-
-
- //// Sorted sets.
-
- ZADD : function ()
- {
- return this.structPut ( ZSET, str2float, true, arguments );
- },
-
- ZCARD : function ( key )
- {
- return this.ZCOUNT ( key, '-inf', '+inf' );
- },
-
- ZCOUNT : function ( key, min, max )
- {
- var members = this.ZRANGEBYSCORE ( key, min, max );
- return members.join ? members.length : members;
- },
-
- ZINCRBY : function ( key, incr, member )
- {
- var K = this.getKey ( ZSET, key, true );
- if ( K instanceof ERROR ) return K;
-
- var value = str2float ( incr );
- if ( value instanceof ERROR ) return value;
- value += Number ( K.value [ member ] || 0 );
-
- K.value [ member ] = value;
- this.upsetKey ( key, K );
- return value;
- },
-
- //// Sort set queries.
-
- zSort : function ( rev, key, min, max )
- {
- var K = this.getKey ( ZSET, key );
- if ( K instanceof ERROR ) return K;
- if ( !K ) return [];
-
- var R = range ( min, max ), member, out = [];
- if ( R instanceof ERROR ) return R;
-
- for ( member in K.value )
- if ( R ( K.value [ member ] ) )
- out.push ({ member : member, score : K.value [ member ] });
-
- //// First by score,
- //// then in lexicographic order.
-
- if ( rev )
- out.sort ( function ( b, a )
- {
- return ( a.score - b.score ) || ( a.member < b.member ? -1 : 1 );
- });
-
- else
- out.sort ( function ( a, b )
- {
- return ( a.score - b.score ) || ( a.member < b.member ? -1 : 1 );
- });
-
- return out;
- },
-
- zUnwrap : function ( range, scores )
- {
- var i, n = range.length, out = n ? [] : range;
- if ( n )
- for ( i = 0; i < n; i ++ )
- {
- out.push ( range [ i ].member );
- if ( scores )
- out.push ( range [ i ].score );
- }
-
- return out;
- },
-
- zGetRange : function ( rev, args )
- {
- var key = args [ 0 ], start = args [ 1 ], stop = args [ 2 ], scores = args [ 3 ];
-
- if ( args.length < 3 || args.length > 4 )
- return BAD_ARGS;
- if ( scores && scores.toUpperCase () !== 'WITHSCORES' )
- return BAD_SYNTAX;
-
- var range = this.zSort ( rev, key, '-inf', '+inf' );
-
- return this.zUnwrap ( slice ( range, start, stop ), scores );
- },
-
- zGetRangeByScore : function ( rev, args )
- {
- var key = args [ 0 ], min = args [ rev ? 2 : 1 ], max = args [ rev ? 1 : 2 ],
- scores, limit, offset, count;
-
- if ( args.length < 3 )
- return BAD_ARGS;
-
- else if ( args.length === 4 )
- scores = args [ 3 ];
-
- else if ( args.length === 6 )
- {
- limit = args [ 3 ];
- offset = args [ 4 ];
- count = args [ 5 ];
- }
-
- else if ( args.length === 7 )
- {
- scores = args [ 3 ];
- limit = args [ 4 ];
- offset = args [ 5 ];
- count = args [ 6 ];
- }
-
- if ( scores && scores.toUpperCase () !== 'WITHSCORES' )
- return BAD_SYNTAX;
- if ( limit && limit.toUpperCase () !== 'LIMIT' )
- return BAD_SYNTAX;
-
- var range = this.zSort ( rev, key, min, max );
- if ( limit )
- range = slice ( range, offset, count, true );
-
- return this.zUnwrap ( range, scores );
- },
-
- ZRANGE : function ()
- {
- return this.zGetRange ( false, arr ( arguments ) );
- },
-
- ZREVRANGE : function ()
- {
- return this.zGetRange ( true, arr ( arguments ) );
- },
-
- ZRANGEBYSCORE : function ()
- {
- return this.zGetRangeByScore ( false, arr ( arguments ) );
- },
-
- ZREVRANGEBYSCORE : function ()
- {
- return this.zGetRangeByScore ( true, arr ( arguments ) );
- },
-
- ZRANK : function ( key, member )
- {
- var out = this.zSort ( false, key, '-inf', '+inf' ),
- i, n = out.length;
-
- for ( i = 0; i < n; i ++ )
- if ( out [ i ].member === member )
- return i;
-
- return n || n === 0 ? null : out;
- },
-
- ZREVRANK : function ( key, member )
- {
- var out = this.zSort ( false, key, '-inf', '+inf' ),
- i, n = out.length;
-
- for ( i = n - 1; i >= 0; i -- )
- if ( out [ i ].member === member )
- return n - i - 1;
-
- return n || n === 0 ? null : out;
- },
-
- ZSCORE : function ( key, member )
- {
- return this.structGet ( ZSET, key, member );
- },
-
- ZREM : function ()
- {
- return this.structDel ( ZSET, arguments );
- },
-
- ZREMRANGEBYRANK : function ( key, start, stop )
- {
- var members = this.ZRANGE ( key, start, stop ), n = members.length;
- if ( n )
- n = this.ZREM.apply ( this, [ key ].concat ( members ) );
-
- return n || n === 0 ? n : members;
- },
-
- ZREMRANGEBYSCORE : function ( key, min, max )
- {
- var members = this.ZRANGEBYSCORE ( key, min, max ), n = members.length;
- if ( n )
- n = this.ZREM.apply ( this, [ key ].concat ( members ) );
-
- return n || n === 0 ? n : members;
- },
-
- //// Sorted set multikey ops.
-
- zOpStore : function ( union, key, keys, weights, aggregate )
- {
- var K = this.getKey ( ZSET, keys [ 0 ] );
- if ( K instanceof ERROR ) return K;
-
- var out = {}, member, x = 0, weight = ( weights === null ? 1 : weights [ 0 ] );
- if ( K ) for ( member in K.value )
- {
- out [ member ] = K.value [ member ] * weight;
- x ++;
- }
-
- var i, n = keys.length;
- for ( i = 1; i < n; i ++ )
- {
- K = this.getKey ( ZSET, keys [ i ] );
- if ( K instanceof ERROR ) return K;
-
- weight = ( weights !== null ? weights [ i ] : 1 );
- if ( !union )
- {
- if ( !K )
- {
- out = {};
- x = 0;
- }
-
- else for ( member in out ) if ( !( member in K.value ) )
- {
- delete out [ member ];
- x --;
- }
- }
-
- if ( K ) for ( member in K.value )
- if ( union || member in out )
- {
- if ( !( member in out ) )
- {
- x ++;
- out [ member ] = K.value [ member ] * weight;
- }
-
- else
- out [ member ] = aggregate ( K.value [ member ] * weight, out [ member ] );
- }
- }
-
- if ( x ) this.setKey ( key, new ZSET ( out ) );
- return x;
- },
-
- zsum : function ( a, b ) { return a + b; },
- zmin : function ( a, b ) { return a < b ? a : b; },
- zmax : function ( a, b ) { return a > b ? a : b; },
-
- zParseOpStore : function ( union, args )
- {
- var key = args [ 0 ], N = str2int ( args [ 1 ] );
- if ( N instanceof ERROR ) return N;
- if ( N < 1 ) return BAD_ZUIS;
- if ( args.length < N + 2 ) return BAD_ARGS;
-
- var keys = args.splice ( 2, N ), weigh = ( args [ 2 ] || '' ).toUpperCase () === 'WEIGHTS', weights;
- if ( weigh )
- {
- if ( args.length < N + 3 ) return BAD_ARGS;
- weights = args.splice ( 3, N );
- if ( weights.map ( str2float ).some ( function ( w ) { return w instanceof ERROR; } ) ) return BAD_FLOAT;
- args.splice ( 2, 1 );
- }
-
- var aggregate = ( args [ 2 ] || '' ).toUpperCase () === 'AGGREGATE' ? ( args [ 3 ] || '' ).toLowerCase () : null;
- if ( aggregate )
- {
- if ( aggregate !== 'sum' && aggregate !== 'min' && aggregate !== 'max' ) return BAD_SYNTAX;
- aggregate = this [ 'z' + aggregate ];
- if ( typeof aggregate !== 'function' )
- throw new Error ( "WOOT! Can't find the aggregate function for " + args [ 3 ] );
- args.splice ( 2, 2 );
- }
-
- if ( args.length !== 2 )
- return BAD_ARGS;
-
- return this.zOpStore ( union, key, keys, weights || null, aggregate || this.zsum );
- },
-
- ZINTERSTORE : function ()
- {
- return this.zParseOpStore ( false, arr ( arguments ) );
- },
-
- ZUNIONSTORE : function ()
- {
- return this.zParseOpStore ( true, arr ( arguments ) );
- },
-
-
-
- //// Sort.
-
- sortSelect : function ( pat, key )
- {
- var select = /^((?:.)*?)(?:->(.*))?$/.exec ( pat ),
- key = select [ 1 ].replace ( /\*/, key ), // no g flag, so only first occurence is replaced
- field = select [ 2 ];
-
- if ( typeof field === 'string' )
- return this.HGET ( key, field );
- else
- return this.GET ( key );
- },
-
- SORT : function ()
- {
- var self = this, args = arr ( arguments ), n = args.length;
- if ( !n ) return new BAD_ARGS;
-
- //// Parse.
- //// SORT key [BY pattern] [LIMIT offset count] [GET pattern [GET pattern ...]] [ASC|DESC] [ALPHA] [STORE destination]
-
- var key = args.shift (),
- by, limit, offset, count, get, pat, desc, alpha, store;
-
- if ( /^by$/i.test ( args [ 0 ] ) )
- {
- by = args [ 1 ];
- if ( typeof by !== 'string' ) return BAD_SYNTAX;
- args.splice ( 0, 2 );
- }
-
- if ( /^limit$/i.test ( args [ 0 ] ) )
- {
- limit = true;
- if ( args.length < 3 ) return BAD_ARGS;
- offset = args [ 1 ]; // integer validation happens in slice()
- count = args [ 2 ];
- args.splice ( 0, 3 );
- }
-
- while ( /^get$/i.test ( args [ 0 ] ) )
- {
- pat = args [ 1 ];
- if ( typeof pat !== 'string' ) return BAD_SYNTAX;
- if ( !get ) get = [];
- get.push ( pat );
- args.splice ( 0, 2 );
- }
-
- if ( /^asc|desc$/i.test ( args [ 0 ] ) )
- {
- desc = /^desc$/i.test ( args [ 0 ] );
- args.splice ( 0, 1 );
- }
-
- if ( /^alpha$/i.test ( args [ 0 ] ) )
- {
- alpha = true;
- args.splice ( 0, 1 );
- }
-
- if ( /^store$/i.test ( args [ 0 ] ) )
- {
- store = args [ 1 ];
- if ( typeof store !== 'string' ) return BAD_SYNTAX;
- args.splice ( 0, 2 );
- }
-
- //// Redis appears to accept params in any order,
- //// needs some tests before allowing this here.
-
- if ( args.length ) return BAD_SYNTAX;
-
- //// Collect data.
-
- var type = this.TYPE ( key ), data, scoreFail = false;
-
- if ( type === NONE )
- data = [];
- else if ( type === LIST )
- data = this.LRANGE ( key, '0', '-1' );
- else if ( type === SET )
- data = this.SMEMBERS ( key );
- else if ( type === ZSET )
- data = this.ZRANGE ( key, '0', '-1' );
- else
- return BAD_TYPE;
-
- data = data.map ( function ( id )
- {
- var entry = { id : id };
- if ( by )
- {
- entry.by = self.sortSelect ( by, id );
- if ( !alpha )
- entry.num = str2float ( entry.by || '0' );
- }
- else if ( !alpha )
- entry.num = str2float ( id );
- else
- entry.num = 0;
-
- if ( entry.num instanceof ERROR )
- scoreFail = true;
-
- if ( get )
- entry.get = get.map ( function ( get )
- {
- if ( get === '#' ) return id;
- return self.sortSelect ( get, id );
- });
-
- return entry;
- });
-
- if ( scoreFail ) return BAD_SORT;
-
- //// Sort.
-
- data.sort ( function ( a, b )
- {
- var d = a.num - b.num;
- if ( !d && by ) d = a.by < b.by ? -1 : a.by > b.by ? 1 : 0;
- if ( !d ) d = a.id < b.id ? -1 : a.id > b.id ? 1 : 0;
- return desc ? -d : d;
- });
-
- //// Limit.
-
- if ( parseInt ( offset ) < 0 )
- offset = '0'; // SORT treats negative offset limit differently from other redis commands.
-
- if ( limit ) data = slice ( data, offset, count, true );
-
- //// Format.
-
- var out = [], i;
- n = data.length;
- for ( i = 0; i < n; i ++ )
- {
- if ( get ) out.push.apply ( out, data [ i ].get );
- else out [ i ] = data [ i ].id;
- }
-
- //// Store or return.
-
- if ( store )
- {
- this.lStore ( store, out );
- return this.LLEN ( store );
- }
- else
- return out;
- },
-
-
-
- //// Pubsub.
-
- PUBLISH : function ( channel, message )
- {
- return this.pub ( channel, message );
- },
-
-
-
- //// Connection.
- //// Quit and select could be implemented on the connection object.
-
- PING : function ()
- {
- if ( arguments.length )
- return BAD_ARGS;
-
- return PONG;
- },
-
- ECHO : function ( message )
- {
- return message;
- },
-
-
-
- //// Server.
- //// FLUSHALL can be implemented on the connection object.
-
- DBSIZE : function ()
- {
- return this.getKeys ().length;
- },
-
- FLUSHDB : function ()
- {
- var keys = this.getKeys (), i, n = keys.length;
- for ( i = 0; i < n; i ++ )
- this.setKey ( keys [ i ], null );
-
- return OK;
- },
-
- TIME : function ()
- {
- var time = Date.now (),
- sec = Math.round ( time / 1000 ),
- msec = ( time % 1000 ) * 1000 + Math.floor ( Math.random () * 1000 );
-
- return [ sec, msec ];
- },
-
-
-
- //// Helper commands.
-/*
- FAKE_MISS : function ()
- {
- var implemented = this;
-
- return require ( "../lib/commands" ).filter ( function ( command )
- {
- return !( command.toUpperCase () in implemented );
- });
- },
-
- FAKE_AVAIL : function ()
- {
- var implemented = this;
-
- return require ( "../lib/commands" ).filter ( function ( command )
- {
- return ( command.toUpperCase () in implemented );
- });
- },
-*/
- FAKE_DUMP : function ( pattern )
- {
- var keys = this.KEYS ( pattern ), i, n = keys.length, out = [], key, type;
-
- for ( i = 0; i < n; i ++ )
- {
- key = keys [ i ];
- type = this.TYPE ( key );
- out.push ( key, this.TTL ( key ), type.getStatus () );
-
- if ( type === STRING )
- out.push ( this.GET ( key ) );
- else if ( type === LIST )
- out.push ( this.LRANGE ( key, '0', '-1' ) );
- else if ( type === HASH )
- out.push ( this.HGETALL ( key ) );
- else if ( type === SET )
- out.push ( this.SMEMBERS ( key ) );
- else if ( type === ZSET )
- out.push ( this.ZRANGE ( key, '0', '-1', 'withscores' ) );
- else
- throw new Error ( "WOOT! Key type is " + type );
- }
-
- return out;
- }
-};
-
-
-
- //// These don't have an effect on the dataset, so dummies are safe for tests.
-
-exports.Backend.prototype.AUTH =
-exports.Backend.prototype.BGREWRITEAOF =
-exports.Backend.prototype.SAVE =
-exports.Backend.prototype.BGSAVE = function () { return OK; };
-
-
-
- //// All of these are implemented at the connection level.
-
-exports.Backend.prototype.QUIT =
-
-exports.Backend.prototype.SUBSCRIBE =
-exports.Backend.prototype.PSUBSCRIBE =
-exports.Backend.prototype.UNSUBSCRIBE =
-exports.Backend.prototype.PUNSUBSCRIBE =
-
-exports.Backend.prototype.MULTI =
-exports.Backend.prototype.EXEC =
-exports.Backend.prototype.WATCH =
-exports.Backend.prototype.UNWATCH =
-exports.Backend.prototype.SELECT =
-exports.Backend.prototype.DISCARD = function () { throw new Error ( "WOOT! This command shouldn't have reached the backend." ); };
-
-
-
diff --git a/node_modules/fakeredis/lib/connection.js b/node_modules/fakeredis/lib/connection.js
deleted file mode 100644
index 4a10d3be..00000000
--- a/node_modules/fakeredis/lib/connection.js
+++ /dev/null
@@ -1,542 +0,0 @@
-"use strict";
-
-
-exports.Connection = function ( backend, minLatency, maxLatency )
-{
- var connection = this,
- db = 0,
-
- queue,
- watch,
- block,
-
- timeout = 0,
- state = NORMAL,
- subs = 0;
-
-
- this.push = function ( client, command, args, callback )
- {
- state ( client, prep ( command, args, callback ) );
- };
-
-
- //// Push a command to a normal connection.
-
- function NORMAL ( client, entry )
- {
- var i, n, matches;
-
-
- //// Transactions.
-
- if ( entry.command === "WATCH" )
- {
- entry.override = function ()
- {
- var i, n = entry.args.length;
- if ( !watch )
- watch = {};
- for ( i = 0; i < n; i ++ )
- if ( !( entry.args [ i ] in watch ) )
- watch [ entry.args [ i ] ] = backend.getRevision ( entry.args [ i ] );
-
- return "OK";
- };
- }
-
- else if ( entry.command === "UNWATCH" )
- {
- entry.override = function ()
- {
- watch = null;
- return "OK";
- };
- }
-
- else if ( entry.command === "DISCARD" )
- {
- if ( queue )
- {
- if ( !timeout )
- timeout = setTimeout ( exec, randLat () );
-
- for ( i = 0; i < queue.length; i ++ )
- if ( queue [ i ].command === "MULTI" )
- {
- queue.splice ( i, queue.length );
-
- //// This will substitute the DISCARD command with an UNWATCH,
- //// hence the recursive call to this.push.
-
- return this.push ( [ "UNWATCH" ], entry.callback );
- }
- }
-
- entry.override = function () { return "OK"; };
- }
-
- else if ( entry.command === "MULTI" )
- {
- entry.override = function ( queue )
- {
- if ( !queue ) throw new Error ( 'WOOT! no queue.' );
- var w = watch, key, entry, x = 0;
- watch = null;
- if ( w ) for ( key in w )
- if ( backend.getRevision ( key ) !== w [ key ] )
- {
- //// Abort because of a change in the watched keyspace.
-
- n = 0;
- while (( entry = queue.shift () ))
- {
- if ( entry.command === "EXEC" )
- {
- entry.override = function ()
- {
- var i, out = [];
- for ( i = 0; i < n; i ++ )
- out [ i ] = null;
-
- return out;
- };
-
- queue.unshift ( entry );
- break;
- }
-
- n ++;
- }
-
- return "OK";
- }
-
- var replies = [];
- var i, n = queue.length, cb = pushReply.bind ( replies );
- for ( i = 0; i < n; i ++ )
- {
- entry = queue [ i ];
- if ( entry.command !== "EXEC" )
- {
- //// Collect replies for the EXEC output.
-
- entry.callback = cb;
-
- //// Prevent blocking within a transaction.
-
- delete entry.block;
- }
-
- else
- {
- //// Exec calls back with the entire reply list.
-
- entry.override = entry.override.bind ( replies );
- return "OK";
- }
- }
-
- throw new Error ( "WOOT! Can't find the EXEC command in the queue." );
- };
-
- //// Prevent flushing before the exec.
-
- if ( timeout )
- {
- clearTimeout ( timeout );
- timeout = 0;
- }
-
- if ( queue )
- queue.push ( entry );
- else
- queue = [ entry ];
-
- return;
- }
-
- else if ( entry.command === "EXEC" )
- {
- entry.override = function ()
- {
- return this.join ? this : null;
- };
-
- if ( queue && !timeout )
- timeout = setTimeout ( exec, randLat () );
- }
-
-
- //// Pubsub.
-
- if (( matches = /^(P)?(UN)?SUBSCRIBE$/.exec ( entry.command ) ))
- {
- if( !client.$PUSHDELAY )
- client.$PUSHDELAY = new Delay ( client, 'pushMessage', minLatency );
-
- entry.override = function ()
- {
- var i, n = entry.args.length;
-
- if ( n ) for ( i = 0; i < n; i ++ )
- {
- //// Unsubscribe.
-
- if ( matches [ 2 ] )
- subs = backend.unsub ( matches [ 1 ] ? true : false, entry.args [ i ], client.$PUSHDELAY );
-
- //// Subscribe.
-
- else
- subs = backend.sub ( matches [ 1 ] ? true : false, entry.args [ i ], client.$PUSHDELAY );
- }
-
- else if ( matches [ 2 ] )
- {
- //// Unsubscribe from all.
-
- subs = backend.unsub ( matches [ 1 ] ? true : false, null, client.$PUSHDELAY );
- }
-
- else
- return new Error ( 'Wrong number of arguments for \'' + matches [ 0 ] + '\' command' );
-
- if ( !subs )
- state = NORMAL;
-
- return "OK";
- };
-
- if ( !matches [ 2 ] )
- state = SUBSCRIBED;
- }
-
-
- //// Connection.
-
- if ( entry.command === 'QUIT' )
- {
- entry.override = function ()
- {
- if ( client.$PUSHDELAY )
- {
- //// Unsubscribe.
-
- backend.unsub ( true, null, client.$PUSHDELAY );
- backend.unsub ( false, null, client.$PUSHDELAY );
- }
-
- return "OK";
- };
-
- state = CLOSED;
- }
-
- else if (entry.command === 'SELECT')
- {
- entry.override = function()
- {
- var n = entry.args.length;
- if (n !== 1)
- return new Error("Wrong number of arguments for 'SELECT' command.");
- var id = Number(entry.args[0]);
- if ((!id && id !== 0) || id % 1 !== 0 || id < 0)
- return new Error("invalid DB index");
-
- db = id;
- backend.selectDB(db);
- return "OK";
- }
- }
-
-
- //// Regular commands.
-
- if ( queue )
- queue.push ( entry );
-
- else
- {
- queue = [ entry ];
- timeout = setTimeout ( exec, randLat () );
- }
- };
-
-
- //// Push a command to a subscribed connection.
-
- function SUBSCRIBED ( client, entry )
- {
-
- //// Allow commands that modify the subscription set.
-
- if ( /SUBSCRIBE|^QUIT/.test ( entry.command ) )
- NORMAL ( client, entry );
- else
- throw new Error ( "fakeredis: Connection is in pub/sub mode (" + subs + " subscriptions)." );
- }
-
-
- //// Closed connection.
-
- function CLOSED ( client, entry )
- {
- throw new Error ( "fakeredis: You've closed this connection with QUIT, cannot " + entry.command );
- }
-
-
- //// Blocked connection.
-
- function BLOCKED ( client, entry )
- {
- if ( !block )
- block = [ client, entry ];
- else
- block.push ( client, entry );
- }
-
-
- //// Execute everything in the queue sequentially.
-
- function exec ()
- {
- timeout = 0;
- var q = queue, entry, func, out, err, data, resp = [];
- queue = null;
-
- if ( connection.verbose )
- console.log ( '\n' );
-
- backend.selectDB(db);
-
- if ( q ) while (( entry = q.shift () ))
- {
- if ( entry === 'SKIP' )
- continue;
-
- func = backend [ entry.command ];
- out = null;
-
- if ( connection.verbose )
- console.log ( "fakeredis>", entry.command, entry.args.join ( ' ' ) );
-
- if ( entry.override )
- {
- out = entry.override ( q );
- err = out instanceof Error ? out : null;
- data = out instanceof Error ? null : out;
- }
-
- else if ( !func || typeof func !== 'function' )
- throw new Error ( 'WOOT! Wierd queue entry : ' + JSON.stringify ( entry ) + ' / ' + JSON.stringify ( q ) );
-
- else if ( func.length && func.length !== entry.args.length )
- {
- err = new Error ( 'Wrong number of arguments for \'' + entry.command.toLowerCase () + '\' command' );
- data = null;
- }
-
- else
- {
- out = func.apply ( backend, entry.args );
- err = ( ( out && out.getError ) || null ) && new Error ( out.getError () );
- data = err ? null : ( out && out.getStatus && out.getStatus () ) || out;
-
- //// Block if necessary.
-
- if ( entry.block && err === null && data === null )
- {
- if ( resp.length )
- flush ( resp );
-
- q.unshift ( entry );
- queue = q;
- state = BLOCKED;
- backend.sub ( false, backend.UPDATE, connection );
-
- if ( entry.block && typeof entry.block === 'number' )
- setTimeout ( unblock.bind ( null, entry ), entry.block * 1000 );
-
- return;
- }
- }
-
- if ( !err && !data && typeof out === "undefined" )
- throw new Error ( "WOOT! Backend returned undefined." );
- if ( out && out.rev )
- throw new Error ( "WOOT! Returning the whole keyspace entry." );
-
- if ( data === true )
- throw new Error ( "TRUE THAT! " + JSON.stringify ( entry ) );
-
- data = fdata ( data );
- if ( entry.callback )
- resp.push ( entry.callback.bind ( null, err, data ) );
- }
-
- if ( connection.verbose )
- console.log ( '\n' );
-
- if ( resp.length )
- flush ( resp );
- }
-
- function flush ( resp )
- {
- setTimeout
- (
- function ()
- {
- var i, n;
-
- n = resp.length;
- for ( i = 0; i < n; i ++ )
- resp [ i ] ();
- },
- minLatency
- );
- }
-
- function unblock ( entry )
- {
- if ( entry )
- delete entry.block;
-
- state = NORMAL;
- exec ();
-
- if ( state === NORMAL )
- {
- backend.unsub ( false, backend.UPDATE, connection );
-
- var a = block, i, n = a && a.length;
- block = null;
- for ( i = 0; i < n; i += 2 )
- NORMAL ( a [ i ], a [ i + 1 ] );
- }
- }
-
- this.pushMessage = function ( type, channel, message )
- {
- //// Attempt to unblock on backend keyspace change.
-
- unblock ();
- }
-
-
- //// Format data the way it comes out of node_redis.
-
- function fdata ( data )
- {
- if ( typeof data !== 'object' && typeof data !== 'number' && typeof data !== 'string' )
- throw new Error ( 'WOOT! Data is not an object/string/number : ' + data );
-
- if ( data )
- {
- if ( typeof data === 'string' && !isNaN ( data ) )
- data = Number ( data );
-
- else if ( data.length && data.map )
- data = data.map ( finnerdata );
-
- else if ( typeof data === 'object' && !data.map )
- throw new Error ( 'WOOT! Illegal object in data : ' + data );
- }
-
- return data;
- }
-
- function finnerdata ( data )
- {
- if ( typeof data !== 'object' && typeof data !== 'number' && typeof data !== 'string' )
- throw new Error ( 'WOOT! Data is not an object/string/number : ' + data );
-
- if ( data )
- {
- if ( typeof data === 'number' )
- data = String ( data );
-
- else if ( data.length && data.map )
- data = data.map ( finnerdata );
-
- else if ( typeof data === 'object' && !data.map )
- throw new Error ( 'WOOT! Illegal object in data : ' + data );
- }
-
- return data;
- }
-
-
- //// Prepare command.
-
- function prep ( command, args, callback )
- {
- var command = command.toUpperCase (),
- args = args.map ( function ( arg ) { return String ( arg ); } ),
- block = false;
-
- if ( /^B[LR]POP/.test ( command ) && args.length ) // Backend will validate the timeout param more robustly.
- block = parseInt ( args [ args.length - 1 ] ) || true;
-
- if ( !backend [ command ] )
- throw new Error ( "fakeredis: " + command + " is not implemented in fakeredis. Let me know if you need it." );
-
- return { command : command, args : args, callback : callback, block : block };
- }
-
-
- //// Helper to push replies onto the replies list.
-
- function pushReply ( err, data )
- {
- this.push ( fdata ( data ) );
- }
-
-
- //// Immitate latency.
-
- minLatency = Math.ceil ( minLatency || 15 );
- maxLatency = Math.ceil ( maxLatency || minLatency * 3 );
-
- if ( maxLatency < minLatency || minLatency < 0 )
- throw new Error ( "Bad min/max latency settings." );
-
- function randLat ()
- {
- return Math.ceil ( ( maxLatency - minLatency ) * Math.random () + minLatency );
- }
-
-};
-
-
-
-function Delay ( object, method, delay )
-{
- var queue,
- flush;
-
- this [ method ] = function ()
- {
- if ( !queue )
- {
- queue = [ arguments ];
- setTimeout ( flush, delay );
- }
- else
- queue.push ( arguments );
- };
-
- flush = function ()
- {
- var q = queue, i, n = q.length;
- queue = null;
-
- for ( i = 0; i < n; i ++ )
- object [ method ].apply ( object, q [ i ] );
- };
-
-}
-
-
-
diff --git a/node_modules/fakeredis/lib/helpers.js b/node_modules/fakeredis/lib/helpers.js
deleted file mode 100644
index deca7c17..00000000
--- a/node_modules/fakeredis/lib/helpers.js
+++ /dev/null
@@ -1,227 +0,0 @@
-"use strict";
-
-
- //// Stylize a string alla vows
-
-var stylize;
-( function ()
-{
- var styles =
- {
- 'bold' : '1',
- 'italic' : '3',
- 'underline' : '4',
-
- 'grey' : '90',
-
- 'red' : '1;31',
- 'green' : '1;32',
- 'yellow' : '1;33',
- 'blue' : '1;34',
- 'magenta' : '1;35',
- 'cyan' : '1;36',
- 'white' : '1;37'
- };
-
- stylize = function ( str, style )
- {
- return '\x1B[' + styles[style] + 'm' + str +
- '\x1B[0m';
- };
-}
-() );
-
-
-
- //// Prettyprint a subset of the keyspace of the fakeredis instance.
-
-exports.pretty = function ( options )
-{
- var pattern, wrap, label;
-
- if ( typeof options === 'string' )
- options = { pattern : options };
-
- pattern = ( options && options.pattern ) || "*";
- wrap = ( options && options.wrap ) || 4;
- label = ( options && options.label ) || "keyspace " + pattern;
-
- this.send_command ( "FAKE_DUMP", [ pattern || "*" ], function ( err, dump )
- {
- var i, n = dump && dump.length, style, key, ttl, type, value;
-
- if ( err )
- throw err;
- if ( label )
- process.stdout.write ( '\n' + stylize ( label, 'bold' ) + ':\n\n' );
- else
- process.stdout.write ( '\n' );
-
- for ( i = 0; i < n; i += 4 )
- {
- key = dump [ i ];
- ttl = dump [ i + 1 ];
- type = dump [ i + 2 ];
- value = dump [ i + 3 ];
-
- style = 'white';
-
- if ( type === 'list' )
- style = 'green';
-
- else if ( type === 'hash' )
- style = 'yellow';
-
- else if ( type === 'set' )
- style = 'cyan';
-
- else if ( type === 'zset' )
- style = 'red';
-
- process.stdout.write
- (
- stylize ( type, 'bold' )
- + '\t' + stylize ( key, 'bold' )
- + '\n' + stylize ( ttl, ttl >= 0 ? 'italic' : 'grey' )
- + '\t' +
- (
- value.map
-
- ? value.map ( function ( member, index )
- {
- return ( wrap && index && !( ( index ) % wrap ) ? '\n\t' : '' ) + stylize ( member, style );
- })
- .join ( ',\t' )
-
- : stylize ( value, style )
- )
- + '\n\n'
- );
- }
- });
-};
-
-
-
- //// Get a subset of the keyspace of the fakeredis instance.
-
-exports.getKeyspace = function ( options, callback )
-{
- var cb;
-
- if ( !callback && typeof options === 'function' )
- {
- callback = options;
- options = null;
- }
-
- if ( typeof options === 'string' )
- options = { pattern : options };
- if ( !callback || typeof callback !== 'function' )
- throw new Error ( "You didn't provide a valid callback." );
-
-
- //// By default respond with an array of [ key, ttl, type, value, key2, ttl2, type2, value2, ... ]
-
- cb = callback;
-
-
- //// Respond with a key-value map.
-
- if ( options && options.map )
- cb = function ( err, data )
- {
- var out, i, n;
- if ( data )
- {
- out = {};
- n = data.length;
- for ( i = 0; i < n; i += 4 )
- out [ data [ i ] ] = data [ i + 3 ];
- }
-
- callback ( err, out );
- };
-
-
- //// Respond with an array of arrays.
-
- else if ( options && options.group )
- cb = function ( err, data )
- {
- var out, i, n;
- if ( data )
- {
- out = [];
- n = data.length;
- for ( i = 0; i < n; i += 4 )
- out.push ( data.slice ( i, 4 ) );
- }
-
- callback ( err, out );
- };
-
-
- this.send_command ( "FAKE_DUMP", [ options && options.pattern || "*" ], cb );
-};
-
-
-
- //// Serve getKeyspace() as JSON from localhost:[port]/keyspace.json
-
-exports.serveKeyspace = function ( port )
-{
- var self = this,
- url = require ( "url" );
-
- require ( "http" ).createServer
- (
- function ( req, res )
- {
- var data = url.parse ( req.url, true );
-
- if ( data.pathname !== '/keyspace.json' )
- {
- res.statusCode = 404;
- res.end ( "Not found." );
- return;
- }
-
- if ( req.method !== 'GET' )
- {
- res.statusCode = 405;
- res.end ( "Method not supported." );
- return;
- }
-
- self.getKeyspace ( data.query, function ( err, data )
- {
- if ( err )
- {
- res.statusCode = 500;
- res.end ( err );
- return;
- }
-
- res.setHeader ( "Content-Type", "application/json" );
- res.end ( JSON.stringify ( data ) );
- });
- }
- )
- .listen ( port );
-};
-
-
-
- //// Get available and missing commands.
-/*
-exports.getCommands = function ( callback )
-{
- this.send_command ( "FAKE_AVAIL", [], callback );
-};
-
-exports.getMissing = function ( callback )
-{
- this.send_command ( "FAKE_MISS", [], callback );
-};
-*/
diff --git a/node_modules/fakeredis/main.js b/node_modules/fakeredis/main.js
deleted file mode 100644
index 74d69e77..00000000
--- a/node_modules/fakeredis/main.js
+++ /dev/null
@@ -1,155 +0,0 @@
-"use strict";
-
-
-// By default fakeredis simulates a ridiculous amount of network latency
-// to help you discover race-conditions when testing multi-client setups.
-// Instantiate your 'clients' with a truthy .fast option,
-// or set it here globally to make things go a bit faster.
-exports.fast = false;
-
-
-/**
-
- TODO:
- - lint negative count and offset LIMITs away,
- SORT and ZRANGEBYSCORE treat them differently, so it's just confusing and a bad practice.
-
- **/
-
-var index = require ( "redis" ),
- Backend = require ( "./lib/backend" ).Backend,
- Connection = require ( "./lib/connection" ).Connection,
- helpers = require ( "./lib/helpers" ),
-
- backends = {},
- RedisClient = index.RedisClient,
-
- anon = 0;
-
-
- //// Re-export redis exports.
-
-exports.RedisClient = index.RedisClient;
-exports.Multi = index.Multi;
-exports.print = index.print;
-
-
- //// Overriden client factory.
-
-exports.createClient = function ( port, host, options )
-{
- var id = !port && !host ? 'fake_' + ( ++ anon ) : ( host || "" ) + ( port || "" ),
- lat = options && options.fast || exports.fast ? 1 : null,
- c = new Connection ( backends [ id ] || ( backends [ id ] = new Backend ), lat, lat ),
- cl = new RedisClient ( { on : function () {} } /* , options */ ),
- ns = options && options.no_sugar;
-
- if ( options && options.verbose )
- c.verbose = true;
-
- cl.connected = true;
- cl.ready = true;
-
- cl.send_command = function ( command, args, callback )
- {
- //// Interpret arguments, copy-paste from mranney/redis/index.js for best compat.
-
- if (typeof command !== "string") {
- throw new Error("First argument to send_command must be the command name string, not " + typeof command);
- }
-
- if (Array.isArray(args)) {
- if (typeof callback === "function") {
- // probably the fastest way:
- // client.command([arg1, arg2], cb); (straight passthrough)
- // send_command(command, [arg1, arg2], cb);
- } else if (! callback) {
- // most people find this variable argument length form more convenient, but it uses arguments, which is slower
- // client.command(arg1, arg2, cb); (wraps up arguments into an array)
- // send_command(command, [arg1, arg2, cb]);
- // client.command(arg1, arg2); (callback is optional)
- // send_command(command, [arg1, arg2]);
- // client.command(arg1, arg2, undefined); (callback is undefined)
- // send_command(command, [arg1, arg2, undefined]);
- var last_arg_type = typeof args[args.length - 1];
- if (last_arg_type === "function" || last_arg_type === "undefined") {
- callback = args.pop();
- }
- } else {
- throw new Error("send_command: last argument must be a callback or undefined");
- }
- } else {
- throw new Error("send_command: second argument must be an array");
- }
-
- // if the last argument is an array, expand it out. This allows commands like this:
- // client.command(arg1, [arg2, arg3, arg4], cb);
- // and converts to:
- // client.command(arg1, arg2, arg3, arg4, cb);
- // which is convenient for some things like sadd
- if (Array.isArray(args[args.length - 1])) {
- args = args.slice(0, -1).concat(args[args.length - 1]);
- }
-
- //// Lint args.
-
- if ( !options || !options.no_lint )
- {
- var i, n;
- n = args.length;
- for ( i = 0; i < n; i ++ )
- if ( typeof args [ i ] !== 'string' && typeof args [ i ] !== 'number' )
- throw new Error ( "fakeredis/lint: Argument #" + i + " for " + command + " is not a String or Number: " + args [ i ] );
- }
-
- //// You can disable hash sugar with the no_sugar option.
-
- var cb;
- if ( callback && !ns && /^hgetall/i.test ( command ) )
- cb = function ( err, data )
- {
- if ( !err && data )
- data = reply_to_object ( data );
-
- callback ( err, data );
- };
-
- else
- cb = callback;
-
- c.push ( this, command, args, cb );
- };
-
- cl.pushMessage = cl.emit.bind ( cl );
-
- ( function ()
- {
- var prop;
- for ( prop in helpers )
- cl [ prop ] = helpers [ prop ];
- }
- () );
-
- return cl;
-};
-
-
- //// Helpers for node_redis compat.
-
-// hgetall converts its replies to an Object. If the reply is empty, null is returned.
-function reply_to_object(reply) {
- var obj = {}, j, jl, key, val;
-
- if (reply.length === 0) {
- return null;
- }
-
- for (j = 0, jl = reply.length; j < jl; j += 2) {
- key = reply[j].toString();
- val = reply[j + 1];
- obj[key] = val;
- }
-
- return obj;
-}
-
diff --git a/node_modules/fakeredis/package.json b/node_modules/fakeredis/package.json
deleted file mode 100644
index 26dbd01c..00000000
--- a/node_modules/fakeredis/package.json
+++ /dev/null
@@ -1,37 +0,0 @@
-{
- "name": "fakeredis",
- "version": "0.1.3",
- "description": "Fake redis for testing, works as a drop-in replacement for node_redis",
- "keywords": [
- "test",
- "spec",
- "fake",
- "redis",
- "simulated",
- "implementation",
- "client"
- ],
- "author": {
- "name": "Hristo Dachev",
- "email": "tutini@gmail.com"
- },
- "main": "./main.js",
- "dependencies": {
- "redis": ">= 0.7"
- },
- "bugs": {
- "url": "http://github.com/hdachev/fakeredis/issues"
- },
- "repository": {
- "type": "git",
- "url": "git://github.com/hdachev/fakeredis.git"
- },
- "scripts": {
- "test": "node test"
- },
- "readme": "\n\n# fakeredis - a fake redis for node.js\n\n\nThis module provides easy-to-use simulated instances of Redis\nto which you appear to be connected via the\n[redis](https://github.com/mranney/node_redis) client by [Matt Ranney](https://github.com/mranney).\n**It helps with writing tests** in two ways:\nyour tests won't require an actual redis instance\nand you'll be able to safely run as many tests in parallel as you want.\n\n[](https://npmjs.org/package/fakeredis)\n[](http://travis-ci.org/hdachev/fakeredis)\n\n\n## Usage\n\nInstall:\n\n npm install fakeredis\n\nYou can use fakeredis as you would use node_redis,\njust changing the module name from `redis` to `fakeredis`:\n\n```javascript\nvar client = require(\"fakeredis\").createClient(port, host);\n```\n\nBoth parameters are optional,\nand only serve to determine if you want to reuse a an existing fakeredis instance or not.\nYou can also just name your backends arbitrarily:\n\n```javascript\n\n// Create a connection to a fresh fakeredis instance:\nvar client = fakeredis.createClient(\"social stuff\");\n\n// Connect to the same backend via another simulated connection:\nvar concurrentClient = fakeredis.createClient(\"social stuff\");\n```\n\nBy omitting both parameters,\nyou simply create a new blank slate fakeredis instance:\n\n```javascript\nvar client = require(\"fakeredis\").createClient();\n```\n\n\nIn other words,\nevery time you create a client specifying the same port and/or name\nyou reuse the same simulated backend.\nThis makes most sense when you need a concurrent client setup for some test,\nsay because you need to publish / subscribe,\nor because you want to test something that's based on `MULTI`/`EXEC`\nand uses optimistic locking with `WATCH`/`UNWATCH`.\n\nIn any case, fakeredis is great for testing\nbecause you can run as many tests in parallel as you wish,\nand that's also why you'll generally be naming your clients\nin a way that ensures tests don't collide.\n\n\n\n## Intended differences from a true Redis\n\nOne key difference is that the output of some commands,\nsuch as `SMEMBERS`, `HKEYS`, `HVALS`,\ncomes out sorted lexicographically to provide for simpler testing.\nThis means that some tests that make use of undocumented Redis behaviours\nsuch as the chronological order of retrieval for members in a set\nmay fail when attempted with fakeredis.\nTo solve this,\nwhenever there is no documented sort order for a given Redis command's multi-bulk reply,\nsort the output before asserting equality to ensure your tests run everywhere.\n\nAnother major difference is that commands that accept modifier parameters, such as\n`SORT key [BY pattern] [LIMIT offset count] [GET pattern [GET pattern ...]] [ASC|DESC] [ALPHA] [STORE destination]`\ncurrently only accept these parameters in the order that is stated in the documentation.\nFor example,\nin Redis it appears to be perfectly legitimate to have `SORT myset ALPHA LIMIT 0 5`,\nbut in fakeredis this will currently return a syntax error.\n\nI'm totally open to discussion on both points.\n\n\n### Implemented subset:\n\nAll string, list, hash, set and sorted set commands,\nmost keyspace commands, and some connection and server commands.\nPubsub, transactions with optimistic locking are also fully implemented.\n\nList of **available** commands:\n\nKeyspace:\n\n DBSIZE\n EXISTS\n EXPIRE\n EXPIREAT\n FLUSHDB\n KEYS\n PERSIST\n DEL\n RANDOMKEY\n RENAME\n RENAMENX\n SORT\n TTL\n TYPE\n\nStrings:\n\n APPEND\n DECR\n DECRBY\n GET\n GETBIT\n GETRANGE\n GETSET\n INCR\n INCRBY\n MGET\n MSET\n MSETNX\n SET\n SETBIT\n SETEX\n SETNX\n SETRANGE\n\nHashes:\n\n HDEL\n HEXISTS\n HGET\n HGETALL\n HINCRBY\n HKEYS\n HLEN\n HMGET\n HMSET\n HSET\n HSETNX\n HVALS\n\nLists:\n\n BLPOP\n BRPOP\n BRPOPLPUSH\n LINDEX\n LINSERT\n LLEN\n LPOP\n LPUSH\n LPUSHX\n LRANGE\n LREM\n LSET\n LTRIM\n RPOP\n RPOPLPUSH\n RPUSH\n RPUSHX\n\nSets:\n\n SADD\n SCARD\n SDIFF\n SDIFFSTORE\n SINTER\n SINTERSTORE\n SISMEMBER\n SMEMBERS\n SMOVE\n SPOP\n SRANDMEMBER\n SREM\n STRLEN\n SUNION\n SUNIONSTORE\n\nSorted Sets:\n\n ZADD\n ZCARD\n ZCOUNT\n ZINCRBY\n ZINTERSTORE\n ZRANGE\n ZRANGEBYSCORE\n ZRANK\n ZREM\n ZREMRANGEBYRANK\n ZREMRANGEBYSCORE\n ZREVRANGE\n ZREVRANGEBYSCORE\n ZREVRANK\n ZSCORE\n ZUNIONSTORE\n\nPub/Sub:\n\n PSUBSCRIBE\n PUBLISH\n PUNSUBSCRIBE\n SUBSCRIBE\n UNSUBSCRIBE\n\nTransactions:\n\n DISCARD\n EXEC\n MULTI\n UNWATCH\n WATCH\n\nConnection and Server:\n\n ECHO\n PING\n QUIT\n SELECT\n\nThese do nothing but return `OK`:\n\n AUTH\n BGREWRITEAOF\n BGSAVE\n SAVE\n\n\n### What's missing:\n\nMost notably, `MONITOR` is still missing.\n\nAlso note that **none of the node_redis client constructor options are available**,\nwhich means no `detect_buffers` and `return_buffers`.\nCommand arguments are always stringified at the fake connection level,\nand replies are always returned as `null`, `String`, `Number` or `Array`.\n\nFinally,\nnone of the `ready`, `connect`, `error`, `end`, `drain` and `idle`\nclient events are currently implemented.\n\nList of **missing** commands (will throw upon attempt to use):\n\nConnection and Server:\n\n CONFIG GET\n CONFIG SET\n CONFIG RESETSTAT\n DEBUG OBJECT\n DEBUG SEGFAULT\n FLUSHALL\n INFO\n LASTSAVE\n MONITOR\n MOVE\n OBJECT\n SHUTDOWN\n SLAVEOF\n SYNC\n\n\n\n## Helpers\n\nTo facilitate development and testing,\nfakeredis provides some additional methods on the client object.\n\n\n### Prettyprinting:\n\n```javascript\nfakeredisClient.pretty();\nfakeredisClient.pretty(\"p*tte?n\");\nfakeredisClient.pretty(options);\n```\n\n`.pretty()` will prettyprint to stdout the entire keyspace\nor a subset of keys specificed with a redis pattern\nof the same kind that's used for `KEYS` and `PSUBSCRIBE`.\nKeep in mind .pretty() is async,\nbecause it works as a normal client command\nand hence needs to respect the command order,\nfake pipelining and latency and all,\nso that you can do stuff like:\n\n```javascript\nvar client = require(\"fakeredis\").createClient();\n\nclient.SADD('hello', 'world', 'Jenny', 'Sam');\nclient.LPUSH('mylist', 'hey', 'ho', 'letsgo');\nclient.pretty({label: \"my stuff\", pattern: \"*\"});\n```\n\nWhich would print *(in color!)*\n\n my stuff:\n\n set hello\n -1 Jenny, Sam, world\n\n list mylist\n -1 letsgo, ho, hey\n\n\n### Keyspace dumps:\n\n```javascript\nfakeredisClient.getKeypsace(callback);\nfakeredisClient.getKeypsace(\"p*tte?n\", callback);\nfakeredisClient.getKeyspace(options, callback);\n```\n\nWill `callback(err, data)` with an array\nthat enumerates the whole keyspace,\nor the requested subset, in the following manner:\n\n```javascript\n[ key1, ttl1, type1, value1\n, key2, ttl2, type2, value2\n, ... ]\n```\n\nThe keyspace is sorted lexicographically by key,\nstring values are strings,\nlist values are the output of `LRANGE 0 -1`,\nhashes come out as the output of `HGETALL` for hashes\n(no syntactic sugar though, so an Array of `[field, value, field, value, ...]`),\n`SMEMBERS` output is used for sets,\nand `ZRANGE 0 -1 WITHSCORES` for sorted sets,\neach of which is sorted lexicographically in a way that makes sense,\nso that the final result is simple enough to assert deep equality against.\n\nIn any case, you'll probably need to reformat these keyspace dumps\nto a format that makes more sense for your testing needs.\nThere are a couple of transforms that are included out of the box:\n\n```javascript\nfakeredisClient.getKeypsace({pattern: \"myz*\", map: true}, callback);\n```\n\nIf you only care about the key and value of each entry,\nyou can set the **map** option to a truthy value,\nyou will instead receive the keyspace dump as a key-value map of the kind:\n\n```javascript\n{ key1: value1, key2: value2, ... }\n```\n\nThis means you're skipping ttl and key type info though. You can also do:\n\n```javascript\nfakeredisClient.getKeypsace({pattern: \"myz*\", group: true}, callback);\n```\n\nWhich will return an `Array` of `Array`s,\none for each keyspace entry, so that you end up with:\n\n```javascript\n[ [ key1, ttl1, type1, value1 ]\n, [ key2, ttl2, type2, value2 ]\n, ... ]\n```\n\nThe benefit of this option is that you can sort the outer array as you like more easily.\n\n\n\n## Similar projects\n\nYou might also want to check out these similar implementations in\n[python](https://github.com/jamesls/fakeredis) and\n[ruby](https://github.com/guilleiguaran/fakeredis).\n\n\n\n## MIT License\n\nCopyright (c) 2012 Hristo Dachev\n\nPermission is hereby granted, free of charge, to any person\nobtaining a copy of this software and associated documentation\nfiles (the \"Software\"), to deal in the Software without\nrestriction, including without limitation the rights to use,\ncopy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the\nSoftware is furnished to do so, subject to the following\nconditions:\n\nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES\nOF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\nNONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\nHOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\nWHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\nFROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\nOTHER DEALINGS IN THE SOFTWARE.\n\n",
- "readmeFilename": "README.md",
- "homepage": "https://github.com/hdachev/fakeredis",
- "_id": "fakeredis@0.1.3",
- "_from": "fakeredis@~>0.1.3"
-}
diff --git a/node_modules/fakeredis/test.js b/node_modules/fakeredis/test.js
deleted file mode 100644
index 4f302049..00000000
--- a/node_modules/fakeredis/test.js
+++ /dev/null
@@ -1,991 +0,0 @@
-"use strict";
-
-var fake = require ( "./main" ),
-
- OK = "OK",
- PONG = "PONG",
-
- BAD_ARGS = "wrong number of arguments",
- BAD_TYPE = "Operation against a key holding the wrong kind of value",
- BAD_INT = "value is not an integer or out of range",
- BAD_FLOAT = "value is not a valid float",
- BAD_SYNTAX = "syntax error",
- BAD_INDEX = "index out of range",
- BAD_DB = "invalid DB index",
- BAD_SETEX = "invalid expire time in SETEX",
- BAD_SORT = "One or more scores can't be converted into double";
-
-
-
- //// So lets go.
-
-process.stdout.write ( 'testing fakeredis ...\n\n' );
-
-
-
- //// Keys and strings.
-
-( function ()
-{
- var redis = fake.createClient ( "stuff" ),
- redis2 = fake.createClient ( "stuff" );
-
- redis.AUTH ( "password", test ( "AUTH", null, "OK" ) );
-
- redis.SET ( "hello", "world", test ( "SET", null, OK ) );
- redis.GET ( "hello", test ( "SET / GET", null, "world" ) );
-
- redis.SET ( "what", "who" );
- redis.GETSET ( "what", "where", test ( "GETSET", null, "who" ) );
- redis.MGET ( "hello", "nonex", "what", test ( "MGET", null, [ "world", null, "where" ] ) );
- redis.DEL ( "hello", "nonex", "what", test ( "DEL count", null, 2 ) );
- redis.GET ( "hello", test ( "SET / DEL / GET", null, null ) );
-
- redis.SET ( "hello", "vmvl" );
- redis.GETBIT ( "hello", 7, test ( "GETBIT", null, 0 ) );
- redis.GETBIT ( "hello", 14, test ( "GETBIT", null, 0 ) );
- redis.GETBIT ( "hello", 21, test ( "GETBIT", null, 1 ) );
- redis.SETBIT ( "hello", 7, 1, test ( "SETBIT", null, 0 ) );
- redis.SETBIT ( "hello", 14, 1, test ( "SETBIT", null, 0 ) );
- redis.SETBIT ( "hello", 21, 0, test ( "GETBIT", null, 1 ) );
- redis.GETBIT ( "hello", 7, test ( "GETBIT", null, 1 ) );
- redis.GETBIT ( "hello", 14, test ( "GETBIT", null, 1 ) );
- redis.GETBIT ( "hello", 21, test ( "GETBIT", null, 0 ) );
-
- redis.STRLEN ( "hello", test ( "STRLEN", null, 4 ) );
- redis.SETBIT ( "hello", 33, 1 );
- redis.SETBIT ( "hello", 34, 1 );
- redis.SETBIT ( "hello", 37, 1 );
- redis.STRLEN ( "hello", test ( "SETBIT refits buffer", null, 5 ) );
- redis.GET ( "hello", test ( "SETBIT char from bits", null, "world" ) );
-
- redis.SETRANGE ( "hi", 0, "Hello World", test ( "SETRANGE upsert", null, 11 ) );
- redis.GET ( "hi", test ( "SETRANGE", null, "Hello World" ) );
- redis.GETRANGE ( "hi", -5, -1, test ( "GETRANGE negneg", null, "World" ) );
- redis.SETRANGE ( "hi", 6, "Redis", test ( "SETRANGE offset", null, 11 ) );
- redis.GET ( "hi", test ( "SETRANGE", null, "Hello Redis" ) );
-
- redis.EXPIRE ( "hello", 15 );
- redis.DECR ( "hello", test ( "SET / DECR", BAD_INT, null ) );
- redis.TTL ( "hello", test ( "EXPIRE / TTL", null, 15 ) );
- redis.PERSIST ( "hello" );
- redis.send_command ( "pttl", [ "hello" ], test ( "PERSIST / PTTL", null, -1 ) );
- redis.send_command ( "pexpireat", [ "hello", Date.now () + 250 ] );
- redis.MSETNX ( "somekey", "someval", "hello", "non-world", test ( "MSETNX is safe", null, 0 ) );
- redis.GET ( "hello", test ( "GET expiring", null, "world" ) );
- redis.APPEND ( "hello", " of mine", test ( "APPEND upset", null, ( "world of mine" ).length ) );
- redis.INCR ( "hello", test ( "INCR upset", BAD_INT, null ) );
- redis.DECRBY ( "nonx", 5, test ( "DECR nonexist", null, -5 ) );
-
- redis.SETEX ( "nonx", 0, "hello", test ( "SETEX fail", BAD_SETEX, null ) );
- redis.SETNX ( "nonx", "dont!", test ( "SETNX fail", null, 0 ) );
- redis.MSET ( "nonx", "do", test ( "MSET", null, OK ) );
- redis.send_command ( "psetex", [ "nonx", 1000, "disappear" ], test ( "PSETEX", null, OK ) );
- redis.GET ( "nonx", test ( "PSETEX set", null, "disappear" ) );
- redis.TTL ( "nonx", test ( "PSETEX expire", null, 1 ) );
- redis.GETSET ( "nonx", "stay" );
- redis.TTL ( "nonx", test ( "GETSET persists", null, -1 ) );
- redis.DEL ( "nonx" );
-
-
-
- //// Sets.
-
- redis.SADD ( "hello", "kuku", "buku", test ( "SADD typerror", BAD_TYPE, null ) );
- redis.SADD ( "myset", [ "ala", "bala" ], test ( "SADD multiarg", null, 2 ) );
- redis.SADD ( "myset", "niza", "bala", test ( "SADD delta", null, 1 ) );
- redis.SCARD ( "hello", test ( "SCARD typerror", BAD_TYPE, null ) );
- redis.SCARD ( "myset", test ( "SCARD", null, 3 ) );
- redis.SADD ( "set2", 1, 2, 3, 4, 5 );
- redis.SADD ( "set3", "xxx", "zzz", "yyy" );
- redis.SUNIONSTORE ( "output", [ "nonex1", "myset", "set2", "set3", "nonex2" ], test ( "SUNIONSTORE", null, 11 ) );
- redis.SISMEMBER ( "output", "xxx", test ( "SISMEMBER union 3 sets", null, 1 ) );
- redis.SINTER ( "myset", "output", test ( "SINTER", null, [ "ala", "bala", "niza" ] ) );
- redis.SADD ( "set3", "ala", 3, 4, "kukukuku" );
- redis.SDIFFSTORE ( "output", "output", "set3", test ( "SDIFFSTORE", null, 5 ) );
- redis.SMEMBERS ( "output", test ( "SMEMBERS", null, [ "1", "2", "5", "bala", "niza" ] ) );
- redis.SISMEMBER ( "output", "bala", test ( "SISMEMBER yes", null, 1 ) );
- redis.SISMEMBER ( "output", "what", test ( "SISMEMBER no", null, 0 ) );
- redis.SISMEMBER ( "nonex", "what", test ( "SISMEMBER nonex", null, 0 ) );
- redis.SISMEMBER ( "hello", "what", test ( "SISMEMBER bad", BAD_TYPE, null ) );
-
- redis.SADD ( "otherset", "whatever" );
- redis.SINTERSTORE ( "nothing", "otherset", "output", test ( "SINTERSTORE empty out", null, 0 ) );
- redis.TYPE ( "nothing", test ( "SINTERSTORE empty out / TYPE", null, "none" ) );
-
- redis.DEL ( "set3" );
- redis.SPOP ( "set3", test ( "SPOP nothing", null, null ) );
- redis.SINTER ( "output", function ( err, members )
- {
- redis.SPOP ( "output", function ( err, member )
- {
- member = member ? member.toString () : "!?@#?!@?#";
-
- var expected = members
- .map ( function ( entry ) { return entry.toString (); } )
- .filter ( function ( entry ) { return entry !== member; } );
-
- redis2.SDIFF ( "output", test ( "SPOP ( client 2 )", null, expected ) );
- });
- });
-
-
-
- //// Sorted sets.
-
- redis.ZADD ( "myzset", [ 1, "one", 2, "two", 3, "three" ], test ( "ZADD", null, 3 ) );
- redis.ZCARD ( "myzset", test ( "ZCARD", null, 3 ) );
- redis.ZCARD ( "whatwhat", test ( "ZCARD nonex", null, 0 ) );
- redis.ZCARD ( "myset", test ( "ZCARD bad", BAD_TYPE, null ) );
- redis.ZRANGE ( "myzset", 1, -1, test ( "ZRANGE pos neg", null, [ "two", "three" ] ) );
- redis.ZRANGE ( "myzset", 0, 1, test ( "ZRANGE pos pos", null, [ "one", "two" ] ) );
- redis.ZRANGE ( "myzset", 1, -2, test ( "ZRANGE pos=neg", null, [ "two" ] ) );
- redis.ZRANGE ( "myzset", -1, 1, test ( "ZRANGE null", null, [] ) );
- redis.ZRANGE ( "myzset", "-inf", "+inf", test ( "ZRANGE int", BAD_INT, null ) );
- redis.ZREVRANGEBYSCORE ( "myzset", "+inf", "-inf", test ( "ZREVRANGEBYSCORE all", null, [ "three", "two", "one" ] ) );
- redis.ZREVRANGEBYSCORE ( "myzset", 2, 1, test ( "ZREVRANGEBYSCORE incl", null, [ "two", "one" ] ) );
- redis.ZREVRANGEBYSCORE ( "myzset", 2, "(1", test ( "ZREVRANGEBYSCORE soso", null, [ "two" ] ) );
- redis.ZREVRANGEBYSCORE ( "myzset", "(2", "(1", test ( "ZREVRANGEBYSCORE excl", null, [] ) );
- redis.ZADD ( "myzset", 1.5, "one.five" );
- redis.ZRANGEBYSCORE ( "myzset", "-inf", "+inf", "WITHSCORES", "LIMIT", 1, 2, test ( "ZREVRANGEBYSCORE limit", null, [ "one.five", "1.5", "two", "2" ] ) );
-
- //// Negative offset behaves differently here and in SORT
-
- redis.ZRANGEBYSCORE ( "myzset", "-inf", "+inf", "WITHSCORES", "LIMIT", -1, 2, test ( "ZREVRANGEBYSCORE limit +negoffset", null, [] ) );
- redis.ZRANGEBYSCORE ( "myzset", "-inf", "+inf", "WITHSCORES", "LIMIT", 1, -11, test ( "ZREVRANGEBYSCORE limit +negcount", null, [ "one.five", "1.5", "two", "2", "three", "3" ] ) );
-
- redis.ZCOUNT ( "myzset", "(1", 2, test ( "ZCOUNT", null, 2 ) );
- redis.SET ( "wrong", "indeed" );
- redis.ZREMRANGEBYRANK ( "wrong", 0, -1, test ( "ZREMRANGEBYRANK badkey", BAD_TYPE, null ) );
- redis.ZREMRANGEBYSCORE ( "myzset", "(1", "2", test ( "ZREMRANGEBYSCORE", null, 2 ) );
- redis.ZRANGE ( "myzset", "0", "-1", test ( "ZREMRANGEBYSCORE / ZRANGE", null, [ "one", "three" ] ) );
- redis.ZADD ( "myzset", 1.9, "goner1", 2.1, "goner2" );
- redis.ZREMRANGEBYRANK ( "myzset", 1, 2, test ( "ZREMRANGEBYRANK", null, 2 ) );
- redis.ZRANGE ( "myzset", "0", "-1", test ( "ZREMRANGEBYRANK / ZRANGE", null, [ "one", "three" ] ) );
- redis.ZADD ( "myzset", "2", "one", test ( "ZADD not adding", null, 0 ) );
- redis.ZADD ( "myzset", "", "one", test ( "ZADD bad score", BAD_FLOAT, null ) );
- redis.ZADD ( "myzset", "2", "two" );
- redis.ZINCRBY ( "myzset", 2, "one", test ( "ZINCRBY", null, 4 ) );
- redis.ZREVRANGE ( "myzset", 0, -1, "WITHSCORES", test ( "ZREVRANGE", null, [ "one", "4", "three", "3", "two", "2" ] ) );
- redis.ZSCORE ( "myzset", "three", test ( "ZSCORE", null, 3 ) );
- redis.ZADD ( "myzset", 1.5, "one.five" );
- redis.ZRANK ( "myzset", "three", test ( "ZRANK", null, 2 ) );
- redis.ZREVRANK ( "myzset", "three", test ( "ZREVRANK", null, 1 ) );
-
- redis.ZADD ( "zset1", 1, "one", 2, "two" );
- redis.ZADD ( "zset2", 1, "one", 2, "two", 3, "three" );
- redis.ZINTERSTORE ( "out", 2, "zset1", "zset2", "weights", 2, 3, test ( "ZINTERSTORE no aggregate", null, 2 ) );
- redis.ZRANGE ( "out", 0, -1, "WITHSCORES", test ( "ZINTERSTORE / ZRANGE", null, [ "one", "5", "two", "10" ] ) );
-
- redis.ZUNIONSTORE
- (
- "out", /* 4, */ "nonex", "zset1", "zset2", "out", "weights", 10, 1, 2, 0.5, "aggregate", "max",
- test ( "ZUNIONSTORE missing keycount", BAD_INT, null )
- );
- redis.ZUNIONSTORE
- (
- "out", 4, "nonex", "zset1", "zset2", "out", "weights", 10, 1, 2, /* .5, */ "aggregate", "max",
- test ( "ZUNIONSTORE bad weight count (less)", BAD_FLOAT, null )
- );
- redis.ZUNIONSTORE
- (
- "out", 4, "nonex", "zset1", "zset2", "out", "weights", 10, 1, 2, 0.5, 10, "aggregate", "max",
- test ( "ZUNIONSTORE bad weight count (more)", BAD_ARGS, null )
- );
- redis.ZUNIONSTORE
- (
- "out", 4, "nonex", "zset1", "zset2", "out", "weights", 10, 1, 2, 0.5, "aggregate", /* "max", */
- test ( "ZUNIONSTORE missing aggregate", BAD_ARGS, null )
- );
- redis.ZUNIONSTORE
- (
- "out", 4, "nonex", "zset1", "zset2", "out", /* "weights", */ 10, 1, 2, 0.5, "aggregate", "max",
- test ( "ZUNIONSTORE missing weight keyword", BAD_ARGS, null )
- );
-
- redis.ZUNIONSTORE
- (
- "out2", 2, "zset1", "zset2",
- test ( "ZUNIONSTORE naked", null, 3 )
- );
- redis.ZRANGE ( "out2", 0, -1, "WITHSCORES", test ( "ZUNIONSTORE naked / ZRANGE", null, [ "one", "2", "three", "3", "two", "4" ] ) );
-
- redis.ZUNIONSTORE
- (
- "out2", 2, "zset1", "zset2", "aggregate", "min",
- test ( "ZUNIONSTORE with aggregate", null, 3 )
- );
- redis.ZRANGE ( "out2", 0, -1, "WITHSCORES", test ( "ZUNIONSTORE with aggregate / ZRANGE", null, [ "one", "1", "two", "2", "three", "3" ] ) );
-
- redis.ZUNIONSTORE
- (
- "out", 4, "nonex", "zset1", "zset2", "out", "weights", 10, 1, 2, .5, "aggregate", "max",
- test ( "ZUNIONSTORE with weights + aggregate", null, 3 )
- );
- redis.ZRANGE ( "out", 0, -1, "WITHSCORES", test ( "ZUNIONSTORE / ZRANGE", null, [ "one", "2.5", "two", "5", "three", "6" ] ) );
-
- redis.KEYS ( "*z?et*", test ( "KEYS with ? and *", null, [ "myzset", "zset1", "zset2" ] ) );
- redis.KEYS ( "my[sz]*et", test ( "KEYS with [] and *", null, [ "myset", "myzset" ] ) );
- redis.KEYS ( "my[sz]{2}et", test ( "REGEXP escaping", null, [] ) );
- redis.TYPE ( "myset", test ( "TYPE", null, "set" ) );
-
- redis.EXPIRE ( "out", 60 );
- redis.RENAME ( "out", "outandabout", test ( "RENAME", null, OK ) );
- redis.ZADD ( "outandabout", 0, "zero", test ( "ZADD zero", null, 1 ) );
- redis.TTL ( "outandabout", test ( "RENAME / ZADD / TTL", null, 60 ) );
- redis.EXISTS ( "out", test ( "EXISTS no", null, 0 ) );
- redis.EXISTS ( "outandabout", test ( "EXISTS yes", null, 1 ) );
-
- redis.ZADD ( "lexi", 1, "AAA", 1, "BBB", 1, "ZZZ", 1, "XXX", 1, "YYY", 2, "FFF" );
- redis.ZRANGE ( "lexi", 0, -1, test ( "lexicographic zset member sort", null, [ "AAA", "BBB", "XXX", "YYY", "ZZZ", "FFF" ] ) );
- redis.ZREVRANGE ( "lexi", 0, -1, test ( "lexicographic zset member sort", null, [ "FFF", "ZZZ", "YYY", "XXX", "BBB", "AAA" ] ) );
-
- redis.ZADD ( "otherzset", 100, "whatever" );
- redis.ZINTERSTORE ( "nothing", 2, "lexi", "otherzset", test ( "ZINTERSTORE empty out", null, 0 ) );
- redis.TYPE ( "nothing", test ( "ZINTERSTORE empty out / TYPE", null, "none" ) );
-
-
-
- //// Hashes.
-
- redis.HGETALL ( "nonex", test ( "HGETALL nonex", null, null ) );
-
- redis.HMSET ( "h", { "f1" : "v1", "field-3" : "3" }, test ( "HMSET {} ok", null, OK ) );
- redis.HMSET ( "h", "f2", "v2", "field-4", 4, test ( "HMSET ... ok", null, OK ) );
-
- redis.HSETNX ( "h", "f1", "V1", test ( "HSETNX safe", null, 0 ) );
- redis.HSETNX ( "h", "F1", "V1", test ( "HSETNX", null, 1 ) );
- redis.HGETALL ( "h", test ( "HGETALL", null, { "F1": "V1", "f1": "v1", "f2": "v2", "field-3": "3", "field-4": "4" } ) );
-
- redis.getKeyspace ( "*h", test ( "getKeyspace() with pattern", null, [ "h", "-1", "hash", [ "F1", "V1", "f1", "v1", "f2", "v2", "field-3", "3", "field-4", "4" ] ] ) );
-
- redis.HKEYS ( "h", test ( "HKEYS", null, [ "F1", "f1", "f2", "field-3", "field-4" ] ) );
- redis.send_command ( "HINCRBYFLOAT", [ "h", "f1", 3.5 ], test ( "HINCRBYFLOAT fail", BAD_FLOAT, null ) );
- redis.HINCRBY ( "h", "field-3", 3, test ( "HINCRBYFLOAT success", null, 6 ) );
- redis.HVALS ( "h", test ( "HVALS", null, [ "4", "6", "V1", "v1", "v2" ] ) );
- redis.HMGET ( "h", "F1", "f1", "f2", test ( "HMGET", null, [ "V1", "v1", "v2" ] ) );
- redis.HGETALL ( "h", function ( err, data )
- {
- redis.multi ()
- .HGETALL ( "h", test ( "HGETALL multi/exec sugar", err, data ) )
- .exec ( test ( "HGETALL multi/exec replies sugar", err, [ data ] ) );
-
- redis.HDEL ( "h", "field-3", "F1", "F2", test ( "HDEL", null, 2 ) );
- redis.TYPE ( "h", test ( "TYPE hash", null, "hash" ) );
- redis.HDEL ( "h", "field-4", "f1", "f2" );
- redis.TYPE ( "h", test ( "TYPE none", null, "none" ) );
- });
-
- redis.HDEL( 'hnonex', 'moot', test( "HDEL nonex", null, 0 ) );
- redis.HSET( 'w00t', 'field', 'value', function( err, ok ) {
- redis.HDEL( 'w00t', 'moot', test( "HDEL nonex field", null, 0 ) );
- });
-
-
-
-
- //// Lists, non-blocking.
-
- redis.LPUSH ( "list", [ "one", "two", "three" ], test ( "LPUSH", null, 3 ) );
- redis.LPOP ( "list", test ( "RPOP", null, "three" ) );
- redis.LRANGE ( "list", 0, -1, test ( "LRANGE all posneg", null, [ "two", "one" ] ) );
- redis.LSET ( "list", 1, "what", test ( "LSET", null, OK ) );
- redis.LSET ( "list", 4, "what", test ( "LSET out of range", BAD_INDEX, null ) );
- redis.LTRIM ( "list", 1, -1, test ( "LTRIM posneg", null, OK ) );
- redis.RPOPLPUSH ( "nonexl", "newlist", test ( "RPOPLPUSH nonex", null, null ) );
- redis.TYPE ( "newlist", test ( "RPOPLPUSH nonex safe", null, "none" ) );
- redis.RPOPLPUSH ( "list", "newlist", test ( "RPOPLPUSH", null, "what" ) );
- redis.LPUSHX ( "nonex", "where", "why", test ( "LPUSHX nonex", null, 0 ) );
- redis.RPUSHX ( "newlist", "where", "why", test ( "RPUSHX", null, 3 ) );
- redis.RPUSH ( "list3", "one", "two", "three", test ( "RPUSH", null, 3 ) );
- redis.LTRIM ( "list3", -3, -1, test ( "LTRIM negneg", null, OK ) );
- redis.LLEN ( "list3", test ( "LLEN", null, 3 ) );
- redis.LINDEX ( "list3", 2, test ( "LINDEX posyes", null, "three" ) );
- redis.LINDEX ( "list3", -3, test ( "LINDEX negyes", null, "one" ) );
- redis.LINDEX ( "list3", 3, test ( "LINDEX negno", null, null ) );
- redis.LINDEX ( "list3", -4, test ( "LINDEX negno", null, null ) );
- redis.LINDEX ( "nonex", 0, test ( "LINDEX badkey", null, null ) );
- redis.LINDEX ( "hello", 0, test ( "LINDEX badkey", BAD_TYPE, null ) );
- redis.LRANGE ( "list3", -3, 2, test ( "LRANGE all negpos", null, [ "one", "two", "three" ] ) );
- redis.LRANGE ( "list3", -5, 0, test ( "LRANGE lo2lo", null, [ "one" ] ) );
- redis.LRANGE ( "list3", 2, 10, test ( "LRANGE hi2hi", null, [ "three" ] ) );
- redis.LPUSH ( "list3", "three", "what", "what" );
- redis.LREM ( "list3", 1, "one", test ( "LREM left", null, 1 ) );
- redis.LREM ( "list3", -1, "three", test ( "LREM right", null, 1 ) );
- redis.LREM ( "list3", -2, "what", test ( "LREM 2right", null, 2 ) );
-
- redis.getKeyspace ( "*list*", test ( "lists outcome", null, [ "list3", "-1", "list", [ "three", "two" ], "newlist", "-1", "list", [ "what", "where", "why" ] ] ) );
-
- redis.LREM( "lnonex", 1, "what", test( "LREM nonex", null, 0 ) );
-
- redis.LPUSH("lremlist", "a", "b", "b", "a", "b", "b", test("LPUSH", null, 6));
- redis.LREM("lremlist", 0, "a", test("LREM 0", null, 2));
- redis.LLEN("lremlist", test("LLEN", null, 4));
- redis.LREM("lremlist", 0, "b", test("LREM 0", null, 4));
- redis.LLEN("lremlist", test("LLEN empty", null, 0));
-
-
-
- //// Blocking list commands !
-
- redis.BLPOP ( "BL-a", "BL-b", "BL-c", 0, test ( "BLPOP", null, [ "BL-a", "AAA" ] ) );
-
- redis2.LPUSH ( "BL-a", "AAA", test ( "LPUSH + BLPOP", null, 1 ) );
- redis2.BRPOP ( "BL-b", "BL-c", 0, test ( "BRPOP", null, [ "BL-b", "BB3" ] ) );
-
- redis.RPUSH ( "BL-b", "BB1", "BB2", "BB3", test ( "RPUSH + BRPOP", null, 3 ) );
- redis.BLPOP ( "BL-a", "BL-c", 0, test ( "BLPOP", null, [ "BL-c", "CC1" ] ) );
-
- redis2.RPUSH ( "BL-c", "CC1", "CC2", "CC3", test ( "RPUSH + BLPOP", null, 3 ) );
-
- redis.getKeyspace ( "BL-?", test ( "blocking lists outcome", null, [ "BL-b", "-1", "list", [ "BB1", "BB2" ], "BL-c", "-1", "list", [ "CC2", "CC3" ] ] ) );
-
-
-
- //// Misc stuff.
-
- redis.ECHO ( "hello world!", test ( "ECHO", null, "hello world!" ) );
- redis.PING ( test ( "PING", null, "PONG" ) );
-
- redis.SAVE ( test ( "SAVE", null, "OK" ) );
- redis.BGSAVE ( test ( "BGSAVE", null, "OK" ) );
- redis.BGREWRITEAOF ( test ( "BGREWRITEAOF", null, "OK" ) );
-
-
-
- //// Expiry and flush.
-
- setTimeout
- (
- function ()
- {
- redis.GET ( "hello", test ( "GET expired", null, null ) );
-
- // redis.pretty ();
-
- redis.FLUSHDB ();
- redis.GETSET ( "hello", "world", test ( "GETSET null", null, null ) );
- redis.getKeyspace ( test ( "getKeyspace() flushed, nopat", null, [ "hello", "-1", "string", "world" ] ) );
- },
- 1000
- );
-}
-() );
-
-
-
- //// Transactions.
-
-( function ()
-{
- var multi,
- redis = fake.createClient ( "transactions-1" ),
- redis2 = fake.createClient ( "transactions-1" );
-
- redis.SET ( "abc", "dfg" );
- redis.SET ( "what", "who" );
- redis.WATCH ( "why", "what", "abc" );
- multi = redis.MULTI ();
- redis.GET ( "abc", function ()
- {
- redis2.SET ( "abc", "dfgdfg", function ()
- {
- multi.SET ( "abc", "dfggfd", test ( "SET discarded", null, null ) );
- multi.exec ();
-
- redis.GET ( "abc", test ( "invalidated transaction", null, "dfgdfg" ) );
- });
- });
-}
-() );
-
-( function ()
-{
- var multi,
- redis = fake.createClient ( "transactions-1" ),
- redis2 = fake.createClient ( "transactions-1" );
-
- redis.SET ( "abc", "dfg" );
- redis.SET ( "what", "who" );
- redis.WATCH ( "why", "what", "abc" );
- multi = redis.MULTI ();
- redis.GET ( "abc", function ()
- {
- redis2.SET ( "abc", "dfgdfg", function ()
- {
- multi.SET ( "abc", "dfggfd", test ( "SET discarded", null, null ) );
- multi.exec ();
-
- redis.GET ( "abc", test ( "invalidated transaction", null, "dfgdfg" ) );
- });
- });
-}
-() );
-
-( function ()
-{
- var multi,
- redis = fake.createClient ( "transactions-2" ),
- redis2 = fake.createClient ( "transactions-2" );
-
- redis.SET ( "abc", "dfg" );
- redis.SET ( "what", "who" );
- redis.WATCH ( "why", "what", "abc" );
- multi = redis.MULTI ();
- redis.GET ( "abc", function ()
- {
- redis2.SET ( "abc", "dfgdfg", function ()
- {
- redis.UNWATCH ();
- multi.SET ( "abc", "dfggfd", test ( "SET discarded", null, OK ) );
- multi.STRLEN ( "abc", test ( "STRLEN", null, 6 ) );
- multi.exec ();
-
- redis.GET ( "abc", test ( "unwatched succeeds", null, "dfggfd" ) );
- });
- });
-}
-() );
-
-( function ()
-{
- var client = fake.createClient (), set_size = 1000;
-
- client.sadd("bigset", "a member");
- client.sadd("bigset", "another member");
-
- while (set_size > 0) {
- client.sadd("bigset", "member " + set_size);
- set_size -= 1;
- }
-
- client.multi()
- .scard("bigset")
- .sadd("set2","m1","m2")
- .keys("*")
- .smembers("set2")
- .srem("set2","m3","m2","m1")
- .dbsize( test ( "DBSIZE", null, 1 ) )
- .exec( test ( "multi chain with an individual callback", null, [ 1002, 2, [ "bigset", "set2" ], [ "m1", "m2" ], 2, 1 ] ) );
-}
-() );
-
-
-
- //// Pub / Sub.
-
-( function ()
-{
- var pub = fake.createClient ( "pubsub-1" ),
- sub1 = fake.createClient ( "pubsub-1" ),
- sub2 = fake.createClient ( "pubsub-1" ),
- sub3 = fake.createClient ( "pubsub-1" ),
-
- data = [ 0, [], [], [] ],
- tcb1 = test ( "PUBSUB basics", null, [ 4, [ 'mych-alpha', 'mych-beta', 'mych-omega' ], [ 'mych-alpha', 'mych-beta' ], [ 'mych-alpha', 'mych-beta', 'what-what', 'mych-omega' ] ] ),
-
- ord = [],
- tcb2 = test ( "PUBSUB normal / sequence", null, [ 1, '*ch', 'pun', 1 ] ),
-
- thr = test ( "Pubsub mode", null, true ),
- pun = test ( "PUNSUBSCRIBE", null, "*ch" );
-
- sub2.SADD ( "testset", "testmem", function ( err, data )
- {
- ord.push ( data );
- });
-
- sub1.SUBSCRIBE ( "mych" );
- sub2.PSUBSCRIBE ( "*ch" );
- sub3.PSUBSCRIBE ( "my*", "what" );
-
- try
- {
- sub3.PUBLISH ( 'fail', 'fail' );
- thr ( null, false );
- }
- catch ( e )
- {
- thr ( null, true );
- }
-
- sub1.on ( 'message', function ( channel, message )
- {
- data [ 1 ].push ( channel + '-' + message );
-
- if ( message === 'alpha' )
- pub.PUBLISH ( 'mych', 'beta', test ( 'PUB2', null, 3 ) );
- });
-
- sub2.on ( 'pmessage', function ( pattern, channel, message )
- {
- data [ 2 ].push ( channel + '-' + message );
-
- if ( message === 'beta' )
- {
- pub.PUBLISH ( 'ignore', 'ignored', test ( 'PUB3 ignored', null, 0 ) );
- pub.PUBLISH ( 'what', 'what', test ( 'PUB3 delivered', null, 1 ) );
- sub2.PUNSUBSCRIBE ( 'hello', 'world', '*ch' );
- }
- });
-
- sub2.on ( 'punsubscribe', function ( pattern )
- {
- pun ( null, pattern );
-
- ord.push ( 'pun' );
-
- sub2.SREM ( 'testset', 'testmem', function ( err, data )
- {
- ord.push ( data );
- });
-
- sub2.PUBLISH ( 'hello', 'world', test ( 'PUB4 ignored', null, 0 ) );
- sub2.PUBLISH ( 'mych', 'omega', test ( 'PUB5 unsubed', null, 2 ) );
- });
-
- sub3.on ( 'pmessage', function ( pattern, channel, message )
- {
- data [ 3 ].push ( channel + '-' + message );
- });
-
- var start = function ( ch )
- {
- data [ 0 ] ++;
- if ( data [ 0 ] === 4 )
- {
- pub.PUBLISH ( 'mych', 'alpha', test ( 'PUB1', null, 3 ) );
- }
-
- if ( ch === '*ch' )
- ord.push ( ch );
- };
-
- sub1.on ( 'subscribe', start );
- sub2.on ( 'psubscribe', start );
- sub3.on ( 'psubscribe', start );
-
- //// Test the state a bit later.
-
- setTimeout
- (
- function ()
- {
- tcb1 ( null, data );
- tcb2 ( null, ord );
- },
- 1000
- );
-}
-() );
-
-( function ()
-{
- var pub = fake.createClient ( "pubsub-2" ),
- sub1 = fake.createClient ( "pubsub-2" ),
- sub2 = fake.createClient ( "pubsub-2" ),
-
- un1 = [],
- tcb1 = test ( "PUBSUB UNSUBSCRIBE from all", null, [ "one", 3, "two", 2, "three", 1 ] ),
-
- un2 = [],
- tcb2 = test ( "PUBSUB PUNSUBSCRIBE from all", null, [ "on?", 3, "tw?", 2, "thre?", 1 ] ),
-
- good = [],
- tcb3 = test ( "subscribed correctly", null, [ "A", "B", "C", "A", "B", "C" ] ),
-
- bad = [],
- tcb4 = test ( "unsubscribed correctly", null, [] ),
-
- msg = [ 'A', 'B', 'C' ],
-
- x = 0,
- y = 0,
- tcb5 = test ( "sub / unsub counters", null, [ 8, 6 ] );
-
-
-
- sub1.SUBSCRIBE ( 'one' );
- sub1.SUBSCRIBE ( 'two', 'three' );
- sub2.PSUBSCRIBE ( 'on?' );
- sub2.PSUBSCRIBE ( 'tw?', 'thre?' );
-
- sub1.PSUBSCRIBE ( 't?st' );
- sub2.SUBSCRIBE ( 'test' );
-
- sub1.on ( 'message', function ( pat, channel, message )
- {
- bad.push ( message );
- });
- sub2.on ( 'pmessage', function ( channel, message )
- {
- bad.push ( message );
- });
-
- sub1.on ( 'pmessage', function ( pat, channel, message )
- {
- good.push ( message );
- });
- sub2.on ( 'message', function ( channel, message )
- {
- good.push ( message );
- });
-
-
-
- sub1.on ( 'subscribe', function ()
- {
- start ();
- });
- sub1.on ( 'psubscribe', function ()
- {
- start ();
- });
- sub2.on ( 'subscribe', function ()
- {
- start ();
- });
- sub2.on ( 'psubscribe', function ()
- {
- start ();
- });
-
- function start ()
- {
- x ++;
- if ( x < 8 )
- return;
-
- sub1.UNSUBSCRIBE ();
- sub2.PUNSUBSCRIBE ();
- };
-
-
-
- sub1.on ( 'unsubscribe', function ( channel, count )
- {
- un1.push ( channel, count );
- end ();
- });
-
- sub2.on ( 'punsubscribe', function ( pattern, count )
- {
- un2.push ( pattern, count );
- end ();
- });
-
- function end ()
- {
- y ++;
- if ( y < 4 )
- return;
-
- pub.PUBLISH ( 'test', msg.shift () );
- if ( y === 4 )
- pub.PUBLISH ( 'three', 'ignored', test ( "PUB ignored", null, 0 ) );
- };
-
-
- //// Test the state a bit later.
-
- setTimeout
- (
- function ()
- {
- tcb1 ( null, un1 );
- tcb2 ( null, un2 );
- tcb3 ( null, good );
- tcb4 ( null, bad );
- tcb5 ( null, [ x, y ] );
- },
- 1000
- );
-}
-() );
-
-
-
- //// More blocking list stuff.
-
-( function ()
-{
- fake.createClient ().BLPOP ( "list", "mylist", "BL-a", 1, test ( "BLPOP timeout", null, null ) );
- fake.createClient ().BRPOP ( "list", "mylist", "BL-a", 1, test ( "BRPOP timeout", null, null ) );
- fake.createClient ().BRPOPLPUSH ( "list", "mylist", "BL-a", 1, test ( "BRPOPLPUSH timeout", null, null ) );
-}
-() );
-
-
-
- //// Connection state changes and other weirdness.
-
-( function ()
-{
- var redis1 = fake.createClient ( "weird" ),
- redis2 = fake.createClient ( "weird" ),
- redis3 = fake.createClient ( "weird" );
-
-
- redis1.multi ()
- .SET ( "hello", "world" )
- .BLPOP ( "nonex", 0, test ( "BLPOP in transaction", null, null ) )
- .LPUSH ( "step-1", "", test ( "LPUSH empty string", null, 1 ) )
- .exec ();
-
- redis1.BRPOP ( "step-3", 0, test ( "BRPOPLPUSH step 3, chain worked.", null, [ "step-3", "" ] ) );
-
- redis1.MULTI ()
- .get ( "hello", test ( "GET transblocktrans", null, "redis" ) )
- .blpop ( "nonex", 0, test ( "BLPOP in postblock transaction", null, null ) )
- .publish ( "hello", "world", test ( "PUBLISH in postblock transaction", null, 1 ) )
- .exec ();
-
- redis2.BRPOPLPUSH ( "step-2", "step-3", 0, test ( "BRPOPLPUSH step 2", null, "" ) );
- redis2.SET ( "hello", "redis" );
-
- redis3.BRPOPLPUSH ( "step-1", "step-2", 0, test ( "BRPOPLPUSH step 1", null, "" ) );
- redis3.SUBSCRIBE ( "hello" );
-
-
- redis3.on ( 'message', function ( channel, message )
- {
- if ( channel === 'hello' && message === 'world' )
- redis3.UNSUBSCRIBE ();
- });
-
- redis3.on ( 'unsubscribe', function ( channel )
- {
- if ( channel === 'hello' )
- redis3.LPUSH ( "end-message", "Hello World!" );
- });
-
-
- redis1.BLPOP ( "end-message", 0, test ( "Multi + Blocking + Pubsub, end result", null, [ "end-message", "Hello World!" ] ) );
-}
-() );
-
-
-
- //// Sort.
-
-( function ()
-{
- var redis = fake.createClient (),
- result;
-
- //// Simple num and alpha sort.
-
- redis.LPUSH ( "list", "2", "11", 3, 1 );
- redis.SORT ( "list", test ( "SORT num", null, [ "1", "2", "3", "11" ] ) );
- redis.DEL ( "list" );
-
- redis.LPUSH ( "list", "2", "a", "11", 3, 1, "A", "-", "_", ".", "~", "*" );
- redis.SORT ( "list", test ( "SORT scorefail", BAD_SORT, null ) );
- redis.SORT ( "list", "alpha", test ( "SORT alpha", null, [ "*", "-", ".", "1", "11", "2", "3", "A", "_", "a", "~" ] ) );
- redis.DEL ( "list" );
-
- //// By clause.
-
- redis.LPUSH ( "list", 11, 22, "hello", "abra", "opa" );
- redis.SET ( "w11w", -1 );
- redis.SET ( "w22w", 1 );
- redis.SORT ( "list", "by", "w*w", test ( "SORT num by +MVs, str*", null, [ "11", "abra", "hello", "opa", "22" ] ) );
- redis.DEL ( "list", "w11w", "w22w" );
-
- //// Test BY and GET clauses.
-
- redis.LPUSH ( "list", 11, 22, 33, 44, 55 );
- redis.SADD ( "set", 11, 22, 33, 44, 55 );
- redis.ZADD ( "zset", 0, 11, 0, 22, 0, 33, 0, 44, 0, 55 );
-
- redis.HMSET ( "o11", "name", "tuti", "age", 25 );
- redis.HMSET ( "o22", "name", "ivo", "age", 26 );
- redis.HMSET ( "o33", "name", "lino", "age", 27 );
- redis.HMSET ( "o44", "name", "mina", "age", 20 );
- redis.HMSET ( "o55", "name", "kemi", "age", 18 );
-
- result = [ "55", "kemi", "44", "mina", "11", "tuti", "22", "ivo", "33", "lino" ];
-
- redis.SORT ( "list", "by", "o*->age", "get", "#", "get", "o*->name", test ( "SORT list by+get, h*->f", null, result ) );
- redis.SORT ( "set", "by", "o*->age", "get", "#", "get", "o*->name", test ( "SORT set by+get, h*->f", null, result ) );
- redis.SORT ( "zset", "by", "o*->age", "get", "#", "get", "o*->name", test ( "SORT zset by+get, h*->f", null, result ) );
-
- redis.SORT ( "zset", "by", "o*->age", "get", "#", "get", "o*->name", "store", "storekey", test ( "SORT zset by+get, h*->f, STORE", null, result.length ) );
- redis.LRANGE ( "storekey", 0, -1, test ( "SORT zset by+get, h*->f, STORE / LRANGE", null, result ) );
-
- //// Negative offset behaves differently here and in ZRANGEBYSCORE
-
- redis.SORT ( "list", "by", "o*->age", "limit", 0, 2, "get", "#", "get", "o*->name", test ( "SORT limit", null, result.slice ( 0, 4 ) ) );
- redis.SORT ( "list", "by", "o*->age", "limit", 2, 4, "get", "#", "get", "o*->name", test ( "SORT limit +offset", null, result.slice ( 4 ) ) );
- redis.SORT ( "list", "by", "o*->age", "limit", 2, -10, "get", "#", "get", "o*->name", test ( "SORT limit +negcount", null, result.slice ( 4 ) ) );
- redis.SORT ( "list", "by", "o*->age", "limit", -2, 2, "get", "#", "get", "o*->name", test ( "SORT limit +negoffset+negcount", null, result.slice ( 0, 4 ) ) );
-
- redis.HSET ( "o11", "age", "not-a-number" );
- redis.SORT ( "list", "by", "o*->age", "get", "#", "get", "o*->name", test ( "SORT by+scorefail", BAD_SORT, null ) );
-
- //// Edge cases.
-
- redis.SORT ( "nonex", test ( "SORT nonex", null, [] ) );
- redis.SORT ( "nonex", "by", "o*->age", test ( "SORT nonex+by", null, [] ) );
- redis.SORT ( "nonex", "by", "o*->age", "get", "#", "get", "o*->name", test ( "SORT nonex+by+get", null, [] ) );
- redis.SET ( "hello", "world" );
- redis.SORT ( "hello", test ( "SORT bad type", BAD_TYPE, null ) );
-}
-() );
-
-
-
- //// Keyspace dump.
-
-( function ()
-{
- var redis = fake.createClient ();
-
- redis.SET ( "hello", "redis" );
- redis.SET ( "mykey", "some string" );
- redis.SADD ( "myset", "m3", "m2", "m1" );
- redis.ZADD ( "myzset", 10, "zm1", 5, "zm2", -5, "zm3" );
- redis.HMSET ( "myhash", "field1", "value1", "field2", "value2" );
- redis.LPUSH ( "mylist", "e1", "e2", "e3" );
-
- redis.getKeyspace ( "my*", test
- (
- "keyspace dump, all types", null,
- [
- "myhash", "-1", "hash", [ "field1", "value1", "field2", "value2" ],
- "mykey", "-1", "string", "some string",
- "mylist", "-1", "list", [ "e3", "e2", "e1" ],
- "myset", "-1", "set", [ "m1", "m2", "m3" ],
- "myzset", "-1", "zset", [ "zm3", "-5", "zm2", "5", "zm1", "10" ]
- ]
- ));
-}
-() );
-
-
-// Select.
-(function () {
-
- var redis1 = fake.createClient("select-test");
- var redis2 = fake.createClient("select-test");
- var redis3 = fake.createClient("select-test");
-
- var finish = test("SELECT, cross-database pubsub", null, "Hey you!");
-
- redis2.SUBSCRIBE("PASS");
- redis2.on('message', function(channel, message) {
- finish(null, message);
- });
-
- redis1.SET("A", "Hola");
- redis1.SELECT(1, test("SELECT 1", null, OK));
-
- redis1.GET("A", test("SELECT, keyspace isolation", null, null));
- redis1.SET("A", "Hello", function() {
-
- redis3.GET("A", test("SELECT, connection selection isolation", null, "Hola"));
- redis3.SET("A", "Hola!!!", function() {
-
- redis1.SELECT(0, test("SELECT 0", null, OK));
- redis1.GET("A", test("SELECT, keyspace switching", null, "Hola!!!"));
-
- redis1.SELECT(-1, test("SELECT BAD_DB neg", BAD_DB, null));
- redis1.SELECT("X", test("SELECT BAD_DB X", BAD_DB, null));
- redis1.SELECT(111.4, test("SELECT BAD_DB float", BAD_DB, null));
-
- redis1.SELECT(2000, test("SELECT 2000", null, OK));
- redis1.PUBLISH("PASS", "Hey you!");
- });
- });
-} ());
-
-
-// Select with blocking.
-(function () {
-
- var redis1 = fake.createClient("select-test2");
- var redis2 = fake.createClient("select-test2");
- var redis3 = fake.createClient("select-test2");
-
- redis1.BLPOP("list", "other", 1, test("SELECT 0 + BLPOP", null, ["list", "hello list in 0"]));
-
- redis2.SELECT(1);
- redis2.BRPOP("other", "list", 1, test("SELECT 1 + BRPOP", null, ["list", "hello list in 1"]));
-
- redis3.SELECT(2);
- redis3.LPUSH("list", "wrong!");
- redis3.SELECT(1);
- redis3.LPUSH("list", "hello list in 1");
- redis3.SELECT(0);
- redis3.RPUSH("list", "hello list in 0");
-} ());
-
-
- //// Test shorthand.
-
-var TEST_COUNT, numErrors;
-
-function test ( name, xErr, xData )
-{
- var timeout,
- c = TEST_COUNT = ( TEST_COUNT || 0 ) + 1;
-
- xErr = JSON.stringify ( xErr );
- xData = JSON.stringify ( xData );
-
- timeout = setTimeout
- (
- function ()
- {
- numErrors = ( numErrors || 0 ) + 1;
- process.stdout.write ( '\x1B[1;31m\n ✗ #' + c + ' ' + name + '\x1B[0m:\n\tDidn\'t call back.\n\txErr = ' + xErr + '\t\txData = ' + xData + '\n\n' );
- },
- 5000
- );
-
- return function ( err, data )
- {
- clearTimeout ( timeout );
- if ( err )
- err = err.message;
-
- err = JSON.stringify ( err );
- data = JSON.stringify ( data );
-
- if ( typeof err === 'object' )
- err = err.toString ();
- if ( typeof data === 'object' )
- data = data.toString ();
-
- if ( err === xErr && data === xData )
- process.stdout.write ( '\x1B[1;32m ✓ #' + c + ' ' + name + '\x1B[0m\n' );
-
- else
- {
- numErrors = ( numErrors || 0 ) + 1;
- process.stdout.write ( '\x1B[1;31m\n ✗ #' + c + ' ' + name + '\x1B[0m:\n\terr = ' + err + '\t\tdata = ' + data + '\n\txErr = ' + xErr + '\t\txData = ' + xData + '\n\n' );
- }
- };
-}
-
-var doexit = false;
-process.on ( 'exit', function ()
-{
- if ( doexit )
- return;
- doexit = true;
-
- if ( !numErrors )
- {
- process.stdout.write ( '\n\x1B[1;32m ✓ All good.\x1B[0m\n' );
- process.exit ( 0 );
- }
-
- else
- {
- process.stdout.write ( '\x1B[1;31m\n ✗ ' + numErrors + ' broken.\x1B[0m\n' );
- process.exit ( 1 );
- }
-});
-
-
diff --git a/node_modules/hiredis/COPYING b/node_modules/hiredis/COPYING
deleted file mode 100644
index 211acd56..00000000
--- a/node_modules/hiredis/COPYING
+++ /dev/null
@@ -1,27 +0,0 @@
-Copyright (c) 2010-2012, Pieter Noordhuis
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without modification,
-are permitted provided that the following conditions are met:
-
-* Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
-
-* Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following disclaimer in the documentation
- and/or other materials provided with the distribution.
-
-* Neither the name of Redis nor the names of its contributors may be used to
- endorse or promote products derived from this software without specific prior
- written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
-ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
-ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/node_modules/hiredis/README.md b/node_modules/hiredis/README.md
deleted file mode 100644
index 0573d223..00000000
--- a/node_modules/hiredis/README.md
+++ /dev/null
@@ -1,70 +0,0 @@
-[](https://travis-ci.org/pietern/hiredis-node)
-
-# hiredis-node
-
-Node extension that wraps [hiredis][hiredis].
-Because Node is already good at doing I/O, hiredis-node only provides
-bindings to the protocol parser.
-The hiredis protocol parser is faster than JavaScript protocol parsers,
-but the speedup only becomes noticable for large replies.
-If you use Redis for simple SET/GET operations, there won't be a big
-benefit to using hiredis.
-If you use Redis for big SUNION/SINTER/LRANGE/ZRANGE operations, the
-benefit to using hiredis-node can be significant.
-
-[hiredis]: http://github.com/redis/hiredis
-
-## Install
-
-Install with [NPM][npm]:
-
-```
-npm install hiredis
-```
-
-[npm]: https://npmjs.org/
-
-## Usage
-
-hiredis-node works out of the box with Matt Ranney's [node_redis][node_redis].
-The latter has an optional dependency on hiredis-node, so maybe you're
-already using it without knowing.
-
-Alternatively, you can use it directly:
-
-```javascript
-var hiredis = require("hiredis"),
- reader = new hiredis.Reader();
-
-// Data comes in
-reader.feed("$5\r\nhello\r\n");
-
-// Reply comes out
-reader.get() // => "hello"
-```
-
-Instead of returning strings for bulk payloads, it can also return
-buffers:
-
-```javascript
-var hiredis = require("hiredis"),
- reader = new hiredis.Reader({ return_buffers: true });
-
-// Data comes in
-reader.feed("$5\r\nhello\r\n");
-
-// Reply comes out
-reader.get() // =>
-```
-
-[node_redis]: http://github.com/mranney/node_redis
-
-## Windows
-
-Dmitry Gorbunov (@fuwaneko) made a [fork of hiredis-node][windows_fork] with Windows support.
-
-[windows_fork]: https://github.com/fuwaneko/hiredis-node
-
-## License
-
-This code is released under the BSD license, after the license of hiredis.
diff --git a/node_modules/hiredis/bench.js b/node_modules/hiredis/bench.js
deleted file mode 100644
index 01433caa..00000000
--- a/node_modules/hiredis/bench.js
+++ /dev/null
@@ -1,121 +0,0 @@
-var hiredis = require("./hiredis"),
- num_clients = 10,
- active_clients = 0,
- pipeline = 0,
- num_requests = parseInt(process.argv[2]) || 20000,
- issued_requests = 0,
- test_start;
-
-var tests = [];
-tests.push({
- descr: "PING",
- command: ["PING"]
-});
-tests.push({
- descr: "SET",
- command: ["SET", "foo", "bar"]
-});
-tests.push({
- descr: "GET",
- command: ["GET", "foo"]
-});
-tests.push({
- descr: "LPUSH 8 bytes",
- command: ["LPUSH", "mylist-8", new Buffer(Array(8).join("-"))]
-});
-tests.push({
- descr: "LPUSH 64 bytes",
- command: ["LPUSH", "mylist-64", new Buffer(Array(64).join("-"))]
-});
-tests.push({
- descr: "LPUSH 512 bytes",
- command: ["LPUSH", "mylist-512", new Buffer(Array(512).join("-"))]
-});
-tests.push({
- descr: "LRANGE 10 elements, 8 bytes",
- command: ["LRANGE", "mylist-8", "0", "9"]
-});
-tests.push({
- descr: "LRANGE 100 elements, 8 bytes",
- command: ["LRANGE", "mylist-8", "0", "99"]
-});
-tests.push({
- descr: "LRANGE 100 elements, 64 bytes",
- command: ["LRANGE", "mylist-64", "0", "99"]
-});
-tests.push({
- descr: "LRANGE 100 elements, 512 bytes",
- command: ["LRANGE", "mylist-512", "0", "99"]
-});
-
-function call(client, test) {
- client.on("reply", function() {
- if (issued_requests < num_requests) {
- request();
- } else {
- client.end();
- if (--active_clients == 0)
- done(test);
- }
- });
-
- function request() {
- issued_requests++;
- client.write.apply(client,test.command);
- };
-
- request();
-}
-
-function done(test) {
- var time = (new Date - test_start);
- var op_rate = (num_requests/(time/1000.0)).toFixed(2);
- console.log(test.descr + ": " + op_rate + " ops/sec");
- next();
-}
-
-function concurrent_test(test) {
- var i = num_clients;
- var client;
-
- issued_requests = 0;
- test_start = new Date;
- while(i-- && issued_requests < num_requests) {
- active_clients++;
- client = hiredis.createConnection();
- call(client, test);
- }
-}
-
-function pipelined_test(test) {
- var client = hiredis.createConnection();
- var received_replies = 0;
-
- issued_requests = 0;
- while (issued_requests < num_requests) {
- issued_requests++;
- client.write.apply(client,test.command);
- }
-
- test_start = new Date;
- client.on("reply", function() {
- if (++received_replies == num_requests) {
- client.end();
- done(test);
- }
- });
-}
-
-function next() {
- var test = tests.shift();
- if (test) {
- if (pipeline) {
- pipelined_test(test);
- } else {
- concurrent_test(test);
- }
- }
-}
-
-next();
-
diff --git a/node_modules/hiredis/binding.gyp b/node_modules/hiredis/binding.gyp
deleted file mode 100644
index f968fa7f..00000000
--- a/node_modules/hiredis/binding.gyp
+++ /dev/null
@@ -1,21 +0,0 @@
-{
- 'targets': [
- {
- 'target_name': 'hiredis',
- 'sources': [
- 'src/hiredis.cc'
- , 'src/reader.cc'
- ],
- 'dependencies': [
- 'deps/hiredis.gyp:hiredis'
- ],
- 'defines': [
- '_GNU_SOURCE'
- ],
- 'cflags': [
- '-Wall',
- '-O3'
- ]
- }
- ]
-}
diff --git a/node_modules/hiredis/build/Makefile b/node_modules/hiredis/build/Makefile
deleted file mode 100644
index 4a97ea7b..00000000
--- a/node_modules/hiredis/build/Makefile
+++ /dev/null
@@ -1,337 +0,0 @@
-# We borrow heavily from the kernel build setup, though we are simpler since
-# we don't have Kconfig tweaking settings on us.
-
-# The implicit make rules have it looking for RCS files, among other things.
-# We instead explicitly write all the rules we care about.
-# It's even quicker (saves ~200ms) to pass -r on the command line.
-MAKEFLAGS=-r
-
-# The source directory tree.
-srcdir := ..
-abs_srcdir := $(abspath $(srcdir))
-
-# The name of the builddir.
-builddir_name ?= .
-
-# The V=1 flag on command line makes us verbosely print command lines.
-ifdef V
- quiet=
-else
- quiet=quiet_
-endif
-
-# Specify BUILDTYPE=Release on the command line for a release build.
-BUILDTYPE ?= Release
-
-# Directory all our build output goes into.
-# Note that this must be two directories beneath src/ for unit tests to pass,
-# as they reach into the src/ directory for data with relative paths.
-builddir ?= $(builddir_name)/$(BUILDTYPE)
-abs_builddir := $(abspath $(builddir))
-depsdir := $(builddir)/.deps
-
-# Object output directory.
-obj := $(builddir)/obj
-abs_obj := $(abspath $(obj))
-
-# We build up a list of every single one of the targets so we can slurp in the
-# generated dependency rule Makefiles in one pass.
-all_deps :=
-
-
-
-CC.target ?= $(CC)
-CFLAGS.target ?= $(CFLAGS)
-CXX.target ?= $(CXX)
-CXXFLAGS.target ?= $(CXXFLAGS)
-LINK.target ?= $(LINK)
-LDFLAGS.target ?= $(LDFLAGS)
-AR.target ?= $(AR)
-
-# C++ apps need to be linked with g++.
-#
-# Note: flock is used to seralize linking. Linking is a memory-intensive
-# process so running parallel links can often lead to thrashing. To disable
-# the serialization, override LINK via an envrionment variable as follows:
-#
-# export LINK=g++
-#
-# This will allow make to invoke N linker processes as specified in -jN.
-LINK ?= flock $(builddir)/linker.lock $(CXX.target)
-
-# TODO(evan): move all cross-compilation logic to gyp-time so we don't need
-# to replicate this environment fallback in make as well.
-CC.host ?= gcc
-CFLAGS.host ?=
-CXX.host ?= g++
-CXXFLAGS.host ?=
-LINK.host ?= $(CXX.host)
-LDFLAGS.host ?=
-AR.host ?= ar
-
-# Define a dir function that can handle spaces.
-# http://www.gnu.org/software/make/manual/make.html#Syntax-of-Functions
-# "leading spaces cannot appear in the text of the first argument as written.
-# These characters can be put into the argument value by variable substitution."
-empty :=
-space := $(empty) $(empty)
-
-# http://stackoverflow.com/questions/1189781/using-make-dir-or-notdir-on-a-path-with-spaces
-replace_spaces = $(subst $(space),?,$1)
-unreplace_spaces = $(subst ?,$(space),$1)
-dirx = $(call unreplace_spaces,$(dir $(call replace_spaces,$1)))
-
-# Flags to make gcc output dependency info. Note that you need to be
-# careful here to use the flags that ccache and distcc can understand.
-# We write to a dep file on the side first and then rename at the end
-# so we can't end up with a broken dep file.
-depfile = $(depsdir)/$(call replace_spaces,$@).d
-DEPFLAGS = -MMD -MF $(depfile).raw
-
-# We have to fixup the deps output in a few ways.
-# (1) the file output should mention the proper .o file.
-# ccache or distcc lose the path to the target, so we convert a rule of
-# the form:
-# foobar.o: DEP1 DEP2
-# into
-# path/to/foobar.o: DEP1 DEP2
-# (2) we want missing files not to cause us to fail to build.
-# We want to rewrite
-# foobar.o: DEP1 DEP2 \
-# DEP3
-# to
-# DEP1:
-# DEP2:
-# DEP3:
-# so if the files are missing, they're just considered phony rules.
-# We have to do some pretty insane escaping to get those backslashes
-# and dollar signs past make, the shell, and sed at the same time.
-# Doesn't work with spaces, but that's fine: .d files have spaces in
-# their names replaced with other characters.
-define fixup_dep
-# The depfile may not exist if the input file didn't have any #includes.
-touch $(depfile).raw
-# Fixup path as in (1).
-sed -e "s|^$(notdir $@)|$@|" $(depfile).raw >> $(depfile)
-# Add extra rules as in (2).
-# We remove slashes and replace spaces with new lines;
-# remove blank lines;
-# delete the first line and append a colon to the remaining lines.
-sed -e 's|\\||' -e 'y| |\n|' $(depfile).raw |\
- grep -v '^$$' |\
- sed -e 1d -e 's|$$|:|' \
- >> $(depfile)
-rm $(depfile).raw
-endef
-
-# Command definitions:
-# - cmd_foo is the actual command to run;
-# - quiet_cmd_foo is the brief-output summary of the command.
-
-quiet_cmd_cc = CC($(TOOLSET)) $@
-cmd_cc = $(CC.$(TOOLSET)) $(GYP_CFLAGS) $(DEPFLAGS) $(CFLAGS.$(TOOLSET)) -c -o $@ $<
-
-quiet_cmd_cxx = CXX($(TOOLSET)) $@
-cmd_cxx = $(CXX.$(TOOLSET)) $(GYP_CXXFLAGS) $(DEPFLAGS) $(CXXFLAGS.$(TOOLSET)) -c -o $@ $<
-
-quiet_cmd_touch = TOUCH $@
-cmd_touch = touch $@
-
-quiet_cmd_copy = COPY $@
-# send stderr to /dev/null to ignore messages when linking directories.
-cmd_copy = rm -rf "$@" && cp -af "$<" "$@"
-
-quiet_cmd_alink = AR($(TOOLSET)) $@
-cmd_alink = rm -f $@ && $(AR.$(TOOLSET)) crs $@ $(filter %.o,$^)
-
-quiet_cmd_alink_thin = AR($(TOOLSET)) $@
-cmd_alink_thin = rm -f $@ && $(AR.$(TOOLSET)) crsT $@ $(filter %.o,$^)
-
-# Due to circular dependencies between libraries :(, we wrap the
-# special "figure out circular dependencies" flags around the entire
-# input list during linking.
-quiet_cmd_link = LINK($(TOOLSET)) $@
-cmd_link = $(LINK.$(TOOLSET)) $(GYP_LDFLAGS) $(LDFLAGS.$(TOOLSET)) -o $@ -Wl,--start-group $(LD_INPUTS) -Wl,--end-group $(LIBS)
-
-# We support two kinds of shared objects (.so):
-# 1) shared_library, which is just bundling together many dependent libraries
-# into a link line.
-# 2) loadable_module, which is generating a module intended for dlopen().
-#
-# They differ only slightly:
-# In the former case, we want to package all dependent code into the .so.
-# In the latter case, we want to package just the API exposed by the
-# outermost module.
-# This means shared_library uses --whole-archive, while loadable_module doesn't.
-# (Note that --whole-archive is incompatible with the --start-group used in
-# normal linking.)
-
-# Other shared-object link notes:
-# - Set SONAME to the library filename so our binaries don't reference
-# the local, absolute paths used on the link command-line.
-quiet_cmd_solink = SOLINK($(TOOLSET)) $@
-cmd_solink = $(LINK.$(TOOLSET)) -shared $(GYP_LDFLAGS) $(LDFLAGS.$(TOOLSET)) -Wl,-soname=$(@F) -o $@ -Wl,--whole-archive $(LD_INPUTS) -Wl,--no-whole-archive $(LIBS)
-
-quiet_cmd_solink_module = SOLINK_MODULE($(TOOLSET)) $@
-cmd_solink_module = $(LINK.$(TOOLSET)) -shared $(GYP_LDFLAGS) $(LDFLAGS.$(TOOLSET)) -Wl,-soname=$(@F) -o $@ -Wl,--start-group $(filter-out FORCE_DO_CMD, $^) -Wl,--end-group $(LIBS)
-
-
-# Define an escape_quotes function to escape single quotes.
-# This allows us to handle quotes properly as long as we always use
-# use single quotes and escape_quotes.
-escape_quotes = $(subst ','\'',$(1))
-# This comment is here just to include a ' to unconfuse syntax highlighting.
-# Define an escape_vars function to escape '$' variable syntax.
-# This allows us to read/write command lines with shell variables (e.g.
-# $LD_LIBRARY_PATH), without triggering make substitution.
-escape_vars = $(subst $$,$$$$,$(1))
-# Helper that expands to a shell command to echo a string exactly as it is in
-# make. This uses printf instead of echo because printf's behaviour with respect
-# to escape sequences is more portable than echo's across different shells
-# (e.g., dash, bash).
-exact_echo = printf '%s\n' '$(call escape_quotes,$(1))'
-
-# Helper to compare the command we're about to run against the command
-# we logged the last time we ran the command. Produces an empty
-# string (false) when the commands match.
-# Tricky point: Make has no string-equality test function.
-# The kernel uses the following, but it seems like it would have false
-# positives, where one string reordered its arguments.
-# arg_check = $(strip $(filter-out $(cmd_$(1)), $(cmd_$@)) \
-# $(filter-out $(cmd_$@), $(cmd_$(1))))
-# We instead substitute each for the empty string into the other, and
-# say they're equal if both substitutions produce the empty string.
-# .d files contain ? instead of spaces, take that into account.
-command_changed = $(or $(subst $(cmd_$(1)),,$(cmd_$(call replace_spaces,$@))),\
- $(subst $(cmd_$(call replace_spaces,$@)),,$(cmd_$(1))))
-
-# Helper that is non-empty when a prerequisite changes.
-# Normally make does this implicitly, but we force rules to always run
-# so we can check their command lines.
-# $? -- new prerequisites
-# $| -- order-only dependencies
-prereq_changed = $(filter-out FORCE_DO_CMD,$(filter-out $|,$?))
-
-# Helper that executes all postbuilds until one fails.
-define do_postbuilds
- @E=0;\
- for p in $(POSTBUILDS); do\
- eval $$p;\
- E=$$?;\
- if [ $$E -ne 0 ]; then\
- break;\
- fi;\
- done;\
- if [ $$E -ne 0 ]; then\
- rm -rf "$@";\
- exit $$E;\
- fi
-endef
-
-# do_cmd: run a command via the above cmd_foo names, if necessary.
-# Should always run for a given target to handle command-line changes.
-# Second argument, if non-zero, makes it do asm/C/C++ dependency munging.
-# Third argument, if non-zero, makes it do POSTBUILDS processing.
-# Note: We intentionally do NOT call dirx for depfile, since it contains ? for
-# spaces already and dirx strips the ? characters.
-define do_cmd
-$(if $(or $(command_changed),$(prereq_changed)),
- @$(call exact_echo, $($(quiet)cmd_$(1)))
- @mkdir -p "$(call dirx,$@)" "$(dir $(depfile))"
- $(if $(findstring flock,$(word 1,$(cmd_$1))),
- @$(cmd_$(1))
- @echo " $(quiet_cmd_$(1)): Finished",
- @$(cmd_$(1))
- )
- @$(call exact_echo,$(call escape_vars,cmd_$(call replace_spaces,$@) := $(cmd_$(1)))) > $(depfile)
- @$(if $(2),$(fixup_dep))
- $(if $(and $(3), $(POSTBUILDS)),
- $(call do_postbuilds)
- )
-)
-endef
-
-# Declare the "all" target first so it is the default,
-# even though we don't have the deps yet.
-.PHONY: all
-all:
-
-# make looks for ways to re-generate included makefiles, but in our case, we
-# don't have a direct way. Explicitly telling make that it has nothing to do
-# for them makes it go faster.
-%.d: ;
-
-# Use FORCE_DO_CMD to force a target to run. Should be coupled with
-# do_cmd.
-.PHONY: FORCE_DO_CMD
-FORCE_DO_CMD:
-
-TOOLSET := target
-# Suffix rules, putting all outputs into $(obj).
-$(obj).$(TOOLSET)/%.o: $(srcdir)/%.c FORCE_DO_CMD
- @$(call do_cmd,cc,1)
-$(obj).$(TOOLSET)/%.o: $(srcdir)/%.cc FORCE_DO_CMD
- @$(call do_cmd,cxx,1)
-$(obj).$(TOOLSET)/%.o: $(srcdir)/%.cpp FORCE_DO_CMD
- @$(call do_cmd,cxx,1)
-$(obj).$(TOOLSET)/%.o: $(srcdir)/%.cxx FORCE_DO_CMD
- @$(call do_cmd,cxx,1)
-$(obj).$(TOOLSET)/%.o: $(srcdir)/%.S FORCE_DO_CMD
- @$(call do_cmd,cc,1)
-$(obj).$(TOOLSET)/%.o: $(srcdir)/%.s FORCE_DO_CMD
- @$(call do_cmd,cc,1)
-
-# Try building from generated source, too.
-$(obj).$(TOOLSET)/%.o: $(obj).$(TOOLSET)/%.c FORCE_DO_CMD
- @$(call do_cmd,cc,1)
-$(obj).$(TOOLSET)/%.o: $(obj).$(TOOLSET)/%.cc FORCE_DO_CMD
- @$(call do_cmd,cxx,1)
-$(obj).$(TOOLSET)/%.o: $(obj).$(TOOLSET)/%.cpp FORCE_DO_CMD
- @$(call do_cmd,cxx,1)
-$(obj).$(TOOLSET)/%.o: $(obj).$(TOOLSET)/%.cxx FORCE_DO_CMD
- @$(call do_cmd,cxx,1)
-$(obj).$(TOOLSET)/%.o: $(obj).$(TOOLSET)/%.S FORCE_DO_CMD
- @$(call do_cmd,cc,1)
-$(obj).$(TOOLSET)/%.o: $(obj).$(TOOLSET)/%.s FORCE_DO_CMD
- @$(call do_cmd,cc,1)
-
-$(obj).$(TOOLSET)/%.o: $(obj)/%.c FORCE_DO_CMD
- @$(call do_cmd,cc,1)
-$(obj).$(TOOLSET)/%.o: $(obj)/%.cc FORCE_DO_CMD
- @$(call do_cmd,cxx,1)
-$(obj).$(TOOLSET)/%.o: $(obj)/%.cpp FORCE_DO_CMD
- @$(call do_cmd,cxx,1)
-$(obj).$(TOOLSET)/%.o: $(obj)/%.cxx FORCE_DO_CMD
- @$(call do_cmd,cxx,1)
-$(obj).$(TOOLSET)/%.o: $(obj)/%.S FORCE_DO_CMD
- @$(call do_cmd,cc,1)
-$(obj).$(TOOLSET)/%.o: $(obj)/%.s FORCE_DO_CMD
- @$(call do_cmd,cc,1)
-
-
-ifeq ($(strip $(foreach prefix,$(NO_LOAD),\
- $(findstring $(join ^,$(prefix)),\
- $(join ^,deps/hiredis.target.mk)))),)
- include deps/hiredis.target.mk
-endif
-ifeq ($(strip $(foreach prefix,$(NO_LOAD),\
- $(findstring $(join ^,$(prefix)),\
- $(join ^,hiredis.target.mk)))),)
- include hiredis.target.mk
-endif
-
-quiet_cmd_regen_makefile = ACTION Regenerating $@
-cmd_regen_makefile = cd $(srcdir); /usr/local/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py -fmake --ignore-environment "--toplevel-dir=." -I/home/theory/dropbox/Public/gun/node_modules/hiredis/build/config.gypi -I/usr/local/lib/node_modules/npm/node_modules/node-gyp/addon.gypi -I/home/theory/.node-gyp/0.10.26/common.gypi "--depth=." "-Goutput_dir=." "--generator-output=build" "-Dlibrary=shared_library" "-Dvisibility=default" "-Dnode_root_dir=/home/theory/.node-gyp/0.10.26" "-Dmodule_root_dir=/home/theory/dropbox/Public/gun/node_modules/hiredis" binding.gyp
-Makefile: $(srcdir)/deps/hiredis.gyp $(srcdir)/../../../../../.node-gyp/0.10.26/common.gypi $(srcdir)/build/config.gypi $(srcdir)/binding.gyp $(srcdir)/../../../../../../../usr/local/lib/node_modules/npm/node_modules/node-gyp/addon.gypi
- $(call do_cmd,regen_makefile)
-
-# "all" is a concatenation of the "all" targets from all the included
-# sub-makefiles. This is just here to clarify.
-all:
-
-# Add in dependency-tracking rules. $(all_deps) is the list of every single
-# target in our tree. Only consider the ones with .d (dependency) info:
-d_files := $(wildcard $(foreach f,$(all_deps),$(depsdir)/$(f).d))
-ifneq ($(d_files),)
- include $(d_files)
-endif
diff --git a/node_modules/hiredis/build/Release/.deps/Release/hiredis.a.d b/node_modules/hiredis/build/Release/.deps/Release/hiredis.a.d
deleted file mode 100644
index 6e44f789..00000000
--- a/node_modules/hiredis/build/Release/.deps/Release/hiredis.a.d
+++ /dev/null
@@ -1 +0,0 @@
-cmd_Release/hiredis.a := rm -rf "Release/hiredis.a" && cp -af "Release/obj.target/deps/hiredis.a" "Release/hiredis.a"
diff --git a/node_modules/hiredis/build/Release/.deps/Release/hiredis.node.d b/node_modules/hiredis/build/Release/.deps/Release/hiredis.node.d
deleted file mode 100644
index bc3f1a0f..00000000
--- a/node_modules/hiredis/build/Release/.deps/Release/hiredis.node.d
+++ /dev/null
@@ -1 +0,0 @@
-cmd_Release/hiredis.node := rm -rf "Release/hiredis.node" && cp -af "Release/obj.target/hiredis.node" "Release/hiredis.node"
diff --git a/node_modules/hiredis/build/Release/.deps/Release/obj.target/deps/hiredis.a.d b/node_modules/hiredis/build/Release/.deps/Release/obj.target/deps/hiredis.a.d
deleted file mode 100644
index 4d3f3545..00000000
--- a/node_modules/hiredis/build/Release/.deps/Release/obj.target/deps/hiredis.a.d
+++ /dev/null
@@ -1 +0,0 @@
-cmd_Release/obj.target/deps/hiredis.a := rm -f Release/obj.target/deps/hiredis.a && ar crs Release/obj.target/deps/hiredis.a Release/obj.target/hiredis/deps/hiredis/hiredis.o Release/obj.target/hiredis/deps/hiredis/net.o Release/obj.target/hiredis/deps/hiredis/sds.o Release/obj.target/hiredis/deps/hiredis/async.o
diff --git a/node_modules/hiredis/build/Release/.deps/Release/obj.target/hiredis.node.d b/node_modules/hiredis/build/Release/.deps/Release/obj.target/hiredis.node.d
deleted file mode 100644
index e9001a19..00000000
--- a/node_modules/hiredis/build/Release/.deps/Release/obj.target/hiredis.node.d
+++ /dev/null
@@ -1 +0,0 @@
-cmd_Release/obj.target/hiredis.node := flock ./Release/linker.lock g++ -shared -pthread -rdynamic -m64 -Wl,-soname=hiredis.node -o Release/obj.target/hiredis.node -Wl,--start-group Release/obj.target/hiredis/src/hiredis.o Release/obj.target/hiredis/src/reader.o Release/obj.target/deps/hiredis.a -Wl,--end-group
diff --git a/node_modules/hiredis/build/Release/.deps/Release/obj.target/hiredis/deps/hiredis/async.o.d b/node_modules/hiredis/build/Release/.deps/Release/obj.target/hiredis/deps/hiredis/async.o.d
deleted file mode 100644
index 35f760c6..00000000
--- a/node_modules/hiredis/build/Release/.deps/Release/obj.target/hiredis/deps/hiredis/async.o.d
+++ /dev/null
@@ -1,13 +0,0 @@
-cmd_Release/obj.target/hiredis/deps/hiredis/async.o := cc '-D_LARGEFILE_SOURCE' '-D_FILE_OFFSET_BITS=64' -I/home/theory/.node-gyp/0.10.26/src -I/home/theory/.node-gyp/0.10.26/deps/uv/include -I/home/theory/.node-gyp/0.10.26/deps/v8/include -fPIC -Wall -Wextra -Wno-unused-parameter -pthread -m64 -O2 -fno-strict-aliasing -fno-tree-vrp -fno-tree-sink -fno-omit-frame-pointer -MMD -MF ./Release/.deps/Release/obj.target/hiredis/deps/hiredis/async.o.d.raw -c -o Release/obj.target/hiredis/deps/hiredis/async.o ../deps/hiredis/async.c
-Release/obj.target/hiredis/deps/hiredis/async.o: ../deps/hiredis/async.c \
- ../deps/hiredis/fmacros.h ../deps/hiredis/async.h \
- ../deps/hiredis/hiredis.h ../deps/hiredis/net.h ../deps/hiredis/dict.c \
- ../deps/hiredis/dict.h ../deps/hiredis/sds.h
-../deps/hiredis/async.c:
-../deps/hiredis/fmacros.h:
-../deps/hiredis/async.h:
-../deps/hiredis/hiredis.h:
-../deps/hiredis/net.h:
-../deps/hiredis/dict.c:
-../deps/hiredis/dict.h:
-../deps/hiredis/sds.h:
diff --git a/node_modules/hiredis/build/Release/.deps/Release/obj.target/hiredis/deps/hiredis/hiredis.o.d b/node_modules/hiredis/build/Release/.deps/Release/obj.target/hiredis/deps/hiredis/hiredis.o.d
deleted file mode 100644
index 12dd19e0..00000000
--- a/node_modules/hiredis/build/Release/.deps/Release/obj.target/hiredis/deps/hiredis/hiredis.o.d
+++ /dev/null
@@ -1,9 +0,0 @@
-cmd_Release/obj.target/hiredis/deps/hiredis/hiredis.o := cc '-D_LARGEFILE_SOURCE' '-D_FILE_OFFSET_BITS=64' -I/home/theory/.node-gyp/0.10.26/src -I/home/theory/.node-gyp/0.10.26/deps/uv/include -I/home/theory/.node-gyp/0.10.26/deps/v8/include -fPIC -Wall -Wextra -Wno-unused-parameter -pthread -m64 -O2 -fno-strict-aliasing -fno-tree-vrp -fno-tree-sink -fno-omit-frame-pointer -MMD -MF ./Release/.deps/Release/obj.target/hiredis/deps/hiredis/hiredis.o.d.raw -c -o Release/obj.target/hiredis/deps/hiredis/hiredis.o ../deps/hiredis/hiredis.c
-Release/obj.target/hiredis/deps/hiredis/hiredis.o: \
- ../deps/hiredis/hiredis.c ../deps/hiredis/fmacros.h \
- ../deps/hiredis/hiredis.h ../deps/hiredis/net.h ../deps/hiredis/sds.h
-../deps/hiredis/hiredis.c:
-../deps/hiredis/fmacros.h:
-../deps/hiredis/hiredis.h:
-../deps/hiredis/net.h:
-../deps/hiredis/sds.h:
diff --git a/node_modules/hiredis/build/Release/.deps/Release/obj.target/hiredis/deps/hiredis/net.o.d b/node_modules/hiredis/build/Release/.deps/Release/obj.target/hiredis/deps/hiredis/net.o.d
deleted file mode 100644
index 22d495c2..00000000
--- a/node_modules/hiredis/build/Release/.deps/Release/obj.target/hiredis/deps/hiredis/net.o.d
+++ /dev/null
@@ -1,9 +0,0 @@
-cmd_Release/obj.target/hiredis/deps/hiredis/net.o := cc '-D_LARGEFILE_SOURCE' '-D_FILE_OFFSET_BITS=64' -I/home/theory/.node-gyp/0.10.26/src -I/home/theory/.node-gyp/0.10.26/deps/uv/include -I/home/theory/.node-gyp/0.10.26/deps/v8/include -fPIC -Wall -Wextra -Wno-unused-parameter -pthread -m64 -O2 -fno-strict-aliasing -fno-tree-vrp -fno-tree-sink -fno-omit-frame-pointer -MMD -MF ./Release/.deps/Release/obj.target/hiredis/deps/hiredis/net.o.d.raw -c -o Release/obj.target/hiredis/deps/hiredis/net.o ../deps/hiredis/net.c
-Release/obj.target/hiredis/deps/hiredis/net.o: ../deps/hiredis/net.c \
- ../deps/hiredis/fmacros.h ../deps/hiredis/net.h \
- ../deps/hiredis/hiredis.h ../deps/hiredis/sds.h
-../deps/hiredis/net.c:
-../deps/hiredis/fmacros.h:
-../deps/hiredis/net.h:
-../deps/hiredis/hiredis.h:
-../deps/hiredis/sds.h:
diff --git a/node_modules/hiredis/build/Release/.deps/Release/obj.target/hiredis/deps/hiredis/sds.o.d b/node_modules/hiredis/build/Release/.deps/Release/obj.target/hiredis/deps/hiredis/sds.o.d
deleted file mode 100644
index d96e86c3..00000000
--- a/node_modules/hiredis/build/Release/.deps/Release/obj.target/hiredis/deps/hiredis/sds.o.d
+++ /dev/null
@@ -1,5 +0,0 @@
-cmd_Release/obj.target/hiredis/deps/hiredis/sds.o := cc '-D_LARGEFILE_SOURCE' '-D_FILE_OFFSET_BITS=64' -I/home/theory/.node-gyp/0.10.26/src -I/home/theory/.node-gyp/0.10.26/deps/uv/include -I/home/theory/.node-gyp/0.10.26/deps/v8/include -fPIC -Wall -Wextra -Wno-unused-parameter -pthread -m64 -O2 -fno-strict-aliasing -fno-tree-vrp -fno-tree-sink -fno-omit-frame-pointer -MMD -MF ./Release/.deps/Release/obj.target/hiredis/deps/hiredis/sds.o.d.raw -c -o Release/obj.target/hiredis/deps/hiredis/sds.o ../deps/hiredis/sds.c
-Release/obj.target/hiredis/deps/hiredis/sds.o: ../deps/hiredis/sds.c \
- ../deps/hiredis/sds.h
-../deps/hiredis/sds.c:
-../deps/hiredis/sds.h:
diff --git a/node_modules/hiredis/build/Release/.deps/Release/obj.target/hiredis/src/hiredis.o.d b/node_modules/hiredis/build/Release/.deps/Release/obj.target/hiredis/src/hiredis.o.d
deleted file mode 100644
index 4b598218..00000000
--- a/node_modules/hiredis/build/Release/.deps/Release/obj.target/hiredis/src/hiredis.o.d
+++ /dev/null
@@ -1,26 +0,0 @@
-cmd_Release/obj.target/hiredis/src/hiredis.o := g++ '-D_LARGEFILE_SOURCE' '-D_FILE_OFFSET_BITS=64' '-D_GNU_SOURCE' '-DBUILDING_NODE_EXTENSION' -I/home/theory/.node-gyp/0.10.26/src -I/home/theory/.node-gyp/0.10.26/deps/uv/include -I/home/theory/.node-gyp/0.10.26/deps/v8/include -I../deps -fPIC -Wall -Wextra -Wno-unused-parameter -pthread -m64 -Wall -O2 -fno-strict-aliasing -fno-tree-vrp -fno-tree-sink -fno-omit-frame-pointer -fno-rtti -fno-exceptions -MMD -MF ./Release/.deps/Release/obj.target/hiredis/src/hiredis.o.d.raw -c -o Release/obj.target/hiredis/src/hiredis.o ../src/hiredis.cc
-Release/obj.target/hiredis/src/hiredis.o: ../src/hiredis.cc \
- /home/theory/.node-gyp/0.10.26/deps/v8/include/v8.h \
- /home/theory/.node-gyp/0.10.26/deps/v8/include/v8stdint.h \
- /home/theory/.node-gyp/0.10.26/src/node.h \
- /home/theory/.node-gyp/0.10.26/deps/uv/include/uv.h \
- /home/theory/.node-gyp/0.10.26/deps/uv/include/uv-private/uv-unix.h \
- /home/theory/.node-gyp/0.10.26/deps/uv/include/uv-private/ngx-queue.h \
- /home/theory/.node-gyp/0.10.26/deps/uv/include/uv-private/uv-linux.h \
- /home/theory/.node-gyp/0.10.26/src/node_object_wrap.h \
- /home/theory/.node-gyp/0.10.26/src/node.h ../src/reader.h \
- /home/theory/.node-gyp/0.10.26/src/node_version.h \
- ../deps/hiredis/hiredis.h
-../src/hiredis.cc:
-/home/theory/.node-gyp/0.10.26/deps/v8/include/v8.h:
-/home/theory/.node-gyp/0.10.26/deps/v8/include/v8stdint.h:
-/home/theory/.node-gyp/0.10.26/src/node.h:
-/home/theory/.node-gyp/0.10.26/deps/uv/include/uv.h:
-/home/theory/.node-gyp/0.10.26/deps/uv/include/uv-private/uv-unix.h:
-/home/theory/.node-gyp/0.10.26/deps/uv/include/uv-private/ngx-queue.h:
-/home/theory/.node-gyp/0.10.26/deps/uv/include/uv-private/uv-linux.h:
-/home/theory/.node-gyp/0.10.26/src/node_object_wrap.h:
-/home/theory/.node-gyp/0.10.26/src/node.h:
-../src/reader.h:
-/home/theory/.node-gyp/0.10.26/src/node_version.h:
-../deps/hiredis/hiredis.h:
diff --git a/node_modules/hiredis/build/Release/.deps/Release/obj.target/hiredis/src/reader.o.d b/node_modules/hiredis/build/Release/.deps/Release/obj.target/hiredis/src/reader.o.d
deleted file mode 100644
index b8aed41e..00000000
--- a/node_modules/hiredis/build/Release/.deps/Release/obj.target/hiredis/src/reader.o.d
+++ /dev/null
@@ -1,28 +0,0 @@
-cmd_Release/obj.target/hiredis/src/reader.o := g++ '-D_LARGEFILE_SOURCE' '-D_FILE_OFFSET_BITS=64' '-D_GNU_SOURCE' '-DBUILDING_NODE_EXTENSION' -I/home/theory/.node-gyp/0.10.26/src -I/home/theory/.node-gyp/0.10.26/deps/uv/include -I/home/theory/.node-gyp/0.10.26/deps/v8/include -I../deps -fPIC -Wall -Wextra -Wno-unused-parameter -pthread -m64 -Wall -O2 -fno-strict-aliasing -fno-tree-vrp -fno-tree-sink -fno-omit-frame-pointer -fno-rtti -fno-exceptions -MMD -MF ./Release/.deps/Release/obj.target/hiredis/src/reader.o.d.raw -c -o Release/obj.target/hiredis/src/reader.o ../src/reader.cc
-Release/obj.target/hiredis/src/reader.o: ../src/reader.cc \
- /home/theory/.node-gyp/0.10.26/deps/v8/include/v8.h \
- /home/theory/.node-gyp/0.10.26/deps/v8/include/v8stdint.h \
- /home/theory/.node-gyp/0.10.26/src/node.h \
- /home/theory/.node-gyp/0.10.26/deps/uv/include/uv.h \
- /home/theory/.node-gyp/0.10.26/deps/uv/include/uv-private/uv-unix.h \
- /home/theory/.node-gyp/0.10.26/deps/uv/include/uv-private/ngx-queue.h \
- /home/theory/.node-gyp/0.10.26/deps/uv/include/uv-private/uv-linux.h \
- /home/theory/.node-gyp/0.10.26/src/node_object_wrap.h \
- /home/theory/.node-gyp/0.10.26/src/node.h \
- /home/theory/.node-gyp/0.10.26/src/node_buffer.h ../src/reader.h \
- /home/theory/.node-gyp/0.10.26/src/node_version.h \
- ../deps/hiredis/hiredis.h
-../src/reader.cc:
-/home/theory/.node-gyp/0.10.26/deps/v8/include/v8.h:
-/home/theory/.node-gyp/0.10.26/deps/v8/include/v8stdint.h:
-/home/theory/.node-gyp/0.10.26/src/node.h:
-/home/theory/.node-gyp/0.10.26/deps/uv/include/uv.h:
-/home/theory/.node-gyp/0.10.26/deps/uv/include/uv-private/uv-unix.h:
-/home/theory/.node-gyp/0.10.26/deps/uv/include/uv-private/ngx-queue.h:
-/home/theory/.node-gyp/0.10.26/deps/uv/include/uv-private/uv-linux.h:
-/home/theory/.node-gyp/0.10.26/src/node_object_wrap.h:
-/home/theory/.node-gyp/0.10.26/src/node.h:
-/home/theory/.node-gyp/0.10.26/src/node_buffer.h:
-../src/reader.h:
-/home/theory/.node-gyp/0.10.26/src/node_version.h:
-../deps/hiredis/hiredis.h:
diff --git a/node_modules/hiredis/build/Release/hiredis.a b/node_modules/hiredis/build/Release/hiredis.a
deleted file mode 100644
index f6edee26..00000000
Binary files a/node_modules/hiredis/build/Release/hiredis.a and /dev/null differ
diff --git a/node_modules/hiredis/build/Release/hiredis.node b/node_modules/hiredis/build/Release/hiredis.node
deleted file mode 100644
index 55de35e7..00000000
Binary files a/node_modules/hiredis/build/Release/hiredis.node and /dev/null differ
diff --git a/node_modules/hiredis/build/Release/linker.lock b/node_modules/hiredis/build/Release/linker.lock
deleted file mode 100644
index e69de29b..00000000
diff --git a/node_modules/hiredis/build/Release/obj.target/deps/hiredis.a b/node_modules/hiredis/build/Release/obj.target/deps/hiredis.a
deleted file mode 100644
index f6edee26..00000000
Binary files a/node_modules/hiredis/build/Release/obj.target/deps/hiredis.a and /dev/null differ
diff --git a/node_modules/hiredis/build/Release/obj.target/hiredis.node b/node_modules/hiredis/build/Release/obj.target/hiredis.node
deleted file mode 100644
index 55de35e7..00000000
Binary files a/node_modules/hiredis/build/Release/obj.target/hiredis.node and /dev/null differ
diff --git a/node_modules/hiredis/build/Release/obj.target/hiredis/deps/hiredis/async.o b/node_modules/hiredis/build/Release/obj.target/hiredis/deps/hiredis/async.o
deleted file mode 100644
index 0c044438..00000000
Binary files a/node_modules/hiredis/build/Release/obj.target/hiredis/deps/hiredis/async.o and /dev/null differ
diff --git a/node_modules/hiredis/build/Release/obj.target/hiredis/deps/hiredis/hiredis.o b/node_modules/hiredis/build/Release/obj.target/hiredis/deps/hiredis/hiredis.o
deleted file mode 100644
index 6657b411..00000000
Binary files a/node_modules/hiredis/build/Release/obj.target/hiredis/deps/hiredis/hiredis.o and /dev/null differ
diff --git a/node_modules/hiredis/build/Release/obj.target/hiredis/deps/hiredis/net.o b/node_modules/hiredis/build/Release/obj.target/hiredis/deps/hiredis/net.o
deleted file mode 100644
index 48b76a7d..00000000
Binary files a/node_modules/hiredis/build/Release/obj.target/hiredis/deps/hiredis/net.o and /dev/null differ
diff --git a/node_modules/hiredis/build/Release/obj.target/hiredis/deps/hiredis/sds.o b/node_modules/hiredis/build/Release/obj.target/hiredis/deps/hiredis/sds.o
deleted file mode 100644
index 42fe32be..00000000
Binary files a/node_modules/hiredis/build/Release/obj.target/hiredis/deps/hiredis/sds.o and /dev/null differ
diff --git a/node_modules/hiredis/build/Release/obj.target/hiredis/src/hiredis.o b/node_modules/hiredis/build/Release/obj.target/hiredis/src/hiredis.o
deleted file mode 100644
index 4153e5e1..00000000
Binary files a/node_modules/hiredis/build/Release/obj.target/hiredis/src/hiredis.o and /dev/null differ
diff --git a/node_modules/hiredis/build/Release/obj.target/hiredis/src/reader.o b/node_modules/hiredis/build/Release/obj.target/hiredis/src/reader.o
deleted file mode 100644
index ce4b1c76..00000000
Binary files a/node_modules/hiredis/build/Release/obj.target/hiredis/src/reader.o and /dev/null differ
diff --git a/node_modules/hiredis/build/binding.Makefile b/node_modules/hiredis/build/binding.Makefile
deleted file mode 100644
index 7195cb84..00000000
--- a/node_modules/hiredis/build/binding.Makefile
+++ /dev/null
@@ -1,6 +0,0 @@
-# This file is generated by gyp; do not edit.
-
-export builddir_name ?= build/./.
-.PHONY: all
-all:
- $(MAKE) hiredis
diff --git a/node_modules/hiredis/build/config.gypi b/node_modules/hiredis/build/config.gypi
deleted file mode 100644
index 598870da..00000000
--- a/node_modules/hiredis/build/config.gypi
+++ /dev/null
@@ -1,116 +0,0 @@
-# Do not edit. File was generated by node-gyp's "configure" step
-{
- "target_defaults": {
- "cflags": [],
- "default_configuration": "Release",
- "defines": [],
- "include_dirs": [],
- "libraries": []
- },
- "variables": {
- "clang": 0,
- "gcc_version": 44,
- "host_arch": "x64",
- "node_install_npm": "true",
- "node_prefix": "/",
- "node_shared_cares": "false",
- "node_shared_http_parser": "false",
- "node_shared_libuv": "false",
- "node_shared_openssl": "false",
- "node_shared_v8": "false",
- "node_shared_zlib": "false",
- "node_tag": "",
- "node_unsafe_optimizations": 0,
- "node_use_dtrace": "false",
- "node_use_etw": "false",
- "node_use_openssl": "true",
- "node_use_perfctr": "false",
- "node_use_systemtap": "false",
- "python": "/data/opt/bin/python",
- "target_arch": "x64",
- "v8_enable_gdbjit": 0,
- "v8_no_strict_aliasing": 1,
- "v8_use_snapshot": "false",
- "nodedir": "/home/theory/.node-gyp/0.10.26",
- "copy_dev_lib": "true",
- "standalone_static_library": 1,
- "cache_lock_stale": "60000",
- "sign_git_tag": "",
- "always_auth": "",
- "user_agent": "node/v0.10.26 linux x64",
- "bin_links": "true",
- "key": "",
- "description": "true",
- "fetch_retries": "2",
- "heading": "npm",
- "user": "1000",
- "force": "",
- "cache_min": "10",
- "init_license": "ISC",
- "editor": "vi",
- "rollback": "true",
- "cache_max": "null",
- "userconfig": "/home/theory/.npmrc",
- "engine_strict": "",
- "init_author_name": "",
- "init_author_url": "",
- "tmp": "/home/theory/tmp",
- "depth": "null",
- "save_dev": "",
- "usage": "",
- "https_proxy": "",
- "onload_script": "",
- "rebuild_bundle": "true",
- "save_bundle": "",
- "shell": "/bin/zsh",
- "prefix": "/usr/local",
- "registry": "https://registry.npmjs.org/",
- "browser": "",
- "cache_lock_wait": "10000",
- "save_optional": "",
- "searchopts": "",
- "versions": "",
- "cache": "/home/theory/.npm",
- "ignore_scripts": "",
- "searchsort": "name",
- "version": "",
- "local_address": "",
- "viewer": "man",
- "color": "true",
- "fetch_retry_mintimeout": "10000",
- "umask": "18",
- "fetch_retry_maxtimeout": "60000",
- "message": "%s",
- "ca": "",
- "cert": "",
- "global": "",
- "link": "",
- "save": "",
- "unicode": "true",
- "long": "",
- "production": "",
- "unsafe_perm": "",
- "node_version": "v0.10.26",
- "tag": "latest",
- "git_tag_version": "true",
- "shrinkwrap": "true",
- "username": "amark",
- "fetch_retry_factor": "10",
- "npat": "",
- "proprietary_attribs": "true",
- "strict_ssl": "true",
- "dev": "",
- "globalconfig": "/usr/local/etc/npmrc",
- "init_module": "/home/theory/.npm-init.js",
- "parseable": "",
- "globalignorefile": "/usr/local/etc/npmignore",
- "cache_lock_retries": "10",
- "group": "1000",
- "init_author_email": "",
- "searchexclude": "",
- "git": "git",
- "optional": "true",
- "email": "mark@accelsor.com",
- "json": ""
- }
-}
diff --git a/node_modules/hiredis/build/deps/hiredis.Makefile b/node_modules/hiredis/build/deps/hiredis.Makefile
deleted file mode 100644
index b441a8b2..00000000
--- a/node_modules/hiredis/build/deps/hiredis.Makefile
+++ /dev/null
@@ -1,6 +0,0 @@
-# This file is generated by gyp; do not edit.
-
-export builddir_name ?= build/./deps/.
-.PHONY: all
-all:
- $(MAKE) -C .. hiredis
diff --git a/node_modules/hiredis/build/deps/hiredis.target.mk b/node_modules/hiredis/build/deps/hiredis.target.mk
deleted file mode 100644
index b9d8c1e6..00000000
--- a/node_modules/hiredis/build/deps/hiredis.target.mk
+++ /dev/null
@@ -1,140 +0,0 @@
-# This file is generated by gyp; do not edit.
-
-TOOLSET := target
-TARGET := hiredis
-DEFS_Debug := \
- '-D_LARGEFILE_SOURCE' \
- '-D_FILE_OFFSET_BITS=64' \
- '-DDEBUG' \
- '-D_DEBUG'
-
-# Flags passed to all source files.
-CFLAGS_Debug := \
- -fPIC \
- -Wall \
- -Wextra \
- -Wno-unused-parameter \
- -pthread \
- -m64 \
- -g \
- -O0
-
-# Flags passed to only C files.
-CFLAGS_C_Debug :=
-
-# Flags passed to only C++ files.
-CFLAGS_CC_Debug := \
- -fno-rtti \
- -fno-exceptions
-
-INCS_Debug := \
- -I/home/theory/.node-gyp/0.10.26/src \
- -I/home/theory/.node-gyp/0.10.26/deps/uv/include \
- -I/home/theory/.node-gyp/0.10.26/deps/v8/include
-
-DEFS_Release := \
- '-D_LARGEFILE_SOURCE' \
- '-D_FILE_OFFSET_BITS=64'
-
-# Flags passed to all source files.
-CFLAGS_Release := \
- -fPIC \
- -Wall \
- -Wextra \
- -Wno-unused-parameter \
- -pthread \
- -m64 \
- -O2 \
- -fno-strict-aliasing \
- -fno-tree-vrp \
- -fno-tree-sink \
- -fno-omit-frame-pointer
-
-# Flags passed to only C files.
-CFLAGS_C_Release :=
-
-# Flags passed to only C++ files.
-CFLAGS_CC_Release := \
- -fno-rtti \
- -fno-exceptions
-
-INCS_Release := \
- -I/home/theory/.node-gyp/0.10.26/src \
- -I/home/theory/.node-gyp/0.10.26/deps/uv/include \
- -I/home/theory/.node-gyp/0.10.26/deps/v8/include
-
-OBJS := \
- $(obj).target/$(TARGET)/deps/hiredis/hiredis.o \
- $(obj).target/$(TARGET)/deps/hiredis/net.o \
- $(obj).target/$(TARGET)/deps/hiredis/sds.o \
- $(obj).target/$(TARGET)/deps/hiredis/async.o
-
-# Add to the list of files we specially track dependencies for.
-all_deps += $(OBJS)
-
-# CFLAGS et al overrides must be target-local.
-# See "Target-specific Variable Values" in the GNU Make manual.
-$(OBJS): TOOLSET := $(TOOLSET)
-$(OBJS): GYP_CFLAGS := $(DEFS_$(BUILDTYPE)) $(INCS_$(BUILDTYPE)) $(CFLAGS_$(BUILDTYPE)) $(CFLAGS_C_$(BUILDTYPE))
-$(OBJS): GYP_CXXFLAGS := $(DEFS_$(BUILDTYPE)) $(INCS_$(BUILDTYPE)) $(CFLAGS_$(BUILDTYPE)) $(CFLAGS_CC_$(BUILDTYPE))
-
-# Suffix rules, putting all outputs into $(obj).
-
-$(obj).$(TOOLSET)/$(TARGET)/%.o: $(srcdir)/%.c FORCE_DO_CMD
- @$(call do_cmd,cc,1)
-
-# Try building from generated source, too.
-
-$(obj).$(TOOLSET)/$(TARGET)/%.o: $(obj).$(TOOLSET)/%.c FORCE_DO_CMD
- @$(call do_cmd,cc,1)
-
-$(obj).$(TOOLSET)/$(TARGET)/%.o: $(obj)/%.c FORCE_DO_CMD
- @$(call do_cmd,cc,1)
-
-# End of this set of suffix rules
-### Rules for final target.
-LDFLAGS_Debug := \
- -pthread \
- -rdynamic \
- -m64
-
-LDFLAGS_Release := \
- -pthread \
- -rdynamic \
- -m64
-
-LIBS :=
-
-$(obj).target/deps/hiredis.a: GYP_LDFLAGS := $(LDFLAGS_$(BUILDTYPE))
-$(obj).target/deps/hiredis.a: LIBS := $(LIBS)
-$(obj).target/deps/hiredis.a: TOOLSET := $(TOOLSET)
-$(obj).target/deps/hiredis.a: $(OBJS) FORCE_DO_CMD
- $(call do_cmd,alink)
-
-all_deps += $(obj).target/deps/hiredis.a
-# Add target alias
-.PHONY: hiredis
-hiredis: $(obj).target/deps/hiredis.a
-
-# Add target alias to "all" target.
-.PHONY: all
-all: hiredis
-
-# Add target alias
-.PHONY: hiredis
-hiredis: $(builddir)/hiredis.a
-
-# Copy this to the static library output path.
-$(builddir)/hiredis.a: TOOLSET := $(TOOLSET)
-$(builddir)/hiredis.a: $(obj).target/deps/hiredis.a FORCE_DO_CMD
- $(call do_cmd,copy)
-
-all_deps += $(builddir)/hiredis.a
-# Short alias for building this static library.
-.PHONY: hiredis.a
-hiredis.a: $(obj).target/deps/hiredis.a $(builddir)/hiredis.a
-
-# Add static library to "all" target.
-.PHONY: all
-all: $(builddir)/hiredis.a
-
diff --git a/node_modules/hiredis/build/hiredis.target.mk b/node_modules/hiredis/build/hiredis.target.mk
deleted file mode 100644
index 55cec5c3..00000000
--- a/node_modules/hiredis/build/hiredis.target.mk
+++ /dev/null
@@ -1,142 +0,0 @@
-# This file is generated by gyp; do not edit.
-
-TOOLSET := target
-TARGET := hiredis
-DEFS_Debug := \
- '-D_LARGEFILE_SOURCE' \
- '-D_FILE_OFFSET_BITS=64' \
- '-D_GNU_SOURCE' \
- '-DBUILDING_NODE_EXTENSION' \
- '-DDEBUG' \
- '-D_DEBUG'
-
-# Flags passed to all source files.
-CFLAGS_Debug := \
- -fPIC \
- -Wall \
- -Wextra \
- -Wno-unused-parameter \
- -pthread \
- -m64 \
- -Wall \
- -O3 \
- -g \
- -O0
-
-# Flags passed to only C files.
-CFLAGS_C_Debug :=
-
-# Flags passed to only C++ files.
-CFLAGS_CC_Debug := \
- -fno-rtti \
- -fno-exceptions
-
-INCS_Debug := \
- -I/home/theory/.node-gyp/0.10.26/src \
- -I/home/theory/.node-gyp/0.10.26/deps/uv/include \
- -I/home/theory/.node-gyp/0.10.26/deps/v8/include \
- -I$(srcdir)/deps
-
-DEFS_Release := \
- '-D_LARGEFILE_SOURCE' \
- '-D_FILE_OFFSET_BITS=64' \
- '-D_GNU_SOURCE' \
- '-DBUILDING_NODE_EXTENSION'
-
-# Flags passed to all source files.
-CFLAGS_Release := \
- -fPIC \
- -Wall \
- -Wextra \
- -Wno-unused-parameter \
- -pthread \
- -m64 \
- -Wall \
- -O2 \
- -fno-strict-aliasing \
- -fno-tree-vrp \
- -fno-tree-sink \
- -fno-omit-frame-pointer
-
-# Flags passed to only C files.
-CFLAGS_C_Release :=
-
-# Flags passed to only C++ files.
-CFLAGS_CC_Release := \
- -fno-rtti \
- -fno-exceptions
-
-INCS_Release := \
- -I/home/theory/.node-gyp/0.10.26/src \
- -I/home/theory/.node-gyp/0.10.26/deps/uv/include \
- -I/home/theory/.node-gyp/0.10.26/deps/v8/include \
- -I$(srcdir)/deps
-
-OBJS := \
- $(obj).target/$(TARGET)/src/hiredis.o \
- $(obj).target/$(TARGET)/src/reader.o
-
-# Add to the list of files we specially track dependencies for.
-all_deps += $(OBJS)
-
-# Make sure our dependencies are built before any of us.
-$(OBJS): | $(builddir)/hiredis.a $(obj).target/deps/hiredis.a
-
-# CFLAGS et al overrides must be target-local.
-# See "Target-specific Variable Values" in the GNU Make manual.
-$(OBJS): TOOLSET := $(TOOLSET)
-$(OBJS): GYP_CFLAGS := $(DEFS_$(BUILDTYPE)) $(INCS_$(BUILDTYPE)) $(CFLAGS_$(BUILDTYPE)) $(CFLAGS_C_$(BUILDTYPE))
-$(OBJS): GYP_CXXFLAGS := $(DEFS_$(BUILDTYPE)) $(INCS_$(BUILDTYPE)) $(CFLAGS_$(BUILDTYPE)) $(CFLAGS_CC_$(BUILDTYPE))
-
-# Suffix rules, putting all outputs into $(obj).
-
-$(obj).$(TOOLSET)/$(TARGET)/%.o: $(srcdir)/%.cc FORCE_DO_CMD
- @$(call do_cmd,cxx,1)
-
-# Try building from generated source, too.
-
-$(obj).$(TOOLSET)/$(TARGET)/%.o: $(obj).$(TOOLSET)/%.cc FORCE_DO_CMD
- @$(call do_cmd,cxx,1)
-
-$(obj).$(TOOLSET)/$(TARGET)/%.o: $(obj)/%.cc FORCE_DO_CMD
- @$(call do_cmd,cxx,1)
-
-# End of this set of suffix rules
-### Rules for final target.
-LDFLAGS_Debug := \
- -pthread \
- -rdynamic \
- -m64
-
-LDFLAGS_Release := \
- -pthread \
- -rdynamic \
- -m64
-
-LIBS :=
-
-$(obj).target/hiredis.node: GYP_LDFLAGS := $(LDFLAGS_$(BUILDTYPE))
-$(obj).target/hiredis.node: LIBS := $(LIBS)
-$(obj).target/hiredis.node: TOOLSET := $(TOOLSET)
-$(obj).target/hiredis.node: $(OBJS) $(obj).target/deps/hiredis.a FORCE_DO_CMD
- $(call do_cmd,solink_module)
-
-all_deps += $(obj).target/hiredis.node
-# Add target alias
-.PHONY: hiredis
-hiredis: $(builddir)/hiredis.node
-
-# Copy this to the executable output path.
-$(builddir)/hiredis.node: TOOLSET := $(TOOLSET)
-$(builddir)/hiredis.node: $(obj).target/hiredis.node FORCE_DO_CMD
- $(call do_cmd,copy)
-
-all_deps += $(builddir)/hiredis.node
-# Short alias for building this executable.
-.PHONY: hiredis.node
-hiredis.node: $(obj).target/hiredis.node $(builddir)/hiredis.node
-
-# Add executable to "all" target.
-.PHONY: all
-all: $(builddir)/hiredis.node
-
diff --git a/node_modules/hiredis/deps/hiredis.gyp b/node_modules/hiredis/deps/hiredis.gyp
deleted file mode 100644
index 597bb095..00000000
--- a/node_modules/hiredis/deps/hiredis.gyp
+++ /dev/null
@@ -1,27 +0,0 @@
-{
- 'targets': [
- {
- 'target_name': 'hiredis',
- 'type': 'static_library',
- 'direct_dependent_settings': {
- 'include_dirs': [ '.' ],
- },
- 'sources': [
- './hiredis/hiredis.c',
- './hiredis/net.c',
- './hiredis/sds.c',
- './hiredis/async.c',
- ],
- 'conditions': [
- ['OS=="mac"', {
- 'xcode_settings': {
- 'GCC_C_LANGUAGE_STANDARD': 'c99'
- }
- }],
- ['OS=="solaris"', {
- 'cflags+': [ '-std=c99' ]
- }]
- ]
- }
- ]
-}
diff --git a/node_modules/hiredis/deps/hiredis/CHANGELOG.md b/node_modules/hiredis/deps/hiredis/CHANGELOG.md
deleted file mode 100644
index 4a57b813..00000000
--- a/node_modules/hiredis/deps/hiredis/CHANGELOG.md
+++ /dev/null
@@ -1,24 +0,0 @@
-### 0.11.0
-
-* Increase the maximum multi-bulk reply depth to 8.
-
-* Increase the read buffer size from 2k to 16k.
-
-* Use poll(2) instead of select(2) to support large fds (>= 1024).
-
-### 0.10.1
-
-* Makefile overhaul. Important to check out if you override one or more
- variables using environment variables or via arguments to the "make" tool.
-
-* Issue #45: Fix potential memory leak for a multi bulk reply with 0 elements
- being created by the default reply object functions.
-
-* Issue #43: Don't crash in an asynchronous context when Redis returns an error
- reply after the connection has been made (this happens when the maximum
- number of connections is reached).
-
-### 0.10.0
-
-* See commit log.
-
diff --git a/node_modules/hiredis/deps/hiredis/COPYING b/node_modules/hiredis/deps/hiredis/COPYING
deleted file mode 100644
index a5fc9739..00000000
--- a/node_modules/hiredis/deps/hiredis/COPYING
+++ /dev/null
@@ -1,29 +0,0 @@
-Copyright (c) 2009-2011, Salvatore Sanfilippo
-Copyright (c) 2010-2011, Pieter Noordhuis
-
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are met:
-
-* Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
-
-* Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following disclaimer in the documentation
- and/or other materials provided with the distribution.
-
-* Neither the name of Redis nor the names of its contributors may be used
- to endorse or promote products derived from this software without specific
- prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
-ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
-ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/node_modules/hiredis/deps/hiredis/Makefile b/node_modules/hiredis/deps/hiredis/Makefile
deleted file mode 100644
index 16b8767b..00000000
--- a/node_modules/hiredis/deps/hiredis/Makefile
+++ /dev/null
@@ -1,148 +0,0 @@
-# Hiredis Makefile
-# Copyright (C) 2010-2011 Salvatore Sanfilippo
-# Copyright (C) 2010-2011 Pieter Noordhuis
-# This file is released under the BSD license, see the COPYING file
-
-OBJ=net.o hiredis.o sds.o async.o
-BINS=hiredis-example hiredis-test
-LIBNAME=libhiredis
-
-HIREDIS_MAJOR=0
-HIREDIS_MINOR=10
-
-# Fallback to gcc when $CC is not in $PATH.
-CC:=$(shell sh -c 'type $(CC) >/dev/null 2>/dev/null && echo $(CC) || echo gcc')
-OPTIMIZATION?=-O3
-WARNINGS=-Wall -W -Wstrict-prototypes -Wwrite-strings
-DEBUG?= -g -ggdb
-REAL_CFLAGS=$(OPTIMIZATION) -fPIC $(CFLAGS) $(WARNINGS) $(DEBUG) $(ARCH)
-REAL_LDFLAGS=$(LDFLAGS) $(ARCH)
-
-DYLIBSUFFIX=so
-STLIBSUFFIX=a
-DYLIB_MINOR_NAME=$(LIBNAME).$(DYLIBSUFFIX).$(HIREDIS_MAJOR).$(HIREDIS_MINOR)
-DYLIB_MAJOR_NAME=$(LIBNAME).$(DYLIBSUFFIX).$(HIREDIS_MAJOR)
-DYLIBNAME=$(LIBNAME).$(DYLIBSUFFIX)
-DYLIB_MAKE_CMD=$(CC) -shared -Wl,-soname,$(DYLIB_MINOR_NAME) -o $(DYLIBNAME) $(LDFLAGS)
-STLIBNAME=$(LIBNAME).$(STLIBSUFFIX)
-STLIB_MAKE_CMD=ar rcs $(STLIBNAME)
-
-# Platform-specific overrides
-uname_S := $(shell sh -c 'uname -s 2>/dev/null || echo not')
-ifeq ($(uname_S),SunOS)
- REAL_LDFLAGS+= -ldl -lnsl -lsocket
- DYLIB_MAKE_CMD=$(CC) -G -o $(DYLIBNAME) -h $(DYLIB_MINOR_NAME) $(LDFLAGS)
- INSTALL= cp -r
-endif
-ifeq ($(uname_S),Darwin)
- DYLIBSUFFIX=dylib
- DYLIB_MINOR_NAME=$(LIBNAME).$(HIREDIS_MAJOR).$(HIREDIS_MINOR).$(DYLIBSUFFIX)
- DYLIB_MAJOR_NAME=$(LIBNAME).$(HIREDIS_MAJOR).$(DYLIBSUFFIX)
- DYLIB_MAKE_CMD=$(CC) -shared -Wl,-install_name,$(DYLIB_MINOR_NAME) -o $(DYLIBNAME) $(LDFLAGS)
-endif
-
-all: $(DYLIBNAME) $(BINS)
-
-# Deps (use make dep to generate this)
-net.o: net.c fmacros.h net.h hiredis.h
-async.o: async.c async.h hiredis.h sds.h dict.c dict.h
-example.o: example.c hiredis.h
-hiredis.o: hiredis.c fmacros.h hiredis.h net.h sds.h
-sds.o: sds.c sds.h
-test.o: test.c hiredis.h
-
-$(DYLIBNAME): $(OBJ)
- $(DYLIB_MAKE_CMD) $(OBJ)
-
-$(STLIBNAME): $(OBJ)
- $(STLIB_MAKE_CMD) $(OBJ)
-
-dynamic: $(DYLIBNAME)
-static: $(STLIBNAME)
-
-# Binaries:
-hiredis-example-libevent: example-libevent.c adapters/libevent.h $(STLIBNAME)
- $(CC) -o $@ $(REAL_CFLAGS) $(REAL_LDFLAGS) -levent example-libevent.c $(STLIBNAME)
-
-hiredis-example-libev: example-libev.c adapters/libev.h $(STLIBNAME)
- $(CC) -o $@ $(REAL_CFLAGS) $(REAL_LDFLAGS) -lev example-libev.c $(STLIBNAME)
-
-ifndef AE_DIR
-hiredis-example-ae:
- @echo "Please specify AE_DIR (e.g. /src)"
- @false
-else
-hiredis-example-ae: example-ae.c adapters/ae.h $(STLIBNAME)
- $(CC) -o $@ $(REAL_CFLAGS) $(REAL_LDFLAGS) -I$(AE_DIR) $(AE_DIR)/ae.o $(AE_DIR)/zmalloc.o example-ae.c $(STLIBNAME)
-endif
-
-hiredis-%: %.o $(STLIBNAME)
- $(CC) -o $@ $(REAL_LDFLAGS) $< $(STLIBNAME)
-
-test: hiredis-test
- ./hiredis-test
-
-check: hiredis-test
- echo \
- "daemonize yes\n" \
- "pidfile /tmp/hiredis-test-redis.pid\n" \
- "port 56379\n" \
- "bind 127.0.0.1\n" \
- "unixsocket /tmp/hiredis-test-redis.sock" \
- | redis-server -
- ./hiredis-test -h 127.0.0.1 -p 56379 -s /tmp/hiredis-test-redis.sock || \
- ( kill `cat /tmp/hiredis-test-redis.pid` && false )
- kill `cat /tmp/hiredis-test-redis.pid`
-
-.c.o:
- $(CC) -std=c99 -pedantic -c $(REAL_CFLAGS) $<
-
-clean:
- rm -rf $(DYLIBNAME) $(STLIBNAME) $(BINS) hiredis-example* *.o *.gcda *.gcno *.gcov
-
-dep:
- $(CC) -MM *.c
-
-# Installation related variables and target
-PREFIX?=/usr/local
-INCLUDE_PATH?=include/hiredis
-LIBRARY_PATH?=lib
-INSTALL_INCLUDE_PATH= $(PREFIX)/$(INCLUDE_PATH)
-INSTALL_LIBRARY_PATH= $(PREFIX)/$(LIBRARY_PATH)
-
-ifeq ($(uname_S),SunOS)
- INSTALL?= cp -r
-endif
-
-INSTALL?= cp -a
-
-install: $(DYLIBNAME) $(STLIBNAME)
- mkdir -p $(INSTALL_INCLUDE_PATH) $(INSTALL_LIBRARY_PATH)
- $(INSTALL) hiredis.h async.h adapters $(INSTALL_INCLUDE_PATH)
- $(INSTALL) $(DYLIBNAME) $(INSTALL_LIBRARY_PATH)/$(DYLIB_MINOR_NAME)
- cd $(INSTALL_LIBRARY_PATH) && ln -sf $(DYLIB_MINOR_NAME) $(DYLIB_MAJOR_NAME)
- cd $(INSTALL_LIBRARY_PATH) && ln -sf $(DYLIB_MAJOR_NAME) $(DYLIBNAME)
- $(INSTALL) $(STLIBNAME) $(INSTALL_LIBRARY_PATH)
-
-32bit:
- @echo ""
- @echo "WARNING: if this fails under Linux you probably need to install libc6-dev-i386"
- @echo ""
- $(MAKE) CFLAGS="-m32" LDFLAGS="-m32"
-
-gprof:
- $(MAKE) CFLAGS="-pg" LDFLAGS="-pg"
-
-gcov:
- $(MAKE) CFLAGS="-fprofile-arcs -ftest-coverage" LDFLAGS="-fprofile-arcs"
-
-coverage: gcov
- make check
- mkdir -p tmp/lcov
- lcov -d . -c -o tmp/lcov/hiredis.info
- genhtml --legend -o tmp/lcov/report tmp/lcov/hiredis.info
-
-noopt:
- $(MAKE) OPTIMIZATION=""
-
-.PHONY: all test check clean dep install 32bit gprof gcov noopt
diff --git a/node_modules/hiredis/deps/hiredis/README.md b/node_modules/hiredis/deps/hiredis/README.md
deleted file mode 100644
index 62fe1067..00000000
--- a/node_modules/hiredis/deps/hiredis/README.md
+++ /dev/null
@@ -1,379 +0,0 @@
-# HIREDIS
-
-Hiredis is a minimalistic C client library for the [Redis](http://redis.io/) database.
-
-It is minimalistic because it just adds minimal support for the protocol, but
-at the same time it uses an high level printf-alike API in order to make it
-much higher level than otherwise suggested by its minimal code base and the
-lack of explicit bindings for every Redis command.
-
-Apart from supporting sending commands and receiving replies, it comes with
-a reply parser that is decoupled from the I/O layer. It
-is a stream parser designed for easy reusability, which can for instance be used
-in higher level language bindings for efficient reply parsing.
-
-Hiredis only supports the binary-safe Redis protocol, so you can use it with any
-Redis version >= 1.2.0.
-
-The library comes with multiple APIs. There is the
-*synchronous API*, the *asynchronous API* and the *reply parsing API*.
-
-## UPGRADING
-
-Version 0.9.0 is a major overhaul of hiredis in every aspect. However, upgrading existing
-code using hiredis should not be a big pain. The key thing to keep in mind when
-upgrading is that hiredis >= 0.9.0 uses a `redisContext*` to keep state, in contrast to
-the stateless 0.0.1 that only has a file descriptor to work with.
-
-## Synchronous API
-
-To consume the synchronous API, there are only a few function calls that need to be introduced:
-
- redisContext *redisConnect(const char *ip, int port);
- void *redisCommand(redisContext *c, const char *format, ...);
- void freeReplyObject(void *reply);
-
-### Connecting
-
-The function `redisConnect` is used to create a so-called `redisContext`. The
-context is where Hiredis holds state for a connection. The `redisContext`
-struct has an integer `err` field that is non-zero when an the connection is in
-an error state. The field `errstr` will contain a string with a description of
-the error. More information on errors can be found in the **Errors** section.
-After trying to connect to Redis using `redisConnect` you should
-check the `err` field to see if establishing the connection was successful:
-
- redisContext *c = redisConnect("127.0.0.1", 6379);
- if (c->err) {
- printf("Error: %s\n", c->errstr);
- // handle error
- }
-
-### Sending commands
-
-There are several ways to issue commands to Redis. The first that will be introduced is
-`redisCommand`. This function takes a format similar to printf. In the simplest form,
-it is used like this:
-
- reply = redisCommand(context, "SET foo bar");
-
-The specifier `%s` interpolates a string in the command, and uses `strlen` to
-determine the length of the string:
-
- reply = redisCommand(context, "SET foo %s", value);
-
-When you need to pass binary safe strings in a command, the `%b` specifier can be
-used. Together with a pointer to the string, it requires a `size_t` length argument
-of the string:
-
- reply = redisCommand(context, "SET foo %b", value, valuelen);
-
-Internally, Hiredis splits the command in different arguments and will
-convert it to the protocol used to communicate with Redis.
-One or more spaces separates arguments, so you can use the specifiers
-anywhere in an argument:
-
- reply = redisCommand(context, "SET key:%s %s", myid, value);
-
-### Using replies
-
-The return value of `redisCommand` holds a reply when the command was
-successfully executed. When an error occurs, the return value is `NULL` and
-the `err` field in the context will be set (see section on **Errors**).
-Once an error is returned the context cannot be reused and you should set up
-a new connection.
-
-The standard replies that `redisCommand` are of the type `redisReply`. The
-`type` field in the `redisReply` should be used to test what kind of reply
-was received:
-
-* **`REDIS_REPLY_STATUS`**:
- * The command replied with a status reply. The status string can be accessed using `reply->str`.
- The length of this string can be accessed using `reply->len`.
-
-* **`REDIS_REPLY_ERROR`**:
- * The command replied with an error. The error string can be accessed identical to `REDIS_REPLY_STATUS`.
-
-* **`REDIS_REPLY_INTEGER`**:
- * The command replied with an integer. The integer value can be accessed using the
- `reply->integer` field of type `long long`.
-
-* **`REDIS_REPLY_NIL`**:
- * The command replied with a **nil** object. There is no data to access.
-
-* **`REDIS_REPLY_STRING`**:
- * A bulk (string) reply. The value of the reply can be accessed using `reply->str`.
- The length of this string can be accessed using `reply->len`.
-
-* **`REDIS_REPLY_ARRAY`**:
- * A multi bulk reply. The number of elements in the multi bulk reply is stored in
- `reply->elements`. Every element in the multi bulk reply is a `redisReply` object as well
- and can be accessed via `reply->element[..index..]`.
- Redis may reply with nested arrays but this is fully supported.
-
-Replies should be freed using the `freeReplyObject()` function.
-Note that this function will take care of freeing sub-replies objects
-contained in arrays and nested arrays, so there is no need for the user to
-free the sub replies (it is actually harmful and will corrupt the memory).
-
-**Important:** the current version of hiredis (0.10.0) free's replies when the
-asynchronous API is used. This means you should not call `freeReplyObject` when
-you use this API. The reply is cleaned up by hiredis _after_ the callback
-returns. This behavior will probably change in future releases, so make sure to
-keep an eye on the changelog when upgrading (see issue #39).
-
-### Cleaning up
-
-To disconnect and free the context the following function can be used:
-
- void redisFree(redisContext *c);
-
-This function immediately closes the socket and then free's the allocations done in
-creating the context.
-
-### Sending commands (cont'd)
-
-Together with `redisCommand`, the function `redisCommandArgv` can be used to issue commands.
-It has the following prototype:
-
- void *redisCommandArgv(redisContext *c, int argc, const char **argv, const size_t *argvlen);
-
-It takes the number of arguments `argc`, an array of strings `argv` and the lengths of the
-arguments `argvlen`. For convenience, `argvlen` may be set to `NULL` and the function will
-use `strlen(3)` on every argument to determine its length. Obviously, when any of the arguments
-need to be binary safe, the entire array of lengths `argvlen` should be provided.
-
-The return value has the same semantic as `redisCommand`.
-
-### Pipelining
-
-To explain how Hiredis supports pipelining in a blocking connection, there needs to be
-understanding of the internal execution flow.
-
-When any of the functions in the `redisCommand` family is called, Hiredis first formats the
-command according to the Redis protocol. The formatted command is then put in the output buffer
-of the context. This output buffer is dynamic, so it can hold any number of commands.
-After the command is put in the output buffer, `redisGetReply` is called. This function has the
-following two execution paths:
-
-1. The input buffer is non-empty:
- * Try to parse a single reply from the input buffer and return it
- * If no reply could be parsed, continue at *2*
-2. The input buffer is empty:
- * Write the **entire** output buffer to the socket
- * Read from the socket until a single reply could be parsed
-
-The function `redisGetReply` is exported as part of the Hiredis API and can be used when a reply
-is expected on the socket. To pipeline commands, the only things that needs to be done is
-filling up the output buffer. For this cause, two commands can be used that are identical
-to the `redisCommand` family, apart from not returning a reply:
-
- void redisAppendCommand(redisContext *c, const char *format, ...);
- void redisAppendCommandArgv(redisContext *c, int argc, const char **argv, const size_t *argvlen);
-
-After calling either function one or more times, `redisGetReply` can be used to receive the
-subsequent replies. The return value for this function is either `REDIS_OK` or `REDIS_ERR`, where
-the latter means an error occurred while reading a reply. Just as with the other commands,
-the `err` field in the context can be used to find out what the cause of this error is.
-
-The following examples shows a simple pipeline (resulting in only a single call to `write(2)` and
-a single call to `read(2)`):
-
- redisReply *reply;
- redisAppendCommand(context,"SET foo bar");
- redisAppendCommand(context,"GET foo");
- redisGetReply(context,&reply); // reply for SET
- freeReplyObject(reply);
- redisGetReply(context,&reply); // reply for GET
- freeReplyObject(reply);
-
-This API can also be used to implement a blocking subscriber:
-
- reply = redisCommand(context,"SUBSCRIBE foo");
- freeReplyObject(reply);
- while(redisGetReply(context,&reply) == REDIS_OK) {
- // consume message
- freeReplyObject(reply);
- }
-
-### Errors
-
-When a function call is not successful, depending on the function either `NULL` or `REDIS_ERR` is
-returned. The `err` field inside the context will be non-zero and set to one of the
-following constants:
-
-* **`REDIS_ERR_IO`**:
- There was an I/O error while creating the connection, trying to write
- to the socket or read from the socket. If you included `errno.h` in your
- application, you can use the global `errno` variable to find out what is
- wrong.
-
-* **`REDIS_ERR_EOF`**:
- The server closed the connection which resulted in an empty read.
-
-* **`REDIS_ERR_PROTOCOL`**:
- There was an error while parsing the protocol.
-
-* **`REDIS_ERR_OTHER`**:
- Any other error. Currently, it is only used when a specified hostname to connect
- to cannot be resolved.
-
-In every case, the `errstr` field in the context will be set to hold a string representation
-of the error.
-
-## Asynchronous API
-
-Hiredis comes with an asynchronous API that works easily with any event library.
-Examples are bundled that show using Hiredis with [libev](http://software.schmorp.de/pkg/libev.html)
-and [libevent](http://monkey.org/~provos/libevent/).
-
-### Connecting
-
-The function `redisAsyncConnect` can be used to establish a non-blocking connection to
-Redis. It returns a pointer to the newly created `redisAsyncContext` struct. The `err` field
-should be checked after creation to see if there were errors creating the connection.
-Because the connection that will be created is non-blocking, the kernel is not able to
-instantly return if the specified host and port is able to accept a connection.
-
- redisAsyncContext *c = redisAsyncConnect("127.0.0.1", 6379);
- if (c->err) {
- printf("Error: %s\n", c->errstr);
- // handle error
- }
-
-The asynchronous context can hold a disconnect callback function that is called when the
-connection is disconnected (either because of an error or per user request). This function should
-have the following prototype:
-
- void(const redisAsyncContext *c, int status);
-
-On a disconnect, the `status` argument is set to `REDIS_OK` when disconnection was initiated by the
-user, or `REDIS_ERR` when the disconnection was caused by an error. When it is `REDIS_ERR`, the `err`
-field in the context can be accessed to find out the cause of the error.
-
-The context object is always free'd after the disconnect callback fired. When a reconnect is needed,
-the disconnect callback is a good point to do so.
-
-Setting the disconnect callback can only be done once per context. For subsequent calls it will
-return `REDIS_ERR`. The function to set the disconnect callback has the following prototype:
-
- int redisAsyncSetDisconnectCallback(redisAsyncContext *ac, redisDisconnectCallback *fn);
-
-### Sending commands and their callbacks
-
-In an asynchronous context, commands are automatically pipelined due to the nature of an event loop.
-Therefore, unlike the synchronous API, there is only a single way to send commands.
-Because commands are sent to Redis asynchronously, issuing a command requires a callback function
-that is called when the reply is received. Reply callbacks should have the following prototype:
-
- void(redisAsyncContext *c, void *reply, void *privdata);
-
-The `privdata` argument can be used to curry arbitrary data to the callback from the point where
-the command is initially queued for execution.
-
-The functions that can be used to issue commands in an asynchronous context are:
-
- int redisAsyncCommand(
- redisAsyncContext *ac, redisCallbackFn *fn, void *privdata,
- const char *format, ...);
- int redisAsyncCommandArgv(
- redisAsyncContext *ac, redisCallbackFn *fn, void *privdata,
- int argc, const char **argv, const size_t *argvlen);
-
-Both functions work like their blocking counterparts. The return value is `REDIS_OK` when the command
-was successfully added to the output buffer and `REDIS_ERR` otherwise. Example: when the connection
-is being disconnected per user-request, no new commands may be added to the output buffer and `REDIS_ERR` is
-returned on calls to the `redisAsyncCommand` family.
-
-If the reply for a command with a `NULL` callback is read, it is immediately free'd. When the callback
-for a command is non-`NULL`, the memory is free'd immediately following the callback: the reply is only
-valid for the duration of the callback.
-
-All pending callbacks are called with a `NULL` reply when the context encountered an error.
-
-### Disconnecting
-
-An asynchronous connection can be terminated using:
-
- void redisAsyncDisconnect(redisAsyncContext *ac);
-
-When this function is called, the connection is **not** immediately terminated. Instead, new
-commands are no longer accepted and the connection is only terminated when all pending commands
-have been written to the socket, their respective replies have been read and their respective
-callbacks have been executed. After this, the disconnection callback is executed with the
-`REDIS_OK` status and the context object is free'd.
-
-### Hooking it up to event library *X*
-
-There are a few hooks that need to be set on the context object after it is created.
-See the `adapters/` directory for bindings to *libev* and *libevent*.
-
-## Reply parsing API
-
-Hiredis comes with a reply parsing API that makes it easy for writing higher
-level language bindings.
-
-The reply parsing API consists of the following functions:
-
- redisReader *redisReaderCreate(void);
- void redisReaderFree(redisReader *reader);
- int redisReaderFeed(redisReader *reader, const char *buf, size_t len);
- int redisReaderGetReply(redisReader *reader, void **reply);
-
-The same set of functions are used internally by hiredis when creating a
-normal Redis context, the above API just exposes it to the user for a direct
-usage.
-
-### Usage
-
-The function `redisReaderCreate` creates a `redisReader` structure that holds a
-buffer with unparsed data and state for the protocol parser.
-
-Incoming data -- most likely from a socket -- can be placed in the internal
-buffer of the `redisReader` using `redisReaderFeed`. This function will make a
-copy of the buffer pointed to by `buf` for `len` bytes. This data is parsed
-when `redisReaderGetReply` is called. This function returns an integer status
-and a reply object (as described above) via `void **reply`. The returned status
-can be either `REDIS_OK` or `REDIS_ERR`, where the latter means something went
-wrong (either a protocol error, or an out of memory error).
-
-### Customizing replies
-
-The function `redisReaderGetReply` creates `redisReply` and makes the function
-argument `reply` point to the created `redisReply` variable. For instance, if
-the response of type `REDIS_REPLY_STATUS` then the `str` field of `redisReply`
-will hold the status as a vanilla C string. However, the functions that are
-responsible for creating instances of the `redisReply` can be customized by
-setting the `fn` field on the `redisReader` struct. This should be done
-immediately after creating the `redisReader`.
-
-For example, [hiredis-rb](https://github.com/pietern/hiredis-rb/blob/master/ext/hiredis_ext/reader.c)
-uses customized reply object functions to create Ruby objects.
-
-### Reader max buffer
-
-Both when using the Reader API directly or when using it indirectly via a
-normal Redis context, the redisReader structure uses a buffer in order to
-accumulate data from the server.
-Usually this buffer is destroyed when it is empty and is larger than 16
-kb in order to avoid wasting memory in unused buffers
-
-However when working with very big payloads destroying the buffer may slow
-down performances considerably, so it is possible to modify the max size of
-an idle buffer changing the value of the `maxbuf` field of the reader structure
-to the desired value. The special value of 0 means that there is no maximum
-value for an idle buffer, so the buffer will never get freed.
-
-For instance if you have a normal Redis context you can set the maximum idle
-buffer to zero (unlimited) just with:
-
- context->reader->maxbuf = 0;
-
-This should be done only in order to maximize performances when working with
-large payloads. The context should be set back to `REDIS_READER_MAX_BUF` again
-as soon as possible in order to prevent allocation of useless memory.
-
-## AUTHORS
-
-Hiredis was written by Salvatore Sanfilippo (antirez at gmail) and
-Pieter Noordhuis (pcnoordhuis at gmail) and is released under the BSD license.
diff --git a/node_modules/hiredis/deps/hiredis/adapters/ae.h b/node_modules/hiredis/deps/hiredis/adapters/ae.h
deleted file mode 100644
index 65235f80..00000000
--- a/node_modules/hiredis/deps/hiredis/adapters/ae.h
+++ /dev/null
@@ -1,97 +0,0 @@
-#ifndef __HIREDIS_AE_H__
-#define __HIREDIS_AE_H__
-#include
-#include
-#include "../hiredis.h"
-#include "../async.h"
-
-typedef struct redisAeEvents {
- redisAsyncContext *context;
- aeEventLoop *loop;
- int fd;
- int reading, writing;
-} redisAeEvents;
-
-static void redisAeReadEvent(aeEventLoop *el, int fd, void *privdata, int mask) {
- ((void)el); ((void)fd); ((void)mask);
-
- redisAeEvents *e = (redisAeEvents*)privdata;
- redisAsyncHandleRead(e->context);
-}
-
-static void redisAeWriteEvent(aeEventLoop *el, int fd, void *privdata, int mask) {
- ((void)el); ((void)fd); ((void)mask);
-
- redisAeEvents *e = (redisAeEvents*)privdata;
- redisAsyncHandleWrite(e->context);
-}
-
-static void redisAeAddRead(void *privdata) {
- redisAeEvents *e = (redisAeEvents*)privdata;
- aeEventLoop *loop = e->loop;
- if (!e->reading) {
- e->reading = 1;
- aeCreateFileEvent(loop,e->fd,AE_READABLE,redisAeReadEvent,e);
- }
-}
-
-static void redisAeDelRead(void *privdata) {
- redisAeEvents *e = (redisAeEvents*)privdata;
- aeEventLoop *loop = e->loop;
- if (e->reading) {
- e->reading = 0;
- aeDeleteFileEvent(loop,e->fd,AE_READABLE);
- }
-}
-
-static void redisAeAddWrite(void *privdata) {
- redisAeEvents *e = (redisAeEvents*)privdata;
- aeEventLoop *loop = e->loop;
- if (!e->writing) {
- e->writing = 1;
- aeCreateFileEvent(loop,e->fd,AE_WRITABLE,redisAeWriteEvent,e);
- }
-}
-
-static void redisAeDelWrite(void *privdata) {
- redisAeEvents *e = (redisAeEvents*)privdata;
- aeEventLoop *loop = e->loop;
- if (e->writing) {
- e->writing = 0;
- aeDeleteFileEvent(loop,e->fd,AE_WRITABLE);
- }
-}
-
-static void redisAeCleanup(void *privdata) {
- redisAeEvents *e = (redisAeEvents*)privdata;
- redisAeDelRead(privdata);
- redisAeDelWrite(privdata);
- free(e);
-}
-
-static int redisAeAttach(aeEventLoop *loop, redisAsyncContext *ac) {
- redisContext *c = &(ac->c);
- redisAeEvents *e;
-
- /* Nothing should be attached when something is already attached */
- if (ac->ev.data != NULL)
- return REDIS_ERR;
-
- /* Create container for context and r/w events */
- e = (redisAeEvents*)malloc(sizeof(*e));
- e->context = ac;
- e->loop = loop;
- e->fd = c->fd;
- e->reading = e->writing = 0;
-
- /* Register functions to start/stop listening for events */
- ac->ev.addRead = redisAeAddRead;
- ac->ev.delRead = redisAeDelRead;
- ac->ev.addWrite = redisAeAddWrite;
- ac->ev.delWrite = redisAeDelWrite;
- ac->ev.cleanup = redisAeCleanup;
- ac->ev.data = e;
-
- return REDIS_OK;
-}
-#endif
diff --git a/node_modules/hiredis/deps/hiredis/adapters/libev.h b/node_modules/hiredis/deps/hiredis/adapters/libev.h
deleted file mode 100644
index 534d7436..00000000
--- a/node_modules/hiredis/deps/hiredis/adapters/libev.h
+++ /dev/null
@@ -1,117 +0,0 @@
-#ifndef __HIREDIS_LIBEV_H__
-#define __HIREDIS_LIBEV_H__
-#include
-#include
-#include
-#include "../hiredis.h"
-#include "../async.h"
-
-typedef struct redisLibevEvents {
- redisAsyncContext *context;
- struct ev_loop *loop;
- int reading, writing;
- ev_io rev, wev;
-} redisLibevEvents;
-
-static void redisLibevReadEvent(EV_P_ ev_io *watcher, int revents) {
-#if EV_MULTIPLICITY
- ((void)loop);
-#endif
- ((void)revents);
-
- redisLibevEvents *e = (redisLibevEvents*)watcher->data;
- redisAsyncHandleRead(e->context);
-}
-
-static void redisLibevWriteEvent(EV_P_ ev_io *watcher, int revents) {
-#if EV_MULTIPLICITY
- ((void)loop);
-#endif
- ((void)revents);
-
- redisLibevEvents *e = (redisLibevEvents*)watcher->data;
- redisAsyncHandleWrite(e->context);
-}
-
-static void redisLibevAddRead(void *privdata) {
- redisLibevEvents *e = (redisLibevEvents*)privdata;
- struct ev_loop *loop = e->loop;
- ((void)loop);
- if (!e->reading) {
- e->reading = 1;
- ev_io_start(EV_A_ &e->rev);
- }
-}
-
-static void redisLibevDelRead(void *privdata) {
- redisLibevEvents *e = (redisLibevEvents*)privdata;
- struct ev_loop *loop = e->loop;
- ((void)loop);
- if (e->reading) {
- e->reading = 0;
- ev_io_stop(EV_A_ &e->rev);
- }
-}
-
-static void redisLibevAddWrite(void *privdata) {
- redisLibevEvents *e = (redisLibevEvents*)privdata;
- struct ev_loop *loop = e->loop;
- ((void)loop);
- if (!e->writing) {
- e->writing = 1;
- ev_io_start(EV_A_ &e->wev);
- }
-}
-
-static void redisLibevDelWrite(void *privdata) {
- redisLibevEvents *e = (redisLibevEvents*)privdata;
- struct ev_loop *loop = e->loop;
- ((void)loop);
- if (e->writing) {
- e->writing = 0;
- ev_io_stop(EV_A_ &e->wev);
- }
-}
-
-static void redisLibevCleanup(void *privdata) {
- redisLibevEvents *e = (redisLibevEvents*)privdata;
- redisLibevDelRead(privdata);
- redisLibevDelWrite(privdata);
- free(e);
-}
-
-static int redisLibevAttach(EV_P_ redisAsyncContext *ac) {
- redisContext *c = &(ac->c);
- redisLibevEvents *e;
-
- /* Nothing should be attached when something is already attached */
- if (ac->ev.data != NULL)
- return REDIS_ERR;
-
- /* Create container for context and r/w events */
- e = (redisLibevEvents*)malloc(sizeof(*e));
- e->context = ac;
-#if EV_MULTIPLICITY
- e->loop = loop;
-#else
- e->loop = NULL;
-#endif
- e->reading = e->writing = 0;
- e->rev.data = e;
- e->wev.data = e;
-
- /* Register functions to start/stop listening for events */
- ac->ev.addRead = redisLibevAddRead;
- ac->ev.delRead = redisLibevDelRead;
- ac->ev.addWrite = redisLibevAddWrite;
- ac->ev.delWrite = redisLibevDelWrite;
- ac->ev.cleanup = redisLibevCleanup;
- ac->ev.data = e;
-
- /* Initialize read/write events */
- ev_io_init(&e->rev,redisLibevReadEvent,c->fd,EV_READ);
- ev_io_init(&e->wev,redisLibevWriteEvent,c->fd,EV_WRITE);
- return REDIS_OK;
-}
-
-#endif
diff --git a/node_modules/hiredis/deps/hiredis/adapters/libevent.h b/node_modules/hiredis/deps/hiredis/adapters/libevent.h
deleted file mode 100644
index 4055ec0f..00000000
--- a/node_modules/hiredis/deps/hiredis/adapters/libevent.h
+++ /dev/null
@@ -1,78 +0,0 @@
-#ifndef __HIREDIS_LIBEVENT_H__
-#define __HIREDIS_LIBEVENT_H__
-#include
-#include "../hiredis.h"
-#include "../async.h"
-
-typedef struct redisLibeventEvents {
- redisAsyncContext *context;
- struct event rev, wev;
-} redisLibeventEvents;
-
-static void redisLibeventReadEvent(int fd, short event, void *arg) {
- ((void)fd); ((void)event);
- redisLibeventEvents *e = (redisLibeventEvents*)arg;
- redisAsyncHandleRead(e->context);
-}
-
-static void redisLibeventWriteEvent(int fd, short event, void *arg) {
- ((void)fd); ((void)event);
- redisLibeventEvents *e = (redisLibeventEvents*)arg;
- redisAsyncHandleWrite(e->context);
-}
-
-static void redisLibeventAddRead(void *privdata) {
- redisLibeventEvents *e = (redisLibeventEvents*)privdata;
- event_add(&e->rev,NULL);
-}
-
-static void redisLibeventDelRead(void *privdata) {
- redisLibeventEvents *e = (redisLibeventEvents*)privdata;
- event_del(&e->rev);
-}
-
-static void redisLibeventAddWrite(void *privdata) {
- redisLibeventEvents *e = (redisLibeventEvents*)privdata;
- event_add(&e->wev,NULL);
-}
-
-static void redisLibeventDelWrite(void *privdata) {
- redisLibeventEvents *e = (redisLibeventEvents*)privdata;
- event_del(&e->wev);
-}
-
-static void redisLibeventCleanup(void *privdata) {
- redisLibeventEvents *e = (redisLibeventEvents*)privdata;
- event_del(&e->rev);
- event_del(&e->wev);
- free(e);
-}
-
-static int redisLibeventAttach(redisAsyncContext *ac, struct event_base *base) {
- redisContext *c = &(ac->c);
- redisLibeventEvents *e;
-
- /* Nothing should be attached when something is already attached */
- if (ac->ev.data != NULL)
- return REDIS_ERR;
-
- /* Create container for context and r/w events */
- e = (redisLibeventEvents*)malloc(sizeof(*e));
- e->context = ac;
-
- /* Register functions to start/stop listening for events */
- ac->ev.addRead = redisLibeventAddRead;
- ac->ev.delRead = redisLibeventDelRead;
- ac->ev.addWrite = redisLibeventAddWrite;
- ac->ev.delWrite = redisLibeventDelWrite;
- ac->ev.cleanup = redisLibeventCleanup;
- ac->ev.data = e;
-
- /* Initialize and install read/write events */
- event_set(&e->rev,c->fd,EV_READ,redisLibeventReadEvent,e);
- event_set(&e->wev,c->fd,EV_WRITE,redisLibeventWriteEvent,e);
- event_base_set(base,&e->rev);
- event_base_set(base,&e->wev);
- return REDIS_OK;
-}
-#endif
diff --git a/node_modules/hiredis/deps/hiredis/async.c b/node_modules/hiredis/deps/hiredis/async.c
deleted file mode 100644
index f65f8694..00000000
--- a/node_modules/hiredis/deps/hiredis/async.c
+++ /dev/null
@@ -1,622 +0,0 @@
-/*
- * Copyright (c) 2009-2011, Salvatore Sanfilippo
- * Copyright (c) 2010-2011, Pieter Noordhuis
- *
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * * Redistributions of source code must retain the above copyright notice,
- * this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * * Neither the name of Redis nor the names of its contributors may be used
- * to endorse or promote products derived from this software without
- * specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "fmacros.h"
-#include
-#include
-#include
-#include
-#include
-#include
-#include "async.h"
-#include "net.h"
-#include "dict.c"
-#include "sds.h"
-
-#define _EL_ADD_READ(ctx) do { \
- if ((ctx)->ev.addRead) (ctx)->ev.addRead((ctx)->ev.data); \
- } while(0)
-#define _EL_DEL_READ(ctx) do { \
- if ((ctx)->ev.delRead) (ctx)->ev.delRead((ctx)->ev.data); \
- } while(0)
-#define _EL_ADD_WRITE(ctx) do { \
- if ((ctx)->ev.addWrite) (ctx)->ev.addWrite((ctx)->ev.data); \
- } while(0)
-#define _EL_DEL_WRITE(ctx) do { \
- if ((ctx)->ev.delWrite) (ctx)->ev.delWrite((ctx)->ev.data); \
- } while(0)
-#define _EL_CLEANUP(ctx) do { \
- if ((ctx)->ev.cleanup) (ctx)->ev.cleanup((ctx)->ev.data); \
- } while(0);
-
-/* Forward declaration of function in hiredis.c */
-void __redisAppendCommand(redisContext *c, char *cmd, size_t len);
-
-/* Functions managing dictionary of callbacks for pub/sub. */
-static unsigned int callbackHash(const void *key) {
- return dictGenHashFunction((unsigned char*)key,sdslen((char*)key));
-}
-
-static void *callbackValDup(void *privdata, const void *src) {
- ((void) privdata);
- redisCallback *dup = malloc(sizeof(*dup));
- memcpy(dup,src,sizeof(*dup));
- return dup;
-}
-
-static int callbackKeyCompare(void *privdata, const void *key1, const void *key2) {
- int l1, l2;
- ((void) privdata);
-
- l1 = sdslen((sds)key1);
- l2 = sdslen((sds)key2);
- if (l1 != l2) return 0;
- return memcmp(key1,key2,l1) == 0;
-}
-
-static void callbackKeyDestructor(void *privdata, void *key) {
- ((void) privdata);
- sdsfree((sds)key);
-}
-
-static void callbackValDestructor(void *privdata, void *val) {
- ((void) privdata);
- free(val);
-}
-
-static dictType callbackDict = {
- callbackHash,
- NULL,
- callbackValDup,
- callbackKeyCompare,
- callbackKeyDestructor,
- callbackValDestructor
-};
-
-static redisAsyncContext *redisAsyncInitialize(redisContext *c) {
- redisAsyncContext *ac = realloc(c,sizeof(redisAsyncContext));
- c = &(ac->c);
-
- /* The regular connect functions will always set the flag REDIS_CONNECTED.
- * For the async API, we want to wait until the first write event is
- * received up before setting this flag, so reset it here. */
- c->flags &= ~REDIS_CONNECTED;
-
- ac->err = 0;
- ac->errstr = NULL;
- ac->data = NULL;
-
- ac->ev.data = NULL;
- ac->ev.addRead = NULL;
- ac->ev.delRead = NULL;
- ac->ev.addWrite = NULL;
- ac->ev.delWrite = NULL;
- ac->ev.cleanup = NULL;
-
- ac->onConnect = NULL;
- ac->onDisconnect = NULL;
-
- ac->replies.head = NULL;
- ac->replies.tail = NULL;
- ac->sub.invalid.head = NULL;
- ac->sub.invalid.tail = NULL;
- ac->sub.channels = dictCreate(&callbackDict,NULL);
- ac->sub.patterns = dictCreate(&callbackDict,NULL);
- return ac;
-}
-
-/* We want the error field to be accessible directly instead of requiring
- * an indirection to the redisContext struct. */
-static void __redisAsyncCopyError(redisAsyncContext *ac) {
- redisContext *c = &(ac->c);
- ac->err = c->err;
- ac->errstr = c->errstr;
-}
-
-redisAsyncContext *redisAsyncConnect(const char *ip, int port) {
- redisContext *c = redisConnectNonBlock(ip,port);
- redisAsyncContext *ac = redisAsyncInitialize(c);
- __redisAsyncCopyError(ac);
- return ac;
-}
-
-redisAsyncContext *redisAsyncConnectUnix(const char *path) {
- redisContext *c = redisConnectUnixNonBlock(path);
- redisAsyncContext *ac = redisAsyncInitialize(c);
- __redisAsyncCopyError(ac);
- return ac;
-}
-
-int redisAsyncSetConnectCallback(redisAsyncContext *ac, redisConnectCallback *fn) {
- if (ac->onConnect == NULL) {
- ac->onConnect = fn;
-
- /* The common way to detect an established connection is to wait for
- * the first write event to be fired. This assumes the related event
- * library functions are already set. */
- _EL_ADD_WRITE(ac);
- return REDIS_OK;
- }
- return REDIS_ERR;
-}
-
-int redisAsyncSetDisconnectCallback(redisAsyncContext *ac, redisDisconnectCallback *fn) {
- if (ac->onDisconnect == NULL) {
- ac->onDisconnect = fn;
- return REDIS_OK;
- }
- return REDIS_ERR;
-}
-
-/* Helper functions to push/shift callbacks */
-static int __redisPushCallback(redisCallbackList *list, redisCallback *source) {
- redisCallback *cb;
-
- /* Copy callback from stack to heap */
- cb = malloc(sizeof(*cb));
- if (source != NULL) {
- memcpy(cb,source,sizeof(*cb));
- cb->next = NULL;
- }
-
- /* Store callback in list */
- if (list->head == NULL)
- list->head = cb;
- if (list->tail != NULL)
- list->tail->next = cb;
- list->tail = cb;
- return REDIS_OK;
-}
-
-static int __redisShiftCallback(redisCallbackList *list, redisCallback *target) {
- redisCallback *cb = list->head;
- if (cb != NULL) {
- list->head = cb->next;
- if (cb == list->tail)
- list->tail = NULL;
-
- /* Copy callback from heap to stack */
- if (target != NULL)
- memcpy(target,cb,sizeof(*cb));
- free(cb);
- return REDIS_OK;
- }
- return REDIS_ERR;
-}
-
-static void __redisRunCallback(redisAsyncContext *ac, redisCallback *cb, redisReply *reply) {
- redisContext *c = &(ac->c);
- if (cb->fn != NULL) {
- c->flags |= REDIS_IN_CALLBACK;
- cb->fn(ac,reply,cb->privdata);
- c->flags &= ~REDIS_IN_CALLBACK;
- }
-}
-
-/* Helper function to free the context. */
-static void __redisAsyncFree(redisAsyncContext *ac) {
- redisContext *c = &(ac->c);
- redisCallback cb;
- dictIterator *it;
- dictEntry *de;
-
- /* Execute pending callbacks with NULL reply. */
- while (__redisShiftCallback(&ac->replies,&cb) == REDIS_OK)
- __redisRunCallback(ac,&cb,NULL);
-
- /* Execute callbacks for invalid commands */
- while (__redisShiftCallback(&ac->sub.invalid,&cb) == REDIS_OK)
- __redisRunCallback(ac,&cb,NULL);
-
- /* Run subscription callbacks callbacks with NULL reply */
- it = dictGetIterator(ac->sub.channels);
- while ((de = dictNext(it)) != NULL)
- __redisRunCallback(ac,dictGetEntryVal(de),NULL);
- dictReleaseIterator(it);
- dictRelease(ac->sub.channels);
-
- it = dictGetIterator(ac->sub.patterns);
- while ((de = dictNext(it)) != NULL)
- __redisRunCallback(ac,dictGetEntryVal(de),NULL);
- dictReleaseIterator(it);
- dictRelease(ac->sub.patterns);
-
- /* Signal event lib to clean up */
- _EL_CLEANUP(ac);
-
- /* Execute disconnect callback. When redisAsyncFree() initiated destroying
- * this context, the status will always be REDIS_OK. */
- if (ac->onDisconnect && (c->flags & REDIS_CONNECTED)) {
- if (c->flags & REDIS_FREEING) {
- ac->onDisconnect(ac,REDIS_OK);
- } else {
- ac->onDisconnect(ac,(ac->err == 0) ? REDIS_OK : REDIS_ERR);
- }
- }
-
- /* Cleanup self */
- redisFree(c);
-}
-
-/* Free the async context. When this function is called from a callback,
- * control needs to be returned to redisProcessCallbacks() before actual
- * free'ing. To do so, a flag is set on the context which is picked up by
- * redisProcessCallbacks(). Otherwise, the context is immediately free'd. */
-void redisAsyncFree(redisAsyncContext *ac) {
- redisContext *c = &(ac->c);
- c->flags |= REDIS_FREEING;
- if (!(c->flags & REDIS_IN_CALLBACK))
- __redisAsyncFree(ac);
-}
-
-/* Helper function to make the disconnect happen and clean up. */
-static void __redisAsyncDisconnect(redisAsyncContext *ac) {
- redisContext *c = &(ac->c);
-
- /* Make sure error is accessible if there is any */
- __redisAsyncCopyError(ac);
-
- if (ac->err == 0) {
- /* For clean disconnects, there should be no pending callbacks. */
- assert(__redisShiftCallback(&ac->replies,NULL) == REDIS_ERR);
- } else {
- /* Disconnection is caused by an error, make sure that pending
- * callbacks cannot call new commands. */
- c->flags |= REDIS_DISCONNECTING;
- }
-
- /* For non-clean disconnects, __redisAsyncFree() will execute pending
- * callbacks with a NULL-reply. */
- __redisAsyncFree(ac);
-}
-
-/* Tries to do a clean disconnect from Redis, meaning it stops new commands
- * from being issued, but tries to flush the output buffer and execute
- * callbacks for all remaining replies. When this function is called from a
- * callback, there might be more replies and we can safely defer disconnecting
- * to redisProcessCallbacks(). Otherwise, we can only disconnect immediately
- * when there are no pending callbacks. */
-void redisAsyncDisconnect(redisAsyncContext *ac) {
- redisContext *c = &(ac->c);
- c->flags |= REDIS_DISCONNECTING;
- if (!(c->flags & REDIS_IN_CALLBACK) && ac->replies.head == NULL)
- __redisAsyncDisconnect(ac);
-}
-
-static int __redisGetSubscribeCallback(redisAsyncContext *ac, redisReply *reply, redisCallback *dstcb) {
- redisContext *c = &(ac->c);
- dict *callbacks;
- dictEntry *de;
- int pvariant;
- char *stype;
- sds sname;
-
- /* Custom reply functions are not supported for pub/sub. This will fail
- * very hard when they are used... */
- if (reply->type == REDIS_REPLY_ARRAY) {
- assert(reply->elements >= 2);
- assert(reply->element[0]->type == REDIS_REPLY_STRING);
- stype = reply->element[0]->str;
- pvariant = (tolower(stype[0]) == 'p') ? 1 : 0;
-
- if (pvariant)
- callbacks = ac->sub.patterns;
- else
- callbacks = ac->sub.channels;
-
- /* Locate the right callback */
- assert(reply->element[1]->type == REDIS_REPLY_STRING);
- sname = sdsnewlen(reply->element[1]->str,reply->element[1]->len);
- de = dictFind(callbacks,sname);
- if (de != NULL) {
- memcpy(dstcb,dictGetEntryVal(de),sizeof(*dstcb));
-
- /* If this is an unsubscribe message, remove it. */
- if (strcasecmp(stype+pvariant,"unsubscribe") == 0) {
- dictDelete(callbacks,sname);
-
- /* If this was the last unsubscribe message, revert to
- * non-subscribe mode. */
- assert(reply->element[2]->type == REDIS_REPLY_INTEGER);
- if (reply->element[2]->integer == 0)
- c->flags &= ~REDIS_SUBSCRIBED;
- }
- }
- sdsfree(sname);
- } else {
- /* Shift callback for invalid commands. */
- __redisShiftCallback(&ac->sub.invalid,dstcb);
- }
- return REDIS_OK;
-}
-
-void redisProcessCallbacks(redisAsyncContext *ac) {
- redisContext *c = &(ac->c);
- redisCallback cb;
- void *reply = NULL;
- int status;
-
- while((status = redisGetReply(c,&reply)) == REDIS_OK) {
- if (reply == NULL) {
- /* When the connection is being disconnected and there are
- * no more replies, this is the cue to really disconnect. */
- if (c->flags & REDIS_DISCONNECTING && sdslen(c->obuf) == 0) {
- __redisAsyncDisconnect(ac);
- return;
- }
-
- /* If monitor mode, repush callback */
- if(c->flags & REDIS_MONITORING) {
- __redisPushCallback(&ac->replies,&cb);
- }
-
- /* When the connection is not being disconnected, simply stop
- * trying to get replies and wait for the next loop tick. */
- break;
- }
-
- /* Even if the context is subscribed, pending regular callbacks will
- * get a reply before pub/sub messages arrive. */
- if (__redisShiftCallback(&ac->replies,&cb) != REDIS_OK) {
- /*
- * A spontaneous reply in a not-subscribed context can be the error
- * reply that is sent when a new connection exceeds the maximum
- * number of allowed connections on the server side.
- *
- * This is seen as an error instead of a regular reply because the
- * server closes the connection after sending it.
- *
- * To prevent the error from being overwritten by an EOF error the
- * connection is closed here. See issue #43.
- *
- * Another possibility is that the server is loading its dataset.
- * In this case we also want to close the connection, and have the
- * user wait until the server is ready to take our request.
- */
- if (((redisReply*)reply)->type == REDIS_REPLY_ERROR) {
- c->err = REDIS_ERR_OTHER;
- snprintf(c->errstr,sizeof(c->errstr),"%s",((redisReply*)reply)->str);
- __redisAsyncDisconnect(ac);
- return;
- }
- /* No more regular callbacks and no errors, the context *must* be subscribed or monitoring. */
- assert((c->flags & REDIS_SUBSCRIBED || c->flags & REDIS_MONITORING));
- if(c->flags & REDIS_SUBSCRIBED)
- __redisGetSubscribeCallback(ac,reply,&cb);
- }
-
- if (cb.fn != NULL) {
- __redisRunCallback(ac,&cb,reply);
- c->reader->fn->freeObject(reply);
-
- /* Proceed with free'ing when redisAsyncFree() was called. */
- if (c->flags & REDIS_FREEING) {
- __redisAsyncFree(ac);
- return;
- }
- } else {
- /* No callback for this reply. This can either be a NULL callback,
- * or there were no callbacks to begin with. Either way, don't
- * abort with an error, but simply ignore it because the client
- * doesn't know what the server will spit out over the wire. */
- c->reader->fn->freeObject(reply);
- }
- }
-
- /* Disconnect when there was an error reading the reply */
- if (status != REDIS_OK)
- __redisAsyncDisconnect(ac);
-}
-
-/* Internal helper function to detect socket status the first time a read or
- * write event fires. When connecting was not succesful, the connect callback
- * is called with a REDIS_ERR status and the context is free'd. */
-static int __redisAsyncHandleConnect(redisAsyncContext *ac) {
- redisContext *c = &(ac->c);
-
- if (redisCheckSocketError(c,c->fd) == REDIS_ERR) {
- /* Try again later when connect(2) is still in progress. */
- if (errno == EINPROGRESS)
- return REDIS_OK;
-
- if (ac->onConnect) ac->onConnect(ac,REDIS_ERR);
- __redisAsyncDisconnect(ac);
- return REDIS_ERR;
- }
-
- /* Mark context as connected. */
- c->flags |= REDIS_CONNECTED;
- if (ac->onConnect) ac->onConnect(ac,REDIS_OK);
- return REDIS_OK;
-}
-
-/* This function should be called when the socket is readable.
- * It processes all replies that can be read and executes their callbacks.
- */
-void redisAsyncHandleRead(redisAsyncContext *ac) {
- redisContext *c = &(ac->c);
-
- if (!(c->flags & REDIS_CONNECTED)) {
- /* Abort connect was not successful. */
- if (__redisAsyncHandleConnect(ac) != REDIS_OK)
- return;
- /* Try again later when the context is still not connected. */
- if (!(c->flags & REDIS_CONNECTED))
- return;
- }
-
- if (redisBufferRead(c) == REDIS_ERR) {
- __redisAsyncDisconnect(ac);
- } else {
- /* Always re-schedule reads */
- _EL_ADD_READ(ac);
- redisProcessCallbacks(ac);
- }
-}
-
-void redisAsyncHandleWrite(redisAsyncContext *ac) {
- redisContext *c = &(ac->c);
- int done = 0;
-
- if (!(c->flags & REDIS_CONNECTED)) {
- /* Abort connect was not successful. */
- if (__redisAsyncHandleConnect(ac) != REDIS_OK)
- return;
- /* Try again later when the context is still not connected. */
- if (!(c->flags & REDIS_CONNECTED))
- return;
- }
-
- if (redisBufferWrite(c,&done) == REDIS_ERR) {
- __redisAsyncDisconnect(ac);
- } else {
- /* Continue writing when not done, stop writing otherwise */
- if (!done)
- _EL_ADD_WRITE(ac);
- else
- _EL_DEL_WRITE(ac);
-
- /* Always schedule reads after writes */
- _EL_ADD_READ(ac);
- }
-}
-
-/* Sets a pointer to the first argument and its length starting at p. Returns
- * the number of bytes to skip to get to the following argument. */
-static char *nextArgument(char *start, char **str, size_t *len) {
- char *p = start;
- if (p[0] != '$') {
- p = strchr(p,'$');
- if (p == NULL) return NULL;
- }
-
- *len = (int)strtol(p+1,NULL,10);
- p = strchr(p,'\r');
- assert(p);
- *str = p+2;
- return p+2+(*len)+2;
-}
-
-/* Helper function for the redisAsyncCommand* family of functions. Writes a
- * formatted command to the output buffer and registers the provided callback
- * function with the context. */
-static int __redisAsyncCommand(redisAsyncContext *ac, redisCallbackFn *fn, void *privdata, char *cmd, size_t len) {
- redisContext *c = &(ac->c);
- redisCallback cb;
- int pvariant, hasnext;
- char *cstr, *astr;
- size_t clen, alen;
- char *p;
- sds sname;
-
- /* Don't accept new commands when the connection is about to be closed. */
- if (c->flags & (REDIS_DISCONNECTING | REDIS_FREEING)) return REDIS_ERR;
-
- /* Setup callback */
- cb.fn = fn;
- cb.privdata = privdata;
-
- /* Find out which command will be appended. */
- p = nextArgument(cmd,&cstr,&clen);
- assert(p != NULL);
- hasnext = (p[0] == '$');
- pvariant = (tolower(cstr[0]) == 'p') ? 1 : 0;
- cstr += pvariant;
- clen -= pvariant;
-
- if (hasnext && strncasecmp(cstr,"subscribe\r\n",11) == 0) {
- c->flags |= REDIS_SUBSCRIBED;
-
- /* Add every channel/pattern to the list of subscription callbacks. */
- while ((p = nextArgument(p,&astr,&alen)) != NULL) {
- sname = sdsnewlen(astr,alen);
- if (pvariant)
- dictReplace(ac->sub.patterns,sname,&cb);
- else
- dictReplace(ac->sub.channels,sname,&cb);
- }
- } else if (strncasecmp(cstr,"unsubscribe\r\n",13) == 0) {
- /* It is only useful to call (P)UNSUBSCRIBE when the context is
- * subscribed to one or more channels or patterns. */
- if (!(c->flags & REDIS_SUBSCRIBED)) return REDIS_ERR;
-
- /* (P)UNSUBSCRIBE does not have its own response: every channel or
- * pattern that is unsubscribed will receive a message. This means we
- * should not append a callback function for this command. */
- } else if(strncasecmp(cstr,"monitor\r\n",9) == 0) {
- /* Set monitor flag and push callback */
- c->flags |= REDIS_MONITORING;
- __redisPushCallback(&ac->replies,&cb);
- } else {
- if (c->flags & REDIS_SUBSCRIBED)
- /* This will likely result in an error reply, but it needs to be
- * received and passed to the callback. */
- __redisPushCallback(&ac->sub.invalid,&cb);
- else
- __redisPushCallback(&ac->replies,&cb);
- }
-
- __redisAppendCommand(c,cmd,len);
-
- /* Always schedule a write when the write buffer is non-empty */
- _EL_ADD_WRITE(ac);
-
- return REDIS_OK;
-}
-
-int redisvAsyncCommand(redisAsyncContext *ac, redisCallbackFn *fn, void *privdata, const char *format, va_list ap) {
- char *cmd;
- int len;
- int status;
- len = redisvFormatCommand(&cmd,format,ap);
- status = __redisAsyncCommand(ac,fn,privdata,cmd,len);
- free(cmd);
- return status;
-}
-
-int redisAsyncCommand(redisAsyncContext *ac, redisCallbackFn *fn, void *privdata, const char *format, ...) {
- va_list ap;
- int status;
- va_start(ap,format);
- status = redisvAsyncCommand(ac,fn,privdata,format,ap);
- va_end(ap);
- return status;
-}
-
-int redisAsyncCommandArgv(redisAsyncContext *ac, redisCallbackFn *fn, void *privdata, int argc, const char **argv, const size_t *argvlen) {
- char *cmd;
- int len;
- int status;
- len = redisFormatCommandArgv(&cmd,argc,argv,argvlen);
- status = __redisAsyncCommand(ac,fn,privdata,cmd,len);
- free(cmd);
- return status;
-}
diff --git a/node_modules/hiredis/deps/hiredis/async.h b/node_modules/hiredis/deps/hiredis/async.h
deleted file mode 100644
index 268274e8..00000000
--- a/node_modules/hiredis/deps/hiredis/async.h
+++ /dev/null
@@ -1,125 +0,0 @@
-/*
- * Copyright (c) 2009-2011, Salvatore Sanfilippo
- * Copyright (c) 2010-2011, Pieter Noordhuis
- *
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * * Redistributions of source code must retain the above copyright notice,
- * this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * * Neither the name of Redis nor the names of its contributors may be used
- * to endorse or promote products derived from this software without
- * specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef __HIREDIS_ASYNC_H
-#define __HIREDIS_ASYNC_H
-#include "hiredis.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-struct redisAsyncContext; /* need forward declaration of redisAsyncContext */
-struct dict; /* dictionary header is included in async.c */
-
-/* Reply callback prototype and container */
-typedef void (redisCallbackFn)(struct redisAsyncContext*, void*, void*);
-typedef struct redisCallback {
- struct redisCallback *next; /* simple singly linked list */
- redisCallbackFn *fn;
- void *privdata;
-} redisCallback;
-
-/* List of callbacks for either regular replies or pub/sub */
-typedef struct redisCallbackList {
- redisCallback *head, *tail;
-} redisCallbackList;
-
-/* Connection callback prototypes */
-typedef void (redisDisconnectCallback)(const struct redisAsyncContext*, int status);
-typedef void (redisConnectCallback)(const struct redisAsyncContext*, int status);
-
-/* Context for an async connection to Redis */
-typedef struct redisAsyncContext {
- /* Hold the regular context, so it can be realloc'ed. */
- redisContext c;
-
- /* Setup error flags so they can be used directly. */
- int err;
- char *errstr;
-
- /* Not used by hiredis */
- void *data;
-
- /* Event library data and hooks */
- struct {
- void *data;
-
- /* Hooks that are called when the library expects to start
- * reading/writing. These functions should be idempotent. */
- void (*addRead)(void *privdata);
- void (*delRead)(void *privdata);
- void (*addWrite)(void *privdata);
- void (*delWrite)(void *privdata);
- void (*cleanup)(void *privdata);
- } ev;
-
- /* Called when either the connection is terminated due to an error or per
- * user request. The status is set accordingly (REDIS_OK, REDIS_ERR). */
- redisDisconnectCallback *onDisconnect;
-
- /* Called when the first write event was received. */
- redisConnectCallback *onConnect;
-
- /* Regular command callbacks */
- redisCallbackList replies;
-
- /* Subscription callbacks */
- struct {
- redisCallbackList invalid;
- struct dict *channels;
- struct dict *patterns;
- } sub;
-} redisAsyncContext;
-
-/* Functions that proxy to hiredis */
-redisAsyncContext *redisAsyncConnect(const char *ip, int port);
-redisAsyncContext *redisAsyncConnectUnix(const char *path);
-int redisAsyncSetConnectCallback(redisAsyncContext *ac, redisConnectCallback *fn);
-int redisAsyncSetDisconnectCallback(redisAsyncContext *ac, redisDisconnectCallback *fn);
-void redisAsyncDisconnect(redisAsyncContext *ac);
-void redisAsyncFree(redisAsyncContext *ac);
-
-/* Handle read/write events */
-void redisAsyncHandleRead(redisAsyncContext *ac);
-void redisAsyncHandleWrite(redisAsyncContext *ac);
-
-/* Command functions for an async context. Write the command to the
- * output buffer and register the provided callback. */
-int redisvAsyncCommand(redisAsyncContext *ac, redisCallbackFn *fn, void *privdata, const char *format, va_list ap);
-int redisAsyncCommand(redisAsyncContext *ac, redisCallbackFn *fn, void *privdata, const char *format, ...);
-int redisAsyncCommandArgv(redisAsyncContext *ac, redisCallbackFn *fn, void *privdata, int argc, const char **argv, const size_t *argvlen);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
diff --git a/node_modules/hiredis/deps/hiredis/dict.c b/node_modules/hiredis/deps/hiredis/dict.c
deleted file mode 100644
index 79b1041c..00000000
--- a/node_modules/hiredis/deps/hiredis/dict.c
+++ /dev/null
@@ -1,338 +0,0 @@
-/* Hash table implementation.
- *
- * This file implements in memory hash tables with insert/del/replace/find/
- * get-random-element operations. Hash tables will auto resize if needed
- * tables of power of two in size are used, collisions are handled by
- * chaining. See the source code for more information... :)
- *
- * Copyright (c) 2006-2010, Salvatore Sanfilippo
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * * Redistributions of source code must retain the above copyright notice,
- * this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * * Neither the name of Redis nor the names of its contributors may be used
- * to endorse or promote products derived from this software without
- * specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "fmacros.h"
-#include
-#include
-#include
-#include "dict.h"
-
-/* -------------------------- private prototypes ---------------------------- */
-
-static int _dictExpandIfNeeded(dict *ht);
-static unsigned long _dictNextPower(unsigned long size);
-static int _dictKeyIndex(dict *ht, const void *key);
-static int _dictInit(dict *ht, dictType *type, void *privDataPtr);
-
-/* -------------------------- hash functions -------------------------------- */
-
-/* Generic hash function (a popular one from Bernstein).
- * I tested a few and this was the best. */
-static unsigned int dictGenHashFunction(const unsigned char *buf, int len) {
- unsigned int hash = 5381;
-
- while (len--)
- hash = ((hash << 5) + hash) + (*buf++); /* hash * 33 + c */
- return hash;
-}
-
-/* ----------------------------- API implementation ------------------------- */
-
-/* Reset an hashtable already initialized with ht_init().
- * NOTE: This function should only called by ht_destroy(). */
-static void _dictReset(dict *ht) {
- ht->table = NULL;
- ht->size = 0;
- ht->sizemask = 0;
- ht->used = 0;
-}
-
-/* Create a new hash table */
-static dict *dictCreate(dictType *type, void *privDataPtr) {
- dict *ht = malloc(sizeof(*ht));
- _dictInit(ht,type,privDataPtr);
- return ht;
-}
-
-/* Initialize the hash table */
-static int _dictInit(dict *ht, dictType *type, void *privDataPtr) {
- _dictReset(ht);
- ht->type = type;
- ht->privdata = privDataPtr;
- return DICT_OK;
-}
-
-/* Expand or create the hashtable */
-static int dictExpand(dict *ht, unsigned long size) {
- dict n; /* the new hashtable */
- unsigned long realsize = _dictNextPower(size), i;
-
- /* the size is invalid if it is smaller than the number of
- * elements already inside the hashtable */
- if (ht->used > size)
- return DICT_ERR;
-
- _dictInit(&n, ht->type, ht->privdata);
- n.size = realsize;
- n.sizemask = realsize-1;
- n.table = calloc(realsize,sizeof(dictEntry*));
-
- /* Copy all the elements from the old to the new table:
- * note that if the old hash table is empty ht->size is zero,
- * so dictExpand just creates an hash table. */
- n.used = ht->used;
- for (i = 0; i < ht->size && ht->used > 0; i++) {
- dictEntry *he, *nextHe;
-
- if (ht->table[i] == NULL) continue;
-
- /* For each hash entry on this slot... */
- he = ht->table[i];
- while(he) {
- unsigned int h;
-
- nextHe = he->next;
- /* Get the new element index */
- h = dictHashKey(ht, he->key) & n.sizemask;
- he->next = n.table[h];
- n.table[h] = he;
- ht->used--;
- /* Pass to the next element */
- he = nextHe;
- }
- }
- assert(ht->used == 0);
- free(ht->table);
-
- /* Remap the new hashtable in the old */
- *ht = n;
- return DICT_OK;
-}
-
-/* Add an element to the target hash table */
-static int dictAdd(dict *ht, void *key, void *val) {
- int index;
- dictEntry *entry;
-
- /* Get the index of the new element, or -1 if
- * the element already exists. */
- if ((index = _dictKeyIndex(ht, key)) == -1)
- return DICT_ERR;
-
- /* Allocates the memory and stores key */
- entry = malloc(sizeof(*entry));
- entry->next = ht->table[index];
- ht->table[index] = entry;
-
- /* Set the hash entry fields. */
- dictSetHashKey(ht, entry, key);
- dictSetHashVal(ht, entry, val);
- ht->used++;
- return DICT_OK;
-}
-
-/* Add an element, discarding the old if the key already exists.
- * Return 1 if the key was added from scratch, 0 if there was already an
- * element with such key and dictReplace() just performed a value update
- * operation. */
-static int dictReplace(dict *ht, void *key, void *val) {
- dictEntry *entry, auxentry;
-
- /* Try to add the element. If the key
- * does not exists dictAdd will suceed. */
- if (dictAdd(ht, key, val) == DICT_OK)
- return 1;
- /* It already exists, get the entry */
- entry = dictFind(ht, key);
- /* Free the old value and set the new one */
- /* Set the new value and free the old one. Note that it is important
- * to do that in this order, as the value may just be exactly the same
- * as the previous one. In this context, think to reference counting,
- * you want to increment (set), and then decrement (free), and not the
- * reverse. */
- auxentry = *entry;
- dictSetHashVal(ht, entry, val);
- dictFreeEntryVal(ht, &auxentry);
- return 0;
-}
-
-/* Search and remove an element */
-static int dictDelete(dict *ht, const void *key) {
- unsigned int h;
- dictEntry *de, *prevde;
-
- if (ht->size == 0)
- return DICT_ERR;
- h = dictHashKey(ht, key) & ht->sizemask;
- de = ht->table[h];
-
- prevde = NULL;
- while(de) {
- if (dictCompareHashKeys(ht,key,de->key)) {
- /* Unlink the element from the list */
- if (prevde)
- prevde->next = de->next;
- else
- ht->table[h] = de->next;
-
- dictFreeEntryKey(ht,de);
- dictFreeEntryVal(ht,de);
- free(de);
- ht->used--;
- return DICT_OK;
- }
- prevde = de;
- de = de->next;
- }
- return DICT_ERR; /* not found */
-}
-
-/* Destroy an entire hash table */
-static int _dictClear(dict *ht) {
- unsigned long i;
-
- /* Free all the elements */
- for (i = 0; i < ht->size && ht->used > 0; i++) {
- dictEntry *he, *nextHe;
-
- if ((he = ht->table[i]) == NULL) continue;
- while(he) {
- nextHe = he->next;
- dictFreeEntryKey(ht, he);
- dictFreeEntryVal(ht, he);
- free(he);
- ht->used--;
- he = nextHe;
- }
- }
- /* Free the table and the allocated cache structure */
- free(ht->table);
- /* Re-initialize the table */
- _dictReset(ht);
- return DICT_OK; /* never fails */
-}
-
-/* Clear & Release the hash table */
-static void dictRelease(dict *ht) {
- _dictClear(ht);
- free(ht);
-}
-
-static dictEntry *dictFind(dict *ht, const void *key) {
- dictEntry *he;
- unsigned int h;
-
- if (ht->size == 0) return NULL;
- h = dictHashKey(ht, key) & ht->sizemask;
- he = ht->table[h];
- while(he) {
- if (dictCompareHashKeys(ht, key, he->key))
- return he;
- he = he->next;
- }
- return NULL;
-}
-
-static dictIterator *dictGetIterator(dict *ht) {
- dictIterator *iter = malloc(sizeof(*iter));
-
- iter->ht = ht;
- iter->index = -1;
- iter->entry = NULL;
- iter->nextEntry = NULL;
- return iter;
-}
-
-static dictEntry *dictNext(dictIterator *iter) {
- while (1) {
- if (iter->entry == NULL) {
- iter->index++;
- if (iter->index >=
- (signed)iter->ht->size) break;
- iter->entry = iter->ht->table[iter->index];
- } else {
- iter->entry = iter->nextEntry;
- }
- if (iter->entry) {
- /* We need to save the 'next' here, the iterator user
- * may delete the entry we are returning. */
- iter->nextEntry = iter->entry->next;
- return iter->entry;
- }
- }
- return NULL;
-}
-
-static void dictReleaseIterator(dictIterator *iter) {
- free(iter);
-}
-
-/* ------------------------- private functions ------------------------------ */
-
-/* Expand the hash table if needed */
-static int _dictExpandIfNeeded(dict *ht) {
- /* If the hash table is empty expand it to the intial size,
- * if the table is "full" dobule its size. */
- if (ht->size == 0)
- return dictExpand(ht, DICT_HT_INITIAL_SIZE);
- if (ht->used == ht->size)
- return dictExpand(ht, ht->size*2);
- return DICT_OK;
-}
-
-/* Our hash table capability is a power of two */
-static unsigned long _dictNextPower(unsigned long size) {
- unsigned long i = DICT_HT_INITIAL_SIZE;
-
- if (size >= LONG_MAX) return LONG_MAX;
- while(1) {
- if (i >= size)
- return i;
- i *= 2;
- }
-}
-
-/* Returns the index of a free slot that can be populated with
- * an hash entry for the given 'key'.
- * If the key already exists, -1 is returned. */
-static int _dictKeyIndex(dict *ht, const void *key) {
- unsigned int h;
- dictEntry *he;
-
- /* Expand the hashtable if needed */
- if (_dictExpandIfNeeded(ht) == DICT_ERR)
- return -1;
- /* Compute the key hash value */
- h = dictHashKey(ht, key) & ht->sizemask;
- /* Search if this slot does not already contain the given key */
- he = ht->table[h];
- while(he) {
- if (dictCompareHashKeys(ht, key, he->key))
- return -1;
- he = he->next;
- }
- return h;
-}
-
diff --git a/node_modules/hiredis/deps/hiredis/dict.h b/node_modules/hiredis/deps/hiredis/dict.h
deleted file mode 100644
index 95fcd280..00000000
--- a/node_modules/hiredis/deps/hiredis/dict.h
+++ /dev/null
@@ -1,126 +0,0 @@
-/* Hash table implementation.
- *
- * This file implements in memory hash tables with insert/del/replace/find/
- * get-random-element operations. Hash tables will auto resize if needed
- * tables of power of two in size are used, collisions are handled by
- * chaining. See the source code for more information... :)
- *
- * Copyright (c) 2006-2010, Salvatore Sanfilippo
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * * Redistributions of source code must retain the above copyright notice,
- * this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * * Neither the name of Redis nor the names of its contributors may be used
- * to endorse or promote products derived from this software without
- * specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef __DICT_H
-#define __DICT_H
-
-#define DICT_OK 0
-#define DICT_ERR 1
-
-/* Unused arguments generate annoying warnings... */
-#define DICT_NOTUSED(V) ((void) V)
-
-typedef struct dictEntry {
- void *key;
- void *val;
- struct dictEntry *next;
-} dictEntry;
-
-typedef struct dictType {
- unsigned int (*hashFunction)(const void *key);
- void *(*keyDup)(void *privdata, const void *key);
- void *(*valDup)(void *privdata, const void *obj);
- int (*keyCompare)(void *privdata, const void *key1, const void *key2);
- void (*keyDestructor)(void *privdata, void *key);
- void (*valDestructor)(void *privdata, void *obj);
-} dictType;
-
-typedef struct dict {
- dictEntry **table;
- dictType *type;
- unsigned long size;
- unsigned long sizemask;
- unsigned long used;
- void *privdata;
-} dict;
-
-typedef struct dictIterator {
- dict *ht;
- int index;
- dictEntry *entry, *nextEntry;
-} dictIterator;
-
-/* This is the initial size of every hash table */
-#define DICT_HT_INITIAL_SIZE 4
-
-/* ------------------------------- Macros ------------------------------------*/
-#define dictFreeEntryVal(ht, entry) \
- if ((ht)->type->valDestructor) \
- (ht)->type->valDestructor((ht)->privdata, (entry)->val)
-
-#define dictSetHashVal(ht, entry, _val_) do { \
- if ((ht)->type->valDup) \
- entry->val = (ht)->type->valDup((ht)->privdata, _val_); \
- else \
- entry->val = (_val_); \
-} while(0)
-
-#define dictFreeEntryKey(ht, entry) \
- if ((ht)->type->keyDestructor) \
- (ht)->type->keyDestructor((ht)->privdata, (entry)->key)
-
-#define dictSetHashKey(ht, entry, _key_) do { \
- if ((ht)->type->keyDup) \
- entry->key = (ht)->type->keyDup((ht)->privdata, _key_); \
- else \
- entry->key = (_key_); \
-} while(0)
-
-#define dictCompareHashKeys(ht, key1, key2) \
- (((ht)->type->keyCompare) ? \
- (ht)->type->keyCompare((ht)->privdata, key1, key2) : \
- (key1) == (key2))
-
-#define dictHashKey(ht, key) (ht)->type->hashFunction(key)
-
-#define dictGetEntryKey(he) ((he)->key)
-#define dictGetEntryVal(he) ((he)->val)
-#define dictSlots(ht) ((ht)->size)
-#define dictSize(ht) ((ht)->used)
-
-/* API */
-static unsigned int dictGenHashFunction(const unsigned char *buf, int len);
-static dict *dictCreate(dictType *type, void *privDataPtr);
-static int dictExpand(dict *ht, unsigned long size);
-static int dictAdd(dict *ht, void *key, void *val);
-static int dictReplace(dict *ht, void *key, void *val);
-static int dictDelete(dict *ht, const void *key);
-static void dictRelease(dict *ht);
-static dictEntry * dictFind(dict *ht, const void *key);
-static dictIterator *dictGetIterator(dict *ht);
-static dictEntry *dictNext(dictIterator *iter);
-static void dictReleaseIterator(dictIterator *iter);
-
-#endif /* __DICT_H */
diff --git a/node_modules/hiredis/deps/hiredis/example-ae.c b/node_modules/hiredis/deps/hiredis/example-ae.c
deleted file mode 100644
index 5ed34a3a..00000000
--- a/node_modules/hiredis/deps/hiredis/example-ae.c
+++ /dev/null
@@ -1,56 +0,0 @@
-#include
-#include
-#include
-#include
-#include "hiredis.h"
-#include "async.h"
-#include "adapters/ae.h"
-
-/* Put event loop in the global scope, so it can be explicitly stopped */
-static aeEventLoop *loop;
-
-void getCallback(redisAsyncContext *c, void *r, void *privdata) {
- redisReply *reply = r;
- if (reply == NULL) return;
- printf("argv[%s]: %s\n", (char*)privdata, reply->str);
-
- /* Disconnect after receiving the reply to GET */
- redisAsyncDisconnect(c);
-}
-
-void connectCallback(const redisAsyncContext *c, int status) {
- if (status != REDIS_OK) {
- printf("Error: %s\n", c->errstr);
- return;
- }
- printf("Connected...\n");
-}
-
-void disconnectCallback(const redisAsyncContext *c, int status) {
- if (status != REDIS_OK) {
- printf("Error: %s\n", c->errstr);
- return;
- }
- printf("Disconnected...\n");
-}
-
-int main (int argc, char **argv) {
- signal(SIGPIPE, SIG_IGN);
-
- redisAsyncContext *c = redisAsyncConnect("127.0.0.1", 6379);
- if (c->err) {
- /* Let *c leak for now... */
- printf("Error: %s\n", c->errstr);
- return 1;
- }
-
- loop = aeCreateEventLoop();
- redisAeAttach(loop, c);
- redisAsyncSetConnectCallback(c,connectCallback);
- redisAsyncSetDisconnectCallback(c,disconnectCallback);
- redisAsyncCommand(c, NULL, NULL, "SET key %b", argv[argc-1], strlen(argv[argc-1]));
- redisAsyncCommand(c, getCallback, (char*)"end-1", "GET key");
- aeMain(loop);
- return 0;
-}
-
diff --git a/node_modules/hiredis/deps/hiredis/example-libev.c b/node_modules/hiredis/deps/hiredis/example-libev.c
deleted file mode 100644
index 7894f1f4..00000000
--- a/node_modules/hiredis/deps/hiredis/example-libev.c
+++ /dev/null
@@ -1,51 +0,0 @@
-#include
-#include
-#include
-#include
-#include "hiredis.h"
-#include "async.h"
-#include "adapters/libev.h"
-
-void getCallback(redisAsyncContext *c, void *r, void *privdata) {
- redisReply *reply = r;
- if (reply == NULL) return;
- printf("argv[%s]: %s\n", (char*)privdata, reply->str);
-
- /* Disconnect after receiving the reply to GET */
- redisAsyncDisconnect(c);
-}
-
-void connectCallback(const redisAsyncContext *c, int status) {
- if (status != REDIS_OK) {
- printf("Error: %s\n", c->errstr);
- return;
- }
- printf("Connected...\n");
-}
-
-void disconnectCallback(const redisAsyncContext *c, int status) {
- if (status != REDIS_OK) {
- printf("Error: %s\n", c->errstr);
- return;
- }
- printf("Disconnected...\n");
-}
-
-int main (int argc, char **argv) {
- signal(SIGPIPE, SIG_IGN);
-
- redisAsyncContext *c = redisAsyncConnect("127.0.0.1", 6379);
- if (c->err) {
- /* Let *c leak for now... */
- printf("Error: %s\n", c->errstr);
- return 1;
- }
-
- redisLibevAttach(EV_DEFAULT_ c);
- redisAsyncSetConnectCallback(c,connectCallback);
- redisAsyncSetDisconnectCallback(c,disconnectCallback);
- redisAsyncCommand(c, NULL, NULL, "SET key %b", argv[argc-1], strlen(argv[argc-1]));
- redisAsyncCommand(c, getCallback, (char*)"end-1", "GET key");
- ev_loop(EV_DEFAULT_ 0);
- return 0;
-}
diff --git a/node_modules/hiredis/deps/hiredis/example-libevent.c b/node_modules/hiredis/deps/hiredis/example-libevent.c
deleted file mode 100644
index 9da8e02b..00000000
--- a/node_modules/hiredis/deps/hiredis/example-libevent.c
+++ /dev/null
@@ -1,52 +0,0 @@
-#include
-#include
-#include
-#include
-#include "hiredis.h"
-#include "async.h"
-#include "adapters/libevent.h"
-
-void getCallback(redisAsyncContext *c, void *r, void *privdata) {
- redisReply *reply = r;
- if (reply == NULL) return;
- printf("argv[%s]: %s\n", (char*)privdata, reply->str);
-
- /* Disconnect after receiving the reply to GET */
- redisAsyncDisconnect(c);
-}
-
-void connectCallback(const redisAsyncContext *c, int status) {
- if (status != REDIS_OK) {
- printf("Error: %s\n", c->errstr);
- return;
- }
- printf("Connected...\n");
-}
-
-void disconnectCallback(const redisAsyncContext *c, int status) {
- if (status != REDIS_OK) {
- printf("Error: %s\n", c->errstr);
- return;
- }
- printf("Disconnected...\n");
-}
-
-int main (int argc, char **argv) {
- signal(SIGPIPE, SIG_IGN);
- struct event_base *base = event_base_new();
-
- redisAsyncContext *c = redisAsyncConnect("127.0.0.1", 6379);
- if (c->err) {
- /* Let *c leak for now... */
- printf("Error: %s\n", c->errstr);
- return 1;
- }
-
- redisLibeventAttach(c,base);
- redisAsyncSetConnectCallback(c,connectCallback);
- redisAsyncSetDisconnectCallback(c,disconnectCallback);
- redisAsyncCommand(c, NULL, NULL, "SET key %b", argv[argc-1], strlen(argv[argc-1]));
- redisAsyncCommand(c, getCallback, (char*)"end-1", "GET key");
- event_base_dispatch(base);
- return 0;
-}
diff --git a/node_modules/hiredis/deps/hiredis/example.c b/node_modules/hiredis/deps/hiredis/example.c
deleted file mode 100644
index 90ff9ed5..00000000
--- a/node_modules/hiredis/deps/hiredis/example.c
+++ /dev/null
@@ -1,68 +0,0 @@
-#include
-#include
-#include
-
-#include "hiredis.h"
-
-int main(void) {
- unsigned int j;
- redisContext *c;
- redisReply *reply;
-
- struct timeval timeout = { 1, 500000 }; // 1.5 seconds
- c = redisConnectWithTimeout((char*)"127.0.0.2", 6379, timeout);
- if (c->err) {
- printf("Connection error: %s\n", c->errstr);
- exit(1);
- }
-
- /* PING server */
- reply = redisCommand(c,"PING");
- printf("PING: %s\n", reply->str);
- freeReplyObject(reply);
-
- /* Set a key */
- reply = redisCommand(c,"SET %s %s", "foo", "hello world");
- printf("SET: %s\n", reply->str);
- freeReplyObject(reply);
-
- /* Set a key using binary safe API */
- reply = redisCommand(c,"SET %b %b", "bar", 3, "hello", 5);
- printf("SET (binary API): %s\n", reply->str);
- freeReplyObject(reply);
-
- /* Try a GET and two INCR */
- reply = redisCommand(c,"GET foo");
- printf("GET foo: %s\n", reply->str);
- freeReplyObject(reply);
-
- reply = redisCommand(c,"INCR counter");
- printf("INCR counter: %lld\n", reply->integer);
- freeReplyObject(reply);
- /* again ... */
- reply = redisCommand(c,"INCR counter");
- printf("INCR counter: %lld\n", reply->integer);
- freeReplyObject(reply);
-
- /* Create a list of numbers, from 0 to 9 */
- reply = redisCommand(c,"DEL mylist");
- freeReplyObject(reply);
- for (j = 0; j < 10; j++) {
- char buf[64];
-
- snprintf(buf,64,"%d",j);
- reply = redisCommand(c,"LPUSH mylist element-%s", buf);
- freeReplyObject(reply);
- }
-
- /* Let's check what we have inside the list */
- reply = redisCommand(c,"LRANGE mylist 0 -1");
- if (reply->type == REDIS_REPLY_ARRAY) {
- for (j = 0; j < reply->elements; j++) {
- printf("%u) %s\n", j, reply->element[j]->str);
- }
- }
- freeReplyObject(reply);
-
- return 0;
-}
diff --git a/node_modules/hiredis/deps/hiredis/fmacros.h b/node_modules/hiredis/deps/hiredis/fmacros.h
deleted file mode 100644
index 21cd9cfe..00000000
--- a/node_modules/hiredis/deps/hiredis/fmacros.h
+++ /dev/null
@@ -1,16 +0,0 @@
-#ifndef __HIREDIS_FMACRO_H
-#define __HIREDIS_FMACRO_H
-
-#if !defined(_BSD_SOURCE)
-#define _BSD_SOURCE
-#endif
-
-#if defined(__sun__)
-#define _POSIX_C_SOURCE 200112L
-#elif defined(__linux__)
-#define _XOPEN_SOURCE 600
-#else
-#define _XOPEN_SOURCE
-#endif
-
-#endif
diff --git a/node_modules/hiredis/deps/hiredis/hiredis.c b/node_modules/hiredis/deps/hiredis/hiredis.c
deleted file mode 100644
index 4709ee32..00000000
--- a/node_modules/hiredis/deps/hiredis/hiredis.c
+++ /dev/null
@@ -1,1285 +0,0 @@
-/*
- * Copyright (c) 2009-2011, Salvatore Sanfilippo
- * Copyright (c) 2010-2011, Pieter Noordhuis
- *
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * * Redistributions of source code must retain the above copyright notice,
- * this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * * Neither the name of Redis nor the names of its contributors may be used
- * to endorse or promote products derived from this software without
- * specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "fmacros.h"
-#include
-#include
-#include
-#include
-#include
-#include
-
-#include "hiredis.h"
-#include "net.h"
-#include "sds.h"
-
-static redisReply *createReplyObject(int type);
-static void *createStringObject(const redisReadTask *task, char *str, size_t len);
-static void *createArrayObject(const redisReadTask *task, int elements);
-static void *createIntegerObject(const redisReadTask *task, long long value);
-static void *createNilObject(const redisReadTask *task);
-
-/* Default set of functions to build the reply. Keep in mind that such a
- * function returning NULL is interpreted as OOM. */
-static redisReplyObjectFunctions defaultFunctions = {
- createStringObject,
- createArrayObject,
- createIntegerObject,
- createNilObject,
- freeReplyObject
-};
-
-/* Create a reply object */
-static redisReply *createReplyObject(int type) {
- redisReply *r = calloc(1,sizeof(*r));
-
- if (r == NULL)
- return NULL;
-
- r->type = type;
- return r;
-}
-
-/* Free a reply object */
-void freeReplyObject(void *reply) {
- redisReply *r = reply;
- size_t j;
-
- switch(r->type) {
- case REDIS_REPLY_INTEGER:
- break; /* Nothing to free */
- case REDIS_REPLY_ARRAY:
- if (r->element != NULL) {
- for (j = 0; j < r->elements; j++)
- if (r->element[j] != NULL)
- freeReplyObject(r->element[j]);
- free(r->element);
- }
- break;
- case REDIS_REPLY_ERROR:
- case REDIS_REPLY_STATUS:
- case REDIS_REPLY_STRING:
- if (r->str != NULL)
- free(r->str);
- break;
- }
- free(r);
-}
-
-static void *createStringObject(const redisReadTask *task, char *str, size_t len) {
- redisReply *r, *parent;
- char *buf;
-
- r = createReplyObject(task->type);
- if (r == NULL)
- return NULL;
-
- buf = malloc(len+1);
- if (buf == NULL) {
- freeReplyObject(r);
- return NULL;
- }
-
- assert(task->type == REDIS_REPLY_ERROR ||
- task->type == REDIS_REPLY_STATUS ||
- task->type == REDIS_REPLY_STRING);
-
- /* Copy string value */
- memcpy(buf,str,len);
- buf[len] = '\0';
- r->str = buf;
- r->len = len;
-
- if (task->parent) {
- parent = task->parent->obj;
- assert(parent->type == REDIS_REPLY_ARRAY);
- parent->element[task->idx] = r;
- }
- return r;
-}
-
-static void *createArrayObject(const redisReadTask *task, int elements) {
- redisReply *r, *parent;
-
- r = createReplyObject(REDIS_REPLY_ARRAY);
- if (r == NULL)
- return NULL;
-
- if (elements > 0) {
- r->element = calloc(elements,sizeof(redisReply*));
- if (r->element == NULL) {
- freeReplyObject(r);
- return NULL;
- }
- }
-
- r->elements = elements;
-
- if (task->parent) {
- parent = task->parent->obj;
- assert(parent->type == REDIS_REPLY_ARRAY);
- parent->element[task->idx] = r;
- }
- return r;
-}
-
-static void *createIntegerObject(const redisReadTask *task, long long value) {
- redisReply *r, *parent;
-
- r = createReplyObject(REDIS_REPLY_INTEGER);
- if (r == NULL)
- return NULL;
-
- r->integer = value;
-
- if (task->parent) {
- parent = task->parent->obj;
- assert(parent->type == REDIS_REPLY_ARRAY);
- parent->element[task->idx] = r;
- }
- return r;
-}
-
-static void *createNilObject(const redisReadTask *task) {
- redisReply *r, *parent;
-
- r = createReplyObject(REDIS_REPLY_NIL);
- if (r == NULL)
- return NULL;
-
- if (task->parent) {
- parent = task->parent->obj;
- assert(parent->type == REDIS_REPLY_ARRAY);
- parent->element[task->idx] = r;
- }
- return r;
-}
-
-static void __redisReaderSetError(redisReader *r, int type, const char *str) {
- size_t len;
-
- if (r->reply != NULL && r->fn && r->fn->freeObject) {
- r->fn->freeObject(r->reply);
- r->reply = NULL;
- }
-
- /* Clear input buffer on errors. */
- if (r->buf != NULL) {
- sdsfree(r->buf);
- r->buf = NULL;
- r->pos = r->len = 0;
- }
-
- /* Reset task stack. */
- r->ridx = -1;
-
- /* Set error. */
- r->err = type;
- len = strlen(str);
- len = len < (sizeof(r->errstr)-1) ? len : (sizeof(r->errstr)-1);
- memcpy(r->errstr,str,len);
- r->errstr[len] = '\0';
-}
-
-static size_t chrtos(char *buf, size_t size, char byte) {
- size_t len = 0;
-
- switch(byte) {
- case '\\':
- case '"':
- len = snprintf(buf,size,"\"\\%c\"",byte);
- break;
- case '\n': len = snprintf(buf,size,"\"\\n\""); break;
- case '\r': len = snprintf(buf,size,"\"\\r\""); break;
- case '\t': len = snprintf(buf,size,"\"\\t\""); break;
- case '\a': len = snprintf(buf,size,"\"\\a\""); break;
- case '\b': len = snprintf(buf,size,"\"\\b\""); break;
- default:
- if (isprint(byte))
- len = snprintf(buf,size,"\"%c\"",byte);
- else
- len = snprintf(buf,size,"\"\\x%02x\"",(unsigned char)byte);
- break;
- }
-
- return len;
-}
-
-static void __redisReaderSetErrorProtocolByte(redisReader *r, char byte) {
- char cbuf[8], sbuf[128];
-
- chrtos(cbuf,sizeof(cbuf),byte);
- snprintf(sbuf,sizeof(sbuf),
- "Protocol error, got %s as reply type byte", cbuf);
- __redisReaderSetError(r,REDIS_ERR_PROTOCOL,sbuf);
-}
-
-static void __redisReaderSetErrorOOM(redisReader *r) {
- __redisReaderSetError(r,REDIS_ERR_OOM,"Out of memory");
-}
-
-static char *readBytes(redisReader *r, unsigned int bytes) {
- char *p;
- if (r->len-r->pos >= bytes) {
- p = r->buf+r->pos;
- r->pos += bytes;
- return p;
- }
- return NULL;
-}
-
-/* Find pointer to \r\n. */
-static char *seekNewline(char *s, size_t len) {
- int pos = 0;
- int _len = len-1;
-
- /* Position should be < len-1 because the character at "pos" should be
- * followed by a \n. Note that strchr cannot be used because it doesn't
- * allow to search a limited length and the buffer that is being searched
- * might not have a trailing NULL character. */
- while (pos < _len) {
- while(pos < _len && s[pos] != '\r') pos++;
- if (s[pos] != '\r') {
- /* Not found. */
- return NULL;
- } else {
- if (s[pos+1] == '\n') {
- /* Found. */
- return s+pos;
- } else {
- /* Continue searching. */
- pos++;
- }
- }
- }
- return NULL;
-}
-
-/* Read a long long value starting at *s, under the assumption that it will be
- * terminated by \r\n. Ambiguously returns -1 for unexpected input. */
-static long long readLongLong(char *s) {
- long long v = 0;
- int dec, mult = 1;
- char c;
-
- if (*s == '-') {
- mult = -1;
- s++;
- } else if (*s == '+') {
- mult = 1;
- s++;
- }
-
- while ((c = *(s++)) != '\r') {
- dec = c - '0';
- if (dec >= 0 && dec < 10) {
- v *= 10;
- v += dec;
- } else {
- /* Should not happen... */
- return -1;
- }
- }
-
- return mult*v;
-}
-
-static char *readLine(redisReader *r, int *_len) {
- char *p, *s;
- int len;
-
- p = r->buf+r->pos;
- s = seekNewline(p,(r->len-r->pos));
- if (s != NULL) {
- len = s-(r->buf+r->pos);
- r->pos += len+2; /* skip \r\n */
- if (_len) *_len = len;
- return p;
- }
- return NULL;
-}
-
-static void moveToNextTask(redisReader *r) {
- redisReadTask *cur, *prv;
- while (r->ridx >= 0) {
- /* Return a.s.a.p. when the stack is now empty. */
- if (r->ridx == 0) {
- r->ridx--;
- return;
- }
-
- cur = &(r->rstack[r->ridx]);
- prv = &(r->rstack[r->ridx-1]);
- assert(prv->type == REDIS_REPLY_ARRAY);
- if (cur->idx == prv->elements-1) {
- r->ridx--;
- } else {
- /* Reset the type because the next item can be anything */
- assert(cur->idx < prv->elements);
- cur->type = -1;
- cur->elements = -1;
- cur->idx++;
- return;
- }
- }
-}
-
-static int processLineItem(redisReader *r) {
- redisReadTask *cur = &(r->rstack[r->ridx]);
- void *obj;
- char *p;
- int len;
-
- if ((p = readLine(r,&len)) != NULL) {
- if (cur->type == REDIS_REPLY_INTEGER) {
- if (r->fn && r->fn->createInteger)
- obj = r->fn->createInteger(cur,readLongLong(p));
- else
- obj = (void*)REDIS_REPLY_INTEGER;
- } else {
- /* Type will be error or status. */
- if (r->fn && r->fn->createString)
- obj = r->fn->createString(cur,p,len);
- else
- obj = (void*)(size_t)(cur->type);
- }
-
- if (obj == NULL) {
- __redisReaderSetErrorOOM(r);
- return REDIS_ERR;
- }
-
- /* Set reply if this is the root object. */
- if (r->ridx == 0) r->reply = obj;
- moveToNextTask(r);
- return REDIS_OK;
- }
-
- return REDIS_ERR;
-}
-
-static int processBulkItem(redisReader *r) {
- redisReadTask *cur = &(r->rstack[r->ridx]);
- void *obj = NULL;
- char *p, *s;
- long len;
- unsigned long bytelen;
- int success = 0;
-
- p = r->buf+r->pos;
- s = seekNewline(p,r->len-r->pos);
- if (s != NULL) {
- p = r->buf+r->pos;
- bytelen = s-(r->buf+r->pos)+2; /* include \r\n */
- len = readLongLong(p);
-
- if (len < 0) {
- /* The nil object can always be created. */
- if (r->fn && r->fn->createNil)
- obj = r->fn->createNil(cur);
- else
- obj = (void*)REDIS_REPLY_NIL;
- success = 1;
- } else {
- /* Only continue when the buffer contains the entire bulk item. */
- bytelen += len+2; /* include \r\n */
- if (r->pos+bytelen <= r->len) {
- if (r->fn && r->fn->createString)
- obj = r->fn->createString(cur,s+2,len);
- else
- obj = (void*)REDIS_REPLY_STRING;
- success = 1;
- }
- }
-
- /* Proceed when obj was created. */
- if (success) {
- if (obj == NULL) {
- __redisReaderSetErrorOOM(r);
- return REDIS_ERR;
- }
-
- r->pos += bytelen;
-
- /* Set reply if this is the root object. */
- if (r->ridx == 0) r->reply = obj;
- moveToNextTask(r);
- return REDIS_OK;
- }
- }
-
- return REDIS_ERR;
-}
-
-static int processMultiBulkItem(redisReader *r) {
- redisReadTask *cur = &(r->rstack[r->ridx]);
- void *obj;
- char *p;
- long elements;
- int root = 0;
-
- /* Set error for nested multi bulks with depth > 7 */
- if (r->ridx == 8) {
- __redisReaderSetError(r,REDIS_ERR_PROTOCOL,
- "No support for nested multi bulk replies with depth > 7");
- return REDIS_ERR;
- }
-
- if ((p = readLine(r,NULL)) != NULL) {
- elements = readLongLong(p);
- root = (r->ridx == 0);
-
- if (elements == -1) {
- if (r->fn && r->fn->createNil)
- obj = r->fn->createNil(cur);
- else
- obj = (void*)REDIS_REPLY_NIL;
-
- if (obj == NULL) {
- __redisReaderSetErrorOOM(r);
- return REDIS_ERR;
- }
-
- moveToNextTask(r);
- } else {
- if (r->fn && r->fn->createArray)
- obj = r->fn->createArray(cur,elements);
- else
- obj = (void*)REDIS_REPLY_ARRAY;
-
- if (obj == NULL) {
- __redisReaderSetErrorOOM(r);
- return REDIS_ERR;
- }
-
- /* Modify task stack when there are more than 0 elements. */
- if (elements > 0) {
- cur->elements = elements;
- cur->obj = obj;
- r->ridx++;
- r->rstack[r->ridx].type = -1;
- r->rstack[r->ridx].elements = -1;
- r->rstack[r->ridx].idx = 0;
- r->rstack[r->ridx].obj = NULL;
- r->rstack[r->ridx].parent = cur;
- r->rstack[r->ridx].privdata = r->privdata;
- } else {
- moveToNextTask(r);
- }
- }
-
- /* Set reply if this is the root object. */
- if (root) r->reply = obj;
- return REDIS_OK;
- }
-
- return REDIS_ERR;
-}
-
-static int processItem(redisReader *r) {
- redisReadTask *cur = &(r->rstack[r->ridx]);
- char *p;
-
- /* check if we need to read type */
- if (cur->type < 0) {
- if ((p = readBytes(r,1)) != NULL) {
- switch (p[0]) {
- case '-':
- cur->type = REDIS_REPLY_ERROR;
- break;
- case '+':
- cur->type = REDIS_REPLY_STATUS;
- break;
- case ':':
- cur->type = REDIS_REPLY_INTEGER;
- break;
- case '$':
- cur->type = REDIS_REPLY_STRING;
- break;
- case '*':
- cur->type = REDIS_REPLY_ARRAY;
- break;
- default:
- __redisReaderSetErrorProtocolByte(r,*p);
- return REDIS_ERR;
- }
- } else {
- /* could not consume 1 byte */
- return REDIS_ERR;
- }
- }
-
- /* process typed item */
- switch(cur->type) {
- case REDIS_REPLY_ERROR:
- case REDIS_REPLY_STATUS:
- case REDIS_REPLY_INTEGER:
- return processLineItem(r);
- case REDIS_REPLY_STRING:
- return processBulkItem(r);
- case REDIS_REPLY_ARRAY:
- return processMultiBulkItem(r);
- default:
- assert(NULL);
- return REDIS_ERR; /* Avoid warning. */
- }
-}
-
-redisReader *redisReaderCreate(void) {
- redisReader *r;
-
- r = calloc(sizeof(redisReader),1);
- if (r == NULL)
- return NULL;
-
- r->err = 0;
- r->errstr[0] = '\0';
- r->fn = &defaultFunctions;
- r->buf = sdsempty();
- r->maxbuf = REDIS_READER_MAX_BUF;
- if (r->buf == NULL) {
- free(r);
- return NULL;
- }
-
- r->ridx = -1;
- return r;
-}
-
-void redisReaderFree(redisReader *r) {
- if (r->reply != NULL && r->fn && r->fn->freeObject)
- r->fn->freeObject(r->reply);
- if (r->buf != NULL)
- sdsfree(r->buf);
- free(r);
-}
-
-int redisReaderFeed(redisReader *r, const char *buf, size_t len) {
- sds newbuf;
-
- /* Return early when this reader is in an erroneous state. */
- if (r->err)
- return REDIS_ERR;
-
- /* Copy the provided buffer. */
- if (buf != NULL && len >= 1) {
- /* Destroy internal buffer when it is empty and is quite large. */
- if (r->len == 0 && r->maxbuf != 0 && sdsavail(r->buf) > r->maxbuf) {
- sdsfree(r->buf);
- r->buf = sdsempty();
- r->pos = 0;
-
- /* r->buf should not be NULL since we just free'd a larger one. */
- assert(r->buf != NULL);
- }
-
- newbuf = sdscatlen(r->buf,buf,len);
- if (newbuf == NULL) {
- __redisReaderSetErrorOOM(r);
- return REDIS_ERR;
- }
-
- r->buf = newbuf;
- r->len = sdslen(r->buf);
- }
-
- return REDIS_OK;
-}
-
-int redisReaderGetReply(redisReader *r, void **reply) {
- /* Default target pointer to NULL. */
- if (reply != NULL)
- *reply = NULL;
-
- /* Return early when this reader is in an erroneous state. */
- if (r->err)
- return REDIS_ERR;
-
- /* When the buffer is empty, there will never be a reply. */
- if (r->len == 0)
- return REDIS_OK;
-
- /* Set first item to process when the stack is empty. */
- if (r->ridx == -1) {
- r->rstack[0].type = -1;
- r->rstack[0].elements = -1;
- r->rstack[0].idx = -1;
- r->rstack[0].obj = NULL;
- r->rstack[0].parent = NULL;
- r->rstack[0].privdata = r->privdata;
- r->ridx = 0;
- }
-
- /* Process items in reply. */
- while (r->ridx >= 0)
- if (processItem(r) != REDIS_OK)
- break;
-
- /* Return ASAP when an error occurred. */
- if (r->err)
- return REDIS_ERR;
-
- /* Discard part of the buffer when we've consumed at least 1k, to avoid
- * doing unnecessary calls to memmove() in sds.c. */
- if (r->pos >= 1024) {
- r->buf = sdsrange(r->buf,r->pos,-1);
- r->pos = 0;
- r->len = sdslen(r->buf);
- }
-
- /* Emit a reply when there is one. */
- if (r->ridx == -1) {
- if (reply != NULL)
- *reply = r->reply;
- r->reply = NULL;
- }
- return REDIS_OK;
-}
-
-/* Calculate the number of bytes needed to represent an integer as string. */
-static int intlen(int i) {
- int len = 0;
- if (i < 0) {
- len++;
- i = -i;
- }
- do {
- len++;
- i /= 10;
- } while(i);
- return len;
-}
-
-/* Helper that calculates the bulk length given a certain string length. */
-static size_t bulklen(size_t len) {
- return 1+intlen(len)+2+len+2;
-}
-
-int redisvFormatCommand(char **target, const char *format, va_list ap) {
- const char *c = format;
- char *cmd = NULL; /* final command */
- int pos; /* position in final command */
- sds curarg, newarg; /* current argument */
- int touched = 0; /* was the current argument touched? */
- char **curargv = NULL, **newargv = NULL;
- int argc = 0;
- int totlen = 0;
- int j;
-
- /* Abort if there is not target to set */
- if (target == NULL)
- return -1;
-
- /* Build the command string accordingly to protocol */
- curarg = sdsempty();
- if (curarg == NULL)
- return -1;
-
- while(*c != '\0') {
- if (*c != '%' || c[1] == '\0') {
- if (*c == ' ') {
- if (touched) {
- newargv = realloc(curargv,sizeof(char*)*(argc+1));
- if (newargv == NULL) goto err;
- curargv = newargv;
- curargv[argc++] = curarg;
- totlen += bulklen(sdslen(curarg));
-
- /* curarg is put in argv so it can be overwritten. */
- curarg = sdsempty();
- if (curarg == NULL) goto err;
- touched = 0;
- }
- } else {
- newarg = sdscatlen(curarg,c,1);
- if (newarg == NULL) goto err;
- curarg = newarg;
- touched = 1;
- }
- } else {
- char *arg;
- size_t size;
-
- /* Set newarg so it can be checked even if it is not touched. */
- newarg = curarg;
-
- switch(c[1]) {
- case 's':
- arg = va_arg(ap,char*);
- size = strlen(arg);
- if (size > 0)
- newarg = sdscatlen(curarg,arg,size);
- break;
- case 'b':
- arg = va_arg(ap,char*);
- size = va_arg(ap,size_t);
- if (size > 0)
- newarg = sdscatlen(curarg,arg,size);
- break;
- case '%':
- newarg = sdscat(curarg,"%");
- break;
- default:
- /* Try to detect printf format */
- {
- static const char intfmts[] = "diouxX";
- char _format[16];
- const char *_p = c+1;
- size_t _l = 0;
- va_list _cpy;
-
- /* Flags */
- if (*_p != '\0' && *_p == '#') _p++;
- if (*_p != '\0' && *_p == '0') _p++;
- if (*_p != '\0' && *_p == '-') _p++;
- if (*_p != '\0' && *_p == ' ') _p++;
- if (*_p != '\0' && *_p == '+') _p++;
-
- /* Field width */
- while (*_p != '\0' && isdigit(*_p)) _p++;
-
- /* Precision */
- if (*_p == '.') {
- _p++;
- while (*_p != '\0' && isdigit(*_p)) _p++;
- }
-
- /* Copy va_list before consuming with va_arg */
- va_copy(_cpy,ap);
-
- /* Integer conversion (without modifiers) */
- if (strchr(intfmts,*_p) != NULL) {
- va_arg(ap,int);
- goto fmt_valid;
- }
-
- /* Double conversion (without modifiers) */
- if (strchr("eEfFgGaA",*_p) != NULL) {
- va_arg(ap,double);
- goto fmt_valid;
- }
-
- /* Size: char */
- if (_p[0] == 'h' && _p[1] == 'h') {
- _p += 2;
- if (*_p != '\0' && strchr(intfmts,*_p) != NULL) {
- va_arg(ap,int); /* char gets promoted to int */
- goto fmt_valid;
- }
- goto fmt_invalid;
- }
-
- /* Size: short */
- if (_p[0] == 'h') {
- _p += 1;
- if (*_p != '\0' && strchr(intfmts,*_p) != NULL) {
- va_arg(ap,int); /* short gets promoted to int */
- goto fmt_valid;
- }
- goto fmt_invalid;
- }
-
- /* Size: long long */
- if (_p[0] == 'l' && _p[1] == 'l') {
- _p += 2;
- if (*_p != '\0' && strchr(intfmts,*_p) != NULL) {
- va_arg(ap,long long);
- goto fmt_valid;
- }
- goto fmt_invalid;
- }
-
- /* Size: long */
- if (_p[0] == 'l') {
- _p += 1;
- if (*_p != '\0' && strchr(intfmts,*_p) != NULL) {
- va_arg(ap,long);
- goto fmt_valid;
- }
- goto fmt_invalid;
- }
-
- fmt_invalid:
- va_end(_cpy);
- goto err;
-
- fmt_valid:
- _l = (_p+1)-c;
- if (_l < sizeof(_format)-2) {
- memcpy(_format,c,_l);
- _format[_l] = '\0';
- newarg = sdscatvprintf(curarg,_format,_cpy);
-
- /* Update current position (note: outer blocks
- * increment c twice so compensate here) */
- c = _p-1;
- }
-
- va_end(_cpy);
- break;
- }
- }
-
- if (newarg == NULL) goto err;
- curarg = newarg;
-
- touched = 1;
- c++;
- }
- c++;
- }
-
- /* Add the last argument if needed */
- if (touched) {
- newargv = realloc(curargv,sizeof(char*)*(argc+1));
- if (newargv == NULL) goto err;
- curargv = newargv;
- curargv[argc++] = curarg;
- totlen += bulklen(sdslen(curarg));
- } else {
- sdsfree(curarg);
- }
-
- /* Clear curarg because it was put in curargv or was free'd. */
- curarg = NULL;
-
- /* Add bytes needed to hold multi bulk count */
- totlen += 1+intlen(argc)+2;
-
- /* Build the command at protocol level */
- cmd = malloc(totlen+1);
- if (cmd == NULL) goto err;
-
- pos = sprintf(cmd,"*%d\r\n",argc);
- for (j = 0; j < argc; j++) {
- pos += sprintf(cmd+pos,"$%zu\r\n",sdslen(curargv[j]));
- memcpy(cmd+pos,curargv[j],sdslen(curargv[j]));
- pos += sdslen(curargv[j]);
- sdsfree(curargv[j]);
- cmd[pos++] = '\r';
- cmd[pos++] = '\n';
- }
- assert(pos == totlen);
- cmd[pos] = '\0';
-
- free(curargv);
- *target = cmd;
- return totlen;
-
-err:
- while(argc--)
- sdsfree(curargv[argc]);
- free(curargv);
-
- if (curarg != NULL)
- sdsfree(curarg);
-
- /* No need to check cmd since it is the last statement that can fail,
- * but do it anyway to be as defensive as possible. */
- if (cmd != NULL)
- free(cmd);
-
- return -1;
-}
-
-/* Format a command according to the Redis protocol. This function
- * takes a format similar to printf:
- *
- * %s represents a C null terminated string you want to interpolate
- * %b represents a binary safe string
- *
- * When using %b you need to provide both the pointer to the string
- * and the length in bytes. Examples:
- *
- * len = redisFormatCommand(target, "GET %s", mykey);
- * len = redisFormatCommand(target, "SET %s %b", mykey, myval, myvallen);
- */
-int redisFormatCommand(char **target, const char *format, ...) {
- va_list ap;
- int len;
- va_start(ap,format);
- len = redisvFormatCommand(target,format,ap);
- va_end(ap);
- return len;
-}
-
-/* Format a command according to the Redis protocol. This function takes the
- * number of arguments, an array with arguments and an array with their
- * lengths. If the latter is set to NULL, strlen will be used to compute the
- * argument lengths.
- */
-int redisFormatCommandArgv(char **target, int argc, const char **argv, const size_t *argvlen) {
- char *cmd = NULL; /* final command */
- int pos; /* position in final command */
- size_t len;
- int totlen, j;
-
- /* Calculate number of bytes needed for the command */
- totlen = 1+intlen(argc)+2;
- for (j = 0; j < argc; j++) {
- len = argvlen ? argvlen[j] : strlen(argv[j]);
- totlen += bulklen(len);
- }
-
- /* Build the command at protocol level */
- cmd = malloc(totlen+1);
- if (cmd == NULL)
- return -1;
-
- pos = sprintf(cmd,"*%d\r\n",argc);
- for (j = 0; j < argc; j++) {
- len = argvlen ? argvlen[j] : strlen(argv[j]);
- pos += sprintf(cmd+pos,"$%zu\r\n",len);
- memcpy(cmd+pos,argv[j],len);
- pos += len;
- cmd[pos++] = '\r';
- cmd[pos++] = '\n';
- }
- assert(pos == totlen);
- cmd[pos] = '\0';
-
- *target = cmd;
- return totlen;
-}
-
-void __redisSetError(redisContext *c, int type, const char *str) {
- size_t len;
-
- c->err = type;
- if (str != NULL) {
- len = strlen(str);
- len = len < (sizeof(c->errstr)-1) ? len : (sizeof(c->errstr)-1);
- memcpy(c->errstr,str,len);
- c->errstr[len] = '\0';
- } else {
- /* Only REDIS_ERR_IO may lack a description! */
- assert(type == REDIS_ERR_IO);
- strerror_r(errno,c->errstr,sizeof(c->errstr));
- }
-}
-
-static redisContext *redisContextInit(void) {
- redisContext *c;
-
- c = calloc(1,sizeof(redisContext));
- if (c == NULL)
- return NULL;
-
- c->err = 0;
- c->errstr[0] = '\0';
- c->obuf = sdsempty();
- c->reader = redisReaderCreate();
- return c;
-}
-
-void redisFree(redisContext *c) {
- if (c->fd > 0)
- close(c->fd);
- if (c->obuf != NULL)
- sdsfree(c->obuf);
- if (c->reader != NULL)
- redisReaderFree(c->reader);
- free(c);
-}
-
-/* Connect to a Redis instance. On error the field error in the returned
- * context will be set to the return value of the error function.
- * When no set of reply functions is given, the default set will be used. */
-redisContext *redisConnect(const char *ip, int port) {
- redisContext *c = redisContextInit();
- c->flags |= REDIS_BLOCK;
- redisContextConnectTcp(c,ip,port,NULL);
- return c;
-}
-
-redisContext *redisConnectWithTimeout(const char *ip, int port, struct timeval tv) {
- redisContext *c = redisContextInit();
- c->flags |= REDIS_BLOCK;
- redisContextConnectTcp(c,ip,port,&tv);
- return c;
-}
-
-redisContext *redisConnectNonBlock(const char *ip, int port) {
- redisContext *c = redisContextInit();
- c->flags &= ~REDIS_BLOCK;
- redisContextConnectTcp(c,ip,port,NULL);
- return c;
-}
-
-redisContext *redisConnectUnix(const char *path) {
- redisContext *c = redisContextInit();
- c->flags |= REDIS_BLOCK;
- redisContextConnectUnix(c,path,NULL);
- return c;
-}
-
-redisContext *redisConnectUnixWithTimeout(const char *path, struct timeval tv) {
- redisContext *c = redisContextInit();
- c->flags |= REDIS_BLOCK;
- redisContextConnectUnix(c,path,&tv);
- return c;
-}
-
-redisContext *redisConnectUnixNonBlock(const char *path) {
- redisContext *c = redisContextInit();
- c->flags &= ~REDIS_BLOCK;
- redisContextConnectUnix(c,path,NULL);
- return c;
-}
-
-/* Set read/write timeout on a blocking socket. */
-int redisSetTimeout(redisContext *c, struct timeval tv) {
- if (c->flags & REDIS_BLOCK)
- return redisContextSetTimeout(c,tv);
- return REDIS_ERR;
-}
-
-/* Use this function to handle a read event on the descriptor. It will try
- * and read some bytes from the socket and feed them to the reply parser.
- *
- * After this function is called, you may use redisContextReadReply to
- * see if there is a reply available. */
-int redisBufferRead(redisContext *c) {
- char buf[1024*16];
- int nread;
-
- /* Return early when the context has seen an error. */
- if (c->err)
- return REDIS_ERR;
-
- nread = read(c->fd,buf,sizeof(buf));
- if (nread == -1) {
- if (errno == EAGAIN && !(c->flags & REDIS_BLOCK)) {
- /* Try again later */
- } else {
- __redisSetError(c,REDIS_ERR_IO,NULL);
- return REDIS_ERR;
- }
- } else if (nread == 0) {
- __redisSetError(c,REDIS_ERR_EOF,"Server closed the connection");
- return REDIS_ERR;
- } else {
- if (redisReaderFeed(c->reader,buf,nread) != REDIS_OK) {
- __redisSetError(c,c->reader->err,c->reader->errstr);
- return REDIS_ERR;
- }
- }
- return REDIS_OK;
-}
-
-/* Write the output buffer to the socket.
- *
- * Returns REDIS_OK when the buffer is empty, or (a part of) the buffer was
- * succesfully written to the socket. When the buffer is empty after the
- * write operation, "done" is set to 1 (if given).
- *
- * Returns REDIS_ERR if an error occured trying to write and sets
- * c->errstr to hold the appropriate error string.
- */
-int redisBufferWrite(redisContext *c, int *done) {
- int nwritten;
-
- /* Return early when the context has seen an error. */
- if (c->err)
- return REDIS_ERR;
-
- if (sdslen(c->obuf) > 0) {
- nwritten = write(c->fd,c->obuf,sdslen(c->obuf));
- if (nwritten == -1) {
- if (errno == EAGAIN && !(c->flags & REDIS_BLOCK)) {
- /* Try again later */
- } else {
- __redisSetError(c,REDIS_ERR_IO,NULL);
- return REDIS_ERR;
- }
- } else if (nwritten > 0) {
- if (nwritten == (signed)sdslen(c->obuf)) {
- sdsfree(c->obuf);
- c->obuf = sdsempty();
- } else {
- c->obuf = sdsrange(c->obuf,nwritten,-1);
- }
- }
- }
- if (done != NULL) *done = (sdslen(c->obuf) == 0);
- return REDIS_OK;
-}
-
-/* Internal helper function to try and get a reply from the reader,
- * or set an error in the context otherwise. */
-int redisGetReplyFromReader(redisContext *c, void **reply) {
- if (redisReaderGetReply(c->reader,reply) == REDIS_ERR) {
- __redisSetError(c,c->reader->err,c->reader->errstr);
- return REDIS_ERR;
- }
- return REDIS_OK;
-}
-
-int redisGetReply(redisContext *c, void **reply) {
- int wdone = 0;
- void *aux = NULL;
-
- /* Try to read pending replies */
- if (redisGetReplyFromReader(c,&aux) == REDIS_ERR)
- return REDIS_ERR;
-
- /* For the blocking context, flush output buffer and read reply */
- if (aux == NULL && c->flags & REDIS_BLOCK) {
- /* Write until done */
- do {
- if (redisBufferWrite(c,&wdone) == REDIS_ERR)
- return REDIS_ERR;
- } while (!wdone);
-
- /* Read until there is a reply */
- do {
- if (redisBufferRead(c) == REDIS_ERR)
- return REDIS_ERR;
- if (redisGetReplyFromReader(c,&aux) == REDIS_ERR)
- return REDIS_ERR;
- } while (aux == NULL);
- }
-
- /* Set reply object */
- if (reply != NULL) *reply = aux;
- return REDIS_OK;
-}
-
-
-/* Helper function for the redisAppendCommand* family of functions.
- *
- * Write a formatted command to the output buffer. When this family
- * is used, you need to call redisGetReply yourself to retrieve
- * the reply (or replies in pub/sub).
- */
-int __redisAppendCommand(redisContext *c, char *cmd, size_t len) {
- sds newbuf;
-
- newbuf = sdscatlen(c->obuf,cmd,len);
- if (newbuf == NULL) {
- __redisSetError(c,REDIS_ERR_OOM,"Out of memory");
- return REDIS_ERR;
- }
-
- c->obuf = newbuf;
- return REDIS_OK;
-}
-
-int redisvAppendCommand(redisContext *c, const char *format, va_list ap) {
- char *cmd;
- int len;
-
- len = redisvFormatCommand(&cmd,format,ap);
- if (len == -1) {
- __redisSetError(c,REDIS_ERR_OOM,"Out of memory");
- return REDIS_ERR;
- }
-
- if (__redisAppendCommand(c,cmd,len) != REDIS_OK) {
- free(cmd);
- return REDIS_ERR;
- }
-
- free(cmd);
- return REDIS_OK;
-}
-
-int redisAppendCommand(redisContext *c, const char *format, ...) {
- va_list ap;
- int ret;
-
- va_start(ap,format);
- ret = redisvAppendCommand(c,format,ap);
- va_end(ap);
- return ret;
-}
-
-int redisAppendCommandArgv(redisContext *c, int argc, const char **argv, const size_t *argvlen) {
- char *cmd;
- int len;
-
- len = redisFormatCommandArgv(&cmd,argc,argv,argvlen);
- if (len == -1) {
- __redisSetError(c,REDIS_ERR_OOM,"Out of memory");
- return REDIS_ERR;
- }
-
- if (__redisAppendCommand(c,cmd,len) != REDIS_OK) {
- free(cmd);
- return REDIS_ERR;
- }
-
- free(cmd);
- return REDIS_OK;
-}
-
-/* Helper function for the redisCommand* family of functions.
- *
- * Write a formatted command to the output buffer. If the given context is
- * blocking, immediately read the reply into the "reply" pointer. When the
- * context is non-blocking, the "reply" pointer will not be used and the
- * command is simply appended to the write buffer.
- *
- * Returns the reply when a reply was succesfully retrieved. Returns NULL
- * otherwise. When NULL is returned in a blocking context, the error field
- * in the context will be set.
- */
-static void *__redisBlockForReply(redisContext *c) {
- void *reply;
-
- if (c->flags & REDIS_BLOCK) {
- if (redisGetReply(c,&reply) != REDIS_OK)
- return NULL;
- return reply;
- }
- return NULL;
-}
-
-void *redisvCommand(redisContext *c, const char *format, va_list ap) {
- if (redisvAppendCommand(c,format,ap) != REDIS_OK)
- return NULL;
- return __redisBlockForReply(c);
-}
-
-void *redisCommand(redisContext *c, const char *format, ...) {
- va_list ap;
- void *reply = NULL;
- va_start(ap,format);
- reply = redisvCommand(c,format,ap);
- va_end(ap);
- return reply;
-}
-
-void *redisCommandArgv(redisContext *c, int argc, const char **argv, const size_t *argvlen) {
- if (redisAppendCommandArgv(c,argc,argv,argvlen) != REDIS_OK)
- return NULL;
- return __redisBlockForReply(c);
-}
diff --git a/node_modules/hiredis/deps/hiredis/hiredis.h b/node_modules/hiredis/deps/hiredis/hiredis.h
deleted file mode 100644
index aadcf35c..00000000
--- a/node_modules/hiredis/deps/hiredis/hiredis.h
+++ /dev/null
@@ -1,210 +0,0 @@
-/*
- * Copyright (c) 2009-2011, Salvatore Sanfilippo
- * Copyright (c) 2010-2011, Pieter Noordhuis
- *
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * * Redistributions of source code must retain the above copyright notice,
- * this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * * Neither the name of Redis nor the names of its contributors may be used
- * to endorse or promote products derived from this software without
- * specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef __HIREDIS_H
-#define __HIREDIS_H
-#include /* for size_t */
-#include /* for va_list */
-#include /* for struct timeval */
-
-#define HIREDIS_MAJOR 0
-#define HIREDIS_MINOR 11
-#define HIREDIS_PATCH 0
-
-#define REDIS_ERR -1
-#define REDIS_OK 0
-
-/* When an error occurs, the err flag in a context is set to hold the type of
- * error that occured. REDIS_ERR_IO means there was an I/O error and you
- * should use the "errno" variable to find out what is wrong.
- * For other values, the "errstr" field will hold a description. */
-#define REDIS_ERR_IO 1 /* Error in read or write */
-#define REDIS_ERR_EOF 3 /* End of file */
-#define REDIS_ERR_PROTOCOL 4 /* Protocol error */
-#define REDIS_ERR_OOM 5 /* Out of memory */
-#define REDIS_ERR_OTHER 2 /* Everything else... */
-
-/* Connection type can be blocking or non-blocking and is set in the
- * least significant bit of the flags field in redisContext. */
-#define REDIS_BLOCK 0x1
-
-/* Connection may be disconnected before being free'd. The second bit
- * in the flags field is set when the context is connected. */
-#define REDIS_CONNECTED 0x2
-
-/* The async API might try to disconnect cleanly and flush the output
- * buffer and read all subsequent replies before disconnecting.
- * This flag means no new commands can come in and the connection
- * should be terminated once all replies have been read. */
-#define REDIS_DISCONNECTING 0x4
-
-/* Flag specific to the async API which means that the context should be clean
- * up as soon as possible. */
-#define REDIS_FREEING 0x8
-
-/* Flag that is set when an async callback is executed. */
-#define REDIS_IN_CALLBACK 0x10
-
-/* Flag that is set when the async context has one or more subscriptions. */
-#define REDIS_SUBSCRIBED 0x20
-
-/* Flag that is set when monitor mode is active */
-#define REDIS_MONITORING 0x40
-
-#define REDIS_REPLY_STRING 1
-#define REDIS_REPLY_ARRAY 2
-#define REDIS_REPLY_INTEGER 3
-#define REDIS_REPLY_NIL 4
-#define REDIS_REPLY_STATUS 5
-#define REDIS_REPLY_ERROR 6
-
-#define REDIS_READER_MAX_BUF (1024*16) /* Default max unused reader buffer. */
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/* This is the reply object returned by redisCommand() */
-typedef struct redisReply {
- int type; /* REDIS_REPLY_* */
- long long integer; /* The integer when type is REDIS_REPLY_INTEGER */
- int len; /* Length of string */
- char *str; /* Used for both REDIS_REPLY_ERROR and REDIS_REPLY_STRING */
- size_t elements; /* number of elements, for REDIS_REPLY_ARRAY */
- struct redisReply **element; /* elements vector for REDIS_REPLY_ARRAY */
-} redisReply;
-
-typedef struct redisReadTask {
- int type;
- int elements; /* number of elements in multibulk container */
- int idx; /* index in parent (array) object */
- void *obj; /* holds user-generated value for a read task */
- struct redisReadTask *parent; /* parent task */
- void *privdata; /* user-settable arbitrary field */
-} redisReadTask;
-
-typedef struct redisReplyObjectFunctions {
- void *(*createString)(const redisReadTask*, char*, size_t);
- void *(*createArray)(const redisReadTask*, int);
- void *(*createInteger)(const redisReadTask*, long long);
- void *(*createNil)(const redisReadTask*);
- void (*freeObject)(void*);
-} redisReplyObjectFunctions;
-
-/* State for the protocol parser */
-typedef struct redisReader {
- int err; /* Error flags, 0 when there is no error */
- char errstr[128]; /* String representation of error when applicable */
-
- char *buf; /* Read buffer */
- size_t pos; /* Buffer cursor */
- size_t len; /* Buffer length */
- size_t maxbuf; /* Max length of unused buffer */
-
- redisReadTask rstack[9];
- int ridx; /* Index of current read task */
- void *reply; /* Temporary reply pointer */
-
- redisReplyObjectFunctions *fn;
- void *privdata;
-} redisReader;
-
-/* Public API for the protocol parser. */
-redisReader *redisReaderCreate(void);
-void redisReaderFree(redisReader *r);
-int redisReaderFeed(redisReader *r, const char *buf, size_t len);
-int redisReaderGetReply(redisReader *r, void **reply);
-
-/* Backwards compatibility, can be removed on big version bump. */
-#define redisReplyReaderCreate redisReaderCreate
-#define redisReplyReaderFree redisReaderFree
-#define redisReplyReaderFeed redisReaderFeed
-#define redisReplyReaderGetReply redisReaderGetReply
-#define redisReplyReaderSetPrivdata(_r, _p) (int)(((redisReader*)(_r))->privdata = (_p))
-#define redisReplyReaderGetObject(_r) (((redisReader*)(_r))->reply)
-#define redisReplyReaderGetError(_r) (((redisReader*)(_r))->errstr)
-
-/* Function to free the reply objects hiredis returns by default. */
-void freeReplyObject(void *reply);
-
-/* Functions to format a command according to the protocol. */
-int redisvFormatCommand(char **target, const char *format, va_list ap);
-int redisFormatCommand(char **target, const char *format, ...);
-int redisFormatCommandArgv(char **target, int argc, const char **argv, const size_t *argvlen);
-
-/* Context for a connection to Redis */
-typedef struct redisContext {
- int err; /* Error flags, 0 when there is no error */
- char errstr[128]; /* String representation of error when applicable */
- int fd;
- int flags;
- char *obuf; /* Write buffer */
- redisReader *reader; /* Protocol reader */
-} redisContext;
-
-redisContext *redisConnect(const char *ip, int port);
-redisContext *redisConnectWithTimeout(const char *ip, int port, struct timeval tv);
-redisContext *redisConnectNonBlock(const char *ip, int port);
-redisContext *redisConnectUnix(const char *path);
-redisContext *redisConnectUnixWithTimeout(const char *path, struct timeval tv);
-redisContext *redisConnectUnixNonBlock(const char *path);
-int redisSetTimeout(redisContext *c, struct timeval tv);
-void redisFree(redisContext *c);
-int redisBufferRead(redisContext *c);
-int redisBufferWrite(redisContext *c, int *done);
-
-/* In a blocking context, this function first checks if there are unconsumed
- * replies to return and returns one if so. Otherwise, it flushes the output
- * buffer to the socket and reads until it has a reply. In a non-blocking
- * context, it will return unconsumed replies until there are no more. */
-int redisGetReply(redisContext *c, void **reply);
-int redisGetReplyFromReader(redisContext *c, void **reply);
-
-/* Write a command to the output buffer. Use these functions in blocking mode
- * to get a pipeline of commands. */
-int redisvAppendCommand(redisContext *c, const char *format, va_list ap);
-int redisAppendCommand(redisContext *c, const char *format, ...);
-int redisAppendCommandArgv(redisContext *c, int argc, const char **argv, const size_t *argvlen);
-
-/* Issue a command to Redis. In a blocking context, it is identical to calling
- * redisAppendCommand, followed by redisGetReply. The function will return
- * NULL if there was an error in performing the request, otherwise it will
- * return the reply. In a non-blocking context, it is identical to calling
- * only redisAppendCommand and will always return NULL. */
-void *redisvCommand(redisContext *c, const char *format, va_list ap);
-void *redisCommand(redisContext *c, const char *format, ...);
-void *redisCommandArgv(redisContext *c, int argc, const char **argv, const size_t *argvlen);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
diff --git a/node_modules/hiredis/deps/hiredis/net.c b/node_modules/hiredis/deps/hiredis/net.c
deleted file mode 100644
index 82ab2b46..00000000
--- a/node_modules/hiredis/deps/hiredis/net.c
+++ /dev/null
@@ -1,291 +0,0 @@
-/* Extracted from anet.c to work properly with Hiredis error reporting.
- *
- * Copyright (c) 2006-2011, Salvatore Sanfilippo
- * Copyright (c) 2010-2011, Pieter Noordhuis
- *
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * * Redistributions of source code must retain the above copyright notice,
- * this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * * Neither the name of Redis nor the names of its contributors may be used
- * to endorse or promote products derived from this software without
- * specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "fmacros.h"
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-
-#include "net.h"
-#include "sds.h"
-
-/* Defined in hiredis.c */
-void __redisSetError(redisContext *c, int type, const char *str);
-
-static void __redisSetErrorFromErrno(redisContext *c, int type, const char *prefix) {
- char buf[128];
- size_t len = 0;
-
- if (prefix != NULL)
- len = snprintf(buf,sizeof(buf),"%s: ",prefix);
- strerror_r(errno,buf+len,sizeof(buf)-len);
- __redisSetError(c,type,buf);
-}
-
-static int redisSetReuseAddr(redisContext *c, int fd) {
- int on = 1;
- if (setsockopt(fd, SOL_SOCKET, SO_REUSEADDR, &on, sizeof(on)) == -1) {
- __redisSetErrorFromErrno(c,REDIS_ERR_IO,NULL);
- close(fd);
- return REDIS_ERR;
- }
- return REDIS_OK;
-}
-
-static int redisCreateSocket(redisContext *c, int type) {
- int s;
- if ((s = socket(type, SOCK_STREAM, 0)) == -1) {
- __redisSetErrorFromErrno(c,REDIS_ERR_IO,NULL);
- return REDIS_ERR;
- }
- if (type == AF_INET) {
- if (redisSetReuseAddr(c,s) == REDIS_ERR) {
- return REDIS_ERR;
- }
- }
- return s;
-}
-
-static int redisSetBlocking(redisContext *c, int fd, int blocking) {
- int flags;
-
- /* Set the socket nonblocking.
- * Note that fcntl(2) for F_GETFL and F_SETFL can't be
- * interrupted by a signal. */
- if ((flags = fcntl(fd, F_GETFL)) == -1) {
- __redisSetErrorFromErrno(c,REDIS_ERR_IO,"fcntl(F_GETFL)");
- close(fd);
- return REDIS_ERR;
- }
-
- if (blocking)
- flags &= ~O_NONBLOCK;
- else
- flags |= O_NONBLOCK;
-
- if (fcntl(fd, F_SETFL, flags) == -1) {
- __redisSetErrorFromErrno(c,REDIS_ERR_IO,"fcntl(F_SETFL)");
- close(fd);
- return REDIS_ERR;
- }
- return REDIS_OK;
-}
-
-static int redisSetTcpNoDelay(redisContext *c, int fd) {
- int yes = 1;
- if (setsockopt(fd, IPPROTO_TCP, TCP_NODELAY, &yes, sizeof(yes)) == -1) {
- __redisSetErrorFromErrno(c,REDIS_ERR_IO,"setsockopt(TCP_NODELAY)");
- close(fd);
- return REDIS_ERR;
- }
- return REDIS_OK;
-}
-
-#define __MAX_MSEC (((LONG_MAX) - 999) / 1000)
-
-static int redisContextWaitReady(redisContext *c, int fd, const struct timeval *timeout) {
- struct pollfd wfd[1];
- long msec;
-
- msec = -1;
- wfd[0].fd = fd;
- wfd[0].events = POLLOUT;
-
- /* Only use timeout when not NULL. */
- if (timeout != NULL) {
- if (timeout->tv_usec > 1000000 || timeout->tv_sec > __MAX_MSEC) {
- close(fd);
- return REDIS_ERR;
- }
-
- msec = (timeout->tv_sec * 1000) + ((timeout->tv_usec + 999) / 1000);
-
- if (msec < 0 || msec > INT_MAX) {
- msec = INT_MAX;
- }
- }
-
- if (errno == EINPROGRESS) {
- int res;
-
- if ((res = poll(wfd, 1, msec)) == -1) {
- __redisSetErrorFromErrno(c, REDIS_ERR_IO, "poll(2)");
- close(fd);
- return REDIS_ERR;
- } else if (res == 0) {
- errno = ETIMEDOUT;
- __redisSetErrorFromErrno(c,REDIS_ERR_IO,NULL);
- close(fd);
- return REDIS_ERR;
- }
-
- if (redisCheckSocketError(c, fd) != REDIS_OK)
- return REDIS_ERR;
-
- return REDIS_OK;
- }
-
- __redisSetErrorFromErrno(c,REDIS_ERR_IO,NULL);
- close(fd);
- return REDIS_ERR;
-}
-
-int redisCheckSocketError(redisContext *c, int fd) {
- int err = 0;
- socklen_t errlen = sizeof(err);
-
- if (getsockopt(fd, SOL_SOCKET, SO_ERROR, &err, &errlen) == -1) {
- __redisSetErrorFromErrno(c,REDIS_ERR_IO,"getsockopt(SO_ERROR)");
- close(fd);
- return REDIS_ERR;
- }
-
- if (err) {
- errno = err;
- __redisSetErrorFromErrno(c,REDIS_ERR_IO,NULL);
- close(fd);
- return REDIS_ERR;
- }
-
- return REDIS_OK;
-}
-
-int redisContextSetTimeout(redisContext *c, struct timeval tv) {
- if (setsockopt(c->fd,SOL_SOCKET,SO_RCVTIMEO,&tv,sizeof(tv)) == -1) {
- __redisSetErrorFromErrno(c,REDIS_ERR_IO,"setsockopt(SO_RCVTIMEO)");
- return REDIS_ERR;
- }
- if (setsockopt(c->fd,SOL_SOCKET,SO_SNDTIMEO,&tv,sizeof(tv)) == -1) {
- __redisSetErrorFromErrno(c,REDIS_ERR_IO,"setsockopt(SO_SNDTIMEO)");
- return REDIS_ERR;
- }
- return REDIS_OK;
-}
-
-int redisContextConnectTcp(redisContext *c, const char *addr, int port, struct timeval *timeout) {
- int s, rv;
- char _port[6]; /* strlen("65535"); */
- struct addrinfo hints, *servinfo, *p;
- int blocking = (c->flags & REDIS_BLOCK);
-
- snprintf(_port, 6, "%d", port);
- memset(&hints,0,sizeof(hints));
- hints.ai_family = AF_INET;
- hints.ai_socktype = SOCK_STREAM;
-
- if ((rv = getaddrinfo(addr,_port,&hints,&servinfo)) != 0) {
- __redisSetError(c,REDIS_ERR_OTHER,gai_strerror(rv));
- return REDIS_ERR;
- }
- for (p = servinfo; p != NULL; p = p->ai_next) {
- if ((s = socket(p->ai_family,p->ai_socktype,p->ai_protocol)) == -1)
- continue;
-
- if (redisSetBlocking(c,s,0) != REDIS_OK)
- goto error;
- if (connect(s,p->ai_addr,p->ai_addrlen) == -1) {
- if (errno == EHOSTUNREACH) {
- close(s);
- continue;
- } else if (errno == EINPROGRESS && !blocking) {
- /* This is ok. */
- } else {
- if (redisContextWaitReady(c,s,timeout) != REDIS_OK)
- goto error;
- }
- }
- if (blocking && redisSetBlocking(c,s,1) != REDIS_OK)
- goto error;
- if (redisSetTcpNoDelay(c,s) != REDIS_OK)
- goto error;
-
- c->fd = s;
- c->flags |= REDIS_CONNECTED;
- rv = REDIS_OK;
- goto end;
- }
- if (p == NULL) {
- char buf[128];
- snprintf(buf,sizeof(buf),"Can't create socket: %s",strerror(errno));
- __redisSetError(c,REDIS_ERR_OTHER,buf);
- goto error;
- }
-
-error:
- rv = REDIS_ERR;
-end:
- freeaddrinfo(servinfo);
- return rv; // Need to return REDIS_OK if alright
-}
-
-int redisContextConnectUnix(redisContext *c, const char *path, struct timeval *timeout) {
- int s;
- int blocking = (c->flags & REDIS_BLOCK);
- struct sockaddr_un sa;
-
- if ((s = redisCreateSocket(c,AF_LOCAL)) < 0)
- return REDIS_ERR;
- if (redisSetBlocking(c,s,0) != REDIS_OK)
- return REDIS_ERR;
-
- sa.sun_family = AF_LOCAL;
- strncpy(sa.sun_path,path,sizeof(sa.sun_path)-1);
- if (connect(s, (struct sockaddr*)&sa, sizeof(sa)) == -1) {
- if (errno == EINPROGRESS && !blocking) {
- /* This is ok. */
- } else {
- if (redisContextWaitReady(c,s,timeout) != REDIS_OK)
- return REDIS_ERR;
- }
- }
-
- /* Reset socket to be blocking after connect(2). */
- if (blocking && redisSetBlocking(c,s,1) != REDIS_OK)
- return REDIS_ERR;
-
- c->fd = s;
- c->flags |= REDIS_CONNECTED;
- return REDIS_OK;
-}
diff --git a/node_modules/hiredis/deps/hiredis/net.h b/node_modules/hiredis/deps/hiredis/net.h
deleted file mode 100644
index eb8a0a1c..00000000
--- a/node_modules/hiredis/deps/hiredis/net.h
+++ /dev/null
@@ -1,47 +0,0 @@
-/* Extracted from anet.c to work properly with Hiredis error reporting.
- *
- * Copyright (c) 2006-2011, Salvatore Sanfilippo
- * Copyright (c) 2010-2011, Pieter Noordhuis
- *
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * * Redistributions of source code must retain the above copyright notice,
- * this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * * Neither the name of Redis nor the names of its contributors may be used
- * to endorse or promote products derived from this software without
- * specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef __NET_H
-#define __NET_H
-
-#include "hiredis.h"
-
-#if defined(__sun)
-#define AF_LOCAL AF_UNIX
-#endif
-
-int redisCheckSocketError(redisContext *c, int fd);
-int redisContextSetTimeout(redisContext *c, struct timeval tv);
-int redisContextConnectTcp(redisContext *c, const char *addr, int port, struct timeval *timeout);
-int redisContextConnectUnix(redisContext *c, const char *path, struct timeval *timeout);
-
-#endif
diff --git a/node_modules/hiredis/deps/hiredis/sds.c b/node_modules/hiredis/deps/hiredis/sds.c
deleted file mode 100644
index 0af9c672..00000000
--- a/node_modules/hiredis/deps/hiredis/sds.c
+++ /dev/null
@@ -1,605 +0,0 @@
-/* SDSLib, A C dynamic strings library
- *
- * Copyright (c) 2006-2010, Salvatore Sanfilippo
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * * Redistributions of source code must retain the above copyright notice,
- * this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * * Neither the name of Redis nor the names of its contributors may be used
- * to endorse or promote products derived from this software without
- * specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include
-#include
-#include
-#include
-#include "sds.h"
-
-#ifdef SDS_ABORT_ON_OOM
-static void sdsOomAbort(void) {
- fprintf(stderr,"SDS: Out Of Memory (SDS_ABORT_ON_OOM defined)\n");
- abort();
-}
-#endif
-
-sds sdsnewlen(const void *init, size_t initlen) {
- struct sdshdr *sh;
-
- sh = malloc(sizeof(struct sdshdr)+initlen+1);
-#ifdef SDS_ABORT_ON_OOM
- if (sh == NULL) sdsOomAbort();
-#else
- if (sh == NULL) return NULL;
-#endif
- sh->len = initlen;
- sh->free = 0;
- if (initlen) {
- if (init) memcpy(sh->buf, init, initlen);
- else memset(sh->buf,0,initlen);
- }
- sh->buf[initlen] = '\0';
- return (char*)sh->buf;
-}
-
-sds sdsempty(void) {
- return sdsnewlen("",0);
-}
-
-sds sdsnew(const char *init) {
- size_t initlen = (init == NULL) ? 0 : strlen(init);
- return sdsnewlen(init, initlen);
-}
-
-sds sdsdup(const sds s) {
- return sdsnewlen(s, sdslen(s));
-}
-
-void sdsfree(sds s) {
- if (s == NULL) return;
- free(s-sizeof(struct sdshdr));
-}
-
-void sdsupdatelen(sds s) {
- struct sdshdr *sh = (void*) (s-(sizeof(struct sdshdr)));
- int reallen = strlen(s);
- sh->free += (sh->len-reallen);
- sh->len = reallen;
-}
-
-static sds sdsMakeRoomFor(sds s, size_t addlen) {
- struct sdshdr *sh, *newsh;
- size_t free = sdsavail(s);
- size_t len, newlen;
-
- if (free >= addlen) return s;
- len = sdslen(s);
- sh = (void*) (s-(sizeof(struct sdshdr)));
- newlen = (len+addlen)*2;
- newsh = realloc(sh, sizeof(struct sdshdr)+newlen+1);
-#ifdef SDS_ABORT_ON_OOM
- if (newsh == NULL) sdsOomAbort();
-#else
- if (newsh == NULL) return NULL;
-#endif
-
- newsh->free = newlen - len;
- return newsh->buf;
-}
-
-/* Grow the sds to have the specified length. Bytes that were not part of
- * the original length of the sds will be set to zero. */
-sds sdsgrowzero(sds s, size_t len) {
- struct sdshdr *sh = (void*)(s-(sizeof(struct sdshdr)));
- size_t totlen, curlen = sh->len;
-
- if (len <= curlen) return s;
- s = sdsMakeRoomFor(s,len-curlen);
- if (s == NULL) return NULL;
-
- /* Make sure added region doesn't contain garbage */
- sh = (void*)(s-(sizeof(struct sdshdr)));
- memset(s+curlen,0,(len-curlen+1)); /* also set trailing \0 byte */
- totlen = sh->len+sh->free;
- sh->len = len;
- sh->free = totlen-sh->len;
- return s;
-}
-
-sds sdscatlen(sds s, const void *t, size_t len) {
- struct sdshdr *sh;
- size_t curlen = sdslen(s);
-
- s = sdsMakeRoomFor(s,len);
- if (s == NULL) return NULL;
- sh = (void*) (s-(sizeof(struct sdshdr)));
- memcpy(s+curlen, t, len);
- sh->len = curlen+len;
- sh->free = sh->free-len;
- s[curlen+len] = '\0';
- return s;
-}
-
-sds sdscat(sds s, const char *t) {
- return sdscatlen(s, t, strlen(t));
-}
-
-sds sdscpylen(sds s, char *t, size_t len) {
- struct sdshdr *sh = (void*) (s-(sizeof(struct sdshdr)));
- size_t totlen = sh->free+sh->len;
-
- if (totlen < len) {
- s = sdsMakeRoomFor(s,len-sh->len);
- if (s == NULL) return NULL;
- sh = (void*) (s-(sizeof(struct sdshdr)));
- totlen = sh->free+sh->len;
- }
- memcpy(s, t, len);
- s[len] = '\0';
- sh->len = len;
- sh->free = totlen-len;
- return s;
-}
-
-sds sdscpy(sds s, char *t) {
- return sdscpylen(s, t, strlen(t));
-}
-
-sds sdscatvprintf(sds s, const char *fmt, va_list ap) {
- va_list cpy;
- char *buf, *t;
- size_t buflen = 16;
-
- while(1) {
- buf = malloc(buflen);
-#ifdef SDS_ABORT_ON_OOM
- if (buf == NULL) sdsOomAbort();
-#else
- if (buf == NULL) return NULL;
-#endif
- buf[buflen-2] = '\0';
- va_copy(cpy,ap);
- vsnprintf(buf, buflen, fmt, cpy);
- if (buf[buflen-2] != '\0') {
- free(buf);
- buflen *= 2;
- continue;
- }
- break;
- }
- t = sdscat(s, buf);
- free(buf);
- return t;
-}
-
-sds sdscatprintf(sds s, const char *fmt, ...) {
- va_list ap;
- char *t;
- va_start(ap, fmt);
- t = sdscatvprintf(s,fmt,ap);
- va_end(ap);
- return t;
-}
-
-sds sdstrim(sds s, const char *cset) {
- struct sdshdr *sh = (void*) (s-(sizeof(struct sdshdr)));
- char *start, *end, *sp, *ep;
- size_t len;
-
- sp = start = s;
- ep = end = s+sdslen(s)-1;
- while(sp <= end && strchr(cset, *sp)) sp++;
- while(ep > start && strchr(cset, *ep)) ep--;
- len = (sp > ep) ? 0 : ((ep-sp)+1);
- if (sh->buf != sp) memmove(sh->buf, sp, len);
- sh->buf[len] = '\0';
- sh->free = sh->free+(sh->len-len);
- sh->len = len;
- return s;
-}
-
-sds sdsrange(sds s, int start, int end) {
- struct sdshdr *sh = (void*) (s-(sizeof(struct sdshdr)));
- size_t newlen, len = sdslen(s);
-
- if (len == 0) return s;
- if (start < 0) {
- start = len+start;
- if (start < 0) start = 0;
- }
- if (end < 0) {
- end = len+end;
- if (end < 0) end = 0;
- }
- newlen = (start > end) ? 0 : (end-start)+1;
- if (newlen != 0) {
- if (start >= (signed)len) {
- newlen = 0;
- } else if (end >= (signed)len) {
- end = len-1;
- newlen = (start > end) ? 0 : (end-start)+1;
- }
- } else {
- start = 0;
- }
- if (start && newlen) memmove(sh->buf, sh->buf+start, newlen);
- sh->buf[newlen] = 0;
- sh->free = sh->free+(sh->len-newlen);
- sh->len = newlen;
- return s;
-}
-
-void sdstolower(sds s) {
- int len = sdslen(s), j;
-
- for (j = 0; j < len; j++) s[j] = tolower(s[j]);
-}
-
-void sdstoupper(sds s) {
- int len = sdslen(s), j;
-
- for (j = 0; j < len; j++) s[j] = toupper(s[j]);
-}
-
-int sdscmp(sds s1, sds s2) {
- size_t l1, l2, minlen;
- int cmp;
-
- l1 = sdslen(s1);
- l2 = sdslen(s2);
- minlen = (l1 < l2) ? l1 : l2;
- cmp = memcmp(s1,s2,minlen);
- if (cmp == 0) return l1-l2;
- return cmp;
-}
-
-/* Split 's' with separator in 'sep'. An array
- * of sds strings is returned. *count will be set
- * by reference to the number of tokens returned.
- *
- * On out of memory, zero length string, zero length
- * separator, NULL is returned.
- *
- * Note that 'sep' is able to split a string using
- * a multi-character separator. For example
- * sdssplit("foo_-_bar","_-_"); will return two
- * elements "foo" and "bar".
- *
- * This version of the function is binary-safe but
- * requires length arguments. sdssplit() is just the
- * same function but for zero-terminated strings.
- */
-sds *sdssplitlen(char *s, int len, char *sep, int seplen, int *count) {
- int elements = 0, slots = 5, start = 0, j;
-
- sds *tokens = malloc(sizeof(sds)*slots);
-#ifdef SDS_ABORT_ON_OOM
- if (tokens == NULL) sdsOomAbort();
-#endif
- if (seplen < 1 || len < 0 || tokens == NULL) return NULL;
- if (len == 0) {
- *count = 0;
- return tokens;
- }
- for (j = 0; j < (len-(seplen-1)); j++) {
- /* make sure there is room for the next element and the final one */
- if (slots < elements+2) {
- sds *newtokens;
-
- slots *= 2;
- newtokens = realloc(tokens,sizeof(sds)*slots);
- if (newtokens == NULL) {
-#ifdef SDS_ABORT_ON_OOM
- sdsOomAbort();
-#else
- goto cleanup;
-#endif
- }
- tokens = newtokens;
- }
- /* search the separator */
- if ((seplen == 1 && *(s+j) == sep[0]) || (memcmp(s+j,sep,seplen) == 0)) {
- tokens[elements] = sdsnewlen(s+start,j-start);
- if (tokens[elements] == NULL) {
-#ifdef SDS_ABORT_ON_OOM
- sdsOomAbort();
-#else
- goto cleanup;
-#endif
- }
- elements++;
- start = j+seplen;
- j = j+seplen-1; /* skip the separator */
- }
- }
- /* Add the final element. We are sure there is room in the tokens array. */
- tokens[elements] = sdsnewlen(s+start,len-start);
- if (tokens[elements] == NULL) {
-#ifdef SDS_ABORT_ON_OOM
- sdsOomAbort();
-#else
- goto cleanup;
-#endif
- }
- elements++;
- *count = elements;
- return tokens;
-
-#ifndef SDS_ABORT_ON_OOM
-cleanup:
- {
- int i;
- for (i = 0; i < elements; i++) sdsfree(tokens[i]);
- free(tokens);
- return NULL;
- }
-#endif
-}
-
-void sdsfreesplitres(sds *tokens, int count) {
- if (!tokens) return;
- while(count--)
- sdsfree(tokens[count]);
- free(tokens);
-}
-
-sds sdsfromlonglong(long long value) {
- char buf[32], *p;
- unsigned long long v;
-
- v = (value < 0) ? -value : value;
- p = buf+31; /* point to the last character */
- do {
- *p-- = '0'+(v%10);
- v /= 10;
- } while(v);
- if (value < 0) *p-- = '-';
- p++;
- return sdsnewlen(p,32-(p-buf));
-}
-
-sds sdscatrepr(sds s, char *p, size_t len) {
- s = sdscatlen(s,"\"",1);
- if (s == NULL) return NULL;
-
- while(len--) {
- switch(*p) {
- case '\\':
- case '"':
- s = sdscatprintf(s,"\\%c",*p);
- break;
- case '\n': s = sdscatlen(s,"\\n",2); break;
- case '\r': s = sdscatlen(s,"\\r",2); break;
- case '\t': s = sdscatlen(s,"\\t",2); break;
- case '\a': s = sdscatlen(s,"\\a",2); break;
- case '\b': s = sdscatlen(s,"\\b",2); break;
- default:
- if (isprint(*p))
- s = sdscatprintf(s,"%c",*p);
- else
- s = sdscatprintf(s,"\\x%02x",(unsigned char)*p);
- break;
- }
- p++;
- if (s == NULL) return NULL;
- }
- return sdscatlen(s,"\"",1);
-}
-
-/* Split a line into arguments, where every argument can be in the
- * following programming-language REPL-alike form:
- *
- * foo bar "newline are supported\n" and "\xff\x00otherstuff"
- *
- * The number of arguments is stored into *argc, and an array
- * of sds is returned. The caller should sdsfree() all the returned
- * strings and finally free() the array itself.
- *
- * Note that sdscatrepr() is able to convert back a string into
- * a quoted string in the same format sdssplitargs() is able to parse.
- */
-sds *sdssplitargs(char *line, int *argc) {
- char *p = line;
- char *current = NULL;
- char **vector = NULL, **_vector = NULL;
-
- *argc = 0;
- while(1) {
- /* skip blanks */
- while(*p && isspace(*p)) p++;
- if (*p) {
- /* get a token */
- int inq=0; /* set to 1 if we are in "quotes" */
- int done=0;
-
- if (current == NULL) {
- current = sdsempty();
- if (current == NULL) goto err;
- }
-
- while(!done) {
- if (inq) {
- if (*p == '\\' && *(p+1)) {
- char c;
-
- p++;
- switch(*p) {
- case 'n': c = '\n'; break;
- case 'r': c = '\r'; break;
- case 't': c = '\t'; break;
- case 'b': c = '\b'; break;
- case 'a': c = '\a'; break;
- default: c = *p; break;
- }
- current = sdscatlen(current,&c,1);
- } else if (*p == '"') {
- /* closing quote must be followed by a space */
- if (*(p+1) && !isspace(*(p+1))) goto err;
- done=1;
- } else if (!*p) {
- /* unterminated quotes */
- goto err;
- } else {
- current = sdscatlen(current,p,1);
- }
- } else {
- switch(*p) {
- case ' ':
- case '\n':
- case '\r':
- case '\t':
- case '\0':
- done=1;
- break;
- case '"':
- inq=1;
- break;
- default:
- current = sdscatlen(current,p,1);
- break;
- }
- }
- if (*p) p++;
- if (current == NULL) goto err;
- }
- /* add the token to the vector */
- _vector = realloc(vector,((*argc)+1)*sizeof(char*));
- if (_vector == NULL) goto err;
-
- vector = _vector;
- vector[*argc] = current;
- (*argc)++;
- current = NULL;
- } else {
- return vector;
- }
- }
-
-err:
- while((*argc)--)
- sdsfree(vector[*argc]);
- if (vector != NULL) free(vector);
- if (current != NULL) sdsfree(current);
- return NULL;
-}
-
-#ifdef SDS_TEST_MAIN
-#include
-
-int __failed_tests = 0;
-int __test_num = 0;
-#define test_cond(descr,_c) do { \
- __test_num++; printf("%d - %s: ", __test_num, descr); \
- if(_c) printf("PASSED\n"); else {printf("FAILED\n"); __failed_tests++;} \
-} while(0);
-#define test_report() do { \
- printf("%d tests, %d passed, %d failed\n", __test_num, \
- __test_num-__failed_tests, __failed_tests); \
- if (__failed_tests) { \
- printf("=== WARNING === We have failed tests here...\n"); \
- } \
-} while(0);
-
-int main(void) {
- {
- sds x = sdsnew("foo"), y;
-
- test_cond("Create a string and obtain the length",
- sdslen(x) == 3 && memcmp(x,"foo\0",4) == 0)
-
- sdsfree(x);
- x = sdsnewlen("foo",2);
- test_cond("Create a string with specified length",
- sdslen(x) == 2 && memcmp(x,"fo\0",3) == 0)
-
- x = sdscat(x,"bar");
- test_cond("Strings concatenation",
- sdslen(x) == 5 && memcmp(x,"fobar\0",6) == 0);
-
- x = sdscpy(x,"a");
- test_cond("sdscpy() against an originally longer string",
- sdslen(x) == 1 && memcmp(x,"a\0",2) == 0)
-
- x = sdscpy(x,"xyzxxxxxxxxxxyyyyyyyyyykkkkkkkkkk");
- test_cond("sdscpy() against an originally shorter string",
- sdslen(x) == 33 &&
- memcmp(x,"xyzxxxxxxxxxxyyyyyyyyyykkkkkkkkkk\0",33) == 0)
-
- sdsfree(x);
- x = sdscatprintf(sdsempty(),"%d",123);
- test_cond("sdscatprintf() seems working in the base case",
- sdslen(x) == 3 && memcmp(x,"123\0",4) ==0)
-
- sdsfree(x);
- x = sdstrim(sdsnew("xxciaoyyy"),"xy");
- test_cond("sdstrim() correctly trims characters",
- sdslen(x) == 4 && memcmp(x,"ciao\0",5) == 0)
-
- y = sdsrange(sdsdup(x),1,1);
- test_cond("sdsrange(...,1,1)",
- sdslen(y) == 1 && memcmp(y,"i\0",2) == 0)
-
- sdsfree(y);
- y = sdsrange(sdsdup(x),1,-1);
- test_cond("sdsrange(...,1,-1)",
- sdslen(y) == 3 && memcmp(y,"iao\0",4) == 0)
-
- sdsfree(y);
- y = sdsrange(sdsdup(x),-2,-1);
- test_cond("sdsrange(...,-2,-1)",
- sdslen(y) == 2 && memcmp(y,"ao\0",3) == 0)
-
- sdsfree(y);
- y = sdsrange(sdsdup(x),2,1);
- test_cond("sdsrange(...,2,1)",
- sdslen(y) == 0 && memcmp(y,"\0",1) == 0)
-
- sdsfree(y);
- y = sdsrange(sdsdup(x),1,100);
- test_cond("sdsrange(...,1,100)",
- sdslen(y) == 3 && memcmp(y,"iao\0",4) == 0)
-
- sdsfree(y);
- y = sdsrange(sdsdup(x),100,100);
- test_cond("sdsrange(...,100,100)",
- sdslen(y) == 0 && memcmp(y,"\0",1) == 0)
-
- sdsfree(y);
- sdsfree(x);
- x = sdsnew("foo");
- y = sdsnew("foa");
- test_cond("sdscmp(foo,foa)", sdscmp(x,y) > 0)
-
- sdsfree(y);
- sdsfree(x);
- x = sdsnew("bar");
- y = sdsnew("bar");
- test_cond("sdscmp(bar,bar)", sdscmp(x,y) == 0)
-
- sdsfree(y);
- sdsfree(x);
- x = sdsnew("aar");
- y = sdsnew("bar");
- test_cond("sdscmp(bar,bar)", sdscmp(x,y) < 0)
- }
- test_report()
-}
-#endif
diff --git a/node_modules/hiredis/deps/hiredis/sds.h b/node_modules/hiredis/deps/hiredis/sds.h
deleted file mode 100644
index 94f5871f..00000000
--- a/node_modules/hiredis/deps/hiredis/sds.h
+++ /dev/null
@@ -1,88 +0,0 @@
-/* SDSLib, A C dynamic strings library
- *
- * Copyright (c) 2006-2010, Salvatore Sanfilippo
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * * Redistributions of source code must retain the above copyright notice,
- * this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * * Neither the name of Redis nor the names of its contributors may be used
- * to endorse or promote products derived from this software without
- * specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef __SDS_H
-#define __SDS_H
-
-#include
-#include
-
-typedef char *sds;
-
-struct sdshdr {
- int len;
- int free;
- char buf[];
-};
-
-static inline size_t sdslen(const sds s) {
- struct sdshdr *sh = (void*)(s-(sizeof(struct sdshdr)));
- return sh->len;
-}
-
-static inline size_t sdsavail(const sds s) {
- struct sdshdr *sh = (void*)(s-(sizeof(struct sdshdr)));
- return sh->free;
-}
-
-sds sdsnewlen(const void *init, size_t initlen);
-sds sdsnew(const char *init);
-sds sdsempty(void);
-size_t sdslen(const sds s);
-sds sdsdup(const sds s);
-void sdsfree(sds s);
-size_t sdsavail(sds s);
-sds sdsgrowzero(sds s, size_t len);
-sds sdscatlen(sds s, const void *t, size_t len);
-sds sdscat(sds s, const char *t);
-sds sdscpylen(sds s, char *t, size_t len);
-sds sdscpy(sds s, char *t);
-
-sds sdscatvprintf(sds s, const char *fmt, va_list ap);
-#ifdef __GNUC__
-sds sdscatprintf(sds s, const char *fmt, ...)
- __attribute__((format(printf, 2, 3)));
-#else
-sds sdscatprintf(sds s, const char *fmt, ...);
-#endif
-
-sds sdstrim(sds s, const char *cset);
-sds sdsrange(sds s, int start, int end);
-void sdsupdatelen(sds s);
-int sdscmp(sds s1, sds s2);
-sds *sdssplitlen(char *s, int len, char *sep, int seplen, int *count);
-void sdsfreesplitres(sds *tokens, int count);
-void sdstolower(sds s);
-void sdstoupper(sds s);
-sds sdsfromlonglong(long long value);
-sds sdscatrepr(sds s, char *p, size_t len);
-sds *sdssplitargs(char *line, int *argc);
-
-#endif
diff --git a/node_modules/hiredis/deps/hiredis/test.c b/node_modules/hiredis/deps/hiredis/test.c
deleted file mode 100644
index 737ad1cc..00000000
--- a/node_modules/hiredis/deps/hiredis/test.c
+++ /dev/null
@@ -1,656 +0,0 @@
-#include "fmacros.h"
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-
-#include "hiredis.h"
-
-enum connection_type {
- CONN_TCP,
- CONN_UNIX
-};
-
-struct config {
- enum connection_type type;
-
- struct {
- const char *host;
- int port;
- } tcp;
-
- struct {
- const char *path;
- } unix;
-};
-
-/* The following lines make up our testing "framework" :) */
-static int tests = 0, fails = 0;
-#define test(_s) { printf("#%02d ", ++tests); printf(_s); }
-#define test_cond(_c) if(_c) printf("\033[0;32mPASSED\033[0;0m\n"); else {printf("\033[0;31mFAILED\033[0;0m\n"); fails++;}
-
-static long long usec(void) {
- struct timeval tv;
- gettimeofday(&tv,NULL);
- return (((long long)tv.tv_sec)*1000000)+tv.tv_usec;
-}
-
-static redisContext *select_database(redisContext *c) {
- redisReply *reply;
-
- /* Switch to DB 9 for testing, now that we know we can chat. */
- reply = redisCommand(c,"SELECT 9");
- assert(reply != NULL);
- freeReplyObject(reply);
-
- /* Make sure the DB is emtpy */
- reply = redisCommand(c,"DBSIZE");
- assert(reply != NULL);
- if (reply->type == REDIS_REPLY_INTEGER && reply->integer == 0) {
- /* Awesome, DB 9 is empty and we can continue. */
- freeReplyObject(reply);
- } else {
- printf("Database #9 is not empty, test can not continue\n");
- exit(1);
- }
-
- return c;
-}
-
-static void disconnect(redisContext *c) {
- redisReply *reply;
-
- /* Make sure we're on DB 9. */
- reply = redisCommand(c,"SELECT 9");
- assert(reply != NULL);
- freeReplyObject(reply);
- reply = redisCommand(c,"FLUSHDB");
- assert(reply != NULL);
- freeReplyObject(reply);
-
- /* Free the context as well. */
- redisFree(c);
-}
-
-static redisContext *connect(struct config config) {
- redisContext *c = NULL;
-
- if (config.type == CONN_TCP) {
- c = redisConnect(config.tcp.host, config.tcp.port);
- } else if (config.type == CONN_UNIX) {
- c = redisConnectUnix(config.unix.path);
- } else {
- assert(NULL);
- }
-
- if (c->err) {
- printf("Connection error: %s\n", c->errstr);
- exit(1);
- }
-
- return select_database(c);
-}
-
-static void test_format_commands(void) {
- char *cmd;
- int len;
-
- test("Format command without interpolation: ");
- len = redisFormatCommand(&cmd,"SET foo bar");
- test_cond(strncmp(cmd,"*3\r\n$3\r\nSET\r\n$3\r\nfoo\r\n$3\r\nbar\r\n",len) == 0 &&
- len == 4+4+(3+2)+4+(3+2)+4+(3+2));
- free(cmd);
-
- test("Format command with %%s string interpolation: ");
- len = redisFormatCommand(&cmd,"SET %s %s","foo","bar");
- test_cond(strncmp(cmd,"*3\r\n$3\r\nSET\r\n$3\r\nfoo\r\n$3\r\nbar\r\n",len) == 0 &&
- len == 4+4+(3+2)+4+(3+2)+4+(3+2));
- free(cmd);
-
- test("Format command with %%s and an empty string: ");
- len = redisFormatCommand(&cmd,"SET %s %s","foo","");
- test_cond(strncmp(cmd,"*3\r\n$3\r\nSET\r\n$3\r\nfoo\r\n$0\r\n\r\n",len) == 0 &&
- len == 4+4+(3+2)+4+(3+2)+4+(0+2));
- free(cmd);
-
- test("Format command with an empty string in between proper interpolations: ");
- len = redisFormatCommand(&cmd,"SET %s %s","","foo");
- test_cond(strncmp(cmd,"*3\r\n$3\r\nSET\r\n$0\r\n\r\n$3\r\nfoo\r\n",len) == 0 &&
- len == 4+4+(3+2)+4+(0+2)+4+(3+2));
- free(cmd);
-
- test("Format command with %%b string interpolation: ");
- len = redisFormatCommand(&cmd,"SET %b %b","foo",3,"b\0r",3);
- test_cond(strncmp(cmd,"*3\r\n$3\r\nSET\r\n$3\r\nfoo\r\n$3\r\nb\0r\r\n",len) == 0 &&
- len == 4+4+(3+2)+4+(3+2)+4+(3+2));
- free(cmd);
-
- test("Format command with %%b and an empty string: ");
- len = redisFormatCommand(&cmd,"SET %b %b","foo",3,"",0);
- test_cond(strncmp(cmd,"*3\r\n$3\r\nSET\r\n$3\r\nfoo\r\n$0\r\n\r\n",len) == 0 &&
- len == 4+4+(3+2)+4+(3+2)+4+(0+2));
- free(cmd);
-
- test("Format command with literal %%: ");
- len = redisFormatCommand(&cmd,"SET %% %%");
- test_cond(strncmp(cmd,"*3\r\n$3\r\nSET\r\n$1\r\n%\r\n$1\r\n%\r\n",len) == 0 &&
- len == 4+4+(3+2)+4+(1+2)+4+(1+2));
- free(cmd);
-
- /* Vararg width depends on the type. These tests make sure that the
- * width is correctly determined using the format and subsequent varargs
- * can correctly be interpolated. */
-#define INTEGER_WIDTH_TEST(fmt, type) do { \
- type value = 123; \
- test("Format command with printf-delegation (" #type "): "); \
- len = redisFormatCommand(&cmd,"key:%08" fmt " str:%s", value, "hello"); \
- test_cond(strncmp(cmd,"*2\r\n$12\r\nkey:00000123\r\n$9\r\nstr:hello\r\n",len) == 0 && \
- len == 4+5+(12+2)+4+(9+2)); \
- free(cmd); \
-} while(0)
-
-#define FLOAT_WIDTH_TEST(type) do { \
- type value = 123.0; \
- test("Format command with printf-delegation (" #type "): "); \
- len = redisFormatCommand(&cmd,"key:%08.3f str:%s", value, "hello"); \
- test_cond(strncmp(cmd,"*2\r\n$12\r\nkey:0123.000\r\n$9\r\nstr:hello\r\n",len) == 0 && \
- len == 4+5+(12+2)+4+(9+2)); \
- free(cmd); \
-} while(0)
-
- INTEGER_WIDTH_TEST("d", int);
- INTEGER_WIDTH_TEST("hhd", char);
- INTEGER_WIDTH_TEST("hd", short);
- INTEGER_WIDTH_TEST("ld", long);
- INTEGER_WIDTH_TEST("lld", long long);
- INTEGER_WIDTH_TEST("u", unsigned int);
- INTEGER_WIDTH_TEST("hhu", unsigned char);
- INTEGER_WIDTH_TEST("hu", unsigned short);
- INTEGER_WIDTH_TEST("lu", unsigned long);
- INTEGER_WIDTH_TEST("llu", unsigned long long);
- FLOAT_WIDTH_TEST(float);
- FLOAT_WIDTH_TEST(double);
-
- test("Format command with invalid printf format: ");
- len = redisFormatCommand(&cmd,"key:%08p %b",(void*)1234,"foo",3);
- test_cond(len == -1);
-
- const char *argv[3];
- argv[0] = "SET";
- argv[1] = "foo\0xxx";
- argv[2] = "bar";
- size_t lens[3] = { 3, 7, 3 };
- int argc = 3;
-
- test("Format command by passing argc/argv without lengths: ");
- len = redisFormatCommandArgv(&cmd,argc,argv,NULL);
- test_cond(strncmp(cmd,"*3\r\n$3\r\nSET\r\n$3\r\nfoo\r\n$3\r\nbar\r\n",len) == 0 &&
- len == 4+4+(3+2)+4+(3+2)+4+(3+2));
- free(cmd);
-
- test("Format command by passing argc/argv with lengths: ");
- len = redisFormatCommandArgv(&cmd,argc,argv,lens);
- test_cond(strncmp(cmd,"*3\r\n$3\r\nSET\r\n$7\r\nfoo\0xxx\r\n$3\r\nbar\r\n",len) == 0 &&
- len == 4+4+(3+2)+4+(7+2)+4+(3+2));
- free(cmd);
-}
-
-static void test_reply_reader(void) {
- redisReader *reader;
- void *reply;
- int ret;
- int i;
-
- test("Error handling in reply parser: ");
- reader = redisReaderCreate();
- redisReaderFeed(reader,(char*)"@foo\r\n",6);
- ret = redisReaderGetReply(reader,NULL);
- test_cond(ret == REDIS_ERR &&
- strcasecmp(reader->errstr,"Protocol error, got \"@\" as reply type byte") == 0);
- redisReaderFree(reader);
-
- /* when the reply already contains multiple items, they must be free'd
- * on an error. valgrind will bark when this doesn't happen. */
- test("Memory cleanup in reply parser: ");
- reader = redisReaderCreate();
- redisReaderFeed(reader,(char*)"*2\r\n",4);
- redisReaderFeed(reader,(char*)"$5\r\nhello\r\n",11);
- redisReaderFeed(reader,(char*)"@foo\r\n",6);
- ret = redisReaderGetReply(reader,NULL);
- test_cond(ret == REDIS_ERR &&
- strcasecmp(reader->errstr,"Protocol error, got \"@\" as reply type byte") == 0);
- redisReaderFree(reader);
-
- test("Set error on nested multi bulks with depth > 7: ");
- reader = redisReaderCreate();
-
- for (i = 0; i < 9; i++) {
- redisReaderFeed(reader,(char*)"*1\r\n",4);
- }
-
- ret = redisReaderGetReply(reader,NULL);
- test_cond(ret == REDIS_ERR &&
- strncasecmp(reader->errstr,"No support for",14) == 0);
- redisReaderFree(reader);
-
- test("Works with NULL functions for reply: ");
- reader = redisReaderCreate();
- reader->fn = NULL;
- redisReaderFeed(reader,(char*)"+OK\r\n",5);
- ret = redisReaderGetReply(reader,&reply);
- test_cond(ret == REDIS_OK && reply == (void*)REDIS_REPLY_STATUS);
- redisReaderFree(reader);
-
- test("Works when a single newline (\\r\\n) covers two calls to feed: ");
- reader = redisReaderCreate();
- reader->fn = NULL;
- redisReaderFeed(reader,(char*)"+OK\r",4);
- ret = redisReaderGetReply(reader,&reply);
- assert(ret == REDIS_OK && reply == NULL);
- redisReaderFeed(reader,(char*)"\n",1);
- ret = redisReaderGetReply(reader,&reply);
- test_cond(ret == REDIS_OK && reply == (void*)REDIS_REPLY_STATUS);
- redisReaderFree(reader);
-
- test("Don't reset state after protocol error: ");
- reader = redisReaderCreate();
- reader->fn = NULL;
- redisReaderFeed(reader,(char*)"x",1);
- ret = redisReaderGetReply(reader,&reply);
- assert(ret == REDIS_ERR);
- ret = redisReaderGetReply(reader,&reply);
- test_cond(ret == REDIS_ERR && reply == NULL);
- redisReaderFree(reader);
-
- /* Regression test for issue #45 on GitHub. */
- test("Don't do empty allocation for empty multi bulk: ");
- reader = redisReaderCreate();
- redisReaderFeed(reader,(char*)"*0\r\n",4);
- ret = redisReaderGetReply(reader,&reply);
- test_cond(ret == REDIS_OK &&
- ((redisReply*)reply)->type == REDIS_REPLY_ARRAY &&
- ((redisReply*)reply)->elements == 0);
- freeReplyObject(reply);
- redisReaderFree(reader);
-}
-
-static void test_blocking_connection_errors(void) {
- redisContext *c;
-
- test("Returns error when host cannot be resolved: ");
- c = redisConnect((char*)"idontexist.local", 6379);
- test_cond(c->err == REDIS_ERR_OTHER &&
- (strcmp(c->errstr,"Name or service not known") == 0 ||
- strcmp(c->errstr,"Can't resolve: idontexist.local") == 0));
- redisFree(c);
-
- test("Returns error when the port is not open: ");
- c = redisConnect((char*)"localhost", 1);
- test_cond(c->err == REDIS_ERR_IO &&
- strcmp(c->errstr,"Connection refused") == 0);
- redisFree(c);
-
- test("Returns error when the unix socket path doesn't accept connections: ");
- c = redisConnectUnix((char*)"/tmp/idontexist.sock");
- test_cond(c->err == REDIS_ERR_IO); /* Don't care about the message... */
- redisFree(c);
-}
-
-static void test_blocking_connection(struct config config) {
- redisContext *c;
- redisReply *reply;
-
- c = connect(config);
-
- test("Is able to deliver commands: ");
- reply = redisCommand(c,"PING");
- test_cond(reply->type == REDIS_REPLY_STATUS &&
- strcasecmp(reply->str,"pong") == 0)
- freeReplyObject(reply);
-
- test("Is a able to send commands verbatim: ");
- reply = redisCommand(c,"SET foo bar");
- test_cond (reply->type == REDIS_REPLY_STATUS &&
- strcasecmp(reply->str,"ok") == 0)
- freeReplyObject(reply);
-
- test("%%s String interpolation works: ");
- reply = redisCommand(c,"SET %s %s","foo","hello world");
- freeReplyObject(reply);
- reply = redisCommand(c,"GET foo");
- test_cond(reply->type == REDIS_REPLY_STRING &&
- strcmp(reply->str,"hello world") == 0);
- freeReplyObject(reply);
-
- test("%%b String interpolation works: ");
- reply = redisCommand(c,"SET %b %b","foo",3,"hello\x00world",11);
- freeReplyObject(reply);
- reply = redisCommand(c,"GET foo");
- test_cond(reply->type == REDIS_REPLY_STRING &&
- memcmp(reply->str,"hello\x00world",11) == 0)
-
- test("Binary reply length is correct: ");
- test_cond(reply->len == 11)
- freeReplyObject(reply);
-
- test("Can parse nil replies: ");
- reply = redisCommand(c,"GET nokey");
- test_cond(reply->type == REDIS_REPLY_NIL)
- freeReplyObject(reply);
-
- /* test 7 */
- test("Can parse integer replies: ");
- reply = redisCommand(c,"INCR mycounter");
- test_cond(reply->type == REDIS_REPLY_INTEGER && reply->integer == 1)
- freeReplyObject(reply);
-
- test("Can parse multi bulk replies: ");
- freeReplyObject(redisCommand(c,"LPUSH mylist foo"));
- freeReplyObject(redisCommand(c,"LPUSH mylist bar"));
- reply = redisCommand(c,"LRANGE mylist 0 -1");
- test_cond(reply->type == REDIS_REPLY_ARRAY &&
- reply->elements == 2 &&
- !memcmp(reply->element[0]->str,"bar",3) &&
- !memcmp(reply->element[1]->str,"foo",3))
- freeReplyObject(reply);
-
- /* m/e with multi bulk reply *before* other reply.
- * specifically test ordering of reply items to parse. */
- test("Can handle nested multi bulk replies: ");
- freeReplyObject(redisCommand(c,"MULTI"));
- freeReplyObject(redisCommand(c,"LRANGE mylist 0 -1"));
- freeReplyObject(redisCommand(c,"PING"));
- reply = (redisCommand(c,"EXEC"));
- test_cond(reply->type == REDIS_REPLY_ARRAY &&
- reply->elements == 2 &&
- reply->element[0]->type == REDIS_REPLY_ARRAY &&
- reply->element[0]->elements == 2 &&
- !memcmp(reply->element[0]->element[0]->str,"bar",3) &&
- !memcmp(reply->element[0]->element[1]->str,"foo",3) &&
- reply->element[1]->type == REDIS_REPLY_STATUS &&
- strcasecmp(reply->element[1]->str,"pong") == 0);
- freeReplyObject(reply);
-
- disconnect(c);
-}
-
-static void test_blocking_io_errors(struct config config) {
- redisContext *c;
- redisReply *reply;
- void *_reply;
- int major, minor;
-
- /* Connect to target given by config. */
- c = connect(config);
- {
- /* Find out Redis version to determine the path for the next test */
- const char *field = "redis_version:";
- char *p, *eptr;
-
- reply = redisCommand(c,"INFO");
- p = strstr(reply->str,field);
- major = strtol(p+strlen(field),&eptr,10);
- p = eptr+1; /* char next to the first "." */
- minor = strtol(p,&eptr,10);
- freeReplyObject(reply);
- }
-
- test("Returns I/O error when the connection is lost: ");
- reply = redisCommand(c,"QUIT");
- if (major >= 2 && minor > 0) {
- /* > 2.0 returns OK on QUIT and read() should be issued once more
- * to know the descriptor is at EOF. */
- test_cond(strcasecmp(reply->str,"OK") == 0 &&
- redisGetReply(c,&_reply) == REDIS_ERR);
- freeReplyObject(reply);
- } else {
- test_cond(reply == NULL);
- }
-
- /* On 2.0, QUIT will cause the connection to be closed immediately and
- * the read(2) for the reply on QUIT will set the error to EOF.
- * On >2.0, QUIT will return with OK and another read(2) needed to be
- * issued to find out the socket was closed by the server. In both
- * conditions, the error will be set to EOF. */
- assert(c->err == REDIS_ERR_EOF &&
- strcmp(c->errstr,"Server closed the connection") == 0);
- redisFree(c);
-
- c = connect(config);
- test("Returns I/O error on socket timeout: ");
- struct timeval tv = { 0, 1000 };
- assert(redisSetTimeout(c,tv) == REDIS_OK);
- test_cond(redisGetReply(c,&_reply) == REDIS_ERR &&
- c->err == REDIS_ERR_IO && errno == EAGAIN);
- redisFree(c);
-}
-
-static void test_throughput(struct config config) {
- redisContext *c = connect(config);
- redisReply **replies;
- int i, num;
- long long t1, t2;
-
- test("Throughput:\n");
- for (i = 0; i < 500; i++)
- freeReplyObject(redisCommand(c,"LPUSH mylist foo"));
-
- num = 1000;
- replies = malloc(sizeof(redisReply*)*num);
- t1 = usec();
- for (i = 0; i < num; i++) {
- replies[i] = redisCommand(c,"PING");
- assert(replies[i] != NULL && replies[i]->type == REDIS_REPLY_STATUS);
- }
- t2 = usec();
- for (i = 0; i < num; i++) freeReplyObject(replies[i]);
- free(replies);
- printf("\t(%dx PING: %.3fs)\n", num, (t2-t1)/1000000.0);
-
- replies = malloc(sizeof(redisReply*)*num);
- t1 = usec();
- for (i = 0; i < num; i++) {
- replies[i] = redisCommand(c,"LRANGE mylist 0 499");
- assert(replies[i] != NULL && replies[i]->type == REDIS_REPLY_ARRAY);
- assert(replies[i] != NULL && replies[i]->elements == 500);
- }
- t2 = usec();
- for (i = 0; i < num; i++) freeReplyObject(replies[i]);
- free(replies);
- printf("\t(%dx LRANGE with 500 elements: %.3fs)\n", num, (t2-t1)/1000000.0);
-
- num = 10000;
- replies = malloc(sizeof(redisReply*)*num);
- for (i = 0; i < num; i++)
- redisAppendCommand(c,"PING");
- t1 = usec();
- for (i = 0; i < num; i++) {
- assert(redisGetReply(c, (void*)&replies[i]) == REDIS_OK);
- assert(replies[i] != NULL && replies[i]->type == REDIS_REPLY_STATUS);
- }
- t2 = usec();
- for (i = 0; i < num; i++) freeReplyObject(replies[i]);
- free(replies);
- printf("\t(%dx PING (pipelined): %.3fs)\n", num, (t2-t1)/1000000.0);
-
- replies = malloc(sizeof(redisReply*)*num);
- for (i = 0; i < num; i++)
- redisAppendCommand(c,"LRANGE mylist 0 499");
- t1 = usec();
- for (i = 0; i < num; i++) {
- assert(redisGetReply(c, (void*)&replies[i]) == REDIS_OK);
- assert(replies[i] != NULL && replies[i]->type == REDIS_REPLY_ARRAY);
- assert(replies[i] != NULL && replies[i]->elements == 500);
- }
- t2 = usec();
- for (i = 0; i < num; i++) freeReplyObject(replies[i]);
- free(replies);
- printf("\t(%dx LRANGE with 500 elements (pipelined): %.3fs)\n", num, (t2-t1)/1000000.0);
-
- disconnect(c);
-}
-
-// static long __test_callback_flags = 0;
-// static void __test_callback(redisContext *c, void *privdata) {
-// ((void)c);
-// /* Shift to detect execution order */
-// __test_callback_flags <<= 8;
-// __test_callback_flags |= (long)privdata;
-// }
-//
-// static void __test_reply_callback(redisContext *c, redisReply *reply, void *privdata) {
-// ((void)c);
-// /* Shift to detect execution order */
-// __test_callback_flags <<= 8;
-// __test_callback_flags |= (long)privdata;
-// if (reply) freeReplyObject(reply);
-// }
-//
-// static redisContext *__connect_nonblock() {
-// /* Reset callback flags */
-// __test_callback_flags = 0;
-// return redisConnectNonBlock("127.0.0.1", port, NULL);
-// }
-//
-// static void test_nonblocking_connection() {
-// redisContext *c;
-// int wdone = 0;
-//
-// test("Calls command callback when command is issued: ");
-// c = __connect_nonblock();
-// redisSetCommandCallback(c,__test_callback,(void*)1);
-// redisCommand(c,"PING");
-// test_cond(__test_callback_flags == 1);
-// redisFree(c);
-//
-// test("Calls disconnect callback on redisDisconnect: ");
-// c = __connect_nonblock();
-// redisSetDisconnectCallback(c,__test_callback,(void*)2);
-// redisDisconnect(c);
-// test_cond(__test_callback_flags == 2);
-// redisFree(c);
-//
-// test("Calls disconnect callback and free callback on redisFree: ");
-// c = __connect_nonblock();
-// redisSetDisconnectCallback(c,__test_callback,(void*)2);
-// redisSetFreeCallback(c,__test_callback,(void*)4);
-// redisFree(c);
-// test_cond(__test_callback_flags == ((2 << 8) | 4));
-//
-// test("redisBufferWrite against empty write buffer: ");
-// c = __connect_nonblock();
-// test_cond(redisBufferWrite(c,&wdone) == REDIS_OK && wdone == 1);
-// redisFree(c);
-//
-// test("redisBufferWrite against not yet connected fd: ");
-// c = __connect_nonblock();
-// redisCommand(c,"PING");
-// test_cond(redisBufferWrite(c,NULL) == REDIS_ERR &&
-// strncmp(c->error,"write:",6) == 0);
-// redisFree(c);
-//
-// test("redisBufferWrite against closed fd: ");
-// c = __connect_nonblock();
-// redisCommand(c,"PING");
-// redisDisconnect(c);
-// test_cond(redisBufferWrite(c,NULL) == REDIS_ERR &&
-// strncmp(c->error,"write:",6) == 0);
-// redisFree(c);
-//
-// test("Process callbacks in the right sequence: ");
-// c = __connect_nonblock();
-// redisCommandWithCallback(c,__test_reply_callback,(void*)1,"PING");
-// redisCommandWithCallback(c,__test_reply_callback,(void*)2,"PING");
-// redisCommandWithCallback(c,__test_reply_callback,(void*)3,"PING");
-//
-// /* Write output buffer */
-// wdone = 0;
-// while(!wdone) {
-// usleep(500);
-// redisBufferWrite(c,&wdone);
-// }
-//
-// /* Read until at least one callback is executed (the 3 replies will
-// * arrive in a single packet, causing all callbacks to be executed in
-// * a single pass). */
-// while(__test_callback_flags == 0) {
-// assert(redisBufferRead(c) == REDIS_OK);
-// redisProcessCallbacks(c);
-// }
-// test_cond(__test_callback_flags == 0x010203);
-// redisFree(c);
-//
-// test("redisDisconnect executes pending callbacks with NULL reply: ");
-// c = __connect_nonblock();
-// redisSetDisconnectCallback(c,__test_callback,(void*)1);
-// redisCommandWithCallback(c,__test_reply_callback,(void*)2,"PING");
-// redisDisconnect(c);
-// test_cond(__test_callback_flags == 0x0201);
-// redisFree(c);
-// }
-
-int main(int argc, char **argv) {
- struct config cfg = {
- .tcp = {
- .host = "127.0.0.1",
- .port = 6379
- },
- .unix = {
- .path = "/tmp/redis.sock"
- }
- };
- int throughput = 1;
-
- /* Ignore broken pipe signal (for I/O error tests). */
- signal(SIGPIPE, SIG_IGN);
-
- /* Parse command line options. */
- argv++; argc--;
- while (argc) {
- if (argc >= 2 && !strcmp(argv[0],"-h")) {
- argv++; argc--;
- cfg.tcp.host = argv[0];
- } else if (argc >= 2 && !strcmp(argv[0],"-p")) {
- argv++; argc--;
- cfg.tcp.port = atoi(argv[0]);
- } else if (argc >= 2 && !strcmp(argv[0],"-s")) {
- argv++; argc--;
- cfg.unix.path = argv[0];
- } else if (argc >= 1 && !strcmp(argv[0],"--skip-throughput")) {
- throughput = 0;
- } else {
- fprintf(stderr, "Invalid argument: %s\n", argv[0]);
- exit(1);
- }
- argv++; argc--;
- }
-
- test_format_commands();
- test_reply_reader();
- test_blocking_connection_errors();
-
- printf("\nTesting against TCP connection (%s:%d):\n", cfg.tcp.host, cfg.tcp.port);
- cfg.type = CONN_TCP;
- test_blocking_connection(cfg);
- test_blocking_io_errors(cfg);
- if (throughput) test_throughput(cfg);
-
- printf("\nTesting against Unix socket connection (%s):\n", cfg.unix.path);
- cfg.type = CONN_UNIX;
- test_blocking_connection(cfg);
- test_blocking_io_errors(cfg);
- if (throughput) test_throughput(cfg);
-
- if (fails) {
- printf("*** %d TESTS FAILED ***\n", fails);
- return 1;
- }
-
- printf("ALL TESTS PASSED\n");
- return 0;
-}
diff --git a/node_modules/hiredis/hiredis.js b/node_modules/hiredis/hiredis.js
deleted file mode 100644
index 527c75e0..00000000
--- a/node_modules/hiredis/hiredis.js
+++ /dev/null
@@ -1,34 +0,0 @@
-var net = require("net"),
- hiredis = require('bindings')('hiredis.node');
-
-exports.Reader = hiredis.Reader;
-exports.createConnection = function(port, host) {
- var s = net.createConnection(port || 6379, host);
- var r = new hiredis.Reader();
- var _write = s.write;
-
- s.write = function() {
- var i, args = arguments;
- _write.call(s, "*" + args.length + "\r\n");
- for (i = 0; i < args.length; i++) {
- var arg = args[i];
- _write.call(s, "$" + arg.length + "\r\n" + arg + "\r\n");
- }
- }
-
- s.on("data", function(data) {
- var reply;
- r.feed(data);
- try {
- while((reply = r.get()) !== undefined)
- s.emit("reply", reply);
- } catch(err) {
- r = null;
- s.emit("error", err);
- s.destroy();
- }
- });
-
- return s;
-}
-
diff --git a/node_modules/hiredis/node_modules/bindings/README.md b/node_modules/hiredis/node_modules/bindings/README.md
deleted file mode 100644
index 585cf512..00000000
--- a/node_modules/hiredis/node_modules/bindings/README.md
+++ /dev/null
@@ -1,97 +0,0 @@
-node-bindings
-=============
-### Helper module for loading your native module's .node file
-
-This is a helper module for authors of Node.js native addon modules.
-It is basically the "swiss army knife" of `require()`ing your native module's
-`.node` file.
-
-Throughout the course of Node's native addon history, addons have ended up being
-compiled in a variety of different places, depending on which build tool and which
-version of node was used. To make matters worse, now the _gyp_ build tool can
-produce either a _Release_ or _Debug_ build, each being built into different
-locations.
-
-This module checks _all_ the possible locations that a native addon would be built
-at, and returns the first one that loads successfully.
-
-
-Installation
-------------
-
-Install with `npm`:
-
-``` bash
-$ npm install bindings
-```
-
-Or add it to the `"dependencies"` section of your _package.json_ file.
-
-
-Example
--------
-
-`require()`ing the proper bindings file for the current node version, platform
-and architecture is as simple as:
-
-``` js
-var bindings = require('bindings')('binding.node')
-
-// Use your bindings defined in your C files
-bindings.your_c_function()
-```
-
-
-Nice Error Output
------------------
-
-When the `.node` file could not be loaded, `node-bindings` throws an Error with
-a nice error message telling you exactly what was tried. You can also check the
-`err.tries` Array property.
-
-```
-Error: Could not load the bindings file. Tried:
- → /Users/nrajlich/ref/build/binding.node
- → /Users/nrajlich/ref/build/Debug/binding.node
- → /Users/nrajlich/ref/build/Release/binding.node
- → /Users/nrajlich/ref/out/Debug/binding.node
- → /Users/nrajlich/ref/Debug/binding.node
- → /Users/nrajlich/ref/out/Release/binding.node
- → /Users/nrajlich/ref/Release/binding.node
- → /Users/nrajlich/ref/build/default/binding.node
- → /Users/nrajlich/ref/compiled/0.8.2/darwin/x64/binding.node
- at bindings (/Users/nrajlich/ref/node_modules/bindings/bindings.js:84:13)
- at Object. (/Users/nrajlich/ref/lib/ref.js:5:47)
- at Module._compile (module.js:449:26)
- at Object.Module._extensions..js (module.js:467:10)
- at Module.load (module.js:356:32)
- at Function.Module._load (module.js:312:12)
- ...
-```
-
-
-License
--------
-
-(The MIT License)
-
-Copyright (c) 2012 Nathan Rajlich <nathan@tootallnate.net>
-
-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.
diff --git a/node_modules/hiredis/node_modules/bindings/bindings.js b/node_modules/hiredis/node_modules/bindings/bindings.js
deleted file mode 100644
index a40029bb..00000000
--- a/node_modules/hiredis/node_modules/bindings/bindings.js
+++ /dev/null
@@ -1,159 +0,0 @@
-
-/**
- * Module dependencies.
- */
-
-var fs = require('fs')
- , path = require('path')
- , join = path.join
- , dirname = path.dirname
- , exists = fs.existsSync || path.existsSync
- , defaults = {
- arrow: process.env.NODE_BINDINGS_ARROW || ' → '
- , compiled: process.env.NODE_BINDINGS_COMPILED_DIR || 'compiled'
- , platform: process.platform
- , arch: process.arch
- , version: process.versions.node
- , bindings: 'bindings.node'
- , try: [
- // node-gyp's linked version in the "build" dir
- [ 'module_root', 'build', 'bindings' ]
- // node-waf and gyp_addon (a.k.a node-gyp)
- , [ 'module_root', 'build', 'Debug', 'bindings' ]
- , [ 'module_root', 'build', 'Release', 'bindings' ]
- // Debug files, for development (legacy behavior, remove for node v0.9)
- , [ 'module_root', 'out', 'Debug', 'bindings' ]
- , [ 'module_root', 'Debug', 'bindings' ]
- // Release files, but manually compiled (legacy behavior, remove for node v0.9)
- , [ 'module_root', 'out', 'Release', 'bindings' ]
- , [ 'module_root', 'Release', 'bindings' ]
- // Legacy from node-waf, node <= 0.4.x
- , [ 'module_root', 'build', 'default', 'bindings' ]
- // Production "Release" buildtype binary (meh...)
- , [ 'module_root', 'compiled', 'version', 'platform', 'arch', 'bindings' ]
- ]
- }
-
-/**
- * The main `bindings()` function loads the compiled bindings for a given module.
- * It uses V8's Error API to determine the parent filename that this function is
- * being invoked from, which is then used to find the root directory.
- */
-
-function bindings (opts) {
-
- // Argument surgery
- if (typeof opts == 'string') {
- opts = { bindings: opts }
- } else if (!opts) {
- opts = {}
- }
- opts.__proto__ = defaults
-
- // Get the module root
- if (!opts.module_root) {
- opts.module_root = exports.getRoot(exports.getFileName())
- }
-
- // Ensure the given bindings name ends with .node
- if (path.extname(opts.bindings) != '.node') {
- opts.bindings += '.node'
- }
-
- var tries = []
- , i = 0
- , l = opts.try.length
- , n
- , b
- , err
-
- for (; i (/Users/nrajlich/ref/lib/ref.js:5:47)\n at Module._compile (module.js:449:26)\n at Object.Module._extensions..js (module.js:467:10)\n at Module.load (module.js:356:32)\n at Function.Module._load (module.js:312:12)\n ...\n```\n\n\nLicense\n-------\n\n(The MIT License)\n\nCopyright (c) 2012 Nathan Rajlich <nathan@tootallnate.net>\n\nPermission is hereby granted, free of charge, to any person obtaining\na copy of this software and associated documentation files (the\n'Software'), to deal in the Software without restriction, including\nwithout limitation the rights to use, copy, modify, merge, publish,\ndistribute, sublicense, and/or sell copies of the Software, and to\npermit persons to whom the Software is furnished to do so, subject to\nthe following conditions:\n\nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\nIN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\nCLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\nTORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\nSOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n",
- "readmeFilename": "README.md",
- "bugs": {
- "url": "https://github.com/TooTallNate/node-bindings/issues"
- },
- "homepage": "https://github.com/TooTallNate/node-bindings",
- "_id": "bindings@1.1.1",
- "_from": "bindings@*"
-}
diff --git a/node_modules/hiredis/package.json b/node_modules/hiredis/package.json
deleted file mode 100644
index 3f616706..00000000
--- a/node_modules/hiredis/package.json
+++ /dev/null
@@ -1,43 +0,0 @@
-{
- "name": "hiredis",
- "description": "Wrapper for reply processing code in hiredis",
- "version": "0.1.16",
- "homepage": "http://github.com/pietern/hiredis-node",
- "author": {
- "name": "Pieter Noordhuis",
- "email": "pcnoordhuis@gmail.com"
- },
- "main": "hiredis",
- "scripts": {
- "test": "node test/reader.js",
- "install": "node-gyp rebuild"
- },
- "dependencies": {
- "bindings": "*"
- },
- "engines": {
- "node": ">= 0.6.0"
- },
- "repository": {
- "type": "git",
- "url": "git@github.com:pietern/hiredis-node.git"
- },
- "bugs": {
- "url": "https://github.com/pietern/hiredis-node/issues"
- },
- "licenses": [
- {
- "type": "BSD",
- "url": "https://github.com/pietern/hiredis-node#license"
- }
- ],
- "gypfile": true,
- "readme": "[](https://travis-ci.org/pietern/hiredis-node)\n\n# hiredis-node\n\nNode extension that wraps [hiredis][hiredis].\nBecause Node is already good at doing I/O, hiredis-node only provides\nbindings to the protocol parser.\nThe hiredis protocol parser is faster than JavaScript protocol parsers,\nbut the speedup only becomes noticable for large replies.\nIf you use Redis for simple SET/GET operations, there won't be a big\nbenefit to using hiredis.\nIf you use Redis for big SUNION/SINTER/LRANGE/ZRANGE operations, the\nbenefit to using hiredis-node can be significant.\n\n[hiredis]: http://github.com/redis/hiredis\n\n## Install\n\nInstall with [NPM][npm]:\n\n```\nnpm install hiredis\n```\n\n[npm]: https://npmjs.org/\n\n## Usage\n\nhiredis-node works out of the box with Matt Ranney's [node_redis][node_redis].\nThe latter has an optional dependency on hiredis-node, so maybe you're\nalready using it without knowing.\n\nAlternatively, you can use it directly:\n\n```javascript\nvar hiredis = require(\"hiredis\"),\n reader = new hiredis.Reader();\n\n// Data comes in\nreader.feed(\"$5\\r\\nhello\\r\\n\");\n\n// Reply comes out\nreader.get() // => \"hello\"\n```\n\nInstead of returning strings for bulk payloads, it can also return\nbuffers:\n\n```javascript\nvar hiredis = require(\"hiredis\"),\n reader = new hiredis.Reader({ return_buffers: true });\n\n// Data comes in\nreader.feed(\"$5\\r\\nhello\\r\\n\");\n\n// Reply comes out\nreader.get() // => \n```\n\n[node_redis]: http://github.com/mranney/node_redis\n\n## Windows\n\nDmitry Gorbunov (@fuwaneko) made a [fork of hiredis-node][windows_fork] with Windows support.\n\n[windows_fork]: https://github.com/fuwaneko/hiredis-node\n\n## License\n\nThis code is released under the BSD license, after the license of hiredis.\n",
- "readmeFilename": "README.md",
- "_id": "hiredis@0.1.16",
- "dist": {
- "shasum": "86206f372ee8ecf0f7a61ea9a5deb9fd4cf90089"
- },
- "_from": "hiredis@",
- "_resolved": "https://registry.npmjs.org/hiredis/-/hiredis-0.1.16.tgz"
-}
diff --git a/node_modules/hiredis/src/hiredis.cc b/node_modules/hiredis/src/hiredis.cc
deleted file mode 100644
index f0236dcf..00000000
--- a/node_modules/hiredis/src/hiredis.cc
+++ /dev/null
@@ -1,13 +0,0 @@
-#include
-#include
-#include "reader.h"
-
-using namespace v8;
-
-extern "C" {
- static void init (Handle